@@ -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
@@ -21495,8 +21481,6 @@ aarch64_build_builtin_va_list (void)
2149521481 return va_list_type;
2149621482}
2149721483
21498- #if defined (TARGET_AARCH64_MS_ABI)
21499-
2150021484/* Setup the builtin va_list data type and for 64-bit the additional
2150121485 calling convention specific va_list data types. */
2150221486
@@ -21512,8 +21496,6 @@ aarch64_ms_variadic_abi_build_builtin_va_list (void)
2151221496 return ms_va_list_type_node;
2151321497}
2151421498
21515- #endif
21516-
2151721499/* Implement TARGET_EXPAND_BUILTIN_VA_START. */
2151821500static void
2151921501aarch64_expand_builtin_va_start (tree valist, rtx nextarg ATTRIBUTE_UNUSED)
@@ -21597,8 +21579,6 @@ aarch64_expand_builtin_va_start (tree valist, rtx nextarg ATTRIBUTE_UNUSED)
2159721579 expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL);
2159821580}
2159921581
21600- #if defined (TARGET_AARCH64_MS_ABI)
21601-
2160221582/* Implement TARGET_EXPAND_BUILTIN_VA_START. */
2160321583
2160421584static void
@@ -21668,8 +21648,6 @@ aarch64_ms_variadic_abi_canonical_va_list_type (tree type)
2166821648 return NULL_TREE;
2166921649}
2167021650
21671- #endif
21672-
2167321651/* Implement TARGET_GIMPLIFY_VA_ARG_EXPR. */
2167421652
2167521653static tree
@@ -22047,11 +22025,9 @@ aarch64_setup_incoming_varargs (cumulative_args_t cum_v,
2204722025
2204822026 /* We don't save the size into *PRETEND_SIZE because we want to avoid
2204922027 any complication of having crtl->args.pretend_args_size changed. */
22050- #if defined (TARGET_AARCH64_MS_ABI)
2205122028 cfun->machine->frame.unaligned_saved_varargs_size = gr_saved * UNITS_PER_WORD;
22052- #endif
2205322029 cfun->machine->frame.saved_varargs_size
22054- = (ROUND_UP (gr_saved * UNITS_PER_WORD ,
22030+ = (ROUND_UP (cfun->machine->frame.unaligned_saved_varargs_size ,
2205522031 STACK_BOUNDARY / BITS_PER_UNIT)
2205622032 + vr_saved * UNITS_PER_VREG);
2205722033}
@@ -25250,8 +25226,6 @@ aarch64_post_cfi_startproc (FILE *f, tree ignored ATTRIBUTE_UNUSED)
2525025226 asm_fprintf (f, "\t.cfi_b_key_frame\n");
2525125227}
2525225228
25253- #if defined (TARGET_AARCH64_MS_ABI)
25254-
2525525229/* Implement TARGET_STRICT_ARGUMENT_NAMING.
2525625230
2525725231 Return true if the location where a function argument is passed
@@ -25271,8 +25245,6 @@ aarch64_ms_variadic_abi_strict_argument_naming (cumulative_args_t pcum_v)
2527125245 return hook_bool_CUMULATIVE_ARGS_true(pcum_v);
2527225246}
2527325247
25274- #endif
25275-
2527625248/* Implements TARGET_ASM_FILE_START. Output the assembly header. */
2527725249
2527825250static void
0 commit comments