Ignore:
Timestamp:
Nov 17, 2020, 3:49:01 PM (5 years ago)
Author:
[email protected]
Message:

Add support for the Wasm i32 sign-extension-ops proposal
https://bugs.webkit.org/show_bug.cgi?id=210302

Patch by Sergey Rubanov <Sergey Rubanov> on 2020-11-17
Reviewed by Yusuke Suzuki.

JSTests:

  • wasm/spec-tests/i32.wast.js:
  • wasm/spec-tests/i64.wast.js:
  • wasm/wasm.json:

Source/JavaScriptCore:

  • llint/LowLevelInterpreter.asm:
  • llint/WebAssembly.asm:
  • offlineasm/arm64.rb:
  • offlineasm/cloop.rb:
  • offlineasm/instructions.rb:
  • offlineasm/x86.rb:
  • wasm/WasmAirIRGenerator.cpp:

(JSC::Wasm::AirIRGenerator::addOp<OpType::I32Extend8S>):
(JSC::Wasm::AirIRGenerator::addOp<OpType::I32Extend16S>):

  • wasm/wasm.json:

LayoutTests:

  • workers/wasm-references/test.js:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/offlineasm/x86.rb

    r267371 r269929  
    14131413        when "zxi2q"
    14141414            $asm.puts "mov#{x86Suffix(:int)} #{orderOperands(operands[0].x86Operand(:int), operands[1].x86Operand(:int))}"
     1415        when "sxb2i"
     1416            if !isIntelSyntax
     1417                $asm.puts "movsbl #{operands[0].x86Operand(:byte)}, #{operands[1].x86Operand(:int)}"
     1418            else
     1419                $asm.puts "movsx #{orderOperands(operands[0].x86Operand(:byte), operands[1].x86Operand(:int))}"
     1420            end
     1421        when "sxh2i"
     1422            if !isIntelSyntax
     1423                $asm.puts "movswl #{operands[0].x86Operand(:half)}, #{operands[1].x86Operand(:int)}"
     1424            else
     1425                $asm.puts "movsx #{orderOperands(operands[0].x86Operand(:half), operands[1].x86Operand(:int))}"
     1426            end
    14151427        when "nop"
    14161428            $asm.puts "nop"
Note: See TracChangeset for help on using the changeset viewer.