mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-21 08:17:40 +00:00
Add non-temporal flags to MachineMemOperand.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96226 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user