* gasp.c (change_base): Don't modify numbers in strings. (pr7583)
authorSteve Chamberlain <sac@cygnus>
Tue, 1 Aug 1995 01:31:42 +0000 (01:31 +0000)
committerSteve Chamberlain <sac@cygnus>
Tue, 1 Aug 1995 01:31:42 +0000 (01:31 +0000)
  * testsuite/gas/gasp/*: New.

gas/ChangeLog
gas/gasp.c
gas/testsuite/gas/.Sanitize
gas/testsuite/gas/gasp/.Sanitize [new file with mode: 0644]
gas/testsuite/gas/gasp/assign.asm [new file with mode: 0644]
gas/testsuite/gas/gasp/assign.err [new file with mode: 0644]
gas/testsuite/gas/gasp/assign.out [new file with mode: 0644]
gas/testsuite/gas/gasp/gasp.exp [new file with mode: 0644]
gas/testsuite/gas/gasp/pr7583.asm [new file with mode: 0644]
gas/testsuite/gas/gasp/pr7583.out [new file with mode: 0644]

index d817da1a1d0801805ac56d6e96b622e304473257..3d3269a674ca6cefc0d965ae3c66505c83c9e610 100644 (file)
@@ -1,3 +1,8 @@
+Mon Jul 31 18:19:26 1995  steve chamberlain  <sac@slash.cygnus.com>
+
+       * gasp.c (change_base): Don't modify numbers in strings. (pr7583)
+       * testsuite/gas/gasp/*: New.
+
 Mon Jul 31 12:16:21 1995  Ian Lance Taylor  <ian@cygnus.com>
 
        * config/tc-ppc.h (SUB_SEGMENT_ALIGN): Define.  From Niclas
index 87e55a1dc76cdcb332a9199f06b48a151da94e42..c164412a89a1ea5e1756da5aaa25f47981a028e8 100644 (file)
@@ -1362,6 +1362,18 @@ change_base (idx, in, out)
              idx++;
            }
        }
+      else if (in->ptr[idx] == '"' || in->ptr[idx] == '\'')
+       {
+         char tchar = in->ptr[idx];
+         /* copy entire names through quickly */
+         sb_add_char (out, in->ptr[idx]);
+         idx++;
+         while (idx < in->len && in->ptr[idx] != tchar)
+           {
+             sb_add_char (out, in->ptr[idx]);
+             idx++;
+           }
+       }
       else
        {
          /* nothing special, just pass it through */
index af678de08948574ce92a3933adef3fd07f34a9ac..d05ec005154234bdc95388903ecfba8ab72d9106 100644 (file)
@@ -34,6 +34,7 @@ Things-to-keep:
 all
 alpha
 arm
+gasp
 h8300
 hppa
 i386
diff --git a/gas/testsuite/gas/gasp/.Sanitize b/gas/testsuite/gas/gasp/.Sanitize
new file mode 100644 (file)
index 0000000..09f3cc9
--- /dev/null
@@ -0,0 +1,40 @@
+# Sanitize.in for devo.
+# $Id$
+#
+
+# Each directory to survive it's way into a release will need a file
+# like this one called "./.Sanitize".  All keyword lines must exist,
+# and must exist in the order specified by this file.  Each directory
+# in the tree will be processed, top down, in the following order.
+
+# Hash started lines like this one are comments and will be deleted
+# before anything else is done.  Blank lines will also be squashed
+# out.
+
+# The lines between the "Do-first:" line and the "Things-to-keep:"
+# line are executed as a /bin/sh shell script before anything else is
+# done in this 
+
+Do-first:
+
+
+# All files listed between the "Things-to-keep:" line and the
+# "Files-to-sed:" line will be kept.  All other files will be removed.
+# Directories listed in this section will have their own Sanitize
+# called.  Directories not listed will be removed in their entirety
+# with rm -rf.
+
+Things-to-keep:
+
+assign.asm
+assign.err
+assign.out
+gasp.exp
+pr7583.asm
+pr7583.out
+
+Things-to-lose:
+
+Do-last:
+
+# End of file.
diff --git a/gas/testsuite/gas/gasp/assign.asm b/gas/testsuite/gas/gasp/assign.asm
new file mode 100644 (file)
index 0000000..7f66718
--- /dev/null
@@ -0,0 +1,13 @@
+
+foo:   .ASSIGNC        "hello"
+BAR:   .ASSIGNA        12+34
+
+       \&foo'foo
+       \&foo\&foo\&foo 
+       \&foo \&foo \&foo 
+       \&BAR\&bar\&BAR
+
+
+
+       
+       .END
diff --git a/gas/testsuite/gas/gasp/assign.err b/gas/testsuite/gas/gasp/assign.err
new file mode 100644 (file)
index 0000000..fe3733f
--- /dev/null
@@ -0,0 +1 @@
+assign.asm:8 Can't find preprocessor variable bar.
diff --git a/gas/testsuite/gas/gasp/assign.out b/gas/testsuite/gas/gasp/assign.out
new file mode 100644 (file)
index 0000000..85509ae
--- /dev/null
@@ -0,0 +1,22 @@
+!
+
+!foo:  .ASSIGNC        "hello"
+!BAR:  .ASSIGNA        12+34
+!
+
+!      \&foo'foo
+       hellofoo
+!      \&foo\&foo\&foo 
+       hellohellohello 
+!      \&foo \&foo \&foo 
+       hello hello hello 
+!      \&BAR\&bar\&BAR
+       4646
+!
+
+!
+
+!
+
+!      
+!      .END
diff --git a/gas/testsuite/gas/gasp/gasp.exp b/gas/testsuite/gas/gasp/gasp.exp
new file mode 100644 (file)
index 0000000..26dba01
--- /dev/null
@@ -0,0 +1,33 @@
+
+proc gasp_test { testname }  {
+    global GASP
+    global srcdir
+    
+    send_log "$srcdir/lib/run $GASP -s $testname.asm -o gasp.out \n"
+    catch "exec $srcdir/lib/run $GASP -s $testname.asm -o gasp.out" errs
+    catch "exec diff gasp.out $testname.out" diffs
+    if ![string match "" $diffs] {
+       send_log "$diffs\n"
+       verbose $diffs
+       fail $testname
+       send_log "exec cat gasp.out"
+       return 0
+    } else {
+       pass $testname
+    }
+
+}
+
+
+
+foreach src [ lsort [ glob $srcdir/gas/gasp/*.asm ] ] {
+    regsub -all ".asm" $src "" t
+    gasp_test $t
+}
+
+
+# FIXME: this is here cause of a bug in DejaGnu 1.1.1. When it is no longer
+#        in use, then this can be removed.
+if [info exists errorInfo] then {
+    unset errorInfo
+}
diff --git a/gas/testsuite/gas/gasp/pr7583.asm b/gas/testsuite/gas/gasp/pr7583.asm
new file mode 100644 (file)
index 0000000..c97caf5
--- /dev/null
@@ -0,0 +1,3 @@
+
+     .sdata "v1.0000"
+     .end
diff --git a/gas/testsuite/gas/gasp/pr7583.out b/gas/testsuite/gas/gasp/pr7583.out
new file mode 100644 (file)
index 0000000..a5df1d7
--- /dev/null
@@ -0,0 +1,5 @@
+!
+
+!     .sdata "v1.0000"
+       .byte   118,49,46,48,48,48,48
+!     .end