## These instructions are referenced by .plt entries.
# CHECK: 10010200 <.glink>:
-# CHECK-NEXT: b .+8
-# CHECK-NEXT: b .+4
+# CHECK-NEXT: b 0x10010208
+# CHECK-NEXT: b 0x10010208
## PLTresolve
## Operands of lis & lwz: .got+4 = 0x10020070+4 = 65536*4098+700
# HEX: 0x0004036c 00010294 00010298 0001029c
## These instructions are referenced by .plt entries.
-# PIE: 00010294 <.glink>:
-# SHARED: 000102b4 <.glink>:
-# CHECK-NEXT: b .+12
-# CHECK-NEXT: b .+8
-# CHECK-NEXT: b .+4
+# CHECK: [[#%x,GLINK:]] <.glink>:
+# CHECK-NEXT: b 0x[[#%x,GLINK+12]]
+# CHECK-NEXT: b 0x[[#%x,GLINK+12]]
+# CHECK-NEXT: b 0x[[#%x,GLINK+12]]
## PLTresolve
## Operand of addi: 0x100a8-.glink = 24
# CHECK-NEXT: bctr
## The 3 b instructions are referenced by .plt entries.
-# CHECK-NEXT: 1001025c: b .+12
-# CHECK-NEXT: b .+8
-# CHECK-NEXT: b .+4
+# CHECK-NEXT: 1001025c: b 0x10010268
+# CHECK-NEXT: b 0x10010268
+# CHECK-NEXT: b 0x10010268
## PLTresolve of 64 bytes is at the end.
## Operands of addis & addi: -0x1001025c = 65536*-4097-604
## R_PPC_REL24 and R_PPC_PLTREL24 are converted to PC relative relocations if the
## symbol is non-preemptable. The addend of R_PPC_PLTREL24 should be ignored.
-# CHECK: <_start>:
-# CHECK-NEXT: b .+12
-# CHECK-NEXT: b .+8
-# CHECK-NEXT: b .+4
+# CHECK: [[#%x,ADDR:]] <_start>:
+# CHECK-NEXT: b 0x[[#%x,ADDR+12]]
+# CHECK-NEXT: b 0x[[#%x,ADDR+12]]
+# CHECK-NEXT: b 0x[[#%x,ADDR+12]]
# CHECK-EMPTY:
# CHECK-NEXT: <foo>:
b 1f
1:
# CHECK-LABEL: section .R_PPC_REL24:
-# CHECK: b .+4
+# CHECK: b 0x100100bc
.section .R_PPC_REL32,"ax",@progbits
.long 1f - .
b 1f@PLT+32768
1:
# CHECK-LABEL: section .R_PPC_PLTREL24:
-# CHECK: b .+4
+# CHECK: b 0x100100c4
.section .R_PPC_LOCAL24PC,"ax",@progbits
b 1f@local
1:
# CHECK-LABEL: section .R_PPC_LOCAL24PC:
-# CHECK: b .+4
+# CHECK: b 0x100100c8
# thunks.
# CHECK-LABEL: test
# CHECK: 10010014: bl 0x12010010
-# CHECK: 10010024: b .+33554428
+# CHECK: 10010024: b 0x12010020
# NEGOFFSET-LABEL: test
# NEGOFFSET: 10010014: bl 0xe010014
-# NEGOFFSET: 10010024: b .+33554432
+# NEGOFFSET: 10010024: b 0xe010024
# THUNK-LABEL: <test>:
# THUNK: 10010014: bl 0x10010028
-# THUNK: 10010024: b .+20
+# THUNK: 10010024: b 0x10010038
# .branch_lt[0]
# THUNK-LABEL: <__long_branch_callee>:
.section .R_PPC64_REL24,"ax",@progbits
b rel16
# CHECK-LABEL: Disassembly of section .R_PPC64_REL24:
-# CHECK: b .+67108840
+# CHECK: 100101b0: b 0x10010198
.section .REL32_AND_REL64,"ax",@progbits
.cfi_startproc
noretbranch:
b bar_local
// CHECK-LABEL: <noretbranch>:
-// CHECK: 100102e0: b .+67108832
+// CHECK-NEXT: 100102e0: b 0x100102c0
// CHECK-EMPTY:
// This should come last to check the end-of-buffer condition.
return MCDisassembler::Success;
}
-static DecodeStatus DecodePCRel24BranchTarget(MCInst &Inst, unsigned Imm,
- uint64_t Addr,
- const void *Decoder) {
+static DecodeStatus decodeDirectBrTarget(MCInst &Inst, unsigned Imm,
+ uint64_t /*Address*/,
+ const void * /*Decoder*/) {
int32_t Offset = SignExtend32<24>(Imm);
Inst.addOperand(MCOperand::createImm(Offset));
return MCDisassembler::Success;
def directbrtarget : Operand<OtherVT> {
let PrintMethod = "printBranchOperand";
let EncoderMethod = "getDirectBrEncoding";
+ let DecoderMethod = "decodeDirectBrTarget";
let ParserMatchClass = PPCDirectBrAsmOperand;
+ let OperandType = "OPERAND_PCREL";
}
def absdirectbrtarget : Operand<OtherVT> {
let PrintMethod = "printAbsBranchOperand";
def calltarget : Operand<iPTR> {
let PrintMethod = "printBranchOperand";
let EncoderMethod = "getDirectBrEncoding";
- let DecoderMethod = "DecodePCRel24BranchTarget";
+ let DecoderMethod = "decodeDirectBrTarget";
let ParserMatchClass = PPCDirectBrAsmOperand;
let OperandType = "OPERAND_PCREL";
}
# Check for the long branch.
# CHECK-LE: 08 00 82 4{{[01]}} b{{[tf]}} 2, 0xc
-# CHECK-LE-NEXT: fc 7f 00 48 b .+32764
+# CHECK-LE-NEXT: fc 7f 00 48 b 0x8004
# CHECK-LE-DAG: paddi 3, 3, 13, 0
# CHECK-LE-DAG: paddi 3, 3, 21, 0
# CHECK-LE: blr
# CHECK-BE: 4{{[01]}} 82 00 08 b{{[tf]}} 2, 0xc
-# CHECK-BE-NEXT: 48 00 7f fc b .+32764
+# CHECK-BE-NEXT: 48 00 7f fc b 0x8004
# CHECK-BE-DAG: paddi 3, 3, 13, 0
# CHECK-BE-DAG: paddi 3, 3, 21, 0
# CHECK-BE: blr
bl .+4
# CHECK-LABEL: <b>:
-# CHECK-NEXT: b .+67108860
-# CHECK-NEXT: b .+0
-# CHECK-NEXT: b .+4
+# CHECK-NEXT: b 0x8
+# CHECK-NEXT: b 0x10
+# CHECK-NEXT: b 0x18
b:
b .-4