]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - sim/aarch64/simulator.c
sim: aarch64: fix 64-bit immediate shifts
[thirdparty/binutils-gdb.git] / sim / aarch64 / simulator.c
index e0b428d26d9e474f87cb54dd9bb408f0cb8a59bd..a8391212c0647991b7b31da1a6cd870b3d583e55 100644 (file)
@@ -8420,7 +8420,7 @@ do_fcvtzu (sim_cpu *cpu)
          uint64_t value = (uint64_t) d;
 
          /* Do not raise an exception if we have reached ULONG_MAX.  */
-         if (value != (1UL << 63))
+         if (value != (1ULL << 63))
            RAISE_EXCEPTIONS (d, value, DOUBLE, ULONG);
 
          aarch64_set_reg_u64 (cpu, rd, NO_SP, value);
@@ -8431,7 +8431,7 @@ do_fcvtzu (sim_cpu *cpu)
          uint64_t value = (uint64_t) f;
 
          /* Do not raise an exception if we have reached ULONG_MAX.  */
-         if (value != (1UL << 63))
+         if (value != (1ULL << 63))
            RAISE_EXCEPTIONS (f, value, FLOAT, ULONG);
 
          aarch64_set_reg_u64 (cpu, rd, NO_SP, value);