AlexandreFressange via llvm-dev
2015-Nov-18 15:28 UTC
[llvm-dev] Meaning of IR inline assembly
Hello,
Most of the IR language is correctly explained; but with inline assembly I feel
alone at some point:
define i32 @main(i32 %argc, i8** %argv) #0 {
... //some uninteresting bloat here
call void asm sideeffect "outw %eax, $0",
"imr,~{dirflag},~{fpsr},~{flags}"(i32 %8) #2, !srcloc !2
ret i32 0
}
I reduced the above code to the offending line containing:
"imr,~{dirflag},~{fpsr},~{flags}".
How should I interpret this? I found no resource on this over the net. Maybe
there are more options like that?
Do you have a link explaining this more in details?
thanks a lot.
--
Alex
> On 18.11.2015, at 16:28, AlexandreFressange via llvm-dev <llvm-dev at lists.llvm.org> wrote: > > I reduced the above code to the offending line containing: "imr,~{dirflag},~{fpsr},~{flags}". > > How should I interpret this? I found no resource on this over the net. Maybe there are more options like that? > Do you have a link explaining this more in details?It’s called a constraint string and it is documented here: http://llvm.org/docs/LangRef.html#inline-asm-constraint-string Cheers, d> > thanks a lot. > -- > Alex > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
AlexandreFressange via llvm-dev
2015-Nov-18 18:47 UTC
[llvm-dev] Meaning of IR inline assembly
Thanks, but I could not find the imr, dirflag, fpsr constraints here. Just the usual gcc/clang inline assembly constraints. Those one were of my concern, actually :) -- Alex 18.11.2015, 17:11, "David Siegel" <agnat at icloud.com>:>> On 18.11.2015, at 16:28, AlexandreFressange via llvm-dev <llvm-dev at lists.llvm.org> wrote: >> >> I reduced the above code to the offending line containing: "imr,~{dirflag},~{fpsr},~{flags}". >> >> How should I interpret this? I found no resource on this over the net. Maybe there are more options like that? >> Do you have a link explaining this more in details? > > It’s called a constraint string and it is documented here: > > http://llvm.org/docs/LangRef.html#inline-asm-constraint-string > > Cheers, > > d > >> thanks a lot. >> -- >> Alex >> _______________________________________________ >> LLVM Developers mailing list >> llvm-dev at lists.llvm.org >> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev