mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-10-10 01:28:44 +02:00
test(libs): access aliased AMM mappings through volatile references
The AMM test writes through one mapping of a physical page and reads it through another. The two addresses are distinct to the compiler, so GCC 13 at -O2 moved the read ahead of the write and the Linux CI check saw the old value. The test's At helper now returns a volatile reference. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -535,8 +535,8 @@ constexpr std::int32_t cpuReadWrite = 0x03;
|
||||
constexpr std::int32_t cpuGpuReadWrite = 0x33;
|
||||
constexpr std::int32_t amprReadWrite = 0xC0;
|
||||
|
||||
std::uint64_t& At(std::uint64_t address) {
|
||||
return *reinterpret_cast<std::uint64_t*>(address);
|
||||
volatile std::uint64_t& At(std::uint64_t address) {
|
||||
return *reinterpret_cast<volatile std::uint64_t*>(address);
|
||||
}
|
||||
|
||||
void TestAmm() {
|
||||
|
||||
Reference in New Issue
Block a user