[PATCH, sparc]: Use ROUND_UP and ROUND_DOWN macros

Eric Botcazou ebotcazou@adacore.com
Tue Oct 13 10:41:00 GMT 2015


> In this case, I think it is better to write this part as:
> 
> --cut here--
> offset += 8;
> 
> /* Always preserve double-word alignment.  */
> offset = ROUND_DOWN (offset, 8);
> --cut here--

Not convinced, having offset == 12 after the first line doesn't make sense.

I'd just beef up the comment:

/* Bump and round down to double word in case we already bumped by 4.  */
offset = ROUND_DOWN (offset + 8, 8);

-- 
Eric Botcazou



More information about the Gcc-patches mailing list