diff options
author | Jeff Johnston <jjohnstn@redhat.com> | 2002-05-13 20:59:40 +0000 |
---|---|---|
committer | Jeff Johnston <jjohnstn@redhat.com> | 2002-05-13 20:59:40 +0000 |
commit | 48d91b4a379e30b6f34ed16861eb4da4e5795795 (patch) | |
tree | ff44a04930fcbc4eed7dcf659d1ae080829a0305 /newlib/libc | |
parent | 9a0da7d70467d3f0659d9281ed5059f3c1d205e7 (diff) | |
download | cygnal-48d91b4a379e30b6f34ed16861eb4da4e5795795.tar.gz cygnal-48d91b4a379e30b6f34ed16861eb4da4e5795795.tar.bz2 cygnal-48d91b4a379e30b6f34ed16861eb4da4e5795795.zip |
2002-05-13 Jeff Johnston <jjohnstn@redhat.com>
* libc/machine/powerpc/vfprintf.c(__VFPRINTF_R)[__ALTIVEC__]: Don't
allow v specifier with n or L specifiers. For vector c format,
move tmp declaration to the top.
Diffstat (limited to 'newlib/libc')
-rw-r--r-- | newlib/libc/machine/powerpc/vfprintf.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/newlib/libc/machine/powerpc/vfprintf.c b/newlib/libc/machine/powerpc/vfprintf.c index 1e2fe529b..0bb9d9f13 100644 --- a/newlib/libc/machine/powerpc/vfprintf.c +++ b/newlib/libc/machine/powerpc/vfprintf.c @@ -615,7 +615,13 @@ reswitch: switch (ch) { goto reswitch; #ifdef FLOATING_POINT case 'L': - flags &= ~VECTOR; +#ifdef __ALTIVEC__ + if (flags & VECTOR) + { + fmt = format_anchor; + continue; + } +#endif /* __ALTIVEC__ */ flags |= LONGDBL; goto rflag; #endif @@ -676,12 +682,12 @@ reswitch: switch (ch) { if (flags & VECTOR) { int k; + vec_16_byte_union tmp; if (flags & (SHORTINT | LONGINT)) { fmt = format_anchor; continue; } - vec_16_byte_union tmp; tmp.v = va_arg(ap, vector int); cp = buf; for (k = 0; k < 15; ++k) @@ -858,8 +864,14 @@ reswitch: switch (ch) { break; #endif /* FLOATING_POINT */ case 'n': +#ifdef __ALTIVEC__ + if (flags & VECTOR) + { + fmt = format_anchor; + continue; + } +#endif /* __ALTIVEC__ */ #ifndef _NO_LONGLONG - flags &= ~VECTOR; if (flags & QUADINT) *va_arg(ap, quad_t *) = ret; else |