mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-06 13:54:21 +00:00
codegen: fix x86-64 backend crc32 inline asm
This commit is contained in:
parent
7e0d86638f
commit
2e341a7173
2 changed files with 5 additions and 1 deletions
|
|
@ -14,7 +14,7 @@ test {
|
|||
_ = @import("crc/test.zig");
|
||||
}
|
||||
|
||||
pub const Crc32Iscsi = switch (builtin.cpu.hasAll(.x86, &.{ .@"64bit", .crc32 }) and builtin.zig_backend == .stage2_llvm) {
|
||||
pub const Crc32Iscsi = switch (builtin.cpu.hasAll(.x86, &.{ .@"64bit", .crc32 })) {
|
||||
true => @import("crc/crc32c.zig").Wrapper,
|
||||
else => Crc(u32, .{
|
||||
.polynomial = 0x1edc6f41,
|
||||
|
|
|
|||
|
|
@ -177437,6 +177437,10 @@ fn airAsm(self: *CodeGen, inst: Air.Inst.Index) !void {
|
|||
fixed_mnem_size: {
|
||||
const fixed_mnem_size: Memory.Size = switch (mnem_tag) {
|
||||
.clflush => .byte,
|
||||
.crc32 => {
|
||||
mnem_size.op_has_size.unset(1);
|
||||
break :fixed_mnem_size;
|
||||
},
|
||||
.fldcw, .fnstcw, .fstcw, .fnstsw, .fstsw => .word,
|
||||
.fldenv, .fnstenv, .fstenv => .none,
|
||||
.frstor, .fsave, .fnsave, .fxrstor, .fxrstor64, .fxsave, .fxsave64 => .none,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue