mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-12 13:38:21 +00:00
Reinstate checking of stackrestore, with checking for both Read
and Write, and add a comment explaining this. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104756 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -285,6 +285,14 @@ void Lint::visitCallSite(CallSite CS) {
|
||||
visitMemoryReference(I, CS.getArgument(0), 0, 0,
|
||||
MemRef::Read | MemRef::Write);
|
||||
break;
|
||||
|
||||
case Intrinsic::stackrestore:
|
||||
// Stackrestore doesn't read or write memory, but it sets the
|
||||
// stack pointer, which the compiler may read from or write to
|
||||
// at any time, so check it for both readability and writeability.
|
||||
visitMemoryReference(I, CS.getArgument(0), 0, 0,
|
||||
MemRef::Read | MemRef::Write);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user