@@ -932,7 +932,8 @@ IR::Instr* LowererMD::Simd128LowerNeg(IR::Instr *instr)
932932 IR::Opnd* dst = instr->GetDst ();
933933 IR::Opnd* src1 = instr->GetSrc1 ();
934934 Js::OpCode addOpcode = Js::OpCode::PADDD;
935- void * allOnes = (void *)&X86_ALL_ONES_I4;
935+ ThreadContextInfo* threadContextInfo = m_func->GetThreadContextInfo ();
936+ intptr_t allOnes = threadContextInfo->GetX86AllOnesI4Addr ();
936937
937938 Assert (dst->IsRegOpnd () && dst->IsSimd128 ());
938939 Assert (src1->IsRegOpnd () && src1->IsSimd128 ());
@@ -946,12 +947,12 @@ IR::Instr* LowererMD::Simd128LowerNeg(IR::Instr *instr)
946947 case Js::OpCode::Simd128_Neg_I8:
947948 case Js::OpCode::Simd128_Neg_U8:
948949 addOpcode = Js::OpCode::PADDW;
949- allOnes = ( void *)&X86_ALL_ONES_I8 ;
950+ allOnes = threadContextInfo-> GetX86AllOnesI8Addr () ;
950951 break ;
951952 case Js::OpCode::Simd128_Neg_I16:
952953 case Js::OpCode::Simd128_Neg_U16:
953954 addOpcode = Js::OpCode::PADDB;
954- allOnes = ( void *)&X86_ALL_ONES_I16 ;
955+ allOnes = threadContextInfo-> GetX86AllOnesI16Addr () ;
955956 break ;
956957 default :
957958 Assert (UNREACHED);
@@ -962,7 +963,7 @@ IR::Instr* LowererMD::Simd128LowerNeg(IR::Instr *instr)
962963 instr->InsertBefore (pInstr);
963964
964965 // PANDN dst, dst, 0xfff...f
965- pInstr = IR::Instr::New (Js::OpCode::PANDN, dst, dst, IR::MemRefOpnd::New (m_func-> GetThreadContextInfo () ->GetX86AllNegOnesAddr (), src1->GetType (), m_func), m_func);
966+ pInstr = IR::Instr::New (Js::OpCode::PANDN, dst, dst, IR::MemRefOpnd::New (threadContextInfo ->GetX86AllNegOnesAddr (), src1->GetType (), m_func), m_func);
966967 instr->InsertBefore (pInstr);
967968 Legalize (pInstr);
968969
0 commit comments