O3: Make all instructions that write a misc register not perform the write until commit.
Review Request #298 - Created Nov. 8, 2010 and submitted
| Information | |
|---|---|
| Ali Saidi | |
| gem5 | |
| Reviewers | |
| Default | |
O3: Make all instructions that write a misc register not perform the write until commit. ARM Instructions updating cumulative flags (ARM FP exceptions and saturation flags) are not serialized. Added aliases for ARM FP exceptions and saturation flags in FPSCR.
Posted (Nov. 9, 2010, 5:05 a.m.)
Generally this seems ok, but there are some relatively minor issues to look at. This is O3, but still have you checked how this affects performance? I'd imagine it's not huge since there's so much else going on, but it would happen with every inst so it might add up.
-
src/arch/arm/isa.cc (Diff revision 1) -
I defined types for these (specifically FPSCR in miscregs.hh) so you can use that instead of manual bitmasks and oring.
-
src/arch/arm/isa/insts/fp.isa (Diff revision 1) -
You could use the operands list to make anything writing to Fpscr nonspeculative/serialize after/whatever. That might be safer since you'd be protected from accidentally leaving it off.
-
src/arch/arm/isa/insts/neon.isa (Diff revision 1) -
Is casting to FPSCR actually necessary? Part of the idea is that the bitunion types are (to the first order) interchangable with the bare underlying types. I didn't manage to make it seamless, granted, but it should handle the assignment. If not that may be a correctable bug.
Posted (Nov. 9, 2010, 5:05 a.m.)
Generally this seems ok, but there are some relatively minor issues to look at. This is O3, but still have you checked how this affects performance? I'd imagine it's not huge since there's so much else going on, but it would happen with every inst so it might add up.
Posted (Nov. 9, 2010, 5:06 a.m.)
Generally this seems ok, but there are some relatively minor issues to look at. This is O3, but still have you checked how this affects performance? I'd imagine it's not huge since there's so much else going on, but it would happen with every inst so it might add up.
Posted (Nov. 9, 2010, 5:06 a.m.)
Posted (Nov. 10, 2010, 12:07 a.m.)
So it looks like whether you call setMiscReg() or setMiscRegNoEffect() then you buffer the update and call setMiscReg() later... i.e., even if you called setMiscRegNoEffect() originally you end up calling setMiscReg() at commit. Are there ever cases where we call setMiscRegNoEffect() from an instruction? I thought it was strictly for things like system initialization and restoring from checkpoints anyway... maybe we don't need it in the ExecContext interface. Also, I see that these predate your change, but why do we need both the setMiscReg() calls and the setMiscRegOperand() calls? Is one of them deprecated? Can we take this opportunity to update the comments to distinguish them? We shouldn't have two different functions for which the descriptive comment is completely identical IMO.
