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

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-dev/] [fsf-gcc-snapshot-1-mar-12/] [or1k-gcc/] [gcc/] [target-globals.c] - Diff between revs 684 and 783

Go to most recent revision | Only display areas with differences | Details | Blame | View Log

Rev 684 Rev 783
/* Target-dependent globals.
/* Target-dependent globals.
   Copyright (C) 2010  Free Software Foundation, Inc.
   Copyright (C) 2010  Free Software Foundation, Inc.
 
 
This file is part of GCC.
This file is part of GCC.
 
 
GCC is free software; you can redistribute it and/or modify it under
GCC 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
the terms of the GNU General Public License as published by the Free
Software Foundation; either version 3, or (at your option) any later
Software Foundation; either version 3, or (at your option) any later
version.
version.
 
 
GCC is distributed in the hope that it will be useful, but WITHOUT ANY
GCC is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
for more details.
for more details.
 
 
You should have received a copy of the GNU General Public License
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING3.  If not see
along with GCC; see the file COPYING3.  If not see
<http://www.gnu.org/licenses/>.  */
<http://www.gnu.org/licenses/>.  */
 
 
#include "config.h"
#include "config.h"
#include "system.h"
#include "system.h"
#include "coretypes.h"
#include "coretypes.h"
#include "tm.h"
#include "tm.h"
#include "insn-config.h"
#include "insn-config.h"
#include "machmode.h"
#include "machmode.h"
#include "ggc.h"
#include "ggc.h"
#include "toplev.h"
#include "toplev.h"
#include "target-globals.h"
#include "target-globals.h"
#include "flags.h"
#include "flags.h"
#include "regs.h"
#include "regs.h"
#include "rtl.h"
#include "rtl.h"
#include "hard-reg-set.h"
#include "hard-reg-set.h"
#include "reload.h"
#include "reload.h"
#include "expmed.h"
#include "expmed.h"
#include "expr.h"
#include "expr.h"
#include "optabs.h"
#include "optabs.h"
#include "libfuncs.h"
#include "libfuncs.h"
#include "cfgloop.h"
#include "cfgloop.h"
#include "ira-int.h"
#include "ira-int.h"
#include "builtins.h"
#include "builtins.h"
#include "gcse.h"
#include "gcse.h"
#include "bb-reorder.h"
#include "bb-reorder.h"
 
 
#if SWITCHABLE_TARGET
#if SWITCHABLE_TARGET
struct target_globals default_target_globals = {
struct target_globals default_target_globals = {
  &default_target_flag_state,
  &default_target_flag_state,
  &default_target_regs,
  &default_target_regs,
  &default_target_rtl,
  &default_target_rtl,
  &default_target_hard_regs,
  &default_target_hard_regs,
  &default_target_reload,
  &default_target_reload,
  &default_target_expmed,
  &default_target_expmed,
  &default_target_optabs,
  &default_target_optabs,
  &default_target_libfuncs,
  &default_target_libfuncs,
  &default_target_cfgloop,
  &default_target_cfgloop,
  &default_target_ira,
  &default_target_ira,
  &default_target_ira_int,
  &default_target_ira_int,
  &default_target_builtins,
  &default_target_builtins,
  &default_target_gcse,
  &default_target_gcse,
  &default_target_bb_reorder
  &default_target_bb_reorder
};
};
 
 
struct target_globals *
struct target_globals *
save_target_globals (void)
save_target_globals (void)
{
{
  struct target_globals *g;
  struct target_globals *g;
 
 
  g = ggc_alloc_target_globals ();
  g = ggc_alloc_target_globals ();
  g->flag_state = XCNEW (struct target_flag_state);
  g->flag_state = XCNEW (struct target_flag_state);
  g->regs = XCNEW (struct target_regs);
  g->regs = XCNEW (struct target_regs);
  g->rtl = ggc_alloc_cleared_target_rtl ();
  g->rtl = ggc_alloc_cleared_target_rtl ();
  g->hard_regs = XCNEW (struct target_hard_regs);
  g->hard_regs = XCNEW (struct target_hard_regs);
  g->reload = XCNEW (struct target_reload);
  g->reload = XCNEW (struct target_reload);
  g->expmed = XCNEW (struct target_expmed);
  g->expmed = XCNEW (struct target_expmed);
  g->optabs = XCNEW (struct target_optabs);
  g->optabs = XCNEW (struct target_optabs);
  g->libfuncs = ggc_alloc_cleared_target_libfuncs ();
  g->libfuncs = ggc_alloc_cleared_target_libfuncs ();
  g->cfgloop = XCNEW (struct target_cfgloop);
  g->cfgloop = XCNEW (struct target_cfgloop);
  g->ira = XCNEW (struct target_ira);
  g->ira = XCNEW (struct target_ira);
  g->ira_int = XCNEW (struct target_ira_int);
  g->ira_int = XCNEW (struct target_ira_int);
  g->builtins = XCNEW (struct target_builtins);
  g->builtins = XCNEW (struct target_builtins);
  g->gcse = XCNEW (struct target_gcse);
  g->gcse = XCNEW (struct target_gcse);
  g->bb_reorder = XCNEW (struct target_bb_reorder);
  g->bb_reorder = XCNEW (struct target_bb_reorder);
  restore_target_globals (g);
  restore_target_globals (g);
  init_reg_sets ();
  init_reg_sets ();
  target_reinit ();
  target_reinit ();
  return g;
  return g;
}
}
 
 
#endif
#endif
 
 

powered by: WebSVN 2.1.0

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