Commit 7eb68c06 by Joseph Myers Committed by Joseph Myers

i386-opts.h: New.

	* config/i386/i386-opts.h: New.
	* gcc/config/i386/i386.c (stringop_alg, ix86_cmodel,
	ix86_asm_dialect, ix86_regparm, ix86_abi, ix86_branch_cost,
	ix86_section_threshold): Remove.
	(ix86_handle_option): Move MAX_CODE_ALIGN define here.  Handle
	OPT_malign_loops_, OPT_malign_jumps_, OPT_malign_functions_ and
	OPT_mbranch_cost_.
	(ix86_option_override_internal): Don't decode strings for options
	other than -march=, -mtune= and -mfpmath=.  Don't allow for
	__attribute__ uses in remaining diagnostics for options with
	string arguments.  Don't check for integer arguments being
	negative.
	* gcc/config/i386/i386.h (enum stringop_alg, enum calling_abi,
	enum tls_dialect, enum cmodel, enum asm_dialect): Move to
	i386-opts.h.
	(ix86_abi, ix86_tls_dialect, ix86_cmodel, ix86_asm_dialect,
	ix86_branch_cost, ix86_section_threshold): Remove.
	* gcc/config/i386/i386.opt (config/i386/i386-opts.h): New
	HeaderInclude.
	(malign-functions=, malign-jumps=, malign-loops=): Use UInteger
	but not Var.
	(masm=): Use Enum and Init.
	(asm_dialect): New Enum and EnumValue entries.
	(mbranch-cost=): Use UInteger.
	(mlarge-data-threshold=): Use UInteger and Init.
	(mcmodel=): Use Enum and Init.
	(cmodel): New Enum and EnumValue entries.
	(mpc): Replace with separate mpc32, mpc64 and mpc80 entries.
	(mpreferred-stack-boundary=, mincoming-stack-boundary=,
	mregparm=): Use UInteger.
	(mstringop-strategy=): Use Enum and Init.
	(stringop_alg): New Enum and EnumValue entries.
	(mtls-dialect=): Use Enum and Init.
	(tls_dialect): New Enum and EnumValue entries.
	(mabi=): Use Enum and Init.
	(calling_abi): New Enum and EnumValue entries.
	(mveclibabi=): Use Enum and Init.
	(ix86_veclibabi): New Enum and EnumValue entries.

From-SVN: r173728
parent f67e203c
2011-05-13 Joseph Myers <joseph@codesourcery.com>
* config/i386/i386-opts.h: New.
* gcc/config/i386/i386.c (stringop_alg, ix86_cmodel,
ix86_asm_dialect, ix86_regparm, ix86_abi, ix86_branch_cost,
ix86_section_threshold): Remove.
(ix86_handle_option): Move MAX_CODE_ALIGN define here. Handle
OPT_malign_loops_, OPT_malign_jumps_, OPT_malign_functions_ and
OPT_mbranch_cost_.
(ix86_option_override_internal): Don't decode strings for options
other than -march=, -mtune= and -mfpmath=. Don't allow for
__attribute__ uses in remaining diagnostics for options with
string arguments. Don't check for integer arguments being
negative.
* gcc/config/i386/i386.h (enum stringop_alg, enum calling_abi,
enum tls_dialect, enum cmodel, enum asm_dialect): Move to
i386-opts.h.
(ix86_abi, ix86_tls_dialect, ix86_cmodel, ix86_asm_dialect,
ix86_branch_cost, ix86_section_threshold): Remove.
* gcc/config/i386/i386.opt (config/i386/i386-opts.h): New
HeaderInclude.
(malign-functions=, malign-jumps=, malign-loops=): Use UInteger
but not Var.
(masm=): Use Enum and Init.
(asm_dialect): New Enum and EnumValue entries.
(mbranch-cost=): Use UInteger.
(mlarge-data-threshold=): Use UInteger and Init.
(mcmodel=): Use Enum and Init.
(cmodel): New Enum and EnumValue entries.
(mpc): Replace with separate mpc32, mpc64 and mpc80 entries.
(mpreferred-stack-boundary=, mincoming-stack-boundary=,
mregparm=): Use UInteger.
(mstringop-strategy=): Use Enum and Init.
(stringop_alg): New Enum and EnumValue entries.
(mtls-dialect=): Use Enum and Init.
(tls_dialect): New Enum and EnumValue entries.
(mabi=): Use Enum and Init.
(calling_abi): New Enum and EnumValue entries.
(mveclibabi=): Use Enum and Init.
(ix86_veclibabi): New Enum and EnumValue entries.
2011-05-13 Nick Clifton <nickc@redhat.com>
* config/rx/rx.md (mov expander): Fix use of
......
/* Definitions for option handling for IA-32.
Copyright (C) 1988, 1992, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
Free Software Foundation, Inc.
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3, or (at your option)
any later version.
GCC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
Under Section 7 of GPL version 3, you are granted additional
permissions described in the GCC Runtime Library Exception, version
3.1, as published by the Free Software Foundation.
You should have received a copy of the GNU General Public License and
a copy of the GCC Runtime Library Exception along with this program;
see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
<http://www.gnu.org/licenses/>. */
#ifndef I386_OPTS_H
#define I386_OPTS_H
/* Algorithm to expand string function with. */
enum stringop_alg
{
no_stringop,
libcall,
rep_prefix_1_byte,
rep_prefix_4_byte,
rep_prefix_8_byte,
loop_1_byte,
loop,
unrolled_loop
};
/* Available call abi. */
enum calling_abi
{
SYSV_ABI = 0,
MS_ABI = 1
};
enum tls_dialect
{
TLS_DIALECT_GNU,
TLS_DIALECT_GNU2,
TLS_DIALECT_SUN
};
enum cmodel {
CM_32, /* The traditional 32-bit ABI. */
CM_SMALL, /* Assumes all code and data fits in the low 31 bits. */
CM_KERNEL, /* Assumes all code and data fits in the high 31 bits. */
CM_MEDIUM, /* Assumes code fits in the low 31 bits; data unlimited. */
CM_LARGE, /* No assumptions. */
CM_SMALL_PIC, /* Assumes code+data+got/plt fits in a 31 bit region. */
CM_MEDIUM_PIC,/* Assumes code+got/plt fits in a 31 bit region. */
CM_LARGE_PIC /* No assumptions. */
};
enum asm_dialect {
ASM_ATT,
ASM_INTEL
};
enum ix86_veclibabi {
ix86_veclibabi_type_none,
ix86_veclibabi_type_svml,
ix86_veclibabi_type_acml
};
#endif
......@@ -79,18 +79,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#include "config/vxworks-dummy.h"
/* Algorithm to expand string function with. */
enum stringop_alg
{
no_stringop,
libcall,
rep_prefix_1_byte,
rep_prefix_4_byte,
rep_prefix_8_byte,
loop_1_byte,
loop,
unrolled_loop
};
#include "config/i386/i386-opts.h"
#define MAX_STRINGOP_ALGS 4
......@@ -506,16 +495,6 @@ extern tree x86_mfence;
/* This is re-defined by cygming.h. */
#define TARGET_SEH 0
/* Available call abi. */
enum calling_abi
{
SYSV_ABI = 0,
MS_ABI = 1
};
/* The abi used by target. */
extern enum calling_abi ix86_abi;
/* The default abi used by target. */
#define DEFAULT_ABI SYSV_ABI
......@@ -2058,42 +2037,13 @@ enum fpmath_unit
extern enum fpmath_unit ix86_fpmath;
enum tls_dialect
{
TLS_DIALECT_GNU,
TLS_DIALECT_GNU2,
TLS_DIALECT_SUN
};
extern enum tls_dialect ix86_tls_dialect;
enum cmodel {
CM_32, /* The traditional 32-bit ABI. */
CM_SMALL, /* Assumes all code and data fits in the low 31 bits. */
CM_KERNEL, /* Assumes all code and data fits in the high 31 bits. */
CM_MEDIUM, /* Assumes code fits in the low 31 bits; data unlimited. */
CM_LARGE, /* No assumptions. */
CM_SMALL_PIC, /* Assumes code+data+got/plt fits in a 31 bit region. */
CM_MEDIUM_PIC,/* Assumes code+got/plt fits in a 31 bit region. */
CM_LARGE_PIC /* No assumptions. */
};
extern enum cmodel ix86_cmodel;
/* Size of the RED_ZONE area. */
#define RED_ZONE_SIZE 128
/* Reserved area of the red zone for temporaries. */
#define RED_ZONE_RESERVE 8
enum asm_dialect {
ASM_ATT,
ASM_INTEL
};
extern enum asm_dialect ix86_asm_dialect;
extern unsigned int ix86_preferred_stack_boundary;
extern unsigned int ix86_incoming_stack_boundary;
extern int ix86_branch_cost, ix86_section_threshold;
/* Smallest class containing REGNO. */
extern enum reg_class const regclass_map[FIRST_PSEUDO_REGISTER];
......
......@@ -19,6 +19,9 @@
; along with GCC; see the file COPYING3. If not see
; <http://www.gnu.org/licenses/>.
HeaderInclude
config/i386/i386-opts.h
; Bit flags that specify the ISA we are compiling for.
Variable
int ix86_isa_flags = TARGET_64BIT_DEFAULT | TARGET_SUBTARGET_ISA_DEFAULT
......@@ -87,15 +90,15 @@ Target Report Mask(ALIGN_DOUBLE) Save
Align some doubles on dword boundary
malign-functions=
Target RejectNegative Joined Var(ix86_align_funcs_string)
Target RejectNegative Joined UInteger
Function starts are aligned to this power of 2
malign-jumps=
Target RejectNegative Joined Var(ix86_align_jumps_string)
Target RejectNegative Joined UInteger
Jump targets are aligned to this power of 2
malign-loops=
Target RejectNegative Joined Var(ix86_align_loops_string)
Target RejectNegative Joined UInteger
Loop code aligned to this power of 2
malign-stringops
......@@ -107,21 +110,50 @@ Target RejectNegative Joined Var(ix86_arch_string)
Generate code for given CPU
masm=
Target RejectNegative Joined Var(ix86_asm_string)
Target RejectNegative Joined Enum(asm_dialect) Var(ix86_asm_dialect) Init(ASM_ATT)
Use given assembler dialect
Enum
Name(asm_dialect) Type(enum asm_dialect)
Known assembler dialects (for use with the -masm-dialect= option):
EnumValue
Enum(asm_dialect) String(intel) Value(ASM_INTEL)
EnumValue
Enum(asm_dialect) String(att) Value(ASM_ATT)
mbranch-cost=
Target RejectNegative Joined Var(ix86_branch_cost_string)
Target RejectNegative Joined UInteger Var(ix86_branch_cost)
Branches are this expensive (1-5, arbitrary units)
mlarge-data-threshold=
Target RejectNegative Joined Var(ix86_section_threshold_string)
Target RejectNegative Joined UInteger Var(ix86_section_threshold) Init(65536)
Data greater than given threshold will go into .ldata section in x86-64 medium model
mcmodel=
Target RejectNegative Joined Var(ix86_cmodel_string)
Target RejectNegative Joined Enum(cmodel) Var(ix86_cmodel) Init(CM_32)
Use given x86-64 code model
Enum
Name(cmodel) Type(enum cmodel)
Known code models (for use with the -mcmodel= option):
EnumValue
Enum(cmodel) String(small) Value(CM_SMALL)
EnumValue
Enum(cmodel) String(medium) Value(CM_MEDIUM)
EnumValue
Enum(cmodel) String(large) Value(CM_LARGE)
EnumValue
Enum(cmodel) String(32) Value(CM_32)
EnumValue
Enum(cmodel) String(kernel) Value(CM_KERNEL)
mcpu=
Target RejectNegative Joined Undocumented Alias(mtune=) Warn(%<-mcpu=%> is deprecated; use %<-mtune=%> or %<-march=%> instead)
......@@ -181,16 +213,24 @@ momit-leaf-frame-pointer
Target Report Mask(OMIT_LEAF_FRAME_POINTER) Save
Omit the frame pointer in leaf functions
mpc
Target RejectNegative Report Joined Var(ix87_precision_string)
Set 80387 floating-point precision (-mpc32, -mpc64, -mpc80)
mpc32
Target RejectNegative Report
Set 80387 floating-point precision to 32-bit
mpc64
Target RejectNegative Report
Set 80387 floating-point precision to 64-bit
mpc80
Target RejectNegative Report
Set 80387 floating-point precision to 80-bit
mpreferred-stack-boundary=
Target RejectNegative Joined Var(ix86_preferred_stack_boundary_string)
Target RejectNegative Joined UInteger Var(ix86_preferred_stack_boundary_arg)
Attempt to keep stack aligned to this power of 2
mincoming-stack-boundary=
Target RejectNegative Joined Var(ix86_incoming_stack_boundary_string)
Target RejectNegative Joined UInteger Var(ix86_incoming_stack_boundary_arg)
Assume incoming stack aligned to this power of 2
mpush-args
......@@ -202,7 +242,7 @@ Target RejectNegative Report InverseMask(NO_RED_ZONE, RED_ZONE) Save
Use red-zone in the x86-64 code
mregparm=
Target RejectNegative Joined Var(ix86_regparm_string)
Target RejectNegative Joined UInteger Var(ix86_regparm)
Number of registers used to pass integer arguments
mrtd
......@@ -226,13 +266,48 @@ Target Report Mask(STACK_PROBE) Save
Enable stack probing
mstringop-strategy=
Target RejectNegative Joined Var(ix86_stringop_string)
Target RejectNegative Joined Enum(stringop_alg) Var(ix86_stringop_alg) Init(no_stringop)
Chose strategy to generate stringop using
Enum
Name(stringop_alg) Type(enum stringop_alg)
Valid arguments to -mstringop-strategy=:
EnumValue
Enum(stringop_alg) String(rep_byte) Value(rep_prefix_1_byte)
EnumValue
Enum(stringop_alg) String(libcall) Value(libcall)
EnumValue
Enum(stringop_alg) String(rep_4byte) Value(rep_prefix_4_byte)
EnumValue
Enum(stringop_alg) String(rep_8byte) Value(rep_prefix_8_byte)
EnumValue
Enum(stringop_alg) String(byte_loop) Value(loop_1_byte)
EnumValue
Enum(stringop_alg) String(loop) Value(loop)
EnumValue
Enum(stringop_alg) String(unrolled_loop) Value(unrolled_loop)
mtls-dialect=
Target RejectNegative Joined Var(ix86_tls_dialect_string)
Target RejectNegative Joined Var(ix86_tls_dialect) Enum(tls_dialect) Init(TLS_DIALECT_GNU)
Use given thread-local storage dialect
Enum
Name(tls_dialect) Type(enum tls_dialect)
Known TLS dialects (for use with the -mtls-dialect= option):
EnumValue
Enum(tls_dialect) String(gnu) Value(TLS_DIALECT_GNU)
EnumValue
Enum(tls_dialect) String(gnu2) Value(TLS_DIALECT_GNU2)
mtls-direct-seg-refs
Target Report Mask(TLS_DIRECT_SEG_REFS)
Use direct references against %gs when accessing tls data
......@@ -242,13 +317,33 @@ Target RejectNegative Joined Var(ix86_tune_string)
Schedule code for given CPU
mabi=
Target RejectNegative Joined Var(ix86_abi_string)
Target RejectNegative Joined Var(ix86_abi) Enum(calling_abi) Init(SYSV_ABI)
Generate code that conforms to the given ABI
Enum
Name(calling_abi) Type(enum calling_abi)
Known ABIs (for use with the -mabi= option):
EnumValue
Enum(calling_abi) String(sysv) Value(SYSV_ABI)
EnumValue
Enum(calling_abi) String(ms) Value(MS_ABI)
mveclibabi=
Target RejectNegative Joined Var(ix86_veclibabi_string)
Target RejectNegative Joined Var(ix86_veclibabi_type) Enum(ix86_veclibabi) Init(ix86_veclibabi_type_none)
Vector library ABI to use
Enum
Name(ix86_veclibabi) Type(enum ix86_veclibabi)
Known vectorization library ABIs (for use with the -mveclibabi= option):
EnumValue
Enum(ix86_veclibabi) String(svml) Value(ix86_veclibabi_type_svml)
EnumValue
Enum(ix86_veclibabi) String(acml) Value(ix86_veclibabi_type_acml)
mvect8-ret-in-mem
Target Report Mask(VECT8_RETURNS) Save
Return 8-byte vectors in memory
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment