On 4 June 2014 12:11, Alex Bennée <alex.ben...@linaro.org> wrote: > Peter Maydell writes: >> This seems like it's clearly making things worse. >> We definitely don't want to have to have code in >> linux-user be aware of the "interesting" definitions >> of our ZF/NF/CF/VF fields. > <snip> > > You are right. I could make restore_state_from_spsr use a mask like the > old cpsr_write did
But restore_state_from_spsr is the "just load state, no side effects" function which machine.c is using, isn't it? I think part of the problem here is that you're trying to have one function do both the "read/write like the CPU would with all the modeswitch stuff that entails" and also "side effect free access for state save/restore". thanks -- PMM