[llvm-commits] [llvm] r115573 - /llvm/trunk/utils/TableGen/X86RecognizableInstr.cpp

Chris Lattner clattner at apple.com
Mon Oct 4 17:13:28 PDT 2010


On Oct 4, 2010, at 3:45 PM, Sean Callanan wrote:

> Author: spyffe
> Date: Mon Oct  4 17:45:51 2010
> New Revision: 115573
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=115573&view=rev
> Log:
> Fixed the disassembler to handle two new X86
> instruction forms.  Now the ENTER instruction
> disassembles correctly.

Great!  Please add a testcase,

-Chris

> 
> Modified:
>    llvm/trunk/utils/TableGen/X86RecognizableInstr.cpp
> 
> Modified: llvm/trunk/utils/TableGen/X86RecognizableInstr.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/X86RecognizableInstr.cpp?rev=115573&r1=115572&r2=115573&view=diff
> ==============================================================================
> --- llvm/trunk/utils/TableGen/X86RecognizableInstr.cpp (original)
> +++ llvm/trunk/utils/TableGen/X86RecognizableInstr.cpp Mon Oct  4 17:45:51 2010
> @@ -51,10 +51,11 @@
>     MRM0m = 24, MRM1m = 25, MRM2m = 26, MRM3m = 27,
>     MRM4m = 28, MRM5m = 29, MRM6m = 30, MRM7m = 31,
>     MRMInitReg  = 32,
> -    
> #define MAP(from, to) MRM_##from = to,
>     MRM_MAPPING
> #undef MAP
> +    RawFrmImm8  = 43,
> +    RawFrmImm16 = 44,
>     lastMRM
>   };
> 
> @@ -587,6 +588,20 @@
>     HANDLE_OPERAND(memory)
>     HANDLE_OPTIONAL(relocation)
>     break;
> +  case X86Local::RawFrmImm8:
> +    // operand 1 is a 16-bit immediate
> +    // operand 2 is an 8-bit immediate
> +    assert(numPhysicalOperands == 2 &&
> +           "Unexpected number of operands for X86Local::RawFrmImm8");
> +    HANDLE_OPERAND(immediate)
> +    HANDLE_OPERAND(immediate)
> +    break;
> +  case X86Local::RawFrmImm16:
> +    // operand 1 is a 16-bit immediate
> +    // operand 2 is a 16-bit immediate
> +    HANDLE_OPERAND(immediate)
> +    HANDLE_OPERAND(immediate)
> +    break;
>   case X86Local::MRMInitReg:
>     // Ignored.
>     break;
> 
> 
> _______________________________________________
> 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