+2017-05-04 Prakhar Bahuguna <prakhar.bahuguna@arm.com>
+
+ * gcc/config/arm/arm-builtins.c (arm_init_builtins): Rename
+ __builtin_arm_ldfscr to __builtin_arm_get_fpscr, and rename
+ __builtin_arm_stfscr to __builtin_arm_set_fpscr.
+
2017-05-04 Martin Liska <mliska@suse.cz>
* tree-vrp.c (simplify_cond_using_ranges_2): Remove unused
= build_function_type_list (unsigned_type_node, NULL);
arm_builtin_decls[ARM_BUILTIN_GET_FPSCR]
- = add_builtin_function ("__builtin_arm_ldfscr", ftype_get_fpscr,
+ = add_builtin_function ("__builtin_arm_get_fpscr", ftype_get_fpscr,
ARM_BUILTIN_GET_FPSCR, BUILT_IN_MD, NULL, NULL_TREE);
arm_builtin_decls[ARM_BUILTIN_SET_FPSCR]
- = add_builtin_function ("__builtin_arm_stfscr", ftype_set_fpscr,
+ = add_builtin_function ("__builtin_arm_set_fpscr", ftype_set_fpscr,
ARM_BUILTIN_SET_FPSCR, BUILT_IN_MD, NULL, NULL_TREE);
}
+2017-05-04 Prakhar Bahuguna <prakhar.bahuguna@arm.com>
+
+ * gcc.target/arm/fpscr.c: New file.
+
2017-05-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
* gcc.c-torture/execute/pr78622.c: Require c99_runtime effective
--- /dev/null
+/* Test the fpscr builtins. */
+
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_fp_ok } */
+/* { dg-skip-if "need fp instructions" { *-*-* } { "-mfloat-abi=soft" } { "" } } */
+/* { dg-add-options arm_fp } */
+
+void
+test_fpscr ()
+{
+ volatile unsigned int status = __builtin_arm_get_fpscr ();
+ __builtin_arm_set_fpscr (status);
+}
+
+/* { dg-final { scan-assembler "mrc\tp10, 7, r\[0-9\]+, cr1, cr0, 0" } } */
+/* { dg-final { scan-assembler "mcr\tp10, 7, r\[0-9\]+, cr1, cr0, 0" } } */