Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(111)

Unified Diff: cpu/frv.opc

Issue 11969036: Merge GDB 7.5.1 (Closed) Base URL: http://git.chromium.org/native_client/nacl-gdb.git@master
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cpu/ChangeLog ('k') | cpu/mt.opc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cpu/frv.opc
diff --git a/cpu/frv.opc b/cpu/frv.opc
index f81cef0d60860ec62611f2abfa916a7818ab126f..869155d67afc1294f5516fb9d9ff955474c72cc2 100644
--- a/cpu/frv.opc
+++ b/cpu/frv.opc
@@ -1343,11 +1343,11 @@ parse_uhi16 (CGEN_CPU_DESC cd,
if (errmsg == NULL
&& result_type == CGEN_PARSE_OPERAND_RESULT_NUMBER)
{
- /* If bfd_vma is wider than 32 bits, but we have a sign-
- or zero-extension, truncate it. */
- if (value >= - ((bfd_vma)1 << 31)
- || value <= ((bfd_vma)1 << 31) - (bfd_vma)1)
- value &= (((bfd_vma)1 << 16) << 16) - 1;
+ /* If value is wider than 32 bits then be
+ careful about how we extract bits 16-31. */
+ if (sizeof (value) > 4)
+ value &= (((bfd_vma)1 << 16) << 16) - 1;
+
value >>= 16;
}
*valuep = value;
« no previous file with comments | « cpu/ChangeLog ('k') | cpu/mt.opc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698