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
f02dc218
Commit
f02dc218
authored
20 years ago
by
cwang
Browse files
Options
Downloads
Patches
Plain Diff
amd64 changes
parent
3f2ead72
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lisp/Linux-os.c
+30
-4
30 additions, 4 deletions
lisp/Linux-os.c
with
30 additions
and
4 deletions
lisp/Linux-os.c
+
30
−
4
View file @
f02dc218
...
...
@@ -15,7 +15,7 @@
* GENCGC support by Douglas Crosher, 1996, 1997.
* Alpha support by Julian Dolby, 1999.
*
* $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/Linux-os.c,v 1.1
6
200
3
/0
3/23 21:23:41 gerd
Exp $
* $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/Linux-os.c,v 1.1
7
200
4
/0
5/19 22:37:40 cwang
Exp $
*
*/
...
...
@@ -82,7 +82,7 @@ void os_init(void)
os_vm_page_size
=
getpagesize
();
#ifdef
i386
#if
def
ined(i386) || defined(__x86_64)
setfpucw
(
0x1372
|
4
|
8
|
16
|
32
);
/* No interrupts */
#endif
}
...
...
@@ -109,6 +109,28 @@ int sc_reg(struct sigcontext_struct *c, int offset)
}
#endif
#ifdef __x86_64
#if (LINUX_VERSION_CODE >= linuxversion(2,1,0)) || (__GNU_LIBRARY__ >= 6)
int
sc_reg
(
struct
sigcontext
*
c
,
int
offset
)
#else
int
sc_reg
(
struct
sigcontext_struct
*
c
,
int
offset
)
#endif
{
switch
(
offset
)
{
case
0
:
return
c
->
rax
;
case
2
:
return
c
->
rcx
;
case
4
:
return
c
->
rdx
;
case
6
:
return
c
->
rbx
;
case
8
:
return
c
->
rsp
;
case
10
:
return
c
->
rbp
;
case
12
:
return
c
->
rsi
;
case
14
:
return
c
->
rdi
;
}
return
0
;
}
#endif
void
os_save_context
(
void
)
{
/*
...
...
@@ -231,7 +253,11 @@ void sigsegv_handler(HANDLER_ARGS)
return
;
}
#if defined(__x86_64)
DPRINTF
(
0
,(
stderr
,
"sigsegv: rip: %p
\n
"
,
context
->
rip
));
#else
DPRINTF
(
0
,(
stderr
,
"sigsegv: eip: %p
\n
"
,
context
->
eip
));
#endif
interrupt_handle_now
(
signal
,
contextstruct
);
}
#else
...
...
@@ -269,12 +295,12 @@ static void sigsegv_handler(HANDLER_ARGS)
static
void
sigbus_handler
(
HANDLER_ARGS
)
{
#ifdef
i386
#if
def
ined(i386) || defined(__x86_64)
GET_CONTEXT
#endif
DPRINTF
(
1
,
(
stderr
,
"sigbus:
\n
"
));
/* there is no sigbus in linux??? */
#ifdef
i386
#if
def
ined(i386) || defined(__x86_64)
interrupt_handle_now
(
signal
,
contextstruct
);
#else
interrupt_handle_now
(
signal
,
code
,
context
);
...
...
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