endian issue of llvm-gcc and llvm backend

Hi, all

As I’m a Chinese, be patient of my poor description below.

I compiled libgcc into llvm bitcode in both big endian and little endian. and got 2 different version of function: _ashldi3, the following is the fragment of this function:

little endian:


According to the frequently asked questions on the LLVM webpage, C++ and C cannot currently be used for platform indedpendent usage. Your discovery doesn't fall on one of the often discovered problems though so it may be a bug in the ARM backend. The ARM backend is considered to be experimental at this point so it is likely to have incorrect code in it.

I hope I answered your question well enough,