This fixes breakage caused by renaming REG_* aliases and adds
definitions for x86-64 instructions.

Signed-off-by: Eduard - Gabriel Munteanu <eduard.munte...@linux360.ro>
---
 arch/x86/use-def.c |   25 +++++++++++++++++++++++--
 1 files changed, 23 insertions(+), 2 deletions(-)

diff --git a/arch/x86/use-def.c b/arch/x86/use-def.c
index 74b6ecf..eeebf9a 100644
--- a/arch/x86/use-def.c
+++ b/arch/x86/use-def.c
@@ -40,6 +40,17 @@ struct insn_info {
 #define DECLARE_INFO(_type, _flags) [_type] = { .flags = _flags }
 
 static struct insn_info insn_infos[] = {
+       DECLARE_INFO(INSN_CALL_REL, USE_NONE | DEF_xAX | DEF_xCX | DEF_xDX),
+       DECLARE_INFO(INSN_JE_BRANCH, USE_NONE | DEF_NONE),
+       DECLARE_INFO(INSN_JGE_BRANCH, USE_NONE | DEF_NONE),
+       DECLARE_INFO(INSN_JG_BRANCH, USE_NONE | DEF_NONE),
+       DECLARE_INFO(INSN_JLE_BRANCH, USE_NONE | DEF_NONE),
+       DECLARE_INFO(INSN_JL_BRANCH, USE_NONE | DEF_NONE),
+       DECLARE_INFO(INSN_JMP_BRANCH, USE_NONE | DEF_NONE),
+       DECLARE_INFO(INSN_JNE_BRANCH, USE_NONE | DEF_NONE),
+       DECLARE_INFO(INSN_RET, USE_NONE | DEF_NONE),
+
+#ifdef CONFIG_X86_32
        DECLARE_INFO(INSN_ADC_IMM_REG, DEF_DST),
        DECLARE_INFO(INSN_ADC_MEMBASE_REG, USE_SRC | DEF_DST),
        DECLARE_INFO(INSN_ADC_REG_REG, USE_SRC | DEF_DST),
@@ -49,7 +60,6 @@ static struct insn_info insn_infos[] = {
        DECLARE_INFO(INSN_AND_MEMBASE_REG, USE_SRC | DEF_DST),
        DECLARE_INFO(INSN_AND_REG_REG, USE_SRC | DEF_DST),
        DECLARE_INFO(INSN_CALL_REG, USE_SRC | DEF_EAX | DEF_ECX | DEF_EDX),
-       DECLARE_INFO(INSN_CALL_REL, USE_NONE | DEF_EAX | DEF_ECX | DEF_EDX),
        DECLARE_INFO(INSN_CLTD_REG_REG, USE_SRC | DEF_SRC | DEF_DST),
        DECLARE_INFO(INSN_CMP_IMM_REG, USE_DST),
        DECLARE_INFO(INSN_CMP_MEMBASE_REG, USE_SRC | DEF_DST),
@@ -96,7 +106,6 @@ static struct insn_info insn_infos[] = {
        DECLARE_INFO(INSN_PUSH_IMM, USE_NONE | DEF_NONE),
        DECLARE_INFO(INSN_PUSH_REG, USE_SRC | DEF_NONE),
        DECLARE_INFO(INSN_POP_REG, USE_NONE | DEF_SRC),
-       DECLARE_INFO(INSN_RET, USE_NONE | DEF_NONE),
        DECLARE_INFO(INSN_SAR_IMM_REG, DEF_DST),
        DECLARE_INFO(INSN_SAR_REG_REG, USE_SRC | DEF_DST),
        DECLARE_INFO(INSN_SBB_IMM_REG, USE_NONE | DEF_DST),
@@ -112,6 +121,18 @@ static struct insn_info insn_infos[] = {
        DECLARE_INFO(INSN_XOR_IMM_REG, USE_SRC | DEF_DST),
        DECLARE_INFO(INSN_XOR_REG_REG, USE_SRC | DEF_DST),
        DECLARE_INFO(INSN_XOR_XMM_REG_REG, USE_SRC | DEF_DST),
+#else /* CONFIG_X86_32 */
+       DECLARE_INFO(INSN32_ADD_IMM_REG, DEF_DST),
+       DECLARE_INFO(INSN32_MOV_REG_REG, USE_SRC | DEF_DST),
+       DECLARE_INFO(INSN32_SUB_IMM_REG, USE_NONE | DEF_DST),
+
+       DECLARE_INFO(INSN64_ADD_IMM_REG, DEF_DST),
+       DECLARE_INFO(INSN64_MOV_REG_REG, USE_SRC | DEF_DST),
+       DECLARE_INFO(INSN64_PUSH_IMM, USE_NONE | DEF_NONE),
+       DECLARE_INFO(INSN64_PUSH_REG, USE_SRC | DEF_NONE),
+       DECLARE_INFO(INSN64_POP_REG, USE_NONE | DEF_SRC),
+       DECLARE_INFO(INSN64_SUB_IMM_REG, USE_NONE | DEF_DST),
+#endif
 };
 
 static inline struct insn_info *get_info(struct insn *insn)
-- 
1.6.0.6


------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have 
the opportunity to enter the BlackBerry Developer Challenge. See full prize 
details at: http://p.sf.net/sfu/blackberry
_______________________________________________
Jatovm-devel mailing list
Jatovm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jatovm-devel

Reply via email to