| @@ -50,71 +50,69 @@ hppanbsd_gregset_supplies_p (int regnum) | | | @@ -50,71 +50,69 @@ hppanbsd_gregset_supplies_p (int regnum) |
50 | } | | 50 | } |
51 | | | 51 | |
52 | static int | | 52 | static int |
53 | hppanbsd_fpregset_supplies_p (int regnum) | | 53 | hppanbsd_fpregset_supplies_p (int regnum) |
54 | { | | 54 | { |
55 | return (regnum >= HPPA_FP0_REGNUM && regnum <= HPPA_FP31R_REGNUM); | | 55 | return (regnum >= HPPA_FP0_REGNUM && regnum <= HPPA_FP31R_REGNUM); |
56 | } | | 56 | } |
57 | | | 57 | |
58 | /* Supply the general-purpose registers stored in GREGS to REGCACHE. */ | | 58 | /* Supply the general-purpose registers stored in GREGS to REGCACHE. */ |
59 | | | 59 | |
60 | static void | | 60 | static void |
61 | hppanbsd_supply_gregset (struct regcache *regcache, const void *gregs) | | 61 | hppanbsd_supply_gregset (struct regcache *regcache, const void *gregs) |
62 | { | | 62 | { |
63 | const char *regs = gregs; | | 63 | const char *regs = (const char *) gregs; |
64 | const int *r = gregs; | | | |
65 | int regnum; | | 64 | int regnum; |
66 | | | 65 | |
67 | for (regnum = HPPA_R1_REGNUM; regnum <= HPPA_R31_REGNUM; regnum++) | | 66 | for (regnum = HPPA_R1_REGNUM; regnum <= HPPA_R31_REGNUM; regnum++) |
68 | regcache_raw_supply (regcache, regnum, regs + regnum * 4); | | 67 | regcache_raw_supply (regcache, regnum, regs + regnum * 4); |
69 | | | 68 | |
70 | regcache_raw_supply (regcache, HPPA_SAR_REGNUM, regs + 32 * 4); | | 69 | regcache_raw_supply (regcache, HPPA_SAR_REGNUM, regs + 32 * 4); |
71 | regcache_raw_supply (regcache, HPPA_PCSQ_HEAD_REGNUM, regs + 33 * 4); | | 70 | regcache_raw_supply (regcache, HPPA_PCSQ_HEAD_REGNUM, regs + 33 * 4); |
72 | regcache_raw_supply (regcache, HPPA_PCSQ_TAIL_REGNUM, regs + 34 * 4); | | 71 | regcache_raw_supply (regcache, HPPA_PCSQ_TAIL_REGNUM, regs + 34 * 4); |
73 | regcache_raw_supply (regcache, HPPA_PCOQ_HEAD_REGNUM, regs + 35 * 4); | | 72 | regcache_raw_supply (regcache, HPPA_PCOQ_HEAD_REGNUM, regs + 35 * 4); |
74 | regcache_raw_supply (regcache, HPPA_PCOQ_TAIL_REGNUM, regs + 36 * 4); | | 73 | regcache_raw_supply (regcache, HPPA_PCOQ_TAIL_REGNUM, regs + 36 * 4); |
75 | regcache_raw_supply (regcache, HPPA_IPSW_REGNUM, regs); | | 74 | regcache_raw_supply (regcache, HPPA_IPSW_REGNUM, regs); |
76 | regcache_raw_supply (regcache, HPPA_SR4_REGNUM, regs + 41 * 4); | | 75 | regcache_raw_supply (regcache, HPPA_SR4_REGNUM, regs + 41 * 4); |
77 | regcache_raw_supply (regcache, HPPA_SR4_REGNUM + 1, regs + 37 * 4); | | 76 | regcache_raw_supply (regcache, HPPA_SR4_REGNUM + 1, regs + 37 * 4); |
78 | regcache_raw_supply (regcache, HPPA_SR4_REGNUM + 2, regs + 38 * 4); | | 77 | regcache_raw_supply (regcache, HPPA_SR4_REGNUM + 2, regs + 38 * 4); |
79 | regcache_raw_supply (regcache, HPPA_SR4_REGNUM + 3, regs + 39 * 4); | | 78 | regcache_raw_supply (regcache, HPPA_SR4_REGNUM + 3, regs + 39 * 4); |
80 | regcache_raw_supply (regcache, HPPA_SR4_REGNUM + 4, regs + 40 * 4); | | 79 | regcache_raw_supply (regcache, HPPA_SR4_REGNUM + 4, regs + 40 * 4); |
81 | } | | 80 | } |
82 | | | 81 | |
83 | /* Supply the floating-point registers stored in FPREGS to REGCACHE. */ | | 82 | /* Supply the floating-point registers stored in FPREGS to REGCACHE. */ |
84 | | | 83 | |
85 | static void | | 84 | static void |
86 | hppanbsd_supply_fpregset (struct regcache *regcache, const void *fpregs) | | 85 | hppanbsd_supply_fpregset (struct regcache *regcache, const void *fpregs) |
87 | { | | 86 | { |
88 | const char *regs = fpregs; | | 87 | const char *regs = (const char *) fpregs; |
89 | int regnum; | | 88 | int regnum; |
90 | | | 89 | |
91 | for (regnum = HPPA_FP0_REGNUM; regnum <= HPPA_FP31R_REGNUM; | | 90 | for (regnum = HPPA_FP0_REGNUM; regnum <= HPPA_FP31R_REGNUM; |
92 | regnum += 2, regs += 8) | | 91 | regnum += 2, regs += 8) |
93 | { | | 92 | { |
94 | regcache_raw_supply (regcache, regnum, regs); | | 93 | regcache_raw_supply (regcache, regnum, regs); |
95 | regcache_raw_supply (regcache, regnum + 1, regs + 4); | | 94 | regcache_raw_supply (regcache, regnum + 1, regs + 4); |
96 | } | | 95 | } |
97 | } | | 96 | } |
98 | | | 97 | |
99 | /* Collect the general-purpose registers from REGCACHE and store them | | 98 | /* Collect the general-purpose registers from REGCACHE and store them |
100 | in GREGS. */ | | 99 | in GREGS. */ |
101 | | | 100 | |
102 | static void | | 101 | static void |
103 | hppanbsd_collect_gregset (const struct regcache *regcache, | | 102 | hppanbsd_collect_gregset (const struct regcache *regcache, |
104 | void *gregs, int regnum) | | 103 | void *gregs, int regnum) |
105 | { | | 104 | { |
106 | char *regs = gregs; | | 105 | char *regs = (char *) gregs; |
107 | int *r = gregs; | | | |
108 | int i; | | 106 | int i; |
109 | | | 107 | |
110 | for (i = HPPA_R1_REGNUM; i <= HPPA_R31_REGNUM; i++) | | 108 | for (i = HPPA_R1_REGNUM; i <= HPPA_R31_REGNUM; i++) |
111 | { | | 109 | { |
112 | if (regnum == -1 || regnum == i) | | 110 | if (regnum == -1 || regnum == i) |
113 | regcache_raw_collect (regcache, i, regs + i * 4); | | 111 | regcache_raw_collect (regcache, i, regs + i * 4); |
114 | } | | 112 | } |
115 | | | 113 | |
116 | if (regnum == -1 || regnum == HPPA_IPSW_REGNUM) | | 114 | if (regnum == -1 || regnum == HPPA_IPSW_REGNUM) |
117 | regcache_raw_collect (regcache, HPPA_IPSW_REGNUM, regs); | | 115 | regcache_raw_collect (regcache, HPPA_IPSW_REGNUM, regs); |
118 | if (regnum == -1 || regnum == HPPA_PCOQ_HEAD_REGNUM) | | 116 | if (regnum == -1 || regnum == HPPA_PCOQ_HEAD_REGNUM) |
119 | regcache_raw_collect (regcache, HPPA_PCOQ_HEAD_REGNUM, regs + 35 * 4); | | 117 | regcache_raw_collect (regcache, HPPA_PCOQ_HEAD_REGNUM, regs + 35 * 4); |
120 | if (regnum == -1 || regnum == HPPA_PCOQ_TAIL_REGNUM) | | 118 | if (regnum == -1 || regnum == HPPA_PCOQ_TAIL_REGNUM) |
| @@ -141,27 +139,27 @@ hppanbsd_collect_gregset (const struct r | | | @@ -141,27 +139,27 @@ hppanbsd_collect_gregset (const struct r |
141 | if (regnum == -1 || regnum == HPPA_SR4_REGNUM + 3) | | 139 | if (regnum == -1 || regnum == HPPA_SR4_REGNUM + 3) |
142 | regcache_raw_collect (regcache, HPPA_SR4_REGNUM + 3, regs + 39 * 4); | | 140 | regcache_raw_collect (regcache, HPPA_SR4_REGNUM + 3, regs + 39 * 4); |
143 | if (regnum == -1 || regnum == HPPA_SR4_REGNUM + 4) | | 141 | if (regnum == -1 || regnum == HPPA_SR4_REGNUM + 4) |
144 | regcache_raw_collect (regcache, HPPA_SR4_REGNUM + 4, regs + 40 * 4); | | 142 | regcache_raw_collect (regcache, HPPA_SR4_REGNUM + 4, regs + 40 * 4); |
145 | } | | 143 | } |
146 | | | 144 | |
147 | /* Collect the floating-point registers from REGCACHE and store them | | 145 | /* Collect the floating-point registers from REGCACHE and store them |
148 | in FPREGS. */ | | 146 | in FPREGS. */ |
149 | | | 147 | |
150 | static void | | 148 | static void |
151 | hppanbsd_collect_fpregset (const struct regcache *regcache, | | 149 | hppanbsd_collect_fpregset (const struct regcache *regcache, |
152 | void *fpregs, int regnum) | | 150 | void *fpregs, int regnum) |
153 | { | | 151 | { |
154 | char *regs = fpregs; | | 152 | char *regs = (char *) fpregs; |
155 | int i; | | 153 | int i; |
156 | | | 154 | |
157 | for (i = HPPA_FP0_REGNUM; i <= HPPA_FP31R_REGNUM; i += 2, regs += 8) | | 155 | for (i = HPPA_FP0_REGNUM; i <= HPPA_FP31R_REGNUM; i += 2, regs += 8) |
158 | { | | 156 | { |
159 | if (regnum == -1 || regnum == i || regnum == i + 1) | | 157 | if (regnum == -1 || regnum == i || regnum == i + 1) |
160 | { | | 158 | { |
161 | regcache_raw_collect (regcache, i, regs); | | 159 | regcache_raw_collect (regcache, i, regs); |
162 | regcache_raw_collect (regcache, i + 1, regs + 4); | | 160 | regcache_raw_collect (regcache, i + 1, regs + 4); |
163 | } | | 161 | } |
164 | } | | 162 | } |
165 | } | | 163 | } |
166 | | | 164 | |
167 | | | 165 | |