Revision 6191b059 target-i386/ops_template.h

b/target-i386/ops_template.h
200 200
    T0 = ((DATA_STYPE)src1 <= (DATA_STYPE)src2);
201 201
}
202 202

  
203
/* bit operations */
204
#if DATA_BITS >= 16
205

  
206
void OPPROTO glue(glue(op_bsf, SUFFIX), _T0_cc)(void)
207
{
208
    int count;
209
    target_long res;
210

  
211
    res = T0 & DATA_MASK;
212
    if (res != 0) {
213
        count = 0;
214
        while ((res & 1) == 0) {
215
            count++;
216
            res >>= 1;
217
        }
218
        T1 = count;
219
        CC_DST = 1; /* ZF = 0 */
220
    } else {
221
        CC_DST = 0; /* ZF = 1 */
222
    }
223
    FORCE_RET();
224
}
225

  
226
void OPPROTO glue(glue(op_bsr, SUFFIX), _T0_cc)(void)
227
{
228
    int count;
229
    target_long res;
230

  
231
    res = T0 & DATA_MASK;
232
    if (res != 0) {
233
        count = DATA_BITS - 1;
234
        while ((res & SIGN_MASK) == 0) {
235
            count--;
236
            res <<= 1;
237
        }
238
        T1 = count;
239
        CC_DST = 1; /* ZF = 0 */
240
    } else {
241
        CC_DST = 0; /* ZF = 1 */
242
    }
243
    FORCE_RET();
244
}
245

  
246
#endif
247

  
248 203
/* string operations */
249 204

  
250 205
void OPPROTO glue(op_movl_T0_Dshift, SUFFIX)(void)

Also available in: Unified diff