The Alpha way of doing things was first and things which are patterned
off of it do things that way. The other way (using fields defined on
ExtMachInst in types.hh) was introduced for x86, I believe, because
you can't readily take bitfields from a structure using shifts and
masks. I prefer doing things this way since I like to do things in C++
when possible to try to keep the ISA description less cluttered and
because it's easier to reason about C++ code directly than C++ code
being generated by something. When I rewrote ARM, basically, I
converted it to use the x86 style.
Despite my personal preference, both are valid ways of doing things.
If you're working within an ISA that does it one way or the other,
unless you really need to change it for some reason you can just
follow along and make your changes consistent with the existing code.
If this stuff isn't already on the wiki (not that hard to believe)
then I'll plan on adding it maybe this weekend.
Gabe
Quoting Paul Rosenfeld <[email protected]>:
Having made some changes to the Alpha decoder, I decided to make the same
changes to the ARM decoder to move my target there. The wiki talks about
bitfield definitions as being in the .isa files and everything was straight
forward in Alpha.
However, the ARM code does something completely different by putting the
actual definitions of the bit fields in types.hh. Since types.hh isn't
mentioned on the wiki it took me some probing to try to figure out how the
decoder was figuring out those values.
So my question is: is there a preferred way of doing it one way or the
other? Should I add a note on the wiki about types.hh being a place to look
for bitfield information?
_______________________________________________
gem5-users mailing list
[email protected]
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users