Parent Directory | Revision Log
|Links to HEAD:||(view) (annotate)|
Add a test for whether the operating system supports use of the SSE2 registers. The test is a stub on everything except NetBSD for now.
Fix tracing for NetBSD. Function end breakpoints didn't seem to be working when tracing, for example (declaim (ftype (function (double-float) double-float) fact)) (defun fact (x) (declare (double-float x)) (if (= x 1) 1d0 (* x (fact (1- x))))) lisp/x86-lispregs.h o NetBSD has access to the eflags register lisp/x86-arch.c: o Add some debugging prints (disabled). o The stuff near line 262 about pc-9 pointing to the pushf instruction should be conditioned on SC_EFLAGS because that's what decides whether we insert the pushf instructions for single stepping.
Merge changes from cross-sol-x86-2010-12-20 which adds support for Solaris/x86. There should be no functional changes for either other x86 ports or for the sparc port.
Sun C miscompiles the inline assembly for the cpuid instruction, so on Solaris, use the /dev/cpu/self/cpuid device to get the cpuid data that we need.
Sync to utf16 branch, tag unicode-utf16-sync-label-2009-03-16.
Sync to CVS HEAD, tag label-2009-03-16. But don't sync Config.FreeBSD_gencgc, Config.x86_freebsd, FreeBSD-os.c, and FreeBSD-os.h. Let Alex sync those later. The result seems to work as expected on Solaris and x86/linux. Darwin (ppc or x86) untested.
Add cpuid function.
Merge changes from utf16 branch to update to snapshot 2008-12.
Merge Snapshot 2008-12 to this branch. Some tweaks needed in boot-2008-05-cross-unicode-x86.lisp and the Config files. FreeBSD and Darwin/x86 untested, but Linux and Solaris build ok.
Instead of defining DPRINTF in every X-os.c file, do it once, in os.h
Merge in SSE2 changes from sse2-packed-branch (tag sse2-packed-2008-11-12).
Use Carl's idea of doing the SSE2 stuff in c-call instead of in call_into_c. This makes x86-assem.S not depend on sse2 in any way. compiler/x86/sse2-c-call.lisp: o When calling call_into_c directly, move the float result to xmm0. o Remove sse2 conditionalization since this file is for sse2 lisp/x86-arch.c: o have_sse2 has been removed lisp/x86-assem.S: o Remove have_sse2 o Don't move float result into xmm0. Let the lisp code deal with it.
Some clean up of code, and porting to Darwin/x86. lisp/Linux-os.c: o Comment out the include of asm/sigcontext.h. This causes multiple definitions on a Suse 10.3 machine. o Move the os_support_sse2 stuff to x86-arch.c. lisp/x86-arch.c: o Add inline assembly for the cpuid instruction, so we don't have to depend on the OS to define it in some random include file. o Add arch_support_sse2 to tell us if the machine has sse2 support. lisp/x86-assem.S: o Clean up definition of have_sse2 to work on both Linux and Darwin. o Fix typo where we were skipping over fldz's in call_into_lisp. We still need that for now.
Initial support for x87 and sse2 cores with one binary. More support still needed, though. lisp/Linux-os.c: o Add os_support_sse2 function to tell if the chip supports SSE2 or not. lisp/arch.h: o Change declaration for arch_init to match Linux implementation. (Eventually, we'll get rid of this.) lisp/lisp.c: o Add fpu_mode variable o Recognize -fpu switch to allow the user to select the desired FPU mode. o Call arch_init with the fpu mode. lisp/x86-arch.c: o Use the fpu mode to select the name of the core file. lisp/x86-assem.S: o Add have_sse2 global variable. o If have_sse2 is set, we copy the float result in ST(0) to XMM0.
Always use prototype style function definitions. Consistently use the void keyword to specify empty parameter lists.
Add new interface to ieee754_rem_pio2. No longer need to pass in an array. The new function returns 2 new output values. code/irrat.lisp: o Rename the original %ieee754-rem-pi/2 to %%ieee754-rem-pi-2. o Define the new %ieee754-rem-pi/2 function. This returns the output as two output values instead of an array. o Use the new function. We should have wrapped the original with without-gcing, but we don't have to anymore. lisp/ppc-arch.c: lisp/x86-arch.c: o Implement the new C interface to __ieee754_rem_pio2 lisp/Config.linux_gencgc: o Use -ffloat-store when compiling e_rem_pio2.c and k_rem_pio2.c, just to be sure.
Abstract out the access to the eflags register in a sigcontext. x86-lispregs.h: o Add SC_EFLAGS macro to access the eflags register (currently only for linux and darwin). x86-arch.c: o Use the SC_EFLAGS macro to enable/disable single-stepping. o If SC_EFLAGS is not defined, use the single-step helper stuff.
Tracing with :encapsulate NIL works on Darwin now. There are some issues like why the mcontext slot is 0 in the sigcontext from a function end breakpoint. This works around that problem for now. lisp/x86-arch.c: o Add documentation on how arch_do_displaced_inst works. o Darwin has the eflags register in the sigcontext so use that to enable and disable single-stepping using the eflags slot. This is how Linux works too. This change makes function start breakpoints work. code/debug-int.lisp: o In FIND-ESCAPED-FRAME, make sure the mcontext slot is not null (0) before we try to grab the cfp slot from it. This works around an issue where the mcontext slot is 0 on Darwin. code/ntrace.lisp: o Make *TRACE-ENCAPSULATE-DEFAULT* be :default again.
Reintroduce code to restore the x87 control word state from the sigcontext before calling back into Lisp. The rounding mode is always set correctly when we reenter Lisp through call_into_lisp. We now ensure that the trap bits enabled by the user are also preserved.
Fix bogus cast noticed by FreeBSD 7 GCC compiler
Remove unused FIXNUM_VALUE definitions. Replace actual uses of this macro in with fixnum_value which is defined in lisp.h.
The SAVE_CONTEXT macro expands to meaningful code on the SPARC and is a no-op on all other architectures. Remove SAVE_CONTEXT references in places that are not touched by a SPARC target.
Use sa_sigaction signal handlers on Linux. The glibc definition of sigset_t is different from the one used in the Linux kernel. This means that we cannot make assignments of sigset_t objects without corrupting memory. To work around this problem we update uc_sigmask differently on Linux than on other systems. Also, remove x87 control word updates since the x87 is setup correctly inside call_into_lisp.
Use POSIX signals on FreeBSD.
Import x86 Darwin port.
Merge code from main branch of 2005-12-17 to ppc gencgc branch. Still doesn't work of course.
Remove some (char *) casts because gcc 4.0.1 gives an error about "invalid lvalue". From Rex Dieter, cmucl-imp, 2005/10/06.
Indent all source files using GNU indent using the config in .indent.pro.
More compiler warning fixes: * gencgc.c: o fixup up fprintf warnings o generation_bytes_allocated() defined only when GC_ASSERTIONS is #defined. * x86-arch.c: fixup printf warnings.
Changes from Robert Swindells to support NetBSD.
Add support for x86 heap-overflow checking. * x86-assem.S (multiple_value_return): Add new functions to handle heap overflow warnings and errors. * x86-arch.c (sigtrap_handler): Add cases for the two new heap overflow traps. * interrupt.c (interrupt_handle_space_overflow): Add support for x86. * parms.lisp (static-symbols): Add new static symbols for heap overflow checking. Add new trap types for heap overflow checking.
Fred Gilham's Lisp executable support for CMUCL.
Use LinkageEntrySize from internals.h instead of LINKAGE_ENTRY_SIZE.
A number of smallish changes to the new linkage-table code: o Conditionalized some code that is only used in linkage-table builds on :linkage-table and LINKAGE_TABLE respectively. o Modernized undefined_ff_tramp based on recent changes, and renamed it to undefined_foreign_symbol_trap, because it really isn't a trampoline. o Conditionalized a stray puts(...,dlerror()) in Linux-os.c on DEBUG o Installed an error reporter for UNDEFINED_FOREIGN_SYMBOL_ERROR, which for now signals a simple-program-error. We might want to introduced a new condition UNDEFINED-FOREIGN-SYMBOL or something, which could also be used by the old foreign linkage code.
On x86 FreeBSD and Linux, change the way foreign symbol addresses are resolved. They now go through a table -- effectively a new space in the core file. Function references are resolved lazily, data references are resolved on startup and when a .so is loaded. The end result is that cores can be dumped that contain references to symbols in shared libraries. Also, the dependence of the core on addresses in the Lisp runtime is broken. The linkage table feature is controlled by :linkage-table and LINKAGE_TABLE in C runtime. Several foreign symbols are now Lisp static symbols, so a cross compile is required whether or not the new stuff is used. I've checked in boot4-cross-foreign-linkage.lisp that builds the compiler for linkage table; do whatever you usually do for the non-linkage table case:) Seriously, lets start a discussion on standardizing "cross compilation," not to mention the general build procedure.
Mega commit to bring RELENG_18 branch in sync with HEAD in preparation for release tagging 18d.
Added specialised port to NetBSD (1.5.2) on x86. Since the code-base was already cleaned up with the OpenBSD port, this doesn't require massive changes. Since current NetBSD is ELF-based by default, we don't make use of the ELF feature, or in other words: The presence of the NetBSD feature implies ELF, since there is no support for non-ELF NetBSD.
Added specialised port to OpenBSD (2.9). Many parts of the original code which were previously conditionalized on :FreeBSD, are now conditionalized on :BSD instead, with the :BSD feature now implying a 4.4BSD(lite2) derived OS. This should make future BSD-ports easier. FreeBSD and OpenBSD are differentiated by having either :FreeBSD or :OpenBSD on the features list. Currently the OpenBSD port does not have working ELF support, because OpenBSD 2.9 is still non-ELF by default. So don't put ELF on the features list when building for OpenBSD, or fix the code to work correctly in this case instead.
Cleanup compiler warnings.
Take more care when restoring the FPU control word for linux, as there may not be a fpstate in some rare cases.
Take more care when restoring the FPU control word for linux, as there may not be a fpstate in some rare cases.
Minor source cleanups.
This set of revisions brings the RELENG_18 branch up to HEAD in preparation for an 18c release.
For Linux i386, restore the FPU control word in the SIGTRAP handler, otherwise the set of masked exceptions may be lost. Further, when restoring the FPU control word restore the rounding mode to its required default of round-to-nearest.
This (huge) revision brings the RELENG_18 branch up to the current HEAD. Note code/unix-glib2.lisp not yet included -- not sure it is ready to go.
The FPU state save around the primitive halt signal handler has been confirmed unnecessary on Linux and is now only used on FreeBSD.
Save and reset the NPX state when a primitive halt is signalled so the monitor can use the NPX (for printing float objects), and restore the state when returning. This may be unnecessary on Linux?
Remove the unused arch_get_bad_addr function.
Fix the header.
Breakpoint and single stepping support for the x86 port. This has been tested in the experimental code and works on both FreeBSD and Linux. Plus a few improvements to the interrupt safety for the x86 port.
Don't re-enable interrupts in the sigtrap handler, but delay it until the breakpoint functions have allocated the context SAP object so this allocation is performed without interrupt.
Implement a pseudo-atomic macro for the x86 backend.
Merge in changes to the x86 backend from the gencgc branch, allowing common binaries to be run on both: * The immediate-stack storage class has been removed, this is unnecessary as the descriptor-stack SC can be used. It may have once been part of some GC stragety to reduce the number of stack slots that needed to be noted for a GC. * The object allocation has been abstracted and cleaned up. This should produce slightly faster smaller code with CGC, and can be compiled to support inline allocation with GENCGC. CGC compiled code will run under GENCGC, and GENCGC binaries that don't use inline allocation will run under CGC. * A random hash is now placed in the unused symbol object slot (the symbol-hash slot). This saves flushing the info cache at each GC, and may have other uses for symbol based hash tables. Should help MP safety. * Common set of static symbols used by both CGC and GENCGC. * Corrections to the stack-ref VOP; now returns lisp objects not unsigned numbers. Required some patches to debug-int. * Inline unsigned/signed byte 32 to bignum allocation enabled. * Support for the x86 xadd instruction applied to instance slot and symbol values - may be handy for some MP code. * Bump up the FASL file version from 1 to 2.
Peter's fix for FP control word.
source kit 1.03.7
This form allows you to request diffs between any two revisions of this file. For each of the two "sides" of the diff, select a symbolic revision name using the selection box, or choose 'Use Text Field' and enter a numeric revision.
|Powered by ViewVC 1.1.5|