-/* Constants for accessing elements of frv_elf_gregset_t. */
-
-#define FRV_PT_PSR 0
-#define FRV_PT_ISR 1
-#define FRV_PT_CCR 2
-#define FRV_PT_CCCR 3
-#define FRV_PT_LR 4
-#define FRV_PT_LCR 5
-#define FRV_PT_PC 6
-#define FRV_PT_GNER0 10
-#define FRV_PT_GNER1 11
-#define FRV_PT_IACC0H 12
-#define FRV_PT_IACC0L 13
-
-/* Note: Only 32 of the GRs will be found in the corefile. */
-#define FRV_PT_GR(j) ( 14 + (j)) /* GRj for 0<=j<=63. */
-
-#define FRV_PT_TBR FRV_PT_GR(0) /* gr0 is always 0, so TBR is stuffed
- there. */
-
-/* Technically, the loadmap addresses are not part of `pr_reg' as
- found in the elf_prstatus struct. The fields which communicate the
- loadmap address appear (by design) immediately after `pr_reg'
- though, and the BFD function elf32_frv_grok_prstatus() has been
- implemented to include these fields in the register section that it
- extracts from the core file. So, for our purposes, they may be
- viewed as registers. */
-
-#define FRV_PT_EXEC_FDPIC_LOADMAP 46
-#define FRV_PT_INTERP_FDPIC_LOADMAP 47
-
+/* Register maps. */
+
+static const struct regcache_map_entry frv_linux_gregmap[] =
+ {
+ { 1, psr_regnum, 4 },
+ { 1, REGCACHE_MAP_SKIP, 4 }, /* isr */
+ { 1, ccr_regnum, 4 },
+ { 1, cccr_regnum, 4 },
+ { 1, lr_regnum, 4 },
+ { 1, lcr_regnum, 4 },
+ { 1, pc_regnum, 4 },
+ { 1, REGCACHE_MAP_SKIP, 4 }, /* __status */
+ { 1, REGCACHE_MAP_SKIP, 4 }, /* syscallno */
+ { 1, REGCACHE_MAP_SKIP, 4 }, /* orig_gr8 */
+ { 1, gner0_regnum, 4 },
+ { 1, gner1_regnum, 4 },
+ { 1, REGCACHE_MAP_SKIP, 8 }, /* iacc0 */
+ { 1, tbr_regnum, 4 },
+ { 31, first_gpr_regnum + 1, 4 }, /* gr1 ... gr31 */
+
+ /* Technically, the loadmap addresses are not part of `pr_reg' as
+ found in the elf_prstatus struct. The fields which communicate
+ the loadmap address appear (by design) immediately after
+ `pr_reg' though, and the BFD function elf32_frv_grok_prstatus()
+ has been implemented to include these fields in the register
+ section that it extracts from the core file. So, for our
+ purposes, they may be viewed as registers. */
+
+ { 1, fdpic_loadmap_exec_regnum, 4 },
+ { 1, fdpic_loadmap_interp_regnum, 4 },
+ { 0 }
+ };
+
+static const struct regcache_map_entry frv_linux_fpregmap[] =
+ {
+ { 64, first_fpr_regnum, 4 }, /* fr0 ... fr63 */
+ { 1, fner0_regnum, 4 },
+ { 1, fner1_regnum, 4 },
+ { 1, msr0_regnum, 4 },
+ { 1, msr1_regnum, 4 },
+ { 8, acc0_regnum, 4 }, /* acc0 ... acc7 */
+ { 1, accg0123_regnum, 4 },
+ { 1, accg4567_regnum, 4 },
+ { 1, fsr0_regnum, 4 },
+ { 0 }
+ };