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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gdb-7.2/] [sim/] [testsuite/] [sim/] [frv/] [umul.cgs] - Blame information for rev 373

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

Line No. Rev Author Line
1 330 jeremybenn
# frv testcase for umul $GRi,$GRj,$GRk
2
# mach: all
3
 
4
        .include "testutils.inc"
5
 
6
        start
7
 
8
        .global umul
9
umul:
10
        set_gr_immed    3,gr7           ; multiply small numbers
11
        set_gr_immed    2,gr8
12
        umul            gr7,gr8,gr8
13
        test_gr_immed   0,gr8
14
        test_gr_immed   6,gr9
15
 
16
        set_gr_immed    1,gr7           ; multiply by 1
17
        set_gr_immed    2,gr8
18
        umul            gr7,gr8,gr8
19
        test_gr_immed   0,gr8
20
        test_gr_immed   2,gr9
21
 
22
        set_gr_immed    2,gr7           ; multiply by 1
23
        set_gr_immed    1,gr8
24
        umul            gr7,gr8,gr8
25
        test_gr_immed   0,gr8
26
        test_gr_immed   2,gr9
27
 
28
        set_gr_immed    0,gr7           ; multiply by 0
29
        set_gr_immed    2,gr8
30
        umul            gr7,gr8,gr8
31
        test_gr_immed   0,gr8
32
        test_gr_immed   0,gr9
33
 
34
        set_gr_immed    2,gr7           ; multiply by 0
35
        set_gr_immed    0,gr8
36
        umul            gr7,gr8,gr8
37
        test_gr_immed   0,gr8
38
        test_gr_immed   0,gr9
39
 
40
        set_gr_limmed   0x3fff,0xffff,gr7       ; 31 bit result
41
        set_gr_immed    2,gr8
42
        umul            gr7,gr8,gr8
43
        test_gr_immed   0,gr8
44
        test_gr_limmed  0x7fff,0xfffe,gr9
45
 
46
        set_gr_limmed   0x4000,0x0000,gr7       ; 32 bit result
47
        set_gr_immed    2,gr8
48
        umul            gr7,gr8,gr8
49
        test_gr_immed   0,gr8
50
        test_gr_limmed  0x8000,0x0000,gr9
51
 
52
        set_gr_limmed   0x8000,0x0000,gr7       ; 33 bit result
53
        set_gr_immed    2,gr8
54
        umul            gr7,gr8,gr8
55
        test_gr_immed   1,gr8
56
        test_gr_immed   0x00000000,gr9
57
 
58
        set_gr_limmed   0x7fff,0xffff,gr7       ; max positive result
59
        set_gr_limmed   0x7fff,0xffff,gr8
60
        umul            gr7,gr8,gr8
61
        test_gr_limmed  0x3fff,0xffff,gr8
62
        test_gr_immed   0x00000001,gr9
63
 
64
        set_gr_limmed   0x8000,0x0000,gr7       ; max positive result
65
        set_gr_limmed   0x8000,0x0000,gr8
66
        umul            gr7,gr8,gr8
67
        test_gr_limmed  0x4000,0x0000,gr8
68
        test_gr_immed   0,gr9
69
 
70
        set_gr_limmed   0xffff,0xffff,gr7       ; max positive result
71
        set_gr_limmed   0xffff,0xffff,gr8
72
        umul            gr7,gr8,gr8
73
        test_gr_limmed  0xffff,0xfffe,gr8
74
        test_gr_immed   1,gr9
75
 
76
        pass

powered by: WebSVN 2.1.0

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