mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2024-10-21 08:18:20 +02:00
694058da94
Convert the "double-precision" register moves to decodetree: this covers VMOV scalar-to-gpreg, VMOV gpreg-to-scalar and VDUP. Note that the conversion process has tightened up a few of the UNDEF encoding checks: we now correctly forbid: * VMOV-to-gpr with U:opc1:opc2 == 10x00 or x0x10 * VMOV-from-gpr with opc1:opc2 == 0x10 * VDUP with B:E == 11 * VDUP with Q == 1 and Vn<0> == 1 Signed-off-by: Peter Maydell <peter.maydell@linaro.org> --- The accesses of elements < 32 bits could be improved by doing direct ld/st of the right size rather than 32-bit read-and-shift or read-modify-write, but we leave this for later cleanup, since this series is generally trying to stick to fixing the decode. Backports commit 9851ed9269d214c0c6feba960dd14ff09e6c34b4 from qemu
65 lines
2.5 KiB
Plaintext
65 lines
2.5 KiB
Plaintext
# AArch32 VFP instruction descriptions (conditional insns)
|
|
#
|
|
# 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
|
|
#
|
|
# Encodings for the conditional VFP instructions are here:
|
|
# generally anything matching A32
|
|
# cccc 11.. .... .... .... 101. .... ....
|
|
# and T32
|
|
# 1110 110. .... .... .... 101. .... ....
|
|
# 1110 1110 .... .... .... 101. .... ....
|
|
# (but those patterns might also cover some Neon instructions,
|
|
# which do not live in this file.)
|
|
|
|
# VFP registers have an odd encoding with a four-bit field
|
|
# and a one-bit field which are assembled in different orders
|
|
# depending on whether the register is double or single precision.
|
|
# Each individual instruction function must do the checks for
|
|
# "double register selected but CPU does not have double support"
|
|
# and "double register number has bit 4 set but CPU does not
|
|
# support D16-D31" (which should UNDEF).
|
|
%vm_dp 5:1 0:4
|
|
%vm_sp 0:4 5:1
|
|
%vn_dp 7:1 16:4
|
|
%vn_sp 16:4 7:1
|
|
%vd_dp 22:1 12:4
|
|
%vd_sp 12:4 22:1
|
|
|
|
%vmov_idx_b 21:1 5:2
|
|
%vmov_idx_h 21:1 6:1
|
|
|
|
# VMOV scalar to general-purpose register; note that this does
|
|
# include some Neon cases.
|
|
VMOV_to_gp ---- 1110 u:1 1. 1 .... rt:4 1011 ... 1 0000 \
|
|
vn=%vn_dp size=0 index=%vmov_idx_b
|
|
VMOV_to_gp ---- 1110 u:1 0. 1 .... rt:4 1011 ..1 1 0000 \
|
|
vn=%vn_dp size=1 index=%vmov_idx_h
|
|
VMOV_to_gp ---- 1110 0 0 index:1 1 .... rt:4 1011 .00 1 0000 \
|
|
vn=%vn_dp size=2 u=0
|
|
|
|
VMOV_from_gp ---- 1110 0 1. 0 .... rt:4 1011 ... 1 0000 \
|
|
vn=%vn_dp size=0 index=%vmov_idx_b
|
|
VMOV_from_gp ---- 1110 0 0. 0 .... rt:4 1011 ..1 1 0000 \
|
|
vn=%vn_dp size=1 index=%vmov_idx_h
|
|
VMOV_from_gp ---- 1110 0 0 index:1 0 .... rt:4 1011 .00 1 0000 \
|
|
vn=%vn_dp size=2
|
|
|
|
VDUP ---- 1110 1 b:1 q:1 0 .... rt:4 1011 . 0 e:1 1 0000 \
|
|
vn=%vn_dp
|