diff options
author | Ulrich Weigand <ulrich.weigand@de.ibm.com> | 2016-12-02 18:24:16 +0000 |
---|---|---|
committer | Ulrich Weigand <ulrich.weigand@de.ibm.com> | 2016-12-02 18:24:16 +0000 |
commit | 612d24badf8cbd1421898956b38acf8b283457b4 (patch) | |
tree | 57c30fdbd410c3b08e565962ea96b5ede545484b /llvm/lib/Target/SystemZ/SystemZInstrFormats.td | |
parent | 1c5a5c42de03aefaad2b78c6eabb36f8b1519f40 (diff) | |
download | bcm5719-llvm-612d24badf8cbd1421898956b38acf8b283457b4.tar.gz bcm5719-llvm-612d24badf8cbd1421898956b38acf8b283457b4.zip |
[SystemZ] Support remaining atomic instructions
Add assembler support for all atomic instructions that weren't already
supported. Some of those could be used to implement codegen for 128-bit
atomic operations, but this isn't done here yet.
llvm-svn: 288526
Diffstat (limited to 'llvm/lib/Target/SystemZ/SystemZInstrFormats.td')
-rw-r--r-- | llvm/lib/Target/SystemZ/SystemZInstrFormats.td | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/llvm/lib/Target/SystemZ/SystemZInstrFormats.td b/llvm/lib/Target/SystemZ/SystemZInstrFormats.td index 17dcd3b37bf..c727f486087 100644 --- a/llvm/lib/Target/SystemZ/SystemZInstrFormats.td +++ b/llvm/lib/Target/SystemZ/SystemZInstrFormats.td @@ -833,6 +833,23 @@ class InstSSd<bits<8> op, dag outs, dag ins, string asmstr, list<dag> pattern> let Inst{15-0} = BD2; } +class InstSSe<bits<8> op, dag outs, dag ins, string asmstr, list<dag> pattern> + : InstSystemZ<6, outs, ins, asmstr, pattern> { + field bits<48> Inst; + field bits<48> SoftFail = 0; + + bits<4> R1; + bits<16> BD2; + bits<4> R3; + bits<16> BD4; + + let Inst{47-40} = op; + let Inst{39-36} = R1; + let Inst{35-32} = R3; + let Inst{31-16} = BD2; + let Inst{15-0} = BD4; +} + class InstSSE<bits<16> op, dag outs, dag ins, string asmstr, list<dag> pattern> : InstSystemZ<6, outs, ins, asmstr, pattern> { field bits<48> Inst; @@ -2872,6 +2889,12 @@ multiclass BinarySIPair<string mnemonic, bits<8> siOpcode, } } +class BinarySSF<string mnemonic, bits<12> opcode, RegisterOperand cls> + : InstSSF<opcode, (outs cls:$R3), (ins bdaddr12pair:$BD1, bdaddr12pair:$BD2), + mnemonic#"\t$R3, $BD1, $BD2", []> { + let mayLoad = 1; +} + class BinaryVRIb<string mnemonic, bits<16> opcode, SDPatternOperator operator, TypedReg tr, bits<4> type> : InstVRIb<opcode, (outs tr.op:$V1), (ins imm32zx8:$I2, imm32zx8:$I3), @@ -3611,6 +3634,12 @@ multiclass QuaternaryOptVRRdSPairGeneric<string mnemonic, bits<16> opcode> { VR128:$V4, imm32zx4:$M5, 0)>; } +class SideEffectQuaternarySSe<string mnemonic, bits<8> opcode, + RegisterOperand cls> + : InstSSe<opcode, (outs), + (ins cls:$R1, bdaddr12only:$BD2, cls:$R3, bdaddr12only:$BD4), + mnemonic#"\t$R1, $BD2, $R3, $BD4", []>; + class LoadAndOpRSY<string mnemonic, bits<16> opcode, SDPatternOperator operator, RegisterOperand cls, AddressingMode mode = bdaddr20only> : InstRSYa<opcode, (outs cls:$R1), (ins cls:$R3, mode:$BD2), |