Thread overview
[Issue 6459] Inline assembler does not work well for 64 bit registers R8..R15
Apr 04, 2015
safety0ff.bugz
Aug 02
Dlang Bot
Aug 02
Dlang Bot
April 04, 2015
https://issues.dlang.org/show_bug.cgi?id=6459

safety0ff.bugz <safety0ff.bugz@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |wrong-code
                 CC|                            |safety0ff.bugz@gmail.com

--- Comment #5 from safety0ff.bugz <safety0ff.bugz@gmail.com> ---
> I also notice if you do:
> and RAX,0x00000000FFFFFFFF
> the compiler accepts it but generates:
> and RAX,0xFFFFFFFFFFFFFFFF

This bug is still present

--
June 09, 2015
https://issues.dlang.org/show_bug.cgi?id=6459

Andrei Alexandrescu <andrei@erdani.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Version|D1 & D2                     |D2

--
August 02
https://issues.dlang.org/show_bug.cgi?id=6459

--- Comment #6 from Walter Bright <bugzilla@digitalmars.com> ---
> Other variations such as mov RAX,[0+1*R11] generate the wrong code (generates an instruction for RBX instead of R11).

This causes an assert failure now.

--
August 02
https://issues.dlang.org/show_bug.cgi?id=6459

--- Comment #7 from Walter Bright <bugzilla@digitalmars.com> ---
(In reply to Graham from comment #3)
> I also notice if you do:
> 
> and RAX,0x00000000FFFFFFFF
> 
> the compiler accepts it but generates:
> 
> and RAX,0xFFFFFFFFFFFFFFFF
> 
> because, of course, there is no imm64 mode for and/or etc. instructions. Same applies for all other immediate constants that can be encoded into 8 bits.

The compiler generates an error for this now.

--
August 02
https://issues.dlang.org/show_bug.cgi?id=6459

Walter Bright <bugzilla@digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           See Also|                            |https://issues.dlang.org/sh
                   |                            |ow_bug.cgi?id=21101

--
August 02
https://issues.dlang.org/show_bug.cgi?id=6459

--- Comment #8 from Walter Bright <bugzilla@digitalmars.com> ---
(In reply to Graham from comment #4)
> Another negative immediate value issue:

Transferred to https://issues.dlang.org/show_bug.cgi?id=21101

One bug per issue, please.

--
August 02
https://issues.dlang.org/show_bug.cgi?id=6459

Dlang Bot <dlang-bot@dlang.rocks> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull

--- Comment #9 from Dlang Bot <dlang-bot@dlang.rocks> ---
@WalterBright created dlang/dmd pull request #11489 "fix Issue 6459 - Inline asm bugs with 64 bit registers R8..R15" fixing this issue:

- fix Issue 6459 - Inline assembler does not work well for 64 bit registers R8..R15

https://github.com/dlang/dmd/pull/11489

--
August 02
https://issues.dlang.org/show_bug.cgi?id=6459

Dlang Bot <dlang-bot@dlang.rocks> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #10 from Dlang Bot <dlang-bot@dlang.rocks> ---
dlang/dmd pull request #11489 "fix Issue 6459 - Inline asm bugs with 64 bit registers R8..R15" was merged into master:

- 7e3567eeb4ee48eb1c39f51851fa4a62e636a582 by Walter Bright:
  fix Issue 6459 - Inline assembler does not work well for 64 bit registers
R8..R15

https://github.com/dlang/dmd/pull/11489

--