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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [binutils-2.20.1/] [gas/] [testsuite/] [gas/] [m68hc11/] [bug-1825.s] - Blame information for rev 205

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 205 julius
;;; Bug #1825: gas assemble PC-relative indexed addressing modes incorrectly
2
;;; http://savannah.gnu.org/bugs/?func=detailbug&bug_id=1825&group_id=2424
3
;;; 
4
        .sect .text
5
        .globl _main
6
_main:
7
        nop
8
        ldx     L1,pc           ; Assemble to 5-bit > 0 offset
9
        bra     L2
10
L1:
11
        .dc.w   0xaabb
12
L2:
13
        subd    L1,pc           ; Assemble to 5-bit < 0 offset
14
L3:
15
        .ds.b   14, 0xA7
16
        ldab    L3,pc           ; 5-bit < 0 offset
17
        ldab    L4,pc           ; 5-bit > 0 offset
18
        .skip   15
19
L4:
20
        .skip   128
21
        subd    L4,pc           ; 9-bit < 0 offset
22
        addd    L5,pc           ; 9-bit > 0 offset
23
        .skip   128
24
L5:
25
        .skip   256-3
26
        orab    L5,pc           ; 9 bit < 0 offset (min value)
27
        oraa    L6,pc           ; 9 bit > 0 offset (max value)
28
        .skip   255
29
L6:
30
        .skip   256-2
31
        orab    L6,pc           ; 16 bit < 0 offset
32
        anda    _main,pc        ; 16 bit < 0 offset
33
        andb    L7,pc
34
        .skip   256
35
L7:
36
        stab    external,pc     ; External 16-bit PCREL
37
        ldd     _table,pc
38
        addd    _table+2,pc
39
        subd    _table+4,pc
40
        addd    _table+8,pc
41
        addd    _table+12,pc
42
        addd    _table+16,pc
43
        rts
44
        nop
45
_table:
46
        .ds.b   16,0
47
        leax    _table,sp       ; 16-bit absolute reloc
48
        leay    _table,x
49
        leax    _table,y

powered by: WebSVN 2.1.0

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