[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Lightning] [PATCH] Fix stxr_c on i386

From: Alban Bedel
Subject: [Lightning] [PATCH] Fix stxr_c on i386
Date: Sat, 8 Mar 2008 18:25:19 +0100

Hi all,

I'm using lightning in a small JIT compiler and I found a little bug.
To store a char on i386 the source register must be 8bit, so when the
source is in ESI or EDI it must be moved to another register.
But currently lightning unconditionaly use EAX, this obviously can lead
to broken code if eax is used in the argument. Like this:

stxr_c eax, ebx, esi => push eax
                        mov esi, eax
                        mov al, (eax, ebx)
                        pop eax

Attached is a patch that fix this.


Attachment: i386_stxr_c.diff
Description: Text Data

reply via email to

[Prev in Thread] Current Thread [Next in Thread]