Commit e97b7b0e authored by Milad Farazmand's avatar Milad Farazmand Committed by Commit Bot

PPC/s390: [wasm] Turn ValueType from an enum to a class

Port f3b4167f

Original Commit Message:

    In preparation for adding reference types, which need an additional
    parameter to indicate the referenced type.

R=jkummerow@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com
BUG=
LOG=N

Change-Id: Ia6d933611440096247dda159846f6c119f5167d5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2101607Reviewed-by: 's avatarJunliang Yan <jyan@ca.ibm.com>
Commit-Queue: Milad Farazmand <miladfar@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#66689}
parent 0c72c719
......@@ -66,17 +66,17 @@ constexpr int LiftoffAssembler::StaticStackFrameSize() {
}
int LiftoffAssembler::SlotSizeForType(ValueType type) {
switch (type) {
case kWasmS128:
return ValueTypes::ElementSizeInBytes(type);
switch (type.kind()) {
case ValueType::kS128:
return type.element_size_bytes();
default:
return kStackSlotSize;
}
}
bool LiftoffAssembler::NeedsAlignment(ValueType type) {
switch (type) {
case kWasmS128:
switch (type.kind()) {
case ValueType::kS128:
return true;
default:
// No alignment because all other types are kStackSlotSize.
......
......@@ -65,17 +65,17 @@ constexpr int LiftoffAssembler::StaticStackFrameSize() {
}
int LiftoffAssembler::SlotSizeForType(ValueType type) {
switch (type) {
case kWasmS128:
return ValueTypes::ElementSizeInBytes(type);
switch (type.kind()) {
case ValueType::kS128:
return type.element_size_bytes();
default:
return kStackSlotSize;
}
}
bool LiftoffAssembler::NeedsAlignment(ValueType type) {
switch (type) {
case kWasmS128:
switch (type.kind()) {
case ValueType::kS128:
return true;
default:
// No alignment because all other types are kStackSlotSize.
......
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