Commit 60ee0d05 authored by Bill Budge's avatar Bill Budge Committed by Commit Bot

[liftoff][arm64] Add ValueKinds for AcquireByType

- Adds some missing types, to appease the fuzzers.

Bug: chromium:1185464
Change-Id: I08c4ebe5f4ae0d036da9819b805aeac93be384fe
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2742017
Commit-Queue: Bill Budge <bbudge@chromium.org>
Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73279}
parent 90a66422
......@@ -107,6 +107,8 @@ inline CPURegister AcquireByType(UseScratchRegisterScope* temps,
ValueKind kind) {
switch (kind) {
case kI32:
case kRef:
case kOptRef:
return temps->AcquireW();
case kI64:
return temps->AcquireX();
......@@ -114,6 +116,8 @@ inline CPURegister AcquireByType(UseScratchRegisterScope* temps,
return temps->AcquireS();
case kF64:
return temps->AcquireD();
case kS128:
return temps->AcquireQ();
default:
UNREACHABLE();
}
......
// Copyright 2021 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --liftoff --no-wasm-tier-up --wasm-tier-mask-for-testing=2
// Flags: --experimental-wasm-reftypes
load('test/mjsunit/wasm/wasm-module-builder.js');
const builder = new WasmModuleBuilder();
// Generate a Liftoff call with too many reference parameters to fit in
// parameter registers, to force stack parameter slots.
const kManyParams = 32;
const kSigWithManyRefParams = makeSig(
new Array(kManyParams).fill(kWasmExternRef), []);
const kPrepareManyParamsCallBody = Array.from(
{length: kManyParams * 2},
(item, index) => index % 2 == 0 ? kExprLocalGet : 0);
builder.addFunction(undefined, kSigWithManyRefParams).addBody([
]);
builder.addFunction(undefined, kSigWithManyRefParams)
.addBody([
...kPrepareManyParamsCallBody,
kExprCallFunction, 0, // call 0
]);
builder.addFunction(undefined, kSigWithManyRefParams).addBody([
...kPrepareManyParamsCallBody,
kExprCallFunction, 1, // call 1
]).exportAs('manyRefs');
const instance = builder.instantiate();
instance.exports.manyRefs();
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment