History log of /freebsd-10.1-release/lib/libc/powerpc/
Revision Date Author Comments
272461 03-Oct-2014 gjb

Copy stable/10@r272459 to releng/10.1 as part of
the 10.1-RELEASE process.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


256281 10-Oct-2013 gjb

Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


253750 28-Jul-2013 avg

Revert r253748,253749

This WIP should not have been committed yet.

Pointyhat to: avg


253749 28-Jul-2013 avg

remove needless inclusion of machine/cpu.h in userland

MFC after: 21 days


251047 28-May-2013 kib

The getcontext() from the __fillcontextx() call in the
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


246117 30-Jan-2013 kib

Rework the __vdso_* symbols attributes to only make the symbols weak,
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


236006 25-May-2012 marcel

Doh... Don't add __eabi to an old version tag (i.e. FBSD_1.0). Add it to the
current one (= FBSD_1.3).

Pointed out by: kib


235929 24-May-2012 marcel

Allow building for the PowerPC EABI by providing a dummy __eabi()
function. The purpose of the __eabi() function is to set up the
runtime and is called first thing by main(). The runtime is already
set up for us prior to caling main, so there's nothing to do for
us in the EABI case.


234115 11-Apr-2012 nwhitehorn

Do not restore the register holding the TLS pointer when doing various
usermode context switches (long jumps and ucontext operations). If these
are used across threads, multiple threads can end up with the same TLS base.
Madness will then result.

This makes behavior on PPC match that on x86 systems and on Linux.

MFC after: 10 days


231044 05-Feb-2012 andreast

Replace the assembler macro WEAK_ALIAS with a new macro WEAK_REFERENCE which
has the same API as __weak_reference(). Give 'x' in SYS.h a more meaningful
name.

Tested on 32- and 64-bit PowerMac.

Reviewed by: bde


230864 01-Feb-2012 kib

Make the sys/ucontext.h self-contained by changing the return type
of __getcontextx_size(3) from size_t to int.

PR: ports/164654
MFC after: 1 month


230429 21-Jan-2012 kib

Add API for obtaining extended machine context states that cannot be
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


229806 08-Jan-2012 andreast

Two other places where we can use WEAK_ALIAS.


229693 06-Jan-2012 andreast

Use the macro WEAK_ALIAS. Tested on 32 and 64-bit.


226606 21-Oct-2011 das

Replace a proliferation of buggy MD implementations of modf() with a
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.


218909 21-Feb-2011 brucec

Fix typos - remove duplicate "the".

PR: bin/154928
Submitted by: Eitan Adler <lists at eitanadler.com>
MFC after: 3 days


217398 14-Jan-2011 kib

Mark assembler sources from libc as working with non-executable stack.

Reviewed and tested by: nwhitehorn


204606 02-Mar-2010 joel

The NetBSD Foundation has granted permission to remove clause 3 and 4 from
their software.

Obtained from: NetBSD


184789 09-Nov-2008 ed

Mark uname(), getdomainname() and setdomainname() with COMPAT_FREEBSD4.

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


183320 24-Sep-2008 nwhitehorn

Fix some ifdef logic in the libc syncicache() bit that I somehow missed in the
last commit. Now it really can use a runtime-set cacheline size.


183319 24-Sep-2008 nwhitehorn

Allow the cacheline size on PowerPC to be set at runtime. This is essential for
supporting 64-bit CPUs, which often have 128-byte cache lines instead of the
standard 32.


178620 27-Apr-2008 marcel

Add support files for compiling with soft-float. This has been
copied from ARM and modified to warrant the duplication. Oh,
and to make it work for PowerPC :-)


176530 24-Feb-2008 raj

Let PowerPC world optionally build with -msoft-float. For FPU-less PowerPC
variations (e500 currently), this provides a gcc-level FPU emulation and is an
alternative approach to the recently introduced kernel-level emulation
(FPU_EMU).

Approved by: cognet (mentor)
MFp4: e500


172740 18-Oct-2007 grehan

Fix build from errors exposed with recent version_gen.awk commit.
Not quite sure if this is 100% correct: awaiting review. But quieten
tinderbox in the meantime.


171218 04-Jul-2007 peter

Classify mmap, lseek, pread, pwrite, truncate, ftruncate as pseudo
syscalls, unless WITHOUT_SYSCALL_COMPAT is defined. The default case
will have the .c wrappers still. If you define WITHOUT_SYSCALL_COMPAT,
the .c wrappers will go away and libc will make direct syscalls.

After 7-stable starts, the direct syscall method will be default.

Approved by: re (kensmith)


170506 10-Jun-2007 marcel

Fix bogon in previous commit: <machine/cpu.h> is still needed.


170484 10-Jun-2007 marcel

The definition of CACHELINESIZE moved from <machine/cpu.h> to
<machine/md_var.h>.


170154 31-May-2007 deischen

Some libc symbol map cleanups.

net: endhostdnsent is named _endhostdnsent and is
private to netdb family of functions.

posix1e: acl_size.c has been never compiled in,
so there's no "acl_size".

rpc: "getnetid" is a static function.

stdtime: "gtime" is #ifdef'ed out in the source.

some symbols are specific only to some architectures,
e.g., ___tls_get_addr is only defined on i386.

__htonl, __htons, __ntohl and __ntohs are no longer
functions, they are now (internal) defines in
<machine/endian.h>.

Submitted by: ru


169548 14-May-2007 deischen

I guess powerpc needs vfork(), add it to the symbol list.

Submitted by: marius


169525 13-May-2007 deischen

Remove .mcount from gmon's Symbol map and add it to the appropriate
arch. It can be named differently depending on the arch (.mcount,
_mcount).

Submitted by: marius


169092 29-Apr-2007 deischen

Use C comments since we now preprocess these files with CPP.


165747 03-Jan-2007 das

The distinction between quiet and signaling NaN formats is
machine-dependent; these files tell the latest version of gdtoa
what to do.


164053 06-Nov-2006 cognet

Instead of re-implementing hton[ls] and friends for each arch, add a new MI
file, net/ntoh.c, which just implement them using the inline functions from
<sys/endian.h>.

Suggested by: bde


161853 02-Sep-2006 marcel

Whitespace fix.


161729 30-Aug-2006 marcel

Avoid dead code elimination of the assignment to TP by using inline
assembly.


156613 13-Mar-2006 deischen

Add each directory's symbol map file to SYM_MAPS.


156608 13-Mar-2006 deischen

Add symbol maps and initial symbol version definitions to libc.

Reviewed by: davidxu


143658 15-Mar-2005 das

Remove fpsetsticky(). This was added for SysV compatibility, but due
to mistakes from day 1, it has always had semantics inconsistent with
SVR4 and its successors. In particular, given argument M:

- On Solaris and FreeBSD/{alpha,sparc64}, it clobbers the old flags
and *sets* the new flag word to M. (NetBSD, too?)
- On FreeBSD/{amd64,i386}, it *clears* the flags that are specified in M
and leaves the remaining flags unchanged (modulo a small bug on amd64.)
- On FreeBSD/ia64, it is not implemented.

There is no way to fix fpsetsticky() to DTRT for both old FreeBSD apps
and apps ported from other operating systems, so the best approach
seems to be to kill the function and fix any apps that break. I
couldn't find any ports that use it, and any such ports would already
be broken on FreeBSD/ia64 and Linux anyway.

By the way, the routine has always been undocumented in FreeBSD,
except for an MLINK to a manpage that doesn't describe it. This
manpage has stated since 5.3-RELEASE that the functions it describes
are deprecated, so that must mean that functions that it is *supposed*
to describe but doesn't are even *more* deprecated. ;-)

Note that fpresetsticky() has been retained on FreeBSD/i386. As far
as I can tell, no other operating systems or ports of FreeBSD
implement it, so there's nothing for it to be inconsistent with.

PR: 75862
Suggested by: bde


143214 07-Mar-2005 das

Define LDBL_NBIT to be a mask indicating the position of the integer
bit in a long double. For architectures that don't have such a bit,
LDBL_NBIT is 0. This makes it possible to say `mantissa & ~LDBL_NBIT'
in places that previously used an #ifdef to select the right expression.
The optimizer should dispense with the extra arithmetic when LDBL_NBIT
is 0.


141379 06-Feb-2005 das

Update my email address.


140607 22-Jan-2005 das

Replace the ldexp() implementation in libc with a renamed copy of the
scalbn() implementation from libm. (The two functions are defined to
be identical, but ldexp() lives in libc for backwards compatibility.)
The old ldexp() implementation...
- was more complicated than this one
- set errno instead of raising FP exceptions
- got some corner cases wrong
(e.g. ldexp(1.0, 2000) in round-to-zero mode)

The new implementation lives in libc/gen instead of
libc/$MACHINE_ARCH/gen, since we don't need N copies of a
machine-independent file. The amd64 and i386 platforms
retain their fast and correct MD implementations and
override this one.


140280 15-Jan-2005 das

Add a file missed in the previous commit:

Eliminate gdtoa.mk and move its contents to ${MACHINE_ARCH}/Makefile.inc.
The purpose of having a separate file involved an abandoned scheme that
would have kept contrib/gdtoa out of the include path for the rest of libc.


140279 15-Jan-2005 das

Eliminate gdtoa.mk and move its contents to ${MACHINE_ARCH}/Makefile.inc.
The purpose of having a separate file involved an abandoned scheme that
would have kept contrib/gdtoa out of the include path for the rest of libc.


133754 15-Aug-2004 dfr

Add support for TLS in statically linked programs.


132421 19-Jul-2004 gallatin

Fix printing of long doubles to match the size that
gcc is using. This fixes devstat consumers (like vmstat, iostat,
systat) so they don't print crazy zillion digit numbers for
disk transfers and bandwidth.

According to gcc, long doubles are 64-bits, rather than 128 bits
like the SVR4 ABI spec wants them to be.. Note that MacOSX also treats
long doubles as 64-bits, and not 128 bits, so we are in good company.

Reviewed by: das
Approved by: grehan


132399 19-Jul-2004 grehan

Add signalcontext, required by KSE.


132398 19-Jul-2004 grehan

The new program counter should go into the trapframe's srr0 and
not the link register, which was lucky enough to work.


132366 18-Jul-2004 das

Replace seven nominally MD implementations of frexp() that are broken
for subnormals with one implementation that works.


131852 09-Jul-2004 das

Implement the classification macros isfinite(), isinf(), isnan(), and
isnormal() the hard way, rather than relying on fpclassify(). This is
a lose in the sense that we need a total of 12 functions, but it is
necessary for binary compatibility because we have never bumped libm's
major version number. In particular, isinf(), isnan(), and isnanf()
were BSD libc functions before they were C99 macros, so we can't
reimplement them in terms of fpclassify() without adding a dependency
on libc.so.5. I have tried to arrange things so that programs that
could be compiled in FreeBSD 4.X will generate the same external
references when compiled in 5.X. At the same time, the new macros
should remain C99-compliant.

The isinf() and isnan() functions remain in libc for historical
reasons; however, I have moved the functions that implement the macros
isfinite() and isnormal() to libm where they belong. Moreover,
half a dozen MD versions of isinf() and isnan() have been replaced
with MI versions that work equally well.

Prodded by: kris


126475 02-Mar-2004 grehan

makecontext lib call.

Submitted by: Suleiman Souhlal <refugee@segfaulted.com>


125865 16-Feb-2004 das

Fix some aliasing problems.


125733 12-Feb-2004 grehan

Add forgotten IEEE functions. The Perl 5.8 port now compiles.

Submitted by: Suleiman Souhlal <refugee@segfaulted.com>
Obtained from: NetBSD


124769 21-Jan-2004 grehan

Include <stdlib.h> to get abort() prototype.


124653 18-Jan-2004 das

Define LDBL_MANH_SIZE and LDBL_MANL_SIZE to be the sizes of the
high and low words of the mantissa in bits, respectively.


123381 10-Dec-2003 grehan

- Put manh/manl bitfields into correct-sized integral type.
- remove XXX normalization bit comment, code is correct.


118771 11-Aug-2003 bms

Add the mlockall() and munlockall() system calls.
- All those diffs to syscalls.master for each architecture *are*
necessary. This needed clarification; the stub code generation for
mlockall() was disabled, which would prevent applications from
linking to this API (suggested by mux)
- Giant has been quoshed. It is no longer held by the code, as
the required locking has been pushed down within vm_map.c.
- Callers must specify VM_MAP_WIRE_HOLESOK or VM_MAP_WIRE_NOHOLES
to express their intention explicitly.
- Inspected at the vmstat, top and vm pager sysctl stats level.
Paging-in activity is occurring correctly, using a test harness.
- The RES size for a process may appear to be greater than its SIZE.
This is believed to be due to mappings of the same shared library
page being wired twice. Further exploration is needed.
- Believed to back out of allocations and locks correctly
(tested with WITNESS, MUTEX_PROFILING, INVARIANTS and DIAGNOSTIC).

PR: kern/43426, standards/54223
Reviewed by: jake, alc
Approved by: jake (mentor)
MFC after: 2 weeks


114839 08-May-2003 das

Add a comment describing why it's important for the values in this
file to be correct, and how to generate them automatically.

Caused much pain and suffering for: peter


113145 05-Apr-2003 das

Add __ldtoa(), a wrapper around gdtoa() to make it look like dtoa().
In support of this, add some MD macros to assist in converting long
doubles to the format expected by gdtoa().

Reviewed by: silence on standards@


112163 12-Mar-2003 das

Replace our ancient dtoa/strtod implementation with the gdtoa
package, a more recent, generalized set of routines. Among the
changes:
- Declare strtof() and strtold() in stdlib.h.
- Add glue to libc to support these routines for all kinds
of ``long double''.
- Update printf() to reflect the fact that dtoa works slightly
differently now.

As soon as I see that nothing has blown up, I will kill
src/lib/libc/stdlib/strtod.c. Soon printf() will be able
to use the new routines to output long doubles without loss
of precision, but numerous bugs in the existing code must
be addressed first.

Reviewed by: bde (briefly), mike (mentor), obrien


110769 12-Feb-2003 mike

o Implement C99 classification macros isfinite(), isinf(), isnan(),
isnormal(). The current isinf() and isnan() are perserved for
binary compatibility with 5.0, but new programs will use the macros.
o Implement C99 comparison macros isgreater(), isgreaterequal(),
isless(), islessequal(), islessgreater(), isunordered().

Submitted by: David Schultz <dschultz@uclink.Berkeley.EDU>


110566 08-Feb-2003 mike

Implement fpclassify():
o Add a MD header private to libc called _fpmath.h; this header
contains bitfield layouts of MD floating-point types.
o Add a MI header private to libc called fpmath.h; this header
contains bitfield layouts of MI floating-point types.
o Add private libc variables to lib/libc/$arch/gen/infinity.c for
storing NaN values.
o Add __double_t and __float_t to <machine/_types.h>, and provide
double_t and float_t typedefs in <math.h>.
o Add some C99 manifest constants (FP_ILOGB0, FP_ILOGBNAN, HUGE_VALF,
HUGE_VALL, INFINITY, NAN, and return values for fpclassify()) to
<math.h> and others (FLT_EVAL_METHOD, DECIMAL_DIG) to <float.h> via
<machine/float.h>.
o Add C99 macro fpclassify() which calls __fpclassify{d,f,l}() based
on the size of its argument. __fpclassifyl() is never called on
alpha because (sizeof(long double) == sizeof(double)), which is good
since __fpclassifyl() can't deal with such a small `long double'.

This was developed by David Schultz and myself with input from bde and
fenner.

PR: 23103
Submitted by: David Schultz <dschultz@uclink.Berkeley.EDU>
(significant portions)
Reviewed by: bde, fenner (earlier versions)


109499 18-Jan-2003 obrien

We don't need our own personal definition of __CONCAT.


107571 04-Dec-2002 grehan

Minimal libc for PowerPC.

Reviewed by: benno

Approved by: re (blanket)


96786 17-May-2002 benno

_C_LABEL -> CNAME

Forgotten by: benno


96775 17-May-2002 benno

Flesh this out, based on the NetBSD version.

Reviewed by: obrien


96695 15-May-2002 obrien

Grow RSYSCALL.


96693 15-May-2002 obrien

Blah, fix stupid syntax error.
(where's the hat?)


96691 15-May-2002 obrien

host-network order conversion routines.
Luckily we are network order, so there is little to be done. :-)


96685 15-May-2002 obrien

Beginnings of syscall bits for PowerPC. These are no doubtedly wrong,
but it gets the build father and is in the right direction.

Partially obtained from: NetBSD