lkml.org 
[lkml]   [2014]   [Jul]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRE: [PATCH RFCv3 08/14] arm64: introduce aarch64_insn_gen_movewide()
    Date
    From: Will Deacon
    ...
    > > + BUG_ON(imm < 0 || imm > 65535);
    >
    > Do this check with masking instead?

    The compiler will convert that to a single unsigned comparison.

    ...
    > > + BUG_ON(shift != 0 && shift != 16 && shift != 32 &&
    > > + shift != 48);

    OTOH I don't think it will convert that to:
    BUG_ON(shift & ~48);

    David





    \
     
     \ /
      Last update: 2014-07-16 19:01    [W:7.092 / U:0.160 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site