target-mips: fix broken MIPS16 and microMIPS
commitb231c103afced2eb27af9b6a771ab4b250afb93f
authorYongbok Kim <yongbok.kim@imgtec.com>
Tue, 1 Jul 2014 16:43:05 +0000 (1 17:43 +0100)
committerLeon Alrae <leon.alrae@imgtec.com>
Tue, 14 Oct 2014 12:29:14 +0000 (14 13:29 +0100)
treee8219a3252ed2746beabc1bb96b865269b88b0e1
parenta83bddd60de0dfdbc04c6683c2701682073af5cf
target-mips: fix broken MIPS16 and microMIPS

Commit 240ce26a broke MIPS16 and microMIPS support as it didn't
care those branches and jumps don't have delay slot in
MIPS16 and microMIPS.

This patch introduces a new argument delayslot_size to the
gen_compute_branch() indicating size of delay slot {0, 2, 4}.
And the information is used to call handle_delay_slot() forcingly
when no delay slot is required.

There are some microMIPS branch and jump instructions that requires
exact size of instruction in the delay slot. For indicating
these instructions, MIPS_HFLAG_BDS_STRICT flag is introduced.

Those fictional branch opcodes defined to support MIPS16 and
microMIPS are no longer needed.

Signed-off-by: Yongbok Kim <yongbok.kim@imgtec.com>
Tested-by: Jonas Gorski <jogo@openwrt.org>
Reviewed-by: Leon Alrae <leon.alrae@imgtec.com>
[leon.alrae@imgtec.com: cosmetic changes]
Signed-off-by: Leon Alrae <leon.alrae@imgtec.com>
target-mips/cpu.h
target-mips/translate.c