power64: refactor va_arg in u.h to fix warnings

Bring over conventions from other archs.
This issue shows up when you don't put va_end,
which our systemcall handlers are guilty of.
This commit is contained in:
Jacob Moody 2024-05-12 00:26:37 +00:00
parent 025a2d172e
commit b0a0595371

View file

@ -84,9 +84,9 @@ typedef char* va_list;
USED(list)
#define va_arg(list, mode)\
((sizeof(mode) == 1)?\
((mode*)(list += 8))[-1]:\
((list += 8), (mode*)list)[-1]:\
(sizeof(mode) == 2)?\
((mode*)(list += 8))[-1]:\
((list += 8), (mode*)list)[-1]:\
(sizeof(mode) == 4)?\
((mode*)(list += 8))[-1]:\
((mode*)(list += sizeof(mode)))[-1])
((list += 8), (mode*)list)[-1]:\
((list += sizeof(mode)), (mode*)list)[-1])