sim: bfin: new PINT model
[external/binutils.git] / sim / bfin / ChangeLog
1 2012-04-09  Mike Frysinger  <vapier@gentoo.org>
2
3         * configure.ac (SIM_AC_OPTION_HARDWARE): Add bfin_pint.
4         * configure: Regenerate.
5         * dv-bfin_pint.c, dv-bfin_pint.h: New device model.
6         * machs.c (bf542_dev): Add PINT register blocks.
7         (bf544_dev, bf547_dev): Likewise.
8         (PINT_PIQS): Define.
9         (bf54x_port): Add pint/gpio routing.
10         * machs.h (BFIN_MMR_PINT_SIZE): Define.
11
12 2012-04-09  Mike Frysinger  <vapier@gentoo.org>
13
14         * configure.ac (SIM_AC_OPTION_HARDWARE): Add bfin_gpio2.
15         * configure: Regenerate.
16         * dv-bfin_gpio2.c, dv-bfin_gpio2.h: New device model.
17         * machs.c (bf54x_mem): Delete GPIO mem stub.
18         (bf542_dev): Add GPIO register blocks.
19         (bf544_dev, bf547_dev): Likewise.
20         * machs.h (BFIN_MMR_GPIO2_SIZE): Define.
21
22 2012-04-09  Robin Getz  <robin.getz@analog.com>
23
24         * bfin-sim.c (decode_dsp32shift_0): Extract the sign for ASHIFT
25         and LSHIFT, and set ASTAT based on the before/after values.
26         Rename "val" to "acc" to be consistent with other code branches.
27
28 2012-04-09  Robin Getz  <robin.getz@analog.com>
29
30         * bfin-sim.c (sgn_extend): New helper.
31         (decode_dsp32shiftimm_0): Call lshift when newimmag is more
32         than 16, otherwise call ashiftrt.  Set ASTAT fields as needed.
33         For accumulator shifts, call new sgn_extend helper.
34
35 2012-04-08  Mike Frysinger  <vapier@gentoo.org>
36
37         * bfin-sim.c (illegal_instruction_or_combination): New helper.
38         (decode_ProgCtrl_0): Call illegal_instruction_or_combination instead
39         of illegal_instruction.
40         (decode_PushPopReg_0, decode_CCflag_0, decode_CC2dreg_0,
41         decode_LDSTpmod_0, decode_dagMODim_0, decode_dagMODik_0,
42         decode_dspLDST_0, decode_LDST_0, _interp_insn_bfin): Likewise.
43         (decode_PushPopMultiple_0): Call illegal_instruction_combination when
44         PARALLEL_GROUP is not BFIN_PARALLEL_NONE.
45         (decode_CCflag_0, decode_REGMV_0, decode_ALU2op_0, decode_PTR2op_0,
46         decode_COMPI2opD_0, decode_COMPI2opP_0): Likewise.
47         (decode_CC2stat_0): Check PARALLEL_GROUP before cbit.
48         (decode_LDSTpmod_0): Call illegal_instruction_combination when
49         PARALLEL_GROUP is BFIN_PARALLEL_GROUP2.
50         (decode_dagMODim_0, decode_dagMODik_0, decode_LDST_0,
51         decode_LDSTiiFP_0, decode_LDSTii_0): Likewise.
52
53 2012-04-08  Mike Frysinger  <vapier@gentoo.org>
54
55         * bfin-sim.h (bfin_parallel_group): New enum.
56         (bfin_cpu_state): Add new "group" member.
57         (PARALLEL_GROUP): Define.
58         * bfin-sim.c (decode_ProgCtrl_0): Change INSN_LEN check to
59         PARALLEL_GROUP.
60         (decode_CaCTRL_0, decode_PushPopReg_0, decode_ccMV_0, decode_CCflag_0,
61         decode_CC2dreg_0, decode_CC2stat_0, decode_BRCC_0, decode_UJUMP_0,
62         decode_LOGI2op_0, decode_LoopSetup_0, decode_LDIMMhalf_0,
63         decode_CALLa_0, decode_linkage_0): Likewise.
64         (_interp_insn_bfin): Set PARALLEL_GROUP.
65         (interp_insn_bfin): Likewise.
66
67 2012-04-08  Mike Frysinger  <vapier@gentoo.org>
68
69         * bfin-sim.c (decode_dsp32alu_0): Delete extra space in TRACE_INSN.
70
71 2012-04-01  Mike Frysinger  <vapier@gentoo.org>
72
73         * bfin-sim.c (_interp_insn_bfin): Call illegal_instruction_combination
74         when INSN_LEN is non-zero before 32bit decode.
75
76 2012-04-01  Mike Frysinger  <vapier@gentoo.org>
77
78         * bfin-dis.c (fmtconst): Replace decimal handling with a single
79         sprintf call and the '*' field width.
80
81 2012-04-01  Mike Frysinger  <vapier@gentoo.org>
82
83         * machs.c (bfin_model_map_bfrom): Return when mnum is 535.
84
85 2012-04-01  Mike Frysinger  <vapier@gentoo.org>
86
87         * interp.c (bfin_user_init): Move auxvt_size decl from top to
88         inside of auxvt check.
89
90 2012-03-31  Mike Frysinger  <vapier@gentoo.org>
91
92         * dv-bfin_sic.c (bfin_sic_finish): Change iwr1 to iwr2.
93
94 2012-03-31  Mike Frysinger  <vapier@gentoo.org>
95
96         * devices.c: Include devices.h.
97
98 2012-03-24  Mike Frysinger  <vapier@gentoo.org>
99
100         * aclocal.m4, config.in, configure: Regenerate.
101
102 2012-03-19  Robin Getz  <robin.getz@analog.com>
103             Mike Frysinger  <vapier@gentoo.org>
104
105         * bfin-sim.c (lshift): Add an overflow flag.  Delete now unused
106         i, j, and tmp vars.  Add a new v_i var.  Split the overflow logic
107         out from the saturate logic.  Do not set V ASTAT bits when working
108         with accumulators.
109         (decode_ALU2op_0): Add new argument to lshift call.
110         (decode_LOGI2op_0, decode_dsp32shift_0, decode_dsp32shiftimm_0):
111         Likewise.
112
113 2012-03-18  Mike Frysinger  <vapier@gentoo.org>
114
115         * dv-bfin_ebiu_amc.c (struct bfin_ebiu_amc): Add bank_base.
116         (bfin_ebiu_amc_write_amgctl): Replace BFIN_EBIU_AMC_BASE with
117         amc->bank_base.
118         (bfin_ebiu_amc_finish): Assign BFIN_EBIU_AMC_BASE to amc->bank_base.
119
120 2012-03-18  Mike Frysinger  <vapier@gentoo.org>
121
122         * dv-bfin_ebiu_amc.c (bfin_ebiu_amc_attach_address_callback): Use
123         ARRAY_SIZE rather than hardcoded constant.
124
125 2012-02-04  Mike Frysinger  <vapier@gentoo.org>
126
127         * config.in: Regenerate.
128         * configure: Likewise.
129         * configure.ac: Add linux/types.h to AC_CHECK_HEADERS.
130         * dv-eth_phy.c: Check for HAVE_LINUX_TYPES_H, and delete __u16 and
131         _LINUX_TYPES_H defines.
132
133 2011-12-03  Mike Frysinger  <vapier@gentoo.org>
134
135         * interp.c (bfin_syscall): Increase _tbuf storage.  Declare new local
136         tstr buffer.  Call cb_get_string on tstr when handling CB_SYS_stat64,
137         CB_SYS_lstat64, CB_SYS_open, CB_SYS_write, CB_SYS_unlink,
138         CB_SYS_truncate, CB_SYS_rename, CB_SYS_stat, CB_SYS_lstat.  Include
139         tstr in the tbuf output.
140
141 2011-12-03  Mike Frysinger  <vapier@gentoo.org>
142
143         * Makefile.in: Delete all dependency rules.
144         * aclocal.m4, configure: Regenerate.
145
146 2011-10-19  Mike Frysinger  <vapier@gentoo.org>
147
148         * configure: Regenerate after common/acinclude.m4 update.
149
150 2011-10-17  Mike Frysinger  <vapier@gentoo.org>
151
152         * configure.ac: Change include to common/acinclude.m4.
153         * aclocal.m4, configure: Regenerate.
154
155 2011-10-17  Mike Frysinger  <vapier@gentoo.org>
156
157         * configure.ac: Change AC_PREREQ to 2.64.  Delete AC_CONFIG_HEADER
158         call.  Replace common.m4 include with SIM_AC_COMMON.
159         * configure: Regenerate.
160
161 2011-09-28  Mike Frysinger  <vapier@gentoo.org>
162
163         * bfin-sim.c (decode_dsp32shift_0): Use STORE() for VIT_MAX insns.
164
165 2011-07-05  Mike Frysinger  <vapier@gentoo.org>
166
167         * interp.c (sim_do_command): Delete.
168
169 2011-07-01  Mike Frysinger  <vapier@gentoo.org>
170
171         * interp.c (cb_linux_stat_map_32, cb_linux_stat_map_64): Rename from
172         stat_map_32 and stat_map_64.
173         (cb_libgloss_stat_map_32): New stat map.
174         (stat_map_32, stat_map_64): New stat map pointers.
175         (bfin_user_init): Assign stat_map_32 to cb_linux_stat_map_32 and
176         stat_map_64 to cb_linux_stat_map_64.
177         (bfin_virtual_init): New function.
178         (sim_create_inferior): Call bfin_virtual_init for all other envs.
179
180 2011-06-22  Mike Frysinger  <vapier@gentoo.org>
181
182         * interp.c (bfin_syscall): Delete old comment.  Set dreg 1 to
183         sc.result2 and dreg 2 to sc.errcode.
184
185 2011-06-18  Robin Getz  <robin.getz@analog.com>
186
187         * bfin-sim.c (decode_dsp32shift_0): Clear ASTAT[AV] if val is 0,
188         else set it.  Set ASTAT[AVS] if val is 0.  Do this for LSHIFT and
189         ASHIFT accumulator insns.
190
191 2011-06-18  Robin Getz  <robin.getz@analog.com>
192
193         * bfin-sim.c (ashiftrt): If size is 40, do not call SET_ASTATREG.
194         (lshiftrt): Likewise.
195
196 2011-06-18  Robin Getz  <robin.getz@analog.com>
197
198         * bfin-sim.c (decode_dsp32shift_0): Use get_unextended_acc
199         rather than get_extended_acc in LSHIFT insns.
200
201 2011-06-18  Robin Getz  <robin.getz@analog.com>
202
203         * bfin-sim.c (decode_macfunc): Handle MM when mmod is M_TFU.
204         Check MM once when mmod is M_FU to match M_TFU better.
205
206 2011-06-18  Robin Getz  <robin.getz@analog.com>
207
208         * bfin-sim.c (decode_dsp32shiftimm_0): When shift is greater than
209         32, perform a left shift.  Update the corresponding AV bit.  Set
210         AZ when the low 32bits are also zero.
211
212 2011-06-18  Robin Getz  <robin.getz@analog.com>
213
214         * bfin-sim.c (decode_dsp32shiftimm_0): With left shift vector insns,
215         call lshift only when count is positive.  Otherwise, call ashiftrt.
216         With arithmetic right shift insns, call ashiftrt when the value is
217         small enough, otherwise call lshift.
218
219 2011-06-18  Robin Getz  <robin.getz@analog.com>
220
221         * bfin-sim.c (extract_mult): Call saturate_s16 directly when
222         mmod is M_IH rather than computing the result by hand.
223
224 2011-06-18  Robin Getz  <robin.getz@analog.com>
225
226         * bfin-sim.c (decode_macfunc): Add nosat_acc to track acc value
227         before saturation, set sat when more cases saturate, and set the
228         overflow bit based on these results.  For M_TFU, M_IU, M_FU, and
229         M_W32, change the max values compared against.
230         (decode_dsp32mac_0): Delete v_i and add v_0 and v_1.  Pass v_1
231         when processing MAC1 and pass v_0 when processing MAC0.  Combine
232         the results into the V/VS ASTAT bits.
233
234 2011-06-18  Robin Getz  <robin.getz@analog.com>
235
236         * bfin-sim.c (extract_mult): Call saturate_s32 when MM is set
237         and mmod is M_IU.  Call saturate_s16 when MM is set and mmod
238         is M_TFU.
239
240 2011-06-18  Robin Getz  <robin.getz@analog.com>
241
242         * bfin-sim.c (decode_multfunc): Call new is_macmod_signed, and
243         allow MM to sign extend all the time.
244         (decode_macfunc): Likewise.  Drop sign extension of unsigned
245         values.
246
247 2011-06-18  Robin Getz  <robin.getz@analog.com>
248
249         * bfin-sim.c (saturate_s40_astat): Change ">=" to ">".
250         (decode_macfunc): Likewise when mmod is M_IH.
251
252 2011-06-18  Mike Frysinger  <vapier@gentoo.org>
253
254         * interp.c (sim_create_inferior): Change free to freeargv.
255
256 2011-06-04  Mike Frysinger  <vapier@gentoo.org>
257
258         * machs.c (bf534_dev, bf537_dev): Add glue-or devices.
259         (bf537_port): Define applicable devices with PORT to the glue-or
260         devices instead of SIC.
261         (bfin_model_hw_tree_init): Drop old sim_hw_parse call for bfin_sic.
262         Only parse reg/type when the device has an address.  Move the call
263         to dv_bfin_hw_port_parse up before slash check.
264
265 2011-06-04  Mike Frysinger  <vapier@gentoo.org>
266
267         * dv-bfin_sic.c (ENC, DEC_PIN, DEC_SIC): Move above the
268         BFIN_SIC_TO_CEC_PORTS definition.
269         (SIC_PORTS): New define.
270         (bfin_sic_50x_ports, bfin_sic_51x_ports, bfin_sic_52x_ports,
271         bfin_sic_533_ports, bfin_sic_537_ports, bfin_sic_538_ports,
272         bfin_sic_54x_ports, bfin_sic_561_ports, bfin_sic_59x_ports):
273         Delete old layouts.
274         (bfin_sic1_ports, bfin_sic2_ports, bfin_sic3_ports,
275         bfin_sic_561_ports): Define new layouts with SIC_PORTS().
276         (bfin_sic_finish): Change reference to bfin_sic_50x_ports,
277         bfin_sic_51x_ports, bfin_sic_52x_ports, and bfin_sic_538_ports
278         to bfin_sic2_ports.  Change reference to bfin_sic_533_ports,
279         bfin_sic_537_ports, and bfin_sic_59x_ports to bfin_sic1_ports.
280         Change reference to bfin_sic_54x_ports to bfin_sic3_ports.
281         * machs.c (bfin_port_layout): New structure.
282         (bfin_model_data): Add new "port" and "port_count" members.
283         (PORT, SIC): New defines.
284         (bf000_port, bf50x_port, bf51x_port, bf52x_port, bf533_port,
285         bf537_port, bf538_port, bf54x_port, bf561_port, bf592_port):
286         Move and redefine port layout from dv-bfin_sic.c to here.
287         (bf504_port, bf506_port, bf512_port, bf514_port, bf516_port,
288         bf518_port, bf522_port, bf523_port, bf524_port, bf525_port,
289         bf526_port, bf527_port, bf531_port, bf532_port, bf534_port,
290         bf536_port, bf539_port, bf542_port, bf544_port, bf547_port,
291         bf548_port, bf549_port): New defines.
292         (bfin_model_data): Link in new bfin_port_layout.port member.
293         (dv_bfin_hw_port_parse): New function.
294         (dv_bfin_hw_parse): Call new dv_bfin_hw_port_parse function.
295         (bfin_model_hw_tree_init): Replace calls to sim_hw_parse for
296         bfin_sic links with new dv_bfin_hw_port_parse function.
297
298 2011-06-03  Mike Frysinger  <vapier@gentoo.org>
299
300         * dv-bfin_dma.c (bfin_dma_io_write_buffer): Fix indentation.
301
302 2011-05-25  Mike Frysinger  <vapier@gentoo.org>
303
304         * sim-main.h (TRACE_SYSCALL): Change EVENTS to SYSCALL.
305
306 2011-05-25  Mike Frysinger  <vapier@gentoo.org>
307
308         * dv-bfin_cec.h (BFIN_COREMMR_CEC_{BASE,SIZE}): Move to ...
309         * dv-bfin_ctimer.h (BFIN_COREMMR_CTIMER_{BASE,SIZE}): Move to ...
310         * dv-bfin_dma.h (BFIN_MMR_DMA_SIZE): Move to ...
311         * dv-bfin_dmac.h (BFIN_MMR_DMAC{0,1}_BASE): Move to ...
312         * dv-bfin_ebiu_amc.h (BF{IN,50X,54X}_MMR_EBIU_AMC_SIZE): Move to ...
313         * dv-bfin_ebiu_ddrc.h (BFIN_MMR_EBIU_DDRC_SIZE): Move to ...
314         * dv-bfin_ebiu_sdc.h (BFIN_MMR_EBIU_SDC_SIZE): Move to ...
315         * dv-bfin_emac.h (BFIN_MMR_EMAC_{BASE,SIZE}): Move to ...
316         * dv-bfin_eppi.h (BFIN_MMR_EPPI_SIZE): Move to ...
317         * dv-bfin_evt.h (BFIN_COREMMR_EVT_{BASE,SIZE}): Move to ...
318         * dv-bfin_gpio.h (BFIN_MMR_GPIO_SIZE): Move to ...
319         * dv-bfin_gptimer.h (BFIN_MMR_GPTIMER_SIZE): Move to ...
320         * dv-bfin_jtag.h (BFIN_COREMMR_JTAG_{BASE,SIZE}): Move to ...
321         * dv-bfin_mmu.h (BFIN_COREMMR_MMU_{BASE,SIZE}): Move to ...
322         * dv-bfin_nfc.h (BFIN_MMR_NFC_SIZE): Move to ...
323         * dv-bfin_otp.h (BFIN_MMR_OTP_SIZE): Move to ...
324         * dv-bfin_pfmon.h (BFIN_COREMMR_PFMON_{BASE,SIZE}): Move to ...
325         * dv-bfin_pll.h (BFIN_MMR_PLL_{BASE,SIZE}): Move to ...
326         * dv-bfin_ppi.h (BFIN_MMR_PPI_SIZE): Move to ...
327         * dv-bfin_rtc.h (BFIN_MMR_RTC_SIZE): Move to ...
328         * dv-bfin_sic.h (BFIN_MMR_SIC_{BASE,SIZE}): Move to ...
329         * dv-bfin_spi.h (BFIN_MMR_SPI_SIZE): Move to ...
330         * dv-bfin_trace.h (BFIN_COREMMR_TRACE_{BASE,SIZE}): Move to ...
331         * dv-bfin_twi.h (BFIN_MMR_TWI_SIZE): Move to ...
332         * dv-bfin_uart.h (BFIN_MMR_UART_SIZE): Move to ...
333         * dv-bfin_uart2.h (BFIN_MMR_UART2_SIZE): Move to ...
334         * dv-bfin_wdog.h (BFIN_MMR_WDOG_SIZE): Move to ...
335         * dv-bfin_wp.h (BFIN_COREMMR_WP_{BASE,SIZE}): Move to ...
336         * machs.h: ... here.
337         * machs.c: Delete all dv-bfin_*.h includes except for cec/dmac.
338
339 2011-05-25  Mike Frysinger  <vapier@gentoo.org>
340
341         * Makefile.in (dv-bfin_pfmon.o): New target.
342         * configure.ac (SIM_AC_OPTION_HARDWARE): Add bfin_pfmon.
343         * configure: Regenerated.
344         * dv-bfin_pfmon.c, dv-bfin_pfmon.h: New files.
345         * machs.c: Add include new bfin_pfmon.h.
346         (bfin_core_dev): Add pfmon.
347
348 2011-05-25  Mike Frysinger  <vapier@gentoo.org>
349
350         * machs.c (bf526_roms): Add a region with rev of 2.
351         (bf54x_roms): Add regions with rev of 4.
352         * bfroms/all.h: Include new bf526-0.2.h, bf54x-0.4.h, and
353         bf54x_l1-0.4.h headers.
354         * bfroms/bf526-0.2.h, bfroms/bf54x-0.4.h, bfroms/bf54x_l1-0.4.h:
355         New header files.
356
357 2011-05-14  Mike Frysinger  <vapier@gentoo.org>
358
359         * bfin-sim.c (decode_PushPopReg_0): Delete (grp == 1 && reg == 6)
360         check for SP reg.
361
362 2011-05-14  Mike Frysinger  <vapier@gentoo.org>
363
364         * dv-bfin_uart.c (bfin_uart_write_byte): Add a mcr arg.  Declare a
365         local uart.  When LOOP_ENA is set in mcr, write to the saved byte
366         and count fields of the uart.
367         (bfin_uart_io_write_buffer): Pass uart->mcr to bfin_uart_write_byte
368         and bfin_uart_get_next_byte.
369         (bfin_uart_get_next_byte): Add a mcr arg.  Move uart->saved_count
370         check first, and skip the remaining code when LOOP_ENA is set in mcr.
371         * dv-bfin_uart.h (bfin_uart_write_byte): Add an mcr argument.
372         (bfin_uart_get_next_byte): Likewise.
373         (XOFF, MRTS, RFIT, RFRT, LOOP_ENA, FCPOL, ARTS, ACTS): Define.
374         * dv-bfin_uart2.c (bfin_uart_io_write_buffer): Padd uart->mcr when
375         calling bfin_uart_write_byte and bfin_uart_get_next_byte.
376
377 2011-05-09  Mike Frysinger  <vapier@gentoo.org>
378
379         * dv-bfin_uart2.c (bfin_uart_io_read_buffer): Clear DR/THRE/TEMT bits
380         from uart->lsr before setting them.
381
382 2011-04-27  Mike Frysinger  <vapier@gentoo.org>
383
384         * dv-bfin_dmac.c (bfin_dmac): Constify pmap array.
385         (bfin_dmac_50x_pmap, bfin_dmac_51x_pmap, bfin_dmac_52x_pmap,
386         bfin_dmac_533_pmap, bfin_dmac_537_pmap, bfin_dmac0_538_pmap,
387         bfin_dmac1_538_pmap, bfin_dmac0_54x_pmap, bfin_dmac1_54x_pmap,
388         bfin_dmac0_561_pmap, bfin_dmac1_561_pmap, bfin_dmac_59x_pmap):
389         Likewise.
390
391 2011-04-26  Mike Frysinger  <vapier@gentoo.org>
392
393         * dv-bfin_gpio.c (bfin_gpio_forward_ouput): New function.
394         (bfin_gpio_io_write_buffer): Store the current port state into
395         "data", and call bfin_gpio_forward_ouput when the data or dir
396         MMRs are updated.
397         (bfin_gpio_ports): Change p0..p15 to bidirect_port.
398
399 2011-04-26  Mike Frysinger  <vapier@gentoo.org>
400
401         * dv-bfin_gpio.c (bfin_gpio): Add "int_state" member.
402         (bfin_gpio_forward_int, bfin_gpio_forward_ints): New functions.
403         (bfin_gpio_io_write_buffer): Call bfin_gpio_forward_int when the
404         mask a or mask b MMRs are written.
405         (bfin_gpio_port_event): When handling edge gpios, set the bit in
406         int_state, call bfin_gpio_forward_ints, and then clear the bit.
407         When handling level gpios, clear/set the bit in int_state rather
408         than returning immediately.  Call bfin_gpio_forward_ints instead
409         of checking mask[ab] and calling HW_TRACE/hw_port_event directly.
410
411 2011-04-16  Mike Frysinger  <vapier@gentoo.org>
412
413         * bfin-sim.c (decode_dsp32alu_0): Call STORE instead of SET_DREG for
414         BYTEOP2P, BYTEOP3P, BYTEOP1P, BYTEOP16P, BYTEOP16M, BYTEPACK, and
415         BYTEUNPACK.
416         (decode_dsp32shift_0): Call STORE instead of SET_DREG for PACK,
417         BITMUX, EXTRACT, DEPOSIT, ALIGN8, ALIGN16, and ALIGN24.
418
419 2011-04-14  Mike Frysinger  <vapier@gentoo.org>
420
421         * bfin-sim.c (decode_dsp32alu_0): Set DIS_ALGN_EXPT when handling
422         BYTEOP2P, BYTEOP3P, SAA, BYTEOP1P, BYTEOP16P, BYTEOP16M, BYTEPACK,
423         and BYTEUNPACK insns.
424
425 2011-04-11  Mike Frysinger  <vapier@gentoo.org>
426
427         * dv-bfin_sic.c (bfin_sic_port_event): New helper function.
428         (bfin_sic_52x_port_event, bfin_sic_537_port_event,
429         bfin_sic_54x_port_event, bfin_sic_561_port_event): Include level
430         in the trace output, and call the new bfin_sic_port_event func.
431
432 2011-04-11  Mike Frysinger  <vapier@gentoo.org>
433
434         * dv-bfin_gpio.c (bfin_gpio_ports): Add p15.
435
436 2011-04-01  Mike Frysinger  <vapier@gentoo.org>
437
438         * dv-bfin_otp.c (bfin_otp_ports): Declare.
439         (bfin_otp_finish): Call set_hw_ports with bfin_otp_ports.
440
441 2011-03-29  Mike Frysinger  <vapier@gentoo.org>
442
443         * configure: Regenerate after common/aclocal.m4 changes.
444
445 2011-03-28  Robin Getz  <robin.getz@analog.com>
446
447         * bfin-sim.c (decode_dsp32alu_0): Cast high 16bits of A0.W to bs16
448         and add to casted low 16bits of A0.L and store in val0.  Cast high
449         16bits of A1.W to bs16 and add to casted low 16bits of A1.L and
450         store in val1.  Delete bit checks of val0 and val1.
451
452 2011-03-26  Robin Getz  <robin.getz@analog.com>
453
454         * bfin-sim.c (decode_dsp32alu_0): Set result to 0x7FFFFFFF when
455         the result was 0x80000000 for RND12 subtraction.
456
457 2011-03-26  Robin Getz  <robin.getz@analog.com>
458
459         * bfin-sim.c (decode_dsp32alu_0): Set VS when V is set.
460
461 2011-03-24  Mike Frysinger  <vapier@gentoo.org>
462
463         * dv-bfin_gpio.c (bfin_gpio_port_event): Call HW_TRACE at every
464         major code flow point.
465         * dv-bfin_sic.c (bfin_sic_forward_interrupts): Call HW_TRACE just
466         before calling hw_port_event on ourselves.
467         (bfin_sic_52x_port_event, bfin_sic_537_port_event,
468         bfin_sic_54x_port_event, bfin_sic_561_port_event): Call HW_TRACE
469         at the start of the function.
470
471 2011-03-24  Mike Frysinger  <vapier@gentoo.org>
472
473         * dv-bfin_gpio.c (bfin_gpio_port_event): Split dir/inen bit checking.
474         Normalize "level" to 0/1 values.  Shift "level" over by "my_port".
475         Invert port->both bit check.
476
477 2011-03-24  Mike Frysinger  <vapier@gentoo.org>
478
479         * dv-bfin_gpio.c (bfin_gpio_io_write_buffer): Subtract 2 from the
480         valuep pointer for clear MMRs, 4 for set MMRs, and 6 for toggle MMRs.
481
482 2011-03-23  Mike Frysinger  <vapier@gentoo.org>
483
484         * TODO: Document some known SIC issues.
485
486 2011-03-23  Mike Frysinger  <vapier@gentoo.org>
487
488         * devices.h (dv_w1c): Fix typos in documentation of "bits" arg.
489         * dv-bfin_cec.c (bfin_cec_io_write_buffer): Pass 0xffee to dv_w1c_4.
490         * dv-bfin_emac.c (bfin_emac_io_write_buffer): Pass 0xe1 to dv_w1c_4
491         for systat MMR and -1 to dv_w1c_4 for [rt]x_stky/mmc_[rt]irqs MMRs.
492         * dv-bfin_eppi.c (bfin_eppi_io_write_buffer): Pass 0x1ff to dv_w1c_2.
493         * dv-bfin_gpio.c (bfin_gpio_io_write_buffer): Invert bits to dv_w1c_2.
494         * dv-bfin_jtag.c (bfin_jtag_io_write_buffer): Invert bits to dv_w1c_4.
495         * dv-bfin_nfc.c (bfin_nfc_io_write_buffer): Invert bits to dv_w1c_2.
496         * dv-bfin_otp.c (bfin_otp_io_write_buffer): Invert bits to dv_w1c_2.
497         * dv-bfin_ppi.c (bfin_ppi_io_write_buffer): Invert bits to dv_w1c_2.
498         * dv-bfin_rtc.c (bfin_rtc_io_write_buffer): Invert bits to dv_w1c_2.
499         * dv-bfin_spi.c (bfin_spi_io_write_buffer): Invert bits to dv_w1c_2.
500         * dv-bfin_twi.c (bfin_twi_io_write_buffer): Invert bits to dv_w1c_2.
501         * dv-bfin_uart2.c (bfin_uart_io_write_buffer): Invert bits to dv_w1c_2.
502
503 2011-03-23  Mike Frysinger  <vapier@gentoo.org>
504
505         * dv-bfin_uart.h (TFI, BI, FE, PE, OE): Define.
506
507 2011-03-23  Mike Frysinger  <vapier@gentoo.org>
508
509         * dv-bfin_twi.h (LOSTARB): Rename from LOSTARG.
510
511 2011-03-23  Robin Getz  <robin.getz@analog.com>
512
513         * bfin-sim.c (decode_dsp32shift_0): Set acc0 to the unextended
514         value for the VIT_MAX insn, and mask off the result when done.
515
516 2011-03-23  Robin Getz  <robin.getz@analog.com>
517
518         * bfin-sim.c (decode_dsp32alu_0): Set A1 to a1_lo when up_hi is false,
519         and set A0 to a0_lo when up_lo is false.
520
521 2011-03-23  Robin Getz  <robin.getz@analog.com>
522
523         * bfin-sim.c (decode_dsp32alu_0): Call saturate_s40_astat instead of
524         saturate_s40, and use the v parameter to update the AV bit.  Set the
525         AC bit only when the final result is 0.
526
527 2011-03-23  Mike Frysinger  <vapier@gentoo.org>
528
529         * dv-bfin_sic.c (ENC, DEC_PIN, DEC_SIC): Define.
530         (bfin_sic_50x_ports, bfin_sic_51x_ports, bfin_sic_52x_ports,
531         bfin_sic_533_ports, bfin_sic_537_ports, bfin_sic_538_ports,
532         bfin_sic_54x_ports, bfin_sic_561_ports, bfin_sic_59x_ports):
533         Encode ids with the ENC macro.
534         (bfin_sic_52x_port_event, bfin_sic_537_port_event,
535         bfin_sic_54x_port_event, bfin_sic_561_port_event): Set idx
536         from my_port with DEC_SIC, and set bit from my_port with DEC_PIN.
537         (bfin_sic_533_port_event): Delete.
538         (bfin_sic_finish): Call set_hw_port_event with
539         bfin_sic_537_port_event for BF533 and BF59x targets.
540
541 2011-03-23  Robin Getz  <robin.getz@analog.com>
542
543         * bfin-sim.c (decode_dsp32alu_0): Drop the src0/src1 check for
544         BYTEOP1P, BYTEOP2P, and BYTEOP3P insns.
545
546 2011-03-23  Mike Frysinger  <vapier@gentoo.org>
547
548         * machs.c (bf50x_dev, bf512_dev, bf516_dev, bf522_dev, bf526_dev,
549         bf533_dev, bf534_dev, bf537_dev, bf538_dev, bf561_dev, bf592_dev):
550         Change bfin_gpio addresses from f/g/h to 5/6/7.
551         (bfin_model_hw_tree_init): Add the bfin_gpio address base to 'a'.
552
553 2011-03-17  Mike Frysinger  <vapier@gentoo.org>
554
555         * configure.ac (AC_CHECK_FUNCS): Check for kill and pread.
556         * configure: Regenerate.
557         * config.in: Regenerate.
558         * interp.c (bfin_syscall): Check for HAVE_{KILL,PREAD} before using
559         kill or pread.
560
561 2011-03-15  Mike Frysinger  <vapier@gentoo.org>
562
563         * Makefile.in (dv-bfin_gpio.o): New target.
564         * configure.ac (SIM_AC_OPTION_HARDWARE): Add bfin_gpio.
565         * configure: Regenerate.
566         * dv-bfin_gpio.c, dv-bfin_gpio.h: New files.
567         * machs.c: Include dv-bfin_gpio.h.
568         (bf50x_mem, bf51x_mem, bf52x_mem, bf531_mem, bf532_mem, bf533_mem,
569         bf534_mem, bf536_mem, bf537_mem, bf538_mem, bf561_mem, bf592_mem):
570         Delete GPIO memory stubs.
571         (bf50x_dev, bf512_dev, bf516_dev, bf522_dev, bf526_dev, bf533_dev,
572         bf534_dev, bf537_dev, bf538_dev, bf561_dev, bf592_dev): Add GPIO
573         peripheral devices.
574         (bfin_model_hw_tree_init): Hook up GPIO interrupts to SIC.
575
576 2011-03-15  Mike Frysinger  <vapier@gentoo.org>
577
578         * bfroms/bf50x-0.0.h, bfroms/bf51x-0.0.h, bfroms/bf51x-0.1.h,
579         bfroms/bf51x-0.2.h, bfroms/bf526-0.0.h, bfroms/bf526-0.1.h,
580         bfroms/bf527-0.0.h, bfroms/bf527-0.1.h, bfroms/bf527-0.2.h,
581         bfroms/bf533-0.1.h, bfroms/bf533-0.2.h, bfroms/bf533-0.3.h,
582         bfroms/bf537-0.0.h, bfroms/bf537-0.1.h, bfroms/bf537-0.3.h,
583         bfroms/bf538-0.0.h, bfroms/bf54x-0.0.h, bfroms/bf54x-0.1.h,
584         bfroms/bf54x-0.2.h, bfroms/bf54x_l1-0.0.h, bfroms/bf54x_l1-0.1.h,
585         bfroms/bf54x_l1-0.2.h, bfroms/bf561-0.5.h, bfroms/bf59x-0.0.h,
586         bfroms/bf59x_l1-0.1.h, dv-bfin_cec.c, dv-bfin_ctimer.c,
587         dv-bfin_dma.c, dv-bfin_dmac.c, dv-bfin_ebiu_amc.c,
588         dv-bfin_ebiu_ddrc.c, dv-bfin_ebiu_sdc.c, dv-bfin_emac.c,
589         dv-bfin_eppi.c, dv-bfin_evt.c, dv-bfin_gptimer.c, dv-bfin_jtag.c,
590         dv-bfin_mmu.c, dv-bfin_nfc.c, dv-bfin_otp.c, dv-bfin_pll.c,
591         dv-bfin_ppi.c, dv-bfin_rtc.c, dv-bfin_sic.c, dv-bfin_spi.c,
592         dv-bfin_trace.c, dv-bfin_twi.c, dv-bfin_uart.c, dv-bfin_uart2.c,
593         dv-bfin_wdog.c, dv-bfin_wp.c, dv-eth_phy.c, gui.c,
594         linux-fixed-code.h, linux-targ-map.h, machs.c, Makefile.in: Fix style.
595
596 2011-03-15  Robin Getz  <robin.getz@analog.com>
597
598         * bfin-sim.c (decode_dsp32alu_0): Set AZ based on val for 16bit adds
599         and subs.
600
601 2011-03-15  Robin Getz  <robin.getz@analog.com>
602
603         * bfin-sim.c (decode_macfunc): Move acc STOREs behind op != 3 check.
604
605 2011-03-15  Robin Getz  <robin.getz@analog.com>
606
607         * bfin-sim.c (decode_macfunc): New neg parameter.  Set when the
608         high bit is set after extract_mult.
609         (decode_dsp32mac_0): Declare n_1 and n_0.  Pass to the decode_macfunc
610         functions.  Use these to update the AN bit.
611
612 2011-03-15  Robin Getz  <robin.getz@analog.com>
613
614         * bfin-sim.c (decode_dsp32mult_0): Declare v_i0 and v_i1.  Pass to
615         the extract_mult functions.  Include these when updating the V, VS,
616         and V_COPY bits.
617
618 2011-03-15  Robin Getz  <robin.getz@analog.com>
619
620         * bfin-sim.c (astat_names): New global bit array.
621         (decode_CC2stat_0): Delete local astat_name and astat_names.
622         (decode_psedodbg_assert_0): Move hardcoded offset into a variable.
623         Print out ASTAT bit values when checking an ASTAT register.
624
625 2010-03-15  Robin Getz  <robin.getz@analog.com>
626
627         * bfin-sim.c (extract_mult): Handle M_IU.
628
629 2011-03-05  Mike Frysinger  <vapier@gentoo.org>
630
631         * Makefile.in, TODO, aclocal.m4, bfin-sim.c, bfin-sim.h,
632         bfroms/all.h, bfroms/bf50x-0.0.h, bfroms/bf51x-0.0.h,
633         bfroms/bf51x-0.1.h, bfroms/bf51x-0.2.h, bfroms/bf526-0.0.h,
634         bfroms/bf526-0.1.h, bfroms/bf527-0.0.h, bfroms/bf527-0.1.h,
635         bfroms/bf527-0.2.h, bfroms/bf533-0.1.h, bfroms/bf533-0.2.h,
636         bfroms/bf533-0.3.h, bfroms/bf537-0.0.h, bfroms/bf537-0.1.h,
637         bfroms/bf537-0.3.h, bfroms/bf538-0.0.h, bfroms/bf54x-0.0.h,
638         bfroms/bf54x-0.1.h, bfroms/bf54x-0.2.h, bfroms/bf54x_l1-0.0.h,
639         bfroms/bf54x_l1-0.1.h, bfroms/bf54x_l1-0.2.h, bfroms/bf561-0.5.h,
640         bfroms/bf59x-0.0.h, bfroms/bf59x_l1-0.1.h, config.in, configure,
641         configure.ac, devices.c, devices.h, dv-bfin_cec.c, dv-bfin_cec.h,
642         dv-bfin_ctimer.c, dv-bfin_ctimer.h, dv-bfin_dma.c, dv-bfin_dma.h,
643         dv-bfin_dmac.c, dv-bfin_dmac.h, dv-bfin_ebiu_amc.c, dv-bfin_ebiu_amc.h,
644         dv-bfin_ebiu_ddrc.c, dv-bfin_ebiu_ddrc.h, dv-bfin_ebiu_sdc.c,
645         dv-bfin_ebiu_sdc.h, dv-bfin_emac.c, dv-bfin_emac.h, dv-bfin_eppi.c,
646         dv-bfin_eppi.h, dv-bfin_evt.c, dv-bfin_evt.h, dv-bfin_gptimer.c,
647         dv-bfin_gptimer.h, dv-bfin_jtag.c, dv-bfin_jtag.h, dv-bfin_mmu.c,
648         dv-bfin_mmu.h, dv-bfin_nfc.c, dv-bfin_nfc.h, dv-bfin_otp.c,
649         dv-bfin_otp.h, dv-bfin_pll.c, dv-bfin_pll.h, dv-bfin_ppi.c,
650         dv-bfin_ppi.h, dv-bfin_rtc.c, dv-bfin_rtc.h, dv-bfin_sic.c,
651         dv-bfin_sic.h, dv-bfin_spi.c, dv-bfin_spi.h, dv-bfin_trace.c,
652         dv-bfin_trace.h, dv-bfin_twi.c, dv-bfin_twi.h, dv-bfin_uart.c,
653         dv-bfin_uart.h, dv-bfin_uart2.c, dv-bfin_uart2.h, dv-bfin_wdog.c,
654         dv-bfin_wdog.h, dv-bfin_wp.c, dv-bfin_wp.h, dv-eth_phy.c, gui.c,
655         gui.h, insn_list.def, interp.c, linux-fixed-code.h, linux-fixed-code.s,
656         linux-targ-map.h, machs.c, machs.h, proc_list.def, sim-main.h,
657         tconfig.in: New Blackfin port.