Bug 127545 - ARM Offline assembler temporary register allocator has duplicate register when building fat binaries
Summary: ARM Offline assembler temporary register allocator has duplicate register whe...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Michael Saboff
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2014-01-23 22:09 PST by Michael Saboff
Modified: 2014-01-24 08:30 PST (History)
0 users

See Also:


Attachments
Patch (2.23 KB, patch)
2014-01-23 22:26 PST, Michael Saboff
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 Michael Saboff 2014-01-23 22:09:05 PST
When the offline assembler is used to build a fat ARM binary, say ARMv7 and ARMv7s, the concat in getModifiedListARMCommon (ARM_EXTRA_GPRS.concat([SpecialRegister.new("r11")]) ) is executed twice, thus adding r11 a second time.  Two subsequent requests for a temporary register can result in bad code being generated.
Comment 1 Michael Saboff 2014-01-23 22:11:52 PST
<rdar://problem/15863400>
Comment 2 Michael Saboff 2014-01-23 22:26:06 PST
Created attachment 222079 [details]
Patch
Comment 3 Filip Pizlo 2014-01-23 22:37:16 PST
Comment on attachment 222079 [details]
Patch

Isn't the bug here just that someone used the .concat() method, which modifies the receiver, instead of using the + operator, which does not?
Comment 4 Michael Saboff 2014-01-23 22:43:01 PST
(In reply to comment #3)
> (From update of attachment 222079 [details])
> Isn't the bug here just that someone used the .concat() method, which modifies the receiver, instead of using the + operator, which does not?

That is another way to solve it, but the proposed solution is simpler.
Comment 5 Mark Lam 2014-01-23 22:51:07 PST
Comment on attachment 222079 [details]
Patch

r=me
Comment 6 Michael Saboff 2014-01-24 08:30:00 PST
Committed r162701: <http://trac.webkit.org/changeset/162701>