2015-02-10 Michael Collison <michael.collison@linaro.org>
authorcollison <collison@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 10 Feb 2015 07:53:23 +0000 (07:53 +0000)
committercollison <collison@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 10 Feb 2015 07:53:23 +0000 (07:53 +0000)
Backport from trunk r219583.
2015-01-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

PR target/64460
* config/arm/arm.md (*<arith_shift_insn>_multsi): Set 'shift' to 2.
(*<arith_shift_insn>_shiftsi): Set 'shift' attr to 3.

2015-02-10  Michael Collison  <michael.collison@linaro.org>

Backport from trunk r217430.
2014-11-12  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>

* config/arm/arm.c (*<arith_shift_insn>_shiftsi): Fix typo.

2015-02-10  Michael Collison  <michael.collison@linaro.org>

Backport from trunk r219583.
2015-01-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

PR target/64460
* gcc.target/arm/pr64460_1.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/linaro/gcc-4_9-branch@220570 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog.linaro
gcc/config/arm/arm.md
gcc/testsuite/ChangeLog.linaro
gcc/testsuite/gcc.target/arm/pr64460_1.c [new file with mode: 0644]

index 3e15d76..eba29e9 100644 (file)
@@ -1,5 +1,21 @@
 2015-02-10  Michael Collison  <michael.collison@linaro.org>
 
+       Backport from trunk r219583.
+       2015-01-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
+
+       PR target/64460
+       * config/arm/arm.md (*<arith_shift_insn>_multsi): Set 'shift' to 2.
+       (*<arith_shift_insn>_shiftsi): Set 'shift' attr to 3.
+
+2015-02-10  Michael Collison  <michael.collison@linaro.org>
+
+       Backport from trunk r217430.
+       2014-11-12  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
+
+       * config/arm/arm.c (*<arith_shift_insn>_shiftsi): Fix typo.
+
+2015-02-10  Michael Collison  <michael.collison@linaro.org>
+
        Backport from trunk r217431.
        2014-11-12  Jiong Wang  <jiong.wang@arm.com>
 
index b09daa7..b0551ee 100644 (file)
   "<arith_shift_insn>%?\\t%0, %1, %2, lsl %b3"
   [(set_attr "predicable" "yes")
    (set_attr "predicable_short_it" "no")
-   (set_attr "shift" "4")
+   (set_attr "shift" "2")
    (set_attr "arch" "a,t2")
    (set_attr "type" "alu_shift_imm")])
 
          [(match_operand:SI 3 "s_register_operand" "r,r,r")
           (match_operand:SI 4 "shift_amount_operand" "M,M,r")])
         (match_operand:SI 1 "s_register_operand" "rk,<t2_binop0>,rk")))]
-  "TARGET_32BIT && GET_CODE (operands[3]) != MULT"
+  "TARGET_32BIT && GET_CODE (operands[2]) != MULT"
   "<arith_shift_insn>%?\\t%0, %1, %3%S2"
   [(set_attr "predicable" "yes")
    (set_attr "predicable_short_it" "no")
-   (set_attr "shift" "4")
+   (set_attr "shift" "3")
    (set_attr "arch" "a,t2,a")
    (set_attr "type" "alu_shift_imm,alu_shift_imm,alu_shift_reg")])
 
index ecb31de..c1f24b7 100644 (file)
@@ -1,5 +1,13 @@
 2015-02-10  Michael Collison  <michael.collison@linaro.org>
 
+       Backport from trunk r219583.
+       2015-01-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
+
+       PR target/64460
+       * gcc.target/arm/pr64460_1.c: New test.
+
+2015-02-10  Michael Collison  <michael.collison@linaro.org>
+
        Backport from trunk r217431.
        2014-11-12  Jiong Wang  <jiong.wang@arm.com>
 
diff --git a/gcc/testsuite/gcc.target/arm/pr64460_1.c b/gcc/testsuite/gcc.target/arm/pr64460_1.c
new file mode 100644 (file)
index 0000000..ee6ad4a
--- /dev/null
@@ -0,0 +1,69 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mtune=xscale" } */
+
+typedef unsigned int size_t;
+typedef short unsigned int __uint16_t;
+typedef long unsigned int __uint32_t;
+typedef unsigned int __uintptr_t;
+typedef __uint16_t uint16_t ;
+typedef __uint32_t uint32_t ;
+typedef __uintptr_t uintptr_t;
+typedef uint32_t Objects_Id;
+typedef uint16_t Objects_Maximum;
+typedef struct { } Objects_Control;
+
+static __inline__ void *_Addresses_Align_up (void *address, size_t alignment)
+{
+       uintptr_t mask = alignment - (uintptr_t)1;
+       return (void*)(((uintptr_t)address + mask) & ~mask);
+}
+
+typedef struct {
+       Objects_Id minimum_id;
+       Objects_Maximum maximum;
+       _Bool
+               auto_extend;
+       Objects_Maximum allocation_size;
+       void **object_blocks;
+} Objects_Information;
+
+extern uint32_t _Objects_Get_index (Objects_Id);
+extern void** _Workspace_Allocate (size_t);
+
+void _Objects_Extend_information (Objects_Information *information)
+{
+       uint32_t block_count;
+       uint32_t minimum_index;
+       uint32_t maximum;
+       size_t block_size;
+       _Bool
+               do_extend =
+               minimum_index = _Objects_Get_index( information->minimum_id );
+       if ( information->object_blocks ==
+                       ((void *)0)
+          )
+               block_count = 0;
+       else {
+               block_count = information->maximum / information->allocation_size;
+       }
+       if ( do_extend ) {
+               void **object_blocks;
+               uintptr_t object_blocks_size;
+               uintptr_t inactive_per_block_size;
+               object_blocks_size = (uintptr_t)_Addresses_Align_up(
+                               (void*)(block_count * sizeof(void*)),
+                               8
+                               );
+               inactive_per_block_size =
+                       (uintptr_t)_Addresses_Align_up(
+                                       (void*)(block_count * sizeof(uint32_t)),
+                                       8
+                                       );
+               block_size = object_blocks_size + inactive_per_block_size +
+                       ((maximum + minimum_index) * sizeof(Objects_Control *));
+               if ( information->auto_extend ) {
+                       object_blocks = _Workspace_Allocate( block_size );
+               } else {
+               }
+       }
+}