aarch64: Fix up last commit [PR100200]
authorJakub Jelinek <jakub@redhat.com>
Tue, 27 Apr 2021 15:50:53 +0000 (17:50 +0200)
committerJakub Jelinek <jakub@redhat.com>
Tue, 27 Apr 2021 15:52:19 +0000 (17:52 +0200)
Pedantically signed vs. unsigned mismatches in va_arg are only well defined
if the value can be represented in both signed and unsigned integer types.

2021-04-27  Jakub Jelinek  <jakub@redhat.com>

PR target/100200
* config/aarch64/aarch64.c (aarch64_print_operand): Cast -UINTVAL
back to HOST_WIDE_INT.

gcc/config/aarch64/aarch64.c

index aa148ac..a863af1 100644 (file)
@@ -10778,7 +10778,7 @@ aarch64_print_operand (FILE *f, rtx x, int code)
        }
 
       if (GET_MODE_CLASS (GET_MODE (x)) == MODE_VECTOR_INT)
-       asm_fprintf (f, "%wd", -UINTVAL (elt));
+       asm_fprintf (f, "%wd", (HOST_WIDE_INT) -UINTVAL (elt));
       else if (GET_MODE_CLASS (GET_MODE (x)) == MODE_VECTOR_FLOAT
               && aarch64_print_vector_float_operand (f, x, true))
        ;