]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Fix SH4 register-dump.h for soft-float.
authorJoseph Myers <joseph@codesourcery.com>
Wed, 16 Nov 2016 03:45:49 +0000 (03:45 +0000)
committerJoseph Myers <joseph@codesourcery.com>
Wed, 16 Nov 2016 03:45:49 +0000 (03:45 +0000)
This patch fixes SH4 register-dump.h to declare a variable inside the
the build for soft-float.

Tested (compilation only) for SH4 soft-float.

* sysdeps/unix/sysv/linux/sh/sh4/register-dump.h (register_dump):
Only declare fpregs if [__SH_FPU_ANY__].

ChangeLog
sysdeps/unix/sysv/linux/sh/sh4/register-dump.h

index c52196e388cc34fa7c8dc0df7c7387156f0fc624..dfa48e4c0a7e33e709bd43b0fa76a760a00b03d6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2016-11-16  Joseph Myers  <joseph@codesourcery.com>
+
+       * sysdeps/unix/sysv/linux/sh/sh4/register-dump.h (register_dump):
+       Only declare fpregs if [__SH_FPU_ANY__].
+
 2016-11-15  Joseph Myers  <joseph@codesourcery.com>
 
        * sysdeps/unix/sysv/linux/sh/sys/ucontext.h [__SH4__ || __SH4A__]:
index 4a642abed960c9640d1ca80d53ea6bbc1e118940..519a2cec75c7bbd210eafaa499d6397ad725c44e 100644 (file)
@@ -56,7 +56,6 @@ static void
 register_dump (int fd, struct sigcontext *ctx)
 {
   char regs[22][8];
-  char fpregs[34][8];
   struct iovec iov[22 * 2 + 34 * 2 + 2];
   size_t nr = 0;
 
@@ -144,6 +143,7 @@ register_dump (int fd, struct sigcontext *ctx)
   ADD_STRING ("\n");
 
 #ifdef __SH_FPU_ANY__
+  char fpregs[34][8];
   if (ctx->sc_ownedfp != 0)
     {
       hexvalue (ctx->sc_fpregs[0], fpregs[0], 8);