projects
/
gem5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ba33db8
)
ARM: Ignore writing a bad mode to CPSR with MSR.
author
Gabe Black
<gblack@eecs.umich.edu>
Wed, 2 Jun 2010 17:58:11 +0000
(12:58 -0500)
committer
Gabe Black
<gblack@eecs.umich.edu>
Wed, 2 Jun 2010 17:58:11 +0000
(12:58 -0500)
src/arch/arm/insts/static_inst.hh
patch
|
blob
|
history
diff --git
a/src/arch/arm/insts/static_inst.hh
b/src/arch/arm/insts/static_inst.hh
index c26053cefc0e2d124288ee10c405c928c9ae9bec..33453bec681b404f6a14cae7fa940c69b022164d 100644
(file)
--- a/
src/arch/arm/insts/static_inst.hh
+++ b/
src/arch/arm/insts/static_inst.hh
@@
-177,7
+177,11
@@
class ArmStaticInst : public StaticInst
if (bits(byteMask, 0)) {
if (privileged) {
bitMask = bitMask | mask(7, 6);
- bitMask = bitMask | mask(5);
+ if (!badMode((OperatingMode)(val & mask(5)))) {
+ bitMask = bitMask | mask(5);
+ } else {
+ warn_once("Ignoring write of bad mode to CPSR.\n");
+ }
}
if (affectState)
bitMask = bitMask | (1 << 5);