Re: Converting from little-endian to big-endian -- followup

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Followup question:

Thanks to Ian's suggestion, gas is working. The gcc build gives me the following errors when I configure it big-endian:

tools/gcc/libgcc/../gcc/libgcc2.c: In function __mulsc3’:
tools/gcc/libgcc/../gcc/libgcc2.c:1826: internal compiler error: in gen_rtx_SUBREG, at emit-rtl.c:777

The processor is 64-bit, and the little-endian version of gcc works happily.

Suggestions?

Thanks.

--jeff



On 11/5/2010 7:56 PM, Ian Lance Taylor wrote:
Jeff Kenton <jeffrey.kenton@xxxxxxxxxxx> writes:

I have a little-endian gcc tool chain (gcc, gas, ld, ...) for a custom
processor. The folks who built the tools are gone from the company.
My job is to produce a big-endian set of tools (the processor can run
either way) and need some hints. I have gotten gcc to do what looks
OK by setting BYTES_BIG_ENDIAN, etc. but am having no success finding
the right tweaks for gas. Any clues? Any overall strategy?
For gas look at gas/config/tc-CPU.h. Set TARGET_BYTES_BIG_ENDIAN. Then
figure out what BFD target you are using. Let's say it's
bfd/elf32-CPU.c. Look in that file for TARGET_LITTLE_SYM and
TARGET_LITTLE_NAME. Change them to TARGET_BIG_SYM and TARGET_BIG_NAME.
If it's not ELF, you'll have to do something else.

Ian


--

---------------------------------------------------------------------
= Jeff Kenton http://home.comcast.net/~jeffrey.kenton =
---------------------------------------------------------------------



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux