Adapting switch(x){case(y):...} with hashing
Michael Meissner
meissner@cygnus.com
Mon Dec 4 17:11:00 GMT 2000
On Fri, Dec 01, 2000 at 03:34:41PM -0500, Robert Dewar wrote:
> <<One concern is that many of our embedded machines don't have divide
> instructions, and/or the divide instructions takes an ungoodly amount of cycles
> (also if the divide emulation functions happened to contain a switch that the
> compiler would do via hashing).
> >>
>
> Why on earth would one choose to do a divide, given that this is indeed
> the case?
Obviously, but I assumed that at least some readers are only familiar with
hosted GCC implementations (or even embedded implmentations using chips that
have all of the instructions GCC normally wants to use) and didn't consider
what the effect of calculating a hash value via division if the machine in
question doesn't have a division instruction.
--
Michael Meissner, Red Hat, Inc.
PMB 198, 174 Littleton Road #3, Westford, Massachusetts 01886, USA
Work: meissner@redhat.com phone: +1 978-486-9304
Non-work: meissner@spectacle-pond.org fax: +1 978-692-4482
More information about the Gcc
mailing list