[llvm-dev] Immediates in intrinsics

Craig Topper via llvm-dev llvm-dev at lists.llvm.org
Sun Dec 17 21:01:05 PST 2017


The fact that the intrinsic takes an immediate is usually encoded as part
of the isel pattern selection

For example from an x86 intrinsic/instruction:

def INT : Ii8<0xcd, RawFrm, (outs), (ins u8imm:$trap), "int\t$trap",
              [(int_x86_int imm:$trap)], IIC_INT>;

I'm slightly confused by your question though as you mention register which
sort of implies you're looking at PowerPC assembly. But you also mention a
function, but the intrinsic should have been turned into instructions
before assembly and there should be no function call.

~Craig

On Sun, Dec 17, 2017 at 8:26 PM, Justin Hibbits via llvm-dev <
llvm-dev at lists.llvm.org> wrote:

> I'm trying to add intrinsics for the Signal Processing Engine
> (FPU/vector unit) on some PowerPC cores, but running into a problem.
> Some of the instructions take an immediate operand, but I can't figure
> out how to make the intrinsic use an immediate, it just wants to load
> a register as an argument to the function.  Is there any way in the
> .td file to describe the intrinsic as taking an immediate, or do I
> need to generate an intermediate instruction identifier?
>
> Thanks,
> Justin
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20171217/664dc5b7/attachment.html>


More information about the llvm-dev mailing list