[cfe-dev] Is force_align_arg_pointer function attribute supported at x86?

Anatol Pomozov via cfe-dev cfe-dev at lists.llvm.org
Wed Jun 21 13:30:30 PDT 2017


Hello

I am trying to compile an x86 operation system at Arch Linux. I need
to align the function stack to make SSE working. There is a function
attribute __attribute__((force_align_arg_pointer)) that works great
with gcc 7.x.

But when I compile my sources with following command line it complains
that force_align_arg_pointer is unknown. Looking at generated ASM I
see that stack alignment is not enorced.


clang -c start_64.c -o start_64.o -g -ggdb -nostdlib -ffreestanding
-std=c11 -fno-stack-protector -mno-red-zone -fno-common -W -Wall
-Wextra -O3 -I../../include
start_64.c:12:25: warning: unknown attribute 'force_align_arg_pointer'
ignored [-Wunknown-attributes]
NORETURN __attribute__((force_align_arg_pointer)) void start_64(void) {
                        ^
1 warning generated.

Here is my clang:

$ clang --version
clang version 4.0.0 (tags/RELEASE_400/final)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/bin

Is there special command line key that enables force_align_arg_pointer
attribute?



More information about the cfe-dev mailing list