From: Tormod Volden Date: Sun, 19 Apr 2015 16:43:44 +0000 (+0200) Subject: dragon-nx32: Don't stuff uarea on switch to self X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=d893233e9dbda5a8ff6ca92a387b75c29a711a79;p=FUZIX.git dragon-nx32: Don't stuff uarea on switch to self A little bit of optimization. More can be done on the amount being copied over. Signed-off-by: Tormod Volden --- diff --git a/Kernel/platform-dragon-nx32/tricks.s b/Kernel/platform-dragon-nx32/tricks.s index d0a109d5..85baf85a 100644 --- a/Kernel/platform-dragon-nx32/tricks.s +++ b/Kernel/platform-dragon-nx32/tricks.s @@ -91,6 +91,11 @@ _switchin: ; get process table - must be in already from switchout ; jsr map_kernel lda P_TAB__P_PAGE_OFFSET+1,x ; LSB of 16-bit page no + + ; if we are switching to the same process + cmpa U_DATA__U_PAGE+1 + beq nostash + jsr map_process_a ; fetch uarea from process memory @@ -106,6 +111,7 @@ stashb ldd ,x++ ; get back kernel page so that we see process table jsr map_kernel +nostash: ;puls x ldx _swapstack ; check u_data->u_ptab matches what we wanted