From: Peter Maydell <peter.maydell@linaro.org>
To: qemu-arm@nongnu.org, qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH 00/26] target/arm: Implement M profile floating point
Date: Tue, 16 Apr 2019 13:57:18 +0100 [thread overview]
Message-ID: <20190416125744.27770-1-peter.maydell@linaro.org> (raw)
This patchset implements floating point support for the
M-profile Arm cores and enables it for the Cortex-M4 and
Cortex-M33 (both of which should really have an FPU).
The floating point instructions for M-profile are basically
the same as for A-profile (with some minor differences like
not having all the VFP sysregs, and definitely not having
the old VFP length/stride handling). The major differences are
in the exception handling:
* on exception entry and exit we may want to stack and
unstack FP registers, as we do for integer registers
* M-profile supports a "lazy stacking" mode, which means that
on exception entry we do not stack the FP registers that
the calling convention requires us to preserve, but just
reserve space for them. Then if the exception handler
executes an FP instruction we spill the FP registers to
the stack only at that point
There are also two M-profile-only instructions, VLLDM and
VLSTM, which are for guest code to actively trigger the
lazy-stacking.
Most interesting bit to review is probably whether I got the
handling of the new TB flag bits right (in patches 18, 19
and 23), since they have a kind of self-clearing property
that's a bit non-standard.
thanks
-- PMM
Peter Maydell (26):
target/arm: Make sure M-profile FPSCR RES0 bits are not settable
hw/intc/armv7m_nvic: Allow reading of M-profile MVFR* registers
target/arm: Implement dummy versions of M-profile FP-related registers
target/arm: Disable most VFP sysregs for M-profile
target/arm: Honour M-profile FP enable bits
target/arm: Decode FP instructions for M profile
target/arm: Clear CONTROL_S.SFPA in SG insn if FPU present
target/arm: Handle SFPA and FPCA bits in reads and writes of CONTROL
target/arm/helper: don't return early for STKOF faults during stacking
target/arm: Handle floating point registers in exception entry
target/arm: Implement v7m_update_fpccr()
target/arm: Clear CONTROL.SFPA in BXNS and BLXNS
target/arm: Clean excReturn bits when tail chaining
target/arm: Allow for floating point in callee stack integrity check
target/arm: Handle floating point registers in exception return
target/arm: Move NS TBFLAG from bit 19 to bit 6
target/arm: Overlap VECSTRIDE and XSCALE_CPAR TB flags
target/arm: Set FPCCR.S when executing M-profile floating point insns
target/arm: Activate M-profile floating point context when FPCCR.ASPEN
is set
target/arm: New helper function arm_v7m_mmu_idx_all()
target/arm: New function armv7m_nvic_set_pending_lazyfp()
target/arm: Add lazy-FP-stacking support to v7m_stack_write()
target/arm: Implement M-profile lazy FP state preservation
target/arm: Implement VLSTM for v7M CPUs with an FPU
target/arm: Implement VLLDM for v7M CPUs with an FPU
target/arm: Enable FPU for Cortex-M4 and Cortex-M33
target/arm/cpu.h | 95 ++++-
target/arm/helper.h | 5 +
target/arm/translate.h | 3 +
hw/intc/armv7m_nvic.c | 261 ++++++++++++
target/arm/cpu.c | 20 +
target/arm/helper.c | 873 +++++++++++++++++++++++++++++++++++++---
target/arm/machine.c | 16 +
target/arm/translate.c | 150 ++++++-
target/arm/vfp_helper.c | 8 +
9 files changed, 1350 insertions(+), 81 deletions(-)
--
2.20.1
next reply other threads:[~2019-04-16 12:57 UTC|newest]
Thread overview: 104+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-16 12:57 Peter Maydell [this message]
2019-04-16 12:57 ` [Qemu-devel] [PATCH 00/26] target/arm: Implement M profile floating point Peter Maydell
2019-04-16 12:57 ` [Qemu-devel] [PATCH 01/26] target/arm: Make sure M-profile FPSCR RES0 bits are not settable Peter Maydell
2019-04-16 12:57 ` Peter Maydell
2019-04-23 17:25 ` Richard Henderson
2019-04-23 17:25 ` Richard Henderson
2019-04-16 12:57 ` [Qemu-devel] [PATCH 02/26] hw/intc/armv7m_nvic: Allow reading of M-profile MVFR* registers Peter Maydell
2019-04-16 12:57 ` Peter Maydell
2019-04-23 17:27 ` Richard Henderson
2019-04-23 17:27 ` Richard Henderson
2019-04-16 12:57 ` [Qemu-devel] [PATCH 03/26] target/arm: Implement dummy versions of M-profile FP-related registers Peter Maydell
2019-04-16 12:57 ` Peter Maydell
2019-04-23 17:55 ` Richard Henderson
2019-04-23 17:55 ` Richard Henderson
2019-04-16 12:57 ` [Qemu-devel] [PATCH 04/26] target/arm: Disable most VFP sysregs for M-profile Peter Maydell
2019-04-16 12:57 ` Peter Maydell
2019-04-23 18:08 ` Richard Henderson
2019-04-23 18:08 ` Richard Henderson
2019-04-16 12:57 ` [Qemu-devel] [PATCH 05/26] target/arm: Honour M-profile FP enable bits Peter Maydell
2019-04-16 12:57 ` Peter Maydell
2019-04-23 18:19 ` Richard Henderson
2019-04-23 18:19 ` Richard Henderson
2019-04-16 12:57 ` [Qemu-devel] [PATCH 06/26] target/arm: Decode FP instructions for M profile Peter Maydell
2019-04-16 12:57 ` Peter Maydell
2019-04-23 18:37 ` Richard Henderson
2019-04-23 18:37 ` Richard Henderson
2019-04-16 12:57 ` [Qemu-devel] [PATCH 07/26] target/arm: Clear CONTROL_S.SFPA in SG insn if FPU present Peter Maydell
2019-04-16 12:57 ` Peter Maydell
2019-04-23 20:58 ` Richard Henderson
2019-04-23 20:58 ` Richard Henderson
2019-04-16 12:57 ` [Qemu-devel] [PATCH 08/26] target/arm: Handle SFPA and FPCA bits in reads and writes of CONTROL Peter Maydell
2019-04-16 12:57 ` Peter Maydell
2019-04-23 21:33 ` Richard Henderson
2019-04-23 21:33 ` Richard Henderson
2019-04-16 12:57 ` [Qemu-devel] [PATCH 09/26] target/arm/helper: don't return early for STKOF faults during stacking Peter Maydell
2019-04-16 12:57 ` Peter Maydell
2019-04-23 21:46 ` Richard Henderson
2019-04-23 21:46 ` Richard Henderson
2019-04-16 12:57 ` [Qemu-devel] [PATCH 10/26] target/arm: Handle floating point registers in exception entry Peter Maydell
2019-04-16 12:57 ` Peter Maydell
2019-04-23 22:21 ` Richard Henderson
2019-04-23 22:21 ` Richard Henderson
2019-04-16 12:57 ` [Qemu-devel] [PATCH 11/26] target/arm: Implement v7m_update_fpccr() Peter Maydell
2019-04-16 12:57 ` Peter Maydell
2019-04-16 12:57 ` [Qemu-devel] [PATCH 12/26] target/arm: Clear CONTROL.SFPA in BXNS and BLXNS Peter Maydell
2019-04-16 12:57 ` Peter Maydell
2019-04-23 22:50 ` Richard Henderson
2019-04-23 22:50 ` Richard Henderson
2019-04-16 12:57 ` [Qemu-devel] [PATCH 13/26] target/arm: Clean excReturn bits when tail chaining Peter Maydell
2019-04-16 12:57 ` Peter Maydell
2019-04-23 22:54 ` Richard Henderson
2019-04-23 22:54 ` Richard Henderson
2019-04-16 12:57 ` [Qemu-devel] [PATCH 14/26] target/arm: Allow for floating point in callee stack integrity check Peter Maydell
2019-04-16 12:57 ` Peter Maydell
2019-04-23 23:04 ` Richard Henderson
2019-04-23 23:04 ` Richard Henderson
2019-04-16 12:57 ` [Qemu-devel] [PATCH 15/26] target/arm: Handle floating point registers in exception return Peter Maydell
2019-04-16 12:57 ` Peter Maydell
2019-04-23 23:29 ` Richard Henderson
2019-04-23 23:29 ` Richard Henderson
2019-04-16 12:57 ` [Qemu-devel] [PATCH 16/26] target/arm: Move NS TBFLAG from bit 19 to bit 6 Peter Maydell
2019-04-16 12:57 ` Peter Maydell
2019-04-23 23:47 ` Richard Henderson
2019-04-23 23:47 ` Richard Henderson
2019-04-16 12:57 ` [Qemu-devel] [PATCH 17/26] target/arm: Overlap VECSTRIDE and XSCALE_CPAR TB flags Peter Maydell
2019-04-16 12:57 ` Peter Maydell
2019-04-23 23:51 ` Richard Henderson
2019-04-23 23:51 ` Richard Henderson
2019-04-16 12:57 ` [Qemu-devel] [PATCH 18/26] target/arm: Set FPCCR.S when executing M-profile floating point insns Peter Maydell
2019-04-16 12:57 ` Peter Maydell
2019-04-24 0:00 ` Richard Henderson
2019-04-24 0:00 ` Richard Henderson
2019-04-16 12:57 ` [Qemu-devel] [PATCH 19/26] target/arm: Activate M-profile floating point context when FPCCR.ASPEN is set Peter Maydell
2019-04-16 12:57 ` Peter Maydell
2019-04-24 0:08 ` Richard Henderson
2019-04-24 0:08 ` Richard Henderson
2019-04-16 12:57 ` [Qemu-devel] [PATCH 20/26] target/arm: New helper function arm_v7m_mmu_idx_all() Peter Maydell
2019-04-16 12:57 ` Peter Maydell
2019-04-24 0:12 ` Richard Henderson
2019-04-24 0:12 ` Richard Henderson
2019-04-16 12:57 ` [Qemu-devel] [PATCH 21/26] target/arm: New function armv7m_nvic_set_pending_lazyfp() Peter Maydell
2019-04-16 12:57 ` Peter Maydell
2019-04-24 1:10 ` Richard Henderson
2019-04-24 1:10 ` Richard Henderson
2019-04-16 12:57 ` [Qemu-devel] [PATCH 22/26] target/arm: Add lazy-FP-stacking support to v7m_stack_write() Peter Maydell
2019-04-16 12:57 ` Peter Maydell
2019-04-24 1:27 ` Richard Henderson
2019-04-24 1:27 ` Richard Henderson
2019-04-16 12:57 ` [Qemu-devel] [PATCH 23/26] target/arm: Implement M-profile lazy FP state preservation Peter Maydell
2019-04-16 12:57 ` Peter Maydell
2019-04-24 2:04 ` Richard Henderson
2019-04-24 2:04 ` Richard Henderson
2019-04-16 12:57 ` [Qemu-devel] [PATCH 24/26] target/arm: Implement VLSTM for v7M CPUs with an FPU Peter Maydell
2019-04-16 12:57 ` Peter Maydell
2019-04-24 2:17 ` Richard Henderson
2019-04-24 2:17 ` Richard Henderson
2019-04-16 12:57 ` [Qemu-devel] [PATCH 25/26] target/arm: Implement VLLDM " Peter Maydell
2019-04-16 12:57 ` Peter Maydell
2019-04-24 2:21 ` Richard Henderson
2019-04-24 2:21 ` Richard Henderson
2019-04-16 12:57 ` [Qemu-devel] [PATCH 26/26] target/arm: Enable FPU for Cortex-M4 and Cortex-M33 Peter Maydell
2019-04-16 12:57 ` Peter Maydell
2019-04-24 2:25 ` Richard Henderson
2019-04-24 2:25 ` Richard Henderson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190416125744.27770-1-peter.maydell@linaro.org \
--to=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).