tests: cris: force inlining

The CRIS tests expect that functions marked inline are always inline.
With newer versions of GCC, building them results warnings like the
following and spurious failures when they are run.

In file included from tests/tcg/cris/check_moveq.c:5:0:
tests/tcg/cris/crisutils.h:66:20: warning: inlining failed in call to
'cris_tst_cc.constprop.0': call is unlikely and code size would grow [-Winline]
tests/tcg/cris/check_moveq.c:28:13: warning: called from here [-Winline]

Use the always_inline attribute when building them to fix this.

Reviewed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Signed-off-by: Rabin Vincent <rabinv@axis.com>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
This commit is contained in:
Rabin Vincent 2016-08-23 16:34:59 +02:00 committed by Edgar E. Iglesias
parent 25930ed60a
commit 21ce148c7e
10 changed files with 28 additions and 26 deletions

View file

@ -5,14 +5,14 @@
#include "crisutils.h"
/* need to avoid acr as source here. */
static inline int cris_addc_m(int a, const int *b)
static always_inline int cris_addc_m(int a, const int *b)
{
asm volatile ("addc [%1], %0\n" : "+r" (a) : "r" (b));
return a;
}
/* 'b' is a crisv32 constrain to avoid postinc with $acr. */
static inline int cris_addc_pi_m(int a, int **b)
static always_inline int cris_addc_pi_m(int a, int **b)
{
asm volatile ("addc [%1+], %0\n" : "+r" (a), "+b" (*b));
return a;