Patchwork [avr] Remove fixed-point MUL and DIV routines from libgcc build

login
register
mail settings
Submitter Georg-Johann Lay
Date Jan. 28, 2013, 5:06 p.m.
Message ID <5106B015.3000108@gjlay.de>
Download mbox | patch
Permalink /patch/216255/
State New
Headers show

Comments

Georg-Johann Lay - Jan. 28, 2013, 5:06 p.m.
This removes modules from libgcc that are already supported by avr-specific
fixed-point implementation and avoids duplicate functions like __mulsa3.

Ok for trunk?

Johann


libgcc/
	* config/avr/t-avr (LIB2FUNCS_EXCLUDE): Add:
	_mulQQ,  _mulHQ,  _mulHA,  _mulSA,
	_mulUQQ, _mulUHQ, _mulUHA, _mulUSA,
	_divQQ,  _divHQ,  _divHA,  _divSA,
	_divUQQ, _divUHQ, _divUHA, _divUSA.
Denis Chertykov - Jan. 29, 2013, 6:51 a.m.
2013/1/28 Georg-Johann Lay <avr@gjlay.de>:
> This removes modules from libgcc that are already supported by avr-specific
> fixed-point implementation and avoids duplicate functions like __mulsa3.
>
> Ok for trunk?
>
> Johann
>
>
> libgcc/
>         * config/avr/t-avr (LIB2FUNCS_EXCLUDE): Add:
>         _mulQQ,  _mulHQ,  _mulHA,  _mulSA,
>         _mulUQQ, _mulUHQ, _mulUHA, _mulUSA,
>         _divQQ,  _divHQ,  _divHA,  _divSA,
>         _divUQQ, _divUHQ, _divUHA, _divUSA.

Approved.

Denis.

Patch

Index: config/avr/t-avr
===================================================================
--- config/avr/t-avr	(revision 195301)
+++ config/avr/t-avr	(working copy)
@@ -164,3 +164,17 @@  LIB2FUNCS_EXCLUDE += \
 LIB2FUNCS_EXCLUDE += \
 	$(foreach func,_usadd _ussub _usneg,\
 	$(foreach mode,$(usat_modes),$(func_X)))
+
+
+smul_modes =  QQ  HQ  HA  SA
+umul_modes = UQQ UHQ UHA USA
+sdiv_modes =  QQ  HQ  HA  SA
+udiv_modes = UQQ UHQ UHA USA
+
+LIB2FUNCS_EXCLUDE += \
+	$(foreach func,_mul,\
+	$(foreach mode,$(smul_modes) $(umul_modes),$(func_X)))
+
+LIB2FUNCS_EXCLUDE += \
+	$(foreach func,_div,\
+	$(foreach mode,$(sdiv_modes) $(udiv_modes),$(func_X)))