[webkit-changes] [WebKit/WebKit] f0224c: Add implementation of IPInt memory and global inst...

Daniel Liu noreply at github.com
Tue Jul 25 17:02:07 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: f0224c3ac49698bf7a0408d646bd62283e0f645a
      https://github.com/WebKit/WebKit/commit/f0224c3ac49698bf7a0408d646bd62283e0f645a
  Author: Daniel Liu <danlliu at umich.edu>
  Date:   2023-07-25 (Tue, 25 Jul 2023)

  Changed paths:
    A JSTests/wasm/ipint-tests/ipint-test-global.js
    A JSTests/wasm/ipint-tests/ipint-test-memory-read-sizes.js
    A JSTests/wasm/ipint-tests/ipint-test-memory-read.js
    A JSTests/wasm/ipint-tests/ipint-test-memory-simple.js
    A JSTests/wasm/ipint-tests/ipint-test-memory-write-sizes.js
    M Source/JavaScriptCore/llint/InPlaceInterpreter.asm
    M Source/JavaScriptCore/wasm/WasmFunctionIPIntMetadataGenerator.cpp
    M Source/JavaScriptCore/wasm/WasmIPIntGenerator.cpp
    M Source/JavaScriptCore/wasm/WasmSlowPaths.cpp
    M Source/JavaScriptCore/wasm/WasmSlowPaths.h

  Log Message:
  -----------
  Add implementation of IPInt memory and global instructions
https://bugs.webkit.org/show_bug.cgi?id=259460
rdar://112802752

Reviewed by Justin Michaud.

Adds in implementations for (i32|i64|f32|f64).(load|store) instructions (including for smaller sizes), and global.get / global.set.

* JSTests/wasm/ipint-tests/ipint-test-global.js: Added.
* JSTests/wasm/ipint-tests/ipint-test-memory-read-sizes.js: Added.
(from.string_appeared_here.import.as.assert.from.string_appeared_here.let.wat.module.memory.export.string_appeared_here.1.10.func.export.string_appeared_here.result.i32.i32.const.0.i32.load.func.export.string_appeared_here.result.i32.i32.const.0.i32.load8_s.func.export.string_appeared_here.result.i32.i32.const.0.i32.load8_u.func.export.string_appeared_here.result.i32.i32.const.0.i32.load16_s.func.export.string_appeared_here.result.i32.i32.const.0.i32.load16_u.func.export.string_appeared_here.result.i64.i32.const.0.i64.load.func.export.string_appeared_here.result.i64.i32.const.0.i64.load8_s.func.export.string_appeared_here.result.i64.i32.const.0.i64.load8_u.func.export.string_appeared_here.result.i64.i32.const.0.i64.load16_s.func.export.string_appeared_here.result.i64.i32.const.0.i64.load16_u.func.export.string_appeared_here.result.i64.i32.const.0.i64.load32_s.func.export.string_appeared_here.result.i64.i32.const.0.i64.load32_u.writeToMemory):
(async test):
* JSTests/wasm/ipint-tests/ipint-test-memory-read.js: Added.
(from.string_appeared_here.import.as.assert.from.string_appeared_here.let.wat.module.memory.export.string_appeared_here.1.10.data.i32.const.0x0.string_appeared_here.func.export.string_appeared_here.param.i32.result.i32.local.0.i32.load8_u.return.writeStringToMemory):
(async test):
* JSTests/wasm/ipint-tests/ipint-test-memory-simple.js: Added.
(from.string_appeared_here.import.as.assert.from.string_appeared_here.let.wat.module.memory.export.string_appeared_here.1.10.data.i32.const.0x0.string_appeared_here.func.export.string_appeared_here.i32.const.0.i32.const.1717661556.i32.store.i32.const.4.i32.const.117.i32.store.decodeString):
(async test):
* JSTests/wasm/ipint-tests/ipint-test-memory-write-sizes.js: Added.
(from.string_appeared_here.import.as.assert.from.string_appeared_here.let.wat.module.memory.export.string_appeared_here.1.10.func.export.string_appeared_here.param.i32.i32.local.0.local.1.i32.store.func.export.string_appeared_here.param.i32.i32.local.0.local.1.i32.store8.func.export.string_appeared_here.param.i32.i32.local.0.local.1.i32.store16.func.export.string_appeared_here.param.i32.i64.local.0.local.1.i64.store.func.export.string_appeared_here.param.i32.i64.local.0.local.1.i64.store8.func.export.string_appeared_here.param.i32.i64.local.0.local.1.i64.store16.func.export.string_appeared_here.param.i32.i64.local.0.local.1.i64.store32.decodeString):
(async test):
* Source/JavaScriptCore/llint/InPlaceInterpreter.asm:
* Source/JavaScriptCore/wasm/WasmFunctionIPIntMetadataGenerator.cpp:
(JSC::Wasm::FunctionIPIntMetadataGenerator::addLEB128ConstantInt32AndLength):
(JSC::Wasm::sizeOfLEB128): Deleted.
* Source/JavaScriptCore/wasm/WasmIPIntGenerator.cpp:
(JSC::Wasm::IPIntGenerator::getLocal):
(JSC::Wasm::IPIntGenerator::setLocal):
(JSC::Wasm::IPIntGenerator::getGlobal):
(JSC::Wasm::IPIntGenerator::setGlobal):
(JSC::Wasm::IPIntGenerator::load):
(JSC::Wasm::IPIntGenerator::store):
* Source/JavaScriptCore/wasm/WasmSlowPaths.cpp:
(JSC::LLInt::doWasmIPIntCallIndirect):
(JSC::LLInt::ipintGetGlobal64B):
(JSC::LLInt::ipintSetGlobal64B):
* Source/JavaScriptCore/wasm/WasmSlowPaths.h:

Canonical link: https://commits.webkit.org/266306@main




More information about the webkit-changes mailing list