[Simh] simh and jump tables
Tackett Galen
tackett_galen at bah.com
Mon Apr 10 12:37:36 EDT 2006
Villy,
Don't think it futile. Think of it as education. :-) I'm sure some of the
rest of us did learn a bit from what you wrote.
Regarding C compilers and optimizations, the only one I know really well is
HP C for OpenVMS (VAX, Alpha and IA64) but similar things may apply to other
compilers--
Recent versions of HP C for OpenVMS do a lot of optimization by default, but
certain kinds of optimizations, especially some architecture-specific ones,
don't happen by default. I don't have enough experience with these
optimizations, or with simh for that matter, to be able to judge their
effectiveness for this application. It would be entertaining to try if I
only had the time and a VMS system at home (wish wish :)
One such feature, called "plus list optimization", enables optimization
across multiple source files. It basically involves using "+" instead of ","
to separate the names of your [multiple] source files. I can imagine
scenarios where this might be especially effective, but I haven't a clue
whether simh might be such.
Thanks for commenting on your experience, Villy. Always keep exploring.
--
Galen
Villy wrote:
> Well
>
>the end result of 10 - 12 hours of intensive coding is the discovery that
>the switch statements in C (well GCC) at least are coded as computed jumps
-
>a fact that I might have realized if I didn't have this long standing
> hate relationship with C.
>...
>
>The big question now is - which compiler was used to generate the
> distribution.
> Interesting exercise - if somewhat futile.
More information about the Simh
mailing list