diff mbox

[4/6,AArch64-4.7] Fix warning - aarch64_trampoline_init passes the wrong type to emit_library_call.

Message ID 1359740555-10179-5-git-send-email-james.greenhalgh@arm.com
State New
Headers show

Commit Message

James Greenhalgh Feb. 1, 2013, 5:42 p.m. UTC
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.

Comments

Richard Earnshaw Feb. 2, 2013, 2:24 p.m. UTC | #1
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.
diff mbox

Patch

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);
 }