Bug 152925 - B3 needs Neg()
Summary: B3 needs Neg()
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Filip Pizlo
Depends on:
Blocks: 150279
  Show dependency treegraph
Reported: 2016-01-08 13:49 PST by Filip Pizlo
Modified: 2016-01-23 09:41 PST (History)
5 users (show)

See Also:

work in progress (12.74 KB, patch)
2016-01-08 14:12 PST, Filip Pizlo
no flags Details | Formatted Diff | Diff
the patch (15.79 KB, patch)
2016-01-08 15:35 PST, Filip Pizlo
mark.lam: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Filip Pizlo 2016-01-08 13:49:18 PST
Currently B3 expresses -x as 0-x.  That's wrong in case of floating point.

It's probably better if we just have a Neg opcode, and this opcode should work for both ints and floats.
Comment 1 Filip Pizlo 2016-01-08 14:12:29 PST
Created attachment 268584 [details]
work in progress
Comment 2 Filip Pizlo 2016-01-08 15:35:42 PST
Created attachment 268595 [details]
the patch
Comment 3 Mark Lam 2016-01-08 16:00:01 PST
Comment on attachment 268595 [details]
the patch

View in context: https://bugs.webkit.org/attachment.cgi?id=268595&action=review


> Source/JavaScriptCore/ChangeLog:18
> +        So, this introduces a proper Neg() opcode to B3. It's not the canonical way of saying

typo: "not" ==> "now".
Comment 4 Filip Pizlo 2016-01-08 16:03:59 PST
Landed in http://trac.webkit.org/changeset/194802