summaryrefslogtreecommitdiff
path: root/src/arch/x86/faults.cc
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2009-02-01 17:08:32 -0800
committerGabe Black <gblack@eecs.umich.edu>2009-02-01 17:08:32 -0800
commit923a14dde749ad6b1887ccea764439a167555772 (patch)
tree8084a71550fe2916f010f6252f3fc0e47fe0094e /src/arch/x86/faults.cc
parent2f8cec849d49d2692665aec20a1cd441e743dae7 (diff)
downloadgem5-923a14dde749ad6b1887ccea764439a167555772.tar.xz
X86: Make the fault classes handle error codes better.
Diffstat (limited to 'src/arch/x86/faults.cc')
-rw-r--r--src/arch/x86/faults.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/arch/x86/faults.cc b/src/arch/x86/faults.cc
index 2ce377bdd..7702d98eb 100644
--- a/src/arch/x86/faults.cc
+++ b/src/arch/x86/faults.cc
@@ -123,7 +123,9 @@ namespace X86ISA
}
tc->setIntReg(INTREG_MICRO(1), vector);
tc->setIntReg(INTREG_MICRO(7), tc->readPC());
- tc->setIntReg(INTREG_MICRO(15), (uint64_t)(-1));
+ if (errorCode != (uint64_t)(-1)) {
+ tc->setIntReg(INTREG_MICRO(15), errorCode);
+ }
tc->setMicroPC(romMicroPC(entry));
tc->setNextMicroPC(romMicroPC(entry) + 1);
}