This is the mail archive of the
cgen@sources.redhat.com
mailing list for the CGEN project.
Re: Patch to add ifield number to cgen_operand (1/2)
- To: Richard Sandiford <rsandifo at cygnus dot com>
- Subject: Re: Patch to add ifield number to cgen_operand (1/2)
- From: Ben Elliston <bje at redhat dot com>
- Date: Mon, 29 Jan 2001 14:26:18 +1000 (EST)
- Cc: <cgen at sources dot redhat dot com>
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.