Permalink
Browse files

x86_64 runs now, although so far only with optimization flags lowered…

… by hand.
  • Loading branch information...
1 parent 1813114 commit 41d5c6157bbe2cda24d1c23b1e7fa84b408214f5 Clifford T. Matthews committed Jun 9, 2009
Showing with 14 additions and 6 deletions.
  1. +2 −1 include/syn68k_private.h.in
  2. +3 −1 runtime/backpatch.c
  3. +3 −1 runtime/init.c
  4. +3 −1 runtime/syn68k_header.c
  5. +3 −2 syngen/generatecode.c
@@ -275,7 +275,8 @@ static uint32 _writeul_unswapped(uint16 *p, uint32 tmp)
| ((cpu_state.ccx != 0) << 4))
-#if !defined(__alpha)
+/* #if !defined(__alpha) */
+#if SIZEOF_CHAR_P != 8
#define DEREF(typ, addr) (*(typ *)addr)
#else
View
@@ -1,3 +1,5 @@
+#include "config.h"
+
#include "syn68k_private.h"
#include "backpatch.h"
#include "alloc.h"
@@ -57,7 +59,7 @@ backpatch_apply_and_free (Block *b, backpatch_t *p)
*(uint16 *)((char *)b->compiled_code + first_byte) = value;
else if (length == 8)
*(uint8 *)((char *)b->compiled_code + first_byte) = value;
-#if defined (__alpha)
+#if SIZEOF_CHAR_P == 8
else if (length == 64)
*(uint64 *)((char *)b->compiled_code + first_byte) = value;
#endif
View
@@ -1,3 +1,5 @@
+#include "config.h"
+
#include "syn68k_private.h"
#include "hash.h"
#include "rangetree.h"
@@ -103,7 +105,7 @@ initialize_68k_emulator (void (*while_busy)(int), int native_p,
/* Create the magical block that contains an RTE. */
b = NULL;
-#if !defined (__alpha)
+#if SIZEOF_CHAR_P != 8
generate_block (NULL, US_TO_SYN68K (&rte), &b, TRUE);
#else
{
View
@@ -1,3 +1,5 @@
+#include "config.h"
+
/* Global register to hold the PC. We put this up here so that
* the global register will be defined before any of the inline functions
* in syn68k_public.h are hit, but after uint16 is typedef'd.
@@ -690,7 +692,7 @@ interpret_code (const uint16 *start_code)
* endian order. Since we know we're at the beginning of
* a block, we can check for the interrupt here.
*/
-#if !defined (__alpha) /* FIXME -- TODO -- just use __alpha case for everyone */
+#if SIZEOF_CHAR_P != 8
syn68k_addr_t addr = READUL (US_TO_SYN68K (code - PTR_WORDS - PTR_WORDS));
#else
syn68k_addr_t addr = READUL_US (code - PTR_WORDS - PTR_WORDS);
View
@@ -138,7 +138,8 @@ generate_c_code (const ParsedOpcodeInfo *info, const CCVariant *var,
else /* If we end a block, profile the next block. */
{
-#if !defined (__alpha) /* FIXME -- TODO -- just use __alpha case for everyone */
+/* #if !defined (__alpha) /* FIXME -- TODO -- just use __alpha case for everyone */
+#if SIZEOF_CHAR_P != 8
fputs ("\n#ifdef PROFILE\n"
" profile_block (hash_lookup "
"(READUL (US_TO_SYN68K (code) - 4)));\n"
@@ -154,7 +155,7 @@ generate_c_code (const ParsedOpcodeInfo *info, const CCVariant *var,
#if defined (SYNCHRONOUS_INTERRUPTS) && !defined (GENERATE_NATIVE_CODE)
fprintf (syn68k_c_stream,
-"#if !defined (__alpha) /* FIXME -- TODO -- just use __alpha case for everyone */\n"
+"#if SIZEOF_CHAR_P != 8\n"
" CHECK_FOR_INTERRUPT (READUL (US_TO_SYN68K (code - PTR_WORDS)));\n"
"#else\n"
" CHECK_FOR_INTERRUPT (READUL_US (code - PTR_WORDS));\n"

0 comments on commit 41d5c61

Please sign in to comment.