mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2024-11-08 13:11:49 +00:00
util: prevent optimizer from removing endian-swapped writes
This commit is contained in:
parent
187745abd5
commit
7557b7eb92
1 changed files with 2 additions and 2 deletions
|
@ -144,12 +144,12 @@ namespace ams::util {
|
|||
|
||||
template<std::integral T>
|
||||
constexpr ALWAYS_INLINE void StoreBigEndian(T *ptr, T val) {
|
||||
*ptr = ConvertToBigEndian<T>(val);
|
||||
*static_cast<volatile T *>(ptr) = ConvertToBigEndian<T>(val);
|
||||
}
|
||||
|
||||
template<std::integral T>
|
||||
constexpr ALWAYS_INLINE void StoreLittleEndian(T *ptr, T val) {
|
||||
*ptr = ConvertToLittleEndian<T>(val);
|
||||
*static_cast<volatile T *>(ptr) = ConvertToLittleEndian<T>(val);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue