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

Subversion Repositories lxp32

[/] [lxp32/] [trunk/] [verify/] [lxp32/] [src/] [firmware/] [test006.asm] - Blame information for rev 9

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 9 ring0_mipt
/*
2
 * This test checks for a bug with jump destination register
3
 * being wrongly overwritten when jump instruction follows "lw"
4
 */
5
 
6
        lc r100, 0x10000000 // test result output pointer
7
        lc r101, halt
8
        lc r102, failure
9
 
10
        lc r16, 0x10000004
11
        lc r17, 0x12345678
12
        lc r18, 0x12345678
13
 
14
        sw r16, 123
15
        lw r0, r16
16
        cjmpne r17, 0, 0 // r17 used to be wrongly overwritten by the value of r16 here
17
 
18
        sw r16, r17
19
 
20
        nop
21
        nop
22
 
23
        cjmpne r102, r17, r18
24
 
25
        sw r100, 1
26
        jmp r101
27
 
28
failure:
29
        sw r100, 2
30
 
31
halt:
32
        hlt
33
        jmp r101

powered by: WebSVN 2.1.0

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