This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Add -mno-library-call to ia32


I really like to get the old gcc behavior at least by switch.
It is very useful for Linux kernel. This patch adds
-mno-library-call and -mlibrary-call. I don't know if
-mlibrary-call is really needed or not.


-- 
H.J. Lu (hjl@gnu.org)
--
2000-06-17  H.J. Lu  (hjl@gnu.org)

	* config/i386/i386.h (MASK_NO_LIBRARY_CALL): New constants.
	(TARGET_NO_LIBRARY_CALL): New macro.
	(TARGET_SWITCHES): Add library-call and no-library-call.

	* config/i386/i386.md (movstrsi): Avoid library call on
	TARGET_NO_LIBRARY_CALL.
	(clrstrsi): Likewise.

Index: gcc/config/i386/i386.h
===================================================================
RCS file: /work/cvs/gnu/egcs/gcc/config/i386/i386.h,v
retrieving revision 1.1.1.43
diff -u -p -r1.1.1.43 i386.h
--- gcc/config/i386/i386.h	2000/06/16 01:46:51	1.1.1.43
+++ gcc/config/i386/i386.h	2000/06/17 17:31:29
@@ -102,6 +102,7 @@ extern int target_flags;
 #define MASK_INLINE_ALL_STROPS	0x00002000	/* Inline stringops in all cases */
 #define MASK_NO_PUSH_ARGS	0x00004000	/* Use push instructions */
 #define MASK_ACCUMULATE_OUTGOING_ARGS 0x00008000/* Accumulate outgoing args */
+#define MASK_NO_LIBRARY_CALL	0x00010000	/* No library call */
 
 /* Temporary codegen switches */
 #define MASK_INTEL_SYNTAX	0x00000200
@@ -128,6 +129,10 @@ extern int target_flags;
 #define TARGET_ACCUMULATE_OUTGOING_ARGS \
  (target_flags & MASK_ACCUMULATE_OUTGOING_ARGS)
 
+/* No library call.  */
+#define TARGET_NO_LIBRARY_CALL \
+ (target_flags & MASK_NO_LIBRARY_CALL)
+
 /* Put uninitialized locals into bss, not data.
    Meaningful only on svr3.  */
 #define TARGET_SVR3_SHLIB (target_flags & MASK_SVR3_SHLIB)
@@ -280,6 +285,10 @@ extern const int x86_partial_reg_depende
     "Use push instructions to save outgoing arguments" },		      \
   { "no-accumulate-outgoing-args",-MASK_ACCUMULATE_OUTGOING_ARGS,	      \
     "Do not use push instructions to save outgoing arguments" },	      \
+  { "library-call",		-MASK_NO_LIBRARY_CALL,			      \
+    "Emit library call if necessary" },					      \
+  { "no-library-call",		MASK_NO_LIBRARY_CALL,			      \
+    "Don't emit library call" },					      \
   SUBTARGET_SWITCHES							      \
   { "", TARGET_DEFAULT, 0 }}
 
Index: gcc/config/i386/i386.md
===================================================================
RCS file: /work/cvs/gnu/egcs/gcc/config/i386/i386.md,v
retrieving revision 1.1.1.43
diff -u -p -r1.1.1.43 i386.md
--- gcc/config/i386/i386.md	2000/06/16 01:46:52	1.1.1.43
+++ gcc/config/i386/i386.md	2000/06/17 17:27:37
@@ -8740,6 +8740,7 @@
   else if (count >= 0 
 	   && (align >= 8
 	       || (!TARGET_PENTIUMPRO && align >= 4)
+	       || TARGET_NO_LIBRARY_CALL
 	       || optimize_size || count < 64))
     {
       if (count & ~0x03)
@@ -9069,6 +9070,7 @@
   else if (count >= 0 
 	   && (align >= 8
 	       || (!TARGET_PENTIUMPRO && align >= 4)
+	       || TARGET_NO_LIBRARY_CALL
 	       || optimize_size || count < 64))
     {
       zeroreg = copy_to_mode_reg (SImode, const0_rtx);

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]