search for: myregister

Displaying 1 result from an estimated 1 matches for "myregister".

Did you mean: mcregister
2013 Jun 05
1
[LLVMdev] TableGen lookup table recipe?
Is it possible to define lookup tables as a list in tablegen, to map one value to another? Here's the template I was working on: ========================================= class LookupTable { list<int> mapping = [0, 8, 16, 24, 32]; } def LUT : LookupTable; class MyRegister<name, index> : Register<name> { let HWEncoding = LUT.mapping[index]; int otherVal = index; // required as well, ie. 'unmapped' } foreach reg 0-32 in { def R#reg : MyRegister<!subst("X", reg, "rX"), reg>; } ====================================...