mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-23 20:34:58 +00:00
ARM mode LDREX*/STREX* binary encodings.
llvm-svn: 117695
This commit is contained in:
parent
2119e59322
commit
162e3345fb
@ -348,19 +348,29 @@ class AIldrex<bits<2> opcod, dag oops, dag iops, InstrItinClass itin,
|
||||
string opc, string asm, list<dag> pattern>
|
||||
: I<oops, iops, AddrModeNone, Size4Bytes, IndexModeNone, LdStExFrm, itin,
|
||||
opc, asm, "", pattern> {
|
||||
bits<4> Rt;
|
||||
bits<4> Rn;
|
||||
let Inst{27-23} = 0b00011;
|
||||
let Inst{22-21} = opcod;
|
||||
let Inst{20} = 1;
|
||||
let Inst{19-16} = Rn;
|
||||
let Inst{15-12} = Rt;
|
||||
let Inst{11-0} = 0b111110011111;
|
||||
}
|
||||
class AIstrex<bits<2> opcod, dag oops, dag iops, InstrItinClass itin,
|
||||
string opc, string asm, list<dag> pattern>
|
||||
: I<oops, iops, AddrModeNone, Size4Bytes, IndexModeNone, LdStExFrm, itin,
|
||||
opc, asm, "", pattern> {
|
||||
bits<4> Rd;
|
||||
bits<4> Rt;
|
||||
bits<4> Rn;
|
||||
let Inst{27-23} = 0b00011;
|
||||
let Inst{22-21} = opcod;
|
||||
let Inst{20} = 0;
|
||||
let Inst{19-16} = Rn;
|
||||
let Inst{15-12} = Rd;
|
||||
let Inst{11-4} = 0b11111001;
|
||||
let Inst{3-0} = Rt;
|
||||
}
|
||||
|
||||
// addrmode1 instructions
|
||||
|
@ -3028,38 +3028,38 @@ let usesCustomInserter = 1 in {
|
||||
}
|
||||
|
||||
let mayLoad = 1 in {
|
||||
def LDREXB : AIldrex<0b10, (outs GPR:$dest), (ins GPR:$ptr), NoItinerary,
|
||||
"ldrexb", "\t$dest, [$ptr]",
|
||||
def LDREXB : AIldrex<0b10, (outs GPR:$Rt), (ins GPR:$Rn), NoItinerary,
|
||||
"ldrexb", "\t$Rt, [$Rn]",
|
||||
[]>;
|
||||
def LDREXH : AIldrex<0b11, (outs GPR:$dest), (ins GPR:$ptr), NoItinerary,
|
||||
"ldrexh", "\t$dest, [$ptr]",
|
||||
def LDREXH : AIldrex<0b11, (outs GPR:$Rt), (ins GPR:$Rn), NoItinerary,
|
||||
"ldrexh", "\t$Rt, [$Rn]",
|
||||
[]>;
|
||||
def LDREX : AIldrex<0b00, (outs GPR:$dest), (ins GPR:$ptr), NoItinerary,
|
||||
"ldrex", "\t$dest, [$ptr]",
|
||||
def LDREX : AIldrex<0b00, (outs GPR:$Rt), (ins GPR:$Rn), NoItinerary,
|
||||
"ldrex", "\t$Rt, [$Rn]",
|
||||
[]>;
|
||||
def LDREXD : AIldrex<0b01, (outs GPR:$dest, GPR:$dest2), (ins GPR:$ptr),
|
||||
def LDREXD : AIldrex<0b01, (outs GPR:$Rt, GPR:$Rt2), (ins GPR:$Rn),
|
||||
NoItinerary,
|
||||
"ldrexd", "\t$dest, $dest2, [$ptr]",
|
||||
"ldrexd", "\t$Rt, $Rt2, [$Rn]",
|
||||
[]>;
|
||||
}
|
||||
|
||||
let mayStore = 1, Constraints = "@earlyclobber $success" in {
|
||||
def STREXB : AIstrex<0b10, (outs GPR:$success), (ins GPR:$src, GPR:$ptr),
|
||||
let mayStore = 1, Constraints = "@earlyclobber $Rd" in {
|
||||
def STREXB : AIstrex<0b10, (outs GPR:$Rd), (ins GPR:$src, GPR:$Rn),
|
||||
NoItinerary,
|
||||
"strexb", "\t$success, $src, [$ptr]",
|
||||
"strexb", "\t$Rd, $src, [$Rn]",
|
||||
[]>;
|
||||
def STREXH : AIstrex<0b11, (outs GPR:$success), (ins GPR:$src, GPR:$ptr),
|
||||
def STREXH : AIstrex<0b11, (outs GPR:$Rd), (ins GPR:$Rt, GPR:$Rn),
|
||||
NoItinerary,
|
||||
"strexh", "\t$success, $src, [$ptr]",
|
||||
"strexh", "\t$Rd, $Rt, [$Rn]",
|
||||
[]>;
|
||||
def STREX : AIstrex<0b00, (outs GPR:$success), (ins GPR:$src, GPR:$ptr),
|
||||
def STREX : AIstrex<0b00, (outs GPR:$Rd), (ins GPR:$Rt, GPR:$Rn),
|
||||
NoItinerary,
|
||||
"strex", "\t$success, $src, [$ptr]",
|
||||
"strex", "\t$Rd, $Rt, [$Rn]",
|
||||
[]>;
|
||||
def STREXD : AIstrex<0b01, (outs GPR:$success),
|
||||
(ins GPR:$src, GPR:$src2, GPR:$ptr),
|
||||
def STREXD : AIstrex<0b01, (outs GPR:$Rd),
|
||||
(ins GPR:$Rt, GPR:$Rt2, GPR:$Rn),
|
||||
NoItinerary,
|
||||
"strexd", "\t$success, $src, $src2, [$ptr]",
|
||||
"strexd", "\t$Rd, $Rt, $Rt2, [$Rn]",
|
||||
[]>;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user