[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Clang stack alignment on i386-gnu
From: |
Samuel Thibault |
Subject: |
Re: Clang stack alignment on i386-gnu |
Date: |
Sat, 4 Nov 2023 18:51:52 +0100 |
User-agent: |
NeoMutt/20170609 (1.8.3) |
Sergey Bugaev, le sam. 04 nov. 2023 20:25:13 +0300, a ecrit:
> This piece of code in Clang appears to be the culprit,
> but note that I'm entirely unfamiliar with the LLVM code base:
>
> // Stack alignment is 16 bytes on Darwin, Linux, kFreeBSD, NaCl, and for all
> // 64-bit targets. On Solaris (32-bit), stack alignment is 4 bytes
> // following the i386 psABI, while on Illumos it is always 16 bytes.
> if (StackAlignOverride)
> stackAlignment = *StackAlignOverride;
> else if (isTargetDarwin() || isTargetLinux() || isTargetKFreeBSD() ||
> isTargetNaCl() || Is64Bit)
> stackAlignment = Align(16);
That's a very probable culprit indeed. You can add an isTargetHurd
definition to llvm/lib/Target/X86/X86Subtarget.h, that calls isOSHurd(),
and add it to the if.
Samuel