lkml.org 
[lkml]   [1998]   [Jan]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: kernel and egcs
    > In this case I would just accommodate the compiler:
    >
    > /* include/asm-i386/string.h */
    > switch (n % 4) {
    > case 0: COMMON(""); break;
    > case 1: COMMON("\n\tmovsb"); break;
    > case 2: COMMON("\n\tmovsw"); break;
    > case 3: COMMON("\n\tmovsw\n\tmovsb"); break;
    > }
    > return to;
    It is slower : it adds one unuseful jump compared to the original code
    That's why the best solution is to keep all returns were they are, to add
    one return at the end, and to comment it with something like :

    /* Never reached. Needed to avoid a stupid gcc warning */

    Regards,

    Regis "HPReg" Duchesne - Engineering Student at ***** ******** *****
    www http://www.via.ecp.fr/~regis/
    (O o) I use Linux & 3Com (1135 KB/s over 10Mb/s ethernet)
    --.oOO--(_)--OOo.-----------------------------------------------------------


    \
     
     \ /
      Last update: 2005-03-22 13:41    [W:0.039 / U:119.016 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site