[Webkit-unassigned] [Bug 163246] B3 needs a special WASMCheckBounds Opcode

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Oct 10 19:48:45 PDT 2016


https://bugs.webkit.org/show_bug.cgi?id=163246

--- Comment #1 from Filip Pizlo <fpizlo at apple.com> ---
Couldn't help thinking about this more.

Seems like you need WASMCheckBounds to have one form where the check is inclusive and one where it isn't (i.e. < versus <=).  Some kind of enum that indicates whether it's Inclusive/BelowEqual or Exclusive/Below.  Please add printInternal functions for any new enums, particularly since you'll need to dump it as part of WASMCheckBoundsValue::dump().

Also, what are you planning on doing about representing this in Air?

You have these options:

1) Patch opcode, and a Air::Special subclass that does what you want.
2) A Custom opcode, and code in AirCustom.h|cpp that does what you want.
3) A normal opcode, and code in MacroAssembler that does what you want.

I think that (2) will be the most natural.  You'll want two Custom opcodes: WASMCheckBoundsBelow and WASMCheckBoundsBelowEqual, and they will basically be magical versions of jit.branch(Below or BelowEqual, ...).

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20161011/6e5b4bb9/attachment.html>


More information about the webkit-unassigned mailing list