vm_var.h: Ensure 16-bytes alignment of gvar

Some PPU instructions require memory to be aligned otherwise they produce different results. I've already seen their usage in cellSaveData disassembly so may as well ensure it for all.
This commit is contained in:
Eladash 2022-06-05 21:24:16 +03:00 committed by Megamouse
parent f1b03b36f7
commit 16381929ba
1 changed files with 1 additions and 1 deletions

View File

@ -172,7 +172,7 @@ namespace vm
struct gvar final : ptr<T>
{
static constexpr u32 alloc_size{sizeof(T) * Count};
static constexpr u32 alloc_align{alignof(T)};
static constexpr u32 alloc_align{std::max<u32>(alignof(T), 16)};
};
} // namespace ps3_
} // namespace vm