From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ben Elliston To: Richard Sandiford Cc: Subject: Re: Patch to add ifield number to cgen_operand (1/2) Date: Sun, 28 Jan 2001 20:28:00 -0000 Message-id: References: X-SW-Source: 2001-q1/msg00091.html Richard, In cgen_ifield_lookup_by_num, how about testing the assertion that `ifnum' is within range? Ben **************** *** 298,303 **** --- 298,313 ---- return NULL; } + /* Instruction fields. */ + + const CGEN_IFLD * + cgen_ifield_lookup_by_num (cd, ifnum) + CGEN_CPU_DESC cd; + unsigned int ifnum; + { + return &cd->ifld_table[ifnum]; + } + /* Operand support. */ /* Lookup an operand by its name.