| ... | ... | @@ -3066,14 +3066,17 @@ pub fn ptrBitWidth(target: *const Target) u16 { |
| 3066 | 3066 | pub fn stackAlignment(target: *const Target) u16 { |
| 3067 | 3067 | // Overrides for when the stack alignment is not equal to the pointer width. |
| 3068 | 3068 | switch (target.cpu.arch) { |
| 3069 | | .ez80 => return 1, |
| 3069 | .avr, |
| 3070 | .ez80, |
| 3071 | => return 1, |
| 3070 | 3072 | |
| 3071 | | .m68k => return 2, |
| 3073 | .m68k => if (target.os.tag != .netbsd) return 2, |
| 3072 | 3074 | |
| 3073 | 3075 | .amdgcn => return 4, |
| 3074 | 3076 | |
| 3075 | 3077 | .arm, |
| 3076 | 3078 | .armeb, |
| 3079 | .hexagon, |
| 3077 | 3080 | .hppa, |
| 3078 | 3081 | .lanai, |
| 3079 | 3082 | .mips, |
| ... | ... | @@ -3091,28 +3094,34 @@ pub fn stackAlignment(target: *const Target) u16 { |
| 3091 | 3094 | .hppa64, |
| 3092 | 3095 | .loongarch32, |
| 3093 | 3096 | .loongarch64, |
| 3097 | .m88k, |
| 3094 | 3098 | .mips64, |
| 3095 | 3099 | .mips64el, |
| 3100 | .powerpc, |
| 3101 | .powerpcle, |
| 3102 | .powerpc64, |
| 3103 | .powerpc64le, |
| 3096 | 3104 | .sparc64, |
| 3097 | 3105 | .ve, |
| 3098 | 3106 | .wasm32, |
| 3099 | 3107 | .wasm64, |
| 3100 | 3108 | .x86_64, |
| 3109 | .xtensa, |
| 3110 | .xtensaeb, |
| 3101 | 3111 | => return 16, |
| 3102 | 3112 | |
| 3103 | | // Some of the following prongs should really be testing the ABI, but our current `Abi` enum |
| 3104 | | // can't handle that level of nuance yet. |
| 3105 | | .powerpc64, |
| 3106 | | .powerpc64le, |
| 3107 | | => if (target.os.tag == .linux) return 16, |
| 3108 | | |
| 3109 | 3113 | .riscv32, |
| 3110 | 3114 | .riscv32be, |
| 3111 | 3115 | .riscv64, |
| 3112 | 3116 | .riscv64be, |
| 3113 | 3117 | => if (!target.cpu.has(.riscv, .e)) return 16, |
| 3114 | 3118 | |
| 3115 | | .x86 => if (target.os.tag != .windows and target.os.tag != .uefi) return 16, |
| 3119 | .x86 => switch (target.os.tag) { |
| 3120 | .hurd, |
| 3121 | .linux, |
| 3122 | => return 16, |
| 3123 | else => {}, |
| 3124 | }, |
| 3116 | 3125 | |
| 3117 | 3126 | .kvx => return 32, |
| 3118 | 3127 | |