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

Subversion Repositories open8_urisc

[/] [open8_urisc/] [trunk/] [gnu/] [binutils/] [ld/] [testsuite/] [ld-m68hc11/] [relax-direct.s] - Blame information for rev 93

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 75 khays
;;; Test 68HC11 linker relaxation from extended addressing to direct
2
;;; addressing modes
3
;;; 
4
        .sect .text
5
        .globl _start
6
_start:
7
start:
8
        lds     stack
9
        ldd     _bar
10
        beq     F1
11
        beq     F2
12
        std     _bar
13
        jsr     _bar
14
F1:
15
        addd    _toto
16
        bne     start
17
        ;; All the following instructions will be relaxed and win 1 byte
18
        ;; for each.
19
        addd    _toto+200
20
        addd    stack+256-20
21
        adca    _table+2
22
        adcb    _table+3
23
        adda    _table+4
24
        addb    _table+5
25
        addd    _table+6
26
        anda    _table+7
27
        andb    _table+8
28
        cmpa    _table+9
29
        cmpb    _table+10
30
        cpd     _table+11
31
        cpx     _table+12
32
        cpy     _table+13
33
        eora    _table+14
34
        eorb    _table+15
35
        jsr     _table+16
36
        ldaa    _table+17
37
        ldab    _table+18
38
        ldd     _table+19
39
        lds     _table+20
40
        ldx     _table+21
41
        ldy     _table+22
42
        oraa    _table+23
43
        orab    _table+24
44
        sbcb    _table+25
45
        sbca    _table+26
46
        staa    _table+27
47
        stab    _table+28
48
        std     _table+29
49
        sts     _table+30
50
        stx     _table+31
51
        sty     _table+32
52
        suba    _table+33
53
        subb    _table+34
54
        subd    _table+35
55
        ;; 'bne' is assembled as far branch and must relax to 
56
        ;; a relative 8-bit branch.
57
        bne     _start
58
        ;; Likewise for next branch
59
        bra     F1
60
        rts
61
 
62
;;; The following instructions will not be relaxed
63
no_relax:
64
        addd    _stack_top+60
65
        std     _stack_top+40
66
        ;; 'tst' does not support direct addressing mode.
67
        tst     _toto+1
68
        bne     no_relax
69
        .skip   200
70
F2:
71
        bra     _start
72
 
73
        .sect   .page0
74
_bar:
75
        .long   0
76
_toto:
77
        .long   0
78
        .skip   32
79
stack:
80
        .skip   10
81
_table:
82
        .skip   200
83
_stack_top:
84
 

powered by: WebSVN 2.1.0

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