tinycc-devel
[Top][All Lists]
Advanced

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

Re: [Tinycc-devel] tccasm mov instruction


From: Michael Matz
Subject: Re: [Tinycc-devel] tccasm mov instruction
Date: Thu, 23 Feb 2017 00:24:09 +0100 (CET)
User-agent: Alpine 2.20 (LSU 67 2015-01-07)

Hi,

On Mon, 20 Feb 2017, grischka wrote:

The good news:  we got debug line output with asm to create
mixed output as below.

Yeah, noticed that.  Nice :)

p0:
   movslq %eax, %rcx
  0:    48                      rex.W
  1:    48 63 c8                movslq %eax,%rcx
   mov $0x12345678,%eax
  4:    b8 78 56 34 12          mov    $0x12345678,%eax
   mov $0x12345678,%rax
  9:    48 b8 78 56 34 12 48    movabs $0xffffb84812345678,%rax
 10:    b8 ff ff
   mov $0x123456789abcdef0,%rax
 13:    ff                      (bad)
 14:    ff 90 90 90 90 90       callq  *-0x6f6f6f70(%rax)

Could you look at this?

Whoops! Avoidance of mov im32->reg64 didn't work for rax and hardcoding REX in the opcode directly defeats an generated REX prefix from operands.
This (and some other similar opcodes) fixed in mob.  Thanks for noticing.
(Interestingly the linux kernel at least doesn't trip over this, always got lucky with either not using rax or the instructions in question).


Ciao,
Michael.



reply via email to

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