Subject: Compiler generates inefficient code for u_char comparisons Index: lib/ccom/optable 2.11BSD Description: For the C code: unsigned char b; if (b > 1) ... The compiler was generating: clr r0 bisb _b,r0 cmp $1,r0 jhis L3 ... L3: instead of: cmpb $1,_b jhis L3 ... L3: Repeat-By: Examine the generated code. This problem was noticed when changing f_count from 'char' to 'u_char' in /sys/h/file.h Fix: The fix is to include the unsigned char case in the cctab part of the C compiler. Apply the patch then remake and install 'c1' (the other phases of the compiler are unaffected). ----------------------------------------------------------------------- *** /usr/src/lib/ccom/optable.old Fri Oct 11 08:26:52 1991 --- /usr/src/lib/ccom/optable Wed Oct 23 09:50:52 1991 *************** *** 1677,1682 **** --- 1677,1683 ---- %aw,aw %ab,ab + %aub,a %aub,aub % [move3]