3 * Copyright 2007 Free Software Foundation, Inc.
5 * This file is part of GNU Radio
7 * GNU Radio is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 3, or (at your option)
12 * GNU Radio is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License along
18 * with this program; if not, write to the Free Software Foundation, Inc.,
19 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
22 #ifndef INCLUDED_GCELL_GC_TYPES_H
23 #define INCLUDED_GCELL_GC_TYPES_H
26 #include <gcell/gc_cdefs.h>
27 #include <gcell/compiler.h>
38 * \brief 64-bit integer type representing an effective address (EA)
40 * This type is always 64-bits, regardless of whether we're
41 * running in 32 or 64-bit mode.
43 typedef uint64_t gc_eaddr_t;
47 ea_to_ptr(gc_eaddr_t ea)
49 // in 32-bit mode we're tossing the top 32-bits.
50 return (void *) (uintptr_t) ea;
53 static inline gc_eaddr_t
56 // two steps to avoid compiler warning in 32-bit mode.
57 return (gc_eaddr_t) (uintptr_t) p;
63 #endif /* INCLUDED_GCELL_GC_TYPES_H */