]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gas/
authorMark Shinwell <shinwell@codesourcery.com>
Tue, 15 May 2007 10:06:03 +0000 (10:06 +0000)
committerMark Shinwell <shinwell@codesourcery.com>
Tue, 15 May 2007 10:06:03 +0000 (10:06 +0000)
* app.c (do_scrub_chars): Don't damage \@ pseudo-variables.

gas/testsuite/
* gas/arm/backslash-at.d: New.
* gas/arm/backslash-at.s: New.

gas/ChangeLog
gas/app.c
gas/testsuite/ChangeLog
gas/testsuite/gas/arm/backslash-at.d [new file with mode: 0644]
gas/testsuite/gas/arm/backslash-at.s [new file with mode: 0644]

index 2a03e5acb116beb97ce4d036fd40e0bcc19cfaef..85bbe2608227d68eb6412343fe12dfec37e513a3 100644 (file)
@@ -1,3 +1,7 @@
+2007-05-15  Mark Shinwell  <shinwell@codesourcery.com>
+
+       * app.c (do_scrub_chars): Don't damage \@ pseudo-variables.
+
 2007-05-15  Vincent Riviere  <vincent.riviere@freesbee.fr>     
 
        PR gas/3041
index d2308596dc4e1c227a88fd83053957c7c97828c2..aa180044e7c98bc5e1dd3c6292d2f97bd15b6abf 100644 (file)
--- a/gas/app.c
+++ b/gas/app.c
@@ -1219,6 +1219,15 @@ do_scrub_chars (int (*get) (char *, int), char *tostart, int tolen)
          if ((symver_state != NULL) && (*symver_state == 0))
            goto de_fault;
 #endif
+
+#ifdef TC_ARM
+         /* For the ARM, care is needed not to damage occurrences of \@
+            by stripping the @ onwards.  Yuck.  */
+         if (to > tostart && *(to - 1) == '\\')
+           /* Do not treat the @ as a start-of-comment.  */
+           goto de_fault;
+#endif
+
 #ifdef WARN_COMMENTS
          if (!found_comment)
            as_where (&found_comment_file, &found_comment);
index 4b4b2dba8838ec1d5f8dd2498ec1ab1bc47ae4b5..05e191e56fa4f117a0b06e7d559bf293ca8d50c0 100644 (file)
@@ -1,3 +1,8 @@
+2007-05-15  Mark Shinwell  <shinwell@codesourcery.com>
+
+       * gas/arm/backslash-at.d: New.
+       * gas/arm/backslash-at.s: New.
+
 2007-05-15  Vincent Riviere  <vincent.riviere@freesbee.fr>
            Nick Clifton  <nickc@redhat.com>
 
diff --git a/gas/testsuite/gas/arm/backslash-at.d b/gas/testsuite/gas/arm/backslash-at.d
new file mode 100644 (file)
index 0000000..a51def5
--- /dev/null
@@ -0,0 +1,16 @@
+#objdump: -dr --prefix-addresses --show-raw-insn
+#name: Backslash-at for ARM
+
+.*:     file format .*arm.*
+
+Disassembly of section .text:
+00000000 <.text> 615c          .short  0x615c
+00000002 <foo> e3a00000        mov     r0, #0  ; 0x0
+00000006 <foo\+0x4> e3a00000   mov     r0, #0  ; 0x0
+0000000a <foo\+0x8> e3a00000   mov     r0, #0  ; 0x0
+0000000e <foo\+0xc> e3a00001   mov     r0, #1  ; 0x1
+00000012 <foo\+0x10> e3a00001  mov     r0, #1  ; 0x1
+00000016 <foo\+0x14> e3a00001  mov     r0, #1  ; 0x1
+0000001a <foo\+0x18> e3a00002  mov     r0, #2  ; 0x2
+0000001e <foo\+0x1c> e3a00002  mov     r0, #2  ; 0x2
+00000022 <foo\+0x20> e3a00002  mov     r0, #2  ; 0x2
diff --git a/gas/testsuite/gas/arm/backslash-at.s b/gas/testsuite/gas/arm/backslash-at.s
new file mode 100644 (file)
index 0000000..4975aea
--- /dev/null
@@ -0,0 +1,16 @@
+@ Check that \@ is not destroyed when assembling for the ARM.
+
+.macro bar
+       mov     r0, #\@
+       mov     r0, #\@@comment
+       mov     r0, #\@ @comment
+.endm
+
+.byte  '\\
+.byte  '\a
+
+foo:
+       bar
+       bar
+       bar
+