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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gdb-6.8/] [sim/] [testsuite/] [sim/] [fr30/] [add2.cgs] - Blame information for rev 24

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 24 jeremybenn
# fr30 testcase for add2 $m4,$Ri
2
# mach(): fr30
3
 
4
        .include "testutils.inc"
5
 
6
        START
7
 
8
        .text
9
        .global add
10
add:
11
        mvi_h_gr        30,r8
12
        set_cc          0x0e    ; Set mask opposite of expected
13
        add2            -16,r8  ; Max value of immediate field
14
        test_cc         0 0 0 1
15
        test_h_gr       14,r8
16
 
17
        set_cc          0x0e    ; Set mask opposite of expected
18
        add2            -3,r8   ; Mid value of immediate field
19
        test_cc         0 0 0 1
20
        test_h_gr       11,r8
21
 
22
        set_cc          0x0e    ; Set mask opposite of expected
23
        add2            -1,r8   ; Min value of immediate field
24
        test_cc         0 0 0 1
25
        test_h_gr       10,r8
26
 
27
        set_cc          0x0a    ; Set mask opposite of expected
28
        add2            -10,r8  ; Test zero and carry bits
29
        test_cc         0 1 0 1
30
        test_h_gr       0,r8
31
 
32
        set_cc          0x07    ; Set mask opposite of expected
33
        add2            -16,r8  ; Test negative bit
34
        test_cc         1 0 0 0
35
        test_h_gr       -16,r8
36
 
37
        mvi_h_gr        0x80000000,r8
38
        set_cc          0x0c    ; Set mask opposite of expected
39
        add2            -1,r8   ; Test overflow bit
40
        test_cc         0 0 1 1
41
        test_h_gr       0x7fffffff,r8
42
 
43
        pass

powered by: WebSVN 2.1.0

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