VirtualBox

Changeset 42601 in vbox for trunk/src/recompiler/tcg/tcg.h


Ignore:
Timestamp:
Aug 5, 2012 4:26:25 PM (12 years ago)
Author:
vboxsync
Message:

REM: Initial changes to make it work (seemingly) with MinGW-w64.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/recompiler/tcg/tcg.h

    r37689 r42601  
    282282    /* goto_tb support */
    283283    uint8_t *code_buf;
    284     unsigned long *tb_next;
     284    uintptr_t *tb_next;
    285285    uint16_t *tb_next_offset;
    286286    uint16_t *tb_jmp_offset; /* != NULL if USE_DIRECT_JUMP */
     
    342342    TCGContext *s = &tcg_ctx;
    343343    uint8_t *ptr, *ptr_end;
    344     size = (size + sizeof(long) - 1) & ~(sizeof(long) - 1);
     344    size = (size + sizeof(void *) - 1) & ~(sizeof(void *) - 1);
    345345    ptr = s->pool_cur;
    346346    ptr_end = ptr + size;
     
    358358
    359359int tcg_gen_code(TCGContext *s, uint8_t *gen_code_buf);
    360 int tcg_gen_code_search_pc(TCGContext *s, uint8_t *gen_code_buf, long offset);
     360int tcg_gen_code_search_pc(TCGContext *s, uint8_t *gen_code_buf, intptr_t offset);
    361361
    362362void tcg_set_frame(TCGContext *s, int reg,
     
    502502#if defined(_ARCH_PPC) && !defined(_ARCH_PPC64)
    503503#define tcg_qemu_tb_exec(tb_ptr) \
    504     ((long REGPARM __attribute__ ((longcall)) (*)(void *))code_gen_prologue)(tb_ptr)
    505 #else
    506 # if defined(VBOX) && defined(GCC_WITH_BUGGY_REGPARM)
     504    ((intptr_t REGPARM __attribute__ ((longcall)) (*)(void *))code_gen_prologue)(tb_ptr)
     505#else
     506# if defined(VBOX) && defined(GCC_WITH_BUGGY_REGPARM) && !defined(__MINGW64__)
    507507#  define tcg_qemu_tb_exec(tb_ptr, ret)        \
    508508    __asm__ __volatile__("call *%%ecx" : "=a"(ret) : "a"(tb_ptr), "c" (&code_gen_prologue[0]) : "memory", "%edx", "cc")
    509 # else  /* !VBOX || !GCC_WITH_BUGGY_REG_PARAM */
    510 #define tcg_qemu_tb_exec(tb_ptr) ((long REGPARM (*)(void *))code_gen_prologue)(tb_ptr)
    511 # endif /* !VBOX || !GCC_WITH_BUGGY_REG_PARAM */
    512 #endif
     509# else
     510#define tcg_qemu_tb_exec(tb_ptr) ((intptr_t REGPARM (*)(void *))code_gen_prologue)(tb_ptr)
     511# endif
     512#endif
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette