| opcodes.h | | opcodes.h | |
| | | | |
| skipping to change at line 86 | | skipping to change at line 86 | |
| BINARY_SL(shll, "%s << %s") | | BINARY_SL(shll, "%s << %s") | |
| BINARY_SL(shrsl, "%s >> %s") | | BINARY_SL(shrsl, "%s >> %s") | |
| BINARY_UL(shrul, "((orc_uint32)%s) >> %s") | | BINARY_UL(shrul, "((orc_uint32)%s) >> %s") | |
| UNARY_SL(signl, "ORC_CLAMP(%s,-1,1)") | | UNARY_SL(signl, "ORC_CLAMP(%s,-1,1)") | |
| BINARY_SL(subl, "%s - %s") | | BINARY_SL(subl, "%s - %s") | |
| BINARY_SL(subssl, "ORC_CLAMP_SL((orc_int64)%s - (orc_int64)%s)") | | BINARY_SL(subssl, "ORC_CLAMP_SL((orc_int64)%s - (orc_int64)%s)") | |
| BINARY_UL(subusl, "ORC_CLAMP_UL((orc_int64)(orc_uint32)%s - (orc_int64)(orc
_uint32)%s)") | | BINARY_UL(subusl, "ORC_CLAMP_UL((orc_int64)(orc_uint32)%s - (orc_int64)(orc
_uint32)%s)") | |
| BINARY_SL(xorl, "%s ^ %s") | | BINARY_SL(xorl, "%s ^ %s") | |
| | | | |
| UNARY_SQ(copyq, "%s") | | UNARY_SQ(copyq, "%s") | |
|
| | | BINARY_SQ(cmpeqq, "(%s == %s) ? (~0) : 0") | |
| | | BINARY_SQ(cmpgtsq, "(%s > %s) ? (~0) : 0") | |
| | | BINARY_SQ(andq, "%s & %s") | |
| | | BINARY_SQ(andnq, "(~%s) & %s") | |
| | | BINARY_SQ(orq, "%s | %s") | |
| | | BINARY_SQ(xorq, "%s ^ %s") | |
| | | BINARY_SQ(addq, "%s + %s") | |
| | | BINARY_SQ(subq, "%s - %s") | |
| | | BINARY_SQ(shlq, "%s << %s") | |
| | | BINARY_SQ(shrsq, "%s >> %s") | |
| | | BINARY_UQ(shruq, "((orc_uint64)%s) >> %s") | |
| | | | |
| UNARY_BW(convsbw, "%s") | | UNARY_BW(convsbw, "%s") | |
| UNARY_BW(convubw, "(orc_uint8)%s") | | UNARY_BW(convubw, "(orc_uint8)%s") | |
| UNARY_WB(convwb, "%s") | | UNARY_WB(convwb, "%s") | |
| UNARY_WB(convhwb, "((orc_uint16)%s)>>8") | | UNARY_WB(convhwb, "((orc_uint16)%s)>>8") | |
| UNARY_WB(convssswb, "ORC_CLAMP_SB(%s)") | | UNARY_WB(convssswb, "ORC_CLAMP_SB(%s)") | |
| UNARY_WB(convsuswb, "ORC_CLAMP_UB(%s)") | | UNARY_WB(convsuswb, "ORC_CLAMP_UB(%s)") | |
|
| UNARY_WB(convusswb, "ORC_CLAMP_SB((orc_uint16)%s)") | | UNARY_WB(convusswb, "ORC_MIN((orc_uint16)%s,ORC_SB_MAX)") | |
| UNARY_WB(convuuswb, "ORC_CLAMP_UB((orc_uint16)%s)") | | UNARY_WB(convuuswb, "ORC_MIN((orc_uint16)%s,ORC_UB_MAX)") | |
| | | | |
| UNARY_WL(convswl, "%s") | | UNARY_WL(convswl, "%s") | |
| UNARY_WL(convuwl, "(orc_uint16)%s") | | UNARY_WL(convuwl, "(orc_uint16)%s") | |
| UNARY_LW(convlw, "%s") | | UNARY_LW(convlw, "%s") | |
| UNARY_WB(convhlw, "((orc_uint32)%s)>>16") | | UNARY_WB(convhlw, "((orc_uint32)%s)>>16") | |
| UNARY_LW(convssslw, "ORC_CLAMP_SW(%s)") | | UNARY_LW(convssslw, "ORC_CLAMP_SW(%s)") | |
| UNARY_LW(convsuslw, "ORC_CLAMP_UW(%s)") | | UNARY_LW(convsuslw, "ORC_CLAMP_UW(%s)") | |
|
| UNARY_LW(convusslw, "ORC_CLAMP_SW((orc_uint32)%s)") | | UNARY_LW(convusslw, "ORC_CLAMP((orc_uint32)%s,0,ORC_SW_MAX)") | |
| UNARY_LW(convuuslw, "ORC_CLAMP_UW((orc_uint32)%s)") | | UNARY_LW(convuuslw, "ORC_CLAMP_UW((orc_uint32)%s)") | |
| | | | |
| UNARY_LQ(convslq, "%s") | | UNARY_LQ(convslq, "%s") | |
| UNARY_LQ(convulq, "(orc_uint32)%s") | | UNARY_LQ(convulq, "(orc_uint32)%s") | |
| UNARY_LW(convql, "%s") | | UNARY_LW(convql, "%s") | |
| UNARY_LW(convsssql, "ORC_CLAMP_SL(%s)") | | UNARY_LW(convsssql, "ORC_CLAMP_SL(%s)") | |
| UNARY_LW(convsusql, "ORC_CLAMP_UL(%s)") | | UNARY_LW(convsusql, "ORC_CLAMP_UL(%s)") | |
| UNARY_LW(convussql, "ORC_CLAMP_SL((orc_uint64)%s)") | | UNARY_LW(convussql, "ORC_CLAMP_SL((orc_uint64)%s)") | |
| UNARY_LW(convuusql, "ORC_CLAMP_UL((orc_uint64)%s)") | | UNARY_LW(convuusql, "ORC_CLAMP_UL((orc_uint64)%s)") | |
| | | | |
| BINARY_BW(mulsbw, "%s * %s") | | BINARY_BW(mulsbw, "%s * %s") | |
|
| BINARY_BW(mulubw, "(orc_uint8)%s * (orc_uint8)%s") | | BINARY_BW(mulubw, "((orc_uint8)%s) * ((orc_uint8)%s)") | |
| BINARY_WL(mulswl, "%s * %s") | | BINARY_WL(mulswl, "%s * %s") | |
|
| BINARY_WL(muluwl, "(orc_uint16)%s * (orc_uint16)%s") | | BINARY_WL(muluwl, "((orc_uint16)%s) * ((orc_uint16)%s)") | |
| | | BINARY_LQ(mulslq, "((orc_int64)%s) * ((orc_int64)%s)") | |
| | | BINARY_LQ(mululq, "((orc_uint64)((orc_uint32)%s)) * ((orc_uint64)((orc_uint | |
| | | 32)%s))") | |
| | | | |
|
| BINARY_WL(mergewl, "((orc_uint16)%s) | ((orc_uint16)%s << 16)") | | BINARY_LQ(mergelq, "((orc_uint64)%s & ORC_UINT64_C(0xffffffff)) | ((orc_uin | |
| BINARY_BW(mergebw, "((orc_uint8)%s) | ((orc_uint8)%s << 8)") | | t64)%s << 32)") | |
| | | BINARY_WL(mergewl, "((orc_uint16)%s & 0x0000ffff) | ((orc_uint16)%s << 16)" | |
| | | ) | |
| | | BINARY_BW(mergebw, "((orc_uint8)%s & 0x00ff) | ((orc_uint8)%s << 8)") | |
| UNARY_WB(select0wb, "(orc_uint16)%s & 0xff") | | UNARY_WB(select0wb, "(orc_uint16)%s & 0xff") | |
| UNARY_WB(select1wb, "((orc_uint16)%s >> 8)&0xff") | | UNARY_WB(select1wb, "((orc_uint16)%s >> 8)&0xff") | |
| UNARY_LW(select0lw, "(orc_uint32)%s & 0xffff") | | UNARY_LW(select0lw, "(orc_uint32)%s & 0xffff") | |
| UNARY_LW(select1lw, "((orc_uint32)%s >> 16)&0xffff") | | UNARY_LW(select1lw, "((orc_uint32)%s >> 16)&0xffff") | |
|
| | | UNARY_QL(select0ql, "(orc_uint64)%s & 0xffffffff") | |
| | | UNARY_QL(select1ql, "((orc_uint64)%s >> 32)&0xffffffff") | |
| UNARY_UW(swapw, "ORC_SWAP_W(%s)") | | UNARY_UW(swapw, "ORC_SWAP_W(%s)") | |
| UNARY_UL(swapl, "ORC_SWAP_L(%s)") | | UNARY_UL(swapl, "ORC_SWAP_L(%s)") | |
| UNARY_UQ(swapq, "ORC_SWAP_Q(%s)") | | UNARY_UQ(swapq, "ORC_SWAP_Q(%s)") | |
| | | | |
| BINARY_F(addf, "%s + %s") | | BINARY_F(addf, "%s + %s") | |
| BINARY_F(subf, "%s - %s") | | BINARY_F(subf, "%s - %s") | |
| BINARY_F(mulf, "%s * %s") | | BINARY_F(mulf, "%s * %s") | |
| BINARY_F(divf, "%s / %s") | | BINARY_F(divf, "%s / %s") | |
| UNARY_F(sqrtf, "sqrt(%s)") | | UNARY_F(sqrtf, "sqrt(%s)") | |
| BINARY_FL(cmpeqf, "(%s == %s) ? (~0) : 0") | | BINARY_FL(cmpeqf, "(%s == %s) ? (~0) : 0") | |
| BINARY_FL(cmpltf, "(%s < %s) ? (~0) : 0") | | BINARY_FL(cmpltf, "(%s < %s) ? (~0) : 0") | |
| BINARY_FL(cmplef, "(%s <= %s) ? (~0) : 0") | | BINARY_FL(cmplef, "(%s <= %s) ? (~0) : 0") | |
| | | | |
| BINARY_D(addd, "%s + %s") | | BINARY_D(addd, "%s + %s") | |
| BINARY_D(subd, "%s - %s") | | BINARY_D(subd, "%s - %s") | |
| BINARY_D(muld, "%s * %s") | | BINARY_D(muld, "%s * %s") | |
| BINARY_D(divd, "%s / %s") | | BINARY_D(divd, "%s / %s") | |
| UNARY_D(sqrtd, "sqrt(%s)") | | UNARY_D(sqrtd, "sqrt(%s)") | |
|
| BINARY_DQ(cmpeqd, "(%s == %s) ? (~0ULL) : 0") | | BINARY_DQ(cmpeqd, "(%s == %s) ? ORC_UINT64_C(~0) : 0") | |
| BINARY_DQ(cmpltd, "(%s < %s) ? (~0ULL) : 0") | | BINARY_DQ(cmpltd, "(%s < %s) ? ORC_UINT64_C(~0) : 0") | |
| BINARY_DQ(cmpled, "(%s <= %s) ? (~0ULL) : 0") | | BINARY_DQ(cmpled, "(%s <= %s) ? ORC_UINT64_C(~0) : 0") | |
| | | | |
End of changes. 8 change blocks. |
| 7 lines changed or deleted | | 26 lines changed or added | |
|
| orcemulateopcodes.h | | orcemulateopcodes.h | |
| | | | |
| skipping to change at line 113 | | skipping to change at line 113 | |
| void emulate_storel (OrcOpcodeExecutor *ex, int i, int n); | | void emulate_storel (OrcOpcodeExecutor *ex, int i, int n); | |
| void emulate_subl (OrcOpcodeExecutor *ex, int i, int n); | | void emulate_subl (OrcOpcodeExecutor *ex, int i, int n); | |
| void emulate_subssl (OrcOpcodeExecutor *ex, int i, int n); | | void emulate_subssl (OrcOpcodeExecutor *ex, int i, int n); | |
| void emulate_subusl (OrcOpcodeExecutor *ex, int i, int n); | | void emulate_subusl (OrcOpcodeExecutor *ex, int i, int n); | |
| void emulate_xorl (OrcOpcodeExecutor *ex, int i, int n); | | void emulate_xorl (OrcOpcodeExecutor *ex, int i, int n); | |
| void emulate_loadq (OrcOpcodeExecutor *ex, int i, int n); | | void emulate_loadq (OrcOpcodeExecutor *ex, int i, int n); | |
| void emulate_loadpq (OrcOpcodeExecutor *ex, int i, int n); | | void emulate_loadpq (OrcOpcodeExecutor *ex, int i, int n); | |
| void emulate_storeq (OrcOpcodeExecutor *ex, int i, int n); | | void emulate_storeq (OrcOpcodeExecutor *ex, int i, int n); | |
| void emulate_splatw3q (OrcOpcodeExecutor *ex, int i, int n); | | void emulate_splatw3q (OrcOpcodeExecutor *ex, int i, int n); | |
| void emulate_copyq (OrcOpcodeExecutor *ex, int i, int n); | | void emulate_copyq (OrcOpcodeExecutor *ex, int i, int n); | |
|
| | | void emulate_cmpeqq (OrcOpcodeExecutor *ex, int i, int n); | |
| | | void emulate_cmpgtsq (OrcOpcodeExecutor *ex, int i, int n); | |
| | | void emulate_andq (OrcOpcodeExecutor *ex, int i, int n); | |
| | | void emulate_andnq (OrcOpcodeExecutor *ex, int i, int n); | |
| | | void emulate_orq (OrcOpcodeExecutor *ex, int i, int n); | |
| | | void emulate_xorq (OrcOpcodeExecutor *ex, int i, int n); | |
| | | void emulate_addq (OrcOpcodeExecutor *ex, int i, int n); | |
| | | void emulate_subq (OrcOpcodeExecutor *ex, int i, int n); | |
| | | void emulate_shlq (OrcOpcodeExecutor *ex, int i, int n); | |
| | | void emulate_shrsq (OrcOpcodeExecutor *ex, int i, int n); | |
| | | void emulate_shruq (OrcOpcodeExecutor *ex, int i, int n); | |
| void emulate_convsbw (OrcOpcodeExecutor *ex, int i, int n); | | void emulate_convsbw (OrcOpcodeExecutor *ex, int i, int n); | |
| void emulate_convubw (OrcOpcodeExecutor *ex, int i, int n); | | void emulate_convubw (OrcOpcodeExecutor *ex, int i, int n); | |
| void emulate_splatbw (OrcOpcodeExecutor *ex, int i, int n); | | void emulate_splatbw (OrcOpcodeExecutor *ex, int i, int n); | |
| void emulate_splatbl (OrcOpcodeExecutor *ex, int i, int n); | | void emulate_splatbl (OrcOpcodeExecutor *ex, int i, int n); | |
| void emulate_convswl (OrcOpcodeExecutor *ex, int i, int n); | | void emulate_convswl (OrcOpcodeExecutor *ex, int i, int n); | |
| void emulate_convuwl (OrcOpcodeExecutor *ex, int i, int n); | | void emulate_convuwl (OrcOpcodeExecutor *ex, int i, int n); | |
| void emulate_convslq (OrcOpcodeExecutor *ex, int i, int n); | | void emulate_convslq (OrcOpcodeExecutor *ex, int i, int n); | |
| void emulate_convulq (OrcOpcodeExecutor *ex, int i, int n); | | void emulate_convulq (OrcOpcodeExecutor *ex, int i, int n); | |
| void emulate_convwb (OrcOpcodeExecutor *ex, int i, int n); | | void emulate_convwb (OrcOpcodeExecutor *ex, int i, int n); | |
| void emulate_convhwb (OrcOpcodeExecutor *ex, int i, int n); | | void emulate_convhwb (OrcOpcodeExecutor *ex, int i, int n); | |
| | | | |
| skipping to change at line 142 | | skipping to change at line 153 | |
| void emulate_convuuslw (OrcOpcodeExecutor *ex, int i, int n); | | void emulate_convuuslw (OrcOpcodeExecutor *ex, int i, int n); | |
| void emulate_convql (OrcOpcodeExecutor *ex, int i, int n); | | void emulate_convql (OrcOpcodeExecutor *ex, int i, int n); | |
| void emulate_convsssql (OrcOpcodeExecutor *ex, int i, int n); | | void emulate_convsssql (OrcOpcodeExecutor *ex, int i, int n); | |
| void emulate_convsusql (OrcOpcodeExecutor *ex, int i, int n); | | void emulate_convsusql (OrcOpcodeExecutor *ex, int i, int n); | |
| void emulate_convussql (OrcOpcodeExecutor *ex, int i, int n); | | void emulate_convussql (OrcOpcodeExecutor *ex, int i, int n); | |
| void emulate_convuusql (OrcOpcodeExecutor *ex, int i, int n); | | void emulate_convuusql (OrcOpcodeExecutor *ex, int i, int n); | |
| void emulate_mulsbw (OrcOpcodeExecutor *ex, int i, int n); | | void emulate_mulsbw (OrcOpcodeExecutor *ex, int i, int n); | |
| void emulate_mulubw (OrcOpcodeExecutor *ex, int i, int n); | | void emulate_mulubw (OrcOpcodeExecutor *ex, int i, int n); | |
| void emulate_mulswl (OrcOpcodeExecutor *ex, int i, int n); | | void emulate_mulswl (OrcOpcodeExecutor *ex, int i, int n); | |
| void emulate_muluwl (OrcOpcodeExecutor *ex, int i, int n); | | void emulate_muluwl (OrcOpcodeExecutor *ex, int i, int n); | |
|
| | | void emulate_mulslq (OrcOpcodeExecutor *ex, int i, int n); | |
| | | void emulate_mululq (OrcOpcodeExecutor *ex, int i, int n); | |
| void emulate_accw (OrcOpcodeExecutor *ex, int i, int n); | | void emulate_accw (OrcOpcodeExecutor *ex, int i, int n); | |
| void emulate_accl (OrcOpcodeExecutor *ex, int i, int n); | | void emulate_accl (OrcOpcodeExecutor *ex, int i, int n); | |
| void emulate_accsadubl (OrcOpcodeExecutor *ex, int i, int n); | | void emulate_accsadubl (OrcOpcodeExecutor *ex, int i, int n); | |
| void emulate_swapw (OrcOpcodeExecutor *ex, int i, int n); | | void emulate_swapw (OrcOpcodeExecutor *ex, int i, int n); | |
| void emulate_swapl (OrcOpcodeExecutor *ex, int i, int n); | | void emulate_swapl (OrcOpcodeExecutor *ex, int i, int n); | |
|
| | | void emulate_swapwl (OrcOpcodeExecutor *ex, int i, int n); | |
| void emulate_swapq (OrcOpcodeExecutor *ex, int i, int n); | | void emulate_swapq (OrcOpcodeExecutor *ex, int i, int n); | |
|
| | | void emulate_swaplq (OrcOpcodeExecutor *ex, int i, int n); | |
| void emulate_select0wb (OrcOpcodeExecutor *ex, int i, int n); | | void emulate_select0wb (OrcOpcodeExecutor *ex, int i, int n); | |
| void emulate_select1wb (OrcOpcodeExecutor *ex, int i, int n); | | void emulate_select1wb (OrcOpcodeExecutor *ex, int i, int n); | |
| void emulate_select0lw (OrcOpcodeExecutor *ex, int i, int n); | | void emulate_select0lw (OrcOpcodeExecutor *ex, int i, int n); | |
| void emulate_select1lw (OrcOpcodeExecutor *ex, int i, int n); | | void emulate_select1lw (OrcOpcodeExecutor *ex, int i, int n); | |
|
| | | void emulate_select0ql (OrcOpcodeExecutor *ex, int i, int n); | |
| | | void emulate_select1ql (OrcOpcodeExecutor *ex, int i, int n); | |
| | | void emulate_mergelq (OrcOpcodeExecutor *ex, int i, int n); | |
| void emulate_mergewl (OrcOpcodeExecutor *ex, int i, int n); | | void emulate_mergewl (OrcOpcodeExecutor *ex, int i, int n); | |
| void emulate_mergebw (OrcOpcodeExecutor *ex, int i, int n); | | void emulate_mergebw (OrcOpcodeExecutor *ex, int i, int n); | |
| void emulate_splitql (OrcOpcodeExecutor *ex, int i, int n); | | void emulate_splitql (OrcOpcodeExecutor *ex, int i, int n); | |
| void emulate_splitlw (OrcOpcodeExecutor *ex, int i, int n); | | void emulate_splitlw (OrcOpcodeExecutor *ex, int i, int n); | |
| void emulate_splitwb (OrcOpcodeExecutor *ex, int i, int n); | | void emulate_splitwb (OrcOpcodeExecutor *ex, int i, int n); | |
| void emulate_addf (OrcOpcodeExecutor *ex, int i, int n); | | void emulate_addf (OrcOpcodeExecutor *ex, int i, int n); | |
| void emulate_subf (OrcOpcodeExecutor *ex, int i, int n); | | void emulate_subf (OrcOpcodeExecutor *ex, int i, int n); | |
| void emulate_mulf (OrcOpcodeExecutor *ex, int i, int n); | | void emulate_mulf (OrcOpcodeExecutor *ex, int i, int n); | |
| void emulate_divf (OrcOpcodeExecutor *ex, int i, int n); | | void emulate_divf (OrcOpcodeExecutor *ex, int i, int n); | |
| void emulate_sqrtf (OrcOpcodeExecutor *ex, int i, int n); | | void emulate_sqrtf (OrcOpcodeExecutor *ex, int i, int n); | |
| | | | |
End of changes. 5 change blocks. |
| 0 lines changed or deleted | | 18 lines changed or added | |
|
| orcfunctions.h | | orcfunctions.h | |
| | | | |
| skipping to change at line 23 | | skipping to change at line 23 | |
| #if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L | | #if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L | |
| #include <stdint.h> | | #include <stdint.h> | |
| typedef int8_t orc_int8; | | typedef int8_t orc_int8; | |
| typedef int16_t orc_int16; | | typedef int16_t orc_int16; | |
| typedef int32_t orc_int32; | | typedef int32_t orc_int32; | |
| typedef int64_t orc_int64; | | typedef int64_t orc_int64; | |
| typedef uint8_t orc_uint8; | | typedef uint8_t orc_uint8; | |
| typedef uint16_t orc_uint16; | | typedef uint16_t orc_uint16; | |
| typedef uint32_t orc_uint32; | | typedef uint32_t orc_uint32; | |
| typedef uint64_t orc_uint64; | | typedef uint64_t orc_uint64; | |
|
| | | #define ORC_UINT64_C(x) UINT64_C(x) | |
| #elif defined(_MSC_VER) | | #elif defined(_MSC_VER) | |
| typedef signed __int8 orc_int8; | | typedef signed __int8 orc_int8; | |
| typedef signed __int16 orc_int16; | | typedef signed __int16 orc_int16; | |
| typedef signed __int32 orc_int32; | | typedef signed __int32 orc_int32; | |
| typedef signed __int64 orc_int64; | | typedef signed __int64 orc_int64; | |
| typedef unsigned __int8 orc_uint8; | | typedef unsigned __int8 orc_uint8; | |
| typedef unsigned __int16 orc_uint16; | | typedef unsigned __int16 orc_uint16; | |
| typedef unsigned __int32 orc_uint32; | | typedef unsigned __int32 orc_uint32; | |
| typedef unsigned __int64 orc_uint64; | | typedef unsigned __int64 orc_uint64; | |
|
| | | #define ORC_UINT64_C(x) (x##Ui64) | |
| #else | | #else | |
| #include <limits.h> | | #include <limits.h> | |
| typedef signed char orc_int8; | | typedef signed char orc_int8; | |
| typedef short orc_int16; | | typedef short orc_int16; | |
| typedef int orc_int32; | | typedef int orc_int32; | |
| typedef unsigned char orc_uint8; | | typedef unsigned char orc_uint8; | |
| typedef unsigned short orc_uint16; | | typedef unsigned short orc_uint16; | |
| typedef unsigned int orc_uint32; | | typedef unsigned int orc_uint32; | |
| #if INT_MAX == LONG_MAX | | #if INT_MAX == LONG_MAX | |
| typedef long long orc_int64; | | typedef long long orc_int64; | |
| typedef unsigned long long orc_uint64; | | typedef unsigned long long orc_uint64; | |
|
| | | #define ORC_UINT64_C(x) (x##ULL) | |
| #else | | #else | |
| typedef long orc_int64; | | typedef long orc_int64; | |
| typedef unsigned long orc_uint64; | | typedef unsigned long orc_uint64; | |
|
| | | #define ORC_UINT64_C(x) (x##UL) | |
| #endif | | #endif | |
| #endif | | #endif | |
| typedef union { orc_int16 i; orc_int8 x2[2]; } orc_union16; | | typedef union { orc_int16 i; orc_int8 x2[2]; } orc_union16; | |
| typedef union { orc_int32 i; float f; orc_int16 x2[2]; orc_int8 x4[4]; } or
c_union32; | | typedef union { orc_int32 i; float f; orc_int16 x2[2]; orc_int8 x4[4]; } or
c_union32; | |
|
| typedef union { orc_int64 i; double f; orc_int32 x2[2]; orc_int16 x4[4]; }
orc_union64; | | typedef union { orc_int64 i; double f; orc_int32 x2[2]; float x2f[2]; orc_i
nt16 x4[4]; } orc_union64; | |
| #endif | | #endif | |
| void orc_memcpy (void * d1, const void * s1, int n); | | void orc_memcpy (void * d1, const void * s1, int n); | |
| void orc_memset (void * d1, int p1, int n); | | void orc_memset (void * d1, int p1, int n); | |
| | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| } | | } | |
| #endif | | #endif | |
| | | | |
| #endif | | #endif | |
| | | | |
End of changes. 5 change blocks. |
| 1 lines changed or deleted | | 5 lines changed or added | |
|
| orcmmx.h | | orcmmx.h | |
| | | | |
| skipping to change at line 14 | | skipping to change at line 14 | |
| | | | |
| #include <orc/orcx86.h> | | #include <orc/orcx86.h> | |
| | | | |
| typedef enum { | | typedef enum { | |
| ORC_TARGET_MMX_MMX = (1<<0), | | ORC_TARGET_MMX_MMX = (1<<0), | |
| ORC_TARGET_MMX_MMXEXT = (1<<1), | | ORC_TARGET_MMX_MMXEXT = (1<<1), | |
| ORC_TARGET_MMX_3DNOW = (1<<2), | | ORC_TARGET_MMX_3DNOW = (1<<2), | |
| ORC_TARGET_MMX_3DNOWEXT = (1<<3), | | ORC_TARGET_MMX_3DNOWEXT = (1<<3), | |
| ORC_TARGET_MMX_SSSE3 = (1<<4), | | ORC_TARGET_MMX_SSSE3 = (1<<4), | |
| ORC_TARGET_MMX_SSE4_1 = (1<<5), | | ORC_TARGET_MMX_SSE4_1 = (1<<5), | |
|
| | | ORC_TARGET_MMX_SSE4_2 = (1<<6), | |
| ORC_TARGET_MMX_FRAME_POINTER = (1<<7), | | ORC_TARGET_MMX_FRAME_POINTER = (1<<7), | |
| ORC_TARGET_MMX_SHORT_JUMPS = (1<<8), | | ORC_TARGET_MMX_SHORT_JUMPS = (1<<8), | |
| ORC_TARGET_MMX_64BIT = (1<<9) | | ORC_TARGET_MMX_64BIT = (1<<9) | |
| } OrcTargetMMXFlags; | | } OrcTargetMMXFlags; | |
| | | | |
| typedef enum { | | typedef enum { | |
| X86_MM0 = ORC_VEC_REG_BASE, | | X86_MM0 = ORC_VEC_REG_BASE, | |
| X86_MM1, | | X86_MM1, | |
| X86_MM2, | | X86_MM2, | |
| X86_MM3, | | X86_MM3, | |
| | | | |
| skipping to change at line 35 | | skipping to change at line 36 | |
| X86_MM5, | | X86_MM5, | |
| X86_MM6, | | X86_MM6, | |
| X86_MM7 | | X86_MM7 | |
| } OrcMMXRegister; | | } OrcMMXRegister; | |
| | | | |
| #define ORC_MMX_SHUF(a,b,c,d) ((((a)&3)<<6)|(((b)&3)<<4)|(((c)&3)<<2)|(((d)
&3)<<0)) | | #define ORC_MMX_SHUF(a,b,c,d) ((((a)&3)<<6)|(((b)&3)<<4)|(((c)&3)<<2)|(((d)
&3)<<0)) | |
| | | | |
| const char * orc_x86_get_regname_mmx(int i); | | const char * orc_x86_get_regname_mmx(int i); | |
| void orc_x86_emit_mov_memoffset_mmx (OrcCompiler *compiler, int size, int o
ffset, | | void orc_x86_emit_mov_memoffset_mmx (OrcCompiler *compiler, int size, int o
ffset, | |
| int reg1, int reg2, int is_aligned); | | int reg1, int reg2, int is_aligned); | |
|
| | | void orc_x86_emit_mov_memindex_mmx (OrcCompiler *compiler, int size, int of | |
| | | fset, | |
| | | int reg1, int regindex, int shift, int reg2, int is_aligned); | |
| void orc_x86_emit_mov_mmx_memoffset (OrcCompiler *compiler, int size, int r
eg1, int offset, | | void orc_x86_emit_mov_mmx_memoffset (OrcCompiler *compiler, int size, int r
eg1, int offset, | |
| int reg2, int aligned, int uncached); | | int reg2, int aligned, int uncached); | |
| void orc_x86_emit_mov_mmx_reg_reg (OrcCompiler *compiler, int reg1, int reg
2); | | void orc_x86_emit_mov_mmx_reg_reg (OrcCompiler *compiler, int reg1, int reg
2); | |
| void orc_x86_emit_mov_reg_mmx (OrcCompiler *compiler, int reg1, int reg2); | | void orc_x86_emit_mov_reg_mmx (OrcCompiler *compiler, int reg1, int reg2); | |
| void orc_x86_emit_mov_mmx_reg (OrcCompiler *compiler, int reg1, int reg2); | | void orc_x86_emit_mov_mmx_reg (OrcCompiler *compiler, int reg1, int reg2); | |
| void orc_mmx_emit_loadib (OrcCompiler *p, int reg, int value); | | void orc_mmx_emit_loadib (OrcCompiler *p, int reg, int value); | |
| void orc_mmx_emit_loadiw (OrcCompiler *p, int reg, int value); | | void orc_mmx_emit_loadiw (OrcCompiler *p, int reg, int value); | |
| void orc_mmx_emit_loadil (OrcCompiler *p, int reg, int value); | | void orc_mmx_emit_loadil (OrcCompiler *p, int reg, int value); | |
| void orc_mmx_emit_loadpb (OrcCompiler *p, int reg, int value); | | void orc_mmx_emit_loadpb (OrcCompiler *p, int reg, int value); | |
| void orc_mmx_emit_loadpw (OrcCompiler *p, int reg, int value); | | void orc_mmx_emit_loadpw (OrcCompiler *p, int reg, int value); | |
| | | | |
| skipping to change at line 66 | | skipping to change at line 69 | |
| void orc_mmx_emit_pshufw (OrcCompiler *p, int shuf, int src, int dest); | | void orc_mmx_emit_pshufw (OrcCompiler *p, int shuf, int src, int dest); | |
| void orc_mmx_emit_palignr (OrcCompiler *p, int align, int src, int dest); | | void orc_mmx_emit_palignr (OrcCompiler *p, int align, int src, int dest); | |
| void orc_mmx_emit_pinsrw_memoffset (OrcCompiler *p, int imm, int offset, | | void orc_mmx_emit_pinsrw_memoffset (OrcCompiler *p, int imm, int offset, | |
| int src, int dest); | | int src, int dest); | |
| void orc_mmx_emit_pextrw_memoffset (OrcCompiler *p, int imm, int src, | | void orc_mmx_emit_pextrw_memoffset (OrcCompiler *p, int imm, int src, | |
| int offset, int dest); | | int offset, int dest); | |
| void orc_mmx_emit_shiftimm (OrcCompiler *p, const char *insn_name, | | void orc_mmx_emit_shiftimm (OrcCompiler *p, const char *insn_name, | |
| int code, int modrm_code, int shift, int reg); | | int code, int modrm_code, int shift, int reg); | |
| unsigned int orc_mmx_get_cpu_flags (void); | | unsigned int orc_mmx_get_cpu_flags (void); | |
| | | | |
|
| void mmx_load_constant (OrcCompiler *compiler, int reg, int size, int value | | void orc_mmx_load_constant (OrcCompiler *compiler, int reg, int size, | |
| ); | | orc_uint64 value); | |
| | | | |
| /* MMX instructions */ | | /* MMX instructions */ | |
| #define orc_mmx_emit_punpcklbw(p,a,b) orc_mmx_emit_660f (p, "punpcklbw", 0
x60, a, b) | | #define orc_mmx_emit_punpcklbw(p,a,b) orc_mmx_emit_660f (p, "punpcklbw", 0
x60, a, b) | |
| #define orc_mmx_emit_punpcklwd(p,a,b) orc_mmx_emit_660f (p, "punpcklwd", 0
x61, a, b) | | #define orc_mmx_emit_punpcklwd(p,a,b) orc_mmx_emit_660f (p, "punpcklwd", 0
x61, a, b) | |
| #define orc_mmx_emit_punpckldq(p,a,b) orc_mmx_emit_660f (p, "punpckldq", 0
x62, a, b) | | #define orc_mmx_emit_punpckldq(p,a,b) orc_mmx_emit_660f (p, "punpckldq", 0
x62, a, b) | |
| #define orc_mmx_emit_packsswb(p,a,b) orc_mmx_emit_660f (p, "packsswb", 0x
63, a, b) | | #define orc_mmx_emit_packsswb(p,a,b) orc_mmx_emit_660f (p, "packsswb", 0x
63, a, b) | |
| #define orc_mmx_emit_pcmpgtb(p,a,b) orc_mmx_emit_660f (p, "pcmpgtb", 0x6
4, a, b) | | #define orc_mmx_emit_pcmpgtb(p,a,b) orc_mmx_emit_660f (p, "pcmpgtb", 0x6
4, a, b) | |
| #define orc_mmx_emit_pcmpgtw(p,a,b) orc_mmx_emit_660f (p, "pcmpgtw", 0x6
5, a, b) | | #define orc_mmx_emit_pcmpgtw(p,a,b) orc_mmx_emit_660f (p, "pcmpgtw", 0x6
5, a, b) | |
| #define orc_mmx_emit_pcmpgtd(p,a,b) orc_mmx_emit_660f (p, "pcmpgtd", 0x6
6, a, b) | | #define orc_mmx_emit_pcmpgtd(p,a,b) orc_mmx_emit_660f (p, "pcmpgtd", 0x6
6, a, b) | |
| #define orc_mmx_emit_packuswb(p,a,b) orc_mmx_emit_660f (p, "packuswb", 0x
67, a, b) | | #define orc_mmx_emit_packuswb(p,a,b) orc_mmx_emit_660f (p, "packuswb", 0x
67, a, b) | |
| | | | |
End of changes. 3 change blocks. |
| 2 lines changed or deleted | | 6 lines changed or added | |
|
| orcprogram.h | | orcprogram.h | |
| | | | |
| skipping to change at line 86 | | skipping to change at line 86 | |
| compiler->error = TRUE; \ | | compiler->error = TRUE; \ | |
| compiler->result = ORC_COMPILE_RESULT_UNKNOWN_PARSE; \ | | compiler->result = ORC_COMPILE_RESULT_UNKNOWN_PARSE; \ | |
| orc_debug_print(ORC_DEBUG_WARNING, __FILE__, ORC_FUNCTION, __LINE__, __VA
_ARGS__); \ | | orc_debug_print(ORC_DEBUG_WARNING, __FILE__, ORC_FUNCTION, __LINE__, __VA
_ARGS__); \ | |
| } while (0) | | } while (0) | |
| | | | |
| enum { | | enum { | |
| ORC_TARGET_C_C99 = (1<<0), | | ORC_TARGET_C_C99 = (1<<0), | |
| ORC_TARGET_C_BARE = (1<<1), | | ORC_TARGET_C_BARE = (1<<1), | |
| ORC_TARGET_C_NOEXEC = (1<<2), | | ORC_TARGET_C_NOEXEC = (1<<2), | |
| ORC_TARGET_C_OPCODE = (1<<3), | | ORC_TARGET_C_OPCODE = (1<<3), | |
|
| | | ORC_TARGET_CLEAN_COMPILE = (1<<29), | |
| ORC_TARGET_FAST_NAN = (1<<30), | | ORC_TARGET_FAST_NAN = (1<<30), | |
| ORC_TARGET_FAST_DENORMAL = (1<<31) | | ORC_TARGET_FAST_DENORMAL = (1<<31) | |
| }; | | }; | |
| | | | |
| enum { | | enum { | |
| ORC_TARGET_ALTIVEC_ALTIVEC = (1<<0) | | ORC_TARGET_ALTIVEC_ALTIVEC = (1<<0) | |
| }; | | }; | |
| | | | |
| enum { | | enum { | |
| ORC_TARGET_NEON_CLEAN_COMPILE = (1<<0), | | ORC_TARGET_NEON_CLEAN_COMPILE = (1<<0), | |
| | | | |
| skipping to change at line 234 | | skipping to change at line 235 | |
| int is_uncached; | | int is_uncached; | |
| | | | |
| orc_union64 value; | | orc_union64 value; | |
| | | | |
| int ptr_register; | | int ptr_register; | |
| int ptr_offset; | | int ptr_offset; | |
| int mask_alloc; | | int mask_alloc; | |
| int aligned_data; | | int aligned_data; | |
| int param_type; | | int param_type; | |
| int load_dest; | | int load_dest; | |
|
| | | int update_type; | |
| | | int need_offset_reg; | |
| }; | | }; | |
| | | | |
| /** | | /** | |
| * OrcRule: | | * OrcRule: | |
| * | | * | |
| * The OrcRule structure has no public members | | * The OrcRule structure has no public members | |
| */ | | */ | |
| struct _OrcRule { | | struct _OrcRule { | |
| /*< private >*/ | | /*< private >*/ | |
| OrcRuleEmitFunc emit; | | OrcRuleEmitFunc emit; | |
| | | | |
| skipping to change at line 326 | | skipping to change at line 329 | |
| * | | * | |
| * The OrcConstant structure has no public members | | * The OrcConstant structure has no public members | |
| */ | | */ | |
| struct _OrcConstant { | | struct _OrcConstant { | |
| /*< private >*/ | | /*< private >*/ | |
| int type; | | int type; | |
| int alloc_reg; | | int alloc_reg; | |
| unsigned int value; | | unsigned int value; | |
| unsigned int full_value[4]; | | unsigned int full_value[4]; | |
| int use_count; | | int use_count; | |
|
| | | int is_long; | |
| }; | | }; | |
| | | | |
| /** | | /** | |
| * OrcFixup: | | * OrcFixup: | |
| * | | * | |
| * The OrcFixup structure has no public members | | * The OrcFixup structure has no public members | |
| */ | | */ | |
| struct _OrcFixup { | | struct _OrcFixup { | |
| /*< private >*/ | | /*< private >*/ | |
| unsigned char *ptr; | | unsigned char *ptr; | |
| | | | |
| skipping to change at line 478 | | skipping to change at line 482 | |
| int allow_gp_on_stack; | | int allow_gp_on_stack; | |
| int loop_counter; | | int loop_counter; | |
| int size_region; | | int size_region; | |
| int has_iterator_opcode; | | int has_iterator_opcode; | |
| | | | |
| int offset; | | int offset; | |
| int min_temp_reg; | | int min_temp_reg; | |
| int max_used_temp_reg; | | int max_used_temp_reg; | |
| | | | |
| int insn_shift; /* used when emitting rules */ | | int insn_shift; /* used when emitting rules */ | |
|
| | | int max_var_size; /* size of largest var */ | |
| }; | | }; | |
| | | | |
| #define ORC_SRC_ARG(p,i,n) ((p)->vars[(i)->src_args[(n)]].alloc) | | #define ORC_SRC_ARG(p,i,n) ((p)->vars[(i)->src_args[(n)]].alloc) | |
| #define ORC_DEST_ARG(p,i,n) ((p)->vars[(i)->dest_args[(n)]].alloc) | | #define ORC_DEST_ARG(p,i,n) ((p)->vars[(i)->dest_args[(n)]].alloc) | |
| #define ORC_SRC_TYPE(p,i,n) ((p)->vars[(i)->src_args[(n)]].vartype) | | #define ORC_SRC_TYPE(p,i,n) ((p)->vars[(i)->src_args[(n)]].vartype) | |
| #define ORC_DEST_TYPE(p,i,n) ((p)->vars[(i)->dest_args[(n)]].vartype) | | #define ORC_DEST_TYPE(p,i,n) ((p)->vars[(i)->dest_args[(n)]].vartype) | |
| #define ORC_SRC_VAL(p,insn,n) ((p)->vars[(insn)->src_args[(n)]].value.i) | | #define ORC_SRC_VAL(p,insn,n) ((p)->vars[(insn)->src_args[(n)]].value.i) | |
| #define ORC_DEST_VAL(p,insn,n) ((p)->vars[(insn)->dest_args[(n)]].value.i) | | #define ORC_DEST_VAL(p,insn,n) ((p)->vars[(insn)->dest_args[(n)]].value.i) | |
| | | | |
| /** | | /** | |
| | | | |
| skipping to change at line 604 | | skipping to change at line 609 | |
| void (*compiler_init)(OrcCompiler *compiler); | | void (*compiler_init)(OrcCompiler *compiler); | |
| void (*compile)(OrcCompiler *compiler); | | void (*compile)(OrcCompiler *compiler); | |
| | | | |
| OrcRuleSet rule_sets[ORC_N_RULE_SETS]; | | OrcRuleSet rule_sets[ORC_N_RULE_SETS]; | |
| int n_rule_sets; | | int n_rule_sets; | |
| | | | |
| const char * (*get_asm_preamble)(void); | | const char * (*get_asm_preamble)(void); | |
| void (*load_constant)(OrcCompiler *compiler, int reg, int size, int value
); | | void (*load_constant)(OrcCompiler *compiler, int reg, int size, int value
); | |
| const char * (*get_flag_name)(int shift); | | const char * (*get_flag_name)(int shift); | |
| void (*flush_cache) (OrcCode *code); | | void (*flush_cache) (OrcCode *code); | |
|
| | | void (*load_constant_long)(OrcCompiler *compiler, int reg, | |
| | | OrcConstant *constant); | |
| | | | |
|
| void *_unused[6]; | | void *_unused[5]; | |
| }; | | }; | |
| | | | |
| void orc_init (void); | | void orc_init (void); | |
| | | | |
| OrcProgram * orc_program_new (void); | | OrcProgram * orc_program_new (void); | |
| OrcProgram * orc_program_new_ds (int size1, int size2); | | OrcProgram * orc_program_new_ds (int size1, int size2); | |
| OrcProgram * orc_program_new_dss (int size1, int size2, int size3); | | OrcProgram * orc_program_new_dss (int size1, int size2, int size3); | |
| OrcProgram * orc_program_new_as (int size1, int size2); | | OrcProgram * orc_program_new_as (int size1, int size2); | |
| OrcProgram * orc_program_new_ass (int size1, int size2, int size3); | | OrcProgram * orc_program_new_ass (int size1, int size2, int size3); | |
| OrcStaticOpcode * orc_opcode_find_by_name (const char *name); | | OrcStaticOpcode * orc_opcode_find_by_name (const char *name); | |
| | | | |
| skipping to change at line 714 | | skipping to change at line 721 | |
| OrcTarget * orc_target_get_default (void); | | OrcTarget * orc_target_get_default (void); | |
| unsigned int orc_target_get_default_flags (OrcTarget *target); | | unsigned int orc_target_get_default_flags (OrcTarget *target); | |
| const char * orc_target_get_name (OrcTarget *target); | | const char * orc_target_get_name (OrcTarget *target); | |
| const char * orc_target_get_flag_name (OrcTarget *target, int shift); | | const char * orc_target_get_flag_name (OrcTarget *target, int shift); | |
| | | | |
| int orc_program_allocate_register (OrcProgram *program, int is_data); | | int orc_program_allocate_register (OrcProgram *program, int is_data); | |
| | | | |
| void orc_code_allocate_codemem (OrcCode *code, int size); | | void orc_code_allocate_codemem (OrcCode *code, int size); | |
| int orc_compiler_label_new (OrcCompiler *compiler); | | int orc_compiler_label_new (OrcCompiler *compiler); | |
| int orc_compiler_get_constant (OrcCompiler *compiler, int size, int value); | | int orc_compiler_get_constant (OrcCompiler *compiler, int size, int value); | |
|
| | | int orc_compiler_get_constant_long (OrcCompiler *compiler, orc_uint32 a, | |
| | | orc_uint32 b, orc_uint32 c, orc_uint32 d); | |
| | | int orc_compiler_try_get_constant_long (OrcCompiler *compiler, orc_uint32 a | |
| | | , | |
| | | orc_uint32 b, orc_uint32 c, orc_uint32 d); | |
| int orc_compiler_get_temp_constant (OrcCompiler *compiler, int size, int va
lue); | | int orc_compiler_get_temp_constant (OrcCompiler *compiler, int size, int va
lue); | |
| int orc_compiler_get_temp_reg (OrcCompiler *compiler); | | int orc_compiler_get_temp_reg (OrcCompiler *compiler); | |
| int orc_compiler_get_constant_reg (OrcCompiler *compiler); | | int orc_compiler_get_constant_reg (OrcCompiler *compiler); | |
| | | | |
| void orc_program_reset (OrcProgram *program); | | void orc_program_reset (OrcProgram *program); | |
| OrcCode *orc_program_take_code (OrcProgram *program); | | OrcCode *orc_program_take_code (OrcProgram *program); | |
| | | | |
| const char *orc_program_get_asm_code (OrcProgram *program); | | const char *orc_program_get_asm_code (OrcProgram *program); | |
| const char *orc_target_get_asm_preamble (const char *target); | | const char *orc_target_get_asm_preamble (const char *target); | |
| const char * orc_target_get_preamble (OrcTarget *target); | | const char * orc_target_get_preamble (OrcTarget *target); | |
| const char * orc_target_c_get_typedefs (void); | | const char * orc_target_c_get_typedefs (void); | |
| | | | |
| void orc_compiler_append_code (OrcCompiler *p, const char *fmt, ...) | | void orc_compiler_append_code (OrcCompiler *p, const char *fmt, ...) | |
| ORC_GNU_PRINTF(2,3); | | ORC_GNU_PRINTF(2,3); | |
| | | | |
| void orc_target_register (OrcTarget *target); | | void orc_target_register (OrcTarget *target); | |
| OrcTarget *orc_target_get_by_name (const char *target_name); | | OrcTarget *orc_target_get_by_name (const char *target_name); | |
|
| int orc_program_get_max_var_size (OrcProgram *program); | | | |
| int orc_program_get_max_array_size (OrcProgram *program); | | int orc_program_get_max_array_size (OrcProgram *program); | |
| int orc_program_get_max_accumulator_size (OrcProgram *program); | | int orc_program_get_max_accumulator_size (OrcProgram *program); | |
| | | | |
| void orc_get_data_cache_sizes (int *level1, int *level2, int *level3); | | void orc_get_data_cache_sizes (int *level1, int *level2, int *level3); | |
| void orc_get_cpu_family_model_stepping (int *family, int *model, int *stepp
ing); | | void orc_get_cpu_family_model_stepping (int *family, int *model, int *stepp
ing); | |
| const char * orc_get_cpu_name (void); | | const char * orc_get_cpu_name (void); | |
| | | | |
| OrcCode * orc_code_new (void); | | OrcCode * orc_code_new (void); | |
| void orc_code_free (OrcCode *code); | | void orc_code_free (OrcCode *code); | |
| | | | |
| | | | |
| skipping to change at line 755 | | skipping to change at line 765 | |
| | | | |
| extern int _orc_data_cache_size_level1; | | extern int _orc_data_cache_size_level1; | |
| extern int _orc_data_cache_size_level2; | | extern int _orc_data_cache_size_level2; | |
| extern int _orc_data_cache_size_level3; | | extern int _orc_data_cache_size_level3; | |
| extern int _orc_cpu_family; | | extern int _orc_cpu_family; | |
| extern int _orc_cpu_model; | | extern int _orc_cpu_model; | |
| extern int _orc_cpu_stepping; | | extern int _orc_cpu_stepping; | |
| extern const char *_orc_cpu_name; | | extern const char *_orc_cpu_name; | |
| | | | |
| extern int _orc_compiler_flag_backup; | | extern int _orc_compiler_flag_backup; | |
|
| | | extern int _orc_compiler_flag_emulate; | |
| extern int _orc_compiler_flag_debug; | | extern int _orc_compiler_flag_debug; | |
| | | | |
| void orc_code_chunk_free (OrcCodeChunk *chunk); | | void orc_code_chunk_free (OrcCodeChunk *chunk); | |
| | | | |
| #endif | | #endif | |
| | | | |
| #endif | | #endif | |
| | | | |
End of changes. 9 change blocks. |
| 2 lines changed or deleted | | 14 lines changed or added | |
|
| orcsse.h | | orcsse.h | |
| | | | |
| skipping to change at line 44 | | skipping to change at line 44 | |
| X86_XMM13, | | X86_XMM13, | |
| X86_XMM14, | | X86_XMM14, | |
| X86_XMM15 | | X86_XMM15 | |
| }OrcSSERegister; | | }OrcSSERegister; | |
| | | | |
| #define ORC_SSE_SHUF(a,b,c,d) ((((a)&3)<<6)|(((b)&3)<<4)|(((c)&3)<<2)|(((d)
&3)<<0)) | | #define ORC_SSE_SHUF(a,b,c,d) ((((a)&3)<<6)|(((b)&3)<<4)|(((c)&3)<<2)|(((d)
&3)<<0)) | |
| | | | |
| const char * orc_x86_get_regname_sse(int i); | | const char * orc_x86_get_regname_sse(int i); | |
| void orc_x86_emit_mov_memoffset_sse (OrcCompiler *compiler, int size, int o
ffset, | | void orc_x86_emit_mov_memoffset_sse (OrcCompiler *compiler, int size, int o
ffset, | |
| int reg1, int reg2, int is_aligned); | | int reg1, int reg2, int is_aligned); | |
|
| | | void orc_x86_emit_movhps_memoffset_sse (OrcCompiler *compiler, int offset, | |
| | | int reg1, int reg2); | |
| | | void orc_x86_emit_mov_memindex_sse (OrcCompiler *compiler, int size, int of | |
| | | fset, | |
| | | int reg1, int regindex, int shift, int reg2, int is_aligned); | |
| void orc_x86_emit_mov_sse_memoffset (OrcCompiler *compiler, int size, int r
eg1, int offset, | | void orc_x86_emit_mov_sse_memoffset (OrcCompiler *compiler, int size, int r
eg1, int offset, | |
| int reg2, int aligned, int uncached); | | int reg2, int aligned, int uncached); | |
| void orc_x86_emit_mov_sse_reg_reg (OrcCompiler *compiler, int reg1, int reg
2); | | void orc_x86_emit_mov_sse_reg_reg (OrcCompiler *compiler, int reg1, int reg
2); | |
| void orc_x86_emit_mov_reg_sse (OrcCompiler *compiler, int reg1, int reg2); | | void orc_x86_emit_mov_reg_sse (OrcCompiler *compiler, int reg1, int reg2); | |
| void orc_x86_emit_mov_sse_reg (OrcCompiler *compiler, int reg1, int reg2); | | void orc_x86_emit_mov_sse_reg (OrcCompiler *compiler, int reg1, int reg2); | |
| void orc_sse_emit_loadib (OrcCompiler *p, int reg, int value); | | void orc_sse_emit_loadib (OrcCompiler *p, int reg, int value); | |
| void orc_sse_emit_loadiw (OrcCompiler *p, int reg, int value); | | void orc_sse_emit_loadiw (OrcCompiler *p, int reg, int value); | |
| void orc_sse_emit_loadil (OrcCompiler *p, int reg, int value); | | void orc_sse_emit_loadil (OrcCompiler *p, int reg, int value); | |
| void orc_sse_emit_loadpb (OrcCompiler *p, int reg, int value); | | void orc_sse_emit_loadpb (OrcCompiler *p, int reg, int value); | |
| void orc_sse_emit_loadpw (OrcCompiler *p, int reg, int value); | | void orc_sse_emit_loadpw (OrcCompiler *p, int reg, int value); | |
| | | | |
| skipping to change at line 77 | | skipping to change at line 81 | |
| void orc_sse_emit_pshufhw (OrcCompiler *p, int shuf, int src, int dest); | | void orc_sse_emit_pshufhw (OrcCompiler *p, int shuf, int src, int dest); | |
| void orc_sse_emit_palignr (OrcCompiler *p, int align, int src, int dest); | | void orc_sse_emit_palignr (OrcCompiler *p, int align, int src, int dest); | |
| void orc_sse_emit_pinsrw_memoffset (OrcCompiler *p, int imm, int offset, in
t src, int dest); | | void orc_sse_emit_pinsrw_memoffset (OrcCompiler *p, int imm, int offset, in
t src, int dest); | |
| void orc_sse_emit_pextrw_memoffset (OrcCompiler *p, int imm, int src, int o
ffset, int dest); | | void orc_sse_emit_pextrw_memoffset (OrcCompiler *p, int imm, int src, int o
ffset, int dest); | |
| void orc_sse_emit_shiftimm (OrcCompiler *p, const char *insn_name, | | void orc_sse_emit_shiftimm (OrcCompiler *p, const char *insn_name, | |
| int code, int modrm_code, int shift, int reg); | | int code, int modrm_code, int shift, int reg); | |
| | | | |
| void orc_sse_set_mxcsr (OrcCompiler *compiler); | | void orc_sse_set_mxcsr (OrcCompiler *compiler); | |
| void orc_sse_restore_mxcsr (OrcCompiler *compiler); | | void orc_sse_restore_mxcsr (OrcCompiler *compiler); | |
| | | | |
|
| void sse_load_constant (OrcCompiler *compiler, int reg, int size, int value | | void orc_sse_load_constant (OrcCompiler *compiler, int reg, int size, | |
| ); | | orc_uint64 value); | |
| | | | |
| unsigned int orc_sse_get_cpu_flags (void); | | unsigned int orc_sse_get_cpu_flags (void); | |
| | | | |
| /* SSE instructions */ | | /* SSE instructions */ | |
| | | | |
| /* SSE2 instructions */ | | /* SSE2 instructions */ | |
| #define orc_sse_emit_punpcklbw(p,a,b) orc_sse_emit_660f (p, "punpcklbw", 0
x60, a, b) | | #define orc_sse_emit_punpcklbw(p,a,b) orc_sse_emit_660f (p, "punpcklbw", 0
x60, a, b) | |
| #define orc_sse_emit_punpcklwd(p,a,b) orc_sse_emit_660f (p, "punpcklwd", 0
x61, a, b) | | #define orc_sse_emit_punpcklwd(p,a,b) orc_sse_emit_660f (p, "punpcklwd", 0
x61, a, b) | |
| #define orc_sse_emit_punpckldq(p,a,b) orc_sse_emit_660f (p, "punpckldq", 0
x62, a, b) | | #define orc_sse_emit_punpckldq(p,a,b) orc_sse_emit_660f (p, "punpckldq", 0
x62, a, b) | |
| #define orc_sse_emit_packsswb(p,a,b) orc_sse_emit_660f (p, "packsswb", 0x
63, a, b) | | #define orc_sse_emit_packsswb(p,a,b) orc_sse_emit_660f (p, "packsswb", 0x
63, a, b) | |
| | | | |
End of changes. 2 change blocks. |
| 2 lines changed or deleted | | 7 lines changed or added | |
|
| orcutils.h | | orcutils.h | |
| | | | |
| skipping to change at line 43 | | skipping to change at line 43 | |
| #if defined(_x_STDC__) && __STDC__ && __STDC_VERSION__ >= 199901L | | #if defined(_x_STDC__) && __STDC__ && __STDC_VERSION__ >= 199901L | |
| #include <stdint.h> | | #include <stdint.h> | |
| typedef int8_t orc_int8; | | typedef int8_t orc_int8; | |
| typedef int16_t orc_int16; | | typedef int16_t orc_int16; | |
| typedef int32_t orc_int32; | | typedef int32_t orc_int32; | |
| typedef int64_t orc_int64; | | typedef int64_t orc_int64; | |
| typedef uint8_t orc_uint8; | | typedef uint8_t orc_uint8; | |
| typedef uint16_t orc_uint16; | | typedef uint16_t orc_uint16; | |
| typedef uint32_t orc_uint32; | | typedef uint32_t orc_uint32; | |
| typedef uint64_t orc_uint64; | | typedef uint64_t orc_uint64; | |
|
| | | #define ORC_UINT64_C(x) UINT64_C(x) | |
| #elif defined(_MSC_VER) | | #elif defined(_MSC_VER) | |
| typedef signed __int8 orc_int8; | | typedef signed __int8 orc_int8; | |
| typedef signed __int16 orc_int16; | | typedef signed __int16 orc_int16; | |
| typedef signed __int32 orc_int32; | | typedef signed __int32 orc_int32; | |
| typedef signed __int64 orc_int64; | | typedef signed __int64 orc_int64; | |
| typedef unsigned __int8 orc_uint8; | | typedef unsigned __int8 orc_uint8; | |
| typedef unsigned __int16 orc_uint16; | | typedef unsigned __int16 orc_uint16; | |
| typedef unsigned __int32 orc_uint32; | | typedef unsigned __int32 orc_uint32; | |
| typedef unsigned __int64 orc_uint64; | | typedef unsigned __int64 orc_uint64; | |
|
| | | #define ORC_UINT64_C(x) (x##Ui64) | |
| #else | | #else | |
| #include <limits.h> | | #include <limits.h> | |
| typedef signed char orc_int8; | | typedef signed char orc_int8; | |
| typedef short orc_int16; | | typedef short orc_int16; | |
| typedef int orc_int32; | | typedef int orc_int32; | |
| typedef unsigned char orc_uint8; | | typedef unsigned char orc_uint8; | |
| typedef unsigned short orc_uint16; | | typedef unsigned short orc_uint16; | |
| typedef unsigned int orc_uint32; | | typedef unsigned int orc_uint32; | |
| #if INT_MAX == LONG_MAX | | #if INT_MAX == LONG_MAX | |
| typedef long long orc_int64; | | typedef long long orc_int64; | |
| typedef unsigned long long orc_uint64; | | typedef unsigned long long orc_uint64; | |
|
| | | #define ORC_UINT64_C(x) (x##ULL) | |
| #else | | #else | |
| typedef long orc_int64; | | typedef long orc_int64; | |
| typedef unsigned long orc_uint64; | | typedef unsigned long orc_uint64; | |
|
| | | #define ORC_UINT64_C(x) (x##UL) | |
| #endif | | #endif | |
| #endif | | #endif | |
| typedef union { orc_int16 i; orc_int8 x2[2]; } orc_union16; | | typedef union { orc_int16 i; orc_int8 x2[2]; } orc_union16; | |
| typedef union { orc_int32 i; float f; orc_int16 x2[2]; orc_int8 x4[4]; } or
c_union32; | | typedef union { orc_int32 i; float f; orc_int16 x2[2]; orc_int8 x4[4]; } or
c_union32; | |
|
| typedef union { orc_int64 i; double f; orc_int32 x2[2]; orc_int16 x4[4]; }
orc_union64; | | typedef union { orc_int64 i; double f; orc_int32 x2[2]; float x2f[2]; orc_i
nt16 x4[4]; } orc_union64; | |
| #endif | | #endif | |
| | | | |
| #ifndef TRUE | | #ifndef TRUE | |
| #define TRUE 1 | | #define TRUE 1 | |
| #endif | | #endif | |
| #ifndef FALSE | | #ifndef FALSE | |
| #define FALSE 0 | | #define FALSE 0 | |
| #endif | | #endif | |
| | | | |
| typedef unsigned int orc_bool; | | typedef unsigned int orc_bool; | |
| | | | |
End of changes. 5 change blocks. |
| 1 lines changed or deleted | | 5 lines changed or added | |
|
| orcx86.h | | orcx86.h | |
| | | | |
| skipping to change at line 64 | | skipping to change at line 64 | |
| void orc_x86_emit_mov_reg_reg (OrcCompiler *compiler, int size, int reg1, i
nt reg2); | | void orc_x86_emit_mov_reg_reg (OrcCompiler *compiler, int size, int reg1, i
nt reg2); | |
| void orc_x86_emit_test_reg_reg (OrcCompiler *compiler, int size, int reg1,
int reg2); | | void orc_x86_emit_test_reg_reg (OrcCompiler *compiler, int size, int reg1,
int reg2); | |
| void orc_x86_emit_sar_imm_reg (OrcCompiler *compiler, int size, int value,
int reg); | | void orc_x86_emit_sar_imm_reg (OrcCompiler *compiler, int size, int value,
int reg); | |
| void orc_x86_emit_dec_memoffset (OrcCompiler *compiler, int size, int offse
t, int reg); | | void orc_x86_emit_dec_memoffset (OrcCompiler *compiler, int size, int offse
t, int reg); | |
| void orc_x86_emit_add_imm_memoffset (OrcCompiler *compiler, int size, int v
alue, int offset, int reg); | | void orc_x86_emit_add_imm_memoffset (OrcCompiler *compiler, int size, int v
alue, int offset, int reg); | |
| void orc_x86_emit_add_reg_memoffset (OrcCompiler *compiler, int size, int r
eg1, int offset, int reg); | | void orc_x86_emit_add_reg_memoffset (OrcCompiler *compiler, int size, int r
eg1, int offset, int reg); | |
| void orc_x86_emit_and_imm_memoffset (OrcCompiler *compiler, int size, int v
alue, int offset, int reg); | | void orc_x86_emit_and_imm_memoffset (OrcCompiler *compiler, int size, int v
alue, int offset, int reg); | |
| void orc_x86_emit_add_imm_reg (OrcCompiler *compiler, int size, int value,
int reg, orc_bool record); | | void orc_x86_emit_add_imm_reg (OrcCompiler *compiler, int size, int value,
int reg, orc_bool record); | |
| void orc_x86_emit_and_imm_reg (OrcCompiler *compiler, int size, int value,
int reg); | | void orc_x86_emit_and_imm_reg (OrcCompiler *compiler, int size, int value,
int reg); | |
| void orc_x86_emit_or_imm_reg (OrcCompiler *compiler, int size, int value, i
nt reg); | | void orc_x86_emit_or_imm_reg (OrcCompiler *compiler, int size, int value, i
nt reg); | |
|
| | | void orc_x86_emit_add_reg_reg_shift (OrcCompiler *compiler, int size, int r
eg1, int reg2, int shift); | |
| void orc_x86_emit_add_reg_reg (OrcCompiler *compiler, int size, int reg1, i
nt reg2); | | void orc_x86_emit_add_reg_reg (OrcCompiler *compiler, int size, int reg1, i
nt reg2); | |
| void orc_x86_emit_sub_reg_reg (OrcCompiler *compiler, int size, int reg1, i
nt reg2); | | void orc_x86_emit_sub_reg_reg (OrcCompiler *compiler, int size, int reg1, i
nt reg2); | |
| void orc_x86_emit_imul_memoffset_reg (OrcCompiler *compiler, int size, | | void orc_x86_emit_imul_memoffset_reg (OrcCompiler *compiler, int size, | |
| int offset, int reg, int destreg); | | int offset, int reg, int destreg); | |
|
| | | void orc_x86_emit_add_memoffset_reg (OrcCompiler *compiler, int size, | |
| | | int offset, int reg, int destreg); | |
| void orc_x86_emit_sub_memoffset_reg (OrcCompiler *compiler, int size, | | void orc_x86_emit_sub_memoffset_reg (OrcCompiler *compiler, int size, | |
| int offset, int reg, int destreg); | | int offset, int reg, int destreg); | |
| void orc_x86_emit_cmp_reg_memoffset (OrcCompiler *compiler, int size, int r
eg1, | | void orc_x86_emit_cmp_reg_memoffset (OrcCompiler *compiler, int size, int r
eg1, | |
| int offset, int reg); | | int offset, int reg); | |
| void orc_x86_emit_cmp_imm_memoffset (OrcCompiler *compiler, int size, int v
alue, | | void orc_x86_emit_cmp_imm_memoffset (OrcCompiler *compiler, int size, int v
alue, | |
| int offset, int reg); | | int offset, int reg); | |
| void orc_x86_emit_cmp_imm_reg (OrcCompiler *compiler, int size, int value,
int reg); | | void orc_x86_emit_cmp_imm_reg (OrcCompiler *compiler, int size, int value,
int reg); | |
| void orc_x86_emit_test_imm_memoffset (OrcCompiler *compiler, int size, int
value, | | void orc_x86_emit_test_imm_memoffset (OrcCompiler *compiler, int size, int
value, | |
| int offset, int reg); | | int offset, int reg); | |
| void orc_x86_emit_emms (OrcCompiler *compiler); | | void orc_x86_emit_emms (OrcCompiler *compiler); | |
| | | | |
| skipping to change at line 94 | | skipping to change at line 97 | |
| void orc_x86_emit_jne (OrcCompiler *compiler, int label); | | void orc_x86_emit_jne (OrcCompiler *compiler, int label); | |
| void orc_x86_emit_jmp (OrcCompiler *compiler, int label); | | void orc_x86_emit_jmp (OrcCompiler *compiler, int label); | |
| void orc_x86_emit_label (OrcCompiler *compiler, int label); | | void orc_x86_emit_label (OrcCompiler *compiler, int label); | |
| void orc_x86_emit_align (OrcCompiler *compiler); | | void orc_x86_emit_align (OrcCompiler *compiler); | |
| void orc_x86_emit_prologue (OrcCompiler *compiler); | | void orc_x86_emit_prologue (OrcCompiler *compiler); | |
| void orc_x86_emit_epilogue (OrcCompiler *compiler); | | void orc_x86_emit_epilogue (OrcCompiler *compiler); | |
| | | | |
| void orc_x86_emit_rex (OrcCompiler *compiler, int size, int reg1, int reg2,
int reg3); | | void orc_x86_emit_rex (OrcCompiler *compiler, int size, int reg1, int reg2,
int reg3); | |
| void orc_x86_emit_modrm_memoffset (OrcCompiler *compiler, int reg1, int off
set, int reg2); | | void orc_x86_emit_modrm_memoffset (OrcCompiler *compiler, int reg1, int off
set, int reg2); | |
| void orc_x86_emit_modrm_reg (OrcCompiler *compiler, int reg1, int reg2); | | void orc_x86_emit_modrm_reg (OrcCompiler *compiler, int reg1, int reg2); | |
|
| | | void orc_x86_emit_modrm_memindex (OrcCompiler *compiler, int reg1, int offs | |
| | | et, | |
| | | int reg2, int regindex, int shift); | |
| | | | |
| void orc_x86_do_fixups (OrcCompiler *compiler); | | void orc_x86_do_fixups (OrcCompiler *compiler); | |
| | | | |
| int orc_x86_assemble_copy_check (OrcCompiler *compiler); | | int orc_x86_assemble_copy_check (OrcCompiler *compiler); | |
| void orc_x86_assemble_copy (OrcCompiler *compiler); | | void orc_x86_assemble_copy (OrcCompiler *compiler); | |
| | | | |
| #endif | | #endif | |
| | | | |
End of changes. 3 change blocks. |
| 0 lines changed or deleted | | 6 lines changed or added | |
|