WebKit Bugzilla
Attachment 360607 Details for
Bug 194038
: WasmB3IRGenerator models some effects incorrectly
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
WIP
patch2.diff (text/plain), 3.81 KB, created by
Saam Barati
on 2019-01-30 13:25:51 PST
(
hide
)
Description:
WIP
Filename:
MIME Type:
Creator:
Saam Barati
Created:
2019-01-30 13:25:51 PST
Size:
3.81 KB
patch
obsolete
>Index: Source/JavaScriptCore/wasm/WasmB3IRGenerator.cpp >=================================================================== >--- Source/JavaScriptCore/wasm/WasmB3IRGenerator.cpp (revision 240697) >+++ Source/JavaScriptCore/wasm/WasmB3IRGenerator.cpp (working copy) >@@ -161,7 +161,7 @@ public: > typedef ControlData::ResultList ResultList; > typedef FunctionParser<B3IRGenerator>::ControlEntry ControlEntry; > >- static constexpr ExpressionType emptyExpression = nullptr; >+ static constexpr ExpressionType emptyExpression() { return nullptr; } > > typedef String ErrorType; > typedef Unexpected<ErrorType> UnexpectedResult; >@@ -315,7 +315,7 @@ void B3IRGenerator::restoreWasmContextIn > effects.reads = B3::HeapRange::top(); > patchpoint->effects = effects; > patchpoint->clobberLate(RegisterSet(m_wasmContextInstanceGPR)); >- patchpoint->append(instanceValue(), ValueRep::SomeRegister); >+ patchpoint->append(instanceValue(), ValueRep::SomeRegister); // OOPS: Probably should be using arg! > GPRReg wasmContextInstanceGPR = m_wasmContextInstanceGPR; > patchpoint->setGenerator([=] (CCallHelpers& jit, const StackmapGenerationParams& param) { > jit.move(param[0].gpr(), wasmContextInstanceGPR); >@@ -459,9 +459,9 @@ void B3IRGenerator::restoreWebAssemblyGl > > if (restoreCachedStackLimit == RestoreCachedStackLimit::Yes) { > // The Instance caches the stack limit, but also knows where its canonical location is. >- Value* pointerToActualStackLimit = m_currentBlock->appendNew<MemoryValue>(m_proc, Load, pointerType(), origin(), instanceValue(), safeCast<int32_t>(Instance::offsetOfPointerToActualStackLimit())); >- Value* actualStackLimit = m_currentBlock->appendNew<MemoryValue>(m_proc, Load, pointerType(), origin(), pointerToActualStackLimit); >- m_currentBlock->appendNew<MemoryValue>(m_proc, Store, origin(), actualStackLimit, instanceValue(), safeCast<int32_t>(Instance::offsetOfCachedStackLimit())); >+ Value* pointerToActualStackLimit = block->appendNew<MemoryValue>(m_proc, Load, pointerType(), origin(), instanceValue(), safeCast<int32_t>(Instance::offsetOfPointerToActualStackLimit())); >+ Value* actualStackLimit = block->appendNew<MemoryValue>(m_proc, Load, pointerType(), origin(), pointerToActualStackLimit); >+ block->appendNew<MemoryValue>(m_proc, Store, origin(), actualStackLimit, instanceValue(), safeCast<int32_t>(Instance::offsetOfCachedStackLimit())); // OOPS: should be block! > } > > if (!!memory) { >@@ -1609,6 +1609,7 @@ auto B3IRGenerator::addOp<F64ConvertUI64 > if (isX86()) > patchpoint->numGPScratchRegisters = 1; > patchpoint->append(ConstrainedValue(arg, ValueRep::SomeRegister)); >+ patchpoint->clobber(RegisterSet::macroScratchRegisters()); > patchpoint->setGenerator([=] (CCallHelpers& jit, const StackmapGenerationParams& params) { > AllowMacroScratchRegisterUsage allowScratch(jit); > #if CPU(X86_64) >@@ -1629,6 +1630,7 @@ auto B3IRGenerator::addOp<OpType::F32Con > if (isX86()) > patchpoint->numGPScratchRegisters = 1; > patchpoint->append(ConstrainedValue(arg, ValueRep::SomeRegister)); >+ patchpoint->clobber(RegisterSet::macroScratchRegisters()); > patchpoint->setGenerator([=] (CCallHelpers& jit, const StackmapGenerationParams& params) { > AllowMacroScratchRegisterUsage allowScratch(jit); > #if CPU(X86_64) >@@ -1838,7 +1840,7 @@ auto B3IRGenerator::addOp<OpType::I64Tru > patchpoint->numFPScratchRegisters = 1; > } > patchpoint->setGenerator([=] (CCallHelpers& jit, const StackmapGenerationParams& params) { >- AllowMacroScratchRegisterUsage allowScratch(jit); >+ AllowMacroScratchRegisterUsage allowScratch(jit); // OOPS: This looks super wrong given we don't say we clobber this! > FPRReg scratch = InvalidFPRReg; > FPRReg constant = InvalidFPRReg; > if (isX86()) {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 194038
:
360607
|
362240