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/] [sh64/] [media/] [beq.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
# sh testcase for beq$likely $rm, $rn, $tra -*- Asm -*-
2
# mach: all
3
# as: -isa=shmedia
4
# ld: -m shelf64
5
 
6
        .include "media/testutils.inc"
7
 
8
        start
9
 
10
        .global beq
11
init:
12
        # Load up the branch target registers.
13
        pta beq2, tr0
14
        pta beq3, tr1
15
        pta wrong, tr2
16
 
17
beq1:
18
        # Compare r0 with itself.
19
        # Always true, so branch likely.
20
        movi 1, r0
21
        beq/l r0, r0, tr0
22
        # We should branch over this.
23
        fail
24
 
25
beq2:
26
        # Ensure high order bits are compared, too.
27
        movi 1, r0
28
        shlli r0, 35, r0
29
        addi r0, 10, r0
30
        movi 1, r1
31
        shlli r1, 35, r1
32
        addi r1, 10, r1
33
        beq r0, r1, tr1
34
        # We should branch over this, too.
35
        fail
36
 
37
beq3:
38
        movi 1, r0
39
        shlli r0, 35, r0
40
        addi r0, 10, r0
41
        movi 2, r1
42
        shlli r1, 35, r1
43
        addi r1, 9, r1
44
        # Unlikely we'll branch!
45
        beq/u r0, r1, tr2
46
        # We should proceed to pass here.
47
 
48
okay:
49
        pass
50
 
51
wrong:
52
        fail

powered by: WebSVN 2.1.0

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