Showing changes from revision #3 to #4:
Added | Removed | Changed
Entry | |
---|---|
R0 | 34 + flags (reserved) |
R1 | >= 0: Flag number to read |
< 0: Return bit masks for flags page number NOT R1 |
When reading an individual flag:
Exit | |
---|---|
R0 | 0 → Flag is clear |
1 → Flag is set | |
-1 → Flag is unknown |
When reading a flags page:
Exit | |
---|---|
R0 | Word 0 of flag values |
R1 | Word 1 of flag values |
R2 | Word 2 of flag values |
R3 | Word 3 of flag values |
R4 | Word 0 validity mask |
R5 | Word 1 validity mask |
R6 | Word 2 validity mask |
R7 | Word 3 validity mask |
This SWI allows you to query the system to determine whether arbitrary CPU features are supported by the host machine. Mainly this information relates to the availability of different instructions or instruction groups.
The call has two forms; passing a positive or zero value in R1 allows for a single feature to be queried, while passing a negative value allows for an entire ‘page’ of features to be queried, with each page containing 128 feature flags. E.g. calling with R1 = -1 will return the information for page 0, which will cover flag bits 0-127.
When querying by page, the bits in R0 represent bits 0-31 of the page, R1 represents bits 32-63, etc. The bits in R4-R7 indicate which bits in R0-R3 are valid; if a bit is clear then it indicates the OS version does not understand or contain support for querying that particular feature.
If an unknown feature page is requested then all of R0-R7 will be returned as zero.
Care must be taken when calling this reason code; see the main OS_PlatformFeatures page.