This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: test case bin3 failed in my x86_64 box


On Thu, 2006-04-27 at 15:28 -0400, Frank Ch. Eigler wrote:
> > > Test cases bin3, bin4, bin5 failed in my x86_64/IA64 box, from the 
> > > error message, it seems that it is word endian problem.
> > 
> > This was some fallout from the optimization being done for 2427. I have
> > fixed the problem.
> 
> Sorry about that, if I broke that.
It was a simple fix.

> Anyway, having explicit endian-conversion functions like those doesn't
> make much sense to me.  Endianness is really an external
> representation (serialization) issue only, which would be naturally
> expressed as modified formatting options for binary printf.

Sure, we could do some kind of format option too. Josh proposed 
     %b = native cpu order
    %-b = little-endian
    %+b = big-endian / network order
which makes sense. It also makes sense that we need ways to convert the
endian of ints and it would be nice to set the default endianess for
binary prints. I have done the last 2 and right now that seems
sufficient and clear, so I wasn't planning on the printf formatting
change unless people really wanted it.

Right now, you can do
    set_endian(2) # make big endian the default
    printf("%2b", num)
or
    printf("%2b", big_endian2(num))




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]