8186780: clang fastdebug assertion failure in os_linux_x86:os::verify_stack_alignment()

Reviewed-by: jiangli
This commit is contained in:
Martin Buchholz 2020-03-31 14:15:44 -07:00
parent 8cb3cc01f1
commit 6d44ff7d93

View file

@ -98,13 +98,8 @@ address os::current_stack_pointer() {
void *esp; void *esp;
__asm__("mov %%" SPELL_REG_SP ", %0":"=r"(esp)); __asm__("mov %%" SPELL_REG_SP ", %0":"=r"(esp));
return (address) ((char*)esp + sizeof(long)*2); return (address) ((char*)esp + sizeof(long)*2);
#elif defined(__clang__)
void* esp;
__asm__ __volatile__ ("mov %%" SPELL_REG_SP ", %0":"=r"(esp):);
return (address) esp;
#else #else
register void *esp __asm__ (SPELL_REG_SP); return (address)__builtin_frame_address(0);
return (address) esp;
#endif #endif
} }