Skip to content

Commit

Permalink
Code review 2
Browse files Browse the repository at this point in the history
  • Loading branch information
arunetm committed Dec 8, 2017
1 parent 1f295d2 commit 0291cc2
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 32 deletions.
20 changes: 0 additions & 20 deletions lib/Backend/IRBuilderAsmJs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4747,27 +4747,7 @@ IRBuilderAsmJs::BuildFloat64x2_2(Js::OpCodeAsmJs newOpcode, uint32 offset, BUILD
Js::OpCode opcode;

opcode = GetSimdOpcode(newOpcode);
/*
switch (newOpcode)
{
case Js::OpCodeAsmJs::Simd128_Return_D2:
if (m_func->IsLoopBody())
{
IR::Instr* slotInstr = GenerateStSlotForReturn(src1Opnd, IRType::TySimd128F4);
AddInstr(slotInstr, offset);
}
opcode = Js::OpCode::Ld_A;
break;
case Js::OpCodeAsmJs::Simd128_Ld_D2:
opcode = Js::OpCode::Ld_A; //to make the compiler happy
Assert(false); //should be unreachable
break;

default:
opcode = GetSimdOpcode(newOpcode);
}
*/
AssertMsg((uint32)opcode, "Invalid backend SIMD opcode");

IR::Instr * instr = IR::Instr::New(opcode, dstOpnd, src1Opnd, m_func);
Expand Down
2 changes: 1 addition & 1 deletion lib/Common/ConfigFlagsList.h
Original file line number Diff line number Diff line change
Expand Up @@ -897,7 +897,7 @@ FLAGNR(Boolean, WasmIgnoreResponse , "Ignore the type of the Response object"
FLAGNR(Number, WasmMaxTableSize , "Maximum size allowed to the WebAssembly.Table", DEFAULT_CONFIG_WasmMaxTableSize)
FLAGNR(Boolean, WasmSignExtends , "Use new WebAssembly sign extension operators", DEFAULT_CONFIG_WasmSignExtends)
#ifdef ENABLE_WASM_SIMD
FLAGR(Boolean, WasmSimd, "Enable SIMD in WebAssembly", DEFAULT_CONFIG_WasmSimd)
FLAGNR(Boolean, WasmSimd , "Enable SIMD in WebAssembly", DEFAULT_CONFIG_WasmSimd)
#endif

#ifdef ENABLE_SIMDJS
Expand Down
4 changes: 0 additions & 4 deletions lib/Runtime/Base/ThreadConfigFlagsList.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,3 @@ FLAG_RELEASE(IsWinRTAdaptiveAppsEnabled, WinRTAdaptiveApps)
//SIMD_JS
FLAG_RELEASE(IsSimdjsEnabled, Simdjs)
#endif

#ifdef ENABLE_WASM_SIMD
FLAG_RELEASE(IsWasmSimdEnabled, WasmSimd)
#endif
1 change: 0 additions & 1 deletion lib/Runtime/ByteCode/OpCodesAsmJs.h
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,6 @@ MACRO_EXTEND_WMS( PrintF64, Double2, None)

#include "OpCodesSimd.h"

MACRO_EXTEND(AsmJsEntryTracing, Empty, None)
// help the caller to undefine all the macros
#undef MACRO
#undef MACRO_WMS
Expand Down
6 changes: 3 additions & 3 deletions lib/Runtime/Language/InterpreterStackFrame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2081,7 +2081,7 @@ namespace Js
#if defined(ENABLE_WASM_SIMD) || defined(ENABLE_SIMDJS)

#ifdef ENABLE_WASM_SIMD
if (function->GetScriptContext()->GetConfig()->IsWasmSimdEnabled())
if (CONFIG_FLAG(WasmSimd))
#elif ENABLE_SIMDJS
if (function->GetScriptContext()->GetConfig()->IsSimdjsEnabled())
#endif
Expand Down Expand Up @@ -3126,7 +3126,7 @@ namespace Js
#endif

#ifdef ENABLE_WASM_SIMD
if (scriptContext->GetConfig()->IsWasmSimdEnabled() && i == 2) // last argument ?
if (CONFIG_FLAG(WasmSimd) && i == 2) // last argument ?
#endif

#if defined(ENABLE_SIMDJS) || defined(ENABLE_WASM_SIMD)
Expand Down Expand Up @@ -3198,7 +3198,7 @@ namespace Js
#endif

#ifdef ENABLE_WASM_SIMD
else if (scriptContext->GetConfig()->IsWasmSimdEnabled() && info->GetArgType(i).isSIMD())
else if (CONFIG_FLAG(WasmSimd) && info->GetArgType(i).isSIMD())
#endif

#if defined(ENABLE_SIMDJS) || defined(ENABLE_WASM_SIMD)
Expand Down
6 changes: 3 additions & 3 deletions lib/Runtime/Language/SimdInt64x2Operation.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ namespace Js {
static SIMDValue OpSub(const SIMDValue& a, const SIMDValue& b);
static SIMDValue OpNeg(const SIMDValue& a);

//pointer-based arguments are used to ensure that calling conventions are consistent across x86/x64
//and match call sequences JIT generates.
//TODO: nikolayk back to "const SIMDValue& a"
//These are directly called into from JIT as of now. Pointer-based arguments are used to ensure
//that calling conventions are consistent across x86/x64 and match call sequences JIT generates.
//TODO: Change back to "const SIMDValue& a" after getting rid of the jit helpers.
template<typename T> static void OpTrunc(SIMDValue* dst, SIMDValue* src);
static void OpShiftLeftByScalar(SIMDValue* dst, SIMDValue* src, int count);
static void OpShiftRightByScalar(SIMDValue* dst, SIMDValue* src, int count);
Expand Down

0 comments on commit 0291cc2

Please sign in to comment.