Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
cmucl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Carl Shapiro
cmucl
Commits
777667de
Commit
777667de
authored
20 years ago
by
cwang
Browse files
Options
Downloads
Patches
Plain Diff
amd64 changes
parent
d087598d
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lisp/alloc.c
+6
-2
6 additions, 2 deletions
lisp/alloc.c
lisp/backtrace.c
+7
-6
7 additions, 6 deletions
lisp/backtrace.c
with
13 additions
and
8 deletions
lisp/alloc.c
+
6
−
2
View file @
777667de
/* $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/alloc.c,v 1.
5
200
3
/0
9
/1
3 14:21:30 gerd
Exp $ */
/* $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/alloc.c,v 1.
6
200
4
/0
5
/1
8 22:37:34 cwang
Exp $ */
#include
"lisp.h"
#include
"lisp.h"
#include
"internals.h"
#include
"internals.h"
...
@@ -56,7 +56,7 @@ static lispobj *alloc_unboxed(int type, int words)
...
@@ -56,7 +56,7 @@ static lispobj *alloc_unboxed(int type, int words)
{
{
lispobj
*
result
;
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
;
*
result
=
(
lispobj
)
(
words
<<
type_Bits
)
|
type
;
...
@@ -90,7 +90,11 @@ lispobj alloc_number(long n)
...
@@ -90,7 +90,11 @@ lispobj alloc_number(long n)
{
{
struct
bignum
*
ptr
;
struct
bignum
*
ptr
;
#ifdef __x86_64
if
(
-
0x2000000000000000
<
n
&&
n
<
0x2000000000000000
)
/* -2^61 to 2^61 */
#else
if
(
-
0x20000000
<
n
&&
n
<
0x20000000
)
if
(
-
0x20000000
<
n
&&
n
<
0x20000000
)
#endif
return
make_fixnum
(
n
);
return
make_fixnum
(
n
);
else
{
else
{
ptr
=
(
struct
bignum
*
)
alloc_unboxed
(
type_Bignum
,
1
);
ptr
=
(
struct
bignum
*
)
alloc_unboxed
(
type_Bignum
,
1
);
...
...
This diff is collapsed.
Click to expand it.
lisp/backtrace.c
+
7
−
6
View file @
777667de
/* $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/backtrace.c,v 1.
8
200
3
/0
7/28 17:43:11 gerd
Exp $
/* $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/backtrace.c,v 1.
9
200
4
/0
5/18 22:41:23 cwang
Exp $
*
*
* Simple backtrace facility. More or less from Rob's lisp version.
* Simple backtrace facility. More or less from Rob's lisp version.
*/
*/
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
#include
"interrupt.h"
#include
"interrupt.h"
#include
"lispregs.h"
#include
"lispregs.h"
#if
ndef i386
#if
!(defined(i386) || defined(__x86_64))
/* Sigh ... I know what the call frame looks like and it had
/* Sigh ... I know what the call frame looks like and it had
better not change. */
better not change. */
...
@@ -252,7 +252,7 @@ backtrace(int nframes)
...
@@ -252,7 +252,7 @@ backtrace(int nframes)
#define VM_RETURN_PC_SAVE_OFFSET 1
#define VM_RETURN_PC_SAVE_OFFSET 1
static
int
static
int
stack_pointer_p
(
unsigned
p
)
stack_pointer_p
(
unsigned
long
p
)
{
{
return
(
p
<
CONTROL_STACK_START
+
CONTROL_STACK_SIZE
return
(
p
<
CONTROL_STACK_START
+
CONTROL_STACK_SIZE
&&
p
>
(
unsigned
)
&
p
&&
p
>
(
unsigned
)
&
p
...
@@ -266,7 +266,7 @@ ra_pointer_p (unsigned ra)
...
@@ -266,7 +266,7 @@ ra_pointer_p (unsigned ra)
}
}
static
unsigned
static
unsigned
deref
(
unsigned
p
,
int
offset
)
deref
(
unsigned
long
p
,
int
offset
)
{
{
return
*
((
unsigned
*
)
p
+
offset
);
return
*
((
unsigned
*
)
p
+
offset
);
}
}
...
@@ -429,7 +429,7 @@ array_of_type_p (lispobj obj, int type)
...
@@ -429,7 +429,7 @@ array_of_type_p (lispobj obj, int type)
}
}
struct
compiled_debug_function
*
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
code_header_len
=
sizeof
(
lispobj
)
*
HeaderValue
(
code
->
header
);
unsigned
offset
=
pc
-
(
unsigned
)
code
-
code_header_len
;
unsigned
offset
=
pc
-
(
unsigned
)
code
-
code_header_len
;
...
@@ -497,7 +497,8 @@ backtrace (int nframes)
...
@@ -497,7 +497,8 @@ backtrace (int nframes)
for
(
i
=
0
;
i
<
nframes
;
++
i
)
for
(
i
=
0
;
i
<
nframes
;
++
i
)
{
{
lispobj
*
p
;
lispobj
*
p
;
unsigned
ra
,
next_fp
;
unsigned
long
ra
;
unsigned
next_fp
;
if
(
!
x86_call_context
(
fp
,
&
ra
,
&
next_fp
))
if
(
!
x86_call_context
(
fp
,
&
ra
,
&
next_fp
))
break
;
break
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment