• Skip to sidebar navigation
  • Skip to content

Bitbucket

  • More
    ProjectsRepositories
  • Help
    • Online help
    • Learn Git
    • Welcome to Bitbucket
    • Keyboard shortcuts
  • Log In
Alexander Dahl
  1. Alexander Dahl

buildroot

Public
Actions
  • Clone
  • Compare

Learn more about cloning repositories

You have read-only access

Navigation
  • Source
  • Commits
  • Branches
  • All Branches Graph
  • Forks
  1. Alexander Dahl
  2. buildroot

Source

buildroot/package/gcc/arc-2017.09-release/0001-fix-checking-for-jumps.patch
Evgeniy DidinEvgeniy Didin committed 9d544feb8a214 Nov 2017
Raw file
Source viewDiff to previous
 
1
From c2694d3739d90ea3350b42252638b604a2c122b7 Mon Sep 17 00:00:00 2001
2
From: Claudiu Zissulescu <claziss@gmail.com>
3
Date: Tue, 7 Nov 2017 20:16:41 +0200
4
Subject: [PATCH] [FIX][ZOL] fix checking for jumps
5
​
6
Signed-off-by: Evgeniy Didin <didin@synopsys.com>
7
---
8
 gcc/config/arc/arc.c                  |  3 ++-
9
 gcc/testsuite/gcc.target/arc/loop-4.c | 14 ++++++++++++++
10
 2 files changed, 16 insertions(+), 1 deletion(-)
11
 create mode 100644 gcc/testsuite/gcc.target/arc/loop-4.c
12
​
13
diff --git a/gcc/config/arc/arc.c b/gcc/config/arc/arc.c
14
index 22eeb34a371..5d367499d03 100644
15
--- a/gcc/config/arc/arc.c
16
+++ b/gcc/config/arc/arc.c
17
@@ -7505,7 +7505,8 @@ hwloop_optimize (hwloop_info loop)
18
       && INSN_P (last_insn)
19
       && (JUMP_P (last_insn) || CALL_P (last_insn)
20
      || GET_CODE (PATTERN (last_insn)) == SEQUENCE
21
-     || JUMP_P (prev_active_insn (last_insn))
22
+     || (prev_active_insn (last_insn)
23
+         && JUMP_P (prev_active_insn (last_insn)))
24
      /* At this stage we can have (insn (clobber (mem:BLK
25
         (reg)))) instructions, ignpre them.  */
26
      || (GET_CODE (PATTERN (last_insn)) != CLOBBER
27
diff --git a/gcc/testsuite/gcc.target/arc/loop-4.c b/gcc/testsuite/gcc.target/arc/loop-4.c
28
new file mode 100644
29
index 00000000000..99a93a74d1e
30
--- /dev/null
31
+++ b/gcc/testsuite/gcc.target/arc/loop-4.c
32
@@ -0,0 +1,14 @@
33
+/* { dg-do assemble } */
34
+/* { dg-do compile } */
35
+/* { dg-options "-Os" } */
36
+
37
+
38
+void fn1(void *p1, int p2, int p3)
39
+{
40
+  char *d = p1;
41
+  do
42
+    *d++ = p2;
43
+  while (--p3);
44
+}
45
+
46
+/* { dg-final { scan-assembler "lp_count" } } */
47
-- 
48
2.11.0
49
​
  • Git repository management for enterprise teams powered by Atlassian Bitbucket
  • Atlassian Bitbucket v6.7.2
  • Documentation
  • Request a feature
  • About
  • Contact Atlassian
Atlassian

Everything looks good. We'll let you know here if there's anything you should know about.