Closed
Bug 586262
Opened 14 years ago
Closed 14 years ago
Get rid of blx_lr_bug
Categories
(Core Graveyard :: Nanojit, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: glandium, Assigned: glandium)
Details
(Whiteboard: fixed-in-nanojit, fixed-in-tamarin)
Attachments
(2 files, 2 obsolete files)
(deleted),
patch
|
jbramley
:
review+
edwsmith
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
treilly
:
review+
rwinchel
:
review+
|
Details | Diff | Splinter Review |
the WinCE device emulator has a bug with 'blx lr', and a blx_lr_bug bool was introduced to avoid that bug and use some other construct when it occurs.
I seems more sensible to just avoid using 'blx lr' at all, avoiding additional runtime tests.
Assignee | ||
Comment 1•14 years ago
|
||
Assignee: nobody → mh+mozilla
Attachment #464795 -
Flags: review?(Jacob.Bramley)
Comment 2•14 years ago
|
||
+1
blx_lr_bug is a gross hack (i'm to blame)
The only hazard I can think of in this patch is that IP is not a managed register, and is used implicitly as scratch in various instructions. I reviewed underrunProtect(), and it's not used there, I'm pretty sure.
The code path in asm_regarg that calls findSpecificRegFor(p, r), will be a problem if r == IP, since IP is not a managed register.
OS: Windows CE → All
Comment 3•14 years ago
|
||
(In reply to comment #2)
> The code path in asm_regarg that calls findSpecificRegFor(p, r), will be a
> problem if r == IP, since IP is not a managed register.
Actually, that could be a problem as that code path looks like it'll be hit in some cases.
There are two obvious solutions that I can see:
• Change the p->isExtant() check to "(p->isExtant()) || (r == IP)". This is perhaps a little fragile, but it looks sane at a glance.
• Use the register allocation API to get a register for the value, then BLX to that register. This is more complicated perhaps, but safer.
Assignee | ||
Comment 4•14 years ago
|
||
Edwin was right in comment 2. It crashed in the findSpecificRegFor path. Using Jacob's first suggestion, it seems to work properly.
Attachment #464795 -
Attachment is obsolete: true
Attachment #465237 -
Flags: review?(Jacob.Bramley)
Attachment #464795 -
Flags: review?(Jacob.Bramley)
Assignee | ||
Updated•14 years ago
|
Attachment #465237 -
Flags: review?(edwsmith)
Updated•14 years ago
|
Attachment #465237 -
Flags: review?(Jacob.Bramley) → review+
Assignee | ||
Comment 5•14 years ago
|
||
In then end, I haven't managed to get a better solution to work, and I don't care enough about this codepath (unused in tracemonkey) to spend more time on it, however interesting it can be.
I'm therefore going this road:
<edwsmith> hey, guys, here's another proposition for you
why dont we rip out blr_lr_broken() and blr_lr_bug, and just put #ifdef WINCE around the "bug" case in asm_call()
<jbramley> Works for me.
I used UNDER_CE instead of WINCE, though.
Attachment #465237 -
Attachment is obsolete: true
Attachment #465290 -
Flags: review?(Jacob.Bramley)
Attachment #465237 -
Flags: review?(edwsmith)
Assignee | ||
Comment 6•14 years ago
|
||
The armv4t patch I'm working on doesn't depend on that anymore.
No longer blocks: 552624
Summary: Avoid using blx lr at all → Get rid of blx_lr_bug
Assignee | ||
Updated•14 years ago
|
Attachment #465290 -
Flags: review?(edwsmith)
Updated•14 years ago
|
Attachment #465290 -
Flags: review?(Jacob.Bramley) → review+
Updated•14 years ago
|
Attachment #465290 -
Flags: review?(edwsmith) → review+
Comment 7•14 years ago
|
||
With this patch we no longer have to detect the broken emulator, so don't need this weird armasm file that didn't belong under MMgc anyway.
Attachment #465806 -
Flags: review?(brbaker)
Updated•14 years ago
|
Attachment #465806 -
Flags: review?(brbaker) → review?(treilly)
Assignee | ||
Comment 8•14 years ago
|
||
Landed the nanojit part.
http://hg.mozilla.org/projects/nanojit-central/rev/9e1146b15442
Whiteboard: fixed-in-nanojit
Updated•14 years ago
|
Attachment #465806 -
Flags: review?(rwinchel)
Updated•14 years ago
|
Attachment #465806 -
Flags: review?(treilly) → review+
Updated•14 years ago
|
Attachment #465806 -
Flags: review?(rwinchel) → review+
Comment 9•14 years ago
|
||
nanojit part in TR: http://hg.mozilla.org/tamarin-redux/rev/211232d5bd76
TR part in TR: http://hg.mozilla.org/tamarin-redux/rev/9804879bc296
Whiteboard: fixed-in-nanojit → fixed-in-nanojit, fixed-in-tamarin
Comment 10•14 years ago
|
||
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Updated•11 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•