1 From 679b65cd221efa7df42b6a369c7b1ebe9d8b5c3e Mon Sep 17 00:00:00 2001
2 From: Chris January <chris.january@allinea.com>
3 Date: Thu, 31 Jan 2013 11:46:57 +0000
4 Subject: [PATCH] dwarf: Fix the order of the operands to the relational operators
6 dwarf_eval_expr are reversed compared with the DWARF spec.
8 src/dwarf/Gexpr.c | 12 ++++++------
9 1 files changed, 6 insertions(+), 6 deletions(-)
11 diff --git a/src/dwarf/Gexpr.c b/src/dwarf/Gexpr.c
12 index b4f2bc9..502021c 100644
13 --- a/src/dwarf/Gexpr.c
14 +++ b/src/dwarf/Gexpr.c
15 @@ -574,42 +574,42 @@ do { \
16 Debug (15, "OP_le\n");
19 - push (sword (as, tmp1) <= sword (as, tmp2));
20 + push (sword (as, tmp2) <= sword (as, tmp1));
24 Debug (15, "OP_ge\n");
27 - push (sword (as, tmp1) >= sword (as, tmp2));
28 + push (sword (as, tmp2) >= sword (as, tmp1));
32 Debug (15, "OP_eq\n");
35 - push (sword (as, tmp1) == sword (as, tmp2));
36 + push (sword (as, tmp2) == sword (as, tmp1));
40 Debug (15, "OP_lt\n");
43 - push (sword (as, tmp1) < sword (as, tmp2));
44 + push (sword (as, tmp2) < sword (as, tmp1));
48 Debug (15, "OP_gt\n");
51 - push (sword (as, tmp1) > sword (as, tmp2));
52 + push (sword (as, tmp2) > sword (as, tmp1));
56 Debug (15, "OP_ne\n");
59 - push (sword (as, tmp1) != sword (as, tmp2));
60 + push (sword (as, tmp2) != sword (as, tmp1));