@@ -14897,14 +14897,14 @@ Lowerer::GenerateFastStringLdElem(IR::Instr * ldElem, IR::LabelInstr * labelHelp
1489714897 {
1489814898 // Just use the offset to indirect into the string buffer
1489914899 charIndirOpnd = IR::IndirOpnd::New(bufferOpnd, indirOpnd->GetOffset() * sizeof(wchar_t), TyUint16, this->m_func);
14900- index32CmpOpnd = IR::IntConstOpnd::New(indirOpnd->GetOffset(), TyUint32, this->m_func);
14900+ index32CmpOpnd = IR::IntConstOpnd::New((uint32) indirOpnd->GetOffset(), TyUint32, this->m_func);
1490114901 }
1490214902
1490314903 // Check if the index is in range of the string length
1490414904 // CMP [baseOpnd + offset(length)], indexOpnd -- string length
1490514905 // JBE $helper -- unsigned compare, and string length are at most INT_MAX - 1
1490614906 // -- so that even if we have a negative index, this will fail
14907- InsertCompareBranch(IR::IndirOpnd::New(baseOpnd, offsetof(Js::JavascriptString, m_charLength), TyInt32 , this->m_func)
14907+ InsertCompareBranch(IR::IndirOpnd::New(baseOpnd, offsetof(Js::JavascriptString, m_charLength), TyUint32 , this->m_func)
1490814908 , index32CmpOpnd, Js::OpCode::BrLe_A, true, labelHelper, ldElem);
1490914909
1491014910 // Load the string buffer and make sure it is not null
@@ -14920,7 +14920,7 @@ Lowerer::GenerateFastStringLdElem(IR::Instr * ldElem, IR::LabelInstr * labelHelp
1492014920 // MOV charOpnd, [bufferOpnd + index32Opnd]
1492114921 // CMP charOpnd, 0x80
1492214922 // JAE $helper
14923- IR::RegOpnd * charOpnd = IR::RegOpnd::New(TyInt32 , this->m_func);
14923+ IR::RegOpnd * charOpnd = IR::RegOpnd::New(TyUint32 , this->m_func);
1492414924 const IR::AutoReuseOpnd autoReuseCharOpnd(charOpnd, m_func);
1492514925 InsertMove(charOpnd, charIndirOpnd, ldElem);
1492614926 InsertCompareBranch(charOpnd, IR::IntConstOpnd::New(Js::CharStringCache::CharStringCacheSize, TyUint16, this->m_func),
0 commit comments