target/xtensa: extract test for window overflow exception
authorMax Filippov <jcmvbkbc@gmail.com>
Wed, 29 Aug 2018 17:37:29 +0000 (10:37 -0700)
committerMax Filippov <jcmvbkbc@gmail.com>
Mon, 1 Oct 2018 18:08:35 +0000 (11:08 -0700)
commit6416d16f7544c53ccb6ce7d74e8f01f502b558d3
tree05d399b3284cdb2de815b4c60887b9031d3c0894
parent15477819427f5d2f0eddd4daba4159dee5f3b2ec
target/xtensa: extract test for window overflow exception

- add ps.callinc to the TB flags, that allows testing all instructions
  for window overflow statically;
- drop gen_window_check* functions; replace them with get_window_check
  that accepts bitmask of used registers;
- add XtensaOpcodeOps::test_overflow that returns bitmask of implicitly
  used registers; use it for entry and call{,x}{4,8,12};
- drop window overflow test from the entry helper;
- drop parameter 0 from translate_[di]cache and use translate_nop for
  d/i cache opcodes that don't need memory accessibility check;
- add bitmask XtensaOpcodeOps::windowed_register_op that marks opcode
  arguments that refer to windowed registers;
- translate windowed_register_op mask to a mask of actually used
  registers in the disassembly loop;
- add check for window overflow right after the check for debug
  exception;

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
target/xtensa/cpu.h
target/xtensa/op_helper.c
target/xtensa/translate.c