aboutsummaryrefslogtreecommitdiff
path: root/gcc/java/expr.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/java/expr.c')
-rw-r--r--gcc/java/expr.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/java/expr.c b/gcc/java/expr.c
index e5654e7..8e7ea9d 100644
--- a/gcc/java/expr.c
+++ b/gcc/java/expr.c
@@ -503,8 +503,9 @@ java_stack_swap (void)
decl1 = find_stack_slot (stack_pointer - 1, type1);
decl2 = find_stack_slot (stack_pointer - 2, type2);
temp = copy_to_reg (DECL_RTL (decl1));
- emit_move_insn (DECL_RTL (decl1), DECL_RTL (decl2));
- emit_move_insn (DECL_RTL (decl2), temp);
+ emit_move_insn (DECL_RTL (find_stack_slot (stack_pointer - 1, type2)),
+ DECL_RTL (decl2));
+ emit_move_insn (DECL_RTL (find_stack_slot (stack_pointer - 2, type1)), temp);
stack_type_map[stack_pointer - 1] = type2;
stack_type_map[stack_pointer - 2] = type1;
}