From 42d5d0f171ae6a0f933ed7d6cf3adeb653db19c5 Mon Sep 17 00:00:00 2001 From: Bernd Schmidt Date: Mon, 18 Sep 2000 17:21:25 +0000 Subject: [PATCH] Fix for sh minipool generation From-SVN: r36500 --- gcc/ChangeLog | 2 ++ gcc/config/sh/sh.c | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 11ce53b6a02..2a26741ead2 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -9,6 +9,8 @@ * sh.md (floatsisf2_i4, floatsidf2_i, extendsfdf2_i4): Use it for input operand that needs to be in fpul. (fix_truncsfsi2, fix_truncsfsi2_i4): Use register_operand for output. + * sh.c (find_barrier): Take into account that machine_dependent_reorg + might add new insns. 2000-09-18 Alexandre Oliva diff --git a/gcc/config/sh/sh.c b/gcc/config/sh/sh.c index bd2a3828de2..afc0dca0c17 100644 --- a/gcc/config/sh/sh.c +++ b/gcc/config/sh/sh.c @@ -2201,6 +2201,14 @@ find_barrier (num_mova, mova, from) if (num_mova) si_limit -= GET_MODE_SIZE (mode); } + + /* See the code in machine_dependent_reorg, which has a similar if + statement that generates new mova insn in many cases. */ + if (GET_CODE (dst) == REG + && ((REGNO (dst) >= FIRST_FP_REG + && REGNO (dst) <= LAST_XD_REG) + || REGNO (dst) == FPUL_REG)) + inc += 2; } if (mova_p (from))