summaryrefslogtreecommitdiffstats
path: root/arch/x86/Makefile
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@linux.intel.com>2010-10-14 01:00:29 +0200
committerH. Peter Anvin <hpa@linux.intel.com>2010-10-14 01:00:29 +0200
commitd7acb92fea932ad2e7846480aeacddc2c03c8485 (patch)
tree21675108634aff8885cb881a476acf7146191b87 /arch/x86/Makefile
parenti386: Make kernel_execve() suitable for stack unwinding (diff)
downloadlinux-d7acb92fea932ad2e7846480aeacddc2c03c8485.tar.xz
linux-d7acb92fea932ad2e7846480aeacddc2c03c8485.zip
x86-64, asm: If the assembler supports fxsave64, use it
Kbuild allows for us to probe for the existence of specific constructs in the assembler, use them to find out if we can use fxsave64 and permit the compiler to generate better code. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'arch/x86/Makefile')
-rw-r--r--arch/x86/Makefile8
1 files changed, 6 insertions, 2 deletions
diff --git a/arch/x86/Makefile b/arch/x86/Makefile
index 8aa1b59b9074..40668a96ca0c 100644
--- a/arch/x86/Makefile
+++ b/arch/x86/Makefile
@@ -96,8 +96,12 @@ cfi := $(call as-instr,.cfi_startproc\n.cfi_rel_offset $(sp-y)$(comma)0\n.cfi_en
# is .cfi_signal_frame supported too?
cfi-sigframe := $(call as-instr,.cfi_startproc\n.cfi_signal_frame\n.cfi_endproc,-DCONFIG_AS_CFI_SIGNAL_FRAME=1)
cfi-sections := $(call as-instr,.cfi_sections .debug_frame,-DCONFIG_AS_CFI_SECTIONS=1)
-KBUILD_AFLAGS += $(cfi) $(cfi-sigframe) $(cfi-sections)
-KBUILD_CFLAGS += $(cfi) $(cfi-sigframe) $(cfi-sections)
+
+# does binutils support specific instructions?
+asinstr := $(call as-instr,fxsaveq (%rax),-DCONFIG_AS_FXSAVEQ=1)
+
+KBUILD_AFLAGS += $(cfi) $(cfi-sigframe) $(cfi-sections) $(asinstr)
+KBUILD_CFLAGS += $(cfi) $(cfi-sigframe) $(cfi-sections) $(asinstr)
LDFLAGS := -m elf_$(UTS_MACHINE)