epilog clobbers edx in debug builds

RESOLVED INVALID

Status

Core Graveyard
Nanojit
RESOLVED INVALID
9 years ago
4 years ago

People

(Reporter: dmandelin, Assigned: gal)

Tracking

unspecified
Future
x86
All

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Reporter)

Description

9 years ago
In debug builds, nanojit generates epilog code that clobbers edx, as in the debug output pasted below. This was a LIR buffer that ended with a LIR_loop. The resulting compiled code is invalid because the fragment is fastcall, so one of the params is edx, and loads that depend on edx in the fragment are incorrect on every iteration but the first.

    loop
                   mov edx,3159824           
                   mov esp,ebp               
        0x261ff4:
                   jmp 0x0
(Assignee)

Comment 1

9 years ago
Created attachment 345155 [details] [diff] [review]
patch, passes trace-tests but not tested for param1 != NULL
(Reporter)

Comment 2

9 years ago
(In reply to comment #1)
> Created an attachment (id=345155) [details]
> patch, passes trace-tests but not tested for param1 != NULL

Doesn't work for me. It now generates a move at the end of the trace that kills ecx. The code doesn't work in optimized builds so maybe both are affected in this case. The patch has lots of other stuff in it so I don't know what part to look at to see what's going on.

    1
    loop
                   mov ecx,edx                edx(state)
                   mov esp,ebp
(Reporter)

Comment 3

9 years ago
Created attachment 345193 [details] [diff] [review]
Fixed typo

Comment 4

8 years ago
status?
Hardware: All → x86
Target Milestone: --- → Future

Updated

8 years ago
Assignee: gal → nobody
Component: JIT Compiler (NanoJIT) → Nanojit
Product: Tamarin → Core
QA Contact: nanojit → nanojit

Updated

8 years ago
Assignee: nobody → gal

Comment 5

8 years ago
closing, old bug, obsolete problem.
Status: NEW → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → INVALID
Component: Nanojit → Nanojit
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.