c_gen.pl: Added subroutine perform_test_read_only
This commit is contained in:
parent
997d07bb70
commit
4cc9cd5474
|
@ -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>
|
Wed Apr 8 14:03:13 1998 Jillian Ye (jillian@cygnus.com>
|
||||||
|
|
||||||
* sce_test40.dvpasm, sce_test41.dvpasm, sce_test42.dvpasm, sce_test43.dvpasm:
|
* sce_test40.dvpasm, sce_test41.dvpasm, sce_test42.dvpasm, sce_test43.dvpasm:
|
||||||
|
|
|
@ -171,7 +171,7 @@ sce2_%.vu.o: sce2_%.vuasm
|
||||||
|
|
||||||
sce%.ok: sce%.exe
|
sce%.ok: sce%.exe
|
||||||
rm -f sce$*.ok
|
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 \
|
if [ $$? -ne 0 ]; then \
|
||||||
touch sce$*.ok; \
|
touch sce$*.ok; \
|
||||||
else \
|
else \
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
# ! (reg wrt 32) 0xH (addr) 0xH (data)
|
# ! (reg wrt 32) 0xH (addr) 0xH (data)
|
||||||
# ~ (reg wrt 64) 0xH (addr) 0xHigh_Low (data)
|
# ~ (reg wrt 64) 0xH (addr) 0xHigh_Low (data)
|
||||||
# % (reg read 64) 0xH (addr) 0xHigh_Low (data)
|
# % (reg read 64) 0xH (addr) 0xHigh_Low (data)
|
||||||
|
# r (read only) 0xH (addr) 4/8
|
||||||
# # comment line
|
# # comment line
|
||||||
# Note: n can be 0 (for VU1), 1 (for VU2), or 2 (for GIF).
|
# 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
|
# H, High, or Low is hex data in the format of FFFFFFFF
|
||||||
|
@ -95,6 +96,10 @@ while( $inputline = <INFILE> )
|
||||||
{
|
{
|
||||||
&perform_test64;
|
&perform_test64;
|
||||||
}
|
}
|
||||||
|
elsif ( $inputline =~ /^\r/ ) # A line starts with "r" is a read only test request
|
||||||
|
{
|
||||||
|
&perform_test_read_only;
|
||||||
|
}
|
||||||
else # ignore this input
|
else # ignore this input
|
||||||
{
|
{
|
||||||
print OUTFILE ("\n");
|
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");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue