gcc/testsuite:
authoramylaar <amylaar@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 28 Oct 2013 12:19:16 +0000 (12:19 +0000)
committeramylaar <amylaar@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 28 Oct 2013 12:19:16 +0000 (12:19 +0000)
2013-10-28   Claudiu Zissulescu  <claziss@synopsys.com>
             Joern Rennecke  <joern.rennecke@embecosm.com>
        * gcc.target/arc/jump-around-jump.c: New test.
gcc:
2013-10-28  Joern Rennecke  <joern.rennecke@embecosm.com>
        * config/arc/arc.c (arc_ccfsm_post_advance):
        Add comment about TYPE_RETURN.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@204123 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/arc/arc.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/arc/jump-around-jump.c [new file with mode: 0644]

index 461439a..47041b2 100644 (file)
@@ -1,3 +1,8 @@
+2013-10-28  Joern Rennecke  <joern.rennecke@embecosm.com>
+
+       * config/arc/arc.c (arc_ccfsm_post_advance):
+       Add comment about TYPE_RETURN.
+
 2013-10-28  Bin Cheng  <bin.cheng@arm.com>
 
        * tree-ssa-loop-ivopts.c (strip_offset_1): Change parameter type.
index 7c39d53..6ddd486 100644 (file)
@@ -3720,6 +3720,8 @@ arc_ccfsm_post_advance (rtx insn, struct arc_ccfsm *state)
           && GET_CODE (PATTERN (insn)) != ADDR_DIFF_VEC
           && ((type = get_attr_type (insn)) == TYPE_BRANCH
               || (type == TYPE_UNCOND_BRANCH
+                  /* ??? Maybe should also handle TYPE_RETURN here,
+                     but we don't have a testcase for that.  */
                   && ARC_CCFSM_BRANCH_DELETED_P (state))))
     {
       if (ARC_CCFSM_BRANCH_DELETED_P (state))
index 12028b4..2853ec4 100644 (file)
@@ -1,3 +1,8 @@
+2013-10-28   Claudiu Zissulescu  <claziss@synopsys.com>
+            Joern Rennecke  <joern.rennecke@embecosm.com>
+
+       * gcc.target/arc/jump-around-jump.c: New test.
+
 2013-10-27  Tom de Vries  <tom@codesourcery.com>
 
        * gcc.target/arm/require-pic-register-loc.c: New test.
diff --git a/gcc/testsuite/gcc.target/arc/jump-around-jump.c b/gcc/testsuite/gcc.target/arc/jump-around-jump.c
new file mode 100644 (file)
index 0000000..1b45328
--- /dev/null
@@ -0,0 +1,123 @@
+/* { dg-do compile } */
+/* { dg-options "-Os -mlock -mswape -mrtsc -fno-reorder-blocks" } */
+
+/* This caused an ICE in arc_ifcvt when the 1->3 state change was not
+   implemented for TYPE_UNCOND_BRANCH in arc_ccfsm_post_advance.  */
+
+typedef long __kernel_long_t;
+typedef __kernel_long_t __kernel_time_t;
+
+struct timespec {
+ __kernel_time_t tv_sec;
+ long tv_nsec;
+};
+
+
+struct module;
+struct device {
+ struct device *parent;
+};
+
+struct rtc_time {
+ int tm_sec;
+ int tm_min;
+ int tm_hour;
+ int tm_mday;
+ int tm_mon;
+ int tm_year;
+ int tm_wday;
+ int tm_yday;
+ int tm_isdst;
+};
+struct rtc_wkalrm {
+ unsigned char enabled;
+ unsigned char pending;
+ struct rtc_time time;
+};
+
+struct rtc_class_ops {
+ int (*open)(struct device *);
+ void (*release)(struct device *);
+ int (*ioctl)(struct device *, unsigned int, unsigned long);
+ int (*read_time)(struct device *, struct rtc_time *);
+ int (*set_time)(struct device *, struct rtc_time *);
+ int (*read_alarm)(struct device *, struct rtc_wkalrm *);
+ int (*set_alarm)(struct device *, struct rtc_wkalrm *);
+  //int (*proc)(struct device *, struct seq_file *);
+ int (*set_mmss)(struct device *, unsigned long secs);
+ int (*read_callback)(struct device *, int data);
+ int (*alarm_irq_enable)(struct device *, unsigned int enabled);
+};
+
+struct rtc_device
+{
+ struct device dev;
+ struct module *owner;
+
+ int id;
+ char name[20];
+
+ const struct rtc_class_ops *ops;
+  // struct mutex ops_lock;
+
+  // struct cdev char_dev;
+ unsigned long flags;
+
+ unsigned long irq_data;
+  //spinlock_t irq_lock;
+  //wait_queue_head_t irq_queue;
+  //struct fasync_struct *async_queue;
+
+  //struct rtc_task *irq_task;
+  //spinlock_t irq_task_lock;
+ int irq_freq;
+ int max_user_freq;
+
+  //struct timerqueue_head timerqueue;
+  //struct rtc_timer aie_timer;
+  //struct rtc_timer uie_rtctimer;
+  //struct hrtimer pie_timer;
+ int pie_enabled;
+  //struct work_struct irqwork;
+
+ int uie_unsupported;
+
+
+  //struct work_struct uie_task;
+  //struct timer_list uie_timer;
+
+ unsigned int oldsecs;
+ unsigned int uie_irq_active:1;
+ unsigned int stop_uie_polling:1;
+ unsigned int uie_task_active:1;
+ unsigned int uie_timer_active:1;
+
+};
+
+extern void rtc_time_to_tm(unsigned long time, struct rtc_time *tm);
+extern struct rtc_device *rtc_class_open(const char *name);
+extern void rtc_class_close(struct rtc_device *rtc);
+
+
+int rtc_set_ntp_time(struct timespec now)
+{
+ struct rtc_device *rtc;
+ struct rtc_time tm;
+ int err = -19;
+
+ if (now.tv_nsec < (1000000000L >> 1))
+  rtc_time_to_tm(now.tv_sec, &tm);
+ else
+  rtc_time_to_tm(now.tv_sec + 1, &tm);
+
+ rtc = rtc_class_open("rtc0");
+ if (rtc) {
+
+
+  if (rtc->ops && (rtc->ops->set_time || rtc->ops->set_mmss))
+   err = rtc_set_time(rtc, &tm);
+  rtc_class_close(rtc);
+ }
+
+ return err;
+}