This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[patch] s390: enable -mmvcle at -Os
- From: Adrian Straetling <straetling at de dot ibm dot com>
- To: gcc-patches at gcc dot gnu dot org, "Weigand, Ulrich" <uweigand at de dot ibm dot com>
- Date: Wed, 6 Jul 2005 16:15:24 +0200
- Subject: [patch] s390: enable -mmvcle at -Os
Hi,
this patch enables -mmvcle at -Os as it reduces the code size of movmem
and setmem expansions.
It also fixes a typo in s390.opt regarding -mmvcle.
Successfully bootstrapped and regtested on s390(x).
Ok for mainline?
Bye,
Adrian
2006-07-05 Adrian Straetling <straetling@de.ibm.com>
* config/s390/s390.c: (optimization_options): Enable
TARGET_MVCLE at -Os.
* doc/invoke.texi: Document changes in default behaviour.
* config/s390/s390.opt: ("mvcle"): Fix typo: is "mmvcle".
Index: gcc/config/s390/s390.c
===================================================================
*** gcc/config/s390/s390.c.orig 2005-07-01 12:51:42.000000000 +0200
--- gcc/config/s390/s390.c 2005-07-04 16:47:56.238821413 +0200
*************** optimization_options (int level ATTRIBUT
*** 1107,1112 ****
--- 1107,1116 ----
/* By default, always emit DWARF-2 unwind info. This allows debugging
without maintaining a stack frame back-chain. */
flag_asynchronous_unwind_tables = 1;
+
+ /* Use MVCLE instructions to decrease code size if requested. */
+ if (size != 0)
+ target_flags |= MASK_MVCLE;
}
/* Return true if ARG is the name of a processor. Set *TYPE and *FLAGS
Index: gcc/doc/invoke.texi
===================================================================
*** gcc/doc/invoke.texi.orig 2005-06-28 20:34:11.000000000 +0200
--- gcc/doc/invoke.texi 2005-07-04 17:00:04.428821413 +0200
*************** to the GNU/Linux for zSeries ABI, the de
*** 11437,11443 ****
@opindex mno-mvcle
Generate (or do not generate) code using the @code{mvcle} instruction
to perform block moves. When @option{-mno-mvcle} is specified,
! use a @code{mvc} loop instead. This is the default.
@item -mdebug
@itemx -mno-debug
--- 11437,11444 ----
@opindex mno-mvcle
Generate (or do not generate) code using the @code{mvcle} instruction
to perform block moves. When @option{-mno-mvcle} is specified,
! use a @code{mvc} loop instead. This is the default unless optimizing for
! size.
@item -mdebug
@itemx -mno-debug
Index: gcc/config/s390/s390.opt
===================================================================
*** gcc/config/s390/s390.opt.orig 2005-07-04 16:53:05.698821413 +0200
--- gcc/config/s390/s390.opt 2005-07-04 16:53:11.268821413 +0200
*************** mtune=
*** 79,85 ****
Target RejectNegative Joined
Schedule code for given CPU
! mvcle
Target Report Mask(MVCLE)
mvcle use
--- 79,85 ----
Target RejectNegative Joined
Schedule code for given CPU
! mmvcle
Target Report Mask(MVCLE)
mvcle use