RISCV - 1 RV32/64G指令集清單
RISCV - 2 “Zicsr“, CSR Instructions
RISCV -3 RV32I/RV64I基本整型指令集
RISCV - 4 ISA 擴(kuò)展名命名約定
1 Register Convention
1.1 Integer Register Convention
In the RISCV standard ABI, procedures should not modify the integer registers tp and gp, because signal handlers may rely upon their values.
在RISCV標(biāo)準(zhǔn) ABI 中,函數(shù)調(diào)用過程不應(yīng)修改整數(shù)寄存器 tp 和 gp,因為處理程序可能依賴于它們的值。
The presence of a frame pointer is optional. If a frame pointer exists it must reside in x8 (s0), the register remains callee-saved.
幀指針的存在是可選的。如果存在幀指針,它必須位于 x8(s0)寄存器中,該寄存器將保持調(diào)用保存狀態(tài)。
x10-x11也作為返回值寄存器r0-r1。
1.2 Floating-point Register Convention
*: Floating-point values in callee-saved registers are only preserved across calls if they are no larger than the width of a floating-point register in the targeted ABI. Therefore, these registers can always be considered temporaries if targeting the base integer calling convention.
只有當(dāng) Callee-saved 寄存器中的浮點數(shù)值不大于目標(biāo) ABI 中浮點寄存器的寬度時,它們才會在跨調(diào)用時被保留。因此,如果使用基整數(shù)調(diào)用約定,這些寄存器始終可視為臨時寄存器。
2. Procedure Calling Convention
2.1 Integer Calling Convention
The base integer calling convention provides eight argument registers, a0-a7, the first two of which are also used to return values(r0-r1).
基整數(shù)調(diào)用約定提供了八個參數(shù)寄存器(a0-a7),其中前兩個也用于返回值(r0-r1)。
Scalars that are at most XLEN bits wide are passed in a single argument register, or on the stack by value if none is available. When passed in registers or on the stack, integer scalars narrower than XLEN bits are widened according to the sign of their type up to 32 bits, then sign-extended to XLEN bits. When passed in registers or on the stack, floating-point types narrower than XLEN bits are widened to XLEN bits, with the upper bits undefined.
寬度最多為 XLEN 位的標(biāo)量會以單個參數(shù)寄存器的形式傳遞,如果沒有寄存器,則以值的形式傳遞到堆棧。在寄存器或堆棧中傳遞時,寬度小于 XLEN 位的整數(shù)標(biāo)量會根據(jù)其類型的符號加寬到 32 位,然后再根據(jù)符號加寬到 XLEN 位。在寄存器或堆棧中傳遞時,比 XLEN 位更小的浮點類型將擴(kuò)展到 XLEN 位,高位未定義。
Scalars that are 2×XLEN bits wide are passed in a pair of argument registers, with the low-order XLEN bits in the lower-numbered register and the high-order XLEN bits in the higher-numbered register. If no argument registers are available, the scalar is passed on the stack by value. If exactly one register is available, the low-order XLEN bits are passed in the register and the high-order XLEN bits are passed on the stack.
寬度為 2×XLEN 位的標(biāo)量會在一對參數(shù)寄存器中傳遞,低階 XLEN 位在編號較低的寄存器中,高階 XLEN 位在編號較高的寄存器中。如果沒有參數(shù)寄存器,標(biāo)量將按值傳遞到堆棧。如果正好有一個寄存器可用,則低階 XLEN 位在寄存器中傳遞,高階 XLEN 位在堆棧中傳遞。
Scalars wider than 2×XLEN are passed by reference and are replaced in the argument list with the address.
寬度大于 2×XLEN 的標(biāo)量通過引用傳遞,并在參數(shù)列表中用地址替換。
Aggregates whose total size is no more than XLEN bits are passed in a register, with the fields laid out as though they were passed in memory. If no register is available, the aggregate is passed on the stack. Aggregates whose total size is no more than 2×XLEN bits are passed in a pair of registers; if only one register is available, the first half is passed in a register and the second half is passed on the stack. If no registers are available, the aggregate is passed on the stack. Bits unused due to padding, and bits past the end of an aggregate whose size in bits is not divisible by XLEN, are undefined.
總大小不超過 XLEN 位的聚合將在寄存器中傳遞,字段的布局如同在內(nèi)存中傳遞一樣。如果沒有寄存器,則在堆棧中傳遞聚合??偞笮〔怀^ 2×XLEN 位的聚合將在一對寄存器中傳遞;如果只有一個寄存器可用,則前半部分在寄存器中傳遞,后半部分在堆棧中傳遞。如果沒有寄存器,則在堆棧中傳遞總數(shù)。由于填充而未使用的比特,以及超過集合末尾的比特(其比特大小不能被 XLEN 除盡)都是未定義的。
Aggregates or scalars passed on the stack are aligned to the greater of the type alignment and XLEN bits, but never more than the stack alignment.
在堆棧中傳遞的聚合或標(biāo)量的對齊方式為類型對齊方式和 XLEN 位中的較大值,但絕對不會超過堆棧對齊方式。
Aggregates larger than 2×XLEN bits are passed by reference and are replaced in the argument list with the address, as are C++ aggregates with nontrivial copy constructors, destructors, or vtables.
大于 2×XLEN 位的聚合以引用方式傳遞,并在參數(shù)列表中用地址替換,具有非簡單拷貝構(gòu)造函數(shù)、析構(gòu)函數(shù)或 vtables 的 C++ 聚合也是如此。
Empty structs or union arguments or return values are ignored by C compilers which support them as a nonstandard extension. This is not the case for C++, which requires them to be sized types.
空結(jié)構(gòu)體、union 參數(shù)或返回值會被 C 編譯器忽略,因為 C 編譯器將其作為非標(biāo)準(zhǔn)擴(kuò)展來支持。而 C++ 則不同,它要求它們是有大小的類型。
Bitfields are packed in little-endian fashion. A bitfield that would span the alignment boundary of its integer type is padded to begin at the next alignment boundary. For example, struct { int x : 10; int y : 12; } is a 32-bit type with x in bits 9-0, y in bits 21-10, and bits 31-22 undefined. By contrast, struct { short x : 10; short y : 12; } is a 32-bit type with x in bits 9-0, y in bits 27-16, and bits 31-28 and 15-10 undefined.
位字段以小端方式打包。一個位字段如果跨越了其整數(shù)類型的對齊邊界,就會被填充到下一個對齊邊界開始。例如,struct { int x : 10; int y : 12; } 是一個 32 位類型,其中 x 位于第 9-0 位,y 位于第 21-10 位,第 31-22 位未定義。相反,struct { short x : 10; short y : 12; } 是一個 32 位類型,其中 x 位于第 9-0 位,y 位于第 27-16 位,第 31-28 位和第 15-10 位未定義。
Arguments passed by reference may be modified by the callee.
以引用方式傳遞的參數(shù)可由被調(diào)用者修改。
Floating-point reals are passed the same way as aggregates of the same size, complex floating-point numbers are passed the same way as a struct containing two floating-point reals. (This constraint changes when the integer calling convention is augmented by the hardware floating-point calling convention.)
浮點實數(shù)的傳遞方式與相同大小的聚合數(shù)相同,復(fù)數(shù)浮點數(shù)的傳遞方式與包含兩個浮點實數(shù)的結(jié)構(gòu)體相同。(當(dāng)硬件浮點調(diào)用規(guī)范增加了整數(shù)調(diào)用約定時,這一限制就會改變)。
In the base integer calling convention, variadic arguments are passed in the same manner as named arguments, with one exception. Variadic arguments with 2×XLEN-bit alignment and size at most 2×XLEN bits are passed in an aligned register pair (i.e., the first register in the pair is even-numbered), or on the stack by value if none is available. After a variadic argument has been passed on the stack, all future arguments will also be passed on the stack (i.e. the last argument register may be left unused due to the aligned register pair rule).
在基整數(shù)調(diào)用規(guī)范中,可變參數(shù)的傳遞方式與命名參數(shù)相同,但有一個例外。對齊方式為 2×XLEN 位、大小最多為 2×XLEN 位的可變參數(shù),以對齊寄存器對的形式傳遞(即寄存器對中的第一個寄存器為偶數(shù)),如果沒有寄存器對,則以值的形式傳遞到堆棧。一個可變參數(shù)傳入堆棧后,以后所有參數(shù)也將傳入堆棧(即由于寄存器對齊規(guī)則,最后一個參數(shù)寄存器可能未被使用)。
Values are returned in the same manner as a first named argument of the same type would be passed. If such an argument would have been passed by reference, the caller allocates memory for the return value, and passes the address as an implicit first parameter.
返回值的方式與傳遞同類型第一個命名參數(shù)的方式相同。如果該參數(shù)通過引用傳遞,調(diào)用者將為返回值分配內(nèi)存,并將地址作為隱式的第一參數(shù)傳遞。
The stack grows downwards (towards lower addresses) and the stack pointer shall be aligned to a 128-bit boundary upon procedure entry. The first argument passed on the stack is located at offset zero of the stack pointer on function entry; following arguments are stored at correspondingly higher addresses.
堆棧向下增長(向低地址增長),堆棧指針應(yīng)在程序進(jìn)入時對齊到 128 位邊界。堆棧中傳遞的第一個參數(shù)位于函數(shù)入口處堆棧指針的零偏移量處;后面的參數(shù)存儲在相應(yīng)的更高地址處。
In the standard ABI, the stack pointer must remain aligned throughout procedure execution. Non-standard ABI code must realign the stack pointer prior to invoking standard ABI procedures. The operating system must realign the stack pointer prior to invoking a signal handler; hence, POSIX signal handlers need not realign the stack pointer. In systems that service interrupts using the interruptee’s stack, the interrupt service routine must realign the stack pointer if linked with any code that uses a non-standard stack-alignment discipline, but need not realign the stack pointer if all code adheres to the standard ABI.
在標(biāo)準(zhǔn) ABI 中,堆棧指針必須在整個程序執(zhí)行過程中保持對齊。非標(biāo)準(zhǔn) ABI 代碼必須在調(diào)用標(biāo)準(zhǔn) ABI 程序之前重新對齊堆棧指針。操作系統(tǒng)必須在調(diào)用函數(shù)處理程序之前重新對齊堆棧指針;因此,POSIX 函數(shù)處理程序無需重新對齊堆棧指針。在提供中斷服務(wù)的系統(tǒng)中使用中斷棧,如果中斷服務(wù)例程與任何使用非標(biāo)準(zhǔn)堆棧對齊規(guī)則的代碼相連,則必須重新對齊堆棧指針,但如果所有代碼都遵守標(biāo)準(zhǔn) ABI,則無需重新對齊堆棧指針。
Procedures must not rely upon the persistence of stack-allocated data whose addresses lie below the stack pointer.
程序不得依賴地址位于堆棧指針下方的堆棧分配數(shù)據(jù)的持久性。
Registers s0-s11 shall be preserved across procedure calls. No floating-point registers, if present, are preserved across calls. (This property changes when the integer calling convention is augmented by the hardware floatingpoint calling convention.)
寄存器 s0-s11 應(yīng)在程序調(diào)用時保留。浮點寄存器(如果存在)在調(diào)用過程中不會被保留。(當(dāng)硬件浮點調(diào)用約定增加了整數(shù)調(diào)用規(guī)則時,這一屬性將發(fā)生變化)。
2.2 Hardware Floating-point Calling Convention
The hardware floating-point calling convention adds eight floating-point argument registers, fa0-fa7, the first two of which are also used to return values. Values are passed in floating-point registers whenever possible, whether or not the integer registers have been exhausted.
硬件浮點調(diào)用規(guī)范增加了 8 個浮點參數(shù)寄存器(fa0-fa7),其中前兩個也用于返回值。無論整數(shù)寄存器是否已用完,只要有可能,就會使用浮點寄存器傳遞數(shù)值。
The remainder of this section applies only to named arguments. Variadic arguments are passed according to the integer calling convention.
本節(jié)的其余部分僅適用于命名參數(shù)。可變參數(shù)根據(jù)整數(shù)調(diào)用規(guī)范傳遞。
For the purposes of this section, FLEN refers to the width of a floating-point register in the ABI. The ABI’s FLEN must be no wider than the ISA’s FLEN. The ISA might have wider floating-point registers than the ABI.
就本節(jié)而言,F(xiàn)LEN 指的是 ABI 中浮點寄存器的寬度。 ABI 的 FLEN 不得比 ISA 的 FLEN 寬。 ISA 可能具有比 ABI 更寬的浮點寄存器。
For the purposes of this section, “struct” refers to a C struct with its hierarchy flattened, including any array fields. That is, struct { struct { float f[1]; } g[2]; } and struct { float f; float g; } are treated the same. Fields containing empty structs or unions are ignored while flattening, even in C++, unless they have nontrivial copy constructors or destructors. Fields containing zero-length bit-fields are ignored while flattening. Attributes such as aligned or packed do not interfere with a struct’s eligibility for being passed in registers according to the rules below, i.e. struct { int i; double d; } and struct attribute packed { int i; double d } are treated the same, as are struct { float f; float g; } and struct { float f; float g attribute aligned (8); }.
A real floating-point argument is passed in a floating-point argument register if it is no more than FLEN bits wide and at least one floating-point argument register is available. Otherwise, it is passed according to the integer calling convention. When a floating-point argument narrower than FLEN bits is passed in a floating-point register, it is 1-extended (NaN-boxed) to FLEN bits.
如果實浮點參數(shù)的寬度不超過 FLEN 位,且至少有一個浮點參數(shù)寄存器可用,則該參數(shù)會在浮點參數(shù)寄存器中傳遞。否則,將按照整數(shù)調(diào)用規(guī)范傳遞。在浮點參數(shù)寄存器中傳遞寬度小于 FLEN 位的浮點參數(shù)時,將對其進(jìn)行 1 擴(kuò)展(NaN-boxed)至 FLEN 位。
A struct containing just one floating-point real is passed as though it were a standalone floating-point real.
只包含一個浮點實數(shù)的結(jié)構(gòu)體在傳遞時就像傳遞一個獨立的浮點實數(shù)一樣。
A struct containing two floating-point reals is passed in two floating-point registers, if neither is more than FLEN bits wide and at least two floating-point argument registers are available. (The registers need not be an aligned pair.) Otherwise, it is passed according to the integer calling convention.
如果兩個浮點寄存器都不超過 FLEN 位寬并且至少有兩個浮點參數(shù)寄存器可用,則包含兩個浮點實數(shù)的結(jié)構(gòu)將傳遞到兩個浮點寄存器中。 (寄存器不必是對齊的對。)否則,它將根據(jù)整數(shù)調(diào)用規(guī)范進(jìn)行傳遞。
A complex floating-point number, or a struct containing just one complex floating-point number, is passed as though it were a struct containing two floating-point reals.
傳遞一個復(fù)數(shù)浮點數(shù)或僅包含一個復(fù)數(shù)浮點數(shù)的結(jié)構(gòu),就好像它是包含兩個浮點實數(shù)的結(jié)構(gòu)一樣。
A struct containing one floating-point real and one integer (or bitfield), in either order, is passed in a floating-point register and an integer register, without extending the integer to XLEN bits, provided the floating-point real is no more than FLEN bits wide and the integer is no more than XLEN bits wide, and at least one floating-point argument register and at least one integer argument register is available. Otherwise, it is passed according to the integer calling convention.
包含一個浮點實數(shù)和一個整數(shù)(或位域)的結(jié)構(gòu)(無論順序如何)都會傳遞到浮點寄存器和整數(shù)寄存器中,而不將整數(shù)擴(kuò)展為 XLEN 位,前提是浮點實數(shù)不超過 FLEN位寬且整數(shù)不超過 XLEN 位寬,并且至少 1 個浮點參數(shù)寄存器和至少 1 個整數(shù)參數(shù)寄存器可用。否則,將根據(jù)整數(shù)調(diào)用約定進(jìn)行傳遞。
Unions are never flattened and are always passed according to the integer calling convention.
Unions永遠(yuǎn)不會被展平,并且始終根據(jù)整數(shù)調(diào)用約定進(jìn)行傳遞。
Values are returned in the same manner as a first named argument of the same type would be passed.
返回值的方式與傳遞相同類型的第一個命名參數(shù)相同。
Floating-point registers fs0-fs11 shall be preserved across procedure calls, provided they hold values no more than FLEN bits wide.
浮點寄存器 fs0-fs11 應(yīng)在函數(shù)調(diào)用中保留,前提是它們保存的值不超過 FLEN 位寬。
2.3 ILP32E Calling Convention
The ILP32E calling convention is designed to be usable with the RV32E ISA. This calling convention is the same as the integer calling convention, except for the following differences. The stack pointer need only be aligned to a 32-bit boundary. Registers x16-x31 do not participate in the calling convention, so there are only six argument registers, a0-a5, only two callee-saved registers, s0-s1, and only three temporaries, t0-t2.
ILP32E 調(diào)用規(guī)范設(shè)計用于 RV32E ISA。該調(diào)用規(guī)范與整數(shù)調(diào)用規(guī)范相同,但有以下區(qū)別。堆棧指針只需對齊 32 位邊界。寄存器 x16-x31 不參與調(diào)用規(guī)范,因此只有 6 個參數(shù)寄存器(a0-a5)、2 個保存值寄存器(s0-s1)和 3 個暫存寄存器(t0-t2)。
If used with an ISA that has any of the registers x16-x31 and f0-f31, then these registers are considered temporaries.
如果與具有 x16-x31 和 f0-f31 寄存器的 ISA 一起使用,這些寄存器將被視為臨時寄存器。
The ILP32E calling convention is not compatible with ISAs that have registers that require load and store alignments of more than 32 bits. In particular, this calling convention must not be used with the D ISA extension.
ILP32E 調(diào)用約定與寄存器需要超過 32 位的加載和存儲排列的 ISA 不兼容。特別是,該調(diào)用規(guī)范不得與 D ISA 擴(kuò)展一起使用。
2.4 Named ABIs
This specification defines the following named ABIs:
ILP32
Integer calling-convention only, hardware floating-point calling convention is not used (i.e. ELFCLASS32 and EF_RISCV_FLOAT_ABI_SOFT).
ILP32F
ILP32 with hardware floating-point calling convention for FLEN=32 (i.e. ELFCLASS32 and EF_RISCV_FLOAT_ABI_SINGLE).
ILP32D
ILP32 with hardware floating-point calling convention for FLEN=64 (i.e. ELFCLASS32 and EF_RISCV_FLOAT_ABI_DOUBLE).
ILP32E
ILP32E calling-convention only, hardware floating-point calling convention is not used (i.e. ELFCLASS32, EF_RISCV_FLOAT_ABI_SOFT, and EF_RISCV_RVE).
LP64
Integer calling-convention only, hardware floating-point calling convention is not used (i.e. ELFCLASS64 and EF_RISCV_FLOAT_ABI_SOFT).
LP64F
LP64 with hardware floating-point calling convention for FLEN=32 (i.e. ELFCLASS64 and EF_RISCV_FLOAT_ABI_SINGLE).
LP64D
LP64 with hardware floating-point calling convention for FLEN=64 (i.e. ELFCLASS64 and EF_RISCV_FLOAT_ABI_DOUBLE).
LP64Q
LP64 with hardware floating-point calling convention for FLEN=128 (i.e. ELFCLASS64 and EF_RISCV_FLOAT_ABI_QUAD).
The ILP32* ABIs are only compatible with RV32* ISAs, and the LP64* ABIs are only compatible with RV64* ISAs. A future version of this specification may define an ILP32 ABI for the RV64 ISA, but currently this is not a supported operating mode.The F ABIs require the F ISA extension, the D ABIs require the D ISA extension, and the LP64Q ABI requires the Q ISA extension.
ILP32 ABI 僅與 RV32 ISA 兼容,LP64 ABI 僅與 RV64 ISA 兼容。該規(guī)范的未來版本可能會為 RV64 ISA 定義 ILP32 ABI,但目前這不是受支持的操作模式。 *F ABI 需要 *F ISA 擴(kuò)展,*D ABI 需要 D ISA 擴(kuò)展, LP64Q ABI 需要 Q ISA 擴(kuò)展。
Note: This means code targeting the Zfinx extension always uses the ILP32, ILP32E or LP64 integer calling-convention only ABIs as there is no dedicated hardware floating-point register file.
注意: 這意味著針對 Zfinx 擴(kuò)展的代碼始終只使用 ILP32、ILP32E 或 LP64 整數(shù)調(diào)用規(guī)范 ABI,因為沒有專用的硬件浮點寄存器文件。
2.5 Default ABIs
While various different ABIs are technically possible, for software compatibility reasons it is strongly recommended to use the following default ABIs for specific architectures:
雖然技術(shù)上可以使用各種不同的 ABI,但出于軟件兼容性的考慮,強(qiáng)烈建議針對特定架構(gòu)使用以下默認(rèn) ABI:
on RV32G :ILP32D
on RV64G :LP64D
Note: Although RV64GQ systems can technically use LP64Q, it is strongly recommended to use LP64D on general-purpose RV64GQ systems for compatibility with standard RV64G software.
注意: 盡管 RV64GQ 系統(tǒng)在技術(shù)上可以使用 LP64Q,但強(qiáng)烈建議在通用 RV64GQ 系統(tǒng)上使用 LP64D,以便與標(biāo)準(zhǔn) RV64G 軟件兼容。
3. C/C++ type details
3.1 C/C++ type sizes and alignments
There are two conventions for C/C++ type sizes and alignments.
C/C++ 有兩種類型大小和對齊方式的規(guī)范。
3.1.1 ILP32, ILP32F, ILP32D, and ILP32E
Use the following type sizes and alignments (based on the ILP32 convention):
使用以下字體大小和排列方式(基于 ILP32 約定):
3.1.2 LP64, LP64F, LP64D, and LP64Q
Use the following type sizes and alignments (based on the LP64 convention):
使用以下字體大小和排列方式(基于 LP64 約定):
The alignment of max_align_t is 16.
max_align_t 的對齊方式為 16。
CHAR_BIT is 8.
CHAR_BIT 為 8。
Structs and unions are aligned to the alignment of their most strictly aligned member. The size of any object is a multiple of its alignment.
結(jié)構(gòu)體和聯(lián)合體按照其最嚴(yán)格對齊的成員的對齊方式對齊。任何對象的大小都是其對齊方式的倍數(shù)。
3.2 C/C++ type representations
char is unsigned.
char 是無符號的。
Booleans (bool/_Bool) stored in memory or when being passed as scalar arguments are either 0 (false) or 1 (true).
存儲在內(nèi)存中或作為標(biāo)量參數(shù)傳遞時的布爾值(bool/_Bool)要么是 0(假),要么是 1(真)。
A null pointer (for all types) has the value zero.
空指針(適用于所有類型)的值為零。
_Float16 is as defined in the C ISO/IEC TS 18661-3 extension.
_Float16 在 C ISO/IEC TS 18661-3 擴(kuò)展中定義。
_Complex types have the same layout as a struct containing two fields of the corresponding real type (float, double, or long double), with the first member holding the real part and the second member holding the imaginary part.
_復(fù)數(shù)類型的布局與包含相應(yīng)實數(shù)類型(float、double 或 long double)的兩個字段的結(jié)構(gòu)相同,第一個成員表示實部,第二個成員表示虛部。
3.3 va_list, va_start, and va_arg
The va_list type is void*. A callee with variadic arguments is responsible for copying the contents of registers used to pass variadic arguments to the vararg save area, which must be contiguous with arguments passed on the stack. The va_start macro initializes its va_list argument to point to the start of the vararg save area. The va_arg macro will increment its va_list argument according to the size of the given type, taking into account the rules about 2×XLEN aligned arguments being passed in “aligned” register pairs.
va_list 類型為 void*。帶有可變參數(shù)的被調(diào)用者負(fù)責(zé)將用于傳遞可變參數(shù)的寄存器內(nèi)容復(fù)制到 vararg 保存區(qū)域,該區(qū)域必須與堆棧上傳遞的參數(shù)相鄰。va_start 宏將其 va_list 參數(shù)初始化為指向 vararg 保存區(qū)域的起點。va_arg 宏將根據(jù)給定類型的大小遞增 va_list 參數(shù),同時考慮到 2×XLEN 對齊參數(shù)在 "對齊 "寄存器對中傳遞的規(guī)則。
4 Linux-specific ABI
Note: This section of the RISC-V calling convention specification only applies to Linux-based systems.
注意: RISC-V 調(diào)用約定規(guī)范的這一部分僅適用于基于 Linux 的系統(tǒng)。
In order to ensure compatibility between different implementations of the C library for Linux, we provide some extra definitions which only apply on those systems. These are noted in this section.
為了確保 Linux C 庫不同實現(xiàn)之間的兼容性,我們提供了一些僅適用于這些系統(tǒng)的額外定義。本節(jié)將對這些定義進(jìn)行說明。
4.1 Linux-specific C type sizes and alignments
The following definitions apply for all ABIs defined in this document. Here there is no differentiation between ILP32 and LP64 abis.
以下定義適用于本文檔中定義的所有 ABI。這里不區(qū)分 ILP32 和 LP64 abis。文章來源:http://www.zghlxwxcb.cn/news/detail-623027.html
4.2 Linux-specific C type representations
The following definitions apply for all ABIs defined in this document. Here there is no differentiation between ILP32 and LP64 abis.
以下定義適用于本文檔中定義的所有 ABI。這里不區(qū)分 ILP32 和 LP64 Abis。
wchar_t is signed.
wchar_t 是有符號的。
wint_t is unsigned.
wint_t 是無符號的。文章來源地址http://www.zghlxwxcb.cn/news/detail-623027.html
到了這里,關(guān)于RISCV 5 RISC-V調(diào)用規(guī)則的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!