lkml.org 
[lkml]   [2006]   [Apr]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    SubjectRe: strncpy (maybe others) broken on Alpha
    On Fri, Apr 21, 2006 at 01:55:56PM +0200, Mathieu Chouquet-Stringer wrote:
    > I've attached to this email a tarball of what I use to test the
    > compiler/binutils. It's faster than recompiling the whole kernel on
    > these slow machines!

    Oops. I was using a wrong copy of strncpy.S (remained from previous
    __stxncpy() debugging). What's why I wasn't able to reproduce that...

    It seems that the registers $24 and $27 are mixed up in strncpy().
    This fixes your test case, please check if it fixes kernel problem
    as well.

    Ivan.

    --- strncpy_debug/strncpy.S Thu Apr 20 14:18:05 2006
    +++ strncpy.S Fri Apr 21 17:52:04 2006
    @@ -43,8 +43,8 @@

    .align 4
    $multiword:
    - subq $24, 1, $2 # clear the final bits in the prev word
    - or $2, $24, $2
    + subq $27, 1, $2 # clear the final bits in the prev word
    + or $2, $27, $2
    zapnot $1, $2, $1
    subq $18, 1, $18

    @@ -70,8 +70,8 @@
    bne $18, 0b

    1: ldq_u $1, 0($16) # clear the leading bits in the final word
    - subq $27, 1, $2
    - or $2, $27, $2
    + subq $24, 1, $2
    + or $2, $24, $2

    zap $1, $2, $1
    stq_u $1, 0($16)
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/
    \
     
     \ /
      Last update: 2006-04-21 16:25    [W:0.042 / U:0.060 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site