1 ///////////////////////////////////////////////////////////////////////////////
4 /// \brief Source code of compress_prepared_bcj_*
6 /// This is a simple program that should make the compiler to generate
7 /// PC-relative branches, jumps, and calls. The compiled files can then
8 /// be used to test the branch conversion filters. Note that this program
9 /// itself does nothing useful.
11 /// Compiling: gcc -std=c99 -fPIC -c bcj_test.c
12 /// Don't optimize or strip.
14 // Author: Lasse Collin
16 // This file has been put into the public domain.
17 // You can do whatever you want with this file.
19 ///////////////////////////////////////////////////////////////////////////////
21 extern int jump(int a
, int b
);
37 // The loop generates conditional jump backwards.
44 // Put enough code here to prevent JMP SHORT on x86.
61 main(int argc
, char **argv
)
63 int a
= call(argc
, argc
+ 1);