mirror of
https://github.com/ctm/syn68k.git
synced 2024-06-03 20:29:28 +00:00
x86_64 runs now, although so far only with optimization flags lowered by hand.
This commit is contained in:
parent
18131149d9
commit
41d5c6157b
|
@ -275,7 +275,8 @@ static uint32 _writeul_unswapped(uint16 *p, uint32 tmp)
|
||||||
| ((cpu_state.ccx != 0) << 4))
|
| ((cpu_state.ccx != 0) << 4))
|
||||||
|
|
||||||
|
|
||||||
#if !defined(__alpha)
|
/* #if !defined(__alpha) */
|
||||||
|
#if SIZEOF_CHAR_P != 8
|
||||||
#define DEREF(typ, addr) (*(typ *)addr)
|
#define DEREF(typ, addr) (*(typ *)addr)
|
||||||
#else
|
#else
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
#include "config.h"
|
||||||
|
|
||||||
#include "syn68k_private.h"
|
#include "syn68k_private.h"
|
||||||
#include "backpatch.h"
|
#include "backpatch.h"
|
||||||
#include "alloc.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;
|
*(uint16 *)((char *)b->compiled_code + first_byte) = value;
|
||||||
else if (length == 8)
|
else if (length == 8)
|
||||||
*(uint8 *)((char *)b->compiled_code + first_byte) = value;
|
*(uint8 *)((char *)b->compiled_code + first_byte) = value;
|
||||||
#if defined (__alpha)
|
#if SIZEOF_CHAR_P == 8
|
||||||
else if (length == 64)
|
else if (length == 64)
|
||||||
*(uint64 *)((char *)b->compiled_code + first_byte) = value;
|
*(uint64 *)((char *)b->compiled_code + first_byte) = value;
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
#include "config.h"
|
||||||
|
|
||||||
#include "syn68k_private.h"
|
#include "syn68k_private.h"
|
||||||
#include "hash.h"
|
#include "hash.h"
|
||||||
#include "rangetree.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. */
|
/* Create the magical block that contains an RTE. */
|
||||||
b = NULL;
|
b = NULL;
|
||||||
#if !defined (__alpha)
|
#if SIZEOF_CHAR_P != 8
|
||||||
generate_block (NULL, US_TO_SYN68K (&rte), &b, TRUE);
|
generate_block (NULL, US_TO_SYN68K (&rte), &b, TRUE);
|
||||||
#else
|
#else
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
#include "config.h"
|
||||||
|
|
||||||
/* Global register to hold the PC. We put this up here so that
|
/* 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
|
* the global register will be defined before any of the inline functions
|
||||||
* in syn68k_public.h are hit, but after uint16 is typedef'd.
|
* 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
|
* endian order. Since we know we're at the beginning of
|
||||||
* a block, we can check for the interrupt here.
|
* 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));
|
syn68k_addr_t addr = READUL (US_TO_SYN68K (code - PTR_WORDS - PTR_WORDS));
|
||||||
#else
|
#else
|
||||||
syn68k_addr_t addr = READUL_US (code - PTR_WORDS - PTR_WORDS);
|
syn68k_addr_t addr = READUL_US (code - PTR_WORDS - PTR_WORDS);
|
||||||
|
|
|
@ -138,7 +138,8 @@ generate_c_code (const ParsedOpcodeInfo *info, const CCVariant *var,
|
||||||
|
|
||||||
else /* If we end a block, profile the next block. */
|
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"
|
fputs ("\n#ifdef PROFILE\n"
|
||||||
" profile_block (hash_lookup "
|
" profile_block (hash_lookup "
|
||||||
"(READUL (US_TO_SYN68K (code) - 4)));\n"
|
"(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)
|
#if defined (SYNCHRONOUS_INTERRUPTS) && !defined (GENERATE_NATIVE_CODE)
|
||||||
fprintf (syn68k_c_stream,
|
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"
|
" CHECK_FOR_INTERRUPT (READUL (US_TO_SYN68K (code - PTR_WORDS)));\n"
|
||||||
"#else\n"
|
"#else\n"
|
||||||
" CHECK_FOR_INTERRUPT (READUL_US (code - PTR_WORDS));\n"
|
" CHECK_FOR_INTERRUPT (READUL_US (code - PTR_WORDS));\n"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user