On 11/14/2017 02:59 PM, Joseph Myers wrote:
> On Tue, 14 Nov 2017, Martin Liška wrote:
> 
>> Hello.
>>
>> Quite obvious fix for SH target. Joseph can you please continue with testing?
>> I don't have a machine to test the patch.
> 
> I don't have SH hardware, but can confirm that, in conjunction with 
> Martin's glibc patch to work around strncpy warnings (where the proper fix 
> and another patch for one case are still under discussion), this fixes the 
> sh4-linux-gnu glibc build with build-many-glibcs.py.  (The glibc testsuite 
> build fails - errors in string/bug-strncat1.c, string/tester.c at least - 
> but the failures I see look like more fallout from Martin's GCC changes, 
> probably cases where the testsuite needs to disable the warnings, not 
> anything SH-specific.)
> 

Hello.

Good, I'm planning to install slightly simplified version of the patch.

Martin
>From 8dcdd9c110e39da619f0fa0e73d024186df66515 Mon Sep 17 00:00:00 2001
From: marxin <mli...@suse.cz>
Date: Wed, 15 Nov 2017 08:09:18 +0100
Subject: [PATCH] Use proper probability (PR target/82927)

gcc/ChangeLog:

2017-11-15  Martin Liska  <mli...@suse.cz>

	PR target/82927
	* config/sh/sh-mem.cc: Use proper probability for
	REG_BR_PROB_NOTE.
---
 gcc/config/sh/sh-mem.cc | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/gcc/config/sh/sh-mem.cc b/gcc/config/sh/sh-mem.cc
index 8fce9799921..4c33260d84e 100644
--- a/gcc/config/sh/sh-mem.cc
+++ b/gcc/config/sh/sh-mem.cc
@@ -183,8 +183,12 @@ expand_block_move (rtx *operands)
   return false;
 }
 
-static const int prob_unlikely = REG_BR_PROB_BASE / 10;
-static const int prob_likely = REG_BR_PROB_BASE / 4;
+static const int prob_unlikely
+  = profile_probability::from_reg_br_prob_base (REG_BR_PROB_BASE / 10)
+    .to_reg_br_prob_note ();
+static const int prob_likely
+  = profile_probability::from_reg_br_prob_base (REG_BR_PROB_BASE / 4)
+    .to_reg_br_prob_note ();
 
 /* Emit code to perform a strcmp.
 
-- 
2.14.3

Reply via email to