|
From: | Paolo Bonzini |
Subject: | [Qemu-devel] Re: Compile files only once: some planning |
Date: | Wed, 24 Mar 2010 10:47:22 +0100 |
User-agent: | Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.8) Gecko/20100301 Fedora/3.0.3-1.fc12 Lightning/1.0b2pre Thunderbird/3.0.3 |
The harder cases are those where the device code depends somehow on the architecture. Some thoughts follow. vl.c: a lot of work. Maybe the CPUState stuff should be separated to a new file. dma.c: DMA_schedule needs access to CPUState.
Most users of CPUState (e.g. qemu-timer.c and hw/dma.c) either need it as an opaque pointer, or only need access to target-independent stuff. So you could:
1) make CPUState define only common fields. Include CPUState at the beginning of each per-target CPUXYZState.
2) Do s/CPUState/CPUXYZState/ on target-*/*.3) Make it compile, possibly by undoing parts of 2) and changing parts of it to DO_UPCAST.
Paolo
[Prev in Thread] | Current Thread | [Next in Thread] |