]> git.unchartedbackwaters.co.uk Git - francis/libjit.git/commitdiff
Test case for the long-form backward branch bug.
authorRhys Weatherley <rweather@southern-storm.com.au>
Wed, 13 Oct 2004 00:03:25 +0000 (00:03 +0000)
committerRhys Weatherley <rweather@southern-storm.com.au>
Wed, 13 Oct 2004 00:03:25 +0000 (00:03 +0000)
ChangeLog
tests/Makefile.am
tests/loop.pas [new file with mode: 0644]

index 3883a820ef2831be65323a9f52037c07d24b2cd9..b357014105b63030259c4c985f7eec31b8f10396 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,6 +4,9 @@
        * jit/jit-rules-x86.c (output_branch): correct the offset
        when outputting a long-form backward branch.
 
+       * tests/Makefile.am, tests/loop.pas: test case for the
+       long-form backward branch bug.
+
 2004-10-06  Rhys Weatherley  <rweather@southern-storm.com.au>
 
        * doc/Makefile.am, doc/libjit.texi, include/jit/Makefile.am,
index 68047752f98353c7c7bda573eb1b652e4546b4d5..aa0d767da8d5bc3f427293c970dd52d235faacbe 100644 (file)
@@ -1,5 +1,6 @@
 
 TESTS = coerce.pas \
+               loop.pas \
                math.pas \
                param.pas
 TESTS_ENVIRONMENT = $(top_builddir)/dpas/dpas --dont-fold
diff --git a/tests/loop.pas b/tests/loop.pas
new file mode 100644 (file)
index 0000000..44600c2
--- /dev/null
@@ -0,0 +1,23 @@
+{ Test code generation for long backwards branches in the x86 back end }
+{ Evin Robertson <evin@users.sourceforge.net> }
+
+program loop;
+
+Procedure main;
+       var g : ShortInt;
+begin
+       for g := 0 to 10 do begin
+               write('.'); write('.'); write('.'); write('.');
+               write('.'); write('.'); write('.'); write('.');
+               write('.'); write('.'); write('.'); write('.');
+               write('.'); write('.'); write('.'); write('.');
+               write('.'); write('.'); write('.'); write('.');
+               write('.'); write('.'); write('.'); write('.');
+               write('.'); write('.'); write('.'); write('.');
+       end;
+       WriteLn('');
+end; { main }
+
+begin
+main
+end.