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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gdb-6.8/] [sim/] [testsuite/] [sim/] [frv/] [mqcpxis.cgs] - Blame information for rev 157

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

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

powered by: WebSVN 2.1.0

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