------- Comment #2 from hjl dot tools at gmail dot com 2010-06-24 22:43 ------- Created an attachment (id=20999) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20999&action=view) A patch
With this patch, I got [...@gnu-6 divb]$ cat umod-4.c int foo (unsigned char x, unsigned char y) { return (x % y) != 0; } [...@gnu-6 divb]$ make umod-4.s /export/build/gnu/gcc/build-x86_64-linux/gcc/xgcc -B/export/build/gnu/gcc/build-x86_64-linux/gcc/ -Os -S umod-4.c [...@gnu-6 divb]$ cat umod-4.s .file "umod-4.c" .text .globl foo .type foo, @function foo: .LFB0: .cfi_startproc movzbl %dil, %eax divb %sil testw $-256, %ax setne %al movzbl %al, %eax ret -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44659