This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH: PR gas/11974: windows x86_64 sign extension


On Mon, Sep 6, 2010 at 7:27 AM, Pierre Muller
<pierre.muller@ics-cnrs.unistra.fr> wrote:
> ?Hi,
>
> ?Thanks for reacting so fast on my bug report,
> however I fear that this patch will generate
> problems with people currently using GNU as for win64:
> ?The push instruction for instance
> allows to push a 8-byte qword value but only
> as a 4-byte immediate value that is sign extended
> to 8-bytes before being stored to the stack.
>
> Before your patch:
> ?pushq 0x80000001
> was allowed on win64 and resulted in
> having 0xffffffff80000001

It is

http://sourceware.org/bugzilla/show_bug.cgi?id=11893
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45213

It never worked on Linux. Assembler shouldn't second
guess what programmer really wants. They should use
proper operand.


> at %esp address.

It should be %rsp.

> ?Now that code generates an error:
> operand type mismatch for push.
>
> ?I suspect that lots has to do with the
> problem of 'long' type being a 4-byte integer on win64 systems :(
>
> ?I was hoping that there would be some way to
> to only do the sign extension from 32 to 64 bits
> if no real 64-bit immediate constant is supported.
>



-- 
H.J.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]