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

Subversion Repositories lxp32

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 9 ring0_mipt
/*
2
 * This test verifies that basic logical operations
3
 * (and, xor, or, not) work.
4
 */
5
 
6
        lc r100, 0x10000000 // test result output pointer
7
        lc r101, halt
8
        lc r102, failure
9
 
10
        lc r0, 0xD54B65C0
11
        lc r1, 0xCE8870A8
12
        lc r16, 0x10000004 // destination pointer
13
 
14
        and r2, r0, r1
15
        sw r16, r2
16
        lc r3, 0xC4086080
17
        cjmpne r102, r2, r3
18
 
19
        or r2, r0, r1
20
        sw r16, r2
21
        lc r3, 0xDFCB75E8
22
        cjmpne r102, r2, r3
23
 
24
        xor r2, r0, r1
25
        sw r16, r2
26
        lc r3, 0x1BC31568
27
        cjmpne r102, r2, r3
28
 
29
// Note: "not dst, src" is just an alias for "xor dst, src, -1"
30
        not r2, r0
31
        sw r16, r2
32
        lc r3, 0x2AB49A3F
33
        cjmpne r102, r2, r3
34
 
35
        sw r100, 1
36
        jmp r101
37
 
38
failure:
39
        sw r100, 2
40
 
41
halt:
42
        hlt
43
        jmp r101

powered by: WebSVN 2.1.0

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