On 2/15/25 12:32 PM, Keith Packard wrote:
It's as reasonable as other methods such as turning it into a
define_expand and emitting a conditional branch around the sequence when
the count is zero.
Thanks much. I suspect the cost of the PSW setting instructions is far
less than a branch, so
> It's as reasonable as other methods such as turning it into a
> define_expand and emitting a conditional branch around the sequence when
> the count is zero.
Thanks much. I suspect the cost of the PSW setting instructions is far
less than a branch, so how about this version which emits them o
On 2/15/25 10:08 AM, Keith Packard wrote:
From: Jeff Law
Date: Sat, 15 Feb 2025 09:19:42 -0700
It's as reasonable as other methods such as turning it into a
define_expand and emitting a conditional branch around the sequence when
the count is zero.
Yeah, it would be "better" to avoid thos
From: Jeff Law
Date: Sat, 15 Feb 2025 09:19:42 -0700
> It's as reasonable as other methods such as turning it into a
> define_expand and emitting a conditional branch around the sequence when
> the count is zero.
Yeah, it would be "better" to avoid those extra instructions when the
count is kn
On 2/15/25 3:31 AM, Keith Packard wrote:
The SCMPU instruction doesn't change the C and Z flags when the
incoming length is zero, which means the insn will produce a
value based upon the existing flag values.
As a quick kludge, adjust these flags to ensure a zero result in this
case.
It's as