Re: [PATCH, sparc]: Use ROUND_UP and ROUND_DOWN macros

2015-10-13 Thread Eric Botcazou
> 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 commen

Re: [PATCH, sparc]: Use ROUND_UP and ROUND_DOWN macros

2015-10-13 Thread Uros Bizjak
On Tue, Oct 13, 2015 at 12:10 PM, Eric Botcazou wrote: >> Two functional changes I'd like to point out: >> >> /* ALIGN FRAMES on double word boundaries */ >> -#define SPARC_STACK_ALIGN(LOC) \ >> - (TARGET_ARCH64 ? (((LOC)+15) & ~15) : (((LOC)+7) & ~7)) >> +#define SPARC_STACK_ALIGN(LOC) ROUND_UP

Re: [PATCH, sparc]: Use ROUND_UP and ROUND_DOWN macros

2015-10-13 Thread Eric Botcazou
> Two functional changes I'd like to point out: > > /* ALIGN FRAMES on double word boundaries */ > -#define SPARC_STACK_ALIGN(LOC) \ > - (TARGET_ARCH64 ? (((LOC)+15) & ~15) : (((LOC)+7) & ~7)) > +#define SPARC_STACK_ALIGN(LOC) ROUND_UP ((LOC), UNITS_PER_WORD * 2) > > The one above uses UNITS_PE

[PATCH, sparc]: Use ROUND_UP and ROUND_DOWN macros

2015-10-12 Thread Uros Bizjak
Two functional changes I'd like to point out: /* ALIGN FRAMES on double word boundaries */ -#define SPARC_STACK_ALIGN(LOC) \ - (TARGET_ARCH64 ? (((LOC)+15) & ~15) : (((LOC)+7) & ~7)) +#define SPARC_STACK_ALIGN(LOC) ROUND_UP ((LOC), UNITS_PER_WORD * 2) The one above uses UNITS_PER_WORD in stack