VirtualBox

Changeset 36125 in vbox for trunk/src/recompiler


Ignore:
Timestamp:
Mar 1, 2011 4:49:42 PM (14 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
70290
Message:

recompiler: Removing traces of attempts at making the recompiler compile with the microsoft compiler. (untested)

Location:
trunk/src/recompiler
Files:
27 edited

Legend:

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

    r13382 r36125  
    44#include "config-host.h"
    55
    6 #ifndef _MSC_VER
    76#include <inttypes.h>
    8 #endif
    97
    108#ifdef HAVE_BYTESWAP_H
    119#include <byteswap.h>
    12 #else
    13 #ifdef _MSC_VER
    14 static _inline uint16_t bswap_16(register uint16_t x)
    15 {
    16     return ((uint16_t)( \
    17                 (((uint16_t)(x) & (uint16_t)0x00ffU) << 8) | \
    18                 (((uint16_t)(x) & (uint16_t)0xff00U) >> 8) )); \
    19 }
    20 
    21 static _inline uint32_t bswap_32(register uint32_t x) \
    22 { \
    23     return ((uint32_t)( \
    24                 (((uint32_t)(x) & (uint32_t)0x000000ffUL) << 24) | \
    25                 (((uint32_t)(x) & (uint32_t)0x0000ff00UL) <<  8) | \
    26                 (((uint32_t)(x) & (uint32_t)0x00ff0000UL) >>  8) | \
    27                 (((uint32_t)(x) & (uint32_t)0xff000000UL) >> 24) )); \
    28 }
    29 
    30 static _inline uint64_t bswap_64(register uint64_t x) \
    31 { \
    32     return ((uint64_t)( \
    33                 (uint64_t)(((uint64_t)(x) & (uint64_t)0x00000000000000ffULL) << 56) | \
    34                 (uint64_t)(((uint64_t)(x) & (uint64_t)0x000000000000ff00ULL) << 40) | \
    35                 (uint64_t)(((uint64_t)(x) & (uint64_t)0x0000000000ff0000ULL) << 24) | \
    36                 (uint64_t)(((uint64_t)(x) & (uint64_t)0x00000000ff000000ULL) <<  8) | \
    37                 (uint64_t)(((uint64_t)(x) & (uint64_t)0x000000ff00000000ULL) >>  8) | \
    38                 (uint64_t)(((uint64_t)(x) & (uint64_t)0x0000ff0000000000ULL) >> 24) | \
    39                 (uint64_t)(((uint64_t)(x) & (uint64_t)0x00ff000000000000ULL) >> 40) | \
    40                 (uint64_t)(((uint64_t)(x) & (uint64_t)0xff00000000000000ULL) >> 56) )); \
    41 }
    42 
    4310#else
    4411
     
    7441                (uint64_t)(((uint64_t)(__x) & (uint64_t)0xff00000000000000ULL) >> 56) )); \
    7542})
    76 #endif
    7743
    7844#endif /* !HAVE_BYTESWAP_H */
    7945
    8046#ifndef bswap16 /* BSD endian.h clash */
    81 #ifndef VBOX
    8247static inline uint16_t bswap16(uint16_t x)
    83 #else
    84 DECLINLINE(uint16_t) bswap16(uint16_t x)
    85 #endif
    8648{
    8749    return bswap_16(x);
     
    9052
    9153#ifndef bswap32 /* BSD endian.h clash */
    92 #ifndef VBOX
    9354static inline uint32_t bswap32(uint32_t x)
    94 #else
    95 DECLINLINE(uint32_t) bswap32(uint32_t x)
    96 #endif
    9755{
    9856    return bswap_32(x);
     
    10159
    10260#ifndef bswap64 /* BSD endian.h clash. */
    103 #ifndef VBOX
    10461static inline uint64_t bswap64(uint64_t x)
    105 #else
    106 DECLINLINE(uint64_t) bswap64(uint64_t x)
    107 #endif
    10862{
    10963    return bswap_64(x);
     
    11165#endif
    11266
    113 #ifndef VBOX
    11467static inline void bswap16s(uint16_t *s)
    115 #else
    116 DECLINLINE(void) bswap16s(uint16_t *s)
    117 #endif
    11868{
    11969    *s = bswap16(*s);
    12070}
    12171
    122 #ifndef VBOX
    12372static inline void bswap32s(uint32_t *s)
    124 #else
    125 DECLINLINE(void) bswap32s(uint32_t *s)
    126 #endif
    12773{
    12874    *s = bswap32(*s);
    12975}
    13076
    131 #ifndef VBOX
    13277static inline void bswap64s(uint64_t *s)
    133 #else
    134 DECLINLINE(void) bswap64s(uint64_t *s)
    135 #endif
    13678{
    13779    *s = bswap64(*s);
     
    15092#endif
    15193
    152 #ifndef VBOX
    15394#define CPU_CONVERT(endian, size, type)\
    15495static inline type endian ## size ## _to_cpu(type v)\
     
    181122     *p = cpu_to_ ## endian ## size(v);\
    182123}
    183 #else  /* VBOX */
    184 #define CPU_CONVERT(endian, size, type)\
    185 DECLINLINE(type) endian ## size ## _to_cpu(type v)\
    186 {\
    187     return endian ## _bswap(v, size);\
    188 }\
    189 \
    190 DECLINLINE(type) cpu_to_ ## endian ## size(type v)\
    191 {\
    192     return endian ## _bswap(v, size);\
    193 }\
    194 \
    195 DECLINLINE(void) endian ## size ## _to_cpus(type *p)\
    196 {\
    197     endian ## _bswaps(p, size)\
    198 }\
    199 \
    200 DECLINLINE(void) cpu_to_ ## endian ## size ## s(type *p)\
    201 {\
    202     endian ## _bswaps(p, size)\
    203 }\
    204 \
    205 DECLINLINE(type) endian ## size ## _to_cpup(const type *p)\
    206 {\
    207     return endian ## size ## _to_cpu(*p);\
    208 }\
    209 \
    210 DECLINLINE(void) cpu_to_ ## endian ## size ## w(type *p, type v)\
    211 {\
    212      *p = cpu_to_ ## endian ## size(v);\
    213 }
    214 #endif /* VBOX */
    215124
    216125CPU_CONVERT(be, 16, uint16_t)
  • trunk/src/recompiler/cpu-all.h

    r35346 r36125  
    9696#else
    9797
    98 #ifndef VBOX
    9998static inline uint16_t tswap16(uint16_t s)
    100 #else
    101 DECLINLINE(uint16_t) tswap16(uint16_t s)
    102 #endif
    10399{
    104100    return s;
    105101}
    106102
    107 #ifndef VBOX
    108103static inline uint32_t tswap32(uint32_t s)
    109 #else
    110 DECLINLINE(uint32_t) tswap32(uint32_t s)
    111 #endif
    112104{
    113105    return s;
    114106}
    115107
    116 #ifndef VBOX
    117108static inline uint64_t tswap64(uint64_t s)
    118 #else
    119 DECLINLINE(uint64_t) tswap64(uint64_t s)
    120 #endif
    121109{
    122110    return s;
    123111}
    124112
    125 #ifndef VBOX
    126113static inline void tswap16s(uint16_t *s)
    127 #else
    128 DECLINLINE(void) tswap16s(uint16_t *s)
    129 #endif
    130 {
    131 }
    132 
    133 #ifndef VBOX
     114{
     115}
     116
    134117static inline void tswap32s(uint32_t *s)
    135 #else
    136 DECLINLINE(void) tswap32s(uint32_t *s)
    137 #endif
    138 {
    139 }
    140 
    141 #ifndef VBOX
     118{
     119}
     120
    142121static inline void tswap64s(uint64_t *s)
    143 #else
    144 DECLINLINE(void) tswap64s(uint64_t *s)
    145 #endif
    146122{
    147123}
     
    375351}
    376352
    377 #else  /* !(VBOX && REM_PHYS_ADDR_IN_TLB) */
     353#else  /* !VBOX */
    378354
    379355static inline int ldub_p(void *ptr)
     
    575551#if !defined(WORDS_BIGENDIAN) || defined(WORDS_ALIGNED)
    576552
    577 #ifndef VBOX
    578553static inline int lduw_be_p(void *ptr)
    579554{
     
    590565#endif
    591566}
    592 #else /* VBOX */
    593 DECLINLINE(int) lduw_be_p(void *ptr)
    594 {
    595 #if defined(__i386__) && !defined(_MSC_VER)
    596     int val;
    597     asm volatile ("movzwl %1, %0\n"
    598                   "xchgb %b0, %h0\n"
    599                   : "=q" (val)
    600                   : "m" (*(uint16_t *)ptr));
    601     return val;
    602 #else
    603     uint8_t *b = (uint8_t *) ptr;
    604     return ((b[0] << 8) | b[1]);
    605 #endif
    606 }
    607 #endif
    608 
    609 #ifndef VBOX
     567
    610568static inline int ldsw_be_p(void *ptr)
    611569{
     
    622580#endif
    623581}
    624 #else
    625 DECLINLINE(int) ldsw_be_p(void *ptr)
    626 {
    627 #if defined(__i386__) && !defined(_MSC_VER)
    628     int val;
    629     asm volatile ("movzwl %1, %0\n"
    630                   "xchgb %b0, %h0\n"
    631                   : "=q" (val)
    632                   : "m" (*(uint16_t *)ptr));
    633     return (int16_t)val;
    634 #else
    635     uint8_t *b = (uint8_t *) ptr;
    636     return (int16_t)((b[0] << 8) | b[1]);
    637 #endif
    638 }
    639 #endif
    640 
    641 #ifndef VBOX
     582
    642583static inline int ldl_be_p(void *ptr)
    643584{
     
    654595#endif
    655596}
    656 #else
    657 DECLINLINE(int) ldl_be_p(void *ptr)
    658 {
    659 #if (defined(__i386__) || defined(__x86_64__)) && !defined(_MSC_VER)
    660     int val;
    661     asm volatile ("movl %1, %0\n"
    662                   "bswap %0\n"
    663                   : "=r" (val)
    664                   : "m" (*(uint32_t *)ptr));
    665     return val;
    666 #else
    667     uint8_t *b = (uint8_t *) ptr;
    668     return (b[0] << 24) | (b[1] << 16) | (b[2] << 8) | b[3];
    669 #endif
    670 }
    671 #endif
    672 
    673 #ifndef VBOX
     597
    674598static inline uint64_t ldq_be_p(void *ptr)
    675 #else
    676 DECLINLINE(uint64_t) ldq_be_p(void *ptr)
    677 #endif
    678599{
    679600    uint32_t a,b;
     
    683604}
    684605
    685 #ifndef VBOX
    686606static inline void stw_be_p(void *ptr, int v)
    687607{
     
    697617#endif
    698618}
    699 #else
    700 DECLINLINE(void) stw_be_p(void *ptr, int v)
    701 {
    702 #if defined(__i386__) && !defined(_MSC_VER)
    703     asm volatile ("xchgb %b0, %h0\n"
    704                   "movw %w0, %1\n"
    705                   : "=q" (v)
    706                   : "m" (*(uint16_t *)ptr), "0" (v));
    707 #else
    708     uint8_t *d = (uint8_t *) ptr;
    709     d[0] = v >> 8;
    710     d[1] = v;
    711 #endif
    712 }
    713 
    714 #endif /* VBOX */
    715 
    716 #ifndef VBOX
     619
    717620static inline void stl_be_p(void *ptr, int v)
    718621{
     
    730633#endif
    731634}
    732 #else
    733 DECLINLINE(void) stl_be_p(void *ptr, int v)
    734 {
    735 #if !defined(_MSC_VER) && (defined(__i386__) || defined(__x86_64__))
    736     asm volatile ("bswap %0\n"
    737                   "movl %0, %1\n"
    738                   : "=r" (v)
    739                   : "m" (*(uint32_t *)ptr), "0" (v));
    740 #else
    741     uint8_t *d = (uint8_t *) ptr;
    742     d[0] = v >> 24;
    743     d[1] = v >> 16;
    744     d[2] = v >> 8;
    745     d[3] = v;
    746 #endif
    747 }
    748 #endif /* VBOX */
    749 
    750 #ifndef VBOX
     635
    751636static inline void stq_be_p(void *ptr, uint64_t v)
    752 #else
    753 DECLINLINE(void) stq_be_p(void *ptr, uint64_t v)
    754 #endif
    755637{
    756638    stl_be_p(ptr, v >> 32);
     
    759641
    760642/* float access */
    761 #ifndef VBOX
    762643static inline float32 ldfl_be_p(void *ptr)
    763 #else
    764 DECLINLINE(float32) ldfl_be_p(void *ptr)
    765 #endif
    766644{
    767645    union {
     
    773651}
    774652
    775 #ifndef VBOX
    776653static inline void stfl_be_p(void *ptr, float32 v)
    777 #else
    778 DECLINLINE(void) stfl_be_p(void *ptr, float32 v)
    779 #endif
    780654{
    781655    union {
     
    787661}
    788662
    789 #ifndef VBOX
    790663static inline float64 ldfq_be_p(void *ptr)
    791 #else
    792 DECLINLINE(float64) ldfq_be_p(void *ptr)
    793 #endif
    794664{
    795665    CPU_DoubleU u;
     
    799669}
    800670
    801 #ifndef VBOX
    802671static inline void stfq_be_p(void *ptr, float64 v)
    803 #else
    804 DECLINLINE(void) stfq_be_p(void *ptr, float64 v)
    805 #endif
    806672{
    807673    CPU_DoubleU u;
     
    11941060/* MMIO pages are identified by a combination of an IO device index and
    11951061   3 flags.  The ROMD code stores the page ram offset in iotlb entry,
    1196    so only a limited number of ids are available.  */
     1062   so only a limited number of ids are avaiable.  */
    11971063
    11981064#define IO_MEM_SHIFT       3
     
    12371103void cpu_physical_memory_rw(target_phys_addr_t addr, uint8_t *buf,
    12381104                            int len, int is_write);
    1239 #ifndef VBOX
    12401105static inline void cpu_physical_memory_read(target_phys_addr_t addr,
    12411106                                            uint8_t *buf, int len)
    1242 #else
    1243 DECLINLINE(void) cpu_physical_memory_read(target_phys_addr_t addr,
    1244                                           uint8_t *buf, int len)
    1245 #endif
    12461107{
    12471108    cpu_physical_memory_rw(addr, buf, len, 0);
    12481109}
    1249 #ifndef VBOX
    12501110static inline void cpu_physical_memory_write(target_phys_addr_t addr,
    12511111                                             const uint8_t *buf, int len)
    1252 #else
    1253 DECLINLINE(void) cpu_physical_memory_write(target_phys_addr_t addr,
    1254                                            const uint8_t *buf, int len)
    1255 #endif
    12561112{
    12571113    cpu_physical_memory_rw(addr, (uint8_t *)buf, len, 1);
     
    13541210DECLINLINE(int64_t) cpu_get_real_ticks(void)
    13551211{
    1356     return  ASMReadTSC();
     1212    return ASMReadTSC();
    13571213}
    13581214
     
    14721328extern int64_t kqemu_ret_excp_count;
    14731329extern int64_t kqemu_ret_intr_count;
    1474 
    14751330#endif
    14761331
  • trunk/src/recompiler/cpu-exec.c

    r36056 r36125  
    174174}
    175175
    176 #ifndef VBOX
    177176static inline TranslationBlock *tb_find_fast(void)
    178 #else
    179 DECLINLINE(TranslationBlock *) tb_find_fast(void)
    180 #endif
    181177{
    182178    TranslationBlock *tb;
  • trunk/src/recompiler/exec-all.h

    r35346 r36125  
    112112                      target_phys_addr_t paddr, int prot,
    113113                      int mmu_idx, int is_softmmu);
    114 #ifndef VBOX
    115114static inline int tlb_set_page(CPUState *env1, target_ulong vaddr,
    116115                               target_phys_addr_t paddr, int prot,
    117116                               int mmu_idx, int is_softmmu)
    118 #else
    119 DECLINLINE(int) tlb_set_page(CPUState *env1, target_ulong vaddr,
    120                                target_phys_addr_t paddr, int prot,
    121                                int mmu_idx, int is_softmmu)
    122 #endif
    123117{
    124118    if (prot & PAGE_READ)
     
    193187};
    194188
    195 #ifndef VBOX
    196189static inline unsigned int tb_jmp_cache_hash_page(target_ulong pc)
    197 #else
    198 DECLINLINE(unsigned int) tb_jmp_cache_hash_page(target_ulong pc)
    199 #endif
    200190{
    201191    target_ulong tmp;
     
    204194}
    205195
    206 #ifndef VBOX
    207196static inline unsigned int tb_jmp_cache_hash_func(target_ulong pc)
    208 #else
    209 DECLINLINE(unsigned int) tb_jmp_cache_hash_func(target_ulong pc)
    210 #endif
    211 
    212197{
    213198    target_ulong tmp;
     
    217202}
    218203
    219 #ifndef VBOX
    220204static inline unsigned int tb_phys_hash_func(unsigned long pc)
    221 #else
    222 DECLINLINE(unsigned int) tb_phys_hash_func(unsigned long pc)
    223 #endif
    224205{
    225206    return pc & (CODE_GEN_PHYS_HASH_SIZE - 1);
     
    281262
    282263/* set the jump target */
    283 #ifndef VBOX
    284264static inline void tb_set_jmp_target(TranslationBlock *tb,
    285265                                     int n, unsigned long addr)
    286 #else
    287 DECLINLINE(void) tb_set_jmp_target(TranslationBlock *tb,
    288                                    int n, unsigned long addr)
    289 #endif
    290266{
    291267    tb->tb_next[n] = addr;
     
    294270#endif
    295271
    296 #ifndef VBOX
    297272static inline void tb_add_jump(TranslationBlock *tb, int n,
    298273                               TranslationBlock *tb_next)
    299 #else
    300 DECLINLINE(void) tb_add_jump(TranslationBlock *tb, int n,
    301                              TranslationBlock *tb_next)
    302 #endif
    303274{
    304275    /* NOTE: this test is only needed for thread safety */
     
    384355/* NOTE2: the returned address is not exactly the physical address: it
    385356   is the offset relative to phys_ram_base */
    386 #ifndef VBOX
    387357static inline target_ulong get_phys_addr_code(CPUState *env1, target_ulong addr)
    388 #else
    389 DECLINLINE(target_ulong) get_phys_addr_code(CPUState *env1, target_ulong addr)
    390 #endif
    391358{
    392359    int mmu_idx, page_index, pd;
     
    425392/* Deterministic execution requires that IO only be performed on the last
    426393   instruction of a TB so that interrupts take effect immediately.  */
    427 #ifndef VBOX
    428394static inline int can_do_io(CPUState *env)
    429 #else
    430 DECLINLINE(int) can_do_io(CPUState *env)
    431 #endif
    432395{
    433396    if (!use_icount)
  • trunk/src/recompiler/exec.c

    r35996 r36125  
    358358}
    359359
    360 #ifndef VBOX
    361360static inline PageDesc **page_l1_map(target_ulong index)
    362 #else
    363 DECLINLINE(PageDesc **) page_l1_map(target_ulong index)
    364 #endif
    365361{
    366362#ifndef VBOX
     
    392388}
    393389
    394 #ifndef VBOX
    395390static inline PageDesc *page_find_alloc(target_ulong index)
    396 #else
    397 DECLINLINE(PageDesc *) page_find_alloc(target_ulong index)
    398 #endif
    399391{
    400392    PageDesc **lp, *p;
     
    427419}
    428420
    429 #ifndef VBOX
    430421static inline PageDesc *page_find(target_ulong index)
    431 #else
    432 DECLINLINE(PageDesc *) page_find(target_ulong index)
    433 #endif
    434422{
    435423    PageDesc **lp, *p;
     
    497485}
    498486
    499 #ifndef VBOX
    500487static inline PhysPageDesc *phys_page_find(target_phys_addr_t index)
    501 #else
    502 DECLINLINE(PhysPageDesc *) phys_page_find(target_phys_addr_t index)
    503 #endif
    504488{
    505489    return phys_page_find_alloc(index, 0);
     
    716700}
    717701
    718 #ifndef VBOX
    719702static inline void invalidate_page_bitmap(PageDesc *p)
    720 #else
    721 DECLINLINE(void) invalidate_page_bitmap(PageDesc *p)
    722 #endif
    723703{
    724704    if (p->code_bitmap) {
     
    852832
    853833/* invalidate one TB */
    854 #ifndef VBOX
    855834static inline void tb_remove(TranslationBlock **ptb, TranslationBlock *tb,
    856835                             int next_offset)
    857 #else
    858 DECLINLINE(void) tb_remove(TranslationBlock **ptb, TranslationBlock *tb,
    859                            int next_offset)
    860 #endif
    861836{
    862837    TranslationBlock *tb1;
     
    871846}
    872847
    873 #ifndef VBOX
    874848static inline void tb_page_remove(TranslationBlock **ptb, TranslationBlock *tb)
    875 #else
    876 DECLINLINE(void) tb_page_remove(TranslationBlock **ptb, TranslationBlock *tb)
    877 #endif
    878849{
    879850    TranslationBlock *tb1;
     
    892863}
    893864
    894 #ifndef VBOX
    895865static inline void tb_jmp_remove(TranslationBlock *tb, int n)
    896 #else
    897 DECLINLINE(void) tb_jmp_remove(TranslationBlock *tb, int n)
    898 #endif
    899866{
    900867    TranslationBlock *tb1, **ptb;
     
    926893/* reset the jump entry 'n' of a TB so that it is not chained to
    927894   another TB */
    928 #ifndef VBOX
    929895static inline void tb_reset_jump(TranslationBlock *tb, int n)
    930 #else
    931 DECLINLINE(void) tb_reset_jump(TranslationBlock *tb, int n)
    932 #endif
    933896{
    934897    tb_set_jmp_target(tb, n, (unsigned long)(tb->tc_ptr + tb->tb_next_offset[n]));
     
    10371000#endif /* VBOX */
    10381001
    1039 #ifndef VBOX
    10401002static inline void set_bits(uint8_t *tab, int start, int len)
    1041 #else
    1042 DECLINLINE(void) set_bits(uint8_t *tab, int start, int len)
    1043 #endif
    10441003{
    10451004    int end, mask, end1;
     
    12541213
    12551214/* len must be <= 8 and start must be a multiple of len */
    1256 #ifndef VBOX
    12571215static inline void tb_invalidate_phys_page_fast(target_phys_addr_t start, int len)
    1258 #else
    1259 DECLINLINE(void) tb_invalidate_phys_page_fast(target_phys_addr_t start, int len)
    1260 #endif
    12611216{
    12621217    PageDesc *p;
     
    13561311
    13571312/* add the tb in the target page and protect it if necessary */
    1358 #ifndef VBOX
    13591313static inline void tb_alloc_page(TranslationBlock *tb,
    13601314                                 unsigned int n, target_ulong page_addr)
    1361 #else
    1362 DECLINLINE(void) tb_alloc_page(TranslationBlock *tb,
    1363                                  unsigned int n, target_ulong page_addr)
    1364 #endif
    13651315{
    13661316    PageDesc *p;
     
    15181468static void tb_reset_jump_recursive(TranslationBlock *tb);
    15191469
    1520 #ifndef VBOX
    15211470static inline void tb_reset_jump_recursive2(TranslationBlock *tb, int n)
    1522 #else
    1523 DECLINLINE(void) tb_reset_jump_recursive2(TranslationBlock *tb, int n)
    1524 #endif
    15251471{
    15261472    TranslationBlock *tb1, *tb_next, **ptb;
     
    18991845#if !defined(CONFIG_USER_ONLY)
    19001846
    1901 #ifndef VBOX
    19021847static inline void tlb_flush_jmp_cache(CPUState *env, target_ulong addr)
    1903 #else
    1904 DECLINLINE(void) tlb_flush_jmp_cache(CPUState *env, target_ulong addr)
    1905 #endif
    19061848{
    19071849    unsigned int i;
     
    19641906}
    19651907
    1966 #ifndef VBOX
    19671908static inline void tlb_flush_entry(CPUTLBEntry *tlb_entry, target_ulong addr)
    1968 #else
    1969 DECLINLINE(void) tlb_flush_entry(CPUTLBEntry *tlb_entry, target_ulong addr)
    1970 #endif
    19711909{
    19721910    if (addr == (tlb_entry->addr_read &
     
    20371975}
    20381976
    2039 #ifndef VBOX
    20401977static inline void tlb_reset_dirty_range(CPUTLBEntry *tlb_entry,
    20411978                                         unsigned long start, unsigned long length)
    2042 #else
    2043 DECLINLINE(void) tlb_reset_dirty_range(CPUTLBEntry *tlb_entry,
    2044                                        unsigned long start, unsigned long length)
    2045 #endif
    20461979{
    20471980    unsigned long addr;
     
    21902123}
    21912124
    2192 #ifndef VBOX
    21932125static inline void tlb_set_dirty1(CPUTLBEntry *tlb_entry, target_ulong vaddr)
    2194 #else
    2195 DECLINLINE(void) tlb_set_dirty1(CPUTLBEntry *tlb_entry, target_ulong vaddr)
    2196 #endif
    21972126{
    21982127    if (tlb_entry->addr_write == (vaddr | TLB_NOTDIRTY))
     
    22032132/* update the TLB corresponding to virtual page vaddr and phys addr
    22042133   addr so that it is no longer dirty */
    2205 #ifndef VBOX
    22062134static inline void tlb_set_dirty(CPUState *env,
    22072135                                 unsigned long addr, target_ulong vaddr)
    2208 #else
    2209 DECLINLINE(void) tlb_set_dirty(CPUState *env,
    2210                                unsigned long addr, target_ulong vaddr)
    2211 #endif
    22122136{
    22132137    int i;
  • trunk/src/recompiler/fpu/softfloat-native.h

    r21292 r36125  
    6464#define islessequal(x, y)       ((!unordered(x, y)) && ((x) <= (y)))
    6565#define isunordered(x,y)        unordered(x, y)
    66 #elif defined(_MSC_VER)
    67 #include <float.h>
    68 #define unordered(x1, x2)       ((_fpclass(x1) <= 2) || (_fpclass(x2) <= 2))
    69 #define isless(x, y)            ((!unordered(x, y)) && ((x) < (y)))
    70 #define islessequal(x, y)       ((!unordered(x, y)) && ((x) <= (y)))
    71 #define isunordered(x,y)        unordered(x, y)
    7266#endif
    7367
     
    141135    float_round_to_zero      = 3
    142136};
    143 #elif defined(_MSC_VER)
    144 enum {
    145     float_round_nearest_even = _FpRoundNearest,
    146     float_round_down         = _FpRoundMinusInfinity,
    147     float_round_up           = _FpRoundPlusInfinity,
    148     float_round_to_zero      = _FpRoundChopped
    149 };
    150137#else
    151138enum {
  • trunk/src/recompiler/gen-icount.h

    r17040 r36125  
    44static int icount_label;
    55
    6 #ifndef VBOX
    76static inline void gen_icount_start(void)
    8 #else /* VBOX */
    9 DECLINLINE(void) gen_icount_start(void)
    10 #endif /* VBOX */
    117{
    128    TCGv count;
     
    4541}
    4642
    47 #ifndef VBOX
    4843inline static void gen_io_start(void)
    49 #else
    50 DECLINLINE(void) gen_io_start(void)
    51 #endif
    5244{
    5345    TCGv tmp = tcg_const_i32(1);
     
    5648}
    5749
    58 #ifndef VBOX
    5950static inline void gen_io_end(void)
    60 #else /* VBOX */
    61 DECLINLINE(void) gen_io_end(void)
    62 #endif /* VBOX */
    6351{
    6452    TCGv tmp = tcg_const_i32(0);
  • trunk/src/recompiler/host-utils.h

    r26499 r36125  
    5050/* Binary search for leading zeros.  */
    5151
    52 #ifndef VBOX
    5352static always_inline int clz32(uint32_t val)
    54 #else
    55 DECLALWAYSINLINE(int) clz32(uint32_t val)
    56 #endif
    5753{
    5854#if QEMU_GNUC_PREREQ(3, 4)
     
    9187}
    9288
    93 #ifndef VBOX
    9489static always_inline int clo32(uint32_t val)
    95 #else
    96 DECLALWAYSINLINE(int) clo32(uint32_t val)
    97 #endif
    9890{
    9991    return clz32(~val);
    10092}
    10193
    102 #ifndef VBOX
    10394static always_inline int clz64(uint64_t val)
    104 #else
    105 DECLALWAYSINLINE(int) clz64(uint64_t val)
    106 #endif
    10795{
    10896#if QEMU_GNUC_PREREQ(3, 4)
     
    124112}
    125113
    126 #ifndef VBOX
    127114static always_inline int clo64(uint64_t val)
    128 #else
    129 DECLALWAYSINLINE(int) clo64(uint64_t val)
    130 #endif
    131115{
    132116    return clz64(~val);
    133117}
    134118
    135 #ifndef VBOX
    136119static always_inline int ctz32 (uint32_t val)
    137 #else
    138 DECLALWAYSINLINE(int) ctz32 (uint32_t val)
    139 #endif
    140120{
    141121#if QEMU_GNUC_PREREQ(3, 4)
     
    176156 }
    177157
    178 #ifndef VBOX
    179158static always_inline int cto32 (uint32_t val)
    180 #else
    181 DECLALWAYSINLINE(int) cto32 (uint32_t val)
    182 #endif
    183159{
    184160    return ctz32(~val);
    185161}
    186162
    187 #ifndef VBOX
    188163static always_inline int ctz64 (uint64_t val)
    189 #else
    190 DECLALWAYSINLINE(int) ctz64 (uint64_t val)
    191 #endif
    192164{
    193165#if QEMU_GNUC_PREREQ(3, 4)
     
    209181}
    210182
    211 #ifndef VBOX
    212183static always_inline int cto64 (uint64_t val)
    213 #else
    214 DECLALWAYSINLINE(int) cto64 (uint64_t val)
    215 #endif
    216184{
    217185    return ctz64(~val);
    218186}
    219187
    220 #ifndef VBOX
    221188static always_inline int ctpop8 (uint8_t val)
    222 #else
    223 DECLALWAYSINLINE(int) ctpop8 (uint8_t val)
    224 #endif
    225189{
    226190    val = (val & 0x55) + ((val >> 1) & 0x55);
     
    231195}
    232196
    233 #ifndef VBOX
    234197static always_inline int ctpop16 (uint16_t val)
    235 #else
    236 DECLALWAYSINLINE(int) ctpop16 (uint16_t val)
    237 #endif
    238198{
    239199    val = (val & 0x5555) + ((val >> 1) & 0x5555);
     
    245205}
    246206
    247 #ifndef VBOX
    248207static always_inline int ctpop32 (uint32_t val)
    249 #else
    250 DECLALWAYSINLINE(int) ctpop32 (uint32_t val)
    251 #endif
    252208{
    253209#if QEMU_GNUC_PREREQ(3, 4)
     
    264220}
    265221
    266 #ifndef VBOX
    267222static always_inline int ctpop64 (uint64_t val)
    268 #else
    269 DECLALWAYSINLINE(int) ctpop64 (uint64_t val)
    270 #endif
    271223{
    272224#if QEMU_GNUC_PREREQ(3, 4)
  • trunk/src/recompiler/hostregs_helper.h

    r33656 r36125  
    3737#if defined(DECLARE_HOST_REGS)
    3838
    39 #ifndef VBOX
    4039#define DO_REG(REG)                                     \
    4140    register host_reg_t reg_AREG##REG asm(AREG##REG);   \
    4241    volatile host_reg_t saved_AREG##REG;
    43 #else
    44 #define DO_REG(REG)                                                \
    45     REGISTER_BOUND_GLOBAL(host_reg_t, reg_AREG##REG, AREG##REG);   \
    46     volatile host_reg_t saved_AREG##REG;
    47 #endif
    4842
    4943#elif defined(SAVE_HOST_REGS)
    5044
    51 #ifndef VBOX
    5245#define DO_REG(REG)                                     \
    5346    __asm__ __volatile__ ("" : "=r" (reg_AREG##REG));   \
    5447    saved_AREG##REG = reg_AREG##REG;
    55 #else /* VBOX */
    56 #define DO_REG(REG)                                     \
    57     SAVE_GLOBAL_REGISTER(REG, reg_AREG##REG);           \
    58     saved_AREG##REG = reg_AREG##REG;
    59 #endif /* VBOX */
    6048
    6149#else
    6250
    63 #ifndef VBOX
    6451#define DO_REG(REG)                                     \
    6552    reg_AREG##REG = saved_AREG##REG;                    \
    6653    __asm__ __volatile__ ("" : : "r" (reg_AREG##REG));
    67 #else /* VBOX */
    68 #define DO_REG(REG)                                     \
    69     reg_AREG##REG = saved_AREG##REG;                    \
    70     RESTORE_GLOBAL_REGISTER(REG, reg_AREG##REG);
    71 #endif
    7254
    7355#endif
  • trunk/src/recompiler/osdep.h

    r28356 r36125  
    1515#define VBOX_ONLY(x) x
    1616
    17 #ifndef _MSC_VER
    1817#define qemu_snprintf(pszBuf, cbBuf, ...) RTStrPrintf((pszBuf), (cbBuf), __VA_ARGS__)
    19 #else
    20 #define qemu_snprintf RTStrPrintf
    21 #endif
    2218#define qemu_vsnprintf(pszBuf, cbBuf, pszFormat, args) \
    2319                                RTStrPrintfV((pszBuf), (cbBuf), (pszFormat), (args))
     
    130126
    131127#ifdef __i386__
    132 #ifdef _MSC_VER
    133 /** @todo: maybe wrong, or slow */
    134 #define REGPARM
    135 #else
    136128#define REGPARM __attribute((regparm(3)))
    137 #endif
    138129#else
    139130#define REGPARM
     
    169160
    170161#ifdef VBOX
    171 #ifdef _MSC_VER
    172 #define ALIGNED_MEMBER(type, name, bytes) type name
    173 #define ALIGNED_MEMBER_DEF(type, name) type name
    174 #define PACKED_STRUCT(name) struct name
    175 #define REGISTER_BOUND_GLOBAL(type, var, reg) type var
    176 #define SAVE_GLOBAL_REGISTER(reg, var)
    177 #define RESTORE_GLOBAL_REGISTER(reg, var)
    178 #define DECLALWAYSINLINE(type) DECLINLINE(type)
     162/** @todo why don't we go with dyngen-exec.h here? */
    179163#define FORCE_RET() ;
    180 #else /* ! _MSC_VER */
    181 #define ALIGNED_MEMBER(type, name, bytes) type name __attribute__((aligned(bytes)))
    182 #define ALIGNED_MEMBER_DEF(type, name) type name __attribute__((aligned()))
    183 #define PACKED_STRUCT(name) struct __attribute__ ((__packed__)) name
    184 #define REGISTER_BOUND_GLOBAL(type, var, reg) register type var asm(reg)
    185 #define SAVE_GLOBAL_REGISTER(reg, var)     __asm__ __volatile__ ("" : "=r" (var))
    186 #define RESTORE_GLOBAL_REGISTER(reg, var) __asm__ __volatile__ ("" : : "r" (var))
    187 #define DECLALWAYSINLINE(type) static always_inline type
    188 #define FORCE_RET() ;
    189 #endif /* !_MSC_VER */
    190164#endif /* VBOX */
    191165
  • trunk/src/recompiler/qemu-common.h

    r31179 r36125  
    66
    77# include <string.h>
    8 # if !defined(_MSC_VER)
    9 #  include <inttypes.h>
    10 # endif
     8# include <inttypes.h>
    119
    1210void pstrcpy(char *buf, int buf_size, const char *str);
    1311char *pstrcat(char *buf, int buf_size, const char *s);
    1412# define snprintf RTStrPrintf
    15 
    16 # ifdef _MSC_VER
    17 #  define PRId32 "d"
    18 #  define PRIx32 "x"
    19 #  define PRIu32 "u"
    20 #  define PRIo32 "o"
    21 #  ifdef DEBUG_TMP_LOGGING
    22 #   define PRId64 "I64d"
    23 #   define PRIx64 "I64x"
    24 #   define PRIu64 "I64u"
    25 #   define PRIo64 "I64o"
    26 #  else
    27 #   define PRId64 "RI64"
    28 #   define PRIx64 "RX64"
    29 #   define PRIu64 "RU64"
    30 #  endif
    31 # endif /* _MSC_VER */
    3213
    3314#else /* !VBOX */
  • trunk/src/recompiler/qemu-lock.h

    r33656 r36125  
    6161#define SPIN_LOCK_UNLOCKED 0
    6262
    63 #ifndef VBOX
    6463static inline void resetlock (spinlock_t *p)
    65 #else
    66 DECLINLINE(void) resetlock (spinlock_t *p)
    67 #endif
    6864{
    6965    *p = SPIN_LOCK_UNLOCKED;
     
    7571DECLINLINE(int) testandset (int *p)
    7672{
    77 
    7873    return ASMAtomicCmpXchgU32((volatile uint32_t *)p, 1, 0) ? 0 : 1;
    7974}
     
    252247}
    253248#else
    254 #ifndef VBOX
    255249static inline void spin_lock(spinlock_t *lock)
    256 #else
    257 DECLINLINE(void) spin_lock(spinlock_t *lock)
    258 #endif
    259 {
    260 }
    261 
    262 #ifndef VBOX
     250{
     251}
     252
    263253static inline void spin_unlock(spinlock_t *lock)
    264 #else
    265 DECLINLINE(void) spin_unlock(spinlock_t *lock)
    266 #endif
    267 {
    268 }
    269 
    270 #ifndef VBOX
     254{
     255}
     256
    271257static inline int spin_trylock(spinlock_t *lock)
    272 #else
    273 DECLINLINE(int) spin_trylock(spinlock_t *lock)
    274 #endif
    275258{
    276259    return 1;
  • trunk/src/recompiler/softmmu_defs.h

    r17040 r36125  
    2020uint64_t REGPARM __ldq_cmmu(target_ulong addr, int mmu_idx);
    2121void REGPARM __stq_cmmu(target_ulong addr, uint64_t val, int mmu_idx);
    22 #else
     22#else /* VBOX */
    2323RTCCUINTREG REGPARM __ldb_mmu(target_ulong addr, int mmu_idx);
    2424void REGPARM __stb_mmu(target_ulong addr, uint8_t val, int mmu_idx);
     
    3939void REGPARM __stq_cmmu(target_ulong addr, uint64_t val, int mmu_idx);
    4040
    41 #ifdef REM_PHYS_ADDR_IN_TLB
     41# ifdef REM_PHYS_ADDR_IN_TLB
    4242RTCCUINTREG REGPARM __ldb_vbox_phys(RTCCUINTREG addr);
    4343RTCCUINTREG REGPARM __ldub_vbox_phys(RTCCUINTREG addr);
     
    5151uint64_t REGPARM __ldq_vbox_phys(RTCCUINTREG addr);
    5252void REGPARM __stq_vbox_phys(RTCCUINTREG addr, uint64_t val);
    53 #endif
     53# endif
     54
     55#endif /* VBOX */
    5456
    5557#endif
    56 
    57 #endif
  • trunk/src/recompiler/softmmu_header.h

    r33656 r36125  
    226226/* generic load/store macros */
    227227
    228 #ifndef VBOX
    229228static inline RES_TYPE glue(glue(ld, USUFFIX), MEMSUFFIX)(target_ulong ptr)
    230 #else
    231 DECLINLINE(RES_TYPE) glue(glue(ld, USUFFIX), MEMSUFFIX)(target_ulong ptr)
    232 #endif
    233229{
    234230
     
    253249
    254250#if DATA_SIZE <= 2
    255 #ifndef VBOX
    256251static inline int glue(glue(lds, SUFFIX), MEMSUFFIX)(target_ulong ptr)
    257 #else
    258 DECLINLINE(int) glue(glue(lds, SUFFIX), MEMSUFFIX)(target_ulong ptr)
    259 #endif
    260252{
    261253    int res, page_index;
     
    281273
    282274/* generic store macro */
    283 #ifndef VBOX
    284275static inline void glue(glue(st, SUFFIX), MEMSUFFIX)(target_ulong ptr, RES_TYPE v)
    285 #else
    286 DECLINLINE(void) glue(glue(st, SUFFIX), MEMSUFFIX)(target_ulong ptr, RES_TYPE v)
    287 #endif
    288276{
    289277    int page_index;
     
    311299
    312300#if DATA_SIZE == 8
    313 #ifndef VBOX
    314301static inline float64 glue(ldfq, MEMSUFFIX)(target_ulong ptr)
    315 #else
    316 DECLINLINE(float64) glue(ldfq, MEMSUFFIX)(target_ulong ptr)
    317 #endif
    318302{
    319303    union {
     
    325309}
    326310
    327 #ifndef VBOX
    328311static inline void glue(stfq, MEMSUFFIX)(target_ulong ptr, float64 v)
    329 #else
    330 DECLINLINE(void) glue(stfq, MEMSUFFIX)(target_ulong ptr, float64 v)
    331 #endif
    332312{
    333313    union {
     
    341321
    342322#if DATA_SIZE == 4
    343 #ifndef VBOX
    344323static inline float32 glue(ldfl, MEMSUFFIX)(target_ulong ptr)
    345 #else
    346 DECLINLINE(float32) glue(ldfl, MEMSUFFIX)(target_ulong ptr)
    347 #endif
    348324{
    349325    union {
     
    355331}
    356332
    357 #ifndef VBOX
    358333static inline void glue(stfl, MEMSUFFIX)(target_ulong ptr, float32 v)
    359 #else
    360 DECLINLINE(void) glue(stfl, MEMSUFFIX)(target_ulong ptr, float32 v)
    361 #endif
    362334{
    363335    union {
  • trunk/src/recompiler/softmmu_template.h

    r33656 r36125  
    7171                                                        int mmu_idx,
    7272                                                        void *retaddr);
    73 #ifndef VBOX
    7473static inline DATA_TYPE glue(io_read, SUFFIX)(target_phys_addr_t physaddr,
    7574                                              target_ulong addr,
    7675                                              void *retaddr)
    77 #else
    78 DECLINLINE(DATA_TYPE) glue(io_read, SUFFIX)(target_phys_addr_t physaddr,
    79                                             target_ulong addr,
    80                                             void *retaddr)
    81 #endif
    8276{
    8377    DATA_TYPE res;
     
    230224                                                   void *retaddr);
    231225
    232 #ifndef VBOX
    233226static inline void glue(io_write, SUFFIX)(target_phys_addr_t physaddr,
    234227                                          DATA_TYPE val,
    235228                                          target_ulong addr,
    236229                                          void *retaddr)
    237 #else
    238 DECLINLINE(void) glue(io_write, SUFFIX)(target_phys_addr_t physaddr,
    239                                         DATA_TYPE val,
    240                                         target_ulong addr,
    241                                         void *retaddr)
    242 #endif
    243230{
    244231    int index;
  • trunk/src/recompiler/target-i386/cpu.h

    r35346 r36125  
    571571    union {
    572572#ifdef USE_X86LDOUBLE
    573 #ifndef VBOX
    574573        CPU86_LDouble d __attribute__((aligned(16)));
    575 #else
    576         ALIGNED_MEMBER(CPU86_LDouble, d, 16);
    577 #endif
    578574#else
    579575        CPU86_LDouble d;
     
    738734    union {
    739735#ifdef USE_X86LDOUBLE
    740 #ifndef VBOX
    741736        CPU86_LDouble d __attribute__((aligned(16)));
    742 #else
    743         ALIGNED_MEMBER(CPU86_LDouble, d, 16);
    744 #endif
    745737#else
    746738        CPU86_LDouble d;
     
    818810/* this function must always be used to load data in the segment
    819811   cache: it synchronizes the hflags with the segment cache values */
    820 #ifndef VBOX
    821812static inline void cpu_x86_load_seg_cache(CPUX86State *env,
    822813                                          int seg_reg, unsigned int selector,
     
    824815                                          unsigned int limit,
    825816                                          unsigned int flags)
    826 #else
    827 DECLINLINE(void)  cpu_x86_load_seg_cache(CPUX86State *env,
    828                                           int seg_reg, unsigned int selector,
    829                                           target_ulong base,
    830                                           unsigned int limit,
    831                                           unsigned int flags)
    832 
    833 #endif
    834817{
    835818    SegmentCache *sc;
     
    888871
    889872/* wrapper, just in case memory mappings must be changed */
    890 #ifndef VBOX
    891873static inline void cpu_x86_set_cpl(CPUX86State *s, int cpl)
    892 #else
    893 DECLINLINE(void) cpu_x86_set_cpl(CPUX86State *s, int cpl)
    894 #endif
    895874{
    896875#if HF_CPL_MASK == 3
     
    982961#define MMU_MODE1_SUFFIX _user
    983962#define MMU_USER_IDX 1
    984 #ifndef VBOX
    985963static inline int cpu_mmu_index (CPUState *env)
    986 #else
    987 DECLINLINE(int) cpu_mmu_index (CPUState *env)
    988 #endif
    989964{
    990965    return (env->hflags & HF_CPL_MASK) == 3 ? 1 : 0;
  • trunk/src/recompiler/target-i386/exec.h

    r33656 r36125  
    4040#include "cpu-defs.h"
    4141
    42 #ifndef VBOX
    4342/* at least 4 register variables are defined */
    4443register struct CPUX86State *env asm(AREG0);
    45 #else
    46 REGISTER_BOUND_GLOBAL(struct CPUX86State*, env, AREG0);
    47 #endif /* VBOX */
    4844
    4945#include "qemu-log.h"
     
    116112
    117113/* n must be a constant to be efficient */
    118 #ifndef VBOX
    119114static inline target_long lshift(target_long x, int n)
    120 #else
    121 DECLINLINE(target_long) lshift(target_long x, int n)
    122 #endif
    123115{
    124116    if (n >= 0)
     
    130122#include "helper.h"
    131123
    132 #ifndef VBOX
    133124static inline void svm_check_intercept(uint32_t type)
    134 #else
    135 DECLINLINE(void) svm_check_intercept(uint32_t type)
    136 #endif
    137125{
    138126    helper_svm_check_intercept_param(type, 0);
     
    150138#include "softmmu_exec.h"
    151139
    152 #ifndef VBOX
    153140static inline double ldfq(target_ulong ptr)
    154 #else
    155 DECLINLINE(double) ldfq(target_ulong ptr)
    156 #endif
    157141{
    158142    union {
     
    164148}
    165149
    166 #ifndef VBOX
    167150static inline void stfq(target_ulong ptr, double v)
    168 #else
    169 DECLINLINE(void) stfq(target_ulong ptr, double v)
    170 #endif
    171151{
    172152    union {
     
    178158}
    179159
    180 #ifndef VBOX
    181160static inline float ldfl(target_ulong ptr)
    182 #else
    183 DECLINLINE(float) ldfl(target_ulong ptr)
    184 #endif
    185161{
    186162    union {
     
    192168}
    193169
    194 #ifndef VBOX
    195170static inline void stfl(target_ulong ptr, float v)
    196 #else
    197 DECLINLINE(void) stfl(target_ulong ptr, float v)
    198 #endif
    199171{
    200172    union {
     
    268240
    269241#ifdef VBOX
    270 #ifndef _MSC_VER
    271242extern CPU86_LDouble sin(CPU86_LDouble x);
    272243extern CPU86_LDouble cos(CPU86_LDouble x);
     
    278249extern CPU86_LDouble floor(CPU86_LDouble x);
    279250extern CPU86_LDouble ceil(CPU86_LDouble x);
    280 #endif /* !_MSC_VER */
    281251#endif /* VBOX */
    282252
     
    350320#endif
    351321
    352 #ifndef VBOX
    353322static inline void fpush(void)
    354 #else
    355 DECLINLINE(void) fpush(void)
    356 #endif
    357323{
    358324    env->fpstt = (env->fpstt - 1) & 7;
     
    360326}
    361327
    362 #ifndef VBOX
    363328static inline void fpop(void)
    364 #else
    365 DECLINLINE(void) fpop(void)
    366 #endif
    367329{
    368330    env->fptags[env->fpstt] = 1; /* invalidate stack entry */
     
    425387/* we use memory access macros */
    426388
    427 #ifndef VBOX
    428389static inline CPU86_LDouble helper_fldt(target_ulong ptr)
    429 #else
    430 DECLINLINE(CPU86_LDouble) helper_fldt(target_ulong ptr)
    431 #endif
    432390{
    433391    CPU86_LDoubleU temp;
     
    438396}
    439397
    440 #ifndef VBOX
    441398static inline void helper_fstt(CPU86_LDouble f, target_ulong ptr)
    442 #else
    443 DECLINLINE(void) helper_fstt(CPU86_LDouble f, target_ulong ptr)
    444 #endif
    445399{
    446400    CPU86_LDoubleU temp;
     
    477431extern const uint8_t rclb_table[32];
    478432
    479 #ifndef VBOX
    480433static inline uint32_t compute_eflags(void)
    481 #else
    482 DECLINLINE(uint32_t) compute_eflags(void)
    483 #endif
    484434{
    485435    return env->eflags | cc_table[CC_OP].compute_all() | (DF & DF_MASK);
     
    487437
    488438/* NOTE: CC_OP must be modified manually to CC_OP_EFLAGS */
    489 #ifndef VBOX
    490439static inline void load_eflags(int eflags, int update_mask)
    491 #else
    492 DECLINLINE(void) load_eflags(int eflags, int update_mask)
    493 #endif
    494440{
    495441    CC_SRC = eflags & (CC_O | CC_S | CC_Z | CC_A | CC_P | CC_C);
     
    499445}
    500446
    501 #ifndef VBOX
    502447static inline void env_to_regs(void)
    503 #else
    504 DECLINLINE(void) env_to_regs(void)
    505 #endif
    506448{
    507449#ifdef reg_EAX
     
    531473}
    532474
    533 #ifndef VBOX
    534475static inline void regs_to_env(void)
    535 #else
    536 DECLINLINE(void) regs_to_env(void)
    537 #endif
    538476{
    539477#ifdef reg_EAX
     
    563501}
    564502
    565 #ifndef VBOX
    566503static inline int cpu_halted(CPUState *env) {
    567 #else
    568 DECLINLINE(int) cpu_halted(CPUState *env) {
    569 #endif
    570504    /* handle exit of HALTED state */
    571505    if (!env->halted)
     
    583517/* load efer and update the corresponding hflags. XXX: do consistency
    584518   checks with cpuid bits ? */
    585 #ifndef VBOX
    586519static inline void cpu_load_efer(CPUState *env, uint64_t val)
    587 #else
    588 DECLINLINE(void) cpu_load_efer(CPUState *env, uint64_t val)
    589 #endif
    590520{
    591521    env->efer = val;
  • trunk/src/recompiler/target-i386/op_helper.c

    r36064 r36125  
    193193
    194194/* return non zero if error */
    195 #ifndef VBOX
    196195static inline int load_segment(uint32_t *e1_ptr, uint32_t *e2_ptr,
    197 #else /* VBOX */
    198 DECLINLINE(int) load_segment(uint32_t *e1_ptr, uint32_t *e2_ptr,
    199 #endif /* VBOX */
    200196                               int selector)
    201197{
     
    226222}
    227223
    228 #ifndef VBOX
    229224static inline unsigned int get_seg_limit(uint32_t e1, uint32_t e2)
    230 #else /* VBOX */
    231 DECLINLINE(unsigned int) get_seg_limit(uint32_t e1, uint32_t e2)
    232 #endif /* VBOX */
    233225{
    234226    unsigned int limit;
     
    239231}
    240232
    241 #ifndef VBOX
    242233static inline uint32_t get_seg_base(uint32_t e1, uint32_t e2)
    243 #else /* VBOX */
    244 DECLINLINE(uint32_t) get_seg_base(uint32_t e1, uint32_t e2)
    245 #endif /* VBOX */
    246234{
    247235    return ((e1 >> 16) | ((e2 & 0xff) << 16) | (e2 & 0xff000000));
    248236}
    249237
    250 #ifndef VBOX
    251238static inline void load_seg_cache_raw_dt(SegmentCache *sc, uint32_t e1, uint32_t e2)
    252 #else /* VBOX */
    253 DECLINLINE(void) load_seg_cache_raw_dt(SegmentCache *sc, uint32_t e1, uint32_t e2)
    254 #endif /* VBOX */
    255239{
    256240    sc->base = get_seg_base(e1, e2);
     
    260244
    261245/* init the segment cache in vm86 mode. */
    262 #ifndef VBOX
    263246static inline void load_seg_vm(int seg, int selector)
    264 #else /* VBOX */
    265 DECLINLINE(void) load_seg_vm(int seg, int selector)
    266 #endif /* VBOX */
    267247{
    268248    selector &= 0xffff;
     
    280260}
    281261
    282 #ifndef VBOX
    283262static inline void get_ss_esp_from_tss(uint32_t *ss_ptr,
    284 #else /* VBOX */
    285 DECLINLINE(void) get_ss_esp_from_tss(uint32_t *ss_ptr,
    286 #endif /* VBOX */
    287263                                       uint32_t *esp_ptr, int dpl)
    288264{
     
    653629
    654630/* check if Port I/O is allowed in TSS */
     631static inline void check_io(int addr, int size)
     632{
    655633#ifndef VBOX
    656 static inline void check_io(int addr, int size)
    657 {
    658634    int io_offset, val, mask;
    659 
    660 #else /* VBOX */
    661 DECLINLINE(void) check_io(int addr, int size)
    662 {
     635#else
    663636    int val, mask;
    664637    unsigned int io_offset;
     
    752725}
    753726
    754 #ifndef VBOX
    755727static inline unsigned int get_sp_mask(unsigned int e2)
    756 #else /* VBOX */
    757 DECLINLINE(unsigned int) get_sp_mask(unsigned int e2)
    758 #endif /* VBOX */
    759728{
    760729    if (e2 & DESC_B_MASK)
     
    10371006#endif
    10381007}
     1008
    10391009#ifdef VBOX
    10401010
     
    11341104        env->eflags &= ~IF_MASK;
    11351105}
     1106
    11361107#endif /* VBOX */
    11371108
     
    11501121}
    11511122
    1152 #ifndef VBOX
    11531123static inline target_ulong get_rsp_from_tss(int level)
    1154 #else /* VBOX */
    1155 DECLINLINE(target_ulong) get_rsp_from_tss(int level)
    1156 #endif /* VBOX */
    11571124{
    11581125    int index;
     
    31753142}
    31763143
    3177 #ifndef VBOX
    31783144static inline void validate_seg(int seg_reg, int cpl)
    3179 #else /* VBOX */
    3180 DECLINLINE(void) validate_seg(int seg_reg, int cpl)
    3181 #endif /* VBOX */
    31823145{
    31833146    int dpl;
     
    32023165
    32033166/* protected mode iret */
    3204 #ifndef VBOX
    32053167static inline void helper_ret_protected(int shift, int is_iret, int addend)
    3206 #else /* VBOX */
    3207 DECLINLINE(void) helper_ret_protected(int shift, int is_iret, int addend)
    3208 #endif /* VBOX */
    32093168{
    32103169    uint32_t new_cs, new_eflags, new_ss;
     
    40764035}
    40774036
    4078 #ifndef VBOX
    40794037static inline CPU86_LDouble helper_fdiv(CPU86_LDouble a, CPU86_LDouble b)
    4080 #else /* VBOX */
    4081 DECLINLINE(CPU86_LDouble) helper_fdiv(CPU86_LDouble a, CPU86_LDouble b)
    4082 #endif /* VBOX */
    40834038{
    40844039    if (b == 0.0)
     
    46904645    ST0 = temp.d;
    46914646}
    4692 
    4693 #ifdef VBOX
    4694 #ifdef _MSC_VER
    4695 /* MSC cannot divide by zero */
    4696 extern double _Nan;
    4697 #define NaN _Nan
    4698 #else
    4699 #define NaN  (0.0 / 0.0)
    4700 #endif
    4701 #endif /* VBOX */
    47024647
    47034648void helper_fprem1(void)
     
    59425887// Needs to be at the bottom of the file (overriding macros)
    59435888
    5944 #ifndef VBOX
    59455889static inline CPU86_LDouble helper_fldt_raw(uint8_t *ptr)
    5946 #else /* VBOX */
    5947 DECLINLINE(CPU86_LDouble) helper_fldt_raw(uint8_t *ptr)
    5948 #endif /* VBOX */
    59495890{
    59505891    return *(CPU86_LDouble *)ptr;
    59515892}
    59525893
    5953 #ifndef VBOX
    59545894static inline void helper_fstt_raw(CPU86_LDouble f, uint8_t *ptr)
    5955 #else /* VBOX */
    5956 DECLINLINE(void) helper_fstt_raw(CPU86_LDouble f, uint8_t *ptr)
    5957 #endif /* VBOX */
    59585895{
    59595896    *(CPU86_LDouble *)ptr = f;
     
    61596096#else
    61606097
    6161 #ifndef VBOX
    61626098static inline void svm_save_seg(target_phys_addr_t addr,
    6163 #else /* VBOX */
    6164 DECLINLINE(void) svm_save_seg(target_phys_addr_t addr,
    6165 #endif /* VBOX */
    61666099                                const SegmentCache *sc)
    61676100{
     
    61766109}
    61776110
    6178 #ifndef VBOX
    61796111static inline void svm_load_seg(target_phys_addr_t addr, SegmentCache *sc)
    6180 #else /* VBOX */
    6181 DECLINLINE(void) svm_load_seg(target_phys_addr_t addr, SegmentCache *sc)
    6182 #endif /* VBOX */
    61836112{
    61846113    unsigned int flags;
     
    61916120}
    61926121
    6193 #ifndef VBOX
    61946122static inline void svm_load_seg_cache(target_phys_addr_t addr,
    6195 #else /* VBOX */
    6196 DECLINLINE(void) svm_load_seg_cache(target_phys_addr_t addr,
    6197 #endif /* VBOX */
    61986123                                      CPUState *env, int seg_reg)
    61996124{
  • trunk/src/recompiler/target-i386/ops_sse.h

    r33656 r36125  
    304304
    305305#if SHIFT == 0
    306 #ifndef VBOX
    307306static inline int satub(int x)
    308 #else /* VBOX */
    309 DECLINLINE(int) satub(int x)
    310 #endif /* VBOX */
    311307{
    312308    if (x < 0)
     
    318314}
    319315
    320 #ifndef VBOX
    321316static inline int satuw(int x)
    322 #else /* VBOX */
    323 DECLINLINE(int) satuw(int x)
    324 #endif /* VBOX */
    325317{
    326318    if (x < 0)
     
    332324}
    333325
    334 #ifndef VBOX
    335326static inline int satsb(int x)
    336 #else /* VBOX */
    337 DECLINLINE(int) satsb(int x)
    338 #endif /* VBOX */
    339327{
    340328    if (x < -128)
     
    346334}
    347335
    348 #ifndef VBOX
    349336static inline int satsw(int x)
    350 #else /* VBOX */
    351 DECLINLINE(int) satsw(int x)
    352 #endif /* VBOX */
    353337{
    354338    if (x < -32768)
     
    462446
    463447#if SHIFT == 0
    464 #ifndef VBOX
    465448static inline int abs1(int a)
    466 #else /* VBOX */
    467 DECLINLINE(int) abs1(int a)
    468 #endif /* VBOX */
    469449{
    470450    if (a < 0)
     
    18171797SSE_HELPER_Q(helper_pcmpgtq, FCMPGTQ)
    18181798
    1819 #ifndef VBOX
    18201799static inline int pcmp_elen(int reg, uint32_t ctrl)
    1821 #else /* VBOX */
    1822 DECLINLINE(int) pcmp_elen(int reg, uint32_t ctrl)
    1823 #endif /* VBOX */
    18241800{
    18251801    int val;
     
    18411817}
    18421818
    1843 #ifndef VBOX
    18441819static inline int pcmp_ilen(Reg *r, uint8_t ctrl)
    1845 #else /* VBOX */
    1846 DECLINLINE(int) pcmp_ilen(Reg *r, uint8_t ctrl)
    1847 #endif /* VBOX */
    18481820{
    18491821    int val = 0;
     
    18591831}
    18601832
    1861 #ifndef VBOX
    18621833static inline int pcmp_val(Reg *r, uint8_t ctrl, int i)
    1863 #else /* VBOX */
    1864 DECLINLINE(int) pcmp_val(Reg *r, uint8_t ctrl, int i)
    1865 #endif /* VBOX */
    18661834{
    18671835    switch ((ctrl >> 0) & 3) {
     
    18781846}
    18791847
    1880 #ifndef VBOX
    18811848static inline unsigned pcmpxstrx(Reg *d, Reg *s,
    1882 #else /* VBOX */
    1883 DECLINLINE(unsigned) pcmpxstrx(Reg *d, Reg *s,
    1884 #endif /* VBOX */
    18851849                int8_t ctrl, int valids, int validd)
    18861850{
     
    19491913}
    19501914
    1951 #ifndef VBOX
    19521915static inline int rffs1(unsigned int val)
    1953 #else /* VBOX */
    1954 DECLINLINE(int) rffs1(unsigned int val)
    1955 #endif /* VBOX */
    19561916{
    19571917    int ret = 1, hi;
     
    19661926}
    19671927
    1968 #ifndef VBOX
    19691928static inline int ffs1(unsigned int val)
    1970 #else /* VBOX */
    1971 DECLINLINE(int) ffs1(unsigned int val)
    1972 #endif /* VBOX */
    19731929{
    19741930    int ret = 1, hi;
  • trunk/src/recompiler/target-i386/svm.h

    r17040 r36125  
    131131#define SVM_CR0_SELECTIVE_MASK (1 << 3 | 1) /* TS and MP */
    132132
    133 #ifndef VBOX
    134133struct __attribute__ ((__packed__)) vmcb_control_area {
    135 #else
    136 PACKED_STRUCT(vmcb_control_area) {
    137 #endif /* VBOX */
    138134        uint16_t intercept_cr_read;
    139135        uint16_t intercept_cr_write;
     
    167163};
    168164
    169 #ifndef VBOX
    170165struct __attribute__ ((__packed__)) vmcb_seg {
    171 #else
    172 PACKED_STRUCT(vmcb_seg) {
    173 #endif
    174166        uint16_t selector;
    175167        uint16_t attrib;
     
    178170};
    179171
    180 #ifndef VBOX
    181172struct __attribute__ ((__packed__)) vmcb_save_area {
    182 #else
    183 PACKED_STRUCT(vmcb_save_area) {
    184 #endif
    185173        struct vmcb_seg es;
    186174        struct vmcb_seg cs;
     
    227215};
    228216
    229 #ifndef VBOX
    230217struct __attribute__ ((__packed__)) vmcb {
    231 #else
    232 PACKED_STRUCT(vmcb) {
    233 #endif
    234218        struct vmcb_control_area control;
    235219        struct vmcb_save_area save;
  • trunk/src/recompiler/target-i386/translate.c

    r36056 r36125  
    232232};
    233233
    234 #ifndef VBOX
    235234static inline void gen_op_movl_T0_0(void)
    236 #else /* VBOX */
    237 DECLINLINE(void) gen_op_movl_T0_0(void)
    238 #endif /* VBOX */
    239235{
    240236    tcg_gen_movi_tl(cpu_T[0], 0);
    241237}
    242238
    243 #ifndef VBOX
    244239static inline void gen_op_movl_T0_im(int32_t val)
    245 #else /* VBOX */
    246 DECLINLINE(void) gen_op_movl_T0_im(int32_t val)
    247 #endif /* VBOX */
    248240{
    249241    tcg_gen_movi_tl(cpu_T[0], val);
    250242}
    251243
    252 #ifndef VBOX
    253244static inline void gen_op_movl_T0_imu(uint32_t val)
    254 #else /* VBOX */
    255 DECLINLINE(void) gen_op_movl_T0_imu(uint32_t val)
    256 #endif /* VBOX */
    257245{
    258246    tcg_gen_movi_tl(cpu_T[0], val);
    259247}
    260248
    261 #ifndef VBOX
    262249static inline void gen_op_movl_T1_im(int32_t val)
    263 #else /* VBOX */
    264 DECLINLINE(void) gen_op_movl_T1_im(int32_t val)
    265 #endif /* VBOX */
    266250{
    267251    tcg_gen_movi_tl(cpu_T[1], val);
    268252}
    269253
    270 #ifndef VBOX
    271254static inline void gen_op_movl_T1_imu(uint32_t val)
    272 #else /* VBOX */
    273 DECLINLINE(void) gen_op_movl_T1_imu(uint32_t val)
    274 #endif /* VBOX */
    275255{
    276256    tcg_gen_movi_tl(cpu_T[1], val);
    277257}
    278258
    279 #ifndef VBOX
    280259static inline void gen_op_movl_A0_im(uint32_t val)
    281 #else /* VBOX */
    282 DECLINLINE(void) gen_op_movl_A0_im(uint32_t val)
    283 #endif /* VBOX */
    284260{
    285261    tcg_gen_movi_tl(cpu_A0, val);
     
    287263
    288264#ifdef TARGET_X86_64
    289 #ifndef VBOX
    290265static inline void gen_op_movq_A0_im(int64_t val)
    291 #else /* VBOX */
    292 DECLINLINE(void) gen_op_movq_A0_im(int64_t val)
    293 #endif /* VBOX */
    294266{
    295267    tcg_gen_movi_tl(cpu_A0, val);
     
    297269#endif
    298270
    299 #ifndef VBOX
    300271static inline void gen_movtl_T0_im(target_ulong val)
    301 #else /* VBOX */
    302 DECLINLINE(void) gen_movtl_T0_im(target_ulong val)
    303 #endif /* VBOX */
    304272{
    305273    tcg_gen_movi_tl(cpu_T[0], val);
    306274}
    307275
    308 #ifndef VBOX
    309276static inline void gen_movtl_T1_im(target_ulong val)
    310 #else /* VBOX */
    311 DECLINLINE(void) gen_movtl_T1_im(target_ulong val)
    312 #endif /* VBOX */
    313277{
    314278    tcg_gen_movi_tl(cpu_T[1], val);
    315279}
    316280
    317 #ifndef VBOX
    318281static inline void gen_op_andl_T0_ffff(void)
    319 #else /* VBOX */
    320 DECLINLINE(void) gen_op_andl_T0_ffff(void)
    321 #endif /* VBOX */
    322282{
    323283    tcg_gen_andi_tl(cpu_T[0], cpu_T[0], 0xffff);
    324284}
    325285
    326 #ifndef VBOX
    327286static inline void gen_op_andl_T0_im(uint32_t val)
    328 #else /* VBOX */
    329 DECLINLINE(void) gen_op_andl_T0_im(uint32_t val)
    330 #endif /* VBOX */
    331287{
    332288    tcg_gen_andi_tl(cpu_T[0], cpu_T[0], val);
    333289}
    334290
    335 #ifndef VBOX
    336291static inline void gen_op_movl_T0_T1(void)
    337 #else /* VBOX */
    338 DECLINLINE(void) gen_op_movl_T0_T1(void)
    339 #endif /* VBOX */
    340292{
    341293    tcg_gen_mov_tl(cpu_T[0], cpu_T[1]);
    342294}
    343295
    344 #ifndef VBOX
    345296static inline void gen_op_andl_A0_ffff(void)
    346 #else /* VBOX */
    347 DECLINLINE(void) gen_op_andl_A0_ffff(void)
    348 #endif /* VBOX */
    349297{
    350298    tcg_gen_andi_tl(cpu_A0, cpu_A0, 0xffff);
     
    375323#endif
    376324
    377 #ifndef VBOX
    378325static inline void gen_op_mov_reg_v(int ot, int reg, TCGv t0)
    379 #else /* VBOX */
    380 DECLINLINE(void) gen_op_mov_reg_v(int ot, int reg, TCGv t0)
    381 #endif /* VBOX */
    382326{
    383327    switch(ot) {
     
    412356}
    413357
    414 #ifndef VBOX
    415358static inline void gen_op_mov_reg_T0(int ot, int reg)
    416 #else /* VBOX */
    417 DECLINLINE(void) gen_op_mov_reg_T0(int ot, int reg)
    418 #endif /* VBOX */
    419359{
    420360    gen_op_mov_reg_v(ot, reg, cpu_T[0]);
    421361}
    422362
    423 #ifndef VBOX
    424363static inline void gen_op_mov_reg_T1(int ot, int reg)
    425 #else /* VBOX */
    426 DECLINLINE(void) gen_op_mov_reg_T1(int ot, int reg)
    427 #endif /* VBOX */
    428364{
    429365    gen_op_mov_reg_v(ot, reg, cpu_T[1]);
    430366}
    431367
    432 #ifndef VBOX
    433368static inline void gen_op_mov_reg_A0(int size, int reg)
    434 #else /* VBOX */
    435 DECLINLINE(void) gen_op_mov_reg_A0(int size, int reg)
    436 #endif /* VBOX */
    437369{
    438370    switch(size) {
     
    460392}
    461393
    462 #ifndef VBOX
    463394static inline void gen_op_mov_v_reg(int ot, TCGv t0, int reg)
    464 #else /* VBOX */
    465 DECLINLINE(void) gen_op_mov_v_reg(int ot, TCGv t0, int reg)
    466 #endif /* VBOX */
    467395{
    468396    switch(ot) {
     
    487415}
    488416
    489 #ifndef VBOX
    490417static inline void gen_op_mov_TN_reg(int ot, int t_index, int reg)
    491 #else /* VBOX */
    492 DECLINLINE(void) gen_op_mov_TN_reg(int ot, int t_index, int reg)
    493 #endif /* VBOX */
    494418{
    495419    gen_op_mov_v_reg(ot, cpu_T[t_index], reg);
    496420}
    497421
    498 #ifndef VBOX
    499422static inline void gen_op_movl_A0_reg(int reg)
    500 #else /* VBOX */
    501 DECLINLINE(void) gen_op_movl_A0_reg(int reg)
    502 #endif /* VBOX */
    503423{
    504424    tcg_gen_ld32u_tl(cpu_A0, cpu_env, offsetof(CPUState, regs[reg]) + REG_L_OFFSET);
    505425}
    506426
    507 #ifndef VBOX
    508427static inline void gen_op_addl_A0_im(int32_t val)
    509 #else /* VBOX */
    510 DECLINLINE(void) gen_op_addl_A0_im(int32_t val)
    511 #endif /* VBOX */
    512428{
    513429    tcg_gen_addi_tl(cpu_A0, cpu_A0, val);
     
    518434
    519435#ifdef TARGET_X86_64
    520 #ifndef VBOX
    521436static inline void gen_op_addq_A0_im(int64_t val)
    522 #else /* VBOX */
    523 DECLINLINE(void) gen_op_addq_A0_im(int64_t val)
    524 #endif /* VBOX */
    525437{
    526438    tcg_gen_addi_tl(cpu_A0, cpu_A0, val);
     
    538450}
    539451
    540 #ifndef VBOX
    541452static inline void gen_op_addl_T0_T1(void)
    542 #else /* VBOX */
    543 DECLINLINE(void) gen_op_addl_T0_T1(void)
    544 #endif /* VBOX */
    545453{
    546454    tcg_gen_add_tl(cpu_T[0], cpu_T[0], cpu_T[1]);
    547455}
    548456
    549 #ifndef VBOX
    550457static inline void gen_op_jmp_T0(void)
    551 #else /* VBOX */
    552 DECLINLINE(void) gen_op_jmp_T0(void)
    553 #endif /* VBOX */
    554458{
    555459    tcg_gen_st_tl(cpu_T[0], cpu_env, offsetof(CPUState, eip));
    556460}
    557461
    558 #ifndef VBOX
    559462static inline void gen_op_add_reg_im(int size, int reg, int32_t val)
    560 #else /* VBOX */
    561 DECLINLINE(void) gen_op_add_reg_im(int size, int reg, int32_t val)
    562 #endif /* VBOX */
    563463{
    564464    switch(size) {
     
    586486}
    587487
    588 #ifndef VBOX
    589488static inline void gen_op_add_reg_T0(int size, int reg)
    590 #else /* VBOX */
    591 DECLINLINE(void) gen_op_add_reg_T0(int size, int reg)
    592 #endif /* VBOX */
    593489{
    594490    switch(size) {
     
    616512}
    617513
    618 #ifndef VBOX
    619514static inline void gen_op_set_cc_op(int32_t val)
    620 #else /* VBOX */
    621 DECLINLINE(void) gen_op_set_cc_op(int32_t val)
    622 #endif /* VBOX */
    623515{
    624516    tcg_gen_movi_i32(cpu_cc_op, val);
    625517}
    626518
    627 #ifndef VBOX
    628519static inline void gen_op_addl_A0_reg_sN(int shift, int reg)
    629 #else /* VBOX */
    630 DECLINLINE(void) gen_op_addl_A0_reg_sN(int shift, int reg)
    631 #endif /* VBOX */
    632520{
    633521    tcg_gen_ld_tl(cpu_tmp0, cpu_env, offsetof(CPUState, regs[reg]));
     
    639527#endif
    640528}
     529
    641530#ifdef VBOX
    642531DECLINLINE(void) gen_op_seg_check(int reg, bool keepA0)
    643532{
    644533    /* It seems segments doesn't get out of sync - if they do in fact - enable below code. */
    645 #ifdef FORCE_SEGMENT_SYNC
    646 #if 1
     534# ifdef FORCE_SEGMENT_SYNC
     535#  if 1
    647536    TCGv t0;
    648537
     
    652541    tcg_gen_helper_0_1(helper_sync_seg, t0);
    653542    tcg_temp_free(t0);
    654 #else
     543#  else
    655544    /* Our segments could be outdated, thus check for newselector field to see if update really needed */
    656545    int skip_label;
     
    689578        tcg_temp_free(a0);
    690579    }
    691 #endif /* 0 */
    692 #endif /* FORCE_SEGMENT_SYNC */
    693 }
    694 #endif
    695 
    696 #ifndef VBOX
     580#  endif /* 0 */
     581# endif /* FORCE_SEGMENT_SYNC */
     582}
     583#endif /* VBOX */
     584
    697585static inline void gen_op_movl_A0_seg(int reg)
    698 #else /* VBOX */
    699 DECLINLINE(void) gen_op_movl_A0_seg(int reg)
    700 #endif /* VBOX */
    701586{
    702587#ifdef VBOX
     
    706591}
    707592
    708 #ifndef VBOX
    709593static inline void gen_op_addl_A0_seg(int reg)
    710 #else /* VBOX */
    711 DECLINLINE(void) gen_op_addl_A0_seg(int reg)
    712 #endif /* VBOX */
    713594{
    714595#ifdef VBOX
     
    723604
    724605#ifdef TARGET_X86_64
    725 #ifndef VBOX
    726606static inline void gen_op_movq_A0_seg(int reg)
    727 #else /* VBOX */
    728 DECLINLINE(void) gen_op_movq_A0_seg(int reg)
    729 #endif /* VBOX */
    730607{
    731608#ifdef VBOX
     
    735612}
    736613
    737 #ifndef VBOX
    738614static inline void gen_op_addq_A0_seg(int reg)
    739 #else /* VBOX */
    740 DECLINLINE(void) gen_op_addq_A0_seg(int reg)
    741 #endif /* VBOX */
    742615{
    743616#ifdef VBOX
     
    748621}
    749622
    750 #ifndef VBOX
    751623static inline void gen_op_movq_A0_reg(int reg)
    752 #else /* VBOX */
    753 DECLINLINE(void) gen_op_movq_A0_reg(int reg)
    754 #endif /* VBOX */
    755624{
    756625    tcg_gen_ld_tl(cpu_A0, cpu_env, offsetof(CPUState, regs[reg]));
    757626}
    758627
    759 #ifndef VBOX
    760628static inline void gen_op_addq_A0_reg_sN(int shift, int reg)
    761 #else /* VBOX */
    762 DECLINLINE(void) gen_op_addq_A0_reg_sN(int shift, int reg)
    763 #endif /* VBOX */
    764629{
    765630    tcg_gen_ld_tl(cpu_tmp0, cpu_env, offsetof(CPUState, regs[reg]));
     
    770635#endif
    771636
    772 #ifndef VBOX
    773637static inline void gen_op_lds_T0_A0(int idx)
    774 #else /* VBOX */
    775 DECLINLINE(void) gen_op_lds_T0_A0(int idx)
    776 #endif /* VBOX */
    777638{
    778639    int mem_index = (idx >> 2) - 1;
     
    791652}
    792653
    793 #ifndef VBOX
    794654static inline void gen_op_ld_v(int idx, TCGv t0, TCGv a0)
    795 #else /* VBOX */
    796 DECLINLINE(void) gen_op_ld_v(int idx, TCGv t0, TCGv a0)
    797 #endif /* VBOX */
    798655{
    799656    int mem_index = (idx >> 2) - 1;
     
    816673
    817674/* XXX: always use ldu or lds */
    818 #ifndef VBOX
    819675static inline void gen_op_ld_T0_A0(int idx)
    820 #else /* VBOX */
    821 DECLINLINE(void) gen_op_ld_T0_A0(int idx)
    822 #endif /* VBOX */
    823676{
    824677    gen_op_ld_v(idx, cpu_T[0], cpu_A0);
    825678}
    826679
    827 #ifndef VBOX
    828680static inline void gen_op_ldu_T0_A0(int idx)
    829 #else /* VBOX */
    830 DECLINLINE(void) gen_op_ldu_T0_A0(int idx)
    831 #endif /* VBOX */
    832681{
    833682    gen_op_ld_v(idx, cpu_T[0], cpu_A0);
    834683}
    835684
    836 #ifndef VBOX
    837685static inline void gen_op_ld_T1_A0(int idx)
    838 #else /* VBOX */
    839 DECLINLINE(void) gen_op_ld_T1_A0(int idx)
    840 #endif /* VBOX */
    841686{
    842687    gen_op_ld_v(idx, cpu_T[1], cpu_A0);
    843688}
    844689
    845 #ifndef VBOX
    846690static inline void gen_op_st_v(int idx, TCGv t0, TCGv a0)
    847 #else /* VBOX */
    848 DECLINLINE(void) gen_op_st_v(int idx, TCGv t0, TCGv a0)
    849 #endif /* VBOX */
    850691{
    851692    int mem_index = (idx >> 2) - 1;
     
    867708}
    868709
    869 #ifndef VBOX
    870710static inline void gen_op_st_T0_A0(int idx)
    871 #else /* VBOX */
    872 DECLINLINE(void) gen_op_st_T0_A0(int idx)
    873 #endif /* VBOX */
    874711{
    875712    gen_op_st_v(idx, cpu_T[0], cpu_A0);
    876713}
    877714
    878 #ifndef VBOX
    879715static inline void gen_op_st_T1_A0(int idx)
    880 #else /* VBOX */
    881 DECLINLINE(void) gen_op_st_T1_A0(int idx)
    882 #endif /* VBOX */
    883716{
    884717    gen_op_st_v(idx, cpu_T[1], cpu_A0);
     
    926759#endif
    927760
    928 #ifndef VBOX
    929761static inline void gen_jmp_im(target_ulong pc)
    930 #else /* VBOX */
    931 DECLINLINE(void) gen_jmp_im(target_ulong pc)
    932 #endif /* VBOX */
    933762{
    934763    tcg_gen_movi_tl(cpu_tmp0, pc);
     
    940769{
    941770    gen_jmp_im(pc);
    942 #ifdef VBOX_DUMP_STATE
     771# ifdef VBOX_DUMP_STATE
    943772     tcg_gen_helper_0_0(helper_dump_state);
    944 #endif
    945 }
    946 
    947 #endif
    948 
    949 #ifndef VBOX
     773# endif
     774}
     775#endif /* VBOX */
     776
    950777static inline void gen_string_movl_A0_ESI(DisasContext *s)
    951 #else /* VBOX */
    952 DECLINLINE(void) gen_string_movl_A0_ESI(DisasContext *s)
    953 #endif /* VBOX */
    954778{
    955779    int override;
     
    986810}
    987811
    988 #ifndef VBOX
    989812static inline void gen_string_movl_A0_EDI(DisasContext *s)
    990 #else /* VBOX */
    991 DECLINLINE(void) gen_string_movl_A0_EDI(DisasContext *s)
    992 #endif /* VBOX */
    993813{
    994814#ifdef TARGET_X86_64
     
    1011831}
    1012832
    1013 #ifndef VBOX
    1014833static inline void gen_op_movl_T0_Dshift(int ot)
    1015 #else /* VBOX */
    1016 DECLINLINE(void) gen_op_movl_T0_Dshift(int ot)
    1017 #endif /* VBOX */
    1018834{
    1019835    tcg_gen_ld32s_tl(cpu_T[0], cpu_env, offsetof(CPUState, df));
     
    1055871}
    1056872
    1057 #ifndef VBOX
    1058873static inline void gen_op_jnz_ecx(int size, int label1)
    1059 #else /* VBOX */
    1060 DECLINLINE(void) gen_op_jnz_ecx(int size, int label1)
    1061 #endif /* VBOX */
    1062874{
    1063875    tcg_gen_ld_tl(cpu_tmp0, cpu_env, offsetof(CPUState, regs[R_ECX]));
     
    1066878}
    1067879
    1068 #ifndef VBOX
    1069880static inline void gen_op_jz_ecx(int size, int label1)
    1070 #else /* VBOX */
    1071 DECLINLINE(void) gen_op_jz_ecx(int size, int label1)
    1072 #endif /* VBOX */
    1073881{
    1074882    tcg_gen_ld_tl(cpu_tmp0, cpu_env, offsetof(CPUState, regs[R_ECX]));
     
    1128936}
    1129937
    1130 #ifndef VBOX
    1131938static inline void gen_movs(DisasContext *s, int ot)
    1132 #else /* VBOX */
    1133 DECLINLINE(void) gen_movs(DisasContext *s, int ot)
    1134 #endif /* VBOX */
    1135939{
    1136940    gen_string_movl_A0_ESI(s);
     
    1143947}
    1144948
    1145 #ifndef VBOX
    1146949static inline void gen_update_cc_op(DisasContext *s)
    1147 #else /* VBOX */
    1148 DECLINLINE(void) gen_update_cc_op(DisasContext *s)
    1149 #endif /* VBOX */
    1150950{
    1151951    if (s->cc_op != CC_OP_DYNAMIC) {
     
    1167967}
    1168968
    1169 #ifndef VBOX
    1170969static inline void gen_op_cmpl_T0_T1_cc(void)
    1171 #else /* VBOX */
    1172 DECLINLINE(void) gen_op_cmpl_T0_T1_cc(void)
    1173 #endif /* VBOX */
    1174970{
    1175971    tcg_gen_mov_tl(cpu_cc_src, cpu_T[1]);
     
    1177973}
    1178974
    1179 #ifndef VBOX
    1180975static inline void gen_op_testl_T0_T1_cc(void)
    1181 #else /* VBOX */
    1182 DECLINLINE(void) gen_op_testl_T0_T1_cc(void)
    1183 #endif /* VBOX */
    1184976{
    1185977    tcg_gen_discard_tl(cpu_cc_src);
     
    12371029}
    12381030
    1239 #ifndef VBOX
    12401031static inline void gen_setcc_slow_T0(DisasContext *s, int jcc_op)
    1241 #else /* VBOX */
    1242 DECLINLINE(void) gen_setcc_slow_T0(DisasContext *s, int jcc_op)
    1243 #endif /* VBOX */
    12441032{
    12451033    if (s->cc_op != CC_OP_DYNAMIC)
     
    13481136/* generate a conditional jump to label 'l1' according to jump opcode
    13491137   value 'b'. In the fast case, T0 is guaranteed not to be used. */
    1350 #ifndef VBOX
    13511138static inline void gen_jcc1(DisasContext *s, int cc_op, int b, int l1)
    1352 #else /* VBOX */
    1353 DECLINLINE(void) gen_jcc1(DisasContext *s, int cc_op, int b, int l1)
    1354 #endif /* VBOX */
    13551139{
    13561140    int inv, jcc_op, size, cond;
     
    15631347}
    15641348
    1565 #ifndef VBOX
    15661349static inline void gen_stos(DisasContext *s, int ot)
    1567 #else /* VBOX */
    1568 DECLINLINE(void) gen_stos(DisasContext *s, int ot)
    1569 #endif /* VBOX */
    15701350{
    15711351    gen_op_mov_TN_reg(OT_LONG, 0, R_EAX);
     
    15761356}
    15771357
    1578 #ifndef VBOX
    15791358static inline void gen_lods(DisasContext *s, int ot)
    1580 #else /* VBOX */
    1581 DECLINLINE(void) gen_lods(DisasContext *s, int ot)
    1582 #endif /* VBOX */
    15831359{
    15841360    gen_string_movl_A0_ESI(s);
     
    15891365}
    15901366
    1591 #ifndef VBOX
    15921367static inline void gen_scas(DisasContext *s, int ot)
    1593 #else /* VBOX */
    1594 DECLINLINE(void) gen_scas(DisasContext *s, int ot)
    1595 #endif /* VBOX */
    15961368{
    15971369    gen_op_mov_TN_reg(OT_LONG, 0, R_EAX);
     
    16031375}
    16041376
    1605 #ifndef VBOX
    16061377static inline void gen_cmps(DisasContext *s, int ot)
    1607 #else /* VBOX */
    1608 DECLINLINE(void) gen_cmps(DisasContext *s, int ot)
    1609 #endif /* VBOX */
    16101378{
    16111379    gen_string_movl_A0_ESI(s);
     
    16191387}
    16201388
    1621 #ifndef VBOX
    16221389static inline void gen_ins(DisasContext *s, int ot)
    1623 #else /* VBOX */
    1624 DECLINLINE(void) gen_ins(DisasContext *s, int ot)
    1625 #endif /* VBOX */
    16261390{
    16271391    if (use_icount)
     
    16431407}
    16441408
    1645 #ifndef VBOX
    16461409static inline void gen_outs(DisasContext *s, int ot)
    1647 #else /* VBOX */
    1648 DECLINLINE(void) gen_outs(DisasContext *s, int ot)
    1649 #endif /* VBOX */
    16501410{
    16511411    if (use_icount)
     
    16681428/* same method as Valgrind : we generate jumps to current or next
    16691429   instruction */
    1670 #ifndef VBOX
    16711430#define GEN_REPZ(op)                                                          \
    16721431static inline void gen_repz_ ## op(DisasContext *s, int ot,                   \
     
    16841443    gen_jmp(s, cur_eip);                                                      \
    16851444}
    1686 #else /* VBOX */
    1687 #define GEN_REPZ(op)                                                          \
    1688 DECLINLINE(void) gen_repz_ ## op(DisasContext *s, int ot,                     \
    1689                                  target_ulong cur_eip, target_ulong next_eip) \
    1690 {                                                                             \
    1691     int l2;                                                                   \
    1692     gen_update_cc_op(s);                                                      \
    1693     l2 = gen_jz_ecx_string(s, next_eip);                                      \
    1694     gen_ ## op(s, ot);                                                        \
    1695     gen_op_add_reg_im(s->aflag, R_ECX, -1);                                   \
    1696     /* a loop would cause two single step exceptions if ECX = 1               \
    1697        before rep string_insn */                                              \
    1698     if (!s->jmp_opt)                                                          \
    1699         gen_op_jz_ecx(s->aflag, l2);                                          \
    1700     gen_jmp(s, cur_eip);                                                      \
    1701 }
    1702 #endif /* VBOX */
    1703 
    1704 #ifndef VBOX
     1445
    17051446#define GEN_REPZ2(op)                                                         \
    17061447static inline void gen_repz_ ## op(DisasContext *s, int ot,                   \
     
    17201461    gen_jmp(s, cur_eip);                                                      \
    17211462}
    1722 #else /* VBOX */
    1723 #define GEN_REPZ2(op)                                                         \
    1724 DECLINLINE(void) gen_repz_ ## op(DisasContext *s, int ot,                     \
    1725                                    target_ulong cur_eip,                      \
    1726                                    target_ulong next_eip,                     \
    1727                                    int nz)                                    \
    1728 {                                                                             \
    1729     int l2;\
    1730     gen_update_cc_op(s);                                                      \
    1731     l2 = gen_jz_ecx_string(s, next_eip);                                      \
    1732     gen_ ## op(s, ot);                                                        \
    1733     gen_op_add_reg_im(s->aflag, R_ECX, -1);                                   \
    1734     gen_op_set_cc_op(CC_OP_SUBB + ot);                                        \
    1735     gen_jcc1(s, CC_OP_SUBB + ot, (JCC_Z << 1) | (nz ^ 1), l2);                \
    1736     if (!s->jmp_opt)                                                          \
    1737         gen_op_jz_ecx(s->aflag, l2);                                          \
    1738     gen_jmp(s, cur_eip);                                                      \
    1739 }
    1740 #endif /* VBOX */
    17411463
    17421464GEN_REPZ(movs)
     
    20131735}
    20141736
    2015 #ifndef VBOX
    20161737static inline void tcg_gen_lshift(TCGv ret, TCGv arg1, target_long arg2)
    2017 #else /* VBOX */
    2018 DECLINLINE(void) tcg_gen_lshift(TCGv ret, TCGv arg1, target_long arg2)
    2019 #endif /* VBOX */
    20201738{
    20211739    if (arg2 >= 0)
     
    26422360}
    26432361
    2644 #ifndef VBOX
    26452362static inline uint32_t insn_get(DisasContext *s, int ot)
    2646 #else /* VBOX */
    2647 DECLINLINE(uint32_t) insn_get(DisasContext *s, int ot)
    2648 #endif /* VBOX */
    26492363{
    26502364    uint32_t ret;
     
    26682382}
    26692383
    2670 #ifndef VBOX
    26712384static inline int insn_const_size(unsigned int ot)
    2672 #else /* VBOX */
    2673 DECLINLINE(int) insn_const_size(unsigned int ot)
    2674 #endif /* VBOX */
    26752385{
    26762386    if (ot <= OT_LONG)
     
    26802390}
    26812391
    2682 #ifndef VBOX
    26832392static inline void gen_goto_tb(DisasContext *s, int tb_num, target_ulong eip)
    2684 #else /* VBOX */
    2685 DECLINLINE(void) gen_goto_tb(DisasContext *s, int tb_num, target_ulong eip)
    2686 #endif /* VBOX */
    26872393{
    26882394    TranslationBlock *tb;
     
    27082414}
    27092415
    2710 #ifndef VBOX
    27112416static inline void gen_jcc(DisasContext *s, int b,
    2712 #else /* VBOX */
    2713 DECLINLINE(void) gen_jcc(DisasContext *s, int b,
    2714 #endif /* VBOX */
    27152417                           target_ulong val, target_ulong next_eip)
    27162418{
     
    27762478}
    27772479
    2778 #ifndef VBOX
    27792480static inline void gen_op_movl_T0_seg(int seg_reg)
    2780 #else /* VBOX */
    2781 DECLINLINE(void) gen_op_movl_T0_seg(int seg_reg)
    2782 #endif /* VBOX */
    27832481{
    27842482    tcg_gen_ld32u_tl(cpu_T[0], cpu_env,
     
    27862484}
    27872485
    2788 #ifndef VBOX
    27892486static inline void gen_op_movl_seg_T0_vm(int seg_reg)
    2790 #else /* VBOX */
    2791 DECLINLINE(void) gen_op_movl_seg_T0_vm(int seg_reg)
    2792 #endif /* VBOX */
    27932487{
    27942488    tcg_gen_andi_tl(cpu_T[0], cpu_T[0], 0xffff);
     
    28352529}
    28362530
    2837 #ifndef VBOX
    28382531static inline int svm_is_rep(int prefixes)
    2839 #else /* VBOX */
    2840 DECLINLINE(int) svm_is_rep(int prefixes)
    2841 #endif /* VBOX */
    28422532{
    28432533    return ((prefixes & (PREFIX_REPZ | PREFIX_REPNZ)) ? 8 : 0);
    28442534}
    28452535
    2846 #ifndef VBOX
    28472536static inline void
    2848 #else /* VBOX */
    2849 DECLINLINE(void)
    2850 #endif /* VBOX */
    28512537gen_svm_check_intercept_param(DisasContext *s, target_ulong pc_start,
    28522538                              uint32_t type, uint64_t param)
     
    28622548}
    28632549
    2864 #ifndef VBOX
    28652550static inline void
    2866 #else /* VBOX */
    2867 DECLINLINE(void)
    2868 #endif
    28692551gen_svm_check_intercept(DisasContext *s, target_ulong pc_start, uint64_t type)
    28702552{
     
    28722554}
    28732555
    2874 #ifndef VBOX
    28752556static inline void gen_stack_update(DisasContext *s, int addend)
    2876 #else /* VBOX */
    2877 DECLINLINE(void) gen_stack_update(DisasContext *s, int addend)
    2878 #endif /* VBOX */
    28792557{
    28802558#ifdef TARGET_X86_64
     
    31942872}
    31952873
    3196 #ifndef VBOX
    31972874static inline void gen_ldq_env_A0(int idx, int offset)
    3198 #else /* VBOX */
    3199 DECLINLINE(void) gen_ldq_env_A0(int idx, int offset)
    3200 #endif /* VBOX */
    32012875{
    32022876    int mem_index = (idx >> 2) - 1;
     
    32052879}
    32062880
    3207 #ifndef VBOX
    32082881static inline void gen_stq_env_A0(int idx, int offset)
    3209 #else /* VBOX */
    3210 DECLINLINE(void) gen_stq_env_A0(int idx, int offset)
    3211 #endif /* VBOX */
    32122882{
    32132883    int mem_index = (idx >> 2) - 1;
     
    32162886}
    32172887
    3218 #ifndef VBOX
    32192888static inline void gen_ldo_env_A0(int idx, int offset)
    3220 #else /* VBOX */
    3221 DECLINLINE(void) gen_ldo_env_A0(int idx, int offset)
    3222 #endif /* VBOX */
    32232889{
    32242890    int mem_index = (idx >> 2) - 1;
     
    32302896}
    32312897
    3232 #ifndef VBOX
    32332898static inline void gen_sto_env_A0(int idx, int offset)
    3234 #else /* VBOX */
    3235 DECLINLINE(void) gen_sto_env_A0(int idx, int offset)
    3236 #endif /* VBOX */
    32372899{
    32382900    int mem_index = (idx >> 2) - 1;
     
    32442906}
    32452907
    3246 #ifndef VBOX
    32472908static inline void gen_op_movo(int d_offset, int s_offset)
    3248 #else /* VBOX */
    3249 DECLINLINE(void) gen_op_movo(int d_offset, int s_offset)
    3250 #endif /* VBOX */
    32512909{
    32522910    tcg_gen_ld_i64(cpu_tmp1_i64, cpu_env, s_offset);
     
    32562914}
    32572915
    3258 #ifndef VBOX
    32592916static inline void gen_op_movq(int d_offset, int s_offset)
    3260 #else /* VBOX */
    3261 DECLINLINE(void) gen_op_movq(int d_offset, int s_offset)
    3262 #endif /* VBOX */
    32632917{
    32642918    tcg_gen_ld_i64(cpu_tmp1_i64, cpu_env, s_offset);
     
    32662920}
    32672921
    3268 #ifndef VBOX
    32692922static inline void gen_op_movl(int d_offset, int s_offset)
    3270 #else /* VBOX */
    3271 DECLINLINE(void) gen_op_movl(int d_offset, int s_offset)
    3272 #endif /* VBOX */
    32732923{
    32742924    tcg_gen_ld_i32(cpu_tmp2_i32, cpu_env, s_offset);
     
    32762926}
    32772927
    3278 #ifndef VBOX
    32792928static inline void gen_op_movq_env_0(int d_offset)
    3280 #else /* VBOX */
    3281 DECLINLINE(void) gen_op_movq_env_0(int d_offset)
    3282 #endif /* VBOX */
    32832929{
    32842930    tcg_gen_movi_i64(cpu_tmp1_i64, 0);
     
    83608006   basic block 'tb'. If search_pc is TRUE, also generate PC
    83618007   information for each intermediate instruction. */
    8362 #ifndef VBOX
    83638008static inline void gen_intermediate_code_internal(CPUState *env,
    8364 #else /* VBOX */
    8365 DECLINLINE(void) gen_intermediate_code_internal(CPUState *env,
    8366 #endif /* VBOX */
    83678009                                                  TranslationBlock *tb,
    83688010                                                  int search_pc)
  • trunk/src/recompiler/tcg/i386/tcg-target.c

    r33540 r36125  
    8484
    8585/* maximum number of register used for input function arguments */
    86 #ifndef VBOX
    8786static inline int tcg_target_get_call_iarg_regs_count(int flags)
    88 #else /* VBOX */
    89 DECLINLINE(int) tcg_target_get_call_iarg_regs_count(int flags)
    90 #endif /* VBOX */
    9187{
    9288    flags &= TCG_CALL_TYPE_MASK;
     
    159155
    160156/* test if a constant matches the constraint */
    161 #ifndef VBOX
    162157static inline int tcg_target_const_match(tcg_target_long val,
    163 #else /* VBOX */
    164 DECLINLINE(int) tcg_target_const_match(tcg_target_long val,
    165 #endif /* VBOX */
    166158                                         const TCGArgConstraint *arg_ct)
    167159{
     
    236228#endif
    237229
    238 #ifndef VBOX
    239230static inline void tcg_out_opc(TCGContext *s, int opc)
    240 #else /* VBOX */
    241 DECLINLINE(void) tcg_out_opc(TCGContext *s, int opc)
    242 #endif /* VBOX */
    243231{
    244232    if (opc & P_EXT)
     
    247235}
    248236
    249 #ifndef VBOX
    250237static inline void tcg_out_modrm(TCGContext *s, int opc, int r, int rm)
    251 #else /* VBOX */
    252 DECLINLINE(void) tcg_out_modrm(TCGContext *s, int opc, int r, int rm)
    253 #endif /* VBOX */
    254238{
    255239    tcg_out_opc(s, opc);
     
    258242
    259243/* rm == -1 means no register index */
    260 #ifndef VBOX
    261244static inline void tcg_out_modrm_offset(TCGContext *s, int opc, int r, int rm,
    262 #else /* VBOX */
    263 DECLINLINE(void) tcg_out_modrm_offset(TCGContext *s, int opc, int r, int rm,
    264 #endif /* VBOX */
    265245                                        int32_t offset)
    266246{
     
    295275}
    296276
    297 #ifndef VBOX
    298277static inline void tcg_out_mov(TCGContext *s, int ret, int arg)
    299 #else /* VBOX */
    300 DECLINLINE(void) tcg_out_mov(TCGContext *s, int ret, int arg)
    301 #endif /* VBOX */
    302278{
    303279    if (arg != ret)
     
    305281}
    306282
    307 #ifndef VBOX
    308283static inline void tcg_out_movi(TCGContext *s, TCGType type,
    309 #else /* VBOX */
    310 DECLINLINE(void) tcg_out_movi(TCGContext *s, TCGType type,
    311 #endif /* VBOX */
    312284                                int ret, int32_t arg)
    313285{
     
    321293}
    322294
    323 #ifndef VBOX
    324295static inline void tcg_out_push(TCGContext *s, int reg)
    325 #else /* VBOX */
    326 DECLINLINE(void) tcg_out_push(TCGContext *s, int reg)
    327 #endif /* VBOX */
    328296{
    329297    tcg_out_opc(s, 0x50 + reg);
    330298}
    331299
    332 #ifndef VBOX
    333300static inline void tcg_out_pop(TCGContext *s, int reg)
    334 #else /* VBOX */
    335 DECLINLINE(void) tcg_out_pop(TCGContext *s, int reg)
    336 #endif /* VBOX */
    337301{
    338302    tcg_out_opc(s, 0x58 + reg);
    339303}
    340304
    341 #ifndef VBOX
    342305static inline void tcg_out_ld(TCGContext *s, TCGType type, int ret,
    343 #else /* VBOX */
    344 DECLINLINE(void) tcg_out_ld(TCGContext *s, TCGType type, int ret,
    345 #endif /* VBOX */
    346306                              int arg1, tcg_target_long arg2)
    347307{
     
    350310}
    351311
    352 #ifndef VBOX
    353312static inline void tcg_out_st(TCGContext *s, TCGType type, int arg,
    354 #else /* VBOX */
    355 DECLINLINE(void) tcg_out_st(TCGContext *s, TCGType type, int arg,
    356 #endif /* VBOX */
    357313                              int arg1, tcg_target_long arg2)
    358314{
     
    361317}
    362318
    363 #ifndef VBOX
    364319static inline void tgen_arithi(TCGContext *s, int c, int r0, int32_t val)
    365 #else /* VBOX */
    366 DECLINLINE(void) tgen_arithi(TCGContext *s, int c, int r0, int32_t val)
    367 #endif /* VBOX */
    368320{
    369321    if (val == (int8_t)val) {
     
    444396
    445397#ifdef VBOX
    446 DECLINLINE(void)
    447 tcg_out_long_call(TCGContext *s, void* dst)
     398
     399DECLINLINE(void) tcg_out_long_call(TCGContext *s, void* dst)
    448400{
    449401    intptr_t disp;
     
    455407    tcg_out32(s, disp); /* disp32 */
    456408}
    457 DECLINLINE(void)
    458 tcg_out_long_jmp(TCGContext *s, void* dst)
     409
     410DECLINLINE(void) tcg_out_long_jmp(TCGContext *s, void* dst)
    459411{
    460412    intptr_t disp = (uintptr_t)dst - (uintptr_t)s->code_ptr - 5;
     
    462414    tcg_out32(s, disp); /* disp32 */
    463415}
     416
    464417#endif /* VBOX */
    465 
    466418
    467419/* XXX: we implement it at the target level to avoid having to
     
    11261078}
    11271079
    1128 #ifndef VBOX
    11291080static inline void tcg_out_op(TCGContext *s, int opc,
    1130 #else /* VBOX */
    1131 DECLINLINE(void) tcg_out_op(TCGContext *s, int opc,
    1132 #endif /* VBOX */
    11331081                              const TCGArg *args, const int *const_args)
    11341082{
  • trunk/src/recompiler/tcg/i386/tcg-target.h

    r29520 r36125  
    5757#endif
    5858
    59 #ifndef VBOX
    6059static inline void flush_icache_range(unsigned long start, unsigned long stop)
    61 #else
    62 DECLINLINE(void) flush_icache_range(unsigned long start, unsigned long stop)
    63 #endif
    6460{
    6561}
  • trunk/src/recompiler/tcg/tcg-op.h

    r29520 r36125  
    3232int gen_new_label(void);
    3333
    34 #ifndef VBOX
    3534static inline void tcg_gen_op1(int opc, TCGv arg1)
    36 #else /* VBOX */
    37 DECLINLINE(void) tcg_gen_op1(int opc, TCGv arg1)
    38 #endif /* VBOX */
    3935{
    4036    *gen_opc_ptr++ = opc;
     
    4238}
    4339
    44 #ifndef VBOX
    4540static inline void tcg_gen_op1i(int opc, TCGArg arg1)
    46 #else /* VBOX */
    47 DECLINLINE(void) tcg_gen_op1i(int opc, TCGArg arg1)
    48 #endif /* VBOX */
    4941{
    5042    *gen_opc_ptr++ = opc;
     
    5244}
    5345
    54 #ifndef VBOX
    5546static inline void tcg_gen_op2(int opc, TCGv arg1, TCGv arg2)
    56 #else /* VBOX */
    57 DECLINLINE(void) tcg_gen_op2(int opc, TCGv arg1, TCGv arg2)
    58 #endif /* VBOX */
    5947{
    6048    *gen_opc_ptr++ = opc;
     
    6351}
    6452
    65 #ifndef VBOX
    6653static inline void tcg_gen_op2i(int opc, TCGv arg1, TCGArg arg2)
    67 #else /* VBOX */
    68 DECLINLINE(void) tcg_gen_op2i(int opc, TCGv arg1, TCGArg arg2)
    69 #endif /* VBOX */
    7054{
    7155    *gen_opc_ptr++ = opc;
     
    7458}
    7559
    76 #ifndef VBOX
    7760static inline void tcg_gen_op2ii(int opc, TCGArg arg1, TCGArg arg2)
    78 #else /* VBOX */
    79 DECLINLINE(void) tcg_gen_op2ii(int opc, TCGArg arg1, TCGArg arg2)
    80 #endif /* VBOX */
    8161{
    8262    *gen_opc_ptr++ = opc;
     
    8565}
    8666
    87 #ifndef VBOX
    8867static inline void tcg_gen_op3(int opc, TCGv arg1, TCGv arg2, TCGv arg3)
    89 #else /* VBOX */
    90 DECLINLINE(void) tcg_gen_op3(int opc, TCGv arg1, TCGv arg2, TCGv arg3)
    91 #endif /* VBOX */
    9268{
    9369    *gen_opc_ptr++ = opc;
     
    9773}
    9874
    99 #ifndef VBOX
    10075static inline void tcg_gen_op3i(int opc, TCGv arg1, TCGv arg2, TCGArg arg3)
    101 #else /* VBOX */
    102 DECLINLINE(void) tcg_gen_op3i(int opc, TCGv arg1, TCGv arg2, TCGArg arg3)
    103 #endif /* VBOX */
    10476{
    10577    *gen_opc_ptr++ = opc;
     
    10981}
    11082
    111 #ifndef VBOX
    11283static inline void tcg_gen_op4(int opc, TCGv arg1, TCGv arg2, TCGv arg3,
    113 #else /* VBOX */
    114 DECLINLINE(void) tcg_gen_op4(int opc, TCGv arg1, TCGv arg2, TCGv arg3,
    115 #endif /* VBOX */
    11684                               TCGv arg4)
    11785{
     
    12391}
    12492
    125 #ifndef VBOX
    12693static inline void tcg_gen_op4i(int opc, TCGv arg1, TCGv arg2, TCGv arg3,
    127 #else /* VBOX */
    128 DECLINLINE(void) tcg_gen_op4i(int opc, TCGv arg1, TCGv arg2, TCGv arg3,
    129 #endif /* VBOX */
    13094                                TCGArg arg4)
    13195{
     
    137101}
    138102
    139 #ifndef VBOX
    140103static inline void tcg_gen_op4ii(int opc, TCGv arg1, TCGv arg2, TCGArg arg3,
    141 #else /* VBOX */
    142 DECLINLINE(void) tcg_gen_op4ii(int opc, TCGv arg1, TCGv arg2, TCGArg arg3,
    143 #endif /* VBOX */
    144104                                 TCGArg arg4)
    145105{
     
    151111}
    152112
    153 #ifndef VBOX
    154113static inline void tcg_gen_op5(int opc, TCGv arg1, TCGv arg2,
    155 #else /* VBOX */
    156 DECLINLINE(void) tcg_gen_op5(int opc, TCGv arg1, TCGv arg2,
    157 #endif /* VBOX */
    158114                               TCGv arg3, TCGv arg4,
    159115                               TCGv arg5)
     
    167123}
    168124
    169 #ifndef VBOX
    170125static inline void tcg_gen_op5i(int opc, TCGv arg1, TCGv arg2,
    171 #else /* VBOX */
    172 DECLINLINE(void) tcg_gen_op5i(int opc, TCGv arg1, TCGv arg2,
    173 #endif /* VBOX */
    174126                                TCGv arg3, TCGv arg4,
    175127                                TCGArg arg5)
     
    183135}
    184136
    185 #ifndef VBOX
    186137static inline void tcg_gen_op6(int opc, TCGv arg1, TCGv arg2,
    187 #else /* VBOX */
    188 DECLINLINE(void) tcg_gen_op6(int opc, TCGv arg1, TCGv arg2,
    189 #endif /* VBOX */
    190138                               TCGv arg3, TCGv arg4,
    191139                               TCGv arg5, TCGv arg6)
     
    200148}
    201149
    202 #ifndef VBOX
    203150static inline void tcg_gen_op6ii(int opc, TCGv arg1, TCGv arg2,
    204 #else /* VBOX */
    205 DECLINLINE(void) tcg_gen_op6ii(int opc, TCGv arg1, TCGv arg2,
    206 #endif /* VBOX */
    207151                                 TCGv arg3, TCGv arg4,
    208152                                 TCGArg arg5, TCGArg arg6)
     
    217161}
    218162
    219 #ifndef VBOX
    220163static inline void gen_set_label(int n)
    221 #else /* VBOX */
    222 DECLINLINE(void) gen_set_label(int n)
    223 #endif /* VBOX */
    224164{
    225165    tcg_gen_op1i(INDEX_op_set_label, n);
    226166}
    227167
    228 #ifndef VBOX
    229168static inline void tcg_gen_br(int label)
    230 #else /* VBOX */
    231 DECLINLINE(void) tcg_gen_br(int label)
    232 #endif /* VBOX */
    233169{
    234170    tcg_gen_op1i(INDEX_op_br, label);
    235171}
    236172
    237 #ifndef VBOX
    238173static inline void tcg_gen_mov_i32(TCGv ret, TCGv arg)
    239 #else /* VBOX */
    240 DECLINLINE(void) tcg_gen_mov_i32(TCGv ret, TCGv arg)
    241 #endif /* VBOX */
    242174{
    243175    if (GET_TCGV(ret) != GET_TCGV(arg))
     
    245177}
    246178
    247 #ifndef VBOX
    248179static inline void tcg_gen_movi_i32(TCGv ret, int32_t arg)
    249 #else /* VBOX */
    250 DECLINLINE(void) tcg_gen_movi_i32(TCGv ret, int32_t arg)
    251 #endif /* VBOX */
    252180{
    253181    tcg_gen_op2i(INDEX_op_movi_i32, ret, arg);
     
    257185#define TCG_HELPER_CALL_FLAGS 0
    258186
    259 #ifndef VBOX
    260187static inline void tcg_gen_helper_0_0(void *func)
    261 #else /* VBOX */
    262 DECLINLINE(void) tcg_gen_helper_0_0(void *func)
    263 #endif /* VBOX */
    264188{
    265189    TCGv t0;
     
    271195}
    272196
    273 #ifndef VBOX
    274197static inline void tcg_gen_helper_0_1(void *func, TCGv arg)
    275 #else /* VBOX */
    276 DECLINLINE(void) tcg_gen_helper_0_1(void *func, TCGv arg)
    277 #endif /* VBOX */
    278198{
    279199    TCGv t0;
     
    285205}
    286206
    287 #ifndef VBOX
    288207static inline void tcg_gen_helper_0_2(void *func, TCGv arg1, TCGv arg2)
    289 #else /* VBOX */
    290 DECLINLINE(void) tcg_gen_helper_0_2(void *func, TCGv arg1, TCGv arg2)
    291 #endif /* VBOX */
    292208{
    293209    TCGv args[2];
     
    302218}
    303219
    304 #ifndef VBOX
    305220static inline void tcg_gen_helper_0_3(void *func,
    306 #else /* VBOX */
    307 DECLINLINE(void) tcg_gen_helper_0_3(void *func,
    308 #endif /* VBOX */
    309221                                      TCGv arg1, TCGv arg2, TCGv arg3)
    310222{
     
    321233}
    322234
    323 #ifndef VBOX
    324235static inline void tcg_gen_helper_0_4(void *func, TCGv arg1, TCGv arg2,
    325 #else /* VBOX */
    326 DECLINLINE(void) tcg_gen_helper_0_4(void *func, TCGv arg1, TCGv arg2,
    327 #endif /* VBOX */
    328236                                      TCGv arg3, TCGv arg4)
    329237{
     
    341249}
    342250
    343 #ifndef VBOX
    344251static inline void tcg_gen_helper_1_0(void *func, TCGv ret)
    345 #else /* VBOX */
    346 DECLINLINE(void) tcg_gen_helper_1_0(void *func, TCGv ret)
    347 #endif /* VBOX */
    348252{
    349253    TCGv t0;
     
    355259}
    356260
    357 #ifndef VBOX
    358261static inline void tcg_gen_helper_1_1(void *func, TCGv ret, TCGv arg1)
    359 #else /* VBOX */
    360 DECLINLINE(void) tcg_gen_helper_1_1(void *func, TCGv ret, TCGv arg1)
    361 #endif /* VBOX */
    362262{
    363263    TCGv t0;
     
    369269}
    370270
    371 #ifndef VBOX
    372271static inline void tcg_gen_helper_1_2(void *func, TCGv ret,
    373 #else /* VBOX */
    374 DECLINLINE(void) tcg_gen_helper_1_2(void *func, TCGv ret,
    375 #endif /* VBOX */
    376272                                      TCGv arg1, TCGv arg2)
    377273{
     
    387283}
    388284
    389 #ifndef VBOX
    390285static inline void tcg_gen_helper_1_3(void *func, TCGv ret,
    391 #else /* VBOX */
    392 DECLINLINE(void) tcg_gen_helper_1_3(void *func, TCGv ret,
    393 #endif /* VBOX */
    394286                                      TCGv arg1, TCGv arg2, TCGv arg3)
    395287{
     
    406298}
    407299
    408 #ifndef VBOX
    409300static inline void tcg_gen_helper_1_4(void *func, TCGv ret,
    410 #else /* VBOX */
    411 DECLINLINE(void) tcg_gen_helper_1_4(void *func, TCGv ret,
    412 #endif /* VBOX */
    413301                                      TCGv arg1, TCGv arg2, TCGv arg3,
    414302                                      TCGv arg4)
     
    429317/* 32 bit ops */
    430318
    431 #ifndef VBOX
    432319static inline void tcg_gen_ld8u_i32(TCGv ret, TCGv arg2, tcg_target_long offset)
    433 #else /* VBOX */
    434 DECLINLINE(void) tcg_gen_ld8u_i32(TCGv ret, TCGv arg2, tcg_target_long offset)
    435 #endif /* VBOX */
    436320{
    437321    tcg_gen_op3i(INDEX_op_ld8u_i32, ret, arg2, offset);
    438322}
    439323
    440 #ifndef VBOX
    441324static inline void tcg_gen_ld8s_i32(TCGv ret, TCGv arg2, tcg_target_long offset)
    442 #else /* VBOX */
    443 DECLINLINE(void) tcg_gen_ld8s_i32(TCGv ret, TCGv arg2, tcg_target_long offset)
    444 #endif /* VBOX */
    445325{
    446326    tcg_gen_op3i(INDEX_op_ld8s_i32, ret, arg2, offset);
    447327}
    448328
    449 #ifndef VBOX
    450329static inline void tcg_gen_ld16u_i32(TCGv ret, TCGv arg2, tcg_target_long offset)
    451 #else /* VBOX */
    452 DECLINLINE(void) tcg_gen_ld16u_i32(TCGv ret, TCGv arg2, tcg_target_long offset)
    453 #endif /* VBOX */
    454330{
    455331    tcg_gen_op3i(INDEX_op_ld16u_i32, ret, arg2, offset);
    456332}
    457333
    458 #ifndef VBOX
    459334static inline void tcg_gen_ld16s_i32(TCGv ret, TCGv arg2, tcg_target_long offset)
    460 #else /* VBOX */
    461 DECLINLINE(void) tcg_gen_ld16s_i32(TCGv ret, TCGv arg2, tcg_target_long offset)
    462 #endif /* VBOX */
    463335{
    464336    tcg_gen_op3i(INDEX_op_ld16s_i32, ret, arg2, offset);
    465337}
    466338
    467 #ifndef VBOX
    468339static inline void tcg_gen_ld_i32(TCGv ret, TCGv arg2, tcg_target_long offset)
    469 #else /* VBOX */
    470 DECLINLINE(void) tcg_gen_ld_i32(TCGv ret, TCGv arg2, tcg_target_long offset)
    471 #endif /* VBOX */
    472340{
    473341    tcg_gen_op3i(INDEX_op_ld_i32, ret, arg2, offset);
    474342}
    475343
    476 #ifndef VBOX
    477344static inline void tcg_gen_st8_i32(TCGv arg1, TCGv arg2, tcg_target_long offset)
    478 #else /* VBOX */
    479 DECLINLINE(void) tcg_gen_st8_i32(TCGv arg1, TCGv arg2, tcg_target_long offset)
    480 #endif /* VBOX */
    481345{
    482346    tcg_gen_op3i(INDEX_op_st8_i32, arg1, arg2, offset);
    483347}
    484348
    485 #ifndef VBOX
    486349static inline void tcg_gen_st16_i32(TCGv arg1, TCGv arg2, tcg_target_long offset)
    487 #else /* VBOX */
    488 DECLINLINE(void) tcg_gen_st16_i32(TCGv arg1, TCGv arg2, tcg_target_long offset)
    489 #endif /* VBOX */
    490350{
    491351    tcg_gen_op3i(INDEX_op_st16_i32, arg1, arg2, offset);
    492352}
    493353
    494 #ifndef VBOX
    495354static inline void tcg_gen_st_i32(TCGv arg1, TCGv arg2, tcg_target_long offset)
    496 #else /* VBOX */
    497 DECLINLINE(void) tcg_gen_st_i32(TCGv arg1, TCGv arg2, tcg_target_long offset)
    498 #endif /* VBOX */
    499355{
    500356    tcg_gen_op3i(INDEX_op_st_i32, arg1, arg2, offset);
    501357}
    502358
    503 #ifndef VBOX
    504359static inline void tcg_gen_add_i32(TCGv ret, TCGv arg1, TCGv arg2)
    505 #else /* VBOX */
    506 DECLINLINE(void) tcg_gen_add_i32(TCGv ret, TCGv arg1, TCGv arg2)
    507 #endif /* VBOX */
    508360{
    509361    tcg_gen_op3(INDEX_op_add_i32, ret, arg1, arg2);
    510362}
    511363
    512 #ifndef VBOX
    513364static inline void tcg_gen_addi_i32(TCGv ret, TCGv arg1, int32_t arg2)
    514 #else /* VBOX */
    515 DECLINLINE(void) tcg_gen_addi_i32(TCGv ret, TCGv arg1, int32_t arg2)
    516 #endif /* VBOX */
    517365{
    518366    /* some cases can be optimized here */
     
    526374}
    527375
    528 #ifndef VBOX
    529376static inline void tcg_gen_sub_i32(TCGv ret, TCGv arg1, TCGv arg2)
    530 #else /* VBOX */
    531 DECLINLINE(void) tcg_gen_sub_i32(TCGv ret, TCGv arg1, TCGv arg2)
    532 #endif /* VBOX */
    533377{
    534378    tcg_gen_op3(INDEX_op_sub_i32, ret, arg1, arg2);
    535379}
    536380
    537 #ifndef VBOX
    538381static inline void tcg_gen_subi_i32(TCGv ret, TCGv arg1, int32_t arg2)
    539 #else /* VBOX */
    540 DECLINLINE(void) tcg_gen_subi_i32(TCGv ret, TCGv arg1, int32_t arg2)
    541 #endif /* VBOX */
    542382{
    543383    /* some cases can be optimized here */
     
    551391}
    552392
    553 #ifndef VBOX
    554393static inline void tcg_gen_and_i32(TCGv ret, TCGv arg1, TCGv arg2)
    555 #else /* VBOX */
    556 DECLINLINE(void) tcg_gen_and_i32(TCGv ret, TCGv arg1, TCGv arg2)
    557 #endif /* VBOX */
    558394{
    559395    tcg_gen_op3(INDEX_op_and_i32, ret, arg1, arg2);
    560396}
    561397
    562 #ifndef VBOX
    563398static inline void tcg_gen_andi_i32(TCGv ret, TCGv arg1, int32_t arg2)
    564 #else /* VBOX */
    565 DECLINLINE(void) tcg_gen_andi_i32(TCGv ret, TCGv arg1, int32_t arg2)
    566 #endif /* VBOX */
    567399{
    568400    /* some cases can be optimized here */
     
    578410}
    579411
    580 #ifndef VBOX
    581412static inline void tcg_gen_or_i32(TCGv ret, TCGv arg1, TCGv arg2)
    582 #else /* VBOX */
    583 DECLINLINE(void) tcg_gen_or_i32(TCGv ret, TCGv arg1, TCGv arg2)
    584 #endif /* VBOX */
    585413{
    586414    tcg_gen_op3(INDEX_op_or_i32, ret, arg1, arg2);
    587415}
    588416
    589 #ifndef VBOX
    590417static inline void tcg_gen_ori_i32(TCGv ret, TCGv arg1, int32_t arg2)
    591 #else /* VBOX */
    592 DECLINLINE(void) tcg_gen_ori_i32(TCGv ret, TCGv arg1, int32_t arg2)
    593 #endif /* VBOX */
    594418{
    595419    /* some cases can be optimized here */
     
    605429}
    606430
    607 #ifndef VBOX
    608431static inline void tcg_gen_xor_i32(TCGv ret, TCGv arg1, TCGv arg2)
    609 #else /* VBOX */
    610 DECLINLINE(void) tcg_gen_xor_i32(TCGv ret, TCGv arg1, TCGv arg2)
    611 #endif /* VBOX */
    612432{
    613433    tcg_gen_op3(INDEX_op_xor_i32, ret, arg1, arg2);
    614434}
    615435
    616 #ifndef VBOX
    617436static inline void tcg_gen_xori_i32(TCGv ret, TCGv arg1, int32_t arg2)
    618 #else /* VBOX */
    619 DECLINLINE(void) tcg_gen_xori_i32(TCGv ret, TCGv arg1, int32_t arg2)
    620 #endif /* VBOX */
    621437{
    622438    /* some cases can be optimized here */
     
    630446}
    631447
    632 #ifndef VBOX
    633448static inline void tcg_gen_shl_i32(TCGv ret, TCGv arg1, TCGv arg2)
    634 #else /* VBOX */
    635 DECLINLINE(void) tcg_gen_shl_i32(TCGv ret, TCGv arg1, TCGv arg2)
    636 #endif /* VBOX */
    637449{
    638450    tcg_gen_op3(INDEX_op_shl_i32, ret, arg1, arg2);
    639451}
    640452
    641 #ifndef VBOX
    642453static inline void tcg_gen_shli_i32(TCGv ret, TCGv arg1, int32_t arg2)
    643 #else /* VBOX */
    644 DECLINLINE(void) tcg_gen_shli_i32(TCGv ret, TCGv arg1, int32_t arg2)
    645 #endif /* VBOX */
    646454{
    647455    if (arg2 == 0) {
     
    654462}
    655463
    656 #ifndef VBOX
    657464static inline void tcg_gen_shr_i32(TCGv ret, TCGv arg1, TCGv arg2)
    658 #else /* VBOX */
    659 DECLINLINE(void) tcg_gen_shr_i32(TCGv ret, TCGv arg1, TCGv arg2)
    660 #endif /* VBOX */
    661465{
    662466    tcg_gen_op3(INDEX_op_shr_i32, ret, arg1, arg2);
    663467}
    664468
    665 #ifndef VBOX
    666469static inline void tcg_gen_shri_i32(TCGv ret, TCGv arg1, int32_t arg2)
    667 #else /* VBOX */
    668 DECLINLINE(void) tcg_gen_shri_i32(TCGv ret, TCGv arg1, int32_t arg2)
    669 #endif /* VBOX */
    670470{
    671471    if (arg2 == 0) {
     
    678478}
    679479
    680 #ifndef VBOX
    681480static inline void tcg_gen_sar_i32(TCGv ret, TCGv arg1, TCGv arg2)
    682 #else /* VBOX */
    683 DECLINLINE(void) tcg_gen_sar_i32(TCGv ret, TCGv arg1, TCGv arg2)
    684 #endif /* VBOX */
    685481{
    686482    tcg_gen_op3(INDEX_op_sar_i32, ret, arg1, arg2);
    687483}
    688484
    689 #ifndef VBOX
    690485static inline void tcg_gen_sari_i32(TCGv ret, TCGv arg1, int32_t arg2)
    691 #else /* VBOX */
    692 DECLINLINE(void) tcg_gen_sari_i32(TCGv ret, TCGv arg1, int32_t arg2)
    693 #endif /* VBOX */
    694486{
    695487    if (arg2 == 0) {
     
    702494}
    703495
    704 #ifndef VBOX
    705496static inline void tcg_gen_brcond_i32(int cond, TCGv arg1, TCGv arg2,
    706 #else /* VBOX */
    707 DECLINLINE(void) tcg_gen_brcond_i32(int cond, TCGv arg1, TCGv arg2,
    708 #endif /* VBOX */
    709497                                      int label_index)
    710498{
     
    712500}
    713501
    714 #ifndef VBOX
    715502static inline void tcg_gen_brcondi_i32(int cond, TCGv arg1, int32_t arg2,
    716 #else /* VBOX */
    717 DECLINLINE(void) tcg_gen_brcondi_i32(int cond, TCGv arg1, int32_t arg2,
    718 #endif /* VBOX */
    719503                                       int label_index)
    720504{
     
    724508}
    725509
    726 #ifndef VBOX
    727510static inline void tcg_gen_mul_i32(TCGv ret, TCGv arg1, TCGv arg2)
    728 #else /* VBOX */
    729 DECLINLINE(void) tcg_gen_mul_i32(TCGv ret, TCGv arg1, TCGv arg2)
    730 #endif /* VBOX */
    731511{
    732512    tcg_gen_op3(INDEX_op_mul_i32, ret, arg1, arg2);
    733513}
    734514
    735 #ifndef VBOX
    736515static inline void tcg_gen_muli_i32(TCGv ret, TCGv arg1, int32_t arg2)
    737 #else /* VBOX */
    738 DECLINLINE(void) tcg_gen_muli_i32(TCGv ret, TCGv arg1, int32_t arg2)
    739 #endif /* VBOX */
    740516{
    741517    TCGv t0 = tcg_const_i32(arg2);
     
    745521
    746522#ifdef TCG_TARGET_HAS_div_i32
    747 #ifndef VBOX
    748523static inline void tcg_gen_div_i32(TCGv ret, TCGv arg1, TCGv arg2)
    749 #else /* VBOX */
    750 DECLINLINE(void) tcg_gen_div_i32(TCGv ret, TCGv arg1, TCGv arg2)
    751 #endif /* VBOX */
    752524{
    753525    tcg_gen_op3(INDEX_op_div_i32, ret, arg1, arg2);
    754526}
    755527
    756 #ifndef VBOX
    757528static inline void tcg_gen_rem_i32(TCGv ret, TCGv arg1, TCGv arg2)
    758 #else /* VBOX */
    759 DECLINLINE(void) tcg_gen_rem_i32(TCGv ret, TCGv arg1, TCGv arg2)
    760 #endif /* VBOX */
    761529{
    762530    tcg_gen_op3(INDEX_op_rem_i32, ret, arg1, arg2);
    763531}
    764532
    765 #ifndef VBOX
    766533static inline void tcg_gen_divu_i32(TCGv ret, TCGv arg1, TCGv arg2)
    767 #else /* VBOX */
    768 DECLINLINE(void) tcg_gen_divu_i32(TCGv ret, TCGv arg1, TCGv arg2)
    769 #endif /* VBOX */
    770534{
    771535    tcg_gen_op3(INDEX_op_divu_i32, ret, arg1, arg2);
    772536}
    773537
    774 #ifndef VBOX
    775538static inline void tcg_gen_remu_i32(TCGv ret, TCGv arg1, TCGv arg2)
    776 #else /* VBOX */
    777 DECLINLINE(void) tcg_gen_remu_i32(TCGv ret, TCGv arg1, TCGv arg2)
    778 #endif /* VBOX */
    779539{
    780540    tcg_gen_op3(INDEX_op_remu_i32, ret, arg1, arg2);
    781541}
    782542#else
    783 #ifndef VBOX
    784543static inline void tcg_gen_div_i32(TCGv ret, TCGv arg1, TCGv arg2)
    785 #else /* VBOX */
    786 DECLINLINE(void) tcg_gen_div_i32(TCGv ret, TCGv arg1, TCGv arg2)
    787 #endif /* VBOX */
    788544{
    789545    TCGv t0;
     
    794550}
    795551
    796 #ifndef VBOX
    797552static inline void tcg_gen_rem_i32(TCGv ret, TCGv arg1, TCGv arg2)
    798 #else /* VBOX */
    799 DECLINLINE(void) tcg_gen_rem_i32(TCGv ret, TCGv arg1, TCGv arg2)
    800 #endif /* VBOX */
    801553{
    802554    TCGv t0;
     
    807559}
    808560
    809 #ifndef VBOX
    810561static inline void tcg_gen_divu_i32(TCGv ret, TCGv arg1, TCGv arg2)
    811 #else /* VBOX */
    812 DECLINLINE(void) tcg_gen_divu_i32(TCGv ret, TCGv arg1, TCGv arg2)
    813 #endif /* VBOX */
    814562{
    815563    TCGv t0;
     
    820568}
    821569
    822 #ifndef VBOX
    823570static inline void tcg_gen_remu_i32(TCGv ret, TCGv arg1, TCGv arg2)
    824 #else /* VBOX */
    825 DECLINLINE(void) tcg_gen_remu_i32(TCGv ret, TCGv arg1, TCGv arg2)
    826 #endif /* VBOX */
    827571{
    828572    TCGv t0;
     
    836580#if TCG_TARGET_REG_BITS == 32
    837581
    838 #ifndef VBOX
    839582static inline void tcg_gen_mov_i64(TCGv ret, TCGv arg)
    840 #else /* VBOX */
    841 DECLINLINE(void) tcg_gen_mov_i64(TCGv ret, TCGv arg)
    842 #endif /* VBOX */
    843583{
    844584    if (GET_TCGV(ret) != GET_TCGV(arg)) {
     
    848588}
    849589
    850 #ifndef VBOX
    851590static inline void tcg_gen_movi_i64(TCGv ret, int64_t arg)
    852 #else /* VBOX */
    853 DECLINLINE(void) tcg_gen_movi_i64(TCGv ret, int64_t arg)
    854 #endif /* VBOX */
    855591{
    856592    tcg_gen_movi_i32(ret, arg);
     
    858594}
    859595
    860 #ifndef VBOX
    861596static inline void tcg_gen_ld8u_i64(TCGv ret, TCGv arg2, tcg_target_long offset)
    862 #else /* VBOX */
    863 DECLINLINE(void) tcg_gen_ld8u_i64(TCGv ret, TCGv arg2, tcg_target_long offset)
    864 #endif /* VBOX */
    865597{
    866598    tcg_gen_ld8u_i32(ret, arg2, offset);
     
    868600}
    869601
    870 #ifndef VBOX
    871602static inline void tcg_gen_ld8s_i64(TCGv ret, TCGv arg2, tcg_target_long offset)
    872 #else /* VBOX */
    873 DECLINLINE(void) tcg_gen_ld8s_i64(TCGv ret, TCGv arg2, tcg_target_long offset)
    874 #endif /* VBOX */
    875603{
    876604    tcg_gen_ld8s_i32(ret, arg2, offset);
     
    878606}
    879607
    880 #ifndef VBOX
    881608static inline void tcg_gen_ld16u_i64(TCGv ret, TCGv arg2, tcg_target_long offset)
    882 #else /* VBOX */
    883 DECLINLINE(void) tcg_gen_ld16u_i64(TCGv ret, TCGv arg2, tcg_target_long offset)
    884 #endif /* VBOX */
    885609{
    886610    tcg_gen_ld16u_i32(ret, arg2, offset);
     
    888612}
    889613
    890 #ifndef VBOX
    891614static inline void tcg_gen_ld16s_i64(TCGv ret, TCGv arg2, tcg_target_long offset)
    892 #else /* VBOX */
    893 DECLINLINE(void) tcg_gen_ld16s_i64(TCGv ret, TCGv arg2, tcg_target_long offset)
    894 #endif /* VBOX */
    895615{
    896616    tcg_gen_ld16s_i32(ret, arg2, offset);
     
    898618}
    899619
    900 #ifndef VBOX
    901620static inline void tcg_gen_ld32u_i64(TCGv ret, TCGv arg2, tcg_target_long offset)
    902 #else /* VBOX */
    903 DECLINLINE(void) tcg_gen_ld32u_i64(TCGv ret, TCGv arg2, tcg_target_long offset)
    904 #endif /* VBOX */
    905621{
    906622    tcg_gen_ld_i32(ret, arg2, offset);
     
    908624}
    909625
    910 #ifndef VBOX
    911626static inline void tcg_gen_ld32s_i64(TCGv ret, TCGv arg2, tcg_target_long offset)
    912 #else /* VBOX */
    913 DECLINLINE(void) tcg_gen_ld32s_i64(TCGv ret, TCGv arg2, tcg_target_long offset)
    914 #endif /* VBOX */
    915627{
    916628    tcg_gen_ld_i32(ret, arg2, offset);
     
    918630}
    919631
    920 #ifndef VBOX
    921632static inline void tcg_gen_ld_i64(TCGv ret, TCGv arg2, tcg_target_long offset)
    922 #else /* VBOX */
    923 DECLINLINE(void) tcg_gen_ld_i64(TCGv ret, TCGv arg2, tcg_target_long offset)
    924 #endif /* VBOX */
    925633{
    926634    /* since arg2 and ret have different types, they cannot be the
     
    935643}
    936644
    937 #ifndef VBOX
    938645static inline void tcg_gen_st8_i64(TCGv arg1, TCGv arg2, tcg_target_long offset)
    939 #else /* VBOX */
    940 DECLINLINE(void) tcg_gen_st8_i64(TCGv arg1, TCGv arg2, tcg_target_long offset)
    941 #endif /* VBOX */
    942646{
    943647    tcg_gen_st8_i32(arg1, arg2, offset);
    944648}
    945649
    946 #ifndef VBOX
    947650static inline void tcg_gen_st16_i64(TCGv arg1, TCGv arg2, tcg_target_long offset)
    948 #else /* VBOX */
    949 DECLINLINE(void) tcg_gen_st16_i64(TCGv arg1, TCGv arg2, tcg_target_long offset)
    950 #endif /* VBOX */
    951651{
    952652    tcg_gen_st16_i32(arg1, arg2, offset);
    953653}
    954654
    955 #ifndef VBOX
    956655static inline void tcg_gen_st32_i64(TCGv arg1, TCGv arg2, tcg_target_long offset)
    957 #else /* VBOX */
    958 DECLINLINE(void) tcg_gen_st32_i64(TCGv arg1, TCGv arg2, tcg_target_long offset)
    959 #endif /* VBOX */
    960656{
    961657    tcg_gen_st_i32(arg1, arg2, offset);
    962658}
    963659
    964 #ifndef VBOX
    965660static inline void tcg_gen_st_i64(TCGv arg1, TCGv arg2, tcg_target_long offset)
    966 #else /* VBOX */
    967 DECLINLINE(void) tcg_gen_st_i64(TCGv arg1, TCGv arg2, tcg_target_long offset)
    968 #endif /* VBOX */
    969661{
    970662#ifdef TCG_TARGET_WORDS_BIGENDIAN
     
    977669}
    978670
    979 #ifndef VBOX
    980671static inline void tcg_gen_add_i64(TCGv ret, TCGv arg1, TCGv arg2)
    981 #else /* VBOX */
    982 DECLINLINE(void) tcg_gen_add_i64(TCGv ret, TCGv arg1, TCGv arg2)
    983 #endif /* VBOX */
    984672{
    985673    tcg_gen_op6(INDEX_op_add2_i32, ret, TCGV_HIGH(ret),
     
    987675}
    988676
    989 #ifndef VBOX
    990677static inline void tcg_gen_addi_i64(TCGv ret, TCGv arg1, int64_t arg2)
    991 #else /* VBOX */
    992 DECLINLINE(void) tcg_gen_addi_i64(TCGv ret, TCGv arg1, int64_t arg2)
    993 #endif /* VBOX */
    994678{
    995679    TCGv t0 = tcg_const_i64(arg2);
     
    998682}
    999683
    1000 #ifndef VBOX
    1001684static inline void tcg_gen_sub_i64(TCGv ret, TCGv arg1, TCGv arg2)
    1002 #else /* VBOX */
    1003 DECLINLINE(void) tcg_gen_sub_i64(TCGv ret, TCGv arg1, TCGv arg2)
    1004 #endif /* VBOX */
    1005685{
    1006686    tcg_gen_op6(INDEX_op_sub2_i32, ret, TCGV_HIGH(ret),
     
    1008688}
    1009689
    1010 #ifndef VBOX
    1011690static inline void tcg_gen_subi_i64(TCGv ret, TCGv arg1, int64_t arg2)
    1012 #else /* VBOX */
    1013 DECLINLINE(void) tcg_gen_subi_i64(TCGv ret, TCGv arg1, int64_t arg2)
    1014 #endif /* VBOX */
    1015691{
    1016692    TCGv t0 = tcg_const_i64(arg2);
     
    1019695}
    1020696
    1021 #ifndef VBOX
    1022697static inline void tcg_gen_and_i64(TCGv ret, TCGv arg1, TCGv arg2)
    1023 #else /* VBOX */
    1024 DECLINLINE(void) tcg_gen_and_i64(TCGv ret, TCGv arg1, TCGv arg2)
    1025 #endif /* VBOX */
    1026698{
    1027699    tcg_gen_and_i32(ret, arg1, arg2);
     
    1029701}
    1030702
    1031 #ifndef VBOX
    1032703static inline void tcg_gen_andi_i64(TCGv ret, TCGv arg1, int64_t arg2)
    1033 #else /* VBOX */
    1034 DECLINLINE(void) tcg_gen_andi_i64(TCGv ret, TCGv arg1, int64_t arg2)
    1035 #endif /* VBOX */
    1036704{
    1037705    tcg_gen_andi_i32(ret, arg1, arg2);
     
    1039707}
    1040708
    1041 #ifndef VBOX
    1042709static inline void tcg_gen_or_i64(TCGv ret, TCGv arg1, TCGv arg2)
    1043 #else /* VBOX */
    1044 DECLINLINE(void) tcg_gen_or_i64(TCGv ret, TCGv arg1, TCGv arg2)
    1045 #endif /* VBOX */
    1046710{
    1047711    tcg_gen_or_i32(ret, arg1, arg2);
     
    1049713}
    1050714
    1051 #ifndef VBOX
    1052715static inline void tcg_gen_ori_i64(TCGv ret, TCGv arg1, int64_t arg2)
    1053 #else /* VBOX */
    1054 DECLINLINE(void) tcg_gen_ori_i64(TCGv ret, TCGv arg1, int64_t arg2)
    1055 #endif /* VBOX */
    1056716{
    1057717    tcg_gen_ori_i32(ret, arg1, arg2);
     
    1059719}
    1060720
    1061 #ifndef VBOX
    1062721static inline void tcg_gen_xor_i64(TCGv ret, TCGv arg1, TCGv arg2)
    1063 #else /* VBOX */
    1064 DECLINLINE(void) tcg_gen_xor_i64(TCGv ret, TCGv arg1, TCGv arg2)
    1065 #endif /* VBOX */
    1066722{
    1067723    tcg_gen_xor_i32(ret, arg1, arg2);
     
    1069725}
    1070726
    1071 #ifndef VBOX
    1072727static inline void tcg_gen_xori_i64(TCGv ret, TCGv arg1, int64_t arg2)
    1073 #else /* VBOX */
    1074 DECLINLINE(void) tcg_gen_xori_i64(TCGv ret, TCGv arg1, int64_t arg2)
    1075 #endif /* VBOX */
    1076728{
    1077729    tcg_gen_xori_i32(ret, arg1, arg2);
     
    1081733/* XXX: use generic code when basic block handling is OK or CPU
    1082734   specific code (x86) */
    1083 #ifndef VBOX
    1084735static inline void tcg_gen_shl_i64(TCGv ret, TCGv arg1, TCGv arg2)
    1085 #else /* VBOX */
    1086 DECLINLINE(void) tcg_gen_shl_i64(TCGv ret, TCGv arg1, TCGv arg2)
    1087 #endif /* VBOX */
    1088736{
    1089737    tcg_gen_helper_1_2(tcg_helper_shl_i64, ret, arg1, arg2);
    1090738}
    1091739
    1092 #ifndef VBOX
    1093740static inline void tcg_gen_shli_i64(TCGv ret, TCGv arg1, int64_t arg2)
    1094 #else /* VBOX */
    1095 DECLINLINE(void) tcg_gen_shli_i64(TCGv ret, TCGv arg1, int64_t arg2)
    1096 #endif /* VBOX */
    1097741{
    1098742    tcg_gen_shifti_i64(ret, arg1, arg2, 0, 0);
    1099743}
    1100744
    1101 #ifndef VBOX
    1102745static inline void tcg_gen_shr_i64(TCGv ret, TCGv arg1, TCGv arg2)
    1103 #else /* VBOX */
    1104 DECLINLINE(void) tcg_gen_shr_i64(TCGv ret, TCGv arg1, TCGv arg2)
    1105 #endif /* VBOX */
    1106746{
    1107747    tcg_gen_helper_1_2(tcg_helper_shr_i64, ret, arg1, arg2);
    1108748}
    1109749
    1110 #ifndef VBOX
    1111750static inline void tcg_gen_shri_i64(TCGv ret, TCGv arg1, int64_t arg2)
    1112 #else /* VBOX */
    1113 DECLINLINE(void) tcg_gen_shri_i64(TCGv ret, TCGv arg1, int64_t arg2)
    1114 #endif /* VBOX */
    1115751{
    1116752    tcg_gen_shifti_i64(ret, arg1, arg2, 1, 0);
    1117753}
    1118754
    1119 #ifndef VBOX
    1120755static inline void tcg_gen_sar_i64(TCGv ret, TCGv arg1, TCGv arg2)
    1121 #else /* VBOX */
    1122 DECLINLINE(void) tcg_gen_sar_i64(TCGv ret, TCGv arg1, TCGv arg2)
    1123 #endif /* VBOX */
    1124756{
    1125757    tcg_gen_helper_1_2(tcg_helper_sar_i64, ret, arg1, arg2);
    1126758}
    1127759
    1128 #ifndef VBOX
    1129760static inline void tcg_gen_sari_i64(TCGv ret, TCGv arg1, int64_t arg2)
    1130 #else /* VBOX */
    1131 DECLINLINE(void) tcg_gen_sari_i64(TCGv ret, TCGv arg1, int64_t arg2)
    1132 #endif /* VBOX */
    1133761{
    1134762    tcg_gen_shifti_i64(ret, arg1, arg2, 1, 1);
    1135763}
    1136764
    1137 #ifndef VBOX
    1138765static inline void tcg_gen_brcond_i64(int cond, TCGv arg1, TCGv arg2,
    1139 #else /* VBOX */
    1140 DECLINLINE(void) tcg_gen_brcond_i64(int cond, TCGv arg1, TCGv arg2,
    1141 #endif /* VBOX */
    1142766                                      int label_index)
    1143767{
     
    1147771}
    1148772
    1149 #ifndef VBOX
    1150773static inline void tcg_gen_mul_i64(TCGv ret, TCGv arg1, TCGv arg2)
    1151 #else /* VBOX */
    1152 DECLINLINE(void) tcg_gen_mul_i64(TCGv ret, TCGv arg1, TCGv arg2)
    1153 #endif /* VBOX */
    1154774{
    1155775    TCGv t0, t1;
     
    1170790}
    1171791
    1172 #ifndef VBOX
    1173792static inline void tcg_gen_muli_i64(TCGv ret, TCGv arg1, int64_t arg2)
    1174 #else /* VBOX */
    1175 DECLINLINE(void) tcg_gen_muli_i64(TCGv ret, TCGv arg1, int64_t arg2)
    1176 #endif /* VBOX */
    1177793{
    1178794    TCGv t0 = tcg_const_i64(arg2);
     
    1181797}
    1182798
    1183 #ifndef VBOX
    1184799static inline void tcg_gen_div_i64(TCGv ret, TCGv arg1, TCGv arg2)
    1185 #else /* VBOX */
    1186 DECLINLINE(void) tcg_gen_div_i64(TCGv ret, TCGv arg1, TCGv arg2)
    1187 #endif /* VBOX */
    1188800{
    1189801    tcg_gen_helper_1_2(tcg_helper_div_i64, ret, arg1, arg2);
    1190802}
    1191803
    1192 #ifndef VBOX
    1193804static inline void tcg_gen_rem_i64(TCGv ret, TCGv arg1, TCGv arg2)
    1194 #else /* VBOX */
    1195 DECLINLINE(void) tcg_gen_rem_i64(TCGv ret, TCGv arg1, TCGv arg2)
    1196 #endif /* VBOX */
    1197805{
    1198806    tcg_gen_helper_1_2(tcg_helper_rem_i64, ret, arg1, arg2);
    1199807}
    1200808
    1201 #ifndef VBOX
    1202809static inline void tcg_gen_divu_i64(TCGv ret, TCGv arg1, TCGv arg2)
    1203 #else /* VBOX */
    1204 DECLINLINE(void) tcg_gen_divu_i64(TCGv ret, TCGv arg1, TCGv arg2)
    1205 #endif /* VBOX */
    1206810{
    1207811    tcg_gen_helper_1_2(tcg_helper_divu_i64, ret, arg1, arg2);
    1208812}
    1209813
    1210 #ifndef VBOX
    1211814static inline void tcg_gen_remu_i64(TCGv ret, TCGv arg1, TCGv arg2)
    1212 #else /* VBOX */
    1213 DECLINLINE(void) tcg_gen_remu_i64(TCGv ret, TCGv arg1, TCGv arg2)
    1214 #endif /* VBOX */
    1215815{
    1216816    tcg_gen_helper_1_2(tcg_helper_remu_i64, ret, arg1, arg2);
     
    1219819#else
    1220820
    1221 #ifndef VBOX
    1222821static inline void tcg_gen_mov_i64(TCGv ret, TCGv arg)
    1223 #else /* VBOX */
    1224 DECLINLINE(void) tcg_gen_mov_i64(TCGv ret, TCGv arg)
    1225 #endif /* VBOX */
    1226822{
    1227823    if (GET_TCGV(ret) != GET_TCGV(arg))
     
    1229825}
    1230826
    1231 #ifndef VBOX
    1232827static inline void tcg_gen_movi_i64(TCGv ret, int64_t arg)
    1233 #else /* VBOX */
    1234 DECLINLINE(void) tcg_gen_movi_i64(TCGv ret, int64_t arg)
    1235 #endif /* VBOX */
    1236828{
    1237829    tcg_gen_op2i(INDEX_op_movi_i64, ret, arg);
    1238830}
    1239831
    1240 #ifndef VBOX
    1241832static inline void tcg_gen_ld8u_i64(TCGv ret, TCGv arg2,
    1242 #else /* VBOX */
    1243 DECLINLINE(void) tcg_gen_ld8u_i64(TCGv ret, TCGv arg2,
    1244 #endif /* VBOX */
    1245833                                    tcg_target_long offset)
    1246834{
     
    1248836}
    1249837
    1250 #ifndef VBOX
    1251838static inline void tcg_gen_ld8s_i64(TCGv ret, TCGv arg2,
    1252 #else /* VBOX */
    1253 DECLINLINE(void) tcg_gen_ld8s_i64(TCGv ret, TCGv arg2,
    1254 #endif /* VBOX */
    1255839                                    tcg_target_long offset)
    1256840{
     
    1258842}
    1259843
    1260 #ifndef VBOX
    1261844static inline void tcg_gen_ld16u_i64(TCGv ret, TCGv arg2,
    1262 #else /* VBOX */
    1263 DECLINLINE(void) tcg_gen_ld16u_i64(TCGv ret, TCGv arg2,
    1264 #endif /* VBOX */
    1265845                                     tcg_target_long offset)
    1266846{
     
    1268848}
    1269849
    1270 #ifndef VBOX
    1271850static inline void tcg_gen_ld16s_i64(TCGv ret, TCGv arg2,
    1272 #else /* VBOX */
    1273 DECLINLINE(void) tcg_gen_ld16s_i64(TCGv ret, TCGv arg2,
    1274 #endif /* VBOX */
    1275851                                     tcg_target_long offset)
    1276852{
     
    1278854}
    1279855
    1280 #ifndef VBOX
    1281856static inline void tcg_gen_ld32u_i64(TCGv ret, TCGv arg2,
    1282 #else /* VBOX */
    1283 DECLINLINE(void) tcg_gen_ld32u_i64(TCGv ret, TCGv arg2,
    1284 #endif /* VBOX */
    1285857                                     tcg_target_long offset)
    1286858{
     
    1288860}
    1289861
    1290 #ifndef VBOX
    1291862static inline void tcg_gen_ld32s_i64(TCGv ret, TCGv arg2,
    1292 #else /* VBOX */
    1293 DECLINLINE(void) tcg_gen_ld32s_i64(TCGv ret, TCGv arg2,
    1294 #endif /* VBOX */
    1295863                                     tcg_target_long offset)
    1296864{
     
    1298866}
    1299867
    1300 #ifndef VBOX
    1301868static inline void tcg_gen_ld_i64(TCGv ret, TCGv arg2, tcg_target_long offset)
    1302 #else /* VBOX */
    1303 DECLINLINE(void) tcg_gen_ld_i64(TCGv ret, TCGv arg2, tcg_target_long offset)
    1304 #endif /* VBOX */
    1305869{
    1306870    tcg_gen_op3i(INDEX_op_ld_i64, ret, arg2, offset);
    1307871}
    1308872
    1309 #ifndef VBOX
    1310873static inline void tcg_gen_st8_i64(TCGv arg1, TCGv arg2,
    1311 #else /* VBOX */
    1312 DECLINLINE(void) tcg_gen_st8_i64(TCGv arg1, TCGv arg2,
    1313 #endif /* VBOX */
    1314874                                   tcg_target_long offset)
    1315875{
     
    1317877}
    1318878
    1319 #ifndef VBOX
    1320879static inline void tcg_gen_st16_i64(TCGv arg1, TCGv arg2,
    1321 #else /* VBOX */
    1322 DECLINLINE(void) tcg_gen_st16_i64(TCGv arg1, TCGv arg2,
    1323 #endif /* VBOX */
    1324880                                    tcg_target_long offset)
    1325881{
     
    1327883}
    1328884
    1329 #ifndef VBOX
    1330885static inline void tcg_gen_st32_i64(TCGv arg1, TCGv arg2,
    1331 #else /* VBOX */
    1332 DECLINLINE(void) tcg_gen_st32_i64(TCGv arg1, TCGv arg2,
    1333 #endif /* VBOX */
    1334886                                    tcg_target_long offset)
    1335887{
     
    1337889}
    1338890
    1339 #ifndef VBOX
    1340891static inline void tcg_gen_st_i64(TCGv arg1, TCGv arg2, tcg_target_long offset)
    1341 #else /* VBOX */
    1342 DECLINLINE(void) tcg_gen_st_i64(TCGv arg1, TCGv arg2, tcg_target_long offset)
    1343 #endif /* VBOX */
    1344892{
    1345893    tcg_gen_op3i(INDEX_op_st_i64, arg1, arg2, offset);
    1346894}
    1347895
    1348 #ifndef VBOX
    1349896static inline void tcg_gen_add_i64(TCGv ret, TCGv arg1, TCGv arg2)
    1350 #else /* VBOX */
    1351 DECLINLINE(void) tcg_gen_add_i64(TCGv ret, TCGv arg1, TCGv arg2)
    1352 #endif /* VBOX */
    1353897{
    1354898    tcg_gen_op3(INDEX_op_add_i64, ret, arg1, arg2);
    1355899}
    1356900
    1357 #ifndef VBOX
    1358901static inline void tcg_gen_addi_i64(TCGv ret, TCGv arg1, int64_t arg2)
    1359 #else /* VBOX */
    1360 DECLINLINE(void) tcg_gen_addi_i64(TCGv ret, TCGv arg1, int64_t arg2)
    1361 #endif /* VBOX */
    1362902{
    1363903    TCGv t0 = tcg_const_i64(arg2);
     
    1366906}
    1367907
    1368 #ifndef VBOX
    1369908static inline void tcg_gen_sub_i64(TCGv ret, TCGv arg1, TCGv arg2)
    1370 #else /* VBOX */
    1371 DECLINLINE(void) tcg_gen_sub_i64(TCGv ret, TCGv arg1, TCGv arg2)
    1372 #endif /* VBOX */
    1373909{
    1374910    tcg_gen_op3(INDEX_op_sub_i64, ret, arg1, arg2);
    1375911}
    1376912
    1377 #ifndef VBOX
    1378913static inline void tcg_gen_subi_i64(TCGv ret, TCGv arg1, int64_t arg2)
    1379 #else /* VBOX */
    1380 DECLINLINE(void) tcg_gen_subi_i64(TCGv ret, TCGv arg1, int64_t arg2)
    1381 #endif /* VBOX */
    1382914{
    1383915    TCGv t0 = tcg_const_i64(arg2);
     
    1386918}
    1387919
    1388 #ifndef VBOX
    1389920static inline void tcg_gen_and_i64(TCGv ret, TCGv arg1, TCGv arg2)
    1390 #else /* VBOX */
    1391 DECLINLINE(void) tcg_gen_and_i64(TCGv ret, TCGv arg1, TCGv arg2)
    1392 #endif /* VBOX */
    1393921{
    1394922    tcg_gen_op3(INDEX_op_and_i64, ret, arg1, arg2);
    1395923}
    1396924
    1397 #ifndef VBOX
    1398925static inline void tcg_gen_andi_i64(TCGv ret, TCGv arg1, int64_t arg2)
    1399 #else /* VBOX */
    1400 DECLINLINE(void) tcg_gen_andi_i64(TCGv ret, TCGv arg1, int64_t arg2)
    1401 #endif /* VBOX */
    1402926{
    1403927    TCGv t0 = tcg_const_i64(arg2);
     
    1406930}
    1407931
    1408 #ifndef VBOX
    1409932static inline void tcg_gen_or_i64(TCGv ret, TCGv arg1, TCGv arg2)
    1410 #else /* VBOX */
    1411 DECLINLINE(void) tcg_gen_or_i64(TCGv ret, TCGv arg1, TCGv arg2)
    1412 #endif /* VBOX */
    1413933{
    1414934    tcg_gen_op3(INDEX_op_or_i64, ret, arg1, arg2);
    1415935}
    1416936
    1417 #ifndef VBOX
    1418937static inline void tcg_gen_ori_i64(TCGv ret, TCGv arg1, int64_t arg2)
    1419 #else /* VBOX */
    1420 DECLINLINE(void) tcg_gen_ori_i64(TCGv ret, TCGv arg1, int64_t arg2)
    1421 #endif /* VBOX */
    1422938{
    1423939    TCGv t0 = tcg_const_i64(arg2);
     
    1426942}
    1427943
    1428 #ifndef VBOX
    1429944static inline void tcg_gen_xor_i64(TCGv ret, TCGv arg1, TCGv arg2)
    1430 #else /* VBOX */
    1431 DECLINLINE(void) tcg_gen_xor_i64(TCGv ret, TCGv arg1, TCGv arg2)
    1432 #endif /* VBOX */
    1433945{
    1434946    tcg_gen_op3(INDEX_op_xor_i64, ret, arg1, arg2);
    1435947}
    1436948
    1437 #ifndef VBOX
    1438949static inline void tcg_gen_xori_i64(TCGv ret, TCGv arg1, int64_t arg2)
    1439 #else /* VBOX */
    1440 DECLINLINE(void) tcg_gen_xori_i64(TCGv ret, TCGv arg1, int64_t arg2)
    1441 #endif /* VBOX */
    1442950{
    1443951    TCGv t0 = tcg_const_i64(arg2);
     
    1446954}
    1447955
    1448 #ifndef VBOX
    1449956static inline void tcg_gen_shl_i64(TCGv ret, TCGv arg1, TCGv arg2)
    1450 #else /* VBOX */
    1451 DECLINLINE(void) tcg_gen_shl_i64(TCGv ret, TCGv arg1, TCGv arg2)
    1452 #endif /* VBOX */
    1453957{
    1454958    tcg_gen_op3(INDEX_op_shl_i64, ret, arg1, arg2);
    1455959}
    1456960
    1457 #ifndef VBOX
    1458961static inline void tcg_gen_shli_i64(TCGv ret, TCGv arg1, int64_t arg2)
    1459 #else /* VBOX */
    1460 DECLINLINE(void) tcg_gen_shli_i64(TCGv ret, TCGv arg1, int64_t arg2)
    1461 #endif /* VBOX */
    1462962{
    1463963    if (arg2 == 0) {
     
    1470970}
    1471971
    1472 #ifndef VBOX
    1473972static inline void tcg_gen_shr_i64(TCGv ret, TCGv arg1, TCGv arg2)
    1474 #else /* VBOX */
    1475 DECLINLINE(void) tcg_gen_shr_i64(TCGv ret, TCGv arg1, TCGv arg2)
    1476 #endif /* VBOX */
    1477973{
    1478974    tcg_gen_op3(INDEX_op_shr_i64, ret, arg1, arg2);
    1479975}
    1480976
    1481 #ifndef VBOX
    1482977static inline void tcg_gen_shri_i64(TCGv ret, TCGv arg1, int64_t arg2)
    1483 #else /* VBOX */
    1484 DECLINLINE(void) tcg_gen_shri_i64(TCGv ret, TCGv arg1, int64_t arg2)
    1485 #endif /* VBOX */
    1486978{
    1487979    if (arg2 == 0) {
     
    1494986}
    1495987
    1496 #ifndef VBOX
    1497988static inline void tcg_gen_sar_i64(TCGv ret, TCGv arg1, TCGv arg2)
    1498 #else /* VBOX */
    1499 DECLINLINE(void) tcg_gen_sar_i64(TCGv ret, TCGv arg1, TCGv arg2)
    1500 #endif /* VBOX */
    1501989{
    1502990    tcg_gen_op3(INDEX_op_sar_i64, ret, arg1, arg2);
    1503991}
    1504992
    1505 #ifndef VBOX
    1506993static inline void tcg_gen_sari_i64(TCGv ret, TCGv arg1, int64_t arg2)
    1507 #else /* VBOX */
    1508 DECLINLINE(void) tcg_gen_sari_i64(TCGv ret, TCGv arg1, int64_t arg2)
    1509 #endif /* VBOX */
    1510994{
    1511995    if (arg2 == 0) {
     
    15181002}
    15191003
    1520 #ifndef VBOX
    15211004static inline void tcg_gen_brcond_i64(int cond, TCGv arg1, TCGv arg2,
    1522 #else /* VBOX */
    1523 DECLINLINE(void) tcg_gen_brcond_i64(int cond, TCGv arg1, TCGv arg2,
    1524 #endif /* VBOX */
    15251005                                      int label_index)
    15261006{
     
    15281008}
    15291009
    1530 #ifndef VBOX
    15311010static inline void tcg_gen_mul_i64(TCGv ret, TCGv arg1, TCGv arg2)
    1532 #else /* VBOX */
    1533 DECLINLINE(void) tcg_gen_mul_i64(TCGv ret, TCGv arg1, TCGv arg2)
    1534 #endif /* VBOX */
    15351011{
    15361012    tcg_gen_op3(INDEX_op_mul_i64, ret, arg1, arg2);
    15371013}
    15381014
    1539 #ifndef VBOX
    15401015static inline void tcg_gen_muli_i64(TCGv ret, TCGv arg1, int64_t arg2)
    1541 #else /* VBOX */
    1542 DECLINLINE(void) tcg_gen_muli_i64(TCGv ret, TCGv arg1, int64_t arg2)
    1543 #endif /* VBOX */
    15441016{
    15451017    TCGv t0 = tcg_const_i64(arg2);
     
    15491021
    15501022#ifdef TCG_TARGET_HAS_div_i64
    1551 #ifndef VBOX
    15521023static inline void tcg_gen_div_i64(TCGv ret, TCGv arg1, TCGv arg2)
    1553 #else /* VBOX */
    1554 DECLINLINE(void) tcg_gen_div_i64(TCGv ret, TCGv arg1, TCGv arg2)
    1555 #endif /* VBOX */
    15561024{
    15571025    tcg_gen_op3(INDEX_op_div_i64, ret, arg1, arg2);
    15581026}
    15591027
    1560 #ifndef VBOX
    15611028static inline void tcg_gen_rem_i64(TCGv ret, TCGv arg1, TCGv arg2)
    1562 #else /* VBOX */
    1563 DECLINLINE(void) tcg_gen_rem_i64(TCGv ret, TCGv arg1, TCGv arg2)
    1564 #endif /* VBOX */
    15651029{
    15661030    tcg_gen_op3(INDEX_op_rem_i64, ret, arg1, arg2);
    15671031}
    15681032
    1569 #ifndef VBOX
    15701033static inline void tcg_gen_divu_i64(TCGv ret, TCGv arg1, TCGv arg2)
    1571 #else /* VBOX */
    1572 DECLINLINE(void) tcg_gen_divu_i64(TCGv ret, TCGv arg1, TCGv arg2)
    1573 #endif /* VBOX */
    15741034{
    15751035    tcg_gen_op3(INDEX_op_divu_i64, ret, arg1, arg2);
    15761036}
    15771037
    1578 #ifndef VBOX
    15791038static inline void tcg_gen_remu_i64(TCGv ret, TCGv arg1, TCGv arg2)
    1580 #else /* VBOX */
    1581 DECLINLINE(void) tcg_gen_remu_i64(TCGv ret, TCGv arg1, TCGv arg2)
    1582 #endif /* VBOX */
    15831039{
    15841040    tcg_gen_op3(INDEX_op_remu_i64, ret, arg1, arg2);
    15851041}
    15861042#else
    1587 #ifndef VBOX
    15881043static inline void tcg_gen_div_i64(TCGv ret, TCGv arg1, TCGv arg2)
    1589 #else /* VBOX */
    1590 DECLINLINE(void) tcg_gen_div_i64(TCGv ret, TCGv arg1, TCGv arg2)
    1591 #endif /* VBOX */
    15921044{
    15931045    TCGv t0;
     
    15981050}
    15991051
    1600 #ifndef VBOX
    16011052static inline void tcg_gen_rem_i64(TCGv ret, TCGv arg1, TCGv arg2)
    1602 #else /* VBOX */
    1603 DECLINLINE(void) tcg_gen_rem_i64(TCGv ret, TCGv arg1, TCGv arg2)
    1604 #endif /* VBOX */
    16051053{
    16061054    TCGv t0;
     
    16111059}
    16121060
    1613 #ifndef VBOX
    16141061static inline void tcg_gen_divu_i64(TCGv ret, TCGv arg1, TCGv arg2)
    1615 #else /* VBOX */
    1616 DECLINLINE(void) tcg_gen_divu_i64(TCGv ret, TCGv arg1, TCGv arg2)
    1617 #endif /* VBOX */
    16181062{
    16191063    TCGv t0;
     
    16241068}
    16251069
    1626 #ifndef VBOX
    16271070static inline void tcg_gen_remu_i64(TCGv ret, TCGv arg1, TCGv arg2)
    1628 #else /* VBOX */
    1629 DECLINLINE(void) tcg_gen_remu_i64(TCGv ret, TCGv arg1, TCGv arg2)
    1630 #endif /* VBOX */
    16311071{
    16321072    TCGv t0;
     
    16401080#endif
    16411081
    1642 #ifndef VBOX
    16431082static inline void tcg_gen_brcondi_i64(int cond, TCGv arg1, int64_t arg2,
    1644 #else /* VBOX */
    1645 DECLINLINE(void) tcg_gen_brcondi_i64(int cond, TCGv arg1, int64_t arg2,
    1646 #endif /* VBOX */
    16471083                                       int label_index)
    16481084{
     
    16551091/* optional operations */
    16561092
    1657 #ifndef VBOX
    16581093static inline void tcg_gen_ext8s_i32(TCGv ret, TCGv arg)
    1659 #else /* VBOX */
    1660 DECLINLINE(void) tcg_gen_ext8s_i32(TCGv ret, TCGv arg)
    1661 #endif /* VBOX */
    16621094{
    16631095#ifdef TCG_TARGET_HAS_ext8s_i32
     
    16691101}
    16701102
    1671 #ifndef VBOX
    16721103static inline void tcg_gen_ext16s_i32(TCGv ret, TCGv arg)
    1673 #else /* VBOX */
    1674 DECLINLINE(void) tcg_gen_ext16s_i32(TCGv ret, TCGv arg)
    1675 #endif /* VBOX */
    16761104{
    16771105#ifdef TCG_TARGET_HAS_ext16s_i32
     
    16851113/* These are currently just for convenience.
    16861114   We assume a target will recognise these automatically .  */
    1687 #ifndef VBOX
    16881115static inline void tcg_gen_ext8u_i32(TCGv ret, TCGv arg)
    1689 #else /* VBOX */
    1690 DECLINLINE(void) tcg_gen_ext8u_i32(TCGv ret, TCGv arg)
    1691 #endif /* VBOX */
    16921116{
    16931117    tcg_gen_andi_i32(ret, arg, 0xffu);
    16941118}
    16951119
    1696 #ifndef VBOX
    16971120static inline void tcg_gen_ext16u_i32(TCGv ret, TCGv arg)
    1698 #else /* VBOX */
    1699 DECLINLINE(void) tcg_gen_ext16u_i32(TCGv ret, TCGv arg)
    1700 #endif /* VBOX */
    17011121{
    17021122    tcg_gen_andi_i32(ret, arg, 0xffffu);
     
    17041124
    17051125/* Note: we assume the two high bytes are set to zero */
    1706 #ifndef VBOX
    17071126static inline void tcg_gen_bswap16_i32(TCGv ret, TCGv arg)
    1708 #else /* VBOX */
    1709 DECLINLINE(void) tcg_gen_bswap16_i32(TCGv ret, TCGv arg)
    1710 #endif /* VBOX */
    17111127{
    17121128#ifdef TCG_TARGET_HAS_bswap16_i32
     
    17261142}
    17271143
    1728 #ifndef VBOX
    17291144static inline void tcg_gen_bswap_i32(TCGv ret, TCGv arg)
    1730 #else /* VBOX */
    1731 DECLINLINE(void) tcg_gen_bswap_i32(TCGv ret, TCGv arg)
    1732 #endif /* VBOX */
    17331145{
    17341146#ifdef TCG_TARGET_HAS_bswap_i32
     
    17571169
    17581170#if TCG_TARGET_REG_BITS == 32
    1759 #ifndef VBOX
    17601171static inline void tcg_gen_ext8s_i64(TCGv ret, TCGv arg)
    1761 #else /* VBOX */
    1762 DECLINLINE(void) tcg_gen_ext8s_i64(TCGv ret, TCGv arg)
    1763 #endif /* VBOX */
    17641172{
    17651173    tcg_gen_ext8s_i32(ret, arg);
     
    17671175}
    17681176
    1769 #ifndef VBOX
    17701177static inline void tcg_gen_ext16s_i64(TCGv ret, TCGv arg)
    1771 #else /* VBOX */
    1772 DECLINLINE(void) tcg_gen_ext16s_i64(TCGv ret, TCGv arg)
    1773 #endif /* VBOX */
    17741178{
    17751179    tcg_gen_ext16s_i32(ret, arg);
     
    17771181}
    17781182
    1779 #ifndef VBOX
    17801183static inline void tcg_gen_ext32s_i64(TCGv ret, TCGv arg)
    1781 #else /* VBOX */
    1782 DECLINLINE(void) tcg_gen_ext32s_i64(TCGv ret, TCGv arg)
    1783 #endif /* VBOX */
    17841184{
    17851185    tcg_gen_mov_i32(ret, arg);
     
    17871187}
    17881188
    1789 #ifndef VBOX
    17901189static inline void tcg_gen_ext8u_i64(TCGv ret, TCGv arg)
    1791 #else /* VBOX */
    1792 DECLINLINE(void) tcg_gen_ext8u_i64(TCGv ret, TCGv arg)
    1793 #endif /* VBOX */
    17941190{
    17951191    tcg_gen_ext8u_i32(ret, arg);
     
    17971193}
    17981194
    1799 #ifndef VBOX
    18001195static inline void tcg_gen_ext16u_i64(TCGv ret, TCGv arg)
    1801 #else /* VBOX */
    1802 DECLINLINE(void) tcg_gen_ext16u_i64(TCGv ret, TCGv arg)
    1803 #endif /* VBOX */
    18041196{
    18051197    tcg_gen_ext16u_i32(ret, arg);
     
    18071199}
    18081200
    1809 #ifndef VBOX
    18101201static inline void tcg_gen_ext32u_i64(TCGv ret, TCGv arg)
    1811 #else /* VBOX */
    1812 DECLINLINE(void) tcg_gen_ext32u_i64(TCGv ret, TCGv arg)
    1813 #endif /* VBOX */
    18141202{
    18151203    tcg_gen_mov_i32(ret, arg);
     
    18171205}
    18181206
    1819 #ifndef VBOX
    18201207static inline void tcg_gen_trunc_i64_i32(TCGv ret, TCGv arg)
    1821 #else /* VBOX */
    1822 DECLINLINE(void) tcg_gen_trunc_i64_i32(TCGv ret, TCGv arg)
    1823 #endif /* VBOX */
    18241208{
    18251209    tcg_gen_mov_i32(ret, arg);
    18261210}
    18271211
    1828 #ifndef VBOX
    18291212static inline void tcg_gen_extu_i32_i64(TCGv ret, TCGv arg)
    1830 #else /* VBOX */
    1831 DECLINLINE(void) tcg_gen_extu_i32_i64(TCGv ret, TCGv arg)
    1832 #endif /* VBOX */
    18331213{
    18341214    tcg_gen_mov_i32(ret, arg);
     
    18361216}
    18371217
    1838 #ifndef VBOX
    18391218static inline void tcg_gen_ext_i32_i64(TCGv ret, TCGv arg)
    1840 #else /* VBOX */
    1841 DECLINLINE(void) tcg_gen_ext_i32_i64(TCGv ret, TCGv arg)
    1842 #endif /* VBOX */
    18431219{
    18441220    tcg_gen_mov_i32(ret, arg);
     
    18461222}
    18471223
    1848 #ifndef VBOX
    18491224static inline void tcg_gen_bswap_i64(TCGv ret, TCGv arg)
    1850 #else /* VBOX */
    1851 DECLINLINE(void) tcg_gen_bswap_i64(TCGv ret, TCGv arg)
    1852 #endif /* VBOX */
    18531225{
    18541226    TCGv t0, t1;
     
    18651237#else
    18661238
    1867 #ifndef VBOX
    18681239static inline void tcg_gen_ext8s_i64(TCGv ret, TCGv arg)
    1869 #else /* VBOX */
    1870 DECLINLINE(void) tcg_gen_ext8s_i64(TCGv ret, TCGv arg)
    1871 #endif /* VBOX */
    18721240{
    18731241#ifdef TCG_TARGET_HAS_ext8s_i64
     
    18791247}
    18801248
    1881 #ifndef VBOX
    18821249static inline void tcg_gen_ext16s_i64(TCGv ret, TCGv arg)
    1883 #else /* VBOX */
    1884 DECLINLINE(void) tcg_gen_ext16s_i64(TCGv ret, TCGv arg)
    1885 #endif /* VBOX */
    18861250{
    18871251#ifdef TCG_TARGET_HAS_ext16s_i64
     
    18931257}
    18941258
    1895 #ifndef VBOX
    18961259static inline void tcg_gen_ext32s_i64(TCGv ret, TCGv arg)
    1897 #else /* VBOX */
    1898 DECLINLINE(void) tcg_gen_ext32s_i64(TCGv ret, TCGv arg)
    1899 #endif /* VBOX */
    19001260{
    19011261#ifdef TCG_TARGET_HAS_ext32s_i64
     
    19071267}
    19081268
    1909 #ifndef VBOX
    19101269static inline void tcg_gen_ext8u_i64(TCGv ret, TCGv arg)
    1911 #else /* VBOX */
    1912 DECLINLINE(void) tcg_gen_ext8u_i64(TCGv ret, TCGv arg)
    1913 #endif /* VBOX */
    19141270{
    19151271    tcg_gen_andi_i64(ret, arg, 0xffu);
    19161272}
    19171273
    1918 #ifndef VBOX
    19191274static inline void tcg_gen_ext16u_i64(TCGv ret, TCGv arg)
    1920 #else /* VBOX */
    1921 DECLINLINE(void) tcg_gen_ext16u_i64(TCGv ret, TCGv arg)
    1922 #endif /* VBOX */
    19231275{
    19241276    tcg_gen_andi_i64(ret, arg, 0xffffu);
    19251277}
    19261278
    1927 #ifndef VBOX
    19281279static inline void tcg_gen_ext32u_i64(TCGv ret, TCGv arg)
    1929 #else /* VBOX */
    1930 DECLINLINE(void) tcg_gen_ext32u_i64(TCGv ret, TCGv arg)
    1931 #endif /* VBOX */
    19321280{
    19331281    tcg_gen_andi_i64(ret, arg, 0xffffffffu);
     
    19361284/* Note: we assume the target supports move between 32 and 64 bit
    19371285   registers.  This will probably break MIPS64 targets.  */
    1938 #ifndef VBOX
    19391286static inline void tcg_gen_trunc_i64_i32(TCGv ret, TCGv arg)
    1940 #else /* VBOX */
    1941 DECLINLINE(void) tcg_gen_trunc_i64_i32(TCGv ret, TCGv arg)
    1942 #endif /* VBOX */
    19431287{
    19441288    tcg_gen_mov_i32(ret, arg);
     
    19471291/* Note: we assume the target supports move between 32 and 64 bit
    19481292   registers */
    1949 #ifndef VBOX
    19501293static inline void tcg_gen_extu_i32_i64(TCGv ret, TCGv arg)
    1951 #else /* VBOX */
    1952 DECLINLINE(void) tcg_gen_extu_i32_i64(TCGv ret, TCGv arg)
    1953 #endif /* VBOX */
    19541294{
    19551295    tcg_gen_andi_i64(ret, arg, 0xffffffffu);
     
    19581298/* Note: we assume the target supports move between 32 and 64 bit
    19591299   registers */
    1960 #ifndef VBOX
    19611300static inline void tcg_gen_ext_i32_i64(TCGv ret, TCGv arg)
    1962 #else /* VBOX */
    1963 DECLINLINE(void) tcg_gen_ext_i32_i64(TCGv ret, TCGv arg)
    1964 #endif /* VBOX */
    19651301{
    19661302    tcg_gen_ext32s_i64(ret, arg);
    19671303}
    19681304
    1969 #ifndef VBOX
    19701305static inline void tcg_gen_bswap_i64(TCGv ret, TCGv arg)
    1971 #else /* VBOX */
    1972 DECLINLINE(void) tcg_gen_bswap_i64(TCGv ret, TCGv arg)
    1973 #endif /* VBOX */
    19741306{
    19751307#ifdef TCG_TARGET_HAS_bswap_i64
     
    20151347#endif
    20161348
    2017 #ifndef VBOX
    20181349static inline void tcg_gen_neg_i32(TCGv ret, TCGv arg)
    2019 #else /* VBOX */
    2020 DECLINLINE(void) tcg_gen_neg_i32(TCGv ret, TCGv arg)
    2021 #endif /* VBOX */
    20221350{
    20231351#ifdef TCG_TARGET_HAS_neg_i32
     
    20301358}
    20311359
    2032 #ifndef VBOX
    20331360static inline void tcg_gen_neg_i64(TCGv ret, TCGv arg)
    2034 #else /* VBOX */
    2035 DECLINLINE(void) tcg_gen_neg_i64(TCGv ret, TCGv arg)
    2036 #endif /* VBOX */
    20371361{
    20381362#ifdef TCG_TARGET_HAS_neg_i64
     
    20451369}
    20461370
    2047 #ifndef VBOX
    20481371static inline void tcg_gen_not_i32(TCGv ret, TCGv arg)
    2049 #else /* VBOX */
    2050 DECLINLINE(void) tcg_gen_not_i32(TCGv ret, TCGv arg)
    2051 #endif /* VBOX */
    20521372{
    20531373    tcg_gen_xori_i32(ret, arg, -1);
    20541374}
    20551375
    2056 #ifndef VBOX
    20571376static inline void tcg_gen_not_i64(TCGv ret, TCGv arg)
    2058 #else /* VBOX */
    2059 DECLINLINE(void) tcg_gen_not_i64(TCGv ret, TCGv arg)
    2060 #endif /* VBOX */
    20611377{
    20621378    tcg_gen_xori_i64(ret, arg, -1);
    20631379}
    20641380
    2065 #ifndef VBOX
    20661381static inline void tcg_gen_discard_i32(TCGv arg)
    2067 #else /* VBOX */
    2068 DECLINLINE(void) tcg_gen_discard_i32(TCGv arg)
    2069 #endif /* VBOX */
    20701382{
    20711383    tcg_gen_op1(INDEX_op_discard, arg);
     
    20731385
    20741386#if TCG_TARGET_REG_BITS == 32
    2075 #ifndef VBOX
    20761387static inline void tcg_gen_discard_i64(TCGv arg)
    2077 #else /* VBOX */
    2078 DECLINLINE(void) tcg_gen_discard_i64(TCGv arg)
    2079 #endif /* VBOX */
    20801388{
    20811389    tcg_gen_discard_i32(arg);
     
    20831391}
    20841392#else
    2085 #ifndef VBOX
    20861393static inline void tcg_gen_discard_i64(TCGv arg)
    2087 #else /* VBOX */
    2088 DECLINLINE(void) tcg_gen_discard_i64(TCGv arg)
    2089 #endif /* VBOX */
    20901394{
    20911395    tcg_gen_op1(INDEX_op_discard, arg);
     
    20931397#endif
    20941398
    2095 #ifndef VBOX
    20961399static inline void tcg_gen_concat_i32_i64(TCGv dest, TCGv low, TCGv high)
    2097 #else /* VBOX */
    2098 DECLINLINE(void) tcg_gen_concat_i32_i64(TCGv dest, TCGv low, TCGv high)
    2099 #endif /* VBOX */
    21001400{
    21011401#if TCG_TARGET_REG_BITS == 32
     
    21141414}
    21151415
    2116 #ifndef VBOX
    21171416static inline void tcg_gen_concat32_i64(TCGv dest, TCGv low, TCGv high)
    2118 #else /* VBOX */
    2119 DECLINLINE(void) tcg_gen_concat32_i64(TCGv dest, TCGv low, TCGv high)
    2120 #endif /* VBOX */
    21211417{
    21221418#if TCG_TARGET_REG_BITS == 32
     
    21391435
    21401436/* debug info: write the PC of the corresponding QEMU CPU instruction */
    2141 #ifndef VBOX
    21421437static inline void tcg_gen_debug_insn_start(uint64_t pc)
    2143 #else /* VBOX */
    2144 DECLINLINE(void) tcg_gen_debug_insn_start(uint64_t pc)
    2145 #endif /* VBOX */
    21461438{
    21471439    /* XXX: must really use a 32 bit size for TCGArg in all cases */
     
    21541446}
    21551447
    2156 #ifndef VBOX
    21571448static inline void tcg_gen_exit_tb(tcg_target_long val)
    2158 #else /* VBOX */
    2159 DECLINLINE(void) tcg_gen_exit_tb(tcg_target_long val)
    2160 #endif /* VBOX */
    21611449{
    21621450    tcg_gen_op1i(INDEX_op_exit_tb, val);
    21631451}
    21641452
    2165 #ifndef VBOX
    21661453static inline void tcg_gen_goto_tb(int idx)
    2167 #else /* VBOX */
    2168 DECLINLINE(void) tcg_gen_goto_tb(int idx)
    2169 #endif /* VBOX */
    21701454{
    21711455    tcg_gen_op1i(INDEX_op_goto_tb, idx);
     
    21731457
    21741458#if TCG_TARGET_REG_BITS == 32
    2175 #ifndef VBOX
    21761459static inline void tcg_gen_qemu_ld8u(TCGv ret, TCGv addr, int mem_index)
    2177 #else /* VBOX */
    2178 DECLINLINE(void) tcg_gen_qemu_ld8u(TCGv ret, TCGv addr, int mem_index)
    2179 #endif /* VBOX */
    21801460{
    21811461#if TARGET_LONG_BITS == 32
     
    21871467}
    21881468
    2189 #ifndef VBOX
    21901469static inline void tcg_gen_qemu_ld8s(TCGv ret, TCGv addr, int mem_index)
    2191 #else /* VBOX */
    2192 DECLINLINE(void) tcg_gen_qemu_ld8s(TCGv ret, TCGv addr, int mem_index)
    2193 #endif /* VBOX */
    21941470{
    21951471#if TARGET_LONG_BITS == 32
     
    22011477}
    22021478
    2203 #ifndef VBOX
    22041479static inline void tcg_gen_qemu_ld16u(TCGv ret, TCGv addr, int mem_index)
    2205 #else /* VBOX */
    2206 DECLINLINE(void) tcg_gen_qemu_ld16u(TCGv ret, TCGv addr, int mem_index)
    2207 #endif /* VBOX */
    22081480{
    22091481#if TARGET_LONG_BITS == 32
     
    22151487}
    22161488
    2217 #ifndef VBOX
    22181489static inline void tcg_gen_qemu_ld16s(TCGv ret, TCGv addr, int mem_index)
    2219 #else /* VBOX */
    2220 DECLINLINE(void) tcg_gen_qemu_ld16s(TCGv ret, TCGv addr, int mem_index)
    2221 #endif /* VBOX */
    22221490{
    22231491#if TARGET_LONG_BITS == 32
     
    22291497}
    22301498
    2231 #ifndef VBOX
    22321499static inline void tcg_gen_qemu_ld32u(TCGv ret, TCGv addr, int mem_index)
    2233 #else /* VBOX */
    2234 DECLINLINE(void) tcg_gen_qemu_ld32u(TCGv ret, TCGv addr, int mem_index)
    2235 #endif /* VBOX */
    22361500{
    22371501#if TARGET_LONG_BITS == 32
     
    22431507}
    22441508
    2245 #ifndef VBOX
    22461509static inline void tcg_gen_qemu_ld32s(TCGv ret, TCGv addr, int mem_index)
    2247 #else /* VBOX */
    2248 DECLINLINE(void) tcg_gen_qemu_ld32s(TCGv ret, TCGv addr, int mem_index)
    2249 #endif /* VBOX */
    22501510{
    22511511#if TARGET_LONG_BITS == 32
     
    22571517}
    22581518
    2259 #ifndef VBOX
    22601519static inline void tcg_gen_qemu_ld64(TCGv ret, TCGv addr, int mem_index)
    2261 #else /* VBOX */
    2262 DECLINLINE(void) tcg_gen_qemu_ld64(TCGv ret, TCGv addr, int mem_index)
    2263 #endif /* VBOX */
    22641520{
    22651521#if TARGET_LONG_BITS == 32
     
    22711527}
    22721528
    2273 #ifndef VBOX
    22741529static inline void tcg_gen_qemu_st8(TCGv arg, TCGv addr, int mem_index)
    2275 #else /* VBOX */
    2276 DECLINLINE(void) tcg_gen_qemu_st8(TCGv arg, TCGv addr, int mem_index)
    2277 #endif /* VBOX */
    22781530{
    22791531#if TARGET_LONG_BITS == 32
     
    22841536}
    22851537
    2286 #ifndef VBOX
    22871538static inline void tcg_gen_qemu_st16(TCGv arg, TCGv addr, int mem_index)
    2288 #else /* VBOX */
    2289 DECLINLINE(void) tcg_gen_qemu_st16(TCGv arg, TCGv addr, int mem_index)
    2290 #endif /* VBOX */
    22911539{
    22921540#if TARGET_LONG_BITS == 32
     
    22971545}
    22981546
    2299 #ifndef VBOX
    23001547static inline void tcg_gen_qemu_st32(TCGv arg, TCGv addr, int mem_index)
    2301 #else /* VBOX */
    2302 DECLINLINE(void) tcg_gen_qemu_st32(TCGv arg, TCGv addr, int mem_index)
    2303 #endif /* VBOX */
    23041548{
    23051549#if TARGET_LONG_BITS == 32
     
    23101554}
    23111555
    2312 #ifndef VBOX
    23131556static inline void tcg_gen_qemu_st64(TCGv arg, TCGv addr, int mem_index)
    2314 #else /* VBOX */
    2315 DECLINLINE(void) tcg_gen_qemu_st64(TCGv arg, TCGv addr, int mem_index)
    2316 #endif /* VBOX */
    23171557{
    23181558#if TARGET_LONG_BITS == 32
     
    23291569#else /* TCG_TARGET_REG_BITS == 32 */
    23301570
    2331 #ifndef VBOX
    23321571static inline void tcg_gen_qemu_ld8u(TCGv ret, TCGv addr, int mem_index)
    2333 #else /* VBOX */
    2334 DECLINLINE(void) tcg_gen_qemu_ld8u(TCGv ret, TCGv addr, int mem_index)
    2335 #endif /* VBOX */
    23361572{
    23371573    tcg_gen_op3i(INDEX_op_qemu_ld8u, ret, addr, mem_index);
    23381574}
    23391575
    2340 #ifndef VBOX
    23411576static inline void tcg_gen_qemu_ld8s(TCGv ret, TCGv addr, int mem_index)
    2342 #else /* VBOX */
    2343 DECLINLINE(void) tcg_gen_qemu_ld8s(TCGv ret, TCGv addr, int mem_index)
    2344 #endif /* VBOX */
    23451577{
    23461578    tcg_gen_op3i(INDEX_op_qemu_ld8s, ret, addr, mem_index);
    23471579}
    23481580
    2349 #ifndef VBOX
    23501581static inline void tcg_gen_qemu_ld16u(TCGv ret, TCGv addr, int mem_index)
    2351 #else /* VBOX */
    2352 DECLINLINE(void) tcg_gen_qemu_ld16u(TCGv ret, TCGv addr, int mem_index)
    2353 #endif /* VBOX */
    23541582{
    23551583    tcg_gen_op3i(INDEX_op_qemu_ld16u, ret, addr, mem_index);
    23561584}
    23571585
    2358 #ifndef VBOX
    23591586static inline void tcg_gen_qemu_ld16s(TCGv ret, TCGv addr, int mem_index)
    2360 #else /* VBOX */
    2361 DECLINLINE(void) tcg_gen_qemu_ld16s(TCGv ret, TCGv addr, int mem_index)
    2362 #endif /* VBOX */
    23631587{
    23641588    tcg_gen_op3i(INDEX_op_qemu_ld16s, ret, addr, mem_index);
    23651589}
    23661590
    2367 #ifndef VBOX
    23681591static inline void tcg_gen_qemu_ld32u(TCGv ret, TCGv addr, int mem_index)
    2369 #else /* VBOX */
    2370 DECLINLINE(void) tcg_gen_qemu_ld32u(TCGv ret, TCGv addr, int mem_index)
    2371 #endif /* VBOX */
    23721592{
    23731593    tcg_gen_op3i(INDEX_op_qemu_ld32u, ret, addr, mem_index);
    23741594}
    23751595
    2376 #ifndef VBOX
    23771596static inline void tcg_gen_qemu_ld32s(TCGv ret, TCGv addr, int mem_index)
    2378 #else /* VBOX */
    2379 DECLINLINE(void) tcg_gen_qemu_ld32s(TCGv ret, TCGv addr, int mem_index)
    2380 #endif /* VBOX */
    23811597{
    23821598    tcg_gen_op3i(INDEX_op_qemu_ld32s, ret, addr, mem_index);
    23831599}
    23841600
    2385 #ifndef VBOX
    23861601static inline void tcg_gen_qemu_ld64(TCGv ret, TCGv addr, int mem_index)
    2387 #else /* VBOX */
    2388 DECLINLINE(void) tcg_gen_qemu_ld64(TCGv ret, TCGv addr, int mem_index)
    2389 #endif /* VBOX */
    23901602{
    23911603    tcg_gen_op3i(INDEX_op_qemu_ld64, ret, addr, mem_index);
    23921604}
    23931605
    2394 #ifndef VBOX
    23951606static inline void tcg_gen_qemu_st8(TCGv arg, TCGv addr, int mem_index)
    2396 #else /* VBOX */
    2397 DECLINLINE(void) tcg_gen_qemu_st8(TCGv arg, TCGv addr, int mem_index)
    2398 #endif /* VBOX */
    23991607{
    24001608    tcg_gen_op3i(INDEX_op_qemu_st8, arg, addr, mem_index);
    24011609}
    24021610
    2403 #ifndef VBOX
    24041611static inline void tcg_gen_qemu_st16(TCGv arg, TCGv addr, int mem_index)
    2405 #else /* VBOX */
    2406 DECLINLINE(void) tcg_gen_qemu_st16(TCGv arg, TCGv addr, int mem_index)
    2407 #endif /* VBOX */
    24081612{
    24091613    tcg_gen_op3i(INDEX_op_qemu_st16, arg, addr, mem_index);
    24101614}
    24111615
    2412 #ifndef VBOX
    24131616static inline void tcg_gen_qemu_st32(TCGv arg, TCGv addr, int mem_index)
    2414 #else /* VBOX */
    2415 DECLINLINE(void) tcg_gen_qemu_st32(TCGv arg, TCGv addr, int mem_index)
    2416 #endif /* VBOX */
    24171617{
    24181618    tcg_gen_op3i(INDEX_op_qemu_st32, arg, addr, mem_index);
    24191619}
    24201620
    2421 #ifndef VBOX
    24221621static inline void tcg_gen_qemu_st64(TCGv arg, TCGv addr, int mem_index)
    2423 #else /* VBOX */
    2424 DECLINLINE(void) tcg_gen_qemu_st64(TCGv arg, TCGv addr, int mem_index)
    2425 #endif /* VBOX */
    24261622{
    24271623    tcg_gen_op3i(INDEX_op_qemu_st64, arg, addr, mem_index);
  • trunk/src/recompiler/tcg/tcg.c

    r33540 r36125  
    9292TCGArg *gen_opparam_ptr;
    9393
    94 #ifndef VBOX
    9594static inline void tcg_out8(TCGContext *s, uint8_t v)
    96 #else /* VBOX */
    97 DECLINLINE(void) tcg_out8(TCGContext *s, uint8_t v)
    98 #endif /* VBOX */
    9995{
    10096    *s->code_ptr++ = v;
    10197}
    10298
    103 #ifndef VBOX
    10499static inline void tcg_out16(TCGContext *s, uint16_t v)
    105 #else /* VBOX */
    106 DECLINLINE(void) tcg_out16(TCGContext *s, uint16_t v)
    107 #endif /* VBOX */
    108100{
    109101    *(uint16_t *)s->code_ptr = v;
     
    111103}
    112104
    113 #ifndef VBOX
    114105static inline void tcg_out32(TCGContext *s, uint32_t v)
    115 #else /* VBOX */
    116 DECLINLINE(void) tcg_out32(TCGContext *s, uint32_t v)
    117 #endif /* VBOX */
    118106{
    119107    *(uint32_t *)s->code_ptr = v;
     
    295283}
    296284
    297 #ifndef VBOX
    298285static inline void tcg_temp_alloc(TCGContext *s, int n)
    299 #else /* VBOX */
    300 DECLINLINE(void) tcg_temp_alloc(TCGContext *s, int n)
    301 #endif /* VBOX */
    302286{
    303287    if (n > TCG_MAX_TEMPS)
     
    537521}
    538522
    539 #ifndef VBOX
    540523static inline TCGType tcg_get_base_type(TCGContext *s, TCGv arg)
    541 #else /* VBOX */
    542 DECLINLINE(TCGType) tcg_get_base_type(TCGContext *s, TCGv arg)
    543 #endif /* VBOX */
    544524{
    545525    return s->temps[GET_TCGV(arg)].base_type;
     
    10741054
    10751055/* set a nop for an operation using 'nb_args' */
    1076 #ifndef VBOX
    10771056static inline void tcg_set_nop(TCGContext *s, uint16_t *opc_ptr,
    1078 #else /* VBOX */
    1079 DECLINLINE(void) tcg_set_nop(TCGContext *s, uint16_t *opc_ptr,
    1080 #endif /* VBOX */
    10811057                               TCGArg *args, int nb_args)
    10821058{
     
    10941070/* XXX: at this stage, not used as there would be little gains because
    10951071   most TBs end with a conditional jump. */
    1096 #ifndef VBOX
    10971072static inline void tcg_la_func_end(TCGContext *s, uint8_t *dead_temps)
    1098 #else /* VBOX */
    1099 DECLINLINE(void) tcg_la_func_end(TCGContext *s, uint8_t *dead_temps)
    1100 #endif /* VBOX */
    11011073{
    11021074    memset(dead_temps, 0, s->nb_globals);
     
    11061078/* liveness analysis: end of basic block: globals are live, temps are
    11071079   dead, local temps are live. */
    1108 #ifndef VBOX
    11091080static inline void tcg_la_bb_end(TCGContext *s, uint8_t *dead_temps)
    1110 #else /* VBOX */
    1111 DECLINLINE(void) tcg_la_bb_end(TCGContext *s, uint8_t *dead_temps)
    1112 #endif /* VBOX */
    11131081{
    11141082    int i;
     
    19461914
    19471915
    1948 #ifndef VBOX
    19491916static inline int tcg_gen_code_common(TCGContext *s, uint8_t *gen_code_buf,
    1950 #else /* VBOX */
    1951 DECLINLINE(int) tcg_gen_code_common(TCGContext *s, uint8_t *gen_code_buf,
    1952 #endif /* VBOX */
    19531917                                      long search_pc)
    19541918{
  • trunk/src/recompiler/tcg/tcg.h

    r33540 r36125  
    8383    struct TCGPool *next;
    8484    int size;
    85 #ifndef VBOX
    8685    uint8_t data[0] __attribute__ ((aligned));
    87 #else
    88     ALIGNED_MEMBER_DEF(uint8_t, data[0]);
    89 #endif
    9086} TCGPool;
    9187
     
    284280void tcg_pool_delete(TCGContext *s);
    285281
    286 #ifndef VBOX
    287282static inline void *tcg_malloc(int size)
    288 #else
    289 DECLINLINE(void *) tcg_malloc(int size)
    290 #endif
    291283{
    292284    TCGContext *s = &tcg_ctx;
     
    317309                        const char *name);
    318310TCGv tcg_temp_new_internal(TCGType type, int temp_local);
    319 #ifndef VBOX
    320311static inline TCGv tcg_temp_new(TCGType type)
    321 #else
    322 DECLINLINE(TCGv) tcg_temp_new(TCGType type)
    323 #endif
    324312{
    325313    return tcg_temp_new_internal(type, 0);
    326314}
    327 #ifndef VBOX
    328315static inline TCGv tcg_temp_local_new(TCGType type)
    329 #else
    330 DECLINLINE(TCGv) tcg_temp_local_new(TCGType type)
    331 #endif
    332316{
    333317    return tcg_temp_new_internal(type, 1);
  • trunk/src/recompiler/tcg/x86_64/tcg-target.c

    r29520 r36125  
    497497
    498498#ifdef VBOX
     499
    499500DECLINLINE(void) tcg_out_pushq(TCGContext *s, tcg_target_long val)
    500501{
     
    522523    else
    523524    {
    524 #if 0
     525# if 0
    525526        /* Somewhat tricky, but allows long jump not touching registers */
    526527        int off = 5 /* push imm32 */ + 5 /* push imm32 */ + 1 /* ret */;
     
    534535        tcg_out_pushq(s, dst);
    535536        tcg_out8(s, 0xc3); /* ret, used as call */
    536 #else
     537# else
    537538        tcg_out_movi(s, TCG_TYPE_I64, TCG_REG_RAX, dst);
    538539        tcg_out8(s, 0xff); /* call *%eax */
    539540        tcg_out8(s, 0xd0);
    540 #endif
     541# endif
    541542    }
    542543}
     
    562563        return;
    563564    }
    564 #if 0
     565# if 0
    565566    tcg_out_pushq(s, dst);
    566567    tcg_out8(s, 0xc3); /* ret */
    567 #else
     568# else
    568569    tcg_out_movi(s, TCG_TYPE_I64, TCG_REG_RAX, dst);
    569570    tcg_out8(s, 0xff); /* jmp *%eax */
    570571    tcg_out8(s, 0xe0);
    571 #endif
    572 }
    573 #endif
     572# endif
     573}
     574
     575#endif /* VBOX */
    574576
    575577#if defined(CONFIG_SOFTMMU)
Note: See TracChangeset for help on using the changeset viewer.

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