Commit cab84d984420800e57dfab42a7c6dd95f951698a

Authored by bellard
1 parent 1b039c09

Mac OS X port (Pierre d'Herbemont)


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1008 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 1 changed file with 6 additions and 2 deletions
dyngen-exec.h
@@ -184,7 +184,7 @@ extern int printf(const char *, ...); @@ -184,7 +184,7 @@ extern int printf(const char *, ...);
184 #define __hidden 184 #define __hidden
185 #endif 185 #endif
186 186
187 -#ifdef __alpha__ 187 +#if defined(__alpha__)
188 /* Suggested by Richard Henderson. This will result in code like 188 /* Suggested by Richard Henderson. This will result in code like
189 ldah $0,__op_param1($29) !gprelhigh 189 ldah $0,__op_param1($29) !gprelhigh
190 lda $0,__op_param1($0) !gprellow 190 lda $0,__op_param1($0) !gprellow
@@ -197,11 +197,15 @@ extern int __op_param3 __hidden; @@ -197,11 +197,15 @@ extern int __op_param3 __hidden;
197 #define PARAM2 ({ int _r; asm("" : "=r"(_r) : "0" (&__op_param2)); _r; }) 197 #define PARAM2 ({ int _r; asm("" : "=r"(_r) : "0" (&__op_param2)); _r; })
198 #define PARAM3 ({ int _r; asm("" : "=r"(_r) : "0" (&__op_param3)); _r; }) 198 #define PARAM3 ({ int _r; asm("" : "=r"(_r) : "0" (&__op_param3)); _r; })
199 #else 199 #else
  200 +#if defined(__APPLE__)
  201 +static int __op_param1, __op_param2, __op_param3;
  202 +#else
200 extern int __op_param1, __op_param2, __op_param3; 203 extern int __op_param1, __op_param2, __op_param3;
  204 +#endif
201 #define PARAM1 ((long)(&__op_param1)) 205 #define PARAM1 ((long)(&__op_param1))
202 #define PARAM2 ((long)(&__op_param2)) 206 #define PARAM2 ((long)(&__op_param2))
203 #define PARAM3 ((long)(&__op_param3)) 207 #define PARAM3 ((long)(&__op_param3))
204 -#endif 208 +#endif /* !defined(__alpha__) */
205 209
206 extern int __op_jmp0, __op_jmp1, __op_jmp2, __op_jmp3; 210 extern int __op_jmp0, __op_jmp1, __op_jmp2, __op_jmp3;
207 211