This is the mail archive of the binutils@sourceware.org mailing list for the binutils 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: [patch] Arm FPA stfpls


Hi Paul,

There is a small typo in comment. 'Disabiguate' should be Disambiguate I think.

+	  /* Some mnemonics are ambiguous between infix and suffix
+	     conditions.  Disabiguate based on assembly syntax.  */


Thanks


Khem

Paul Brook wrote:

The attached patch fixes a bug introduced with the Arm unified assembly syntax changes.

The "stfpls" instruction is not parsed correctly. This mnemonic matches both an infixed and suffixed instructions (stfs pl and stfp ls respectively).

The problem is that when a conditional suffix matches but is disallowed, the parser returnes failure instead of trying an conditional infix.

Tested with cross to arm-none-eabi.
Ok?

Paul

2005-09-01 Paul Brook <paul@codesourcery.com>

gas/
* config/tc-arm.c (opcode_lookup): Look for infix opcode when
incorrect suffix matches.
gas/testsuite/
* gas/arm/fpa-mem.d: Test "stfpls".
* gas/arm/fpa-mem.s: Ditto.


------------------------------------------------------------------------

Index: gas/config/tc-arm.c
===================================================================
RCS file: /var/cvsroot/src-cvs/src/gas/config/tc-arm.c,v
retrieving revision 1.220
diff -u -p -r1.220 tc-arm.c
--- gas/config/tc-arm.c	15 Aug 2005 19:19:54 -0000	1.220
+++ gas/config/tc-arm.c	1 Sep 2005 18:50:17 -0000
@@ -7676,8 +7676,10 @@ opcode_lookup (char **str)
	{
	case OT_cinfix3:
	case OT_odd_infix_unc:
+	  /* Some mnemonics are ambiguous between infix and suffix
+	     conditions.  Disabiguate based on assembly syntax.  */
	  if (!unified_syntax)
-	    return 0;
+	    break;
	  /* else fall through */

case OT_csuffix:
Index: gas/testsuite/gas/arm/fpa-mem.d
===================================================================
RCS file: /var/cvsroot/src-cvs/src/gas/testsuite/gas/arm/fpa-mem.d,v
retrieving revision 1.4
diff -u -p -r1.4 fpa-mem.d
--- gas/testsuite/gas/arm/fpa-mem.d 3 Nov 2003 14:47:37 -0000 1.4
+++ gas/testsuite/gas/arm/fpa-mem.d 1 Sep 2005 18:57:39 -0000
@@ -30,5 +30,5 @@ Disassembly of section .text:
0+4c <[^>]*> ed800200 ? sfm f0, 4, \[r0\]
0+50 <[^>]*> ed00020c ? sfm f0, 4, \[r0, #-48\]
0+54 <[^>]*> ed800200 ? sfm f0, 4, \[r0\]
-0+58 <[^>]*> e1a00000 ? nop[ ]+\(mov r0,r0\)
-0+5c <[^>]*> e1a00000 ? nop[ ]+\(mov r0,r0\)
+0+58 <[^>]*> 5d800100 ? stfpls f0, \[r0\]
+0+5c <[^>]*> 9dc08100 ? stflsp f0, \[r0\]
Index: gas/testsuite/gas/arm/fpa-mem.s
===================================================================
RCS file: /var/cvsroot/src-cvs/src/gas/testsuite/gas/arm/fpa-mem.s,v
retrieving revision 1.2
diff -u -p -r1.2 fpa-mem.s
--- gas/testsuite/gas/arm/fpa-mem.s 22 Aug 2002 16:10:04 -0000 1.2
+++ gas/testsuite/gas/arm/fpa-mem.s 1 Sep 2005 18:55:05 -0000
@@ -25,7 +25,10 @@ F:
sfmfd f0, 4, [r0]
sfmea f0, 4, [r0]

- # Add two nop instructions to ensure that the
- # output is 32-byte aligned as required for arm-aout.
- nop
- nop
+ # Test mnemonic that is ambiguous between infix and suffic
+ # condition codes
+ # sfts condition code pl
+ stfpls f0, [r0]
+ .syntax unified
+ # stfp condition code ls
+ stfpls f0, [r0]




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