projects
/
pintos-anon
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
4dfb1fb
)
Use AT&T syntax instead of Intel.
author
Ben Pfaff
<blp@cs.stanford.edu>
Wed, 21 Dec 2005 23:44:35 +0000
(23:44 +0000)
committer
Ben Pfaff
<blp@cs.stanford.edu>
Wed, 21 Dec 2005 23:44:35 +0000
(23:44 +0000)
src/threads/intr-stubs.S
patch
|
blob
|
history
diff --git
a/src/threads/intr-stubs.S
b/src/threads/intr-stubs.S
index d2507771704699479481a547724a7d99c1b19a9b..7fcd3dcbc1c51c64856cd913591ce62fa421cc7b 100644
(file)
--- a/
src/threads/intr-stubs.S
+++ b/
src/threads/intr-stubs.S
@@
-1,6
+1,5
@@
#include "threads/loader.h"
#include "threads/loader.h"
- .intel_syntax noprefix
.text
/* Main interrupt entry point.
.text
/* Main interrupt entry point.
@@
-19,24
+18,24
@@
.func intr_entry
intr_entry:
/* Save caller's registers. */
.func intr_entry
intr_entry:
/* Save caller's registers. */
- push
ds
- push
es
- push
fs
- push
gs
- pusha
+ push
l %
ds
+ push
l %
es
+ push
l %
fs
+ push
l %
gs
+ pusha
l
/* Set up kernel environment. */
cld /* String instructions go upward. */
/* Set up kernel environment. */
cld /* String instructions go upward. */
- mov
eax, SEL_KDSEG
/* Initialize segment registers. */
- mov
ds, eax
- mov
es, eax
- lea
ebp, [esp + 56]
/* Set up frame pointer. */
+ mov
$SEL_KDSEG, %eax
/* Initialize segment registers. */
+ mov
%eax, %ds
+ mov
%eax, %es
+ lea
l 56(%esp), %ebp
/* Set up frame pointer. */
/* Call interrupt handler. */
/* Call interrupt handler. */
- push
esp
+ push
l %
esp
.globl intr_handler
call intr_handler
.globl intr_handler
call intr_handler
- add
esp, 4
+ add
l $4, %esp
.endfunc
/* Interrupt exit.
.endfunc
/* Interrupt exit.
@@
-51,15
+50,15
@@
intr_entry:
.func intr_exit
intr_exit:
/* Restore caller's registers. */
.func intr_exit
intr_exit:
/* Restore caller's registers. */
- popa
- pop
gs
- pop
fs
- pop
es
- pop
ds
+ popa
l
+ pop
l %
gs
+ pop
l %
fs
+ pop
l %
es
+ pop
l %
ds
/* Discard `struct intr_frame' vec_no, error_code,
frame_pointer members. */
/* Discard `struct intr_frame' vec_no, error_code,
frame_pointer members. */
- add
esp, 12
+ add
l $12, %esp
/* Return to caller. */
iret
/* Return to caller. */
iret
@@
-98,14
+97,14
@@
intr_stubs:
/* This implements steps 1 and 2, described above, in the common
case where we just push a 0 error code. */
#define zero \
/* This implements steps 1 and 2, described above, in the common
case where we just push a 0 error code. */
#define zero \
- push
ebp; \
- push
0
+ push
l %
ebp; \
+ push
l $
0
/* This implements steps 1 and 2, described above, in the case
where the CPU already pushed an error code. */
#define REAL \
/* This implements steps 1 and 2, described above, in the case
where the CPU already pushed an error code. */
#define REAL \
- push
dword ptr [esp]
; \
- mov
[esp + 4], ebp
+ push
l (%esp)
; \
+ mov
l %ebp, 4(%esp)
/* Emits a stub for interrupt vector NUMBER.
TYPE is `zero', for the case where we push a 0 error code,
/* Emits a stub for interrupt vector NUMBER.
TYPE is `zero', for the case where we push a 0 error code,
@@
-116,7
+115,7
@@
intr_stubs:
.func intr##NUMBER##_stub; \
intr##NUMBER##_stub: \
TYPE; \
.func intr##NUMBER##_stub; \
intr##NUMBER##_stub: \
TYPE; \
- push
0x##NUMBER;
\
+ push
$0x##NUMBER;
\
jmp intr_entry; \
.endfunc; \
\
jmp intr_entry; \
.endfunc; \
\