sim: lm32: reduce -Wno-error scope
[binutils-gdb.git] / sim / lm32 / sim-if.c
index fba2d638f42bc9e65ba39549be8e6d5cbc09326f..2f8b3449917aace54b1e41a41eb08c23a46588f9 100644 (file)
@@ -80,6 +80,8 @@ find_limit (SIM_DESC sd)
   return (addr + 65536) & ~(0xffffUL);
 }
 
+extern const SIM_MACH * const lm32_sim_machs[];
+
 /* Create an instance of the simulator.  */
 
 SIM_DESC
@@ -92,7 +94,10 @@ sim_open (SIM_OPEN_KIND kind, host_callback *callback, struct bfd *abfd,
   unsigned long base, limit;
 
   /* Set default options before parsing user options.  */
+  STATE_MACHS (sd) = lm32_sim_machs;
+  STATE_MODEL_NAME (sd) = "lm32";
   current_alignment = STRICT_ALIGNMENT;
+  current_target_byte_order = BFD_ENDIAN_BIG;
 
   /* The cpu data is kept in a separately allocated chunk of memory.  */
   if (sim_cpu_alloc_all (sd, 1) != SIM_RC_OK)
@@ -153,8 +158,8 @@ sim_open (SIM_OPEN_KIND kind, host_callback *callback, struct bfd *abfd,
              free_state (sd);
              return 0;
            }
-         /*sim_io_printf (sd, "Allocating memory at 0x%x size 0x%x\n", base, limit); */
-         sim_do_commandf (sd, "memory region 0x%x,0x%x", base, limit);
+         /*sim_io_printf (sd, "Allocating memory at 0x%lx size 0x%lx\n", base, limit); */
+         sim_do_commandf (sd, "memory region 0x%lx,0x%lx", base, limit);
        }
     }