+2018-09-14  Sandra Loosemore  <sandra@codesourcery.com>
+
+       * nios2-tdep.c (nios2_type_align): New.
+       (nios2_gdb_arch_init): Install type_align hook.
+
 2018-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
 
        * eval.c (fake_method::fake_method): Call xzalloc directly for a
 
   return 1;
 }
 
+/* Implement the type_align gdbarch function.  */
+
+static ULONGEST
+nios2_type_align (struct gdbarch *gdbarch, struct type *type)
+{
+  type = check_typedef (type);
+  return std::min<ULONGEST> (4, TYPE_LENGTH (type));
+}
+
 /* Initialize the Nios II gdbarch.  */
 
 static struct gdbarch *
   set_gdbarch_float_bit (gdbarch, 32);
   set_gdbarch_double_bit (gdbarch, 64);
 
+  set_gdbarch_type_align (gdbarch, nios2_type_align);
+
   set_gdbarch_float_format (gdbarch, floatformats_ieee_single);
   set_gdbarch_double_format (gdbarch, floatformats_ieee_double);