mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-27 03:51:15 +08:00
19dd1b4833
* ld-m68hc11/adj-jump.d: New test for linker relaxation. * ld-m68hc11/adj-jump.s: Likewise. * ld-m68hc11/adj-brset.s: Likewise. * ld-m68hc11/adj-brset.d: Likewise. * ld-m68hc11/relax-direct.s: Likewise. * ld-m68hc11/relax-direct.d: Likewise. * ld-m68hc11/relax-group.s: Likewise. * ld-m68hc11/relax-group.d: Likewise. * ld-m68hc11/bug-1403.d: Likewise. * ld-m68hc11/bug-1403.s: Likewise.
52 lines
969 B
ArmAsm
52 lines
969 B
ArmAsm
;;; Test 68HC11 linker relaxation and fixup of brclr/brset branches
|
|
;;;
|
|
.sect .text
|
|
.globl _start
|
|
_start:
|
|
start:
|
|
brclr 140,x#200,L8 ; Branch adjustment covers the whole test
|
|
;;; The 'addd' is relaxed and we win 1 byte. The next brclr/brset
|
|
;;; branch must be fixed and reduced by 1. We check for different
|
|
;;; addressing modes because the instruction has different opcode and
|
|
;;; different lengths.
|
|
L1:
|
|
addd _toto
|
|
brclr 20,x,#3,L1
|
|
brclr 90,x,#99,L3 ; Likewise with forward branch
|
|
L2:
|
|
addd _toto
|
|
brclr 19,y,#4,L2
|
|
brclr 91,y,#98,L4
|
|
L3:
|
|
addd _toto
|
|
brset 18,x,#5,L3
|
|
brset 92,x,#97,L5
|
|
L4:
|
|
addd _toto
|
|
brset 17,y,#6,L4
|
|
brset 93,y,#96,L5
|
|
L5:
|
|
addd _toto
|
|
brset *_table,#7,L5
|
|
brset *_table+10,#95,L7
|
|
L6:
|
|
addd _toto
|
|
brclr *_table+1,#8,L6
|
|
brset *_table+11,#94,L8
|
|
L7:
|
|
addd _toto
|
|
brclr *_table+1,#8,L6
|
|
L8:
|
|
brclr 140,x#200,_start ; Branch adjustment covers the whole test
|
|
rts
|
|
|
|
.sect .page0
|
|
_bar:
|
|
.long 0
|
|
_toto:
|
|
.long 0
|
|
.skip 32
|
|
stack:
|
|
.skip 10
|
|
_table:
|