Skip to content

Commit

Permalink
Fixed comment and indentation in CFI pass.
Browse files Browse the repository at this point in the history
Fixed a comment in the CFI pass.  Also corrected indentation.
No functionality changes.
  • Loading branch information
jtcriswell committed Apr 19, 2018
1 parent ff7b11e commit 491397d
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions llvm/lib/Target/X86/X86CFIOptPass.cpp
Expand Up @@ -691,7 +691,7 @@ void X86CFIOptPass::insertCheckJmp64m(MachineBasicBlock& MBB, MachineInstr* MI,
unsigned killed = 0;
#endif

// if the JMP32m kills a register, use it for check
// if the JMP64m kills a register, use it for check
if(killed != 0){
// MOV64rm, %killed, mem_loc
BuildMI(MBB,MI,dl,TII->get(X86::MOV64rm),killed)
Expand Down Expand Up @@ -753,16 +753,16 @@ void X86CFIOptPass::insertCheckJmp64m(MachineBasicBlock& MBB, MachineInstr* MI,
else
abort();

// pushl %reg
BuildMI (MBB,MI,dl,TII->get(X86::PUSH64r)).addReg(reg);
// pushl %reg
BuildMI (MBB,MI,dl,TII->get(X86::PUSH64r)).addReg(reg);

// MOV64rm mem_loc, %reg
BuildMI(MBB,MI,dl,TII->get(X86::MOV64rm),reg)
.addReg(MI->getOperand(0).getReg()) // base
.addImm(MI->getOperand(1).getImm()) // scale
.addReg(MI->getOperand(2).getReg()) // index
.addOperand(MI->getOperand(3)) // displacement
.addReg(MI->getOperand(4).getReg()); //segment register
// MOV64rm mem_loc, %reg
BuildMI(MBB,MI,dl,TII->get(X86::MOV64rm),reg)
.addReg(MI->getOperand(0).getReg()) // base
.addImm(MI->getOperand(1).getImm()) // scale
.addReg(MI->getOperand(2).getReg()) // index
.addOperand(MI->getOperand(3)) // displacement
.addReg(MI->getOperand(4).getReg()); //segment register

//
// Add an instruction to perform the label check.
Expand All @@ -774,7 +774,7 @@ void X86CFIOptPass::insertCheckJmp64m(MachineBasicBlock& MBB, MachineInstr* MI,

// JNE_4 EMBB
BuildMI(MBB,MI,dl,TII->get(X86::JNE_4)).addMBB(EMBB);
}
}
}

//
Expand Down

0 comments on commit 491397d

Please sign in to comment.