Commit a85663de authored by ROOL's avatar ROOL :robot:
Browse files

Fix to ranged cache sync when using offset assembly

Detail:
  BASIC 1.75 switched to syncing the range { old P% - new P% } at the end of assembly instead of all memory. However, this didn't take into account offset assembly in the rare case where the offset assembled code was then run directory (the sources to FSLock-1_22 and earlier were susceptible).
  Fix by storing both old P% and O% at the start of assembly and choose the appropriate range based on the OPT value.
  ADR's to CASMTB3 extended to account for larger routine.
Admin:
  Submission from Timothy Baldwin.

Version 1.76. Tagged as 'BASIC-1_76'
parent 961ace36
......@@ -11,13 +11,13 @@
GBLS Module_HelpVersion
GBLS Module_ComponentName
GBLS Module_ComponentPath
Module_MajorVersion SETS "1.75"
Module_Version SETA 175
Module_MajorVersion SETS "1.76"
Module_Version SETA 176
Module_MinorVersion SETS ""
Module_Date SETS "03 Mar 2018"
Module_ApplicationDate SETS "03-Mar-18"
Module_Date SETS "05 Jan 2019"
Module_ApplicationDate SETS "05-Jan-19"
Module_ComponentName SETS "BASIC"
Module_ComponentPath SETS "castle/RiscOS/Sources/Programmer/BASIC"
Module_FullVersion SETS "1.75"
Module_HelpVersion SETS "1.75 (03 Mar 2018)"
Module_ComponentPath SETS "apache/RiscOS/Sources/Programmer/BASIC"
Module_FullVersion SETS "1.76"
Module_HelpVersion SETS "1.76 (05 Jan 2019)"
END
/* (1.75)
/* (1.76)
*
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.1.
*
*/
#define Module_MajorVersion_CMHG 1.75
#define Module_MajorVersion_CMHG 1.76
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 03 Mar 2018
#define Module_Date_CMHG 05 Jan 2019
#define Module_MajorVersion "1.75"
#define Module_Version 175
#define Module_MajorVersion "1.76"
#define Module_Version 176
#define Module_MinorVersion ""
#define Module_Date "03 Mar 2018"
#define Module_Date "05 Jan 2019"
#define Module_ApplicationDate "03-Mar-18"
#define Module_ApplicationDate "05-Jan-19"
#define Module_ComponentName "BASIC"
#define Module_ComponentPath "castle/RiscOS/Sources/Programmer/BASIC"
#define Module_ComponentPath "apache/RiscOS/Sources/Programmer/BASIC"
#define Module_FullVersion "1.75"
#define Module_HelpVersion "1.75 (03 Mar 2018)"
#define Module_LibraryVersionInfo "1:75"
#define Module_FullVersion "1.76"
#define Module_HelpVersion "1.76 (05 Jan 2019)"
#define Module_LibraryVersionInfo "1:76"
......@@ -16,8 +16,9 @@
ASS MOV R10,#OPT_list+OPT_errors
STRB R10,[ARGP,#BYTESM]
LDR R10,[ARGP,#ASSPC]
Push "R10" ; Save for CASMKET
LDR R10,[ARGP,#ASSPC] ; P%
LDR R14,[ARGP,#ASSPC-4] ; O%
Push "R10, R14" ; Save for CASMKET
CASM MOV AELINE,LINE
BL AESPAC
TEQ R10,#"."
......@@ -96,7 +97,7 @@ CASM3 TEQ R0,R2,LSL #8
TEQ R2,#0
LDRNE R2,[R1],#4
BNE CASM3
ADR R1,CASMTB3
ADRL R1,CASMTB3
LDR R2,[R1],#4
CASM4 TEQ R0,R2,LSL #8
BEQ CASMGT3
......@@ -572,15 +573,19 @@ CASMTB3_END
; check that table offsets will be within range
ASSERT (CASMTB3_END - CASMTB3_START) < &400
CASMKET MVN R10,#0 ;deal with ]
STRB R10,[ARGP,#BYTESM]
MOV LINE,AELINE
CASMKET MOV LINE,AELINE ;deal with ]
MOV R10, R0
MOV R0, #1
Pull "R1" ; Get stashed start address
LDR R2,[ARGP,#ASSPC]
LDRB R0,[ARGP,#BYTESM]
TST R0,#OPT_asm_to_O ; With offset assembly, use O%
Pull "R1, R2" ; Get stashed start addresses
MOVNE R1, R2
LDRNE R2,[ARGP,#ASSPC-4]
LDREQ R2,[ARGP,#ASSPC]
CMP R2, R1
MOVHI R0, #1
SWIHI XOS_SynchroniseCodeAreas
MVN R0,#0
STRB R0,[ARGP,#BYTESM]
MOV R0, R10
B STMT
......@@ -653,7 +658,7 @@ CASMGT3 ADD AELINE,AELINE,#2
; level 2 table
BIC R2,R2,#&00C00000
ADR R1,CASMTB3
ADRL R1,CASMTB3
ADD R1,R1,R2,LSR #22 ;address of level 2 table
MOV R4,AELINE ;remember current match position
......
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