Skip to content
Snippets Groups Projects
Commit 777667de authored by cwang's avatar cwang
Browse files

amd64 changes

parent d087598d
No related branches found
No related tags found
No related merge requests found
/* $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/alloc.c,v 1.5 2003/09/13 14:21:30 gerd Exp $ */
/* $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/alloc.c,v 1.6 2004/05/18 22:37:34 cwang Exp $ */
#include "lisp.h"
#include "internals.h"
......@@ -56,7 +56,7 @@ static lispobj *alloc_unboxed(int type, int words)
{
lispobj *result;
result = alloc(ALIGNED_SIZE((1 + words) * sizeof(lispobj)));
result = (lispobj *)alloc(ALIGNED_SIZE((1 + words) * sizeof(lispobj)));
*result = (lispobj) (words << type_Bits) | type;
......@@ -90,7 +90,11 @@ lispobj alloc_number(long n)
{
struct bignum *ptr;
#ifdef __x86_64
if (-0x2000000000000000 < n && n < 0x2000000000000000) /* -2^61 to 2^61 */
#else
if (-0x20000000 < n && n < 0x20000000)
#endif
return make_fixnum(n);
else {
ptr = (struct bignum *)alloc_unboxed(type_Bignum, 1);
......
/* $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/backtrace.c,v 1.8 2003/07/28 17:43:11 gerd Exp $
/* $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/backtrace.c,v 1.9 2004/05/18 22:41:23 cwang Exp $
*
* Simple backtrace facility. More or less from Rob's lisp version.
*/
......@@ -12,7 +12,7 @@
#include "interrupt.h"
#include "lispregs.h"
#ifndef i386
#if !(defined(i386) || defined(__x86_64))
/* Sigh ... I know what the call frame looks like and it had
better not change. */
......@@ -252,7 +252,7 @@ backtrace(int nframes)
#define VM_RETURN_PC_SAVE_OFFSET 1
static int
stack_pointer_p (unsigned p)
stack_pointer_p (unsigned long p)
{
return (p < CONTROL_STACK_START + CONTROL_STACK_SIZE
&& p > (unsigned) &p
......@@ -266,7 +266,7 @@ ra_pointer_p (unsigned ra)
}
static unsigned
deref (unsigned p, int offset)
deref (unsigned long p, int offset)
{
return *((unsigned *) p + offset);
}
......@@ -429,7 +429,7 @@ array_of_type_p (lispobj obj, int type)
}
struct compiled_debug_function *
debug_function_from_pc (struct code* code, unsigned pc)
debug_function_from_pc (struct code* code, unsigned long pc)
{
unsigned code_header_len = sizeof (lispobj) * HeaderValue (code->header);
unsigned offset = pc - (unsigned) code - code_header_len;
......@@ -497,7 +497,8 @@ backtrace (int nframes)
for (i = 0; i < nframes; ++i)
{
lispobj *p;
unsigned ra, next_fp;
unsigned long ra;
unsigned next_fp;
if (!x86_call_context (fp, &ra, &next_fp))
break;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment