]> xenbits.xensource.com Git - qemu-xen.git/commit
target/xtensa: reorganize register handling in translators
authorMax Filippov <jcmvbkbc@gmail.com>
Tue, 12 Feb 2019 02:53:19 +0000 (18:53 -0800)
committerMax Filippov <jcmvbkbc@gmail.com>
Thu, 28 Feb 2019 12:43:22 +0000 (04:43 -0800)
commitb0b24bdcd9dca02bd5d09e266892d261713cebe8
tree69e27ffab79a8e5420ac769605a8c80fccba4566
parentc949009bc0612cbfc7bc5b80c3e9ea3e24313434
target/xtensa: reorganize register handling in translators

To support circular register dependencies in FLIX bundles opcode inputs
and outputs must be separate and adjustable. Circular dependencies can
be broken by making temporary copies of opcode inputs and substituting
them into the arguments array instead of the original registers.

E.g. the circular register dependency in the following bundle:

  { mov a2, a3 ; mov a3, a2 }

can be resolved by making copy a2' = a2 and substituting it as input
argument of the second opcode:

  { mov a2, a3 ; mov a3, a2' }

Change opcode translator prototype to accept OpcodeArg array as
argument. For each register argument initialize OpcodeArg::{in,out} with
TCGv_* of the respective register. Don't explicitly use cpu_R in the
opcode translators, use OpcodeArg::{in,out} instead.

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