------- Comment #44 from hjl dot tools at gmail dot com 2009-05-15 23:05 ------- (In reply to comment #41) > The 34 resp. 51 4 branches in 16 byte page with the 3 patches together made me > look at one of the cases which was wrong and the problem is that cmp $0x1d, > %al > has too large get_attr_lenght (insn) returned, 3 instead of 2, because GCC > thinks it has modrm byte when it has not. > Testing: > --- gcc/config/i386/i386.md.jj2009-05-13 08:42:51.000000000 +0200 > +++ gcc/config/i386/i386.md2009-05-15 18:06:40.000000000 +0200 > @@ -504,6 +504,9 @@ > (and (eq_attr "type" "callv") > (match_operand 1 "constant_call_address_operand" "")) > (const_int 0) > + (and (eq_attr "type" "alu,alu1,icmp,test") > + (match_operand 0 "ax_reg_operand" "")) > + (symbol_ref "(get_attr_length_immediate (insn) > (get_attr_mode (insn) > != > MODE_QI))") > ] > (const_int 1))) >
"cmp imm,%al/%ax/%eax/%rax" doesn't have the modrm byte. I think this patch works better: --- i386.md.branch 2009-05-15 11:30:42.000000000 -0700 +++ i386.md 2009-05-15 14:44:11.000000000 -0700 @@ -504,6 +504,10 @@ (and (eq_attr "type" "callv") (match_operand 1 "constant_call_address_operand" "")) (const_int 0) + (and (eq_attr "type" "alu,alu1,icmp,test") + (match_operand 0 "ax_reg_operand" "") + (match_operand 1 "immediate_operand" "")) + (const_int 0) ] (const_int 1))) -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39942