Commit 3103a302 authored by Timothy E Baldwin's avatar Timothy E Baldwin Committed by ROOL

Change mymrs and mymsr from Generic32 to use MRS and MSR

Version 2.85. Tagged as 'HdrSrc-2_85'
parent a381d6ee
/* (2.84) /* (2.85)
* *
* This file is automatically maintained by srccommit, do not edit manually. * This file is automatically maintained by srccommit, do not edit manually.
* *
*/ */
#define Module_MajorVersion_CMHG 2.84 #define Module_MajorVersion_CMHG 2.85
#define Module_MinorVersion_CMHG #define Module_MinorVersion_CMHG
#define Module_Date_CMHG 02 Nov 2019 #define Module_Date_CMHG 09 Nov 2019
#define Module_MajorVersion "2.84" #define Module_MajorVersion "2.85"
#define Module_Version 284 #define Module_Version 285
#define Module_MinorVersion "" #define Module_MinorVersion ""
#define Module_Date "02 Nov 2019" #define Module_Date "09 Nov 2019"
#define Module_ApplicationDate "02-Nov-19" #define Module_ApplicationDate "09-Nov-19"
#define Module_ComponentName "HdrSrc" #define Module_ComponentName "HdrSrc"
#define Module_FullVersion "2.84" #define Module_FullVersion "2.85"
#define Module_HelpVersion "2.84 (02 Nov 2019)" #define Module_HelpVersion "2.85 (09 Nov 2019)"
#define Module_LibraryVersionInfo "2:84" #define Module_LibraryVersionInfo "2:85"
...@@ -717,21 +717,8 @@ $label mymsr $cond, $s, $op, , $sabug ...@@ -717,21 +717,8 @@ $label mymsr $cond, $s, $op, , $sabug
;***************************************************** ;*****************************************************
MACRO MACRO
$label mymrs $cond, $rd, $psrs $label mymrs $cond, $rd, $psrs
$label $label MRS$cond $rd, $psrs
LCLA psrtype
psrtype SETA -1
[ "$psrs" = "CPSR_all" :LOR: "$psrs" = "SPSR_all"
! 0, "Deprecated form of PSR field specifier used (use no suffix)"
]
[ "$psrs" = "CPSR" :LOR: "$psrs" = "CPSR_all"
psrtype SETA 0 :SHL: 22
]
[ "$psrs" = "SPSR" :LOR: "$psrs" = "SPSR_all"
psrtype SETA 1 :SHL: 22
]
ASSERT psrtype <> -1
ASSERT $rd <> 15 ASSERT $rd <> 15
DCI Cond_$cond :OR: 2_00000001000011110000000000000000 :OR: psrtype :OR: ($rd :SHL: 12)
MEND MEND
; **************************************************** ; ****************************************************
...@@ -751,82 +738,18 @@ psrtype SETA 1 :SHL: 22 ...@@ -751,82 +738,18 @@ psrtype SETA 1 :SHL: 22
MACRO MACRO
$label mymsr $cond, $psrl, $op2a, $op2b, $sabug $label mymsr $cond, $psrl, $op2a, $op2b, $sabug
$label $label
LCLA psrtype LCLS psr
LCLS op2as psr SETS :LOWERCASE:"$psrl"
LCLA op LCLL ctl
LCLA shift ctl SETL psr:RIGHT:4 = "_all" :LOR: psr:RIGHT:3 = "psr" :LOR: psr:RIGHT:4:LEFT:1 = "c" :LOR: psr:RIGHT:3:LEFT:1 = "c" :LOR: psr:RIGHT:2:LEFT:1 = "c" :LOR: psr:RIGHT:1 = "c"
LCLS s
s SETS "$psrl" [ "$op2b" = ""
[ s:RIGHT:4 = "_ctl" :LOR: s:RIGHT:4 = "_flg" MSR$cond $psr, $op2a
! 0, "Deprecated form of PSR field specifier used (use _cxsf)"
s SETS s:LEFT:(:LEN:s-2)
]
[ s:RIGHT:4 = "_all"
! 0, "Deprecated form of PSR field specifier used (use _cxsf)"
s SETS s:LEFT:(:LEN:s-3) :CC: "cf"
]
[ s:RIGHT:3 = "PSR"
! 0, "Deprecated form of PSR field specifier used (use _cxsf)"
s SETS s:CC:"_cf"
]
psrtype SETA 0
[ s:RIGHT:1 = "f"
psrtype SETA psrtype :OR: (1:SHL:19)
s SETS s :LEFT: (:LEN:s-1)
]
[ s:RIGHT:1 = "s"
psrtype SETA psrtype :OR: (1:SHL:18)
s SETS s :LEFT: (:LEN:s-1)
]
[ s:RIGHT:1 = "x"
psrtype SETA psrtype :OR: (1:SHL:17)
s SETS s :LEFT: (:LEN:s-1)
]
[ s:RIGHT:1 = "c"
psrtype SETA psrtype :OR: (1:SHL:16)
s SETS s :LEFT: (:LEN:s-1)
]
ASSERT s = "CPSR_" :LOR: s = "SPSR_"
[ s = "SPSR_"
psrtype SETA psrtype :OR: (1:SHL:22)
| |
psrtype SETA psrtype :OR: (0:SHL:22) MSR$cond $psr, $op2a, $op2b
] ]
[ (psrtype :AND: (15:SHL:16)) = 0
! 0, "MSR that sets no fields"
]
[ ("$op2a" :LEFT: 1) = "#"
; Immediate operand
op2as SETS "$op2a" :RIGHT: ((:LEN: "$op2a")-1)
op SETA $op2as
[ "$op2b" = ""
; Rotate not specified in immediate operand
shift SETA 0
WHILE (op :AND: &FFFFFF00)<>0 :LAND: shift<16
op SETA ((op:SHR:30):AND:3):OR:(op:SHL:2)
shift SETA shift + 1
WEND
ASSERT (op :AND: &FFFFFF00)=0
|
; Rotate of immediate operand specified explicitly
ASSERT (($op2b):AND:&FFFFFFE1)=0
shift SETA ($opt2b):SHR:1
]
op SETA (shift :SHL: 8) :OR: op :OR: (1:SHL:25)
|
; Not an immediate operand [ StrongARM_MSR_bug :LAND: "$sabug" <> "safe" :LAND: "$cond" <> "AL" :LAND: "$cond" <> "" :LAND: psr:LEFT:4 = "cpsr" :LAND: ctl
[ "$op2b" = ""
; Unshifted register
op SETA ($op2a) :OR: (0:SHL:25)
|
! 1, "Shifted register not yet implemented in this macro!"
]
]
DCI Cond_$cond :OR: 2_00000001001000001111000000000000 :OR: op :OR: psrtype
[ StrongARM_MSR_bug :LAND: "$sabug" <> "safe" :LAND: "$cond" <> "AL" :LAND: "$cond" <> "" :LAND: ((psrtype :AND: &410000) = &10000)
[ "$sabug" <> "unsafe" [ "$sabug" <> "unsafe"
! 0, "mymsr inserting NOP for StrongARM MSR CPSR_c bug", 1 ! 0, "mymsr inserting NOP for StrongARM MSR CPSR_c bug", 1
] ]
......
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