Review Board 2.0.15


ARM: Limited implementation of dprintf.

Review Request #228 - Created Aug. 23, 2010 and submitted

Information
Ali Saidi
gem5
Reviewers
Default
ARM: Limited implementation of dprintk.

Does not work with vfp arguments or arguments passed on the stack.

   
Posted (Aug. 23, 2010, 4:13 a.m.)



  
src/arch/arm/utility.cc (Diff revision 1)
 
 
I realize the argument registers are just counting up from 0, but since you do define constants for them it might be better to put them in an array and use argument[number] as the register index. Otherwise if someone were to change ArgumentReg0 to 5, nothing (or something weird) would happen. Also you might want to put NumArgumentRegs after the ArgumentRegs, although it's not a big deal.

I'd also suggest some wording changes for the fatals.

"getArgument() doesn't support fp regs!\n" =>
"getArgument(): Floating point arguments not implemented.\n"

"getArgument() not implemented for larger than NumArgumentRegs!\n" =>
"getArgument(): Argument index %d beyond max supported (%d).\n", number, NumArgumentRegs - 1,

"getArgument() only implemented for FULL_SYSTEM\n" =>
"getArgument(): Not supported in SE mode.\n"

I don't know how the code in the other files normally works, but I didn't see anything terribly wrong with it.
  1. Well, if someone does that it's horribly wrong. You can do if (ArgumentReg0 + number < ArgumentReg0 + NumArgumentRegs), but that doesn't seem like a worthwhile change. if someone decides to change the ABI more than this is going to break. 
    
    I changed the panics.