diff options
Diffstat (limited to 'Zend/zend_vm_opcodes.c')
| -rw-r--r-- | Zend/zend_vm_opcodes.c | 171 |
1 files changed, 90 insertions, 81 deletions
diff --git a/Zend/zend_vm_opcodes.c b/Zend/zend_vm_opcodes.c index 61ce8ce072..f37b769da3 100644 --- a/Zend/zend_vm_opcodes.c +++ b/Zend/zend_vm_opcodes.c @@ -20,8 +20,9 @@ #include <stdio.h> #include <zend.h> +#include <zend_vm_opcodes.h> -static const char *zend_vm_opcodes_names[198] = { +static const char *zend_vm_opcodes_names[199] = { "ZEND_NOP", "ZEND_ADD", "ZEND_SUB", @@ -120,9 +121,9 @@ static const char *zend_vm_opcodes_names[198] = { "ZEND_FETCH_UNSET", "ZEND_FETCH_DIM_UNSET", "ZEND_FETCH_OBJ_UNSET", - "ZEND_FETCH_LIST", + "ZEND_FETCH_LIST_R", "ZEND_FETCH_CONSTANT", - NULL, + "ZEND_CHECK_FUNC_ARG", "ZEND_EXT_STMT", "ZEND_EXT_FCALL_BEGIN", "ZEND_EXT_FCALL_END", @@ -207,7 +208,7 @@ static const char *zend_vm_opcodes_names[198] = { "ZEND_BIND_LEXICAL", "ZEND_BIND_STATIC", "ZEND_FETCH_THIS", - NULL, + "ZEND_SEND_FUNC_ARG", "ZEND_ISSET_ISEMPTY_THIS", "ZEND_SWITCH_LONG", "ZEND_SWITCH_STRING", @@ -220,43 +221,44 @@ static const char *zend_vm_opcodes_names[198] = { "ZEND_FUNC_GET_ARGS", "ZEND_UNSET_CV", "ZEND_ISSET_ISEMPTY_CV", + "ZEND_FETCH_LIST_W", }; -static uint32_t zend_vm_opcodes_flags[198] = { +static uint32_t zend_vm_opcodes_flags[199] = { 0x00000000, 0x00000707, 0x00000707, + 0x80000707, 0x00000707, 0x00000707, 0x00000707, 0x00000707, - 0x00000707, - 0x00000707, - 0x00000707, - 0x00000707, - 0x00000707, + 0x40000707, + 0x80000707, + 0x80000707, + 0x80000707, 0x00000007, 0x00000007, - 0x00000707, - 0x00000303, - 0x00000303, - 0x00000707, - 0x00000707, + 0x80000707, + 0x80000303, + 0x80000303, + 0x80000707, + 0x80000707, 0x00000707, 0x00000707, 0x07000003, 0x00000003, - 0x04006751, - 0x04006751, - 0x04006751, - 0x04006751, - 0x04006751, - 0x04006751, - 0x04006751, - 0x04006751, - 0x04006751, - 0x04006751, - 0x04006751, + 0x04046751, + 0x04046751, + 0x04046751, + 0x04046751, + 0x04046751, + 0x04046751, + 0x04046751, + 0x04046751, + 0x04046751, + 0x04046751, + 0x04046751, 0x00000001, 0x00000001, 0x00000001, @@ -271,7 +273,7 @@ static uint32_t zend_vm_opcodes_flags[198] = { 0x03002007, 0x00002007, 0x00002007, - 0x00000707, + 0x00000705, 0x00000101, 0x00001001, 0x00000101, @@ -282,61 +284,61 @@ static uint32_t zend_vm_opcodes_flags[198] = { 0x01000701, 0x00000000, 0x00000001, - 0x01000300, + 0x01040300, 0x00000000, - 0x01000310, + 0x01040310, 0x00000003, - 0x00000010, - 0x00000310, + 0x0000a110, + 0x00040310, 0x00001007, 0x00001001, 0x00001001, - 0x01000073, - 0x01000300, - 0x00004005, + 0x0100a173, + 0x01040300, + 0x00000005, 0x00186703, 0x00106703, 0x08000007, 0x00010107, 0x00000701, - 0x00000751, + 0x00040751, 0x00002003, 0x03000001, 0x00000007, 0x00010107, 0x00000707, - 0x00000753, + 0x00040757, 0x00010107, 0x00006701, - 0x00000751, + 0x00040751, 0x00010107, 0x00006701, - 0x00000751, + 0x00040751, 0x00010107, 0x00000707, - 0x00000757, - 0x00050107, - 0x01006703, - 0x01000753, + 0x00040757, + 0x00010107, + 0x00006703, + 0x00040753, 0x00010107, 0x00000701, - 0x00000751, - 0x00000707, - 0x06000301, - 0x00000000, + 0x00040751, + 0x0000070b, + 0x00040391, + 0x00001001, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x01000000, 0x00001001, - 0x03000103, + 0x02042003, 0x00000003, - 0x05000700, + 0x00040771, 0x00000057, 0x0b000003, - 0x01000757, - 0x01008773, + 0x01040757, + 0x01048773, 0x00030107, 0x00020707, 0x00001003, @@ -345,73 +347,73 @@ static uint32_t zend_vm_opcodes_flags[198] = { 0x01000000, 0x00001003, 0x00000007, - 0x00000003, - 0x07000003, - 0x00000103, + 0x00040003, + 0x09000003, + 0x0000a103, 0x00002003, 0x03000001, - 0x00004005, + 0x00000005, 0x01000700, 0x00000000, 0x00000000, 0x00000000, - 0x00000751, - 0x00000751, - 0x00000751, - 0x00000751, - 0x00000751, + 0x00040751, + 0x00040751, + 0x00040751, + 0x00040751, + 0x00040751, 0x00000000, - 0x00007305, + 0x00047305, 0x00000000, 0x00000100, 0x00000000, 0x00000003, 0x00000303, - 0x00000300, + 0x00040300, 0x00000100, 0x00000000, 0x00006701, - 0x00020757, + 0x00060757, 0x00000000, 0x00000000, 0x00002000, 0x00002003, 0x00000103, - 0x00000000, + 0x00040000, 0x00000000, 0x00000101, - 0x05000000, + 0x00000071, 0x00000000, 0x00000000, 0x0b000303, 0x00000003, 0x00000020, 0x00003000, - 0x00000010, + 0x0000a110, 0x00000000, 0x00000707, - 0x04006751, - 0x00000301, + 0x04046751, + 0x00040301, 0x00002003, 0x00000707, 0x03000000, 0x03000100, - 0x00007307, - 0x00007307, - 0x00007307, - 0x00007307, - 0x01007307, - 0x00007307, - 0x00007307, - 0x00027307, - 0x00000373, + 0x00047307, + 0x00047307, + 0x00047307, + 0x00047307, + 0x00047307, + 0x00047307, + 0x00047307, + 0x00067307, + 0x00040373, 0x00100101, 0x00100301, 0x00000101, - 0x00000000, + 0x00001001, 0x00000101, - 0x03000307, - 0x03000307, + 0x0300030b, + 0x0300030b, 0x01000303, 0x00000103, 0x00000103, @@ -421,11 +423,18 @@ static uint32_t zend_vm_opcodes_flags[198] = { 0x00000103, 0x00000101, 0x00020101, + 0x00000701, }; -ZEND_API const char* zend_get_opcode_name(zend_uchar opcode) { +ZEND_API const char* ZEND_FASTCALL zend_get_opcode_name(zend_uchar opcode) { + if (UNEXPECTED(opcode > ZEND_VM_LAST_OPCODE)) { + return NULL; + } return zend_vm_opcodes_names[opcode]; } -ZEND_API uint32_t zend_get_opcode_flags(zend_uchar opcode) { +ZEND_API uint32_t ZEND_FASTCALL zend_get_opcode_flags(zend_uchar opcode) { + if (UNEXPECTED(opcode > ZEND_VM_LAST_OPCODE)) { + opcode = ZEND_NOP; + } return zend_vm_opcodes_flags[opcode]; } |
