summaryrefslogtreecommitdiff
path: root/asm/asm_int.s
diff options
context:
space:
mode:
Diffstat (limited to 'asm/asm_int.s')
-rw-r--r--asm/asm_int.s49
1 files changed, 27 insertions, 22 deletions
diff --git a/asm/asm_int.s b/asm/asm_int.s
index 566b646..94785bc 100644
--- a/asm/asm_int.s
+++ b/asm/asm_int.s
@@ -103,7 +103,7 @@
push \num // pass in this interrupt number
push %eax // pass in original %esp (saved just few lines before)
- call \func
+ call \func // call aligned
mov %eax,%esp // use the %esp we got from c function
pop %gs // pop everything back...
@@ -125,8 +125,13 @@
.endm
-.macro excx func
- call \func
+.macro excx num func
+ mov %esp,%eax // remember THIS stack position
+ and $-16,%esp // padding to align stack on 16byte boundary before CALL
+ sub $8,%esp // ...
+ push \num // pass in this interrupt number
+ push %eax // pass in original %esp (saved just few lines before)
+ call \func // call aligned
jmp .
.endm
@@ -153,22 +158,22 @@ int129: intx ack0 $129 interrupt_handler
int255: intx ack0 $255 interrupt_handler
-exc0: excx exception_handle_0
-exc1: excx exception_handle_1
-exc2: excx exception_handle_2
-exc3: excx exception_handle_3
-exc4: excx exception_handle_4
-exc5: excx exception_handle_5
-exc6: excx exception_handle_6
-exc7: excx exception_handle_7
-exc8: excx exception_handle_8
-exc9: excx exception_handle_9
-exc10: excx exception_handle_10
-exc11: excx exception_handle_11
-exc12: excx exception_handle_12
-exc13: excx exception_handle_13
-exc14: excx exception_handle_14
-exc15: excx exception_handle_15
-exc16: excx exception_handle_16
-exc17: excx exception_handle_17
-exc18: excx exception_handle_18
+exc0: excx $0 exception_handle
+exc1: excx $1 exception_handle
+exc2: excx $2 exception_handle
+exc3: excx $3 exception_handle
+exc4: excx $4 exception_handle
+exc5: excx $5 exception_handle
+exc6: excx $6 exception_handle
+exc7: excx $7 exception_handle
+exc8: excx $8 exception_handle
+exc9: excx $9 exception_handle
+exc10: excx $10 exception_handle
+exc11: excx $11 exception_handle
+exc12: excx $12 exception_handle
+exc13: excx $13 exception_handle
+exc14: excx $14 exception_handle
+exc15: excx $15 exception_handle
+exc16: excx $16 exception_handle
+exc17: excx $17 exception_handle
+exc18: excx $18 exception_handle