From 556a56acec1f32fe977c0d48da84bbff4373fd93 Mon Sep 17 00:00:00 2001 From: "David S. Miller" Date: Mon, 24 Jun 2002 03:08:38 -0700 Subject: sparc.c (INIT_TARGET_OPTABS): If ARCH64, set the 32-bit ABI libfuncs to NULL. 2002-06-24 David S. Miller * config/sparc/sparc.c (INIT_TARGET_OPTABS): If ARCH64, set the 32-bit ABI libfuncs to NULL. * expmed.c (expand_divmod): Do not set optab1/optab2 to the shift optabs if op1 is const0_rtx. From-SVN: r54950 --- gcc/expmed.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'gcc/expmed.c') diff --git a/gcc/expmed.c b/gcc/expmed.c index 8ef4fca..317dcc4 100644 --- a/gcc/expmed.c +++ b/gcc/expmed.c @@ -3049,9 +3049,12 @@ expand_divmod (rem_flag, code, mode, op0, op1, target, unsignedp) not straightforward to generalize this. Maybe we should make an array of possible modes in init_expmed? Save this for GCC 2.7. */ - optab1 = (op1_is_pow2 ? (unsignedp ? lshr_optab : ashr_optab) + optab1 = ((op1_is_pow2 && op1 != const0_rtx) + ? (unsignedp ? lshr_optab : ashr_optab) : (unsignedp ? udiv_optab : sdiv_optab)); - optab2 = (op1_is_pow2 ? optab1 : (unsignedp ? udivmod_optab : sdivmod_optab)); + optab2 = ((op1_is_pow2 && op1 != const0_rtx) + ? optab1 + : (unsignedp ? udivmod_optab : sdivmod_optab)); for (compute_mode = mode; compute_mode != VOIDmode; compute_mode = GET_MODE_WIDER_MODE (compute_mode)) -- cgit v1.1