Il 10/03/2012 17:53, Andreas Färber ha scritto: > /** > * ARMCPU: > + * @env: Legacy CPU state. > * > * An ARM CPU core. > */ > @@ -58,7 +60,17 @@ typedef struct ARMCPU { > /*< private >*/ > CPUState parent_obj; > /*< public >*/ > + > + /* TODO Inline this and split off common state */ > + CPUARMState env; > } ARMCPU; >
As usual I don't like "legacy". :) A more interesting distinction is between state that is relevant to the emulation, and state that is relevant to the main loop or the machine. The former is reinitialized after reset and can remain in CPUFooState. The latter is not reinitialized after reset, can move to QOM, and in most cases that's what we access when we use CPUArchState. Also, I understand that the conversion is not fully mechanical, but perhaps it can be made "more" mechanical than this? Splitting this patch in two would be nice, but I can't say I read it fully. Paolo