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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [treelang/] [output/] [output-1.tree] - Blame information for rev 816

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
// -*- c -*- c mode in emacs
2
 
3
//  Copyright (C) 2001, 2002, 2007 Free Software Foundation, Inc.
4
//  This program is free software; you can redistribute it and/or modify it
5
//  under the terms of the GNU General Public License as published by the
6
//  Free Software Foundation; either version 3, or (at your option) any
7
//  later version.
8
//
9
//  This program is distributed in the hope that it will be useful,
10
//  but WITHOUT ANY WARRANTY; without even the implied warranty of
11
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
//  GNU General Public License for more details.
13
//
14
//  You should have received a copy of the GNU General Public License
15
//  along with GCC; see the file COPYING3.  If not see
16
//  .
17
//
18
//  In other words, you are welcome to use, share and improve this program.
19
//  You are forbidden to forbid anyone else to use, share and improve
20
//  what you give them.   Help stamp out software-hoarding!
21
 
22
 
23
external_definition int add(int arg1, int arg2);
24
external_definition int subtract(int arg3, int arg4);
25
external_definition int first_nonzero(int arg5, int arg6);
26
external_definition int double_plus_one(int arg7);
27
 
28
add
29
{
30
  return arg1 + arg2;
31
}
32
 
33
 
34
subtract
35
{
36
  return arg3 - arg4;
37
}
38
 
39
double_plus_one
40
{
41
  automatic int aaa;
42
  aaa=add(arg7, arg7);
43
  aaa=add(aaa, aaa);
44
  aaa=subtract(subtract(aaa, arg7), arg7) + 1;
45
  return aaa;
46
}
47
 
48
first_nonzero
49
{
50
  if (arg5)
51
    {
52
      return arg5;
53
    }
54
  else
55
    {
56
    }
57
  return arg6;
58
}
59
 

powered by: WebSVN 2.1.0

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