From: Rhys Weatherley Date: Wed, 13 Oct 2004 00:03:25 +0000 (+0000) Subject: Test case for the long-form backward branch bug. X-Git-Tag: r.0.0.6~33 X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=9ef87a33056a36a2d349a089a19d6e2860051210;p=francis%2Flibjit.git Test case for the long-form backward branch bug. --- diff --git a/ChangeLog b/ChangeLog index 3883a82..b357014 100644 --- 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 * doc/Makefile.am, doc/libjit.texi, include/jit/Makefile.am, diff --git a/tests/Makefile.am b/tests/Makefile.am index 6804775..aa0d767 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -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 index 0000000..44600c2 --- /dev/null +++ b/tests/loop.pas @@ -0,0 +1,23 @@ +{ Test code generation for long backwards branches in the x86 back end } +{ Evin Robertson } + +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.