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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gdb-6.8/] [sim/] [testsuite/] [sim/] [frv/] [mqcpxrs.cgs] - Blame information for rev 438

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

Line No. Rev Author Line
1 24 jeremybenn
# frv testcase for mqcpxrs $GRi,$GRj,$ACCk
2
# mach: all
3
 
4
        .include "testutils.inc"
5
 
6
        start
7
 
8
        .global mqcpxrs
9
mqcpxrs:
10
        ; Positive operands
11
        set_fr_iimmed   2,4,fr8         ; multiply small numbers
12
        set_fr_iimmed   3,5,fr10
13
        set_fr_iimmed   3,1,fr9         ; multiply by 0
14
        set_fr_iimmed   2,0,fr11
15
        mqcpxrs         fr8,fr10,acc0
16
        test_accg_immed         0xff,accg0
17
        test_acc_immed  -14,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,2,fr9    ; 15 bit result
24
        set_fr_iimmed   2,0x0007,fr11
25
        mqcpxrs         fr8,fr10,acc0
26
        test_accg_immed         0,accg0
27
        test_acc_immed  1,acc0
28
        test_accg_immed         0,accg1
29
        test_acc_limmed 0,0x7ff0,acc1
30
 
31
        set_fr_iimmed   0x4000,2,fr8    ; 16 bit result
32
        set_fr_iimmed   2,0x2000,fr10
33
        set_fr_iimmed   0x7fff,0x0000,fr9       ; max positive result
34
        set_fr_iimmed   0x7fff,0x7fff,fr11
35
        mqcpxrs         fr8,fr10,acc0
36
        test_accg_immed         0,accg0
37
        test_acc_limmed 0x0000,0x4000,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   0xfffd,1,fr10
44
        set_fr_iimmed   0xfffe,2,fr9            ; multiply by 1
45
        set_fr_iimmed   1,0xfffe,fr11
46
        mqcpxrs         fr8,fr10,acc0
47
        test_accg_immed         0xff,accg0
48
        test_acc_immed  -3,acc0
49
        test_accg_immed         0,accg1
50
        test_acc_immed  2,acc1
51
 
52
        set_fr_iimmed   0xfffe,0,fr8            ; multiply by 0
53
        set_fr_iimmed   1,0xfffe,fr10
54
        set_fr_iimmed   0x2001,0xfffe,fr9       ; 15 bit result
55
        set_fr_iimmed   0xfffe,0xfff9,fr11
56
        mqcpxrs         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,0xbff0,acc1
61
 
62
        set_fr_iimmed   0x4000,0xfffe,fr8       ; 16 bit result
63
        set_fr_iimmed   0xfffe,0x0003,fr10
64
        set_fr_iimmed   0x7fff,0x8000,fr9       ; max negative result
65
        set_fr_iimmed   0x8000,0x8000,fr11
66
        mqcpxrs         fr8,fr10,acc0
67
        test_accg_immed         0xff,accg0
68
        test_acc_limmed 0xffff,0x8006,acc0
69
        test_accg_immed         0xff,accg1
70
        test_acc_limmed 0x8000,0x8000,acc1
71
 
72
        ; Negative operands
73
        set_fr_iimmed   0x8000,0x7fff,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   0xfffd,0xfffb,fr11
77
        mqcpxrs         fr8,fr10,acc0
78
        test_accg_immed         0,accg0
79
        test_acc_limmed 0x7fff,0x8000,acc0
80
        test_accg_immed         0xff,accg1
81
        test_acc_immed  -14,acc1
82
 
83
        set_fr_iimmed   0xffff,0xffff,fr8               ; multiply by -1
84
        set_fr_iimmed   0xfffe,0xffff,fr10
85
        set_fr_iimmed   0x7fff,0x0000,fr9       ; almost max positive result
86
        set_fr_iimmed   0x7fff,0x8001,fr11
87
        mqcpxrs         fr8,fr10,acc0
88
        test_accg_immed         0,accg0
89
        test_acc_immed  1,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
        mqcpxrs         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.