lkml.org 
[lkml]   [2015]   [Mar]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 3/4] x86/asm/entry/64: use smaller insns
From
Date
No, movabs is yet another instruction (with a 64-bit absolute address.) But movq can mean 10 or 7 bytes...

On March 25, 2015 4:51:50 PM PDT, Linus Torvalds <torvalds@linux-foundation.org> wrote:
>On Wed, Mar 25, 2015 at 10:18 AM, Denys Vlasenko <dvlasenk@redhat.com>
>wrote:
>> The $AUDIT_ARCH_X86_64 parameter to syscall_trace_enter_phase1/2
>> is a 32-bit constant, loading it with 32-bit MOV produces 5-byte insn
>> instead of 10-byte one.
>
>Side note: has anybody talked to the assembler people? This would seem
>to be very much something that the assembler could have noticed and
>done on its own. It's a bit sad that we need to overspecify these
>things..
>
>If it had actually been a 64-bit constant, the assembler would have
>ended up silently using a different instruction encoding *anyway*
>("movabs"), so it's not like the "movq" in any way specifies one
>particular instruction representation, and the assembler already picks
>different instruction versions for different constant values. Why not
>this one?
>
> Linus

--
Sent from my mobile phone. Please pardon brevity and lack of formatting.


\
 
 \ /
  Last update: 2015-03-26 01:01    [W:0.528 / U:1.528 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site