+2002-01-15 John David Anglin <dave@hiauly1.hia.nrc.ca>
+
+ * vax.c (vax_rtx_cost): Return MAX_COST for unsupported MULT, UDIV
+ and UMOD modes.
+
+ * vax.h (INDEX_TERM_P): Restrict indexing to modes which have a size
+ less than or equal to eight bytes.
+
+ * vax.md (andsi3): Remove constraints and change SET destination
+ operand type to nonimmediate_operand.
+ (andhi3, andqi3): Likewise. Don't clear high order bits of operand 1
+ when it is a CONST_INT.
+
2002-01-15 Jason Merrill <jason@redhat.com>
* c-common.def (FILE_STMT): New code.
/* Subroutines for insn-output.c for VAX.
- Copyright (C) 1987, 1994, 1995, 1997, 1998, 1999, 2000
+ Copyright (C) 1987, 1994, 1995, 1997, 1998, 1999, 2000, 2001, 2002
Free Software Foundation, Inc.
This file is part of GNU CC.
c = 10; /* 3-4 on VAX 9000, 20-28 on VAX 2 */
break;
default:
- /* Careful, init_expmed generates arbitrary rtx and
- computes costs, so we can't abort. */
- c = 1000;
- break;
+ return MAX_COST; /* Mode is not supported. */
}
break;
case UDIV:
+ if (mode != SImode)
+ return MAX_COST; /* Mode is not supported. */
c = 17;
break;
case DIV:
c = 23;
break;
case UMOD:
+ if (mode != SImode)
+ return MAX_COST; /* Mode is not supported. */
c = 29;
break;
case FLOAT:
&& GET_CODE (xfoob) == REG && REG_OK_FOR_BASE_P (xfoob)) \
goto ADDR; }
-/* 1 if PROD is either a reg times size of mode MODE
- or just a reg, if MODE is just one byte.
+/* 1 if PROD is either a reg times size of mode MODE and MODE is less
+ than or equal 8 bytes, or just a reg if MODE is one byte.
This macro's expansion uses the temporary variables xfoo0 and xfoo1
that must be declared in the surrounding context. */
#define INDEX_TERM_P(PROD, MODE) \
(GET_MODE_SIZE (MODE) == 1 \
? (GET_CODE (PROD) == REG && REG_OK_FOR_BASE_P (PROD)) \
- : (GET_CODE (PROD) == MULT \
+ : (GET_CODE (PROD) == MULT && GET_MODE_SIZE (MODE) <= 8 \
&& \
(xfoo0 = XEXP (PROD, 0), xfoo1 = XEXP (PROD, 1), \
((((GET_CODE (xfoo0) == CONST_INT \
;; Machine description for GNU compiler, VAX Version
-;; Copyright (C) 1987, 1988, 1991, 1994, 1995, 1996, 1998, 1999, 2000, 2001
-;; Free Software Foundation, Inc.
+;; Copyright (C) 1987, 1988, 1991, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+;; 2002 Free Software Foundation, Inc.
;; This file is part of GNU CC.
\f
;; Bit-and on the VAX is done with a clear-bits insn.
(define_expand "andsi3"
- [(set (match_operand:SI 0 "general_operand" "=g")
- (and:SI (not:SI (match_operand:SI 1 "general_operand" "g"))
- (match_operand:SI 2 "general_operand" "g")))]
+ [(set (match_operand:SI 0 "nonimmediate_operand" "")
+ (and:SI (not:SI (match_operand:SI 1 "general_operand" ""))
+ (match_operand:SI 2 "general_operand" "")))]
""
"
{
}")
(define_expand "andhi3"
- [(set (match_operand:HI 0 "general_operand" "=g")
- (and:HI (not:HI (match_operand:HI 1 "general_operand" "g"))
- (match_operand:HI 2 "general_operand" "g")))]
+ [(set (match_operand:HI 0 "nonimmediate_operand" "")
+ (and:HI (not:HI (match_operand:HI 1 "general_operand" ""))
+ (match_operand:HI 2 "general_operand" "")))]
""
"
{
}
if (GET_CODE (op1) == CONST_INT)
- operands[1] = GEN_INT (65535 & ~INTVAL (op1));
+ operands[1] = GEN_INT (~INTVAL (op1));
else
operands[1] = expand_unop (HImode, one_cmpl_optab, op1, 0, 1);
}")
(define_expand "andqi3"
- [(set (match_operand:QI 0 "general_operand" "=g")
- (and:QI (not:QI (match_operand:QI 1 "general_operand" "g"))
- (match_operand:QI 2 "general_operand" "g")))]
+ [(set (match_operand:QI 0 "nonimmediate_operand" "")
+ (and:QI (not:QI (match_operand:QI 1 "general_operand" ""))
+ (match_operand:QI 2 "general_operand" "")))]
""
"
{
}
if (GET_CODE (op1) == CONST_INT)
- operands[1] = GEN_INT (255 & ~INTVAL (op1));
+ operands[1] = GEN_INT (~INTVAL (op1));
else
operands[1] = expand_unop (QImode, one_cmpl_optab, op1, 0, 1);
}")