Merge branch 'stack_args' into controller_pak

This commit is contained in:
Garrett Smith 2026-01-18 22:50:58 -08:00
commit f6d0a28df0

View file

@ -39,7 +39,7 @@ T _arg(uint8_t* rdram, recomp_context* ctx) requires(index < 4) {
template<int index, typename T>
T _arg(uint8_t* rdram, recomp_context* ctx) requires(index >= 4) {
const auto raw_arg = MEM_W(0x10 + index * 4, ctx->r29);
const auto raw_arg = MEM_W(index * 4, ctx->r29);
if constexpr (std::is_pointer_v<T>) {
static_assert (!std::is_pointer_v<std::remove_pointer_t<T>>, "Double pointers not supported");
return TO_PTR(std::remove_pointer_t<T>, raw_arg);