Skip to content

Commit

Permalink
Use common proc instruction on x86
Browse files Browse the repository at this point in the history
  • Loading branch information
fjeremic committed Jun 9, 2021
1 parent 9fc3a0f commit 9263c24
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 16 deletions.
14 changes: 7 additions & 7 deletions compiler/x/codegen/OMRCodeGenerator.cpp
Expand Up @@ -602,9 +602,9 @@ OMR::X86::CodeGenerator::beginInstructionSelection()
}

if (self()->getAppendInstruction())
generateInstruction(PROCENTRY, startNode, self());
generateInstruction(TR::InstOpCode::proc, startNode, self());
else
new (self()->trHeapMemory()) TR::Instruction(PROCENTRY, (TR::Instruction *)NULL, self());
new (self()->trHeapMemory()) TR::Instruction(TR::InstOpCode::proc, (TR::Instruction *)NULL, self());

// Set the default FPCW to single precision mode if we are allowed to.
//
Expand Down Expand Up @@ -1646,10 +1646,10 @@ void OMR::X86::CodeGenerator::doBinaryEncoding()
{
LexicalTimer pt1("code generation", self()->comp()->phaseTimer());

// Generate fixup code for the interpreter entry point right before PROCENTRY
// Generate fixup code for the interpreter entry point right before TR::InstOpCode::proc
//
TR::Instruction * procEntryInstruction = self()->getFirstInstruction();
while (procEntryInstruction && procEntryInstruction->getOpCodeValue() != PROCENTRY)
while (procEntryInstruction && procEntryInstruction->getOpCodeValue() != TR::InstOpCode::proc)
{
procEntryInstruction = procEntryInstruction->getNext();
}
Expand Down Expand Up @@ -1712,9 +1712,9 @@ void OMR::X86::CodeGenerator::doBinaryEncoding()
TR::Instruction * estimateCursor = self()->getFirstInstruction();
int32_t estimate = 0;

// Estimate the binary length up to PROCENTRY
// Estimate the binary length up to TR::InstOpCode::proc
//
while (estimateCursor && estimateCursor->getOpCodeValue() != PROCENTRY)
while (estimateCursor && estimateCursor->getOpCodeValue() != TR::InstOpCode::proc)
{
estimate = estimateCursor->estimateBinaryLength(estimate);
estimateCursor = estimateCursor->getNext();
Expand Down Expand Up @@ -1932,7 +1932,7 @@ void OMR::X86::CodeGenerator::doBinaryEncoding()
self()->getBinaryBufferCursor() - instructionStart);

if (self()->comp()->target().is64Bit() &&
(cursorInstruction->getOpCodeValue() == PROCENTRY))
(cursorInstruction->getOpCodeValue() == TR::InstOpCode::proc))
{
// A hack to set the linkage info word
//
Expand Down
1 change: 0 additions & 1 deletion compiler/x/codegen/OMRInstOpCode.enum
Expand Up @@ -1038,7 +1038,6 @@
VFNMSUB231SDRegRegReg,
VFNMSUB231SDRegRegMem,
VGFENCE,
PROCENTRY,
DQImm64,
DDImm4,
DWImm2,
Expand Down
1 change: 0 additions & 1 deletion compiler/x/codegen/OMRInstOpCode.enum.temp.defines
Expand Up @@ -1026,7 +1026,6 @@
#define VFNMSUB231SDRegRegReg OMR::InstOpCode::VFNMSUB231SDRegRegReg
#define VFNMSUB231SDRegRegMem OMR::InstOpCode::VFNMSUB231SDRegRegMem
#define VGFENCE OMR::InstOpCode::VGFENCE
#define PROCENTRY OMR::InstOpCode::PROCENTRY
#define DQImm64 OMR::InstOpCode::DQImm64
#define DDImm4 OMR::InstOpCode::DDImm4
#define DWImm2 OMR::InstOpCode::DWImm2
Expand Down
4 changes: 2 additions & 2 deletions compiler/x/codegen/OMRMachine.cpp
Expand Up @@ -393,7 +393,7 @@ OMR::X86::Machine::findBestFreeGPRegister(TR::Instruction *currentInstruction,
cursor && numCandidates > 1;
cursor = cursor->getPrev())
{
if (cursor->getOpCodeValue() == PROCENTRY)
if (cursor->getOpCodeValue() == TR::InstOpCode::proc)
break;

if (cursor->getOpCodeValue() == TR::InstOpCode::assocreg)
Expand Down Expand Up @@ -543,7 +543,7 @@ TR::RealRegister *OMR::X86::Machine::freeBestGPRegister(TR::Instruction
cursor;
cursor = cursor->getPrev())
{
if (cursor->getOpCodeValue() == PROCENTRY)
if (cursor->getOpCodeValue() == TR::InstOpCode::proc)
break;

if (numCandidates == 0)
Expand Down
4 changes: 0 additions & 4 deletions compiler/x/codegen/X86Ops.ins
Expand Up @@ -4088,10 +4088,6 @@ INSTRUCTION(VGFENCE, VGFence, // Special Fence used for patching virtual guards
BINARY(VEX_L___, VEX_vNONE, PREFIX___, REX__, ESCAPE_____, 0x00, 0, ModRM_NONE, Immediate_0),
PROPERTY0(0),
PROPERTY1(IA32OpProp1_PseudoOp)),
INSTRUCTION(PROCENTRY, ProcEntry, // Entry to the method
BINARY(VEX_L___, VEX_vNONE, PREFIX___, REX__, ESCAPE_____, 0x00, 0, ModRM_NONE, Immediate_0),
PROPERTY0(0),
PROPERTY1(IA32OpProp1_PseudoOp)),
INSTRUCTION(DQImm64, dq, // Define 8 bytes
BINARY(VEX_L___, VEX_vNONE, PREFIX___, REX__, ESCAPE_____, 0x00, 0, ModRM_NONE, Immediate_8),
PROPERTY0(0),
Expand Down
2 changes: 1 addition & 1 deletion compiler/x/codegen/X86SystemLinkage.cpp
Expand Up @@ -482,7 +482,7 @@ TR::X86SystemLinkage::createPrologue(TR::Instruction *cursor)

cg()->setFrameSizeInBytes(frameSize);

// Set the VFP state for the PROCENTRY instruction
// Set the VFP state for the TR::InstOpCode::proc instruction
//
if (properties.getAlwaysDedicateFramePointerRegister())
{
Expand Down

0 comments on commit 9263c24

Please sign in to comment.