This is the mail archive of the
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;
pc = default_label;
Thanks for any assistance