VirtualBox

Changeset 26499 in vbox


Ignore:
Timestamp:
Feb 14, 2010 8:22:40 AM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
57669
Message:

recompier: whitespace cleanup. (Clean up whitespace on the foreign code before trying to merge in new changes again.)

Location:
trunk/src/recompiler
Files:
19 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/recompiler/cutils.c

    r17040 r26499  
    3333}
    3434
    35 /* Quick sort from OpenSolaris: 
     35/* Quick sort from OpenSolaris:
    3636     http://src.opensolaris.org/source/raw/onnv/onnv-gate/usr/src/common/util/qsort.c */
    3737/*
     
    583583        y--;
    584584    }
    585     t = 86400 * (d + (153 * m - 457) / 5 + 365 * y + y / 4 - y / 100 + 
     585    t = 86400 * (d + (153 * m - 457) / 5 + 365 * y + y / 4 - y / 100 +
    586586                 y / 400 - 719469);
    587587    t += 3600 * tm->tm_hour + 60 * tm->tm_min + tm->tm_sec;
  • trunk/src/recompiler/dyngen-exec.h

    r13731 r26499  
    125125#endif
    126126#ifdef __x86_64__
    127 #if defined(VBOX) 
     127#if defined(VBOX)
    128128/* Must be in sync with TCG register notion, see tcg-target.h */
    129129#endif
     
    243243#define __hidden __attribute__((visibility("hidden")))
    244244#else
    245 #define __hidden 
     245#define __hidden
    246246#endif
    247247
     
    278278
    279279#ifdef VBOX
    280 #define GETPC() ASMReturnAddress() 
     280#define GETPC() ASMReturnAddress()
    281281#elif defined(__s390__)
    282282/* The return address may point to the start of the next instruction.
  • trunk/src/recompiler/elf.h

    r13384 r26499  
    10411041#define SHN_HIRESERVE   0xffff
    10421042#define SHN_MIPS_ACCOMON        0xff00
    1043  
     1043
    10441044typedef struct elf32_shdr {
    10451045  Elf32_Word    sh_name;
  • trunk/src/recompiler/fpu/softfloat.h

    r21292 r26499  
    102102#if defined(VBOX) && (!defined(FLOATX80) || defined(CONFIG_SOFTFLOAT))
    103103# error misconfigured
    104 #endif 
     104#endif
    105105
    106106#define STATUS_PARAM , float_status *status
  • trunk/src/recompiler/host-utils.h

    r17040 r26499  
    175175#endif
    176176 }
    177  
     177
    178178#ifndef VBOX
    179179static always_inline int cto32 (uint32_t val)
  • trunk/src/recompiler/softmmu_header.h

    r13731 r26499  
    11/*
    22 *  Software MMU support
    3  * 
     3 *
    44 *  Copyright (c) 2003 Fabrice Bellard
    55 *
  • trunk/src/recompiler/softmmu_template.h

    r15173 r26499  
    11/*
    22 *  Software MMU support
    3  * 
     3 *
    44 *  Copyright (c) 2003 Fabrice Bellard
    55 *
     
    7171                                                        void *retaddr);
    7272#ifndef VBOX
    73 static inline DATA_TYPE glue(io_read, SUFFIX)(target_phys_addr_t physaddr, 
     73static inline DATA_TYPE glue(io_read, SUFFIX)(target_phys_addr_t physaddr,
    7474                                              target_ulong addr,
    7575                                              void *retaddr)
    7676#else
    77 DECLINLINE(DATA_TYPE) glue(io_read, SUFFIX)(target_phys_addr_t physaddr, 
     77DECLINLINE(DATA_TYPE) glue(io_read, SUFFIX)(target_phys_addr_t physaddr,
    7878                                            target_ulong addr,
    7979                                            void *retaddr)
     
    115115   that valid value takes the whole register, why gcc after 4.3 may
    116116   use only lower part of register for smaller types. So force promoution. */
    117 DATA_TYPE_PROMOTED REGPARM 
     117DATA_TYPE_PROMOTED REGPARM
    118118glue(glue(__ld, SUFFIX), MMUSUFFIX)(target_ulong addr,
    119119                                    int mmu_idx)
     
    224224#ifndef SOFTMMU_CODE_ACCESS
    225225
    226 static void glue(glue(slow_st, SUFFIX), MMUSUFFIX)(target_ulong addr, 
    227                                                    DATA_TYPE val, 
     226static void glue(glue(slow_st, SUFFIX), MMUSUFFIX)(target_ulong addr,
     227                                                   DATA_TYPE val,
    228228                                                   int mmu_idx,
    229229                                                   void *retaddr);
    230230
    231231#ifndef VBOX
    232 static inline void glue(io_write, SUFFIX)(target_phys_addr_t physaddr, 
     232static inline void glue(io_write, SUFFIX)(target_phys_addr_t physaddr,
    233233                                          DATA_TYPE val,
    234234                                          target_ulong addr,
    235235                                          void *retaddr)
    236236#else
    237 DECLINLINE(void) glue(io_write, SUFFIX)(target_phys_addr_t physaddr, 
     237DECLINLINE(void) glue(io_write, SUFFIX)(target_phys_addr_t physaddr,
    238238                                        DATA_TYPE val,
    239239                                        target_ulong addr,
  • trunk/src/recompiler/target-i386/exec.h

    r13504 r26499  
    163163}
    164164
    165 #ifndef VBOX 
     165#ifndef VBOX
    166166static inline void stfq(target_ulong ptr, double v)
    167167#else
     
    444444{
    445445    CPU86_LDoubleU temp;
    446    
     446
    447447    temp.d = f;
    448448    stq(ptr, temp.l.lower);
     
    494494    CC_SRC = eflags & (CC_O | CC_S | CC_Z | CC_A | CC_P | CC_C);
    495495    DF = 1 - (2 * ((eflags >> 10) & 1));
    496     env->eflags = (env->eflags & ~update_mask) | 
     496    env->eflags = (env->eflags & ~update_mask) |
    497497        (eflags & update_mask);
    498498}
  • trunk/src/recompiler/target-i386/opreg_template.h

    r11982 r26499  
    22 *  i386 micro operations (templates for various register related
    33 *  operations)
    4  * 
     4 *
    55 *  Copyright (c) 2003 Fabrice Bellard
    66 *
  • trunk/src/recompiler/target-i386/ops_sse.h

    r18879 r26499  
    19891989
    19901990    if (res)
    1991 #ifndef VBOX   
     1991#ifndef VBOX
    19921992        env->regs[R_ECX] = ((ctrl & (1 << 6)) ? rffs1 : ffs1)(res) - 1;
    19931993#else
    19941994        env->regs[R_ECX] = ((ctrl & (1 << 6)) ? rffs1(res) : ffs1(res)) - 1;
    1995 #endif       
     1995#endif
    19961996    else
    19971997        env->regs[R_ECX] = 16 >> (ctrl & (1 << 0));
  • trunk/src/recompiler/target-i386/ops_template.h

    r11982 r26499  
    22 *  i386 micro operations (included several times to generate
    33 *  different operand sizes)
    4  * 
     4 *
    55 *  Copyright (c) 2003 Fabrice Bellard
    66 *
     
    249249    sf = lshift(CC_DST, 8 - DATA_BITS) & 0x80;
    250250    /* of is defined if shift count == 1 */
    251     of = lshift(CC_SRC ^ CC_DST, 12 - DATA_BITS) & CC_O; 
     251    of = lshift(CC_SRC ^ CC_DST, 12 - DATA_BITS) & CC_O;
    252252    return cf | pf | af | zf | sf | of;
    253253}
     
    512512    int count;
    513513    target_long res;
    514    
     514
    515515    res = T0 & DATA_MASK;
    516516    if (res != 0) {
  • trunk/src/recompiler/target-i386/ops_template_mem.h

    r11982 r26499  
    22 *  i386 micro operations (included several times to generate
    33 *  different operand sizes)
    4  * 
     4 *
    55 *  Copyright (c) 2003 Fabrice Bellard
    66 *
     
    9494        asm volatile("" : : "r" (T0));
    9595#endif
    96         CC_SRC = (cc_table[CC_OP].compute_all() & ~(CC_O | CC_C)) | 
    97             (lshift(src ^ T0, 11 - (DATA_BITS - 1)) & CC_O) | 
     96        CC_SRC = (cc_table[CC_OP].compute_all() & ~(CC_O | CC_C)) |
     97            (lshift(src ^ T0, 11 - (DATA_BITS - 1)) & CC_O) |
    9898            (T0 & CC_C);
    9999        CC_OP = CC_OP_EFLAGS;
     
    119119#endif
    120120        CC_SRC = (cc_table[CC_OP].compute_all() & ~(CC_O | CC_C)) |
    121             (lshift(src ^ T0, 11 - (DATA_BITS - 1)) & CC_O) | 
     121            (lshift(src ^ T0, 11 - (DATA_BITS - 1)) & CC_O) |
    122122            ((T0 >> (DATA_BITS - 1)) & CC_C);
    123123        CC_OP = CC_OP_EFLAGS;
     
    178178#endif
    179179        CC_SRC = (eflags & ~(CC_C | CC_O)) |
    180             (lshift(src ^ T0, 11 - (DATA_BITS - 1)) & CC_O) | 
     180            (lshift(src ^ T0, 11 - (DATA_BITS - 1)) & CC_O) |
    181181            ((src >> (DATA_BITS - count)) & CC_C);
    182182        CC_OP = CC_OP_EFLAGS;
     
    209209#endif
    210210        CC_SRC = (eflags & ~(CC_C | CC_O)) |
    211             (lshift(src ^ T0, 11 - (DATA_BITS - 1)) & CC_O) | 
     211            (lshift(src ^ T0, 11 - (DATA_BITS - 1)) & CC_O) |
    212212            ((src >> (count - 1)) & CC_C);
    213213        CC_OP = CC_OP_EFLAGS;
  • trunk/src/recompiler/tcg/i386/tcg-target.h

    r21292 r26499  
    4949
    5050/* used for function call generation */
    51 #define TCG_REG_CALL_STACK TCG_REG_ESP 
     51#define TCG_REG_CALL_STACK TCG_REG_ESP
    5252#define TCG_TARGET_STACK_ALIGN 16
    5353#define TCG_TARGET_CALL_STACK_OFFSET 0
  • trunk/src/recompiler/tcg/tcg-op.h

    r18083 r26499  
    117117
    118118#ifndef VBOX
    119 static inline void tcg_gen_op4(int opc, TCGv arg1, TCGv arg2, TCGv arg3, 
    120 #else /* VBOX */
    121 DECLINLINE(void) tcg_gen_op4(int opc, TCGv arg1, TCGv arg2, TCGv arg3, 
     119static inline void tcg_gen_op4(int opc, TCGv arg1, TCGv arg2, TCGv arg3,
     120#else /* VBOX */
     121DECLINLINE(void) tcg_gen_op4(int opc, TCGv arg1, TCGv arg2, TCGv arg3,
    122122#endif /* VBOX */
    123123                               TCGv arg4)
     
    131131
    132132#ifndef VBOX
    133 static inline void tcg_gen_op4i(int opc, TCGv arg1, TCGv arg2, TCGv arg3, 
    134 #else /* VBOX */
    135 DECLINLINE(void) tcg_gen_op4i(int opc, TCGv arg1, TCGv arg2, TCGv arg3, 
     133static inline void tcg_gen_op4i(int opc, TCGv arg1, TCGv arg2, TCGv arg3,
     134#else /* VBOX */
     135DECLINLINE(void) tcg_gen_op4i(int opc, TCGv arg1, TCGv arg2, TCGv arg3,
    136136#endif /* VBOX */
    137137                                TCGArg arg4)
     
    145145
    146146#ifndef VBOX
    147 static inline void tcg_gen_op4ii(int opc, TCGv arg1, TCGv arg2, TCGArg arg3, 
    148 #else /* VBOX */
    149 DECLINLINE(void) tcg_gen_op4ii(int opc, TCGv arg1, TCGv arg2, TCGArg arg3, 
     147static inline void tcg_gen_op4ii(int opc, TCGv arg1, TCGv arg2, TCGArg arg3,
     148#else /* VBOX */
     149DECLINLINE(void) tcg_gen_op4ii(int opc, TCGv arg1, TCGv arg2, TCGArg arg3,
    150150#endif /* VBOX */
    151151                                 TCGArg arg4)
     
    159159
    160160#ifndef VBOX
    161 static inline void tcg_gen_op5(int opc, TCGv arg1, TCGv arg2, 
    162 #else /* VBOX */
    163 DECLINLINE(void) tcg_gen_op5(int opc, TCGv arg1, TCGv arg2, 
     161static inline void tcg_gen_op5(int opc, TCGv arg1, TCGv arg2,
     162#else /* VBOX */
     163DECLINLINE(void) tcg_gen_op5(int opc, TCGv arg1, TCGv arg2,
    164164#endif /* VBOX */
    165165                               TCGv arg3, TCGv arg4,
     
    175175
    176176#ifndef VBOX
    177 static inline void tcg_gen_op5i(int opc, TCGv arg1, TCGv arg2, 
    178 #else /* VBOX */
    179 DECLINLINE(void) tcg_gen_op5i(int opc, TCGv arg1, TCGv arg2, 
     177static inline void tcg_gen_op5i(int opc, TCGv arg1, TCGv arg2,
     178#else /* VBOX */
     179DECLINLINE(void) tcg_gen_op5i(int opc, TCGv arg1, TCGv arg2,
    180180#endif /* VBOX */
    181181                                TCGv arg3, TCGv arg4,
     
    191191
    192192#ifndef VBOX
    193 static inline void tcg_gen_op6(int opc, TCGv arg1, TCGv arg2, 
    194 #else /* VBOX */
    195 DECLINLINE(void) tcg_gen_op6(int opc, TCGv arg1, TCGv arg2, 
     193static inline void tcg_gen_op6(int opc, TCGv arg1, TCGv arg2,
     194#else /* VBOX */
     195DECLINLINE(void) tcg_gen_op6(int opc, TCGv arg1, TCGv arg2,
    196196#endif /* VBOX */
    197197                               TCGv arg3, TCGv arg4,
     
    208208
    209209#ifndef VBOX
    210 static inline void tcg_gen_op6ii(int opc, TCGv arg1, TCGv arg2, 
    211 #else /* VBOX */
    212 DECLINLINE(void) tcg_gen_op6ii(int opc, TCGv arg1, TCGv arg2, 
     210static inline void tcg_gen_op6ii(int opc, TCGv arg1, TCGv arg2,
     211#else /* VBOX */
     212DECLINLINE(void) tcg_gen_op6ii(int opc, TCGv arg1, TCGv arg2,
    213213#endif /* VBOX */
    214214                                 TCGv arg3, TCGv arg4,
     
    272272    TCGv t0;
    273273    t0 = tcg_const_ptr((tcg_target_long)func);
    274     tcg_gen_call(&tcg_ctx, 
     274    tcg_gen_call(&tcg_ctx,
    275275                 t0, TCG_HELPER_CALL_FLAGS,
    276276                 0, NULL, 0, NULL);
     
    303303    args[1] = arg2;
    304304    t0 = tcg_const_ptr((tcg_target_long)func);
    305     tcg_gen_call(&tcg_ctx, 
     305    tcg_gen_call(&tcg_ctx,
    306306                 t0, TCG_HELPER_CALL_FLAGS,
    307307                 0, NULL, 2, args);
     
    377377
    378378#ifndef VBOX
    379 static inline void tcg_gen_helper_1_2(void *func, TCGv ret, 
    380 #else /* VBOX */
    381 DECLINLINE(void) tcg_gen_helper_1_2(void *func, TCGv ret, 
     379static inline void tcg_gen_helper_1_2(void *func, TCGv ret,
     380#else /* VBOX */
     381DECLINLINE(void) tcg_gen_helper_1_2(void *func, TCGv ret,
    382382#endif /* VBOX */
    383383                                      TCGv arg1, TCGv arg2)
     
    388388    args[1] = arg2;
    389389    t0 = tcg_const_ptr((tcg_target_long)func);
    390     tcg_gen_call(&tcg_ctx, 
     390    tcg_gen_call(&tcg_ctx,
    391391                 t0, TCG_HELPER_CALL_FLAGS,
    392392                 1, &ret, 2, args);
     
    710710
    711711#ifndef VBOX
    712 static inline void tcg_gen_brcond_i32(int cond, TCGv arg1, TCGv arg2, 
    713 #else /* VBOX */
    714 DECLINLINE(void) tcg_gen_brcond_i32(int cond, TCGv arg1, TCGv arg2, 
     712static inline void tcg_gen_brcond_i32(int cond, TCGv arg1, TCGv arg2,
     713#else /* VBOX */
     714DECLINLINE(void) tcg_gen_brcond_i32(int cond, TCGv arg1, TCGv arg2,
    715715#endif /* VBOX */
    716716                                      int label_index)
     
    720720
    721721#ifndef VBOX
    722 static inline void tcg_gen_brcondi_i32(int cond, TCGv arg1, int32_t arg2, 
    723 #else /* VBOX */
    724 DECLINLINE(void) tcg_gen_brcondi_i32(int cond, TCGv arg1, int32_t arg2, 
     722static inline void tcg_gen_brcondi_i32(int cond, TCGv arg1, int32_t arg2,
     723#else /* VBOX */
     724DECLINLINE(void) tcg_gen_brcondi_i32(int cond, TCGv arg1, int32_t arg2,
    725725#endif /* VBOX */
    726726                                       int label_index)
     
    990990#endif /* VBOX */
    991991{
    992     tcg_gen_op6(INDEX_op_add2_i32, ret, TCGV_HIGH(ret), 
     992    tcg_gen_op6(INDEX_op_add2_i32, ret, TCGV_HIGH(ret),
    993993                arg1, TCGV_HIGH(arg1), arg2, TCGV_HIGH(arg2));
    994994}
     
    10111011#endif /* VBOX */
    10121012{
    1013     tcg_gen_op6(INDEX_op_sub2_i32, ret, TCGV_HIGH(ret), 
     1013    tcg_gen_op6(INDEX_op_sub2_i32, ret, TCGV_HIGH(ret),
    10141014                arg1, TCGV_HIGH(arg1), arg2, TCGV_HIGH(arg2));
    10151015}
     
    11431143
    11441144#ifndef VBOX
    1145 static inline void tcg_gen_brcond_i64(int cond, TCGv arg1, TCGv arg2, 
    1146 #else /* VBOX */
    1147 DECLINLINE(void) tcg_gen_brcond_i64(int cond, TCGv arg1, TCGv arg2, 
     1145static inline void tcg_gen_brcond_i64(int cond, TCGv arg1, TCGv arg2,
     1146#else /* VBOX */
     1147DECLINLINE(void) tcg_gen_brcond_i64(int cond, TCGv arg1, TCGv arg2,
    11481148#endif /* VBOX */
    11491149                                      int label_index)
    11501150{
    1151     tcg_gen_op6ii(INDEX_op_brcond2_i32, 
     1151    tcg_gen_op6ii(INDEX_op_brcond2_i32,
    11521152                  arg1, TCGV_HIGH(arg1), arg2, TCGV_HIGH(arg2),
    11531153                  cond, label_index);
     
    11611161{
    11621162    TCGv t0, t1;
    1163    
     1163
    11641164    t0 = tcg_temp_new(TCG_TYPE_I64);
    11651165    t1 = tcg_temp_new(TCG_TYPE_I32);
    11661166
    11671167    tcg_gen_op4(INDEX_op_mulu2_i32, t0, TCGV_HIGH(t0), arg1, arg2);
    1168    
     1168
    11691169    tcg_gen_mul_i32(t1, arg1, TCGV_HIGH(arg2));
    11701170    tcg_gen_add_i32(TCGV_HIGH(t0), TCGV_HIGH(t0), t1);
    11711171    tcg_gen_mul_i32(t1, TCGV_HIGH(arg1), arg2);
    11721172    tcg_gen_add_i32(TCGV_HIGH(t0), TCGV_HIGH(t0), t1);
    1173    
     1173
    11741174    tcg_gen_mov_i64(ret, t0);
    11751175    tcg_temp_free(t0);
     
    15261526
    15271527#ifndef VBOX
    1528 static inline void tcg_gen_brcond_i64(int cond, TCGv arg1, TCGv arg2, 
    1529 #else /* VBOX */
    1530 DECLINLINE(void) tcg_gen_brcond_i64(int cond, TCGv arg1, TCGv arg2, 
     1528static inline void tcg_gen_brcond_i64(int cond, TCGv arg1, TCGv arg2,
     1529#else /* VBOX */
     1530DECLINLINE(void) tcg_gen_brcond_i64(int cond, TCGv arg1, TCGv arg2,
    15311531#endif /* VBOX */
    15321532                                      int label_index)
     
    16481648
    16491649#ifndef VBOX
    1650 static inline void tcg_gen_brcondi_i64(int cond, TCGv arg1, int64_t arg2, 
    1651 #else /* VBOX */
    1652 DECLINLINE(void) tcg_gen_brcondi_i64(int cond, TCGv arg1, int64_t arg2, 
     1650static inline void tcg_gen_brcondi_i64(int cond, TCGv arg1, int64_t arg2,
     1651#else /* VBOX */
     1652DECLINLINE(void) tcg_gen_brcondi_i64(int cond, TCGv arg1, int64_t arg2,
    16531653#endif /* VBOX */
    16541654                                       int label_index)
     
    17231723    t0 = tcg_temp_new(TCG_TYPE_I32);
    17241724    t1 = tcg_temp_new(TCG_TYPE_I32);
    1725    
     1725
    17261726    tcg_gen_shri_i32(t0, arg, 8);
    17271727    tcg_gen_andi_i32(t1, arg, 0x000000ff);
     
    17451745    t0 = tcg_temp_new(TCG_TYPE_I32);
    17461746    t1 = tcg_temp_new(TCG_TYPE_I32);
    1747    
     1747
    17481748    tcg_gen_shli_i32(t0, arg, 24);
    1749    
     1749
    17501750    tcg_gen_andi_i32(t1, arg, 0x0000ff00);
    17511751    tcg_gen_shli_i32(t1, t1, 8);
    17521752    tcg_gen_or_i32(t0, t0, t1);
    1753    
     1753
    17541754    tcg_gen_shri_i32(t1, arg, 8);
    17551755    tcg_gen_andi_i32(t1, t1, 0x0000ff00);
    17561756    tcg_gen_or_i32(t0, t0, t1);
    1757    
     1757
    17581758    tcg_gen_shri_i32(t1, arg, 24);
    17591759    tcg_gen_or_i32(ret, t0, t1);
     
    19861986    t0 = tcg_temp_new(TCG_TYPE_I32);
    19871987    t1 = tcg_temp_new(TCG_TYPE_I32);
    1988    
     1988
    19891989    tcg_gen_shli_i64(t0, arg, 56);
    1990    
     1990
    19911991    tcg_gen_andi_i64(t1, arg, 0x0000ff00);
    19921992    tcg_gen_shli_i64(t1, t1, 40);
    19931993    tcg_gen_or_i64(t0, t0, t1);
    1994    
     1994
    19951995    tcg_gen_andi_i64(t1, arg, 0x00ff0000);
    19961996    tcg_gen_shli_i64(t1, t1, 24);
     
    20042004    tcg_gen_andi_i64(t1, t1, 0xff000000);
    20052005    tcg_gen_or_i64(t0, t0, t1);
    2006    
     2006
    20072007    tcg_gen_shri_i64(t1, arg, 24);
    20082008    tcg_gen_andi_i64(t1, t1, 0x00ff0000);
     
    21542154    /* XXX: must really use a 32 bit size for TCGArg in all cases */
    21552155#if TARGET_LONG_BITS > TCG_TARGET_REG_BITS
    2156     tcg_gen_op2ii(INDEX_op_debug_insn_start, 
     2156    tcg_gen_op2ii(INDEX_op_debug_insn_start,
    21572157                  (uint32_t)(pc), (uint32_t)(pc >> 32));
    21582158#else
  • trunk/src/recompiler/tcg/tcg.c

    r18083 r26499  
    6767
    6868#ifdef VBOX
    69 /* 
     69/*
    7070 * Liveness analysis doesn't work well with 32-bit hosts and 64-bit targets,
    71  * second element of the register pair to store 64-bit value is consedered 
    72  * dead, it seems. 
     71 * second element of the register pair to store 64-bit value is consedered
     72 * dead, it seems.
    7373 * @todo: fix it in compiler
    7474 */
     
    7878#endif
    7979
    80 static void patch_reloc(uint8_t *code_ptr, int type, 
     80static void patch_reloc(uint8_t *code_ptr, int type,
    8181                        tcg_target_long value, tcg_target_long addend);
    8282
     
    131131/* label relocation processing */
    132132
    133 void tcg_out_reloc(TCGContext *s, uint8_t *code_ptr, int type, 
     133void tcg_out_reloc(TCGContext *s, uint8_t *code_ptr, int type,
    134134                   int label_index, long addend)
    135135{
     
    140140    if (l->has_value) {
    141141        /* FIXME: This may break relocations on RISC targets that
    142            modify instruction fields in place.  The caller may not have 
     142           modify instruction fields in place.  The caller may not have
    143143           written the initial value.  */
    144144        patch_reloc(code_ptr, type, l->u.value, addend);
     
    154154}
    155155
    156 static void tcg_out_label(TCGContext *s, int label_index, 
     156static void tcg_out_label(TCGContext *s, int label_index,
    157157                          tcg_target_long value)
    158158{
     
    194194    TCGPool *p;
    195195    int pool_size;
    196    
     196
    197197    if (size > TCG_POOL_CHUNK_SIZE) {
    198198        /* big malloc: insert a new pool (XXX: could optimize) */
     
    217217                p->size = pool_size;
    218218                p->next = NULL;
    219                 if (s->pool_current) 
     219                if (s->pool_current)
    220220                    s->pool_current->next = p;
    221221                else
     
    248248    s->temps = s->static_temps;
    249249    s->nb_globals = 0;
    250    
     250
    251251    /* Count total number of arguments and allocate the corresponding
    252252       space */
     
    269269        args_ct += n;
    270270    }
    271    
     271
    272272    tcg_target_init(s);
    273273
     
    276276    s->code_ptr = s->code_buf;
    277277    tcg_target_qemu_prologue(s);
    278     flush_icache_range((unsigned long)s->code_buf, 
     278    flush_icache_range((unsigned long)s->code_buf,
    279279                       (unsigned long)s->code_ptr);
    280280}
     
    340340#if TCG_TARGET_REG_BITS == 32
    341341/* temporary hack to avoid register shortage for tcg_qemu_st64() */
    342 TCGv tcg_global_reg2_new_hack(TCGType type, int reg1, int reg2, 
     342TCGv tcg_global_reg2_new_hack(TCGType type, int reg1, int reg2,
    343343                              const char *name)
    344344{
     
    554554}
    555555
    556 static void tcg_gen_call_internal(TCGContext *s, TCGv func, 
     556static void tcg_gen_call_internal(TCGContext *s, TCGv func,
    557557                                  unsigned int flags,
    558558                                  unsigned int nb_rets, const TCGv *rets,
    559559                                  unsigned int nb_params, const TCGv *params)
    560560{
    561 #ifndef VBOX 
     561#ifndef VBOX
    562562   int i;
    563563#else
     
    639639        }
    640640    }
    641     tcg_gen_call_internal(s, func, flags, 
     641    tcg_gen_call_internal(s, func, flags,
    642642                          nb_rets, rets, j, args2);
    643643}
     
    647647                  unsigned int nb_params, const TCGv *args1)
    648648{
    649     tcg_gen_call_internal(s, func, flags, 
     649    tcg_gen_call_internal(s, func, flags,
    650650                          nb_rets, rets, nb_params, args1);
    651651}
     
    653653
    654654#if TCG_TARGET_REG_BITS == 32
    655 void tcg_gen_shifti_i64(TCGv ret, TCGv arg1, 
     655void tcg_gen_shifti_i64(TCGv ret, TCGv arg1,
    656656                        int c, int right, int arith)
    657657{
     
    682682            if (arith)
    683683                tcg_gen_sari_i32(t1, TCGV_HIGH(arg1), c);
    684             else 
     684            else
    685685                tcg_gen_shri_i32(t1, TCGV_HIGH(arg1), c);
    686             tcg_gen_shri_i32(ret, arg1, c); 
     686            tcg_gen_shri_i32(ret, arg1, c);
    687687            tcg_gen_or_i32(ret, ret, t0);
    688688            tcg_gen_mov_i32(TCGV_HIGH(ret), t1);
     
    690690            tcg_gen_shri_i32(t0, arg1, 32 - c);
    691691            /* Note: ret can be the same as arg1, so we use t1 */
    692             tcg_gen_shli_i32(t1, arg1, c); 
     692            tcg_gen_shli_i32(t1, arg1, c);
    693693            tcg_gen_shli_i32(TCGV_HIGH(ret), TCGV_HIGH(arg1), c);
    694694            tcg_gen_or_i32(TCGV_HIGH(ret), TCGV_HIGH(ret), t0);
     
    733733        pstrcpy(buf, buf_size, ts->name);
    734734    } else {
    735         if (ts->temp_local) 
     735        if (ts->temp_local)
    736736            snprintf(buf, buf_size, "loc%d", idx - s->nb_globals);
    737737        else
     
    767767    if (unlikely(!s->helpers_sorted)) {
    768768#ifdef VBOX
    769         qemu_qsort(s->helpers, s->nb_helpers, sizeof(TCGHelperInfo), 
     769        qemu_qsort(s->helpers, s->nb_helpers, sizeof(TCGHelperInfo),
    770770              helper_cmp);
    771771#else
    772         qsort(s->helpers, s->nb_helpers, sizeof(TCGHelperInfo), 
     772        qsort(s->helpers, s->nb_helpers, sizeof(TCGHelperInfo),
    773773              helper_cmp);
    774774#endif
     
    846846            pc = args[0];
    847847#endif
    848             if (!first_insn) 
     848            if (!first_insn)
    849849                fprintf(outfile, "\n");
    850850            fprintf(outfile, " ---- 0x%" PRIx64, pc);
     
    886886                }
    887887            }
    888         } else if (c == INDEX_op_movi_i32 
     888        } else if (c == INDEX_op_movi_i32
    889889#if TCG_TARGET_REG_BITS == 64
    890890                   || c == INDEX_op_movi_i64
     
    897897            nb_iargs = def->nb_iargs;
    898898            nb_cargs = def->nb_cargs;
    899             fprintf(outfile, " %s %s,$", def->name, 
     899            fprintf(outfile, " %s %s,$", def->name,
    900900                    tcg_get_arg_str_idx(s, buf, sizeof(buf), args[0]));
    901901            val = args[1];
     
    921921                nb_cargs = def->nb_cargs;
    922922            }
    923            
     923
    924924            k = 0;
    925925            for(i = 0; i < nb_oargs; i++) {
     
    10831083/* set a nop for an operation using 'nb_args' */
    10841084#ifndef VBOX
    1085 static inline void tcg_set_nop(TCGContext *s, uint16_t *opc_ptr, 
     1085static inline void tcg_set_nop(TCGContext *s, uint16_t *opc_ptr,
    10861086#else /* VBOX */
    1087 DECLINLINE(void) tcg_set_nop(TCGContext *s, uint16_t *opc_ptr, 
     1087DECLINLINE(void) tcg_set_nop(TCGContext *s, uint16_t *opc_ptr,
    10881088#endif /* VBOX */
    10891089                               TCGArg *args, int nb_args)
     
    11441144    uint8_t *dead_temps;
    11451145    unsigned int dead_iargs;
    1146    
     1146
    11471147    gen_opc_ptr++; /* skip end */
    11481148
     
    11511151    /* XXX: make it really dynamic */
    11521152    s->op_dead_iargs = tcg_malloc(OPC_BUF_SIZE * sizeof(uint16_t));
    1153    
     1153
    11541154    dead_temps = tcg_malloc(s->nb_temps);
    11551155    memset(dead_temps, 1, s->nb_temps);
     
    11801180                            goto do_not_remove_call;
    11811181                    }
    1182                     tcg_set_nop(s, gen_opc_buf + op_index, 
     1182                    tcg_set_nop(s, gen_opc_buf + op_index,
    11831183                                args - 1, nb_args);
    11841184                } else {
     
    11901190                        dead_temps[arg] = 1;
    11911191                    }
    1192                    
     1192
    11931193                    /* globals are live (they may be used by the call) */
    11941194                    memset(dead_temps, 0, s->nb_globals);
    1195                    
     1195
    11961196                    /* input args are live */
    11971197                    dead_iargs = 0;
     
    12571257                        dead_temps[arg] = 1;
    12581258                    }
    1259                    
     1259
    12601260                    /* if end of basic block, update */
    12611261                    if (def->flags & TCG_OPF_BB_END) {
     
    12651265                        memset(dead_temps, 0, s->nb_globals);
    12661266                    }
    1267                    
     1267
    12681268                    /* input args are live */
    12691269                    dead_iargs = 0;
     
    13351335    for(i = 0; i < TCG_TARGET_NB_REGS; i++) {
    13361336        if (s->reg_to_temp[i] >= 0) {
    1337             printf("%s: %s\n", 
    1338                    tcg_target_reg_names[i], 
     1337            printf("%s: %s\n",
     1338                   tcg_target_reg_names[i],
    13391339                   tcg_get_arg_str_idx(s, buf, sizeof(buf), s->reg_to_temp[i]));
    13401340        }
     
    13541354            if (ts->val_type != TEMP_VAL_REG ||
    13551355                ts->reg != reg) {
    1356                 printf("Inconsistency for register %s:\n", 
     1356                printf("Inconsistency for register %s:\n",
    13571357                       tcg_target_reg_names[reg]);
    13581358                goto fail;
     
    13651365            !ts->fixed_reg &&
    13661366            s->reg_to_temp[ts->reg] != k) {
    1367                 printf("Inconsistency for temp %s:\n", 
     1367                printf("Inconsistency for temp %s:\n",
    13681368                       tcg_get_arg_str_idx(s, buf, sizeof(buf), k));
    13691369        fail:
     
    14041404        assert(ts->val_type == TEMP_VAL_REG);
    14051405        if (!ts->mem_coherent) {
    1406             if (!ts->mem_allocated) 
     1406            if (!ts->mem_allocated)
    14071407                temp_allocate_frame(s, temp);
    14081408            tcg_out_st(s, ts->type, reg, ts->mem_reg, ts->mem_offset);
     
    14571457            break;
    14581458        case TEMP_VAL_CONST:
    1459             reg = tcg_reg_alloc(s, tcg_target_available_regs[ts->type], 
     1459            reg = tcg_reg_alloc(s, tcg_target_available_regs[ts->type],
    14601460                                allocated_regs);
    1461             if (!ts->mem_allocated) 
     1461            if (!ts->mem_allocated)
    14621462                temp_allocate_frame(s, temp);
    14631463            tcg_out_movi(s, ts->type, reg, ts->val);
     
    15891589}
    15901590
    1591 static void tcg_reg_alloc_op(TCGContext *s, 
     1591static void tcg_reg_alloc_op(TCGContext *s,
    15921592                             const TCGOpDef *def, int opc,
    15931593                             const TCGArg *args,
     
    16061606
    16071607    /* copy constants */
    1608     memcpy(new_args + nb_oargs + nb_iargs, 
    1609            args + nb_oargs + nb_iargs, 
     1608    memcpy(new_args + nb_oargs + nb_iargs,
     1609           args + nb_oargs + nb_iargs,
    16101610           sizeof(TCGArg) * def->nb_cargs);
    16111611
    1612     /* satisfy input constraints */ 
     1612    /* satisfy input constraints */
    16131613    tcg_regset_set(allocated_regs, s->reserved_regs);
    16141614    for(k = 0; k < nb_iargs; k++) {
     
    16511651                   not dead after the instruction, we must allocate
    16521652                   a new register and move it */
    1653                 if (!IS_DEAD_IARG(i - nb_oargs)) 
     1653                if (!IS_DEAD_IARG(i - nb_oargs))
    16541654                    goto allocate_in_reg;
    16551655            }
     
    16601660        } else {
    16611661        allocate_in_reg:
    1662             /* allocate a new register matching the constraint 
     1662            /* allocate a new register matching the constraint
    16631663               and move the temporary register into it */
    16641664            reg = tcg_reg_alloc(s, arg_ct->u.regs, allocated_regs);
     
    16701670    iarg_end: ;
    16711671    }
    1672    
     1672
    16731673    if (def->flags & TCG_OPF_BB_END) {
    16741674        tcg_reg_alloc_bb_end(s, allocated_regs);
     
    16861686            }
    16871687        }
    1688        
     1688
    16891689        if (def->flags & TCG_OPF_CALL_CLOBBER) {
    1690             /* XXX: permit generic clobber register list ? */ 
     1690            /* XXX: permit generic clobber register list ? */
    16911691            for(reg = 0; reg < TCG_TARGET_NB_REGS; reg++) {
    16921692                if (tcg_regset_test_reg(tcg_target_call_clobber_regs, reg)) {
     
    16961696            /* XXX: for load/store we could do that only for the slow path
    16971697               (i.e. when a memory callback is called) */
    1698            
     1698
    16991699            /* store globals and free associated registers (we assume the insn
    17001700               can modify any global. */
    17011701            save_globals(s, allocated_regs);
    17021702        }
    1703        
     1703
    17041704        /* satisfy the output constraints */
    17051705        tcg_regset_set(allocated_regs, s->reserved_regs);
     
    17291729                /* temp value is modified, so the value kept in memory is
    17301730                   potentially not the same */
    1731                 ts->mem_coherent = 0; 
     1731                ts->mem_coherent = 0;
    17321732                s->reg_to_temp[reg] = arg;
    17331733            }
     
    17391739    /* emit instruction */
    17401740    tcg_out_op(s, opc, new_args, const_args);
    1741    
     1741
    17421742    /* move the outputs in the correct register if needed */
    17431743    for(i = 0; i < nb_oargs; i++) {
     
    17831783    /* XXX: preallocate call stack */
    17841784    call_stack_size = (nb_params - nb_regs) * sizeof(tcg_target_long);
    1785     call_stack_size = (call_stack_size + TCG_TARGET_STACK_ALIGN - 1) & 
     1785    call_stack_size = (call_stack_size + TCG_TARGET_STACK_ALIGN - 1) &
    17861786        ~(TCG_TARGET_STACK_ALIGN - 1);
    17871787    allocate_args = (call_stack_size > TCG_STATIC_CALL_ARGS_SIZE);
     
    18011801                tcg_out_st(s, ts->type, ts->reg, TCG_REG_CALL_STACK, stack_offset);
    18021802            } else if (ts->val_type == TEMP_VAL_MEM) {
    1803                 reg = tcg_reg_alloc(s, tcg_target_available_regs[ts->type], 
     1803                reg = tcg_reg_alloc(s, tcg_target_available_regs[ts->type],
    18041804                                    s->reserved_regs);
    18051805                /* XXX: not correct if reading values from the stack */
     
    18071807                tcg_out_st(s, ts->type, reg, TCG_REG_CALL_STACK, stack_offset);
    18081808            } else if (ts->val_type == TEMP_VAL_CONST) {
    1809                 reg = tcg_reg_alloc(s, tcg_target_available_regs[ts->type], 
     1809                reg = tcg_reg_alloc(s, tcg_target_available_regs[ts->type],
    18101810                                    s->reserved_regs);
    18111811                /* XXX: sign extend may be needed on some targets */
     
    18201820#endif
    18211821    }
    1822    
     1822
    18231823    /* assign input registers */
    18241824    tcg_regset_set(allocated_regs, s->reserved_regs);
     
    18441844        }
    18451845    }
    1846    
     1846
    18471847    /* assign function address */
    18481848    func_arg = args[nb_oargs + nb_iargs - 1];
     
    18771877        tcg_abort();
    18781878    }
    1879        
    1880    
     1879
     1880
    18811881    /* mark dead temporaries and free the associated registers */
    18821882    for(i = 0; i < nb_iargs; i++) {
     
    18911891        }
    18921892    }
    1893    
     1893
    18941894    /* clobber call registers */
    18951895    for(reg = 0; reg < TCG_TARGET_NB_REGS; reg++) {
     
    18981898        }
    18991899    }
    1900    
     1900
    19011901    /* store globals and free associated registers (we assume the call
    19021902       can modify any global. */
     
    19041904
    19051905    tcg_out_op(s, opc, &func_arg, &const_func_arg);
    1906    
     1906
    19071907    if (allocate_args) {
    19081908        tcg_out_addi(s, TCG_REG_CALL_STACK, STACK_DIR(call_stack_size));
     
    19241924            ts->val_type = TEMP_VAL_REG;
    19251925            ts->reg = reg;
    1926             ts->mem_coherent = 0; 
     1926            ts->mem_coherent = 0;
    19271927            s->reg_to_temp[reg] = arg;
    19281928        }
    19291929    }
    1930    
     1930
    19311931    return nb_iargs + nb_oargs + def->nb_cargs + 1;
    19321932}
     
    21142114
    21152115    /* flush instruction cache */
    2116     flush_icache_range((unsigned long)gen_code_buf, 
     2116    flush_icache_range((unsigned long)gen_code_buf,
    21172117                       (unsigned long)s->code_ptr);
    21182118    return s->code_ptr -  gen_code_buf;
     
    21382138    cpu_fprintf(f, "JIT cycles          %" PRId64 " (%0.3f s at 2.4 GHz)\n",
    21392139                tot, tot / 2.4e9);
    2140     cpu_fprintf(f, "translated TBs      %" PRId64 " (aborted=%" PRId64 " %0.1f%%)\n", 
    2141                 s->tb_count, 
     2140    cpu_fprintf(f, "translated TBs      %" PRId64 " (aborted=%" PRId64 " %0.1f%%)\n",
     2141                s->tb_count,
    21422142                s->tb_count1 - s->tb_count,
    21432143                s->tb_count1 ? (double)(s->tb_count1 - s->tb_count) / s->tb_count1 * 100.0 : 0);
    2144     cpu_fprintf(f, "avg ops/TB          %0.1f max=%d\n", 
     2144    cpu_fprintf(f, "avg ops/TB          %0.1f max=%d\n",
    21452145                s->tb_count ? (double)s->op_count / s->tb_count : 0, s->op_count_max);
    2146     cpu_fprintf(f, "old ops/total ops   %0.1f%%\n", 
     2146    cpu_fprintf(f, "old ops/total ops   %0.1f%%\n",
    21472147                s->op_count ? (double)s->old_op_count / s->op_count * 100.0 : 0);
    21482148    cpu_fprintf(f, "deleted ops/TB      %0.2f\n",
    2149                 s->tb_count ? 
     2149                s->tb_count ?
    21502150                (double)s->del_op_count / s->tb_count : 0);
    21512151    cpu_fprintf(f, "avg temps/TB        %0.2f max=%d\n",
    2152                 s->tb_count ? 
     2152                s->tb_count ?
    21532153                (double)s->temp_count / s->tb_count : 0,
    21542154                s->temp_count_max);
    2155    
    2156     cpu_fprintf(f, "cycles/op           %0.1f\n", 
     2155
     2156    cpu_fprintf(f, "cycles/op           %0.1f\n",
    21572157                s->op_count ? (double)tot / s->op_count : 0);
    2158     cpu_fprintf(f, "cycles/in byte      %0.1f\n", 
     2158    cpu_fprintf(f, "cycles/in byte      %0.1f\n",
    21592159                s->code_in_len ? (double)tot / s->code_in_len : 0);
    2160     cpu_fprintf(f, "cycles/out byte     %0.1f\n", 
     2160    cpu_fprintf(f, "cycles/out byte     %0.1f\n",
    21612161                s->code_out_len ? (double)tot / s->code_out_len : 0);
    21622162    if (tot == 0)
    21632163        tot = 1;
    2164     cpu_fprintf(f, "  gen_interm time   %0.1f%%\n", 
     2164    cpu_fprintf(f, "  gen_interm time   %0.1f%%\n",
    21652165                (double)s->interm_time / tot * 100.0);
    2166     cpu_fprintf(f, "  gen_code time     %0.1f%%\n", 
     2166    cpu_fprintf(f, "  gen_code time     %0.1f%%\n",
    21672167                (double)s->code_time / tot * 100.0);
    2168     cpu_fprintf(f, "liveness/code time  %0.1f%%\n", 
     2168    cpu_fprintf(f, "liveness/code time  %0.1f%%\n",
    21692169                (double)s->la_time / (s->code_time ? s->code_time : 1) * 100.0);
    21702170    cpu_fprintf(f, "cpu_restore count   %" PRId64 "\n",
  • trunk/src/recompiler/tcg/tcg.h

    r18083 r26499  
    7777    uint8_t *ptr;
    7878    tcg_target_long addend;
    79 } TCGRelocation; 
     79} TCGRelocation;
    8080
    8181typedef struct TCGLabel {
     
    168168   cannot raise exceptions. Hence a call to a pure function can be
    169169   safely suppressed if the return value is not used. */
    170 #define TCG_CALL_PURE           0x0010 
     170#define TCG_CALL_PURE           0x0010
    171171
    172172/* used to align parameters */
     
    230230    int nb_temps;
    231231    /* index of free temps, -1 if none */
    232     int first_free_temp[TCG_TYPE_COUNT * 2]; 
     232    int first_free_temp[TCG_TYPE_COUNT * 2];
    233233
    234234    /* goto_tb support */
     
    241241    uint16_t *op_dead_iargs; /* for each operation, each bit tells if the
    242242                                corresponding input argument is dead */
    243    
     243
    244244    /* tells in which temporary a given register is. It does not take
    245245       into account fixed registers */
     
    319319                   tcg_target_long start, tcg_target_long size);
    320320TCGv tcg_global_reg_new(TCGType type, int reg, const char *name);
    321 TCGv tcg_global_reg2_new_hack(TCGType type, int reg1, int reg2, 
     321TCGv tcg_global_reg2_new_hack(TCGType type, int reg1, int reg2,
    322322                              const char *name);
    323323TCGv tcg_global_mem_new(TCGType type, int reg, tcg_target_long offset,
     
    362362#define TCG_OPF_BB_END     0x01 /* instruction defines the end of a basic
    363363                                   block */
    364 #define TCG_OPF_CALL_CLOBBER 0x02 /* instruction clobbers call registers 
     364#define TCG_OPF_CALL_CLOBBER 0x02 /* instruction clobbers call registers
    365365                                   and potentially update globals. */
    366366#define TCG_OPF_SIDE_EFFECTS 0x04 /* instruction has side effects : it
     
    376376    int *sorted_args;
    377377} TCGOpDef;
    378        
     378
    379379typedef struct TCGTargetOpDef {
    380380    int op;
     
    413413                  unsigned int nb_rets, const TCGv *rets,
    414414                  unsigned int nb_params, const TCGv *args1);
    415 void tcg_gen_shifti_i64(TCGv ret, TCGv arg1, 
     415void tcg_gen_shifti_i64(TCGv ret, TCGv arg1,
    416416                        int c, int right, int arith);
    417417
     
    436436#endif
    437437
    438 void tcg_out_reloc(TCGContext *s, uint8_t *code_ptr, int type, 
     438void tcg_out_reloc(TCGContext *s, uint8_t *code_ptr, int type,
    439439                   int label_index, long addend);
    440440const TCGArg *tcg_gen_code_op(TCGContext *s, int opc, const TCGArg *args1,
     
    465465#if defined(VBOX) && defined(GCC_WITH_BUGGY_REGPARM)
    466466#define tcg_qemu_tb_exec(tb_ptr, ret)        \
    467     __asm__ __volatile__("call *%%ecx" : "=a"(ret) : "a"(tb_ptr), "c" (&code_gen_prologue[0]) : "memory", "%edx", "cc") 
     467    __asm__ __volatile__("call *%%ecx" : "=a"(ret) : "a"(tb_ptr), "c" (&code_gen_prologue[0]) : "memory", "%edx", "cc")
    468468#else
    469469#define tcg_qemu_tb_exec(tb_ptr) ((long REGPARM (*)(void *))code_gen_prologue)(tb_ptr)
  • trunk/src/recompiler/tcg/x86_64/tcg-target.c

    r21292 r26499  
    8080
    8181static const int tcg_target_call_oarg_regs[2] = {
    82     TCG_REG_RAX, 
    83     TCG_REG_RDX 
     82    TCG_REG_RAX,
     83    TCG_REG_RDX
    8484};
    8585
    8686static uint8_t *tb_ret_addr;
    8787
    88 static void patch_reloc(uint8_t *code_ptr, int type, 
     88static void patch_reloc(uint8_t *code_ptr, int type,
    8989                        tcg_target_long value, tcg_target_long addend)
    9090{
     
    227227#define P_REXW  0x200 /* set rex.w = 1 */
    228228#define P_REXB  0x400 /* force rex use for byte registers */
    229                                  
     229
    230230static const uint8_t tcg_cond_to_jcc[10] = {
    231231    [TCG_COND_EQ] = JCC_JE,
     
    244244{
    245245    int rex;
    246     rex = ((opc >> 6) & 0x8) | ((r >> 1) & 0x4) | 
     246    rex = ((opc >> 6) & 0x8) | ((r >> 1) & 0x4) |
    247247        ((x >> 2) & 2) | ((rm >> 3) & 1);
    248248    if (rex || (opc & P_REXB)) {
     
    272272
    273273/* rm < 0 means no register index plus (-rm - 1 immediate bytes) */
    274 static inline void tcg_out_modrm_offset(TCGContext *s, int opc, int r, int rm, 
     274static inline void tcg_out_modrm_offset(TCGContext *s, int opc, int r, int rm,
    275275                                        tcg_target_long offset)
    276276{
     
    321321#if defined(CONFIG_SOFTMMU)
    322322/* XXX: incomplete. index must be different from ESP */
    323 static void tcg_out_modrm_offset2(TCGContext *s, int opc, int r, int rm, 
     323static void tcg_out_modrm_offset2(TCGContext *s, int opc, int r, int rm,
    324324                                  int index, int shift,
    325325                                  tcg_target_long offset)
     
    363363}
    364364
    365 static inline void tcg_out_movi(TCGContext *s, TCGType type, 
     365static inline void tcg_out_movi(TCGContext *s, TCGType type,
    366366                                int ret, tcg_target_long arg)
    367367{
     
    451451    int32_t val, val1;
    452452    TCGLabel *l = &s->labels[label_index];
    453    
     453
    454454    if (l->has_value) {
    455455        val = l->u.value - (tcg_target_long)s->code_ptr;
     
    483483}
    484484
    485 static void tcg_out_brcond(TCGContext *s, int cond, 
     485static void tcg_out_brcond(TCGContext *s, int cond,
    486486                           TCGArg arg1, TCGArg arg2, int const_arg2,
    487487                           int label_index, int rexw)
     
    510510     if ((val >> 32) != 0)
    511511     {
    512          tcg_out8(s, 0xc7); /* mov imm32, 4(%rsp) */ 
    513          tcg_out8(s, 0x44); 
     512         tcg_out8(s, 0xc7); /* mov imm32, 4(%rsp) */
     513         tcg_out8(s, 0x44);
    514514         tcg_out8(s, 0x24);
    515515         tcg_out8(s, 0x04);
     
    518518}
    519519
    520 DECLINLINE(void) tcg_out_long_call(TCGContext *s, tcg_target_long dst) 
     520DECLINLINE(void) tcg_out_long_call(TCGContext *s, tcg_target_long dst)
    521521{
    522522    intptr_t disp = dst - (tcg_target_long)s->code_ptr - 5;
     
    561561        return;
    562562    }
    563    
     563
    564564    disp = dst - (tcg_target_long)s->code_ptr - 5;
    565565    if (disp < 2LL * _1G && disp > -2LL * _1G)
     
    577577    tcg_out8(s, 0xe0);
    578578#endif
    579 } 
     579}
    580580#endif
    581581
     
    619619
    620620static void tcg_out_vbox_phys_read(TCGContext *s, int index, int addr_reg, int data_reg) {
    621     if (addr_reg != TCG_REG_RDI) 
     621    if (addr_reg != TCG_REG_RDI)
    622622        /* mov addr_reg, %rdi */
    623623        tcg_out_modrm(s, 0x8b |  P_REXW, TCG_REG_RDI, addr_reg);
    624    
     624
    625625    tcg_out_long_call(s, (tcg_target_long)vbox_ld_helpers[index]);
    626626    /* mov %rax, data_reg*/
     
    629629
    630630static void tcg_out_vbox_phys_write(TCGContext *s, int index, int addr_reg, int val_reg) {
    631     if (addr_reg != TCG_REG_RDI) 
     631    if (addr_reg != TCG_REG_RDI)
    632632        /* mov addr_reg, %rdi */
    633633        tcg_out_modrm(s, 0x8b |  P_REXW, TCG_REG_RDI, addr_reg);
    634     if (val_reg != TCG_REG_RSI) 
     634    if (val_reg != TCG_REG_RSI)
    635635        /* mov addr_reg, %rsi */
    636636        tcg_out_modrm(s, 0x8b | P_REXW, TCG_REG_RSI, val_reg);
     
    667667    /* mov */
    668668    tcg_out_modrm(s, 0x8b | rexw, r0, addr_reg);
    669  
     669
    670670    tcg_out_modrm(s, 0xc1 | rexw, 5, r1); /* shr $x, r1 */
    671     tcg_out8(s, TARGET_PAGE_BITS - CPU_TLB_ENTRY_BITS); 
    672    
     671    tcg_out8(s, TARGET_PAGE_BITS - CPU_TLB_ENTRY_BITS);
     672
    673673    tcg_out_modrm(s, 0x81 | rexw, 4, r0); /* andl $x, r0 */
    674674    tcg_out32(s, TARGET_PAGE_MASK | ((1 << s_bits) - 1));
    675    
     675
    676676    tcg_out_modrm(s, 0x81, 4, r1); /* andl $x, r1 */
    677677    tcg_out32(s, (CPU_TLB_SIZE - 1) << CPU_TLB_ENTRY_BITS);
     
    683683    /* cmp 0(r1), r0 */
    684684    tcg_out_modrm_offset(s, 0x3b | rexw, r0, r1, 0);
    685    
     685
    686686    /* mov */
    687687    tcg_out_modrm(s, 0x8b | rexw, r0, addr_reg);
    688    
     688
    689689    /* je label1 */
    690690    tcg_out8(s, 0x70 + JCC_JE);
     
    696696#ifndef VBOX
    697697    tcg_out8(s, 0xe8);
    698     tcg_out32(s, (tcg_target_long)qemu_ld_helpers[s_bits] - 
     698    tcg_out32(s, (tcg_target_long)qemu_ld_helpers[s_bits] -
    699699              (tcg_target_long)s->code_ptr - 4);
    700700#else
     
    731731    label2_ptr = s->code_ptr;
    732732    s->code_ptr++;
    733    
     733
    734734    /* label1: */
    735735    *label1_ptr = s->code_ptr - label1_ptr - 1;
    736736
    737737    /* add x(r1), r0 */
    738     tcg_out_modrm_offset(s, 0x03 | P_REXW, r0, r1, offsetof(CPUTLBEntry, addend) - 
     738    tcg_out_modrm_offset(s, 0x03 | P_REXW, r0, r1, offsetof(CPUTLBEntry, addend) -
    739739                         offsetof(CPUTLBEntry, addr_read));
    740740#else
    741741    r0 = addr_reg;
    742 #endif   
     742#endif
    743743
    744744#if !defined(VBOX) || !defined(REM_PHYS_ADDR_IN_TLB)
     
    764764        if (bswap) {
    765765            /* rolw $8, data_reg */
    766             tcg_out8(s, 0x66); 
     766            tcg_out8(s, 0x66);
    767767            tcg_out_modrm(s, 0xc1, 0, data_reg);
    768768            tcg_out8(s, 8);
     
    774774            tcg_out_modrm_offset(s, 0xb7 | P_EXT, data_reg, r0, 0);
    775775            /* rolw $8, data_reg */
    776             tcg_out8(s, 0x66); 
     776            tcg_out8(s, 0x66);
    777777            tcg_out_modrm(s, 0xc1, 0, data_reg);
    778778            tcg_out8(s, 8);
     
    855855    /* mov */
    856856    tcg_out_modrm(s, 0x8b | rexw, r0, addr_reg);
    857  
     857
    858858    tcg_out_modrm(s, 0xc1 | rexw, 5, r1); /* shr $x, r1 */
    859     tcg_out8(s, TARGET_PAGE_BITS - CPU_TLB_ENTRY_BITS); 
    860    
     859    tcg_out8(s, TARGET_PAGE_BITS - CPU_TLB_ENTRY_BITS);
     860
    861861    tcg_out_modrm(s, 0x81 | rexw, 4, r0); /* andl $x, r0 */
    862862    tcg_out32(s, TARGET_PAGE_MASK | ((1 << s_bits) - 1));
    863    
     863
    864864    tcg_out_modrm(s, 0x81, 4, r1); /* andl $x, r1 */
    865865    tcg_out32(s, (CPU_TLB_SIZE - 1) << CPU_TLB_ENTRY_BITS);
     
    871871    /* cmp 0(r1), r0 */
    872872    tcg_out_modrm_offset(s, 0x3b | rexw, r0, r1, 0);
    873    
     873
    874874    /* mov */
    875875    tcg_out_modrm(s, 0x8b | rexw, r0, addr_reg);
    876    
     876
    877877    /* je label1 */
    878878    tcg_out8(s, 0x70 + JCC_JE);
     
    902902#ifndef VBOX
    903903    tcg_out8(s, 0xe8);
    904     tcg_out32(s, (tcg_target_long)qemu_st_helpers[s_bits] - 
     904    tcg_out32(s, (tcg_target_long)qemu_st_helpers[s_bits] -
    905905              (tcg_target_long)s->code_ptr - 4);
    906906#else
     
    912912    label2_ptr = s->code_ptr;
    913913    s->code_ptr++;
    914    
     914
    915915    /* label1: */
    916916    *label1_ptr = s->code_ptr - label1_ptr - 1;
    917917
    918918    /* add x(r1), r0 */
    919     tcg_out_modrm_offset(s, 0x03 | P_REXW, r0, r1, offsetof(CPUTLBEntry, addend) - 
     919    tcg_out_modrm_offset(s, 0x03 | P_REXW, r0, r1, offsetof(CPUTLBEntry, addend) -
    920920                         offsetof(CPUTLBEntry, addr_write));
    921921#else
     
    983983{
    984984    int c;
    985    
     985
    986986    switch(opc) {
    987987    case INDEX_op_exit_tb:
     
    10041004            /* jmp Ev */
    10051005#ifndef VBOX
    1006             tcg_out_modrm_offset(s, 0xff, 4, -1, 
    1007                                  (tcg_target_long)(s->tb_next + 
     1006            tcg_out_modrm_offset(s, 0xff, 4, -1,
     1007                                 (tcg_target_long)(s->tb_next +
    10081008                                                   args[0]));
    10091009#else
    10101010            /* @todo: can we clobber RAX here? */
    1011             tcg_out_movi(s, TCG_TYPE_I64, TCG_REG_RAX, 
     1011            tcg_out_movi(s, TCG_TYPE_I64, TCG_REG_RAX,
    10121012                         (tcg_target_long)&(s->tb_next[args[0]]));
    10131013            tcg_out8(s, 0xff); tcg_out8(s, 0x20 | TCG_REG_RAX); /* jmp *(%rax) */
     
    10841084        tcg_out_modrm_offset(s, 0x8b | P_REXW, args[0], args[1], args[2]);
    10851085        break;
    1086        
     1086
    10871087    case INDEX_op_st8_i32:
    10881088    case INDEX_op_st8_i64:
     
    12131213        c = SHIFT_SAR;
    12141214        goto gen_shift32;
    1215        
     1215
    12161216    case INDEX_op_shl_i64:
    12171217        c = SHIFT_SHL;
     
    12341234        c = SHIFT_SAR;
    12351235        goto gen_shift64;
    1236        
     1236
    12371237    case INDEX_op_brcond_i32:
    1238         tcg_out_brcond(s, args[2], args[0], args[1], const_args[1], 
     1238        tcg_out_brcond(s, args[2], args[0], args[1], const_args[1],
    12391239                       args[3], 0);
    12401240        break;
    12411241    case INDEX_op_brcond_i64:
    1242         tcg_out_brcond(s, args[2], args[0], args[1], const_args[1], 
     1242        tcg_out_brcond(s, args[2], args[0], args[1], const_args[1],
    12431243                       args[3], P_REXW);
    12441244        break;
     
    12951295        tcg_out_qemu_ld(s, args, 3);
    12961296        break;
    1297        
     1297
    12981298    case INDEX_op_qemu_st8:
    12991299        tcg_out_qemu_st(s, args, 0);
     
    13381338    push_size = 8 + ARRAY_SIZE(tcg_target_callee_save_regs) * 8;
    13391339    frame_size = push_size + TCG_STATIC_CALL_ARGS_SIZE;
    1340     frame_size = (frame_size + TCG_TARGET_STACK_ALIGN - 1) & 
     1340    frame_size = (frame_size + TCG_TARGET_STACK_ALIGN - 1) &
    13411341        ~(TCG_TARGET_STACK_ALIGN - 1);
    13421342    stack_addend = frame_size - push_size;
     
    13441344
    13451345    tcg_out_modrm(s, 0xff, 4, TCG_REG_RDI); /* jmp *%rdi */
    1346    
     1346
    13471347    /* TB epilogue */
    13481348    tb_ret_addr = s->code_ptr;
     
    14531453    tcg_regset_set32(tcg_target_available_regs[TCG_TYPE_I64], 0, 0xffff);
    14541454    tcg_regset_set32(tcg_target_call_clobber_regs, 0,
    1455                      (1 << TCG_REG_RDI) | 
    1456                      (1 << TCG_REG_RSI) | 
     1455                     (1 << TCG_REG_RDI) |
     1456                     (1 << TCG_REG_RSI) |
    14571457                     (1 << TCG_REG_RDX) |
    14581458                     (1 << TCG_REG_RCX) |
     
    14621462                     (1 << TCG_REG_R10) |
    14631463                     (1 << TCG_REG_R11));
    1464    
     1464
    14651465    tcg_regset_clear(s->reserved_regs);
    14661466    tcg_regset_set_reg(s->reserved_regs, TCG_REG_RSP);
  • trunk/src/recompiler/tcg/x86_64/tcg-target.h

    r21292 r26499  
    6060
    6161/* used for function call generation */
    62 #define TCG_REG_CALL_STACK TCG_REG_RSP 
     62#define TCG_REG_CALL_STACK TCG_REG_RSP
    6363#define TCG_TARGET_STACK_ALIGN 16
    6464#define TCG_TARGET_CALL_STACK_OFFSET 0
  • trunk/src/recompiler/vl.h

    r13370 r26499  
    11/*
    22 * QEMU System Emulator header
    3  * 
     3 *
    44 * Copyright (c) 2003 Fabrice Bellard
    5  * 
     5 *
    66 * Permission is hereby granted, free of charge, to any person obtaining a copy
    77 * of this software and associated documentation files (the "Software"), to deal
     
    5454
    5555#ifdef _WIN32
    56 #ifndef VBOX 
     56#ifndef VBOX
    5757#include <windows.h>
    5858#define fsync _commit
     
    250250typedef void IOHandler(void *opaque);
    251251
    252 int qemu_set_fd_handler2(int fd, 
    253                          IOCanRWHandler *fd_read_poll, 
    254                          IOHandler *fd_read, 
    255                          IOHandler *fd_write, 
     252int qemu_set_fd_handler2(int fd,
     253                         IOCanRWHandler *fd_read_poll,
     254                         IOHandler *fd_read,
     255                         IOHandler *fd_write,
    256256                         void *opaque);
    257257int qemu_set_fd_handler(int fd,
    258                         IOHandler *fd_read, 
     258                        IOHandler *fd_read,
    259259                        IOHandler *fd_write,
    260260                        void *opaque);
     
    321321int qemu_chr_write(CharDriverState *s, const uint8_t *buf, int len);
    322322void qemu_chr_send_event(CharDriverState *s, int event);
    323 void qemu_chr_add_handlers(CharDriverState *s, 
    324                            IOCanRWHandler *fd_can_read, 
     323void qemu_chr_add_handlers(CharDriverState *s,
     324                           IOCanRWHandler *fd_can_read,
    325325                           IOReadHandler *fd_read,
    326326                           IOEventHandler *fd_event,
     
    520520typedef int LoadStateHandler(QEMUFile *f, void *opaque, int version_id);
    521521
    522 int register_savevm(const char *idstr, 
    523                     int instance_id, 
     522int register_savevm(const char *idstr,
     523                    int instance_id,
    524524                    int version_id,
    525525                    SaveStateHandler *save_state,
     
    564564typedef struct BlockDriverInfo {
    565565    /* in bytes, 0 if irrelevant */
    566     int cluster_size; 
     566    int cluster_size;
    567567    /* offset at which the VM state can be saved (0 if not possible) */
    568     int64_t vm_state_offset; 
     568    int64_t vm_state_offset;
    569569} BlockDriverInfo;
    570570
     
    592592void bdrv_init(void);
    593593BlockDriver *bdrv_find_format(const char *format_name);
    594 int bdrv_create(BlockDriver *drv, 
     594int bdrv_create(BlockDriver *drv,
    595595                const char *filename, int64_t size_in_sectors,
    596596                const char *backing_file, int flags);
     
    602602               BlockDriver *drv);
    603603void bdrv_close(BlockDriverState *bs);
    604 int bdrv_read(BlockDriverState *bs, int64_t sector_num, 
     604int bdrv_read(BlockDriverState *bs, int64_t sector_num,
    605605              uint8_t *buf, int nb_sectors);
    606 int bdrv_write(BlockDriverState *bs, int64_t sector_num, 
     606int bdrv_write(BlockDriverState *bs, int64_t sector_num,
    607607               const uint8_t *buf, int nb_sectors);
    608 int bdrv_pread(BlockDriverState *bs, int64_t offset, 
     608int bdrv_pread(BlockDriverState *bs, int64_t offset,
    609609               void *buf, int count);
    610 int bdrv_pwrite(BlockDriverState *bs, int64_t offset, 
     610int bdrv_pwrite(BlockDriverState *bs, int64_t offset,
    611611                const void *buf, int count);
    612612int bdrv_truncate(BlockDriverState *bs, int64_t offset);
     
    646646#define BIOS_ATA_TRANSLATION_RECHS  4
    647647
    648 void bdrv_set_geometry_hint(BlockDriverState *bs, 
     648void bdrv_set_geometry_hint(BlockDriverState *bs,
    649649                            int cyls, int heads, int secs);
    650650void bdrv_set_type_hint(BlockDriverState *bs, int type);
    651651void bdrv_set_translation_hint(BlockDriverState *bs, int translation);
    652 void bdrv_get_geometry_hint(BlockDriverState *bs, 
     652void bdrv_get_geometry_hint(BlockDriverState *bs,
    653653                            int *pcyls, int *pheads, int *psecs);
    654654int bdrv_get_type_hint(BlockDriverState *bs);
     
    661661void bdrv_set_locked(BlockDriverState *bs, int locked);
    662662void bdrv_eject(BlockDriverState *bs, int eject_flag);
    663 void bdrv_set_change_cb(BlockDriverState *bs, 
     663void bdrv_set_change_cb(BlockDriverState *bs,
    664664                        void (*change_cb)(void *opaque), void *opaque);
    665665void bdrv_get_format(BlockDriverState *bs, char *buf, int buf_size);
     
    669669int bdrv_is_encrypted(BlockDriverState *bs);
    670670int bdrv_set_key(BlockDriverState *bs, const char *key);
    671 void bdrv_iterate_format(void (*it)(void *opaque, const char *name), 
     671void bdrv_iterate_format(void (*it)(void *opaque, const char *name),
    672672                         void *opaque);
    673673const char *bdrv_get_device_name(BlockDriverState *bs);
    674 int bdrv_write_compressed(BlockDriverState *bs, int64_t sector_num, 
     674int bdrv_write_compressed(BlockDriverState *bs, int64_t sector_num,
    675675                          const uint8_t *buf, int nb_sectors);
    676676int bdrv_get_info(BlockDriverState *bs, BlockDriverInfo *bdi);
    677677
    678 void bdrv_get_backing_filename(BlockDriverState *bs, 
     678void bdrv_get_backing_filename(BlockDriverState *bs,
    679679                               char *filename, int filename_size);
    680 int bdrv_snapshot_create(BlockDriverState *bs, 
     680int bdrv_snapshot_create(BlockDriverState *bs,
    681681                         QEMUSnapshotInfo *sn_info);
    682 int bdrv_snapshot_goto(BlockDriverState *bs, 
     682int bdrv_snapshot_goto(BlockDriverState *bs,
    683683                       const char *snapshot_id);
    684684int bdrv_snapshot_delete(BlockDriverState *bs, const char *snapshot_id);
    685 int bdrv_snapshot_list(BlockDriverState *bs, 
     685int bdrv_snapshot_list(BlockDriverState *bs,
    686686                       QEMUSnapshotInfo **psn_info);
    687687char *bdrv_snapshot_dump(char *buf, int buf_size, QEMUSnapshotInfo *sn);
     
    695695#ifndef QEMU_TOOL
    696696
    697 typedef void QEMUMachineInitFunc(int ram_size, int vga_ram_size, 
     697typedef void QEMUMachineInitFunc(int ram_size, int vga_ram_size,
    698698                                 int boot_device,
    699699             DisplayState *ds, const char **fd_filename, int snapshot,
     
    720720typedef uint32_t (IOPortReadFunc)(void *opaque, uint32_t address);
    721721
    722 int register_ioport_read(int start, int length, int size, 
     722int register_ioport_read(int start, int length, int size,
    723723                         IOPortReadFunc *func, void *opaque);
    724 int register_ioport_write(int start, int length, int size, 
     724int register_ioport_write(int start, int length, int size,
    725725                          IOPortWriteFunc *func, void *opaque);
    726726void isa_unassign_ioport(int start, int length);
     
    735735typedef struct PCIDevice PCIDevice;
    736736
    737 typedef void PCIConfigWriteFunc(PCIDevice *pci_dev, 
     737typedef void PCIConfigWriteFunc(PCIDevice *pci_dev,
    738738                                uint32_t address, uint32_t data, int len);
    739 typedef uint32_t PCIConfigReadFunc(PCIDevice *pci_dev, 
     739typedef uint32_t PCIConfigReadFunc(PCIDevice *pci_dev,
    740740                                   uint32_t address, int len);
    741 typedef void PCIMapIORegionFunc(PCIDevice *pci_dev, int region_num, 
     741typedef void PCIMapIORegionFunc(PCIDevice *pci_dev, int region_num,
    742742                                uint32_t addr, uint32_t size, int type);
    743743
     
    778778    char name[64];
    779779    PCIIORegion io_regions[PCI_NUM_REGIONS];
    780    
     780
    781781    /* do not access the following fields */
    782782    PCIConfigReadFunc *config_read;
     
    791791PCIDevice *pci_register_device(PCIBus *bus, const char *name,
    792792                               int instance_size, int devfn,
    793                                PCIConfigReadFunc *config_read, 
     793                               PCIConfigReadFunc *config_read,
    794794                               PCIConfigWriteFunc *config_write);
    795795
    796 void pci_register_io_region(PCIDevice *pci_dev, int region_num, 
    797                             uint32_t size, int type, 
     796void pci_register_io_region(PCIDevice *pci_dev, int region_num,
     797                            uint32_t size, int type,
    798798                            PCIMapIORegionFunc *map_func);
    799799
    800800void pci_set_irq(PCIDevice *pci_dev, int irq_num, int level);
    801801
    802 uint32_t pci_default_read_config(PCIDevice *d, 
     802uint32_t pci_default_read_config(PCIDevice *d,
    803803                                 uint32_t address, int len);
    804 void pci_default_write_config(PCIDevice *d, 
     804void pci_default_write_config(PCIDevice *d,
    805805                              uint32_t address, uint32_t val, int len);
    806806void pci_device_save(PCIDevice *s, QEMUFile *f);
     
    903903}
    904904
    905 int isa_vga_init(DisplayState *ds, uint8_t *vga_ram_base, 
     905int isa_vga_init(DisplayState *ds, uint8_t *vga_ram_base,
    906906                 unsigned long vga_ram_offset, int vga_ram_size);
    907 int pci_vga_init(PCIBus *bus, DisplayState *ds, uint8_t *vga_ram_base, 
     907int pci_vga_init(PCIBus *bus, DisplayState *ds, uint8_t *vga_ram_base,
    908908                 unsigned long vga_ram_offset, int vga_ram_size,
    909909                 unsigned long vga_bios_offset, int vga_bios_size);
    910910
    911911/* cirrus_vga.c */
    912 void pci_cirrus_vga_init(PCIBus *bus, DisplayState *ds, uint8_t *vga_ram_base, 
     912void pci_cirrus_vga_init(PCIBus *bus, DisplayState *ds, uint8_t *vga_ram_base,
    913913                         unsigned long vga_ram_offset, int vga_ram_size);
    914 void isa_cirrus_vga_init(DisplayState *ds, uint8_t *vga_ram_base, 
     914void isa_cirrus_vga_init(DisplayState *ds, uint8_t *vga_ram_base,
    915915                         unsigned long vga_ram_offset, int vga_ram_size);
    916916
     
    975975typedef struct fdctrl_t fdctrl_t;
    976976
    977 fdctrl_t *fdctrl_init (int irq_lvl, int dma_chann, int mem_mapped, 
     977fdctrl_t *fdctrl_init (int irq_lvl, int dma_chann, int mem_mapped,
    978978                       uint32_t io_base,
    979979                       BlockDriverState **fds);
     
    11711171                       void *intctl);
    11721172void ledma_set_irq(void *opaque, int isr);
    1173 void ledma_memory_read(void *opaque, target_phys_addr_t addr, 
     1173void ledma_memory_read(void *opaque, target_phys_addr_t addr,
    11741174                       uint8_t *buf, int len, int do_bswap);
    1175 void ledma_memory_write(void *opaque, target_phys_addr_t addr, 
     1175void ledma_memory_write(void *opaque, target_phys_addr_t addr,
    11761176                        uint8_t *buf, int len, int do_bswap);
    11771177void espdma_raise_irq(void *opaque);
     
    12431243int adb_poll(ADBBusState *s, uint8_t *buf_out);
    12441244
    1245 ADBDevice *adb_register_device(ADBBusState *s, int devaddr, 
    1246                                ADBDeviceRequest *devreq, 
    1247                                ADBDeviceReset *devreset, 
     1245ADBDevice *adb_register_device(ADBBusState *s, int devaddr,
     1246                               ADBDeviceRequest *devreq,
     1247                               ADBDeviceReset *devreset,
    12481248                               void *opaque);
    12491249void adb_kbd_init(ADBBusState *bus);
     
    13791379                           BlockDriverState *bs,
    13801380                           target_ulong sector_len, int nb_blocs, int width,
    1381                            uint16_t id0, uint16_t id1, 
     1381                           uint16_t id0, uint16_t id1,
    13821382                           uint16_t id2, uint16_t id3);
    13831383
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