aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1996-06-02 01:51:55 +0000
committerIan Lance Taylor <ian@airs.com>1996-06-02 01:51:55 +0000
commit903612a2f4e8cd368b94e12ee701cd72c2933477 (patch)
tree888b86be5c6c0b2e6e660dfc5b5ea318fca56c10 /bfd
parent871781804f351f162803370b2410f9f13f822bf8 (diff)
downloadgdb-903612a2f4e8cd368b94e12ee701cd72c2933477.zip
gdb-903612a2f4e8cd368b94e12ee701cd72c2933477.tar.gz
gdb-903612a2f4e8cd368b94e12ee701cd72c2933477.tar.bz2
* elf64-mips.c (bfd_mips_elf64_swap_reginfo_in)
(bfd_mips_elf64_swap_reginfo_out): Move from here... * elf32-mips.c (bfd_mips_elf64_swap_reginfo_in) (bfd_mips_elf64_swap_reginfo_out): ...to here.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog7
-rw-r--r--bfd/elf32-mips.c43
2 files changed, 50 insertions, 0 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 3e8fc46..cd7786a 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,10 @@
+Sat Jun 1 21:49:58 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * elf64-mips.c (bfd_mips_elf64_swap_reginfo_in)
+ (bfd_mips_elf64_swap_reginfo_out): Move from here...
+ * elf32-mips.c (bfd_mips_elf64_swap_reginfo_in)
+ (bfd_mips_elf64_swap_reginfo_out): ...to here.
+
Fri May 31 13:51:28 1996 Ian Lance Taylor <ian@cygnus.com>
* elf64-mips.c: Improve reloc special_functions and handling of
diff --git a/bfd/elf32-mips.c b/bfd/elf32-mips.c
index 94eb015..3ae2d2e 100644
--- a/bfd/elf32-mips.c
+++ b/bfd/elf32-mips.c
@@ -1333,6 +1333,49 @@ bfd_mips_elf32_swap_reginfo_out (abfd, in, ex)
(bfd_byte *) ex->ri_gp_value);
}
+/* In the 64 bit ABI, the .MIPS.options section holds register
+ information in an Elf64_Reginfo structure. These routines swap
+ them in and out. They are globally visible because they are used
+ outside of BFD. These routines are here so that gas can call them
+ without worrying about whether the 64 bit ABI has been included. */
+
+void
+bfd_mips_elf64_swap_reginfo_in (abfd, ex, in)
+ bfd *abfd;
+ const Elf64_External_RegInfo *ex;
+ Elf64_Internal_RegInfo *in;
+{
+ in->ri_gprmask = bfd_h_get_32 (abfd, (bfd_byte *) ex->ri_gprmask);
+ in->ri_pad = bfd_h_get_32 (abfd, (bfd_byte *) ex->ri_pad);
+ in->ri_cprmask[0] = bfd_h_get_32 (abfd, (bfd_byte *) ex->ri_cprmask[0]);
+ in->ri_cprmask[1] = bfd_h_get_32 (abfd, (bfd_byte *) ex->ri_cprmask[1]);
+ in->ri_cprmask[2] = bfd_h_get_32 (abfd, (bfd_byte *) ex->ri_cprmask[2]);
+ in->ri_cprmask[3] = bfd_h_get_32 (abfd, (bfd_byte *) ex->ri_cprmask[3]);
+ in->ri_gp_value = bfd_h_get_64 (abfd, (bfd_byte *) ex->ri_gp_value);
+}
+
+void
+bfd_mips_elf64_swap_reginfo_out (abfd, in, ex)
+ bfd *abfd;
+ const Elf64_Internal_RegInfo *in;
+ Elf64_External_RegInfo *ex;
+{
+ bfd_h_put_32 (abfd, (bfd_vma) in->ri_gprmask,
+ (bfd_byte *) ex->ri_gprmask);
+ bfd_h_put_32 (abfd, (bfd_vma) in->ri_pad,
+ (bfd_byte *) ex->ri_pad);
+ bfd_h_put_32 (abfd, (bfd_vma) in->ri_cprmask[0],
+ (bfd_byte *) ex->ri_cprmask[0]);
+ bfd_h_put_32 (abfd, (bfd_vma) in->ri_cprmask[1],
+ (bfd_byte *) ex->ri_cprmask[1]);
+ bfd_h_put_32 (abfd, (bfd_vma) in->ri_cprmask[2],
+ (bfd_byte *) ex->ri_cprmask[2]);
+ bfd_h_put_32 (abfd, (bfd_vma) in->ri_cprmask[3],
+ (bfd_byte *) ex->ri_cprmask[3]);
+ bfd_h_put_64 (abfd, (bfd_vma) in->ri_gp_value,
+ (bfd_byte *) ex->ri_gp_value);
+}
+
/* Swap an entry in a .gptab section. Note that these routines rely
on the equivalence of the two elements of the union. */