OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.dg/] [torture/] [cris-asm-mof-1.c] - Blame information for rev 853

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

Line No. Rev Author Line
1 149 jeremybenn
/* { dg-do compile { target cris-*-* } } */
2
/* { dg-options "-O2 -march=v10" } */
3
/* { dg-final { scan-assembler "in-asm: .mof" } } */
4
/* { dg-final { scan-assembler "out-asm: .mof" } } */
5
/* { dg-final { scan-assembler "in2-asm: .mof" } } */
6
/* { dg-final { scan-assembler "out2-asm: .mof" } } */
7
 
8
unsigned int
9
in (unsigned int i)
10
{
11
  register int i0 asm ("mof") = i;
12
  asm ("in-asm: %0" : : "x" (i0));
13
}
14
 
15
unsigned int
16
out (void)
17
{
18
  register int o asm ("mof");
19
  asm ("out-asm: %0" : "=x" (o));
20
  return o;
21
}
22
 
23
unsigned int
24
in2 (unsigned int i)
25
{
26
  asm ("in2-asm: %0" : : "h" (i));
27
}
28
 
29
unsigned int
30
out2 (void)
31
{
32
  unsigned int o;
33
  asm ("out2-asm: %0" : "=h" (o));
34
  return o;
35
}

powered by: WebSVN 2.1.0

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