A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
useless cosmetics around NS3 long routes
[simgrid.git]
/
src
/
mc
/
DwarfExpression.cpp
diff --git
a/src/mc/DwarfExpression.cpp
b/src/mc/DwarfExpression.cpp
index
6c90f31
..
86043a0
100644
(file)
--- a/
src/mc/DwarfExpression.cpp
+++ b/
src/mc/DwarfExpression.cpp
@@
-4,13
+4,12
@@
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
+#include <cstddef>
#include <cstdint>
#include <cstdint>
-#include <cstdarg>
#include <dwarf.h>
#include <elfutils/libdw.h>
#include <dwarf.h>
#include <elfutils/libdw.h>
-#include "src/mc/mc_object_info.h"
#include "src/mc/mc_private.h"
#include "src/mc/LocationList.hpp"
#include "src/mc/AddressSpace.hpp"
#include "src/mc/mc_private.h"
#include "src/mc/LocationList.hpp"
#include "src/mc/AddressSpace.hpp"
@@
-81,7
+80,7
@@
void execute(
break;
}
break;
}
- // Push the CFA (Canonical Frame Address
e
):
+ // Push the CFA (Canonical Frame Address):
case DW_OP_call_frame_cfa:
{
/* See 6.4 of DWARF4 (http://dwarfstd.org/doc/DWARF4.pdf#page=140):
case DW_OP_call_frame_cfa:
{
/* See 6.4 of DWARF4 (http://dwarfstd.org/doc/DWARF4.pdf#page=140):
@@
-206,13
+205,19
@@
void execute(
// and replace the top of the stack with the computed value
// (stack.top() += stack.before_top()).
// and replace the top of the stack with the computed value
// (stack.top() += stack.before_top()).
- case DW_OP_plus:
- stack.push(stack.pop() + stack.pop());
+ case DW_OP_plus: {
+ intptr_t first = stack.pop();
+ intptr_t second = stack.pop();
+ stack.push(first + second);
break;
break;
+ }
- case DW_OP_mul:
- stack.push(stack.pop() * stack.pop());
+ case DW_OP_mul: {
+ intptr_t first = stack.pop();
+ intptr_t second = stack.pop();
+ stack.push(first * second);
break;
break;
+ }
case DW_OP_plus_uconst:
stack.top() += op->number;
case DW_OP_plus_uconst:
stack.top() += op->number;
@@
-226,21
+231,33
@@
void execute(
stack.top() = - (intptr_t) stack.top();
break;
stack.top() = - (intptr_t) stack.top();
break;
- case DW_OP_minus:
- stack.push(stack.pop() - stack.pop());
+ case DW_OP_minus: {
+ intptr_t first = stack.pop();
+ intptr_t second = stack.pop();
+ stack.push(second - first);
break;
break;
+ }
- case DW_OP_and:
- stack.push(stack.pop() & stack.pop());
+ case DW_OP_and: {
+ intptr_t first = stack.pop();
+ intptr_t second = stack.pop();
+ stack.push(first & second);
break;
break;
+ }
- case DW_OP_or:
- stack.push(stack.pop() | stack.pop());
+ case DW_OP_or: {
+ intptr_t first = stack.pop();
+ intptr_t second = stack.pop();
+ stack.push(first | second);
break;
break;
+ }
- case DW_OP_xor:
- stack.push(stack.pop() ^ stack.pop());
+ case DW_OP_xor: {
+ intptr_t first = stack.pop();
+ intptr_t second = stack.pop();
+ stack.push(first ^ second);
break;
break;
+ }
case DW_OP_nop:
break;
case DW_OP_nop:
break;