]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
DWARF comparisons should be signed. Patch from Jakub Jelinek.
authorTom Hughes <tom@compton.nu>
Thu, 21 Jul 2011 15:07:26 +0000 (15:07 +0000)
committerTom Hughes <tom@compton.nu>
Thu, 21 Jul 2011 15:07:26 +0000 (15:07 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11904

coregrind/m_debuginfo/debuginfo.c

index 4177a3a4822ac45c65dfa74dac58ac7e3629bbc7..dcc2719c6644a1f8c2ae9a808df926b10aa33f92 100644 (file)
@@ -1883,10 +1883,10 @@ UWord evalCfiExpr ( XArray* exprs, Int ix,
             case Cop_Shl: return wL << wR;
             case Cop_Shr: return wL >> wR;
             case Cop_Eq: return wL == wR ? 1 : 0;
-            case Cop_Ge: return wL >= wR ? 1 : 0;
-            case Cop_Gt: return wL > wR ? 1 : 0;
-            case Cop_Le: return wL <= wR ? 1 : 0;
-            case Cop_Lt: return wL < wR ? 1 : 0;
+            case Cop_Ge: return (Word) wL >= (Word) wR ? 1 : 0;
+            case Cop_Gt: return (Word) wL > (Word) wR ? 1 : 0;
+            case Cop_Le: return (Word) wL <= (Word) wR ? 1 : 0;
+            case Cop_Lt: return (Word) wL < (Word) wR ? 1 : 0;
             case Cop_Ne: return wL != wR ? 1 : 0;
             default: goto unhandled;
          }