This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RX: 4.5 branch: Fix alignment and addressing issues.


On Wed, Mar 16, 2011 at 4:48 AM, Nick Clifton <nickc@redhat.com> wrote:
> Hi Guys,
>
> ÂI am checking in the attached patch to fix some regressions in the RX
> Âport with regard to alignment and addressing modes. ÂWith this patch
> Âapplied I have 18 fewer failures in the GCC testsuite.

> +   (set_attr "length"  "5")] ;; Worst case sceanario.  FIXME: If we defined separate patterns
> +)                            ;; rather than using iterators we could specify exact sizes.

You can set up the correct length even without using separate patterns.
An example can be found in mips/mips.md:
(define_insn "*div<mode>3"
  [(set (match_operand:ANYF 0 "register_operand" "=f")
	(div:ANYF (match_operand:ANYF 1 "register_operand" "f")
		  (match_operand:ANYF 2 "register_operand" "f")))]
  "<divide_condition>"
{
  if (TARGET_FIX_SB1)
    return "div.<fmt>\t%0,%1,%2\;mov.<fmt>\t%0,%0";
  else
    return "div.<fmt>\t%0,%1,%2";
}
  [(set_attr "type" "fdiv")
   (set_attr "mode" "<UNITMODE>")
   (set (attr "length")
        (if_then_else (ne (symbol_ref "TARGET_FIX_SB1") (const_int 0))
                      (const_int 8)
                      (const_int 4)))])

Thanks,
Andrew Pinski


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]