Hello, > I want to limit the size of immediate field of some operation.
I think you can look at SIGNED_INT_FITS_N_BITS definition at config/crx/crx.c for such example. You can write a predicate like the following; and use it when describing the immediate operand in the md file. (define_predicate "s24bits_operand" (match_code "const_int") { return (SIGNED_INT_FITS_N_BITS(INTVAL(op), 24)) ? 1 : 0; } ) Thanks, Revital