Commit 615d13b9 authored by Stewart Brodie's avatar Stewart Brodie
Browse files

32-bit fixes

Detail:
  Some stack offsets were wrong - now fixed.
  More PSR preservation added.
Admin:
  26-bit builds of this module still stiff the machine when ADFS is
    used.
  Do not use - except for testing.

Version 3.24. Tagged as 'FileCore-3_24'
parent 6489a147
......@@ -9,12 +9,12 @@
GBLS Module_ApplicationDate2
GBLS Module_ApplicationDate4
GBLS Module_HelpVersion
Module_MajorVersion SETS "3.23"
Module_Version SETA 323
Module_MajorVersion SETS "3.24"
Module_Version SETA 324
Module_MinorVersion SETS ""
Module_Date SETS "30 Oct 2000"
Module_ApplicationDate2 SETS "30-Oct-00"
Module_ApplicationDate4 SETS "30-Oct-2000"
Module_FullVersion SETS "3.23"
Module_HelpVersion SETS "3.23 (30 Oct 2000)"
Module_Date SETS "31 Oct 2000"
Module_ApplicationDate2 SETS "31-Oct-00"
Module_ApplicationDate4 SETS "31-Oct-2000"
Module_FullVersion SETS "3.24"
Module_HelpVersion SETS "3.24 (31 Oct 2000)"
END
/* (3.23)
/* (3.24)
*
* This file is automatically maintained by srccommit, do not edit manually.
*
*/
#define Module_MajorVersion_CMHG 3.23
#define Module_MajorVersion_CMHG 3.24
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 30 Oct 2000
#define Module_Date_CMHG 31 Oct 2000
#define Module_MajorVersion "3.23"
#define Module_Version 323
#define Module_MajorVersion "3.24"
#define Module_Version 324
#define Module_MinorVersion ""
#define Module_Date "30 Oct 2000"
#define Module_Date "31 Oct 2000"
#define Module_ApplicationDate2 "30-Oct-00"
#define Module_ApplicationDate4 "30-Oct-2000"
#define Module_ApplicationDate2 "31-Oct-00"
#define Module_ApplicationDate4 "31-Oct-2000"
#define Module_FullVersion "3.23"
#define Module_HelpVersion "3.23 (30 Oct 2000)"
#define Module_FullVersion "3.24"
#define Module_HelpVersion "3.24 (31 Oct 2000)"
......@@ -547,7 +547,7 @@ DoDiscOp ROUT
Push "R0-R3,LR"
MOV R3, R2
BL FindDisc ;(R3->R0,R1,V)
STRVS R0, [SP, #4]
STRVS R0, [SP] ;SP still points there
Pull "R0-R3" ;restore disc op params
BLVC RetryDiscOp ;(R1-R4->R0-R4,V) do the disc op
......
......@@ -335,7 +335,7 @@ FindDirCommon
]
BL CheckDir ;check well formed (R3,R5,R6->R0,V)
95
STRVS R0, [SP]
STRVS R0, [SP, #4] ;overwrite stacked R0
[ Debug6
DLINE "start |end |result - leaving FindDir/GetDir"
DREG R5,,cc
......
......@@ -1327,9 +1327,8 @@ Parent_Misc ROUT
DoXOS_WriteS ROUT
Push "R0-R2,LR"
SUB R0, LR, PC ; remove any PSR flags from LR
ADD R0, PC, R0
SUB R0, R0, #4
RSB R0, PC, PC ; remove any PSR flags from LR
SUB R0, LR, R0
MOV R1, R0
05
LDRB R2, [R1],#1
......
......@@ -1290,9 +1290,9 @@ NextFs ROUT
InitZoneObj ROUT
Push "LR"
SavePSR R7
BL InitZoneFree ;(R0,R10->R11)
Push "R7,R11"
SavePSR R7
[ BigMaps
BL FreeRdLinkBits ;(R10,R11->R8)
|
......@@ -2490,7 +2490,7 @@ ChainClaim ROUT
|
BLNE RdLenBits ;(R10,R11->R7)
]
STR R11,[sp, #11*4] ;map ptr of obj is first gap found
STR R11,[sp, #11*4] ;map ptr of obj is first gap found (sp offset OK - used to be 10)
B %FT10
05
BL NextFree ;(R10,R11->R9,R11,Z,C)
......
......@@ -49,7 +49,7 @@ CheckProcessBlks ROUT
MOV r0, #0
MOV r1, #0
SWI XOS_ChangeRedirection
LDR r5, [sp, #2*4]
LDR r5, [sp, #3*4] ; sp offset OK.
DREG r5, "WinnieProcessBlk bad at "
MOV pc, #0
01
......@@ -65,11 +65,11 @@ CheckProcessBlks ROUT
TSTEQ r6, #BadPtrBits
LDREQ r6, [R5, #ProcessFcb]
TSTEQ r6, #BadPtrBits
BNE %FT02
BEQ %FT02
MOV r0, #0
MOV r1, #0
SWI XOS_ChangeRedirection
LDR r5, [sp, #2*4]
LDR r5, [sp, #3*4] ; sp offset OK.
DREG r5, "FloppyProcessBlk bad at "
MOV pc, #0
02
......
......@@ -2265,14 +2265,15 @@ BackgroundOps ROUT
TSTS R6, R1
MOVNE PC, LR ;give up if another thread owns the controller
WritePSRc SVC_mode, R5 ;ensure IRQs enabled
Push "R0-R2,LR"
WritePSRc SVC_mode, R5,,LR ;ensure IRQs enabled, old PSR into LR
Push "lr"
[ F ;FOR DEBUGGING
; Return if IRQsema set
MOV LR, #IRQsema
LDR LR, [LR]
TEQS LR, #0
Pull "R0-R2,PC",NE
BNE BackgroundOpsExit
]
[ DebugG
DREG r0,">BackgroundOps(",cc
......@@ -2296,7 +2297,7 @@ BackgroundOps ROUT
LDR LR, [LR]
TEQS LR, #0
STRNEB R1, Interlocks
Pull "R0-R2,PC",NE
BNE BackgroundOpsExit
]
LDRB R5, [R0,#Process]
......@@ -2739,7 +2740,10 @@ BackgroundOps ROUT
DREG r0,"<BackgroundOps sp="
Pull "r0"
]
CLRV
BackgroundOpsExit
Pull "r0"
BIC r0, r0, #V_bit
RestPSR r0,,cf ;restore flags exc. V clear. May re-disable IRQs/FIQs too.
Pull "R0-R2,PC"
......@@ -3276,7 +3280,7 @@ BufsToRam ROUT
BEQ %FT22
DLINE "BAD FLAGS IN BUFS TO RAM"
regdump
LDR lr, [sp, #10*4]
LDR lr, [sp, #11*4] ; sp offset OK.
DREG lr, "Caller return:"
21
B %BT21
......@@ -3835,12 +3839,12 @@ ReduceWriteBehind ROUT
MOV r0, lr
DREG r0, "", cc
Pull "r0"
LDR LR, [SP, #(2+13)*4]
LDR LR, [SP, #(3+13)*4] ; sp offset OK.
Push "r0"
MOV r0, lr
DREG r0, "", cc
Pull "r0"
LDR LR, [SP, #(2+2+13)*4]
LDR LR, [SP, #(3+2+13)*4] ; sp offset OK.
Push "r0"
MOV r0, lr
DREG r0, "", cc
......@@ -3861,7 +3865,7 @@ ReduceWriteBehind ROUT
MOV r0, lr
DREG r0, "", cc
Pull "r0"
LDR LR, [SP,#4]
LDR LR, [SP,#8] ; sp offset OK.
regdump
MOV PC, #0
42
......@@ -5443,6 +5447,8 @@ FindDisc ROUT
FreeFcb
Push "R1,R2,BufPtr,LR"
SavePSR lr
Push "lr"
BL ClaimFileCache
LDR R2, = EmptyBuf * &01010101
MOV BufPtr, Fcb
......@@ -5463,6 +5469,7 @@ FreeFcb
MOV R2, R9
BL OnlySysXOS_Heap ;and return to heap (R0,R2->R0,V)
]
Pull "lr"
Pull "R1,R2,BufPtr"
B PullLinkKeepV
......@@ -5726,7 +5733,7 @@ Check ROUT
MOV r0, lr
DREG r0, "", cc
Pull "r0"
LDR LR, [SP,#9*4]
LDR LR, [SP,#10*4] ; sp offset OK.
Push "r0"
MOV r0, lr
DREG r0, "", cc
......
......@@ -308,7 +308,7 @@ InitEntry ROUT ; NO REENTRANCY CHECK NEEDED
]
;initialise hardware-specific bits
BL InitialiseHardware
; BL InitialiseHardware
;initialise critical subroutine workspace
sbaddr R0, CriticalStack1
......
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