diff options
Diffstat (limited to 'testsuite/tests/asmcomp')
-rw-r--r-- | testsuite/tests/asmcomp/bind_tuples.ml | 2 | ||||
-rw-r--r-- | testsuite/tests/asmcomp/compare.ml | 2 | ||||
-rw-r--r-- | testsuite/tests/asmcomp/evaluation_order.ml | 3 | ||||
-rw-r--r-- | testsuite/tests/asmcomp/func_sections.ml | 33 | ||||
-rw-r--r-- | testsuite/tests/asmcomp/lift_mutable_let_flambda.ml | 4 | ||||
-rw-r--r-- | testsuite/tests/asmcomp/optargs.ml | 4 | ||||
-rw-r--r-- | testsuite/tests/asmcomp/poll_attr_both.ml | 34 | ||||
-rw-r--r-- | testsuite/tests/asmcomp/poll_attr_inserted.ml | 20 | ||||
-rw-r--r-- | testsuite/tests/asmcomp/poll_attr_prologue.ml | 34 | ||||
-rw-r--r-- | testsuite/tests/asmcomp/poll_attr_user.ml | 34 | ||||
-rw-r--r-- | testsuite/tests/asmcomp/polling_insertion.ml | 8 | ||||
-rw-r--r-- | testsuite/tests/asmcomp/prevent_fma.ml | 2 | ||||
-rw-r--r-- | testsuite/tests/asmcomp/register_typing.ml | 2 | ||||
-rw-r--r-- | testsuite/tests/asmcomp/register_typing_switch.ml | 2 | ||||
-rw-r--r-- | testsuite/tests/asmcomp/staticalloc.ml | 6 | ||||
-rw-r--r-- | testsuite/tests/asmcomp/unrolling_flambda.ml | 4 | ||||
-rw-r--r-- | testsuite/tests/asmcomp/unrolling_flambda2.ml | 4 |
17 files changed, 123 insertions, 75 deletions
diff --git a/testsuite/tests/asmcomp/bind_tuples.ml b/testsuite/tests/asmcomp/bind_tuples.ml index 156b08721e..384965b428 100644 --- a/testsuite/tests/asmcomp/bind_tuples.ml +++ b/testsuite/tests/asmcomp/bind_tuples.ml @@ -1,5 +1,5 @@ (* TEST - * native + native; *) (* Check the effectiveness of optimized compilation of tuple binding diff --git a/testsuite/tests/asmcomp/compare.ml b/testsuite/tests/asmcomp/compare.ml index b51116e372..1a14c4dd32 100644 --- a/testsuite/tests/asmcomp/compare.ml +++ b/testsuite/tests/asmcomp/compare.ml @@ -1,5 +1,5 @@ (* TEST - * native + native; *) let[@inline never] float () = print_string "hello\n"; 42. let[@inline never] f () = compare (float ()) 0.5;; diff --git a/testsuite/tests/asmcomp/evaluation_order.ml b/testsuite/tests/asmcomp/evaluation_order.ml index 2fb7f917ff..f9cce72ef5 100644 --- a/testsuite/tests/asmcomp/evaluation_order.ml +++ b/testsuite/tests/asmcomp/evaluation_order.ml @@ -1,5 +1,4 @@ -(* TEST -*) +(* TEST *) external unsafe_get : 'a array -> int -> 'a = "%array_unsafe_get" external caml_bytes_get_16 : bytes -> int -> int = "%caml_bytes_get16" external caml_bytes_set_16 : bytes -> int -> int -> unit = "%caml_bytes_set16" diff --git a/testsuite/tests/asmcomp/func_sections.ml b/testsuite/tests/asmcomp/func_sections.ml index 7a58afc60c..bdfcaf4529 100644 --- a/testsuite/tests/asmcomp/func_sections.ml +++ b/testsuite/tests/asmcomp/func_sections.ml @@ -1,18 +1,23 @@ (* TEST -* function_sections -flags = "-S -function-sections" -** arch_arm -*** native -reference = "${test_source_directory}/func_sections.arm.reference" -** arch_arm64 -*** native -reference = "${test_source_directory}/func_sections.arm.reference" -** arch_amd64 -*** native -reference = "${test_source_directory}/func_sections.reference" -** arch_i386 -*** native -reference = "${test_source_directory}/func_sections.reference" + flags = "-S -function-sections"; + function_sections; + { + arch_arm; + reference = "${test_source_directory}/func_sections.arm.reference"; + native; + }{ + arch_arm64; + reference = "${test_source_directory}/func_sections.arm.reference"; + native; + }{ + arch_amd64; + reference = "${test_source_directory}/func_sections.reference"; + native; + }{ + arch_i386; + reference = "${test_source_directory}/func_sections.reference"; + native; + } *) (* We have a separate reference output for ARM because diff --git a/testsuite/tests/asmcomp/lift_mutable_let_flambda.ml b/testsuite/tests/asmcomp/lift_mutable_let_flambda.ml index 8c8b017d49..7f2758ef94 100644 --- a/testsuite/tests/asmcomp/lift_mutable_let_flambda.ml +++ b/testsuite/tests/asmcomp/lift_mutable_let_flambda.ml @@ -1,6 +1,6 @@ (* TEST - * flambda - ** native + flambda; + native; *) type t = T of { pos : int } diff --git a/testsuite/tests/asmcomp/optargs.ml b/testsuite/tests/asmcomp/optargs.ml index 65e4152bf2..32aafd48e0 100644 --- a/testsuite/tests/asmcomp/optargs.ml +++ b/testsuite/tests/asmcomp/optargs.ml @@ -1,6 +1,6 @@ (* TEST - flags = "-g" - * native + flags = "-g"; + native; *) (* Check the effectiveness of inlining the wrapper which fills in diff --git a/testsuite/tests/asmcomp/poll_attr_both.ml b/testsuite/tests/asmcomp/poll_attr_both.ml index d67d2fd973..56f6fe4a7f 100644 --- a/testsuite/tests/asmcomp/poll_attr_both.ml +++ b/testsuite/tests/asmcomp/poll_attr_both.ml @@ -1,13 +1,13 @@ -(* TEST - * setup-ocamlopt.byte-build-env - ** ocamlopt.byte -ocamlopt_byte_exit_status = "2" - *** check-ocamlopt.byte-output - - * setup-ocamlopt.opt-build-env - ** ocamlopt.opt -ocamlopt_opt_exit_status = "2" - *** check-ocamlopt.opt-output +(* TEST_BELOW +(* Blank lines added here to preserve locations. *) + + + + + + + + *) let[@inline never][@local never] v x = x + 1 @@ -19,3 +19,17 @@ let[@poll error] c x = ignore(Sys.opaque_identity(42)) done; x2 + !y + +(* TEST + { + setup-ocamlopt.byte-build-env; + ocamlopt_byte_exit_status = "2"; + ocamlopt.byte; + check-ocamlopt.byte-output; + }{ + setup-ocamlopt.opt-build-env; + ocamlopt_opt_exit_status = "2"; + ocamlopt.opt; + check-ocamlopt.opt-output; + } +*) diff --git a/testsuite/tests/asmcomp/poll_attr_inserted.ml b/testsuite/tests/asmcomp/poll_attr_inserted.ml index 0ea17755b7..2738fe4558 100644 --- a/testsuite/tests/asmcomp/poll_attr_inserted.ml +++ b/testsuite/tests/asmcomp/poll_attr_inserted.ml @@ -1,13 +1,15 @@ (* TEST - * setup-ocamlopt.byte-build-env - ** ocamlopt.byte -ocamlopt_byte_exit_status = "2" - *** check-ocamlopt.byte-output - - * setup-ocamlopt.opt-build-env - ** ocamlopt.opt -ocamlopt_opt_exit_status = "2" - *** check-ocamlopt.opt-output + { + setup-ocamlopt.byte-build-env; + ocamlopt_byte_exit_status = "2"; + ocamlopt.byte; + check-ocamlopt.byte-output; + }{ + setup-ocamlopt.opt-build-env; + ocamlopt_opt_exit_status = "2"; + ocamlopt.opt; + check-ocamlopt.opt-output; + } *) let[@poll error] c x = diff --git a/testsuite/tests/asmcomp/poll_attr_prologue.ml b/testsuite/tests/asmcomp/poll_attr_prologue.ml index 41b3f6b92f..4e32b79f40 100644 --- a/testsuite/tests/asmcomp/poll_attr_prologue.ml +++ b/testsuite/tests/asmcomp/poll_attr_prologue.ml @@ -1,16 +1,30 @@ -(* TEST - * setup-ocamlopt.byte-build-env - ** ocamlopt.byte -ocamlopt_byte_exit_status = "2" - *** check-ocamlopt.byte-output - - * setup-ocamlopt.opt-build-env - ** ocamlopt.opt -ocamlopt_opt_exit_status = "2" - *** check-ocamlopt.opt-output +(* TEST_BELOW +(* Blank lines added here to preserve locations. *) + + + + + + + + *) let[@poll error] rec c x l = match l with | [] -> 0 | _ :: tl -> (c[@tailcall]) (x+1) tl + +(* TEST + { + setup-ocamlopt.byte-build-env; + ocamlopt_byte_exit_status = "2"; + ocamlopt.byte; + check-ocamlopt.byte-output; + }{ + setup-ocamlopt.opt-build-env; + ocamlopt_opt_exit_status = "2"; + ocamlopt.opt; + check-ocamlopt.opt-output; + } +*) diff --git a/testsuite/tests/asmcomp/poll_attr_user.ml b/testsuite/tests/asmcomp/poll_attr_user.ml index e807bd60d4..9b68489f26 100644 --- a/testsuite/tests/asmcomp/poll_attr_user.ml +++ b/testsuite/tests/asmcomp/poll_attr_user.ml @@ -1,13 +1,13 @@ -(* TEST - * setup-ocamlopt.byte-build-env - ** ocamlopt.byte -ocamlopt_byte_exit_status = "2" - *** check-ocamlopt.byte-output - - * setup-ocamlopt.opt-build-env - ** ocamlopt.opt -ocamlopt_opt_exit_status = "2" - *** check-ocamlopt.opt-output +(* TEST_BELOW +(* Blank lines added here to preserve locations. *) + + + + + + + + *) let[@inline never][@local never] v x = x + 1 @@ -19,3 +19,17 @@ let[@poll error] c x = ignore(Sys.opaque_identity(ref 42)) done; x2 + !y + +(* TEST + { + setup-ocamlopt.byte-build-env; + ocamlopt_byte_exit_status = "2"; + ocamlopt.byte; + check-ocamlopt.byte-output; + }{ + setup-ocamlopt.opt-build-env; + ocamlopt_opt_exit_status = "2"; + ocamlopt.opt; + check-ocamlopt.opt-output; + } +*) diff --git a/testsuite/tests/asmcomp/polling_insertion.ml b/testsuite/tests/asmcomp/polling_insertion.ml index f19ae93293..9574ddbe57 100644 --- a/testsuite/tests/asmcomp/polling_insertion.ml +++ b/testsuite/tests/asmcomp/polling_insertion.ml @@ -1,8 +1,8 @@ (* TEST - modules = "polling.c" - compare_programs = "false" - * arch64 - ** native + modules = "polling.c"; + compare_programs = "false"; + arch64; + native; *) (* This set of tests examine poll insertion behaviour. We do this by requesting diff --git a/testsuite/tests/asmcomp/prevent_fma.ml b/testsuite/tests/asmcomp/prevent_fma.ml index 6ce124fce0..79506c9c88 100644 --- a/testsuite/tests/asmcomp/prevent_fma.ml +++ b/testsuite/tests/asmcomp/prevent_fma.ml @@ -1,5 +1,5 @@ (* TEST - * native + native; *) let ( *. ) x y = Sys.opaque_identity (x *. y) diff --git a/testsuite/tests/asmcomp/register_typing.ml b/testsuite/tests/asmcomp/register_typing.ml index 3bf3104f20..424aa16ab3 100644 --- a/testsuite/tests/asmcomp/register_typing.ml +++ b/testsuite/tests/asmcomp/register_typing.ml @@ -1,5 +1,5 @@ (* TEST - * native + native; *) type 'a typ = Int : int typ | Ptr : int list typ diff --git a/testsuite/tests/asmcomp/register_typing_switch.ml b/testsuite/tests/asmcomp/register_typing_switch.ml index 73960c4bcc..f6a3367d7b 100644 --- a/testsuite/tests/asmcomp/register_typing_switch.ml +++ b/testsuite/tests/asmcomp/register_typing_switch.ml @@ -1,5 +1,5 @@ (* TEST - * native + native; *) type 'a typ = Int : int typ | Ptr : int list typ | Int2 : int typ diff --git a/testsuite/tests/asmcomp/staticalloc.ml b/testsuite/tests/asmcomp/staticalloc.ml index 8f241847f8..38d5587f0f 100644 --- a/testsuite/tests/asmcomp/staticalloc.ml +++ b/testsuite/tests/asmcomp/staticalloc.ml @@ -1,7 +1,7 @@ (* TEST - include config - * native - flags = "config.cmx" + include config; + flags = "config.cmx"; + native; *) (* Check the effectiveness of structured constant propagation and diff --git a/testsuite/tests/asmcomp/unrolling_flambda.ml b/testsuite/tests/asmcomp/unrolling_flambda.ml index dcfcb03303..c7c47b3383 100644 --- a/testsuite/tests/asmcomp/unrolling_flambda.ml +++ b/testsuite/tests/asmcomp/unrolling_flambda.ml @@ -1,6 +1,6 @@ (* TEST - * flambda - ** native + flambda; + native; *) let rec f x = diff --git a/testsuite/tests/asmcomp/unrolling_flambda2.ml b/testsuite/tests/asmcomp/unrolling_flambda2.ml index 3079b7327e..70843c69ec 100644 --- a/testsuite/tests/asmcomp/unrolling_flambda2.ml +++ b/testsuite/tests/asmcomp/unrolling_flambda2.ml @@ -1,6 +1,6 @@ (* TEST - * flambda - ** native + flambda; + native; *) type t = { fn : t -> t -> int -> unit -> unit } |