diff options
author | Nilay Vaish <nilay@cs.wisc.edu> | 2015-04-29 22:35:22 -0500 |
---|---|---|
committer | Nilay Vaish <nilay@cs.wisc.edu> | 2015-04-29 22:35:22 -0500 |
commit | ee06fed656d404c19c68c838df1dc8dbba37ec80 (patch) | |
tree | 4bca05681a3e4939994200c6974afea72370bc8f /src/arch/x86/isa/microops | |
parent | 179787f31faf12f7f4a31506db40236e82873675 (diff) | |
download | gem5-ee06fed656d404c19c68c838df1dc8dbba37ec80.tar.xz |
x86: change divide-by-zero fault to divide-error
Same exception is raised whether division with zero is performed or the
quotient is greater than the maximum value that the provided space can hold.
Divide-by-Zero is the AMD terminology, while Divide-Error is Intel's.
Diffstat (limited to 'src/arch/x86/isa/microops')
-rw-r--r-- | src/arch/x86/isa/microops/regop.isa | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/arch/x86/isa/microops/regop.isa b/src/arch/x86/isa/microops/regop.isa index 7d0374f02..15515ed12 100644 --- a/src/arch/x86/isa/microops/regop.isa +++ b/src/arch/x86/isa/microops/regop.isa @@ -629,7 +629,7 @@ let {{ uint64_t dividend = remainder; //Do the division. if (divisor == 0) { - fault = std::make_shared<DivideByZero>(); + fault = std::make_shared<DivideError>(); } else { divide(dividend, divisor, quotient, remainder); //Record the final results. @@ -652,7 +652,7 @@ let {{ //If we overshot, do nothing. This lets us unrool division loops a //little. if (divisor == 0) { - fault = std::make_shared<DivideByZero>(); + fault = std::make_shared<DivideError>(); } else if (remaining) { if (divisor & (ULL(1) << 63)) { while (remaining && !(dividend & (ULL(1) << 63))) { |