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

Add document for -mstrict-align and -mno-strict-align #49

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

kito-cheng
Copy link
Collaborator

We have those two option for a while, but not document in this repo yet, however we are intend to claify the scope of the option recently, so it's time to document down what we have agree among different community.

@kito-cheng
Copy link
Collaborator Author

@kito-cheng
Copy link
Collaborator Author

kito-cheng commented May 29, 2024

@kito-cheng kito-cheng requested a review from cmuellner May 29, 2024 08:58
@topperc
Copy link
Contributor

topperc commented Jun 6, 2024

CC @preames

README.mkd Outdated Show resolved Hide resolved
Copy link

@nick-knight nick-knight left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have no objection to documenting the current behavior.

README.mkd Outdated Show resolved Hide resolved
Copy link
Collaborator

@cmuellner cmuellner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.
Should we also mention that intrinsics are covered, but inline-assembly is not?

topperc added a commit to topperc/llvm-project that referenced this pull request Jun 10, 2024
…. Alias -m[no-]strict-align to scalar.

__riscv_misaligned_fast will be set based on -mno-scalar-strict-align
or -mno-strict-align.

This matches the direction gcc is proposing.

See
riscv-non-isa/riscv-c-api-doc#73
riscv-non-isa/riscv-toolchain-conventions#49
riscv-non-isa/riscv-toolchain-conventions#50
riscv-non-isa/riscv-c-api-doc#80
@kito-cheng
Copy link
Collaborator Author

Update to reflect the discussion within GCC and LLVM community: keep it control both scalar and vector unaligned access, because LLVM already use that semantic for more than one release, change it is not good idea, also GCC 14 isn't really control vector memory by -mstrict-align...it's always allowed in GCC 14, so we'll gonna "fix" GCC 14 to fix this behavior

We have those two option for a while, but not document in this repo yet,
however we are intend to claify the scope of the option recently, so
it's time to document down what we have agree among different community.
@kito-cheng
Copy link
Collaborator Author

Update:

  • Update the option priority for unaligned access.

Copy link
Contributor

@topperc topperc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

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

Successfully merging this pull request may close these issues.

None yet

4 participants