Fix thinko in new GET_VEC_ELEMENT macro.

* cpustate.c: (GET_VEC_ELEMENT): And fix thinko using macro arguments.
This commit is contained in:
Nick Clifton 2016-03-18 17:08:27 +00:00
parent 8678914fcb
commit 87bba7a5e0
2 changed files with 2 additions and 1 deletions

View File

@ -7,6 +7,7 @@
(GET_VEC_ELEMENT): Fix off by one error checking for an invalid
element index.
(SET_VEC_ELEMENT): Likewise.
(GET_VEC_ELEMENT): And fix thinko using macro arguments.
* memory.c: Trace memory reads when --trace-memory is enabled.
Remove float and double load and store functions.

View File

@ -345,7 +345,7 @@ aarch64_set_FP_long_double (sim_cpu *cpu, VReg reg, FRegister a)
#define GET_VEC_ELEMENT(REG, ELEMENT, FIELD) \
do \
{ \
if (element >= ARRAY_SIZE (cpu->fr[0].FIELD)) \
if (ELEMENT >= ARRAY_SIZE (cpu->fr[0].FIELD)) \
{ \
TRACE_REGISTER (cpu, \
"Internal SIM error: invalid element number: %d ",\