[PATCH] RISC-V: PR33216, Allow c.slli, c.srai, c.srli with 0 immediate as a hint

Nelson Chu nelson@rivosinc.com
Thu Jul 31 02:39:45 GMT 2025


On Wed, Jul 30, 2025 at 1:05 AM Craig Topper <craig.topper@sifive.com>
wrote:

>
> On Tue, Jul 29, 2025 at 9:23 AM Jan Beulich <jbeulich@suse.com> wrote:
>
>> On 29.07.2025 17:19, Craig Topper wrote:
>> > I left them in as aliases when I implemented this in LLVM last week. I
>> was
>> > trying to not break user code that may exist. binutils and LLVM both
>> have a
>> > number of aliases for backward compatibility.  For example, "move",
>> > "sbreak", "scall", "frsr", "fssr", "fmv.s.x", 'fmv.x.s". So I thought
>> this
>> > was standard practice.
>>
>> No idea how things are for llvm, but gas doesn't support RV128 yet, aiui.
>> Hence these insns likely should never have been there in the first place?
>>
>
> LLVM doesn't support RV128 either, but using the c.slli64/srli64/srai64
> mnemonics was the only way to spell one of the hint encodings for RV32 and
> RV64 other than using .insn.
>

Thanks for both your comments.  I think personally I would like to keep the
same as llvm if that won't cause much problems :-)

Nelson
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://sourceware.org/pipermail/binutils/attachments/20250731/1edf2c75/attachment.htm>


More information about the Binutils mailing list