[LLVMdev] customized output of double load/store on ppc32

Eli Friedman eli.friedman at gmail.com
Wed Jul 23 16:46:51 PDT 2008


On Wed, Jul 23, 2008 at 4:23 PM, Scott Graham <scott.llvm at h4ck3r.net> wrote:
> I'm using the PPC backend's output as the "bytecode" for an interpreter
> that I would like to be able to run on both little- and big-endian
> platforms. The split stw's mean that i32s of the f64 are swapped in
> memory on little-endian (thus foiling native-code interop).

It's fundamentally impossible to correctly interpret using the wrong
endianness, at least for general C code.  Have you considered making
your interpreter map memory backwards on opposite-endian platforms?

-Eli



More information about the llvm-dev mailing list