This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[committed] MIPS: MIPS16 offset calculation formatting fixes
- From: "Maciej W. Rozycki" <macro at codesourcery dot com>
- To: <gdb-patches at sourceware dot org>
- Date: Thu, 24 Nov 2011 15:56:30 +0000
- Subject: [committed] MIPS: MIPS16 offset calculation formatting fixes
Hi,
Applied as obvious, no functional change. Now the function is actually
broken too, but that I'll address with the next patch I wanted to avoid
obfuscating with these formatting fixes.
2011-11-24 Maciej W. Rozycki <macro@codesourcery.com>
gdb/
* mips-tdep.c (extended_offset): Fix formatting.
Maciej
gdb-mips16-extended-offset-format.diff
Index: gdb-fsf-trunk-quilt/gdb/mips-tdep.c
===================================================================
--- gdb-fsf-trunk-quilt.orig/gdb/mips-tdep.c 2011-11-24 11:59:36.795607672 +0000
+++ gdb-fsf-trunk-quilt/gdb/mips-tdep.c 2011-11-24 12:11:30.015568499 +0000
@@ -1391,11 +1391,13 @@ static CORE_ADDR
extended_offset (unsigned int extension)
{
CORE_ADDR value;
- value = (extension >> 21) & 0x3f; /* * extract 15:11 */
+
+ value = (extension >> 21) & 0x3f; /* Extract 15:11. */
value = value << 6;
- value |= (extension >> 16) & 0x1f; /* extract 10:5 */
+ value |= (extension >> 16) & 0x1f; /* Extract 10:5. */
value = value << 5;
- value |= extension & 0x01f; /* extract 4:0 */
+ value |= extension & 0x1f; /* Extract 4:0. */
+
return value;
}