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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [config/] [score/] [score-conv.h] - Blame information for rev 827

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

Line No. Rev Author Line
1 38 julius
/* score-conv.h for Sunplus S+CORE processor
2
   Copyright (C) 2005, 2007 Free Software Foundation, Inc.
3
 
4
   This file is part of GCC.
5
 
6
   GCC is free software; you can redistribute it and/or modify it
7
   under the terms of the GNU General Public License as published
8
   by the Free Software Foundation; either version 3, or (at your
9
   option) any later version.
10
 
11
   GCC is distributed in the hope that it will be useful, but WITHOUT
12
   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13
   or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
14
   License for more details.
15
 
16
   You should have received a copy of the GNU General Public License
17
   along with GCC; see the file COPYING3.  If not see
18
   <http://www.gnu.org/licenses/>.  */
19
 
20
#ifndef SCORE_CONV_0601
21
#define SCORE_CONV_0601
22
 
23
extern int target_flags;
24
 
25
#define GP_REG_FIRST                    0U
26
#define GP_REG_LAST                     31U
27
#define GP_REG_NUM                      (GP_REG_LAST - GP_REG_FIRST + 1U)
28
#define GP_DBX_FIRST                    0U
29
 
30
#define CE_REG_FIRST                    48U
31
#define CE_REG_LAST                     49U
32
#define CE_REG_NUM                      (CE_REG_LAST - CE_REG_FIRST + 1U)
33
 
34
#define ARG_REG_FIRST                   4U
35
#define ARG_REG_LAST                    7U
36
#define ARG_REG_NUM                     (ARG_REG_LAST - ARG_REG_FIRST + 1U)
37
 
38
#define REG_CONTAIN(REGNO, FIRST, NUM) \
39
  ((unsigned int)((int) (REGNO) - (FIRST)) < (NUM))
40
 
41
#define GP_REG_P(REGNO)        REG_CONTAIN (REGNO, GP_REG_FIRST, GP_REG_NUM)
42
 
43
#define G16_REG_P(REGNO)       REG_CONTAIN (REGNO, GP_REG_FIRST, 16)
44
 
45
#define CE_REG_P(REGNO)        REG_CONTAIN (REGNO, CE_REG_FIRST, CE_REG_NUM)
46
 
47
#define UIMM_IN_RANGE(V, W)  ((V) >= 0 && (V) < ((HOST_WIDE_INT) 1 << (W)))
48
 
49
#define SIMM_IN_RANGE(V, W)                            \
50
  ((V) >= (-1 * ((HOST_WIDE_INT) 1 << ((W) - 1)))      \
51
   && (V) < (1 * ((HOST_WIDE_INT) 1 << ((W) - 1))))
52
 
53
#define IMM_IN_RANGE(V, W, S) \
54
  ((S) ? SIMM_IN_RANGE (V, W) : UIMM_IN_RANGE (V, W))
55
 
56
#define IMM_IS_POW_OF_2(V, E1, E2)                \
57
  ((V) >= ((unsigned HOST_WIDE_INT) 1 << (E1))     \
58
   && (V) <= ((unsigned HOST_WIDE_INT) 1 << (E2))  \
59
   && ((V) & ((V) - 1)) == 0)
60
 
61
#define SCORE_STACK_ALIGN(LOC)          (((LOC) + 3) & ~3)
62
 
63
#define SCORE_MAX_FIRST_STACK_STEP      (0x3ff0)
64
 
65
#define SCORE_SDATA_MAX                 score_sdata_max ()
66
 
67
#define DEFAULT_SDATA_MAX               8
68
 
69
#define CONST_HIGH_PART(VALUE) \
70
  (((VALUE) + 0x8000) & ~(unsigned HOST_WIDE_INT) 0xffff)
71
 
72
#define CONST_LOW_PART(VALUE)           ((VALUE) - CONST_HIGH_PART (VALUE))
73
 
74
#define PROLOGUE_TEMP_REGNUM            (GP_REG_FIRST + 8)
75
 
76
#define EPILOGUE_TEMP_REGNUM            (GP_REG_FIRST + 8)
77
 
78
enum score_symbol_type
79
{
80
  SYMBOL_GENERAL,
81
  SYMBOL_SMALL_DATA     /* The symbol refers to something in a small data section.  */
82
};
83
 
84
int score_sdata_max (void);
85
 
86
#endif

powered by: WebSVN 2.1.0

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