summaryrefslogtreecommitdiff
path: root/src/mem/request.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/mem/request.hh')
-rw-r--r--src/mem/request.hh6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mem/request.hh b/src/mem/request.hh
index e08593f0d..cc9c6b8bf 100644
--- a/src/mem/request.hh
+++ b/src/mem/request.hh
@@ -75,6 +75,8 @@ const uint32_t INST_READ = 0x80000;
/** This request is for a memory swap. */
const uint32_t MEM_SWAP = 0x100000;
const uint32_t MEM_SWAP_COND = 0x200000;
+/** The request should ignore unaligned access faults */
+const uint32_t NO_HALF_WORD_ALIGN_FAULT = 0x400000;
class Request : public FastAlloc
@@ -272,6 +274,10 @@ class Request : public FastAlloc
bool isCondSwap() { return (getFlags() & MEM_SWAP_COND) != 0; }
+ bool inline isMisaligned() {return (!(getFlags() & NO_ALIGN_FAULT) &&
+ ((vaddr & 1) ||
+ (!(getFlags() & NO_HALF_WORD_ALIGN_FAULT)
+ && (vaddr & 0x2))));}
friend class Packet;
};