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

powered by: WebSVN 2.1.0

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