]> git.proxmox.com Git - qemu.git/commitdiff
Replace 'extern inline' with 'static inline'
authorBlue Swirl <blauwirbel@gmail.com>
Mon, 17 Jan 2011 20:26:30 +0000 (20:26 +0000)
committerBlue Swirl <blauwirbel@gmail.com>
Mon, 17 Jan 2011 20:26:30 +0000 (20:26 +0000)
Acked-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
tests/cris/check_abs.c
tests/cris/check_addc.c
tests/cris/check_addcm.c
tests/cris/check_bound.c
tests/cris/check_ftag.c
tests/cris/check_int64.c
tests/cris/check_lz.c
tests/cris/check_swap.c
tests/cris/crisutils.h
tests/hello-i386.c

index 3966c87c784af38184c6fd5712d8d2311ac8a3c1..9770a8d9ef40e027eda201cf8d62b7ad1e7d3947 100644 (file)
@@ -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)
 {
index e4078555f8ccd4d9e677cb01226446564cd05d6c..facd1bea2dc30a32541935381c5c6ff2136a5dd2 100644 (file)
@@ -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;
 }
index 9ffea29bd926c7aa13e362a45d964348589a3f5e..7928bc9999b598c22c3ae86c0b135544c77d4825 100644 (file)
@@ -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;
 }
index 411d2ad56e0f89331fbc1bc6d235ff08102287dd..e8831754ecebb466e07826dad03bec9c8771bfcf 100644 (file)
@@ -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;
index 40d1507a8761b6dfb081fb1d0e7447ed1ecb1511..908773a38a8349c4d1cdfe615b9ff4c36256265a 100644 (file)
@@ -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) );
 }
index 99ca6f1158ed0c62adeed4915ff8f5bb5172a826..fc600176e2329711988e056dd6af39e57aff40e3 100644 (file)
@@ -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;
 }
 
index 7b30a265ad6d3f92fe3331f89ecd913ec807c321..69c2e6d4ecacc06d909f3d91f6c508bce86cb613 100644 (file)
@@ -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));
index 824a685517fc99f6e187bc53f036be28dc689a78..f851cbcef1f3e1218ac71d1ec18502cdad568507 100644 (file)
@@ -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)
        {
index 7d1ea86f737fba74c4271eb262644332245c1f78..29b71cd7b935fccbda859c84a90a14cf44861001 100644 (file)
@@ -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();
index e00245d3fe99d8b41316a49260231f3c5c84475c..86afc34fb13e981de9ed9b608f23f8d6c8d95822 100644 (file)
@@ -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"\