This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
What is the correct logic for casesi
- From: "Marty Hauff" <marty dot hauff at rmit dot edu dot au>
- To: <gcc at gcc dot gnu dot org>
- Date: Mon, 11 Aug 2003 09:56:33 +1000
- Subject: What is the correct logic for casesi
I'm a bit confused by the documentation and some of the other MD file implementations of casesi..
Is this the correct (Pseudo code) logic for casesi?
index = op0
lower_bound = op1
upper_bound = op2
Table_label = op3
Default_label = op4
if ((index <= upper_bound) AND (index >= lower_bound))
pc = ((index - lower_bound) * sizeof(PMode)) + Table_label;
else
pc = default_label;
endif
Thanks for any assistance
Marty Moose