* [PATCH] Fix MIPS gas odd FP register warnings
@ 2006-06-09 13:37 Thiemo Seufer
0 siblings, 0 replies; only message in thread
From: Thiemo Seufer @ 2006-06-09 13:37 UTC (permalink / raw)
To: binutils
Hello All,
I applied the appended patch, it fixes warnings about odd single
FP registers which are legal for MIPS32, and also adds a testcase.
Thiemo
2006-06-09 Thiemo Seufer <ths@mips.com>
Nigel Stephens <nigel@mips.com>
[ gas/ChangeLog ]
* config/tc-mips.c (mips_ip): Maintain argument count.
[ gas/testsuite/ChangeLog ]
* gas/mips/mips32-sf32.s, gas/mips/mips32-sf32.d: New test for odd
single precision FPRs on MIPS32.
* gas/mips/mips.exp: Run them.
Index: gas/config/tc-mips.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-mips.c,v
retrieving revision 1.342
diff -u -p -r1.342 tc-mips.c
--- gas/config/tc-mips.c 8 Jun 2006 15:28:26 -0000 1.342
+++ gas/config/tc-mips.c 9 Jun 2006 11:23:40 -0000
@@ -8620,6 +8620,7 @@ mips_ip (char *str, struct mips_cl_insn
break;
case ',':
+ ++argnum;
if (*s++ == *args)
continue;
s--;
--- gas/testsuite/gas/mips/mips.exp 2006-04-24 11:06:42.000000000 +0100
+++ gas/testsuite/gas/mips/mips.exp 2006-04-24 11:12:25.000000000 +0100
@@ -548,6 +555,8 @@ if { [istarget mips*-*-*] } then {
run_dump_test_arches "mips32" [mips_arch_list_matching mips32]
+ run_dump_test_arches "mips32-sf32" [mips_arch_list_matching mips32]
+
run_dump_test_arches "mips32r2" [mips_arch_list_matching mips32r2]
run_list_test_arches "mips32r2-ill" "-32" \
[mips_arch_list_matching mips32r2 gpr32]
--- gas/testsuite/gas/mips/mips32-sf32.d 1970-01-01 01:00:00.000000000 +0100
+++ gas/testsuite/gas/mips/mips32-sf32.d 2004-09-21 14:01:52.000000000 +0100
@@ -0,0 +1,19 @@
+#objdump: -dr --prefix-addresses --show-raw-insn -M reg-names=numeric
+#name: MIPS32 odd single-precision float registers
+#as: -32
+
+# Check MIPS32 instruction assembly
+
+.*: +file format .*mips.*
+
+Disassembly of section .text:
+0+0000 <[^>]*> 3c013f80 lui \$1,0x3f80
+0+0004 <[^>]*> 44810800 mtc1 \$1,\$f1
+0+0008 <[^>]*> c783c000 lwc1 \$f3,-16384\(\$28\)
+ 8: R_MIPS_LITERAL \.lit4\+0x4000
+0+000c <[^>]*> 46030940 add.s \$f5,\$f1,\$f3
+0+0010 <[^>]*> 46003a21 cvt.d.s \$f8,\$f7
+0+0014 <[^>]*> 46803a21 cvt.d.w \$f8,\$f7
+0+0018 <[^>]*> 462041e0 cvt.s.d \$f7,\$f8
+0+001c <[^>]*> 462041cd trunc.w.d \$f7,\$f8
+ \.\.\.
--- gas/testsuite/gas/mips/mips32-sf32.s 1970-01-01 01:00:00.000000000 +0100
+++ gas/testsuite/gas/mips/mips32-sf32.s 2004-09-21 14:01:52.000000000 +0100
@@ -0,0 +1,14 @@
+
+ .text
+func:
+ .set noreorder
+ li.s $f1, 1.0
+ li.s $f3, 1.9
+ add.s $f5, $f1, $f3
+ cvt.d.s $f8,$f7
+ cvt.d.w $f8,$f7
+ cvt.s.d $f7,$f8
+ trunc.w.d $f7,$f8
+
+# Force at least 8 (non-delay-slot) zero bytes, to make 'objdump' print ...
+ .space 8
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2006-06-09 11:57 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-06-09 13:37 [PATCH] Fix MIPS gas odd FP register warnings Thiemo Seufer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).