~fboudra/qemu-linaro/new-upstream-release-1.2.0-2012.09-0ubuntu1

« back to all changes in this revision

Viewing changes to tests/tcg/openrisc/test_sfeq.c

  • Committer: Fathi Boudra
  • Author(s): Fathi Boudra
  • Date: 2012-08-21 06:47:11 UTC
  • mfrom: (0.1.16)
  • Revision ID: fathi.boudra@linaro.org-20120821064711-7yxmubp2v8a44xce
Tags: 1.1.50-2012.08-0ubuntu1
* New upstream release.
  - support emulated systems with more than 2G of memory. (LP: #1030588)
* Drop powerpc-missing-include.patch - merged upstream.
* Update debian/control: 
  - drop perl build dependency.
  - add libfdt-dev build dependency.
* Update debian/qemu-keymaps.install file.
* Update debian/rules:
  - update QEMU_CPU for ARM architecture: armv4l -> armv7l.
  - update conf_audio_drv: default to PulseAudio since PA is the default on
    Ubuntu.
  - enable KVM on ARM architecture.
  - enable flat device tree support (--enable-fdt). (LP: #1030594)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#include <stdio.h>
 
2
 
 
3
int main(void)
 
4
{
 
5
    int a, b;
 
6
    int result;
 
7
 
 
8
    a = 0x1;
 
9
    b = 0x80;
 
10
    result = 0x2;
 
11
    __asm
 
12
    ("1:\n\t"
 
13
     "l.addi   %0, %0, 0x1\n\t"
 
14
     "l.sfeq   %0, %1\n\t"
 
15
     "l.bf     1b\n\t"
 
16
     "l.nop\n\t"
 
17
     : "+r"(a)
 
18
     : "r"(b)
 
19
    );
 
20
    if (a != result) {
 
21
        printf("sfeq error\n");
 
22
        return -1;
 
23
    }
 
24
 
 
25
    a = 0x7f;
 
26
    b = 0x80;
 
27
    result = 0x81;
 
28
    __asm
 
29
    ("2:\n\t"
 
30
     "l.addi   %0, %0, 0x1\n\t"
 
31
     "l.sfeq   %0, %1\n\t"
 
32
     "l.bf     2b\n\t"
 
33
     "l.nop\n\t"
 
34
     : "+r"(a)
 
35
     : "r"(b)
 
36
    );
 
37
    if (a != result) {
 
38
        printf("sfeq error\n");
 
39
        return -1;
 
40
    }
 
41
 
 
42
    return 0;
 
43
}