type = GNU_PROPERTY_AARCH64_FEATURE_1_AND
datasz = 4
data = feature_1_and. */
- assemble_integer (GEN_INT (GNU_PROPERTY_AARCH64_FEATURE_1_AND), 4, 32, 1);
+ fputs (integer_asm_op (4, true), asm_out_file);
+ fprint_whex (asm_out_file, GNU_PROPERTY_AARCH64_FEATURE_1_AND);
+ putc ('\n', asm_out_file);
assemble_integer (GEN_INT (4), 4, 32, 1);
- assemble_integer (GEN_INT (feature_1_and), 4, 32, 1);
+ fputs (integer_asm_op (4, true), asm_out_file);
+ fprint_whex (asm_out_file, feature_1_and);
+ if (flag_debug_asm)
+ {
+ struct flag_name
+ {
+ unsigned int mask;
+ const char *name;
+ };
+ static const flag_name flags[] = {
+ { GNU_PROPERTY_AARCH64_FEATURE_1_BTI, "BTI" },
+ { GNU_PROPERTY_AARCH64_FEATURE_1_PAC, "PAC" },
+ { GNU_PROPERTY_AARCH64_FEATURE_1_GCS, "GCS" },
+ };
+
+ const char *separator = "";
+ std::string s_features;
+ for (auto &flag : flags)
+ if (feature_1_and & flag.mask)
+ {
+ s_features.append (separator).append (flag.name);
+ separator = ", ";
+ }
+
+ asm_fprintf (asm_out_file,
+ "\t%s GNU_PROPERTY_AARCH64_FEATURE_1_AND (%s)\n",
+ ASM_COMMENT_START, s_features.c_str ());
+ }
+ else
+ putc ('\n', asm_out_file);
/* Pad the size of the note to the required alignment. */
assemble_align (POINTER_SIZE);
}
/* { dg-do compile } */
/* -Os to create jump table. */
-/* { dg-options "-Os" } */
+/* { dg-options "-Os -dA" } */
/* { dg-require-effective-target lp64 } */
/* If configured with --enable-standard-branch-protection, don't use
command line option. */
return (y == 0)? y+1:4;
}
/* f_jump_table should have PACIASP and AUTIASP. */
-/* { dg-final { scan-assembler-times "hint\t25" 1 } } */
-/* { dg-final { scan-assembler-times "hint\t29" 1 } } */
+/* { dg-final { scan-assembler-times "hint\t25 // paciasp" 1 } } */
+/* { dg-final { scan-assembler-times "hint\t29 // autiasp" 1 } } */
int
f_label_address ()
addr = &&lab1;
return 2;
}
-/* { dg-final { scan-assembler-times "hint\t34" 1 } } */
-/* { dg-final { scan-assembler-times "hint\t36" 12 } } */
-/* { dg-final { scan-assembler ".note.gnu.property" { target *-*-linux* } } } */
+/* { dg-final { scan-assembler-times "hint\t34 // bti c" 1 } } */
+/* { dg-final { scan-assembler-times "hint\t36 // bti j" 12 } } */
+/* { dg-final { scan-assembler "\.section\t\.note\.gnu\.property" { target *-*-linux* } } } */
+/* { dg-final { scan-assembler "\.word\t0x7\t\/\/ GNU_PROPERTY_AARCH64_FEATURE_1_AND \\(BTI, PAC, GCS\\)" { target *-*-linux* } } } */
\ No newline at end of file