Your country

Tools that support it use your country for local currency, number formats, units and paper size. Your choice is saved only in this browser.

Type a name or a two-letter code. Use the up and down arrow keys to move through the countries, Enter to choose one and Escape to close.

Assembly (x86-64, AArch64, RISC-V)  Module 19 – The three ISAs today, compared

AArch64 today: Armv9 features on real machines

Read Arm FEAT_ names and the version that made each feature optional or mandatory, then see which features one Apple silicon Mac reports and runs.

  • Advanced
  • 10 minutes
  • Examples run with Python 3.14.8
  • By MySmartCoPilot
Free core, Pro depth: 4 of 10 minutes free
Free: Arm names each optional feature and dates it by version · A machine reports its features through the operating system · Practise. With a pass: 2 in-depth parts and 3 interview answers, about 6 minutes.

What you will learn

  • Read an Arm FEAT_ name and find the version that made the feature optional or mandatory
  • Identify the features a processor reports through macOS sysctl keys or Linux HWCAP bits
  • Describe what PAC, BTI, MTE, LSE, SVE and SME each add to AArch64
  • Recognise LSE, CSSC and SME instructions in compiler output and in runs on Apple silicon
  • Compare the Apple, Linux and Windows platform ABIs for AArch64 in compiler output

Before you start

What you’ll learn · Before you start

What you will learn

  • Read an Arm FEAT_ name and find the version that made the feature optional or mandatory
  • Identify the features a processor reports through macOS sysctl keys or Linux HWCAP bits
  • Describe what PAC, BTI, MTE, LSE, SVE and SME each add to AArch64
  • Recognise LSE, CSSC and SME instructions in compiler output and in runs on Apple silicon
  • Compare the Apple, Linux and Windows platform ABIs for AArch64 in compiler output

Before you start

On this page

On an Apple M5 Pro, macOS has 60 keys that carry Arm FEAT_ names, and 55 of them read 1; the Scalable Vector Extension, which Armv9 leaves optional, has no key at all. Each optional Arm feature has a FEAT_ name and a version that allowed it, and reading both, then reading what a machine reports, is how code uses what a processor has and nothing it lacks.

This page reads the names, the versions and one machine’s report. Its two further parts follow three features into compiler output and runs on that machine, and compare the rules Apple, Linux and Windows set on one instruction set.

Arm names each optional feature and dates it by version

Arm’s feature list gives every optional piece of the architecture a Arm feature name: The name Arm gives each optional part of its A-profile architecture, such as FEAT_LSE or FEAT_SME, listed with the version that made it optional and, for many, the version that made it mandatory. such as FEAT_LSE, a one-line title and two facts: the first version in which it is optional and, for many, the version from which it is mandatory. Code built for a version may assume its mandatory features and must test for the optional ones. Six names come up again and again:

  • PAC (FEAT_PAuth) signs pointers with a short code in their unused high bits and checks it before use.
  • BTI marks the instructions an indirect branch may land on.
  • MTE gives memory and pointers small tags and can fault when they disagree.
  • LSE adds atomic read-modify-write instructions such as ldadd, cas and swp.
  • SVE adds scalable vector: A SIMD extension whose vector length is picked by the implementation, so one binary runs on a 128-bit core and on a 2048-bit core without being recompiled. SVE on AArch64 and V 1.0 on RISC-V are scalable. More in “SIMD concepts and CPU feature detection”, whose length the processor chooses, from 128 to 2048 bits.
  • SME adds matrix storage and a streaming mode: A processor state that SME adds to AArch64, entered with smstart sm and left with smstop sm, in which SVE instructions run at a streaming vector length of its own. More in “SIMD concepts and CPU feature detection” that runs vector code at its own length.

Walk through the versions to see when each became optional and when it became mandatory:

Timeline · 9 events in order When the features this page names became optional and mandatory Walk through the Arm A-profile versions in order; each event names what became optional or mandatory there.
  1. Armv8.0

    The A64 instruction set, with LSE optional optional LSE

    Armv8.0 defines AArch64 and its A64 instructions. FEAT_LSE, the Large System Extensions with single-instruction atomics, is already allowed as an option.

  2. Armv8.1

    LSE becomes mandatory mandatory LSE

    From Armv8.1 every implementation has FEAT_LSE, so code built for Armv8.1 or later may use ldadd, cas and swp without testing for them.

  3. Armv8.2

    SVE and pointer authentication allowed optional SVE, PAuth

    FEAT_SVE, the Scalable Vector Extension, and FEAT_PAuth, pointer authentication, become optional; so do BF16 and FP16 arithmetic.

  4. Armv8.3

    Pointer authentication becomes mandatory mandatory PAuth

    From Armv8.3 FEAT_PAuth is mandatory, so every later processor can sign and check pointers.

  5. Armv8.4

    BTI and MTE allowed, DIT mandatory

    FEAT_BTI, branch target identification, and FEAT_MTE, the Memory Tagging Extension, become optional; FEAT_DIT, data-independent timing, becomes mandatory.

  6. Armv8.5

    BTI becomes mandatory mandatory BTI

    From Armv8.5 FEAT_BTI is mandatory. MTE stays optional in every later version, which is why a processor's report still matters.

  7. Armv8.7

    CSSC allowed

    FEAT_CSSC adds short scalar instructions such as cnt, ctz, abs and smin on general-purpose registers. It becomes optional here and mandatory from Armv8.9.

  8. Armv9.0

    Armv8.5 plus a mandatory set of its own Armv9

    An Armv9.0 implementation must be Armv8.5 compliant and add the mandatory Armv9.0 features. FEAT_SVE2 is optional from Armv9.0; Arm's list adds that Armv9-A systems for rich operating systems also provide hardware support for SVE2, yet no version makes SVE or SVE2 mandatory, so code still reads the report.

  9. Armv9.2

    SME and SME2 allowed optional SME

    FEAT_SME, the Scalable Matrix Extension, with its streaming mode, and FEAT_SME2 become optional. SVE stays optional too, so a processor may have SME without SVE.

The timeline has 9 events, from Armv8.0 to Armv9.2.

The pattern to keep is the gap between the two dates. LSE has been mandatory since Armv8.1 and BTI since Armv8.5, but MTE, SVE and SME stay optional in every version, Armv9 included. An Armv9.0 processor must be Armv8.5 compliant and add the Armv9.0 mandatory set, so Armv9 makes neither SVE nor MTE mandatory.

Checkpoint

Check: FEAT_ names and the versions behind them

  1. Question 1 of 2 Code is built for Armv8.5. Which of these features may it use without a run-time test?

    Choose every answer that is right.

    Show the answer: Question 1 of 2

    Answer:

    • BTI
    • LSE

    A version promises only its mandatory features. LSE (Armv8.1) and BTI (Armv8.5) are mandatory by Armv8.5; MTE and SVE are optional in every version.

  2. Question 2 of 2 A product sheet calls a processor Armv9.2. Does that alone let your code use SVE instructions?

    Choose one answer.

    Show the answer: Question 2 of 2

    Answer: No: SVE is optional in every version, so the code must read the processor's report first

    Arm versions bundle mandatory features. SVE, SME and MTE stay optional, so "Armv9.2" never settles whether SVE instructions will run.

A machine reports its features through the operating system

User code cannot read the processor’s ID registers directly, so each operating system reports them. macOS exposes one sysctl key per feature, hw.optional.arm.FEAT_LSE and the rest; Linux sets bits in the HWCAP: A word of bits the Linux kernel passes to every program in its auxiliary vector, one bit per processor feature it offers, such as HWCAP_ATOMICS on AArch64. Programs read it with getauxval(AT_HWCAP). words of the auxiliary vector, read with getauxval(AT_HWCAP), AT_HWCAP2 and AT_HWCAP3. The session reads the keys on an Apple M5 Pro:

The Arm feature keys macOS reports on an Apple M5 Pro Python · features_session.py
import pathlib
import sys

sys.path.insert(0, str(pathlib.Path(__file__).parent / "sessions"))
import session

session.run("""
# The processor, and how many Arm feature keys macOS reports for it, then how many of them are set to 1
/usr/sbin/sysctl -n machdep.cpu.brand_string
/usr/sbin/sysctl hw.optional.arm | grep -c 'FEAT_'
/usr/sbin/sysctl hw.optional.arm | grep -c 'FEAT_.*: 1$'
# The six features this page names, in the order the page names them
/usr/sbin/sysctl hw.optional.arm.FEAT_PAuth hw.optional.arm.FEAT_BTI hw.optional.arm.FEAT_MTE hw.optional.arm.FEAT_LSE
/usr/sbin/sysctl hw.optional.arm.FEAT_SME hw.optional.arm.FEAT_SME2
# SVE has no key at all on this processor
/usr/sbin/sysctl hw.optional.arm.FEAT_SVE
""")

Output

# The processor, and how many Arm feature keys macOS reports for it, then how many of them are set to 1
$ /usr/sbin/sysctl -n machdep.cpu.brand_string
Apple M5 Pro
$ /usr/sbin/sysctl hw.optional.arm | grep -c 'FEAT_'
60
$ /usr/sbin/sysctl hw.optional.arm | grep -c 'FEAT_.*: 1$'
55
# The six features this page names, in the order the page names them
$ /usr/sbin/sysctl hw.optional.arm.FEAT_PAuth hw.optional.arm.FEAT_BTI hw.optional.arm.FEAT_MTE hw.optional.arm.FEAT_LSE
hw.optional.arm.FEAT_PAuth: 1
hw.optional.arm.FEAT_BTI: 1
hw.optional.arm.FEAT_MTE: 1
hw.optional.arm.FEAT_LSE: 1
$ /usr/sbin/sysctl hw.optional.arm.FEAT_SME hw.optional.arm.FEAT_SME2
hw.optional.arm.FEAT_SME: 1
hw.optional.arm.FEAT_SME2: 1
# SVE has no key at all on this processor
$ /usr/sbin/sysctl hw.optional.arm.FEAT_SVE
sysctl: unknown oid 'hw.optional.arm.FEAT_SVE'
[exit status 1]

Recorded with Python 3.14.8 on macOS 26 arm64. To run it yourself: mise exec python@3.14.8 -- python3 features_session.py

Of the six features above, five read 1 and FEAT_SVE is an unknown key. The same features have these names on Linux, where the kernel documents which ID-register field each bit stands for:

Feature macOS sysctl key Linux HWCAP bit M5 Pro
LSE hw.optional.arm.FEAT_LSE HWCAP_ATOMICS 1
PAC hw.optional.arm.FEAT_PAuth HWCAP_PACA, HWCAP_PACG 1
BTI hw.optional.arm.FEAT_BTI HWCAP2_BTI 1
MTE hw.optional.arm.FEAT_MTE HWCAP2_MTE 1
SVE hw.optional.arm.FEAT_SVE HWCAP_SVE no key
SME hw.optional.arm.FEAT_SME HWCAP2_SME 1

A report says what the processor and the kernel offer, not what a binary uses. That takes compiler options or run-time checks, the subject of this page’s first further part; its second compares the platform ABIs: Apple’s, Linux’s AAPCS64 and Windows on Arm’s.

Key idea

Read a feature’s name and its versions in Arm’s list, then read the machine’s report before using it: a version promises only the features it makes mandatory.

Checkpoint

Check: How a machine reports its features

  1. Question 1 of 2 What did sysctl print for hw.optional.arm.FEAT_SVE on the recorded M5 Pro?

    Choose one answer.

    Show the answer: Question 1 of 2

    Answer: An unknown-oid error: macOS has no such key on that machine

    A missing key and a key at 0 both mean the feature cannot be used. Code that tests the key must treat an error as "absent".

  2. Question 2 of 2 Which Linux HWCAP bit stands for FEAT_LSE?

    Choose one answer.

    Show the answer: Question 2 of 2

    Answer: HWCAP_ATOMICS

    The names differ by system: macOS uses the FEAT_ name in its sysctl key, Linux uses its own HWCAP names, such as HWCAP_ATOMICS for LSE and HWCAP_PACA for pointer authentication.

Practise

  1. Run sysctl hw.optional.arm on any Apple silicon Mac and count the FEAT_ keys at 1, as the session’s grep does; compare the count with the 55 above.
  2. Pick two FEAT_ names from the session and find the version that made each optional in Arm’s feature list.
  3. On a Linux AArch64 machine, print getauxval(AT_HWCAP) from a small C program and test the HWCAP_ATOMICS bit, as the kernel’s hwcaps documentation shows.

Practice that adapts to you

Practise this lesson

10 questions about 4 ideas of this lesson. Each answer is explained at once, and what you get right is kept in this browser.

  1. Question 1 of 10 From which Arm version is FEAT_LSE mandatory?

    Choose one answer.

    Show the answer: Question 1 of 10

    Answer: Armv8.1

    FEAT_LSE, the Large System Extensions, is optional from Armv8.0 and mandatory from Armv8.1.

  2. Question 2 of 10 What does BTI add?

    Choose one answer.

    Show the answer: Question 2 of 10

    Answer: Marks the instructions an indirect branch may land on

    BTI is the landing-pad half of Arm's control-flow protection; PAC is the pointer-signing half.

  3. Question 3 of 10 Which feature gives memory and pointers small tags and can fault when they disagree?

    Choose one answer.

    Show the answer: Question 3 of 10

    Answer: MTE

    MTE is optional from Armv8.4 and stays optional, so code that relies on it reads the machine's report first.

  4. Question 4 of 10 A team needs vector code that runs at a length set by the processor, inside a mode it enters and leaves. Which feature provides that mode?

    Choose one answer.

    Show the answer: Question 4 of 10

    Answer: SME, through its streaming mode

    SVE gives scalable vectors in normal mode; SME adds matrix storage and a streaming mode with its own vector length, and a processor may have either without the other.

  5. Question 5 of 10 Arm's feature list defines an Armv9.0-compliant processor as compliant with which earlier version, plus the Armv9.0 mandatory set?

    Choose one answer.

    Show the answer: Question 5 of 10

    Answer: Armv8.5

    So an Armv9.0 processor has every feature mandatory by Armv8.5, LSE and BTI among them, and still tests for the optional ones.

  6. Question 6 of 10 A build assumes Armv8.7 and uses CSSC's scalar cnt without a test. Is that safe on every Armv8.7 processor?

    Choose one answer.

    Show the answer: Question 6 of 10

    Answer: No: CSSC is only optional in Armv8.7; it is mandatory from Armv8.9

    The first version a feature appears in usually makes it optional. Only the version that makes it mandatory lets code skip the test.

  7. Question 7 of 10 How does a program on macOS ask whether the processor has LSE?

    Choose one answer.

    Show the answer: Question 7 of 10

    Answer: It reads the sysctl key hw.optional.arm.FEAT_LSE

    Each operating system reports features its own way: sysctl keys on macOS, HWCAP bits in the auxiliary vector on Linux.

  8. Question 8 of 10 Where does a Linux program find the HWCAP bits?

    Choose one answer.

    Show the answer: Question 8 of 10

    Answer: In the auxiliary vector, read with getauxval(AT_HWCAP) and AT_HWCAP2

    The kernel fills the auxiliary vector when it starts a program; HWCAP and HWCAP2 hold one bit per feature, such as HWCAP_ATOMICS for LSE.

  9. Question 9 of 10 Your feature check reads hw.optional.arm.FEAT_SVE and the call fails with an unknown-key error. What should the code conclude?

    Choose one answer.

    Show the answer: Question 9 of 10

    Answer: SVE is not available: treat a missing key like a key at 0

    A feature check fails closed: unless the report says 1, the code takes the path that does not need the feature.

  10. Question 10 of 10 sysctl shows hw.optional.arm.FEAT_CSSC: 1 on a build machine. What does that tell you about the binaries it produces?

    Choose one answer.

    Show the answer: Question 10 of 10

    Answer: Nothing by itself: they use CSSC only if the compiler targets a processor with it or a run-time check picks it

    Reading a report and using a feature are separate steps. A binary's own instructions, or its dispatcher, decide what it runs.

Three features as instructions: LSE, CSSC and SME on Apple silicon Pro: opens with a Pro, Premium or Ultimate pass

A feature key becomes useful when it changes the instructions a program runs. This part builds code for three of those features, LSE, CSSC and SME, runs the CSSC and SME code on the M5 Pro, and runs one SVE instruction there too, although the report says the processor has no SVE.

In this part:

  • An atomic increment becomes one instruction from Armv8.1
  • A helper can choose between the two forms at run time
  • CSSC appears only when the compiler knows the processor has it
  • SME without SVE: one vector length reads, the other faults

4 runnable examples (C, Python, cssc.s, cssc_main.c, popcount.c, vl.s, vl_main.c) · about 5 minutes

Opening this part with your pass…

This part opens with any MySmartCoPilot pass.

  • Pro pass · 1 week₹79$2.99
  • 30 days₹179$5.99
  • 1 year₹1,699$45

One payment; a pass never renews. The price shown is the total you pay: no fees or charges are added at checkout.

It also opens every other in-depth part in Learn and every Pro tool. Sales are final, except where the law gives you a right to withdraw, for example in the EU and the UK (refund policy).

Apple, Linux and Windows: three ABIs on one instruction set, measured Pro: opens with a Pro, Premium or Ultimate pass

The instructions are the same on every AArch64 platform, but the rules for calling, sizes and reserved registers are not. This part asks the compiler five questions for three targets and reads the answers in its output.

In this part:

  • A char is signed on two platforms and unsigned on one
  • long and long double change size by platform
  • Variadic arguments go straight to the stack only on Apple
  • A variadic double travels three different ways
  • Two platforms keep x18 for themselves

2 runnable examples (C, Python) · about 5 minutes

Opening this part with your pass…

This part opens with any MySmartCoPilot pass.

  • Pro pass · 1 week₹79$2.99
  • 30 days₹179$5.99
  • 1 year₹1,699$45

One payment; a pass never renews. The price shown is the total you pay: no fees or charges are added at checkout.

It also opens every other in-depth part in Learn and every Pro tool. Sales are final, except where the law gives you a right to withdraw, for example in the EU and the UK (refund policy).

Interview questions

What does a FEAT_ name such as FEAT_LSE tell you, and what does it not?

A FEAT_ name tells you which architectural feature you are talking about and, through Arm’s feature list, the version that made it optional and the version that made it mandatory: FEAT_LSE is optional from Armv8.0 and mandatory from Armv8.1. It does not tell you whether a given processor has it, or whether your binary uses it. For that you read the machine’s report, a sysctl key on macOS or a HWCAP bit on Linux, and the instructions your compiler emitted.

Three of this module’s bank questions start where this page stops: a fast path chosen at run time, a library ported between platform ABIs, and vector code for a processor with SME but no SVE.

  1. Mid to senior

    Your library has an LSE fast path and a load-exclusive fallback for its 64-bit counters. How would you choose between them at run time on macOS and on Linux, and which mistakes make the fast path crash or never run?

    Model answer, Pro. Model answers open with any pass; prices are in the notice on this page. First step and follow-ups

  2. Mid to staff

    A C parser passes every test on AArch64 Linux, but on Apple silicon and Windows on Arm it misreads some bytes, and one variadic logging call prints garbage on macOS. Which ABI differences would you check first, and how would you confirm each one?

    Model answer, Pro. First step and follow-ups

  3. Senior to staff

    A teammate sees FEAT_SME2 set on an Apple M5-class Mac, enables the project's SVE kernels, and the program dies with SIGILL. Explain what happened, and how you would structure the vector code for that machine and for Linux servers with SVE.

    Model answer, Pro. First step and follow-ups

Flashcards · 4 cards

Recall it, then check

Say the answer to yourself before you look: recalling it is what makes it stick.

  1. What does a FEAT_ name such as FEAT_LSE tell you, and what does it not?

    It names one architectural feature, and Arm's list gives the version that made it optional and often the one that made it mandatory: FEAT_LSE is optional from Armv8.0 and mandatory from Armv8.1. It does not say whether a given processor has it, or whether your binary uses it.

  2. What does targeting an Arm architecture version promise about features?

    Only the features that version makes mandatory. LSE is mandatory from Armv8.1 and BTI from Armv8.5, while MTE, SVE and SME stay optional even in Armv9.

  3. How does a program learn which Arm features a machine really has?

    It reads the operating system's report: sysctl keys on macOS, HWCAP bits on Linux, which a program reads with getauxval(AT_HWCAP), one bit per feature such as HWCAP_ATOMICS.

  4. Besides the machine's report, what must you check before relying on an Arm feature?

    The instructions your compiler actually emitted, since the feature name and the machine's support say nothing about whether the binary uses it.

Key takeaways

  • Every optional Arm feature has a FEAT_ name, a version from which it is optional and often one from which it is mandatory, and a version promises only its mandatory features.
  • LSE and BTI are mandatory from Armv8.1 and Armv8.5, while MTE, SVE and SME stay optional even in Armv9.
  • macOS reports features as sysctl keys and Linux as HWCAP bits, and the recorded M5 Pro reports SME but has no SVE key.

Terms in this lesson

Arm feature name
The name Arm gives each optional part of its A-profile architecture, such as FEAT_LSE or FEAT_SME, listed with the version that made it optional and, for many, the version that made it mandatory.
HWCAP
A word of bits the Linux kernel passes to every program in its auxiliary vector, one bit per processor feature it offers, such as HWCAP_ATOMICS on AArch64. Programs read it with getauxval(AT_HWCAP).

References

Report a problem with this lesson

Quick answers and tool search

Type to search tools or to get a quick answer, for example 18% of 2500. Use the up and down arrow keys to move through the results, Enter to choose, and Escape to close.