Skip to content
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

PCS is not clear if SVE VG can be changed #260

Open
a74nh opened this issue Apr 24, 2024 · 0 comments
Open

PCS is not clear if SVE VG can be changed #260

a74nh opened this issue Apr 24, 2024 · 0 comments

Comments

@a74nh
Copy link

a74nh commented Apr 24, 2024

The Procedure Call Standard for the Arm® 64-bit Architecture (AArch64) states:

Like a short vector (see Short Vectors), a scalable vector is a machine type that is composed of repeated instances of one fundamental integral or floating-point type. The number of bytes in the vector is always VG×8, where VG is a runtime value determined by the execution environment. VG is an even integer greater than or equal to 2; the ABI does not define an upper bound. VG is the same for all scalable vector types and scalable predicate types.

This states that VG is a runtime value. It is not explicit in stating if this is a fixed value.

If a program whilst executing were to use Linux syscall prctl() to change the vector length, then that would change VG. It's not clear if this breaks the Procedure Call Standard. Is it ok for a function to change the vector length, call new functions, reset the vector length to it's previous value, then return? What happens if a function changes the vector length then returns without restoring the original value?

It would be useful if there was an additional paragraph clarifying this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant