Closed Bug 603576 Opened 15 years ago Closed 12 years ago

findSpecificRegFor should include assertion for allocated register

Categories

(Core Graveyard :: Nanojit, enhancement)

enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: tero.koskinen, Unassigned)

Details

Attachments

(1 file, 1 obsolete file)

User-Agent: Mozilla/5.0 (X11; U; Linux i686; fi-FI; rv:1.9.2.10) Gecko/20100915 Ubuntu/10.04 (lucid) Firefox/3.6.10 Build Identifier: Inspired by comment https://bugzilla.mozilla.org/show_bug.cgi?id=602834#c4 , function findSpecificRegFor in nanojit/Assembler.cpp should have an assertion which checks that we really got the register we wanted. Reproducible: Always Steps to Reproduce: 1. No steps.
Attached patch Fix proposal. (obsolete) — Splinter Review
Attached patch adds the assertion.
Attachment #482484 - Flags: review?(Jacob.Bramley)
Comment on attachment 482484 [details] [diff] [review] Fix proposal. Looks good. Just as a sanity check, we should test this on x86. It'll be tested on ARM as part of bug 602834. The Tamarin acceptance suite takes ages on ARM, so testing in batches is convenient.
Attachment #482484 - Flags: review?(Jacob.Bramley) → review+
Oops, the first version of the patch didn't compile with assertions turned off: Assembler.cpp:426: error: unused variable `r' New version of the patch should fix that. tamarin-redux compiles cleanly (debug and release builds) with the patch, but I haven't completely run the test suite yet.
Attachment #482484 - Attachment is obsolete: true
Attachment #482491 - Flags: review?(Jacob.Bramley)
Attachment #482491 - Flags: review?(Jacob.Bramley) → review+
The patch is fine. Did you submit it because you've seen a case where it is violated, or are you just being cautious?
I am just cautious. Comments didn't say that it is guaranteed to get the register you want and the code was not clear enough for me, so I though that I make it sure by placing an assertion there.
Regallocs have these kinds of assertions too and Nanojit is long gone.
Status: UNCONFIRMED → RESOLVED
Closed: 12 years ago
Resolution: --- → WORKSFORME
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: