diff options
Diffstat (limited to 'translate/ghdldrv')
-rw-r--r-- | translate/ghdldrv/Makefile | 6 | ||||
-rw-r--r-- | translate/ghdldrv/ghdlrun.adb | 20 |
2 files changed, 6 insertions, 20 deletions
diff --git a/translate/ghdldrv/Makefile b/translate/ghdldrv/Makefile index 41e19a439..e9d940bfa 100644 --- a/translate/ghdldrv/Makefile +++ b/translate/ghdldrv/Makefile @@ -36,10 +36,10 @@ GRTSRCDIR=../grt include $(GRTSRCDIR)/Makefile.inc ghdl_mcode: GRT_FLAGS+=-DWITH_GNAT_RUN_TIME -ghdl_mcode: default_pathes.ads $(GRT_ADD_OBJS) mmap_binding.o force - gnatmake -aI../../ortho/mcode $(GNATFLAGS) ghdl_mcode $(GNAT_BARGS) -largs mmap_binding.o $(GNAT_LARGS) $(GRT_ADD_OBJS) $(subst @,$(GRTSRCDIR),$(GRT_EXTRA_LIB)) +ghdl_mcode: default_pathes.ads $(GRT_ADD_OBJS) memsegs_c.o force + gnatmake -aI../../ortho/mcode $(GNATFLAGS) ghdl_mcode $(GNAT_BARGS) -largs memsegs_c.o $(GNAT_LARGS) $(GRT_ADD_OBJS) $(subst @,$(GRTSRCDIR),$(GRT_EXTRA_LIB)) -mmap_binding.o: ../../ortho/mcode/mmap_binding.c +memsegs_c.o: ../../ortho/mcode/memsegs_c.c $(CC) -c -g -o $@ $< ghdl_gcc: default_pathes.ads force diff --git a/translate/ghdldrv/ghdlrun.adb b/translate/ghdldrv/ghdlrun.adb index 5adaeba5d..0dc31f40f 100644 --- a/translate/ghdldrv/ghdlrun.adb +++ b/translate/ghdldrv/ghdlrun.adb @@ -35,7 +35,7 @@ with System; use System; with Trans_Decls; with Ortho_Code.Binary; with Ortho_Code.Debug; -with Ortho_Code.X86.Emits; +with Ortho_Code.Abi; with Types; with Iirs; use Iirs; with Flags; @@ -177,13 +177,6 @@ package body Ghdlrun is pragma Export (C, Ieee_Std_Logic_1164_Resolved_Resolv_Ptr, "ieee__std_logic_1164__resolved_RESOLV_ptr"); - -- From GCC. - function Divdi3 (A, B : Long_Integer) return Long_Integer; - pragma Import (C, Divdi3, "__divdi3"); - - function Muldi3 (A, B : Long_Integer) return Long_Integer; - pragma Import (C, Muldi3, "__muldi3"); - function Find_Untruncated_Text_Read return O_Dnode is use Types; @@ -266,6 +259,8 @@ package body Ghdlrun is Binary_File.Memory.Write_Memory_Init; + Ortho_Code.Abi.Link_Intrinsics; + Def (Trans_Decls.Ghdl_Memcpy, Grt.Lib.Ghdl_Memcpy'Address); Def (Trans_Decls.Ghdl_Bound_Check_Failed_L0, @@ -525,15 +520,6 @@ package body Ghdlrun is Def (Trans_Decls.Ghdl_Get_Instance_Name, Grt.Names.Ghdl_Get_Instance_Name'Address); - Binary_File.Memory.Set_Symbol_Address - (Ortho_Code.X86.Emits.Intrinsics_Symbol - (Ortho_Code.X86.Intrinsic_Mul_Ov_I64), - Muldi3'Address); - Binary_File.Memory.Set_Symbol_Address - (Ortho_Code.X86.Emits.Intrinsics_Symbol - (Ortho_Code.X86.Intrinsic_Div_Ov_I64), - Divdi3'Address); - -- Find untruncated_text_read, if any. Decl := Find_Untruncated_Text_Read; if Decl /= O_Dnode_Null then |