aboutsummaryrefslogtreecommitdiff
path: root/gcc/optabs.c
diff options
context:
space:
mode:
authorRichard Kenner <kenner@vlsi1.ultra.nyu.edu>2000-05-22 20:47:40 +0000
committerRichard Kenner <kenner@gcc.gnu.org>2000-05-22 16:47:40 -0400
commit678164a58ea994d4602b1f6b778cd354bcdf1593 (patch)
tree8d94656fe95d158621c4e607e6935a98b11634de /gcc/optabs.c
parent1eccefcd18d72ed9b9b2cd09202717c452867333 (diff)
downloadgcc-678164a58ea994d4602b1f6b778cd354bcdf1593.zip
gcc-678164a58ea994d4602b1f6b778cd354bcdf1593.tar.gz
gcc-678164a58ea994d4602b1f6b778cd354bcdf1593.tar.bz2
optabs.c (can_extend_p): Allow unsignedp to have any nonzero value.
* optabs.c (can_extend_p): Allow unsignedp to have any nonzero value. (gen_extend_insn, can_fix_p, can_float_p): Likewise. From-SVN: r34087
Diffstat (limited to 'gcc/optabs.c')
-rw-r--r--gcc/optabs.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/gcc/optabs.c b/gcc/optabs.c
index 9f98715..8007da3 100644
--- a/gcc/optabs.c
+++ b/gcc/optabs.c
@@ -3807,7 +3807,7 @@ can_extend_p (to_mode, from_mode, unsignedp)
enum machine_mode to_mode, from_mode;
int unsignedp;
{
- return extendtab[(int) to_mode][(int) from_mode][unsignedp];
+ return extendtab[(int) to_mode][(int) from_mode][unsignedp != 0];
}
/* Generate the body of an insn to extend Y (with mode MFROM)
@@ -3819,7 +3819,7 @@ gen_extend_insn (x, y, mto, mfrom, unsignedp)
enum machine_mode mto, mfrom;
int unsignedp;
{
- return (GEN_FCN (extendtab[(int) mto][(int) mfrom][unsignedp]) (x, y));
+ return (GEN_FCN (extendtab[(int) mto][(int) mfrom][unsignedp != 0]) (x, y));
}
/* can_fix_p and can_float_p say whether the target machine
@@ -3838,13 +3838,14 @@ can_fix_p (fixmode, fltmode, unsignedp, truncp_ptr)
int *truncp_ptr;
{
*truncp_ptr = 0;
- if (fixtrunctab[(int) fltmode][(int) fixmode][unsignedp] != CODE_FOR_nothing)
- return fixtrunctab[(int) fltmode][(int) fixmode][unsignedp];
+ if (fixtrunctab[(int) fltmode][(int) fixmode][unsignedp != 0]
+ != CODE_FOR_nothing)
+ return fixtrunctab[(int) fltmode][(int) fixmode][unsignedp != 0];
if (ftrunc_optab->handlers[(int) fltmode].insn_code != CODE_FOR_nothing)
{
*truncp_ptr = 1;
- return fixtab[(int) fltmode][(int) fixmode][unsignedp];
+ return fixtab[(int) fltmode][(int) fixmode][unsignedp != 0];
}
return CODE_FOR_nothing;
}
@@ -3854,7 +3855,7 @@ can_float_p (fltmode, fixmode, unsignedp)
enum machine_mode fixmode, fltmode;
int unsignedp;
{
- return floattab[(int) fltmode][(int) fixmode][unsignedp];
+ return floattab[(int) fltmode][(int) fixmode][unsignedp != 0];
}
/* Generate code to convert FROM to floating point