PowerPC64 .branch_lt address
[binutils-gdb.git] / sim / bfin / dv-bfin_emac.c
index d8ae75c6e5fca34f545c28502f496d97e3d1a36d..e45f1eaadd69abdbddf030b8c4dd38ccab262e81 100644 (file)
@@ -1,6 +1,6 @@
 /* Blackfin Ethernet Media Access Controller (EMAC) model.
 
-   Copyright (C) 2010-2020 Free Software Foundation, Inc.
+   Copyright (C) 2010-2022 Free Software Foundation, Inc.
    Contributed by Analog Devices, Inc.
 
    This file is part of simulators.
@@ -18,7 +18,8 @@
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
-#include "config.h"
+/* This must come before any other includes.  */
+#include "defs.h"
 
 #include <errno.h>
 #include <fcntl.h>
@@ -184,7 +185,7 @@ bfin_emac_io_write_buffer (struct hw *me, const void *source,
   value = dv_load_4 (source);
 
   mmr_off = addr - emac->base;
-  valuep = (void *)((unsigned long)emac + mmr_base() + mmr_off);
+  valuep = (void *)((uintptr_t)emac + mmr_base() + mmr_off);
 
   HW_TRACE_WRITE ();
 
@@ -285,7 +286,7 @@ bfin_emac_io_read_buffer (struct hw *me, void *dest,
     return 0;
 
   mmr_off = addr - emac->base;
-  valuep = (void *)((unsigned long)emac + mmr_base() + mmr_off);
+  valuep = (void *)((uintptr_t)emac + mmr_base() + mmr_off);
 
   HW_TRACE_READ ();