[llvm-commits] XOP encoding patch

Jan Sjodin jan_sjodin at yahoo.com
Mon Dec 12 11:42:18 PST 2011


Committed revision 146397 and 146407.

- Jan



----- Original Message -----
> From: Jan Sjodin <jan_sjodin at yahoo.com>
> To: Bruno Cardoso Lopes <bruno.cardoso at gmail.com>
> Cc: "llvm-commits at cs.uiuc.edu" <llvm-commits at cs.uiuc.edu>
> Sent: Monday, December 12, 2011 1:41 PM
> Subject: Re: [llvm-commits] XOP encoding patch
> 
> 
> 
>> 
> 
>>  Ok, the XOP8, XOP9 seems fair enough for now.
>>  Like Eli said, your patch again use tabs:
> 
> Thought I had told emacs not to do that anymore. Will fix!
> 
>>  +      // If there is an additional 5th operand it must be an immediate, 
> which
>>  +      // is encoded in bits[3:0]
>>  +      if(CurOp != NumOps) {
>>  +        const MCOperand &MIMM = MI.getOperand(CurOp++);
>>  +        if(MIMM.isImm()) {
>>  +          unsigned Val = MIMM.getImm();
>>  +      assert(Val < 16 && "Immediate operand value out of 
>>  range");
>>  +      RegNum |= Val;
>>  +    }
>>  +      }
> 
> 
>>  Also, you're using 4 spaces instead of 2 in only a few places:
> 
> Ok will fix.
> 
>>  +let isAsmParserOnly = 1 in {
>>  +    defm VPROTW : xop3opimm<0xC1, "vprotw">;
>>  +    defm VPROTQ : xop3opimm<0xC3, "vprotq">;
>>  +    defm VPROTD : xop3opimm<0xC2, "vprotd">;
>>  +    defm VPROTB : xop3opimm<0xC0, "vprotb">;
>>  +}
>> 
>>  Fix this and the others and commit.
>> 
>>  One last thing: commit the encoding bits and the encoder logic in a
>>  different commit from the instructions, to make it easy to track the
>>  encoding changes in the future if someone needs to search for it.
>> 
> 
> Okay, I will split into two commits.
> 
>>  -- 
>>  Bruno Cardoso Lopes
>>  http://www.brunocardoso.cc
>> 
> 
> 
> Thanks!
> 
> - Jan
> 
> 
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
> 




More information about the llvm-commits mailing list