Jason Merrill [Saturday, 6 September 2025, 15:43:57 CEST]:
> > + if (words == 0)
> > + {
> > + int bytes = bits / 8;
> > + sprintf (buffer, "%04lx", (unsigned long) target_real[0]);
> > + if (bytes == 2)
> > + write_chars (buffer, 4);
> > + else
> > + write_chars (buffer + 2, 2);
>
> This seems backwards?
The 'buffer + 2' part? I expected a 0xff Byte in target_real[0], formatted
with %04lx to show up as "00ff" in buffer. So I would need to skip the leading
zeros.
But we don't have a test. Better to just 'gcc_assert(bytes == 2)'? Or even
'gcc_assert(bits == 16)'?
> > + return;
> > + }
--
──────────────────────────────────────────────────────────────────────────
Dr. Matthias Kretz https://mattkretz.github.io
GSI Helmholtz Center for Heavy Ion Research https://gsi.de
std::simd
──────────────────────────────────────────────────────────────────────────