This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: PATCH: PR gas/11974: windows x86_64 sign extension
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Pierre Muller <pierre dot muller at ics-cnrs dot unistra dot fr>
- Cc: binutils at sourceware dot org
- Date: Mon, 6 Sep 2010 07:39:19 -0700
- Subject: Re: PATCH: PR gas/11974: windows x86_64 sign extension
- References: <20100903174025.GA23835@intel.com> <-4004198900546314847@unknownmsgid>
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.