-
Notifications
You must be signed in to change notification settings - Fork 561
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
Add feature name (FEAT_) support to AArch64 instructions #5475
Comments
For improved unsupported/invalid instruction support, xref #431 and #1000 For the features: today we have There is no x86 connection today between those features and the IR due to early decisions not to include that data in the x86 decode table, which led to the drcpusim tool on x86 using helper functions like instr_is_sse2() which has its own list of opcodes outside of the table. It might be nice to go back and add feature info into the table eventually, so ideally new interfaces we add should be able to apply to x86 without change. (It sounds like that is the case other than the relationship to the existing interface.) |
Looking at the In terms of implementation, I think AArch64 can use the method similar to x86 but reading from system registers like
That seems fine to me. I can't imagine users complaining about the longform.
I don't think so, now that you've made me aware of I'll need to think about our use-cases more, but if possible we should remain consistent and use |
This patch implements the codec side of the AArch64 FEATURE_ support patch, PR5491. A feature name field is added to each opcode in codec_*.txt files which is used to generate feature checks in the encoder, e.g. switch (instr->opcode) { case OP_cas: # if !defined(DR_HOST_NOT_TARGET) && !defined(STANDALONE_DECODER) if (!proc_has_feature(FEATURE_LSE)) return ENCFAIL; # endif enc = encode_opndsgen_08a07c00_001f03ff(pc, instr,..., di); if (enc != ENCFAIL) return enc; Issues: #5475, #1569, #2626
This patch implements the codec side of the AArch64 FEATURE_ support patch, PR #5491. A feature name field is added to each opcode in codec_*.txt files which is used to generate feature checks in the encoder, e.g. switch (instr->opcode) { case OP_cas: # if !defined(DR_HOST_NOT_TARGET) && !defined(STANDALONE_DECODER) if (!proc_has_feature(FEATURE_LSE)) return ENCFAIL; # endif enc = encode_opndsgen_08a07c00_001f03ff(pc, instr,..., di); if (enc != ENCFAIL) return enc; Issues: #5475, #1569, #2626
AArch64 instructions are characterised by a feature name starting with
FEAT_
, see:https://developer.arm.com/downloads/-/exploration-tools/feature-names-for-a-profile
Implementations of the AArch64 architecture are more accurately described by
FEAT_
feature names, than by vX.Y versions, see the explanation at #5334 (comment)This issue will clarify how
FEAT_
should be implemented. The following is proposed:dr_isa_feat_t
similar todr_isa_mode_t
but for AArch64 only.dr_get_isa_feat()
andinstr_set_isa_feat()
.FEAT_
for all instructions after base v8.0.ID_AA64ISAR0_EL1
,ID_AA64ISAR1_EL1
andID_AA64PFR0_EL1
will be read on DynamoRIO startup in order to establish whichFEAT_
s are implemented by the h/w. During instruction decode and encode, the instruction'sFEAT_
will be checked against theFEAT_
list implemented by the h/w, delivering an error message if theFEAT_
is not implemented.The text was updated successfully, but these errors were encountered: