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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gdb-7.1/] [sim/] [testsuite/] [sim/] [frv/] [mcpxis.cgs] - Blame information for rev 227

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 227 jeremybenn
# frv testcase for mcpxis $GRi,$GRj,$ACCk
2
# mach: all
3
 
4
        .include "testutils.inc"
5
 
6
        start
7
 
8
        .global mcpxis
9
mcpxis:
10
        ; Positive operands
11
        set_fr_iimmed   2,4,fr7         ; multiply small numbers
12
        set_fr_iimmed   5,3,fr8
13
        mcpxis          fr7,fr8,acc0
14
        test_accg_immed 0x00,accg0
15
        test_acc_immed  26,acc0
16
 
17
        set_fr_iimmed   3,1,fr7         ; multiply by 0
18
        set_fr_iimmed   0,2,fr8
19
        mcpxis          fr7,fr8,acc0
20
        test_accg_immed         0,accg0
21
        test_acc_immed  6,acc0
22
 
23
        set_fr_iimmed   2,1,fr7         ; multiply by 1
24
        set_fr_iimmed   1,1,fr8
25
        mcpxis          fr7,fr8,acc0
26
        test_accg_immed         0,accg0
27
        test_acc_immed  3,acc0
28
 
29
        set_fr_iimmed   0x3ff8,2,fr7    ; 15 bit result
30
        set_fr_iimmed   0x0007,2,fr8
31
        mcpxis          fr7,fr8,acc0
32
        test_accg_immed         0,accg0
33
        test_acc_limmed 0,0x7ffe,acc0
34
 
35
        set_fr_iimmed   0x4000,2,fr7    ; 16 bit result
36
        set_fr_iimmed   0x2000,2,fr8
37
        mcpxis          fr7,fr8,acc0
38
        test_accg_immed         0,accg0
39
        test_acc_limmed 0x0000,0xc000,acc0
40
 
41
        set_fr_iimmed   0x7fff,0x0000,fr7       ; max positive result
42
        set_fr_iimmed   0x7fff,0x7fff,fr8
43
        mcpxis          fr7,fr8,acc0
44
        test_accg_immed         0,accg0
45
        test_acc_limmed 0x3fff,0x0001,acc0
46
 
47
        ; Mixed operands
48
        set_fr_iimmed   2,0xfffd,fr7            ; multiply small numbers
49
        set_fr_iimmed   1,0xfffd,fr8
50
        mcpxis          fr7,fr8,acc0
51
        test_accg_immed         0xff,accg0
52
        test_acc_immed  -9,acc0
53
 
54
        set_fr_iimmed   0xfffe,2,fr7            ; multiply by 1
55
        set_fr_iimmed   0xfffe,1,fr8
56
        mcpxis          fr7,fr8,acc0
57
        test_accg_immed 0xff,accg0
58
        test_acc_immed  -6,acc0
59
 
60
        set_fr_iimmed   0xfffe,0,fr7            ; multiply by 0
61
        set_fr_iimmed   0xfffe,1,fr8
62
        mcpxis          fr7,fr8,acc0
63
        test_accg_immed         0xff,accg0
64
        test_acc_immed  -2,acc0
65
 
66
        set_fr_iimmed   0x2001,0xffff,fr7       ; 15 bit result
67
        set_fr_iimmed   0xffff,0xfffe,fr8
68
        mcpxis          fr7,fr8,acc0
69
        test_accg_immed         0xff,accg0
70
        test_acc_limmed 0xffff,0xbfff,acc0
71
 
72
        set_fr_iimmed   0x4000,0xfffe,fr7       ; 16 bit result
73
        set_fr_iimmed   0x0003,0xfffe,fr8
74
        mcpxis          fr7,fr8,acc0
75
        test_accg_immed         0xff,accg0
76
        test_acc_limmed 0xffff,0x7ffa,acc0
77
 
78
        set_fr_iimmed   0x7fff,0x7fff,fr7       ; max negative result
79
        set_fr_iimmed   0x8000,0x8000,fr8
80
        mcpxis          fr7,fr8,acc0
81
        test_accg_immed         0xff,accg0
82
        test_acc_limmed 0x8001,0x0000,acc0
83
 
84
        set_fr_iimmed   0x8000,0x8000,fr7       ; max positive result
85
        set_fr_iimmed   0x8000,0x8000,fr8
86
        mcpxis          fr7,fr8,acc0
87
        test_accg_immed         0,accg0
88
        test_acc_limmed 0x8000,0x0000,acc0
89
 
90
        ; Negative operands
91
        set_fr_iimmed   0xfffe,0xfffc,fr7               ; multiply small numbers
92
        set_fr_iimmed   0xfffb,0xfffd,fr8
93
        mcpxis          fr7,fr8,acc0
94
        test_accg_immed 0x00,accg0
95
        test_acc_immed  26,acc0
96
 
97
        set_fr_iimmed   0xffff,0xffff,fr7               ; multiply by -1
98
        set_fr_iimmed   0xffff,0xfffe,fr8
99
        mcpxis          fr7,fr8,acc0
100
        test_accg_immed         0,accg0
101
        test_acc_immed  3,acc0
102
 
103
        set_fr_iimmed   0x7fff,0x0000,fr7       ; almost max positive result
104
        set_fr_iimmed   0x8001,0x7fff,fr8
105
        mcpxis          fr7,fr8,acc0
106
        test_accg_immed         0,accg0
107
        test_acc_immed  0x3fff0001,acc0
108
 
109
        set_fr_iimmed   0x8000,0x0000,fr7       ; max positive result
110
        set_fr_iimmed   0x8000,0x8000,fr8
111
        mcpxis          fr7,fr8,acc0
112
        test_accg_immed         0,accg0
113
        test_acc_immed  0x40000000,acc0
114
 
115
        pass

powered by: WebSVN 2.1.0

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