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/] [nudivi.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 nudivi $GRi,$s12,$GRk
2
# mach: fr500 fr550 frv
3
 
4
        .include "testutils.inc"
5
 
6
        start
7
 
8
        .global nudivi
9
nudivi:
10
        set_spr_immed   0,gner0
11
        set_spr_immed   0,gner1
12
 
13
        ; simple division 12 / 3
14
        set_gr_immed    0x0000000c,gr3
15
        nudivi          gr3,3,gr3
16
        test_gr_immed   0x00000004,gr3
17
        test_spr_immed  0,gner0
18
        test_spr_immed  0,gner1
19
 
20
        ; random example
21
        set_gr_limmed   0xfedc,0xba98,gr3
22
        nudivi          gr3,0x7ff,gr3
23
        test_gr_limmed  0x001f,0xdf93,gr3
24
        test_spr_immed  0,gner0
25
        test_spr_immed  0,gner1
26
 
27
        ; random example
28
        set_gr_limmed   0xffff,0xffff,gr3
29
        nudivi          gr3,-2048,gr3
30
        test_gr_immed   1,gr3
31
        test_spr_immed  0,gner0
32
        test_spr_immed  0,gner1
33
 
34
        or_spr_immed    0x20,isr        ; turn on isr.edem
35
        nudivi          gr1,0,gr32      ; divide by zero
36
        test_spr_immed  1,gner0
37
        test_spr_immed  0,gner1
38
 
39
        and_spr_immed   -33,isr         ; turn off isr.edem
40
        nudivi          gr1,0,gr10      ; divide by zero
41
        test_spr_immed  1,gner0
42
        test_spr_immed  0x00000400,gner1
43
 
44
        ; simple division 12 / 3 -- should turn off ne flag
45
        set_gr_immed    12,gr1
46
        nudivi          gr1,3,gr10
47
        test_gr_immed   4,gr10
48
        test_spr_immed  1,gner0
49
        test_spr_immed  0,gner1
50
 
51
        pass

powered by: WebSVN 2.1.0

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