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.
*
*/
#define Module_MajorVersion_CMHG 2.84
#define Module_MajorVersion_CMHG 2.85
#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_Version 284
#define Module_MajorVersion "2.85"
#define Module_Version 285
#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_FullVersion "2.84"
#define Module_HelpVersion "2.84 (02 Nov 2019)"
#define Module_LibraryVersionInfo "2:84"
#define Module_FullVersion "2.85"
#define Module_HelpVersion "2.85 (09 Nov 2019)"
#define Module_LibraryVersionInfo "2:85"
......@@ -717,21 +717,8 @@ $label mymsr $cond, $s, $op, , $sabug
;*****************************************************
MACRO
$label mymrs $cond, $rd, $psrs
$label
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
$label MRS$cond $rd, $psrs
ASSERT $rd <> 15
DCI Cond_$cond :OR: 2_00000001000011110000000000000000 :OR: psrtype :OR: ($rd :SHL: 12)
MEND
; ****************************************************
......@@ -751,82 +738,18 @@ psrtype SETA 1 :SHL: 22
MACRO
$label mymsr $cond, $psrl, $op2a, $op2b, $sabug
$label
LCLA psrtype
LCLS op2as
LCLA op
LCLA shift
LCLS s
s SETS "$psrl"
[ s:RIGHT:4 = "_ctl" :LOR: s:RIGHT:4 = "_flg"
! 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)
LCLS psr
psr SETS :LOWERCASE:"$psrl"
LCLL ctl
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"
[ "$op2b" = ""
MSR$cond $psr, $op2a
|
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
[ "$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)
[ StrongARM_MSR_bug :LAND: "$sabug" <> "safe" :LAND: "$cond" <> "AL" :LAND: "$cond" <> "" :LAND: psr:LEFT:4 = "cpsr" :LAND: ctl
[ "$sabug" <> "unsafe"
! 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