diff options
author | Paul Koning <ni1d@arrl.net> | 2010-12-30 02:09:04 +0000 |
---|---|---|
committer | Paul Koning <ni1d@arrl.net> | 2010-12-30 02:09:04 +0000 |
commit | 6644087eea41745e757b75e0b4344f38b445cb88 (patch) | |
tree | a8a93dd91df56e29e12bb314f7897be16866c01a /gcc/config/pdp11 | |
parent | b79b941240169a63b131f9b954b7c1d2b0d5e4c8 (diff) |
* config/pdp11/pdp11-protos.h (pdp11_asm_output_var): Declare.
* config/pdp11/pdp11.c (pdp11_asm_output_var): New function.
* config/pdp11/pdp11.h (ASM_OUTPUT_ALIGNED_COMMON,
ASM_OUTPUT_ALIGNED_LOCAL): New macros.
(ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL): Delete.
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@168333 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/pdp11')
-rw-r--r-- | gcc/config/pdp11/pdp11-protos.h | 1 | ||||
-rw-r--r-- | gcc/config/pdp11/pdp11.c | 13 | ||||
-rw-r--r-- | gcc/config/pdp11/pdp11.h | 15 |
3 files changed, 19 insertions, 10 deletions
diff --git a/gcc/config/pdp11/pdp11-protos.h b/gcc/config/pdp11/pdp11-protos.h index 09ba7b21e66..56ad909e10e 100644 --- a/gcc/config/pdp11/pdp11-protos.h +++ b/gcc/config/pdp11/pdp11-protos.h @@ -44,3 +44,4 @@ extern enum reg_class pdp11_regno_reg_class (int); #endif /* RTX_CODE */ extern void output_ascii (FILE *, const char *, int); +extern void pdp11_asm_output_var (FILE *, const char *, int, int, bool); diff --git a/gcc/config/pdp11/pdp11.c b/gcc/config/pdp11/pdp11.c index fedb22a12d4..9c7b47630cd 100644 --- a/gcc/config/pdp11/pdp11.c +++ b/gcc/config/pdp11/pdp11.c @@ -716,6 +716,19 @@ output_ascii (FILE *file, const char *p, int size) void +pdp11_asm_output_var (FILE *file, const char *name, int size, + int align, bool global) +{ + if (align > 8) + fprintf (file, "\n\t.even\n"); + fprintf (file, ".globl "); + assemble_name (file, name); + fprintf (file, "\n"); + assemble_name (file, name); + fprintf (file, ": .=.+ %#ho\n", (unsigned short)size); +} + +void print_operand_address (FILE *file, register rtx addr) { register rtx breg; diff --git a/gcc/config/pdp11/pdp11.h b/gcc/config/pdp11/pdp11.h index 6ee9bd8599f..37e03483c12 100644 --- a/gcc/config/pdp11/pdp11.h +++ b/gcc/config/pdp11/pdp11.h @@ -648,20 +648,15 @@ extern struct rtx_def *cc0_reg_rtx; /* This says how to output an assembler line to define a global common symbol. */ -#define ASM_OUTPUT_COMMON(FILE, NAME, SIZE, ROUNDED) \ -( fprintf ((FILE), ".globl "), \ - assemble_name ((FILE), (NAME)), \ - fprintf ((FILE), "\n"), \ - assemble_name ((FILE), (NAME)), \ - fprintf ((FILE), ": .=.+ %#ho\n", (unsigned short)(ROUNDED)) \ -) +#define ASM_OUTPUT_ALIGNED_COMMON(FILE, NAME, SIZE, ALIGN) \ + pdp11_asm_output_var (FILE, NAME, SIZE, ALIGN, true) + /* This says how to output an assembler line to define a local common symbol. */ -#define ASM_OUTPUT_LOCAL(FILE, NAME, SIZE, ROUNDED) \ -( assemble_name ((FILE), (NAME)), \ - fprintf ((FILE), ":\t.=.+ %#ho\n", (unsigned short)(ROUNDED))) +#define ASM_OUTPUT_ALIGNED_LOCAL(FILE, NAME, SIZE, ALIGN) \ + pdp11_asm_output_var (FILE, NAME, SIZE, ALIGN, false) /* Print operand X (an rtx) in assembler syntax to file FILE. CODE is a letter or dot (`z' in `%z0') or 0 if no letter was specified. |