From: Ian Carmichael Date: Tue, 10 Feb 1998 00:13:54 +0000 (+0000) Subject: * Make it so vu.bin is an optional file. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=dde66fa756e0b6fb88532a8ac1e7b412142153d7;p=binutils-gdb.git * Make it so vu.bin is an optional file. --- diff --git a/sim/mips/sky-vu1.c b/sim/mips/sky-vu1.c index fcf026c41f8..41ee0425ffd 100644 --- a/sim/mips/sky-vu1.c +++ b/sim/mips/sky-vu1.c @@ -209,14 +209,13 @@ void init_vu(VectorUnitState *state, char* umem_buffer, char* mem_buffer) /* read instruction file (mandatory) */ if (*ifilename) { - if((fp = fopen(ifilename, "r")) == NULL) - abend2("%s: can not open\n", ifilename); - - for (i = 0; fread(&data[0], 4, 1, fp) != 0; i++) { - fread(&data[1], 4, 1, fp); - LoadMMem(state, i, data, 1); + if((fp = fopen(ifilename, "r")) != NULL) { + for (i = 0; fread(&data[0], 4, 1, fp) != 0; i++) { + fread(&data[1], 4, 1, fp); + LoadMMem(state, i, data, 1); + } + fclose(fp); } - fclose(fp); } /* PKE dirven simvpe */