summaryrefslogtreecommitdiff
path: root/src/arch/x86/insts/static_inst.cc
diff options
context:
space:
mode:
authorSteve Reinhardt <stever@gmail.com>2007-07-31 00:37:07 -0400
committerSteve Reinhardt <stever@gmail.com>2007-07-31 00:37:07 -0400
commitc4c8a121863fcbde7ba67823f06a3f7564c27cba (patch)
treeaccca43f0d87a07f3bcedf46a88fd6e3a5e86167 /src/arch/x86/insts/static_inst.cc
parent2f93db6f95b02d2bedf9571330a3185ac3fa7fa9 (diff)
parentae3e1d22fc3bfff8c246a0a743b77f4096d95b74 (diff)
downloadgem5-c4c8a121863fcbde7ba67823f06a3f7564c27cba.tar.xz
Merge from head.
--HG-- extra : convert_revision : af16bc685ea28e44b8120f16b72f60a21d68c1e2
Diffstat (limited to 'src/arch/x86/insts/static_inst.cc')
-rw-r--r--src/arch/x86/insts/static_inst.cc17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/arch/x86/insts/static_inst.cc b/src/arch/x86/insts/static_inst.cc
index 9b2f81e49..948a74bc1 100644
--- a/src/arch/x86/insts/static_inst.cc
+++ b/src/arch/x86/insts/static_inst.cc
@@ -117,15 +117,27 @@ namespace X86ISA
{
assert(size == 1 || size == 2 || size == 4 || size == 8);
static const char * abcdFormats[9] =
- {"", "%sl", "%sx", "", "e%sx", "", "", "", "r%sx"};
+ {"", "%s", "%sx", "", "e%sx", "", "", "", "r%sx"};
static const char * piFormats[9] =
- {"", "%sl", "%s", "", "e%s", "", "", "", "r%s"};
+ {"", "%s", "%s", "", "e%s", "", "", "", "r%s"};
static const char * longFormats[9] =
{"", "r%sb", "r%sw", "", "r%sd", "", "", "", "r%s"};
static const char * microFormats[9] =
{"", "t%db", "t%dw", "", "t%dd", "", "", "", "t%d"};
if (reg < FP_Base_DepTag) {
+ char * suffix = "";
+ bool fold = reg & (1 << 6);
+ reg &= ~(1 << 6);
+
+ if(fold)
+ {
+ suffix = "h";
+ reg -= 4;
+ }
+ else if(reg < 8 && size == 1)
+ suffix = "l";
+
switch (reg) {
case INTREG_RAX:
ccprintf(os, abcdFormats[size], "a");
@@ -178,6 +190,7 @@ namespace X86ISA
default:
ccprintf(os, microFormats[size], reg - NUM_INTREGS);
}
+ ccprintf(os, suffix);
} else if (reg < Ctrl_Base_DepTag) {
ccprintf(os, "%%f%d", reg - FP_Base_DepTag);
} else {