Fix thinko in new GET_VEC_ELEMENT macro.
authorNick Clifton <nickc@redhat.com>
Fri, 18 Mar 2016 17:08:27 +0000 (17:08 +0000)
committerNick Clifton <nickc@redhat.com>
Fri, 18 Mar 2016 17:08:27 +0000 (17:08 +0000)
* cpustate.c: (GET_VEC_ELEMENT): And fix thinko using macro arguments.

sim/aarch64/ChangeLog
sim/aarch64/cpustate.c

index e8f8b4895b836d28a8caf7f0d7e50a50987f2221..df1a34376910ae5a302730649154a978a9cc862e 100644 (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.
index 19f485e81eaf60e587d7f5a805a6a05963ee8796..50a83c927d1b656c3c2fd89934945f039e184090 100644 (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 ",\
This page took 0.02691 seconds and 4 git commands to generate.