mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-02-02 12:31:09 +00:00
target/arm: Add skeleton for T16 decodetree
Backports commit f97b454e9e7f5d018d34b5ea85a66cff016bd3b7 from qemu
This commit is contained in:
parent
19f1da260f
commit
0b2f37afaf
|
@ -37,12 +37,18 @@ target/arm/decode-t32.inc.c: $(SRC_PATH)/target/arm/t32.decode $(DECODETREE)
|
||||||
$(PYTHON) $(DECODETREE) --static-decode disas_t32 -o $@ $<,\
|
$(PYTHON) $(DECODETREE) --static-decode disas_t32 -o $@ $<,\
|
||||||
"GEN", $(TARGET_DIR)$@)
|
"GEN", $(TARGET_DIR)$@)
|
||||||
|
|
||||||
|
target/arm/decode-t16.inc.c: $(SRC_PATH)/target/arm/t16.decode $(DECODETREE)
|
||||||
|
$(call quiet-command,\
|
||||||
|
$(PYTHON) $(DECODETREE) -w 16 --static-decode disas_t16 -o $@ $<,\
|
||||||
|
"GEN", $(TARGET_DIR)$@)
|
||||||
|
|
||||||
target/arm/translate-sve.o: target/arm/decode-sve.inc.c
|
target/arm/translate-sve.o: target/arm/decode-sve.inc.c
|
||||||
target/arm/translate.o: target/arm/decode-vfp.inc.c
|
target/arm/translate.o: target/arm/decode-vfp.inc.c
|
||||||
target/arm/translate.o: target/arm/decode-vfp-uncond.inc.c
|
target/arm/translate.o: target/arm/decode-vfp-uncond.inc.c
|
||||||
target/arm/translate.o: target/arm/decode-a32.inc.c
|
target/arm/translate.o: target/arm/decode-a32.inc.c
|
||||||
target/arm/translate.o: target/arm/decode-a32-uncond.inc.c
|
target/arm/translate.o: target/arm/decode-a32-uncond.inc.c
|
||||||
target/arm/translate.o: target/arm/decode-t32.inc.c
|
target/arm/translate.o: target/arm/decode-t32.inc.c
|
||||||
|
target/arm/translate.o: target/arm/decode-t16.inc.c
|
||||||
|
|
||||||
obj-y += tlb_helper.o debug_helper.o
|
obj-y += tlb_helper.o debug_helper.o
|
||||||
obj-y += translate.o op_helper.o
|
obj-y += translate.o op_helper.o
|
||||||
|
|
20
qemu/target/arm/t16.decode
Normal file
20
qemu/target/arm/t16.decode
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
# Thumb1 instructions
|
||||||
|
#
|
||||||
|
# Copyright (c) 2019 Linaro, Ltd
|
||||||
|
#
|
||||||
|
# This library is free software; you can redistribute it and/or
|
||||||
|
# modify it under the terms of the GNU Lesser General Public
|
||||||
|
# License as published by the Free Software Foundation; either
|
||||||
|
# version 2 of the License, or (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This library is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
# Lesser General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU Lesser General Public
|
||||||
|
# License along with this library; if not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
#
|
||||||
|
# This file is processed by scripts/decodetree.py
|
||||||
|
#
|
|
@ -7710,6 +7710,7 @@ static int t32_branch24(DisasContext *s, int x)
|
||||||
#include "decode-a32.inc.c"
|
#include "decode-a32.inc.c"
|
||||||
#include "decode-a32-uncond.inc.c"
|
#include "decode-a32-uncond.inc.c"
|
||||||
#include "decode-t32.inc.c"
|
#include "decode-t32.inc.c"
|
||||||
|
#include "decode-t16.inc.c"
|
||||||
|
|
||||||
/* Helpers to swap operands for reverse-subtract. */
|
/* Helpers to swap operands for reverse-subtract. */
|
||||||
static void gen_rsb(DisasContext *s, TCGv_i32 dst, TCGv_i32 a, TCGv_i32 b)
|
static void gen_rsb(DisasContext *s, TCGv_i32 dst, TCGv_i32 a, TCGv_i32 b)
|
||||||
|
@ -11022,6 +11023,11 @@ static void disas_thumb_insn(DisasContext *s, uint32_t insn)
|
||||||
TCGv_i32 tmp2;
|
TCGv_i32 tmp2;
|
||||||
TCGv_i32 addr;
|
TCGv_i32 addr;
|
||||||
|
|
||||||
|
if (disas_t16(s, insn)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
/* fall back to legacy decoder */
|
||||||
|
|
||||||
switch (insn >> 12) {
|
switch (insn >> 12) {
|
||||||
case 0: case 1:
|
case 0: case 1:
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue