arch-power: Refactor branch instructions
authorSandipan Das <sandipan@linux.ibm.com>
Sat, 6 Feb 2021 11:46:39 +0000 (17:16 +0530)
committerSandipan Das <sandipan@linux.ibm.com>
Mon, 15 Feb 2021 08:32:37 +0000 (14:02 +0530)
commit89ed3586fa204a402dce2af1fbd3e6ba6ab8fb4a
tree7a0b2ed95b3044744dbbe6a8e2a394bcc05de638
parent59f60dec9a12bd1ef059777e9156d5c2ba7ae957
arch-power: Refactor branch instructions

This changes the base classes for branch instructions and
switches to two high-level classes for unconditional and
conditional branches. The conditional branches are further
classified based on whether they use an immediate field or
a register for determining the target address.

Decoding has also been consolidated using formats that can
generate code after determining if an instruction branches
to an absolute address or a PC-relative address, or if it
implicitly sets the return address by looking at the AA and
LK bits.

Change-Id: I5fa7db7b6693586b4ea3c71e5cad8a60753de29c
Signed-off-by: Sandipan Das <sandipan@linux.ibm.com>
src/arch/power/insts/branch.cc
src/arch/power/insts/branch.hh
src/arch/power/isa/decoder.isa
src/arch/power/isa/formats/branch.isa
src/arch/power/isa/formats/util.isa
src/arch/power/types.hh