* Make it so vu.bin is an optional file.
authorIan Carmichael <iancarm@cygnus>
Tue, 10 Feb 1998 00:13:54 +0000 (00:13 +0000)
committerIan Carmichael <iancarm@cygnus>
Tue, 10 Feb 1998 00:13:54 +0000 (00:13 +0000)
sim/mips/sky-vu1.c

index fcf026c41f8d4d722456761a9630d46f5a5bf75f..41ee0425ffdfa6898ce5af0da8558a579586a2f7 100644 (file)
@@ -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 */