Diff for /qemu/dyngen-exec.h between versions 1.1.1.4 and 1.1.1.5

version 1.1.1.4, 2018/04/24 16:45:03 version 1.1.1.5, 2018/04/24 16:47:28
Line 38  typedef unsigned int uint32_t; Line 38  typedef unsigned int uint32_t;
 // Linux/Sparc64 defines uint64_t  // Linux/Sparc64 defines uint64_t
 #if !(defined (__sparc_v9__) && defined(__linux__))  #if !(defined (__sparc_v9__) && defined(__linux__))
 /* XXX may be done for all 64 bits targets ? */  /* XXX may be done for all 64 bits targets ? */
 #if defined (__x86_64__) || defined(__ia64)  #if defined (__x86_64__) || defined(__ia64) || defined(__s390x__) || defined(__alpha__) 
 typedef unsigned long uint64_t;  typedef unsigned long uint64_t;
 #else  #else
 typedef unsigned long long uint64_t;  typedef unsigned long long uint64_t;
Line 55  typedef signed short int16_t; Line 55  typedef signed short int16_t;
 typedef signed int int32_t;  typedef signed int int32_t;
 // Linux/Sparc64 defines int64_t  // Linux/Sparc64 defines int64_t
 #if !(defined (__sparc_v9__) && defined(__linux__))  #if !(defined (__sparc_v9__) && defined(__linux__))
 #if defined (__x86_64__) || defined(__ia64)  #if defined (__x86_64__) || defined(__ia64) || defined(__s390x__) || defined(__alpha__)
 typedef signed long int64_t;  typedef signed long int64_t;
 #else  #else
 typedef signed long long int64_t;  typedef signed long long int64_t;
Line 78  typedef void * host_reg_t; Line 78  typedef void * host_reg_t;
 #define UINT32_MAX              (4294967295U)  #define UINT32_MAX              (4294967295U)
 #define UINT64_MAX              ((uint64_t)(18446744073709551615))  #define UINT64_MAX              ((uint64_t)(18446744073709551615))
   
   #ifdef _BSD
   typedef struct __sFILE FILE;
   #else
 typedef struct FILE FILE;  typedef struct FILE FILE;
   #endif
 extern int fprintf(FILE *, const char *, ...);  extern int fprintf(FILE *, const char *, ...);
   extern int fputs(const char *, FILE *);
 extern int printf(const char *, ...);  extern int printf(const char *, ...);
 #undef NULL  #undef NULL
 #define NULL 0  #define NULL 0
   
 #ifdef __i386__  #if defined(__i386__)
 #define AREG0 "ebp"  #define AREG0 "ebp"
 #define AREG1 "ebx"  #define AREG1 "ebx"
 #define AREG2 "esi"  #define AREG2 "esi"
 #define AREG3 "edi"  #define AREG3 "edi"
 #endif  #elif defined(__x86_64__)
 #ifdef __x86_64__  #define AREG0 "r14"
 #define AREG0 "rbp"  #define AREG1 "r15"
 #define AREG1 "rbx"  
 #define AREG2 "r12"  #define AREG2 "r12"
 #define AREG3 "r13"  #define AREG3 "r13"
 //#define AREG4 "r14"  //#define AREG4 "rbp"
 //#define AREG5 "r15"  //#define AREG5 "rbx"
 #endif  #elif defined(__powerpc__)
 #ifdef __powerpc__  
 #define AREG0 "r27"  #define AREG0 "r27"
 #define AREG1 "r24"  #define AREG1 "r24"
 #define AREG2 "r25"  #define AREG2 "r25"
Line 116  extern int printf(const char *, ...); Line 119  extern int printf(const char *, ...);
 #endif  #endif
 #define USE_INT_TO_FLOAT_HELPERS  #define USE_INT_TO_FLOAT_HELPERS
 #define BUGGY_GCC_DIV64  #define BUGGY_GCC_DIV64
 #endif  #elif defined(__arm__)
 #ifdef __arm__  
 #define AREG0 "r7"  #define AREG0 "r7"
 #define AREG1 "r4"  #define AREG1 "r4"
 #define AREG2 "r5"  #define AREG2 "r5"
 #define AREG3 "r6"  #define AREG3 "r6"
 #endif  #elif defined(__mips__)
 #ifdef __mips__  #define AREG0 "fp"
 #define AREG0 "s3"  
 #define AREG1 "s0"  #define AREG1 "s0"
 #define AREG2 "s1"  #define AREG2 "s1"
 #define AREG3 "s2"  #define AREG3 "s2"
 #endif  #define AREG4 "s3"
 #ifdef __sparc__  #define AREG5 "s4"
   #define AREG6 "s5"
   #define AREG7 "s6"
   #define AREG8 "s7"
   #elif defined(__sparc__)
 #ifdef HOST_SOLARIS  #ifdef HOST_SOLARIS
 #define AREG0 "g2"  #define AREG0 "g2"
 #define AREG1 "g3"  #define AREG1 "g3"
Line 158  extern int printf(const char *, ...); Line 163  extern int printf(const char *, ...);
 #endif  #endif
 #endif  #endif
 #define USE_FP_CONVERT  #define USE_FP_CONVERT
 #endif  #elif defined(__s390__)
 #ifdef __s390__  
 #define AREG0 "r10"  #define AREG0 "r10"
 #define AREG1 "r7"  #define AREG1 "r7"
 #define AREG2 "r8"  #define AREG2 "r8"
 #define AREG3 "r9"  #define AREG3 "r9"
 #endif  #elif defined(__alpha__)
 #ifdef __alpha__  
 /* Note $15 is the frame pointer, so anything in op-i386.c that would  /* Note $15 is the frame pointer, so anything in op-i386.c that would
    require a frame pointer, like alloca, would probably loose.  */     require a frame pointer, like alloca, would probably loose.  */
 #define AREG0 "$15"  #define AREG0 "$15"
Line 175  extern int printf(const char *, ...); Line 178  extern int printf(const char *, ...);
 #define AREG4 "$12"  #define AREG4 "$12"
 #define AREG5 "$13"  #define AREG5 "$13"
 #define AREG6 "$14"  #define AREG6 "$14"
 #endif  #elif defined(__mc68000)
 #ifdef __mc68000  
 #define AREG0 "%a5"  #define AREG0 "%a5"
 #define AREG1 "%a4"  #define AREG1 "%a4"
 #define AREG2 "%d7"  #define AREG2 "%d7"
 #define AREG3 "%d6"  #define AREG3 "%d6"
 #define AREG4 "%d5"  #define AREG4 "%d5"
 #endif  #elif defined(__ia64__)
 #ifdef __ia64__  
 #define AREG0 "r7"  #define AREG0 "r7"
 #define AREG1 "r4"  #define AREG1 "r4"
 #define AREG2 "r5"  #define AREG2 "r5"
 #define AREG3 "r6"  #define AREG3 "r6"
   #else
   #error unsupported CPU
 #endif  #endif
   
 /* force GCC to generate only one epilog at the end of the function */  /* force GCC to generate only one epilog at the end of the function */
Line 202  extern int printf(const char *, ...); Line 205  extern int printf(const char *, ...);
 #define stringify(s)    tostring(s)  #define stringify(s)    tostring(s)
 #define tostring(s)     #s  #define tostring(s)     #s
   
 #ifdef __alpha__  #if defined(__alpha__) || defined(__s390__)
 /* the symbols are considered non exported so a br immediate is generated */  /* the symbols are considered non exported so a br immediate is generated */
 #define __hidden __attribute__((visibility("hidden")))  #define __hidden __attribute__((visibility("hidden")))
 #else  #else
 #define __hidden   #define __hidden
 #endif  #endif
   
 #if defined(__alpha__)  #if defined(__alpha__)
Line 221  extern int __op_param3 __hidden; Line 224  extern int __op_param3 __hidden;
 #define PARAM1 ({ int _r; asm("" : "=r"(_r) : "0" (&__op_param1)); _r; })  #define PARAM1 ({ int _r; asm("" : "=r"(_r) : "0" (&__op_param1)); _r; })
 #define PARAM2 ({ int _r; asm("" : "=r"(_r) : "0" (&__op_param2)); _r; })  #define PARAM2 ({ int _r; asm("" : "=r"(_r) : "0" (&__op_param2)); _r; })
 #define PARAM3 ({ int _r; asm("" : "=r"(_r) : "0" (&__op_param3)); _r; })  #define PARAM3 ({ int _r; asm("" : "=r"(_r) : "0" (&__op_param3)); _r; })
   #elif defined(__s390__)
   extern int __op_param1 __hidden;
   extern int __op_param2 __hidden;
   extern int __op_param3 __hidden;
   #define PARAM1 ({ int _r; asm("bras %0,8; .long " ASM_NAME(__op_param1) "; l %0,0(%0)" : "=r"(_r) : ); _r; })
   #define PARAM2 ({ int _r; asm("bras %0,8; .long " ASM_NAME(__op_param2) "; l %0,0(%0)" : "=r"(_r) : ); _r; })
   #define PARAM3 ({ int _r; asm("bras %0,8; .long " ASM_NAME(__op_param3) "; l %0,0(%0)" : "=r"(_r) : ); _r; })
 #else  #else
 #if defined(__APPLE__)  #if defined(__APPLE__)
 static int __op_param1, __op_param2, __op_param3;  static int __op_param1, __op_param2, __op_param3;
Line 240  extern int __op_jmp0, __op_jmp1, __op_jm Line 250  extern int __op_jmp0, __op_jmp1, __op_jm
 #define ASM_NAME(x) #x  #define ASM_NAME(x) #x
 #endif  #endif
   
 #ifdef __i386__  #if defined(__i386__)
 #define EXIT_TB() asm volatile ("ret")  #define EXIT_TB() asm volatile ("ret")
 #define GOTO_LABEL_PARAM(n) asm volatile ("jmp " ASM_NAME(__op_gen_label) #n)  #define GOTO_LABEL_PARAM(n) asm volatile ("jmp " ASM_NAME(__op_gen_label) #n)
 #endif  #elif defined(__x86_64__)
 #ifdef __x86_64__  
 #define EXIT_TB() asm volatile ("ret")  #define EXIT_TB() asm volatile ("ret")
 #define GOTO_LABEL_PARAM(n) asm volatile ("jmp " ASM_NAME(__op_gen_label) #n)  #define GOTO_LABEL_PARAM(n) asm volatile ("jmp " ASM_NAME(__op_gen_label) #n)
 #endif  #elif defined(__powerpc__)
 #ifdef __powerpc__  
 #define EXIT_TB() asm volatile ("blr")  #define EXIT_TB() asm volatile ("blr")
 #define GOTO_LABEL_PARAM(n) asm volatile ("b " ASM_NAME(__op_gen_label) #n)  #define GOTO_LABEL_PARAM(n) asm volatile ("b " ASM_NAME(__op_gen_label) #n)
 #endif  #elif defined(__s390__)
 #ifdef __s390__  
 #define EXIT_TB() asm volatile ("br %r14")  #define EXIT_TB() asm volatile ("br %r14")
 #define GOTO_LABEL_PARAM(n) asm volatile ("b " ASM_NAME(__op_gen_label) #n)  #define GOTO_LABEL_PARAM(n) asm volatile ("larl %r7,12; l %r7,0(%r7); br %r7; .long " ASM_NAME(__op_gen_label) #n)
 #endif  #elif defined(__alpha__)
 #ifdef __alpha__  
 #define EXIT_TB() asm volatile ("ret")  #define EXIT_TB() asm volatile ("ret")
 #endif  #elif defined(__ia64__)
 #ifdef __ia64__  
 #define EXIT_TB() asm volatile ("br.ret.sptk.many b0;;")  #define EXIT_TB() asm volatile ("br.ret.sptk.many b0;;")
 #define GOTO_LABEL_PARAM(n) asm volatile ("br.sptk.many " \  #define GOTO_LABEL_PARAM(n) asm volatile ("br.sptk.many " \
                                           ASM_NAME(__op_gen_label) #n)                                            ASM_NAME(__op_gen_label) #n)
 #endif  #elif defined(__sparc__)
 #ifdef __sparc__  
 #define EXIT_TB() asm volatile ("jmpl %i0 + 8, %g0; nop")  #define EXIT_TB() asm volatile ("jmpl %i0 + 8, %g0; nop")
 #define GOTO_LABEL_PARAM(n) asm volatile ("ba " ASM_NAME(__op_gen_label) #n ";nop")  #define GOTO_LABEL_PARAM(n) asm volatile ("ba " ASM_NAME(__op_gen_label) #n ";nop")
 #endif  #elif defined(__arm__)
 #ifdef __arm__  
 #define EXIT_TB() asm volatile ("b exec_loop")  #define EXIT_TB() asm volatile ("b exec_loop")
 #define GOTO_LABEL_PARAM(n) asm volatile ("b " ASM_NAME(__op_gen_label) #n)  #define GOTO_LABEL_PARAM(n) asm volatile ("b " ASM_NAME(__op_gen_label) #n)
 #endif  #elif defined(__mc68000)
 #ifdef __mc68000  
 #define EXIT_TB() asm volatile ("rts")  #define EXIT_TB() asm volatile ("rts")
   #elif defined(__mips__)
   #define EXIT_TB() asm volatile ("jr $ra")
   #define GOTO_LABEL_PARAM(n) asm volatile (".set noat; la $1, " ASM_NAME(__op_gen_label) #n "; jr $1; .set at")
   #else
   #error unsupported CPU
 #endif  #endif
   
 #endif /* !defined(__DYNGEN_EXEC_H__) */  #endif /* !defined(__DYNGEN_EXEC_H__) */

Removed from v.1.1.1.4  
changed lines
  Added in v.1.1.1.5


unix.superglobalmegacorp.com