<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/llvm/lib/Target/RISCV/MCTargetDesc/RISCVTargetStreamer.cpp, branch users/nico/python-2</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/'/>
<entry>
<title>[RISCV][NFC] Remove hasStdExtCOrZca (#145139)</title>
<updated>2025-06-23T17:49:47+00:00</updated>
<author>
<name>Sam Elliott</name>
<email>quic_aelliott@quicinc.com</email>
</author>
<published>2025-06-23T17:49:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=a6eb5eee38ee08fb8466956553e77177e2ad1b02'/>
<id>a6eb5eee38ee08fb8466956553e77177e2ad1b02</id>
<content type='text'>
As of 20b5728b7b1ccc4509a316efb270d46cc9526d69, C always enables Zca, so
the check `C || Zca` is equivalent to just checking for `Zca`.

This replaces any uses of `HasStdExtCOrZca` with a new `HasStdExtZca`
(with the same assembler description, to avoid changes in error
messages), and simplifies everywhere where C++ needed to check for
either C or Zca.

The Subtarget function is just deprecated for the moment.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
As of 20b5728b7b1ccc4509a316efb270d46cc9526d69, C always enables Zca, so
the check `C || Zca` is equivalent to just checking for `Zca`.

This replaces any uses of `HasStdExtCOrZca` with a new `HasStdExtZca`
(with the same assembler description, to avoid changes in error
messages), and simplifies everywhere where C++ needed to check for
either C or Zca.

The Subtarget function is just deprecated for the moment.</pre>
</div>
</content>
</entry>
<entry>
<title>[RISCV] Emit .note.gnu.property section when Zicfiss-based shadow stack is enabled (#127036)</title>
<updated>2025-05-14T03:48:59+00:00</updated>
<author>
<name>Ming-Yi Lai</name>
<email>ming-yi.lai@mediatek.com</email>
</author>
<published>2025-05-14T03:48:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=691ca556e04dafa3d755e975ea3432fbfd4ca9ad'/>
<id>691ca556e04dafa3d755e975ea3432fbfd4ca9ad</id>
<content type='text'>
RISC-V Zicfiss-based shadow stack needs to let the linker/loader know if
the binary is built with the mechanism enabled to support proper
link-time/load-time management of this feature. The information is
encoded as a bit in the `.note.gnu.property` section. This patch
implements emitting the section for RISC-V targets when Zicfiss-based
shadow stack is enabled.

When Clang receives the `-fcf-protection=return` flag, it adds the
`hw-shadow-stack` attribute to LLVM functions, and adds a non-zero
valued attribute named `cf-protection-return` to the LLVM module it
generates. The backend depends on the `hw-shadow-stack` attributes to
generate Zicfiss-based shadow stack instructions for each function, but
at the module scope, the `cf-protection-return` attribute is a better
indication of whether the translation unit is built with Zicfiss-based
shadow stack enabled, so this patch emits the `.note.gnu.property`
section with the "Zicfiss-based shadow stack" bit toggled on when it
sees the `cf-protection-return` attribute.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
RISC-V Zicfiss-based shadow stack needs to let the linker/loader know if
the binary is built with the mechanism enabled to support proper
link-time/load-time management of this feature. The information is
encoded as a bit in the `.note.gnu.property` section. This patch
implements emitting the section for RISC-V targets when Zicfiss-based
shadow stack is enabled.

When Clang receives the `-fcf-protection=return` flag, it adds the
`hw-shadow-stack` attribute to LLVM functions, and adds a non-zero
valued attribute named `cf-protection-return` to the LLVM module it
generates. The backend depends on the `hw-shadow-stack` attributes to
generate Zicfiss-based shadow stack instructions for each function, but
at the module scope, the `cf-protection-return` attribute is a better
indication of whether the translation unit is built with Zicfiss-based
shadow stack enabled, so this patch emits the `.note.gnu.property`
section with the "Zicfiss-based shadow stack" bit toggled on when it
sees the `cf-protection-return` attribute.</pre>
</div>
</content>
</entry>
<entry>
<title>[RISCV] Support .option {no}exact (#122483)</title>
<updated>2025-03-26T18:14:16+00:00</updated>
<author>
<name>Sam Elliott</name>
<email>quic_aelliott@quicinc.com</email>
</author>
<published>2025-03-26T18:14:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=6a371c7744c276c872fec4947f1642789e5b24ec'/>
<id>6a371c7744c276c872fec4947f1642789e5b24ec</id>
<content type='text'>
This implements [the `.option exact` and `.option noexact`
proposal](https://github.com/riscv-non-isa/riscv-asm-manual/pull/122)
for RISC-V.

`.option exact` turns off:
- Compression
- Branch Relaxation
- Linker Relaxation

`.option noexact` turns these back on, and is also the default, matching
the current behaviour.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This implements [the `.option exact` and `.option noexact`
proposal](https://github.com/riscv-non-isa/riscv-asm-manual/pull/122)
for RISC-V.

`.option exact` turns off:
- Compression
- Branch Relaxation
- Linker Relaxation

`.option noexact` turns these back on, and is also the default, matching
the current behaviour.</pre>
</div>
</content>
</entry>
<entry>
<title>[RISCV] Emitting proper atomic ABI tag when Zalasr is enabled (#121017)</title>
<updated>2025-03-03T19:34:52+00:00</updated>
<author>
<name>Brendan Sweeney</name>
<email>brs@eecs.berkeley.edu</email>
</author>
<published>2025-03-03T19:34:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=4fd5d935a3d30d20aed7697be5d8bb76dae8eab6'/>
<id>4fd5d935a3d30d20aed7697be5d8bb76dae8eab6</id>
<content type='text'>
When Zalasr is enabled, it will emit the A7 atomic ABI tag. Zalasr is
the load-acquire and store-release extension, and the reason A7 (and
A6S) exists is to support it.

The A7 atomic ABI is compatible with A6S (which is what is currently
emitted as the tag), but A7 is not compatible with A6C, while A6C and
A6S are compatible.


https://github.com/riscv-non-isa/riscv-elf-psabi-doc/blob/master/riscv-atomic.adoc#risc-v-atomics-mappings


https://github.com/riscv-non-isa/riscv-elf-psabi-doc/blob/master/riscv-elf.adoc#tag_riscv_atomic_abi-14-uleb128version</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When Zalasr is enabled, it will emit the A7 atomic ABI tag. Zalasr is
the load-acquire and store-release extension, and the reason A7 (and
A6S) exists is to support it.

The A7 atomic ABI is compatible with A6S (which is what is currently
emitted as the tag), but A7 is not compatible with A6C, while A6C and
A6S are compatible.


https://github.com/riscv-non-isa/riscv-elf-psabi-doc/blob/master/riscv-atomic.adoc#risc-v-atomics-mappings


https://github.com/riscv-non-isa/riscv-elf-psabi-doc/blob/master/riscv-elf.adoc#tag_riscv_atomic_abi-14-uleb128version</pre>
</div>
</content>
</entry>
<entry>
<title>[RISCV] Fix typos discovered by codespell (NFC) (#126191)</title>
<updated>2025-02-07T08:05:30+00:00</updated>
<author>
<name>Sudharsan Veeravalli</name>
<email>quic_svs@quicinc.com</email>
</author>
<published>2025-02-07T08:05:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=83783e8bec0eb25e06eff57a22b0419cdc2bce2c'/>
<id>83783e8bec0eb25e06eff57a22b0419cdc2bce2c</id>
<content type='text'>
Found using https://github.com/codespell-project/codespell

```
codespell RISCV --write-changes \
       --ignore-words-list=FPR,fpr,VAs,ORE,WorstCase,hart,sie,MIs,FLE,fle,CarryIn,vor,OLT,VILL,vill,bu,pass-thru 
```</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Found using https://github.com/codespell-project/codespell

```
codespell RISCV --write-changes \
       --ignore-words-list=FPR,fpr,VAs,ORE,WorstCase,hart,sie,MIs,FLE,fle,CarryIn,vor,OLT,VILL,vill,bu,pass-thru 
```</pre>
</div>
</content>
</entry>
<entry>
<title>Reapply "[llvm][RISCV] Enable trailing fences for seq-cst stores by default (#87376)" (#90267)</title>
<updated>2024-07-08T20:35:36+00:00</updated>
<author>
<name>Paul Kirth</name>
<email>paulkirth@google.com</email>
</author>
<published>2024-07-08T20:35:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=a4fec164bf87018e3a4365be1299ee94b6d0c3d3'/>
<id>a4fec164bf87018e3a4365be1299ee94b6d0c3d3</id>
<content type='text'>
With the tag merging in place, we can safely change the default for
+seq-cst-trailing-fence to the default, according to the recommendation
in
https://github.com/riscv-non-isa/riscv-elf-psabi-doc/blob/master/riscv-atomic.adoc

This patch changes the default for the feature flag, and moves to more
consistent naming with respect to existing features.

This was reverted with https://github.com/llvm/llvm-project/pull/84597,
because ld.bfd would segfault with unknown riscv attributes. Now that
attributes emission is guarded with a backend flag,
`--riscv-abi-attributes`, this should be safe to reland, since it won't 
introduce abi tags unless the user opts into them.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
With the tag merging in place, we can safely change the default for
+seq-cst-trailing-fence to the default, according to the recommendation
in
https://github.com/riscv-non-isa/riscv-elf-psabi-doc/blob/master/riscv-atomic.adoc

This patch changes the default for the feature flag, and moves to more
consistent naming with respect to existing features.

This was reverted with https://github.com/llvm/llvm-project/pull/84597,
because ld.bfd would segfault with unknown riscv attributes. Now that
attributes emission is guarded with a backend flag,
`--riscv-abi-attributes`, this should be safe to reland, since it won't 
introduce abi tags unless the user opts into them.</pre>
</div>
</content>
</entry>
<entry>
<title>Reapply "[RISCV] Support RISCV Atomics ABI attributes (#84597)"</title>
<updated>2024-07-02T15:23:03+00:00</updated>
<author>
<name>Paul Kirth</name>
<email>paulkirth@google.com</email>
</author>
<published>2024-07-02T15:23:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=b146a57f6739846f7749daad099882fbd33e3066'/>
<id>b146a57f6739846f7749daad099882fbd33e3066</id>
<content type='text'>
This patch adds support for the atomic_abi attribute, specifid in
https://github.com/riscv-non-isa/riscv-elf-psabi-doc/blob/master/riscv-elf.adoc#tag_riscv_atomic_abi-14-uleb128version.

This was previously reverted due to ld.bfd segfaulting w/ unknown riscv
attributes. Attribute emission is now guarded by a backend flag
`--riscv-abi-attributes`, which is off by default. Linker support in
LLD for attribute merging is now in a standalone patch.

Reviewers: kito-cheng, MaskRay, asb

Reviewed By: MaskRay

Pull Request: https://github.com/llvm/llvm-project/pull/90266
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch adds support for the atomic_abi attribute, specifid in
https://github.com/riscv-non-isa/riscv-elf-psabi-doc/blob/master/riscv-elf.adoc#tag_riscv_atomic_abi-14-uleb128version.

This was previously reverted due to ld.bfd segfaulting w/ unknown riscv
attributes. Attribute emission is now guarded by a backend flag
`--riscv-abi-attributes`, which is off by default. Linker support in
LLD for attribute merging is now in a standalone patch.

Reviewers: kito-cheng, MaskRay, asb

Reviewed By: MaskRay

Pull Request: https://github.com/llvm/llvm-project/pull/90266
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "[RISCV] Support RISCV Atomics ABI attributes (#84597)"</title>
<updated>2024-04-26T11:16:53+00:00</updated>
<author>
<name>Alex Bradbury</name>
<email>asb@igalia.com</email>
</author>
<published>2024-04-26T11:02:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=431be8626696da6059eee26b9a14e1dc9fc0c37f'/>
<id>431be8626696da6059eee26b9a14e1dc9fc0c37f</id>
<content type='text'>
This reverts commit 9221f3af8f832d990be986c05d964ad37e5a2356.

As reported
&lt;https://github.com/llvm/llvm-project/pull/84597#issuecomment-2079128332&gt;
and confirmed by me locally, adding these attributes causes current GNU
ld to segfault when processing the input. Reverted so we can discuss
the best next step.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit 9221f3af8f832d990be986c05d964ad37e5a2356.

As reported
&lt;https://github.com/llvm/llvm-project/pull/84597#issuecomment-2079128332&gt;
and confirmed by me locally, adding these attributes causes current GNU
ld to segfault when processing the input. Reverted so we can discuss
the best next step.
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "[llvm][RISCV] Enable trailing fences for seq-cst stores by default (#87376)"</title>
<updated>2024-04-26T11:16:53+00:00</updated>
<author>
<name>Alex Bradbury</name>
<email>asb@igalia.com</email>
</author>
<published>2024-04-26T11:01:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=357530f11351687aaec2f19ef7e19c82d5317210'/>
<id>357530f11351687aaec2f19ef7e19c82d5317210</id>
<content type='text'>
This reverts commit 733b271db793ce30c504a1b5c4ae7a8775b0a6a2.

Reverting in order to revert the companion patch adding the atomics ABI
ELF attributes due to the reported incompatibility with GNU ld.
https://github.com/llvm/llvm-project/pull/84597#issuecomment-2079128332
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit 733b271db793ce30c504a1b5c4ae7a8775b0a6a2.

Reverting in order to revert the companion patch adding the atomics ABI
ELF attributes due to the reported incompatibility with GNU ld.
https://github.com/llvm/llvm-project/pull/84597#issuecomment-2079128332
</pre>
</div>
</content>
</entry>
<entry>
<title>[llvm][RISCV] Enable trailing fences for seq-cst stores by default (#87376)</title>
<updated>2024-04-25T23:33:10+00:00</updated>
<author>
<name>Paul Kirth</name>
<email>paulkirth@google.com</email>
</author>
<published>2024-04-25T23:33:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=733b271db793ce30c504a1b5c4ae7a8775b0a6a2'/>
<id>733b271db793ce30c504a1b5c4ae7a8775b0a6a2</id>
<content type='text'>
With the tag merging in place, we can safely change the default for
+seq-cst-trailing-fence to the default, according to the recommendation
in

https://github.com/riscv-non-isa/riscv-elf-psabi-doc/blob/master/riscv-atomic.adoc

This tag changes the default for the feature flag, and moves to more
consistent naming with respect to existing features.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
With the tag merging in place, we can safely change the default for
+seq-cst-trailing-fence to the default, according to the recommendation
in

https://github.com/riscv-non-isa/riscv-elf-psabi-doc/blob/master/riscv-atomic.adoc

This tag changes the default for the feature flag, and moves to more
consistent naming with respect to existing features.</pre>
</div>
</content>
</entry>
</feed>
