[klibc] [PATCH 3/3] arm64: Introduce arm64 support

H. Peter Anvin hpa at zytor.com
Fri Nov 8 09:24:06 PST 2013


On 11/08/2013 09:12 AM, Steve Capper wrote:
> +
> +/*
> + * x19-x28 are callee saved, also save fp, lr, sp.
> + * d8-d15 are also callee saved.
> + */
> +
> +struct __jmp_buf {
> +	uint64_t __gregs[13];
> +	uint64_t __fpregs[8];
> +};
> +

Since the index of these arrays have no connection with what is stored
in them, they should be named fields in the structure, not an array.

Do we need the fpregs saved even though klibc doesn't do fp?

> diff --git a/usr/klibc/arch/arm64/pipe.c b/usr/klibc/arch/arm64/pipe.c
> new file mode 100644
> index 0000000..f10a69e
> --- /dev/null
> +++ b/usr/klibc/arch/arm64/pipe.c
> @@ -0,0 +1,10 @@
> +#include <unistd.h>
> +
> +#ifndef __NR_pipe
> +
> +int pipe(int pipefd[2])
> +{
> +	return pipe2(pipefd, 0);
> +}
> +
> +#endif  /* __NR_pipe */

This is a generic routine, right?  It should be part of the generic
ersatz functions, no?

	-hpa



More information about the klibc mailing list