z80fixedbank-banked: apply the same SP fix as to the main fixedbank code
authorAlan Cox <alan@linux.intel.com>
Fri, 10 Aug 2018 23:32:42 +0000 (00:32 +0100)
committerAlan Cox <alan@linux.intel.com>
Fri, 10 Aug 2018 23:32:42 +0000 (00:32 +0100)
Kernel/lib/z80fixedbank-banked.s

index bd0b4ac..54a7ecb 100644 (file)
@@ -159,6 +159,11 @@ not_swapped:
        ldir
        exx
 
+       ; Restore the stack in case we are not swap based so we don't
+       ; scribble the bank stack
+
+        ld sp, (U_DATA__U_SP)
+
        call map_kernel_restore
 
         ; check u_data->u_ptab matches what we wanted
@@ -183,7 +188,6 @@ skip_copyback:
 
         ; restore machine state -- note we may be returning from either
         ; _switchout or _dofork
-        ld sp, (U_DATA__U_SP)
 
        pop af
         pop iy