@@ -2281,8 +2281,6 @@ aarch64_takes_arguments_in_sve_regs_p (const_tree fntype)
22812281 return false;
22822282}
22832283
2284- #if defined(TARGET_AARCH64_MS_ABI)
2285-
22862284/* Return true if a function has variadic arguments. */
22872285
22882286static bool
@@ -2301,8 +2299,6 @@ is_variadic_function_type (const_tree fntype) {
23012299 return arg_count > 0;
23022300}
23032301
2304- #endif
2305-
23062302/* Implement TARGET_FNTYPE_ABI. */
23072303
23082304static const predefined_function_abi &
@@ -7126,8 +7122,6 @@ aarch64_arg_size (const function_arg_info &arg)
71267122 return ROUND_UP (size, UNITS_PER_WORD);
71277123}
71287124
7129- #if defined (TARGET_AARCH64_MS_ABI)
7130-
71317125/* Layout a function argument according to the AAPCS64 rules. The rule
71327126 numbers refer to the rule numbers in the AAPCS64. The Microsoft Arm64
71337127 variadic function call ABI uses only C.12-C15 rules.
@@ -7192,8 +7186,6 @@ aarch64_ms_variadic_abi_layout_arg (cumulative_args_t pcum_v,
71927186 pcum->aapcs_arg_processed = true;
71937187}
71947188
7195- #endif
7196-
71977189/* Layout a function argument according to the AAPCS64 rules. The rule
71987190 numbers refer to the rule numbers in the AAPCS64. ORIG_MODE is the
71997191 mode that was originally given to us by the target hook, whereas the
@@ -7217,12 +7209,10 @@ aarch64_layout_arg (cumulative_args_t pcum_v, const function_arg_info &arg)
72177209 if (pcum->aapcs_arg_processed)
72187210 return;
72197211
7220- #if defined (TARGET_AARCH64_MS_ABI)
72217212 if (pcum->pcs_variant == ARM_PCS_MS_VARIADIC) {
72227213 aarch64_ms_variadic_abi_layout_arg (pcum_v, arg);
72237214 return;
72247215 }
7225- #endif
72267216
72277217 bool warn_pcs_change
72287218 = (warn_psabi
@@ -7573,8 +7563,6 @@ aarch64_finish_sme_mode_switch_args (CUMULATIVE_ARGS *pcum)
75737563 return gen_rtx_PARALLEL (VOIDmode, argvec);
75747564}
75757565
7576- #if defined (TARGET_AARCH64_MS_ABI)
7577-
75787566/* Implement TARGET_ARG_PARTIAL_BYTES. */
75797567
75807568static int
@@ -7594,8 +7582,6 @@ aarch64_arg_partial_bytes (cumulative_args_t pcum_v,
75947582 return 0;
75957583}
75967584
7597- #endif
7598-
75997585/* Implement TARGET_FUNCTION_ARG. */
76007586
76017587static rtx
@@ -21795,8 +21781,6 @@ aarch64_build_builtin_va_list (void)
2179521781 return va_list_type;
2179621782}
2179721783
21798- #if defined (TARGET_AARCH64_MS_ABI)
21799-
2180021784/* Setup the builtin va_list data type and for 64-bit the additional
2180121785 calling convention specific va_list data types. */
2180221786
@@ -21812,8 +21796,6 @@ aarch64_ms_variadic_abi_build_builtin_va_list (void)
2181221796 return ms_va_list_type_node;
2181321797}
2181421798
21815- #endif
21816-
2181721799/* Implement TARGET_EXPAND_BUILTIN_VA_START. */
2181821800static void
2181921801aarch64_expand_builtin_va_start (tree valist, rtx nextarg ATTRIBUTE_UNUSED)
@@ -21897,8 +21879,6 @@ aarch64_expand_builtin_va_start (tree valist, rtx nextarg ATTRIBUTE_UNUSED)
2189721879 expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL);
2189821880}
2189921881
21900- #if defined (TARGET_AARCH64_MS_ABI)
21901-
2190221882/* Implement TARGET_EXPAND_BUILTIN_VA_START. */
2190321883
2190421884static void
@@ -21968,8 +21948,6 @@ aarch64_ms_variadic_abi_canonical_va_list_type (tree type)
2196821948 return NULL_TREE;
2196921949}
2197021950
21971- #endif
21972-
2197321951/* Implement TARGET_GIMPLIFY_VA_ARG_EXPR. */
2197421952
2197521953static tree
@@ -22347,11 +22325,9 @@ aarch64_setup_incoming_varargs (cumulative_args_t cum_v,
2234722325
2234822326 /* We don't save the size into *PRETEND_SIZE because we want to avoid
2234922327 any complication of having crtl->args.pretend_args_size changed. */
22350- #if defined (TARGET_AARCH64_MS_ABI)
2235122328 cfun->machine->frame.unaligned_saved_varargs_size = gr_saved * UNITS_PER_WORD;
22352- #endif
2235322329 cfun->machine->frame.saved_varargs_size
22354- = (ROUND_UP (gr_saved * UNITS_PER_WORD ,
22330+ = (ROUND_UP (cfun->machine->frame.unaligned_saved_varargs_size ,
2235522331 STACK_BOUNDARY / BITS_PER_UNIT)
2235622332 + vr_saved * UNITS_PER_VREG);
2235722333}
@@ -25554,8 +25530,6 @@ aarch64_post_cfi_startproc (FILE *f, tree ignored ATTRIBUTE_UNUSED)
2555425530 asm_fprintf (f, "\t.cfi_b_key_frame\n");
2555525531}
2555625532
25557- #if defined (TARGET_AARCH64_MS_ABI)
25558-
2555925533/* Implement TARGET_STRICT_ARGUMENT_NAMING.
2556025534
2556125535 Return true if the location where a function argument is passed
@@ -25575,8 +25549,6 @@ aarch64_ms_variadic_abi_strict_argument_naming (cumulative_args_t pcum_v)
2557525549 return hook_bool_CUMULATIVE_ARGS_true(pcum_v);
2557625550}
2557725551
25578- #endif
25579-
2558025552/* Implements TARGET_ASM_FILE_START. Output the assembly header. */
2558125553
2558225554static void
0 commit comments