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

Subversion Repositories openrisc

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

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

Line No. Rev Author Line
1 24 jeremybenn
# fr30 testcase for addn2 $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 normal result
13
        addn2           -16,r8  ; Max value of immediate field
14
        test_cc         1 1 1 0
15
        test_h_gr       14,r8
16
 
17
        set_cc          0x0e    ; Set mask opposite of normal result
18
        addn2           -3,r8   ; Mid value of immediate field
19
        test_cc         1 1 1 0
20
        test_h_gr       11,r8
21
 
22
        set_cc          0x0e    ; Set mask opposite of normal result
23
        addn2           -1,r8   ; Min value of immediate field
24
        test_cc         1 1 1 0
25
        test_h_gr       10,r8
26
 
27
        set_cc          0x0a    ; Set mask opposite of normal result
28
        addn2           -10,r8  ; Test zero and carry bits
29
        test_cc         1 0 1 0
30
        test_h_gr       0,r8
31
 
32
        set_cc          0x07    ; Set mask opposite of normal result
33
        addn2           -16,r8  ; Test negative bit
34
        test_cc         0 1 1 1
35
        test_h_gr       -16,r8
36
 
37
        mvi_h_gr        0x80000000,r8
38
        set_cc          0x0c    ; Set mask opposite of normal result
39
        addn2           -1,r8   ; Test overflow bit
40
        test_cc         1 1 0 0
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.