summaryrefslogtreecommitdiffstats
path: root/backends
diff options
context:
space:
mode:
authorRoland McGrath <roland@redhat.com>2007-10-23 13:07:39 +0000
committerRoland McGrath <roland@redhat.com>2007-10-23 13:07:39 +0000
commite4c22ea004c02a58f5db5eb53794275344c17958 (patch)
treeec3713d305f8e9f05b15d29240accc71e98998c5 /backends
parent98c5ead4ad9fbf96ad3b54d8ca26e354ddc3398d (diff)
downloadandroid_external_elfutils-e4c22ea004c02a58f5db5eb53794275344c17958.tar.gz
android_external_elfutils-e4c22ea004c02a58f5db5eb53794275344c17958.tar.bz2
android_external_elfutils-e4c22ea004c02a58f5db5eb53794275344c17958.zip
2007-10-23 Roland McGrath <roland@redhat.com>
* linux-kernel-modules.c (report_kernel_archive): Reorder the kernel module to appear first.
Diffstat (limited to 'backends')
-rw-r--r--backends/ChangeLog11
-rw-r--r--backends/i386_corenote.c4
-rw-r--r--backends/linux-core-note.c33
-rw-r--r--backends/ppc_corenote.c13
-rw-r--r--backends/ppc_regs.c10
5 files changed, 47 insertions, 24 deletions
diff --git a/backends/ChangeLog b/backends/ChangeLog
index 082f4f39..2bb61f2b 100644
--- a/backends/ChangeLog
+++ b/backends/ChangeLog
@@ -1,3 +1,14 @@
+2007-10-18 Roland McGrath <roland@redhat.com>
+
+ * ppc_regs.c (ppc_register_info): Assign 67 to "vscr".
+ Return "vector" and 32 bits for vscr and vrsave.
+ * ppc_corenote.c (altivec_regs): New variable.
+ (EXTRA_NOTES): New macro, handle NT_PPC_VMX.
+
+ * linux-core-note.c (EXTRA_REGSET): New macro.
+ Remove NT_PRXFPREG case. Instead, use EXTRA_NOTES if defined.
+ * i386_corenote.c (EXTRA_NOTES): Define it.
+
2007-10-09 Roland McGrath <roland@redhat.com>
* sparc_auxv.c: New file.
diff --git a/backends/i386_corenote.c b/backends/i386_corenote.c
index cc72a45f..f6c4c1de 100644
--- a/backends/i386_corenote.c
+++ b/backends/i386_corenote.c
@@ -99,6 +99,8 @@ static const Ebl_Register_Location prxfpreg_regs[] =
{ .offset = 32, .regno = 11, .count = 8, .bits = 80, .pad = 6 }, /* stN */
{ .offset = 32 + 128, .regno = 21, .count = 8, .bits = 128 }, /* xmm */
};
-#define PRXFPREG_SIZE 512
+
+#define EXTRA_NOTES \
+ EXTRA_REGSET (NT_PRFPXREG, 512, prxfpreg_regs)
#include "linux-core-note.c"
diff --git a/backends/linux-core-note.c b/backends/linux-core-note.c
index c4a90b70..3dc41373 100644
--- a/backends/linux-core-note.c
+++ b/backends/linux-core-note.c
@@ -198,28 +198,23 @@ EBLHOOK(core_note) (n_type, descsz,
*items = prpsinfo_items;
return 1;
-#ifdef FPREGSET_SIZE
- case NT_FPREGSET:
- if (descsz != FPREGSET_SIZE)
- return 0;
- *regs_offset = 0;
- *nregloc = sizeof fpregset_regs / sizeof fpregset_regs[0];
- *reglocs = fpregset_regs;
- *nitems = 0;
- *items = NULL;
+#define EXTRA_REGSET(type, size, table) \
+ case type: \
+ if (descsz != size) \
+ return 0; \
+ *regs_offset = 0; \
+ *nregloc = sizeof table / sizeof table[0]; \
+ *reglocs = table; \
+ *nitems = 0; \
+ *items = NULL; \
return 1;
+
+#ifdef FPREGSET_SIZE
+ EXTRA_REGSET (NT_FPREGSET, FPREGSET_SIZE, fpregset_regs)
#endif
-#ifdef PRXFPREG_SIZE
- case NT_PRXFPREG:
- if (descsz != PRXFPREG_SIZE)
- return 0;
- *regs_offset = 0;
- *nregloc = sizeof prxfpreg_regs / sizeof prxfpreg_regs[0];
- *reglocs = prxfpreg_regs;
- *nitems = 0;
- *items = NULL;
- return 1;
+#ifdef EXTRA_NOTES
+ EXTRA_NOTES
#endif
}
diff --git a/backends/ppc_corenote.c b/backends/ppc_corenote.c
index e9ff124c..daadbb48 100644
--- a/backends/ppc_corenote.c
+++ b/backends/ppc_corenote.c
@@ -71,6 +71,19 @@ static const Ebl_Register_Location fpregset_regs[] =
};
#define FPREGSET_SIZE (33 * 8)
+static const Ebl_Register_Location altivec_regs[] =
+ {
+ /* vr0-vr31 */
+ { .offset = 0, .regno = 1124, .count = 32, .bits = 128 },
+ /* vscr XXX 67 is an unofficial assignment */
+ { .offset = 32 * 16, .regno = 67, .count = 1, .bits = 32, .pad = 12 },
+ /* vrsave */
+ { .offset = 33 * 16, .regno = 356, .count = 1, .bits = 32, .pad = 12 }
+ };
+
+#define EXTRA_NOTES \
+ EXTRA_REGSET (NT_PPC_VMX, 34 * 16, altivec_regs)
+
#if BITS == 32
# define ULONG uint32_t
# define ALIGN_ULONG 4
diff --git a/backends/ppc_regs.c b/backends/ppc_regs.c
index 4cf5abc6..cc7d84fa 100644
--- a/backends/ppc_regs.c
+++ b/backends/ppc_regs.c
@@ -58,13 +58,13 @@ ppc_register_info (Ebl *ebl __attribute__ ((unused)),
if (ebl->machine != EM_PPC64 && regno < 64)
*bits = 64;
}
- else if (regno < 1124)
- *setname = "privileged";
- else
+ else if (regno == 67 || regno == 356 || regno >= 1124)
{
*setname = "vector";
- *bits = 128;
+ *bits = regno >= 1124 ? 128 : 32;
}
+ else
+ *setname = "privileged";
switch (regno)
{
@@ -100,6 +100,8 @@ ppc_register_info (Ebl *ebl __attribute__ ((unused)),
return stpcpy (name, "fpscr") + 1 - name;
case 66:
return stpcpy (name, "msr") + 1 - name;
+ case 67: /* XXX unofficial assignment */
+ return stpcpy (name, "vscr") + 1 - name;
case 70 + 0 ... 70 + 9:
name[0] = 's';