aboutsummaryrefslogtreecommitdiff
path: root/sim
diff options
context:
space:
mode:
authorJillian Ye <jillian@cygnus>1998-04-08 20:57:28 +0000
committerJillian Ye <jillian@cygnus>1998-04-08 20:57:28 +0000
commit4cc9cd5474c3d51288ead20034a4033c19f014b8 (patch)
tree0497b4eb5522049123dde280869cbf1989805abe /sim
parent997d07bb700a5245c1968701147779ac9c5ae72f (diff)
downloadgdb-4cc9cd5474c3d51288ead20034a4033c19f014b8.zip
gdb-4cc9cd5474c3d51288ead20034a4033c19f014b8.tar.gz
gdb-4cc9cd5474c3d51288ead20034a4033c19f014b8.tar.bz2
c_gen.pl: Added subroutine perform_test_read_only
Diffstat (limited to 'sim')
-rw-r--r--sim/testsuite/sky/ChangeLog5
-rw-r--r--sim/testsuite/sky/Makefile.in2
-rwxr-xr-xsim/testsuite/sky/c_gen.pl29
3 files changed, 35 insertions, 1 deletions
diff --git a/sim/testsuite/sky/ChangeLog b/sim/testsuite/sky/ChangeLog
index fe8990a..62852a3 100644
--- a/sim/testsuite/sky/ChangeLog
+++ b/sim/testsuite/sky/ChangeLog
@@ -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:
diff --git a/sim/testsuite/sky/Makefile.in b/sim/testsuite/sky/Makefile.in
index a0b544b..353778f 100644
--- a/sim/testsuite/sky/Makefile.in
+++ b/sim/testsuite/sky/Makefile.in
@@ -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 \
diff --git a/sim/testsuite/sky/c_gen.pl b/sim/testsuite/sky/c_gen.pl
index f22c09f..24288ba 100755
--- a/sim/testsuite/sky/c_gen.pl
+++ b/sim/testsuite/sky/c_gen.pl
@@ -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");
+
+}
+
+