x86: Implements copyRegs() function
Review Request #759 - Created June 27, 2011 and submitted
| Information | |
|---|---|
| Nilay Vaish | |
| gem5 | |
| default | |
| Reviewers | |
| Default | |
| ali, gblack, nate, stever | |
x86: Implements copyRegs() function The copyRegs() function for x86 is currently unimplemented. This patch provides an implementation.
Posted (June 30, 2011, 4:52 p.m.)
It's naive because it just copies everything over one at a time without any side effects. The side effects might be functionally necessary, but when they're turned on you might run into problems where things have to be done in a certain order for the system to stay in a meaningful state. Making it transition through illegal states may not work, depending on how things are implemented.
-
src/arch/x86/utility.cc (Diff revision 1) -
You don't want this, you want arch/x86/registers.hh.
-
src/arch/x86/utility.cc (Diff revision 1) -
Delete this code, don't comment it out.
-
src/arch/x86/utility.cc (Diff revision 1) -
NUM_INTREGS won't get them all. You want NumIntRegs as defined in registers.hh. The names are a bit confusing.
-
src/arch/x86/utility.cc (Diff revision 1) -
Same as above, NumFloatRegs.
Review request changed
Updated (July 1, 2011, 8 a.m.)
Diff: |
Revision 2 (+5 -4) |
|---|
Posted (July 1, 2011, 8:02 a.m.)
Gabe, I took care of the things you had pointed out. Do you think we should commit this woithout taking care of the misc. registers?
Review request changed
Updated (July 7, 2011, 12:59 a.m.)
Description: |
|
|||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 3 (+10 -5) |
Posted (July 7, 2011, 8:16 a.m.)
-
src/arch/x86/utility.cc (Diff revision 3) -
This is not true. They are consistent among themselves, and there -happen- to not be any side effects that need to go along for the ride. If, for instance, the debug registers were set such that there was a hardware breakpoint somewhere, those would have to be set in such a way that the hardware breakpoint was installed in the new system as well, and that any existing breakpoint from it's own registers was removed. Future changes to what the miscregs do and how they work could definitely break this assumption without introducing any inconsistencies.
Posted (July 7, 2011, 12:26 p.m.)
-
src/arch/x86/utility.cc (Diff revision 3) -
I can change the comment to -- // This function assumes that the registers are consistent amongst themselves. Hence, side effects affecting the registers themselves need not be taken care of. But any other side effects, like TLB invalidation, would need to be.
