Skip to content

Commit d1c2e91

Browse files
Unbreak Debug build on 32-bits
https://bugs.webkit.org/show_bug.cgi?id=285515 Reviewed by Justin Michaud. Only build-tested, IPInt is disabled by default on 32-bits. * Source/JavaScriptCore/wasm/WasmFunctionIPIntMetadataGenerator.cpp: (JSC::Wasm::FunctionIPIntMetadataGenerator::addReturnData): * Source/JavaScriptCore/wasm/WasmIPIntGenerator.cpp: (JSC::Wasm::IPIntGenerator::addArguments): (JSC::Wasm::IPIntGenerator::addCallCommonData): (JSC::Wasm::IPIntGenerator::addTailCallCommonData): Canonical link: https://commits.webkit.org/288592@main
1 parent 2cd480b commit d1c2e91

2 files changed

Lines changed: 12 additions & 4 deletions

File tree

‎Source/JavaScriptCore/wasm/WasmFunctionIPIntMetadataGenerator.cpp‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,10 +143,12 @@ void FunctionIPIntMetadataGenerator::addReturnData(const FunctionSignature& sig)
143143
auto loc = returnCC.results[i].location;
144144

145145
if (loc.isGPR()) {
146-
ASSERT_UNUSED(NUM_UINT_GPRS, GPRInfo::toArgumentIndex(loc.jsr().gpr()) < NUM_UINT_GPRS);
147146
#if USE(JSVALUE64)
147+
ASSERT_UNUSED(NUM_UINT_GPRS, GPRInfo::toArgumentIndex(loc.jsr().gpr()) < NUM_UINT_GPRS);
148148
m_uINTBytecode.append(static_cast<uint8_t>(IPInt::UIntBytecode::RetGPR) + GPRInfo::toArgumentIndex(loc.jsr().gpr()));
149149
#elif USE(JSVALUE32_64)
150+
ASSERT_UNUSED(NUM_UINT_GPRS, GPRInfo::toArgumentIndex(loc.jsr().payloadGPR()) < NUM_UINT_GPRS);
151+
ASSERT_UNUSED(NUM_UINT_GPRS, GPRInfo::toArgumentIndex(loc.jsr().tagGPR()) < NUM_UINT_GPRS);
150152
m_uINTBytecode.append(static_cast<uint8_t>(IPInt::UIntBytecode::RetGPR) + GPRInfo::toArgumentIndex(loc.jsr().gpr(WhichValueWord::PayloadWord)));
151153
#endif
152154
} else if (loc.isFPR()) {

‎Source/JavaScriptCore/wasm/WasmIPIntGenerator.cpp‎

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -824,10 +824,12 @@ PartialResult WARN_UNUSED_RETURN IPIntGenerator::addArguments(const TypeDefiniti
824824
for (size_t i = 0; i < numArgs; ++i) {
825825
auto loc = callCC.params[i].location;
826826
if (loc.isGPR()) {
827-
ASSERT_UNUSED(NUM_ARGUMINT_GPRS, GPRInfo::toArgumentIndex(loc.jsr().gpr()) < NUM_ARGUMINT_GPRS);
828827
#if USE(JSVALUE64)
828+
ASSERT_UNUSED(NUM_ARGUMINT_GPRS, GPRInfo::toArgumentIndex(loc.jsr().gpr()) < NUM_ARGUMINT_GPRS);
829829
m_metadata->m_argumINTBytecode.append(static_cast<uint8_t>(IPInt::ArgumINTBytecode::ArgGPR) + GPRInfo::toArgumentIndex(loc.jsr().gpr()));
830830
#elif USE(JSVALUE32_64)
831+
ASSERT_UNUSED(NUM_ARGUMINT_GPRS, GPRInfo::toArgumentIndex(loc.jsr().payloadGPR()) < NUM_ARGUMINT_GPRS);
832+
ASSERT_UNUSED(NUM_ARGUMINT_GPRS, GPRInfo::toArgumentIndex(loc.jsr().tagGPR()) < NUM_ARGUMINT_GPRS);
831833
m_metadata->m_argumINTBytecode.append(static_cast<uint8_t>(IPInt::ArgumINTBytecode::ArgGPR) + GPRInfo::toArgumentIndex(loc.jsr().gpr(WhichValueWord::PayloadWord)));
832834
#endif
833835
} else if (loc.isFPR()) {
@@ -2643,10 +2645,12 @@ void IPIntGenerator::addCallCommonData(const FunctionSignature& signature, const
26432645
for (size_t i = 0; i < signature.argumentCount(); ++i) {
26442646
auto loc = callConvention.params[i].location;
26452647
if (loc.isGPR()) {
2646-
ASSERT_UNUSED(NUM_MINT_CALL_GPRS, GPRInfo::toArgumentIndex(loc.jsr().gpr()) < NUM_MINT_CALL_GPRS);
26472648
#if USE(JSVALUE64)
2649+
ASSERT_UNUSED(NUM_MINT_CALL_GPRS, GPRInfo::toArgumentIndex(loc.jsr().gpr()) < NUM_MINT_CALL_GPRS);
26482650
mINTBytecode.append(static_cast<uint8_t>(IPInt::CallArgumentBytecode::ArgumentGPR) + GPRInfo::toArgumentIndex(loc.jsr().gpr()));
26492651
#elif USE(JSVALUE32_64)
2652+
ASSERT_UNUSED(NUM_MINT_CALL_GPRS, GPRInfo::toArgumentIndex(loc.jsr().payloadGPR()) < NUM_MINT_CALL_GPRS);
2653+
ASSERT_UNUSED(NUM_MINT_CALL_GPRS, GPRInfo::toArgumentIndex(loc.jsr().tagGPR()) < NUM_MINT_CALL_GPRS);
26502654
mINTBytecode.append(static_cast<uint8_t>(IPInt::CallArgumentBytecode::ArgumentGPR) + GPRInfo::toArgumentIndex(loc.jsr().gpr(WhichValueWord::PayloadWord)));
26512655
#endif
26522656
} else if (loc.isFPR()) {
@@ -2743,10 +2747,12 @@ void IPIntGenerator::addTailCallCommonData(const FunctionSignature& signature)
27432747
for (size_t i = 0; i < signature.argumentCount(); ++i) {
27442748
auto loc = callConvention.params[i].location;
27452749
if (loc.isGPR()) {
2746-
ASSERT_UNUSED(NUM_MINT_CALL_GPRS, GPRInfo::toArgumentIndex(loc.jsr().gpr()) < NUM_MINT_CALL_GPRS);
27472750
#if USE(JSVALUE64)
2751+
ASSERT_UNUSED(NUM_MINT_CALL_GPRS, GPRInfo::toArgumentIndex(loc.jsr().gpr()) < NUM_MINT_CALL_GPRS);
27482752
mINTBytecode.append(static_cast<uint8_t>(IPInt::CallArgumentBytecode::ArgumentGPR) + GPRInfo::toArgumentIndex(loc.jsr().gpr()));
27492753
#elif USE(JSVALUE32_64)
2754+
ASSERT_UNUSED(NUM_MINT_CALL_GPRS, GPRInfo::toArgumentIndex(loc.jsr().payloadGPR()) < NUM_MINT_CALL_GPRS);
2755+
ASSERT_UNUSED(NUM_MINT_CALL_GPRS, GPRInfo::toArgumentIndex(loc.jsr().tagGPR()) < NUM_MINT_CALL_GPRS);
27502756
mINTBytecode.append(static_cast<uint8_t>(IPInt::CallArgumentBytecode::ArgumentGPR) + GPRInfo::toArgumentIndex(loc.jsr().gpr(WhichValueWord::PayloadWord)));
27512757
#endif
27522758
} else if (loc.isFPR()) {

0 commit comments

Comments
 (0)