* pdp11.h (TARGET_SWITCHES): Add option to vary assembler syntax.
(TARGET_DEFAULT): Possibly use UNIX syntax.
(TARGET_UNIX_ASM, TARGET_UNIX_ASM_DEFAULT): New macros.
(REGISTER_NAMES): Use "r5" instead of "fp".
(ASM_OUTPUT_ALIGN): Use ".even" directive, and abort for any
greater alignment.
* 2bsd.h (TARGET_UNIX_ASM_DEFAULT): Default to UNIX assembler
syntax for 2BSD.
* pdp11.c (output_ascii): Use working syntax for ".byte".
(print_operand_address): Use "*" instead of "@" when using UNIX
assembler syntax.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@26325
138bc75d-0d04-0410-961f-
82ee72b054a4
+1999-04-10 Joseph S. Myers <jsm28@cam.ac.uk>
+
+ * pdp11.h (TARGET_SWITCHES): Add option to vary assembler syntax.
+ (TARGET_DEFAULT): Possibly use UNIX syntax.
+ (TARGET_UNIX_ASM, TARGET_UNIX_ASM_DEFAULT): New macros.
+ (REGISTER_NAMES): Use "r5" instead of "fp".
+ (ASM_OUTPUT_ALIGN): Use ".even" directive, and abort for any
+ greater alignment.
+ * 2bsd.h (TARGET_UNIX_ASM_DEFAULT): Default to UNIX assembler
+ syntax for 2BSD.
+ * pdp11.c (output_ascii): Use working syntax for ".byte".
+ (print_operand_address): Use "*" instead of "@" when using UNIX
+ assembler syntax.
+
Sat Apr 10 03:50:12 1999 Jeffrey A Law (law@cygnus.com)
* rtl.h (local_alloc): Returns an integer now.
/* Definitions of target machine for GNU compiler, for a PDP with 2BSD
- Copyright (C) 1995, 1996 Free Software Foundation, Inc.
+ Copyright (C) 1995, 1996, 1999 Free Software Foundation, Inc.
Contributed by Michael K. Gschwind (mike@vlsivie.tuwien.ac.at).
This file is part of GNU CC.
ASM_OUTPUT_LABEL (STREAM, NAME); \
fprintf (STREAM, "~~%s:\n", NAME); \
} while (0)
+
+#undef TARGET_UNIX_ASM_DEFAULT
+#define TARGET_UNIX_ASM_DEFAULT 2048
{
int i;
- fprintf (file, "\t.byte \"");
+ /* This used to output .byte "string", which doesn't work with the UNIX
+ assembler and I think not with DEC ones either. */
+ fprintf (file, "\t.byte ");
for (i = 0; i < size; i++)
{
register int c = p[i];
- if (c == '\"' || c == '\\')
- putc ('\\', file);
- if (c >= ' ' && c < 0177)
- putc (c, file);
- else
- {
- fprintf (file, "\\%03o", c);
- /* After an octal-escape, if a digit follows,
- terminate one string constant and start another.
- The Vax assembler fails to stop reading the escape
- after three digits, so this is the only way we
- can get it to parse the data properly. */
- if (i < size - 1 && p[i + 1] >= '0' && p[i + 1] <= '9')
- fprintf (file, "\"\n\tstring \"");
- }
+ if (c < 0)
+ c += 256;
+ fprintf (file, "%o", c);
+ if (i < size - 1)
+ putc (',', file);
}
- fprintf (file, "\"\n");
+ putc ('\n', file);
}
switch (GET_CODE (addr))
{
case MEM:
- fprintf (file, "@");
+ if (TARGET_UNIX_ASM)
+ fprintf (file, "*");
+ else
+ fprintf (file, "@");
addr = XEXP (addr, 0);
goto retry;
/* split instruction and data memory? */ \
{ "split", 1024, "Target has split I&D" }, \
{ "no-split", -1024, "Target does not have split I&D" }, \
+/* UNIX assembler syntax? */ \
+ { "unix-asm", 2048, "Use UNIX assembler syntax" }, \
+ { "dec-asm", 2048, "Use DEC assembler syntax" }, \
/* default */ \
{ "", TARGET_DEFAULT, NULL} \
}
-#define TARGET_DEFAULT (1 | 8 | 128)
+#define TARGET_DEFAULT (1 | 8 | 128 | TARGET_UNIX_ASM_DEFAULT)
#define TARGET_FPU (target_flags & 1)
#define TARGET_SOFT_FLOAT (!TARGET_FPU)
#define TARGET_SPLIT (target_flags & 1024)
#define TARGET_NOSPLIT (! TARGET_SPLIT)
+
+#define TARGET_UNIX_ASM (target_flags & 2048)
+#define TARGET_UNIX_ASM_DEFAULT 0
+
\f
/* TYPE SIZES */
This sequence is indexed by compiler's hard-register-number (see above). */
#define REGISTER_NAMES \
-{"r0", "r1", "r2", "r3", "r4", "fp", "sp", "pc", \
+{"r0", "r1", "r2", "r3", "r4", "r5", "sp", "pc", \
"ac0", "ac1", "ac2", "ac3", "ac4", "ac5" }
/* How to renumber registers for dbx and gdb. */
*/
#define ASM_OUTPUT_ALIGN(FILE,LOG) \
- if ((LOG) != 0) \
- fprintf (FILE, "\t.align %d\n", 1<<(LOG))
+ switch (LOG) \
+ { \
+ case 0: \
+ break; \
+ case 1: \
+ fprintf (FILE, "\t.even\n"); \
+ break; \
+ default: \
+ abort (); \
+ }
#define ASM_OUTPUT_SKIP(FILE,SIZE) \
fprintf (FILE, "\t.=.+ %d\n", (SIZE))