<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - B3 needs a special WASMCheckBounds Opcode"
href="https://bugs.webkit.org/show_bug.cgi?id=163246#c1">Comment # 1</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - B3 needs a special WASMCheckBounds Opcode"
href="https://bugs.webkit.org/show_bug.cgi?id=163246">bug 163246</a>
from <span class="vcard"><a class="email" href="mailto:fpizlo@apple.com" title="Filip Pizlo <fpizlo@apple.com>"> <span class="fn">Filip Pizlo</span></a>
</span></b>
<pre>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, ...).</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>