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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [usmul.c] - Blame information for rev 297

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 297 jeremybenn
int __attribute__ ((noinline)) foo (short x, unsigned short y)
2
{
3
  return x * y;
4
}
5
 
6
int __attribute__ ((noinline)) bar (unsigned short x, short y)
7
{
8
  return x * y;
9
}
10
 
11
int main ()
12
{
13
  if (foo (-2, 0xffff) != -131070)
14
    abort ();
15
  if (foo (2, 0xffff) != 131070)
16
    abort ();
17
  if (foo (-32768, 0x8000) != -1073741824)
18
    abort ();
19
  if (foo (32767, 0x8000) != 1073709056)
20
    abort ();
21
 
22
  if (bar (0xffff, -2) != -131070)
23
    abort ();
24
  if (bar (0xffff, 2) != 131070)
25
    abort ();
26
  if (bar (0x8000, -32768) != -1073741824)
27
    abort ();
28
  if (bar (0x8000, 32767) != 1073709056)
29
    abort ();
30
 
31
  exit (0);
32
}
33
 

powered by: WebSVN 2.1.0

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