* Initial changes to build on SuSE AMD64. Still need to port sb-bsd-sockets.
an error during type derivation.
** bignum multiplication on the Alpha platform now returns the
right answer.
+ * builds on SuSE AMD64, although still generates a 32-bit binary.
planned incompatible changes in 0.8.x:
* (not done yet, but planned:) When the profiling interface settles
echo //guessing default target CPU architecture from host architecture
case `uname -m` in
- *86) guessed_sbcl_arch=x86 ;;
+ *86|x86_64) guessed_sbcl_arch=x86 ;;
[Aa]lpha) guessed_sbcl_arch=alpha ;;
sparc*) guessed_sbcl_arch=sparc ;;
sun*) guessed_sbcl_arch=sparc ;;
case `uname` in
Linux)
printf ' :linux' >> $ltf
- ln -s Config.$sbcl_arch-linux Config
+ if [ "`uname -m`" = "x86_64" ]; then
+ ln -s Config.x86_64-linux Config
+ else
+ ln -s Config.$sbcl_arch-linux Config
+ fi
ln -s $sbcl_arch-linux-os.h target-arch-os.h
ln -s linux-os.h target-os.h
;;
--- /dev/null
+# This software is part of the SBCL system. See the README file for
+# more information.
+#
+# This software is derived from the CMU CL system, which was
+# written at Carnegie Mellon University and released into the
+# public domain. The software is in the public domain and is
+# provided with absolutely no warranty. See the COPYING and CREDITS
+# files for more information.
+
+include Config.x86-linux
+
+# Until a 64-bit port is written, tell the compiler to use 32-bit mode
+
+CFLAGS += -m32
+OS_LINK_FLAGS += -m32
#include "genesis/primitive-objects.h"
#include "thread.h"
-#ifndef __i386__
+#ifndef LISP_FEATURE_X86
/* KLUDGE: Sigh ... I know what the call frame looks like and it had
* better not change. */
#include "genesis/fdefn.h"
#define REAL_LRA_SLOT 0
-#ifndef __i386__
+#ifndef LISP_FEATURE_X86
#define KNOWN_RETURN_P_SLOT 1
#define BOGUS_LRA_CONSTANTS 2
#else
arch_do_displaced_inst(context, orig_inst);
}
-#ifndef __i386__
+#ifndef LISP_FEATURE_X86
static lispobj find_code(os_context_t *context)
{
#ifdef reg_CODE
}
#endif
-#ifdef __i386__
+#ifdef LISP_FEATURE_X86
static lispobj find_code(os_context_t *context)
{
lispobj codeptr =
* tried. The sigprocmask() call would work just as well on alpha as it
* presumably does on x86 -dan 2001.08.10
*/
-#ifndef __i386__
+#ifndef LISP_FEATURE_X86
void handle_breakpoint(int signal, siginfo_t *info, os_context_t *context)
{
lispobj code;
}
#endif
-#ifndef __i386__
+#ifndef LISP_FEATURE_X86
void *handle_fun_end_breakpoint(int signal, siginfo_t *info,
os_context_t *context)
{
}
#endif
/* FIXME: Should the conditional here be reg_ALLOC instead of
- * defined(__i386__)
+ * defined(LISP_FEATURE_X86)
* ? */
#if defined(LISP_FEATURE_X86)
SetSymbolValue(ALLOCATION_POINTER, (lispobj)free_pointer,0);
#include "genesis/binding.h"
#include "genesis/thread.h"
-#if defined(__i386__)
+#if defined(LISP_FEATURE_X86)
#define GetBSP() ((struct binding *)SymbolValue(BINDING_STACK_POINTER,thread))
#define SetBSP(value) SetSymbolValue(BINDING_STACK_POINTER, (lispobj)(value),thread)
#else
extern lispobj *current_control_stack_pointer;
extern lispobj *current_control_frame_pointer;
-#if !defined(__i386__)
+#if !defined(LISP_FEATURE_X86)
extern lispobj *current_binding_stack_pointer;
#endif
-#if !defined(__i386__)
+#if !defined(LISP_FEATURE_X86)
/* FIXME: Why doesn't the x86 need this? */
extern lispobj *dynamic_space_free_pointer;
extern lispobj *current_auto_gc_trigger;
#define EXTERN(name,bytes) .globl name
#endif
#endif
-#ifdef __i386__
+#ifdef LISP_FEATURE_X86
#ifdef __linux__
/* I'm very dubious about this. Linux hasn't used _ on external names
* since ELF became prevalent - i.e. about 1996, on x86 -dan 20010125 */
case sc_BaseCharReg:
ch = *os_context_register_addr(context, offset);
-#ifdef __i386__
+#ifdef LISP_FEATURE_X86
if (offset&1)
ch = ch>>8;
ch = ch & 0xff;
{
os_context_t *context = (os_context_t*)void_context;
struct thread *thread=arch_os_get_current_thread();
-#ifndef __i386__
+#ifndef LISP_FEATURE_X86
boolean were_in_lisp;
#endif
union interrupt_handler handler;
return;
}
-#ifndef __i386__
+#ifndef LISP_FEATURE_X86
were_in_lisp = !foreign_function_call_active;
if (were_in_lisp)
#endif
(*handler.c)(signal, info, void_context);
}
-#ifndef __i386__
+#ifndef LISP_FEATURE_X86
if (were_in_lisp)
#endif
{
* actually use its argument for anything on x86, so this branch
* may succeed even when context is null (gencgc alloc()) */
if (
-#ifndef __i386__
+#ifndef LISP_FEATURE_X86
(!foreign_function_call_active) &&
#endif
arch_pseudo_atomic_atomic(context)) {
* Note: There might be some other functions in this category as well.
* E.g. I notice tanh() and acos() in the list above.. -- WHN 2001-06-07
*/
-#if !defined __i386__
+#if !defined LISP_FEATURE_X86
LDSO_STUBIFY(sin)
LDSO_STUBIFY(cos)
LDSO_STUBIFY(tan)
os_vm_page_size = getpagesize();
/* This could just as well be in arch_init(), but it's not. */
-#ifdef __i386__
+#ifdef LISP_FEATURE_X86
/* FIXME: This used to be here. However, I have just removed it
with no apparent ill effects (it may be that earlier kernels
started up a process with a different set of traps, or
{
printf("CSP\t=\t0x%08lX\n", (unsigned long)current_control_stack_pointer);
printf("FP\t=\t0x%08lX\n", (unsigned long)current_control_frame_pointer);
-#if !defined(__i386__)
+#if !defined(LISP_FEATURE_X86)
printf("BSP\t=\t0x%08X\n", (unsigned long)current_binding_stack_pointer);
#endif
#if 0
-#ifdef __i386__
+#ifdef LISP_FEATURE_X86
printf("BSP\t=\t0x%08lx\n",
(unsigned long)SymbolValue(BINDING_STACK_POINTER));
#endif
printf("DYNAMIC\t=\t0x%08lx\n", (unsigned long)DYNAMIC_SPACE_START);
-#if defined(__i386__)
+#if defined(LISP_FEATURE_X86)
printf("ALLOC\t=\t0x%08lx\n",
(unsigned long)SymbolValue(ALLOCATION_POINTER));
#else
for (i = 0; i < NREGS; i++) {
printf("%s:\t", lisp_register_names[i]);
-#ifdef __i386__
+#ifdef LISP_FEATURE_X86
brief_print((lispobj)(*os_context_register_addr(context,
i*2)));
#else
printf("There are no active catchers!\n");
else {
while (catch != NULL) {
-#ifndef __i386__
+#ifndef LISP_FEATURE_X86
printf("0x%08lX:\n\tuwp: 0x%08lX\n\tfp: 0x%08lX\n\tcode: 0x%08lx\n\tentry: 0x%08lx\n\ttag: ",
(unsigned long)catch, (unsigned long)(catch->current_uwp),
(unsigned long)(catch->current_cont),
/* Search dynamic space. */
headerptr = (lispobj *)DYNAMIC_SPACE_START;
-#if !defined(__i386__)
+#if !defined(LISP_FEATURE_X86)
count =
dynamic_space_free_pointer -
(lispobj *)DYNAMIC_SPACE_START;
for (i = 0; i < NREGS ; i++)
if (strcasecmp(s + 1, lisp_register_names[i]) == 0)
-#ifdef __i386__
+#ifdef LISP_FEATURE_X86
return i*2;
#else
return i;
#define PRINTNOISE
-#if defined(__i386__)
+#if defined(LISP_FEATURE_X86)
/* again, what's so special about the x86 that this is differently
* visible there than on other platforms? -dan 20010125
*/
static boolean
dynamic_pointer_p(lispobj ptr)
{
-#ifndef __i386__
+#ifndef LISP_FEATURE_X86
return (ptr >= (lispobj)current_dynamic_space
&&
ptr < (lispobj)dynamic_space_free_pointer);
}
\f
-#ifdef __i386__
+#ifdef LISP_FEATURE_X86
#ifdef LISP_FEATURE_GENCGC
/*
return result;
}
-#ifdef __i386__
+#ifdef LISP_FEATURE_X86
static void
apply_code_fixups_during_purify(struct code *old_code, struct code *new_code)
{
gc_assert(lowtag_of(func) == FUN_POINTER_LOWTAG);
gc_assert(!dynamic_pointer_p(func));
-#ifdef __i386__
+#ifdef LISP_FEATURE_X86
/* Temporarly convert the self pointer to a real function pointer. */
((struct simple_fun *)native_pointer(func))->self
-= FUN_RAW_ADDR_OFFSET;
#endif
pscav(&((struct simple_fun *)native_pointer(func))->self, 2, 1);
-#ifdef __i386__
+#ifdef LISP_FEATURE_X86
((struct simple_fun *)native_pointer(func))->self
+= FUN_RAW_ADDR_OFFSET;
#endif
#ifdef SIMPLE_ARRAY_LONG_FLOAT_WIDETAG
case SIMPLE_ARRAY_LONG_FLOAT_WIDETAG:
-#ifdef __i386__
+#ifdef LISP_FEATURE_X86
return ptrans_vector(thing, 96, 0, 0, constant);
#endif
#ifdef sparc
#ifdef SIMPLE_ARRAY_COMPLEX_LONG_FLOAT_WIDETAG
case SIMPLE_ARRAY_COMPLEX_LONG_FLOAT_WIDETAG:
-#ifdef __i386__
+#ifdef LISP_FEATURE_X86
return ptrans_vector(thing, 192, 0, 0, constant);
#endif
#ifdef sparc
return sizeof(struct fdefn) / sizeof(lispobj);
}
-#ifdef __i386__
+#ifdef LISP_FEATURE_X86
/* now putting code objects in static space */
static int
pscav_code(struct code*code)
gc_assert(lowtag_of(func) == FUN_POINTER_LOWTAG);
gc_assert(!dynamic_pointer_p(func));
-#ifdef __i386__
+#ifdef LISP_FEATURE_X86
/* Temporarily convert the self pointer to a real function
* pointer. */
((struct simple_fun *)native_pointer(func))->self
-= FUN_RAW_ADDR_OFFSET;
#endif
pscav(&((struct simple_fun *)native_pointer(func))->self, 2, 1);
-#ifdef __i386__
+#ifdef LISP_FEATURE_X86
((struct simple_fun *)native_pointer(func))->self
+= FUN_RAW_ADDR_OFFSET;
#endif
#ifdef SIMPLE_ARRAY_LONG_FLOAT_WIDETAG
case SIMPLE_ARRAY_LONG_FLOAT_WIDETAG:
vector = (struct vector *)addr;
-#ifdef __i386__
+#ifdef LISP_FEATURE_X86
count = fixnum_value(vector->length)*3+2;
#endif
#ifdef sparc
#ifdef SIMPLE_ARRAY_COMPLEX_LONG_FLOAT_WIDETAG
case SIMPLE_ARRAY_COMPLEX_LONG_FLOAT_WIDETAG:
vector = (struct vector *)addr;
-#ifdef __i386__
+#ifdef LISP_FEATURE_X86
count = fixnum_value(vector->length)*6+2;
#endif
#ifdef sparc
#endif
case CODE_HEADER_WIDETAG:
-#ifndef __i386__
+#ifndef LISP_FEATURE_X86
gc_abort(); /* no code headers in static space */
#else
count = pscav_code((struct code*)addr);
gc_abort();
break;
-#ifdef __i386__
+#ifdef LISP_FEATURE_X86
case CLOSURE_HEADER_WIDETAG:
case FUNCALLABLE_INSTANCE_HEADER_WIDETAG:
/* The function self pointer needs special care on the
return 0;
}
-#if defined(__i386__)
+#if defined(LISP_FEATURE_X86)
dynamic_space_free_pointer =
(lispobj*)SymbolValue(ALLOCATION_POINTER,0);
#endif
printf(" stack");
fflush(stdout);
#endif
-#ifndef __i386__
+#ifndef LISP_FEATURE_X86
pscav((lispobj *)all_threads->control_stack_start,
current_control_stack_pointer -
all_threads->control_stack_start,
printf(" bindings");
fflush(stdout);
#endif
-#if !defined(__i386__)
+#if !defined(LISP_FEATURE_X86)
pscav( (lispobj *)all_threads->binding_stack_start,
(lispobj *)current_binding_stack_pointer -
all_threads->binding_stack_start,
/* Zero the stack. Note that the stack is also zeroed by SUB-GC
* calling SCRUB-CONTROL-STACK - this zeros the stack on the x86. */
-#ifndef __i386__
+#ifndef LISP_FEATURE_X86
os_zero((os_vm_address_t) current_control_stack_pointer,
(os_vm_size_t)
((all_threads->control_stack_end -
SetSymbolValue(READ_ONLY_SPACE_FREE_POINTER, (lispobj)read_only_free,0);
SetSymbolValue(STATIC_SPACE_FREE_POINTER, (lispobj)static_free,0);
-#if !defined(__i386__)
+#if !defined(LISP_FEATURE_X86)
dynamic_space_free_pointer = current_dynamic_space;
set_auto_gc_trigger(bytes_consed_between_gcs);
#else
F(setsockopt)
F(settimeofday)
F(shutdown)
-#if !defined(hpux) && !defined(SVR4) && !defined(__i386__)
+#if !defined(hpux) && !defined(SVR4) && !defined(LISP_FEATURE_X86)
F(sigreturn)
#endif
#if !defined(SVR4)
#ifndef hpux
F(cbrt)
#endif
-#ifndef __i386__
+#ifndef LISP_FEATURE_X86
F(sqrt)
#endif
F(hypot)
*
* CMU CL had architecture-dependent header files included here to
* define memory map data:
- * #ifdef __i386__
+ * #ifdef LISP_FEATURE_X86
* #include "x86-validate.h"
* #endif
* and so forth. In SBCL, the memory map data are defined at the Lisp
;;; checkins which aren't released. (And occasionally for internal
;;; versions, especially for internal versions off the main CVS
;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"0.8.3.77"
+"0.8.3.78"