summaryrefslogtreecommitdiffstats
path: root/lib/libc/mips
Commit message (Collapse)AuthorAgeFilesLines
* MFC r304928:kib2016-09-032-72/+1
| | | | | | | | | | | | | Do not obliterate errno value in the main thread during ptrace(2) call on x86. MFC r304931: Follow ABI when calling __error from the ptrace(2) wrapper. MFC r305012: Rewrite ptrace(2) wrappers in C. MFC r305022: Restore the requirement of setting errno to zero before calling ptrace(2).
* MFC r294515:brooks2016-01-281-7/+21
| | | | | | | | | | | | | Fix the implementations of PSEUDO_NOERROR and PSEUDO. The PSEUDO* macros should not declare <syscall>, only _<syscall> and __sys_<syscall>. This was causing the interposing C wrappers to be ignored due to link order. Reviewed by: kib Obtained from: CheriBSD (4e8e13c90fc6a80e1520de44a6864cfd78b3b56d) Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D4097
* MFC r277877: Use zero register instead of immediate 0x0 in MIPS assemblyemaste2015-04-281-1/+1
| | | | | | It seems GAS makes the substitution automatically, but Clang's integrated assembler does not (yet). It fails with "invalid operand for instruction."
* MFC r274816:brooks2015-01-222-4/+153
| | | | | | | | | | | | | | Add FPU support for MIPS setjmp(3)/longjmp(3). This change saves/restores the callee-saved MIPS floating point registers as documented by the o32/n32/n64 spec ("MIPSpro N32 ABI Handbook", Table 2-1) for the _setjmp(3), _longjmp(3), setjmp(3) and longjmp(3) C library functions. This is only included when the C library is built with hardware floating point support (or when "SOFTFLOAT" is not defined). Submitted by: sson Sponsored by: DARPA, AFRL
* Remove clause 3 and 4 from TNF licensesemaste2013-05-295-35/+0
| | | | | | | Per the NetBSD Foundation statement Third parties are encouraged to change the license on any files which have a 4-clause license contributed to the NetBSD Foundation to a 2-clause license.
* The getcontext() from the __fillcontextx() call in thekib2013-05-281-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | check_deferred_signal() returns twice, since handle_signal() emulates the return from the normal signal handler by sigreturn(2)ing the passed context. Second return is performed on the destroyed stack frame, because __fillcontextx() has already returned. This causes undefined and bad behaviour, usually the victim thread gets SIGSEGV. Avoid nested frame and the need to return from it by doing direct call to getcontext() in the check_deferred_signal() and using a new private libc helper __fillcontextx2() to complement the context with the extended CPU state if the deferred signal is still present. The __fillcontextx() is now unused, but is kept to allow older libthr.so to be used with the new libc. Mark __fillcontextx() as returning twice [1]. Reported by: pgj Pointy hat to: kib Discussed with: dim Tested by: pgj, dim Suggested by: jilles [1] MFC after: 1 week
* Rework the __vdso_* symbols attributes to only make the symbols weak,kib2013-01-302-0/+50
| | | | | | | | | | but use normal references instead of weak. This makes the statically linked binaries to use fast gettimeofday(2) by forcing the linker to resolve references and providing the neccessary functions. Reported by: bde Tested by: marius (sparc64) MFC after: 2 weeks
* Implement _set_tpgonzo2012-03-061-0/+4
|
* Make the sys/ucontext.h self-contained by changing the return typekib2012-02-011-1/+1
| | | | | | | of __getcontextx_size(3) from size_t to int. PR: ports/164654 MFC after: 1 month
* Add API for obtaining extended machine context states that cannot bekib2012-01-212-1/+71
| | | | | | | | | | | fit into existing mcontext_t. On i386 and amd64 do return the extended FPU states using getcontextx(3). For other architectures, getcontextx(3) returns the same information as getcontext(2). Tested by: pho MFC after: 1 month
* Convert softfloat to use the standard exception flag and rounding macrosdas2012-01-161-14/+14
| | | | | | in fenv.h instead of the non-standard and incomplete ones in ieeefp.h. Thanks to Ian Lepore for testing this patch.
* Change index() and rindex() to a weak alias.ed2012-01-052-2/+2
| | | | | | | | This allows people to still write statically linked applications that call strchr() or strrchr() and have a local variable or function called index. Discussed with: bde@
* Merge index() and strchr() together.ed2012-01-033-7/+11
| | | | | | | | | | | | | | | | | As I looked through the C library, I noticed the FreeBSD MIPS port has a hand-written version of index(). This is nice, if it weren't for the fact that most applications call strchr() instead. Also, on the other architectures index() and strchr() are identical, meaning we have two identical pieces of code in the C library and statically linked applications. Solve this by naming the actual file strchr.[cS] and let it use __strong_reference()/STRONG_ALIAS() to provide the index() routine. Do the same for rindex()/strrchr(). This seems to make the C libraries and static binaries slightly smaller, but this reduction in size seems negligible.
* Replace a proliferation of buggy MD implementations of modf() with adas2011-10-214-191/+1
| | | | | | | working MI one. The MI one only needs to be overridden on machines with non-IEEE754 arithmetic. (The last supported one was the VAX.) It can also be overridden if someone comes up with a faster one that actually passes the regression tests -- but this is harder than it sounds.
* Fix whitespace inconsistencies found in homegrown Symbol.maps.ed2011-10-071-2/+2
|
* Fix bzero() for 64-bit.jchandra2011-02-221-19/+1
| | | | | | | | The existing implementation of bzero incorrectly clears bytes when the start address is not word aligned. Fix it by using REG_SHI macro which works on both 32 and 64 bit. Submitted by: Artem Belevich (fbsdlist at src cx)
* Fix typos - remove duplicate "the".brucec2011-02-211-1/+1
| | | | | | PR: bin/154928 Submitted by: Eitan Adler <lists at eitanadler.com> MFC after: 3 days
* Fix PIC_RETURN when abicalls are not defined.jchandra2010-10-241-1/+1
| | | | Submitted by: Artem Belevich (artemb at gmail dot com)
* use PTR_WORD for __curbrk and minbrk instead of .word, the new versionjchandra2010-06-252-2/+2
| | | | | | wil support all ABIs. Approved by: rrs (mentor)
* Merge jmallett@'s n64 work into HEAD - changeset 2jchandra2010-06-166-39/+111
| | | | | | | | | Update libc Makefiles. Add makecontext implementation. Changes from http://svn.freebsd.org/base/user/jmallett/octeon Approved by: rrs(mentor), jmallett
* Merge jmallett@'s n64 work into HEAD - changeset 1.jchandra2010-06-1620-521/+510
| | | | | | | | | Update libc assembly code to use macros that work on both o32 and n64. Merge string functions from NetBSD. The changes are from http://svn.freebsd.org/base/user/jmallett/octeon Approved by: rrs (mentor), jmallett
* Reinstate the ptrace patch to restore the 'gp' register after callingneel2010-02-041-0/+3
| | | | | | | | | | a function. I made a mistake in assuming that the .cprestore directive will cause the assembler to automatically restore 'gp' after the 'jalr'. The .cprestore directive does its magic only after 'jal' and 'bal' instructions - not the 'jalr'. Pointed out by: c.jayachandran@gmail.com
* -White space cleanup (missing spaces in new line)rrs2010-02-031-5/+2
| | | | | | -Remove extra tab. -Took out the duplicate code that cprestore does. All suggested by Neel.
* This fixes a bug found and fixed by JC. Basicallyrrs2010-02-031-1/+13
| | | | | | | no save was being done of the ra and gp pointers before we call the __error function. Obtained from: JC (c.jayachandran@gmail.com)
* Merge r195030 from project/mips to head by handimp2010-01-091-0/+18
| | | | | | | r195030 | gonzo | 2009-06-25 19:27:31 -0600 (Thu, 25 Jun 2009) | 4 lines - Switch to libc softfloat from libgcc implementation. The problem with latter is that it is not complete, fpsetXXX/fpgetXXX functions are missing.
* Merge r197800 from projects/mips to head by hand:imp2010-01-082-7/+4
| | | | | | r197800 | gonzo | 2009-10-06 00:35:52 -0600 (Tue, 06 Oct 2009) | 3 lines - curbrk variable for sbrk and brk should be the same - Add correct variable names to Symbol.map
* Merge r195025 from projects/mips to head by hand:imp2010-01-086-0/+0
| | | | | | | r195025 | gonzo | 2009-06-25 19:01:50 -0600 (Thu, 25 Jun 2009) | 4 lines - Move fpgetXXX.c/fpsetXXX.c sources to hardfloat subdir/ to prevenmt them from being mixed up with lib/libc/softfloat files with the same names
* Remove unneeded stdlib directories.ed2009-06-231-4/+0
| | | | | | | It's not necessary to add stdlib directories for each architecture, even if the architecture doesn't implement any files of its own. Submitted by: Christoph Mallon
* These warnings are only relevant on NetBSD it seems. They don't seemimp2009-02-191-3/+0
| | | | to be relevant to FreeBSD at all.
* These symbols don't belong here. Remove them. Since mips hasn't hadimp2009-02-191-4/+0
| | | | | | a release, I think there's no impact here... Reviewed by: cognet@
* Mark uname(), getdomainname() and setdomainname() with COMPAT_FREEBSD4.ed2008-11-091-3/+2
| | | | | | | | | | | | | | | | | | | | | Looking at our source code history, it seems the uname(), getdomainname() and setdomainname() system calls got deprecated somewhere after FreeBSD 1.1, but they have never been phased out properly. Because we don't have a COMPAT_FREEBSD1, just use COMPAT_FREEBSD4. Also fix the Linuxolator to build without the setdomainname() routine by just making it call userland_sysctl on kern.domainname. Also replace the setdomainname()'s implementation to use this approach, because we're duplicating code with sysctl_domainname(). I wasn't able to keep these three routines working in our COMPAT_FREEBSD32, because that would require yet another keyword for syscalls.master (COMPAT4+NOPROTO). Because this routine is probably unused already, this won't be a problem in practice. If it turns out to be a problem, we'll just restore this functionality. Reviewed by: rdivacky, kib
* Add mips support libc from the mips2-jnpr branch of perforce.imp2008-04-2660-0/+3908
|
* Doh! Extra mips in the path. Remove these and wait until tomorrowimp2008-04-1611-600/+0
| | | | when I have more brain cells to try again.
* Turns out the machine/asm.h isn't needed here, since SYS.h alreadyimp2008-04-1610-12/+1
| | | | included it.
* FreeBSD/mips libc support. Merged from perforce mips2-jnpr branch.imp2008-04-1611-0/+611
|
* Remove these abortive MIPS bits.obrien2002-03-2348-2683/+0
|
* Fix the style of the SCM ID's.obrien2002-03-221-0/+1
| | | | I believe have made all of libc .h's as consistent as possible.
* Fix the style of the SCM ID's.obrien2002-03-226-15/+13
| | | | I believe have made all of libc .c's as consistent as possible.
* Bring in initial libc support for mips. These files were taken fromimp1999-03-0348-0/+2684
the OpenBSD tree and should be considered preliminary. They are here to facilitate building of the tree.
OpenPOWER on IntegriCloud