From 2038a45c1aa88c66bbff97aa86834e7efb6390df Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Tue, 21 Aug 2018 00:05:09 +0100 Subject: [PATCH] sam: optimize kernel return path a tiny bit --- Kernel/platform-sam/sam.s | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Kernel/platform-sam/sam.s b/Kernel/platform-sam/sam.s index e5fb77dc..dc55b947 100644 --- a/Kernel/platform-sam/sam.s +++ b/Kernel/platform-sam/sam.s @@ -151,6 +151,9 @@ low_save: .db 0 video_save: .db 0 +entry_low: + .db 0 ; Holds the low bank value on IRQ entry, Used so + ; we can save and restore temporary kernel mappings map_save_low: push af @@ -361,9 +364,8 @@ interrupt_high: ; On return HL = signal vector E= signal (if any) A = page for ; high or a - jr nz, touser - ld a,#KERNEL_HIGH -touser: + jr z, kernout + ; Returning to user space ld d,a in a,(251) and #0x60 @@ -375,6 +377,7 @@ touser: xor a cp e call nz, sigpath +kernout: pop hl pop de pop af -- 2.34.1