Skip to content

Conversation

@meg-gupta
Copy link
Contributor

AddrOpnd was used with AddrOpndKindConstant for 64bit immediates, and then
legalized. Replace all such uses with IntConstOpnd, and add code in
legalizer to handle them.

@meg-gupta
Copy link
Contributor Author

@rajatd , @satheeshravi Please take a look when you can, thanks!

@@ -12936,7 +12935,7 @@ Lowerer::LowerInlineeEnd(IR::Instr *instr)
{
// REVIEW (michhol): OOP JIT. why are we creating an addropnd with 0?
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could get rid of this review comment. What do you think @MikeHolman?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sounds good to me


In reply to: 80370964 [](ancestors = 80370964)

instr = IR::Instr::New(Js::OpCode::SHR, opndOffset, opndOffset, IR::IntConstOpnd::New(rightShiftAmount - leftShiftAmount, TyUint8, instrLdSt->m_func, true), instrLdSt->m_func);
instrLdSt->InsertBefore(instr);
instr = IR::Instr::New(Js::OpCode::AND, opndOffset, opndOffset, IR::AddrOpnd::New((void*)((__int64)(polymorphicInlineCacheSize - 1) << leftShiftAmount), IR::AddrOpndKindConstant, instrLdSt->m_func, true), instrLdSt->m_func);
instr = IR::Instr::New(Js::OpCode::AND, opndOffset, opndOffset, IR::IntConstOpnd::New(((__int64)(polymorphicInlineCacheSize - 1) << leftShiftAmount), TyInt64, instrLdSt->m_func, true), instrLdSt->m_func);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

__int64 [](start = 92, length = 7)

I think you should be able to remove the cast and change the type to TyMachReg

// Unconditionally set the sign bit. This will get XORd away when we remove the tag.
// dst64 = OR 0x8000000000000000
insertInstr->InsertBefore(IR::Instr::New(Js::OpCode::OR, dst, dst, IR::AddrOpnd::New((void *)MachSignBit, IR::AddrOpndKindConstant, this->m_func), this->m_func));
insertInstr->InsertBefore(IR::Instr::New(Js::OpCode::OR, dst, dst, IR::IntConstOpnd::New(MachSignBit, TyInt64, this->m_func), this->m_func));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TyInt64 [](start = 110, length = 7)

Consider changing this to TyMachReg

@rajatd
Copy link
Contributor

rajatd commented Sep 24, 2016

    stackLimitOpnd = IR::AddrOpnd::New((void *)(frameSize + scriptStackLimit), IR::AddrOpndKindDynamicMisc, this->m_func);

Change this one too.


Refers to: lib/Backend/i386/LowererMDArch.cpp:1727 in dd9db5c. [](commit_id = dd9db5c, deletion_comment = False)

@rajatd
Copy link
Contributor

rajatd commented Sep 26, 2016

LGTM other than the comments.


instrNew = LowererMD::CreateAssign(regOpnd, opnd, instr);

size_t cookie = (size_t)Math::Rand();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cookie [](start = 11, length = 6)

nit: Please check if TyMachReg is ok when the value is an unsigned int. I am not sure about the implications.

if (!instr->isInlineeEntryInstr)
{
Assert(forms & L_Reg);
IR::IndirOpnd * indirOpnd = instr->m_func->GetTopFunc()->GetConstantAddressIndirOpnd(intOpnd->GetValue(), IR::AddrOpndKindConstantAddress, TyMachPtr, Js::OpCode::MOV);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

intOpnd->GetValue() [](start = 105, length = 19)

This is still being treated as an address inside the API. and it looks like the API is creating AddrOpnd. Should you be creating a IntOpnd in this case ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, changed this to IntConstOpnd

if (!instr->isInlineeEntryInstr)
{
Assert(forms & L_Reg);
IR::IndirOpnd * indirOpnd = instr->m_func->GetTopFunc()->GetConstantAddressIndirOpnd(intOpnd->GetValue(), IR::AddrOpndKindConstantAddress, TyMachPtr, Js::OpCode::MOV);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AddrOpndKindConstantAddress [](start = 130, length = 27)

same here.

@satheeshravi
Copy link
Contributor

                                          IR::AddrOpnd::New((Js::Var)Js::FloatTag_Value,

Change this, as well ?


Refers to: lib/Backend/amd64/LowererMDArch.cpp:2620 in dd9db5c. [](commit_id = dd9db5c, deletion_comment = False)

@dilijev
Copy link
Contributor

dilijev commented Sep 26, 2016

@meg-gupta FYI Tab Check issues were resolved in #1636

@meg-gupta
Copy link
Contributor Author

@dotnet-bot test Windows x86_debug please

@meg-gupta
Copy link
Contributor Author

@dotnet-bot test Windows arm_debug
@dotnet-bot test Windows arm_release
@dotnet-bot test Windows arm_test

@satheeshravi
Copy link
Contributor

:shipit:

@meg-gupta meg-gupta force-pushed the newchangeimmop branch 2 times, most recently from e748e39 to 29936de Compare October 6, 2016 00:29
@meg-gupta
Copy link
Contributor Author

@dotnet-bot test Windows x64_release

AddrOpnd was used with AddOpndKindConstant for 64bit immediates, and then
legalized. Replace all such uses with IntConstOpnd, and add code in
legalizer to handle them.
@chakrabot chakrabot merged commit 965a30a into chakra-core:master Oct 6, 2016
chakrabot pushed a commit that referenced this pull request Oct 6, 2016
…t immediates

Merge pull request #1630 from meg-gupta:newchangeimmop

AddrOpnd was used with AddrOpndKindConstant for 64bit immediates, and then
legalized. Replace all such uses with IntConstOpnd, and add code in
legalizer to handle them.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants