c_gen.pl: Added subroutine perform_test_read_only
authorJillian Ye <jillian@cygnus>
Wed, 8 Apr 1998 20:57:28 +0000 (20:57 +0000)
committerJillian Ye <jillian@cygnus>
Wed, 8 Apr 1998 20:57:28 +0000 (20:57 +0000)
sim/testsuite/sky/ChangeLog
sim/testsuite/sky/Makefile.in
sim/testsuite/sky/c_gen.pl

index fe8990a..62852a3 100644 (file)
@@ -1,3 +1,8 @@
+
+Wed Apr  8 16:53:00 1998 Jillian Ye <jillian@cygnus.com>
+
+       * c_gen.pl: Added subroutin perform_test_read_only.
+
 Wed Apr  8 14:03:13 1998  Jillian Ye (jillian@cygnus.com>
 
         * sce_test40.dvpasm, sce_test41.dvpasm, sce_test42.dvpasm, sce_test43.dvpasm:
index a0b544b..353778f 100644 (file)
@@ -171,7 +171,7 @@ sce2_%.vu.o: sce2_%.vuasm
 
 sce%.ok: sce%.exe
        rm -f sce$*.ok 
-       ulimit -t 30 ; $(RUN_FOR_TARGET) $<  >& sce$*_our_gif.dat; \
+       ulimit -t 30 ; $(RUN_FOR_TARGET) $<  > sce$*_our_gif.dat; \
         if [ $$? -ne 0 ];  then \
           touch sce$*.ok; \
        else \
index f22c09f..24288ba 100755 (executable)
@@ -17,6 +17,7 @@
 #         ! (reg wrt 32) 0xH  (addr)       0xH  (data) 
 #         ~ (reg wrt 64) 0xH  (addr)       0xHigh_Low (data)
 #         % (reg read 64) 0xH (addr)       0xHigh_Low (data) 
+#         r (read only)  0xH  (addr)       4/8
 #         # comment line
 #       Note: n can be 0 (for VU1), 1 (for VU2), or 2 (for GIF).
 #             H, High, or Low is hex data in the format of FFFFFFFF
@@ -95,6 +96,10 @@ while( $inputline = <INFILE> )
   {
       &perform_test64;
   }
+  elsif ( $inputline =~ /^\r/ )      # A line starts with "r" is a read only test request
+  {
+      &perform_test_read_only;
+  }
   else   # ignore this input
   {
      print OUTFILE ("\n");
@@ -260,6 +265,30 @@ sub perform_test64 {
 
 }
 
+sub perform_test_read_only {
+  print OUTFILE ("\n");
+  print OUTFILE ("/******************************************************************/\n");
+  print OUTFILE ("/*Just trying to read data from the specified address:            */\n\n");
+  
+  @columns = split ( /[\s]+/, $inputline );
+  #column[1] is the address;
+  #column[2] is the byte-indicator, which can be 4 or 8;
+
+  if ( $column[2] =~ /^4/ )      # This is a 4-byte data address
+  {     $d_type = "long "; }
+  else {
+        $d_type = "long long ";  # assuming the input is "8"
+  }
+
+  print OUTFILE ("\n{\n");
+  print OUTFILE ("  volatile ".$d_type."int* test_add = \(".$d_type."int *\)".$columns[1].";\n");
+  print OUTFILE ("  long long int test64_data = \(long long\) \( *test_add \);\n");
+  print OUTFILE ("}\n");
+
+}
+
+