sam: don't swap the callers IX and IY on a switch it upsets them
authorAlan Cox <alan@linux.intel.com>
Mon, 10 Sep 2018 12:55:18 +0000 (13:55 +0100)
committerAlan Cox <alan@linux.intel.com>
Mon, 10 Sep 2018 12:55:18 +0000 (13:55 +0100)
Kernel/platform-sam/tricks.s

index 0bf22e4..127d4f3 100644 (file)
@@ -42,7 +42,7 @@ _platform_switchout:
        push iy
        ld (U_DATA__U_SP), sp
 
-       ; The U_DATA stash lives in th top of the user process. Map that
+       ; The U_DATA stash lives in the top of the user process. Map that
        ; low with interrupts off so we can ldir between the two
        ld a,(U_DATA__U_PAGE + 1)
        call map_page_low
@@ -105,8 +105,8 @@ skip_copyback:
        ld hl,#0
        ld (_runticks), hl
        ; Recover IX and IY, return value
-       pop ix
        pop iy
+       pop ix
        pop hl
 
        ; if we pre-empted in an ISR IRQ's stay off, if not they get enabled