[X86MCInst] Clean up LowerSTATEPOINT: variable names. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236675 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Sanjoy Das
2015-05-06 23:53:24 +00:00
parent 9397699834
commit 9a46db689a

View File

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