Fix unexpected failures in the gas testsuite for sh-hms port

Nick Clifton nickc@redhat.com
Thu Mar 3 16:58:00 GMT 2005


Hi Guys,

  The sh-hms target behaves mostly like the sh-coff target but it
  does have a few differences.  So I am checking in the attached patch
  to fix the unexpected failures in the gas testsuite for this target.

  Incidentally whilst checking this target I came across the problem
  that the 5.26 version of expect cannot handle the regular expression
  syntax used in the gas/sh/arch/arch.exp file.  So I guess we should
  either fix this file or else upgrade the version of expect in the
  binutils repository to a more recent version.  Something to think
  about after the branch.

Cheers
  Nick

gas/testsuite/ChangeLog
2005-03-03  Nick Clifton  <nickc@redhat.com>

	* gas/sh/basic.exp: Add an sh-hms version of the pcrel test.
	* gas/sh/pcrel-hms.d: New file.  Adjusted form of shrel-coff.d for
	the sh-hms target.
	* gas/sh/arch/arch.exp: Expect the same failures for sh-hms port
	as for the sh-coff port.

Index: gas/testsuite/gas/sh/arch/arch.exp
===================================================================
RCS file: /cvs/src/src/gas/testsuite/gas/sh/arch/arch.exp,v
retrieving revision 1.3
diff -c -3 -p -r1.3 arch.exp
*** gas/testsuite/gas/sh/arch/arch.exp	3 Mar 2005 11:48:01 -0000	1.3
--- gas/testsuite/gas/sh/arch/arch.exp	3 Mar 2005 16:51:59 -0000
*************** foreach arch [array names insns_valid] {
*** 503,509 ****
      if {$errormessages == $expected} then {
  	pass "$expected insns should not assemble on $arch"
      } else {
! 	if {[istarget sh*-*-coff] && [string match {*dsp} $arch]} {
  	    xfail "$expected insns should not assemble on $arch ($errormessages did not)"
  	} else {
  	    fail "$expected insns should not assemble on $arch ($errormessages did not)"
--- 503,509 ----
      if {$errormessages == $expected} then {
  	pass "$expected insns should not assemble on $arch"
      } else {
! 	if {([istarget sh*-*-coff] || [istarget sh*-hms]) && [string match {*dsp} $arch]} {
  	    xfail "$expected insns should not assemble on $arch ($errormessages did not)"
  	} else {
  	    fail "$expected insns should not assemble on $arch ($errormessages did not)"
Index: gas/testsuite/gas/sh/basic.exp
===================================================================
RCS file: /cvs/src/src/gas/testsuite/gas/sh/basic.exp,v
retrieving revision 1.18
diff -c -3 -p -r1.18 basic.exp
*** gas/testsuite/gas/sh/basic.exp	30 Jul 2004 00:29:22 -0000	1.18
--- gas/testsuite/gas/sh/basic.exp	3 Mar 2005 16:51:59 -0000
*************** if [istarget sh*-*-*] then {
*** 131,136 ****
--- 131,138 ----
      # dumped as sh4.
      if {[istarget sh*-*coff] || [istarget sh*-pe*] || [istarget sh*-rtems]} then {
  	run_dump_test "pcrel-coff"
+     } elseif {[istarget sh*-hms] } {
+ 	run_dump_test "pcrel-hms"
      } elseif {![istarget sh64*-*-*] && ![istarget sh5*-*-*] } {
  	# Test DSP instructions
  	run_dump_test "dsp"
*** /dev/null	2004-06-24 19:04:38.000000000 +0100
--- gas/testsuite/gas/sh/pcrel-hms.d	2005-03-03 16:54:41.000000000 +0000
***************
*** 0 ****
--- 1,29 ----
+ #as: -big
+ #source: pcrel.s
+ #objdump: -d -EB
+ #name: PC-relative loads
+ #stderr: pcrel.l
+ 
+ .*:     file format .*sh.*
+ 
+ Disassembly of section .text:
+ 
+ 00000000 <code>:
+    0:	d0 04       	mov\.l	14 <litpool>,r0	! 0xffffffec
+    2:	d1 05       	mov\.l	18 <litpool\+0x4>,r1	! 0x90009
+    4:	d1 03       	mov\.l	14 <litpool>,r1	! 0xffffffec
+    6:	d1 03       	mov\.l	14 <litpool>,r1	! 0xffffffec
+    8:	c7 02       	mova	14 <litpool>,r0
+    a:	61 02       	mov\.l	@r0,r1
+    c:	d1 01       	mov\.l	14 <litpool>,r1	! 0xffffffec
+    e:	01 03       	bsrf	r1
+   10:	00 09       	nop	
+   12:	00 09       	nop	
+ 
+ 00000014 <litpool>:
+   14:	ff ff       	\.word 0xffff
+   16:	ff ec       	fmov	fr14,fr15
+   18:	00 09       	nop	
+   1a:	00 09       	nop	
+   1c:	00 09       	nop	
+   1e:	00 09       	nop	
  



More information about the Binutils mailing list