| ... | ... | @@ -3087,14 +3087,17 @@ pub fn ptrBitWidth(target: *const Target) u16 { |
| 3087 | 3087 | pub fn stackAlignment(target: *const Target) u16 { |
| 3088 | 3088 | // Overrides for when the stack alignment is not equal to the pointer width. |
| 3089 | 3089 | switch (target.cpu.arch) { |
| 3090 | | .ez80 => return 1, |
| 3090 | .avr, |
| 3091 | .ez80, |
| 3092 | => return 1, |
| 3091 | 3093 | |
| 3092 | | .m68k => return 2, |
| 3094 | .m68k => if (target.os.tag != .netbsd) return 2, |
| 3093 | 3095 | |
| 3094 | 3096 | .amdgcn => return 4, |
| 3095 | 3097 | |
| 3096 | 3098 | .arm, |
| 3097 | 3099 | .armeb, |
| 3100 | .hexagon, |
| 3098 | 3101 | .hppa, |
| 3099 | 3102 | .lanai, |
| 3100 | 3103 | .mips, |
| ... | ... | @@ -3112,28 +3115,34 @@ pub fn stackAlignment(target: *const Target) u16 { |
| 3112 | 3115 | .hppa64, |
| 3113 | 3116 | .loongarch32, |
| 3114 | 3117 | .loongarch64, |
| 3118 | .m88k, |
| 3115 | 3119 | .mips64, |
| 3116 | 3120 | .mips64el, |
| 3121 | .powerpc, |
| 3122 | .powerpcle, |
| 3123 | .powerpc64, |
| 3124 | .powerpc64le, |
| 3117 | 3125 | .sparc64, |
| 3118 | 3126 | .ve, |
| 3119 | 3127 | .wasm32, |
| 3120 | 3128 | .wasm64, |
| 3121 | 3129 | .x86_64, |
| 3130 | .xtensa, |
| 3131 | .xtensaeb, |
| 3122 | 3132 | => return 16, |
| 3123 | 3133 | |
| 3124 | | // Some of the following prongs should really be testing the ABI, but our current `Abi` enum |
| 3125 | | // can't handle that level of nuance yet. |
| 3126 | | .powerpc64, |
| 3127 | | .powerpc64le, |
| 3128 | | => if (target.os.tag == .linux) return 16, |
| 3129 | | |
| 3130 | 3134 | .riscv32, |
| 3131 | 3135 | .riscv32be, |
| 3132 | 3136 | .riscv64, |
| 3133 | 3137 | .riscv64be, |
| 3134 | 3138 | => if (!target.cpu.has(.riscv, .e)) return 16, |
| 3135 | 3139 | |
| 3136 | | .x86 => if (target.os.tag != .windows and target.os.tag != .uefi) return 16, |
| 3140 | .x86 => switch (target.os.tag) { |
| 3141 | .hurd, |
| 3142 | .linux, |
| 3143 | => return 16, |
| 3144 | else => {}, |
| 3145 | }, |
| 3137 | 3146 | |
| 3138 | 3147 | .kvx => return 32, |
| 3139 | 3148 | |