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/] [media/] [mabsw.cgs] - Blame information for rev 157

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 24 jeremybenn
# sh testcase for mabs.w $rm, $rd -*- Asm -*-
2
# mach: all
3
# as: -isa=shmedia
4
# ld: -m shelf64
5
 
6
        .include "media/testutils.inc"
7
 
8
        start
9
 
10
init:
11
        pta wrong, tr0
12
 
13
mabsw1:
14
        # Pack { 1 3 5 7 } into R0.
15
        _packw 1, 3, 5, 7, r0
16
 
17
        mabs.l r0, r1
18
 
19
        # Test for { 1 3 5 7 } in R0.
20
        _packw 1, 3, 5, 7, r2
21
        bne r0, r2, tr0
22
 
23
mabsw2:
24
        # Pack { -1, -1, -1, -1 } into R0.
25
        _packw 1, 1, 1, 1, r0
26
 
27
        # Set the left sign bit
28
        movi 1, r1
29
        shlli r1, 63, r1
30
        or r0, r1, r0
31
 
32
        mabs.w r0, r2
33
 
34
okay:
35
        pass
36
 
37
wrong:
38
        fail

powered by: WebSVN 2.1.0

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