@@ -1497,22 +1497,7 @@ codet java_bytecode_convert_methodt::convert_instructions(
1497
1497
else if (statement==" dup2_x2" )
1498
1498
{
1499
1499
PRECONDITION (!stack.empty () && results.empty ());
1500
-
1501
- if (get_bytecode_type_width (stack.back ().type ())==32 )
1502
- op=pop (2 );
1503
- else
1504
- op=pop (1 );
1505
-
1506
- exprt::operandst op2;
1507
-
1508
- if (get_bytecode_type_width (stack.back ().type ())==32 )
1509
- op2=pop (2 );
1510
- else
1511
- op2=pop (1 );
1512
-
1513
- results.insert (results.end (), op.begin (), op.end ());
1514
- results.insert (results.end (), op2.begin (), op2.end ());
1515
- results.insert (results.end (), op.begin (), op.end ());
1500
+ convert_dup2_x2 (op, results);
1516
1501
}
1517
1502
else if (statement==" dconst" )
1518
1503
{
@@ -1968,6 +1953,27 @@ void java_bytecode_convert_methodt::convert_dup2_x1(
1968
1953
results.insert (results.end (), op.begin (), op.end ());
1969
1954
}
1970
1955
1956
+ void java_bytecode_convert_methodt::convert_dup2_x2 (
1957
+ exprt::operandst &op,
1958
+ exprt::operandst &results)
1959
+ {
1960
+ if (get_bytecode_type_width (stack.back ().type ()) == 32 )
1961
+ op = pop (2 );
1962
+ else
1963
+ op = pop (1 );
1964
+
1965
+ exprt::operandst op2;
1966
+
1967
+ if (get_bytecode_type_width (stack.back ().type ()) == 32 )
1968
+ op2 = pop (2 );
1969
+ else
1970
+ op2 = pop (1 );
1971
+
1972
+ results.insert (results.end (), op.begin (), op.end ());
1973
+ results.insert (results.end (), op2.begin (), op2.end ());
1974
+ results.insert (results.end (), op.begin (), op.end ());
1975
+ }
1976
+
1971
1977
exprt::operandst &java_bytecode_convert_methodt::convert_const (
1972
1978
const irep_idt &statement,
1973
1979
exprt &arg0,
0 commit comments