* [Qemu-devel] Linux x86_64 host
@ 2004-10-07 13:42 Bob Deblier
2004-10-07 15:07 ` Johannes Schindelin
0 siblings, 1 reply; 5+ messages in thread
From: Bob Deblier @ 2004-10-07 13:42 UTC (permalink / raw)
To: Qemu-devel
Great project!
I've been trying to see if I can get the current CVS version of QEMU
working on my Fedora Core 2 x86_64, with no luck so far. There's even a
compilation error in the current sparc code:
../dyngen -o op.h op.o
../dyngen -c -o opc.h op.o
gcc -Wall -O2 -g -fno-strict-aliasing -I.
-I/home/bob/emulators/cvs/qemu/target-sparc
-I/home/bob/emulators/cvs/qemu -I/home/bob/emulators/cvs/qemu/linux-user
-I/home/bob/emulators/cvs/qemu/linux-user/sparc -D_GNU_SOURCE
-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
-I/home/bob/emulators/cvs/qemu/slirp -c -o translate-all.o
/home/bob/emulators/cvs/qemu/translate-all.c
In file included from /home/bob/emulators/cvs/qemu/translate-all.c:41:
op.h: In function `dyngen_code':
op.h:4639: error: syntax error before '.' token
op.h:4641: error: syntax error before '.' token
make[1]: *** [translate-all.o] Error 1
make[1]: Leaving directory `/home/bob/emulators/cvs/qemu/sparc-user'
I'm more than willing to make some time getting to know the system and
contributing to make this work on x86_64, if somebody can give pointers
on where to start investigating.
I've got many years experience programming, knowledge of several
varieties of assembler (x86, x86_64, ppc, ppc64, sparcv8/9, arm, ia64 -
as used in the BeeCrypt crypto library).
Sincerely,
Bob Deblier
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] Linux x86_64 host
2004-10-07 13:42 [Qemu-devel] Linux x86_64 host Bob Deblier
@ 2004-10-07 15:07 ` Johannes Schindelin
2004-10-07 15:25 ` Bob Deblier
0 siblings, 1 reply; 5+ messages in thread
From: Johannes Schindelin @ 2004-10-07 15:07 UTC (permalink / raw)
To: qemu-devel
Hi,
On Thu, 7 Oct 2004, Bob Deblier wrote:
> In file included from /home/bob/emulators/cvs/qemu/translate-all.c:41:
> op.h: In function `dyngen_code':
> op.h:4639: error: syntax error before '.' token
> op.h:4641: error: syntax error before '.' token
> make[1]: *** [translate-all.o] Error 1
> make[1]: Leaving directory `/home/bob/emulators/cvs/qemu/sparc-user'
This is probably a symbol which starts with ".".
Reading the current CVS of dyngen.c, in line 1529 of dyngen.c, there
is a "#if defines(HOST_SPARC)" and after that code which should fix
exactly that error.
If the current CVS version does not resolve your compilation error, please
send the offending lines of your op.h (with 10 lines before and after).
Ciao,
Dscho
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] Linux x86_64 host
2004-10-07 15:07 ` Johannes Schindelin
@ 2004-10-07 15:25 ` Bob Deblier
2004-10-07 16:16 ` Johannes Schindelin
0 siblings, 1 reply; 5+ messages in thread
From: Bob Deblier @ 2004-10-07 15:25 UTC (permalink / raw)
To: qemu-devel
On Thu, 2004-10-07 at 17:07, Johannes Schindelin wrote:
> This is probably a symbol which starts with ".".
Correct.
> Reading the current CVS of dyngen.c, in line 1529 of dyngen.c, there
> is a "#if defines(HOST_SPARC)" and after that code which should fix
> exactly that error.
My code tree is up-to-date, so that line apparently doesn't cure all.
I've manually verified that file and it contains those lines.
I've tried changing it to #if defined(HOST_AMD64) ||
defined(HOST_SPARC), but that gives another error.
> If the current CVS version does not resolve your compilation error, please
> send the offending lines of your op.h (with 10 lines before and after).
>
> Ciao,
> Dscho
Lines from sparc_user/op.h
case INDEX_op_flush_T0: {
extern void op_flush_T0();
extern char helper_flush;
memcpy(gen_code_ptr, (void *)((char *)&op_flush_T0+0), 15);
*(uint32_t *)(gen_code_ptr + 7) = (long)(&helper_flush) -
(long)(gen_code_ptr + 7) + -4;
gen_code_ptr += 15;
}
break;
case INDEX_op_fnegs: {
extern void op_fnegs();
extern char .LC0;
memcpy(gen_code_ptr, (void *)((char *)&op_fnegs+0), 31);
*(uint32_t *)(gen_code_ptr + 10) = (long)(&.LC0) -
(long)(gen_code_ptr + 10) + -4;
gen_code_ptr += 31;
}
break;
case INDEX_op_fabss: {
extern void op_fabss();
extern char do_fabss;
memcpy(gen_code_ptr, (void *)((char *)&op_fabss+0), 13);
*(uint32_t *)(gen_code_ptr + 5) = (long)(&do_fabss) -
(long)(gen_code_ptr + 5) + -4;
gen_code_ptr += 13;
}
break;
At your disposal for further testing,
Bob Deblier
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] Linux x86_64 host
2004-10-07 15:25 ` Bob Deblier
@ 2004-10-07 16:16 ` Johannes Schindelin
2004-10-07 18:37 ` Bob Deblier
0 siblings, 1 reply; 5+ messages in thread
From: Johannes Schindelin @ 2004-10-07 16:16 UTC (permalink / raw)
To: qemu-devel
Hi,
On Thu, 7 Oct 2004, Bob Deblier wrote:
> My code tree is up-to-date, so that line apparently doesn't cure all.
> I've manually verified that file and it contains those lines.
>
> I've tried changing it to #if defined(HOST_AMD64) ||
> defined(HOST_SPARC), but that gives another error.
My error. I read TARGET_SPARC. Must have to do something with not sleeping
enough...
What if you change this line to HOST_AMD64, and just comment the fprintf
(not the continue)? Of course, you have to change the lines around 1707
like so:
if (strstart(sym_name, "__op_param", &p)) {
snprintf(name, sizeof(name), "param%s", p);
} else if(sym_name[0]=='.') {
continue;
} else {
snprintf(name, sizeof(name), "(long)(&%s)",
sym_name);
}
(the "else if" and the "continue" are important).
Explanation: sym_names with a "." are most likely local symbols like jump
labels, which should not even be exported in the object file.
Hth,
Dscho
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] Linux x86_64 host
2004-10-07 16:16 ` Johannes Schindelin
@ 2004-10-07 18:37 ` Bob Deblier
0 siblings, 0 replies; 5+ messages in thread
From: Bob Deblier @ 2004-10-07 18:37 UTC (permalink / raw)
To: qemu-devel
On Thu, 2004-10-07 at 18:16, Johannes Schindelin wrote:
> What if you change this line to HOST_AMD64, and just comment the fprintf
> (not the continue)? Of course, you have to change the lines around 1707
> like so:
>
> if (strstart(sym_name, "__op_param", &p)) {
> snprintf(name, sizeof(name), "param%s", p);
> } else if(sym_name[0]=='.') {
> continue;
> } else {
> snprintf(name, sizeof(name), "(long)(&%s)",
> sym_name);
> }
>
> (the "else if" and the "continue" are important).
>
> Explanation: sym_names with a "." are most likely local symbols like jump
> labels, which should not even be exported in the object file.
Gotcha - I know excatly what you're referring to now. Still doesn't
completely fix the problem, but hopefully the following patch will:
diff -r1.35 dyngen.c
1541c1541,1542
< fprintf(outfile, "extern char %s;\n", sym_name);
---
> if (sym_name[0] != '.')
> fprintf(outfile, "extern
char %s;\n", sym_name);
1707c1708,1710
< } else {
---
> } else if (sym_name[0] == '.') {
> continue;
> } else {
Sincerely,
Bob Deblier
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2004-10-07 18:45 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-07 13:42 [Qemu-devel] Linux x86_64 host Bob Deblier
2004-10-07 15:07 ` Johannes Schindelin
2004-10-07 15:25 ` Bob Deblier
2004-10-07 16:16 ` Johannes Schindelin
2004-10-07 18:37 ` Bob Deblier
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).