[Help] Endian Problem

Yunseok Rhee <rheeys@camars.kaist.ac.kr>
13 Sep 1998 22:43:12 -0400

          From comp.compilers

Related articles
[Help] Endian Problem rheeys@camars.kaist.ac.kr (Yunseok Rhee) (1998-09-13)
Re: [Help] Endian Problem mtew@cds.duke.edu (Max TenEyck Woodbury) (1998-09-18)
Re: [Help] Endian Problem meissner@cygnus.com (Michael Meissner) (1998-09-18)
Re: [Help] Endian Problem zalman@netcom.com (1998-09-18)
Re: [Help] Endian Problem albaugh@agames.com (1998-09-22)
| List of all articles for this month |
From: Yunseok Rhee <rheeys@camars.kaist.ac.kr>
Newsgroups: comp.compilers
Date: 13 Sep 1998 22:43:12 -0400
Organization: KAIST
Keywords: architecture, question, comment

Hello there


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
little-endian.


In executables, the code section can be easily found and translated to
the other endian form. But it is not easy with the read-only data or
the initialized data sections because we cannot know what types of
data were written to each address. To solve the problem, we consider
reordering the bytes accessed on every load or store. Obviously,
however, such frequent byte manipulations would degrade the
performance.


Conseqently, if any, I want to know how to generate the little-endian
executables in MIPS machines. Though it is impossible, please let me
know if you have any other idea with the problem.


Thanks in advance.


        Yunseok Rhee
        rheeys@calab.kaist.ac.kr
[I know people who've done this kind of thing. You have to do a lot
of byte reordering. If you do substantial amounts of code analysis,
similar to that in an optimizing compiler, you can sometimes translate
blocks of code at a higher level and avoid some of the byte swapping.
-John]
--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.