* [Qemu-devel] [PATCH 2/2] Replace 'extern inline' with 'static inline'
@ 2010-11-13 12:49 Blue Swirl
0 siblings, 0 replies; 4+ messages in thread
From: Blue Swirl @ 2010-11-13 12:49 UTC (permalink / raw)
To: Edgar E. Iglesias, qemu-devel
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
---
tests/cris/check_abs.c | 5 +++--
tests/cris/check_addc.c | 3 ++-
tests/cris/check_addcm.c | 6 ++++--
tests/cris/check_bound.c | 9 ++++++---
tests/cris/check_ftag.c | 12 ++++++++----
tests/cris/check_int64.c | 6 ++++--
tests/cris/check_lz.c | 2 +-
tests/cris/check_swap.c | 2 +-
tests/cris/crisutils.h | 20 ++++++++++----------
tests/hello-i386.c | 4 ++--
10 files changed, 41 insertions(+), 28 deletions(-)
diff --git a/tests/cris/check_abs.c b/tests/cris/check_abs.c
index 3966c87..9770a8d 100644
--- a/tests/cris/check_abs.c
+++ b/tests/cris/check_abs.c
@@ -4,13 +4,14 @@
#include "sys.h"
#include "crisutils.h"
-extern inline int cris_abs(int n) {
+static inline int cris_abs(int n)
+{
int r;
asm ("abs\t%1, %0\n" : "=r" (r) : "r" (n));
return r;
}
-extern inline void
+static inline void
verify_abs(int val, int res,
const int n, const int z, const int v, const int c)
{
diff --git a/tests/cris/check_addc.c b/tests/cris/check_addc.c
index e407855..facd1be 100644
--- a/tests/cris/check_addc.c
+++ b/tests/cris/check_addc.c
@@ -4,7 +4,8 @@
#include "sys.h"
#include "crisutils.h"
-extern inline int cris_addc(int a, const int b) {
+static inline int cris_addc(int a, const int b)
+{
asm ("addc\t%1, %0\n" : "+r" (a) : "r" (b));
return a;
}
diff --git a/tests/cris/check_addcm.c b/tests/cris/check_addcm.c
index 9ffea29..7928bc9 100644
--- a/tests/cris/check_addcm.c
+++ b/tests/cris/check_addcm.c
@@ -5,13 +5,15 @@
#include "crisutils.h"
/* need to avoid acr as source here. */
-extern inline int cris_addc_m(int a, const int *b) {
+static 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. */
-extern inline int cris_addc_pi_m(int a, int **b) {
+static inline int cris_addc_pi_m(int a, int **b)
+{
asm volatile ("addc [%1+], %0\n" : "+r" (a), "+b" (*b));
return a;
}
diff --git a/tests/cris/check_bound.c b/tests/cris/check_bound.c
index 411d2ad..e883175 100644
--- a/tests/cris/check_bound.c
+++ b/tests/cris/check_bound.c
@@ -4,19 +4,22 @@
#include "sys.h"
#include "crisutils.h"
-extern inline int cris_bound_b(int v, int b) {
+static inline int cris_bound_b(int v, int b)
+{
int r = v;
asm ("bound.b\t%1, %0\n" : "+r" (r) : "ri" (b));
return r;
}
-extern inline int cris_bound_w(int v, int b) {
+static inline int cris_bound_w(int v, int b)
+{
int r = v;
asm ("bound.w\t%1, %0\n" : "+r" (r) : "ri" (b));
return r;
}
-extern inline int cris_bound_d(int v, int b) {
+static inline int cris_bound_d(int v, int b)
+{
int r = v;
asm ("bound.d\t%1, %0\n" : "+r" (r) : "ri" (b));
return r;
diff --git a/tests/cris/check_ftag.c b/tests/cris/check_ftag.c
index 40d1507..908773a 100644
--- a/tests/cris/check_ftag.c
+++ b/tests/cris/check_ftag.c
@@ -4,19 +4,23 @@
#include "sys.h"
#include "crisutils.h"
-extern inline void cris_ftag_i(unsigned int x) {
+static inline void cris_ftag_i(unsigned int x)
+{
register unsigned int v asm("$r10") = x;
asm ("ftagi\t[%0]\n" : : "r" (v) );
}
-extern inline void cris_ftag_d(unsigned int x) {
+static inline void cris_ftag_d(unsigned int x)
+{
register unsigned int v asm("$r10") = x;
asm ("ftagd\t[%0]\n" : : "r" (v) );
}
-extern inline void cris_fidx_i(unsigned int x) {
+static inline void cris_fidx_i(unsigned int x)
+{
register unsigned int v asm("$r10") = x;
asm ("fidxi\t[%0]\n" : : "r" (v) );
}
-extern inline void cris_fidx_d(unsigned int x) {
+static inline void cris_fidx_d(unsigned int x)
+{
register unsigned int v asm("$r10") = x;
asm ("fidxd\t[%0]\n" : : "r" (v) );
}
diff --git a/tests/cris/check_int64.c b/tests/cris/check_int64.c
index 99ca6f1..fc60017 100644
--- a/tests/cris/check_int64.c
+++ b/tests/cris/check_int64.c
@@ -5,11 +5,13 @@
#include "crisutils.h"
-extern inline int64_t add64(const int64_t a, const int64_t b) {
+static inline int64_t add64(const int64_t a, const int64_t b)
+{
return a + b;
}
-extern inline int64_t sub64(const int64_t a, const int64_t b) {
+static inline int64_t sub64(const int64_t a, const int64_t b)
+{
return a - b;
}
diff --git a/tests/cris/check_lz.c b/tests/cris/check_lz.c
index 7b30a26..69c2e6d 100644
--- a/tests/cris/check_lz.c
+++ b/tests/cris/check_lz.c
@@ -3,7 +3,7 @@
#include <stdint.h>
#include "sys.h"
-extern inline int cris_lz(int x)
+static inline int cris_lz(int x)
{
int r;
asm ("lz\t%1, %0\n" : "=r" (r) : "r" (x));
diff --git a/tests/cris/check_swap.c b/tests/cris/check_swap.c
index 824a685..f851cbc 100644
--- a/tests/cris/check_swap.c
+++ b/tests/cris/check_swap.c
@@ -9,7 +9,7 @@
#define B 2
#define R 1
-extern inline int cris_swap(const int mode, int x)
+static inline int cris_swap(const int mode, int x)
{
switch (mode)
{
diff --git a/tests/cris/crisutils.h b/tests/cris/crisutils.h
index 7d1ea86..29b71cd 100644
--- a/tests/cris/crisutils.h
+++ b/tests/cris/crisutils.h
@@ -10,57 +10,57 @@ void _err(void) {
_fail(tst_cc_loc);
}
-extern inline void cris_tst_cc_n1(void)
+static inline void cris_tst_cc_n1(void)
{
asm volatile ("bpl _err\n"
"nop\n");
}
-extern inline void cris_tst_cc_n0(void)
+static inline void cris_tst_cc_n0(void)
{
asm volatile ("bmi _err\n"
"nop\n");
}
-extern inline void cris_tst_cc_z1(void)
+static inline void cris_tst_cc_z1(void)
{
asm volatile ("bne _err\n"
"nop\n");
}
-extern inline void cris_tst_cc_z0(void)
+static inline void cris_tst_cc_z0(void)
{
asm volatile ("beq _err\n"
"nop\n");
}
-extern inline void cris_tst_cc_v1(void)
+static inline void cris_tst_cc_v1(void)
{
asm volatile ("bvc _err\n"
"nop\n");
}
-extern inline void cris_tst_cc_v0(void)
+static inline void cris_tst_cc_v0(void)
{
asm volatile ("bvs _err\n"
"nop\n");
}
-extern inline void cris_tst_cc_c1(void)
+static inline void cris_tst_cc_c1(void)
{
asm volatile ("bcc _err\n"
"nop\n");
}
-extern inline void cris_tst_cc_c0(void)
+static inline void cris_tst_cc_c0(void)
{
asm volatile ("bcs _err\n"
"nop\n");
}
-extern inline void cris_tst_mov_cc(int n, int z)
+static inline void cris_tst_mov_cc(int n, int z)
{
if (n) cris_tst_cc_n1(); else cris_tst_cc_n0();
if (z) cris_tst_cc_z1(); else cris_tst_cc_z0();
asm volatile ("" : : "g" (_err));
}
-extern inline void cris_tst_cc(const int n, const int z,
+static inline void cris_tst_cc(const int n, const int z,
const int v, const int c)
{
if (n) cris_tst_cc_n1(); else cris_tst_cc_n0();
diff --git a/tests/hello-i386.c b/tests/hello-i386.c
index e00245d..86afc34 100644
--- a/tests/hello-i386.c
+++ b/tests/hello-i386.c
@@ -1,6 +1,6 @@
#include <asm/unistd.h>
-extern inline volatile void exit(int status)
+static inline volatile void exit(int status)
{
int __res;
__asm__ volatile ("movl %%ecx,%%ebx\n"\
@@ -8,7 +8,7 @@ extern inline volatile void exit(int status)
: "=a" (__res) : "0" (__NR_exit),"c" ((long)(status)));
}
-extern inline int write(int fd, const char * buf, int len)
+static inline int write(int fd, const char * buf, int len)
{
int status;
__asm__ volatile ("pushl %%ebx\n"\
--
1.6.2.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Qemu-devel] [PATCH 2/2] Replace 'extern inline' with 'static inline'
@ 2011-01-15 19:24 Blue Swirl
2011-01-15 20:22 ` Edgar E. Iglesias
0 siblings, 1 reply; 4+ messages in thread
From: Blue Swirl @ 2011-01-15 19:24 UTC (permalink / raw)
To: qemu-devel
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
---
tests/cris/check_abs.c | 5 +++--
tests/cris/check_addc.c | 3 ++-
tests/cris/check_addcm.c | 6 ++++--
tests/cris/check_bound.c | 9 ++++++---
tests/cris/check_ftag.c | 12 ++++++++----
tests/cris/check_int64.c | 6 ++++--
tests/cris/check_lz.c | 2 +-
tests/cris/check_swap.c | 2 +-
tests/cris/crisutils.h | 20 ++++++++++----------
tests/hello-i386.c | 4 ++--
10 files changed, 41 insertions(+), 28 deletions(-)
diff --git a/tests/cris/check_abs.c b/tests/cris/check_abs.c
index 3966c87..9770a8d 100644
--- a/tests/cris/check_abs.c
+++ b/tests/cris/check_abs.c
@@ -4,13 +4,14 @@
#include "sys.h"
#include "crisutils.h"
-extern inline int cris_abs(int n) {
+static inline int cris_abs(int n)
+{
int r;
asm ("abs\t%1, %0\n" : "=r" (r) : "r" (n));
return r;
}
-extern inline void
+static inline void
verify_abs(int val, int res,
const int n, const int z, const int v, const int c)
{
diff --git a/tests/cris/check_addc.c b/tests/cris/check_addc.c
index e407855..facd1be 100644
--- a/tests/cris/check_addc.c
+++ b/tests/cris/check_addc.c
@@ -4,7 +4,8 @@
#include "sys.h"
#include "crisutils.h"
-extern inline int cris_addc(int a, const int b) {
+static inline int cris_addc(int a, const int b)
+{
asm ("addc\t%1, %0\n" : "+r" (a) : "r" (b));
return a;
}
diff --git a/tests/cris/check_addcm.c b/tests/cris/check_addcm.c
index 9ffea29..7928bc9 100644
--- a/tests/cris/check_addcm.c
+++ b/tests/cris/check_addcm.c
@@ -5,13 +5,15 @@
#include "crisutils.h"
/* need to avoid acr as source here. */
-extern inline int cris_addc_m(int a, const int *b) {
+static 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. */
-extern inline int cris_addc_pi_m(int a, int **b) {
+static inline int cris_addc_pi_m(int a, int **b)
+{
asm volatile ("addc [%1+], %0\n" : "+r" (a), "+b" (*b));
return a;
}
diff --git a/tests/cris/check_bound.c b/tests/cris/check_bound.c
index 411d2ad..e883175 100644
--- a/tests/cris/check_bound.c
+++ b/tests/cris/check_bound.c
@@ -4,19 +4,22 @@
#include "sys.h"
#include "crisutils.h"
-extern inline int cris_bound_b(int v, int b) {
+static inline int cris_bound_b(int v, int b)
+{
int r = v;
asm ("bound.b\t%1, %0\n" : "+r" (r) : "ri" (b));
return r;
}
-extern inline int cris_bound_w(int v, int b) {
+static inline int cris_bound_w(int v, int b)
+{
int r = v;
asm ("bound.w\t%1, %0\n" : "+r" (r) : "ri" (b));
return r;
}
-extern inline int cris_bound_d(int v, int b) {
+static inline int cris_bound_d(int v, int b)
+{
int r = v;
asm ("bound.d\t%1, %0\n" : "+r" (r) : "ri" (b));
return r;
diff --git a/tests/cris/check_ftag.c b/tests/cris/check_ftag.c
index 40d1507..908773a 100644
--- a/tests/cris/check_ftag.c
+++ b/tests/cris/check_ftag.c
@@ -4,19 +4,23 @@
#include "sys.h"
#include "crisutils.h"
-extern inline void cris_ftag_i(unsigned int x) {
+static inline void cris_ftag_i(unsigned int x)
+{
register unsigned int v asm("$r10") = x;
asm ("ftagi\t[%0]\n" : : "r" (v) );
}
-extern inline void cris_ftag_d(unsigned int x) {
+static inline void cris_ftag_d(unsigned int x)
+{
register unsigned int v asm("$r10") = x;
asm ("ftagd\t[%0]\n" : : "r" (v) );
}
-extern inline void cris_fidx_i(unsigned int x) {
+static inline void cris_fidx_i(unsigned int x)
+{
register unsigned int v asm("$r10") = x;
asm ("fidxi\t[%0]\n" : : "r" (v) );
}
-extern inline void cris_fidx_d(unsigned int x) {
+static inline void cris_fidx_d(unsigned int x)
+{
register unsigned int v asm("$r10") = x;
asm ("fidxd\t[%0]\n" : : "r" (v) );
}
diff --git a/tests/cris/check_int64.c b/tests/cris/check_int64.c
index 99ca6f1..fc60017 100644
--- a/tests/cris/check_int64.c
+++ b/tests/cris/check_int64.c
@@ -5,11 +5,13 @@
#include "crisutils.h"
-extern inline int64_t add64(const int64_t a, const int64_t b) {
+static inline int64_t add64(const int64_t a, const int64_t b)
+{
return a + b;
}
-extern inline int64_t sub64(const int64_t a, const int64_t b) {
+static inline int64_t sub64(const int64_t a, const int64_t b)
+{
return a - b;
}
diff --git a/tests/cris/check_lz.c b/tests/cris/check_lz.c
index 7b30a26..69c2e6d 100644
--- a/tests/cris/check_lz.c
+++ b/tests/cris/check_lz.c
@@ -3,7 +3,7 @@
#include <stdint.h>
#include "sys.h"
-extern inline int cris_lz(int x)
+static inline int cris_lz(int x)
{
int r;
asm ("lz\t%1, %0\n" : "=r" (r) : "r" (x));
diff --git a/tests/cris/check_swap.c b/tests/cris/check_swap.c
index 824a685..f851cbc 100644
--- a/tests/cris/check_swap.c
+++ b/tests/cris/check_swap.c
@@ -9,7 +9,7 @@
#define B 2
#define R 1
-extern inline int cris_swap(const int mode, int x)
+static inline int cris_swap(const int mode, int x)
{
switch (mode)
{
diff --git a/tests/cris/crisutils.h b/tests/cris/crisutils.h
index 7d1ea86..29b71cd 100644
--- a/tests/cris/crisutils.h
+++ b/tests/cris/crisutils.h
@@ -10,57 +10,57 @@ void _err(void) {
_fail(tst_cc_loc);
}
-extern inline void cris_tst_cc_n1(void)
+static inline void cris_tst_cc_n1(void)
{
asm volatile ("bpl _err\n"
"nop\n");
}
-extern inline void cris_tst_cc_n0(void)
+static inline void cris_tst_cc_n0(void)
{
asm volatile ("bmi _err\n"
"nop\n");
}
-extern inline void cris_tst_cc_z1(void)
+static inline void cris_tst_cc_z1(void)
{
asm volatile ("bne _err\n"
"nop\n");
}
-extern inline void cris_tst_cc_z0(void)
+static inline void cris_tst_cc_z0(void)
{
asm volatile ("beq _err\n"
"nop\n");
}
-extern inline void cris_tst_cc_v1(void)
+static inline void cris_tst_cc_v1(void)
{
asm volatile ("bvc _err\n"
"nop\n");
}
-extern inline void cris_tst_cc_v0(void)
+static inline void cris_tst_cc_v0(void)
{
asm volatile ("bvs _err\n"
"nop\n");
}
-extern inline void cris_tst_cc_c1(void)
+static inline void cris_tst_cc_c1(void)
{
asm volatile ("bcc _err\n"
"nop\n");
}
-extern inline void cris_tst_cc_c0(void)
+static inline void cris_tst_cc_c0(void)
{
asm volatile ("bcs _err\n"
"nop\n");
}
-extern inline void cris_tst_mov_cc(int n, int z)
+static inline void cris_tst_mov_cc(int n, int z)
{
if (n) cris_tst_cc_n1(); else cris_tst_cc_n0();
if (z) cris_tst_cc_z1(); else cris_tst_cc_z0();
asm volatile ("" : : "g" (_err));
}
-extern inline void cris_tst_cc(const int n, const int z,
+static inline void cris_tst_cc(const int n, const int z,
const int v, const int c)
{
if (n) cris_tst_cc_n1(); else cris_tst_cc_n0();
diff --git a/tests/hello-i386.c b/tests/hello-i386.c
index e00245d..86afc34 100644
--- a/tests/hello-i386.c
+++ b/tests/hello-i386.c
@@ -1,6 +1,6 @@
#include <asm/unistd.h>
-extern inline volatile void exit(int status)
+static inline volatile void exit(int status)
{
int __res;
__asm__ volatile ("movl %%ecx,%%ebx\n"\
@@ -8,7 +8,7 @@ extern inline volatile void exit(int status)
: "=a" (__res) : "0" (__NR_exit),"c" ((long)(status)));
}
-extern inline int write(int fd, const char * buf, int len)
+static inline int write(int fd, const char * buf, int len)
{
int status;
__asm__ volatile ("pushl %%ebx\n"\
--
1.6.2.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH 2/2] Replace 'extern inline' with 'static inline'
2011-01-15 19:24 [Qemu-devel] [PATCH 2/2] Replace 'extern inline' with 'static inline' Blue Swirl
@ 2011-01-15 20:22 ` Edgar E. Iglesias
2011-01-17 20:27 ` Blue Swirl
0 siblings, 1 reply; 4+ messages in thread
From: Edgar E. Iglesias @ 2011-01-15 20:22 UTC (permalink / raw)
To: Blue Swirl; +Cc: qemu-devel
On Sat, Jan 15, 2011 at 07:24:33PM +0000, Blue Swirl wrote:
> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
OK
Acked-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
> ---
> tests/cris/check_abs.c | 5 +++--
> tests/cris/check_addc.c | 3 ++-
> tests/cris/check_addcm.c | 6 ++++--
> tests/cris/check_bound.c | 9 ++++++---
> tests/cris/check_ftag.c | 12 ++++++++----
> tests/cris/check_int64.c | 6 ++++--
> tests/cris/check_lz.c | 2 +-
> tests/cris/check_swap.c | 2 +-
> tests/cris/crisutils.h | 20 ++++++++++----------
> tests/hello-i386.c | 4 ++--
> 10 files changed, 41 insertions(+), 28 deletions(-)
>
> diff --git a/tests/cris/check_abs.c b/tests/cris/check_abs.c
> index 3966c87..9770a8d 100644
> --- a/tests/cris/check_abs.c
> +++ b/tests/cris/check_abs.c
> @@ -4,13 +4,14 @@
> #include "sys.h"
> #include "crisutils.h"
>
> -extern inline int cris_abs(int n) {
> +static inline int cris_abs(int n)
> +{
> int r;
> asm ("abs\t%1, %0\n" : "=r" (r) : "r" (n));
> return r;
> }
>
> -extern inline void
> +static inline void
> verify_abs(int val, int res,
> const int n, const int z, const int v, const int c)
> {
> diff --git a/tests/cris/check_addc.c b/tests/cris/check_addc.c
> index e407855..facd1be 100644
> --- a/tests/cris/check_addc.c
> +++ b/tests/cris/check_addc.c
> @@ -4,7 +4,8 @@
> #include "sys.h"
> #include "crisutils.h"
>
> -extern inline int cris_addc(int a, const int b) {
> +static inline int cris_addc(int a, const int b)
> +{
> asm ("addc\t%1, %0\n" : "+r" (a) : "r" (b));
> return a;
> }
> diff --git a/tests/cris/check_addcm.c b/tests/cris/check_addcm.c
> index 9ffea29..7928bc9 100644
> --- a/tests/cris/check_addcm.c
> +++ b/tests/cris/check_addcm.c
> @@ -5,13 +5,15 @@
> #include "crisutils.h"
>
> /* need to avoid acr as source here. */
> -extern inline int cris_addc_m(int a, const int *b) {
> +static 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. */
> -extern inline int cris_addc_pi_m(int a, int **b) {
> +static inline int cris_addc_pi_m(int a, int **b)
> +{
> asm volatile ("addc [%1+], %0\n" : "+r" (a), "+b" (*b));
> return a;
> }
> diff --git a/tests/cris/check_bound.c b/tests/cris/check_bound.c
> index 411d2ad..e883175 100644
> --- a/tests/cris/check_bound.c
> +++ b/tests/cris/check_bound.c
> @@ -4,19 +4,22 @@
> #include "sys.h"
> #include "crisutils.h"
>
> -extern inline int cris_bound_b(int v, int b) {
> +static inline int cris_bound_b(int v, int b)
> +{
> int r = v;
> asm ("bound.b\t%1, %0\n" : "+r" (r) : "ri" (b));
> return r;
> }
>
> -extern inline int cris_bound_w(int v, int b) {
> +static inline int cris_bound_w(int v, int b)
> +{
> int r = v;
> asm ("bound.w\t%1, %0\n" : "+r" (r) : "ri" (b));
> return r;
> }
>
> -extern inline int cris_bound_d(int v, int b) {
> +static inline int cris_bound_d(int v, int b)
> +{
> int r = v;
> asm ("bound.d\t%1, %0\n" : "+r" (r) : "ri" (b));
> return r;
> diff --git a/tests/cris/check_ftag.c b/tests/cris/check_ftag.c
> index 40d1507..908773a 100644
> --- a/tests/cris/check_ftag.c
> +++ b/tests/cris/check_ftag.c
> @@ -4,19 +4,23 @@
> #include "sys.h"
> #include "crisutils.h"
>
> -extern inline void cris_ftag_i(unsigned int x) {
> +static inline void cris_ftag_i(unsigned int x)
> +{
> register unsigned int v asm("$r10") = x;
> asm ("ftagi\t[%0]\n" : : "r" (v) );
> }
> -extern inline void cris_ftag_d(unsigned int x) {
> +static inline void cris_ftag_d(unsigned int x)
> +{
> register unsigned int v asm("$r10") = x;
> asm ("ftagd\t[%0]\n" : : "r" (v) );
> }
> -extern inline void cris_fidx_i(unsigned int x) {
> +static inline void cris_fidx_i(unsigned int x)
> +{
> register unsigned int v asm("$r10") = x;
> asm ("fidxi\t[%0]\n" : : "r" (v) );
> }
> -extern inline void cris_fidx_d(unsigned int x) {
> +static inline void cris_fidx_d(unsigned int x)
> +{
> register unsigned int v asm("$r10") = x;
> asm ("fidxd\t[%0]\n" : : "r" (v) );
> }
> diff --git a/tests/cris/check_int64.c b/tests/cris/check_int64.c
> index 99ca6f1..fc60017 100644
> --- a/tests/cris/check_int64.c
> +++ b/tests/cris/check_int64.c
> @@ -5,11 +5,13 @@
> #include "crisutils.h"
>
>
> -extern inline int64_t add64(const int64_t a, const int64_t b) {
> +static inline int64_t add64(const int64_t a, const int64_t b)
> +{
> return a + b;
> }
>
> -extern inline int64_t sub64(const int64_t a, const int64_t b) {
> +static inline int64_t sub64(const int64_t a, const int64_t b)
> +{
> return a - b;
> }
>
> diff --git a/tests/cris/check_lz.c b/tests/cris/check_lz.c
> index 7b30a26..69c2e6d 100644
> --- a/tests/cris/check_lz.c
> +++ b/tests/cris/check_lz.c
> @@ -3,7 +3,7 @@
> #include <stdint.h>
> #include "sys.h"
>
> -extern inline int cris_lz(int x)
> +static inline int cris_lz(int x)
> {
> int r;
> asm ("lz\t%1, %0\n" : "=r" (r) : "r" (x));
> diff --git a/tests/cris/check_swap.c b/tests/cris/check_swap.c
> index 824a685..f851cbc 100644
> --- a/tests/cris/check_swap.c
> +++ b/tests/cris/check_swap.c
> @@ -9,7 +9,7 @@
> #define B 2
> #define R 1
>
> -extern inline int cris_swap(const int mode, int x)
> +static inline int cris_swap(const int mode, int x)
> {
> switch (mode)
> {
> diff --git a/tests/cris/crisutils.h b/tests/cris/crisutils.h
> index 7d1ea86..29b71cd 100644
> --- a/tests/cris/crisutils.h
> +++ b/tests/cris/crisutils.h
> @@ -10,57 +10,57 @@ void _err(void) {
> _fail(tst_cc_loc);
> }
>
> -extern inline void cris_tst_cc_n1(void)
> +static inline void cris_tst_cc_n1(void)
> {
> asm volatile ("bpl _err\n"
> "nop\n");
> }
> -extern inline void cris_tst_cc_n0(void)
> +static inline void cris_tst_cc_n0(void)
> {
> asm volatile ("bmi _err\n"
> "nop\n");
> }
>
> -extern inline void cris_tst_cc_z1(void)
> +static inline void cris_tst_cc_z1(void)
> {
> asm volatile ("bne _err\n"
> "nop\n");
> }
> -extern inline void cris_tst_cc_z0(void)
> +static inline void cris_tst_cc_z0(void)
> {
> asm volatile ("beq _err\n"
> "nop\n");
> }
> -extern inline void cris_tst_cc_v1(void)
> +static inline void cris_tst_cc_v1(void)
> {
> asm volatile ("bvc _err\n"
> "nop\n");
> }
> -extern inline void cris_tst_cc_v0(void)
> +static inline void cris_tst_cc_v0(void)
> {
> asm volatile ("bvs _err\n"
> "nop\n");
> }
>
> -extern inline void cris_tst_cc_c1(void)
> +static inline void cris_tst_cc_c1(void)
> {
> asm volatile ("bcc _err\n"
> "nop\n");
> }
> -extern inline void cris_tst_cc_c0(void)
> +static inline void cris_tst_cc_c0(void)
> {
> asm volatile ("bcs _err\n"
> "nop\n");
> }
>
> -extern inline void cris_tst_mov_cc(int n, int z)
> +static inline void cris_tst_mov_cc(int n, int z)
> {
> if (n) cris_tst_cc_n1(); else cris_tst_cc_n0();
> if (z) cris_tst_cc_z1(); else cris_tst_cc_z0();
> asm volatile ("" : : "g" (_err));
> }
>
> -extern inline void cris_tst_cc(const int n, const int z,
> +static inline void cris_tst_cc(const int n, const int z,
> const int v, const int c)
> {
> if (n) cris_tst_cc_n1(); else cris_tst_cc_n0();
> diff --git a/tests/hello-i386.c b/tests/hello-i386.c
> index e00245d..86afc34 100644
> --- a/tests/hello-i386.c
> +++ b/tests/hello-i386.c
> @@ -1,6 +1,6 @@
> #include <asm/unistd.h>
>
> -extern inline volatile void exit(int status)
> +static inline volatile void exit(int status)
> {
> int __res;
> __asm__ volatile ("movl %%ecx,%%ebx\n"\
> @@ -8,7 +8,7 @@ extern inline volatile void exit(int status)
> : "=a" (__res) : "0" (__NR_exit),"c" ((long)(status)));
> }
>
> -extern inline int write(int fd, const char * buf, int len)
> +static inline int write(int fd, const char * buf, int len)
> {
> int status;
> __asm__ volatile ("pushl %%ebx\n"\
> --
> 1.6.2.4
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH 2/2] Replace 'extern inline' with 'static inline'
2011-01-15 20:22 ` Edgar E. Iglesias
@ 2011-01-17 20:27 ` Blue Swirl
0 siblings, 0 replies; 4+ messages in thread
From: Blue Swirl @ 2011-01-17 20:27 UTC (permalink / raw)
To: Edgar E. Iglesias; +Cc: qemu-devel
On Sat, Jan 15, 2011 at 8:22 PM, Edgar E. Iglesias
<edgar.iglesias@gmail.com> wrote:
> On Sat, Jan 15, 2011 at 07:24:33PM +0000, Blue Swirl wrote:
>> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
>
> OK
>
> Acked-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
Thanks for the ack, applied.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-01-17 20:28 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-15 19:24 [Qemu-devel] [PATCH 2/2] Replace 'extern inline' with 'static inline' Blue Swirl
2011-01-15 20:22 ` Edgar E. Iglesias
2011-01-17 20:27 ` Blue Swirl
-- strict thread matches above, loose matches on Subject: below --
2010-11-13 12:49 Blue Swirl
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 NNTP newsgroup(s).