xemu/target-arm
Peter Maydell c480421426 target-arm: convert cp15 crn=7 registers
Convert the cp15 crn=7 registers to the new scheme.
Note that to do this we have to distinguish some registers
used on the ARM9 and ARM10 from some which are ARM1176
only. This is because the old code returned a value of 0
but always set the Z flag (by clearing env->ZF, since we
store the Z flag in CPUState inverted). This is inconsistent
with actual ARM CPU behaviour, which only sets flags for
reads to r15 and sets them based on the top bits of the result.
However it happened to work for the two common use cases for
cp15 crn=7 reads:
 * On ARM9 and ARM10 the cache clean-and-test operations are
typically done with a destination of r15 so that you can do
a "loop: mrc ... ; bne loop" to keep cleaning until the cache
is finally clean; always setting the Z flag means this loop
terminates immediately
 * on ARM1176 the Cache Dirty Status Register reads as zero
if the cache is dirty; returning 0 means this is correctly
implemented for QEMU

Since the new coprocessor register framework does the right
thing of always setting flags based on the returned result
for reads to r15, we need to split these up so that we can
return (1<<30) for the ARM9/ARM10 registers but 0 for the
ARM1176 one.

This allows us to remove the nasty hack which always sets Z.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2012-06-20 12:07:11 +00:00
..
arm-semi.c build: move obj-TARGET-y variables to nested Makefile.objs 2012-06-07 07:17:36 +02:00
cpu-qom.h target-arm: Add register_cp_regs_for_features() 2012-06-20 12:02:54 +00:00
cpu.c target-arm: convert cp15 crn=7 registers 2012-06-20 12:07:11 +00:00
cpu.h target-arm: convert cp15 crn=7 registers 2012-06-20 12:07:11 +00:00
helper.c target-arm: convert cp15 crn=7 registers 2012-06-20 12:07:11 +00:00
helper.h target-arm: Convert TEECR, TEEHBR to new scheme 2012-06-20 12:04:08 +00:00
iwmmxt_helper.c target-arm: Don't overuse CPUState 2012-03-14 22:20:24 +01:00
machine.c arm: Add dummy support for co-processor 15's secure config register 2012-01-13 17:25:08 +00:00
Makefile.objs build: move other target-*/ objects to nested Makefile.objs 2012-06-07 09:21:11 +02:00
neon_helper.c target-arm: When setting FPSCR.QC, don't clear other FPSCR bits 2012-05-10 12:56:08 +00:00
op_addsub.h Correct spelling of licensed 2011-07-23 11:26:12 -05:00
op_helper.c target-arm: initial coprocessor register framework 2012-06-20 12:01:02 +00:00
translate.c target-arm: Convert performance monitor registers 2012-06-20 12:05:17 +00:00