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 RFA] A test for .rept (Was: [patch committed] SH: Define md_optimize_expr)


Hans-Peter Nilsson <hp@bitrange.com>:
> Pretty please commit the test-case too, particularly as it seem so simple.
> (Please don't feel singled out; you're definitely not the only
> one, people tend to forget this much too often.)

Certainly.  The appended is a new test.  It passes on sh-* and
i686-pc-linux-gnu.  Ok for the mainline?

Regards,
	kaz
--
2007-04-15  Kaz Kojima  <kkojima@rr.iij4u.or.jp>

	* gas/macros/rept2.d: New file.
	* gas/macros/rept2.s: Likewise.
	* gas/macros/macros.exp: Run rept2.

diff -uprN ORIG/src/gas/testsuite/gas/macros/macros.exp LOCAL/src/gas/testsuite/gas/macros/macros.exp
--- ORIG/src/gas/testsuite/gas/macros/macros.exp	2006-02-28 16:55:36.000000000 +0900
+++ LOCAL/src/gas/testsuite/gas/macros/macros.exp	2007-04-15 08:14:30.000000000 +0900
@@ -26,6 +26,7 @@ run_dump_test test3
 if { ![istarget *c54x*-*-*] && ![istarget *c4x*-*-*] } {
     run_dump_test irp
     run_dump_test rept
+    run_dump_test rept2
     run_dump_test repeat
     run_dump_test vararg
 }
diff -uprN ORIG/src/gas/testsuite/gas/macros/rept2.d LOCAL/src/gas/testsuite/gas/macros/rept2.d
--- ORIG/src/gas/testsuite/gas/macros/rept2.d	1970-01-01 09:00:00.000000000 +0900
+++ LOCAL/src/gas/testsuite/gas/macros/rept2.d	2007-04-15 08:16:57.000000000 +0900
@@ -0,0 +1,8 @@
+#objdump: -s -j .data -j "\$DATA\$"
+#name: macro rept argument
+
+.*: .*
+
+Contents of section (\.data|\$DATA\$):
+ 0000 00000000 01010101[ 	]+................[ 	]*
+#pass
diff -uprN ORIG/src/gas/testsuite/gas/macros/rept2.s LOCAL/src/gas/testsuite/gas/macros/rept2.s
--- ORIG/src/gas/testsuite/gas/macros/rept2.s	1970-01-01 09:00:00.000000000 +0900
+++ LOCAL/src/gas/testsuite/gas/macros/rept2.s	2007-04-15 08:04:30.000000000 +0900
@@ -0,0 +1,6 @@
+ .data
+bar:
+	.long	0
+	.rept	. - bar
+	.byte	1
+	.endr


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