Branch: Tag:

2011-05-09

2011-05-09 16:30:38 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler: Implemented partial machine-code support for amd64 (aka x86_64).

1: Inside #if defined(_M_X64) && !defined(__GNUC__)
+  + #define OPCODE_INLINE_BRANCH + #define OPCODE_RETURN_JUMPADDR +    #if defined(_M_X64) && !defined(__GNUC__)      #define DEF_PROG_COUNTER void *amd64_pc; \
15:      #endif    + #define CALL_MACHINE_CODE(pc) \ +  do { \ +  /* The test is needed to get the labels to work... */ \ +  if (pc) { \ +  return ((int (*)(struct Pike_interpreter *))(pc)) \ +  (&Pike_interpreter); \ +  } \ +  } while(0) +  + void amd64_ins_entry(void); + #define INS_ENTRY() amd64_ins_entry() + /* Size of the prologue added by INS_ENTRY() (in PIKE_OPCODE_T's). */ + #define ENTRY_PROLOGUE_SIZE 0x23 +  + #if 0 + int ins_f_jump(unsigned int op, int backward_jump); + int ins_f_jump_with_arg(unsigned int op, unsigned INT32 arg, +  int backward_jump); + int ins_f_jump_with_two_args(unsigned int op, unsigned INT32 arg1, +  unsigned INT32 arg2, int backward_jump); + #endif +    #ifdef OPCODE_RETURN_JUMPADDR   /* Adjust for the machine code inserted after the call for I_JUMP opcodes. */   #define JUMP_EPILOGUE_SIZE 2