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/] [mqmulhu.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 mqmulhu $GRi,$GRj,$GRk
2
# mach: all
3
 
4
        .include "testutils.inc"
5
 
6
        start
7
 
8
        .global mqmulhu
9
mqmulhu:
10
        set_fr_iimmed   3,2,fr8         ; multiply small numbers
11
        set_fr_iimmed   2,3,fr10
12
        set_fr_iimmed   1,2,fr9         ; multiply by 1
13
        set_fr_iimmed   2,1,fr11
14
        mqmulhu         fr8,fr10,acc0
15
        test_accg_immed         0,accg0
16
        test_acc_immed  6,acc0
17
        test_accg_immed         0,accg1
18
        test_acc_immed  6,acc1
19
        test_accg_immed         0,accg2
20
        test_acc_immed  2,acc2
21
        test_accg_immed         0,accg3
22
        test_acc_immed  2,acc3
23
 
24
        set_fr_iimmed   0,2,fr8         ; multiply by 0
25
        set_fr_iimmed   2,0,fr10
26
        set_fr_iimmed   0x3fff,2,fr9    ; 15 bit result
27
        set_fr_iimmed   2,0x3fff,fr11
28
        mqmulhu         fr8,fr10,acc0
29
        test_accg_immed         0,accg0
30
        test_acc_immed  0,acc0
31
        test_accg_immed         0,accg1
32
        test_acc_immed  0,acc1
33
        test_accg_immed         0,accg2
34
        test_acc_limmed 0x0000,0x7ffe,acc2
35
        test_accg_immed         0,accg3
36
        test_acc_limmed 0x0000,0x7ffe,acc3
37
 
38
        set_fr_iimmed   0x4000,2,fr8    ; 16 bit result
39
        set_fr_iimmed   2,0x4000,fr10
40
        set_fr_iimmed   0x8000,2,fr9    ; 17 bit result
41
        set_fr_iimmed   2,0x8000,fr11
42
        mqmulhu         fr8,fr10,acc0
43
        test_accg_immed         0,accg0
44
        test_acc_limmed 0x0000,0x8000,acc0
45
        test_accg_immed         0,accg1
46
        test_acc_limmed 0x0000,0x8000,acc1
47
        test_accg_immed         0,accg2
48
        test_acc_immed  0x00010000,acc2
49
        test_accg_immed         0,accg3
50
        test_acc_immed  0x00010000,acc3
51
 
52
        set_fr_iimmed   0x7fff,0x7fff,fr8       ; max positive result
53
        set_fr_iimmed   0x7fff,0x7fff,fr10
54
        set_fr_iimmed   0x8000,0x8000,fr9       ; max positive result
55
        set_fr_iimmed   0x8000,0x8000,fr11
56
        mqmulhu         fr8,fr10,acc0
57
        test_accg_immed         0,accg0
58
        test_acc_immed  0x3fff0001,acc0
59
        test_accg_immed         0,accg1
60
        test_acc_immed  0x3fff0001,acc1
61
        test_accg_immed         0,accg2
62
        test_acc_limmed 0x4000,0x0000,acc2
63
        test_accg_immed         0,accg3
64
        test_acc_limmed 0x4000,0x0000,acc3
65
 
66
        set_fr_iimmed   0xffff,0xffff,fr8       ; max positive result
67
        set_fr_iimmed   0xffff,0xffff,fr10
68
        set_fr_iimmed   0xffff,0xffff,fr9       ; max positive result
69
        set_fr_iimmed   0xffff,0xffff,fr11
70
        mqmulhu         fr8,fr10,acc0
71
        test_accg_immed         0,accg0
72
        test_acc_limmed 0xfffe,0x0001,acc0
73
        test_accg_immed         0,accg1
74
        test_acc_limmed 0xfffe,0x0001,acc1
75
        test_accg_immed         0,accg2
76
        test_acc_limmed 0xfffe,0x0001,acc2
77
        test_accg_immed         0,accg3
78
        test_acc_limmed 0xfffe,0x0001,acc3
79
 
80
        pass

powered by: WebSVN 2.1.0

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