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 157 |
Rev 223 |
comment "subroutine prologue"
|
comment "subroutine prologue"
|
.macro gdbasm_enter
|
.macro gdbasm_enter
|
ldx _.frame
|
ldx _.frame
|
pshx
|
pshx
|
sts _.frame
|
sts _.frame
|
.endm
|
.endm
|
|
|
comment "subroutine epilogue"
|
comment "subroutine epilogue"
|
.macro gdbasm_leave
|
.macro gdbasm_leave
|
pulx
|
pulx
|
stx _.frame
|
stx _.frame
|
rts
|
rts
|
.endm
|
.endm
|
|
|
.macro gdbasm_call subr
|
.macro gdbasm_call subr
|
jsr \subr
|
jsr \subr
|
.endm
|
.endm
|
|
|
.macro gdbasm_several_nops
|
.macro gdbasm_several_nops
|
nop
|
nop
|
nop
|
nop
|
nop
|
nop
|
nop
|
nop
|
.endm
|
.endm
|
|
|
comment "exit (0)"
|
comment "exit (0)"
|
.macro gdbasm_exit0
|
.macro gdbasm_exit0
|
clra
|
clra
|
clrb
|
clrb
|
wai
|
wai
|
.endm
|
.endm
|
|
|
comment "crt0 startup"
|
comment "crt0 startup"
|
.macro gdbasm_startup
|
.macro gdbasm_startup
|
.sect .data
|
.sect .data
|
.globl _.frame
|
.globl _.frame
|
_.frame: .word 0
|
_.frame: .word 0
|
.previous
|
.previous
|
lds #0x2000
|
lds #0x2000
|
; the linker script maps the data section in ROM (LMA) for its initial
|
; the linker script maps the data section in ROM (LMA) for its initial
|
; content and in RAM (VMA) for its runtime value. We have to do
|
; content and in RAM (VMA) for its runtime value. We have to do
|
; what the default crt0 does: copy the ROM part in RAM.
|
; what the default crt0 does: copy the ROM part in RAM.
|
; (otherwise any 'globalvar' appears uninitialized)
|
; (otherwise any 'globalvar' appears uninitialized)
|
ldx #__data_image
|
ldx #__data_image
|
ldy #__data_section_start
|
ldy #__data_section_start
|
bra Start_map
|
bra Start_map
|
Loop:
|
Loop:
|
ldaa 0,x
|
ldaa 0,x
|
staa 0,y
|
staa 0,y
|
inx
|
inx
|
iny
|
iny
|
Start_map:
|
Start_map:
|
cpx #__data_image_end
|
cpx #__data_image_end
|
blo Loop
|
blo Loop
|
Done:
|
Done:
|
clr _.frame
|
clr _.frame
|
clr _.frame+1
|
clr _.frame+1
|
.endm
|
.endm
|
|
|
comment "Declare a data variable"
|
comment "Declare a data variable"
|
.purgem gdbasm_datavar
|
.purgem gdbasm_datavar
|
.macro gdbasm_datavar name value
|
.macro gdbasm_datavar name value
|
.data
|
.data
|
\name:
|
\name:
|
.word \value
|
.word \value
|
.endm
|
.endm
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.