Commit 4e05249d authored by Robert Sprowson's avatar Robert Sprowson
Browse files

Assemble the later ARMv8 AArch32 opcodes

ARM have added SETPAN, ESB, TSB, CSDB, PSSBB, SSBB since the earlier ARM ARM that BASIC covered. Add these.
Raise the limit of 16 on the table that decodes 'pure' 3 character opcodes (+condition) in CASMTB2 since the offset into the jump table can be inferred from the offset into the opcode table (both are 1 word/entry), so removing the 4 bit limit. Move SMC/SMI/SVC into CASMTB2.
Help updated in CmdHelp.

Version 1.77. Tagged as 'BASIC-1_77'
parent a85663de
No preview for this file type
;
; This file is automatically maintained by srccommit, do not edit manually.
; Last processed by srccommit version: 1.1.
;
GBLS Module_MajorVersion
GBLA Module_Version
......@@ -10,14 +9,12 @@
GBLS Module_ApplicationDate
GBLS Module_HelpVersion
GBLS Module_ComponentName
GBLS Module_ComponentPath
Module_MajorVersion SETS "1.76"
Module_Version SETA 176
Module_MajorVersion SETS "1.77"
Module_Version SETA 177
Module_MinorVersion SETS ""
Module_Date SETS "05 Jan 2019"
Module_ApplicationDate SETS "05-Jan-19"
Module_Date SETS "29 Jun 2019"
Module_ApplicationDate SETS "29-Jun-19"
Module_ComponentName SETS "BASIC"
Module_ComponentPath SETS "apache/RiscOS/Sources/Programmer/BASIC"
Module_FullVersion SETS "1.76"
Module_HelpVersion SETS "1.76 (05 Jan 2019)"
Module_FullVersion SETS "1.77"
Module_HelpVersion SETS "1.77 (29 Jun 2019)"
END
/* (1.76)
/* (1.77)
*
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.1.
*
*/
#define Module_MajorVersion_CMHG 1.76
#define Module_MajorVersion_CMHG 1.77
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 05 Jan 2019
#define Module_Date_CMHG 29 Jun 2019
#define Module_MajorVersion "1.76"
#define Module_Version 176
#define Module_MajorVersion "1.77"
#define Module_Version 177
#define Module_MinorVersion ""
#define Module_Date "05 Jan 2019"
#define Module_Date "29 Jun 2019"
#define Module_ApplicationDate "05-Jan-19"
#define Module_ApplicationDate "29-Jun-19"
#define Module_ComponentName "BASIC"
#define Module_ComponentPath "apache/RiscOS/Sources/Programmer/BASIC"
#define Module_FullVersion "1.76"
#define Module_HelpVersion "1.76 (05 Jan 2019)"
#define Module_LibraryVersionInfo "1:76"
#define Module_FullVersion "1.77"
#define Module_HelpVersion "1.77 (29 Jun 2019)"
#define Module_LibraryVersionInfo "1:77"
......@@ -234,24 +234,30 @@ CASMTOKTB
= 0
ALIGN
; group of 16 opcodes that do not demand matching of more
; group of opcodes that do not demand matching of more
; than 3 chars before any condition
; following 'starter' byte supplies bits 27:20 of instruction in R1
CASMTB2 = "DBG",&02
= "CLZ",&16
= "HVC",&24 ; unconditional
= "PLD",&39 ; unconditional
= "PLI",&4D ; unconditional
= "BFC",&5C
= "BFI",&6C
= "WFE",&72
= "SEL",&88
= "HLT",&90
= "DMB",&A7 ; unconditional
= "DSB",&B7 ; unconditional
= "ISB",&C7 ; unconditional
= "REV",&DB
= "UDF",&EF ; unconditional
= "WFI",&F2
= "CLZ",&06
= "HVC",&04 ; unconditional
= "PLD",&09 ; unconditional
= "PLI",&0D ; unconditional
= "BFC",&0C
= "BFI",&0C
= "WFE",&02
= "SEL",&08
= "HLT",&00
= "DMB",&07 ; unconditional
= "DSB",&07 ; unconditional
= "ISB",&07 ; unconditional
= "REV",&0B
= "UDF",&0F ; unconditional
= "WFI",&02
= "ESB",&32
= "TSB",&32
= "SMC",&16
= "SMI",&16
= "SVC",&F0
& 0
; opcodes that are longer, unconditional and/or simply did not fit
......@@ -266,6 +272,7 @@ CASMTB3 = "BKP",(CASMTB_BKP-CASMTB3)/4
= "LDA",(CASMTB_LDA-CASMTB3)/4
= "PKH",(CASMTB_PKH-CASMTB3)/4
= "POP",(CASMTB_POP-CASMTB3)/4
= "PSS",(CASMTB_PSS-CASMTB3)/4
= "PUS",(CASMTB_PUS-CASMTB3)/4
= "QAD",(CASMTB_QAD-CASMTB3)/4
= "QAS",(CASMTB_QAS-CASMTB3)/4
......@@ -283,14 +290,12 @@ CASMTB3 = "BKP",(CASMTB_BKP-CASMTB3)/4
= "SEV",(CASMTB_SEV-CASMTB3)/4
= "SHA",(CASMTB_SHA-CASMTB3)/4
= "SHS",(CASMTB_SHS-CASMTB3)/4
= "SMC",(CASMTB_SMC-CASMTB3)/4
= "SMI",(CASMTB_SMI-CASMTB3)/4
= "SMM",(CASMTB_SMM-CASMTB3)/4
= "SRS",(CASMTB_SRS-CASMTB3)/4
= "SSA",(CASMTB_SSA-CASMTB3)/4
= "SSB",(CASMTB_SSB-CASMTB3)/4
= "SSU",(CASMTB_SSU-CASMTB3)/4
= "STL",(CASMTB_STL-CASMTB3)/4
= "SVC",(CASMTB_SVC-CASMTB3)/4
= "SXT",(CASMTB_SXT-CASMTB3)/4
= "UAD",(CASMTB_UAD-CASMTB3)/4
= "UAS",(CASMTB_UAS-CASMTB3)/4
......@@ -343,6 +348,10 @@ CASMTB_CRC
= "32CW",&A4,&94
= 0
ALIGN
CASMTB_CSDB
= &C0+26,&32
= 0
ALIGN
CASMTB_ERE
= "T",&D3,&16
= 0
......@@ -364,6 +373,10 @@ CASMTB_POP
= &E1,&0B
= 0
ALIGN
CASMTB_PSS
= "BB",&80+34,&57
= 0
ALIGN
CASMTB_PUS
= "H",&E1,&12
= 0
......@@ -426,6 +439,7 @@ CASMTB_SDI
ALIGN
CASMTB_SET
= "END",&8B,&10
= "PAN",&80+41,&11
= 0
ALIGN
CASMTB_SEV
......@@ -445,14 +459,6 @@ CASMTB_SHS
= "UB8",&D6,&63
= 0
ALIGN
CASMTB_SMC
= &D8,&16
= 0
ALIGN
CASMTB_SMI
= &E2,&16
= 0
ALIGN
CASMTB_SMM
= "LA",&9D,&75
= "LS",&9E,&75
......@@ -471,6 +477,10 @@ CASMTB_SSA
= "X",&C5,&61
= 0
ALIGN
CASMTB_SSB
= "B",&80+24,&57
= 0
ALIGN
CASMTB_SSU
= "B16",&D5,&61
= "B8",&D6,&61
......@@ -484,10 +494,6 @@ CASMTB_STL
= &E8,&18
= 0
ALIGN
CASMTB_SVC
= &DA,&F0
= 0
ALIGN
CASMTB_SXT
= "AB16",&CF,&68
= "AB",&CF,&6A
......@@ -624,12 +630,13 @@ CASMTABLE
CASMGT2 ADD AELINE,AELINE,#2
BL ALIGN ;definitely not a directive
AND R1,R2,#&0F000000
ADR R4,CASMTB2+4 ;post inc correction
SUB R4,R1,R4 ;word aligned offset into CASMTB2 for CASMTABLE2
AND R1,R2,#&FF000000
MOV R1,R1,LSR #4
MOV R4,R2,LSR #28
BL DOCOND
ADR R0,CASMTABLE2
LDR R3,[R0,R4,LSL #2]
LDR R3,[R0,R4]
ADD PC,PC,R3
ASMAJ2 * .+4
CASMTABLE2
......@@ -649,6 +656,11 @@ CASMTABLE2
& CASMREV -ASMAJ2
& CASMUDF -ASMAJ2
& CASMWFI -ASMAJ2
& CASMESB -ASMAJ2
& CASMTSB -ASMAJ2
& CASMSMC -ASMAJ2
& CASMSMI -ASMAJ2
& CASMSVC -ASMAJ2
CASMGT3 ADD AELINE,AELINE,#2
BL ALIGN ;definitely not a directive
......@@ -738,9 +750,9 @@ CASMTABLE3
& CASMSUB16 -ASMAJ3
& CASMSUB8 -ASMAJ3
& CASMCPS -ASMAJ3
& CASMSMC -ASMAJ3
& CASMSSBB -ASMAJ3
& CASMSRS -ASMAJ3
& CASMSVC -ASMAJ3
& CASMCSDB -ASMAJ3
& CASMCPSIE -ASMAJ3
& CASMCPSID -ASMAJ3
& CASMSMMLA -ASMAJ3
......@@ -748,13 +760,14 @@ CASMTABLE3
& CASMSMMUL -ASMAJ3
& CASMCLREX -ASMAJ3
& CASMPUSHPOP -ASMAJ3
& CASMSMI -ASMAJ3
& CASMPSSBB -ASMAJ3
& CASMSEV -ASMAJ3
& CASMCRC32 -ASMAJ3
& CASMLDAEX -ASMAJ3
& CASMLDA -ASMAJ3
& CASMSTLEX -ASMAJ3
& CASMSTL -ASMAJ3
& CASMSETPAN -ASMAJ3
; PUSH and POP do NOT set bit 27 at this point,
; to allow differentiation from LDM/STM later...
......@@ -1696,14 +1709,13 @@ CASMSWI STR R1,[SP,#-4]!
SWI OS_SWINumberFromString
B CASMSWI2
CASMSWI1
BLMI SFIX
CASMSWI2
LDR R1,[SP],#4
BIC R0,R0,#&FF000000
ORR R1,R1,R0
B CASMICHK
CASMCP MOVNE R3,#0 ; R3=0 if no condition found
ANDS R10,R1,#&F000000
BEQ CASMCDP
......@@ -3167,6 +3179,14 @@ CASMSEV MOVS R14,R1,LSR #27+1 ; transfer L discriminator to C
ADRL R14,CASMICHK
B AESPAC ; t.c.o.
CASMPSSBB
ORR R1,R1,#4
CASMSSBB
ORR R1,R1,#&FF000
ORR R1,R1,#&40
ADRL R14,CASMICHK
B AESPAC ; t.c.o.
CASMDMB ORR R1,R1,#&10
CASMDSB BEQ ERASS1 ; no conditions please
BL AESPAC
......@@ -3322,9 +3342,29 @@ CASMSMI BL ASMEXPR
ORR R1,R1,R0
B CASMICHK
CASMWFI ORR R1,R1,#&03000000
CASMTSB BL AESPAC
ADR R14,CASMCSYNC
10 BIC R10,R10,#" "
LDRB R0,[R14],#1
TEQ R0,R10
LDREQB R10,[AELINE],#1
BEQ %BT10
MOVS R0,R0
ORREQ R1,R1,#&12
SUBEQ AELINE,AELINE,#1
BEQ %FT20 ; all matched
B ERSYNT
CASMCSYNC
DCB "CSYNC",0
ALIGN
CASMESB ORR R1,R1,#&00000010
B %FT20
CASMCSDB
ORR R1,R1,#&14
B %FT20
CASMWFI ORR R1,R1,#3
20 ORR R1,R1,#&03000000
ORR R1,R1,#&0000F000
ORR R1,R1,#3
ADRL R14,CASMICHK
B AESPAC ; t.c.o.
......@@ -3470,6 +3510,15 @@ CASMERET
ADRL R14,CASMICHK
B AESPAC
CASMSETPAN
BL AESPAC
BL ASMIMEXPR
CMP R0,#1
BHI ERASS2
ORR R1,R1,R0,LSL#9
ADRL R14,CASMICHK
B AESPAC
CASMSETEND
ORR R1,R1,#&10000
BL AESPAC
......
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