Skip to content
  • Benjamin Herrenschmidt's avatar
    powerpc/ptrace: Fix build with gcc 4.6 · e69b742a
    Benjamin Herrenschmidt authored
    
    
    gcc (rightfully) complains that we are accessing beyond the
    end of the fpr array (we do, to access the fpscr).
    
    The only sane thing to do (whether anything in that code can be
    called remotely sane is debatable) is to special case fpscr and
    handle it as a separate statement.
    
    I initially tried to do it it by making the array access conditional
    to index < PT_FPSCR and using a 3rd else leg but for some reason gcc
    was unable to understand it and still spewed the warning.
    
    So I ended up with something a tad more intricated but it seems to
    build on 32-bit and on 64-bit with and without VSX.
    
    Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
    e69b742a