[PATCH v4 09/15] ARC: Linux ABI
Joseph Myers
joseph@codesourcery.com
Fri Mar 27 00:38:39 GMT 2020
On Thu, 12 Mar 2020, Vineet Gupta via Libc-alpha wrote:
> +/* And the whole bunch of them. We could have used `struct
> + user_regs' directly in the typedef, but tradition says that
> + the register set is an array, which does have some peculiar
> + semantics, so leave it that way. */
> +#define ELF_NGREG (sizeof (struct user_regs_struct) / sizeof(elf_greg_t))
Missing space after second sizeof.
> + /* __startcontext is sort of trampoline to invoke @func
> + From setcontext() pov, the resume address is __startcontext,
> + set it up in BLINK place holder. */
GNU standard is that you don't use parentheses after the name of a
function in documentation (including comments) just to indicate that it's
a function; empty parentheses after the name of a function indicate a call
with no arguments. Likewise elsewhere in this patch.
> + reg_args = argc > 8 ? 8 : argc;
> + for (i = 0; i < reg_args; i++) {
> + *r-- = va_arg(vl, unsigned long int);
> + }
Bad formatting; the open brace goes on its own line, indented two columns.
Missing space after va_arg.
> + if (__glibc_unlikely (stack_args > 0)) {
Likewise.
> + for (i = 0; i < stack_args; i++) {
> + *r++ = va_arg(vl, unsigned long int);
Likewise.
> +#undef __ctx
You don't seem to have a macro __ctx, so no need to undefine it.
--
Joseph S. Myers
joseph@codesourcery.com
More information about the Libc-alpha
mailing list