mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 09:43:56 -06:00
target-xtensa: implement loop option
See ISA, 4.3.2 for details. Operations that change LEND SR value invalidate TBs at the old and at the new LEND. LEND value at TB compilation time is considered constant and loop instruction is generated based on this value. Invalidation may be avoided for the TB at the old LEND address, since looping code verifies actual LEND value. Invalidation may be avoided for the TB at the new LEND address if there's a way to associate LEND address with TB at compilation time and later verify that it doesn't change. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
This commit is contained in:
parent
553e44f906
commit
797d780b13
4 changed files with 93 additions and 9 deletions
|
@ -288,6 +288,26 @@ void HELPER(movsp)(uint32_t pc)
|
|||
}
|
||||
}
|
||||
|
||||
void HELPER(wsr_lbeg)(uint32_t v)
|
||||
{
|
||||
if (env->sregs[LBEG] != v) {
|
||||
tb_invalidate_phys_page_range(
|
||||
env->sregs[LEND] - 1, env->sregs[LEND], 0);
|
||||
env->sregs[LBEG] = v;
|
||||
}
|
||||
}
|
||||
|
||||
void HELPER(wsr_lend)(uint32_t v)
|
||||
{
|
||||
if (env->sregs[LEND] != v) {
|
||||
tb_invalidate_phys_page_range(
|
||||
env->sregs[LEND] - 1, env->sregs[LEND], 0);
|
||||
env->sregs[LEND] = v;
|
||||
tb_invalidate_phys_page_range(
|
||||
env->sregs[LEND] - 1, env->sregs[LEND], 0);
|
||||
}
|
||||
}
|
||||
|
||||
void HELPER(dump_state)(void)
|
||||
{
|
||||
cpu_dump_state(env, stderr, fprintf, 0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue