Commit e2222c39248e7a54ffdb8325ba7edf2e23171306
1 parent
31e8f3c8
removed warnings
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@360 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
3 changed files
with
10 additions
and
4 deletions
exec.h
@@ -32,6 +32,12 @@ | @@ -32,6 +32,12 @@ | ||
32 | #define __builtin_expect(x, n) (x) | 32 | #define __builtin_expect(x, n) (x) |
33 | #endif | 33 | #endif |
34 | 34 | ||
35 | +#ifdef __i386__ | ||
36 | +#define REGPARM(n) __attribute((regparm(n))) | ||
37 | +#else | ||
38 | +#define REGPARM(n) | ||
39 | +#endif | ||
40 | + | ||
35 | /* is_jmp field values */ | 41 | /* is_jmp field values */ |
36 | #define DISAS_NEXT 0 /* next instruction can be analyzed */ | 42 | #define DISAS_NEXT 0 /* next instruction can be analyzed */ |
37 | #define DISAS_JUMP 1 /* only pc was modified dynamically */ | 43 | #define DISAS_JUMP 1 /* only pc was modified dynamically */ |
softmmu_header.h
@@ -49,8 +49,8 @@ | @@ -49,8 +49,8 @@ | ||
49 | 49 | ||
50 | 50 | ||
51 | #if MEMUSER == 0 | 51 | #if MEMUSER == 0 |
52 | -DATA_TYPE __attribute((regparm(1))) glue(glue(__ld, SUFFIX), _mmu)(unsigned long addr); | ||
53 | -void __attribute((regparm(2))) glue(glue(__st, SUFFIX), _mmu)(unsigned long addr, DATA_TYPE v); | 52 | +DATA_TYPE REGPARM(1) glue(glue(__ld, SUFFIX), _mmu)(unsigned long addr); |
53 | +void REGPARM(2) glue(glue(__st, SUFFIX), _mmu)(unsigned long addr, DATA_TYPE v); | ||
54 | #endif | 54 | #endif |
55 | 55 | ||
56 | static inline int glue(glue(ldu, SUFFIX), MEMSUFFIX)(void *ptr) | 56 | static inline int glue(glue(ldu, SUFFIX), MEMSUFFIX)(void *ptr) |
softmmu_template.h
@@ -81,7 +81,7 @@ static inline void glue(io_write, SUFFIX)(unsigned long physaddr, | @@ -81,7 +81,7 @@ static inline void glue(io_write, SUFFIX)(unsigned long physaddr, | ||
81 | } | 81 | } |
82 | 82 | ||
83 | /* handle all cases except unaligned access which span two pages */ | 83 | /* handle all cases except unaligned access which span two pages */ |
84 | -DATA_TYPE __attribute((regparm(1))) glue(glue(__ld, SUFFIX), _mmu)(unsigned long addr) | 84 | +DATA_TYPE REGPARM(1) glue(glue(__ld, SUFFIX), _mmu)(unsigned long addr) |
85 | { | 85 | { |
86 | DATA_TYPE res; | 86 | DATA_TYPE res; |
87 | int is_user, index; | 87 | int is_user, index; |
@@ -163,7 +163,7 @@ static DATA_TYPE glue(slow_ld, SUFFIX)(unsigned long addr, void *retaddr) | @@ -163,7 +163,7 @@ static DATA_TYPE glue(slow_ld, SUFFIX)(unsigned long addr, void *retaddr) | ||
163 | } | 163 | } |
164 | 164 | ||
165 | 165 | ||
166 | -void __attribute((regparm(2))) glue(glue(__st, SUFFIX), _mmu)(unsigned long addr, DATA_TYPE val) | 166 | +void REGPARM(2) glue(glue(__st, SUFFIX), _mmu)(unsigned long addr, DATA_TYPE val) |
167 | { | 167 | { |
168 | unsigned long physaddr, tlb_addr; | 168 | unsigned long physaddr, tlb_addr; |
169 | void *retaddr; | 169 | void *retaddr; |