* config/mips/linux.mt (DEPRECATED_TM_FILE): Delete.
[deliverable/binutils-gdb.git] / gdb / ax-general.c
index c08272a3b7a5a042c5535923eff0e2ef940be809..e31e850fb4c4184892ecbfad77ab184083fc31f9 100644 (file)
@@ -1,5 +1,5 @@
 /* Functions for manipulating expressions designed to be executed on the agent
-   Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
+   Copyright (C) 1998, 1999, 2000, 2007 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -231,8 +231,12 @@ ax_const_l (struct agent_expr *x, LONGEST l)
      signed or unsigned; we always reproduce the value exactly, and
      use the shortest representation.  */
   for (op = 0, size = 8; size < 64; size *= 2, op++)
-    if (-((LONGEST) 1 << size) <= l && l < ((LONGEST) 1 << size))
-      break;
+    {
+      LONGEST lim = 1 << (size - 1);
+
+      if (-lim <= l && l <= lim - 1)
+        break;
+    }
 
   /* Emit the right opcode... */
   ax_simple (x, ops[op]);
This page took 0.037283 seconds and 4 git commands to generate.