+
+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:
# ! (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
{
&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");
}
+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");
+
+}
+
+