lkml.org 
[lkml]   [2013]   [Jul]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [LLVMdev] [PATCH] x86/asm: avoid mnemonics without type suffix
From
> And that is why I think you should just consider "bt $x,y" to be
> trivially the same thing and not at all ambiguous. Because there is
> ABSOLUTELY ZERO ambiguity when people write
>
> bt $63, mem
>
> Zero. Nada. None. The semantics are *exactly* the same for btl and btq
> in this case, so why would you want the user to specify one or the
> other?

I don't think you've actually tested that, have you? (x86-64)

int main() {
long val = 0xffffffff;
char res;

asm("btl $63, %1\n\tsetc %0" : "=r"(res) : "m"(val));
printf("%d\n", res);

asm("btq $63, %1\n\tsetc %0" : "=r"(res) : "m"(val));
printf("%d\n", res);
}

Tim.


\
 
 \ /
  Last update: 2013-07-14 22:01    [W:0.063 / U:0.416 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site