Bug 127545

Summary: ARM Offline assembler temporary register allocator has duplicate register when building fat binaries
Product: WebKit Reporter: Michael Saboff <msaboff>
Component: JavaScriptCoreAssignee: Michael Saboff <msaboff>
Status: RESOLVED FIXED    
Severity: Normal Keywords: InRadar
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch mark.lam: review+

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>