Commit 6d052230 authored by Jeffrey Lee's avatar Jeffrey Lee
Browse files

Fix objasm 4 warnings

Detail:
  s/Arthur3, s/ChangeDyn, s/HAL, s/HeapMan, s/Middle, s/MoreSWIs, s/NewIRQs, s/Utility, s/VMSAv6, s/PMF/key, s/PMF/osbyte, s/PMF/osword, s/vdu/vdudecl, s/vdu/vdudriver, s/vdu/vduplot, s/vdu/vduwrch - Tweaked lots of LDM/STM instructions in order to get rid of the depracation/performance warnings
Admin:
  Tested on rev A2 BB-xM


Version 5.35, 4.79.2.98.2.53. Tagged as 'Kernel-5_35-4_79_2_98_2_53'
parent af172483
......@@ -13,11 +13,11 @@
GBLS Module_ComponentPath
Module_MajorVersion SETS "5.35"
Module_Version SETA 535
Module_MinorVersion SETS "4.79.2.98.2.52"
Module_Date SETS "15 Sep 2011"
Module_ApplicationDate SETS "15-Sep-11"
Module_MinorVersion SETS "4.79.2.98.2.53"
Module_Date SETS "24 Sep 2011"
Module_ApplicationDate SETS "24-Sep-11"
Module_ComponentName SETS "Kernel"
Module_ComponentPath SETS "castle/RiscOS/Sources/Kernel"
Module_FullVersion SETS "5.35 (4.79.2.98.2.52)"
Module_HelpVersion SETS "5.35 (15 Sep 2011) 4.79.2.98.2.52"
Module_FullVersion SETS "5.35 (4.79.2.98.2.53)"
Module_HelpVersion SETS "5.35 (24 Sep 2011) 4.79.2.98.2.53"
END
......@@ -5,19 +5,19 @@
*
*/
#define Module_MajorVersion_CMHG 5.35
#define Module_MinorVersion_CMHG 4.79.2.98.2.52
#define Module_Date_CMHG 15 Sep 2011
#define Module_MinorVersion_CMHG 4.79.2.98.2.53
#define Module_Date_CMHG 24 Sep 2011
#define Module_MajorVersion "5.35"
#define Module_Version 535
#define Module_MinorVersion "4.79.2.98.2.52"
#define Module_Date "15 Sep 2011"
#define Module_MinorVersion "4.79.2.98.2.53"
#define Module_Date "24 Sep 2011"
#define Module_ApplicationDate "15-Sep-11"
#define Module_ApplicationDate "24-Sep-11"
#define Module_ComponentName "Kernel"
#define Module_ComponentPath "castle/RiscOS/Sources/Kernel"
#define Module_FullVersion "5.35 (4.79.2.98.2.52)"
#define Module_HelpVersion "5.35 (15 Sep 2011) 4.79.2.98.2.52"
#define Module_FullVersion "5.35 (4.79.2.98.2.53)"
#define Module_HelpVersion "5.35 (24 Sep 2011) 4.79.2.98.2.53"
#define Module_LibraryVersionInfo "5:35"
......@@ -201,18 +201,50 @@ op_UnaryMinus * 67 ; unary minus
MACRO
$label ePush $reglist
LCLS temps
LCLL onereg
temps SETS "$reglist"
onereg SETL {TRUE}
WHILE onereg :LAND: :LEN: temps > 0
[ temps :LEFT: 1 = "," :LOR: temps :LEFT: 1 = "-"
onereg SETL {FALSE}
]
temps SETS temps :RIGHT: (:LEN: temps - 1)
WEND
[ onereg
$label STR $reglist, [R11, #-4]!
|
$label STMFD R11!, {$reglist}
]
CMP R11, R10
BLE StackOFloErr
MEND
MACRO
$label ePull $reglist, $writeback, $cc
LCLS temps
LCLL onereg
temps SETS "$reglist"
onereg SETL {TRUE}
WHILE onereg :LAND: :LEN: temps > 0
[ temps :LEFT: 1 = "," :LOR: temps :LEFT: 1 = "-"
onereg SETL {FALSE}
]
temps SETS temps :RIGHT: (:LEN: temps - 1)
WEND
[ onereg
[ "$writeback" = ""
LDR$cc $reglist, [R11], #4
|
LDR$cc $reglist, [R11]
]
|
[ "$writeback" = ""
LDM$cc.FD R11!, {$reglist}
|
LDM$cc.FD R11, {$reglist}
]
]
MEND
;*************************************************************************
......
......@@ -336,12 +336,13 @@ MoveCAMatR0toR3 Entry "r0,r1,r6,r7"
ADR lr, PhysicalAddressNotFoundError
B %BT95
StoreDebugRegs
StoreDebugRegs ; Note: Corrupts R0,R1
Push "lr"
MOV lr, #CamMapCorruptDebugBlock
STMIA lr, {r0-lr}
LDR r0, [sp, #1*4] ; reload stacked r0 (error pointer)
STR r0, [lr, #15*4] ; store in stacked PC position
LDR lr, =ZeroPage+CamMapCorruptDebugBlock
STMIA lr, {r0-r12}
STR sp, [lr, #13*4]!
LDMIA sp, {r0,r1} ; reload stacked LR & return R0 (error pointer)
STMIB lr, {r0,r1} ; LR -> LR, error -> PC
Pull "pc"
NoL2ForPageBeingRemovedError
......
......@@ -1872,7 +1872,8 @@ ClearPhysRAM ROUT
20 TEQ r0, r1 ; *this* is the speed critical bit - executed
TEQNE r0, r5 ; 32768 times per outer loop
STMNEIA r0!, {r2,r8-r14}
STMNEIA r0!, {r2,r8-r10}
STMNEIA r0!, {r2,r8-r10}
BNE %BT20
TEQ r0, r1
......
......@@ -304,7 +304,8 @@ inspect_IRQ_stack
iis_end ; store the registers in the info block
LDR R12, =ZeroPage+HeapSavedReg_R0
STMIA R12, {R0-R4, stack}
STMIA R12, {R0-R4}
STR stack, [R12, #5*4]
first_heap_address_to_trap ; because register saveblock now set.
LDR R12, [R12, #HeapReturnedReg_PSR-HeapSavedReg_R0]
......
......@@ -308,7 +308,7 @@ SBRKPT ROUT
]
STR r14, [r10, #15*4] ; PC of the SWI put in.
BNE %FT01 ; NE if not in user mode
STMIA r10!, {r0}
STR r0, [r10], #4
MOV r0, r10
LDMFD sp, {r10-r12}
......@@ -331,19 +331,22 @@ SBRKPT ROUT
BEQ %FT02 ; [yes]
; Non-user, non-supervisor - must be IRQ, ABT, UND or SYS (no SWIs from FIQ)
STMIA r10!, {r0}
STR r0, [r10], #4
MOV r0, r10
BIC r14, r12, #T32_bit ; don't go into Thumb mode
LDMFD sp, {r10-r12} ; Not banked
MSR CPSR_c, R14 ; get at registers r13 and r14
STMIA r0, {r1-r14}
STMIA r0, {r1-r12}
STR sp, [r0, #12*4]
STR r14, [r0, #13*4]
WritePSRc SVC_mode, r12
B %BT10
; Supervisor mode case
02 MOV r14, r12 ; supervisor mode. R14 in buffer dead
LDMFD sp!, {r10-r12}
STMIA r14, {r0-r13}
STMIA r14, {r0-r12}
STR r13, [r14, #13*4]
LDR r12, =&DEADDEAD
STR r12, [r14, #14*4] ; mark R14 as dead
B %BT10
......@@ -681,10 +684,13 @@ DumpyTheRegisters ROUT
ORR R2, R1, #I32_bit :OR: F32_bit
BIC R2, R2, #T32_bit
MSR CPSR_c, R2 ; change into original mode
STMIA R0, {R8-R14} ; save the banked registers
STMIA R0, {R8-R12} ; save the banked registers
AND R2, R1, #&0F
STR SP, [R0, #5*4]
EORS R2, R2, #FIQ_mode ; Was we in FIQ ? Zero if so
STR R14, [R0, #6*4]
[ HAL
BNE UNDEF2
MSR CPSR_c, #I32_bit+F32_bit+SVC32_mode ; into SVC mode so we have a stack
......@@ -923,7 +929,8 @@ Branch0_FromTrampoline
LDR R1, =ZeroPage
LDR R1, [R1, #ExceptionDump]
STMIA R1, {R0-R13}
STMIA R1, {R0-R12}
STR R13, [R1, #13*4]
LDR R0, [R14, #0]
STR R0, [R1, #1*4]
LDR R0, [R14, #4]
......
......@@ -382,7 +382,8 @@ ReadVduVarForSam
MOV R0, sp
MOV R1, sp
SWI XOS_ReadVduVariables
Pull "R0, R14, PC"
LDR R0, [sp], #8
LDR pc, [sp], #4
;*****************************************************************************
; R0 -> envstring, R1 -> 5 byte time
......
......@@ -1256,7 +1256,8 @@ IRQ ROUT
BL CallVector
[ HAL
Pull "r10, lr, pc" ; new-style CDV - pull return address
Pull "r10, lr"
Pull "pc" ; new-style CDV - pull return address
|
Pull "r10, pc" ; return: someone will always claim it.
]
......
......@@ -1235,7 +1235,7 @@ ReturnNULR0 ROUT
KeyREMOVECheckRS423 ROUT
Push R14
BL KeyREMOVE
Pull "R14, PC", CS ; pull stacked R14 if CS
ADDCS R13, R13, #4 ; pull stacked R14 if CS
Pull PC
; *****************************************************************************
......
......@@ -52,10 +52,12 @@ OsbyteKeyStatus * &CA ; only OS_Byte variable which isn't pure any more!
ASSERT "$cond"="" :LOR: "$cond"="VS"
[ "$cond"=""
Pull "R0,R3,R14,PC", VC
LDRVC R0,[R13]
]
ADDVS R13, R13, #4 ; junk stacked R0
Pull "R3,R14,PC", VS
ADD$cond R13,R13,#4
LDR$cond R3,[R13],#8 ; pull r3, junk r14
LDR$cond PC,[R13],#4
MEND
; Main OSbyte entry point
......@@ -80,13 +82,17 @@ OsByte
BLNE TranslateError
]
SWINE XOS_GenerateError ; set V if not claimed
Pull "R1-R4, R14, PC"
Pull "R1-R4"
ADD SP,SP,#4
Pull "PC"
BadCommandError MakeErrorBlock BadCommand
GoMyOsbyte
CLRPSR V_bit, R3
Pull "R0,R3, R14,PC" ; pull the world AND the PC to return
Pull "R0,R3" ; pull the world AND the PC to return
ADD SP,SP,#4
Pull "PC"
; *****************************************************************************
......
......@@ -24,10 +24,11 @@ maxword * &16 ; highest known osword
ASSERT "$cond"="" :LOR: "$cond"="VS"
[ "$cond"=""
Pull "R0-R4,R11,WsPtr,link,PC", VC
LDRVC R0,[R13]
]
ADDVS R13, R13, #4 ; junk stacked R0
Pull "R1-R4,R11,WsPtr,link,PC", VS
LDM$cond.IB R13,{R1-R4,R11,WsPtr}
ADD$cond R13,R13,#8*4 ; R0-R4,R11,WsPtr,R14
LDR$cond PC,[R13],#4
MEND
......@@ -50,7 +51,9 @@ OsWord
GoMyOsword
CLRPSR V_bit, R4
Pull "R0-R4, R11, R12, R14, PC"
Pull "R0-R4, R11, R12"
ADD R13, R13, #4
Pull PC
; *****************************************************************************
......@@ -119,7 +122,9 @@ OsWord00 ROUT
MOV R2, R1 ; put line length into R2
Pull "R0,R1,R3" ; don't overwrite R2
Pull "R3, R4, R11, R12, R14, PC"
Pull "R3, R4, R11, R12"
ADD R13, R13, #4
Pull PC
; *****************************************************************************
......
......@@ -72,7 +72,7 @@ PMFWrch ROUT
]
15
BVS %FT45 ; error from VDU
LDMFD R13, {R0} ; reload R0 with character
LDR R0,[R13] ; reload R0 with character
BYTEWS WsPtr ; reload workspace pointer
LDRB R1, WrchDest ; and wrch destinations
BCS PrintVdu ; VDU says "Print it"
......@@ -120,7 +120,7 @@ PrintVdu
BL MOSDoPrintWS ; else print it (R12 -> ByteWS)
BVS %BT45 ; error in printing
LDMFD R13, {R0} ; reload R0 with character
LDR R0, [R13] ; reload R0 with character
LDRB R1, WrchDest ; and reload wrchdest
B %BT40
......@@ -135,7 +135,7 @@ RS423Vdu
BVS %FT70 ; if can't open serial output stream, report error
; and don't put anything in buffer
STRB r0, SerialOutHandle
LDMFD sp, {r0} ; get char back
LDR r0, [sp] ; get char back
60
PHPSEI
Push "r14" ; save IRQ indication
......
......@@ -153,8 +153,9 @@ Util_ChocService
STRB r0, [lr, #OsbyteVars + :INDEX: SerialOutHandle]
20
SWI XOS_Find ; close file, ignore errors (if we get an error it's closed anyway)
LDR r0, [sp], #8 ; restore r0, junk r1
MOV r1, #Service_Serviced ; indicate we closed it
Pull "r0,lr,pc" ; restore r0, junk r1, and exit
LDR pc, [sp], #4 ; exit
Util_Die ROUT
......@@ -813,8 +814,8 @@ KeyHelpCommon ; also used by *Configure
MOVVC r1, r0
MOVVC r0, r2
SWIVC XOS_PrettyPrint
Pull "r1,lr,PC", VS ; if error, pull R1, junk stacked R0 and exit
Pull "r1,r3" ; restore r1 and get buffer pointer
Pull "pc", VS ; if error, exit
MOV r0, #0
ADRL R2, SysCommsModule
BL OneModuleK
......@@ -879,11 +880,11 @@ OneModuleK ROUT
CMP r0, #0
BEQ OneModuleK_PrintTitle ; Don't trust MessageTrans to preserve Z
SWI XMessageTrans_Dictionary
STMDB sp!, {r1}
Push "r1"
MOVVC r1, r0
MOVVC r0, r4
SWIVC XOS_PrettyPrint
LDMIA sp!, {r1}
Pull "r1"
B %FT77
OneModuleK_PrintTitle
LDR r0, [stack]
......
......@@ -86,7 +86,7 @@ BangCamUpdate ROUT
ADD r6, r6, r4, LSR #12 ; put back the ones which were too many
ADD r0, r0, r6, LSL #12 ; move on address by the number of pages left
LDMFD r13, {r6} ; reload old logical address
LDR r6, [r13] ; reload old logical address
; now we have r6 = old logical address, r2 = physical page number, r0 = physical address
......@@ -544,7 +544,9 @@ DAbPreVeneer ROUT
ORR r3, r3, r1 ; and put in user's
MSR CPSR_c, r3 ; switch to user's mode
STMIA r2, {r8-r14} ; save the banked registers
STMIA r2, {r8-r12} ; save the banked registers
STR r13, [r2,#5*4]
STR r14, [r2,#6*4]
MRS r5, SPSR ; get the SPSR for the aborter's mode
STR r5, [r2, #8*4] ; and store away in the spare slot on the end
......@@ -956,7 +958,9 @@ DAbPreVeneer ROUT
ORR r6, r6, #I32_bit ; use aborter's flags and mode but set I
BIC r6, r6, #T32_bit ; and don't set Thumb
MSR CPSR_c, r6 ; switch to aborter's mode
LDMIA r2, {r8-r14} ; reload banked registers
LDMIA r2, {r8-r12} ; reload banked registers
LDR r13, [r2, #5*4]
LDR r14, [r2, #6*4]
MSR CPSR_c, r1 ; switch back to ABT32
80
......
......@@ -272,7 +272,7 @@ Pal_Blocksize # 0
;
MACRO
Return $cond
LDM$cond.FD StkPtr!, {PC}
LDR$cond PC, [StkPtr], #4
MEND
;
......
......@@ -419,7 +419,8 @@ Vdu ROUT
BL Vdu05
BL PostWrchCursor
CLC ; also clears V
Pull "R14,PC"
ADD SP,SP,#4
Pull PC
VduPrintExit ; exit used if print required
BL PostWrchCursor
......@@ -485,14 +486,19 @@ Vdu07 ROUT
BL PreWrchCursor ; exits with R6 = CursorFlags
Pull "R0"
10
[ No26bitCode
ADR R14, VduPrintExit
|
MOV R14, PC
ADD R14, R14, #(VduPrintExit-%BT10-8) ; push address of SEC exit
; (with flags)
]
Push R14
BL Vdu10
BL PostWrchCursor
CLC ; also clears V
Pull "R14,PC"
ADD SP, SP, #4
Pull PC
;
; This is the only byte of a single byte Vdu sequence
......@@ -547,14 +553,19 @@ Vdu20 ROUT
BL PreWrchCursor ; exits with R6 = CursorFlags
Pull "R0"
05
[ No26bitCode
ADR R14, VduPrintExit
|
MOV R14, PC
ADD R14, R14, #(VduPrintExit-%BT05-8) ; push address of SEC exit
; (with flags)
]
Push R14
BL TimWrch
BL PostWrchCursor
CLC ; also clears V
Pull "R14,PC"
ADD SP, SP, #4
Pull PC
; *****************************************************************************
......@@ -723,8 +734,9 @@ SYN ROUT ; Select screen mode (MODE)
VduBadExit ; jumped to if an error in VDU code
Push R0 ; save error pointer
BL PostWrchCursor
LDR R0, [R13], #8 ; get error pointer, junk next entry
SETV
Pull "R0, R14,PC"
Pull PC
ModeChangeSub ROUT
Push lr
......
......@@ -1050,7 +1050,7 @@ NewHLine ROUT ; Entry point for sorted Xcoords
TST R11, #2 ; can we do 2 words ?
STMNEIA R9!, {R0-R1} ; write 2 words to screen
TST R11, #1 ; can we do 1 word ?
STMNEIA R9!, {R0} ; write 1 word to screen
STRNE R0, [R9], #4 ; write 1 word to screen
AND R10, R10, R14 ; do partial word at end
[ AvoidScreenReads
CMP R14, #&FFFFFFFF
......
......@@ -396,7 +396,7 @@ FastCLS ROUT
ADDCC R9, R9, #256 ; add back the last 256
30
SUBS R9, R9, #4
STMCSIA R8!, {R0}
STRCS R0, [R8], #4
BHI %BT30
Pull PC
......
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