summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/MachineInstr.cpp
diff options
context:
space:
mode:
authorDavid Greene <greened@obbligato.org>2010-02-15 16:48:31 +0000
committerDavid Greene <greened@obbligato.org>2010-02-15 16:48:31 +0000
commit3a0412f122179e8b9873c4e239a73798e63b135b (patch)
treebc94b2953ab8d11351d75beb6ae5fa6f3eb018a0 /llvm/lib/CodeGen/MachineInstr.cpp
parent998f9d975b5b34174c9a638d7fc9d2a1ca91b6d8 (diff)
downloadbcm5719-llvm-3a0412f122179e8b9873c4e239a73798e63b135b.tar.gz
bcm5719-llvm-3a0412f122179e8b9873c4e239a73798e63b135b.zip
Add non-temporal flags to MachineMemOperand.
llvm-svn: 96226
Diffstat (limited to 'llvm/lib/CodeGen/MachineInstr.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineInstr.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/MachineInstr.cpp b/llvm/lib/CodeGen/MachineInstr.cpp
index df61c745769..b6d98e8e7b4 100644
--- a/llvm/lib/CodeGen/MachineInstr.cpp
+++ b/llvm/lib/CodeGen/MachineInstr.cpp
@@ -305,7 +305,7 @@ void MachineOperand::print(raw_ostream &OS, const TargetMachine *TM) const {
MachineMemOperand::MachineMemOperand(const Value *v, unsigned int f,
int64_t o, uint64_t s, unsigned int a)
: Offset(o), Size(s), V(v),
- Flags((f & 7) | ((Log2_32(a) + 1) << 3)) {
+ Flags((f & ((1 << MOMaxBits) - 1)) | ((Log2_32(a) + 1) << MOMaxBits)) {
assert(getBaseAlignment() == a && "Alignment is not a power of 2!");
assert((isLoad() || isStore()) && "Not a load/store!");
}
@@ -327,7 +327,8 @@ void MachineMemOperand::refineAlignment(const MachineMemOperand *MMO) {
if (MMO->getBaseAlignment() >= getBaseAlignment()) {
// Update the alignment value.
- Flags = (Flags & 7) | ((Log2_32(MMO->getBaseAlignment()) + 1) << 3);
+ Flags = (Flags & ((1 << MOMaxBits) - 1)) |
+ ((Log2_32(MMO->getBaseAlignment()) + 1) << MOMaxBits);
// Also update the base and offset, because the new alignment may
// not be applicable with the old ones.
V = MMO->getValue();
OpenPOWER on IntegriCloud