qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] Many syntax errors in op.h


From: Johannes Schindelin
Subject: Re: [Qemu-devel] Many syntax errors in op.h
Date: Tue, 15 Nov 2005 19:30:08 +0100 (CET)

Hi,

On Tue, 15 Nov 2005, Dave Feustel wrote:

> On Tuesday 15 November 2005 12:23, Jamie Lokier wrote:
> > 
> > "(&)" is not valid C.
> 
> That's what I thought too. "&" requires an operand. So why are these 
> lines of code in op.h? Should they be commented out? Should a dummy 
> operand be inserted?

Noooo! The code inserts the actual arguments to the op directly into the 
machine code.

Example:

Say op_add123 implements the addition of a number to register A0. When 
translating the guest machine code, you not only copy the host machine 
code for op_add123, but you have to put the number to be added 
*somewhere*.

Enter relocations. The file op.h contains the code to put the number at 
the correct point in the machine code.

> What is the fix?

You need to know the problem first. Why does dyngen produce that code. 
Which relocation is responsible for that invalid statement. Why was no 
name provided for it?

If you just comment it out, chances are that QEmu produces invalid code.

Hth,
Dscho





reply via email to

[Prev in Thread] Current Thread [Next in Thread]