| ... | @@ -686,21 +686,41 @@ static int get_arch_pointer_bit_width(ZigLLVM_ArchType arch) { | ... | @@ -686,21 +686,41 @@ static int get_arch_pointer_bit_width(ZigLLVM_ArchType arch) { |
| 686 | uint32_t target_c_type_size_in_bits(const ZigTarget *target, CIntType id) { | 686 | uint32_t target_c_type_size_in_bits(const ZigTarget *target, CIntType id) { |
| 687 | switch (target->os) { | 687 | switch (target->os) { |
| 688 | case OsFreestanding: | 688 | case OsFreestanding: |
| 689 | switch (id) { | 689 | switch (target->arch.arch) { |
| 690 | case CIntTypeShort: | 690 | case ZigLLVM_msp430: |
| 691 | case CIntTypeUShort: | 691 | switch (id) { |
| 692 | return 16; | 692 | case CIntTypeShort: |
| 693 | case CIntTypeInt: | 693 | case CIntTypeUShort: |
| 694 | case CIntTypeUInt: | 694 | return 16; |
| 695 | return 32; | 695 | case CIntTypeInt: |
| 696 | case CIntTypeLong: | 696 | case CIntTypeUInt: |
| 697 | case CIntTypeULong: | 697 | return 16; |
| 698 | return get_arch_pointer_bit_width(target->arch.arch); | 698 | case CIntTypeLong: |
| 699 | case CIntTypeLongLong: | 699 | case CIntTypeULong: |
| 700 | case CIntTypeULongLong: | 700 | return get_arch_pointer_bit_width(target->arch.arch); |
| 701 | return 64; | 701 | case CIntTypeLongLong: |
| 702 | case CIntTypeCount: | 702 | case CIntTypeULongLong: |
| 703 | zig_unreachable(); | 703 | return 64; |
| | 704 | case CIntTypeCount: |
| | 705 | zig_unreachable(); |
| | 706 | } |
| | 707 | default: |
| | 708 | switch (id) { |
| | 709 | case CIntTypeShort: |
| | 710 | case CIntTypeUShort: |
| | 711 | return 16; |
| | 712 | case CIntTypeInt: |
| | 713 | case CIntTypeUInt: |
| | 714 | return 32; |
| | 715 | case CIntTypeLong: |
| | 716 | case CIntTypeULong: |
| | 717 | return get_arch_pointer_bit_width(target->arch.arch); |
| | 718 | case CIntTypeLongLong: |
| | 719 | case CIntTypeULongLong: |
| | 720 | return 64; |
| | 721 | case CIntTypeCount: |
| | 722 | zig_unreachable(); |
| | 723 | } |
| 704 | } | 724 | } |
| 705 | case OsLinux: | 725 | case OsLinux: |
| 706 | case OsMacOSX: | 726 | case OsMacOSX: |