X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/a9b1128dbd610b34e13c166b2f8bffcb7ba48e4a..0bb08c80b2bff9de24524dc98f04cd145dfc93c0:/src/mc/DwarfExpression.cpp diff --git a/src/mc/DwarfExpression.cpp b/src/mc/DwarfExpression.cpp index b20366d122..696d262f8b 100644 --- a/src/mc/DwarfExpression.cpp +++ b/src/mc/DwarfExpression.cpp @@ -31,6 +31,8 @@ void execute( for (size_t i = 0; i != n; ++i) { const Dwarf_Op *op = ops + i; std::uint8_t atom = op->atom; + intptr_t first; + intptr_t second; switch (atom) { @@ -204,19 +206,17 @@ void execute( // and replace the top of the stack with the computed value // (stack.top() += stack.before_top()). - case DW_OP_plus: { - intptr_t first = stack.pop(); - intptr_t second = stack.pop(); + case DW_OP_plus: + first = stack.pop(); + second = stack.pop(); stack.push(first + second); break; - } - case DW_OP_mul: { - intptr_t first = stack.pop(); - intptr_t second = stack.pop(); + case DW_OP_mul: + first = stack.pop(); + second = stack.pop(); stack.push(first * second); break; - } case DW_OP_plus_uconst: stack.top() += op->number; @@ -230,33 +230,29 @@ void execute( stack.top() = - (intptr_t) stack.top(); break; - case DW_OP_minus: { - intptr_t first = stack.pop(); - intptr_t second = stack.pop(); + case DW_OP_minus: + first = stack.pop(); + second = stack.pop(); stack.push(second - first); break; - } - case DW_OP_and: { - intptr_t first = stack.pop(); - intptr_t second = stack.pop(); + case DW_OP_and: + first = stack.pop(); + second = stack.pop(); stack.push(first & second); break; - } - case DW_OP_or: { - intptr_t first = stack.pop(); - intptr_t second = stack.pop(); + case DW_OP_or: + first = stack.pop(); + second = stack.pop(); stack.push(first | second); break; - } - case DW_OP_xor: { - intptr_t first = stack.pop(); - intptr_t second = stack.pop(); + case DW_OP_xor: + first = stack.pop(); + second = stack.pop(); stack.push(first ^ second); break; - } case DW_OP_nop: break;