This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: coding style, continuing education


Also sprach Mike Stump:
} 
} If people _know_ of a good way to split this down, maybe we all just
} need a refresher course on the right way, care to elaborate?
} 
} 
} 	if (mode1 == VOIDmode
} 	    || GET_CODE (op0) == REG || GET_CODE (op0) == SUBREG
} 	    || (modifier != EXPAND_CONST_ADDRESS
} 		&& modifier != EXPAND_INITIALIZER
} 		&& ((mode1 != BLKmode && ! direct_load[(int) mode1]
} 		     && GET_MODE_CLASS (mode) != MODE_COMPLEX_INT
} 		     && GET_MODE_CLASS (mode) != MODE_COMPLEX_FLOAT)
} 		    /* If the field isn't aligned enough to fetch as a memref,
} 		       fetch it as a bit field.  */
} 		    || (mode1 != BLKmode
} 			&& SLOW_UNALIGNED_ACCESS (mode1, alignment)
} 			&& ((TYPE_ALIGN (TREE_TYPE (tem))
} 			     < GET_MODE_ALIGNMENT (mode))
} 			    || (bitpos % GET_MODE_ALIGNMENT (mode) != 0)))
} 		    /* If the type and the field are a constant size and the
} 		       size of the type isn't the same size as the bitfield,
} 		       we must use bitfield operations.  */
} 		    || ((bitsize >= 0
} 			 && (TREE_CODE (TYPE_SIZE (TREE_TYPE (exp)))
} 			     == INTEGER_CST)
} 			 && 0 != compare_tree_int (TYPE_SIZE (TREE_TYPE (exp)),
} 						   bitsize)))))
} 	    || (modifier != EXPAND_CONST_ADDRESS
} 		&& modifier != EXPAND_INITIALIZER
} 		&& mode == BLKmode
} 		&& SLOW_UNALIGNED_ACCESS (mode, alignment)
} 		&& (TYPE_ALIGN (type) > alignment
} 		    || bitpos % TYPE_ALIGN (type) != 0)))
} 	  {

FOr this code snippet in particular, a big honkin' comment right above it
which explains what it's doing would be nice. That is, if it can't be
recoded in a much nicer fashion.

My thoughts.

-- 
|| Bill Wendling			wendling@ncsa.uiuc.edu
|| Coding Simian

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]