summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordanglin <danglin@138bc75d-0d04-0410-961f-82ee72b054a4>2003-11-01 02:11:12 +0000
committerdanglin <danglin@138bc75d-0d04-0410-961f-82ee72b054a4>2003-11-01 02:11:12 +0000
commit2acf2acbc3306f1cd69576e30a392b88a71556e2 (patch)
tree01c14a382d70fdc14448d1c7f3e906f50f53e71d
parentf5c47dd728f7221874054dca2c3e246a2214f37d (diff)
downloadppe42-gcc-2acf2acbc3306f1cd69576e30a392b88a71556e2.tar.gz
ppe42-gcc-2acf2acbc3306f1cd69576e30a392b88a71556e2.zip
* 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@73167 138bc75d-0d04-0410-961f-82ee72b054a4
-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 7a217083737..ac79d42e26b 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 dd22e33bbf7..f572652fade 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 0bbcc277724..35d865d0f8a 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) \
OpenPOWER on IntegriCloud