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

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gdb-7.2/] [gdb-7.2-or32-1.0rc3/] [gdb/] [testsuite/] [gdb.asm/] [sh.inc] - Diff between revs 330 and 513

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

Rev 330 Rev 513
# You'll find a bunch of nop opcodes in the below macros.  They are
# You'll find a bunch of nop opcodes in the below macros.  They are
# there to keep the code correctly aligned.  Be careful to maintain
# there to keep the code correctly aligned.  Be careful to maintain
# them when changing the code.
# them when changing the code.
        comment "subroutine declare"
        comment "subroutine declare"
        .purgem gdbasm_declare
        .purgem gdbasm_declare
        .macro gdbasm_declare name
        .macro gdbasm_declare name
        .align  1
        .align  1
        .global \name
        .global \name
\name:
\name:
        .endm
        .endm
        comment "subroutine prologue"
        comment "subroutine prologue"
        .macro gdbasm_enter
        .macro gdbasm_enter
        mov.l   r14,@-r15
        mov.l   r14,@-r15
        sts.l   pr,@-r15
        sts.l   pr,@-r15
        mov     r15,r14
        mov     r15,r14
        nop
        nop
        .endm
        .endm
        comment "subroutine epilogue"
        comment "subroutine epilogue"
        .macro gdbasm_leave
        .macro gdbasm_leave
        mov     r14,r15
        mov     r14,r15
        lds.l   @r15+,pr
        lds.l   @r15+,pr
        mov.l   @r15+,r14
        mov.l   @r15+,r14
        rts
        rts
        nop
        nop
        nop
        nop
        .endm
        .endm
        comment "subroutine end"
        comment "subroutine end"
        .purgem gdbasm_end
        .purgem gdbasm_end
        .macro gdbasm_end name
        .macro gdbasm_end name
        .size   \name, .-_foo1
        .size   \name, .-_foo1
        .align  1
        .align  1
        .endm
        .endm
        comment "subroutine call"
        comment "subroutine call"
        .macro gdbasm_call subr
        .macro gdbasm_call subr
        mov.l   .Lconst\@,r1
        mov.l   .Lconst\@,r1
        bra     .Lafterconst\@
        bra     .Lafterconst\@
        nop
        nop
        nop
        nop
.Lconst\@:
.Lconst\@:
        .align  2
        .align  2
        .long   \subr
        .long   \subr
        .align  1
        .align  1
.Lafterconst\@:
.Lafterconst\@:
        jsr     @r1
        jsr     @r1
        nop
        nop
        .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
        sleep
        sleep
        nop
        nop
        .endm
        .endm
        comment "crt0 startup"
        comment "crt0 startup"
        .macro gdbasm_startup
        .macro gdbasm_startup
        mov.l   .stackaddr,r15
        mov.l   .stackaddr,r15
        bra     .afterstackaddr
        bra     .afterstackaddr
        nop
        nop
        nop
        nop
        .align 2
        .align 2
.stackaddr:
.stackaddr:
        .long   196608          ! 0x30000
        .long   196608          ! 0x30000
        .align  1
        .align  1
.afterstackaddr:
.afterstackaddr:
        .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
        .align 2
        .align 2
        .type   \name, @object
        .type   \name, @object
        .size   \name, 4
        .size   \name, 4
\name:
\name:
        .long   \value
        .long   \value
        .endm
        .endm
 
 

powered by: WebSVN 2.1.0

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