Skip to content
  • Joseph Myers's avatar
    445810ec
    softfloat: return low bits of quotient from floatx80_modrem · 445810ec
    Joseph Myers authored
    
    
    Both x87 and m68k need the low parts of the quotient for their
    remainder operations.  Arrange for floatx80_modrem to track those bits
    and return them via a pointer.
    
    The architectures using float32_rem and float64_rem do not appear to
    need this information, so the *_rem interface is left unchanged and
    the information returned only from floatx80_modrem.  The logic used to
    determine the low 7 bits of the quotient for m68k
    (target/m68k/fpu_helper.c:make_quotient) appears completely bogus (it
    looks at the result of converting the remainder to integer, the
    quotient having been discarded by that point); this patch does not
    change that, but the m68k maintainers may wish to do so.
    
    Signed-off-by: default avatarJoseph Myers <joseph@codesourcery.com>
    Reviewed-by: default avatarRichard Henderson <richard.henderson@linaro.org>
    Message-Id: <alpine.DEB.2.21.2006081656500.23637@digraph.polyomino.org.uk>
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    445810ec
    softfloat: return low bits of quotient from floatx80_modrem
    Joseph Myers authored
    
    
    Both x87 and m68k need the low parts of the quotient for their
    remainder operations.  Arrange for floatx80_modrem to track those bits
    and return them via a pointer.
    
    The architectures using float32_rem and float64_rem do not appear to
    need this information, so the *_rem interface is left unchanged and
    the information returned only from floatx80_modrem.  The logic used to
    determine the low 7 bits of the quotient for m68k
    (target/m68k/fpu_helper.c:make_quotient) appears completely bogus (it
    looks at the result of converting the remainder to integer, the
    quotient having been discarded by that point); this patch does not
    change that, but the m68k maintainers may wish to do so.
    
    Signed-off-by: default avatarJoseph Myers <joseph@codesourcery.com>
    Reviewed-by: default avatarRichard Henderson <richard.henderson@linaro.org>
    Message-Id: <alpine.DEB.2.21.2006081656500.23637@digraph.polyomino.org.uk>
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
Loading