Commit 5c41fdfb by John David Anglin Committed by John David Anglin

vax.c (vax_rtx_cost): Return MAX_COST for unsupported MULT, UDIV and UMOD modes.

	* 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.

From-SVN: r48882
parent de097a2d
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> 2002-01-15 Jason Merrill <jason@redhat.com>
* c-common.def (FILE_STMT): New code. * c-common.def (FILE_STMT): New code.
......
/* Subroutines for insn-output.c for VAX. /* 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. Free Software Foundation, Inc.
This file is part of GNU CC. This file is part of GNU CC.
...@@ -521,13 +521,12 @@ vax_rtx_cost (x) ...@@ -521,13 +521,12 @@ vax_rtx_cost (x)
c = 10; /* 3-4 on VAX 9000, 20-28 on VAX 2 */ c = 10; /* 3-4 on VAX 9000, 20-28 on VAX 2 */
break; break;
default: default:
/* Careful, init_expmed generates arbitrary rtx and return MAX_COST; /* Mode is not supported. */
computes costs, so we can't abort. */
c = 1000;
break;
} }
break; break;
case UDIV: case UDIV:
if (mode != SImode)
return MAX_COST; /* Mode is not supported. */
c = 17; c = 17;
break; break;
case DIV: case DIV:
...@@ -543,6 +542,8 @@ vax_rtx_cost (x) ...@@ -543,6 +542,8 @@ vax_rtx_cost (x)
c = 23; c = 23;
break; break;
case UMOD: case UMOD:
if (mode != SImode)
return MAX_COST; /* Mode is not supported. */
c = 29; c = 29;
break; break;
case FLOAT: case FLOAT:
......
...@@ -689,14 +689,14 @@ enum reg_class { NO_REGS, ALL_REGS, LIM_REG_CLASSES }; ...@@ -689,14 +689,14 @@ enum reg_class { NO_REGS, ALL_REGS, LIM_REG_CLASSES };
&& GET_CODE (xfoob) == REG && REG_OK_FOR_BASE_P (xfoob)) \ && GET_CODE (xfoob) == REG && REG_OK_FOR_BASE_P (xfoob)) \
goto ADDR; } goto ADDR; }
/* 1 if PROD is either a reg times size of mode MODE /* 1 if PROD is either a reg times size of mode MODE and MODE is less
or just a reg, if MODE is just one byte. 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 This macro's expansion uses the temporary variables xfoo0 and xfoo1
that must be declared in the surrounding context. */ that must be declared in the surrounding context. */
#define INDEX_TERM_P(PROD, MODE) \ #define INDEX_TERM_P(PROD, MODE) \
(GET_MODE_SIZE (MODE) == 1 \ (GET_MODE_SIZE (MODE) == 1 \
? (GET_CODE (PROD) == REG && REG_OK_FOR_BASE_P (PROD)) \ ? (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), \ (xfoo0 = XEXP (PROD, 0), xfoo1 = XEXP (PROD, 1), \
((((GET_CODE (xfoo0) == CONST_INT \ ((((GET_CODE (xfoo0) == CONST_INT \
......
;; Machine description for GNU compiler, VAX Version ;; Machine description for GNU compiler, VAX Version
;; Copyright (C) 1987, 1988, 1991, 1994, 1995, 1996, 1998, 1999, 2000, 2001 ;; Copyright (C) 1987, 1988, 1991, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
;; Free Software Foundation, Inc. ;; 2002 Free Software Foundation, Inc.
;; This file is part of GNU CC. ;; This file is part of GNU CC.
...@@ -896,9 +896,9 @@ ...@@ -896,9 +896,9 @@
;; Bit-and on the VAX is done with a clear-bits insn. ;; Bit-and on the VAX is done with a clear-bits insn.
(define_expand "andsi3" (define_expand "andsi3"
[(set (match_operand:SI 0 "general_operand" "=g") [(set (match_operand:SI 0 "nonimmediate_operand" "")
(and:SI (not:SI (match_operand:SI 1 "general_operand" "g")) (and:SI (not:SI (match_operand:SI 1 "general_operand" ""))
(match_operand:SI 2 "general_operand" "g")))] (match_operand:SI 2 "general_operand" "")))]
"" ""
" "
{ {
...@@ -919,9 +919,9 @@ ...@@ -919,9 +919,9 @@
}") }")
(define_expand "andhi3" (define_expand "andhi3"
[(set (match_operand:HI 0 "general_operand" "=g") [(set (match_operand:HI 0 "nonimmediate_operand" "")
(and:HI (not:HI (match_operand:HI 1 "general_operand" "g")) (and:HI (not:HI (match_operand:HI 1 "general_operand" ""))
(match_operand:HI 2 "general_operand" "g")))] (match_operand:HI 2 "general_operand" "")))]
"" ""
" "
{ {
...@@ -935,15 +935,15 @@ ...@@ -935,15 +935,15 @@
} }
if (GET_CODE (op1) == CONST_INT) if (GET_CODE (op1) == CONST_INT)
operands[1] = GEN_INT (65535 & ~INTVAL (op1)); operands[1] = GEN_INT (~INTVAL (op1));
else else
operands[1] = expand_unop (HImode, one_cmpl_optab, op1, 0, 1); operands[1] = expand_unop (HImode, one_cmpl_optab, op1, 0, 1);
}") }")
(define_expand "andqi3" (define_expand "andqi3"
[(set (match_operand:QI 0 "general_operand" "=g") [(set (match_operand:QI 0 "nonimmediate_operand" "")
(and:QI (not:QI (match_operand:QI 1 "general_operand" "g")) (and:QI (not:QI (match_operand:QI 1 "general_operand" ""))
(match_operand:QI 2 "general_operand" "g")))] (match_operand:QI 2 "general_operand" "")))]
"" ""
" "
{ {
...@@ -957,7 +957,7 @@ ...@@ -957,7 +957,7 @@
} }
if (GET_CODE (op1) == CONST_INT) if (GET_CODE (op1) == CONST_INT)
operands[1] = GEN_INT (255 & ~INTVAL (op1)); operands[1] = GEN_INT (~INTVAL (op1));
else else
operands[1] = expand_unop (QImode, one_cmpl_optab, op1, 0, 1); operands[1] = expand_unop (QImode, one_cmpl_optab, op1, 0, 1);
}") }")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment