diff options
author | Richard Stallman <rms@gnu.org> | 1993-10-20 22:19:55 +0000 |
---|---|---|
committer | Richard Stallman <rms@gnu.org> | 1993-10-20 22:19:55 +0000 |
commit | 92dee628c1b1e2819e6869feceb0943e25b30320 (patch) | |
tree | f618bb8c9edeadb45321531a95cce09ee4babe26 /gcc/config/i386 | |
parent | 77a2f6986f6fac2c8af126ea2a6971576f9a2b1c (diff) | |
download | gcc-92dee628c1b1e2819e6869feceb0943e25b30320.zip gcc-92dee628c1b1e2819e6869feceb0943e25b30320.tar.gz gcc-92dee628c1b1e2819e6869feceb0943e25b30320.tar.bz2 |
(ASM_DECLARE_OBJECT_NAME): Set size_directive_output.
(ASM_FINISH_DECLARE_OBJECT): Defined.
From-SVN: r5839
Diffstat (limited to 'gcc/config/i386')
-rw-r--r-- | gcc/config/i386/osfrose.h | 60 |
1 files changed, 41 insertions, 19 deletions
diff --git a/gcc/config/i386/osfrose.h b/gcc/config/i386/osfrose.h index 2b94588..241a173 100644 --- a/gcc/config/i386/osfrose.h +++ b/gcc/config/i386/osfrose.h @@ -718,28 +718,50 @@ while (0) in the usual manner as a label (by means of `ASM_OUTPUT_LABEL'). */ #undef ASM_DECLARE_OBJECT_NAME -#define ASM_DECLARE_OBJECT_NAME(STREAM, NAME, DECL) \ -do \ - { \ - ASM_OUTPUT_LABEL(STREAM,NAME); \ - HALF_PIC_DECLARE (NAME); \ - if (TARGET_ELF) \ - { \ - fprintf (STREAM, "\t%s\t ", TYPE_ASM_OP); \ - assemble_name (STREAM, NAME); \ - putc (',', STREAM); \ - fprintf (STREAM, TYPE_OPERAND_FMT, "object"); \ - putc ('\n', STREAM); \ - if (!flag_inhibit_size_directive && DECL_SIZE (DECL)) \ - { \ - fprintf (STREAM, "\t%s\t ", SIZE_ASM_OP); \ - assemble_name (STREAM, NAME); \ +#define ASM_DECLARE_OBJECT_NAME(STREAM, NAME, DECL) \ +do \ + { \ + ASM_OUTPUT_LABEL(STREAM,NAME); \ + HALF_PIC_DECLARE (NAME); \ + if (TARGET_ELF) \ + { \ + fprintf (STREAM, "\t%s\t ", TYPE_ASM_OP); \ + assemble_name (STREAM, NAME); \ + putc (',', STREAM); \ + fprintf (STREAM, TYPE_OPERAND_FMT, "object"); \ + putc ('\n', STREAM); \ + size_directive_output = 0; \ + if (!flag_inhibit_size_directive && DECL_SIZE (DECL)) \ + { \ + size_directive_output = 1; \ + fprintf (STREAM, "\t%s\t ", SIZE_ASM_OP); \ + assemble_name (STREAM, NAME); \ fprintf (STREAM, ",%d\n", int_size_in_bytes (TREE_TYPE (DECL))); \ - } \ - } \ - } \ + } \ + } \ + } \ while (0) +/* Output the size directive for a decl in rest_of_decl_compilation + in the case where we did not do so before the initializer. + Once we find the error_mark_node, we know that the value of + size_directive_output was set + by ASM_DECLARE_OBJECT_NAME when it was run for the same decl. */ + +#define ASM_FINISH_DECLARE_OBJECT(FILE, DECL, TOP_LEVEL, AT_END) \ +do { \ + char *name = XSTR (XEXP (DECL_RTL (DECL), 0), 0); \ + if (!flag_inhibit_size_directive && DECL_SIZE (DECL) \ + && ! AT_END && TOP_LEVEL \ + && DECL_INITIAL (DECL) == error_mark_node \ + && !size_directive_output) \ + { \ + fprintf (FILE, "\t%s\t ", SIZE_ASM_OP); \ + assemble_name (FILE, name); \ + fprintf (FILE, ",%d\n", int_size_in_bytes (TREE_TYPE (DECL))); \ + } \ + } while (0) + /* This is how to declare a function name. */ #undef ASM_DECLARE_FUNCTION_NAME |