mirror of
https://github.com/ziglang/zig.git
synced 2026-02-13 04:48:20 +00:00
stage2: riscv correctly aligned functions
This commit is contained in:
parent
0b53a2d996
commit
e3352db986
@ -510,13 +510,18 @@ pub const Type = extern union {
|
||||
.u8,
|
||||
.i8,
|
||||
.bool,
|
||||
.array_u8_sentinel_0,
|
||||
=> return 1,
|
||||
|
||||
.fn_noreturn_no_args, // represents machine code; not a pointer
|
||||
.fn_void_no_args, // represents machine code; not a pointer
|
||||
.fn_naked_noreturn_no_args, // represents machine code; not a pointer
|
||||
.fn_ccc_void_no_args, // represents machine code; not a pointer
|
||||
.function, // represents machine code; not a pointer
|
||||
.array_u8_sentinel_0,
|
||||
=> return 1,
|
||||
=> return switch (target.cpu.arch) {
|
||||
.riscv64 => 2,
|
||||
else => 1,
|
||||
},
|
||||
|
||||
.i16, .u16 => return 2,
|
||||
.i32, .u32 => return 4,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user