[csl-arm] Disable mod libfunc.
Paul Brook
paul@codesourcery.com
Thu Jan 27 22:01:00 GMT 2005
The Arm BPABI only defines divmod helper functions, not individual mod
functions. Patch below stops gcc trying to use the nonstandard mod-only
libcalls on such targets.
Tested with cross to arm-none-eabi.
Applied to csl-arm-branch.
Paul
2005-01-27 Paul Brook <paul@codesourcery.com>
* config/arm/arm.c (arm_init_libfuncs): Clear mod optabs.
Index: arm.c
===================================================================
RCS file: /var/cvsroot/gcc-cvs/gcc/gcc/config/arm/arm.c,v
retrieving revision 1.303.2.69
diff -u -p -r1.303.2.69 arm.c
--- arm.c 26 Jan 2005 20:14:18 -0000 1.303.2.69
+++ arm.c 27 Jan 2005 15:58:23 -0000
@@ -742,6 +742,13 @@ arm_init_libfuncs (void)
set_optab_libfunc (udiv_optab, DImode, "__aeabi_uldivmod");
set_optab_libfunc (sdiv_optab, SImode, "__aeabi_idivmod");
set_optab_libfunc (udiv_optab, SImode, "__aeabi_uidivmod");
+
+ /* We don't have mod libcalls. Fortunately gcc knows how to use the
+ divmod libcalls instead. */
+ set_optab_libfunc (smod_optab, DImode, NULL);
+ set_optab_libfunc (umod_optab, DImode, NULL);
+ set_optab_libfunc (smod_optab, SImode, NULL);
+ set_optab_libfunc (umod_optab, SImode, NULL);
}
/* Fix up any incompatible options that the user has specified.
More information about the Gcc-patches
mailing list