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 {
691691 none,
692692 avx,
693693 avx2,
694 bmi,
694695 f16c,
695696 fma,
697 lzcnt,
698 popcnt,
696699 sse,
697700 sse2,
698701 sse3,
src/arch/x86_64/encodings.zig+9-9
......@@ -354,9 +354,9 @@ pub const table = [_]Entry{
354354 .{ .lodsd, .np, &.{}, &.{ 0xad }, 0, .none, .none },
355355 .{ .lodsq, .np, &.{}, &.{ 0xad }, 0, .long, .none },
356356
357 .{ .lzcnt, .rm, &.{ .r16, .rm16 }, &.{ 0xf3, 0x0f, 0xbd }, 0, .short, .none },
358 .{ .lzcnt, .rm, &.{ .r32, .rm32 }, &.{ 0xf3, 0x0f, 0xbd }, 0, .none, .none },
359 .{ .lzcnt, .rm, &.{ .r64, .rm64 }, &.{ 0xf3, 0x0f, 0xbd }, 0, .long, .none },
357 .{ .lzcnt, .rm, &.{ .r16, .rm16 }, &.{ 0xf3, 0x0f, 0xbd }, 0, .short, .lzcnt },
358 .{ .lzcnt, .rm, &.{ .r32, .rm32 }, &.{ 0xf3, 0x0f, 0xbd }, 0, .none, .lzcnt },
359 .{ .lzcnt, .rm, &.{ .r64, .rm64 }, &.{ 0xf3, 0x0f, 0xbd }, 0, .long, .lzcnt },
360360
361361 .{ .mfence, .np, &.{}, &.{ 0x0f, 0xae, 0xf0 }, 0, .none, .none },
362362
......@@ -482,9 +482,9 @@ pub const table = [_]Entry{
482482 .{ .pop, .m, &.{ .rm16 }, &.{ 0x8f }, 0, .short, .none },
483483 .{ .pop, .m, &.{ .rm64 }, &.{ 0x8f }, 0, .none, .none },
484484
485 .{ .popcnt, .rm, &.{ .r16, .rm16 }, &.{ 0xf3, 0x0f, 0xb8 }, 0, .short, .none },
486 .{ .popcnt, .rm, &.{ .r32, .rm32 }, &.{ 0xf3, 0x0f, 0xb8 }, 0, .none, .none },
487 .{ .popcnt, .rm, &.{ .r64, .rm64 }, &.{ 0xf3, 0x0f, 0xb8 }, 0, .long, .none },
485 .{ .popcnt, .rm, &.{ .r16, .rm16 }, &.{ 0xf3, 0x0f, 0xb8 }, 0, .short, .popcnt },
486 .{ .popcnt, .rm, &.{ .r32, .rm32 }, &.{ 0xf3, 0x0f, 0xb8 }, 0, .none, .popcnt },
487 .{ .popcnt, .rm, &.{ .r64, .rm64 }, &.{ 0xf3, 0x0f, 0xb8 }, 0, .long, .popcnt },
488488
489489 .{ .push, .o, &.{ .r16 }, &.{ 0x50 }, 0, .short, .none },
490490 .{ .push, .o, &.{ .r64 }, &.{ 0x50 }, 0, .none, .none },
......@@ -784,9 +784,9 @@ pub const table = [_]Entry{
784784 .{ .@"test", .mr, &.{ .rm32, .r32 }, &.{ 0x85 }, 0, .none, .none },
785785 .{ .@"test", .mr, &.{ .rm64, .r64 }, &.{ 0x85 }, 0, .long, .none },
786786
787 .{ .tzcnt, .rm, &.{ .r16, .rm16 }, &.{ 0xf3, 0x0f, 0xbc }, 0, .short, .none },
788 .{ .tzcnt, .rm, &.{ .r32, .rm32 }, &.{ 0xf3, 0x0f, 0xbc }, 0, .none, .none },
789 .{ .tzcnt, .rm, &.{ .r64, .rm64 }, &.{ 0xf3, 0x0f, 0xbc }, 0, .long, .none },
787 .{ .tzcnt, .rm, &.{ .r16, .rm16 }, &.{ 0xf3, 0x0f, 0xbc }, 0, .short, .bmi },
788 .{ .tzcnt, .rm, &.{ .r32, .rm32 }, &.{ 0xf3, 0x0f, 0xbc }, 0, .none, .bmi },
789 .{ .tzcnt, .rm, &.{ .r64, .rm64 }, &.{ 0xf3, 0x0f, 0xbc }, 0, .long, .bmi },
790790
791791 .{ .ud2, .np, &.{}, &.{ 0x0f, 0x0b }, 0, .none, .none },
792792