Summary: | [JSC][LLInt] Compact LLInt ASM code by removing unnecessary instructions | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Yusuke Suzuki <ysuzuki> | ||||||||
Component: | New Bugs | Assignee: | Yusuke Suzuki <ysuzuki> | ||||||||
Status: | RESOLVED FIXED | ||||||||||
Severity: | Normal | CC: | ews-watchlist, fpizlo, keith_miller, mark.lam, msaboff, saam, webkit-bug-importer | ||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||
Version: | WebKit Nightly Build | ||||||||||
Hardware: | Unspecified | ||||||||||
OS: | Unspecified | ||||||||||
Attachments: |
|
Description
Yusuke Suzuki
2018-10-30 16:42:44 PDT
Created attachment 353433 [details]
Patch
Created attachment 353444 [details]
Patch
Created attachment 353463 [details]
Patch
Comment on attachment 353444 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=353444&action=review r=me if you fix arm64 > Source/JavaScriptCore/offlineasm/arm64.rb:491 > + emitARM64LShift([Immediate.new(nil, imm.to_s(2).size - 1), operands[1]], kind) What does size return? Why not just log base 2? Comment on attachment 353444 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=353444&action=review >> Source/JavaScriptCore/offlineasm/arm64.rb:491 >> + emitARM64LShift([Immediate.new(nil, imm.to_s(2).size - 1), operands[1]], kind) > > What does size return? Why not just log base 2? to_s(2) returns string with radix = 2. So, imm (4) .to_s(2) returns "100". "100".size - 1 => 2, which is the same to Math.log2(4).to_i. Changed to `Math.log2(imm).to_i`. Committed r237627: <https://trac.webkit.org/changeset/237627> |