[LLVMdev] customized output of double load/store on ppc32
Scott Graham
scott.llvm at h4ck3r.net
Wed Jul 23 16:23:14 PDT 2008
Hi
For .LL like:
define void @Func()
{
%var1 = alloca double
store double 0x40bb580000000000, double* %var1
ret void
}
ppc32 output is:
...
lis 3, 16571
ori 3, 3, 22528
li 4, 0
stw 3, 8(1)
stw 4, 12(1)
...
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).
Can anyone suggest where I should look to lower this store differently?
(ideally by libcall-ing a function that takes 2 i32s).
thanks,
scott
More information about the llvm-dev
mailing list