diff options
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/Target/X86/X86MCInstLower.cpp | 31 |
1 files changed, 15 insertions, 16 deletions
diff --git a/llvm/lib/Target/X86/X86MCInstLower.cpp b/llvm/lib/Target/X86/X86MCInstLower.cpp index 9ad03ae383b..b98e4879de3 100644 --- a/llvm/lib/Target/X86/X86MCInstLower.cpp +++ b/llvm/lib/Target/X86/X86MCInstLower.cpp @@ -816,32 +816,31 @@ static void LowerSTATEPOINT(MCStreamer &OS, StackMaps &SM, assert(Is64Bit && "Statepoint currently only supports X86-64"); // Lower call target and choose correct opcode - const MachineOperand &call_target = StatepointOpers(&MI).getCallTarget(); - MCOperand call_target_mcop; - unsigned call_opcode; - switch (call_target.getType()) { + const MachineOperand &CallTarget = StatepointOpers(&MI).getCallTarget(); + MCOperand CallTargetMCOp; + unsigned CallOpcode; + switch (CallTarget.getType()) { case MachineOperand::MO_GlobalAddress: case MachineOperand::MO_ExternalSymbol: - call_target_mcop = MCInstLowering.LowerSymbolOperand( - call_target, - MCInstLowering.GetSymbolFromOperand(call_target)); - call_opcode = X86::CALL64pcrel32; + CallTargetMCOp = MCInstLowering.LowerSymbolOperand( + CallTarget, MCInstLowering.GetSymbolFromOperand(CallTarget)); + CallOpcode = X86::CALL64pcrel32; // Currently, we only support relative addressing with statepoints. // Otherwise, we'll need a scratch register to hold the target // address. You'll fail asserts during load & relocation if this // symbol is to far away. (TODO: support non-relative addressing) break; case MachineOperand::MO_Immediate: - call_target_mcop = MCOperand::CreateImm(call_target.getImm()); - call_opcode = X86::CALL64pcrel32; + CallTargetMCOp = MCOperand::CreateImm(CallTarget.getImm()); + CallOpcode = X86::CALL64pcrel32; // Currently, we only support relative addressing with statepoints. // Otherwise, we'll need a scratch register to hold the target // immediate. You'll fail asserts during load & relocation if this // address is to far away. (TODO: support non-relative addressing) break; case MachineOperand::MO_Register: - call_target_mcop = MCOperand::CreateReg(call_target.getReg()); - call_opcode = X86::CALL64r; + CallTargetMCOp = MCOperand::CreateReg(CallTarget.getReg()); + CallOpcode = X86::CALL64r; break; default: llvm_unreachable("Unsupported operand type in statepoint call target"); @@ -849,10 +848,10 @@ static void LowerSTATEPOINT(MCStreamer &OS, StackMaps &SM, } // Emit call - MCInst call_inst; - call_inst.setOpcode(call_opcode); - call_inst.addOperand(call_target_mcop); - OS.EmitInstruction(call_inst, STI); + MCInst CallInst; + CallInst.setOpcode(CallOpcode); + CallInst.addOperand(CallTargetMCOp); + OS.EmitInstruction(CallInst, STI); // Record our statepoint node in the same section used by STACKMAP // and PATCHPOINT |