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] - Rev 827

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

// -*- c -*- c mode in emacs

//  Copyright (C) 2001, 2002, 2007 Free Software Foundation, Inc.
//  This program is free software; you can redistribute it and/or modify it
//  under the terms of the GNU General Public License as published by the
//  Free Software Foundation; either version 3, or (at your option) any
//  later version.
//
//  This program is distributed in the hope that it will be useful,
//  but WITHOUT ANY WARRANTY; without even the implied warranty of
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//  GNU General Public License for more details.
//
//  You should have received a copy of the GNU General Public License
//  along with GCC; see the file COPYING3.  If not see
//  <http://www.gnu.org/licenses/>.
//
//  In other words, you are welcome to use, share and improve this program.
//  You are forbidden to forbid anyone else to use, share and improve
//  what you give them.   Help stamp out software-hoarding!  


external_definition int add(int arg1, int arg2);
external_definition int subtract(int arg3, int arg4);
external_definition int first_nonzero(int arg5, int arg6);
external_definition int double_plus_one(int arg7);

add 
{
  return arg1 + arg2;
}

        
subtract 
{
  return arg3 - arg4;
}

double_plus_one
{
  automatic int aaa;
  aaa=add(arg7, arg7);
  aaa=add(aaa, aaa);
  aaa=subtract(subtract(aaa, arg7), arg7) + 1;
  return aaa;
}

first_nonzero
{
  if (arg5)
    {
      return arg5;
    }
  else
    {
    }
  return arg6;
}

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

powered by: WebSVN 2.1.0

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