tm.texi (169690) | tm.texi (220755) |
---|---|
1@c Copyright (C) 1988,1989,1992,1993,1994,1995,1996,1997,1998,1999,2000,2001, 2@c 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 3@c This is part of the GCC manual. 4@c For copying conditions, see the file gcc.texi. 5 6@node Target Macros 7@chapter Target Description Macros and Functions 8@cindex machine description macros --- 686 unchanged lines hidden (view full) --- 695with two leading and trailing underscores, and defines the original 696only if an ISO standard was not requested on the command line. For 697example, passing @code{unix} defines @code{__unix}, @code{__unix__} 698and possibly @code{unix}; passing @code{_mips} defines @code{__mips}, 699@code{__mips__} and possibly @code{_mips}, and passing @code{_ABI64} 700defines only @code{_ABI64}. 701 702You can also test for the C dialect being compiled. The variable | 1@c Copyright (C) 1988,1989,1992,1993,1994,1995,1996,1997,1998,1999,2000,2001, 2@c 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 3@c This is part of the GCC manual. 4@c For copying conditions, see the file gcc.texi. 5 6@node Target Macros 7@chapter Target Description Macros and Functions 8@cindex machine description macros --- 686 unchanged lines hidden (view full) --- 695with two leading and trailing underscores, and defines the original 696only if an ISO standard was not requested on the command line. For 697example, passing @code{unix} defines @code{__unix}, @code{__unix__} 698and possibly @code{unix}; passing @code{_mips} defines @code{__mips}, 699@code{__mips__} and possibly @code{_mips}, and passing @code{_ABI64} 700defines only @code{_ABI64}. 701 702You can also test for the C dialect being compiled. The variable |
703@code{c_language} is set to one of @code{clk_c}, @code{clk_cplusplus} 704or @code{clk_objective_c}. Note that if we are preprocessing 705assembler, this variable will be @code{clk_c} but the function-like 706macro @code{preprocessing_asm_p()} will return true, so you might want 707to check for that first. If you need to check for strict ANSI, the | 703@code{c_language} is set to one of @code{clk_c} or 704@code{clk_cplusplus}. Note that if we are preprocessing assembler, 705this variable will be @code{clk_c} but the function-like macro 706@code{preprocessing_asm_p()} will return true, so you might want to 707check for that first. If you need to check for strict ANSI, the |
708variable @code{flag_iso} can be used. The function-like macro 709@code{preprocessing_trad_p()} can be used to check for traditional 710preprocessing. 711@end defmac 712 713@defmac TARGET_OS_CPP_BUILTINS () 714Similarly to @code{TARGET_CPU_CPP_BUILTINS} but this macro is optional 715and is used for the target operating system instead. --- 60 unchanged lines hidden (view full) --- 776parsed. 777 778Don't use this macro to turn on various extra optimizations for 779@option{-O}. That is what @code{OPTIMIZATION_OPTIONS} is for. 780@end defmac 781 782@defmac C_COMMON_OVERRIDE_OPTIONS 783This is similar to @code{OVERRIDE_OPTIONS} but is only used in the C | 708variable @code{flag_iso} can be used. The function-like macro 709@code{preprocessing_trad_p()} can be used to check for traditional 710preprocessing. 711@end defmac 712 713@defmac TARGET_OS_CPP_BUILTINS () 714Similarly to @code{TARGET_CPU_CPP_BUILTINS} but this macro is optional 715and is used for the target operating system instead. --- 60 unchanged lines hidden (view full) --- 776parsed. 777 778Don't use this macro to turn on various extra optimizations for 779@option{-O}. That is what @code{OPTIMIZATION_OPTIONS} is for. 780@end defmac 781 782@defmac C_COMMON_OVERRIDE_OPTIONS 783This is similar to @code{OVERRIDE_OPTIONS} but is only used in the C |
784language frontends (C, Objective-C, C++, Objective-C++) and so can be 785used to alter option flag variables which only exist in those 786frontends. | 784language frontends (C, C++) and so can be used to alter option flag 785variables which only exist in those frontends. |
787@end defmac 788 789@defmac OPTIMIZATION_OPTIONS (@var{level}, @var{size}) 790Some machines may desire to change what optimizations are performed for 791various optimization levels. This macro, if defined, is executed once 792just after the optimization level is determined and before the remainder 793of the command options have been parsed. Values set in this macro are 794used as the default values for the other command line options. --- 4229 unchanged lines hidden (view full) --- 5024@defmac TARGET_C99_FUNCTIONS 5025When this macro is nonzero, GCC will implicitly optimize @code{sin} calls into 5026@code{sinf} and similarly for other functions defined by C99 standard. The 5027default is nonzero that should be proper value for most modern systems, however 5028number of existing systems lacks support for these functions in the runtime so 5029they needs this macro to be redefined to 0. 5030@end defmac 5031 | 786@end defmac 787 788@defmac OPTIMIZATION_OPTIONS (@var{level}, @var{size}) 789Some machines may desire to change what optimizations are performed for 790various optimization levels. This macro, if defined, is executed once 791just after the optimization level is determined and before the remainder 792of the command options have been parsed. Values set in this macro are 793used as the default values for the other command line options. --- 4229 unchanged lines hidden (view full) --- 5023@defmac TARGET_C99_FUNCTIONS 5024When this macro is nonzero, GCC will implicitly optimize @code{sin} calls into 5025@code{sinf} and similarly for other functions defined by C99 standard. The 5026default is nonzero that should be proper value for most modern systems, however 5027number of existing systems lacks support for these functions in the runtime so 5028they needs this macro to be redefined to 0. 5029@end defmac 5030 |
5032@defmac NEXT_OBJC_RUNTIME 5033Define this macro to generate code for Objective-C message sending using 5034the calling convention of the NeXT system. This calling convention 5035involves passing the object, the selector and the method arguments all 5036at once to the method-lookup library function. 5037 5038The default calling convention passes just the object and the selector 5039to the lookup function, which returns a pointer to the method. 5040@end defmac 5041 | |
5042@node Addressing Modes 5043@section Addressing Modes 5044@cindex addressing modes 5045 5046@c prevent bad page break with this line 5047This is about addressing modes. 5048 5049@defmac HAVE_PRE_INCREMENT --- 2274 unchanged lines hidden (view full) --- 7324which defines (equates) the weak symbol @var{name} to have the value 7325@var{value}. If @var{value} is @code{NULL}, it defines @var{name} as 7326an undefined weak symbol. 7327 7328Define this macro if the target only supports weak aliases; define 7329@code{ASM_OUTPUT_DEF} instead if possible. 7330@end defmac 7331 | 5031@node Addressing Modes 5032@section Addressing Modes 5033@cindex addressing modes 5034 5035@c prevent bad page break with this line 5036This is about addressing modes. 5037 5038@defmac HAVE_PRE_INCREMENT --- 2274 unchanged lines hidden (view full) --- 7313which defines (equates) the weak symbol @var{name} to have the value 7314@var{value}. If @var{value} is @code{NULL}, it defines @var{name} as 7315an undefined weak symbol. 7316 7317Define this macro if the target only supports weak aliases; define 7318@code{ASM_OUTPUT_DEF} instead if possible. 7319@end defmac 7320 |
7332@defmac OBJC_GEN_METHOD_LABEL (@var{buf}, @var{is_inst}, @var{class_name}, @var{cat_name}, @var{sel_name}) 7333Define this macro to override the default assembler names used for 7334Objective-C methods. 7335 7336The default name is a unique method number followed by the name of the 7337class (e.g.@: @samp{_1_Foo}). For methods in categories, the name of 7338the category is also included in the assembler name (e.g.@: 7339@samp{_1_Foo_Bar}). 7340 7341These names are safe on most systems, but make debugging difficult since 7342the method's selector is not present in the name. Therefore, particular 7343systems define other ways of computing names. 7344 7345@var{buf} is an expression of type @code{char *} which gives you a 7346buffer in which to store the name; its length is as long as 7347@var{class_name}, @var{cat_name} and @var{sel_name} put together, plus 734850 characters extra. 7349 7350The argument @var{is_inst} specifies whether the method is an instance 7351method or a class method; @var{class_name} is the name of the class; 7352@var{cat_name} is the name of the category (or @code{NULL} if the method is not 7353in a category); and @var{sel_name} is the name of the selector. 7354 7355On systems where the assembler can handle quoted names, you can use this 7356macro to provide more human-readable names. 7357@end defmac 7358 7359@defmac ASM_DECLARE_CLASS_REFERENCE (@var{stream}, @var{name}) 7360A C statement (sans semicolon) to output to the stdio stream 7361@var{stream} commands to declare that the label @var{name} is an 7362Objective-C class reference. This is only needed for targets whose 7363linkers have special support for NeXT-style runtimes. 7364@end defmac 7365 7366@defmac ASM_DECLARE_UNRESOLVED_REFERENCE (@var{stream}, @var{name}) 7367A C statement (sans semicolon) to output to the stdio stream 7368@var{stream} commands to declare that the label @var{name} is an 7369unresolved Objective-C class reference. This is only needed for targets 7370whose linkers have special support for NeXT-style runtimes. 7371@end defmac 7372 | |
7373@node Initialization 7374@subsection How Initialization Functions Are Handled 7375@cindex initialization routines 7376@cindex termination routines 7377@cindex constructors, output of 7378@cindex destructors, output of 7379 7380The compiled code for certain languages includes @dfn{constructors} --- 2583 unchanged lines hidden (view full) --- 9964the front end. 9965@end deftypefn 9966 9967@defmac TARGET_USE_JCR_SECTION 9968This macro determines whether to use the JCR section to register Java 9969classes. By default, TARGET_USE_JCR_SECTION is defined to 1 if both 9970SUPPORTS_WEAK and TARGET_HAVE_NAMED_SECTIONS are true, else 0. 9971@end defmac | 7321@node Initialization 7322@subsection How Initialization Functions Are Handled 7323@cindex initialization routines 7324@cindex termination routines 7325@cindex constructors, output of 7326@cindex destructors, output of 7327 7328The compiled code for certain languages includes @dfn{constructors} --- 2583 unchanged lines hidden (view full) --- 9912the front end. 9913@end deftypefn 9914 9915@defmac TARGET_USE_JCR_SECTION 9916This macro determines whether to use the JCR section to register Java 9917classes. By default, TARGET_USE_JCR_SECTION is defined to 1 if both 9918SUPPORTS_WEAK and TARGET_HAVE_NAMED_SECTIONS are true, else 0. 9919@end defmac |
9972 9973@defmac OBJC_JBLEN 9974This macro determines the size of the objective C jump buffer for the 9975NeXT runtime. By default, OBJC_JBLEN is defined to an innocuous value. 9976@end defmac | |