diff options
author | Vladimir Chtchetkine <vchtchetkine@google.com> | 2010-03-23 09:51:54 -0700 |
---|---|---|
committer | Vladimir Chtchetkine <vchtchetkine@google.com> | 2010-03-23 14:01:50 -0700 |
commit | 01e9608cb62901d13b330f851a260a2082e81a06 (patch) | |
tree | deb67b76ae0f810fd080d665b0fef989afbd3bd6 /exec-all.h | |
parent | e4c6b1f1dda3ebfb4e88d7c0f1d2676d685cb438 (diff) | |
download | external_qemu-01e9608cb62901d13b330f851a260a2082e81a06.zip external_qemu-01e9608cb62901d13b330f851a260a2082e81a06.tar.gz external_qemu-01e9608cb62901d13b330f851a260a2082e81a06.tar.bz2 |
Fixes for obvious ARMv7 bugs in emulator.
This CL doesn't fix ARMv7 problems in the emulator (emulated system still
crashes, although with these fixes it crashes much later than without them),
however, this CL fixes real bugs related to IT block translations.
In particular, it fixes:
- Wrong ITSTATE calculation on condition that gen_intermediate_code_internal
is called with search_pc parameter set to 1. In the original code ITSTATE was
blindly inherited from the CPU's condexec_bits field, without consideration
that translation could be performed starting from an address that has nothing
to do with the current ITSTATE.
Change-Id: I7af83e21c64d217c6b28bf6cb5ee2e2f23182c95
Diffstat (limited to 'exec-all.h')
-rw-r--r-- | exec-all.h | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -172,6 +172,14 @@ struct TranslationBlock { #endif // CONFIG_MEMCHECK uint32_t icount; + + /* ITSTATE at the beginning of the translated block. + * This field is set to CPU's condexec_bits value when this TB is first + * translating. This field is then used to properly calculate ITSTATE when + * this TB gets "retranslated" because of an exception, or other + * conditions that cause gen_intermediate_code_pc to be called for this TB. + */ + uint8_t itstate; }; static inline unsigned int tb_jmp_cache_hash_page(target_ulong pc) |