[PATCH] PPC enable Altivec for setjmp/longjmp part 1 of 5
Ulrich Drepper
drepper@redhat.com
Fri Feb 13 19:19:00 GMT 2004
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Steve Munroe wrote:
> -typedef long int __jmp_buf[58];
> +/* The alignment is not essential, i.e.the buffer can be copied to a 4 byte aligned buffer as per the ABI it is just added for performance reasons. */
> +typedef long int __jmp_buf[64+(12*4)] __attribute__((aligned(16)));
> # endif
> #endif
Add some newline to the comment, it's far too wide.
> +extern void __vmx__longjmp (__jmp_buf __env, int __val);
> +extern void __vmx__libc_longjmp (sigjmp_buf env, int val)
> + __attribute__ ((noreturn));
> +libc_hidden_proto (__vmx__libc_longjmp)
Why does __vmx_longjmp not have the noreturn attribute?
> diff -urN libc23-cvstip-20040210/sysdeps/powerpc/novmxsetjmp.h libc23/sysdeps/powerpc/novmxsetjmp.h
This is an internal header (I thought this was clear after Roland's
comments) but still you use
> +#ifndef _SETJMP_H
> +#define _SETJMP_H 1
> +
> +#include <features.h>
> +
> +__BEGIN_DECLS
...all this. None should be needed, maybe the include protection, but
then the sources aren't cleanly structured.
> +#if defined __USE_MISC || defined _ASM
What does __USE_* have to do in an internal header? It's always
defined. You can keep the _ASM if it is really used. But is it?
> +/* Calling environment, plus possibly a saved signal mask. */
> +typedef struct __jmp_buf_tag /* C++ doesn't like tagless structs. */
> + {
> + /* NOTE: The machine-dependent definitions of `__sigsetjmp'
> + assume that a `jmp_buf' begins with a `__jmp_buf' and that
> + `__mask_was_saved' follows it. Do not move these members
> + or add others before it. */
> + __jmp_buf __jmpbuf; /* Calling environment. */
> + int __mask_was_saved; /* Saved the signal mask? */
> + __sigset_t __saved_mask; /* Saved signal mask. */
> + } jmp_buf[1];
How does this work together with the external definition in <setjmp.h>?
Plus: the C++ comment doesn't apply, glibc is written in C.
I am insistent on this because none of these setjmp changes must be
visible to the outside. Nobody must even think about using the internal
headers outside libc.
- --
⧠Ulrich Drepper ⧠Red Hat, Inc. ⧠444 Castro St ⧠Mountain View, CA â
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)
iD8DBQFALSMr2ijCOnn/RHQRAgGqAJ91LYIhGI6EwA5SgsMQ0xwRcySV4QCglYLh
hFBORode8jh1cES79Aa9pik=
=LEip
-----END PGP SIGNATURE-----
More information about the Libc-alpha
mailing list