URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Go to most recent revision |
Only display areas with differences |
Details |
Blame |
View Log
Rev 38 |
Rev 156 |
;;; Test 68HC11 linker relaxation from extended addressing to direct
|
;;; Test 68HC11 linker relaxation from extended addressing to direct
|
;;; addressing modes
|
;;; addressing modes
|
;;;
|
;;;
|
.sect .text
|
.sect .text
|
.globl _start
|
.globl _start
|
_start:
|
_start:
|
start:
|
start:
|
lds stack
|
lds stack
|
ldd _bar
|
ldd _bar
|
beq F1
|
beq F1
|
beq F2
|
beq F2
|
std _bar
|
std _bar
|
jsr _bar
|
jsr _bar
|
F1:
|
F1:
|
addd _toto
|
addd _toto
|
bne start
|
bne start
|
;; All the following instructions will be relaxed and win 1 byte
|
;; All the following instructions will be relaxed and win 1 byte
|
;; for each.
|
;; for each.
|
addd _toto+200
|
addd _toto+200
|
addd stack+256-20
|
addd stack+256-20
|
adca _table+2
|
adca _table+2
|
adcb _table+3
|
adcb _table+3
|
adda _table+4
|
adda _table+4
|
addb _table+5
|
addb _table+5
|
addd _table+6
|
addd _table+6
|
anda _table+7
|
anda _table+7
|
andb _table+8
|
andb _table+8
|
cmpa _table+9
|
cmpa _table+9
|
cmpb _table+10
|
cmpb _table+10
|
cpd _table+11
|
cpd _table+11
|
cpx _table+12
|
cpx _table+12
|
cpy _table+13
|
cpy _table+13
|
eora _table+14
|
eora _table+14
|
eorb _table+15
|
eorb _table+15
|
jsr _table+16
|
jsr _table+16
|
ldaa _table+17
|
ldaa _table+17
|
ldab _table+18
|
ldab _table+18
|
ldd _table+19
|
ldd _table+19
|
lds _table+20
|
lds _table+20
|
ldx _table+21
|
ldx _table+21
|
ldy _table+22
|
ldy _table+22
|
oraa _table+23
|
oraa _table+23
|
orab _table+24
|
orab _table+24
|
sbcb _table+25
|
sbcb _table+25
|
sbca _table+26
|
sbca _table+26
|
staa _table+27
|
staa _table+27
|
stab _table+28
|
stab _table+28
|
std _table+29
|
std _table+29
|
sts _table+30
|
sts _table+30
|
stx _table+31
|
stx _table+31
|
sty _table+32
|
sty _table+32
|
suba _table+33
|
suba _table+33
|
subb _table+34
|
subb _table+34
|
subd _table+35
|
subd _table+35
|
;; 'bne' is assembled as far branch and must relax to
|
;; 'bne' is assembled as far branch and must relax to
|
;; a relative 8-bit branch.
|
;; a relative 8-bit branch.
|
bne _start
|
bne _start
|
;; Likewise for next branch
|
;; Likewise for next branch
|
bra F1
|
bra F1
|
rts
|
rts
|
|
|
;;; The following instructions will not be relaxed
|
;;; The following instructions will not be relaxed
|
no_relax:
|
no_relax:
|
addd _stack_top+60
|
addd _stack_top+60
|
std _stack_top+40
|
std _stack_top+40
|
;; 'tst' does not support direct addressing mode.
|
;; 'tst' does not support direct addressing mode.
|
tst _toto+1
|
tst _toto+1
|
bne no_relax
|
bne no_relax
|
.skip 200
|
.skip 200
|
F2:
|
F2:
|
bra _start
|
bra _start
|
|
|
.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:
|
.skip 200
|
.skip 200
|
_stack_top:
|
_stack_top:
|
|
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.