[Bug inline-asm/11203] source doesn't compile with -O0 but they compile with -O3

drab at kepler dot fjfi dot cvut dot cz gcc-bugzilla@gcc.gnu.org
Fri Jan 21 15:51:00 GMT 2005


------- Additional Comments From drab at kepler dot fjfi dot cvut dot cz  2005-01-21 15:49 -------
OK, sorry, the Bug 19549 testcode passes with -O1 and above, but the original,
that it was stripped from (maybe too much stripped) doesn't:

-- test2.c -------------------------------------
extern const unsigned char ff_h263_loop_filter_strength[32];
static const unsigned long long ff_pb_FC __attribute__((used)) __attribute__
((aligned(8))) = 0xFCFCFCFCFCFCFCFCULL;
void h263_h_loop_filter_mmx(unsigned char *src, int stride, int qscale){
    const int strength= ff_h263_loop_filter_strength[qscale];
    unsigned long long temp[4] __attribute__ ((aligned(8)));
    unsigned char *btemp= (unsigned char *)temp;
    src -= 2;
    asm volatile(""
        : "+m" (temp[0]),
          "+m" (temp[1]),
          "+m" (temp[2]),
          "+m" (temp[3])
        : "g" (2*strength), "m"(ff_pb_FC)
    );
    asm volatile(""
        : "=m" (*(unsigned int*)(src + 0*stride)),
          "=m" (*(unsigned int*)(src + 1*stride)),
          "=m" (*(unsigned int*)(src + 2*stride)),
          "=m" (*(unsigned int*)(src + 3*stride)),
          "=m" (*(unsigned int*)(src + 4*stride)),
          "=m" (*(unsigned int*)(src + 5*stride)),
          "=m" (*(unsigned int*)(src + 6*stride)),
          "=m" (*(unsigned int*)(src + 7*stride))
    );
}
------------------------------------------------

Or do you consider this also invalid?


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11203



More information about the Gcc-bugs mailing list