| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
| |
ABI-required stack alignment. C code expects that the push of the
return address disturbed the 16 byte alignment and it will take corrective
measures to fix it before making another call. Of course, if its wrong
to start with, then all hell breaks loose. Essentially we "fix" this
by making the stack alignment odd to start with.
This was one of the things that broke on libkse with apps that use
floating point/varargs/etc.
Approved by: re (scottl)
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
(fstp stores a mem32 value, fstpl stores a mem64 value)
This fixes ghostscript for 'make release' on amd64. Ghostscript for some
reason thinks it is a good idea to use -fno-builtin, which means it is
vulnerable to bugs in libc that are normally hidden by the builtin gcc
functions. Oops.
|
| |
|
|
|
|
|
|
| |
value for getcontext() in a preserved register rather than on the stack.
The second time around, the stack value would likely have changed so we
can't depend on it for the return value.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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
|
| |
|
|
|
|
| |
for the use of non-GCC compilers and C++ code.
|
|
|
|
| |
and just cause lots of warnings.
|
|
|
|
|
| |
for libkse (makecontext() is also needed for libthr).
These probably will need some tweaking.
|
|
|
|
|
|
| |
It is only possible to do this on an ABI that has a compulsory frame
pointer, which the amd64 ABI does not. Thus, it is only possible to
implement this as a compiler builtin.
|
|
|
|
|
| |
(untested, but existing state breaks
http://triangle.rtp.freebsd.org/~des/tinderbox-CURRENT-amd64-amd64.brief)
|
| |
|
|
|
|
| |
to a random memory location. Perl works a lot better with this.
|
|
|
|
| |
implications of native PC relative addressing.
|
| |
|
|
|
|
|
|
| |
file to be correct, and how to generate them automatically.
Caused much pain and suffering for: peter
|
| |
|
|
|
|
|
| |
to sigprocmask(2) int the correct order. *blush*.
For sigsetjmp(), match up the pushq/popq in the non-savemask case.
|
|
|
|
|
| |
the value out of ST(0) before copying it to %xmm0. Also remove bogus stack
frame and work in the red zone.
|
| |
|
|
|
|
| |
Obtained from: re (blanket amd64)
|
|
|
|
|
|
|
| |
doesn't use stack frames. It uses offsets relative to %rsp, not %rbp. So
we cannot just change %rsp like this.
Approved by: re (blanket amd64)
|
|
|
|
| |
configure gdtoa as such.
|
|
|
|
| |
Alignment hack from: NetBSD
|
| |
|
|
|
|
|
|
|
| |
- strip out the nasty PIC_PROLOGUE/EPILOGUE stuff, since we dont have
to lose a register in PIC mode anymore (we use %rip-relative addressing).
- update for C register argument passing conventions.
- convert 32 bit to 64 bit register sizes etc.
|
|
|
|
| |
update it to be iretq for completeness.
|
|
|
|
| |
across a "syscall"-style syscall
|
|
|
|
|
| |
Depend on %rsi being preserved across the "syscall"-style syscall and strip
out the PIC stuff (this cpu has full PC-relative addressing, at last!)
|
|
|
|
|
| |
instructions here, these may need to be updated for SSE.
(Repocopied from i386/gen)
|
| |
|
|
|
|
|
| |
the bswap instruction (yay!). Update for register parameter passing
instead of i386 style stack based param passing.
|
|
|
|
|
|
|
|
|
|
| |
Note that the syscall instruction clobbers %rcx, which is inconvenient
because it is the fourth syscall argument, so we use %r10 (another scratch
register) for the 4th syscall arg instead (I picked %r10 to be the same as
NetBSD). int 0x80 is still possible though, and it uses %rcx as usual.
Note that the syscall style syscall does *NOT* preserve all the registers,
unlike int 0x80. We do not preserve the scratch registers except for
%rdi and %rsi. int 0x80 does preserve everything but the return values.
|
|
|
|
|
|
|
| |
AMD64 does away with the x87 in 64-bit long mode, so we have to play the
SSE/SSE2 game now.
Obtained from: NetBSD/x86-64
|
|
|
|
|
|
|
| |
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@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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)
|
| |
|
|
|
|
|
|
|
|
|
| |
libc. I want to keep these in some version for the thread
library/ies, but don't know whether to have them repo-copied
to libc_r or renamed and kept in libc.
Change the name of an alpha macro that was changed with the
system call commit.
|
|
|
|
|
|
|
|
| |
HUGE_VAL is not properly aligned on some architectures. The previous
fix now works because the two versions of 'math.h' (include/math.h
and lib/msun/src/math.h) have since been merged into one.
PR: bin/43544
|
|
|
|
| |
right way to do it.
|
|
|
|
|
|
| |
"cast increases required alignment of target type" on some platforms.
Reviewed by: bde
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
under way to move the remnants of the a.out toolchain to ports. As the
comment in src/Makefile said, this stuff is deprecated and one should not
expect this to remain beyond 4.0-REL. It has already lasted WAY beyond
that.
Notable exceptions:
gcc - I have not touched the a.out generation stuff there.
ldd/ldconfig - still have some code to interface with a.out rtld.
old as/ld/etc - I have not removed these yet, pending their move to ports.
some includes - necessary for ldd/ldconfig for now.
Tested on: i386 (extensively), alpha
|
|
|
|
|
| |
Reviewed by: deischen, julian
Approved by: -arch
|