From ab53523a33a3ffc4b894375f26fd22018248890d Mon Sep 17 00:00:00 2001 From: Stephane Carrez Date: Sat, 5 Apr 2003 12:54:00 +0000 Subject: [PATCH] * 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. --- gas/testsuite/ChangeLog | 7 +++++++ gas/testsuite/gas/m68hc11/insns-dwarf2.d | 6 +++++- gas/testsuite/gas/m68hc11/insns.d | 6 +++++- gas/testsuite/gas/m68hc11/insns.s | 2 ++ gas/testsuite/gas/m68hc11/insns12.s | 8 ++++---- 5 files changed, 23 insertions(+), 6 deletions(-) diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index b550e710131..592a916cca0 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2003-04-05 Stephane Carrez + + * 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. + 2003-04-04 Chris Demetriou * gas/mips/mips5.d: New test. diff --git a/gas/testsuite/gas/m68hc11/insns-dwarf2.d b/gas/testsuite/gas/m68hc11/insns-dwarf2.d index ec5c79162bd..7b4b9ac3a3f 100644 --- a/gas/testsuite/gas/m68hc11/insns-dwarf2.d +++ b/gas/testsuite/gas/m68hc11/insns-dwarf2.d @@ -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 diff --git a/gas/testsuite/gas/m68hc11/insns.d b/gas/testsuite/gas/m68hc11/insns.d index a26f595229b..41cb4b0982b 100644 --- a/gas/testsuite/gas/m68hc11/insns.d +++ b/gas/testsuite/gas/m68hc11/insns.d @@ -62,4 +62,8 @@ Disassembly of section .text: [ ]+58: R_M68HC11_LO8 \.text 0+0059 andb #0 [ ]+5a: R_M68HC11_HI8 \.text -0+005b rts +0+5b ldab #0 +[ ]+5c: R_M68HC11_PAGE test2 +0+5d ldy #0+ <_start> +[ ]+5f: R_M68HC11_LO16 test2 +0+61 rts diff --git a/gas/testsuite/gas/m68hc11/insns.s b/gas/testsuite/gas/m68hc11/insns.s index 9c642c25d91..90f08b661ca 100644 --- a/gas/testsuite/gas/m68hc11/insns.s +++ b/gas/testsuite/gas/m68hc11/insns.s @@ -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 diff --git a/gas/testsuite/gas/m68hc11/insns12.s b/gas/testsuite/gas/m68hc11/insns12.s index 34364fd6396..fb3f424c0a2 100644 --- a/gas/testsuite/gas/m68hc11/insns12.s +++ b/gas/testsuite/gas/m68hc11/insns12.s @@ -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 -- 2.30.2