| ... | ... | @@ -1787,18 +1787,12 @@ pub const Target = struct { |
| 1787 | 1787 | .hexagon, |
| 1788 | 1788 | .mips, |
| 1789 | 1789 | .mipsel, |
| 1790 | | .mips64, |
| 1791 | | .mips64el, |
| 1792 | 1790 | .powerpc, |
| 1793 | 1791 | .powerpcle, |
| 1794 | | .powerpc64, |
| 1795 | | .powerpc64le, |
| 1796 | 1792 | .r600, |
| 1797 | 1793 | .amdgcn, |
| 1798 | 1794 | .riscv32, |
| 1799 | | .riscv64, |
| 1800 | 1795 | .sparc, |
| 1801 | | .sparcv9, |
| 1802 | 1796 | .sparcel, |
| 1803 | 1797 | .s390x, |
| 1804 | 1798 | .lanai, |
| ... | ... | @@ -1812,10 +1806,20 @@ pub const Target = struct { |
| 1812 | 1806 | }, |
| 1813 | 1807 | |
| 1814 | 1808 | // For x86_64, LLVMABIAlignmentOfType(i128) reports 8. However I think 16 |
| 1815 | | // is a better number because of two reasons: |
| 1809 | // is a better number for two reasons: |
| 1816 | 1810 | // 1. Better machine code when loading into SIMD register. |
| 1817 | 1811 | // 2. The C ABI wants 16 for extern structs. |
| 1812 | // 3. 16-byte cmpxchg needs 16-byte alignment. |
| 1813 | // Same logic for riscv64, powerpc64, mips64, sparcv9. |
| 1818 | 1814 | .x86_64, |
| 1815 | .riscv64, |
| 1816 | .powerpc64, |
| 1817 | .powerpc64le, |
| 1818 | .mips64, |
| 1819 | .mips64el, |
| 1820 | .sparcv9, |
| 1821 | |
| 1822 | // Even LLVMABIAlignmentOfType(i128) agrees on these targets. |
| 1819 | 1823 | .aarch64, |
| 1820 | 1824 | .aarch64_be, |
| 1821 | 1825 | .aarch64_32, |
| ... | ... | @@ -1825,11 +1829,9 @@ pub const Target = struct { |
| 1825 | 1829 | .nvptx64, |
| 1826 | 1830 | => 16, |
| 1827 | 1831 | |
| 1828 | | // Below this comment are unverified and I have chosen a number |
| 1829 | | // based on ptrBitWidth. |
| 1830 | | |
| 1831 | | .spu_2 => 2, |
| 1832 | | |
| 1832 | // Below this comment are unverified but based on the fact that C requires |
| 1833 | // int128_t to be 16 bytes aligned, it's a safe default. |
| 1834 | .spu_2, |
| 1833 | 1835 | .csky, |
| 1834 | 1836 | .arc, |
| 1835 | 1837 | .m68k, |
| ... | ... | @@ -1843,8 +1845,6 @@ pub const Target = struct { |
| 1843 | 1845 | .renderscript32, |
| 1844 | 1846 | .spirv32, |
| 1845 | 1847 | .shave, |
| 1846 | | => 4, |
| 1847 | | |
| 1848 | 1848 | .le64, |
| 1849 | 1849 | .amdil64, |
| 1850 | 1850 | .hsail64, |
| ... | ... | @@ -1852,7 +1852,7 @@ pub const Target = struct { |
| 1852 | 1852 | .renderscript64, |
| 1853 | 1853 | .ve, |
| 1854 | 1854 | .spirv64, |
| 1855 | | => 8, |
| 1855 | => 16, |
| 1856 | 1856 | }; |
| 1857 | 1857 | } |
| 1858 | 1858 | }; |