This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Thanks, Andrew Pinski
ChangeLog: * config/darwin-protos.h (name_needs_quotes): Change return type to bool. (machopic_operand_p): Likewise. (machopic_name_defined_p): Likewise. (machopic_ident_defined_p): Likewise. (machopic_define_name): Remove. (machopic_define_data_name): Declare. (machopic_define_function_name): Declare. * config/darwin.c (name_needs_quotes): Change return type to bool. (machopic_ident_defined_p): Likewise. (machopic_data_defined_p): Likewise. (machopic_name_defined_p): Likewise. (machopic_define_name): Remove. (machopic_define_data_name): New function. (machopic_define_function_name): New function. (machopic_stub_name): Boolize. (machopic_operand_p): Change return type to bool. (darwin_asm_named_section): Do not use SECTION_FORMAT_STRING. (darwin_emit_unwind_label): Boolize. * config/darwin.h (ASM_DECLARE_OBJECT_NAME): Combine the ifs and call machopic_define_data_name instead of machopic_define_name. (ASM_DECLARE_FUNCTION_NAME): Combine the ifs and call machopic_define_function_name instead of machopic_define_name. (ASM_OUTPUT_ALIGNED_DECL_LOCAL): Size cannot be 0. Combine the ifs and call machopic_define_data_name instead of machopic_define_name. * config/rs6000/darwin.h (SECTION_FORMAT_STRING): Remove. (ASM_OUTPUT_COMMON): Size cannot 0 and reformat.
Patch: ? temp.darwin.txt Index: darwin-protos.h =================================================================== RCS file: /cvs/gcc/gcc/gcc/config/darwin-protos.h,v retrieving revision 1.34 diff -u -p -r1.34 darwin-protos.h --- darwin-protos.h 12 Mar 2004 17:08:58 -0000 1.34 +++ darwin-protos.h 12 Apr 2004 13:27:23 -0000 @@ -18,7 +18,7 @@ along with GCC; see the file COPYING. I the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-extern int name_needs_quotes (const char *); +extern bool name_needs_quotes (const char *);
-extern int machopic_operand_p (rtx); +extern bool machopic_operand_p (rtx); extern enum machopic_addr_class machopic_classify_name (const char*);
extern rtx machopic_indirect_data_reference (rtx, rtx); @@ -55,9 +55,10 @@ extern void machopic_asm_out_destructor
extern enum machopic_addr_class machopic_classify_ident (tree); extern void machopic_define_ident (tree); -extern void machopic_define_name (const char*); -extern int machopic_name_defined_p (const char*); -extern int machopic_ident_defined_p (tree); +extern void machopic_define_data_name (const char*); +extern void machopic_define_function_name (const char*); +extern bool machopic_name_defined_p (const char*); +extern bool machopic_ident_defined_p (tree); extern void darwin_encode_section_info (tree, rtx, int); extern const char *darwin_strip_name_encoding (const char *);
Index: darwin.c =================================================================== RCS file: /cvs/gcc/gcc/gcc/config/darwin.c,v retrieving revision 1.66 diff -u -p -r1.66 darwin.c --- darwin.c 9 Apr 2004 19:57:44 -0000 1.66 +++ darwin.c 12 Apr 2004 13:27:23 -0000 @@ -43,12 +43,12 @@ Boston, MA 02111-1307, USA. */ #include "tm_p.h" #include "errors.h"
-static int machopic_data_defined_p (const char *); +static bool machopic_data_defined_p (const char *); static void update_non_lazy_ptrs (const char *); static void update_stubs (const char *); static const char *machopic_non_lazy_ptr_name (const char*);
-int +bool name_needs_quotes (const char *name) { int c; @@ -170,7 +170,7 @@ machopic_classify_name (const char *name return machopic_classify_ident (get_identifier (name)); }
-int +bool machopic_ident_defined_p (tree ident) { switch (machopic_classify_ident (ident)) @@ -184,7 +184,7 @@ machopic_ident_defined_p (tree ident) } }
-static int +static bool machopic_data_defined_p (const char *name) { switch (machopic_classify_ident (get_identifier (name))) @@ -196,7 +196,7 @@ machopic_data_defined_p (const char *nam } }
-int +bool machopic_name_defined_p (const char *name) { return machopic_ident_defined_p (get_identifier (name)); @@ -211,11 +211,18 @@ machopic_define_ident (tree ident) }
void -machopic_define_name (const char *name) +machopic_define_data_name (const char *name) { machopic_define_ident (get_identifier (name)); }
+void +machopic_define_function_name (const char *name) +{ + machopic_define_ident (get_identifier (name)); +} + + static GTY(()) char * function_base;
const char * @@ -361,7 +368,7 @@ machopic_stub_name (const char *name) int bufferlen = 0; int namelen = strlen (name); tree ptr_name; - int needs_quotes = name_needs_quotes (name); + bool needs_quotes = name_needs_quotes (name);
@@ -445,7 +452,7 @@ machopic_indirect_data_reference (rtx or if (GET_CODE (orig) == SYMBOL_REF) { const char *name = XSTR (orig, 0); - int defined = machopic_data_defined_p (name); + bool defined = machopic_data_defined_p (name);
if (defined && MACHO_DYNAMIC_NO_PIC_P) { @@ -951,7 +958,7 @@ machopic_finish (FILE *asm_out_file) } }
@@ -1352,7 +1356,7 @@ darwin_emit_unwind_label(FILE *file, tre const char *suffix = ".eh"; unsigned int suffix_len = 3;
- int need_quotes = name_needs_quotes (base); + bool need_quotes = name_needs_quotes (base); int quotes_len = need_quotes ? 2 : 0;
/* Define cutoff for using external functions to save floating point. Currently on Darwin, always use inline stores. */ @@ -203,11 +202,16 @@ do { \ symbol. */ /* ? */ #undef ASM_OUTPUT_ALIGNED_COMMON -#define ASM_OUTPUT_COMMON(FILE, NAME, SIZE, ROUNDED) \ - do { fputs (".comm ", (FILE)); \ - RS6000_OUTPUT_BASENAME ((FILE), (NAME)); \ - fprintf ((FILE), ","HOST_WIDE_INT_PRINT_UNSIGNED"\n",\ - (SIZE)); } while (0) +#define ASM_OUTPUT_COMMON(FILE, NAME, SIZE, ROUNDED) \ + do { \ + unsigned HOST_WIDE_INT size1 = (SIZE); \ + /* Darwin does not support 0 sized common. */ \ + size1 = size1 == 0 ? 1 : size1; \ + fputs (".comm ", (FILE)); \ + RS6000_OUTPUT_BASENAME ((FILE), (NAME)); \ + fprintf ((FILE), ","HOST_WIDE_INT_PRINT_UNSIGNED"\n",\ + size1); \ + } while (0)
Attachment:
temp.darwin.txt
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |