File tree Expand file tree Collapse file tree 2 files changed +14
-13
lines changed Expand file tree Collapse file tree 2 files changed +14
-13
lines changed Original file line number Diff line number Diff line change @@ -935,18 +935,6 @@ uint32_t PCSX::Memory::msanRealloc(uint32_t ptr, uint32_t size) {
935
935
return newPtr + c_msanStart;
936
936
}
937
937
938
- bool PCSX::Memory::msanValidateWrite (uint32_t addr, uint32_t size) {
939
- uint32_t msanAddr = addr - c_msanStart;
940
- if (!(m_msanUsableBitmap[msanAddr / 8 ] & (1 << msanAddr % 8 ))) {
941
- return false ;
942
- }
943
- for (uint32_t checkAddr = msanAddr; checkAddr < msanAddr + size; checkAddr++) {
944
- m_msanWrittenBitmap[checkAddr / 8 ] |= 1 << checkAddr % 8 ;
945
- }
946
- [[likely]];
947
- return true ;
948
- }
949
-
950
938
uint32_t PCSX::Memory::msanSetChainPtr (uint32_t headerAddr, uint32_t nextPtr, uint32_t wordCount) {
951
939
if (!inMsanRange (headerAddr)) {
952
940
headerAddr &= 0xffffff ;
Original file line number Diff line number Diff line change @@ -90,9 +90,11 @@ class Memory {
90
90
uint32_t msanRealloc (uint32_t ptr, uint32_t size);
91
91
uint32_t msanSetChainPtr (uint32_t headerAddr, uint32_t ptrToNext, uint32_t size);
92
92
uint32_t msanGetChainPtr (uint32_t addr) const ;
93
+
93
94
inline MsanStatus msanGetStatus (uint32_t addr, uint32_t size) const {
94
95
uint32_t msanAddr = addr - c_msanStart;
95
96
if (!(m_msanUsableBitmap[msanAddr / 8 ] & (1 << msanAddr % 8 ))) {
97
+ [[unlikely]];
96
98
return MsanStatus::UNUSABLE;
97
99
}
98
100
for (uint32_t checkAddr = msanAddr; checkAddr < msanAddr + size; checkAddr++) {
@@ -102,7 +104,18 @@ class Memory {
102
104
}
103
105
return MsanStatus::OK;
104
106
}
105
- bool msanValidateWrite (uint32_t addr, uint32_t size);
107
+
108
+ inline bool msanValidateWrite (uint32_t addr, uint32_t size) {
109
+ uint32_t msanAddr = addr - c_msanStart;
110
+ if (!(m_msanUsableBitmap[msanAddr / 8 ] & (1 << msanAddr % 8 ))) {
111
+ [[unlikely]];
112
+ return false ;
113
+ }
114
+ for (uint32_t checkAddr = msanAddr; checkAddr < msanAddr + size; checkAddr++) {
115
+ m_msanWrittenBitmap[checkAddr / 8 ] |= 1 << checkAddr % 8 ;
116
+ }
117
+ return true ;
118
+ }
106
119
107
120
static inline bool inMsanRange (uint32_t addr) {
108
121
return addr >= c_msanStart && addr < c_msanEnd;
You can’t perform that action at this time.
0 commit comments