case "${target}" in
# start-sanitize-sky
- mips64r59*-sky-*) mips_extra_objs='$(SIM_SKY_OBJS)' ;;
+ mips64r59*-sky-*) mips_extra_objs='$(SIM_SKY_OBJS)' ;
+ SIM_SUBTARGET="-DWITH_DEVICES=1 -DDEVICE_INIT=1";;
+
# end-sanitize-sky
*) mips_extra_objs="" ;;
esac
}
+/*---------------------------------------------------------------------------*/
+/*-- Device registration hook -----------------------------------------------*/
+/*---------------------------------------------------------------------------*/
+static device_init(SIM_DESC sd) {
+#ifdef DEVICE_INIT
+ extern void register_devices(SIM_DESC);
+ register_devices(sd);
+#endif
+}
/*---------------------------------------------------------------------------*/
/*-- GDB simulator interface ------------------------------------------------*/
MEM_SIZE, /* actual size */
K0BASE);
+ device_init(sd);
+
/* getopt will print the error message so we just have to exit if this fails.
FIXME: Hmmm... in the case of gdb we need getopt to call
print_filtered. */