Skip to content

Commit 7fca7b7

Browse files
committed
remove fcm from x86
1 parent 767842c commit 7fca7b7

File tree

1 file changed

+1
-101
lines changed

1 file changed

+1
-101
lines changed

backend/amd64/emit.ml

+1-101
Original file line numberDiff line numberDiff line change
@@ -621,105 +621,6 @@ let emit_jump_tables () =
621621
List.iter emit_jump_table !jump_tables;
622622
jump_tables := []
623623

624-
let file_emitter ~file_num ~file_name =
625-
ND.file ~file_num:(Some file_num) ~file_name
626-
627-
let build_asm_directives () : (module Asm_targets.Asm_directives_intf.S) =
628-
(module Asm_targets.Asm_directives.Make (struct
629-
let emit_line line = ND.comment line
630-
631-
let get_file_num file_name = Emitaux.get_file_num ~file_emitter file_name
632-
633-
let debugging_comments_in_asm_files = !Flambda_backend_flags.dasm_comments
634-
635-
module D = struct
636-
type constant = ND.Directive.Constant.t
637-
638-
let const_int64 num = ND.Directive.Constant.Signed_int num
639-
640-
let const_label str = ND.Directive.Constant.Named_thing str
641-
642-
let const_add c1 c2 = ND.Directive.Constant.Add (c1, c2)
643-
644-
let const_sub c1 c2 = ND.Directive.Constant.Sub (c1, c2)
645-
646-
(* CR sspies: The functions depending on [emit_directive] below break
647-
abstractions. This is intensional at the moment, because this is only
648-
the first step of getting rid of the first-class module entirely. *)
649-
let emit_directive d = List.iter directive (to_x86_directive d)
650-
651-
type data_type =
652-
| NONE
653-
| DWORD
654-
| QWORD
655-
| VEC128
656-
657-
let file = file_emitter
658-
659-
let loc ~file_num ~line ~col ?discriminator () =
660-
ignore discriminator;
661-
ND.loc ~file_num ~line ~col ?discriminator ()
662-
663-
let comment str = ND.comment str
664-
665-
let label ?data_type str =
666-
let _ = data_type in
667-
emit_directive (New_label (str, Code))
668-
669-
let section ?delayed:_ name flags args =
670-
match name, flags, args with
671-
| [".data"], _, _ -> ND.data ()
672-
| [".text"], _, _ -> ND.text ()
673-
| name, flags, args -> ND.switch_to_section_raw ~names:name ~flags ~args
674-
675-
let text () = ND.text ()
676-
677-
let new_line () = ND.new_line ()
678-
679-
let emit_constant const size =
680-
emit_directive
681-
(Const
682-
{ constant = ND.Directive.Constant_with_width.create const size;
683-
comment = None
684-
})
685-
686-
let global sym = emit_directive (Global sym)
687-
688-
let protected sym =
689-
if not (is_macosx system) then emit_directive (Protected sym)
690-
691-
let type_ sym typ_ =
692-
let typ_ : ND.symbol_type =
693-
match typ_ with
694-
| "@function" -> Function
695-
| "@object" -> Object
696-
| "STT_OBJECT" -> Object
697-
| "STT_FUNC" -> Function
698-
| _ -> Misc.fatal_error "Unsupported type"
699-
in
700-
emit_directive (Type (sym, typ_))
701-
702-
let byte const = emit_constant const Eight
703-
704-
let word const = emit_constant const Sixteen
705-
706-
let long const = emit_constant const Thirty_two
707-
708-
let qword const = emit_constant const Sixty_four
709-
710-
let bytes str = ND.string str
711-
712-
let uleb128 const =
713-
emit_directive (Uleb128 { constant = const; comment = None })
714-
715-
let sleb128 const =
716-
emit_directive (Sleb128 { constant = const; comment = None })
717-
718-
let direct_assignment var const =
719-
emit_directive (Direct_assignment (var, const))
720-
end
721-
end))
722-
723624
(* Names for instructions *)
724625

725626
let instr_for_intop = function
@@ -2462,8 +2363,7 @@ let begin_assembly unix =
24622363
List.iter directive (to_x86_directive d));
24632364
let code_begin = Cmm_helpers.make_symbol "code_begin" in
24642365
let code_end = Cmm_helpers.make_symbol "code_end" in
2465-
Emitaux.Dwarf_helpers.begin_dwarf ~build_asm_directives ~code_begin ~code_end
2466-
~file_emitter:D.file;
2366+
Emitaux.Dwarf_helpers.begin_dwarf ~code_begin ~code_end ~file_emitter:D.file;
24672367
if is_win64 system
24682368
then (
24692369
D.extrn "caml_call_gc" NEAR;

0 commit comments

Comments
 (0)