]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - sim/cr16/interp.c
sim: overhaul & unify endian settings management
[thirdparty/binutils-gdb.git] / sim / cr16 / interp.c
index 7f6b07fe286acd6c0b820170c192dbf3d742bcfe..6e3438c9d809ccd7161c9497eeecd0529459a1f3 100644 (file)
@@ -398,6 +398,9 @@ sim_open (SIM_OPEN_KIND kind, struct host_callback_struct *cb,
   SIM_DESC sd = sim_state_alloc (kind, cb);
   SIM_ASSERT (STATE_MAGIC (sd) == SIM_MAGIC_NUMBER);
 
+  /* Set default options before parsing user options.  */
+  current_target_byte_order = BFD_ENDIAN_LITTLE;
+
   /* The cpu data is kept in a separately allocated chunk of memory.  */
   if (sim_cpu_alloc_all (sd, 1) != SIM_RC_OK)
     {