mbox series

[v2,0/9] target/arm: Rely on id regs instead of features

Message ID 20180927211322.16118-1-richard.henderson@linaro.org
Headers show
Series target/arm: Rely on id regs instead of features | expand

Message

Richard Henderson Sept. 27, 2018, 9:13 p.m. UTC
There are more feature bits that could be converted, but I thought
I should show the work to this point to get feedback.

This is the "v2" as compared to 
http://lists.nongnu.org/archive/html/qemu-devel/2018-09/msg01849.html


r~


Richard Henderson (9):
  target/arm: Define fields of ISAR registers
  target/arm: Convert v8 extensions from feature bits to isar tests
  target/arm: Align cortex-r5 id_isar0
  target/arm: Fix cortex-a7 id_isar0
  target/arm: Convert division from feature bits to isar0 tests
  target/arm: Convert jazelle from feature bit to isar1 test
  target/arm: Convert t32ee from feature bit to isar3 test
  target/arm: Convert sve from feature bit to pfr0 test
  target/arm: Convert v8.2-fp16 from feature bit to pfr0 test

 target/arm/cpu.h            | 260 +++++++++++++++++++++++++++++++++---
 target/arm/translate-a64.h  |  22 +++
 target/arm/translate.h      |  20 +++
 linux-user/aarch64/signal.c |   4 +-
 linux-user/elfload.c        |  60 +++++----
 linux-user/syscall.c        |  10 +-
 target/arm/cpu.c            |  56 ++++----
 target/arm/cpu64.c          |  57 ++++----
 target/arm/helper.c         |  11 +-
 target/arm/machine.c        |   6 +-
 target/arm/translate-a64.c  | 144 ++++++++++----------
 target/arm/translate.c      |  47 +++----
 12 files changed, 486 insertions(+), 211 deletions(-)

-- 
2.17.1

Comments

Peter Maydell Oct. 2, 2018, 12:30 p.m. UTC | #1
On 27 September 2018 at 22:13, Richard Henderson
<richard.henderson@linaro.org> wrote:
> There are more feature bits that could be converted, but I thought

> I should show the work to this point to get feedback.

>

> This is the "v2" as compared to

> http://lists.nongnu.org/archive/html/qemu-devel/2018-09/msg01849.html


So having written the code both ways round, which do you think
works out nicer? (or at least least-worst :-))

thanks
-- PMM
Philippe Mathieu-Daudé Oct. 2, 2018, 1:42 p.m. UTC | #2
On 02/10/2018 14:30, Peter Maydell wrote:
> On 27 September 2018 at 22:13, Richard Henderson

> <richard.henderson@linaro.org> wrote:

>> There are more feature bits that could be converted, but I thought

>> I should show the work to this point to get feedback.

>>

>> This is the "v2" as compared to

>> http://lists.nongnu.org/archive/html/qemu-devel/2018-09/msg01849.html

> 

> So having written the code both ways round, which do you think

> works out nicer? (or at least least-worst :-))


Using the *FEATURE*() and FIELD_DP/EX() macros are a great improvement,
the code is more concise, easier to review.

I also appreciate the arm_features enum cleaned, using the previous
macros on ISAR.

I doubt this version works worst, but it definitively looks nicer, thus
less bug-prone.
Richard Henderson Oct. 2, 2018, 3:32 p.m. UTC | #3
On 10/2/18 7:30 AM, Peter Maydell wrote:
> On 27 September 2018 at 22:13, Richard Henderson

> <richard.henderson@linaro.org> wrote:

>> There are more feature bits that could be converted, but I thought

>> I should show the work to this point to get feedback.

>>

>> This is the "v2" as compared to

>> http://lists.nongnu.org/archive/html/qemu-devel/2018-09/msg01849.html

> 

> So having written the code both ways round, which do you think

> works out nicer? (or at least least-worst :-))


My preference is for v2.


r~