Add missing cnt (popcount) instruction support.
[deliverable/binutils-gdb.git] / sim / aarch64 / ChangeLog
CommitLineData
ac189e7b
JW
12017-02-25 Jim Wilson <jim.wilson@linaro.org>
2
3 * simulator.c (popcount): New.
4 (do_vec_CNT): New.
5 (do_vec_op1): Add do_vec_CNT call.
6
2e7e5e28
JW
72017-02-19 Jim Wilson <jim.wilson@linaro.org>
8
9 * simulator.c (do_vec_ADDV): Mov val declaration inside each case,
10 with type set to input type size.
11 (do_vec_xtl): Change bias from 3 to 4 for byte case.
12
e8f42b5e
JW
132017-02-14 Jim Wilson <jim.wilson@linaro.org>
14
742e3a77
JW
15 * simulator.c (do_vec_MLA): Rewrite switch body.
16
bf25e9a0
JW
17 * simulator.c (do_vec_bit): Change loop limits from 16 and 8 to 4 and
18 2. Move test_false if inside loop. Fix logic for computing result
19 stored to vd.
20
e8f42b5e
JW
21 * simulator.c: (LDn_STn_SINGLE_LANE_AND_SIZE): New.
22 (do_vec_LDn_single, do_vec_STn_single): New.
23 (do_vec_LDnR): Add and set new nregs var. Replace switch on nregs with
24 loop over nregs using new var n. Add n times size to address in loop.
25 Add n to vd in loop.
26 (do_vec_load_store): Add comment for instruction bit 24. New var
27 single to hold instruction bit 24. Add new code to use single. Move
28 ldnr support inside single if statements. Fix ldnr register counts
29 inside post if statement. Change HALT_NYI calls to HALT_UNALLOC.
30
fbf32f63
JW
312017-01-23 Jim Wilson <jim.wilson@linaro.org>
32
33 * simulator.c (do_vec_compare): Add case 0x23 for CMTST.
34
05b3d79d
JW
352017-01-17 Jim Wilson <jim.wilson@linaro.org>
36
37 * simulator.c (do_vec_ADDV): Call aarch64_set_vec_u64 instead of
38 aarch64_set_reg_u64. In case 2, call HALT_UNALLOC if not full. In
39 case 3, call HALT_UNALLOC unconditionally.
40 (do_vec_XTN): Delete shifts. In case 2, change index from i + 4 to
41 i + 2. Delete if on bias, change index to i + bias * X.
42
a4fb5981
JW
432017-01-09 Jim Wilson <jim.wilson@linaro.org>
44
45 * simulator.c (do_vec_UZP): Rewrite.
46
c0386d4d
JW
472017-01-04 Jim Wilson <jim.wilson@linaro.org>
48
49 * cpustate.c: Include math.h.
50 (aarch64_set_FP_float): Use signbit to check for signed zero.
51 (aarch64_set_FP_double): Likewise.
52 * simulator.c (do_vec_MOV_immediate, case 0x8): Add missing break.
53 (do_vec_mul): In all DO_VEC_WIDENING_MUL calls, make second and fourth
54 args same size as third arg.
55 (fmaxnm): Use isnan instead of fpclassify.
56 (fminnm, dmaxnm, dminnm): Likewise.
57 (do_vec_MLS): Reverse order of subtraction operands.
58 (dexSimpleFPCondSelect): Call aarch64_get_FP_double or
59 aarch64_get_FP_float to get source register contents.
60 (UINT_MIN, ULONG_MIN, FLOAT_UINT_MAX, FLOAT_UINT_MIN,
61 DOUBLE_UINT_MAX, DOUBLE_UINT_MIN, FLOAT_ULONG_MAX, FLOAT_ULONG_MIN,
62 DOUBLE_ULONG_MAX, DOUBLE_ULONG_MIN): New.
63 (do_fcvtzu): Use ULONG instead of LONG, and UINT instead of INT in
64 raise_exception calls.
65
87903eaf
JW
662016-12-21 Jim Wilson <jim.wilson@linaro.org>
67
68 * simulator.c (set_flags_for_float_compare): Add code to handle Inf.
69 Add comment to document NaN issue.
70 (set_flags_for_double_compare): Likewise.
71
963201cf
JW
722016-12-13 Jim Wilson <jim.wilson@linaro.org>
73
74 * simulator.c (NEG, POS): Move before set_flags_for_add64.
75 (set_flags_for_add64): Replace with a modified copy of
76 set_flags_for_sub64.
77
668650d5
JW
782016-12-03 Jim Wilson <jim.wilson@linaro.org>
79
80 * simulator.c (tbnz, tbz): Cast 1 to uint64_t before shifting.
81 (dexTestBranchImmediate): Shift high bit of pos by 5 not 4.
82
88ddd4a1
JW
832016-12-01 Jim Wilson <jim.wilson@linaro.org>
84
88256e71 85 * simulator.c (fsturs): Switch use of rn and st variables.
88ddd4a1
JW
86 (fsturd, fsturq): Likewise
87
5357150c
MF
882016-08-15 Mike Frysinger <vapier@gentoo.org>
89
90 * interp.c: Include bfd.h.
91 (symcount, symtab, aarch64_get_sym_value): Delete.
92 (remove_useless_symbols): Change count type to long.
93 (aarch64_get_func): Add SIM_DESC to arg list. Add symcount
94 and symtab local variables.
95 (sim_create_inferior): Delete storage. Replace symbol code
96 with a call to trace_load_symbols.
97 * memory.c: Delete bfd.h, elf/internal.h, and elf/common.h
98 includes.
99 (aarch64_get_heap_start): Change aarch64_get_sym_value to
100 trace_sym_value.
101 * memory.h: Delete bfd.h include.
102 (mem_add_blk): Delete unused prototype.
103 * simulator.c (bl, blr): Pass SIM_DESC to aarch64_get_func.
104 * simulator.c (aarch64_get_func): Add SIM_DESC to arg list.
105 (aarch64_get_sym_value): Delete.
106
b14bdb3b
NC
1072016-08-12 Nick Clifton <nickc@redhat.com>
108
109 * simulator.c (aarch64_step): Revert pervious delta.
110 (aarch64_run): Call sim_events_tick after each
111 instruction is simulated, and if necessary call
112 sim_events_process.
113 * simulator.h: Revert previous delta.
114
6a277579
NC
1152016-08-11 Nick Clifton <nickc@redhat.com>
116
117 * interp.c (sim_create_inferior): Allow for being called with a
118 NULL abfd parameter. If a bfd is provided, initialise the sim
119 with that start address.
120 * simulator.c (HALT_NYI): Just print out the numeric value of the
121 instruction when not tracing.
b14bdb3b
NC
122 (aarch64_step): Change from static to global.
123 * simulator.h: Add a prototype for aarch64_step().
6a277579 124
293acfae
AM
1252016-07-27 Alan Modra <amodra@gmail.com>
126
127 * memory.c: Don't include libbfd.h.
128
0f118bc7
NC
1292016-07-21 Nick Clifton <nickc@redhat.com>
130
0c66ea4c 131 * simulator.c (fsqrts): Use sqrtf rather than sqrt.
0f118bc7 132
c7be4414
JW
1332016-06-30 Jim Wilson <jim.wilson@linaro.org>
134
135 * cpustate.h: Include config.h.
136 (union GRegisterValue): Add WORDS_BIGENDIAN check. For big endian code
137 use anonymous structs to align members.
138 * simulator.c (aarch64_step): Use sim_core_read_buffer and
139 endian_le2h_4 to read instruction from pc.
140
fd7ed446
NC
1412016-05-06 Nick Clifton <nickc@redhat.com>
142
143 * simulator.c (do_FMLA_by_element): New function.
144 (do_vec_op2): Call it.
145
2cdad34c
NC
1462016-04-27 Nick Clifton <nickc@redhat.com>
147
148 * simulator.c: Add TRACE_DECODE statements to all emulation
149 functions.
150
7517e550
NC
1512016-03-30 Nick Clifton <nickc@redhat.com>
152
153 * cpustate.c (aarch64_set_reg_s32): New function.
154 (aarch64_set_reg_u32): New function.
155 (aarch64_get_FP_half): Place half precision value into the correct
156 slot of the union.
157 (aarch64_set_FP_half): Likewise.
158 * cpustate.h: Add prototypes for aarch64_set_reg_s32 and
159 aarch64_set_reg_u32.
160 * memory.c (FETCH_FUNC): Cast the read value to the access type
161 before converting it to the return type. Rename to FETCH_FUNC64.
162 (FETCH_FUNC32): New macro. Duplicates FETCH_FUNC64 but for 32-bit
163 accesses. Use for 32-bit memory access functions.
164 * simulator.c (ldrsb_wb): Use sign extension not zero extension.
165 (ldrb_scale_ext, ldrsh32_abs, ldrsh32_wb): Likewise.
166 (ldrsh32_scale_ext, ldrsh_abs, ldrsh64_wb): Likewise.
167 (ldrsh_scale_ext, ldrsw_abs): Likewise.
168 (ldrh32_abs): Store 32 bit value not 64-bits.
169 (ldrh32_wb, ldrh32_scale_ext): Likewise.
170 (do_vec_MOV_immediate): Fix computation of val.
171 (do_vec_MVNI): Likewise.
172 (DO_VEC_WIDENING_MUL): New macro.
173 (do_vec_mull): Use new macro.
174 (do_vec_mul): Use new macro.
175 (do_vec_MLA): Read values before writing.
176 (do_vec_xtl): Likewise.
177 (do_vec_SSHL): Select correct shift value.
178 (do_vec_USHL): Likewise.
179 (do_scalar_UCVTF): New function.
180 (do_scalar_vec): Call new function.
181 (store_pair_u64): Treat reads of SP as reads of XZR.
182
ef0d8ffc
NC
1832016-03-29 Nick Clifton <nickc@redhat.com>
184
185 * cpustate.c: Remove space after asterisk in function parameters.
186 * decode.h (greg): Delete unused function.
187 (vreg, shift, extension, scaling, writeback, condcode): Likewise.
188 * simulator.c: Use INSTR macro in more places.
189 (HALT_NYI): Use sim_io_eprintf in place of fprintf.
190 Remove extraneous whitespace.
191
5ab6d79e
NC
1922016-03-23 Nick Clifton <nickc@redhat.com>
193
194 * cpustate.c (aarch64_get_FP_half): New function. Read a vector
195 register as a half precision floating point number.
196 (aarch64_set_FP_half): New function. Similar, but for setting
197 a half precision register.
198 (aarch64_get_thread_id): New function. Returns the value of the
199 CPU's TPIDR register.
200 (aarch64_get_FPCR): New function. Returns the value of the CPU's
201 floating point control register.
202 (aarch64_set_FPCR): New function. Set the value of the CPU's FPCR
203 register.
204 * cpustate.h: Add prototypes for new functions.
205 * sim-main.h (struct _sim_cpu): Add FPCR and tpidr fields.
206 * memory.c: Use unaligned core access functions for all memory
207 reads and writes.
208 * simulator.c (HALT_NYI): Generate an error message if tracing
209 will not tell the user why the simulator is halting.
210 (HALT_UNREACHABLE): Delete. Delete (unneeded) uses of the macro.
211 (INSTR): New time-saver macro.
212 (fldrb_abs): New function. Loads an 8-bit value using a scaled
213 offset.
214 (fldrh_abs): New function. Likewise for 16-bit values.
215 (do_vec_SSHL): Allow for negative shift values.
216 (do_vec_USHL): Likewise.
217 (do_vec_SHL): Correct computation of shift amount.
218 (do_vec_SSHR_USHR): Correct decision of signed vs unsigned
219 shifts and computation of shift value.
220 (clz): New function. Counts leading zero bits.
221 (do_vec_CLZ): New function. Implements CLZ (vector).
222 (do_vec_MOV_element): Call do_vec_CLZ.
223 (dexSimpleFPCondCompare): Implement.
224 (do_FCVT_half_to_single): New function. Implements one of the
225 FCVT operations.
226 (do_FCVT_half_to_double): New function. Likewise.
227 (do_FCVT_single_to_half): New function. Likewise.
228 (do_FCVT_double_to_half): New function. Likewise.
229 (dexSimpleFPDataProc1Source): Call new FCVT functions.
230 (do_scalar_SHL): Handle negative shifts.
231 (do_scalar_shift): Handle SSHR.
232 (do_scalar_USHL): New function.
233 (do_double_add): Simplify to just performing a double precision
234 add operation. Move remaining code into...
235 (do_scalar_vec): ... New function.
236 (dexLoadUnsignedImmediate): Call new fldrb_abs and fldrh_abs
237 functions.
238 (system_get): Add support for TPIDR, CTR, FPCR, FPSR and CPSR
239 registers.
240 (system_set): New function.
241 (do_MSR_immediate): New function. Stub for now.
242 (do_MSR_reg): New function. Likewise. Partially implements MSR
243 instruction.
244 (do_SYS): New function. Stub for now,
245 (dexSystem): Call new functions.
246
e101a78b
NC
2472016-03-18 Nick Clifton <nickc@redhat.com>
248
249 * cpustate.c: Remove spurious spaces from TRACE strings.
250 Print hex equivalents of floats and doubles.
251 Check element number against array size when accessing vector
252 registers.
4c0ca98e
NC
253 (GET_VEC_ELEMENT): Fix off by one error checking for an invalid
254 element index.
255 (SET_VEC_ELEMENT): Likewise.
87bba7a5 256 (GET_VEC_ELEMENT): And fix thinko using macro arguments.
4c0ca98e 257
e101a78b
NC
258 * memory.c: Trace memory reads when --trace-memory is enabled.
259 Remove float and double load and store functions.
260 * memory.h (aarch64_get_mem_float): Delete prototype.
261 (aarch64_get_mem_double): Likewise.
262 (aarch64_set_mem_float): Likewise.
263 (aarch64_set_mem_double): Likewise.
264 * simulator (IS_SET): Always return either 0 or 1.
265 (IS_CLEAR): Likewise.
266 (fldrs_pcrel): Load and store floats using 32-bit memory accesses
267 and doubles using 64-bit memory accesses.
268 (fldrd_pcrel, fldrs_wb, fldrs_abs, fldrs_scale_ext): Likewise.
269 (fldrd_wb, fldrd_abs, fsturs, fsturd, fldurs, fldurd): Likewise.
270 (fstrs_abs, fstrs_wb, fstrs_scale_ext, fstrd_abs): Likewise.
271 (fstrd_wb, fstrd_scale_ext, store_pair_float): Likewise.
272 (store_pair_double, load_pair_float, load_pair_double): Likewise.
273 (do_vec_MUL_by_element): New function.
274 (do_vec_op2): Call do_vec_MUL_by_element.
275 (do_scalar_NEG): New function.
276 (do_double_add): Call do_scalar_NEG.
277
57aa1742
NC
2782016-03-03 Nick Clifton <nickc@redhat.com>
279
280 * simulator.c (set_flags_for_sub32): Correct type of signbit.
281 (CondCompare): Swap interpretation of bit 30.
282 (DO_ADDP): Delete macro.
283 (do_vec_ADDP): Copy source registers before starting to update
284 destination register.
285 (do_vec_FADDP): Likewise.
286 (do_vec_load_store): Fix computation of sizeof_operation.
287 (rbit64): Fix type of constant.
288 (aarch64_step): When displaying insn value, display all 32 bits.
289
ce39bd38
MF
2902016-01-10 Mike Frysinger <vapier@gentoo.org>
291
292 * config.in, configure: Regenerate.
293
e19418e0
MF
2942016-01-10 Mike Frysinger <vapier@gentoo.org>
295
296 * configure: Regenerate.
297
16f7876d
MF
2982016-01-10 Mike Frysinger <vapier@gentoo.org>
299
300 * configure.ac (SIM_AC_OPTION_ENVIRONMENT): Delete call.
301 * configure: Regenerate.
302
99d8e879
MF
3032016-01-10 Mike Frysinger <vapier@gentoo.org>
304
305 * configure: Regenerate.
35656e95
MF
306
3072016-01-10 Mike Frysinger <vapier@gentoo.org>
308
309 * configure: Regenerate.
99d8e879 310
347fe5bb
MF
3112016-01-10 Mike Frysinger <vapier@gentoo.org>
312
313 * configure.ac (SIM_AC_OPTION_INLINE): Delete call.
314 * configure: Regenerate.
315
22be3fbe
MF
3162016-01-10 Mike Frysinger <vapier@gentoo.org>
317
318 * configure: Regenerate.
319
0dc73ef7
MF
3202016-01-10 Mike Frysinger <vapier@gentoo.org>
321
322 * configure: Regenerate.
323
936df756
MF
3242016-01-09 Mike Frysinger <vapier@gentoo.org>
325
326 * config.in, configure: Regenerate.
327
2e3d4f4d
MF
3282016-01-06 Mike Frysinger <vapier@gentoo.org>
329
330 * interp.c (sim_create_inferior): Mark argv and env const.
331 (sim_open): Mark argv const.
332
1a846c62
MF
3332016-01-05 Mike Frysinger <vapier@gentoo.org>
334
335 * interp.c: Delete dis-asm.h include.
336 (info, opbuf, op_printf, aarch64_print_insn, sim_dis_read): Delete.
337 (sim_create_inferior): Delete disassemble init logic.
338 (OPTION_DISAS, aarch64_option_handler, aarch64_options): Delete.
339 (sim_open): Delete sim_add_option_table call.
340 * memory.c (mem_error): Delete disas check.
341 * simulator.c: Delete dis-asm.h include.
342 (disas): Delete.
343 (HALT_UNALLOC): Replace disassembly logic with TRACE_DISASM.
344 (HALT_NYI): Likewise.
345 (handle_halt): Delete disas call.
346 (aarch64_step): Replace disas logic with TRACE_DISASM.
347 * simulator.h: Delete dis-asm.h include.
348 (aarch64_print_insn): Delete.
349
bc273e17
MF
3502016-01-04 Mike Frysinger <vapier@gentoo.org>
351
352 * simulator.c (MAX, MIN): Delete.
353 (do_vec_maxv): Change MAX to max and MIN to min.
354 (do_vec_fminmaxV): Likewise.
355
ac8eefeb
TG
3562016-01-04 Tristan Gingold <gingold@adacore.com>
357
358 * simulator.c: Remove syscall.h include.
359
9bbf6f91
MF
3602016-01-04 Mike Frysinger <vapier@gentoo.org>
361
362 * configure: Regenerate.
363
0cb8d851
MF
3642016-01-03 Mike Frysinger <vapier@gentoo.org>
365
366 * configure.ac (SIM_AC_OPTION_HOSTENDIAN): Delete.
367 * configure: Regenerate.
368
1ac72f06
MF
3692016-01-02 Mike Frysinger <vapier@gentoo.org>
370
371 * configure: Regenerate.
372
5d015275
MF
3732015-12-27 Mike Frysinger <vapier@gentoo.org>
374
375 * interp.c (sim_dis_read): Change private_data to application_data.
376 (sim_create_inferior): Likewise.
377
5e744ef8
MF
3782015-12-27 Mike Frysinger <vapier@gentoo.org>
379
380 * Makefile.in (SIM_OBJS): Delete sim-hload.o.
381
1b393626
MF
3822015-12-26 Mike Frysinger <vapier@gentoo.org>
383
384 * config.in, configure: Regenerate.
385
0e967299
MF
3862015-12-26 Mike Frysinger <vapier@gentoo.org>
387
388 * interp.c (sim_create_inferior): Update comment and argv check.
389
f66affe9
MF
3902015-12-14 Nick Clifton <nickc@redhat.com>
391
392 * simulator.c (system_get): New function. Provides read
393 access to the dczid system register.
394 (do_mrs): New function - implements the MRS instruction.
395 (dexSystem): Call do_mrs for the MRS instruction. Halt on
396 unimplemented system instructions.
397
3982015-11-24 Nick Clifton <nickc@redhat.com>
399
400 * configure.ac: New configure template.
401 * aclocal.m4: Generate.
402 * config.in: Generate.
403 * configure: Generate.
404 * cpustate.c: New file - functions for accessing AArch64 registers.
405 * cpustate.h: New header.
406 * decode.h: New header.
407 * interp.c: New file - interface between GDB and simulator.
408 * Makefile.in: New makefile template.
409 * memory.c: New file - functions for simulating aarch64 memory
410 accesses.
411 * memory.h: New header.
412 * sim-main.h: New header.
413 * simulator.c: New file - aarch64 simulator functions.
414 * simulator.h: New header.
This page took 0.08582 seconds and 4 git commands to generate.