Fix the dumb in x86 too

This commit is contained in:
Noam Preil
2020-05-17 04:34:18 -04:00
committed by Andrew Kelley
parent 638554544a
commit 497eb31820

View File

@@ -19,12 +19,7 @@ pub const Register = enum(u8) {
}
pub fn id(self: @This()) u3 {
return @intCast(u4, switch (@enumToInt(self)) {
0...7 => |i| i,
8...15 => |i| i - 8,
16...23 => |i| i - 16,
else => unreachable,
});
return @truncate(u3, @enumToInt(self));
}
};