[llvm-dev] x86 instruction format which takes a single 64-bit immediate

Craig Topper via llvm-dev llvm-dev at lists.llvm.org
Wed Mar 28 17:06:11 PDT 2018


Looks like you can use RIi64_NOREX instead of creating Ii64. It already
uses Imm64 and doesn't force REX.w.

~Craig

On Wed, Mar 28, 2018 at 4:59 PM, Craig Topper <craig.topper at gmail.com>
wrote:

> Copy Ii32 in X86InstrFormats.td rename to Ii64 and change Imm32 to Imm64.
> Instantiate your instruction inheriting from Ii64. Pass RawFrm to the form
> parameter.
>
> Initial documentation for the encoding system is attached.
>
> ~Craig
>
> On Wed, Mar 28, 2018 at 4:50 PM, Gus Smith via llvm-dev <
> llvm-dev at lists.llvm.org> wrote:
>
>> I am attempting to create an instruction which takes a single 64-bit
>> immediate. This doesn't seem like a thing that would exist already (because
>> who needs an instruction which just takes an immediate?) How might I
>> implement this easily? Perhaps I could use a format which encodes a
>> register, which is then unused?
>>
>> Thanks for the help.
>> Gus
>>
>> _______________________________________________
>> 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/20180328/2ba98f24/attachment.html>


More information about the llvm-dev mailing list