summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/mips/sysdep.h
AgeCommit message (Collapse)Author
2016-07-17cleanup PTR_MANGLE/PTR_DEMANGLE supportWaldemar Brodkorb
As this is only implemented for a few architecture and not well tested, just remove it. Reviewed-by: Max Filippov <jcmvbkbc@gmail.com>
2014-02-15mips: Remove duplicate macro definitionsSteve Ellcey
The INLINE_SYSCALL, INTERNAL_SYSCALL*, and internal_syscall* macros are defined for MIPS in both libc/sysdeps/linux/mips/sysdep.h and libc/sysdeps/linux/mips/bits/syscalls.h. The macros are the same in both cases except that syscalls.h defines internal_syscalls[567] the same for N32 and N64 ABIs and has a different definition for O32. I believe that is correct. The sysdep.h header uses the O32 versions for N32 and has different definitions for N64. I think that is wrong and that N32 and N64 should share the same definition (modulo the type 'long' vs. 'long long' for the arguments. This setup (from sysdep.h) now agrees with what glibc has. I am not positive about which header (sysdep.h vs syscalls.h) is really the right one to have these definitions in but using sysdep.h seems to work for all my builds. Signed-off-by: Steve Ellcey <sellcey@mips.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2014-02-02mips: silence 'set but not used' warningsSteve Ellcey
This patch uses 'attribute_unused' to clean up a number of warnings messages that are generated when doing a MIPS build. All of the changes are in MIPS specific files and there are no code changes other then adding the unused attribute where needed. Signed-off-by: Steve Ellcey <sellcey@mips.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2014-01-22libc: fix MIPS N64 forkWaldemar Brodkorb
fork() is broken for MIPS64 N64 ABI. You can check it with a simple C program statically linked with qemu-mips64 user emulation. Internally fork() is using the clone system call (at least with NPTL) with 5 arguments. See ./libpthread/nptl/sysdeps/unix/sysv/linux/i386/fork.c. The calling conventions for MIPS N32 and N64 allow to use up to 8 registers for that. See http://en.wikipedia.org/wiki/Calling_convention#MIPS This is correctly implemented in libc/sysdeps/linux/mips/bits/syscalls.h, but not in libc/sysdeps/linux/mips/sysdep.h. fork.c uses the later one. It seems that fork() works fine for MIPS64 N32 with just using the stack like with the O32 case. There is a user of INLINE_SYSCALL with 7 arguments in libc/sysdeps/linux/common/sync_file_range.c for MIPS64 N32, so I decided to only use the macros for the MIPS64 N64 case. With this patch my uClibc based Linux system boots up fine in qemu-system-mips64. Signed-off-by: Waldemar Brodkorb <wbx@openadk.org> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-12-20libc/sysdeps: commonize ret_ERRVALBaruch Siach
* Add a common ret_ERRVAL definition * Remove ret_ERRVAL from architectures using the common 'ret' * Add 'undef' to architectures that need a different return instruction * Add '#include <common/sysdep.h>' to cris and ia64 that were missing it Signed-off-by: Baruch Siach <baruch@tkos.co.il> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-11-18Replace FSF snail mail address with URLsMike Frysinger
This matches a similar change made to glibc. No functional changes here. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-10-27mips: fix errno setting after syscallAlexander Gordeev
If there was an error during syscall then after it's completion a3 register holds a non-zero value and v0 holds an actual error code which should be saved in errno. This can be achieved by calling __syscall_error with the value from v0 as a parameter. So this value should be stored in a0, but the appropriate assembly instructions are missing. Fixed this now by adding "move a0, v0". I think it was once fixed by 58c5f8ba4cdf62342d05a546d15404cbbb3c4e07 but then something went wrong. Again... Signed-off-by: Alexander Gordeev <lasaine@lvk.cs.msu.su> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2010-06-24use uniform form of C99 keywordsBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2010-06-22MIPS: Fix build error with linuxthreads.oldAbdoulaye Walsimou Gaye
This patch avoid the following build error: AS libc/sysdeps/linux/mips/vfork.os In file included from libc/sysdeps/linux/mips/vfork.S:22: ./libc/sysdeps/linux/mips/sysdep.h:41:20: error: regdef.h: No such file or directory libc/sysdeps/linux/mips/vfork.S: Assembler messages: libc/sysdeps/linux/mips/vfork.S:40: Warning: Unrecognized register name `sp' libc/sysdeps/linux/mips/vfork.S:40: Warning: Bad .frame directive libc/sysdeps/linux/mips/vfork.S:40: Error: junk at end of line, first unrecognized character is `s' libc/sysdeps/linux/mips/vfork.S:44: Error: illegal operands `dsubu sp,FRAMESZ' libc/sysdeps/linux/mips/vfork.S:45: Error: bad or irreducible absolute expression libc/sysdeps/linux/mips/vfork.S:65: Error: illegal operands `daddu sp,FRAMESZ' libc/sysdeps/linux/mips/vfork.S:69: Error: illegal operands `li a0,0x4112' libc/sysdeps/linux/mips/vfork.S:70: Error: illegal operands `move a1,sp' libc/sysdeps/linux/mips/vfork.S:73: Error: illegal operands `li v0,(5000+55)' libc/sysdeps/linux/mips/vfork.S:78: Error: illegal operands `bnez a3,.Lerror' libc/sysdeps/linux/mips/vfork.S:88: Error: illegal operands `dla t9,__syscall_error' libc/sysdeps/linux/mips/vfork.S:90: Error: illegal operands `jr t9' Signed-off-by: Abdoulaye Walsimou Gaye <awg@embtoolkit.org> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
2010-02-17Fix nptl build for mipsKhem Raj
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2010-02-11mips/sysdep.h: Unify mips sysdep.hKhem Raj
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2009-10-17mips specific bits needed for nptlAustin Foxley
* vfork impl with support for SAVE_PID, RESTORE_PID * sysdep.h assembly macros Signed-off-by: Austin Foxley <austinf@cetoncorp.com>