Changeset 564e39 in git


Ignore:
Timestamp:
Nov 4, 2013, 4:13:37 PM (9 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'c987db42cd2ec943b97ac5746c99892ceddf909c')
Children:
1afbfecf50023bb1685a0c650d68e81aa9dc02ff
Parents:
1e90486b053bee6ef36b924bb2ff2e91e6cf165c
Message:
fix: convert ptr to int via intptr_t
Location:
factory
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • factory/canonicalform.h

    r1e9048 r564e39  
    5151{
    5252    // returns 0 if ptr is not immediate
    53     return ( ((int)((long)ptr)) & 3 );
     53    return ( ((int)((intptr_t)ptr)) & 3 );
    5454}
    5555
  • factory/imm.h

    r1e9048 r564e39  
    5757inline long imm2int ( const InternalCF * const imm )
    5858{
    59     return ((long)imm) >> 2;
     59    return ((intptr_t)imm) >> 2;
    6060}
    6161
     
    7070{
    7171    // this could be better done by masking the sign bit
    72     if ( ((int)((long)imm)) < 0 )
    73         return -((-(long)imm) >> 2);
    74     else
    75         return (long)imm >> 2;
     72    if ( ((int)((intptr_t)imm)) < 0 )
     73        return -((-(intptr_t)imm) >> 2);
     74    else
     75        return (intptr_t)imm >> 2;
    7676}
    7777
     
    102102{
    103103    // returns 0 if ptr is not immediate
    104     return ( (long)ptr & 3 );
     104    return ( (intptr_t)ptr & 3 );
    105105}
    106106#endif
  • factory/singext.cc

    r1e9048 r564e39  
    6161{
    6262    InternalCF * ff = f.getval();
    63     return ((long)ff) >>2;
     63    return ((intptr_t)ff) >>2;
    6464}
    6565
Note: See TracChangeset for help on using the changeset viewer.