This is the mail archive of the binutils@sources.redhat.com 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]: Update and new tests for %addr and %page HC11 modifiers


Hi!

I committed this patch to add tests for %addr and %page HC11 modifiers.

Stephane

2003-04-05 Stephane Carrez <stcarrez at nerim dot fr>

	* gas/m68hc11/insns.s: Add %page and %addr checks.
	* gas/m68hc11/insns12.s: Likewise.
	* gas/m68hc11/insns-dwarf2.d: Update.
	* gas/m68hc11/insns.d: Update.
Index: gas/m68hc11/insns-dwarf2.d
===================================================================
RCS file: /cvs/src/src/gas/testsuite/gas/m68hc11/insns-dwarf2.d,v
retrieving revision 1.3
diff -u -p -r1.3 insns-dwarf2.d
--- gas/m68hc11/insns-dwarf2.d	1 Dec 2002 13:46:08 -0000	1.3
+++ gas/m68hc11/insns-dwarf2.d	5 Apr 2003 12:50:49 -0000
@@ -107,5 +107,9 @@ L1:	
   57:	84 17       	anda	#23
 	andb #%hi\(test2\)
   59:	c4 00       	andb	#0
+	ldab #%page\(test2\)	; Check that the relocs are against symbol
+  5b:	c6 00       	ldab	#0
+	ldy  #%addr\(test2\)	; otherwise linker relaxation fails
+  5d:	18 ce 00 00 	ldy	#0 <_start>
 	rts
-  5b:	39          	rts
+  61:	39          	rts
Index: gas/m68hc11/insns.d
===================================================================
RCS file: /cvs/src/src/gas/testsuite/gas/m68hc11/insns.d,v
retrieving revision 1.4
diff -u -p -r1.4 insns.d
--- gas/m68hc11/insns.d	1 Dec 2002 13:46:08 -0000	1.4
+++ gas/m68hc11/insns.d	5 Apr 2003 12:50:49 -0000
@@ -62,4 +62,8 @@ Disassembly of section .text:
 [	]+58: R_M68HC11_LO8	\.text
 0+0059 <L1\+0x2> andb	#0
 [	]+5a: R_M68HC11_HI8	\.text
-0+005b <L1\+0x4> rts
+0+5b <L1\+0x4> ldab	#0
+[	]+5c: R_M68HC11_PAGE	test2
+0+5d <L1\+0x6> ldy	#0+ <_start>
+[	]+5f: R_M68HC11_LO16	test2
+0+61 <L1\+0xa> rts
Index: gas/m68hc11/insns.s
===================================================================
RCS file: /cvs/src/src/gas/testsuite/gas/m68hc11/insns.s,v
retrieving revision 1.2
diff -u -p -r1.2 insns.s
--- gas/m68hc11/insns.s	1 Dec 2002 13:46:08 -0000	1.2
+++ gas/m68hc11/insns.s	5 Apr 2003 12:50:49 -0000
@@ -53,6 +53,8 @@ test2:
 L1:	
 	anda #%lo(test2)
 	andb #%hi(test2)
+	ldab #%page(test2)	; Check that the relocs are against symbol
+	ldy  #%addr(test2)	; otherwise linker relaxation fails
 	rts
 
 	.sect .data
Index: gas/m68hc11/insns12.s
===================================================================
RCS file: /cvs/src/src/gas/testsuite/gas/m68hc11/insns12.s,v
retrieving revision 1.1
diff -u -p -r1.1 insns12.s
--- gas/m68hc11/insns12.s	13 Aug 2002 22:45:22 -0000	1.1
+++ gas/m68hc11/insns12.s	5 Apr 2003 12:50:49 -0000
@@ -6,13 +6,13 @@
 call_test:
 	call	_foo		; 24-bit reloc
 	call	_foo,1		; 16-bit reloc, immediate page specification
-	call	_foo,foo_page	; 16-bit reloc and 8-bit page reloc
+	call	_foo,%page(foo_page)	; 16-bit reloc and 8-bit page reloc
 	call	0,x,3		; 8-bit page reloc
 	call	4,y,12
 	call	7,sp,13
-	call	12,x,foo_page	; 8-bit page reloc
-	call	4,y,foo_page
-	call	7,sp,foo_page
+	call	12,x,%page(foo_page)	; 8-bit page reloc
+	call	4,y,%page(foo_page)
+	call	7,sp,%page(foo_page)
 	call	[d,x]		; No reloc
 	ldab	[32767,sp]
 	call	[2048,sp]	; No reloc

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