hi
----- Original Message -----
From: "Mark Pilant" <Mark.Pilant@xxxxxxx>
To: "'Ethereal development'" <ethereal-dev@xxxxxxxxxxxx>
Sent: Tuesday, September 13, 2005 11:45 PM
Subject: RE: [Ethereal-dev] Re: question on TLV
> > ofcourse nothing wrong in sticking with the norm of octet aligned etc,
> > but just curious...if yes we have to stick to word aligned, it should
> > be "documented"
>
> The "preferred" alignment is up to the chip maker, and it gets hidden by
> the compiler. This isn't usually a problem unless one of two things
> happen: 1) you want to send the data out on the wire or 2) you are
> trying
> to fit you data in a confined (think embedded controllers) space.
shud look at an objdump -D of something as simple as
main( )
{ int a; int b; int c;
c=a+b;
}
>
> Unless you are like me, and like to tinker. I've also been playing
> around with computers since they were built with individual transistors.
> I missed the vacuum tube era by a couple of years :-) :-)
and then they made TTL and pMOS and nMOS and cMOS but everyone does 1 and 0
only :-(
>
> > but eitherways i would need a way to treat each element seperately say
> > unit8 A unit8 B unit8 C unit8 D
> >
> > i may fetch each individually or if they can be fetched in 1 instr,
> > together, but they still quantize different elements of the data.
>
> The alignment issue doesn't come up when accessing individual bytes or a
> byte stream. If, for example, you try and access a 32 bit int from
> address 0x1001 (instead of 0x1000) you will see the performance hit or
> exception.
yes but what I am trying to get at is that i still need the ability to be
able
a. fetch from 0x1001 ---004 (which theoratically would be say 8 bit aligned
since uncle Sam makes everything in banks)
b. put them in 1 reg.
c. but still have the ability to say that i want "8 bits here and 8 bits
there and 16 bits there" to be different entities
more like the AH,AL and BX logic in x86
might actually be easier in SPARC
anyways ....thanks for your comments.. I liked it.. even if it comes in the
era of plenty..