lkml.org 
[lkml]   [2010]   [Nov]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectFixed Powerpc SPE data type conversion failure
    Date

    The following test case failed on Powerpc e500 with CONFIG_SPE

    static float fm;
    static signed int si_min = (-2147483647 - 1);
    static unsigned int ui;
    int main()
    {
    fm = (float) si_min; ;
    ui = (unsigned int)fm;

    printf("ui=%d, should be %d\n", ui, si_min);

    return 0;
    }

    Result: ui=-1, should be -2147483648

    The reason is failure to emulate the minus float to unsigned conversion instruction
    in the SPE driver.

    ---
    arch/powerpc/math-emu/math_efp.c | 17 +++++++++++++----
    1 files changed, 13 insertions(+), 4 deletions(-)



    \
     
     \ /
      Last update: 2010-11-14 05:15    [W:0.068 / U:31.892 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site