Revision 18fba28c target-ppc/op.c

b/target-ppc/op.c
147 147
    } else {
148 148
        tmp = 0x02;
149 149
    }
150
    env->crf[0] = tmp;
151
    RETURN();
152
}
153

  
154
PPC_OP(set_Rc0_ov)
155
{
156
    uint32_t tmp;
157

  
158
    if (Ts0 < 0) {
159
        tmp = 0x08;
160
    } else if (Ts0 > 0) {
161
        tmp = 0x04;
162
    } else {
163
        tmp = 0x02;
164
    }
165 150
    tmp |= xer_ov;
166 151
    env->crf[0] = tmp;
167 152
    RETURN();
......
1062 1047
/* extend sign byte */
1063 1048
PPC_OP(extsb)
1064 1049
{
1065
    Ts0 = s_ext8(Ts0);
1050
    Ts0 = (int8_t)(Ts0);
1066 1051
    RETURN();
1067 1052
}
1068 1053

  
1069 1054
/* extend sign half word */
1070 1055
PPC_OP(extsh)
1071 1056
{
1072
    Ts0 = s_ext16(Ts0);
1057
    Ts0 = (int16_t)(Ts0);
1073 1058
    RETURN();
1074 1059
}
1075 1060

  

Also available in: Unified diff