OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [binutils-2.18.50/] [ld/] [testsuite/] [ld-m68hc11/] [adj-jump.s] - Diff between revs 38 and 156

Only display areas with differences | Details | Blame | View Log

Rev 38 Rev 156
;;; Test 68HC11 linker relaxation and fixup of bcc/bra branches
;;; Test 68HC11 linker relaxation and fixup of bcc/bra branches
;;; 
;;; 
        .sect .text
        .sect .text
        .globl _start
        .globl _start
_start:
_start:
        ;; Next 'bra' is assembled as a 'jmp'.  It is relaxed to 'bra L3'
        ;; Next 'bra' is assembled as a 'jmp'.  It is relaxed to 'bra L3'
        ;; during a second pass of relax.
        ;; during a second pass of relax.
        bra     L3
        bra     L3
        .skip   20
        .skip   20
        ;; Next 'jmp' must be relaxed to a 'bra' during the first pass.
        ;; Next 'jmp' must be relaxed to a 'bra' during the first pass.
        ;; The branch offset must then be adjusted by consecutive relax.
        ;; The branch offset must then be adjusted by consecutive relax.
        jmp     L3
        jmp     L3
L1:
L1:
        addd    0,x
        addd    0,x
        bne     L1              ; Branch not adjusted
        bne     L1              ; Branch not adjusted
        addd    _toto
        addd    _toto
        beq     L1              ; Backward branch, adjust -1
        beq     L1              ; Backward branch, adjust -1
        addd    _toto+1
        addd    _toto+1
        jbne    L1              ; Backward branch, adjust -2
        jbne    L1              ; Backward branch, adjust -2
        bgt     L1              ; All possible backward branchs, adjust -2
        bgt     L1              ; All possible backward branchs, adjust -2
        bge     L1
        bge     L1
        beq     L1
        beq     L1
        ble     L1
        ble     L1
        blt     L1
        blt     L1
        bhi     L1
        bhi     L1
        bhs     L1
        bhs     L1
        beq     L1
        beq     L1
        bls     L1
        bls     L1
        blo     L1
        blo     L1
        bcs     L1
        bcs     L1
        bmi     L1
        bmi     L1
        bvs     L1
        bvs     L1
        bcc     L1
        bcc     L1
        bpl     L1
        bpl     L1
        bvc     L1
        bvc     L1
        bne     L1
        bne     L1
        brn     L1
        brn     L1
        bra     L1
        bra     L1
        ;; Relax several insn to reduce block by 15
        ;; Relax several insn to reduce block by 15
        addd    _toto
        addd    _toto
        addd    _toto
        addd    _toto
        addd    _toto
        addd    _toto
        addd    _toto
        addd    _toto
        addd    _toto
        addd    _toto
        addd    _toto
        addd    _toto
        addd    _toto
        addd    _toto
        addd    _toto
        addd    _toto
        addd    _toto
        addd    _toto
        addd    _toto
        addd    _toto
        addd    _toto
        addd    _toto
        addd    _toto
        addd    _toto
        addd    _toto
        addd    _toto
        addd    _toto
        addd    _toto
        addd    _toto
        addd    _toto
L2:
L2:
        jmp     _start          ; -> relax to bra _start
        jmp     _start          ; -> relax to bra _start
        bne     L2              ; Backward branch, adjust -1
        bne     L2              ; Backward branch, adjust -1
        beq     L3              ; Forward branch, adjust -2
        beq     L3              ; Forward branch, adjust -2
        addd    _toto
        addd    _toto
        beq     L3              ; Forward branch, adjust -1
        beq     L3              ; Forward branch, adjust -1
        addd    _toto
        addd    _toto
L3:
L3:
        addd    _toto
        addd    _toto
        rts
        rts
 
 
        .sect   .page0
        .sect   .page0
_bar:
_bar:
        .long   0
        .long   0
_toto:
_toto:
        .long   0
        .long   0
        .skip   32
        .skip   32
stack:
stack:
        .skip   10
        .skip   10
_table:
_table:
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.