update hdisr_gcc.S: push argument for ISR.
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@2341 bbd45198-f89e-11dd-88c7-29a3b14d5316
This commit is contained in:
parent
66c2e88566
commit
0057604ad2
|
@ -73,14 +73,20 @@ _hdinterrupts:
|
|||
movw %ax, %ds
|
||||
movw %ax, %es
|
||||
pushl %esp
|
||||
|
||||
call rt_interrupt_enter
|
||||
movl %esp, %eax /* get irqno */
|
||||
addl $0x2c, %eax
|
||||
movl (%eax), %eax /* each item takes up 4bytes in isr_table,equl to isr_table[irqno] */
|
||||
shll $0x2, %eax
|
||||
movl $isr_table, %ebx
|
||||
addl %eax,%ebx
|
||||
|
||||
movl %esp, %eax /* copy esp to eax */
|
||||
addl $0x2c, %eax /* move to vector address */
|
||||
movl (%eax), %eax /* vector(eax) = *eax */
|
||||
|
||||
pushl %eax /* push argument : int vector */
|
||||
shll $0x2, %eax /* each item takes up 4bytes in isr_table. */
|
||||
movl $isr_table, %ebx /* ebx = &isr_table[0] */
|
||||
addl %eax, %ebx /* eax = &isr_table[vector] */
|
||||
call *(%ebx)
|
||||
add $4, %esp /* restore argument */
|
||||
|
||||
call rt_interrupt_leave
|
||||
|
||||
/* if rt_thread_switch_interrupt_flag set, jump to _interrupt_thread_switch and don't return */
|
||||
|
|
Loading…
Reference in New Issue