From 2d664abbfca8b9fa3d99e8a2f74bd52faf007f12 Mon Sep 17 00:00:00 2001 From: Richard Sandiford Date: Wed, 29 May 2013 11:58:52 +0000 Subject: [PATCH] [SystemZ] Immediate compare-and-branch support This patch adds support for the CIJ and CGIJ instructions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182846 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/SystemZ/README.txt | 4 - lib/Target/SystemZ/SystemZISelLowering.cpp | 3 +- lib/Target/SystemZ/SystemZInstrFormats.td | 18 + lib/Target/SystemZ/SystemZInstrInfo.cpp | 9 +- lib/Target/SystemZ/SystemZInstrInfo.h | 4 +- lib/Target/SystemZ/SystemZInstrInfo.td | 21 +- lib/Target/SystemZ/SystemZLongBranch.cpp | 11 + test/CodeGen/SystemZ/int-cmp-09.ll | 91 +++- test/CodeGen/SystemZ/int-cmp-11.ll | 91 +++- test/CodeGen/SystemZ/int-cmp-13.ll | 96 ++-- test/CodeGen/SystemZ/int-cmp-14.ll | 96 ++-- test/MC/Disassembler/SystemZ/insns-pcrel.txt | 192 ++++++++ test/MC/SystemZ/insn-bad.s | 60 +++ test/MC/SystemZ/insn-good.s | 466 +++++++++++++++++++ 14 files changed, 1051 insertions(+), 111 deletions(-) diff --git a/lib/Target/SystemZ/README.txt b/lib/Target/SystemZ/README.txt index ac0e1383271..55e9fc0592d 100644 --- a/lib/Target/SystemZ/README.txt +++ b/lib/Target/SystemZ/README.txt @@ -56,10 +56,6 @@ and conditional returns. -- -We don't use the combined COMPARE AND BRANCH instructions. - --- - We don't use the condition code results of anything except comparisons. Implementing this may need something more finely grained than the z_cmp diff --git a/lib/Target/SystemZ/SystemZISelLowering.cpp b/lib/Target/SystemZ/SystemZISelLowering.cpp index 03a6da6dc42..ae520e1f2a8 100644 --- a/lib/Target/SystemZ/SystemZISelLowering.cpp +++ b/lib/Target/SystemZ/SystemZISelLowering.cpp @@ -1624,7 +1624,8 @@ convertPrevCompareToBranch(MachineBasicBlock *MBB, while (Compare->isDebugValue()); const SystemZInstrInfo *TII = TM.getInstrInfo(); - unsigned FusedOpcode = TII->getCompareAndBranch(Compare->getOpcode()); + unsigned FusedOpcode = TII->getCompareAndBranch(Compare->getOpcode(), + Compare); if (!FusedOpcode) return false; diff --git a/lib/Target/SystemZ/SystemZInstrFormats.td b/lib/Target/SystemZ/SystemZInstrFormats.td index c52e2a29f3c..ad050fd10cc 100644 --- a/lib/Target/SystemZ/SystemZInstrFormats.td +++ b/lib/Target/SystemZ/SystemZInstrFormats.td @@ -129,6 +129,24 @@ class InstRIEb op, dag outs, dag ins, string asmstr, list pattern> let Inst{7-0} = op{7-0}; } +class InstRIEc op, dag outs, dag ins, string asmstr, list pattern> + : InstSystemZ<6, outs, ins, asmstr, pattern> { + field bits<48> Inst; + field bits<48> SoftFail = 0; + + bits<4> R1; + bits<8> I2; + bits<4> M3; + bits<16> RI4; + + let Inst{47-40} = op{15-8}; + let Inst{39-36} = R1; + let Inst{35-32} = M3; + let Inst{31-16} = RI4; + let Inst{15-8} = I2; + let Inst{7-0} = op{7-0}; +} + class InstRIEf op, dag outs, dag ins, string asmstr, list pattern> : InstSystemZ<6, outs, ins, asmstr, pattern> { field bits<48> Inst; diff --git a/lib/Target/SystemZ/SystemZInstrInfo.cpp b/lib/Target/SystemZ/SystemZInstrInfo.cpp index dcce5a7b7f7..5339bf14ac7 100644 --- a/lib/Target/SystemZ/SystemZInstrInfo.cpp +++ b/lib/Target/SystemZ/SystemZInstrInfo.cpp @@ -373,10 +373,12 @@ SystemZInstrInfo::getBranchInfo(const MachineInstr *MI) const { return SystemZII::Branch(SystemZII::BranchNormal, MI->getOperand(0).getImm(), &MI->getOperand(1)); + case SystemZ::CIJ: case SystemZ::CRJ: return SystemZII::Branch(SystemZII::BranchC, MI->getOperand(2).getImm(), &MI->getOperand(3)); + case SystemZ::CGIJ: case SystemZ::CGRJ: return SystemZII::Branch(SystemZII::BranchCG, MI->getOperand(2).getImm(), &MI->getOperand(3)); @@ -440,12 +442,17 @@ unsigned SystemZInstrInfo::getOpcodeForOffset(unsigned Opcode, return 0; } -unsigned SystemZInstrInfo::getCompareAndBranch(unsigned Opcode) const { +unsigned SystemZInstrInfo::getCompareAndBranch(unsigned Opcode, + const MachineInstr *MI) const { switch (Opcode) { case SystemZ::CR: return SystemZ::CRJ; case SystemZ::CGR: return SystemZ::CGRJ; + case SystemZ::CHI: + return MI && isInt<8>(MI->getOperand(1).getImm()) ? SystemZ::CIJ : 0; + case SystemZ::CGHI: + return MI && isInt<8>(MI->getOperand(1).getImm()) ? SystemZ::CGIJ : 0; default: return 0; } diff --git a/lib/Target/SystemZ/SystemZInstrInfo.h b/lib/Target/SystemZ/SystemZInstrInfo.h index e4a984025f9..d6980f71713 100644 --- a/lib/Target/SystemZ/SystemZInstrInfo.h +++ b/lib/Target/SystemZ/SystemZInstrInfo.h @@ -143,7 +143,9 @@ public: // If Opcode is a COMPARE opcode for which an associated COMPARE AND // BRANCH exists, return the opcode for the latter, otherwise return 0. - unsigned getCompareAndBranch(unsigned Opcode) const; + // MI, if nonnull, is the compare instruction. + unsigned getCompareAndBranch(unsigned Opcode, + const MachineInstr *MI = 0) const; // Emit code before MBBI in MI to move immediate value Value into // physical register Reg. diff --git a/lib/Target/SystemZ/SystemZInstrInfo.td b/lib/Target/SystemZ/SystemZInstrInfo.td index bc3997b857b..062266bb485 100644 --- a/lib/Target/SystemZ/SystemZInstrInfo.td +++ b/lib/Target/SystemZ/SystemZInstrInfo.td @@ -87,10 +87,16 @@ multiclass CompareBranches { let isBranch = 1, isTerminator = 1, Defs = [CC] in { def RJ : InstRIEb<0xEC76, (outs), (ins GR32:$R1, GR32:$R2, ccmask:$M3, brtarget16:$RI4), - "crj"#pos1#"\t$R1, $R2, "#pos2#"$RI4", []>; + "crj"##pos1##"\t$R1, $R2, "##pos2##"$RI4", []>; def GRJ : InstRIEb<0xEC64, (outs), (ins GR64:$R1, GR64:$R2, ccmask:$M3, brtarget16:$RI4), - "cgrj"#pos1#"\t$R1, $R2, "#pos2#"$RI4", []>; + "cgrj"##pos1##"\t$R1, $R2, "##pos2##"$RI4", []>; + def IJ : InstRIEc<0xEC7E, (outs), (ins GR32:$R1, imm32sx8:$I2, ccmask:$M3, + brtarget16:$RI4), + "cij"##pos1##"\t$R1, $I2, "##pos2##"$RI4", []>; + def GIJ : InstRIEc<0xEC7C, (outs), (ins GR64:$R1, imm64sx8:$I2, ccmask:$M3, + brtarget16:$RI4), + "cgij"##pos1##"\t$R1, $I2, "##pos2##"$RI4", []>; } } let isCodeGenOnly = 1 in @@ -101,9 +107,10 @@ defm AsmC : CompareBranches; // (integer or floating-point) multiclass CondExtendedMnemonic ccmask, string name> { let R1 = ccmask in { - def "" : InstRI<0xA74, (outs), (ins brtarget16:$I2), "j"#name#"\t$I2", []>; + def "" : InstRI<0xA74, (outs), (ins brtarget16:$I2), + "j"##name##"\t$I2", []>; def L : InstRIL<0xC04, (outs), (ins brtarget32:$I2), - "jg"#name#"\t$I2", []>; + "jg"##name##"\t$I2", []>; } } defm AsmJO : CondExtendedMnemonic<1, "o">; @@ -136,6 +143,12 @@ multiclass IntCondExtendedMnemonicA ccmask, string name> { def CGR : InstRIEb<0xEC64, (outs), (ins GR64:$R1, GR64:$R2, brtarget16:$RI4), "cgrj"##name##"\t$R1, $R2, $RI4", []>; + def CI : InstRIEc<0xEC7E, (outs), (ins GR32:$R1, imm32sx8:$I2, + brtarget16:$RI4), + "cij"##name##"\t$R1, $I2, $RI4", []>; + def CGI : InstRIEc<0xEC7C, (outs), (ins GR64:$R1, imm64sx8:$I2, + brtarget16:$RI4), + "cgij"##name##"\t$R1, $I2, $RI4", []>; } } multiclass IntCondExtendedMnemonic ccmask, string name1, string name2> diff --git a/lib/Target/SystemZ/SystemZLongBranch.cpp b/lib/Target/SystemZ/SystemZLongBranch.cpp index 2fc85f50f0f..24afb072ae8 100644 --- a/lib/Target/SystemZ/SystemZLongBranch.cpp +++ b/lib/Target/SystemZ/SystemZLongBranch.cpp @@ -229,6 +229,11 @@ TerminatorInfo SystemZLongBranch::describeTerminator(MachineInstr *MI) { // Relaxes to a CGR/BRCL sequence, which is 4 bytes longer. Terminator.ExtraRelaxSize = 4; break; + case SystemZ::CIJ: + case SystemZ::CGIJ: + // Relaxes to a C(G)HI/BRCL sequence, which is 4 bytes longer. + Terminator.ExtraRelaxSize = 4; + break; default: llvm_unreachable("Unrecognized branch instruction"); } @@ -361,6 +366,12 @@ void SystemZLongBranch::relaxBranch(TerminatorInfo &Terminator) { case SystemZ::CGRJ: splitCompareBranch(Branch, SystemZ::CGR); break; + case SystemZ::CIJ: + splitCompareBranch(Branch, SystemZ::CHI); + break; + case SystemZ::CGIJ: + splitCompareBranch(Branch, SystemZ::CGHI); + break; default: llvm_unreachable("Unrecognized branch"); } diff --git a/test/CodeGen/SystemZ/int-cmp-09.ll b/test/CodeGen/SystemZ/int-cmp-09.ll index 06ebee250bc..8fb0e7c41a4 100644 --- a/test/CodeGen/SystemZ/int-cmp-09.ll +++ b/test/CodeGen/SystemZ/int-cmp-09.ll @@ -5,8 +5,7 @@ ; Check comparisons with 0. define double @f1(double %a, double %b, i32 %i1) { ; CHECK: f1: -; CHECK: chi %r2, 0 -; CHECK-NEXT: jl +; CHECK: cijl %r2, 0 ; CHECK: ldr %f0, %f2 ; CHECK: br %r14 %cond = icmp slt i32 %i1, 0 @@ -17,8 +16,7 @@ define double @f1(double %a, double %b, i32 %i1) { ; Check comparisons with 1. define double @f2(double %a, double %b, i32 %i1) { ; CHECK: f2: -; CHECK: chi %r2, 1 -; CHECK-NEXT: jl +; CHECK: cijl %r2, 1 ; CHECK: ldr %f0, %f2 ; CHECK: br %r14 %cond = icmp slt i32 %i1, 1 @@ -26,9 +24,32 @@ define double @f2(double %a, double %b, i32 %i1) { ret double %res } -; Check the high end of the CHI range. +; Check the high end of the CIJ range. define double @f3(double %a, double %b, i32 %i1) { ; CHECK: f3: +; CHECK: cijl %r2, 127 +; CHECK: ldr %f0, %f2 +; CHECK: br %r14 + %cond = icmp slt i32 %i1, 127 + %res = select i1 %cond, double %a, double %b + ret double %res +} + +; Check the next value up, which must use CHI instead. +define double @f4(double %a, double %b, i32 %i1) { +; CHECK: f4: +; CHECK: chi %r2, 128 +; CHECK-NEXT: jl +; CHECK: ldr %f0, %f2 +; CHECK: br %r14 + %cond = icmp slt i32 %i1, 128 + %res = select i1 %cond, double %a, double %b + ret double %res +} + +; Check the high end of the CHI range. +define double @f5(double %a, double %b, i32 %i1) { +; CHECK: f5: ; CHECK: chi %r2, 32767 ; CHECK-NEXT: jl ; CHECK: ldr %f0, %f2 @@ -39,8 +60,8 @@ define double @f3(double %a, double %b, i32 %i1) { } ; Check the next value up, which must use CFI. -define double @f4(double %a, double %b, i32 %i1) { -; CHECK: f4: +define double @f6(double %a, double %b, i32 %i1) { +; CHECK: f6: ; CHECK: cfi %r2, 32768 ; CHECK-NEXT: jl ; CHECK: ldr %f0, %f2 @@ -51,8 +72,8 @@ define double @f4(double %a, double %b, i32 %i1) { } ; Check the high end of the signed 32-bit range. -define double @f5(double %a, double %b, i32 %i1) { -; CHECK: f5: +define double @f7(double %a, double %b, i32 %i1) { +; CHECK: f7: ; CHECK: cfi %r2, 2147483647 ; CHECK-NEXT: je ; CHECK: ldr %f0, %f2 @@ -63,8 +84,8 @@ define double @f5(double %a, double %b, i32 %i1) { } ; Check the next value up, which should be treated as a negative value. -define double @f6(double %a, double %b, i32 %i1) { -; CHECK: f6: +define double @f8(double %a, double %b, i32 %i1) { +; CHECK: f8: ; CHECK: cfi %r2, -2147483648 ; CHECK-NEXT: je ; CHECK: ldr %f0, %f2 @@ -74,11 +95,10 @@ define double @f6(double %a, double %b, i32 %i1) { ret double %res } -; Check the high end of the negative CHI range. -define double @f7(double %a, double %b, i32 %i1) { -; CHECK: f7: -; CHECK: chi %r2, -1 -; CHECK-NEXT: jl +; Check the high end of the negative CIJ range. +define double @f9(double %a, double %b, i32 %i1) { +; CHECK: f9: +; CHECK: cijl %r2, -1 ; CHECK: ldr %f0, %f2 ; CHECK: br %r14 %cond = icmp slt i32 %i1, -1 @@ -86,9 +106,32 @@ define double @f7(double %a, double %b, i32 %i1) { ret double %res } +; Check the low end of the CIJ range. +define double @f10(double %a, double %b, i32 %i1) { +; CHECK: f10: +; CHECK: cijl %r2, -128 +; CHECK: ldr %f0, %f2 +; CHECK: br %r14 + %cond = icmp slt i32 %i1, -128 + %res = select i1 %cond, double %a, double %b + ret double %res +} + +; Check the next value down, which must use CHI instead. +define double @f11(double %a, double %b, i32 %i1) { +; CHECK: f11: +; CHECK: chi %r2, -129 +; CHECK-NEXT: jl +; CHECK: ldr %f0, %f2 +; CHECK: br %r14 + %cond = icmp slt i32 %i1, -129 + %res = select i1 %cond, double %a, double %b + ret double %res +} + ; Check the low end of the CHI range. -define double @f8(double %a, double %b, i32 %i1) { -; CHECK: f8: +define double @f12(double %a, double %b, i32 %i1) { +; CHECK: f12: ; CHECK: chi %r2, -32768 ; CHECK-NEXT: jl ; CHECK: ldr %f0, %f2 @@ -99,8 +142,8 @@ define double @f8(double %a, double %b, i32 %i1) { } ; Check the next value down, which must use CFI instead. -define double @f9(double %a, double %b, i32 %i1) { -; CHECK: f9: +define double @f13(double %a, double %b, i32 %i1) { +; CHECK: f13: ; CHECK: cfi %r2, -32769 ; CHECK-NEXT: jl ; CHECK: ldr %f0, %f2 @@ -111,8 +154,8 @@ define double @f9(double %a, double %b, i32 %i1) { } ; Check the low end of the signed 32-bit range. -define double @f10(double %a, double %b, i32 %i1) { -; CHECK: f10: +define double @f14(double %a, double %b, i32 %i1) { +; CHECK: f14: ; CHECK: cfi %r2, -2147483648 ; CHECK-NEXT: je ; CHECK: ldr %f0, %f2 @@ -123,8 +166,8 @@ define double @f10(double %a, double %b, i32 %i1) { } ; Check the next value down, which should be treated as a positive value. -define double @f11(double %a, double %b, i32 %i1) { -; CHECK: f11: +define double @f15(double %a, double %b, i32 %i1) { +; CHECK: f15: ; CHECK: cfi %r2, 2147483647 ; CHECK-NEXT: je ; CHECK: ldr %f0, %f2 diff --git a/test/CodeGen/SystemZ/int-cmp-11.ll b/test/CodeGen/SystemZ/int-cmp-11.ll index 64386f05d1e..a0f598e9d0f 100644 --- a/test/CodeGen/SystemZ/int-cmp-11.ll +++ b/test/CodeGen/SystemZ/int-cmp-11.ll @@ -5,8 +5,7 @@ ; Check comparisons with 0. define double @f1(double %a, double %b, i64 %i1) { ; CHECK: f1: -; CHECK: cghi %r2, 0 -; CHECK-NEXT: jl +; CHECK: cgijl %r2, 0 ; CHECK: ldr %f0, %f2 ; CHECK: br %r14 %cond = icmp slt i64 %i1, 0 @@ -17,8 +16,7 @@ define double @f1(double %a, double %b, i64 %i1) { ; Check comparisons with 1. define double @f2(double %a, double %b, i64 %i1) { ; CHECK: f2: -; CHECK: cghi %r2, 1 -; CHECK-NEXT: jl +; CHECK: cgijl %r2, 1 ; CHECK: ldr %f0, %f2 ; CHECK: br %r14 %cond = icmp slt i64 %i1, 1 @@ -26,9 +24,32 @@ define double @f2(double %a, double %b, i64 %i1) { ret double %res } -; Check the high end of the CGHI range. +; Check the high end of the CGIJ range. define double @f3(double %a, double %b, i64 %i1) { ; CHECK: f3: +; CHECK: cgijl %r2, 127 +; CHECK: ldr %f0, %f2 +; CHECK: br %r14 + %cond = icmp slt i64 %i1, 127 + %res = select i1 %cond, double %a, double %b + ret double %res +} + +; Check the next value up, which must use CGHI instead. +define double @f4(double %a, double %b, i64 %i1) { +; CHECK: f4: +; CHECK: cghi %r2, 128 +; CHECK-NEXT: jl +; CHECK: ldr %f0, %f2 +; CHECK: br %r14 + %cond = icmp slt i64 %i1, 128 + %res = select i1 %cond, double %a, double %b + ret double %res +} + +; Check the high end of the CGHI range. +define double @f5(double %a, double %b, i64 %i1) { +; CHECK: f5: ; CHECK: cghi %r2, 32767 ; CHECK-NEXT: jl ; CHECK: ldr %f0, %f2 @@ -39,8 +60,8 @@ define double @f3(double %a, double %b, i64 %i1) { } ; Check the next value up, which must use CGFI. -define double @f4(double %a, double %b, i64 %i1) { -; CHECK: f4: +define double @f6(double %a, double %b, i64 %i1) { +; CHECK: f6: ; CHECK: cgfi %r2, 32768 ; CHECK-NEXT: jl ; CHECK: ldr %f0, %f2 @@ -51,8 +72,8 @@ define double @f4(double %a, double %b, i64 %i1) { } ; Check the high end of the CGFI range. -define double @f5(double %a, double %b, i64 %i1) { -; CHECK: f5: +define double @f7(double %a, double %b, i64 %i1) { +; CHECK: f7: ; CHECK: cgfi %r2, 2147483647 ; CHECK-NEXT: jl ; CHECK: ldr %f0, %f2 @@ -63,8 +84,8 @@ define double @f5(double %a, double %b, i64 %i1) { } ; Check the next value up, which must use register comparison. -define double @f6(double %a, double %b, i64 %i1) { -; CHECK: f6: +define double @f8(double %a, double %b, i64 %i1) { +; CHECK: f8: ; CHECK: cgrjl ; CHECK: ldr %f0, %f2 ; CHECK: br %r14 @@ -73,11 +94,10 @@ define double @f6(double %a, double %b, i64 %i1) { ret double %res } -; Check the high end of the negative CGHI range. -define double @f7(double %a, double %b, i64 %i1) { -; CHECK: f7: -; CHECK: cghi %r2, -1 -; CHECK-NEXT: jl +; Check the high end of the negative CGIJ range. +define double @f9(double %a, double %b, i64 %i1) { +; CHECK: f9: +; CHECK: cgijl %r2, -1 ; CHECK: ldr %f0, %f2 ; CHECK: br %r14 %cond = icmp slt i64 %i1, -1 @@ -85,9 +105,32 @@ define double @f7(double %a, double %b, i64 %i1) { ret double %res } +; Check the low end of the CGIJ range. +define double @f10(double %a, double %b, i64 %i1) { +; CHECK: f10: +; CHECK: cgijl %r2, -128 +; CHECK: ldr %f0, %f2 +; CHECK: br %r14 + %cond = icmp slt i64 %i1, -128 + %res = select i1 %cond, double %a, double %b + ret double %res +} + +; Check the next value down, which must use CGHI instead. +define double @f11(double %a, double %b, i64 %i1) { +; CHECK: f11: +; CHECK: cghi %r2, -129 +; CHECK-NEXT: jl +; CHECK: ldr %f0, %f2 +; CHECK: br %r14 + %cond = icmp slt i64 %i1, -129 + %res = select i1 %cond, double %a, double %b + ret double %res +} + ; Check the low end of the CGHI range. -define double @f8(double %a, double %b, i64 %i1) { -; CHECK: f8: +define double @f12(double %a, double %b, i64 %i1) { +; CHECK: f12: ; CHECK: cghi %r2, -32768 ; CHECK-NEXT: jl ; CHECK: ldr %f0, %f2 @@ -98,8 +141,8 @@ define double @f8(double %a, double %b, i64 %i1) { } ; Check the next value down, which must use CGFI instead. -define double @f9(double %a, double %b, i64 %i1) { -; CHECK: f9: +define double @f13(double %a, double %b, i64 %i1) { +; CHECK: f13: ; CHECK: cgfi %r2, -32769 ; CHECK-NEXT: jl ; CHECK: ldr %f0, %f2 @@ -110,8 +153,8 @@ define double @f9(double %a, double %b, i64 %i1) { } ; Check the low end of the CGFI range. -define double @f10(double %a, double %b, i64 %i1) { -; CHECK: f10: +define double @f14(double %a, double %b, i64 %i1) { +; CHECK: f14: ; CHECK: cgfi %r2, -2147483648 ; CHECK-NEXT: jl ; CHECK: ldr %f0, %f2 @@ -122,8 +165,8 @@ define double @f10(double %a, double %b, i64 %i1) { } ; Check the next value down, which must use register comparison. -define double @f11(double %a, double %b, i64 %i1) { -; CHECK: f11: +define double @f15(double %a, double %b, i64 %i1) { +; CHECK: f15: ; CHECK: cgrjl ; CHECK: ldr %f0, %f2 ; CHECK: br %r14 diff --git a/test/CodeGen/SystemZ/int-cmp-13.ll b/test/CodeGen/SystemZ/int-cmp-13.ll index aab95473a00..19bceecb626 100644 --- a/test/CodeGen/SystemZ/int-cmp-13.ll +++ b/test/CodeGen/SystemZ/int-cmp-13.ll @@ -5,8 +5,7 @@ ; Check comparisons with 0. define double @f1(double %a, double %b, i64 %i1) { ; CHECK: f1: -; CHECK: cghi %r2, 0 -; CHECK-NEXT: je +; CHECK: cgije %r2, 0 ; CHECK: ldr %f0, %f2 ; CHECK: br %r14 %cond = icmp eq i64 %i1, 0 @@ -14,9 +13,32 @@ define double @f1(double %a, double %b, i64 %i1) { ret double %res } -; Check the high end of the CGHI range. +; Check the high end of the CGIJ range. define double @f2(double %a, double %b, i64 %i1) { ; CHECK: f2: +; CHECK: cgije %r2, 127 +; CHECK: ldr %f0, %f2 +; CHECK: br %r14 + %cond = icmp eq i64 %i1, 127 + %res = select i1 %cond, double %a, double %b + ret double %res +} + +; Check the next value up, which must use CGHI instead. +define double @f3(double %a, double %b, i64 %i1) { +; CHECK: f3: +; CHECK: cghi %r2, 128 +; CHECK-NEXT: je +; CHECK: ldr %f0, %f2 +; CHECK: br %r14 + %cond = icmp eq i64 %i1, 128 + %res = select i1 %cond, double %a, double %b + ret double %res +} + +; Check the high end of the CGHI range. +define double @f4(double %a, double %b, i64 %i1) { +; CHECK: f4: ; CHECK: cghi %r2, 32767 ; CHECK-NEXT: je ; CHECK: ldr %f0, %f2 @@ -27,8 +49,8 @@ define double @f2(double %a, double %b, i64 %i1) { } ; Check the next value up, which must use CGFI. -define double @f3(double %a, double %b, i64 %i1) { -; CHECK: f3: +define double @f5(double %a, double %b, i64 %i1) { +; CHECK: f5: ; CHECK: cgfi %r2, 32768 ; CHECK-NEXT: je ; CHECK: ldr %f0, %f2 @@ -39,8 +61,8 @@ define double @f3(double %a, double %b, i64 %i1) { } ; Check the high end of the CGFI range. -define double @f4(double %a, double %b, i64 %i1) { -; CHECK: f4: +define double @f6(double %a, double %b, i64 %i1) { +; CHECK: f6: ; CHECK: cgfi %r2, 2147483647 ; CHECK-NEXT: je ; CHECK: ldr %f0, %f2 @@ -51,8 +73,8 @@ define double @f4(double %a, double %b, i64 %i1) { } ; Check the next value up, which should use CLGFI instead. -define double @f5(double %a, double %b, i64 %i1) { -; CHECK: f5: +define double @f7(double %a, double %b, i64 %i1) { +; CHECK: f7: ; CHECK: clgfi %r2, 2147483648 ; CHECK-NEXT: je ; CHECK: ldr %f0, %f2 @@ -63,8 +85,8 @@ define double @f5(double %a, double %b, i64 %i1) { } ; Check the high end of the CLGFI range. -define double @f6(double %a, double %b, i64 %i1) { -; CHECK: f6: +define double @f8(double %a, double %b, i64 %i1) { +; CHECK: f8: ; CHECK: clgfi %r2, 4294967295 ; CHECK-NEXT: je ; CHECK: ldr %f0, %f2 @@ -75,8 +97,8 @@ define double @f6(double %a, double %b, i64 %i1) { } ; Check the next value up, which must use a register comparison. -define double @f7(double %a, double %b, i64 %i1) { -; CHECK: f7: +define double @f9(double %a, double %b, i64 %i1) { +; CHECK: f9: ; CHECK: cgrje %r2, ; CHECK: ldr %f0, %f2 ; CHECK: br %r14 @@ -85,11 +107,10 @@ define double @f7(double %a, double %b, i64 %i1) { ret double %res } -; Check the high end of the negative CGHI range. -define double @f8(double %a, double %b, i64 %i1) { -; CHECK: f8: -; CHECK: cghi %r2, -1 -; CHECK-NEXT: je +; Check the high end of the negative CGIJ range. +define double @f10(double %a, double %b, i64 %i1) { +; CHECK: f10: +; CHECK: cgije %r2, -1 ; CHECK: ldr %f0, %f2 ; CHECK: br %r14 %cond = icmp eq i64 %i1, -1 @@ -97,9 +118,32 @@ define double @f8(double %a, double %b, i64 %i1) { ret double %res } +; Check the low end of the CGIJ range. +define double @f11(double %a, double %b, i64 %i1) { +; CHECK: f11: +; CHECK: cgije %r2, -128 +; CHECK: ldr %f0, %f2 +; CHECK: br %r14 + %cond = icmp eq i64 %i1, -128 + %res = select i1 %cond, double %a, double %b + ret double %res +} + +; Check the next value down, which must use CGHI instead. +define double @f12(double %a, double %b, i64 %i1) { +; CHECK: f12: +; CHECK: cghi %r2, -129 +; CHECK-NEXT: je +; CHECK: ldr %f0, %f2 +; CHECK: br %r14 + %cond = icmp eq i64 %i1, -129 + %res = select i1 %cond, double %a, double %b + ret double %res +} + ; Check the low end of the CGHI range. -define double @f9(double %a, double %b, i64 %i1) { -; CHECK: f9: +define double @f13(double %a, double %b, i64 %i1) { +; CHECK: f13: ; CHECK: cghi %r2, -32768 ; CHECK-NEXT: je ; CHECK: ldr %f0, %f2 @@ -110,8 +154,8 @@ define double @f9(double %a, double %b, i64 %i1) { } ; Check the next value down, which must use CGFI instead. -define double @f10(double %a, double %b, i64 %i1) { -; CHECK: f10: +define double @f14(double %a, double %b, i64 %i1) { +; CHECK: f14: ; CHECK: cgfi %r2, -32769 ; CHECK-NEXT: je ; CHECK: ldr %f0, %f2 @@ -122,8 +166,8 @@ define double @f10(double %a, double %b, i64 %i1) { } ; Check the low end of the CGFI range. -define double @f11(double %a, double %b, i64 %i1) { -; CHECK: f11: +define double @f15(double %a, double %b, i64 %i1) { +; CHECK: f15: ; CHECK: cgfi %r2, -2147483648 ; CHECK-NEXT: je ; CHECK: ldr %f0, %f2 @@ -134,8 +178,8 @@ define double @f11(double %a, double %b, i64 %i1) { } ; Check the next value down, which must use register comparison. -define double @f12(double %a, double %b, i64 %i1) { -; CHECK: f12: +define double @f16(double %a, double %b, i64 %i1) { +; CHECK: f16: ; CHECK: cgrje ; CHECK: ldr %f0, %f2 ; CHECK: br %r14 diff --git a/test/CodeGen/SystemZ/int-cmp-14.ll b/test/CodeGen/SystemZ/int-cmp-14.ll index 28c325c005e..11b56adcdce 100644 --- a/test/CodeGen/SystemZ/int-cmp-14.ll +++ b/test/CodeGen/SystemZ/int-cmp-14.ll @@ -5,8 +5,7 @@ ; Check comparisons with 0. define double @f1(double %a, double %b, i64 %i1) { ; CHECK: f1: -; CHECK: cghi %r2, 0 -; CHECK-NEXT: jlh +; CHECK: cgijlh %r2, 0 ; CHECK: ldr %f0, %f2 ; CHECK: br %r14 %cond = icmp ne i64 %i1, 0 @@ -14,9 +13,32 @@ define double @f1(double %a, double %b, i64 %i1) { ret double %res } -; Check the high end of the CGHI range. +; Check the high end of the CGIJ range. define double @f2(double %a, double %b, i64 %i1) { ; CHECK: f2: +; CHECK: cgijlh %r2, 127 +; CHECK: ldr %f0, %f2 +; CHECK: br %r14 + %cond = icmp ne i64 %i1, 127 + %res = select i1 %cond, double %a, double %b + ret double %res +} + +; Check the next value up, which must use CGHI instead. +define double @f3(double %a, double %b, i64 %i1) { +; CHECK: f3: +; CHECK: cghi %r2, 128 +; CHECK-NEXT: jlh +; CHECK: ldr %f0, %f2 +; CHECK: br %r14 + %cond = icmp ne i64 %i1, 128 + %res = select i1 %cond, double %a, double %b + ret double %res +} + +; Check the high end of the CGHI range. +define double @f4(double %a, double %b, i64 %i1) { +; CHECK: f4: ; CHECK: cghi %r2, 32767 ; CHECK-NEXT: jlh ; CHECK: ldr %f0, %f2 @@ -27,8 +49,8 @@ define double @f2(double %a, double %b, i64 %i1) { } ; Check the next value up, which must use CGFI. -define double @f3(double %a, double %b, i64 %i1) { -; CHECK: f3: +define double @f5(double %a, double %b, i64 %i1) { +; CHECK: f5: ; CHECK: cgfi %r2, 32768 ; CHECK-NEXT: jlh ; CHECK: ldr %f0, %f2 @@ -39,8 +61,8 @@ define double @f3(double %a, double %b, i64 %i1) { } ; Check the high end of the CGFI range. -define double @f4(double %a, double %b, i64 %i1) { -; CHECK: f4: +define double @f6(double %a, double %b, i64 %i1) { +; CHECK: f6: ; CHECK: cgfi %r2, 2147483647 ; CHECK-NEXT: jlh ; CHECK: ldr %f0, %f2 @@ -51,8 +73,8 @@ define double @f4(double %a, double %b, i64 %i1) { } ; Check the next value up, which should use CLGFI instead. -define double @f5(double %a, double %b, i64 %i1) { -; CHECK: f5: +define double @f7(double %a, double %b, i64 %i1) { +; CHECK: f7: ; CHECK: clgfi %r2, 2147483648 ; CHECK-NEXT: jlh ; CHECK: ldr %f0, %f2 @@ -63,8 +85,8 @@ define double @f5(double %a, double %b, i64 %i1) { } ; Check the high end of the CLGFI range. -define double @f6(double %a, double %b, i64 %i1) { -; CHECK: f6: +define double @f8(double %a, double %b, i64 %i1) { +; CHECK: f8: ; CHECK: clgfi %r2, 4294967295 ; CHECK-NEXT: jlh ; CHECK: ldr %f0, %f2 @@ -75,8 +97,8 @@ define double @f6(double %a, double %b, i64 %i1) { } ; Check the next value up, which must use a register comparison. -define double @f7(double %a, double %b, i64 %i1) { -; CHECK: f7: +define double @f9(double %a, double %b, i64 %i1) { +; CHECK: f9: ; CHECK: cgrjlh %r2, ; CHECK: ldr %f0, %f2 ; CHECK: br %r14 @@ -85,11 +107,10 @@ define double @f7(double %a, double %b, i64 %i1) { ret double %res } -; Check the high end of the negative CGHI range. -define double @f8(double %a, double %b, i64 %i1) { -; CHECK: f8: -; CHECK: cghi %r2, -1 -; CHECK-NEXT: jlh +; Check the high end of the negative CGIJ range. +define double @f10(double %a, double %b, i64 %i1) { +; CHECK: f10: +; CHECK: cgijlh %r2, -1 ; CHECK: ldr %f0, %f2 ; CHECK: br %r14 %cond = icmp ne i64 %i1, -1 @@ -97,9 +118,32 @@ define double @f8(double %a, double %b, i64 %i1) { ret double %res } +; Check the low end of the CGIJ range. +define double @f11(double %a, double %b, i64 %i1) { +; CHECK: f11: +; CHECK: cgijlh %r2, -128 +; CHECK: ldr %f0, %f2 +; CHECK: br %r14 + %cond = icmp ne i64 %i1, -128 + %res = select i1 %cond, double %a, double %b + ret double %res +} + +; Check the next value down, which must use CGHI instead. +define double @f12(double %a, double %b, i64 %i1) { +; CHECK: f12: +; CHECK: cghi %r2, -129 +; CHECK-NEXT: jlh +; CHECK: ldr %f0, %f2 +; CHECK: br %r14 + %cond = icmp ne i64 %i1, -129 + %res = select i1 %cond, double %a, double %b + ret double %res +} + ; Check the low end of the CGHI range. -define double @f9(double %a, double %b, i64 %i1) { -; CHECK: f9: +define double @f13(double %a, double %b, i64 %i1) { +; CHECK: f13: ; CHECK: cghi %r2, -32768 ; CHECK-NEXT: jlh ; CHECK: ldr %f0, %f2 @@ -110,8 +154,8 @@ define double @f9(double %a, double %b, i64 %i1) { } ; Check the next value down, which must use CGFI instead. -define double @f10(double %a, double %b, i64 %i1) { -; CHECK: f10: +define double @f14(double %a, double %b, i64 %i1) { +; CHECK: f14: ; CHECK: cgfi %r2, -32769 ; CHECK-NEXT: jlh ; CHECK: ldr %f0, %f2 @@ -122,8 +166,8 @@ define double @f10(double %a, double %b, i64 %i1) { } ; Check the low end of the CGFI range. -define double @f11(double %a, double %b, i64 %i1) { -; CHECK: f11: +define double @f15(double %a, double %b, i64 %i1) { +; CHECK: f15: ; CHECK: cgfi %r2, -2147483648 ; CHECK-NEXT: jlh ; CHECK: ldr %f0, %f2 @@ -134,8 +178,8 @@ define double @f11(double %a, double %b, i64 %i1) { } ; Check the next value down, which must use register comparison. -define double @f12(double %a, double %b, i64 %i1) { -; CHECK: f12: +define double @f16(double %a, double %b, i64 %i1) { +; CHECK: f16: ; CHECK: cgrjlh ; CHECK: ldr %f0, %f2 ; CHECK: br %r14 diff --git a/test/MC/Disassembler/SystemZ/insns-pcrel.txt b/test/MC/Disassembler/SystemZ/insns-pcrel.txt index 0b135377f34..f9e7774cbdd 100644 --- a/test/MC/Disassembler/SystemZ/insns-pcrel.txt +++ b/test/MC/Disassembler/SystemZ/insns-pcrel.txt @@ -1106,3 +1106,195 @@ # 0x0000063a: # CHECK: crj %r0, %r0, 15, 0x63a 0xec 0x00 0x00 0x00 0xf0 0x76 + +# 0x00000640: +# CHECK: cgij %r0, 0, 0, 0x640 +0xec 0x00 0x00 0x00 0x00 0x7c + +# 0x00000646: +# CHECK: cgij %r0, -128, 0, 0x646 +0xec 0x00 0x00 0x00 0x80 0x7c + +# 0x0000064c: +# CHECK: cgij %r0, -1, 0, 0x64c +0xec 0x00 0x00 0x00 0xff 0x7c + +# 0x00000652: +# CHECK: cgij %r0, 127, 0, 0x652 +0xec 0x00 0x00 0x00 0x7f 0x7c + +# 0x00000658: +# CHECK: cgij %r15, 0, 0, 0x658 +0xec 0xf0 0x00 0x00 0x00 0x7c + +# 0x0000065e: +# CHECK: cgij %r7, 100, 0, 0x65e +0xec 0x70 0x00 0x00 0x64 0x7c + +# 0x00000664: +# CHECK: cgij %r0, 0, 0, 0x662 +0xec 0x00 0xff 0xff 0x00 0x7c + +# 0x0000066a: +# CHECK: cgij %r0, 0, 0, 0xffffffffffff066a +0xec 0x00 0x80 0x00 0x00 0x7c + +# 0x00000670: +# CHECK: cgij %r0, 0, 0, 0x1066e +0xec 0x00 0x7f 0xff 0x00 0x7c + +# 0x00000676: +# CHECK: cgij %r0, 0, 1, 0x676 +0xec 0x01 0x00 0x00 0x00 0x7c + +# 0x0000067c: +# CHECK: cgijh %r0, 0, 0x67c +0xec 0x02 0x00 0x00 0x00 0x7c + +# 0x00000682: +# CHECK: cgij %r0, 0, 3, 0x682 +0xec 0x03 0x00 0x00 0x00 0x7c + +# 0x00000688: +# CHECK: cgijl %r0, 0, 0x688 +0xec 0x04 0x00 0x00 0x00 0x7c + +# 0x0000068e: +# CHECK: cgij %r0, 0, 5, 0x68e +0xec 0x05 0x00 0x00 0x00 0x7c + +# 0x00000694: +# CHECK: cgijlh %r0, 0, 0x694 +0xec 0x06 0x00 0x00 0x00 0x7c + +# 0x0000069a: +# CHECK: cgij %r0, 0, 7, 0x69a +0xec 0x07 0x00 0x00 0x00 0x7c + +# 0x000006a0: +# CHECK: cgije %r0, 0, 0x6a0 +0xec 0x08 0x00 0x00 0x00 0x7c + +# 0x000006a6: +# CHECK: cgij %r0, 0, 9, 0x6a6 +0xec 0x09 0x00 0x00 0x00 0x7c + +# 0x000006ac: +# CHECK: cgijhe %r0, 0, 0x6ac +0xec 0x0a 0x00 0x00 0x00 0x7c + +# 0x000006b2: +# CHECK: cgij %r0, 0, 11, 0x6b2 +0xec 0x0b 0x00 0x00 0x00 0x7c + +# 0x000006b8: +# CHECK: cgijle %r0, 0, 0x6b8 +0xec 0x0c 0x00 0x00 0x00 0x7c + +# 0x000006be: +# CHECK: cgij %r0, 0, 13, 0x6be +0xec 0x0d 0x00 0x00 0x00 0x7c + +# 0x000006c4: +# CHECK: cgij %r0, 0, 14, 0x6c4 +0xec 0x0e 0x00 0x00 0x00 0x7c + +# 0x000006ca: +# CHECK: cgij %r0, 0, 15, 0x6ca +0xec 0x0f 0x00 0x00 0x00 0x7c + +# 0x000006d0: +# CHECK: cij %r0, 0, 0, 0x6d0 +0xec 0x00 0x00 0x00 0x00 0x7e + +# 0x000006d6: +# CHECK: cij %r0, -128, 0, 0x6d6 +0xec 0x00 0x00 0x00 0x80 0x7e + +# 0x000006dc: +# CHECK: cij %r0, -1, 0, 0x6dc +0xec 0x00 0x00 0x00 0xff 0x7e + +# 0x000006e2: +# CHECK: cij %r0, 127, 0, 0x6e2 +0xec 0x00 0x00 0x00 0x7f 0x7e + +# 0x000006e8: +# CHECK: cij %r15, 0, 0, 0x6e8 +0xec 0xf0 0x00 0x00 0x00 0x7e + +# 0x000006ee: +# CHECK: cij %r7, 100, 0, 0x6ee +0xec 0x70 0x00 0x00 0x64 0x7e + +# 0x000006f4: +# CHECK: cij %r0, 0, 0, 0x6f2 +0xec 0x00 0xff 0xff 0x00 0x7e + +# 0x000006fa: +# CHECK: cij %r0, 0, 0, 0xffffffffffff06fa +0xec 0x00 0x80 0x00 0x00 0x7e + +# 0x00000700: +# CHECK: cij %r0, 0, 0, 0x106fe +0xec 0x00 0x7f 0xff 0x00 0x7e + +# 0x00000706: +# CHECK: cij %r0, 0, 1, 0x706 +0xec 0x01 0x00 0x00 0x00 0x7e + +# 0x0000070c: +# CHECK: cijh %r0, 0, 0x70c +0xec 0x02 0x00 0x00 0x00 0x7e + +# 0x00000712: +# CHECK: cij %r0, 0, 3, 0x712 +0xec 0x03 0x00 0x00 0x00 0x7e + +# 0x00000718: +# CHECK: cijl %r0, 0, 0x718 +0xec 0x04 0x00 0x00 0x00 0x7e + +# 0x0000071e: +# CHECK: cij %r0, 0, 5, 0x71e +0xec 0x05 0x00 0x00 0x00 0x7e + +# 0x00000724: +# CHECK: cijlh %r0, 0, 0x724 +0xec 0x06 0x00 0x00 0x00 0x7e + +# 0x0000072a: +# CHECK: cij %r0, 0, 7, 0x72a +0xec 0x07 0x00 0x00 0x00 0x7e + +# 0x00000730: +# CHECK: cije %r0, 0, 0x730 +0xec 0x08 0x00 0x00 0x00 0x7e + +# 0x00000736: +# CHECK: cij %r0, 0, 9, 0x736 +0xec 0x09 0x00 0x00 0x00 0x7e + +# 0x0000073c: +# CHECK: cijhe %r0, 0, 0x73c +0xec 0x0a 0x00 0x00 0x00 0x7e + +# 0x00000742: +# CHECK: cij %r0, 0, 11, 0x742 +0xec 0x0b 0x00 0x00 0x00 0x7e + +# 0x00000748: +# CHECK: cijle %r0, 0, 0x748 +0xec 0x0c 0x00 0x00 0x00 0x7e + +# 0x0000074e: +# CHECK: cij %r0, 0, 13, 0x74e +0xec 0x0d 0x00 0x00 0x00 0x7e + +# 0x00000754: +# CHECK: cij %r0, 0, 14, 0x754 +0xec 0x0e 0x00 0x00 0x00 0x7e + +# 0x0000075a: +# CHECK: cij %r0, 0, 15, 0x75a +0xec 0x0f 0x00 0x00 0x00 0x7e diff --git a/test/MC/SystemZ/insn-bad.s b/test/MC/SystemZ/insn-bad.s index ea249119c79..8dbe7183716 100644 --- a/test/MC/SystemZ/insn-bad.s +++ b/test/MC/SystemZ/insn-bad.s @@ -452,6 +452,36 @@ cghsi 0, -32769 cghsi 0, 32768 +#CHECK: error: invalid operand +#CHECK: cgij %r0, -129, 0, 0 +#CHECK: error: invalid operand +#CHECK: cgij %r0, 128, 0, 0 + + cgij %r0, -129, 0, 0 + cgij %r0, 128, 0, 0 + +#CHECK: error: offset out of range +#CHECK: cgij %r0, 0, 0, -0x100002 +#CHECK: error: offset out of range +#CHECK: cgij %r0, 0, 0, -1 +#CHECK: error: offset out of range +#CHECK: cgij %r0, 0, 0, 1 +#CHECK: error: offset out of range +#CHECK: cgij %r0, 0, 0, 0x10000 + + cgij %r0, 0, 0, -0x100002 + cgij %r0, 0, 0, -1 + cgij %r0, 0, 0, 1 + cgij %r0, 0, 0, 0x10000 + +#CHECK: error: invalid instruction +#CHECK: cgijo %r0, 0, 0, 0 +#CHECK: error: invalid instruction +#CHECK: cgijno %r0, 0, 0, 0 + + cgijo %r0, 0, 0, 0 + cgijno %r0, 0, 0, 0 + #CHECK: error: offset out of range #CHECK: cgrj %r0, %r0, 0, -0x100002 #CHECK: error: offset out of range @@ -575,6 +605,36 @@ chy %r0, -524289 chy %r0, 524288 +#CHECK: error: invalid operand +#CHECK: cij %r0, -129, 0, 0 +#CHECK: error: invalid operand +#CHECK: cij %r0, 128, 0, 0 + + cij %r0, -129, 0, 0 + cij %r0, 128, 0, 0 + +#CHECK: error: offset out of range +#CHECK: cij %r0, 0, 0, -0x100002 +#CHECK: error: offset out of range +#CHECK: cij %r0, 0, 0, -1 +#CHECK: error: offset out of range +#CHECK: cij %r0, 0, 0, 1 +#CHECK: error: offset out of range +#CHECK: cij %r0, 0, 0, 0x10000 + + cij %r0, 0, 0, -0x100002 + cij %r0, 0, 0, -1 + cij %r0, 0, 0, 1 + cij %r0, 0, 0, 0x10000 + +#CHECK: error: invalid instruction +#CHECK: cijo %r0, 0, 0, 0 +#CHECK: error: invalid instruction +#CHECK: cijno %r0, 0, 0, 0 + + cijo %r0, 0, 0, 0 + cijno %r0, 0, 0, 0 + #CHECK: error: invalid operand #CHECK: cl %r0, -1 #CHECK: error: invalid operand diff --git a/test/MC/SystemZ/insn-good.s b/test/MC/SystemZ/insn-good.s index 8188de3b563..17af858dabd 100644 --- a/test/MC/SystemZ/insn-good.s +++ b/test/MC/SystemZ/insn-good.s @@ -1513,6 +1513,239 @@ cghsi 4095(%r1), 42 cghsi 4095(%r15), 42 +#CHECK: cgij %r0, 0, 0, .[[LAB:L.*]] # encoding: [0xec,0x00,A,A,0x00,0x7c] +#CHECK: fixup A - offset: 2, value: .[[LAB]]+2, kind: FK_390_PC16DBL +#CHECK: cgij %r0, -128, 0, .[[LAB:L.*]] # encoding: [0xec,0x00,A,A,0x80,0x7c] +#CHECK: fixup A - offset: 2, value: .[[LAB]]+2, kind: FK_390_PC16DBL +#CHECK: cgij %r0, 127, 0, .[[LAB:L.*]] # encoding: [0xec,0x00,A,A,0x7f,0x7c] +#CHECK: fixup A - offset: 2, value: .[[LAB]]+2, kind: FK_390_PC16DBL +#CHECK: cgij %r15, 0, 0, .[[LAB:L.*]] # encoding: [0xec,0xf0,A,A,0x00,0x7c] +#CHECK: fixup A - offset: 2, value: .[[LAB]]+2, kind: FK_390_PC16DBL +#CHECK: cgij %r7, -1, 0, .[[LAB:L.*]] # encoding: [0xec,0x70,A,A,0xff,0x7c] +#CHECK: fixup A - offset: 2, value: .[[LAB]]+2, kind: FK_390_PC16DBL + cgij %r0, 0, 0, 0 + cgij %r0, -128, 0, 0 + cgij %r0, 127, 0, 0 + cgij %r15, 0, 0, 0 + cgij %r7, -1, 0, 0 + +#CHECK: cgij %r1, -66, 0, .[[LAB:L.*]]-65536 # encoding: [0xec,0x10,A,A,0xbe,0x7c] +#CHECK: fixup A - offset: 2, value: (.[[LAB]]-65536)+2, kind: FK_390_PC16DBL + cgij %r1, -66, 0, -0x10000 +#CHECK: cgij %r1, -66, 0, .[[LAB:L.*]]-2 # encoding: [0xec,0x10,A,A,0xbe,0x7c] +#CHECK: fixup A - offset: 2, value: (.[[LAB]]-2)+2, kind: FK_390_PC16DBL + cgij %r1, -66, 0, -2 +#CHECK: cgij %r1, -66, 0, .[[LAB:L.*]] # encoding: [0xec,0x10,A,A,0xbe,0x7c] +#CHECK: fixup A - offset: 2, value: .[[LAB]]+2, kind: FK_390_PC16DBL + cgij %r1, -66, 0, 0 +#CHECK: cgij %r1, -66, 0, .[[LAB:L.*]]+65534 # encoding: [0xec,0x10,A,A,0xbe,0x7c] +#CHECK: fixup A - offset: 2, value: (.[[LAB]]+65534)+2, kind: FK_390_PC16DBL + cgij %r1, -66, 0, 0xfffe + +#CHECK: cgij %r1, -66, 0, foo # encoding: [0xec,0x10,A,A,0xbe,0x7c] +#CHECK: fixup A - offset: 2, value: foo+2, kind: FK_390_PC16DBL + cgij %r1, -66, 0, foo + +#CHECK: cgij %r1, -66, 1, foo # encoding: [0xec,0x11,A,A,0xbe,0x7c] +#CHECK: fixup A - offset: 2, value: foo+2, kind: FK_390_PC16DBL + cgij %r1, -66, 1, foo + +#CHECK: cgij %r1, -66, 2, foo # encoding: [0xec,0x12,A,A,0xbe,0x7c] +#CHECK: fixup A - offset: 2, value: foo+2, kind: FK_390_PC16DBL +#CHECK: cgijh %r1, -66, foo # encoding: [0xec,0x12,A,A,0xbe,0x7c] +#CHECK: fixup A - offset: 2, value: foo+2, kind: FK_390_PC16DBL +#CHECK: cgijnle %r1, -66, foo # encoding: [0xec,0x12,A,A,0xbe,0x7c] +#CHECK: fixup A - offset: 2, value: foo+2, kind: FK_390_PC16DBL + cgij %r1, -66, 2, foo + cgijh %r1, -66, foo + cgijnle %r1, -66, foo + +#CHECK: cgij %r1, -66, 3, foo # encoding: [0xec,0x13,A,A,0xbe,0x7c] +#CHECK: fixup A - offset: 2, value: foo+2, kind: FK_390_PC16DBL + cgij %r1, -66, 3, foo + +#CHECK: cgij %r1, -66, 4, foo # encoding: [0xec,0x14,A,A,0xbe,0x7c] +#CHECK: fixup A - offset: 2, value: foo+2, kind: FK_390_PC16DBL +#CHECK: cgijl %r1, -66, foo # encoding: [0xec,0x14,A,A,0xbe,0x7c] +#CHECK: fixup A - offset: 2, value: foo+2, kind: FK_390_PC16DBL +#CHECK: cgijnhe %r1, -66, foo # encoding: [0xec,0x14,A,A,0xbe,0x7c] +#CHECK: fixup A - offset: 2, value: foo+2, kind: FK_390_PC16DBL + cgij %r1, -66, 4, foo + cgijl %r1, -66, foo + cgijnhe %r1, -66, foo + +#CHECK: cgij %r1, -66, 5, foo # encoding: [0xec,0x15,A,A,0xbe,0x7c] +#CHECK: fixup A - offset: 2, value: foo+2, kind: FK_390_PC16DBL + cgij %r1, -66, 5, foo + +#CHECK: cgij %r1, -66, 6, foo # encoding: [0xec,0x16,A,A,0xbe,0x7c] +#CHECK: fixup A - offset: 2, value: foo+2, kind: FK_390_PC16DBL +#CHECK: cgijlh %r1, -66, foo # encoding: [0xec,0x16,A,A,0xbe,0x7c] +#CHECK: fixup A - offset: 2, value: foo+2, kind: FK_390_PC16DBL +#CHECK: cgijne %r1, -66, foo # encoding: [0xec,0x16,A,A,0xbe,0x7c] +#CHECK: fixup A - offset: 2, value: foo+2, kind: FK_390_PC16DBL + cgij %r1, -66, 6, foo + cgijlh %r1, -66, foo + cgijne %r1, -66, foo + +#CHECK: cgij %r1, -66, 7, foo # encoding: [0xec,0x17,A,A,0xbe,0x7c] +#CHECK: fixup A - offset: 2, value: foo+2, kind: FK_390_PC16DBL + cgij %r1, -66, 7, foo + +#CHECK: cgij %r1, -66, 8, foo # encoding: [0xec,0x18,A,A,0xbe,0x7c] +#CHECK: fixup A - offset: 2, value: foo+2, kind: FK_390_PC16DBL +#CHECK: cgije %r1, -66, foo # encoding: [0xec,0x18,A,A,0xbe,0x7c] +#CHECK: fixup A - offset: 2, value: foo+2, kind: FK_390_PC16DBL +#CHECK: cgijnlh %r1, -66, foo # encoding: [0xec,0x18,A,A,0xbe,0x7c] +#CHECK: fixup A - offset: 2, value: foo+2, kind: FK_390_PC16DBL + cgij %r1, -66, 8, foo + cgije %r1, -66, foo + cgijnlh %r1, -66, foo + +#CHECK: cgij %r1, -66, 9, foo # encoding: [0xec,0x19,A,A,0xbe,0x7c] +#CHECK: fixup A - offset: 2, value: foo+2, kind: FK_390_PC16DBL + cgij %r1, -66, 9, foo + +#CHECK: cgij %r1, -66, 10, foo # encoding: [0xec,0x1a,A,A,0xbe,0x7c] +#CHECK: fixup A - offset: 2, value: foo+2, kind: FK_390_PC16DBL +#CHECK: cgijhe %r1, -66, foo # encoding: [0xec,0x1a,A,A,0xbe,0x7c] +#CHECK: fixup A - offset: 2, value: foo+2, kind: FK_390_PC16DBL +#CHECK: cgijnl %r1, -66, foo # encoding: [0xec,0x1a,A,A,0xbe,0x7c] +#CHECK: fixup A - offset: 2, value: foo+2, kind: FK_390_PC16DBL + cgij %r1, -66, 10, foo + cgijhe %r1, -66, foo + cgijnl %r1, -66, foo + +#CHECK: cgij %r1, -66, 11, foo # encoding: [0xec,0x1b,A,A,0xbe,0x7c] +#CHECK: fixup A - offset: 2, value: foo+2, kind: FK_390_PC16DBL + cgij %r1, -66, 11, foo + +#CHECK: cgij %r1, -66, 12, foo # encoding: [0xec,0x1c,A,A,0xbe,0x7c] +#CHECK: fixup A - offset: 2, value: foo+2, kind: FK_390_PC16DBL +#CHECK: cgijle %r1, -66, foo # encoding: [0xec,0x1c,A,A,0xbe,0x7c] +#CHECK: fixup A - offset: 2, value: foo+2, kind: FK_390_PC16DBL +#CHECK: cgijnh %r1, -66, foo # encoding: [0xec,0x1c,A,A,0xbe,0x7c] +#CHECK: fixup A - offset: 2, value: foo+2, kind: FK_390_PC16DBL + cgij %r1, -66, 12, foo + cgijle %r1, -66, foo + cgijnh %r1, -66, foo + +#CHECK: cgij %r1, -66, 13, foo # encoding: [0xec,0x1d,A,A,0xbe,0x7c] +#CHECK: fixup A - offset: 2, value: foo+2, kind: FK_390_PC16DBL + cgij %r1, -66, 13, foo + +#CHECK: cgij %r1, -66, 14, foo # encoding: [0xec,0x1e,A,A,0xbe,0x7c] +#CHECK: fixup A - offset: 2, value: foo+2, kind: FK_390_PC16DBL + cgij %r1, -66, 14, foo + +#CHECK: cgij %r1, -66, 15, foo # encoding: [0xec,0x1f,A,A,0xbe,0x7c] +#CHECK: fixup A - offset: 2, value: foo+2, kind: FK_390_PC16DBL + cgij %r1, -66, 15, foo + +#CHECK: cgij %r1, -66, 0, bar+100 # encoding: [0xec,0x10,A,A,0xbe,0x7c] +#CHECK: fixup A - offset: 2, value: (bar+100)+2, kind: FK_390_PC16DBL + cgij %r1, -66, 0, bar+100 + +#CHECK: cgijh %r1, -66, bar+100 # encoding: [0xec,0x12,A,A,0xbe,0x7c] +#CHECK: fixup A - offset: 2, value: (bar+100)+2, kind: FK_390_PC16DBL + cgijh %r1, -66, bar+100 + +#CHECK: cgijnle %r1, -66, bar+100 # encoding: [0xec,0x12,A,A,0xbe,0x7c] +#CHECK: fixup A - offset: 2, value: (bar+100)+2, kind: FK_390_PC16DBL + cgijnle %r1, -66, bar+100 + +#CHECK: cgijl %r1, -66, bar+100 # encoding: [0xec,0x14,A,A,0xbe,0x7c] +#CHECK: fixup A - offset: 2, value: (bar+100)+2, kind: FK_390_PC16DBL + cgijl %r1, -66, bar+100 + +#CHECK: cgijnhe %r1, -66, bar+100 # encoding: [0xec,0x14,A,A,0xbe,0x7c] +#CHECK: fixup A - offset: 2, value: (bar+100)+2, kind: FK_390_PC16DBL + cgijnhe %r1, -66, bar+100 + +#CHECK: cgijlh %r1, -66, bar+100 # encoding: [0xec,0x16,A,A,0xbe,0x7c] +#CHECK: fixup A - offset: 2, value: (bar+100)+2, kind: FK_390_PC16DBL + cgijlh %r1, -66, bar+100 + +#CHECK: cgijne %r1, -66, bar+100 # encoding: [0xec,0x16,A,A,0xbe,0x7c] +#CHECK: fixup A - offset: 2, value: (bar+100)+2, kind: FK_390_PC16DBL + cgijne %r1, -66, bar+100 + +#CHECK: cgije %r1, -66, bar+100 # encoding: [0xec,0x18,A,A,0xbe,0x7c] +#CHECK: fixup A - offset: 2, value: (bar+100)+2, kind: FK_390_PC16DBL + cgije %r1, -66, bar+100 + +#CHECK: cgijnlh %r1, -66, bar+100 # encoding: [0xec,0x18,A,A,0xbe,0x7c] +#CHECK: fixup A - offset: 2, value: (bar+100)+2, kind: FK_390_PC16DBL + cgijnlh %r1, -66, bar+100 + +#CHECK: cgijhe %r1, -66, bar+100 # encoding: [0xec,0x1a,A,A,0xbe,0x7c] +#CHECK: fixup A - offset: 2, value: (bar+100)+2, kind: FK_390_PC16DBL + cgijhe %r1, -66, bar+100 + +#CHECK: cgijnl %r1, -66, bar+100 # encoding: [0xec,0x1a,A,A,0xbe,0x7c] +#CHECK: fixup A - offset: 2, value: (bar+100)+2, kind: FK_390_PC16DBL + cgijnl %r1, -66, bar+100 + +#CHECK: cgijle %r1, -66, bar+100 # encoding: [0xec,0x1c,A,A,0xbe,0x7c] +#CHECK: fixup A - offset: 2, value: (bar+100)+2, kind: FK_390_PC16DBL + cgijle %r1, -66, bar+100 + +#CHECK: cgijnh %r1, -66, bar+100 # encoding: [0xec,0x1c,A,A,0xbe,0x7c] +#CHECK: fixup A - offset: 2, value: (bar+100)+2, kind: FK_390_PC16DBL + cgijnh %r1, -66, bar+100 + +#CHECK: cgij %r1, -66, 0, bar@PLT # encoding: [0xec,0x10,A,A,0xbe,0x7c] +#CHECK: fixup A - offset: 2, value: bar@PLT+2, kind: FK_390_PC16DBL + cgij %r1, -66, 0, bar@PLT + +#CHECK: cgijh %r1, -66, bar@PLT # encoding: [0xec,0x12,A,A,0xbe,0x7c] +#CHECK: fixup A - offset: 2, value: bar@PLT+2, kind: FK_390_PC16DBL + cgijh %r1, -66, bar@PLT + +#CHECK: cgijnle %r1, -66, bar@PLT # encoding: [0xec,0x12,A,A,0xbe,0x7c] +#CHECK: fixup A - offset: 2, value: bar@PLT+2, kind: FK_390_PC16DBL + cgijnle %r1, -66, bar@PLT + +#CHECK: cgijl %r1, -66, bar@PLT # encoding: [0xec,0x14,A,A,0xbe,0x7c] +#CHECK: fixup A - offset: 2, value: bar@PLT+2, kind: FK_390_PC16DBL + cgijl %r1, -66, bar@PLT + +#CHECK: cgijnhe %r1, -66, bar@PLT # encoding: [0xec,0x14,A,A,0xbe,0x7c] +#CHECK: fixup A - offset: 2, value: bar@PLT+2, kind: FK_390_PC16DBL + cgijnhe %r1, -66, bar@PLT + +#CHECK: cgijlh %r1, -66, bar@PLT # encoding: [0xec,0x16,A,A,0xbe,0x7c] +#CHECK: fixup A - offset: 2, value: bar@PLT+2, kind: FK_390_PC16DBL + cgijlh %r1, -66, bar@PLT + +#CHECK: cgijne %r1, -66, bar@PLT # encoding: [0xec,0x16,A,A,0xbe,0x7c] +#CHECK: fixup A - offset: 2, value: bar@PLT+2, kind: FK_390_PC16DBL + cgijne %r1, -66, bar@PLT + +#CHECK: cgije %r1, -66, bar@PLT # encoding: [0xec,0x18,A,A,0xbe,0x7c] +#CHECK: fixup A - offset: 2, value: bar@PLT+2, kind: FK_390_PC16DBL + cgije %r1, -66, bar@PLT + +#CHECK: cgijnlh %r1, -66, bar@PLT # encoding: [0xec,0x18,A,A,0xbe,0x7c] +#CHECK: fixup A - offset: 2, value: bar@PLT+2, kind: FK_390_PC16DBL + cgijnlh %r1, -66, bar@PLT + +#CHECK: cgijhe %r1, -66, bar@PLT # encoding: [0xec,0x1a,A,A,0xbe,0x7c] +#CHECK: fixup A - offset: 2, value: bar@PLT+2, kind: FK_390_PC16DBL + cgijhe %r1, -66, bar@PLT + +#CHECK: cgijnl %r1, -66, bar@PLT # encoding: [0xec,0x1a,A,A,0xbe,0x7c] +#CHECK: fixup A - offset: 2, value: bar@PLT+2, kind: FK_390_PC16DBL + cgijnl %r1, -66, bar@PLT + +#CHECK: cgijle %r1, -66, bar@PLT # encoding: [0xec,0x1c,A,A,0xbe,0x7c] +#CHECK: fixup A - offset: 2, value: bar@PLT+2, kind: FK_390_PC16DBL + cgijle %r1, -66, bar@PLT + +#CHECK: cgijnh %r1, -66, bar@PLT # encoding: [0xec,0x1c,A,A,0xbe,0x7c] +#CHECK: fixup A - offset: 2, value: bar@PLT+2, kind: FK_390_PC16DBL + cgijnh %r1, -66, bar@PLT + #CHECK: cgr %r0, %r0 # encoding: [0xb9,0x20,0x00,0x00] #CHECK: cgr %r0, %r15 # encoding: [0xb9,0x20,0x00,0x0f] #CHECK: cgr %r15, %r0 # encoding: [0xb9,0x20,0x00,0xf0] @@ -1939,6 +2172,239 @@ chy %r0, 524287(%r15,%r1) chy %r15, 0 +#CHECK: cij %r0, 0, 0, .[[LAB:L.*]] # encoding: [0xec,0x00,A,A,0x00,0x7e] +#CHECK: fixup A - offset: 2, value: .[[LAB]]+2, kind: FK_390_PC16DBL +#CHECK: cij %r0, -128, 0, .[[LAB:L.*]] # encoding: [0xec,0x00,A,A,0x80,0x7e] +#CHECK: fixup A - offset: 2, value: .[[LAB]]+2, kind: FK_390_PC16DBL +#CHECK: cij %r0, 127, 0, .[[LAB:L.*]] # encoding: [0xec,0x00,A,A,0x7f,0x7e] +#CHECK: fixup A - offset: 2, value: .[[LAB]]+2, kind: FK_390_PC16DBL +#CHECK: cij %r15, 0, 0, .[[LAB:L.*]] # encoding: [0xec,0xf0,A,A,0x00,0x7e] +#CHECK: fixup A - offset: 2, value: .[[LAB]]+2, kind: FK_390_PC16DBL +#CHECK: cij %r7, -1, 0, .[[LAB:L.*]] # encoding: [0xec,0x70,A,A,0xff,0x7e] +#CHECK: fixup A - offset: 2, value: .[[LAB]]+2, kind: FK_390_PC16DBL + cij %r0, 0, 0, 0 + cij %r0, -128, 0, 0 + cij %r0, 127, 0, 0 + cij %r15, 0, 0, 0 + cij %r7, -1, 0, 0 + +#CHECK: cij %r1, -66, 0, .[[LAB:L.*]]-65536 # encoding: [0xec,0x10,A,A,0xbe,0x7e] +#CHECK: fixup A - offset: 2, value: (.[[LAB]]-65536)+2, kind: FK_390_PC16DBL + cij %r1, -66, 0, -0x10000 +#CHECK: cij %r1, -66, 0, .[[LAB:L.*]]-2 # encoding: [0xec,0x10,A,A,0xbe,0x7e] +#CHECK: fixup A - offset: 2, value: (.[[LAB]]-2)+2, kind: FK_390_PC16DBL + cij %r1, -66, 0, -2 +#CHECK: cij %r1, -66, 0, .[[LAB:L.*]] # encoding: [0xec,0x10,A,A,0xbe,0x7e] +#CHECK: fixup A - offset: 2, value: .[[LAB]]+2, kind: FK_390_PC16DBL + cij %r1, -66, 0, 0 +#CHECK: cij %r1, -66, 0, .[[LAB:L.*]]+65534 # encoding: [0xec,0x10,A,A,0xbe,0x7e] +#CHECK: fixup A - offset: 2, value: (.[[LAB]]+65534)+2, kind: FK_390_PC16DBL + cij %r1, -66, 0, 0xfffe + +#CHECK: cij %r1, -66, 0, foo # encoding: [0xec,0x10,A,A,0xbe,0x7e] +#CHECK: fixup A - offset: 2, value: foo+2, kind: FK_390_PC16DBL + cij %r1, -66, 0, foo + +#CHECK: cij %r1, -66, 1, foo # encoding: [0xec,0x11,A,A,0xbe,0x7e] +#CHECK: fixup A - offset: 2, value: foo+2, kind: FK_390_PC16DBL + cij %r1, -66, 1, foo + +#CHECK: cij %r1, -66, 2, foo # encoding: [0xec,0x12,A,A,0xbe,0x7e] +#CHECK: fixup A - offset: 2, value: foo+2, kind: FK_390_PC16DBL +#CHECK: cijh %r1, -66, foo # encoding: [0xec,0x12,A,A,0xbe,0x7e] +#CHECK: fixup A - offset: 2, value: foo+2, kind: FK_390_PC16DBL +#CHECK: cijnle %r1, -66, foo # encoding: [0xec,0x12,A,A,0xbe,0x7e] +#CHECK: fixup A - offset: 2, value: foo+2, kind: FK_390_PC16DBL + cij %r1, -66, 2, foo + cijh %r1, -66, foo + cijnle %r1, -66, foo + +#CHECK: cij %r1, -66, 3, foo # encoding: [0xec,0x13,A,A,0xbe,0x7e] +#CHECK: fixup A - offset: 2, value: foo+2, kind: FK_390_PC16DBL + cij %r1, -66, 3, foo + +#CHECK: cij %r1, -66, 4, foo # encoding: [0xec,0x14,A,A,0xbe,0x7e] +#CHECK: fixup A - offset: 2, value: foo+2, kind: FK_390_PC16DBL +#CHECK: cijl %r1, -66, foo # encoding: [0xec,0x14,A,A,0xbe,0x7e] +#CHECK: fixup A - offset: 2, value: foo+2, kind: FK_390_PC16DBL +#CHECK: cijnhe %r1, -66, foo # encoding: [0xec,0x14,A,A,0xbe,0x7e] +#CHECK: fixup A - offset: 2, value: foo+2, kind: FK_390_PC16DBL + cij %r1, -66, 4, foo + cijl %r1, -66, foo + cijnhe %r1, -66, foo + +#CHECK: cij %r1, -66, 5, foo # encoding: [0xec,0x15,A,A,0xbe,0x7e] +#CHECK: fixup A - offset: 2, value: foo+2, kind: FK_390_PC16DBL + cij %r1, -66, 5, foo + +#CHECK: cij %r1, -66, 6, foo # encoding: [0xec,0x16,A,A,0xbe,0x7e] +#CHECK: fixup A - offset: 2, value: foo+2, kind: FK_390_PC16DBL +#CHECK: cijlh %r1, -66, foo # encoding: [0xec,0x16,A,A,0xbe,0x7e] +#CHECK: fixup A - offset: 2, value: foo+2, kind: FK_390_PC16DBL +#CHECK: cijne %r1, -66, foo # encoding: [0xec,0x16,A,A,0xbe,0x7e] +#CHECK: fixup A - offset: 2, value: foo+2, kind: FK_390_PC16DBL + cij %r1, -66, 6, foo + cijlh %r1, -66, foo + cijne %r1, -66, foo + +#CHECK: cij %r1, -66, 7, foo # encoding: [0xec,0x17,A,A,0xbe,0x7e] +#CHECK: fixup A - offset: 2, value: foo+2, kind: FK_390_PC16DBL + cij %r1, -66, 7, foo + +#CHECK: cij %r1, -66, 8, foo # encoding: [0xec,0x18,A,A,0xbe,0x7e] +#CHECK: fixup A - offset: 2, value: foo+2, kind: FK_390_PC16DBL +#CHECK: cije %r1, -66, foo # encoding: [0xec,0x18,A,A,0xbe,0x7e] +#CHECK: fixup A - offset: 2, value: foo+2, kind: FK_390_PC16DBL +#CHECK: cijnlh %r1, -66, foo # encoding: [0xec,0x18,A,A,0xbe,0x7e] +#CHECK: fixup A - offset: 2, value: foo+2, kind: FK_390_PC16DBL + cij %r1, -66, 8, foo + cije %r1, -66, foo + cijnlh %r1, -66, foo + +#CHECK: cij %r1, -66, 9, foo # encoding: [0xec,0x19,A,A,0xbe,0x7e] +#CHECK: fixup A - offset: 2, value: foo+2, kind: FK_390_PC16DBL + cij %r1, -66, 9, foo + +#CHECK: cij %r1, -66, 10, foo # encoding: [0xec,0x1a,A,A,0xbe,0x7e] +#CHECK: fixup A - offset: 2, value: foo+2, kind: FK_390_PC16DBL +#CHECK: cijhe %r1, -66, foo # encoding: [0xec,0x1a,A,A,0xbe,0x7e] +#CHECK: fixup A - offset: 2, value: foo+2, kind: FK_390_PC16DBL +#CHECK: cijnl %r1, -66, foo # encoding: [0xec,0x1a,A,A,0xbe,0x7e] +#CHECK: fixup A - offset: 2, value: foo+2, kind: FK_390_PC16DBL + cij %r1, -66, 10, foo + cijhe %r1, -66, foo + cijnl %r1, -66, foo + +#CHECK: cij %r1, -66, 11, foo # encoding: [0xec,0x1b,A,A,0xbe,0x7e] +#CHECK: fixup A - offset: 2, value: foo+2, kind: FK_390_PC16DBL + cij %r1, -66, 11, foo + +#CHECK: cij %r1, -66, 12, foo # encoding: [0xec,0x1c,A,A,0xbe,0x7e] +#CHECK: fixup A - offset: 2, value: foo+2, kind: FK_390_PC16DBL +#CHECK: cijle %r1, -66, foo # encoding: [0xec,0x1c,A,A,0xbe,0x7e] +#CHECK: fixup A - offset: 2, value: foo+2, kind: FK_390_PC16DBL +#CHECK: cijnh %r1, -66, foo # encoding: [0xec,0x1c,A,A,0xbe,0x7e] +#CHECK: fixup A - offset: 2, value: foo+2, kind: FK_390_PC16DBL + cij %r1, -66, 12, foo + cijle %r1, -66, foo + cijnh %r1, -66, foo + +#CHECK: cij %r1, -66, 13, foo # encoding: [0xec,0x1d,A,A,0xbe,0x7e] +#CHECK: fixup A - offset: 2, value: foo+2, kind: FK_390_PC16DBL + cij %r1, -66, 13, foo + +#CHECK: cij %r1, -66, 14, foo # encoding: [0xec,0x1e,A,A,0xbe,0x7e] +#CHECK: fixup A - offset: 2, value: foo+2, kind: FK_390_PC16DBL + cij %r1, -66, 14, foo + +#CHECK: cij %r1, -66, 15, foo # encoding: [0xec,0x1f,A,A,0xbe,0x7e] +#CHECK: fixup A - offset: 2, value: foo+2, kind: FK_390_PC16DBL + cij %r1, -66, 15, foo + +#CHECK: cij %r1, -66, 0, bar+100 # encoding: [0xec,0x10,A,A,0xbe,0x7e] +#CHECK: fixup A - offset: 2, value: (bar+100)+2, kind: FK_390_PC16DBL + cij %r1, -66, 0, bar+100 + +#CHECK: cijh %r1, -66, bar+100 # encoding: [0xec,0x12,A,A,0xbe,0x7e] +#CHECK: fixup A - offset: 2, value: (bar+100)+2, kind: FK_390_PC16DBL + cijh %r1, -66, bar+100 + +#CHECK: cijnle %r1, -66, bar+100 # encoding: [0xec,0x12,A,A,0xbe,0x7e] +#CHECK: fixup A - offset: 2, value: (bar+100)+2, kind: FK_390_PC16DBL + cijnle %r1, -66, bar+100 + +#CHECK: cijl %r1, -66, bar+100 # encoding: [0xec,0x14,A,A,0xbe,0x7e] +#CHECK: fixup A - offset: 2, value: (bar+100)+2, kind: FK_390_PC16DBL + cijl %r1, -66, bar+100 + +#CHECK: cijnhe %r1, -66, bar+100 # encoding: [0xec,0x14,A,A,0xbe,0x7e] +#CHECK: fixup A - offset: 2, value: (bar+100)+2, kind: FK_390_PC16DBL + cijnhe %r1, -66, bar+100 + +#CHECK: cijlh %r1, -66, bar+100 # encoding: [0xec,0x16,A,A,0xbe,0x7e] +#CHECK: fixup A - offset: 2, value: (bar+100)+2, kind: FK_390_PC16DBL + cijlh %r1, -66, bar+100 + +#CHECK: cijne %r1, -66, bar+100 # encoding: [0xec,0x16,A,A,0xbe,0x7e] +#CHECK: fixup A - offset: 2, value: (bar+100)+2, kind: FK_390_PC16DBL + cijne %r1, -66, bar+100 + +#CHECK: cije %r1, -66, bar+100 # encoding: [0xec,0x18,A,A,0xbe,0x7e] +#CHECK: fixup A - offset: 2, value: (bar+100)+2, kind: FK_390_PC16DBL + cije %r1, -66, bar+100 + +#CHECK: cijnlh %r1, -66, bar+100 # encoding: [0xec,0x18,A,A,0xbe,0x7e] +#CHECK: fixup A - offset: 2, value: (bar+100)+2, kind: FK_390_PC16DBL + cijnlh %r1, -66, bar+100 + +#CHECK: cijhe %r1, -66, bar+100 # encoding: [0xec,0x1a,A,A,0xbe,0x7e] +#CHECK: fixup A - offset: 2, value: (bar+100)+2, kind: FK_390_PC16DBL + cijhe %r1, -66, bar+100 + +#CHECK: cijnl %r1, -66, bar+100 # encoding: [0xec,0x1a,A,A,0xbe,0x7e] +#CHECK: fixup A - offset: 2, value: (bar+100)+2, kind: FK_390_PC16DBL + cijnl %r1, -66, bar+100 + +#CHECK: cijle %r1, -66, bar+100 # encoding: [0xec,0x1c,A,A,0xbe,0x7e] +#CHECK: fixup A - offset: 2, value: (bar+100)+2, kind: FK_390_PC16DBL + cijle %r1, -66, bar+100 + +#CHECK: cijnh %r1, -66, bar+100 # encoding: [0xec,0x1c,A,A,0xbe,0x7e] +#CHECK: fixup A - offset: 2, value: (bar+100)+2, kind: FK_390_PC16DBL + cijnh %r1, -66, bar+100 + +#CHECK: cij %r1, -66, 0, bar@PLT # encoding: [0xec,0x10,A,A,0xbe,0x7e] +#CHECK: fixup A - offset: 2, value: bar@PLT+2, kind: FK_390_PC16DBL + cij %r1, -66, 0, bar@PLT + +#CHECK: cijh %r1, -66, bar@PLT # encoding: [0xec,0x12,A,A,0xbe,0x7e] +#CHECK: fixup A - offset: 2, value: bar@PLT+2, kind: FK_390_PC16DBL + cijh %r1, -66, bar@PLT + +#CHECK: cijnle %r1, -66, bar@PLT # encoding: [0xec,0x12,A,A,0xbe,0x7e] +#CHECK: fixup A - offset: 2, value: bar@PLT+2, kind: FK_390_PC16DBL + cijnle %r1, -66, bar@PLT + +#CHECK: cijl %r1, -66, bar@PLT # encoding: [0xec,0x14,A,A,0xbe,0x7e] +#CHECK: fixup A - offset: 2, value: bar@PLT+2, kind: FK_390_PC16DBL + cijl %r1, -66, bar@PLT + +#CHECK: cijnhe %r1, -66, bar@PLT # encoding: [0xec,0x14,A,A,0xbe,0x7e] +#CHECK: fixup A - offset: 2, value: bar@PLT+2, kind: FK_390_PC16DBL + cijnhe %r1, -66, bar@PLT + +#CHECK: cijlh %r1, -66, bar@PLT # encoding: [0xec,0x16,A,A,0xbe,0x7e] +#CHECK: fixup A - offset: 2, value: bar@PLT+2, kind: FK_390_PC16DBL + cijlh %r1, -66, bar@PLT + +#CHECK: cijne %r1, -66, bar@PLT # encoding: [0xec,0x16,A,A,0xbe,0x7e] +#CHECK: fixup A - offset: 2, value: bar@PLT+2, kind: FK_390_PC16DBL + cijne %r1, -66, bar@PLT + +#CHECK: cije %r1, -66, bar@PLT # encoding: [0xec,0x18,A,A,0xbe,0x7e] +#CHECK: fixup A - offset: 2, value: bar@PLT+2, kind: FK_390_PC16DBL + cije %r1, -66, bar@PLT + +#CHECK: cijnlh %r1, -66, bar@PLT # encoding: [0xec,0x18,A,A,0xbe,0x7e] +#CHECK: fixup A - offset: 2, value: bar@PLT+2, kind: FK_390_PC16DBL + cijnlh %r1, -66, bar@PLT + +#CHECK: cijhe %r1, -66, bar@PLT # encoding: [0xec,0x1a,A,A,0xbe,0x7e] +#CHECK: fixup A - offset: 2, value: bar@PLT+2, kind: FK_390_PC16DBL + cijhe %r1, -66, bar@PLT + +#CHECK: cijnl %r1, -66, bar@PLT # encoding: [0xec,0x1a,A,A,0xbe,0x7e] +#CHECK: fixup A - offset: 2, value: bar@PLT+2, kind: FK_390_PC16DBL + cijnl %r1, -66, bar@PLT + +#CHECK: cijle %r1, -66, bar@PLT # encoding: [0xec,0x1c,A,A,0xbe,0x7e] +#CHECK: fixup A - offset: 2, value: bar@PLT+2, kind: FK_390_PC16DBL + cijle %r1, -66, bar@PLT + +#CHECK: cijnh %r1, -66, bar@PLT # encoding: [0xec,0x1c,A,A,0xbe,0x7e] +#CHECK: fixup A - offset: 2, value: bar@PLT+2, kind: FK_390_PC16DBL + cijnh %r1, -66, bar@PLT + #CHECK: cl %r0, 0 # encoding: [0x55,0x00,0x00,0x00] #CHECK: cl %r0, 4095 # encoding: [0x55,0x00,0x0f,0xff] #CHECK: cl %r0, 0(%r1) # encoding: [0x55,0x00,0x10,0x00]