Signed-off-by: Tomek Grabiec <[email protected]>
---
arch/x86/emit-code.c | 7 +++++++
arch/x86/include/arch/instruction.h | 1 +
arch/x86/lir-printer.c | 7 +++++++
arch/x86/use-def.c | 1 +
4 files changed, 16 insertions(+), 0 deletions(-)
diff --git a/arch/x86/emit-code.c b/arch/x86/emit-code.c
index 4888d2f..263d370 100644
--- a/arch/x86/emit-code.c
+++ b/arch/x86/emit-code.c
@@ -921,6 +921,12 @@ emit_mov_reg_membase(struct buffer *buf, struct operand
*src,
mach_reg(&dest->base_reg), dest->disp);
}
+static void
+emit_push_membase(struct buffer *buf, struct operand *src)
+{
+ __emit_push_membase(buf, mach_reg(&src->base_reg), src->disp);
+}
+
static void emit_mov_reg_memlocal(struct buffer *buf, struct operand *src,
struct operand *dest)
{
@@ -1779,6 +1785,7 @@ struct emitter emitters[] = {
DECL_EMITTER(INSN_OR_REG_REG, emit_or_reg_reg, TWO_OPERANDS),
DECL_EMITTER(INSN_PUSH_IMM, emit_push_imm, SINGLE_OPERAND),
DECL_EMITTER(INSN_PUSH_REG, emit_push_reg, SINGLE_OPERAND),
+ DECL_EMITTER(INSN_PUSH_MEMBASE, emit_push_membase, SINGLE_OPERAND),
DECL_EMITTER(INSN_PUSH_MEMLOCAL, emit_push_memlocal, SINGLE_OPERAND),
DECL_EMITTER(INSN_POP_MEMLOCAL, emit_pop_memlocal, SINGLE_OPERAND),
DECL_EMITTER(INSN_POP_REG, emit_pop_reg, SINGLE_OPERAND),
diff --git a/arch/x86/include/arch/instruction.h
b/arch/x86/include/arch/instruction.h
index 3de5bcc..b45959d 100644
--- a/arch/x86/include/arch/instruction.h
+++ b/arch/x86/include/arch/instruction.h
@@ -148,6 +148,7 @@ enum insn_type {
INSN_OR_REG_REG,
INSN_PUSH_IMM,
INSN_PUSH_REG,
+ INSN_PUSH_MEMBASE,
INSN_PUSH_MEMLOCAL,
INSN_POP_MEMLOCAL,
INSN_POP_REG,
diff --git a/arch/x86/lir-printer.c b/arch/x86/lir-printer.c
index c0a3600..070a5db 100644
--- a/arch/x86/lir-printer.c
+++ b/arch/x86/lir-printer.c
@@ -741,6 +741,12 @@ static int print_push_reg(struct string *str, struct insn
*insn)
return print_reg(str, &insn->operand);
}
+static int print_push_membase(struct string *str, struct insn *insn)
+{
+ print_func_name(str);
+ return print_membase(str, &insn->operand);
+}
+
static int print_push_memlocal(struct string *str, struct insn *insn)
{
print_func_name(str);
@@ -950,6 +956,7 @@ static print_insn_fn insn_printers[] = {
[INSN_OR_REG_REG] = print_or_reg_reg,
[INSN_PUSH_IMM] = print_push_imm,
[INSN_PUSH_REG] = print_push_reg,
+ [INSN_PUSH_MEMBASE] = print_push_membase,
[INSN_PUSH_MEMLOCAL] = print_push_memlocal,
[INSN_POP_MEMLOCAL] = print_pop_memlocal,
[INSN_POP_REG] = print_pop_reg,
diff --git a/arch/x86/use-def.c b/arch/x86/use-def.c
index f5f0a35..7b82b26 100644
--- a/arch/x86/use-def.c
+++ b/arch/x86/use-def.c
@@ -131,6 +131,7 @@ static struct insn_info insn_infos[] = {
DECLARE_INFO(INSN_OR_REG_REG, USE_SRC | USE_DST | DEF_DST),
DECLARE_INFO(INSN_PUSH_IMM, USE_NONE | DEF_NONE),
DECLARE_INFO(INSN_PUSH_REG, USE_SRC | DEF_NONE),
+ DECLARE_INFO(INSN_PUSH_MEMBASE, USE_SRC | DEF_NONE),
DECLARE_INFO(INSN_PUSH_MEMLOCAL, USE_SRC | DEF_NONE),
DECLARE_INFO(INSN_POP_REG, USE_NONE | DEF_SRC),
DECLARE_INFO(INSN_POP_MEMLOCAL, USE_SRC | DEF_NONE),
--
1.6.0.6
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Jatovm-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jatovm-devel