|[Help] Endian Problem email@example.com (Yunseok Rhee) (1998-09-13)|
|Re: [Help] Endian Problem firstname.lastname@example.org (Max TenEyck Woodbury) (1998-09-18)|
|Re: [Help] Endian Problem email@example.com (Michael Meissner) (1998-09-18)|
|Re: [Help] Endian Problem firstname.lastname@example.org (1998-09-18)|
|Re: [Help] Endian Problem email@example.com (1998-09-22)|
|From:||Max TenEyck Woodbury <firstname.lastname@example.org>|
|Date:||18 Sep 1998 23:03:37 -0400|
|Organization:||Duke University, Durham, NC, USA|
Yunseok Rhee wrote:
> For architectural simulation, I should deal with MIPS executable codes
> in a Pentium PC. Unfortunately, the endians between the two machines
> are different: MIPS machines adopt the big-endian but the PCs do the
I have no idea how practical this is, but you may be able to take
advantage of the fact that big-endian and little-endian architectures
can be converted to each other by complementing the addresses used.
Try reading the MIPS image in and byte reversing the whole thing once.
Instead of incrementing the instruction counter, decrement. Whenever
you are about to use an address, complement it (after you have
finished any arithmetic on the address) then translate it. If you do
this, the memory loads will pick up the right number of bytes in the
It's 1 A.M., I'm short on sleep and may be talking in my sleep, so if
this is a real stinko idea, just heave it and keep your flames to
Return to the
Search the comp.compilers archives again.