authorgravatar for pfg@pfg.pwpfg <pfg@pfg.pw> 2020-08-04 03:30:55-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-08-04 14:38:33-07:00
loge3352db9860ab14f7f5fc8a41f97305c049ab0fe
tree8a7ed53c227677d716c27361546147dd08978640
parent0b53a2d996e7cad9f69ca04c5747f601f89468ef

stage2: riscv correctly aligned functions


1 files changed, 7 insertions(+), 2 deletions(-)

src-self-hosted/type.zig+7-2
......@@ -510,13 +510,18 @@ pub const Type = extern union {
510510 .u8,
511511 .i8,
512512 .bool,
513 .array_u8_sentinel_0,
514 => return 1,
515
513516 .fn_noreturn_no_args, // represents machine code; not a pointer
514517 .fn_void_no_args, // represents machine code; not a pointer
515518 .fn_naked_noreturn_no_args, // represents machine code; not a pointer
516519 .fn_ccc_void_no_args, // represents machine code; not a pointer
517520 .function, // represents machine code; not a pointer
518 .array_u8_sentinel_0,
519 => return 1,
521 => return switch (target.cpu.arch) {
522 .riscv64 => 2,
523 else => 1,
524 },
520525
521526 .i16, .u16 => return 2,
522527 .i32, .u32 => return 4,