diff --git a/tests/c/debuginfo.old.c b/tests/c/debuginfo.old.c deleted file mode 100644 index 5b8b6c704..000000000 --- a/tests/c/debuginfo.old.c +++ /dev/null @@ -1,35 +0,0 @@ -// ignore-if: test $YK_CARGO_PROFILE != "debug" -// Run-time: -// env-var: YKD_LOG_IR=-:jit-pre-opt -// env-var: YKD_SERIALISE_COMPILATION=1 -// stderr: -// ... -// define ptr @__yk_compiled_trace_0(... -// entry: -// ; main() c/debuginfo.c:28:5 -// ... - -// Check that debug information is included in module prints. - -#include -#include -#include -#include -#include - -int main(int argc, char **argv) { - YkMT *mt = yk_mt_new(NULL); - yk_mt_hot_threshold_set(mt, 0); - YkLocation loc = yk_location_new(); - - int i = 4; - NOOPT_VAL(i); - while (i > 0) { - yk_mt_control_point(mt, &loc); - i--; - } - - yk_location_drop(loc); - yk_mt_drop(mt); - return (EXIT_SUCCESS); -} diff --git a/tests/c/direct_recursion.old.c b/tests/c/direct_recursion.old.c deleted file mode 100644 index ad2b130e7..000000000 --- a/tests/c/direct_recursion.old.c +++ /dev/null @@ -1,54 +0,0 @@ -// Run-time: -// env-var: YKD_LOG_IR=-:jit-pre-opt -// env-var: YKD_SERIALISE_COMPILATION=1 -// env-var: YKD_LOG_JITSTATE=- -// stderr: -// jitstate: start-tracing -// 4:0 -// jitstate: stop-tracing -// --- Begin jit-pre-opt --- -// ... -// ...call i32 @f(... -// ... -// --- End jit-pre-opt --- -// 3:0 -// jitstate: enter-jit-code -// 2:0 -// 1:0 -// jitstate: deoptimise -// ... - -// Check that recursive function calls are not unrolled. - -#include -#include -#include -#include - -__attribute__((noinline)) int f(int num) { - NOOPT_VAL(num); - if (num == 0) - return 0; - else - return f(num - 1); -} - -int main(int argc, char **argv) { - YkMT *mt = yk_mt_new(NULL); - yk_mt_hot_threshold_set(mt, 0); - YkLocation loc = yk_location_new(); - - int i = 4; - NOOPT_VAL(i); - while (i > 0) { - yk_mt_control_point(mt, &loc); - int x = 3; - NOOPT_VAL(x); - fprintf(stderr, "%d:%d\n", i, f(x)); - i--; - } - - yk_location_drop(loc); - yk_mt_drop(mt); - return (EXIT_SUCCESS); -} diff --git a/tests/c/inline_asm_call.old.c b/tests/c/inline_asm_call.old.c deleted file mode 100644 index 95260fe67..000000000 --- a/tests/c/inline_asm_call.old.c +++ /dev/null @@ -1,50 +0,0 @@ -// Run-time: -// env-var: YKD_SERIALISE_COMPILATION=1 -// status: error -// stderr: -// ... -// InlineAsm is currently not supported. - -// Check that we bail when we see non-empty inline asm. - -#include -#include -#include -#include - -int foo() { - fprintf(stderr, "foo\n"); - return 11; -} - -int main(int argc, char **argv) { - - YkMT *mt = yk_mt_new(NULL); - yk_mt_hot_threshold_set(mt, 0); - YkLocation loc = yk_location_new(); - - int res = 0; - int i = 4; - NOOPT_VAL(i); - NOOPT_VAL(res); - while (i > 0) { - yk_mt_control_point(mt, &loc); -#ifdef __x86_64__ - // Stores the constant 5 into `res`. - asm("call foo" - : "=r"(res) // outputs. - : // inputs. - : // clobbers. - ); - fprintf(stderr, "res=%d\n", res); -#else -#error unknown platform -#endif - i--; - } - - assert(res == 5); - yk_location_drop(loc); - yk_mt_drop(mt); - return (EXIT_SUCCESS); -} diff --git a/tests/c/mutual_recursion.old.c b/tests/c/mutual_recursion.old.c deleted file mode 100644 index 4cd871800..000000000 --- a/tests/c/mutual_recursion.old.c +++ /dev/null @@ -1,74 +0,0 @@ -// Run-time: -// env-var: YKD_LOG_IR=-:jit-pre-opt,aot -// env-var: YKD_SERIALISE_COMPILATION=1 -// env-var: YKD_LOG_JITSTATE=- -// stderr: -// ... -// --- Begin aot --- -// ... -// define dso_local void @g(... -// ... -// define dso_local void @f(... -// ... -// --- End aot --- -// --- Begin jit-pre-opt --- -// ... -// call void @f(... -// ... -// --- End jit-pre-opt --- -// ... -// jitstate: enter-jit-code -// f: 3 -// g: 3 -// f: 2 -// g: 2 -// f: 1 -// g: 1 -// f: 0 -// ... - -// Check that mutual recusrion works. - -#include -#include -#include -#include - -void f(int); -void g(int); - -__attribute__((noinline)) void g(int num) { - NOOPT_VAL(num); - fprintf(stderr, "g: %d\n", num); - num--; - f(num); -} - -__attribute__((noinline)) void f(int num) { - NOOPT_VAL(num); - fprintf(stderr, "f: %d\n", num); - if (num == 0) - return; - - g(num); -} - -int main(int argc, char **argv) { - YkMT *mt = yk_mt_new(NULL); - yk_mt_hot_threshold_set(mt, 0); - YkLocation loc = yk_location_new(); - - int i = 4; - NOOPT_VAL(i); - while (i > 0) { - yk_mt_control_point(mt, &loc); - int x = 3; - NOOPT_VAL(x); - f(x); - i--; - } - - yk_location_drop(loc); - yk_mt_drop(mt); - return (EXIT_SUCCESS); -}