att.h (ASM_FILE_START): Use asm_dialect.
* att.h (ASM_FILE_START): Use asm_dialect. * linux.h (ASM_FILE_START): Likewise. * gas.h (ASM_FILE_START): Likewise. * i386.c (ix86_debug_arg_string, ix86_debug_addr_string, ix86_asm_string, ix86_asm_dialect): New. (override_options): Set asm_dialect. * i386.h (MASK_MIX_SSE_I387, MASK_INTEL_SYNTAX, MASK_DEBUG_ARG, MASK_DEBUG_ADDR): Kill. (MASK_64BIT, MASK_NO_RED_ZONE): renumber. (TARGET_DEBUG_ADDR, TARGET_DEBUG_ARG): Use string. (ASSEMBLER_DIALECT): Use asm_dialect. (TARGET_SWITCHES): Undocument deprecated items; deprecate intel-syntax; remove debug-addr and debug-arg. (TARGET_OPTIONS): Add debug-arg, debug-addr, asm. (asm_dialect): New enum. (ix86_debug_arg_string, ix86_debug_addr_string, ix86_asm_string, ix86_asm_dialect): Declare. * invoke.texi (-mintel-syntax): Remove. (-masm): Document. From-SVN: r48160
This commit is contained in:
parent
114e78f8f0
commit
c93e80a5d0
7 changed files with 75 additions and 30 deletions
|
@ -1,3 +1,25 @@
|
|||
Tue Dec 18 16:39:46 CET 2001 Jan Hubicka <jh@suse.cz>
|
||||
|
||||
* att.h (ASM_FILE_START): Use asm_dialect.
|
||||
* linux.h (ASM_FILE_START): Likewise.
|
||||
* gas.h (ASM_FILE_START): Likewise.
|
||||
* i386.c (ix86_debug_arg_string, ix86_debug_addr_string,
|
||||
ix86_asm_string, ix86_asm_dialect): New.
|
||||
(override_options): Set asm_dialect.
|
||||
* i386.h (MASK_MIX_SSE_I387, MASK_INTEL_SYNTAX, MASK_DEBUG_ARG,
|
||||
MASK_DEBUG_ADDR): Kill.
|
||||
(MASK_64BIT, MASK_NO_RED_ZONE): renumber.
|
||||
(TARGET_DEBUG_ADDR, TARGET_DEBUG_ARG): Use string.
|
||||
(ASSEMBLER_DIALECT): Use asm_dialect.
|
||||
(TARGET_SWITCHES): Undocument deprecated items; deprecate intel-syntax;
|
||||
remove debug-addr and debug-arg.
|
||||
(TARGET_OPTIONS): Add debug-arg, debug-addr, asm.
|
||||
(asm_dialect): New enum.
|
||||
(ix86_debug_arg_string, ix86_debug_addr_string,
|
||||
ix86_asm_string, ix86_asm_dialect): Declare.
|
||||
* invoke.texi (-mintel-syntax): Remove.
|
||||
(-masm): Document.
|
||||
|
||||
Tue Dec 18 16:37:42 CET 2001 Jan Hubicka <jh@suse.cz>
|
||||
|
||||
* libgcc2.c (__bb_exit_func): Kill -ax dumping code.
|
||||
|
|
|
@ -53,7 +53,7 @@ do \
|
|||
#define ASM_FILE_START(FILE) \
|
||||
do { \
|
||||
output_file_directive (FILE, main_input_filename); \
|
||||
if (target_flags & MASK_INTEL_SYNTAX) \
|
||||
if (ix86_asm_dialect == ASM_INTEL) \
|
||||
fputs ("\t.intel_syntax\n", FILE); \
|
||||
} while (0)
|
||||
|
||||
|
|
|
@ -166,7 +166,7 @@ Boston, MA 02111-1307, USA. */
|
|||
#undef ASM_FILE_START
|
||||
#define ASM_FILE_START(FILE) \
|
||||
do { \
|
||||
if (target_flags & MASK_INTEL_SYNTAX) \
|
||||
if (ix86_asm_dialect == ASM_INTEL) \
|
||||
fputs ("\t.intel_syntax\n", FILE); \
|
||||
output_file_directive (FILE, main_input_filename); \
|
||||
} while (0)
|
||||
|
|
|
@ -586,8 +586,13 @@ struct ix86_frame
|
|||
HOST_WIDE_INT stack_pointer_offset;
|
||||
};
|
||||
|
||||
/* Used to enable/disable debugging features. */
|
||||
const char *ix86_debug_arg_string, *ix86_debug_addr_string;
|
||||
/* Code model option as passed by user. */
|
||||
const char *ix86_cmodel_string;
|
||||
/* Asm dialect. */
|
||||
const char *ix86_asm_string;
|
||||
enum cmodel ix86_asm_dialect = ASM_ATT;
|
||||
/* Parsed value. */
|
||||
enum cmodel ix86_cmodel;
|
||||
|
||||
|
@ -931,6 +936,15 @@ override_options ()
|
|||
if (TARGET_64BIT)
|
||||
ix86_cmodel = flag_pic ? CM_SMALL_PIC : CM_SMALL;
|
||||
}
|
||||
if (ix86_asm_string != 0)
|
||||
{
|
||||
if (!strcmp (ix86_asm_string, "intel"))
|
||||
ix86_asm_dialect = ASM_INTEL;
|
||||
else if (!strcmp (ix86_asm_string, "att"))
|
||||
ix86_asm_dialect = ASM_ATT;
|
||||
else
|
||||
error ("bad value (%s) for -masm= switch", ix86_asm_string);
|
||||
}
|
||||
if ((TARGET_64BIT == 0) != (ix86_cmodel == CM_32))
|
||||
error ("code model `%s' not supported in the %s bit mode",
|
||||
ix86_cmodel_string, TARGET_64BIT ? "64" : "32");
|
||||
|
|
|
@ -131,14 +131,9 @@ extern int target_flags;
|
|||
#define MASK_3DNOW_A 0x00400000 /* Support Athlon 3Dnow builtins */
|
||||
#define MASK_3DNOW_A_SET 0x00800000
|
||||
#define MASK_128BIT_LONG_DOUBLE 0x01000000 /* long double size is 128bit */
|
||||
#define MASK_MIX_SSE_I387 0x02000000 /* Mix SSE and i387 instructions */
|
||||
#define MASK_64BIT 0x04000000 /* Produce 64bit code */
|
||||
#define MASK_NO_RED_ZONE 0x08000000 /* Do not use red zone */
|
||||
|
||||
/* Temporary codegen switches */
|
||||
#define MASK_INTEL_SYNTAX 0x10000000
|
||||
#define MASK_DEBUG_ARG 0x20000000 /* function_arg */
|
||||
#define MASK_DEBUG_ADDR 0x40000000 /* GO_IF_LEGITIMATE_ADDRESS */
|
||||
#define MASK_64BIT 0x02000000 /* Produce 64bit code */
|
||||
/* ... overlap with subtarget options starts by 0x04000000. */
|
||||
#define MASK_NO_RED_ZONE 0x04000000 /* Do not use red zone */
|
||||
|
||||
/* Use the floating point instructions */
|
||||
#define TARGET_80387 (target_flags & MASK_80387)
|
||||
|
@ -188,10 +183,10 @@ extern int target_flags;
|
|||
(target_flags & MASK_OMIT_LEAF_FRAME_POINTER)
|
||||
|
||||
/* Debug GO_IF_LEGITIMATE_ADDRESS */
|
||||
#define TARGET_DEBUG_ADDR (target_flags & MASK_DEBUG_ADDR)
|
||||
#define TARGET_DEBUG_ADDR (ix86_debug_addr_string != 0)
|
||||
|
||||
/* Debug FUNCTION_ARG macros */
|
||||
#define TARGET_DEBUG_ARG (target_flags & MASK_DEBUG_ARG)
|
||||
#define TARGET_DEBUG_ARG (ix86_debug_arg_string != 0)
|
||||
|
||||
/* 64bit Sledgehammer mode */
|
||||
#ifdef TARGET_BI_ARCH
|
||||
|
@ -273,7 +268,7 @@ extern int x86_prefetch_sse;
|
|||
#define TARGET_ALIGN_STRINGOPS (!(target_flags & MASK_NO_ALIGN_STROPS))
|
||||
#define TARGET_INLINE_ALL_STRINGOPS (target_flags & MASK_INLINE_ALL_STROPS)
|
||||
|
||||
#define ASSEMBLER_DIALECT ((target_flags & MASK_INTEL_SYNTAX) != 0)
|
||||
#define ASSEMBLER_DIALECT (ix86_asm_dialect)
|
||||
|
||||
#define TARGET_SSE ((target_flags & (MASK_SSE | MASK_SSE2)) != 0)
|
||||
#define TARGET_SSE2 ((target_flags & MASK_SSE2) != 0)
|
||||
|
@ -292,10 +287,12 @@ extern int x86_prefetch_sse;
|
|||
{ "hard-float", MASK_80387, N_("Use hardware fp") }, \
|
||||
{ "soft-float", -MASK_80387, N_("Do not use hardware fp") }, \
|
||||
{ "no-soft-float", MASK_80387, N_("Use hardware fp") }, \
|
||||
{ "386", 0, N_("Same as -mcpu=i386") }, \
|
||||
{ "486", 0, N_("Same as -mcpu=i486") }, \
|
||||
{ "pentium", 0, N_("Same as -mcpu=pentium") }, \
|
||||
{ "pentiumpro", 0, N_("Same as -mcpu=pentiumpro") }, \
|
||||
{ "386", 0, N_("") /*Deprecated.*/}, \
|
||||
{ "486", 0, N_("") /*Deprecated.*/}, \
|
||||
{ "pentium", 0, N_("") /*Deprecated.*/}, \
|
||||
{ "pentiumpro", 0, N_("") /*Deprecated.*/}, \
|
||||
{ "intel-syntax", 0, N_("") /*Deprecated.*/}, \
|
||||
{ "no-intel-syntax", 0, N_("") /*Deprecated.*/}, \
|
||||
{ "rtd", MASK_RTD, \
|
||||
N_("Alternate calling convention") }, \
|
||||
{ "no-rtd", -MASK_RTD, \
|
||||
|
@ -323,18 +320,11 @@ extern int x86_prefetch_sse;
|
|||
{ "omit-leaf-frame-pointer", MASK_OMIT_LEAF_FRAME_POINTER, \
|
||||
N_("Omit the frame pointer in leaf functions") }, \
|
||||
{ "no-omit-leaf-frame-pointer",-MASK_OMIT_LEAF_FRAME_POINTER, "" }, \
|
||||
{ "debug-addr", MASK_DEBUG_ADDR, 0 /* undocumented */ }, \
|
||||
{ "no-debug-addr", -MASK_DEBUG_ADDR, 0 /* undocumented */ }, \
|
||||
{ "debug-arg", MASK_DEBUG_ARG, 0 /* undocumented */ }, \
|
||||
{ "no-debug-arg", -MASK_DEBUG_ARG, 0 /* undocumented */ }, \
|
||||
{ "stack-arg-probe", MASK_STACK_PROBE, \
|
||||
N_("Enable stack probing") }, \
|
||||
{ "no-stack-arg-probe", -MASK_STACK_PROBE, "" }, \
|
||||
{ "windows", 0, 0 /* undocumented */ }, \
|
||||
{ "dll", 0, 0 /* undocumented */ }, \
|
||||
{ "intel-syntax", MASK_INTEL_SYNTAX, \
|
||||
N_("Emit Intel syntax assembler opcodes") }, \
|
||||
{ "no-intel-syntax", -MASK_INTEL_SYNTAX, "" }, \
|
||||
{ "align-stringops", -MASK_NO_ALIGN_STROPS, \
|
||||
N_("Align destination of the string operations") }, \
|
||||
{ "no-align-stringops", MASK_NO_ALIGN_STROPS, \
|
||||
|
@ -449,6 +439,12 @@ extern int ix86_arch;
|
|||
N_("Branches are this expensive (1-5, arbitrary units)") }, \
|
||||
{ "cmodel=", &ix86_cmodel_string, \
|
||||
N_("Use given x86-64 code model") }, \
|
||||
{ "debug-arg", &ix86_debug_arg_string, \
|
||||
N_("" /* Undocumented. */) }, \
|
||||
{ "debug-addr", &ix86_debug_addr_string, \
|
||||
N_("" /* Undocumented. */) }, \
|
||||
{ "asm=", &ix86_asm_string, \
|
||||
N_("Use given assembler dialect") }, \
|
||||
SUBTARGET_OPTIONS \
|
||||
}
|
||||
|
||||
|
@ -482,7 +478,11 @@ extern int ix86_arch;
|
|||
%{mpentium:-mcpu=pentium \
|
||||
%n`-mpentium' is deprecated. Use `-march=pentium' or `-mcpu=pentium' instead.\n} \
|
||||
%{mpentiumpro:-mcpu=pentiumpro \
|
||||
%n`-mpentiumpro' is deprecated. Use `-march=pentiumpro' or `-mcpu=pentiumpro' instead.\n}}"
|
||||
%n`-mpentiumpro' is deprecated. Use `-march=pentiumpro' or `-mcpu=pentiumpro' instead.\n}} \
|
||||
%{mintel-syntax:-masm=intel \
|
||||
%n`-mintel-syntax' is deprecated. Use `-masm=intel' instead.\n} \
|
||||
%{mno-intel-syntax:-masm=att \
|
||||
%n`-mno-intel-syntax' is deprecated. Use `-masm=att' instead.\n}"
|
||||
#endif
|
||||
|
||||
#define TARGET_CPU_DEFAULT_i386 0
|
||||
|
@ -3138,6 +3138,14 @@ enum cmodel {
|
|||
#define RED_ZONE_SIZE 128
|
||||
/* Reserved area of the red zone for temporaries. */
|
||||
#define RED_ZONE_RESERVE 8
|
||||
extern const char *ix86_debug_arg_string, *ix86_debug_addr_string;
|
||||
|
||||
enum asm_dialect {
|
||||
ASM_ATT,
|
||||
ASM_INTEL
|
||||
};
|
||||
extern const char *ix86_asm_string;
|
||||
extern enum cmodel ix86_asm_dialect;
|
||||
/* Valud of -mcmodel specified by user. */
|
||||
extern const char *ix86_cmodel_string;
|
||||
extern enum cmodel ix86_cmodel;
|
||||
|
|
|
@ -28,7 +28,7 @@ Boston, MA 02111-1307, USA. */
|
|||
#define ASM_FILE_START(FILE) \
|
||||
do { \
|
||||
output_file_directive (FILE, main_input_filename); \
|
||||
if (target_flags & MASK_INTEL_SYNTAX) \
|
||||
if (ix86_asm_dialect == ASM_INTEL) \
|
||||
fputs ("\t.intel_syntax\n", FILE); \
|
||||
} while (0)
|
||||
|
||||
|
|
|
@ -474,7 +474,7 @@ in the following sections.
|
|||
@emph{i386 and x86-64 Options}
|
||||
@gccoptlist{
|
||||
-mcpu=@var{cpu-type} -march=@var{cpu-type} -mfpmath=@var{unit} @gol
|
||||
-mintel-syntax -mieee-fp -mno-fancy-math-387 @gol
|
||||
-masm=@var{dialect} -mno-fancy-math-387 @gol
|
||||
-mno-fp-ret-in-387 -msoft-float -msvr3-shlib @gol
|
||||
-mno-wide-multiply -mrtd -malign-double @gol
|
||||
-mpreferred-stack-boundary=@var{num} @gol
|
||||
|
@ -7534,9 +7534,10 @@ still experimental, because gcc register allocator does not model separate
|
|||
functional units well resulting in instable performance.
|
||||
@end table
|
||||
|
||||
@item -mintel-syntax
|
||||
@opindex mintel-syntax
|
||||
Emit assembly using Intel syntax opcodes instead of AT&T syntax.
|
||||
@item -masm=@var{dialect}
|
||||
@opindex masm=@var{dialect}
|
||||
Output asm instructions using selected @var{dialect}. Supported choices are
|
||||
@samp{intel} or @samp{att} (the default one).
|
||||
|
||||
@item -mieee-fp
|
||||
@itemx -mno-ieee-fp
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue