From: Oleg Endo <oleg.endo@t-online.de>
To: gcc-patches <gcc-patches@gcc.gnu.org>
Subject: [SH][committed] Remove function fldi_ok
Date: Thu, 16 Oct 2014 13:33:00 -0000 [thread overview]
Message-ID: <1413465578.31394.126.camel@yam-132-YW-E178-FTW> (raw)
[-- Attachment #1: Type: text/plain, Size: 389 bytes --]
Hi,
The fldi_ok function in sh.c has been returning 'true' for while. Thus
it can as well be removed. Tested with 'make all-gcc', committed as
r216320.
Cheers,
Oleg
gcc/ChangeLog:
* config/sh/sh-protos.h (fldi_ok): Remove.
* config/sh/sh.c (fldi_ok): Likewise.
(sh_secondary_reload): Don't use fldi_ok.
* config/sh/constraints.md (G constraint, H constraint): Don't use
fldi_ok.
[-- Attachment #2: sh_remove_fldi_ok.patch --]
[-- Type: text/x-patch, Size: 2396 bytes --]
Index: gcc/config/sh/sh-protos.h
===================================================================
--- gcc/config/sh/sh-protos.h (revision 216316)
+++ gcc/config/sh/sh-protos.h (working copy)
@@ -191,7 +191,6 @@
extern void sh_expand_epilogue (bool);
extern void sh_set_return_address (rtx, rtx);
extern int initial_elimination_offset (int, int);
-extern bool fldi_ok (void);
extern bool sh_hard_regno_rename_ok (unsigned int, unsigned int);
extern bool sh_cfun_interrupt_handler_p (void);
extern bool sh_cfun_resbank_handler_p (void);
Index: gcc/config/sh/constraints.md
===================================================================
--- gcc/config/sh/constraints.md (revision 216316)
+++ gcc/config/sh/constraints.md (working copy)
@@ -210,12 +210,12 @@
(define_constraint "G"
"Double constant 0."
(and (match_code "const_double")
- (match_test "fp_zero_operand (op) && fldi_ok ()")))
+ (match_test "fp_zero_operand (op)")))
(define_constraint "H"
"Double constant 1."
(and (match_code "const_double")
- (match_test "fp_one_operand (op) && fldi_ok ()")))
+ (match_test "fp_one_operand (op)")))
;; Extra constraints
(define_constraint "Q"
Index: gcc/config/sh/sh.c
===================================================================
--- gcc/config/sh/sh.c (revision 216316)
+++ gcc/config/sh/sh.c (working copy)
@@ -9875,19 +9875,6 @@
return REAL_VALUES_EQUAL (r, dconst1);
}
-/* In general mode switching is used. If we are
- compiling without -mfmovd, movsf_ie isn't taken into account for
- mode switching. We could check in machine_dependent_reorg for
- cases where we know we are in single precision mode, but there is
- interface to find that out during reload, so we must avoid
- choosing an fldi alternative during reload and thus failing to
- allocate a scratch register for the constant loading. */
-bool
-fldi_ok (void)
-{
- return true;
-}
-
/* Return the TLS type for TLS symbols. */
enum tls_model
tls_symbolic_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
@@ -13106,8 +13093,7 @@
if (REGCLASS_HAS_FP_REG (rclass)
&& ! TARGET_SHMEDIA
&& immediate_operand ((x), mode)
- && ! ((fp_zero_operand (x) || fp_one_operand (x))
- && mode == SFmode && fldi_ok ()))
+ && ! ((fp_zero_operand (x) || fp_one_operand (x)) && mode == SFmode))
switch (mode)
{
case SFmode:
reply other threads:[~2014-10-16 13:20 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1413465578.31394.126.camel@yam-132-YW-E178-FTW \
--to=oleg.endo@t-online.de \
--cc=gcc-patches@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).