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]

PATCH: PR gas/4572: division doesn't work on solaris/x86


Hi,

This patch treats `\/' as /.  OK to install?

Thanks.


H.J.
---
gas/

2009-08-04  H.J. Lu  <hongjiu.lu@intel.com>

	 PR gas/4572
	 * app.c (do_scrub_chars): Handle `\/'.

gas/testsuite/

2009-08-04  H.J. Lu  <hongjiu.lu@intel.com>

	 PR gas/4572
	 * gas/i386/divide.s: Test `\/'.
	 * gas/i386/divide.d: Updated.

Index: gas/app.c
===================================================================
--- gas/app.c	(revision 6517)
+++ gas/app.c	(working copy)
@@ -702,6 +702,15 @@ do_scrub_chars (int (*get) (char *, int)
       /* flushchar: */
       ch = GET ();
 
+      /* Handle \/.  */
+      if (ch == '/' && to > tostart && *(to - 1) == '\\')
+	{
+	  to--;
+#ifdef TE_SOLARIS
+	  goto de_fault;
+#endif
+	}
+
 #ifdef TC_IA64
       if (ch == '(' && (state == 0 || state == 1))
 	{
Index: gas/testsuite/gas/i386/divide.d
===================================================================
--- gas/testsuite/gas/i386/divide.d	(revision 6517)
+++ gas/testsuite/gas/i386/divide.d	(working copy)
@@ -5,5 +5,5 @@
 .*: +file format .*
 
 Contents of section .*
- 0000 01000000 02000000 03000000 04000000 .*
- 0010 05000000 .*
+ 0000 01000000 02000000 03000000 05000000 .*
+ 0010 06000000 06000000 .*
Index: gas/testsuite/gas/i386/divide.s
===================================================================
--- gas/testsuite/gas/i386/divide.s	(revision 6517)
+++ gas/testsuite/gas/i386/divide.s	(working copy)
@@ -1,6 +1,7 @@
 start:
- .long 1,2,3,a,b
+ .long 1,2,3,a,b,c
 / This comment should still be allowed with --divide,
 / but the divide must remain a divide in the next line
 a=(.-start)/4-1 # comment
 b=(.-start)/4
+c=(.-start)\/4


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