aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn David Anglin <dave.anglin@nrc-cnrc.gc.ca>2003-11-01 02:11:12 +0000
committerJohn David Anglin <danglin@gcc.gnu.org>2003-11-01 02:11:12 +0000
commit72f03fdeb8e2b331041eb6380d5f97e78bdc5641 (patch)
tree01c14a382d70fdc14448d1c7f3e906f50f53e71d
parent41ba7ed74c7c2f8c4ede7dd98f9e5550869df45c (diff)
downloadgcc-72f03fdeb8e2b331041eb6380d5f97e78bdc5641.zip
gcc-72f03fdeb8e2b331041eb6380d5f97e78bdc5641.tar.gz
gcc-72f03fdeb8e2b331041eb6380d5f97e78bdc5641.tar.bz2
vax.c: Include toplev.h.
* vax.c: Include toplev.h. (vax_init_libfuncs): Fix typo (umod). * vax.h (ASM_COMMENT_START): Define. (PRINT_OPERAND): Fix warning when HOST_WIDE_INT is a long long. From-SVN: r73167
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/config/vax/vax.c3
-rw-r--r--gcc/config/vax/vax.h18
3 files changed, 24 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 7a21708..ac79d42 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+2003-10-31 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
+
+ * vax.c: Include toplev.h.
+ (vax_init_libfuncs): Fix typo (umod).
+ * vax.h (ASM_COMMENT_START): Define.
+ (PRINT_OPERAND): Fix warning when HOST_WIDE_INT is a long long.
+
2003-10-31 Roger Sayle <roger@eyesopen.com>
PR middle-end/11968
diff --git a/gcc/config/vax/vax.c b/gcc/config/vax/vax.c
index dd22e33..f572652 100644
--- a/gcc/config/vax/vax.c
+++ b/gcc/config/vax/vax.c
@@ -38,6 +38,7 @@ Boston, MA 02111-1307, USA. */
#include "optabs.h"
#include "flags.h"
#include "debug.h"
+#include "toplev.h"
#include "tm_p.h"
#include "target.h"
#include "target-def.h"
@@ -152,7 +153,7 @@ static void
vax_init_libfuncs (void)
{
set_optab_libfunc (udiv_optab, SImode, TARGET_ELF ? "*__udiv" : "*udiv");
- set_optab_libfunc (umod_optab, SImode, TARGET_ELF ? "*__umod" : "*umod");
+ set_optab_libfunc (umod_optab, SImode, TARGET_ELF ? "*__urem" : "*urem");
}
/* This is like nonimmediate_operand with a restriction on the type of MEM. */
diff --git a/gcc/config/vax/vax.h b/gcc/config/vax/vax.h
index 0bbcc27..35d865d 100644
--- a/gcc/config/vax/vax.h
+++ b/gcc/config/vax/vax.h
@@ -1,6 +1,6 @@
/* Definitions of target machine for GNU compiler. VAX version.
Copyright (C) 1987, 1988, 1991, 1993, 1994, 1995, 1996, 1997, 1998,
- 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+ 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
This file is part of GCC.
@@ -933,6 +933,12 @@ enum reg_class { NO_REGS, ALL_REGS, LIM_REG_CLASSES };
/* Control the assembler format that we output. */
+/* A C string constant describing how to begin a comment in the target
+ assembler language. The compiler assumes that the comment will end at
+ the end of the line. */
+
+#define ASM_COMMENT_START "#"
+
/* Output to assembler file text saying following lines
may contain character constants, extra white space, comments, etc. */
@@ -1106,7 +1112,13 @@ VAX operand formatting codes:
/* The purpose of D is to get around a quirk or bug in VAX assembler
whereby -1 in a 64-bit immediate operand means 0x00000000ffffffff,
- which is not a 64-bit minus one. */
+ which is not a 64-bit minus one. As a workaround, we output negative
+ values in hex. */
+#if HOST_BITS_PER_WIDE_INT == 64
+# define NEG_HWI_PRINT_HEX16 HOST_WIDE_INT_PRINT_HEX
+#else
+# define NEG_HWI_PRINT_HEX16 "0xffffffff%08lx"
+#endif
#define PRINT_OPERAND_PUNCT_VALID_P(CODE) \
((CODE) == '#' || (CODE) == '|')
@@ -1118,7 +1130,7 @@ VAX operand formatting codes:
else if (CODE == 'C') \
fputs (rev_cond_name (X), FILE); \
else if (CODE == 'D' && GET_CODE (X) == CONST_INT && INTVAL (X) < 0) \
- fprintf (FILE, "$0xffffffff%08x", INTVAL (X)); \
+ fprintf (FILE, "$" NEG_HWI_PRINT_HEX16, INTVAL (X)); \
else if (CODE == 'P' && GET_CODE (X) == CONST_INT) \
fprintf (FILE, "$" HOST_WIDE_INT_PRINT_DEC, INTVAL (X) + 1); \
else if (CODE == 'N' && GET_CODE (X) == CONST_INT) \