AARCH64_BUILTIN_STSHH_DI,
AARCH64_BUILTIN_STSHH_SF,
AARCH64_BUILTIN_STSHH_DF,
+ AARCH64_BUILTIN_PLDIR,
AARCH64_BUILTIN_MAX
};
aarch64_builtin_decls[AARCH64_BUILTIN_STSHH_DF]
= aarch64_general_add_builtin ("__builtin_aarch64_stshh_df", ftype,
AARCH64_BUILTIN_STSHH_DF);
+
+ tree cv_argtype = build_qualified_type (void_type_node, TYPE_QUAL_CONST
+ | TYPE_QUAL_VOLATILE);
+ cv_argtype = build_pointer_type (cv_argtype);
+
+ ftype = build_function_type_list (void_type_node, cv_argtype, NULL_TREE);
+ aarch64_builtin_decls[AARCH64_BUILTIN_PLDIR]
+ = aarch64_general_add_builtin ("__builtin_aarch64_pldir", ftype,
+ AARCH64_BUILTIN_PLDIR);
}
/* Initialize all builtins in the AARCH64_BUILTIN_GENERAL group. */
expand_insn (icode, 4, ops);
}
+void
+aarch64_expand_pldir_builtin (tree exp)
+{
+ expand_operand ops[1];
+ rtx addr = expand_normal (CALL_EXPR_ARG (exp, 0));
+ create_input_operand (&ops[0], addr, Pmode);
+ expand_insn (CODE_FOR_aarch64_pldir, 1, ops);
+}
+
/* Expand CALL_EXPR EXP, given that it is a call to the function described
by BUILTIN_DATA, and return the function's return value. Put the result
in TARGET if convenient. */
case AARCH64_BUILTIN_STSHH_DF:
aarch64_expand_stshh_builtin (exp, fcode);
return target;
+
+ case AARCH64_BUILTIN_PLDIR:
+ {
+ aarch64_expand_pldir_builtin (exp);
+ return target;
+ }
}
if (fcode >= AARCH64_SIMD_BUILTIN_BASE && fcode <= AARCH64_SIMD_BUILTIN_MAX)
UNSPEC_SYSREG_WDI
UNSPEC_SYSREG_WTI
UNSPEC_PLDX
+ UNSPEC_PLDIR
;; Represents an SVE-style lane index, in which the indexing applies
;; within the containing 128-bit block.
UNSPEC_SVE_LANE_SELECT
[(set_attr "type" "load_4")]
)
+(define_insn "aarch64_pldir"
+ [(unspec [(match_operand:DI 0 "aarch64_prefetch_operand" "Dp")]
+ UNSPEC_PLDIR)]
+ ""
+ {
+ operands[0] = gen_rtx_MEM (DImode, operands[0]);
+ return "prfm\\tir, %0";
+ }
+ [(set_attr "type" "load_4")]
+)
+
(define_insn "aarch64_pldx"
[(unspec [(match_operand 0 "" "")
(match_operand:DI 1 "aarch64_prefetch_operand" "Dp")] UNSPEC_PLDX)]
return __builtin_aarch64_pldx (__access, __cache, __rettn, __addr);
}
+__extension__ extern __inline void
+__attribute__ ((__always_inline__, __gnu_inline__, __artificial__))
+__pldir (void const volatile *__addr)
+{
+ return __builtin_aarch64_pldir (__addr);
+}
+
__extension__ extern __inline unsigned long
__attribute__ ((__always_inline__, __gnu_inline__, __artificial__))
__revl (unsigned long __value)