Commits

Richard Goedeken  committed 5fafce6 Merge

merged heads

  • Participants
  • Parent commits e060055, 886e818

Comments (0)

Files changed (4)

File projects/unix/Makefile

 
 CXXFLAGS += $(CFLAGS)
 ifeq ($(LTO), 1)
-  CFLAGS += -flto
-  CXXFLAGS += -flto
-  LDFLAGS += -fuse-linker-plugin $(CXXFLAGS)
+  CFLAGS += -flto -ffunction-sections -fdata-sections
+  CXXFLAGS += -flto -ffunction-sections -fdata-sections
+  LDFLAGS += -fuse-linker-plugin -Wl,--gc-sections $(CXXFLAGS)
 endif
 
 # standard build rules

File src/r4300/recomp.h

 void recompile_opcode(void);
 void prefetch_opcode(unsigned int op, unsigned int nextop);
 void dyna_jump(void);
-void dyna_start(void (*code)(void));
+void dyna_start(void *code);
 void dyna_stop(void);
 void *realloc_exec(void *ptr, size_t oldsize, size_t newsize);
 

File src/r4300/x86/rjump.c

 #pragma warning(disable:4731) /* frame pointer register 'ebp' modified by inline assembly code */
 #endif
 
-void dyna_start(void (*code)(void))
+void dyna_start(void *code)
 {
   /* save the base and stack pointers */
   /* make a call and a pop to retrieve the instruction pointer and save it too */

File src/r4300/x86_64/rjump.c

 static long long save_rsp = 0;
 static long long save_rip = 0;
 
-void dyna_start(void (*code)(void))
+void dyna_start(void *code)
 {
   /* save the base and stack pointers */
   /* make a call and a pop to retrieve the instruction pointer and save it too */