Wireshark-bugs: [Wireshark-bugs] [Bug 9055] Support for bitmask set for types FT_INT8, FT_INT16,

Date: Mon, 26 Aug 2013 14:43:22 +0000

changed bug 9055

What Removed Added
Attachment #11408 is obsolete   1
Attachment #11408 Flags review_for_checkin?  

Comment # 7 on bug 9055 from
Created attachment 11463 [details]
Support for bitmasked signed integer types FT_INT8, FT_INT16, FT_INT24 and
FT_INT32

(In reply to comment #4)
> Also, if you're going to use SWAR it should almost certainly go in wsutils
> instead of embedding it in proto.c. A comment linking to an explanation
> (http://playingwithpointers.com/swar.html is a good one) would probably be
> worth-while as well.

Code moved to wsutil/swar.c & swar.h

(In reply to comment #5)
> (In reply to comment #2)
> > Yes, there should be G_GINT32_CONSTANT but this is not defined.
> 
> ...because it's not necessary, unlike G_GINT64_CONSTANT.  In all of the
> platforms on which GLib can work, "int" is 32 bits and, therefore, you don't
> need to add a suffix to a constant to have the compiler not complain about
> it being too big to fit into an int.  For 64-bit values, you have to add a
> suffix, and the suffix is compiler-dependent (L, LL, or i64).

I see. Removed G_GINT32_CONSTANT macro, looks good:

if (integer & (1 << (no_of_bits-1)))
    mov         ecx,dword ptr [no_of_bits]  
    sub         ecx,1  
    mov         edx,1  
    shl         edx,cl  
    and         edx,dword ptr [integer]  
    je          proto_tree_set_int+71h (15350B1h)  

integer |= (-1 << no_of_bits);
    or          eax,0FFFFFFFFh  
    mov         ecx,dword ptr [no_of_bits]  
    shl         eax,cl  
    or          eax,dword ptr [integer]  
    mov         dword ptr [integer],eax


You are receiving this mail because:
  • You are watching all bug changes.