draperlaboratory / fracture

an architecture-independent decompiler to LLVM IR
Other
385 stars 47 forks source link

TableGen is not parsing list<Register> Defs properly #16

Open skintigh opened 10 years ago

skintigh commented 10 years ago

A good example is:

def BL {    // Instruction InstTemplate Encoding InstARM XI 
  ...
  string Namespace = "ARM";
  dag OutOperandList = (outs);
  dag InOperandList = (ins bl_target:$func);
  string AsmString = "bl    $func";
  list<dag> Pattern = [(ARMcall tglobaladdr:$func)];
  list<Register> Uses = [SP];
  list<Register> Defs = [LR];
  list<Predicate> Predicates = [IsARM];
  int Size = 4;

Note that LR is not defined in the outs list, but it is an implicit definition. The backend should indicated the VT of LR (i32 in this case) so it can be properly decoded in the SelectionDAG engine.