+/* Construct type for PSW register. */
+
+static struct type *
+rl78_psw_type (struct gdbarch *gdbarch)
+{
+ struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+
+ if (tdep->rl78_psw_type == NULL)
+ {
+ tdep->rl78_psw_type = arch_flags_type (gdbarch,
+ "builtin_type_rl78_psw", 8);
+ append_flags_type_flag (tdep->rl78_psw_type, 0, "CY");
+ append_flags_type_flag (tdep->rl78_psw_type, 1, "ISP0");
+ append_flags_type_flag (tdep->rl78_psw_type, 2, "ISP1");
+ append_flags_type_flag (tdep->rl78_psw_type, 3, "RBS0");
+ append_flags_type_flag (tdep->rl78_psw_type, 4, "AC");
+ append_flags_type_flag (tdep->rl78_psw_type, 5, "RBS1");
+ append_flags_type_flag (tdep->rl78_psw_type, 6, "Z");
+ append_flags_type_flag (tdep->rl78_psw_type, 7, "IE");
+ }
+
+ return tdep->rl78_psw_type;
+}
+