util: fix msvc build

Fix msvc build regression after 0536b69133
reported by Prodea Alexandru-Liviu.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6137
Fixes: 0536b69133 ("util: fix build with clang 10 on mips64")
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15355>
(cherry picked from commit e50eb1ce7a)
This commit is contained in:
Jonathan Gray 2022-03-12 11:08:56 +11:00 committed by Dylan Baker
parent c457e5b793
commit ab468e1e0b
2 changed files with 3 additions and 2 deletions

View file

@ -436,7 +436,7 @@
"description": "util: fix msvc build",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "0536b691338f2759b850f9ec94634033a5d1f9e1"
},

View file

@ -256,10 +256,11 @@ debug_backtrace_capture(struct debug_stack_frame *backtrace,
const void **frame_pointer = ((const void **)__builtin_frame_address(1));
#pragma GCC diagnostic pop
#elif defined(PIPE_CC_MSVC)
const void **frame_pointer;
__asm {
mov frame_pointer, ebp
}
const void **frame_pointer = (const void **)frame_pointer[0];
frame_pointer = (const void **)frame_pointer[0];
#else
const void **frame_pointer = NULL;
#endif