All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] powerpc host trouble
@ 2005-01-09 18:32 Magnus Damm
  0 siblings, 0 replies; only message in thread
From: Magnus Damm @ 2005-01-09 18:32 UTC (permalink / raw)
  To: qemu-devel

Hello,

I've spent some time today trying to fix powerpc host support. I run
Linux on my powerpc box and it is not possible for me to compile the
code:

gcc -Wall -O2 -g -fno-strict-aliasing -D__powerpc__ -I.
-I/home/damm/build/qemu/cvs/src/qemu/target-i386
-I/home/damm/build/qemu/cvs/src/qemu -D_GNU_SOURCE
-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
-I/home/damm/build/qemu/cvs/src/qemu/slirp -c -o translate-all.o
/home/damm/build/qemu/cvs/src/qemu/translate-all.c
In file included from /home/damm/build/qemu/cvs/src/qemu/translate-all.c:41:
./op.h: In function `dyngen_code':
./op.h:5911: warning: built-in function 'lrint' declared as non-function
./op.h:5933: warning: built-in function 'llrint' declared as non-function
./op.h:8665: warning: built-in function 'sqrt' declared as non-function
./op.h:8798: error: parse error before ')' token
./op.h:8799: error: parse error before ')' token
./op.h:8814: error: parse error before ')' token
./op.h:8815: error: parse error before ')' token
./op.h:8830: error: parse error before ')' token
./op.h:8831: error: parse error before ')' token
./op.h:8846: error: parse error before ')' token
./op.h:8847: error: parse error before ')' token
./op.h:8859: error: parse error before ')' token
./op.h:8860: error: parse error before ')' token
./op.h:8872: error: parse error before ')' token
./op.h:8873: error: parse error before ')' token
make[1]: *** [translate-all.o] Error 1
make[1]: Leaving directory `/home/damm/build/qemu/cvs/src/qemu/i386-softmmu'
make: *** [all] Error 1

Looking at op.h shows me the following:

case INDEX_op_cvtdq2ps: {
    long param1, param2;
    extern void op_cvtdq2ps();
    memcpy(gen_code_ptr, (void *)((char *)&op_cvtdq2ps+0), 176);
    param1 = *opparam_ptr++;
    param2 = *opparam_ptr++;
    *(uint16_t *)(gen_code_ptr + 2) = (param2 + 0 + 0x8000) >> 16;
    *(uint16_t *)(gen_code_ptr + 10) = (param2 + 0);
    *(uint16_t *)(gen_code_ptr + 22) = ((long)(&) + 56 + 0x8000) >> 16;
    *(uint16_t *)(gen_code_ptr + 30) = ((long)(&) + 56);
    *(uint16_t *)(gen_code_ptr + 50) = (param1 + 0 + 0x8000) >> 16;
    *(uint16_t *)(gen_code_ptr + 58) = (param1 + 0);
    gen_code_ptr += 176;
}
break;

The two lines with ((long)(&) are the first two problematic ones: 8798, 8799.
Objdumping op.o shows me:

00011fcc <op_cvtdq2ps>:
   11fcc:       3d 20 00 00     lis     r9,0
   11fd0:       94 21 ff f0     stwu    r1,-16(r1)
   11fd4:       39 29 00 00     addi    r9,r9,0
   11fd8:       3d 40 43 30     lis     r10,17200
   11fdc:       7d 1b 4a 14     add     r8,r27,r9
   11fe0:       3d 20 00 00     lis     r9,0
   11fe4:       80 08 00 0c     lwz     r0,12(r8)
   11fe8:       39 29 00 38     addi    r9,r9,56
   11fec:       91 41 00 08     stw     r10,8(r1)
   11ff0:       6c 00 80 00     xoris   r0,r0,32768
   11ff4:       c9 a9 00 00     lfd     f13,0(r9)
[snip]

Above is 0x11fe2 and 0x11fea the two problematic addresses.

"readelf -a op.o"  shows me the following info:

[snip]
00011fe2  00003f06 R_PPC_ADDR16_HA   00000000   .rodata.cst8 + 38
00011fea  00003f04 R_PPC_ADDR16_LO   00000000   .rodata.cst8 + 38
[snip]

This looks to me that the code wants to access data from the
".rodata.cst8" section. But I do not know how to proceed. Any ideas?

/ magnus

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-01-09 18:51 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-01-09 18:32 [Qemu-devel] powerpc host trouble Magnus Damm

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.