Revision e4d5434c tcg/x86_64/tcg-target.c

b/tcg/x86_64/tcg-target.c
356 356
    }
357 357
}
358 358

  
359
static inline void tcg_out_ld(TCGContext *s, int ret, 
359
static inline void tcg_out_ld(TCGContext *s, TCGType type, int ret,
360 360
                              int arg1, tcg_target_long arg2)
361 361
{
362
    tcg_out_modrm_offset(s, 0x8b | P_REXW, ret, arg1, arg2); /* movq */
362
    if (type == TCG_TYPE_I32)
363
        tcg_out_modrm_offset(s, 0x8b, ret, arg1, arg2); /* movl */
364
    else
365
        tcg_out_modrm_offset(s, 0x8b | P_REXW, ret, arg1, arg2); /* movq */
363 366
}
364 367

  
365
static inline void tcg_out_st(TCGContext *s, int arg, 
368
static inline void tcg_out_st(TCGContext *s, TCGType type, int arg,
366 369
                              int arg1, tcg_target_long arg2)
367 370
{
368
    tcg_out_modrm_offset(s, 0x89 | P_REXW, arg, arg1, arg2); /* movq */
371
    if (type == TCG_TYPE_I32)
372
        tcg_out_modrm_offset(s, 0x89, arg, arg1, arg2); /* movl */
373
    else
374
        tcg_out_modrm_offset(s, 0x89 | P_REXW, arg, arg1, arg2); /* movq */
369 375
}
370 376

  
371 377
static inline void tgen_arithi32(TCGContext *s, int c, int r0, int32_t val)

Also available in: Unified diff