Revision b7fa9214 target-arm/translate.c

b/target-arm/translate.c
980 980
#define VFP_GEN_ITOF(name) \
981 981
static inline void gen_vfp_##name(int dp, int neon) \
982 982
{ \
983
    TCGv statusptr = tcg_temp_new_i32(); \
983
    TCGv_ptr statusptr = tcg_temp_new_ptr(); \
984 984
    int offset; \
985 985
    if (neon) { \
986 986
        offset = offsetof(CPUState, vfp.standard_fp_status); \
987 987
    } else { \
988 988
        offset = offsetof(CPUState, vfp.fp_status); \
989 989
    } \
990
    tcg_gen_addi_i32(statusptr, cpu_env, offset); \
990
    tcg_gen_addi_ptr(statusptr, cpu_env, offset); \
991 991
    if (dp) { \
992 992
        gen_helper_vfp_##name##d(cpu_F0d, cpu_F0s, statusptr); \
993 993
    } else { \
994 994
        gen_helper_vfp_##name##s(cpu_F0s, cpu_F0s, statusptr); \
995 995
    } \
996
    tcg_temp_free_i32(statusptr); \
996
    tcg_temp_free_ptr(statusptr); \
997 997
}
998 998

  
999 999
VFP_GEN_ITOF(uito)
......
1003 1003
#define VFP_GEN_FTOI(name) \
1004 1004
static inline void gen_vfp_##name(int dp, int neon) \
1005 1005
{ \
1006
    TCGv statusptr = tcg_temp_new_i32(); \
1006
    TCGv_ptr statusptr = tcg_temp_new_ptr(); \
1007 1007
    int offset; \
1008 1008
    if (neon) { \
1009 1009
        offset = offsetof(CPUState, vfp.standard_fp_status); \
1010 1010
    } else { \
1011 1011
        offset = offsetof(CPUState, vfp.fp_status); \
1012 1012
    } \
1013
    tcg_gen_addi_i32(statusptr, cpu_env, offset); \
1013
    tcg_gen_addi_ptr(statusptr, cpu_env, offset); \
1014 1014
    if (dp) { \
1015 1015
        gen_helper_vfp_##name##d(cpu_F0s, cpu_F0d, statusptr); \
1016 1016
    } else { \
1017 1017
        gen_helper_vfp_##name##s(cpu_F0s, cpu_F0s, statusptr); \
1018 1018
    } \
1019
    tcg_temp_free_i32(statusptr); \
1019
    tcg_temp_free_ptr(statusptr); \
1020 1020
}
1021 1021

  
1022 1022
VFP_GEN_FTOI(toui)
......
1029 1029
static inline void gen_vfp_##name(int dp, int shift, int neon) \
1030 1030
{ \
1031 1031
    TCGv tmp_shift = tcg_const_i32(shift); \
1032
    TCGv statusptr = tcg_temp_new_i32(); \
1032
    TCGv_ptr statusptr = tcg_temp_new_ptr(); \
1033 1033
    int offset; \
1034 1034
    if (neon) { \
1035 1035
        offset = offsetof(CPUState, vfp.standard_fp_status); \
1036 1036
    } else { \
1037 1037
        offset = offsetof(CPUState, vfp.fp_status); \
1038 1038
    } \
1039
    tcg_gen_addi_i32(statusptr, cpu_env, offset); \
1039
    tcg_gen_addi_ptr(statusptr, cpu_env, offset); \
1040 1040
    if (dp) { \
1041 1041
        gen_helper_vfp_##name##d(cpu_F0d, cpu_F0d, tmp_shift, statusptr); \
1042 1042
    } else { \
1043 1043
        gen_helper_vfp_##name##s(cpu_F0s, cpu_F0s, tmp_shift, statusptr); \
1044 1044
    } \
1045 1045
    tcg_temp_free_i32(tmp_shift); \
1046
    tcg_temp_free_i32(statusptr); \
1046
    tcg_temp_free_ptr(statusptr); \
1047 1047
}
1048 1048
VFP_GEN_FIX(tosh)
1049 1049
VFP_GEN_FIX(tosl)

Also available in: Unified diff