Displaying 4 results from an estimated 4 matches for "inteldialect".
2020 Jan 07
2
Inline assembly in intel syntax mishandling i constraint
Hi all,
I'm getting rather odd behavior from a call asm inteldialect(). TL;DR is "mov reg, $0" with a "i" constraint on $0 is behaving identical to "mov reg, dword ptr [$0]" and differently from "movl $0, reg" in AT&T syntax.
I'm not sure how to get clang to emit an inteldialect, so for this example, I'm emitting...
2020 Jan 08
2
Inline assembly in intel syntax mishandling i constraint
....0.
If it's fixed in LLVM, then I'll file a bug with Rust.
Thanks,
Steve
>
> ~Craig
>
>
> On Tue, Jan 7, 2020 at 2:44 PM Stephen Checkoway via llvm-dev <llvm-dev at lists.llvm.org> wrote:
> Hi all,
>
> I'm getting rather odd behavior from a call asm inteldialect(). TL;DR is "mov reg, $0" with a "i" constraint on $0 is behaving identical to "mov reg, dword ptr [$0]" and differently from "movl $0, reg" in AT&T syntax.
>
>
> I'm not sure how to get clang to emit an inteldialect, so for this example, I...
2019 Dec 09
4
IR inline assembly: the x86 Intel "offset" operator
...mov eax, offset Foo::ptr + 1
(Currently, omitting the +1 works... but offset doesn't work in compound
expressions.)
I'm having trouble figuring out what inline assembly I can emit into the
LLVM IR that will work properly. So far, the closest I've gotten is
call void asm sideeffect inteldialect "mov eax, offset $0 + $$1,
"*m,~{eax},~{dirflag},~{fpsr},~{flags}"(i32** @"?ptr at Foo@@2PAHA")
But that expands to
mov eax, offset [?ptr at Foo@@2PAHA] + 1
which ends up incorrectly dereferencing the address first.
I haven't found a working combination of code &am...
2019 Dec 11
2
IR inline assembly: the x86 Intel "offset" operator
...aven't been able to track down
where inline-assembly operands are expanded yet... anyone know where I
should be looking?
On Tue, Dec 10, 2019 at 7:23 PM Reid Kleckner <rnk at google.com> wrote:
> I think perhaps we want to make this LLVM IR asm string:
> call void asm sideeffect inteldialect "mov eax, $0",
> "i,~{eax},~{dirflag},~{fpsr},~{flags}"(i32* @"?Bar@@3HA") #1, !srcloc !3
>
> The key thing is the 'i' constraint. That ends up producing the wrong
> assembly right now, but maybe with your rebased patch, now it will do the
> righ...