std: Add two more ARM CPUs to the known CPU list

Modeled after GCC's description.
This commit is contained in:
LemonBoy 2021-05-03 12:30:18 +02:00
parent e2d2295382
commit 3eed613407
3 changed files with 46 additions and 0 deletions

View File

@ -1621,6 +1621,16 @@ pub const cpu = struct {
.apple_a7,
}),
};
pub const emag = CpuModel{
.name = "emag",
.llvm_name = null,
.features = featureSet(&[_]Feature{
.crc,
.crypto,
.perfmon,
.v8a,
}),
};
pub const exynos_m1 = CpuModel{
.name = "exynos_m1",
.llvm_name = null,
@ -1867,4 +1877,12 @@ pub const cpu = struct {
.v8_2a,
}),
};
pub const xgene1 = CpuModel{
.name = "xgene1",
.llvm_name = null,
.features = featureSet(&[_]Feature{
.perfmon,
.v8a,
}),
};
};

View File

@ -239,6 +239,11 @@ const ArmCpuinfoImpl = struct {
const Nvidia = [_]E{
E{ .part = 0x004, .m64 = &A64.carmel },
};
// implementer = 0x50
const Ampere = [_]E{
E{ .part = 0x000, .variant = 3, .m64 = &A64.emag },
E{ .part = 0x000, .m64 = &A64.xgene1 },
};
// implementer = 0x51
const Qualcomm = [_]E{
E{ .part = 0x06f, .m32 = &A32.krait },
@ -262,6 +267,7 @@ const ArmCpuinfoImpl = struct {
0x43 => &Cavium,
0x46 => &Fujitsu,
0x48 => &HiSilicon,
0x50 => &Ampere,
0x51 => &Qualcomm,
else => return null,
};

View File

@ -239,6 +239,28 @@ const llvm_targets = [_]LlvmTarget{
"zcz_fp",
},
},
.{
.llvm_name = null,
.zig_name = "xgene1",
.features = &.{
"fp_armv8",
"neon",
"perfmon",
"v8a",
},
},
.{
.llvm_name = null,
.zig_name = "emag",
.features = &.{
"crc",
"crypto",
"fp_armv8",
"neon",
"perfmon",
"v8a",
},
},
},
},
.{