Review Board 2.0.15


ARM: Implement majority of instructions and some initial full-system support

Review Request #20 - Created April 29, 2010 and submitted

Information
Ali Saidi
gem5
Reviewers
Default
Initial set of patches to improve the M5 support of the ARM ISA. Bundled into one large change for review. This change implements the majority of thumb, thumb2, and arm instructions and allows the running of all tested SPEC2000 benchmarks in atomic mode. 

   
Review request changed
Updated (May 26, 2010, 1:13 p.m.)
Posted (May 27, 2010, 1:35 p.m.)



  
src/arch/arm/faults.cc (Diff revision 2)
 
 
I know that I'm being difficult here, but can you make the comment not be on the /* line, but on the following line?  I have lots of copyright scripts with regular expressions in them and this would screw them up.
Posted (June 1, 2010, 1:39 a.m.)



  
src/arch/arm/insts/mem.cc (Diff revision 2)
 
 
This is pretty minor, but I think this code is both more compact and expresses the intent better (for this case and similarly the following ASR case):
ccprintf(os, " LSR #%d", (shiftAmt == 0) ? 32 : shiftAmt);
  1. Fixed
Posted (June 1, 2010, 4:31 a.m.)
My comments are very superficial, but I would appreciate the copyright fixes to make life easier if we ever have to do some copyright nonsense again (I sure hope not).  I have one other minor request.  Get rid of lines > 80 columns for at least the ARM stuff.
configs/common/cpu2000.py (Diff revision 2)
 
 
No big deal, but python doesn't require parens for stuff like this.
  1. Yup, I know, I was just matching the style of the if statements below it
src/arch/arm/SConscript (Diff revision 2)
 
 
Unless you know that none of this was written by FSU, you probably shouldn't remove the copyright.
  1. It was moved below the arm specific blob
src/arch/arm/faults.hh (Diff revision 2)
 
 
You're going to fix this for me, right?
  1. These are all fixed
src/arch/arm/faults.hh (Diff revision 2)
 
 
Why are you specifying the values in this enum?  Are they important?  Do they come from some document?  A comment might be nice to explain why.  If the values don't matter, then they should probably be removed.
  1. Added a comment
src/arch/arm/insts/macromem.hh (Diff revision 2)
 
 
Fix please
src/arch/arm/insts/macromem.cc (Diff revision 2)
 
 
Fix please
src/arch/arm/insts/mult.hh (Diff revision 2)
 
 
Fix please
src/arch/arm/insts/pred_inst.hh (Diff revision 2)
 
 
Fix please
src/arch/arm/insts/pred_inst.cc (Diff revision 2)
 
 
Fix please
src/arch/arm/insts/static_inst.hh (Diff revision 2)
 
 
Fix please
src/arch/arm/insts/static_inst.cc (Diff revision 2)
 
 
Fix please
src/arch/arm/insts/vfp.cc (Diff revision 2)
 
 
fix please
src/arch/arm/isa.hh (Diff revision 2)
 
 
Another fix here please.
src/arch/arm/isa_traits.hh (Diff revision 2)
 
 
This get resolved?
  1. it will remain for now
src/arch/arm/miscregs.hh (Diff revision 2)
 
 
Another fix.
src/arch/arm/miscregs.cc (Diff revision 2)
 
 
How often does this happen?  Is there nothing more efficient than this insane implementation?  A table lookup perhaps?
  1. Not often
  2. Yeah, this isn't often. ARM uses coprocessors for a few important things. Two are for floating point, one for single precision and one for double I believe, and coprocessor 15 has a bunch of control registers in it. There are four dimensions to the control register decode, two indexes and two opcodes, and the space for the control registers is irregularly and incompletely filled. The documentation shows it as a tree, basically, and this implementation mirrors that. The function looks really complicated, but it should be decently efficient because it's nested to a fixed depth and usually uses switch statements unless there's only one or two choices. I don't think a lookup table would work very well given how the space is structured. We'd either have to have a huge table, or we'd end up with something as complicated as this but who's implementation was less obvious.
src/arch/arm/predecoder.hh (Diff revision 2)
 
 
Fix please.
src/arch/arm/predecoder.cc (Diff revision 2)
 
 
Fix please
src/arch/arm/process.cc (Diff revision 2)
 
 
Spacing looks messed up at least in reviewboard
  1. Fixed
src/arch/arm/types.hh (Diff revision 2)
 
 
Fix please
src/arch/arm/utility.hh (Diff revision 2)
 
 
Fix please
src/cpu/simple/base.cc (Diff revision 2)
 
 
This change really require copyright?
src/dev/arm/Versatile.py (Diff revision 2)
 
 
Please remove ##
  1. Fixed
src/dev/arm/versatile.hh (Diff revision 2)
 
 
Please fix