@@ -1514,22 +1514,7 @@ codet java_bytecode_convert_methodt::convert_instructions(
1514
1514
else if (statement==" dup2_x2" )
1515
1515
{
1516
1516
PRECONDITION (!stack.empty () && results.empty ());
1517
-
1518
- if (get_bytecode_type_width (stack.back ().type ())==32 )
1519
- op=pop (2 );
1520
- else
1521
- op=pop (1 );
1522
-
1523
- exprt::operandst op2;
1524
-
1525
- if (get_bytecode_type_width (stack.back ().type ())==32 )
1526
- op2=pop (2 );
1527
- else
1528
- op2=pop (1 );
1529
-
1530
- results.insert (results.end (), op.begin (), op.end ());
1531
- results.insert (results.end (), op2.begin (), op2.end ());
1532
- results.insert (results.end (), op.begin (), op.end ());
1517
+ convert_dup2_x2 (op, results);
1533
1518
}
1534
1519
else if (statement==" dconst" )
1535
1520
{
@@ -1985,6 +1970,27 @@ void java_bytecode_convert_methodt::convert_dup2_x1(
1985
1970
results.insert (results.end (), op.begin (), op.end ());
1986
1971
}
1987
1972
1973
+ void java_bytecode_convert_methodt::convert_dup2_x2 (
1974
+ exprt::operandst &op,
1975
+ exprt::operandst &results)
1976
+ {
1977
+ if (get_bytecode_type_width (stack.back ().type ()) == 32 )
1978
+ op = pop (2 );
1979
+ else
1980
+ op = pop (1 );
1981
+
1982
+ exprt::operandst op2;
1983
+
1984
+ if (get_bytecode_type_width (stack.back ().type ()) == 32 )
1985
+ op2 = pop (2 );
1986
+ else
1987
+ op2 = pop (1 );
1988
+
1989
+ results.insert (results.end (), op.begin (), op.end ());
1990
+ results.insert (results.end (), op2.begin (), op2.end ());
1991
+ results.insert (results.end (), op.begin (), op.end ());
1992
+ }
1993
+
1988
1994
exprt::operandst &java_bytecode_convert_methodt::convert_const (
1989
1995
const irep_idt &statement,
1990
1996
const exprt &arg0,
0 commit comments