Gcc supports a divmod pattern. On processors where
the divide instruction produces a quotient and a
remainder (like the h8) a pattern for this can be
added into gcc. Currently there is no divmod pattern
for the h8 target so x/y + x%y generates two
divide instructions when one is all that is required.
Log in to post a comment.