X86: Split Condition Code register
Review Request #1166 - Created April 27, 2012 and submitted
| Information | |
|---|---|
| Nilay Vaish | |
| gem5 | |
| default | |
| Reviewers | |
| Default | |
Changeset 9010:4442a38b1a6a --------------------------- X86: Split Condition Code register This patch moves the ECF and EZF bits to individual registers (ecfBit and ezfBit) and the CF and OF bits to cfofFlag registers. Ultimately we will have the following registers [ZAPS], [OF], [CF], [ECF], [EZF] and [DF].
Boots Linux with atomic cpu.
Issue Summary
12
2
10
0
| Description | From | Last Updated | Status |
|---|---|---|---|
| I don't think this should be split out into a separate function. | Gabe Black | April 28, 2012, 3:11 p.m. | Open |
| What are these constants? If this is splitting out the fields you mention in the commit message, that's already basically ... | Gabe Black | May 17, 2012, 4:25 p.m. | Open |
Posted (April 28, 2012, 3:11 p.m.)
-
src/arch/x86/insts/microregop.cc (Diff revision 1) -
I don't think this should be split out into a separate function.
Posted (May 3, 2012, 2:50 a.m.)
Should I assume that no one is opposed to this patch in its current form? This would clear my way in further breaking up the condition code register.
Review request changed
Updated (May 16, 2012, 9:38 a.m.)
Description: |
|
||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 2 (+135 -72) |
Review request changed
Updated (May 16, 2012, 9:39 a.m.)
Description: |
|
||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 3 (+135 -72) |
Posted (May 17, 2012, 4:25 p.m.)
This seems to be basically going in the right direction, but there are a lot of rough edges to smooth out.
-
src/arch/x86/isa/microops/debug.isa (Diff revision 3) -
There should be spaces around |, here and below.
-
src/arch/x86/isa/microops/regop.isa (Diff revision 3) -
What are these constants? If this is splitting out the fields you mention in the commit message, that's already basically done. ccFlagBits means condition code flag bits. At the very least these constants should have names. Better yet, they should be derived from constants that already exist (ECFBit, EZFBit).
-
src/arch/x86/isa/microops/regop.isa (Diff revision 3) -
Don't put in a bunch of white space to make things line up. Tables are for data, not code. Unless you have a lot of data lining that up isn't all that useful either.
-
src/arch/x86/isa/microops/regop.isa (Diff revision 3) -
It looks like either you forgot to set the emulation flags here or you forgot to put this back on one line. Regardless, I think you should set EZF and ECF here to stay consistent with the old semantics. Things will need to be that way anyway once we have a bunch of registers.
-
src/arch/x86/isa/microops/regop.isa (Diff revision 3) -
Why the change in alignment?
-
src/arch/x86/isa/operands.isa (Diff revision 3) -
This name isn't great. At least leave Flag in there so I know what sort of bits they are (ucc by itself signifies almost nothing).
Review request changed
Updated (May 18, 2012, 4:52 a.m.)
Description: |
|
||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 4 (+212 -116) |
Review request changed
Updated (May 18, 2012, 4:55 a.m.)
Description: |
|
|||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 5 (+212 -116) |
Posted (May 18, 2012, 9:11 p.m.)
A solid step in the right direction. There are still some issues to address. The most important one is that you don't want to compute a value, put it in an operand the parser recognizes, and then use that operand to compute other values. You're not using the value the operand used to have, but the parser isn't smart enough to know that and assumes it must be a source as well. You'll find a lot of places in the various ISA descriptions where things are put in a temporary variable, assigned to the destination, and then the temporary is used to compute flags. The other less serious style issues should still be addressed though, and be sure to test carefully.
-
src/arch/x86/isa/microops/fpop.isa (Diff revision 5) -
This alignment is still not necessary.
-
src/arch/x86/isa/microops/regop.isa (Diff revision 5) -
This will unintentionally make the parser think ccFlagBits is a source. You'll want to use a temporary for psrc1 ^ op2. I think this problem crops up in a lot of this patch.
-
src/arch/x86/isa/microops/regop.isa (Diff revision 5) -
} on the same line as else
Review request changed
Updated (May 19, 2012, 2:22 p.m.)
Description: |
|
||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 6 (+251 -116) |
Posted (May 19, 2012, 3:01 p.m.)
Address my existing feedback before you post new code (unless this was already written).
Posted (May 20, 2012, 7 a.m.)
You have more than it looked like you had the other day. I blame stale browser cache. In any case, you really did miss a couple spots.
-
src/arch/x86/isa/microops/mediaop.isa (Diff revision 6) -
Missed one.
-
src/arch/x86/isa/microops/regop.isa (Diff revision 6) -
Missed one.
Review request changed
Updated (May 20, 2012, 8:35 a.m.)
Description: |
|
|||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 7 (+251 -116) |
Posted (May 20, 2012, 8:47 a.m.)
Great, thanks for the fixes. I think I'm happy with this.
