6809: hopefully sort out the branches and stack save this time
authorAlan Cox <alan@linux.intel.com>
Tue, 2 Jun 2015 23:27:25 +0000 (00:27 +0100)
committerAlan Cox <alan@linux.intel.com>
Tue, 2 Jun 2015 23:27:25 +0000 (00:27 +0100)
Kernel/lowlevel-6809.s

index f282c4f..963bd5c 100644 (file)
@@ -288,9 +288,9 @@ in_kernel:
 
             clr _inint
             ldx istack_switched_sp     ; stack back
-            lda U_DATA__U_INSYS
             clr U_DATA__U_ININTERRUPT
-            bne interrupt_return
+            lda U_DATA__U_INSYS
+            bne interrupt_return_x
            lda _need_resched
            beq no_switch
 
@@ -337,6 +337,9 @@ intdone:
 interrupt_return:
            SAM_RESTORE                 ; uses the saved Y
             rti
+interrupt_return_x:
+           tfr x,s
+           bra interrupt_return
 
 ;  Enter with X being the signal to send ourself
 trap_signal: