Commit e7f8277a authored by Robert Sprowson's avatar Robert Sprowson

Refactor unaligned STM in old style error return

Don't rely on an STM with either of the bottom 2 bits set to store on a word aligned boundary any more.
Fixes abort when an old style error is reported to FileCore on ARMv7.
Spotted by Jon Abbott, ref https://www.riscosopen.org/forum/forums/4/topics/3682

Version 3.68. Tagged as 'FileCore-3_68'
parent da5cf16c
......@@ -11,13 +11,13 @@
GBLS Module_HelpVersion
GBLS Module_ComponentName
GBLS Module_ComponentPath
Module_MajorVersion SETS "3.67"
Module_Version SETA 367
Module_MajorVersion SETS "3.68"
Module_Version SETA 368
Module_MinorVersion SETS ""
Module_Date SETS "02 Oct 2015"
Module_ApplicationDate SETS "02-Oct-15"
Module_Date SETS "28 Oct 2015"
Module_ApplicationDate SETS "28-Oct-15"
Module_ComponentName SETS "FileCore"
Module_ComponentPath SETS "castle/RiscOS/Sources/FileSys/FileCore"
Module_FullVersion SETS "3.67"
Module_HelpVersion SETS "3.67 (02 Oct 2015)"
Module_FullVersion SETS "3.68"
Module_HelpVersion SETS "3.68 (28 Oct 2015)"
END
/* (3.67)
/* (3.68)
*
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.1.
*
*/
#define Module_MajorVersion_CMHG 3.67
#define Module_MajorVersion_CMHG 3.68
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 02 Oct 2015
#define Module_Date_CMHG 28 Oct 2015
#define Module_MajorVersion "3.67"
#define Module_Version 367
#define Module_MajorVersion "3.68"
#define Module_Version 368
#define Module_MinorVersion ""
#define Module_Date "02 Oct 2015"
#define Module_Date "28 Oct 2015"
#define Module_ApplicationDate "02-Oct-15"
#define Module_ApplicationDate "28-Oct-15"
#define Module_ComponentName "FileCore"
#define Module_ComponentPath "castle/RiscOS/Sources/FileSys/FileCore"
#define Module_FullVersion "3.67"
#define Module_HelpVersion "3.67 (02 Oct 2015)"
#define Module_LibraryVersionInfo "3:67"
#define Module_FullVersion "3.68"
#define Module_HelpVersion "3.68 (28 Oct 2015)"
#define Module_LibraryVersionInfo "3:68"
......@@ -1357,8 +1357,7 @@ InternalFromParent
; Error occurred - let's convert (if necessary) from old scheme to new.
LDR LR, FS_Flags
TSTS LR, #CreateFlag_NewErrorSupport
BNE %FT95
Pull "R1,PC",NE
BNE %FT95 ; Child returns new style errors
TSTS R0, #DiscErrorBit
BNE %FT50
TSTS R0, #ExternalErrorBit
......@@ -1394,9 +1393,9 @@ InternalFromParent
MOV LR, R4, LSR R0
MOV R4, R4, LSL R3
70
ASSERT NewDiscErrorBit < bit2 ; STM ignores bits 0 and 1 :)
ADR R0, ConvDiscErr+NewDiscErrorBit
STMIA R0, {R2, R4, LR}
ADR R0, ConvDiscErr
STMIA R0, {R2, R4, LR} ; Fabricated new style error
ORR R0, R0, #NewDiscErrorBit
Pull "R2-R4"
95
RestPSR R1,,f
......
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