Re: [RFC/PATCH 3/3] ARM: Replace calls to __aeabi_{u}idiv with udiv/sdiv instructions

2015-11-23 Thread Stephen Boyd
On 11/23, Måns Rullgård wrote: > Stephen Boyd writes: > > > On 11/21, Måns Rullgård wrote: > >> > >> These functions are rather similar. Perhaps they could be combined > >> somehow. > >> > > > > Yes. I have this patch on top, just haven't folded it in because > > it doesn't reduce the lines

Re: [RFC/PATCH 3/3] ARM: Replace calls to __aeabi_{u}idiv with udiv/sdiv instructions

2015-11-23 Thread Måns Rullgård
Stephen Boyd writes: > On 11/21, Måns Rullgård wrote: >> Stephen Boyd writes: >> >> > +static int module_patch_aeabi_uidiv(unsigned long loc, const Elf32_Sym >> > *sym) >> > +{ >> > + extern char __aeabi_uidiv[], __aeabi_idiv[]; >> > + unsigned long udiv_addr = (unsigned long)__aeabi_uidiv;

Re: [RFC/PATCH 3/3] ARM: Replace calls to __aeabi_{u}idiv with udiv/sdiv instructions

2015-11-23 Thread Stephen Boyd
On 11/21, Måns Rullgård wrote: > Stephen Boyd writes: > > > +static int module_patch_aeabi_uidiv(unsigned long loc, const Elf32_Sym > > *sym) > > +{ > > + extern char __aeabi_uidiv[], __aeabi_idiv[]; > > + unsigned long udiv_addr = (unsigned long)__aeabi_uidiv; > > + unsigned long

Re: [RFC/PATCH 3/3] ARM: Replace calls to __aeabi_{u}idiv with udiv/sdiv instructions

2015-11-23 Thread Stephen Boyd
On 11/21, Måns Rullgård wrote: > Stephen Boyd writes: > > > +static int module_patch_aeabi_uidiv(unsigned long loc, const Elf32_Sym > > *sym) > > +{ > > + extern char __aeabi_uidiv[], __aeabi_idiv[]; > > + unsigned long udiv_addr = (unsigned long)__aeabi_uidiv; > > +

Re: [RFC/PATCH 3/3] ARM: Replace calls to __aeabi_{u}idiv with udiv/sdiv instructions

2015-11-23 Thread Måns Rullgård
Stephen Boyd writes: > On 11/21, Måns Rullgård wrote: >> Stephen Boyd writes: >> >> > +static int module_patch_aeabi_uidiv(unsigned long loc, const Elf32_Sym >> > *sym) >> > +{ >> > + extern char __aeabi_uidiv[], __aeabi_idiv[]; >> > + unsigned

Re: [RFC/PATCH 3/3] ARM: Replace calls to __aeabi_{u}idiv with udiv/sdiv instructions

2015-11-23 Thread Stephen Boyd
On 11/23, Måns Rullgård wrote: > Stephen Boyd writes: > > > On 11/21, Måns Rullgård wrote: > >> > >> These functions are rather similar. Perhaps they could be combined > >> somehow. > >> > > > > Yes. I have this patch on top, just haven't folded it in because > > it

Re: [RFC/PATCH 3/3] ARM: Replace calls to __aeabi_{u}idiv with udiv/sdiv instructions

2015-11-21 Thread Måns Rullgård
Stephen Boyd writes: > +static int module_patch_aeabi_uidiv(unsigned long loc, const Elf32_Sym *sym) > +{ > + extern char __aeabi_uidiv[], __aeabi_idiv[]; > + unsigned long udiv_addr = (unsigned long)__aeabi_uidiv; > + unsigned long sdiv_addr = (unsigned long)__aeabi_idiv; > +

Re: [RFC/PATCH 3/3] ARM: Replace calls to __aeabi_{u}idiv with udiv/sdiv instructions

2015-11-21 Thread Måns Rullgård
Stephen Boyd writes: > +static int module_patch_aeabi_uidiv(unsigned long loc, const Elf32_Sym *sym) > +{ > + extern char __aeabi_uidiv[], __aeabi_idiv[]; > + unsigned long udiv_addr = (unsigned long)__aeabi_uidiv; > + unsigned long sdiv_addr = (unsigned

[RFC/PATCH 3/3] ARM: Replace calls to __aeabi_{u}idiv with udiv/sdiv instructions

2015-11-20 Thread Stephen Boyd
The ARM compiler inserts calls to __aeabi_uidiv() and __aeabi_idiv() when it needs to perform division on signed and unsigned integers. If a processor has support for the udiv and sdiv division instructions the calls to these support routines can be replaced with those instructions. Now that

[RFC/PATCH 3/3] ARM: Replace calls to __aeabi_{u}idiv with udiv/sdiv instructions

2015-11-20 Thread Stephen Boyd
The ARM compiler inserts calls to __aeabi_uidiv() and __aeabi_idiv() when it needs to perform division on signed and unsigned integers. If a processor has support for the udiv and sdiv division instructions the calls to these support routines can be replaced with those instructions. Now that