| ... | ... | @@ -686,21 +686,41 @@ static int get_arch_pointer_bit_width(ZigLLVM_ArchType arch) { |
| 686 | 686 | uint32_t target_c_type_size_in_bits(const ZigTarget *target, CIntType id) { |
| 687 | 687 | switch (target->os) { |
| 688 | 688 | case OsFreestanding: |
| 689 | | switch (id) { |
| 690 | | case CIntTypeShort: |
| 691 | | case CIntTypeUShort: |
| 692 | | return 16; |
| 693 | | case CIntTypeInt: |
| 694 | | case CIntTypeUInt: |
| 695 | | return 32; |
| 696 | | case CIntTypeLong: |
| 697 | | case CIntTypeULong: |
| 698 | | return get_arch_pointer_bit_width(target->arch.arch); |
| 699 | | case CIntTypeLongLong: |
| 700 | | case CIntTypeULongLong: |
| 701 | | return 64; |
| 702 | | case CIntTypeCount: |
| 703 | | zig_unreachable(); |
| 689 | switch (target->arch.arch) { |
| 690 | case ZigLLVM_msp430: |
| 691 | switch (id) { |
| 692 | case CIntTypeShort: |
| 693 | case CIntTypeUShort: |
| 694 | return 16; |
| 695 | case CIntTypeInt: |
| 696 | case CIntTypeUInt: |
| 697 | return 16; |
| 698 | case CIntTypeLong: |
| 699 | case CIntTypeULong: |
| 700 | return get_arch_pointer_bit_width(target->arch.arch); |
| 701 | case CIntTypeLongLong: |
| 702 | case CIntTypeULongLong: |
| 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 | 725 | case OsLinux: |
| 706 | 726 | case OsMacOSX: |