]> gcc.gnu.org Git - gcc.git/commit
Add -mgeneral-regs-only option
authorH.J. Lu <hongjiu.lu@intel.com>
Fri, 20 May 2016 16:06:39 +0000 (16:06 +0000)
committerH.J. Lu <hjl@gcc.gnu.org>
Fri, 20 May 2016 16:06:39 +0000 (09:06 -0700)
commitce3a16ff1f59e6dbf9aa128ede0138927cceee38
tree66d8f41cf7b0bd89915e0be9d9f0bf8baf44ebc9
parent92466115766cbe8b053694bc1974f5b5653f7cda
Add -mgeneral-regs-only option

X86 Linux kernel is compiled only with integer instructions.  Currently,

-mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -mno-80387
-mno-fp-ret-in-387  -mskip-rax-setup

is used to compile kernel.  If we add another non-integer feature, it
has to be turned off.  We can add a -mgeneral-regs-only option, similar
to AArch64, to disable all non-integer features so that kernel doesn't
need a long list and the same option will work for future compilers.
It can also be used to compile interrupt handler.

gcc/

PR target/70738
* common/config/i386/i386-common.c
(OPTION_MASK_ISA_GENERAL_REGS_ONLY_UNSET): New.
(ix86_handle_option): Disable MPX, MMX, SSE and x87 instructions
for -mgeneral-regs-only.
* config/i386/i386.c (ix86_option_override_internal): Don't
enable x87 instructions if only the general registers are
allowed.
* config/i386/i386.opt: Add -mgeneral-regs-only.
* doc/invoke.texi: Document -mgeneral-regs-only.

gcc/testsuite/

PR target/70738
* gcc.target/i386/pr70738-1.c: Likewise.
* gcc.target/i386/pr70738-2.c: Likewise.
* gcc.target/i386/pr70738-3.c: Likewise.
* gcc.target/i386/pr70738-4.c: Likewise.
* gcc.target/i386/pr70738-5.c: Likewise.
* gcc.target/i386/pr70738-6.c: Likewise.
* gcc.target/i386/pr70738-7.c: Likewise.
* gcc.target/i386/pr70738-8.c: Likewise.
* gcc.target/i386/pr70738-9.c: Likewise.

From-SVN: r236520
15 files changed:
gcc/ChangeLog
gcc/common/config/i386/i386-common.c
gcc/config/i386/i386.c
gcc/config/i386/i386.opt
gcc/doc/invoke.texi
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/i386/pr70738-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/pr70738-2.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/pr70738-3.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/pr70738-4.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/pr70738-5.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/pr70738-6.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/pr70738-7.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/pr70738-8.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/pr70738-9.c [new file with mode: 0644]
This page took 0.07292 seconds and 5 git commands to generate.