public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH 3/6] [AArch64-4.7] Fix warning - aarch64_legitimize_reload_address passes the wrong type to push_reload.
  2013-02-01 17:43 [Patch 0/6][AArch64-4.7] Fix warnings James Greenhalgh
@ 2013-02-01 17:43 ` James Greenhalgh
  2013-02-02 14:24   ` Richard Earnshaw
  2013-02-01 17:43 ` [PATCH 2/6] [AArch64-4.7] Fix warning - aarch64_add_constant mixed code and declarations James Greenhalgh
                   ` (4 subsequent siblings)
  5 siblings, 1 reply; 13+ messages in thread
From: James Greenhalgh @ 2013-02-01 17:43 UTC (permalink / raw)
  To: gcc-patches; +Cc: marcus.shawcroft

[-- Attachment #1: Type: text/plain, Size: 899 bytes --]


Hi,

push_reload takes an `enum reload_type' as its final argument.

On trunk we just cast the int we have to the correct type,
so we do that here to mirror trunk and correct the warning.
We can't fix this by changing the type of the argument we take
as we would then need to forward declare the enum when giving
the prototype, which is illegal.

This fixes the warning:

config/aarch64/aarch64.c: In function ‘aarch64_legitimize_reload_address’:
config/aarch64/aarch64.c:3641:6: warning: enum conversion when passing argument 11 of ‘push_reload’ is invalid in C++ [-Wc++-compat]

Regression tested aarch64-none-elf with no regressions.

OK for aarch64-4.7-branch?

Thanks,
James

---
gcc/

2013-02-01  James Greenhalgh  <james.greenhalgh@arm.com>

	* config/aarch64/aarch64.c
	(aarch64_legitimize_reload_address): Cast 'type' before
	passing to push_reload.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0003-AArch64-4.7-Fix-warning-aarch64_legitimize_reload_ad.patch --]
[-- Type: text/x-patch;  name=0003-AArch64-4.7-Fix-warning-aarch64_legitimize_reload_ad.patch, Size: 1018 bytes --]

diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c
index 62d0a12..fef2983 100644
--- a/gcc/config/aarch64/aarch64.c
+++ b/gcc/config/aarch64/aarch64.c
@@ -3701,7 +3701,7 @@ aarch64_legitimize_reload_address (rtx *x_p,
       x = copy_rtx (x);
       push_reload (orig_rtx, NULL_RTX, x_p, NULL,
 		   BASE_REG_CLASS, GET_MODE (x), VOIDmode, 0, 0,
-		   opnum, type);
+		   opnum, (enum reload_type) type);
       return x;
     }
 
@@ -3714,7 +3714,7 @@ aarch64_legitimize_reload_address (rtx *x_p,
     {
       push_reload (XEXP (x, 0), NULL_RTX, &XEXP (x, 0), NULL,
 		   BASE_REG_CLASS, GET_MODE (x), VOIDmode, 0, 0,
-		   opnum, type);
+		   opnum, (enum reload_type) type);
       return x;
     }
 
@@ -3778,7 +3778,7 @@ aarch64_legitimize_reload_address (rtx *x_p,
 
       push_reload (XEXP (x, 0), NULL_RTX, &XEXP (x, 0), NULL,
 		   BASE_REG_CLASS, Pmode, VOIDmode, 0, 0,
-		   opnum, type);
+		   opnum, (enum reload_type) type);
       return x;
     }
 

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH 1/6] [AArch64-4.7] Fix warning - Initialise generic_tunings.
  2013-02-01 17:43 [Patch 0/6][AArch64-4.7] Fix warnings James Greenhalgh
  2013-02-01 17:43 ` [PATCH 3/6] [AArch64-4.7] Fix warning - aarch64_legitimize_reload_address passes the wrong type to push_reload James Greenhalgh
  2013-02-01 17:43 ` [PATCH 2/6] [AArch64-4.7] Fix warning - aarch64_add_constant mixed code and declarations James Greenhalgh
@ 2013-02-01 17:43 ` James Greenhalgh
  2013-02-02 14:23   ` Richard Earnshaw
  2013-02-01 17:44 ` [PATCH 5/6] [AArch64-4.7] Fix warning - Mixed code and declarations in aarch64_simd_const_bounds James Greenhalgh
                   ` (2 subsequent siblings)
  5 siblings, 1 reply; 13+ messages in thread
From: James Greenhalgh @ 2013-02-01 17:43 UTC (permalink / raw)
  To: gcc-patches; +Cc: marcus.shawcroft

[-- Attachment #1: Type: text/plain, Size: 604 bytes --]


Hi,

This patch moves the various tuning parameter data structures
further up config/aarch64/aarch64.c and then uses them to
initialise the generic_tunings variable. This mirrors their
position on trunk.

This fixes the warning:

config/aarch64/aarch64.c:129:33: warning: uninitialised const ‘generic_tunings’ is invalid in C++ [-Wc++-compat]

Regression tested on aarch64-none-elf with no regressions.

OK for aarch64-4.7-branch?

Thanks,
James

---
gcc/

2013-02-01  James Greenhalgh  <james.greenhalgh@arm.com>

	* config/aarch64/aarch64.c (generic_tunings): Initialise.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-AArch64-4.7-Fix-warning-Initialise-generic_tunings.patch --]
[-- Type: text/x-patch;  name=0001-AArch64-4.7-Fix-warning-Initialise-generic_tunings.patch, Size: 4754 bytes --]

diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c
index 40f438d..59124eb 100644
--- a/gcc/config/aarch64/aarch64.c
+++ b/gcc/config/aarch64/aarch64.c
@@ -125,8 +125,70 @@ unsigned long aarch64_isa_flags = 0;
 /* Mask to specify which instruction scheduling options should be used.  */
 unsigned long aarch64_tune_flags = 0;
 
-/* Tuning models.  */
-static const struct tune_params generic_tunings;
+/* Tuning parameters.  */
+
+#if HAVE_DESIGNATED_INITIALIZERS
+#define NAMED_PARAM(NAME, VAL) .NAME = (VAL)
+#else
+#define NAMED_PARAM(NAME, VAL) (VAL)
+#endif
+
+#if HAVE_DESIGNATED_INITIALIZERS && GCC_VERSION >= 2007
+__extension__
+#endif
+static const struct cpu_rtx_cost_table generic_rtx_cost_table =
+{
+  NAMED_PARAM (memory_load, COSTS_N_INSNS (1)),
+  NAMED_PARAM (memory_store, COSTS_N_INSNS (0)),
+  NAMED_PARAM (register_shift, COSTS_N_INSNS (1)),
+  NAMED_PARAM (int_divide, COSTS_N_INSNS (6)),
+  NAMED_PARAM (float_divide, COSTS_N_INSNS (2)),
+  NAMED_PARAM (double_divide, COSTS_N_INSNS (6)),
+  NAMED_PARAM (int_multiply, COSTS_N_INSNS (1)),
+  NAMED_PARAM (int_multiply_extend, COSTS_N_INSNS (1)),
+  NAMED_PARAM (int_multiply_add, COSTS_N_INSNS (1)),
+  NAMED_PARAM (int_multiply_extend_add, COSTS_N_INSNS (1)),
+  NAMED_PARAM (float_multiply, COSTS_N_INSNS (0)),
+  NAMED_PARAM (double_multiply, COSTS_N_INSNS (1))
+};
+
+#if HAVE_DESIGNATED_INITIALIZERS && GCC_VERSION >= 2007
+__extension__
+#endif
+static const struct cpu_addrcost_table generic_addrcost_table =
+{
+  NAMED_PARAM (pre_modify, 0),
+  NAMED_PARAM (post_modify, 0),
+  NAMED_PARAM (register_offset, 0),
+  NAMED_PARAM (register_extend, 0),
+  NAMED_PARAM (imm_offset, 0)
+};
+
+#if HAVE_DESIGNATED_INITIALIZERS && GCC_VERSION >= 2007
+__extension__
+#endif
+static const struct cpu_regmove_cost generic_regmove_cost =
+{
+  NAMED_PARAM (GP2GP, 1),
+  NAMED_PARAM (GP2FP, 2),
+  NAMED_PARAM (FP2GP, 2),
+  /* We currently do not provide direct support for TFmode Q->Q move.
+     Therefore we need to raise the cost above 2 in order to have
+     reload handle the situation.  */
+  NAMED_PARAM (FP2FP, 4)
+};
+
+#if HAVE_DESIGNATED_INITIALIZERS && GCC_VERSION >= 2007
+__extension__
+#endif
+
+static const struct tune_params generic_tunings =
+{
+  &generic_rtx_cost_table,
+  &generic_addrcost_table,
+  &generic_regmove_cost,
+  NAMED_PARAM (memmov_cost, 4)
+};
 
 /* A processor implementing AArch64.  */
 struct processor
@@ -4504,71 +4566,6 @@ aarch64_memory_move_cost (enum machine_mode mode ATTRIBUTE_UNUSED,
 
 static void initialize_aarch64_code_model (void);
 
-/* Tuning parameters.  */
-
-#if HAVE_DESIGNATED_INITIALIZERS
-#define NAMED_PARAM(NAME, VAL) .NAME = (VAL)
-#else
-#define NAMED_PARAM(NAME, VAL) (VAL)
-#endif
-
-#if HAVE_DESIGNATED_INITIALIZERS && GCC_VERSION >= 2007
-__extension__
-#endif
-static const struct cpu_rtx_cost_table generic_rtx_cost_table =
-{
-  NAMED_PARAM (memory_load, COSTS_N_INSNS (1)),
-  NAMED_PARAM (memory_store, COSTS_N_INSNS (0)),
-  NAMED_PARAM (register_shift, COSTS_N_INSNS (1)),
-  NAMED_PARAM (int_divide, COSTS_N_INSNS (6)),
-  NAMED_PARAM (float_divide, COSTS_N_INSNS (2)),
-  NAMED_PARAM (double_divide, COSTS_N_INSNS (6)),
-  NAMED_PARAM (int_multiply, COSTS_N_INSNS (1)),
-  NAMED_PARAM (int_multiply_extend, COSTS_N_INSNS (1)),
-  NAMED_PARAM (int_multiply_add, COSTS_N_INSNS (1)),
-  NAMED_PARAM (int_multiply_extend_add, COSTS_N_INSNS (1)),
-  NAMED_PARAM (float_multiply, COSTS_N_INSNS (0)),
-  NAMED_PARAM (double_multiply, COSTS_N_INSNS (1))
-};
-
-#if HAVE_DESIGNATED_INITIALIZERS && GCC_VERSION >= 2007
-__extension__
-#endif
-static const struct cpu_addrcost_table generic_addrcost_table =
-{
-  NAMED_PARAM (pre_modify, 0),
-  NAMED_PARAM (post_modify, 0),
-  NAMED_PARAM (register_offset, 0),
-  NAMED_PARAM (register_extend, 0),
-  NAMED_PARAM (imm_offset, 0)
-};
-
-#if HAVE_DESIGNATED_INITIALIZERS && GCC_VERSION >= 2007
-__extension__
-#endif
-static const struct cpu_regmove_cost generic_regmove_cost =
-{
-  NAMED_PARAM (GP2GP, 1),
-  NAMED_PARAM (GP2FP, 2),
-  NAMED_PARAM (FP2GP, 2),
-  /* We currently do not provide direct support for TFmode Q->Q move.
-     Therefore we need to raise the cost above 2 in order to have
-     reload handle the situation.  */
-  NAMED_PARAM (FP2FP, 4)
-};
-
-#if HAVE_DESIGNATED_INITIALIZERS && GCC_VERSION >= 2007
-__extension__
-#endif
-static const struct tune_params generic_tunings =
-{
-  &generic_rtx_cost_table,
-  &generic_addrcost_table,
-  &generic_regmove_cost,
-  NAMED_PARAM (memmov_cost, 4)
-};
-
-
 /* Parse the architecture extension string.  */
 
 static void

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH 2/6] [AArch64-4.7] Fix warning - aarch64_add_constant mixed code and declarations.
  2013-02-01 17:43 [Patch 0/6][AArch64-4.7] Fix warnings James Greenhalgh
  2013-02-01 17:43 ` [PATCH 3/6] [AArch64-4.7] Fix warning - aarch64_legitimize_reload_address passes the wrong type to push_reload James Greenhalgh
@ 2013-02-01 17:43 ` James Greenhalgh
  2013-02-02 14:24   ` Richard Earnshaw
  2013-02-01 17:43 ` [PATCH 1/6] [AArch64-4.7] Fix warning - Initialise generic_tunings James Greenhalgh
                   ` (3 subsequent siblings)
  5 siblings, 1 reply; 13+ messages in thread
From: James Greenhalgh @ 2013-02-01 17:43 UTC (permalink / raw)
  To: gcc-patches; +Cc: marcus.shawcroft

[-- Attachment #1: Type: text/plain, Size: 659 bytes --]


Hi,

In config/aarch64/aarch64.c::aarch64_add_constant `shift' was
declared after we started writing code. C90 doesn't like this,
so split the declaration and the assignment.

This fixes the warning:

config/aarch64/aarch64.c: In function ‘aarch64_add_constant’:
config/aarch64/aarch64.c:2249:4: warning: ISO C90 forbids mixed declarations and code [-pedantic]

Regression tested on aarch64-none-elf with no regressions.

OK for aarch64-4.7-branch?

Thanks,
James

---
gcc/

2013-02-01  James Greenhalgh  <james.greenhalgh@arm.com>

	* config/aarch64/aarch64.c
  	(aarch64_add_constant): Move declaration of 'shift' above code.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0002-AArch64-4.7-Fix-warning-aarch64_add_constant-mixed-c.patch --]
[-- Type: text/x-patch;  name=0002-AArch64-4.7-Fix-warning-aarch64_add_constant-mixed-c.patch, Size: 654 bytes --]

diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c
index 59124eb..62d0a12 100644
--- a/gcc/config/aarch64/aarch64.c
+++ b/gcc/config/aarch64/aarch64.c
@@ -2307,8 +2307,9 @@ aarch64_add_constant (int regnum, int scratchreg, HOST_WIDE_INT delta)
     {
       if (mdelta >= 4096)
 	{
+	  rtx shift;
 	  emit_insn (gen_rtx_SET (Pmode, scratch_rtx, GEN_INT (mdelta / 4096)));
-	  rtx shift = gen_rtx_ASHIFT (Pmode, scratch_rtx, GEN_INT (12));
+	  shift = gen_rtx_ASHIFT (Pmode, scratch_rtx, GEN_INT (12));
 	  if (delta < 0)
 	    emit_insn (gen_rtx_SET (Pmode, this_rtx,
 				    gen_rtx_MINUS (Pmode, this_rtx, shift)));

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Patch 0/6][AArch64-4.7] Fix warnings.
@ 2013-02-01 17:43 James Greenhalgh
  2013-02-01 17:43 ` [PATCH 3/6] [AArch64-4.7] Fix warning - aarch64_legitimize_reload_address passes the wrong type to push_reload James Greenhalgh
                   ` (5 more replies)
  0 siblings, 6 replies; 13+ messages in thread
From: James Greenhalgh @ 2013-02-01 17:43 UTC (permalink / raw)
  To: gcc-patches; +Cc: marcus.shawcroft

[-- Attachment #1: Type: text/plain, Size: 2875 bytes --]

Hi,

This patch series fixes a number of warnings in the AArch64 port on
the aarch64-4.7-branch.

The warnings fixed are:

---
[AArch64-4.7] Fix warning - Initialise generic_tunings.

    config/aarch64/aarch64.c:129:33: warning: uninitialised const ‘generic_tunings’ is invalid in C++ [-Wc++-compat]
---
[AArch64-4.7] Fix warning - aarch64_add_constant mixed code and declarations.

    config/aarch64/aarch64.c: In function ‘aarch64_add_constant’:
    config/aarch64/aarch64.c:2249:4: warning: ISO C90 forbids mixed declarations and code [-pedantic]
---
[AArch64-4.7] Fix warning - aarch64_legitimize_reload_address passes
  the wrong type to push_reload.

    config/aarch64/aarch64.c: In function ‘aarch64_legitimize_reload_address’:
    config/aarch64/aarch64.c:3641:6: warning: enum conversion when passing argument 11 of ‘push_reload’ is invalid in C++ [-Wc++-compat]
---
[AArch64-4.7] Fix warning - aarch64_trampoline_init passes the wrong
  type to emit_library_call.

    config/aarch64/aarch64.c: In function ‘aarch64_trampoline_init’:
    config/aarch64/aarch64.c:3893:8: warning: enum conversion when passing argument 2 of ‘emit_library_call’ is invalid in C++ [-Wc++-compat]
---
[AArch64-4.7] Fix warning - Mixed code and declarations in
  aarch64_simd_const_bounds.

    config/aarch64/aarch64.c: In function ‘aarch64_simd_const_bounds’:
    config/aarch64/aarch64.c:6412:3: warning: ISO C90 forbids mixed declarations and code [-pedantic]
---
[AArch64-4.7] Backport: Fix warning in aarch64.md

    config/aarch64/aarch64.md:840: warning: source missing a mode?
---

The patch series as a whole has been regression tested against
aarch64-none-elf with no regressions.

Are these patches OK to commit to aarch64-4.7-branch?

Thanks,
James Greenhalgh

---
gcc/

2013-02-01  James Greenhalgh  <james.greenhalgh@arm.com>

	* config/aarch64/aarch64.c (generic_tunings): Initialise.

2013-02-01  James Greenhalgh  <james.greenhalgh@arm.com>

	* config/aarch64/aarch64.c
  	(aarch64_add_constant): Move declaration of 'shift' above code.

2013-02-01  James Greenhalgh  <james.greenhalgh@arm.com>

	* config/aarch64/aarch64.c
	(aarch64_legitimize_reload_address): Cast 'type' before
	passing to push_reload.

2013-02-01  James Greenhalgh  <james.greenhalgh@arm.com>

	* config/aarch64/aarch64.c
	(aarch64_trampoline_init): Pass 'LCT_NORMAL' rather than '0'
	to emit_library_call.

2013-02-01  James Greenhalgh  <james.greenhalgh@arm.com>

	* config/aarch64/aarch64.c
	(aarch64_simd_const_bounds): Move declaration of 'lane' above code.

2013-02-01  James Greenhalgh  <james.greenhalgh@arm.com>

	Backport from mainline.
	2012-12-18  James Greenhalgh  <james.greenhalgh@arm.com>

	* config/aarch64/aarch64.md (insv_imm<mode>): Add modes
	for source operands.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH 5/6] [AArch64-4.7] Fix warning - Mixed code and declarations in aarch64_simd_const_bounds.
  2013-02-01 17:43 [Patch 0/6][AArch64-4.7] Fix warnings James Greenhalgh
                   ` (2 preceding siblings ...)
  2013-02-01 17:43 ` [PATCH 1/6] [AArch64-4.7] Fix warning - Initialise generic_tunings James Greenhalgh
@ 2013-02-01 17:44 ` James Greenhalgh
  2013-02-02 14:25   ` Richard Earnshaw
  2013-02-01 17:44 ` [PATCH 6/6] [AArch64-4.7] Backport: Fix warning in aarch64.md James Greenhalgh
  2013-02-01 17:44 ` [PATCH 4/6] [AArch64-4.7] Fix warning - aarch64_trampoline_init passes the wrong type to emit_library_call James Greenhalgh
  5 siblings, 1 reply; 13+ messages in thread
From: James Greenhalgh @ 2013-02-01 17:44 UTC (permalink / raw)
  To: gcc-patches; +Cc: marcus.shawcroft

[-- Attachment #1: Type: text/plain, Size: 611 bytes --]


Hi,

aarch64_simd_const_bounds declares `lane' after an assert. This
patch moves the declaration above the assert.

This patch fixes the warning:

config/aarch64/aarch64.c: In function ‘aarch64_simd_const_bounds’:
config/aarch64/aarch64.c:6412:3: warning: ISO C90 forbids mixed declarations and code [-pedantic]

Regression tested on aarch64-none-elf with no regressions.

OK for aarch64-4.7-branch?

Thanks,
James

---
gcc/

2013-02-01  James Greenhalgh  <james.greenhalgh@arm.com>

	* config/aarch64/aarch64.c
	(aarch64_simd_const_bounds): Move declaration of 'lane' above code.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0005-AArch64-4.7-Fix-warning-Mixed-code-and-declarations-.patch --]
[-- Type: text/x-patch;  name=0005-AArch64-4.7-Fix-warning-Mixed-code-and-declarations-.patch, Size: 592 bytes --]

diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c
index 434ccd7..a3c482b 100644
--- a/gcc/config/aarch64/aarch64.c
+++ b/gcc/config/aarch64/aarch64.c
@@ -6406,8 +6406,9 @@ aarch64_simd_lane_bounds (rtx operand, HOST_WIDE_INT low, HOST_WIDE_INT high)
 void
 aarch64_simd_const_bounds (rtx operand, HOST_WIDE_INT low, HOST_WIDE_INT high)
 {
+  HOST_WIDE_INT lane;
   gcc_assert (GET_CODE (operand) == CONST_INT);
-  HOST_WIDE_INT lane = INTVAL (operand);
+  lane = INTVAL (operand);
 
   if (lane < low || lane >= high)
     error ("constant out of range");

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH 4/6] [AArch64-4.7] Fix warning - aarch64_trampoline_init passes the wrong type to emit_library_call.
  2013-02-01 17:43 [Patch 0/6][AArch64-4.7] Fix warnings James Greenhalgh
                   ` (4 preceding siblings ...)
  2013-02-01 17:44 ` [PATCH 6/6] [AArch64-4.7] Backport: Fix warning in aarch64.md James Greenhalgh
@ 2013-02-01 17:44 ` James Greenhalgh
  2013-02-02 14:24   ` Richard Earnshaw
  5 siblings, 1 reply; 13+ messages in thread
From: James Greenhalgh @ 2013-02-01 17:44 UTC (permalink / raw)
  To: gcc-patches; +Cc: marcus.shawcroft

[-- Attachment #1: Type: text/plain, Size: 754 bytes --]


Hi,

emit_library_call takes an `enum library_type` as its second argument.
Currently aarch64-4.7-branch passes it an int 0.

This patch fixes this, mirroring trunk, by passing LCT_NORMAL instead.

This patch fixes the warning:

config/aarch64/aarch64.c: In function ‘aarch64_trampoline_init’:
config/aarch64/aarch64.c:3893:8: warning: enum conversion when passing argument 2 of ‘emit_library_call’ is invalid in C++ [-Wc++-compat]

Regression tested on aarch64-none-elf with no regressions.

OK for aarch64-4.7-branch?

Thanks,
James

---
gcc/

2013-02-01  James Greenhalgh  <james.greenhalgh@arm.com>

	* config/aarch64/aarch64.c
	(aarch64_trampoline_init): Pass 'LCT_NORMAL' rather than '0'
	to emit_library_call.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0004-AArch64-4.7-Fix-warning-aarch64_trampoline_init-pass.patch --]
[-- Type: text/x-patch;  name=0004-AArch64-4.7-Fix-warning-aarch64_trampoline_init-pass.patch, Size: 554 bytes --]

diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c
index fef2983..434ccd7 100644
--- a/gcc/config/aarch64/aarch64.c
+++ b/gcc/config/aarch64/aarch64.c
@@ -3952,7 +3952,7 @@ aarch64_trampoline_init (rtx m_tramp, tree fndecl, rtx chain_value)
      gen_clear_cache().  */
   a_tramp = XEXP (m_tramp, 0);
   emit_library_call (gen_rtx_SYMBOL_REF (Pmode, "__clear_cache"),
-		     0, VOIDmode, 2, a_tramp, Pmode,
+		     LCT_NORMAL, VOIDmode, 2, a_tramp, Pmode,
 		     plus_constant (a_tramp, TRAMPOLINE_SIZE), Pmode);
 }
 

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH 6/6] [AArch64-4.7] Backport: Fix warning in aarch64.md
  2013-02-01 17:43 [Patch 0/6][AArch64-4.7] Fix warnings James Greenhalgh
                   ` (3 preceding siblings ...)
  2013-02-01 17:44 ` [PATCH 5/6] [AArch64-4.7] Fix warning - Mixed code and declarations in aarch64_simd_const_bounds James Greenhalgh
@ 2013-02-01 17:44 ` James Greenhalgh
  2013-02-02 14:25   ` Richard Earnshaw
  2013-02-01 17:44 ` [PATCH 4/6] [AArch64-4.7] Fix warning - aarch64_trampoline_init passes the wrong type to emit_library_call James Greenhalgh
  5 siblings, 1 reply; 13+ messages in thread
From: James Greenhalgh @ 2013-02-01 17:44 UTC (permalink / raw)
  To: gcc-patches; +Cc: marcus.shawcroft

[-- Attachment #1: Type: text/plain, Size: 565 bytes --]


Hi,

This patch is a backport of one approved here:
http://gcc.gnu.org/ml/gcc-patches/2012-12/msg01135.html

The patch fixes the warning:

config/aarch64/aarch64.md:840: warning: source missing a mode?

Regression tested with no regressions on aarch64-none-elf.

OK for aarch64-4.7-branch?

Thanks,
James

---
gcc/

2013-02-01  James Greenhalgh  <james.greenhalgh@arm.com>

	Backport from mainline.
	2012-12-18  James Greenhalgh  <james.greenhalgh@arm.com>

	* config/aarch64/aarch64.md (insv_imm<mode>): Add modes
	for source operands.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0006-AArch64-4.7-Backport-Fix-warning-in-aarch64.md.patch --]
[-- Type: text/x-patch;  name=0006-AArch64-4.7-Backport-Fix-warning-in-aarch64.md.patch, Size: 667 bytes --]

diff --git a/gcc/config/aarch64/aarch64.md b/gcc/config/aarch64/aarch64.md
index 6f51469..9bb95e0 100644
--- a/gcc/config/aarch64/aarch64.md
+++ b/gcc/config/aarch64/aarch64.md
@@ -840,8 +840,8 @@
 (define_insn "insv_imm<mode>"
   [(set (zero_extract:GPI (match_operand:GPI 0 "register_operand" "+r")
 			  (const_int 16)
-			  (match_operand 1 "const_int_operand" "n"))
-	(match_operand 2 "const_int_operand" "n"))]
+			  (match_operand:GPI 1 "const_int_operand" "n"))
+	(match_operand:GPI 2 "const_int_operand" "n"))]
   "INTVAL (operands[1]) < GET_MODE_BITSIZE (<MODE>mode)
    && INTVAL (operands[1]) % 16 == 0
    && INTVAL (operands[2]) <= 0xffff"

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 1/6] [AArch64-4.7] Fix warning - Initialise generic_tunings.
  2013-02-01 17:43 ` [PATCH 1/6] [AArch64-4.7] Fix warning - Initialise generic_tunings James Greenhalgh
@ 2013-02-02 14:23   ` Richard Earnshaw
  0 siblings, 0 replies; 13+ messages in thread
From: Richard Earnshaw @ 2013-02-02 14:23 UTC (permalink / raw)
  To: James Greenhalgh; +Cc: gcc-patches, Marcus Shawcroft

On 01/02/13 17:42, James Greenhalgh wrote:
>
> Hi,
>
> This patch moves the various tuning parameter data structures
> further up config/aarch64/aarch64.c and then uses them to
> initialise the generic_tunings variable. This mirrors their
> position on trunk.
>
> This fixes the warning:
>
> config/aarch64/aarch64.c:129:33: warning: uninitialised const ‘generic_tunings’ is invalid in C++ [-Wc++-compat]
>
> Regression tested on aarch64-none-elf with no regressions.
>
> OK for aarch64-4.7-branch?
>

OK.

R.


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 2/6] [AArch64-4.7] Fix warning - aarch64_add_constant mixed code and declarations.
  2013-02-01 17:43 ` [PATCH 2/6] [AArch64-4.7] Fix warning - aarch64_add_constant mixed code and declarations James Greenhalgh
@ 2013-02-02 14:24   ` Richard Earnshaw
  0 siblings, 0 replies; 13+ messages in thread
From: Richard Earnshaw @ 2013-02-02 14:24 UTC (permalink / raw)
  To: James Greenhalgh; +Cc: gcc-patches, Marcus Shawcroft

On 01/02/13 17:42, James Greenhalgh wrote:
>
> Hi,
>
> In config/aarch64/aarch64.c::aarch64_add_constant `shift' was
> declared after we started writing code. C90 doesn't like this,
> so split the declaration and the assignment.
>
> This fixes the warning:
>
> config/aarch64/aarch64.c: In function ‘aarch64_add_constant’:
> config/aarch64/aarch64.c:2249:4: warning: ISO C90 forbids mixed declarations and code [-pedantic]
>
> Regression tested on aarch64-none-elf with no regressions.
>
> OK for aarch64-4.7-branch?
>
> Thanks,
> James
>
> ---
> gcc/
>
> 2013-02-01  James Greenhalgh  <james.greenhalgh@arm.com>
>
> 	* config/aarch64/aarch64.c
>    	(aarch64_add_constant): Move declaration of 'shift' above code.
>
>
> 0002-AArch64-4.7-Fix-warning-aarch64_add_constant-mixed-c.patch
>
>
> diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c
> index 59124eb..62d0a12 100644
> --- a/gcc/config/aarch64/aarch64.c
> +++ b/gcc/config/aarch64/aarch64.c
> @@ -2307,8 +2307,9 @@ aarch64_add_constant (int regnum, int scratchreg, HOST_WIDE_INT delta)
>       {
>         if (mdelta >= 4096)
>   	{
> +	  rtx shift;
>   	  emit_insn (gen_rtx_SET (Pmode, scratch_rtx, GEN_INT (mdelta / 4096)));

Blank line between declarations and code.

OK with that change.

R.


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 3/6] [AArch64-4.7] Fix warning - aarch64_legitimize_reload_address passes the wrong type to push_reload.
  2013-02-01 17:43 ` [PATCH 3/6] [AArch64-4.7] Fix warning - aarch64_legitimize_reload_address passes the wrong type to push_reload James Greenhalgh
@ 2013-02-02 14:24   ` Richard Earnshaw
  0 siblings, 0 replies; 13+ messages in thread
From: Richard Earnshaw @ 2013-02-02 14:24 UTC (permalink / raw)
  To: James Greenhalgh; +Cc: gcc-patches, Marcus Shawcroft

On 01/02/13 17:42, James Greenhalgh wrote:
>
> Hi,
>
> push_reload takes an `enum reload_type' as its final argument.
>
> On trunk we just cast the int we have to the correct type,
> so we do that here to mirror trunk and correct the warning.
> We can't fix this by changing the type of the argument we take
> as we would then need to forward declare the enum when giving
> the prototype, which is illegal.
>
> This fixes the warning:
>
> config/aarch64/aarch64.c: In function ‘aarch64_legitimize_reload_address’:
> config/aarch64/aarch64.c:3641:6: warning: enum conversion when passing argument 11 of ‘push_reload’ is invalid in C++ [-Wc++-compat]
>
> Regression tested aarch64-none-elf with no regressions.
>
> OK for aarch64-4.7-branch?
>
> Thanks,
> James
>
> ---
> gcc/
>
> 2013-02-01  James Greenhalgh  <james.greenhalgh@arm.com>
>
> 	* config/aarch64/aarch64.c
> 	(aarch64_legitimize_reload_address): Cast 'type' before
> 	passing to push_reload.
>
>

OK.

R.


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 4/6] [AArch64-4.7] Fix warning - aarch64_trampoline_init passes the wrong type to emit_library_call.
  2013-02-01 17:44 ` [PATCH 4/6] [AArch64-4.7] Fix warning - aarch64_trampoline_init passes the wrong type to emit_library_call James Greenhalgh
@ 2013-02-02 14:24   ` Richard Earnshaw
  0 siblings, 0 replies; 13+ messages in thread
From: Richard Earnshaw @ 2013-02-02 14:24 UTC (permalink / raw)
  To: James Greenhalgh; +Cc: gcc-patches, Marcus Shawcroft

On 01/02/13 17:42, James Greenhalgh wrote:
>
> Hi,
>
> emit_library_call takes an `enum library_type` as its second argument.
> Currently aarch64-4.7-branch passes it an int 0.
>
> This patch fixes this, mirroring trunk, by passing LCT_NORMAL instead.
>
> This patch fixes the warning:
>
> config/aarch64/aarch64.c: In function ‘aarch64_trampoline_init’:
> config/aarch64/aarch64.c:3893:8: warning: enum conversion when passing argument 2 of ‘emit_library_call’ is invalid in C++ [-Wc++-compat]
>
> Regression tested on aarch64-none-elf with no regressions.
>
> OK for aarch64-4.7-branch?
>
> Thanks,
> James
>
> ---
> gcc/
>
> 2013-02-01  James Greenhalgh  <james.greenhalgh@arm.com>
>
> 	* config/aarch64/aarch64.c
> 	(aarch64_trampoline_init): Pass 'LCT_NORMAL' rather than '0'
> 	to emit_library_call.
>

OK.

R.


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 6/6] [AArch64-4.7] Backport: Fix warning in aarch64.md
  2013-02-01 17:44 ` [PATCH 6/6] [AArch64-4.7] Backport: Fix warning in aarch64.md James Greenhalgh
@ 2013-02-02 14:25   ` Richard Earnshaw
  0 siblings, 0 replies; 13+ messages in thread
From: Richard Earnshaw @ 2013-02-02 14:25 UTC (permalink / raw)
  To: James Greenhalgh; +Cc: gcc-patches, Marcus Shawcroft

On 01/02/13 17:42, James Greenhalgh wrote:
>
> Hi,
>
> This patch is a backport of one approved here:
> http://gcc.gnu.org/ml/gcc-patches/2012-12/msg01135.html
>
> The patch fixes the warning:
>
> config/aarch64/aarch64.md:840: warning: source missing a mode?
>
> Regression tested with no regressions on aarch64-none-elf.
>
> OK for aarch64-4.7-branch?
>
> Thanks,
> James
>
> ---
> gcc/
>
> 2013-02-01  James Greenhalgh  <james.greenhalgh@arm.com>
>
> 	Backport from mainline.
> 	2012-12-18  James Greenhalgh  <james.greenhalgh@arm.com>
>
> 	* config/aarch64/aarch64.md (insv_imm<mode>): Add modes
> 	for source operands.
>

OK.

R.


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 5/6] [AArch64-4.7] Fix warning - Mixed code and declarations in aarch64_simd_const_bounds.
  2013-02-01 17:44 ` [PATCH 5/6] [AArch64-4.7] Fix warning - Mixed code and declarations in aarch64_simd_const_bounds James Greenhalgh
@ 2013-02-02 14:25   ` Richard Earnshaw
  0 siblings, 0 replies; 13+ messages in thread
From: Richard Earnshaw @ 2013-02-02 14:25 UTC (permalink / raw)
  To: James Greenhalgh; +Cc: gcc-patches, Marcus Shawcroft

On 01/02/13 17:42, James Greenhalgh wrote:
>
> Hi,
>
> aarch64_simd_const_bounds declares `lane' after an assert. This
> patch moves the declaration above the assert.
>
> This patch fixes the warning:
>
> config/aarch64/aarch64.c: In function ‘aarch64_simd_const_bounds’:
> config/aarch64/aarch64.c:6412:3: warning: ISO C90 forbids mixed declarations and code [-pedantic]
>
> Regression tested on aarch64-none-elf with no regressions.
>
> OK for aarch64-4.7-branch?
>
> Thanks,
> James
>
> ---
> gcc/
>
> 2013-02-01  James Greenhalgh  <james.greenhalgh@arm.com>
>
> 	* config/aarch64/aarch64.c
> 	(aarch64_simd_const_bounds): Move declaration of 'lane' above code.
>
>
> 0005-AArch64-4.7-Fix-warning-Mixed-code-and-declarations-.patch
>
>
> diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c
> index 434ccd7..a3c482b 100644
> --- a/gcc/config/aarch64/aarch64.c
> +++ b/gcc/config/aarch64/aarch64.c
> @@ -6406,8 +6406,9 @@ aarch64_simd_lane_bounds (rtx operand, HOST_WIDE_INT low, HOST_WIDE_INT high)
>   void
>   aarch64_simd_const_bounds (rtx operand, HOST_WIDE_INT low, HOST_WIDE_INT high)
>   {
> +  HOST_WIDE_INT lane;
>     gcc_assert (GET_CODE (operand) == CONST_INT);

Blank line after declaration.

OK with that change.

R.


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2013-02-02 14:25 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-01 17:43 [Patch 0/6][AArch64-4.7] Fix warnings James Greenhalgh
2013-02-01 17:43 ` [PATCH 3/6] [AArch64-4.7] Fix warning - aarch64_legitimize_reload_address passes the wrong type to push_reload James Greenhalgh
2013-02-02 14:24   ` Richard Earnshaw
2013-02-01 17:43 ` [PATCH 2/6] [AArch64-4.7] Fix warning - aarch64_add_constant mixed code and declarations James Greenhalgh
2013-02-02 14:24   ` Richard Earnshaw
2013-02-01 17:43 ` [PATCH 1/6] [AArch64-4.7] Fix warning - Initialise generic_tunings James Greenhalgh
2013-02-02 14:23   ` Richard Earnshaw
2013-02-01 17:44 ` [PATCH 5/6] [AArch64-4.7] Fix warning - Mixed code and declarations in aarch64_simd_const_bounds James Greenhalgh
2013-02-02 14:25   ` Richard Earnshaw
2013-02-01 17:44 ` [PATCH 6/6] [AArch64-4.7] Backport: Fix warning in aarch64.md James Greenhalgh
2013-02-02 14:25   ` Richard Earnshaw
2013-02-01 17:44 ` [PATCH 4/6] [AArch64-4.7] Fix warning - aarch64_trampoline_init passes the wrong type to emit_library_call James Greenhalgh
2013-02-02 14:24   ` Richard Earnshaw

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).