Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

ILP32 is a programming data model in which int, long, and pointers are each 32 bits wide. It does not mean every data type is 32 bits, nor does the name alone define a complete application binary interface (ABI). The exact rules depend on the platform and ABI variant.

What does ILP32 mean?

The letters describe the widths of three C data types: int, long, and pointers. In the conventional ILP32 model, each is 32 bits (4 bytes). The model is useful for understanding how programs represent values and addresses, but it is only one part of an ABI.

An ABI also defines how compiled code interacts: for example, how functions receive arguments and return values, and how binary objects follow platform conventions. Consequently, two ABIs that share the ILP32 data model can still differ in important compatibility rules.

Does ILP32 make every type 32 bits?

No. The RISC-V specification’s RV32 ILP32-family type table shows the model’s distinctions: short is 2 bytes, long long and double are 8 bytes, and long double is 16 bytes. The table gives int, long, and void * as 4 bytes each. It also specifies alignment, which is not necessarily the same as size: for the listed int, long, and void * types, alignment is 4 bytes. See the RISC-V C/C++ type details for the full table.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

ILP32 vs. LP64

The main difference is the width of long and pointers. In LP64, both are 64 bits while int remains 32 bits in the RISC-V specification’s table. The names refer to data models, not a guarantee that every platform using a 64-bit processor uses LP64.

Data model int long Pointer
ILP32 32 bits 32 bits 32 bits
LP64 (RISC-V table) 32 bits 64 bits 64 bits

These widths affect source and binary compatibility. Code that assumes a particular width for long or stores a pointer in an integer type can behave differently when moved between models. Use types and interfaces appropriate to the target platform rather than assuming the data model from the processor name alone.

Can a 64-bit processor run an ILP32 ABI?

It depends on the architecture and its supported ABIs. For RISC-V specifically, the ABI specification pairs ILP32-family ABIs with RV32-family instruction-set architectures and LP64-family ABIs with RV64-family architectures; it states that ILP32 is not compatible with RV64. This is a RISC-V rule, not a universal statement about every processor family. The RISC-V specification states: “The ILP32* ABIs are only compatible with RV32* ISAs, and the LP64* ABIs are only compatible with RV64* ISAs.” See section 2.1.4 of the RISC-V procedure-calling-convention specification.

RISC-V ILP32 variants

RISC-V names several ILP32 variants. They share the data-model family but differ in calling-convention choices and, in the embedded case, register conventions.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Variant Calling convention or distinction Status listed by RISC-V International
ILP32 Integer calling convention Ratified
ILP32F Hardware floating-point convention for ABI_FLEN=32 Ratified
ILP32D Hardware floating-point convention for ABI_FLEN=64 Ratified
ILP32E Embedded, reduced-register variant; uses the RISC-V embedded ELF flag Draft

The variant descriptions come from the procedure-calling-convention specification; ratification status is listed on RISC-V International’s ABI status page.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Platform-specific rules still matter

Even after identifying the data model and ABI variant, check the target platform’s definitions for other types and conventions. For example, the RISC-V Linux-specific ABI appendix gives both wchar_t and wint_t a size of 4 bytes, without an ILP32-versus-LP64 distinction for those types. That is a Linux-specific rule in this RISC-V document, not a statement about every ILP32 system. See the RISC-V Linux-specific ABI.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.