Bug 203752 - The offline assembler is wrong about which immediates are supported by and/or/xor on ARM64
Summary: The offline assembler is wrong about which immediates are supported by and/or...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Robin Morisset
URL:
Keywords: InRadar
Depends on:
Blocks: 202832
  Show dependency treegraph
 
Reported: 2019-11-01 13:04 PDT by Robin Morisset
Modified: 2019-11-02 13:13 PDT (History)
8 users (show)

See Also:


Attachments
Patch (5.36 KB, patch)
2019-11-01 13:40 PDT, Robin Morisset
no flags Details | Formatted Diff | Diff
Patch (5.36 KB, patch)
2019-11-01 13:46 PDT, Robin Morisset
no flags Details | Formatted Diff | Diff
Patch (5.56 KB, patch)
2019-11-01 14:05 PDT, Robin Morisset
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Robin Morisset 2019-11-01 13:04:08 PDT
It uses the same list of valid immediates for and/or/xor as for add/sub/mul but it is much more subtle, see: https://dinfuehr.github.io/blog/encoding-of-immediate-values-on-aarch64/.
This is fine for now by chance, but changing the layout of ArithProfile can cause us to emit invalid constants in the generated assembly (this is blocking https://bugs.webkit.org/show_bug.cgi?id=202832).
Comment 1 Robin Morisset 2019-11-01 13:40:48 PDT
Created attachment 382616 [details]
Patch
Comment 2 Robin Morisset 2019-11-01 13:46:49 PDT
Created attachment 382618 [details]
Patch
Comment 3 Robin Morisset 2019-11-01 14:05:01 PDT
Created attachment 382626 [details]
Patch

remove now obsolete/wrong assert.
Comment 4 Tadeu Zagallo 2019-11-02 12:28:04 PDT
Comment on attachment 382626 [details]
Patch

r=me
Comment 5 WebKit Commit Bot 2019-11-02 13:12:45 PDT
Comment on attachment 382626 [details]
Patch

Clearing flags on attachment: 382626

Committed r251966: <https://trac.webkit.org/changeset/251966>
Comment 6 WebKit Commit Bot 2019-11-02 13:12:47 PDT
All reviewed patches have been landed.  Closing bug.
Comment 7 Radar WebKit Bug Importer 2019-11-02 13:13:15 PDT
<rdar://problem/56842399>