mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 09:13:55 -06:00
target/microblaze: Convert brk and brki to decodetree
Split these out of the normal branch instructions, as they require special handling. Perform the entire operation inline, instead of raising EXCP_BREAK to do the work in mb_cpu_do_interrupt. This fixes a bug in that brki rd, imm, for imm != 0x18 is not supposed to set MSR_BIP. This fixes a bug in that imm == 0 is the reset vector and 0x18 is the debug vector, and neither should raise a tcg exception in system mode. Introduce EXCP_SYSCALL for microblaze-linux-user. Tested-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com> Reviewed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
0c3da918de
commit
f523531471
5 changed files with 79 additions and 53 deletions
|
@ -19,7 +19,9 @@
|
|||
|
||||
&typea0 rd ra
|
||||
&typea rd ra rb
|
||||
&typea_br rd rb
|
||||
&typeb rd ra imm
|
||||
&typeb_br rd imm
|
||||
|
||||
# Include any IMM prefix in the value reported.
|
||||
%extimm 0:s16 !function=typeb_imm
|
||||
|
@ -30,9 +32,15 @@
|
|||
# Officially typea, but with rb==0, which is not used.
|
||||
@typea0 ...... rd:5 ra:5 ................ &typea0
|
||||
|
||||
# Officially typea, but with ra as opcode.
|
||||
@typea_br ...... rd:5 ..... rb:5 ........... &typea_br
|
||||
|
||||
# Officially typeb, but any immediate extension is unused.
|
||||
@typeb_bs ...... rd:5 ra:5 ..... ...... imm:5 &typeb
|
||||
|
||||
# Officially typeb, but with ra as opcode.
|
||||
@typeb_br ...... rd:5 ..... ................ &typeb_br imm=%extimm
|
||||
|
||||
# For convenience, extract the two imm_w/imm_s fields, then pack
|
||||
# them back together as "imm". Doing this makes it easiest to
|
||||
# match the required zero at bit 5.
|
||||
|
@ -60,6 +68,9 @@ andi 101001 ..... ..... ................ @typeb
|
|||
andn 100011 ..... ..... ..... 000 0000 0000 @typea
|
||||
andni 101011 ..... ..... ................ @typeb
|
||||
|
||||
brk 100110 ..... 01100 ..... 000 0000 0000 @typea_br
|
||||
brki 101110 ..... 01100 ................ @typeb_br
|
||||
|
||||
bsrl 010001 ..... ..... ..... 000 0000 0000 @typea
|
||||
bsra 010001 ..... ..... ..... 010 0000 0000 @typea
|
||||
bsll 010001 ..... ..... ..... 100 0000 0000 @typea
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue