[LLVMdev] Accessing InstrFormat.td fields

Evan Cheng evan.cheng at apple.com
Thu Oct 30 08:49:28 PDT 2008


X86 instruction formats have extra bits as well. See  
X86InstrFormats.td, X86InstrInfo.h, and X86CodeEmitter.cpp to see how  
they are accessed. However, these are static data so I don't think you  
can modify them.

Evan

On Oct 28, 2008, at 9:18 AM, Villmow, Micah wrote:

> When I setup my InstrFormat fields, I added some custom fields  
> specific for my backend. How do I access these from inside LLVM?
>
> For example:
> class InstrFormat<dag outs, dag ins, string asmstr, list<dag> pattern>
>         : Instruction {
>     let Namespace = "AMD";
>     dag OutOperandList = outs;
>     dag InOperandList = ins;
>     let Pattern = pattern;
>     let AsmString = asmstr;
>     OpCodeModifier ocmod;
> }
>
> How do I set/read the ocmod struct from either SelectCode or a  
> separate phase? Is there an example of this?
>
> Micah Villmow
> Systems Engineer
> Advanced Technology & Performance
> Advanced Micro Devices Inc.
> 4555 Great America Pkwy,
> Santa Clara, CA. 95054
> P: 408-572-6219
> F: 408-572-6596
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20081030/9097ad4b/attachment.html>


More information about the llvm-dev mailing list