diff --git a/llvm/lib/Target/AVR/AsmParser/AVRAsmParser.cpp b/llvm/lib/Target/AVR/AsmParser/AVRAsmParser.cpp index 383dfcc31117c1..c016b2dd91dc67 100644 --- a/llvm/lib/Target/AVR/AsmParser/AVRAsmParser.cpp +++ b/llvm/lib/Target/AVR/AsmParser/AVRAsmParser.cpp @@ -72,7 +72,7 @@ class AVRAsmParser : public MCTargetAsmParser { int parseRegisterName(); int parseRegister(bool RestoreOnFailure = false); bool tryParseRegisterOperand(OperandVector &Operands); - bool tryParseExpression(OperandVector &Operands); + bool tryParseExpression(OperandVector &Operands, int64_t offset); bool tryParseRelocExpression(OperandVector &Operands); void eatComma(); @@ -418,7 +418,7 @@ bool AVRAsmParser::tryParseRegisterOperand(OperandVector &Operands) { return false; } -bool AVRAsmParser::tryParseExpression(OperandVector &Operands) { +bool AVRAsmParser::tryParseExpression(OperandVector &Operands, int64_t offset) { SMLoc S = Parser.getTok().getLoc(); if (!tryParseRelocExpression(Operands)) @@ -437,6 +437,11 @@ bool AVRAsmParser::tryParseExpression(OperandVector &Operands) { if (getParser().parseExpression(Expression)) return true; + if (offset) { + Expression = MCBinaryExpr::createAdd( + Expression, MCConstantExpr::create(offset, getContext()), getContext()); + } + SMLoc E = SMLoc::getFromPointer(Parser.getTok().getLoc().getPointer() - 1); Operands.push_back(AVROperand::CreateImm(Expression, S, E)); return false; @@ -529,8 +534,9 @@ bool AVRAsmParser::parseOperand(OperandVector &Operands, bool maybeReg) { [[fallthrough]]; case AsmToken::LParen: case AsmToken::Integer: + return tryParseExpression(Operands, 0); case AsmToken::Dot: - return tryParseExpression(Operands); + return tryParseExpression(Operands, 2); case AsmToken::Plus: case AsmToken::Minus: { // If the sign preceeds a number, parse the number, @@ -540,7 +546,7 @@ bool AVRAsmParser::parseOperand(OperandVector &Operands, bool maybeReg) { case AsmToken::BigNum: case AsmToken::Identifier: case AsmToken::Real: - if (!tryParseExpression(Operands)) + if (!tryParseExpression(Operands, 0)) return false; break; default: @@ -643,6 +649,7 @@ bool AVRAsmParser::ParseInstruction(ParseInstructionInfo &Info, // These specific operands should be treated as addresses/symbols/labels, // other than registers. bool maybeReg = true; + if (OperandNum == 1) { std::array Insts = {"lds", "adiw", "sbiw", "ldi"}; for (auto Inst : Insts) { diff --git a/llvm/lib/Target/AVR/MCTargetDesc/AVRAsmBackend.cpp b/llvm/lib/Target/AVR/MCTargetDesc/AVRAsmBackend.cpp index 0d29912bee2646..388d58a82214d1 100644 --- a/llvm/lib/Target/AVR/MCTargetDesc/AVRAsmBackend.cpp +++ b/llvm/lib/Target/AVR/MCTargetDesc/AVRAsmBackend.cpp @@ -94,6 +94,9 @@ static void adjustRelativeBranch(unsigned Size, const MCFixup &Fixup, // Rightshifts the value by one. AVR::fixups::adjustBranchTarget(Value); + + // Jumps are relative to the current instruction. + Value -= 1; } /// 22-bit absolute fixup. @@ -513,15 +516,10 @@ bool AVRAsmBackend::shouldForceRelocation(const MCAssembler &Asm, switch ((unsigned)Fixup.getKind()) { default: return Fixup.getKind() >= FirstLiteralRelocationKind; - // Fixups which should always be recorded as relocations. case AVR::fixup_7_pcrel: case AVR::fixup_13_pcrel: - // Do not force relocation for PC relative branch like 'rjmp .', - // 'rcall . - off' and 'breq . + off'. - if (const auto *SymA = Target.getSymA()) - if (SymA->getSymbol().getName().size() == 0) - return false; - [[fallthrough]]; + // Always resolve relocations for PC-relative branches + return false; case AVR::fixup_call: return true; } diff --git a/llvm/test/CodeGen/AVR/jmp.ll b/llvm/test/CodeGen/AVR/jmp.ll new file mode 100644 index 00000000000000..95dfff4836b4e8 --- /dev/null +++ b/llvm/test/CodeGen/AVR/jmp.ll @@ -0,0 +1,25 @@ +; RUN: llc -filetype=obj -mtriple=avr < %s | llvm-objdump -dr --no-show-raw-insn - | FileCheck %s + +define i8 @foo(i8 %a) { +bb0: + %0 = tail call i8 @bar(i8 %a) + %1 = icmp eq i8 %0, 123 + br i1 %1, label %bb1, label %bb2 + +bb1: + ret i8 100 + +bb2: + ret i8 200 +} + +declare i8 @bar(i8); + +; CHECK: rcall .-2 +; CHECK-NEXT: 00000000: R_AVR_13_PCREL bar +; CHECK-NEXT: cpi r24, 0x7b +; CHECK-NEXT: brne .+4 +; CHECK-NEXT: ldi r24, 0x64 +; CHECK-NEXT: ret +; CHECK-NEXT: ldi r24, 0xc8 +; CHECK-NEXT: ret diff --git a/llvm/test/MC/AVR/hex-immediates.s b/llvm/test/MC/AVR/hex-immediates.s index a6ff541a9ac947..7819b7f5f6afd6 100644 --- a/llvm/test/MC/AVR/hex-immediates.s +++ b/llvm/test/MC/AVR/hex-immediates.s @@ -1,6 +1,6 @@ ; RUN: llvm-mc -filetype=obj -triple=avr %s -o %t ; RUN: llvm-objdump --no-print-imm-hex -d %t | FileCheck %s --check-prefix=DEC -; RUN: llvm-objdump -d --print-imm-hex %t | FileCheck %s --check-prefix=HEX +; RUN: llvm-objdump -dr --print-imm-hex %t | FileCheck %s --check-prefix=HEX ; DEC: ldi r24, 66 ; HEX: ldi r24, 0x42 diff --git a/llvm/test/MC/AVR/inst-adc.s b/llvm/test/MC/AVR/inst-adc.s index d1157bc7a9b3ba..6f29577377b27c 100644 --- a/llvm/test/MC/AVR/inst-adc.s +++ b/llvm/test/MC/AVR/inst-adc.s @@ -1,9 +1,7 @@ ; RUN: llvm-mc -triple avr -show-encoding < %s | FileCheck %s -; RUN: llvm-mc -filetype=obj -triple avr < %s | llvm-objdump -d - | FileCheck --check-prefix=CHECK-INST %s - +; RUN: llvm-mc -filetype=obj -triple avr < %s | llvm-objdump -dr - | FileCheck --check-prefix=CHECK-INST %s foo: - adc r0, r15 adc r15, r0 adc r16, r31 diff --git a/llvm/test/MC/AVR/inst-add.s b/llvm/test/MC/AVR/inst-add.s index 49ad5de80c06b9..828f4cf0cc3bd2 100644 --- a/llvm/test/MC/AVR/inst-add.s +++ b/llvm/test/MC/AVR/inst-add.s @@ -1,9 +1,7 @@ ; RUN: llvm-mc -triple avr -show-encoding < %s | FileCheck %s -; RUN: llvm-mc -filetype=obj -triple avr < %s | llvm-objdump -d - | FileCheck --check-prefix=CHECK-INST %s - +; RUN: llvm-mc -filetype=obj -triple avr < %s | llvm-objdump -dr - | FileCheck --check-prefix=CHECK-INST %s foo: - add r0, r15 add r15, r0 add r16, r31 diff --git a/llvm/test/MC/AVR/inst-adiw.s b/llvm/test/MC/AVR/inst-adiw.s index 7904965a51d68d..6b83027234c11c 100644 --- a/llvm/test/MC/AVR/inst-adiw.s +++ b/llvm/test/MC/AVR/inst-adiw.s @@ -1,9 +1,7 @@ ; RUN: llvm-mc -triple avr -mattr=addsubiw -show-encoding < %s | FileCheck %s ; RUN: llvm-mc -filetype=obj -triple avr -mattr=addsubiw < %s | llvm-objdump --no-print-imm-hex -dr --mattr=addsubiw - | FileCheck --check-prefix=CHECK-INST %s - foo: - adiw r26, 12 adiw r26, 63 diff --git a/llvm/test/MC/AVR/inst-and.s b/llvm/test/MC/AVR/inst-and.s index c4d90bfba37477..aa62a3114a204b 100644 --- a/llvm/test/MC/AVR/inst-and.s +++ b/llvm/test/MC/AVR/inst-and.s @@ -1,9 +1,7 @@ ; RUN: llvm-mc -triple avr -show-encoding < %s | FileCheck %s -; RUN: llvm-mc -filetype=obj -triple avr < %s | llvm-objdump -d - | FileCheck --check-prefix=CHECK-INST %s - +; RUN: llvm-mc -filetype=obj -triple avr < %s | llvm-objdump -dr - | FileCheck --check-prefix=CHECK-INST %s foo: - and r0, r15 and r15, r0 and r16, r31 diff --git a/llvm/test/MC/AVR/inst-andi.s b/llvm/test/MC/AVR/inst-andi.s index 96a090173bd786..14f85bbd660100 100644 --- a/llvm/test/MC/AVR/inst-andi.s +++ b/llvm/test/MC/AVR/inst-andi.s @@ -1,9 +1,7 @@ ; RUN: llvm-mc -triple avr -show-encoding < %s | FileCheck %s -; RUN: llvm-mc -filetype=obj -triple avr < %s | llvm-objdump --no-print-imm-hex -d - | FileCheck --check-prefix=CHECK-INST %s - +; RUN: llvm-mc -filetype=obj -triple avr < %s | llvm-objdump --no-print-imm-hex -dr - | FileCheck --check-prefix=CHECK-INST %s foo: - andi r16, 255 andi r29, 190 andi r22, 172 diff --git a/llvm/test/MC/AVR/inst-asr.s b/llvm/test/MC/AVR/inst-asr.s index 1b59d027dc2bcc..0fedf9b5ac121c 100644 --- a/llvm/test/MC/AVR/inst-asr.s +++ b/llvm/test/MC/AVR/inst-asr.s @@ -1,9 +1,7 @@ ; RUN: llvm-mc -triple avr -show-encoding < %s | FileCheck %s -; RUN: llvm-mc -filetype=obj -triple avr < %s | llvm-objdump -d - | FileCheck -check-prefix=CHECK-INST %s - +; RUN: llvm-mc -filetype=obj -triple avr < %s | llvm-objdump -dr - | FileCheck -check-prefix=CHECK-INST %s foo: - asr r31 asr r25 asr r5 diff --git a/llvm/test/MC/AVR/inst-bld.s b/llvm/test/MC/AVR/inst-bld.s index 71352c5c0abd80..1dbd6815448c4e 100644 --- a/llvm/test/MC/AVR/inst-bld.s +++ b/llvm/test/MC/AVR/inst-bld.s @@ -1,9 +1,7 @@ ; RUN: llvm-mc -triple avr -show-encoding < %s | FileCheck %s -; RUN: llvm-mc -filetype=obj -triple avr < %s | llvm-objdump --no-print-imm-hex -d - | FileCheck --check-prefix=CHECK-INST %s - +; RUN: llvm-mc -filetype=obj -triple avr < %s | llvm-objdump --no-print-imm-hex -dr - | FileCheck --check-prefix=CHECK-INST %s foo: - bld r3, 5 bld r1, 1 bld r0, 0 diff --git a/llvm/test/MC/AVR/inst-brbc.s b/llvm/test/MC/AVR/inst-brbc.s index 4d7d684da4468a..4edbbfd8580248 100644 --- a/llvm/test/MC/AVR/inst-brbc.s +++ b/llvm/test/MC/AVR/inst-brbc.s @@ -1,9 +1,8 @@ ; RUN: llvm-mc -triple avr -show-encoding < %s | FileCheck %s ; RUN: llvm-mc -filetype=obj -triple avr < %s \ -; RUN: | llvm-objdump -d - | FileCheck --check-prefix=INST %s +; RUN: | llvm-objdump -dr - | FileCheck --check-prefix=INST %s foo: - brbc 3, .+8 brbc 0, .-16 .short 0xf759 @@ -11,14 +10,16 @@ foo: .short 0xf74c .short 0xf4c7 -; CHECK: brvc .Ltmp0+8 ; encoding: [0bAAAAA011,0b111101AA] -; CHECK: ; fixup A - offset: 0, value: .Ltmp0+8, kind: fixup_7_pcrel -; CHECK: brcc .Ltmp1-16 ; encoding: [0bAAAAA000,0b111101AA] -; CHECK: ; fixup A - offset: 0, value: .Ltmp1-16, kind: fixup_7_pcrel +; CHECK: brvc (.Ltmp0+8)+2 ; encoding: [0bAAAAA011,0b111101AA] +; CHECK-NEXT: ; fixup A - offset: 0, value: (.Ltmp0+8)+2, kind: fixup_7_pcrel +; +; CHECK: brcc (.Ltmp1-16)+2 ; encoding: [0bAAAAA000,0b111101AA] +; CHECK-NEXT: ; fixup A - offset: 0, value: (.Ltmp1-16)+2, kind: fixup_7_pcrel -; INST: 23 f4 brvc .+8 -; INST: c0 f7 brsh .-16 -; INST: 59 f7 brne .-42 -; INST: 52 f7 brpl .-44 -; INST: 4c f7 brge .-46 -; INST: c7 f4 brid .+48 +; INST-LABEL: : +; INST-NEXT: 23 f4 brvc .+8 +; INST-NEXT: c0 f7 brsh .-16 +; INST-NEXT: 59 f7 brne .-42 +; INST-NEXT: 52 f7 brpl .-44 +; INST-NEXT: 4c f7 brge .-46 +; INST-NEXT: c7 f4 brid .+48 diff --git a/llvm/test/MC/AVR/inst-brbs.s b/llvm/test/MC/AVR/inst-brbs.s index 7987feeec654a1..3f4b134aef682c 100644 --- a/llvm/test/MC/AVR/inst-brbs.s +++ b/llvm/test/MC/AVR/inst-brbs.s @@ -1,9 +1,8 @@ ; RUN: llvm-mc -triple avr -show-encoding < %s | FileCheck %s ; RUN: llvm-mc -filetype=obj -triple avr < %s \ -; RUN: | llvm-objdump -d - | FileCheck --check-prefix=INST %s +; RUN: | llvm-objdump -dr - | FileCheck --check-prefix=INST %s foo: - brbs 3, .+8 brbs 0, .-12 .short 0xf359 @@ -11,14 +10,15 @@ foo: .short 0xf34c .short 0xf077 -; CHECK: brvs .Ltmp0+8 ; encoding: [0bAAAAA011,0b111100AA] -; CHECK: ; fixup A - offset: 0, value: .Ltmp0+8, kind: fixup_7_pcrel -; CHECK: brcs .Ltmp1-12 ; encoding: [0bAAAAA000,0b111100AA] -; CHECK: ; fixup A - offset: 0, value: .Ltmp1-12, kind: fixup_7_pcrel +; CHECK: brvs (.Ltmp0+8)+2 ; encoding: [0bAAAAA011,0b111100AA] +; CHECK-NEXT: ; fixup A - offset: 0, value: (.Ltmp0+8)+2, kind: fixup_7_pcrel +; CHECK: brcs (.Ltmp1-12)+2 ; encoding: [0bAAAAA000,0b111100AA] +; CHECK-NEXT: ; fixup A - offset: 0, value: (.Ltmp1-12)+2, kind: fixup_7_pcrel -; INST: 23 f0 brvs .+8 -; INST: d0 f3 brlo .-12 -; INST: 59 f3 breq .-42 -; INST: 52 f3 brmi .-44 -; INST: 4c f3 brlt .-46 -; INST: 77 f0 brie .+28 +; INST-LABEL: : +; INST-NEXT: 23 f0 brvs .+8 +; INST-NEXT: d0 f3 brlo .-12 +; INST-NEXT: 59 f3 breq .-42 +; INST-NEXT: 52 f3 brmi .-44 +; INST-NEXT: 4c f3 brlt .-46 +; INST-NEXT: 77 f0 brie .+28 diff --git a/llvm/test/MC/AVR/inst-brcc.s b/llvm/test/MC/AVR/inst-brcc.s new file mode 100644 index 00000000000000..dd1b2b11a6d306 --- /dev/null +++ b/llvm/test/MC/AVR/inst-brcc.s @@ -0,0 +1,28 @@ +; RUN: llvm-mc -triple avr -show-encoding < %s | FileCheck %s +; +; RUN: llvm-mc -filetype=obj -triple avr < %s \ +; RUN: | llvm-objdump -dr - \ +; RUN: | FileCheck --check-prefix=INST %s + +foo: + brcc .+66 + brcc .-22 + brbc 0, .+66 + brbc 0, bar + +bar: + +; CHECK: brcc (.Ltmp0+66)+2 ; encoding: [0bAAAAA000,0b111101AA] +; CHECK-NEXT: ; fixup A - offset: 0, value: (.Ltmp0+66)+2, kind: fixup_7_pcrel +; CHECK: brcc (.Ltmp1-22)+2 ; encoding: [0bAAAAA000,0b111101AA] +; CHECK-NEXT: ; fixup A - offset: 0, value: (.Ltmp1-22)+2, kind: fixup_7_pcrel +; CHECK: brcc (.Ltmp2+66)+2 ; encoding: [0bAAAAA000,0b111101AA] +; CHECK-NEXT: ; fixup A - offset: 0, value: (.Ltmp2+66)+2, kind: fixup_7_pcrel +; CHECK: brcc bar ; encoding: [0bAAAAA000,0b111101AA] +; CHECK-NEXT: ; fixup A - offset: 0, value: bar, kind: fixup_7_pcrel + +; INST-LABEL: : +; INST-NEXT: 08 f5 brsh .+66 +; INST-NEXT: a8 f7 brsh .-22 +; INST-NEXT: 08 f5 brsh .+66 +; INST-NEXT: 00 f4 brsh .+0 diff --git a/llvm/test/MC/AVR/inst-brcs.s b/llvm/test/MC/AVR/inst-brcs.s new file mode 100644 index 00000000000000..3fafccdb49257c --- /dev/null +++ b/llvm/test/MC/AVR/inst-brcs.s @@ -0,0 +1,28 @@ +; RUN: llvm-mc -triple avr -show-encoding < %s | FileCheck %s +; +; RUN: llvm-mc -filetype=obj -triple avr < %s \ +; RUN: | llvm-objdump -dr - \ +; RUN: | FileCheck --check-prefix=INST %s + +foo: + brcs .+8 + brcs .+4 + brbs 0, .+8 + brbs 0, bar + +bar: + +; CHECK: brcs (.Ltmp0+8)+2 ; encoding: [0bAAAAA000,0b111100AA] +; CHECK-NEXT: ; fixup A - offset: 0, value: (.Ltmp0+8)+2, kind: fixup_7_pcrel +; CHECK: brcs (.Ltmp1+4)+2 ; encoding: [0bAAAAA000,0b111100AA] +; CHECK-NEXT: ; fixup A - offset: 0, value: (.Ltmp1+4)+2, kind: fixup_7_pcrel +; CHECK: brcs (.Ltmp2+8)+2 ; encoding: [0bAAAAA000,0b111100AA] +; CHECK-NEXT: ; fixup A - offset: 0, value: (.Ltmp2+8)+2, kind: fixup_7_pcrel +; CHECK: brcs bar ; encoding: [0bAAAAA000,0b111100AA] +; CHECK-NEXT: ; fixup A - offset: 0, value: bar, kind: fixup_7_pcrel + +; INST-LABEL: : +; INST-NEXT: 20 f0 brlo .+8 +; INST-NEXT: 10 f0 brlo .+4 +; INST-NEXT: 20 f0 brlo .+8 +; INST-NEXT: 00 f0 brlo .+0 diff --git a/llvm/test/MC/AVR/inst-break.s b/llvm/test/MC/AVR/inst-break.s index a1bfde93c5a0d7..10e7ea584a3400 100644 --- a/llvm/test/MC/AVR/inst-break.s +++ b/llvm/test/MC/AVR/inst-break.s @@ -1,9 +1,7 @@ ; RUN: llvm-mc -triple avr -mattr=break -show-encoding < %s | FileCheck %s -; RUN: llvm-mc -filetype=obj -triple avr -mattr=break < %s | llvm-objdump -d --mattr=break - | FileCheck --check-prefix=CHECK-INST %s - +; RUN: llvm-mc -filetype=obj -triple avr -mattr=break < %s | llvm-objdump -dr --mattr=break - | FileCheck --check-prefix=CHECK-INST %s foo: - break ; CHECK: break ; encoding: [0x98,0x95] diff --git a/llvm/test/MC/AVR/inst-breq.s b/llvm/test/MC/AVR/inst-breq.s new file mode 100644 index 00000000000000..7a6eac6f01ad07 --- /dev/null +++ b/llvm/test/MC/AVR/inst-breq.s @@ -0,0 +1,28 @@ +; RUN: llvm-mc -triple avr -show-encoding < %s | FileCheck %s +; +; RUN: llvm-mc -filetype=obj -triple avr < %s \ +; RUN: | llvm-objdump -dr - \ +; RUN: | FileCheck --check-prefix=INST %s + +foo: + breq .-18 + breq .-12 + brbs 1, .-18 + brbs 1, bar + +bar: + +; CHECK: breq (.Ltmp0-18)+2 ; encoding: [0bAAAAA001,0b111100AA] +; CHECK-NEXT: ; fixup A - offset: 0, value: (.Ltmp0-18)+2, kind: fixup_7_pcrel +; CHECK: breq (.Ltmp1-12)+2 ; encoding: [0bAAAAA001,0b111100AA] +; CHECK-NEXT: ; fixup A - offset: 0, value: (.Ltmp1-12)+2, kind: fixup_7_pcrel +; CHECK: brbs 1, (.Ltmp2-18)+2 ; encoding: [0bAAAAA001,0b111100AA] +; CHECK-NEXT: ; fixup A - offset: 0, value: (.Ltmp2-18)+2, kind: fixup_7_pcrel +; CHECK: brbs 1, bar ; encoding: [0bAAAAA001,0b111100AA] +; CHECK-NEXT: ; fixup A - offset: 0, value: bar, kind: fixup_7_pcrel + +; INST-LABEL: : +; INST-NEXT: b9 f3 breq .-18 +; INST-NEXT: d1 f3 breq .-12 +; INST-NEXT: b9 f3 breq .-18 +; INST-NEXT: 01 f0 breq .+0 diff --git a/llvm/test/MC/AVR/inst-brge.s b/llvm/test/MC/AVR/inst-brge.s new file mode 100644 index 00000000000000..6cf79db4dbd659 --- /dev/null +++ b/llvm/test/MC/AVR/inst-brge.s @@ -0,0 +1,24 @@ +; RUN: llvm-mc -triple avr -show-encoding < %s | FileCheck %s +; +; RUN: llvm-mc -filetype=obj -triple avr < %s \ +; RUN: | llvm-objdump -dr - \ +; RUN: | FileCheck --check-prefix=INST %s + +foo: + brge .+50 + brge .+42 + brge bar + +bar: + +; CHECK: brge (.Ltmp0+50)+2 ; encoding: [0bAAAAA100,0b111101AA] +; CHECK-NEXT: ; fixup A - offset: 0, value: (.Ltmp0+50)+2, kind: fixup_7_pcrel +; CHECK: brge (.Ltmp1+42)+2 ; encoding: [0bAAAAA100,0b111101AA] +; CHECK-NEXT: ; fixup A - offset: 0, value: (.Ltmp1+42)+2, kind: fixup_7_pcrel +; CHECK: brge bar ; encoding: [0bAAAAA100,0b111101AA] +; CHECK-NEXT: ; fixup A - offset: 0, value: bar, kind: fixup_7_pcrel + +; INST-LABEL: : +; INST-NEXT: cc f4 brge .+50 +; INST-NEXT: ac f4 brge .+42 +; INST-NEXT: 04 f4 brge .+0 diff --git a/llvm/test/MC/AVR/inst-brhc.s b/llvm/test/MC/AVR/inst-brhc.s new file mode 100644 index 00000000000000..924895e4bf5df1 --- /dev/null +++ b/llvm/test/MC/AVR/inst-brhc.s @@ -0,0 +1,24 @@ +; RUN: llvm-mc -triple avr -show-encoding < %s | FileCheck %s +; +; RUN: llvm-mc -filetype=obj -triple avr < %s \ +; RUN: | llvm-objdump -dr - \ +; RUN: | FileCheck --check-prefix=INST %s + +foo: + brhc .+12 + brhc .+14 + brhc bar + +bar: + +; CHECK: brhc (.Ltmp0+12)+2 ; encoding: [0bAAAAA101,0b111101AA] +; CHECK-NEXT: ; fixup A - offset: 0, value: (.Ltmp0+12)+2, kind: fixup_7_pcrel +; CHECK: brhc (.Ltmp1+14)+2 ; encoding: [0bAAAAA101,0b111101AA] +; CHECK-NEXT: ; fixup A - offset: 0, value: (.Ltmp1+14)+2, kind: fixup_7_pcrel +; CHECK: brhc bar ; encoding: [0bAAAAA101,0b111101AA] +; CHECK-NEXT: ; fixup A - offset: 0, value: bar, kind: fixup_7_pcrel + +; INST-LABEL: : +; INST-NEXT: 35 f4 brhc .+12 +; INST-NEXT: 3d f4 brhc .+14 +; INST-NEXT: 05 f4 brhc .+0 diff --git a/llvm/test/MC/AVR/inst-brhs.s b/llvm/test/MC/AVR/inst-brhs.s new file mode 100644 index 00000000000000..9704ce5e7e5ac2 --- /dev/null +++ b/llvm/test/MC/AVR/inst-brhs.s @@ -0,0 +1,24 @@ +; RUN: llvm-mc -triple avr -show-encoding < %s | FileCheck %s +; +; RUN: llvm-mc -filetype=obj -triple avr < %s \ +; RUN: | llvm-objdump -dr - \ +; RUN: | FileCheck --check-prefix=INST %s + +foo: + brhs .-66 + brhs .+14 + brhs bar + +bar: + +; CHECK: brhs (.Ltmp0-66)+2 ; encoding: [0bAAAAA101,0b111100AA] +; CHECK-NEXT: ; fixup A - offset: 0, value: (.Ltmp0-66)+2, kind: fixup_7_pcrel +; CHECK: brhs (.Ltmp1+14)+2 ; encoding: [0bAAAAA101,0b111100AA] +; CHECK-NEXT: ; fixup A - offset: 0, value: (.Ltmp1+14)+2, kind: fixup_7_pcrel +; CHECK: brhs bar ; encoding: [0bAAAAA101,0b111100AA] +; CHECK-NEXT: ; fixup A - offset: 0, value: bar, kind: fixup_7_pcrel + +; INST-LABEL: : +; INST-NEXT: fd f2 brhs .-66 +; INST-NEXT: 3d f0 brhs .+14 +; INST-NEXT: 05 f0 brhs .+0 diff --git a/llvm/test/MC/AVR/inst-brid.s b/llvm/test/MC/AVR/inst-brid.s new file mode 100644 index 00000000000000..e03c293677887b --- /dev/null +++ b/llvm/test/MC/AVR/inst-brid.s @@ -0,0 +1,24 @@ +; RUN: llvm-mc -triple avr -show-encoding < %s | FileCheck %s +; +; RUN: llvm-mc -filetype=obj -triple avr < %s \ +; RUN: | llvm-objdump -dr - \ +; RUN: | FileCheck --check-prefix=INST %s + +foo: + brid .+42 + brid .+62 + brid bar + +bar: + +; CHECK: brid (.Ltmp0+42)+2 ; encoding: [0bAAAAA111,0b111101AA] +; CHECK-NEXT: ; fixup A - offset: 0, value: (.Ltmp0+42)+2, kind: fixup_7_pcrel +; CHECK: brid (.Ltmp1+62)+2 ; encoding: [0bAAAAA111,0b111101AA] +; CHECK-NEXT: ; fixup A - offset: 0, value: (.Ltmp1+62)+2, kind: fixup_7_pcrel +; CHECK: brid bar ; encoding: [0bAAAAA111,0b111101AA] +; CHECK-NEXT: ; fixup A - offset: 0, value: bar, kind: fixup_7_pcrel + +; INST-LABEL: : +; INST-NEXT: af f4 brid .+42 +; INST-NEXT: ff f4 brid .+62 +; INST-NEXT: 07 f4 brid .+0 diff --git a/llvm/test/MC/AVR/inst-brie.s b/llvm/test/MC/AVR/inst-brie.s new file mode 100644 index 00000000000000..74b724b20bd9e7 --- /dev/null +++ b/llvm/test/MC/AVR/inst-brie.s @@ -0,0 +1,24 @@ +; RUN: llvm-mc -triple avr -show-encoding < %s | FileCheck %s +; +; RUN: llvm-mc -filetype=obj -triple avr < %s \ +; RUN: | llvm-objdump -dr - \ +; RUN: | FileCheck --check-prefix=INST %s + +foo: + brie .+20 + brie .+40 + brie bar + +bar: + +; CHECK: brie (.Ltmp0+20)+2 ; encoding: [0bAAAAA111,0b111100AA] +; CHECK-NEXT: ; fixup A - offset: 0, value: (.Ltmp0+20)+2, kind: fixup_7_pcrel +; CHECK: brie (.Ltmp1+40)+2 ; encoding: [0bAAAAA111,0b111100AA] +; CHECK-NEXT: ; fixup A - offset: 0, value: (.Ltmp1+40)+2, kind: fixup_7_pcrel +; CHECK: brie bar ; encoding: [0bAAAAA111,0b111100AA] +; CHECK-NEXT: ; fixup A - offset: 0, value: bar, kind: fixup_7_pcrel + +; INST-LABEL: : +; INST-NEXT: 57 f0 brie .+20 +; INST-NEXT: a7 f0 brie .+40 +; INST-NEXT: 07 f0 brie .+0 diff --git a/llvm/test/MC/AVR/inst-brlo.s b/llvm/test/MC/AVR/inst-brlo.s new file mode 100644 index 00000000000000..2726d943e0e788 --- /dev/null +++ b/llvm/test/MC/AVR/inst-brlo.s @@ -0,0 +1,24 @@ +; RUN: llvm-mc -triple avr -show-encoding < %s | FileCheck %s +; +; RUN: llvm-mc -filetype=obj -triple avr < %s \ +; RUN: | llvm-objdump -dr - \ +; RUN: | FileCheck --check-prefix=INST %s + +foo: + brlo .+12 + brlo .+28 + brlo bar + +bar: + +; CHECK: brlo (.Ltmp0+12)+2 ; encoding: [0bAAAAA000,0b111100AA] +; CHECK-NEXT: ; fixup A - offset: 0, value: (.Ltmp0+12)+2, kind: fixup_7_pcrel +; CHECK: brlo (.Ltmp1+28)+2 ; encoding: [0bAAAAA000,0b111100AA] +; CHECK-NEXT: ; fixup A - offset: 0, value: (.Ltmp1+28)+2, kind: fixup_7_pcrel +; CHECK: brlo bar ; encoding: [0bAAAAA000,0b111100AA] +; CHECK-NEXT: ; fixup A - offset: 0, value: bar, kind: fixup_7_pcrel + +; INST-LABEL: : +; INST-NEXT: 30 f0 brlo .+12 +; INST-NEXT: 70 f0 brlo .+28 +; INST-NEXT: 00 f0 brlo .+0 diff --git a/llvm/test/MC/AVR/inst-brlt.s b/llvm/test/MC/AVR/inst-brlt.s new file mode 100644 index 00000000000000..299a873963e5b3 --- /dev/null +++ b/llvm/test/MC/AVR/inst-brlt.s @@ -0,0 +1,24 @@ +; RUN: llvm-mc -triple avr -show-encoding < %s | FileCheck %s +; +; RUN: llvm-mc -filetype=obj -triple avr < %s \ +; RUN: | llvm-objdump -dr - \ +; RUN: | FileCheck --check-prefix=INST %s + +foo: + brlt .+16 + brlt .+2 + brlt bar + +bar: + +; CHECK: brlt (.Ltmp0+16)+2 ; encoding: [0bAAAAA100,0b111100AA] +; CHECK-NEXT: ; fixup A - offset: 0, value: (.Ltmp0+16)+2, kind: fixup_7_pcrel +; CHECK: brlt (.Ltmp1+2)+2 ; encoding: [0bAAAAA100,0b111100AA] +; CHECK-NEXT: ; fixup A - offset: 0, value: (.Ltmp1+2)+2, kind: fixup_7_pcrel +; CHECK: brlt bar ; encoding: [0bAAAAA100,0b111100AA] +; CHECK-NEXT: ; fixup A - offset: 0, value: bar, kind: fixup_7_pcrel + +; INST-LABEL: : +; INST-NEXT: 44 f0 brlt .+16 +; INST-NEXT: 0c f0 brlt .+2 +; INST-NEXT: 04 f0 brlt .+0 diff --git a/llvm/test/MC/AVR/inst-brmi.s b/llvm/test/MC/AVR/inst-brmi.s new file mode 100644 index 00000000000000..96f7e484f465f3 --- /dev/null +++ b/llvm/test/MC/AVR/inst-brmi.s @@ -0,0 +1,24 @@ +; RUN: llvm-mc -triple avr -show-encoding < %s | FileCheck %s +; +; RUN: llvm-mc -filetype=obj -triple avr < %s \ +; RUN: | llvm-objdump -dr - \ +; RUN: | FileCheck --check-prefix=INST %s + +foo: + brmi .+66 + brmi .+58 + brmi bar + +bar: + +; CHECK: brmi (.Ltmp0+66)+2 ; encoding: [0bAAAAA010,0b111100AA] +; CHECK-NEXT: ; fixup A - offset: 0, value: (.Ltmp0+66)+2, kind: fixup_7_pcrel +; CHECK: brmi (.Ltmp1+58)+2 ; encoding: [0bAAAAA010,0b111100AA] +; CHECK-NEXT: ; fixup A - offset: 0, value: (.Ltmp1+58)+2, kind: fixup_7_pcrel +; CHECK: brmi bar ; encoding: [0bAAAAA010,0b111100AA] +; CHECK-NEXT: ; fixup A - offset: 0, value: bar, kind: fixup_7_pcrel + +; INST-LABEL: : +; INST-NEXT: 0a f1 brmi .+66 +; INST-NEXT: ea f0 brmi .+58 +; INST-NEXT: 02 f0 brmi .+0 diff --git a/llvm/test/MC/AVR/inst-brne.s b/llvm/test/MC/AVR/inst-brne.s new file mode 100644 index 00000000000000..ab89d516681d34 --- /dev/null +++ b/llvm/test/MC/AVR/inst-brne.s @@ -0,0 +1,28 @@ +; RUN: llvm-mc -triple avr -show-encoding < %s | FileCheck %s +; +; RUN: llvm-mc -filetype=obj -triple avr < %s \ +; RUN: | llvm-objdump -dr - \ +; RUN: | FileCheck --check-prefix=INST %s + +foo: + brne .+10 + brne .+2 + brbc 1, .+10 + brbc 1, bar + +bar: + +; CHECK: brne (.Ltmp0+10)+2 ; encoding: [0bAAAAA001,0b111101AA] +; CHECK-NEXT: ; fixup A - offset: 0, value: (.Ltmp0+10)+2, kind: fixup_7_pcrel +; CHECK: brne (.Ltmp1+2)+2 ; encoding: [0bAAAAA001,0b111101AA] +; CHECK-NEXT: ; fixup A - offset: 0, value: (.Ltmp1+2)+2, kind: fixup_7_pcrel +; CHECK: brbc 1, (.Ltmp2+10)+2 ; encoding: [0bAAAAA001,0b111101AA] +; CHECK-NEXT: ; fixup A - offset: 0, value: (.Ltmp2+10)+2, kind: fixup_7_pcrel +; CHECK: brbc 1, bar ; encoding: [0bAAAAA001,0b111101AA] +; CHECK-NEXT: ; fixup A - offset: 0, value: bar, kind: fixup_7_pcrel + +; INST-LABEL: : +; INST-NEXT: 29 f4 brne .+10 +; INST-NEXT: 09 f4 brne .+2 +; INST-NEXT: 29 f4 brne .+10 +; INST-NEXT: 01 f4 brne .+0 diff --git a/llvm/test/MC/AVR/inst-brpl.s b/llvm/test/MC/AVR/inst-brpl.s new file mode 100644 index 00000000000000..cd2f697ae8f209 --- /dev/null +++ b/llvm/test/MC/AVR/inst-brpl.s @@ -0,0 +1,24 @@ +; RUN: llvm-mc -triple avr -show-encoding < %s | FileCheck %s +; +; RUN: llvm-mc -filetype=obj -triple avr < %s \ +; RUN: | llvm-objdump -dr - \ +; RUN: | FileCheck --check-prefix=INST %s + +foo: + brpl .-12 + brpl .+18 + brpl bar + +bar: + +; CHECK: brpl (.Ltmp0-12)+2 ; encoding: [0bAAAAA010,0b111101AA] +; CHECK-NEXT: ; fixup A - offset: 0, value: (.Ltmp0-12)+2, kind: fixup_7_pcrel +; CHECK: brpl (.Ltmp1+18)+2 ; encoding: [0bAAAAA010,0b111101AA] +; CHECK-NEXT: ; fixup A - offset: 0, value: (.Ltmp1+18)+2, kind: fixup_7_pcrel +; CHECK: brpl bar ; encoding: [0bAAAAA010,0b111101AA] +; CHECK-NEXT: ; fixup A - offset: 0, value: bar, kind: fixup_7_pcrel + +; INST-LABEL: : +; INST-NEXT: d2 f7 brpl .-12 +; INST-NEXT: 4a f4 brpl .+18 +; INST-NEXT: 02 f4 brpl .+0 diff --git a/llvm/test/MC/AVR/inst-brsh.s b/llvm/test/MC/AVR/inst-brsh.s new file mode 100644 index 00000000000000..b066c917f72aec --- /dev/null +++ b/llvm/test/MC/AVR/inst-brsh.s @@ -0,0 +1,24 @@ +; RUN: llvm-mc -triple avr -show-encoding < %s | FileCheck %s +; +; RUN: llvm-mc -filetype=obj -triple avr < %s \ +; RUN: | llvm-objdump -dr - \ +; RUN: | FileCheck --check-prefix=INST %s + +foo: + brsh .+32 + brsh .+70 + brsh bar + +bar: + +; CHECK: brsh (.Ltmp0+32)+2 ; encoding: [0bAAAAA000,0b111101AA] +; CHECK-NEXT: ; fixup A - offset: 0, value: (.Ltmp0+32)+2, kind: fixup_7_pcrel +; CHECK: brsh (.Ltmp1+70)+2 ; encoding: [0bAAAAA000,0b111101AA] +; CHECK-NEXT: ; fixup A - offset: 0, value: (.Ltmp1+70)+2, kind: fixup_7_pcrel +; CHECK: brsh bar ; encoding: [0bAAAAA000,0b111101AA] +; CHECK-NEXT: ; fixup A - offset: 0, value: bar, kind: fixup_7_pcrel + +; INST-LABEL: : +; INST-NEXT: 80 f4 brsh .+32 +; INST-NEXT: 18 f5 brsh .+70 +; INST-NEXT: 00 f4 brsh .+0 diff --git a/llvm/test/MC/AVR/inst-brtc.s b/llvm/test/MC/AVR/inst-brtc.s new file mode 100644 index 00000000000000..64421df10baf5a --- /dev/null +++ b/llvm/test/MC/AVR/inst-brtc.s @@ -0,0 +1,24 @@ +; RUN: llvm-mc -triple avr -show-encoding < %s | FileCheck %s +; +; RUN: llvm-mc -filetype=obj -triple avr < %s \ +; RUN: | llvm-objdump -dr - \ +; RUN: | FileCheck --check-prefix=INST %s + +foo: + brtc .+52 + brtc .+50 + brtc bar + +bar: + +; CHECK: brtc (.Ltmp0+52)+2 ; encoding: [0bAAAAA110,0b111101AA] +; CHECK-NEXT: ; fixup A - offset: 0, value: (.Ltmp0+52)+2, kind: fixup_7_pcrel +; CHECK: brtc (.Ltmp1+50)+2 ; encoding: [0bAAAAA110,0b111101AA] +; CHECK-NEXT: ; fixup A - offset: 0, value: (.Ltmp1+50)+2, kind: fixup_7_pcrel +; CHECK: brtc bar ; encoding: [0bAAAAA110,0b111101AA] +; CHECK-NEXT: ; fixup A - offset: 0, value: bar, kind: fixup_7_pcrel + +; INST-LABEL: : +; INST-NEXT: d6 f4 brtc .+52 +; INST-NEXT: ce f4 brtc .+50 +; INST-NEXT: 06 f4 brtc .+0 diff --git a/llvm/test/MC/AVR/inst-brts.s b/llvm/test/MC/AVR/inst-brts.s new file mode 100644 index 00000000000000..bb02b6f3d475dc --- /dev/null +++ b/llvm/test/MC/AVR/inst-brts.s @@ -0,0 +1,24 @@ +; RUN: llvm-mc -triple avr -show-encoding < %s | FileCheck %s +; +; RUN: llvm-mc -filetype=obj -triple avr < %s \ +; RUN: | llvm-objdump -dr - \ +; RUN: | FileCheck --check-prefix=INST %s + +foo: + brts .+18 + brts .+22 + brts bar + +bar: + +; CHECK: brts (.Ltmp0+18)+2 ; encoding: [0bAAAAA110,0b111100AA] +; CHECK-NEXT: ; fixup A - offset: 0, value: (.Ltmp0+18)+2, kind: fixup_7_pcrel +; CHECK: brts (.Ltmp1+22)+2 ; encoding: [0bAAAAA110,0b111100AA] +; CHECK-NEXT: ; fixup A - offset: 0, value: (.Ltmp1+22)+2, kind: fixup_7_pcrel +; CHECK: brts bar ; encoding: [0bAAAAA110,0b111100AA] +; CHECK-NEXT: ; fixup A - offset: 0, value: bar, kind: fixup_7_pcrel + +; INST-LABEL: : +; INST-NEXT: 4e f0 brts .+18 +; INST-NEXT: 5e f0 brts .+22 +; INST-NEXT: 06 f0 brts .+0 diff --git a/llvm/test/MC/AVR/inst-brvc.s b/llvm/test/MC/AVR/inst-brvc.s new file mode 100644 index 00000000000000..52b9f3b9b403cf --- /dev/null +++ b/llvm/test/MC/AVR/inst-brvc.s @@ -0,0 +1,24 @@ +; RUN: llvm-mc -triple avr -show-encoding < %s | FileCheck %s +; +; RUN: llvm-mc -filetype=obj -triple avr < %s \ +; RUN: | llvm-objdump -dr - \ +; RUN: | FileCheck --check-prefix=INST %s + +foo: + brvc .-28 + brvc .-62 + brvc bar + +bar: + +; CHECK: brvc (.Ltmp0-28)+2 ; encoding: [0bAAAAA011,0b111101AA] +; CHECK-NEXT: ; fixup A - offset: 0, value: (.Ltmp0-28)+2, kind: fixup_7_pcrel +; CHECK: brvc (.Ltmp1-62)+2 ; encoding: [0bAAAAA011,0b111101AA] +; CHECK-NEXT: ; fixup A - offset: 0, value: (.Ltmp1-62)+2, kind: fixup_7_pcrel +; CHECK: brvc bar ; encoding: [0bAAAAA011,0b111101AA] +; CHECK-NEXT: ; fixup A - offset: 0, value: bar, kind: fixup_7_pcrel + +; INST-LABEL: : +; INST-NEXT: 93 f7 brvc .-28 +; INST-NEXT: 0b f7 brvc .-62 +; INST-NEXT: 03 f4 brvc .+0 diff --git a/llvm/test/MC/AVR/inst-brvs.s b/llvm/test/MC/AVR/inst-brvs.s new file mode 100644 index 00000000000000..10382a8e6fd67e --- /dev/null +++ b/llvm/test/MC/AVR/inst-brvs.s @@ -0,0 +1,24 @@ +; RUN: llvm-mc -triple avr -show-encoding < %s | FileCheck %s +; +; RUN: llvm-mc -filetype=obj -triple avr < %s \ +; RUN: | llvm-objdump -dr - \ +; RUN: | FileCheck --check-prefix=INST %s + +foo: + brvs .+18 + brvs .+32 + brvs bar + +bar: + +; CHECK: brvs (.Ltmp0+18)+2 ; encoding: [0bAAAAA011,0b111100AA] +; CHECK-NEXT: ; fixup A - offset: 0, value: (.Ltmp0+18)+2, kind: fixup_7_pcrel +; CHECK: brvs (.Ltmp1+32)+2 ; encoding: [0bAAAAA011,0b111100AA] +; CHECK-NEXT: ; fixup A - offset: 0, value: (.Ltmp1+32)+2, kind: fixup_7_pcrel +; CHECK: brvs bar ; encoding: [0bAAAAA011,0b111100AA] +; CHECK-NEXT: ; fixup A - offset: 0, value: bar, kind: fixup_7_pcrel + +; INST-LABEL: : +; INST-NEXT: 4b f0 brvs .+18 +; INST-NEXT: 83 f0 brvs .+32 +; INST-NEXT: 03 f0 brvs .+0 diff --git a/llvm/test/MC/AVR/inst-bst.s b/llvm/test/MC/AVR/inst-bst.s index e97454c497681d..1f5fccf2db7825 100644 --- a/llvm/test/MC/AVR/inst-bst.s +++ b/llvm/test/MC/AVR/inst-bst.s @@ -1,9 +1,7 @@ ; RUN: llvm-mc -triple avr -show-encoding < %s | FileCheck %s -; RUN: llvm-mc -filetype=obj -triple avr < %s | llvm-objdump --no-print-imm-hex -d - | FileCheck --check-prefix=CHECK-INST %s - +; RUN: llvm-mc -filetype=obj -triple avr < %s | llvm-objdump --no-print-imm-hex -dr - | FileCheck --check-prefix=CHECK-INST %s foo: - bst r3, 5 bst r1, 1 bst r0, 0 diff --git a/llvm/test/MC/AVR/inst-call.s b/llvm/test/MC/AVR/inst-call.s index 5ded5e1de6a1b1..491a38346bbe0d 100644 --- a/llvm/test/MC/AVR/inst-call.s +++ b/llvm/test/MC/AVR/inst-call.s @@ -1,9 +1,7 @@ ; RUN: llvm-mc -triple avr -mattr=jmpcall -show-encoding < %s | FileCheck %s ; RUN: llvm-mc -filetype=obj -triple avr -mattr=jmpcall < %s | llvm-objdump --no-print-imm-hex -dr --mattr=jmpcall - | FileCheck -check-prefix=CHECK-INST %s - foo: - call 4096 call -124 call -12 diff --git a/llvm/test/MC/AVR/inst-cbi.s b/llvm/test/MC/AVR/inst-cbi.s index f92435347f310a..6fa9c46960fcd3 100644 --- a/llvm/test/MC/AVR/inst-cbi.s +++ b/llvm/test/MC/AVR/inst-cbi.s @@ -1,9 +1,7 @@ ; RUN: llvm-mc -triple avr -show-encoding < %s | FileCheck %s -; RUN: llvm-mc -filetype=obj -triple avr < %s | llvm-objdump --no-print-imm-hex -d - | FileCheck -check-prefix=CHECK-INST %s - +; RUN: llvm-mc -filetype=obj -triple avr < %s | llvm-objdump --no-print-imm-hex -dr - | FileCheck -check-prefix=CHECK-INST %s foo: - cbi 3, 5 cbi 1, 1 cbi 7, 2 diff --git a/llvm/test/MC/AVR/inst-cbr.s b/llvm/test/MC/AVR/inst-cbr.s index 12e9a9d10d2871..dc07bc0b3e9421 100644 --- a/llvm/test/MC/AVR/inst-cbr.s +++ b/llvm/test/MC/AVR/inst-cbr.s @@ -1,9 +1,7 @@ ; RUN: llvm-mc -triple avr -show-encoding < %s | FileCheck %s -; RUN: llvm-mc -filetype=obj -triple avr < %s | llvm-objdump --no-print-imm-hex -d - | FileCheck --check-prefix=CHECK-INST %s - +; RUN: llvm-mc -filetype=obj -triple avr < %s | llvm-objdump --no-print-imm-hex -dr - | FileCheck --check-prefix=CHECK-INST %s foo: - cbr r17, 208 cbr r24, 190 cbr r20, 173 diff --git a/llvm/test/MC/AVR/inst-clr.s b/llvm/test/MC/AVR/inst-clr.s index d5966ae8e0953d..65b1a0604bf801 100644 --- a/llvm/test/MC/AVR/inst-clr.s +++ b/llvm/test/MC/AVR/inst-clr.s @@ -1,9 +1,7 @@ ; RUN: llvm-mc -triple avr -show-encoding < %s | FileCheck %s -; RUN: llvm-mc -filetype=obj -triple avr < %s | llvm-objdump -d - | FileCheck --check-prefix=CHECK-INST %s - +; RUN: llvm-mc -filetype=obj -triple avr < %s | llvm-objdump -dr - | FileCheck --check-prefix=CHECK-INST %s foo: - clr r2 clr r12 clr r5 diff --git a/llvm/test/MC/AVR/inst-com.s b/llvm/test/MC/AVR/inst-com.s index 43e3b0a96ccd76..a2b6f211d19938 100644 --- a/llvm/test/MC/AVR/inst-com.s +++ b/llvm/test/MC/AVR/inst-com.s @@ -1,9 +1,7 @@ ; RUN: llvm-mc -triple avr -show-encoding < %s | FileCheck %s -; RUN: llvm-mc -filetype=obj -triple avr < %s | llvm-objdump -d - | FileCheck -check-prefix=CHECK-INST %s - +; RUN: llvm-mc -filetype=obj -triple avr < %s | llvm-objdump -dr - | FileCheck -check-prefix=CHECK-INST %s foo: - com r30 com r17 com r4 diff --git a/llvm/test/MC/AVR/inst-cp.s b/llvm/test/MC/AVR/inst-cp.s index 68c363046bb9d2..97c2b94fe21e93 100644 --- a/llvm/test/MC/AVR/inst-cp.s +++ b/llvm/test/MC/AVR/inst-cp.s @@ -1,9 +1,7 @@ ; RUN: llvm-mc -triple avr -show-encoding < %s | FileCheck %s -; RUN: llvm-mc -filetype=obj -triple avr < %s | llvm-objdump -d - | FileCheck --check-prefix=CHECK-INST %s - +; RUN: llvm-mc -filetype=obj -triple avr < %s | llvm-objdump -dr - | FileCheck --check-prefix=CHECK-INST %s foo: - cp r12, r2 cp r19, r0 cp r15, r31 diff --git a/llvm/test/MC/AVR/inst-cpc.s b/llvm/test/MC/AVR/inst-cpc.s index 04c96b1d814177..b7e696c720cc81 100644 --- a/llvm/test/MC/AVR/inst-cpc.s +++ b/llvm/test/MC/AVR/inst-cpc.s @@ -1,9 +1,7 @@ ; RUN: llvm-mc -triple avr -show-encoding < %s | FileCheck %s -; RUN: llvm-mc -filetype=obj -triple avr < %s | llvm-objdump -d - | FileCheck --check-prefix=CHECK-INST %s - +; RUN: llvm-mc -filetype=obj -triple avr < %s | llvm-objdump -dr - | FileCheck --check-prefix=CHECK-INST %s foo: - cp r13, r12 cp r20, r0 cp r10, r31 diff --git a/llvm/test/MC/AVR/inst-cpi.s b/llvm/test/MC/AVR/inst-cpi.s index f0ef2c4aa43d73..e17b505e791c54 100644 --- a/llvm/test/MC/AVR/inst-cpi.s +++ b/llvm/test/MC/AVR/inst-cpi.s @@ -1,9 +1,7 @@ ; RUN: llvm-mc -triple avr -show-encoding < %s | FileCheck %s -; RUN: llvm-mc -filetype=obj -triple avr < %s | llvm-objdump --no-print-imm-hex -d - | FileCheck --check-prefix=CHECK-INST %s - +; RUN: llvm-mc -filetype=obj -triple avr < %s | llvm-objdump --no-print-imm-hex -dr - | FileCheck --check-prefix=CHECK-INST %s foo: - cpi r16, 241 cpi r29, 190 cpi r22, 172 diff --git a/llvm/test/MC/AVR/inst-cpse.s b/llvm/test/MC/AVR/inst-cpse.s index 209491ec70c676..4a9f2a7ece1a12 100644 --- a/llvm/test/MC/AVR/inst-cpse.s +++ b/llvm/test/MC/AVR/inst-cpse.s @@ -1,9 +1,7 @@ ; RUN: llvm-mc -triple avr -show-encoding < %s | FileCheck %s -; RUN: llvm-mc -filetype=obj -triple avr < %s | llvm-objdump -d - | FileCheck --check-prefix=CHECK-INST %s - +; RUN: llvm-mc -filetype=obj -triple avr < %s | llvm-objdump -dr - | FileCheck --check-prefix=CHECK-INST %s foo: - cpse r2, r13 cpse r9, r0 cpse r5, r31 diff --git a/llvm/test/MC/AVR/inst-dec.s b/llvm/test/MC/AVR/inst-dec.s index c419f7f97ee46e..57140ede17481a 100644 --- a/llvm/test/MC/AVR/inst-dec.s +++ b/llvm/test/MC/AVR/inst-dec.s @@ -1,9 +1,7 @@ ; RUN: llvm-mc -triple avr -show-encoding < %s | FileCheck %s -; RUN: llvm-mc -filetype=obj -triple avr < %s | llvm-objdump -d - | FileCheck -check-prefix=CHECK-INST %s - +; RUN: llvm-mc -filetype=obj -triple avr < %s | llvm-objdump -dr - | FileCheck -check-prefix=CHECK-INST %s foo: - dec r26 dec r3 dec r24 diff --git a/llvm/test/MC/AVR/inst-des.s b/llvm/test/MC/AVR/inst-des.s index 746e6f2e07f33e..14576f994e4851 100644 --- a/llvm/test/MC/AVR/inst-des.s +++ b/llvm/test/MC/AVR/inst-des.s @@ -1,9 +1,7 @@ ; RUN: llvm-mc -triple avr -mattr=des -show-encoding < %s | FileCheck %s -; RUN: llvm-mc -filetype=obj -triple avr -mattr=des < %s | llvm-objdump --no-print-imm-hex -d --mattr=des - | FileCheck --check-prefix=CHECK-INST %s - +; RUN: llvm-mc -filetype=obj -triple avr -mattr=des < %s | llvm-objdump --no-print-imm-hex -dr --mattr=des - | FileCheck --check-prefix=CHECK-INST %s foo: - des 0 des 6 des 1 diff --git a/llvm/test/MC/AVR/inst-eicall.s b/llvm/test/MC/AVR/inst-eicall.s index 49ce2255186170..c589542ee602f3 100644 --- a/llvm/test/MC/AVR/inst-eicall.s +++ b/llvm/test/MC/AVR/inst-eicall.s @@ -1,9 +1,7 @@ ; RUN: llvm-mc -triple avr -mattr=eijmpcall -show-encoding < %s | FileCheck %s -; RUN: llvm-mc -filetype=obj -triple avr -mattr=eijmpcall < %s | llvm-objdump -d --mattr=eijmpcall - | FileCheck --check-prefix=CHECK-INST %s - +; RUN: llvm-mc -filetype=obj -triple avr -mattr=eijmpcall < %s | llvm-objdump -dr --mattr=eijmpcall - | FileCheck --check-prefix=CHECK-INST %s foo: - eicall ; CHECK: eicall ; encoding: [0x19,0x95] diff --git a/llvm/test/MC/AVR/inst-eijmp.s b/llvm/test/MC/AVR/inst-eijmp.s index 78e2f539a8b009..b3f4460668e006 100644 --- a/llvm/test/MC/AVR/inst-eijmp.s +++ b/llvm/test/MC/AVR/inst-eijmp.s @@ -1,9 +1,7 @@ ; RUN: llvm-mc -triple avr -mattr=eijmpcall -show-encoding < %s | FileCheck %s -; RUN: llvm-mc -filetype=obj -triple avr -mattr=eijmpcall < %s | llvm-objdump -d --mattr=eijmpcall - | FileCheck --check-prefix=CHECK-INST %s - +; RUN: llvm-mc -filetype=obj -triple avr -mattr=eijmpcall < %s | llvm-objdump -dr --mattr=eijmpcall - | FileCheck --check-prefix=CHECK-INST %s foo: - eijmp ; CHECK: eijmp ; encoding: [0x19,0x94] diff --git a/llvm/test/MC/AVR/inst-elpm.s b/llvm/test/MC/AVR/inst-elpm.s index ac67fdb22403ed..d718dae0277ece 100644 --- a/llvm/test/MC/AVR/inst-elpm.s +++ b/llvm/test/MC/AVR/inst-elpm.s @@ -1,9 +1,7 @@ ; RUN: llvm-mc -triple avr -mattr=elpm,elpmx -show-encoding < %s | FileCheck %s -; RUN: llvm-mc -filetype=obj -triple avr -mattr=elpm,elpmx < %s | llvm-objdump -d --mattr=elpm,elpmx - | FileCheck -check-prefix=CHECK-INST %s - +; RUN: llvm-mc -filetype=obj -triple avr -mattr=elpm,elpmx < %s | llvm-objdump -dr --mattr=elpm,elpmx - | FileCheck -check-prefix=CHECK-INST %s foo: - elpm elpm r3, Z diff --git a/llvm/test/MC/AVR/inst-eor.s b/llvm/test/MC/AVR/inst-eor.s index 1664eeed40e50e..43fed04266b8f0 100644 --- a/llvm/test/MC/AVR/inst-eor.s +++ b/llvm/test/MC/AVR/inst-eor.s @@ -1,9 +1,7 @@ ; RUN: llvm-mc -triple avr -show-encoding < %s | FileCheck %s -; RUN: llvm-mc -filetype=obj -triple avr < %s | llvm-objdump -d - | FileCheck --check-prefix=CHECK-INST %s - +; RUN: llvm-mc -filetype=obj -triple avr < %s | llvm-objdump -dr - | FileCheck --check-prefix=CHECK-INST %s foo: - eor r0, r15 eor r15, r0 eor r16, r31 diff --git a/llvm/test/MC/AVR/inst-family-cond-branch.s b/llvm/test/MC/AVR/inst-family-cond-branch.s deleted file mode 100644 index dc36425a884f3b..00000000000000 --- a/llvm/test/MC/AVR/inst-family-cond-branch.s +++ /dev/null @@ -1,321 +0,0 @@ -; RUN: llvm-mc -triple avr -show-encoding < %s | FileCheck %s -; RUN: llvm-mc -filetype=obj -triple avr < %s \ -; RUN: | llvm-objdump -d - | FileCheck --check-prefix=INST %s - - -foo: - ; BREQ - breq .-18 - breq .-12 - brbs 1, .-18 - brbs 1, baz - -; CHECK: breq .Ltmp0-18 ; encoding: [0bAAAAA001,0b111100AA] -; CHECK: ; fixup A - offset: 0, value: .Ltmp0-18, kind: fixup_7_pcrel -; CHECK: breq .Ltmp1-12 ; encoding: [0bAAAAA001,0b111100AA] -; CHECK: ; fixup A - offset: 0, value: .Ltmp1-12, kind: fixup_7_pcrel -; CHECK: brbs 1, .Ltmp2-18 ; encoding: [0bAAAAA001,0b111100AA] -; CHECK: ; fixup A - offset: 0, value: .Ltmp2-18, kind: fixup_7_pcrel -; CHECK: brbs 1, baz ; encoding: [0bAAAAA001,0b111100AA] -; CHECK: ; fixup A - offset: 0, value: baz, kind: fixup_7_pcrel - -; INST-LABEL: : -; INST: breq .-18 -; INST: breq .-12 -; INST: breq .-18 -; INST: breq .+0 - - ; BRNE - brne .+10 - brne .+2 - brbc 1, .+10 - brbc 1, bar - -; CHECK: brne .Ltmp3+10 ; encoding: [0bAAAAA001,0b111101AA] -; CHECK: ; fixup A - offset: 0, value: .Ltmp3+10, kind: fixup_7_pcrel -; CHECK: brne .Ltmp4+2 ; encoding: [0bAAAAA001,0b111101AA] -; CHECK: ; fixup A - offset: 0, value: .Ltmp4+2, kind: fixup_7_pcrel -; CHECK: brbc 1, .Ltmp5+10 ; encoding: [0bAAAAA001,0b111101AA] -; CHECK: ; fixup A - offset: 0, value: .Ltmp5+10, kind: fixup_7_pcrel -; CHECK: brbc 1, bar ; encoding: [0bAAAAA001,0b111101AA] -; CHECK: ; fixup A - offset: 0, value: bar, kind: fixup_7_pcrel - -; INST: brne .+10 -; INST: brne .+2 -; INST: brne .+10 -; INST: brne .+0 - -bar: - ; BRCS - brcs .+8 - brcs .+4 - brbs 0, .+8 - brbs 0, end - -; CHECK: brcs .Ltmp6+8 ; encoding: [0bAAAAA000,0b111100AA] -; CHECK: ; fixup A - offset: 0, value: .Ltmp6+8, kind: fixup_7_pcrel -; CHECK: brcs .Ltmp7+4 ; encoding: [0bAAAAA000,0b111100AA] -; CHECK: ; fixup A - offset: 0, value: .Ltmp7+4, kind: fixup_7_pcrel -; CHECK: brcs .Ltmp8+8 ; encoding: [0bAAAAA000,0b111100AA] -; CHECK: ; fixup A - offset: 0, value: .Ltmp8+8, kind: fixup_7_pcrel -; CHECK: brcs end ; encoding: [0bAAAAA000,0b111100AA] -; CHECK: ; fixup A - offset: 0, value: end, kind: fixup_7_pcrel - -; INST-LABEL: : -; INST: brlo .+8 -; INST: brlo .+4 -; INST: brlo .+8 -; INST: brlo .+0 - - ; BRCC - brcc .+66 - brcc .-22 - brbc 0, .+66 - brbc 0, baz - -; CHECK: brcc .Ltmp9+66 ; encoding: [0bAAAAA000,0b111101AA] -; CHECK: ; fixup A - offset: 0, value: .Ltmp9+66, kind: fixup_7_pcrel -; CHECK: brcc .Ltmp10-22 ; encoding: [0bAAAAA000,0b111101AA] -; CHECK: ; fixup A - offset: 0, value: .Ltmp10-22, kind: fixup_7_pcrel -; CHECK: brcc .Ltmp11+66 ; encoding: [0bAAAAA000,0b111101AA] -; CHECK: ; fixup A - offset: 0, value: .Ltmp11+66, kind: fixup_7_pcrel -; CHECK: brcc baz ; encoding: [0bAAAAA000,0b111101AA] -; CHECK: ; fixup A - offset: 0, value: baz, kind: fixup_7_pcrel - -; INST: brsh .+66 -; INST: brsh .-22 -; INST: brsh .+66 -; INST: brsh .+0 - -; BRSH - brsh .+32 - brsh .+70 - brsh car - -; CHECK: brsh .Ltmp12+32 ; encoding: [0bAAAAA000,0b111101AA] -; CHECK: ; fixup A - offset: 0, value: .Ltmp12+32, kind: fixup_7_pcrel -; CHECK: brsh .Ltmp13+70 ; encoding: [0bAAAAA000,0b111101AA] -; CHECK: ; fixup A - offset: 0, value: .Ltmp13+70, kind: fixup_7_pcrel -; CHECK: brsh car ; encoding: [0bAAAAA000,0b111101AA] -; CHECK: ; fixup A - offset: 0, value: car, kind: fixup_7_pcrel - -; INST: brsh .+32 -; INST: brsh .+70 -; INST: brsh .+0 - -baz: - - ; BRLO - brlo .+12 - brlo .+28 - brlo car - -; CHECK: brlo .Ltmp14+12 ; encoding: [0bAAAAA000,0b111100AA] -; CHECK: ; fixup A - offset: 0, value: .Ltmp14+12, kind: fixup_7_pcrel -; CHECK: brlo .Ltmp15+28 ; encoding: [0bAAAAA000,0b111100AA] -; CHECK: ; fixup A - offset: 0, value: .Ltmp15+28, kind: fixup_7_pcrel -; CHECK: brlo car ; encoding: [0bAAAAA000,0b111100AA] -; CHECK: ; fixup A - offset: 0, value: car, kind: fixup_7_pcrel - -; INST-LABEL: : -; INST: brlo .+12 -; INST: brlo .+28 -; INST: brlo .+0 - - ; BRMI - brmi .+66 - brmi .+58 - brmi car - -; CHECK: brmi .Ltmp16+66 ; encoding: [0bAAAAA010,0b111100AA] -; CHECK: ; fixup A - offset: 0, value: .Ltmp16+66, kind: fixup_7_pcrel -; CHECK: brmi .Ltmp17+58 ; encoding: [0bAAAAA010,0b111100AA] -; CHECK: ; fixup A - offset: 0, value: .Ltmp17+58, kind: fixup_7_pcrel -; CHECK: brmi car ; encoding: [0bAAAAA010,0b111100AA] -; CHECK: ; fixup A - offset: 0, value: car, kind: fixup_7_pcrel - -; INST: brmi .+66 -; INST: brmi .+58 -; INST: brmi .+0 - - ; BRPL - brpl .-12 - brpl .+18 - brpl car - -; CHECK: brpl .Ltmp18-12 ; encoding: [0bAAAAA010,0b111101AA] -; CHECK: ; fixup A - offset: 0, value: .Ltmp18-12, kind: fixup_7_pcrel -; CHECK: brpl .Ltmp19+18 ; encoding: [0bAAAAA010,0b111101AA] -; CHECK: ; fixup A - offset: 0, value: .Ltmp19+18, kind: fixup_7_pcrel -; CHECK: brpl car ; encoding: [0bAAAAA010,0b111101AA] -; CHECK: ; fixup A - offset: 0, value: car, kind: fixup_7_pcrel - -; INST: brpl .-12 -; INST: brpl .+18 -; INST: brpl .+0 - -; BRGE - brge .+50 - brge .+42 - brge car - -; CHECK: brge .Ltmp20+50 ; encoding: [0bAAAAA100,0b111101AA] -; CHECK: ; fixup A - offset: 0, value: .Ltmp20+50, kind: fixup_7_pcrel -; CHECK: brge .Ltmp21+42 ; encoding: [0bAAAAA100,0b111101AA] -; CHECK: ; fixup A - offset: 0, value: .Ltmp21+42, kind: fixup_7_pcrel -; CHECK: brge car ; encoding: [0bAAAAA100,0b111101AA] -; CHECK: ; fixup A - offset: 0, value: car, kind: fixup_7_pcrel - -; INST: brge .+50 -; INST: brge .+42 -; INST: brge .+0 - -car: - ; BRLT - brlt .+16 - brlt .+2 - brlt end - -; CHECK: brlt .Ltmp22+16 ; encoding: [0bAAAAA100,0b111100AA] -; CHECK: ; fixup A - offset: 0, value: .Ltmp22+16, kind: fixup_7_pcrel -; CHECK: brlt .Ltmp23+2 ; encoding: [0bAAAAA100,0b111100AA] -; CHECK: ; fixup A - offset: 0, value: .Ltmp23+2, kind: fixup_7_pcrel -; CHECK: brlt end ; encoding: [0bAAAAA100,0b111100AA] -; CHECK: ; fixup A - offset: 0, value: end, kind: fixup_7_pcrel - -; INST-LABEL: : -; INST: brlt .+16 -; INST: brlt .+2 -; INST: brlt .+0 - - ; BRHS - brhs .-66 - brhs .+14 - brhs just_another_label - -; CHECK: brhs .Ltmp24-66 ; encoding: [0bAAAAA101,0b111100AA] -; CHECK: ; fixup A - offset: 0, value: .Ltmp24-66, kind: fixup_7_pcrel -; CHECK: brhs .Ltmp25+14 ; encoding: [0bAAAAA101,0b111100AA] -; CHECK: ; fixup A - offset: 0, value: .Ltmp25+14, kind: fixup_7_pcrel -; CHECK: brhs just_another_label ; encoding: [0bAAAAA101,0b111100AA] -; CHECK: ; fixup A - offset: 0, value: just_another_label, kind: fixup_7_pcrel - -; INST: brhs .-66 -; INST: brhs .+14 -; INST: brhs .+0 - - ; BRHC - brhc .+12 - brhc .+14 - brhc just_another_label - -; CHECK: brhc .Ltmp26+12 ; encoding: [0bAAAAA101,0b111101AA] -; CHECK: ; fixup A - offset: 0, value: .Ltmp26+12, kind: fixup_7_pcrel -; CHECK: brhc .Ltmp27+14 ; encoding: [0bAAAAA101,0b111101AA] -; CHECK: ; fixup A - offset: 0, value: .Ltmp27+14, kind: fixup_7_pcrel -; CHECK: brhc just_another_label ; encoding: [0bAAAAA101,0b111101AA] -; CHECK: ; fixup A - offset: 0, value: just_another_label, kind: fixup_7_pcrel - -; INST: brhc .+12 -; INST: brhc .+14 -; INST: brhc .+0 - - ; BRTS - brts .+18 - brts .+22 - brts just_another_label - -; CHECK: brts .Ltmp28+18 ; encoding: [0bAAAAA110,0b111100AA] -; CHECK: ; fixup A - offset: 0, value: .Ltmp28+18, kind: fixup_7_pcrel -; CHECK: brts .Ltmp29+22 ; encoding: [0bAAAAA110,0b111100AA] -; CHECK: ; fixup A - offset: 0, value: .Ltmp29+22, kind: fixup_7_pcrel -; CHECK: brts just_another_label ; encoding: [0bAAAAA110,0b111100AA] -; CHECK: ; fixup A - offset: 0, value: just_another_label, kind: fixup_7_pcrel - -; INST: brts .+18 -; INST: brts .+22 -; INST: brts .+0 - -just_another_label: - ; BRTC - brtc .+52 - brtc .+50 - brtc end - -; CHECK: brtc .Ltmp30+52 ; encoding: [0bAAAAA110,0b111101AA] -; CHECK: ; fixup A - offset: 0, value: .Ltmp30+52, kind: fixup_7_pcrel -; CHECK: brtc .Ltmp31+50 ; encoding: [0bAAAAA110,0b111101AA] -; CHECK: ; fixup A - offset: 0, value: .Ltmp31+50, kind: fixup_7_pcrel -; CHECK: brtc end ; encoding: [0bAAAAA110,0b111101AA] -; CHECK: ; fixup A - offset: 0, value: end, kind: fixup_7_pcrel - -; INST-LABEL: : -; INST: brtc .+52 -; INST: brtc .+50 -; INST: brtc .+0 - - ; BRVS - brvs .+18 - brvs .+32 - brvs end - -; CHECK: brvs .Ltmp32+18 ; encoding: [0bAAAAA011,0b111100AA] -; CHECK: ; fixup A - offset: 0, value: .Ltmp32+18, kind: fixup_7_pcrel -; CHECK: brvs .Ltmp33+32 ; encoding: [0bAAAAA011,0b111100AA] -; CHECK: ; fixup A - offset: 0, value: .Ltmp33+32, kind: fixup_7_pcrel -; CHECK: brvs end ; encoding: [0bAAAAA011,0b111100AA] -; CHECK: ; fixup A - offset: 0, value: end, kind: fixup_7_pcrel - -; INST: brvs .+18 -; INST: brvs .+32 -; INST: brvs .+0 - - ; BRVC - brvc .-28 - brvc .-62 - brvc end - -; CHECK: brvc .Ltmp34-28 ; encoding: [0bAAAAA011,0b111101AA] -; CHECK: ; fixup A - offset: 0, value: .Ltmp34-28, kind: fixup_7_pcrel -; CHECK: brvc .Ltmp35-62 ; encoding: [0bAAAAA011,0b111101AA] -; CHECK: ; fixup A - offset: 0, value: .Ltmp35-62, kind: fixup_7_pcrel -; CHECK: brvc end ; encoding: [0bAAAAA011,0b111101AA] -; CHECK: ; fixup A - offset: 0, value: end, kind: fixup_7_pcrel - -; INST: brvc .-28 -; INST: brvc .-62 -; INST: brvc .+0 - - ; BRIE - brie .+20 - brie .+40 - brie end - -; CHECK: brie .Ltmp36+20 ; encoding: [0bAAAAA111,0b111100AA] -; CHECK: ; fixup A - offset: 0, value: .Ltmp36+20, kind: fixup_7_pcrel -; CHECK: brie .Ltmp37+40 ; encoding: [0bAAAAA111,0b111100AA] -; CHECK: ; fixup A - offset: 0, value: .Ltmp37+40, kind: fixup_7_pcrel -; CHECK: brie end ; encoding: [0bAAAAA111,0b111100AA] -; CHECK: ; fixup A - offset: 0, value: end, kind: fixup_7_pcrel - -; INST: brie .+20 -; INST: brie .+40 -; INST: brie .+0 - - ; BRID - brid .+42 - brid .+62 - brid end - -; CHECK: brid .Ltmp38+42 ; encoding: [0bAAAAA111,0b111101AA] -; CHECK: ; fixup A - offset: 0, value: .Ltmp38+42, kind: fixup_7_pcrel -; CHECK: brid .Ltmp39+62 ; encoding: [0bAAAAA111,0b111101AA] -; CHECK: ; fixup A - offset: 0, value: .Ltmp39+62, kind: fixup_7_pcrel -; CHECK: brid end ; encoding: [0bAAAAA111,0b111101AA] -; CHECK: ; fixup A - offset: 0, value: end, kind: fixup_7_pcrel - -; INST: brid .+42 -; INST: brid .+62 -; INST: brid .+0 - -end: diff --git a/llvm/test/MC/AVR/inst-family-set-clr-flag.s b/llvm/test/MC/AVR/inst-family-set-clr-flag.s index 364e7278662801..3e33c369b3ec76 100644 --- a/llvm/test/MC/AVR/inst-family-set-clr-flag.s +++ b/llvm/test/MC/AVR/inst-family-set-clr-flag.s @@ -1,5 +1,5 @@ ; RUN: llvm-mc -triple avr -show-encoding < %s | FileCheck %s -; RUN: llvm-mc -filetype=obj -triple avr < %s | llvm-objdump -d - | FileCheck --check-prefix=CHECK-INST %s +; RUN: llvm-mc -filetype=obj -triple avr < %s | llvm-objdump -dr - | FileCheck --check-prefix=CHECK-INST %s foo: diff --git a/llvm/test/MC/AVR/inst-fmul.s b/llvm/test/MC/AVR/inst-fmul.s index 45443c99434b78..466830f1f94abe 100644 --- a/llvm/test/MC/AVR/inst-fmul.s +++ b/llvm/test/MC/AVR/inst-fmul.s @@ -1,9 +1,7 @@ ; RUN: llvm-mc -triple avr -mattr=mul -show-encoding < %s | FileCheck %s -; RUN: llvm-mc -filetype=obj -triple avr -mattr=mul < %s | llvm-objdump -d --mattr=mul - | FileCheck -check-prefix=CHECK-INST %s - +; RUN: llvm-mc -filetype=obj -triple avr -mattr=mul < %s | llvm-objdump -dr --mattr=mul - | FileCheck -check-prefix=CHECK-INST %s foo: - fmul r22, r16 fmul r19, r17 fmul r21, r23 diff --git a/llvm/test/MC/AVR/inst-fmuls.s b/llvm/test/MC/AVR/inst-fmuls.s index 58a3d06722d064..372a4954b01502 100644 --- a/llvm/test/MC/AVR/inst-fmuls.s +++ b/llvm/test/MC/AVR/inst-fmuls.s @@ -1,9 +1,7 @@ ; RUN: llvm-mc -triple avr -mattr=mul -show-encoding < %s | FileCheck %s -; RUN: llvm-mc -filetype=obj -triple avr -mattr=mul < %s | llvm-objdump -d --mattr=mul - | FileCheck -check-prefix=CHECK-INST %s - +; RUN: llvm-mc -filetype=obj -triple avr -mattr=mul < %s | llvm-objdump -dr --mattr=mul - | FileCheck -check-prefix=CHECK-INST %s foo: - fmuls r22, r16 fmuls r19, r17 fmuls r21, r23 diff --git a/llvm/test/MC/AVR/inst-fmulsu.s b/llvm/test/MC/AVR/inst-fmulsu.s index bc9548421625e2..c5b165bc76d60b 100644 --- a/llvm/test/MC/AVR/inst-fmulsu.s +++ b/llvm/test/MC/AVR/inst-fmulsu.s @@ -1,9 +1,7 @@ ; RUN: llvm-mc -triple avr -mattr=mul -show-encoding < %s | FileCheck %s -; RUN: llvm-mc -filetype=obj -triple avr -mattr=mul < %s | llvm-objdump -d --mattr=mul - | FileCheck -check-prefix=CHECK-INST %s - +; RUN: llvm-mc -filetype=obj -triple avr -mattr=mul < %s | llvm-objdump -dr --mattr=mul - | FileCheck -check-prefix=CHECK-INST %s foo: - fmulsu r22, r16 fmulsu r19, r17 fmulsu r21, r23 diff --git a/llvm/test/MC/AVR/inst-icall.s b/llvm/test/MC/AVR/inst-icall.s index 48e1e7a9546b05..9323c39306be20 100644 --- a/llvm/test/MC/AVR/inst-icall.s +++ b/llvm/test/MC/AVR/inst-icall.s @@ -1,9 +1,7 @@ ; RUN: llvm-mc -triple avr -mattr=ijmpcall -show-encoding < %s | FileCheck %s -; RUN: llvm-mc -filetype=obj -triple avr -mattr=ijmpcall < %s | llvm-objdump -d --mattr=ijmpcall - | FileCheck --check-prefix=CHECK-INST %s - +; RUN: llvm-mc -filetype=obj -triple avr -mattr=ijmpcall < %s | llvm-objdump -dr --mattr=ijmpcall - | FileCheck --check-prefix=CHECK-INST %s foo: - icall ; CHECK: icall ; encoding: [0x09,0x95] diff --git a/llvm/test/MC/AVR/inst-ijmp.s b/llvm/test/MC/AVR/inst-ijmp.s index b2781b43c17ff6..14cdfb2d777fb0 100644 --- a/llvm/test/MC/AVR/inst-ijmp.s +++ b/llvm/test/MC/AVR/inst-ijmp.s @@ -1,9 +1,7 @@ ; RUN: llvm-mc -triple avr -mattr=ijmpcall -show-encoding < %s | FileCheck %s -; RUN: llvm-mc -filetype=obj -triple avr -mattr=ijmpcall < %s | llvm-objdump -d --mattr=ijmpcall - | FileCheck --check-prefix=CHECK-INST %s - +; RUN: llvm-mc -filetype=obj -triple avr -mattr=ijmpcall < %s | llvm-objdump -dr --mattr=ijmpcall - | FileCheck --check-prefix=CHECK-INST %s foo: - ijmp ; CHECK: ijmp ; encoding: [0x09,0x94] diff --git a/llvm/test/MC/AVR/inst-in.s b/llvm/test/MC/AVR/inst-in.s index 38a427478f4fa6..e17f25b67d03de 100644 --- a/llvm/test/MC/AVR/inst-in.s +++ b/llvm/test/MC/AVR/inst-in.s @@ -1,9 +1,7 @@ ; RUN: llvm-mc -triple avr -show-encoding < %s | FileCheck %s -; RUN: llvm-mc -filetype=obj -triple avr < %s | llvm-objdump --no-print-imm-hex -d - | FileCheck -check-prefix=CHECK-INST %s - +; RUN: llvm-mc -filetype=obj -triple avr < %s | llvm-objdump --no-print-imm-hex -dr - | FileCheck -check-prefix=CHECK-INST %s foo: - in r2, 4 in r9, 6 in r5, 32 diff --git a/llvm/test/MC/AVR/inst-inc.s b/llvm/test/MC/AVR/inst-inc.s index d5d1b1aec07c3d..00d9c17a1f28cb 100644 --- a/llvm/test/MC/AVR/inst-inc.s +++ b/llvm/test/MC/AVR/inst-inc.s @@ -1,9 +1,7 @@ ; RUN: llvm-mc -triple avr -show-encoding < %s | FileCheck %s -; RUN: llvm-mc -filetype=obj -triple avr < %s | llvm-objdump -d - | FileCheck -check-prefix=CHECK-INST %s - +; RUN: llvm-mc -filetype=obj -triple avr < %s | llvm-objdump -dr - | FileCheck -check-prefix=CHECK-INST %s foo: - inc r12 inc r29 inc r6 diff --git a/llvm/test/MC/AVR/inst-jmp.s b/llvm/test/MC/AVR/inst-jmp.s index c0b7a375ed4509..0d5b16e02206d7 100644 --- a/llvm/test/MC/AVR/inst-jmp.s +++ b/llvm/test/MC/AVR/inst-jmp.s @@ -1,9 +1,7 @@ ; RUN: llvm-mc -triple avr -mattr=jmpcall -show-encoding < %s | FileCheck %s ; RUN: llvm-mc -filetype=obj -triple avr -mattr=jmpcall < %s | llvm-objdump --no-print-imm-hex -dr --mattr=jmpcall - | FileCheck -check-prefix=CHECK-INST %s - foo: - jmp 200 jmp -12 jmp 80 diff --git a/llvm/test/MC/AVR/inst-lac.s b/llvm/test/MC/AVR/inst-lac.s index e20998c74c1347..52c24792008c3e 100644 --- a/llvm/test/MC/AVR/inst-lac.s +++ b/llvm/test/MC/AVR/inst-lac.s @@ -1,9 +1,7 @@ ; RUN: llvm-mc -triple avr -mattr=rmw -show-encoding < %s | FileCheck %s -; RUN: llvm-mc -filetype=obj -triple avr -mattr=rmw < %s | llvm-objdump -d --mattr=rmw - | FileCheck -check-prefix=CHECK-INST %s - +; RUN: llvm-mc -filetype=obj -triple avr -mattr=rmw < %s | llvm-objdump -dr --mattr=rmw - | FileCheck -check-prefix=CHECK-INST %s foo: - lac Z, r13 lac Z, r0 lac Z, r31 diff --git a/llvm/test/MC/AVR/inst-las.s b/llvm/test/MC/AVR/inst-las.s index d8ff8d510df51b..4ca65d2c57cc67 100644 --- a/llvm/test/MC/AVR/inst-las.s +++ b/llvm/test/MC/AVR/inst-las.s @@ -1,9 +1,7 @@ ; RUN: llvm-mc -triple avr -mattr=rmw -show-encoding < %s | FileCheck %s -; RUN: llvm-mc -filetype=obj -triple avr -mattr=rmw < %s | llvm-objdump -d --mattr=rmw - | FileCheck -check-prefix=CHECK-INST %s - +; RUN: llvm-mc -filetype=obj -triple avr -mattr=rmw < %s | llvm-objdump -dr --mattr=rmw - | FileCheck -check-prefix=CHECK-INST %s foo: - las Z, r13 las Z, r0 las Z, r31 diff --git a/llvm/test/MC/AVR/inst-lat.s b/llvm/test/MC/AVR/inst-lat.s index ae001c06914033..190d54f4358281 100644 --- a/llvm/test/MC/AVR/inst-lat.s +++ b/llvm/test/MC/AVR/inst-lat.s @@ -1,9 +1,7 @@ ; RUN: llvm-mc -triple avr -mattr=rmw -show-encoding < %s | FileCheck %s -; RUN: llvm-mc -filetype=obj -triple avr -mattr=rmw < %s | llvm-objdump -d --mattr=rmw - | FileCheck -check-prefix=CHECK-INST %s - +; RUN: llvm-mc -filetype=obj -triple avr -mattr=rmw < %s | llvm-objdump -dr --mattr=rmw - | FileCheck -check-prefix=CHECK-INST %s foo: - lat Z, r13 lat Z, r0 lat Z, r31 diff --git a/llvm/test/MC/AVR/inst-ld.s b/llvm/test/MC/AVR/inst-ld.s index ad3f8fd62616bd..3987e6d7da801f 100644 --- a/llvm/test/MC/AVR/inst-ld.s +++ b/llvm/test/MC/AVR/inst-ld.s @@ -1,10 +1,8 @@ ; RUN: llvm-mc -triple avr -mattr=sram -show-encoding < %s | FileCheck %s ; RUN: llvm-mc -filetype=obj -triple avr -mattr=sram < %s \ -; RUN: | llvm-objdump -d --mattr=sram - | FileCheck --check-prefix=INST %s - +; RUN: | llvm-objdump -dr --mattr=sram - | FileCheck --check-prefix=INST %s foo: - ; Normal ld r10, X diff --git a/llvm/test/MC/AVR/inst-ldd.s b/llvm/test/MC/AVR/inst-ldd.s index 66b2c04a68638e..70ba44617690e9 100644 --- a/llvm/test/MC/AVR/inst-ldd.s +++ b/llvm/test/MC/AVR/inst-ldd.s @@ -1,6 +1,6 @@ ; RUN: llvm-mc -triple avr -mattr=sram -show-encoding < %s | FileCheck %s ; RUN: llvm-mc -filetype=obj -triple avr -mattr=sram < %s \ -; RUN: | llvm-objdump -d --mattr=sram - | FileCheck --check-prefix=INST %s +; RUN: | llvm-objdump -dr --mattr=sram - | FileCheck --check-prefix=INST %s foo: ldd r2, Y+2 diff --git a/llvm/test/MC/AVR/inst-ldi.s b/llvm/test/MC/AVR/inst-ldi.s index 4f2ad5ac8d714b..a6e2bc68b59e0e 100644 --- a/llvm/test/MC/AVR/inst-ldi.s +++ b/llvm/test/MC/AVR/inst-ldi.s @@ -1,6 +1,5 @@ ; RUN: llvm-mc -triple avr -show-encoding < %s | FileCheck %s -; RUN: llvm-mc -filetype=obj -triple avr -mattr=sram < %s | llvm-objdump --no-print-imm-hex -d --mattr=sram - | FileCheck --check-prefix=CHECK-INST %s - +; RUN: llvm-mc -filetype=obj -triple avr -mattr=sram < %s | llvm-objdump --no-print-imm-hex -dr --mattr=sram - | FileCheck --check-prefix=CHECK-INST %s foo: ldi r16, 241 diff --git a/llvm/test/MC/AVR/inst-lds.s b/llvm/test/MC/AVR/inst-lds.s index 0e4bfb345d827a..38f641a07ca795 100644 --- a/llvm/test/MC/AVR/inst-lds.s +++ b/llvm/test/MC/AVR/inst-lds.s @@ -1,7 +1,6 @@ ; RUN: llvm-mc -triple avr -mattr=sram -show-encoding < %s | FileCheck %s ; RUN: llvm-mc -filetype=obj -triple avr -mattr=sram < %s | llvm-objdump --no-print-imm-hex -dr --mattr=sram - | FileCheck -check-prefix=CHECK-INST %s - foo: lds r16, 241 lds r29, 190 diff --git a/llvm/test/MC/AVR/inst-lpm.s b/llvm/test/MC/AVR/inst-lpm.s index 7ddacd4b0647a1..e61da12e038c90 100644 --- a/llvm/test/MC/AVR/inst-lpm.s +++ b/llvm/test/MC/AVR/inst-lpm.s @@ -1,9 +1,7 @@ ; RUN: llvm-mc -triple avr -mattr=lpm,lpmx -show-encoding < %s | FileCheck %s -; RUN: llvm-mc -filetype=obj -triple avr -mattr=lpm,lpmx < %s | llvm-objdump -d --mattr=lpm,lpmx - | FileCheck -check-prefix=CHECK-INST %s - +; RUN: llvm-mc -filetype=obj -triple avr -mattr=lpm,lpmx < %s | llvm-objdump -dr --mattr=lpm,lpmx - | FileCheck -check-prefix=CHECK-INST %s foo: - lpm lpm r3, Z diff --git a/llvm/test/MC/AVR/inst-lsl.s b/llvm/test/MC/AVR/inst-lsl.s index fbb4d2ce5666c0..a520a79bdf7642 100644 --- a/llvm/test/MC/AVR/inst-lsl.s +++ b/llvm/test/MC/AVR/inst-lsl.s @@ -1,9 +1,7 @@ ; RUN: llvm-mc -triple avr -show-encoding < %s | FileCheck %s -; RUN: llvm-mc -filetype=obj -triple avr < %s | llvm-objdump -d - | FileCheck --check-prefix=CHECK-INST %s - +; RUN: llvm-mc -filetype=obj -triple avr < %s | llvm-objdump -dr - | FileCheck --check-prefix=CHECK-INST %s foo: - lsl r31 lsl r25 lsl r5 diff --git a/llvm/test/MC/AVR/inst-lsr.s b/llvm/test/MC/AVR/inst-lsr.s index 59b0174beede69..dac2d768f8d761 100644 --- a/llvm/test/MC/AVR/inst-lsr.s +++ b/llvm/test/MC/AVR/inst-lsr.s @@ -1,9 +1,7 @@ ; RUN: llvm-mc -triple avr -show-encoding < %s | FileCheck %s -; RUN: llvm-mc -filetype=obj -triple avr < %s | llvm-objdump -d - | FileCheck -check-prefix=CHECK-INST %s - +; RUN: llvm-mc -filetype=obj -triple avr < %s | llvm-objdump -dr - | FileCheck -check-prefix=CHECK-INST %s foo: - lsr r31 lsr r25 lsr r5 diff --git a/llvm/test/MC/AVR/inst-mov.s b/llvm/test/MC/AVR/inst-mov.s index 5294b1bc52beda..e0c89e8073c4d3 100644 --- a/llvm/test/MC/AVR/inst-mov.s +++ b/llvm/test/MC/AVR/inst-mov.s @@ -1,9 +1,7 @@ ; RUN: llvm-mc -triple avr -show-encoding < %s | FileCheck %s -; RUN: llvm-mc -filetype=obj -triple avr < %s | llvm-objdump -d - | FileCheck --check-prefix=CHECK-INST %s - +; RUN: llvm-mc -filetype=obj -triple avr < %s | llvm-objdump -dr - | FileCheck --check-prefix=CHECK-INST %s foo: - mov r2, r13 mov r9, r0 mov r5, r31 diff --git a/llvm/test/MC/AVR/inst-movw.s b/llvm/test/MC/AVR/inst-movw.s index b93b530e9a701c..12dc649f24497f 100644 --- a/llvm/test/MC/AVR/inst-movw.s +++ b/llvm/test/MC/AVR/inst-movw.s @@ -1,9 +1,7 @@ ; RUN: llvm-mc -triple avr -mattr=movw -show-encoding < %s | FileCheck %s -; RUN: llvm-mc -filetype=obj -triple avr -mattr=movw < %s | llvm-objdump -d --mattr=movw - | FileCheck -check-prefix=CHECK-INST %s - +; RUN: llvm-mc -filetype=obj -triple avr -mattr=movw < %s | llvm-objdump -dr --mattr=movw - | FileCheck -check-prefix=CHECK-INST %s foo: - movw r10, r8 movw r12, r16 movw r20, r22 diff --git a/llvm/test/MC/AVR/inst-mul.s b/llvm/test/MC/AVR/inst-mul.s index 91295128beb1df..e68118a9016aa7 100644 --- a/llvm/test/MC/AVR/inst-mul.s +++ b/llvm/test/MC/AVR/inst-mul.s @@ -1,7 +1,6 @@ ; RUN: llvm-mc -triple avr -mattr=mul -show-encoding < %s | FileCheck %s ; RUN: llvm-mc -filetype=obj -triple avr -mattr=mul < %s \ -; RUN: | llvm-objdump -d --mattr=mul - | FileCheck --check-prefix=INST %s - +; RUN: | llvm-objdump -dr --mattr=mul - | FileCheck --check-prefix=INST %s foo: mul r0, r15 diff --git a/llvm/test/MC/AVR/inst-muls.s b/llvm/test/MC/AVR/inst-muls.s index 9ae3d15d8fa1ef..0bb20956636fde 100644 --- a/llvm/test/MC/AVR/inst-muls.s +++ b/llvm/test/MC/AVR/inst-muls.s @@ -1,9 +1,7 @@ ; RUN: llvm-mc -triple avr -mattr=mul -show-encoding < %s | FileCheck %s -; RUN: llvm-mc -filetype=obj -triple avr -mattr=mul < %s | llvm-objdump -d --mattr=mul - | FileCheck -check-prefix=CHECK-INST %s - +; RUN: llvm-mc -filetype=obj -triple avr -mattr=mul < %s | llvm-objdump -dr --mattr=mul - | FileCheck -check-prefix=CHECK-INST %s foo: - muls r22, r16 muls r19, r17 muls r28, r31 diff --git a/llvm/test/MC/AVR/inst-mulsu.s b/llvm/test/MC/AVR/inst-mulsu.s index a74322dbe137e5..257d0c7ce68ddc 100644 --- a/llvm/test/MC/AVR/inst-mulsu.s +++ b/llvm/test/MC/AVR/inst-mulsu.s @@ -1,9 +1,7 @@ ; RUN: llvm-mc -triple avr -mattr=mul -show-encoding < %s | FileCheck %s -; RUN: llvm-mc -filetype=obj -triple avr -mattr=mul < %s | llvm-objdump -d --mattr=mul - | FileCheck -check-prefix=CHECK-INST %s - +; RUN: llvm-mc -filetype=obj -triple avr -mattr=mul < %s | llvm-objdump -dr --mattr=mul - | FileCheck -check-prefix=CHECK-INST %s foo: - mulsu r22, r16 mulsu r19, r17 mulsu r21, r23 diff --git a/llvm/test/MC/AVR/inst-neg.s b/llvm/test/MC/AVR/inst-neg.s index 7f36a1aa39798b..326bf62d94b94d 100644 --- a/llvm/test/MC/AVR/inst-neg.s +++ b/llvm/test/MC/AVR/inst-neg.s @@ -1,5 +1,5 @@ ; RUN: llvm-mc -triple avr -show-encoding < %s | FileCheck %s -; RUN: llvm-mc -filetype=obj -triple avr < %s | llvm-objdump -d - | FileCheck -check-prefix=CHECK-INST %s +; RUN: llvm-mc -filetype=obj -triple avr < %s | llvm-objdump -dr - | FileCheck -check-prefix=CHECK-INST %s foo: neg r15 diff --git a/llvm/test/MC/AVR/inst-nop.s b/llvm/test/MC/AVR/inst-nop.s index a7b6fff3f80012..4b4300dc6978bf 100644 --- a/llvm/test/MC/AVR/inst-nop.s +++ b/llvm/test/MC/AVR/inst-nop.s @@ -1,9 +1,7 @@ ; RUN: llvm-mc -triple avr -show-encoding < %s | FileCheck %s -; RUN: llvm-mc -filetype=obj -triple avr < %s | llvm-objdump -d - | FileCheck --check-prefix=CHECK-INST %s - +; RUN: llvm-mc -filetype=obj -triple avr < %s | llvm-objdump -dr - | FileCheck --check-prefix=CHECK-INST %s foo: - nop ; CHECK: nop ; encoding: [0x00,0x00] diff --git a/llvm/test/MC/AVR/inst-or.s b/llvm/test/MC/AVR/inst-or.s index c30e6b136bc041..c2120b2106f77d 100644 --- a/llvm/test/MC/AVR/inst-or.s +++ b/llvm/test/MC/AVR/inst-or.s @@ -1,6 +1,5 @@ ; RUN: llvm-mc -triple avr -show-encoding < %s | FileCheck %s -; RUN: llvm-mc -filetype=obj -triple avr < %s | llvm-objdump -d - | FileCheck --check-prefix=CHECK-INST %s - +; RUN: llvm-mc -filetype=obj -triple avr < %s | llvm-objdump -dr - | FileCheck --check-prefix=CHECK-INST %s foo: or r0, r15 diff --git a/llvm/test/MC/AVR/inst-ori.s b/llvm/test/MC/AVR/inst-ori.s index 990d5627bfcc91..bdbe510b1504a5 100644 --- a/llvm/test/MC/AVR/inst-ori.s +++ b/llvm/test/MC/AVR/inst-ori.s @@ -1,9 +1,7 @@ ; RUN: llvm-mc -triple avr -show-encoding < %s | FileCheck %s -; RUN: llvm-mc -filetype=obj -triple avr < %s | llvm-objdump --no-print-imm-hex -d - | FileCheck --check-prefix=CHECK-INST %s - +; RUN: llvm-mc -filetype=obj -triple avr < %s | llvm-objdump --no-print-imm-hex -dr - | FileCheck --check-prefix=CHECK-INST %s foo: - ori r17, 208 ori r24, 190 ori r20, 173 diff --git a/llvm/test/MC/AVR/inst-out.s b/llvm/test/MC/AVR/inst-out.s index e43c7f7a246872..76dac1d578be52 100644 --- a/llvm/test/MC/AVR/inst-out.s +++ b/llvm/test/MC/AVR/inst-out.s @@ -1,9 +1,7 @@ ; RUN: llvm-mc -triple avr -show-encoding < %s | FileCheck %s -; RUN: llvm-mc -filetype=obj -triple avr < %s | llvm-objdump --no-print-imm-hex -d - | FileCheck -check-prefix=CHECK-INST %s - +; RUN: llvm-mc -filetype=obj -triple avr < %s | llvm-objdump --no-print-imm-hex -dr - | FileCheck -check-prefix=CHECK-INST %s foo: - out 4, r2 out 6, r9 out 32, r5 diff --git a/llvm/test/MC/AVR/inst-pop.s b/llvm/test/MC/AVR/inst-pop.s index 2e02fedc806daa..01b14a6b890b07 100644 --- a/llvm/test/MC/AVR/inst-pop.s +++ b/llvm/test/MC/AVR/inst-pop.s @@ -1,9 +1,7 @@ ; RUN: llvm-mc -triple avr -mattr=sram -show-encoding < %s | FileCheck %s -; RUN: llvm-mc -filetype=obj -triple avr -mattr=sram < %s | llvm-objdump -d --mattr=sram - | FileCheck -check-prefix=CHECK-INST %s - +; RUN: llvm-mc -filetype=obj -triple avr -mattr=sram < %s | llvm-objdump -dr --mattr=sram - | FileCheck -check-prefix=CHECK-INST %s foo: - pop r31 pop r25 pop r5 diff --git a/llvm/test/MC/AVR/inst-push.s b/llvm/test/MC/AVR/inst-push.s index d5601b84e3cd1e..5694e857df403c 100644 --- a/llvm/test/MC/AVR/inst-push.s +++ b/llvm/test/MC/AVR/inst-push.s @@ -1,9 +1,7 @@ ; RUN: llvm-mc -triple avr -mattr=sram -show-encoding < %s | FileCheck %s -; RUN: llvm-mc -filetype=obj -triple avr -mattr=sram < %s | llvm-objdump -d --mattr=sram - | FileCheck -check-prefix=CHECK-INST %s - +; RUN: llvm-mc -filetype=obj -triple avr -mattr=sram < %s | llvm-objdump -dr --mattr=sram - | FileCheck -check-prefix=CHECK-INST %s foo: - push r31 push r25 push r5 diff --git a/llvm/test/MC/AVR/inst-rcall.s b/llvm/test/MC/AVR/inst-rcall.s index 006013aa6ea946..34c2ef86366c54 100644 --- a/llvm/test/MC/AVR/inst-rcall.s +++ b/llvm/test/MC/AVR/inst-rcall.s @@ -1,27 +1,28 @@ ; RUN: llvm-mc -triple avr -show-encoding < %s | FileCheck %s +; ; RUN: llvm-mc -filetype=obj -triple avr < %s \ -; RUN: | llvm-objdump -d - | FileCheck --check-prefix=INST %s - +; RUN: | llvm-objdump -dr - \ +; RUN: | FileCheck --check-prefix=INST %s foo: - rcall .+0 rcall .-8 rcall .+12 rcall .+46 .short 0xdfea -; CHECK: rcall .Ltmp0+0 ; encoding: [A,0b1101AAAA] -; CHECK: ; fixup A - offset: 0, value: .Ltmp0+0, kind: fixup_13_pcrel -; CHECK: rcall .Ltmp1-8 ; encoding: [A,0b1101AAAA] -; CHECK: ; fixup A - offset: 0, value: .Ltmp1-8, kind: fixup_13_pcrel -; CHECK: rcall .Ltmp2+12 ; encoding: [A,0b1101AAAA] -; CHECK: ; fixup A - offset: 0, value: .Ltmp2+12, kind: fixup_13_pcrel -; CHECK: rcall .Ltmp3+46 ; encoding: [A,0b1101AAAA] -; CHECK: ; fixup A - offset: 0, value: .Ltmp3+46, kind: fixup_13_pcrel +; CHECK: rcall (.Ltmp0+0)+2 ; encoding: [A,0b1101AAAA] +; CHECK-NEXT: ; fixup A - offset: 0, value: (.Ltmp0+0)+2, kind: fixup_13_pcrel +; CHECK: rcall (.Ltmp1-8)+2 ; encoding: [A,0b1101AAAA] +; CHECK-NEXT: ; fixup A - offset: 0, value: (.Ltmp1-8)+2, kind: fixup_13_pcrel +; CHECK: rcall (.Ltmp2+12)+2 ; encoding: [A,0b1101AAAA] +; CHECK-NEXT: ; fixup A - offset: 0, value: (.Ltmp2+12)+2, kind: fixup_13_pcrel +; CHECK: rcall (.Ltmp3+46)+2 ; encoding: [A,0b1101AAAA] +; CHECK-NEXT: ; fixup A - offset: 0, value: (.Ltmp3+46)+2, kind: fixup_13_pcrel -; INST: 00 d0 rcall .+0 -; INST: fc df rcall .-8 -; INST: 06 d0 rcall .+12 -; INST: 17 d0 rcall .+46 -; INST: ea df rcall .-44 +; INST-LABEL: : +; INST-NEXT: 00 d0 rcall .+0 +; INST-NEXT: fc df rcall .-8 +; INST-NEXT: 06 d0 rcall .+12 +; INST-NEXT: 17 d0 rcall .+46 +; INST-NEXT: ea df rcall .-44 diff --git a/llvm/test/MC/AVR/inst-ret.s b/llvm/test/MC/AVR/inst-ret.s index 92b1e30118618d..8a71ea3ea47744 100644 --- a/llvm/test/MC/AVR/inst-ret.s +++ b/llvm/test/MC/AVR/inst-ret.s @@ -1,9 +1,7 @@ ; RUN: llvm-mc -triple avr -show-encoding < %s | FileCheck %s -; RUN: llvm-mc -filetype=obj -triple avr < %s | llvm-objdump -d - | FileCheck --check-prefix=CHECK-INST %s - +; RUN: llvm-mc -filetype=obj -triple avr < %s | llvm-objdump -dr - | FileCheck --check-prefix=CHECK-INST %s foo: - ret ; CHECK: ret ; encoding: [0x08,0x95] diff --git a/llvm/test/MC/AVR/inst-reti.s b/llvm/test/MC/AVR/inst-reti.s index aa338d3024e136..3922f0b049d2bd 100644 --- a/llvm/test/MC/AVR/inst-reti.s +++ b/llvm/test/MC/AVR/inst-reti.s @@ -1,9 +1,7 @@ ; RUN: llvm-mc -triple avr -show-encoding < %s | FileCheck %s -; RUN: llvm-mc -filetype=obj -triple avr < %s | llvm-objdump -d - | FileCheck --check-prefix=CHECK-INST %s - +; RUN: llvm-mc -filetype=obj -triple avr < %s | llvm-objdump -dr - | FileCheck --check-prefix=CHECK-INST %s foo: - reti ; CHECK: reti ; encoding: [0x18,0x95] diff --git a/llvm/test/MC/AVR/inst-rjmp.s b/llvm/test/MC/AVR/inst-rjmp.s index 3dbac39e055ddf..74d703593f6667 100644 --- a/llvm/test/MC/AVR/inst-rjmp.s +++ b/llvm/test/MC/AVR/inst-rjmp.s @@ -1,49 +1,56 @@ ; RUN: llvm-mc -triple avr -show-encoding < %s | FileCheck %s +; ; RUN: llvm-mc -filetype=obj -triple avr < %s \ -; RUN: | llvm-objdump -d - | FileCheck --check-prefix=INST %s - +; RUN: | llvm-objdump -dr - \ +; RUN: | FileCheck --check-prefix=INST %s foo: - rjmp .+2 rjmp .-2 rjmp foo rjmp .+8 rjmp end rjmp .+0 + end: rjmp .-4 rjmp .-6 + x: rjmp x .short 0xc00f -; CHECK: rjmp .Ltmp0+2 ; encoding: [A,0b1100AAAA] -; CHECK: ; fixup A - offset: 0, value: .Ltmp0+2, kind: fixup_13_pcrel -; CHECK: rjmp .Ltmp1-2 ; encoding: [A,0b1100AAAA] -; CHECK: ; fixup A - offset: 0, value: .Ltmp1-2, kind: fixup_13_pcrel -; CHECK: rjmp foo ; encoding: [A,0b1100AAAA] -; CHECK: ; fixup A - offset: 0, value: foo, kind: fixup_13_pcrel -; CHECK: rjmp .Ltmp2+8 ; encoding: [A,0b1100AAAA] -; CHECK: ; fixup A - offset: 0, value: .Ltmp2+8, kind: fixup_13_pcrel -; CHECK: rjmp end ; encoding: [A,0b1100AAAA] -; CHECK: ; fixup A - offset: 0, value: end, kind: fixup_13_pcrel -; CHECK: rjmp .Ltmp3+0 ; encoding: [A,0b1100AAAA] -; CHECK: ; fixup A - offset: 0, value: .Ltmp3+0, kind: fixup_13_pcrel -; CHECK: rjmp .Ltmp4-4 ; encoding: [A,0b1100AAAA] -; CHECK: ; fixup A - offset: 0, value: .Ltmp4-4, kind: fixup_13_pcrel -; CHECK: rjmp .Ltmp5-6 ; encoding: [A,0b1100AAAA] -; CHECK: ; fixup A - offset: 0, value: .Ltmp5-6, kind: fixup_13_pcrel -; CHECK: rjmp x ; encoding: [A,0b1100AAAA] -; CHECK: ; fixup A - offset: 0, value: x, kind: fixup_13_pcrel +; CHECK: rjmp (.Ltmp0+2)+2 ; encoding: [A,0b1100AAAA] +; CHECK-NEXT: ; fixup A - offset: 0, value: (.Ltmp0+2)+2, kind: fixup_13_pcrel +; CHECK: rjmp (.Ltmp1-2)+2 ; encoding: [A,0b1100AAAA] +; CHECK-NEXT: ; fixup A - offset: 0, value: (.Ltmp1-2)+2, kind: fixup_13_pcrel +; CHECK: rjmp foo ; encoding: [A,0b1100AAAA] +; CHECK-NEXT: ; fixup A - offset: 0, value: foo, kind: fixup_13_pcrel +; CHECK: rjmp (.Ltmp2+8)+2 ; encoding: [A,0b1100AAAA] +; CHECK-NEXT: ; fixup A - offset: 0, value: (.Ltmp2+8)+2, kind: fixup_13_pcrel +; CHECK: rjmp end ; encoding: [A,0b1100AAAA] +; CHECK-NEXT: ; fixup A - offset: 0, value: end, kind: fixup_13_pcrel +; CHECK: rjmp (.Ltmp3+0)+2 ; encoding: [A,0b1100AAAA] +; CHECK-NEXT: ; fixup A - offset: 0, value: (.Ltmp3+0)+2, kind: fixup_13_pcrel +; CHECK: rjmp (.Ltmp4-4)+2 ; encoding: [A,0b1100AAAA] +; CHECK-NEXT: ; fixup A - offset: 0, value: (.Ltmp4-4)+2, kind: fixup_13_pcrel +; CHECK: rjmp (.Ltmp5-6)+2 ; encoding: [A,0b1100AAAA] +; CHECK-NEXT: ; fixup A - offset: 0, value: (.Ltmp5-6)+2, kind: fixup_13_pcrel +; CHECK: rjmp x ; encoding: [A,0b1100AAAA] +; CHECK-NEXT: ; fixup A - offset: 0, value: x, kind: fixup_13_pcrel -; INST: 01 c0 rjmp .+2 -; INST: ff cf rjmp .-2 -; INST: 00 c0 rjmp .+0 -; INST: 04 c0 rjmp .+8 -; INST: 00 c0 rjmp .+0 -; INST: 00 c0 rjmp .+0 -; INST: fe cf rjmp .-4 -; INST: fd cf rjmp .-6 -; INST: 00 c0 rjmp .+0 -; INST: 0f c0 rjmp .+30 +; INST-LABEL: : +; INST-NEXT: 01 c0 rjmp .+2 +; INST-NEXT: ff cf rjmp .-2 +; INST-NEXT: fd cf rjmp .-6 +; INST-NEXT: 04 c0 rjmp .+8 +; INST-NEXT: 01 c0 rjmp .+2 +; INST-NEXT: 00 c0 rjmp .+0 +; INST-EMPTY: +; INST-LABEL: : +; INST-NEXT: fe cf rjmp .-4 +; INST-NEXT: fd cf rjmp .-6 +; INST-EMPTY: +; INST-LABEL: : +; INST-NEXT: ff cf rjmp .-2 +; INST-NEXT: 0f c0 rjmp .+30 diff --git a/llvm/test/MC/AVR/inst-rol.s b/llvm/test/MC/AVR/inst-rol.s index 434505aa88c06f..c649cf045f00c3 100644 --- a/llvm/test/MC/AVR/inst-rol.s +++ b/llvm/test/MC/AVR/inst-rol.s @@ -1,9 +1,7 @@ ; RUN: llvm-mc -triple avr -show-encoding < %s | FileCheck %s -; RUN: llvm-mc -filetype=obj -triple avr < %s | llvm-objdump -d - | FileCheck --check-prefix=CHECK-INST %s - +; RUN: llvm-mc -filetype=obj -triple avr < %s | llvm-objdump -dr - | FileCheck --check-prefix=CHECK-INST %s foo: - rol r31 rol r25 rol r5 diff --git a/llvm/test/MC/AVR/inst-ror.s b/llvm/test/MC/AVR/inst-ror.s index ca7a90f81f9718..525e9df1851ab2 100644 --- a/llvm/test/MC/AVR/inst-ror.s +++ b/llvm/test/MC/AVR/inst-ror.s @@ -1,9 +1,7 @@ ; RUN: llvm-mc -triple avr -show-encoding < %s | FileCheck %s -; RUN: llvm-mc -filetype=obj -triple avr < %s | llvm-objdump -d - | FileCheck -check-prefix=CHECK-INST %s - +; RUN: llvm-mc -filetype=obj -triple avr < %s | llvm-objdump -dr - | FileCheck -check-prefix=CHECK-INST %s foo: - ror r31 ror r25 ror r5 diff --git a/llvm/test/MC/AVR/inst-sbc.s b/llvm/test/MC/AVR/inst-sbc.s index d92bd63ba20774..22a9bb52548b44 100644 --- a/llvm/test/MC/AVR/inst-sbc.s +++ b/llvm/test/MC/AVR/inst-sbc.s @@ -1,9 +1,7 @@ ; RUN: llvm-mc -triple avr -show-encoding < %s | FileCheck %s -; RUN: llvm-mc -filetype=obj -triple avr < %s | llvm-objdump -d - | FileCheck --check-prefix=CHECK-INST %s - +; RUN: llvm-mc -filetype=obj -triple avr < %s | llvm-objdump -dr - | FileCheck --check-prefix=CHECK-INST %s foo: - sbc r0, r15 sbc r15, r0 sbc r16, r31 diff --git a/llvm/test/MC/AVR/inst-sbci.s b/llvm/test/MC/AVR/inst-sbci.s index 4994cf15d95c62..3330294f768d87 100644 --- a/llvm/test/MC/AVR/inst-sbci.s +++ b/llvm/test/MC/AVR/inst-sbci.s @@ -1,9 +1,7 @@ ; RUN: llvm-mc -triple avr -show-encoding < %s | FileCheck %s -; RUN: llvm-mc -filetype=obj -triple avr < %s | llvm-objdump --no-print-imm-hex -d - | FileCheck --check-prefix=CHECK-INST %s - +; RUN: llvm-mc -filetype=obj -triple avr < %s | llvm-objdump --no-print-imm-hex -dr - | FileCheck --check-prefix=CHECK-INST %s foo: - sbci r17, 21 sbci r23, 196 sbci r30, 244 diff --git a/llvm/test/MC/AVR/inst-sbi.s b/llvm/test/MC/AVR/inst-sbi.s index e08ea67deb5334..ef026efdebc6cb 100644 --- a/llvm/test/MC/AVR/inst-sbi.s +++ b/llvm/test/MC/AVR/inst-sbi.s @@ -1,9 +1,7 @@ ; RUN: llvm-mc -triple avr -show-encoding < %s | FileCheck %s -; RUN: llvm-mc -filetype=obj -triple avr < %s | llvm-objdump --no-print-imm-hex -d - | FileCheck -check-prefix=CHECK-INST %s - +; RUN: llvm-mc -filetype=obj -triple avr < %s | llvm-objdump --no-print-imm-hex -dr - | FileCheck -check-prefix=CHECK-INST %s foo: - sbi 3, 5 sbi 1, 1 sbi 7, 2 diff --git a/llvm/test/MC/AVR/inst-sbic.s b/llvm/test/MC/AVR/inst-sbic.s index 68762188c37252..1e8abdb29228d4 100644 --- a/llvm/test/MC/AVR/inst-sbic.s +++ b/llvm/test/MC/AVR/inst-sbic.s @@ -1,9 +1,7 @@ ; RUN: llvm-mc -triple avr -show-encoding < %s | FileCheck %s -; RUN: llvm-mc -filetype=obj -triple avr < %s | llvm-objdump --no-print-imm-hex -d - | FileCheck -check-prefix=CHECK-INST %s - +; RUN: llvm-mc -filetype=obj -triple avr < %s | llvm-objdump --no-print-imm-hex -dr - | FileCheck -check-prefix=CHECK-INST %s foo: - sbic 4, 3 sbic 6, 2 sbic 16, 5 diff --git a/llvm/test/MC/AVR/inst-sbis.s b/llvm/test/MC/AVR/inst-sbis.s index 506a1088c7f312..96996259ed2e5a 100644 --- a/llvm/test/MC/AVR/inst-sbis.s +++ b/llvm/test/MC/AVR/inst-sbis.s @@ -1,6 +1,5 @@ ; RUN: llvm-mc -triple avr -show-encoding < %s | FileCheck %s -; RUN: llvm-mc -filetype=obj -triple avr < %s | llvm-objdump --no-print-imm-hex -d - | FileCheck -check-prefix=CHECK-INST %s - +; RUN: llvm-mc -filetype=obj -triple avr < %s | llvm-objdump --no-print-imm-hex -dr - | FileCheck -check-prefix=CHECK-INST %s foo: sbis 4, 3 diff --git a/llvm/test/MC/AVR/inst-sbiw.s b/llvm/test/MC/AVR/inst-sbiw.s index 5e20789e0292b1..640f503c62aea3 100644 --- a/llvm/test/MC/AVR/inst-sbiw.s +++ b/llvm/test/MC/AVR/inst-sbiw.s @@ -1,9 +1,7 @@ ; RUN: llvm-mc -triple avr -mattr=addsubiw -show-encoding < %s | FileCheck %s ; RUN: llvm-mc -filetype=obj -triple avr -mattr=addsubiw < %s | llvm-objdump --no-print-imm-hex -dr --mattr=addsubiw - | FileCheck --check-prefix=CHECK-INST %s - foo: - sbiw r26, 54 sbiw X, 63 diff --git a/llvm/test/MC/AVR/inst-sbr.s b/llvm/test/MC/AVR/inst-sbr.s index 10440449ddf736..9f946e2cc0c868 100644 --- a/llvm/test/MC/AVR/inst-sbr.s +++ b/llvm/test/MC/AVR/inst-sbr.s @@ -1,6 +1,5 @@ ; RUN: llvm-mc -triple avr -show-encoding < %s | FileCheck %s -; RUN: llvm-mc -filetype=obj -triple avr < %s | llvm-objdump --no-print-imm-hex -d - | FileCheck --check-prefix=CHECK-INST %s - +; RUN: llvm-mc -filetype=obj -triple avr < %s | llvm-objdump --no-print-imm-hex -dr - | FileCheck --check-prefix=CHECK-INST %s foo: sbr r17, 208 diff --git a/llvm/test/MC/AVR/inst-sbrc.s b/llvm/test/MC/AVR/inst-sbrc.s index a11561c3587a37..05dd57d7b84d76 100644 --- a/llvm/test/MC/AVR/inst-sbrc.s +++ b/llvm/test/MC/AVR/inst-sbrc.s @@ -1,10 +1,8 @@ ; RUN: llvm-mc -triple avr -show-encoding < %s | FileCheck %s ; RUN: llvm-mc -filetype=obj -triple avr < %s \ -; RUN: | llvm-objdump --no-print-imm-hex -d - | FileCheck --check-prefix=INST %s - +; RUN: | llvm-objdump --no-print-imm-hex -dr - | FileCheck --check-prefix=INST %s foo: - sbrc r2, 3 sbrc r0, 7 diff --git a/llvm/test/MC/AVR/inst-sbrs.s b/llvm/test/MC/AVR/inst-sbrs.s index f0afe5f41a977c..9eccf34e7a2e7d 100644 --- a/llvm/test/MC/AVR/inst-sbrs.s +++ b/llvm/test/MC/AVR/inst-sbrs.s @@ -1,10 +1,8 @@ ; RUN: llvm-mc -triple avr -show-encoding < %s | FileCheck %s ; RUN: llvm-mc -filetype=obj -triple avr < %s \ -; RUN: | llvm-objdump --no-print-imm-hex -d - | FileCheck --check-prefix=INST %s - +; RUN: | llvm-objdump --no-print-imm-hex -dr - | FileCheck --check-prefix=INST %s foo: - sbrs r2, 3 sbrs r0, 7 diff --git a/llvm/test/MC/AVR/inst-ser.s b/llvm/test/MC/AVR/inst-ser.s index ba9386ac00ef39..02b597285736c7 100644 --- a/llvm/test/MC/AVR/inst-ser.s +++ b/llvm/test/MC/AVR/inst-ser.s @@ -1,6 +1,5 @@ ; RUN: llvm-mc -triple avr -show-encoding < %s | FileCheck %s -; RUN: llvm-mc -filetype=obj -triple avr < %s | llvm-objdump --no-print-imm-hex -d - | FileCheck --check-prefix=CHECK-INST %s - +; RUN: llvm-mc -filetype=obj -triple avr < %s | llvm-objdump --no-print-imm-hex -dr - | FileCheck --check-prefix=CHECK-INST %s foo: ser r16 diff --git a/llvm/test/MC/AVR/inst-sleep.s b/llvm/test/MC/AVR/inst-sleep.s index 5aeaeb46239615..75c64d72e1c8f2 100644 --- a/llvm/test/MC/AVR/inst-sleep.s +++ b/llvm/test/MC/AVR/inst-sleep.s @@ -1,9 +1,7 @@ ; RUN: llvm-mc -triple avr -show-encoding < %s | FileCheck %s -; RUN: llvm-mc -filetype=obj -triple avr < %s | llvm-objdump -d - | FileCheck --check-prefix=CHECK-INST %s - +; RUN: llvm-mc -filetype=obj -triple avr < %s | llvm-objdump -dr - | FileCheck --check-prefix=CHECK-INST %s foo: - sleep ; CHECK: sleep ; encoding: [0x88,0x95] diff --git a/llvm/test/MC/AVR/inst-spm.s b/llvm/test/MC/AVR/inst-spm.s index 3e1b8dd5774a44..2728491d0ea76c 100644 --- a/llvm/test/MC/AVR/inst-spm.s +++ b/llvm/test/MC/AVR/inst-spm.s @@ -1,9 +1,7 @@ ; RUN: llvm-mc -triple avr -mattr=spm,spmx -show-encoding < %s | FileCheck %s -; RUN: llvm-mc -filetype=obj -triple avr -mattr=spm,spmx < %s | llvm-objdump -d --mattr=spm,spmx - | FileCheck -check-prefix=CHECK-INST %s - +; RUN: llvm-mc -filetype=obj -triple avr -mattr=spm,spmx < %s | llvm-objdump -dr --mattr=spm,spmx - | FileCheck -check-prefix=CHECK-INST %s foo: - spm spm Z+ diff --git a/llvm/test/MC/AVR/inst-st.s b/llvm/test/MC/AVR/inst-st.s index ffa9a3c4370215..4cada60868cbc8 100644 --- a/llvm/test/MC/AVR/inst-st.s +++ b/llvm/test/MC/AVR/inst-st.s @@ -1,7 +1,6 @@ ; RUN: llvm-mc -triple avr -mattr=sram -show-encoding < %s | FileCheck %s ; RUN: llvm-mc -filetype=obj -triple avr -mattr=sram < %s \ -; RUN: | llvm-objdump -d --mattr=sram - | FileCheck --check-prefix=INST %s - +; RUN: | llvm-objdump -dr --mattr=sram - | FileCheck --check-prefix=INST %s foo: ; Normal diff --git a/llvm/test/MC/AVR/inst-std.s b/llvm/test/MC/AVR/inst-std.s index 571d5f475f9d72..ca817fa377224a 100644 --- a/llvm/test/MC/AVR/inst-std.s +++ b/llvm/test/MC/AVR/inst-std.s @@ -1,9 +1,8 @@ ; RUN: llvm-mc -triple avr -mattr=sram -show-encoding < %s | FileCheck %s ; RUN: llvm-mc -filetype=obj -triple avr -mattr=sram < %s \ -; RUN: | llvm-objdump -d --mattr=sram - | FileCheck --check-prefix=INST %s +; RUN: | llvm-objdump -dr --mattr=sram - | FileCheck --check-prefix=INST %s foo: - std Y+2, r2 std Y+0, r0 diff --git a/llvm/test/MC/AVR/inst-sts.s b/llvm/test/MC/AVR/inst-sts.s index 19400fdfee6002..f7bc3e9cd37b0d 100644 --- a/llvm/test/MC/AVR/inst-sts.s +++ b/llvm/test/MC/AVR/inst-sts.s @@ -1,9 +1,7 @@ ; RUN: llvm-mc -triple avr -mattr=sram -show-encoding < %s | FileCheck %s ; RUN: llvm-mc -filetype=obj -triple avr -mattr=sram < %s | llvm-objdump --no-print-imm-hex -dr --mattr=sram - | FileCheck -check-prefix=CHECK-INST %s - foo: - sts 3, r5 sts 255, r7 sts SYMBOL+1, r25 diff --git a/llvm/test/MC/AVR/inst-sub.s b/llvm/test/MC/AVR/inst-sub.s index 9dc5f2006aa13f..fa389e9a2d25a6 100644 --- a/llvm/test/MC/AVR/inst-sub.s +++ b/llvm/test/MC/AVR/inst-sub.s @@ -1,6 +1,5 @@ ; RUN: llvm-mc -triple avr -show-encoding < %s | FileCheck %s -; RUN: llvm-mc -filetype=obj -triple avr < %s | llvm-objdump -d - | FileCheck --check-prefix=CHECK-INST %s - +; RUN: llvm-mc -filetype=obj -triple avr < %s | llvm-objdump -dr - | FileCheck --check-prefix=CHECK-INST %s foo: sub r0, r15 diff --git a/llvm/test/MC/AVR/inst-subi.s b/llvm/test/MC/AVR/inst-subi.s index 148b07bde922c4..478d229a3e0c95 100644 --- a/llvm/test/MC/AVR/inst-subi.s +++ b/llvm/test/MC/AVR/inst-subi.s @@ -1,6 +1,5 @@ ; RUN: llvm-mc -triple avr -show-encoding < %s | FileCheck %s -; RUN: llvm-mc -filetype=obj -triple avr < %s | llvm-objdump --no-print-imm-hex -d - | FileCheck --check-prefix=CHECK-INST %s - +; RUN: llvm-mc -filetype=obj -triple avr < %s | llvm-objdump --no-print-imm-hex -dr - | FileCheck --check-prefix=CHECK-INST %s foo: subi r22, 82 diff --git a/llvm/test/MC/AVR/inst-swap.s b/llvm/test/MC/AVR/inst-swap.s index 4a265639f70ac7..3e783781003179 100644 --- a/llvm/test/MC/AVR/inst-swap.s +++ b/llvm/test/MC/AVR/inst-swap.s @@ -1,9 +1,7 @@ ; RUN: llvm-mc -triple avr -show-encoding < %s | FileCheck %s -; RUN: llvm-mc -filetype=obj -triple avr < %s | llvm-objdump -d - | FileCheck -check-prefix=CHECK-INST %s - +; RUN: llvm-mc -filetype=obj -triple avr < %s | llvm-objdump -dr - | FileCheck -check-prefix=CHECK-INST %s foo: - swap r31 swap r25 swap r5 diff --git a/llvm/test/MC/AVR/inst-tst.s b/llvm/test/MC/AVR/inst-tst.s index 5097a81916ad05..4be5f9bfa1d2be 100644 --- a/llvm/test/MC/AVR/inst-tst.s +++ b/llvm/test/MC/AVR/inst-tst.s @@ -1,9 +1,7 @@ ; RUN: llvm-mc -triple avr -show-encoding < %s | FileCheck %s -; RUN: llvm-mc -filetype=obj -triple avr < %s | llvm-objdump -d - | FileCheck --check-prefix=CHECK-INST %s - +; RUN: llvm-mc -filetype=obj -triple avr < %s | llvm-objdump -dr - | FileCheck --check-prefix=CHECK-INST %s foo: - tst r3 tst r14 tst r24 diff --git a/llvm/test/MC/AVR/inst-wdr.s b/llvm/test/MC/AVR/inst-wdr.s index fdded7cca1047b..913d77ca8585ac 100644 --- a/llvm/test/MC/AVR/inst-wdr.s +++ b/llvm/test/MC/AVR/inst-wdr.s @@ -1,9 +1,7 @@ ; RUN: llvm-mc -triple avr -show-encoding < %s | FileCheck %s -; RUN: llvm-mc -filetype=obj -triple avr < %s | llvm-objdump -d - | FileCheck --check-prefix=CHECK-INST %s - +; RUN: llvm-mc -filetype=obj -triple avr < %s | llvm-objdump -dr - | FileCheck --check-prefix=CHECK-INST %s foo: - wdr ; CHECK: wdr ; encoding: [0xa8,0x95] diff --git a/llvm/test/MC/AVR/inst-xch.s b/llvm/test/MC/AVR/inst-xch.s index 36d30e2bc52bf9..4a2e8d60920618 100644 --- a/llvm/test/MC/AVR/inst-xch.s +++ b/llvm/test/MC/AVR/inst-xch.s @@ -1,9 +1,7 @@ ; RUN: llvm-mc -triple avr -mattr=rmw -show-encoding < %s | FileCheck %s -; RUN: llvm-mc -filetype=obj -triple avr -mattr=rmw < %s | llvm-objdump -d --mattr=rmw - | FileCheck -check-prefix=CHECK-INST %s - +; RUN: llvm-mc -filetype=obj -triple avr -mattr=rmw < %s | llvm-objdump -dr --mattr=rmw - | FileCheck -check-prefix=CHECK-INST %s foo: - xch Z, r13 xch Z, r0 xch Z, r31 diff --git a/llvm/test/MC/AVR/modifiers.s b/llvm/test/MC/AVR/modifiers.s index 592c6ac125c332..51b3ad129f7320 100644 --- a/llvm/test/MC/AVR/modifiers.s +++ b/llvm/test/MC/AVR/modifiers.s @@ -4,7 +4,6 @@ ; FIXME: most of these tests use values (i.e. 0x0815) that are out of bounds. foo: - ldi r24, lo8(0x42) ldi r24, lo8(0x2342) @@ -17,9 +16,7 @@ foo: ; CHECK: ldi r24, lo8(35) ; encoding: [0x83,0xe2] ; CHECK: ldi r24, hi8(9026) ; encoding: [0x83,0xe2] - bar: - ldi r24, lo8(bar) ldi r24, hi8(bar) @@ -29,7 +26,6 @@ bar: ; CHECK: ; fixup A - offset: 0, value: hi8(bar), kind: fixup_hi8_ldi lo8: - ldi r24, lo8(0x0815) ldi r24, lo8(foo) ldi r24, lo8(bar + 5) @@ -41,7 +37,6 @@ lo8: ; CHECK: ; fixup A - offset: 0, value: lo8(bar+5), kind: fixup_lo8_ldi lo8_neg: - ldi r24, lo8(-(123456)) ldi r24, lo8(-(foo)) @@ -50,7 +45,6 @@ lo8_neg: ; CHECK: ; fixup A - offset: 0, value: lo8(-(foo)), kind: fixup_lo8_ldi_neg hi8: - ldi r24, hi8(0x0815) ldi r24, hi8(foo) ldi r24, hi8(bar + 5) @@ -62,7 +56,6 @@ hi8: ; CHECK: ; fixup A - offset: 0, value: hi8(bar+5), kind: fixup_hi8_ldi hi8_neg: - ldi r24, hi8(-(123456)) ldi r24, hi8(-(foo)) @@ -71,7 +64,6 @@ hi8_neg: ; CHECK: ; fixup A - offset: 0, value: hi8(-(foo)), kind: fixup_hi8_ldi_neg hh8: - ldi r24, hh8(0x0815) ldi r24, hh8(foo) ldi r24, hh8(bar + 5) @@ -83,7 +75,6 @@ hh8: ; CHECK: ; fixup A - offset: 0, value: hh8(bar+5), kind: fixup_hh8_ldi hh8_neg: - ldi r24, hh8(-(123456)) ldi r24, hh8(-(foo)) @@ -92,7 +83,6 @@ hh8_neg: ; CHECK: ; fixup A - offset: 0, value: hh8(-(foo)), kind: fixup_hh8_ldi_neg hlo8: ; synonym with hh8() above, hence the... odd results - ldi r24, hlo8(0x0815) ldi r24, hlo8(foo) ldi r24, hlo8(bar + 5) @@ -104,17 +94,14 @@ hlo8: ; synonym with hh8() above, hence the... odd results ; CHECK: ; fixup A - offset: 0, value: hh8(bar+5), kind: fixup_hh8_ldi hlo8_neg: - ldi r24, hlo8(-(123456)) ldi r24, hlo8(-(foo)) - ; CHECK: ldi r24, hh8(-(123456)) ; encoding: [0x8e,0xef] ; CHECK: ldi r24, hh8(-(foo)) ; encoding: [0x80'A',0xe0] ; CHECK: ; fixup A - offset: 0, value: hh8(-(foo)), kind: fixup_hh8_ldi_neg hhi8: - ldi r24, hhi8(0x0815) ldi r24, hhi8(foo) ldi r24, hhi8(bar + 5) @@ -167,7 +154,6 @@ pm_hh8: ; CHECK: ldi r24, pm_hh8(bar+5) ; encoding: [0x80'A',0xe0] ; CHECK: ; fixup A - offset: 0, value: pm_hh8(bar+5), kind: fixup_hh8_ldi_pm - pm_lo8_neg: ldi r24, pm_lo8(-(0x0815)) ldi r24, pm_lo8(-(foo)) diff --git a/llvm/test/MC/AVR/registers.s b/llvm/test/MC/AVR/registers.s index 62872a83a87c73..62620ccab0e2a8 100644 --- a/llvm/test/MC/AVR/registers.s +++ b/llvm/test/MC/AVR/registers.s @@ -1,5 +1,5 @@ ; RUN: llvm-mc -triple avr -show-encoding < %s | FileCheck %s -; RUN: llvm-mc -filetype=obj -triple avr < %s | llvm-objdump -d - | FileCheck -check-prefix=CHECK-INST %s +; RUN: llvm-mc -filetype=obj -triple avr < %s | llvm-objdump -dr - | FileCheck -check-prefix=CHECK-INST %s ; Test register aliases: the upper 6 registers have aliases that can be used in ; assembly. diff --git a/llvm/test/MC/AVR/relocations-abs.s b/llvm/test/MC/AVR/relocations-abs.s index b384cadcec202c..937ce6faf7a3d7 100644 --- a/llvm/test/MC/AVR/relocations-abs.s +++ b/llvm/test/MC/AVR/relocations-abs.s @@ -1,4 +1,4 @@ -; RUN: llvm-mc -filetype=obj -triple=avr %s | llvm-objdump -d -r - | FileCheck %s +; RUN: llvm-mc -filetype=obj -triple=avr %s | llvm-objdump -dr -r - | FileCheck %s ; CHECK: : ; CHECK-NEXT: 00 00 nop diff --git a/llvm/test/MC/AVR/relocations.s b/llvm/test/MC/AVR/relocations.s index ffc7ba8b8ff7e6..02d4595a510e5a 100644 --- a/llvm/test/MC/AVR/relocations.s +++ b/llvm/test/MC/AVR/relocations.s @@ -3,6 +3,7 @@ ; CHECK: RELOCATION RECORDS FOR .global bar + bar: jmp bar diff --git a/llvm/test/MC/AVR/separator.s b/llvm/test/MC/AVR/separator.s index c62e01bda93d6e..4916fcc6c5ccc2 100644 --- a/llvm/test/MC/AVR/separator.s +++ b/llvm/test/MC/AVR/separator.s @@ -1,7 +1,6 @@ -; RUN: llvm-mc -filetype=obj -triple avr < %s | llvm-objdump -d - | FileCheck %s +; RUN: llvm-mc -filetype=obj -triple avr < %s | llvm-objdump -dr - | FileCheck %s foo: - ; The $ symbol is a separator (like a newline). mov r0, r1 $ mov r1, r2 $ mov r2, r3 $ mov r3, r4 diff --git a/llvm/test/MC/AVR/syntax-reg-int-literal.s b/llvm/test/MC/AVR/syntax-reg-int-literal.s index 3040bd39b803fa..0f6bc5cb9b0403 100644 --- a/llvm/test/MC/AVR/syntax-reg-int-literal.s +++ b/llvm/test/MC/AVR/syntax-reg-int-literal.s @@ -7,7 +7,6 @@ foo: add r16, r31 add 31, r16 - ; CHECK: add r0, r15 ; encoding: [0x0f,0x0c] ; CHECK: add r15, r0 ; encoding: [0xf0,0x0c] ; CHECK: add r16, r31 ; encoding: [0x0f,0x0f] diff --git a/llvm/test/MC/AVR/syntax-reg-pair.s b/llvm/test/MC/AVR/syntax-reg-pair.s index b4676cca089d7a..eaf3146bf2ed75 100644 --- a/llvm/test/MC/AVR/syntax-reg-pair.s +++ b/llvm/test/MC/AVR/syntax-reg-pair.s @@ -1,7 +1,6 @@ ; RUN: llvm-mc -triple avr -mattr=addsubiw -show-encoding < %s | FileCheck %s foo: - sbiw r24, 1 sbiw r25:r24, 2 sbiw r24, 2