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/] [sh64/] [compact/] [macw.cgs] - Blame information for rev 280

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

Line No. Rev Author Line
1 24 jeremybenn
# sh testcase for mac.w @${rm}+, @${rn}+
2
# mach: all
3
# as: -isa=shcompact
4
# ld: -m shelf32
5
 
6
        .include "compact/testutils.inc"
7
 
8
        start
9
 
10
        # Store some magic numbers in memory.
11
        mov #40, r1
12
        shll8 r1
13
        mov #85, r0
14
        mov.l r0, @r1
15
        # Keep for later.
16
        mov r1, r10
17
store2:
18
        mov #40, r1
19
        shll8 r1
20
        add #12, r1
21
        mov #17, r0
22
        mov.l r0, @r1
23
        # Keep for later.
24
        mov r1, r11
25
 
26
init:
27
        # Set up addresses.
28
        mov #40, r1
29
        shll8 r1
30
        mov #40, r2
31
        shll8 r2
32
        add #12, r2
33
 
34
        # Prime {MACL, MACH} to #1.
35
        mov #1, r3
36
        dmulu.l r3, r3
37
 
38
test:
39
        mac.w @r1+, @r2+
40
 
41
check:
42
        # Check result.
43
        sts mach, r5
44
        assert r5, #0
45
 
46
        sts macl, r6
47
        assert r6, #1
48
 
49
        # Ensure post-increment occurred.
50
        add #2, r10
51
        cmp/eq r10, r1
52
        bf wrong
53
 
54
        add #2, r11
55
        cmp/eq r11, r2
56
        bf wrong
57
 
58
doubleinc:
59
        mov #40, r0
60
        shll8 r0
61
        mov r0, r1
62
        mac.w @r0+, @r0+
63
        add #8, r1
64
        cmp/eq r0, r1
65
        bf wrong
66
 
67
okay:
68
        pass
69
wrong:
70
        fail

powered by: WebSVN 2.1.0

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