Re: [PATCH 6/7] riscv: Add support for strlen inline expansion

2022-11-14 Thread Christoph Müllner
On Mon, Nov 14, 2022 at 7:17 PM Jeff Law wrote: > > On 11/13/22 16:05, Christoph Muellner wrote: > > From: Christoph Müllner > > > > This patch implements the expansion of the strlen builtin > > using Zbb instructions (if available) for aligned strings > > using the following sequence: > > > >

Re: [PATCH 6/7] riscv: Add support for strlen inline expansion

2022-11-14 Thread Jeff Law via Gcc-patches
On 11/13/22 16:05, Christoph Muellner wrote: From: Christoph Müllner This patch implements the expansion of the strlen builtin using Zbb instructions (if available) for aligned strings using the following sequence: li a3,-1 addia4,a0,8 .L2: ld a5,0(a0)

[PATCH 6/7] riscv: Add support for strlen inline expansion

2022-11-13 Thread Christoph Muellner
From: Christoph Müllner This patch implements the expansion of the strlen builtin using Zbb instructions (if available) for aligned strings using the following sequence: li a3,-1 addia4,a0,8 .L2: ld a5,0(a0) addia0,a0,8 orc.b a5,a5 beq