diff options
author | Jeff Johnston <jjohnstn@redhat.com> | 2002-05-14 00:59:40 +0400 |
---|---|---|
committer | Jeff Johnston <jjohnstn@redhat.com> | 2002-05-14 00:59:40 +0400 |
commit | 48d91b4a379e30b6f34ed16861eb4da4e5795795 (patch) | |
tree | ff44a04930fcbc4eed7dcf659d1ae080829a0305 /newlib | |
parent | 9a0da7d70467d3f0659d9281ed5059f3c1d205e7 (diff) |
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')
-rw-r--r-- | newlib/ChangeLog | 6 | ||||
-rw-r--r-- | newlib/libc/machine/powerpc/vfprintf.c | 18 |
2 files changed, 21 insertions, 3 deletions
diff --git a/newlib/ChangeLog b/newlib/ChangeLog index 4243fb767..0da1e3267 100644 --- a/newlib/ChangeLog +++ b/newlib/ChangeLog @@ -1,5 +1,11 @@ 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. + +2002-05-13 Jeff Johnston <jjohnstn@redhat.com> + * libc/machine/powerpc/vfprintf.c(__VFPRINTF_R)[__ALTIVEC__]: Restore the original format specifier when looping for vectors to compensate for any changes made in vector %g format processing. 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 |