llvm.org GIT mirror llvm / ef8a810
Cleanup and test X86AsmPrinter::printPCRelImm. It is only used for asm printing. On X86 we put basic block addresses on register before passing them to inline asm, so the MO_MachineBasicBlock case was dead. MO_ExternalSymbol was dead since any symbol being passed to inline asm is represented as MO_GlobalAddress. The MO_GlobalAddress and MO_Register cases were not tested. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195824 91177308-0d34-0410-b5e6-96231b3b80d8 Rafael Espindola 6 years ago
2 changed file(s) with 15 addition(s) and 4 deletion(s). Raw diff Collapse all Expand all
219219 case MachineOperand::MO_Immediate:
220220 O << MO.getImm();
221221 return;
222 case MachineOperand::MO_MachineBasicBlock:
223 O << *MO.getMBB()->getSymbol();
224 return;
225222 case MachineOperand::MO_GlobalAddress:
226 case MachineOperand::MO_ExternalSymbol:
227223 printSymbolOperand(MO, O);
228224 return;
229225 }
5858 %asm = tail call i32 asm sideeffect "", "={ax},i,~{eax},~{flags},~{rax}"(i64 61) nounwind
5959 ret i32 %asm
6060 }
61
62 @test8_v = global i32 42
63
64 define void @test8() {
65 call void asm sideeffect "${0:P}", "i"( i32* @test8_v )
66 ret void
67 }
68
69 define void @test9() {
70 call void asm sideeffect "${0:P}", "X"( i8* blockaddress(@test9, %bb) )
71 br label %bb
72
73 bb:
74 ret void
75 }