2019-12-20 16:27:13 -08:00
|
|
|
const Feature = @import("std").target.Feature;
|
|
|
|
const Cpu = @import("std").target.Cpu;
|
|
|
|
|
|
|
|
pub const feature_bit64 = Feature{
|
2020-01-08 18:35:26 -08:00
|
|
|
.name = "bit64",
|
2020-01-08 17:27:05 -08:00
|
|
|
.llvm_name = "64bit",
|
2019-12-20 16:27:13 -08:00
|
|
|
.description = "Implements RV64",
|
2020-01-07 07:36:06 -08:00
|
|
|
.dependencies = &[_]*const Feature {
|
2019-12-20 16:27:13 -08:00
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
pub const feature_e = Feature{
|
|
|
|
.name = "e",
|
2020-01-08 17:27:05 -08:00
|
|
|
.llvm_name = "e",
|
2019-12-20 16:27:13 -08:00
|
|
|
.description = "Implements RV32E (provides 16 rather than 32 GPRs)",
|
2020-01-07 07:36:06 -08:00
|
|
|
.dependencies = &[_]*const Feature {
|
2019-12-20 16:27:13 -08:00
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
pub const feature_relax = Feature{
|
|
|
|
.name = "relax",
|
2020-01-08 17:27:05 -08:00
|
|
|
.llvm_name = "relax",
|
2019-12-20 16:27:13 -08:00
|
|
|
.description = "Enable Linker relaxation.",
|
2020-01-07 07:36:06 -08:00
|
|
|
.dependencies = &[_]*const Feature {
|
2019-12-20 16:27:13 -08:00
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
pub const feature_a = Feature{
|
|
|
|
.name = "a",
|
2020-01-08 17:27:05 -08:00
|
|
|
.llvm_name = "a",
|
2019-12-20 16:27:13 -08:00
|
|
|
.description = "'A' (Atomic Instructions)",
|
2020-01-07 07:36:06 -08:00
|
|
|
.dependencies = &[_]*const Feature {
|
2019-12-20 16:27:13 -08:00
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
pub const feature_c = Feature{
|
|
|
|
.name = "c",
|
2020-01-08 17:27:05 -08:00
|
|
|
.llvm_name = "c",
|
2019-12-20 16:27:13 -08:00
|
|
|
.description = "'C' (Compressed Instructions)",
|
2020-01-07 07:36:06 -08:00
|
|
|
.dependencies = &[_]*const Feature {
|
2019-12-20 16:27:13 -08:00
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
pub const feature_d = Feature{
|
|
|
|
.name = "d",
|
2020-01-08 17:27:05 -08:00
|
|
|
.llvm_name = "d",
|
2019-12-20 16:27:13 -08:00
|
|
|
.description = "'D' (Double-Precision Floating-Point)",
|
2020-01-07 07:36:06 -08:00
|
|
|
.dependencies = &[_]*const Feature {
|
2019-12-20 16:27:13 -08:00
|
|
|
&feature_f,
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
pub const feature_f = Feature{
|
|
|
|
.name = "f",
|
2020-01-08 17:27:05 -08:00
|
|
|
.llvm_name = "f",
|
2019-12-20 16:27:13 -08:00
|
|
|
.description = "'F' (Single-Precision Floating-Point)",
|
2020-01-07 07:36:06 -08:00
|
|
|
.dependencies = &[_]*const Feature {
|
2019-12-20 16:27:13 -08:00
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
pub const feature_m = Feature{
|
|
|
|
.name = "m",
|
2020-01-08 17:27:05 -08:00
|
|
|
.llvm_name = "m",
|
2019-12-20 16:27:13 -08:00
|
|
|
.description = "'M' (Integer Multiplication and Division)",
|
2020-01-07 07:36:06 -08:00
|
|
|
.dependencies = &[_]*const Feature {
|
2019-12-20 16:27:13 -08:00
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
pub const features = &[_]*const Feature {
|
|
|
|
&feature_bit64,
|
|
|
|
&feature_e,
|
|
|
|
&feature_relax,
|
|
|
|
&feature_a,
|
|
|
|
&feature_c,
|
|
|
|
&feature_d,
|
|
|
|
&feature_f,
|
|
|
|
&feature_m,
|
|
|
|
};
|
|
|
|
|
|
|
|
pub const cpu_genericRv32 = Cpu{
|
2020-01-08 18:35:26 -08:00
|
|
|
.name = "genericRv32",
|
2019-12-20 16:27:13 -08:00
|
|
|
.llvm_name = "generic-rv32",
|
2020-01-07 07:36:06 -08:00
|
|
|
.dependencies = &[_]*const Feature {
|
2019-12-20 16:27:13 -08:00
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
pub const cpu_genericRv64 = Cpu{
|
2020-01-08 18:35:26 -08:00
|
|
|
.name = "genericRv64",
|
2019-12-20 16:27:13 -08:00
|
|
|
.llvm_name = "generic-rv64",
|
2020-01-07 07:36:06 -08:00
|
|
|
.dependencies = &[_]*const Feature {
|
2019-12-20 16:27:13 -08:00
|
|
|
&feature_bit64,
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
pub const cpus = &[_]*const Cpu {
|
|
|
|
&cpu_genericRv32,
|
|
|
|
&cpu_genericRv64,
|
|
|
|
};
|