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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [config/] [score/] [score-conv.h] - Blame information for rev 282

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 282 jeremybenn
/* 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 GCC_SCORE_CONV_H
21
#define GCC_SCORE_CONV_H
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 G8_REG_P(REGNO)        REG_CONTAIN (REGNO, GP_REG_FIRST, 8)
44
 
45
#define G16_REG_P(REGNO)       REG_CONTAIN (REGNO, GP_REG_FIRST, 16)
46
 
47
#define CE_REG_P(REGNO)        REG_CONTAIN (REGNO, CE_REG_FIRST, CE_REG_NUM)
48
 
49
#define GR_REG_CLASS_P(C)        ((C) == G16_REGS || (C) == G32_REGS)
50
#define SP_REG_CLASS_P(C) \
51
  ((C) == CN_REG || (C) == LC_REG || (C) == SC_REG || (C) == SP_REGS)
52
#define CP_REG_CLASS_P(C) \
53
  ((C) == CP1_REGS || (C) == CP2_REGS || (C) == CP3_REGS || (C) == CPA_REGS)
54
#define CE_REG_CLASS_P(C) \
55
  ((C) == HI_REG || (C) == LO_REG || (C) == CE_REGS)
56
 
57
#define UIMM_IN_RANGE(V, W)    ((V) >= 0 && (V) < ((HOST_WIDE_INT) 1 << (W)))
58
 
59
#define SIMM_IN_RANGE(V, W)                            \
60
  ((V) >= (-1 * ((HOST_WIDE_INT) 1 << ((W) - 1)))      \
61
   && (V) < (1 * ((HOST_WIDE_INT) 1 << ((W) - 1))))
62
 
63
#define IMM_IN_RANGE(V, W, S)  \
64
  ((S) ? SIMM_IN_RANGE (V, W) : UIMM_IN_RANGE (V, W))
65
 
66
#define IMM_IS_POW_OF_2(V, E1, E2)                 \
67
  ((V) >= ((unsigned HOST_WIDE_INT) 1 << (E1))     \
68
   && (V) <= ((unsigned HOST_WIDE_INT) 1 << (E2))  \
69
   && ((V) & ((V) - 1)) == 0)
70
 
71
enum score_symbol_type
72
{
73
  SYMBOL_GENERAL,
74
  SYMBOL_SMALL_DATA  /* The symbol refers to something in a small data section  */
75
};
76
 
77
#endif

powered by: WebSVN 2.1.0

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