Skip to content

Commit

Permalink
Define new value for the __ARM_ACLE macro (ARM-software#294)
Browse files Browse the repository at this point in the history
The ACLE defines a feature macro called __ARM_ACLE:

__ARM_ACLE is defined to the version of this specification implemented,
as 100 * major_version + minor_version. An implementation implementing
version 2.1 of the ACLE specification will define __ARM_ACLE as 201.

However, a long time ago, we changed the versioning scheme of the ACLE
from "major.minor" to a combination of year and quarter. For instance
the latest release is 2023 Q2.

Since the macro's definition is now out of date, we now move to a new
scheme:

`__ARM_ACLE` is defined to the version of this specification implemented,
formatted as `{YEAR}{QUARTER}{PATCH}`.

The value would be the integer formed by the year (4 digits)
concatenated to the quarter's number (1 digit), finally concatenated to
the patch release (1 digit). So the macro's value for the 2023 Q2
release with no patch release would then be 202320. Using 4 digits for
the year, and having it preceding the quarter, will be helpful to
ensure the formed integer values will be greater than the ones using the
previous/current format.
  • Loading branch information
vhscampos authored and hassnaaHamdi committed Mar 11, 2024
1 parent f8141ca commit 02abcab
Showing 1 changed file with 19 additions and 4 deletions.
23 changes: 19 additions & 4 deletions main/acle.md
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,8 @@ Armv8.4-A [[ARMARMv84]](#ARMARMv84). Support is added for the Dot Product intrin

#### Changes for next release

* Changed the definition of the `__ARM_ACLE` macro to reflect the current
versioning scheme.
* Combined the SME `slice_base` and `slice_offset` arguments into a
single `slice` argument.
* Added the [Keyword attributes](#keyword-attributes) section.
Expand Down Expand Up @@ -1327,10 +1329,23 @@ enclose them in parentheses if they are not simple constants.

## Testing for Arm C Language Extensions

`__ARM_ACLE` is defined to the version of this specification
implemented, as `100 * major_version + minor_version`. An implementation
implementing version 2.1 of the ACLE specification will define
`__ARM_ACLE` as 201.
`__ARM_ACLE` is defined as the version of this specification that is
implemented, formatted as `{YEAR}{QUARTER}{PATCH}`. The `YEAR` segment is
composed of 4 digits, the `QUARTER` segment is composed of 1 digit, and
the `PATCH` segment is also composed of 1 digit.

For example:

- An implementation based on the version 2023 Q2 of the ACLE with no
further patch releases will define `__ARM_ACLE` as `202320`.
- An implementation based on a hypothetical version 2024 Q3 of the ACLE
with two patch releases will define `__ARM_ACLE` as `202432`.

NOTE: Previously, the macro followed the previous versioning scheme and
was defined as `100 * major_version + minor_version`, which was the
version of this specification implemented. For instance, an implementation
implementing version 2.1 of the ACLE specification defined `__ARM_ACLE`
as `201`.

## Endianness

Expand Down

0 comments on commit 02abcab

Please sign in to comment.