This is the mail archive of the gcc@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: SH optimized software floating point routines


> Joern Rennecke <joern.rennecke@embecosm.com> wrote:
>> That's a bug, then; we shouldn't use a library function there,
>> but the cmpordered[sd]f_t_4 patterns.
> 
> Argh, I've missed the required patterns are incorporated already
> in your patch.  I'll test it again with sh-softfp-predicate-fix
> when the tests for 4.5.1-rc are done.  Thanks!

I've tested sh-softfp-20100718-2131 + sh-softfp-predicate-fix
on -m1, -m2, -m3, -m3 -ml, -m2a on sh-elf, sh4-linux and
sh64-linux.  sh64-linux required the first hunk of the attached
patch to build.  The test with -m3 -ml shows some regressions
which look to be solved with the second hunk of the patch.
Now all test results look clean.

For NaN issue, I'd like to wait a full patch from Christian.
I'm curious again about the numbers with/without it.

Regards,
	kaz
--
	* config/sh/sh.md (cstoresf4): Fix typos.
	* config/sh/ieee-754-df.S (unorddf2): Use DBL1H instead of r6.

diff -upr ORIG/trunk/gcc/config/sh/sh.md trunk/gcc/config/sh/sh.md
--- ORIG/trunk/gcc/config/sh/sh.md	Wed Jul 21 08:12:23 2010
+++ trunk/gcc/config/sh/sh.md	Thu Jul 22 10:36:36 2010
@@ -9462,10 +9462,10 @@ mov.l\\t1f,r0\\n\\
   "TARGET_SH1 || TARGET_SHMEDIA_FPU"
   "if (TARGET_SHMEDIA)
      {
-       if (!arith_operand (operands[2], DFmode))
-	 operands[2] = copy_to_mode_reg (DFmode, operands[2]);
-       if (!arith_operand (operands[3], DFmode))
-	 operands[3] = copy_to_mode_reg (DFmode, operands[3]);
+       if (!arith_operand (operands[2], SFmode))
+	 operands[2] = copy_to_mode_reg (SFmode, operands[2]);
+       if (!arith_operand (operands[3], SFmode))
+	 operands[3] = copy_to_mode_reg (SFmode, operands[3]);
        emit_insn (gen_cstore4_media (operands[0], operands[1],
 				     operands[2], operands[3]));
        DONE;
diff -uprN ORIG/trunk/gcc/config/sh/ieee-754-df.S trunk/gcc/config/sh/ieee-754-df.S
--- ORIG/trunk/gcc/config/sh/ieee-754-df.S	2010-07-20 11:39:29.000000000 +0900
+++ trunk/gcc/config/sh/ieee-754-df.S	2010-07-22 13:16:07.000000000 +0900
@@ -123,7 +123,7 @@ GLOBAL(unorddf2):
 	mov.l	LOCAL(c_DF_NAN_MASK),r1
 	not	DBL0H,r0
 	tst	r1,r0
-	not	r6,r0
+	not	DBL1H,r0
 	bt	LOCAL(unord)
 	tst	r1,r0
 LOCAL(unord):


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