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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [insn-addr.h] - Blame information for rev 816

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 38 julius
/* Macros to support INSN_ADDRESSES
2
   Copyright (C) 2000, 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 under
7
the terms of the GNU General Public License as published by the Free
8
Software Foundation; either version 3, or (at your option) any later
9
version.
10
 
11
GCC is distributed in the hope that it will be useful, but WITHOUT ANY
12
WARRANTY; without even the implied warranty of MERCHANTABILITY or
13
FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
14
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_INSN_ADDR_H
21
#define GCC_INSN_ADDR_H 
22
 
23
#include "varray.h"
24
 
25
extern GTY(()) varray_type insn_addresses_;
26
extern int insn_current_address;
27
 
28
#define INSN_ADDRESSES_DEFN() varray_type insn_addresses_
29
#define INSN_ADDRESSES(id) VARRAY_INT (insn_addresses_, (id))
30
#define INSN_ADDRESSES_ALLOC(size) \
31
  VARRAY_INT_INIT (insn_addresses_, (size), "insn_addresses")
32
#define INSN_ADDRESSES_FREE() (insn_addresses_ = 0)
33
#define INSN_ADDRESSES_SET_P() (insn_addresses_ != 0)
34
#define INSN_ADDRESSES_SIZE() VARRAY_SIZE (insn_addresses_)
35
#define INSN_ADDRESSES_NEW(insn, addr) do \
36
  {                                                                     \
37
    unsigned insn_uid__ = INSN_UID ((insn));                            \
38
    int insn_addr__ = (addr);                                           \
39
                                                                        \
40
    if (INSN_ADDRESSES_SET_P ())                                        \
41
      {                                                                 \
42
        if (INSN_ADDRESSES_SIZE () <= insn_uid__)                       \
43
          VARRAY_GROW (insn_addresses_, insn_uid__ + 1);                \
44
        INSN_ADDRESSES (insn_uid__) = insn_addr__;                      \
45
      }                                                                 \
46
  }                                                                     \
47
while (0)
48
 
49
#endif /* ! GCC_INSN_ADDR_H */

powered by: WebSVN 2.1.0

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