aarch64: Use 64bit operations on 64bit pointers
authorMarek Vasut <marex@denx.de>
Wed, 24 Jun 2020 19:43:56 +0000 (21:43 +0200)
committerMarek Vasut <marex@denx.de>
Wed, 16 Sep 2020 12:27:27 +0000 (14:27 +0200)
This fixes loading values from arrays, where the array pointers
are 64bit, but the operation incrementing the pointer was 32bit
and thus the top 32bits of the pointer were set to zero. Fix it
by using 64bit operations on the pointer.

Signed-off-by: Marek Vasut <marex@denx.de>
orc/orcprogram-neon.c

index 6793622..1626cd2 100644 (file)
@@ -360,7 +360,7 @@ orc_neon_load_constants_inner (OrcCompiler *compiler)
       case ORC_VAR_TYPE_SRC:
       case ORC_VAR_TYPE_DEST:
         if (compiler->is_64bit) {
-          orc_arm64_emit_load_reg (compiler, 32,
+          orc_arm64_emit_load_reg (compiler, 64,
               compiler->vars[i].ptr_register,
               compiler->exec_reg, ORC_STRUCT_OFFSET(OrcExecutor, arrays[i]));
         } else {
@@ -1104,7 +1104,7 @@ orc_neon_emit_loop (OrcCompiler *compiler, int unroll_index)
         compiler->vars[k].vartype == ORC_VAR_TYPE_DEST) {
       if (compiler->vars[k].ptr_register) {
         if (compiler->is_64bit)
-          orc_arm64_emit_add_imm (compiler, 32,
+          orc_arm64_emit_add_imm (compiler, 64,
               compiler->vars[k].ptr_register,
               compiler->vars[k].ptr_register,
               compiler->vars[k].size << compiler->loop_shift);