bug-binutils
[Top][All Lists]
Advanced

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

[Bug gas/22871] Encode instructions of 64-bit operand without the REX_W


From: hjl.tools at gmail dot com
Subject: [Bug gas/22871] Encode instructions of 64-bit operand without the REX_W bit
Date: Thu, 22 Feb 2018 11:10:02 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=22871

--- Comment #7 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to Jan Beulich from comment #6)
> (In reply to H.J. Lu from comment #5)
> > I updated users/hjl/optimize branch to encode
> > 
> > testq $imm31, mem
> >     
> > as
> >     
> > testl $imm31, mem
> > 
> > only at -O2.
> 
> I was about to suggest that, also because the memory access pattern changes
> (the shorter access may not fault when the longer one would, not to think of
> side effects when accessing MMIO). I'd even consider moving this higher up,
> to -O3.

Good point.  I will remove "testq $imm31, mem".  I will add
"test{q,l,w} $imm8,%r{64,32,16}" to "testb $imm8,%r8" to -O3.

> Another thing to consider here would be to encode e.g. vxorps %zmmM, %zmmM,
> %zmmN as vxorps %xmmM, %xmmM, %xmmN for the low 16 registers, as that'll be
> VEX encodable, i.e. shorter than the default EVEX variant. Same for vandnps
> (and of course all their flavors dealing with different data types).

We can do it at -O2.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


reply via email to

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