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]

Re: Adapting switch(x){case(y):...} with hashing


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

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