]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[Aarch64]: Make aarch64_output_simd_mov_imm_low return const char *
authorNaveen <naveen.siddegowda@oss.qualcomm.com>
Tue, 12 May 2026 04:04:38 +0000 (21:04 -0700)
committerNaveen <naveen.siddegowda@oss.qualcomm.com>
Tue, 12 May 2026 04:05:45 +0000 (21:05 -0700)
aarch64_output_simd_mov_imm_low emits the instruction directly using
output_asm_insn and returns an empty string to indicate that no further
template needs to be emitted.  Since the returned empty string is a string
literal, the function should return const char * rather than char *.

This fixes a bootstrap failure with -Werror=write-strings.

gcc/ChangeLog:

* config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_imm_low):
Change return type to const char *.
* config/aarch64/aarch64.cc (aarch64_output_simd_mov_imm_low): Likewise.

Signed-off-by: Naveen <naveen.siddegowda@oss.qualcomm.com>
gcc/config/aarch64/aarch64-protos.h
gcc/config/aarch64/aarch64.cc

index 0798546809de32557c04954d6e4ecd87981b9e55..8d201821e93450848796e82f7d9deedcb58e8105 100644 (file)
@@ -952,7 +952,7 @@ char *aarch64_output_simd_and_imm (rtx, unsigned);
 char *aarch64_output_simd_xor_imm (rtx, unsigned);
 char *aarch64_output_fmov (rtx);
 
-char *aarch64_output_simd_mov_imm_low (rtx *);
+const char *aarch64_output_simd_mov_imm_low (rtx *);
 char *aarch64_output_sve_mov_immediate (rtx);
 char *aarch64_output_sve_ptrues (rtx);
 bool aarch64_const_vec_fmov_p (rtx);
index 619c2a6d2265aba2db837559646fbf51e571c00e..cd5ed154c7ac93f0585c031d6f42f176fa276edf 100644 (file)
@@ -24650,7 +24650,7 @@ aarch64_const_vec_fmov_p (rtx op)
 
 /* Output a move of an FP constant vector in which the low register element is
    materialized using FMOV and all other elements are zero.  */
-char *
+const char *
 aarch64_output_simd_mov_imm_low (rtx *operands)
 {
   machine_mode mode = GET_MODE (operands[1]);