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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.2.2/] [gcc/] [config/] [score/] [score-conv.h] - Diff between revs 38 and 154

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

Rev 38 Rev 154
/* score-conv.h for Sunplus S+CORE processor
/* score-conv.h for Sunplus S+CORE processor
   Copyright (C) 2005, 2007 Free Software Foundation, Inc.
   Copyright (C) 2005, 2007 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
   GCC is free software; you can redistribute it and/or modify it
   under the terms of the GNU General Public License as published
   under the terms of the GNU General Public License as published
   by the Free Software Foundation; either version 3, or (at your
   by the Free Software Foundation; either version 3, or (at your
   option) any later version.
   option) any later version.
 
 
   GCC is distributed in the hope that it will be useful, but WITHOUT
   GCC is distributed in the hope that it will be useful, but WITHOUT
   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
   or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
   or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
   License for more details.
   License 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/>.  */
 
 
#ifndef SCORE_CONV_0601
#ifndef SCORE_CONV_0601
#define SCORE_CONV_0601
#define SCORE_CONV_0601
 
 
extern int target_flags;
extern int target_flags;
 
 
#define GP_REG_FIRST                    0U
#define GP_REG_FIRST                    0U
#define GP_REG_LAST                     31U
#define GP_REG_LAST                     31U
#define GP_REG_NUM                      (GP_REG_LAST - GP_REG_FIRST + 1U)
#define GP_REG_NUM                      (GP_REG_LAST - GP_REG_FIRST + 1U)
#define GP_DBX_FIRST                    0U
#define GP_DBX_FIRST                    0U
 
 
#define CE_REG_FIRST                    48U
#define CE_REG_FIRST                    48U
#define CE_REG_LAST                     49U
#define CE_REG_LAST                     49U
#define CE_REG_NUM                      (CE_REG_LAST - CE_REG_FIRST + 1U)
#define CE_REG_NUM                      (CE_REG_LAST - CE_REG_FIRST + 1U)
 
 
#define ARG_REG_FIRST                   4U
#define ARG_REG_FIRST                   4U
#define ARG_REG_LAST                    7U
#define ARG_REG_LAST                    7U
#define ARG_REG_NUM                     (ARG_REG_LAST - ARG_REG_FIRST + 1U)
#define ARG_REG_NUM                     (ARG_REG_LAST - ARG_REG_FIRST + 1U)
 
 
#define REG_CONTAIN(REGNO, FIRST, NUM) \
#define REG_CONTAIN(REGNO, FIRST, NUM) \
  ((unsigned int)((int) (REGNO) - (FIRST)) < (NUM))
  ((unsigned int)((int) (REGNO) - (FIRST)) < (NUM))
 
 
#define GP_REG_P(REGNO)        REG_CONTAIN (REGNO, GP_REG_FIRST, GP_REG_NUM)
#define GP_REG_P(REGNO)        REG_CONTAIN (REGNO, GP_REG_FIRST, GP_REG_NUM)
 
 
#define G16_REG_P(REGNO)       REG_CONTAIN (REGNO, GP_REG_FIRST, 16)
#define G16_REG_P(REGNO)       REG_CONTAIN (REGNO, GP_REG_FIRST, 16)
 
 
#define CE_REG_P(REGNO)        REG_CONTAIN (REGNO, CE_REG_FIRST, CE_REG_NUM)
#define CE_REG_P(REGNO)        REG_CONTAIN (REGNO, CE_REG_FIRST, CE_REG_NUM)
 
 
#define UIMM_IN_RANGE(V, W)  ((V) >= 0 && (V) < ((HOST_WIDE_INT) 1 << (W)))
#define UIMM_IN_RANGE(V, W)  ((V) >= 0 && (V) < ((HOST_WIDE_INT) 1 << (W)))
 
 
#define SIMM_IN_RANGE(V, W)                            \
#define SIMM_IN_RANGE(V, W)                            \
  ((V) >= (-1 * ((HOST_WIDE_INT) 1 << ((W) - 1)))      \
  ((V) >= (-1 * ((HOST_WIDE_INT) 1 << ((W) - 1)))      \
   && (V) < (1 * ((HOST_WIDE_INT) 1 << ((W) - 1))))
   && (V) < (1 * ((HOST_WIDE_INT) 1 << ((W) - 1))))
 
 
#define IMM_IN_RANGE(V, W, S) \
#define IMM_IN_RANGE(V, W, S) \
  ((S) ? SIMM_IN_RANGE (V, W) : UIMM_IN_RANGE (V, W))
  ((S) ? SIMM_IN_RANGE (V, W) : UIMM_IN_RANGE (V, W))
 
 
#define IMM_IS_POW_OF_2(V, E1, E2)                \
#define IMM_IS_POW_OF_2(V, E1, E2)                \
  ((V) >= ((unsigned HOST_WIDE_INT) 1 << (E1))     \
  ((V) >= ((unsigned HOST_WIDE_INT) 1 << (E1))     \
   && (V) <= ((unsigned HOST_WIDE_INT) 1 << (E2))  \
   && (V) <= ((unsigned HOST_WIDE_INT) 1 << (E2))  \
   && ((V) & ((V) - 1)) == 0)
   && ((V) & ((V) - 1)) == 0)
 
 
#define SCORE_STACK_ALIGN(LOC)          (((LOC) + 3) & ~3)
#define SCORE_STACK_ALIGN(LOC)          (((LOC) + 3) & ~3)
 
 
#define SCORE_MAX_FIRST_STACK_STEP      (0x3ff0)
#define SCORE_MAX_FIRST_STACK_STEP      (0x3ff0)
 
 
#define SCORE_SDATA_MAX                 score_sdata_max ()
#define SCORE_SDATA_MAX                 score_sdata_max ()
 
 
#define DEFAULT_SDATA_MAX               8
#define DEFAULT_SDATA_MAX               8
 
 
#define CONST_HIGH_PART(VALUE) \
#define CONST_HIGH_PART(VALUE) \
  (((VALUE) + 0x8000) & ~(unsigned HOST_WIDE_INT) 0xffff)
  (((VALUE) + 0x8000) & ~(unsigned HOST_WIDE_INT) 0xffff)
 
 
#define CONST_LOW_PART(VALUE)           ((VALUE) - CONST_HIGH_PART (VALUE))
#define CONST_LOW_PART(VALUE)           ((VALUE) - CONST_HIGH_PART (VALUE))
 
 
#define PROLOGUE_TEMP_REGNUM            (GP_REG_FIRST + 8)
#define PROLOGUE_TEMP_REGNUM            (GP_REG_FIRST + 8)
 
 
#define EPILOGUE_TEMP_REGNUM            (GP_REG_FIRST + 8)
#define EPILOGUE_TEMP_REGNUM            (GP_REG_FIRST + 8)
 
 
enum score_symbol_type
enum score_symbol_type
{
{
  SYMBOL_GENERAL,
  SYMBOL_GENERAL,
  SYMBOL_SMALL_DATA     /* The symbol refers to something in a small data section.  */
  SYMBOL_SMALL_DATA     /* The symbol refers to something in a small data section.  */
};
};
 
 
int score_sdata_max (void);
int score_sdata_max (void);
 
 
#endif
#endif
 
 

powered by: WebSVN 2.1.0

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