target/arm: Share unallocated_encoding() and gen_exception_insn()
commitd9318a5f9c32225a9d5365758ae5a329b55de2fe
authorPeter Maydell <peter.maydell@linaro.org>
Fri, 30 Apr 2021 13:27:29 +0000 (30 14:27 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Mon, 10 May 2021 12:24:09 +0000 (10 13:24 +0100)
tree36f29af8bd184fb1cd22a576d7d458d382f894b2
parentb5aa664679510645fa01f55590db60ca2657f7fc
target/arm: Share unallocated_encoding() and gen_exception_insn()

The unallocated_encoding() function is the same in both
translate-a64.c and translate.c; make the translate.c function global
and drop the translate-a64.c version.  To do this we need to also
share gen_exception_insn(), which currently exists in two slightly
different versions for A32 and A64: merge those into a single
function that can work for both.

This will be useful for splitting up translate.c, which will require
unallocated_encoding() to no longer be file-local.  It's also
hopefully less confusing to have only one version of the function
rather than two.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20210430132740.10391-3-peter.maydell@linaro.org
target/arm/translate-a64.c
target/arm/translate-a64.h
target/arm/translate.c
target/arm/translate.h