📄 arm2x86_movl.c
字号:
/* This program is free software; you can redistribute it and/or modifyit under the terms of the GNU General Public License as published bythe Free Software Foundation; either version 2, or (at your option)any later version.This program is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY; without even the implied warranty ofMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See theGNU General Public License for more details.You should have received a copy of the GNU General Public License alongwith this program; if not, write to the Free Software Foundation, Inc.,59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *//* * author teawater <c7code-uc@yahoo.com.cn> <teawater@gmail.com> */#include "armdefs.h"#include "arm2x86_self.h"uint8_t *get_op_movl_T0_im (int *len){ uint8_t *ret; unsigned int begin = 0, end = 0; OP_BEGIN ("get_op_movl_T0_im"); T0 = ULONG_MAX; OP_END ("get_op_movl_T0_im"); *len = end - begin; if (*len <= sizeof (ULONG_MAX)) { return (NULL); } else { *len -= sizeof (ULONG_MAX); } ret = (uint8_t *) begin; return (ret);}uint8_t *get_op_movl_T1_im (int *len){ uint8_t *ret; unsigned int begin = 0, end = 0; OP_BEGIN ("get_op_movl_T1_im"); T1 = ULONG_MAX; OP_END ("get_op_movl_T1_im"); *len = end - begin; if (*len <= sizeof (ULONG_MAX)) { return (NULL); } else { *len -= sizeof (ULONG_MAX); } ret = (uint8_t *) begin; return (ret);}uint8_t *get_op_movl_T2_im (int *len){ uint8_t *ret; unsigned int begin = 0, end = 0; OP_BEGIN ("get_op_movl_T2_im"); T2 = ULONG_MAX; OP_END ("get_op_movl_T2_im"); *len = end - begin; if (*len <= sizeof (ULONG_MAX)) { return (NULL); } else { *len -= sizeof (ULONG_MAX); } ret = (uint8_t *) begin; return (ret);}op_table_t op_movl_Tx_im[Tx_MAX + 1];intop_movl_Tx_im_init (){ int i; op_movl_Tx_im[0].op = get_op_movl_T0_im (&op_movl_Tx_im[0].len); op_movl_Tx_im[1].op = get_op_movl_T1_im (&op_movl_Tx_im[1].len); op_movl_Tx_im[2].op = get_op_movl_T2_im (&op_movl_Tx_im[2].len); for (i = 0; i <= Tx_MAX; i++) { if (op_movl_Tx_im[i].op == NULL) { return (-1); } } return (0);}//--------------------------------------------------------------------------------------------------uint8_t *get_op_movl_tmp0_im (int *len){ uint8_t *ret; unsigned int begin = 0, end = 0; OP_BEGIN ("get_op_movl_tmp0_im"); arm2x86_tmp0 = ULONG_MAX; OP_END ("get_op_movl_tmp0_im"); *len = end - begin; if (*len <= sizeof (ULONG_MAX)) { return (NULL); } else { *len -= sizeof (ULONG_MAX); } ret = (uint8_t *) begin; return (ret);}op_table_t op_movl_tmpx_im[tmp_MAX + 1];intop_movl_tmpx_im_init (){ op_movl_tmpx_im[0].op = get_op_movl_tmp0_im (&op_movl_tmpx_im[0].len); if (op_movl_tmpx_im[0].op == NULL) return (-1); return (0);}//--------------------------------------------------------------------------------------------------uint8_t *get_op_movl_T0_r0 (int *len){ uint8_t *ret; unsigned int begin = 0, end = 0; OP_BEGIN ("get_op_movl_T0_r0"); T0 = st->Reg[0]; OP_END ("get_op_movl_T0_r0"); *len = end - begin; ret = (uint8_t *) begin; return (ret);}uint8_t *get_op_movl_T0_r1 (int *len){ uint8_t *ret; unsigned int begin = 0, end = 0; OP_BEGIN ("get_op_movl_T0_r1"); T0 = st->Reg[1]; OP_END ("get_op_movl_T0_r1"); *len = end - begin; ret = (uint8_t *) begin; return (ret);}uint8_t *get_op_movl_T0_r2 (int *len){ uint8_t *ret; unsigned int begin = 0, end = 0; OP_BEGIN ("get_op_movl_T0_r2"); T0 = st->Reg[2]; OP_END ("get_op_movl_T0_r2"); *len = end - begin; ret = (uint8_t *) begin; return (ret);}uint8_t *get_op_movl_T0_r3 (int *len){ uint8_t *ret; unsigned int begin = 0, end = 0; OP_BEGIN ("get_op_movl_T0_r3"); T0 = st->Reg[3]; OP_END ("get_op_movl_T0_r3"); *len = end - begin; ret = (uint8_t *) begin; return (ret);}uint8_t *get_op_movl_T0_r4 (int *len){ uint8_t *ret; unsigned int begin = 0, end = 0; OP_BEGIN ("get_op_movl_T0_r4"); T0 = st->Reg[4]; OP_END ("get_op_movl_T0_r4"); *len = end - begin; ret = (uint8_t *) begin; return (ret);}uint8_t *get_op_movl_T0_r5 (int *len){ uint8_t *ret; unsigned int begin = 0, end = 0; OP_BEGIN ("get_op_movl_T0_r5"); T0 = st->Reg[5]; OP_END ("get_op_movl_T0_r5"); *len = end - begin; ret = (uint8_t *) begin; return (ret);}uint8_t *get_op_movl_T0_r6 (int *len){ uint8_t *ret; unsigned int begin = 0, end = 0; OP_BEGIN ("get_op_movl_T0_r6"); T0 = st->Reg[6]; OP_END ("get_op_movl_T0_r6"); *len = end - begin; ret = (uint8_t *) begin; return (ret);}uint8_t *get_op_movl_T0_r7 (int *len){ uint8_t *ret; unsigned int begin = 0, end = 0; OP_BEGIN ("get_op_movl_T0_r7"); T0 = st->Reg[7]; OP_END ("get_op_movl_T0_r7"); *len = end - begin; ret = (uint8_t *) begin; return (ret);}uint8_t *get_op_movl_T0_r8 (int *len){ uint8_t *ret; unsigned int begin = 0, end = 0; OP_BEGIN ("get_op_movl_T0_r8"); T0 = st->Reg[8]; OP_END ("get_op_movl_T0_r8"); *len = end - begin; ret = (uint8_t *) begin; return (ret);}uint8_t *get_op_movl_T0_r9 (int *len){ uint8_t *ret; unsigned int begin = 0, end = 0; OP_BEGIN ("get_op_movl_T0_r9"); T0 = st->Reg[9]; OP_END ("get_op_movl_T0_r9"); *len = end - begin; ret = (uint8_t *) begin; return (ret);}uint8_t *get_op_movl_T0_r10 (int *len){ uint8_t *ret; unsigned int begin = 0, end = 0; OP_BEGIN ("get_op_movl_T0_r10"); T0 = st->Reg[10]; OP_END ("get_op_movl_T0_r10"); *len = end - begin; ret = (uint8_t *) begin; return (ret);}uint8_t *get_op_movl_T0_r11 (int *len){ uint8_t *ret; unsigned int begin = 0, end = 0; OP_BEGIN ("get_op_movl_T0_r11"); T0 = st->Reg[11]; OP_END ("get_op_movl_T0_r11"); *len = end - begin; ret = (uint8_t *) begin; return (ret);}uint8_t *get_op_movl_T0_r12 (int *len){ uint8_t *ret; unsigned int begin = 0, end = 0; OP_BEGIN ("get_op_movl_T0_r12"); T0 = st->Reg[12]; OP_END ("get_op_movl_T0_r12"); *len = end - begin; ret = (uint8_t *) begin; return (ret);}uint8_t *get_op_movl_T0_r13 (int *len){ uint8_t *ret; unsigned int begin = 0, end = 0; OP_BEGIN ("get_op_movl_T0_r13"); T0 = st->Reg[13]; OP_END ("get_op_movl_T0_r13"); *len = end - begin; ret = (uint8_t *) begin; return (ret);}uint8_t *get_op_movl_T0_r14 (int *len){ uint8_t *ret; unsigned int begin = 0, end = 0; OP_BEGIN ("get_op_movl_T0_r14"); T0 = st->Reg[14]; OP_END ("get_op_movl_T0_r14"); *len = end - begin; ret = (uint8_t *) begin; return (ret);}uint8_t *get_op_movl_T0_r15 (int *len){ uint8_t *ret; unsigned int begin = 0, end = 0; OP_BEGIN ("get_op_movl_T0_r15"); T0 = st->Reg[15] + 4; OP_END ("get_op_movl_T0_r15"); *len = end - begin; ret = (uint8_t *) begin; return (ret);}uint8_t *get_op_movl_T1_r0 (int *len){ uint8_t *ret; unsigned int begin = 0, end = 0; OP_BEGIN ("get_op_movl_T1_r0"); T1 = st->Reg[0]; OP_END ("get_op_movl_T1_r0"); *len = end - begin; ret = (uint8_t *) begin; return (ret);}uint8_t *get_op_movl_T1_r1 (int *len){ uint8_t *ret; unsigned int begin = 0, end = 0; OP_BEGIN ("get_op_movl_T1_r1"); T1 = st->Reg[1]; OP_END ("get_op_movl_T1_r1"); *len = end - begin; ret = (uint8_t *) begin; return (ret);}uint8_t *get_op_movl_T1_r2 (int *len){ uint8_t *ret; unsigned int begin = 0, end = 0; OP_BEGIN ("get_op_movl_T1_r2"); T1 = st->Reg[2]; OP_END ("get_op_movl_T1_r2"); *len = end - begin; ret = (uint8_t *) begin; return (ret);}uint8_t *get_op_movl_T1_r3 (int *len){ uint8_t *ret; unsigned int begin = 0, end = 0; OP_BEGIN ("get_op_movl_T1_r3"); T1 = st->Reg[3]; OP_END ("get_op_movl_T1_r3"); *len = end - begin; ret = (uint8_t *) begin; return (ret);}uint8_t *get_op_movl_T1_r4 (int *len){ uint8_t *ret; unsigned int begin = 0, end = 0; OP_BEGIN ("get_op_movl_T1_r4"); T1 = st->Reg[4]; OP_END ("get_op_movl_T1_r4"); *len = end - begin; ret = (uint8_t *) begin; return (ret);}uint8_t *get_op_movl_T1_r5 (int *len){ uint8_t *ret; unsigned int begin = 0, end = 0; OP_BEGIN ("get_op_movl_T1_r5"); T1 = st->Reg[5]; OP_END ("get_op_movl_T1_r5"); *len = end - begin; ret = (uint8_t *) begin; return (ret);}uint8_t *get_op_movl_T1_r6 (int *len){ uint8_t *ret; unsigned int begin = 0, end = 0; OP_BEGIN ("get_op_movl_T1_r6"); T1 = st->Reg[6]; OP_END ("get_op_movl_T1_r6"); *len = end - begin; ret = (uint8_t *) begin; return (ret);}uint8_t *get_op_movl_T1_r7 (int *len){ uint8_t *ret; unsigned int begin = 0, end = 0; OP_BEGIN ("get_op_movl_T1_r7"); T1 = st->Reg[7]; OP_END ("get_op_movl_T1_r7"); *len = end - begin; ret = (uint8_t *) begin; return (ret);}uint8_t *get_op_movl_T1_r8 (int *len){ uint8_t *ret; unsigned int begin = 0, end = 0; OP_BEGIN ("get_op_movl_T1_r8"); T1 = st->Reg[8]; OP_END ("get_op_movl_T1_r8"); *len = end - begin; ret = (uint8_t *) begin; return (ret);}uint8_t *get_op_movl_T1_r9 (int *len){ uint8_t *ret; unsigned int begin = 0, end = 0; OP_BEGIN ("get_op_movl_T1_r9"); T1 = st->Reg[9]; OP_END ("get_op_movl_T1_r9"); *len = end - begin; ret = (uint8_t *) begin; return (ret);}uint8_t *get_op_movl_T1_r10 (int *len){ uint8_t *ret; unsigned int begin = 0, end = 0; OP_BEGIN ("get_op_movl_T1_r10"); T1 = st->Reg[10]; OP_END ("get_op_movl_T1_r10"); *len = end - begin; ret = (uint8_t *) begin; return (ret);}uint8_t *get_op_movl_T1_r11 (int *len){ uint8_t *ret; unsigned int begin = 0, end = 0; OP_BEGIN ("get_op_movl_T1_r11"); T1 = st->Reg[11]; OP_END ("get_op_movl_T1_r11"); *len = end - begin; ret = (uint8_t *) begin; return (ret);}uint8_t *get_op_movl_T1_r12 (int *len){ uint8_t *ret; unsigned int begin = 0, end = 0; OP_BEGIN ("get_op_movl_T1_r12"); T1 = st->Reg[12]; OP_END ("get_op_movl_T1_r12"); *len = end - begin; ret = (uint8_t *) begin; return (ret);}uint8_t *get_op_movl_T1_r13 (int *len){ uint8_t *ret; unsigned int begin = 0, end = 0; OP_BEGIN ("get_op_movl_T1_r13"); T1 = st->Reg[13]; OP_END ("get_op_movl_T1_r13"); *len = end - begin; ret = (uint8_t *) begin; return (ret);}uint8_t *get_op_movl_T1_r14 (int *len){ uint8_t *ret; unsigned int begin = 0, end = 0; OP_BEGIN ("get_op_movl_T1_r14"); T1 = st->Reg[14]; OP_END ("get_op_movl_T1_r14"); *len = end - begin; ret = (uint8_t *) begin; return (ret);}uint8_t *get_op_movl_T1_r15 (int *len){ uint8_t *ret; unsigned int begin = 0, end = 0; OP_BEGIN ("get_op_movl_T1_r15"); T1 = st->Reg[15] + 4; OP_END ("get_op_movl_T1_r15"); *len = end - begin; ret = (uint8_t *) begin; return (ret);}uint8_t *get_op_movl_T2_r0 (int *len){ uint8_t *ret; unsigned int begin = 0, end = 0; OP_BEGIN ("get_op_movl_T2_r0"); T2 = st->Reg[0]; OP_END ("get_op_movl_T2_r0"); *len = end - begin; ret = (uint8_t *) begin; return (ret);}uint8_t *get_op_movl_T2_r1 (int *len){ uint8_t *ret; unsigned int begin = 0, end = 0; OP_BEGIN ("get_op_movl_T2_r1"); T2 = st->Reg[1]; OP_END ("get_op_movl_T2_r1"); *len = end - begin; ret = (uint8_t *) begin; return (ret);}uint8_t *get_op_movl_T2_r2 (int *len){ uint8_t *ret; unsigned int begin = 0, end = 0; OP_BEGIN ("get_op_movl_T2_r2"); T2 = st->Reg[2]; OP_END ("get_op_movl_T2_r2"); *len = end - begin; ret = (uint8_t *) begin; return (ret);}uint8_t *get_op_movl_T2_r3 (int *len)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -