Skip to content

Commit 1c584b2

Browse files
authored
Delete x86 architecture check (#2381)
* delete * fix build
1 parent dccae3d commit 1c584b2

File tree

16 files changed

+5
-605
lines changed

16 files changed

+5
-605
lines changed

backend/amd64/arch.ml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -105,11 +105,7 @@ let command_line_options =
105105
"-ftrap-notes", Arg.Set trap_notes,
106106
" Emit .note.ocaml_eh section with trap handling information (default)";
107107
"-fno-trap-notes", Arg.Clear trap_notes,
108-
" Do not emit .note.ocaml_eh section with trap handling information";
109-
"-farch-check", Arg.Set arch_check_symbols,
110-
" Emit ISA extension symbols for CPUID check (default)";
111-
"-fno-arch-check", Arg.Clear arch_check_symbols,
112-
" Do not emit ISA extension symbols for CPUID check";
108+
" Do not emit .note.ocaml_eh section with trap handling information"
113109
] @ Extension.args
114110

115111
let assert_simd_enabled () =

backend/amd64/emit.mlp

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -922,29 +922,6 @@ let emit_push_trap_label handler =
922922
traps.push_traps <- lbl::traps.push_traps;
923923
traps.enter_traps <- Int.Set.add handler traps.enter_traps
924924

925-
(* ISA Extension Checking *)
926-
927-
module Extension = struct
928-
module E = Arch.Extension
929-
930-
(* Keep in sync with [isa.c] in the runtime. *)
931-
let symbol : E.t -> string =
932-
fun t -> "caml_arch_" ^ String.lowercase_ascii (E.name t)
933-
934-
let is_nasm_or_masm () =
935-
match system with
936-
| S_macosx | S_win32 | S_win64 -> true
937-
| _ -> false
938-
939-
let emit_symbols () =
940-
if !arch_check_symbols && not (is_nasm_or_masm ()) then
941-
List.iter (fun ext ->
942-
let name = symbol ext in
943-
D.label name;
944-
D.weak name
945-
) (E.available ())
946-
end
947-
948925
(* Emit Code *)
949926

950927
let emit_atomic instr op (size : Cmm.atomic_bitwidth) addr =
@@ -2011,7 +1988,6 @@ let begin_assembly unix =
20111988

20121989
D.data ();
20131990
emit_global_label "data_begin";
2014-
Extension.emit_symbols ();
20151991

20161992
emit_named_text_section code_begin;
20171993
emit_global_label_for_symbol code_begin;

ocaml/Makefile

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -634,7 +634,6 @@ runtime4_COMMON_C_SOURCES = \
634634
interp \
635635
ints \
636636
io \
637-
isa \
638637
lexing \
639638
main \
640639
major_gc \
@@ -674,8 +673,7 @@ runtime4_NATIVE_ONLY_C_SOURCES = \
674673
fail_nat \
675674
roots_nat \
676675
startup_nat \
677-
signals_nat \
678-
isa
676+
signals_nat
679677

680678
# Runtime system source files (v5)
681679

@@ -704,7 +702,6 @@ runtime_COMMON_C_SOURCES = \
704702
intern \
705703
ints \
706704
io \
707-
isa \
708705
lexing \
709706
lf_skiplist \
710707
main \
@@ -747,8 +744,7 @@ runtime_NATIVE_ONLY_C_SOURCES = \
747744
fail_nat \
748745
frame_descriptors \
749746
startup_nat \
750-
signals_nat \
751-
isa
747+
signals_nat
752748

753749
# The runtime system
754750

ocaml/runtime/caml/dune

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@
6565
(interp.h as caml/interp.h)
6666
(intext.h as caml/intext.h)
6767
(io.h as caml/io.h)
68-
(isa.h as caml/isa.h)
6968
(lf_skiplist.h as caml/lf_skiplist.h)
7069
(m.h as caml/m.h)
7170
(major_gc.h as caml/major_gc.h)

ocaml/runtime/caml/isa.h

Lines changed: 0 additions & 111 deletions
This file was deleted.

ocaml/runtime/caml/mlvalues.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818

1919
#include "config.h"
2020
#include "misc.h"
21-
#include "isa.h"
2221

2322
#ifdef __cplusplus
2423
extern "C" {

ocaml/runtime/isa.c

Lines changed: 0 additions & 165 deletions
This file was deleted.

ocaml/runtime/startup_aux.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
and native code. */
2222

2323
#include <stdio.h>
24-
#include "caml/isa.h"
2524
#include "caml/backtrace.h"
2625
#include "caml/memory.h"
2726
#include "caml/callback.h"
@@ -115,7 +114,6 @@ void caml_parse_ocamlrunparam(void)
115114
case 'v': scanmult (opt, (uintnat *)&caml_verb_gc); break;
116115
case 'V': scanmult (opt, &params.verify_heap); break;
117116
case 'W': scanmult (opt, &caml_runtime_warnings); break;
118-
case 'X': scanmult (opt, &caml_skip_arch_extension_check); break;
119117
case ',': continue;
120118
}
121119
while (*opt != '\0'){

0 commit comments

Comments
 (0)