-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FMV] Unify memtag and memtag2. #351
Conversation
Ok, here's a suggestion that might seem to go against stuff I've previously said. How about we call the FMV feature "memtag2" to deliberately distinguish it from the "memtag" command line option? The justification for this is:
So the FMV feature "memtag2" would deliberately have a slightly different definition to the command line option "memtag". Internally the compiler may choose to handle this by mapping the FMV feature directly to the command line option, with the caveat that enabling the command line option does not necessarily imply that the FMV feature will be enabled at runtime. (Adding @Wilco1 as well) |
My understanding of FEAT_MTE vs FEAT_MTE2 is that (excepting the small number of EL1 instructions that are FEAT_MTE2 only) they offer the same set of instructions, which
As far as the compiler is concerned, there is no difference between FEAT_MTE and FEAT_MTE2. The codegen should be identical. This is probably why they were historically combined into FMV complicates the situation because it is for runtime dispatch, and there is a difference between systems that implement FEAT_MTE and FEAT_MTE2. This is why it introduced You might want to detect whether you have FEAT_MTE2 rather than FEAT_MTE in order to use the EL1 instructions. However, apparently FMV targets EL0 which would mean there is no need to support that in FMV. Since we have gone down the path of keeping FMV names in sync with command line names, I think it would be silly to deviate from that at this point. I suggest we keep |
I find this argument irrelevant. There are other features we intend to detect with HWCAPS which are available to the user under a different name than the HWCAP macro (HWCAP_PMULL detects "aes" for example), or features whose name corresponds to a different architectural extension (HWCAP_SSBS detects "ssbs" which means FEAT_SSBS2).
Can you explain what do you mean here? I am not getting it.
I agree. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
for the developers memtag here would mean tagging is available and usable.
maybe memtag2 could be an alias to memtag.
If we split these features in the compiler (see relevant pull request llvm#109299), we would only be able to hand-write a 'memtag2' version using inline assembly since the compiler cannot generate the instructions that become available with FEAT_MTE2. However these instructions only work at Exception Level 1, so they would be unusable since FMV is a user space facility. I am therefore unifying them. Approved in ACLE as ARM-software/acle#351
If we split these features in the compiler (see relevant pull request #109299), we would only be able to hand-write a 'memtag2' version using inline assembly since the compiler cannot generate the instructions that become available with FEAT_MTE2. However these instructions only work at Exception Level 1, so they would be unusable since FMV is a user space facility. I am therefore unifying them. Approved in ACLE as ARM-software/acle#351
If we split these features in the compiler (see relevant pull request llvm#109299), we would only be able to hand-write a 'memtag2' version using inline assembly since the compiler cannot generate the instructions that become available with FEAT_MTE2. However these instructions only work at Exception Level 1, so they would be unusable since FMV is a user space facility. I am therefore unifying them. Approved in ACLE as ARM-software/acle#351
If we split these features in the compiler (see relevant pull request llvm/llvm-project#109299), we would only be able to hand-write a 'memtag2' version using inline assembly since the compiler cannot generate the instructions that become available with FEAT_MTE2. However these instructions only work at Exception Level 1, so they would be unusable since FMV is a user space facility. I am therefore unifying them in the ACLE specification.
If we split these features in the compiler (see relevant pull request llvm/llvm-project#109299), we would only be able to hand-write a 'memtag2' version using inline assembly since the compiler cannot generate the instructions that become available with FEAT_MTE2. On top of that these instructions only work at Exception Level 1, so they would be unusable since FMV is a user space facility. I am therefore unifying them in the ACLE specification.
name: Pull request
about: Technical issues, document format problems, bugs in scripts or feature proposal.
Thank you for submitting a pull request!
If this PR is about a bugfix:
Please use the bugfix label and make sure to go through the checklist below.
If this PR is about a proposal:
We are looking forward to evaluate your proposal, and if possible to
make it part of the Arm C Language Extension (ACLE) specifications.
We would like to encourage you reading through the contribution
guidelines, in particular the section on submitting
a proposal.
Please use the proposal label.
As for any pull request, please make sure to go through the below
checklist.
Checklist: (mark with
X
those which apply)PR (do not bother creating the issue if all you want to do is
fixing the bug yourself).
SPDX-FileCopyrightText
lines on topof any file I have edited. Format is
SPDX-FileCopyrightText: Copyright {year} {entity or name} <{contact informations}>
(Please update existing copyright lines if applicable. You can
specify year ranges with hyphen , as in
2017-2019
, and usecommas to separate gaps, as in
2018-2020, 2022
).Copyright
section of the sources of thespecification I have edited (this will show up in the text
rendered in the PDF and other output format supported). The
format is the same described in the previous item.
tricky to set up on non-*nix machines). The sequence can be
found in the contribution
guidelines. Don't
worry if you cannot run these scripts on your machine, your
patch will be automatically checked in the Actions of the pull
request.
introduced in this PR in the section Changes for next
release of the section Change Control/Document history
of the document. Create Changes for next release if it does
not exist. Notice that changes that are not modifying the
content and rendering of the specifications (both HTML and PDF)
do not need to be listed.
correctness of the result in the PDF output (please refer to the
instructions on how to build the PDFs
locally).
draftversion
is set totrue
in the YAML headerof the sources of the specifications I have modified.
in the README page of the project.