authorgravatar for jacobly@ziglang.orgJacob Young <jacobly@ziglang.org> 2023-05-13 14:06:26-04:00
committergravatar for jacobly@ziglang.orgJacob Young <jacobly@ziglang.org> 2023-05-15 03:07:51-04:00
loge08eab664861461b0adbe7984881f72b5a36a979
tree8cff1e32410696664c3d65b064b28832bbacb705
parent72b4657053f94222c735b7c51c380649ce23c30e

x86_64: add missing encoding feature requirements


2 files changed, 12 insertions(+), 9 deletions(-)

src/arch/x86_64/Encoding.zig+3
...@@ -691,8 +691,11 @@ pub const Feature = enum {...@@ -691,8 +691,11 @@ pub const Feature = enum {
691 none,691 none,
692 avx,692 avx,
693 avx2,693 avx2,
694 bmi,
694 f16c,695 f16c,
695 fma,696 fma,
697 lzcnt,
698 popcnt,
696 sse,699 sse,
697 sse2,700 sse2,
698 sse3,701 sse3,
src/arch/x86_64/encodings.zig+9-9
...@@ -354,9 +354,9 @@ pub const table = [_]Entry{...@@ -354,9 +354,9 @@ pub const table = [_]Entry{
354 .{ .lodsd, .np, &.{}, &.{ 0xad }, 0, .none, .none },354 .{ .lodsd, .np, &.{}, &.{ 0xad }, 0, .none, .none },
355 .{ .lodsq, .np, &.{}, &.{ 0xad }, 0, .long, .none },355 .{ .lodsq, .np, &.{}, &.{ 0xad }, 0, .long, .none },
356356
357 .{ .lzcnt, .rm, &.{ .r16, .rm16 }, &.{ 0xf3, 0x0f, 0xbd }, 0, .short, .none },357 .{ .lzcnt, .rm, &.{ .r16, .rm16 }, &.{ 0xf3, 0x0f, 0xbd }, 0, .short, .lzcnt },
358 .{ .lzcnt, .rm, &.{ .r32, .rm32 }, &.{ 0xf3, 0x0f, 0xbd }, 0, .none, .none },358 .{ .lzcnt, .rm, &.{ .r32, .rm32 }, &.{ 0xf3, 0x0f, 0xbd }, 0, .none, .lzcnt },
359 .{ .lzcnt, .rm, &.{ .r64, .rm64 }, &.{ 0xf3, 0x0f, 0xbd }, 0, .long, .none },359 .{ .lzcnt, .rm, &.{ .r64, .rm64 }, &.{ 0xf3, 0x0f, 0xbd }, 0, .long, .lzcnt },
360360
361 .{ .mfence, .np, &.{}, &.{ 0x0f, 0xae, 0xf0 }, 0, .none, .none },361 .{ .mfence, .np, &.{}, &.{ 0x0f, 0xae, 0xf0 }, 0, .none, .none },
362362
...@@ -482,9 +482,9 @@ pub const table = [_]Entry{...@@ -482,9 +482,9 @@ pub const table = [_]Entry{
482 .{ .pop, .m, &.{ .rm16 }, &.{ 0x8f }, 0, .short, .none },482 .{ .pop, .m, &.{ .rm16 }, &.{ 0x8f }, 0, .short, .none },
483 .{ .pop, .m, &.{ .rm64 }, &.{ 0x8f }, 0, .none, .none },483 .{ .pop, .m, &.{ .rm64 }, &.{ 0x8f }, 0, .none, .none },
484484
485 .{ .popcnt, .rm, &.{ .r16, .rm16 }, &.{ 0xf3, 0x0f, 0xb8 }, 0, .short, .none },485 .{ .popcnt, .rm, &.{ .r16, .rm16 }, &.{ 0xf3, 0x0f, 0xb8 }, 0, .short, .popcnt },
486 .{ .popcnt, .rm, &.{ .r32, .rm32 }, &.{ 0xf3, 0x0f, 0xb8 }, 0, .none, .none },486 .{ .popcnt, .rm, &.{ .r32, .rm32 }, &.{ 0xf3, 0x0f, 0xb8 }, 0, .none, .popcnt },
487 .{ .popcnt, .rm, &.{ .r64, .rm64 }, &.{ 0xf3, 0x0f, 0xb8 }, 0, .long, .none },487 .{ .popcnt, .rm, &.{ .r64, .rm64 }, &.{ 0xf3, 0x0f, 0xb8 }, 0, .long, .popcnt },
488488
489 .{ .push, .o, &.{ .r16 }, &.{ 0x50 }, 0, .short, .none },489 .{ .push, .o, &.{ .r16 }, &.{ 0x50 }, 0, .short, .none },
490 .{ .push, .o, &.{ .r64 }, &.{ 0x50 }, 0, .none, .none },490 .{ .push, .o, &.{ .r64 }, &.{ 0x50 }, 0, .none, .none },
...@@ -784,9 +784,9 @@ pub const table = [_]Entry{...@@ -784,9 +784,9 @@ pub const table = [_]Entry{
784 .{ .@"test", .mr, &.{ .rm32, .r32 }, &.{ 0x85 }, 0, .none, .none },784 .{ .@"test", .mr, &.{ .rm32, .r32 }, &.{ 0x85 }, 0, .none, .none },
785 .{ .@"test", .mr, &.{ .rm64, .r64 }, &.{ 0x85 }, 0, .long, .none },785 .{ .@"test", .mr, &.{ .rm64, .r64 }, &.{ 0x85 }, 0, .long, .none },
786786
787 .{ .tzcnt, .rm, &.{ .r16, .rm16 }, &.{ 0xf3, 0x0f, 0xbc }, 0, .short, .none },787 .{ .tzcnt, .rm, &.{ .r16, .rm16 }, &.{ 0xf3, 0x0f, 0xbc }, 0, .short, .bmi },
788 .{ .tzcnt, .rm, &.{ .r32, .rm32 }, &.{ 0xf3, 0x0f, 0xbc }, 0, .none, .none },788 .{ .tzcnt, .rm, &.{ .r32, .rm32 }, &.{ 0xf3, 0x0f, 0xbc }, 0, .none, .bmi },
789 .{ .tzcnt, .rm, &.{ .r64, .rm64 }, &.{ 0xf3, 0x0f, 0xbc }, 0, .long, .none },789 .{ .tzcnt, .rm, &.{ .r64, .rm64 }, &.{ 0xf3, 0x0f, 0xbc }, 0, .long, .bmi },
790790
791 .{ .ud2, .np, &.{}, &.{ 0x0f, 0x0b }, 0, .none, .none },791 .{ .ud2, .np, &.{}, &.{ 0x0f, 0x0b }, 0, .none, .none },
792792