summaryrefslogtreecommitdiff
path: root/src/arch/x86/insts
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2007-08-26 20:30:36 -0700
committerGabe Black <gblack@eecs.umich.edu>2007-08-26 20:30:36 -0700
commitfcd04f953ce56f85da52d916f5770924fedd0297 (patch)
tree14c6cbc305f9fcc3eedeb99c5d79a2ee6c598207 /src/arch/x86/insts
parent24bfda0fdf0d1f80726d8590dcd6a84d70134a53 (diff)
downloadgem5-fcd04f953ce56f85da52d916f5770924fedd0297.tar.xz
X86: Remove x86 code that attempted to fix misaligned accesses.
--HG-- extra : convert_revision : 42f68010e6498aceb7ed25da278093e99150e4df
Diffstat (limited to 'src/arch/x86/insts')
-rw-r--r--src/arch/x86/insts/microldstop.hh38
1 files changed, 12 insertions, 26 deletions
diff --git a/src/arch/x86/insts/microldstop.hh b/src/arch/x86/insts/microldstop.hh
index fac1fa3aa..5b1210d69 100644
--- a/src/arch/x86/insts/microldstop.hh
+++ b/src/arch/x86/insts/microldstop.hh
@@ -106,29 +106,22 @@ namespace X86ISA
Fault read(Context *xc, Addr EA, MemType & Mem, unsigned flags) const
{
Fault fault = NoFault;
- int size = dataSize;
- Addr alignedEA = EA & ~(dataSize - 1);
- if (EA != alignedEA)
- size *= 2;
- switch(size)
+ switch(dataSize)
{
case 1:
- fault = xc->read(alignedEA, (uint8_t&)(Mem.a), flags);
+ fault = xc->read(EA, (uint8_t&)Mem, flags);
break;
case 2:
- fault = xc->read(alignedEA, (uint16_t&)(Mem.a), flags);
+ fault = xc->read(EA, (uint16_t&)Mem, flags);
break;
case 4:
- fault = xc->read(alignedEA, (uint32_t&)(Mem.a), flags);
+ fault = xc->read(EA, (uint32_t&)Mem, flags);
break;
case 8:
- fault = xc->read(alignedEA, (uint64_t&)(Mem.a), flags);
- break;
- case 16:
- fault = xc->read(alignedEA, Mem, flags);
+ fault = xc->read(EA, (uint64_t&)Mem, flags);
break;
default:
- panic("Bad operand size %d for read at %#x.\n", size, EA);
+ panic("Bad operand size %d for read at %#x.\n", dataSize, EA);
}
return fault;
}
@@ -137,29 +130,22 @@ namespace X86ISA
Fault write(Context *xc, MemType & Mem, Addr EA, unsigned flags) const
{
Fault fault = NoFault;
- int size = dataSize;
- Addr alignedEA = EA & ~(dataSize - 1);
- if (EA != alignedEA)
- size *= 2;
- switch(size)
+ switch(dataSize)
{
case 1:
- fault = xc->write((uint8_t&)(Mem.a), alignedEA, flags, 0);
+ fault = xc->write((uint8_t&)Mem, EA, flags, 0);
break;
case 2:
- fault = xc->write((uint16_t&)(Mem.a), alignedEA, flags, 0);
+ fault = xc->write((uint16_t&)Mem, EA, flags, 0);
break;
case 4:
- fault = xc->write((uint32_t&)(Mem.a), alignedEA, flags, 0);
+ fault = xc->write((uint32_t&)Mem, EA, flags, 0);
break;
case 8:
- fault = xc->write((uint64_t&)(Mem.a), alignedEA, flags, 0);
- break;
- case 16:
- fault = xc->write(Mem, alignedEA, flags, 0);
+ fault = xc->write((uint64_t&)Mem, EA, flags, 0);
break;
default:
- panic("Bad operand size %d for write at %#x.\n", size, EA);
+ panic("Bad operand size %d for write at %#x.\n", dataSize, EA);
}
return fault;
}