| author | |
| committer | |
| log | e640d015351c3d3bf7c41020ff2a87f38f853140 |
| tree | 8ff75fc739c83d45573753b9d80b8f39a95cae71 |
| parent | 6118b11afa1bbceab6ab4681f1f79e68aa131b65 |
| signature |
22 files changed, 777 insertions(+), 702 deletions(-)
lib/std/build.zig+1-1| ... | ... | @@ -1983,7 +1983,7 @@ pub const LibExeObjStep = struct { |
| 1983 | 1983 | |
| 1984 | 1984 | var feature_str_buffer = try std.Buffer.initSize(builder.allocator, 0); |
| 1985 | 1985 | for (self.target.getArch().allFeaturesList()) |feature, i| { |
| 1986 | if (Target.Cpu.Feature.isEnabled(features, @intCast(u7, i))) { | |
| 1986 | if (features.isEnabled(@intCast(u8, i))) { | |
| 1987 | 1987 | try feature_str_buffer.append(feature.name); |
| 1988 | 1988 | try feature_str_buffer.append(","); |
| 1989 | 1989 | } |
lib/std/target.zig+60-31| ... | ... | @@ -219,7 +219,8 @@ pub const Target = union(enum) { |
| 219 | 219 | pub fn parseCpuFeatureSet(arch: Arch, features_text: []const u8) !Cpu.Feature.Set { |
| 220 | 220 | // Here we compute both and choose the correct result at the end, based |
| 221 | 221 | // on whether or not we saw + and - signs. |
| 222 | var set: @Vector(2, Cpu.Feature.Set) = [2]Cpu.Feature.Set{ 0, arch.baselineFeatures() }; | |
| 222 | var whitelist_set = Cpu.Feature.Set.empty(); | |
| 223 | var baseline_set = arch.baselineFeatures(); | |
| 223 | 224 | var mode: enum { |
| 224 | 225 | unknown, |
| 225 | 226 | baseline, |
| ... | ... | @@ -257,10 +258,15 @@ pub const Target = union(enum) { |
| 257 | 258 | } |
| 258 | 259 | for (arch.allFeaturesList()) |feature, index| { |
| 259 | 260 | if (mem.eql(u8, feature_name, feature.name)) { |
| 260 | const one_bit = @as(Cpu.Feature.Set, 1) << @intCast(u7, index); | |
| 261 | 261 | switch (op) { |
| 262 | .add => set |= @splat(2, one_bit), | |
| 263 | .sub => set &= @splat(2, ~one_bit), | |
| 262 | .add => { | |
| 263 | baseline_set.addFeature(@intCast(u8, index)); | |
| 264 | whitelist_set.addFeature(@intCast(u8, index)); | |
| 265 | }, | |
| 266 | .sub => { | |
| 267 | baseline_set.removeFeature(@intCast(u8, index)); | |
| 268 | whitelist_set.removeFeature(@intCast(u8, index)); | |
| 269 | }, | |
| 264 | 270 | } |
| 265 | 271 | break; |
| 266 | 272 | } |
| ... | ... | @@ -270,8 +276,8 @@ pub const Target = union(enum) { |
| 270 | 276 | } |
| 271 | 277 | |
| 272 | 278 | return switch (mode) { |
| 273 | .unknown, .whitelist => set[0], | |
| 274 | .baseline => set[1], | |
| 279 | .unknown, .whitelist => whitelist_set, | |
| 280 | .baseline => baseline_set, | |
| 275 | 281 | }; |
| 276 | 282 | } |
| 277 | 283 | |
| ... | ... | @@ -413,21 +419,21 @@ pub const Target = union(enum) { |
| 413 | 419 | /// All CPU features Zig is aware of, sorted lexicographically by name. |
| 414 | 420 | pub fn allFeaturesList(arch: Arch) []const Cpu.Feature { |
| 415 | 421 | return switch (arch) { |
| 416 | .arm, .armeb, .thumb, .thumbeb => arm.all_features, | |
| 422 | .arm, .armeb, .thumb, .thumbeb => &arm.all_features, | |
| 417 | 423 | .aarch64, .aarch64_be, .aarch64_32 => &aarch64.all_features, |
| 418 | .avr => avr.all_features, | |
| 419 | .bpfel, .bpfeb => bpf.all_features, | |
| 420 | .hexagon => hexagon.all_features, | |
| 421 | .mips, .mipsel, .mips64, .mips64el => mips.all_features, | |
| 422 | .msp430 => msp430.all_features, | |
| 423 | .powerpc, .powerpc64, .powerpc64le => powerpc.all_features, | |
| 424 | .amdgcn => amdgpu.all_features, | |
| 425 | .riscv32, .riscv64 => riscv.all_features, | |
| 426 | .sparc, .sparcv9, .sparcel => sparc.all_features, | |
| 427 | .s390x => systemz.all_features, | |
| 424 | .avr => &avr.all_features, | |
| 425 | .bpfel, .bpfeb => &bpf.all_features, | |
| 426 | .hexagon => &hexagon.all_features, | |
| 427 | .mips, .mipsel, .mips64, .mips64el => &mips.all_features, | |
| 428 | .msp430 => &msp430.all_features, | |
| 429 | .powerpc, .powerpc64, .powerpc64le => &powerpc.all_features, | |
| 430 | .amdgcn => &amdgpu.all_features, | |
| 431 | .riscv32, .riscv64 => &riscv.all_features, | |
| 432 | .sparc, .sparcv9, .sparcel => &sparc.all_features, | |
| 433 | .s390x => &systemz.all_features, | |
| 428 | 434 | .i386, .x86_64 => &x86.all_features, |
| 429 | .nvptx, .nvptx64 => nvptx.all_features, | |
| 430 | .wasm32, .wasm64 => wasm.all_features, | |
| 435 | .nvptx, .nvptx64 => &nvptx.all_features, | |
| 436 | .wasm32, .wasm64 => &wasm.all_features, | |
| 431 | 437 | |
| 432 | 438 | else => &[0]Cpu.Feature{}, |
| 433 | 439 | }; |
| ... | ... | @@ -439,10 +445,11 @@ pub const Target = union(enum) { |
| 439 | 445 | return switch (arch) { |
| 440 | 446 | .arm, .armeb, .thumb, .thumbeb => arm.cpu.generic.features, |
| 441 | 447 | .aarch64, .aarch64_be, .aarch64_32 => aarch64.cpu.generic.features, |
| 442 | .avr => avr.cpu.generic.features, | |
| 448 | .avr => avr.baseline_features, | |
| 443 | 449 | .bpfel, .bpfeb => bpf.cpu.generic.features, |
| 444 | 450 | .hexagon => hexagon.cpu.generic.features, |
| 445 | .mips, .mipsel, .mips64, .mips64el => mips.cpu.generic.features, | |
| 451 | .mips, .mipsel => mips.cpu.mips32.features, | |
| 452 | .mips64, .mips64el => mips.cpu.mips64.features, | |
| 446 | 453 | .msp430 => msp430.cpu.generic.features, |
| 447 | 454 | .powerpc, .powerpc64, .powerpc64le => powerpc.cpu.generic.features, |
| 448 | 455 | .amdgcn => amdgpu.cpu.generic.features, |
| ... | ... | @@ -452,10 +459,10 @@ pub const Target = union(enum) { |
| 452 | 459 | .s390x => systemz.cpu.generic.features, |
| 453 | 460 | .i386 => x86.cpu.pentium4.features, |
| 454 | 461 | .x86_64 => x86.cpu.x86_64.features, |
| 455 | .nvptx, .nvptx64 => nvptx.cpu.generic.features, | |
| 462 | .nvptx, .nvptx64 => nvptx.cpu.sm_20.features, | |
| 456 | 463 | .wasm32, .wasm64 => wasm.cpu.generic.features, |
| 457 | 464 | |
| 458 | else => 0, | |
| 465 | else => Cpu.Feature.Set.empty(), | |
| 459 | 466 | }; |
| 460 | 467 | } |
| 461 | 468 | |
| ... | ... | @@ -522,24 +529,46 @@ pub const Target = union(enum) { |
| 522 | 529 | dependencies: Set, |
| 523 | 530 | |
| 524 | 531 | /// A bit set of all the features. |
| 525 | pub const Set = u128; | |
| 532 | pub const Set = struct { | |
| 533 | bytes: [bit_count / 8]u8, | |
| 526 | 534 | |
| 527 | pub fn isEnabled(set: Set, arch_feature_index: u7) bool { | |
| 528 | return (set & (@as(Set, 1) << arch_feature_index)) != 0; | |
| 529 | } | |
| 535 | pub const bit_count = 22 * 8; | |
| 536 | ||
| 537 | pub fn empty() Set { | |
| 538 | return .{ .bytes = [1]u8{0} ** 22 }; | |
| 539 | } | |
| 540 | ||
| 541 | pub fn isEnabled(set: Set, arch_feature_index: u8) bool { | |
| 542 | const byte_index = arch_feature_index / 8; | |
| 543 | const bit_index = @intCast(u3, arch_feature_index % 8); | |
| 544 | return (set.bytes[byte_index] & (@as(u8, 1) << bit_index)) != 0; | |
| 545 | } | |
| 546 | ||
| 547 | pub fn addFeature(set: *Set, arch_feature_index: u8) void { | |
| 548 | const byte_index = arch_feature_index / 8; | |
| 549 | const bit_index = @intCast(u3, arch_feature_index % 8); | |
| 550 | set.bytes[byte_index] |= @as(u8, 1) << bit_index; | |
| 551 | } | |
| 552 | ||
| 553 | pub fn removeFeature(set: *Set, arch_feature_index: u8) void { | |
| 554 | const byte_index = arch_feature_index / 8; | |
| 555 | const bit_index = @intCast(u3, arch_feature_index % 8); | |
| 556 | set.bytes[byte_index] &= ~(@as(u8, 1) << bit_index); | |
| 557 | } | |
| 558 | }; | |
| 530 | 559 | |
| 531 | 560 | pub fn feature_set_fns(comptime F: type) type { |
| 532 | 561 | return struct { |
| 533 | 562 | pub fn featureSet(features: []const F) Set { |
| 534 | var x: Set = 0; | |
| 563 | var x = Set.empty(); | |
| 535 | 564 | for (features) |feature| { |
| 536 | x |= @as(Set, 1) << @enumToInt(feature); | |
| 565 | x.addFeature(@enumToInt(feature)); | |
| 537 | 566 | } |
| 538 | 567 | return x; |
| 539 | 568 | } |
| 540 | 569 | |
| 541 | 570 | pub fn featureSetHas(set: Set, feature: F) bool { |
| 542 | return (set & (@as(Set, 1) << @enumToInt(feature))) != 0; | |
| 571 | return set.isEnabled(@enumToInt(feature)); | |
| 543 | 572 | } |
| 544 | 573 | }; |
| 545 | 574 | } |
| ... | ... | @@ -748,7 +777,7 @@ pub const Target = union(enum) { |
| 748 | 777 | pub fn parseArchSub(text: []const u8) ParseArchSubError!Arch { |
| 749 | 778 | const info = @typeInfo(Arch); |
| 750 | 779 | inline for (info.Union.fields) |field| { |
| 751 | if (mem.eql(u8, text, field.name)) { | |
| 780 | if (mem.startsWith(u8, text, field.name)) { | |
| 752 | 781 | if (field.field_type == void) { |
| 753 | 782 | return @as(Arch, @field(Arch, field.name)); |
| 754 | 783 | } else { |
lib/std/target/aarch64.zig+100-100| ... | ... | @@ -154,7 +154,7 @@ pub usingnamespace Cpu.Feature.feature_set_fns(Feature); |
| 154 | 154 | |
| 155 | 155 | pub const all_features = blk: { |
| 156 | 156 | const len = @typeInfo(Feature).Enum.fields.len; |
| 157 | std.debug.assert(len <= @typeInfo(Cpu.Feature.Set).Int.bits); | |
| 157 | std.debug.assert(len <= Cpu.Feature.Set.bit_count); | |
| 158 | 158 | var result: [len]Cpu.Feature = undefined; |
| 159 | 159 | result[@enumToInt(Feature.a35)] = .{ |
| 160 | 160 | .index = @enumToInt(Feature.a35), |
| ... | ... | @@ -298,140 +298,140 @@ pub const all_features = blk: { |
| 298 | 298 | .name = @tagName(Feature.aggressive_fma), |
| 299 | 299 | .llvm_name = "aggressive-fma", |
| 300 | 300 | .description = "Enable Aggressive FMA for floating-point.", |
| 301 | .dependencies = 0, | |
| 301 | .dependencies = featureSet(&[_]Feature{}), | |
| 302 | 302 | }; |
| 303 | 303 | result[@enumToInt(Feature.alternate_sextload_cvt_f32_pattern)] = .{ |
| 304 | 304 | .index = @enumToInt(Feature.alternate_sextload_cvt_f32_pattern), |
| 305 | 305 | .name = @tagName(Feature.alternate_sextload_cvt_f32_pattern), |
| 306 | 306 | .llvm_name = "alternate-sextload-cvt-f32-pattern", |
| 307 | 307 | .description = "Use alternative pattern for sextload convert to f32", |
| 308 | .dependencies = 0, | |
| 308 | .dependencies = featureSet(&[_]Feature{}), | |
| 309 | 309 | }; |
| 310 | 310 | result[@enumToInt(Feature.altnzcv)] = .{ |
| 311 | 311 | .index = @enumToInt(Feature.altnzcv), |
| 312 | 312 | .name = @tagName(Feature.altnzcv), |
| 313 | 313 | .llvm_name = "altnzcv", |
| 314 | 314 | .description = "Enable alternative NZCV format for floating point comparisons", |
| 315 | .dependencies = 0, | |
| 315 | .dependencies = featureSet(&[_]Feature{}), | |
| 316 | 316 | }; |
| 317 | 317 | result[@enumToInt(Feature.am)] = .{ |
| 318 | 318 | .index = @enumToInt(Feature.am), |
| 319 | 319 | .name = @tagName(Feature.am), |
| 320 | 320 | .llvm_name = "am", |
| 321 | 321 | .description = "Enable v8.4-A Activity Monitors extension", |
| 322 | .dependencies = 0, | |
| 322 | .dependencies = featureSet(&[_]Feature{}), | |
| 323 | 323 | }; |
| 324 | 324 | result[@enumToInt(Feature.arith_bcc_fusion)] = .{ |
| 325 | 325 | .index = @enumToInt(Feature.arith_bcc_fusion), |
| 326 | 326 | .name = @tagName(Feature.arith_bcc_fusion), |
| 327 | 327 | .llvm_name = "arith-bcc-fusion", |
| 328 | 328 | .description = "CPU fuses arithmetic+bcc operations", |
| 329 | .dependencies = 0, | |
| 329 | .dependencies = featureSet(&[_]Feature{}), | |
| 330 | 330 | }; |
| 331 | 331 | result[@enumToInt(Feature.arith_cbz_fusion)] = .{ |
| 332 | 332 | .index = @enumToInt(Feature.arith_cbz_fusion), |
| 333 | 333 | .name = @tagName(Feature.arith_cbz_fusion), |
| 334 | 334 | .llvm_name = "arith-cbz-fusion", |
| 335 | 335 | .description = "CPU fuses arithmetic + cbz/cbnz operations", |
| 336 | .dependencies = 0, | |
| 336 | .dependencies = featureSet(&[_]Feature{}), | |
| 337 | 337 | }; |
| 338 | 338 | result[@enumToInt(Feature.balance_fp_ops)] = .{ |
| 339 | 339 | .index = @enumToInt(Feature.balance_fp_ops), |
| 340 | 340 | .name = @tagName(Feature.balance_fp_ops), |
| 341 | 341 | .llvm_name = "balance-fp-ops", |
| 342 | 342 | .description = "balance mix of odd and even D-registers for fp multiply(-accumulate) ops", |
| 343 | .dependencies = 0, | |
| 343 | .dependencies = featureSet(&[_]Feature{}), | |
| 344 | 344 | }; |
| 345 | 345 | result[@enumToInt(Feature.bti)] = .{ |
| 346 | 346 | .index = @enumToInt(Feature.bti), |
| 347 | 347 | .name = @tagName(Feature.bti), |
| 348 | 348 | .llvm_name = "bti", |
| 349 | 349 | .description = "Enable Branch Target Identification", |
| 350 | .dependencies = 0, | |
| 350 | .dependencies = featureSet(&[_]Feature{}), | |
| 351 | 351 | }; |
| 352 | 352 | result[@enumToInt(Feature.call_saved_x10)] = .{ |
| 353 | 353 | .index = @enumToInt(Feature.call_saved_x10), |
| 354 | 354 | .name = @tagName(Feature.call_saved_x10), |
| 355 | 355 | .llvm_name = "call-saved-x10", |
| 356 | 356 | .description = "Make X10 callee saved.", |
| 357 | .dependencies = 0, | |
| 357 | .dependencies = featureSet(&[_]Feature{}), | |
| 358 | 358 | }; |
| 359 | 359 | result[@enumToInt(Feature.call_saved_x11)] = .{ |
| 360 | 360 | .index = @enumToInt(Feature.call_saved_x11), |
| 361 | 361 | .name = @tagName(Feature.call_saved_x11), |
| 362 | 362 | .llvm_name = "call-saved-x11", |
| 363 | 363 | .description = "Make X11 callee saved.", |
| 364 | .dependencies = 0, | |
| 364 | .dependencies = featureSet(&[_]Feature{}), | |
| 365 | 365 | }; |
| 366 | 366 | result[@enumToInt(Feature.call_saved_x12)] = .{ |
| 367 | 367 | .index = @enumToInt(Feature.call_saved_x12), |
| 368 | 368 | .name = @tagName(Feature.call_saved_x12), |
| 369 | 369 | .llvm_name = "call-saved-x12", |
| 370 | 370 | .description = "Make X12 callee saved.", |
| 371 | .dependencies = 0, | |
| 371 | .dependencies = featureSet(&[_]Feature{}), | |
| 372 | 372 | }; |
| 373 | 373 | result[@enumToInt(Feature.call_saved_x13)] = .{ |
| 374 | 374 | .index = @enumToInt(Feature.call_saved_x13), |
| 375 | 375 | .name = @tagName(Feature.call_saved_x13), |
| 376 | 376 | .llvm_name = "call-saved-x13", |
| 377 | 377 | .description = "Make X13 callee saved.", |
| 378 | .dependencies = 0, | |
| 378 | .dependencies = featureSet(&[_]Feature{}), | |
| 379 | 379 | }; |
| 380 | 380 | result[@enumToInt(Feature.call_saved_x14)] = .{ |
| 381 | 381 | .index = @enumToInt(Feature.call_saved_x14), |
| 382 | 382 | .name = @tagName(Feature.call_saved_x14), |
| 383 | 383 | .llvm_name = "call-saved-x14", |
| 384 | 384 | .description = "Make X14 callee saved.", |
| 385 | .dependencies = 0, | |
| 385 | .dependencies = featureSet(&[_]Feature{}), | |
| 386 | 386 | }; |
| 387 | 387 | result[@enumToInt(Feature.call_saved_x15)] = .{ |
| 388 | 388 | .index = @enumToInt(Feature.call_saved_x15), |
| 389 | 389 | .name = @tagName(Feature.call_saved_x15), |
| 390 | 390 | .llvm_name = "call-saved-x15", |
| 391 | 391 | .description = "Make X15 callee saved.", |
| 392 | .dependencies = 0, | |
| 392 | .dependencies = featureSet(&[_]Feature{}), | |
| 393 | 393 | }; |
| 394 | 394 | result[@enumToInt(Feature.call_saved_x18)] = .{ |
| 395 | 395 | .index = @enumToInt(Feature.call_saved_x18), |
| 396 | 396 | .name = @tagName(Feature.call_saved_x18), |
| 397 | 397 | .llvm_name = "call-saved-x18", |
| 398 | 398 | .description = "Make X18 callee saved.", |
| 399 | .dependencies = 0, | |
| 399 | .dependencies = featureSet(&[_]Feature{}), | |
| 400 | 400 | }; |
| 401 | 401 | result[@enumToInt(Feature.call_saved_x8)] = .{ |
| 402 | 402 | .index = @enumToInt(Feature.call_saved_x8), |
| 403 | 403 | .name = @tagName(Feature.call_saved_x8), |
| 404 | 404 | .llvm_name = "call-saved-x8", |
| 405 | 405 | .description = "Make X8 callee saved.", |
| 406 | .dependencies = 0, | |
| 406 | .dependencies = featureSet(&[_]Feature{}), | |
| 407 | 407 | }; |
| 408 | 408 | result[@enumToInt(Feature.call_saved_x9)] = .{ |
| 409 | 409 | .index = @enumToInt(Feature.call_saved_x9), |
| 410 | 410 | .name = @tagName(Feature.call_saved_x9), |
| 411 | 411 | .llvm_name = "call-saved-x9", |
| 412 | 412 | .description = "Make X9 callee saved.", |
| 413 | .dependencies = 0, | |
| 413 | .dependencies = featureSet(&[_]Feature{}), | |
| 414 | 414 | }; |
| 415 | 415 | result[@enumToInt(Feature.ccdp)] = .{ |
| 416 | 416 | .index = @enumToInt(Feature.ccdp), |
| 417 | 417 | .name = @tagName(Feature.ccdp), |
| 418 | 418 | .llvm_name = "ccdp", |
| 419 | 419 | .description = "Enable v8.5 Cache Clean to Point of Deep Persistence", |
| 420 | .dependencies = 0, | |
| 420 | .dependencies = featureSet(&[_]Feature{}), | |
| 421 | 421 | }; |
| 422 | 422 | result[@enumToInt(Feature.ccidx)] = .{ |
| 423 | 423 | .index = @enumToInt(Feature.ccidx), |
| 424 | 424 | .name = @tagName(Feature.ccidx), |
| 425 | 425 | .llvm_name = "ccidx", |
| 426 | 426 | .description = "Enable v8.3-A Extend of the CCSIDR number of sets", |
| 427 | .dependencies = 0, | |
| 427 | .dependencies = featureSet(&[_]Feature{}), | |
| 428 | 428 | }; |
| 429 | 429 | result[@enumToInt(Feature.ccpp)] = .{ |
| 430 | 430 | .index = @enumToInt(Feature.ccpp), |
| 431 | 431 | .name = @tagName(Feature.ccpp), |
| 432 | 432 | .llvm_name = "ccpp", |
| 433 | 433 | .description = "Enable v8.2 data Cache Clean to Point of Persistence", |
| 434 | .dependencies = 0, | |
| 434 | .dependencies = featureSet(&[_]Feature{}), | |
| 435 | 435 | }; |
| 436 | 436 | result[@enumToInt(Feature.complxnum)] = .{ |
| 437 | 437 | .index = @enumToInt(Feature.complxnum), |
| ... | ... | @@ -447,7 +447,7 @@ pub const all_features = blk: { |
| 447 | 447 | .name = @tagName(Feature.crc), |
| 448 | 448 | .llvm_name = "crc", |
| 449 | 449 | .description = "Enable ARMv8 CRC-32 checksum instructions", |
| 450 | .dependencies = 0, | |
| 450 | .dependencies = featureSet(&[_]Feature{}), | |
| 451 | 451 | }; |
| 452 | 452 | result[@enumToInt(Feature.crypto)] = .{ |
| 453 | 453 | .index = @enumToInt(Feature.crypto), |
| ... | ... | @@ -465,7 +465,7 @@ pub const all_features = blk: { |
| 465 | 465 | .name = @tagName(Feature.custom_cheap_as_move), |
| 466 | 466 | .llvm_name = "custom-cheap-as-move", |
| 467 | 467 | .description = "Use custom handling of cheap instructions", |
| 468 | .dependencies = 0, | |
| 468 | .dependencies = featureSet(&[_]Feature{}), | |
| 469 | 469 | }; |
| 470 | 470 | result[@enumToInt(Feature.cyclone)] = .{ |
| 471 | 471 | .index = @enumToInt(Feature.cyclone), |
| ... | ... | @@ -493,21 +493,21 @@ pub const all_features = blk: { |
| 493 | 493 | .name = @tagName(Feature.disable_latency_sched_heuristic), |
| 494 | 494 | .llvm_name = "disable-latency-sched-heuristic", |
| 495 | 495 | .description = "Disable latency scheduling heuristic", |
| 496 | .dependencies = 0, | |
| 496 | .dependencies = featureSet(&[_]Feature{}), | |
| 497 | 497 | }; |
| 498 | 498 | result[@enumToInt(Feature.dit)] = .{ |
| 499 | 499 | .index = @enumToInt(Feature.dit), |
| 500 | 500 | .name = @tagName(Feature.dit), |
| 501 | 501 | .llvm_name = "dit", |
| 502 | 502 | .description = "Enable v8.4-A Data Independent Timing instructions", |
| 503 | .dependencies = 0, | |
| 503 | .dependencies = featureSet(&[_]Feature{}), | |
| 504 | 504 | }; |
| 505 | 505 | result[@enumToInt(Feature.dotprod)] = .{ |
| 506 | 506 | .index = @enumToInt(Feature.dotprod), |
| 507 | 507 | .name = @tagName(Feature.dotprod), |
| 508 | 508 | .llvm_name = "dotprod", |
| 509 | 509 | .description = "Enable dot product support", |
| 510 | .dependencies = 0, | |
| 510 | .dependencies = featureSet(&[_]Feature{}), | |
| 511 | 511 | }; |
| 512 | 512 | result[@enumToInt(Feature.exynos_cheap_as_move)] = .{ |
| 513 | 513 | .index = @enumToInt(Feature.exynos_cheap_as_move), |
| ... | ... | @@ -626,21 +626,21 @@ pub const all_features = blk: { |
| 626 | 626 | .name = @tagName(Feature.fmi), |
| 627 | 627 | .llvm_name = "fmi", |
| 628 | 628 | .description = "Enable v8.4-A Flag Manipulation Instructions", |
| 629 | .dependencies = 0, | |
| 629 | .dependencies = featureSet(&[_]Feature{}), | |
| 630 | 630 | }; |
| 631 | 631 | result[@enumToInt(Feature.force_32bit_jump_tables)] = .{ |
| 632 | 632 | .index = @enumToInt(Feature.force_32bit_jump_tables), |
| 633 | 633 | .name = @tagName(Feature.force_32bit_jump_tables), |
| 634 | 634 | .llvm_name = "force-32bit-jump-tables", |
| 635 | 635 | .description = "Force jump table entries to be 32-bits wide except at MinSize", |
| 636 | .dependencies = 0, | |
| 636 | .dependencies = featureSet(&[_]Feature{}), | |
| 637 | 637 | }; |
| 638 | 638 | result[@enumToInt(Feature.fp_armv8)] = .{ |
| 639 | 639 | .index = @enumToInt(Feature.fp_armv8), |
| 640 | 640 | .name = @tagName(Feature.fp_armv8), |
| 641 | 641 | .llvm_name = "fp-armv8", |
| 642 | 642 | .description = "Enable ARMv8 FP", |
| 643 | .dependencies = 0, | |
| 643 | .dependencies = featureSet(&[_]Feature{}), | |
| 644 | 644 | }; |
| 645 | 645 | result[@enumToInt(Feature.fp16fml)] = .{ |
| 646 | 646 | .index = @enumToInt(Feature.fp16fml), |
| ... | ... | @@ -656,7 +656,7 @@ pub const all_features = blk: { |
| 656 | 656 | .name = @tagName(Feature.fptoint), |
| 657 | 657 | .llvm_name = "fptoint", |
| 658 | 658 | .description = "Enable FRInt[32|64][Z|X] instructions that round a floating-point number to an integer (in FP format) forcing it to fit into a 32- or 64-bit int", |
| 659 | .dependencies = 0, | |
| 659 | .dependencies = featureSet(&[_]Feature{}), | |
| 660 | 660 | }; |
| 661 | 661 | result[@enumToInt(Feature.fullfp16)] = .{ |
| 662 | 662 | .index = @enumToInt(Feature.fullfp16), |
| ... | ... | @@ -672,42 +672,42 @@ pub const all_features = blk: { |
| 672 | 672 | .name = @tagName(Feature.fuse_address), |
| 673 | 673 | .llvm_name = "fuse-address", |
| 674 | 674 | .description = "CPU fuses address generation and memory operations", |
| 675 | .dependencies = 0, | |
| 675 | .dependencies = featureSet(&[_]Feature{}), | |
| 676 | 676 | }; |
| 677 | 677 | result[@enumToInt(Feature.fuse_aes)] = .{ |
| 678 | 678 | .index = @enumToInt(Feature.fuse_aes), |
| 679 | 679 | .name = @tagName(Feature.fuse_aes), |
| 680 | 680 | .llvm_name = "fuse-aes", |
| 681 | 681 | .description = "CPU fuses AES crypto operations", |
| 682 | .dependencies = 0, | |
| 682 | .dependencies = featureSet(&[_]Feature{}), | |
| 683 | 683 | }; |
| 684 | 684 | result[@enumToInt(Feature.fuse_arith_logic)] = .{ |
| 685 | 685 | .index = @enumToInt(Feature.fuse_arith_logic), |
| 686 | 686 | .name = @tagName(Feature.fuse_arith_logic), |
| 687 | 687 | .llvm_name = "fuse-arith-logic", |
| 688 | 688 | .description = "CPU fuses arithmetic and logic operations", |
| 689 | .dependencies = 0, | |
| 689 | .dependencies = featureSet(&[_]Feature{}), | |
| 690 | 690 | }; |
| 691 | 691 | result[@enumToInt(Feature.fuse_crypto_eor)] = .{ |
| 692 | 692 | .index = @enumToInt(Feature.fuse_crypto_eor), |
| 693 | 693 | .name = @tagName(Feature.fuse_crypto_eor), |
| 694 | 694 | .llvm_name = "fuse-crypto-eor", |
| 695 | 695 | .description = "CPU fuses AES/PMULL and EOR operations", |
| 696 | .dependencies = 0, | |
| 696 | .dependencies = featureSet(&[_]Feature{}), | |
| 697 | 697 | }; |
| 698 | 698 | result[@enumToInt(Feature.fuse_csel)] = .{ |
| 699 | 699 | .index = @enumToInt(Feature.fuse_csel), |
| 700 | 700 | .name = @tagName(Feature.fuse_csel), |
| 701 | 701 | .llvm_name = "fuse-csel", |
| 702 | 702 | .description = "CPU fuses conditional select operations", |
| 703 | .dependencies = 0, | |
| 703 | .dependencies = featureSet(&[_]Feature{}), | |
| 704 | 704 | }; |
| 705 | 705 | result[@enumToInt(Feature.fuse_literals)] = .{ |
| 706 | 706 | .index = @enumToInt(Feature.fuse_literals), |
| 707 | 707 | .name = @tagName(Feature.fuse_literals), |
| 708 | 708 | .llvm_name = "fuse-literals", |
| 709 | 709 | .description = "CPU fuses literal generation operations", |
| 710 | .dependencies = 0, | |
| 710 | .dependencies = featureSet(&[_]Feature{}), | |
| 711 | 711 | }; |
| 712 | 712 | result[@enumToInt(Feature.jsconv)] = .{ |
| 713 | 713 | .index = @enumToInt(Feature.jsconv), |
| ... | ... | @@ -741,35 +741,35 @@ pub const all_features = blk: { |
| 741 | 741 | .name = @tagName(Feature.lor), |
| 742 | 742 | .llvm_name = "lor", |
| 743 | 743 | .description = "Enables ARM v8.1 Limited Ordering Regions extension", |
| 744 | .dependencies = 0, | |
| 744 | .dependencies = featureSet(&[_]Feature{}), | |
| 745 | 745 | }; |
| 746 | 746 | result[@enumToInt(Feature.lse)] = .{ |
| 747 | 747 | .index = @enumToInt(Feature.lse), |
| 748 | 748 | .name = @tagName(Feature.lse), |
| 749 | 749 | .llvm_name = "lse", |
| 750 | 750 | .description = "Enable ARMv8.1 Large System Extension (LSE) atomic instructions", |
| 751 | .dependencies = 0, | |
| 751 | .dependencies = featureSet(&[_]Feature{}), | |
| 752 | 752 | }; |
| 753 | 753 | result[@enumToInt(Feature.lsl_fast)] = .{ |
| 754 | 754 | .index = @enumToInt(Feature.lsl_fast), |
| 755 | 755 | .name = @tagName(Feature.lsl_fast), |
| 756 | 756 | .llvm_name = "lsl-fast", |
| 757 | 757 | .description = "CPU has a fastpath logical shift of up to 3 places", |
| 758 | .dependencies = 0, | |
| 758 | .dependencies = featureSet(&[_]Feature{}), | |
| 759 | 759 | }; |
| 760 | 760 | result[@enumToInt(Feature.mpam)] = .{ |
| 761 | 761 | .index = @enumToInt(Feature.mpam), |
| 762 | 762 | .name = @tagName(Feature.mpam), |
| 763 | 763 | .llvm_name = "mpam", |
| 764 | 764 | .description = "Enable v8.4-A Memory system Partitioning and Monitoring extension", |
| 765 | .dependencies = 0, | |
| 765 | .dependencies = featureSet(&[_]Feature{}), | |
| 766 | 766 | }; |
| 767 | 767 | result[@enumToInt(Feature.mte)] = .{ |
| 768 | 768 | .index = @enumToInt(Feature.mte), |
| 769 | 769 | .name = @tagName(Feature.mte), |
| 770 | 770 | .llvm_name = "mte", |
| 771 | 771 | .description = "Enable Memory Tagging Extension", |
| 772 | .dependencies = 0, | |
| 772 | .dependencies = featureSet(&[_]Feature{}), | |
| 773 | 773 | }; |
| 774 | 774 | result[@enumToInt(Feature.neon)] = .{ |
| 775 | 775 | .index = @enumToInt(Feature.neon), |
| ... | ... | @@ -785,28 +785,28 @@ pub const all_features = blk: { |
| 785 | 785 | .name = @tagName(Feature.no_neg_immediates), |
| 786 | 786 | .llvm_name = "no-neg-immediates", |
| 787 | 787 | .description = "Convert immediates and instructions to their negated or complemented equivalent when the immediate does not fit in the encoding.", |
| 788 | .dependencies = 0, | |
| 788 | .dependencies = featureSet(&[_]Feature{}), | |
| 789 | 789 | }; |
| 790 | 790 | result[@enumToInt(Feature.nv)] = .{ |
| 791 | 791 | .index = @enumToInt(Feature.nv), |
| 792 | 792 | .name = @tagName(Feature.nv), |
| 793 | 793 | .llvm_name = "nv", |
| 794 | 794 | .description = "Enable v8.4-A Nested Virtualization Enchancement", |
| 795 | .dependencies = 0, | |
| 795 | .dependencies = featureSet(&[_]Feature{}), | |
| 796 | 796 | }; |
| 797 | 797 | result[@enumToInt(Feature.pa)] = .{ |
| 798 | 798 | .index = @enumToInt(Feature.pa), |
| 799 | 799 | .name = @tagName(Feature.pa), |
| 800 | 800 | .llvm_name = "pa", |
| 801 | 801 | .description = "Enable v8.3-A Pointer Authentication enchancement", |
| 802 | .dependencies = 0, | |
| 802 | .dependencies = featureSet(&[_]Feature{}), | |
| 803 | 803 | }; |
| 804 | 804 | result[@enumToInt(Feature.pan)] = .{ |
| 805 | 805 | .index = @enumToInt(Feature.pan), |
| 806 | 806 | .name = @tagName(Feature.pan), |
| 807 | 807 | .llvm_name = "pan", |
| 808 | 808 | .description = "Enables ARM v8.1 Privileged Access-Never extension", |
| 809 | .dependencies = 0, | |
| 809 | .dependencies = featureSet(&[_]Feature{}), | |
| 810 | 810 | }; |
| 811 | 811 | result[@enumToInt(Feature.pan_rwv)] = .{ |
| 812 | 812 | .index = @enumToInt(Feature.pan_rwv), |
| ... | ... | @@ -822,35 +822,35 @@ pub const all_features = blk: { |
| 822 | 822 | .name = @tagName(Feature.perfmon), |
| 823 | 823 | .llvm_name = "perfmon", |
| 824 | 824 | .description = "Enable ARMv8 PMUv3 Performance Monitors extension", |
| 825 | .dependencies = 0, | |
| 825 | .dependencies = featureSet(&[_]Feature{}), | |
| 826 | 826 | }; |
| 827 | 827 | result[@enumToInt(Feature.predictable_select_expensive)] = .{ |
| 828 | 828 | .index = @enumToInt(Feature.predictable_select_expensive), |
| 829 | 829 | .name = @tagName(Feature.predictable_select_expensive), |
| 830 | 830 | .llvm_name = "predictable-select-expensive", |
| 831 | 831 | .description = "Prefer likely predicted branches over selects", |
| 832 | .dependencies = 0, | |
| 832 | .dependencies = featureSet(&[_]Feature{}), | |
| 833 | 833 | }; |
| 834 | 834 | result[@enumToInt(Feature.predres)] = .{ |
| 835 | 835 | .index = @enumToInt(Feature.predres), |
| 836 | 836 | .name = @tagName(Feature.predres), |
| 837 | 837 | .llvm_name = "predres", |
| 838 | 838 | .description = "Enable v8.5a execution and data prediction invalidation instructions", |
| 839 | .dependencies = 0, | |
| 839 | .dependencies = featureSet(&[_]Feature{}), | |
| 840 | 840 | }; |
| 841 | 841 | result[@enumToInt(Feature.rand)] = .{ |
| 842 | 842 | .index = @enumToInt(Feature.rand), |
| 843 | 843 | .name = @tagName(Feature.rand), |
| 844 | 844 | .llvm_name = "rand", |
| 845 | 845 | .description = "Enable Random Number generation instructions", |
| 846 | .dependencies = 0, | |
| 846 | .dependencies = featureSet(&[_]Feature{}), | |
| 847 | 847 | }; |
| 848 | 848 | result[@enumToInt(Feature.ras)] = .{ |
| 849 | 849 | .index = @enumToInt(Feature.ras), |
| 850 | 850 | .name = @tagName(Feature.ras), |
| 851 | 851 | .llvm_name = "ras", |
| 852 | 852 | .description = "Enable ARMv8 Reliability, Availability and Serviceability Extensions", |
| 853 | .dependencies = 0, | |
| 853 | .dependencies = featureSet(&[_]Feature{}), | |
| 854 | 854 | }; |
| 855 | 855 | result[@enumToInt(Feature.rasv8_4)] = .{ |
| 856 | 856 | .index = @enumToInt(Feature.rasv8_4), |
| ... | ... | @@ -866,7 +866,7 @@ pub const all_features = blk: { |
| 866 | 866 | .name = @tagName(Feature.rcpc), |
| 867 | 867 | .llvm_name = "rcpc", |
| 868 | 868 | .description = "Enable support for RCPC extension", |
| 869 | .dependencies = 0, | |
| 869 | .dependencies = featureSet(&[_]Feature{}), | |
| 870 | 870 | }; |
| 871 | 871 | result[@enumToInt(Feature.rcpc_immo)] = .{ |
| 872 | 872 | .index = @enumToInt(Feature.rcpc_immo), |
| ... | ... | @@ -882,175 +882,175 @@ pub const all_features = blk: { |
| 882 | 882 | .name = @tagName(Feature.rdm), |
| 883 | 883 | .llvm_name = "rdm", |
| 884 | 884 | .description = "Enable ARMv8.1 Rounding Double Multiply Add/Subtract instructions", |
| 885 | .dependencies = 0, | |
| 885 | .dependencies = featureSet(&[_]Feature{}), | |
| 886 | 886 | }; |
| 887 | 887 | result[@enumToInt(Feature.reserve_x1)] = .{ |
| 888 | 888 | .index = @enumToInt(Feature.reserve_x1), |
| 889 | 889 | .name = @tagName(Feature.reserve_x1), |
| 890 | 890 | .llvm_name = "reserve-x1", |
| 891 | 891 | .description = "Reserve X1, making it unavailable as a GPR", |
| 892 | .dependencies = 0, | |
| 892 | .dependencies = featureSet(&[_]Feature{}), | |
| 893 | 893 | }; |
| 894 | 894 | result[@enumToInt(Feature.reserve_x10)] = .{ |
| 895 | 895 | .index = @enumToInt(Feature.reserve_x10), |
| 896 | 896 | .name = @tagName(Feature.reserve_x10), |
| 897 | 897 | .llvm_name = "reserve-x10", |
| 898 | 898 | .description = "Reserve X10, making it unavailable as a GPR", |
| 899 | .dependencies = 0, | |
| 899 | .dependencies = featureSet(&[_]Feature{}), | |
| 900 | 900 | }; |
| 901 | 901 | result[@enumToInt(Feature.reserve_x11)] = .{ |
| 902 | 902 | .index = @enumToInt(Feature.reserve_x11), |
| 903 | 903 | .name = @tagName(Feature.reserve_x11), |
| 904 | 904 | .llvm_name = "reserve-x11", |
| 905 | 905 | .description = "Reserve X11, making it unavailable as a GPR", |
| 906 | .dependencies = 0, | |
| 906 | .dependencies = featureSet(&[_]Feature{}), | |
| 907 | 907 | }; |
| 908 | 908 | result[@enumToInt(Feature.reserve_x12)] = .{ |
| 909 | 909 | .index = @enumToInt(Feature.reserve_x12), |
| 910 | 910 | .name = @tagName(Feature.reserve_x12), |
| 911 | 911 | .llvm_name = "reserve-x12", |
| 912 | 912 | .description = "Reserve X12, making it unavailable as a GPR", |
| 913 | .dependencies = 0, | |
| 913 | .dependencies = featureSet(&[_]Feature{}), | |
| 914 | 914 | }; |
| 915 | 915 | result[@enumToInt(Feature.reserve_x13)] = .{ |
| 916 | 916 | .index = @enumToInt(Feature.reserve_x13), |
| 917 | 917 | .name = @tagName(Feature.reserve_x13), |
| 918 | 918 | .llvm_name = "reserve-x13", |
| 919 | 919 | .description = "Reserve X13, making it unavailable as a GPR", |
| 920 | .dependencies = 0, | |
| 920 | .dependencies = featureSet(&[_]Feature{}), | |
| 921 | 921 | }; |
| 922 | 922 | result[@enumToInt(Feature.reserve_x14)] = .{ |
| 923 | 923 | .index = @enumToInt(Feature.reserve_x14), |
| 924 | 924 | .name = @tagName(Feature.reserve_x14), |
| 925 | 925 | .llvm_name = "reserve-x14", |
| 926 | 926 | .description = "Reserve X14, making it unavailable as a GPR", |
| 927 | .dependencies = 0, | |
| 927 | .dependencies = featureSet(&[_]Feature{}), | |
| 928 | 928 | }; |
| 929 | 929 | result[@enumToInt(Feature.reserve_x15)] = .{ |
| 930 | 930 | .index = @enumToInt(Feature.reserve_x15), |
| 931 | 931 | .name = @tagName(Feature.reserve_x15), |
| 932 | 932 | .llvm_name = "reserve-x15", |
| 933 | 933 | .description = "Reserve X15, making it unavailable as a GPR", |
| 934 | .dependencies = 0, | |
| 934 | .dependencies = featureSet(&[_]Feature{}), | |
| 935 | 935 | }; |
| 936 | 936 | result[@enumToInt(Feature.reserve_x18)] = .{ |
| 937 | 937 | .index = @enumToInt(Feature.reserve_x18), |
| 938 | 938 | .name = @tagName(Feature.reserve_x18), |
| 939 | 939 | .llvm_name = "reserve-x18", |
| 940 | 940 | .description = "Reserve X18, making it unavailable as a GPR", |
| 941 | .dependencies = 0, | |
| 941 | .dependencies = featureSet(&[_]Feature{}), | |
| 942 | 942 | }; |
| 943 | 943 | result[@enumToInt(Feature.reserve_x2)] = .{ |
| 944 | 944 | .index = @enumToInt(Feature.reserve_x2), |
| 945 | 945 | .name = @tagName(Feature.reserve_x2), |
| 946 | 946 | .llvm_name = "reserve-x2", |
| 947 | 947 | .description = "Reserve X2, making it unavailable as a GPR", |
| 948 | .dependencies = 0, | |
| 948 | .dependencies = featureSet(&[_]Feature{}), | |
| 949 | 949 | }; |
| 950 | 950 | result[@enumToInt(Feature.reserve_x20)] = .{ |
| 951 | 951 | .index = @enumToInt(Feature.reserve_x20), |
| 952 | 952 | .name = @tagName(Feature.reserve_x20), |
| 953 | 953 | .llvm_name = "reserve-x20", |
| 954 | 954 | .description = "Reserve X20, making it unavailable as a GPR", |
| 955 | .dependencies = 0, | |
| 955 | .dependencies = featureSet(&[_]Feature{}), | |
| 956 | 956 | }; |
| 957 | 957 | result[@enumToInt(Feature.reserve_x21)] = .{ |
| 958 | 958 | .index = @enumToInt(Feature.reserve_x21), |
| 959 | 959 | .name = @tagName(Feature.reserve_x21), |
| 960 | 960 | .llvm_name = "reserve-x21", |
| 961 | 961 | .description = "Reserve X21, making it unavailable as a GPR", |
| 962 | .dependencies = 0, | |
| 962 | .dependencies = featureSet(&[_]Feature{}), | |
| 963 | 963 | }; |
| 964 | 964 | result[@enumToInt(Feature.reserve_x22)] = .{ |
| 965 | 965 | .index = @enumToInt(Feature.reserve_x22), |
| 966 | 966 | .name = @tagName(Feature.reserve_x22), |
| 967 | 967 | .llvm_name = "reserve-x22", |
| 968 | 968 | .description = "Reserve X22, making it unavailable as a GPR", |
| 969 | .dependencies = 0, | |
| 969 | .dependencies = featureSet(&[_]Feature{}), | |
| 970 | 970 | }; |
| 971 | 971 | result[@enumToInt(Feature.reserve_x23)] = .{ |
| 972 | 972 | .index = @enumToInt(Feature.reserve_x23), |
| 973 | 973 | .name = @tagName(Feature.reserve_x23), |
| 974 | 974 | .llvm_name = "reserve-x23", |
| 975 | 975 | .description = "Reserve X23, making it unavailable as a GPR", |
| 976 | .dependencies = 0, | |
| 976 | .dependencies = featureSet(&[_]Feature{}), | |
| 977 | 977 | }; |
| 978 | 978 | result[@enumToInt(Feature.reserve_x24)] = .{ |
| 979 | 979 | .index = @enumToInt(Feature.reserve_x24), |
| 980 | 980 | .name = @tagName(Feature.reserve_x24), |
| 981 | 981 | .llvm_name = "reserve-x24", |
| 982 | 982 | .description = "Reserve X24, making it unavailable as a GPR", |
| 983 | .dependencies = 0, | |
| 983 | .dependencies = featureSet(&[_]Feature{}), | |
| 984 | 984 | }; |
| 985 | 985 | result[@enumToInt(Feature.reserve_x25)] = .{ |
| 986 | 986 | .index = @enumToInt(Feature.reserve_x25), |
| 987 | 987 | .name = @tagName(Feature.reserve_x25), |
| 988 | 988 | .llvm_name = "reserve-x25", |
| 989 | 989 | .description = "Reserve X25, making it unavailable as a GPR", |
| 990 | .dependencies = 0, | |
| 990 | .dependencies = featureSet(&[_]Feature{}), | |
| 991 | 991 | }; |
| 992 | 992 | result[@enumToInt(Feature.reserve_x26)] = .{ |
| 993 | 993 | .index = @enumToInt(Feature.reserve_x26), |
| 994 | 994 | .name = @tagName(Feature.reserve_x26), |
| 995 | 995 | .llvm_name = "reserve-x26", |
| 996 | 996 | .description = "Reserve X26, making it unavailable as a GPR", |
| 997 | .dependencies = 0, | |
| 997 | .dependencies = featureSet(&[_]Feature{}), | |
| 998 | 998 | }; |
| 999 | 999 | result[@enumToInt(Feature.reserve_x27)] = .{ |
| 1000 | 1000 | .index = @enumToInt(Feature.reserve_x27), |
| 1001 | 1001 | .name = @tagName(Feature.reserve_x27), |
| 1002 | 1002 | .llvm_name = "reserve-x27", |
| 1003 | 1003 | .description = "Reserve X27, making it unavailable as a GPR", |
| 1004 | .dependencies = 0, | |
| 1004 | .dependencies = featureSet(&[_]Feature{}), | |
| 1005 | 1005 | }; |
| 1006 | 1006 | result[@enumToInt(Feature.reserve_x28)] = .{ |
| 1007 | 1007 | .index = @enumToInt(Feature.reserve_x28), |
| 1008 | 1008 | .name = @tagName(Feature.reserve_x28), |
| 1009 | 1009 | .llvm_name = "reserve-x28", |
| 1010 | 1010 | .description = "Reserve X28, making it unavailable as a GPR", |
| 1011 | .dependencies = 0, | |
| 1011 | .dependencies = featureSet(&[_]Feature{}), | |
| 1012 | 1012 | }; |
| 1013 | 1013 | result[@enumToInt(Feature.reserve_x3)] = .{ |
| 1014 | 1014 | .index = @enumToInt(Feature.reserve_x3), |
| 1015 | 1015 | .name = @tagName(Feature.reserve_x3), |
| 1016 | 1016 | .llvm_name = "reserve-x3", |
| 1017 | 1017 | .description = "Reserve X3, making it unavailable as a GPR", |
| 1018 | .dependencies = 0, | |
| 1018 | .dependencies = featureSet(&[_]Feature{}), | |
| 1019 | 1019 | }; |
| 1020 | 1020 | result[@enumToInt(Feature.reserve_x4)] = .{ |
| 1021 | 1021 | .index = @enumToInt(Feature.reserve_x4), |
| 1022 | 1022 | .name = @tagName(Feature.reserve_x4), |
| 1023 | 1023 | .llvm_name = "reserve-x4", |
| 1024 | 1024 | .description = "Reserve X4, making it unavailable as a GPR", |
| 1025 | .dependencies = 0, | |
| 1025 | .dependencies = featureSet(&[_]Feature{}), | |
| 1026 | 1026 | }; |
| 1027 | 1027 | result[@enumToInt(Feature.reserve_x5)] = .{ |
| 1028 | 1028 | .index = @enumToInt(Feature.reserve_x5), |
| 1029 | 1029 | .name = @tagName(Feature.reserve_x5), |
| 1030 | 1030 | .llvm_name = "reserve-x5", |
| 1031 | 1031 | .description = "Reserve X5, making it unavailable as a GPR", |
| 1032 | .dependencies = 0, | |
| 1032 | .dependencies = featureSet(&[_]Feature{}), | |
| 1033 | 1033 | }; |
| 1034 | 1034 | result[@enumToInt(Feature.reserve_x6)] = .{ |
| 1035 | 1035 | .index = @enumToInt(Feature.reserve_x6), |
| 1036 | 1036 | .name = @tagName(Feature.reserve_x6), |
| 1037 | 1037 | .llvm_name = "reserve-x6", |
| 1038 | 1038 | .description = "Reserve X6, making it unavailable as a GPR", |
| 1039 | .dependencies = 0, | |
| 1039 | .dependencies = featureSet(&[_]Feature{}), | |
| 1040 | 1040 | }; |
| 1041 | 1041 | result[@enumToInt(Feature.reserve_x7)] = .{ |
| 1042 | 1042 | .index = @enumToInt(Feature.reserve_x7), |
| 1043 | 1043 | .name = @tagName(Feature.reserve_x7), |
| 1044 | 1044 | .llvm_name = "reserve-x7", |
| 1045 | 1045 | .description = "Reserve X7, making it unavailable as a GPR", |
| 1046 | .dependencies = 0, | |
| 1046 | .dependencies = featureSet(&[_]Feature{}), | |
| 1047 | 1047 | }; |
| 1048 | 1048 | result[@enumToInt(Feature.reserve_x9)] = .{ |
| 1049 | 1049 | .index = @enumToInt(Feature.reserve_x9), |
| 1050 | 1050 | .name = @tagName(Feature.reserve_x9), |
| 1051 | 1051 | .llvm_name = "reserve-x9", |
| 1052 | 1052 | .description = "Reserve X9, making it unavailable as a GPR", |
| 1053 | .dependencies = 0, | |
| 1053 | .dependencies = featureSet(&[_]Feature{}), | |
| 1054 | 1054 | }; |
| 1055 | 1055 | result[@enumToInt(Feature.saphira)] = .{ |
| 1056 | 1056 | .index = @enumToInt(Feature.saphira), |
| ... | ... | @@ -1076,14 +1076,14 @@ pub const all_features = blk: { |
| 1076 | 1076 | .name = @tagName(Feature.sb), |
| 1077 | 1077 | .llvm_name = "sb", |
| 1078 | 1078 | .description = "Enable v8.5 Speculation Barrier", |
| 1079 | .dependencies = 0, | |
| 1079 | .dependencies = featureSet(&[_]Feature{}), | |
| 1080 | 1080 | }; |
| 1081 | 1081 | result[@enumToInt(Feature.sel2)] = .{ |
| 1082 | 1082 | .index = @enumToInt(Feature.sel2), |
| 1083 | 1083 | .name = @tagName(Feature.sel2), |
| 1084 | 1084 | .llvm_name = "sel2", |
| 1085 | 1085 | .description = "Enable v8.4-A Secure Exception Level 2 extension", |
| 1086 | .dependencies = 0, | |
| 1086 | .dependencies = featureSet(&[_]Feature{}), | |
| 1087 | 1087 | }; |
| 1088 | 1088 | result[@enumToInt(Feature.sha2)] = .{ |
| 1089 | 1089 | .index = @enumToInt(Feature.sha2), |
| ... | ... | @@ -1109,21 +1109,21 @@ pub const all_features = blk: { |
| 1109 | 1109 | .name = @tagName(Feature.slow_misaligned_128store), |
| 1110 | 1110 | .llvm_name = "slow-misaligned-128store", |
| 1111 | 1111 | .description = "Misaligned 128 bit stores are slow", |
| 1112 | .dependencies = 0, | |
| 1112 | .dependencies = featureSet(&[_]Feature{}), | |
| 1113 | 1113 | }; |
| 1114 | 1114 | result[@enumToInt(Feature.slow_paired_128)] = .{ |
| 1115 | 1115 | .index = @enumToInt(Feature.slow_paired_128), |
| 1116 | 1116 | .name = @tagName(Feature.slow_paired_128), |
| 1117 | 1117 | .llvm_name = "slow-paired-128", |
| 1118 | 1118 | .description = "Paired 128 bit loads and stores are slow", |
| 1119 | .dependencies = 0, | |
| 1119 | .dependencies = featureSet(&[_]Feature{}), | |
| 1120 | 1120 | }; |
| 1121 | 1121 | result[@enumToInt(Feature.slow_strqro_store)] = .{ |
| 1122 | 1122 | .index = @enumToInt(Feature.slow_strqro_store), |
| 1123 | 1123 | .name = @tagName(Feature.slow_strqro_store), |
| 1124 | 1124 | .llvm_name = "slow-strqro-store", |
| 1125 | 1125 | .description = "STR of Q register with register offset is slow", |
| 1126 | .dependencies = 0, | |
| 1126 | .dependencies = featureSet(&[_]Feature{}), | |
| 1127 | 1127 | }; |
| 1128 | 1128 | result[@enumToInt(Feature.sm4)] = .{ |
| 1129 | 1129 | .index = @enumToInt(Feature.sm4), |
| ... | ... | @@ -1139,35 +1139,35 @@ pub const all_features = blk: { |
| 1139 | 1139 | .name = @tagName(Feature.spe), |
| 1140 | 1140 | .llvm_name = "spe", |
| 1141 | 1141 | .description = "Enable Statistical Profiling extension", |
| 1142 | .dependencies = 0, | |
| 1142 | .dependencies = featureSet(&[_]Feature{}), | |
| 1143 | 1143 | }; |
| 1144 | 1144 | result[@enumToInt(Feature.specrestrict)] = .{ |
| 1145 | 1145 | .index = @enumToInt(Feature.specrestrict), |
| 1146 | 1146 | .name = @tagName(Feature.specrestrict), |
| 1147 | 1147 | .llvm_name = "specrestrict", |
| 1148 | 1148 | .description = "Enable architectural speculation restriction", |
| 1149 | .dependencies = 0, | |
| 1149 | .dependencies = featureSet(&[_]Feature{}), | |
| 1150 | 1150 | }; |
| 1151 | 1151 | result[@enumToInt(Feature.ssbs)] = .{ |
| 1152 | 1152 | .index = @enumToInt(Feature.ssbs), |
| 1153 | 1153 | .name = @tagName(Feature.ssbs), |
| 1154 | 1154 | .llvm_name = "ssbs", |
| 1155 | 1155 | .description = "Enable Speculative Store Bypass Safe bit", |
| 1156 | .dependencies = 0, | |
| 1156 | .dependencies = featureSet(&[_]Feature{}), | |
| 1157 | 1157 | }; |
| 1158 | 1158 | result[@enumToInt(Feature.strict_align)] = .{ |
| 1159 | 1159 | .index = @enumToInt(Feature.strict_align), |
| 1160 | 1160 | .name = @tagName(Feature.strict_align), |
| 1161 | 1161 | .llvm_name = "strict-align", |
| 1162 | 1162 | .description = "Disallow all unaligned memory access", |
| 1163 | .dependencies = 0, | |
| 1163 | .dependencies = featureSet(&[_]Feature{}), | |
| 1164 | 1164 | }; |
| 1165 | 1165 | result[@enumToInt(Feature.sve)] = .{ |
| 1166 | 1166 | .index = @enumToInt(Feature.sve), |
| 1167 | 1167 | .name = @tagName(Feature.sve), |
| 1168 | 1168 | .llvm_name = "sve", |
| 1169 | 1169 | .description = "Enable Scalable Vector Extension (SVE) instructions", |
| 1170 | .dependencies = 0, | |
| 1170 | .dependencies = featureSet(&[_]Feature{}), | |
| 1171 | 1171 | }; |
| 1172 | 1172 | result[@enumToInt(Feature.sve2)] = .{ |
| 1173 | 1173 | .index = @enumToInt(Feature.sve2), |
| ... | ... | @@ -1300,35 +1300,35 @@ pub const all_features = blk: { |
| 1300 | 1300 | .name = @tagName(Feature.tlb_rmi), |
| 1301 | 1301 | .llvm_name = "tlb-rmi", |
| 1302 | 1302 | .description = "Enable v8.4-A TLB Range and Maintenance Instructions", |
| 1303 | .dependencies = 0, | |
| 1303 | .dependencies = featureSet(&[_]Feature{}), | |
| 1304 | 1304 | }; |
| 1305 | 1305 | result[@enumToInt(Feature.tpidr_el1)] = .{ |
| 1306 | 1306 | .index = @enumToInt(Feature.tpidr_el1), |
| 1307 | 1307 | .name = @tagName(Feature.tpidr_el1), |
| 1308 | 1308 | .llvm_name = "tpidr-el1", |
| 1309 | 1309 | .description = "Permit use of TPIDR_EL1 for the TLS base", |
| 1310 | .dependencies = 0, | |
| 1310 | .dependencies = featureSet(&[_]Feature{}), | |
| 1311 | 1311 | }; |
| 1312 | 1312 | result[@enumToInt(Feature.tpidr_el2)] = .{ |
| 1313 | 1313 | .index = @enumToInt(Feature.tpidr_el2), |
| 1314 | 1314 | .name = @tagName(Feature.tpidr_el2), |
| 1315 | 1315 | .llvm_name = "tpidr-el2", |
| 1316 | 1316 | .description = "Permit use of TPIDR_EL2 for the TLS base", |
| 1317 | .dependencies = 0, | |
| 1317 | .dependencies = featureSet(&[_]Feature{}), | |
| 1318 | 1318 | }; |
| 1319 | 1319 | result[@enumToInt(Feature.tpidr_el3)] = .{ |
| 1320 | 1320 | .index = @enumToInt(Feature.tpidr_el3), |
| 1321 | 1321 | .name = @tagName(Feature.tpidr_el3), |
| 1322 | 1322 | .llvm_name = "tpidr-el3", |
| 1323 | 1323 | .description = "Permit use of TPIDR_EL3 for the TLS base", |
| 1324 | .dependencies = 0, | |
| 1324 | .dependencies = featureSet(&[_]Feature{}), | |
| 1325 | 1325 | }; |
| 1326 | 1326 | result[@enumToInt(Feature.tracev8_4)] = .{ |
| 1327 | 1327 | .index = @enumToInt(Feature.tracev8_4), |
| 1328 | 1328 | .name = @tagName(Feature.tracev8_4), |
| 1329 | 1329 | .llvm_name = "tracev8.4", |
| 1330 | 1330 | .description = "Enable v8.4-A Trace extension", |
| 1331 | .dependencies = 0, | |
| 1331 | .dependencies = featureSet(&[_]Feature{}), | |
| 1332 | 1332 | }; |
| 1333 | 1333 | result[@enumToInt(Feature.tsv110)] = .{ |
| 1334 | 1334 | .index = @enumToInt(Feature.tsv110), |
| ... | ... | @@ -1355,28 +1355,28 @@ pub const all_features = blk: { |
| 1355 | 1355 | .name = @tagName(Feature.uaops), |
| 1356 | 1356 | .llvm_name = "uaops", |
| 1357 | 1357 | .description = "Enable v8.2 UAO PState", |
| 1358 | .dependencies = 0, | |
| 1358 | .dependencies = featureSet(&[_]Feature{}), | |
| 1359 | 1359 | }; |
| 1360 | 1360 | result[@enumToInt(Feature.use_aa)] = .{ |
| 1361 | 1361 | .index = @enumToInt(Feature.use_aa), |
| 1362 | 1362 | .name = @tagName(Feature.use_aa), |
| 1363 | 1363 | .llvm_name = "use-aa", |
| 1364 | 1364 | .description = "Use alias analysis during codegen", |
| 1365 | .dependencies = 0, | |
| 1365 | .dependencies = featureSet(&[_]Feature{}), | |
| 1366 | 1366 | }; |
| 1367 | 1367 | result[@enumToInt(Feature.use_postra_scheduler)] = .{ |
| 1368 | 1368 | .index = @enumToInt(Feature.use_postra_scheduler), |
| 1369 | 1369 | .name = @tagName(Feature.use_postra_scheduler), |
| 1370 | 1370 | .llvm_name = "use-postra-scheduler", |
| 1371 | 1371 | .description = "Schedule again after register allocation", |
| 1372 | .dependencies = 0, | |
| 1372 | .dependencies = featureSet(&[_]Feature{}), | |
| 1373 | 1373 | }; |
| 1374 | 1374 | result[@enumToInt(Feature.use_reciprocal_square_root)] = .{ |
| 1375 | 1375 | .index = @enumToInt(Feature.use_reciprocal_square_root), |
| 1376 | 1376 | .name = @tagName(Feature.use_reciprocal_square_root), |
| 1377 | 1377 | .llvm_name = "use-reciprocal-square-root", |
| 1378 | 1378 | .description = "Use the reciprocal square root approximation", |
| 1379 | .dependencies = 0, | |
| 1379 | .dependencies = featureSet(&[_]Feature{}), | |
| 1380 | 1380 | }; |
| 1381 | 1381 | result[@enumToInt(Feature.v8_1a)] = .{ |
| 1382 | 1382 | .index = @enumToInt(Feature.v8_1a), |
| ... | ... | @@ -1461,14 +1461,14 @@ pub const all_features = blk: { |
| 1461 | 1461 | .name = @tagName(Feature.vh), |
| 1462 | 1462 | .llvm_name = "vh", |
| 1463 | 1463 | .description = "Enables ARM v8.1 Virtual Host extension", |
| 1464 | .dependencies = 0, | |
| 1464 | .dependencies = featureSet(&[_]Feature{}), | |
| 1465 | 1465 | }; |
| 1466 | 1466 | result[@enumToInt(Feature.zcm)] = .{ |
| 1467 | 1467 | .index = @enumToInt(Feature.zcm), |
| 1468 | 1468 | .name = @tagName(Feature.zcm), |
| 1469 | 1469 | .llvm_name = "zcm", |
| 1470 | 1470 | .description = "Has zero-cycle register moves", |
| 1471 | .dependencies = 0, | |
| 1471 | .dependencies = featureSet(&[_]Feature{}), | |
| 1472 | 1472 | }; |
| 1473 | 1473 | result[@enumToInt(Feature.zcz)] = .{ |
| 1474 | 1474 | .index = @enumToInt(Feature.zcz), |
| ... | ... | @@ -1485,21 +1485,21 @@ pub const all_features = blk: { |
| 1485 | 1485 | .name = @tagName(Feature.zcz_fp), |
| 1486 | 1486 | .llvm_name = "zcz-fp", |
| 1487 | 1487 | .description = "Has zero-cycle zeroing instructions for FP registers", |
| 1488 | .dependencies = 0, | |
| 1488 | .dependencies = featureSet(&[_]Feature{}), | |
| 1489 | 1489 | }; |
| 1490 | 1490 | result[@enumToInt(Feature.zcz_fp_workaround)] = .{ |
| 1491 | 1491 | .index = @enumToInt(Feature.zcz_fp_workaround), |
| 1492 | 1492 | .name = @tagName(Feature.zcz_fp_workaround), |
| 1493 | 1493 | .llvm_name = "zcz-fp-workaround", |
| 1494 | 1494 | .description = "The zero-cycle floating-point zeroing instruction has a bug", |
| 1495 | .dependencies = 0, | |
| 1495 | .dependencies = featureSet(&[_]Feature{}), | |
| 1496 | 1496 | }; |
| 1497 | 1497 | result[@enumToInt(Feature.zcz_gp)] = .{ |
| 1498 | 1498 | .index = @enumToInt(Feature.zcz_gp), |
| 1499 | 1499 | .name = @tagName(Feature.zcz_gp), |
| 1500 | 1500 | .llvm_name = "zcz-gp", |
| 1501 | 1501 | .description = "Has zero-cycle zeroing instructions for generic registers", |
| 1502 | .dependencies = 0, | |
| 1502 | .dependencies = featureSet(&[_]Feature{}), | |
| 1503 | 1503 | }; |
| 1504 | 1504 | break :blk result; |
| 1505 | 1505 | }; |
lib/std/target/amdgpu.zig+100-100| ... | ... | @@ -115,224 +115,224 @@ pub usingnamespace Cpu.Feature.feature_set_fns(Feature); |
| 115 | 115 | |
| 116 | 116 | pub const all_features = blk: { |
| 117 | 117 | const len = @typeInfo(Feature).Enum.fields.len; |
| 118 | std.debug.assert(len <= @typeInfo(Cpu.Feature.Set).Int.bits); | |
| 118 | std.debug.assert(len <= Cpu.Feature.Set.bit_count); | |
| 119 | 119 | var result: [len]Cpu.Feature = undefined; |
| 120 | 120 | result[@enumToInt(Feature.@"16_bit_insts")] = .{ |
| 121 | 121 | .index = @enumToInt(Feature.@"16_bit_insts"), |
| 122 | 122 | .name = @tagName(Feature.@"16_bit_insts"), |
| 123 | 123 | .llvm_name = "16-bit-insts", |
| 124 | 124 | .description = "Has i16/f16 instructions", |
| 125 | .dependencies = 0, | |
| 125 | .dependencies = featureSet(&[_]Feature{}), | |
| 126 | 126 | }; |
| 127 | 127 | result[@enumToInt(Feature.DumpCode)] = .{ |
| 128 | 128 | .index = @enumToInt(Feature.DumpCode), |
| 129 | 129 | .name = @tagName(Feature.DumpCode), |
| 130 | 130 | .llvm_name = "DumpCode", |
| 131 | 131 | .description = "Dump MachineInstrs in the CodeEmitter", |
| 132 | .dependencies = 0, | |
| 132 | .dependencies = featureSet(&[_]Feature{}), | |
| 133 | 133 | }; |
| 134 | 134 | result[@enumToInt(Feature.add_no_carry_insts)] = .{ |
| 135 | 135 | .index = @enumToInt(Feature.add_no_carry_insts), |
| 136 | 136 | .name = @tagName(Feature.add_no_carry_insts), |
| 137 | 137 | .llvm_name = "add-no-carry-insts", |
| 138 | 138 | .description = "Have VALU add/sub instructions without carry out", |
| 139 | .dependencies = 0, | |
| 139 | .dependencies = featureSet(&[_]Feature{}), | |
| 140 | 140 | }; |
| 141 | 141 | result[@enumToInt(Feature.aperture_regs)] = .{ |
| 142 | 142 | .index = @enumToInt(Feature.aperture_regs), |
| 143 | 143 | .name = @tagName(Feature.aperture_regs), |
| 144 | 144 | .llvm_name = "aperture-regs", |
| 145 | 145 | .description = "Has Memory Aperture Base and Size Registers", |
| 146 | .dependencies = 0, | |
| 146 | .dependencies = featureSet(&[_]Feature{}), | |
| 147 | 147 | }; |
| 148 | 148 | result[@enumToInt(Feature.atomic_fadd_insts)] = .{ |
| 149 | 149 | .index = @enumToInt(Feature.atomic_fadd_insts), |
| 150 | 150 | .name = @tagName(Feature.atomic_fadd_insts), |
| 151 | 151 | .llvm_name = "atomic-fadd-insts", |
| 152 | 152 | .description = "Has buffer_atomic_add_f32, buffer_atomic_pk_add_f16, global_atomic_add_f32, global_atomic_pk_add_f16 instructions", |
| 153 | .dependencies = 0, | |
| 153 | .dependencies = featureSet(&[_]Feature{}), | |
| 154 | 154 | }; |
| 155 | 155 | result[@enumToInt(Feature.auto_waitcnt_before_barrier)] = .{ |
| 156 | 156 | .index = @enumToInt(Feature.auto_waitcnt_before_barrier), |
| 157 | 157 | .name = @tagName(Feature.auto_waitcnt_before_barrier), |
| 158 | 158 | .llvm_name = "auto-waitcnt-before-barrier", |
| 159 | 159 | .description = "Hardware automatically inserts waitcnt before barrier", |
| 160 | .dependencies = 0, | |
| 160 | .dependencies = featureSet(&[_]Feature{}), | |
| 161 | 161 | }; |
| 162 | 162 | result[@enumToInt(Feature.ci_insts)] = .{ |
| 163 | 163 | .index = @enumToInt(Feature.ci_insts), |
| 164 | 164 | .name = @tagName(Feature.ci_insts), |
| 165 | 165 | .llvm_name = "ci-insts", |
| 166 | 166 | .description = "Additional instructions for CI+", |
| 167 | .dependencies = 0, | |
| 167 | .dependencies = featureSet(&[_]Feature{}), | |
| 168 | 168 | }; |
| 169 | 169 | result[@enumToInt(Feature.code_object_v3)] = .{ |
| 170 | 170 | .index = @enumToInt(Feature.code_object_v3), |
| 171 | 171 | .name = @tagName(Feature.code_object_v3), |
| 172 | 172 | .llvm_name = "code-object-v3", |
| 173 | 173 | .description = "Generate code object version 3", |
| 174 | .dependencies = 0, | |
| 174 | .dependencies = featureSet(&[_]Feature{}), | |
| 175 | 175 | }; |
| 176 | 176 | result[@enumToInt(Feature.cumode)] = .{ |
| 177 | 177 | .index = @enumToInt(Feature.cumode), |
| 178 | 178 | .name = @tagName(Feature.cumode), |
| 179 | 179 | .llvm_name = "cumode", |
| 180 | 180 | .description = "Enable CU wavefront execution mode", |
| 181 | .dependencies = 0, | |
| 181 | .dependencies = featureSet(&[_]Feature{}), | |
| 182 | 182 | }; |
| 183 | 183 | result[@enumToInt(Feature.dl_insts)] = .{ |
| 184 | 184 | .index = @enumToInt(Feature.dl_insts), |
| 185 | 185 | .name = @tagName(Feature.dl_insts), |
| 186 | 186 | .llvm_name = "dl-insts", |
| 187 | 187 | .description = "Has v_fmac_f32 and v_xnor_b32 instructions", |
| 188 | .dependencies = 0, | |
| 188 | .dependencies = featureSet(&[_]Feature{}), | |
| 189 | 189 | }; |
| 190 | 190 | result[@enumToInt(Feature.dot1_insts)] = .{ |
| 191 | 191 | .index = @enumToInt(Feature.dot1_insts), |
| 192 | 192 | .name = @tagName(Feature.dot1_insts), |
| 193 | 193 | .llvm_name = "dot1-insts", |
| 194 | 194 | .description = "Has v_dot4_i32_i8 and v_dot8_i32_i4 instructions", |
| 195 | .dependencies = 0, | |
| 195 | .dependencies = featureSet(&[_]Feature{}), | |
| 196 | 196 | }; |
| 197 | 197 | result[@enumToInt(Feature.dot2_insts)] = .{ |
| 198 | 198 | .index = @enumToInt(Feature.dot2_insts), |
| 199 | 199 | .name = @tagName(Feature.dot2_insts), |
| 200 | 200 | .llvm_name = "dot2-insts", |
| 201 | 201 | .description = "Has v_dot2_f32_f16, v_dot2_i32_i16, v_dot2_u32_u16, v_dot4_u32_u8, v_dot8_u32_u4 instructions", |
| 202 | .dependencies = 0, | |
| 202 | .dependencies = featureSet(&[_]Feature{}), | |
| 203 | 203 | }; |
| 204 | 204 | result[@enumToInt(Feature.dot3_insts)] = .{ |
| 205 | 205 | .index = @enumToInt(Feature.dot3_insts), |
| 206 | 206 | .name = @tagName(Feature.dot3_insts), |
| 207 | 207 | .llvm_name = "dot3-insts", |
| 208 | 208 | .description = "Has v_dot8c_i32_i4 instruction", |
| 209 | .dependencies = 0, | |
| 209 | .dependencies = featureSet(&[_]Feature{}), | |
| 210 | 210 | }; |
| 211 | 211 | result[@enumToInt(Feature.dot4_insts)] = .{ |
| 212 | 212 | .index = @enumToInt(Feature.dot4_insts), |
| 213 | 213 | .name = @tagName(Feature.dot4_insts), |
| 214 | 214 | .llvm_name = "dot4-insts", |
| 215 | 215 | .description = "Has v_dot2c_i32_i16 instruction", |
| 216 | .dependencies = 0, | |
| 216 | .dependencies = featureSet(&[_]Feature{}), | |
| 217 | 217 | }; |
| 218 | 218 | result[@enumToInt(Feature.dot5_insts)] = .{ |
| 219 | 219 | .index = @enumToInt(Feature.dot5_insts), |
| 220 | 220 | .name = @tagName(Feature.dot5_insts), |
| 221 | 221 | .llvm_name = "dot5-insts", |
| 222 | 222 | .description = "Has v_dot2c_f32_f16 instruction", |
| 223 | .dependencies = 0, | |
| 223 | .dependencies = featureSet(&[_]Feature{}), | |
| 224 | 224 | }; |
| 225 | 225 | result[@enumToInt(Feature.dot6_insts)] = .{ |
| 226 | 226 | .index = @enumToInt(Feature.dot6_insts), |
| 227 | 227 | .name = @tagName(Feature.dot6_insts), |
| 228 | 228 | .llvm_name = "dot6-insts", |
| 229 | 229 | .description = "Has v_dot4c_i32_i8 instruction", |
| 230 | .dependencies = 0, | |
| 230 | .dependencies = featureSet(&[_]Feature{}), | |
| 231 | 231 | }; |
| 232 | 232 | result[@enumToInt(Feature.dpp)] = .{ |
| 233 | 233 | .index = @enumToInt(Feature.dpp), |
| 234 | 234 | .name = @tagName(Feature.dpp), |
| 235 | 235 | .llvm_name = "dpp", |
| 236 | 236 | .description = "Support DPP (Data Parallel Primitives) extension", |
| 237 | .dependencies = 0, | |
| 237 | .dependencies = featureSet(&[_]Feature{}), | |
| 238 | 238 | }; |
| 239 | 239 | result[@enumToInt(Feature.dpp8)] = .{ |
| 240 | 240 | .index = @enumToInt(Feature.dpp8), |
| 241 | 241 | .name = @tagName(Feature.dpp8), |
| 242 | 242 | .llvm_name = "dpp8", |
| 243 | 243 | .description = "Support DPP8 (Data Parallel Primitives) extension", |
| 244 | .dependencies = 0, | |
| 244 | .dependencies = featureSet(&[_]Feature{}), | |
| 245 | 245 | }; |
| 246 | 246 | result[@enumToInt(Feature.dumpcode)] = .{ |
| 247 | 247 | .index = @enumToInt(Feature.dumpcode), |
| 248 | 248 | .name = @tagName(Feature.dumpcode), |
| 249 | 249 | .llvm_name = "dumpcode", |
| 250 | 250 | .description = "Dump MachineInstrs in the CodeEmitter", |
| 251 | .dependencies = 0, | |
| 251 | .dependencies = featureSet(&[_]Feature{}), | |
| 252 | 252 | }; |
| 253 | 253 | result[@enumToInt(Feature.enable_ds128)] = .{ |
| 254 | 254 | .index = @enumToInt(Feature.enable_ds128), |
| 255 | 255 | .name = @tagName(Feature.enable_ds128), |
| 256 | 256 | .llvm_name = "enable-ds128", |
| 257 | 257 | .description = "Use ds_read|write_b128", |
| 258 | .dependencies = 0, | |
| 258 | .dependencies = featureSet(&[_]Feature{}), | |
| 259 | 259 | }; |
| 260 | 260 | result[@enumToInt(Feature.enable_prt_strict_null)] = .{ |
| 261 | 261 | .index = @enumToInt(Feature.enable_prt_strict_null), |
| 262 | 262 | .name = @tagName(Feature.enable_prt_strict_null), |
| 263 | 263 | .llvm_name = "enable-prt-strict-null", |
| 264 | 264 | .description = "Enable zeroing of result registers for sparse texture fetches", |
| 265 | .dependencies = 0, | |
| 265 | .dependencies = featureSet(&[_]Feature{}), | |
| 266 | 266 | }; |
| 267 | 267 | result[@enumToInt(Feature.fast_fmaf)] = .{ |
| 268 | 268 | .index = @enumToInt(Feature.fast_fmaf), |
| 269 | 269 | .name = @tagName(Feature.fast_fmaf), |
| 270 | 270 | .llvm_name = "fast-fmaf", |
| 271 | 271 | .description = "Assuming f32 fma is at least as fast as mul + add", |
| 272 | .dependencies = 0, | |
| 272 | .dependencies = featureSet(&[_]Feature{}), | |
| 273 | 273 | }; |
| 274 | 274 | result[@enumToInt(Feature.flat_address_space)] = .{ |
| 275 | 275 | .index = @enumToInt(Feature.flat_address_space), |
| 276 | 276 | .name = @tagName(Feature.flat_address_space), |
| 277 | 277 | .llvm_name = "flat-address-space", |
| 278 | 278 | .description = "Support flat address space", |
| 279 | .dependencies = 0, | |
| 279 | .dependencies = featureSet(&[_]Feature{}), | |
| 280 | 280 | }; |
| 281 | 281 | result[@enumToInt(Feature.flat_for_global)] = .{ |
| 282 | 282 | .index = @enumToInt(Feature.flat_for_global), |
| 283 | 283 | .name = @tagName(Feature.flat_for_global), |
| 284 | 284 | .llvm_name = "flat-for-global", |
| 285 | 285 | .description = "Force to generate flat instruction for global", |
| 286 | .dependencies = 0, | |
| 286 | .dependencies = featureSet(&[_]Feature{}), | |
| 287 | 287 | }; |
| 288 | 288 | result[@enumToInt(Feature.flat_global_insts)] = .{ |
| 289 | 289 | .index = @enumToInt(Feature.flat_global_insts), |
| 290 | 290 | .name = @tagName(Feature.flat_global_insts), |
| 291 | 291 | .llvm_name = "flat-global-insts", |
| 292 | 292 | .description = "Have global_* flat memory instructions", |
| 293 | .dependencies = 0, | |
| 293 | .dependencies = featureSet(&[_]Feature{}), | |
| 294 | 294 | }; |
| 295 | 295 | result[@enumToInt(Feature.flat_inst_offsets)] = .{ |
| 296 | 296 | .index = @enumToInt(Feature.flat_inst_offsets), |
| 297 | 297 | .name = @tagName(Feature.flat_inst_offsets), |
| 298 | 298 | .llvm_name = "flat-inst-offsets", |
| 299 | 299 | .description = "Flat instructions have immediate offset addressing mode", |
| 300 | .dependencies = 0, | |
| 300 | .dependencies = featureSet(&[_]Feature{}), | |
| 301 | 301 | }; |
| 302 | 302 | result[@enumToInt(Feature.flat_scratch_insts)] = .{ |
| 303 | 303 | .index = @enumToInt(Feature.flat_scratch_insts), |
| 304 | 304 | .name = @tagName(Feature.flat_scratch_insts), |
| 305 | 305 | .llvm_name = "flat-scratch-insts", |
| 306 | 306 | .description = "Have scratch_* flat memory instructions", |
| 307 | .dependencies = 0, | |
| 307 | .dependencies = featureSet(&[_]Feature{}), | |
| 308 | 308 | }; |
| 309 | 309 | result[@enumToInt(Feature.flat_segment_offset_bug)] = .{ |
| 310 | 310 | .index = @enumToInt(Feature.flat_segment_offset_bug), |
| 311 | 311 | .name = @tagName(Feature.flat_segment_offset_bug), |
| 312 | 312 | .llvm_name = "flat-segment-offset-bug", |
| 313 | 313 | .description = "GFX10 bug, inst_offset ignored in flat segment", |
| 314 | .dependencies = 0, | |
| 314 | .dependencies = featureSet(&[_]Feature{}), | |
| 315 | 315 | }; |
| 316 | 316 | result[@enumToInt(Feature.fma_mix_insts)] = .{ |
| 317 | 317 | .index = @enumToInt(Feature.fma_mix_insts), |
| 318 | 318 | .name = @tagName(Feature.fma_mix_insts), |
| 319 | 319 | .llvm_name = "fma-mix-insts", |
| 320 | 320 | .description = "Has v_fma_mix_f32, v_fma_mixlo_f16, v_fma_mixhi_f16 instructions", |
| 321 | .dependencies = 0, | |
| 321 | .dependencies = featureSet(&[_]Feature{}), | |
| 322 | 322 | }; |
| 323 | 323 | result[@enumToInt(Feature.fmaf)] = .{ |
| 324 | 324 | .index = @enumToInt(Feature.fmaf), |
| 325 | 325 | .name = @tagName(Feature.fmaf), |
| 326 | 326 | .llvm_name = "fmaf", |
| 327 | 327 | .description = "Enable single precision FMA (not as fast as mul+add, but fused)", |
| 328 | .dependencies = 0, | |
| 328 | .dependencies = featureSet(&[_]Feature{}), | |
| 329 | 329 | }; |
| 330 | 330 | result[@enumToInt(Feature.fp_exceptions)] = .{ |
| 331 | 331 | .index = @enumToInt(Feature.fp_exceptions), |
| 332 | 332 | .name = @tagName(Feature.fp_exceptions), |
| 333 | 333 | .llvm_name = "fp-exceptions", |
| 334 | 334 | .description = "Enable floating point exceptions", |
| 335 | .dependencies = 0, | |
| 335 | .dependencies = featureSet(&[_]Feature{}), | |
| 336 | 336 | }; |
| 337 | 337 | result[@enumToInt(Feature.fp16_denormals)] = .{ |
| 338 | 338 | .index = @enumToInt(Feature.fp16_denormals), |
| ... | ... | @@ -348,14 +348,14 @@ pub const all_features = blk: { |
| 348 | 348 | .name = @tagName(Feature.fp32_denormals), |
| 349 | 349 | .llvm_name = "fp32-denormals", |
| 350 | 350 | .description = "Enable single precision denormal handling", |
| 351 | .dependencies = 0, | |
| 351 | .dependencies = featureSet(&[_]Feature{}), | |
| 352 | 352 | }; |
| 353 | 353 | result[@enumToInt(Feature.fp64)] = .{ |
| 354 | 354 | .index = @enumToInt(Feature.fp64), |
| 355 | 355 | .name = @tagName(Feature.fp64), |
| 356 | 356 | .llvm_name = "fp64", |
| 357 | 357 | .description = "Enable double precision operations", |
| 358 | .dependencies = 0, | |
| 358 | .dependencies = featureSet(&[_]Feature{}), | |
| 359 | 359 | }; |
| 360 | 360 | result[@enumToInt(Feature.fp64_denormals)] = .{ |
| 361 | 361 | .index = @enumToInt(Feature.fp64_denormals), |
| ... | ... | @@ -381,7 +381,7 @@ pub const all_features = blk: { |
| 381 | 381 | .name = @tagName(Feature.gcn3_encoding), |
| 382 | 382 | .llvm_name = "gcn3-encoding", |
| 383 | 383 | .description = "Encoding format for VI", |
| 384 | .dependencies = 0, | |
| 384 | .dependencies = featureSet(&[_]Feature{}), | |
| 385 | 385 | }; |
| 386 | 386 | result[@enumToInt(Feature.gfx10)] = .{ |
| 387 | 387 | .index = @enumToInt(Feature.gfx10), |
| ... | ... | @@ -430,21 +430,21 @@ pub const all_features = blk: { |
| 430 | 430 | .name = @tagName(Feature.gfx10_insts), |
| 431 | 431 | .llvm_name = "gfx10-insts", |
| 432 | 432 | .description = "Additional instructions for GFX10+", |
| 433 | .dependencies = 0, | |
| 433 | .dependencies = featureSet(&[_]Feature{}), | |
| 434 | 434 | }; |
| 435 | 435 | result[@enumToInt(Feature.gfx7_gfx8_gfx9_insts)] = .{ |
| 436 | 436 | .index = @enumToInt(Feature.gfx7_gfx8_gfx9_insts), |
| 437 | 437 | .name = @tagName(Feature.gfx7_gfx8_gfx9_insts), |
| 438 | 438 | .llvm_name = "gfx7-gfx8-gfx9-insts", |
| 439 | 439 | .description = "Instructions shared in GFX7, GFX8, GFX9", |
| 440 | .dependencies = 0, | |
| 440 | .dependencies = featureSet(&[_]Feature{}), | |
| 441 | 441 | }; |
| 442 | 442 | result[@enumToInt(Feature.gfx8_insts)] = .{ |
| 443 | 443 | .index = @enumToInt(Feature.gfx8_insts), |
| 444 | 444 | .name = @tagName(Feature.gfx8_insts), |
| 445 | 445 | .llvm_name = "gfx8-insts", |
| 446 | 446 | .description = "Additional instructions for GFX8+", |
| 447 | .dependencies = 0, | |
| 447 | .dependencies = featureSet(&[_]Feature{}), | |
| 448 | 448 | }; |
| 449 | 449 | result[@enumToInt(Feature.gfx9)] = .{ |
| 450 | 450 | .index = @enumToInt(Feature.gfx9), |
| ... | ... | @@ -489,287 +489,287 @@ pub const all_features = blk: { |
| 489 | 489 | .name = @tagName(Feature.gfx9_insts), |
| 490 | 490 | .llvm_name = "gfx9-insts", |
| 491 | 491 | .description = "Additional instructions for GFX9+", |
| 492 | .dependencies = 0, | |
| 492 | .dependencies = featureSet(&[_]Feature{}), | |
| 493 | 493 | }; |
| 494 | 494 | result[@enumToInt(Feature.half_rate_64_ops)] = .{ |
| 495 | 495 | .index = @enumToInt(Feature.half_rate_64_ops), |
| 496 | 496 | .name = @tagName(Feature.half_rate_64_ops), |
| 497 | 497 | .llvm_name = "half-rate-64-ops", |
| 498 | 498 | .description = "Most fp64 instructions are half rate instead of quarter", |
| 499 | .dependencies = 0, | |
| 499 | .dependencies = featureSet(&[_]Feature{}), | |
| 500 | 500 | }; |
| 501 | 501 | result[@enumToInt(Feature.inst_fwd_prefetch_bug)] = .{ |
| 502 | 502 | .index = @enumToInt(Feature.inst_fwd_prefetch_bug), |
| 503 | 503 | .name = @tagName(Feature.inst_fwd_prefetch_bug), |
| 504 | 504 | .llvm_name = "inst-fwd-prefetch-bug", |
| 505 | 505 | .description = "S_INST_PREFETCH instruction causes shader to hang", |
| 506 | .dependencies = 0, | |
| 506 | .dependencies = featureSet(&[_]Feature{}), | |
| 507 | 507 | }; |
| 508 | 508 | result[@enumToInt(Feature.int_clamp_insts)] = .{ |
| 509 | 509 | .index = @enumToInt(Feature.int_clamp_insts), |
| 510 | 510 | .name = @tagName(Feature.int_clamp_insts), |
| 511 | 511 | .llvm_name = "int-clamp-insts", |
| 512 | 512 | .description = "Support clamp for integer destination", |
| 513 | .dependencies = 0, | |
| 513 | .dependencies = featureSet(&[_]Feature{}), | |
| 514 | 514 | }; |
| 515 | 515 | result[@enumToInt(Feature.inv_2pi_inline_imm)] = .{ |
| 516 | 516 | .index = @enumToInt(Feature.inv_2pi_inline_imm), |
| 517 | 517 | .name = @tagName(Feature.inv_2pi_inline_imm), |
| 518 | 518 | .llvm_name = "inv-2pi-inline-imm", |
| 519 | 519 | .description = "Has 1 / (2 * pi) as inline immediate", |
| 520 | .dependencies = 0, | |
| 520 | .dependencies = featureSet(&[_]Feature{}), | |
| 521 | 521 | }; |
| 522 | 522 | result[@enumToInt(Feature.lds_branch_vmem_war_hazard)] = .{ |
| 523 | 523 | .index = @enumToInt(Feature.lds_branch_vmem_war_hazard), |
| 524 | 524 | .name = @tagName(Feature.lds_branch_vmem_war_hazard), |
| 525 | 525 | .llvm_name = "lds-branch-vmem-war-hazard", |
| 526 | 526 | .description = "Switching between LDS and VMEM-tex not waiting VM_VSRC=0", |
| 527 | .dependencies = 0, | |
| 527 | .dependencies = featureSet(&[_]Feature{}), | |
| 528 | 528 | }; |
| 529 | 529 | result[@enumToInt(Feature.lds_misaligned_bug)] = .{ |
| 530 | 530 | .index = @enumToInt(Feature.lds_misaligned_bug), |
| 531 | 531 | .name = @tagName(Feature.lds_misaligned_bug), |
| 532 | 532 | .llvm_name = "lds-misaligned-bug", |
| 533 | 533 | .description = "Some GFX10 bug with misaligned multi-dword LDS access in WGP mode", |
| 534 | .dependencies = 0, | |
| 534 | .dependencies = featureSet(&[_]Feature{}), | |
| 535 | 535 | }; |
| 536 | 536 | result[@enumToInt(Feature.ldsbankcount16)] = .{ |
| 537 | 537 | .index = @enumToInt(Feature.ldsbankcount16), |
| 538 | 538 | .name = @tagName(Feature.ldsbankcount16), |
| 539 | 539 | .llvm_name = "ldsbankcount16", |
| 540 | 540 | .description = "The number of LDS banks per compute unit.", |
| 541 | .dependencies = 0, | |
| 541 | .dependencies = featureSet(&[_]Feature{}), | |
| 542 | 542 | }; |
| 543 | 543 | result[@enumToInt(Feature.ldsbankcount32)] = .{ |
| 544 | 544 | .index = @enumToInt(Feature.ldsbankcount32), |
| 545 | 545 | .name = @tagName(Feature.ldsbankcount32), |
| 546 | 546 | .llvm_name = "ldsbankcount32", |
| 547 | 547 | .description = "The number of LDS banks per compute unit.", |
| 548 | .dependencies = 0, | |
| 548 | .dependencies = featureSet(&[_]Feature{}), | |
| 549 | 549 | }; |
| 550 | 550 | result[@enumToInt(Feature.load_store_opt)] = .{ |
| 551 | 551 | .index = @enumToInt(Feature.load_store_opt), |
| 552 | 552 | .name = @tagName(Feature.load_store_opt), |
| 553 | 553 | .llvm_name = "load-store-opt", |
| 554 | 554 | .description = "Enable SI load/store optimizer pass", |
| 555 | .dependencies = 0, | |
| 555 | .dependencies = featureSet(&[_]Feature{}), | |
| 556 | 556 | }; |
| 557 | 557 | result[@enumToInt(Feature.localmemorysize0)] = .{ |
| 558 | 558 | .index = @enumToInt(Feature.localmemorysize0), |
| 559 | 559 | .name = @tagName(Feature.localmemorysize0), |
| 560 | 560 | .llvm_name = "localmemorysize0", |
| 561 | 561 | .description = "The size of local memory in bytes", |
| 562 | .dependencies = 0, | |
| 562 | .dependencies = featureSet(&[_]Feature{}), | |
| 563 | 563 | }; |
| 564 | 564 | result[@enumToInt(Feature.localmemorysize32768)] = .{ |
| 565 | 565 | .index = @enumToInt(Feature.localmemorysize32768), |
| 566 | 566 | .name = @tagName(Feature.localmemorysize32768), |
| 567 | 567 | .llvm_name = "localmemorysize32768", |
| 568 | 568 | .description = "The size of local memory in bytes", |
| 569 | .dependencies = 0, | |
| 569 | .dependencies = featureSet(&[_]Feature{}), | |
| 570 | 570 | }; |
| 571 | 571 | result[@enumToInt(Feature.localmemorysize65536)] = .{ |
| 572 | 572 | .index = @enumToInt(Feature.localmemorysize65536), |
| 573 | 573 | .name = @tagName(Feature.localmemorysize65536), |
| 574 | 574 | .llvm_name = "localmemorysize65536", |
| 575 | 575 | .description = "The size of local memory in bytes", |
| 576 | .dependencies = 0, | |
| 576 | .dependencies = featureSet(&[_]Feature{}), | |
| 577 | 577 | }; |
| 578 | 578 | result[@enumToInt(Feature.mad_mix_insts)] = .{ |
| 579 | 579 | .index = @enumToInt(Feature.mad_mix_insts), |
| 580 | 580 | .name = @tagName(Feature.mad_mix_insts), |
| 581 | 581 | .llvm_name = "mad-mix-insts", |
| 582 | 582 | .description = "Has v_mad_mix_f32, v_mad_mixlo_f16, v_mad_mixhi_f16 instructions", |
| 583 | .dependencies = 0, | |
| 583 | .dependencies = featureSet(&[_]Feature{}), | |
| 584 | 584 | }; |
| 585 | 585 | result[@enumToInt(Feature.mai_insts)] = .{ |
| 586 | 586 | .index = @enumToInt(Feature.mai_insts), |
| 587 | 587 | .name = @tagName(Feature.mai_insts), |
| 588 | 588 | .llvm_name = "mai-insts", |
| 589 | 589 | .description = "Has mAI instructions", |
| 590 | .dependencies = 0, | |
| 590 | .dependencies = featureSet(&[_]Feature{}), | |
| 591 | 591 | }; |
| 592 | 592 | result[@enumToInt(Feature.max_private_element_size_16)] = .{ |
| 593 | 593 | .index = @enumToInt(Feature.max_private_element_size_16), |
| 594 | 594 | .name = @tagName(Feature.max_private_element_size_16), |
| 595 | 595 | .llvm_name = "max-private-element-size-16", |
| 596 | 596 | .description = "Maximum private access size may be 16", |
| 597 | .dependencies = 0, | |
| 597 | .dependencies = featureSet(&[_]Feature{}), | |
| 598 | 598 | }; |
| 599 | 599 | result[@enumToInt(Feature.max_private_element_size_4)] = .{ |
| 600 | 600 | .index = @enumToInt(Feature.max_private_element_size_4), |
| 601 | 601 | .name = @tagName(Feature.max_private_element_size_4), |
| 602 | 602 | .llvm_name = "max-private-element-size-4", |
| 603 | 603 | .description = "Maximum private access size may be 4", |
| 604 | .dependencies = 0, | |
| 604 | .dependencies = featureSet(&[_]Feature{}), | |
| 605 | 605 | }; |
| 606 | 606 | result[@enumToInt(Feature.max_private_element_size_8)] = .{ |
| 607 | 607 | .index = @enumToInt(Feature.max_private_element_size_8), |
| 608 | 608 | .name = @tagName(Feature.max_private_element_size_8), |
| 609 | 609 | .llvm_name = "max-private-element-size-8", |
| 610 | 610 | .description = "Maximum private access size may be 8", |
| 611 | .dependencies = 0, | |
| 611 | .dependencies = featureSet(&[_]Feature{}), | |
| 612 | 612 | }; |
| 613 | 613 | result[@enumToInt(Feature.mimg_r128)] = .{ |
| 614 | 614 | .index = @enumToInt(Feature.mimg_r128), |
| 615 | 615 | .name = @tagName(Feature.mimg_r128), |
| 616 | 616 | .llvm_name = "mimg-r128", |
| 617 | 617 | .description = "Support 128-bit texture resources", |
| 618 | .dependencies = 0, | |
| 618 | .dependencies = featureSet(&[_]Feature{}), | |
| 619 | 619 | }; |
| 620 | 620 | result[@enumToInt(Feature.movrel)] = .{ |
| 621 | 621 | .index = @enumToInt(Feature.movrel), |
| 622 | 622 | .name = @tagName(Feature.movrel), |
| 623 | 623 | .llvm_name = "movrel", |
| 624 | 624 | .description = "Has v_movrel*_b32 instructions", |
| 625 | .dependencies = 0, | |
| 625 | .dependencies = featureSet(&[_]Feature{}), | |
| 626 | 626 | }; |
| 627 | 627 | result[@enumToInt(Feature.no_data_dep_hazard)] = .{ |
| 628 | 628 | .index = @enumToInt(Feature.no_data_dep_hazard), |
| 629 | 629 | .name = @tagName(Feature.no_data_dep_hazard), |
| 630 | 630 | .llvm_name = "no-data-dep-hazard", |
| 631 | 631 | .description = "Does not need SW waitstates", |
| 632 | .dependencies = 0, | |
| 632 | .dependencies = featureSet(&[_]Feature{}), | |
| 633 | 633 | }; |
| 634 | 634 | result[@enumToInt(Feature.no_sdst_cmpx)] = .{ |
| 635 | 635 | .index = @enumToInt(Feature.no_sdst_cmpx), |
| 636 | 636 | .name = @tagName(Feature.no_sdst_cmpx), |
| 637 | 637 | .llvm_name = "no-sdst-cmpx", |
| 638 | 638 | .description = "V_CMPX does not write VCC/SGPR in addition to EXEC", |
| 639 | .dependencies = 0, | |
| 639 | .dependencies = featureSet(&[_]Feature{}), | |
| 640 | 640 | }; |
| 641 | 641 | result[@enumToInt(Feature.no_sram_ecc_support)] = .{ |
| 642 | 642 | .index = @enumToInt(Feature.no_sram_ecc_support), |
| 643 | 643 | .name = @tagName(Feature.no_sram_ecc_support), |
| 644 | 644 | .llvm_name = "no-sram-ecc-support", |
| 645 | 645 | .description = "Hardware does not support SRAM ECC", |
| 646 | .dependencies = 0, | |
| 646 | .dependencies = featureSet(&[_]Feature{}), | |
| 647 | 647 | }; |
| 648 | 648 | result[@enumToInt(Feature.no_xnack_support)] = .{ |
| 649 | 649 | .index = @enumToInt(Feature.no_xnack_support), |
| 650 | 650 | .name = @tagName(Feature.no_xnack_support), |
| 651 | 651 | .llvm_name = "no-xnack-support", |
| 652 | 652 | .description = "Hardware does not support XNACK", |
| 653 | .dependencies = 0, | |
| 653 | .dependencies = featureSet(&[_]Feature{}), | |
| 654 | 654 | }; |
| 655 | 655 | result[@enumToInt(Feature.nsa_encoding)] = .{ |
| 656 | 656 | .index = @enumToInt(Feature.nsa_encoding), |
| 657 | 657 | .name = @tagName(Feature.nsa_encoding), |
| 658 | 658 | .llvm_name = "nsa-encoding", |
| 659 | 659 | .description = "Support NSA encoding for image instructions", |
| 660 | .dependencies = 0, | |
| 660 | .dependencies = featureSet(&[_]Feature{}), | |
| 661 | 661 | }; |
| 662 | 662 | result[@enumToInt(Feature.nsa_to_vmem_bug)] = .{ |
| 663 | 663 | .index = @enumToInt(Feature.nsa_to_vmem_bug), |
| 664 | 664 | .name = @tagName(Feature.nsa_to_vmem_bug), |
| 665 | 665 | .llvm_name = "nsa-to-vmem-bug", |
| 666 | 666 | .description = "MIMG-NSA followed by VMEM fail if EXEC_LO or EXEC_HI equals zero", |
| 667 | .dependencies = 0, | |
| 667 | .dependencies = featureSet(&[_]Feature{}), | |
| 668 | 668 | }; |
| 669 | 669 | result[@enumToInt(Feature.offset_3f_bug)] = .{ |
| 670 | 670 | .index = @enumToInt(Feature.offset_3f_bug), |
| 671 | 671 | .name = @tagName(Feature.offset_3f_bug), |
| 672 | 672 | .llvm_name = "offset-3f-bug", |
| 673 | 673 | .description = "Branch offset of 3f hardware bug", |
| 674 | .dependencies = 0, | |
| 674 | .dependencies = featureSet(&[_]Feature{}), | |
| 675 | 675 | }; |
| 676 | 676 | result[@enumToInt(Feature.pk_fmac_f16_inst)] = .{ |
| 677 | 677 | .index = @enumToInt(Feature.pk_fmac_f16_inst), |
| 678 | 678 | .name = @tagName(Feature.pk_fmac_f16_inst), |
| 679 | 679 | .llvm_name = "pk-fmac-f16-inst", |
| 680 | 680 | .description = "Has v_pk_fmac_f16 instruction", |
| 681 | .dependencies = 0, | |
| 681 | .dependencies = featureSet(&[_]Feature{}), | |
| 682 | 682 | }; |
| 683 | 683 | result[@enumToInt(Feature.promote_alloca)] = .{ |
| 684 | 684 | .index = @enumToInt(Feature.promote_alloca), |
| 685 | 685 | .name = @tagName(Feature.promote_alloca), |
| 686 | 686 | .llvm_name = "promote-alloca", |
| 687 | 687 | .description = "Enable promote alloca pass", |
| 688 | .dependencies = 0, | |
| 688 | .dependencies = featureSet(&[_]Feature{}), | |
| 689 | 689 | }; |
| 690 | 690 | result[@enumToInt(Feature.r128_a16)] = .{ |
| 691 | 691 | .index = @enumToInt(Feature.r128_a16), |
| 692 | 692 | .name = @tagName(Feature.r128_a16), |
| 693 | 693 | .llvm_name = "r128-a16", |
| 694 | 694 | .description = "Support 16 bit coordindates/gradients/lod/clamp/mip types on gfx9", |
| 695 | .dependencies = 0, | |
| 695 | .dependencies = featureSet(&[_]Feature{}), | |
| 696 | 696 | }; |
| 697 | 697 | result[@enumToInt(Feature.register_banking)] = .{ |
| 698 | 698 | .index = @enumToInt(Feature.register_banking), |
| 699 | 699 | .name = @tagName(Feature.register_banking), |
| 700 | 700 | .llvm_name = "register-banking", |
| 701 | 701 | .description = "Has register banking", |
| 702 | .dependencies = 0, | |
| 702 | .dependencies = featureSet(&[_]Feature{}), | |
| 703 | 703 | }; |
| 704 | 704 | result[@enumToInt(Feature.s_memrealtime)] = .{ |
| 705 | 705 | .index = @enumToInt(Feature.s_memrealtime), |
| 706 | 706 | .name = @tagName(Feature.s_memrealtime), |
| 707 | 707 | .llvm_name = "s-memrealtime", |
| 708 | 708 | .description = "Has s_memrealtime instruction", |
| 709 | .dependencies = 0, | |
| 709 | .dependencies = featureSet(&[_]Feature{}), | |
| 710 | 710 | }; |
| 711 | 711 | result[@enumToInt(Feature.scalar_atomics)] = .{ |
| 712 | 712 | .index = @enumToInt(Feature.scalar_atomics), |
| 713 | 713 | .name = @tagName(Feature.scalar_atomics), |
| 714 | 714 | .llvm_name = "scalar-atomics", |
| 715 | 715 | .description = "Has atomic scalar memory instructions", |
| 716 | .dependencies = 0, | |
| 716 | .dependencies = featureSet(&[_]Feature{}), | |
| 717 | 717 | }; |
| 718 | 718 | result[@enumToInt(Feature.scalar_flat_scratch_insts)] = .{ |
| 719 | 719 | .index = @enumToInt(Feature.scalar_flat_scratch_insts), |
| 720 | 720 | .name = @tagName(Feature.scalar_flat_scratch_insts), |
| 721 | 721 | .llvm_name = "scalar-flat-scratch-insts", |
| 722 | 722 | .description = "Have s_scratch_* flat memory instructions", |
| 723 | .dependencies = 0, | |
| 723 | .dependencies = featureSet(&[_]Feature{}), | |
| 724 | 724 | }; |
| 725 | 725 | result[@enumToInt(Feature.scalar_stores)] = .{ |
| 726 | 726 | .index = @enumToInt(Feature.scalar_stores), |
| 727 | 727 | .name = @tagName(Feature.scalar_stores), |
| 728 | 728 | .llvm_name = "scalar-stores", |
| 729 | 729 | .description = "Has store scalar memory instructions", |
| 730 | .dependencies = 0, | |
| 730 | .dependencies = featureSet(&[_]Feature{}), | |
| 731 | 731 | }; |
| 732 | 732 | result[@enumToInt(Feature.sdwa)] = .{ |
| 733 | 733 | .index = @enumToInt(Feature.sdwa), |
| 734 | 734 | .name = @tagName(Feature.sdwa), |
| 735 | 735 | .llvm_name = "sdwa", |
| 736 | 736 | .description = "Support SDWA (Sub-DWORD Addressing) extension", |
| 737 | .dependencies = 0, | |
| 737 | .dependencies = featureSet(&[_]Feature{}), | |
| 738 | 738 | }; |
| 739 | 739 | result[@enumToInt(Feature.sdwa_mav)] = .{ |
| 740 | 740 | .index = @enumToInt(Feature.sdwa_mav), |
| 741 | 741 | .name = @tagName(Feature.sdwa_mav), |
| 742 | 742 | .llvm_name = "sdwa-mav", |
| 743 | 743 | .description = "Support v_mac_f32/f16 with SDWA (Sub-DWORD Addressing) extension", |
| 744 | .dependencies = 0, | |
| 744 | .dependencies = featureSet(&[_]Feature{}), | |
| 745 | 745 | }; |
| 746 | 746 | result[@enumToInt(Feature.sdwa_omod)] = .{ |
| 747 | 747 | .index = @enumToInt(Feature.sdwa_omod), |
| 748 | 748 | .name = @tagName(Feature.sdwa_omod), |
| 749 | 749 | .llvm_name = "sdwa-omod", |
| 750 | 750 | .description = "Support OMod with SDWA (Sub-DWORD Addressing) extension", |
| 751 | .dependencies = 0, | |
| 751 | .dependencies = featureSet(&[_]Feature{}), | |
| 752 | 752 | }; |
| 753 | 753 | result[@enumToInt(Feature.sdwa_out_mods_vopc)] = .{ |
| 754 | 754 | .index = @enumToInt(Feature.sdwa_out_mods_vopc), |
| 755 | 755 | .name = @tagName(Feature.sdwa_out_mods_vopc), |
| 756 | 756 | .llvm_name = "sdwa-out-mods-vopc", |
| 757 | 757 | .description = "Support clamp for VOPC with SDWA (Sub-DWORD Addressing) extension", |
| 758 | .dependencies = 0, | |
| 758 | .dependencies = featureSet(&[_]Feature{}), | |
| 759 | 759 | }; |
| 760 | 760 | result[@enumToInt(Feature.sdwa_scalar)] = .{ |
| 761 | 761 | .index = @enumToInt(Feature.sdwa_scalar), |
| 762 | 762 | .name = @tagName(Feature.sdwa_scalar), |
| 763 | 763 | .llvm_name = "sdwa-scalar", |
| 764 | 764 | .description = "Support scalar register with SDWA (Sub-DWORD Addressing) extension", |
| 765 | .dependencies = 0, | |
| 765 | .dependencies = featureSet(&[_]Feature{}), | |
| 766 | 766 | }; |
| 767 | 767 | result[@enumToInt(Feature.sdwa_sdst)] = .{ |
| 768 | 768 | .index = @enumToInt(Feature.sdwa_sdst), |
| 769 | 769 | .name = @tagName(Feature.sdwa_sdst), |
| 770 | 770 | .llvm_name = "sdwa-sdst", |
| 771 | 771 | .description = "Support scalar dst for VOPC with SDWA (Sub-DWORD Addressing) extension", |
| 772 | .dependencies = 0, | |
| 772 | .dependencies = featureSet(&[_]Feature{}), | |
| 773 | 773 | }; |
| 774 | 774 | result[@enumToInt(Feature.sea_islands)] = .{ |
| 775 | 775 | .index = @enumToInt(Feature.sea_islands), |
| ... | ... | @@ -794,21 +794,21 @@ pub const all_features = blk: { |
| 794 | 794 | .name = @tagName(Feature.sgpr_init_bug), |
| 795 | 795 | .llvm_name = "sgpr-init-bug", |
| 796 | 796 | .description = "VI SGPR initialization bug requiring a fixed SGPR allocation size", |
| 797 | .dependencies = 0, | |
| 797 | .dependencies = featureSet(&[_]Feature{}), | |
| 798 | 798 | }; |
| 799 | 799 | result[@enumToInt(Feature.si_scheduler)] = .{ |
| 800 | 800 | .index = @enumToInt(Feature.si_scheduler), |
| 801 | 801 | .name = @tagName(Feature.si_scheduler), |
| 802 | 802 | .llvm_name = "si-scheduler", |
| 803 | 803 | .description = "Enable SI Machine Scheduler", |
| 804 | .dependencies = 0, | |
| 804 | .dependencies = featureSet(&[_]Feature{}), | |
| 805 | 805 | }; |
| 806 | 806 | result[@enumToInt(Feature.smem_to_vector_write_hazard)] = .{ |
| 807 | 807 | .index = @enumToInt(Feature.smem_to_vector_write_hazard), |
| 808 | 808 | .name = @tagName(Feature.smem_to_vector_write_hazard), |
| 809 | 809 | .llvm_name = "smem-to-vector-write-hazard", |
| 810 | 810 | .description = "s_load_dword followed by v_cmp page faults", |
| 811 | .dependencies = 0, | |
| 811 | .dependencies = featureSet(&[_]Feature{}), | |
| 812 | 812 | }; |
| 813 | 813 | result[@enumToInt(Feature.southern_islands)] = .{ |
| 814 | 814 | .index = @enumToInt(Feature.southern_islands), |
| ... | ... | @@ -832,77 +832,77 @@ pub const all_features = blk: { |
| 832 | 832 | .name = @tagName(Feature.sram_ecc), |
| 833 | 833 | .llvm_name = "sram-ecc", |
| 834 | 834 | .description = "Enable SRAM ECC", |
| 835 | .dependencies = 0, | |
| 835 | .dependencies = featureSet(&[_]Feature{}), | |
| 836 | 836 | }; |
| 837 | 837 | result[@enumToInt(Feature.trap_handler)] = .{ |
| 838 | 838 | .index = @enumToInt(Feature.trap_handler), |
| 839 | 839 | .name = @tagName(Feature.trap_handler), |
| 840 | 840 | .llvm_name = "trap-handler", |
| 841 | 841 | .description = "Trap handler support", |
| 842 | .dependencies = 0, | |
| 842 | .dependencies = featureSet(&[_]Feature{}), | |
| 843 | 843 | }; |
| 844 | 844 | result[@enumToInt(Feature.trig_reduced_range)] = .{ |
| 845 | 845 | .index = @enumToInt(Feature.trig_reduced_range), |
| 846 | 846 | .name = @tagName(Feature.trig_reduced_range), |
| 847 | 847 | .llvm_name = "trig-reduced-range", |
| 848 | 848 | .description = "Requires use of fract on arguments to trig instructions", |
| 849 | .dependencies = 0, | |
| 849 | .dependencies = featureSet(&[_]Feature{}), | |
| 850 | 850 | }; |
| 851 | 851 | result[@enumToInt(Feature.unaligned_buffer_access)] = .{ |
| 852 | 852 | .index = @enumToInt(Feature.unaligned_buffer_access), |
| 853 | 853 | .name = @tagName(Feature.unaligned_buffer_access), |
| 854 | 854 | .llvm_name = "unaligned-buffer-access", |
| 855 | 855 | .description = "Support unaligned global loads and stores", |
| 856 | .dependencies = 0, | |
| 856 | .dependencies = featureSet(&[_]Feature{}), | |
| 857 | 857 | }; |
| 858 | 858 | result[@enumToInt(Feature.unaligned_scratch_access)] = .{ |
| 859 | 859 | .index = @enumToInt(Feature.unaligned_scratch_access), |
| 860 | 860 | .name = @tagName(Feature.unaligned_scratch_access), |
| 861 | 861 | .llvm_name = "unaligned-scratch-access", |
| 862 | 862 | .description = "Support unaligned scratch loads and stores", |
| 863 | .dependencies = 0, | |
| 863 | .dependencies = featureSet(&[_]Feature{}), | |
| 864 | 864 | }; |
| 865 | 865 | result[@enumToInt(Feature.unpacked_d16_vmem)] = .{ |
| 866 | 866 | .index = @enumToInt(Feature.unpacked_d16_vmem), |
| 867 | 867 | .name = @tagName(Feature.unpacked_d16_vmem), |
| 868 | 868 | .llvm_name = "unpacked-d16-vmem", |
| 869 | 869 | .description = "Has unpacked d16 vmem instructions", |
| 870 | .dependencies = 0, | |
| 870 | .dependencies = featureSet(&[_]Feature{}), | |
| 871 | 871 | }; |
| 872 | 872 | result[@enumToInt(Feature.unsafe_ds_offset_folding)] = .{ |
| 873 | 873 | .index = @enumToInt(Feature.unsafe_ds_offset_folding), |
| 874 | 874 | .name = @tagName(Feature.unsafe_ds_offset_folding), |
| 875 | 875 | .llvm_name = "unsafe-ds-offset-folding", |
| 876 | 876 | .description = "Force using DS instruction immediate offsets on SI", |
| 877 | .dependencies = 0, | |
| 877 | .dependencies = featureSet(&[_]Feature{}), | |
| 878 | 878 | }; |
| 879 | 879 | result[@enumToInt(Feature.vcmpx_exec_war_hazard)] = .{ |
| 880 | 880 | .index = @enumToInt(Feature.vcmpx_exec_war_hazard), |
| 881 | 881 | .name = @tagName(Feature.vcmpx_exec_war_hazard), |
| 882 | 882 | .llvm_name = "vcmpx-exec-war-hazard", |
| 883 | 883 | .description = "V_CMPX WAR hazard on EXEC (V_CMPX issue ONLY)", |
| 884 | .dependencies = 0, | |
| 884 | .dependencies = featureSet(&[_]Feature{}), | |
| 885 | 885 | }; |
| 886 | 886 | result[@enumToInt(Feature.vcmpx_permlane_hazard)] = .{ |
| 887 | 887 | .index = @enumToInt(Feature.vcmpx_permlane_hazard), |
| 888 | 888 | .name = @tagName(Feature.vcmpx_permlane_hazard), |
| 889 | 889 | .llvm_name = "vcmpx-permlane-hazard", |
| 890 | 890 | .description = "TODO: describe me", |
| 891 | .dependencies = 0, | |
| 891 | .dependencies = featureSet(&[_]Feature{}), | |
| 892 | 892 | }; |
| 893 | 893 | result[@enumToInt(Feature.vgpr_index_mode)] = .{ |
| 894 | 894 | .index = @enumToInt(Feature.vgpr_index_mode), |
| 895 | 895 | .name = @tagName(Feature.vgpr_index_mode), |
| 896 | 896 | .llvm_name = "vgpr-index-mode", |
| 897 | 897 | .description = "Has VGPR mode register indexing", |
| 898 | .dependencies = 0, | |
| 898 | .dependencies = featureSet(&[_]Feature{}), | |
| 899 | 899 | }; |
| 900 | 900 | result[@enumToInt(Feature.vmem_to_scalar_write_hazard)] = .{ |
| 901 | 901 | .index = @enumToInt(Feature.vmem_to_scalar_write_hazard), |
| 902 | 902 | .name = @tagName(Feature.vmem_to_scalar_write_hazard), |
| 903 | 903 | .llvm_name = "vmem-to-scalar-write-hazard", |
| 904 | 904 | .description = "VMEM instruction followed by scalar writing to EXEC mask, M0 or SGPR leads to incorrect execution.", |
| 905 | .dependencies = 0, | |
| 905 | .dependencies = featureSet(&[_]Feature{}), | |
| 906 | 906 | }; |
| 907 | 907 | result[@enumToInt(Feature.volcanic_islands)] = .{ |
| 908 | 908 | .index = @enumToInt(Feature.volcanic_islands), |
| ... | ... | @@ -939,49 +939,49 @@ pub const all_features = blk: { |
| 939 | 939 | .name = @tagName(Feature.vop3_literal), |
| 940 | 940 | .llvm_name = "vop3-literal", |
| 941 | 941 | .description = "Can use one literal in VOP3", |
| 942 | .dependencies = 0, | |
| 942 | .dependencies = featureSet(&[_]Feature{}), | |
| 943 | 943 | }; |
| 944 | 944 | result[@enumToInt(Feature.vop3p)] = .{ |
| 945 | 945 | .index = @enumToInt(Feature.vop3p), |
| 946 | 946 | .name = @tagName(Feature.vop3p), |
| 947 | 947 | .llvm_name = "vop3p", |
| 948 | 948 | .description = "Has VOP3P packed instructions", |
| 949 | .dependencies = 0, | |
| 949 | .dependencies = featureSet(&[_]Feature{}), | |
| 950 | 950 | }; |
| 951 | 951 | result[@enumToInt(Feature.vscnt)] = .{ |
| 952 | 952 | .index = @enumToInt(Feature.vscnt), |
| 953 | 953 | .name = @tagName(Feature.vscnt), |
| 954 | 954 | .llvm_name = "vscnt", |
| 955 | 955 | .description = "Has separate store vscnt counter", |
| 956 | .dependencies = 0, | |
| 956 | .dependencies = featureSet(&[_]Feature{}), | |
| 957 | 957 | }; |
| 958 | 958 | result[@enumToInt(Feature.wavefrontsize16)] = .{ |
| 959 | 959 | .index = @enumToInt(Feature.wavefrontsize16), |
| 960 | 960 | .name = @tagName(Feature.wavefrontsize16), |
| 961 | 961 | .llvm_name = "wavefrontsize16", |
| 962 | 962 | .description = "The number of threads per wavefront", |
| 963 | .dependencies = 0, | |
| 963 | .dependencies = featureSet(&[_]Feature{}), | |
| 964 | 964 | }; |
| 965 | 965 | result[@enumToInt(Feature.wavefrontsize32)] = .{ |
| 966 | 966 | .index = @enumToInt(Feature.wavefrontsize32), |
| 967 | 967 | .name = @tagName(Feature.wavefrontsize32), |
| 968 | 968 | .llvm_name = "wavefrontsize32", |
| 969 | 969 | .description = "The number of threads per wavefront", |
| 970 | .dependencies = 0, | |
| 970 | .dependencies = featureSet(&[_]Feature{}), | |
| 971 | 971 | }; |
| 972 | 972 | result[@enumToInt(Feature.wavefrontsize64)] = .{ |
| 973 | 973 | .index = @enumToInt(Feature.wavefrontsize64), |
| 974 | 974 | .name = @tagName(Feature.wavefrontsize64), |
| 975 | 975 | .llvm_name = "wavefrontsize64", |
| 976 | 976 | .description = "The number of threads per wavefront", |
| 977 | .dependencies = 0, | |
| 977 | .dependencies = featureSet(&[_]Feature{}), | |
| 978 | 978 | }; |
| 979 | 979 | result[@enumToInt(Feature.xnack)] = .{ |
| 980 | 980 | .index = @enumToInt(Feature.xnack), |
| 981 | 981 | .name = @tagName(Feature.xnack), |
| 982 | 982 | .llvm_name = "xnack", |
| 983 | 983 | .description = "Enable XNACK support", |
| 984 | .dependencies = 0, | |
| 984 | .dependencies = featureSet(&[_]Feature{}), | |
| 985 | 985 | }; |
| 986 | 986 | break :blk result; |
| 987 | 987 | }; |
lib/std/target/arm.zig+98-98| ... | ... | @@ -182,147 +182,147 @@ pub usingnamespace Cpu.Feature.feature_set_fns(Feature); |
| 182 | 182 | |
| 183 | 183 | pub const all_features = blk: { |
| 184 | 184 | const len = @typeInfo(Feature).Enum.fields.len; |
| 185 | std.debug.assert(len <= @typeInfo(Cpu.Feature.Set).Int.bits); | |
| 185 | std.debug.assert(len <= Cpu.Feature.Set.bit_count); | |
| 186 | 186 | var result: [len]Cpu.Feature = undefined; |
| 187 | 187 | result[@enumToInt(Feature.@"32bit")] = .{ |
| 188 | 188 | .index = @enumToInt(Feature.@"32bit"), |
| 189 | 189 | .name = @tagName(Feature.@"32bit"), |
| 190 | 190 | .llvm_name = "32bit", |
| 191 | 191 | .description = "Prefer 32-bit Thumb instrs", |
| 192 | .dependencies = 0, | |
| 192 | .dependencies = featureSet(&[_]Feature{}), | |
| 193 | 193 | }; |
| 194 | 194 | result[@enumToInt(Feature.@"8msecext")] = .{ |
| 195 | 195 | .index = @enumToInt(Feature.@"8msecext"), |
| 196 | 196 | .name = @tagName(Feature.@"8msecext"), |
| 197 | 197 | .llvm_name = "8msecext", |
| 198 | 198 | .description = "Enable support for ARMv8-M Security Extensions", |
| 199 | .dependencies = 0, | |
| 199 | .dependencies = featureSet(&[_]Feature{}), | |
| 200 | 200 | }; |
| 201 | 201 | result[@enumToInt(Feature.a12)] = .{ |
| 202 | 202 | .index = @enumToInt(Feature.a12), |
| 203 | 203 | .name = @tagName(Feature.a12), |
| 204 | 204 | .llvm_name = "a12", |
| 205 | 205 | .description = "Cortex-A12 ARM processors", |
| 206 | .dependencies = 0, | |
| 206 | .dependencies = featureSet(&[_]Feature{}), | |
| 207 | 207 | }; |
| 208 | 208 | result[@enumToInt(Feature.a15)] = .{ |
| 209 | 209 | .index = @enumToInt(Feature.a15), |
| 210 | 210 | .name = @tagName(Feature.a15), |
| 211 | 211 | .llvm_name = "a15", |
| 212 | 212 | .description = "Cortex-A15 ARM processors", |
| 213 | .dependencies = 0, | |
| 213 | .dependencies = featureSet(&[_]Feature{}), | |
| 214 | 214 | }; |
| 215 | 215 | result[@enumToInt(Feature.a17)] = .{ |
| 216 | 216 | .index = @enumToInt(Feature.a17), |
| 217 | 217 | .name = @tagName(Feature.a17), |
| 218 | 218 | .llvm_name = "a17", |
| 219 | 219 | .description = "Cortex-A17 ARM processors", |
| 220 | .dependencies = 0, | |
| 220 | .dependencies = featureSet(&[_]Feature{}), | |
| 221 | 221 | }; |
| 222 | 222 | result[@enumToInt(Feature.a32)] = .{ |
| 223 | 223 | .index = @enumToInt(Feature.a32), |
| 224 | 224 | .name = @tagName(Feature.a32), |
| 225 | 225 | .llvm_name = "a32", |
| 226 | 226 | .description = "Cortex-A32 ARM processors", |
| 227 | .dependencies = 0, | |
| 227 | .dependencies = featureSet(&[_]Feature{}), | |
| 228 | 228 | }; |
| 229 | 229 | result[@enumToInt(Feature.a35)] = .{ |
| 230 | 230 | .index = @enumToInt(Feature.a35), |
| 231 | 231 | .name = @tagName(Feature.a35), |
| 232 | 232 | .llvm_name = "a35", |
| 233 | 233 | .description = "Cortex-A35 ARM processors", |
| 234 | .dependencies = 0, | |
| 234 | .dependencies = featureSet(&[_]Feature{}), | |
| 235 | 235 | }; |
| 236 | 236 | result[@enumToInt(Feature.a5)] = .{ |
| 237 | 237 | .index = @enumToInt(Feature.a5), |
| 238 | 238 | .name = @tagName(Feature.a5), |
| 239 | 239 | .llvm_name = "a5", |
| 240 | 240 | .description = "Cortex-A5 ARM processors", |
| 241 | .dependencies = 0, | |
| 241 | .dependencies = featureSet(&[_]Feature{}), | |
| 242 | 242 | }; |
| 243 | 243 | result[@enumToInt(Feature.a53)] = .{ |
| 244 | 244 | .index = @enumToInt(Feature.a53), |
| 245 | 245 | .name = @tagName(Feature.a53), |
| 246 | 246 | .llvm_name = "a53", |
| 247 | 247 | .description = "Cortex-A53 ARM processors", |
| 248 | .dependencies = 0, | |
| 248 | .dependencies = featureSet(&[_]Feature{}), | |
| 249 | 249 | }; |
| 250 | 250 | result[@enumToInt(Feature.a55)] = .{ |
| 251 | 251 | .index = @enumToInt(Feature.a55), |
| 252 | 252 | .name = @tagName(Feature.a55), |
| 253 | 253 | .llvm_name = "a55", |
| 254 | 254 | .description = "Cortex-A55 ARM processors", |
| 255 | .dependencies = 0, | |
| 255 | .dependencies = featureSet(&[_]Feature{}), | |
| 256 | 256 | }; |
| 257 | 257 | result[@enumToInt(Feature.a57)] = .{ |
| 258 | 258 | .index = @enumToInt(Feature.a57), |
| 259 | 259 | .name = @tagName(Feature.a57), |
| 260 | 260 | .llvm_name = "a57", |
| 261 | 261 | .description = "Cortex-A57 ARM processors", |
| 262 | .dependencies = 0, | |
| 262 | .dependencies = featureSet(&[_]Feature{}), | |
| 263 | 263 | }; |
| 264 | 264 | result[@enumToInt(Feature.a7)] = .{ |
| 265 | 265 | .index = @enumToInt(Feature.a7), |
| 266 | 266 | .name = @tagName(Feature.a7), |
| 267 | 267 | .llvm_name = "a7", |
| 268 | 268 | .description = "Cortex-A7 ARM processors", |
| 269 | .dependencies = 0, | |
| 269 | .dependencies = featureSet(&[_]Feature{}), | |
| 270 | 270 | }; |
| 271 | 271 | result[@enumToInt(Feature.a72)] = .{ |
| 272 | 272 | .index = @enumToInt(Feature.a72), |
| 273 | 273 | .name = @tagName(Feature.a72), |
| 274 | 274 | .llvm_name = "a72", |
| 275 | 275 | .description = "Cortex-A72 ARM processors", |
| 276 | .dependencies = 0, | |
| 276 | .dependencies = featureSet(&[_]Feature{}), | |
| 277 | 277 | }; |
| 278 | 278 | result[@enumToInt(Feature.a73)] = .{ |
| 279 | 279 | .index = @enumToInt(Feature.a73), |
| 280 | 280 | .name = @tagName(Feature.a73), |
| 281 | 281 | .llvm_name = "a73", |
| 282 | 282 | .description = "Cortex-A73 ARM processors", |
| 283 | .dependencies = 0, | |
| 283 | .dependencies = featureSet(&[_]Feature{}), | |
| 284 | 284 | }; |
| 285 | 285 | result[@enumToInt(Feature.a75)] = .{ |
| 286 | 286 | .index = @enumToInt(Feature.a75), |
| 287 | 287 | .name = @tagName(Feature.a75), |
| 288 | 288 | .llvm_name = "a75", |
| 289 | 289 | .description = "Cortex-A75 ARM processors", |
| 290 | .dependencies = 0, | |
| 290 | .dependencies = featureSet(&[_]Feature{}), | |
| 291 | 291 | }; |
| 292 | 292 | result[@enumToInt(Feature.a76)] = .{ |
| 293 | 293 | .index = @enumToInt(Feature.a76), |
| 294 | 294 | .name = @tagName(Feature.a76), |
| 295 | 295 | .llvm_name = "a76", |
| 296 | 296 | .description = "Cortex-A76 ARM processors", |
| 297 | .dependencies = 0, | |
| 297 | .dependencies = featureSet(&[_]Feature{}), | |
| 298 | 298 | }; |
| 299 | 299 | result[@enumToInt(Feature.a8)] = .{ |
| 300 | 300 | .index = @enumToInt(Feature.a8), |
| 301 | 301 | .name = @tagName(Feature.a8), |
| 302 | 302 | .llvm_name = "a8", |
| 303 | 303 | .description = "Cortex-A8 ARM processors", |
| 304 | .dependencies = 0, | |
| 304 | .dependencies = featureSet(&[_]Feature{}), | |
| 305 | 305 | }; |
| 306 | 306 | result[@enumToInt(Feature.a9)] = .{ |
| 307 | 307 | .index = @enumToInt(Feature.a9), |
| 308 | 308 | .name = @tagName(Feature.a9), |
| 309 | 309 | .llvm_name = "a9", |
| 310 | 310 | .description = "Cortex-A9 ARM processors", |
| 311 | .dependencies = 0, | |
| 311 | .dependencies = featureSet(&[_]Feature{}), | |
| 312 | 312 | }; |
| 313 | 313 | result[@enumToInt(Feature.aclass)] = .{ |
| 314 | 314 | .index = @enumToInt(Feature.aclass), |
| 315 | 315 | .name = @tagName(Feature.aclass), |
| 316 | 316 | .llvm_name = "aclass", |
| 317 | 317 | .description = "Is application profile ('A' series)", |
| 318 | .dependencies = 0, | |
| 318 | .dependencies = featureSet(&[_]Feature{}), | |
| 319 | 319 | }; |
| 320 | 320 | result[@enumToInt(Feature.acquire_release)] = .{ |
| 321 | 321 | .index = @enumToInt(Feature.acquire_release), |
| 322 | 322 | .name = @tagName(Feature.acquire_release), |
| 323 | 323 | .llvm_name = "acquire-release", |
| 324 | 324 | .description = "Has v8 acquire/release (lda/ldaex etc) instructions", |
| 325 | .dependencies = 0, | |
| 325 | .dependencies = featureSet(&[_]Feature{}), | |
| 326 | 326 | }; |
| 327 | 327 | result[@enumToInt(Feature.aes)] = .{ |
| 328 | 328 | .index = @enumToInt(Feature.aes), |
| ... | ... | @@ -338,35 +338,35 @@ pub const all_features = blk: { |
| 338 | 338 | .name = @tagName(Feature.armv2), |
| 339 | 339 | .llvm_name = "armv2", |
| 340 | 340 | .description = "ARMv2 architecture", |
| 341 | .dependencies = 0, | |
| 341 | .dependencies = featureSet(&[_]Feature{}), | |
| 342 | 342 | }; |
| 343 | 343 | result[@enumToInt(Feature.armv2a)] = .{ |
| 344 | 344 | .index = @enumToInt(Feature.armv2a), |
| 345 | 345 | .name = @tagName(Feature.armv2a), |
| 346 | 346 | .llvm_name = "armv2a", |
| 347 | 347 | .description = "ARMv2a architecture", |
| 348 | .dependencies = 0, | |
| 348 | .dependencies = featureSet(&[_]Feature{}), | |
| 349 | 349 | }; |
| 350 | 350 | result[@enumToInt(Feature.armv3)] = .{ |
| 351 | 351 | .index = @enumToInt(Feature.armv3), |
| 352 | 352 | .name = @tagName(Feature.armv3), |
| 353 | 353 | .llvm_name = "armv3", |
| 354 | 354 | .description = "ARMv3 architecture", |
| 355 | .dependencies = 0, | |
| 355 | .dependencies = featureSet(&[_]Feature{}), | |
| 356 | 356 | }; |
| 357 | 357 | result[@enumToInt(Feature.armv3m)] = .{ |
| 358 | 358 | .index = @enumToInt(Feature.armv3m), |
| 359 | 359 | .name = @tagName(Feature.armv3m), |
| 360 | 360 | .llvm_name = "armv3m", |
| 361 | 361 | .description = "ARMv3m architecture", |
| 362 | .dependencies = 0, | |
| 362 | .dependencies = featureSet(&[_]Feature{}), | |
| 363 | 363 | }; |
| 364 | 364 | result[@enumToInt(Feature.armv4)] = .{ |
| 365 | 365 | .index = @enumToInt(Feature.armv4), |
| 366 | 366 | .name = @tagName(Feature.armv4), |
| 367 | 367 | .llvm_name = "armv4", |
| 368 | 368 | .description = "ARMv4 architecture", |
| 369 | .dependencies = 0, | |
| 369 | .dependencies = featureSet(&[_]Feature{}), | |
| 370 | 370 | }; |
| 371 | 371 | result[@enumToInt(Feature.armv4t)] = .{ |
| 372 | 372 | .index = @enumToInt(Feature.armv4t), |
| ... | ... | @@ -766,28 +766,28 @@ pub const all_features = blk: { |
| 766 | 766 | .name = @tagName(Feature.avoid_movs_shop), |
| 767 | 767 | .llvm_name = "avoid-movs-shop", |
| 768 | 768 | .description = "Avoid movs instructions with shifter operand", |
| 769 | .dependencies = 0, | |
| 769 | .dependencies = featureSet(&[_]Feature{}), | |
| 770 | 770 | }; |
| 771 | 771 | result[@enumToInt(Feature.avoid_partial_cpsr)] = .{ |
| 772 | 772 | .index = @enumToInt(Feature.avoid_partial_cpsr), |
| 773 | 773 | .name = @tagName(Feature.avoid_partial_cpsr), |
| 774 | 774 | .llvm_name = "avoid-partial-cpsr", |
| 775 | 775 | .description = "Avoid CPSR partial update for OOO execution", |
| 776 | .dependencies = 0, | |
| 776 | .dependencies = featureSet(&[_]Feature{}), | |
| 777 | 777 | }; |
| 778 | 778 | result[@enumToInt(Feature.cheap_predicable_cpsr)] = .{ |
| 779 | 779 | .index = @enumToInt(Feature.cheap_predicable_cpsr), |
| 780 | 780 | .name = @tagName(Feature.cheap_predicable_cpsr), |
| 781 | 781 | .llvm_name = "cheap-predicable-cpsr", |
| 782 | 782 | .description = "Disable +1 predication cost for instructions updating CPSR", |
| 783 | .dependencies = 0, | |
| 783 | .dependencies = featureSet(&[_]Feature{}), | |
| 784 | 784 | }; |
| 785 | 785 | result[@enumToInt(Feature.crc)] = .{ |
| 786 | 786 | .index = @enumToInt(Feature.crc), |
| 787 | 787 | .name = @tagName(Feature.crc), |
| 788 | 788 | .llvm_name = "crc", |
| 789 | 789 | .description = "Enable support for CRC instructions", |
| 790 | .dependencies = 0, | |
| 790 | .dependencies = featureSet(&[_]Feature{}), | |
| 791 | 791 | }; |
| 792 | 792 | result[@enumToInt(Feature.crypto)] = .{ |
| 793 | 793 | .index = @enumToInt(Feature.crypto), |
| ... | ... | @@ -805,35 +805,35 @@ pub const all_features = blk: { |
| 805 | 805 | .name = @tagName(Feature.d32), |
| 806 | 806 | .llvm_name = "d32", |
| 807 | 807 | .description = "Extend FP to 32 double registers", |
| 808 | .dependencies = 0, | |
| 808 | .dependencies = featureSet(&[_]Feature{}), | |
| 809 | 809 | }; |
| 810 | 810 | result[@enumToInt(Feature.db)] = .{ |
| 811 | 811 | .index = @enumToInt(Feature.db), |
| 812 | 812 | .name = @tagName(Feature.db), |
| 813 | 813 | .llvm_name = "db", |
| 814 | 814 | .description = "Has data barrier (dmb/dsb) instructions", |
| 815 | .dependencies = 0, | |
| 815 | .dependencies = featureSet(&[_]Feature{}), | |
| 816 | 816 | }; |
| 817 | 817 | result[@enumToInt(Feature.dfb)] = .{ |
| 818 | 818 | .index = @enumToInt(Feature.dfb), |
| 819 | 819 | .name = @tagName(Feature.dfb), |
| 820 | 820 | .llvm_name = "dfb", |
| 821 | 821 | .description = "Has full data barrier (dfb) instruction", |
| 822 | .dependencies = 0, | |
| 822 | .dependencies = featureSet(&[_]Feature{}), | |
| 823 | 823 | }; |
| 824 | 824 | result[@enumToInt(Feature.disable_postra_scheduler)] = .{ |
| 825 | 825 | .index = @enumToInt(Feature.disable_postra_scheduler), |
| 826 | 826 | .name = @tagName(Feature.disable_postra_scheduler), |
| 827 | 827 | .llvm_name = "disable-postra-scheduler", |
| 828 | 828 | .description = "Don't schedule again after register allocation", |
| 829 | .dependencies = 0, | |
| 829 | .dependencies = featureSet(&[_]Feature{}), | |
| 830 | 830 | }; |
| 831 | 831 | result[@enumToInt(Feature.dont_widen_vmovs)] = .{ |
| 832 | 832 | .index = @enumToInt(Feature.dont_widen_vmovs), |
| 833 | 833 | .name = @tagName(Feature.dont_widen_vmovs), |
| 834 | 834 | .llvm_name = "dont-widen-vmovs", |
| 835 | 835 | .description = "Don't widen VMOVS to VMOVD", |
| 836 | .dependencies = 0, | |
| 836 | .dependencies = featureSet(&[_]Feature{}), | |
| 837 | 837 | }; |
| 838 | 838 | result[@enumToInt(Feature.dotprod)] = .{ |
| 839 | 839 | .index = @enumToInt(Feature.dotprod), |
| ... | ... | @@ -849,21 +849,21 @@ pub const all_features = blk: { |
| 849 | 849 | .name = @tagName(Feature.dsp), |
| 850 | 850 | .llvm_name = "dsp", |
| 851 | 851 | .description = "Supports DSP instructions in ARM and/or Thumb2", |
| 852 | .dependencies = 0, | |
| 852 | .dependencies = featureSet(&[_]Feature{}), | |
| 853 | 853 | }; |
| 854 | 854 | result[@enumToInt(Feature.execute_only)] = .{ |
| 855 | 855 | .index = @enumToInt(Feature.execute_only), |
| 856 | 856 | .name = @tagName(Feature.execute_only), |
| 857 | 857 | .llvm_name = "execute-only", |
| 858 | 858 | .description = "Enable the generation of execute only code.", |
| 859 | .dependencies = 0, | |
| 859 | .dependencies = featureSet(&[_]Feature{}), | |
| 860 | 860 | }; |
| 861 | 861 | result[@enumToInt(Feature.expand_fp_mlx)] = .{ |
| 862 | 862 | .index = @enumToInt(Feature.expand_fp_mlx), |
| 863 | 863 | .name = @tagName(Feature.expand_fp_mlx), |
| 864 | 864 | .llvm_name = "expand-fp-mlx", |
| 865 | 865 | .description = "Expand VFP/NEON MLA/MLS instructions", |
| 866 | .dependencies = 0, | |
| 866 | .dependencies = featureSet(&[_]Feature{}), | |
| 867 | 867 | }; |
| 868 | 868 | result[@enumToInt(Feature.exynos)] = .{ |
| 869 | 869 | .index = @enumToInt(Feature.exynos), |
| ... | ... | @@ -937,7 +937,7 @@ pub const all_features = blk: { |
| 937 | 937 | .name = @tagName(Feature.fp16), |
| 938 | 938 | .llvm_name = "fp16", |
| 939 | 939 | .description = "Enable half-precision floating point", |
| 940 | .dependencies = 0, | |
| 940 | .dependencies = featureSet(&[_]Feature{}), | |
| 941 | 941 | }; |
| 942 | 942 | result[@enumToInt(Feature.fp16fml)] = .{ |
| 943 | 943 | .index = @enumToInt(Feature.fp16fml), |
| ... | ... | @@ -962,14 +962,14 @@ pub const all_features = blk: { |
| 962 | 962 | .name = @tagName(Feature.fpao), |
| 963 | 963 | .llvm_name = "fpao", |
| 964 | 964 | .description = "Enable fast computation of positive address offsets", |
| 965 | .dependencies = 0, | |
| 965 | .dependencies = featureSet(&[_]Feature{}), | |
| 966 | 966 | }; |
| 967 | 967 | result[@enumToInt(Feature.fpregs)] = .{ |
| 968 | 968 | .index = @enumToInt(Feature.fpregs), |
| 969 | 969 | .name = @tagName(Feature.fpregs), |
| 970 | 970 | .llvm_name = "fpregs", |
| 971 | 971 | .description = "Enable FP registers", |
| 972 | .dependencies = 0, | |
| 972 | .dependencies = featureSet(&[_]Feature{}), | |
| 973 | 973 | }; |
| 974 | 974 | result[@enumToInt(Feature.fpregs16)] = .{ |
| 975 | 975 | .index = @enumToInt(Feature.fpregs16), |
| ... | ... | @@ -1004,28 +1004,28 @@ pub const all_features = blk: { |
| 1004 | 1004 | .name = @tagName(Feature.fuse_aes), |
| 1005 | 1005 | .llvm_name = "fuse-aes", |
| 1006 | 1006 | .description = "CPU fuses AES crypto operations", |
| 1007 | .dependencies = 0, | |
| 1007 | .dependencies = featureSet(&[_]Feature{}), | |
| 1008 | 1008 | }; |
| 1009 | 1009 | result[@enumToInt(Feature.fuse_literals)] = .{ |
| 1010 | 1010 | .index = @enumToInt(Feature.fuse_literals), |
| 1011 | 1011 | .name = @tagName(Feature.fuse_literals), |
| 1012 | 1012 | .llvm_name = "fuse-literals", |
| 1013 | 1013 | .description = "CPU fuses literal generation operations", |
| 1014 | .dependencies = 0, | |
| 1014 | .dependencies = featureSet(&[_]Feature{}), | |
| 1015 | 1015 | }; |
| 1016 | 1016 | result[@enumToInt(Feature.hwdiv)] = .{ |
| 1017 | 1017 | .index = @enumToInt(Feature.hwdiv), |
| 1018 | 1018 | .name = @tagName(Feature.hwdiv), |
| 1019 | 1019 | .llvm_name = "hwdiv", |
| 1020 | 1020 | .description = "Enable divide instructions in Thumb", |
| 1021 | .dependencies = 0, | |
| 1021 | .dependencies = featureSet(&[_]Feature{}), | |
| 1022 | 1022 | }; |
| 1023 | 1023 | result[@enumToInt(Feature.hwdiv_arm)] = .{ |
| 1024 | 1024 | .index = @enumToInt(Feature.hwdiv_arm), |
| 1025 | 1025 | .name = @tagName(Feature.hwdiv_arm), |
| 1026 | 1026 | .llvm_name = "hwdiv-arm", |
| 1027 | 1027 | .description = "Enable divide instructions in ARM mode", |
| 1028 | .dependencies = 0, | |
| 1028 | .dependencies = featureSet(&[_]Feature{}), | |
| 1029 | 1029 | }; |
| 1030 | 1030 | result[@enumToInt(Feature.iwmmxt)] = .{ |
| 1031 | 1031 | .index = @enumToInt(Feature.iwmmxt), |
| ... | ... | @@ -1050,63 +1050,63 @@ pub const all_features = blk: { |
| 1050 | 1050 | .name = @tagName(Feature.krait), |
| 1051 | 1051 | .llvm_name = "krait", |
| 1052 | 1052 | .description = "Qualcomm Krait processors", |
| 1053 | .dependencies = 0, | |
| 1053 | .dependencies = featureSet(&[_]Feature{}), | |
| 1054 | 1054 | }; |
| 1055 | 1055 | result[@enumToInt(Feature.kryo)] = .{ |
| 1056 | 1056 | .index = @enumToInt(Feature.kryo), |
| 1057 | 1057 | .name = @tagName(Feature.kryo), |
| 1058 | 1058 | .llvm_name = "kryo", |
| 1059 | 1059 | .description = "Qualcomm Kryo processors", |
| 1060 | .dependencies = 0, | |
| 1060 | .dependencies = featureSet(&[_]Feature{}), | |
| 1061 | 1061 | }; |
| 1062 | 1062 | result[@enumToInt(Feature.lob)] = .{ |
| 1063 | 1063 | .index = @enumToInt(Feature.lob), |
| 1064 | 1064 | .name = @tagName(Feature.lob), |
| 1065 | 1065 | .llvm_name = "lob", |
| 1066 | 1066 | .description = "Enable Low Overhead Branch extensions", |
| 1067 | .dependencies = 0, | |
| 1067 | .dependencies = featureSet(&[_]Feature{}), | |
| 1068 | 1068 | }; |
| 1069 | 1069 | result[@enumToInt(Feature.long_calls)] = .{ |
| 1070 | 1070 | .index = @enumToInt(Feature.long_calls), |
| 1071 | 1071 | .name = @tagName(Feature.long_calls), |
| 1072 | 1072 | .llvm_name = "long-calls", |
| 1073 | 1073 | .description = "Generate calls via indirect call instructions", |
| 1074 | .dependencies = 0, | |
| 1074 | .dependencies = featureSet(&[_]Feature{}), | |
| 1075 | 1075 | }; |
| 1076 | 1076 | result[@enumToInt(Feature.loop_align)] = .{ |
| 1077 | 1077 | .index = @enumToInt(Feature.loop_align), |
| 1078 | 1078 | .name = @tagName(Feature.loop_align), |
| 1079 | 1079 | .llvm_name = "loop-align", |
| 1080 | 1080 | .description = "Prefer 32-bit alignment for loops", |
| 1081 | .dependencies = 0, | |
| 1081 | .dependencies = featureSet(&[_]Feature{}), | |
| 1082 | 1082 | }; |
| 1083 | 1083 | result[@enumToInt(Feature.m3)] = .{ |
| 1084 | 1084 | .index = @enumToInt(Feature.m3), |
| 1085 | 1085 | .name = @tagName(Feature.m3), |
| 1086 | 1086 | .llvm_name = "m3", |
| 1087 | 1087 | .description = "Cortex-M3 ARM processors", |
| 1088 | .dependencies = 0, | |
| 1088 | .dependencies = featureSet(&[_]Feature{}), | |
| 1089 | 1089 | }; |
| 1090 | 1090 | result[@enumToInt(Feature.mclass)] = .{ |
| 1091 | 1091 | .index = @enumToInt(Feature.mclass), |
| 1092 | 1092 | .name = @tagName(Feature.mclass), |
| 1093 | 1093 | .llvm_name = "mclass", |
| 1094 | 1094 | .description = "Is microcontroller profile ('M' series)", |
| 1095 | .dependencies = 0, | |
| 1095 | .dependencies = featureSet(&[_]Feature{}), | |
| 1096 | 1096 | }; |
| 1097 | 1097 | result[@enumToInt(Feature.mp)] = .{ |
| 1098 | 1098 | .index = @enumToInt(Feature.mp), |
| 1099 | 1099 | .name = @tagName(Feature.mp), |
| 1100 | 1100 | .llvm_name = "mp", |
| 1101 | 1101 | .description = "Supports Multiprocessing extension", |
| 1102 | .dependencies = 0, | |
| 1102 | .dependencies = featureSet(&[_]Feature{}), | |
| 1103 | 1103 | }; |
| 1104 | 1104 | result[@enumToInt(Feature.muxed_units)] = .{ |
| 1105 | 1105 | .index = @enumToInt(Feature.muxed_units), |
| 1106 | 1106 | .name = @tagName(Feature.muxed_units), |
| 1107 | 1107 | .llvm_name = "muxed-units", |
| 1108 | 1108 | .description = "Has muxed AGU and NEON/FPU", |
| 1109 | .dependencies = 0, | |
| 1109 | .dependencies = featureSet(&[_]Feature{}), | |
| 1110 | 1110 | }; |
| 1111 | 1111 | result[@enumToInt(Feature.mve)] = .{ |
| 1112 | 1112 | .index = @enumToInt(Feature.mve), |
| ... | ... | @@ -1136,7 +1136,7 @@ pub const all_features = blk: { |
| 1136 | 1136 | .name = @tagName(Feature.nacl_trap), |
| 1137 | 1137 | .llvm_name = "nacl-trap", |
| 1138 | 1138 | .description = "NaCl trap", |
| 1139 | .dependencies = 0, | |
| 1139 | .dependencies = featureSet(&[_]Feature{}), | |
| 1140 | 1140 | }; |
| 1141 | 1141 | result[@enumToInt(Feature.neon)] = .{ |
| 1142 | 1142 | .index = @enumToInt(Feature.neon), |
| ... | ... | @@ -1152,147 +1152,147 @@ pub const all_features = blk: { |
| 1152 | 1152 | .name = @tagName(Feature.neon_fpmovs), |
| 1153 | 1153 | .llvm_name = "neon-fpmovs", |
| 1154 | 1154 | .description = "Convert VMOVSR, VMOVRS, VMOVS to NEON", |
| 1155 | .dependencies = 0, | |
| 1155 | .dependencies = featureSet(&[_]Feature{}), | |
| 1156 | 1156 | }; |
| 1157 | 1157 | result[@enumToInt(Feature.neonfp)] = .{ |
| 1158 | 1158 | .index = @enumToInt(Feature.neonfp), |
| 1159 | 1159 | .name = @tagName(Feature.neonfp), |
| 1160 | 1160 | .llvm_name = "neonfp", |
| 1161 | 1161 | .description = "Use NEON for single precision FP", |
| 1162 | .dependencies = 0, | |
| 1162 | .dependencies = featureSet(&[_]Feature{}), | |
| 1163 | 1163 | }; |
| 1164 | 1164 | result[@enumToInt(Feature.no_branch_predictor)] = .{ |
| 1165 | 1165 | .index = @enumToInt(Feature.no_branch_predictor), |
| 1166 | 1166 | .name = @tagName(Feature.no_branch_predictor), |
| 1167 | 1167 | .llvm_name = "no-branch-predictor", |
| 1168 | 1168 | .description = "Has no branch predictor", |
| 1169 | .dependencies = 0, | |
| 1169 | .dependencies = featureSet(&[_]Feature{}), | |
| 1170 | 1170 | }; |
| 1171 | 1171 | result[@enumToInt(Feature.no_movt)] = .{ |
| 1172 | 1172 | .index = @enumToInt(Feature.no_movt), |
| 1173 | 1173 | .name = @tagName(Feature.no_movt), |
| 1174 | 1174 | .llvm_name = "no-movt", |
| 1175 | 1175 | .description = "Don't use movt/movw pairs for 32-bit imms", |
| 1176 | .dependencies = 0, | |
| 1176 | .dependencies = featureSet(&[_]Feature{}), | |
| 1177 | 1177 | }; |
| 1178 | 1178 | result[@enumToInt(Feature.no_neg_immediates)] = .{ |
| 1179 | 1179 | .index = @enumToInt(Feature.no_neg_immediates), |
| 1180 | 1180 | .name = @tagName(Feature.no_neg_immediates), |
| 1181 | 1181 | .llvm_name = "no-neg-immediates", |
| 1182 | 1182 | .description = "Convert immediates and instructions to their negated or complemented equivalent when the immediate does not fit in the encoding.", |
| 1183 | .dependencies = 0, | |
| 1183 | .dependencies = featureSet(&[_]Feature{}), | |
| 1184 | 1184 | }; |
| 1185 | 1185 | result[@enumToInt(Feature.noarm)] = .{ |
| 1186 | 1186 | .index = @enumToInt(Feature.noarm), |
| 1187 | 1187 | .name = @tagName(Feature.noarm), |
| 1188 | 1188 | .llvm_name = "noarm", |
| 1189 | 1189 | .description = "Does not support ARM mode execution", |
| 1190 | .dependencies = 0, | |
| 1190 | .dependencies = featureSet(&[_]Feature{}), | |
| 1191 | 1191 | }; |
| 1192 | 1192 | result[@enumToInt(Feature.nonpipelined_vfp)] = .{ |
| 1193 | 1193 | .index = @enumToInt(Feature.nonpipelined_vfp), |
| 1194 | 1194 | .name = @tagName(Feature.nonpipelined_vfp), |
| 1195 | 1195 | .llvm_name = "nonpipelined-vfp", |
| 1196 | 1196 | .description = "VFP instructions are not pipelined", |
| 1197 | .dependencies = 0, | |
| 1197 | .dependencies = featureSet(&[_]Feature{}), | |
| 1198 | 1198 | }; |
| 1199 | 1199 | result[@enumToInt(Feature.perfmon)] = .{ |
| 1200 | 1200 | .index = @enumToInt(Feature.perfmon), |
| 1201 | 1201 | .name = @tagName(Feature.perfmon), |
| 1202 | 1202 | .llvm_name = "perfmon", |
| 1203 | 1203 | .description = "Enable support for Performance Monitor extensions", |
| 1204 | .dependencies = 0, | |
| 1204 | .dependencies = featureSet(&[_]Feature{}), | |
| 1205 | 1205 | }; |
| 1206 | 1206 | result[@enumToInt(Feature.prefer_ishst)] = .{ |
| 1207 | 1207 | .index = @enumToInt(Feature.prefer_ishst), |
| 1208 | 1208 | .name = @tagName(Feature.prefer_ishst), |
| 1209 | 1209 | .llvm_name = "prefer-ishst", |
| 1210 | 1210 | .description = "Prefer ISHST barriers", |
| 1211 | .dependencies = 0, | |
| 1211 | .dependencies = featureSet(&[_]Feature{}), | |
| 1212 | 1212 | }; |
| 1213 | 1213 | result[@enumToInt(Feature.prefer_vmovsr)] = .{ |
| 1214 | 1214 | .index = @enumToInt(Feature.prefer_vmovsr), |
| 1215 | 1215 | .name = @tagName(Feature.prefer_vmovsr), |
| 1216 | 1216 | .llvm_name = "prefer-vmovsr", |
| 1217 | 1217 | .description = "Prefer VMOVSR", |
| 1218 | .dependencies = 0, | |
| 1218 | .dependencies = featureSet(&[_]Feature{}), | |
| 1219 | 1219 | }; |
| 1220 | 1220 | result[@enumToInt(Feature.prof_unpr)] = .{ |
| 1221 | 1221 | .index = @enumToInt(Feature.prof_unpr), |
| 1222 | 1222 | .name = @tagName(Feature.prof_unpr), |
| 1223 | 1223 | .llvm_name = "prof-unpr", |
| 1224 | 1224 | .description = "Is profitable to unpredicate", |
| 1225 | .dependencies = 0, | |
| 1225 | .dependencies = featureSet(&[_]Feature{}), | |
| 1226 | 1226 | }; |
| 1227 | 1227 | result[@enumToInt(Feature.r4)] = .{ |
| 1228 | 1228 | .index = @enumToInt(Feature.r4), |
| 1229 | 1229 | .name = @tagName(Feature.r4), |
| 1230 | 1230 | .llvm_name = "r4", |
| 1231 | 1231 | .description = "Cortex-R4 ARM processors", |
| 1232 | .dependencies = 0, | |
| 1232 | .dependencies = featureSet(&[_]Feature{}), | |
| 1233 | 1233 | }; |
| 1234 | 1234 | result[@enumToInt(Feature.r5)] = .{ |
| 1235 | 1235 | .index = @enumToInt(Feature.r5), |
| 1236 | 1236 | .name = @tagName(Feature.r5), |
| 1237 | 1237 | .llvm_name = "r5", |
| 1238 | 1238 | .description = "Cortex-R5 ARM processors", |
| 1239 | .dependencies = 0, | |
| 1239 | .dependencies = featureSet(&[_]Feature{}), | |
| 1240 | 1240 | }; |
| 1241 | 1241 | result[@enumToInt(Feature.r52)] = .{ |
| 1242 | 1242 | .index = @enumToInt(Feature.r52), |
| 1243 | 1243 | .name = @tagName(Feature.r52), |
| 1244 | 1244 | .llvm_name = "r52", |
| 1245 | 1245 | .description = "Cortex-R52 ARM processors", |
| 1246 | .dependencies = 0, | |
| 1246 | .dependencies = featureSet(&[_]Feature{}), | |
| 1247 | 1247 | }; |
| 1248 | 1248 | result[@enumToInt(Feature.r7)] = .{ |
| 1249 | 1249 | .index = @enumToInt(Feature.r7), |
| 1250 | 1250 | .name = @tagName(Feature.r7), |
| 1251 | 1251 | .llvm_name = "r7", |
| 1252 | 1252 | .description = "Cortex-R7 ARM processors", |
| 1253 | .dependencies = 0, | |
| 1253 | .dependencies = featureSet(&[_]Feature{}), | |
| 1254 | 1254 | }; |
| 1255 | 1255 | result[@enumToInt(Feature.ras)] = .{ |
| 1256 | 1256 | .index = @enumToInt(Feature.ras), |
| 1257 | 1257 | .name = @tagName(Feature.ras), |
| 1258 | 1258 | .llvm_name = "ras", |
| 1259 | 1259 | .description = "Enable Reliability, Availability and Serviceability extensions", |
| 1260 | .dependencies = 0, | |
| 1260 | .dependencies = featureSet(&[_]Feature{}), | |
| 1261 | 1261 | }; |
| 1262 | 1262 | result[@enumToInt(Feature.rclass)] = .{ |
| 1263 | 1263 | .index = @enumToInt(Feature.rclass), |
| 1264 | 1264 | .name = @tagName(Feature.rclass), |
| 1265 | 1265 | .llvm_name = "rclass", |
| 1266 | 1266 | .description = "Is realtime profile ('R' series)", |
| 1267 | .dependencies = 0, | |
| 1267 | .dependencies = featureSet(&[_]Feature{}), | |
| 1268 | 1268 | }; |
| 1269 | 1269 | result[@enumToInt(Feature.read_tp_hard)] = .{ |
| 1270 | 1270 | .index = @enumToInt(Feature.read_tp_hard), |
| 1271 | 1271 | .name = @tagName(Feature.read_tp_hard), |
| 1272 | 1272 | .llvm_name = "read-tp-hard", |
| 1273 | 1273 | .description = "Reading thread pointer from register", |
| 1274 | .dependencies = 0, | |
| 1274 | .dependencies = featureSet(&[_]Feature{}), | |
| 1275 | 1275 | }; |
| 1276 | 1276 | result[@enumToInt(Feature.reserve_r9)] = .{ |
| 1277 | 1277 | .index = @enumToInt(Feature.reserve_r9), |
| 1278 | 1278 | .name = @tagName(Feature.reserve_r9), |
| 1279 | 1279 | .llvm_name = "reserve-r9", |
| 1280 | 1280 | .description = "Reserve R9, making it unavailable as GPR", |
| 1281 | .dependencies = 0, | |
| 1281 | .dependencies = featureSet(&[_]Feature{}), | |
| 1282 | 1282 | }; |
| 1283 | 1283 | result[@enumToInt(Feature.ret_addr_stack)] = .{ |
| 1284 | 1284 | .index = @enumToInt(Feature.ret_addr_stack), |
| 1285 | 1285 | .name = @tagName(Feature.ret_addr_stack), |
| 1286 | 1286 | .llvm_name = "ret-addr-stack", |
| 1287 | 1287 | .description = "Has return address stack", |
| 1288 | .dependencies = 0, | |
| 1288 | .dependencies = featureSet(&[_]Feature{}), | |
| 1289 | 1289 | }; |
| 1290 | 1290 | result[@enumToInt(Feature.sb)] = .{ |
| 1291 | 1291 | .index = @enumToInt(Feature.sb), |
| 1292 | 1292 | .name = @tagName(Feature.sb), |
| 1293 | 1293 | .llvm_name = "sb", |
| 1294 | 1294 | .description = "Enable v8.5a Speculation Barrier", |
| 1295 | .dependencies = 0, | |
| 1295 | .dependencies = featureSet(&[_]Feature{}), | |
| 1296 | 1296 | }; |
| 1297 | 1297 | result[@enumToInt(Feature.sha2)] = .{ |
| 1298 | 1298 | .index = @enumToInt(Feature.sha2), |
| ... | ... | @@ -1308,49 +1308,49 @@ pub const all_features = blk: { |
| 1308 | 1308 | .name = @tagName(Feature.slow_fp_brcc), |
| 1309 | 1309 | .llvm_name = "slow-fp-brcc", |
| 1310 | 1310 | .description = "FP compare + branch is slow", |
| 1311 | .dependencies = 0, | |
| 1311 | .dependencies = featureSet(&[_]Feature{}), | |
| 1312 | 1312 | }; |
| 1313 | 1313 | result[@enumToInt(Feature.slow_load_D_subreg)] = .{ |
| 1314 | 1314 | .index = @enumToInt(Feature.slow_load_D_subreg), |
| 1315 | 1315 | .name = @tagName(Feature.slow_load_D_subreg), |
| 1316 | 1316 | .llvm_name = "slow-load-D-subreg", |
| 1317 | 1317 | .description = "Loading into D subregs is slow", |
| 1318 | .dependencies = 0, | |
| 1318 | .dependencies = featureSet(&[_]Feature{}), | |
| 1319 | 1319 | }; |
| 1320 | 1320 | result[@enumToInt(Feature.slow_odd_reg)] = .{ |
| 1321 | 1321 | .index = @enumToInt(Feature.slow_odd_reg), |
| 1322 | 1322 | .name = @tagName(Feature.slow_odd_reg), |
| 1323 | 1323 | .llvm_name = "slow-odd-reg", |
| 1324 | 1324 | .description = "VLDM/VSTM starting with an odd register is slow", |
| 1325 | .dependencies = 0, | |
| 1325 | .dependencies = featureSet(&[_]Feature{}), | |
| 1326 | 1326 | }; |
| 1327 | 1327 | result[@enumToInt(Feature.slow_vdup32)] = .{ |
| 1328 | 1328 | .index = @enumToInt(Feature.slow_vdup32), |
| 1329 | 1329 | .name = @tagName(Feature.slow_vdup32), |
| 1330 | 1330 | .llvm_name = "slow-vdup32", |
| 1331 | 1331 | .description = "Has slow VDUP32 - prefer VMOV", |
| 1332 | .dependencies = 0, | |
| 1332 | .dependencies = featureSet(&[_]Feature{}), | |
| 1333 | 1333 | }; |
| 1334 | 1334 | result[@enumToInt(Feature.slow_vgetlni32)] = .{ |
| 1335 | 1335 | .index = @enumToInt(Feature.slow_vgetlni32), |
| 1336 | 1336 | .name = @tagName(Feature.slow_vgetlni32), |
| 1337 | 1337 | .llvm_name = "slow-vgetlni32", |
| 1338 | 1338 | .description = "Has slow VGETLNi32 - prefer VMOV", |
| 1339 | .dependencies = 0, | |
| 1339 | .dependencies = featureSet(&[_]Feature{}), | |
| 1340 | 1340 | }; |
| 1341 | 1341 | result[@enumToInt(Feature.slowfpvmlx)] = .{ |
| 1342 | 1342 | .index = @enumToInt(Feature.slowfpvmlx), |
| 1343 | 1343 | .name = @tagName(Feature.slowfpvmlx), |
| 1344 | 1344 | .llvm_name = "slowfpvmlx", |
| 1345 | 1345 | .description = "Disable VFP / NEON MAC instructions", |
| 1346 | .dependencies = 0, | |
| 1346 | .dependencies = featureSet(&[_]Feature{}), | |
| 1347 | 1347 | }; |
| 1348 | 1348 | result[@enumToInt(Feature.soft_float)] = .{ |
| 1349 | 1349 | .index = @enumToInt(Feature.soft_float), |
| 1350 | 1350 | .name = @tagName(Feature.soft_float), |
| 1351 | 1351 | .llvm_name = "soft-float", |
| 1352 | 1352 | .description = "Use software floating point features.", |
| 1353 | .dependencies = 0, | |
| 1353 | .dependencies = featureSet(&[_]Feature{}), | |
| 1354 | 1354 | }; |
| 1355 | 1355 | result[@enumToInt(Feature.splat_vfp_neon)] = .{ |
| 1356 | 1356 | .index = @enumToInt(Feature.splat_vfp_neon), |
| ... | ... | @@ -1366,56 +1366,56 @@ pub const all_features = blk: { |
| 1366 | 1366 | .name = @tagName(Feature.strict_align), |
| 1367 | 1367 | .llvm_name = "strict-align", |
| 1368 | 1368 | .description = "Disallow all unaligned memory access", |
| 1369 | .dependencies = 0, | |
| 1369 | .dependencies = featureSet(&[_]Feature{}), | |
| 1370 | 1370 | }; |
| 1371 | 1371 | result[@enumToInt(Feature.swift)] = .{ |
| 1372 | 1372 | .index = @enumToInt(Feature.swift), |
| 1373 | 1373 | .name = @tagName(Feature.swift), |
| 1374 | 1374 | .llvm_name = "swift", |
| 1375 | 1375 | .description = "Swift ARM processors", |
| 1376 | .dependencies = 0, | |
| 1376 | .dependencies = featureSet(&[_]Feature{}), | |
| 1377 | 1377 | }; |
| 1378 | 1378 | result[@enumToInt(Feature.thumb_mode)] = .{ |
| 1379 | 1379 | .index = @enumToInt(Feature.thumb_mode), |
| 1380 | 1380 | .name = @tagName(Feature.thumb_mode), |
| 1381 | 1381 | .llvm_name = "thumb-mode", |
| 1382 | 1382 | .description = "Thumb mode", |
| 1383 | .dependencies = 0, | |
| 1383 | .dependencies = featureSet(&[_]Feature{}), | |
| 1384 | 1384 | }; |
| 1385 | 1385 | result[@enumToInt(Feature.thumb2)] = .{ |
| 1386 | 1386 | .index = @enumToInt(Feature.thumb2), |
| 1387 | 1387 | .name = @tagName(Feature.thumb2), |
| 1388 | 1388 | .llvm_name = "thumb2", |
| 1389 | 1389 | .description = "Enable Thumb2 instructions", |
| 1390 | .dependencies = 0, | |
| 1390 | .dependencies = featureSet(&[_]Feature{}), | |
| 1391 | 1391 | }; |
| 1392 | 1392 | result[@enumToInt(Feature.trustzone)] = .{ |
| 1393 | 1393 | .index = @enumToInt(Feature.trustzone), |
| 1394 | 1394 | .name = @tagName(Feature.trustzone), |
| 1395 | 1395 | .llvm_name = "trustzone", |
| 1396 | 1396 | .description = "Enable support for TrustZone security extensions", |
| 1397 | .dependencies = 0, | |
| 1397 | .dependencies = featureSet(&[_]Feature{}), | |
| 1398 | 1398 | }; |
| 1399 | 1399 | result[@enumToInt(Feature.use_aa)] = .{ |
| 1400 | 1400 | .index = @enumToInt(Feature.use_aa), |
| 1401 | 1401 | .name = @tagName(Feature.use_aa), |
| 1402 | 1402 | .llvm_name = "use-aa", |
| 1403 | 1403 | .description = "Use alias analysis during codegen", |
| 1404 | .dependencies = 0, | |
| 1404 | .dependencies = featureSet(&[_]Feature{}), | |
| 1405 | 1405 | }; |
| 1406 | 1406 | result[@enumToInt(Feature.use_misched)] = .{ |
| 1407 | 1407 | .index = @enumToInt(Feature.use_misched), |
| 1408 | 1408 | .name = @tagName(Feature.use_misched), |
| 1409 | 1409 | .llvm_name = "use-misched", |
| 1410 | 1410 | .description = "Use the MachineScheduler", |
| 1411 | .dependencies = 0, | |
| 1411 | .dependencies = featureSet(&[_]Feature{}), | |
| 1412 | 1412 | }; |
| 1413 | 1413 | result[@enumToInt(Feature.v4t)] = .{ |
| 1414 | 1414 | .index = @enumToInt(Feature.v4t), |
| 1415 | 1415 | .name = @tagName(Feature.v4t), |
| 1416 | 1416 | .llvm_name = "v4t", |
| 1417 | 1417 | .description = "Support ARM v4T instructions", |
| 1418 | .dependencies = 0, | |
| 1418 | .dependencies = featureSet(&[_]Feature{}), | |
| 1419 | 1419 | }; |
| 1420 | 1420 | result[@enumToInt(Feature.v5t)] = .{ |
| 1421 | 1421 | .index = @enumToInt(Feature.v5t), |
| ... | ... | @@ -1489,7 +1489,7 @@ pub const all_features = blk: { |
| 1489 | 1489 | .name = @tagName(Feature.v7clrex), |
| 1490 | 1490 | .llvm_name = "v7clrex", |
| 1491 | 1491 | .description = "Has v7 clrex instruction", |
| 1492 | .dependencies = 0, | |
| 1492 | .dependencies = featureSet(&[_]Feature{}), | |
| 1493 | 1493 | }; |
| 1494 | 1494 | result[@enumToInt(Feature.v8)] = .{ |
| 1495 | 1495 | .index = @enumToInt(Feature.v8), |
| ... | ... | @@ -1714,28 +1714,28 @@ pub const all_features = blk: { |
| 1714 | 1714 | .name = @tagName(Feature.vldn_align), |
| 1715 | 1715 | .llvm_name = "vldn-align", |
| 1716 | 1716 | .description = "Check for VLDn unaligned access", |
| 1717 | .dependencies = 0, | |
| 1717 | .dependencies = featureSet(&[_]Feature{}), | |
| 1718 | 1718 | }; |
| 1719 | 1719 | result[@enumToInt(Feature.vmlx_forwarding)] = .{ |
| 1720 | 1720 | .index = @enumToInt(Feature.vmlx_forwarding), |
| 1721 | 1721 | .name = @tagName(Feature.vmlx_forwarding), |
| 1722 | 1722 | .llvm_name = "vmlx-forwarding", |
| 1723 | 1723 | .description = "Has multiplier accumulator forwarding", |
| 1724 | .dependencies = 0, | |
| 1724 | .dependencies = featureSet(&[_]Feature{}), | |
| 1725 | 1725 | }; |
| 1726 | 1726 | result[@enumToInt(Feature.vmlx_hazards)] = .{ |
| 1727 | 1727 | .index = @enumToInt(Feature.vmlx_hazards), |
| 1728 | 1728 | .name = @tagName(Feature.vmlx_hazards), |
| 1729 | 1729 | .llvm_name = "vmlx-hazards", |
| 1730 | 1730 | .description = "Has VMLx hazards", |
| 1731 | .dependencies = 0, | |
| 1731 | .dependencies = featureSet(&[_]Feature{}), | |
| 1732 | 1732 | }; |
| 1733 | 1733 | result[@enumToInt(Feature.wide_stride_vfp)] = .{ |
| 1734 | 1734 | .index = @enumToInt(Feature.wide_stride_vfp), |
| 1735 | 1735 | .name = @tagName(Feature.wide_stride_vfp), |
| 1736 | 1736 | .llvm_name = "wide-stride-vfp", |
| 1737 | 1737 | .description = "Use a wide stride when allocating VFP registers", |
| 1738 | .dependencies = 0, | |
| 1738 | .dependencies = featureSet(&[_]Feature{}), | |
| 1739 | 1739 | }; |
| 1740 | 1740 | result[@enumToInt(Feature.xscale)] = .{ |
| 1741 | 1741 | .index = @enumToInt(Feature.xscale), |
| ... | ... | @@ -1751,7 +1751,7 @@ pub const all_features = blk: { |
| 1751 | 1751 | .name = @tagName(Feature.zcz), |
| 1752 | 1752 | .llvm_name = "zcz", |
| 1753 | 1753 | .description = "Has zero-cycle zeroing instructions", |
| 1754 | .dependencies = 0, | |
| 1754 | .dependencies = featureSet(&[_]Feature{}), | |
| 1755 | 1755 | }; |
| 1756 | 1756 | break :blk result; |
| 1757 | 1757 | }; |
| ... | ... | @@ -2450,7 +2450,7 @@ pub const cpu = struct { |
| 2450 | 2450 | pub const generic = Cpu{ |
| 2451 | 2451 | .name = "generic", |
| 2452 | 2452 | .llvm_name = "generic", |
| 2453 | .features = 0, | |
| 2453 | .features = featureSet(&[_]Feature{}), | |
| 2454 | 2454 | }; |
| 2455 | 2455 | pub const iwmmxt = Cpu{ |
| 2456 | 2456 | .name = "iwmmxt", |
lib/std/target/avr.zig+34-30| ... | ... | @@ -15,7 +15,7 @@ pub const Feature = enum { |
| 15 | 15 | avr51, |
| 16 | 16 | avr6, |
| 17 | 17 | avrtiny, |
| 18 | break, | |
| 18 | @"break", | |
| 19 | 19 | des, |
| 20 | 20 | eijmpcall, |
| 21 | 21 | elpm, |
| ... | ... | @@ -41,21 +41,21 @@ pub usingnamespace Cpu.Feature.feature_set_fns(Feature); |
| 41 | 41 | |
| 42 | 42 | pub const all_features = blk: { |
| 43 | 43 | const len = @typeInfo(Feature).Enum.fields.len; |
| 44 | std.debug.assert(len <= @typeInfo(Cpu.Feature.Set).Int.bits); | |
| 44 | std.debug.assert(len <= Cpu.Feature.Set.bit_count); | |
| 45 | 45 | var result: [len]Cpu.Feature = undefined; |
| 46 | 46 | result[@enumToInt(Feature.addsubiw)] = .{ |
| 47 | 47 | .index = @enumToInt(Feature.addsubiw), |
| 48 | 48 | .name = @tagName(Feature.addsubiw), |
| 49 | 49 | .llvm_name = "addsubiw", |
| 50 | 50 | .description = "Enable 16-bit register-immediate addition and subtraction instructions", |
| 51 | .dependencies = 0, | |
| 51 | .dependencies = featureSet(&[_]Feature{}), | |
| 52 | 52 | }; |
| 53 | 53 | result[@enumToInt(Feature.avr0)] = .{ |
| 54 | 54 | .index = @enumToInt(Feature.avr0), |
| 55 | 55 | .name = @tagName(Feature.avr0), |
| 56 | 56 | .llvm_name = "avr0", |
| 57 | 57 | .description = "The device is a part of the avr0 family", |
| 58 | .dependencies = 0, | |
| 58 | .dependencies = featureSet(&[_]Feature{}), | |
| 59 | 59 | }; |
| 60 | 60 | result[@enumToInt(Feature.avr1)] = .{ |
| 61 | 61 | .index = @enumToInt(Feature.avr1), |
| ... | ... | @@ -86,7 +86,7 @@ pub const all_features = blk: { |
| 86 | 86 | .description = "The device is a part of the avr25 family", |
| 87 | 87 | .dependencies = featureSet(&[_]Feature{ |
| 88 | 88 | .avr2, |
| 89 | .break, | |
| 89 | .@"break", | |
| 90 | 90 | .lpmx, |
| 91 | 91 | .movw, |
| 92 | 92 | .spm, |
| ... | ... | @@ -119,7 +119,7 @@ pub const all_features = blk: { |
| 119 | 119 | .description = "The device is a part of the avr35 family", |
| 120 | 120 | .dependencies = featureSet(&[_]Feature{ |
| 121 | 121 | .avr3, |
| 122 | .break, | |
| 122 | .@"break", | |
| 123 | 123 | .lpmx, |
| 124 | 124 | .movw, |
| 125 | 125 | .spm, |
| ... | ... | @@ -132,7 +132,7 @@ pub const all_features = blk: { |
| 132 | 132 | .description = "The device is a part of the avr4 family", |
| 133 | 133 | .dependencies = featureSet(&[_]Feature{ |
| 134 | 134 | .avr2, |
| 135 | .break, | |
| 135 | .@"break", | |
| 136 | 136 | .lpmx, |
| 137 | 137 | .movw, |
| 138 | 138 | .mul, |
| ... | ... | @@ -146,7 +146,7 @@ pub const all_features = blk: { |
| 146 | 146 | .description = "The device is a part of the avr5 family", |
| 147 | 147 | .dependencies = featureSet(&[_]Feature{ |
| 148 | 148 | .avr3, |
| 149 | .break, | |
| 149 | .@"break", | |
| 150 | 150 | .lpmx, |
| 151 | 151 | .movw, |
| 152 | 152 | .mul, |
| ... | ... | @@ -180,101 +180,101 @@ pub const all_features = blk: { |
| 180 | 180 | .description = "The device is a part of the avrtiny family", |
| 181 | 181 | .dependencies = featureSet(&[_]Feature{ |
| 182 | 182 | .avr0, |
| 183 | .break, | |
| 183 | .@"break", | |
| 184 | 184 | .sram, |
| 185 | 185 | .tinyencoding, |
| 186 | 186 | }), |
| 187 | 187 | }; |
| 188 | result[@enumToInt(Feature.break)] = .{ | |
| 189 | .index = @enumToInt(Feature.break), | |
| 190 | .name = @tagName(Feature.break), | |
| 188 | result[@enumToInt(Feature.@"break")] = .{ | |
| 189 | .index = @enumToInt(Feature.@"break"), | |
| 190 | .name = @tagName(Feature.@"break"), | |
| 191 | 191 | .llvm_name = "break", |
| 192 | 192 | .description = "The device supports the `BREAK` debugging instruction", |
| 193 | .dependencies = 0, | |
| 193 | .dependencies = featureSet(&[_]Feature{}), | |
| 194 | 194 | }; |
| 195 | 195 | result[@enumToInt(Feature.des)] = .{ |
| 196 | 196 | .index = @enumToInt(Feature.des), |
| 197 | 197 | .name = @tagName(Feature.des), |
| 198 | 198 | .llvm_name = "des", |
| 199 | 199 | .description = "The device supports the `DES k` encryption instruction", |
| 200 | .dependencies = 0, | |
| 200 | .dependencies = featureSet(&[_]Feature{}), | |
| 201 | 201 | }; |
| 202 | 202 | result[@enumToInt(Feature.eijmpcall)] = .{ |
| 203 | 203 | .index = @enumToInt(Feature.eijmpcall), |
| 204 | 204 | .name = @tagName(Feature.eijmpcall), |
| 205 | 205 | .llvm_name = "eijmpcall", |
| 206 | 206 | .description = "The device supports the `EIJMP`/`EICALL` instructions", |
| 207 | .dependencies = 0, | |
| 207 | .dependencies = featureSet(&[_]Feature{}), | |
| 208 | 208 | }; |
| 209 | 209 | result[@enumToInt(Feature.elpm)] = .{ |
| 210 | 210 | .index = @enumToInt(Feature.elpm), |
| 211 | 211 | .name = @tagName(Feature.elpm), |
| 212 | 212 | .llvm_name = "elpm", |
| 213 | 213 | .description = "The device supports the ELPM instruction", |
| 214 | .dependencies = 0, | |
| 214 | .dependencies = featureSet(&[_]Feature{}), | |
| 215 | 215 | }; |
| 216 | 216 | result[@enumToInt(Feature.elpmx)] = .{ |
| 217 | 217 | .index = @enumToInt(Feature.elpmx), |
| 218 | 218 | .name = @tagName(Feature.elpmx), |
| 219 | 219 | .llvm_name = "elpmx", |
| 220 | 220 | .description = "The device supports the `ELPM Rd, Z[+]` instructions", |
| 221 | .dependencies = 0, | |
| 221 | .dependencies = featureSet(&[_]Feature{}), | |
| 222 | 222 | }; |
| 223 | 223 | result[@enumToInt(Feature.ijmpcall)] = .{ |
| 224 | 224 | .index = @enumToInt(Feature.ijmpcall), |
| 225 | 225 | .name = @tagName(Feature.ijmpcall), |
| 226 | 226 | .llvm_name = "ijmpcall", |
| 227 | 227 | .description = "The device supports `IJMP`/`ICALL`instructions", |
| 228 | .dependencies = 0, | |
| 228 | .dependencies = featureSet(&[_]Feature{}), | |
| 229 | 229 | }; |
| 230 | 230 | result[@enumToInt(Feature.jmpcall)] = .{ |
| 231 | 231 | .index = @enumToInt(Feature.jmpcall), |
| 232 | 232 | .name = @tagName(Feature.jmpcall), |
| 233 | 233 | .llvm_name = "jmpcall", |
| 234 | 234 | .description = "The device supports the `JMP` and `CALL` instructions", |
| 235 | .dependencies = 0, | |
| 235 | .dependencies = featureSet(&[_]Feature{}), | |
| 236 | 236 | }; |
| 237 | 237 | result[@enumToInt(Feature.lpm)] = .{ |
| 238 | 238 | .index = @enumToInt(Feature.lpm), |
| 239 | 239 | .name = @tagName(Feature.lpm), |
| 240 | 240 | .llvm_name = "lpm", |
| 241 | 241 | .description = "The device supports the `LPM` instruction", |
| 242 | .dependencies = 0, | |
| 242 | .dependencies = featureSet(&[_]Feature{}), | |
| 243 | 243 | }; |
| 244 | 244 | result[@enumToInt(Feature.lpmx)] = .{ |
| 245 | 245 | .index = @enumToInt(Feature.lpmx), |
| 246 | 246 | .name = @tagName(Feature.lpmx), |
| 247 | 247 | .llvm_name = "lpmx", |
| 248 | 248 | .description = "The device supports the `LPM Rd, Z[+]` instruction", |
| 249 | .dependencies = 0, | |
| 249 | .dependencies = featureSet(&[_]Feature{}), | |
| 250 | 250 | }; |
| 251 | 251 | result[@enumToInt(Feature.movw)] = .{ |
| 252 | 252 | .index = @enumToInt(Feature.movw), |
| 253 | 253 | .name = @tagName(Feature.movw), |
| 254 | 254 | .llvm_name = "movw", |
| 255 | 255 | .description = "The device supports the 16-bit MOVW instruction", |
| 256 | .dependencies = 0, | |
| 256 | .dependencies = featureSet(&[_]Feature{}), | |
| 257 | 257 | }; |
| 258 | 258 | result[@enumToInt(Feature.mul)] = .{ |
| 259 | 259 | .index = @enumToInt(Feature.mul), |
| 260 | 260 | .name = @tagName(Feature.mul), |
| 261 | 261 | .llvm_name = "mul", |
| 262 | 262 | .description = "The device supports the multiplication instructions", |
| 263 | .dependencies = 0, | |
| 263 | .dependencies = featureSet(&[_]Feature{}), | |
| 264 | 264 | }; |
| 265 | 265 | result[@enumToInt(Feature.rmw)] = .{ |
| 266 | 266 | .index = @enumToInt(Feature.rmw), |
| 267 | 267 | .name = @tagName(Feature.rmw), |
| 268 | 268 | .llvm_name = "rmw", |
| 269 | 269 | .description = "The device supports the read-write-modify instructions: XCH, LAS, LAC, LAT", |
| 270 | .dependencies = 0, | |
| 270 | .dependencies = featureSet(&[_]Feature{}), | |
| 271 | 271 | }; |
| 272 | 272 | result[@enumToInt(Feature.smallstack)] = .{ |
| 273 | 273 | .index = @enumToInt(Feature.smallstack), |
| 274 | 274 | .name = @tagName(Feature.smallstack), |
| 275 | 275 | .llvm_name = "smallstack", |
| 276 | 276 | .description = "The device has an 8-bit stack pointer", |
| 277 | .dependencies = 0, | |
| 277 | .dependencies = featureSet(&[_]Feature{}), | |
| 278 | 278 | }; |
| 279 | 279 | result[@enumToInt(Feature.special)] = .{ |
| 280 | 280 | .index = @enumToInt(Feature.special), |
| ... | ... | @@ -283,7 +283,7 @@ pub const all_features = blk: { |
| 283 | 283 | .description = "Enable use of the entire instruction set - used for debugging", |
| 284 | 284 | .dependencies = featureSet(&[_]Feature{ |
| 285 | 285 | .addsubiw, |
| 286 | .break, | |
| 286 | .@"break", | |
| 287 | 287 | .des, |
| 288 | 288 | .eijmpcall, |
| 289 | 289 | .elpm, |
| ... | ... | @@ -305,28 +305,28 @@ pub const all_features = blk: { |
| 305 | 305 | .name = @tagName(Feature.spm), |
| 306 | 306 | .llvm_name = "spm", |
| 307 | 307 | .description = "The device supports the `SPM` instruction", |
| 308 | .dependencies = 0, | |
| 308 | .dependencies = featureSet(&[_]Feature{}), | |
| 309 | 309 | }; |
| 310 | 310 | result[@enumToInt(Feature.spmx)] = .{ |
| 311 | 311 | .index = @enumToInt(Feature.spmx), |
| 312 | 312 | .name = @tagName(Feature.spmx), |
| 313 | 313 | .llvm_name = "spmx", |
| 314 | 314 | .description = "The device supports the `SPM Z+` instruction", |
| 315 | .dependencies = 0, | |
| 315 | .dependencies = featureSet(&[_]Feature{}), | |
| 316 | 316 | }; |
| 317 | 317 | result[@enumToInt(Feature.sram)] = .{ |
| 318 | 318 | .index = @enumToInt(Feature.sram), |
| 319 | 319 | .name = @tagName(Feature.sram), |
| 320 | 320 | .llvm_name = "sram", |
| 321 | 321 | .description = "The device has random access memory", |
| 322 | .dependencies = 0, | |
| 322 | .dependencies = featureSet(&[_]Feature{}), | |
| 323 | 323 | }; |
| 324 | 324 | result[@enumToInt(Feature.tinyencoding)] = .{ |
| 325 | 325 | .index = @enumToInt(Feature.tinyencoding), |
| 326 | 326 | .name = @tagName(Feature.tinyencoding), |
| 327 | 327 | .llvm_name = "tinyencoding", |
| 328 | 328 | .description = "The device has Tiny core specific instruction encodings", |
| 329 | .dependencies = 0, | |
| 329 | .dependencies = featureSet(&[_]Feature{}), | |
| 330 | 330 | }; |
| 331 | 331 | result[@enumToInt(Feature.xmega)] = .{ |
| 332 | 332 | .index = @enumToInt(Feature.xmega), |
| ... | ... | @@ -2439,3 +2439,7 @@ pub const all_cpus = &[_]*const Cpu{ |
| 2439 | 2439 | &cpu.avrxmega7, |
| 2440 | 2440 | &cpu.m3000, |
| 2441 | 2441 | }; |
| 2442 | ||
| 2443 | pub const baseline_features = featureSet(&[_]Feature{ | |
| 2444 | .avr0, | |
| 2445 | }); |
lib/std/target/bpf.zig+9-9| ... | ... | @@ -11,28 +11,28 @@ pub usingnamespace Cpu.Feature.feature_set_fns(Feature); |
| 11 | 11 | |
| 12 | 12 | pub const all_features = blk: { |
| 13 | 13 | const len = @typeInfo(Feature).Enum.fields.len; |
| 14 | std.debug.assert(len <= @typeInfo(Cpu.Feature.Set).Int.bits); | |
| 14 | std.debug.assert(len <= Cpu.Feature.Set.bit_count); | |
| 15 | 15 | var result: [len]Cpu.Feature = undefined; |
| 16 | 16 | result[@enumToInt(Feature.alu32)] = .{ |
| 17 | 17 | .index = @enumToInt(Feature.alu32), |
| 18 | 18 | .name = @tagName(Feature.alu32), |
| 19 | 19 | .llvm_name = "alu32", |
| 20 | 20 | .description = "Enable ALU32 instructions", |
| 21 | .dependencies = 0, | |
| 21 | .dependencies = featureSet(&[_]Feature{}), | |
| 22 | 22 | }; |
| 23 | 23 | result[@enumToInt(Feature.dummy)] = .{ |
| 24 | 24 | .index = @enumToInt(Feature.dummy), |
| 25 | 25 | .name = @tagName(Feature.dummy), |
| 26 | 26 | .llvm_name = "dummy", |
| 27 | 27 | .description = "unused feature", |
| 28 | .dependencies = 0, | |
| 28 | .dependencies = featureSet(&[_]Feature{}), | |
| 29 | 29 | }; |
| 30 | 30 | result[@enumToInt(Feature.dwarfris)] = .{ |
| 31 | 31 | .index = @enumToInt(Feature.dwarfris), |
| 32 | 32 | .name = @tagName(Feature.dwarfris), |
| 33 | 33 | .llvm_name = "dwarfris", |
| 34 | 34 | .description = "Disable MCAsmInfo DwarfUsesRelocationsAcrossSections", |
| 35 | .dependencies = 0, | |
| 35 | .dependencies = featureSet(&[_]Feature{}), | |
| 36 | 36 | }; |
| 37 | 37 | break :blk result; |
| 38 | 38 | }; |
| ... | ... | @@ -41,27 +41,27 @@ pub const cpu = struct { |
| 41 | 41 | pub const generic = Cpu{ |
| 42 | 42 | .name = "generic", |
| 43 | 43 | .llvm_name = "generic", |
| 44 | .features = 0, | |
| 44 | .features = featureSet(&[_]Feature{}), | |
| 45 | 45 | }; |
| 46 | 46 | pub const probe = Cpu{ |
| 47 | 47 | .name = "probe", |
| 48 | 48 | .llvm_name = "probe", |
| 49 | .features = 0, | |
| 49 | .features = featureSet(&[_]Feature{}), | |
| 50 | 50 | }; |
| 51 | 51 | pub const v1 = Cpu{ |
| 52 | 52 | .name = "v1", |
| 53 | 53 | .llvm_name = "v1", |
| 54 | .features = 0, | |
| 54 | .features = featureSet(&[_]Feature{}), | |
| 55 | 55 | }; |
| 56 | 56 | pub const v2 = Cpu{ |
| 57 | 57 | .name = "v2", |
| 58 | 58 | .llvm_name = "v2", |
| 59 | .features = 0, | |
| 59 | .features = featureSet(&[_]Feature{}), | |
| 60 | 60 | }; |
| 61 | 61 | pub const v3 = Cpu{ |
| 62 | 62 | .name = "v3", |
| 63 | 63 | .llvm_name = "v3", |
| 64 | .features = 0, | |
| 64 | .features = featureSet(&[_]Feature{}), | |
| 65 | 65 | }; |
| 66 | 66 | }; |
| 67 | 67 |
lib/std/target/hexagon.zig+17-17| ... | ... | @@ -32,21 +32,21 @@ pub usingnamespace Cpu.Feature.feature_set_fns(Feature); |
| 32 | 32 | |
| 33 | 33 | pub const all_features = blk: { |
| 34 | 34 | const len = @typeInfo(Feature).Enum.fields.len; |
| 35 | std.debug.assert(len <= @typeInfo(Cpu.Feature.Set).Int.bits); | |
| 35 | std.debug.assert(len <= Cpu.Feature.Set.bit_count); | |
| 36 | 36 | var result: [len]Cpu.Feature = undefined; |
| 37 | 37 | result[@enumToInt(Feature.duplex)] = .{ |
| 38 | 38 | .index = @enumToInt(Feature.duplex), |
| 39 | 39 | .name = @tagName(Feature.duplex), |
| 40 | 40 | .llvm_name = "duplex", |
| 41 | 41 | .description = "Enable generation of duplex instruction", |
| 42 | .dependencies = 0, | |
| 42 | .dependencies = featureSet(&[_]Feature{}), | |
| 43 | 43 | }; |
| 44 | 44 | result[@enumToInt(Feature.hvx)] = .{ |
| 45 | 45 | .index = @enumToInt(Feature.hvx), |
| 46 | 46 | .name = @tagName(Feature.hvx), |
| 47 | 47 | .llvm_name = "hvx", |
| 48 | 48 | .description = "Hexagon HVX instructions", |
| 49 | .dependencies = 0, | |
| 49 | .dependencies = featureSet(&[_]Feature{}), | |
| 50 | 50 | }; |
| 51 | 51 | result[@enumToInt(Feature.hvx_length128b)] = .{ |
| 52 | 52 | .index = @enumToInt(Feature.hvx_length128b), |
| ... | ... | @@ -114,28 +114,28 @@ pub const all_features = blk: { |
| 114 | 114 | .name = @tagName(Feature.long_calls), |
| 115 | 115 | .llvm_name = "long-calls", |
| 116 | 116 | .description = "Use constant-extended calls", |
| 117 | .dependencies = 0, | |
| 117 | .dependencies = featureSet(&[_]Feature{}), | |
| 118 | 118 | }; |
| 119 | 119 | result[@enumToInt(Feature.mem_noshuf)] = .{ |
| 120 | 120 | .index = @enumToInt(Feature.mem_noshuf), |
| 121 | 121 | .name = @tagName(Feature.mem_noshuf), |
| 122 | 122 | .llvm_name = "mem_noshuf", |
| 123 | 123 | .description = "Supports mem_noshuf feature", |
| 124 | .dependencies = 0, | |
| 124 | .dependencies = featureSet(&[_]Feature{}), | |
| 125 | 125 | }; |
| 126 | 126 | result[@enumToInt(Feature.memops)] = .{ |
| 127 | 127 | .index = @enumToInt(Feature.memops), |
| 128 | 128 | .name = @tagName(Feature.memops), |
| 129 | 129 | .llvm_name = "memops", |
| 130 | 130 | .description = "Use memop instructions", |
| 131 | .dependencies = 0, | |
| 131 | .dependencies = featureSet(&[_]Feature{}), | |
| 132 | 132 | }; |
| 133 | 133 | result[@enumToInt(Feature.noreturn_stack_elim)] = .{ |
| 134 | 134 | .index = @enumToInt(Feature.noreturn_stack_elim), |
| 135 | 135 | .name = @tagName(Feature.noreturn_stack_elim), |
| 136 | 136 | .llvm_name = "noreturn-stack-elim", |
| 137 | 137 | .description = "Eliminate stack allocation in a noreturn function when possible", |
| 138 | .dependencies = 0, | |
| 138 | .dependencies = featureSet(&[_]Feature{}), | |
| 139 | 139 | }; |
| 140 | 140 | result[@enumToInt(Feature.nvj)] = .{ |
| 141 | 141 | .index = @enumToInt(Feature.nvj), |
| ... | ... | @@ -160,70 +160,70 @@ pub const all_features = blk: { |
| 160 | 160 | .name = @tagName(Feature.packets), |
| 161 | 161 | .llvm_name = "packets", |
| 162 | 162 | .description = "Support for instruction packets", |
| 163 | .dependencies = 0, | |
| 163 | .dependencies = featureSet(&[_]Feature{}), | |
| 164 | 164 | }; |
| 165 | 165 | result[@enumToInt(Feature.reserved_r19)] = .{ |
| 166 | 166 | .index = @enumToInt(Feature.reserved_r19), |
| 167 | 167 | .name = @tagName(Feature.reserved_r19), |
| 168 | 168 | .llvm_name = "reserved-r19", |
| 169 | 169 | .description = "Reserve register R19", |
| 170 | .dependencies = 0, | |
| 170 | .dependencies = featureSet(&[_]Feature{}), | |
| 171 | 171 | }; |
| 172 | 172 | result[@enumToInt(Feature.small_data)] = .{ |
| 173 | 173 | .index = @enumToInt(Feature.small_data), |
| 174 | 174 | .name = @tagName(Feature.small_data), |
| 175 | 175 | .llvm_name = "small-data", |
| 176 | 176 | .description = "Allow GP-relative addressing of global variables", |
| 177 | .dependencies = 0, | |
| 177 | .dependencies = featureSet(&[_]Feature{}), | |
| 178 | 178 | }; |
| 179 | 179 | result[@enumToInt(Feature.v5)] = .{ |
| 180 | 180 | .index = @enumToInt(Feature.v5), |
| 181 | 181 | .name = @tagName(Feature.v5), |
| 182 | 182 | .llvm_name = "v5", |
| 183 | 183 | .description = "Enable Hexagon V5 architecture", |
| 184 | .dependencies = 0, | |
| 184 | .dependencies = featureSet(&[_]Feature{}), | |
| 185 | 185 | }; |
| 186 | 186 | result[@enumToInt(Feature.v55)] = .{ |
| 187 | 187 | .index = @enumToInt(Feature.v55), |
| 188 | 188 | .name = @tagName(Feature.v55), |
| 189 | 189 | .llvm_name = "v55", |
| 190 | 190 | .description = "Enable Hexagon V55 architecture", |
| 191 | .dependencies = 0, | |
| 191 | .dependencies = featureSet(&[_]Feature{}), | |
| 192 | 192 | }; |
| 193 | 193 | result[@enumToInt(Feature.v60)] = .{ |
| 194 | 194 | .index = @enumToInt(Feature.v60), |
| 195 | 195 | .name = @tagName(Feature.v60), |
| 196 | 196 | .llvm_name = "v60", |
| 197 | 197 | .description = "Enable Hexagon V60 architecture", |
| 198 | .dependencies = 0, | |
| 198 | .dependencies = featureSet(&[_]Feature{}), | |
| 199 | 199 | }; |
| 200 | 200 | result[@enumToInt(Feature.v62)] = .{ |
| 201 | 201 | .index = @enumToInt(Feature.v62), |
| 202 | 202 | .name = @tagName(Feature.v62), |
| 203 | 203 | .llvm_name = "v62", |
| 204 | 204 | .description = "Enable Hexagon V62 architecture", |
| 205 | .dependencies = 0, | |
| 205 | .dependencies = featureSet(&[_]Feature{}), | |
| 206 | 206 | }; |
| 207 | 207 | result[@enumToInt(Feature.v65)] = .{ |
| 208 | 208 | .index = @enumToInt(Feature.v65), |
| 209 | 209 | .name = @tagName(Feature.v65), |
| 210 | 210 | .llvm_name = "v65", |
| 211 | 211 | .description = "Enable Hexagon V65 architecture", |
| 212 | .dependencies = 0, | |
| 212 | .dependencies = featureSet(&[_]Feature{}), | |
| 213 | 213 | }; |
| 214 | 214 | result[@enumToInt(Feature.v66)] = .{ |
| 215 | 215 | .index = @enumToInt(Feature.v66), |
| 216 | 216 | .name = @tagName(Feature.v66), |
| 217 | 217 | .llvm_name = "v66", |
| 218 | 218 | .description = "Enable Hexagon V66 architecture", |
| 219 | .dependencies = 0, | |
| 219 | .dependencies = featureSet(&[_]Feature{}), | |
| 220 | 220 | }; |
| 221 | 221 | result[@enumToInt(Feature.zreg)] = .{ |
| 222 | 222 | .index = @enumToInt(Feature.zreg), |
| 223 | 223 | .name = @tagName(Feature.zreg), |
| 224 | 224 | .llvm_name = "zreg", |
| 225 | 225 | .description = "Hexagon ZReg extension instructions", |
| 226 | .dependencies = 0, | |
| 226 | .dependencies = featureSet(&[_]Feature{}), | |
| 227 | 227 | }; |
| 228 | 228 | break :blk result; |
| 229 | 229 | }; |
lib/std/target/mips.zig+32-32| ... | ... | @@ -57,14 +57,14 @@ pub usingnamespace Cpu.Feature.feature_set_fns(Feature); |
| 57 | 57 | |
| 58 | 58 | pub const all_features = blk: { |
| 59 | 59 | const len = @typeInfo(Feature).Enum.fields.len; |
| 60 | std.debug.assert(len <= @typeInfo(Cpu.Feature.Set).Int.bits); | |
| 60 | std.debug.assert(len <= Cpu.Feature.Set.bit_count); | |
| 61 | 61 | var result: [len]Cpu.Feature = undefined; |
| 62 | 62 | result[@enumToInt(Feature.abs2008)] = .{ |
| 63 | 63 | .index = @enumToInt(Feature.abs2008), |
| 64 | 64 | .name = @tagName(Feature.abs2008), |
| 65 | 65 | .llvm_name = "abs2008", |
| 66 | 66 | .description = "Disable IEEE 754-2008 abs.fmt mode", |
| 67 | .dependencies = 0, | |
| 67 | .dependencies = featureSet(&[_]Feature{}), | |
| 68 | 68 | }; |
| 69 | 69 | result[@enumToInt(Feature.cnmips)] = .{ |
| 70 | 70 | .index = @enumToInt(Feature.cnmips), |
| ... | ... | @@ -80,14 +80,14 @@ pub const all_features = blk: { |
| 80 | 80 | .name = @tagName(Feature.crc), |
| 81 | 81 | .llvm_name = "crc", |
| 82 | 82 | .description = "Mips R6 CRC ASE", |
| 83 | .dependencies = 0, | |
| 83 | .dependencies = featureSet(&[_]Feature{}), | |
| 84 | 84 | }; |
| 85 | 85 | result[@enumToInt(Feature.dsp)] = .{ |
| 86 | 86 | .index = @enumToInt(Feature.dsp), |
| 87 | 87 | .name = @tagName(Feature.dsp), |
| 88 | 88 | .llvm_name = "dsp", |
| 89 | 89 | .description = "Mips DSP ASE", |
| 90 | .dependencies = 0, | |
| 90 | .dependencies = featureSet(&[_]Feature{}), | |
| 91 | 91 | }; |
| 92 | 92 | result[@enumToInt(Feature.dspr2)] = .{ |
| 93 | 93 | .index = @enumToInt(Feature.dspr2), |
| ... | ... | @@ -113,63 +113,63 @@ pub const all_features = blk: { |
| 113 | 113 | .name = @tagName(Feature.eva), |
| 114 | 114 | .llvm_name = "eva", |
| 115 | 115 | .description = "Mips EVA ASE", |
| 116 | .dependencies = 0, | |
| 116 | .dependencies = featureSet(&[_]Feature{}), | |
| 117 | 117 | }; |
| 118 | 118 | result[@enumToInt(Feature.fp64)] = .{ |
| 119 | 119 | .index = @enumToInt(Feature.fp64), |
| 120 | 120 | .name = @tagName(Feature.fp64), |
| 121 | 121 | .llvm_name = "fp64", |
| 122 | 122 | .description = "Support 64-bit FP registers", |
| 123 | .dependencies = 0, | |
| 123 | .dependencies = featureSet(&[_]Feature{}), | |
| 124 | 124 | }; |
| 125 | 125 | result[@enumToInt(Feature.fpxx)] = .{ |
| 126 | 126 | .index = @enumToInt(Feature.fpxx), |
| 127 | 127 | .name = @tagName(Feature.fpxx), |
| 128 | 128 | .llvm_name = "fpxx", |
| 129 | 129 | .description = "Support for FPXX", |
| 130 | .dependencies = 0, | |
| 130 | .dependencies = featureSet(&[_]Feature{}), | |
| 131 | 131 | }; |
| 132 | 132 | result[@enumToInt(Feature.ginv)] = .{ |
| 133 | 133 | .index = @enumToInt(Feature.ginv), |
| 134 | 134 | .name = @tagName(Feature.ginv), |
| 135 | 135 | .llvm_name = "ginv", |
| 136 | 136 | .description = "Mips Global Invalidate ASE", |
| 137 | .dependencies = 0, | |
| 137 | .dependencies = featureSet(&[_]Feature{}), | |
| 138 | 138 | }; |
| 139 | 139 | result[@enumToInt(Feature.gp64)] = .{ |
| 140 | 140 | .index = @enumToInt(Feature.gp64), |
| 141 | 141 | .name = @tagName(Feature.gp64), |
| 142 | 142 | .llvm_name = "gp64", |
| 143 | 143 | .description = "General Purpose Registers are 64-bit wide", |
| 144 | .dependencies = 0, | |
| 144 | .dependencies = featureSet(&[_]Feature{}), | |
| 145 | 145 | }; |
| 146 | 146 | result[@enumToInt(Feature.long_calls)] = .{ |
| 147 | 147 | .index = @enumToInt(Feature.long_calls), |
| 148 | 148 | .name = @tagName(Feature.long_calls), |
| 149 | 149 | .llvm_name = "long-calls", |
| 150 | 150 | .description = "Disable use of the jal instruction", |
| 151 | .dependencies = 0, | |
| 151 | .dependencies = featureSet(&[_]Feature{}), | |
| 152 | 152 | }; |
| 153 | 153 | result[@enumToInt(Feature.micromips)] = .{ |
| 154 | 154 | .index = @enumToInt(Feature.micromips), |
| 155 | 155 | .name = @tagName(Feature.micromips), |
| 156 | 156 | .llvm_name = "micromips", |
| 157 | 157 | .description = "microMips mode", |
| 158 | .dependencies = 0, | |
| 158 | .dependencies = featureSet(&[_]Feature{}), | |
| 159 | 159 | }; |
| 160 | 160 | result[@enumToInt(Feature.mips1)] = .{ |
| 161 | 161 | .index = @enumToInt(Feature.mips1), |
| 162 | 162 | .name = @tagName(Feature.mips1), |
| 163 | 163 | .llvm_name = "mips1", |
| 164 | 164 | .description = "Mips I ISA Support [highly experimental]", |
| 165 | .dependencies = 0, | |
| 165 | .dependencies = featureSet(&[_]Feature{}), | |
| 166 | 166 | }; |
| 167 | 167 | result[@enumToInt(Feature.mips16)] = .{ |
| 168 | 168 | .index = @enumToInt(Feature.mips16), |
| 169 | 169 | .name = @tagName(Feature.mips16), |
| 170 | 170 | .llvm_name = "mips16", |
| 171 | 171 | .description = "Mips16 mode", |
| 172 | .dependencies = 0, | |
| 172 | .dependencies = featureSet(&[_]Feature{}), | |
| 173 | 173 | }; |
| 174 | 174 | result[@enumToInt(Feature.mips2)] = .{ |
| 175 | 175 | .index = @enumToInt(Feature.mips2), |
| ... | ... | @@ -251,14 +251,14 @@ pub const all_features = blk: { |
| 251 | 251 | .name = @tagName(Feature.mips3_32), |
| 252 | 252 | .llvm_name = "mips3_32", |
| 253 | 253 | .description = "Subset of MIPS-III that is also in MIPS32 [highly experimental]", |
| 254 | .dependencies = 0, | |
| 254 | .dependencies = featureSet(&[_]Feature{}), | |
| 255 | 255 | }; |
| 256 | 256 | result[@enumToInt(Feature.mips3_32r2)] = .{ |
| 257 | 257 | .index = @enumToInt(Feature.mips3_32r2), |
| 258 | 258 | .name = @tagName(Feature.mips3_32r2), |
| 259 | 259 | .llvm_name = "mips3_32r2", |
| 260 | 260 | .description = "Subset of MIPS-III that is also in MIPS32r2 [highly experimental]", |
| 261 | .dependencies = 0, | |
| 261 | .dependencies = featureSet(&[_]Feature{}), | |
| 262 | 262 | }; |
| 263 | 263 | result[@enumToInt(Feature.mips4)] = .{ |
| 264 | 264 | .index = @enumToInt(Feature.mips4), |
| ... | ... | @@ -276,14 +276,14 @@ pub const all_features = blk: { |
| 276 | 276 | .name = @tagName(Feature.mips4_32), |
| 277 | 277 | .llvm_name = "mips4_32", |
| 278 | 278 | .description = "Subset of MIPS-IV that is also in MIPS32 [highly experimental]", |
| 279 | .dependencies = 0, | |
| 279 | .dependencies = featureSet(&[_]Feature{}), | |
| 280 | 280 | }; |
| 281 | 281 | result[@enumToInt(Feature.mips4_32r2)] = .{ |
| 282 | 282 | .index = @enumToInt(Feature.mips4_32r2), |
| 283 | 283 | .name = @tagName(Feature.mips4_32r2), |
| 284 | 284 | .llvm_name = "mips4_32r2", |
| 285 | 285 | .description = "Subset of MIPS-IV that is also in MIPS32r2 [highly experimental]", |
| 286 | .dependencies = 0, | |
| 286 | .dependencies = featureSet(&[_]Feature{}), | |
| 287 | 287 | }; |
| 288 | 288 | result[@enumToInt(Feature.mips5)] = .{ |
| 289 | 289 | .index = @enumToInt(Feature.mips5), |
| ... | ... | @@ -300,7 +300,7 @@ pub const all_features = blk: { |
| 300 | 300 | .name = @tagName(Feature.mips5_32r2), |
| 301 | 301 | .llvm_name = "mips5_32r2", |
| 302 | 302 | .description = "Subset of MIPS-V that is also in MIPS32r2 [highly experimental]", |
| 303 | .dependencies = 0, | |
| 303 | .dependencies = featureSet(&[_]Feature{}), | |
| 304 | 304 | }; |
| 305 | 305 | result[@enumToInt(Feature.mips64)] = .{ |
| 306 | 306 | .index = @enumToInt(Feature.mips64), |
| ... | ... | @@ -359,42 +359,42 @@ pub const all_features = blk: { |
| 359 | 359 | .name = @tagName(Feature.msa), |
| 360 | 360 | .llvm_name = "msa", |
| 361 | 361 | .description = "Mips MSA ASE", |
| 362 | .dependencies = 0, | |
| 362 | .dependencies = featureSet(&[_]Feature{}), | |
| 363 | 363 | }; |
| 364 | 364 | result[@enumToInt(Feature.mt)] = .{ |
| 365 | 365 | .index = @enumToInt(Feature.mt), |
| 366 | 366 | .name = @tagName(Feature.mt), |
| 367 | 367 | .llvm_name = "mt", |
| 368 | 368 | .description = "Mips MT ASE", |
| 369 | .dependencies = 0, | |
| 369 | .dependencies = featureSet(&[_]Feature{}), | |
| 370 | 370 | }; |
| 371 | 371 | result[@enumToInt(Feature.nan2008)] = .{ |
| 372 | 372 | .index = @enumToInt(Feature.nan2008), |
| 373 | 373 | .name = @tagName(Feature.nan2008), |
| 374 | 374 | .llvm_name = "nan2008", |
| 375 | 375 | .description = "IEEE 754-2008 NaN encoding", |
| 376 | .dependencies = 0, | |
| 376 | .dependencies = featureSet(&[_]Feature{}), | |
| 377 | 377 | }; |
| 378 | 378 | result[@enumToInt(Feature.noabicalls)] = .{ |
| 379 | 379 | .index = @enumToInt(Feature.noabicalls), |
| 380 | 380 | .name = @tagName(Feature.noabicalls), |
| 381 | 381 | .llvm_name = "noabicalls", |
| 382 | 382 | .description = "Disable SVR4-style position-independent code", |
| 383 | .dependencies = 0, | |
| 383 | .dependencies = featureSet(&[_]Feature{}), | |
| 384 | 384 | }; |
| 385 | 385 | result[@enumToInt(Feature.nomadd4)] = .{ |
| 386 | 386 | .index = @enumToInt(Feature.nomadd4), |
| 387 | 387 | .name = @tagName(Feature.nomadd4), |
| 388 | 388 | .llvm_name = "nomadd4", |
| 389 | 389 | .description = "Disable 4-operand madd.fmt and related instructions", |
| 390 | .dependencies = 0, | |
| 390 | .dependencies = featureSet(&[_]Feature{}), | |
| 391 | 391 | }; |
| 392 | 392 | result[@enumToInt(Feature.nooddspreg)] = .{ |
| 393 | 393 | .index = @enumToInt(Feature.nooddspreg), |
| 394 | 394 | .name = @tagName(Feature.nooddspreg), |
| 395 | 395 | .llvm_name = "nooddspreg", |
| 396 | 396 | .description = "Disable odd numbered single-precision registers", |
| 397 | .dependencies = 0, | |
| 397 | .dependencies = featureSet(&[_]Feature{}), | |
| 398 | 398 | }; |
| 399 | 399 | result[@enumToInt(Feature.p5600)] = .{ |
| 400 | 400 | .index = @enumToInt(Feature.p5600), |
| ... | ... | @@ -410,56 +410,56 @@ pub const all_features = blk: { |
| 410 | 410 | .name = @tagName(Feature.ptr64), |
| 411 | 411 | .llvm_name = "ptr64", |
| 412 | 412 | .description = "Pointers are 64-bit wide", |
| 413 | .dependencies = 0, | |
| 413 | .dependencies = featureSet(&[_]Feature{}), | |
| 414 | 414 | }; |
| 415 | 415 | result[@enumToInt(Feature.single_float)] = .{ |
| 416 | 416 | .index = @enumToInt(Feature.single_float), |
| 417 | 417 | .name = @tagName(Feature.single_float), |
| 418 | 418 | .llvm_name = "single-float", |
| 419 | 419 | .description = "Only supports single precision float", |
| 420 | .dependencies = 0, | |
| 420 | .dependencies = featureSet(&[_]Feature{}), | |
| 421 | 421 | }; |
| 422 | 422 | result[@enumToInt(Feature.soft_float)] = .{ |
| 423 | 423 | .index = @enumToInt(Feature.soft_float), |
| 424 | 424 | .name = @tagName(Feature.soft_float), |
| 425 | 425 | .llvm_name = "soft-float", |
| 426 | 426 | .description = "Does not support floating point instructions", |
| 427 | .dependencies = 0, | |
| 427 | .dependencies = featureSet(&[_]Feature{}), | |
| 428 | 428 | }; |
| 429 | 429 | result[@enumToInt(Feature.sym32)] = .{ |
| 430 | 430 | .index = @enumToInt(Feature.sym32), |
| 431 | 431 | .name = @tagName(Feature.sym32), |
| 432 | 432 | .llvm_name = "sym32", |
| 433 | 433 | .description = "Symbols are 32 bit on Mips64", |
| 434 | .dependencies = 0, | |
| 434 | .dependencies = featureSet(&[_]Feature{}), | |
| 435 | 435 | }; |
| 436 | 436 | result[@enumToInt(Feature.use_indirect_jump_hazard)] = .{ |
| 437 | 437 | .index = @enumToInt(Feature.use_indirect_jump_hazard), |
| 438 | 438 | .name = @tagName(Feature.use_indirect_jump_hazard), |
| 439 | 439 | .llvm_name = "use-indirect-jump-hazard", |
| 440 | 440 | .description = "Use indirect jump guards to prevent certain speculation based attacks", |
| 441 | .dependencies = 0, | |
| 441 | .dependencies = featureSet(&[_]Feature{}), | |
| 442 | 442 | }; |
| 443 | 443 | result[@enumToInt(Feature.use_tcc_in_div)] = .{ |
| 444 | 444 | .index = @enumToInt(Feature.use_tcc_in_div), |
| 445 | 445 | .name = @tagName(Feature.use_tcc_in_div), |
| 446 | 446 | .llvm_name = "use-tcc-in-div", |
| 447 | 447 | .description = "Force the assembler to use trapping", |
| 448 | .dependencies = 0, | |
| 448 | .dependencies = featureSet(&[_]Feature{}), | |
| 449 | 449 | }; |
| 450 | 450 | result[@enumToInt(Feature.vfpu)] = .{ |
| 451 | 451 | .index = @enumToInt(Feature.vfpu), |
| 452 | 452 | .name = @tagName(Feature.vfpu), |
| 453 | 453 | .llvm_name = "vfpu", |
| 454 | 454 | .description = "Enable vector FPU instructions", |
| 455 | .dependencies = 0, | |
| 455 | .dependencies = featureSet(&[_]Feature{}), | |
| 456 | 456 | }; |
| 457 | 457 | result[@enumToInt(Feature.virt)] = .{ |
| 458 | 458 | .index = @enumToInt(Feature.virt), |
| 459 | 459 | .name = @tagName(Feature.virt), |
| 460 | 460 | .llvm_name = "virt", |
| 461 | 461 | .description = "Mips Virtualization ASE", |
| 462 | .dependencies = 0, | |
| 462 | .dependencies = featureSet(&[_]Feature{}), | |
| 463 | 463 | }; |
| 464 | 464 | break :blk result; |
| 465 | 465 | }; |
lib/std/target/msp430.zig+7-7| ... | ... | @@ -12,35 +12,35 @@ pub usingnamespace Cpu.Feature.feature_set_fns(Feature); |
| 12 | 12 | |
| 13 | 13 | pub const all_features = blk: { |
| 14 | 14 | const len = @typeInfo(Feature).Enum.fields.len; |
| 15 | std.debug.assert(len <= @typeInfo(Cpu.Feature.Set).Int.bits); | |
| 15 | std.debug.assert(len <= Cpu.Feature.Set.bit_count); | |
| 16 | 16 | var result: [len]Cpu.Feature = undefined; |
| 17 | 17 | result[@enumToInt(Feature.ext)] = .{ |
| 18 | 18 | .index = @enumToInt(Feature.ext), |
| 19 | 19 | .name = @tagName(Feature.ext), |
| 20 | 20 | .llvm_name = "ext", |
| 21 | 21 | .description = "Enable MSP430-X extensions", |
| 22 | .dependencies = 0, | |
| 22 | .dependencies = featureSet(&[_]Feature{}), | |
| 23 | 23 | }; |
| 24 | 24 | result[@enumToInt(Feature.hwmult16)] = .{ |
| 25 | 25 | .index = @enumToInt(Feature.hwmult16), |
| 26 | 26 | .name = @tagName(Feature.hwmult16), |
| 27 | 27 | .llvm_name = "hwmult16", |
| 28 | 28 | .description = "Enable 16-bit hardware multiplier", |
| 29 | .dependencies = 0, | |
| 29 | .dependencies = featureSet(&[_]Feature{}), | |
| 30 | 30 | }; |
| 31 | 31 | result[@enumToInt(Feature.hwmult32)] = .{ |
| 32 | 32 | .index = @enumToInt(Feature.hwmult32), |
| 33 | 33 | .name = @tagName(Feature.hwmult32), |
| 34 | 34 | .llvm_name = "hwmult32", |
| 35 | 35 | .description = "Enable 32-bit hardware multiplier", |
| 36 | .dependencies = 0, | |
| 36 | .dependencies = featureSet(&[_]Feature{}), | |
| 37 | 37 | }; |
| 38 | 38 | result[@enumToInt(Feature.hwmultf5)] = .{ |
| 39 | 39 | .index = @enumToInt(Feature.hwmultf5), |
| 40 | 40 | .name = @tagName(Feature.hwmultf5), |
| 41 | 41 | .llvm_name = "hwmultf5", |
| 42 | 42 | .description = "Enable F5 series hardware multiplier", |
| 43 | .dependencies = 0, | |
| 43 | .dependencies = featureSet(&[_]Feature{}), | |
| 44 | 44 | }; |
| 45 | 45 | break :blk result; |
| 46 | 46 | }; |
| ... | ... | @@ -49,12 +49,12 @@ pub const cpu = struct { |
| 49 | 49 | pub const generic = Cpu{ |
| 50 | 50 | .name = "generic", |
| 51 | 51 | .llvm_name = "generic", |
| 52 | .features = 0, | |
| 52 | .features = featureSet(&[_]Feature{}), | |
| 53 | 53 | }; |
| 54 | 54 | pub const msp430 = Cpu{ |
| 55 | 55 | .name = "msp430", |
| 56 | 56 | .llvm_name = "msp430", |
| 57 | .features = 0, | |
| 57 | .features = featureSet(&[_]Feature{}), | |
| 58 | 58 | }; |
| 59 | 59 | pub const msp430x = Cpu{ |
| 60 | 60 | .name = "msp430x", |
lib/std/target/nvptx.zig+26-26| ... | ... | @@ -33,182 +33,182 @@ pub usingnamespace Cpu.Feature.feature_set_fns(Feature); |
| 33 | 33 | |
| 34 | 34 | pub const all_features = blk: { |
| 35 | 35 | const len = @typeInfo(Feature).Enum.fields.len; |
| 36 | std.debug.assert(len <= @typeInfo(Cpu.Feature.Set).Int.bits); | |
| 36 | std.debug.assert(len <= Cpu.Feature.Set.bit_count); | |
| 37 | 37 | var result: [len]Cpu.Feature = undefined; |
| 38 | 38 | result[@enumToInt(Feature.ptx32)] = .{ |
| 39 | 39 | .index = @enumToInt(Feature.ptx32), |
| 40 | 40 | .name = @tagName(Feature.ptx32), |
| 41 | 41 | .llvm_name = "ptx32", |
| 42 | 42 | .description = "Use PTX version 3.2", |
| 43 | .dependencies = 0, | |
| 43 | .dependencies = featureSet(&[_]Feature{}), | |
| 44 | 44 | }; |
| 45 | 45 | result[@enumToInt(Feature.ptx40)] = .{ |
| 46 | 46 | .index = @enumToInt(Feature.ptx40), |
| 47 | 47 | .name = @tagName(Feature.ptx40), |
| 48 | 48 | .llvm_name = "ptx40", |
| 49 | 49 | .description = "Use PTX version 4.0", |
| 50 | .dependencies = 0, | |
| 50 | .dependencies = featureSet(&[_]Feature{}), | |
| 51 | 51 | }; |
| 52 | 52 | result[@enumToInt(Feature.ptx41)] = .{ |
| 53 | 53 | .index = @enumToInt(Feature.ptx41), |
| 54 | 54 | .name = @tagName(Feature.ptx41), |
| 55 | 55 | .llvm_name = "ptx41", |
| 56 | 56 | .description = "Use PTX version 4.1", |
| 57 | .dependencies = 0, | |
| 57 | .dependencies = featureSet(&[_]Feature{}), | |
| 58 | 58 | }; |
| 59 | 59 | result[@enumToInt(Feature.ptx42)] = .{ |
| 60 | 60 | .index = @enumToInt(Feature.ptx42), |
| 61 | 61 | .name = @tagName(Feature.ptx42), |
| 62 | 62 | .llvm_name = "ptx42", |
| 63 | 63 | .description = "Use PTX version 4.2", |
| 64 | .dependencies = 0, | |
| 64 | .dependencies = featureSet(&[_]Feature{}), | |
| 65 | 65 | }; |
| 66 | 66 | result[@enumToInt(Feature.ptx43)] = .{ |
| 67 | 67 | .index = @enumToInt(Feature.ptx43), |
| 68 | 68 | .name = @tagName(Feature.ptx43), |
| 69 | 69 | .llvm_name = "ptx43", |
| 70 | 70 | .description = "Use PTX version 4.3", |
| 71 | .dependencies = 0, | |
| 71 | .dependencies = featureSet(&[_]Feature{}), | |
| 72 | 72 | }; |
| 73 | 73 | result[@enumToInt(Feature.ptx50)] = .{ |
| 74 | 74 | .index = @enumToInt(Feature.ptx50), |
| 75 | 75 | .name = @tagName(Feature.ptx50), |
| 76 | 76 | .llvm_name = "ptx50", |
| 77 | 77 | .description = "Use PTX version 5.0", |
| 78 | .dependencies = 0, | |
| 78 | .dependencies = featureSet(&[_]Feature{}), | |
| 79 | 79 | }; |
| 80 | 80 | result[@enumToInt(Feature.ptx60)] = .{ |
| 81 | 81 | .index = @enumToInt(Feature.ptx60), |
| 82 | 82 | .name = @tagName(Feature.ptx60), |
| 83 | 83 | .llvm_name = "ptx60", |
| 84 | 84 | .description = "Use PTX version 6.0", |
| 85 | .dependencies = 0, | |
| 85 | .dependencies = featureSet(&[_]Feature{}), | |
| 86 | 86 | }; |
| 87 | 87 | result[@enumToInt(Feature.ptx61)] = .{ |
| 88 | 88 | .index = @enumToInt(Feature.ptx61), |
| 89 | 89 | .name = @tagName(Feature.ptx61), |
| 90 | 90 | .llvm_name = "ptx61", |
| 91 | 91 | .description = "Use PTX version 6.1", |
| 92 | .dependencies = 0, | |
| 92 | .dependencies = featureSet(&[_]Feature{}), | |
| 93 | 93 | }; |
| 94 | 94 | result[@enumToInt(Feature.ptx63)] = .{ |
| 95 | 95 | .index = @enumToInt(Feature.ptx63), |
| 96 | 96 | .name = @tagName(Feature.ptx63), |
| 97 | 97 | .llvm_name = "ptx63", |
| 98 | 98 | .description = "Use PTX version 6.3", |
| 99 | .dependencies = 0, | |
| 99 | .dependencies = featureSet(&[_]Feature{}), | |
| 100 | 100 | }; |
| 101 | 101 | result[@enumToInt(Feature.ptx64)] = .{ |
| 102 | 102 | .index = @enumToInt(Feature.ptx64), |
| 103 | 103 | .name = @tagName(Feature.ptx64), |
| 104 | 104 | .llvm_name = "ptx64", |
| 105 | 105 | .description = "Use PTX version 6.4", |
| 106 | .dependencies = 0, | |
| 106 | .dependencies = featureSet(&[_]Feature{}), | |
| 107 | 107 | }; |
| 108 | 108 | result[@enumToInt(Feature.sm_20)] = .{ |
| 109 | 109 | .index = @enumToInt(Feature.sm_20), |
| 110 | 110 | .name = @tagName(Feature.sm_20), |
| 111 | 111 | .llvm_name = "sm_20", |
| 112 | 112 | .description = "Target SM 2.0", |
| 113 | .dependencies = 0, | |
| 113 | .dependencies = featureSet(&[_]Feature{}), | |
| 114 | 114 | }; |
| 115 | 115 | result[@enumToInt(Feature.sm_21)] = .{ |
| 116 | 116 | .index = @enumToInt(Feature.sm_21), |
| 117 | 117 | .name = @tagName(Feature.sm_21), |
| 118 | 118 | .llvm_name = "sm_21", |
| 119 | 119 | .description = "Target SM 2.1", |
| 120 | .dependencies = 0, | |
| 120 | .dependencies = featureSet(&[_]Feature{}), | |
| 121 | 121 | }; |
| 122 | 122 | result[@enumToInt(Feature.sm_30)] = .{ |
| 123 | 123 | .index = @enumToInt(Feature.sm_30), |
| 124 | 124 | .name = @tagName(Feature.sm_30), |
| 125 | 125 | .llvm_name = "sm_30", |
| 126 | 126 | .description = "Target SM 3.0", |
| 127 | .dependencies = 0, | |
| 127 | .dependencies = featureSet(&[_]Feature{}), | |
| 128 | 128 | }; |
| 129 | 129 | result[@enumToInt(Feature.sm_32)] = .{ |
| 130 | 130 | .index = @enumToInt(Feature.sm_32), |
| 131 | 131 | .name = @tagName(Feature.sm_32), |
| 132 | 132 | .llvm_name = "sm_32", |
| 133 | 133 | .description = "Target SM 3.2", |
| 134 | .dependencies = 0, | |
| 134 | .dependencies = featureSet(&[_]Feature{}), | |
| 135 | 135 | }; |
| 136 | 136 | result[@enumToInt(Feature.sm_35)] = .{ |
| 137 | 137 | .index = @enumToInt(Feature.sm_35), |
| 138 | 138 | .name = @tagName(Feature.sm_35), |
| 139 | 139 | .llvm_name = "sm_35", |
| 140 | 140 | .description = "Target SM 3.5", |
| 141 | .dependencies = 0, | |
| 141 | .dependencies = featureSet(&[_]Feature{}), | |
| 142 | 142 | }; |
| 143 | 143 | result[@enumToInt(Feature.sm_37)] = .{ |
| 144 | 144 | .index = @enumToInt(Feature.sm_37), |
| 145 | 145 | .name = @tagName(Feature.sm_37), |
| 146 | 146 | .llvm_name = "sm_37", |
| 147 | 147 | .description = "Target SM 3.7", |
| 148 | .dependencies = 0, | |
| 148 | .dependencies = featureSet(&[_]Feature{}), | |
| 149 | 149 | }; |
| 150 | 150 | result[@enumToInt(Feature.sm_50)] = .{ |
| 151 | 151 | .index = @enumToInt(Feature.sm_50), |
| 152 | 152 | .name = @tagName(Feature.sm_50), |
| 153 | 153 | .llvm_name = "sm_50", |
| 154 | 154 | .description = "Target SM 5.0", |
| 155 | .dependencies = 0, | |
| 155 | .dependencies = featureSet(&[_]Feature{}), | |
| 156 | 156 | }; |
| 157 | 157 | result[@enumToInt(Feature.sm_52)] = .{ |
| 158 | 158 | .index = @enumToInt(Feature.sm_52), |
| 159 | 159 | .name = @tagName(Feature.sm_52), |
| 160 | 160 | .llvm_name = "sm_52", |
| 161 | 161 | .description = "Target SM 5.2", |
| 162 | .dependencies = 0, | |
| 162 | .dependencies = featureSet(&[_]Feature{}), | |
| 163 | 163 | }; |
| 164 | 164 | result[@enumToInt(Feature.sm_53)] = .{ |
| 165 | 165 | .index = @enumToInt(Feature.sm_53), |
| 166 | 166 | .name = @tagName(Feature.sm_53), |
| 167 | 167 | .llvm_name = "sm_53", |
| 168 | 168 | .description = "Target SM 5.3", |
| 169 | .dependencies = 0, | |
| 169 | .dependencies = featureSet(&[_]Feature{}), | |
| 170 | 170 | }; |
| 171 | 171 | result[@enumToInt(Feature.sm_60)] = .{ |
| 172 | 172 | .index = @enumToInt(Feature.sm_60), |
| 173 | 173 | .name = @tagName(Feature.sm_60), |
| 174 | 174 | .llvm_name = "sm_60", |
| 175 | 175 | .description = "Target SM 6.0", |
| 176 | .dependencies = 0, | |
| 176 | .dependencies = featureSet(&[_]Feature{}), | |
| 177 | 177 | }; |
| 178 | 178 | result[@enumToInt(Feature.sm_61)] = .{ |
| 179 | 179 | .index = @enumToInt(Feature.sm_61), |
| 180 | 180 | .name = @tagName(Feature.sm_61), |
| 181 | 181 | .llvm_name = "sm_61", |
| 182 | 182 | .description = "Target SM 6.1", |
| 183 | .dependencies = 0, | |
| 183 | .dependencies = featureSet(&[_]Feature{}), | |
| 184 | 184 | }; |
| 185 | 185 | result[@enumToInt(Feature.sm_62)] = .{ |
| 186 | 186 | .index = @enumToInt(Feature.sm_62), |
| 187 | 187 | .name = @tagName(Feature.sm_62), |
| 188 | 188 | .llvm_name = "sm_62", |
| 189 | 189 | .description = "Target SM 6.2", |
| 190 | .dependencies = 0, | |
| 190 | .dependencies = featureSet(&[_]Feature{}), | |
| 191 | 191 | }; |
| 192 | 192 | result[@enumToInt(Feature.sm_70)] = .{ |
| 193 | 193 | .index = @enumToInt(Feature.sm_70), |
| 194 | 194 | .name = @tagName(Feature.sm_70), |
| 195 | 195 | .llvm_name = "sm_70", |
| 196 | 196 | .description = "Target SM 7.0", |
| 197 | .dependencies = 0, | |
| 197 | .dependencies = featureSet(&[_]Feature{}), | |
| 198 | 198 | }; |
| 199 | 199 | result[@enumToInt(Feature.sm_72)] = .{ |
| 200 | 200 | .index = @enumToInt(Feature.sm_72), |
| 201 | 201 | .name = @tagName(Feature.sm_72), |
| 202 | 202 | .llvm_name = "sm_72", |
| 203 | 203 | .description = "Target SM 7.2", |
| 204 | .dependencies = 0, | |
| 204 | .dependencies = featureSet(&[_]Feature{}), | |
| 205 | 205 | }; |
| 206 | 206 | result[@enumToInt(Feature.sm_75)] = .{ |
| 207 | 207 | .index = @enumToInt(Feature.sm_75), |
| 208 | 208 | .name = @tagName(Feature.sm_75), |
| 209 | 209 | .llvm_name = "sm_75", |
| 210 | 210 | .description = "Target SM 7.5", |
| 211 | .dependencies = 0, | |
| 211 | .dependencies = featureSet(&[_]Feature{}), | |
| 212 | 212 | }; |
| 213 | 213 | break :blk result; |
| 214 | 214 | }; |
lib/std/target/powerpc.zig+44-44| ... | ... | @@ -59,21 +59,21 @@ pub usingnamespace Cpu.Feature.feature_set_fns(Feature); |
| 59 | 59 | |
| 60 | 60 | pub const all_features = blk: { |
| 61 | 61 | const len = @typeInfo(Feature).Enum.fields.len; |
| 62 | std.debug.assert(len <= @typeInfo(Cpu.Feature.Set).Int.bits); | |
| 62 | std.debug.assert(len <= Cpu.Feature.Set.bit_count); | |
| 63 | 63 | var result: [len]Cpu.Feature = undefined; |
| 64 | 64 | result[@enumToInt(Feature.@"64bit")] = .{ |
| 65 | 65 | .index = @enumToInt(Feature.@"64bit"), |
| 66 | 66 | .name = @tagName(Feature.@"64bit"), |
| 67 | 67 | .llvm_name = "64bit", |
| 68 | 68 | .description = "Enable 64-bit instructions", |
| 69 | .dependencies = 0, | |
| 69 | .dependencies = featureSet(&[_]Feature{}), | |
| 70 | 70 | }; |
| 71 | 71 | result[@enumToInt(Feature.@"64bitregs")] = .{ |
| 72 | 72 | .index = @enumToInt(Feature.@"64bitregs"), |
| 73 | 73 | .name = @tagName(Feature.@"64bitregs"), |
| 74 | 74 | .llvm_name = "64bitregs", |
| 75 | 75 | .description = "Enable 64-bit registers usage for ppc32 [beta]", |
| 76 | .dependencies = 0, | |
| 76 | .dependencies = featureSet(&[_]Feature{}), | |
| 77 | 77 | }; |
| 78 | 78 | result[@enumToInt(Feature.altivec)] = .{ |
| 79 | 79 | .index = @enumToInt(Feature.altivec), |
| ... | ... | @@ -98,21 +98,21 @@ pub const all_features = blk: { |
| 98 | 98 | .name = @tagName(Feature.bpermd), |
| 99 | 99 | .llvm_name = "bpermd", |
| 100 | 100 | .description = "Enable the bpermd instruction", |
| 101 | .dependencies = 0, | |
| 101 | .dependencies = featureSet(&[_]Feature{}), | |
| 102 | 102 | }; |
| 103 | 103 | result[@enumToInt(Feature.cmpb)] = .{ |
| 104 | 104 | .index = @enumToInt(Feature.cmpb), |
| 105 | 105 | .name = @tagName(Feature.cmpb), |
| 106 | 106 | .llvm_name = "cmpb", |
| 107 | 107 | .description = "Enable the cmpb instruction", |
| 108 | .dependencies = 0, | |
| 108 | .dependencies = featureSet(&[_]Feature{}), | |
| 109 | 109 | }; |
| 110 | 110 | result[@enumToInt(Feature.crbits)] = .{ |
| 111 | 111 | .index = @enumToInt(Feature.crbits), |
| 112 | 112 | .name = @tagName(Feature.crbits), |
| 113 | 113 | .llvm_name = "crbits", |
| 114 | 114 | .description = "Use condition-register bits individually", |
| 115 | .dependencies = 0, | |
| 115 | .dependencies = featureSet(&[_]Feature{}), | |
| 116 | 116 | }; |
| 117 | 117 | result[@enumToInt(Feature.crypto)] = .{ |
| 118 | 118 | .index = @enumToInt(Feature.crypto), |
| ... | ... | @@ -137,14 +137,14 @@ pub const all_features = blk: { |
| 137 | 137 | .name = @tagName(Feature.e500), |
| 138 | 138 | .llvm_name = "e500", |
| 139 | 139 | .description = "Enable E500/E500mc instructions", |
| 140 | .dependencies = 0, | |
| 140 | .dependencies = featureSet(&[_]Feature{}), | |
| 141 | 141 | }; |
| 142 | 142 | result[@enumToInt(Feature.extdiv)] = .{ |
| 143 | 143 | .index = @enumToInt(Feature.extdiv), |
| 144 | 144 | .name = @tagName(Feature.extdiv), |
| 145 | 145 | .llvm_name = "extdiv", |
| 146 | 146 | .description = "Enable extended divide instructions", |
| 147 | .dependencies = 0, | |
| 147 | .dependencies = featureSet(&[_]Feature{}), | |
| 148 | 148 | }; |
| 149 | 149 | result[@enumToInt(Feature.fcpsgn)] = .{ |
| 150 | 150 | .index = @enumToInt(Feature.fcpsgn), |
| ... | ... | @@ -241,49 +241,49 @@ pub const all_features = blk: { |
| 241 | 241 | .name = @tagName(Feature.hard_float), |
| 242 | 242 | .llvm_name = "hard-float", |
| 243 | 243 | .description = "Enable floating-point instructions", |
| 244 | .dependencies = 0, | |
| 244 | .dependencies = featureSet(&[_]Feature{}), | |
| 245 | 245 | }; |
| 246 | 246 | result[@enumToInt(Feature.htm)] = .{ |
| 247 | 247 | .index = @enumToInt(Feature.htm), |
| 248 | 248 | .name = @tagName(Feature.htm), |
| 249 | 249 | .llvm_name = "htm", |
| 250 | 250 | .description = "Enable Hardware Transactional Memory instructions", |
| 251 | .dependencies = 0, | |
| 251 | .dependencies = featureSet(&[_]Feature{}), | |
| 252 | 252 | }; |
| 253 | 253 | result[@enumToInt(Feature.icbt)] = .{ |
| 254 | 254 | .index = @enumToInt(Feature.icbt), |
| 255 | 255 | .name = @tagName(Feature.icbt), |
| 256 | 256 | .llvm_name = "icbt", |
| 257 | 257 | .description = "Enable icbt instruction", |
| 258 | .dependencies = 0, | |
| 258 | .dependencies = featureSet(&[_]Feature{}), | |
| 259 | 259 | }; |
| 260 | 260 | result[@enumToInt(Feature.invariant_function_descriptors)] = .{ |
| 261 | 261 | .index = @enumToInt(Feature.invariant_function_descriptors), |
| 262 | 262 | .name = @tagName(Feature.invariant_function_descriptors), |
| 263 | 263 | .llvm_name = "invariant-function-descriptors", |
| 264 | 264 | .description = "Assume function descriptors are invariant", |
| 265 | .dependencies = 0, | |
| 265 | .dependencies = featureSet(&[_]Feature{}), | |
| 266 | 266 | }; |
| 267 | 267 | result[@enumToInt(Feature.isa_v30_instructions)] = .{ |
| 268 | 268 | .index = @enumToInt(Feature.isa_v30_instructions), |
| 269 | 269 | .name = @tagName(Feature.isa_v30_instructions), |
| 270 | 270 | .llvm_name = "isa-v30-instructions", |
| 271 | 271 | .description = "Enable instructions added in ISA 3.0.", |
| 272 | .dependencies = 0, | |
| 272 | .dependencies = featureSet(&[_]Feature{}), | |
| 273 | 273 | }; |
| 274 | 274 | result[@enumToInt(Feature.isel)] = .{ |
| 275 | 275 | .index = @enumToInt(Feature.isel), |
| 276 | 276 | .name = @tagName(Feature.isel), |
| 277 | 277 | .llvm_name = "isel", |
| 278 | 278 | .description = "Enable the isel instruction", |
| 279 | .dependencies = 0, | |
| 279 | .dependencies = featureSet(&[_]Feature{}), | |
| 280 | 280 | }; |
| 281 | 281 | result[@enumToInt(Feature.ldbrx)] = .{ |
| 282 | 282 | .index = @enumToInt(Feature.ldbrx), |
| 283 | 283 | .name = @tagName(Feature.ldbrx), |
| 284 | 284 | .llvm_name = "ldbrx", |
| 285 | 285 | .description = "Enable the ldbrx instruction", |
| 286 | .dependencies = 0, | |
| 286 | .dependencies = featureSet(&[_]Feature{}), | |
| 287 | 287 | }; |
| 288 | 288 | result[@enumToInt(Feature.lfiwax)] = .{ |
| 289 | 289 | .index = @enumToInt(Feature.lfiwax), |
| ... | ... | @@ -299,14 +299,14 @@ pub const all_features = blk: { |
| 299 | 299 | .name = @tagName(Feature.longcall), |
| 300 | 300 | .llvm_name = "longcall", |
| 301 | 301 | .description = "Always use indirect calls", |
| 302 | .dependencies = 0, | |
| 302 | .dependencies = featureSet(&[_]Feature{}), | |
| 303 | 303 | }; |
| 304 | 304 | result[@enumToInt(Feature.mfocrf)] = .{ |
| 305 | 305 | .index = @enumToInt(Feature.mfocrf), |
| 306 | 306 | .name = @tagName(Feature.mfocrf), |
| 307 | 307 | .llvm_name = "mfocrf", |
| 308 | 308 | .description = "Enable the MFOCRF instruction", |
| 309 | .dependencies = 0, | |
| 309 | .dependencies = featureSet(&[_]Feature{}), | |
| 310 | 310 | }; |
| 311 | 311 | result[@enumToInt(Feature.msync)] = .{ |
| 312 | 312 | .index = @enumToInt(Feature.msync), |
| ... | ... | @@ -322,14 +322,14 @@ pub const all_features = blk: { |
| 322 | 322 | .name = @tagName(Feature.partword_atomics), |
| 323 | 323 | .llvm_name = "partword-atomics", |
| 324 | 324 | .description = "Enable l[bh]arx and st[bh]cx.", |
| 325 | .dependencies = 0, | |
| 325 | .dependencies = featureSet(&[_]Feature{}), | |
| 326 | 326 | }; |
| 327 | 327 | result[@enumToInt(Feature.popcntd)] = .{ |
| 328 | 328 | .index = @enumToInt(Feature.popcntd), |
| 329 | 329 | .name = @tagName(Feature.popcntd), |
| 330 | 330 | .llvm_name = "popcntd", |
| 331 | 331 | .description = "Enable the popcnt[dw] instructions", |
| 332 | .dependencies = 0, | |
| 332 | .dependencies = featureSet(&[_]Feature{}), | |
| 333 | 333 | }; |
| 334 | 334 | result[@enumToInt(Feature.power8_altivec)] = .{ |
| 335 | 335 | .index = @enumToInt(Feature.power8_altivec), |
| ... | ... | @@ -376,28 +376,28 @@ pub const all_features = blk: { |
| 376 | 376 | .name = @tagName(Feature.ppc_postra_sched), |
| 377 | 377 | .llvm_name = "ppc-postra-sched", |
| 378 | 378 | .description = "Use PowerPC post-RA scheduling strategy", |
| 379 | .dependencies = 0, | |
| 379 | .dependencies = featureSet(&[_]Feature{}), | |
| 380 | 380 | }; |
| 381 | 381 | result[@enumToInt(Feature.ppc_prera_sched)] = .{ |
| 382 | 382 | .index = @enumToInt(Feature.ppc_prera_sched), |
| 383 | 383 | .name = @tagName(Feature.ppc_prera_sched), |
| 384 | 384 | .llvm_name = "ppc-prera-sched", |
| 385 | 385 | .description = "Use PowerPC pre-RA scheduling strategy", |
| 386 | .dependencies = 0, | |
| 386 | .dependencies = featureSet(&[_]Feature{}), | |
| 387 | 387 | }; |
| 388 | 388 | result[@enumToInt(Feature.ppc4xx)] = .{ |
| 389 | 389 | .index = @enumToInt(Feature.ppc4xx), |
| 390 | 390 | .name = @tagName(Feature.ppc4xx), |
| 391 | 391 | .llvm_name = "ppc4xx", |
| 392 | 392 | .description = "Enable PPC 4xx instructions", |
| 393 | .dependencies = 0, | |
| 393 | .dependencies = featureSet(&[_]Feature{}), | |
| 394 | 394 | }; |
| 395 | 395 | result[@enumToInt(Feature.ppc6xx)] = .{ |
| 396 | 396 | .index = @enumToInt(Feature.ppc6xx), |
| 397 | 397 | .name = @tagName(Feature.ppc6xx), |
| 398 | 398 | .llvm_name = "ppc6xx", |
| 399 | 399 | .description = "Enable PPC 6xx instructions", |
| 400 | .dependencies = 0, | |
| 400 | .dependencies = featureSet(&[_]Feature{}), | |
| 401 | 401 | }; |
| 402 | 402 | result[@enumToInt(Feature.qpx)] = .{ |
| 403 | 403 | .index = @enumToInt(Feature.qpx), |
| ... | ... | @@ -413,21 +413,21 @@ pub const all_features = blk: { |
| 413 | 413 | .name = @tagName(Feature.recipprec), |
| 414 | 414 | .llvm_name = "recipprec", |
| 415 | 415 | .description = "Assume higher precision reciprocal estimates", |
| 416 | .dependencies = 0, | |
| 416 | .dependencies = featureSet(&[_]Feature{}), | |
| 417 | 417 | }; |
| 418 | 418 | result[@enumToInt(Feature.secure_plt)] = .{ |
| 419 | 419 | .index = @enumToInt(Feature.secure_plt), |
| 420 | 420 | .name = @tagName(Feature.secure_plt), |
| 421 | 421 | .llvm_name = "secure-plt", |
| 422 | 422 | .description = "Enable secure plt mode", |
| 423 | .dependencies = 0, | |
| 423 | .dependencies = featureSet(&[_]Feature{}), | |
| 424 | 424 | }; |
| 425 | 425 | result[@enumToInt(Feature.slow_popcntd)] = .{ |
| 426 | 426 | .index = @enumToInt(Feature.slow_popcntd), |
| 427 | 427 | .name = @tagName(Feature.slow_popcntd), |
| 428 | 428 | .llvm_name = "slow-popcntd", |
| 429 | 429 | .description = "Has slow popcnt[dw] instructions", |
| 430 | .dependencies = 0, | |
| 430 | .dependencies = featureSet(&[_]Feature{}), | |
| 431 | 431 | }; |
| 432 | 432 | result[@enumToInt(Feature.spe)] = .{ |
| 433 | 433 | .index = @enumToInt(Feature.spe), |
| ... | ... | @@ -452,14 +452,14 @@ pub const all_features = blk: { |
| 452 | 452 | .name = @tagName(Feature.two_const_nr), |
| 453 | 453 | .llvm_name = "two-const-nr", |
| 454 | 454 | .description = "Requires two constant Newton-Raphson computation", |
| 455 | .dependencies = 0, | |
| 455 | .dependencies = featureSet(&[_]Feature{}), | |
| 456 | 456 | }; |
| 457 | 457 | result[@enumToInt(Feature.vectors_use_two_units)] = .{ |
| 458 | 458 | .index = @enumToInt(Feature.vectors_use_two_units), |
| 459 | 459 | .name = @tagName(Feature.vectors_use_two_units), |
| 460 | 460 | .llvm_name = "vectors-use-two-units", |
| 461 | 461 | .description = "Vectors use two units", |
| 462 | .dependencies = 0, | |
| 462 | .dependencies = featureSet(&[_]Feature{}), | |
| 463 | 463 | }; |
| 464 | 464 | result[@enumToInt(Feature.vsx)] = .{ |
| 465 | 465 | .index = @enumToInt(Feature.vsx), |
| ... | ... | @@ -475,7 +475,7 @@ pub const all_features = blk: { |
| 475 | 475 | |
| 476 | 476 | pub const cpu = struct { |
| 477 | 477 | pub const @"440" = Cpu{ |
| 478 | .name = "@"440"", | |
| 478 | .name = "440", | |
| 479 | 479 | .llvm_name = "440", |
| 480 | 480 | .features = featureSet(&[_]Feature{ |
| 481 | 481 | .booke, |
| ... | ... | @@ -487,7 +487,7 @@ pub const cpu = struct { |
| 487 | 487 | }), |
| 488 | 488 | }; |
| 489 | 489 | pub const @"450" = Cpu{ |
| 490 | .name = "@"450"", | |
| 490 | .name = "450", | |
| 491 | 491 | .llvm_name = "450", |
| 492 | 492 | .features = featureSet(&[_]Feature{ |
| 493 | 493 | .booke, |
| ... | ... | @@ -499,21 +499,21 @@ pub const cpu = struct { |
| 499 | 499 | }), |
| 500 | 500 | }; |
| 501 | 501 | pub const @"601" = Cpu{ |
| 502 | .name = "@"601"", | |
| 502 | .name = "601", | |
| 503 | 503 | .llvm_name = "601", |
| 504 | 504 | .features = featureSet(&[_]Feature{ |
| 505 | 505 | .fpu, |
| 506 | 506 | }), |
| 507 | 507 | }; |
| 508 | 508 | pub const @"602" = Cpu{ |
| 509 | .name = "@"602"", | |
| 509 | .name = "602", | |
| 510 | 510 | .llvm_name = "602", |
| 511 | 511 | .features = featureSet(&[_]Feature{ |
| 512 | 512 | .fpu, |
| 513 | 513 | }), |
| 514 | 514 | }; |
| 515 | 515 | pub const @"603" = Cpu{ |
| 516 | .name = "@"603"", | |
| 516 | .name = "603", | |
| 517 | 517 | .llvm_name = "603", |
| 518 | 518 | .features = featureSet(&[_]Feature{ |
| 519 | 519 | .fres, |
| ... | ... | @@ -521,7 +521,7 @@ pub const cpu = struct { |
| 521 | 521 | }), |
| 522 | 522 | }; |
| 523 | 523 | pub const @"603e" = Cpu{ |
| 524 | .name = "@"603e"", | |
| 524 | .name = "603e", | |
| 525 | 525 | .llvm_name = "603e", |
| 526 | 526 | .features = featureSet(&[_]Feature{ |
| 527 | 527 | .fres, |
| ... | ... | @@ -529,7 +529,7 @@ pub const cpu = struct { |
| 529 | 529 | }), |
| 530 | 530 | }; |
| 531 | 531 | pub const @"603ev" = Cpu{ |
| 532 | .name = "@"603ev"", | |
| 532 | .name = "603ev", | |
| 533 | 533 | .llvm_name = "603ev", |
| 534 | 534 | .features = featureSet(&[_]Feature{ |
| 535 | 535 | .fres, |
| ... | ... | @@ -537,7 +537,7 @@ pub const cpu = struct { |
| 537 | 537 | }), |
| 538 | 538 | }; |
| 539 | 539 | pub const @"604" = Cpu{ |
| 540 | .name = "@"604"", | |
| 540 | .name = "604", | |
| 541 | 541 | .llvm_name = "604", |
| 542 | 542 | .features = featureSet(&[_]Feature{ |
| 543 | 543 | .fres, |
| ... | ... | @@ -545,7 +545,7 @@ pub const cpu = struct { |
| 545 | 545 | }), |
| 546 | 546 | }; |
| 547 | 547 | pub const @"604e" = Cpu{ |
| 548 | .name = "@"604e"", | |
| 548 | .name = "604e", | |
| 549 | 549 | .llvm_name = "604e", |
| 550 | 550 | .features = featureSet(&[_]Feature{ |
| 551 | 551 | .fres, |
| ... | ... | @@ -553,7 +553,7 @@ pub const cpu = struct { |
| 553 | 553 | }), |
| 554 | 554 | }; |
| 555 | 555 | pub const @"620" = Cpu{ |
| 556 | .name = "@"620"", | |
| 556 | .name = "620", | |
| 557 | 557 | .llvm_name = "620", |
| 558 | 558 | .features = featureSet(&[_]Feature{ |
| 559 | 559 | .fres, |
| ... | ... | @@ -561,7 +561,7 @@ pub const cpu = struct { |
| 561 | 561 | }), |
| 562 | 562 | }; |
| 563 | 563 | pub const @"7400" = Cpu{ |
| 564 | .name = "@"7400"", | |
| 564 | .name = "7400", | |
| 565 | 565 | .llvm_name = "7400", |
| 566 | 566 | .features = featureSet(&[_]Feature{ |
| 567 | 567 | .altivec, |
| ... | ... | @@ -570,7 +570,7 @@ pub const cpu = struct { |
| 570 | 570 | }), |
| 571 | 571 | }; |
| 572 | 572 | pub const @"7450" = Cpu{ |
| 573 | .name = "@"7450"", | |
| 573 | .name = "7450", | |
| 574 | 574 | .llvm_name = "7450", |
| 575 | 575 | .features = featureSet(&[_]Feature{ |
| 576 | 576 | .altivec, |
| ... | ... | @@ -579,7 +579,7 @@ pub const cpu = struct { |
| 579 | 579 | }), |
| 580 | 580 | }; |
| 581 | 581 | pub const @"750" = Cpu{ |
| 582 | .name = "@"750"", | |
| 582 | .name = "750", | |
| 583 | 583 | .llvm_name = "750", |
| 584 | 584 | .features = featureSet(&[_]Feature{ |
| 585 | 585 | .fres, |
| ... | ... | @@ -587,7 +587,7 @@ pub const cpu = struct { |
| 587 | 587 | }), |
| 588 | 588 | }; |
| 589 | 589 | pub const @"970" = Cpu{ |
| 590 | .name = "@"970"", | |
| 590 | .name = "970", | |
| 591 | 591 | .llvm_name = "970", |
| 592 | 592 | .features = featureSet(&[_]Feature{ |
| 593 | 593 | .@"64bit", |
| ... | ... | @@ -698,7 +698,7 @@ pub const cpu = struct { |
| 698 | 698 | .frsqrte, |
| 699 | 699 | }), |
| 700 | 700 | }; |
| 701 | pub const g4+ = Cpu{ | |
| 701 | pub const @"g4+" = Cpu{ | |
| 702 | 702 | .name = "g4+", |
| 703 | 703 | .llvm_name = "g4+", |
| 704 | 704 | .features = featureSet(&[_]Feature{ |
| ... | ... | @@ -1016,7 +1016,7 @@ pub const all_cpus = &[_]*const Cpu{ |
| 1016 | 1016 | &cpu.e5500, |
| 1017 | 1017 | &cpu.g3, |
| 1018 | 1018 | &cpu.g4, |
| 1019 | &cpu.g4+, | |
| 1019 | &cpu.@"g4+", | |
| 1020 | 1020 | &cpu.g5, |
| 1021 | 1021 | &cpu.generic, |
| 1022 | 1022 | &cpu.ppc, |
lib/std/target/riscv.zig+9-9| ... | ... | @@ -16,28 +16,28 @@ pub usingnamespace Cpu.Feature.feature_set_fns(Feature); |
| 16 | 16 | |
| 17 | 17 | pub const all_features = blk: { |
| 18 | 18 | const len = @typeInfo(Feature).Enum.fields.len; |
| 19 | std.debug.assert(len <= @typeInfo(Cpu.Feature.Set).Int.bits); | |
| 19 | std.debug.assert(len <= Cpu.Feature.Set.bit_count); | |
| 20 | 20 | var result: [len]Cpu.Feature = undefined; |
| 21 | 21 | result[@enumToInt(Feature.@"64bit")] = .{ |
| 22 | 22 | .index = @enumToInt(Feature.@"64bit"), |
| 23 | 23 | .name = @tagName(Feature.@"64bit"), |
| 24 | 24 | .llvm_name = "64bit", |
| 25 | 25 | .description = "Implements RV64", |
| 26 | .dependencies = 0, | |
| 26 | .dependencies = featureSet(&[_]Feature{}), | |
| 27 | 27 | }; |
| 28 | 28 | result[@enumToInt(Feature.a)] = .{ |
| 29 | 29 | .index = @enumToInt(Feature.a), |
| 30 | 30 | .name = @tagName(Feature.a), |
| 31 | 31 | .llvm_name = "a", |
| 32 | 32 | .description = "'A' (Atomic Instructions)", |
| 33 | .dependencies = 0, | |
| 33 | .dependencies = featureSet(&[_]Feature{}), | |
| 34 | 34 | }; |
| 35 | 35 | result[@enumToInt(Feature.c)] = .{ |
| 36 | 36 | .index = @enumToInt(Feature.c), |
| 37 | 37 | .name = @tagName(Feature.c), |
| 38 | 38 | .llvm_name = "c", |
| 39 | 39 | .description = "'C' (Compressed Instructions)", |
| 40 | .dependencies = 0, | |
| 40 | .dependencies = featureSet(&[_]Feature{}), | |
| 41 | 41 | }; |
| 42 | 42 | result[@enumToInt(Feature.d)] = .{ |
| 43 | 43 | .index = @enumToInt(Feature.d), |
| ... | ... | @@ -53,28 +53,28 @@ pub const all_features = blk: { |
| 53 | 53 | .name = @tagName(Feature.e), |
| 54 | 54 | .llvm_name = "e", |
| 55 | 55 | .description = "Implements RV32E (provides 16 rather than 32 GPRs)", |
| 56 | .dependencies = 0, | |
| 56 | .dependencies = featureSet(&[_]Feature{}), | |
| 57 | 57 | }; |
| 58 | 58 | result[@enumToInt(Feature.f)] = .{ |
| 59 | 59 | .index = @enumToInt(Feature.f), |
| 60 | 60 | .name = @tagName(Feature.f), |
| 61 | 61 | .llvm_name = "f", |
| 62 | 62 | .description = "'F' (Single-Precision Floating-Point)", |
| 63 | .dependencies = 0, | |
| 63 | .dependencies = featureSet(&[_]Feature{}), | |
| 64 | 64 | }; |
| 65 | 65 | result[@enumToInt(Feature.m)] = .{ |
| 66 | 66 | .index = @enumToInt(Feature.m), |
| 67 | 67 | .name = @tagName(Feature.m), |
| 68 | 68 | .llvm_name = "m", |
| 69 | 69 | .description = "'M' (Integer Multiplication and Division)", |
| 70 | .dependencies = 0, | |
| 70 | .dependencies = featureSet(&[_]Feature{}), | |
| 71 | 71 | }; |
| 72 | 72 | result[@enumToInt(Feature.relax)] = .{ |
| 73 | 73 | .index = @enumToInt(Feature.relax), |
| 74 | 74 | .name = @tagName(Feature.relax), |
| 75 | 75 | .llvm_name = "relax", |
| 76 | 76 | .description = "Enable Linker relaxation.", |
| 77 | .dependencies = 0, | |
| 77 | .dependencies = featureSet(&[_]Feature{}), | |
| 78 | 78 | }; |
| 79 | 79 | break :blk result; |
| 80 | 80 | }; |
| ... | ... | @@ -83,7 +83,7 @@ pub const cpu = struct { |
| 83 | 83 | pub const generic_rv32 = Cpu{ |
| 84 | 84 | .name = "generic_rv32", |
| 85 | 85 | .llvm_name = "generic-rv32", |
| 86 | .features = 0, | |
| 86 | .features = featureSet(&[_]Feature{}), | |
| 87 | 87 | }; |
| 88 | 88 | pub const generic_rv64 = Cpu{ |
| 89 | 89 | .name = "generic_rv64", |
lib/std/target/sparc.zig+29-29| ... | ... | @@ -27,140 +27,140 @@ pub usingnamespace Cpu.Feature.feature_set_fns(Feature); |
| 27 | 27 | |
| 28 | 28 | pub const all_features = blk: { |
| 29 | 29 | const len = @typeInfo(Feature).Enum.fields.len; |
| 30 | std.debug.assert(len <= @typeInfo(Cpu.Feature.Set).Int.bits); | |
| 30 | std.debug.assert(len <= Cpu.Feature.Set.bit_count); | |
| 31 | 31 | var result: [len]Cpu.Feature = undefined; |
| 32 | 32 | result[@enumToInt(Feature.deprecated_v8)] = .{ |
| 33 | 33 | .index = @enumToInt(Feature.deprecated_v8), |
| 34 | 34 | .name = @tagName(Feature.deprecated_v8), |
| 35 | 35 | .llvm_name = "deprecated-v8", |
| 36 | 36 | .description = "Enable deprecated V8 instructions in V9 mode", |
| 37 | .dependencies = 0, | |
| 37 | .dependencies = featureSet(&[_]Feature{}), | |
| 38 | 38 | }; |
| 39 | 39 | result[@enumToInt(Feature.detectroundchange)] = .{ |
| 40 | 40 | .index = @enumToInt(Feature.detectroundchange), |
| 41 | 41 | .name = @tagName(Feature.detectroundchange), |
| 42 | 42 | .llvm_name = "detectroundchange", |
| 43 | 43 | .description = "LEON3 erratum detection: Detects any rounding mode change request: use only the round-to-nearest rounding mode", |
| 44 | .dependencies = 0, | |
| 44 | .dependencies = featureSet(&[_]Feature{}), | |
| 45 | 45 | }; |
| 46 | 46 | result[@enumToInt(Feature.fixallfdivsqrt)] = .{ |
| 47 | 47 | .index = @enumToInt(Feature.fixallfdivsqrt), |
| 48 | 48 | .name = @tagName(Feature.fixallfdivsqrt), |
| 49 | 49 | .llvm_name = "fixallfdivsqrt", |
| 50 | 50 | .description = "LEON erratum fix: Fix FDIVS/FDIVD/FSQRTS/FSQRTD instructions with NOPs and floating-point store", |
| 51 | .dependencies = 0, | |
| 51 | .dependencies = featureSet(&[_]Feature{}), | |
| 52 | 52 | }; |
| 53 | 53 | result[@enumToInt(Feature.hard_quad_float)] = .{ |
| 54 | 54 | .index = @enumToInt(Feature.hard_quad_float), |
| 55 | 55 | .name = @tagName(Feature.hard_quad_float), |
| 56 | 56 | .llvm_name = "hard-quad-float", |
| 57 | 57 | .description = "Enable quad-word floating point instructions", |
| 58 | .dependencies = 0, | |
| 58 | .dependencies = featureSet(&[_]Feature{}), | |
| 59 | 59 | }; |
| 60 | 60 | result[@enumToInt(Feature.hasleoncasa)] = .{ |
| 61 | 61 | .index = @enumToInt(Feature.hasleoncasa), |
| 62 | 62 | .name = @tagName(Feature.hasleoncasa), |
| 63 | 63 | .llvm_name = "hasleoncasa", |
| 64 | 64 | .description = "Enable CASA instruction for LEON3 and LEON4 processors", |
| 65 | .dependencies = 0, | |
| 65 | .dependencies = featureSet(&[_]Feature{}), | |
| 66 | 66 | }; |
| 67 | 67 | result[@enumToInt(Feature.hasumacsmac)] = .{ |
| 68 | 68 | .index = @enumToInt(Feature.hasumacsmac), |
| 69 | 69 | .name = @tagName(Feature.hasumacsmac), |
| 70 | 70 | .llvm_name = "hasumacsmac", |
| 71 | 71 | .description = "Enable UMAC and SMAC for LEON3 and LEON4 processors", |
| 72 | .dependencies = 0, | |
| 72 | .dependencies = featureSet(&[_]Feature{}), | |
| 73 | 73 | }; |
| 74 | 74 | result[@enumToInt(Feature.insertnopload)] = .{ |
| 75 | 75 | .index = @enumToInt(Feature.insertnopload), |
| 76 | 76 | .name = @tagName(Feature.insertnopload), |
| 77 | 77 | .llvm_name = "insertnopload", |
| 78 | 78 | .description = "LEON3 erratum fix: Insert a NOP instruction after every single-cycle load instruction when the next instruction is another load/store instruction", |
| 79 | .dependencies = 0, | |
| 79 | .dependencies = featureSet(&[_]Feature{}), | |
| 80 | 80 | }; |
| 81 | 81 | result[@enumToInt(Feature.leon)] = .{ |
| 82 | 82 | .index = @enumToInt(Feature.leon), |
| 83 | 83 | .name = @tagName(Feature.leon), |
| 84 | 84 | .llvm_name = "leon", |
| 85 | 85 | .description = "Enable LEON extensions", |
| 86 | .dependencies = 0, | |
| 86 | .dependencies = featureSet(&[_]Feature{}), | |
| 87 | 87 | }; |
| 88 | 88 | result[@enumToInt(Feature.leoncyclecounter)] = .{ |
| 89 | 89 | .index = @enumToInt(Feature.leoncyclecounter), |
| 90 | 90 | .name = @tagName(Feature.leoncyclecounter), |
| 91 | 91 | .llvm_name = "leoncyclecounter", |
| 92 | 92 | .description = "Use the Leon cycle counter register", |
| 93 | .dependencies = 0, | |
| 93 | .dependencies = featureSet(&[_]Feature{}), | |
| 94 | 94 | }; |
| 95 | 95 | result[@enumToInt(Feature.leonpwrpsr)] = .{ |
| 96 | 96 | .index = @enumToInt(Feature.leonpwrpsr), |
| 97 | 97 | .name = @tagName(Feature.leonpwrpsr), |
| 98 | 98 | .llvm_name = "leonpwrpsr", |
| 99 | 99 | .description = "Enable the PWRPSR instruction", |
| 100 | .dependencies = 0, | |
| 100 | .dependencies = featureSet(&[_]Feature{}), | |
| 101 | 101 | }; |
| 102 | 102 | result[@enumToInt(Feature.no_fmuls)] = .{ |
| 103 | 103 | .index = @enumToInt(Feature.no_fmuls), |
| 104 | 104 | .name = @tagName(Feature.no_fmuls), |
| 105 | 105 | .llvm_name = "no-fmuls", |
| 106 | 106 | .description = "Disable the fmuls instruction.", |
| 107 | .dependencies = 0, | |
| 107 | .dependencies = featureSet(&[_]Feature{}), | |
| 108 | 108 | }; |
| 109 | 109 | result[@enumToInt(Feature.no_fsmuld)] = .{ |
| 110 | 110 | .index = @enumToInt(Feature.no_fsmuld), |
| 111 | 111 | .name = @tagName(Feature.no_fsmuld), |
| 112 | 112 | .llvm_name = "no-fsmuld", |
| 113 | 113 | .description = "Disable the fsmuld instruction.", |
| 114 | .dependencies = 0, | |
| 114 | .dependencies = featureSet(&[_]Feature{}), | |
| 115 | 115 | }; |
| 116 | 116 | result[@enumToInt(Feature.popc)] = .{ |
| 117 | 117 | .index = @enumToInt(Feature.popc), |
| 118 | 118 | .name = @tagName(Feature.popc), |
| 119 | 119 | .llvm_name = "popc", |
| 120 | 120 | .description = "Use the popc (population count) instruction", |
| 121 | .dependencies = 0, | |
| 121 | .dependencies = featureSet(&[_]Feature{}), | |
| 122 | 122 | }; |
| 123 | 123 | result[@enumToInt(Feature.soft_float)] = .{ |
| 124 | 124 | .index = @enumToInt(Feature.soft_float), |
| 125 | 125 | .name = @tagName(Feature.soft_float), |
| 126 | 126 | .llvm_name = "soft-float", |
| 127 | 127 | .description = "Use software emulation for floating point", |
| 128 | .dependencies = 0, | |
| 128 | .dependencies = featureSet(&[_]Feature{}), | |
| 129 | 129 | }; |
| 130 | 130 | result[@enumToInt(Feature.soft_mul_div)] = .{ |
| 131 | 131 | .index = @enumToInt(Feature.soft_mul_div), |
| 132 | 132 | .name = @tagName(Feature.soft_mul_div), |
| 133 | 133 | .llvm_name = "soft-mul-div", |
| 134 | 134 | .description = "Use software emulation for integer multiply and divide", |
| 135 | .dependencies = 0, | |
| 135 | .dependencies = featureSet(&[_]Feature{}), | |
| 136 | 136 | }; |
| 137 | 137 | result[@enumToInt(Feature.v9)] = .{ |
| 138 | 138 | .index = @enumToInt(Feature.v9), |
| 139 | 139 | .name = @tagName(Feature.v9), |
| 140 | 140 | .llvm_name = "v9", |
| 141 | 141 | .description = "Enable SPARC-V9 instructions", |
| 142 | .dependencies = 0, | |
| 142 | .dependencies = featureSet(&[_]Feature{}), | |
| 143 | 143 | }; |
| 144 | 144 | result[@enumToInt(Feature.vis)] = .{ |
| 145 | 145 | .index = @enumToInt(Feature.vis), |
| 146 | 146 | .name = @tagName(Feature.vis), |
| 147 | 147 | .llvm_name = "vis", |
| 148 | 148 | .description = "Enable UltraSPARC Visual Instruction Set extensions", |
| 149 | .dependencies = 0, | |
| 149 | .dependencies = featureSet(&[_]Feature{}), | |
| 150 | 150 | }; |
| 151 | 151 | result[@enumToInt(Feature.vis2)] = .{ |
| 152 | 152 | .index = @enumToInt(Feature.vis2), |
| 153 | 153 | .name = @tagName(Feature.vis2), |
| 154 | 154 | .llvm_name = "vis2", |
| 155 | 155 | .description = "Enable Visual Instruction Set extensions II", |
| 156 | .dependencies = 0, | |
| 156 | .dependencies = featureSet(&[_]Feature{}), | |
| 157 | 157 | }; |
| 158 | 158 | result[@enumToInt(Feature.vis3)] = .{ |
| 159 | 159 | .index = @enumToInt(Feature.vis3), |
| 160 | 160 | .name = @tagName(Feature.vis3), |
| 161 | 161 | .llvm_name = "vis3", |
| 162 | 162 | .description = "Enable Visual Instruction Set extensions III", |
| 163 | .dependencies = 0, | |
| 163 | .dependencies = featureSet(&[_]Feature{}), | |
| 164 | 164 | }; |
| 165 | 165 | break :blk result; |
| 166 | 166 | }; |
| ... | ... | @@ -185,12 +185,12 @@ pub const cpu = struct { |
| 185 | 185 | pub const f934 = Cpu{ |
| 186 | 186 | .name = "f934", |
| 187 | 187 | .llvm_name = "f934", |
| 188 | .features = 0, | |
| 188 | .features = featureSet(&[_]Feature{}), | |
| 189 | 189 | }; |
| 190 | 190 | pub const generic = Cpu{ |
| 191 | 191 | .name = "generic", |
| 192 | 192 | .llvm_name = "generic", |
| 193 | .features = 0, | |
| 193 | .features = featureSet(&[_]Feature{}), | |
| 194 | 194 | }; |
| 195 | 195 | pub const gr712rc = Cpu{ |
| 196 | 196 | .name = "gr712rc", |
| ... | ... | @@ -214,7 +214,7 @@ pub const cpu = struct { |
| 214 | 214 | pub const hypersparc = Cpu{ |
| 215 | 215 | .name = "hypersparc", |
| 216 | 216 | .llvm_name = "hypersparc", |
| 217 | .features = 0, | |
| 217 | .features = featureSet(&[_]Feature{}), | |
| 218 | 218 | }; |
| 219 | 219 | pub const leon2 = Cpu{ |
| 220 | 220 | .name = "leon2", |
| ... | ... | @@ -407,27 +407,27 @@ pub const cpu = struct { |
| 407 | 407 | pub const sparclet = Cpu{ |
| 408 | 408 | .name = "sparclet", |
| 409 | 409 | .llvm_name = "sparclet", |
| 410 | .features = 0, | |
| 410 | .features = featureSet(&[_]Feature{}), | |
| 411 | 411 | }; |
| 412 | 412 | pub const sparclite = Cpu{ |
| 413 | 413 | .name = "sparclite", |
| 414 | 414 | .llvm_name = "sparclite", |
| 415 | .features = 0, | |
| 415 | .features = featureSet(&[_]Feature{}), | |
| 416 | 416 | }; |
| 417 | 417 | pub const sparclite86x = Cpu{ |
| 418 | 418 | .name = "sparclite86x", |
| 419 | 419 | .llvm_name = "sparclite86x", |
| 420 | .features = 0, | |
| 420 | .features = featureSet(&[_]Feature{}), | |
| 421 | 421 | }; |
| 422 | 422 | pub const supersparc = Cpu{ |
| 423 | 423 | .name = "supersparc", |
| 424 | 424 | .llvm_name = "supersparc", |
| 425 | .features = 0, | |
| 425 | .features = featureSet(&[_]Feature{}), | |
| 426 | 426 | }; |
| 427 | 427 | pub const tsc701 = Cpu{ |
| 428 | 428 | .name = "tsc701", |
| 429 | 429 | .llvm_name = "tsc701", |
| 430 | .features = 0, | |
| 430 | .features = featureSet(&[_]Feature{}), | |
| 431 | 431 | }; |
| 432 | 432 | pub const ultrasparc = Cpu{ |
| 433 | 433 | .name = "ultrasparc", |
| ... | ... | @@ -470,7 +470,7 @@ pub const cpu = struct { |
| 470 | 470 | pub const v8 = Cpu{ |
| 471 | 471 | .name = "v8", |
| 472 | 472 | .llvm_name = "v8", |
| 473 | .features = 0, | |
| 473 | .features = featureSet(&[_]Feature{}), | |
| 474 | 474 | }; |
| 475 | 475 | pub const v9 = Cpu{ |
| 476 | 476 | .name = "v9", |
lib/std/target/systemz.zig+39-39| ... | ... | @@ -43,252 +43,252 @@ pub usingnamespace Cpu.Feature.feature_set_fns(Feature); |
| 43 | 43 | |
| 44 | 44 | pub const all_features = blk: { |
| 45 | 45 | const len = @typeInfo(Feature).Enum.fields.len; |
| 46 | std.debug.assert(len <= @typeInfo(Cpu.Feature.Set).Int.bits); | |
| 46 | std.debug.assert(len <= Cpu.Feature.Set.bit_count); | |
| 47 | 47 | var result: [len]Cpu.Feature = undefined; |
| 48 | 48 | result[@enumToInt(Feature.deflate_conversion)] = .{ |
| 49 | 49 | .index = @enumToInt(Feature.deflate_conversion), |
| 50 | 50 | .name = @tagName(Feature.deflate_conversion), |
| 51 | 51 | .llvm_name = "deflate-conversion", |
| 52 | 52 | .description = "Assume that the deflate-conversion facility is installed", |
| 53 | .dependencies = 0, | |
| 53 | .dependencies = featureSet(&[_]Feature{}), | |
| 54 | 54 | }; |
| 55 | 55 | result[@enumToInt(Feature.dfp_packed_conversion)] = .{ |
| 56 | 56 | .index = @enumToInt(Feature.dfp_packed_conversion), |
| 57 | 57 | .name = @tagName(Feature.dfp_packed_conversion), |
| 58 | 58 | .llvm_name = "dfp-packed-conversion", |
| 59 | 59 | .description = "Assume that the DFP packed-conversion facility is installed", |
| 60 | .dependencies = 0, | |
| 60 | .dependencies = featureSet(&[_]Feature{}), | |
| 61 | 61 | }; |
| 62 | 62 | result[@enumToInt(Feature.dfp_zoned_conversion)] = .{ |
| 63 | 63 | .index = @enumToInt(Feature.dfp_zoned_conversion), |
| 64 | 64 | .name = @tagName(Feature.dfp_zoned_conversion), |
| 65 | 65 | .llvm_name = "dfp-zoned-conversion", |
| 66 | 66 | .description = "Assume that the DFP zoned-conversion facility is installed", |
| 67 | .dependencies = 0, | |
| 67 | .dependencies = featureSet(&[_]Feature{}), | |
| 68 | 68 | }; |
| 69 | 69 | result[@enumToInt(Feature.distinct_ops)] = .{ |
| 70 | 70 | .index = @enumToInt(Feature.distinct_ops), |
| 71 | 71 | .name = @tagName(Feature.distinct_ops), |
| 72 | 72 | .llvm_name = "distinct-ops", |
| 73 | 73 | .description = "Assume that the distinct-operands facility is installed", |
| 74 | .dependencies = 0, | |
| 74 | .dependencies = featureSet(&[_]Feature{}), | |
| 75 | 75 | }; |
| 76 | 76 | result[@enumToInt(Feature.enhanced_dat_2)] = .{ |
| 77 | 77 | .index = @enumToInt(Feature.enhanced_dat_2), |
| 78 | 78 | .name = @tagName(Feature.enhanced_dat_2), |
| 79 | 79 | .llvm_name = "enhanced-dat-2", |
| 80 | 80 | .description = "Assume that the enhanced-DAT facility 2 is installed", |
| 81 | .dependencies = 0, | |
| 81 | .dependencies = featureSet(&[_]Feature{}), | |
| 82 | 82 | }; |
| 83 | 83 | result[@enumToInt(Feature.enhanced_sort)] = .{ |
| 84 | 84 | .index = @enumToInt(Feature.enhanced_sort), |
| 85 | 85 | .name = @tagName(Feature.enhanced_sort), |
| 86 | 86 | .llvm_name = "enhanced-sort", |
| 87 | 87 | .description = "Assume that the enhanced-sort facility is installed", |
| 88 | .dependencies = 0, | |
| 88 | .dependencies = featureSet(&[_]Feature{}), | |
| 89 | 89 | }; |
| 90 | 90 | result[@enumToInt(Feature.execution_hint)] = .{ |
| 91 | 91 | .index = @enumToInt(Feature.execution_hint), |
| 92 | 92 | .name = @tagName(Feature.execution_hint), |
| 93 | 93 | .llvm_name = "execution-hint", |
| 94 | 94 | .description = "Assume that the execution-hint facility is installed", |
| 95 | .dependencies = 0, | |
| 95 | .dependencies = featureSet(&[_]Feature{}), | |
| 96 | 96 | }; |
| 97 | 97 | result[@enumToInt(Feature.fast_serialization)] = .{ |
| 98 | 98 | .index = @enumToInt(Feature.fast_serialization), |
| 99 | 99 | .name = @tagName(Feature.fast_serialization), |
| 100 | 100 | .llvm_name = "fast-serialization", |
| 101 | 101 | .description = "Assume that the fast-serialization facility is installed", |
| 102 | .dependencies = 0, | |
| 102 | .dependencies = featureSet(&[_]Feature{}), | |
| 103 | 103 | }; |
| 104 | 104 | result[@enumToInt(Feature.fp_extension)] = .{ |
| 105 | 105 | .index = @enumToInt(Feature.fp_extension), |
| 106 | 106 | .name = @tagName(Feature.fp_extension), |
| 107 | 107 | .llvm_name = "fp-extension", |
| 108 | 108 | .description = "Assume that the floating-point extension facility is installed", |
| 109 | .dependencies = 0, | |
| 109 | .dependencies = featureSet(&[_]Feature{}), | |
| 110 | 110 | }; |
| 111 | 111 | result[@enumToInt(Feature.guarded_storage)] = .{ |
| 112 | 112 | .index = @enumToInt(Feature.guarded_storage), |
| 113 | 113 | .name = @tagName(Feature.guarded_storage), |
| 114 | 114 | .llvm_name = "guarded-storage", |
| 115 | 115 | .description = "Assume that the guarded-storage facility is installed", |
| 116 | .dependencies = 0, | |
| 116 | .dependencies = featureSet(&[_]Feature{}), | |
| 117 | 117 | }; |
| 118 | 118 | result[@enumToInt(Feature.high_word)] = .{ |
| 119 | 119 | .index = @enumToInt(Feature.high_word), |
| 120 | 120 | .name = @tagName(Feature.high_word), |
| 121 | 121 | .llvm_name = "high-word", |
| 122 | 122 | .description = "Assume that the high-word facility is installed", |
| 123 | .dependencies = 0, | |
| 123 | .dependencies = featureSet(&[_]Feature{}), | |
| 124 | 124 | }; |
| 125 | 125 | result[@enumToInt(Feature.insert_reference_bits_multiple)] = .{ |
| 126 | 126 | .index = @enumToInt(Feature.insert_reference_bits_multiple), |
| 127 | 127 | .name = @tagName(Feature.insert_reference_bits_multiple), |
| 128 | 128 | .llvm_name = "insert-reference-bits-multiple", |
| 129 | 129 | .description = "Assume that the insert-reference-bits-multiple facility is installed", |
| 130 | .dependencies = 0, | |
| 130 | .dependencies = featureSet(&[_]Feature{}), | |
| 131 | 131 | }; |
| 132 | 132 | result[@enumToInt(Feature.interlocked_access1)] = .{ |
| 133 | 133 | .index = @enumToInt(Feature.interlocked_access1), |
| 134 | 134 | .name = @tagName(Feature.interlocked_access1), |
| 135 | 135 | .llvm_name = "interlocked-access1", |
| 136 | 136 | .description = "Assume that interlocked-access facility 1 is installed", |
| 137 | .dependencies = 0, | |
| 137 | .dependencies = featureSet(&[_]Feature{}), | |
| 138 | 138 | }; |
| 139 | 139 | result[@enumToInt(Feature.load_and_trap)] = .{ |
| 140 | 140 | .index = @enumToInt(Feature.load_and_trap), |
| 141 | 141 | .name = @tagName(Feature.load_and_trap), |
| 142 | 142 | .llvm_name = "load-and-trap", |
| 143 | 143 | .description = "Assume that the load-and-trap facility is installed", |
| 144 | .dependencies = 0, | |
| 144 | .dependencies = featureSet(&[_]Feature{}), | |
| 145 | 145 | }; |
| 146 | 146 | result[@enumToInt(Feature.load_and_zero_rightmost_byte)] = .{ |
| 147 | 147 | .index = @enumToInt(Feature.load_and_zero_rightmost_byte), |
| 148 | 148 | .name = @tagName(Feature.load_and_zero_rightmost_byte), |
| 149 | 149 | .llvm_name = "load-and-zero-rightmost-byte", |
| 150 | 150 | .description = "Assume that the load-and-zero-rightmost-byte facility is installed", |
| 151 | .dependencies = 0, | |
| 151 | .dependencies = featureSet(&[_]Feature{}), | |
| 152 | 152 | }; |
| 153 | 153 | result[@enumToInt(Feature.load_store_on_cond)] = .{ |
| 154 | 154 | .index = @enumToInt(Feature.load_store_on_cond), |
| 155 | 155 | .name = @tagName(Feature.load_store_on_cond), |
| 156 | 156 | .llvm_name = "load-store-on-cond", |
| 157 | 157 | .description = "Assume that the load/store-on-condition facility is installed", |
| 158 | .dependencies = 0, | |
| 158 | .dependencies = featureSet(&[_]Feature{}), | |
| 159 | 159 | }; |
| 160 | 160 | result[@enumToInt(Feature.load_store_on_cond_2)] = .{ |
| 161 | 161 | .index = @enumToInt(Feature.load_store_on_cond_2), |
| 162 | 162 | .name = @tagName(Feature.load_store_on_cond_2), |
| 163 | 163 | .llvm_name = "load-store-on-cond-2", |
| 164 | 164 | .description = "Assume that the load/store-on-condition facility 2 is installed", |
| 165 | .dependencies = 0, | |
| 165 | .dependencies = featureSet(&[_]Feature{}), | |
| 166 | 166 | }; |
| 167 | 167 | result[@enumToInt(Feature.message_security_assist_extension3)] = .{ |
| 168 | 168 | .index = @enumToInt(Feature.message_security_assist_extension3), |
| 169 | 169 | .name = @tagName(Feature.message_security_assist_extension3), |
| 170 | 170 | .llvm_name = "message-security-assist-extension3", |
| 171 | 171 | .description = "Assume that the message-security-assist extension facility 3 is installed", |
| 172 | .dependencies = 0, | |
| 172 | .dependencies = featureSet(&[_]Feature{}), | |
| 173 | 173 | }; |
| 174 | 174 | result[@enumToInt(Feature.message_security_assist_extension4)] = .{ |
| 175 | 175 | .index = @enumToInt(Feature.message_security_assist_extension4), |
| 176 | 176 | .name = @tagName(Feature.message_security_assist_extension4), |
| 177 | 177 | .llvm_name = "message-security-assist-extension4", |
| 178 | 178 | .description = "Assume that the message-security-assist extension facility 4 is installed", |
| 179 | .dependencies = 0, | |
| 179 | .dependencies = featureSet(&[_]Feature{}), | |
| 180 | 180 | }; |
| 181 | 181 | result[@enumToInt(Feature.message_security_assist_extension5)] = .{ |
| 182 | 182 | .index = @enumToInt(Feature.message_security_assist_extension5), |
| 183 | 183 | .name = @tagName(Feature.message_security_assist_extension5), |
| 184 | 184 | .llvm_name = "message-security-assist-extension5", |
| 185 | 185 | .description = "Assume that the message-security-assist extension facility 5 is installed", |
| 186 | .dependencies = 0, | |
| 186 | .dependencies = featureSet(&[_]Feature{}), | |
| 187 | 187 | }; |
| 188 | 188 | result[@enumToInt(Feature.message_security_assist_extension7)] = .{ |
| 189 | 189 | .index = @enumToInt(Feature.message_security_assist_extension7), |
| 190 | 190 | .name = @tagName(Feature.message_security_assist_extension7), |
| 191 | 191 | .llvm_name = "message-security-assist-extension7", |
| 192 | 192 | .description = "Assume that the message-security-assist extension facility 7 is installed", |
| 193 | .dependencies = 0, | |
| 193 | .dependencies = featureSet(&[_]Feature{}), | |
| 194 | 194 | }; |
| 195 | 195 | result[@enumToInt(Feature.message_security_assist_extension8)] = .{ |
| 196 | 196 | .index = @enumToInt(Feature.message_security_assist_extension8), |
| 197 | 197 | .name = @tagName(Feature.message_security_assist_extension8), |
| 198 | 198 | .llvm_name = "message-security-assist-extension8", |
| 199 | 199 | .description = "Assume that the message-security-assist extension facility 8 is installed", |
| 200 | .dependencies = 0, | |
| 200 | .dependencies = featureSet(&[_]Feature{}), | |
| 201 | 201 | }; |
| 202 | 202 | result[@enumToInt(Feature.message_security_assist_extension9)] = .{ |
| 203 | 203 | .index = @enumToInt(Feature.message_security_assist_extension9), |
| 204 | 204 | .name = @tagName(Feature.message_security_assist_extension9), |
| 205 | 205 | .llvm_name = "message-security-assist-extension9", |
| 206 | 206 | .description = "Assume that the message-security-assist extension facility 9 is installed", |
| 207 | .dependencies = 0, | |
| 207 | .dependencies = featureSet(&[_]Feature{}), | |
| 208 | 208 | }; |
| 209 | 209 | result[@enumToInt(Feature.miscellaneous_extensions)] = .{ |
| 210 | 210 | .index = @enumToInt(Feature.miscellaneous_extensions), |
| 211 | 211 | .name = @tagName(Feature.miscellaneous_extensions), |
| 212 | 212 | .llvm_name = "miscellaneous-extensions", |
| 213 | 213 | .description = "Assume that the miscellaneous-extensions facility is installed", |
| 214 | .dependencies = 0, | |
| 214 | .dependencies = featureSet(&[_]Feature{}), | |
| 215 | 215 | }; |
| 216 | 216 | result[@enumToInt(Feature.miscellaneous_extensions_2)] = .{ |
| 217 | 217 | .index = @enumToInt(Feature.miscellaneous_extensions_2), |
| 218 | 218 | .name = @tagName(Feature.miscellaneous_extensions_2), |
| 219 | 219 | .llvm_name = "miscellaneous-extensions-2", |
| 220 | 220 | .description = "Assume that the miscellaneous-extensions facility 2 is installed", |
| 221 | .dependencies = 0, | |
| 221 | .dependencies = featureSet(&[_]Feature{}), | |
| 222 | 222 | }; |
| 223 | 223 | result[@enumToInt(Feature.miscellaneous_extensions_3)] = .{ |
| 224 | 224 | .index = @enumToInt(Feature.miscellaneous_extensions_3), |
| 225 | 225 | .name = @tagName(Feature.miscellaneous_extensions_3), |
| 226 | 226 | .llvm_name = "miscellaneous-extensions-3", |
| 227 | 227 | .description = "Assume that the miscellaneous-extensions facility 3 is installed", |
| 228 | .dependencies = 0, | |
| 228 | .dependencies = featureSet(&[_]Feature{}), | |
| 229 | 229 | }; |
| 230 | 230 | result[@enumToInt(Feature.population_count)] = .{ |
| 231 | 231 | .index = @enumToInt(Feature.population_count), |
| 232 | 232 | .name = @tagName(Feature.population_count), |
| 233 | 233 | .llvm_name = "population-count", |
| 234 | 234 | .description = "Assume that the population-count facility is installed", |
| 235 | .dependencies = 0, | |
| 235 | .dependencies = featureSet(&[_]Feature{}), | |
| 236 | 236 | }; |
| 237 | 237 | result[@enumToInt(Feature.processor_assist)] = .{ |
| 238 | 238 | .index = @enumToInt(Feature.processor_assist), |
| 239 | 239 | .name = @tagName(Feature.processor_assist), |
| 240 | 240 | .llvm_name = "processor-assist", |
| 241 | 241 | .description = "Assume that the processor-assist facility is installed", |
| 242 | .dependencies = 0, | |
| 242 | .dependencies = featureSet(&[_]Feature{}), | |
| 243 | 243 | }; |
| 244 | 244 | result[@enumToInt(Feature.reset_reference_bits_multiple)] = .{ |
| 245 | 245 | .index = @enumToInt(Feature.reset_reference_bits_multiple), |
| 246 | 246 | .name = @tagName(Feature.reset_reference_bits_multiple), |
| 247 | 247 | .llvm_name = "reset-reference-bits-multiple", |
| 248 | 248 | .description = "Assume that the reset-reference-bits-multiple facility is installed", |
| 249 | .dependencies = 0, | |
| 249 | .dependencies = featureSet(&[_]Feature{}), | |
| 250 | 250 | }; |
| 251 | 251 | result[@enumToInt(Feature.transactional_execution)] = .{ |
| 252 | 252 | .index = @enumToInt(Feature.transactional_execution), |
| 253 | 253 | .name = @tagName(Feature.transactional_execution), |
| 254 | 254 | .llvm_name = "transactional-execution", |
| 255 | 255 | .description = "Assume that the transactional-execution facility is installed", |
| 256 | .dependencies = 0, | |
| 256 | .dependencies = featureSet(&[_]Feature{}), | |
| 257 | 257 | }; |
| 258 | 258 | result[@enumToInt(Feature.vector)] = .{ |
| 259 | 259 | .index = @enumToInt(Feature.vector), |
| 260 | 260 | .name = @tagName(Feature.vector), |
| 261 | 261 | .llvm_name = "vector", |
| 262 | 262 | .description = "Assume that the vectory facility is installed", |
| 263 | .dependencies = 0, | |
| 263 | .dependencies = featureSet(&[_]Feature{}), | |
| 264 | 264 | }; |
| 265 | 265 | result[@enumToInt(Feature.vector_enhancements_1)] = .{ |
| 266 | 266 | .index = @enumToInt(Feature.vector_enhancements_1), |
| 267 | 267 | .name = @tagName(Feature.vector_enhancements_1), |
| 268 | 268 | .llvm_name = "vector-enhancements-1", |
| 269 | 269 | .description = "Assume that the vector enhancements facility 1 is installed", |
| 270 | .dependencies = 0, | |
| 270 | .dependencies = featureSet(&[_]Feature{}), | |
| 271 | 271 | }; |
| 272 | 272 | result[@enumToInt(Feature.vector_enhancements_2)] = .{ |
| 273 | 273 | .index = @enumToInt(Feature.vector_enhancements_2), |
| 274 | 274 | .name = @tagName(Feature.vector_enhancements_2), |
| 275 | 275 | .llvm_name = "vector-enhancements-2", |
| 276 | 276 | .description = "Assume that the vector enhancements facility 2 is installed", |
| 277 | .dependencies = 0, | |
| 277 | .dependencies = featureSet(&[_]Feature{}), | |
| 278 | 278 | }; |
| 279 | 279 | result[@enumToInt(Feature.vector_packed_decimal)] = .{ |
| 280 | 280 | .index = @enumToInt(Feature.vector_packed_decimal), |
| 281 | 281 | .name = @tagName(Feature.vector_packed_decimal), |
| 282 | 282 | .llvm_name = "vector-packed-decimal", |
| 283 | 283 | .description = "Assume that the vector packed decimal facility is installed", |
| 284 | .dependencies = 0, | |
| 284 | .dependencies = featureSet(&[_]Feature{}), | |
| 285 | 285 | }; |
| 286 | 286 | result[@enumToInt(Feature.vector_packed_decimal_enhancement)] = .{ |
| 287 | 287 | .index = @enumToInt(Feature.vector_packed_decimal_enhancement), |
| 288 | 288 | .name = @tagName(Feature.vector_packed_decimal_enhancement), |
| 289 | 289 | .llvm_name = "vector-packed-decimal-enhancement", |
| 290 | 290 | .description = "Assume that the vector packed decimal enhancement facility is installed", |
| 291 | .dependencies = 0, | |
| 291 | .dependencies = featureSet(&[_]Feature{}), | |
| 292 | 292 | }; |
| 293 | 293 | break :blk result; |
| 294 | 294 | }; |
| ... | ... | @@ -424,7 +424,7 @@ pub const cpu = struct { |
| 424 | 424 | pub const arch8 = Cpu{ |
| 425 | 425 | .name = "arch8", |
| 426 | 426 | .llvm_name = "arch8", |
| 427 | .features = 0, | |
| 427 | .features = featureSet(&[_]Feature{}), | |
| 428 | 428 | }; |
| 429 | 429 | pub const arch9 = Cpu{ |
| 430 | 430 | .name = "arch9", |
| ... | ... | @@ -445,12 +445,12 @@ pub const cpu = struct { |
| 445 | 445 | pub const generic = Cpu{ |
| 446 | 446 | .name = "generic", |
| 447 | 447 | .llvm_name = "generic", |
| 448 | .features = 0, | |
| 448 | .features = featureSet(&[_]Feature{}), | |
| 449 | 449 | }; |
| 450 | 450 | pub const z10 = Cpu{ |
| 451 | 451 | .name = "z10", |
| 452 | 452 | .llvm_name = "z10", |
| 453 | .features = 0, | |
| 453 | .features = featureSet(&[_]Feature{}), | |
| 454 | 454 | }; |
| 455 | 455 | pub const z13 = Cpu{ |
| 456 | 456 | .name = "z13", |
lib/std/target/wasm.zig+12-12| ... | ... | @@ -18,70 +18,70 @@ pub usingnamespace Cpu.Feature.feature_set_fns(Feature); |
| 18 | 18 | |
| 19 | 19 | pub const all_features = blk: { |
| 20 | 20 | const len = @typeInfo(Feature).Enum.fields.len; |
| 21 | std.debug.assert(len <= @typeInfo(Cpu.Feature.Set).Int.bits); | |
| 21 | std.debug.assert(len <= Cpu.Feature.Set.bit_count); | |
| 22 | 22 | var result: [len]Cpu.Feature = undefined; |
| 23 | 23 | result[@enumToInt(Feature.atomics)] = .{ |
| 24 | 24 | .index = @enumToInt(Feature.atomics), |
| 25 | 25 | .name = @tagName(Feature.atomics), |
| 26 | 26 | .llvm_name = "atomics", |
| 27 | 27 | .description = "Enable Atomics", |
| 28 | .dependencies = 0, | |
| 28 | .dependencies = featureSet(&[_]Feature{}), | |
| 29 | 29 | }; |
| 30 | 30 | result[@enumToInt(Feature.bulk_memory)] = .{ |
| 31 | 31 | .index = @enumToInt(Feature.bulk_memory), |
| 32 | 32 | .name = @tagName(Feature.bulk_memory), |
| 33 | 33 | .llvm_name = "bulk-memory", |
| 34 | 34 | .description = "Enable bulk memory operations", |
| 35 | .dependencies = 0, | |
| 35 | .dependencies = featureSet(&[_]Feature{}), | |
| 36 | 36 | }; |
| 37 | 37 | result[@enumToInt(Feature.exception_handling)] = .{ |
| 38 | 38 | .index = @enumToInt(Feature.exception_handling), |
| 39 | 39 | .name = @tagName(Feature.exception_handling), |
| 40 | 40 | .llvm_name = "exception-handling", |
| 41 | 41 | .description = "Enable Wasm exception handling", |
| 42 | .dependencies = 0, | |
| 42 | .dependencies = featureSet(&[_]Feature{}), | |
| 43 | 43 | }; |
| 44 | 44 | result[@enumToInt(Feature.multivalue)] = .{ |
| 45 | 45 | .index = @enumToInt(Feature.multivalue), |
| 46 | 46 | .name = @tagName(Feature.multivalue), |
| 47 | 47 | .llvm_name = "multivalue", |
| 48 | 48 | .description = "Enable multivalue blocks, instructions, and functions", |
| 49 | .dependencies = 0, | |
| 49 | .dependencies = featureSet(&[_]Feature{}), | |
| 50 | 50 | }; |
| 51 | 51 | result[@enumToInt(Feature.mutable_globals)] = .{ |
| 52 | 52 | .index = @enumToInt(Feature.mutable_globals), |
| 53 | 53 | .name = @tagName(Feature.mutable_globals), |
| 54 | 54 | .llvm_name = "mutable-globals", |
| 55 | 55 | .description = "Enable mutable globals", |
| 56 | .dependencies = 0, | |
| 56 | .dependencies = featureSet(&[_]Feature{}), | |
| 57 | 57 | }; |
| 58 | 58 | result[@enumToInt(Feature.nontrapping_fptoint)] = .{ |
| 59 | 59 | .index = @enumToInt(Feature.nontrapping_fptoint), |
| 60 | 60 | .name = @tagName(Feature.nontrapping_fptoint), |
| 61 | 61 | .llvm_name = "nontrapping-fptoint", |
| 62 | 62 | .description = "Enable non-trapping float-to-int conversion operators", |
| 63 | .dependencies = 0, | |
| 63 | .dependencies = featureSet(&[_]Feature{}), | |
| 64 | 64 | }; |
| 65 | 65 | result[@enumToInt(Feature.sign_ext)] = .{ |
| 66 | 66 | .index = @enumToInt(Feature.sign_ext), |
| 67 | 67 | .name = @tagName(Feature.sign_ext), |
| 68 | 68 | .llvm_name = "sign-ext", |
| 69 | 69 | .description = "Enable sign extension operators", |
| 70 | .dependencies = 0, | |
| 70 | .dependencies = featureSet(&[_]Feature{}), | |
| 71 | 71 | }; |
| 72 | 72 | result[@enumToInt(Feature.simd128)] = .{ |
| 73 | 73 | .index = @enumToInt(Feature.simd128), |
| 74 | 74 | .name = @tagName(Feature.simd128), |
| 75 | 75 | .llvm_name = "simd128", |
| 76 | 76 | .description = "Enable 128-bit SIMD", |
| 77 | .dependencies = 0, | |
| 77 | .dependencies = featureSet(&[_]Feature{}), | |
| 78 | 78 | }; |
| 79 | 79 | result[@enumToInt(Feature.tail_call)] = .{ |
| 80 | 80 | .index = @enumToInt(Feature.tail_call), |
| 81 | 81 | .name = @tagName(Feature.tail_call), |
| 82 | 82 | .llvm_name = "tail-call", |
| 83 | 83 | .description = "Enable tail call instructions", |
| 84 | .dependencies = 0, | |
| 84 | .dependencies = featureSet(&[_]Feature{}), | |
| 85 | 85 | }; |
| 86 | 86 | result[@enumToInt(Feature.unimplemented_simd128)] = .{ |
| 87 | 87 | .index = @enumToInt(Feature.unimplemented_simd128), |
| ... | ... | @@ -110,12 +110,12 @@ pub const cpu = struct { |
| 110 | 110 | pub const generic = Cpu{ |
| 111 | 111 | .name = "generic", |
| 112 | 112 | .llvm_name = "generic", |
| 113 | .features = 0, | |
| 113 | .features = featureSet(&[_]Feature{}), | |
| 114 | 114 | }; |
| 115 | 115 | pub const mvp = Cpu{ |
| 116 | 116 | .name = "mvp", |
| 117 | 117 | .llvm_name = "mvp", |
| 118 | .features = 0, | |
| 118 | .features = featureSet(&[_]Feature{}), | |
| 119 | 119 | }; |
| 120 | 120 | }; |
| 121 | 121 |
lib/std/target/x86.zig+87-87| ... | ... | @@ -132,21 +132,21 @@ pub usingnamespace Cpu.Feature.feature_set_fns(Feature); |
| 132 | 132 | |
| 133 | 133 | pub const all_features = blk: { |
| 134 | 134 | const len = @typeInfo(Feature).Enum.fields.len; |
| 135 | std.debug.assert(len <= @typeInfo(Cpu.Feature.Set).Int.bits); | |
| 135 | std.debug.assert(len <= Cpu.Feature.Set.bit_count); | |
| 136 | 136 | var result: [len]Cpu.Feature = undefined; |
| 137 | 137 | result[@enumToInt(Feature.@"16bit_mode")] = .{ |
| 138 | 138 | .index = @enumToInt(Feature.@"16bit_mode"), |
| 139 | 139 | .name = @tagName(Feature.@"16bit_mode"), |
| 140 | 140 | .llvm_name = "16bit-mode", |
| 141 | 141 | .description = "16-bit mode (i8086)", |
| 142 | .dependencies = 0, | |
| 142 | .dependencies = featureSet(&[_]Feature{}), | |
| 143 | 143 | }; |
| 144 | 144 | result[@enumToInt(Feature.@"32bit_mode")] = .{ |
| 145 | 145 | .index = @enumToInt(Feature.@"32bit_mode"), |
| 146 | 146 | .name = @tagName(Feature.@"32bit_mode"), |
| 147 | 147 | .llvm_name = "32bit-mode", |
| 148 | 148 | .description = "32-bit mode (80386)", |
| 149 | .dependencies = 0, | |
| 149 | .dependencies = featureSet(&[_]Feature{}), | |
| 150 | 150 | }; |
| 151 | 151 | result[@enumToInt(Feature.@"3dnow")] = .{ |
| 152 | 152 | .index = @enumToInt(Feature.@"3dnow"), |
| ... | ... | @@ -171,21 +171,21 @@ pub const all_features = blk: { |
| 171 | 171 | .name = @tagName(Feature.@"64bit"), |
| 172 | 172 | .llvm_name = "64bit", |
| 173 | 173 | .description = "Support 64-bit instructions", |
| 174 | .dependencies = 0, | |
| 174 | .dependencies = featureSet(&[_]Feature{}), | |
| 175 | 175 | }; |
| 176 | 176 | result[@enumToInt(Feature.@"64bit_mode")] = .{ |
| 177 | 177 | .index = @enumToInt(Feature.@"64bit_mode"), |
| 178 | 178 | .name = @tagName(Feature.@"64bit_mode"), |
| 179 | 179 | .llvm_name = "64bit-mode", |
| 180 | 180 | .description = "64-bit mode (x86_64)", |
| 181 | .dependencies = 0, | |
| 181 | .dependencies = featureSet(&[_]Feature{}), | |
| 182 | 182 | }; |
| 183 | 183 | result[@enumToInt(Feature.adx)] = .{ |
| 184 | 184 | .index = @enumToInt(Feature.adx), |
| 185 | 185 | .name = @tagName(Feature.adx), |
| 186 | 186 | .llvm_name = "adx", |
| 187 | 187 | .description = "Support ADX instructions", |
| 188 | .dependencies = 0, | |
| 188 | .dependencies = featureSet(&[_]Feature{}), | |
| 189 | 189 | }; |
| 190 | 190 | result[@enumToInt(Feature.aes)] = .{ |
| 191 | 191 | .index = @enumToInt(Feature.aes), |
| ... | ... | @@ -356,56 +356,56 @@ pub const all_features = blk: { |
| 356 | 356 | .name = @tagName(Feature.bmi), |
| 357 | 357 | .llvm_name = "bmi", |
| 358 | 358 | .description = "Support BMI instructions", |
| 359 | .dependencies = 0, | |
| 359 | .dependencies = featureSet(&[_]Feature{}), | |
| 360 | 360 | }; |
| 361 | 361 | result[@enumToInt(Feature.bmi2)] = .{ |
| 362 | 362 | .index = @enumToInt(Feature.bmi2), |
| 363 | 363 | .name = @tagName(Feature.bmi2), |
| 364 | 364 | .llvm_name = "bmi2", |
| 365 | 365 | .description = "Support BMI2 instructions", |
| 366 | .dependencies = 0, | |
| 366 | .dependencies = featureSet(&[_]Feature{}), | |
| 367 | 367 | }; |
| 368 | 368 | result[@enumToInt(Feature.branchfusion)] = .{ |
| 369 | 369 | .index = @enumToInt(Feature.branchfusion), |
| 370 | 370 | .name = @tagName(Feature.branchfusion), |
| 371 | 371 | .llvm_name = "branchfusion", |
| 372 | 372 | .description = "CMP/TEST can be fused with conditional branches", |
| 373 | .dependencies = 0, | |
| 373 | .dependencies = featureSet(&[_]Feature{}), | |
| 374 | 374 | }; |
| 375 | 375 | result[@enumToInt(Feature.cldemote)] = .{ |
| 376 | 376 | .index = @enumToInt(Feature.cldemote), |
| 377 | 377 | .name = @tagName(Feature.cldemote), |
| 378 | 378 | .llvm_name = "cldemote", |
| 379 | 379 | .description = "Enable Cache Demote", |
| 380 | .dependencies = 0, | |
| 380 | .dependencies = featureSet(&[_]Feature{}), | |
| 381 | 381 | }; |
| 382 | 382 | result[@enumToInt(Feature.clflushopt)] = .{ |
| 383 | 383 | .index = @enumToInt(Feature.clflushopt), |
| 384 | 384 | .name = @tagName(Feature.clflushopt), |
| 385 | 385 | .llvm_name = "clflushopt", |
| 386 | 386 | .description = "Flush A Cache Line Optimized", |
| 387 | .dependencies = 0, | |
| 387 | .dependencies = featureSet(&[_]Feature{}), | |
| 388 | 388 | }; |
| 389 | 389 | result[@enumToInt(Feature.clwb)] = .{ |
| 390 | 390 | .index = @enumToInt(Feature.clwb), |
| 391 | 391 | .name = @tagName(Feature.clwb), |
| 392 | 392 | .llvm_name = "clwb", |
| 393 | 393 | .description = "Cache Line Write Back", |
| 394 | .dependencies = 0, | |
| 394 | .dependencies = featureSet(&[_]Feature{}), | |
| 395 | 395 | }; |
| 396 | 396 | result[@enumToInt(Feature.clzero)] = .{ |
| 397 | 397 | .index = @enumToInt(Feature.clzero), |
| 398 | 398 | .name = @tagName(Feature.clzero), |
| 399 | 399 | .llvm_name = "clzero", |
| 400 | 400 | .description = "Enable Cache Line Zero", |
| 401 | .dependencies = 0, | |
| 401 | .dependencies = featureSet(&[_]Feature{}), | |
| 402 | 402 | }; |
| 403 | 403 | result[@enumToInt(Feature.cmov)] = .{ |
| 404 | 404 | .index = @enumToInt(Feature.cmov), |
| 405 | 405 | .name = @tagName(Feature.cmov), |
| 406 | 406 | .llvm_name = "cmov", |
| 407 | 407 | .description = "Enable conditional move instructions", |
| 408 | .dependencies = 0, | |
| 408 | .dependencies = featureSet(&[_]Feature{}), | |
| 409 | 409 | }; |
| 410 | 410 | result[@enumToInt(Feature.cx16)] = .{ |
| 411 | 411 | .index = @enumToInt(Feature.cx16), |
| ... | ... | @@ -421,21 +421,21 @@ pub const all_features = blk: { |
| 421 | 421 | .name = @tagName(Feature.cx8), |
| 422 | 422 | .llvm_name = "cx8", |
| 423 | 423 | .description = "Support CMPXCHG8B instructions", |
| 424 | .dependencies = 0, | |
| 424 | .dependencies = featureSet(&[_]Feature{}), | |
| 425 | 425 | }; |
| 426 | 426 | result[@enumToInt(Feature.enqcmd)] = .{ |
| 427 | 427 | .index = @enumToInt(Feature.enqcmd), |
| 428 | 428 | .name = @tagName(Feature.enqcmd), |
| 429 | 429 | .llvm_name = "enqcmd", |
| 430 | 430 | .description = "Has ENQCMD instructions", |
| 431 | .dependencies = 0, | |
| 431 | .dependencies = featureSet(&[_]Feature{}), | |
| 432 | 432 | }; |
| 433 | 433 | result[@enumToInt(Feature.ermsb)] = .{ |
| 434 | 434 | .index = @enumToInt(Feature.ermsb), |
| 435 | 435 | .name = @tagName(Feature.ermsb), |
| 436 | 436 | .llvm_name = "ermsb", |
| 437 | 437 | .description = "REP MOVS/STOS are fast", |
| 438 | .dependencies = 0, | |
| 438 | .dependencies = featureSet(&[_]Feature{}), | |
| 439 | 439 | }; |
| 440 | 440 | result[@enumToInt(Feature.f16c)] = .{ |
| 441 | 441 | .index = @enumToInt(Feature.f16c), |
| ... | ... | @@ -451,42 +451,42 @@ pub const all_features = blk: { |
| 451 | 451 | .name = @tagName(Feature.false_deps_lzcnt_tzcnt), |
| 452 | 452 | .llvm_name = "false-deps-lzcnt-tzcnt", |
| 453 | 453 | .description = "LZCNT/TZCNT have a false dependency on dest register", |
| 454 | .dependencies = 0, | |
| 454 | .dependencies = featureSet(&[_]Feature{}), | |
| 455 | 455 | }; |
| 456 | 456 | result[@enumToInt(Feature.false_deps_popcnt)] = .{ |
| 457 | 457 | .index = @enumToInt(Feature.false_deps_popcnt), |
| 458 | 458 | .name = @tagName(Feature.false_deps_popcnt), |
| 459 | 459 | .llvm_name = "false-deps-popcnt", |
| 460 | 460 | .description = "POPCNT has a false dependency on dest register", |
| 461 | .dependencies = 0, | |
| 461 | .dependencies = featureSet(&[_]Feature{}), | |
| 462 | 462 | }; |
| 463 | 463 | result[@enumToInt(Feature.fast_11bytenop)] = .{ |
| 464 | 464 | .index = @enumToInt(Feature.fast_11bytenop), |
| 465 | 465 | .name = @tagName(Feature.fast_11bytenop), |
| 466 | 466 | .llvm_name = "fast-11bytenop", |
| 467 | 467 | .description = "Target can quickly decode up to 11 byte NOPs", |
| 468 | .dependencies = 0, | |
| 468 | .dependencies = featureSet(&[_]Feature{}), | |
| 469 | 469 | }; |
| 470 | 470 | result[@enumToInt(Feature.fast_15bytenop)] = .{ |
| 471 | 471 | .index = @enumToInt(Feature.fast_15bytenop), |
| 472 | 472 | .name = @tagName(Feature.fast_15bytenop), |
| 473 | 473 | .llvm_name = "fast-15bytenop", |
| 474 | 474 | .description = "Target can quickly decode up to 15 byte NOPs", |
| 475 | .dependencies = 0, | |
| 475 | .dependencies = featureSet(&[_]Feature{}), | |
| 476 | 476 | }; |
| 477 | 477 | result[@enumToInt(Feature.fast_bextr)] = .{ |
| 478 | 478 | .index = @enumToInt(Feature.fast_bextr), |
| 479 | 479 | .name = @tagName(Feature.fast_bextr), |
| 480 | 480 | .llvm_name = "fast-bextr", |
| 481 | 481 | .description = "Indicates that the BEXTR instruction is implemented as a single uop with good throughput", |
| 482 | .dependencies = 0, | |
| 482 | .dependencies = featureSet(&[_]Feature{}), | |
| 483 | 483 | }; |
| 484 | 484 | result[@enumToInt(Feature.fast_gather)] = .{ |
| 485 | 485 | .index = @enumToInt(Feature.fast_gather), |
| 486 | 486 | .name = @tagName(Feature.fast_gather), |
| 487 | 487 | .llvm_name = "fast-gather", |
| 488 | 488 | .description = "Indicates if gather is reasonably fast", |
| 489 | .dependencies = 0, | |
| 489 | .dependencies = featureSet(&[_]Feature{}), | |
| 490 | 490 | }; |
| 491 | 491 | result[@enumToInt(Feature.fast_hops)] = .{ |
| 492 | 492 | .index = @enumToInt(Feature.fast_hops), |
| ... | ... | @@ -502,56 +502,56 @@ pub const all_features = blk: { |
| 502 | 502 | .name = @tagName(Feature.fast_lzcnt), |
| 503 | 503 | .llvm_name = "fast-lzcnt", |
| 504 | 504 | .description = "LZCNT instructions are as fast as most simple integer ops", |
| 505 | .dependencies = 0, | |
| 505 | .dependencies = featureSet(&[_]Feature{}), | |
| 506 | 506 | }; |
| 507 | 507 | result[@enumToInt(Feature.fast_partial_ymm_or_zmm_write)] = .{ |
| 508 | 508 | .index = @enumToInt(Feature.fast_partial_ymm_or_zmm_write), |
| 509 | 509 | .name = @tagName(Feature.fast_partial_ymm_or_zmm_write), |
| 510 | 510 | .llvm_name = "fast-partial-ymm-or-zmm-write", |
| 511 | 511 | .description = "Partial writes to YMM/ZMM registers are fast", |
| 512 | .dependencies = 0, | |
| 512 | .dependencies = featureSet(&[_]Feature{}), | |
| 513 | 513 | }; |
| 514 | 514 | result[@enumToInt(Feature.fast_scalar_fsqrt)] = .{ |
| 515 | 515 | .index = @enumToInt(Feature.fast_scalar_fsqrt), |
| 516 | 516 | .name = @tagName(Feature.fast_scalar_fsqrt), |
| 517 | 517 | .llvm_name = "fast-scalar-fsqrt", |
| 518 | 518 | .description = "Scalar SQRT is fast (disable Newton-Raphson)", |
| 519 | .dependencies = 0, | |
| 519 | .dependencies = featureSet(&[_]Feature{}), | |
| 520 | 520 | }; |
| 521 | 521 | result[@enumToInt(Feature.fast_scalar_shift_masks)] = .{ |
| 522 | 522 | .index = @enumToInt(Feature.fast_scalar_shift_masks), |
| 523 | 523 | .name = @tagName(Feature.fast_scalar_shift_masks), |
| 524 | 524 | .llvm_name = "fast-scalar-shift-masks", |
| 525 | 525 | .description = "Prefer a left/right scalar logical shift pair over a shift+and pair", |
| 526 | .dependencies = 0, | |
| 526 | .dependencies = featureSet(&[_]Feature{}), | |
| 527 | 527 | }; |
| 528 | 528 | result[@enumToInt(Feature.fast_shld_rotate)] = .{ |
| 529 | 529 | .index = @enumToInt(Feature.fast_shld_rotate), |
| 530 | 530 | .name = @tagName(Feature.fast_shld_rotate), |
| 531 | 531 | .llvm_name = "fast-shld-rotate", |
| 532 | 532 | .description = "SHLD can be used as a faster rotate", |
| 533 | .dependencies = 0, | |
| 533 | .dependencies = featureSet(&[_]Feature{}), | |
| 534 | 534 | }; |
| 535 | 535 | result[@enumToInt(Feature.fast_variable_shuffle)] = .{ |
| 536 | 536 | .index = @enumToInt(Feature.fast_variable_shuffle), |
| 537 | 537 | .name = @tagName(Feature.fast_variable_shuffle), |
| 538 | 538 | .llvm_name = "fast-variable-shuffle", |
| 539 | 539 | .description = "Shuffles with variable masks are fast", |
| 540 | .dependencies = 0, | |
| 540 | .dependencies = featureSet(&[_]Feature{}), | |
| 541 | 541 | }; |
| 542 | 542 | result[@enumToInt(Feature.fast_vector_fsqrt)] = .{ |
| 543 | 543 | .index = @enumToInt(Feature.fast_vector_fsqrt), |
| 544 | 544 | .name = @tagName(Feature.fast_vector_fsqrt), |
| 545 | 545 | .llvm_name = "fast-vector-fsqrt", |
| 546 | 546 | .description = "Vector SQRT is fast (disable Newton-Raphson)", |
| 547 | .dependencies = 0, | |
| 547 | .dependencies = featureSet(&[_]Feature{}), | |
| 548 | 548 | }; |
| 549 | 549 | result[@enumToInt(Feature.fast_vector_shift_masks)] = .{ |
| 550 | 550 | .index = @enumToInt(Feature.fast_vector_shift_masks), |
| 551 | 551 | .name = @tagName(Feature.fast_vector_shift_masks), |
| 552 | 552 | .llvm_name = "fast-vector-shift-masks", |
| 553 | 553 | .description = "Prefer a left/right vector logical shift pair over a shift+and pair", |
| 554 | .dependencies = 0, | |
| 554 | .dependencies = featureSet(&[_]Feature{}), | |
| 555 | 555 | }; |
| 556 | 556 | result[@enumToInt(Feature.fma)] = .{ |
| 557 | 557 | .index = @enumToInt(Feature.fma), |
| ... | ... | @@ -577,14 +577,14 @@ pub const all_features = blk: { |
| 577 | 577 | .name = @tagName(Feature.fsgsbase), |
| 578 | 578 | .llvm_name = "fsgsbase", |
| 579 | 579 | .description = "Support FS/GS Base instructions", |
| 580 | .dependencies = 0, | |
| 580 | .dependencies = featureSet(&[_]Feature{}), | |
| 581 | 581 | }; |
| 582 | 582 | result[@enumToInt(Feature.fxsr)] = .{ |
| 583 | 583 | .index = @enumToInt(Feature.fxsr), |
| 584 | 584 | .name = @tagName(Feature.fxsr), |
| 585 | 585 | .llvm_name = "fxsr", |
| 586 | 586 | .description = "Support fxsave/fxrestore instructions", |
| 587 | .dependencies = 0, | |
| 587 | .dependencies = featureSet(&[_]Feature{}), | |
| 588 | 588 | }; |
| 589 | 589 | result[@enumToInt(Feature.gfni)] = .{ |
| 590 | 590 | .index = @enumToInt(Feature.gfni), |
| ... | ... | @@ -600,119 +600,119 @@ pub const all_features = blk: { |
| 600 | 600 | .name = @tagName(Feature.idivl_to_divb), |
| 601 | 601 | .llvm_name = "idivl-to-divb", |
| 602 | 602 | .description = "Use 8-bit divide for positive values less than 256", |
| 603 | .dependencies = 0, | |
| 603 | .dependencies = featureSet(&[_]Feature{}), | |
| 604 | 604 | }; |
| 605 | 605 | result[@enumToInt(Feature.idivq_to_divl)] = .{ |
| 606 | 606 | .index = @enumToInt(Feature.idivq_to_divl), |
| 607 | 607 | .name = @tagName(Feature.idivq_to_divl), |
| 608 | 608 | .llvm_name = "idivq-to-divl", |
| 609 | 609 | .description = "Use 32-bit divide for positive values less than 2^32", |
| 610 | .dependencies = 0, | |
| 610 | .dependencies = featureSet(&[_]Feature{}), | |
| 611 | 611 | }; |
| 612 | 612 | result[@enumToInt(Feature.invpcid)] = .{ |
| 613 | 613 | .index = @enumToInt(Feature.invpcid), |
| 614 | 614 | .name = @tagName(Feature.invpcid), |
| 615 | 615 | .llvm_name = "invpcid", |
| 616 | 616 | .description = "Invalidate Process-Context Identifier", |
| 617 | .dependencies = 0, | |
| 617 | .dependencies = featureSet(&[_]Feature{}), | |
| 618 | 618 | }; |
| 619 | 619 | result[@enumToInt(Feature.lea_sp)] = .{ |
| 620 | 620 | .index = @enumToInt(Feature.lea_sp), |
| 621 | 621 | .name = @tagName(Feature.lea_sp), |
| 622 | 622 | .llvm_name = "lea-sp", |
| 623 | 623 | .description = "Use LEA for adjusting the stack pointer", |
| 624 | .dependencies = 0, | |
| 624 | .dependencies = featureSet(&[_]Feature{}), | |
| 625 | 625 | }; |
| 626 | 626 | result[@enumToInt(Feature.lea_uses_ag)] = .{ |
| 627 | 627 | .index = @enumToInt(Feature.lea_uses_ag), |
| 628 | 628 | .name = @tagName(Feature.lea_uses_ag), |
| 629 | 629 | .llvm_name = "lea-uses-ag", |
| 630 | 630 | .description = "LEA instruction needs inputs at AG stage", |
| 631 | .dependencies = 0, | |
| 631 | .dependencies = featureSet(&[_]Feature{}), | |
| 632 | 632 | }; |
| 633 | 633 | result[@enumToInt(Feature.lwp)] = .{ |
| 634 | 634 | .index = @enumToInt(Feature.lwp), |
| 635 | 635 | .name = @tagName(Feature.lwp), |
| 636 | 636 | .llvm_name = "lwp", |
| 637 | 637 | .description = "Enable LWP instructions", |
| 638 | .dependencies = 0, | |
| 638 | .dependencies = featureSet(&[_]Feature{}), | |
| 639 | 639 | }; |
| 640 | 640 | result[@enumToInt(Feature.lzcnt)] = .{ |
| 641 | 641 | .index = @enumToInt(Feature.lzcnt), |
| 642 | 642 | .name = @tagName(Feature.lzcnt), |
| 643 | 643 | .llvm_name = "lzcnt", |
| 644 | 644 | .description = "Support LZCNT instruction", |
| 645 | .dependencies = 0, | |
| 645 | .dependencies = featureSet(&[_]Feature{}), | |
| 646 | 646 | }; |
| 647 | 647 | result[@enumToInt(Feature.macrofusion)] = .{ |
| 648 | 648 | .index = @enumToInt(Feature.macrofusion), |
| 649 | 649 | .name = @tagName(Feature.macrofusion), |
| 650 | 650 | .llvm_name = "macrofusion", |
| 651 | 651 | .description = "Various instructions can be fused with conditional branches", |
| 652 | .dependencies = 0, | |
| 652 | .dependencies = featureSet(&[_]Feature{}), | |
| 653 | 653 | }; |
| 654 | 654 | result[@enumToInt(Feature.merge_to_threeway_branch)] = .{ |
| 655 | 655 | .index = @enumToInt(Feature.merge_to_threeway_branch), |
| 656 | 656 | .name = @tagName(Feature.merge_to_threeway_branch), |
| 657 | 657 | .llvm_name = "merge-to-threeway-branch", |
| 658 | 658 | .description = "Merge branches to a three-way conditional branch", |
| 659 | .dependencies = 0, | |
| 659 | .dependencies = featureSet(&[_]Feature{}), | |
| 660 | 660 | }; |
| 661 | 661 | result[@enumToInt(Feature.mmx)] = .{ |
| 662 | 662 | .index = @enumToInt(Feature.mmx), |
| 663 | 663 | .name = @tagName(Feature.mmx), |
| 664 | 664 | .llvm_name = "mmx", |
| 665 | 665 | .description = "Enable MMX instructions", |
| 666 | .dependencies = 0, | |
| 666 | .dependencies = featureSet(&[_]Feature{}), | |
| 667 | 667 | }; |
| 668 | 668 | result[@enumToInt(Feature.movbe)] = .{ |
| 669 | 669 | .index = @enumToInt(Feature.movbe), |
| 670 | 670 | .name = @tagName(Feature.movbe), |
| 671 | 671 | .llvm_name = "movbe", |
| 672 | 672 | .description = "Support MOVBE instruction", |
| 673 | .dependencies = 0, | |
| 673 | .dependencies = featureSet(&[_]Feature{}), | |
| 674 | 674 | }; |
| 675 | 675 | result[@enumToInt(Feature.movdir64b)] = .{ |
| 676 | 676 | .index = @enumToInt(Feature.movdir64b), |
| 677 | 677 | .name = @tagName(Feature.movdir64b), |
| 678 | 678 | .llvm_name = "movdir64b", |
| 679 | 679 | .description = "Support movdir64b instruction", |
| 680 | .dependencies = 0, | |
| 680 | .dependencies = featureSet(&[_]Feature{}), | |
| 681 | 681 | }; |
| 682 | 682 | result[@enumToInt(Feature.movdiri)] = .{ |
| 683 | 683 | .index = @enumToInt(Feature.movdiri), |
| 684 | 684 | .name = @tagName(Feature.movdiri), |
| 685 | 685 | .llvm_name = "movdiri", |
| 686 | 686 | .description = "Support movdiri instruction", |
| 687 | .dependencies = 0, | |
| 687 | .dependencies = featureSet(&[_]Feature{}), | |
| 688 | 688 | }; |
| 689 | 689 | result[@enumToInt(Feature.mpx)] = .{ |
| 690 | 690 | .index = @enumToInt(Feature.mpx), |
| 691 | 691 | .name = @tagName(Feature.mpx), |
| 692 | 692 | .llvm_name = "mpx", |
| 693 | 693 | .description = "Support MPX instructions", |
| 694 | .dependencies = 0, | |
| 694 | .dependencies = featureSet(&[_]Feature{}), | |
| 695 | 695 | }; |
| 696 | 696 | result[@enumToInt(Feature.mwaitx)] = .{ |
| 697 | 697 | .index = @enumToInt(Feature.mwaitx), |
| 698 | 698 | .name = @tagName(Feature.mwaitx), |
| 699 | 699 | .llvm_name = "mwaitx", |
| 700 | 700 | .description = "Enable MONITORX/MWAITX timer functionality", |
| 701 | .dependencies = 0, | |
| 701 | .dependencies = featureSet(&[_]Feature{}), | |
| 702 | 702 | }; |
| 703 | 703 | result[@enumToInt(Feature.nopl)] = .{ |
| 704 | 704 | .index = @enumToInt(Feature.nopl), |
| 705 | 705 | .name = @tagName(Feature.nopl), |
| 706 | 706 | .llvm_name = "nopl", |
| 707 | 707 | .description = "Enable NOPL instruction", |
| 708 | .dependencies = 0, | |
| 708 | .dependencies = featureSet(&[_]Feature{}), | |
| 709 | 709 | }; |
| 710 | 710 | result[@enumToInt(Feature.pad_short_functions)] = .{ |
| 711 | 711 | .index = @enumToInt(Feature.pad_short_functions), |
| 712 | 712 | .name = @tagName(Feature.pad_short_functions), |
| 713 | 713 | .llvm_name = "pad-short-functions", |
| 714 | 714 | .description = "Pad short functions", |
| 715 | .dependencies = 0, | |
| 715 | .dependencies = featureSet(&[_]Feature{}), | |
| 716 | 716 | }; |
| 717 | 717 | result[@enumToInt(Feature.pclmul)] = .{ |
| 718 | 718 | .index = @enumToInt(Feature.pclmul), |
| ... | ... | @@ -728,70 +728,70 @@ pub const all_features = blk: { |
| 728 | 728 | .name = @tagName(Feature.pconfig), |
| 729 | 729 | .llvm_name = "pconfig", |
| 730 | 730 | .description = "platform configuration instruction", |
| 731 | .dependencies = 0, | |
| 731 | .dependencies = featureSet(&[_]Feature{}), | |
| 732 | 732 | }; |
| 733 | 733 | result[@enumToInt(Feature.pku)] = .{ |
| 734 | 734 | .index = @enumToInt(Feature.pku), |
| 735 | 735 | .name = @tagName(Feature.pku), |
| 736 | 736 | .llvm_name = "pku", |
| 737 | 737 | .description = "Enable protection keys", |
| 738 | .dependencies = 0, | |
| 738 | .dependencies = featureSet(&[_]Feature{}), | |
| 739 | 739 | }; |
| 740 | 740 | result[@enumToInt(Feature.popcnt)] = .{ |
| 741 | 741 | .index = @enumToInt(Feature.popcnt), |
| 742 | 742 | .name = @tagName(Feature.popcnt), |
| 743 | 743 | .llvm_name = "popcnt", |
| 744 | 744 | .description = "Support POPCNT instruction", |
| 745 | .dependencies = 0, | |
| 745 | .dependencies = featureSet(&[_]Feature{}), | |
| 746 | 746 | }; |
| 747 | 747 | result[@enumToInt(Feature.prefer_256_bit)] = .{ |
| 748 | 748 | .index = @enumToInt(Feature.prefer_256_bit), |
| 749 | 749 | .name = @tagName(Feature.prefer_256_bit), |
| 750 | 750 | .llvm_name = "prefer-256-bit", |
| 751 | 751 | .description = "Prefer 256-bit AVX instructions", |
| 752 | .dependencies = 0, | |
| 752 | .dependencies = featureSet(&[_]Feature{}), | |
| 753 | 753 | }; |
| 754 | 754 | result[@enumToInt(Feature.prefetchwt1)] = .{ |
| 755 | 755 | .index = @enumToInt(Feature.prefetchwt1), |
| 756 | 756 | .name = @tagName(Feature.prefetchwt1), |
| 757 | 757 | .llvm_name = "prefetchwt1", |
| 758 | 758 | .description = "Prefetch with Intent to Write and T1 Hint", |
| 759 | .dependencies = 0, | |
| 759 | .dependencies = featureSet(&[_]Feature{}), | |
| 760 | 760 | }; |
| 761 | 761 | result[@enumToInt(Feature.prfchw)] = .{ |
| 762 | 762 | .index = @enumToInt(Feature.prfchw), |
| 763 | 763 | .name = @tagName(Feature.prfchw), |
| 764 | 764 | .llvm_name = "prfchw", |
| 765 | 765 | .description = "Support PRFCHW instructions", |
| 766 | .dependencies = 0, | |
| 766 | .dependencies = featureSet(&[_]Feature{}), | |
| 767 | 767 | }; |
| 768 | 768 | result[@enumToInt(Feature.ptwrite)] = .{ |
| 769 | 769 | .index = @enumToInt(Feature.ptwrite), |
| 770 | 770 | .name = @tagName(Feature.ptwrite), |
| 771 | 771 | .llvm_name = "ptwrite", |
| 772 | 772 | .description = "Support ptwrite instruction", |
| 773 | .dependencies = 0, | |
| 773 | .dependencies = featureSet(&[_]Feature{}), | |
| 774 | 774 | }; |
| 775 | 775 | result[@enumToInt(Feature.rdpid)] = .{ |
| 776 | 776 | .index = @enumToInt(Feature.rdpid), |
| 777 | 777 | .name = @tagName(Feature.rdpid), |
| 778 | 778 | .llvm_name = "rdpid", |
| 779 | 779 | .description = "Support RDPID instructions", |
| 780 | .dependencies = 0, | |
| 780 | .dependencies = featureSet(&[_]Feature{}), | |
| 781 | 781 | }; |
| 782 | 782 | result[@enumToInt(Feature.rdrnd)] = .{ |
| 783 | 783 | .index = @enumToInt(Feature.rdrnd), |
| 784 | 784 | .name = @tagName(Feature.rdrnd), |
| 785 | 785 | .llvm_name = "rdrnd", |
| 786 | 786 | .description = "Support RDRAND instruction", |
| 787 | .dependencies = 0, | |
| 787 | .dependencies = featureSet(&[_]Feature{}), | |
| 788 | 788 | }; |
| 789 | 789 | result[@enumToInt(Feature.rdseed)] = .{ |
| 790 | 790 | .index = @enumToInt(Feature.rdseed), |
| 791 | 791 | .name = @tagName(Feature.rdseed), |
| 792 | 792 | .llvm_name = "rdseed", |
| 793 | 793 | .description = "Support RDSEED instruction", |
| 794 | .dependencies = 0, | |
| 794 | .dependencies = featureSet(&[_]Feature{}), | |
| 795 | 795 | }; |
| 796 | 796 | result[@enumToInt(Feature.retpoline)] = .{ |
| 797 | 797 | .index = @enumToInt(Feature.retpoline), |
| ... | ... | @@ -817,35 +817,35 @@ pub const all_features = blk: { |
| 817 | 817 | .name = @tagName(Feature.retpoline_indirect_branches), |
| 818 | 818 | .llvm_name = "retpoline-indirect-branches", |
| 819 | 819 | .description = "Remove speculation of indirect branches from the generated code", |
| 820 | .dependencies = 0, | |
| 820 | .dependencies = featureSet(&[_]Feature{}), | |
| 821 | 821 | }; |
| 822 | 822 | result[@enumToInt(Feature.retpoline_indirect_calls)] = .{ |
| 823 | 823 | .index = @enumToInt(Feature.retpoline_indirect_calls), |
| 824 | 824 | .name = @tagName(Feature.retpoline_indirect_calls), |
| 825 | 825 | .llvm_name = "retpoline-indirect-calls", |
| 826 | 826 | .description = "Remove speculation of indirect calls from the generated code", |
| 827 | .dependencies = 0, | |
| 827 | .dependencies = featureSet(&[_]Feature{}), | |
| 828 | 828 | }; |
| 829 | 829 | result[@enumToInt(Feature.rtm)] = .{ |
| 830 | 830 | .index = @enumToInt(Feature.rtm), |
| 831 | 831 | .name = @tagName(Feature.rtm), |
| 832 | 832 | .llvm_name = "rtm", |
| 833 | 833 | .description = "Support RTM instructions", |
| 834 | .dependencies = 0, | |
| 834 | .dependencies = featureSet(&[_]Feature{}), | |
| 835 | 835 | }; |
| 836 | 836 | result[@enumToInt(Feature.sahf)] = .{ |
| 837 | 837 | .index = @enumToInt(Feature.sahf), |
| 838 | 838 | .name = @tagName(Feature.sahf), |
| 839 | 839 | .llvm_name = "sahf", |
| 840 | 840 | .description = "Support LAHF and SAHF instructions", |
| 841 | .dependencies = 0, | |
| 841 | .dependencies = featureSet(&[_]Feature{}), | |
| 842 | 842 | }; |
| 843 | 843 | result[@enumToInt(Feature.sgx)] = .{ |
| 844 | 844 | .index = @enumToInt(Feature.sgx), |
| 845 | 845 | .name = @tagName(Feature.sgx), |
| 846 | 846 | .llvm_name = "sgx", |
| 847 | 847 | .description = "Enable Software Guard Extensions", |
| 848 | .dependencies = 0, | |
| 848 | .dependencies = featureSet(&[_]Feature{}), | |
| 849 | 849 | }; |
| 850 | 850 | result[@enumToInt(Feature.sha)] = .{ |
| 851 | 851 | .index = @enumToInt(Feature.sha), |
| ... | ... | @@ -861,91 +861,91 @@ pub const all_features = blk: { |
| 861 | 861 | .name = @tagName(Feature.shstk), |
| 862 | 862 | .llvm_name = "shstk", |
| 863 | 863 | .description = "Support CET Shadow-Stack instructions", |
| 864 | .dependencies = 0, | |
| 864 | .dependencies = featureSet(&[_]Feature{}), | |
| 865 | 865 | }; |
| 866 | 866 | result[@enumToInt(Feature.slow_3ops_lea)] = .{ |
| 867 | 867 | .index = @enumToInt(Feature.slow_3ops_lea), |
| 868 | 868 | .name = @tagName(Feature.slow_3ops_lea), |
| 869 | 869 | .llvm_name = "slow-3ops-lea", |
| 870 | 870 | .description = "LEA instruction with 3 ops or certain registers is slow", |
| 871 | .dependencies = 0, | |
| 871 | .dependencies = featureSet(&[_]Feature{}), | |
| 872 | 872 | }; |
| 873 | 873 | result[@enumToInt(Feature.slow_incdec)] = .{ |
| 874 | 874 | .index = @enumToInt(Feature.slow_incdec), |
| 875 | 875 | .name = @tagName(Feature.slow_incdec), |
| 876 | 876 | .llvm_name = "slow-incdec", |
| 877 | 877 | .description = "INC and DEC instructions are slower than ADD and SUB", |
| 878 | .dependencies = 0, | |
| 878 | .dependencies = featureSet(&[_]Feature{}), | |
| 879 | 879 | }; |
| 880 | 880 | result[@enumToInt(Feature.slow_lea)] = .{ |
| 881 | 881 | .index = @enumToInt(Feature.slow_lea), |
| 882 | 882 | .name = @tagName(Feature.slow_lea), |
| 883 | 883 | .llvm_name = "slow-lea", |
| 884 | 884 | .description = "LEA instruction with certain arguments is slow", |
| 885 | .dependencies = 0, | |
| 885 | .dependencies = featureSet(&[_]Feature{}), | |
| 886 | 886 | }; |
| 887 | 887 | result[@enumToInt(Feature.slow_pmaddwd)] = .{ |
| 888 | 888 | .index = @enumToInt(Feature.slow_pmaddwd), |
| 889 | 889 | .name = @tagName(Feature.slow_pmaddwd), |
| 890 | 890 | .llvm_name = "slow-pmaddwd", |
| 891 | 891 | .description = "PMADDWD is slower than PMULLD", |
| 892 | .dependencies = 0, | |
| 892 | .dependencies = featureSet(&[_]Feature{}), | |
| 893 | 893 | }; |
| 894 | 894 | result[@enumToInt(Feature.slow_pmulld)] = .{ |
| 895 | 895 | .index = @enumToInt(Feature.slow_pmulld), |
| 896 | 896 | .name = @tagName(Feature.slow_pmulld), |
| 897 | 897 | .llvm_name = "slow-pmulld", |
| 898 | 898 | .description = "PMULLD instruction is slow", |
| 899 | .dependencies = 0, | |
| 899 | .dependencies = featureSet(&[_]Feature{}), | |
| 900 | 900 | }; |
| 901 | 901 | result[@enumToInt(Feature.slow_shld)] = .{ |
| 902 | 902 | .index = @enumToInt(Feature.slow_shld), |
| 903 | 903 | .name = @tagName(Feature.slow_shld), |
| 904 | 904 | .llvm_name = "slow-shld", |
| 905 | 905 | .description = "SHLD instruction is slow", |
| 906 | .dependencies = 0, | |
| 906 | .dependencies = featureSet(&[_]Feature{}), | |
| 907 | 907 | }; |
| 908 | 908 | result[@enumToInt(Feature.slow_two_mem_ops)] = .{ |
| 909 | 909 | .index = @enumToInt(Feature.slow_two_mem_ops), |
| 910 | 910 | .name = @tagName(Feature.slow_two_mem_ops), |
| 911 | 911 | .llvm_name = "slow-two-mem-ops", |
| 912 | 912 | .description = "Two memory operand instructions are slow", |
| 913 | .dependencies = 0, | |
| 913 | .dependencies = featureSet(&[_]Feature{}), | |
| 914 | 914 | }; |
| 915 | 915 | result[@enumToInt(Feature.slow_unaligned_mem_16)] = .{ |
| 916 | 916 | .index = @enumToInt(Feature.slow_unaligned_mem_16), |
| 917 | 917 | .name = @tagName(Feature.slow_unaligned_mem_16), |
| 918 | 918 | .llvm_name = "slow-unaligned-mem-16", |
| 919 | 919 | .description = "Slow unaligned 16-byte memory access", |
| 920 | .dependencies = 0, | |
| 920 | .dependencies = featureSet(&[_]Feature{}), | |
| 921 | 921 | }; |
| 922 | 922 | result[@enumToInt(Feature.slow_unaligned_mem_32)] = .{ |
| 923 | 923 | .index = @enumToInt(Feature.slow_unaligned_mem_32), |
| 924 | 924 | .name = @tagName(Feature.slow_unaligned_mem_32), |
| 925 | 925 | .llvm_name = "slow-unaligned-mem-32", |
| 926 | 926 | .description = "Slow unaligned 32-byte memory access", |
| 927 | .dependencies = 0, | |
| 927 | .dependencies = featureSet(&[_]Feature{}), | |
| 928 | 928 | }; |
| 929 | 929 | result[@enumToInt(Feature.soft_float)] = .{ |
| 930 | 930 | .index = @enumToInt(Feature.soft_float), |
| 931 | 931 | .name = @tagName(Feature.soft_float), |
| 932 | 932 | .llvm_name = "soft-float", |
| 933 | 933 | .description = "Use software floating point features", |
| 934 | .dependencies = 0, | |
| 934 | .dependencies = featureSet(&[_]Feature{}), | |
| 935 | 935 | }; |
| 936 | 936 | result[@enumToInt(Feature.sse)] = .{ |
| 937 | 937 | .index = @enumToInt(Feature.sse), |
| 938 | 938 | .name = @tagName(Feature.sse), |
| 939 | 939 | .llvm_name = "sse", |
| 940 | 940 | .description = "Enable SSE instructions", |
| 941 | .dependencies = 0, | |
| 941 | .dependencies = featureSet(&[_]Feature{}), | |
| 942 | 942 | }; |
| 943 | 943 | result[@enumToInt(Feature.sse_unaligned_mem)] = .{ |
| 944 | 944 | .index = @enumToInt(Feature.sse_unaligned_mem), |
| 945 | 945 | .name = @tagName(Feature.sse_unaligned_mem), |
| 946 | 946 | .llvm_name = "sse-unaligned-mem", |
| 947 | 947 | .description = "Allow unaligned memory operands with SSE instructions", |
| 948 | .dependencies = 0, | |
| 948 | .dependencies = featureSet(&[_]Feature{}), | |
| 949 | 949 | }; |
| 950 | 950 | result[@enumToInt(Feature.sse2)] = .{ |
| 951 | 951 | .index = @enumToInt(Feature.sse2), |
| ... | ... | @@ -1006,7 +1006,7 @@ pub const all_features = blk: { |
| 1006 | 1006 | .name = @tagName(Feature.tbm), |
| 1007 | 1007 | .llvm_name = "tbm", |
| 1008 | 1008 | .description = "Enable TBM instructions", |
| 1009 | .dependencies = 0, | |
| 1009 | .dependencies = featureSet(&[_]Feature{}), | |
| 1010 | 1010 | }; |
| 1011 | 1011 | result[@enumToInt(Feature.vaes)] = .{ |
| 1012 | 1012 | .index = @enumToInt(Feature.vaes), |
| ... | ... | @@ -1033,21 +1033,21 @@ pub const all_features = blk: { |
| 1033 | 1033 | .name = @tagName(Feature.waitpkg), |
| 1034 | 1034 | .llvm_name = "waitpkg", |
| 1035 | 1035 | .description = "Wait and pause enhancements", |
| 1036 | .dependencies = 0, | |
| 1036 | .dependencies = featureSet(&[_]Feature{}), | |
| 1037 | 1037 | }; |
| 1038 | 1038 | result[@enumToInt(Feature.wbnoinvd)] = .{ |
| 1039 | 1039 | .index = @enumToInt(Feature.wbnoinvd), |
| 1040 | 1040 | .name = @tagName(Feature.wbnoinvd), |
| 1041 | 1041 | .llvm_name = "wbnoinvd", |
| 1042 | 1042 | .description = "Write Back No Invalidate", |
| 1043 | .dependencies = 0, | |
| 1043 | .dependencies = featureSet(&[_]Feature{}), | |
| 1044 | 1044 | }; |
| 1045 | 1045 | result[@enumToInt(Feature.x87)] = .{ |
| 1046 | 1046 | .index = @enumToInt(Feature.x87), |
| 1047 | 1047 | .name = @tagName(Feature.x87), |
| 1048 | 1048 | .llvm_name = "x87", |
| 1049 | 1049 | .description = "Enable X87 float instructions", |
| 1050 | .dependencies = 0, | |
| 1050 | .dependencies = featureSet(&[_]Feature{}), | |
| 1051 | 1051 | }; |
| 1052 | 1052 | result[@enumToInt(Feature.xop)] = .{ |
| 1053 | 1053 | .index = @enumToInt(Feature.xop), |
| ... | ... | @@ -1063,28 +1063,28 @@ pub const all_features = blk: { |
| 1063 | 1063 | .name = @tagName(Feature.xsave), |
| 1064 | 1064 | .llvm_name = "xsave", |
| 1065 | 1065 | .description = "Support xsave instructions", |
| 1066 | .dependencies = 0, | |
| 1066 | .dependencies = featureSet(&[_]Feature{}), | |
| 1067 | 1067 | }; |
| 1068 | 1068 | result[@enumToInt(Feature.xsavec)] = .{ |
| 1069 | 1069 | .index = @enumToInt(Feature.xsavec), |
| 1070 | 1070 | .name = @tagName(Feature.xsavec), |
| 1071 | 1071 | .llvm_name = "xsavec", |
| 1072 | 1072 | .description = "Support xsavec instructions", |
| 1073 | .dependencies = 0, | |
| 1073 | .dependencies = featureSet(&[_]Feature{}), | |
| 1074 | 1074 | }; |
| 1075 | 1075 | result[@enumToInt(Feature.xsaveopt)] = .{ |
| 1076 | 1076 | .index = @enumToInt(Feature.xsaveopt), |
| 1077 | 1077 | .name = @tagName(Feature.xsaveopt), |
| 1078 | 1078 | .llvm_name = "xsaveopt", |
| 1079 | 1079 | .description = "Support xsaveopt instructions", |
| 1080 | .dependencies = 0, | |
| 1080 | .dependencies = featureSet(&[_]Feature{}), | |
| 1081 | 1081 | }; |
| 1082 | 1082 | result[@enumToInt(Feature.xsaves)] = .{ |
| 1083 | 1083 | .index = @enumToInt(Feature.xsaves), |
| 1084 | 1084 | .name = @tagName(Feature.xsaves), |
| 1085 | 1085 | .llvm_name = "xsaves", |
| 1086 | 1086 | .description = "Support xsaves instructions", |
| 1087 | .dependencies = 0, | |
| 1087 | .dependencies = featureSet(&[_]Feature{}), | |
| 1088 | 1088 | }; |
| 1089 | 1089 | break :blk result; |
| 1090 | 1090 | }; |
| ... | ... | @@ -2365,7 +2365,7 @@ pub const cpu = struct { |
| 2365 | 2365 | pub const lakemont = Cpu{ |
| 2366 | 2366 | .name = "lakemont", |
| 2367 | 2367 | .llvm_name = "lakemont", |
| 2368 | .features = 0, | |
| 2368 | .features = featureSet(&[_]Feature{}), | |
| 2369 | 2369 | }; |
| 2370 | 2370 | pub const nehalem = Cpu{ |
| 2371 | 2371 | .name = "nehalem", |
src-self-hosted/stage1.zig+58-19| ... | ... | @@ -64,6 +64,7 @@ const Error = extern enum { |
| 64 | 64 | CacheUnavailable, |
| 65 | 65 | PathTooLong, |
| 66 | 66 | CCompilerCannotFindFile, |
| 67 | NoCCompilerInstalled, | |
| 67 | 68 | ReadingDepFile, |
| 68 | 69 | InvalidDepFile, |
| 69 | 70 | MissingArchitecture, |
| ... | ... | @@ -89,6 +90,7 @@ const Error = extern enum { |
| 89 | 90 | UnknownCpuFeature, |
| 90 | 91 | InvalidCpuFeatures, |
| 91 | 92 | InvalidLlvmCpuFeaturesFormat, |
| 93 | UnknownApplicationBinaryInterface, | |
| 92 | 94 | }; |
| 93 | 95 | |
| 94 | 96 | const FILE = std.c.FILE; |
| ... | ... | @@ -585,11 +587,12 @@ const Stage2CpuFeatures = struct { |
| 585 | 587 | |
| 586 | 588 | fn createFromLLVM( |
| 587 | 589 | allocator: *mem.Allocator, |
| 588 | arch_name: [*:0]const u8, | |
| 590 | zig_triple: [*:0]const u8, | |
| 589 | 591 | llvm_cpu_name_z: [*:0]const u8, |
| 590 | 592 | llvm_cpu_features: [*:0]const u8, |
| 591 | 593 | ) !*Self { |
| 592 | const arch = try Target.parseArchSub(mem.toSliceConst(u8, arch_name)); | |
| 594 | const target = try Target.parse(mem.toSliceConst(u8, zig_triple)); | |
| 595 | const arch = target.Cross.arch; | |
| 593 | 596 | const llvm_cpu_name = mem.toSliceConst(u8, llvm_cpu_name_z); |
| 594 | 597 | |
| 595 | 598 | for (arch.allCpus()) |cpu| { |
| ... | ... | @@ -620,8 +623,8 @@ const Stage2CpuFeatures = struct { |
| 620 | 623 | const this_llvm_name = feature.llvm_name orelse continue; |
| 621 | 624 | if (mem.eql(u8, llvm_feat, this_llvm_name)) { |
| 622 | 625 | switch (op) { |
| 623 | .add => set |= @as(Target.Cpu.Feature.Set, 1) << @intCast(u7, index), | |
| 624 | .sub => set &= ~(@as(Target.Cpu.Feature.Set, 1) << @intCast(u7, index)), | |
| 626 | .add => set.addFeature(@intCast(u8, index)), | |
| 627 | .sub => set.removeFeature(@intCast(u8, index)), | |
| 625 | 628 | } |
| 626 | 629 | break; |
| 627 | 630 | } |
| ... | ... | @@ -691,7 +694,7 @@ const Stage2CpuFeatures = struct { |
| 691 | 694 | } |
| 692 | 695 | |
| 693 | 696 | for (all_features) |feature, index| { |
| 694 | if (!Target.Cpu.Feature.isEnabled(feature_set, @intCast(u7, index))) continue; | |
| 697 | if (!feature_set.isEnabled(@intCast(u8, index))) continue; | |
| 695 | 698 | |
| 696 | 699 | if (feature.llvm_name) |llvm_name| { |
| 697 | 700 | try llvm_features_buffer.append("+"); |
| ... | ... | @@ -736,43 +739,75 @@ const Stage2CpuFeatures = struct { |
| 736 | 739 | // ABI warning |
| 737 | 740 | export fn stage2_cpu_features_parse_cpu( |
| 738 | 741 | result: **Stage2CpuFeatures, |
| 739 | arch_name: [*:0]const u8, | |
| 742 | zig_triple: [*:0]const u8, | |
| 740 | 743 | cpu_name: [*:0]const u8, |
| 741 | 744 | ) Error { |
| 742 | result.* = parseCpu(arch_name, cpu_name) catch |err| switch (err) { | |
| 745 | result.* = parseCpu(zig_triple, cpu_name) catch |err| switch (err) { | |
| 743 | 746 | error.OutOfMemory => return .OutOfMemory, |
| 744 | error.UnknownCpu => return .UnknownCpu, | |
| 745 | 747 | error.UnknownArchitecture => return .UnknownArchitecture, |
| 746 | 748 | error.UnknownSubArchitecture => return .UnknownSubArchitecture, |
| 749 | error.UnknownOperatingSystem => return .UnknownOperatingSystem, | |
| 750 | error.UnknownApplicationBinaryInterface => return .UnknownApplicationBinaryInterface, | |
| 751 | error.MissingOperatingSystem => return .MissingOperatingSystem, | |
| 752 | error.MissingArchitecture => return .MissingArchitecture, | |
| 747 | 753 | }; |
| 748 | 754 | return .None; |
| 749 | 755 | } |
| 750 | 756 | |
| 751 | fn parseCpu(arch_name: [*:0]const u8, cpu_name: [*:0]const u8) !*Stage2CpuFeatures { | |
| 752 | const arch = try Target.parseArchSub(mem.toSliceConst(u8, arch_name)); | |
| 753 | const cpu = try arch.parseCpu(mem.toSliceConst(u8, cpu_name)); | |
| 757 | fn parseCpu(zig_triple: [*:0]const u8, cpu_name_z: [*:0]const u8) !*Stage2CpuFeatures { | |
| 758 | const cpu_name = mem.toSliceConst(u8, cpu_name_z); | |
| 759 | const target = try Target.parse(mem.toSliceConst(u8, zig_triple)); | |
| 760 | const arch = target.Cross.arch; | |
| 761 | const cpu = arch.parseCpu(cpu_name) catch |err| switch (err) { | |
| 762 | error.UnknownCpu => { | |
| 763 | std.debug.warn("Unknown CPU: '{}'\nAvailable CPUs for architecture '{}':\n", .{ | |
| 764 | cpu_name, | |
| 765 | @tagName(arch), | |
| 766 | }); | |
| 767 | for (arch.allCpus()) |cpu| { | |
| 768 | std.debug.warn(" {}\n", .{cpu.name}); | |
| 769 | } | |
| 770 | process.exit(1); | |
| 771 | }, | |
| 772 | else => |e| return e, | |
| 773 | }; | |
| 754 | 774 | return Stage2CpuFeatures.createFromCpu(std.heap.c_allocator, arch, cpu); |
| 755 | 775 | } |
| 756 | 776 | |
| 757 | 777 | // ABI warning |
| 758 | 778 | export fn stage2_cpu_features_parse_features( |
| 759 | 779 | result: **Stage2CpuFeatures, |
| 760 | arch_name: [*:0]const u8, | |
| 780 | zig_triple: [*:0]const u8, | |
| 761 | 781 | features_text: [*:0]const u8, |
| 762 | 782 | ) Error { |
| 763 | result.* = parseFeatures(arch_name, features_text) catch |err| switch (err) { | |
| 783 | result.* = parseFeatures(zig_triple, features_text) catch |err| switch (err) { | |
| 764 | 784 | error.OutOfMemory => return .OutOfMemory, |
| 765 | error.UnknownCpuFeature => return .UnknownCpuFeature, | |
| 766 | 785 | error.InvalidCpuFeatures => return .InvalidCpuFeatures, |
| 767 | 786 | error.UnknownArchitecture => return .UnknownArchitecture, |
| 768 | 787 | error.UnknownSubArchitecture => return .UnknownSubArchitecture, |
| 788 | error.UnknownOperatingSystem => return .UnknownOperatingSystem, | |
| 789 | error.UnknownApplicationBinaryInterface => return .UnknownApplicationBinaryInterface, | |
| 790 | error.MissingOperatingSystem => return .MissingOperatingSystem, | |
| 791 | error.MissingArchitecture => return .MissingArchitecture, | |
| 769 | 792 | }; |
| 770 | 793 | return .None; |
| 771 | 794 | } |
| 772 | 795 | |
| 773 | fn parseFeatures(arch_name: [*:0]const u8, features_text: [*:0]const u8) !*Stage2CpuFeatures { | |
| 774 | const arch = try Target.parseArchSub(mem.toSliceConst(u8, arch_name)); | |
| 775 | const set = try arch.parseCpuFeatureSet(mem.toSliceConst(u8, features_text)); | |
| 796 | fn parseFeatures(zig_triple: [*:0]const u8, features_text: [*:0]const u8) !*Stage2CpuFeatures { | |
| 797 | const target = try Target.parse(mem.toSliceConst(u8, zig_triple)); | |
| 798 | const arch = target.Cross.arch; | |
| 799 | const set = arch.parseCpuFeatureSet(mem.toSliceConst(u8, features_text)) catch |err| switch (err) { | |
| 800 | error.UnknownCpuFeature => { | |
| 801 | std.debug.warn("Unknown CPU features specified.\nAvailable CPU features for architecture '{}':\n", .{ | |
| 802 | @tagName(arch), | |
| 803 | }); | |
| 804 | for (arch.allFeaturesList()) |feature| { | |
| 805 | std.debug.warn(" {}\n", .{feature.name}); | |
| 806 | } | |
| 807 | process.exit(1); | |
| 808 | }, | |
| 809 | else => |e| return e, | |
| 810 | }; | |
| 776 | 811 | return Stage2CpuFeatures.createFromCpuFeatures(std.heap.c_allocator, arch, set); |
| 777 | 812 | } |
| 778 | 813 | |
| ... | ... | @@ -787,13 +822,13 @@ export fn stage2_cpu_features_baseline(result: **Stage2CpuFeatures) Error { |
| 787 | 822 | // ABI warning |
| 788 | 823 | export fn stage2_cpu_features_llvm( |
| 789 | 824 | result: **Stage2CpuFeatures, |
| 790 | arch_name: [*:0]const u8, | |
| 825 | zig_triple: [*:0]const u8, | |
| 791 | 826 | llvm_cpu_name: [*:0]const u8, |
| 792 | 827 | llvm_cpu_features: [*:0]const u8, |
| 793 | 828 | ) Error { |
| 794 | 829 | result.* = Stage2CpuFeatures.createFromLLVM( |
| 795 | 830 | std.heap.c_allocator, |
| 796 | arch_name, | |
| 831 | zig_triple, | |
| 797 | 832 | llvm_cpu_name, |
| 798 | 833 | llvm_cpu_features, |
| 799 | 834 | ) catch |err| switch (err) { |
| ... | ... | @@ -801,6 +836,10 @@ export fn stage2_cpu_features_llvm( |
| 801 | 836 | error.UnknownArchitecture => return .UnknownArchitecture, |
| 802 | 837 | error.UnknownSubArchitecture => return .UnknownSubArchitecture, |
| 803 | 838 | error.InvalidLlvmCpuFeaturesFormat => return .InvalidLlvmCpuFeaturesFormat, |
| 839 | error.UnknownOperatingSystem => return .UnknownOperatingSystem, | |
| 840 | error.UnknownApplicationBinaryInterface => return .UnknownApplicationBinaryInterface, | |
| 841 | error.MissingOperatingSystem => return .MissingOperatingSystem, | |
| 842 | error.MissingArchitecture => return .MissingArchitecture, | |
| 804 | 843 | }; |
| 805 | 844 | return .None; |
| 806 | 845 | } |
src/error.cpp+1| ... | ... | @@ -63,6 +63,7 @@ const char *err_str(Error err) { |
| 63 | 63 | case ErrorUnknownCpuFeature: return "unknown CPU feature"; |
| 64 | 64 | case ErrorInvalidCpuFeatures: return "invalid CPU features"; |
| 65 | 65 | case ErrorInvalidLlvmCpuFeaturesFormat: return "invalid LLVM CPU features format"; |
| 66 | case ErrorUnknownApplicationBinaryInterface: return "unknown application binary interface"; | |
| 66 | 67 | } |
| 67 | 68 | return "(invalid error)"; |
| 68 | 69 | } |
src/main.cpp+7-6| ... | ... | @@ -977,16 +977,19 @@ int main(int argc, char **argv) { |
| 977 | 977 | } |
| 978 | 978 | } |
| 979 | 979 | |
| 980 | Buf zig_triple_buf = BUF_INIT; | |
| 981 | target_triple_zig(&zig_triple_buf, &target); | |
| 982 | ||
| 980 | 983 | if (cpu && features) { |
| 981 | 984 | fprintf(stderr, "-target-cpu and -target-feature options not allowed together\n"); |
| 982 | 985 | return main_exit(root_progress_node, EXIT_FAILURE); |
| 983 | 986 | } else if (cpu) { |
| 984 | if ((err = stage2_cpu_features_parse_cpu(&target.cpu_features, target_arch_name(target.arch), cpu))) { | |
| 987 | if ((err = stage2_cpu_features_parse_cpu(&target.cpu_features, buf_ptr(&zig_triple_buf), cpu))) { | |
| 985 | 988 | fprintf(stderr, "-target-cpu error: %s\n", err_str(err)); |
| 986 | 989 | return main_exit(root_progress_node, EXIT_FAILURE); |
| 987 | 990 | } |
| 988 | 991 | } else if (features) { |
| 989 | if ((err = stage2_cpu_features_parse_features(&target.cpu_features, target_arch_name(target.arch), | |
| 992 | if ((err = stage2_cpu_features_parse_features(&target.cpu_features, buf_ptr(&zig_triple_buf), | |
| 990 | 993 | features))) |
| 991 | 994 | { |
| 992 | 995 | fprintf(stderr, "-target-feature error: %s\n", err_str(err)); |
| ... | ... | @@ -995,7 +998,7 @@ int main(int argc, char **argv) { |
| 995 | 998 | } else if (target.is_native) { |
| 996 | 999 | const char *cpu_name = ZigLLVMGetHostCPUName(); |
| 997 | 1000 | const char *cpu_features = ZigLLVMGetNativeFeatures(); |
| 998 | if ((err = stage2_cpu_features_llvm(&target.cpu_features, target_arch_name(target.arch), | |
| 1001 | if ((err = stage2_cpu_features_llvm(&target.cpu_features, buf_ptr(&zig_triple_buf), | |
| 999 | 1002 | cpu_name, cpu_features))) |
| 1000 | 1003 | { |
| 1001 | 1004 | fprintf(stderr, "unable to determine native CPU features: %s\n", err_str(err)); |
| ... | ... | @@ -1014,9 +1017,7 @@ int main(int argc, char **argv) { |
| 1014 | 1017 | } |
| 1015 | 1018 | |
| 1016 | 1019 | if (target_requires_pic(&target, have_libc) && want_pic == WantPICDisabled) { |
| 1017 | Buf triple_buf = BUF_INIT; | |
| 1018 | target_triple_zig(&triple_buf, &target); | |
| 1019 | fprintf(stderr, "`--disable-pic` is incompatible with target '%s'\n", buf_ptr(&triple_buf)); | |
| 1020 | fprintf(stderr, "`--disable-pic` is incompatible with target '%s'\n", buf_ptr(&zig_triple_buf)); | |
| 1020 | 1021 | return print_error_usage(arg0); |
| 1021 | 1022 | } |
| 1022 | 1023 |
src/userland.cpp+3-3| ... | ... | @@ -96,11 +96,11 @@ struct Stage2CpuFeatures { |
| 96 | 96 | const char *cache_hash; |
| 97 | 97 | }; |
| 98 | 98 | |
| 99 | Error stage2_cpu_features_parse_cpu(Stage2CpuFeatures **out, const char *arch, const char *str) { | |
| 99 | Error stage2_cpu_features_parse_cpu(Stage2CpuFeatures **out, const char *zig_triple, const char *str) { | |
| 100 | 100 | const char *msg = "stage0 called stage2_cpu_features_parse_cpu"; |
| 101 | 101 | stage2_panic(msg, strlen(msg)); |
| 102 | 102 | } |
| 103 | Error stage2_cpu_features_parse_features(Stage2CpuFeatures **out, const char *arch, const char *str) { | |
| 103 | Error stage2_cpu_features_parse_features(Stage2CpuFeatures **out, const char *zig_triple, const char *str) { | |
| 104 | 104 | const char *msg = "stage0 called stage2_cpu_features_parse_features"; |
| 105 | 105 | stage2_panic(msg, strlen(msg)); |
| 106 | 106 | } |
| ... | ... | @@ -111,7 +111,7 @@ Error stage2_cpu_features_baseline(Stage2CpuFeatures **out) { |
| 111 | 111 | *out = result; |
| 112 | 112 | return ErrorNone; |
| 113 | 113 | } |
| 114 | Error stage2_cpu_features_llvm(Stage2CpuFeatures **out, const char *arch, | |
| 114 | Error stage2_cpu_features_llvm(Stage2CpuFeatures **out, const char *zig_triple, | |
| 115 | 115 | const char *llvm_cpu_name, const char *llvm_features) |
| 116 | 116 | { |
| 117 | 117 | Stage2CpuFeatures *result = allocate<Stage2CpuFeatures>(1, "Stage2CpuFeatures"); |
src/userland.h+4-3| ... | ... | @@ -83,6 +83,7 @@ enum Error { |
| 83 | 83 | ErrorUnknownCpuFeature, |
| 84 | 84 | ErrorInvalidCpuFeatures, |
| 85 | 85 | ErrorInvalidLlvmCpuFeaturesFormat, |
| 86 | ErrorUnknownApplicationBinaryInterface, | |
| 86 | 87 | }; |
| 87 | 88 | |
| 88 | 89 | // ABI warning |
| ... | ... | @@ -184,18 +185,18 @@ struct Stage2CpuFeatures; |
| 184 | 185 | |
| 185 | 186 | // ABI warning |
| 186 | 187 | ZIG_EXTERN_C Error stage2_cpu_features_parse_cpu(struct Stage2CpuFeatures **result, |
| 187 | const char *arch, const char *cpu_name); | |
| 188 | const char *zig_triple, const char *cpu_name); | |
| 188 | 189 | |
| 189 | 190 | // ABI warning |
| 190 | 191 | ZIG_EXTERN_C Error stage2_cpu_features_parse_features(struct Stage2CpuFeatures **result, |
| 191 | const char *arch, const char *features); | |
| 192 | const char *zig_triple, const char *features); | |
| 192 | 193 | |
| 193 | 194 | // ABI warning |
| 194 | 195 | ZIG_EXTERN_C Error stage2_cpu_features_baseline(struct Stage2CpuFeatures **result); |
| 195 | 196 | |
| 196 | 197 | // ABI warning |
| 197 | 198 | ZIG_EXTERN_C Error stage2_cpu_features_llvm(struct Stage2CpuFeatures **result, |
| 198 | const char *arch, const char *llvm_cpu_name, const char *llvm_features); | |
| 199 | const char *zig_triple, const char *llvm_cpu_name, const char *llvm_features); | |
| 199 | 200 | |
| 200 | 201 | // ABI warning |
| 201 | 202 | ZIG_EXTERN_C const char *stage2_cpu_features_get_llvm_cpu(const struct Stage2CpuFeatures *cpu_features); |