/* Address ranges.
- Copyright (C) 1998, 2007-2012 Free Software Foundation, Inc.
+ Copyright (C) 1998-2019 Free Software Foundation, Inc.
Contributed by Cygnus Solutions.
This file is part of the GNU Simulators.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
-/* Tell sim-arange.h it's us. */
-#define SIM_ARANGE_C
+#ifndef _SIM_ARANGE_C_
+#define _SIM_ARANGE_C_
#include "libiberty.h"
#include "sim-basics.h"
-#include "sim-assert.h"
+#include "sim-arange.h"
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#include <string.h>
#endif
-#define DEFINE_INLINE_P (! defined (SIM_ARANGE_C_INCLUDED))
-#define DEFINE_NON_INLINE_P defined (SIM_ARANGE_C_INCLUDED)
-
-#if DEFINE_NON_INLINE_P
-
/* Insert a range. */
static void
free (asrtab);
}
-void
+INLINE_SIM_ARANGE\
+(void)
sim_addr_range_add (ADDR_RANGE *ar, address_word start, address_word end)
{
frob_range (ar, start, end, 0);
build_search_tree (ar);
}
-void
+INLINE_SIM_ARANGE\
+(void)
sim_addr_range_delete (ADDR_RANGE *ar, address_word start, address_word end)
{
frob_range (ar, start, end, 1);
build_search_tree (ar);
}
-#endif /* DEFINE_NON_INLINE_P */
-
-#if DEFINE_INLINE_P
-
-SIM_ARANGE_INLINE int
+INLINE_SIM_ARANGE\
+(int)
sim_addr_range_hit_p (ADDR_RANGE *ar, address_word addr)
{
ADDR_RANGE_TREE *t = ar->range_tree;
return 0;
}
-#endif /* DEFINE_INLINE_P */
+#endif /* _SIM_ARANGE_C_ */