Commit 5e279358 authored by Jeffrey Lee's avatar Jeffrey Lee
Browse files

Remove ARM2-era NOPs. Avoid updated PSR macros generating redundant NOPs where possible.

Detail:
  s/Taskman - Remove all NOPs from after PSR manipulation macros; the macros now take care of these for us. Change some RestPSR instances to the "f" variant, so that the macro won't insert ARM2 NOPs.
Admin:
  Tested PlingSystem build on (ARM3) RISC OS 3.1
  Requires HdrSrc-2_63 to be ARM2 safe


Version 0.78. Tagged as 'TaskWindow-0_78'
parent 6c68eb4b
......@@ -11,13 +11,13 @@
GBLS Module_HelpVersion
GBLS Module_ComponentName
GBLS Module_ComponentPath
Module_MajorVersion SETS "0.77"
Module_Version SETA 77
Module_MajorVersion SETS "0.78"
Module_Version SETA 78
Module_MinorVersion SETS ""
Module_Date SETS "30 Sep 2015"
Module_ApplicationDate SETS "30-Sep-15"
Module_Date SETS "28 May 2016"
Module_ApplicationDate SETS "28-May-16"
Module_ComponentName SETS "TaskWindow"
Module_ComponentPath SETS "castle/RiscOS/Sources/Desktop/TaskWindow"
Module_FullVersion SETS "0.77"
Module_HelpVersion SETS "0.77 (30 Sep 2015)"
Module_FullVersion SETS "0.78"
Module_HelpVersion SETS "0.78 (28 May 2016)"
END
/* (0.77)
/* (0.78)
*
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.1.
*
*/
#define Module_MajorVersion_CMHG 0.77
#define Module_MajorVersion_CMHG 0.78
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 30 Sep 2015
#define Module_Date_CMHG 28 May 2016
#define Module_MajorVersion "0.77"
#define Module_Version 77
#define Module_MajorVersion "0.78"
#define Module_Version 78
#define Module_MinorVersion ""
#define Module_Date "30 Sep 2015"
#define Module_Date "28 May 2016"
#define Module_ApplicationDate "30-Sep-15"
#define Module_ApplicationDate "28-May-16"
#define Module_ComponentName "TaskWindow"
#define Module_ComponentPath "castle/RiscOS/Sources/Desktop/TaskWindow"
#define Module_FullVersion "0.77"
#define Module_HelpVersion "0.77 (30 Sep 2015)"
#define Module_LibraryVersionInfo "0:77"
#define Module_FullVersion "0.78"
#define Module_HelpVersion "0.78 (28 May 2016)"
#define Module_LibraryVersionInfo "0:78"
......@@ -1281,7 +1281,6 @@ Code_StartEntry ROUT
BL SaveEscape ; Do this while in SVC mode
; since it calls a user handler
WritePSRc USR_mode,r14 ; must be user mode here
NOP
;
; Now in user mode, so r13 and r14 are new
;
......@@ -1366,7 +1365,7 @@ Code_StartEntry ROUT
BL WriteSpoolHandle
Pull "r0,r1,lr"
RestPSR lr
RestPSR lr,,f
Pull "$Regs" ; restore user regs
......@@ -2555,7 +2554,6 @@ MyEventV ROUT
]
Push "r1 - r5"
SETPSR SVC_mode,R5,,R4 ; Enter SVC mode
NOP
MOV r5, r14 ; Remember r14_svc
MOV r0, #CallBackHandler
ADRL r1, Code_CallBackHandler
......@@ -2630,7 +2628,6 @@ R1R = "R1 in ROM > &3800000", 0
SWI OS_SetCallBack ; And request the call back
MOV r14, r5 ; Restore svc_r14
RestPSR r4 ; Previous mode
NOP
Pull "r1 - r5" ; Register preservation
MOV r0, #0
STR r0, PassOnVectors ; Back on vectors again
......@@ -2722,7 +2719,6 @@ MyWrchV ROUT
]
LDR r13, SVCStackBase ; New empty SVC stack
WritePSRc USR_mode,r2,,r1 ; must be user mode here, save flags in R1
NOP
;
; Now in user mode, so r13 and r14 are new
;
......@@ -2819,7 +2815,6 @@ notcontrol
SWI OS_EnterOS ; back to SVC mode
RestPSR r1 ; restore the mode
NOP ; nop for 3 mu ARM
BL RestoreSVCStack ; Put back real SVC stack
......@@ -2976,7 +2971,6 @@ MyUpCallV ROUT
]
LDR r13, SVCStackBase ; New empty SVC stack
WritePSRc USR_mode,r2,,r1 ; must be user mode here, save flags in R1
NOP
;
; Now in user mode, so r13 and r14 are new
;
......@@ -3048,7 +3042,6 @@ MyUpCallV ROUT
SWI OS_EnterOS ; back to SVC mode
RestPSR r1 ; restore the mode
NOP ; nop for 3 mu ARM
BL RestoreSVCStack ; Put back real SVC stack
......@@ -3081,7 +3074,7 @@ MyUpCallV ROUT
ADRNE r0, ErrorBlock_TaskWindow_Dying
BNE CopyError
BIC r14, r14, #V_bit ; clear V (CopyError will set it again if needs be)
RestPSR r14 ; Restore flags
RestPSR r14,,f ; Restore flags
Pull r14 ; Get return address anyway
ADRNE r0, ErrorBlock_Escape
BNE CopyError
......@@ -3127,11 +3120,11 @@ MyRdchV ROUT
BL FindOwner
TEQ r12, #0 ; See if someone got vectors
BNE %FT05
RestPSR r1
RestPSR r1,,f
Pull "r0, r1, pc" ; Just pass on if not
05
RestPSR r1
RestPSR r1,,f
Pull "r0, r1, r14"
CheckIn
......@@ -3170,7 +3163,6 @@ MyRdchV ROUT
;
LDR r13, SVCStackBase ; New empty SVC stack
WritePSRc USR_mode,r2,,r1 ; must be user mode here, save flags in R1
NOP
;
; Now in user mode, so r13 and r14 are new
;
......@@ -3231,7 +3223,6 @@ MyRdchV ROUT
SWI OS_EnterOS ; back to SVC mode
RestPSR r1 ; restore the mode
NOP ; nop for 3 mu ARM
BL RestoreSVCStack ; Put back real SVC stack
[ DebugExit
......@@ -3375,7 +3366,6 @@ MyByteV ROUT
;
LDR r13, SVCStackBase ; New empty SVC stack
WritePSRc USR_mode,r2,,r1 ; USR mode, IRQs enabled, old PSR in r1
NOP
;
; Now in user mode, so r13 and r14 are new
;
......@@ -3448,7 +3438,6 @@ MyByteV ROUT
SWI OS_EnterOS ; back to SVC mode
RestPSR r1 ; restore the mode
NOP ; nop for 3 mu ARM
BL RestoreSVCStack ; Put back real SVC stack
[ DebugExit
......@@ -3481,7 +3470,7 @@ MyByteV ROUT
LDR r0, Moribund
TEQ r0, #0 ; Are we dying
BNE %FT42 ; Go generate error
RestPSR r14 ; Restore flags
RestPSR r14,,f ; Restore flags
MOVNE r2, #Esc
40
......@@ -3725,7 +3714,6 @@ Code_CallBackHandler ROUT
; enter USR mode
;
WritePSRc USR_mode,r2,,r1 ; user mode, irqs enabled, old CPSR saved for later
NOP
;
; Now in user mode, so r13 and r14 are new
;
......@@ -3787,7 +3775,6 @@ Code_CallBackHandler ROUT
SWI OS_EnterOS ; back to SVC mode
RestPSR r1 ; restore the mode
NOP ; nop for 3 mu ARM
BL RestoreSVCStack ; Put back real SVC stack
CheckOut
......@@ -3806,7 +3793,6 @@ Code_CallBackHandler ROUT
; check for the task's escape handler having requested a callback
;
WritePSRc USR_mode,r0,,r1 ; USR mode, IRQs enabled, old state in R1
NOP
ADR r13, MyVecStack+MyStackSize ; and we've got a stack!
[ checkingcallback
LDRB r14, callbackflag
......@@ -3815,7 +3801,6 @@ Code_CallBackHandler ROUT
]
SWI OS_EnterOS
RestPSR r1
; NOP ; not required as it happens
|
[ DebugExit
MOV r14, #"c"
......@@ -4428,7 +4413,7 @@ grotpollwimp
LDRB r1, CopyOfRedirectOutHandle
SWI XOS_ChangeRedirection
Pull "r0,r1,lr"
RestPSR lr
RestPSR lr,,f
]
[ DebugWimp
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment