Review Board 2.0.15


ISA parser: Simplify operand type handling.

Review Request #655 - Created April 24, 2011 and submitted

Information
Gabe Black
gem5
Reviewers
Default
ali, gblack, nate, stever
ISA parser: Simplify operand type handling.

This change simplifies the code surrounding operand type handling and makes it
depend only on the ctype that goes with each operand type. Future changes will
allow defining operand types by their ctypes directly, convert the ISAs over
to that style of definition, and then remove support for the old style. These
changes are to make it easier to use non-builtin types like classes or
structures as the type for operands.

   
Review request changed
Updated (July 1, 2011, 7:23 p.m.)
Posted (July 2, 2011, 2:21 a.m.)



  
src/arch/power/isa/formats/mem.isa (Diff revision 4)
 
 
val doesn't seem to be used anywhere else; why not get rid of it and rewrite this as:

getMem(pkt, *((%(mem_acc_type)s*)&Mem), traceData);

Is there any case where Mem is not of mem_acc_type?  If not, it could be a lot simpler even...
  1. I agree this code is probably overly complicated (there's some like that in SPARC too) but I wanted this to be a 1:1 translation and to avoid doing anything that would actually change the code (for better or for worse). It probably can be simplified, and I'll put together a later change for it. Other than that is this alright?
  2. Yea, other than that this looks fine to me (and thanks for the later fix of this issue too).