@@ -932,7 +932,8 @@ IR::Instr* LowererMD::Simd128LowerNeg(IR::Instr *instr)
932
932
IR::Opnd* dst = instr->GetDst ();
933
933
IR::Opnd* src1 = instr->GetSrc1 ();
934
934
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 ();
936
937
937
938
Assert (dst->IsRegOpnd () && dst->IsSimd128 ());
938
939
Assert (src1->IsRegOpnd () && src1->IsSimd128 ());
@@ -946,12 +947,12 @@ IR::Instr* LowererMD::Simd128LowerNeg(IR::Instr *instr)
946
947
case Js::OpCode::Simd128_Neg_I8:
947
948
case Js::OpCode::Simd128_Neg_U8:
948
949
addOpcode = Js::OpCode::PADDW;
949
- allOnes = ( void *)&X86_ALL_ONES_I8 ;
950
+ allOnes = threadContextInfo-> GetX86AllOnesI8Addr () ;
950
951
break ;
951
952
case Js::OpCode::Simd128_Neg_I16:
952
953
case Js::OpCode::Simd128_Neg_U16:
953
954
addOpcode = Js::OpCode::PADDB;
954
- allOnes = ( void *)&X86_ALL_ONES_I16 ;
955
+ allOnes = threadContextInfo-> GetX86AllOnesI16Addr () ;
955
956
break ;
956
957
default :
957
958
Assert (UNREACHED);
@@ -962,7 +963,7 @@ IR::Instr* LowererMD::Simd128LowerNeg(IR::Instr *instr)
962
963
instr->InsertBefore (pInstr);
963
964
964
965
// 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);
966
967
instr->InsertBefore (pInstr);
967
968
Legalize (pInstr);
968
969
0 commit comments