From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 350 invoked by alias); 9 Jun 2006 11:57:00 -0000 Received: (qmail 311 invoked by uid 22791); 9 Jun 2006 11:56:59 -0000 X-Spam-Check-By: sourceware.org Received: from yosemite.airs.com (HELO yosemite.airs.com) (205.217.158.180) by sourceware.org (qpsmtpd/0.31) with SMTP; Fri, 09 Jun 2006 11:56:57 +0000 Received: (qmail 18579 invoked from network); 9 Jun 2006 11:54:10 -0000 Received: from bender.bawue.de (193.7.176.20) by yosemite.airs.com with SMTP; 9 Jun 2006 11:54:10 -0000 Received: from lagash (unknown [194.74.144.146]) by bender.bawue.de (Postfix) with ESMTP id 76D09447A6 for ; Fri, 9 Jun 2006 13:53:38 +0200 (MEST) Received: from ths by lagash with local (Exim 4.62) (envelope-from ) id 1FofY5-000143-6U for binutils@sourceware.org; Fri, 09 Jun 2006 12:53:09 +0100 Date: Fri, 09 Jun 2006 13:37:00 -0000 To: binutils@sourceware.org Subject: [PATCH] Fix MIPS gas odd FP register warnings Message-ID: <20060609115309.GG25431@networkno.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.11+cvs20060403 From: Thiemo Seufer X-IsSubscribed: yes Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org X-SW-Source: 2006-06/txt/msg00126.txt.bz2 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 Nigel Stephens [ 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