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

Subversion Repositories or1k

[/] [or1k/] [tags/] [nog_patch_47/] [or1ksim/] [testbench/] [except.S] - Diff between revs 409 and 410

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 409 Rev 410
Line 1... Line 1...
/* Support file for c based tests */
/* Support file for c based tests */
 
#include "spr_defs.h"
 
 
 
        .section .stack
 
        .space 0x1000
 
_stack:
 
 
        .section .except
        .section .except
        .extern _reset_support
        .extern _reset_support
        .extern _c_reset
        .extern _c_reset
        .extern _excpt_buserr
        .extern _excpt_buserr
Line 20... Line 25...
 
 
        .org    0x100
        .org    0x100
_reset_vector:
_reset_vector:
        l.nop
        l.nop
        l.nop
        l.nop
        l.movhi r1,hi(0x40007f00)
        l.movhi r1,hi(_stack)
        l.ori   r1,r1,lo(0x40007f00)
        l.ori   r1,r1,lo(_stack)
        l.jal   _reset
 
 
.if COPY_SECTIONS
 
 
 
        l.movhi r3,hi(_src_beg)
 
        l.ori   r3,r3,lo(_src_beg)
 
        l.movhi r4,hi(_dst_beg)
 
        l.ori   r4,r4,lo(_dst_beg)
 
        l.sfeq  r3,r4
 
        l.bf    2f
 
        l.movhi r5,hi(_dst_end)
 
        l.ori   r5,r5,lo(_dst_end)
 
        l.sub   r5,r5,r4
 
        l.sfeqi r5,0
 
        l.bf    2f
 
        l.nop
 
1:      l.lwz   r6,0(r3)
 
        l.sw    0(r4),r6
 
        l.addi  r3,r3,4
 
        l.addi  r4,r4,4
 
        l.addi  r5,r5,-4
 
        l.sfgtsi r5,0
 
        l.bf    1b
 
        l.nop
 
 
 
2:
 
.endif
 
 
 
        l.movhi r2,hi(_reset)
 
        l.ori   r2,r2,lo(_reset)
 
        l.jr    r2
        l.nop
        l.nop
 
 
        .org    0x200
        .org    0x200
_buserr_vector:
_buserr_vector:
        l.addi  r1,r1,-116
        l.addi  r1,r1,-116
        l.sw    0x18(r1),r9
        l.sw    0x18(r1),r9
        l.jal   store_regs
        l.jal   store_regs
        l.nop
        l.nop
        l.movhi r9,hi(end_except)
        l.movhi r9,hi(end_except)
        l.ori   r9,r0,lo(end_except)
        l.ori   r9,r9,lo(end_except)
        l.movhi r10,hi(_excpt_buserr)
        l.movhi r10,hi(_excpt_buserr)
        l.ori   r10,r10,lo(_excpt_buserr)
        l.ori   r10,r10,lo(_excpt_buserr)
        l.lwz   r10,0x0(r10)
        l.lwz   r10,0x0(r10)
        l.jr    r10
        l.jr    r10
        l.nop
        l.nop
Line 46... Line 80...
        l.addi  r1,r1,-116
        l.addi  r1,r1,-116
        l.sw    0x18(r1),r9
        l.sw    0x18(r1),r9
        l.jal   store_regs
        l.jal   store_regs
        l.nop
        l.nop
        l.movhi r9,hi(end_except)
        l.movhi r9,hi(end_except)
        l.ori   r9,r0,lo(end_except)
        l.ori   r9,r9,lo(end_except)
        l.movhi r10,hi(_excpt_dpfault)
        l.movhi r10,hi(_excpt_dpfault)
        l.ori   r10,r10,lo(_excpt_dpfault)
        l.ori   r10,r10,lo(_excpt_dpfault)
        l.lwz   r10,0(r10)
        l.lwz   r10,0(r10)
        l.jr    r10
        l.jr    r10
        l.nop
        l.nop
Line 60... Line 94...
        l.addi  r1,r1,-116
        l.addi  r1,r1,-116
        l.sw    0x18(r1),r9
        l.sw    0x18(r1),r9
        l.jal   store_regs
        l.jal   store_regs
        l.nop
        l.nop
        l.movhi r9,hi(end_except)
        l.movhi r9,hi(end_except)
        l.ori   r9,r0,lo(end_except)
        l.ori   r9,r9,lo(end_except)
        l.movhi r10,hi(_excpt_ipfault)
        l.movhi r10,hi(_excpt_ipfault)
        l.ori   r10,r10,lo(_excpt_ipfault)
        l.ori   r10,r10,lo(_excpt_ipfault)
        l.lwz   r10,0(r10)
        l.lwz   r10,0(r10)
        l.jr    r10
        l.jr    r10
        l.nop
        l.nop
Line 129... Line 163...
_dtlbmiss_vector:
_dtlbmiss_vector:
        l.addi  r1,r1,-116
        l.addi  r1,r1,-116
        l.sw    0x18(r1),r9
        l.sw    0x18(r1),r9
        l.jal   store_regs
        l.jal   store_regs
        l.nop
        l.nop
 
 
 
        l.mfspr r3,r0,SPR_EPCR_BASE
 
        l.addi  r3,r3,-4
 
        l.mtspr r0,r3,SPR_EPCR_BASE
 
 
        l.movhi r9,hi(end_except)
        l.movhi r9,hi(end_except)
        l.ori   r9,r9,lo(end_except)
        l.ori   r9,r9,lo(end_except)
        l.movhi r10,hi(_excpt_dtlbmiss)
        l.movhi r10,hi(_excpt_dtlbmiss)
        l.ori   r10,r10,lo(_excpt_dtlbmiss)
        l.ori   r10,r10,lo(_excpt_dtlbmiss)
        l.lwz   r10,0(r10)
        l.lwz   r10,0(r10)

powered by: WebSVN 2.1.0

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