Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check amd64 extension support at startup #2220

Merged
merged 17 commits into from
Feb 9, 2024
Prev Previous commit
Next Next commit
Apply suggestions from code review
Co-authored-by: Greta Yorsh <45005955+gretay-js@users.noreply.github.com>
  • Loading branch information
TheNumbat and gretay-js committed Feb 8, 2024
commit 17d8508bc1c43264d377d48a508a9459bd89cf40
13 changes: 2 additions & 11 deletions backend/amd64/emit.mlp
Original file line number Diff line number Diff line change
Expand Up @@ -927,17 +927,8 @@ let emit_push_trap_label handler =
module Extension = struct
module E = Arch.Extension

let symbol : E.t -> string = function
| POPCNT -> "caml_arch_popcnt"
| PREFETCHW -> "caml_arch_prefetchw"
| PREFETCHWT1 -> "caml_arch_prefetchwt1"
| SSE3 -> "caml_arch_sse3"
| SSSE3 -> "caml_arch_ssse3"
| SSE4_1 -> "caml_arch_sse4_1"
| SSE4_2 -> "caml_arch_sse4_2"
| CLMUL -> "caml_arch_clmul"
| BMI -> "caml_arch_bmi"
| BMI2 -> "caml_arch_bmi2"
(* Keep in sync with [isa.c] in the runtime. *)
let symbol : E.t -> string = fun t -> "caml_arch_" ^ String.lowercase_ascii (E.name t)

let is_nasm_or_masm () =
match system with
Expand Down