[PATCH v3] cpukit/aarch64: Add ESR register decoding

Gedare Bloom gedare at rtems.org
Tue Mar 23 15:20:51 UTC 2021


On Mon, Mar 22, 2021 at 11:35 PM Sebastian Huber
<sebastian.huber at embedded-brains.de> wrote:
>
> On 22/03/2021 21:43, Alex White wrote:
>
> >>> +static void _binary_sprintf(
> >>> +  char *s,
> >>> +  size_t maxlen,
> >>> +  uint32_t num_bits,
> >>> +  uint32_t value
> >>> +)
> >>> +{
> >>> +  string_context sctx = {
> >>> +    .s = s,
> >>> +    .n = maxlen
> >>> +  };
> >>> +  uint32_t mask = 1<<(num_bits-1);
> >>> +  int cx = 0;
> >>> +
> >>> +  while ( mask != 0 ) {
> >>> +    cx += _IO_Printf(put_char, &sctx, "%d", (value & mask ? 1 : 0));
> >>> +    //cx += snprintf(s + cx, maxlen - cx, "%d", (value&mask ? 1 : 0));
> >> Commented out.
> > Will fix.
> It would be nice if this cpukit file could follow the score coding style.
>
+1

I would kindly request that the file be reformatted.

> --
> embedded brains GmbH
> Herr Sebastian HUBER
> Dornierstr. 4
> 82178 Puchheim
> Germany
> email: sebastian.huber at embedded-brains.de
> phone: +49-89-18 94 741 - 16
> fax:   +49-89-18 94 741 - 08
>
> Registergericht: Amtsgericht München
> Registernummer: HRB 157899
> Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
> Unsere Datenschutzerklärung finden Sie hier:
> https://embedded-brains.de/datenschutzerklaerung/
>
> _______________________________________________
> devel mailing list
> devel at rtems.org
> http://lists.rtems.org/mailman/listinfo/devel


More information about the devel mailing list