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.
