This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]