/[pcre]/code/trunk/sljit/sljitNativeX86_common.c
ViewVC logotype

Diff of /code/trunk/sljit/sljitNativeX86_common.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 879 by zherczeg, Fri Jan 13 13:34:07 2012 UTC revision 880 by zherczeg, Sun Jan 15 17:23:37 2012 UTC
# Line 80  static SLJIT_CONST sljit_ub reg_map[SLJI Line 80  static SLJIT_CONST sljit_ub reg_map[SLJI
80                  p = SLJIT_MEM1(SLJIT_LOCALS_REG); \                  p = SLJIT_MEM1(SLJIT_LOCALS_REG); \
81                  do; \                  do; \
82          } \          } \
83          else if (p >= SLJIT_GENERAL_EREG1 && p <= SLJIT_GENERAL_EREG2) { \          else if (p >= SLJIT_SAVED_EREG1 && p <= SLJIT_SAVED_EREG2) { \
84                  w = compiler->generals_start + (p - SLJIT_GENERAL_EREG1) * sizeof(sljit_w); \                  w = compiler->saveds_start + (p - SLJIT_SAVED_EREG1) * sizeof(sljit_w); \
85                  p = SLJIT_MEM1(SLJIT_LOCALS_REG); \                  p = SLJIT_MEM1(SLJIT_LOCALS_REG); \
86                  do; \                  do; \
87          }          }
# Line 95  static SLJIT_CONST sljit_ub reg_map[SLJI Line 95  static SLJIT_CONST sljit_ub reg_map[SLJI
95    
96  /* Note: r12 & 0x7 == 0b100, which decoded as SIB byte present  /* Note: r12 & 0x7 == 0b100, which decoded as SIB byte present
97     Note: avoid to use r12 and r13 for memory addessing     Note: avoid to use r12 and r13 for memory addessing
98     therefore r12 is better for GENERAL_EREG than GENERAL_REG. */     therefore r12 is better for SAVED_EREG than SAVED_REG. */
99  #ifndef _WIN64  #ifndef _WIN64
100  /* 1st passed in rdi, 2nd argument passed in rsi, 3rd in rdx. */  /* 1st passed in rdi, 2nd argument passed in rsi, 3rd in rdx. */
101  static SLJIT_CONST sljit_ub reg_map[SLJIT_NO_REGISTERS + 4] = {  static SLJIT_CONST sljit_ub reg_map[SLJIT_NO_REGISTERS + 4] = {
# Line 1985  SLJIT_API_FUNC_ATTRIBUTE int sljit_get_r Line 1985  SLJIT_API_FUNC_ATTRIBUTE int sljit_get_r
1985          check_sljit_get_register_index(reg);          check_sljit_get_register_index(reg);
1986  #if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)  #if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
1987          if (reg == SLJIT_TEMPORARY_EREG1 || reg == SLJIT_TEMPORARY_EREG2          if (reg == SLJIT_TEMPORARY_EREG1 || reg == SLJIT_TEMPORARY_EREG2
1988                          || reg == SLJIT_GENERAL_EREG1 || reg == SLJIT_GENERAL_EREG2)                          || reg == SLJIT_SAVED_EREG1 || reg == SLJIT_SAVED_EREG2)
1989                  return -1;                  return -1;
1990  #endif  #endif
1991          return reg_map[reg];          return reg_map[reg];
# Line 2752  SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_ Line 2752  SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_
2752    
2753                          *buf++ = 0x0f;                          *buf++ = 0x0f;
2754                          *buf++ = 0xb6;                          *buf++ = 0xb6;
2755                          if (dst >= SLJIT_GENERAL_REG1 && dst <= SLJIT_NO_REGISTERS)                          if (dst >= SLJIT_SAVED_REG1 && dst <= SLJIT_NO_REGISTERS)
2756                                  *buf = 0xC0 | (reg_map[dst] << 3);                                  *buf = 0xC0 | (reg_map[dst] << 3);
2757                          else {                          else {
2758                                  *buf = 0xC0;                                  *buf = 0xC0;

Legend:
Removed from v.879  
changed lines
  Added in v.880

webmaster@exim.org
ViewVC Help
Powered by ViewVC 1.1.12