| author | |
| committer | |
| log | 3e6b2c6b03eacd311de2579b52f5ed9b83e57a02 |
| tree | 8d4262813a7405acfc204f698330d24fa777d32a |
| parent | 5f2b532be56bf39bac3f4b8b9e7947badada3d5a |
| signature |
LLVM's generic_la64 model is clearly biased towards Loongson's current offerings
rather than actually reflecting a generic model in the architectural sense. So
fix it up on our side.2 files changed, 9 insertions(+), 3 deletions(-)
lib/std/Target/loongarch.zig+1-3| ... | @@ -168,11 +168,9 @@ pub const cpu = struct { | ... | @@ -168,11 +168,9 @@ pub const cpu = struct { |
| 168 | }; | 168 | }; |
| 169 | pub const generic_la64: CpuModel = .{ | 169 | pub const generic_la64: CpuModel = .{ |
| 170 | .name = "generic_la64", | 170 | .name = "generic_la64", |
| 171 | .llvm_name = "generic-la64", | 171 | .llvm_name = null, |
| 172 | .features = featureSet(&[_]Feature{ | 172 | .features = featureSet(&[_]Feature{ |
| 173 | .@"64bit", | 173 | .@"64bit", |
| 174 | .lsx, | ||
| 175 | .ual, | ||
| 176 | }), | 174 | }), |
| 177 | }; | 175 | }; |
| 178 | pub const la32rv1_0: CpuModel = .{ | 176 | pub const la32rv1_0: CpuModel = .{ |
tools/update_cpu_features.zig+8| ... | @@ -1345,6 +1345,13 @@ const targets = [_]ArchTarget{ | ... | @@ -1345,6 +1345,13 @@ const targets = [_]ArchTarget{ |
| 1345 | .td_name = "LoongArch", | 1345 | .td_name = "LoongArch", |
| 1346 | }, | 1346 | }, |
| 1347 | .extra_cpus = &.{ | 1347 | .extra_cpus = &.{ |
| 1348 | .{ | ||
| 1349 | .llvm_name = null, | ||
| 1350 | .zig_name = "generic_la64", | ||
| 1351 | .features = &.{ | ||
| 1352 | "64bit", | ||
| 1353 | }, | ||
| 1354 | }, | ||
| 1348 | .{ | 1355 | .{ |
| 1349 | .llvm_name = null, | 1356 | .llvm_name = null, |
| 1350 | .zig_name = "la32v1_0", | 1357 | .zig_name = "la32v1_0", |
| ... | @@ -1390,6 +1397,7 @@ const targets = [_]ArchTarget{ | ... | @@ -1390,6 +1397,7 @@ const targets = [_]ArchTarget{ |
| 1390 | }, | 1397 | }, |
| 1391 | .omit_cpus = &.{ | 1398 | .omit_cpus = &.{ |
| 1392 | "generic", | 1399 | "generic", |
| 1400 | "generic-la64", | ||
| 1393 | "loongarch32", | 1401 | "loongarch32", |
| 1394 | "loongarch64", | 1402 | "loongarch64", |
| 1395 | }, | 1403 | }, |