| author | |
| committer | |
| log | 145ddb81043dac46c204877a0260f1c06a7f35f9 |
| tree | 9e12618e060a2947d195213eaa4498f0d1f81bff |
| parent | c327489d21a438344453e8c9e64091b9c8b540e4 |
ref: 0c8c251e336148413ceca7b345c0b6f7255b009b100 files changed, 54763 insertions(+), 65190 deletions(-)
deps/aro/Attribute.zig deleted-1065| ... | @@ -1,1065 +0,0 @@ | ||
| 1 | const std = @import("std"); | ||
| 2 | const mem = std.mem; | ||
| 3 | const ZigType = std.builtin.Type; | ||
| 4 | const CallingConvention = @import("lib.zig").CallingConvention; | ||
| 5 | const Compilation = @import("Compilation.zig"); | ||
| 6 | const Diagnostics = @import("Diagnostics.zig"); | ||
| 7 | const Parser = @import("Parser.zig"); | ||
| 8 | const Tree = @import("Tree.zig"); | ||
| 9 | const NodeIndex = Tree.NodeIndex; | ||
| 10 | const TokenIndex = Tree.TokenIndex; | ||
| 11 | const Type = @import("Type.zig"); | ||
| 12 | const Value = @import("Value.zig"); | ||
| 13 | |||
| 14 | const Attribute = @This(); | ||
| 15 | |||
| 16 | tag: Tag, | ||
| 17 | syntax: Syntax, | ||
| 18 | args: Arguments, | ||
| 19 | |||
| 20 | pub const Syntax = enum { | ||
| 21 | c2x, | ||
| 22 | declspec, | ||
| 23 | gnu, | ||
| 24 | keyword, | ||
| 25 | }; | ||
| 26 | |||
| 27 | pub const Kind = enum { | ||
| 28 | c2x, | ||
| 29 | declspec, | ||
| 30 | gnu, | ||
| 31 | |||
| 32 | pub fn toSyntax(kind: Kind) Syntax { | ||
| 33 | return switch (kind) { | ||
| 34 | .c2x => .c2x, | ||
| 35 | .declspec => .declspec, | ||
| 36 | .gnu => .gnu, | ||
| 37 | }; | ||
| 38 | } | ||
| 39 | }; | ||
| 40 | |||
| 41 | pub const ArgumentType = enum { | ||
| 42 | string, | ||
| 43 | identifier, | ||
| 44 | int, | ||
| 45 | alignment, | ||
| 46 | float, | ||
| 47 | expression, | ||
| 48 | nullptr_t, | ||
| 49 | |||
| 50 | pub fn toString(self: ArgumentType) []const u8 { | ||
| 51 | return switch (self) { | ||
| 52 | .string => "a string", | ||
| 53 | .identifier => "an identifier", | ||
| 54 | .int, .alignment => "an integer constant", | ||
| 55 | .nullptr_t => "nullptr", | ||
| 56 | .float => "a floating point number", | ||
| 57 | .expression => "an expression", | ||
| 58 | }; | ||
| 59 | } | ||
| 60 | |||
| 61 | fn fromType(comptime T: type) ArgumentType { | ||
| 62 | return switch (T) { | ||
| 63 | Value.ByteRange => .string, | ||
| 64 | Identifier => .identifier, | ||
| 65 | u32 => .int, | ||
| 66 | Alignment => .alignment, | ||
| 67 | CallingConvention => .identifier, | ||
| 68 | else => switch (@typeInfo(T)) { | ||
| 69 | .Enum => if (T.opts.enum_kind == .string) .string else .identifier, | ||
| 70 | else => unreachable, | ||
| 71 | }, | ||
| 72 | }; | ||
| 73 | } | ||
| 74 | |||
| 75 | fn fromVal(value: Value) ArgumentType { | ||
| 76 | return switch (value.tag) { | ||
| 77 | .int => .int, | ||
| 78 | .bytes => .string, | ||
| 79 | .unavailable => .expression, | ||
| 80 | .float => .float, | ||
| 81 | .nullptr_t => .nullptr_t, | ||
| 82 | }; | ||
| 83 | } | ||
| 84 | }; | ||
| 85 | |||
| 86 | /// number of required arguments | ||
| 87 | pub fn requiredArgCount(attr: Tag) u32 { | ||
| 88 | switch (attr) { | ||
| 89 | inline else => |tag| { | ||
| 90 | comptime var needed = 0; | ||
| 91 | comptime { | ||
| 92 | const fields = std.meta.fields(@field(attributes, @tagName(tag))); | ||
| 93 | for (fields) |arg_field| { | ||
| 94 | if (!mem.eql(u8, arg_field.name, "__name_tok") and @typeInfo(arg_field.type) != .Optional) needed += 1; | ||
| 95 | } | ||
| 96 | } | ||
| 97 | return needed; | ||
| 98 | }, | ||
| 99 | } | ||
| 100 | } | ||
| 101 | |||
| 102 | /// maximum number of args that can be passed | ||
| 103 | pub fn maxArgCount(attr: Tag) u32 { | ||
| 104 | switch (attr) { | ||
| 105 | inline else => |tag| { | ||
| 106 | comptime var max = 0; | ||
| 107 | comptime { | ||
| 108 | const fields = std.meta.fields(@field(attributes, @tagName(tag))); | ||
| 109 | for (fields) |arg_field| { | ||
| 110 | if (!mem.eql(u8, arg_field.name, "__name_tok")) max += 1; | ||
| 111 | } | ||
| 112 | } | ||
| 113 | return max; | ||
| 114 | }, | ||
| 115 | } | ||
| 116 | } | ||
| 117 | |||
| 118 | fn UnwrapOptional(comptime T: type) type { | ||
| 119 | return switch (@typeInfo(T)) { | ||
| 120 | .Optional => |optional| optional.child, | ||
| 121 | else => T, | ||
| 122 | }; | ||
| 123 | } | ||
| 124 | |||
| 125 | pub const Formatting = struct { | ||
| 126 | /// The quote char (single or double) to use when printing identifiers/strings corresponding | ||
| 127 | /// to the enum in the first field of the `attr`. Identifier enums use single quotes, string enums | ||
| 128 | /// use double quotes | ||
| 129 | fn quoteChar(attr: Tag) []const u8 { | ||
| 130 | switch (attr) { | ||
| 131 | .calling_convention => unreachable, | ||
| 132 | inline else => |tag| { | ||
| 133 | const fields = std.meta.fields(@field(attributes, @tagName(tag))); | ||
| 134 | |||
| 135 | if (fields.len == 0) unreachable; | ||
| 136 | const Unwrapped = UnwrapOptional(fields[0].type); | ||
| 137 | if (@typeInfo(Unwrapped) != .Enum) unreachable; | ||
| 138 | |||
| 139 | return if (Unwrapped.opts.enum_kind == .identifier) "'" else "\""; | ||
| 140 | }, | ||
| 141 | } | ||
| 142 | } | ||
| 143 | |||
| 144 | /// returns a comma-separated string of quoted enum values, representing the valid | ||
| 145 | /// choices for the string or identifier enum of the first field of the `attr`. | ||
| 146 | pub fn choices(attr: Tag) []const u8 { | ||
| 147 | switch (attr) { | ||
| 148 | .calling_convention => unreachable, | ||
| 149 | inline else => |tag| { | ||
| 150 | const fields = std.meta.fields(@field(attributes, @tagName(tag))); | ||
| 151 | |||
| 152 | if (fields.len == 0) unreachable; | ||
| 153 | const Unwrapped = UnwrapOptional(fields[0].type); | ||
| 154 | if (@typeInfo(Unwrapped) != .Enum) unreachable; | ||
| 155 | |||
| 156 | const enum_fields = @typeInfo(Unwrapped).Enum.fields; | ||
| 157 | @setEvalBranchQuota(3000); | ||
| 158 | const quote = comptime quoteChar(@enumFromInt(@intFromEnum(tag))); | ||
| 159 | comptime var values: []const u8 = quote ++ enum_fields[0].name ++ quote; | ||
| 160 | inline for (enum_fields[1..]) |enum_field| { | ||
| 161 | values = values ++ ", "; | ||
| 162 | values = values ++ quote ++ enum_field.name ++ quote; | ||
| 163 | } | ||
| 164 | return values; | ||
| 165 | }, | ||
| 166 | } | ||
| 167 | } | ||
| 168 | }; | ||
| 169 | |||
| 170 | /// Checks if the first argument (if it exists) is an identifier enum | ||
| 171 | pub fn wantsIdentEnum(attr: Tag) bool { | ||
| 172 | switch (attr) { | ||
| 173 | .calling_convention => return false, | ||
| 174 | inline else => |tag| { | ||
| 175 | const fields = std.meta.fields(@field(attributes, @tagName(tag))); | ||
| 176 | |||
| 177 | if (fields.len == 0) return false; | ||
| 178 | const Unwrapped = UnwrapOptional(fields[0].type); | ||
| 179 | if (@typeInfo(Unwrapped) != .Enum) return false; | ||
| 180 | |||
| 181 | return Unwrapped.opts.enum_kind == .identifier; | ||
| 182 | }, | ||
| 183 | } | ||
| 184 | } | ||
| 185 | |||
| 186 | pub fn diagnoseIdent(attr: Tag, arguments: *Arguments, ident: []const u8) ?Diagnostics.Message { | ||
| 187 | switch (attr) { | ||
| 188 | inline else => |tag| { | ||
| 189 | const fields = std.meta.fields(@field(attributes, @tagName(tag))); | ||
| 190 | if (fields.len == 0) unreachable; | ||
| 191 | const Unwrapped = UnwrapOptional(fields[0].type); | ||
| 192 | if (@typeInfo(Unwrapped) != .Enum) unreachable; | ||
| 193 | if (std.meta.stringToEnum(Unwrapped, normalize(ident))) |enum_val| { | ||
| 194 | @field(@field(arguments, @tagName(tag)), fields[0].name) = enum_val; | ||
| 195 | return null; | ||
| 196 | } | ||
| 197 | return Diagnostics.Message{ | ||
| 198 | .tag = .unknown_attr_enum, | ||
| 199 | .extra = .{ .attr_enum = .{ .tag = attr } }, | ||
| 200 | }; | ||
| 201 | }, | ||
| 202 | } | ||
| 203 | } | ||
| 204 | |||
| 205 | pub fn wantsAlignment(attr: Tag, idx: usize) bool { | ||
| 206 | switch (attr) { | ||
| 207 | inline else => |tag| { | ||
| 208 | const fields = std.meta.fields(@field(attributes, @tagName(tag))); | ||
| 209 | if (fields.len == 0) return false; | ||
| 210 | |||
| 211 | return switch (idx) { | ||
| 212 | inline 0...fields.len - 1 => |i| UnwrapOptional(fields[i].type) == Alignment, | ||
| 213 | else => false, | ||
| 214 | }; | ||
| 215 | }, | ||
| 216 | } | ||
| 217 | } | ||
| 218 | |||
| 219 | pub fn diagnoseAlignment(attr: Tag, arguments: *Arguments, arg_idx: u32, val: Value, ty: Type, comp: *Compilation) ?Diagnostics.Message { | ||
| 220 | switch (attr) { | ||
| 221 | inline else => |tag| { | ||
| 222 | const arg_fields = std.meta.fields(@field(attributes, @tagName(tag))); | ||
| 223 | if (arg_fields.len == 0) unreachable; | ||
| 224 | |||
| 225 | switch (arg_idx) { | ||
| 226 | inline 0...arg_fields.len - 1 => |arg_i| { | ||
| 227 | if (UnwrapOptional(arg_fields[arg_i].type) != Alignment) unreachable; | ||
| 228 | |||
| 229 | if (val.tag != .int) return Diagnostics.Message{ .tag = .alignas_unavailable }; | ||
| 230 | if (val.compare(.lt, Value.int(0), ty, comp)) { | ||
| 231 | return Diagnostics.Message{ .tag = .negative_alignment, .extra = .{ .signed = val.signExtend(ty, comp) } }; | ||
| 232 | } | ||
| 233 | const requested = std.math.cast(u29, val.data.int) orelse { | ||
| 234 | return Diagnostics.Message{ .tag = .maximum_alignment, .extra = .{ .unsigned = val.data.int } }; | ||
| 235 | }; | ||
| 236 | if (!std.mem.isValidAlign(requested)) return Diagnostics.Message{ .tag = .non_pow2_align }; | ||
| 237 | |||
| 238 | @field(@field(arguments, @tagName(tag)), arg_fields[arg_i].name) = Alignment{ .requested = requested }; | ||
| 239 | return null; | ||
| 240 | }, | ||
| 241 | else => unreachable, | ||
| 242 | } | ||
| 243 | }, | ||
| 244 | } | ||
| 245 | } | ||
| 246 | |||
| 247 | fn diagnoseField( | ||
| 248 | comptime decl: ZigType.Declaration, | ||
| 249 | comptime field: ZigType.StructField, | ||
| 250 | comptime wanted: type, | ||
| 251 | arguments: *Arguments, | ||
| 252 | val: Value, | ||
| 253 | node: Tree.Node, | ||
| 254 | strings: []const u8, | ||
| 255 | ) ?Diagnostics.Message { | ||
| 256 | switch (val.tag) { | ||
| 257 | .int => { | ||
| 258 | if (@typeInfo(wanted) == .Int) { | ||
| 259 | @field(@field(arguments, decl.name), field.name) = val.getInt(wanted); | ||
| 260 | return null; | ||
| 261 | } | ||
| 262 | }, | ||
| 263 | .bytes => { | ||
| 264 | const bytes = val.data.bytes.trim(1); // remove null terminator | ||
| 265 | if (wanted == Value.ByteRange) { | ||
| 266 | std.debug.assert(node.tag == .string_literal_expr); | ||
| 267 | if (!node.ty.elemType().is(.char) and !node.ty.elemType().is(.uchar)) { | ||
| 268 | return Diagnostics.Message{ | ||
| 269 | .tag = .attribute_requires_string, | ||
| 270 | .extra = .{ .str = decl.name }, | ||
| 271 | }; | ||
| 272 | } | ||
| 273 | @field(@field(arguments, decl.name), field.name) = bytes; | ||
| 274 | return null; | ||
| 275 | } else if (@typeInfo(wanted) == .Enum and @hasDecl(wanted, "opts") and wanted.opts.enum_kind == .string) { | ||
| 276 | const str = bytes.slice(strings, .@"1"); | ||
| 277 | if (std.meta.stringToEnum(wanted, str)) |enum_val| { | ||
| 278 | @field(@field(arguments, decl.name), field.name) = enum_val; | ||
| 279 | return null; | ||
| 280 | } else { | ||
| 281 | @setEvalBranchQuota(3000); | ||
| 282 | return Diagnostics.Message{ | ||
| 283 | .tag = .unknown_attr_enum, | ||
| 284 | .extra = .{ .attr_enum = .{ .tag = std.meta.stringToEnum(Tag, decl.name).? } }, | ||
| 285 | }; | ||
| 286 | } | ||
| 287 | } | ||
| 288 | }, | ||
| 289 | else => { | ||
| 290 | if (wanted == Identifier and node.tag == .decl_ref_expr) { | ||
| 291 | @field(@field(arguments, decl.name), field.name) = Identifier{ .tok = node.data.decl_ref }; | ||
| 292 | return null; | ||
| 293 | } | ||
| 294 | }, | ||
| 295 | } | ||
| 296 | return Diagnostics.Message{ | ||
| 297 | .tag = .attribute_arg_invalid, | ||
| 298 | .extra = .{ .attr_arg_type = .{ .expected = ArgumentType.fromType(wanted), .actual = ArgumentType.fromVal(val) } }, | ||
| 299 | }; | ||
| 300 | } | ||
| 301 | |||
| 302 | pub fn diagnose(attr: Tag, arguments: *Arguments, arg_idx: u32, val: Value, node: Tree.Node, strings: []const u8) ?Diagnostics.Message { | ||
| 303 | switch (attr) { | ||
| 304 | inline else => |tag| { | ||
| 305 | const decl = @typeInfo(attributes).Struct.decls[@intFromEnum(tag)]; | ||
| 306 | const max_arg_count = comptime maxArgCount(tag); | ||
| 307 | if (arg_idx >= max_arg_count) return Diagnostics.Message{ | ||
| 308 | .tag = .attribute_too_many_args, | ||
| 309 | .extra = .{ .attr_arg_count = .{ .attribute = attr, .expected = max_arg_count } }, | ||
| 310 | }; | ||
| 311 | const arg_fields = std.meta.fields(@field(attributes, decl.name)); | ||
| 312 | switch (arg_idx) { | ||
| 313 | inline 0...arg_fields.len - 1 => |arg_i| { | ||
| 314 | return diagnoseField(decl, arg_fields[arg_i], UnwrapOptional(arg_fields[arg_i].type), arguments, val, node, strings); | ||
| 315 | }, | ||
| 316 | else => unreachable, | ||
| 317 | } | ||
| 318 | }, | ||
| 319 | } | ||
| 320 | } | ||
| 321 | |||
| 322 | const EnumTypes = enum { | ||
| 323 | string, | ||
| 324 | identifier, | ||
| 325 | }; | ||
| 326 | pub const Alignment = struct { | ||
| 327 | node: NodeIndex = .none, | ||
| 328 | requested: u29, | ||
| 329 | }; | ||
| 330 | pub const Identifier = struct { | ||
| 331 | tok: TokenIndex = 0, | ||
| 332 | }; | ||
| 333 | |||
| 334 | const attributes = struct { | ||
| 335 | pub const access = struct { | ||
| 336 | access_mode: enum { | ||
| 337 | read_only, | ||
| 338 | read_write, | ||
| 339 | write_only, | ||
| 340 | none, | ||
| 341 | |||
| 342 | const opts = struct { | ||
| 343 | const enum_kind = .identifier; | ||
| 344 | }; | ||
| 345 | }, | ||
| 346 | ref_index: u32, | ||
| 347 | size_index: ?u32 = null, | ||
| 348 | }; | ||
| 349 | pub const alias = struct { | ||
| 350 | alias: Value.ByteRange, | ||
| 351 | }; | ||
| 352 | pub const aligned = struct { | ||
| 353 | alignment: ?Alignment = null, | ||
| 354 | __name_tok: TokenIndex, | ||
| 355 | }; | ||
| 356 | pub const alloc_align = struct { | ||
| 357 | position: u32, | ||
| 358 | }; | ||
| 359 | pub const alloc_size = struct { | ||
| 360 | position_1: u32, | ||
| 361 | position_2: ?u32 = null, | ||
| 362 | }; | ||
| 363 | pub const allocate = struct { | ||
| 364 | segname: Value.ByteRange, | ||
| 365 | }; | ||
| 366 | pub const allocator = struct {}; | ||
| 367 | pub const always_inline = struct {}; | ||
| 368 | pub const appdomain = struct {}; | ||
| 369 | pub const artificial = struct {}; | ||
| 370 | pub const assume_aligned = struct { | ||
| 371 | alignment: Alignment, | ||
| 372 | offset: ?u32 = null, | ||
| 373 | }; | ||
| 374 | pub const cleanup = struct { | ||
| 375 | function: Identifier, | ||
| 376 | }; | ||
| 377 | pub const code_seg = struct { | ||
| 378 | segname: Value.ByteRange, | ||
| 379 | }; | ||
| 380 | pub const cold = struct {}; | ||
| 381 | pub const common = struct {}; | ||
| 382 | pub const @"const" = struct {}; | ||
| 383 | pub const constructor = struct { | ||
| 384 | priority: ?u32 = null, | ||
| 385 | }; | ||
| 386 | pub const copy = struct { | ||
| 387 | function: Identifier, | ||
| 388 | }; | ||
| 389 | pub const deprecated = struct { | ||
| 390 | msg: ?Value.ByteRange = null, | ||
| 391 | __name_tok: TokenIndex, | ||
| 392 | }; | ||
| 393 | pub const designated_init = struct {}; | ||
| 394 | pub const destructor = struct { | ||
| 395 | priority: ?u32 = null, | ||
| 396 | }; | ||
| 397 | pub const dllexport = struct {}; | ||
| 398 | pub const dllimport = struct {}; | ||
| 399 | pub const @"error" = struct { | ||
| 400 | msg: Value.ByteRange, | ||
| 401 | __name_tok: TokenIndex, | ||
| 402 | }; | ||
| 403 | pub const externally_visible = struct {}; | ||
| 404 | pub const fallthrough = struct {}; | ||
| 405 | pub const flatten = struct {}; | ||
| 406 | pub const format = struct { | ||
| 407 | archetype: enum { | ||
| 408 | printf, | ||
| 409 | scanf, | ||
| 410 | strftime, | ||
| 411 | strfmon, | ||
| 412 | |||
| 413 | const opts = struct { | ||
| 414 | const enum_kind = .identifier; | ||
| 415 | }; | ||
| 416 | }, | ||
| 417 | string_index: u32, | ||
| 418 | first_to_check: u32, | ||
| 419 | }; | ||
| 420 | pub const format_arg = struct { | ||
| 421 | string_index: u32, | ||
| 422 | }; | ||
| 423 | pub const gnu_inline = struct {}; | ||
| 424 | pub const hot = struct {}; | ||
| 425 | pub const ifunc = struct { | ||
| 426 | resolver: Value.ByteRange, | ||
| 427 | }; | ||
| 428 | pub const interrupt = struct {}; | ||
| 429 | pub const interrupt_handler = struct {}; | ||
| 430 | pub const jitintrinsic = struct {}; | ||
| 431 | pub const leaf = struct {}; | ||
| 432 | pub const malloc = struct {}; | ||
| 433 | pub const may_alias = struct {}; | ||
| 434 | pub const mode = struct { | ||
| 435 | mode: enum { | ||
| 436 | // zig fmt: off | ||
| 437 | byte, word, pointer, | ||
| 438 | BI, QI, HI, | ||
| 439 | PSI, SI, PDI, | ||
| 440 | DI, TI, OI, | ||
| 441 | XI, QF, HF, | ||
| 442 | TQF, SF, DF, | ||
| 443 | XF, SD, DD, | ||
| 444 | TD, TF, QQ, | ||
| 445 | HQ, SQ, DQ, | ||
| 446 | TQ, UQQ, UHQ, | ||
| 447 | USQ, UDQ, UTQ, | ||
| 448 | HA, SA, DA, | ||
| 449 | TA, UHA, USA, | ||
| 450 | UDA, UTA, CC, | ||
| 451 | BLK, VOID, QC, | ||
| 452 | HC, SC, DC, | ||
| 453 | XC, TC, CQI, | ||
| 454 | CHI, CSI, CDI, | ||
| 455 | CTI, COI, CPSI, | ||
| 456 | BND32, BND64, | ||
| 457 | // zig fmt: on | ||
| 458 | |||
| 459 | const opts = struct { | ||
| 460 | const enum_kind = .identifier; | ||
| 461 | }; | ||
| 462 | }, | ||
| 463 | }; | ||
| 464 | pub const naked = struct {}; | ||
| 465 | pub const no_address_safety_analysis = struct {}; | ||
| 466 | pub const no_icf = struct {}; | ||
| 467 | pub const no_instrument_function = struct {}; | ||
| 468 | pub const no_profile_instrument_function = struct {}; | ||
| 469 | pub const no_reorder = struct {}; | ||
| 470 | pub const no_sanitize = struct { | ||
| 471 | /// Todo: represent args as union? | ||
| 472 | alignment: Value.ByteRange, | ||
| 473 | object_size: ?Value.ByteRange = null, | ||
| 474 | }; | ||
| 475 | pub const no_sanitize_address = struct {}; | ||
| 476 | pub const no_sanitize_coverage = struct {}; | ||
| 477 | pub const no_sanitize_thread = struct {}; | ||
| 478 | pub const no_sanitize_undefined = struct {}; | ||
| 479 | pub const no_split_stack = struct {}; | ||
| 480 | pub const no_stack_limit = struct {}; | ||
| 481 | pub const no_stack_protector = struct {}; | ||
| 482 | pub const @"noalias" = struct {}; | ||
| 483 | pub const noclone = struct {}; | ||
| 484 | pub const nocommon = struct {}; | ||
| 485 | pub const nodiscard = struct {}; | ||
| 486 | pub const noinit = struct {}; | ||
| 487 | pub const @"noinline" = struct {}; | ||
| 488 | pub const noipa = struct {}; | ||
| 489 | // TODO: arbitrary number of arguments | ||
| 490 | // const nonnull = struct { | ||
| 491 | // // arg_index: []const u32, | ||
| 492 | // }; | ||
| 493 | // }; | ||
| 494 | pub const nonstring = struct {}; | ||
| 495 | pub const noplt = struct {}; | ||
| 496 | pub const @"noreturn" = struct {}; | ||
| 497 | // TODO: union args ? | ||
| 498 | // const optimize = struct { | ||
| 499 | // // optimize, // u32 | []const u8 -- optimize? | ||
| 500 | // }; | ||
| 501 | // }; | ||
| 502 | pub const @"packed" = struct {}; | ||
| 503 | pub const patchable_function_entry = struct {}; | ||
| 504 | pub const persistent = struct {}; | ||
| 505 | pub const process = struct {}; | ||
| 506 | pub const pure = struct {}; | ||
| 507 | pub const reproducible = struct {}; | ||
| 508 | pub const restrict = struct {}; | ||
| 509 | pub const retain = struct {}; | ||
| 510 | pub const returns_nonnull = struct {}; | ||
| 511 | pub const returns_twice = struct {}; | ||
| 512 | pub const safebuffers = struct {}; | ||
| 513 | pub const scalar_storage_order = struct { | ||
| 514 | order: enum { | ||
| 515 | @"little-endian", | ||
| 516 | @"big-endian", | ||
| 517 | |||
| 518 | const opts = struct { | ||
| 519 | const enum_kind = .string; | ||
| 520 | }; | ||
| 521 | }, | ||
| 522 | }; | ||
| 523 | pub const section = struct { | ||
| 524 | name: Value.ByteRange, | ||
| 525 | }; | ||
| 526 | pub const selectany = struct {}; | ||
| 527 | pub const sentinel = struct { | ||
| 528 | position: ?u32 = null, | ||
| 529 | }; | ||
| 530 | pub const simd = struct { | ||
| 531 | mask: ?enum { | ||
| 532 | notinbranch, | ||
| 533 | inbranch, | ||
| 534 | |||
| 535 | const opts = struct { | ||
| 536 | const enum_kind = .string; | ||
| 537 | }; | ||
| 538 | } = null, | ||
| 539 | }; | ||
| 540 | pub const spectre = struct { | ||
| 541 | arg: enum { | ||
| 542 | nomitigation, | ||
| 543 | |||
| 544 | const opts = struct { | ||
| 545 | const enum_kind = .identifier; | ||
| 546 | }; | ||
| 547 | }, | ||
| 548 | }; | ||
| 549 | pub const stack_protect = struct {}; | ||
| 550 | pub const symver = struct { | ||
| 551 | version: Value.ByteRange, // TODO: validate format "name2@nodename" | ||
| 552 | |||
| 553 | }; | ||
| 554 | pub const target = struct { | ||
| 555 | options: Value.ByteRange, // TODO: multiple arguments | ||
| 556 | |||
| 557 | }; | ||
| 558 | pub const target_clones = struct { | ||
| 559 | options: Value.ByteRange, // TODO: multiple arguments | ||
| 560 | |||
| 561 | }; | ||
| 562 | pub const thread = struct {}; | ||
| 563 | pub const tls_model = struct { | ||
| 564 | model: enum { | ||
| 565 | @"global-dynamic", | ||
| 566 | @"local-dynamic", | ||
| 567 | @"initial-exec", | ||
| 568 | @"local-exec", | ||
| 569 | |||
| 570 | const opts = struct { | ||
| 571 | const enum_kind = .string; | ||
| 572 | }; | ||
| 573 | }, | ||
| 574 | }; | ||
| 575 | pub const transparent_union = struct {}; | ||
| 576 | pub const unavailable = struct { | ||
| 577 | msg: ?Value.ByteRange = null, | ||
| 578 | __name_tok: TokenIndex, | ||
| 579 | }; | ||
| 580 | pub const uninitialized = struct {}; | ||
| 581 | pub const unsequenced = struct {}; | ||
| 582 | pub const unused = struct {}; | ||
| 583 | pub const used = struct {}; | ||
| 584 | pub const uuid = struct { | ||
| 585 | uuid: Value.ByteRange, | ||
| 586 | }; | ||
| 587 | pub const vector_size = struct { | ||
| 588 | bytes: u32, // TODO: validate "The bytes argument must be a positive power-of-two multiple of the base type size" | ||
| 589 | |||
| 590 | }; | ||
| 591 | pub const visibility = struct { | ||
| 592 | visibility_type: enum { | ||
| 593 | default, | ||
| 594 | hidden, | ||
| 595 | internal, | ||
| 596 | protected, | ||
| 597 | |||
| 598 | const opts = struct { | ||
| 599 | const enum_kind = .string; | ||
| 600 | }; | ||
| 601 | }, | ||
| 602 | }; | ||
| 603 | pub const warn_if_not_aligned = struct { | ||
| 604 | alignment: Alignment, | ||
| 605 | }; | ||
| 606 | pub const warn_unused_result = struct {}; | ||
| 607 | pub const warning = struct { | ||
| 608 | msg: Value.ByteRange, | ||
| 609 | __name_tok: TokenIndex, | ||
| 610 | }; | ||
| 611 | pub const weak = struct {}; | ||
| 612 | pub const weakref = struct { | ||
| 613 | target: ?Value.ByteRange = null, | ||
| 614 | }; | ||
| 615 | pub const zero_call_used_regs = struct { | ||
| 616 | choice: enum { | ||
| 617 | skip, | ||
| 618 | used, | ||
| 619 | @"used-gpr", | ||
| 620 | @"used-arg", | ||
| 621 | @"used-gpr-arg", | ||
| 622 | all, | ||
| 623 | @"all-gpr", | ||
| 624 | @"all-arg", | ||
| 625 | @"all-gpr-arg", | ||
| 626 | |||
| 627 | const opts = struct { | ||
| 628 | const enum_kind = .string; | ||
| 629 | }; | ||
| 630 | }, | ||
| 631 | }; | ||
| 632 | pub const asm_label = struct { | ||
| 633 | name: Value.ByteRange, | ||
| 634 | }; | ||
| 635 | pub const calling_convention = struct { | ||
| 636 | cc: CallingConvention, | ||
| 637 | }; | ||
| 638 | }; | ||
| 639 | |||
| 640 | pub const Tag = std.meta.DeclEnum(attributes); | ||
| 641 | |||
| 642 | pub const Arguments = blk: { | ||
| 643 | const decls = @typeInfo(attributes).Struct.decls; | ||
| 644 | var union_fields: [decls.len]ZigType.UnionField = undefined; | ||
| 645 | inline for (decls, &union_fields) |decl, *field| { | ||
| 646 | field.* = .{ | ||
| 647 | .name = decl.name, | ||
| 648 | .type = @field(attributes, decl.name), | ||
| 649 | .alignment = 0, | ||
| 650 | }; | ||
| 651 | } | ||
| 652 | |||
| 653 | break :blk @Type(.{ | ||
| 654 | .Union = .{ | ||
| 655 | .layout = .Auto, | ||
| 656 | .tag_type = null, | ||
| 657 | .fields = &union_fields, | ||
| 658 | .decls = &.{}, | ||
| 659 | }, | ||
| 660 | }); | ||
| 661 | }; | ||
| 662 | |||
| 663 | pub fn ArgumentsForTag(comptime tag: Tag) type { | ||
| 664 | const decl = @typeInfo(attributes).Struct.decls[@intFromEnum(tag)]; | ||
| 665 | return @field(attributes, decl.name); | ||
| 666 | } | ||
| 667 | |||
| 668 | pub fn initArguments(tag: Tag, name_tok: TokenIndex) Arguments { | ||
| 669 | switch (tag) { | ||
| 670 | inline else => |arg_tag| { | ||
| 671 | const union_element = @field(attributes, @tagName(arg_tag)); | ||
| 672 | const init = std.mem.zeroInit(union_element, .{}); | ||
| 673 | var args = @unionInit(Arguments, @tagName(arg_tag), init); | ||
| 674 | if (@hasField(@field(attributes, @tagName(arg_tag)), "__name_tok")) { | ||
| 675 | @field(args, @tagName(arg_tag)).__name_tok = name_tok; | ||
| 676 | } | ||
| 677 | return args; | ||
| 678 | }, | ||
| 679 | } | ||
| 680 | } | ||
| 681 | |||
| 682 | pub fn fromString(kind: Kind, namespace: ?[]const u8, name: []const u8) ?Tag { | ||
| 683 | const Properties = struct { | ||
| 684 | tag: Tag, | ||
| 685 | gnu: bool = false, | ||
| 686 | declspec: bool = false, | ||
| 687 | c2x: bool = false, | ||
| 688 | }; | ||
| 689 | const attribute_names = @import("Attribute/names.def").with(Properties); | ||
| 690 | |||
| 691 | const normalized = normalize(name); | ||
| 692 | const actual_kind: Kind = if (namespace) |ns| blk: { | ||
| 693 | const normalized_ns = normalize(ns); | ||
| 694 | if (mem.eql(u8, normalized_ns, "gnu")) { | ||
| 695 | break :blk .gnu; | ||
| 696 | } | ||
| 697 | return null; | ||
| 698 | } else kind; | ||
| 699 | |||
| 700 | const tag_and_opts = attribute_names.fromName(normalized) orelse return null; | ||
| 701 | switch (actual_kind) { | ||
| 702 | inline else => |tag| { | ||
| 703 | if (@field(tag_and_opts.properties, @tagName(tag))) | ||
| 704 | return tag_and_opts.properties.tag; | ||
| 705 | }, | ||
| 706 | } | ||
| 707 | return null; | ||
| 708 | } | ||
| 709 | |||
| 710 | fn normalize(name: []const u8) []const u8 { | ||
| 711 | if (name.len >= 4 and mem.startsWith(u8, name, "__") and mem.endsWith(u8, name, "__")) { | ||
| 712 | return name[2 .. name.len - 2]; | ||
| 713 | } | ||
| 714 | return name; | ||
| 715 | } | ||
| 716 | |||
| 717 | fn ignoredAttrErr(p: *Parser, tok: TokenIndex, attr: Attribute.Tag, context: []const u8) !void { | ||
| 718 | const strings_top = p.strings.items.len; | ||
| 719 | defer p.strings.items.len = strings_top; | ||
| 720 | |||
| 721 | try p.strings.writer().print("attribute '{s}' ignored on {s}", .{ @tagName(attr), context }); | ||
| 722 | const str = try p.comp.diag.arena.allocator().dupe(u8, p.strings.items[strings_top..]); | ||
| 723 | try p.errStr(.ignored_attribute, tok, str); | ||
| 724 | } | ||
| 725 | |||
| 726 | pub const applyParameterAttributes = applyVariableAttributes; | ||
| 727 | pub fn applyVariableAttributes(p: *Parser, ty: Type, attr_buf_start: usize, tag: ?Diagnostics.Tag) !Type { | ||
| 728 | const attrs = p.attr_buf.items(.attr)[attr_buf_start..]; | ||
| 729 | const toks = p.attr_buf.items(.tok)[attr_buf_start..]; | ||
| 730 | p.attr_application_buf.items.len = 0; | ||
| 731 | var base_ty = ty; | ||
| 732 | if (base_ty.specifier == .attributed) base_ty = base_ty.data.attributed.base; | ||
| 733 | var common = false; | ||
| 734 | var nocommon = false; | ||
| 735 | for (attrs, toks) |attr, tok| switch (attr.tag) { | ||
| 736 | // zig fmt: off | ||
| 737 | .alias, .may_alias, .deprecated, .unavailable, .unused, .warn_if_not_aligned, .weak, .used, | ||
| 738 | .noinit, .retain, .persistent, .section, .mode, .asm_label, | ||
| 739 | => try p.attr_application_buf.append(p.gpa, attr), | ||
| 740 | // zig fmt: on | ||
| 741 | .common => if (nocommon) { | ||
| 742 | try p.errTok(.ignore_common, tok); | ||
| 743 | } else { | ||
| 744 | try p.attr_application_buf.append(p.gpa, attr); | ||
| 745 | common = true; | ||
| 746 | }, | ||
| 747 | .nocommon => if (common) { | ||
| 748 | try p.errTok(.ignore_nocommon, tok); | ||
| 749 | } else { | ||
| 750 | try p.attr_application_buf.append(p.gpa, attr); | ||
| 751 | nocommon = true; | ||
| 752 | }, | ||
| 753 | .vector_size => try attr.applyVectorSize(p, tok, &base_ty), | ||
| 754 | .aligned => try attr.applyAligned(p, base_ty, tag), | ||
| 755 | .nonstring => if (!base_ty.isArray() or !(base_ty.is(.char) or base_ty.is(.uchar) or base_ty.is(.schar))) { | ||
| 756 | try p.errStr(.non_string_ignored, tok, try p.typeStr(ty)); | ||
| 757 | } else { | ||
| 758 | try p.attr_application_buf.append(p.gpa, attr); | ||
| 759 | }, | ||
| 760 | .uninitialized => if (p.func.ty == null) { | ||
| 761 | try p.errStr(.local_variable_attribute, tok, "uninitialized"); | ||
| 762 | } else { | ||
| 763 | try p.attr_application_buf.append(p.gpa, attr); | ||
| 764 | }, | ||
| 765 | .cleanup => if (p.func.ty == null) { | ||
| 766 | try p.errStr(.local_variable_attribute, tok, "cleanup"); | ||
| 767 | } else { | ||
| 768 | try p.attr_application_buf.append(p.gpa, attr); | ||
| 769 | }, | ||
| 770 | .alloc_size, | ||
| 771 | .copy, | ||
| 772 | .tls_model, | ||
| 773 | .visibility, | ||
| 774 | => std.debug.panic("apply variable attribute {s}", .{@tagName(attr.tag)}), | ||
| 775 | else => try ignoredAttrErr(p, tok, attr.tag, "variables"), | ||
| 776 | }; | ||
| 777 | const existing = ty.getAttributes(); | ||
| 778 | if (existing.len == 0 and p.attr_application_buf.items.len == 0) return base_ty; | ||
| 779 | if (existing.len == 0) return base_ty.withAttributes(p.arena, p.attr_application_buf.items); | ||
| 780 | |||
| 781 | const attributed_type = try Type.Attributed.create(p.arena, base_ty, existing, p.attr_application_buf.items); | ||
| 782 | return Type{ .specifier = .attributed, .data = .{ .attributed = attributed_type } }; | ||
| 783 | } | ||
| 784 | |||
| 785 | pub fn applyFieldAttributes(p: *Parser, field_ty: *Type, attr_buf_start: usize) ![]const Attribute { | ||
| 786 | const attrs = p.attr_buf.items(.attr)[attr_buf_start..]; | ||
| 787 | const toks = p.attr_buf.items(.tok)[attr_buf_start..]; | ||
| 788 | p.attr_application_buf.items.len = 0; | ||
| 789 | for (attrs, toks) |attr, tok| switch (attr.tag) { | ||
| 790 | // zig fmt: off | ||
| 791 | .@"packed", .may_alias, .deprecated, .unavailable, .unused, .warn_if_not_aligned, .mode, | ||
| 792 | => try p.attr_application_buf.append(p.gpa, attr), | ||
| 793 | // zig fmt: on | ||
| 794 | .vector_size => try attr.applyVectorSize(p, tok, field_ty), | ||
| 795 | .aligned => try attr.applyAligned(p, field_ty.*, null), | ||
| 796 | else => try ignoredAttrErr(p, tok, attr.tag, "fields"), | ||
| 797 | }; | ||
| 798 | if (p.attr_application_buf.items.len == 0) return &[0]Attribute{}; | ||
| 799 | return p.arena.dupe(Attribute, p.attr_application_buf.items); | ||
| 800 | } | ||
| 801 | |||
| 802 | pub fn applyTypeAttributes(p: *Parser, ty: Type, attr_buf_start: usize, tag: ?Diagnostics.Tag) !Type { | ||
| 803 | const attrs = p.attr_buf.items(.attr)[attr_buf_start..]; | ||
| 804 | const toks = p.attr_buf.items(.tok)[attr_buf_start..]; | ||
| 805 | p.attr_application_buf.items.len = 0; | ||
| 806 | var base_ty = ty; | ||
| 807 | if (base_ty.specifier == .attributed) base_ty = base_ty.data.attributed.base; | ||
| 808 | for (attrs, toks) |attr, tok| switch (attr.tag) { | ||
| 809 | // zig fmt: off | ||
| 810 | .@"packed", .may_alias, .deprecated, .unavailable, .unused, .warn_if_not_aligned, .mode, | ||
| 811 | => try p.attr_application_buf.append(p.gpa, attr), | ||
| 812 | // zig fmt: on | ||
| 813 | .transparent_union => try attr.applyTransparentUnion(p, tok, base_ty), | ||
| 814 | .vector_size => try attr.applyVectorSize(p, tok, &base_ty), | ||
| 815 | .aligned => try attr.applyAligned(p, base_ty, tag), | ||
| 816 | .designated_init => if (base_ty.is(.@"struct")) { | ||
| 817 | try p.attr_application_buf.append(p.gpa, attr); | ||
| 818 | } else { | ||
| 819 | try p.errTok(.designated_init_invalid, tok); | ||
| 820 | }, | ||
| 821 | .alloc_size, | ||
| 822 | .copy, | ||
| 823 | .scalar_storage_order, | ||
| 824 | .nonstring, | ||
| 825 | => std.debug.panic("apply type attribute {s}", .{@tagName(attr.tag)}), | ||
| 826 | else => try ignoredAttrErr(p, tok, attr.tag, "types"), | ||
| 827 | }; | ||
| 828 | |||
| 829 | const existing = ty.getAttributes(); | ||
| 830 | // TODO: the alignment annotation on a type should override | ||
| 831 | // the decl it refers to. This might not be true for others. Maybe bug. | ||
| 832 | |||
| 833 | // if there are annotations on this type def use those. | ||
| 834 | if (p.attr_application_buf.items.len > 0) { | ||
| 835 | return try base_ty.withAttributes(p.arena, p.attr_application_buf.items); | ||
| 836 | } else if (existing.len > 0) { | ||
| 837 | // else use the ones on the typedef decl we were refering to. | ||
| 838 | return try base_ty.withAttributes(p.arena, existing); | ||
| 839 | } | ||
| 840 | return base_ty; | ||
| 841 | } | ||
| 842 | |||
| 843 | pub fn applyFunctionAttributes(p: *Parser, ty: Type, attr_buf_start: usize) !Type { | ||
| 844 | const attrs = p.attr_buf.items(.attr)[attr_buf_start..]; | ||
| 845 | const toks = p.attr_buf.items(.tok)[attr_buf_start..]; | ||
| 846 | p.attr_application_buf.items.len = 0; | ||
| 847 | var base_ty = ty; | ||
| 848 | if (base_ty.specifier == .attributed) base_ty = base_ty.data.attributed.base; | ||
| 849 | var hot = false; | ||
| 850 | var cold = false; | ||
| 851 | var @"noinline" = false; | ||
| 852 | var always_inline = false; | ||
| 853 | for (attrs, toks) |attr, tok| switch (attr.tag) { | ||
| 854 | // zig fmt: off | ||
| 855 | .noreturn, .unused, .used, .warning, .deprecated, .unavailable, .weak, .pure, .leaf, | ||
| 856 | .@"const", .warn_unused_result, .section, .returns_nonnull, .returns_twice, .@"error", | ||
| 857 | .externally_visible, .retain, .flatten, .gnu_inline, .alias, .asm_label, .nodiscard, | ||
| 858 | .reproducible, .unsequenced, | ||
| 859 | => try p.attr_application_buf.append(p.gpa, attr), | ||
| 860 | // zig fmt: on | ||
| 861 | .hot => if (cold) { | ||
| 862 | try p.errTok(.ignore_hot, tok); | ||
| 863 | } else { | ||
| 864 | try p.attr_application_buf.append(p.gpa, attr); | ||
| 865 | hot = true; | ||
| 866 | }, | ||
| 867 | .cold => if (hot) { | ||
| 868 | try p.errTok(.ignore_cold, tok); | ||
| 869 | } else { | ||
| 870 | try p.attr_application_buf.append(p.gpa, attr); | ||
| 871 | cold = true; | ||
| 872 | }, | ||
| 873 | .always_inline => if (@"noinline") { | ||
| 874 | try p.errTok(.ignore_always_inline, tok); | ||
| 875 | } else { | ||
| 876 | try p.attr_application_buf.append(p.gpa, attr); | ||
| 877 | always_inline = true; | ||
| 878 | }, | ||
| 879 | .@"noinline" => if (always_inline) { | ||
| 880 | try p.errTok(.ignore_noinline, tok); | ||
| 881 | } else { | ||
| 882 | try p.attr_application_buf.append(p.gpa, attr); | ||
| 883 | @"noinline" = true; | ||
| 884 | }, | ||
| 885 | .aligned => try attr.applyAligned(p, base_ty, null), | ||
| 886 | .format => try attr.applyFormat(p, base_ty), | ||
| 887 | .calling_convention => switch (attr.args.calling_convention.cc) { | ||
| 888 | .C => continue, | ||
| 889 | .stdcall, .thiscall => switch (p.comp.target.cpu.arch) { | ||
| 890 | .x86 => try p.attr_application_buf.append(p.gpa, attr), | ||
| 891 | else => try p.errStr(.callconv_not_supported, tok, p.tok_ids[tok].lexeme().?), | ||
| 892 | }, | ||
| 893 | .vectorcall => switch (p.comp.target.cpu.arch) { | ||
| 894 | .x86, .aarch64, .aarch64_be, .aarch64_32 => try p.attr_application_buf.append(p.gpa, attr), | ||
| 895 | else => try p.errStr(.callconv_not_supported, tok, p.tok_ids[tok].lexeme().?), | ||
| 896 | }, | ||
| 897 | }, | ||
| 898 | .access, | ||
| 899 | .alloc_align, | ||
| 900 | .alloc_size, | ||
| 901 | .artificial, | ||
| 902 | .assume_aligned, | ||
| 903 | .constructor, | ||
| 904 | .copy, | ||
| 905 | .destructor, | ||
| 906 | .format_arg, | ||
| 907 | .ifunc, | ||
| 908 | .interrupt, | ||
| 909 | .interrupt_handler, | ||
| 910 | .malloc, | ||
| 911 | .no_address_safety_analysis, | ||
| 912 | .no_icf, | ||
| 913 | .no_instrument_function, | ||
| 914 | .no_profile_instrument_function, | ||
| 915 | .no_reorder, | ||
| 916 | .no_sanitize, | ||
| 917 | .no_sanitize_address, | ||
| 918 | .no_sanitize_coverage, | ||
| 919 | .no_sanitize_thread, | ||
| 920 | .no_sanitize_undefined, | ||
| 921 | .no_split_stack, | ||
| 922 | .no_stack_limit, | ||
| 923 | .no_stack_protector, | ||
| 924 | .noclone, | ||
| 925 | .noipa, | ||
| 926 | // .nonnull, | ||
| 927 | .noplt, | ||
| 928 | // .optimize, | ||
| 929 | .patchable_function_entry, | ||
| 930 | .sentinel, | ||
| 931 | .simd, | ||
| 932 | .stack_protect, | ||
| 933 | .symver, | ||
| 934 | .target, | ||
| 935 | .target_clones, | ||
| 936 | .visibility, | ||
| 937 | .weakref, | ||
| 938 | .zero_call_used_regs, | ||
| 939 | => std.debug.panic("apply type attribute {s}", .{@tagName(attr.tag)}), | ||
| 940 | else => try ignoredAttrErr(p, tok, attr.tag, "functions"), | ||
| 941 | }; | ||
| 942 | return ty.withAttributes(p.arena, p.attr_application_buf.items); | ||
| 943 | } | ||
| 944 | |||
| 945 | pub fn applyLabelAttributes(p: *Parser, ty: Type, attr_buf_start: usize) !Type { | ||
| 946 | const attrs = p.attr_buf.items(.attr)[attr_buf_start..]; | ||
| 947 | const toks = p.attr_buf.items(.tok)[attr_buf_start..]; | ||
| 948 | p.attr_application_buf.items.len = 0; | ||
| 949 | var hot = false; | ||
| 950 | var cold = false; | ||
| 951 | for (attrs, toks) |attr, tok| switch (attr.tag) { | ||
| 952 | .unused => try p.attr_application_buf.append(p.gpa, attr), | ||
| 953 | .hot => if (cold) { | ||
| 954 | try p.errTok(.ignore_hot, tok); | ||
| 955 | } else { | ||
| 956 | try p.attr_application_buf.append(p.gpa, attr); | ||
| 957 | hot = true; | ||
| 958 | }, | ||
| 959 | .cold => if (hot) { | ||
| 960 | try p.errTok(.ignore_cold, tok); | ||
| 961 | } else { | ||
| 962 | try p.attr_application_buf.append(p.gpa, attr); | ||
| 963 | cold = true; | ||
| 964 | }, | ||
| 965 | else => try ignoredAttrErr(p, tok, attr.tag, "labels"), | ||
| 966 | }; | ||
| 967 | return ty.withAttributes(p.arena, p.attr_application_buf.items); | ||
| 968 | } | ||
| 969 | |||
| 970 | pub fn applyStatementAttributes(p: *Parser, ty: Type, expr_start: TokenIndex, attr_buf_start: usize) !Type { | ||
| 971 | const attrs = p.attr_buf.items(.attr)[attr_buf_start..]; | ||
| 972 | const toks = p.attr_buf.items(.tok)[attr_buf_start..]; | ||
| 973 | p.attr_application_buf.items.len = 0; | ||
| 974 | for (attrs, toks) |attr, tok| switch (attr.tag) { | ||
| 975 | .fallthrough => if (p.tok_ids[p.tok_i] != .keyword_case and p.tok_ids[p.tok_i] != .keyword_default) { | ||
| 976 | // TODO: this condition is not completely correct; the last statement of a compound | ||
| 977 | // statement is also valid if it precedes a switch label (so intervening '}' are ok, | ||
| 978 | // but only if they close a compound statement) | ||
| 979 | try p.errTok(.invalid_fallthrough, expr_start); | ||
| 980 | } else { | ||
| 981 | try p.attr_application_buf.append(p.gpa, attr); | ||
| 982 | }, | ||
| 983 | else => try p.errStr(.cannot_apply_attribute_to_statement, tok, @tagName(attr.tag)), | ||
| 984 | }; | ||
| 985 | return ty.withAttributes(p.arena, p.attr_application_buf.items); | ||
| 986 | } | ||
| 987 | |||
| 988 | pub fn applyEnumeratorAttributes(p: *Parser, ty: Type, attr_buf_start: usize) !Type { | ||
| 989 | const attrs = p.attr_buf.items(.attr)[attr_buf_start..]; | ||
| 990 | const toks = p.attr_buf.items(.tok)[attr_buf_start..]; | ||
| 991 | p.attr_application_buf.items.len = 0; | ||
| 992 | for (attrs, toks) |attr, tok| switch (attr.tag) { | ||
| 993 | .deprecated, .unavailable => try p.attr_application_buf.append(p.gpa, attr), | ||
| 994 | else => try ignoredAttrErr(p, tok, attr.tag, "enums"), | ||
| 995 | }; | ||
| 996 | return ty.withAttributes(p.arena, p.attr_application_buf.items); | ||
| 997 | } | ||
| 998 | |||
| 999 | fn applyAligned(attr: Attribute, p: *Parser, ty: Type, tag: ?Diagnostics.Tag) !void { | ||
| 1000 | const base = ty.canonicalize(.standard); | ||
| 1001 | if (attr.args.aligned.alignment) |alignment| alignas: { | ||
| 1002 | if (attr.syntax != .keyword) break :alignas; | ||
| 1003 | |||
| 1004 | const align_tok = attr.args.aligned.__name_tok; | ||
| 1005 | if (tag) |t| try p.errTok(t, align_tok); | ||
| 1006 | |||
| 1007 | const default_align = base.alignof(p.comp); | ||
| 1008 | if (ty.isFunc()) { | ||
| 1009 | try p.errTok(.alignas_on_func, align_tok); | ||
| 1010 | } else if (alignment.requested < default_align) { | ||
| 1011 | try p.errExtra(.minimum_alignment, align_tok, .{ .unsigned = default_align }); | ||
| 1012 | } | ||
| 1013 | } | ||
| 1014 | try p.attr_application_buf.append(p.gpa, attr); | ||
| 1015 | } | ||
| 1016 | |||
| 1017 | fn applyTransparentUnion(attr: Attribute, p: *Parser, tok: TokenIndex, ty: Type) !void { | ||
| 1018 | const union_ty = ty.get(.@"union") orelse { | ||
| 1019 | return p.errTok(.transparent_union_wrong_type, tok); | ||
| 1020 | }; | ||
| 1021 | // TODO validate union defined at end | ||
| 1022 | if (union_ty.data.record.isIncomplete()) return; | ||
| 1023 | const fields = union_ty.data.record.fields; | ||
| 1024 | if (fields.len == 0) { | ||
| 1025 | return p.errTok(.transparent_union_one_field, tok); | ||
| 1026 | } | ||
| 1027 | const first_field_size = fields[0].ty.bitSizeof(p.comp).?; | ||
| 1028 | for (fields[1..]) |field| { | ||
| 1029 | const field_size = field.ty.bitSizeof(p.comp).?; | ||
| 1030 | if (field_size == first_field_size) continue; | ||
| 1031 | const mapper = p.comp.string_interner.getSlowTypeMapper(); | ||
| 1032 | const str = try std.fmt.allocPrint(p.comp.diag.arena.allocator(), "'{s}' ({d}", .{ mapper.lookup(field.name), field_size }); | ||
| 1033 | try p.errStr(.transparent_union_size, field.name_tok, str); | ||
| 1034 | return p.errExtra(.transparent_union_size_note, fields[0].name_tok, .{ .unsigned = first_field_size }); | ||
| 1035 | } | ||
| 1036 | |||
| 1037 | try p.attr_application_buf.append(p.gpa, attr); | ||
| 1038 | } | ||
| 1039 | |||
| 1040 | fn applyVectorSize(attr: Attribute, p: *Parser, tok: TokenIndex, ty: *Type) !void { | ||
| 1041 | if (!(ty.isInt() or ty.isFloat()) or !ty.isReal()) { | ||
| 1042 | const orig_ty = try p.typeStr(ty.*); | ||
| 1043 | ty.* = Type.invalid; | ||
| 1044 | return p.errStr(.invalid_vec_elem_ty, tok, orig_ty); | ||
| 1045 | } | ||
| 1046 | const vec_bytes = attr.args.vector_size.bytes; | ||
| 1047 | const ty_size = ty.sizeof(p.comp).?; | ||
| 1048 | if (vec_bytes % ty_size != 0) { | ||
| 1049 | return p.errTok(.vec_size_not_multiple, tok); | ||
| 1050 | } | ||
| 1051 | const vec_size = vec_bytes / ty_size; | ||
| 1052 | |||
| 1053 | const arr_ty = try p.arena.create(Type.Array); | ||
| 1054 | arr_ty.* = .{ .elem = ty.*, .len = vec_size }; | ||
| 1055 | ty.* = Type{ | ||
| 1056 | .specifier = .vector, | ||
| 1057 | .data = .{ .array = arr_ty }, | ||
| 1058 | }; | ||
| 1059 | } | ||
| 1060 | |||
| 1061 | fn applyFormat(attr: Attribute, p: *Parser, ty: Type) !void { | ||
| 1062 | // TODO validate | ||
| 1063 | _ = ty; | ||
| 1064 | try p.attr_application_buf.append(p.gpa, attr); | ||
| 1065 | } | ||
deps/aro/Attribute/names.def deleted-431| ... | @@ -1,431 +0,0 @@ | ||
| 1 | # multiple | ||
| 2 | deprecated | ||
| 3 | .tag = .deprecated | ||
| 4 | .c2x = true | ||
| 5 | .gnu = true | ||
| 6 | .declspec = true | ||
| 7 | |||
| 8 | fallthrough | ||
| 9 | .tag = .fallthrough | ||
| 10 | .c2x = true | ||
| 11 | .gnu = true | ||
| 12 | |||
| 13 | noreturn | ||
| 14 | .tag = .@"noreturn" | ||
| 15 | .c2x = true | ||
| 16 | .gnu = true | ||
| 17 | .declspec = true | ||
| 18 | |||
| 19 | no_sanitize_address | ||
| 20 | .tag = .no_sanitize_address | ||
| 21 | .gnu = true | ||
| 22 | .declspec = true | ||
| 23 | |||
| 24 | noinline | ||
| 25 | .tag = .@"noinline" | ||
| 26 | .gnu = true | ||
| 27 | .declspec = true | ||
| 28 | |||
| 29 | # c2x only | ||
| 30 | nodiscard | ||
| 31 | .tag = .nodiscard | ||
| 32 | .c2x = true | ||
| 33 | |||
| 34 | reproducible | ||
| 35 | .tag = .reproducible | ||
| 36 | .c2x = true | ||
| 37 | |||
| 38 | unsequenced | ||
| 39 | .tag = .unsequenced | ||
| 40 | .c2x = true | ||
| 41 | |||
| 42 | maybe_unused | ||
| 43 | .tag = .unused | ||
| 44 | .c2x = true | ||
| 45 | |||
| 46 | # gnu only | ||
| 47 | access | ||
| 48 | .tag = .access | ||
| 49 | .gnu = true | ||
| 50 | |||
| 51 | alias | ||
| 52 | .tag = .alias | ||
| 53 | .gnu = true | ||
| 54 | |||
| 55 | aligned | ||
| 56 | .tag = .aligned | ||
| 57 | .gnu = true | ||
| 58 | |||
| 59 | alloc_align | ||
| 60 | .tag = .alloc_align | ||
| 61 | .gnu = true | ||
| 62 | |||
| 63 | alloc_size | ||
| 64 | .tag = .alloc_size | ||
| 65 | .gnu = true | ||
| 66 | |||
| 67 | always_inline | ||
| 68 | .tag = .always_inline | ||
| 69 | .gnu = true | ||
| 70 | |||
| 71 | artificial | ||
| 72 | .tag = .artificial | ||
| 73 | .gnu = true | ||
| 74 | |||
| 75 | assume_aligned | ||
| 76 | .tag = .assume_aligned | ||
| 77 | .gnu = true | ||
| 78 | |||
| 79 | cleanup | ||
| 80 | .tag = .cleanup | ||
| 81 | .gnu = true | ||
| 82 | |||
| 83 | cold | ||
| 84 | .tag = .cold | ||
| 85 | .gnu = true | ||
| 86 | |||
| 87 | common | ||
| 88 | .tag = .common | ||
| 89 | .gnu = true | ||
| 90 | |||
| 91 | const | ||
| 92 | .tag = .@"const" | ||
| 93 | .gnu = true | ||
| 94 | |||
| 95 | constructor | ||
| 96 | .tag = .constructor | ||
| 97 | .gnu = true | ||
| 98 | |||
| 99 | copy | ||
| 100 | .tag = .copy | ||
| 101 | .gnu = true | ||
| 102 | |||
| 103 | designated_init | ||
| 104 | .tag = .designated_init | ||
| 105 | .gnu = true | ||
| 106 | |||
| 107 | destructor | ||
| 108 | .tag = .destructor | ||
| 109 | .gnu = true | ||
| 110 | |||
| 111 | error | ||
| 112 | .tag = .@"error" | ||
| 113 | .gnu = true | ||
| 114 | |||
| 115 | externally_visible | ||
| 116 | .tag = .externally_visible | ||
| 117 | .gnu = true | ||
| 118 | |||
| 119 | flatten | ||
| 120 | .tag = .flatten | ||
| 121 | .gnu = true | ||
| 122 | |||
| 123 | format | ||
| 124 | .tag = .format | ||
| 125 | .gnu = true | ||
| 126 | |||
| 127 | format_arg | ||
| 128 | .tag = .format_arg | ||
| 129 | .gnu = true | ||
| 130 | |||
| 131 | gnu_inline | ||
| 132 | .tag = .gnu_inline | ||
| 133 | .gnu = true | ||
| 134 | |||
| 135 | hot | ||
| 136 | .tag = .hot | ||
| 137 | .gnu = true | ||
| 138 | |||
| 139 | ifunc | ||
| 140 | .tag = .ifunc | ||
| 141 | .gnu = true | ||
| 142 | |||
| 143 | interrupt | ||
| 144 | .tag = .interrupt | ||
| 145 | .gnu = true | ||
| 146 | |||
| 147 | interrupt_handler | ||
| 148 | .tag = .interrupt_handler | ||
| 149 | .gnu = true | ||
| 150 | |||
| 151 | leaf | ||
| 152 | .tag = .leaf | ||
| 153 | .gnu = true | ||
| 154 | |||
| 155 | malloc | ||
| 156 | .tag = .malloc | ||
| 157 | .gnu = true | ||
| 158 | |||
| 159 | may_alias | ||
| 160 | .tag = .may_alias | ||
| 161 | .gnu = true | ||
| 162 | |||
| 163 | mode | ||
| 164 | .tag = .mode | ||
| 165 | .gnu = true | ||
| 166 | |||
| 167 | no_address_safety_analysis | ||
| 168 | .tag = .no_address_safety_analysis | ||
| 169 | .gnu = true | ||
| 170 | |||
| 171 | no_icf | ||
| 172 | .tag = .no_icf | ||
| 173 | .gnu = true | ||
| 174 | |||
| 175 | no_instrument_function | ||
| 176 | .tag = .no_instrument_function | ||
| 177 | .gnu = true | ||
| 178 | |||
| 179 | no_profile_instrument_function | ||
| 180 | .tag = .no_profile_instrument_function | ||
| 181 | .gnu = true | ||
| 182 | |||
| 183 | no_reorder | ||
| 184 | .tag = .no_reorder | ||
| 185 | .gnu = true | ||
| 186 | |||
| 187 | no_sanitize | ||
| 188 | .tag = .no_sanitize | ||
| 189 | .gnu = true | ||
| 190 | |||
| 191 | no_sanitize_coverage | ||
| 192 | .tag = .no_sanitize_coverage | ||
| 193 | .gnu = true | ||
| 194 | |||
| 195 | no_sanitize_thread | ||
| 196 | .tag = .no_sanitize_thread | ||
| 197 | .gnu = true | ||
| 198 | |||
| 199 | no_sanitize_undefined | ||
| 200 | .tag = .no_sanitize_undefined | ||
| 201 | .gnu = true | ||
| 202 | |||
| 203 | no_split_stack | ||
| 204 | .tag = .no_split_stack | ||
| 205 | .gnu = true | ||
| 206 | |||
| 207 | no_stack_limit | ||
| 208 | .tag = .no_stack_limit | ||
| 209 | .gnu = true | ||
| 210 | |||
| 211 | no_stack_protector | ||
| 212 | .tag = .no_stack_protector | ||
| 213 | .gnu = true | ||
| 214 | |||
| 215 | noclone | ||
| 216 | .tag = .noclone | ||
| 217 | .gnu = true | ||
| 218 | |||
| 219 | nocommon | ||
| 220 | .tag = .nocommon | ||
| 221 | .gnu = true | ||
| 222 | |||
| 223 | noinit | ||
| 224 | .tag = .noinit | ||
| 225 | .gnu = true | ||
| 226 | |||
| 227 | noipa | ||
| 228 | .tag = .noipa | ||
| 229 | .gnu = true | ||
| 230 | |||
| 231 | # nonnull | ||
| 232 | # .tag = .nonnull | ||
| 233 | # .gnu = true | ||
| 234 | |||
| 235 | nonstring | ||
| 236 | .tag = .nonstring | ||
| 237 | .gnu = true | ||
| 238 | |||
| 239 | noplt | ||
| 240 | .tag = .noplt | ||
| 241 | .gnu = true | ||
| 242 | |||
| 243 | # optimize | ||
| 244 | # .tag = .optimize | ||
| 245 | # .gnu = true | ||
| 246 | |||
| 247 | packed | ||
| 248 | .tag = .@"packed" | ||
| 249 | .gnu = true | ||
| 250 | |||
| 251 | patchable_function_entry | ||
| 252 | .tag = .patchable_function_entry | ||
| 253 | .gnu = true | ||
| 254 | |||
| 255 | persistent | ||
| 256 | .tag = .persistent | ||
| 257 | .gnu = true | ||
| 258 | |||
| 259 | pure | ||
| 260 | .tag = .pure | ||
| 261 | .gnu = true | ||
| 262 | |||
| 263 | retain | ||
| 264 | .tag = .retain | ||
| 265 | .gnu = true | ||
| 266 | |||
| 267 | returns_nonnull | ||
| 268 | .tag = .returns_nonnull | ||
| 269 | .gnu = true | ||
| 270 | |||
| 271 | returns_twice | ||
| 272 | .tag = .returns_twice | ||
| 273 | .gnu = true | ||
| 274 | |||
| 275 | scalar_storage_order | ||
| 276 | .tag = .scalar_storage_order | ||
| 277 | .gnu = true | ||
| 278 | |||
| 279 | section | ||
| 280 | .tag = .section | ||
| 281 | .gnu = true | ||
| 282 | |||
| 283 | sentinel | ||
| 284 | .tag = .sentinel | ||
| 285 | .gnu = true | ||
| 286 | |||
| 287 | simd | ||
| 288 | .tag = .simd | ||
| 289 | .gnu = true | ||
| 290 | |||
| 291 | stack_protect | ||
| 292 | .tag = .stack_protect | ||
| 293 | .gnu = true | ||
| 294 | |||
| 295 | symver | ||
| 296 | .tag = .symver | ||
| 297 | .gnu = true | ||
| 298 | |||
| 299 | target | ||
| 300 | .tag = .target | ||
| 301 | .gnu = true | ||
| 302 | |||
| 303 | target_clones | ||
| 304 | .tag = .target_clones | ||
| 305 | .gnu = true | ||
| 306 | |||
| 307 | tls_model | ||
| 308 | .tag = .tls_model | ||
| 309 | .gnu = true | ||
| 310 | |||
| 311 | transparent_union | ||
| 312 | .tag = .transparent_union | ||
| 313 | .gnu = true | ||
| 314 | |||
| 315 | unavailable | ||
| 316 | .tag = .unavailable | ||
| 317 | .gnu = true | ||
| 318 | |||
| 319 | uninitialized | ||
| 320 | .tag = .uninitialized | ||
| 321 | .gnu = true | ||
| 322 | |||
| 323 | unused | ||
| 324 | .tag = .unused | ||
| 325 | .gnu = true | ||
| 326 | |||
| 327 | used | ||
| 328 | .tag = .used | ||
| 329 | .gnu = true | ||
| 330 | |||
| 331 | vector_size | ||
| 332 | .tag = .vector_size | ||
| 333 | .gnu = true | ||
| 334 | |||
| 335 | visibility | ||
| 336 | .tag = .visibility | ||
| 337 | .gnu = true | ||
| 338 | |||
| 339 | warn_if_not_aligned | ||
| 340 | .tag = .warn_if_not_aligned | ||
| 341 | .gnu = true | ||
| 342 | |||
| 343 | warn_unused_result | ||
| 344 | .tag = .warn_unused_result | ||
| 345 | .gnu = true | ||
| 346 | |||
| 347 | warning | ||
| 348 | .tag = .warning | ||
| 349 | .gnu = true | ||
| 350 | |||
| 351 | weak | ||
| 352 | .tag = .weak | ||
| 353 | .gnu = true | ||
| 354 | |||
| 355 | weakref | ||
| 356 | .tag = .weakref | ||
| 357 | .gnu = true | ||
| 358 | |||
| 359 | zero_call_used_regs | ||
| 360 | .tag = .zero_call_used_regs | ||
| 361 | .gnu = true | ||
| 362 | |||
| 363 | # declspec only | ||
| 364 | align | ||
| 365 | .tag = .aligned | ||
| 366 | .declspec = true | ||
| 367 | |||
| 368 | allocate | ||
| 369 | .tag = .allocate | ||
| 370 | .declspec = true | ||
| 371 | |||
| 372 | allocator | ||
| 373 | .tag = .allocator | ||
| 374 | .declspec = true | ||
| 375 | |||
| 376 | appdomain | ||
| 377 | .tag = .appdomain | ||
| 378 | .declspec = true | ||
| 379 | |||
| 380 | code_seg | ||
| 381 | .tag = .code_seg | ||
| 382 | .declspec = true | ||
| 383 | |||
| 384 | dllexport | ||
| 385 | .tag = .dllexport | ||
| 386 | .declspec = true | ||
| 387 | |||
| 388 | dllimport | ||
| 389 | .tag = .dllimport | ||
| 390 | .declspec = true | ||
| 391 | |||
| 392 | jitintrinsic | ||
| 393 | .tag = .jitintrinsic | ||
| 394 | .declspec = true | ||
| 395 | |||
| 396 | naked | ||
| 397 | .tag = .naked | ||
| 398 | .declspec = true | ||
| 399 | |||
| 400 | noalias | ||
| 401 | .tag = .@"noalias" | ||
| 402 | .declspec = true | ||
| 403 | |||
| 404 | process | ||
| 405 | .tag = .process | ||
| 406 | .declspec = true | ||
| 407 | |||
| 408 | restrict | ||
| 409 | .tag = .restrict | ||
| 410 | .declspec = true | ||
| 411 | |||
| 412 | safebuffers | ||
| 413 | .tag = .safebuffers | ||
| 414 | .declspec = true | ||
| 415 | |||
| 416 | selectany | ||
| 417 | .tag = .selectany | ||
| 418 | .declspec = true | ||
| 419 | |||
| 420 | spectre | ||
| 421 | .tag = .spectre | ||
| 422 | .declspec = true | ||
| 423 | |||
| 424 | thread | ||
| 425 | .tag = .thread | ||
| 426 | .declspec = true | ||
| 427 | |||
| 428 | uuid | ||
| 429 | .tag = .uuid | ||
| 430 | .declspec = true | ||
| 431 | |||
deps/aro/Builtins.zig deleted-397| ... | @@ -1,397 +0,0 @@ | ||
| 1 | const std = @import("std"); | ||
| 2 | const Compilation = @import("Compilation.zig"); | ||
| 3 | const Type = @import("Type.zig"); | ||
| 4 | const TypeDescription = @import("Builtins/TypeDescription.zig"); | ||
| 5 | const target_util = @import("target.zig"); | ||
| 6 | const StringId = @import("StringInterner.zig").StringId; | ||
| 7 | const LangOpts = @import("LangOpts.zig"); | ||
| 8 | const Parser = @import("Parser.zig"); | ||
| 9 | |||
| 10 | const Properties = @import("Builtins/Properties.zig"); | ||
| 11 | pub const Builtin = @import("Builtins/Builtin.def").with(Properties); | ||
| 12 | |||
| 13 | const Builtins = @This(); | ||
| 14 | |||
| 15 | const Expanded = struct { | ||
| 16 | ty: Type, | ||
| 17 | builtin: Builtin, | ||
| 18 | }; | ||
| 19 | |||
| 20 | const NameToTypeMap = std.StringHashMapUnmanaged(Type); | ||
| 21 | |||
| 22 | _name_to_type_map: NameToTypeMap = .{}, | ||
| 23 | |||
| 24 | pub fn deinit(b: *Builtins, gpa: std.mem.Allocator) void { | ||
| 25 | b._name_to_type_map.deinit(gpa); | ||
| 26 | } | ||
| 27 | |||
| 28 | fn specForSize(comp: *const Compilation, size_bits: u32) Type.Builder.Specifier { | ||
| 29 | var ty = Type{ .specifier = .short }; | ||
| 30 | if (ty.sizeof(comp).? * 8 == size_bits) return .short; | ||
| 31 | |||
| 32 | ty.specifier = .int; | ||
| 33 | if (ty.sizeof(comp).? * 8 == size_bits) return .int; | ||
| 34 | |||
| 35 | ty.specifier = .long; | ||
| 36 | if (ty.sizeof(comp).? * 8 == size_bits) return .long; | ||
| 37 | |||
| 38 | ty.specifier = .long_long; | ||
| 39 | if (ty.sizeof(comp).? * 8 == size_bits) return .long_long; | ||
| 40 | |||
| 41 | unreachable; | ||
| 42 | } | ||
| 43 | |||
| 44 | fn createType(desc: TypeDescription, it: *TypeDescription.TypeIterator, comp: *const Compilation, allocator: std.mem.Allocator) !Type { | ||
| 45 | var builder: Type.Builder = .{ .error_on_invalid = true }; | ||
| 46 | var require_native_int32 = false; | ||
| 47 | var require_native_int64 = false; | ||
| 48 | for (desc.prefix) |prefix| { | ||
| 49 | switch (prefix) { | ||
| 50 | .L => builder.combine(undefined, .long, 0) catch unreachable, | ||
| 51 | .LL => { | ||
| 52 | builder.combine(undefined, .long, 0) catch unreachable; | ||
| 53 | builder.combine(undefined, .long, 0) catch unreachable; | ||
| 54 | }, | ||
| 55 | .LLL => { | ||
| 56 | switch (builder.specifier) { | ||
| 57 | .none => builder.specifier = .int128, | ||
| 58 | .signed => builder.specifier = .sint128, | ||
| 59 | .unsigned => builder.specifier = .uint128, | ||
| 60 | else => unreachable, | ||
| 61 | } | ||
| 62 | }, | ||
| 63 | .Z => require_native_int32 = true, | ||
| 64 | .W => require_native_int64 = true, | ||
| 65 | .N => { | ||
| 66 | std.debug.assert(desc.spec == .i); | ||
| 67 | if (!target_util.isLP64(comp.target)) { | ||
| 68 | builder.combine(undefined, .long, 0) catch unreachable; | ||
| 69 | } | ||
| 70 | }, | ||
| 71 | .O => { | ||
| 72 | builder.combine(undefined, .long, 0) catch unreachable; | ||
| 73 | if (comp.target.os.tag != .opencl) { | ||
| 74 | builder.combine(undefined, .long, 0) catch unreachable; | ||
| 75 | } | ||
| 76 | }, | ||
| 77 | .S => builder.combine(undefined, .signed, 0) catch unreachable, | ||
| 78 | .U => builder.combine(undefined, .unsigned, 0) catch unreachable, | ||
| 79 | .I => { | ||
| 80 | // Todo: compile-time constant integer | ||
| 81 | }, | ||
| 82 | } | ||
| 83 | } | ||
| 84 | switch (desc.spec) { | ||
| 85 | .v => builder.combine(undefined, .void, 0) catch unreachable, | ||
| 86 | .b => builder.combine(undefined, .bool, 0) catch unreachable, | ||
| 87 | .c => builder.combine(undefined, .char, 0) catch unreachable, | ||
| 88 | .s => builder.combine(undefined, .short, 0) catch unreachable, | ||
| 89 | .i => { | ||
| 90 | if (require_native_int32) { | ||
| 91 | builder.specifier = specForSize(comp, 32); | ||
| 92 | } else if (require_native_int64) { | ||
| 93 | builder.specifier = specForSize(comp, 64); | ||
| 94 | } else { | ||
| 95 | switch (builder.specifier) { | ||
| 96 | .int128, .sint128, .uint128 => {}, | ||
| 97 | else => builder.combine(undefined, .int, 0) catch unreachable, | ||
| 98 | } | ||
| 99 | } | ||
| 100 | }, | ||
| 101 | .h => builder.combine(undefined, .fp16, 0) catch unreachable, | ||
| 102 | .x => { | ||
| 103 | // Todo: _Float16 | ||
| 104 | return .{ .specifier = .invalid }; | ||
| 105 | }, | ||
| 106 | .y => { | ||
| 107 | // Todo: __bf16 | ||
| 108 | return .{ .specifier = .invalid }; | ||
| 109 | }, | ||
| 110 | .f => builder.combine(undefined, .float, 0) catch unreachable, | ||
| 111 | .d => { | ||
| 112 | if (builder.specifier == .long_long) { | ||
| 113 | builder.specifier = .float128; | ||
| 114 | } else { | ||
| 115 | builder.combine(undefined, .double, 0) catch unreachable; | ||
| 116 | } | ||
| 117 | }, | ||
| 118 | .z => { | ||
| 119 | std.debug.assert(builder.specifier == .none); | ||
| 120 | builder.specifier = Type.Builder.fromType(comp.types.size); | ||
| 121 | }, | ||
| 122 | .w => { | ||
| 123 | std.debug.assert(builder.specifier == .none); | ||
| 124 | builder.specifier = Type.Builder.fromType(comp.types.wchar); | ||
| 125 | }, | ||
| 126 | .F => { | ||
| 127 | std.debug.assert(builder.specifier == .none); | ||
| 128 | builder.specifier = Type.Builder.fromType(comp.types.ns_constant_string.ty); | ||
| 129 | }, | ||
| 130 | .G => { | ||
| 131 | // Todo: id | ||
| 132 | return .{ .specifier = .invalid }; | ||
| 133 | }, | ||
| 134 | .H => { | ||
| 135 | // Todo: SEL | ||
| 136 | return .{ .specifier = .invalid }; | ||
| 137 | }, | ||
| 138 | .M => { | ||
| 139 | // Todo: struct objc_super | ||
| 140 | return .{ .specifier = .invalid }; | ||
| 141 | }, | ||
| 142 | .a => { | ||
| 143 | std.debug.assert(builder.specifier == .none); | ||
| 144 | std.debug.assert(desc.suffix.len == 0); | ||
| 145 | builder.specifier = Type.Builder.fromType(comp.types.va_list); | ||
| 146 | }, | ||
| 147 | .A => { | ||
| 148 | std.debug.assert(builder.specifier == .none); | ||
| 149 | std.debug.assert(desc.suffix.len == 0); | ||
| 150 | var va_list = comp.types.va_list; | ||
| 151 | if (va_list.isArray()) va_list.decayArray(); | ||
| 152 | builder.specifier = Type.Builder.fromType(va_list); | ||
| 153 | }, | ||
| 154 | .V => |element_count| { | ||
| 155 | std.debug.assert(desc.suffix.len == 0); | ||
| 156 | const child_desc = it.next().?; | ||
| 157 | const child_ty = try createType(child_desc, undefined, comp, allocator); | ||
| 158 | const arr_ty = try allocator.create(Type.Array); | ||
| 159 | arr_ty.* = .{ | ||
| 160 | .len = element_count, | ||
| 161 | .elem = child_ty, | ||
| 162 | }; | ||
| 163 | const vector_ty = .{ .specifier = .vector, .data = .{ .array = arr_ty } }; | ||
| 164 | builder.specifier = Type.Builder.fromType(vector_ty); | ||
| 165 | }, | ||
| 166 | .q => { | ||
| 167 | // Todo: scalable vector | ||
| 168 | return .{ .specifier = .invalid }; | ||
| 169 | }, | ||
| 170 | .E => { | ||
| 171 | // Todo: ext_vector (OpenCL vector) | ||
| 172 | return .{ .specifier = .invalid }; | ||
| 173 | }, | ||
| 174 | .X => |child| { | ||
| 175 | builder.combine(undefined, .complex, 0) catch unreachable; | ||
| 176 | switch (child) { | ||
| 177 | .float => builder.combine(undefined, .float, 0) catch unreachable, | ||
| 178 | .double => builder.combine(undefined, .double, 0) catch unreachable, | ||
| 179 | .longdouble => { | ||
| 180 | builder.combine(undefined, .long, 0) catch unreachable; | ||
| 181 | builder.combine(undefined, .double, 0) catch unreachable; | ||
| 182 | }, | ||
| 183 | } | ||
| 184 | }, | ||
| 185 | .Y => { | ||
| 186 | std.debug.assert(builder.specifier == .none); | ||
| 187 | std.debug.assert(desc.suffix.len == 0); | ||
| 188 | builder.specifier = Type.Builder.fromType(comp.types.ptrdiff); | ||
| 189 | }, | ||
| 190 | .P => { | ||
| 191 | std.debug.assert(builder.specifier == .none); | ||
| 192 | if (comp.types.file.specifier == .invalid) { | ||
| 193 | return comp.types.file; | ||
| 194 | } | ||
| 195 | builder.specifier = Type.Builder.fromType(comp.types.file); | ||
| 196 | }, | ||
| 197 | .J => { | ||
| 198 | std.debug.assert(builder.specifier == .none); | ||
| 199 | std.debug.assert(desc.suffix.len == 0); | ||
| 200 | if (comp.types.jmp_buf.specifier == .invalid) { | ||
| 201 | return comp.types.jmp_buf; | ||
| 202 | } | ||
| 203 | builder.specifier = Type.Builder.fromType(comp.types.jmp_buf); | ||
| 204 | }, | ||
| 205 | .SJ => { | ||
| 206 | std.debug.assert(builder.specifier == .none); | ||
| 207 | std.debug.assert(desc.suffix.len == 0); | ||
| 208 | if (comp.types.sigjmp_buf.specifier == .invalid) { | ||
| 209 | return comp.types.sigjmp_buf; | ||
| 210 | } | ||
| 211 | builder.specifier = Type.Builder.fromType(comp.types.sigjmp_buf); | ||
| 212 | }, | ||
| 213 | .K => { | ||
| 214 | std.debug.assert(builder.specifier == .none); | ||
| 215 | if (comp.types.ucontext_t.specifier == .invalid) { | ||
| 216 | return comp.types.ucontext_t; | ||
| 217 | } | ||
| 218 | builder.specifier = Type.Builder.fromType(comp.types.ucontext_t); | ||
| 219 | }, | ||
| 220 | .p => { | ||
| 221 | std.debug.assert(builder.specifier == .none); | ||
| 222 | std.debug.assert(desc.suffix.len == 0); | ||
| 223 | builder.specifier = Type.Builder.fromType(comp.types.pid_t); | ||
| 224 | }, | ||
| 225 | .@"!" => return .{ .specifier = .invalid }, | ||
| 226 | } | ||
| 227 | for (desc.suffix) |suffix| { | ||
| 228 | switch (suffix) { | ||
| 229 | .@"*" => |address_space| { | ||
| 230 | _ = address_space; // TODO: handle address space | ||
| 231 | const elem_ty = try allocator.create(Type); | ||
| 232 | elem_ty.* = builder.finish(undefined) catch unreachable; | ||
| 233 | const ty = Type{ | ||
| 234 | .specifier = .pointer, | ||
| 235 | .data = .{ .sub_type = elem_ty }, | ||
| 236 | }; | ||
| 237 | builder.qual = .{}; | ||
| 238 | builder.specifier = Type.Builder.fromType(ty); | ||
| 239 | }, | ||
| 240 | .C => builder.qual.@"const" = 0, | ||
| 241 | .D => builder.qual.@"volatile" = 0, | ||
| 242 | .R => builder.qual.restrict = 0, | ||
| 243 | } | ||
| 244 | } | ||
| 245 | return builder.finish(undefined) catch unreachable; | ||
| 246 | } | ||
| 247 | |||
| 248 | fn createBuiltin(comp: *const Compilation, builtin: Builtin, type_arena: std.mem.Allocator) !Type { | ||
| 249 | var it = TypeDescription.TypeIterator.init(builtin.properties.param_str); | ||
| 250 | |||
| 251 | const ret_ty_desc = it.next().?; | ||
| 252 | if (ret_ty_desc.spec == .@"!") { | ||
| 253 | // Todo: handle target-dependent definition | ||
| 254 | } | ||
| 255 | const ret_ty = try createType(ret_ty_desc, &it, comp, type_arena); | ||
| 256 | var param_count: usize = 0; | ||
| 257 | var params: [Builtin.max_param_count]Type.Func.Param = undefined; | ||
| 258 | while (it.next()) |desc| : (param_count += 1) { | ||
| 259 | params[param_count] = .{ .name_tok = 0, .ty = try createType(desc, &it, comp, type_arena), .name = .empty }; | ||
| 260 | } | ||
| 261 | |||
| 262 | const duped_params = try type_arena.dupe(Type.Func.Param, params[0..param_count]); | ||
| 263 | const func = try type_arena.create(Type.Func); | ||
| 264 | |||
| 265 | func.* = .{ | ||
| 266 | .return_type = ret_ty, | ||
| 267 | .params = duped_params, | ||
| 268 | }; | ||
| 269 | return .{ | ||
| 270 | .specifier = if (builtin.properties.isVarArgs()) .var_args_func else .func, | ||
| 271 | .data = .{ .func = func }, | ||
| 272 | }; | ||
| 273 | } | ||
| 274 | |||
| 275 | /// Asserts that the builtin has already been created | ||
| 276 | pub fn lookup(b: *const Builtins, name: []const u8) Expanded { | ||
| 277 | const builtin = Builtin.fromName(name).?; | ||
| 278 | const ty = b._name_to_type_map.get(name).?; | ||
| 279 | return .{ | ||
| 280 | .builtin = builtin, | ||
| 281 | .ty = ty, | ||
| 282 | }; | ||
| 283 | } | ||
| 284 | |||
| 285 | pub fn getOrCreate(b: *Builtins, comp: *Compilation, name: []const u8, type_arena: std.mem.Allocator) !?Expanded { | ||
| 286 | const ty = b._name_to_type_map.get(name) orelse { | ||
| 287 | const builtin = Builtin.fromName(name) orelse return null; | ||
| 288 | if (!comp.hasBuiltinFunction(builtin)) return null; | ||
| 289 | |||
| 290 | try b._name_to_type_map.ensureUnusedCapacity(comp.gpa, 1); | ||
| 291 | const ty = try createBuiltin(comp, builtin, type_arena); | ||
| 292 | b._name_to_type_map.putAssumeCapacity(name, ty); | ||
| 293 | |||
| 294 | return .{ | ||
| 295 | .builtin = builtin, | ||
| 296 | .ty = ty, | ||
| 297 | }; | ||
| 298 | }; | ||
| 299 | const builtin = Builtin.fromName(name).?; | ||
| 300 | return .{ | ||
| 301 | .builtin = builtin, | ||
| 302 | .ty = ty, | ||
| 303 | }; | ||
| 304 | } | ||
| 305 | |||
| 306 | pub const Iterator = struct { | ||
| 307 | index: u16 = 1, | ||
| 308 | name_buf: [Builtin.longest_name]u8 = undefined, | ||
| 309 | |||
| 310 | pub const Entry = struct { | ||
| 311 | /// Memory of this slice is overwritten on every call to `next` | ||
| 312 | name: []const u8, | ||
| 313 | builtin: Builtin, | ||
| 314 | }; | ||
| 315 | |||
| 316 | pub fn next(self: *Iterator) ?Entry { | ||
| 317 | if (self.index > Builtin.data.len) return null; | ||
| 318 | const index = self.index; | ||
| 319 | const data_index = index - 1; | ||
| 320 | self.index += 1; | ||
| 321 | return .{ | ||
| 322 | .name = Builtin.nameFromUniqueIndex(index, &self.name_buf), | ||
| 323 | .builtin = Builtin.data[data_index], | ||
| 324 | }; | ||
| 325 | } | ||
| 326 | }; | ||
| 327 | |||
| 328 | test Iterator { | ||
| 329 | var it = Iterator{}; | ||
| 330 | |||
| 331 | var seen = std.StringHashMap(Builtin).init(std.testing.allocator); | ||
| 332 | defer seen.deinit(); | ||
| 333 | |||
| 334 | var arena_state = std.heap.ArenaAllocator.init(std.testing.allocator); | ||
| 335 | defer arena_state.deinit(); | ||
| 336 | const arena = arena_state.allocator(); | ||
| 337 | |||
| 338 | while (it.next()) |entry| { | ||
| 339 | const index = Builtin.uniqueIndex(entry.name).?; | ||
| 340 | var buf: [Builtin.longest_name]u8 = undefined; | ||
| 341 | const name_from_index = Builtin.nameFromUniqueIndex(index, &buf); | ||
| 342 | try std.testing.expectEqualStrings(entry.name, name_from_index); | ||
| 343 | |||
| 344 | if (seen.contains(entry.name)) { | ||
| 345 | std.debug.print("iterated over {s} twice\n", .{entry.name}); | ||
| 346 | std.debug.print("current data: {}\n", .{entry.builtin}); | ||
| 347 | std.debug.print("previous data: {}\n", .{seen.get(entry.name).?}); | ||
| 348 | return error.TestExpectedUniqueEntries; | ||
| 349 | } | ||
| 350 | try seen.put(try arena.dupe(u8, entry.name), entry.builtin); | ||
| 351 | } | ||
| 352 | try std.testing.expectEqual(@as(usize, Builtin.data.len), seen.count()); | ||
| 353 | } | ||
| 354 | |||
| 355 | test "All builtins" { | ||
| 356 | var comp = Compilation.init(std.testing.allocator); | ||
| 357 | defer comp.deinit(); | ||
| 358 | _ = try comp.generateBuiltinMacros(); | ||
| 359 | var arena = std.heap.ArenaAllocator.init(std.testing.allocator); | ||
| 360 | defer arena.deinit(); | ||
| 361 | |||
| 362 | const type_arena = arena.allocator(); | ||
| 363 | |||
| 364 | var builtin_it = Iterator{}; | ||
| 365 | while (builtin_it.next()) |entry| { | ||
| 366 | const name = try type_arena.dupe(u8, entry.name); | ||
| 367 | if (try comp.builtins.getOrCreate(&comp, name, type_arena)) |func_ty| { | ||
| 368 | const get_again = (try comp.builtins.getOrCreate(&comp, name, std.testing.failing_allocator)).?; | ||
| 369 | const found_by_lookup = comp.builtins.lookup(name); | ||
| 370 | try std.testing.expectEqual(func_ty.builtin.tag, get_again.builtin.tag); | ||
| 371 | try std.testing.expectEqual(func_ty.builtin.tag, found_by_lookup.builtin.tag); | ||
| 372 | } | ||
| 373 | } | ||
| 374 | } | ||
| 375 | |||
| 376 | test "Allocation failures" { | ||
| 377 | const Test = struct { | ||
| 378 | fn testOne(allocator: std.mem.Allocator) !void { | ||
| 379 | var comp = Compilation.init(allocator); | ||
| 380 | defer comp.deinit(); | ||
| 381 | _ = try comp.generateBuiltinMacros(); | ||
| 382 | var arena = std.heap.ArenaAllocator.init(comp.gpa); | ||
| 383 | defer arena.deinit(); | ||
| 384 | |||
| 385 | const type_arena = arena.allocator(); | ||
| 386 | |||
| 387 | const num_builtins = 40; | ||
| 388 | var builtin_it = Iterator{}; | ||
| 389 | for (0..num_builtins) |_| { | ||
| 390 | const entry = builtin_it.next().?; | ||
| 391 | _ = try comp.builtins.getOrCreate(&comp, entry.name, type_arena); | ||
| 392 | } | ||
| 393 | } | ||
| 394 | }; | ||
| 395 | |||
| 396 | try std.testing.checkAllAllocationFailures(std.testing.allocator, Test.testOne, .{}); | ||
| 397 | } | ||
deps/aro/Builtins/Builtin.def deleted-17010| ... | @@ -1,17010 +0,0 @@ | ||
| 1 | const TargetSet = Properties.TargetSet; | ||
| 2 | |||
| 3 | # TODO this file is generated from LLVM sources and | ||
| 4 | # needs cleanup to be considered source. | ||
| 5 | |||
| 6 | pub const max_param_count = 12; | ||
| 7 | |||
| 8 | _Block_object_assign | ||
| 9 | .param_str = "vv*vC*iC" | ||
| 10 | .header = .blocks | ||
| 11 | .attributes = .{ .lib_function_without_prefix = true } | ||
| 12 | |||
| 13 | _Block_object_dispose | ||
| 14 | .param_str = "vvC*iC" | ||
| 15 | .header = .blocks | ||
| 16 | .attributes = .{ .lib_function_without_prefix = true } | ||
| 17 | |||
| 18 | _Exit | ||
| 19 | .param_str = "vi" | ||
| 20 | .header = .stdlib | ||
| 21 | .attributes = .{ .noreturn = true, .lib_function_without_prefix = true } | ||
| 22 | |||
| 23 | _InterlockedAnd | ||
| 24 | .param_str = "NiNiD*Ni" | ||
| 25 | .language = .all_ms_languages | ||
| 26 | |||
| 27 | _InterlockedAnd16 | ||
| 28 | .param_str = "ssD*s" | ||
| 29 | .language = .all_ms_languages | ||
| 30 | |||
| 31 | _InterlockedAnd8 | ||
| 32 | .param_str = "ccD*c" | ||
| 33 | .language = .all_ms_languages | ||
| 34 | |||
| 35 | _InterlockedCompareExchange | ||
| 36 | .param_str = "NiNiD*NiNi" | ||
| 37 | .language = .all_ms_languages | ||
| 38 | |||
| 39 | _InterlockedCompareExchange16 | ||
| 40 | .param_str = "ssD*ss" | ||
| 41 | .language = .all_ms_languages | ||
| 42 | |||
| 43 | _InterlockedCompareExchange64 | ||
| 44 | .param_str = "LLiLLiD*LLiLLi" | ||
| 45 | .language = .all_ms_languages | ||
| 46 | |||
| 47 | _InterlockedCompareExchange8 | ||
| 48 | .param_str = "ccD*cc" | ||
| 49 | .language = .all_ms_languages | ||
| 50 | |||
| 51 | _InterlockedCompareExchangePointer | ||
| 52 | .param_str = "v*v*D*v*v*" | ||
| 53 | .language = .all_ms_languages | ||
| 54 | |||
| 55 | _InterlockedCompareExchangePointer_nf | ||
| 56 | .param_str = "v*v*D*v*v*" | ||
| 57 | .language = .all_ms_languages | ||
| 58 | |||
| 59 | _InterlockedDecrement | ||
| 60 | .param_str = "NiNiD*" | ||
| 61 | .language = .all_ms_languages | ||
| 62 | |||
| 63 | _InterlockedDecrement16 | ||
| 64 | .param_str = "ssD*" | ||
| 65 | .language = .all_ms_languages | ||
| 66 | |||
| 67 | _InterlockedExchange | ||
| 68 | .param_str = "NiNiD*Ni" | ||
| 69 | .language = .all_ms_languages | ||
| 70 | |||
| 71 | _InterlockedExchange16 | ||
| 72 | .param_str = "ssD*s" | ||
| 73 | .language = .all_ms_languages | ||
| 74 | |||
| 75 | _InterlockedExchange8 | ||
| 76 | .param_str = "ccD*c" | ||
| 77 | .language = .all_ms_languages | ||
| 78 | |||
| 79 | _InterlockedExchangeAdd | ||
| 80 | .param_str = "NiNiD*Ni" | ||
| 81 | .language = .all_ms_languages | ||
| 82 | |||
| 83 | _InterlockedExchangeAdd16 | ||
| 84 | .param_str = "ssD*s" | ||
| 85 | .language = .all_ms_languages | ||
| 86 | |||
| 87 | _InterlockedExchangeAdd8 | ||
| 88 | .param_str = "ccD*c" | ||
| 89 | .language = .all_ms_languages | ||
| 90 | |||
| 91 | _InterlockedExchangePointer | ||
| 92 | .param_str = "v*v*D*v*" | ||
| 93 | .language = .all_ms_languages | ||
| 94 | |||
| 95 | _InterlockedExchangeSub | ||
| 96 | .param_str = "NiNiD*Ni" | ||
| 97 | .language = .all_ms_languages | ||
| 98 | |||
| 99 | _InterlockedExchangeSub16 | ||
| 100 | .param_str = "ssD*s" | ||
| 101 | .language = .all_ms_languages | ||
| 102 | |||
| 103 | _InterlockedExchangeSub8 | ||
| 104 | .param_str = "ccD*c" | ||
| 105 | .language = .all_ms_languages | ||
| 106 | |||
| 107 | _InterlockedIncrement | ||
| 108 | .param_str = "NiNiD*" | ||
| 109 | .language = .all_ms_languages | ||
| 110 | |||
| 111 | _InterlockedIncrement16 | ||
| 112 | .param_str = "ssD*" | ||
| 113 | .language = .all_ms_languages | ||
| 114 | |||
| 115 | _InterlockedOr | ||
| 116 | .param_str = "NiNiD*Ni" | ||
| 117 | .language = .all_ms_languages | ||
| 118 | |||
| 119 | _InterlockedOr16 | ||
| 120 | .param_str = "ssD*s" | ||
| 121 | .language = .all_ms_languages | ||
| 122 | |||
| 123 | _InterlockedOr8 | ||
| 124 | .param_str = "ccD*c" | ||
| 125 | .language = .all_ms_languages | ||
| 126 | |||
| 127 | _InterlockedXor | ||
| 128 | .param_str = "NiNiD*Ni" | ||
| 129 | .language = .all_ms_languages | ||
| 130 | |||
| 131 | _InterlockedXor16 | ||
| 132 | .param_str = "ssD*s" | ||
| 133 | .language = .all_ms_languages | ||
| 134 | |||
| 135 | _InterlockedXor8 | ||
| 136 | .param_str = "ccD*c" | ||
| 137 | .language = .all_ms_languages | ||
| 138 | |||
| 139 | _MoveFromCoprocessor | ||
| 140 | .param_str = "UiIUiIUiIUiIUiIUi" | ||
| 141 | .language = .all_ms_languages | ||
| 142 | .target_set = TargetSet.initOne(.arm) | ||
| 143 | |||
| 144 | _MoveFromCoprocessor2 | ||
| 145 | .param_str = "UiIUiIUiIUiIUiIUi" | ||
| 146 | .language = .all_ms_languages | ||
| 147 | .target_set = TargetSet.initOne(.arm) | ||
| 148 | |||
| 149 | _MoveToCoprocessor | ||
| 150 | .param_str = "vUiIUiIUiIUiIUiIUi" | ||
| 151 | .language = .all_ms_languages | ||
| 152 | .target_set = TargetSet.initOne(.arm) | ||
| 153 | |||
| 154 | _MoveToCoprocessor2 | ||
| 155 | .param_str = "vUiIUiIUiIUiIUiIUi" | ||
| 156 | .language = .all_ms_languages | ||
| 157 | .target_set = TargetSet.initOne(.arm) | ||
| 158 | |||
| 159 | _ReturnAddress | ||
| 160 | .param_str = "v*" | ||
| 161 | .language = .all_ms_languages | ||
| 162 | |||
| 163 | __GetExceptionInfo | ||
| 164 | .param_str = "v*." | ||
| 165 | .language = .all_ms_languages | ||
| 166 | .attributes = .{ .custom_typecheck = true, .eval_args = false } | ||
| 167 | |||
| 168 | __abnormal_termination | ||
| 169 | .param_str = "i" | ||
| 170 | .language = .all_ms_languages | ||
| 171 | |||
| 172 | __annotation | ||
| 173 | .param_str = "wC*." | ||
| 174 | .language = .all_ms_languages | ||
| 175 | |||
| 176 | __arithmetic_fence | ||
| 177 | .param_str = "v." | ||
| 178 | .attributes = .{ .custom_typecheck = true, .const_evaluable = true } | ||
| 179 | |||
| 180 | __assume | ||
| 181 | .param_str = "vb" | ||
| 182 | .language = .all_ms_languages | ||
| 183 | .attributes = .{ .const_evaluable = true } | ||
| 184 | |||
| 185 | __atomic_always_lock_free | ||
| 186 | .param_str = "bzvCD*" | ||
| 187 | .attributes = .{ .const_evaluable = true } | ||
| 188 | |||
| 189 | __atomic_clear | ||
| 190 | .param_str = "vvD*i" | ||
| 191 | |||
| 192 | __atomic_is_lock_free | ||
| 193 | .param_str = "bzvCD*" | ||
| 194 | .attributes = .{ .const_evaluable = true } | ||
| 195 | |||
| 196 | __atomic_signal_fence | ||
| 197 | .param_str = "vi" | ||
| 198 | |||
| 199 | __atomic_test_and_set | ||
| 200 | .param_str = "bvD*i" | ||
| 201 | |||
| 202 | __atomic_thread_fence | ||
| 203 | .param_str = "vi" | ||
| 204 | |||
| 205 | __builtin___CFStringMakeConstantString | ||
| 206 | .param_str = "FC*cC*" | ||
| 207 | .attributes = .{ .@"const" = true, .const_evaluable = true } | ||
| 208 | |||
| 209 | __builtin___NSStringMakeConstantString | ||
| 210 | .param_str = "FC*cC*" | ||
| 211 | .attributes = .{ .@"const" = true, .const_evaluable = true } | ||
| 212 | |||
| 213 | __builtin___clear_cache | ||
| 214 | .param_str = "vc*c*" | ||
| 215 | |||
| 216 | __builtin___fprintf_chk | ||
| 217 | .param_str = "iP*RicC*R." | ||
| 218 | .attributes = .{ .lib_function_with_builtin_prefix = true, .format_kind = .printf, .format_string_position = 2 } | ||
| 219 | |||
| 220 | __builtin___get_unsafe_stack_bottom | ||
| 221 | .param_str = "v*" | ||
| 222 | .attributes = .{ .lib_function_with_builtin_prefix = true } | ||
| 223 | |||
| 224 | __builtin___get_unsafe_stack_ptr | ||
| 225 | .param_str = "v*" | ||
| 226 | .attributes = .{ .lib_function_with_builtin_prefix = true } | ||
| 227 | |||
| 228 | __builtin___get_unsafe_stack_start | ||
| 229 | .param_str = "v*" | ||
| 230 | .attributes = .{ .lib_function_with_builtin_prefix = true } | ||
| 231 | |||
| 232 | __builtin___get_unsafe_stack_top | ||
| 233 | .param_str = "v*" | ||
| 234 | .attributes = .{ .lib_function_with_builtin_prefix = true } | ||
| 235 | |||
| 236 | __builtin___memccpy_chk | ||
| 237 | .param_str = "v*v*vC*izz" | ||
| 238 | .attributes = .{ .lib_function_with_builtin_prefix = true } | ||
| 239 | |||
| 240 | __builtin___memcpy_chk | ||
| 241 | .param_str = "v*v*vC*zz" | ||
| 242 | .attributes = .{ .lib_function_with_builtin_prefix = true } | ||
| 243 | |||
| 244 | __builtin___memmove_chk | ||
| 245 | .param_str = "v*v*vC*zz" | ||
| 246 | .attributes = .{ .lib_function_with_builtin_prefix = true } | ||
| 247 | |||
| 248 | __builtin___mempcpy_chk | ||
| 249 | .param_str = "v*v*vC*zz" | ||
| 250 | .attributes = .{ .lib_function_with_builtin_prefix = true } | ||
| 251 | |||
| 252 | __builtin___memset_chk | ||
| 253 | .param_str = "v*v*izz" | ||
| 254 | .attributes = .{ .lib_function_with_builtin_prefix = true } | ||
| 255 | |||
| 256 | __builtin___printf_chk | ||
| 257 | .param_str = "iicC*R." | ||
| 258 | .attributes = .{ .lib_function_with_builtin_prefix = true, .format_kind = .printf, .format_string_position = 1 } | ||
| 259 | |||
| 260 | __builtin___snprintf_chk | ||
| 261 | .param_str = "ic*RzizcC*R." | ||
| 262 | .attributes = .{ .lib_function_with_builtin_prefix = true, .format_kind = .printf, .format_string_position = 4 } | ||
| 263 | |||
| 264 | __builtin___sprintf_chk | ||
| 265 | .param_str = "ic*RizcC*R." | ||
| 266 | .attributes = .{ .lib_function_with_builtin_prefix = true, .format_kind = .printf, .format_string_position = 3 } | ||
| 267 | |||
| 268 | __builtin___stpcpy_chk | ||
| 269 | .param_str = "c*c*cC*z" | ||
| 270 | .attributes = .{ .lib_function_with_builtin_prefix = true } | ||
| 271 | |||
| 272 | __builtin___stpncpy_chk | ||
| 273 | .param_str = "c*c*cC*zz" | ||
| 274 | .attributes = .{ .lib_function_with_builtin_prefix = true } | ||
| 275 | |||
| 276 | __builtin___strcat_chk | ||
| 277 | .param_str = "c*c*cC*z" | ||
| 278 | .attributes = .{ .lib_function_with_builtin_prefix = true } | ||
| 279 | |||
| 280 | __builtin___strcpy_chk | ||
| 281 | .param_str = "c*c*cC*z" | ||
| 282 | .attributes = .{ .lib_function_with_builtin_prefix = true } | ||
| 283 | |||
| 284 | __builtin___strlcat_chk | ||
| 285 | .param_str = "zc*cC*zz" | ||
| 286 | .attributes = .{ .lib_function_with_builtin_prefix = true } | ||
| 287 | |||
| 288 | __builtin___strlcpy_chk | ||
| 289 | .param_str = "zc*cC*zz" | ||
| 290 | .attributes = .{ .lib_function_with_builtin_prefix = true } | ||
| 291 | |||
| 292 | __builtin___strncat_chk | ||
| 293 | .param_str = "c*c*cC*zz" | ||
| 294 | .attributes = .{ .lib_function_with_builtin_prefix = true } | ||
| 295 | |||
| 296 | __builtin___strncpy_chk | ||
| 297 | .param_str = "c*c*cC*zz" | ||
| 298 | .attributes = .{ .lib_function_with_builtin_prefix = true } | ||
| 299 | |||
| 300 | __builtin___vfprintf_chk | ||
| 301 | .param_str = "iP*RicC*Ra" | ||
| 302 | .attributes = .{ .lib_function_with_builtin_prefix = true, .format_kind = .vprintf, .format_string_position = 2 } | ||
| 303 | |||
| 304 | __builtin___vprintf_chk | ||
| 305 | .param_str = "iicC*Ra" | ||
| 306 | .attributes = .{ .lib_function_with_builtin_prefix = true, .format_kind = .vprintf, .format_string_position = 1 } | ||
| 307 | |||
| 308 | __builtin___vsnprintf_chk | ||
| 309 | .param_str = "ic*RzizcC*Ra" | ||
| 310 | .attributes = .{ .lib_function_with_builtin_prefix = true, .format_kind = .vprintf, .format_string_position = 4 } | ||
| 311 | |||
| 312 | __builtin___vsprintf_chk | ||
| 313 | .param_str = "ic*RizcC*Ra" | ||
| 314 | .attributes = .{ .lib_function_with_builtin_prefix = true, .format_kind = .vprintf, .format_string_position = 3 } | ||
| 315 | |||
| 316 | __builtin_abort | ||
| 317 | .param_str = "v" | ||
| 318 | .attributes = .{ .noreturn = true, .lib_function_with_builtin_prefix = true } | ||
| 319 | |||
| 320 | __builtin_abs | ||
| 321 | .param_str = "ii" | ||
| 322 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } | ||
| 323 | |||
| 324 | __builtin_acos | ||
| 325 | .param_str = "dd" | ||
| 326 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 327 | |||
| 328 | __builtin_acosf | ||
| 329 | .param_str = "ff" | ||
| 330 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 331 | |||
| 332 | __builtin_acosf128 | ||
| 333 | .param_str = "LLdLLd" | ||
| 334 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 335 | |||
| 336 | __builtin_acosh | ||
| 337 | .param_str = "dd" | ||
| 338 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 339 | |||
| 340 | __builtin_acoshf | ||
| 341 | .param_str = "ff" | ||
| 342 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 343 | |||
| 344 | __builtin_acoshf128 | ||
| 345 | .param_str = "LLdLLd" | ||
| 346 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 347 | |||
| 348 | __builtin_acoshl | ||
| 349 | .param_str = "LdLd" | ||
| 350 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 351 | |||
| 352 | __builtin_acosl | ||
| 353 | .param_str = "LdLd" | ||
| 354 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 355 | |||
| 356 | __builtin_add_overflow | ||
| 357 | .param_str = "b." | ||
| 358 | .attributes = .{ .custom_typecheck = true, .const_evaluable = true } | ||
| 359 | |||
| 360 | __builtin_addc | ||
| 361 | .param_str = "UiUiCUiCUiCUi*" | ||
| 362 | |||
| 363 | __builtin_addcb | ||
| 364 | .param_str = "UcUcCUcCUcCUc*" | ||
| 365 | |||
| 366 | __builtin_addcl | ||
| 367 | .param_str = "ULiULiCULiCULiCULi*" | ||
| 368 | |||
| 369 | __builtin_addcll | ||
| 370 | .param_str = "ULLiULLiCULLiCULLiCULLi*" | ||
| 371 | |||
| 372 | __builtin_addcs | ||
| 373 | .param_str = "UsUsCUsCUsCUs*" | ||
| 374 | |||
| 375 | __builtin_align_down | ||
| 376 | .param_str = "v*vC*z" | ||
| 377 | .attributes = .{ .@"const" = true, .custom_typecheck = true, .const_evaluable = true } | ||
| 378 | |||
| 379 | __builtin_align_up | ||
| 380 | .param_str = "v*vC*z" | ||
| 381 | .attributes = .{ .@"const" = true, .custom_typecheck = true, .const_evaluable = true } | ||
| 382 | |||
| 383 | __builtin_alloca | ||
| 384 | .param_str = "v*z" | ||
| 385 | .attributes = .{ .lib_function_with_builtin_prefix = true } | ||
| 386 | |||
| 387 | __builtin_alloca_uninitialized | ||
| 388 | .param_str = "v*z" | ||
| 389 | .attributes = .{ .lib_function_with_builtin_prefix = true } | ||
| 390 | |||
| 391 | __builtin_alloca_with_align | ||
| 392 | .param_str = "v*zIz" | ||
| 393 | .attributes = .{ .lib_function_with_builtin_prefix = true } | ||
| 394 | |||
| 395 | __builtin_alloca_with_align_uninitialized | ||
| 396 | .param_str = "v*zIz" | ||
| 397 | .attributes = .{ .lib_function_with_builtin_prefix = true } | ||
| 398 | |||
| 399 | __builtin_amdgcn_alignbit | ||
| 400 | .param_str = "UiUiUiUi" | ||
| 401 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 402 | .attributes = .{ .@"const" = true } | ||
| 403 | |||
| 404 | __builtin_amdgcn_alignbyte | ||
| 405 | .param_str = "UiUiUiUi" | ||
| 406 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 407 | .attributes = .{ .@"const" = true } | ||
| 408 | |||
| 409 | __builtin_amdgcn_atomic_dec32 | ||
| 410 | .param_str = "UZiUZiD*UZiUicC*" | ||
| 411 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 412 | |||
| 413 | __builtin_amdgcn_atomic_dec64 | ||
| 414 | .param_str = "UWiUWiD*UWiUicC*" | ||
| 415 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 416 | |||
| 417 | __builtin_amdgcn_atomic_inc32 | ||
| 418 | .param_str = "UZiUZiD*UZiUicC*" | ||
| 419 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 420 | |||
| 421 | __builtin_amdgcn_atomic_inc64 | ||
| 422 | .param_str = "UWiUWiD*UWiUicC*" | ||
| 423 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 424 | |||
| 425 | __builtin_amdgcn_buffer_wbinvl1 | ||
| 426 | .param_str = "v" | ||
| 427 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 428 | |||
| 429 | __builtin_amdgcn_class | ||
| 430 | .param_str = "bdi" | ||
| 431 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 432 | .attributes = .{ .@"const" = true } | ||
| 433 | |||
| 434 | __builtin_amdgcn_classf | ||
| 435 | .param_str = "bfi" | ||
| 436 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 437 | .attributes = .{ .@"const" = true } | ||
| 438 | |||
| 439 | __builtin_amdgcn_cosf | ||
| 440 | .param_str = "ff" | ||
| 441 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 442 | .attributes = .{ .@"const" = true } | ||
| 443 | |||
| 444 | __builtin_amdgcn_cubeid | ||
| 445 | .param_str = "ffff" | ||
| 446 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 447 | .attributes = .{ .@"const" = true } | ||
| 448 | |||
| 449 | __builtin_amdgcn_cubema | ||
| 450 | .param_str = "ffff" | ||
| 451 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 452 | .attributes = .{ .@"const" = true } | ||
| 453 | |||
| 454 | __builtin_amdgcn_cubesc | ||
| 455 | .param_str = "ffff" | ||
| 456 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 457 | .attributes = .{ .@"const" = true } | ||
| 458 | |||
| 459 | __builtin_amdgcn_cubetc | ||
| 460 | .param_str = "ffff" | ||
| 461 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 462 | .attributes = .{ .@"const" = true } | ||
| 463 | |||
| 464 | __builtin_amdgcn_cvt_pk_i16 | ||
| 465 | .param_str = "E2sii" | ||
| 466 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 467 | .attributes = .{ .@"const" = true } | ||
| 468 | |||
| 469 | __builtin_amdgcn_cvt_pk_u16 | ||
| 470 | .param_str = "E2UsUiUi" | ||
| 471 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 472 | .attributes = .{ .@"const" = true } | ||
| 473 | |||
| 474 | __builtin_amdgcn_cvt_pk_u8_f32 | ||
| 475 | .param_str = "UifUiUi" | ||
| 476 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 477 | .attributes = .{ .@"const" = true } | ||
| 478 | |||
| 479 | __builtin_amdgcn_cvt_pknorm_i16 | ||
| 480 | .param_str = "E2sff" | ||
| 481 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 482 | .attributes = .{ .@"const" = true } | ||
| 483 | |||
| 484 | __builtin_amdgcn_cvt_pknorm_u16 | ||
| 485 | .param_str = "E2Usff" | ||
| 486 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 487 | .attributes = .{ .@"const" = true } | ||
| 488 | |||
| 489 | __builtin_amdgcn_cvt_pkrtz | ||
| 490 | .param_str = "E2hff" | ||
| 491 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 492 | .attributes = .{ .@"const" = true } | ||
| 493 | |||
| 494 | __builtin_amdgcn_dispatch_ptr | ||
| 495 | .param_str = "v*4" | ||
| 496 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 497 | .attributes = .{ .@"const" = true } | ||
| 498 | |||
| 499 | __builtin_amdgcn_div_fixup | ||
| 500 | .param_str = "dddd" | ||
| 501 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 502 | .attributes = .{ .@"const" = true } | ||
| 503 | |||
| 504 | __builtin_amdgcn_div_fixupf | ||
| 505 | .param_str = "ffff" | ||
| 506 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 507 | .attributes = .{ .@"const" = true } | ||
| 508 | |||
| 509 | __builtin_amdgcn_div_fmas | ||
| 510 | .param_str = "ddddb" | ||
| 511 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 512 | .attributes = .{ .@"const" = true } | ||
| 513 | |||
| 514 | __builtin_amdgcn_div_fmasf | ||
| 515 | .param_str = "ffffb" | ||
| 516 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 517 | .attributes = .{ .@"const" = true } | ||
| 518 | |||
| 519 | __builtin_amdgcn_div_scale | ||
| 520 | .param_str = "dddbb*" | ||
| 521 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 522 | |||
| 523 | __builtin_amdgcn_div_scalef | ||
| 524 | .param_str = "fffbb*" | ||
| 525 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 526 | |||
| 527 | __builtin_amdgcn_ds_append | ||
| 528 | .param_str = "ii*3" | ||
| 529 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 530 | |||
| 531 | __builtin_amdgcn_ds_bpermute | ||
| 532 | .param_str = "iii" | ||
| 533 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 534 | .attributes = .{ .@"const" = true } | ||
| 535 | |||
| 536 | __builtin_amdgcn_ds_consume | ||
| 537 | .param_str = "ii*3" | ||
| 538 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 539 | |||
| 540 | __builtin_amdgcn_ds_faddf | ||
| 541 | .param_str = "ff*3fIiIiIb" | ||
| 542 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 543 | |||
| 544 | __builtin_amdgcn_ds_fmaxf | ||
| 545 | .param_str = "ff*3fIiIiIb" | ||
| 546 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 547 | |||
| 548 | __builtin_amdgcn_ds_fminf | ||
| 549 | .param_str = "ff*3fIiIiIb" | ||
| 550 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 551 | |||
| 552 | __builtin_amdgcn_ds_permute | ||
| 553 | .param_str = "iii" | ||
| 554 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 555 | .attributes = .{ .@"const" = true } | ||
| 556 | |||
| 557 | __builtin_amdgcn_ds_swizzle | ||
| 558 | .param_str = "iiIi" | ||
| 559 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 560 | .attributes = .{ .@"const" = true } | ||
| 561 | |||
| 562 | __builtin_amdgcn_endpgm | ||
| 563 | .param_str = "v" | ||
| 564 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 565 | .attributes = .{ .noreturn = true } | ||
| 566 | |||
| 567 | __builtin_amdgcn_exp2f | ||
| 568 | .param_str = "ff" | ||
| 569 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 570 | .attributes = .{ .@"const" = true } | ||
| 571 | |||
| 572 | __builtin_amdgcn_fcmp | ||
| 573 | .param_str = "WUiddIi" | ||
| 574 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 575 | .attributes = .{ .@"const" = true } | ||
| 576 | |||
| 577 | __builtin_amdgcn_fcmpf | ||
| 578 | .param_str = "WUiffIi" | ||
| 579 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 580 | .attributes = .{ .@"const" = true } | ||
| 581 | |||
| 582 | __builtin_amdgcn_fence | ||
| 583 | .param_str = "vUicC*" | ||
| 584 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 585 | |||
| 586 | __builtin_amdgcn_fmed3f | ||
| 587 | .param_str = "ffff" | ||
| 588 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 589 | .attributes = .{ .@"const" = true } | ||
| 590 | |||
| 591 | __builtin_amdgcn_fract | ||
| 592 | .param_str = "dd" | ||
| 593 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 594 | .attributes = .{ .@"const" = true } | ||
| 595 | |||
| 596 | __builtin_amdgcn_fractf | ||
| 597 | .param_str = "ff" | ||
| 598 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 599 | .attributes = .{ .@"const" = true } | ||
| 600 | |||
| 601 | __builtin_amdgcn_frexp_exp | ||
| 602 | .param_str = "id" | ||
| 603 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 604 | .attributes = .{ .@"const" = true } | ||
| 605 | |||
| 606 | __builtin_amdgcn_frexp_expf | ||
| 607 | .param_str = "if" | ||
| 608 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 609 | .attributes = .{ .@"const" = true } | ||
| 610 | |||
| 611 | __builtin_amdgcn_frexp_mant | ||
| 612 | .param_str = "dd" | ||
| 613 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 614 | .attributes = .{ .@"const" = true } | ||
| 615 | |||
| 616 | __builtin_amdgcn_frexp_mantf | ||
| 617 | .param_str = "ff" | ||
| 618 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 619 | .attributes = .{ .@"const" = true } | ||
| 620 | |||
| 621 | __builtin_amdgcn_grid_size_x | ||
| 622 | .param_str = "Ui" | ||
| 623 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 624 | .attributes = .{ .@"const" = true } | ||
| 625 | |||
| 626 | __builtin_amdgcn_grid_size_y | ||
| 627 | .param_str = "Ui" | ||
| 628 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 629 | .attributes = .{ .@"const" = true } | ||
| 630 | |||
| 631 | __builtin_amdgcn_grid_size_z | ||
| 632 | .param_str = "Ui" | ||
| 633 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 634 | .attributes = .{ .@"const" = true } | ||
| 635 | |||
| 636 | __builtin_amdgcn_groupstaticsize | ||
| 637 | .param_str = "Ui" | ||
| 638 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 639 | |||
| 640 | __builtin_amdgcn_iglp_opt | ||
| 641 | .param_str = "vIi" | ||
| 642 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 643 | |||
| 644 | __builtin_amdgcn_implicitarg_ptr | ||
| 645 | .param_str = "v*4" | ||
| 646 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 647 | .attributes = .{ .@"const" = true } | ||
| 648 | |||
| 649 | __builtin_amdgcn_interp_mov | ||
| 650 | .param_str = "fUiUiUiUi" | ||
| 651 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 652 | .attributes = .{ .@"const" = true } | ||
| 653 | |||
| 654 | __builtin_amdgcn_interp_p1 | ||
| 655 | .param_str = "ffUiUiUi" | ||
| 656 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 657 | .attributes = .{ .@"const" = true } | ||
| 658 | |||
| 659 | __builtin_amdgcn_interp_p1_f16 | ||
| 660 | .param_str = "ffUiUibUi" | ||
| 661 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 662 | .attributes = .{ .@"const" = true } | ||
| 663 | |||
| 664 | __builtin_amdgcn_interp_p2 | ||
| 665 | .param_str = "fffUiUiUi" | ||
| 666 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 667 | .attributes = .{ .@"const" = true } | ||
| 668 | |||
| 669 | __builtin_amdgcn_interp_p2_f16 | ||
| 670 | .param_str = "hffUiUibUi" | ||
| 671 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 672 | .attributes = .{ .@"const" = true } | ||
| 673 | |||
| 674 | __builtin_amdgcn_is_private | ||
| 675 | .param_str = "bvC*0" | ||
| 676 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 677 | .attributes = .{ .@"const" = true } | ||
| 678 | |||
| 679 | __builtin_amdgcn_is_shared | ||
| 680 | .param_str = "bvC*0" | ||
| 681 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 682 | .attributes = .{ .@"const" = true } | ||
| 683 | |||
| 684 | __builtin_amdgcn_kernarg_segment_ptr | ||
| 685 | .param_str = "v*4" | ||
| 686 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 687 | .attributes = .{ .@"const" = true } | ||
| 688 | |||
| 689 | __builtin_amdgcn_ldexp | ||
| 690 | .param_str = "ddi" | ||
| 691 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 692 | .attributes = .{ .@"const" = true } | ||
| 693 | |||
| 694 | __builtin_amdgcn_ldexpf | ||
| 695 | .param_str = "ffi" | ||
| 696 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 697 | .attributes = .{ .@"const" = true } | ||
| 698 | |||
| 699 | __builtin_amdgcn_lerp | ||
| 700 | .param_str = "UiUiUiUi" | ||
| 701 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 702 | .attributes = .{ .@"const" = true } | ||
| 703 | |||
| 704 | __builtin_amdgcn_log_clampf | ||
| 705 | .param_str = "ff" | ||
| 706 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 707 | .attributes = .{ .@"const" = true } | ||
| 708 | |||
| 709 | __builtin_amdgcn_logf | ||
| 710 | .param_str = "ff" | ||
| 711 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 712 | .attributes = .{ .@"const" = true } | ||
| 713 | |||
| 714 | __builtin_amdgcn_mbcnt_hi | ||
| 715 | .param_str = "UiUiUi" | ||
| 716 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 717 | .attributes = .{ .@"const" = true } | ||
| 718 | |||
| 719 | __builtin_amdgcn_mbcnt_lo | ||
| 720 | .param_str = "UiUiUi" | ||
| 721 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 722 | .attributes = .{ .@"const" = true } | ||
| 723 | |||
| 724 | __builtin_amdgcn_mqsad_pk_u16_u8 | ||
| 725 | .param_str = "WUiWUiUiWUi" | ||
| 726 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 727 | .attributes = .{ .@"const" = true } | ||
| 728 | |||
| 729 | __builtin_amdgcn_mqsad_u32_u8 | ||
| 730 | .param_str = "V4UiWUiUiV4Ui" | ||
| 731 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 732 | .attributes = .{ .@"const" = true } | ||
| 733 | |||
| 734 | __builtin_amdgcn_msad_u8 | ||
| 735 | .param_str = "UiUiUiUi" | ||
| 736 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 737 | .attributes = .{ .@"const" = true } | ||
| 738 | |||
| 739 | __builtin_amdgcn_qsad_pk_u16_u8 | ||
| 740 | .param_str = "WUiWUiUiWUi" | ||
| 741 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 742 | .attributes = .{ .@"const" = true } | ||
| 743 | |||
| 744 | __builtin_amdgcn_queue_ptr | ||
| 745 | .param_str = "v*4" | ||
| 746 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 747 | .attributes = .{ .@"const" = true } | ||
| 748 | |||
| 749 | __builtin_amdgcn_rcp | ||
| 750 | .param_str = "dd" | ||
| 751 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 752 | .attributes = .{ .@"const" = true } | ||
| 753 | |||
| 754 | __builtin_amdgcn_rcpf | ||
| 755 | .param_str = "ff" | ||
| 756 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 757 | .attributes = .{ .@"const" = true } | ||
| 758 | |||
| 759 | __builtin_amdgcn_read_exec | ||
| 760 | .param_str = "WUi" | ||
| 761 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 762 | .attributes = .{ .@"const" = true } | ||
| 763 | |||
| 764 | __builtin_amdgcn_read_exec_hi | ||
| 765 | .param_str = "Ui" | ||
| 766 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 767 | .attributes = .{ .@"const" = true } | ||
| 768 | |||
| 769 | __builtin_amdgcn_read_exec_lo | ||
| 770 | .param_str = "Ui" | ||
| 771 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 772 | .attributes = .{ .@"const" = true } | ||
| 773 | |||
| 774 | __builtin_amdgcn_readfirstlane | ||
| 775 | .param_str = "ii" | ||
| 776 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 777 | .attributes = .{ .@"const" = true } | ||
| 778 | |||
| 779 | __builtin_amdgcn_readlane | ||
| 780 | .param_str = "iii" | ||
| 781 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 782 | .attributes = .{ .@"const" = true } | ||
| 783 | |||
| 784 | __builtin_amdgcn_rsq | ||
| 785 | .param_str = "dd" | ||
| 786 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 787 | .attributes = .{ .@"const" = true } | ||
| 788 | |||
| 789 | __builtin_amdgcn_rsq_clamp | ||
| 790 | .param_str = "dd" | ||
| 791 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 792 | .attributes = .{ .@"const" = true } | ||
| 793 | |||
| 794 | __builtin_amdgcn_rsq_clampf | ||
| 795 | .param_str = "ff" | ||
| 796 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 797 | .attributes = .{ .@"const" = true } | ||
| 798 | |||
| 799 | __builtin_amdgcn_rsqf | ||
| 800 | .param_str = "ff" | ||
| 801 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 802 | .attributes = .{ .@"const" = true } | ||
| 803 | |||
| 804 | __builtin_amdgcn_s_barrier | ||
| 805 | .param_str = "v" | ||
| 806 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 807 | |||
| 808 | __builtin_amdgcn_s_dcache_inv | ||
| 809 | .param_str = "v" | ||
| 810 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 811 | |||
| 812 | __builtin_amdgcn_s_decperflevel | ||
| 813 | .param_str = "vIi" | ||
| 814 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 815 | |||
| 816 | __builtin_amdgcn_s_getpc | ||
| 817 | .param_str = "WUi" | ||
| 818 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 819 | |||
| 820 | __builtin_amdgcn_s_getreg | ||
| 821 | .param_str = "UiIi" | ||
| 822 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 823 | |||
| 824 | __builtin_amdgcn_s_incperflevel | ||
| 825 | .param_str = "vIi" | ||
| 826 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 827 | |||
| 828 | __builtin_amdgcn_s_sendmsg | ||
| 829 | .param_str = "vIiUi" | ||
| 830 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 831 | |||
| 832 | __builtin_amdgcn_s_sendmsghalt | ||
| 833 | .param_str = "vIiUi" | ||
| 834 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 835 | |||
| 836 | __builtin_amdgcn_s_setprio | ||
| 837 | .param_str = "vIs" | ||
| 838 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 839 | |||
| 840 | __builtin_amdgcn_s_setreg | ||
| 841 | .param_str = "vIiUi" | ||
| 842 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 843 | |||
| 844 | __builtin_amdgcn_s_sleep | ||
| 845 | .param_str = "vIi" | ||
| 846 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 847 | |||
| 848 | __builtin_amdgcn_s_waitcnt | ||
| 849 | .param_str = "vIi" | ||
| 850 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 851 | |||
| 852 | __builtin_amdgcn_sad_hi_u8 | ||
| 853 | .param_str = "UiUiUiUi" | ||
| 854 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 855 | .attributes = .{ .@"const" = true } | ||
| 856 | |||
| 857 | __builtin_amdgcn_sad_u16 | ||
| 858 | .param_str = "UiUiUiUi" | ||
| 859 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 860 | .attributes = .{ .@"const" = true } | ||
| 861 | |||
| 862 | __builtin_amdgcn_sad_u8 | ||
| 863 | .param_str = "UiUiUiUi" | ||
| 864 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 865 | .attributes = .{ .@"const" = true } | ||
| 866 | |||
| 867 | __builtin_amdgcn_sbfe | ||
| 868 | .param_str = "UiUiUiUi" | ||
| 869 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 870 | .attributes = .{ .@"const" = true } | ||
| 871 | |||
| 872 | __builtin_amdgcn_sched_barrier | ||
| 873 | .param_str = "vIi" | ||
| 874 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 875 | |||
| 876 | __builtin_amdgcn_sched_group_barrier | ||
| 877 | .param_str = "vIiIiIi" | ||
| 878 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 879 | |||
| 880 | __builtin_amdgcn_sicmp | ||
| 881 | .param_str = "WUiiiIi" | ||
| 882 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 883 | .attributes = .{ .@"const" = true } | ||
| 884 | |||
| 885 | __builtin_amdgcn_sicmpl | ||
| 886 | .param_str = "WUiWiWiIi" | ||
| 887 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 888 | .attributes = .{ .@"const" = true } | ||
| 889 | |||
| 890 | __builtin_amdgcn_sinf | ||
| 891 | .param_str = "ff" | ||
| 892 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 893 | .attributes = .{ .@"const" = true } | ||
| 894 | |||
| 895 | __builtin_amdgcn_sqrt | ||
| 896 | .param_str = "dd" | ||
| 897 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 898 | .attributes = .{ .@"const" = true } | ||
| 899 | |||
| 900 | __builtin_amdgcn_sqrtf | ||
| 901 | .param_str = "ff" | ||
| 902 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 903 | .attributes = .{ .@"const" = true } | ||
| 904 | |||
| 905 | __builtin_amdgcn_trig_preop | ||
| 906 | .param_str = "ddi" | ||
| 907 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 908 | .attributes = .{ .@"const" = true } | ||
| 909 | |||
| 910 | __builtin_amdgcn_trig_preopf | ||
| 911 | .param_str = "ffi" | ||
| 912 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 913 | .attributes = .{ .@"const" = true } | ||
| 914 | |||
| 915 | __builtin_amdgcn_ubfe | ||
| 916 | .param_str = "UiUiUiUi" | ||
| 917 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 918 | .attributes = .{ .@"const" = true } | ||
| 919 | |||
| 920 | __builtin_amdgcn_uicmp | ||
| 921 | .param_str = "WUiUiUiIi" | ||
| 922 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 923 | .attributes = .{ .@"const" = true } | ||
| 924 | |||
| 925 | __builtin_amdgcn_uicmpl | ||
| 926 | .param_str = "WUiWUiWUiIi" | ||
| 927 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 928 | .attributes = .{ .@"const" = true } | ||
| 929 | |||
| 930 | __builtin_amdgcn_wave_barrier | ||
| 931 | .param_str = "v" | ||
| 932 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 933 | |||
| 934 | __builtin_amdgcn_workgroup_id_x | ||
| 935 | .param_str = "Ui" | ||
| 936 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 937 | .attributes = .{ .@"const" = true } | ||
| 938 | |||
| 939 | __builtin_amdgcn_workgroup_id_y | ||
| 940 | .param_str = "Ui" | ||
| 941 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 942 | .attributes = .{ .@"const" = true } | ||
| 943 | |||
| 944 | __builtin_amdgcn_workgroup_id_z | ||
| 945 | .param_str = "Ui" | ||
| 946 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 947 | .attributes = .{ .@"const" = true } | ||
| 948 | |||
| 949 | __builtin_amdgcn_workgroup_size_x | ||
| 950 | .param_str = "Us" | ||
| 951 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 952 | .attributes = .{ .@"const" = true } | ||
| 953 | |||
| 954 | __builtin_amdgcn_workgroup_size_y | ||
| 955 | .param_str = "Us" | ||
| 956 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 957 | .attributes = .{ .@"const" = true } | ||
| 958 | |||
| 959 | __builtin_amdgcn_workgroup_size_z | ||
| 960 | .param_str = "Us" | ||
| 961 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 962 | .attributes = .{ .@"const" = true } | ||
| 963 | |||
| 964 | __builtin_amdgcn_workitem_id_x | ||
| 965 | .param_str = "Ui" | ||
| 966 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 967 | .attributes = .{ .@"const" = true } | ||
| 968 | |||
| 969 | __builtin_amdgcn_workitem_id_y | ||
| 970 | .param_str = "Ui" | ||
| 971 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 972 | .attributes = .{ .@"const" = true } | ||
| 973 | |||
| 974 | __builtin_amdgcn_workitem_id_z | ||
| 975 | .param_str = "Ui" | ||
| 976 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 977 | .attributes = .{ .@"const" = true } | ||
| 978 | |||
| 979 | __builtin_annotation | ||
| 980 | .param_str = "v." | ||
| 981 | .attributes = .{ .custom_typecheck = true } | ||
| 982 | |||
| 983 | __builtin_arm_cdp | ||
| 984 | .param_str = "vUIiUIiUIiUIiUIiUIi" | ||
| 985 | .target_set = TargetSet.initOne(.arm) | ||
| 986 | |||
| 987 | __builtin_arm_cdp2 | ||
| 988 | .param_str = "vUIiUIiUIiUIiUIiUIi" | ||
| 989 | .target_set = TargetSet.initOne(.arm) | ||
| 990 | |||
| 991 | __builtin_arm_clrex | ||
| 992 | .param_str = "v" | ||
| 993 | .target_set = TargetSet.initMany(&.{ .aarch64, .arm }) | ||
| 994 | |||
| 995 | __builtin_arm_cls | ||
| 996 | .param_str = "UiZUi" | ||
| 997 | .target_set = TargetSet.initMany(&.{ .aarch64, .arm }) | ||
| 998 | .attributes = .{ .@"const" = true } | ||
| 999 | |||
| 1000 | __builtin_arm_cls64 | ||
| 1001 | .param_str = "UiWUi" | ||
| 1002 | .target_set = TargetSet.initMany(&.{ .aarch64, .arm }) | ||
| 1003 | .attributes = .{ .@"const" = true } | ||
| 1004 | |||
| 1005 | __builtin_arm_clz | ||
| 1006 | .param_str = "UiZUi" | ||
| 1007 | .target_set = TargetSet.initMany(&.{ .aarch64, .arm }) | ||
| 1008 | .attributes = .{ .@"const" = true } | ||
| 1009 | |||
| 1010 | __builtin_arm_clz64 | ||
| 1011 | .param_str = "UiWUi" | ||
| 1012 | .target_set = TargetSet.initMany(&.{ .aarch64, .arm }) | ||
| 1013 | .attributes = .{ .@"const" = true } | ||
| 1014 | |||
| 1015 | __builtin_arm_cmse_TT | ||
| 1016 | .param_str = "Uiv*" | ||
| 1017 | .target_set = TargetSet.initOne(.arm) | ||
| 1018 | |||
| 1019 | __builtin_arm_cmse_TTA | ||
| 1020 | .param_str = "Uiv*" | ||
| 1021 | .target_set = TargetSet.initOne(.arm) | ||
| 1022 | |||
| 1023 | __builtin_arm_cmse_TTAT | ||
| 1024 | .param_str = "Uiv*" | ||
| 1025 | .target_set = TargetSet.initOne(.arm) | ||
| 1026 | |||
| 1027 | __builtin_arm_cmse_TTT | ||
| 1028 | .param_str = "Uiv*" | ||
| 1029 | .target_set = TargetSet.initOne(.arm) | ||
| 1030 | |||
| 1031 | __builtin_arm_dbg | ||
| 1032 | .param_str = "vUi" | ||
| 1033 | .target_set = TargetSet.initOne(.arm) | ||
| 1034 | |||
| 1035 | __builtin_arm_dmb | ||
| 1036 | .param_str = "vUi" | ||
| 1037 | .target_set = TargetSet.initMany(&.{ .aarch64, .arm }) | ||
| 1038 | .attributes = .{ .@"const" = true } | ||
| 1039 | |||
| 1040 | __builtin_arm_dsb | ||
| 1041 | .param_str = "vUi" | ||
| 1042 | .target_set = TargetSet.initMany(&.{ .aarch64, .arm }) | ||
| 1043 | .attributes = .{ .@"const" = true } | ||
| 1044 | |||
| 1045 | __builtin_arm_get_fpscr | ||
| 1046 | .param_str = "Ui" | ||
| 1047 | .target_set = TargetSet.initOne(.arm) | ||
| 1048 | .attributes = .{ .@"const" = true } | ||
| 1049 | |||
| 1050 | __builtin_arm_isb | ||
| 1051 | .param_str = "vUi" | ||
| 1052 | .target_set = TargetSet.initMany(&.{ .aarch64, .arm }) | ||
| 1053 | .attributes = .{ .@"const" = true } | ||
| 1054 | |||
| 1055 | __builtin_arm_ldaex | ||
| 1056 | .param_str = "v." | ||
| 1057 | .target_set = TargetSet.initMany(&.{ .aarch64, .arm }) | ||
| 1058 | .attributes = .{ .custom_typecheck = true } | ||
| 1059 | |||
| 1060 | __builtin_arm_ldc | ||
| 1061 | .param_str = "vUIiUIivC*" | ||
| 1062 | .target_set = TargetSet.initOne(.arm) | ||
| 1063 | |||
| 1064 | __builtin_arm_ldc2 | ||
| 1065 | .param_str = "vUIiUIivC*" | ||
| 1066 | .target_set = TargetSet.initOne(.arm) | ||
| 1067 | |||
| 1068 | __builtin_arm_ldc2l | ||
| 1069 | .param_str = "vUIiUIivC*" | ||
| 1070 | .target_set = TargetSet.initOne(.arm) | ||
| 1071 | |||
| 1072 | __builtin_arm_ldcl | ||
| 1073 | .param_str = "vUIiUIivC*" | ||
| 1074 | .target_set = TargetSet.initOne(.arm) | ||
| 1075 | |||
| 1076 | __builtin_arm_ldrex | ||
| 1077 | .param_str = "v." | ||
| 1078 | .target_set = TargetSet.initMany(&.{ .aarch64, .arm }) | ||
| 1079 | .attributes = .{ .custom_typecheck = true } | ||
| 1080 | |||
| 1081 | __builtin_arm_ldrexd | ||
| 1082 | .param_str = "LLUiv*" | ||
| 1083 | .target_set = TargetSet.initOne(.arm) | ||
| 1084 | |||
| 1085 | __builtin_arm_mcr | ||
| 1086 | .param_str = "vUIiUIiUiUIiUIiUIi" | ||
| 1087 | .target_set = TargetSet.initOne(.arm) | ||
| 1088 | |||
| 1089 | __builtin_arm_mcr2 | ||
| 1090 | .param_str = "vUIiUIiUiUIiUIiUIi" | ||
| 1091 | .target_set = TargetSet.initOne(.arm) | ||
| 1092 | |||
| 1093 | __builtin_arm_mcrr | ||
| 1094 | .param_str = "vUIiUIiLLUiUIi" | ||
| 1095 | .target_set = TargetSet.initOne(.arm) | ||
| 1096 | |||
| 1097 | __builtin_arm_mcrr2 | ||
| 1098 | .param_str = "vUIiUIiLLUiUIi" | ||
| 1099 | .target_set = TargetSet.initOne(.arm) | ||
| 1100 | |||
| 1101 | __builtin_arm_mrc | ||
| 1102 | .param_str = "UiUIiUIiUIiUIiUIi" | ||
| 1103 | .target_set = TargetSet.initOne(.arm) | ||
| 1104 | |||
| 1105 | __builtin_arm_mrc2 | ||
| 1106 | .param_str = "UiUIiUIiUIiUIiUIi" | ||
| 1107 | .target_set = TargetSet.initOne(.arm) | ||
| 1108 | |||
| 1109 | __builtin_arm_mrrc | ||
| 1110 | .param_str = "LLUiUIiUIiUIi" | ||
| 1111 | .target_set = TargetSet.initOne(.arm) | ||
| 1112 | |||
| 1113 | __builtin_arm_mrrc2 | ||
| 1114 | .param_str = "LLUiUIiUIiUIi" | ||
| 1115 | .target_set = TargetSet.initOne(.arm) | ||
| 1116 | |||
| 1117 | __builtin_arm_nop | ||
| 1118 | .param_str = "v" | ||
| 1119 | .target_set = TargetSet.initMany(&.{ .aarch64, .arm }) | ||
| 1120 | |||
| 1121 | __builtin_arm_prefetch | ||
| 1122 | .param_str = "!" | ||
| 1123 | .target_set = TargetSet.initMany(&.{ .aarch64, .arm }) | ||
| 1124 | .attributes = .{ .@"const" = true } | ||
| 1125 | |||
| 1126 | __builtin_arm_qadd | ||
| 1127 | .param_str = "iii" | ||
| 1128 | .target_set = TargetSet.initOne(.arm) | ||
| 1129 | .attributes = .{ .@"const" = true } | ||
| 1130 | |||
| 1131 | __builtin_arm_qadd16 | ||
| 1132 | .param_str = "iii" | ||
| 1133 | .target_set = TargetSet.initOne(.arm) | ||
| 1134 | .attributes = .{ .@"const" = true } | ||
| 1135 | |||
| 1136 | __builtin_arm_qadd8 | ||
| 1137 | .param_str = "iii" | ||
| 1138 | .target_set = TargetSet.initOne(.arm) | ||
| 1139 | .attributes = .{ .@"const" = true } | ||
| 1140 | |||
| 1141 | __builtin_arm_qasx | ||
| 1142 | .param_str = "iii" | ||
| 1143 | .target_set = TargetSet.initOne(.arm) | ||
| 1144 | .attributes = .{ .@"const" = true } | ||
| 1145 | |||
| 1146 | __builtin_arm_qdbl | ||
| 1147 | .param_str = "ii" | ||
| 1148 | .target_set = TargetSet.initOne(.arm) | ||
| 1149 | .attributes = .{ .@"const" = true } | ||
| 1150 | |||
| 1151 | __builtin_arm_qsax | ||
| 1152 | .param_str = "iii" | ||
| 1153 | .target_set = TargetSet.initOne(.arm) | ||
| 1154 | .attributes = .{ .@"const" = true } | ||
| 1155 | |||
| 1156 | __builtin_arm_qsub | ||
| 1157 | .param_str = "iii" | ||
| 1158 | .target_set = TargetSet.initOne(.arm) | ||
| 1159 | .attributes = .{ .@"const" = true } | ||
| 1160 | |||
| 1161 | __builtin_arm_qsub16 | ||
| 1162 | .param_str = "iii" | ||
| 1163 | .target_set = TargetSet.initOne(.arm) | ||
| 1164 | .attributes = .{ .@"const" = true } | ||
| 1165 | |||
| 1166 | __builtin_arm_qsub8 | ||
| 1167 | .param_str = "iii" | ||
| 1168 | .target_set = TargetSet.initOne(.arm) | ||
| 1169 | .attributes = .{ .@"const" = true } | ||
| 1170 | |||
| 1171 | __builtin_arm_rbit | ||
| 1172 | .param_str = "UiUi" | ||
| 1173 | .target_set = TargetSet.initMany(&.{ .aarch64, .arm }) | ||
| 1174 | .attributes = .{ .@"const" = true } | ||
| 1175 | |||
| 1176 | __builtin_arm_rbit64 | ||
| 1177 | .param_str = "WUiWUi" | ||
| 1178 | .target_set = TargetSet.initOne(.aarch64) | ||
| 1179 | .attributes = .{ .@"const" = true } | ||
| 1180 | |||
| 1181 | __builtin_arm_rsr | ||
| 1182 | .param_str = "UicC*" | ||
| 1183 | .target_set = TargetSet.initMany(&.{ .aarch64, .arm }) | ||
| 1184 | .attributes = .{ .@"const" = true } | ||
| 1185 | |||
| 1186 | __builtin_arm_rsr64 | ||
| 1187 | .param_str = "!" | ||
| 1188 | .target_set = TargetSet.initMany(&.{ .aarch64, .arm }) | ||
| 1189 | .attributes = .{ .@"const" = true } | ||
| 1190 | |||
| 1191 | __builtin_arm_rsrp | ||
| 1192 | .param_str = "v*cC*" | ||
| 1193 | .target_set = TargetSet.initMany(&.{ .aarch64, .arm }) | ||
| 1194 | .attributes = .{ .@"const" = true } | ||
| 1195 | |||
| 1196 | __builtin_arm_sadd16 | ||
| 1197 | .param_str = "iii" | ||
| 1198 | .target_set = TargetSet.initOne(.arm) | ||
| 1199 | .attributes = .{ .@"const" = true } | ||
| 1200 | |||
| 1201 | __builtin_arm_sadd8 | ||
| 1202 | .param_str = "iii" | ||
| 1203 | .target_set = TargetSet.initOne(.arm) | ||
| 1204 | .attributes = .{ .@"const" = true } | ||
| 1205 | |||
| 1206 | __builtin_arm_sasx | ||
| 1207 | .param_str = "iii" | ||
| 1208 | .target_set = TargetSet.initOne(.arm) | ||
| 1209 | .attributes = .{ .@"const" = true } | ||
| 1210 | |||
| 1211 | __builtin_arm_sel | ||
| 1212 | .param_str = "iii" | ||
| 1213 | .target_set = TargetSet.initOne(.arm) | ||
| 1214 | .attributes = .{ .@"const" = true } | ||
| 1215 | |||
| 1216 | __builtin_arm_set_fpscr | ||
| 1217 | .param_str = "vUi" | ||
| 1218 | .target_set = TargetSet.initOne(.arm) | ||
| 1219 | .attributes = .{ .@"const" = true } | ||
| 1220 | |||
| 1221 | __builtin_arm_sev | ||
| 1222 | .param_str = "v" | ||
| 1223 | .target_set = TargetSet.initMany(&.{ .aarch64, .arm }) | ||
| 1224 | |||
| 1225 | __builtin_arm_sevl | ||
| 1226 | .param_str = "v" | ||
| 1227 | .target_set = TargetSet.initMany(&.{ .aarch64, .arm }) | ||
| 1228 | |||
| 1229 | __builtin_arm_shadd16 | ||
| 1230 | .param_str = "iii" | ||
| 1231 | .target_set = TargetSet.initOne(.arm) | ||
| 1232 | .attributes = .{ .@"const" = true } | ||
| 1233 | |||
| 1234 | __builtin_arm_shadd8 | ||
| 1235 | .param_str = "iii" | ||
| 1236 | .target_set = TargetSet.initOne(.arm) | ||
| 1237 | .attributes = .{ .@"const" = true } | ||
| 1238 | |||
| 1239 | __builtin_arm_shasx | ||
| 1240 | .param_str = "iii" | ||
| 1241 | .target_set = TargetSet.initOne(.arm) | ||
| 1242 | .attributes = .{ .@"const" = true } | ||
| 1243 | |||
| 1244 | __builtin_arm_shsax | ||
| 1245 | .param_str = "iii" | ||
| 1246 | .target_set = TargetSet.initOne(.arm) | ||
| 1247 | .attributes = .{ .@"const" = true } | ||
| 1248 | |||
| 1249 | __builtin_arm_shsub16 | ||
| 1250 | .param_str = "iii" | ||
| 1251 | .target_set = TargetSet.initOne(.arm) | ||
| 1252 | .attributes = .{ .@"const" = true } | ||
| 1253 | |||
| 1254 | __builtin_arm_shsub8 | ||
| 1255 | .param_str = "iii" | ||
| 1256 | .target_set = TargetSet.initOne(.arm) | ||
| 1257 | .attributes = .{ .@"const" = true } | ||
| 1258 | |||
| 1259 | __builtin_arm_smlabb | ||
| 1260 | .param_str = "iiii" | ||
| 1261 | .target_set = TargetSet.initOne(.arm) | ||
| 1262 | .attributes = .{ .@"const" = true } | ||
| 1263 | |||
| 1264 | __builtin_arm_smlabt | ||
| 1265 | .param_str = "iiii" | ||
| 1266 | .target_set = TargetSet.initOne(.arm) | ||
| 1267 | .attributes = .{ .@"const" = true } | ||
| 1268 | |||
| 1269 | __builtin_arm_smlad | ||
| 1270 | .param_str = "iiii" | ||
| 1271 | .target_set = TargetSet.initOne(.arm) | ||
| 1272 | .attributes = .{ .@"const" = true } | ||
| 1273 | |||
| 1274 | __builtin_arm_smladx | ||
| 1275 | .param_str = "iiii" | ||
| 1276 | .target_set = TargetSet.initOne(.arm) | ||
| 1277 | .attributes = .{ .@"const" = true } | ||
| 1278 | |||
| 1279 | __builtin_arm_smlald | ||
| 1280 | .param_str = "LLiiiLLi" | ||
| 1281 | .target_set = TargetSet.initOne(.arm) | ||
| 1282 | .attributes = .{ .@"const" = true } | ||
| 1283 | |||
| 1284 | __builtin_arm_smlaldx | ||
| 1285 | .param_str = "LLiiiLLi" | ||
| 1286 | .target_set = TargetSet.initOne(.arm) | ||
| 1287 | .attributes = .{ .@"const" = true } | ||
| 1288 | |||
| 1289 | __builtin_arm_smlatb | ||
| 1290 | .param_str = "iiii" | ||
| 1291 | .target_set = TargetSet.initOne(.arm) | ||
| 1292 | .attributes = .{ .@"const" = true } | ||
| 1293 | |||
| 1294 | __builtin_arm_smlatt | ||
| 1295 | .param_str = "iiii" | ||
| 1296 | .target_set = TargetSet.initOne(.arm) | ||
| 1297 | .attributes = .{ .@"const" = true } | ||
| 1298 | |||
| 1299 | __builtin_arm_smlawb | ||
| 1300 | .param_str = "iiii" | ||
| 1301 | .target_set = TargetSet.initOne(.arm) | ||
| 1302 | .attributes = .{ .@"const" = true } | ||
| 1303 | |||
| 1304 | __builtin_arm_smlawt | ||
| 1305 | .param_str = "iiii" | ||
| 1306 | .target_set = TargetSet.initOne(.arm) | ||
| 1307 | .attributes = .{ .@"const" = true } | ||
| 1308 | |||
| 1309 | __builtin_arm_smlsd | ||
| 1310 | .param_str = "iiii" | ||
| 1311 | .target_set = TargetSet.initOne(.arm) | ||
| 1312 | .attributes = .{ .@"const" = true } | ||
| 1313 | |||
| 1314 | __builtin_arm_smlsdx | ||
| 1315 | .param_str = "iiii" | ||
| 1316 | .target_set = TargetSet.initOne(.arm) | ||
| 1317 | .attributes = .{ .@"const" = true } | ||
| 1318 | |||
| 1319 | __builtin_arm_smlsld | ||
| 1320 | .param_str = "LLiiiLLi" | ||
| 1321 | .target_set = TargetSet.initOne(.arm) | ||
| 1322 | .attributes = .{ .@"const" = true } | ||
| 1323 | |||
| 1324 | __builtin_arm_smlsldx | ||
| 1325 | .param_str = "LLiiiLLi" | ||
| 1326 | .target_set = TargetSet.initOne(.arm) | ||
| 1327 | .attributes = .{ .@"const" = true } | ||
| 1328 | |||
| 1329 | __builtin_arm_smuad | ||
| 1330 | .param_str = "iii" | ||
| 1331 | .target_set = TargetSet.initOne(.arm) | ||
| 1332 | .attributes = .{ .@"const" = true } | ||
| 1333 | |||
| 1334 | __builtin_arm_smuadx | ||
| 1335 | .param_str = "iii" | ||
| 1336 | .target_set = TargetSet.initOne(.arm) | ||
| 1337 | .attributes = .{ .@"const" = true } | ||
| 1338 | |||
| 1339 | __builtin_arm_smulbb | ||
| 1340 | .param_str = "iii" | ||
| 1341 | .target_set = TargetSet.initOne(.arm) | ||
| 1342 | .attributes = .{ .@"const" = true } | ||
| 1343 | |||
| 1344 | __builtin_arm_smulbt | ||
| 1345 | .param_str = "iii" | ||
| 1346 | .target_set = TargetSet.initOne(.arm) | ||
| 1347 | .attributes = .{ .@"const" = true } | ||
| 1348 | |||
| 1349 | __builtin_arm_smultb | ||
| 1350 | .param_str = "iii" | ||
| 1351 | .target_set = TargetSet.initOne(.arm) | ||
| 1352 | .attributes = .{ .@"const" = true } | ||
| 1353 | |||
| 1354 | __builtin_arm_smultt | ||
| 1355 | .param_str = "iii" | ||
| 1356 | .target_set = TargetSet.initOne(.arm) | ||
| 1357 | .attributes = .{ .@"const" = true } | ||
| 1358 | |||
| 1359 | __builtin_arm_smulwb | ||
| 1360 | .param_str = "iii" | ||
| 1361 | .target_set = TargetSet.initOne(.arm) | ||
| 1362 | .attributes = .{ .@"const" = true } | ||
| 1363 | |||
| 1364 | __builtin_arm_smulwt | ||
| 1365 | .param_str = "iii" | ||
| 1366 | .target_set = TargetSet.initOne(.arm) | ||
| 1367 | .attributes = .{ .@"const" = true } | ||
| 1368 | |||
| 1369 | __builtin_arm_smusd | ||
| 1370 | .param_str = "iii" | ||
| 1371 | .target_set = TargetSet.initOne(.arm) | ||
| 1372 | .attributes = .{ .@"const" = true } | ||
| 1373 | |||
| 1374 | __builtin_arm_smusdx | ||
| 1375 | .param_str = "iii" | ||
| 1376 | .target_set = TargetSet.initOne(.arm) | ||
| 1377 | .attributes = .{ .@"const" = true } | ||
| 1378 | |||
| 1379 | __builtin_arm_ssat | ||
| 1380 | .param_str = "iiUi" | ||
| 1381 | .target_set = TargetSet.initOne(.arm) | ||
| 1382 | .attributes = .{ .@"const" = true } | ||
| 1383 | |||
| 1384 | __builtin_arm_ssat16 | ||
| 1385 | .param_str = "iii" | ||
| 1386 | .target_set = TargetSet.initOne(.arm) | ||
| 1387 | .attributes = .{ .@"const" = true } | ||
| 1388 | |||
| 1389 | __builtin_arm_ssax | ||
| 1390 | .param_str = "iii" | ||
| 1391 | .target_set = TargetSet.initOne(.arm) | ||
| 1392 | .attributes = .{ .@"const" = true } | ||
| 1393 | |||
| 1394 | __builtin_arm_ssub16 | ||
| 1395 | .param_str = "iii" | ||
| 1396 | .target_set = TargetSet.initOne(.arm) | ||
| 1397 | .attributes = .{ .@"const" = true } | ||
| 1398 | |||
| 1399 | __builtin_arm_ssub8 | ||
| 1400 | .param_str = "iii" | ||
| 1401 | .target_set = TargetSet.initOne(.arm) | ||
| 1402 | .attributes = .{ .@"const" = true } | ||
| 1403 | |||
| 1404 | __builtin_arm_stc | ||
| 1405 | .param_str = "vUIiUIiv*" | ||
| 1406 | .target_set = TargetSet.initOne(.arm) | ||
| 1407 | |||
| 1408 | __builtin_arm_stc2 | ||
| 1409 | .param_str = "vUIiUIiv*" | ||
| 1410 | .target_set = TargetSet.initOne(.arm) | ||
| 1411 | |||
| 1412 | __builtin_arm_stc2l | ||
| 1413 | .param_str = "vUIiUIiv*" | ||
| 1414 | .target_set = TargetSet.initOne(.arm) | ||
| 1415 | |||
| 1416 | __builtin_arm_stcl | ||
| 1417 | .param_str = "vUIiUIiv*" | ||
| 1418 | .target_set = TargetSet.initOne(.arm) | ||
| 1419 | |||
| 1420 | __builtin_arm_stlex | ||
| 1421 | .param_str = "i." | ||
| 1422 | .target_set = TargetSet.initMany(&.{ .aarch64, .arm }) | ||
| 1423 | .attributes = .{ .custom_typecheck = true } | ||
| 1424 | |||
| 1425 | __builtin_arm_strex | ||
| 1426 | .param_str = "i." | ||
| 1427 | .target_set = TargetSet.initMany(&.{ .aarch64, .arm }) | ||
| 1428 | .attributes = .{ .custom_typecheck = true } | ||
| 1429 | |||
| 1430 | __builtin_arm_strexd | ||
| 1431 | .param_str = "iLLUiv*" | ||
| 1432 | .target_set = TargetSet.initOne(.arm) | ||
| 1433 | |||
| 1434 | __builtin_arm_sxtab16 | ||
| 1435 | .param_str = "iii" | ||
| 1436 | .target_set = TargetSet.initOne(.arm) | ||
| 1437 | .attributes = .{ .@"const" = true } | ||
| 1438 | |||
| 1439 | __builtin_arm_sxtb16 | ||
| 1440 | .param_str = "ii" | ||
| 1441 | .target_set = TargetSet.initOne(.arm) | ||
| 1442 | .attributes = .{ .@"const" = true } | ||
| 1443 | |||
| 1444 | __builtin_arm_tcancel | ||
| 1445 | .param_str = "vWUIi" | ||
| 1446 | .target_set = TargetSet.initOne(.aarch64) | ||
| 1447 | |||
| 1448 | __builtin_arm_tcommit | ||
| 1449 | .param_str = "v" | ||
| 1450 | .target_set = TargetSet.initOne(.aarch64) | ||
| 1451 | |||
| 1452 | __builtin_arm_tstart | ||
| 1453 | .param_str = "WUi" | ||
| 1454 | .target_set = TargetSet.initOne(.aarch64) | ||
| 1455 | .attributes = .{ .returns_twice = true } | ||
| 1456 | |||
| 1457 | __builtin_arm_ttest | ||
| 1458 | .param_str = "WUi" | ||
| 1459 | .target_set = TargetSet.initOne(.aarch64) | ||
| 1460 | .attributes = .{ .@"const" = true } | ||
| 1461 | |||
| 1462 | __builtin_arm_uadd16 | ||
| 1463 | .param_str = "UiUiUi" | ||
| 1464 | .target_set = TargetSet.initOne(.arm) | ||
| 1465 | .attributes = .{ .@"const" = true } | ||
| 1466 | |||
| 1467 | __builtin_arm_uadd8 | ||
| 1468 | .param_str = "UiUiUi" | ||
| 1469 | .target_set = TargetSet.initOne(.arm) | ||
| 1470 | .attributes = .{ .@"const" = true } | ||
| 1471 | |||
| 1472 | __builtin_arm_uasx | ||
| 1473 | .param_str = "UiUiUi" | ||
| 1474 | .target_set = TargetSet.initOne(.arm) | ||
| 1475 | .attributes = .{ .@"const" = true } | ||
| 1476 | |||
| 1477 | __builtin_arm_uhadd16 | ||
| 1478 | .param_str = "UiUiUi" | ||
| 1479 | .target_set = TargetSet.initOne(.arm) | ||
| 1480 | .attributes = .{ .@"const" = true } | ||
| 1481 | |||
| 1482 | __builtin_arm_uhadd8 | ||
| 1483 | .param_str = "UiUiUi" | ||
| 1484 | .target_set = TargetSet.initOne(.arm) | ||
| 1485 | .attributes = .{ .@"const" = true } | ||
| 1486 | |||
| 1487 | __builtin_arm_uhasx | ||
| 1488 | .param_str = "UiUiUi" | ||
| 1489 | .target_set = TargetSet.initOne(.arm) | ||
| 1490 | .attributes = .{ .@"const" = true } | ||
| 1491 | |||
| 1492 | __builtin_arm_uhsax | ||
| 1493 | .param_str = "UiUiUi" | ||
| 1494 | .target_set = TargetSet.initOne(.arm) | ||
| 1495 | .attributes = .{ .@"const" = true } | ||
| 1496 | |||
| 1497 | __builtin_arm_uhsub16 | ||
| 1498 | .param_str = "UiUiUi" | ||
| 1499 | .target_set = TargetSet.initOne(.arm) | ||
| 1500 | .attributes = .{ .@"const" = true } | ||
| 1501 | |||
| 1502 | __builtin_arm_uhsub8 | ||
| 1503 | .param_str = "UiUiUi" | ||
| 1504 | .target_set = TargetSet.initOne(.arm) | ||
| 1505 | .attributes = .{ .@"const" = true } | ||
| 1506 | |||
| 1507 | __builtin_arm_uqadd16 | ||
| 1508 | .param_str = "UiUiUi" | ||
| 1509 | .target_set = TargetSet.initOne(.arm) | ||
| 1510 | .attributes = .{ .@"const" = true } | ||
| 1511 | |||
| 1512 | __builtin_arm_uqadd8 | ||
| 1513 | .param_str = "UiUiUi" | ||
| 1514 | .target_set = TargetSet.initOne(.arm) | ||
| 1515 | .attributes = .{ .@"const" = true } | ||
| 1516 | |||
| 1517 | __builtin_arm_uqasx | ||
| 1518 | .param_str = "UiUiUi" | ||
| 1519 | .target_set = TargetSet.initOne(.arm) | ||
| 1520 | .attributes = .{ .@"const" = true } | ||
| 1521 | |||
| 1522 | __builtin_arm_uqsax | ||
| 1523 | .param_str = "UiUiUi" | ||
| 1524 | .target_set = TargetSet.initOne(.arm) | ||
| 1525 | .attributes = .{ .@"const" = true } | ||
| 1526 | |||
| 1527 | __builtin_arm_uqsub16 | ||
| 1528 | .param_str = "UiUiUi" | ||
| 1529 | .target_set = TargetSet.initOne(.arm) | ||
| 1530 | .attributes = .{ .@"const" = true } | ||
| 1531 | |||
| 1532 | __builtin_arm_uqsub8 | ||
| 1533 | .param_str = "UiUiUi" | ||
| 1534 | .target_set = TargetSet.initOne(.arm) | ||
| 1535 | .attributes = .{ .@"const" = true } | ||
| 1536 | |||
| 1537 | __builtin_arm_usad8 | ||
| 1538 | .param_str = "UiUiUi" | ||
| 1539 | .target_set = TargetSet.initOne(.arm) | ||
| 1540 | .attributes = .{ .@"const" = true } | ||
| 1541 | |||
| 1542 | __builtin_arm_usada8 | ||
| 1543 | .param_str = "UiUiUiUi" | ||
| 1544 | .target_set = TargetSet.initOne(.arm) | ||
| 1545 | .attributes = .{ .@"const" = true } | ||
| 1546 | |||
| 1547 | __builtin_arm_usat | ||
| 1548 | .param_str = "UiiUi" | ||
| 1549 | .target_set = TargetSet.initOne(.arm) | ||
| 1550 | .attributes = .{ .@"const" = true } | ||
| 1551 | |||
| 1552 | __builtin_arm_usat16 | ||
| 1553 | .param_str = "iii" | ||
| 1554 | .target_set = TargetSet.initOne(.arm) | ||
| 1555 | .attributes = .{ .@"const" = true } | ||
| 1556 | |||
| 1557 | __builtin_arm_usax | ||
| 1558 | .param_str = "UiUiUi" | ||
| 1559 | .target_set = TargetSet.initOne(.arm) | ||
| 1560 | .attributes = .{ .@"const" = true } | ||
| 1561 | |||
| 1562 | __builtin_arm_usub16 | ||
| 1563 | .param_str = "UiUiUi" | ||
| 1564 | .target_set = TargetSet.initOne(.arm) | ||
| 1565 | .attributes = .{ .@"const" = true } | ||
| 1566 | |||
| 1567 | __builtin_arm_usub8 | ||
| 1568 | .param_str = "UiUiUi" | ||
| 1569 | .target_set = TargetSet.initOne(.arm) | ||
| 1570 | .attributes = .{ .@"const" = true } | ||
| 1571 | |||
| 1572 | __builtin_arm_uxtab16 | ||
| 1573 | .param_str = "iii" | ||
| 1574 | .target_set = TargetSet.initOne(.arm) | ||
| 1575 | .attributes = .{ .@"const" = true } | ||
| 1576 | |||
| 1577 | __builtin_arm_uxtb16 | ||
| 1578 | .param_str = "ii" | ||
| 1579 | .target_set = TargetSet.initOne(.arm) | ||
| 1580 | .attributes = .{ .@"const" = true } | ||
| 1581 | |||
| 1582 | __builtin_arm_vcvtr_d | ||
| 1583 | .param_str = "fdi" | ||
| 1584 | .target_set = TargetSet.initOne(.arm) | ||
| 1585 | .attributes = .{ .@"const" = true } | ||
| 1586 | |||
| 1587 | __builtin_arm_vcvtr_f | ||
| 1588 | .param_str = "ffi" | ||
| 1589 | .target_set = TargetSet.initOne(.arm) | ||
| 1590 | .attributes = .{ .@"const" = true } | ||
| 1591 | |||
| 1592 | __builtin_arm_wfe | ||
| 1593 | .param_str = "v" | ||
| 1594 | .target_set = TargetSet.initMany(&.{ .aarch64, .arm }) | ||
| 1595 | |||
| 1596 | __builtin_arm_wfi | ||
| 1597 | .param_str = "v" | ||
| 1598 | .target_set = TargetSet.initMany(&.{ .aarch64, .arm }) | ||
| 1599 | |||
| 1600 | __builtin_arm_wsr | ||
| 1601 | .param_str = "vcC*Ui" | ||
| 1602 | .target_set = TargetSet.initMany(&.{ .aarch64, .arm }) | ||
| 1603 | .attributes = .{ .@"const" = true } | ||
| 1604 | |||
| 1605 | __builtin_arm_wsr64 | ||
| 1606 | .param_str = "!" | ||
| 1607 | .target_set = TargetSet.initMany(&.{ .aarch64, .arm }) | ||
| 1608 | .attributes = .{ .@"const" = true } | ||
| 1609 | |||
| 1610 | __builtin_arm_wsrp | ||
| 1611 | .param_str = "vcC*vC*" | ||
| 1612 | .target_set = TargetSet.initMany(&.{ .aarch64, .arm }) | ||
| 1613 | .attributes = .{ .@"const" = true } | ||
| 1614 | |||
| 1615 | __builtin_arm_yield | ||
| 1616 | .param_str = "v" | ||
| 1617 | .target_set = TargetSet.initMany(&.{ .aarch64, .arm }) | ||
| 1618 | |||
| 1619 | __builtin_asin | ||
| 1620 | .param_str = "dd" | ||
| 1621 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 1622 | |||
| 1623 | __builtin_asinf | ||
| 1624 | .param_str = "ff" | ||
| 1625 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 1626 | |||
| 1627 | __builtin_asinf128 | ||
| 1628 | .param_str = "LLdLLd" | ||
| 1629 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 1630 | |||
| 1631 | __builtin_asinh | ||
| 1632 | .param_str = "dd" | ||
| 1633 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 1634 | |||
| 1635 | __builtin_asinhf | ||
| 1636 | .param_str = "ff" | ||
| 1637 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 1638 | |||
| 1639 | __builtin_asinhf128 | ||
| 1640 | .param_str = "LLdLLd" | ||
| 1641 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 1642 | |||
| 1643 | __builtin_asinhl | ||
| 1644 | .param_str = "LdLd" | ||
| 1645 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 1646 | |||
| 1647 | __builtin_asinl | ||
| 1648 | .param_str = "LdLd" | ||
| 1649 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 1650 | |||
| 1651 | __builtin_assume | ||
| 1652 | .param_str = "vb" | ||
| 1653 | .attributes = .{ .const_evaluable = true } | ||
| 1654 | |||
| 1655 | __builtin_assume_aligned | ||
| 1656 | .param_str = "v*vC*z." | ||
| 1657 | .attributes = .{ .@"const" = true, .custom_typecheck = true, .const_evaluable = true } | ||
| 1658 | |||
| 1659 | __builtin_assume_separate_storage | ||
| 1660 | .param_str = "vvCD*vCD*" | ||
| 1661 | .attributes = .{ .const_evaluable = true } | ||
| 1662 | |||
| 1663 | __builtin_atan | ||
| 1664 | .param_str = "dd" | ||
| 1665 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 1666 | |||
| 1667 | __builtin_atan2 | ||
| 1668 | .param_str = "ddd" | ||
| 1669 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 1670 | |||
| 1671 | __builtin_atan2f | ||
| 1672 | .param_str = "fff" | ||
| 1673 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 1674 | |||
| 1675 | __builtin_atan2f128 | ||
| 1676 | .param_str = "LLdLLdLLd" | ||
| 1677 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 1678 | |||
| 1679 | __builtin_atan2l | ||
| 1680 | .param_str = "LdLdLd" | ||
| 1681 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 1682 | |||
| 1683 | __builtin_atanf | ||
| 1684 | .param_str = "ff" | ||
| 1685 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 1686 | |||
| 1687 | __builtin_atanf128 | ||
| 1688 | .param_str = "LLdLLd" | ||
| 1689 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 1690 | |||
| 1691 | __builtin_atanh | ||
| 1692 | .param_str = "dd" | ||
| 1693 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 1694 | |||
| 1695 | __builtin_atanhf | ||
| 1696 | .param_str = "ff" | ||
| 1697 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 1698 | |||
| 1699 | __builtin_atanhf128 | ||
| 1700 | .param_str = "LLdLLd" | ||
| 1701 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 1702 | |||
| 1703 | __builtin_atanhl | ||
| 1704 | .param_str = "LdLd" | ||
| 1705 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 1706 | |||
| 1707 | __builtin_atanl | ||
| 1708 | .param_str = "LdLd" | ||
| 1709 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 1710 | |||
| 1711 | __builtin_bcmp | ||
| 1712 | .param_str = "ivC*vC*z" | ||
| 1713 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_evaluable = true } | ||
| 1714 | |||
| 1715 | __builtin_bcopy | ||
| 1716 | .param_str = "vvC*v*z" | ||
| 1717 | .attributes = .{ .lib_function_with_builtin_prefix = true } | ||
| 1718 | |||
| 1719 | __builtin_bitrev | ||
| 1720 | .param_str = "UiUi" | ||
| 1721 | .target_set = TargetSet.initOne(.xcore) | ||
| 1722 | .attributes = .{ .@"const" = true } | ||
| 1723 | |||
| 1724 | __builtin_bitreverse16 | ||
| 1725 | .param_str = "UsUs" | ||
| 1726 | .attributes = .{ .@"const" = true, .const_evaluable = true } | ||
| 1727 | |||
| 1728 | __builtin_bitreverse32 | ||
| 1729 | .param_str = "UZiUZi" | ||
| 1730 | .attributes = .{ .@"const" = true, .const_evaluable = true } | ||
| 1731 | |||
| 1732 | __builtin_bitreverse64 | ||
| 1733 | .param_str = "UWiUWi" | ||
| 1734 | .attributes = .{ .@"const" = true, .const_evaluable = true } | ||
| 1735 | |||
| 1736 | __builtin_bitreverse8 | ||
| 1737 | .param_str = "UcUc" | ||
| 1738 | .attributes = .{ .@"const" = true, .const_evaluable = true } | ||
| 1739 | |||
| 1740 | __builtin_bswap16 | ||
| 1741 | .param_str = "UsUs" | ||
| 1742 | .attributes = .{ .@"const" = true, .const_evaluable = true } | ||
| 1743 | |||
| 1744 | __builtin_bswap32 | ||
| 1745 | .param_str = "UZiUZi" | ||
| 1746 | .attributes = .{ .@"const" = true, .const_evaluable = true } | ||
| 1747 | |||
| 1748 | __builtin_bswap64 | ||
| 1749 | .param_str = "UWiUWi" | ||
| 1750 | .attributes = .{ .@"const" = true, .const_evaluable = true } | ||
| 1751 | |||
| 1752 | __builtin_bzero | ||
| 1753 | .param_str = "vv*z" | ||
| 1754 | .attributes = .{ .lib_function_with_builtin_prefix = true } | ||
| 1755 | |||
| 1756 | __builtin_cabs | ||
| 1757 | .param_str = "dXd" | ||
| 1758 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 1759 | |||
| 1760 | __builtin_cabsf | ||
| 1761 | .param_str = "fXf" | ||
| 1762 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 1763 | |||
| 1764 | __builtin_cabsl | ||
| 1765 | .param_str = "LdXLd" | ||
| 1766 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 1767 | |||
| 1768 | __builtin_cacos | ||
| 1769 | .param_str = "XdXd" | ||
| 1770 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 1771 | |||
| 1772 | __builtin_cacosf | ||
| 1773 | .param_str = "XfXf" | ||
| 1774 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 1775 | |||
| 1776 | __builtin_cacosh | ||
| 1777 | .param_str = "XdXd" | ||
| 1778 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 1779 | |||
| 1780 | __builtin_cacoshf | ||
| 1781 | .param_str = "XfXf" | ||
| 1782 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 1783 | |||
| 1784 | __builtin_cacoshl | ||
| 1785 | .param_str = "XLdXLd" | ||
| 1786 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 1787 | |||
| 1788 | __builtin_cacosl | ||
| 1789 | .param_str = "XLdXLd" | ||
| 1790 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 1791 | |||
| 1792 | __builtin_call_with_static_chain | ||
| 1793 | .param_str = "v." | ||
| 1794 | .attributes = .{ .custom_typecheck = true } | ||
| 1795 | |||
| 1796 | __builtin_calloc | ||
| 1797 | .param_str = "v*zz" | ||
| 1798 | .attributes = .{ .lib_function_with_builtin_prefix = true } | ||
| 1799 | |||
| 1800 | __builtin_canonicalize | ||
| 1801 | .param_str = "dd" | ||
| 1802 | .attributes = .{ .@"const" = true } | ||
| 1803 | |||
| 1804 | __builtin_canonicalizef | ||
| 1805 | .param_str = "ff" | ||
| 1806 | .attributes = .{ .@"const" = true } | ||
| 1807 | |||
| 1808 | __builtin_canonicalizef16 | ||
| 1809 | .param_str = "hh" | ||
| 1810 | .attributes = .{ .@"const" = true } | ||
| 1811 | |||
| 1812 | __builtin_canonicalizel | ||
| 1813 | .param_str = "LdLd" | ||
| 1814 | .attributes = .{ .@"const" = true } | ||
| 1815 | |||
| 1816 | __builtin_carg | ||
| 1817 | .param_str = "dXd" | ||
| 1818 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 1819 | |||
| 1820 | __builtin_cargf | ||
| 1821 | .param_str = "fXf" | ||
| 1822 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 1823 | |||
| 1824 | __builtin_cargl | ||
| 1825 | .param_str = "LdXLd" | ||
| 1826 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 1827 | |||
| 1828 | __builtin_casin | ||
| 1829 | .param_str = "XdXd" | ||
| 1830 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 1831 | |||
| 1832 | __builtin_casinf | ||
| 1833 | .param_str = "XfXf" | ||
| 1834 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 1835 | |||
| 1836 | __builtin_casinh | ||
| 1837 | .param_str = "XdXd" | ||
| 1838 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 1839 | |||
| 1840 | __builtin_casinhf | ||
| 1841 | .param_str = "XfXf" | ||
| 1842 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 1843 | |||
| 1844 | __builtin_casinhl | ||
| 1845 | .param_str = "XLdXLd" | ||
| 1846 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 1847 | |||
| 1848 | __builtin_casinl | ||
| 1849 | .param_str = "XLdXLd" | ||
| 1850 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 1851 | |||
| 1852 | __builtin_catan | ||
| 1853 | .param_str = "XdXd" | ||
| 1854 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 1855 | |||
| 1856 | __builtin_catanf | ||
| 1857 | .param_str = "XfXf" | ||
| 1858 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 1859 | |||
| 1860 | __builtin_catanh | ||
| 1861 | .param_str = "XdXd" | ||
| 1862 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 1863 | |||
| 1864 | __builtin_catanhf | ||
| 1865 | .param_str = "XfXf" | ||
| 1866 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 1867 | |||
| 1868 | __builtin_catanhl | ||
| 1869 | .param_str = "XLdXLd" | ||
| 1870 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 1871 | |||
| 1872 | __builtin_catanl | ||
| 1873 | .param_str = "XLdXLd" | ||
| 1874 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 1875 | |||
| 1876 | __builtin_cbrt | ||
| 1877 | .param_str = "dd" | ||
| 1878 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } | ||
| 1879 | |||
| 1880 | __builtin_cbrtf | ||
| 1881 | .param_str = "ff" | ||
| 1882 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } | ||
| 1883 | |||
| 1884 | __builtin_cbrtf128 | ||
| 1885 | .param_str = "LLdLLd" | ||
| 1886 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } | ||
| 1887 | |||
| 1888 | __builtin_cbrtl | ||
| 1889 | .param_str = "LdLd" | ||
| 1890 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } | ||
| 1891 | |||
| 1892 | __builtin_ccos | ||
| 1893 | .param_str = "XdXd" | ||
| 1894 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 1895 | |||
| 1896 | __builtin_ccosf | ||
| 1897 | .param_str = "XfXf" | ||
| 1898 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 1899 | |||
| 1900 | __builtin_ccosh | ||
| 1901 | .param_str = "XdXd" | ||
| 1902 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 1903 | |||
| 1904 | __builtin_ccoshf | ||
| 1905 | .param_str = "XfXf" | ||
| 1906 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 1907 | |||
| 1908 | __builtin_ccoshl | ||
| 1909 | .param_str = "XLdXLd" | ||
| 1910 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 1911 | |||
| 1912 | __builtin_ccosl | ||
| 1913 | .param_str = "XLdXLd" | ||
| 1914 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 1915 | |||
| 1916 | __builtin_ceil | ||
| 1917 | .param_str = "dd" | ||
| 1918 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } | ||
| 1919 | |||
| 1920 | __builtin_ceilf | ||
| 1921 | .param_str = "ff" | ||
| 1922 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } | ||
| 1923 | |||
| 1924 | __builtin_ceilf128 | ||
| 1925 | .param_str = "LLdLLd" | ||
| 1926 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } | ||
| 1927 | |||
| 1928 | __builtin_ceilf16 | ||
| 1929 | .param_str = "hh" | ||
| 1930 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } | ||
| 1931 | |||
| 1932 | __builtin_ceill | ||
| 1933 | .param_str = "LdLd" | ||
| 1934 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } | ||
| 1935 | |||
| 1936 | __builtin_cexp | ||
| 1937 | .param_str = "XdXd" | ||
| 1938 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 1939 | |||
| 1940 | __builtin_cexpf | ||
| 1941 | .param_str = "XfXf" | ||
| 1942 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 1943 | |||
| 1944 | __builtin_cexpl | ||
| 1945 | .param_str = "XLdXLd" | ||
| 1946 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 1947 | |||
| 1948 | __builtin_char_memchr | ||
| 1949 | .param_str = "c*cC*iz" | ||
| 1950 | .attributes = .{ .const_evaluable = true } | ||
| 1951 | |||
| 1952 | __builtin_cimag | ||
| 1953 | .param_str = "dXd" | ||
| 1954 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } | ||
| 1955 | |||
| 1956 | __builtin_cimagf | ||
| 1957 | .param_str = "fXf" | ||
| 1958 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } | ||
| 1959 | |||
| 1960 | __builtin_cimagl | ||
| 1961 | .param_str = "LdXLd" | ||
| 1962 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } | ||
| 1963 | |||
| 1964 | __builtin_classify_type | ||
| 1965 | .param_str = "i." | ||
| 1966 | .attributes = .{ .@"const" = true, .custom_typecheck = true, .eval_args = false, .const_evaluable = true } | ||
| 1967 | |||
| 1968 | __builtin_clog | ||
| 1969 | .param_str = "XdXd" | ||
| 1970 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 1971 | |||
| 1972 | __builtin_clogf | ||
| 1973 | .param_str = "XfXf" | ||
| 1974 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 1975 | |||
| 1976 | __builtin_clogl | ||
| 1977 | .param_str = "XLdXLd" | ||
| 1978 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 1979 | |||
| 1980 | __builtin_clrsb | ||
| 1981 | .param_str = "ii" | ||
| 1982 | .attributes = .{ .@"const" = true, .const_evaluable = true } | ||
| 1983 | |||
| 1984 | __builtin_clrsbl | ||
| 1985 | .param_str = "iLi" | ||
| 1986 | .attributes = .{ .@"const" = true, .const_evaluable = true } | ||
| 1987 | |||
| 1988 | __builtin_clrsbll | ||
| 1989 | .param_str = "iLLi" | ||
| 1990 | .attributes = .{ .@"const" = true, .const_evaluable = true } | ||
| 1991 | |||
| 1992 | __builtin_clz | ||
| 1993 | .param_str = "iUi" | ||
| 1994 | .attributes = .{ .@"const" = true, .const_evaluable = true } | ||
| 1995 | |||
| 1996 | __builtin_clzl | ||
| 1997 | .param_str = "iULi" | ||
| 1998 | .attributes = .{ .@"const" = true, .const_evaluable = true } | ||
| 1999 | |||
| 2000 | __builtin_clzll | ||
| 2001 | .param_str = "iULLi" | ||
| 2002 | .attributes = .{ .@"const" = true, .const_evaluable = true } | ||
| 2003 | |||
| 2004 | __builtin_clzs | ||
| 2005 | .param_str = "iUs" | ||
| 2006 | .attributes = .{ .@"const" = true, .const_evaluable = true } | ||
| 2007 | |||
| 2008 | __builtin_complex | ||
| 2009 | .param_str = "v." | ||
| 2010 | .attributes = .{ .@"const" = true, .custom_typecheck = true, .const_evaluable = true } | ||
| 2011 | |||
| 2012 | __builtin_conj | ||
| 2013 | .param_str = "XdXd" | ||
| 2014 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } | ||
| 2015 | |||
| 2016 | __builtin_conjf | ||
| 2017 | .param_str = "XfXf" | ||
| 2018 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } | ||
| 2019 | |||
| 2020 | __builtin_conjl | ||
| 2021 | .param_str = "XLdXLd" | ||
| 2022 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } | ||
| 2023 | |||
| 2024 | __builtin_constant_p | ||
| 2025 | .param_str = "i." | ||
| 2026 | .attributes = .{ .@"const" = true, .custom_typecheck = true, .eval_args = false, .const_evaluable = true } | ||
| 2027 | |||
| 2028 | __builtin_convertvector | ||
| 2029 | .param_str = "v." | ||
| 2030 | .attributes = .{ .@"const" = true, .custom_typecheck = true } | ||
| 2031 | |||
| 2032 | __builtin_copysign | ||
| 2033 | .param_str = "ddd" | ||
| 2034 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } | ||
| 2035 | |||
| 2036 | __builtin_copysignf | ||
| 2037 | .param_str = "fff" | ||
| 2038 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } | ||
| 2039 | |||
| 2040 | __builtin_copysignf128 | ||
| 2041 | .param_str = "LLdLLdLLd" | ||
| 2042 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } | ||
| 2043 | |||
| 2044 | __builtin_copysignf16 | ||
| 2045 | .param_str = "hhh" | ||
| 2046 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } | ||
| 2047 | |||
| 2048 | __builtin_copysignl | ||
| 2049 | .param_str = "LdLdLd" | ||
| 2050 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } | ||
| 2051 | |||
| 2052 | __builtin_cos | ||
| 2053 | .param_str = "dd" | ||
| 2054 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2055 | |||
| 2056 | __builtin_cosf | ||
| 2057 | .param_str = "ff" | ||
| 2058 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2059 | |||
| 2060 | __builtin_cosf128 | ||
| 2061 | .param_str = "LLdLLd" | ||
| 2062 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2063 | |||
| 2064 | __builtin_cosf16 | ||
| 2065 | .param_str = "hh" | ||
| 2066 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2067 | |||
| 2068 | __builtin_cosh | ||
| 2069 | .param_str = "dd" | ||
| 2070 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2071 | |||
| 2072 | __builtin_coshf | ||
| 2073 | .param_str = "ff" | ||
| 2074 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2075 | |||
| 2076 | __builtin_coshf128 | ||
| 2077 | .param_str = "LLdLLd" | ||
| 2078 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2079 | |||
| 2080 | __builtin_coshl | ||
| 2081 | .param_str = "LdLd" | ||
| 2082 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2083 | |||
| 2084 | __builtin_cosl | ||
| 2085 | .param_str = "LdLd" | ||
| 2086 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2087 | |||
| 2088 | __builtin_cpow | ||
| 2089 | .param_str = "XdXdXd" | ||
| 2090 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2091 | |||
| 2092 | __builtin_cpowf | ||
| 2093 | .param_str = "XfXfXf" | ||
| 2094 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2095 | |||
| 2096 | __builtin_cpowl | ||
| 2097 | .param_str = "XLdXLdXLd" | ||
| 2098 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2099 | |||
| 2100 | __builtin_cproj | ||
| 2101 | .param_str = "XdXd" | ||
| 2102 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } | ||
| 2103 | |||
| 2104 | __builtin_cprojf | ||
| 2105 | .param_str = "XfXf" | ||
| 2106 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } | ||
| 2107 | |||
| 2108 | __builtin_cprojl | ||
| 2109 | .param_str = "XLdXLd" | ||
| 2110 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } | ||
| 2111 | |||
| 2112 | __builtin_cpu_init | ||
| 2113 | .param_str = "v" | ||
| 2114 | .target_set = TargetSet.initOne(.x86) | ||
| 2115 | |||
| 2116 | __builtin_cpu_is | ||
| 2117 | .param_str = "bcC*" | ||
| 2118 | .target_set = TargetSet.initOne(.x86) | ||
| 2119 | .attributes = .{ .@"const" = true } | ||
| 2120 | |||
| 2121 | __builtin_cpu_supports | ||
| 2122 | .param_str = "bcC*" | ||
| 2123 | .target_set = TargetSet.initOne(.x86) | ||
| 2124 | .attributes = .{ .@"const" = true } | ||
| 2125 | |||
| 2126 | __builtin_creal | ||
| 2127 | .param_str = "dXd" | ||
| 2128 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } | ||
| 2129 | |||
| 2130 | __builtin_crealf | ||
| 2131 | .param_str = "fXf" | ||
| 2132 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } | ||
| 2133 | |||
| 2134 | __builtin_creall | ||
| 2135 | .param_str = "LdXLd" | ||
| 2136 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } | ||
| 2137 | |||
| 2138 | __builtin_csin | ||
| 2139 | .param_str = "XdXd" | ||
| 2140 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2141 | |||
| 2142 | __builtin_csinf | ||
| 2143 | .param_str = "XfXf" | ||
| 2144 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2145 | |||
| 2146 | __builtin_csinh | ||
| 2147 | .param_str = "XdXd" | ||
| 2148 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2149 | |||
| 2150 | __builtin_csinhf | ||
| 2151 | .param_str = "XfXf" | ||
| 2152 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2153 | |||
| 2154 | __builtin_csinhl | ||
| 2155 | .param_str = "XLdXLd" | ||
| 2156 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2157 | |||
| 2158 | __builtin_csinl | ||
| 2159 | .param_str = "XLdXLd" | ||
| 2160 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2161 | |||
| 2162 | __builtin_csqrt | ||
| 2163 | .param_str = "XdXd" | ||
| 2164 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2165 | |||
| 2166 | __builtin_csqrtf | ||
| 2167 | .param_str = "XfXf" | ||
| 2168 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2169 | |||
| 2170 | __builtin_csqrtl | ||
| 2171 | .param_str = "XLdXLd" | ||
| 2172 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2173 | |||
| 2174 | __builtin_ctan | ||
| 2175 | .param_str = "XdXd" | ||
| 2176 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2177 | |||
| 2178 | __builtin_ctanf | ||
| 2179 | .param_str = "XfXf" | ||
| 2180 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2181 | |||
| 2182 | __builtin_ctanh | ||
| 2183 | .param_str = "XdXd" | ||
| 2184 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2185 | |||
| 2186 | __builtin_ctanhf | ||
| 2187 | .param_str = "XfXf" | ||
| 2188 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2189 | |||
| 2190 | __builtin_ctanhl | ||
| 2191 | .param_str = "XLdXLd" | ||
| 2192 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2193 | |||
| 2194 | __builtin_ctanl | ||
| 2195 | .param_str = "XLdXLd" | ||
| 2196 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2197 | |||
| 2198 | __builtin_ctz | ||
| 2199 | .param_str = "iUi" | ||
| 2200 | .attributes = .{ .@"const" = true, .const_evaluable = true } | ||
| 2201 | |||
| 2202 | __builtin_ctzl | ||
| 2203 | .param_str = "iULi" | ||
| 2204 | .attributes = .{ .@"const" = true, .const_evaluable = true } | ||
| 2205 | |||
| 2206 | __builtin_ctzll | ||
| 2207 | .param_str = "iULLi" | ||
| 2208 | .attributes = .{ .@"const" = true, .const_evaluable = true } | ||
| 2209 | |||
| 2210 | __builtin_ctzs | ||
| 2211 | .param_str = "iUs" | ||
| 2212 | .attributes = .{ .@"const" = true, .const_evaluable = true } | ||
| 2213 | |||
| 2214 | __builtin_dcbf | ||
| 2215 | .param_str = "vvC*" | ||
| 2216 | .target_set = TargetSet.initOne(.ppc) | ||
| 2217 | |||
| 2218 | __builtin_debugtrap | ||
| 2219 | .param_str = "v" | ||
| 2220 | |||
| 2221 | __builtin_dump_struct | ||
| 2222 | .param_str = "v." | ||
| 2223 | .attributes = .{ .custom_typecheck = true } | ||
| 2224 | |||
| 2225 | __builtin_dwarf_cfa | ||
| 2226 | .param_str = "v*" | ||
| 2227 | |||
| 2228 | __builtin_dwarf_sp_column | ||
| 2229 | .param_str = "Ui" | ||
| 2230 | |||
| 2231 | __builtin_dynamic_object_size | ||
| 2232 | .param_str = "zvC*i" | ||
| 2233 | .attributes = .{ .eval_args = false, .const_evaluable = true } | ||
| 2234 | |||
| 2235 | __builtin_eh_return | ||
| 2236 | .param_str = "vzv*" | ||
| 2237 | .attributes = .{ .noreturn = true } | ||
| 2238 | |||
| 2239 | __builtin_eh_return_data_regno | ||
| 2240 | .param_str = "iIi" | ||
| 2241 | .attributes = .{ .@"const" = true, .const_evaluable = true } | ||
| 2242 | |||
| 2243 | __builtin_elementwise_abs | ||
| 2244 | .param_str = "v." | ||
| 2245 | .attributes = .{ .@"const" = true, .custom_typecheck = true } | ||
| 2246 | |||
| 2247 | __builtin_elementwise_add_sat | ||
| 2248 | .param_str = "v." | ||
| 2249 | .attributes = .{ .@"const" = true, .custom_typecheck = true } | ||
| 2250 | |||
| 2251 | __builtin_elementwise_bitreverse | ||
| 2252 | .param_str = "v." | ||
| 2253 | .attributes = .{ .@"const" = true, .custom_typecheck = true } | ||
| 2254 | |||
| 2255 | __builtin_elementwise_canonicalize | ||
| 2256 | .param_str = "v." | ||
| 2257 | .attributes = .{ .@"const" = true, .custom_typecheck = true } | ||
| 2258 | |||
| 2259 | __builtin_elementwise_ceil | ||
| 2260 | .param_str = "v." | ||
| 2261 | .attributes = .{ .@"const" = true, .custom_typecheck = true } | ||
| 2262 | |||
| 2263 | __builtin_elementwise_copysign | ||
| 2264 | .param_str = "v." | ||
| 2265 | .attributes = .{ .@"const" = true, .custom_typecheck = true } | ||
| 2266 | |||
| 2267 | __builtin_elementwise_cos | ||
| 2268 | .param_str = "v." | ||
| 2269 | .attributes = .{ .@"const" = true, .custom_typecheck = true } | ||
| 2270 | |||
| 2271 | __builtin_elementwise_exp | ||
| 2272 | .param_str = "v." | ||
| 2273 | .attributes = .{ .@"const" = true, .custom_typecheck = true } | ||
| 2274 | |||
| 2275 | __builtin_elementwise_exp2 | ||
| 2276 | .param_str = "v." | ||
| 2277 | .attributes = .{ .@"const" = true, .custom_typecheck = true } | ||
| 2278 | |||
| 2279 | __builtin_elementwise_floor | ||
| 2280 | .param_str = "v." | ||
| 2281 | .attributes = .{ .@"const" = true, .custom_typecheck = true } | ||
| 2282 | |||
| 2283 | __builtin_elementwise_fma | ||
| 2284 | .param_str = "v." | ||
| 2285 | .attributes = .{ .@"const" = true, .custom_typecheck = true } | ||
| 2286 | |||
| 2287 | __builtin_elementwise_log | ||
| 2288 | .param_str = "v." | ||
| 2289 | .attributes = .{ .@"const" = true, .custom_typecheck = true } | ||
| 2290 | |||
| 2291 | __builtin_elementwise_log10 | ||
| 2292 | .param_str = "v." | ||
| 2293 | .attributes = .{ .@"const" = true, .custom_typecheck = true } | ||
| 2294 | |||
| 2295 | __builtin_elementwise_log2 | ||
| 2296 | .param_str = "v." | ||
| 2297 | .attributes = .{ .@"const" = true, .custom_typecheck = true } | ||
| 2298 | |||
| 2299 | __builtin_elementwise_max | ||
| 2300 | .param_str = "v." | ||
| 2301 | .attributes = .{ .@"const" = true, .custom_typecheck = true } | ||
| 2302 | |||
| 2303 | __builtin_elementwise_min | ||
| 2304 | .param_str = "v." | ||
| 2305 | .attributes = .{ .@"const" = true, .custom_typecheck = true } | ||
| 2306 | |||
| 2307 | __builtin_elementwise_nearbyint | ||
| 2308 | .param_str = "v." | ||
| 2309 | .attributes = .{ .@"const" = true, .custom_typecheck = true } | ||
| 2310 | |||
| 2311 | __builtin_elementwise_pow | ||
| 2312 | .param_str = "v." | ||
| 2313 | .attributes = .{ .@"const" = true, .custom_typecheck = true } | ||
| 2314 | |||
| 2315 | __builtin_elementwise_rint | ||
| 2316 | .param_str = "v." | ||
| 2317 | .attributes = .{ .@"const" = true, .custom_typecheck = true } | ||
| 2318 | |||
| 2319 | __builtin_elementwise_round | ||
| 2320 | .param_str = "v." | ||
| 2321 | .attributes = .{ .@"const" = true, .custom_typecheck = true } | ||
| 2322 | |||
| 2323 | __builtin_elementwise_roundeven | ||
| 2324 | .param_str = "v." | ||
| 2325 | .attributes = .{ .@"const" = true, .custom_typecheck = true } | ||
| 2326 | |||
| 2327 | __builtin_elementwise_sin | ||
| 2328 | .param_str = "v." | ||
| 2329 | .attributes = .{ .@"const" = true, .custom_typecheck = true } | ||
| 2330 | |||
| 2331 | __builtin_elementwise_sqrt | ||
| 2332 | .param_str = "v." | ||
| 2333 | .attributes = .{ .@"const" = true, .custom_typecheck = true } | ||
| 2334 | |||
| 2335 | __builtin_elementwise_sub_sat | ||
| 2336 | .param_str = "v." | ||
| 2337 | .attributes = .{ .@"const" = true, .custom_typecheck = true } | ||
| 2338 | |||
| 2339 | __builtin_elementwise_trunc | ||
| 2340 | .param_str = "v." | ||
| 2341 | .attributes = .{ .@"const" = true, .custom_typecheck = true } | ||
| 2342 | |||
| 2343 | __builtin_erf | ||
| 2344 | .param_str = "dd" | ||
| 2345 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2346 | |||
| 2347 | __builtin_erfc | ||
| 2348 | .param_str = "dd" | ||
| 2349 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2350 | |||
| 2351 | __builtin_erfcf | ||
| 2352 | .param_str = "ff" | ||
| 2353 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2354 | |||
| 2355 | __builtin_erfcf128 | ||
| 2356 | .param_str = "LLdLLd" | ||
| 2357 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2358 | |||
| 2359 | __builtin_erfcl | ||
| 2360 | .param_str = "LdLd" | ||
| 2361 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2362 | |||
| 2363 | __builtin_erff | ||
| 2364 | .param_str = "ff" | ||
| 2365 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2366 | |||
| 2367 | __builtin_erff128 | ||
| 2368 | .param_str = "LLdLLd" | ||
| 2369 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2370 | |||
| 2371 | __builtin_erfl | ||
| 2372 | .param_str = "LdLd" | ||
| 2373 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2374 | |||
| 2375 | __builtin_exp | ||
| 2376 | .param_str = "dd" | ||
| 2377 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2378 | |||
| 2379 | __builtin_exp10 | ||
| 2380 | .param_str = "dd" | ||
| 2381 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2382 | |||
| 2383 | __builtin_exp10f | ||
| 2384 | .param_str = "ff" | ||
| 2385 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2386 | |||
| 2387 | __builtin_exp10f128 | ||
| 2388 | .param_str = "LLdLLd" | ||
| 2389 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2390 | |||
| 2391 | __builtin_exp10f16 | ||
| 2392 | .param_str = "hh" | ||
| 2393 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2394 | |||
| 2395 | __builtin_exp10l | ||
| 2396 | .param_str = "LdLd" | ||
| 2397 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2398 | |||
| 2399 | __builtin_exp2 | ||
| 2400 | .param_str = "dd" | ||
| 2401 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2402 | |||
| 2403 | __builtin_exp2f | ||
| 2404 | .param_str = "ff" | ||
| 2405 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2406 | |||
| 2407 | __builtin_exp2f128 | ||
| 2408 | .param_str = "LLdLLd" | ||
| 2409 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2410 | |||
| 2411 | __builtin_exp2f16 | ||
| 2412 | .param_str = "hh" | ||
| 2413 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2414 | |||
| 2415 | __builtin_exp2l | ||
| 2416 | .param_str = "LdLd" | ||
| 2417 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2418 | |||
| 2419 | __builtin_expect | ||
| 2420 | .param_str = "LiLiLi" | ||
| 2421 | .attributes = .{ .@"const" = true, .const_evaluable = true } | ||
| 2422 | |||
| 2423 | __builtin_expect_with_probability | ||
| 2424 | .param_str = "LiLiLid" | ||
| 2425 | .attributes = .{ .@"const" = true, .const_evaluable = true } | ||
| 2426 | |||
| 2427 | __builtin_expf | ||
| 2428 | .param_str = "ff" | ||
| 2429 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2430 | |||
| 2431 | __builtin_expf128 | ||
| 2432 | .param_str = "LLdLLd" | ||
| 2433 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2434 | |||
| 2435 | __builtin_expf16 | ||
| 2436 | .param_str = "hh" | ||
| 2437 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2438 | |||
| 2439 | __builtin_expl | ||
| 2440 | .param_str = "LdLd" | ||
| 2441 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2442 | |||
| 2443 | __builtin_expm1 | ||
| 2444 | .param_str = "dd" | ||
| 2445 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2446 | |||
| 2447 | __builtin_expm1f | ||
| 2448 | .param_str = "ff" | ||
| 2449 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2450 | |||
| 2451 | __builtin_expm1f128 | ||
| 2452 | .param_str = "LLdLLd" | ||
| 2453 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2454 | |||
| 2455 | __builtin_expm1l | ||
| 2456 | .param_str = "LdLd" | ||
| 2457 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2458 | |||
| 2459 | __builtin_extend_pointer | ||
| 2460 | .param_str = "ULLiv*" | ||
| 2461 | |||
| 2462 | __builtin_extract_return_addr | ||
| 2463 | .param_str = "v*v*" | ||
| 2464 | |||
| 2465 | __builtin_fabs | ||
| 2466 | .param_str = "dd" | ||
| 2467 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } | ||
| 2468 | |||
| 2469 | __builtin_fabsf | ||
| 2470 | .param_str = "ff" | ||
| 2471 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } | ||
| 2472 | |||
| 2473 | __builtin_fabsf128 | ||
| 2474 | .param_str = "LLdLLd" | ||
| 2475 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } | ||
| 2476 | |||
| 2477 | __builtin_fabsf16 | ||
| 2478 | .param_str = "hh" | ||
| 2479 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } | ||
| 2480 | |||
| 2481 | __builtin_fabsl | ||
| 2482 | .param_str = "LdLd" | ||
| 2483 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } | ||
| 2484 | |||
| 2485 | __builtin_fdim | ||
| 2486 | .param_str = "ddd" | ||
| 2487 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2488 | |||
| 2489 | __builtin_fdimf | ||
| 2490 | .param_str = "fff" | ||
| 2491 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2492 | |||
| 2493 | __builtin_fdimf128 | ||
| 2494 | .param_str = "LLdLLdLLd" | ||
| 2495 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2496 | |||
| 2497 | __builtin_fdiml | ||
| 2498 | .param_str = "LdLdLd" | ||
| 2499 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2500 | |||
| 2501 | __builtin_ffs | ||
| 2502 | .param_str = "ii" | ||
| 2503 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } | ||
| 2504 | |||
| 2505 | __builtin_ffsl | ||
| 2506 | .param_str = "iLi" | ||
| 2507 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } | ||
| 2508 | |||
| 2509 | __builtin_ffsll | ||
| 2510 | .param_str = "iLLi" | ||
| 2511 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } | ||
| 2512 | |||
| 2513 | __builtin_floor | ||
| 2514 | .param_str = "dd" | ||
| 2515 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } | ||
| 2516 | |||
| 2517 | __builtin_floorf | ||
| 2518 | .param_str = "ff" | ||
| 2519 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } | ||
| 2520 | |||
| 2521 | __builtin_floorf128 | ||
| 2522 | .param_str = "LLdLLd" | ||
| 2523 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } | ||
| 2524 | |||
| 2525 | __builtin_floorf16 | ||
| 2526 | .param_str = "hh" | ||
| 2527 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } | ||
| 2528 | |||
| 2529 | __builtin_floorl | ||
| 2530 | .param_str = "LdLd" | ||
| 2531 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } | ||
| 2532 | |||
| 2533 | __builtin_flt_rounds | ||
| 2534 | .param_str = "i" | ||
| 2535 | |||
| 2536 | __builtin_fma | ||
| 2537 | .param_str = "dddd" | ||
| 2538 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2539 | |||
| 2540 | __builtin_fmaf | ||
| 2541 | .param_str = "ffff" | ||
| 2542 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2543 | |||
| 2544 | __builtin_fmaf128 | ||
| 2545 | .param_str = "LLdLLdLLdLLd" | ||
| 2546 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2547 | |||
| 2548 | __builtin_fmaf16 | ||
| 2549 | .param_str = "hhhh" | ||
| 2550 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2551 | |||
| 2552 | __builtin_fmal | ||
| 2553 | .param_str = "LdLdLdLd" | ||
| 2554 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2555 | |||
| 2556 | __builtin_fmax | ||
| 2557 | .param_str = "ddd" | ||
| 2558 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } | ||
| 2559 | |||
| 2560 | __builtin_fmaxf | ||
| 2561 | .param_str = "fff" | ||
| 2562 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } | ||
| 2563 | |||
| 2564 | __builtin_fmaxf128 | ||
| 2565 | .param_str = "LLdLLdLLd" | ||
| 2566 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } | ||
| 2567 | |||
| 2568 | __builtin_fmaxf16 | ||
| 2569 | .param_str = "hhh" | ||
| 2570 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } | ||
| 2571 | |||
| 2572 | __builtin_fmaxl | ||
| 2573 | .param_str = "LdLdLd" | ||
| 2574 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } | ||
| 2575 | |||
| 2576 | __builtin_fmin | ||
| 2577 | .param_str = "ddd" | ||
| 2578 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } | ||
| 2579 | |||
| 2580 | __builtin_fminf | ||
| 2581 | .param_str = "fff" | ||
| 2582 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } | ||
| 2583 | |||
| 2584 | __builtin_fminf128 | ||
| 2585 | .param_str = "LLdLLdLLd" | ||
| 2586 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } | ||
| 2587 | |||
| 2588 | __builtin_fminf16 | ||
| 2589 | .param_str = "hhh" | ||
| 2590 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } | ||
| 2591 | |||
| 2592 | __builtin_fminl | ||
| 2593 | .param_str = "LdLdLd" | ||
| 2594 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } | ||
| 2595 | |||
| 2596 | __builtin_fmod | ||
| 2597 | .param_str = "ddd" | ||
| 2598 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2599 | |||
| 2600 | __builtin_fmodf | ||
| 2601 | .param_str = "fff" | ||
| 2602 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2603 | |||
| 2604 | __builtin_fmodf128 | ||
| 2605 | .param_str = "LLdLLdLLd" | ||
| 2606 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2607 | |||
| 2608 | __builtin_fmodf16 | ||
| 2609 | .param_str = "hhh" | ||
| 2610 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2611 | |||
| 2612 | __builtin_fmodl | ||
| 2613 | .param_str = "LdLdLd" | ||
| 2614 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2615 | |||
| 2616 | __builtin_fpclassify | ||
| 2617 | .param_str = "iiiiii." | ||
| 2618 | .attributes = .{ .@"const" = true, .custom_typecheck = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } | ||
| 2619 | |||
| 2620 | __builtin_fprintf | ||
| 2621 | .param_str = "iP*RcC*R." | ||
| 2622 | .attributes = .{ .lib_function_with_builtin_prefix = true, .format_kind = .printf, .format_string_position = 1 } | ||
| 2623 | |||
| 2624 | __builtin_frame_address | ||
| 2625 | .param_str = "v*IUi" | ||
| 2626 | |||
| 2627 | __builtin_free | ||
| 2628 | .param_str = "vv*" | ||
| 2629 | .attributes = .{ .lib_function_with_builtin_prefix = true } | ||
| 2630 | |||
| 2631 | __builtin_frexp | ||
| 2632 | .param_str = "ddi*" | ||
| 2633 | .attributes = .{ .lib_function_with_builtin_prefix = true } | ||
| 2634 | |||
| 2635 | __builtin_frexpf | ||
| 2636 | .param_str = "ffi*" | ||
| 2637 | .attributes = .{ .lib_function_with_builtin_prefix = true } | ||
| 2638 | |||
| 2639 | __builtin_frexpf128 | ||
| 2640 | .param_str = "LLdLLdi*" | ||
| 2641 | .attributes = .{ .lib_function_with_builtin_prefix = true } | ||
| 2642 | |||
| 2643 | __builtin_frexpf16 | ||
| 2644 | .param_str = "hhi*" | ||
| 2645 | .attributes = .{ .lib_function_with_builtin_prefix = true } | ||
| 2646 | |||
| 2647 | __builtin_frexpl | ||
| 2648 | .param_str = "LdLdi*" | ||
| 2649 | .attributes = .{ .lib_function_with_builtin_prefix = true } | ||
| 2650 | |||
| 2651 | __builtin_frob_return_addr | ||
| 2652 | .param_str = "v*v*" | ||
| 2653 | |||
| 2654 | __builtin_fscanf | ||
| 2655 | .param_str = "iP*RcC*R." | ||
| 2656 | .attributes = .{ .lib_function_with_builtin_prefix = true, .format_kind = .scanf, .format_string_position = 1 } | ||
| 2657 | |||
| 2658 | __builtin_getid | ||
| 2659 | .param_str = "Si" | ||
| 2660 | .target_set = TargetSet.initOne(.xcore) | ||
| 2661 | .attributes = .{ .@"const" = true } | ||
| 2662 | |||
| 2663 | __builtin_getps | ||
| 2664 | .param_str = "UiUi" | ||
| 2665 | .target_set = TargetSet.initOne(.xcore) | ||
| 2666 | |||
| 2667 | __builtin_huge_val | ||
| 2668 | .param_str = "d" | ||
| 2669 | .attributes = .{ .@"const" = true, .const_evaluable = true } | ||
| 2670 | |||
| 2671 | __builtin_huge_valf | ||
| 2672 | .param_str = "f" | ||
| 2673 | .attributes = .{ .@"const" = true, .const_evaluable = true } | ||
| 2674 | |||
| 2675 | __builtin_huge_valf128 | ||
| 2676 | .param_str = "LLd" | ||
| 2677 | .attributes = .{ .@"const" = true, .const_evaluable = true } | ||
| 2678 | |||
| 2679 | __builtin_huge_valf16 | ||
| 2680 | .param_str = "x" | ||
| 2681 | .attributes = .{ .@"const" = true, .const_evaluable = true } | ||
| 2682 | |||
| 2683 | __builtin_huge_vall | ||
| 2684 | .param_str = "Ld" | ||
| 2685 | .attributes = .{ .@"const" = true, .const_evaluable = true } | ||
| 2686 | |||
| 2687 | __builtin_hypot | ||
| 2688 | .param_str = "ddd" | ||
| 2689 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2690 | |||
| 2691 | __builtin_hypotf | ||
| 2692 | .param_str = "fff" | ||
| 2693 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2694 | |||
| 2695 | __builtin_hypotf128 | ||
| 2696 | .param_str = "LLdLLdLLd" | ||
| 2697 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2698 | |||
| 2699 | __builtin_hypotl | ||
| 2700 | .param_str = "LdLdLd" | ||
| 2701 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2702 | |||
| 2703 | __builtin_ia32_rdpmc | ||
| 2704 | .param_str = "UOii" | ||
| 2705 | .target_set = TargetSet.initOne(.x86) | ||
| 2706 | |||
| 2707 | __builtin_ia32_rdtsc | ||
| 2708 | .param_str = "UOi" | ||
| 2709 | .target_set = TargetSet.initOne(.x86) | ||
| 2710 | |||
| 2711 | __builtin_ia32_rdtscp | ||
| 2712 | .param_str = "UOiUi*" | ||
| 2713 | .target_set = TargetSet.initOne(.x86) | ||
| 2714 | |||
| 2715 | __builtin_ilogb | ||
| 2716 | .param_str = "id" | ||
| 2717 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2718 | |||
| 2719 | __builtin_ilogbf | ||
| 2720 | .param_str = "if" | ||
| 2721 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2722 | |||
| 2723 | __builtin_ilogbf128 | ||
| 2724 | .param_str = "iLLd" | ||
| 2725 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2726 | |||
| 2727 | __builtin_ilogbl | ||
| 2728 | .param_str = "iLd" | ||
| 2729 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2730 | |||
| 2731 | __builtin_index | ||
| 2732 | .param_str = "c*cC*i" | ||
| 2733 | .attributes = .{ .lib_function_with_builtin_prefix = true } | ||
| 2734 | |||
| 2735 | __builtin_inf | ||
| 2736 | .param_str = "d" | ||
| 2737 | .attributes = .{ .@"const" = true, .const_evaluable = true } | ||
| 2738 | |||
| 2739 | __builtin_inff | ||
| 2740 | .param_str = "f" | ||
| 2741 | .attributes = .{ .@"const" = true, .const_evaluable = true } | ||
| 2742 | |||
| 2743 | __builtin_inff128 | ||
| 2744 | .param_str = "LLd" | ||
| 2745 | .attributes = .{ .@"const" = true, .const_evaluable = true } | ||
| 2746 | |||
| 2747 | __builtin_inff16 | ||
| 2748 | .param_str = "x" | ||
| 2749 | .attributes = .{ .@"const" = true, .const_evaluable = true } | ||
| 2750 | |||
| 2751 | __builtin_infl | ||
| 2752 | .param_str = "Ld" | ||
| 2753 | .attributes = .{ .@"const" = true, .const_evaluable = true } | ||
| 2754 | |||
| 2755 | __builtin_init_dwarf_reg_size_table | ||
| 2756 | .param_str = "vv*" | ||
| 2757 | |||
| 2758 | __builtin_is_aligned | ||
| 2759 | .param_str = "bvC*z" | ||
| 2760 | .attributes = .{ .@"const" = true, .custom_typecheck = true, .const_evaluable = true } | ||
| 2761 | |||
| 2762 | __builtin_isfinite | ||
| 2763 | .param_str = "i." | ||
| 2764 | .attributes = .{ .@"const" = true, .custom_typecheck = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } | ||
| 2765 | |||
| 2766 | __builtin_isfpclass | ||
| 2767 | .param_str = "i." | ||
| 2768 | .attributes = .{ .@"const" = true, .custom_typecheck = true, .const_evaluable = true } | ||
| 2769 | |||
| 2770 | __builtin_isgreater | ||
| 2771 | .param_str = "i." | ||
| 2772 | .attributes = .{ .@"const" = true, .custom_typecheck = true, .lib_function_with_builtin_prefix = true } | ||
| 2773 | |||
| 2774 | __builtin_isgreaterequal | ||
| 2775 | .param_str = "i." | ||
| 2776 | .attributes = .{ .@"const" = true, .custom_typecheck = true, .lib_function_with_builtin_prefix = true } | ||
| 2777 | |||
| 2778 | __builtin_isinf | ||
| 2779 | .param_str = "i." | ||
| 2780 | .attributes = .{ .@"const" = true, .custom_typecheck = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } | ||
| 2781 | |||
| 2782 | __builtin_isinf_sign | ||
| 2783 | .param_str = "i." | ||
| 2784 | .attributes = .{ .@"const" = true, .custom_typecheck = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } | ||
| 2785 | |||
| 2786 | __builtin_isless | ||
| 2787 | .param_str = "i." | ||
| 2788 | .attributes = .{ .@"const" = true, .custom_typecheck = true, .lib_function_with_builtin_prefix = true } | ||
| 2789 | |||
| 2790 | __builtin_islessequal | ||
| 2791 | .param_str = "i." | ||
| 2792 | .attributes = .{ .@"const" = true, .custom_typecheck = true, .lib_function_with_builtin_prefix = true } | ||
| 2793 | |||
| 2794 | __builtin_islessgreater | ||
| 2795 | .param_str = "i." | ||
| 2796 | .attributes = .{ .@"const" = true, .custom_typecheck = true, .lib_function_with_builtin_prefix = true } | ||
| 2797 | |||
| 2798 | __builtin_isnan | ||
| 2799 | .param_str = "i." | ||
| 2800 | .attributes = .{ .@"const" = true, .custom_typecheck = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } | ||
| 2801 | |||
| 2802 | __builtin_isnormal | ||
| 2803 | .param_str = "i." | ||
| 2804 | .attributes = .{ .@"const" = true, .custom_typecheck = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } | ||
| 2805 | |||
| 2806 | __builtin_isunordered | ||
| 2807 | .param_str = "i." | ||
| 2808 | .attributes = .{ .@"const" = true, .custom_typecheck = true, .lib_function_with_builtin_prefix = true } | ||
| 2809 | |||
| 2810 | __builtin_labs | ||
| 2811 | .param_str = "LiLi" | ||
| 2812 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } | ||
| 2813 | |||
| 2814 | __builtin_launder | ||
| 2815 | .param_str = "v*v*" | ||
| 2816 | .attributes = .{ .custom_typecheck = true, .const_evaluable = true } | ||
| 2817 | |||
| 2818 | __builtin_ldexp | ||
| 2819 | .param_str = "ddi" | ||
| 2820 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2821 | |||
| 2822 | __builtin_ldexpf | ||
| 2823 | .param_str = "ffi" | ||
| 2824 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2825 | |||
| 2826 | __builtin_ldexpf128 | ||
| 2827 | .param_str = "LLdLLdi" | ||
| 2828 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2829 | |||
| 2830 | __builtin_ldexpf16 | ||
| 2831 | .param_str = "hhi" | ||
| 2832 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2833 | |||
| 2834 | __builtin_ldexpl | ||
| 2835 | .param_str = "LdLdi" | ||
| 2836 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2837 | |||
| 2838 | __builtin_lgamma | ||
| 2839 | .param_str = "dd" | ||
| 2840 | .attributes = .{ .lib_function_with_builtin_prefix = true } | ||
| 2841 | |||
| 2842 | __builtin_lgammaf | ||
| 2843 | .param_str = "ff" | ||
| 2844 | .attributes = .{ .lib_function_with_builtin_prefix = true } | ||
| 2845 | |||
| 2846 | __builtin_lgammaf128 | ||
| 2847 | .param_str = "LLdLLd" | ||
| 2848 | .attributes = .{ .lib_function_with_builtin_prefix = true } | ||
| 2849 | |||
| 2850 | __builtin_lgammal | ||
| 2851 | .param_str = "LdLd" | ||
| 2852 | .attributes = .{ .lib_function_with_builtin_prefix = true } | ||
| 2853 | |||
| 2854 | __builtin_llabs | ||
| 2855 | .param_str = "LLiLLi" | ||
| 2856 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } | ||
| 2857 | |||
| 2858 | __builtin_llrint | ||
| 2859 | .param_str = "LLid" | ||
| 2860 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2861 | |||
| 2862 | __builtin_llrintf | ||
| 2863 | .param_str = "LLif" | ||
| 2864 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2865 | |||
| 2866 | __builtin_llrintf128 | ||
| 2867 | .param_str = "LLiLLd" | ||
| 2868 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2869 | |||
| 2870 | __builtin_llrintl | ||
| 2871 | .param_str = "LLiLd" | ||
| 2872 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2873 | |||
| 2874 | __builtin_llround | ||
| 2875 | .param_str = "LLid" | ||
| 2876 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2877 | |||
| 2878 | __builtin_llroundf | ||
| 2879 | .param_str = "LLif" | ||
| 2880 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2881 | |||
| 2882 | __builtin_llroundf128 | ||
| 2883 | .param_str = "LLiLLd" | ||
| 2884 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2885 | |||
| 2886 | __builtin_llroundl | ||
| 2887 | .param_str = "LLiLd" | ||
| 2888 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2889 | |||
| 2890 | __builtin_log | ||
| 2891 | .param_str = "dd" | ||
| 2892 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2893 | |||
| 2894 | __builtin_log10 | ||
| 2895 | .param_str = "dd" | ||
| 2896 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2897 | |||
| 2898 | __builtin_log10f | ||
| 2899 | .param_str = "ff" | ||
| 2900 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2901 | |||
| 2902 | __builtin_log10f128 | ||
| 2903 | .param_str = "LLdLLd" | ||
| 2904 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2905 | |||
| 2906 | __builtin_log10f16 | ||
| 2907 | .param_str = "hh" | ||
| 2908 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2909 | |||
| 2910 | __builtin_log10l | ||
| 2911 | .param_str = "LdLd" | ||
| 2912 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2913 | |||
| 2914 | __builtin_log1p | ||
| 2915 | .param_str = "dd" | ||
| 2916 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2917 | |||
| 2918 | __builtin_log1pf | ||
| 2919 | .param_str = "ff" | ||
| 2920 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2921 | |||
| 2922 | __builtin_log1pf128 | ||
| 2923 | .param_str = "LLdLLd" | ||
| 2924 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2925 | |||
| 2926 | __builtin_log1pl | ||
| 2927 | .param_str = "LdLd" | ||
| 2928 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2929 | |||
| 2930 | __builtin_log2 | ||
| 2931 | .param_str = "dd" | ||
| 2932 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2933 | |||
| 2934 | __builtin_log2f | ||
| 2935 | .param_str = "ff" | ||
| 2936 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2937 | |||
| 2938 | __builtin_log2f128 | ||
| 2939 | .param_str = "LLdLLd" | ||
| 2940 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2941 | |||
| 2942 | __builtin_log2f16 | ||
| 2943 | .param_str = "hh" | ||
| 2944 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2945 | |||
| 2946 | __builtin_log2l | ||
| 2947 | .param_str = "LdLd" | ||
| 2948 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2949 | |||
| 2950 | __builtin_logb | ||
| 2951 | .param_str = "dd" | ||
| 2952 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2953 | |||
| 2954 | __builtin_logbf | ||
| 2955 | .param_str = "ff" | ||
| 2956 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2957 | |||
| 2958 | __builtin_logbf128 | ||
| 2959 | .param_str = "LLdLLd" | ||
| 2960 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2961 | |||
| 2962 | __builtin_logbl | ||
| 2963 | .param_str = "LdLd" | ||
| 2964 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2965 | |||
| 2966 | __builtin_logf | ||
| 2967 | .param_str = "ff" | ||
| 2968 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2969 | |||
| 2970 | __builtin_logf128 | ||
| 2971 | .param_str = "LLdLLd" | ||
| 2972 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2973 | |||
| 2974 | __builtin_logf16 | ||
| 2975 | .param_str = "hh" | ||
| 2976 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2977 | |||
| 2978 | __builtin_logl | ||
| 2979 | .param_str = "LdLd" | ||
| 2980 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2981 | |||
| 2982 | __builtin_longjmp | ||
| 2983 | .param_str = "vv**i" | ||
| 2984 | .attributes = .{ .noreturn = true } | ||
| 2985 | |||
| 2986 | __builtin_lrint | ||
| 2987 | .param_str = "Lid" | ||
| 2988 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2989 | |||
| 2990 | __builtin_lrintf | ||
| 2991 | .param_str = "Lif" | ||
| 2992 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2993 | |||
| 2994 | __builtin_lrintf128 | ||
| 2995 | .param_str = "LiLLd" | ||
| 2996 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2997 | |||
| 2998 | __builtin_lrintl | ||
| 2999 | .param_str = "LiLd" | ||
| 3000 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 3001 | |||
| 3002 | __builtin_lround | ||
| 3003 | .param_str = "Lid" | ||
| 3004 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 3005 | |||
| 3006 | __builtin_lroundf | ||
| 3007 | .param_str = "Lif" | ||
| 3008 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 3009 | |||
| 3010 | __builtin_lroundf128 | ||
| 3011 | .param_str = "LiLLd" | ||
| 3012 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 3013 | |||
| 3014 | __builtin_lroundl | ||
| 3015 | .param_str = "LiLd" | ||
| 3016 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 3017 | |||
| 3018 | __builtin_malloc | ||
| 3019 | .param_str = "v*z" | ||
| 3020 | .attributes = .{ .lib_function_with_builtin_prefix = true } | ||
| 3021 | |||
| 3022 | __builtin_matrix_column_major_load | ||
| 3023 | .param_str = "v." | ||
| 3024 | .attributes = .{ .custom_typecheck = true, .lib_function_with_builtin_prefix = true } | ||
| 3025 | |||
| 3026 | __builtin_matrix_column_major_store | ||
| 3027 | .param_str = "v." | ||
| 3028 | .attributes = .{ .custom_typecheck = true, .lib_function_with_builtin_prefix = true } | ||
| 3029 | |||
| 3030 | __builtin_matrix_transpose | ||
| 3031 | .param_str = "v." | ||
| 3032 | .attributes = .{ .custom_typecheck = true, .lib_function_with_builtin_prefix = true } | ||
| 3033 | |||
| 3034 | __builtin_memchr | ||
| 3035 | .param_str = "v*vC*iz" | ||
| 3036 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_evaluable = true } | ||
| 3037 | |||
| 3038 | __builtin_memcmp | ||
| 3039 | .param_str = "ivC*vC*z" | ||
| 3040 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_evaluable = true } | ||
| 3041 | |||
| 3042 | __builtin_memcpy | ||
| 3043 | .param_str = "v*v*vC*z" | ||
| 3044 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_evaluable = true } | ||
| 3045 | |||
| 3046 | __builtin_memcpy_inline | ||
| 3047 | .param_str = "vv*vC*Iz" | ||
| 3048 | |||
| 3049 | __builtin_memmove | ||
| 3050 | .param_str = "v*v*vC*z" | ||
| 3051 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_evaluable = true } | ||
| 3052 | |||
| 3053 | __builtin_mempcpy | ||
| 3054 | .param_str = "v*v*vC*z" | ||
| 3055 | .attributes = .{ .lib_function_with_builtin_prefix = true } | ||
| 3056 | |||
| 3057 | __builtin_memset | ||
| 3058 | .param_str = "v*v*iz" | ||
| 3059 | .attributes = .{ .lib_function_with_builtin_prefix = true } | ||
| 3060 | |||
| 3061 | __builtin_memset_inline | ||
| 3062 | .param_str = "vv*iIz" | ||
| 3063 | |||
| 3064 | __builtin_mips_absq_s_ph | ||
| 3065 | .param_str = "V2sV2s" | ||
| 3066 | .target_set = TargetSet.initOne(.mips) | ||
| 3067 | |||
| 3068 | __builtin_mips_absq_s_qb | ||
| 3069 | .param_str = "V4ScV4Sc" | ||
| 3070 | .target_set = TargetSet.initOne(.mips) | ||
| 3071 | |||
| 3072 | __builtin_mips_absq_s_w | ||
| 3073 | .param_str = "ii" | ||
| 3074 | .target_set = TargetSet.initOne(.mips) | ||
| 3075 | |||
| 3076 | __builtin_mips_addq_ph | ||
| 3077 | .param_str = "V2sV2sV2s" | ||
| 3078 | .target_set = TargetSet.initOne(.mips) | ||
| 3079 | |||
| 3080 | __builtin_mips_addq_s_ph | ||
| 3081 | .param_str = "V2sV2sV2s" | ||
| 3082 | .target_set = TargetSet.initOne(.mips) | ||
| 3083 | |||
| 3084 | __builtin_mips_addq_s_w | ||
| 3085 | .param_str = "iii" | ||
| 3086 | .target_set = TargetSet.initOne(.mips) | ||
| 3087 | |||
| 3088 | __builtin_mips_addqh_ph | ||
| 3089 | .param_str = "V2sV2sV2s" | ||
| 3090 | .target_set = TargetSet.initOne(.mips) | ||
| 3091 | .attributes = .{ .@"const" = true } | ||
| 3092 | |||
| 3093 | __builtin_mips_addqh_r_ph | ||
| 3094 | .param_str = "V2sV2sV2s" | ||
| 3095 | .target_set = TargetSet.initOne(.mips) | ||
| 3096 | .attributes = .{ .@"const" = true } | ||
| 3097 | |||
| 3098 | __builtin_mips_addqh_r_w | ||
| 3099 | .param_str = "iii" | ||
| 3100 | .target_set = TargetSet.initOne(.mips) | ||
| 3101 | .attributes = .{ .@"const" = true } | ||
| 3102 | |||
| 3103 | __builtin_mips_addqh_w | ||
| 3104 | .param_str = "iii" | ||
| 3105 | .target_set = TargetSet.initOne(.mips) | ||
| 3106 | .attributes = .{ .@"const" = true } | ||
| 3107 | |||
| 3108 | __builtin_mips_addsc | ||
| 3109 | .param_str = "iii" | ||
| 3110 | .target_set = TargetSet.initOne(.mips) | ||
| 3111 | |||
| 3112 | __builtin_mips_addu_ph | ||
| 3113 | .param_str = "V2sV2sV2s" | ||
| 3114 | .target_set = TargetSet.initOne(.mips) | ||
| 3115 | |||
| 3116 | __builtin_mips_addu_qb | ||
| 3117 | .param_str = "V4ScV4ScV4Sc" | ||
| 3118 | .target_set = TargetSet.initOne(.mips) | ||
| 3119 | |||
| 3120 | __builtin_mips_addu_s_ph | ||
| 3121 | .param_str = "V2sV2sV2s" | ||
| 3122 | .target_set = TargetSet.initOne(.mips) | ||
| 3123 | |||
| 3124 | __builtin_mips_addu_s_qb | ||
| 3125 | .param_str = "V4ScV4ScV4Sc" | ||
| 3126 | .target_set = TargetSet.initOne(.mips) | ||
| 3127 | |||
| 3128 | __builtin_mips_adduh_qb | ||
| 3129 | .param_str = "V4ScV4ScV4Sc" | ||
| 3130 | .target_set = TargetSet.initOne(.mips) | ||
| 3131 | .attributes = .{ .@"const" = true } | ||
| 3132 | |||
| 3133 | __builtin_mips_adduh_r_qb | ||
| 3134 | .param_str = "V4ScV4ScV4Sc" | ||
| 3135 | .target_set = TargetSet.initOne(.mips) | ||
| 3136 | .attributes = .{ .@"const" = true } | ||
| 3137 | |||
| 3138 | __builtin_mips_addwc | ||
| 3139 | .param_str = "iii" | ||
| 3140 | .target_set = TargetSet.initOne(.mips) | ||
| 3141 | |||
| 3142 | __builtin_mips_append | ||
| 3143 | .param_str = "iiiIi" | ||
| 3144 | .target_set = TargetSet.initOne(.mips) | ||
| 3145 | .attributes = .{ .@"const" = true } | ||
| 3146 | |||
| 3147 | __builtin_mips_balign | ||
| 3148 | .param_str = "iiiIi" | ||
| 3149 | .target_set = TargetSet.initOne(.mips) | ||
| 3150 | .attributes = .{ .@"const" = true } | ||
| 3151 | |||
| 3152 | __builtin_mips_bitrev | ||
| 3153 | .param_str = "ii" | ||
| 3154 | .target_set = TargetSet.initOne(.mips) | ||
| 3155 | .attributes = .{ .@"const" = true } | ||
| 3156 | |||
| 3157 | __builtin_mips_bposge32 | ||
| 3158 | .param_str = "i" | ||
| 3159 | .target_set = TargetSet.initOne(.mips) | ||
| 3160 | |||
| 3161 | __builtin_mips_cmp_eq_ph | ||
| 3162 | .param_str = "vV2sV2s" | ||
| 3163 | .target_set = TargetSet.initOne(.mips) | ||
| 3164 | |||
| 3165 | __builtin_mips_cmp_le_ph | ||
| 3166 | .param_str = "vV2sV2s" | ||
| 3167 | .target_set = TargetSet.initOne(.mips) | ||
| 3168 | |||
| 3169 | __builtin_mips_cmp_lt_ph | ||
| 3170 | .param_str = "vV2sV2s" | ||
| 3171 | .target_set = TargetSet.initOne(.mips) | ||
| 3172 | |||
| 3173 | __builtin_mips_cmpgdu_eq_qb | ||
| 3174 | .param_str = "iV4ScV4Sc" | ||
| 3175 | .target_set = TargetSet.initOne(.mips) | ||
| 3176 | |||
| 3177 | __builtin_mips_cmpgdu_le_qb | ||
| 3178 | .param_str = "iV4ScV4Sc" | ||
| 3179 | .target_set = TargetSet.initOne(.mips) | ||
| 3180 | |||
| 3181 | __builtin_mips_cmpgdu_lt_qb | ||
| 3182 | .param_str = "iV4ScV4Sc" | ||
| 3183 | .target_set = TargetSet.initOne(.mips) | ||
| 3184 | |||
| 3185 | __builtin_mips_cmpgu_eq_qb | ||
| 3186 | .param_str = "iV4ScV4Sc" | ||
| 3187 | .target_set = TargetSet.initOne(.mips) | ||
| 3188 | |||
| 3189 | __builtin_mips_cmpgu_le_qb | ||
| 3190 | .param_str = "iV4ScV4Sc" | ||
| 3191 | .target_set = TargetSet.initOne(.mips) | ||
| 3192 | |||
| 3193 | __builtin_mips_cmpgu_lt_qb | ||
| 3194 | .param_str = "iV4ScV4Sc" | ||
| 3195 | .target_set = TargetSet.initOne(.mips) | ||
| 3196 | |||
| 3197 | __builtin_mips_cmpu_eq_qb | ||
| 3198 | .param_str = "vV4ScV4Sc" | ||
| 3199 | .target_set = TargetSet.initOne(.mips) | ||
| 3200 | |||
| 3201 | __builtin_mips_cmpu_le_qb | ||
| 3202 | .param_str = "vV4ScV4Sc" | ||
| 3203 | .target_set = TargetSet.initOne(.mips) | ||
| 3204 | |||
| 3205 | __builtin_mips_cmpu_lt_qb | ||
| 3206 | .param_str = "vV4ScV4Sc" | ||
| 3207 | .target_set = TargetSet.initOne(.mips) | ||
| 3208 | |||
| 3209 | __builtin_mips_dpa_w_ph | ||
| 3210 | .param_str = "LLiLLiV2sV2s" | ||
| 3211 | .target_set = TargetSet.initOne(.mips) | ||
| 3212 | .attributes = .{ .@"const" = true } | ||
| 3213 | |||
| 3214 | __builtin_mips_dpaq_s_w_ph | ||
| 3215 | .param_str = "LLiLLiV2sV2s" | ||
| 3216 | .target_set = TargetSet.initOne(.mips) | ||
| 3217 | |||
| 3218 | __builtin_mips_dpaq_sa_l_w | ||
| 3219 | .param_str = "LLiLLiii" | ||
| 3220 | .target_set = TargetSet.initOne(.mips) | ||
| 3221 | |||
| 3222 | __builtin_mips_dpaqx_s_w_ph | ||
| 3223 | .param_str = "LLiLLiV2sV2s" | ||
| 3224 | .target_set = TargetSet.initOne(.mips) | ||
| 3225 | |||
| 3226 | __builtin_mips_dpaqx_sa_w_ph | ||
| 3227 | .param_str = "LLiLLiV2sV2s" | ||
| 3228 | .target_set = TargetSet.initOne(.mips) | ||
| 3229 | |||
| 3230 | __builtin_mips_dpau_h_qbl | ||
| 3231 | .param_str = "LLiLLiV4ScV4Sc" | ||
| 3232 | .target_set = TargetSet.initOne(.mips) | ||
| 3233 | .attributes = .{ .@"const" = true } | ||
| 3234 | |||
| 3235 | __builtin_mips_dpau_h_qbr | ||
| 3236 | .param_str = "LLiLLiV4ScV4Sc" | ||
| 3237 | .target_set = TargetSet.initOne(.mips) | ||
| 3238 | .attributes = .{ .@"const" = true } | ||
| 3239 | |||
| 3240 | __builtin_mips_dpax_w_ph | ||
| 3241 | .param_str = "LLiLLiV2sV2s" | ||
| 3242 | .target_set = TargetSet.initOne(.mips) | ||
| 3243 | .attributes = .{ .@"const" = true } | ||
| 3244 | |||
| 3245 | __builtin_mips_dps_w_ph | ||
| 3246 | .param_str = "LLiLLiV2sV2s" | ||
| 3247 | .target_set = TargetSet.initOne(.mips) | ||
| 3248 | .attributes = .{ .@"const" = true } | ||
| 3249 | |||
| 3250 | __builtin_mips_dpsq_s_w_ph | ||
| 3251 | .param_str = "LLiLLiV2sV2s" | ||
| 3252 | .target_set = TargetSet.initOne(.mips) | ||
| 3253 | |||
| 3254 | __builtin_mips_dpsq_sa_l_w | ||
| 3255 | .param_str = "LLiLLiii" | ||
| 3256 | .target_set = TargetSet.initOne(.mips) | ||
| 3257 | |||
| 3258 | __builtin_mips_dpsqx_s_w_ph | ||
| 3259 | .param_str = "LLiLLiV2sV2s" | ||
| 3260 | .target_set = TargetSet.initOne(.mips) | ||
| 3261 | |||
| 3262 | __builtin_mips_dpsqx_sa_w_ph | ||
| 3263 | .param_str = "LLiLLiV2sV2s" | ||
| 3264 | .target_set = TargetSet.initOne(.mips) | ||
| 3265 | |||
| 3266 | __builtin_mips_dpsu_h_qbl | ||
| 3267 | .param_str = "LLiLLiV4ScV4Sc" | ||
| 3268 | .target_set = TargetSet.initOne(.mips) | ||
| 3269 | .attributes = .{ .@"const" = true } | ||
| 3270 | |||
| 3271 | __builtin_mips_dpsu_h_qbr | ||
| 3272 | .param_str = "LLiLLiV4ScV4Sc" | ||
| 3273 | .target_set = TargetSet.initOne(.mips) | ||
| 3274 | .attributes = .{ .@"const" = true } | ||
| 3275 | |||
| 3276 | __builtin_mips_dpsx_w_ph | ||
| 3277 | .param_str = "LLiLLiV2sV2s" | ||
| 3278 | .target_set = TargetSet.initOne(.mips) | ||
| 3279 | .attributes = .{ .@"const" = true } | ||
| 3280 | |||
| 3281 | __builtin_mips_extp | ||
| 3282 | .param_str = "iLLii" | ||
| 3283 | .target_set = TargetSet.initOne(.mips) | ||
| 3284 | |||
| 3285 | __builtin_mips_extpdp | ||
| 3286 | .param_str = "iLLii" | ||
| 3287 | .target_set = TargetSet.initOne(.mips) | ||
| 3288 | |||
| 3289 | __builtin_mips_extr_r_w | ||
| 3290 | .param_str = "iLLii" | ||
| 3291 | .target_set = TargetSet.initOne(.mips) | ||
| 3292 | |||
| 3293 | __builtin_mips_extr_rs_w | ||
| 3294 | .param_str = "iLLii" | ||
| 3295 | .target_set = TargetSet.initOne(.mips) | ||
| 3296 | |||
| 3297 | __builtin_mips_extr_s_h | ||
| 3298 | .param_str = "iLLii" | ||
| 3299 | .target_set = TargetSet.initOne(.mips) | ||
| 3300 | |||
| 3301 | __builtin_mips_extr_w | ||
| 3302 | .param_str = "iLLii" | ||
| 3303 | .target_set = TargetSet.initOne(.mips) | ||
| 3304 | |||
| 3305 | __builtin_mips_insv | ||
| 3306 | .param_str = "iii" | ||
| 3307 | .target_set = TargetSet.initOne(.mips) | ||
| 3308 | |||
| 3309 | __builtin_mips_lbux | ||
| 3310 | .param_str = "iv*i" | ||
| 3311 | .target_set = TargetSet.initOne(.mips) | ||
| 3312 | |||
| 3313 | __builtin_mips_lhx | ||
| 3314 | .param_str = "iv*i" | ||
| 3315 | .target_set = TargetSet.initOne(.mips) | ||
| 3316 | |||
| 3317 | __builtin_mips_lwx | ||
| 3318 | .param_str = "iv*i" | ||
| 3319 | .target_set = TargetSet.initOne(.mips) | ||
| 3320 | |||
| 3321 | __builtin_mips_madd | ||
| 3322 | .param_str = "LLiLLiii" | ||
| 3323 | .target_set = TargetSet.initOne(.mips) | ||
| 3324 | .attributes = .{ .@"const" = true } | ||
| 3325 | |||
| 3326 | __builtin_mips_maddu | ||
| 3327 | .param_str = "LLiLLiUiUi" | ||
| 3328 | .target_set = TargetSet.initOne(.mips) | ||
| 3329 | .attributes = .{ .@"const" = true } | ||
| 3330 | |||
| 3331 | __builtin_mips_maq_s_w_phl | ||
| 3332 | .param_str = "LLiLLiV2sV2s" | ||
| 3333 | .target_set = TargetSet.initOne(.mips) | ||
| 3334 | |||
| 3335 | __builtin_mips_maq_s_w_phr | ||
| 3336 | .param_str = "LLiLLiV2sV2s" | ||
| 3337 | .target_set = TargetSet.initOne(.mips) | ||
| 3338 | |||
| 3339 | __builtin_mips_maq_sa_w_phl | ||
| 3340 | .param_str = "LLiLLiV2sV2s" | ||
| 3341 | .target_set = TargetSet.initOne(.mips) | ||
| 3342 | |||
| 3343 | __builtin_mips_maq_sa_w_phr | ||
| 3344 | .param_str = "LLiLLiV2sV2s" | ||
| 3345 | .target_set = TargetSet.initOne(.mips) | ||
| 3346 | |||
| 3347 | __builtin_mips_modsub | ||
| 3348 | .param_str = "iii" | ||
| 3349 | .target_set = TargetSet.initOne(.mips) | ||
| 3350 | .attributes = .{ .@"const" = true } | ||
| 3351 | |||
| 3352 | __builtin_mips_msub | ||
| 3353 | .param_str = "LLiLLiii" | ||
| 3354 | .target_set = TargetSet.initOne(.mips) | ||
| 3355 | .attributes = .{ .@"const" = true } | ||
| 3356 | |||
| 3357 | __builtin_mips_msubu | ||
| 3358 | .param_str = "LLiLLiUiUi" | ||
| 3359 | .target_set = TargetSet.initOne(.mips) | ||
| 3360 | .attributes = .{ .@"const" = true } | ||
| 3361 | |||
| 3362 | __builtin_mips_mthlip | ||
| 3363 | .param_str = "LLiLLii" | ||
| 3364 | .target_set = TargetSet.initOne(.mips) | ||
| 3365 | |||
| 3366 | __builtin_mips_mul_ph | ||
| 3367 | .param_str = "V2sV2sV2s" | ||
| 3368 | .target_set = TargetSet.initOne(.mips) | ||
| 3369 | |||
| 3370 | __builtin_mips_mul_s_ph | ||
| 3371 | .param_str = "V2sV2sV2s" | ||
| 3372 | .target_set = TargetSet.initOne(.mips) | ||
| 3373 | |||
| 3374 | __builtin_mips_muleq_s_w_phl | ||
| 3375 | .param_str = "iV2sV2s" | ||
| 3376 | .target_set = TargetSet.initOne(.mips) | ||
| 3377 | |||
| 3378 | __builtin_mips_muleq_s_w_phr | ||
| 3379 | .param_str = "iV2sV2s" | ||
| 3380 | .target_set = TargetSet.initOne(.mips) | ||
| 3381 | |||
| 3382 | __builtin_mips_muleu_s_ph_qbl | ||
| 3383 | .param_str = "V2sV4ScV2s" | ||
| 3384 | .target_set = TargetSet.initOne(.mips) | ||
| 3385 | |||
| 3386 | __builtin_mips_muleu_s_ph_qbr | ||
| 3387 | .param_str = "V2sV4ScV2s" | ||
| 3388 | .target_set = TargetSet.initOne(.mips) | ||
| 3389 | |||
| 3390 | __builtin_mips_mulq_rs_ph | ||
| 3391 | .param_str = "V2sV2sV2s" | ||
| 3392 | .target_set = TargetSet.initOne(.mips) | ||
| 3393 | |||
| 3394 | __builtin_mips_mulq_rs_w | ||
| 3395 | .param_str = "iii" | ||
| 3396 | .target_set = TargetSet.initOne(.mips) | ||
| 3397 | |||
| 3398 | __builtin_mips_mulq_s_ph | ||
| 3399 | .param_str = "V2sV2sV2s" | ||
| 3400 | .target_set = TargetSet.initOne(.mips) | ||
| 3401 | |||
| 3402 | __builtin_mips_mulq_s_w | ||
| 3403 | .param_str = "iii" | ||
| 3404 | .target_set = TargetSet.initOne(.mips) | ||
| 3405 | |||
| 3406 | __builtin_mips_mulsa_w_ph | ||
| 3407 | .param_str = "LLiLLiV2sV2s" | ||
| 3408 | .target_set = TargetSet.initOne(.mips) | ||
| 3409 | .attributes = .{ .@"const" = true } | ||
| 3410 | |||
| 3411 | __builtin_mips_mulsaq_s_w_ph | ||
| 3412 | .param_str = "LLiLLiV2sV2s" | ||
| 3413 | .target_set = TargetSet.initOne(.mips) | ||
| 3414 | |||
| 3415 | __builtin_mips_mult | ||
| 3416 | .param_str = "LLiii" | ||
| 3417 | .target_set = TargetSet.initOne(.mips) | ||
| 3418 | .attributes = .{ .@"const" = true } | ||
| 3419 | |||
| 3420 | __builtin_mips_multu | ||
| 3421 | .param_str = "LLiUiUi" | ||
| 3422 | .target_set = TargetSet.initOne(.mips) | ||
| 3423 | .attributes = .{ .@"const" = true } | ||
| 3424 | |||
| 3425 | __builtin_mips_packrl_ph | ||
| 3426 | .param_str = "V2sV2sV2s" | ||
| 3427 | .target_set = TargetSet.initOne(.mips) | ||
| 3428 | .attributes = .{ .@"const" = true } | ||
| 3429 | |||
| 3430 | __builtin_mips_pick_ph | ||
| 3431 | .param_str = "V2sV2sV2s" | ||
| 3432 | .target_set = TargetSet.initOne(.mips) | ||
| 3433 | |||
| 3434 | __builtin_mips_pick_qb | ||
| 3435 | .param_str = "V4ScV4ScV4Sc" | ||
| 3436 | .target_set = TargetSet.initOne(.mips) | ||
| 3437 | |||
| 3438 | __builtin_mips_preceq_w_phl | ||
| 3439 | .param_str = "iV2s" | ||
| 3440 | .target_set = TargetSet.initOne(.mips) | ||
| 3441 | .attributes = .{ .@"const" = true } | ||
| 3442 | |||
| 3443 | __builtin_mips_preceq_w_phr | ||
| 3444 | .param_str = "iV2s" | ||
| 3445 | .target_set = TargetSet.initOne(.mips) | ||
| 3446 | .attributes = .{ .@"const" = true } | ||
| 3447 | |||
| 3448 | __builtin_mips_precequ_ph_qbl | ||
| 3449 | .param_str = "V2sV4Sc" | ||
| 3450 | .target_set = TargetSet.initOne(.mips) | ||
| 3451 | .attributes = .{ .@"const" = true } | ||
| 3452 | |||
| 3453 | __builtin_mips_precequ_ph_qbla | ||
| 3454 | .param_str = "V2sV4Sc" | ||
| 3455 | .target_set = TargetSet.initOne(.mips) | ||
| 3456 | .attributes = .{ .@"const" = true } | ||
| 3457 | |||
| 3458 | __builtin_mips_precequ_ph_qbr | ||
| 3459 | .param_str = "V2sV4Sc" | ||
| 3460 | .target_set = TargetSet.initOne(.mips) | ||
| 3461 | .attributes = .{ .@"const" = true } | ||
| 3462 | |||
| 3463 | __builtin_mips_precequ_ph_qbra | ||
| 3464 | .param_str = "V2sV4Sc" | ||
| 3465 | .target_set = TargetSet.initOne(.mips) | ||
| 3466 | .attributes = .{ .@"const" = true } | ||
| 3467 | |||
| 3468 | __builtin_mips_preceu_ph_qbl | ||
| 3469 | .param_str = "V2sV4Sc" | ||
| 3470 | .target_set = TargetSet.initOne(.mips) | ||
| 3471 | .attributes = .{ .@"const" = true } | ||
| 3472 | |||
| 3473 | __builtin_mips_preceu_ph_qbla | ||
| 3474 | .param_str = "V2sV4Sc" | ||
| 3475 | .target_set = TargetSet.initOne(.mips) | ||
| 3476 | .attributes = .{ .@"const" = true } | ||
| 3477 | |||
| 3478 | __builtin_mips_preceu_ph_qbr | ||
| 3479 | .param_str = "V2sV4Sc" | ||
| 3480 | .target_set = TargetSet.initOne(.mips) | ||
| 3481 | .attributes = .{ .@"const" = true } | ||
| 3482 | |||
| 3483 | __builtin_mips_preceu_ph_qbra | ||
| 3484 | .param_str = "V2sV4Sc" | ||
| 3485 | .target_set = TargetSet.initOne(.mips) | ||
| 3486 | .attributes = .{ .@"const" = true } | ||
| 3487 | |||
| 3488 | __builtin_mips_precr_qb_ph | ||
| 3489 | .param_str = "V4ScV2sV2s" | ||
| 3490 | .target_set = TargetSet.initOne(.mips) | ||
| 3491 | |||
| 3492 | __builtin_mips_precr_sra_ph_w | ||
| 3493 | .param_str = "V2siiIi" | ||
| 3494 | .target_set = TargetSet.initOne(.mips) | ||
| 3495 | .attributes = .{ .@"const" = true } | ||
| 3496 | |||
| 3497 | __builtin_mips_precr_sra_r_ph_w | ||
| 3498 | .param_str = "V2siiIi" | ||
| 3499 | .target_set = TargetSet.initOne(.mips) | ||
| 3500 | .attributes = .{ .@"const" = true } | ||
| 3501 | |||
| 3502 | __builtin_mips_precrq_ph_w | ||
| 3503 | .param_str = "V2sii" | ||
| 3504 | .target_set = TargetSet.initOne(.mips) | ||
| 3505 | .attributes = .{ .@"const" = true } | ||
| 3506 | |||
| 3507 | __builtin_mips_precrq_qb_ph | ||
| 3508 | .param_str = "V4ScV2sV2s" | ||
| 3509 | .target_set = TargetSet.initOne(.mips) | ||
| 3510 | .attributes = .{ .@"const" = true } | ||
| 3511 | |||
| 3512 | __builtin_mips_precrq_rs_ph_w | ||
| 3513 | .param_str = "V2sii" | ||
| 3514 | .target_set = TargetSet.initOne(.mips) | ||
| 3515 | |||
| 3516 | __builtin_mips_precrqu_s_qb_ph | ||
| 3517 | .param_str = "V4ScV2sV2s" | ||
| 3518 | .target_set = TargetSet.initOne(.mips) | ||
| 3519 | |||
| 3520 | __builtin_mips_prepend | ||
| 3521 | .param_str = "iiiIi" | ||
| 3522 | .target_set = TargetSet.initOne(.mips) | ||
| 3523 | .attributes = .{ .@"const" = true } | ||
| 3524 | |||
| 3525 | __builtin_mips_raddu_w_qb | ||
| 3526 | .param_str = "iV4Sc" | ||
| 3527 | .target_set = TargetSet.initOne(.mips) | ||
| 3528 | .attributes = .{ .@"const" = true } | ||
| 3529 | |||
| 3530 | __builtin_mips_rddsp | ||
| 3531 | .param_str = "iIi" | ||
| 3532 | .target_set = TargetSet.initOne(.mips) | ||
| 3533 | |||
| 3534 | __builtin_mips_repl_ph | ||
| 3535 | .param_str = "V2si" | ||
| 3536 | .target_set = TargetSet.initOne(.mips) | ||
| 3537 | .attributes = .{ .@"const" = true } | ||
| 3538 | |||
| 3539 | __builtin_mips_repl_qb | ||
| 3540 | .param_str = "V4Sci" | ||
| 3541 | .target_set = TargetSet.initOne(.mips) | ||
| 3542 | .attributes = .{ .@"const" = true } | ||
| 3543 | |||
| 3544 | __builtin_mips_shilo | ||
| 3545 | .param_str = "LLiLLii" | ||
| 3546 | .target_set = TargetSet.initOne(.mips) | ||
| 3547 | .attributes = .{ .@"const" = true } | ||
| 3548 | |||
| 3549 | __builtin_mips_shll_ph | ||
| 3550 | .param_str = "V2sV2si" | ||
| 3551 | .target_set = TargetSet.initOne(.mips) | ||
| 3552 | |||
| 3553 | __builtin_mips_shll_qb | ||
| 3554 | .param_str = "V4ScV4Sci" | ||
| 3555 | .target_set = TargetSet.initOne(.mips) | ||
| 3556 | |||
| 3557 | __builtin_mips_shll_s_ph | ||
| 3558 | .param_str = "V2sV2si" | ||
| 3559 | .target_set = TargetSet.initOne(.mips) | ||
| 3560 | |||
| 3561 | __builtin_mips_shll_s_w | ||
| 3562 | .param_str = "iii" | ||
| 3563 | .target_set = TargetSet.initOne(.mips) | ||
| 3564 | |||
| 3565 | __builtin_mips_shra_ph | ||
| 3566 | .param_str = "V2sV2si" | ||
| 3567 | .target_set = TargetSet.initOne(.mips) | ||
| 3568 | .attributes = .{ .@"const" = true } | ||
| 3569 | |||
| 3570 | __builtin_mips_shra_qb | ||
| 3571 | .param_str = "V4ScV4Sci" | ||
| 3572 | .target_set = TargetSet.initOne(.mips) | ||
| 3573 | .attributes = .{ .@"const" = true } | ||
| 3574 | |||
| 3575 | __builtin_mips_shra_r_ph | ||
| 3576 | .param_str = "V2sV2si" | ||
| 3577 | .target_set = TargetSet.initOne(.mips) | ||
| 3578 | .attributes = .{ .@"const" = true } | ||
| 3579 | |||
| 3580 | __builtin_mips_shra_r_qb | ||
| 3581 | .param_str = "V4ScV4Sci" | ||
| 3582 | .target_set = TargetSet.initOne(.mips) | ||
| 3583 | .attributes = .{ .@"const" = true } | ||
| 3584 | |||
| 3585 | __builtin_mips_shra_r_w | ||
| 3586 | .param_str = "iii" | ||
| 3587 | .target_set = TargetSet.initOne(.mips) | ||
| 3588 | .attributes = .{ .@"const" = true } | ||
| 3589 | |||
| 3590 | __builtin_mips_shrl_ph | ||
| 3591 | .param_str = "V2sV2si" | ||
| 3592 | .target_set = TargetSet.initOne(.mips) | ||
| 3593 | .attributes = .{ .@"const" = true } | ||
| 3594 | |||
| 3595 | __builtin_mips_shrl_qb | ||
| 3596 | .param_str = "V4ScV4Sci" | ||
| 3597 | .target_set = TargetSet.initOne(.mips) | ||
| 3598 | .attributes = .{ .@"const" = true } | ||
| 3599 | |||
| 3600 | __builtin_mips_subq_ph | ||
| 3601 | .param_str = "V2sV2sV2s" | ||
| 3602 | .target_set = TargetSet.initOne(.mips) | ||
| 3603 | |||
| 3604 | __builtin_mips_subq_s_ph | ||
| 3605 | .param_str = "V2sV2sV2s" | ||
| 3606 | .target_set = TargetSet.initOne(.mips) | ||
| 3607 | |||
| 3608 | __builtin_mips_subq_s_w | ||
| 3609 | .param_str = "iii" | ||
| 3610 | .target_set = TargetSet.initOne(.mips) | ||
| 3611 | |||
| 3612 | __builtin_mips_subqh_ph | ||
| 3613 | .param_str = "V2sV2sV2s" | ||
| 3614 | .target_set = TargetSet.initOne(.mips) | ||
| 3615 | .attributes = .{ .@"const" = true } | ||
| 3616 | |||
| 3617 | __builtin_mips_subqh_r_ph | ||
| 3618 | .param_str = "V2sV2sV2s" | ||
| 3619 | .target_set = TargetSet.initOne(.mips) | ||
| 3620 | .attributes = .{ .@"const" = true } | ||
| 3621 | |||
| 3622 | __builtin_mips_subqh_r_w | ||
| 3623 | .param_str = "iii" | ||
| 3624 | .target_set = TargetSet.initOne(.mips) | ||
| 3625 | .attributes = .{ .@"const" = true } | ||
| 3626 | |||
| 3627 | __builtin_mips_subqh_w | ||
| 3628 | .param_str = "iii" | ||
| 3629 | .target_set = TargetSet.initOne(.mips) | ||
| 3630 | .attributes = .{ .@"const" = true } | ||
| 3631 | |||
| 3632 | __builtin_mips_subu_ph | ||
| 3633 | .param_str = "V2sV2sV2s" | ||
| 3634 | .target_set = TargetSet.initOne(.mips) | ||
| 3635 | |||
| 3636 | __builtin_mips_subu_qb | ||
| 3637 | .param_str = "V4ScV4ScV4Sc" | ||
| 3638 | .target_set = TargetSet.initOne(.mips) | ||
| 3639 | |||
| 3640 | __builtin_mips_subu_s_ph | ||
| 3641 | .param_str = "V2sV2sV2s" | ||
| 3642 | .target_set = TargetSet.initOne(.mips) | ||
| 3643 | |||
| 3644 | __builtin_mips_subu_s_qb | ||
| 3645 | .param_str = "V4ScV4ScV4Sc" | ||
| 3646 | .target_set = TargetSet.initOne(.mips) | ||
| 3647 | |||
| 3648 | __builtin_mips_subuh_qb | ||
| 3649 | .param_str = "V4ScV4ScV4Sc" | ||
| 3650 | .target_set = TargetSet.initOne(.mips) | ||
| 3651 | .attributes = .{ .@"const" = true } | ||
| 3652 | |||
| 3653 | __builtin_mips_subuh_r_qb | ||
| 3654 | .param_str = "V4ScV4ScV4Sc" | ||
| 3655 | .target_set = TargetSet.initOne(.mips) | ||
| 3656 | .attributes = .{ .@"const" = true } | ||
| 3657 | |||
| 3658 | __builtin_mips_wrdsp | ||
| 3659 | .param_str = "viIi" | ||
| 3660 | .target_set = TargetSet.initOne(.mips) | ||
| 3661 | |||
| 3662 | __builtin_modf | ||
| 3663 | .param_str = "ddd*" | ||
| 3664 | .attributes = .{ .lib_function_with_builtin_prefix = true } | ||
| 3665 | |||
| 3666 | __builtin_modff | ||
| 3667 | .param_str = "fff*" | ||
| 3668 | .attributes = .{ .lib_function_with_builtin_prefix = true } | ||
| 3669 | |||
| 3670 | __builtin_modff128 | ||
| 3671 | .param_str = "LLdLLdLLd*" | ||
| 3672 | .attributes = .{ .lib_function_with_builtin_prefix = true } | ||
| 3673 | |||
| 3674 | __builtin_modfl | ||
| 3675 | .param_str = "LdLdLd*" | ||
| 3676 | .attributes = .{ .lib_function_with_builtin_prefix = true } | ||
| 3677 | |||
| 3678 | __builtin_msa_add_a_b | ||
| 3679 | .param_str = "V16ScV16ScV16Sc" | ||
| 3680 | .target_set = TargetSet.initOne(.mips) | ||
| 3681 | .attributes = .{ .@"const" = true } | ||
| 3682 | |||
| 3683 | __builtin_msa_add_a_d | ||
| 3684 | .param_str = "V2SLLiV2SLLiV2SLLi" | ||
| 3685 | .target_set = TargetSet.initOne(.mips) | ||
| 3686 | .attributes = .{ .@"const" = true } | ||
| 3687 | |||
| 3688 | __builtin_msa_add_a_h | ||
| 3689 | .param_str = "V8SsV8SsV8Ss" | ||
| 3690 | .target_set = TargetSet.initOne(.mips) | ||
| 3691 | .attributes = .{ .@"const" = true } | ||
| 3692 | |||
| 3693 | __builtin_msa_add_a_w | ||
| 3694 | .param_str = "V4SiV4SiV4Si" | ||
| 3695 | .target_set = TargetSet.initOne(.mips) | ||
| 3696 | .attributes = .{ .@"const" = true } | ||
| 3697 | |||
| 3698 | __builtin_msa_adds_a_b | ||
| 3699 | .param_str = "V16ScV16ScV16Sc" | ||
| 3700 | .target_set = TargetSet.initOne(.mips) | ||
| 3701 | .attributes = .{ .@"const" = true } | ||
| 3702 | |||
| 3703 | __builtin_msa_adds_a_d | ||
| 3704 | .param_str = "V2SLLiV2SLLiV2SLLi" | ||
| 3705 | .target_set = TargetSet.initOne(.mips) | ||
| 3706 | .attributes = .{ .@"const" = true } | ||
| 3707 | |||
| 3708 | __builtin_msa_adds_a_h | ||
| 3709 | .param_str = "V8SsV8SsV8Ss" | ||
| 3710 | .target_set = TargetSet.initOne(.mips) | ||
| 3711 | .attributes = .{ .@"const" = true } | ||
| 3712 | |||
| 3713 | __builtin_msa_adds_a_w | ||
| 3714 | .param_str = "V4SiV4SiV4Si" | ||
| 3715 | .target_set = TargetSet.initOne(.mips) | ||
| 3716 | .attributes = .{ .@"const" = true } | ||
| 3717 | |||
| 3718 | __builtin_msa_adds_s_b | ||
| 3719 | .param_str = "V16ScV16ScV16Sc" | ||
| 3720 | .target_set = TargetSet.initOne(.mips) | ||
| 3721 | .attributes = .{ .@"const" = true } | ||
| 3722 | |||
| 3723 | __builtin_msa_adds_s_d | ||
| 3724 | .param_str = "V2SLLiV2SLLiV2SLLi" | ||
| 3725 | .target_set = TargetSet.initOne(.mips) | ||
| 3726 | .attributes = .{ .@"const" = true } | ||
| 3727 | |||
| 3728 | __builtin_msa_adds_s_h | ||
| 3729 | .param_str = "V8SsV8SsV8Ss" | ||
| 3730 | .target_set = TargetSet.initOne(.mips) | ||
| 3731 | .attributes = .{ .@"const" = true } | ||
| 3732 | |||
| 3733 | __builtin_msa_adds_s_w | ||
| 3734 | .param_str = "V4SiV4SiV4Si" | ||
| 3735 | .target_set = TargetSet.initOne(.mips) | ||
| 3736 | .attributes = .{ .@"const" = true } | ||
| 3737 | |||
| 3738 | __builtin_msa_adds_u_b | ||
| 3739 | .param_str = "V16UcV16UcV16Uc" | ||
| 3740 | .target_set = TargetSet.initOne(.mips) | ||
| 3741 | .attributes = .{ .@"const" = true } | ||
| 3742 | |||
| 3743 | __builtin_msa_adds_u_d | ||
| 3744 | .param_str = "V2ULLiV2ULLiV2ULLi" | ||
| 3745 | .target_set = TargetSet.initOne(.mips) | ||
| 3746 | .attributes = .{ .@"const" = true } | ||
| 3747 | |||
| 3748 | __builtin_msa_adds_u_h | ||
| 3749 | .param_str = "V8UsV8UsV8Us" | ||
| 3750 | .target_set = TargetSet.initOne(.mips) | ||
| 3751 | .attributes = .{ .@"const" = true } | ||
| 3752 | |||
| 3753 | __builtin_msa_adds_u_w | ||
| 3754 | .param_str = "V4UiV4UiV4Ui" | ||
| 3755 | .target_set = TargetSet.initOne(.mips) | ||
| 3756 | .attributes = .{ .@"const" = true } | ||
| 3757 | |||
| 3758 | __builtin_msa_addv_b | ||
| 3759 | .param_str = "V16cV16cV16c" | ||
| 3760 | .target_set = TargetSet.initOne(.mips) | ||
| 3761 | .attributes = .{ .@"const" = true } | ||
| 3762 | |||
| 3763 | __builtin_msa_addv_d | ||
| 3764 | .param_str = "V2LLiV2LLiV2LLi" | ||
| 3765 | .target_set = TargetSet.initOne(.mips) | ||
| 3766 | .attributes = .{ .@"const" = true } | ||
| 3767 | |||
| 3768 | __builtin_msa_addv_h | ||
| 3769 | .param_str = "V8sV8sV8s" | ||
| 3770 | .target_set = TargetSet.initOne(.mips) | ||
| 3771 | .attributes = .{ .@"const" = true } | ||
| 3772 | |||
| 3773 | __builtin_msa_addv_w | ||
| 3774 | .param_str = "V4iV4iV4i" | ||
| 3775 | .target_set = TargetSet.initOne(.mips) | ||
| 3776 | .attributes = .{ .@"const" = true } | ||
| 3777 | |||
| 3778 | __builtin_msa_addvi_b | ||
| 3779 | .param_str = "V16cV16cIUi" | ||
| 3780 | .target_set = TargetSet.initOne(.mips) | ||
| 3781 | .attributes = .{ .@"const" = true } | ||
| 3782 | |||
| 3783 | __builtin_msa_addvi_d | ||
| 3784 | .param_str = "V2LLiV2LLiIUi" | ||
| 3785 | .target_set = TargetSet.initOne(.mips) | ||
| 3786 | .attributes = .{ .@"const" = true } | ||
| 3787 | |||
| 3788 | __builtin_msa_addvi_h | ||
| 3789 | .param_str = "V8sV8sIUi" | ||
| 3790 | .target_set = TargetSet.initOne(.mips) | ||
| 3791 | .attributes = .{ .@"const" = true } | ||
| 3792 | |||
| 3793 | __builtin_msa_addvi_w | ||
| 3794 | .param_str = "V4iV4iIUi" | ||
| 3795 | .target_set = TargetSet.initOne(.mips) | ||
| 3796 | .attributes = .{ .@"const" = true } | ||
| 3797 | |||
| 3798 | __builtin_msa_and_v | ||
| 3799 | .param_str = "V16UcV16UcV16Uc" | ||
| 3800 | .target_set = TargetSet.initOne(.mips) | ||
| 3801 | .attributes = .{ .@"const" = true } | ||
| 3802 | |||
| 3803 | __builtin_msa_andi_b | ||
| 3804 | .param_str = "V16UcV16UcIUi" | ||
| 3805 | .target_set = TargetSet.initOne(.mips) | ||
| 3806 | .attributes = .{ .@"const" = true } | ||
| 3807 | |||
| 3808 | __builtin_msa_asub_s_b | ||
| 3809 | .param_str = "V16ScV16ScV16Sc" | ||
| 3810 | .target_set = TargetSet.initOne(.mips) | ||
| 3811 | .attributes = .{ .@"const" = true } | ||
| 3812 | |||
| 3813 | __builtin_msa_asub_s_d | ||
| 3814 | .param_str = "V2SLLiV2SLLiV2SLLi" | ||
| 3815 | .target_set = TargetSet.initOne(.mips) | ||
| 3816 | .attributes = .{ .@"const" = true } | ||
| 3817 | |||
| 3818 | __builtin_msa_asub_s_h | ||
| 3819 | .param_str = "V8SsV8SsV8Ss" | ||
| 3820 | .target_set = TargetSet.initOne(.mips) | ||
| 3821 | .attributes = .{ .@"const" = true } | ||
| 3822 | |||
| 3823 | __builtin_msa_asub_s_w | ||
| 3824 | .param_str = "V4SiV4SiV4Si" | ||
| 3825 | .target_set = TargetSet.initOne(.mips) | ||
| 3826 | .attributes = .{ .@"const" = true } | ||
| 3827 | |||
| 3828 | __builtin_msa_asub_u_b | ||
| 3829 | .param_str = "V16UcV16UcV16Uc" | ||
| 3830 | .target_set = TargetSet.initOne(.mips) | ||
| 3831 | .attributes = .{ .@"const" = true } | ||
| 3832 | |||
| 3833 | __builtin_msa_asub_u_d | ||
| 3834 | .param_str = "V2ULLiV2ULLiV2ULLi" | ||
| 3835 | .target_set = TargetSet.initOne(.mips) | ||
| 3836 | .attributes = .{ .@"const" = true } | ||
| 3837 | |||
| 3838 | __builtin_msa_asub_u_h | ||
| 3839 | .param_str = "V8UsV8UsV8Us" | ||
| 3840 | .target_set = TargetSet.initOne(.mips) | ||
| 3841 | .attributes = .{ .@"const" = true } | ||
| 3842 | |||
| 3843 | __builtin_msa_asub_u_w | ||
| 3844 | .param_str = "V4UiV4UiV4Ui" | ||
| 3845 | .target_set = TargetSet.initOne(.mips) | ||
| 3846 | .attributes = .{ .@"const" = true } | ||
| 3847 | |||
| 3848 | __builtin_msa_ave_s_b | ||
| 3849 | .param_str = "V16ScV16ScV16Sc" | ||
| 3850 | .target_set = TargetSet.initOne(.mips) | ||
| 3851 | .attributes = .{ .@"const" = true } | ||
| 3852 | |||
| 3853 | __builtin_msa_ave_s_d | ||
| 3854 | .param_str = "V2SLLiV2SLLiV2SLLi" | ||
| 3855 | .target_set = TargetSet.initOne(.mips) | ||
| 3856 | .attributes = .{ .@"const" = true } | ||
| 3857 | |||
| 3858 | __builtin_msa_ave_s_h | ||
| 3859 | .param_str = "V8SsV8SsV8Ss" | ||
| 3860 | .target_set = TargetSet.initOne(.mips) | ||
| 3861 | .attributes = .{ .@"const" = true } | ||
| 3862 | |||
| 3863 | __builtin_msa_ave_s_w | ||
| 3864 | .param_str = "V4SiV4SiV4Si" | ||
| 3865 | .target_set = TargetSet.initOne(.mips) | ||
| 3866 | .attributes = .{ .@"const" = true } | ||
| 3867 | |||
| 3868 | __builtin_msa_ave_u_b | ||
| 3869 | .param_str = "V16UcV16UcV16Uc" | ||
| 3870 | .target_set = TargetSet.initOne(.mips) | ||
| 3871 | .attributes = .{ .@"const" = true } | ||
| 3872 | |||
| 3873 | __builtin_msa_ave_u_d | ||
| 3874 | .param_str = "V2ULLiV2ULLiV2ULLi" | ||
| 3875 | .target_set = TargetSet.initOne(.mips) | ||
| 3876 | .attributes = .{ .@"const" = true } | ||
| 3877 | |||
| 3878 | __builtin_msa_ave_u_h | ||
| 3879 | .param_str = "V8UsV8UsV8Us" | ||
| 3880 | .target_set = TargetSet.initOne(.mips) | ||
| 3881 | .attributes = .{ .@"const" = true } | ||
| 3882 | |||
| 3883 | __builtin_msa_ave_u_w | ||
| 3884 | .param_str = "V4UiV4UiV4Ui" | ||
| 3885 | .target_set = TargetSet.initOne(.mips) | ||
| 3886 | .attributes = .{ .@"const" = true } | ||
| 3887 | |||
| 3888 | __builtin_msa_aver_s_b | ||
| 3889 | .param_str = "V16ScV16ScV16Sc" | ||
| 3890 | .target_set = TargetSet.initOne(.mips) | ||
| 3891 | .attributes = .{ .@"const" = true } | ||
| 3892 | |||
| 3893 | __builtin_msa_aver_s_d | ||
| 3894 | .param_str = "V2SLLiV2SLLiV2SLLi" | ||
| 3895 | .target_set = TargetSet.initOne(.mips) | ||
| 3896 | .attributes = .{ .@"const" = true } | ||
| 3897 | |||
| 3898 | __builtin_msa_aver_s_h | ||
| 3899 | .param_str = "V8SsV8SsV8Ss" | ||
| 3900 | .target_set = TargetSet.initOne(.mips) | ||
| 3901 | .attributes = .{ .@"const" = true } | ||
| 3902 | |||
| 3903 | __builtin_msa_aver_s_w | ||
| 3904 | .param_str = "V4SiV4SiV4Si" | ||
| 3905 | .target_set = TargetSet.initOne(.mips) | ||
| 3906 | .attributes = .{ .@"const" = true } | ||
| 3907 | |||
| 3908 | __builtin_msa_aver_u_b | ||
| 3909 | .param_str = "V16UcV16UcV16Uc" | ||
| 3910 | .target_set = TargetSet.initOne(.mips) | ||
| 3911 | .attributes = .{ .@"const" = true } | ||
| 3912 | |||
| 3913 | __builtin_msa_aver_u_d | ||
| 3914 | .param_str = "V2ULLiV2ULLiV2ULLi" | ||
| 3915 | .target_set = TargetSet.initOne(.mips) | ||
| 3916 | .attributes = .{ .@"const" = true } | ||
| 3917 | |||
| 3918 | __builtin_msa_aver_u_h | ||
| 3919 | .param_str = "V8UsV8UsV8Us" | ||
| 3920 | .target_set = TargetSet.initOne(.mips) | ||
| 3921 | .attributes = .{ .@"const" = true } | ||
| 3922 | |||
| 3923 | __builtin_msa_aver_u_w | ||
| 3924 | .param_str = "V4UiV4UiV4Ui" | ||
| 3925 | .target_set = TargetSet.initOne(.mips) | ||
| 3926 | .attributes = .{ .@"const" = true } | ||
| 3927 | |||
| 3928 | __builtin_msa_bclr_b | ||
| 3929 | .param_str = "V16UcV16UcV16Uc" | ||
| 3930 | .target_set = TargetSet.initOne(.mips) | ||
| 3931 | .attributes = .{ .@"const" = true } | ||
| 3932 | |||
| 3933 | __builtin_msa_bclr_d | ||
| 3934 | .param_str = "V2ULLiV2ULLiV2ULLi" | ||
| 3935 | .target_set = TargetSet.initOne(.mips) | ||
| 3936 | .attributes = .{ .@"const" = true } | ||
| 3937 | |||
| 3938 | __builtin_msa_bclr_h | ||
| 3939 | .param_str = "V8UsV8UsV8Us" | ||
| 3940 | .target_set = TargetSet.initOne(.mips) | ||
| 3941 | .attributes = .{ .@"const" = true } | ||
| 3942 | |||
| 3943 | __builtin_msa_bclr_w | ||
| 3944 | .param_str = "V4UiV4UiV4Ui" | ||
| 3945 | .target_set = TargetSet.initOne(.mips) | ||
| 3946 | .attributes = .{ .@"const" = true } | ||
| 3947 | |||
| 3948 | __builtin_msa_bclri_b | ||
| 3949 | .param_str = "V16UcV16UcIUi" | ||
| 3950 | .target_set = TargetSet.initOne(.mips) | ||
| 3951 | .attributes = .{ .@"const" = true } | ||
| 3952 | |||
| 3953 | __builtin_msa_bclri_d | ||
| 3954 | .param_str = "V2ULLiV2ULLiIUi" | ||
| 3955 | .target_set = TargetSet.initOne(.mips) | ||
| 3956 | .attributes = .{ .@"const" = true } | ||
| 3957 | |||
| 3958 | __builtin_msa_bclri_h | ||
| 3959 | .param_str = "V8UsV8UsIUi" | ||
| 3960 | .target_set = TargetSet.initOne(.mips) | ||
| 3961 | .attributes = .{ .@"const" = true } | ||
| 3962 | |||
| 3963 | __builtin_msa_bclri_w | ||
| 3964 | .param_str = "V4UiV4UiIUi" | ||
| 3965 | .target_set = TargetSet.initOne(.mips) | ||
| 3966 | .attributes = .{ .@"const" = true } | ||
| 3967 | |||
| 3968 | __builtin_msa_binsl_b | ||
| 3969 | .param_str = "V16UcV16UcV16UcV16Uc" | ||
| 3970 | .target_set = TargetSet.initOne(.mips) | ||
| 3971 | .attributes = .{ .@"const" = true } | ||
| 3972 | |||
| 3973 | __builtin_msa_binsl_d | ||
| 3974 | .param_str = "V2ULLiV2ULLiV2ULLiV2ULLi" | ||
| 3975 | .target_set = TargetSet.initOne(.mips) | ||
| 3976 | .attributes = .{ .@"const" = true } | ||
| 3977 | |||
| 3978 | __builtin_msa_binsl_h | ||
| 3979 | .param_str = "V8UsV8UsV8UsV8Us" | ||
| 3980 | .target_set = TargetSet.initOne(.mips) | ||
| 3981 | .attributes = .{ .@"const" = true } | ||
| 3982 | |||
| 3983 | __builtin_msa_binsl_w | ||
| 3984 | .param_str = "V4UiV4UiV4UiV4Ui" | ||
| 3985 | .target_set = TargetSet.initOne(.mips) | ||
| 3986 | .attributes = .{ .@"const" = true } | ||
| 3987 | |||
| 3988 | __builtin_msa_binsli_b | ||
| 3989 | .param_str = "V16UcV16UcV16UcIUi" | ||
| 3990 | .target_set = TargetSet.initOne(.mips) | ||
| 3991 | .attributes = .{ .@"const" = true } | ||
| 3992 | |||
| 3993 | __builtin_msa_binsli_d | ||
| 3994 | .param_str = "V2ULLiV2ULLiV2ULLiIUi" | ||
| 3995 | .target_set = TargetSet.initOne(.mips) | ||
| 3996 | .attributes = .{ .@"const" = true } | ||
| 3997 | |||
| 3998 | __builtin_msa_binsli_h | ||
| 3999 | .param_str = "V8UsV8UsV8UsIUi" | ||
| 4000 | .target_set = TargetSet.initOne(.mips) | ||
| 4001 | .attributes = .{ .@"const" = true } | ||
| 4002 | |||
| 4003 | __builtin_msa_binsli_w | ||
| 4004 | .param_str = "V4UiV4UiV4UiIUi" | ||
| 4005 | .target_set = TargetSet.initOne(.mips) | ||
| 4006 | .attributes = .{ .@"const" = true } | ||
| 4007 | |||
| 4008 | __builtin_msa_binsr_b | ||
| 4009 | .param_str = "V16UcV16UcV16UcV16Uc" | ||
| 4010 | .target_set = TargetSet.initOne(.mips) | ||
| 4011 | .attributes = .{ .@"const" = true } | ||
| 4012 | |||
| 4013 | __builtin_msa_binsr_d | ||
| 4014 | .param_str = "V2ULLiV2ULLiV2ULLiV2ULLi" | ||
| 4015 | .target_set = TargetSet.initOne(.mips) | ||
| 4016 | .attributes = .{ .@"const" = true } | ||
| 4017 | |||
| 4018 | __builtin_msa_binsr_h | ||
| 4019 | .param_str = "V8UsV8UsV8UsV8Us" | ||
| 4020 | .target_set = TargetSet.initOne(.mips) | ||
| 4021 | .attributes = .{ .@"const" = true } | ||
| 4022 | |||
| 4023 | __builtin_msa_binsr_w | ||
| 4024 | .param_str = "V4UiV4UiV4UiV4Ui" | ||
| 4025 | .target_set = TargetSet.initOne(.mips) | ||
| 4026 | .attributes = .{ .@"const" = true } | ||
| 4027 | |||
| 4028 | __builtin_msa_binsri_b | ||
| 4029 | .param_str = "V16UcV16UcV16UcIUi" | ||
| 4030 | .target_set = TargetSet.initOne(.mips) | ||
| 4031 | .attributes = .{ .@"const" = true } | ||
| 4032 | |||
| 4033 | __builtin_msa_binsri_d | ||
| 4034 | .param_str = "V2ULLiV2ULLiV2ULLiIUi" | ||
| 4035 | .target_set = TargetSet.initOne(.mips) | ||
| 4036 | .attributes = .{ .@"const" = true } | ||
| 4037 | |||
| 4038 | __builtin_msa_binsri_h | ||
| 4039 | .param_str = "V8UsV8UsV8UsIUi" | ||
| 4040 | .target_set = TargetSet.initOne(.mips) | ||
| 4041 | .attributes = .{ .@"const" = true } | ||
| 4042 | |||
| 4043 | __builtin_msa_binsri_w | ||
| 4044 | .param_str = "V4UiV4UiV4UiIUi" | ||
| 4045 | .target_set = TargetSet.initOne(.mips) | ||
| 4046 | .attributes = .{ .@"const" = true } | ||
| 4047 | |||
| 4048 | __builtin_msa_bmnz_v | ||
| 4049 | .param_str = "V16UcV16UcV16UcV16Uc" | ||
| 4050 | .target_set = TargetSet.initOne(.mips) | ||
| 4051 | .attributes = .{ .@"const" = true } | ||
| 4052 | |||
| 4053 | __builtin_msa_bmnzi_b | ||
| 4054 | .param_str = "V16UcV16UcV16UcIUi" | ||
| 4055 | .target_set = TargetSet.initOne(.mips) | ||
| 4056 | .attributes = .{ .@"const" = true } | ||
| 4057 | |||
| 4058 | __builtin_msa_bmz_v | ||
| 4059 | .param_str = "V16UcV16UcV16UcV16Uc" | ||
| 4060 | .target_set = TargetSet.initOne(.mips) | ||
| 4061 | .attributes = .{ .@"const" = true } | ||
| 4062 | |||
| 4063 | __builtin_msa_bmzi_b | ||
| 4064 | .param_str = "V16UcV16UcV16UcIUi" | ||
| 4065 | .target_set = TargetSet.initOne(.mips) | ||
| 4066 | .attributes = .{ .@"const" = true } | ||
| 4067 | |||
| 4068 | __builtin_msa_bneg_b | ||
| 4069 | .param_str = "V16UcV16UcV16Uc" | ||
| 4070 | .target_set = TargetSet.initOne(.mips) | ||
| 4071 | .attributes = .{ .@"const" = true } | ||
| 4072 | |||
| 4073 | __builtin_msa_bneg_d | ||
| 4074 | .param_str = "V2ULLiV2ULLiV2ULLi" | ||
| 4075 | .target_set = TargetSet.initOne(.mips) | ||
| 4076 | .attributes = .{ .@"const" = true } | ||
| 4077 | |||
| 4078 | __builtin_msa_bneg_h | ||
| 4079 | .param_str = "V8UsV8UsV8Us" | ||
| 4080 | .target_set = TargetSet.initOne(.mips) | ||
| 4081 | .attributes = .{ .@"const" = true } | ||
| 4082 | |||
| 4083 | __builtin_msa_bneg_w | ||
| 4084 | .param_str = "V4UiV4UiV4Ui" | ||
| 4085 | .target_set = TargetSet.initOne(.mips) | ||
| 4086 | .attributes = .{ .@"const" = true } | ||
| 4087 | |||
| 4088 | __builtin_msa_bnegi_b | ||
| 4089 | .param_str = "V16UcV16UcIUi" | ||
| 4090 | .target_set = TargetSet.initOne(.mips) | ||
| 4091 | .attributes = .{ .@"const" = true } | ||
| 4092 | |||
| 4093 | __builtin_msa_bnegi_d | ||
| 4094 | .param_str = "V2ULLiV2ULLiIUi" | ||
| 4095 | .target_set = TargetSet.initOne(.mips) | ||
| 4096 | .attributes = .{ .@"const" = true } | ||
| 4097 | |||
| 4098 | __builtin_msa_bnegi_h | ||
| 4099 | .param_str = "V8UsV8UsIUi" | ||
| 4100 | .target_set = TargetSet.initOne(.mips) | ||
| 4101 | .attributes = .{ .@"const" = true } | ||
| 4102 | |||
| 4103 | __builtin_msa_bnegi_w | ||
| 4104 | .param_str = "V4UiV4UiIUi" | ||
| 4105 | .target_set = TargetSet.initOne(.mips) | ||
| 4106 | .attributes = .{ .@"const" = true } | ||
| 4107 | |||
| 4108 | __builtin_msa_bnz_b | ||
| 4109 | .param_str = "iV16Uc" | ||
| 4110 | .target_set = TargetSet.initOne(.mips) | ||
| 4111 | .attributes = .{ .@"const" = true } | ||
| 4112 | |||
| 4113 | __builtin_msa_bnz_d | ||
| 4114 | .param_str = "iV2ULLi" | ||
| 4115 | .target_set = TargetSet.initOne(.mips) | ||
| 4116 | .attributes = .{ .@"const" = true } | ||
| 4117 | |||
| 4118 | __builtin_msa_bnz_h | ||
| 4119 | .param_str = "iV8Us" | ||
| 4120 | .target_set = TargetSet.initOne(.mips) | ||
| 4121 | .attributes = .{ .@"const" = true } | ||
| 4122 | |||
| 4123 | __builtin_msa_bnz_v | ||
| 4124 | .param_str = "iV16Uc" | ||
| 4125 | .target_set = TargetSet.initOne(.mips) | ||
| 4126 | .attributes = .{ .@"const" = true } | ||
| 4127 | |||
| 4128 | __builtin_msa_bnz_w | ||
| 4129 | .param_str = "iV4Ui" | ||
| 4130 | .target_set = TargetSet.initOne(.mips) | ||
| 4131 | .attributes = .{ .@"const" = true } | ||
| 4132 | |||
| 4133 | __builtin_msa_bsel_v | ||
| 4134 | .param_str = "V16UcV16UcV16UcV16Uc" | ||
| 4135 | .target_set = TargetSet.initOne(.mips) | ||
| 4136 | .attributes = .{ .@"const" = true } | ||
| 4137 | |||
| 4138 | __builtin_msa_bseli_b | ||
| 4139 | .param_str = "V16UcV16UcV16UcIUi" | ||
| 4140 | .target_set = TargetSet.initOne(.mips) | ||
| 4141 | .attributes = .{ .@"const" = true } | ||
| 4142 | |||
| 4143 | __builtin_msa_bset_b | ||
| 4144 | .param_str = "V16UcV16UcV16Uc" | ||
| 4145 | .target_set = TargetSet.initOne(.mips) | ||
| 4146 | .attributes = .{ .@"const" = true } | ||
| 4147 | |||
| 4148 | __builtin_msa_bset_d | ||
| 4149 | .param_str = "V2ULLiV2ULLiV2ULLi" | ||
| 4150 | .target_set = TargetSet.initOne(.mips) | ||
| 4151 | .attributes = .{ .@"const" = true } | ||
| 4152 | |||
| 4153 | __builtin_msa_bset_h | ||
| 4154 | .param_str = "V8UsV8UsV8Us" | ||
| 4155 | .target_set = TargetSet.initOne(.mips) | ||
| 4156 | .attributes = .{ .@"const" = true } | ||
| 4157 | |||
| 4158 | __builtin_msa_bset_w | ||
| 4159 | .param_str = "V4UiV4UiV4Ui" | ||
| 4160 | .target_set = TargetSet.initOne(.mips) | ||
| 4161 | .attributes = .{ .@"const" = true } | ||
| 4162 | |||
| 4163 | __builtin_msa_bseti_b | ||
| 4164 | .param_str = "V16UcV16UcIUi" | ||
| 4165 | .target_set = TargetSet.initOne(.mips) | ||
| 4166 | .attributes = .{ .@"const" = true } | ||
| 4167 | |||
| 4168 | __builtin_msa_bseti_d | ||
| 4169 | .param_str = "V2ULLiV2ULLiIUi" | ||
| 4170 | .target_set = TargetSet.initOne(.mips) | ||
| 4171 | .attributes = .{ .@"const" = true } | ||
| 4172 | |||
| 4173 | __builtin_msa_bseti_h | ||
| 4174 | .param_str = "V8UsV8UsIUi" | ||
| 4175 | .target_set = TargetSet.initOne(.mips) | ||
| 4176 | .attributes = .{ .@"const" = true } | ||
| 4177 | |||
| 4178 | __builtin_msa_bseti_w | ||
| 4179 | .param_str = "V4UiV4UiIUi" | ||
| 4180 | .target_set = TargetSet.initOne(.mips) | ||
| 4181 | .attributes = .{ .@"const" = true } | ||
| 4182 | |||
| 4183 | __builtin_msa_bz_b | ||
| 4184 | .param_str = "iV16Uc" | ||
| 4185 | .target_set = TargetSet.initOne(.mips) | ||
| 4186 | .attributes = .{ .@"const" = true } | ||
| 4187 | |||
| 4188 | __builtin_msa_bz_d | ||
| 4189 | .param_str = "iV2ULLi" | ||
| 4190 | .target_set = TargetSet.initOne(.mips) | ||
| 4191 | .attributes = .{ .@"const" = true } | ||
| 4192 | |||
| 4193 | __builtin_msa_bz_h | ||
| 4194 | .param_str = "iV8Us" | ||
| 4195 | .target_set = TargetSet.initOne(.mips) | ||
| 4196 | .attributes = .{ .@"const" = true } | ||
| 4197 | |||
| 4198 | __builtin_msa_bz_v | ||
| 4199 | .param_str = "iV16Uc" | ||
| 4200 | .target_set = TargetSet.initOne(.mips) | ||
| 4201 | .attributes = .{ .@"const" = true } | ||
| 4202 | |||
| 4203 | __builtin_msa_bz_w | ||
| 4204 | .param_str = "iV4Ui" | ||
| 4205 | .target_set = TargetSet.initOne(.mips) | ||
| 4206 | .attributes = .{ .@"const" = true } | ||
| 4207 | |||
| 4208 | __builtin_msa_ceq_b | ||
| 4209 | .param_str = "V16ScV16ScV16Sc" | ||
| 4210 | .target_set = TargetSet.initOne(.mips) | ||
| 4211 | .attributes = .{ .@"const" = true } | ||
| 4212 | |||
| 4213 | __builtin_msa_ceq_d | ||
| 4214 | .param_str = "V2SLLiV2SLLiV2SLLi" | ||
| 4215 | .target_set = TargetSet.initOne(.mips) | ||
| 4216 | .attributes = .{ .@"const" = true } | ||
| 4217 | |||
| 4218 | __builtin_msa_ceq_h | ||
| 4219 | .param_str = "V8SsV8SsV8Ss" | ||
| 4220 | .target_set = TargetSet.initOne(.mips) | ||
| 4221 | .attributes = .{ .@"const" = true } | ||
| 4222 | |||
| 4223 | __builtin_msa_ceq_w | ||
| 4224 | .param_str = "V4SiV4SiV4Si" | ||
| 4225 | .target_set = TargetSet.initOne(.mips) | ||
| 4226 | .attributes = .{ .@"const" = true } | ||
| 4227 | |||
| 4228 | __builtin_msa_ceqi_b | ||
| 4229 | .param_str = "V16ScV16ScISi" | ||
| 4230 | .target_set = TargetSet.initOne(.mips) | ||
| 4231 | .attributes = .{ .@"const" = true } | ||
| 4232 | |||
| 4233 | __builtin_msa_ceqi_d | ||
| 4234 | .param_str = "V2SLLiV2SLLiISi" | ||
| 4235 | .target_set = TargetSet.initOne(.mips) | ||
| 4236 | .attributes = .{ .@"const" = true } | ||
| 4237 | |||
| 4238 | __builtin_msa_ceqi_h | ||
| 4239 | .param_str = "V8SsV8SsISi" | ||
| 4240 | .target_set = TargetSet.initOne(.mips) | ||
| 4241 | .attributes = .{ .@"const" = true } | ||
| 4242 | |||
| 4243 | __builtin_msa_ceqi_w | ||
| 4244 | .param_str = "V4SiV4SiISi" | ||
| 4245 | .target_set = TargetSet.initOne(.mips) | ||
| 4246 | .attributes = .{ .@"const" = true } | ||
| 4247 | |||
| 4248 | __builtin_msa_cfcmsa | ||
| 4249 | .param_str = "iIi" | ||
| 4250 | .target_set = TargetSet.initOne(.mips) | ||
| 4251 | |||
| 4252 | __builtin_msa_cle_s_b | ||
| 4253 | .param_str = "V16ScV16ScV16Sc" | ||
| 4254 | .target_set = TargetSet.initOne(.mips) | ||
| 4255 | .attributes = .{ .@"const" = true } | ||
| 4256 | |||
| 4257 | __builtin_msa_cle_s_d | ||
| 4258 | .param_str = "V2SLLiV2SLLiV2SLLi" | ||
| 4259 | .target_set = TargetSet.initOne(.mips) | ||
| 4260 | .attributes = .{ .@"const" = true } | ||
| 4261 | |||
| 4262 | __builtin_msa_cle_s_h | ||
| 4263 | .param_str = "V8SsV8SsV8Ss" | ||
| 4264 | .target_set = TargetSet.initOne(.mips) | ||
| 4265 | .attributes = .{ .@"const" = true } | ||
| 4266 | |||
| 4267 | __builtin_msa_cle_s_w | ||
| 4268 | .param_str = "V4SiV4SiV4Si" | ||
| 4269 | .target_set = TargetSet.initOne(.mips) | ||
| 4270 | .attributes = .{ .@"const" = true } | ||
| 4271 | |||
| 4272 | __builtin_msa_cle_u_b | ||
| 4273 | .param_str = "V16ScV16UcV16Uc" | ||
| 4274 | .target_set = TargetSet.initOne(.mips) | ||
| 4275 | .attributes = .{ .@"const" = true } | ||
| 4276 | |||
| 4277 | __builtin_msa_cle_u_d | ||
| 4278 | .param_str = "V2SLLiV2ULLiV2ULLi" | ||
| 4279 | .target_set = TargetSet.initOne(.mips) | ||
| 4280 | .attributes = .{ .@"const" = true } | ||
| 4281 | |||
| 4282 | __builtin_msa_cle_u_h | ||
| 4283 | .param_str = "V8SsV8UsV8Us" | ||
| 4284 | .target_set = TargetSet.initOne(.mips) | ||
| 4285 | .attributes = .{ .@"const" = true } | ||
| 4286 | |||
| 4287 | __builtin_msa_cle_u_w | ||
| 4288 | .param_str = "V4SiV4UiV4Ui" | ||
| 4289 | .target_set = TargetSet.initOne(.mips) | ||
| 4290 | .attributes = .{ .@"const" = true } | ||
| 4291 | |||
| 4292 | __builtin_msa_clei_s_b | ||
| 4293 | .param_str = "V16ScV16ScISi" | ||
| 4294 | .target_set = TargetSet.initOne(.mips) | ||
| 4295 | .attributes = .{ .@"const" = true } | ||
| 4296 | |||
| 4297 | __builtin_msa_clei_s_d | ||
| 4298 | .param_str = "V2SLLiV2SLLiISi" | ||
| 4299 | .target_set = TargetSet.initOne(.mips) | ||
| 4300 | .attributes = .{ .@"const" = true } | ||
| 4301 | |||
| 4302 | __builtin_msa_clei_s_h | ||
| 4303 | .param_str = "V8SsV8SsISi" | ||
| 4304 | .target_set = TargetSet.initOne(.mips) | ||
| 4305 | .attributes = .{ .@"const" = true } | ||
| 4306 | |||
| 4307 | __builtin_msa_clei_s_w | ||
| 4308 | .param_str = "V4SiV4SiISi" | ||
| 4309 | .target_set = TargetSet.initOne(.mips) | ||
| 4310 | .attributes = .{ .@"const" = true } | ||
| 4311 | |||
| 4312 | __builtin_msa_clei_u_b | ||
| 4313 | .param_str = "V16ScV16UcIUi" | ||
| 4314 | .target_set = TargetSet.initOne(.mips) | ||
| 4315 | .attributes = .{ .@"const" = true } | ||
| 4316 | |||
| 4317 | __builtin_msa_clei_u_d | ||
| 4318 | .param_str = "V2SLLiV2ULLiIUi" | ||
| 4319 | .target_set = TargetSet.initOne(.mips) | ||
| 4320 | .attributes = .{ .@"const" = true } | ||
| 4321 | |||
| 4322 | __builtin_msa_clei_u_h | ||
| 4323 | .param_str = "V8SsV8UsIUi" | ||
| 4324 | .target_set = TargetSet.initOne(.mips) | ||
| 4325 | .attributes = .{ .@"const" = true } | ||
| 4326 | |||
| 4327 | __builtin_msa_clei_u_w | ||
| 4328 | .param_str = "V4SiV4UiIUi" | ||
| 4329 | .target_set = TargetSet.initOne(.mips) | ||
| 4330 | .attributes = .{ .@"const" = true } | ||
| 4331 | |||
| 4332 | __builtin_msa_clt_s_b | ||
| 4333 | .param_str = "V16ScV16ScV16Sc" | ||
| 4334 | .target_set = TargetSet.initOne(.mips) | ||
| 4335 | .attributes = .{ .@"const" = true } | ||
| 4336 | |||
| 4337 | __builtin_msa_clt_s_d | ||
| 4338 | .param_str = "V2SLLiV2SLLiV2SLLi" | ||
| 4339 | .target_set = TargetSet.initOne(.mips) | ||
| 4340 | .attributes = .{ .@"const" = true } | ||
| 4341 | |||
| 4342 | __builtin_msa_clt_s_h | ||
| 4343 | .param_str = "V8SsV8SsV8Ss" | ||
| 4344 | .target_set = TargetSet.initOne(.mips) | ||
| 4345 | .attributes = .{ .@"const" = true } | ||
| 4346 | |||
| 4347 | __builtin_msa_clt_s_w | ||
| 4348 | .param_str = "V4SiV4SiV4Si" | ||
| 4349 | .target_set = TargetSet.initOne(.mips) | ||
| 4350 | .attributes = .{ .@"const" = true } | ||
| 4351 | |||
| 4352 | __builtin_msa_clt_u_b | ||
| 4353 | .param_str = "V16ScV16UcV16Uc" | ||
| 4354 | .target_set = TargetSet.initOne(.mips) | ||
| 4355 | .attributes = .{ .@"const" = true } | ||
| 4356 | |||
| 4357 | __builtin_msa_clt_u_d | ||
| 4358 | .param_str = "V2SLLiV2ULLiV2ULLi" | ||
| 4359 | .target_set = TargetSet.initOne(.mips) | ||
| 4360 | .attributes = .{ .@"const" = true } | ||
| 4361 | |||
| 4362 | __builtin_msa_clt_u_h | ||
| 4363 | .param_str = "V8SsV8UsV8Us" | ||
| 4364 | .target_set = TargetSet.initOne(.mips) | ||
| 4365 | .attributes = .{ .@"const" = true } | ||
| 4366 | |||
| 4367 | __builtin_msa_clt_u_w | ||
| 4368 | .param_str = "V4SiV4UiV4Ui" | ||
| 4369 | .target_set = TargetSet.initOne(.mips) | ||
| 4370 | .attributes = .{ .@"const" = true } | ||
| 4371 | |||
| 4372 | __builtin_msa_clti_s_b | ||
| 4373 | .param_str = "V16ScV16ScISi" | ||
| 4374 | .target_set = TargetSet.initOne(.mips) | ||
| 4375 | .attributes = .{ .@"const" = true } | ||
| 4376 | |||
| 4377 | __builtin_msa_clti_s_d | ||
| 4378 | .param_str = "V2SLLiV2SLLiISi" | ||
| 4379 | .target_set = TargetSet.initOne(.mips) | ||
| 4380 | .attributes = .{ .@"const" = true } | ||
| 4381 | |||
| 4382 | __builtin_msa_clti_s_h | ||
| 4383 | .param_str = "V8SsV8SsISi" | ||
| 4384 | .target_set = TargetSet.initOne(.mips) | ||
| 4385 | .attributes = .{ .@"const" = true } | ||
| 4386 | |||
| 4387 | __builtin_msa_clti_s_w | ||
| 4388 | .param_str = "V4SiV4SiISi" | ||
| 4389 | .target_set = TargetSet.initOne(.mips) | ||
| 4390 | .attributes = .{ .@"const" = true } | ||
| 4391 | |||
| 4392 | __builtin_msa_clti_u_b | ||
| 4393 | .param_str = "V16ScV16UcIUi" | ||
| 4394 | .target_set = TargetSet.initOne(.mips) | ||
| 4395 | .attributes = .{ .@"const" = true } | ||
| 4396 | |||
| 4397 | __builtin_msa_clti_u_d | ||
| 4398 | .param_str = "V2SLLiV2ULLiIUi" | ||
| 4399 | .target_set = TargetSet.initOne(.mips) | ||
| 4400 | .attributes = .{ .@"const" = true } | ||
| 4401 | |||
| 4402 | __builtin_msa_clti_u_h | ||
| 4403 | .param_str = "V8SsV8UsIUi" | ||
| 4404 | .target_set = TargetSet.initOne(.mips) | ||
| 4405 | .attributes = .{ .@"const" = true } | ||
| 4406 | |||
| 4407 | __builtin_msa_clti_u_w | ||
| 4408 | .param_str = "V4SiV4UiIUi" | ||
| 4409 | .target_set = TargetSet.initOne(.mips) | ||
| 4410 | .attributes = .{ .@"const" = true } | ||
| 4411 | |||
| 4412 | __builtin_msa_copy_s_b | ||
| 4413 | .param_str = "iV16ScIUi" | ||
| 4414 | .target_set = TargetSet.initOne(.mips) | ||
| 4415 | .attributes = .{ .@"const" = true } | ||
| 4416 | |||
| 4417 | __builtin_msa_copy_s_d | ||
| 4418 | .param_str = "LLiV2SLLiIUi" | ||
| 4419 | .target_set = TargetSet.initOne(.mips) | ||
| 4420 | .attributes = .{ .@"const" = true } | ||
| 4421 | |||
| 4422 | __builtin_msa_copy_s_h | ||
| 4423 | .param_str = "iV8SsIUi" | ||
| 4424 | .target_set = TargetSet.initOne(.mips) | ||
| 4425 | .attributes = .{ .@"const" = true } | ||
| 4426 | |||
| 4427 | __builtin_msa_copy_s_w | ||
| 4428 | .param_str = "iV4SiIUi" | ||
| 4429 | .target_set = TargetSet.initOne(.mips) | ||
| 4430 | .attributes = .{ .@"const" = true } | ||
| 4431 | |||
| 4432 | __builtin_msa_copy_u_b | ||
| 4433 | .param_str = "iV16UcIUi" | ||
| 4434 | .target_set = TargetSet.initOne(.mips) | ||
| 4435 | .attributes = .{ .@"const" = true } | ||
| 4436 | |||
| 4437 | __builtin_msa_copy_u_d | ||
| 4438 | .param_str = "LLiV2ULLiIUi" | ||
| 4439 | .target_set = TargetSet.initOne(.mips) | ||
| 4440 | .attributes = .{ .@"const" = true } | ||
| 4441 | |||
| 4442 | __builtin_msa_copy_u_h | ||
| 4443 | .param_str = "iV8UsIUi" | ||
| 4444 | .target_set = TargetSet.initOne(.mips) | ||
| 4445 | .attributes = .{ .@"const" = true } | ||
| 4446 | |||
| 4447 | __builtin_msa_copy_u_w | ||
| 4448 | .param_str = "iV4UiIUi" | ||
| 4449 | .target_set = TargetSet.initOne(.mips) | ||
| 4450 | .attributes = .{ .@"const" = true } | ||
| 4451 | |||
| 4452 | __builtin_msa_ctcmsa | ||
| 4453 | .param_str = "vIii" | ||
| 4454 | .target_set = TargetSet.initOne(.mips) | ||
| 4455 | |||
| 4456 | __builtin_msa_div_s_b | ||
| 4457 | .param_str = "V16ScV16ScV16Sc" | ||
| 4458 | .target_set = TargetSet.initOne(.mips) | ||
| 4459 | .attributes = .{ .@"const" = true } | ||
| 4460 | |||
| 4461 | __builtin_msa_div_s_d | ||
| 4462 | .param_str = "V2SLLiV2SLLiV2SLLi" | ||
| 4463 | .target_set = TargetSet.initOne(.mips) | ||
| 4464 | .attributes = .{ .@"const" = true } | ||
| 4465 | |||
| 4466 | __builtin_msa_div_s_h | ||
| 4467 | .param_str = "V8SsV8SsV8Ss" | ||
| 4468 | .target_set = TargetSet.initOne(.mips) | ||
| 4469 | .attributes = .{ .@"const" = true } | ||
| 4470 | |||
| 4471 | __builtin_msa_div_s_w | ||
| 4472 | .param_str = "V4SiV4SiV4Si" | ||
| 4473 | .target_set = TargetSet.initOne(.mips) | ||
| 4474 | .attributes = .{ .@"const" = true } | ||
| 4475 | |||
| 4476 | __builtin_msa_div_u_b | ||
| 4477 | .param_str = "V16UcV16UcV16Uc" | ||
| 4478 | .target_set = TargetSet.initOne(.mips) | ||
| 4479 | .attributes = .{ .@"const" = true } | ||
| 4480 | |||
| 4481 | __builtin_msa_div_u_d | ||
| 4482 | .param_str = "V2ULLiV2ULLiV2ULLi" | ||
| 4483 | .target_set = TargetSet.initOne(.mips) | ||
| 4484 | .attributes = .{ .@"const" = true } | ||
| 4485 | |||
| 4486 | __builtin_msa_div_u_h | ||
| 4487 | .param_str = "V8UsV8UsV8Us" | ||
| 4488 | .target_set = TargetSet.initOne(.mips) | ||
| 4489 | .attributes = .{ .@"const" = true } | ||
| 4490 | |||
| 4491 | __builtin_msa_div_u_w | ||
| 4492 | .param_str = "V4UiV4UiV4Ui" | ||
| 4493 | .target_set = TargetSet.initOne(.mips) | ||
| 4494 | .attributes = .{ .@"const" = true } | ||
| 4495 | |||
| 4496 | __builtin_msa_dotp_s_d | ||
| 4497 | .param_str = "V2SLLiV4SiV4Si" | ||
| 4498 | .target_set = TargetSet.initOne(.mips) | ||
| 4499 | .attributes = .{ .@"const" = true } | ||
| 4500 | |||
| 4501 | __builtin_msa_dotp_s_h | ||
| 4502 | .param_str = "V8SsV16ScV16Sc" | ||
| 4503 | .target_set = TargetSet.initOne(.mips) | ||
| 4504 | .attributes = .{ .@"const" = true } | ||
| 4505 | |||
| 4506 | __builtin_msa_dotp_s_w | ||
| 4507 | .param_str = "V4SiV8SsV8Ss" | ||
| 4508 | .target_set = TargetSet.initOne(.mips) | ||
| 4509 | .attributes = .{ .@"const" = true } | ||
| 4510 | |||
| 4511 | __builtin_msa_dotp_u_d | ||
| 4512 | .param_str = "V2ULLiV4UiV4Ui" | ||
| 4513 | .target_set = TargetSet.initOne(.mips) | ||
| 4514 | .attributes = .{ .@"const" = true } | ||
| 4515 | |||
| 4516 | __builtin_msa_dotp_u_h | ||
| 4517 | .param_str = "V8UsV16UcV16Uc" | ||
| 4518 | .target_set = TargetSet.initOne(.mips) | ||
| 4519 | .attributes = .{ .@"const" = true } | ||
| 4520 | |||
| 4521 | __builtin_msa_dotp_u_w | ||
| 4522 | .param_str = "V4UiV8UsV8Us" | ||
| 4523 | .target_set = TargetSet.initOne(.mips) | ||
| 4524 | .attributes = .{ .@"const" = true } | ||
| 4525 | |||
| 4526 | __builtin_msa_dpadd_s_d | ||
| 4527 | .param_str = "V2SLLiV2SLLiV4SiV4Si" | ||
| 4528 | .target_set = TargetSet.initOne(.mips) | ||
| 4529 | .attributes = .{ .@"const" = true } | ||
| 4530 | |||
| 4531 | __builtin_msa_dpadd_s_h | ||
| 4532 | .param_str = "V8SsV8SsV16ScV16Sc" | ||
| 4533 | .target_set = TargetSet.initOne(.mips) | ||
| 4534 | .attributes = .{ .@"const" = true } | ||
| 4535 | |||
| 4536 | __builtin_msa_dpadd_s_w | ||
| 4537 | .param_str = "V4SiV4SiV8SsV8Ss" | ||
| 4538 | .target_set = TargetSet.initOne(.mips) | ||
| 4539 | .attributes = .{ .@"const" = true } | ||
| 4540 | |||
| 4541 | __builtin_msa_dpadd_u_d | ||
| 4542 | .param_str = "V2ULLiV2ULLiV4UiV4Ui" | ||
| 4543 | .target_set = TargetSet.initOne(.mips) | ||
| 4544 | .attributes = .{ .@"const" = true } | ||
| 4545 | |||
| 4546 | __builtin_msa_dpadd_u_h | ||
| 4547 | .param_str = "V8UsV8UsV16UcV16Uc" | ||
| 4548 | .target_set = TargetSet.initOne(.mips) | ||
| 4549 | .attributes = .{ .@"const" = true } | ||
| 4550 | |||
| 4551 | __builtin_msa_dpadd_u_w | ||
| 4552 | .param_str = "V4UiV4UiV8UsV8Us" | ||
| 4553 | .target_set = TargetSet.initOne(.mips) | ||
| 4554 | .attributes = .{ .@"const" = true } | ||
| 4555 | |||
| 4556 | __builtin_msa_dpsub_s_d | ||
| 4557 | .param_str = "V2SLLiV2SLLiV4SiV4Si" | ||
| 4558 | .target_set = TargetSet.initOne(.mips) | ||
| 4559 | .attributes = .{ .@"const" = true } | ||
| 4560 | |||
| 4561 | __builtin_msa_dpsub_s_h | ||
| 4562 | .param_str = "V8SsV8SsV16ScV16Sc" | ||
| 4563 | .target_set = TargetSet.initOne(.mips) | ||
| 4564 | .attributes = .{ .@"const" = true } | ||
| 4565 | |||
| 4566 | __builtin_msa_dpsub_s_w | ||
| 4567 | .param_str = "V4SiV4SiV8SsV8Ss" | ||
| 4568 | .target_set = TargetSet.initOne(.mips) | ||
| 4569 | .attributes = .{ .@"const" = true } | ||
| 4570 | |||
| 4571 | __builtin_msa_dpsub_u_d | ||
| 4572 | .param_str = "V2ULLiV2ULLiV4UiV4Ui" | ||
| 4573 | .target_set = TargetSet.initOne(.mips) | ||
| 4574 | .attributes = .{ .@"const" = true } | ||
| 4575 | |||
| 4576 | __builtin_msa_dpsub_u_h | ||
| 4577 | .param_str = "V8UsV8UsV16UcV16Uc" | ||
| 4578 | .target_set = TargetSet.initOne(.mips) | ||
| 4579 | .attributes = .{ .@"const" = true } | ||
| 4580 | |||
| 4581 | __builtin_msa_dpsub_u_w | ||
| 4582 | .param_str = "V4UiV4UiV8UsV8Us" | ||
| 4583 | .target_set = TargetSet.initOne(.mips) | ||
| 4584 | .attributes = .{ .@"const" = true } | ||
| 4585 | |||
| 4586 | __builtin_msa_fadd_d | ||
| 4587 | .param_str = "V2dV2dV2d" | ||
| 4588 | .target_set = TargetSet.initOne(.mips) | ||
| 4589 | .attributes = .{ .@"const" = true } | ||
| 4590 | |||
| 4591 | __builtin_msa_fadd_w | ||
| 4592 | .param_str = "V4fV4fV4f" | ||
| 4593 | .target_set = TargetSet.initOne(.mips) | ||
| 4594 | .attributes = .{ .@"const" = true } | ||
| 4595 | |||
| 4596 | __builtin_msa_fcaf_d | ||
| 4597 | .param_str = "V2LLiV2dV2d" | ||
| 4598 | .target_set = TargetSet.initOne(.mips) | ||
| 4599 | .attributes = .{ .@"const" = true } | ||
| 4600 | |||
| 4601 | __builtin_msa_fcaf_w | ||
| 4602 | .param_str = "V4iV4fV4f" | ||
| 4603 | .target_set = TargetSet.initOne(.mips) | ||
| 4604 | .attributes = .{ .@"const" = true } | ||
| 4605 | |||
| 4606 | __builtin_msa_fceq_d | ||
| 4607 | .param_str = "V2LLiV2dV2d" | ||
| 4608 | .target_set = TargetSet.initOne(.mips) | ||
| 4609 | .attributes = .{ .@"const" = true } | ||
| 4610 | |||
| 4611 | __builtin_msa_fceq_w | ||
| 4612 | .param_str = "V4iV4fV4f" | ||
| 4613 | .target_set = TargetSet.initOne(.mips) | ||
| 4614 | .attributes = .{ .@"const" = true } | ||
| 4615 | |||
| 4616 | __builtin_msa_fclass_d | ||
| 4617 | .param_str = "V2LLiV2d" | ||
| 4618 | .target_set = TargetSet.initOne(.mips) | ||
| 4619 | .attributes = .{ .@"const" = true } | ||
| 4620 | |||
| 4621 | __builtin_msa_fclass_w | ||
| 4622 | .param_str = "V4iV4f" | ||
| 4623 | .target_set = TargetSet.initOne(.mips) | ||
| 4624 | .attributes = .{ .@"const" = true } | ||
| 4625 | |||
| 4626 | __builtin_msa_fcle_d | ||
| 4627 | .param_str = "V2LLiV2dV2d" | ||
| 4628 | .target_set = TargetSet.initOne(.mips) | ||
| 4629 | .attributes = .{ .@"const" = true } | ||
| 4630 | |||
| 4631 | __builtin_msa_fcle_w | ||
| 4632 | .param_str = "V4iV4fV4f" | ||
| 4633 | .target_set = TargetSet.initOne(.mips) | ||
| 4634 | .attributes = .{ .@"const" = true } | ||
| 4635 | |||
| 4636 | __builtin_msa_fclt_d | ||
| 4637 | .param_str = "V2LLiV2dV2d" | ||
| 4638 | .target_set = TargetSet.initOne(.mips) | ||
| 4639 | .attributes = .{ .@"const" = true } | ||
| 4640 | |||
| 4641 | __builtin_msa_fclt_w | ||
| 4642 | .param_str = "V4iV4fV4f" | ||
| 4643 | .target_set = TargetSet.initOne(.mips) | ||
| 4644 | .attributes = .{ .@"const" = true } | ||
| 4645 | |||
| 4646 | __builtin_msa_fcne_d | ||
| 4647 | .param_str = "V2LLiV2dV2d" | ||
| 4648 | .target_set = TargetSet.initOne(.mips) | ||
| 4649 | .attributes = .{ .@"const" = true } | ||
| 4650 | |||
| 4651 | __builtin_msa_fcne_w | ||
| 4652 | .param_str = "V4iV4fV4f" | ||
| 4653 | .target_set = TargetSet.initOne(.mips) | ||
| 4654 | .attributes = .{ .@"const" = true } | ||
| 4655 | |||
| 4656 | __builtin_msa_fcor_d | ||
| 4657 | .param_str = "V2LLiV2dV2d" | ||
| 4658 | .target_set = TargetSet.initOne(.mips) | ||
| 4659 | .attributes = .{ .@"const" = true } | ||
| 4660 | |||
| 4661 | __builtin_msa_fcor_w | ||
| 4662 | .param_str = "V4iV4fV4f" | ||
| 4663 | .target_set = TargetSet.initOne(.mips) | ||
| 4664 | .attributes = .{ .@"const" = true } | ||
| 4665 | |||
| 4666 | __builtin_msa_fcueq_d | ||
| 4667 | .param_str = "V2LLiV2dV2d" | ||
| 4668 | .target_set = TargetSet.initOne(.mips) | ||
| 4669 | .attributes = .{ .@"const" = true } | ||
| 4670 | |||
| 4671 | __builtin_msa_fcueq_w | ||
| 4672 | .param_str = "V4iV4fV4f" | ||
| 4673 | .target_set = TargetSet.initOne(.mips) | ||
| 4674 | .attributes = .{ .@"const" = true } | ||
| 4675 | |||
| 4676 | __builtin_msa_fcule_d | ||
| 4677 | .param_str = "V2LLiV2dV2d" | ||
| 4678 | .target_set = TargetSet.initOne(.mips) | ||
| 4679 | .attributes = .{ .@"const" = true } | ||
| 4680 | |||
| 4681 | __builtin_msa_fcule_w | ||
| 4682 | .param_str = "V4iV4fV4f" | ||
| 4683 | .target_set = TargetSet.initOne(.mips) | ||
| 4684 | .attributes = .{ .@"const" = true } | ||
| 4685 | |||
| 4686 | __builtin_msa_fcult_d | ||
| 4687 | .param_str = "V2LLiV2dV2d" | ||
| 4688 | .target_set = TargetSet.initOne(.mips) | ||
| 4689 | .attributes = .{ .@"const" = true } | ||
| 4690 | |||
| 4691 | __builtin_msa_fcult_w | ||
| 4692 | .param_str = "V4iV4fV4f" | ||
| 4693 | .target_set = TargetSet.initOne(.mips) | ||
| 4694 | .attributes = .{ .@"const" = true } | ||
| 4695 | |||
| 4696 | __builtin_msa_fcun_d | ||
| 4697 | .param_str = "V2LLiV2dV2d" | ||
| 4698 | .target_set = TargetSet.initOne(.mips) | ||
| 4699 | .attributes = .{ .@"const" = true } | ||
| 4700 | |||
| 4701 | __builtin_msa_fcun_w | ||
| 4702 | .param_str = "V4iV4fV4f" | ||
| 4703 | .target_set = TargetSet.initOne(.mips) | ||
| 4704 | .attributes = .{ .@"const" = true } | ||
| 4705 | |||
| 4706 | __builtin_msa_fcune_d | ||
| 4707 | .param_str = "V2LLiV2dV2d" | ||
| 4708 | .target_set = TargetSet.initOne(.mips) | ||
| 4709 | .attributes = .{ .@"const" = true } | ||
| 4710 | |||
| 4711 | __builtin_msa_fcune_w | ||
| 4712 | .param_str = "V4iV4fV4f" | ||
| 4713 | .target_set = TargetSet.initOne(.mips) | ||
| 4714 | .attributes = .{ .@"const" = true } | ||
| 4715 | |||
| 4716 | __builtin_msa_fdiv_d | ||
| 4717 | .param_str = "V2dV2dV2d" | ||
| 4718 | .target_set = TargetSet.initOne(.mips) | ||
| 4719 | .attributes = .{ .@"const" = true } | ||
| 4720 | |||
| 4721 | __builtin_msa_fdiv_w | ||
| 4722 | .param_str = "V4fV4fV4f" | ||
| 4723 | .target_set = TargetSet.initOne(.mips) | ||
| 4724 | .attributes = .{ .@"const" = true } | ||
| 4725 | |||
| 4726 | __builtin_msa_fexdo_h | ||
| 4727 | .param_str = "V8hV4fV4f" | ||
| 4728 | .target_set = TargetSet.initOne(.mips) | ||
| 4729 | .attributes = .{ .@"const" = true } | ||
| 4730 | |||
| 4731 | __builtin_msa_fexdo_w | ||
| 4732 | .param_str = "V4fV2dV2d" | ||
| 4733 | .target_set = TargetSet.initOne(.mips) | ||
| 4734 | .attributes = .{ .@"const" = true } | ||
| 4735 | |||
| 4736 | __builtin_msa_fexp2_d | ||
| 4737 | .param_str = "V2dV2dV2LLi" | ||
| 4738 | .target_set = TargetSet.initOne(.mips) | ||
| 4739 | .attributes = .{ .@"const" = true } | ||
| 4740 | |||
| 4741 | __builtin_msa_fexp2_w | ||
| 4742 | .param_str = "V4fV4fV4i" | ||
| 4743 | .target_set = TargetSet.initOne(.mips) | ||
| 4744 | .attributes = .{ .@"const" = true } | ||
| 4745 | |||
| 4746 | __builtin_msa_fexupl_d | ||
| 4747 | .param_str = "V2dV4f" | ||
| 4748 | .target_set = TargetSet.initOne(.mips) | ||
| 4749 | .attributes = .{ .@"const" = true } | ||
| 4750 | |||
| 4751 | __builtin_msa_fexupl_w | ||
| 4752 | .param_str = "V4fV8h" | ||
| 4753 | .target_set = TargetSet.initOne(.mips) | ||
| 4754 | .attributes = .{ .@"const" = true } | ||
| 4755 | |||
| 4756 | __builtin_msa_fexupr_d | ||
| 4757 | .param_str = "V2dV4f" | ||
| 4758 | .target_set = TargetSet.initOne(.mips) | ||
| 4759 | .attributes = .{ .@"const" = true } | ||
| 4760 | |||
| 4761 | __builtin_msa_fexupr_w | ||
| 4762 | .param_str = "V4fV8h" | ||
| 4763 | .target_set = TargetSet.initOne(.mips) | ||
| 4764 | .attributes = .{ .@"const" = true } | ||
| 4765 | |||
| 4766 | __builtin_msa_ffint_s_d | ||
| 4767 | .param_str = "V2dV2SLLi" | ||
| 4768 | .target_set = TargetSet.initOne(.mips) | ||
| 4769 | .attributes = .{ .@"const" = true } | ||
| 4770 | |||
| 4771 | __builtin_msa_ffint_s_w | ||
| 4772 | .param_str = "V4fV4Si" | ||
| 4773 | .target_set = TargetSet.initOne(.mips) | ||
| 4774 | .attributes = .{ .@"const" = true } | ||
| 4775 | |||
| 4776 | __builtin_msa_ffint_u_d | ||
| 4777 | .param_str = "V2dV2ULLi" | ||
| 4778 | .target_set = TargetSet.initOne(.mips) | ||
| 4779 | .attributes = .{ .@"const" = true } | ||
| 4780 | |||
| 4781 | __builtin_msa_ffint_u_w | ||
| 4782 | .param_str = "V4fV4Ui" | ||
| 4783 | .target_set = TargetSet.initOne(.mips) | ||
| 4784 | .attributes = .{ .@"const" = true } | ||
| 4785 | |||
| 4786 | __builtin_msa_ffql_d | ||
| 4787 | .param_str = "V2dV4Si" | ||
| 4788 | .target_set = TargetSet.initOne(.mips) | ||
| 4789 | .attributes = .{ .@"const" = true } | ||
| 4790 | |||
| 4791 | __builtin_msa_ffql_w | ||
| 4792 | .param_str = "V4fV8Ss" | ||
| 4793 | .target_set = TargetSet.initOne(.mips) | ||
| 4794 | .attributes = .{ .@"const" = true } | ||
| 4795 | |||
| 4796 | __builtin_msa_ffqr_d | ||
| 4797 | .param_str = "V2dV4Si" | ||
| 4798 | .target_set = TargetSet.initOne(.mips) | ||
| 4799 | .attributes = .{ .@"const" = true } | ||
| 4800 | |||
| 4801 | __builtin_msa_ffqr_w | ||
| 4802 | .param_str = "V4fV8Ss" | ||
| 4803 | .target_set = TargetSet.initOne(.mips) | ||
| 4804 | .attributes = .{ .@"const" = true } | ||
| 4805 | |||
| 4806 | __builtin_msa_fill_b | ||
| 4807 | .param_str = "V16Sci" | ||
| 4808 | .target_set = TargetSet.initOne(.mips) | ||
| 4809 | .attributes = .{ .@"const" = true } | ||
| 4810 | |||
| 4811 | __builtin_msa_fill_d | ||
| 4812 | .param_str = "V2SLLiLLi" | ||
| 4813 | .target_set = TargetSet.initOne(.mips) | ||
| 4814 | .attributes = .{ .@"const" = true } | ||
| 4815 | |||
| 4816 | __builtin_msa_fill_h | ||
| 4817 | .param_str = "V8Ssi" | ||
| 4818 | .target_set = TargetSet.initOne(.mips) | ||
| 4819 | .attributes = .{ .@"const" = true } | ||
| 4820 | |||
| 4821 | __builtin_msa_fill_w | ||
| 4822 | .param_str = "V4Sii" | ||
| 4823 | .target_set = TargetSet.initOne(.mips) | ||
| 4824 | .attributes = .{ .@"const" = true } | ||
| 4825 | |||
| 4826 | __builtin_msa_flog2_d | ||
| 4827 | .param_str = "V2dV2d" | ||
| 4828 | .target_set = TargetSet.initOne(.mips) | ||
| 4829 | .attributes = .{ .@"const" = true } | ||
| 4830 | |||
| 4831 | __builtin_msa_flog2_w | ||
| 4832 | .param_str = "V4fV4f" | ||
| 4833 | .target_set = TargetSet.initOne(.mips) | ||
| 4834 | .attributes = .{ .@"const" = true } | ||
| 4835 | |||
| 4836 | __builtin_msa_fmadd_d | ||
| 4837 | .param_str = "V2dV2dV2dV2d" | ||
| 4838 | .target_set = TargetSet.initOne(.mips) | ||
| 4839 | .attributes = .{ .@"const" = true } | ||
| 4840 | |||
| 4841 | __builtin_msa_fmadd_w | ||
| 4842 | .param_str = "V4fV4fV4fV4f" | ||
| 4843 | .target_set = TargetSet.initOne(.mips) | ||
| 4844 | .attributes = .{ .@"const" = true } | ||
| 4845 | |||
| 4846 | __builtin_msa_fmax_a_d | ||
| 4847 | .param_str = "V2dV2dV2d" | ||
| 4848 | .target_set = TargetSet.initOne(.mips) | ||
| 4849 | .attributes = .{ .@"const" = true } | ||
| 4850 | |||
| 4851 | __builtin_msa_fmax_a_w | ||
| 4852 | .param_str = "V4fV4fV4f" | ||
| 4853 | .target_set = TargetSet.initOne(.mips) | ||
| 4854 | .attributes = .{ .@"const" = true } | ||
| 4855 | |||
| 4856 | __builtin_msa_fmax_d | ||
| 4857 | .param_str = "V2dV2dV2d" | ||
| 4858 | .target_set = TargetSet.initOne(.mips) | ||
| 4859 | .attributes = .{ .@"const" = true } | ||
| 4860 | |||
| 4861 | __builtin_msa_fmax_w | ||
| 4862 | .param_str = "V4fV4fV4f" | ||
| 4863 | .target_set = TargetSet.initOne(.mips) | ||
| 4864 | .attributes = .{ .@"const" = true } | ||
| 4865 | |||
| 4866 | __builtin_msa_fmin_a_d | ||
| 4867 | .param_str = "V2dV2dV2d" | ||
| 4868 | .target_set = TargetSet.initOne(.mips) | ||
| 4869 | .attributes = .{ .@"const" = true } | ||
| 4870 | |||
| 4871 | __builtin_msa_fmin_a_w | ||
| 4872 | .param_str = "V4fV4fV4f" | ||
| 4873 | .target_set = TargetSet.initOne(.mips) | ||
| 4874 | .attributes = .{ .@"const" = true } | ||
| 4875 | |||
| 4876 | __builtin_msa_fmin_d | ||
| 4877 | .param_str = "V2dV2dV2d" | ||
| 4878 | .target_set = TargetSet.initOne(.mips) | ||
| 4879 | .attributes = .{ .@"const" = true } | ||
| 4880 | |||
| 4881 | __builtin_msa_fmin_w | ||
| 4882 | .param_str = "V4fV4fV4f" | ||
| 4883 | .target_set = TargetSet.initOne(.mips) | ||
| 4884 | .attributes = .{ .@"const" = true } | ||
| 4885 | |||
| 4886 | __builtin_msa_fmsub_d | ||
| 4887 | .param_str = "V2dV2dV2dV2d" | ||
| 4888 | .target_set = TargetSet.initOne(.mips) | ||
| 4889 | .attributes = .{ .@"const" = true } | ||
| 4890 | |||
| 4891 | __builtin_msa_fmsub_w | ||
| 4892 | .param_str = "V4fV4fV4fV4f" | ||
| 4893 | .target_set = TargetSet.initOne(.mips) | ||
| 4894 | .attributes = .{ .@"const" = true } | ||
| 4895 | |||
| 4896 | __builtin_msa_fmul_d | ||
| 4897 | .param_str = "V2dV2dV2d" | ||
| 4898 | .target_set = TargetSet.initOne(.mips) | ||
| 4899 | .attributes = .{ .@"const" = true } | ||
| 4900 | |||
| 4901 | __builtin_msa_fmul_w | ||
| 4902 | .param_str = "V4fV4fV4f" | ||
| 4903 | .target_set = TargetSet.initOne(.mips) | ||
| 4904 | .attributes = .{ .@"const" = true } | ||
| 4905 | |||
| 4906 | __builtin_msa_frcp_d | ||
| 4907 | .param_str = "V2dV2d" | ||
| 4908 | .target_set = TargetSet.initOne(.mips) | ||
| 4909 | .attributes = .{ .@"const" = true } | ||
| 4910 | |||
| 4911 | __builtin_msa_frcp_w | ||
| 4912 | .param_str = "V4fV4f" | ||
| 4913 | .target_set = TargetSet.initOne(.mips) | ||
| 4914 | .attributes = .{ .@"const" = true } | ||
| 4915 | |||
| 4916 | __builtin_msa_frint_d | ||
| 4917 | .param_str = "V2dV2d" | ||
| 4918 | .target_set = TargetSet.initOne(.mips) | ||
| 4919 | .attributes = .{ .@"const" = true } | ||
| 4920 | |||
| 4921 | __builtin_msa_frint_w | ||
| 4922 | .param_str = "V4fV4f" | ||
| 4923 | .target_set = TargetSet.initOne(.mips) | ||
| 4924 | .attributes = .{ .@"const" = true } | ||
| 4925 | |||
| 4926 | __builtin_msa_frsqrt_d | ||
| 4927 | .param_str = "V2dV2d" | ||
| 4928 | .target_set = TargetSet.initOne(.mips) | ||
| 4929 | .attributes = .{ .@"const" = true } | ||
| 4930 | |||
| 4931 | __builtin_msa_frsqrt_w | ||
| 4932 | .param_str = "V4fV4f" | ||
| 4933 | .target_set = TargetSet.initOne(.mips) | ||
| 4934 | .attributes = .{ .@"const" = true } | ||
| 4935 | |||
| 4936 | __builtin_msa_fsaf_d | ||
| 4937 | .param_str = "V2LLiV2dV2d" | ||
| 4938 | .target_set = TargetSet.initOne(.mips) | ||
| 4939 | .attributes = .{ .@"const" = true } | ||
| 4940 | |||
| 4941 | __builtin_msa_fsaf_w | ||
| 4942 | .param_str = "V4iV4fV4f" | ||
| 4943 | .target_set = TargetSet.initOne(.mips) | ||
| 4944 | .attributes = .{ .@"const" = true } | ||
| 4945 | |||
| 4946 | __builtin_msa_fseq_d | ||
| 4947 | .param_str = "V2LLiV2dV2d" | ||
| 4948 | .target_set = TargetSet.initOne(.mips) | ||
| 4949 | .attributes = .{ .@"const" = true } | ||
| 4950 | |||
| 4951 | __builtin_msa_fseq_w | ||
| 4952 | .param_str = "V4iV4fV4f" | ||
| 4953 | .target_set = TargetSet.initOne(.mips) | ||
| 4954 | .attributes = .{ .@"const" = true } | ||
| 4955 | |||
| 4956 | __builtin_msa_fsle_d | ||
| 4957 | .param_str = "V2LLiV2dV2d" | ||
| 4958 | .target_set = TargetSet.initOne(.mips) | ||
| 4959 | .attributes = .{ .@"const" = true } | ||
| 4960 | |||
| 4961 | __builtin_msa_fsle_w | ||
| 4962 | .param_str = "V4iV4fV4f" | ||
| 4963 | .target_set = TargetSet.initOne(.mips) | ||
| 4964 | .attributes = .{ .@"const" = true } | ||
| 4965 | |||
| 4966 | __builtin_msa_fslt_d | ||
| 4967 | .param_str = "V2LLiV2dV2d" | ||
| 4968 | .target_set = TargetSet.initOne(.mips) | ||
| 4969 | .attributes = .{ .@"const" = true } | ||
| 4970 | |||
| 4971 | __builtin_msa_fslt_w | ||
| 4972 | .param_str = "V4iV4fV4f" | ||
| 4973 | .target_set = TargetSet.initOne(.mips) | ||
| 4974 | .attributes = .{ .@"const" = true } | ||
| 4975 | |||
| 4976 | __builtin_msa_fsne_d | ||
| 4977 | .param_str = "V2LLiV2dV2d" | ||
| 4978 | .target_set = TargetSet.initOne(.mips) | ||
| 4979 | .attributes = .{ .@"const" = true } | ||
| 4980 | |||
| 4981 | __builtin_msa_fsne_w | ||
| 4982 | .param_str = "V4iV4fV4f" | ||
| 4983 | .target_set = TargetSet.initOne(.mips) | ||
| 4984 | .attributes = .{ .@"const" = true } | ||
| 4985 | |||
| 4986 | __builtin_msa_fsor_d | ||
| 4987 | .param_str = "V2LLiV2dV2d" | ||
| 4988 | .target_set = TargetSet.initOne(.mips) | ||
| 4989 | .attributes = .{ .@"const" = true } | ||
| 4990 | |||
| 4991 | __builtin_msa_fsor_w | ||
| 4992 | .param_str = "V4iV4fV4f" | ||
| 4993 | .target_set = TargetSet.initOne(.mips) | ||
| 4994 | .attributes = .{ .@"const" = true } | ||
| 4995 | |||
| 4996 | __builtin_msa_fsqrt_d | ||
| 4997 | .param_str = "V2dV2d" | ||
| 4998 | .target_set = TargetSet.initOne(.mips) | ||
| 4999 | .attributes = .{ .@"const" = true } | ||
| 5000 | |||
| 5001 | __builtin_msa_fsqrt_w | ||
| 5002 | .param_str = "V4fV4f" | ||
| 5003 | .target_set = TargetSet.initOne(.mips) | ||
| 5004 | .attributes = .{ .@"const" = true } | ||
| 5005 | |||
| 5006 | __builtin_msa_fsub_d | ||
| 5007 | .param_str = "V2dV2dV2d" | ||
| 5008 | .target_set = TargetSet.initOne(.mips) | ||
| 5009 | .attributes = .{ .@"const" = true } | ||
| 5010 | |||
| 5011 | __builtin_msa_fsub_w | ||
| 5012 | .param_str = "V4fV4fV4f" | ||
| 5013 | .target_set = TargetSet.initOne(.mips) | ||
| 5014 | .attributes = .{ .@"const" = true } | ||
| 5015 | |||
| 5016 | __builtin_msa_fsueq_d | ||
| 5017 | .param_str = "V2LLiV2dV2d" | ||
| 5018 | .target_set = TargetSet.initOne(.mips) | ||
| 5019 | .attributes = .{ .@"const" = true } | ||
| 5020 | |||
| 5021 | __builtin_msa_fsueq_w | ||
| 5022 | .param_str = "V4iV4fV4f" | ||
| 5023 | .target_set = TargetSet.initOne(.mips) | ||
| 5024 | .attributes = .{ .@"const" = true } | ||
| 5025 | |||
| 5026 | __builtin_msa_fsule_d | ||
| 5027 | .param_str = "V2LLiV2dV2d" | ||
| 5028 | .target_set = TargetSet.initOne(.mips) | ||
| 5029 | .attributes = .{ .@"const" = true } | ||
| 5030 | |||
| 5031 | __builtin_msa_fsule_w | ||
| 5032 | .param_str = "V4iV4fV4f" | ||
| 5033 | .target_set = TargetSet.initOne(.mips) | ||
| 5034 | .attributes = .{ .@"const" = true } | ||
| 5035 | |||
| 5036 | __builtin_msa_fsult_d | ||
| 5037 | .param_str = "V2LLiV2dV2d" | ||
| 5038 | .target_set = TargetSet.initOne(.mips) | ||
| 5039 | .attributes = .{ .@"const" = true } | ||
| 5040 | |||
| 5041 | __builtin_msa_fsult_w | ||
| 5042 | .param_str = "V4iV4fV4f" | ||
| 5043 | .target_set = TargetSet.initOne(.mips) | ||
| 5044 | .attributes = .{ .@"const" = true } | ||
| 5045 | |||
| 5046 | __builtin_msa_fsun_d | ||
| 5047 | .param_str = "V2LLiV2dV2d" | ||
| 5048 | .target_set = TargetSet.initOne(.mips) | ||
| 5049 | .attributes = .{ .@"const" = true } | ||
| 5050 | |||
| 5051 | __builtin_msa_fsun_w | ||
| 5052 | .param_str = "V4iV4fV4f" | ||
| 5053 | .target_set = TargetSet.initOne(.mips) | ||
| 5054 | .attributes = .{ .@"const" = true } | ||
| 5055 | |||
| 5056 | __builtin_msa_fsune_d | ||
| 5057 | .param_str = "V2LLiV2dV2d" | ||
| 5058 | .target_set = TargetSet.initOne(.mips) | ||
| 5059 | .attributes = .{ .@"const" = true } | ||
| 5060 | |||
| 5061 | __builtin_msa_fsune_w | ||
| 5062 | .param_str = "V4iV4fV4f" | ||
| 5063 | .target_set = TargetSet.initOne(.mips) | ||
| 5064 | .attributes = .{ .@"const" = true } | ||
| 5065 | |||
| 5066 | __builtin_msa_ftint_s_d | ||
| 5067 | .param_str = "V2SLLiV2d" | ||
| 5068 | .target_set = TargetSet.initOne(.mips) | ||
| 5069 | .attributes = .{ .@"const" = true } | ||
| 5070 | |||
| 5071 | __builtin_msa_ftint_s_w | ||
| 5072 | .param_str = "V4SiV4f" | ||
| 5073 | .target_set = TargetSet.initOne(.mips) | ||
| 5074 | .attributes = .{ .@"const" = true } | ||
| 5075 | |||
| 5076 | __builtin_msa_ftint_u_d | ||
| 5077 | .param_str = "V2ULLiV2d" | ||
| 5078 | .target_set = TargetSet.initOne(.mips) | ||
| 5079 | .attributes = .{ .@"const" = true } | ||
| 5080 | |||
| 5081 | __builtin_msa_ftint_u_w | ||
| 5082 | .param_str = "V4UiV4f" | ||
| 5083 | .target_set = TargetSet.initOne(.mips) | ||
| 5084 | .attributes = .{ .@"const" = true } | ||
| 5085 | |||
| 5086 | __builtin_msa_ftq_h | ||
| 5087 | .param_str = "V4UiV4fV4f" | ||
| 5088 | .target_set = TargetSet.initOne(.mips) | ||
| 5089 | .attributes = .{ .@"const" = true } | ||
| 5090 | |||
| 5091 | __builtin_msa_ftq_w | ||
| 5092 | .param_str = "V2ULLiV2dV2d" | ||
| 5093 | .target_set = TargetSet.initOne(.mips) | ||
| 5094 | .attributes = .{ .@"const" = true } | ||
| 5095 | |||
| 5096 | __builtin_msa_ftrunc_s_d | ||
| 5097 | .param_str = "V2SLLiV2d" | ||
| 5098 | .target_set = TargetSet.initOne(.mips) | ||
| 5099 | .attributes = .{ .@"const" = true } | ||
| 5100 | |||
| 5101 | __builtin_msa_ftrunc_s_w | ||
| 5102 | .param_str = "V4SiV4f" | ||
| 5103 | .target_set = TargetSet.initOne(.mips) | ||
| 5104 | .attributes = .{ .@"const" = true } | ||
| 5105 | |||
| 5106 | __builtin_msa_ftrunc_u_d | ||
| 5107 | .param_str = "V2ULLiV2d" | ||
| 5108 | .target_set = TargetSet.initOne(.mips) | ||
| 5109 | .attributes = .{ .@"const" = true } | ||
| 5110 | |||
| 5111 | __builtin_msa_ftrunc_u_w | ||
| 5112 | .param_str = "V4UiV4f" | ||
| 5113 | .target_set = TargetSet.initOne(.mips) | ||
| 5114 | .attributes = .{ .@"const" = true } | ||
| 5115 | |||
| 5116 | __builtin_msa_hadd_s_d | ||
| 5117 | .param_str = "V2SLLiV4SiV4Si" | ||
| 5118 | .target_set = TargetSet.initOne(.mips) | ||
| 5119 | .attributes = .{ .@"const" = true } | ||
| 5120 | |||
| 5121 | __builtin_msa_hadd_s_h | ||
| 5122 | .param_str = "V8SsV16ScV16Sc" | ||
| 5123 | .target_set = TargetSet.initOne(.mips) | ||
| 5124 | .attributes = .{ .@"const" = true } | ||
| 5125 | |||
| 5126 | __builtin_msa_hadd_s_w | ||
| 5127 | .param_str = "V4SiV8SsV8Ss" | ||
| 5128 | .target_set = TargetSet.initOne(.mips) | ||
| 5129 | .attributes = .{ .@"const" = true } | ||
| 5130 | |||
| 5131 | __builtin_msa_hadd_u_d | ||
| 5132 | .param_str = "V2ULLiV4UiV4Ui" | ||
| 5133 | .target_set = TargetSet.initOne(.mips) | ||
| 5134 | .attributes = .{ .@"const" = true } | ||
| 5135 | |||
| 5136 | __builtin_msa_hadd_u_h | ||
| 5137 | .param_str = "V8UsV16UcV16Uc" | ||
| 5138 | .target_set = TargetSet.initOne(.mips) | ||
| 5139 | .attributes = .{ .@"const" = true } | ||
| 5140 | |||
| 5141 | __builtin_msa_hadd_u_w | ||
| 5142 | .param_str = "V4UiV8UsV8Us" | ||
| 5143 | .target_set = TargetSet.initOne(.mips) | ||
| 5144 | .attributes = .{ .@"const" = true } | ||
| 5145 | |||
| 5146 | __builtin_msa_hsub_s_d | ||
| 5147 | .param_str = "V2SLLiV4SiV4Si" | ||
| 5148 | .target_set = TargetSet.initOne(.mips) | ||
| 5149 | .attributes = .{ .@"const" = true } | ||
| 5150 | |||
| 5151 | __builtin_msa_hsub_s_h | ||
| 5152 | .param_str = "V8SsV16ScV16Sc" | ||
| 5153 | .target_set = TargetSet.initOne(.mips) | ||
| 5154 | .attributes = .{ .@"const" = true } | ||
| 5155 | |||
| 5156 | __builtin_msa_hsub_s_w | ||
| 5157 | .param_str = "V4SiV8SsV8Ss" | ||
| 5158 | .target_set = TargetSet.initOne(.mips) | ||
| 5159 | .attributes = .{ .@"const" = true } | ||
| 5160 | |||
| 5161 | __builtin_msa_hsub_u_d | ||
| 5162 | .param_str = "V2ULLiV4UiV4Ui" | ||
| 5163 | .target_set = TargetSet.initOne(.mips) | ||
| 5164 | .attributes = .{ .@"const" = true } | ||
| 5165 | |||
| 5166 | __builtin_msa_hsub_u_h | ||
| 5167 | .param_str = "V8UsV16UcV16Uc" | ||
| 5168 | .target_set = TargetSet.initOne(.mips) | ||
| 5169 | .attributes = .{ .@"const" = true } | ||
| 5170 | |||
| 5171 | __builtin_msa_hsub_u_w | ||
| 5172 | .param_str = "V4UiV8UsV8Us" | ||
| 5173 | .target_set = TargetSet.initOne(.mips) | ||
| 5174 | .attributes = .{ .@"const" = true } | ||
| 5175 | |||
| 5176 | __builtin_msa_ilvev_b | ||
| 5177 | .param_str = "V16cV16cV16c" | ||
| 5178 | .target_set = TargetSet.initOne(.mips) | ||
| 5179 | .attributes = .{ .@"const" = true } | ||
| 5180 | |||
| 5181 | __builtin_msa_ilvev_d | ||
| 5182 | .param_str = "V2LLiV2LLiV2LLi" | ||
| 5183 | .target_set = TargetSet.initOne(.mips) | ||
| 5184 | .attributes = .{ .@"const" = true } | ||
| 5185 | |||
| 5186 | __builtin_msa_ilvev_h | ||
| 5187 | .param_str = "V8sV8sV8s" | ||
| 5188 | .target_set = TargetSet.initOne(.mips) | ||
| 5189 | .attributes = .{ .@"const" = true } | ||
| 5190 | |||
| 5191 | __builtin_msa_ilvev_w | ||
| 5192 | .param_str = "V4iV4iV4i" | ||
| 5193 | .target_set = TargetSet.initOne(.mips) | ||
| 5194 | .attributes = .{ .@"const" = true } | ||
| 5195 | |||
| 5196 | __builtin_msa_ilvl_b | ||
| 5197 | .param_str = "V16cV16cV16c" | ||
| 5198 | .target_set = TargetSet.initOne(.mips) | ||
| 5199 | .attributes = .{ .@"const" = true } | ||
| 5200 | |||
| 5201 | __builtin_msa_ilvl_d | ||
| 5202 | .param_str = "V2LLiV2LLiV2LLi" | ||
| 5203 | .target_set = TargetSet.initOne(.mips) | ||
| 5204 | .attributes = .{ .@"const" = true } | ||
| 5205 | |||
| 5206 | __builtin_msa_ilvl_h | ||
| 5207 | .param_str = "V8sV8sV8s" | ||
| 5208 | .target_set = TargetSet.initOne(.mips) | ||
| 5209 | .attributes = .{ .@"const" = true } | ||
| 5210 | |||
| 5211 | __builtin_msa_ilvl_w | ||
| 5212 | .param_str = "V4iV4iV4i" | ||
| 5213 | .target_set = TargetSet.initOne(.mips) | ||
| 5214 | .attributes = .{ .@"const" = true } | ||
| 5215 | |||
| 5216 | __builtin_msa_ilvod_b | ||
| 5217 | .param_str = "V16cV16cV16c" | ||
| 5218 | .target_set = TargetSet.initOne(.mips) | ||
| 5219 | .attributes = .{ .@"const" = true } | ||
| 5220 | |||
| 5221 | __builtin_msa_ilvod_d | ||
| 5222 | .param_str = "V2LLiV2LLiV2LLi" | ||
| 5223 | .target_set = TargetSet.initOne(.mips) | ||
| 5224 | .attributes = .{ .@"const" = true } | ||
| 5225 | |||
| 5226 | __builtin_msa_ilvod_h | ||
| 5227 | .param_str = "V8sV8sV8s" | ||
| 5228 | .target_set = TargetSet.initOne(.mips) | ||
| 5229 | .attributes = .{ .@"const" = true } | ||
| 5230 | |||
| 5231 | __builtin_msa_ilvod_w | ||
| 5232 | .param_str = "V4iV4iV4i" | ||
| 5233 | .target_set = TargetSet.initOne(.mips) | ||
| 5234 | .attributes = .{ .@"const" = true } | ||
| 5235 | |||
| 5236 | __builtin_msa_ilvr_b | ||
| 5237 | .param_str = "V16cV16cV16c" | ||
| 5238 | .target_set = TargetSet.initOne(.mips) | ||
| 5239 | .attributes = .{ .@"const" = true } | ||
| 5240 | |||
| 5241 | __builtin_msa_ilvr_d | ||
| 5242 | .param_str = "V2LLiV2LLiV2LLi" | ||
| 5243 | .target_set = TargetSet.initOne(.mips) | ||
| 5244 | .attributes = .{ .@"const" = true } | ||
| 5245 | |||
| 5246 | __builtin_msa_ilvr_h | ||
| 5247 | .param_str = "V8sV8sV8s" | ||
| 5248 | .target_set = TargetSet.initOne(.mips) | ||
| 5249 | .attributes = .{ .@"const" = true } | ||
| 5250 | |||
| 5251 | __builtin_msa_ilvr_w | ||
| 5252 | .param_str = "V4iV4iV4i" | ||
| 5253 | .target_set = TargetSet.initOne(.mips) | ||
| 5254 | .attributes = .{ .@"const" = true } | ||
| 5255 | |||
| 5256 | __builtin_msa_insert_b | ||
| 5257 | .param_str = "V16ScV16ScIUii" | ||
| 5258 | .target_set = TargetSet.initOne(.mips) | ||
| 5259 | .attributes = .{ .@"const" = true } | ||
| 5260 | |||
| 5261 | __builtin_msa_insert_d | ||
| 5262 | .param_str = "V2SLLiV2SLLiIUiLLi" | ||
| 5263 | .target_set = TargetSet.initOne(.mips) | ||
| 5264 | .attributes = .{ .@"const" = true } | ||
| 5265 | |||
| 5266 | __builtin_msa_insert_h | ||
| 5267 | .param_str = "V8SsV8SsIUii" | ||
| 5268 | .target_set = TargetSet.initOne(.mips) | ||
| 5269 | .attributes = .{ .@"const" = true } | ||
| 5270 | |||
| 5271 | __builtin_msa_insert_w | ||
| 5272 | .param_str = "V4SiV4SiIUii" | ||
| 5273 | .target_set = TargetSet.initOne(.mips) | ||
| 5274 | .attributes = .{ .@"const" = true } | ||
| 5275 | |||
| 5276 | __builtin_msa_insve_b | ||
| 5277 | .param_str = "V16ScV16ScIUiV16Sc" | ||
| 5278 | .target_set = TargetSet.initOne(.mips) | ||
| 5279 | .attributes = .{ .@"const" = true } | ||
| 5280 | |||
| 5281 | __builtin_msa_insve_d | ||
| 5282 | .param_str = "V2SLLiV2SLLiIUiV2SLLi" | ||
| 5283 | .target_set = TargetSet.initOne(.mips) | ||
| 5284 | .attributes = .{ .@"const" = true } | ||
| 5285 | |||
| 5286 | __builtin_msa_insve_h | ||
| 5287 | .param_str = "V8SsV8SsIUiV8Ss" | ||
| 5288 | .target_set = TargetSet.initOne(.mips) | ||
| 5289 | .attributes = .{ .@"const" = true } | ||
| 5290 | |||
| 5291 | __builtin_msa_insve_w | ||
| 5292 | .param_str = "V4SiV4SiIUiV4Si" | ||
| 5293 | .target_set = TargetSet.initOne(.mips) | ||
| 5294 | .attributes = .{ .@"const" = true } | ||
| 5295 | |||
| 5296 | __builtin_msa_ld_b | ||
| 5297 | .param_str = "V16Scv*Ii" | ||
| 5298 | .target_set = TargetSet.initOne(.mips) | ||
| 5299 | .attributes = .{ .@"const" = true } | ||
| 5300 | |||
| 5301 | __builtin_msa_ld_d | ||
| 5302 | .param_str = "V2SLLiv*Ii" | ||
| 5303 | .target_set = TargetSet.initOne(.mips) | ||
| 5304 | .attributes = .{ .@"const" = true } | ||
| 5305 | |||
| 5306 | __builtin_msa_ld_h | ||
| 5307 | .param_str = "V8Ssv*Ii" | ||
| 5308 | .target_set = TargetSet.initOne(.mips) | ||
| 5309 | .attributes = .{ .@"const" = true } | ||
| 5310 | |||
| 5311 | __builtin_msa_ld_w | ||
| 5312 | .param_str = "V4Siv*Ii" | ||
| 5313 | .target_set = TargetSet.initOne(.mips) | ||
| 5314 | .attributes = .{ .@"const" = true } | ||
| 5315 | |||
| 5316 | __builtin_msa_ldi_b | ||
| 5317 | .param_str = "V16cIi" | ||
| 5318 | .target_set = TargetSet.initOne(.mips) | ||
| 5319 | .attributes = .{ .@"const" = true } | ||
| 5320 | |||
| 5321 | __builtin_msa_ldi_d | ||
| 5322 | .param_str = "V2LLiIi" | ||
| 5323 | .target_set = TargetSet.initOne(.mips) | ||
| 5324 | .attributes = .{ .@"const" = true } | ||
| 5325 | |||
| 5326 | __builtin_msa_ldi_h | ||
| 5327 | .param_str = "V8sIi" | ||
| 5328 | .target_set = TargetSet.initOne(.mips) | ||
| 5329 | .attributes = .{ .@"const" = true } | ||
| 5330 | |||
| 5331 | __builtin_msa_ldi_w | ||
| 5332 | .param_str = "V4iIi" | ||
| 5333 | .target_set = TargetSet.initOne(.mips) | ||
| 5334 | .attributes = .{ .@"const" = true } | ||
| 5335 | |||
| 5336 | __builtin_msa_ldr_d | ||
| 5337 | .param_str = "V2SLLiv*Ii" | ||
| 5338 | .target_set = TargetSet.initOne(.mips) | ||
| 5339 | .attributes = .{ .@"const" = true } | ||
| 5340 | |||
| 5341 | __builtin_msa_ldr_w | ||
| 5342 | .param_str = "V4Siv*Ii" | ||
| 5343 | .target_set = TargetSet.initOne(.mips) | ||
| 5344 | .attributes = .{ .@"const" = true } | ||
| 5345 | |||
| 5346 | __builtin_msa_madd_q_h | ||
| 5347 | .param_str = "V8SsV8SsV8SsV8Ss" | ||
| 5348 | .target_set = TargetSet.initOne(.mips) | ||
| 5349 | .attributes = .{ .@"const" = true } | ||
| 5350 | |||
| 5351 | __builtin_msa_madd_q_w | ||
| 5352 | .param_str = "V4SiV4SiV4SiV4Si" | ||
| 5353 | .target_set = TargetSet.initOne(.mips) | ||
| 5354 | .attributes = .{ .@"const" = true } | ||
| 5355 | |||
| 5356 | __builtin_msa_maddr_q_h | ||
| 5357 | .param_str = "V8SsV8SsV8SsV8Ss" | ||
| 5358 | .target_set = TargetSet.initOne(.mips) | ||
| 5359 | .attributes = .{ .@"const" = true } | ||
| 5360 | |||
| 5361 | __builtin_msa_maddr_q_w | ||
| 5362 | .param_str = "V4SiV4SiV4SiV4Si" | ||
| 5363 | .target_set = TargetSet.initOne(.mips) | ||
| 5364 | .attributes = .{ .@"const" = true } | ||
| 5365 | |||
| 5366 | __builtin_msa_maddv_b | ||
| 5367 | .param_str = "V16ScV16ScV16ScV16Sc" | ||
| 5368 | .target_set = TargetSet.initOne(.mips) | ||
| 5369 | .attributes = .{ .@"const" = true } | ||
| 5370 | |||
| 5371 | __builtin_msa_maddv_d | ||
| 5372 | .param_str = "V2SLLiV2SLLiV2SLLiV2SLLi" | ||
| 5373 | .target_set = TargetSet.initOne(.mips) | ||
| 5374 | .attributes = .{ .@"const" = true } | ||
| 5375 | |||
| 5376 | __builtin_msa_maddv_h | ||
| 5377 | .param_str = "V8SsV8SsV8SsV8Ss" | ||
| 5378 | .target_set = TargetSet.initOne(.mips) | ||
| 5379 | .attributes = .{ .@"const" = true } | ||
| 5380 | |||
| 5381 | __builtin_msa_maddv_w | ||
| 5382 | .param_str = "V4SiV4SiV4SiV4Si" | ||
| 5383 | .target_set = TargetSet.initOne(.mips) | ||
| 5384 | .attributes = .{ .@"const" = true } | ||
| 5385 | |||
| 5386 | __builtin_msa_max_a_b | ||
| 5387 | .param_str = "V16ScV16ScV16Sc" | ||
| 5388 | .target_set = TargetSet.initOne(.mips) | ||
| 5389 | .attributes = .{ .@"const" = true } | ||
| 5390 | |||
| 5391 | __builtin_msa_max_a_d | ||
| 5392 | .param_str = "V2SLLiV2SLLiV2SLLi" | ||
| 5393 | .target_set = TargetSet.initOne(.mips) | ||
| 5394 | .attributes = .{ .@"const" = true } | ||
| 5395 | |||
| 5396 | __builtin_msa_max_a_h | ||
| 5397 | .param_str = "V8SsV8SsV8Ss" | ||
| 5398 | .target_set = TargetSet.initOne(.mips) | ||
| 5399 | .attributes = .{ .@"const" = true } | ||
| 5400 | |||
| 5401 | __builtin_msa_max_a_w | ||
| 5402 | .param_str = "V4SiV4SiV4Si" | ||
| 5403 | .target_set = TargetSet.initOne(.mips) | ||
| 5404 | .attributes = .{ .@"const" = true } | ||
| 5405 | |||
| 5406 | __builtin_msa_max_s_b | ||
| 5407 | .param_str = "V16ScV16ScV16Sc" | ||
| 5408 | .target_set = TargetSet.initOne(.mips) | ||
| 5409 | .attributes = .{ .@"const" = true } | ||
| 5410 | |||
| 5411 | __builtin_msa_max_s_d | ||
| 5412 | .param_str = "V2SLLiV2SLLiV2SLLi" | ||
| 5413 | .target_set = TargetSet.initOne(.mips) | ||
| 5414 | .attributes = .{ .@"const" = true } | ||
| 5415 | |||
| 5416 | __builtin_msa_max_s_h | ||
| 5417 | .param_str = "V8SsV8SsV8Ss" | ||
| 5418 | .target_set = TargetSet.initOne(.mips) | ||
| 5419 | .attributes = .{ .@"const" = true } | ||
| 5420 | |||
| 5421 | __builtin_msa_max_s_w | ||
| 5422 | .param_str = "V4SiV4SiV4Si" | ||
| 5423 | .target_set = TargetSet.initOne(.mips) | ||
| 5424 | .attributes = .{ .@"const" = true } | ||
| 5425 | |||
| 5426 | __builtin_msa_max_u_b | ||
| 5427 | .param_str = "V16UcV16UcV16Uc" | ||
| 5428 | .target_set = TargetSet.initOne(.mips) | ||
| 5429 | .attributes = .{ .@"const" = true } | ||
| 5430 | |||
| 5431 | __builtin_msa_max_u_d | ||
| 5432 | .param_str = "V2ULLiV2ULLiV2ULLi" | ||
| 5433 | .target_set = TargetSet.initOne(.mips) | ||
| 5434 | .attributes = .{ .@"const" = true } | ||
| 5435 | |||
| 5436 | __builtin_msa_max_u_h | ||
| 5437 | .param_str = "V8UsV8UsV8Us" | ||
| 5438 | .target_set = TargetSet.initOne(.mips) | ||
| 5439 | .attributes = .{ .@"const" = true } | ||
| 5440 | |||
| 5441 | __builtin_msa_max_u_w | ||
| 5442 | .param_str = "V4UiV4UiV4Ui" | ||
| 5443 | .target_set = TargetSet.initOne(.mips) | ||
| 5444 | .attributes = .{ .@"const" = true } | ||
| 5445 | |||
| 5446 | __builtin_msa_maxi_s_b | ||
| 5447 | .param_str = "V16ScV16ScIi" | ||
| 5448 | .target_set = TargetSet.initOne(.mips) | ||
| 5449 | .attributes = .{ .@"const" = true } | ||
| 5450 | |||
| 5451 | __builtin_msa_maxi_s_d | ||
| 5452 | .param_str = "V2SLLiV2SLLiIi" | ||
| 5453 | .target_set = TargetSet.initOne(.mips) | ||
| 5454 | .attributes = .{ .@"const" = true } | ||
| 5455 | |||
| 5456 | __builtin_msa_maxi_s_h | ||
| 5457 | .param_str = "V8SsV8SsIi" | ||
| 5458 | .target_set = TargetSet.initOne(.mips) | ||
| 5459 | .attributes = .{ .@"const" = true } | ||
| 5460 | |||
| 5461 | __builtin_msa_maxi_s_w | ||
| 5462 | .param_str = "V4SiV4SiIi" | ||
| 5463 | .target_set = TargetSet.initOne(.mips) | ||
| 5464 | .attributes = .{ .@"const" = true } | ||
| 5465 | |||
| 5466 | __builtin_msa_maxi_u_b | ||
| 5467 | .param_str = "V16UcV16UcIi" | ||
| 5468 | .target_set = TargetSet.initOne(.mips) | ||
| 5469 | .attributes = .{ .@"const" = true } | ||
| 5470 | |||
| 5471 | __builtin_msa_maxi_u_d | ||
| 5472 | .param_str = "V2ULLiV2ULLiIi" | ||
| 5473 | .target_set = TargetSet.initOne(.mips) | ||
| 5474 | .attributes = .{ .@"const" = true } | ||
| 5475 | |||
| 5476 | __builtin_msa_maxi_u_h | ||
| 5477 | .param_str = "V8UsV8UsIi" | ||
| 5478 | .target_set = TargetSet.initOne(.mips) | ||
| 5479 | .attributes = .{ .@"const" = true } | ||
| 5480 | |||
| 5481 | __builtin_msa_maxi_u_w | ||
| 5482 | .param_str = "V4UiV4UiIi" | ||
| 5483 | .target_set = TargetSet.initOne(.mips) | ||
| 5484 | .attributes = .{ .@"const" = true } | ||
| 5485 | |||
| 5486 | __builtin_msa_min_a_b | ||
| 5487 | .param_str = "V16ScV16ScV16Sc" | ||
| 5488 | .target_set = TargetSet.initOne(.mips) | ||
| 5489 | .attributes = .{ .@"const" = true } | ||
| 5490 | |||
| 5491 | __builtin_msa_min_a_d | ||
| 5492 | .param_str = "V2SLLiV2SLLiV2SLLi" | ||
| 5493 | .target_set = TargetSet.initOne(.mips) | ||
| 5494 | .attributes = .{ .@"const" = true } | ||
| 5495 | |||
| 5496 | __builtin_msa_min_a_h | ||
| 5497 | .param_str = "V8SsV8SsV8Ss" | ||
| 5498 | .target_set = TargetSet.initOne(.mips) | ||
| 5499 | .attributes = .{ .@"const" = true } | ||
| 5500 | |||
| 5501 | __builtin_msa_min_a_w | ||
| 5502 | .param_str = "V4SiV4SiV4Si" | ||
| 5503 | .target_set = TargetSet.initOne(.mips) | ||
| 5504 | .attributes = .{ .@"const" = true } | ||
| 5505 | |||
| 5506 | __builtin_msa_min_s_b | ||
| 5507 | .param_str = "V16ScV16ScV16Sc" | ||
| 5508 | .target_set = TargetSet.initOne(.mips) | ||
| 5509 | .attributes = .{ .@"const" = true } | ||
| 5510 | |||
| 5511 | __builtin_msa_min_s_d | ||
| 5512 | .param_str = "V2SLLiV2SLLiV2SLLi" | ||
| 5513 | .target_set = TargetSet.initOne(.mips) | ||
| 5514 | .attributes = .{ .@"const" = true } | ||
| 5515 | |||
| 5516 | __builtin_msa_min_s_h | ||
| 5517 | .param_str = "V8SsV8SsV8Ss" | ||
| 5518 | .target_set = TargetSet.initOne(.mips) | ||
| 5519 | .attributes = .{ .@"const" = true } | ||
| 5520 | |||
| 5521 | __builtin_msa_min_s_w | ||
| 5522 | .param_str = "V4SiV4SiV4Si" | ||
| 5523 | .target_set = TargetSet.initOne(.mips) | ||
| 5524 | .attributes = .{ .@"const" = true } | ||
| 5525 | |||
| 5526 | __builtin_msa_min_u_b | ||
| 5527 | .param_str = "V16UcV16UcV16Uc" | ||
| 5528 | .target_set = TargetSet.initOne(.mips) | ||
| 5529 | .attributes = .{ .@"const" = true } | ||
| 5530 | |||
| 5531 | __builtin_msa_min_u_d | ||
| 5532 | .param_str = "V2ULLiV2ULLiV2ULLi" | ||
| 5533 | .target_set = TargetSet.initOne(.mips) | ||
| 5534 | .attributes = .{ .@"const" = true } | ||
| 5535 | |||
| 5536 | __builtin_msa_min_u_h | ||
| 5537 | .param_str = "V8UsV8UsV8Us" | ||
| 5538 | .target_set = TargetSet.initOne(.mips) | ||
| 5539 | .attributes = .{ .@"const" = true } | ||
| 5540 | |||
| 5541 | __builtin_msa_min_u_w | ||
| 5542 | .param_str = "V4UiV4UiV4Ui" | ||
| 5543 | .target_set = TargetSet.initOne(.mips) | ||
| 5544 | .attributes = .{ .@"const" = true } | ||
| 5545 | |||
| 5546 | __builtin_msa_mini_s_b | ||
| 5547 | .param_str = "V16ScV16ScIi" | ||
| 5548 | .target_set = TargetSet.initOne(.mips) | ||
| 5549 | .attributes = .{ .@"const" = true } | ||
| 5550 | |||
| 5551 | __builtin_msa_mini_s_d | ||
| 5552 | .param_str = "V2SLLiV2SLLiIi" | ||
| 5553 | .target_set = TargetSet.initOne(.mips) | ||
| 5554 | .attributes = .{ .@"const" = true } | ||
| 5555 | |||
| 5556 | __builtin_msa_mini_s_h | ||
| 5557 | .param_str = "V8SsV8SsIi" | ||
| 5558 | .target_set = TargetSet.initOne(.mips) | ||
| 5559 | .attributes = .{ .@"const" = true } | ||
| 5560 | |||
| 5561 | __builtin_msa_mini_s_w | ||
| 5562 | .param_str = "V4SiV4SiIi" | ||
| 5563 | .target_set = TargetSet.initOne(.mips) | ||
| 5564 | .attributes = .{ .@"const" = true } | ||
| 5565 | |||
| 5566 | __builtin_msa_mini_u_b | ||
| 5567 | .param_str = "V16UcV16UcIi" | ||
| 5568 | .target_set = TargetSet.initOne(.mips) | ||
| 5569 | .attributes = .{ .@"const" = true } | ||
| 5570 | |||
| 5571 | __builtin_msa_mini_u_d | ||
| 5572 | .param_str = "V2ULLiV2ULLiIi" | ||
| 5573 | .target_set = TargetSet.initOne(.mips) | ||
| 5574 | .attributes = .{ .@"const" = true } | ||
| 5575 | |||
| 5576 | __builtin_msa_mini_u_h | ||
| 5577 | .param_str = "V8UsV8UsIi" | ||
| 5578 | .target_set = TargetSet.initOne(.mips) | ||
| 5579 | .attributes = .{ .@"const" = true } | ||
| 5580 | |||
| 5581 | __builtin_msa_mini_u_w | ||
| 5582 | .param_str = "V4UiV4UiIi" | ||
| 5583 | .target_set = TargetSet.initOne(.mips) | ||
| 5584 | .attributes = .{ .@"const" = true } | ||
| 5585 | |||
| 5586 | __builtin_msa_mod_s_b | ||
| 5587 | .param_str = "V16ScV16ScV16Sc" | ||
| 5588 | .target_set = TargetSet.initOne(.mips) | ||
| 5589 | .attributes = .{ .@"const" = true } | ||
| 5590 | |||
| 5591 | __builtin_msa_mod_s_d | ||
| 5592 | .param_str = "V2SLLiV2SLLiV2SLLi" | ||
| 5593 | .target_set = TargetSet.initOne(.mips) | ||
| 5594 | .attributes = .{ .@"const" = true } | ||
| 5595 | |||
| 5596 | __builtin_msa_mod_s_h | ||
| 5597 | .param_str = "V8SsV8SsV8Ss" | ||
| 5598 | .target_set = TargetSet.initOne(.mips) | ||
| 5599 | .attributes = .{ .@"const" = true } | ||
| 5600 | |||
| 5601 | __builtin_msa_mod_s_w | ||
| 5602 | .param_str = "V4SiV4SiV4Si" | ||
| 5603 | .target_set = TargetSet.initOne(.mips) | ||
| 5604 | .attributes = .{ .@"const" = true } | ||
| 5605 | |||
| 5606 | __builtin_msa_mod_u_b | ||
| 5607 | .param_str = "V16UcV16UcV16Uc" | ||
| 5608 | .target_set = TargetSet.initOne(.mips) | ||
| 5609 | .attributes = .{ .@"const" = true } | ||
| 5610 | |||
| 5611 | __builtin_msa_mod_u_d | ||
| 5612 | .param_str = "V2ULLiV2ULLiV2ULLi" | ||
| 5613 | .target_set = TargetSet.initOne(.mips) | ||
| 5614 | .attributes = .{ .@"const" = true } | ||
| 5615 | |||
| 5616 | __builtin_msa_mod_u_h | ||
| 5617 | .param_str = "V8UsV8UsV8Us" | ||
| 5618 | .target_set = TargetSet.initOne(.mips) | ||
| 5619 | .attributes = .{ .@"const" = true } | ||
| 5620 | |||
| 5621 | __builtin_msa_mod_u_w | ||
| 5622 | .param_str = "V4UiV4UiV4Ui" | ||
| 5623 | .target_set = TargetSet.initOne(.mips) | ||
| 5624 | .attributes = .{ .@"const" = true } | ||
| 5625 | |||
| 5626 | __builtin_msa_move_v | ||
| 5627 | .param_str = "V16ScV16Sc" | ||
| 5628 | .target_set = TargetSet.initOne(.mips) | ||
| 5629 | .attributes = .{ .@"const" = true } | ||
| 5630 | |||
| 5631 | __builtin_msa_msub_q_h | ||
| 5632 | .param_str = "V8SsV8SsV8SsV8Ss" | ||
| 5633 | .target_set = TargetSet.initOne(.mips) | ||
| 5634 | .attributes = .{ .@"const" = true } | ||
| 5635 | |||
| 5636 | __builtin_msa_msub_q_w | ||
| 5637 | .param_str = "V4SiV4SiV4SiV4Si" | ||
| 5638 | .target_set = TargetSet.initOne(.mips) | ||
| 5639 | .attributes = .{ .@"const" = true } | ||
| 5640 | |||
| 5641 | __builtin_msa_msubr_q_h | ||
| 5642 | .param_str = "V8SsV8SsV8SsV8Ss" | ||
| 5643 | .target_set = TargetSet.initOne(.mips) | ||
| 5644 | .attributes = .{ .@"const" = true } | ||
| 5645 | |||
| 5646 | __builtin_msa_msubr_q_w | ||
| 5647 | .param_str = "V4SiV4SiV4SiV4Si" | ||
| 5648 | .target_set = TargetSet.initOne(.mips) | ||
| 5649 | .attributes = .{ .@"const" = true } | ||
| 5650 | |||
| 5651 | __builtin_msa_msubv_b | ||
| 5652 | .param_str = "V16ScV16ScV16ScV16Sc" | ||
| 5653 | .target_set = TargetSet.initOne(.mips) | ||
| 5654 | .attributes = .{ .@"const" = true } | ||
| 5655 | |||
| 5656 | __builtin_msa_msubv_d | ||
| 5657 | .param_str = "V2SLLiV2SLLiV2SLLiV2SLLi" | ||
| 5658 | .target_set = TargetSet.initOne(.mips) | ||
| 5659 | .attributes = .{ .@"const" = true } | ||
| 5660 | |||
| 5661 | __builtin_msa_msubv_h | ||
| 5662 | .param_str = "V8SsV8SsV8SsV8Ss" | ||
| 5663 | .target_set = TargetSet.initOne(.mips) | ||
| 5664 | .attributes = .{ .@"const" = true } | ||
| 5665 | |||
| 5666 | __builtin_msa_msubv_w | ||
| 5667 | .param_str = "V4SiV4SiV4SiV4Si" | ||
| 5668 | .target_set = TargetSet.initOne(.mips) | ||
| 5669 | .attributes = .{ .@"const" = true } | ||
| 5670 | |||
| 5671 | __builtin_msa_mul_q_h | ||
| 5672 | .param_str = "V8SsV8SsV8Ss" | ||
| 5673 | .target_set = TargetSet.initOne(.mips) | ||
| 5674 | .attributes = .{ .@"const" = true } | ||
| 5675 | |||
| 5676 | __builtin_msa_mul_q_w | ||
| 5677 | .param_str = "V4SiV4SiV4Si" | ||
| 5678 | .target_set = TargetSet.initOne(.mips) | ||
| 5679 | .attributes = .{ .@"const" = true } | ||
| 5680 | |||
| 5681 | __builtin_msa_mulr_q_h | ||
| 5682 | .param_str = "V8SsV8SsV8Ss" | ||
| 5683 | .target_set = TargetSet.initOne(.mips) | ||
| 5684 | .attributes = .{ .@"const" = true } | ||
| 5685 | |||
| 5686 | __builtin_msa_mulr_q_w | ||
| 5687 | .param_str = "V4SiV4SiV4Si" | ||
| 5688 | .target_set = TargetSet.initOne(.mips) | ||
| 5689 | .attributes = .{ .@"const" = true } | ||
| 5690 | |||
| 5691 | __builtin_msa_mulv_b | ||
| 5692 | .param_str = "V16ScV16ScV16Sc" | ||
| 5693 | .target_set = TargetSet.initOne(.mips) | ||
| 5694 | .attributes = .{ .@"const" = true } | ||
| 5695 | |||
| 5696 | __builtin_msa_mulv_d | ||
| 5697 | .param_str = "V2SLLiV2SLLiV2SLLi" | ||
| 5698 | .target_set = TargetSet.initOne(.mips) | ||
| 5699 | .attributes = .{ .@"const" = true } | ||
| 5700 | |||
| 5701 | __builtin_msa_mulv_h | ||
| 5702 | .param_str = "V8SsV8SsV8Ss" | ||
| 5703 | .target_set = TargetSet.initOne(.mips) | ||
| 5704 | .attributes = .{ .@"const" = true } | ||
| 5705 | |||
| 5706 | __builtin_msa_mulv_w | ||
| 5707 | .param_str = "V4SiV4SiV4Si" | ||
| 5708 | .target_set = TargetSet.initOne(.mips) | ||
| 5709 | .attributes = .{ .@"const" = true } | ||
| 5710 | |||
| 5711 | __builtin_msa_nloc_b | ||
| 5712 | .param_str = "V16ScV16Sc" | ||
| 5713 | .target_set = TargetSet.initOne(.mips) | ||
| 5714 | .attributes = .{ .@"const" = true } | ||
| 5715 | |||
| 5716 | __builtin_msa_nloc_d | ||
| 5717 | .param_str = "V2SLLiV2SLLi" | ||
| 5718 | .target_set = TargetSet.initOne(.mips) | ||
| 5719 | .attributes = .{ .@"const" = true } | ||
| 5720 | |||
| 5721 | __builtin_msa_nloc_h | ||
| 5722 | .param_str = "V8SsV8Ss" | ||
| 5723 | .target_set = TargetSet.initOne(.mips) | ||
| 5724 | .attributes = .{ .@"const" = true } | ||
| 5725 | |||
| 5726 | __builtin_msa_nloc_w | ||
| 5727 | .param_str = "V4SiV4Si" | ||
| 5728 | .target_set = TargetSet.initOne(.mips) | ||
| 5729 | .attributes = .{ .@"const" = true } | ||
| 5730 | |||
| 5731 | __builtin_msa_nlzc_b | ||
| 5732 | .param_str = "V16ScV16Sc" | ||
| 5733 | .target_set = TargetSet.initOne(.mips) | ||
| 5734 | .attributes = .{ .@"const" = true } | ||
| 5735 | |||
| 5736 | __builtin_msa_nlzc_d | ||
| 5737 | .param_str = "V2SLLiV2SLLi" | ||
| 5738 | .target_set = TargetSet.initOne(.mips) | ||
| 5739 | .attributes = .{ .@"const" = true } | ||
| 5740 | |||
| 5741 | __builtin_msa_nlzc_h | ||
| 5742 | .param_str = "V8SsV8Ss" | ||
| 5743 | .target_set = TargetSet.initOne(.mips) | ||
| 5744 | .attributes = .{ .@"const" = true } | ||
| 5745 | |||
| 5746 | __builtin_msa_nlzc_w | ||
| 5747 | .param_str = "V4SiV4Si" | ||
| 5748 | .target_set = TargetSet.initOne(.mips) | ||
| 5749 | .attributes = .{ .@"const" = true } | ||
| 5750 | |||
| 5751 | __builtin_msa_nor_v | ||
| 5752 | .param_str = "V16UcV16UcV16Uc" | ||
| 5753 | .target_set = TargetSet.initOne(.mips) | ||
| 5754 | .attributes = .{ .@"const" = true } | ||
| 5755 | |||
| 5756 | __builtin_msa_nori_b | ||
| 5757 | .param_str = "V16UcV16cIUi" | ||
| 5758 | .target_set = TargetSet.initOne(.mips) | ||
| 5759 | .attributes = .{ .@"const" = true } | ||
| 5760 | |||
| 5761 | __builtin_msa_or_v | ||
| 5762 | .param_str = "V16UcV16UcV16Uc" | ||
| 5763 | .target_set = TargetSet.initOne(.mips) | ||
| 5764 | .attributes = .{ .@"const" = true } | ||
| 5765 | |||
| 5766 | __builtin_msa_ori_b | ||
| 5767 | .param_str = "V16UcV16UcIUi" | ||
| 5768 | .target_set = TargetSet.initOne(.mips) | ||
| 5769 | .attributes = .{ .@"const" = true } | ||
| 5770 | |||
| 5771 | __builtin_msa_pckev_b | ||
| 5772 | .param_str = "V16cV16cV16c" | ||
| 5773 | .target_set = TargetSet.initOne(.mips) | ||
| 5774 | .attributes = .{ .@"const" = true } | ||
| 5775 | |||
| 5776 | __builtin_msa_pckev_d | ||
| 5777 | .param_str = "V2LLiV2LLiV2LLi" | ||
| 5778 | .target_set = TargetSet.initOne(.mips) | ||
| 5779 | .attributes = .{ .@"const" = true } | ||
| 5780 | |||
| 5781 | __builtin_msa_pckev_h | ||
| 5782 | .param_str = "V8sV8sV8s" | ||
| 5783 | .target_set = TargetSet.initOne(.mips) | ||
| 5784 | .attributes = .{ .@"const" = true } | ||
| 5785 | |||
| 5786 | __builtin_msa_pckev_w | ||
| 5787 | .param_str = "V4iV4iV4i" | ||
| 5788 | .target_set = TargetSet.initOne(.mips) | ||
| 5789 | .attributes = .{ .@"const" = true } | ||
| 5790 | |||
| 5791 | __builtin_msa_pckod_b | ||
| 5792 | .param_str = "V16cV16cV16c" | ||
| 5793 | .target_set = TargetSet.initOne(.mips) | ||
| 5794 | .attributes = .{ .@"const" = true } | ||
| 5795 | |||
| 5796 | __builtin_msa_pckod_d | ||
| 5797 | .param_str = "V2LLiV2LLiV2LLi" | ||
| 5798 | .target_set = TargetSet.initOne(.mips) | ||
| 5799 | .attributes = .{ .@"const" = true } | ||
| 5800 | |||
| 5801 | __builtin_msa_pckod_h | ||
| 5802 | .param_str = "V8sV8sV8s" | ||
| 5803 | .target_set = TargetSet.initOne(.mips) | ||
| 5804 | .attributes = .{ .@"const" = true } | ||
| 5805 | |||
| 5806 | __builtin_msa_pckod_w | ||
| 5807 | .param_str = "V4iV4iV4i" | ||
| 5808 | .target_set = TargetSet.initOne(.mips) | ||
| 5809 | .attributes = .{ .@"const" = true } | ||
| 5810 | |||
| 5811 | __builtin_msa_pcnt_b | ||
| 5812 | .param_str = "V16ScV16Sc" | ||
| 5813 | .target_set = TargetSet.initOne(.mips) | ||
| 5814 | .attributes = .{ .@"const" = true } | ||
| 5815 | |||
| 5816 | __builtin_msa_pcnt_d | ||
| 5817 | .param_str = "V2SLLiV2SLLi" | ||
| 5818 | .target_set = TargetSet.initOne(.mips) | ||
| 5819 | .attributes = .{ .@"const" = true } | ||
| 5820 | |||
| 5821 | __builtin_msa_pcnt_h | ||
| 5822 | .param_str = "V8SsV8Ss" | ||
| 5823 | .target_set = TargetSet.initOne(.mips) | ||
| 5824 | .attributes = .{ .@"const" = true } | ||
| 5825 | |||
| 5826 | __builtin_msa_pcnt_w | ||
| 5827 | .param_str = "V4SiV4Si" | ||
| 5828 | .target_set = TargetSet.initOne(.mips) | ||
| 5829 | .attributes = .{ .@"const" = true } | ||
| 5830 | |||
| 5831 | __builtin_msa_sat_s_b | ||
| 5832 | .param_str = "V16ScV16ScIUi" | ||
| 5833 | .target_set = TargetSet.initOne(.mips) | ||
| 5834 | .attributes = .{ .@"const" = true } | ||
| 5835 | |||
| 5836 | __builtin_msa_sat_s_d | ||
| 5837 | .param_str = "V2SLLiV2SLLiIUi" | ||
| 5838 | .target_set = TargetSet.initOne(.mips) | ||
| 5839 | .attributes = .{ .@"const" = true } | ||
| 5840 | |||
| 5841 | __builtin_msa_sat_s_h | ||
| 5842 | .param_str = "V8SsV8SsIUi" | ||
| 5843 | .target_set = TargetSet.initOne(.mips) | ||
| 5844 | .attributes = .{ .@"const" = true } | ||
| 5845 | |||
| 5846 | __builtin_msa_sat_s_w | ||
| 5847 | .param_str = "V4SiV4SiIUi" | ||
| 5848 | .target_set = TargetSet.initOne(.mips) | ||
| 5849 | .attributes = .{ .@"const" = true } | ||
| 5850 | |||
| 5851 | __builtin_msa_sat_u_b | ||
| 5852 | .param_str = "V16UcV16UcIUi" | ||
| 5853 | .target_set = TargetSet.initOne(.mips) | ||
| 5854 | .attributes = .{ .@"const" = true } | ||
| 5855 | |||
| 5856 | __builtin_msa_sat_u_d | ||
| 5857 | .param_str = "V2ULLiV2ULLiIUi" | ||
| 5858 | .target_set = TargetSet.initOne(.mips) | ||
| 5859 | .attributes = .{ .@"const" = true } | ||
| 5860 | |||
| 5861 | __builtin_msa_sat_u_h | ||
| 5862 | .param_str = "V8UsV8UsIUi" | ||
| 5863 | .target_set = TargetSet.initOne(.mips) | ||
| 5864 | .attributes = .{ .@"const" = true } | ||
| 5865 | |||
| 5866 | __builtin_msa_sat_u_w | ||
| 5867 | .param_str = "V4UiV4UiIUi" | ||
| 5868 | .target_set = TargetSet.initOne(.mips) | ||
| 5869 | .attributes = .{ .@"const" = true } | ||
| 5870 | |||
| 5871 | __builtin_msa_shf_b | ||
| 5872 | .param_str = "V16cV16cIUi" | ||
| 5873 | .target_set = TargetSet.initOne(.mips) | ||
| 5874 | .attributes = .{ .@"const" = true } | ||
| 5875 | |||
| 5876 | __builtin_msa_shf_h | ||
| 5877 | .param_str = "V8sV8sIUi" | ||
| 5878 | .target_set = TargetSet.initOne(.mips) | ||
| 5879 | .attributes = .{ .@"const" = true } | ||
| 5880 | |||
| 5881 | __builtin_msa_shf_w | ||
| 5882 | .param_str = "V4iV4iIUi" | ||
| 5883 | .target_set = TargetSet.initOne(.mips) | ||
| 5884 | .attributes = .{ .@"const" = true } | ||
| 5885 | |||
| 5886 | __builtin_msa_sld_b | ||
| 5887 | .param_str = "V16cV16cV16cUi" | ||
| 5888 | .target_set = TargetSet.initOne(.mips) | ||
| 5889 | .attributes = .{ .@"const" = true } | ||
| 5890 | |||
| 5891 | __builtin_msa_sld_d | ||
| 5892 | .param_str = "V2LLiV2LLiV2LLiUi" | ||
| 5893 | .target_set = TargetSet.initOne(.mips) | ||
| 5894 | .attributes = .{ .@"const" = true } | ||
| 5895 | |||
| 5896 | __builtin_msa_sld_h | ||
| 5897 | .param_str = "V8sV8sV8sUi" | ||
| 5898 | .target_set = TargetSet.initOne(.mips) | ||
| 5899 | .attributes = .{ .@"const" = true } | ||
| 5900 | |||
| 5901 | __builtin_msa_sld_w | ||
| 5902 | .param_str = "V4iV4iV4iUi" | ||
| 5903 | .target_set = TargetSet.initOne(.mips) | ||
| 5904 | .attributes = .{ .@"const" = true } | ||
| 5905 | |||
| 5906 | __builtin_msa_sldi_b | ||
| 5907 | .param_str = "V16cV16cV16cIUi" | ||
| 5908 | .target_set = TargetSet.initOne(.mips) | ||
| 5909 | .attributes = .{ .@"const" = true } | ||
| 5910 | |||
| 5911 | __builtin_msa_sldi_d | ||
| 5912 | .param_str = "V2LLiV2LLiV2LLiIUi" | ||
| 5913 | .target_set = TargetSet.initOne(.mips) | ||
| 5914 | .attributes = .{ .@"const" = true } | ||
| 5915 | |||
| 5916 | __builtin_msa_sldi_h | ||
| 5917 | .param_str = "V8sV8sV8sIUi" | ||
| 5918 | .target_set = TargetSet.initOne(.mips) | ||
| 5919 | .attributes = .{ .@"const" = true } | ||
| 5920 | |||
| 5921 | __builtin_msa_sldi_w | ||
| 5922 | .param_str = "V4iV4iV4iIUi" | ||
| 5923 | .target_set = TargetSet.initOne(.mips) | ||
| 5924 | .attributes = .{ .@"const" = true } | ||
| 5925 | |||
| 5926 | __builtin_msa_sll_b | ||
| 5927 | .param_str = "V16cV16cV16c" | ||
| 5928 | .target_set = TargetSet.initOne(.mips) | ||
| 5929 | .attributes = .{ .@"const" = true } | ||
| 5930 | |||
| 5931 | __builtin_msa_sll_d | ||
| 5932 | .param_str = "V2LLiV2LLiV2LLi" | ||
| 5933 | .target_set = TargetSet.initOne(.mips) | ||
| 5934 | .attributes = .{ .@"const" = true } | ||
| 5935 | |||
| 5936 | __builtin_msa_sll_h | ||
| 5937 | .param_str = "V8sV8sV8s" | ||
| 5938 | .target_set = TargetSet.initOne(.mips) | ||
| 5939 | .attributes = .{ .@"const" = true } | ||
| 5940 | |||
| 5941 | __builtin_msa_sll_w | ||
| 5942 | .param_str = "V4iV4iV4i" | ||
| 5943 | .target_set = TargetSet.initOne(.mips) | ||
| 5944 | .attributes = .{ .@"const" = true } | ||
| 5945 | |||
| 5946 | __builtin_msa_slli_b | ||
| 5947 | .param_str = "V16cV16cIUi" | ||
| 5948 | .target_set = TargetSet.initOne(.mips) | ||
| 5949 | .attributes = .{ .@"const" = true } | ||
| 5950 | |||
| 5951 | __builtin_msa_slli_d | ||
| 5952 | .param_str = "V2LLiV2LLiIUi" | ||
| 5953 | .target_set = TargetSet.initOne(.mips) | ||
| 5954 | .attributes = .{ .@"const" = true } | ||
| 5955 | |||
| 5956 | __builtin_msa_slli_h | ||
| 5957 | .param_str = "V8sV8sIUi" | ||
| 5958 | .target_set = TargetSet.initOne(.mips) | ||
| 5959 | .attributes = .{ .@"const" = true } | ||
| 5960 | |||
| 5961 | __builtin_msa_slli_w | ||
| 5962 | .param_str = "V4iV4iIUi" | ||
| 5963 | .target_set = TargetSet.initOne(.mips) | ||
| 5964 | .attributes = .{ .@"const" = true } | ||
| 5965 | |||
| 5966 | __builtin_msa_splat_b | ||
| 5967 | .param_str = "V16cV16cUi" | ||
| 5968 | .target_set = TargetSet.initOne(.mips) | ||
| 5969 | .attributes = .{ .@"const" = true } | ||
| 5970 | |||
| 5971 | __builtin_msa_splat_d | ||
| 5972 | .param_str = "V2LLiV2LLiUi" | ||
| 5973 | .target_set = TargetSet.initOne(.mips) | ||
| 5974 | .attributes = .{ .@"const" = true } | ||
| 5975 | |||
| 5976 | __builtin_msa_splat_h | ||
| 5977 | .param_str = "V8sV8sUi" | ||
| 5978 | .target_set = TargetSet.initOne(.mips) | ||
| 5979 | .attributes = .{ .@"const" = true } | ||
| 5980 | |||
| 5981 | __builtin_msa_splat_w | ||
| 5982 | .param_str = "V4iV4iUi" | ||
| 5983 | .target_set = TargetSet.initOne(.mips) | ||
| 5984 | .attributes = .{ .@"const" = true } | ||
| 5985 | |||
| 5986 | __builtin_msa_splati_b | ||
| 5987 | .param_str = "V16cV16cIUi" | ||
| 5988 | .target_set = TargetSet.initOne(.mips) | ||
| 5989 | .attributes = .{ .@"const" = true } | ||
| 5990 | |||
| 5991 | __builtin_msa_splati_d | ||
| 5992 | .param_str = "V2LLiV2LLiIUi" | ||
| 5993 | .target_set = TargetSet.initOne(.mips) | ||
| 5994 | .attributes = .{ .@"const" = true } | ||
| 5995 | |||
| 5996 | __builtin_msa_splati_h | ||
| 5997 | .param_str = "V8sV8sIUi" | ||
| 5998 | .target_set = TargetSet.initOne(.mips) | ||
| 5999 | .attributes = .{ .@"const" = true } | ||
| 6000 | |||
| 6001 | __builtin_msa_splati_w | ||
| 6002 | .param_str = "V4iV4iIUi" | ||
| 6003 | .target_set = TargetSet.initOne(.mips) | ||
| 6004 | .attributes = .{ .@"const" = true } | ||
| 6005 | |||
| 6006 | __builtin_msa_sra_b | ||
| 6007 | .param_str = "V16cV16cV16c" | ||
| 6008 | .target_set = TargetSet.initOne(.mips) | ||
| 6009 | .attributes = .{ .@"const" = true } | ||
| 6010 | |||
| 6011 | __builtin_msa_sra_d | ||
| 6012 | .param_str = "V2LLiV2LLiV2LLi" | ||
| 6013 | .target_set = TargetSet.initOne(.mips) | ||
| 6014 | .attributes = .{ .@"const" = true } | ||
| 6015 | |||
| 6016 | __builtin_msa_sra_h | ||
| 6017 | .param_str = "V8sV8sV8s" | ||
| 6018 | .target_set = TargetSet.initOne(.mips) | ||
| 6019 | .attributes = .{ .@"const" = true } | ||
| 6020 | |||
| 6021 | __builtin_msa_sra_w | ||
| 6022 | .param_str = "V4iV4iV4i" | ||
| 6023 | .target_set = TargetSet.initOne(.mips) | ||
| 6024 | .attributes = .{ .@"const" = true } | ||
| 6025 | |||
| 6026 | __builtin_msa_srai_b | ||
| 6027 | .param_str = "V16cV16cIUi" | ||
| 6028 | .target_set = TargetSet.initOne(.mips) | ||
| 6029 | .attributes = .{ .@"const" = true } | ||
| 6030 | |||
| 6031 | __builtin_msa_srai_d | ||
| 6032 | .param_str = "V2LLiV2LLiIUi" | ||
| 6033 | .target_set = TargetSet.initOne(.mips) | ||
| 6034 | .attributes = .{ .@"const" = true } | ||
| 6035 | |||
| 6036 | __builtin_msa_srai_h | ||
| 6037 | .param_str = "V8sV8sIUi" | ||
| 6038 | .target_set = TargetSet.initOne(.mips) | ||
| 6039 | .attributes = .{ .@"const" = true } | ||
| 6040 | |||
| 6041 | __builtin_msa_srai_w | ||
| 6042 | .param_str = "V4iV4iIUi" | ||
| 6043 | .target_set = TargetSet.initOne(.mips) | ||
| 6044 | .attributes = .{ .@"const" = true } | ||
| 6045 | |||
| 6046 | __builtin_msa_srar_b | ||
| 6047 | .param_str = "V16cV16cV16c" | ||
| 6048 | .target_set = TargetSet.initOne(.mips) | ||
| 6049 | .attributes = .{ .@"const" = true } | ||
| 6050 | |||
| 6051 | __builtin_msa_srar_d | ||
| 6052 | .param_str = "V2LLiV2LLiV2LLi" | ||
| 6053 | .target_set = TargetSet.initOne(.mips) | ||
| 6054 | .attributes = .{ .@"const" = true } | ||
| 6055 | |||
| 6056 | __builtin_msa_srar_h | ||
| 6057 | .param_str = "V8sV8sV8s" | ||
| 6058 | .target_set = TargetSet.initOne(.mips) | ||
| 6059 | .attributes = .{ .@"const" = true } | ||
| 6060 | |||
| 6061 | __builtin_msa_srar_w | ||
| 6062 | .param_str = "V4iV4iV4i" | ||
| 6063 | .target_set = TargetSet.initOne(.mips) | ||
| 6064 | .attributes = .{ .@"const" = true } | ||
| 6065 | |||
| 6066 | __builtin_msa_srari_b | ||
| 6067 | .param_str = "V16cV16cIUi" | ||
| 6068 | .target_set = TargetSet.initOne(.mips) | ||
| 6069 | .attributes = .{ .@"const" = true } | ||
| 6070 | |||
| 6071 | __builtin_msa_srari_d | ||
| 6072 | .param_str = "V2LLiV2LLiIUi" | ||
| 6073 | .target_set = TargetSet.initOne(.mips) | ||
| 6074 | .attributes = .{ .@"const" = true } | ||
| 6075 | |||
| 6076 | __builtin_msa_srari_h | ||
| 6077 | .param_str = "V8sV8sIUi" | ||
| 6078 | .target_set = TargetSet.initOne(.mips) | ||
| 6079 | .attributes = .{ .@"const" = true } | ||
| 6080 | |||
| 6081 | __builtin_msa_srari_w | ||
| 6082 | .param_str = "V4iV4iIUi" | ||
| 6083 | .target_set = TargetSet.initOne(.mips) | ||
| 6084 | .attributes = .{ .@"const" = true } | ||
| 6085 | |||
| 6086 | __builtin_msa_srl_b | ||
| 6087 | .param_str = "V16cV16cV16c" | ||
| 6088 | .target_set = TargetSet.initOne(.mips) | ||
| 6089 | .attributes = .{ .@"const" = true } | ||
| 6090 | |||
| 6091 | __builtin_msa_srl_d | ||
| 6092 | .param_str = "V2LLiV2LLiV2LLi" | ||
| 6093 | .target_set = TargetSet.initOne(.mips) | ||
| 6094 | .attributes = .{ .@"const" = true } | ||
| 6095 | |||
| 6096 | __builtin_msa_srl_h | ||
| 6097 | .param_str = "V8sV8sV8s" | ||
| 6098 | .target_set = TargetSet.initOne(.mips) | ||
| 6099 | .attributes = .{ .@"const" = true } | ||
| 6100 | |||
| 6101 | __builtin_msa_srl_w | ||
| 6102 | .param_str = "V4iV4iV4i" | ||
| 6103 | .target_set = TargetSet.initOne(.mips) | ||
| 6104 | .attributes = .{ .@"const" = true } | ||
| 6105 | |||
| 6106 | __builtin_msa_srli_b | ||
| 6107 | .param_str = "V16cV16cIUi" | ||
| 6108 | .target_set = TargetSet.initOne(.mips) | ||
| 6109 | .attributes = .{ .@"const" = true } | ||
| 6110 | |||
| 6111 | __builtin_msa_srli_d | ||
| 6112 | .param_str = "V2LLiV2LLiIUi" | ||
| 6113 | .target_set = TargetSet.initOne(.mips) | ||
| 6114 | .attributes = .{ .@"const" = true } | ||
| 6115 | |||
| 6116 | __builtin_msa_srli_h | ||
| 6117 | .param_str = "V8sV8sIUi" | ||
| 6118 | .target_set = TargetSet.initOne(.mips) | ||
| 6119 | .attributes = .{ .@"const" = true } | ||
| 6120 | |||
| 6121 | __builtin_msa_srli_w | ||
| 6122 | .param_str = "V4iV4iIUi" | ||
| 6123 | .target_set = TargetSet.initOne(.mips) | ||
| 6124 | .attributes = .{ .@"const" = true } | ||
| 6125 | |||
| 6126 | __builtin_msa_srlr_b | ||
| 6127 | .param_str = "V16cV16cV16c" | ||
| 6128 | .target_set = TargetSet.initOne(.mips) | ||
| 6129 | .attributes = .{ .@"const" = true } | ||
| 6130 | |||
| 6131 | __builtin_msa_srlr_d | ||
| 6132 | .param_str = "V2LLiV2LLiV2LLi" | ||
| 6133 | .target_set = TargetSet.initOne(.mips) | ||
| 6134 | .attributes = .{ .@"const" = true } | ||
| 6135 | |||
| 6136 | __builtin_msa_srlr_h | ||
| 6137 | .param_str = "V8sV8sV8s" | ||
| 6138 | .target_set = TargetSet.initOne(.mips) | ||
| 6139 | .attributes = .{ .@"const" = true } | ||
| 6140 | |||
| 6141 | __builtin_msa_srlr_w | ||
| 6142 | .param_str = "V4iV4iV4i" | ||
| 6143 | .target_set = TargetSet.initOne(.mips) | ||
| 6144 | .attributes = .{ .@"const" = true } | ||
| 6145 | |||
| 6146 | __builtin_msa_srlri_b | ||
| 6147 | .param_str = "V16cV16cIUi" | ||
| 6148 | .target_set = TargetSet.initOne(.mips) | ||
| 6149 | .attributes = .{ .@"const" = true } | ||
| 6150 | |||
| 6151 | __builtin_msa_srlri_d | ||
| 6152 | .param_str = "V2LLiV2LLiIUi" | ||
| 6153 | .target_set = TargetSet.initOne(.mips) | ||
| 6154 | .attributes = .{ .@"const" = true } | ||
| 6155 | |||
| 6156 | __builtin_msa_srlri_h | ||
| 6157 | .param_str = "V8sV8sIUi" | ||
| 6158 | .target_set = TargetSet.initOne(.mips) | ||
| 6159 | .attributes = .{ .@"const" = true } | ||
| 6160 | |||
| 6161 | __builtin_msa_srlri_w | ||
| 6162 | .param_str = "V4iV4iIUi" | ||
| 6163 | .target_set = TargetSet.initOne(.mips) | ||
| 6164 | .attributes = .{ .@"const" = true } | ||
| 6165 | |||
| 6166 | __builtin_msa_st_b | ||
| 6167 | .param_str = "vV16Scv*Ii" | ||
| 6168 | .target_set = TargetSet.initOne(.mips) | ||
| 6169 | .attributes = .{ .@"const" = true } | ||
| 6170 | |||
| 6171 | __builtin_msa_st_d | ||
| 6172 | .param_str = "vV2SLLiv*Ii" | ||
| 6173 | .target_set = TargetSet.initOne(.mips) | ||
| 6174 | .attributes = .{ .@"const" = true } | ||
| 6175 | |||
| 6176 | __builtin_msa_st_h | ||
| 6177 | .param_str = "vV8Ssv*Ii" | ||
| 6178 | .target_set = TargetSet.initOne(.mips) | ||
| 6179 | .attributes = .{ .@"const" = true } | ||
| 6180 | |||
| 6181 | __builtin_msa_st_w | ||
| 6182 | .param_str = "vV4Siv*Ii" | ||
| 6183 | .target_set = TargetSet.initOne(.mips) | ||
| 6184 | .attributes = .{ .@"const" = true } | ||
| 6185 | |||
| 6186 | __builtin_msa_str_d | ||
| 6187 | .param_str = "vV2SLLiv*Ii" | ||
| 6188 | .target_set = TargetSet.initOne(.mips) | ||
| 6189 | .attributes = .{ .@"const" = true } | ||
| 6190 | |||
| 6191 | __builtin_msa_str_w | ||
| 6192 | .param_str = "vV4Siv*Ii" | ||
| 6193 | .target_set = TargetSet.initOne(.mips) | ||
| 6194 | .attributes = .{ .@"const" = true } | ||
| 6195 | |||
| 6196 | __builtin_msa_subs_s_b | ||
| 6197 | .param_str = "V16ScV16ScV16Sc" | ||
| 6198 | .target_set = TargetSet.initOne(.mips) | ||
| 6199 | .attributes = .{ .@"const" = true } | ||
| 6200 | |||
| 6201 | __builtin_msa_subs_s_d | ||
| 6202 | .param_str = "V2SLLiV2SLLiV2SLLi" | ||
| 6203 | .target_set = TargetSet.initOne(.mips) | ||
| 6204 | .attributes = .{ .@"const" = true } | ||
| 6205 | |||
| 6206 | __builtin_msa_subs_s_h | ||
| 6207 | .param_str = "V8SsV8SsV8Ss" | ||
| 6208 | .target_set = TargetSet.initOne(.mips) | ||
| 6209 | .attributes = .{ .@"const" = true } | ||
| 6210 | |||
| 6211 | __builtin_msa_subs_s_w | ||
| 6212 | .param_str = "V4SiV4SiV4Si" | ||
| 6213 | .target_set = TargetSet.initOne(.mips) | ||
| 6214 | .attributes = .{ .@"const" = true } | ||
| 6215 | |||
| 6216 | __builtin_msa_subs_u_b | ||
| 6217 | .param_str = "V16UcV16UcV16Uc" | ||
| 6218 | .target_set = TargetSet.initOne(.mips) | ||
| 6219 | .attributes = .{ .@"const" = true } | ||
| 6220 | |||
| 6221 | __builtin_msa_subs_u_d | ||
| 6222 | .param_str = "V2ULLiV2ULLiV2ULLi" | ||
| 6223 | .target_set = TargetSet.initOne(.mips) | ||
| 6224 | .attributes = .{ .@"const" = true } | ||
| 6225 | |||
| 6226 | __builtin_msa_subs_u_h | ||
| 6227 | .param_str = "V8UsV8UsV8Us" | ||
| 6228 | .target_set = TargetSet.initOne(.mips) | ||
| 6229 | .attributes = .{ .@"const" = true } | ||
| 6230 | |||
| 6231 | __builtin_msa_subs_u_w | ||
| 6232 | .param_str = "V4UiV4UiV4Ui" | ||
| 6233 | .target_set = TargetSet.initOne(.mips) | ||
| 6234 | .attributes = .{ .@"const" = true } | ||
| 6235 | |||
| 6236 | __builtin_msa_subsus_u_b | ||
| 6237 | .param_str = "V16UcV16UcV16Sc" | ||
| 6238 | .target_set = TargetSet.initOne(.mips) | ||
| 6239 | .attributes = .{ .@"const" = true } | ||
| 6240 | |||
| 6241 | __builtin_msa_subsus_u_d | ||
| 6242 | .param_str = "V2ULLiV2ULLiV2SLLi" | ||
| 6243 | .target_set = TargetSet.initOne(.mips) | ||
| 6244 | .attributes = .{ .@"const" = true } | ||
| 6245 | |||
| 6246 | __builtin_msa_subsus_u_h | ||
| 6247 | .param_str = "V8UsV8UsV8Ss" | ||
| 6248 | .target_set = TargetSet.initOne(.mips) | ||
| 6249 | .attributes = .{ .@"const" = true } | ||
| 6250 | |||
| 6251 | __builtin_msa_subsus_u_w | ||
| 6252 | .param_str = "V4UiV4UiV4Si" | ||
| 6253 | .target_set = TargetSet.initOne(.mips) | ||
| 6254 | .attributes = .{ .@"const" = true } | ||
| 6255 | |||
| 6256 | __builtin_msa_subsuu_s_b | ||
| 6257 | .param_str = "V16ScV16UcV16Uc" | ||
| 6258 | .target_set = TargetSet.initOne(.mips) | ||
| 6259 | .attributes = .{ .@"const" = true } | ||
| 6260 | |||
| 6261 | __builtin_msa_subsuu_s_d | ||
| 6262 | .param_str = "V2SLLiV2ULLiV2ULLi" | ||
| 6263 | .target_set = TargetSet.initOne(.mips) | ||
| 6264 | .attributes = .{ .@"const" = true } | ||
| 6265 | |||
| 6266 | __builtin_msa_subsuu_s_h | ||
| 6267 | .param_str = "V8SsV8UsV8Us" | ||
| 6268 | .target_set = TargetSet.initOne(.mips) | ||
| 6269 | .attributes = .{ .@"const" = true } | ||
| 6270 | |||
| 6271 | __builtin_msa_subsuu_s_w | ||
| 6272 | .param_str = "V4SiV4UiV4Ui" | ||
| 6273 | .target_set = TargetSet.initOne(.mips) | ||
| 6274 | .attributes = .{ .@"const" = true } | ||
| 6275 | |||
| 6276 | __builtin_msa_subv_b | ||
| 6277 | .param_str = "V16cV16cV16c" | ||
| 6278 | .target_set = TargetSet.initOne(.mips) | ||
| 6279 | .attributes = .{ .@"const" = true } | ||
| 6280 | |||
| 6281 | __builtin_msa_subv_d | ||
| 6282 | .param_str = "V2LLiV2LLiV2LLi" | ||
| 6283 | .target_set = TargetSet.initOne(.mips) | ||
| 6284 | .attributes = .{ .@"const" = true } | ||
| 6285 | |||
| 6286 | __builtin_msa_subv_h | ||
| 6287 | .param_str = "V8sV8sV8s" | ||
| 6288 | .target_set = TargetSet.initOne(.mips) | ||
| 6289 | .attributes = .{ .@"const" = true } | ||
| 6290 | |||
| 6291 | __builtin_msa_subv_w | ||
| 6292 | .param_str = "V4iV4iV4i" | ||
| 6293 | .target_set = TargetSet.initOne(.mips) | ||
| 6294 | .attributes = .{ .@"const" = true } | ||
| 6295 | |||
| 6296 | __builtin_msa_subvi_b | ||
| 6297 | .param_str = "V16cV16cIUi" | ||
| 6298 | .target_set = TargetSet.initOne(.mips) | ||
| 6299 | .attributes = .{ .@"const" = true } | ||
| 6300 | |||
| 6301 | __builtin_msa_subvi_d | ||
| 6302 | .param_str = "V2LLiV2LLiIUi" | ||
| 6303 | .target_set = TargetSet.initOne(.mips) | ||
| 6304 | .attributes = .{ .@"const" = true } | ||
| 6305 | |||
| 6306 | __builtin_msa_subvi_h | ||
| 6307 | .param_str = "V8sV8sIUi" | ||
| 6308 | .target_set = TargetSet.initOne(.mips) | ||
| 6309 | .attributes = .{ .@"const" = true } | ||
| 6310 | |||
| 6311 | __builtin_msa_subvi_w | ||
| 6312 | .param_str = "V4iV4iIUi" | ||
| 6313 | .target_set = TargetSet.initOne(.mips) | ||
| 6314 | .attributes = .{ .@"const" = true } | ||
| 6315 | |||
| 6316 | __builtin_msa_vshf_b | ||
| 6317 | .param_str = "V16cV16cV16cV16c" | ||
| 6318 | .target_set = TargetSet.initOne(.mips) | ||
| 6319 | .attributes = .{ .@"const" = true } | ||
| 6320 | |||
| 6321 | __builtin_msa_vshf_d | ||
| 6322 | .param_str = "V2LLiV2LLiV2LLiV2LLi" | ||
| 6323 | .target_set = TargetSet.initOne(.mips) | ||
| 6324 | .attributes = .{ .@"const" = true } | ||
| 6325 | |||
| 6326 | __builtin_msa_vshf_h | ||
| 6327 | .param_str = "V8sV8sV8sV8s" | ||
| 6328 | .target_set = TargetSet.initOne(.mips) | ||
| 6329 | .attributes = .{ .@"const" = true } | ||
| 6330 | |||
| 6331 | __builtin_msa_vshf_w | ||
| 6332 | .param_str = "V4iV4iV4iV4i" | ||
| 6333 | .target_set = TargetSet.initOne(.mips) | ||
| 6334 | .attributes = .{ .@"const" = true } | ||
| 6335 | |||
| 6336 | __builtin_msa_xor_v | ||
| 6337 | .param_str = "V16cV16cV16c" | ||
| 6338 | .target_set = TargetSet.initOne(.mips) | ||
| 6339 | .attributes = .{ .@"const" = true } | ||
| 6340 | |||
| 6341 | __builtin_msa_xori_b | ||
| 6342 | .param_str = "V16cV16cIUi" | ||
| 6343 | .target_set = TargetSet.initOne(.mips) | ||
| 6344 | .attributes = .{ .@"const" = true } | ||
| 6345 | |||
| 6346 | __builtin_mul_overflow | ||
| 6347 | .param_str = "b." | ||
| 6348 | .attributes = .{ .custom_typecheck = true, .const_evaluable = true } | ||
| 6349 | |||
| 6350 | __builtin_nan | ||
| 6351 | .param_str = "dcC*" | ||
| 6352 | .attributes = .{ .pure = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } | ||
| 6353 | |||
| 6354 | __builtin_nanf | ||
| 6355 | .param_str = "fcC*" | ||
| 6356 | .attributes = .{ .pure = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } | ||
| 6357 | |||
| 6358 | __builtin_nanf128 | ||
| 6359 | .param_str = "LLdcC*" | ||
| 6360 | .attributes = .{ .pure = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } | ||
| 6361 | |||
| 6362 | __builtin_nanf16 | ||
| 6363 | .param_str = "xcC*" | ||
| 6364 | .attributes = .{ .pure = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } | ||
| 6365 | |||
| 6366 | __builtin_nanl | ||
| 6367 | .param_str = "LdcC*" | ||
| 6368 | .attributes = .{ .pure = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } | ||
| 6369 | |||
| 6370 | __builtin_nans | ||
| 6371 | .param_str = "dcC*" | ||
| 6372 | .attributes = .{ .pure = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } | ||
| 6373 | |||
| 6374 | __builtin_nansf | ||
| 6375 | .param_str = "fcC*" | ||
| 6376 | .attributes = .{ .pure = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } | ||
| 6377 | |||
| 6378 | __builtin_nansf128 | ||
| 6379 | .param_str = "LLdcC*" | ||
| 6380 | .attributes = .{ .pure = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } | ||
| 6381 | |||
| 6382 | __builtin_nansf16 | ||
| 6383 | .param_str = "xcC*" | ||
| 6384 | .attributes = .{ .pure = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } | ||
| 6385 | |||
| 6386 | __builtin_nansl | ||
| 6387 | .param_str = "LdcC*" | ||
| 6388 | .attributes = .{ .pure = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } | ||
| 6389 | |||
| 6390 | __builtin_nearbyint | ||
| 6391 | .param_str = "dd" | ||
| 6392 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } | ||
| 6393 | |||
| 6394 | __builtin_nearbyintf | ||
| 6395 | .param_str = "ff" | ||
| 6396 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } | ||
| 6397 | |||
| 6398 | __builtin_nearbyintf128 | ||
| 6399 | .param_str = "LLdLLd" | ||
| 6400 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } | ||
| 6401 | |||
| 6402 | __builtin_nearbyintl | ||
| 6403 | .param_str = "LdLd" | ||
| 6404 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } | ||
| 6405 | |||
| 6406 | __builtin_nextafter | ||
| 6407 | .param_str = "ddd" | ||
| 6408 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 6409 | |||
| 6410 | __builtin_nextafterf | ||
| 6411 | .param_str = "fff" | ||
| 6412 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 6413 | |||
| 6414 | __builtin_nextafterf128 | ||
| 6415 | .param_str = "LLdLLdLLd" | ||
| 6416 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 6417 | |||
| 6418 | __builtin_nextafterl | ||
| 6419 | .param_str = "LdLdLd" | ||
| 6420 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 6421 | |||
| 6422 | __builtin_nexttoward | ||
| 6423 | .param_str = "ddLd" | ||
| 6424 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 6425 | |||
| 6426 | __builtin_nexttowardf | ||
| 6427 | .param_str = "ffLd" | ||
| 6428 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 6429 | |||
| 6430 | __builtin_nexttowardf128 | ||
| 6431 | .param_str = "LLdLLdLLd" | ||
| 6432 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 6433 | |||
| 6434 | __builtin_nexttowardl | ||
| 6435 | .param_str = "LdLdLd" | ||
| 6436 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 6437 | |||
| 6438 | __builtin_nondeterministic_value | ||
| 6439 | .param_str = "v." | ||
| 6440 | .attributes = .{ .custom_typecheck = true } | ||
| 6441 | |||
| 6442 | __builtin_nontemporal_load | ||
| 6443 | .param_str = "v." | ||
| 6444 | .attributes = .{ .custom_typecheck = true } | ||
| 6445 | |||
| 6446 | __builtin_nontemporal_store | ||
| 6447 | .param_str = "v." | ||
| 6448 | .attributes = .{ .custom_typecheck = true } | ||
| 6449 | |||
| 6450 | __builtin_objc_memmove_collectable | ||
| 6451 | .param_str = "v*v*vC*z" | ||
| 6452 | .attributes = .{ .lib_function_with_builtin_prefix = true } | ||
| 6453 | |||
| 6454 | __builtin_object_size | ||
| 6455 | .param_str = "zvC*i" | ||
| 6456 | .attributes = .{ .eval_args = false, .const_evaluable = true } | ||
| 6457 | |||
| 6458 | __builtin_operator_delete | ||
| 6459 | .param_str = "vv*" | ||
| 6460 | .attributes = .{ .custom_typecheck = true, .const_evaluable = true } | ||
| 6461 | |||
| 6462 | __builtin_operator_new | ||
| 6463 | .param_str = "v*z" | ||
| 6464 | .attributes = .{ .@"const" = true, .custom_typecheck = true, .const_evaluable = true } | ||
| 6465 | |||
| 6466 | __builtin_os_log_format | ||
| 6467 | .param_str = "v*v*cC*." | ||
| 6468 | .attributes = .{ .custom_typecheck = true, .format_kind = .printf } | ||
| 6469 | |||
| 6470 | __builtin_os_log_format_buffer_size | ||
| 6471 | .param_str = "zcC*." | ||
| 6472 | .attributes = .{ .custom_typecheck = true, .format_kind = .printf, .eval_args = false, .const_evaluable = true } | ||
| 6473 | |||
| 6474 | __builtin_pack_longdouble | ||
| 6475 | .param_str = "Lddd" | ||
| 6476 | .target_set = TargetSet.initOne(.ppc) | ||
| 6477 | |||
| 6478 | __builtin_parity | ||
| 6479 | .param_str = "iUi" | ||
| 6480 | .attributes = .{ .@"const" = true, .const_evaluable = true } | ||
| 6481 | |||
| 6482 | __builtin_parityl | ||
| 6483 | .param_str = "iULi" | ||
| 6484 | .attributes = .{ .@"const" = true, .const_evaluable = true } | ||
| 6485 | |||
| 6486 | __builtin_parityll | ||
| 6487 | .param_str = "iULLi" | ||
| 6488 | .attributes = .{ .@"const" = true, .const_evaluable = true } | ||
| 6489 | |||
| 6490 | __builtin_popcount | ||
| 6491 | .param_str = "iUi" | ||
| 6492 | .attributes = .{ .@"const" = true, .const_evaluable = true } | ||
| 6493 | |||
| 6494 | __builtin_popcountl | ||
| 6495 | .param_str = "iULi" | ||
| 6496 | .attributes = .{ .@"const" = true, .const_evaluable = true } | ||
| 6497 | |||
| 6498 | __builtin_popcountll | ||
| 6499 | .param_str = "iULLi" | ||
| 6500 | .attributes = .{ .@"const" = true, .const_evaluable = true } | ||
| 6501 | |||
| 6502 | __builtin_pow | ||
| 6503 | .param_str = "ddd" | ||
| 6504 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 6505 | |||
| 6506 | __builtin_powf | ||
| 6507 | .param_str = "fff" | ||
| 6508 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 6509 | |||
| 6510 | __builtin_powf128 | ||
| 6511 | .param_str = "LLdLLdLLd" | ||
| 6512 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 6513 | |||
| 6514 | __builtin_powf16 | ||
| 6515 | .param_str = "hhh" | ||
| 6516 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 6517 | |||
| 6518 | __builtin_powi | ||
| 6519 | .param_str = "ddi" | ||
| 6520 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } | ||
| 6521 | |||
| 6522 | __builtin_powif | ||
| 6523 | .param_str = "ffi" | ||
| 6524 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } | ||
| 6525 | |||
| 6526 | __builtin_powil | ||
| 6527 | .param_str = "LdLdi" | ||
| 6528 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } | ||
| 6529 | |||
| 6530 | __builtin_powl | ||
| 6531 | .param_str = "LdLdLd" | ||
| 6532 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 6533 | |||
| 6534 | __builtin_ppc_alignx | ||
| 6535 | .param_str = "vIivC*" | ||
| 6536 | .target_set = TargetSet.initOne(.ppc) | ||
| 6537 | .attributes = .{ .@"const" = true } | ||
| 6538 | |||
| 6539 | __builtin_ppc_cmpb | ||
| 6540 | .param_str = "LLiLLiLLi" | ||
| 6541 | .target_set = TargetSet.initOne(.ppc) | ||
| 6542 | |||
| 6543 | __builtin_ppc_compare_and_swap | ||
| 6544 | .param_str = "iiD*i*i" | ||
| 6545 | .target_set = TargetSet.initOne(.ppc) | ||
| 6546 | |||
| 6547 | __builtin_ppc_compare_and_swaplp | ||
| 6548 | .param_str = "iLiD*Li*Li" | ||
| 6549 | .target_set = TargetSet.initOne(.ppc) | ||
| 6550 | |||
| 6551 | __builtin_ppc_dcbfl | ||
| 6552 | .param_str = "vvC*" | ||
| 6553 | .target_set = TargetSet.initOne(.ppc) | ||
| 6554 | |||
| 6555 | __builtin_ppc_dcbflp | ||
| 6556 | .param_str = "vvC*" | ||
| 6557 | .target_set = TargetSet.initOne(.ppc) | ||
| 6558 | |||
| 6559 | __builtin_ppc_dcbst | ||
| 6560 | .param_str = "vvC*" | ||
| 6561 | .target_set = TargetSet.initOne(.ppc) | ||
| 6562 | |||
| 6563 | __builtin_ppc_dcbt | ||
| 6564 | .param_str = "vv*" | ||
| 6565 | .target_set = TargetSet.initOne(.ppc) | ||
| 6566 | |||
| 6567 | __builtin_ppc_dcbtst | ||
| 6568 | .param_str = "vv*" | ||
| 6569 | .target_set = TargetSet.initOne(.ppc) | ||
| 6570 | |||
| 6571 | __builtin_ppc_dcbtstt | ||
| 6572 | .param_str = "vv*" | ||
| 6573 | .target_set = TargetSet.initOne(.ppc) | ||
| 6574 | |||
| 6575 | __builtin_ppc_dcbtt | ||
| 6576 | .param_str = "vv*" | ||
| 6577 | .target_set = TargetSet.initOne(.ppc) | ||
| 6578 | |||
| 6579 | __builtin_ppc_dcbz | ||
| 6580 | .param_str = "vv*" | ||
| 6581 | .target_set = TargetSet.initOne(.ppc) | ||
| 6582 | |||
| 6583 | __builtin_ppc_eieio | ||
| 6584 | .param_str = "v" | ||
| 6585 | .target_set = TargetSet.initOne(.ppc) | ||
| 6586 | |||
| 6587 | __builtin_ppc_fcfid | ||
| 6588 | .param_str = "dd" | ||
| 6589 | .target_set = TargetSet.initOne(.ppc) | ||
| 6590 | |||
| 6591 | __builtin_ppc_fcfud | ||
| 6592 | .param_str = "dd" | ||
| 6593 | .target_set = TargetSet.initOne(.ppc) | ||
| 6594 | |||
| 6595 | __builtin_ppc_fctid | ||
| 6596 | .param_str = "dd" | ||
| 6597 | .target_set = TargetSet.initOne(.ppc) | ||
| 6598 | |||
| 6599 | __builtin_ppc_fctidz | ||
| 6600 | .param_str = "dd" | ||
| 6601 | .target_set = TargetSet.initOne(.ppc) | ||
| 6602 | |||
| 6603 | __builtin_ppc_fctiw | ||
| 6604 | .param_str = "dd" | ||
| 6605 | .target_set = TargetSet.initOne(.ppc) | ||
| 6606 | |||
| 6607 | __builtin_ppc_fctiwz | ||
| 6608 | .param_str = "dd" | ||
| 6609 | .target_set = TargetSet.initOne(.ppc) | ||
| 6610 | |||
| 6611 | __builtin_ppc_fctudz | ||
| 6612 | .param_str = "dd" | ||
| 6613 | .target_set = TargetSet.initOne(.ppc) | ||
| 6614 | |||
| 6615 | __builtin_ppc_fctuwz | ||
| 6616 | .param_str = "dd" | ||
| 6617 | .target_set = TargetSet.initOne(.ppc) | ||
| 6618 | |||
| 6619 | __builtin_ppc_fetch_and_add | ||
| 6620 | .param_str = "iiD*i" | ||
| 6621 | .target_set = TargetSet.initOne(.ppc) | ||
| 6622 | |||
| 6623 | __builtin_ppc_fetch_and_addlp | ||
| 6624 | .param_str = "LiLiD*Li" | ||
| 6625 | .target_set = TargetSet.initOne(.ppc) | ||
| 6626 | |||
| 6627 | __builtin_ppc_fetch_and_and | ||
| 6628 | .param_str = "UiUiD*Ui" | ||
| 6629 | .target_set = TargetSet.initOne(.ppc) | ||
| 6630 | |||
| 6631 | __builtin_ppc_fetch_and_andlp | ||
| 6632 | .param_str = "ULiULiD*ULi" | ||
| 6633 | .target_set = TargetSet.initOne(.ppc) | ||
| 6634 | |||
| 6635 | __builtin_ppc_fetch_and_or | ||
| 6636 | .param_str = "UiUiD*Ui" | ||
| 6637 | .target_set = TargetSet.initOne(.ppc) | ||
| 6638 | |||
| 6639 | __builtin_ppc_fetch_and_orlp | ||
| 6640 | .param_str = "ULiULiD*ULi" | ||
| 6641 | .target_set = TargetSet.initOne(.ppc) | ||
| 6642 | |||
| 6643 | __builtin_ppc_fetch_and_swap | ||
| 6644 | .param_str = "UiUiD*Ui" | ||
| 6645 | .target_set = TargetSet.initOne(.ppc) | ||
| 6646 | |||
| 6647 | __builtin_ppc_fetch_and_swaplp | ||
| 6648 | .param_str = "ULiULiD*ULi" | ||
| 6649 | .target_set = TargetSet.initOne(.ppc) | ||
| 6650 | |||
| 6651 | __builtin_ppc_fmsub | ||
| 6652 | .param_str = "dddd" | ||
| 6653 | .target_set = TargetSet.initOne(.ppc) | ||
| 6654 | |||
| 6655 | __builtin_ppc_fmsubs | ||
| 6656 | .param_str = "ffff" | ||
| 6657 | .target_set = TargetSet.initOne(.ppc) | ||
| 6658 | |||
| 6659 | __builtin_ppc_fnabs | ||
| 6660 | .param_str = "dd" | ||
| 6661 | .target_set = TargetSet.initOne(.ppc) | ||
| 6662 | |||
| 6663 | __builtin_ppc_fnabss | ||
| 6664 | .param_str = "ff" | ||
| 6665 | .target_set = TargetSet.initOne(.ppc) | ||
| 6666 | |||
| 6667 | __builtin_ppc_fnmadd | ||
| 6668 | .param_str = "dddd" | ||
| 6669 | .target_set = TargetSet.initOne(.ppc) | ||
| 6670 | |||
| 6671 | __builtin_ppc_fnmadds | ||
| 6672 | .param_str = "ffff" | ||
| 6673 | .target_set = TargetSet.initOne(.ppc) | ||
| 6674 | |||
| 6675 | __builtin_ppc_fnmsub | ||
| 6676 | .param_str = "dddd" | ||
| 6677 | .target_set = TargetSet.initOne(.ppc) | ||
| 6678 | |||
| 6679 | __builtin_ppc_fnmsubs | ||
| 6680 | .param_str = "ffff" | ||
| 6681 | .target_set = TargetSet.initOne(.ppc) | ||
| 6682 | |||
| 6683 | __builtin_ppc_fre | ||
| 6684 | .param_str = "dd" | ||
| 6685 | .target_set = TargetSet.initOne(.ppc) | ||
| 6686 | |||
| 6687 | __builtin_ppc_fres | ||
| 6688 | .param_str = "ff" | ||
| 6689 | .target_set = TargetSet.initOne(.ppc) | ||
| 6690 | |||
| 6691 | __builtin_ppc_fric | ||
| 6692 | .param_str = "dd" | ||
| 6693 | .target_set = TargetSet.initOne(.ppc) | ||
| 6694 | |||
| 6695 | __builtin_ppc_frim | ||
| 6696 | .param_str = "dd" | ||
| 6697 | .target_set = TargetSet.initOne(.ppc) | ||
| 6698 | |||
| 6699 | __builtin_ppc_frims | ||
| 6700 | .param_str = "ff" | ||
| 6701 | .target_set = TargetSet.initOne(.ppc) | ||
| 6702 | |||
| 6703 | __builtin_ppc_frin | ||
| 6704 | .param_str = "dd" | ||
| 6705 | .target_set = TargetSet.initOne(.ppc) | ||
| 6706 | |||
| 6707 | __builtin_ppc_frins | ||
| 6708 | .param_str = "ff" | ||
| 6709 | .target_set = TargetSet.initOne(.ppc) | ||
| 6710 | |||
| 6711 | __builtin_ppc_frip | ||
| 6712 | .param_str = "dd" | ||
| 6713 | .target_set = TargetSet.initOne(.ppc) | ||
| 6714 | |||
| 6715 | __builtin_ppc_frips | ||
| 6716 | .param_str = "ff" | ||
| 6717 | .target_set = TargetSet.initOne(.ppc) | ||
| 6718 | |||
| 6719 | __builtin_ppc_friz | ||
| 6720 | .param_str = "dd" | ||
| 6721 | .target_set = TargetSet.initOne(.ppc) | ||
| 6722 | |||
| 6723 | __builtin_ppc_frizs | ||
| 6724 | .param_str = "ff" | ||
| 6725 | .target_set = TargetSet.initOne(.ppc) | ||
| 6726 | |||
| 6727 | __builtin_ppc_frsqrte | ||
| 6728 | .param_str = "dd" | ||
| 6729 | .target_set = TargetSet.initOne(.ppc) | ||
| 6730 | |||
| 6731 | __builtin_ppc_frsqrtes | ||
| 6732 | .param_str = "ff" | ||
| 6733 | .target_set = TargetSet.initOne(.ppc) | ||
| 6734 | |||
| 6735 | __builtin_ppc_fsel | ||
| 6736 | .param_str = "dddd" | ||
| 6737 | .target_set = TargetSet.initOne(.ppc) | ||
| 6738 | |||
| 6739 | __builtin_ppc_fsels | ||
| 6740 | .param_str = "ffff" | ||
| 6741 | .target_set = TargetSet.initOne(.ppc) | ||
| 6742 | |||
| 6743 | __builtin_ppc_fsqrt | ||
| 6744 | .param_str = "dd" | ||
| 6745 | .target_set = TargetSet.initOne(.ppc) | ||
| 6746 | |||
| 6747 | __builtin_ppc_fsqrts | ||
| 6748 | .param_str = "ff" | ||
| 6749 | .target_set = TargetSet.initOne(.ppc) | ||
| 6750 | |||
| 6751 | __builtin_ppc_get_timebase | ||
| 6752 | .param_str = "ULLi" | ||
| 6753 | .target_set = TargetSet.initOne(.ppc) | ||
| 6754 | |||
| 6755 | __builtin_ppc_iospace_eieio | ||
| 6756 | .param_str = "v" | ||
| 6757 | .target_set = TargetSet.initOne(.ppc) | ||
| 6758 | |||
| 6759 | __builtin_ppc_iospace_lwsync | ||
| 6760 | .param_str = "v" | ||
| 6761 | .target_set = TargetSet.initOne(.ppc) | ||
| 6762 | |||
| 6763 | __builtin_ppc_iospace_sync | ||
| 6764 | .param_str = "v" | ||
| 6765 | .target_set = TargetSet.initOne(.ppc) | ||
| 6766 | |||
| 6767 | __builtin_ppc_isync | ||
| 6768 | .param_str = "v" | ||
| 6769 | .target_set = TargetSet.initOne(.ppc) | ||
| 6770 | |||
| 6771 | __builtin_ppc_ldarx | ||
| 6772 | .param_str = "LiLiD*" | ||
| 6773 | .target_set = TargetSet.initOne(.ppc) | ||
| 6774 | |||
| 6775 | __builtin_ppc_load2r | ||
| 6776 | .param_str = "UsUs*" | ||
| 6777 | .target_set = TargetSet.initOne(.ppc) | ||
| 6778 | |||
| 6779 | __builtin_ppc_load4r | ||
| 6780 | .param_str = "UiUi*" | ||
| 6781 | .target_set = TargetSet.initOne(.ppc) | ||
| 6782 | |||
| 6783 | __builtin_ppc_lwarx | ||
| 6784 | .param_str = "iiD*" | ||
| 6785 | .target_set = TargetSet.initOne(.ppc) | ||
| 6786 | |||
| 6787 | __builtin_ppc_lwsync | ||
| 6788 | .param_str = "v" | ||
| 6789 | .target_set = TargetSet.initOne(.ppc) | ||
| 6790 | |||
| 6791 | __builtin_ppc_maxfe | ||
| 6792 | .param_str = "LdLdLdLd." | ||
| 6793 | .target_set = TargetSet.initOne(.ppc) | ||
| 6794 | .attributes = .{ .custom_typecheck = true } | ||
| 6795 | |||
| 6796 | __builtin_ppc_maxfl | ||
| 6797 | .param_str = "dddd." | ||
| 6798 | .target_set = TargetSet.initOne(.ppc) | ||
| 6799 | .attributes = .{ .custom_typecheck = true } | ||
| 6800 | |||
| 6801 | __builtin_ppc_maxfs | ||
| 6802 | .param_str = "ffff." | ||
| 6803 | .target_set = TargetSet.initOne(.ppc) | ||
| 6804 | .attributes = .{ .custom_typecheck = true } | ||
| 6805 | |||
| 6806 | __builtin_ppc_mfmsr | ||
| 6807 | .param_str = "Ui" | ||
| 6808 | .target_set = TargetSet.initOne(.ppc) | ||
| 6809 | |||
| 6810 | __builtin_ppc_mfspr | ||
| 6811 | .param_str = "ULiIi" | ||
| 6812 | .target_set = TargetSet.initOne(.ppc) | ||
| 6813 | |||
| 6814 | __builtin_ppc_mftbu | ||
| 6815 | .param_str = "Ui" | ||
| 6816 | .target_set = TargetSet.initOne(.ppc) | ||
| 6817 | |||
| 6818 | __builtin_ppc_minfe | ||
| 6819 | .param_str = "LdLdLdLd." | ||
| 6820 | .target_set = TargetSet.initOne(.ppc) | ||
| 6821 | .attributes = .{ .custom_typecheck = true } | ||
| 6822 | |||
| 6823 | __builtin_ppc_minfl | ||
| 6824 | .param_str = "dddd." | ||
| 6825 | .target_set = TargetSet.initOne(.ppc) | ||
| 6826 | .attributes = .{ .custom_typecheck = true } | ||
| 6827 | |||
| 6828 | __builtin_ppc_minfs | ||
| 6829 | .param_str = "ffff." | ||
| 6830 | .target_set = TargetSet.initOne(.ppc) | ||
| 6831 | .attributes = .{ .custom_typecheck = true } | ||
| 6832 | |||
| 6833 | __builtin_ppc_mtfsb0 | ||
| 6834 | .param_str = "vUIi" | ||
| 6835 | .target_set = TargetSet.initOne(.ppc) | ||
| 6836 | |||
| 6837 | __builtin_ppc_mtfsb1 | ||
| 6838 | .param_str = "vUIi" | ||
| 6839 | .target_set = TargetSet.initOne(.ppc) | ||
| 6840 | |||
| 6841 | __builtin_ppc_mtfsf | ||
| 6842 | .param_str = "vUIiUi" | ||
| 6843 | .target_set = TargetSet.initOne(.ppc) | ||
| 6844 | |||
| 6845 | __builtin_ppc_mtfsfi | ||
| 6846 | .param_str = "vUIiUIi" | ||
| 6847 | .target_set = TargetSet.initOne(.ppc) | ||
| 6848 | |||
| 6849 | __builtin_ppc_mtmsr | ||
| 6850 | .param_str = "vUi" | ||
| 6851 | .target_set = TargetSet.initOne(.ppc) | ||
| 6852 | |||
| 6853 | __builtin_ppc_mtspr | ||
| 6854 | .param_str = "vIiULi" | ||
| 6855 | .target_set = TargetSet.initOne(.ppc) | ||
| 6856 | |||
| 6857 | __builtin_ppc_mulhd | ||
| 6858 | .param_str = "LLiLiLi" | ||
| 6859 | .target_set = TargetSet.initOne(.ppc) | ||
| 6860 | |||
| 6861 | __builtin_ppc_mulhdu | ||
| 6862 | .param_str = "ULLiULiULi" | ||
| 6863 | .target_set = TargetSet.initOne(.ppc) | ||
| 6864 | |||
| 6865 | __builtin_ppc_mulhw | ||
| 6866 | .param_str = "iii" | ||
| 6867 | .target_set = TargetSet.initOne(.ppc) | ||
| 6868 | |||
| 6869 | __builtin_ppc_mulhwu | ||
| 6870 | .param_str = "UiUiUi" | ||
| 6871 | .target_set = TargetSet.initOne(.ppc) | ||
| 6872 | |||
| 6873 | __builtin_ppc_popcntb | ||
| 6874 | .param_str = "ULiULi" | ||
| 6875 | .target_set = TargetSet.initOne(.ppc) | ||
| 6876 | |||
| 6877 | __builtin_ppc_poppar4 | ||
| 6878 | .param_str = "iUi" | ||
| 6879 | .target_set = TargetSet.initOne(.ppc) | ||
| 6880 | |||
| 6881 | __builtin_ppc_poppar8 | ||
| 6882 | .param_str = "iULLi" | ||
| 6883 | .target_set = TargetSet.initOne(.ppc) | ||
| 6884 | |||
| 6885 | __builtin_ppc_rdlam | ||
| 6886 | .param_str = "UWiUWiUWiUWIi" | ||
| 6887 | .target_set = TargetSet.initOne(.ppc) | ||
| 6888 | .attributes = .{ .@"const" = true } | ||
| 6889 | |||
| 6890 | __builtin_ppc_recipdivd | ||
| 6891 | .param_str = "V2dV2dV2d" | ||
| 6892 | .target_set = TargetSet.initOne(.ppc) | ||
| 6893 | |||
| 6894 | __builtin_ppc_recipdivf | ||
| 6895 | .param_str = "V4fV4fV4f" | ||
| 6896 | .target_set = TargetSet.initOne(.ppc) | ||
| 6897 | |||
| 6898 | __builtin_ppc_rldimi | ||
| 6899 | .param_str = "ULLiULLiULLiIUiIULLi" | ||
| 6900 | .target_set = TargetSet.initOne(.ppc) | ||
| 6901 | |||
| 6902 | __builtin_ppc_rlwimi | ||
| 6903 | .param_str = "UiUiUiIUiIUi" | ||
| 6904 | .target_set = TargetSet.initOne(.ppc) | ||
| 6905 | |||
| 6906 | __builtin_ppc_rlwnm | ||
| 6907 | .param_str = "UiUiUiIUi" | ||
| 6908 | .target_set = TargetSet.initOne(.ppc) | ||
| 6909 | |||
| 6910 | __builtin_ppc_rsqrtd | ||
| 6911 | .param_str = "V2dV2d" | ||
| 6912 | .target_set = TargetSet.initOne(.ppc) | ||
| 6913 | |||
| 6914 | __builtin_ppc_rsqrtf | ||
| 6915 | .param_str = "V4fV4f" | ||
| 6916 | .target_set = TargetSet.initOne(.ppc) | ||
| 6917 | |||
| 6918 | __builtin_ppc_stdcx | ||
| 6919 | .param_str = "iLiD*Li" | ||
| 6920 | .target_set = TargetSet.initOne(.ppc) | ||
| 6921 | |||
| 6922 | __builtin_ppc_stfiw | ||
| 6923 | .param_str = "viC*d" | ||
| 6924 | .target_set = TargetSet.initOne(.ppc) | ||
| 6925 | |||
| 6926 | __builtin_ppc_store2r | ||
| 6927 | .param_str = "vUiUs*" | ||
| 6928 | .target_set = TargetSet.initOne(.ppc) | ||
| 6929 | |||
| 6930 | __builtin_ppc_store4r | ||
| 6931 | .param_str = "vUiUi*" | ||
| 6932 | .target_set = TargetSet.initOne(.ppc) | ||
| 6933 | |||
| 6934 | __builtin_ppc_stwcx | ||
| 6935 | .param_str = "iiD*i" | ||
| 6936 | .target_set = TargetSet.initOne(.ppc) | ||
| 6937 | |||
| 6938 | __builtin_ppc_swdiv | ||
| 6939 | .param_str = "ddd" | ||
| 6940 | .target_set = TargetSet.initOne(.ppc) | ||
| 6941 | |||
| 6942 | __builtin_ppc_swdiv_nochk | ||
| 6943 | .param_str = "ddd" | ||
| 6944 | .target_set = TargetSet.initOne(.ppc) | ||
| 6945 | |||
| 6946 | __builtin_ppc_swdivs | ||
| 6947 | .param_str = "fff" | ||
| 6948 | .target_set = TargetSet.initOne(.ppc) | ||
| 6949 | |||
| 6950 | __builtin_ppc_swdivs_nochk | ||
| 6951 | .param_str = "fff" | ||
| 6952 | .target_set = TargetSet.initOne(.ppc) | ||
| 6953 | |||
| 6954 | __builtin_ppc_sync | ||
| 6955 | .param_str = "v" | ||
| 6956 | .target_set = TargetSet.initOne(.ppc) | ||
| 6957 | |||
| 6958 | __builtin_ppc_tdw | ||
| 6959 | .param_str = "vLLiLLiIUi" | ||
| 6960 | .target_set = TargetSet.initOne(.ppc) | ||
| 6961 | |||
| 6962 | __builtin_ppc_trap | ||
| 6963 | .param_str = "vi" | ||
| 6964 | .target_set = TargetSet.initOne(.ppc) | ||
| 6965 | |||
| 6966 | __builtin_ppc_trapd | ||
| 6967 | .param_str = "vLi" | ||
| 6968 | .target_set = TargetSet.initOne(.ppc) | ||
| 6969 | |||
| 6970 | __builtin_ppc_tw | ||
| 6971 | .param_str = "viiIUi" | ||
| 6972 | .target_set = TargetSet.initOne(.ppc) | ||
| 6973 | |||
| 6974 | __builtin_prefetch | ||
| 6975 | .param_str = "vvC*." | ||
| 6976 | .attributes = .{ .@"const" = true } | ||
| 6977 | |||
| 6978 | __builtin_preserve_access_index | ||
| 6979 | .param_str = "v." | ||
| 6980 | .attributes = .{ .custom_typecheck = true } | ||
| 6981 | |||
| 6982 | __builtin_printf | ||
| 6983 | .param_str = "icC*R." | ||
| 6984 | .attributes = .{ .lib_function_with_builtin_prefix = true, .format_kind = .printf } | ||
| 6985 | |||
| 6986 | __builtin_ptx_get_image_channel_data_typei_ | ||
| 6987 | .param_str = "ii" | ||
| 6988 | .target_set = TargetSet.initOne(.nvptx) | ||
| 6989 | |||
| 6990 | __builtin_ptx_get_image_channel_orderi_ | ||
| 6991 | .param_str = "ii" | ||
| 6992 | .target_set = TargetSet.initOne(.nvptx) | ||
| 6993 | |||
| 6994 | __builtin_ptx_get_image_depthi_ | ||
| 6995 | .param_str = "ii" | ||
| 6996 | .target_set = TargetSet.initOne(.nvptx) | ||
| 6997 | |||
| 6998 | __builtin_ptx_get_image_heighti_ | ||
| 6999 | .param_str = "ii" | ||
| 7000 | .target_set = TargetSet.initOne(.nvptx) | ||
| 7001 | |||
| 7002 | __builtin_ptx_get_image_widthi_ | ||
| 7003 | .param_str = "ii" | ||
| 7004 | .target_set = TargetSet.initOne(.nvptx) | ||
| 7005 | |||
| 7006 | __builtin_ptx_read_image2Dff_ | ||
| 7007 | .param_str = "V4fiiff" | ||
| 7008 | .target_set = TargetSet.initOne(.nvptx) | ||
| 7009 | |||
| 7010 | __builtin_ptx_read_image2Dfi_ | ||
| 7011 | .param_str = "V4fiiii" | ||
| 7012 | .target_set = TargetSet.initOne(.nvptx) | ||
| 7013 | |||
| 7014 | __builtin_ptx_read_image2Dif_ | ||
| 7015 | .param_str = "V4iiiff" | ||
| 7016 | .target_set = TargetSet.initOne(.nvptx) | ||
| 7017 | |||
| 7018 | __builtin_ptx_read_image2Dii_ | ||
| 7019 | .param_str = "V4iiiii" | ||
| 7020 | .target_set = TargetSet.initOne(.nvptx) | ||
| 7021 | |||
| 7022 | __builtin_ptx_read_image3Dff_ | ||
| 7023 | .param_str = "V4fiiffff" | ||
| 7024 | .target_set = TargetSet.initOne(.nvptx) | ||
| 7025 | |||
| 7026 | __builtin_ptx_read_image3Dfi_ | ||
| 7027 | .param_str = "V4fiiiiii" | ||
| 7028 | .target_set = TargetSet.initOne(.nvptx) | ||
| 7029 | |||
| 7030 | __builtin_ptx_read_image3Dif_ | ||
| 7031 | .param_str = "V4iiiffff" | ||
| 7032 | .target_set = TargetSet.initOne(.nvptx) | ||
| 7033 | |||
| 7034 | __builtin_ptx_read_image3Dii_ | ||
| 7035 | .param_str = "V4iiiiiii" | ||
| 7036 | .target_set = TargetSet.initOne(.nvptx) | ||
| 7037 | |||
| 7038 | __builtin_ptx_write_image2Df_ | ||
| 7039 | .param_str = "viiiffff" | ||
| 7040 | .target_set = TargetSet.initOne(.nvptx) | ||
| 7041 | |||
| 7042 | __builtin_ptx_write_image2Di_ | ||
| 7043 | .param_str = "viiiiiii" | ||
| 7044 | .target_set = TargetSet.initOne(.nvptx) | ||
| 7045 | |||
| 7046 | __builtin_ptx_write_image2Dui_ | ||
| 7047 | .param_str = "viiiUiUiUiUi" | ||
| 7048 | .target_set = TargetSet.initOne(.nvptx) | ||
| 7049 | |||
| 7050 | __builtin_r600_implicitarg_ptr | ||
| 7051 | .param_str = "Uc*7" | ||
| 7052 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 7053 | .attributes = .{ .@"const" = true } | ||
| 7054 | |||
| 7055 | __builtin_r600_read_tgid_x | ||
| 7056 | .param_str = "Ui" | ||
| 7057 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 7058 | .attributes = .{ .@"const" = true } | ||
| 7059 | |||
| 7060 | __builtin_r600_read_tgid_y | ||
| 7061 | .param_str = "Ui" | ||
| 7062 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 7063 | .attributes = .{ .@"const" = true } | ||
| 7064 | |||
| 7065 | __builtin_r600_read_tgid_z | ||
| 7066 | .param_str = "Ui" | ||
| 7067 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 7068 | .attributes = .{ .@"const" = true } | ||
| 7069 | |||
| 7070 | __builtin_r600_read_tidig_x | ||
| 7071 | .param_str = "Ui" | ||
| 7072 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 7073 | .attributes = .{ .@"const" = true } | ||
| 7074 | |||
| 7075 | __builtin_r600_read_tidig_y | ||
| 7076 | .param_str = "Ui" | ||
| 7077 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 7078 | .attributes = .{ .@"const" = true } | ||
| 7079 | |||
| 7080 | __builtin_r600_read_tidig_z | ||
| 7081 | .param_str = "Ui" | ||
| 7082 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 7083 | .attributes = .{ .@"const" = true } | ||
| 7084 | |||
| 7085 | __builtin_r600_recipsqrt_ieee | ||
| 7086 | .param_str = "dd" | ||
| 7087 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 7088 | .attributes = .{ .@"const" = true } | ||
| 7089 | |||
| 7090 | __builtin_r600_recipsqrt_ieeef | ||
| 7091 | .param_str = "ff" | ||
| 7092 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 7093 | .attributes = .{ .@"const" = true } | ||
| 7094 | |||
| 7095 | __builtin_readcyclecounter | ||
| 7096 | .param_str = "ULLi" | ||
| 7097 | |||
| 7098 | __builtin_readflm | ||
| 7099 | .param_str = "d" | ||
| 7100 | .target_set = TargetSet.initOne(.ppc) | ||
| 7101 | |||
| 7102 | __builtin_realloc | ||
| 7103 | .param_str = "v*v*z" | ||
| 7104 | .attributes = .{ .lib_function_with_builtin_prefix = true } | ||
| 7105 | |||
| 7106 | __builtin_reduce_add | ||
| 7107 | .param_str = "v." | ||
| 7108 | .attributes = .{ .@"const" = true, .custom_typecheck = true } | ||
| 7109 | |||
| 7110 | __builtin_reduce_and | ||
| 7111 | .param_str = "v." | ||
| 7112 | .attributes = .{ .@"const" = true, .custom_typecheck = true } | ||
| 7113 | |||
| 7114 | __builtin_reduce_max | ||
| 7115 | .param_str = "v." | ||
| 7116 | .attributes = .{ .@"const" = true, .custom_typecheck = true } | ||
| 7117 | |||
| 7118 | __builtin_reduce_min | ||
| 7119 | .param_str = "v." | ||
| 7120 | .attributes = .{ .@"const" = true, .custom_typecheck = true } | ||
| 7121 | |||
| 7122 | __builtin_reduce_mul | ||
| 7123 | .param_str = "v." | ||
| 7124 | .attributes = .{ .@"const" = true, .custom_typecheck = true } | ||
| 7125 | |||
| 7126 | __builtin_reduce_or | ||
| 7127 | .param_str = "v." | ||
| 7128 | .attributes = .{ .@"const" = true, .custom_typecheck = true } | ||
| 7129 | |||
| 7130 | __builtin_reduce_xor | ||
| 7131 | .param_str = "v." | ||
| 7132 | .attributes = .{ .@"const" = true, .custom_typecheck = true } | ||
| 7133 | |||
| 7134 | __builtin_remainder | ||
| 7135 | .param_str = "ddd" | ||
| 7136 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 7137 | |||
| 7138 | __builtin_remainderf | ||
| 7139 | .param_str = "fff" | ||
| 7140 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 7141 | |||
| 7142 | __builtin_remainderf128 | ||
| 7143 | .param_str = "LLdLLdLLd" | ||
| 7144 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 7145 | |||
| 7146 | __builtin_remainderl | ||
| 7147 | .param_str = "LdLdLd" | ||
| 7148 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 7149 | |||
| 7150 | __builtin_remquo | ||
| 7151 | .param_str = "dddi*" | ||
| 7152 | .attributes = .{ .lib_function_with_builtin_prefix = true } | ||
| 7153 | |||
| 7154 | __builtin_remquof | ||
| 7155 | .param_str = "fffi*" | ||
| 7156 | .attributes = .{ .lib_function_with_builtin_prefix = true } | ||
| 7157 | |||
| 7158 | __builtin_remquof128 | ||
| 7159 | .param_str = "LLdLLdLLdi*" | ||
| 7160 | .attributes = .{ .lib_function_with_builtin_prefix = true } | ||
| 7161 | |||
| 7162 | __builtin_remquol | ||
| 7163 | .param_str = "LdLdLdi*" | ||
| 7164 | .attributes = .{ .lib_function_with_builtin_prefix = true } | ||
| 7165 | |||
| 7166 | __builtin_return_address | ||
| 7167 | .param_str = "v*IUi" | ||
| 7168 | |||
| 7169 | __builtin_rindex | ||
| 7170 | .param_str = "c*cC*i" | ||
| 7171 | .attributes = .{ .lib_function_with_builtin_prefix = true } | ||
| 7172 | |||
| 7173 | __builtin_rint | ||
| 7174 | .param_str = "dd" | ||
| 7175 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } | ||
| 7176 | |||
| 7177 | __builtin_rintf | ||
| 7178 | .param_str = "ff" | ||
| 7179 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } | ||
| 7180 | |||
| 7181 | __builtin_rintf128 | ||
| 7182 | .param_str = "LLdLLd" | ||
| 7183 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } | ||
| 7184 | |||
| 7185 | __builtin_rintf16 | ||
| 7186 | .param_str = "hh" | ||
| 7187 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } | ||
| 7188 | |||
| 7189 | __builtin_rintl | ||
| 7190 | .param_str = "LdLd" | ||
| 7191 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } | ||
| 7192 | |||
| 7193 | __builtin_rotateleft16 | ||
| 7194 | .param_str = "UsUsUs" | ||
| 7195 | .attributes = .{ .@"const" = true, .const_evaluable = true } | ||
| 7196 | |||
| 7197 | __builtin_rotateleft32 | ||
| 7198 | .param_str = "UZiUZiUZi" | ||
| 7199 | .attributes = .{ .@"const" = true, .const_evaluable = true } | ||
| 7200 | |||
| 7201 | __builtin_rotateleft64 | ||
| 7202 | .param_str = "UWiUWiUWi" | ||
| 7203 | .attributes = .{ .@"const" = true, .const_evaluable = true } | ||
| 7204 | |||
| 7205 | __builtin_rotateleft8 | ||
| 7206 | .param_str = "UcUcUc" | ||
| 7207 | .attributes = .{ .@"const" = true, .const_evaluable = true } | ||
| 7208 | |||
| 7209 | __builtin_rotateright16 | ||
| 7210 | .param_str = "UsUsUs" | ||
| 7211 | .attributes = .{ .@"const" = true, .const_evaluable = true } | ||
| 7212 | |||
| 7213 | __builtin_rotateright32 | ||
| 7214 | .param_str = "UZiUZiUZi" | ||
| 7215 | .attributes = .{ .@"const" = true, .const_evaluable = true } | ||
| 7216 | |||
| 7217 | __builtin_rotateright64 | ||
| 7218 | .param_str = "UWiUWiUWi" | ||
| 7219 | .attributes = .{ .@"const" = true, .const_evaluable = true } | ||
| 7220 | |||
| 7221 | __builtin_rotateright8 | ||
| 7222 | .param_str = "UcUcUc" | ||
| 7223 | .attributes = .{ .@"const" = true, .const_evaluable = true } | ||
| 7224 | |||
| 7225 | __builtin_round | ||
| 7226 | .param_str = "dd" | ||
| 7227 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } | ||
| 7228 | |||
| 7229 | __builtin_roundeven | ||
| 7230 | .param_str = "dd" | ||
| 7231 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } | ||
| 7232 | |||
| 7233 | __builtin_roundevenf | ||
| 7234 | .param_str = "ff" | ||
| 7235 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } | ||
| 7236 | |||
| 7237 | __builtin_roundevenf128 | ||
| 7238 | .param_str = "LLdLLd" | ||
| 7239 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } | ||
| 7240 | |||
| 7241 | __builtin_roundevenf16 | ||
| 7242 | .param_str = "hh" | ||
| 7243 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } | ||
| 7244 | |||
| 7245 | __builtin_roundevenl | ||
| 7246 | .param_str = "LdLd" | ||
| 7247 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } | ||
| 7248 | |||
| 7249 | __builtin_roundf | ||
| 7250 | .param_str = "ff" | ||
| 7251 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } | ||
| 7252 | |||
| 7253 | __builtin_roundf128 | ||
| 7254 | .param_str = "LLdLLd" | ||
| 7255 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } | ||
| 7256 | |||
| 7257 | __builtin_roundf16 | ||
| 7258 | .param_str = "hh" | ||
| 7259 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } | ||
| 7260 | |||
| 7261 | __builtin_roundl | ||
| 7262 | .param_str = "LdLd" | ||
| 7263 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } | ||
| 7264 | |||
| 7265 | __builtin_sadd_overflow | ||
| 7266 | .param_str = "bSiCSiCSi*" | ||
| 7267 | .attributes = .{ .const_evaluable = true } | ||
| 7268 | |||
| 7269 | __builtin_saddl_overflow | ||
| 7270 | .param_str = "bSLiCSLiCSLi*" | ||
| 7271 | .attributes = .{ .const_evaluable = true } | ||
| 7272 | |||
| 7273 | __builtin_saddll_overflow | ||
| 7274 | .param_str = "bSLLiCSLLiCSLLi*" | ||
| 7275 | .attributes = .{ .const_evaluable = true } | ||
| 7276 | |||
| 7277 | __builtin_scalbln | ||
| 7278 | .param_str = "ddLi" | ||
| 7279 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 7280 | |||
| 7281 | __builtin_scalblnf | ||
| 7282 | .param_str = "ffLi" | ||
| 7283 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 7284 | |||
| 7285 | __builtin_scalblnf128 | ||
| 7286 | .param_str = "LLdLLdLi" | ||
| 7287 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 7288 | |||
| 7289 | __builtin_scalblnl | ||
| 7290 | .param_str = "LdLdLi" | ||
| 7291 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 7292 | |||
| 7293 | __builtin_scalbn | ||
| 7294 | .param_str = "ddi" | ||
| 7295 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 7296 | |||
| 7297 | __builtin_scalbnf | ||
| 7298 | .param_str = "ffi" | ||
| 7299 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 7300 | |||
| 7301 | __builtin_scalbnf128 | ||
| 7302 | .param_str = "LLdLLdi" | ||
| 7303 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 7304 | |||
| 7305 | __builtin_scalbnl | ||
| 7306 | .param_str = "LdLdi" | ||
| 7307 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 7308 | |||
| 7309 | __builtin_scanf | ||
| 7310 | .param_str = "icC*R." | ||
| 7311 | .attributes = .{ .lib_function_with_builtin_prefix = true, .format_kind = .scanf } | ||
| 7312 | |||
| 7313 | __builtin_set_flt_rounds | ||
| 7314 | .param_str = "vi" | ||
| 7315 | |||
| 7316 | __builtin_setflm | ||
| 7317 | .param_str = "dd" | ||
| 7318 | .target_set = TargetSet.initOne(.ppc) | ||
| 7319 | |||
| 7320 | __builtin_setjmp | ||
| 7321 | .param_str = "iv**" | ||
| 7322 | .attributes = .{ .returns_twice = true } | ||
| 7323 | |||
| 7324 | __builtin_setps | ||
| 7325 | .param_str = "vUiUi" | ||
| 7326 | .target_set = TargetSet.initOne(.xcore) | ||
| 7327 | |||
| 7328 | __builtin_setrnd | ||
| 7329 | .param_str = "di" | ||
| 7330 | .target_set = TargetSet.initOne(.ppc) | ||
| 7331 | |||
| 7332 | __builtin_shufflevector | ||
| 7333 | .param_str = "v." | ||
| 7334 | .attributes = .{ .@"const" = true, .custom_typecheck = true } | ||
| 7335 | |||
| 7336 | __builtin_signbit | ||
| 7337 | .param_str = "i." | ||
| 7338 | .attributes = .{ .@"const" = true, .custom_typecheck = true, .lib_function_with_builtin_prefix = true } | ||
| 7339 | |||
| 7340 | __builtin_signbitf | ||
| 7341 | .param_str = "if" | ||
| 7342 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } | ||
| 7343 | |||
| 7344 | __builtin_signbitl | ||
| 7345 | .param_str = "iLd" | ||
| 7346 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } | ||
| 7347 | |||
| 7348 | __builtin_sin | ||
| 7349 | .param_str = "dd" | ||
| 7350 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 7351 | |||
| 7352 | __builtin_sinf | ||
| 7353 | .param_str = "ff" | ||
| 7354 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 7355 | |||
| 7356 | __builtin_sinf128 | ||
| 7357 | .param_str = "LLdLLd" | ||
| 7358 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 7359 | |||
| 7360 | __builtin_sinf16 | ||
| 7361 | .param_str = "hh" | ||
| 7362 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 7363 | |||
| 7364 | __builtin_sinh | ||
| 7365 | .param_str = "dd" | ||
| 7366 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 7367 | |||
| 7368 | __builtin_sinhf | ||
| 7369 | .param_str = "ff" | ||
| 7370 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 7371 | |||
| 7372 | __builtin_sinhf128 | ||
| 7373 | .param_str = "LLdLLd" | ||
| 7374 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 7375 | |||
| 7376 | __builtin_sinhl | ||
| 7377 | .param_str = "LdLd" | ||
| 7378 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 7379 | |||
| 7380 | __builtin_sinl | ||
| 7381 | .param_str = "LdLd" | ||
| 7382 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 7383 | |||
| 7384 | __builtin_smul_overflow | ||
| 7385 | .param_str = "bSiCSiCSi*" | ||
| 7386 | .attributes = .{ .const_evaluable = true } | ||
| 7387 | |||
| 7388 | __builtin_smull_overflow | ||
| 7389 | .param_str = "bSLiCSLiCSLi*" | ||
| 7390 | .attributes = .{ .const_evaluable = true } | ||
| 7391 | |||
| 7392 | __builtin_smulll_overflow | ||
| 7393 | .param_str = "bSLLiCSLLiCSLLi*" | ||
| 7394 | .attributes = .{ .const_evaluable = true } | ||
| 7395 | |||
| 7396 | __builtin_snprintf | ||
| 7397 | .param_str = "ic*RzcC*R." | ||
| 7398 | .attributes = .{ .lib_function_with_builtin_prefix = true, .format_kind = .printf, .format_string_position = 2 } | ||
| 7399 | |||
| 7400 | __builtin_sponentry | ||
| 7401 | .param_str = "v*" | ||
| 7402 | .target_set = TargetSet.initMany(&.{ .aarch64, .arm }) | ||
| 7403 | .attributes = .{ .@"const" = true } | ||
| 7404 | |||
| 7405 | __builtin_sprintf | ||
| 7406 | .param_str = "ic*RcC*R." | ||
| 7407 | .attributes = .{ .lib_function_with_builtin_prefix = true, .format_kind = .printf, .format_string_position = 1 } | ||
| 7408 | |||
| 7409 | __builtin_sqrt | ||
| 7410 | .param_str = "dd" | ||
| 7411 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 7412 | |||
| 7413 | __builtin_sqrtf | ||
| 7414 | .param_str = "ff" | ||
| 7415 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 7416 | |||
| 7417 | __builtin_sqrtf128 | ||
| 7418 | .param_str = "LLdLLd" | ||
| 7419 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 7420 | |||
| 7421 | __builtin_sqrtf16 | ||
| 7422 | .param_str = "hh" | ||
| 7423 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 7424 | |||
| 7425 | __builtin_sqrtl | ||
| 7426 | .param_str = "LdLd" | ||
| 7427 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 7428 | |||
| 7429 | __builtin_sscanf | ||
| 7430 | .param_str = "icC*RcC*R." | ||
| 7431 | .attributes = .{ .lib_function_with_builtin_prefix = true, .format_kind = .scanf, .format_string_position = 1 } | ||
| 7432 | |||
| 7433 | __builtin_ssub_overflow | ||
| 7434 | .param_str = "bSiCSiCSi*" | ||
| 7435 | .attributes = .{ .const_evaluable = true } | ||
| 7436 | |||
| 7437 | __builtin_ssubl_overflow | ||
| 7438 | .param_str = "bSLiCSLiCSLi*" | ||
| 7439 | .attributes = .{ .const_evaluable = true } | ||
| 7440 | |||
| 7441 | __builtin_ssubll_overflow | ||
| 7442 | .param_str = "bSLLiCSLLiCSLLi*" | ||
| 7443 | .attributes = .{ .const_evaluable = true } | ||
| 7444 | |||
| 7445 | __builtin_stdarg_start | ||
| 7446 | .param_str = "vA." | ||
| 7447 | .attributes = .{ .custom_typecheck = true } | ||
| 7448 | |||
| 7449 | __builtin_stpcpy | ||
| 7450 | .param_str = "c*c*cC*" | ||
| 7451 | .attributes = .{ .lib_function_with_builtin_prefix = true } | ||
| 7452 | |||
| 7453 | __builtin_stpncpy | ||
| 7454 | .param_str = "c*c*cC*z" | ||
| 7455 | .attributes = .{ .lib_function_with_builtin_prefix = true } | ||
| 7456 | |||
| 7457 | __builtin_strcasecmp | ||
| 7458 | .param_str = "icC*cC*" | ||
| 7459 | .attributes = .{ .lib_function_with_builtin_prefix = true } | ||
| 7460 | |||
| 7461 | __builtin_strcat | ||
| 7462 | .param_str = "c*c*cC*" | ||
| 7463 | .attributes = .{ .lib_function_with_builtin_prefix = true } | ||
| 7464 | |||
| 7465 | __builtin_strchr | ||
| 7466 | .param_str = "c*cC*i" | ||
| 7467 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_evaluable = true } | ||
| 7468 | |||
| 7469 | __builtin_strcmp | ||
| 7470 | .param_str = "icC*cC*" | ||
| 7471 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_evaluable = true } | ||
| 7472 | |||
| 7473 | __builtin_strcpy | ||
| 7474 | .param_str = "c*c*cC*" | ||
| 7475 | .attributes = .{ .lib_function_with_builtin_prefix = true } | ||
| 7476 | |||
| 7477 | __builtin_strcspn | ||
| 7478 | .param_str = "zcC*cC*" | ||
| 7479 | .attributes = .{ .lib_function_with_builtin_prefix = true } | ||
| 7480 | |||
| 7481 | __builtin_strdup | ||
| 7482 | .param_str = "c*cC*" | ||
| 7483 | .attributes = .{ .lib_function_with_builtin_prefix = true } | ||
| 7484 | |||
| 7485 | __builtin_strlen | ||
| 7486 | .param_str = "zcC*" | ||
| 7487 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_evaluable = true } | ||
| 7488 | |||
| 7489 | __builtin_strncasecmp | ||
| 7490 | .param_str = "icC*cC*z" | ||
| 7491 | .attributes = .{ .lib_function_with_builtin_prefix = true } | ||
| 7492 | |||
| 7493 | __builtin_strncat | ||
| 7494 | .param_str = "c*c*cC*z" | ||
| 7495 | .attributes = .{ .lib_function_with_builtin_prefix = true } | ||
| 7496 | |||
| 7497 | __builtin_strncmp | ||
| 7498 | .param_str = "icC*cC*z" | ||
| 7499 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_evaluable = true } | ||
| 7500 | |||
| 7501 | __builtin_strncpy | ||
| 7502 | .param_str = "c*c*cC*z" | ||
| 7503 | .attributes = .{ .lib_function_with_builtin_prefix = true } | ||
| 7504 | |||
| 7505 | __builtin_strndup | ||
| 7506 | .param_str = "c*cC*z" | ||
| 7507 | .attributes = .{ .lib_function_with_builtin_prefix = true } | ||
| 7508 | |||
| 7509 | __builtin_strpbrk | ||
| 7510 | .param_str = "c*cC*cC*" | ||
| 7511 | .attributes = .{ .lib_function_with_builtin_prefix = true } | ||
| 7512 | |||
| 7513 | __builtin_strrchr | ||
| 7514 | .param_str = "c*cC*i" | ||
| 7515 | .attributes = .{ .lib_function_with_builtin_prefix = true } | ||
| 7516 | |||
| 7517 | __builtin_strspn | ||
| 7518 | .param_str = "zcC*cC*" | ||
| 7519 | .attributes = .{ .lib_function_with_builtin_prefix = true } | ||
| 7520 | |||
| 7521 | __builtin_strstr | ||
| 7522 | .param_str = "c*cC*cC*" | ||
| 7523 | .attributes = .{ .lib_function_with_builtin_prefix = true } | ||
| 7524 | |||
| 7525 | __builtin_sub_overflow | ||
| 7526 | .param_str = "b." | ||
| 7527 | .attributes = .{ .custom_typecheck = true, .const_evaluable = true } | ||
| 7528 | |||
| 7529 | __builtin_subc | ||
| 7530 | .param_str = "UiUiCUiCUiCUi*" | ||
| 7531 | |||
| 7532 | __builtin_subcb | ||
| 7533 | .param_str = "UcUcCUcCUcCUc*" | ||
| 7534 | |||
| 7535 | __builtin_subcl | ||
| 7536 | .param_str = "ULiULiCULiCULiCULi*" | ||
| 7537 | |||
| 7538 | __builtin_subcll | ||
| 7539 | .param_str = "ULLiULLiCULLiCULLiCULLi*" | ||
| 7540 | |||
| 7541 | __builtin_subcs | ||
| 7542 | .param_str = "UsUsCUsCUsCUs*" | ||
| 7543 | |||
| 7544 | __builtin_tan | ||
| 7545 | .param_str = "dd" | ||
| 7546 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 7547 | |||
| 7548 | __builtin_tanf | ||
| 7549 | .param_str = "ff" | ||
| 7550 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 7551 | |||
| 7552 | __builtin_tanf128 | ||
| 7553 | .param_str = "LLdLLd" | ||
| 7554 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 7555 | |||
| 7556 | __builtin_tanh | ||
| 7557 | .param_str = "dd" | ||
| 7558 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 7559 | |||
| 7560 | __builtin_tanhf | ||
| 7561 | .param_str = "ff" | ||
| 7562 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 7563 | |||
| 7564 | __builtin_tanhf128 | ||
| 7565 | .param_str = "LLdLLd" | ||
| 7566 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 7567 | |||
| 7568 | __builtin_tanhl | ||
| 7569 | .param_str = "LdLd" | ||
| 7570 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 7571 | |||
| 7572 | __builtin_tanl | ||
| 7573 | .param_str = "LdLd" | ||
| 7574 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 7575 | |||
| 7576 | __builtin_tgamma | ||
| 7577 | .param_str = "dd" | ||
| 7578 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 7579 | |||
| 7580 | __builtin_tgammaf | ||
| 7581 | .param_str = "ff" | ||
| 7582 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 7583 | |||
| 7584 | __builtin_tgammaf128 | ||
| 7585 | .param_str = "LLdLLd" | ||
| 7586 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 7587 | |||
| 7588 | __builtin_tgammal | ||
| 7589 | .param_str = "LdLd" | ||
| 7590 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 7591 | |||
| 7592 | __builtin_thread_pointer | ||
| 7593 | .param_str = "v*" | ||
| 7594 | .attributes = .{ .@"const" = true } | ||
| 7595 | |||
| 7596 | __builtin_trap | ||
| 7597 | .param_str = "v" | ||
| 7598 | .attributes = .{ .noreturn = true } | ||
| 7599 | |||
| 7600 | __builtin_trunc | ||
| 7601 | .param_str = "dd" | ||
| 7602 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } | ||
| 7603 | |||
| 7604 | __builtin_truncf | ||
| 7605 | .param_str = "ff" | ||
| 7606 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } | ||
| 7607 | |||
| 7608 | __builtin_truncf128 | ||
| 7609 | .param_str = "LLdLLd" | ||
| 7610 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } | ||
| 7611 | |||
| 7612 | __builtin_truncf16 | ||
| 7613 | .param_str = "hh" | ||
| 7614 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } | ||
| 7615 | |||
| 7616 | __builtin_truncl | ||
| 7617 | .param_str = "LdLd" | ||
| 7618 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } | ||
| 7619 | |||
| 7620 | __builtin_uadd_overflow | ||
| 7621 | .param_str = "bUiCUiCUi*" | ||
| 7622 | .attributes = .{ .const_evaluable = true } | ||
| 7623 | |||
| 7624 | __builtin_uaddl_overflow | ||
| 7625 | .param_str = "bULiCULiCULi*" | ||
| 7626 | .attributes = .{ .const_evaluable = true } | ||
| 7627 | |||
| 7628 | __builtin_uaddll_overflow | ||
| 7629 | .param_str = "bULLiCULLiCULLi*" | ||
| 7630 | .attributes = .{ .const_evaluable = true } | ||
| 7631 | |||
| 7632 | __builtin_umul_overflow | ||
| 7633 | .param_str = "bUiCUiCUi*" | ||
| 7634 | .attributes = .{ .const_evaluable = true } | ||
| 7635 | |||
| 7636 | __builtin_umull_overflow | ||
| 7637 | .param_str = "bULiCULiCULi*" | ||
| 7638 | .attributes = .{ .const_evaluable = true } | ||
| 7639 | |||
| 7640 | __builtin_umulll_overflow | ||
| 7641 | .param_str = "bULLiCULLiCULLi*" | ||
| 7642 | .attributes = .{ .const_evaluable = true } | ||
| 7643 | |||
| 7644 | __builtin_unpack_longdouble | ||
| 7645 | .param_str = "dLdIi" | ||
| 7646 | .target_set = TargetSet.initOne(.ppc) | ||
| 7647 | |||
| 7648 | __builtin_unpredictable | ||
| 7649 | .param_str = "LiLi" | ||
| 7650 | .attributes = .{ .@"const" = true } | ||
| 7651 | |||
| 7652 | __builtin_unreachable | ||
| 7653 | .param_str = "v" | ||
| 7654 | .attributes = .{ .noreturn = true } | ||
| 7655 | |||
| 7656 | __builtin_unwind_init | ||
| 7657 | .param_str = "v" | ||
| 7658 | |||
| 7659 | __builtin_usub_overflow | ||
| 7660 | .param_str = "bUiCUiCUi*" | ||
| 7661 | .attributes = .{ .const_evaluable = true } | ||
| 7662 | |||
| 7663 | __builtin_usubl_overflow | ||
| 7664 | .param_str = "bULiCULiCULi*" | ||
| 7665 | .attributes = .{ .const_evaluable = true } | ||
| 7666 | |||
| 7667 | __builtin_usubll_overflow | ||
| 7668 | .param_str = "bULLiCULLiCULLi*" | ||
| 7669 | .attributes = .{ .const_evaluable = true } | ||
| 7670 | |||
| 7671 | __builtin_va_copy | ||
| 7672 | .param_str = "vAA" | ||
| 7673 | |||
| 7674 | __builtin_va_end | ||
| 7675 | .param_str = "vA" | ||
| 7676 | |||
| 7677 | __builtin_va_start | ||
| 7678 | .param_str = "vA." | ||
| 7679 | .attributes = .{ .custom_typecheck = true } | ||
| 7680 | |||
| 7681 | __builtin_ve_vl_andm_MMM | ||
| 7682 | .param_str = "V512bV512bV512b" | ||
| 7683 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7684 | |||
| 7685 | __builtin_ve_vl_andm_mmm | ||
| 7686 | .param_str = "V256bV256bV256b" | ||
| 7687 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7688 | |||
| 7689 | __builtin_ve_vl_eqvm_MMM | ||
| 7690 | .param_str = "V512bV512bV512b" | ||
| 7691 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7692 | |||
| 7693 | __builtin_ve_vl_eqvm_mmm | ||
| 7694 | .param_str = "V256bV256bV256b" | ||
| 7695 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7696 | |||
| 7697 | __builtin_ve_vl_extract_vm512l | ||
| 7698 | .param_str = "V256bV512b" | ||
| 7699 | .target_set = TargetSet.initOne(.ve) | ||
| 7700 | |||
| 7701 | __builtin_ve_vl_extract_vm512u | ||
| 7702 | .param_str = "V256bV512b" | ||
| 7703 | .target_set = TargetSet.initOne(.ve) | ||
| 7704 | |||
| 7705 | __builtin_ve_vl_fencec_s | ||
| 7706 | .param_str = "vUi" | ||
| 7707 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7708 | |||
| 7709 | __builtin_ve_vl_fencei | ||
| 7710 | .param_str = "v" | ||
| 7711 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7712 | |||
| 7713 | __builtin_ve_vl_fencem_s | ||
| 7714 | .param_str = "vUi" | ||
| 7715 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7716 | |||
| 7717 | __builtin_ve_vl_fidcr_sss | ||
| 7718 | .param_str = "LUiLUiUi" | ||
| 7719 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7720 | |||
| 7721 | __builtin_ve_vl_insert_vm512l | ||
| 7722 | .param_str = "V512bV512bV256b" | ||
| 7723 | .target_set = TargetSet.initOne(.ve) | ||
| 7724 | |||
| 7725 | __builtin_ve_vl_insert_vm512u | ||
| 7726 | .param_str = "V512bV512bV256b" | ||
| 7727 | .target_set = TargetSet.initOne(.ve) | ||
| 7728 | |||
| 7729 | __builtin_ve_vl_lcr_sss | ||
| 7730 | .param_str = "LUiLUiLUi" | ||
| 7731 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7732 | |||
| 7733 | __builtin_ve_vl_lsv_vvss | ||
| 7734 | .param_str = "V256dV256dUiLUi" | ||
| 7735 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7736 | |||
| 7737 | __builtin_ve_vl_lvm_MMss | ||
| 7738 | .param_str = "V512bV512bLUiLUi" | ||
| 7739 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7740 | |||
| 7741 | __builtin_ve_vl_lvm_mmss | ||
| 7742 | .param_str = "V256bV256bLUiLUi" | ||
| 7743 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7744 | |||
| 7745 | __builtin_ve_vl_lvsd_svs | ||
| 7746 | .param_str = "dV256dUi" | ||
| 7747 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7748 | |||
| 7749 | __builtin_ve_vl_lvsl_svs | ||
| 7750 | .param_str = "LUiV256dUi" | ||
| 7751 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7752 | |||
| 7753 | __builtin_ve_vl_lvss_svs | ||
| 7754 | .param_str = "fV256dUi" | ||
| 7755 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7756 | |||
| 7757 | __builtin_ve_vl_lzvm_sml | ||
| 7758 | .param_str = "LUiV256bUi" | ||
| 7759 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7760 | |||
| 7761 | __builtin_ve_vl_negm_MM | ||
| 7762 | .param_str = "V512bV512b" | ||
| 7763 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7764 | |||
| 7765 | __builtin_ve_vl_negm_mm | ||
| 7766 | .param_str = "V256bV256b" | ||
| 7767 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7768 | |||
| 7769 | __builtin_ve_vl_nndm_MMM | ||
| 7770 | .param_str = "V512bV512bV512b" | ||
| 7771 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7772 | |||
| 7773 | __builtin_ve_vl_nndm_mmm | ||
| 7774 | .param_str = "V256bV256bV256b" | ||
| 7775 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7776 | |||
| 7777 | __builtin_ve_vl_orm_MMM | ||
| 7778 | .param_str = "V512bV512bV512b" | ||
| 7779 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7780 | |||
| 7781 | __builtin_ve_vl_orm_mmm | ||
| 7782 | .param_str = "V256bV256bV256b" | ||
| 7783 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7784 | |||
| 7785 | __builtin_ve_vl_pack_f32a | ||
| 7786 | .param_str = "ULifC*" | ||
| 7787 | .target_set = TargetSet.initOne(.ve) | ||
| 7788 | |||
| 7789 | __builtin_ve_vl_pack_f32p | ||
| 7790 | .param_str = "ULifC*fC*" | ||
| 7791 | .target_set = TargetSet.initOne(.ve) | ||
| 7792 | |||
| 7793 | __builtin_ve_vl_pcvm_sml | ||
| 7794 | .param_str = "LUiV256bUi" | ||
| 7795 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7796 | |||
| 7797 | __builtin_ve_vl_pfchv_ssl | ||
| 7798 | .param_str = "vLivC*Ui" | ||
| 7799 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7800 | |||
| 7801 | __builtin_ve_vl_pfchvnc_ssl | ||
| 7802 | .param_str = "vLivC*Ui" | ||
| 7803 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7804 | |||
| 7805 | __builtin_ve_vl_pvadds_vsvMvl | ||
| 7806 | .param_str = "V256dLUiV256dV512bV256dUi" | ||
| 7807 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7808 | |||
| 7809 | __builtin_ve_vl_pvadds_vsvl | ||
| 7810 | .param_str = "V256dLUiV256dUi" | ||
| 7811 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7812 | |||
| 7813 | __builtin_ve_vl_pvadds_vsvvl | ||
| 7814 | .param_str = "V256dLUiV256dV256dUi" | ||
| 7815 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7816 | |||
| 7817 | __builtin_ve_vl_pvadds_vvvMvl | ||
| 7818 | .param_str = "V256dV256dV256dV512bV256dUi" | ||
| 7819 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7820 | |||
| 7821 | __builtin_ve_vl_pvadds_vvvl | ||
| 7822 | .param_str = "V256dV256dV256dUi" | ||
| 7823 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7824 | |||
| 7825 | __builtin_ve_vl_pvadds_vvvvl | ||
| 7826 | .param_str = "V256dV256dV256dV256dUi" | ||
| 7827 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7828 | |||
| 7829 | __builtin_ve_vl_pvaddu_vsvMvl | ||
| 7830 | .param_str = "V256dLUiV256dV512bV256dUi" | ||
| 7831 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7832 | |||
| 7833 | __builtin_ve_vl_pvaddu_vsvl | ||
| 7834 | .param_str = "V256dLUiV256dUi" | ||
| 7835 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7836 | |||
| 7837 | __builtin_ve_vl_pvaddu_vsvvl | ||
| 7838 | .param_str = "V256dLUiV256dV256dUi" | ||
| 7839 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7840 | |||
| 7841 | __builtin_ve_vl_pvaddu_vvvMvl | ||
| 7842 | .param_str = "V256dV256dV256dV512bV256dUi" | ||
| 7843 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7844 | |||
| 7845 | __builtin_ve_vl_pvaddu_vvvl | ||
| 7846 | .param_str = "V256dV256dV256dUi" | ||
| 7847 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7848 | |||
| 7849 | __builtin_ve_vl_pvaddu_vvvvl | ||
| 7850 | .param_str = "V256dV256dV256dV256dUi" | ||
| 7851 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7852 | |||
| 7853 | __builtin_ve_vl_pvand_vsvMvl | ||
| 7854 | .param_str = "V256dLUiV256dV512bV256dUi" | ||
| 7855 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7856 | |||
| 7857 | __builtin_ve_vl_pvand_vsvl | ||
| 7858 | .param_str = "V256dLUiV256dUi" | ||
| 7859 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7860 | |||
| 7861 | __builtin_ve_vl_pvand_vsvvl | ||
| 7862 | .param_str = "V256dLUiV256dV256dUi" | ||
| 7863 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7864 | |||
| 7865 | __builtin_ve_vl_pvand_vvvMvl | ||
| 7866 | .param_str = "V256dV256dV256dV512bV256dUi" | ||
| 7867 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7868 | |||
| 7869 | __builtin_ve_vl_pvand_vvvl | ||
| 7870 | .param_str = "V256dV256dV256dUi" | ||
| 7871 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7872 | |||
| 7873 | __builtin_ve_vl_pvand_vvvvl | ||
| 7874 | .param_str = "V256dV256dV256dV256dUi" | ||
| 7875 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7876 | |||
| 7877 | __builtin_ve_vl_pvbrd_vsMvl | ||
| 7878 | .param_str = "V256dLUiV512bV256dUi" | ||
| 7879 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7880 | |||
| 7881 | __builtin_ve_vl_pvbrd_vsl | ||
| 7882 | .param_str = "V256dLUiUi" | ||
| 7883 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7884 | |||
| 7885 | __builtin_ve_vl_pvbrd_vsvl | ||
| 7886 | .param_str = "V256dLUiV256dUi" | ||
| 7887 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7888 | |||
| 7889 | __builtin_ve_vl_pvbrv_vvMvl | ||
| 7890 | .param_str = "V256dV256dV512bV256dUi" | ||
| 7891 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7892 | |||
| 7893 | __builtin_ve_vl_pvbrv_vvl | ||
| 7894 | .param_str = "V256dV256dUi" | ||
| 7895 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7896 | |||
| 7897 | __builtin_ve_vl_pvbrv_vvvl | ||
| 7898 | .param_str = "V256dV256dV256dUi" | ||
| 7899 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7900 | |||
| 7901 | __builtin_ve_vl_pvbrvlo_vvl | ||
| 7902 | .param_str = "V256dV256dUi" | ||
| 7903 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7904 | |||
| 7905 | __builtin_ve_vl_pvbrvlo_vvmvl | ||
| 7906 | .param_str = "V256dV256dV256bV256dUi" | ||
| 7907 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7908 | |||
| 7909 | __builtin_ve_vl_pvbrvlo_vvvl | ||
| 7910 | .param_str = "V256dV256dV256dUi" | ||
| 7911 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7912 | |||
| 7913 | __builtin_ve_vl_pvbrvup_vvl | ||
| 7914 | .param_str = "V256dV256dUi" | ||
| 7915 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7916 | |||
| 7917 | __builtin_ve_vl_pvbrvup_vvmvl | ||
| 7918 | .param_str = "V256dV256dV256bV256dUi" | ||
| 7919 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7920 | |||
| 7921 | __builtin_ve_vl_pvbrvup_vvvl | ||
| 7922 | .param_str = "V256dV256dV256dUi" | ||
| 7923 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7924 | |||
| 7925 | __builtin_ve_vl_pvcmps_vsvMvl | ||
| 7926 | .param_str = "V256dLUiV256dV512bV256dUi" | ||
| 7927 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7928 | |||
| 7929 | __builtin_ve_vl_pvcmps_vsvl | ||
| 7930 | .param_str = "V256dLUiV256dUi" | ||
| 7931 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7932 | |||
| 7933 | __builtin_ve_vl_pvcmps_vsvvl | ||
| 7934 | .param_str = "V256dLUiV256dV256dUi" | ||
| 7935 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7936 | |||
| 7937 | __builtin_ve_vl_pvcmps_vvvMvl | ||
| 7938 | .param_str = "V256dV256dV256dV512bV256dUi" | ||
| 7939 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7940 | |||
| 7941 | __builtin_ve_vl_pvcmps_vvvl | ||
| 7942 | .param_str = "V256dV256dV256dUi" | ||
| 7943 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7944 | |||
| 7945 | __builtin_ve_vl_pvcmps_vvvvl | ||
| 7946 | .param_str = "V256dV256dV256dV256dUi" | ||
| 7947 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7948 | |||
| 7949 | __builtin_ve_vl_pvcmpu_vsvMvl | ||
| 7950 | .param_str = "V256dLUiV256dV512bV256dUi" | ||
| 7951 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7952 | |||
| 7953 | __builtin_ve_vl_pvcmpu_vsvl | ||
| 7954 | .param_str = "V256dLUiV256dUi" | ||
| 7955 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7956 | |||
| 7957 | __builtin_ve_vl_pvcmpu_vsvvl | ||
| 7958 | .param_str = "V256dLUiV256dV256dUi" | ||
| 7959 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7960 | |||
| 7961 | __builtin_ve_vl_pvcmpu_vvvMvl | ||
| 7962 | .param_str = "V256dV256dV256dV512bV256dUi" | ||
| 7963 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7964 | |||
| 7965 | __builtin_ve_vl_pvcmpu_vvvl | ||
| 7966 | .param_str = "V256dV256dV256dUi" | ||
| 7967 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7968 | |||
| 7969 | __builtin_ve_vl_pvcmpu_vvvvl | ||
| 7970 | .param_str = "V256dV256dV256dV256dUi" | ||
| 7971 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7972 | |||
| 7973 | __builtin_ve_vl_pvcvtsw_vvl | ||
| 7974 | .param_str = "V256dV256dUi" | ||
| 7975 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7976 | |||
| 7977 | __builtin_ve_vl_pvcvtsw_vvvl | ||
| 7978 | .param_str = "V256dV256dV256dUi" | ||
| 7979 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7980 | |||
| 7981 | __builtin_ve_vl_pvcvtws_vvMvl | ||
| 7982 | .param_str = "V256dV256dV512bV256dUi" | ||
| 7983 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7984 | |||
| 7985 | __builtin_ve_vl_pvcvtws_vvl | ||
| 7986 | .param_str = "V256dV256dUi" | ||
| 7987 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7988 | |||
| 7989 | __builtin_ve_vl_pvcvtws_vvvl | ||
| 7990 | .param_str = "V256dV256dV256dUi" | ||
| 7991 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7992 | |||
| 7993 | __builtin_ve_vl_pvcvtwsrz_vvMvl | ||
| 7994 | .param_str = "V256dV256dV512bV256dUi" | ||
| 7995 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7996 | |||
| 7997 | __builtin_ve_vl_pvcvtwsrz_vvl | ||
| 7998 | .param_str = "V256dV256dUi" | ||
| 7999 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8000 | |||
| 8001 | __builtin_ve_vl_pvcvtwsrz_vvvl | ||
| 8002 | .param_str = "V256dV256dV256dUi" | ||
| 8003 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8004 | |||
| 8005 | __builtin_ve_vl_pveqv_vsvMvl | ||
| 8006 | .param_str = "V256dLUiV256dV512bV256dUi" | ||
| 8007 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8008 | |||
| 8009 | __builtin_ve_vl_pveqv_vsvl | ||
| 8010 | .param_str = "V256dLUiV256dUi" | ||
| 8011 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8012 | |||
| 8013 | __builtin_ve_vl_pveqv_vsvvl | ||
| 8014 | .param_str = "V256dLUiV256dV256dUi" | ||
| 8015 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8016 | |||
| 8017 | __builtin_ve_vl_pveqv_vvvMvl | ||
| 8018 | .param_str = "V256dV256dV256dV512bV256dUi" | ||
| 8019 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8020 | |||
| 8021 | __builtin_ve_vl_pveqv_vvvl | ||
| 8022 | .param_str = "V256dV256dV256dUi" | ||
| 8023 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8024 | |||
| 8025 | __builtin_ve_vl_pveqv_vvvvl | ||
| 8026 | .param_str = "V256dV256dV256dV256dUi" | ||
| 8027 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8028 | |||
| 8029 | __builtin_ve_vl_pvfadd_vsvMvl | ||
| 8030 | .param_str = "V256dLUiV256dV512bV256dUi" | ||
| 8031 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8032 | |||
| 8033 | __builtin_ve_vl_pvfadd_vsvl | ||
| 8034 | .param_str = "V256dLUiV256dUi" | ||
| 8035 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8036 | |||
| 8037 | __builtin_ve_vl_pvfadd_vsvvl | ||
| 8038 | .param_str = "V256dLUiV256dV256dUi" | ||
| 8039 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8040 | |||
| 8041 | __builtin_ve_vl_pvfadd_vvvMvl | ||
| 8042 | .param_str = "V256dV256dV256dV512bV256dUi" | ||
| 8043 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8044 | |||
| 8045 | __builtin_ve_vl_pvfadd_vvvl | ||
| 8046 | .param_str = "V256dV256dV256dUi" | ||
| 8047 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8048 | |||
| 8049 | __builtin_ve_vl_pvfadd_vvvvl | ||
| 8050 | .param_str = "V256dV256dV256dV256dUi" | ||
| 8051 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8052 | |||
| 8053 | __builtin_ve_vl_pvfcmp_vsvMvl | ||
| 8054 | .param_str = "V256dLUiV256dV512bV256dUi" | ||
| 8055 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8056 | |||
| 8057 | __builtin_ve_vl_pvfcmp_vsvl | ||
| 8058 | .param_str = "V256dLUiV256dUi" | ||
| 8059 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8060 | |||
| 8061 | __builtin_ve_vl_pvfcmp_vsvvl | ||
| 8062 | .param_str = "V256dLUiV256dV256dUi" | ||
| 8063 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8064 | |||
| 8065 | __builtin_ve_vl_pvfcmp_vvvMvl | ||
| 8066 | .param_str = "V256dV256dV256dV512bV256dUi" | ||
| 8067 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8068 | |||
| 8069 | __builtin_ve_vl_pvfcmp_vvvl | ||
| 8070 | .param_str = "V256dV256dV256dUi" | ||
| 8071 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8072 | |||
| 8073 | __builtin_ve_vl_pvfcmp_vvvvl | ||
| 8074 | .param_str = "V256dV256dV256dV256dUi" | ||
| 8075 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8076 | |||
| 8077 | __builtin_ve_vl_pvfmad_vsvvMvl | ||
| 8078 | .param_str = "V256dLUiV256dV256dV512bV256dUi" | ||
| 8079 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8080 | |||
| 8081 | __builtin_ve_vl_pvfmad_vsvvl | ||
| 8082 | .param_str = "V256dLUiV256dV256dUi" | ||
| 8083 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8084 | |||
| 8085 | __builtin_ve_vl_pvfmad_vsvvvl | ||
| 8086 | .param_str = "V256dLUiV256dV256dV256dUi" | ||
| 8087 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8088 | |||
| 8089 | __builtin_ve_vl_pvfmad_vvsvMvl | ||
| 8090 | .param_str = "V256dV256dLUiV256dV512bV256dUi" | ||
| 8091 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8092 | |||
| 8093 | __builtin_ve_vl_pvfmad_vvsvl | ||
| 8094 | .param_str = "V256dV256dLUiV256dUi" | ||
| 8095 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8096 | |||
| 8097 | __builtin_ve_vl_pvfmad_vvsvvl | ||
| 8098 | .param_str = "V256dV256dLUiV256dV256dUi" | ||
| 8099 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8100 | |||
| 8101 | __builtin_ve_vl_pvfmad_vvvvMvl | ||
| 8102 | .param_str = "V256dV256dV256dV256dV512bV256dUi" | ||
| 8103 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8104 | |||
| 8105 | __builtin_ve_vl_pvfmad_vvvvl | ||
| 8106 | .param_str = "V256dV256dV256dV256dUi" | ||
| 8107 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8108 | |||
| 8109 | __builtin_ve_vl_pvfmad_vvvvvl | ||
| 8110 | .param_str = "V256dV256dV256dV256dV256dUi" | ||
| 8111 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8112 | |||
| 8113 | __builtin_ve_vl_pvfmax_vsvMvl | ||
| 8114 | .param_str = "V256dLUiV256dV512bV256dUi" | ||
| 8115 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8116 | |||
| 8117 | __builtin_ve_vl_pvfmax_vsvl | ||
| 8118 | .param_str = "V256dLUiV256dUi" | ||
| 8119 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8120 | |||
| 8121 | __builtin_ve_vl_pvfmax_vsvvl | ||
| 8122 | .param_str = "V256dLUiV256dV256dUi" | ||
| 8123 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8124 | |||
| 8125 | __builtin_ve_vl_pvfmax_vvvMvl | ||
| 8126 | .param_str = "V256dV256dV256dV512bV256dUi" | ||
| 8127 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8128 | |||
| 8129 | __builtin_ve_vl_pvfmax_vvvl | ||
| 8130 | .param_str = "V256dV256dV256dUi" | ||
| 8131 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8132 | |||
| 8133 | __builtin_ve_vl_pvfmax_vvvvl | ||
| 8134 | .param_str = "V256dV256dV256dV256dUi" | ||
| 8135 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8136 | |||
| 8137 | __builtin_ve_vl_pvfmin_vsvMvl | ||
| 8138 | .param_str = "V256dLUiV256dV512bV256dUi" | ||
| 8139 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8140 | |||
| 8141 | __builtin_ve_vl_pvfmin_vsvl | ||
| 8142 | .param_str = "V256dLUiV256dUi" | ||
| 8143 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8144 | |||
| 8145 | __builtin_ve_vl_pvfmin_vsvvl | ||
| 8146 | .param_str = "V256dLUiV256dV256dUi" | ||
| 8147 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8148 | |||
| 8149 | __builtin_ve_vl_pvfmin_vvvMvl | ||
| 8150 | .param_str = "V256dV256dV256dV512bV256dUi" | ||
| 8151 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8152 | |||
| 8153 | __builtin_ve_vl_pvfmin_vvvl | ||
| 8154 | .param_str = "V256dV256dV256dUi" | ||
| 8155 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8156 | |||
| 8157 | __builtin_ve_vl_pvfmin_vvvvl | ||
| 8158 | .param_str = "V256dV256dV256dV256dUi" | ||
| 8159 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8160 | |||
| 8161 | __builtin_ve_vl_pvfmkaf_Ml | ||
| 8162 | .param_str = "V512bUi" | ||
| 8163 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8164 | |||
| 8165 | __builtin_ve_vl_pvfmkat_Ml | ||
| 8166 | .param_str = "V512bUi" | ||
| 8167 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8168 | |||
| 8169 | __builtin_ve_vl_pvfmkseq_MvMl | ||
| 8170 | .param_str = "V512bV256dV512bUi" | ||
| 8171 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8172 | |||
| 8173 | __builtin_ve_vl_pvfmkseq_Mvl | ||
| 8174 | .param_str = "V512bV256dUi" | ||
| 8175 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8176 | |||
| 8177 | __builtin_ve_vl_pvfmkseqnan_MvMl | ||
| 8178 | .param_str = "V512bV256dV512bUi" | ||
| 8179 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8180 | |||
| 8181 | __builtin_ve_vl_pvfmkseqnan_Mvl | ||
| 8182 | .param_str = "V512bV256dUi" | ||
| 8183 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8184 | |||
| 8185 | __builtin_ve_vl_pvfmksge_MvMl | ||
| 8186 | .param_str = "V512bV256dV512bUi" | ||
| 8187 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8188 | |||
| 8189 | __builtin_ve_vl_pvfmksge_Mvl | ||
| 8190 | .param_str = "V512bV256dUi" | ||
| 8191 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8192 | |||
| 8193 | __builtin_ve_vl_pvfmksgenan_MvMl | ||
| 8194 | .param_str = "V512bV256dV512bUi" | ||
| 8195 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8196 | |||
| 8197 | __builtin_ve_vl_pvfmksgenan_Mvl | ||
| 8198 | .param_str = "V512bV256dUi" | ||
| 8199 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8200 | |||
| 8201 | __builtin_ve_vl_pvfmksgt_MvMl | ||
| 8202 | .param_str = "V512bV256dV512bUi" | ||
| 8203 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8204 | |||
| 8205 | __builtin_ve_vl_pvfmksgt_Mvl | ||
| 8206 | .param_str = "V512bV256dUi" | ||
| 8207 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8208 | |||
| 8209 | __builtin_ve_vl_pvfmksgtnan_MvMl | ||
| 8210 | .param_str = "V512bV256dV512bUi" | ||
| 8211 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8212 | |||
| 8213 | __builtin_ve_vl_pvfmksgtnan_Mvl | ||
| 8214 | .param_str = "V512bV256dUi" | ||
| 8215 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8216 | |||
| 8217 | __builtin_ve_vl_pvfmksle_MvMl | ||
| 8218 | .param_str = "V512bV256dV512bUi" | ||
| 8219 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8220 | |||
| 8221 | __builtin_ve_vl_pvfmksle_Mvl | ||
| 8222 | .param_str = "V512bV256dUi" | ||
| 8223 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8224 | |||
| 8225 | __builtin_ve_vl_pvfmkslenan_MvMl | ||
| 8226 | .param_str = "V512bV256dV512bUi" | ||
| 8227 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8228 | |||
| 8229 | __builtin_ve_vl_pvfmkslenan_Mvl | ||
| 8230 | .param_str = "V512bV256dUi" | ||
| 8231 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8232 | |||
| 8233 | __builtin_ve_vl_pvfmksloeq_mvl | ||
| 8234 | .param_str = "V256bV256dUi" | ||
| 8235 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8236 | |||
| 8237 | __builtin_ve_vl_pvfmksloeq_mvml | ||
| 8238 | .param_str = "V256bV256dV256bUi" | ||
| 8239 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8240 | |||
| 8241 | __builtin_ve_vl_pvfmksloeqnan_mvl | ||
| 8242 | .param_str = "V256bV256dUi" | ||
| 8243 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8244 | |||
| 8245 | __builtin_ve_vl_pvfmksloeqnan_mvml | ||
| 8246 | .param_str = "V256bV256dV256bUi" | ||
| 8247 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8248 | |||
| 8249 | __builtin_ve_vl_pvfmksloge_mvl | ||
| 8250 | .param_str = "V256bV256dUi" | ||
| 8251 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8252 | |||
| 8253 | __builtin_ve_vl_pvfmksloge_mvml | ||
| 8254 | .param_str = "V256bV256dV256bUi" | ||
| 8255 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8256 | |||
| 8257 | __builtin_ve_vl_pvfmkslogenan_mvl | ||
| 8258 | .param_str = "V256bV256dUi" | ||
| 8259 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8260 | |||
| 8261 | __builtin_ve_vl_pvfmkslogenan_mvml | ||
| 8262 | .param_str = "V256bV256dV256bUi" | ||
| 8263 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8264 | |||
| 8265 | __builtin_ve_vl_pvfmkslogt_mvl | ||
| 8266 | .param_str = "V256bV256dUi" | ||
| 8267 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8268 | |||
| 8269 | __builtin_ve_vl_pvfmkslogt_mvml | ||
| 8270 | .param_str = "V256bV256dV256bUi" | ||
| 8271 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8272 | |||
| 8273 | __builtin_ve_vl_pvfmkslogtnan_mvl | ||
| 8274 | .param_str = "V256bV256dUi" | ||
| 8275 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8276 | |||
| 8277 | __builtin_ve_vl_pvfmkslogtnan_mvml | ||
| 8278 | .param_str = "V256bV256dV256bUi" | ||
| 8279 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8280 | |||
| 8281 | __builtin_ve_vl_pvfmkslole_mvl | ||
| 8282 | .param_str = "V256bV256dUi" | ||
| 8283 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8284 | |||
| 8285 | __builtin_ve_vl_pvfmkslole_mvml | ||
| 8286 | .param_str = "V256bV256dV256bUi" | ||
| 8287 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8288 | |||
| 8289 | __builtin_ve_vl_pvfmkslolenan_mvl | ||
| 8290 | .param_str = "V256bV256dUi" | ||
| 8291 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8292 | |||
| 8293 | __builtin_ve_vl_pvfmkslolenan_mvml | ||
| 8294 | .param_str = "V256bV256dV256bUi" | ||
| 8295 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8296 | |||
| 8297 | __builtin_ve_vl_pvfmkslolt_mvl | ||
| 8298 | .param_str = "V256bV256dUi" | ||
| 8299 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8300 | |||
| 8301 | __builtin_ve_vl_pvfmkslolt_mvml | ||
| 8302 | .param_str = "V256bV256dV256bUi" | ||
| 8303 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8304 | |||
| 8305 | __builtin_ve_vl_pvfmksloltnan_mvl | ||
| 8306 | .param_str = "V256bV256dUi" | ||
| 8307 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8308 | |||
| 8309 | __builtin_ve_vl_pvfmksloltnan_mvml | ||
| 8310 | .param_str = "V256bV256dV256bUi" | ||
| 8311 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8312 | |||
| 8313 | __builtin_ve_vl_pvfmkslonan_mvl | ||
| 8314 | .param_str = "V256bV256dUi" | ||
| 8315 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8316 | |||
| 8317 | __builtin_ve_vl_pvfmkslonan_mvml | ||
| 8318 | .param_str = "V256bV256dV256bUi" | ||
| 8319 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8320 | |||
| 8321 | __builtin_ve_vl_pvfmkslone_mvl | ||
| 8322 | .param_str = "V256bV256dUi" | ||
| 8323 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8324 | |||
| 8325 | __builtin_ve_vl_pvfmkslone_mvml | ||
| 8326 | .param_str = "V256bV256dV256bUi" | ||
| 8327 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8328 | |||
| 8329 | __builtin_ve_vl_pvfmkslonenan_mvl | ||
| 8330 | .param_str = "V256bV256dUi" | ||
| 8331 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8332 | |||
| 8333 | __builtin_ve_vl_pvfmkslonenan_mvml | ||
| 8334 | .param_str = "V256bV256dV256bUi" | ||
| 8335 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8336 | |||
| 8337 | __builtin_ve_vl_pvfmkslonum_mvl | ||
| 8338 | .param_str = "V256bV256dUi" | ||
| 8339 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8340 | |||
| 8341 | __builtin_ve_vl_pvfmkslonum_mvml | ||
| 8342 | .param_str = "V256bV256dV256bUi" | ||
| 8343 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8344 | |||
| 8345 | __builtin_ve_vl_pvfmkslt_MvMl | ||
| 8346 | .param_str = "V512bV256dV512bUi" | ||
| 8347 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8348 | |||
| 8349 | __builtin_ve_vl_pvfmkslt_Mvl | ||
| 8350 | .param_str = "V512bV256dUi" | ||
| 8351 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8352 | |||
| 8353 | __builtin_ve_vl_pvfmksltnan_MvMl | ||
| 8354 | .param_str = "V512bV256dV512bUi" | ||
| 8355 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8356 | |||
| 8357 | __builtin_ve_vl_pvfmksltnan_Mvl | ||
| 8358 | .param_str = "V512bV256dUi" | ||
| 8359 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8360 | |||
| 8361 | __builtin_ve_vl_pvfmksnan_MvMl | ||
| 8362 | .param_str = "V512bV256dV512bUi" | ||
| 8363 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8364 | |||
| 8365 | __builtin_ve_vl_pvfmksnan_Mvl | ||
| 8366 | .param_str = "V512bV256dUi" | ||
| 8367 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8368 | |||
| 8369 | __builtin_ve_vl_pvfmksne_MvMl | ||
| 8370 | .param_str = "V512bV256dV512bUi" | ||
| 8371 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8372 | |||
| 8373 | __builtin_ve_vl_pvfmksne_Mvl | ||
| 8374 | .param_str = "V512bV256dUi" | ||
| 8375 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8376 | |||
| 8377 | __builtin_ve_vl_pvfmksnenan_MvMl | ||
| 8378 | .param_str = "V512bV256dV512bUi" | ||
| 8379 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8380 | |||
| 8381 | __builtin_ve_vl_pvfmksnenan_Mvl | ||
| 8382 | .param_str = "V512bV256dUi" | ||
| 8383 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8384 | |||
| 8385 | __builtin_ve_vl_pvfmksnum_MvMl | ||
| 8386 | .param_str = "V512bV256dV512bUi" | ||
| 8387 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8388 | |||
| 8389 | __builtin_ve_vl_pvfmksnum_Mvl | ||
| 8390 | .param_str = "V512bV256dUi" | ||
| 8391 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8392 | |||
| 8393 | __builtin_ve_vl_pvfmksupeq_mvl | ||
| 8394 | .param_str = "V256bV256dUi" | ||
| 8395 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8396 | |||
| 8397 | __builtin_ve_vl_pvfmksupeq_mvml | ||
| 8398 | .param_str = "V256bV256dV256bUi" | ||
| 8399 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8400 | |||
| 8401 | __builtin_ve_vl_pvfmksupeqnan_mvl | ||
| 8402 | .param_str = "V256bV256dUi" | ||
| 8403 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8404 | |||
| 8405 | __builtin_ve_vl_pvfmksupeqnan_mvml | ||
| 8406 | .param_str = "V256bV256dV256bUi" | ||
| 8407 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8408 | |||
| 8409 | __builtin_ve_vl_pvfmksupge_mvl | ||
| 8410 | .param_str = "V256bV256dUi" | ||
| 8411 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8412 | |||
| 8413 | __builtin_ve_vl_pvfmksupge_mvml | ||
| 8414 | .param_str = "V256bV256dV256bUi" | ||
| 8415 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8416 | |||
| 8417 | __builtin_ve_vl_pvfmksupgenan_mvl | ||
| 8418 | .param_str = "V256bV256dUi" | ||
| 8419 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8420 | |||
| 8421 | __builtin_ve_vl_pvfmksupgenan_mvml | ||
| 8422 | .param_str = "V256bV256dV256bUi" | ||
| 8423 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8424 | |||
| 8425 | __builtin_ve_vl_pvfmksupgt_mvl | ||
| 8426 | .param_str = "V256bV256dUi" | ||
| 8427 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8428 | |||
| 8429 | __builtin_ve_vl_pvfmksupgt_mvml | ||
| 8430 | .param_str = "V256bV256dV256bUi" | ||
| 8431 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8432 | |||
| 8433 | __builtin_ve_vl_pvfmksupgtnan_mvl | ||
| 8434 | .param_str = "V256bV256dUi" | ||
| 8435 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8436 | |||
| 8437 | __builtin_ve_vl_pvfmksupgtnan_mvml | ||
| 8438 | .param_str = "V256bV256dV256bUi" | ||
| 8439 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8440 | |||
| 8441 | __builtin_ve_vl_pvfmksuple_mvl | ||
| 8442 | .param_str = "V256bV256dUi" | ||
| 8443 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8444 | |||
| 8445 | __builtin_ve_vl_pvfmksuple_mvml | ||
| 8446 | .param_str = "V256bV256dV256bUi" | ||
| 8447 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8448 | |||
| 8449 | __builtin_ve_vl_pvfmksuplenan_mvl | ||
| 8450 | .param_str = "V256bV256dUi" | ||
| 8451 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8452 | |||
| 8453 | __builtin_ve_vl_pvfmksuplenan_mvml | ||
| 8454 | .param_str = "V256bV256dV256bUi" | ||
| 8455 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8456 | |||
| 8457 | __builtin_ve_vl_pvfmksuplt_mvl | ||
| 8458 | .param_str = "V256bV256dUi" | ||
| 8459 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8460 | |||
| 8461 | __builtin_ve_vl_pvfmksuplt_mvml | ||
| 8462 | .param_str = "V256bV256dV256bUi" | ||
| 8463 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8464 | |||
| 8465 | __builtin_ve_vl_pvfmksupltnan_mvl | ||
| 8466 | .param_str = "V256bV256dUi" | ||
| 8467 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8468 | |||
| 8469 | __builtin_ve_vl_pvfmksupltnan_mvml | ||
| 8470 | .param_str = "V256bV256dV256bUi" | ||
| 8471 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8472 | |||
| 8473 | __builtin_ve_vl_pvfmksupnan_mvl | ||
| 8474 | .param_str = "V256bV256dUi" | ||
| 8475 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8476 | |||
| 8477 | __builtin_ve_vl_pvfmksupnan_mvml | ||
| 8478 | .param_str = "V256bV256dV256bUi" | ||
| 8479 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8480 | |||
| 8481 | __builtin_ve_vl_pvfmksupne_mvl | ||
| 8482 | .param_str = "V256bV256dUi" | ||
| 8483 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8484 | |||
| 8485 | __builtin_ve_vl_pvfmksupne_mvml | ||
| 8486 | .param_str = "V256bV256dV256bUi" | ||
| 8487 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8488 | |||
| 8489 | __builtin_ve_vl_pvfmksupnenan_mvl | ||
| 8490 | .param_str = "V256bV256dUi" | ||
| 8491 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8492 | |||
| 8493 | __builtin_ve_vl_pvfmksupnenan_mvml | ||
| 8494 | .param_str = "V256bV256dV256bUi" | ||
| 8495 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8496 | |||
| 8497 | __builtin_ve_vl_pvfmksupnum_mvl | ||
| 8498 | .param_str = "V256bV256dUi" | ||
| 8499 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8500 | |||
| 8501 | __builtin_ve_vl_pvfmksupnum_mvml | ||
| 8502 | .param_str = "V256bV256dV256bUi" | ||
| 8503 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8504 | |||
| 8505 | __builtin_ve_vl_pvfmkweq_MvMl | ||
| 8506 | .param_str = "V512bV256dV512bUi" | ||
| 8507 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8508 | |||
| 8509 | __builtin_ve_vl_pvfmkweq_Mvl | ||
| 8510 | .param_str = "V512bV256dUi" | ||
| 8511 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8512 | |||
| 8513 | __builtin_ve_vl_pvfmkweqnan_MvMl | ||
| 8514 | .param_str = "V512bV256dV512bUi" | ||
| 8515 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8516 | |||
| 8517 | __builtin_ve_vl_pvfmkweqnan_Mvl | ||
| 8518 | .param_str = "V512bV256dUi" | ||
| 8519 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8520 | |||
| 8521 | __builtin_ve_vl_pvfmkwge_MvMl | ||
| 8522 | .param_str = "V512bV256dV512bUi" | ||
| 8523 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8524 | |||
| 8525 | __builtin_ve_vl_pvfmkwge_Mvl | ||
| 8526 | .param_str = "V512bV256dUi" | ||
| 8527 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8528 | |||
| 8529 | __builtin_ve_vl_pvfmkwgenan_MvMl | ||
| 8530 | .param_str = "V512bV256dV512bUi" | ||
| 8531 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8532 | |||
| 8533 | __builtin_ve_vl_pvfmkwgenan_Mvl | ||
| 8534 | .param_str = "V512bV256dUi" | ||
| 8535 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8536 | |||
| 8537 | __builtin_ve_vl_pvfmkwgt_MvMl | ||
| 8538 | .param_str = "V512bV256dV512bUi" | ||
| 8539 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8540 | |||
| 8541 | __builtin_ve_vl_pvfmkwgt_Mvl | ||
| 8542 | .param_str = "V512bV256dUi" | ||
| 8543 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8544 | |||
| 8545 | __builtin_ve_vl_pvfmkwgtnan_MvMl | ||
| 8546 | .param_str = "V512bV256dV512bUi" | ||
| 8547 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8548 | |||
| 8549 | __builtin_ve_vl_pvfmkwgtnan_Mvl | ||
| 8550 | .param_str = "V512bV256dUi" | ||
| 8551 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8552 | |||
| 8553 | __builtin_ve_vl_pvfmkwle_MvMl | ||
| 8554 | .param_str = "V512bV256dV512bUi" | ||
| 8555 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8556 | |||
| 8557 | __builtin_ve_vl_pvfmkwle_Mvl | ||
| 8558 | .param_str = "V512bV256dUi" | ||
| 8559 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8560 | |||
| 8561 | __builtin_ve_vl_pvfmkwlenan_MvMl | ||
| 8562 | .param_str = "V512bV256dV512bUi" | ||
| 8563 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8564 | |||
| 8565 | __builtin_ve_vl_pvfmkwlenan_Mvl | ||
| 8566 | .param_str = "V512bV256dUi" | ||
| 8567 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8568 | |||
| 8569 | __builtin_ve_vl_pvfmkwloeq_mvl | ||
| 8570 | .param_str = "V256bV256dUi" | ||
| 8571 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8572 | |||
| 8573 | __builtin_ve_vl_pvfmkwloeq_mvml | ||
| 8574 | .param_str = "V256bV256dV256bUi" | ||
| 8575 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8576 | |||
| 8577 | __builtin_ve_vl_pvfmkwloeqnan_mvl | ||
| 8578 | .param_str = "V256bV256dUi" | ||
| 8579 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8580 | |||
| 8581 | __builtin_ve_vl_pvfmkwloeqnan_mvml | ||
| 8582 | .param_str = "V256bV256dV256bUi" | ||
| 8583 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8584 | |||
| 8585 | __builtin_ve_vl_pvfmkwloge_mvl | ||
| 8586 | .param_str = "V256bV256dUi" | ||
| 8587 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8588 | |||
| 8589 | __builtin_ve_vl_pvfmkwloge_mvml | ||
| 8590 | .param_str = "V256bV256dV256bUi" | ||
| 8591 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8592 | |||
| 8593 | __builtin_ve_vl_pvfmkwlogenan_mvl | ||
| 8594 | .param_str = "V256bV256dUi" | ||
| 8595 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8596 | |||
| 8597 | __builtin_ve_vl_pvfmkwlogenan_mvml | ||
| 8598 | .param_str = "V256bV256dV256bUi" | ||
| 8599 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8600 | |||
| 8601 | __builtin_ve_vl_pvfmkwlogt_mvl | ||
| 8602 | .param_str = "V256bV256dUi" | ||
| 8603 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8604 | |||
| 8605 | __builtin_ve_vl_pvfmkwlogt_mvml | ||
| 8606 | .param_str = "V256bV256dV256bUi" | ||
| 8607 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8608 | |||
| 8609 | __builtin_ve_vl_pvfmkwlogtnan_mvl | ||
| 8610 | .param_str = "V256bV256dUi" | ||
| 8611 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8612 | |||
| 8613 | __builtin_ve_vl_pvfmkwlogtnan_mvml | ||
| 8614 | .param_str = "V256bV256dV256bUi" | ||
| 8615 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8616 | |||
| 8617 | __builtin_ve_vl_pvfmkwlole_mvl | ||
| 8618 | .param_str = "V256bV256dUi" | ||
| 8619 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8620 | |||
| 8621 | __builtin_ve_vl_pvfmkwlole_mvml | ||
| 8622 | .param_str = "V256bV256dV256bUi" | ||
| 8623 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8624 | |||
| 8625 | __builtin_ve_vl_pvfmkwlolenan_mvl | ||
| 8626 | .param_str = "V256bV256dUi" | ||
| 8627 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8628 | |||
| 8629 | __builtin_ve_vl_pvfmkwlolenan_mvml | ||
| 8630 | .param_str = "V256bV256dV256bUi" | ||
| 8631 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8632 | |||
| 8633 | __builtin_ve_vl_pvfmkwlolt_mvl | ||
| 8634 | .param_str = "V256bV256dUi" | ||
| 8635 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8636 | |||
| 8637 | __builtin_ve_vl_pvfmkwlolt_mvml | ||
| 8638 | .param_str = "V256bV256dV256bUi" | ||
| 8639 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8640 | |||
| 8641 | __builtin_ve_vl_pvfmkwloltnan_mvl | ||
| 8642 | .param_str = "V256bV256dUi" | ||
| 8643 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8644 | |||
| 8645 | __builtin_ve_vl_pvfmkwloltnan_mvml | ||
| 8646 | .param_str = "V256bV256dV256bUi" | ||
| 8647 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8648 | |||
| 8649 | __builtin_ve_vl_pvfmkwlonan_mvl | ||
| 8650 | .param_str = "V256bV256dUi" | ||
| 8651 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8652 | |||
| 8653 | __builtin_ve_vl_pvfmkwlonan_mvml | ||
| 8654 | .param_str = "V256bV256dV256bUi" | ||
| 8655 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8656 | |||
| 8657 | __builtin_ve_vl_pvfmkwlone_mvl | ||
| 8658 | .param_str = "V256bV256dUi" | ||
| 8659 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8660 | |||
| 8661 | __builtin_ve_vl_pvfmkwlone_mvml | ||
| 8662 | .param_str = "V256bV256dV256bUi" | ||
| 8663 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8664 | |||
| 8665 | __builtin_ve_vl_pvfmkwlonenan_mvl | ||
| 8666 | .param_str = "V256bV256dUi" | ||
| 8667 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8668 | |||
| 8669 | __builtin_ve_vl_pvfmkwlonenan_mvml | ||
| 8670 | .param_str = "V256bV256dV256bUi" | ||
| 8671 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8672 | |||
| 8673 | __builtin_ve_vl_pvfmkwlonum_mvl | ||
| 8674 | .param_str = "V256bV256dUi" | ||
| 8675 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8676 | |||
| 8677 | __builtin_ve_vl_pvfmkwlonum_mvml | ||
| 8678 | .param_str = "V256bV256dV256bUi" | ||
| 8679 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8680 | |||
| 8681 | __builtin_ve_vl_pvfmkwlt_MvMl | ||
| 8682 | .param_str = "V512bV256dV512bUi" | ||
| 8683 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8684 | |||
| 8685 | __builtin_ve_vl_pvfmkwlt_Mvl | ||
| 8686 | .param_str = "V512bV256dUi" | ||
| 8687 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8688 | |||
| 8689 | __builtin_ve_vl_pvfmkwltnan_MvMl | ||
| 8690 | .param_str = "V512bV256dV512bUi" | ||
| 8691 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8692 | |||
| 8693 | __builtin_ve_vl_pvfmkwltnan_Mvl | ||
| 8694 | .param_str = "V512bV256dUi" | ||
| 8695 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8696 | |||
| 8697 | __builtin_ve_vl_pvfmkwnan_MvMl | ||
| 8698 | .param_str = "V512bV256dV512bUi" | ||
| 8699 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8700 | |||
| 8701 | __builtin_ve_vl_pvfmkwnan_Mvl | ||
| 8702 | .param_str = "V512bV256dUi" | ||
| 8703 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8704 | |||
| 8705 | __builtin_ve_vl_pvfmkwne_MvMl | ||
| 8706 | .param_str = "V512bV256dV512bUi" | ||
| 8707 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8708 | |||
| 8709 | __builtin_ve_vl_pvfmkwne_Mvl | ||
| 8710 | .param_str = "V512bV256dUi" | ||
| 8711 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8712 | |||
| 8713 | __builtin_ve_vl_pvfmkwnenan_MvMl | ||
| 8714 | .param_str = "V512bV256dV512bUi" | ||
| 8715 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8716 | |||
| 8717 | __builtin_ve_vl_pvfmkwnenan_Mvl | ||
| 8718 | .param_str = "V512bV256dUi" | ||
| 8719 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8720 | |||
| 8721 | __builtin_ve_vl_pvfmkwnum_MvMl | ||
| 8722 | .param_str = "V512bV256dV512bUi" | ||
| 8723 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8724 | |||
| 8725 | __builtin_ve_vl_pvfmkwnum_Mvl | ||
| 8726 | .param_str = "V512bV256dUi" | ||
| 8727 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8728 | |||
| 8729 | __builtin_ve_vl_pvfmkwupeq_mvl | ||
| 8730 | .param_str = "V256bV256dUi" | ||
| 8731 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8732 | |||
| 8733 | __builtin_ve_vl_pvfmkwupeq_mvml | ||
| 8734 | .param_str = "V256bV256dV256bUi" | ||
| 8735 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8736 | |||
| 8737 | __builtin_ve_vl_pvfmkwupeqnan_mvl | ||
| 8738 | .param_str = "V256bV256dUi" | ||
| 8739 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8740 | |||
| 8741 | __builtin_ve_vl_pvfmkwupeqnan_mvml | ||
| 8742 | .param_str = "V256bV256dV256bUi" | ||
| 8743 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8744 | |||
| 8745 | __builtin_ve_vl_pvfmkwupge_mvl | ||
| 8746 | .param_str = "V256bV256dUi" | ||
| 8747 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8748 | |||
| 8749 | __builtin_ve_vl_pvfmkwupge_mvml | ||
| 8750 | .param_str = "V256bV256dV256bUi" | ||
| 8751 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8752 | |||
| 8753 | __builtin_ve_vl_pvfmkwupgenan_mvl | ||
| 8754 | .param_str = "V256bV256dUi" | ||
| 8755 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8756 | |||
| 8757 | __builtin_ve_vl_pvfmkwupgenan_mvml | ||
| 8758 | .param_str = "V256bV256dV256bUi" | ||
| 8759 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8760 | |||
| 8761 | __builtin_ve_vl_pvfmkwupgt_mvl | ||
| 8762 | .param_str = "V256bV256dUi" | ||
| 8763 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8764 | |||
| 8765 | __builtin_ve_vl_pvfmkwupgt_mvml | ||
| 8766 | .param_str = "V256bV256dV256bUi" | ||
| 8767 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8768 | |||
| 8769 | __builtin_ve_vl_pvfmkwupgtnan_mvl | ||
| 8770 | .param_str = "V256bV256dUi" | ||
| 8771 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8772 | |||
| 8773 | __builtin_ve_vl_pvfmkwupgtnan_mvml | ||
| 8774 | .param_str = "V256bV256dV256bUi" | ||
| 8775 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8776 | |||
| 8777 | __builtin_ve_vl_pvfmkwuple_mvl | ||
| 8778 | .param_str = "V256bV256dUi" | ||
| 8779 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8780 | |||
| 8781 | __builtin_ve_vl_pvfmkwuple_mvml | ||
| 8782 | .param_str = "V256bV256dV256bUi" | ||
| 8783 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8784 | |||
| 8785 | __builtin_ve_vl_pvfmkwuplenan_mvl | ||
| 8786 | .param_str = "V256bV256dUi" | ||
| 8787 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8788 | |||
| 8789 | __builtin_ve_vl_pvfmkwuplenan_mvml | ||
| 8790 | .param_str = "V256bV256dV256bUi" | ||
| 8791 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8792 | |||
| 8793 | __builtin_ve_vl_pvfmkwuplt_mvl | ||
| 8794 | .param_str = "V256bV256dUi" | ||
| 8795 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8796 | |||
| 8797 | __builtin_ve_vl_pvfmkwuplt_mvml | ||
| 8798 | .param_str = "V256bV256dV256bUi" | ||
| 8799 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8800 | |||
| 8801 | __builtin_ve_vl_pvfmkwupltnan_mvl | ||
| 8802 | .param_str = "V256bV256dUi" | ||
| 8803 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8804 | |||
| 8805 | __builtin_ve_vl_pvfmkwupltnan_mvml | ||
| 8806 | .param_str = "V256bV256dV256bUi" | ||
| 8807 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8808 | |||
| 8809 | __builtin_ve_vl_pvfmkwupnan_mvl | ||
| 8810 | .param_str = "V256bV256dUi" | ||
| 8811 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8812 | |||
| 8813 | __builtin_ve_vl_pvfmkwupnan_mvml | ||
| 8814 | .param_str = "V256bV256dV256bUi" | ||
| 8815 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8816 | |||
| 8817 | __builtin_ve_vl_pvfmkwupne_mvl | ||
| 8818 | .param_str = "V256bV256dUi" | ||
| 8819 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8820 | |||
| 8821 | __builtin_ve_vl_pvfmkwupne_mvml | ||
| 8822 | .param_str = "V256bV256dV256bUi" | ||
| 8823 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8824 | |||
| 8825 | __builtin_ve_vl_pvfmkwupnenan_mvl | ||
| 8826 | .param_str = "V256bV256dUi" | ||
| 8827 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8828 | |||
| 8829 | __builtin_ve_vl_pvfmkwupnenan_mvml | ||
| 8830 | .param_str = "V256bV256dV256bUi" | ||
| 8831 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8832 | |||
| 8833 | __builtin_ve_vl_pvfmkwupnum_mvl | ||
| 8834 | .param_str = "V256bV256dUi" | ||
| 8835 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8836 | |||
| 8837 | __builtin_ve_vl_pvfmkwupnum_mvml | ||
| 8838 | .param_str = "V256bV256dV256bUi" | ||
| 8839 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8840 | |||
| 8841 | __builtin_ve_vl_pvfmsb_vsvvMvl | ||
| 8842 | .param_str = "V256dLUiV256dV256dV512bV256dUi" | ||
| 8843 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8844 | |||
| 8845 | __builtin_ve_vl_pvfmsb_vsvvl | ||
| 8846 | .param_str = "V256dLUiV256dV256dUi" | ||
| 8847 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8848 | |||
| 8849 | __builtin_ve_vl_pvfmsb_vsvvvl | ||
| 8850 | .param_str = "V256dLUiV256dV256dV256dUi" | ||
| 8851 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8852 | |||
| 8853 | __builtin_ve_vl_pvfmsb_vvsvMvl | ||
| 8854 | .param_str = "V256dV256dLUiV256dV512bV256dUi" | ||
| 8855 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8856 | |||
| 8857 | __builtin_ve_vl_pvfmsb_vvsvl | ||
| 8858 | .param_str = "V256dV256dLUiV256dUi" | ||
| 8859 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8860 | |||
| 8861 | __builtin_ve_vl_pvfmsb_vvsvvl | ||
| 8862 | .param_str = "V256dV256dLUiV256dV256dUi" | ||
| 8863 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8864 | |||
| 8865 | __builtin_ve_vl_pvfmsb_vvvvMvl | ||
| 8866 | .param_str = "V256dV256dV256dV256dV512bV256dUi" | ||
| 8867 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8868 | |||
| 8869 | __builtin_ve_vl_pvfmsb_vvvvl | ||
| 8870 | .param_str = "V256dV256dV256dV256dUi" | ||
| 8871 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8872 | |||
| 8873 | __builtin_ve_vl_pvfmsb_vvvvvl | ||
| 8874 | .param_str = "V256dV256dV256dV256dV256dUi" | ||
| 8875 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8876 | |||
| 8877 | __builtin_ve_vl_pvfmul_vsvMvl | ||
| 8878 | .param_str = "V256dLUiV256dV512bV256dUi" | ||
| 8879 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8880 | |||
| 8881 | __builtin_ve_vl_pvfmul_vsvl | ||
| 8882 | .param_str = "V256dLUiV256dUi" | ||
| 8883 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8884 | |||
| 8885 | __builtin_ve_vl_pvfmul_vsvvl | ||
| 8886 | .param_str = "V256dLUiV256dV256dUi" | ||
| 8887 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8888 | |||
| 8889 | __builtin_ve_vl_pvfmul_vvvMvl | ||
| 8890 | .param_str = "V256dV256dV256dV512bV256dUi" | ||
| 8891 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8892 | |||
| 8893 | __builtin_ve_vl_pvfmul_vvvl | ||
| 8894 | .param_str = "V256dV256dV256dUi" | ||
| 8895 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8896 | |||
| 8897 | __builtin_ve_vl_pvfmul_vvvvl | ||
| 8898 | .param_str = "V256dV256dV256dV256dUi" | ||
| 8899 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8900 | |||
| 8901 | __builtin_ve_vl_pvfnmad_vsvvMvl | ||
| 8902 | .param_str = "V256dLUiV256dV256dV512bV256dUi" | ||
| 8903 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8904 | |||
| 8905 | __builtin_ve_vl_pvfnmad_vsvvl | ||
| 8906 | .param_str = "V256dLUiV256dV256dUi" | ||
| 8907 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8908 | |||
| 8909 | __builtin_ve_vl_pvfnmad_vsvvvl | ||
| 8910 | .param_str = "V256dLUiV256dV256dV256dUi" | ||
| 8911 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8912 | |||
| 8913 | __builtin_ve_vl_pvfnmad_vvsvMvl | ||
| 8914 | .param_str = "V256dV256dLUiV256dV512bV256dUi" | ||
| 8915 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8916 | |||
| 8917 | __builtin_ve_vl_pvfnmad_vvsvl | ||
| 8918 | .param_str = "V256dV256dLUiV256dUi" | ||
| 8919 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8920 | |||
| 8921 | __builtin_ve_vl_pvfnmad_vvsvvl | ||
| 8922 | .param_str = "V256dV256dLUiV256dV256dUi" | ||
| 8923 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8924 | |||
| 8925 | __builtin_ve_vl_pvfnmad_vvvvMvl | ||
| 8926 | .param_str = "V256dV256dV256dV256dV512bV256dUi" | ||
| 8927 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8928 | |||
| 8929 | __builtin_ve_vl_pvfnmad_vvvvl | ||
| 8930 | .param_str = "V256dV256dV256dV256dUi" | ||
| 8931 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8932 | |||
| 8933 | __builtin_ve_vl_pvfnmad_vvvvvl | ||
| 8934 | .param_str = "V256dV256dV256dV256dV256dUi" | ||
| 8935 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8936 | |||
| 8937 | __builtin_ve_vl_pvfnmsb_vsvvMvl | ||
| 8938 | .param_str = "V256dLUiV256dV256dV512bV256dUi" | ||
| 8939 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8940 | |||
| 8941 | __builtin_ve_vl_pvfnmsb_vsvvl | ||
| 8942 | .param_str = "V256dLUiV256dV256dUi" | ||
| 8943 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8944 | |||
| 8945 | __builtin_ve_vl_pvfnmsb_vsvvvl | ||
| 8946 | .param_str = "V256dLUiV256dV256dV256dUi" | ||
| 8947 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8948 | |||
| 8949 | __builtin_ve_vl_pvfnmsb_vvsvMvl | ||
| 8950 | .param_str = "V256dV256dLUiV256dV512bV256dUi" | ||
| 8951 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8952 | |||
| 8953 | __builtin_ve_vl_pvfnmsb_vvsvl | ||
| 8954 | .param_str = "V256dV256dLUiV256dUi" | ||
| 8955 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8956 | |||
| 8957 | __builtin_ve_vl_pvfnmsb_vvsvvl | ||
| 8958 | .param_str = "V256dV256dLUiV256dV256dUi" | ||
| 8959 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8960 | |||
| 8961 | __builtin_ve_vl_pvfnmsb_vvvvMvl | ||
| 8962 | .param_str = "V256dV256dV256dV256dV512bV256dUi" | ||
| 8963 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8964 | |||
| 8965 | __builtin_ve_vl_pvfnmsb_vvvvl | ||
| 8966 | .param_str = "V256dV256dV256dV256dUi" | ||
| 8967 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8968 | |||
| 8969 | __builtin_ve_vl_pvfnmsb_vvvvvl | ||
| 8970 | .param_str = "V256dV256dV256dV256dV256dUi" | ||
| 8971 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8972 | |||
| 8973 | __builtin_ve_vl_pvfsub_vsvMvl | ||
| 8974 | .param_str = "V256dLUiV256dV512bV256dUi" | ||
| 8975 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8976 | |||
| 8977 | __builtin_ve_vl_pvfsub_vsvl | ||
| 8978 | .param_str = "V256dLUiV256dUi" | ||
| 8979 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8980 | |||
| 8981 | __builtin_ve_vl_pvfsub_vsvvl | ||
| 8982 | .param_str = "V256dLUiV256dV256dUi" | ||
| 8983 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8984 | |||
| 8985 | __builtin_ve_vl_pvfsub_vvvMvl | ||
| 8986 | .param_str = "V256dV256dV256dV512bV256dUi" | ||
| 8987 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8988 | |||
| 8989 | __builtin_ve_vl_pvfsub_vvvl | ||
| 8990 | .param_str = "V256dV256dV256dUi" | ||
| 8991 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8992 | |||
| 8993 | __builtin_ve_vl_pvfsub_vvvvl | ||
| 8994 | .param_str = "V256dV256dV256dV256dUi" | ||
| 8995 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8996 | |||
| 8997 | __builtin_ve_vl_pvldz_vvMvl | ||
| 8998 | .param_str = "V256dV256dV512bV256dUi" | ||
| 8999 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9000 | |||
| 9001 | __builtin_ve_vl_pvldz_vvl | ||
| 9002 | .param_str = "V256dV256dUi" | ||
| 9003 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9004 | |||
| 9005 | __builtin_ve_vl_pvldz_vvvl | ||
| 9006 | .param_str = "V256dV256dV256dUi" | ||
| 9007 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9008 | |||
| 9009 | __builtin_ve_vl_pvldzlo_vvl | ||
| 9010 | .param_str = "V256dV256dUi" | ||
| 9011 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9012 | |||
| 9013 | __builtin_ve_vl_pvldzlo_vvmvl | ||
| 9014 | .param_str = "V256dV256dV256bV256dUi" | ||
| 9015 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9016 | |||
| 9017 | __builtin_ve_vl_pvldzlo_vvvl | ||
| 9018 | .param_str = "V256dV256dV256dUi" | ||
| 9019 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9020 | |||
| 9021 | __builtin_ve_vl_pvldzup_vvl | ||
| 9022 | .param_str = "V256dV256dUi" | ||
| 9023 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9024 | |||
| 9025 | __builtin_ve_vl_pvldzup_vvmvl | ||
| 9026 | .param_str = "V256dV256dV256bV256dUi" | ||
| 9027 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9028 | |||
| 9029 | __builtin_ve_vl_pvldzup_vvvl | ||
| 9030 | .param_str = "V256dV256dV256dUi" | ||
| 9031 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9032 | |||
| 9033 | __builtin_ve_vl_pvmaxs_vsvMvl | ||
| 9034 | .param_str = "V256dLUiV256dV512bV256dUi" | ||
| 9035 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9036 | |||
| 9037 | __builtin_ve_vl_pvmaxs_vsvl | ||
| 9038 | .param_str = "V256dLUiV256dUi" | ||
| 9039 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9040 | |||
| 9041 | __builtin_ve_vl_pvmaxs_vsvvl | ||
| 9042 | .param_str = "V256dLUiV256dV256dUi" | ||
| 9043 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9044 | |||
| 9045 | __builtin_ve_vl_pvmaxs_vvvMvl | ||
| 9046 | .param_str = "V256dV256dV256dV512bV256dUi" | ||
| 9047 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9048 | |||
| 9049 | __builtin_ve_vl_pvmaxs_vvvl | ||
| 9050 | .param_str = "V256dV256dV256dUi" | ||
| 9051 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9052 | |||
| 9053 | __builtin_ve_vl_pvmaxs_vvvvl | ||
| 9054 | .param_str = "V256dV256dV256dV256dUi" | ||
| 9055 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9056 | |||
| 9057 | __builtin_ve_vl_pvmins_vsvMvl | ||
| 9058 | .param_str = "V256dLUiV256dV512bV256dUi" | ||
| 9059 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9060 | |||
| 9061 | __builtin_ve_vl_pvmins_vsvl | ||
| 9062 | .param_str = "V256dLUiV256dUi" | ||
| 9063 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9064 | |||
| 9065 | __builtin_ve_vl_pvmins_vsvvl | ||
| 9066 | .param_str = "V256dLUiV256dV256dUi" | ||
| 9067 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9068 | |||
| 9069 | __builtin_ve_vl_pvmins_vvvMvl | ||
| 9070 | .param_str = "V256dV256dV256dV512bV256dUi" | ||
| 9071 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9072 | |||
| 9073 | __builtin_ve_vl_pvmins_vvvl | ||
| 9074 | .param_str = "V256dV256dV256dUi" | ||
| 9075 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9076 | |||
| 9077 | __builtin_ve_vl_pvmins_vvvvl | ||
| 9078 | .param_str = "V256dV256dV256dV256dUi" | ||
| 9079 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9080 | |||
| 9081 | __builtin_ve_vl_pvor_vsvMvl | ||
| 9082 | .param_str = "V256dLUiV256dV512bV256dUi" | ||
| 9083 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9084 | |||
| 9085 | __builtin_ve_vl_pvor_vsvl | ||
| 9086 | .param_str = "V256dLUiV256dUi" | ||
| 9087 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9088 | |||
| 9089 | __builtin_ve_vl_pvor_vsvvl | ||
| 9090 | .param_str = "V256dLUiV256dV256dUi" | ||
| 9091 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9092 | |||
| 9093 | __builtin_ve_vl_pvor_vvvMvl | ||
| 9094 | .param_str = "V256dV256dV256dV512bV256dUi" | ||
| 9095 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9096 | |||
| 9097 | __builtin_ve_vl_pvor_vvvl | ||
| 9098 | .param_str = "V256dV256dV256dUi" | ||
| 9099 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9100 | |||
| 9101 | __builtin_ve_vl_pvor_vvvvl | ||
| 9102 | .param_str = "V256dV256dV256dV256dUi" | ||
| 9103 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9104 | |||
| 9105 | __builtin_ve_vl_pvpcnt_vvMvl | ||
| 9106 | .param_str = "V256dV256dV512bV256dUi" | ||
| 9107 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9108 | |||
| 9109 | __builtin_ve_vl_pvpcnt_vvl | ||
| 9110 | .param_str = "V256dV256dUi" | ||
| 9111 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9112 | |||
| 9113 | __builtin_ve_vl_pvpcnt_vvvl | ||
| 9114 | .param_str = "V256dV256dV256dUi" | ||
| 9115 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9116 | |||
| 9117 | __builtin_ve_vl_pvpcntlo_vvl | ||
| 9118 | .param_str = "V256dV256dUi" | ||
| 9119 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9120 | |||
| 9121 | __builtin_ve_vl_pvpcntlo_vvmvl | ||
| 9122 | .param_str = "V256dV256dV256bV256dUi" | ||
| 9123 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9124 | |||
| 9125 | __builtin_ve_vl_pvpcntlo_vvvl | ||
| 9126 | .param_str = "V256dV256dV256dUi" | ||
| 9127 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9128 | |||
| 9129 | __builtin_ve_vl_pvpcntup_vvl | ||
| 9130 | .param_str = "V256dV256dUi" | ||
| 9131 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9132 | |||
| 9133 | __builtin_ve_vl_pvpcntup_vvmvl | ||
| 9134 | .param_str = "V256dV256dV256bV256dUi" | ||
| 9135 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9136 | |||
| 9137 | __builtin_ve_vl_pvpcntup_vvvl | ||
| 9138 | .param_str = "V256dV256dV256dUi" | ||
| 9139 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9140 | |||
| 9141 | __builtin_ve_vl_pvrcp_vvl | ||
| 9142 | .param_str = "V256dV256dUi" | ||
| 9143 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9144 | |||
| 9145 | __builtin_ve_vl_pvrcp_vvvl | ||
| 9146 | .param_str = "V256dV256dV256dUi" | ||
| 9147 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9148 | |||
| 9149 | __builtin_ve_vl_pvrsqrt_vvl | ||
| 9150 | .param_str = "V256dV256dUi" | ||
| 9151 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9152 | |||
| 9153 | __builtin_ve_vl_pvrsqrt_vvvl | ||
| 9154 | .param_str = "V256dV256dV256dUi" | ||
| 9155 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9156 | |||
| 9157 | __builtin_ve_vl_pvrsqrtnex_vvl | ||
| 9158 | .param_str = "V256dV256dUi" | ||
| 9159 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9160 | |||
| 9161 | __builtin_ve_vl_pvrsqrtnex_vvvl | ||
| 9162 | .param_str = "V256dV256dV256dUi" | ||
| 9163 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9164 | |||
| 9165 | __builtin_ve_vl_pvseq_vl | ||
| 9166 | .param_str = "V256dUi" | ||
| 9167 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9168 | |||
| 9169 | __builtin_ve_vl_pvseq_vvl | ||
| 9170 | .param_str = "V256dV256dUi" | ||
| 9171 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9172 | |||
| 9173 | __builtin_ve_vl_pvseqlo_vl | ||
| 9174 | .param_str = "V256dUi" | ||
| 9175 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9176 | |||
| 9177 | __builtin_ve_vl_pvseqlo_vvl | ||
| 9178 | .param_str = "V256dV256dUi" | ||
| 9179 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9180 | |||
| 9181 | __builtin_ve_vl_pvsequp_vl | ||
| 9182 | .param_str = "V256dUi" | ||
| 9183 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9184 | |||
| 9185 | __builtin_ve_vl_pvsequp_vvl | ||
| 9186 | .param_str = "V256dV256dUi" | ||
| 9187 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9188 | |||
| 9189 | __builtin_ve_vl_pvsla_vvsMvl | ||
| 9190 | .param_str = "V256dV256dLUiV512bV256dUi" | ||
| 9191 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9192 | |||
| 9193 | __builtin_ve_vl_pvsla_vvsl | ||
| 9194 | .param_str = "V256dV256dLUiUi" | ||
| 9195 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9196 | |||
| 9197 | __builtin_ve_vl_pvsla_vvsvl | ||
| 9198 | .param_str = "V256dV256dLUiV256dUi" | ||
| 9199 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9200 | |||
| 9201 | __builtin_ve_vl_pvsla_vvvMvl | ||
| 9202 | .param_str = "V256dV256dV256dV512bV256dUi" | ||
| 9203 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9204 | |||
| 9205 | __builtin_ve_vl_pvsla_vvvl | ||
| 9206 | .param_str = "V256dV256dV256dUi" | ||
| 9207 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9208 | |||
| 9209 | __builtin_ve_vl_pvsla_vvvvl | ||
| 9210 | .param_str = "V256dV256dV256dV256dUi" | ||
| 9211 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9212 | |||
| 9213 | __builtin_ve_vl_pvsll_vvsMvl | ||
| 9214 | .param_str = "V256dV256dLUiV512bV256dUi" | ||
| 9215 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9216 | |||
| 9217 | __builtin_ve_vl_pvsll_vvsl | ||
| 9218 | .param_str = "V256dV256dLUiUi" | ||
| 9219 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9220 | |||
| 9221 | __builtin_ve_vl_pvsll_vvsvl | ||
| 9222 | .param_str = "V256dV256dLUiV256dUi" | ||
| 9223 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9224 | |||
| 9225 | __builtin_ve_vl_pvsll_vvvMvl | ||
| 9226 | .param_str = "V256dV256dV256dV512bV256dUi" | ||
| 9227 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9228 | |||
| 9229 | __builtin_ve_vl_pvsll_vvvl | ||
| 9230 | .param_str = "V256dV256dV256dUi" | ||
| 9231 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9232 | |||
| 9233 | __builtin_ve_vl_pvsll_vvvvl | ||
| 9234 | .param_str = "V256dV256dV256dV256dUi" | ||
| 9235 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9236 | |||
| 9237 | __builtin_ve_vl_pvsra_vvsMvl | ||
| 9238 | .param_str = "V256dV256dLUiV512bV256dUi" | ||
| 9239 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9240 | |||
| 9241 | __builtin_ve_vl_pvsra_vvsl | ||
| 9242 | .param_str = "V256dV256dLUiUi" | ||
| 9243 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9244 | |||
| 9245 | __builtin_ve_vl_pvsra_vvsvl | ||
| 9246 | .param_str = "V256dV256dLUiV256dUi" | ||
| 9247 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9248 | |||
| 9249 | __builtin_ve_vl_pvsra_vvvMvl | ||
| 9250 | .param_str = "V256dV256dV256dV512bV256dUi" | ||
| 9251 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9252 | |||
| 9253 | __builtin_ve_vl_pvsra_vvvl | ||
| 9254 | .param_str = "V256dV256dV256dUi" | ||
| 9255 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9256 | |||
| 9257 | __builtin_ve_vl_pvsra_vvvvl | ||
| 9258 | .param_str = "V256dV256dV256dV256dUi" | ||
| 9259 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9260 | |||
| 9261 | __builtin_ve_vl_pvsrl_vvsMvl | ||
| 9262 | .param_str = "V256dV256dLUiV512bV256dUi" | ||
| 9263 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9264 | |||
| 9265 | __builtin_ve_vl_pvsrl_vvsl | ||
| 9266 | .param_str = "V256dV256dLUiUi" | ||
| 9267 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9268 | |||
| 9269 | __builtin_ve_vl_pvsrl_vvsvl | ||
| 9270 | .param_str = "V256dV256dLUiV256dUi" | ||
| 9271 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9272 | |||
| 9273 | __builtin_ve_vl_pvsrl_vvvMvl | ||
| 9274 | .param_str = "V256dV256dV256dV512bV256dUi" | ||
| 9275 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9276 | |||
| 9277 | __builtin_ve_vl_pvsrl_vvvl | ||
| 9278 | .param_str = "V256dV256dV256dUi" | ||
| 9279 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9280 | |||
| 9281 | __builtin_ve_vl_pvsrl_vvvvl | ||
| 9282 | .param_str = "V256dV256dV256dV256dUi" | ||
| 9283 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9284 | |||
| 9285 | __builtin_ve_vl_pvsubs_vsvMvl | ||
| 9286 | .param_str = "V256dLUiV256dV512bV256dUi" | ||
| 9287 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9288 | |||
| 9289 | __builtin_ve_vl_pvsubs_vsvl | ||
| 9290 | .param_str = "V256dLUiV256dUi" | ||
| 9291 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9292 | |||
| 9293 | __builtin_ve_vl_pvsubs_vsvvl | ||
| 9294 | .param_str = "V256dLUiV256dV256dUi" | ||
| 9295 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9296 | |||
| 9297 | __builtin_ve_vl_pvsubs_vvvMvl | ||
| 9298 | .param_str = "V256dV256dV256dV512bV256dUi" | ||
| 9299 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9300 | |||
| 9301 | __builtin_ve_vl_pvsubs_vvvl | ||
| 9302 | .param_str = "V256dV256dV256dUi" | ||
| 9303 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9304 | |||
| 9305 | __builtin_ve_vl_pvsubs_vvvvl | ||
| 9306 | .param_str = "V256dV256dV256dV256dUi" | ||
| 9307 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9308 | |||
| 9309 | __builtin_ve_vl_pvsubu_vsvMvl | ||
| 9310 | .param_str = "V256dLUiV256dV512bV256dUi" | ||
| 9311 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9312 | |||
| 9313 | __builtin_ve_vl_pvsubu_vsvl | ||
| 9314 | .param_str = "V256dLUiV256dUi" | ||
| 9315 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9316 | |||
| 9317 | __builtin_ve_vl_pvsubu_vsvvl | ||
| 9318 | .param_str = "V256dLUiV256dV256dUi" | ||
| 9319 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9320 | |||
| 9321 | __builtin_ve_vl_pvsubu_vvvMvl | ||
| 9322 | .param_str = "V256dV256dV256dV512bV256dUi" | ||
| 9323 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9324 | |||
| 9325 | __builtin_ve_vl_pvsubu_vvvl | ||
| 9326 | .param_str = "V256dV256dV256dUi" | ||
| 9327 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9328 | |||
| 9329 | __builtin_ve_vl_pvsubu_vvvvl | ||
| 9330 | .param_str = "V256dV256dV256dV256dUi" | ||
| 9331 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9332 | |||
| 9333 | __builtin_ve_vl_pvxor_vsvMvl | ||
| 9334 | .param_str = "V256dLUiV256dV512bV256dUi" | ||
| 9335 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9336 | |||
| 9337 | __builtin_ve_vl_pvxor_vsvl | ||
| 9338 | .param_str = "V256dLUiV256dUi" | ||
| 9339 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9340 | |||
| 9341 | __builtin_ve_vl_pvxor_vsvvl | ||
| 9342 | .param_str = "V256dLUiV256dV256dUi" | ||
| 9343 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9344 | |||
| 9345 | __builtin_ve_vl_pvxor_vvvMvl | ||
| 9346 | .param_str = "V256dV256dV256dV512bV256dUi" | ||
| 9347 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9348 | |||
| 9349 | __builtin_ve_vl_pvxor_vvvl | ||
| 9350 | .param_str = "V256dV256dV256dUi" | ||
| 9351 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9352 | |||
| 9353 | __builtin_ve_vl_pvxor_vvvvl | ||
| 9354 | .param_str = "V256dV256dV256dV256dUi" | ||
| 9355 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9356 | |||
| 9357 | __builtin_ve_vl_scr_sss | ||
| 9358 | .param_str = "vLUiLUiLUi" | ||
| 9359 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9360 | |||
| 9361 | __builtin_ve_vl_svm_sMs | ||
| 9362 | .param_str = "LUiV512bLUi" | ||
| 9363 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9364 | |||
| 9365 | __builtin_ve_vl_svm_sms | ||
| 9366 | .param_str = "LUiV256bLUi" | ||
| 9367 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9368 | |||
| 9369 | __builtin_ve_vl_svob | ||
| 9370 | .param_str = "v" | ||
| 9371 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9372 | |||
| 9373 | __builtin_ve_vl_tovm_sml | ||
| 9374 | .param_str = "LUiV256bUi" | ||
| 9375 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9376 | |||
| 9377 | __builtin_ve_vl_tscr_ssss | ||
| 9378 | .param_str = "LUiLUiLUiLUi" | ||
| 9379 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9380 | |||
| 9381 | __builtin_ve_vl_vaddsl_vsvl | ||
| 9382 | .param_str = "V256dLiV256dUi" | ||
| 9383 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9384 | |||
| 9385 | __builtin_ve_vl_vaddsl_vsvmvl | ||
| 9386 | .param_str = "V256dLiV256dV256bV256dUi" | ||
| 9387 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9388 | |||
| 9389 | __builtin_ve_vl_vaddsl_vsvvl | ||
| 9390 | .param_str = "V256dLiV256dV256dUi" | ||
| 9391 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9392 | |||
| 9393 | __builtin_ve_vl_vaddsl_vvvl | ||
| 9394 | .param_str = "V256dV256dV256dUi" | ||
| 9395 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9396 | |||
| 9397 | __builtin_ve_vl_vaddsl_vvvmvl | ||
| 9398 | .param_str = "V256dV256dV256dV256bV256dUi" | ||
| 9399 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9400 | |||
| 9401 | __builtin_ve_vl_vaddsl_vvvvl | ||
| 9402 | .param_str = "V256dV256dV256dV256dUi" | ||
| 9403 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9404 | |||
| 9405 | __builtin_ve_vl_vaddswsx_vsvl | ||
| 9406 | .param_str = "V256diV256dUi" | ||
| 9407 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9408 | |||
| 9409 | __builtin_ve_vl_vaddswsx_vsvmvl | ||
| 9410 | .param_str = "V256diV256dV256bV256dUi" | ||
| 9411 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9412 | |||
| 9413 | __builtin_ve_vl_vaddswsx_vsvvl | ||
| 9414 | .param_str = "V256diV256dV256dUi" | ||
| 9415 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9416 | |||
| 9417 | __builtin_ve_vl_vaddswsx_vvvl | ||
| 9418 | .param_str = "V256dV256dV256dUi" | ||
| 9419 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9420 | |||
| 9421 | __builtin_ve_vl_vaddswsx_vvvmvl | ||
| 9422 | .param_str = "V256dV256dV256dV256bV256dUi" | ||
| 9423 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9424 | |||
| 9425 | __builtin_ve_vl_vaddswsx_vvvvl | ||
| 9426 | .param_str = "V256dV256dV256dV256dUi" | ||
| 9427 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9428 | |||
| 9429 | __builtin_ve_vl_vaddswzx_vsvl | ||
| 9430 | .param_str = "V256diV256dUi" | ||
| 9431 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9432 | |||
| 9433 | __builtin_ve_vl_vaddswzx_vsvmvl | ||
| 9434 | .param_str = "V256diV256dV256bV256dUi" | ||
| 9435 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9436 | |||
| 9437 | __builtin_ve_vl_vaddswzx_vsvvl | ||
| 9438 | .param_str = "V256diV256dV256dUi" | ||
| 9439 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9440 | |||
| 9441 | __builtin_ve_vl_vaddswzx_vvvl | ||
| 9442 | .param_str = "V256dV256dV256dUi" | ||
| 9443 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9444 | |||
| 9445 | __builtin_ve_vl_vaddswzx_vvvmvl | ||
| 9446 | .param_str = "V256dV256dV256dV256bV256dUi" | ||
| 9447 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9448 | |||
| 9449 | __builtin_ve_vl_vaddswzx_vvvvl | ||
| 9450 | .param_str = "V256dV256dV256dV256dUi" | ||
| 9451 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9452 | |||
| 9453 | __builtin_ve_vl_vaddul_vsvl | ||
| 9454 | .param_str = "V256dLUiV256dUi" | ||
| 9455 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9456 | |||
| 9457 | __builtin_ve_vl_vaddul_vsvmvl | ||
| 9458 | .param_str = "V256dLUiV256dV256bV256dUi" | ||
| 9459 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9460 | |||
| 9461 | __builtin_ve_vl_vaddul_vsvvl | ||
| 9462 | .param_str = "V256dLUiV256dV256dUi" | ||
| 9463 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9464 | |||
| 9465 | __builtin_ve_vl_vaddul_vvvl | ||
| 9466 | .param_str = "V256dV256dV256dUi" | ||
| 9467 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9468 | |||
| 9469 | __builtin_ve_vl_vaddul_vvvmvl | ||
| 9470 | .param_str = "V256dV256dV256dV256bV256dUi" | ||
| 9471 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9472 | |||
| 9473 | __builtin_ve_vl_vaddul_vvvvl | ||
| 9474 | .param_str = "V256dV256dV256dV256dUi" | ||
| 9475 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9476 | |||
| 9477 | __builtin_ve_vl_vadduw_vsvl | ||
| 9478 | .param_str = "V256dUiV256dUi" | ||
| 9479 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9480 | |||
| 9481 | __builtin_ve_vl_vadduw_vsvmvl | ||
| 9482 | .param_str = "V256dUiV256dV256bV256dUi" | ||
| 9483 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9484 | |||
| 9485 | __builtin_ve_vl_vadduw_vsvvl | ||
| 9486 | .param_str = "V256dUiV256dV256dUi" | ||
| 9487 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9488 | |||
| 9489 | __builtin_ve_vl_vadduw_vvvl | ||
| 9490 | .param_str = "V256dV256dV256dUi" | ||
| 9491 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9492 | |||
| 9493 | __builtin_ve_vl_vadduw_vvvmvl | ||
| 9494 | .param_str = "V256dV256dV256dV256bV256dUi" | ||
| 9495 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9496 | |||
| 9497 | __builtin_ve_vl_vadduw_vvvvl | ||
| 9498 | .param_str = "V256dV256dV256dV256dUi" | ||
| 9499 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9500 | |||
| 9501 | __builtin_ve_vl_vand_vsvl | ||
| 9502 | .param_str = "V256dLUiV256dUi" | ||
| 9503 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9504 | |||
| 9505 | __builtin_ve_vl_vand_vsvmvl | ||
| 9506 | .param_str = "V256dLUiV256dV256bV256dUi" | ||
| 9507 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9508 | |||
| 9509 | __builtin_ve_vl_vand_vsvvl | ||
| 9510 | .param_str = "V256dLUiV256dV256dUi" | ||
| 9511 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9512 | |||
| 9513 | __builtin_ve_vl_vand_vvvl | ||
| 9514 | .param_str = "V256dV256dV256dUi" | ||
| 9515 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9516 | |||
| 9517 | __builtin_ve_vl_vand_vvvmvl | ||
| 9518 | .param_str = "V256dV256dV256dV256bV256dUi" | ||
| 9519 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9520 | |||
| 9521 | __builtin_ve_vl_vand_vvvvl | ||
| 9522 | .param_str = "V256dV256dV256dV256dUi" | ||
| 9523 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9524 | |||
| 9525 | __builtin_ve_vl_vbrdd_vsl | ||
| 9526 | .param_str = "V256ddUi" | ||
| 9527 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9528 | |||
| 9529 | __builtin_ve_vl_vbrdd_vsmvl | ||
| 9530 | .param_str = "V256ddV256bV256dUi" | ||
| 9531 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9532 | |||
| 9533 | __builtin_ve_vl_vbrdd_vsvl | ||
| 9534 | .param_str = "V256ddV256dUi" | ||
| 9535 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9536 | |||
| 9537 | __builtin_ve_vl_vbrdl_vsl | ||
| 9538 | .param_str = "V256dLiUi" | ||
| 9539 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9540 | |||
| 9541 | __builtin_ve_vl_vbrdl_vsmvl | ||
| 9542 | .param_str = "V256dLiV256bV256dUi" | ||
| 9543 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9544 | |||
| 9545 | __builtin_ve_vl_vbrdl_vsvl | ||
| 9546 | .param_str = "V256dLiV256dUi" | ||
| 9547 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9548 | |||
| 9549 | __builtin_ve_vl_vbrds_vsl | ||
| 9550 | .param_str = "V256dfUi" | ||
| 9551 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9552 | |||
| 9553 | __builtin_ve_vl_vbrds_vsmvl | ||
| 9554 | .param_str = "V256dfV256bV256dUi" | ||
| 9555 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9556 | |||
| 9557 | __builtin_ve_vl_vbrds_vsvl | ||
| 9558 | .param_str = "V256dfV256dUi" | ||
| 9559 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9560 | |||
| 9561 | __builtin_ve_vl_vbrdw_vsl | ||
| 9562 | .param_str = "V256diUi" | ||
| 9563 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9564 | |||
| 9565 | __builtin_ve_vl_vbrdw_vsmvl | ||
| 9566 | .param_str = "V256diV256bV256dUi" | ||
| 9567 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9568 | |||
| 9569 | __builtin_ve_vl_vbrdw_vsvl | ||
| 9570 | .param_str = "V256diV256dUi" | ||
| 9571 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9572 | |||
| 9573 | __builtin_ve_vl_vbrv_vvl | ||
| 9574 | .param_str = "V256dV256dUi" | ||
| 9575 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9576 | |||
| 9577 | __builtin_ve_vl_vbrv_vvmvl | ||
| 9578 | .param_str = "V256dV256dV256bV256dUi" | ||
| 9579 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9580 | |||
| 9581 | __builtin_ve_vl_vbrv_vvvl | ||
| 9582 | .param_str = "V256dV256dV256dUi" | ||
| 9583 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9584 | |||
| 9585 | __builtin_ve_vl_vcmpsl_vsvl | ||
| 9586 | .param_str = "V256dLiV256dUi" | ||
| 9587 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9588 | |||
| 9589 | __builtin_ve_vl_vcmpsl_vsvmvl | ||
| 9590 | .param_str = "V256dLiV256dV256bV256dUi" | ||
| 9591 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9592 | |||
| 9593 | __builtin_ve_vl_vcmpsl_vsvvl | ||
| 9594 | .param_str = "V256dLiV256dV256dUi" | ||
| 9595 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9596 | |||
| 9597 | __builtin_ve_vl_vcmpsl_vvvl | ||
| 9598 | .param_str = "V256dV256dV256dUi" | ||
| 9599 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9600 | |||
| 9601 | __builtin_ve_vl_vcmpsl_vvvmvl | ||
| 9602 | .param_str = "V256dV256dV256dV256bV256dUi" | ||
| 9603 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9604 | |||
| 9605 | __builtin_ve_vl_vcmpsl_vvvvl | ||
| 9606 | .param_str = "V256dV256dV256dV256dUi" | ||
| 9607 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9608 | |||
| 9609 | __builtin_ve_vl_vcmpswsx_vsvl | ||
| 9610 | .param_str = "V256diV256dUi" | ||
| 9611 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9612 | |||
| 9613 | __builtin_ve_vl_vcmpswsx_vsvmvl | ||
| 9614 | .param_str = "V256diV256dV256bV256dUi" | ||
| 9615 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9616 | |||
| 9617 | __builtin_ve_vl_vcmpswsx_vsvvl | ||
| 9618 | .param_str = "V256diV256dV256dUi" | ||
| 9619 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9620 | |||
| 9621 | __builtin_ve_vl_vcmpswsx_vvvl | ||
| 9622 | .param_str = "V256dV256dV256dUi" | ||
| 9623 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9624 | |||
| 9625 | __builtin_ve_vl_vcmpswsx_vvvmvl | ||
| 9626 | .param_str = "V256dV256dV256dV256bV256dUi" | ||
| 9627 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9628 | |||
| 9629 | __builtin_ve_vl_vcmpswsx_vvvvl | ||
| 9630 | .param_str = "V256dV256dV256dV256dUi" | ||
| 9631 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9632 | |||
| 9633 | __builtin_ve_vl_vcmpswzx_vsvl | ||
| 9634 | .param_str = "V256diV256dUi" | ||
| 9635 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9636 | |||
| 9637 | __builtin_ve_vl_vcmpswzx_vsvmvl | ||
| 9638 | .param_str = "V256diV256dV256bV256dUi" | ||
| 9639 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9640 | |||
| 9641 | __builtin_ve_vl_vcmpswzx_vsvvl | ||
| 9642 | .param_str = "V256diV256dV256dUi" | ||
| 9643 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9644 | |||
| 9645 | __builtin_ve_vl_vcmpswzx_vvvl | ||
| 9646 | .param_str = "V256dV256dV256dUi" | ||
| 9647 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9648 | |||
| 9649 | __builtin_ve_vl_vcmpswzx_vvvmvl | ||
| 9650 | .param_str = "V256dV256dV256dV256bV256dUi" | ||
| 9651 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9652 | |||
| 9653 | __builtin_ve_vl_vcmpswzx_vvvvl | ||
| 9654 | .param_str = "V256dV256dV256dV256dUi" | ||
| 9655 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9656 | |||
| 9657 | __builtin_ve_vl_vcmpul_vsvl | ||
| 9658 | .param_str = "V256dLUiV256dUi" | ||
| 9659 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9660 | |||
| 9661 | __builtin_ve_vl_vcmpul_vsvmvl | ||
| 9662 | .param_str = "V256dLUiV256dV256bV256dUi" | ||
| 9663 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9664 | |||
| 9665 | __builtin_ve_vl_vcmpul_vsvvl | ||
| 9666 | .param_str = "V256dLUiV256dV256dUi" | ||
| 9667 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9668 | |||
| 9669 | __builtin_ve_vl_vcmpul_vvvl | ||
| 9670 | .param_str = "V256dV256dV256dUi" | ||
| 9671 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9672 | |||
| 9673 | __builtin_ve_vl_vcmpul_vvvmvl | ||
| 9674 | .param_str = "V256dV256dV256dV256bV256dUi" | ||
| 9675 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9676 | |||
| 9677 | __builtin_ve_vl_vcmpul_vvvvl | ||
| 9678 | .param_str = "V256dV256dV256dV256dUi" | ||
| 9679 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9680 | |||
| 9681 | __builtin_ve_vl_vcmpuw_vsvl | ||
| 9682 | .param_str = "V256dUiV256dUi" | ||
| 9683 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9684 | |||
| 9685 | __builtin_ve_vl_vcmpuw_vsvmvl | ||
| 9686 | .param_str = "V256dUiV256dV256bV256dUi" | ||
| 9687 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9688 | |||
| 9689 | __builtin_ve_vl_vcmpuw_vsvvl | ||
| 9690 | .param_str = "V256dUiV256dV256dUi" | ||
| 9691 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9692 | |||
| 9693 | __builtin_ve_vl_vcmpuw_vvvl | ||
| 9694 | .param_str = "V256dV256dV256dUi" | ||
| 9695 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9696 | |||
| 9697 | __builtin_ve_vl_vcmpuw_vvvmvl | ||
| 9698 | .param_str = "V256dV256dV256dV256bV256dUi" | ||
| 9699 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9700 | |||
| 9701 | __builtin_ve_vl_vcmpuw_vvvvl | ||
| 9702 | .param_str = "V256dV256dV256dV256dUi" | ||
| 9703 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9704 | |||
| 9705 | __builtin_ve_vl_vcp_vvmvl | ||
| 9706 | .param_str = "V256dV256dV256bV256dUi" | ||
| 9707 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9708 | |||
| 9709 | __builtin_ve_vl_vcvtdl_vvl | ||
| 9710 | .param_str = "V256dV256dUi" | ||
| 9711 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9712 | |||
| 9713 | __builtin_ve_vl_vcvtdl_vvvl | ||
| 9714 | .param_str = "V256dV256dV256dUi" | ||
| 9715 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9716 | |||
| 9717 | __builtin_ve_vl_vcvtds_vvl | ||
| 9718 | .param_str = "V256dV256dUi" | ||
| 9719 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9720 | |||
| 9721 | __builtin_ve_vl_vcvtds_vvvl | ||
| 9722 | .param_str = "V256dV256dV256dUi" | ||
| 9723 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9724 | |||
| 9725 | __builtin_ve_vl_vcvtdw_vvl | ||
| 9726 | .param_str = "V256dV256dUi" | ||
| 9727 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9728 | |||
| 9729 | __builtin_ve_vl_vcvtdw_vvvl | ||
| 9730 | .param_str = "V256dV256dV256dUi" | ||
| 9731 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9732 | |||
| 9733 | __builtin_ve_vl_vcvtld_vvl | ||
| 9734 | .param_str = "V256dV256dUi" | ||
| 9735 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9736 | |||
| 9737 | __builtin_ve_vl_vcvtld_vvmvl | ||
| 9738 | .param_str = "V256dV256dV256bV256dUi" | ||
| 9739 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9740 | |||
| 9741 | __builtin_ve_vl_vcvtld_vvvl | ||
| 9742 | .param_str = "V256dV256dV256dUi" | ||
| 9743 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9744 | |||
| 9745 | __builtin_ve_vl_vcvtldrz_vvl | ||
| 9746 | .param_str = "V256dV256dUi" | ||
| 9747 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9748 | |||
| 9749 | __builtin_ve_vl_vcvtldrz_vvmvl | ||
| 9750 | .param_str = "V256dV256dV256bV256dUi" | ||
| 9751 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9752 | |||
| 9753 | __builtin_ve_vl_vcvtldrz_vvvl | ||
| 9754 | .param_str = "V256dV256dV256dUi" | ||
| 9755 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9756 | |||
| 9757 | __builtin_ve_vl_vcvtsd_vvl | ||
| 9758 | .param_str = "V256dV256dUi" | ||
| 9759 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9760 | |||
| 9761 | __builtin_ve_vl_vcvtsd_vvvl | ||
| 9762 | .param_str = "V256dV256dV256dUi" | ||
| 9763 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9764 | |||
| 9765 | __builtin_ve_vl_vcvtsw_vvl | ||
| 9766 | .param_str = "V256dV256dUi" | ||
| 9767 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9768 | |||
| 9769 | __builtin_ve_vl_vcvtsw_vvvl | ||
| 9770 | .param_str = "V256dV256dV256dUi" | ||
| 9771 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9772 | |||
| 9773 | __builtin_ve_vl_vcvtwdsx_vvl | ||
| 9774 | .param_str = "V256dV256dUi" | ||
| 9775 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9776 | |||
| 9777 | __builtin_ve_vl_vcvtwdsx_vvmvl | ||
| 9778 | .param_str = "V256dV256dV256bV256dUi" | ||
| 9779 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9780 | |||
| 9781 | __builtin_ve_vl_vcvtwdsx_vvvl | ||
| 9782 | .param_str = "V256dV256dV256dUi" | ||
| 9783 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9784 | |||
| 9785 | __builtin_ve_vl_vcvtwdsxrz_vvl | ||
| 9786 | .param_str = "V256dV256dUi" | ||
| 9787 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9788 | |||
| 9789 | __builtin_ve_vl_vcvtwdsxrz_vvmvl | ||
| 9790 | .param_str = "V256dV256dV256bV256dUi" | ||
| 9791 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9792 | |||
| 9793 | __builtin_ve_vl_vcvtwdsxrz_vvvl | ||
| 9794 | .param_str = "V256dV256dV256dUi" | ||
| 9795 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9796 | |||
| 9797 | __builtin_ve_vl_vcvtwdzx_vvl | ||
| 9798 | .param_str = "V256dV256dUi" | ||
| 9799 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9800 | |||
| 9801 | __builtin_ve_vl_vcvtwdzx_vvmvl | ||
| 9802 | .param_str = "V256dV256dV256bV256dUi" | ||
| 9803 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9804 | |||
| 9805 | __builtin_ve_vl_vcvtwdzx_vvvl | ||
| 9806 | .param_str = "V256dV256dV256dUi" | ||
| 9807 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9808 | |||
| 9809 | __builtin_ve_vl_vcvtwdzxrz_vvl | ||
| 9810 | .param_str = "V256dV256dUi" | ||
| 9811 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9812 | |||
| 9813 | __builtin_ve_vl_vcvtwdzxrz_vvmvl | ||
| 9814 | .param_str = "V256dV256dV256bV256dUi" | ||
| 9815 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9816 | |||
| 9817 | __builtin_ve_vl_vcvtwdzxrz_vvvl | ||
| 9818 | .param_str = "V256dV256dV256dUi" | ||
| 9819 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9820 | |||
| 9821 | __builtin_ve_vl_vcvtwssx_vvl | ||
| 9822 | .param_str = "V256dV256dUi" | ||
| 9823 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9824 | |||
| 9825 | __builtin_ve_vl_vcvtwssx_vvmvl | ||
| 9826 | .param_str = "V256dV256dV256bV256dUi" | ||
| 9827 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9828 | |||
| 9829 | __builtin_ve_vl_vcvtwssx_vvvl | ||
| 9830 | .param_str = "V256dV256dV256dUi" | ||
| 9831 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9832 | |||
| 9833 | __builtin_ve_vl_vcvtwssxrz_vvl | ||
| 9834 | .param_str = "V256dV256dUi" | ||
| 9835 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9836 | |||
| 9837 | __builtin_ve_vl_vcvtwssxrz_vvmvl | ||
| 9838 | .param_str = "V256dV256dV256bV256dUi" | ||
| 9839 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9840 | |||
| 9841 | __builtin_ve_vl_vcvtwssxrz_vvvl | ||
| 9842 | .param_str = "V256dV256dV256dUi" | ||
| 9843 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9844 | |||
| 9845 | __builtin_ve_vl_vcvtwszx_vvl | ||
| 9846 | .param_str = "V256dV256dUi" | ||
| 9847 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9848 | |||
| 9849 | __builtin_ve_vl_vcvtwszx_vvmvl | ||
| 9850 | .param_str = "V256dV256dV256bV256dUi" | ||
| 9851 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9852 | |||
| 9853 | __builtin_ve_vl_vcvtwszx_vvvl | ||
| 9854 | .param_str = "V256dV256dV256dUi" | ||
| 9855 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9856 | |||
| 9857 | __builtin_ve_vl_vcvtwszxrz_vvl | ||
| 9858 | .param_str = "V256dV256dUi" | ||
| 9859 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9860 | |||
| 9861 | __builtin_ve_vl_vcvtwszxrz_vvmvl | ||
| 9862 | .param_str = "V256dV256dV256bV256dUi" | ||
| 9863 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9864 | |||
| 9865 | __builtin_ve_vl_vcvtwszxrz_vvvl | ||
| 9866 | .param_str = "V256dV256dV256dUi" | ||
| 9867 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9868 | |||
| 9869 | __builtin_ve_vl_vdivsl_vsvl | ||
| 9870 | .param_str = "V256dLiV256dUi" | ||
| 9871 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9872 | |||
| 9873 | __builtin_ve_vl_vdivsl_vsvmvl | ||
| 9874 | .param_str = "V256dLiV256dV256bV256dUi" | ||
| 9875 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9876 | |||
| 9877 | __builtin_ve_vl_vdivsl_vsvvl | ||
| 9878 | .param_str = "V256dLiV256dV256dUi" | ||
| 9879 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9880 | |||
| 9881 | __builtin_ve_vl_vdivsl_vvsl | ||
| 9882 | .param_str = "V256dV256dLiUi" | ||
| 9883 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9884 | |||
| 9885 | __builtin_ve_vl_vdivsl_vvsmvl | ||
| 9886 | .param_str = "V256dV256dLiV256bV256dUi" | ||
| 9887 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9888 | |||
| 9889 | __builtin_ve_vl_vdivsl_vvsvl | ||
| 9890 | .param_str = "V256dV256dLiV256dUi" | ||
| 9891 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9892 | |||
| 9893 | __builtin_ve_vl_vdivsl_vvvl | ||
| 9894 | .param_str = "V256dV256dV256dUi" | ||
| 9895 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9896 | |||
| 9897 | __builtin_ve_vl_vdivsl_vvvmvl | ||
| 9898 | .param_str = "V256dV256dV256dV256bV256dUi" | ||
| 9899 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9900 | |||
| 9901 | __builtin_ve_vl_vdivsl_vvvvl | ||
| 9902 | .param_str = "V256dV256dV256dV256dUi" | ||
| 9903 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9904 | |||
| 9905 | __builtin_ve_vl_vdivswsx_vsvl | ||
| 9906 | .param_str = "V256diV256dUi" | ||
| 9907 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9908 | |||
| 9909 | __builtin_ve_vl_vdivswsx_vsvmvl | ||
| 9910 | .param_str = "V256diV256dV256bV256dUi" | ||
| 9911 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9912 | |||
| 9913 | __builtin_ve_vl_vdivswsx_vsvvl | ||
| 9914 | .param_str = "V256diV256dV256dUi" | ||
| 9915 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9916 | |||
| 9917 | __builtin_ve_vl_vdivswsx_vvsl | ||
| 9918 | .param_str = "V256dV256diUi" | ||
| 9919 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9920 | |||
| 9921 | __builtin_ve_vl_vdivswsx_vvsmvl | ||
| 9922 | .param_str = "V256dV256diV256bV256dUi" | ||
| 9923 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9924 | |||
| 9925 | __builtin_ve_vl_vdivswsx_vvsvl | ||
| 9926 | .param_str = "V256dV256diV256dUi" | ||
| 9927 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9928 | |||
| 9929 | __builtin_ve_vl_vdivswsx_vvvl | ||
| 9930 | .param_str = "V256dV256dV256dUi" | ||
| 9931 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9932 | |||
| 9933 | __builtin_ve_vl_vdivswsx_vvvmvl | ||
| 9934 | .param_str = "V256dV256dV256dV256bV256dUi" | ||
| 9935 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9936 | |||
| 9937 | __builtin_ve_vl_vdivswsx_vvvvl | ||
| 9938 | .param_str = "V256dV256dV256dV256dUi" | ||
| 9939 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9940 | |||
| 9941 | __builtin_ve_vl_vdivswzx_vsvl | ||
| 9942 | .param_str = "V256diV256dUi" | ||
| 9943 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9944 | |||
| 9945 | __builtin_ve_vl_vdivswzx_vsvmvl | ||
| 9946 | .param_str = "V256diV256dV256bV256dUi" | ||
| 9947 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9948 | |||
| 9949 | __builtin_ve_vl_vdivswzx_vsvvl | ||
| 9950 | .param_str = "V256diV256dV256dUi" | ||
| 9951 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9952 | |||
| 9953 | __builtin_ve_vl_vdivswzx_vvsl | ||
| 9954 | .param_str = "V256dV256diUi" | ||
| 9955 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9956 | |||
| 9957 | __builtin_ve_vl_vdivswzx_vvsmvl | ||
| 9958 | .param_str = "V256dV256diV256bV256dUi" | ||
| 9959 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9960 | |||
| 9961 | __builtin_ve_vl_vdivswzx_vvsvl | ||
| 9962 | .param_str = "V256dV256diV256dUi" | ||
| 9963 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9964 | |||
| 9965 | __builtin_ve_vl_vdivswzx_vvvl | ||
| 9966 | .param_str = "V256dV256dV256dUi" | ||
| 9967 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9968 | |||
| 9969 | __builtin_ve_vl_vdivswzx_vvvmvl | ||
| 9970 | .param_str = "V256dV256dV256dV256bV256dUi" | ||
| 9971 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9972 | |||
| 9973 | __builtin_ve_vl_vdivswzx_vvvvl | ||
| 9974 | .param_str = "V256dV256dV256dV256dUi" | ||
| 9975 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9976 | |||
| 9977 | __builtin_ve_vl_vdivul_vsvl | ||
| 9978 | .param_str = "V256dLUiV256dUi" | ||
| 9979 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9980 | |||
| 9981 | __builtin_ve_vl_vdivul_vsvmvl | ||
| 9982 | .param_str = "V256dLUiV256dV256bV256dUi" | ||
| 9983 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9984 | |||
| 9985 | __builtin_ve_vl_vdivul_vsvvl | ||
| 9986 | .param_str = "V256dLUiV256dV256dUi" | ||
| 9987 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9988 | |||
| 9989 | __builtin_ve_vl_vdivul_vvsl | ||
| 9990 | .param_str = "V256dV256dLUiUi" | ||
| 9991 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9992 | |||
| 9993 | __builtin_ve_vl_vdivul_vvsmvl | ||
| 9994 | .param_str = "V256dV256dLUiV256bV256dUi" | ||
| 9995 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9996 | |||
| 9997 | __builtin_ve_vl_vdivul_vvsvl | ||
| 9998 | .param_str = "V256dV256dLUiV256dUi" | ||
| 9999 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10000 | |||
| 10001 | __builtin_ve_vl_vdivul_vvvl | ||
| 10002 | .param_str = "V256dV256dV256dUi" | ||
| 10003 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10004 | |||
| 10005 | __builtin_ve_vl_vdivul_vvvmvl | ||
| 10006 | .param_str = "V256dV256dV256dV256bV256dUi" | ||
| 10007 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10008 | |||
| 10009 | __builtin_ve_vl_vdivul_vvvvl | ||
| 10010 | .param_str = "V256dV256dV256dV256dUi" | ||
| 10011 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10012 | |||
| 10013 | __builtin_ve_vl_vdivuw_vsvl | ||
| 10014 | .param_str = "V256dUiV256dUi" | ||
| 10015 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10016 | |||
| 10017 | __builtin_ve_vl_vdivuw_vsvmvl | ||
| 10018 | .param_str = "V256dUiV256dV256bV256dUi" | ||
| 10019 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10020 | |||
| 10021 | __builtin_ve_vl_vdivuw_vsvvl | ||
| 10022 | .param_str = "V256dUiV256dV256dUi" | ||
| 10023 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10024 | |||
| 10025 | __builtin_ve_vl_vdivuw_vvsl | ||
| 10026 | .param_str = "V256dV256dUiUi" | ||
| 10027 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10028 | |||
| 10029 | __builtin_ve_vl_vdivuw_vvsmvl | ||
| 10030 | .param_str = "V256dV256dUiV256bV256dUi" | ||
| 10031 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10032 | |||
| 10033 | __builtin_ve_vl_vdivuw_vvsvl | ||
| 10034 | .param_str = "V256dV256dUiV256dUi" | ||
| 10035 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10036 | |||
| 10037 | __builtin_ve_vl_vdivuw_vvvl | ||
| 10038 | .param_str = "V256dV256dV256dUi" | ||
| 10039 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10040 | |||
| 10041 | __builtin_ve_vl_vdivuw_vvvmvl | ||
| 10042 | .param_str = "V256dV256dV256dV256bV256dUi" | ||
| 10043 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10044 | |||
| 10045 | __builtin_ve_vl_vdivuw_vvvvl | ||
| 10046 | .param_str = "V256dV256dV256dV256dUi" | ||
| 10047 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10048 | |||
| 10049 | __builtin_ve_vl_veqv_vsvl | ||
| 10050 | .param_str = "V256dLUiV256dUi" | ||
| 10051 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10052 | |||
| 10053 | __builtin_ve_vl_veqv_vsvmvl | ||
| 10054 | .param_str = "V256dLUiV256dV256bV256dUi" | ||
| 10055 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10056 | |||
| 10057 | __builtin_ve_vl_veqv_vsvvl | ||
| 10058 | .param_str = "V256dLUiV256dV256dUi" | ||
| 10059 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10060 | |||
| 10061 | __builtin_ve_vl_veqv_vvvl | ||
| 10062 | .param_str = "V256dV256dV256dUi" | ||
| 10063 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10064 | |||
| 10065 | __builtin_ve_vl_veqv_vvvmvl | ||
| 10066 | .param_str = "V256dV256dV256dV256bV256dUi" | ||
| 10067 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10068 | |||
| 10069 | __builtin_ve_vl_veqv_vvvvl | ||
| 10070 | .param_str = "V256dV256dV256dV256dUi" | ||
| 10071 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10072 | |||
| 10073 | __builtin_ve_vl_vex_vvmvl | ||
| 10074 | .param_str = "V256dV256dV256bV256dUi" | ||
| 10075 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10076 | |||
| 10077 | __builtin_ve_vl_vfaddd_vsvl | ||
| 10078 | .param_str = "V256ddV256dUi" | ||
| 10079 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10080 | |||
| 10081 | __builtin_ve_vl_vfaddd_vsvmvl | ||
| 10082 | .param_str = "V256ddV256dV256bV256dUi" | ||
| 10083 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10084 | |||
| 10085 | __builtin_ve_vl_vfaddd_vsvvl | ||
| 10086 | .param_str = "V256ddV256dV256dUi" | ||
| 10087 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10088 | |||
| 10089 | __builtin_ve_vl_vfaddd_vvvl | ||
| 10090 | .param_str = "V256dV256dV256dUi" | ||
| 10091 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10092 | |||
| 10093 | __builtin_ve_vl_vfaddd_vvvmvl | ||
| 10094 | .param_str = "V256dV256dV256dV256bV256dUi" | ||
| 10095 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10096 | |||
| 10097 | __builtin_ve_vl_vfaddd_vvvvl | ||
| 10098 | .param_str = "V256dV256dV256dV256dUi" | ||
| 10099 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10100 | |||
| 10101 | __builtin_ve_vl_vfadds_vsvl | ||
| 10102 | .param_str = "V256dfV256dUi" | ||
| 10103 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10104 | |||
| 10105 | __builtin_ve_vl_vfadds_vsvmvl | ||
| 10106 | .param_str = "V256dfV256dV256bV256dUi" | ||
| 10107 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10108 | |||
| 10109 | __builtin_ve_vl_vfadds_vsvvl | ||
| 10110 | .param_str = "V256dfV256dV256dUi" | ||
| 10111 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10112 | |||
| 10113 | __builtin_ve_vl_vfadds_vvvl | ||
| 10114 | .param_str = "V256dV256dV256dUi" | ||
| 10115 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10116 | |||
| 10117 | __builtin_ve_vl_vfadds_vvvmvl | ||
| 10118 | .param_str = "V256dV256dV256dV256bV256dUi" | ||
| 10119 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10120 | |||
| 10121 | __builtin_ve_vl_vfadds_vvvvl | ||
| 10122 | .param_str = "V256dV256dV256dV256dUi" | ||
| 10123 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10124 | |||
| 10125 | __builtin_ve_vl_vfcmpd_vsvl | ||
| 10126 | .param_str = "V256ddV256dUi" | ||
| 10127 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10128 | |||
| 10129 | __builtin_ve_vl_vfcmpd_vsvmvl | ||
| 10130 | .param_str = "V256ddV256dV256bV256dUi" | ||
| 10131 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10132 | |||
| 10133 | __builtin_ve_vl_vfcmpd_vsvvl | ||
| 10134 | .param_str = "V256ddV256dV256dUi" | ||
| 10135 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10136 | |||
| 10137 | __builtin_ve_vl_vfcmpd_vvvl | ||
| 10138 | .param_str = "V256dV256dV256dUi" | ||
| 10139 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10140 | |||
| 10141 | __builtin_ve_vl_vfcmpd_vvvmvl | ||
| 10142 | .param_str = "V256dV256dV256dV256bV256dUi" | ||
| 10143 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10144 | |||
| 10145 | __builtin_ve_vl_vfcmpd_vvvvl | ||
| 10146 | .param_str = "V256dV256dV256dV256dUi" | ||
| 10147 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10148 | |||
| 10149 | __builtin_ve_vl_vfcmps_vsvl | ||
| 10150 | .param_str = "V256dfV256dUi" | ||
| 10151 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10152 | |||
| 10153 | __builtin_ve_vl_vfcmps_vsvmvl | ||
| 10154 | .param_str = "V256dfV256dV256bV256dUi" | ||
| 10155 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10156 | |||
| 10157 | __builtin_ve_vl_vfcmps_vsvvl | ||
| 10158 | .param_str = "V256dfV256dV256dUi" | ||
| 10159 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10160 | |||
| 10161 | __builtin_ve_vl_vfcmps_vvvl | ||
| 10162 | .param_str = "V256dV256dV256dUi" | ||
| 10163 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10164 | |||
| 10165 | __builtin_ve_vl_vfcmps_vvvmvl | ||
| 10166 | .param_str = "V256dV256dV256dV256bV256dUi" | ||
| 10167 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10168 | |||
| 10169 | __builtin_ve_vl_vfcmps_vvvvl | ||
| 10170 | .param_str = "V256dV256dV256dV256dUi" | ||
| 10171 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10172 | |||
| 10173 | __builtin_ve_vl_vfdivd_vsvl | ||
| 10174 | .param_str = "V256ddV256dUi" | ||
| 10175 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10176 | |||
| 10177 | __builtin_ve_vl_vfdivd_vsvmvl | ||
| 10178 | .param_str = "V256ddV256dV256bV256dUi" | ||
| 10179 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10180 | |||
| 10181 | __builtin_ve_vl_vfdivd_vsvvl | ||
| 10182 | .param_str = "V256ddV256dV256dUi" | ||
| 10183 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10184 | |||
| 10185 | __builtin_ve_vl_vfdivd_vvvl | ||
| 10186 | .param_str = "V256dV256dV256dUi" | ||
| 10187 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10188 | |||
| 10189 | __builtin_ve_vl_vfdivd_vvvmvl | ||
| 10190 | .param_str = "V256dV256dV256dV256bV256dUi" | ||
| 10191 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10192 | |||
| 10193 | __builtin_ve_vl_vfdivd_vvvvl | ||
| 10194 | .param_str = "V256dV256dV256dV256dUi" | ||
| 10195 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10196 | |||
| 10197 | __builtin_ve_vl_vfdivs_vsvl | ||
| 10198 | .param_str = "V256dfV256dUi" | ||
| 10199 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10200 | |||
| 10201 | __builtin_ve_vl_vfdivs_vsvmvl | ||
| 10202 | .param_str = "V256dfV256dV256bV256dUi" | ||
| 10203 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10204 | |||
| 10205 | __builtin_ve_vl_vfdivs_vsvvl | ||
| 10206 | .param_str = "V256dfV256dV256dUi" | ||
| 10207 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10208 | |||
| 10209 | __builtin_ve_vl_vfdivs_vvvl | ||
| 10210 | .param_str = "V256dV256dV256dUi" | ||
| 10211 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10212 | |||
| 10213 | __builtin_ve_vl_vfdivs_vvvmvl | ||
| 10214 | .param_str = "V256dV256dV256dV256bV256dUi" | ||
| 10215 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10216 | |||
| 10217 | __builtin_ve_vl_vfdivs_vvvvl | ||
| 10218 | .param_str = "V256dV256dV256dV256dUi" | ||
| 10219 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10220 | |||
| 10221 | __builtin_ve_vl_vfmadd_vsvvl | ||
| 10222 | .param_str = "V256ddV256dV256dUi" | ||
| 10223 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10224 | |||
| 10225 | __builtin_ve_vl_vfmadd_vsvvmvl | ||
| 10226 | .param_str = "V256ddV256dV256dV256bV256dUi" | ||
| 10227 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10228 | |||
| 10229 | __builtin_ve_vl_vfmadd_vsvvvl | ||
| 10230 | .param_str = "V256ddV256dV256dV256dUi" | ||
| 10231 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10232 | |||
| 10233 | __builtin_ve_vl_vfmadd_vvsvl | ||
| 10234 | .param_str = "V256dV256ddV256dUi" | ||
| 10235 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10236 | |||
| 10237 | __builtin_ve_vl_vfmadd_vvsvmvl | ||
| 10238 | .param_str = "V256dV256ddV256dV256bV256dUi" | ||
| 10239 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10240 | |||
| 10241 | __builtin_ve_vl_vfmadd_vvsvvl | ||
| 10242 | .param_str = "V256dV256ddV256dV256dUi" | ||
| 10243 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10244 | |||
| 10245 | __builtin_ve_vl_vfmadd_vvvvl | ||
| 10246 | .param_str = "V256dV256dV256dV256dUi" | ||
| 10247 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10248 | |||
| 10249 | __builtin_ve_vl_vfmadd_vvvvmvl | ||
| 10250 | .param_str = "V256dV256dV256dV256dV256bV256dUi" | ||
| 10251 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10252 | |||
| 10253 | __builtin_ve_vl_vfmadd_vvvvvl | ||
| 10254 | .param_str = "V256dV256dV256dV256dV256dUi" | ||
| 10255 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10256 | |||
| 10257 | __builtin_ve_vl_vfmads_vsvvl | ||
| 10258 | .param_str = "V256dfV256dV256dUi" | ||
| 10259 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10260 | |||
| 10261 | __builtin_ve_vl_vfmads_vsvvmvl | ||
| 10262 | .param_str = "V256dfV256dV256dV256bV256dUi" | ||
| 10263 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10264 | |||
| 10265 | __builtin_ve_vl_vfmads_vsvvvl | ||
| 10266 | .param_str = "V256dfV256dV256dV256dUi" | ||
| 10267 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10268 | |||
| 10269 | __builtin_ve_vl_vfmads_vvsvl | ||
| 10270 | .param_str = "V256dV256dfV256dUi" | ||
| 10271 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10272 | |||
| 10273 | __builtin_ve_vl_vfmads_vvsvmvl | ||
| 10274 | .param_str = "V256dV256dfV256dV256bV256dUi" | ||
| 10275 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10276 | |||
| 10277 | __builtin_ve_vl_vfmads_vvsvvl | ||
| 10278 | .param_str = "V256dV256dfV256dV256dUi" | ||
| 10279 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10280 | |||
| 10281 | __builtin_ve_vl_vfmads_vvvvl | ||
| 10282 | .param_str = "V256dV256dV256dV256dUi" | ||
| 10283 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10284 | |||
| 10285 | __builtin_ve_vl_vfmads_vvvvmvl | ||
| 10286 | .param_str = "V256dV256dV256dV256dV256bV256dUi" | ||
| 10287 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10288 | |||
| 10289 | __builtin_ve_vl_vfmads_vvvvvl | ||
| 10290 | .param_str = "V256dV256dV256dV256dV256dUi" | ||
| 10291 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10292 | |||
| 10293 | __builtin_ve_vl_vfmaxd_vsvl | ||
| 10294 | .param_str = "V256ddV256dUi" | ||
| 10295 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10296 | |||
| 10297 | __builtin_ve_vl_vfmaxd_vsvmvl | ||
| 10298 | .param_str = "V256ddV256dV256bV256dUi" | ||
| 10299 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10300 | |||
| 10301 | __builtin_ve_vl_vfmaxd_vsvvl | ||
| 10302 | .param_str = "V256ddV256dV256dUi" | ||
| 10303 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10304 | |||
| 10305 | __builtin_ve_vl_vfmaxd_vvvl | ||
| 10306 | .param_str = "V256dV256dV256dUi" | ||
| 10307 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10308 | |||
| 10309 | __builtin_ve_vl_vfmaxd_vvvmvl | ||
| 10310 | .param_str = "V256dV256dV256dV256bV256dUi" | ||
| 10311 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10312 | |||
| 10313 | __builtin_ve_vl_vfmaxd_vvvvl | ||
| 10314 | .param_str = "V256dV256dV256dV256dUi" | ||
| 10315 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10316 | |||
| 10317 | __builtin_ve_vl_vfmaxs_vsvl | ||
| 10318 | .param_str = "V256dfV256dUi" | ||
| 10319 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10320 | |||
| 10321 | __builtin_ve_vl_vfmaxs_vsvmvl | ||
| 10322 | .param_str = "V256dfV256dV256bV256dUi" | ||
| 10323 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10324 | |||
| 10325 | __builtin_ve_vl_vfmaxs_vsvvl | ||
| 10326 | .param_str = "V256dfV256dV256dUi" | ||
| 10327 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10328 | |||
| 10329 | __builtin_ve_vl_vfmaxs_vvvl | ||
| 10330 | .param_str = "V256dV256dV256dUi" | ||
| 10331 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10332 | |||
| 10333 | __builtin_ve_vl_vfmaxs_vvvmvl | ||
| 10334 | .param_str = "V256dV256dV256dV256bV256dUi" | ||
| 10335 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10336 | |||
| 10337 | __builtin_ve_vl_vfmaxs_vvvvl | ||
| 10338 | .param_str = "V256dV256dV256dV256dUi" | ||
| 10339 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10340 | |||
| 10341 | __builtin_ve_vl_vfmind_vsvl | ||
| 10342 | .param_str = "V256ddV256dUi" | ||
| 10343 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10344 | |||
| 10345 | __builtin_ve_vl_vfmind_vsvmvl | ||
| 10346 | .param_str = "V256ddV256dV256bV256dUi" | ||
| 10347 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10348 | |||
| 10349 | __builtin_ve_vl_vfmind_vsvvl | ||
| 10350 | .param_str = "V256ddV256dV256dUi" | ||
| 10351 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10352 | |||
| 10353 | __builtin_ve_vl_vfmind_vvvl | ||
| 10354 | .param_str = "V256dV256dV256dUi" | ||
| 10355 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10356 | |||
| 10357 | __builtin_ve_vl_vfmind_vvvmvl | ||
| 10358 | .param_str = "V256dV256dV256dV256bV256dUi" | ||
| 10359 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10360 | |||
| 10361 | __builtin_ve_vl_vfmind_vvvvl | ||
| 10362 | .param_str = "V256dV256dV256dV256dUi" | ||
| 10363 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10364 | |||
| 10365 | __builtin_ve_vl_vfmins_vsvl | ||
| 10366 | .param_str = "V256dfV256dUi" | ||
| 10367 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10368 | |||
| 10369 | __builtin_ve_vl_vfmins_vsvmvl | ||
| 10370 | .param_str = "V256dfV256dV256bV256dUi" | ||
| 10371 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10372 | |||
| 10373 | __builtin_ve_vl_vfmins_vsvvl | ||
| 10374 | .param_str = "V256dfV256dV256dUi" | ||
| 10375 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10376 | |||
| 10377 | __builtin_ve_vl_vfmins_vvvl | ||
| 10378 | .param_str = "V256dV256dV256dUi" | ||
| 10379 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10380 | |||
| 10381 | __builtin_ve_vl_vfmins_vvvmvl | ||
| 10382 | .param_str = "V256dV256dV256dV256bV256dUi" | ||
| 10383 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10384 | |||
| 10385 | __builtin_ve_vl_vfmins_vvvvl | ||
| 10386 | .param_str = "V256dV256dV256dV256dUi" | ||
| 10387 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10388 | |||
| 10389 | __builtin_ve_vl_vfmkdeq_mvl | ||
| 10390 | .param_str = "V256bV256dUi" | ||
| 10391 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10392 | |||
| 10393 | __builtin_ve_vl_vfmkdeq_mvml | ||
| 10394 | .param_str = "V256bV256dV256bUi" | ||
| 10395 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10396 | |||
| 10397 | __builtin_ve_vl_vfmkdeqnan_mvl | ||
| 10398 | .param_str = "V256bV256dUi" | ||
| 10399 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10400 | |||
| 10401 | __builtin_ve_vl_vfmkdeqnan_mvml | ||
| 10402 | .param_str = "V256bV256dV256bUi" | ||
| 10403 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10404 | |||
| 10405 | __builtin_ve_vl_vfmkdge_mvl | ||
| 10406 | .param_str = "V256bV256dUi" | ||
| 10407 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10408 | |||
| 10409 | __builtin_ve_vl_vfmkdge_mvml | ||
| 10410 | .param_str = "V256bV256dV256bUi" | ||
| 10411 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10412 | |||
| 10413 | __builtin_ve_vl_vfmkdgenan_mvl | ||
| 10414 | .param_str = "V256bV256dUi" | ||
| 10415 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10416 | |||
| 10417 | __builtin_ve_vl_vfmkdgenan_mvml | ||
| 10418 | .param_str = "V256bV256dV256bUi" | ||
| 10419 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10420 | |||
| 10421 | __builtin_ve_vl_vfmkdgt_mvl | ||
| 10422 | .param_str = "V256bV256dUi" | ||
| 10423 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10424 | |||
| 10425 | __builtin_ve_vl_vfmkdgt_mvml | ||
| 10426 | .param_str = "V256bV256dV256bUi" | ||
| 10427 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10428 | |||
| 10429 | __builtin_ve_vl_vfmkdgtnan_mvl | ||
| 10430 | .param_str = "V256bV256dUi" | ||
| 10431 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10432 | |||
| 10433 | __builtin_ve_vl_vfmkdgtnan_mvml | ||
| 10434 | .param_str = "V256bV256dV256bUi" | ||
| 10435 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10436 | |||
| 10437 | __builtin_ve_vl_vfmkdle_mvl | ||
| 10438 | .param_str = "V256bV256dUi" | ||
| 10439 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10440 | |||
| 10441 | __builtin_ve_vl_vfmkdle_mvml | ||
| 10442 | .param_str = "V256bV256dV256bUi" | ||
| 10443 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10444 | |||
| 10445 | __builtin_ve_vl_vfmkdlenan_mvl | ||
| 10446 | .param_str = "V256bV256dUi" | ||
| 10447 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10448 | |||
| 10449 | __builtin_ve_vl_vfmkdlenan_mvml | ||
| 10450 | .param_str = "V256bV256dV256bUi" | ||
| 10451 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10452 | |||
| 10453 | __builtin_ve_vl_vfmkdlt_mvl | ||
| 10454 | .param_str = "V256bV256dUi" | ||
| 10455 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10456 | |||
| 10457 | __builtin_ve_vl_vfmkdlt_mvml | ||
| 10458 | .param_str = "V256bV256dV256bUi" | ||
| 10459 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10460 | |||
| 10461 | __builtin_ve_vl_vfmkdltnan_mvl | ||
| 10462 | .param_str = "V256bV256dUi" | ||
| 10463 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10464 | |||
| 10465 | __builtin_ve_vl_vfmkdltnan_mvml | ||
| 10466 | .param_str = "V256bV256dV256bUi" | ||
| 10467 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10468 | |||
| 10469 | __builtin_ve_vl_vfmkdnan_mvl | ||
| 10470 | .param_str = "V256bV256dUi" | ||
| 10471 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10472 | |||
| 10473 | __builtin_ve_vl_vfmkdnan_mvml | ||
| 10474 | .param_str = "V256bV256dV256bUi" | ||
| 10475 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10476 | |||
| 10477 | __builtin_ve_vl_vfmkdne_mvl | ||
| 10478 | .param_str = "V256bV256dUi" | ||
| 10479 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10480 | |||
| 10481 | __builtin_ve_vl_vfmkdne_mvml | ||
| 10482 | .param_str = "V256bV256dV256bUi" | ||
| 10483 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10484 | |||
| 10485 | __builtin_ve_vl_vfmkdnenan_mvl | ||
| 10486 | .param_str = "V256bV256dUi" | ||
| 10487 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10488 | |||
| 10489 | __builtin_ve_vl_vfmkdnenan_mvml | ||
| 10490 | .param_str = "V256bV256dV256bUi" | ||
| 10491 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10492 | |||
| 10493 | __builtin_ve_vl_vfmkdnum_mvl | ||
| 10494 | .param_str = "V256bV256dUi" | ||
| 10495 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10496 | |||
| 10497 | __builtin_ve_vl_vfmkdnum_mvml | ||
| 10498 | .param_str = "V256bV256dV256bUi" | ||
| 10499 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10500 | |||
| 10501 | __builtin_ve_vl_vfmklaf_ml | ||
| 10502 | .param_str = "V256bUi" | ||
| 10503 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10504 | |||
| 10505 | __builtin_ve_vl_vfmklat_ml | ||
| 10506 | .param_str = "V256bUi" | ||
| 10507 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10508 | |||
| 10509 | __builtin_ve_vl_vfmkleq_mvl | ||
| 10510 | .param_str = "V256bV256dUi" | ||
| 10511 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10512 | |||
| 10513 | __builtin_ve_vl_vfmkleq_mvml | ||
| 10514 | .param_str = "V256bV256dV256bUi" | ||
| 10515 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10516 | |||
| 10517 | __builtin_ve_vl_vfmkleqnan_mvl | ||
| 10518 | .param_str = "V256bV256dUi" | ||
| 10519 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10520 | |||
| 10521 | __builtin_ve_vl_vfmkleqnan_mvml | ||
| 10522 | .param_str = "V256bV256dV256bUi" | ||
| 10523 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10524 | |||
| 10525 | __builtin_ve_vl_vfmklge_mvl | ||
| 10526 | .param_str = "V256bV256dUi" | ||
| 10527 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10528 | |||
| 10529 | __builtin_ve_vl_vfmklge_mvml | ||
| 10530 | .param_str = "V256bV256dV256bUi" | ||
| 10531 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10532 | |||
| 10533 | __builtin_ve_vl_vfmklgenan_mvl | ||
| 10534 | .param_str = "V256bV256dUi" | ||
| 10535 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10536 | |||
| 10537 | __builtin_ve_vl_vfmklgenan_mvml | ||
| 10538 | .param_str = "V256bV256dV256bUi" | ||
| 10539 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10540 | |||
| 10541 | __builtin_ve_vl_vfmklgt_mvl | ||
| 10542 | .param_str = "V256bV256dUi" | ||
| 10543 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10544 | |||
| 10545 | __builtin_ve_vl_vfmklgt_mvml | ||
| 10546 | .param_str = "V256bV256dV256bUi" | ||
| 10547 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10548 | |||
| 10549 | __builtin_ve_vl_vfmklgtnan_mvl | ||
| 10550 | .param_str = "V256bV256dUi" | ||
| 10551 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10552 | |||
| 10553 | __builtin_ve_vl_vfmklgtnan_mvml | ||
| 10554 | .param_str = "V256bV256dV256bUi" | ||
| 10555 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10556 | |||
| 10557 | __builtin_ve_vl_vfmklle_mvl | ||
| 10558 | .param_str = "V256bV256dUi" | ||
| 10559 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10560 | |||
| 10561 | __builtin_ve_vl_vfmklle_mvml | ||
| 10562 | .param_str = "V256bV256dV256bUi" | ||
| 10563 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10564 | |||
| 10565 | __builtin_ve_vl_vfmkllenan_mvl | ||
| 10566 | .param_str = "V256bV256dUi" | ||
| 10567 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10568 | |||
| 10569 | __builtin_ve_vl_vfmkllenan_mvml | ||
| 10570 | .param_str = "V256bV256dV256bUi" | ||
| 10571 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10572 | |||
| 10573 | __builtin_ve_vl_vfmkllt_mvl | ||
| 10574 | .param_str = "V256bV256dUi" | ||
| 10575 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10576 | |||
| 10577 | __builtin_ve_vl_vfmkllt_mvml | ||
| 10578 | .param_str = "V256bV256dV256bUi" | ||
| 10579 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10580 | |||
| 10581 | __builtin_ve_vl_vfmklltnan_mvl | ||
| 10582 | .param_str = "V256bV256dUi" | ||
| 10583 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10584 | |||
| 10585 | __builtin_ve_vl_vfmklltnan_mvml | ||
| 10586 | .param_str = "V256bV256dV256bUi" | ||
| 10587 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10588 | |||
| 10589 | __builtin_ve_vl_vfmklnan_mvl | ||
| 10590 | .param_str = "V256bV256dUi" | ||
| 10591 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10592 | |||
| 10593 | __builtin_ve_vl_vfmklnan_mvml | ||
| 10594 | .param_str = "V256bV256dV256bUi" | ||
| 10595 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10596 | |||
| 10597 | __builtin_ve_vl_vfmklne_mvl | ||
| 10598 | .param_str = "V256bV256dUi" | ||
| 10599 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10600 | |||
| 10601 | __builtin_ve_vl_vfmklne_mvml | ||
| 10602 | .param_str = "V256bV256dV256bUi" | ||
| 10603 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10604 | |||
| 10605 | __builtin_ve_vl_vfmklnenan_mvl | ||
| 10606 | .param_str = "V256bV256dUi" | ||
| 10607 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10608 | |||
| 10609 | __builtin_ve_vl_vfmklnenan_mvml | ||
| 10610 | .param_str = "V256bV256dV256bUi" | ||
| 10611 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10612 | |||
| 10613 | __builtin_ve_vl_vfmklnum_mvl | ||
| 10614 | .param_str = "V256bV256dUi" | ||
| 10615 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10616 | |||
| 10617 | __builtin_ve_vl_vfmklnum_mvml | ||
| 10618 | .param_str = "V256bV256dV256bUi" | ||
| 10619 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10620 | |||
| 10621 | __builtin_ve_vl_vfmkseq_mvl | ||
| 10622 | .param_str = "V256bV256dUi" | ||
| 10623 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10624 | |||
| 10625 | __builtin_ve_vl_vfmkseq_mvml | ||
| 10626 | .param_str = "V256bV256dV256bUi" | ||
| 10627 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10628 | |||
| 10629 | __builtin_ve_vl_vfmkseqnan_mvl | ||
| 10630 | .param_str = "V256bV256dUi" | ||
| 10631 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10632 | |||
| 10633 | __builtin_ve_vl_vfmkseqnan_mvml | ||
| 10634 | .param_str = "V256bV256dV256bUi" | ||
| 10635 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10636 | |||
| 10637 | __builtin_ve_vl_vfmksge_mvl | ||
| 10638 | .param_str = "V256bV256dUi" | ||
| 10639 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10640 | |||
| 10641 | __builtin_ve_vl_vfmksge_mvml | ||
| 10642 | .param_str = "V256bV256dV256bUi" | ||
| 10643 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10644 | |||
| 10645 | __builtin_ve_vl_vfmksgenan_mvl | ||
| 10646 | .param_str = "V256bV256dUi" | ||
| 10647 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10648 | |||
| 10649 | __builtin_ve_vl_vfmksgenan_mvml | ||
| 10650 | .param_str = "V256bV256dV256bUi" | ||
| 10651 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10652 | |||
| 10653 | __builtin_ve_vl_vfmksgt_mvl | ||
| 10654 | .param_str = "V256bV256dUi" | ||
| 10655 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10656 | |||
| 10657 | __builtin_ve_vl_vfmksgt_mvml | ||
| 10658 | .param_str = "V256bV256dV256bUi" | ||
| 10659 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10660 | |||
| 10661 | __builtin_ve_vl_vfmksgtnan_mvl | ||
| 10662 | .param_str = "V256bV256dUi" | ||
| 10663 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10664 | |||
| 10665 | __builtin_ve_vl_vfmksgtnan_mvml | ||
| 10666 | .param_str = "V256bV256dV256bUi" | ||
| 10667 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10668 | |||
| 10669 | __builtin_ve_vl_vfmksle_mvl | ||
| 10670 | .param_str = "V256bV256dUi" | ||
| 10671 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10672 | |||
| 10673 | __builtin_ve_vl_vfmksle_mvml | ||
| 10674 | .param_str = "V256bV256dV256bUi" | ||
| 10675 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10676 | |||
| 10677 | __builtin_ve_vl_vfmkslenan_mvl | ||
| 10678 | .param_str = "V256bV256dUi" | ||
| 10679 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10680 | |||
| 10681 | __builtin_ve_vl_vfmkslenan_mvml | ||
| 10682 | .param_str = "V256bV256dV256bUi" | ||
| 10683 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10684 | |||
| 10685 | __builtin_ve_vl_vfmkslt_mvl | ||
| 10686 | .param_str = "V256bV256dUi" | ||
| 10687 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10688 | |||
| 10689 | __builtin_ve_vl_vfmkslt_mvml | ||
| 10690 | .param_str = "V256bV256dV256bUi" | ||
| 10691 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10692 | |||
| 10693 | __builtin_ve_vl_vfmksltnan_mvl | ||
| 10694 | .param_str = "V256bV256dUi" | ||
| 10695 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10696 | |||
| 10697 | __builtin_ve_vl_vfmksltnan_mvml | ||
| 10698 | .param_str = "V256bV256dV256bUi" | ||
| 10699 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10700 | |||
| 10701 | __builtin_ve_vl_vfmksnan_mvl | ||
| 10702 | .param_str = "V256bV256dUi" | ||
| 10703 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10704 | |||
| 10705 | __builtin_ve_vl_vfmksnan_mvml | ||
| 10706 | .param_str = "V256bV256dV256bUi" | ||
| 10707 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10708 | |||
| 10709 | __builtin_ve_vl_vfmksne_mvl | ||
| 10710 | .param_str = "V256bV256dUi" | ||
| 10711 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10712 | |||
| 10713 | __builtin_ve_vl_vfmksne_mvml | ||
| 10714 | .param_str = "V256bV256dV256bUi" | ||
| 10715 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10716 | |||
| 10717 | __builtin_ve_vl_vfmksnenan_mvl | ||
| 10718 | .param_str = "V256bV256dUi" | ||
| 10719 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10720 | |||
| 10721 | __builtin_ve_vl_vfmksnenan_mvml | ||
| 10722 | .param_str = "V256bV256dV256bUi" | ||
| 10723 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10724 | |||
| 10725 | __builtin_ve_vl_vfmksnum_mvl | ||
| 10726 | .param_str = "V256bV256dUi" | ||
| 10727 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10728 | |||
| 10729 | __builtin_ve_vl_vfmksnum_mvml | ||
| 10730 | .param_str = "V256bV256dV256bUi" | ||
| 10731 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10732 | |||
| 10733 | __builtin_ve_vl_vfmkweq_mvl | ||
| 10734 | .param_str = "V256bV256dUi" | ||
| 10735 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10736 | |||
| 10737 | __builtin_ve_vl_vfmkweq_mvml | ||
| 10738 | .param_str = "V256bV256dV256bUi" | ||
| 10739 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10740 | |||
| 10741 | __builtin_ve_vl_vfmkweqnan_mvl | ||
| 10742 | .param_str = "V256bV256dUi" | ||
| 10743 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10744 | |||
| 10745 | __builtin_ve_vl_vfmkweqnan_mvml | ||
| 10746 | .param_str = "V256bV256dV256bUi" | ||
| 10747 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10748 | |||
| 10749 | __builtin_ve_vl_vfmkwge_mvl | ||
| 10750 | .param_str = "V256bV256dUi" | ||
| 10751 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10752 | |||
| 10753 | __builtin_ve_vl_vfmkwge_mvml | ||
| 10754 | .param_str = "V256bV256dV256bUi" | ||
| 10755 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10756 | |||
| 10757 | __builtin_ve_vl_vfmkwgenan_mvl | ||
| 10758 | .param_str = "V256bV256dUi" | ||
| 10759 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10760 | |||
| 10761 | __builtin_ve_vl_vfmkwgenan_mvml | ||
| 10762 | .param_str = "V256bV256dV256bUi" | ||
| 10763 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10764 | |||
| 10765 | __builtin_ve_vl_vfmkwgt_mvl | ||
| 10766 | .param_str = "V256bV256dUi" | ||
| 10767 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10768 | |||
| 10769 | __builtin_ve_vl_vfmkwgt_mvml | ||
| 10770 | .param_str = "V256bV256dV256bUi" | ||
| 10771 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10772 | |||
| 10773 | __builtin_ve_vl_vfmkwgtnan_mvl | ||
| 10774 | .param_str = "V256bV256dUi" | ||
| 10775 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10776 | |||
| 10777 | __builtin_ve_vl_vfmkwgtnan_mvml | ||
| 10778 | .param_str = "V256bV256dV256bUi" | ||
| 10779 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10780 | |||
| 10781 | __builtin_ve_vl_vfmkwle_mvl | ||
| 10782 | .param_str = "V256bV256dUi" | ||
| 10783 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10784 | |||
| 10785 | __builtin_ve_vl_vfmkwle_mvml | ||
| 10786 | .param_str = "V256bV256dV256bUi" | ||
| 10787 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10788 | |||
| 10789 | __builtin_ve_vl_vfmkwlenan_mvl | ||
| 10790 | .param_str = "V256bV256dUi" | ||
| 10791 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10792 | |||
| 10793 | __builtin_ve_vl_vfmkwlenan_mvml | ||
| 10794 | .param_str = "V256bV256dV256bUi" | ||
| 10795 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10796 | |||
| 10797 | __builtin_ve_vl_vfmkwlt_mvl | ||
| 10798 | .param_str = "V256bV256dUi" | ||
| 10799 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10800 | |||
| 10801 | __builtin_ve_vl_vfmkwlt_mvml | ||
| 10802 | .param_str = "V256bV256dV256bUi" | ||
| 10803 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10804 | |||
| 10805 | __builtin_ve_vl_vfmkwltnan_mvl | ||
| 10806 | .param_str = "V256bV256dUi" | ||
| 10807 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10808 | |||
| 10809 | __builtin_ve_vl_vfmkwltnan_mvml | ||
| 10810 | .param_str = "V256bV256dV256bUi" | ||
| 10811 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10812 | |||
| 10813 | __builtin_ve_vl_vfmkwnan_mvl | ||
| 10814 | .param_str = "V256bV256dUi" | ||
| 10815 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10816 | |||
| 10817 | __builtin_ve_vl_vfmkwnan_mvml | ||
| 10818 | .param_str = "V256bV256dV256bUi" | ||
| 10819 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10820 | |||
| 10821 | __builtin_ve_vl_vfmkwne_mvl | ||
| 10822 | .param_str = "V256bV256dUi" | ||
| 10823 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10824 | |||
| 10825 | __builtin_ve_vl_vfmkwne_mvml | ||
| 10826 | .param_str = "V256bV256dV256bUi" | ||
| 10827 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10828 | |||
| 10829 | __builtin_ve_vl_vfmkwnenan_mvl | ||
| 10830 | .param_str = "V256bV256dUi" | ||
| 10831 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10832 | |||
| 10833 | __builtin_ve_vl_vfmkwnenan_mvml | ||
| 10834 | .param_str = "V256bV256dV256bUi" | ||
| 10835 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10836 | |||
| 10837 | __builtin_ve_vl_vfmkwnum_mvl | ||
| 10838 | .param_str = "V256bV256dUi" | ||
| 10839 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10840 | |||
| 10841 | __builtin_ve_vl_vfmkwnum_mvml | ||
| 10842 | .param_str = "V256bV256dV256bUi" | ||
| 10843 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10844 | |||
| 10845 | __builtin_ve_vl_vfmsbd_vsvvl | ||
| 10846 | .param_str = "V256ddV256dV256dUi" | ||
| 10847 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10848 | |||
| 10849 | __builtin_ve_vl_vfmsbd_vsvvmvl | ||
| 10850 | .param_str = "V256ddV256dV256dV256bV256dUi" | ||
| 10851 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10852 | |||
| 10853 | __builtin_ve_vl_vfmsbd_vsvvvl | ||
| 10854 | .param_str = "V256ddV256dV256dV256dUi" | ||
| 10855 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10856 | |||
| 10857 | __builtin_ve_vl_vfmsbd_vvsvl | ||
| 10858 | .param_str = "V256dV256ddV256dUi" | ||
| 10859 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10860 | |||
| 10861 | __builtin_ve_vl_vfmsbd_vvsvmvl | ||
| 10862 | .param_str = "V256dV256ddV256dV256bV256dUi" | ||
| 10863 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10864 | |||
| 10865 | __builtin_ve_vl_vfmsbd_vvsvvl | ||
| 10866 | .param_str = "V256dV256ddV256dV256dUi" | ||
| 10867 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10868 | |||
| 10869 | __builtin_ve_vl_vfmsbd_vvvvl | ||
| 10870 | .param_str = "V256dV256dV256dV256dUi" | ||
| 10871 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10872 | |||
| 10873 | __builtin_ve_vl_vfmsbd_vvvvmvl | ||
| 10874 | .param_str = "V256dV256dV256dV256dV256bV256dUi" | ||
| 10875 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10876 | |||
| 10877 | __builtin_ve_vl_vfmsbd_vvvvvl | ||
| 10878 | .param_str = "V256dV256dV256dV256dV256dUi" | ||
| 10879 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10880 | |||
| 10881 | __builtin_ve_vl_vfmsbs_vsvvl | ||
| 10882 | .param_str = "V256dfV256dV256dUi" | ||
| 10883 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10884 | |||
| 10885 | __builtin_ve_vl_vfmsbs_vsvvmvl | ||
| 10886 | .param_str = "V256dfV256dV256dV256bV256dUi" | ||
| 10887 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10888 | |||
| 10889 | __builtin_ve_vl_vfmsbs_vsvvvl | ||
| 10890 | .param_str = "V256dfV256dV256dV256dUi" | ||
| 10891 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10892 | |||
| 10893 | __builtin_ve_vl_vfmsbs_vvsvl | ||
| 10894 | .param_str = "V256dV256dfV256dUi" | ||
| 10895 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10896 | |||
| 10897 | __builtin_ve_vl_vfmsbs_vvsvmvl | ||
| 10898 | .param_str = "V256dV256dfV256dV256bV256dUi" | ||
| 10899 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10900 | |||
| 10901 | __builtin_ve_vl_vfmsbs_vvsvvl | ||
| 10902 | .param_str = "V256dV256dfV256dV256dUi" | ||
| 10903 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10904 | |||
| 10905 | __builtin_ve_vl_vfmsbs_vvvvl | ||
| 10906 | .param_str = "V256dV256dV256dV256dUi" | ||
| 10907 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10908 | |||
| 10909 | __builtin_ve_vl_vfmsbs_vvvvmvl | ||
| 10910 | .param_str = "V256dV256dV256dV256dV256bV256dUi" | ||
| 10911 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10912 | |||
| 10913 | __builtin_ve_vl_vfmsbs_vvvvvl | ||
| 10914 | .param_str = "V256dV256dV256dV256dV256dUi" | ||
| 10915 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10916 | |||
| 10917 | __builtin_ve_vl_vfmuld_vsvl | ||
| 10918 | .param_str = "V256ddV256dUi" | ||
| 10919 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10920 | |||
| 10921 | __builtin_ve_vl_vfmuld_vsvmvl | ||
| 10922 | .param_str = "V256ddV256dV256bV256dUi" | ||
| 10923 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10924 | |||
| 10925 | __builtin_ve_vl_vfmuld_vsvvl | ||
| 10926 | .param_str = "V256ddV256dV256dUi" | ||
| 10927 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10928 | |||
| 10929 | __builtin_ve_vl_vfmuld_vvvl | ||
| 10930 | .param_str = "V256dV256dV256dUi" | ||
| 10931 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10932 | |||
| 10933 | __builtin_ve_vl_vfmuld_vvvmvl | ||
| 10934 | .param_str = "V256dV256dV256dV256bV256dUi" | ||
| 10935 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10936 | |||
| 10937 | __builtin_ve_vl_vfmuld_vvvvl | ||
| 10938 | .param_str = "V256dV256dV256dV256dUi" | ||
| 10939 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10940 | |||
| 10941 | __builtin_ve_vl_vfmuls_vsvl | ||
| 10942 | .param_str = "V256dfV256dUi" | ||
| 10943 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10944 | |||
| 10945 | __builtin_ve_vl_vfmuls_vsvmvl | ||
| 10946 | .param_str = "V256dfV256dV256bV256dUi" | ||
| 10947 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10948 | |||
| 10949 | __builtin_ve_vl_vfmuls_vsvvl | ||
| 10950 | .param_str = "V256dfV256dV256dUi" | ||
| 10951 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10952 | |||
| 10953 | __builtin_ve_vl_vfmuls_vvvl | ||
| 10954 | .param_str = "V256dV256dV256dUi" | ||
| 10955 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10956 | |||
| 10957 | __builtin_ve_vl_vfmuls_vvvmvl | ||
| 10958 | .param_str = "V256dV256dV256dV256bV256dUi" | ||
| 10959 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10960 | |||
| 10961 | __builtin_ve_vl_vfmuls_vvvvl | ||
| 10962 | .param_str = "V256dV256dV256dV256dUi" | ||
| 10963 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10964 | |||
| 10965 | __builtin_ve_vl_vfnmadd_vsvvl | ||
| 10966 | .param_str = "V256ddV256dV256dUi" | ||
| 10967 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10968 | |||
| 10969 | __builtin_ve_vl_vfnmadd_vsvvmvl | ||
| 10970 | .param_str = "V256ddV256dV256dV256bV256dUi" | ||
| 10971 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10972 | |||
| 10973 | __builtin_ve_vl_vfnmadd_vsvvvl | ||
| 10974 | .param_str = "V256ddV256dV256dV256dUi" | ||
| 10975 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10976 | |||
| 10977 | __builtin_ve_vl_vfnmadd_vvsvl | ||
| 10978 | .param_str = "V256dV256ddV256dUi" | ||
| 10979 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10980 | |||
| 10981 | __builtin_ve_vl_vfnmadd_vvsvmvl | ||
| 10982 | .param_str = "V256dV256ddV256dV256bV256dUi" | ||
| 10983 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10984 | |||
| 10985 | __builtin_ve_vl_vfnmadd_vvsvvl | ||
| 10986 | .param_str = "V256dV256ddV256dV256dUi" | ||
| 10987 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10988 | |||
| 10989 | __builtin_ve_vl_vfnmadd_vvvvl | ||
| 10990 | .param_str = "V256dV256dV256dV256dUi" | ||
| 10991 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10992 | |||
| 10993 | __builtin_ve_vl_vfnmadd_vvvvmvl | ||
| 10994 | .param_str = "V256dV256dV256dV256dV256bV256dUi" | ||
| 10995 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10996 | |||
| 10997 | __builtin_ve_vl_vfnmadd_vvvvvl | ||
| 10998 | .param_str = "V256dV256dV256dV256dV256dUi" | ||
| 10999 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11000 | |||
| 11001 | __builtin_ve_vl_vfnmads_vsvvl | ||
| 11002 | .param_str = "V256dfV256dV256dUi" | ||
| 11003 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11004 | |||
| 11005 | __builtin_ve_vl_vfnmads_vsvvmvl | ||
| 11006 | .param_str = "V256dfV256dV256dV256bV256dUi" | ||
| 11007 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11008 | |||
| 11009 | __builtin_ve_vl_vfnmads_vsvvvl | ||
| 11010 | .param_str = "V256dfV256dV256dV256dUi" | ||
| 11011 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11012 | |||
| 11013 | __builtin_ve_vl_vfnmads_vvsvl | ||
| 11014 | .param_str = "V256dV256dfV256dUi" | ||
| 11015 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11016 | |||
| 11017 | __builtin_ve_vl_vfnmads_vvsvmvl | ||
| 11018 | .param_str = "V256dV256dfV256dV256bV256dUi" | ||
| 11019 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11020 | |||
| 11021 | __builtin_ve_vl_vfnmads_vvsvvl | ||
| 11022 | .param_str = "V256dV256dfV256dV256dUi" | ||
| 11023 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11024 | |||
| 11025 | __builtin_ve_vl_vfnmads_vvvvl | ||
| 11026 | .param_str = "V256dV256dV256dV256dUi" | ||
| 11027 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11028 | |||
| 11029 | __builtin_ve_vl_vfnmads_vvvvmvl | ||
| 11030 | .param_str = "V256dV256dV256dV256dV256bV256dUi" | ||
| 11031 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11032 | |||
| 11033 | __builtin_ve_vl_vfnmads_vvvvvl | ||
| 11034 | .param_str = "V256dV256dV256dV256dV256dUi" | ||
| 11035 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11036 | |||
| 11037 | __builtin_ve_vl_vfnmsbd_vsvvl | ||
| 11038 | .param_str = "V256ddV256dV256dUi" | ||
| 11039 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11040 | |||
| 11041 | __builtin_ve_vl_vfnmsbd_vsvvmvl | ||
| 11042 | .param_str = "V256ddV256dV256dV256bV256dUi" | ||
| 11043 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11044 | |||
| 11045 | __builtin_ve_vl_vfnmsbd_vsvvvl | ||
| 11046 | .param_str = "V256ddV256dV256dV256dUi" | ||
| 11047 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11048 | |||
| 11049 | __builtin_ve_vl_vfnmsbd_vvsvl | ||
| 11050 | .param_str = "V256dV256ddV256dUi" | ||
| 11051 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11052 | |||
| 11053 | __builtin_ve_vl_vfnmsbd_vvsvmvl | ||
| 11054 | .param_str = "V256dV256ddV256dV256bV256dUi" | ||
| 11055 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11056 | |||
| 11057 | __builtin_ve_vl_vfnmsbd_vvsvvl | ||
| 11058 | .param_str = "V256dV256ddV256dV256dUi" | ||
| 11059 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11060 | |||
| 11061 | __builtin_ve_vl_vfnmsbd_vvvvl | ||
| 11062 | .param_str = "V256dV256dV256dV256dUi" | ||
| 11063 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11064 | |||
| 11065 | __builtin_ve_vl_vfnmsbd_vvvvmvl | ||
| 11066 | .param_str = "V256dV256dV256dV256dV256bV256dUi" | ||
| 11067 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11068 | |||
| 11069 | __builtin_ve_vl_vfnmsbd_vvvvvl | ||
| 11070 | .param_str = "V256dV256dV256dV256dV256dUi" | ||
| 11071 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11072 | |||
| 11073 | __builtin_ve_vl_vfnmsbs_vsvvl | ||
| 11074 | .param_str = "V256dfV256dV256dUi" | ||
| 11075 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11076 | |||
| 11077 | __builtin_ve_vl_vfnmsbs_vsvvmvl | ||
| 11078 | .param_str = "V256dfV256dV256dV256bV256dUi" | ||
| 11079 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11080 | |||
| 11081 | __builtin_ve_vl_vfnmsbs_vsvvvl | ||
| 11082 | .param_str = "V256dfV256dV256dV256dUi" | ||
| 11083 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11084 | |||
| 11085 | __builtin_ve_vl_vfnmsbs_vvsvl | ||
| 11086 | .param_str = "V256dV256dfV256dUi" | ||
| 11087 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11088 | |||
| 11089 | __builtin_ve_vl_vfnmsbs_vvsvmvl | ||
| 11090 | .param_str = "V256dV256dfV256dV256bV256dUi" | ||
| 11091 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11092 | |||
| 11093 | __builtin_ve_vl_vfnmsbs_vvsvvl | ||
| 11094 | .param_str = "V256dV256dfV256dV256dUi" | ||
| 11095 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11096 | |||
| 11097 | __builtin_ve_vl_vfnmsbs_vvvvl | ||
| 11098 | .param_str = "V256dV256dV256dV256dUi" | ||
| 11099 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11100 | |||
| 11101 | __builtin_ve_vl_vfnmsbs_vvvvmvl | ||
| 11102 | .param_str = "V256dV256dV256dV256dV256bV256dUi" | ||
| 11103 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11104 | |||
| 11105 | __builtin_ve_vl_vfnmsbs_vvvvvl | ||
| 11106 | .param_str = "V256dV256dV256dV256dV256dUi" | ||
| 11107 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11108 | |||
| 11109 | __builtin_ve_vl_vfrmaxdfst_vvl | ||
| 11110 | .param_str = "V256dV256dUi" | ||
| 11111 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11112 | |||
| 11113 | __builtin_ve_vl_vfrmaxdfst_vvvl | ||
| 11114 | .param_str = "V256dV256dV256dUi" | ||
| 11115 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11116 | |||
| 11117 | __builtin_ve_vl_vfrmaxdlst_vvl | ||
| 11118 | .param_str = "V256dV256dUi" | ||
| 11119 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11120 | |||
| 11121 | __builtin_ve_vl_vfrmaxdlst_vvvl | ||
| 11122 | .param_str = "V256dV256dV256dUi" | ||
| 11123 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11124 | |||
| 11125 | __builtin_ve_vl_vfrmaxsfst_vvl | ||
| 11126 | .param_str = "V256dV256dUi" | ||
| 11127 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11128 | |||
| 11129 | __builtin_ve_vl_vfrmaxsfst_vvvl | ||
| 11130 | .param_str = "V256dV256dV256dUi" | ||
| 11131 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11132 | |||
| 11133 | __builtin_ve_vl_vfrmaxslst_vvl | ||
| 11134 | .param_str = "V256dV256dUi" | ||
| 11135 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11136 | |||
| 11137 | __builtin_ve_vl_vfrmaxslst_vvvl | ||
| 11138 | .param_str = "V256dV256dV256dUi" | ||
| 11139 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11140 | |||
| 11141 | __builtin_ve_vl_vfrmindfst_vvl | ||
| 11142 | .param_str = "V256dV256dUi" | ||
| 11143 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11144 | |||
| 11145 | __builtin_ve_vl_vfrmindfst_vvvl | ||
| 11146 | .param_str = "V256dV256dV256dUi" | ||
| 11147 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11148 | |||
| 11149 | __builtin_ve_vl_vfrmindlst_vvl | ||
| 11150 | .param_str = "V256dV256dUi" | ||
| 11151 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11152 | |||
| 11153 | __builtin_ve_vl_vfrmindlst_vvvl | ||
| 11154 | .param_str = "V256dV256dV256dUi" | ||
| 11155 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11156 | |||
| 11157 | __builtin_ve_vl_vfrminsfst_vvl | ||
| 11158 | .param_str = "V256dV256dUi" | ||
| 11159 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11160 | |||
| 11161 | __builtin_ve_vl_vfrminsfst_vvvl | ||
| 11162 | .param_str = "V256dV256dV256dUi" | ||
| 11163 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11164 | |||
| 11165 | __builtin_ve_vl_vfrminslst_vvl | ||
| 11166 | .param_str = "V256dV256dUi" | ||
| 11167 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11168 | |||
| 11169 | __builtin_ve_vl_vfrminslst_vvvl | ||
| 11170 | .param_str = "V256dV256dV256dUi" | ||
| 11171 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11172 | |||
| 11173 | __builtin_ve_vl_vfsqrtd_vvl | ||
| 11174 | .param_str = "V256dV256dUi" | ||
| 11175 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11176 | |||
| 11177 | __builtin_ve_vl_vfsqrtd_vvvl | ||
| 11178 | .param_str = "V256dV256dV256dUi" | ||
| 11179 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11180 | |||
| 11181 | __builtin_ve_vl_vfsqrts_vvl | ||
| 11182 | .param_str = "V256dV256dUi" | ||
| 11183 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11184 | |||
| 11185 | __builtin_ve_vl_vfsqrts_vvvl | ||
| 11186 | .param_str = "V256dV256dV256dUi" | ||
| 11187 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11188 | |||
| 11189 | __builtin_ve_vl_vfsubd_vsvl | ||
| 11190 | .param_str = "V256ddV256dUi" | ||
| 11191 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11192 | |||
| 11193 | __builtin_ve_vl_vfsubd_vsvmvl | ||
| 11194 | .param_str = "V256ddV256dV256bV256dUi" | ||
| 11195 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11196 | |||
| 11197 | __builtin_ve_vl_vfsubd_vsvvl | ||
| 11198 | .param_str = "V256ddV256dV256dUi" | ||
| 11199 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11200 | |||
| 11201 | __builtin_ve_vl_vfsubd_vvvl | ||
| 11202 | .param_str = "V256dV256dV256dUi" | ||
| 11203 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11204 | |||
| 11205 | __builtin_ve_vl_vfsubd_vvvmvl | ||
| 11206 | .param_str = "V256dV256dV256dV256bV256dUi" | ||
| 11207 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11208 | |||
| 11209 | __builtin_ve_vl_vfsubd_vvvvl | ||
| 11210 | .param_str = "V256dV256dV256dV256dUi" | ||
| 11211 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11212 | |||
| 11213 | __builtin_ve_vl_vfsubs_vsvl | ||
| 11214 | .param_str = "V256dfV256dUi" | ||
| 11215 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11216 | |||
| 11217 | __builtin_ve_vl_vfsubs_vsvmvl | ||
| 11218 | .param_str = "V256dfV256dV256bV256dUi" | ||
| 11219 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11220 | |||
| 11221 | __builtin_ve_vl_vfsubs_vsvvl | ||
| 11222 | .param_str = "V256dfV256dV256dUi" | ||
| 11223 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11224 | |||
| 11225 | __builtin_ve_vl_vfsubs_vvvl | ||
| 11226 | .param_str = "V256dV256dV256dUi" | ||
| 11227 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11228 | |||
| 11229 | __builtin_ve_vl_vfsubs_vvvmvl | ||
| 11230 | .param_str = "V256dV256dV256dV256bV256dUi" | ||
| 11231 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11232 | |||
| 11233 | __builtin_ve_vl_vfsubs_vvvvl | ||
| 11234 | .param_str = "V256dV256dV256dV256dUi" | ||
| 11235 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11236 | |||
| 11237 | __builtin_ve_vl_vfsumd_vvl | ||
| 11238 | .param_str = "V256dV256dUi" | ||
| 11239 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11240 | |||
| 11241 | __builtin_ve_vl_vfsumd_vvml | ||
| 11242 | .param_str = "V256dV256dV256bUi" | ||
| 11243 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11244 | |||
| 11245 | __builtin_ve_vl_vfsums_vvl | ||
| 11246 | .param_str = "V256dV256dUi" | ||
| 11247 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11248 | |||
| 11249 | __builtin_ve_vl_vfsums_vvml | ||
| 11250 | .param_str = "V256dV256dV256bUi" | ||
| 11251 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11252 | |||
| 11253 | __builtin_ve_vl_vgt_vvssl | ||
| 11254 | .param_str = "V256dV256dLUiLUiUi" | ||
| 11255 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11256 | |||
| 11257 | __builtin_ve_vl_vgt_vvssml | ||
| 11258 | .param_str = "V256dV256dLUiLUiV256bUi" | ||
| 11259 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11260 | |||
| 11261 | __builtin_ve_vl_vgt_vvssmvl | ||
| 11262 | .param_str = "V256dV256dLUiLUiV256bV256dUi" | ||
| 11263 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11264 | |||
| 11265 | __builtin_ve_vl_vgt_vvssvl | ||
| 11266 | .param_str = "V256dV256dLUiLUiV256dUi" | ||
| 11267 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11268 | |||
| 11269 | __builtin_ve_vl_vgtlsx_vvssl | ||
| 11270 | .param_str = "V256dV256dLUiLUiUi" | ||
| 11271 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11272 | |||
| 11273 | __builtin_ve_vl_vgtlsx_vvssml | ||
| 11274 | .param_str = "V256dV256dLUiLUiV256bUi" | ||
| 11275 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11276 | |||
| 11277 | __builtin_ve_vl_vgtlsx_vvssmvl | ||
| 11278 | .param_str = "V256dV256dLUiLUiV256bV256dUi" | ||
| 11279 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11280 | |||
| 11281 | __builtin_ve_vl_vgtlsx_vvssvl | ||
| 11282 | .param_str = "V256dV256dLUiLUiV256dUi" | ||
| 11283 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11284 | |||
| 11285 | __builtin_ve_vl_vgtlsxnc_vvssl | ||
| 11286 | .param_str = "V256dV256dLUiLUiUi" | ||
| 11287 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11288 | |||
| 11289 | __builtin_ve_vl_vgtlsxnc_vvssml | ||
| 11290 | .param_str = "V256dV256dLUiLUiV256bUi" | ||
| 11291 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11292 | |||
| 11293 | __builtin_ve_vl_vgtlsxnc_vvssmvl | ||
| 11294 | .param_str = "V256dV256dLUiLUiV256bV256dUi" | ||
| 11295 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11296 | |||
| 11297 | __builtin_ve_vl_vgtlsxnc_vvssvl | ||
| 11298 | .param_str = "V256dV256dLUiLUiV256dUi" | ||
| 11299 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11300 | |||
| 11301 | __builtin_ve_vl_vgtlzx_vvssl | ||
| 11302 | .param_str = "V256dV256dLUiLUiUi" | ||
| 11303 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11304 | |||
| 11305 | __builtin_ve_vl_vgtlzx_vvssml | ||
| 11306 | .param_str = "V256dV256dLUiLUiV256bUi" | ||
| 11307 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11308 | |||
| 11309 | __builtin_ve_vl_vgtlzx_vvssmvl | ||
| 11310 | .param_str = "V256dV256dLUiLUiV256bV256dUi" | ||
| 11311 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11312 | |||
| 11313 | __builtin_ve_vl_vgtlzx_vvssvl | ||
| 11314 | .param_str = "V256dV256dLUiLUiV256dUi" | ||
| 11315 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11316 | |||
| 11317 | __builtin_ve_vl_vgtlzxnc_vvssl | ||
| 11318 | .param_str = "V256dV256dLUiLUiUi" | ||
| 11319 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11320 | |||
| 11321 | __builtin_ve_vl_vgtlzxnc_vvssml | ||
| 11322 | .param_str = "V256dV256dLUiLUiV256bUi" | ||
| 11323 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11324 | |||
| 11325 | __builtin_ve_vl_vgtlzxnc_vvssmvl | ||
| 11326 | .param_str = "V256dV256dLUiLUiV256bV256dUi" | ||
| 11327 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11328 | |||
| 11329 | __builtin_ve_vl_vgtlzxnc_vvssvl | ||
| 11330 | .param_str = "V256dV256dLUiLUiV256dUi" | ||
| 11331 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11332 | |||
| 11333 | __builtin_ve_vl_vgtnc_vvssl | ||
| 11334 | .param_str = "V256dV256dLUiLUiUi" | ||
| 11335 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11336 | |||
| 11337 | __builtin_ve_vl_vgtnc_vvssml | ||
| 11338 | .param_str = "V256dV256dLUiLUiV256bUi" | ||
| 11339 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11340 | |||
| 11341 | __builtin_ve_vl_vgtnc_vvssmvl | ||
| 11342 | .param_str = "V256dV256dLUiLUiV256bV256dUi" | ||
| 11343 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11344 | |||
| 11345 | __builtin_ve_vl_vgtnc_vvssvl | ||
| 11346 | .param_str = "V256dV256dLUiLUiV256dUi" | ||
| 11347 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11348 | |||
| 11349 | __builtin_ve_vl_vgtu_vvssl | ||
| 11350 | .param_str = "V256dV256dLUiLUiUi" | ||
| 11351 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11352 | |||
| 11353 | __builtin_ve_vl_vgtu_vvssml | ||
| 11354 | .param_str = "V256dV256dLUiLUiV256bUi" | ||
| 11355 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11356 | |||
| 11357 | __builtin_ve_vl_vgtu_vvssmvl | ||
| 11358 | .param_str = "V256dV256dLUiLUiV256bV256dUi" | ||
| 11359 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11360 | |||
| 11361 | __builtin_ve_vl_vgtu_vvssvl | ||
| 11362 | .param_str = "V256dV256dLUiLUiV256dUi" | ||
| 11363 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11364 | |||
| 11365 | __builtin_ve_vl_vgtunc_vvssl | ||
| 11366 | .param_str = "V256dV256dLUiLUiUi" | ||
| 11367 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11368 | |||
| 11369 | __builtin_ve_vl_vgtunc_vvssml | ||
| 11370 | .param_str = "V256dV256dLUiLUiV256bUi" | ||
| 11371 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11372 | |||
| 11373 | __builtin_ve_vl_vgtunc_vvssmvl | ||
| 11374 | .param_str = "V256dV256dLUiLUiV256bV256dUi" | ||
| 11375 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11376 | |||
| 11377 | __builtin_ve_vl_vgtunc_vvssvl | ||
| 11378 | .param_str = "V256dV256dLUiLUiV256dUi" | ||
| 11379 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11380 | |||
| 11381 | __builtin_ve_vl_vld2d_vssl | ||
| 11382 | .param_str = "V256dLUivC*Ui" | ||
| 11383 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11384 | |||
| 11385 | __builtin_ve_vl_vld2d_vssvl | ||
| 11386 | .param_str = "V256dLUivC*V256dUi" | ||
| 11387 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11388 | |||
| 11389 | __builtin_ve_vl_vld2dnc_vssl | ||
| 11390 | .param_str = "V256dLUivC*Ui" | ||
| 11391 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11392 | |||
| 11393 | __builtin_ve_vl_vld2dnc_vssvl | ||
| 11394 | .param_str = "V256dLUivC*V256dUi" | ||
| 11395 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11396 | |||
| 11397 | __builtin_ve_vl_vld_vssl | ||
| 11398 | .param_str = "V256dLUivC*Ui" | ||
| 11399 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11400 | |||
| 11401 | __builtin_ve_vl_vld_vssvl | ||
| 11402 | .param_str = "V256dLUivC*V256dUi" | ||
| 11403 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11404 | |||
| 11405 | __builtin_ve_vl_vldl2dsx_vssl | ||
| 11406 | .param_str = "V256dLUivC*Ui" | ||
| 11407 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11408 | |||
| 11409 | __builtin_ve_vl_vldl2dsx_vssvl | ||
| 11410 | .param_str = "V256dLUivC*V256dUi" | ||
| 11411 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11412 | |||
| 11413 | __builtin_ve_vl_vldl2dsxnc_vssl | ||
| 11414 | .param_str = "V256dLUivC*Ui" | ||
| 11415 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11416 | |||
| 11417 | __builtin_ve_vl_vldl2dsxnc_vssvl | ||
| 11418 | .param_str = "V256dLUivC*V256dUi" | ||
| 11419 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11420 | |||
| 11421 | __builtin_ve_vl_vldl2dzx_vssl | ||
| 11422 | .param_str = "V256dLUivC*Ui" | ||
| 11423 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11424 | |||
| 11425 | __builtin_ve_vl_vldl2dzx_vssvl | ||
| 11426 | .param_str = "V256dLUivC*V256dUi" | ||
| 11427 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11428 | |||
| 11429 | __builtin_ve_vl_vldl2dzxnc_vssl | ||
| 11430 | .param_str = "V256dLUivC*Ui" | ||
| 11431 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11432 | |||
| 11433 | __builtin_ve_vl_vldl2dzxnc_vssvl | ||
| 11434 | .param_str = "V256dLUivC*V256dUi" | ||
| 11435 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11436 | |||
| 11437 | __builtin_ve_vl_vldlsx_vssl | ||
| 11438 | .param_str = "V256dLUivC*Ui" | ||
| 11439 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11440 | |||
| 11441 | __builtin_ve_vl_vldlsx_vssvl | ||
| 11442 | .param_str = "V256dLUivC*V256dUi" | ||
| 11443 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11444 | |||
| 11445 | __builtin_ve_vl_vldlsxnc_vssl | ||
| 11446 | .param_str = "V256dLUivC*Ui" | ||
| 11447 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11448 | |||
| 11449 | __builtin_ve_vl_vldlsxnc_vssvl | ||
| 11450 | .param_str = "V256dLUivC*V256dUi" | ||
| 11451 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11452 | |||
| 11453 | __builtin_ve_vl_vldlzx_vssl | ||
| 11454 | .param_str = "V256dLUivC*Ui" | ||
| 11455 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11456 | |||
| 11457 | __builtin_ve_vl_vldlzx_vssvl | ||
| 11458 | .param_str = "V256dLUivC*V256dUi" | ||
| 11459 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11460 | |||
| 11461 | __builtin_ve_vl_vldlzxnc_vssl | ||
| 11462 | .param_str = "V256dLUivC*Ui" | ||
| 11463 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11464 | |||
| 11465 | __builtin_ve_vl_vldlzxnc_vssvl | ||
| 11466 | .param_str = "V256dLUivC*V256dUi" | ||
| 11467 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11468 | |||
| 11469 | __builtin_ve_vl_vldnc_vssl | ||
| 11470 | .param_str = "V256dLUivC*Ui" | ||
| 11471 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11472 | |||
| 11473 | __builtin_ve_vl_vldnc_vssvl | ||
| 11474 | .param_str = "V256dLUivC*V256dUi" | ||
| 11475 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11476 | |||
| 11477 | __builtin_ve_vl_vldu2d_vssl | ||
| 11478 | .param_str = "V256dLUivC*Ui" | ||
| 11479 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11480 | |||
| 11481 | __builtin_ve_vl_vldu2d_vssvl | ||
| 11482 | .param_str = "V256dLUivC*V256dUi" | ||
| 11483 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11484 | |||
| 11485 | __builtin_ve_vl_vldu2dnc_vssl | ||
| 11486 | .param_str = "V256dLUivC*Ui" | ||
| 11487 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11488 | |||
| 11489 | __builtin_ve_vl_vldu2dnc_vssvl | ||
| 11490 | .param_str = "V256dLUivC*V256dUi" | ||
| 11491 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11492 | |||
| 11493 | __builtin_ve_vl_vldu_vssl | ||
| 11494 | .param_str = "V256dLUivC*Ui" | ||
| 11495 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11496 | |||
| 11497 | __builtin_ve_vl_vldu_vssvl | ||
| 11498 | .param_str = "V256dLUivC*V256dUi" | ||
| 11499 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11500 | |||
| 11501 | __builtin_ve_vl_vldunc_vssl | ||
| 11502 | .param_str = "V256dLUivC*Ui" | ||
| 11503 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11504 | |||
| 11505 | __builtin_ve_vl_vldunc_vssvl | ||
| 11506 | .param_str = "V256dLUivC*V256dUi" | ||
| 11507 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11508 | |||
| 11509 | __builtin_ve_vl_vldz_vvl | ||
| 11510 | .param_str = "V256dV256dUi" | ||
| 11511 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11512 | |||
| 11513 | __builtin_ve_vl_vldz_vvmvl | ||
| 11514 | .param_str = "V256dV256dV256bV256dUi" | ||
| 11515 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11516 | |||
| 11517 | __builtin_ve_vl_vldz_vvvl | ||
| 11518 | .param_str = "V256dV256dV256dUi" | ||
| 11519 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11520 | |||
| 11521 | __builtin_ve_vl_vmaxsl_vsvl | ||
| 11522 | .param_str = "V256dLiV256dUi" | ||
| 11523 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11524 | |||
| 11525 | __builtin_ve_vl_vmaxsl_vsvmvl | ||
| 11526 | .param_str = "V256dLiV256dV256bV256dUi" | ||
| 11527 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11528 | |||
| 11529 | __builtin_ve_vl_vmaxsl_vsvvl | ||
| 11530 | .param_str = "V256dLiV256dV256dUi" | ||
| 11531 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11532 | |||
| 11533 | __builtin_ve_vl_vmaxsl_vvvl | ||
| 11534 | .param_str = "V256dV256dV256dUi" | ||
| 11535 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11536 | |||
| 11537 | __builtin_ve_vl_vmaxsl_vvvmvl | ||
| 11538 | .param_str = "V256dV256dV256dV256bV256dUi" | ||
| 11539 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11540 | |||
| 11541 | __builtin_ve_vl_vmaxsl_vvvvl | ||
| 11542 | .param_str = "V256dV256dV256dV256dUi" | ||
| 11543 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11544 | |||
| 11545 | __builtin_ve_vl_vmaxswsx_vsvl | ||
| 11546 | .param_str = "V256diV256dUi" | ||
| 11547 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11548 | |||
| 11549 | __builtin_ve_vl_vmaxswsx_vsvmvl | ||
| 11550 | .param_str = "V256diV256dV256bV256dUi" | ||
| 11551 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11552 | |||
| 11553 | __builtin_ve_vl_vmaxswsx_vsvvl | ||
| 11554 | .param_str = "V256diV256dV256dUi" | ||
| 11555 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11556 | |||
| 11557 | __builtin_ve_vl_vmaxswsx_vvvl | ||
| 11558 | .param_str = "V256dV256dV256dUi" | ||
| 11559 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11560 | |||
| 11561 | __builtin_ve_vl_vmaxswsx_vvvmvl | ||
| 11562 | .param_str = "V256dV256dV256dV256bV256dUi" | ||
| 11563 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11564 | |||
| 11565 | __builtin_ve_vl_vmaxswsx_vvvvl | ||
| 11566 | .param_str = "V256dV256dV256dV256dUi" | ||
| 11567 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11568 | |||
| 11569 | __builtin_ve_vl_vmaxswzx_vsvl | ||
| 11570 | .param_str = "V256diV256dUi" | ||
| 11571 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11572 | |||
| 11573 | __builtin_ve_vl_vmaxswzx_vsvmvl | ||
| 11574 | .param_str = "V256diV256dV256bV256dUi" | ||
| 11575 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11576 | |||
| 11577 | __builtin_ve_vl_vmaxswzx_vsvvl | ||
| 11578 | .param_str = "V256diV256dV256dUi" | ||
| 11579 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11580 | |||
| 11581 | __builtin_ve_vl_vmaxswzx_vvvl | ||
| 11582 | .param_str = "V256dV256dV256dUi" | ||
| 11583 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11584 | |||
| 11585 | __builtin_ve_vl_vmaxswzx_vvvmvl | ||
| 11586 | .param_str = "V256dV256dV256dV256bV256dUi" | ||
| 11587 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11588 | |||
| 11589 | __builtin_ve_vl_vmaxswzx_vvvvl | ||
| 11590 | .param_str = "V256dV256dV256dV256dUi" | ||
| 11591 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11592 | |||
| 11593 | __builtin_ve_vl_vminsl_vsvl | ||
| 11594 | .param_str = "V256dLiV256dUi" | ||
| 11595 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11596 | |||
| 11597 | __builtin_ve_vl_vminsl_vsvmvl | ||
| 11598 | .param_str = "V256dLiV256dV256bV256dUi" | ||
| 11599 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11600 | |||
| 11601 | __builtin_ve_vl_vminsl_vsvvl | ||
| 11602 | .param_str = "V256dLiV256dV256dUi" | ||
| 11603 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11604 | |||
| 11605 | __builtin_ve_vl_vminsl_vvvl | ||
| 11606 | .param_str = "V256dV256dV256dUi" | ||
| 11607 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11608 | |||
| 11609 | __builtin_ve_vl_vminsl_vvvmvl | ||
| 11610 | .param_str = "V256dV256dV256dV256bV256dUi" | ||
| 11611 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11612 | |||
| 11613 | __builtin_ve_vl_vminsl_vvvvl | ||
| 11614 | .param_str = "V256dV256dV256dV256dUi" | ||
| 11615 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11616 | |||
| 11617 | __builtin_ve_vl_vminswsx_vsvl | ||
| 11618 | .param_str = "V256diV256dUi" | ||
| 11619 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11620 | |||
| 11621 | __builtin_ve_vl_vminswsx_vsvmvl | ||
| 11622 | .param_str = "V256diV256dV256bV256dUi" | ||
| 11623 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11624 | |||
| 11625 | __builtin_ve_vl_vminswsx_vsvvl | ||
| 11626 | .param_str = "V256diV256dV256dUi" | ||
| 11627 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11628 | |||
| 11629 | __builtin_ve_vl_vminswsx_vvvl | ||
| 11630 | .param_str = "V256dV256dV256dUi" | ||
| 11631 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11632 | |||
| 11633 | __builtin_ve_vl_vminswsx_vvvmvl | ||
| 11634 | .param_str = "V256dV256dV256dV256bV256dUi" | ||
| 11635 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11636 | |||
| 11637 | __builtin_ve_vl_vminswsx_vvvvl | ||
| 11638 | .param_str = "V256dV256dV256dV256dUi" | ||
| 11639 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11640 | |||
| 11641 | __builtin_ve_vl_vminswzx_vsvl | ||
| 11642 | .param_str = "V256diV256dUi" | ||
| 11643 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11644 | |||
| 11645 | __builtin_ve_vl_vminswzx_vsvmvl | ||
| 11646 | .param_str = "V256diV256dV256bV256dUi" | ||
| 11647 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11648 | |||
| 11649 | __builtin_ve_vl_vminswzx_vsvvl | ||
| 11650 | .param_str = "V256diV256dV256dUi" | ||
| 11651 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11652 | |||
| 11653 | __builtin_ve_vl_vminswzx_vvvl | ||
| 11654 | .param_str = "V256dV256dV256dUi" | ||
| 11655 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11656 | |||
| 11657 | __builtin_ve_vl_vminswzx_vvvmvl | ||
| 11658 | .param_str = "V256dV256dV256dV256bV256dUi" | ||
| 11659 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11660 | |||
| 11661 | __builtin_ve_vl_vminswzx_vvvvl | ||
| 11662 | .param_str = "V256dV256dV256dV256dUi" | ||
| 11663 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11664 | |||
| 11665 | __builtin_ve_vl_vmrg_vsvml | ||
| 11666 | .param_str = "V256dLUiV256dV256bUi" | ||
| 11667 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11668 | |||
| 11669 | __builtin_ve_vl_vmrg_vsvmvl | ||
| 11670 | .param_str = "V256dLUiV256dV256bV256dUi" | ||
| 11671 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11672 | |||
| 11673 | __builtin_ve_vl_vmrg_vvvml | ||
| 11674 | .param_str = "V256dV256dV256dV256bUi" | ||
| 11675 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11676 | |||
| 11677 | __builtin_ve_vl_vmrg_vvvmvl | ||
| 11678 | .param_str = "V256dV256dV256dV256bV256dUi" | ||
| 11679 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11680 | |||
| 11681 | __builtin_ve_vl_vmrgw_vsvMl | ||
| 11682 | .param_str = "V256dUiV256dV512bUi" | ||
| 11683 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11684 | |||
| 11685 | __builtin_ve_vl_vmrgw_vsvMvl | ||
| 11686 | .param_str = "V256dUiV256dV512bV256dUi" | ||
| 11687 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11688 | |||
| 11689 | __builtin_ve_vl_vmrgw_vvvMl | ||
| 11690 | .param_str = "V256dV256dV256dV512bUi" | ||
| 11691 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11692 | |||
| 11693 | __builtin_ve_vl_vmrgw_vvvMvl | ||
| 11694 | .param_str = "V256dV256dV256dV512bV256dUi" | ||
| 11695 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11696 | |||
| 11697 | __builtin_ve_vl_vmulsl_vsvl | ||
| 11698 | .param_str = "V256dLiV256dUi" | ||
| 11699 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11700 | |||
| 11701 | __builtin_ve_vl_vmulsl_vsvmvl | ||
| 11702 | .param_str = "V256dLiV256dV256bV256dUi" | ||
| 11703 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11704 | |||
| 11705 | __builtin_ve_vl_vmulsl_vsvvl | ||
| 11706 | .param_str = "V256dLiV256dV256dUi" | ||
| 11707 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11708 | |||
| 11709 | __builtin_ve_vl_vmulsl_vvvl | ||
| 11710 | .param_str = "V256dV256dV256dUi" | ||
| 11711 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11712 | |||
| 11713 | __builtin_ve_vl_vmulsl_vvvmvl | ||
| 11714 | .param_str = "V256dV256dV256dV256bV256dUi" | ||
| 11715 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11716 | |||
| 11717 | __builtin_ve_vl_vmulsl_vvvvl | ||
| 11718 | .param_str = "V256dV256dV256dV256dUi" | ||
| 11719 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11720 | |||
| 11721 | __builtin_ve_vl_vmulslw_vsvl | ||
| 11722 | .param_str = "V256diV256dUi" | ||
| 11723 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11724 | |||
| 11725 | __builtin_ve_vl_vmulslw_vsvvl | ||
| 11726 | .param_str = "V256diV256dV256dUi" | ||
| 11727 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11728 | |||
| 11729 | __builtin_ve_vl_vmulslw_vvvl | ||
| 11730 | .param_str = "V256dV256dV256dUi" | ||
| 11731 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11732 | |||
| 11733 | __builtin_ve_vl_vmulslw_vvvvl | ||
| 11734 | .param_str = "V256dV256dV256dV256dUi" | ||
| 11735 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11736 | |||
| 11737 | __builtin_ve_vl_vmulswsx_vsvl | ||
| 11738 | .param_str = "V256diV256dUi" | ||
| 11739 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11740 | |||
| 11741 | __builtin_ve_vl_vmulswsx_vsvmvl | ||
| 11742 | .param_str = "V256diV256dV256bV256dUi" | ||
| 11743 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11744 | |||
| 11745 | __builtin_ve_vl_vmulswsx_vsvvl | ||
| 11746 | .param_str = "V256diV256dV256dUi" | ||
| 11747 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11748 | |||
| 11749 | __builtin_ve_vl_vmulswsx_vvvl | ||
| 11750 | .param_str = "V256dV256dV256dUi" | ||
| 11751 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11752 | |||
| 11753 | __builtin_ve_vl_vmulswsx_vvvmvl | ||
| 11754 | .param_str = "V256dV256dV256dV256bV256dUi" | ||
| 11755 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11756 | |||
| 11757 | __builtin_ve_vl_vmulswsx_vvvvl | ||
| 11758 | .param_str = "V256dV256dV256dV256dUi" | ||
| 11759 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11760 | |||
| 11761 | __builtin_ve_vl_vmulswzx_vsvl | ||
| 11762 | .param_str = "V256diV256dUi" | ||
| 11763 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11764 | |||
| 11765 | __builtin_ve_vl_vmulswzx_vsvmvl | ||
| 11766 | .param_str = "V256diV256dV256bV256dUi" | ||
| 11767 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11768 | |||
| 11769 | __builtin_ve_vl_vmulswzx_vsvvl | ||
| 11770 | .param_str = "V256diV256dV256dUi" | ||
| 11771 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11772 | |||
| 11773 | __builtin_ve_vl_vmulswzx_vvvl | ||
| 11774 | .param_str = "V256dV256dV256dUi" | ||
| 11775 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11776 | |||
| 11777 | __builtin_ve_vl_vmulswzx_vvvmvl | ||
| 11778 | .param_str = "V256dV256dV256dV256bV256dUi" | ||
| 11779 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11780 | |||
| 11781 | __builtin_ve_vl_vmulswzx_vvvvl | ||
| 11782 | .param_str = "V256dV256dV256dV256dUi" | ||
| 11783 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11784 | |||
| 11785 | __builtin_ve_vl_vmulul_vsvl | ||
| 11786 | .param_str = "V256dLUiV256dUi" | ||
| 11787 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11788 | |||
| 11789 | __builtin_ve_vl_vmulul_vsvmvl | ||
| 11790 | .param_str = "V256dLUiV256dV256bV256dUi" | ||
| 11791 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11792 | |||
| 11793 | __builtin_ve_vl_vmulul_vsvvl | ||
| 11794 | .param_str = "V256dLUiV256dV256dUi" | ||
| 11795 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11796 | |||
| 11797 | __builtin_ve_vl_vmulul_vvvl | ||
| 11798 | .param_str = "V256dV256dV256dUi" | ||
| 11799 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11800 | |||
| 11801 | __builtin_ve_vl_vmulul_vvvmvl | ||
| 11802 | .param_str = "V256dV256dV256dV256bV256dUi" | ||
| 11803 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11804 | |||
| 11805 | __builtin_ve_vl_vmulul_vvvvl | ||
| 11806 | .param_str = "V256dV256dV256dV256dUi" | ||
| 11807 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11808 | |||
| 11809 | __builtin_ve_vl_vmuluw_vsvl | ||
| 11810 | .param_str = "V256dUiV256dUi" | ||
| 11811 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11812 | |||
| 11813 | __builtin_ve_vl_vmuluw_vsvmvl | ||
| 11814 | .param_str = "V256dUiV256dV256bV256dUi" | ||
| 11815 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11816 | |||
| 11817 | __builtin_ve_vl_vmuluw_vsvvl | ||
| 11818 | .param_str = "V256dUiV256dV256dUi" | ||
| 11819 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11820 | |||
| 11821 | __builtin_ve_vl_vmuluw_vvvl | ||
| 11822 | .param_str = "V256dV256dV256dUi" | ||
| 11823 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11824 | |||
| 11825 | __builtin_ve_vl_vmuluw_vvvmvl | ||
| 11826 | .param_str = "V256dV256dV256dV256bV256dUi" | ||
| 11827 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11828 | |||
| 11829 | __builtin_ve_vl_vmuluw_vvvvl | ||
| 11830 | .param_str = "V256dV256dV256dV256dUi" | ||
| 11831 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11832 | |||
| 11833 | __builtin_ve_vl_vmv_vsvl | ||
| 11834 | .param_str = "V256dUiV256dUi" | ||
| 11835 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11836 | |||
| 11837 | __builtin_ve_vl_vmv_vsvmvl | ||
| 11838 | .param_str = "V256dUiV256dV256bV256dUi" | ||
| 11839 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11840 | |||
| 11841 | __builtin_ve_vl_vmv_vsvvl | ||
| 11842 | .param_str = "V256dUiV256dV256dUi" | ||
| 11843 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11844 | |||
| 11845 | __builtin_ve_vl_vor_vsvl | ||
| 11846 | .param_str = "V256dLUiV256dUi" | ||
| 11847 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11848 | |||
| 11849 | __builtin_ve_vl_vor_vsvmvl | ||
| 11850 | .param_str = "V256dLUiV256dV256bV256dUi" | ||
| 11851 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11852 | |||
| 11853 | __builtin_ve_vl_vor_vsvvl | ||
| 11854 | .param_str = "V256dLUiV256dV256dUi" | ||
| 11855 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11856 | |||
| 11857 | __builtin_ve_vl_vor_vvvl | ||
| 11858 | .param_str = "V256dV256dV256dUi" | ||
| 11859 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11860 | |||
| 11861 | __builtin_ve_vl_vor_vvvmvl | ||
| 11862 | .param_str = "V256dV256dV256dV256bV256dUi" | ||
| 11863 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11864 | |||
| 11865 | __builtin_ve_vl_vor_vvvvl | ||
| 11866 | .param_str = "V256dV256dV256dV256dUi" | ||
| 11867 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11868 | |||
| 11869 | __builtin_ve_vl_vpcnt_vvl | ||
| 11870 | .param_str = "V256dV256dUi" | ||
| 11871 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11872 | |||
| 11873 | __builtin_ve_vl_vpcnt_vvmvl | ||
| 11874 | .param_str = "V256dV256dV256bV256dUi" | ||
| 11875 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11876 | |||
| 11877 | __builtin_ve_vl_vpcnt_vvvl | ||
| 11878 | .param_str = "V256dV256dV256dUi" | ||
| 11879 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11880 | |||
| 11881 | __builtin_ve_vl_vrand_vvl | ||
| 11882 | .param_str = "V256dV256dUi" | ||
| 11883 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11884 | |||
| 11885 | __builtin_ve_vl_vrand_vvml | ||
| 11886 | .param_str = "V256dV256dV256bUi" | ||
| 11887 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11888 | |||
| 11889 | __builtin_ve_vl_vrcpd_vvl | ||
| 11890 | .param_str = "V256dV256dUi" | ||
| 11891 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11892 | |||
| 11893 | __builtin_ve_vl_vrcpd_vvvl | ||
| 11894 | .param_str = "V256dV256dV256dUi" | ||
| 11895 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11896 | |||
| 11897 | __builtin_ve_vl_vrcps_vvl | ||
| 11898 | .param_str = "V256dV256dUi" | ||
| 11899 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11900 | |||
| 11901 | __builtin_ve_vl_vrcps_vvvl | ||
| 11902 | .param_str = "V256dV256dV256dUi" | ||
| 11903 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11904 | |||
| 11905 | __builtin_ve_vl_vrmaxslfst_vvl | ||
| 11906 | .param_str = "V256dV256dUi" | ||
| 11907 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11908 | |||
| 11909 | __builtin_ve_vl_vrmaxslfst_vvvl | ||
| 11910 | .param_str = "V256dV256dV256dUi" | ||
| 11911 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11912 | |||
| 11913 | __builtin_ve_vl_vrmaxsllst_vvl | ||
| 11914 | .param_str = "V256dV256dUi" | ||
| 11915 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11916 | |||
| 11917 | __builtin_ve_vl_vrmaxsllst_vvvl | ||
| 11918 | .param_str = "V256dV256dV256dUi" | ||
| 11919 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11920 | |||
| 11921 | __builtin_ve_vl_vrmaxswfstsx_vvl | ||
| 11922 | .param_str = "V256dV256dUi" | ||
| 11923 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11924 | |||
| 11925 | __builtin_ve_vl_vrmaxswfstsx_vvvl | ||
| 11926 | .param_str = "V256dV256dV256dUi" | ||
| 11927 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11928 | |||
| 11929 | __builtin_ve_vl_vrmaxswfstzx_vvl | ||
| 11930 | .param_str = "V256dV256dUi" | ||
| 11931 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11932 | |||
| 11933 | __builtin_ve_vl_vrmaxswfstzx_vvvl | ||
| 11934 | .param_str = "V256dV256dV256dUi" | ||
| 11935 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11936 | |||
| 11937 | __builtin_ve_vl_vrmaxswlstsx_vvl | ||
| 11938 | .param_str = "V256dV256dUi" | ||
| 11939 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11940 | |||
| 11941 | __builtin_ve_vl_vrmaxswlstsx_vvvl | ||
| 11942 | .param_str = "V256dV256dV256dUi" | ||
| 11943 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11944 | |||
| 11945 | __builtin_ve_vl_vrmaxswlstzx_vvl | ||
| 11946 | .param_str = "V256dV256dUi" | ||
| 11947 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11948 | |||
| 11949 | __builtin_ve_vl_vrmaxswlstzx_vvvl | ||
| 11950 | .param_str = "V256dV256dV256dUi" | ||
| 11951 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11952 | |||
| 11953 | __builtin_ve_vl_vrminslfst_vvl | ||
| 11954 | .param_str = "V256dV256dUi" | ||
| 11955 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11956 | |||
| 11957 | __builtin_ve_vl_vrminslfst_vvvl | ||
| 11958 | .param_str = "V256dV256dV256dUi" | ||
| 11959 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11960 | |||
| 11961 | __builtin_ve_vl_vrminsllst_vvl | ||
| 11962 | .param_str = "V256dV256dUi" | ||
| 11963 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11964 | |||
| 11965 | __builtin_ve_vl_vrminsllst_vvvl | ||
| 11966 | .param_str = "V256dV256dV256dUi" | ||
| 11967 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11968 | |||
| 11969 | __builtin_ve_vl_vrminswfstsx_vvl | ||
| 11970 | .param_str = "V256dV256dUi" | ||
| 11971 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11972 | |||
| 11973 | __builtin_ve_vl_vrminswfstsx_vvvl | ||
| 11974 | .param_str = "V256dV256dV256dUi" | ||
| 11975 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11976 | |||
| 11977 | __builtin_ve_vl_vrminswfstzx_vvl | ||
| 11978 | .param_str = "V256dV256dUi" | ||
| 11979 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11980 | |||
| 11981 | __builtin_ve_vl_vrminswfstzx_vvvl | ||
| 11982 | .param_str = "V256dV256dV256dUi" | ||
| 11983 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11984 | |||
| 11985 | __builtin_ve_vl_vrminswlstsx_vvl | ||
| 11986 | .param_str = "V256dV256dUi" | ||
| 11987 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11988 | |||
| 11989 | __builtin_ve_vl_vrminswlstsx_vvvl | ||
| 11990 | .param_str = "V256dV256dV256dUi" | ||
| 11991 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11992 | |||
| 11993 | __builtin_ve_vl_vrminswlstzx_vvl | ||
| 11994 | .param_str = "V256dV256dUi" | ||
| 11995 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11996 | |||
| 11997 | __builtin_ve_vl_vrminswlstzx_vvvl | ||
| 11998 | .param_str = "V256dV256dV256dUi" | ||
| 11999 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12000 | |||
| 12001 | __builtin_ve_vl_vror_vvl | ||
| 12002 | .param_str = "V256dV256dUi" | ||
| 12003 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12004 | |||
| 12005 | __builtin_ve_vl_vror_vvml | ||
| 12006 | .param_str = "V256dV256dV256bUi" | ||
| 12007 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12008 | |||
| 12009 | __builtin_ve_vl_vrsqrtd_vvl | ||
| 12010 | .param_str = "V256dV256dUi" | ||
| 12011 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12012 | |||
| 12013 | __builtin_ve_vl_vrsqrtd_vvvl | ||
| 12014 | .param_str = "V256dV256dV256dUi" | ||
| 12015 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12016 | |||
| 12017 | __builtin_ve_vl_vrsqrtdnex_vvl | ||
| 12018 | .param_str = "V256dV256dUi" | ||
| 12019 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12020 | |||
| 12021 | __builtin_ve_vl_vrsqrtdnex_vvvl | ||
| 12022 | .param_str = "V256dV256dV256dUi" | ||
| 12023 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12024 | |||
| 12025 | __builtin_ve_vl_vrsqrts_vvl | ||
| 12026 | .param_str = "V256dV256dUi" | ||
| 12027 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12028 | |||
| 12029 | __builtin_ve_vl_vrsqrts_vvvl | ||
| 12030 | .param_str = "V256dV256dV256dUi" | ||
| 12031 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12032 | |||
| 12033 | __builtin_ve_vl_vrsqrtsnex_vvl | ||
| 12034 | .param_str = "V256dV256dUi" | ||
| 12035 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12036 | |||
| 12037 | __builtin_ve_vl_vrsqrtsnex_vvvl | ||
| 12038 | .param_str = "V256dV256dV256dUi" | ||
| 12039 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12040 | |||
| 12041 | __builtin_ve_vl_vrxor_vvl | ||
| 12042 | .param_str = "V256dV256dUi" | ||
| 12043 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12044 | |||
| 12045 | __builtin_ve_vl_vrxor_vvml | ||
| 12046 | .param_str = "V256dV256dV256bUi" | ||
| 12047 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12048 | |||
| 12049 | __builtin_ve_vl_vsc_vvssl | ||
| 12050 | .param_str = "vV256dV256dLUiLUiUi" | ||
| 12051 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12052 | |||
| 12053 | __builtin_ve_vl_vsc_vvssml | ||
| 12054 | .param_str = "vV256dV256dLUiLUiV256bUi" | ||
| 12055 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12056 | |||
| 12057 | __builtin_ve_vl_vscl_vvssl | ||
| 12058 | .param_str = "vV256dV256dLUiLUiUi" | ||
| 12059 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12060 | |||
| 12061 | __builtin_ve_vl_vscl_vvssml | ||
| 12062 | .param_str = "vV256dV256dLUiLUiV256bUi" | ||
| 12063 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12064 | |||
| 12065 | __builtin_ve_vl_vsclnc_vvssl | ||
| 12066 | .param_str = "vV256dV256dLUiLUiUi" | ||
| 12067 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12068 | |||
| 12069 | __builtin_ve_vl_vsclnc_vvssml | ||
| 12070 | .param_str = "vV256dV256dLUiLUiV256bUi" | ||
| 12071 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12072 | |||
| 12073 | __builtin_ve_vl_vsclncot_vvssl | ||
| 12074 | .param_str = "vV256dV256dLUiLUiUi" | ||
| 12075 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12076 | |||
| 12077 | __builtin_ve_vl_vsclncot_vvssml | ||
| 12078 | .param_str = "vV256dV256dLUiLUiV256bUi" | ||
| 12079 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12080 | |||
| 12081 | __builtin_ve_vl_vsclot_vvssl | ||
| 12082 | .param_str = "vV256dV256dLUiLUiUi" | ||
| 12083 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12084 | |||
| 12085 | __builtin_ve_vl_vsclot_vvssml | ||
| 12086 | .param_str = "vV256dV256dLUiLUiV256bUi" | ||
| 12087 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12088 | |||
| 12089 | __builtin_ve_vl_vscnc_vvssl | ||
| 12090 | .param_str = "vV256dV256dLUiLUiUi" | ||
| 12091 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12092 | |||
| 12093 | __builtin_ve_vl_vscnc_vvssml | ||
| 12094 | .param_str = "vV256dV256dLUiLUiV256bUi" | ||
| 12095 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12096 | |||
| 12097 | __builtin_ve_vl_vscncot_vvssl | ||
| 12098 | .param_str = "vV256dV256dLUiLUiUi" | ||
| 12099 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12100 | |||
| 12101 | __builtin_ve_vl_vscncot_vvssml | ||
| 12102 | .param_str = "vV256dV256dLUiLUiV256bUi" | ||
| 12103 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12104 | |||
| 12105 | __builtin_ve_vl_vscot_vvssl | ||
| 12106 | .param_str = "vV256dV256dLUiLUiUi" | ||
| 12107 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12108 | |||
| 12109 | __builtin_ve_vl_vscot_vvssml | ||
| 12110 | .param_str = "vV256dV256dLUiLUiV256bUi" | ||
| 12111 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12112 | |||
| 12113 | __builtin_ve_vl_vscu_vvssl | ||
| 12114 | .param_str = "vV256dV256dLUiLUiUi" | ||
| 12115 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12116 | |||
| 12117 | __builtin_ve_vl_vscu_vvssml | ||
| 12118 | .param_str = "vV256dV256dLUiLUiV256bUi" | ||
| 12119 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12120 | |||
| 12121 | __builtin_ve_vl_vscunc_vvssl | ||
| 12122 | .param_str = "vV256dV256dLUiLUiUi" | ||
| 12123 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12124 | |||
| 12125 | __builtin_ve_vl_vscunc_vvssml | ||
| 12126 | .param_str = "vV256dV256dLUiLUiV256bUi" | ||
| 12127 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12128 | |||
| 12129 | __builtin_ve_vl_vscuncot_vvssl | ||
| 12130 | .param_str = "vV256dV256dLUiLUiUi" | ||
| 12131 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12132 | |||
| 12133 | __builtin_ve_vl_vscuncot_vvssml | ||
| 12134 | .param_str = "vV256dV256dLUiLUiV256bUi" | ||
| 12135 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12136 | |||
| 12137 | __builtin_ve_vl_vscuot_vvssl | ||
| 12138 | .param_str = "vV256dV256dLUiLUiUi" | ||
| 12139 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12140 | |||
| 12141 | __builtin_ve_vl_vscuot_vvssml | ||
| 12142 | .param_str = "vV256dV256dLUiLUiV256bUi" | ||
| 12143 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12144 | |||
| 12145 | __builtin_ve_vl_vseq_vl | ||
| 12146 | .param_str = "V256dUi" | ||
| 12147 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12148 | |||
| 12149 | __builtin_ve_vl_vseq_vvl | ||
| 12150 | .param_str = "V256dV256dUi" | ||
| 12151 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12152 | |||
| 12153 | __builtin_ve_vl_vsfa_vvssl | ||
| 12154 | .param_str = "V256dV256dLUiLUiUi" | ||
| 12155 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12156 | |||
| 12157 | __builtin_ve_vl_vsfa_vvssmvl | ||
| 12158 | .param_str = "V256dV256dLUiLUiV256bV256dUi" | ||
| 12159 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12160 | |||
| 12161 | __builtin_ve_vl_vsfa_vvssvl | ||
| 12162 | .param_str = "V256dV256dLUiLUiV256dUi" | ||
| 12163 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12164 | |||
| 12165 | __builtin_ve_vl_vshf_vvvsl | ||
| 12166 | .param_str = "V256dV256dV256dLUiUi" | ||
| 12167 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12168 | |||
| 12169 | __builtin_ve_vl_vshf_vvvsvl | ||
| 12170 | .param_str = "V256dV256dV256dLUiV256dUi" | ||
| 12171 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12172 | |||
| 12173 | __builtin_ve_vl_vslal_vvsl | ||
| 12174 | .param_str = "V256dV256dLiUi" | ||
| 12175 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12176 | |||
| 12177 | __builtin_ve_vl_vslal_vvsmvl | ||
| 12178 | .param_str = "V256dV256dLiV256bV256dUi" | ||
| 12179 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12180 | |||
| 12181 | __builtin_ve_vl_vslal_vvsvl | ||
| 12182 | .param_str = "V256dV256dLiV256dUi" | ||
| 12183 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12184 | |||
| 12185 | __builtin_ve_vl_vslal_vvvl | ||
| 12186 | .param_str = "V256dV256dV256dUi" | ||
| 12187 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12188 | |||
| 12189 | __builtin_ve_vl_vslal_vvvmvl | ||
| 12190 | .param_str = "V256dV256dV256dV256bV256dUi" | ||
| 12191 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12192 | |||
| 12193 | __builtin_ve_vl_vslal_vvvvl | ||
| 12194 | .param_str = "V256dV256dV256dV256dUi" | ||
| 12195 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12196 | |||
| 12197 | __builtin_ve_vl_vslawsx_vvsl | ||
| 12198 | .param_str = "V256dV256diUi" | ||
| 12199 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12200 | |||
| 12201 | __builtin_ve_vl_vslawsx_vvsmvl | ||
| 12202 | .param_str = "V256dV256diV256bV256dUi" | ||
| 12203 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12204 | |||
| 12205 | __builtin_ve_vl_vslawsx_vvsvl | ||
| 12206 | .param_str = "V256dV256diV256dUi" | ||
| 12207 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12208 | |||
| 12209 | __builtin_ve_vl_vslawsx_vvvl | ||
| 12210 | .param_str = "V256dV256dV256dUi" | ||
| 12211 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12212 | |||
| 12213 | __builtin_ve_vl_vslawsx_vvvmvl | ||
| 12214 | .param_str = "V256dV256dV256dV256bV256dUi" | ||
| 12215 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12216 | |||
| 12217 | __builtin_ve_vl_vslawsx_vvvvl | ||
| 12218 | .param_str = "V256dV256dV256dV256dUi" | ||
| 12219 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12220 | |||
| 12221 | __builtin_ve_vl_vslawzx_vvsl | ||
| 12222 | .param_str = "V256dV256diUi" | ||
| 12223 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12224 | |||
| 12225 | __builtin_ve_vl_vslawzx_vvsmvl | ||
| 12226 | .param_str = "V256dV256diV256bV256dUi" | ||
| 12227 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12228 | |||
| 12229 | __builtin_ve_vl_vslawzx_vvsvl | ||
| 12230 | .param_str = "V256dV256diV256dUi" | ||
| 12231 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12232 | |||
| 12233 | __builtin_ve_vl_vslawzx_vvvl | ||
| 12234 | .param_str = "V256dV256dV256dUi" | ||
| 12235 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12236 | |||
| 12237 | __builtin_ve_vl_vslawzx_vvvmvl | ||
| 12238 | .param_str = "V256dV256dV256dV256bV256dUi" | ||
| 12239 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12240 | |||
| 12241 | __builtin_ve_vl_vslawzx_vvvvl | ||
| 12242 | .param_str = "V256dV256dV256dV256dUi" | ||
| 12243 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12244 | |||
| 12245 | __builtin_ve_vl_vsll_vvsl | ||
| 12246 | .param_str = "V256dV256dLUiUi" | ||
| 12247 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12248 | |||
| 12249 | __builtin_ve_vl_vsll_vvsmvl | ||
| 12250 | .param_str = "V256dV256dLUiV256bV256dUi" | ||
| 12251 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12252 | |||
| 12253 | __builtin_ve_vl_vsll_vvsvl | ||
| 12254 | .param_str = "V256dV256dLUiV256dUi" | ||
| 12255 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12256 | |||
| 12257 | __builtin_ve_vl_vsll_vvvl | ||
| 12258 | .param_str = "V256dV256dV256dUi" | ||
| 12259 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12260 | |||
| 12261 | __builtin_ve_vl_vsll_vvvmvl | ||
| 12262 | .param_str = "V256dV256dV256dV256bV256dUi" | ||
| 12263 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12264 | |||
| 12265 | __builtin_ve_vl_vsll_vvvvl | ||
| 12266 | .param_str = "V256dV256dV256dV256dUi" | ||
| 12267 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12268 | |||
| 12269 | __builtin_ve_vl_vsral_vvsl | ||
| 12270 | .param_str = "V256dV256dLiUi" | ||
| 12271 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12272 | |||
| 12273 | __builtin_ve_vl_vsral_vvsmvl | ||
| 12274 | .param_str = "V256dV256dLiV256bV256dUi" | ||
| 12275 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12276 | |||
| 12277 | __builtin_ve_vl_vsral_vvsvl | ||
| 12278 | .param_str = "V256dV256dLiV256dUi" | ||
| 12279 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12280 | |||
| 12281 | __builtin_ve_vl_vsral_vvvl | ||
| 12282 | .param_str = "V256dV256dV256dUi" | ||
| 12283 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12284 | |||
| 12285 | __builtin_ve_vl_vsral_vvvmvl | ||
| 12286 | .param_str = "V256dV256dV256dV256bV256dUi" | ||
| 12287 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12288 | |||
| 12289 | __builtin_ve_vl_vsral_vvvvl | ||
| 12290 | .param_str = "V256dV256dV256dV256dUi" | ||
| 12291 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12292 | |||
| 12293 | __builtin_ve_vl_vsrawsx_vvsl | ||
| 12294 | .param_str = "V256dV256diUi" | ||
| 12295 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12296 | |||
| 12297 | __builtin_ve_vl_vsrawsx_vvsmvl | ||
| 12298 | .param_str = "V256dV256diV256bV256dUi" | ||
| 12299 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12300 | |||
| 12301 | __builtin_ve_vl_vsrawsx_vvsvl | ||
| 12302 | .param_str = "V256dV256diV256dUi" | ||
| 12303 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12304 | |||
| 12305 | __builtin_ve_vl_vsrawsx_vvvl | ||
| 12306 | .param_str = "V256dV256dV256dUi" | ||
| 12307 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12308 | |||
| 12309 | __builtin_ve_vl_vsrawsx_vvvmvl | ||
| 12310 | .param_str = "V256dV256dV256dV256bV256dUi" | ||
| 12311 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12312 | |||
| 12313 | __builtin_ve_vl_vsrawsx_vvvvl | ||
| 12314 | .param_str = "V256dV256dV256dV256dUi" | ||
| 12315 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12316 | |||
| 12317 | __builtin_ve_vl_vsrawzx_vvsl | ||
| 12318 | .param_str = "V256dV256diUi" | ||
| 12319 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12320 | |||
| 12321 | __builtin_ve_vl_vsrawzx_vvsmvl | ||
| 12322 | .param_str = "V256dV256diV256bV256dUi" | ||
| 12323 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12324 | |||
| 12325 | __builtin_ve_vl_vsrawzx_vvsvl | ||
| 12326 | .param_str = "V256dV256diV256dUi" | ||
| 12327 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12328 | |||
| 12329 | __builtin_ve_vl_vsrawzx_vvvl | ||
| 12330 | .param_str = "V256dV256dV256dUi" | ||
| 12331 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12332 | |||
| 12333 | __builtin_ve_vl_vsrawzx_vvvmvl | ||
| 12334 | .param_str = "V256dV256dV256dV256bV256dUi" | ||
| 12335 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12336 | |||
| 12337 | __builtin_ve_vl_vsrawzx_vvvvl | ||
| 12338 | .param_str = "V256dV256dV256dV256dUi" | ||
| 12339 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12340 | |||
| 12341 | __builtin_ve_vl_vsrl_vvsl | ||
| 12342 | .param_str = "V256dV256dLUiUi" | ||
| 12343 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12344 | |||
| 12345 | __builtin_ve_vl_vsrl_vvsmvl | ||
| 12346 | .param_str = "V256dV256dLUiV256bV256dUi" | ||
| 12347 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12348 | |||
| 12349 | __builtin_ve_vl_vsrl_vvsvl | ||
| 12350 | .param_str = "V256dV256dLUiV256dUi" | ||
| 12351 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12352 | |||
| 12353 | __builtin_ve_vl_vsrl_vvvl | ||
| 12354 | .param_str = "V256dV256dV256dUi" | ||
| 12355 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12356 | |||
| 12357 | __builtin_ve_vl_vsrl_vvvmvl | ||
| 12358 | .param_str = "V256dV256dV256dV256bV256dUi" | ||
| 12359 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12360 | |||
| 12361 | __builtin_ve_vl_vsrl_vvvvl | ||
| 12362 | .param_str = "V256dV256dV256dV256dUi" | ||
| 12363 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12364 | |||
| 12365 | __builtin_ve_vl_vst2d_vssl | ||
| 12366 | .param_str = "vV256dLUiv*Ui" | ||
| 12367 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12368 | |||
| 12369 | __builtin_ve_vl_vst2d_vssml | ||
| 12370 | .param_str = "vV256dLUiv*V256bUi" | ||
| 12371 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12372 | |||
| 12373 | __builtin_ve_vl_vst2dnc_vssl | ||
| 12374 | .param_str = "vV256dLUiv*Ui" | ||
| 12375 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12376 | |||
| 12377 | __builtin_ve_vl_vst2dnc_vssml | ||
| 12378 | .param_str = "vV256dLUiv*V256bUi" | ||
| 12379 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12380 | |||
| 12381 | __builtin_ve_vl_vst2dncot_vssl | ||
| 12382 | .param_str = "vV256dLUiv*Ui" | ||
| 12383 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12384 | |||
| 12385 | __builtin_ve_vl_vst2dncot_vssml | ||
| 12386 | .param_str = "vV256dLUiv*V256bUi" | ||
| 12387 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12388 | |||
| 12389 | __builtin_ve_vl_vst2dot_vssl | ||
| 12390 | .param_str = "vV256dLUiv*Ui" | ||
| 12391 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12392 | |||
| 12393 | __builtin_ve_vl_vst2dot_vssml | ||
| 12394 | .param_str = "vV256dLUiv*V256bUi" | ||
| 12395 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12396 | |||
| 12397 | __builtin_ve_vl_vst_vssl | ||
| 12398 | .param_str = "vV256dLUiv*Ui" | ||
| 12399 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12400 | |||
| 12401 | __builtin_ve_vl_vst_vssml | ||
| 12402 | .param_str = "vV256dLUiv*V256bUi" | ||
| 12403 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12404 | |||
| 12405 | __builtin_ve_vl_vstl2d_vssl | ||
| 12406 | .param_str = "vV256dLUiv*Ui" | ||
| 12407 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12408 | |||
| 12409 | __builtin_ve_vl_vstl2d_vssml | ||
| 12410 | .param_str = "vV256dLUiv*V256bUi" | ||
| 12411 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12412 | |||
| 12413 | __builtin_ve_vl_vstl2dnc_vssl | ||
| 12414 | .param_str = "vV256dLUiv*Ui" | ||
| 12415 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12416 | |||
| 12417 | __builtin_ve_vl_vstl2dnc_vssml | ||
| 12418 | .param_str = "vV256dLUiv*V256bUi" | ||
| 12419 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12420 | |||
| 12421 | __builtin_ve_vl_vstl2dncot_vssl | ||
| 12422 | .param_str = "vV256dLUiv*Ui" | ||
| 12423 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12424 | |||
| 12425 | __builtin_ve_vl_vstl2dncot_vssml | ||
| 12426 | .param_str = "vV256dLUiv*V256bUi" | ||
| 12427 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12428 | |||
| 12429 | __builtin_ve_vl_vstl2dot_vssl | ||
| 12430 | .param_str = "vV256dLUiv*Ui" | ||
| 12431 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12432 | |||
| 12433 | __builtin_ve_vl_vstl2dot_vssml | ||
| 12434 | .param_str = "vV256dLUiv*V256bUi" | ||
| 12435 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12436 | |||
| 12437 | __builtin_ve_vl_vstl_vssl | ||
| 12438 | .param_str = "vV256dLUiv*Ui" | ||
| 12439 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12440 | |||
| 12441 | __builtin_ve_vl_vstl_vssml | ||
| 12442 | .param_str = "vV256dLUiv*V256bUi" | ||
| 12443 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12444 | |||
| 12445 | __builtin_ve_vl_vstlnc_vssl | ||
| 12446 | .param_str = "vV256dLUiv*Ui" | ||
| 12447 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12448 | |||
| 12449 | __builtin_ve_vl_vstlnc_vssml | ||
| 12450 | .param_str = "vV256dLUiv*V256bUi" | ||
| 12451 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12452 | |||
| 12453 | __builtin_ve_vl_vstlncot_vssl | ||
| 12454 | .param_str = "vV256dLUiv*Ui" | ||
| 12455 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12456 | |||
| 12457 | __builtin_ve_vl_vstlncot_vssml | ||
| 12458 | .param_str = "vV256dLUiv*V256bUi" | ||
| 12459 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12460 | |||
| 12461 | __builtin_ve_vl_vstlot_vssl | ||
| 12462 | .param_str = "vV256dLUiv*Ui" | ||
| 12463 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12464 | |||
| 12465 | __builtin_ve_vl_vstlot_vssml | ||
| 12466 | .param_str = "vV256dLUiv*V256bUi" | ||
| 12467 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12468 | |||
| 12469 | __builtin_ve_vl_vstnc_vssl | ||
| 12470 | .param_str = "vV256dLUiv*Ui" | ||
| 12471 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12472 | |||
| 12473 | __builtin_ve_vl_vstnc_vssml | ||
| 12474 | .param_str = "vV256dLUiv*V256bUi" | ||
| 12475 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12476 | |||
| 12477 | __builtin_ve_vl_vstncot_vssl | ||
| 12478 | .param_str = "vV256dLUiv*Ui" | ||
| 12479 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12480 | |||
| 12481 | __builtin_ve_vl_vstncot_vssml | ||
| 12482 | .param_str = "vV256dLUiv*V256bUi" | ||
| 12483 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12484 | |||
| 12485 | __builtin_ve_vl_vstot_vssl | ||
| 12486 | .param_str = "vV256dLUiv*Ui" | ||
| 12487 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12488 | |||
| 12489 | __builtin_ve_vl_vstot_vssml | ||
| 12490 | .param_str = "vV256dLUiv*V256bUi" | ||
| 12491 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12492 | |||
| 12493 | __builtin_ve_vl_vstu2d_vssl | ||
| 12494 | .param_str = "vV256dLUiv*Ui" | ||
| 12495 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12496 | |||
| 12497 | __builtin_ve_vl_vstu2d_vssml | ||
| 12498 | .param_str = "vV256dLUiv*V256bUi" | ||
| 12499 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12500 | |||
| 12501 | __builtin_ve_vl_vstu2dnc_vssl | ||
| 12502 | .param_str = "vV256dLUiv*Ui" | ||
| 12503 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12504 | |||
| 12505 | __builtin_ve_vl_vstu2dnc_vssml | ||
| 12506 | .param_str = "vV256dLUiv*V256bUi" | ||
| 12507 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12508 | |||
| 12509 | __builtin_ve_vl_vstu2dncot_vssl | ||
| 12510 | .param_str = "vV256dLUiv*Ui" | ||
| 12511 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12512 | |||
| 12513 | __builtin_ve_vl_vstu2dncot_vssml | ||
| 12514 | .param_str = "vV256dLUiv*V256bUi" | ||
| 12515 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12516 | |||
| 12517 | __builtin_ve_vl_vstu2dot_vssl | ||
| 12518 | .param_str = "vV256dLUiv*Ui" | ||
| 12519 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12520 | |||
| 12521 | __builtin_ve_vl_vstu2dot_vssml | ||
| 12522 | .param_str = "vV256dLUiv*V256bUi" | ||
| 12523 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12524 | |||
| 12525 | __builtin_ve_vl_vstu_vssl | ||
| 12526 | .param_str = "vV256dLUiv*Ui" | ||
| 12527 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12528 | |||
| 12529 | __builtin_ve_vl_vstu_vssml | ||
| 12530 | .param_str = "vV256dLUiv*V256bUi" | ||
| 12531 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12532 | |||
| 12533 | __builtin_ve_vl_vstunc_vssl | ||
| 12534 | .param_str = "vV256dLUiv*Ui" | ||
| 12535 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12536 | |||
| 12537 | __builtin_ve_vl_vstunc_vssml | ||
| 12538 | .param_str = "vV256dLUiv*V256bUi" | ||
| 12539 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12540 | |||
| 12541 | __builtin_ve_vl_vstuncot_vssl | ||
| 12542 | .param_str = "vV256dLUiv*Ui" | ||
| 12543 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12544 | |||
| 12545 | __builtin_ve_vl_vstuncot_vssml | ||
| 12546 | .param_str = "vV256dLUiv*V256bUi" | ||
| 12547 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12548 | |||
| 12549 | __builtin_ve_vl_vstuot_vssl | ||
| 12550 | .param_str = "vV256dLUiv*Ui" | ||
| 12551 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12552 | |||
| 12553 | __builtin_ve_vl_vstuot_vssml | ||
| 12554 | .param_str = "vV256dLUiv*V256bUi" | ||
| 12555 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12556 | |||
| 12557 | __builtin_ve_vl_vsubsl_vsvl | ||
| 12558 | .param_str = "V256dLiV256dUi" | ||
| 12559 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12560 | |||
| 12561 | __builtin_ve_vl_vsubsl_vsvmvl | ||
| 12562 | .param_str = "V256dLiV256dV256bV256dUi" | ||
| 12563 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12564 | |||
| 12565 | __builtin_ve_vl_vsubsl_vsvvl | ||
| 12566 | .param_str = "V256dLiV256dV256dUi" | ||
| 12567 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12568 | |||
| 12569 | __builtin_ve_vl_vsubsl_vvvl | ||
| 12570 | .param_str = "V256dV256dV256dUi" | ||
| 12571 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12572 | |||
| 12573 | __builtin_ve_vl_vsubsl_vvvmvl | ||
| 12574 | .param_str = "V256dV256dV256dV256bV256dUi" | ||
| 12575 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12576 | |||
| 12577 | __builtin_ve_vl_vsubsl_vvvvl | ||
| 12578 | .param_str = "V256dV256dV256dV256dUi" | ||
| 12579 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12580 | |||
| 12581 | __builtin_ve_vl_vsubswsx_vsvl | ||
| 12582 | .param_str = "V256diV256dUi" | ||
| 12583 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12584 | |||
| 12585 | __builtin_ve_vl_vsubswsx_vsvmvl | ||
| 12586 | .param_str = "V256diV256dV256bV256dUi" | ||
| 12587 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12588 | |||
| 12589 | __builtin_ve_vl_vsubswsx_vsvvl | ||
| 12590 | .param_str = "V256diV256dV256dUi" | ||
| 12591 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12592 | |||
| 12593 | __builtin_ve_vl_vsubswsx_vvvl | ||
| 12594 | .param_str = "V256dV256dV256dUi" | ||
| 12595 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12596 | |||
| 12597 | __builtin_ve_vl_vsubswsx_vvvmvl | ||
| 12598 | .param_str = "V256dV256dV256dV256bV256dUi" | ||
| 12599 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12600 | |||
| 12601 | __builtin_ve_vl_vsubswsx_vvvvl | ||
| 12602 | .param_str = "V256dV256dV256dV256dUi" | ||
| 12603 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12604 | |||
| 12605 | __builtin_ve_vl_vsubswzx_vsvl | ||
| 12606 | .param_str = "V256diV256dUi" | ||
| 12607 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12608 | |||
| 12609 | __builtin_ve_vl_vsubswzx_vsvmvl | ||
| 12610 | .param_str = "V256diV256dV256bV256dUi" | ||
| 12611 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12612 | |||
| 12613 | __builtin_ve_vl_vsubswzx_vsvvl | ||
| 12614 | .param_str = "V256diV256dV256dUi" | ||
| 12615 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12616 | |||
| 12617 | __builtin_ve_vl_vsubswzx_vvvl | ||
| 12618 | .param_str = "V256dV256dV256dUi" | ||
| 12619 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12620 | |||
| 12621 | __builtin_ve_vl_vsubswzx_vvvmvl | ||
| 12622 | .param_str = "V256dV256dV256dV256bV256dUi" | ||
| 12623 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12624 | |||
| 12625 | __builtin_ve_vl_vsubswzx_vvvvl | ||
| 12626 | .param_str = "V256dV256dV256dV256dUi" | ||
| 12627 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12628 | |||
| 12629 | __builtin_ve_vl_vsubul_vsvl | ||
| 12630 | .param_str = "V256dLUiV256dUi" | ||
| 12631 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12632 | |||
| 12633 | __builtin_ve_vl_vsubul_vsvmvl | ||
| 12634 | .param_str = "V256dLUiV256dV256bV256dUi" | ||
| 12635 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12636 | |||
| 12637 | __builtin_ve_vl_vsubul_vsvvl | ||
| 12638 | .param_str = "V256dLUiV256dV256dUi" | ||
| 12639 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12640 | |||
| 12641 | __builtin_ve_vl_vsubul_vvvl | ||
| 12642 | .param_str = "V256dV256dV256dUi" | ||
| 12643 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12644 | |||
| 12645 | __builtin_ve_vl_vsubul_vvvmvl | ||
| 12646 | .param_str = "V256dV256dV256dV256bV256dUi" | ||
| 12647 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12648 | |||
| 12649 | __builtin_ve_vl_vsubul_vvvvl | ||
| 12650 | .param_str = "V256dV256dV256dV256dUi" | ||
| 12651 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12652 | |||
| 12653 | __builtin_ve_vl_vsubuw_vsvl | ||
| 12654 | .param_str = "V256dUiV256dUi" | ||
| 12655 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12656 | |||
| 12657 | __builtin_ve_vl_vsubuw_vsvmvl | ||
| 12658 | .param_str = "V256dUiV256dV256bV256dUi" | ||
| 12659 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12660 | |||
| 12661 | __builtin_ve_vl_vsubuw_vsvvl | ||
| 12662 | .param_str = "V256dUiV256dV256dUi" | ||
| 12663 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12664 | |||
| 12665 | __builtin_ve_vl_vsubuw_vvvl | ||
| 12666 | .param_str = "V256dV256dV256dUi" | ||
| 12667 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12668 | |||
| 12669 | __builtin_ve_vl_vsubuw_vvvmvl | ||
| 12670 | .param_str = "V256dV256dV256dV256bV256dUi" | ||
| 12671 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12672 | |||
| 12673 | __builtin_ve_vl_vsubuw_vvvvl | ||
| 12674 | .param_str = "V256dV256dV256dV256dUi" | ||
| 12675 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12676 | |||
| 12677 | __builtin_ve_vl_vsuml_vvl | ||
| 12678 | .param_str = "V256dV256dUi" | ||
| 12679 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12680 | |||
| 12681 | __builtin_ve_vl_vsuml_vvml | ||
| 12682 | .param_str = "V256dV256dV256bUi" | ||
| 12683 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12684 | |||
| 12685 | __builtin_ve_vl_vsumwsx_vvl | ||
| 12686 | .param_str = "V256dV256dUi" | ||
| 12687 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12688 | |||
| 12689 | __builtin_ve_vl_vsumwsx_vvml | ||
| 12690 | .param_str = "V256dV256dV256bUi" | ||
| 12691 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12692 | |||
| 12693 | __builtin_ve_vl_vsumwzx_vvl | ||
| 12694 | .param_str = "V256dV256dUi" | ||
| 12695 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12696 | |||
| 12697 | __builtin_ve_vl_vsumwzx_vvml | ||
| 12698 | .param_str = "V256dV256dV256bUi" | ||
| 12699 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12700 | |||
| 12701 | __builtin_ve_vl_vxor_vsvl | ||
| 12702 | .param_str = "V256dLUiV256dUi" | ||
| 12703 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12704 | |||
| 12705 | __builtin_ve_vl_vxor_vsvmvl | ||
| 12706 | .param_str = "V256dLUiV256dV256bV256dUi" | ||
| 12707 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12708 | |||
| 12709 | __builtin_ve_vl_vxor_vsvvl | ||
| 12710 | .param_str = "V256dLUiV256dV256dUi" | ||
| 12711 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12712 | |||
| 12713 | __builtin_ve_vl_vxor_vvvl | ||
| 12714 | .param_str = "V256dV256dV256dUi" | ||
| 12715 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12716 | |||
| 12717 | __builtin_ve_vl_vxor_vvvmvl | ||
| 12718 | .param_str = "V256dV256dV256dV256bV256dUi" | ||
| 12719 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12720 | |||
| 12721 | __builtin_ve_vl_vxor_vvvvl | ||
| 12722 | .param_str = "V256dV256dV256dV256dUi" | ||
| 12723 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12724 | |||
| 12725 | __builtin_ve_vl_xorm_MMM | ||
| 12726 | .param_str = "V512bV512bV512b" | ||
| 12727 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12728 | |||
| 12729 | __builtin_ve_vl_xorm_mmm | ||
| 12730 | .param_str = "V256bV256bV256b" | ||
| 12731 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12732 | |||
| 12733 | __builtin_vfprintf | ||
| 12734 | .param_str = "iP*RcC*Ra" | ||
| 12735 | .attributes = .{ .lib_function_with_builtin_prefix = true, .format_kind = .vprintf, .format_string_position = 1 } | ||
| 12736 | |||
| 12737 | __builtin_vfscanf | ||
| 12738 | .param_str = "iP*RcC*Ra" | ||
| 12739 | .attributes = .{ .lib_function_with_builtin_prefix = true, .format_kind = .vscanf, .format_string_position = 1 } | ||
| 12740 | |||
| 12741 | __builtin_vprintf | ||
| 12742 | .param_str = "icC*Ra" | ||
| 12743 | .attributes = .{ .lib_function_with_builtin_prefix = true, .format_kind = .vprintf } | ||
| 12744 | |||
| 12745 | __builtin_vscanf | ||
| 12746 | .param_str = "icC*Ra" | ||
| 12747 | .attributes = .{ .lib_function_with_builtin_prefix = true, .format_kind = .vscanf } | ||
| 12748 | |||
| 12749 | __builtin_vsnprintf | ||
| 12750 | .param_str = "ic*RzcC*Ra" | ||
| 12751 | .attributes = .{ .lib_function_with_builtin_prefix = true, .format_kind = .vprintf, .format_string_position = 2 } | ||
| 12752 | |||
| 12753 | __builtin_vsprintf | ||
| 12754 | .param_str = "ic*RcC*Ra" | ||
| 12755 | .attributes = .{ .lib_function_with_builtin_prefix = true, .format_kind = .vprintf, .format_string_position = 1 } | ||
| 12756 | |||
| 12757 | __builtin_vsscanf | ||
| 12758 | .param_str = "icC*RcC*Ra" | ||
| 12759 | .attributes = .{ .lib_function_with_builtin_prefix = true, .format_kind = .vscanf, .format_string_position = 1 } | ||
| 12760 | |||
| 12761 | __builtin_wasm_max_f32 | ||
| 12762 | .param_str = "fff" | ||
| 12763 | .target_set = TargetSet.initOne(.webassembly) | ||
| 12764 | .attributes = .{ .@"const" = true } | ||
| 12765 | |||
| 12766 | __builtin_wasm_max_f64 | ||
| 12767 | .param_str = "ddd" | ||
| 12768 | .target_set = TargetSet.initOne(.webassembly) | ||
| 12769 | .attributes = .{ .@"const" = true } | ||
| 12770 | |||
| 12771 | __builtin_wasm_memory_grow | ||
| 12772 | .param_str = "zIiz" | ||
| 12773 | .target_set = TargetSet.initOne(.webassembly) | ||
| 12774 | |||
| 12775 | __builtin_wasm_memory_size | ||
| 12776 | .param_str = "zIi" | ||
| 12777 | .target_set = TargetSet.initOne(.webassembly) | ||
| 12778 | |||
| 12779 | __builtin_wasm_min_f32 | ||
| 12780 | .param_str = "fff" | ||
| 12781 | .target_set = TargetSet.initOne(.webassembly) | ||
| 12782 | .attributes = .{ .@"const" = true } | ||
| 12783 | |||
| 12784 | __builtin_wasm_min_f64 | ||
| 12785 | .param_str = "ddd" | ||
| 12786 | .target_set = TargetSet.initOne(.webassembly) | ||
| 12787 | .attributes = .{ .@"const" = true } | ||
| 12788 | |||
| 12789 | __builtin_wasm_trunc_s_i32_f32 | ||
| 12790 | .param_str = "if" | ||
| 12791 | .target_set = TargetSet.initOne(.webassembly) | ||
| 12792 | .attributes = .{ .@"const" = true } | ||
| 12793 | |||
| 12794 | __builtin_wasm_trunc_s_i32_f64 | ||
| 12795 | .param_str = "id" | ||
| 12796 | .target_set = TargetSet.initOne(.webassembly) | ||
| 12797 | .attributes = .{ .@"const" = true } | ||
| 12798 | |||
| 12799 | __builtin_wasm_trunc_s_i64_f32 | ||
| 12800 | .param_str = "LLif" | ||
| 12801 | .target_set = TargetSet.initOne(.webassembly) | ||
| 12802 | .attributes = .{ .@"const" = true } | ||
| 12803 | |||
| 12804 | __builtin_wasm_trunc_s_i64_f64 | ||
| 12805 | .param_str = "LLid" | ||
| 12806 | .target_set = TargetSet.initOne(.webassembly) | ||
| 12807 | .attributes = .{ .@"const" = true } | ||
| 12808 | |||
| 12809 | __builtin_wasm_trunc_u_i32_f32 | ||
| 12810 | .param_str = "if" | ||
| 12811 | .target_set = TargetSet.initOne(.webassembly) | ||
| 12812 | .attributes = .{ .@"const" = true } | ||
| 12813 | |||
| 12814 | __builtin_wasm_trunc_u_i32_f64 | ||
| 12815 | .param_str = "id" | ||
| 12816 | .target_set = TargetSet.initOne(.webassembly) | ||
| 12817 | .attributes = .{ .@"const" = true } | ||
| 12818 | |||
| 12819 | __builtin_wasm_trunc_u_i64_f32 | ||
| 12820 | .param_str = "LLif" | ||
| 12821 | .target_set = TargetSet.initOne(.webassembly) | ||
| 12822 | .attributes = .{ .@"const" = true } | ||
| 12823 | |||
| 12824 | __builtin_wasm_trunc_u_i64_f64 | ||
| 12825 | .param_str = "LLid" | ||
| 12826 | .target_set = TargetSet.initOne(.webassembly) | ||
| 12827 | .attributes = .{ .@"const" = true } | ||
| 12828 | |||
| 12829 | __builtin_wcschr | ||
| 12830 | .param_str = "w*wC*w" | ||
| 12831 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_evaluable = true } | ||
| 12832 | |||
| 12833 | __builtin_wcscmp | ||
| 12834 | .param_str = "iwC*wC*" | ||
| 12835 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_evaluable = true } | ||
| 12836 | |||
| 12837 | __builtin_wcslen | ||
| 12838 | .param_str = "zwC*" | ||
| 12839 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_evaluable = true } | ||
| 12840 | |||
| 12841 | __builtin_wcsncmp | ||
| 12842 | .param_str = "iwC*wC*z" | ||
| 12843 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_evaluable = true } | ||
| 12844 | |||
| 12845 | __builtin_wmemchr | ||
| 12846 | .param_str = "w*wC*wz" | ||
| 12847 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_evaluable = true } | ||
| 12848 | |||
| 12849 | __builtin_wmemcmp | ||
| 12850 | .param_str = "iwC*wC*z" | ||
| 12851 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_evaluable = true } | ||
| 12852 | |||
| 12853 | __builtin_wmemcpy | ||
| 12854 | .param_str = "w*w*wC*z" | ||
| 12855 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_evaluable = true } | ||
| 12856 | |||
| 12857 | __builtin_wmemmove | ||
| 12858 | .param_str = "w*w*wC*z" | ||
| 12859 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_evaluable = true } | ||
| 12860 | |||
| 12861 | __c11_atomic_is_lock_free | ||
| 12862 | .param_str = "bz" | ||
| 12863 | .attributes = .{ .const_evaluable = true } | ||
| 12864 | |||
| 12865 | __c11_atomic_signal_fence | ||
| 12866 | .param_str = "vi" | ||
| 12867 | |||
| 12868 | __c11_atomic_thread_fence | ||
| 12869 | .param_str = "vi" | ||
| 12870 | |||
| 12871 | __clear_cache | ||
| 12872 | .param_str = "vv*v*" | ||
| 12873 | .target_set = TargetSet.initMany(&.{ .aarch64, .arm }) | ||
| 12874 | |||
| 12875 | __cospi | ||
| 12876 | .param_str = "dd" | ||
| 12877 | .header = .math | ||
| 12878 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 12879 | |||
| 12880 | __cospif | ||
| 12881 | .param_str = "ff" | ||
| 12882 | .header = .math | ||
| 12883 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 12884 | |||
| 12885 | __debugbreak | ||
| 12886 | .param_str = "v" | ||
| 12887 | .language = .all_ms_languages | ||
| 12888 | |||
| 12889 | __dmb | ||
| 12890 | .param_str = "vUi" | ||
| 12891 | .language = .all_ms_languages | ||
| 12892 | .target_set = TargetSet.initMany(&.{ .aarch64, .arm }) | ||
| 12893 | .attributes = .{ .@"const" = true } | ||
| 12894 | |||
| 12895 | __dsb | ||
| 12896 | .param_str = "vUi" | ||
| 12897 | .language = .all_ms_languages | ||
| 12898 | .target_set = TargetSet.initMany(&.{ .aarch64, .arm }) | ||
| 12899 | .attributes = .{ .@"const" = true } | ||
| 12900 | |||
| 12901 | __emit | ||
| 12902 | .param_str = "vIUiC" | ||
| 12903 | .language = .all_ms_languages | ||
| 12904 | .target_set = TargetSet.initOne(.arm) | ||
| 12905 | |||
| 12906 | __exception_code | ||
| 12907 | .param_str = "UNi" | ||
| 12908 | .language = .all_ms_languages | ||
| 12909 | |||
| 12910 | __exception_info | ||
| 12911 | .param_str = "v*" | ||
| 12912 | .language = .all_ms_languages | ||
| 12913 | |||
| 12914 | __exp10 | ||
| 12915 | .param_str = "dd" | ||
| 12916 | .header = .math | ||
| 12917 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 12918 | |||
| 12919 | __exp10f | ||
| 12920 | .param_str = "ff" | ||
| 12921 | .header = .math | ||
| 12922 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 12923 | |||
| 12924 | __fastfail | ||
| 12925 | .param_str = "vUi" | ||
| 12926 | .language = .all_ms_languages | ||
| 12927 | .attributes = .{ .noreturn = true } | ||
| 12928 | |||
| 12929 | __finite | ||
| 12930 | .param_str = "id" | ||
| 12931 | .header = .math | ||
| 12932 | .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } | ||
| 12933 | |||
| 12934 | __finitef | ||
| 12935 | .param_str = "if" | ||
| 12936 | .header = .math | ||
| 12937 | .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } | ||
| 12938 | |||
| 12939 | __finitel | ||
| 12940 | .param_str = "iLd" | ||
| 12941 | .header = .math | ||
| 12942 | .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } | ||
| 12943 | |||
| 12944 | __isb | ||
| 12945 | .param_str = "vUi" | ||
| 12946 | .language = .all_ms_languages | ||
| 12947 | .target_set = TargetSet.initMany(&.{ .aarch64, .arm }) | ||
| 12948 | .attributes = .{ .@"const" = true } | ||
| 12949 | |||
| 12950 | __iso_volatile_load16 | ||
| 12951 | .param_str = "ssCD*" | ||
| 12952 | .language = .all_ms_languages | ||
| 12953 | |||
| 12954 | __iso_volatile_load32 | ||
| 12955 | .param_str = "iiCD*" | ||
| 12956 | .language = .all_ms_languages | ||
| 12957 | |||
| 12958 | __iso_volatile_load64 | ||
| 12959 | .param_str = "LLiLLiCD*" | ||
| 12960 | .language = .all_ms_languages | ||
| 12961 | |||
| 12962 | __iso_volatile_load8 | ||
| 12963 | .param_str = "ccCD*" | ||
| 12964 | .language = .all_ms_languages | ||
| 12965 | |||
| 12966 | __iso_volatile_store16 | ||
| 12967 | .param_str = "vsD*s" | ||
| 12968 | .language = .all_ms_languages | ||
| 12969 | |||
| 12970 | __iso_volatile_store32 | ||
| 12971 | .param_str = "viD*i" | ||
| 12972 | .language = .all_ms_languages | ||
| 12973 | |||
| 12974 | __iso_volatile_store64 | ||
| 12975 | .param_str = "vLLiD*LLi" | ||
| 12976 | .language = .all_ms_languages | ||
| 12977 | |||
| 12978 | __iso_volatile_store8 | ||
| 12979 | .param_str = "vcD*c" | ||
| 12980 | .language = .all_ms_languages | ||
| 12981 | |||
| 12982 | __ldrexd | ||
| 12983 | .param_str = "WiWiCD*" | ||
| 12984 | .language = .all_ms_languages | ||
| 12985 | .target_set = TargetSet.initOne(.arm) | ||
| 12986 | |||
| 12987 | __lzcnt | ||
| 12988 | .param_str = "UiUi" | ||
| 12989 | .language = .all_ms_languages | ||
| 12990 | .attributes = .{ .@"const" = true, .const_evaluable = true } | ||
| 12991 | |||
| 12992 | __lzcnt16 | ||
| 12993 | .param_str = "UsUs" | ||
| 12994 | .language = .all_ms_languages | ||
| 12995 | .attributes = .{ .@"const" = true, .const_evaluable = true } | ||
| 12996 | |||
| 12997 | __lzcnt64 | ||
| 12998 | .param_str = "UWiUWi" | ||
| 12999 | .language = .all_ms_languages | ||
| 13000 | .attributes = .{ .@"const" = true, .const_evaluable = true } | ||
| 13001 | |||
| 13002 | __noop | ||
| 13003 | .param_str = "i." | ||
| 13004 | .language = .all_ms_languages | ||
| 13005 | |||
| 13006 | __nvvm_add_rm_d | ||
| 13007 | .param_str = "ddd" | ||
| 13008 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13009 | |||
| 13010 | __nvvm_add_rm_f | ||
| 13011 | .param_str = "fff" | ||
| 13012 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13013 | |||
| 13014 | __nvvm_add_rm_ftz_f | ||
| 13015 | .param_str = "fff" | ||
| 13016 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13017 | |||
| 13018 | __nvvm_add_rn_d | ||
| 13019 | .param_str = "ddd" | ||
| 13020 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13021 | |||
| 13022 | __nvvm_add_rn_f | ||
| 13023 | .param_str = "fff" | ||
| 13024 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13025 | |||
| 13026 | __nvvm_add_rn_ftz_f | ||
| 13027 | .param_str = "fff" | ||
| 13028 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13029 | |||
| 13030 | __nvvm_add_rp_d | ||
| 13031 | .param_str = "ddd" | ||
| 13032 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13033 | |||
| 13034 | __nvvm_add_rp_f | ||
| 13035 | .param_str = "fff" | ||
| 13036 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13037 | |||
| 13038 | __nvvm_add_rp_ftz_f | ||
| 13039 | .param_str = "fff" | ||
| 13040 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13041 | |||
| 13042 | __nvvm_add_rz_d | ||
| 13043 | .param_str = "ddd" | ||
| 13044 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13045 | |||
| 13046 | __nvvm_add_rz_f | ||
| 13047 | .param_str = "fff" | ||
| 13048 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13049 | |||
| 13050 | __nvvm_add_rz_ftz_f | ||
| 13051 | .param_str = "fff" | ||
| 13052 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13053 | |||
| 13054 | __nvvm_atom_add_gen_f | ||
| 13055 | .param_str = "ffD*f" | ||
| 13056 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13057 | |||
| 13058 | __nvvm_atom_add_gen_i | ||
| 13059 | .param_str = "iiD*i" | ||
| 13060 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13061 | |||
| 13062 | __nvvm_atom_add_gen_l | ||
| 13063 | .param_str = "LiLiD*Li" | ||
| 13064 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13065 | |||
| 13066 | __nvvm_atom_add_gen_ll | ||
| 13067 | .param_str = "LLiLLiD*LLi" | ||
| 13068 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13069 | |||
| 13070 | __nvvm_atom_and_gen_i | ||
| 13071 | .param_str = "iiD*i" | ||
| 13072 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13073 | |||
| 13074 | __nvvm_atom_and_gen_l | ||
| 13075 | .param_str = "LiLiD*Li" | ||
| 13076 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13077 | |||
| 13078 | __nvvm_atom_and_gen_ll | ||
| 13079 | .param_str = "LLiLLiD*LLi" | ||
| 13080 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13081 | |||
| 13082 | __nvvm_atom_cas_gen_i | ||
| 13083 | .param_str = "iiD*ii" | ||
| 13084 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13085 | |||
| 13086 | __nvvm_atom_cas_gen_l | ||
| 13087 | .param_str = "LiLiD*LiLi" | ||
| 13088 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13089 | |||
| 13090 | __nvvm_atom_cas_gen_ll | ||
| 13091 | .param_str = "LLiLLiD*LLiLLi" | ||
| 13092 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13093 | |||
| 13094 | __nvvm_atom_dec_gen_ui | ||
| 13095 | .param_str = "UiUiD*Ui" | ||
| 13096 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13097 | |||
| 13098 | __nvvm_atom_inc_gen_ui | ||
| 13099 | .param_str = "UiUiD*Ui" | ||
| 13100 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13101 | |||
| 13102 | __nvvm_atom_max_gen_i | ||
| 13103 | .param_str = "iiD*i" | ||
| 13104 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13105 | |||
| 13106 | __nvvm_atom_max_gen_l | ||
| 13107 | .param_str = "LiLiD*Li" | ||
| 13108 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13109 | |||
| 13110 | __nvvm_atom_max_gen_ll | ||
| 13111 | .param_str = "LLiLLiD*LLi" | ||
| 13112 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13113 | |||
| 13114 | __nvvm_atom_max_gen_ui | ||
| 13115 | .param_str = "UiUiD*Ui" | ||
| 13116 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13117 | |||
| 13118 | __nvvm_atom_max_gen_ul | ||
| 13119 | .param_str = "ULiULiD*ULi" | ||
| 13120 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13121 | |||
| 13122 | __nvvm_atom_max_gen_ull | ||
| 13123 | .param_str = "ULLiULLiD*ULLi" | ||
| 13124 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13125 | |||
| 13126 | __nvvm_atom_min_gen_i | ||
| 13127 | .param_str = "iiD*i" | ||
| 13128 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13129 | |||
| 13130 | __nvvm_atom_min_gen_l | ||
| 13131 | .param_str = "LiLiD*Li" | ||
| 13132 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13133 | |||
| 13134 | __nvvm_atom_min_gen_ll | ||
| 13135 | .param_str = "LLiLLiD*LLi" | ||
| 13136 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13137 | |||
| 13138 | __nvvm_atom_min_gen_ui | ||
| 13139 | .param_str = "UiUiD*Ui" | ||
| 13140 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13141 | |||
| 13142 | __nvvm_atom_min_gen_ul | ||
| 13143 | .param_str = "ULiULiD*ULi" | ||
| 13144 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13145 | |||
| 13146 | __nvvm_atom_min_gen_ull | ||
| 13147 | .param_str = "ULLiULLiD*ULLi" | ||
| 13148 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13149 | |||
| 13150 | __nvvm_atom_or_gen_i | ||
| 13151 | .param_str = "iiD*i" | ||
| 13152 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13153 | |||
| 13154 | __nvvm_atom_or_gen_l | ||
| 13155 | .param_str = "LiLiD*Li" | ||
| 13156 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13157 | |||
| 13158 | __nvvm_atom_or_gen_ll | ||
| 13159 | .param_str = "LLiLLiD*LLi" | ||
| 13160 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13161 | |||
| 13162 | __nvvm_atom_sub_gen_i | ||
| 13163 | .param_str = "iiD*i" | ||
| 13164 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13165 | |||
| 13166 | __nvvm_atom_sub_gen_l | ||
| 13167 | .param_str = "LiLiD*Li" | ||
| 13168 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13169 | |||
| 13170 | __nvvm_atom_sub_gen_ll | ||
| 13171 | .param_str = "LLiLLiD*LLi" | ||
| 13172 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13173 | |||
| 13174 | __nvvm_atom_xchg_gen_i | ||
| 13175 | .param_str = "iiD*i" | ||
| 13176 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13177 | |||
| 13178 | __nvvm_atom_xchg_gen_l | ||
| 13179 | .param_str = "LiLiD*Li" | ||
| 13180 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13181 | |||
| 13182 | __nvvm_atom_xchg_gen_ll | ||
| 13183 | .param_str = "LLiLLiD*LLi" | ||
| 13184 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13185 | |||
| 13186 | __nvvm_atom_xor_gen_i | ||
| 13187 | .param_str = "iiD*i" | ||
| 13188 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13189 | |||
| 13190 | __nvvm_atom_xor_gen_l | ||
| 13191 | .param_str = "LiLiD*Li" | ||
| 13192 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13193 | |||
| 13194 | __nvvm_atom_xor_gen_ll | ||
| 13195 | .param_str = "LLiLLiD*LLi" | ||
| 13196 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13197 | |||
| 13198 | __nvvm_bar0_and | ||
| 13199 | .param_str = "ii" | ||
| 13200 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13201 | |||
| 13202 | __nvvm_bar0_or | ||
| 13203 | .param_str = "ii" | ||
| 13204 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13205 | |||
| 13206 | __nvvm_bar0_popc | ||
| 13207 | .param_str = "ii" | ||
| 13208 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13209 | |||
| 13210 | __nvvm_bar_sync | ||
| 13211 | .param_str = "vi" | ||
| 13212 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13213 | |||
| 13214 | __nvvm_bitcast_d2ll | ||
| 13215 | .param_str = "LLid" | ||
| 13216 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13217 | |||
| 13218 | __nvvm_bitcast_f2i | ||
| 13219 | .param_str = "if" | ||
| 13220 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13221 | |||
| 13222 | __nvvm_bitcast_i2f | ||
| 13223 | .param_str = "fi" | ||
| 13224 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13225 | |||
| 13226 | __nvvm_bitcast_ll2d | ||
| 13227 | .param_str = "dLLi" | ||
| 13228 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13229 | |||
| 13230 | __nvvm_ceil_d | ||
| 13231 | .param_str = "dd" | ||
| 13232 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13233 | |||
| 13234 | __nvvm_ceil_f | ||
| 13235 | .param_str = "ff" | ||
| 13236 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13237 | |||
| 13238 | __nvvm_ceil_ftz_f | ||
| 13239 | .param_str = "ff" | ||
| 13240 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13241 | |||
| 13242 | __nvvm_compiler_error | ||
| 13243 | .param_str = "vcC*4" | ||
| 13244 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13245 | |||
| 13246 | __nvvm_compiler_warn | ||
| 13247 | .param_str = "vcC*4" | ||
| 13248 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13249 | |||
| 13250 | __nvvm_cos_approx_f | ||
| 13251 | .param_str = "ff" | ||
| 13252 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13253 | |||
| 13254 | __nvvm_cos_approx_ftz_f | ||
| 13255 | .param_str = "ff" | ||
| 13256 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13257 | |||
| 13258 | __nvvm_d2f_rm | ||
| 13259 | .param_str = "fd" | ||
| 13260 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13261 | |||
| 13262 | __nvvm_d2f_rm_ftz | ||
| 13263 | .param_str = "fd" | ||
| 13264 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13265 | |||
| 13266 | __nvvm_d2f_rn | ||
| 13267 | .param_str = "fd" | ||
| 13268 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13269 | |||
| 13270 | __nvvm_d2f_rn_ftz | ||
| 13271 | .param_str = "fd" | ||
| 13272 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13273 | |||
| 13274 | __nvvm_d2f_rp | ||
| 13275 | .param_str = "fd" | ||
| 13276 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13277 | |||
| 13278 | __nvvm_d2f_rp_ftz | ||
| 13279 | .param_str = "fd" | ||
| 13280 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13281 | |||
| 13282 | __nvvm_d2f_rz | ||
| 13283 | .param_str = "fd" | ||
| 13284 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13285 | |||
| 13286 | __nvvm_d2f_rz_ftz | ||
| 13287 | .param_str = "fd" | ||
| 13288 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13289 | |||
| 13290 | __nvvm_d2i_hi | ||
| 13291 | .param_str = "id" | ||
| 13292 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13293 | |||
| 13294 | __nvvm_d2i_lo | ||
| 13295 | .param_str = "id" | ||
| 13296 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13297 | |||
| 13298 | __nvvm_d2i_rm | ||
| 13299 | .param_str = "id" | ||
| 13300 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13301 | |||
| 13302 | __nvvm_d2i_rn | ||
| 13303 | .param_str = "id" | ||
| 13304 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13305 | |||
| 13306 | __nvvm_d2i_rp | ||
| 13307 | .param_str = "id" | ||
| 13308 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13309 | |||
| 13310 | __nvvm_d2i_rz | ||
| 13311 | .param_str = "id" | ||
| 13312 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13313 | |||
| 13314 | __nvvm_d2ll_rm | ||
| 13315 | .param_str = "LLid" | ||
| 13316 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13317 | |||
| 13318 | __nvvm_d2ll_rn | ||
| 13319 | .param_str = "LLid" | ||
| 13320 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13321 | |||
| 13322 | __nvvm_d2ll_rp | ||
| 13323 | .param_str = "LLid" | ||
| 13324 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13325 | |||
| 13326 | __nvvm_d2ll_rz | ||
| 13327 | .param_str = "LLid" | ||
| 13328 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13329 | |||
| 13330 | __nvvm_d2ui_rm | ||
| 13331 | .param_str = "Uid" | ||
| 13332 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13333 | |||
| 13334 | __nvvm_d2ui_rn | ||
| 13335 | .param_str = "Uid" | ||
| 13336 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13337 | |||
| 13338 | __nvvm_d2ui_rp | ||
| 13339 | .param_str = "Uid" | ||
| 13340 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13341 | |||
| 13342 | __nvvm_d2ui_rz | ||
| 13343 | .param_str = "Uid" | ||
| 13344 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13345 | |||
| 13346 | __nvvm_d2ull_rm | ||
| 13347 | .param_str = "ULLid" | ||
| 13348 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13349 | |||
| 13350 | __nvvm_d2ull_rn | ||
| 13351 | .param_str = "ULLid" | ||
| 13352 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13353 | |||
| 13354 | __nvvm_d2ull_rp | ||
| 13355 | .param_str = "ULLid" | ||
| 13356 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13357 | |||
| 13358 | __nvvm_d2ull_rz | ||
| 13359 | .param_str = "ULLid" | ||
| 13360 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13361 | |||
| 13362 | __nvvm_div_approx_f | ||
| 13363 | .param_str = "fff" | ||
| 13364 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13365 | |||
| 13366 | __nvvm_div_approx_ftz_f | ||
| 13367 | .param_str = "fff" | ||
| 13368 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13369 | |||
| 13370 | __nvvm_div_rm_d | ||
| 13371 | .param_str = "ddd" | ||
| 13372 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13373 | |||
| 13374 | __nvvm_div_rm_f | ||
| 13375 | .param_str = "fff" | ||
| 13376 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13377 | |||
| 13378 | __nvvm_div_rm_ftz_f | ||
| 13379 | .param_str = "fff" | ||
| 13380 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13381 | |||
| 13382 | __nvvm_div_rn_d | ||
| 13383 | .param_str = "ddd" | ||
| 13384 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13385 | |||
| 13386 | __nvvm_div_rn_f | ||
| 13387 | .param_str = "fff" | ||
| 13388 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13389 | |||
| 13390 | __nvvm_div_rn_ftz_f | ||
| 13391 | .param_str = "fff" | ||
| 13392 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13393 | |||
| 13394 | __nvvm_div_rp_d | ||
| 13395 | .param_str = "ddd" | ||
| 13396 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13397 | |||
| 13398 | __nvvm_div_rp_f | ||
| 13399 | .param_str = "fff" | ||
| 13400 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13401 | |||
| 13402 | __nvvm_div_rp_ftz_f | ||
| 13403 | .param_str = "fff" | ||
| 13404 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13405 | |||
| 13406 | __nvvm_div_rz_d | ||
| 13407 | .param_str = "ddd" | ||
| 13408 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13409 | |||
| 13410 | __nvvm_div_rz_f | ||
| 13411 | .param_str = "fff" | ||
| 13412 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13413 | |||
| 13414 | __nvvm_div_rz_ftz_f | ||
| 13415 | .param_str = "fff" | ||
| 13416 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13417 | |||
| 13418 | __nvvm_ex2_approx_d | ||
| 13419 | .param_str = "dd" | ||
| 13420 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13421 | |||
| 13422 | __nvvm_ex2_approx_f | ||
| 13423 | .param_str = "ff" | ||
| 13424 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13425 | |||
| 13426 | __nvvm_ex2_approx_ftz_f | ||
| 13427 | .param_str = "ff" | ||
| 13428 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13429 | |||
| 13430 | __nvvm_f2h_rn | ||
| 13431 | .param_str = "Usf" | ||
| 13432 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13433 | |||
| 13434 | __nvvm_f2h_rn_ftz | ||
| 13435 | .param_str = "Usf" | ||
| 13436 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13437 | |||
| 13438 | __nvvm_f2i_rm | ||
| 13439 | .param_str = "if" | ||
| 13440 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13441 | |||
| 13442 | __nvvm_f2i_rm_ftz | ||
| 13443 | .param_str = "if" | ||
| 13444 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13445 | |||
| 13446 | __nvvm_f2i_rn | ||
| 13447 | .param_str = "if" | ||
| 13448 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13449 | |||
| 13450 | __nvvm_f2i_rn_ftz | ||
| 13451 | .param_str = "if" | ||
| 13452 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13453 | |||
| 13454 | __nvvm_f2i_rp | ||
| 13455 | .param_str = "if" | ||
| 13456 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13457 | |||
| 13458 | __nvvm_f2i_rp_ftz | ||
| 13459 | .param_str = "if" | ||
| 13460 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13461 | |||
| 13462 | __nvvm_f2i_rz | ||
| 13463 | .param_str = "if" | ||
| 13464 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13465 | |||
| 13466 | __nvvm_f2i_rz_ftz | ||
| 13467 | .param_str = "if" | ||
| 13468 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13469 | |||
| 13470 | __nvvm_f2ll_rm | ||
| 13471 | .param_str = "LLif" | ||
| 13472 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13473 | |||
| 13474 | __nvvm_f2ll_rm_ftz | ||
| 13475 | .param_str = "LLif" | ||
| 13476 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13477 | |||
| 13478 | __nvvm_f2ll_rn | ||
| 13479 | .param_str = "LLif" | ||
| 13480 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13481 | |||
| 13482 | __nvvm_f2ll_rn_ftz | ||
| 13483 | .param_str = "LLif" | ||
| 13484 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13485 | |||
| 13486 | __nvvm_f2ll_rp | ||
| 13487 | .param_str = "LLif" | ||
| 13488 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13489 | |||
| 13490 | __nvvm_f2ll_rp_ftz | ||
| 13491 | .param_str = "LLif" | ||
| 13492 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13493 | |||
| 13494 | __nvvm_f2ll_rz | ||
| 13495 | .param_str = "LLif" | ||
| 13496 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13497 | |||
| 13498 | __nvvm_f2ll_rz_ftz | ||
| 13499 | .param_str = "LLif" | ||
| 13500 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13501 | |||
| 13502 | __nvvm_f2ui_rm | ||
| 13503 | .param_str = "Uif" | ||
| 13504 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13505 | |||
| 13506 | __nvvm_f2ui_rm_ftz | ||
| 13507 | .param_str = "Uif" | ||
| 13508 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13509 | |||
| 13510 | __nvvm_f2ui_rn | ||
| 13511 | .param_str = "Uif" | ||
| 13512 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13513 | |||
| 13514 | __nvvm_f2ui_rn_ftz | ||
| 13515 | .param_str = "Uif" | ||
| 13516 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13517 | |||
| 13518 | __nvvm_f2ui_rp | ||
| 13519 | .param_str = "Uif" | ||
| 13520 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13521 | |||
| 13522 | __nvvm_f2ui_rp_ftz | ||
| 13523 | .param_str = "Uif" | ||
| 13524 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13525 | |||
| 13526 | __nvvm_f2ui_rz | ||
| 13527 | .param_str = "Uif" | ||
| 13528 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13529 | |||
| 13530 | __nvvm_f2ui_rz_ftz | ||
| 13531 | .param_str = "Uif" | ||
| 13532 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13533 | |||
| 13534 | __nvvm_f2ull_rm | ||
| 13535 | .param_str = "ULLif" | ||
| 13536 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13537 | |||
| 13538 | __nvvm_f2ull_rm_ftz | ||
| 13539 | .param_str = "ULLif" | ||
| 13540 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13541 | |||
| 13542 | __nvvm_f2ull_rn | ||
| 13543 | .param_str = "ULLif" | ||
| 13544 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13545 | |||
| 13546 | __nvvm_f2ull_rn_ftz | ||
| 13547 | .param_str = "ULLif" | ||
| 13548 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13549 | |||
| 13550 | __nvvm_f2ull_rp | ||
| 13551 | .param_str = "ULLif" | ||
| 13552 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13553 | |||
| 13554 | __nvvm_f2ull_rp_ftz | ||
| 13555 | .param_str = "ULLif" | ||
| 13556 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13557 | |||
| 13558 | __nvvm_f2ull_rz | ||
| 13559 | .param_str = "ULLif" | ||
| 13560 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13561 | |||
| 13562 | __nvvm_f2ull_rz_ftz | ||
| 13563 | .param_str = "ULLif" | ||
| 13564 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13565 | |||
| 13566 | __nvvm_fabs_d | ||
| 13567 | .param_str = "dd" | ||
| 13568 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13569 | |||
| 13570 | __nvvm_fabs_f | ||
| 13571 | .param_str = "ff" | ||
| 13572 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13573 | |||
| 13574 | __nvvm_fabs_ftz_f | ||
| 13575 | .param_str = "ff" | ||
| 13576 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13577 | |||
| 13578 | __nvvm_floor_d | ||
| 13579 | .param_str = "dd" | ||
| 13580 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13581 | |||
| 13582 | __nvvm_floor_f | ||
| 13583 | .param_str = "ff" | ||
| 13584 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13585 | |||
| 13586 | __nvvm_floor_ftz_f | ||
| 13587 | .param_str = "ff" | ||
| 13588 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13589 | |||
| 13590 | __nvvm_fma_rm_d | ||
| 13591 | .param_str = "dddd" | ||
| 13592 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13593 | |||
| 13594 | __nvvm_fma_rm_f | ||
| 13595 | .param_str = "ffff" | ||
| 13596 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13597 | |||
| 13598 | __nvvm_fma_rm_ftz_f | ||
| 13599 | .param_str = "ffff" | ||
| 13600 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13601 | |||
| 13602 | __nvvm_fma_rn_d | ||
| 13603 | .param_str = "dddd" | ||
| 13604 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13605 | |||
| 13606 | __nvvm_fma_rn_f | ||
| 13607 | .param_str = "ffff" | ||
| 13608 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13609 | |||
| 13610 | __nvvm_fma_rn_ftz_f | ||
| 13611 | .param_str = "ffff" | ||
| 13612 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13613 | |||
| 13614 | __nvvm_fma_rp_d | ||
| 13615 | .param_str = "dddd" | ||
| 13616 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13617 | |||
| 13618 | __nvvm_fma_rp_f | ||
| 13619 | .param_str = "ffff" | ||
| 13620 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13621 | |||
| 13622 | __nvvm_fma_rp_ftz_f | ||
| 13623 | .param_str = "ffff" | ||
| 13624 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13625 | |||
| 13626 | __nvvm_fma_rz_d | ||
| 13627 | .param_str = "dddd" | ||
| 13628 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13629 | |||
| 13630 | __nvvm_fma_rz_f | ||
| 13631 | .param_str = "ffff" | ||
| 13632 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13633 | |||
| 13634 | __nvvm_fma_rz_ftz_f | ||
| 13635 | .param_str = "ffff" | ||
| 13636 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13637 | |||
| 13638 | __nvvm_fmax_d | ||
| 13639 | .param_str = "ddd" | ||
| 13640 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13641 | |||
| 13642 | __nvvm_fmax_f | ||
| 13643 | .param_str = "fff" | ||
| 13644 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13645 | |||
| 13646 | __nvvm_fmax_ftz_f | ||
| 13647 | .param_str = "fff" | ||
| 13648 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13649 | |||
| 13650 | __nvvm_fmin_d | ||
| 13651 | .param_str = "ddd" | ||
| 13652 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13653 | |||
| 13654 | __nvvm_fmin_f | ||
| 13655 | .param_str = "fff" | ||
| 13656 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13657 | |||
| 13658 | __nvvm_fmin_ftz_f | ||
| 13659 | .param_str = "fff" | ||
| 13660 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13661 | |||
| 13662 | __nvvm_i2d_rm | ||
| 13663 | .param_str = "di" | ||
| 13664 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13665 | |||
| 13666 | __nvvm_i2d_rn | ||
| 13667 | .param_str = "di" | ||
| 13668 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13669 | |||
| 13670 | __nvvm_i2d_rp | ||
| 13671 | .param_str = "di" | ||
| 13672 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13673 | |||
| 13674 | __nvvm_i2d_rz | ||
| 13675 | .param_str = "di" | ||
| 13676 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13677 | |||
| 13678 | __nvvm_i2f_rm | ||
| 13679 | .param_str = "fi" | ||
| 13680 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13681 | |||
| 13682 | __nvvm_i2f_rn | ||
| 13683 | .param_str = "fi" | ||
| 13684 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13685 | |||
| 13686 | __nvvm_i2f_rp | ||
| 13687 | .param_str = "fi" | ||
| 13688 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13689 | |||
| 13690 | __nvvm_i2f_rz | ||
| 13691 | .param_str = "fi" | ||
| 13692 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13693 | |||
| 13694 | __nvvm_isspacep_const | ||
| 13695 | .param_str = "bvC*" | ||
| 13696 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13697 | .attributes = .{ .@"const" = true } | ||
| 13698 | |||
| 13699 | __nvvm_isspacep_global | ||
| 13700 | .param_str = "bvC*" | ||
| 13701 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13702 | .attributes = .{ .@"const" = true } | ||
| 13703 | |||
| 13704 | __nvvm_isspacep_local | ||
| 13705 | .param_str = "bvC*" | ||
| 13706 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13707 | .attributes = .{ .@"const" = true } | ||
| 13708 | |||
| 13709 | __nvvm_isspacep_shared | ||
| 13710 | .param_str = "bvC*" | ||
| 13711 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13712 | .attributes = .{ .@"const" = true } | ||
| 13713 | |||
| 13714 | __nvvm_ldg_c | ||
| 13715 | .param_str = "ccC*" | ||
| 13716 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13717 | |||
| 13718 | __nvvm_ldg_c2 | ||
| 13719 | .param_str = "E2cE2cC*" | ||
| 13720 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13721 | |||
| 13722 | __nvvm_ldg_c4 | ||
| 13723 | .param_str = "E4cE4cC*" | ||
| 13724 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13725 | |||
| 13726 | __nvvm_ldg_d | ||
| 13727 | .param_str = "ddC*" | ||
| 13728 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13729 | |||
| 13730 | __nvvm_ldg_d2 | ||
| 13731 | .param_str = "E2dE2dC*" | ||
| 13732 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13733 | |||
| 13734 | __nvvm_ldg_f | ||
| 13735 | .param_str = "ffC*" | ||
| 13736 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13737 | |||
| 13738 | __nvvm_ldg_f2 | ||
| 13739 | .param_str = "E2fE2fC*" | ||
| 13740 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13741 | |||
| 13742 | __nvvm_ldg_f4 | ||
| 13743 | .param_str = "E4fE4fC*" | ||
| 13744 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13745 | |||
| 13746 | __nvvm_ldg_h | ||
| 13747 | .param_str = "hhC*" | ||
| 13748 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13749 | |||
| 13750 | __nvvm_ldg_h2 | ||
| 13751 | .param_str = "E2hE2hC*" | ||
| 13752 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13753 | |||
| 13754 | __nvvm_ldg_i | ||
| 13755 | .param_str = "iiC*" | ||
| 13756 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13757 | |||
| 13758 | __nvvm_ldg_i2 | ||
| 13759 | .param_str = "E2iE2iC*" | ||
| 13760 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13761 | |||
| 13762 | __nvvm_ldg_i4 | ||
| 13763 | .param_str = "E4iE4iC*" | ||
| 13764 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13765 | |||
| 13766 | __nvvm_ldg_l | ||
| 13767 | .param_str = "LiLiC*" | ||
| 13768 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13769 | |||
| 13770 | __nvvm_ldg_l2 | ||
| 13771 | .param_str = "E2LiE2LiC*" | ||
| 13772 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13773 | |||
| 13774 | __nvvm_ldg_ll | ||
| 13775 | .param_str = "LLiLLiC*" | ||
| 13776 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13777 | |||
| 13778 | __nvvm_ldg_ll2 | ||
| 13779 | .param_str = "E2LLiE2LLiC*" | ||
| 13780 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13781 | |||
| 13782 | __nvvm_ldg_s | ||
| 13783 | .param_str = "ssC*" | ||
| 13784 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13785 | |||
| 13786 | __nvvm_ldg_s2 | ||
| 13787 | .param_str = "E2sE2sC*" | ||
| 13788 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13789 | |||
| 13790 | __nvvm_ldg_s4 | ||
| 13791 | .param_str = "E4sE4sC*" | ||
| 13792 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13793 | |||
| 13794 | __nvvm_ldg_sc | ||
| 13795 | .param_str = "ScScC*" | ||
| 13796 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13797 | |||
| 13798 | __nvvm_ldg_sc2 | ||
| 13799 | .param_str = "E2ScE2ScC*" | ||
| 13800 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13801 | |||
| 13802 | __nvvm_ldg_sc4 | ||
| 13803 | .param_str = "E4ScE4ScC*" | ||
| 13804 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13805 | |||
| 13806 | __nvvm_ldg_uc | ||
| 13807 | .param_str = "UcUcC*" | ||
| 13808 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13809 | |||
| 13810 | __nvvm_ldg_uc2 | ||
| 13811 | .param_str = "E2UcE2UcC*" | ||
| 13812 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13813 | |||
| 13814 | __nvvm_ldg_uc4 | ||
| 13815 | .param_str = "E4UcE4UcC*" | ||
| 13816 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13817 | |||
| 13818 | __nvvm_ldg_ui | ||
| 13819 | .param_str = "UiUiC*" | ||
| 13820 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13821 | |||
| 13822 | __nvvm_ldg_ui2 | ||
| 13823 | .param_str = "E2UiE2UiC*" | ||
| 13824 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13825 | |||
| 13826 | __nvvm_ldg_ui4 | ||
| 13827 | .param_str = "E4UiE4UiC*" | ||
| 13828 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13829 | |||
| 13830 | __nvvm_ldg_ul | ||
| 13831 | .param_str = "ULiULiC*" | ||
| 13832 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13833 | |||
| 13834 | __nvvm_ldg_ul2 | ||
| 13835 | .param_str = "E2ULiE2ULiC*" | ||
| 13836 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13837 | |||
| 13838 | __nvvm_ldg_ull | ||
| 13839 | .param_str = "ULLiULLiC*" | ||
| 13840 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13841 | |||
| 13842 | __nvvm_ldg_ull2 | ||
| 13843 | .param_str = "E2ULLiE2ULLiC*" | ||
| 13844 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13845 | |||
| 13846 | __nvvm_ldg_us | ||
| 13847 | .param_str = "UsUsC*" | ||
| 13848 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13849 | |||
| 13850 | __nvvm_ldg_us2 | ||
| 13851 | .param_str = "E2UsE2UsC*" | ||
| 13852 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13853 | |||
| 13854 | __nvvm_ldg_us4 | ||
| 13855 | .param_str = "E4UsE4UsC*" | ||
| 13856 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13857 | |||
| 13858 | __nvvm_ldu_c | ||
| 13859 | .param_str = "ccC*" | ||
| 13860 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13861 | |||
| 13862 | __nvvm_ldu_c2 | ||
| 13863 | .param_str = "E2cE2cC*" | ||
| 13864 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13865 | |||
| 13866 | __nvvm_ldu_c4 | ||
| 13867 | .param_str = "E4cE4cC*" | ||
| 13868 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13869 | |||
| 13870 | __nvvm_ldu_d | ||
| 13871 | .param_str = "ddC*" | ||
| 13872 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13873 | |||
| 13874 | __nvvm_ldu_d2 | ||
| 13875 | .param_str = "E2dE2dC*" | ||
| 13876 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13877 | |||
| 13878 | __nvvm_ldu_f | ||
| 13879 | .param_str = "ffC*" | ||
| 13880 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13881 | |||
| 13882 | __nvvm_ldu_f2 | ||
| 13883 | .param_str = "E2fE2fC*" | ||
| 13884 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13885 | |||
| 13886 | __nvvm_ldu_f4 | ||
| 13887 | .param_str = "E4fE4fC*" | ||
| 13888 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13889 | |||
| 13890 | __nvvm_ldu_h | ||
| 13891 | .param_str = "hhC*" | ||
| 13892 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13893 | |||
| 13894 | __nvvm_ldu_h2 | ||
| 13895 | .param_str = "E2hE2hC*" | ||
| 13896 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13897 | |||
| 13898 | __nvvm_ldu_i | ||
| 13899 | .param_str = "iiC*" | ||
| 13900 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13901 | |||
| 13902 | __nvvm_ldu_i2 | ||
| 13903 | .param_str = "E2iE2iC*" | ||
| 13904 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13905 | |||
| 13906 | __nvvm_ldu_i4 | ||
| 13907 | .param_str = "E4iE4iC*" | ||
| 13908 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13909 | |||
| 13910 | __nvvm_ldu_l | ||
| 13911 | .param_str = "LiLiC*" | ||
| 13912 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13913 | |||
| 13914 | __nvvm_ldu_l2 | ||
| 13915 | .param_str = "E2LiE2LiC*" | ||
| 13916 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13917 | |||
| 13918 | __nvvm_ldu_ll | ||
| 13919 | .param_str = "LLiLLiC*" | ||
| 13920 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13921 | |||
| 13922 | __nvvm_ldu_ll2 | ||
| 13923 | .param_str = "E2LLiE2LLiC*" | ||
| 13924 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13925 | |||
| 13926 | __nvvm_ldu_s | ||
| 13927 | .param_str = "ssC*" | ||
| 13928 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13929 | |||
| 13930 | __nvvm_ldu_s2 | ||
| 13931 | .param_str = "E2sE2sC*" | ||
| 13932 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13933 | |||
| 13934 | __nvvm_ldu_s4 | ||
| 13935 | .param_str = "E4sE4sC*" | ||
| 13936 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13937 | |||
| 13938 | __nvvm_ldu_sc | ||
| 13939 | .param_str = "ScScC*" | ||
| 13940 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13941 | |||
| 13942 | __nvvm_ldu_sc2 | ||
| 13943 | .param_str = "E2ScE2ScC*" | ||
| 13944 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13945 | |||
| 13946 | __nvvm_ldu_sc4 | ||
| 13947 | .param_str = "E4ScE4ScC*" | ||
| 13948 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13949 | |||
| 13950 | __nvvm_ldu_uc | ||
| 13951 | .param_str = "UcUcC*" | ||
| 13952 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13953 | |||
| 13954 | __nvvm_ldu_uc2 | ||
| 13955 | .param_str = "E2UcE2UcC*" | ||
| 13956 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13957 | |||
| 13958 | __nvvm_ldu_uc4 | ||
| 13959 | .param_str = "E4UcE4UcC*" | ||
| 13960 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13961 | |||
| 13962 | __nvvm_ldu_ui | ||
| 13963 | .param_str = "UiUiC*" | ||
| 13964 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13965 | |||
| 13966 | __nvvm_ldu_ui2 | ||
| 13967 | .param_str = "E2UiE2UiC*" | ||
| 13968 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13969 | |||
| 13970 | __nvvm_ldu_ui4 | ||
| 13971 | .param_str = "E4UiE4UiC*" | ||
| 13972 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13973 | |||
| 13974 | __nvvm_ldu_ul | ||
| 13975 | .param_str = "ULiULiC*" | ||
| 13976 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13977 | |||
| 13978 | __nvvm_ldu_ul2 | ||
| 13979 | .param_str = "E2ULiE2ULiC*" | ||
| 13980 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13981 | |||
| 13982 | __nvvm_ldu_ull | ||
| 13983 | .param_str = "ULLiULLiC*" | ||
| 13984 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13985 | |||
| 13986 | __nvvm_ldu_ull2 | ||
| 13987 | .param_str = "E2ULLiE2ULLiC*" | ||
| 13988 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13989 | |||
| 13990 | __nvvm_ldu_us | ||
| 13991 | .param_str = "UsUsC*" | ||
| 13992 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13993 | |||
| 13994 | __nvvm_ldu_us2 | ||
| 13995 | .param_str = "E2UsE2UsC*" | ||
| 13996 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13997 | |||
| 13998 | __nvvm_ldu_us4 | ||
| 13999 | .param_str = "E4UsE4UsC*" | ||
| 14000 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14001 | |||
| 14002 | __nvvm_lg2_approx_d | ||
| 14003 | .param_str = "dd" | ||
| 14004 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14005 | |||
| 14006 | __nvvm_lg2_approx_f | ||
| 14007 | .param_str = "ff" | ||
| 14008 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14009 | |||
| 14010 | __nvvm_lg2_approx_ftz_f | ||
| 14011 | .param_str = "ff" | ||
| 14012 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14013 | |||
| 14014 | __nvvm_ll2d_rm | ||
| 14015 | .param_str = "dLLi" | ||
| 14016 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14017 | |||
| 14018 | __nvvm_ll2d_rn | ||
| 14019 | .param_str = "dLLi" | ||
| 14020 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14021 | |||
| 14022 | __nvvm_ll2d_rp | ||
| 14023 | .param_str = "dLLi" | ||
| 14024 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14025 | |||
| 14026 | __nvvm_ll2d_rz | ||
| 14027 | .param_str = "dLLi" | ||
| 14028 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14029 | |||
| 14030 | __nvvm_ll2f_rm | ||
| 14031 | .param_str = "fLLi" | ||
| 14032 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14033 | |||
| 14034 | __nvvm_ll2f_rn | ||
| 14035 | .param_str = "fLLi" | ||
| 14036 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14037 | |||
| 14038 | __nvvm_ll2f_rp | ||
| 14039 | .param_str = "fLLi" | ||
| 14040 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14041 | |||
| 14042 | __nvvm_ll2f_rz | ||
| 14043 | .param_str = "fLLi" | ||
| 14044 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14045 | |||
| 14046 | __nvvm_lohi_i2d | ||
| 14047 | .param_str = "dii" | ||
| 14048 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14049 | |||
| 14050 | __nvvm_membar_cta | ||
| 14051 | .param_str = "v" | ||
| 14052 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14053 | |||
| 14054 | __nvvm_membar_gl | ||
| 14055 | .param_str = "v" | ||
| 14056 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14057 | |||
| 14058 | __nvvm_membar_sys | ||
| 14059 | .param_str = "v" | ||
| 14060 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14061 | |||
| 14062 | __nvvm_memcpy | ||
| 14063 | .param_str = "vUc*Uc*zi" | ||
| 14064 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14065 | |||
| 14066 | __nvvm_memset | ||
| 14067 | .param_str = "vUc*Uczi" | ||
| 14068 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14069 | |||
| 14070 | __nvvm_mul24_i | ||
| 14071 | .param_str = "iii" | ||
| 14072 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14073 | |||
| 14074 | __nvvm_mul24_ui | ||
| 14075 | .param_str = "UiUiUi" | ||
| 14076 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14077 | |||
| 14078 | __nvvm_mul_rm_d | ||
| 14079 | .param_str = "ddd" | ||
| 14080 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14081 | |||
| 14082 | __nvvm_mul_rm_f | ||
| 14083 | .param_str = "fff" | ||
| 14084 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14085 | |||
| 14086 | __nvvm_mul_rm_ftz_f | ||
| 14087 | .param_str = "fff" | ||
| 14088 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14089 | |||
| 14090 | __nvvm_mul_rn_d | ||
| 14091 | .param_str = "ddd" | ||
| 14092 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14093 | |||
| 14094 | __nvvm_mul_rn_f | ||
| 14095 | .param_str = "fff" | ||
| 14096 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14097 | |||
| 14098 | __nvvm_mul_rn_ftz_f | ||
| 14099 | .param_str = "fff" | ||
| 14100 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14101 | |||
| 14102 | __nvvm_mul_rp_d | ||
| 14103 | .param_str = "ddd" | ||
| 14104 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14105 | |||
| 14106 | __nvvm_mul_rp_f | ||
| 14107 | .param_str = "fff" | ||
| 14108 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14109 | |||
| 14110 | __nvvm_mul_rp_ftz_f | ||
| 14111 | .param_str = "fff" | ||
| 14112 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14113 | |||
| 14114 | __nvvm_mul_rz_d | ||
| 14115 | .param_str = "ddd" | ||
| 14116 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14117 | |||
| 14118 | __nvvm_mul_rz_f | ||
| 14119 | .param_str = "fff" | ||
| 14120 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14121 | |||
| 14122 | __nvvm_mul_rz_ftz_f | ||
| 14123 | .param_str = "fff" | ||
| 14124 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14125 | |||
| 14126 | __nvvm_mulhi_i | ||
| 14127 | .param_str = "iii" | ||
| 14128 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14129 | |||
| 14130 | __nvvm_mulhi_ll | ||
| 14131 | .param_str = "LLiLLiLLi" | ||
| 14132 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14133 | |||
| 14134 | __nvvm_mulhi_ui | ||
| 14135 | .param_str = "UiUiUi" | ||
| 14136 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14137 | |||
| 14138 | __nvvm_mulhi_ull | ||
| 14139 | .param_str = "ULLiULLiULLi" | ||
| 14140 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14141 | |||
| 14142 | __nvvm_prmt | ||
| 14143 | .param_str = "UiUiUiUi" | ||
| 14144 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14145 | |||
| 14146 | __nvvm_rcp_approx_ftz_d | ||
| 14147 | .param_str = "dd" | ||
| 14148 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14149 | |||
| 14150 | __nvvm_rcp_approx_ftz_f | ||
| 14151 | .param_str = "ff" | ||
| 14152 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14153 | |||
| 14154 | __nvvm_rcp_rm_d | ||
| 14155 | .param_str = "dd" | ||
| 14156 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14157 | |||
| 14158 | __nvvm_rcp_rm_f | ||
| 14159 | .param_str = "ff" | ||
| 14160 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14161 | |||
| 14162 | __nvvm_rcp_rm_ftz_f | ||
| 14163 | .param_str = "ff" | ||
| 14164 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14165 | |||
| 14166 | __nvvm_rcp_rn_d | ||
| 14167 | .param_str = "dd" | ||
| 14168 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14169 | |||
| 14170 | __nvvm_rcp_rn_f | ||
| 14171 | .param_str = "ff" | ||
| 14172 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14173 | |||
| 14174 | __nvvm_rcp_rn_ftz_f | ||
| 14175 | .param_str = "ff" | ||
| 14176 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14177 | |||
| 14178 | __nvvm_rcp_rp_d | ||
| 14179 | .param_str = "dd" | ||
| 14180 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14181 | |||
| 14182 | __nvvm_rcp_rp_f | ||
| 14183 | .param_str = "ff" | ||
| 14184 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14185 | |||
| 14186 | __nvvm_rcp_rp_ftz_f | ||
| 14187 | .param_str = "ff" | ||
| 14188 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14189 | |||
| 14190 | __nvvm_rcp_rz_d | ||
| 14191 | .param_str = "dd" | ||
| 14192 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14193 | |||
| 14194 | __nvvm_rcp_rz_f | ||
| 14195 | .param_str = "ff" | ||
| 14196 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14197 | |||
| 14198 | __nvvm_rcp_rz_ftz_f | ||
| 14199 | .param_str = "ff" | ||
| 14200 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14201 | |||
| 14202 | __nvvm_read_ptx_sreg_clock | ||
| 14203 | .param_str = "i" | ||
| 14204 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14205 | |||
| 14206 | __nvvm_read_ptx_sreg_clock64 | ||
| 14207 | .param_str = "LLi" | ||
| 14208 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14209 | |||
| 14210 | __nvvm_read_ptx_sreg_ctaid_w | ||
| 14211 | .param_str = "i" | ||
| 14212 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14213 | .attributes = .{ .@"const" = true } | ||
| 14214 | |||
| 14215 | __nvvm_read_ptx_sreg_ctaid_x | ||
| 14216 | .param_str = "i" | ||
| 14217 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14218 | .attributes = .{ .@"const" = true } | ||
| 14219 | |||
| 14220 | __nvvm_read_ptx_sreg_ctaid_y | ||
| 14221 | .param_str = "i" | ||
| 14222 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14223 | .attributes = .{ .@"const" = true } | ||
| 14224 | |||
| 14225 | __nvvm_read_ptx_sreg_ctaid_z | ||
| 14226 | .param_str = "i" | ||
| 14227 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14228 | .attributes = .{ .@"const" = true } | ||
| 14229 | |||
| 14230 | __nvvm_read_ptx_sreg_gridid | ||
| 14231 | .param_str = "i" | ||
| 14232 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14233 | .attributes = .{ .@"const" = true } | ||
| 14234 | |||
| 14235 | __nvvm_read_ptx_sreg_laneid | ||
| 14236 | .param_str = "i" | ||
| 14237 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14238 | .attributes = .{ .@"const" = true } | ||
| 14239 | |||
| 14240 | __nvvm_read_ptx_sreg_lanemask_eq | ||
| 14241 | .param_str = "i" | ||
| 14242 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14243 | .attributes = .{ .@"const" = true } | ||
| 14244 | |||
| 14245 | __nvvm_read_ptx_sreg_lanemask_ge | ||
| 14246 | .param_str = "i" | ||
| 14247 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14248 | .attributes = .{ .@"const" = true } | ||
| 14249 | |||
| 14250 | __nvvm_read_ptx_sreg_lanemask_gt | ||
| 14251 | .param_str = "i" | ||
| 14252 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14253 | .attributes = .{ .@"const" = true } | ||
| 14254 | |||
| 14255 | __nvvm_read_ptx_sreg_lanemask_le | ||
| 14256 | .param_str = "i" | ||
| 14257 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14258 | .attributes = .{ .@"const" = true } | ||
| 14259 | |||
| 14260 | __nvvm_read_ptx_sreg_lanemask_lt | ||
| 14261 | .param_str = "i" | ||
| 14262 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14263 | .attributes = .{ .@"const" = true } | ||
| 14264 | |||
| 14265 | __nvvm_read_ptx_sreg_nctaid_w | ||
| 14266 | .param_str = "i" | ||
| 14267 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14268 | .attributes = .{ .@"const" = true } | ||
| 14269 | |||
| 14270 | __nvvm_read_ptx_sreg_nctaid_x | ||
| 14271 | .param_str = "i" | ||
| 14272 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14273 | .attributes = .{ .@"const" = true } | ||
| 14274 | |||
| 14275 | __nvvm_read_ptx_sreg_nctaid_y | ||
| 14276 | .param_str = "i" | ||
| 14277 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14278 | .attributes = .{ .@"const" = true } | ||
| 14279 | |||
| 14280 | __nvvm_read_ptx_sreg_nctaid_z | ||
| 14281 | .param_str = "i" | ||
| 14282 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14283 | .attributes = .{ .@"const" = true } | ||
| 14284 | |||
| 14285 | __nvvm_read_ptx_sreg_nsmid | ||
| 14286 | .param_str = "i" | ||
| 14287 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14288 | .attributes = .{ .@"const" = true } | ||
| 14289 | |||
| 14290 | __nvvm_read_ptx_sreg_ntid_w | ||
| 14291 | .param_str = "i" | ||
| 14292 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14293 | .attributes = .{ .@"const" = true } | ||
| 14294 | |||
| 14295 | __nvvm_read_ptx_sreg_ntid_x | ||
| 14296 | .param_str = "i" | ||
| 14297 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14298 | .attributes = .{ .@"const" = true } | ||
| 14299 | |||
| 14300 | __nvvm_read_ptx_sreg_ntid_y | ||
| 14301 | .param_str = "i" | ||
| 14302 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14303 | .attributes = .{ .@"const" = true } | ||
| 14304 | |||
| 14305 | __nvvm_read_ptx_sreg_ntid_z | ||
| 14306 | .param_str = "i" | ||
| 14307 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14308 | .attributes = .{ .@"const" = true } | ||
| 14309 | |||
| 14310 | __nvvm_read_ptx_sreg_nwarpid | ||
| 14311 | .param_str = "i" | ||
| 14312 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14313 | .attributes = .{ .@"const" = true } | ||
| 14314 | |||
| 14315 | __nvvm_read_ptx_sreg_pm0 | ||
| 14316 | .param_str = "i" | ||
| 14317 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14318 | |||
| 14319 | __nvvm_read_ptx_sreg_pm1 | ||
| 14320 | .param_str = "i" | ||
| 14321 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14322 | |||
| 14323 | __nvvm_read_ptx_sreg_pm2 | ||
| 14324 | .param_str = "i" | ||
| 14325 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14326 | |||
| 14327 | __nvvm_read_ptx_sreg_pm3 | ||
| 14328 | .param_str = "i" | ||
| 14329 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14330 | |||
| 14331 | __nvvm_read_ptx_sreg_smid | ||
| 14332 | .param_str = "i" | ||
| 14333 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14334 | .attributes = .{ .@"const" = true } | ||
| 14335 | |||
| 14336 | __nvvm_read_ptx_sreg_tid_w | ||
| 14337 | .param_str = "i" | ||
| 14338 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14339 | .attributes = .{ .@"const" = true } | ||
| 14340 | |||
| 14341 | __nvvm_read_ptx_sreg_tid_x | ||
| 14342 | .param_str = "i" | ||
| 14343 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14344 | .attributes = .{ .@"const" = true } | ||
| 14345 | |||
| 14346 | __nvvm_read_ptx_sreg_tid_y | ||
| 14347 | .param_str = "i" | ||
| 14348 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14349 | .attributes = .{ .@"const" = true } | ||
| 14350 | |||
| 14351 | __nvvm_read_ptx_sreg_tid_z | ||
| 14352 | .param_str = "i" | ||
| 14353 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14354 | .attributes = .{ .@"const" = true } | ||
| 14355 | |||
| 14356 | __nvvm_read_ptx_sreg_warpid | ||
| 14357 | .param_str = "i" | ||
| 14358 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14359 | .attributes = .{ .@"const" = true } | ||
| 14360 | |||
| 14361 | __nvvm_round_d | ||
| 14362 | .param_str = "dd" | ||
| 14363 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14364 | |||
| 14365 | __nvvm_round_f | ||
| 14366 | .param_str = "ff" | ||
| 14367 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14368 | |||
| 14369 | __nvvm_round_ftz_f | ||
| 14370 | .param_str = "ff" | ||
| 14371 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14372 | |||
| 14373 | __nvvm_rsqrt_approx_d | ||
| 14374 | .param_str = "dd" | ||
| 14375 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14376 | |||
| 14377 | __nvvm_rsqrt_approx_f | ||
| 14378 | .param_str = "ff" | ||
| 14379 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14380 | |||
| 14381 | __nvvm_rsqrt_approx_ftz_f | ||
| 14382 | .param_str = "ff" | ||
| 14383 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14384 | |||
| 14385 | __nvvm_sad_i | ||
| 14386 | .param_str = "iiii" | ||
| 14387 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14388 | |||
| 14389 | __nvvm_sad_ui | ||
| 14390 | .param_str = "UiUiUiUi" | ||
| 14391 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14392 | |||
| 14393 | __nvvm_saturate_d | ||
| 14394 | .param_str = "dd" | ||
| 14395 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14396 | |||
| 14397 | __nvvm_saturate_f | ||
| 14398 | .param_str = "ff" | ||
| 14399 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14400 | |||
| 14401 | __nvvm_saturate_ftz_f | ||
| 14402 | .param_str = "ff" | ||
| 14403 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14404 | |||
| 14405 | __nvvm_shfl_bfly_f32 | ||
| 14406 | .param_str = "ffii" | ||
| 14407 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14408 | |||
| 14409 | __nvvm_shfl_bfly_i32 | ||
| 14410 | .param_str = "iiii" | ||
| 14411 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14412 | |||
| 14413 | __nvvm_shfl_down_f32 | ||
| 14414 | .param_str = "ffii" | ||
| 14415 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14416 | |||
| 14417 | __nvvm_shfl_down_i32 | ||
| 14418 | .param_str = "iiii" | ||
| 14419 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14420 | |||
| 14421 | __nvvm_shfl_idx_f32 | ||
| 14422 | .param_str = "ffii" | ||
| 14423 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14424 | |||
| 14425 | __nvvm_shfl_idx_i32 | ||
| 14426 | .param_str = "iiii" | ||
| 14427 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14428 | |||
| 14429 | __nvvm_shfl_up_f32 | ||
| 14430 | .param_str = "ffii" | ||
| 14431 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14432 | |||
| 14433 | __nvvm_shfl_up_i32 | ||
| 14434 | .param_str = "iiii" | ||
| 14435 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14436 | |||
| 14437 | __nvvm_sin_approx_f | ||
| 14438 | .param_str = "ff" | ||
| 14439 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14440 | |||
| 14441 | __nvvm_sin_approx_ftz_f | ||
| 14442 | .param_str = "ff" | ||
| 14443 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14444 | |||
| 14445 | __nvvm_sqrt_approx_f | ||
| 14446 | .param_str = "ff" | ||
| 14447 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14448 | |||
| 14449 | __nvvm_sqrt_approx_ftz_f | ||
| 14450 | .param_str = "ff" | ||
| 14451 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14452 | |||
| 14453 | __nvvm_sqrt_rm_d | ||
| 14454 | .param_str = "dd" | ||
| 14455 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14456 | |||
| 14457 | __nvvm_sqrt_rm_f | ||
| 14458 | .param_str = "ff" | ||
| 14459 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14460 | |||
| 14461 | __nvvm_sqrt_rm_ftz_f | ||
| 14462 | .param_str = "ff" | ||
| 14463 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14464 | |||
| 14465 | __nvvm_sqrt_rn_d | ||
| 14466 | .param_str = "dd" | ||
| 14467 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14468 | |||
| 14469 | __nvvm_sqrt_rn_f | ||
| 14470 | .param_str = "ff" | ||
| 14471 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14472 | |||
| 14473 | __nvvm_sqrt_rn_ftz_f | ||
| 14474 | .param_str = "ff" | ||
| 14475 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14476 | |||
| 14477 | __nvvm_sqrt_rp_d | ||
| 14478 | .param_str = "dd" | ||
| 14479 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14480 | |||
| 14481 | __nvvm_sqrt_rp_f | ||
| 14482 | .param_str = "ff" | ||
| 14483 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14484 | |||
| 14485 | __nvvm_sqrt_rp_ftz_f | ||
| 14486 | .param_str = "ff" | ||
| 14487 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14488 | |||
| 14489 | __nvvm_sqrt_rz_d | ||
| 14490 | .param_str = "dd" | ||
| 14491 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14492 | |||
| 14493 | __nvvm_sqrt_rz_f | ||
| 14494 | .param_str = "ff" | ||
| 14495 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14496 | |||
| 14497 | __nvvm_sqrt_rz_ftz_f | ||
| 14498 | .param_str = "ff" | ||
| 14499 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14500 | |||
| 14501 | __nvvm_trunc_d | ||
| 14502 | .param_str = "dd" | ||
| 14503 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14504 | |||
| 14505 | __nvvm_trunc_f | ||
| 14506 | .param_str = "ff" | ||
| 14507 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14508 | |||
| 14509 | __nvvm_trunc_ftz_f | ||
| 14510 | .param_str = "ff" | ||
| 14511 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14512 | |||
| 14513 | __nvvm_ui2d_rm | ||
| 14514 | .param_str = "dUi" | ||
| 14515 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14516 | |||
| 14517 | __nvvm_ui2d_rn | ||
| 14518 | .param_str = "dUi" | ||
| 14519 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14520 | |||
| 14521 | __nvvm_ui2d_rp | ||
| 14522 | .param_str = "dUi" | ||
| 14523 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14524 | |||
| 14525 | __nvvm_ui2d_rz | ||
| 14526 | .param_str = "dUi" | ||
| 14527 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14528 | |||
| 14529 | __nvvm_ui2f_rm | ||
| 14530 | .param_str = "fUi" | ||
| 14531 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14532 | |||
| 14533 | __nvvm_ui2f_rn | ||
| 14534 | .param_str = "fUi" | ||
| 14535 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14536 | |||
| 14537 | __nvvm_ui2f_rp | ||
| 14538 | .param_str = "fUi" | ||
| 14539 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14540 | |||
| 14541 | __nvvm_ui2f_rz | ||
| 14542 | .param_str = "fUi" | ||
| 14543 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14544 | |||
| 14545 | __nvvm_ull2d_rm | ||
| 14546 | .param_str = "dULLi" | ||
| 14547 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14548 | |||
| 14549 | __nvvm_ull2d_rn | ||
| 14550 | .param_str = "dULLi" | ||
| 14551 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14552 | |||
| 14553 | __nvvm_ull2d_rp | ||
| 14554 | .param_str = "dULLi" | ||
| 14555 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14556 | |||
| 14557 | __nvvm_ull2d_rz | ||
| 14558 | .param_str = "dULLi" | ||
| 14559 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14560 | |||
| 14561 | __nvvm_ull2f_rm | ||
| 14562 | .param_str = "fULLi" | ||
| 14563 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14564 | |||
| 14565 | __nvvm_ull2f_rn | ||
| 14566 | .param_str = "fULLi" | ||
| 14567 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14568 | |||
| 14569 | __nvvm_ull2f_rp | ||
| 14570 | .param_str = "fULLi" | ||
| 14571 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14572 | |||
| 14573 | __nvvm_ull2f_rz | ||
| 14574 | .param_str = "fULLi" | ||
| 14575 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14576 | |||
| 14577 | __nvvm_vote_all | ||
| 14578 | .param_str = "bb" | ||
| 14579 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14580 | |||
| 14581 | __nvvm_vote_any | ||
| 14582 | .param_str = "bb" | ||
| 14583 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14584 | |||
| 14585 | __nvvm_vote_ballot | ||
| 14586 | .param_str = "Uib" | ||
| 14587 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14588 | |||
| 14589 | __nvvm_vote_uni | ||
| 14590 | .param_str = "bb" | ||
| 14591 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14592 | |||
| 14593 | __popcnt | ||
| 14594 | .param_str = "UiUi" | ||
| 14595 | .language = .all_ms_languages | ||
| 14596 | .attributes = .{ .@"const" = true, .const_evaluable = true } | ||
| 14597 | |||
| 14598 | __popcnt16 | ||
| 14599 | .param_str = "UsUs" | ||
| 14600 | .language = .all_ms_languages | ||
| 14601 | .attributes = .{ .@"const" = true, .const_evaluable = true } | ||
| 14602 | |||
| 14603 | __popcnt64 | ||
| 14604 | .param_str = "UWiUWi" | ||
| 14605 | .language = .all_ms_languages | ||
| 14606 | .attributes = .{ .@"const" = true, .const_evaluable = true } | ||
| 14607 | |||
| 14608 | __rdtsc | ||
| 14609 | .param_str = "UOi" | ||
| 14610 | .target_set = TargetSet.initOne(.x86) | ||
| 14611 | |||
| 14612 | __sev | ||
| 14613 | .param_str = "v" | ||
| 14614 | .language = .all_ms_languages | ||
| 14615 | .target_set = TargetSet.initMany(&.{ .aarch64, .arm }) | ||
| 14616 | |||
| 14617 | __sevl | ||
| 14618 | .param_str = "v" | ||
| 14619 | .language = .all_ms_languages | ||
| 14620 | .target_set = TargetSet.initMany(&.{ .aarch64, .arm }) | ||
| 14621 | |||
| 14622 | __sigsetjmp | ||
| 14623 | .param_str = "iSJi" | ||
| 14624 | .header = .setjmp | ||
| 14625 | .attributes = .{ .allow_type_mismatch = true, .lib_function_without_prefix = true, .returns_twice = true } | ||
| 14626 | |||
| 14627 | __sinpi | ||
| 14628 | .param_str = "dd" | ||
| 14629 | .header = .math | ||
| 14630 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 14631 | |||
| 14632 | __sinpif | ||
| 14633 | .param_str = "ff" | ||
| 14634 | .header = .math | ||
| 14635 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 14636 | |||
| 14637 | __sync_add_and_fetch | ||
| 14638 | .param_str = "v." | ||
| 14639 | .attributes = .{ .custom_typecheck = true } | ||
| 14640 | |||
| 14641 | __sync_add_and_fetch_1 | ||
| 14642 | .param_str = "ccD*c." | ||
| 14643 | .attributes = .{ .custom_typecheck = true } | ||
| 14644 | |||
| 14645 | __sync_add_and_fetch_16 | ||
| 14646 | .param_str = "LLLiLLLiD*LLLi." | ||
| 14647 | .attributes = .{ .custom_typecheck = true } | ||
| 14648 | |||
| 14649 | __sync_add_and_fetch_2 | ||
| 14650 | .param_str = "ssD*s." | ||
| 14651 | .attributes = .{ .custom_typecheck = true } | ||
| 14652 | |||
| 14653 | __sync_add_and_fetch_4 | ||
| 14654 | .param_str = "iiD*i." | ||
| 14655 | .attributes = .{ .custom_typecheck = true } | ||
| 14656 | |||
| 14657 | __sync_add_and_fetch_8 | ||
| 14658 | .param_str = "LLiLLiD*LLi." | ||
| 14659 | .attributes = .{ .custom_typecheck = true } | ||
| 14660 | |||
| 14661 | __sync_and_and_fetch | ||
| 14662 | .param_str = "v." | ||
| 14663 | .attributes = .{ .custom_typecheck = true } | ||
| 14664 | |||
| 14665 | __sync_and_and_fetch_1 | ||
| 14666 | .param_str = "ccD*c." | ||
| 14667 | .attributes = .{ .custom_typecheck = true } | ||
| 14668 | |||
| 14669 | __sync_and_and_fetch_16 | ||
| 14670 | .param_str = "LLLiLLLiD*LLLi." | ||
| 14671 | .attributes = .{ .custom_typecheck = true } | ||
| 14672 | |||
| 14673 | __sync_and_and_fetch_2 | ||
| 14674 | .param_str = "ssD*s." | ||
| 14675 | .attributes = .{ .custom_typecheck = true } | ||
| 14676 | |||
| 14677 | __sync_and_and_fetch_4 | ||
| 14678 | .param_str = "iiD*i." | ||
| 14679 | .attributes = .{ .custom_typecheck = true } | ||
| 14680 | |||
| 14681 | __sync_and_and_fetch_8 | ||
| 14682 | .param_str = "LLiLLiD*LLi." | ||
| 14683 | .attributes = .{ .custom_typecheck = true } | ||
| 14684 | |||
| 14685 | __sync_bool_compare_and_swap | ||
| 14686 | .param_str = "v." | ||
| 14687 | .attributes = .{ .custom_typecheck = true } | ||
| 14688 | |||
| 14689 | __sync_bool_compare_and_swap_1 | ||
| 14690 | .param_str = "bcD*cc." | ||
| 14691 | .attributes = .{ .custom_typecheck = true } | ||
| 14692 | |||
| 14693 | __sync_bool_compare_and_swap_16 | ||
| 14694 | .param_str = "bLLLiD*LLLiLLLi." | ||
| 14695 | .attributes = .{ .custom_typecheck = true } | ||
| 14696 | |||
| 14697 | __sync_bool_compare_and_swap_2 | ||
| 14698 | .param_str = "bsD*ss." | ||
| 14699 | .attributes = .{ .custom_typecheck = true } | ||
| 14700 | |||
| 14701 | __sync_bool_compare_and_swap_4 | ||
| 14702 | .param_str = "biD*ii." | ||
| 14703 | .attributes = .{ .custom_typecheck = true } | ||
| 14704 | |||
| 14705 | __sync_bool_compare_and_swap_8 | ||
| 14706 | .param_str = "bLLiD*LLiLLi." | ||
| 14707 | .attributes = .{ .custom_typecheck = true } | ||
| 14708 | |||
| 14709 | __sync_fetch_and_add | ||
| 14710 | .param_str = "v." | ||
| 14711 | .attributes = .{ .custom_typecheck = true } | ||
| 14712 | |||
| 14713 | __sync_fetch_and_add_1 | ||
| 14714 | .param_str = "ccD*c." | ||
| 14715 | .attributes = .{ .custom_typecheck = true } | ||
| 14716 | |||
| 14717 | __sync_fetch_and_add_16 | ||
| 14718 | .param_str = "LLLiLLLiD*LLLi." | ||
| 14719 | .attributes = .{ .custom_typecheck = true } | ||
| 14720 | |||
| 14721 | __sync_fetch_and_add_2 | ||
| 14722 | .param_str = "ssD*s." | ||
| 14723 | .attributes = .{ .custom_typecheck = true } | ||
| 14724 | |||
| 14725 | __sync_fetch_and_add_4 | ||
| 14726 | .param_str = "iiD*i." | ||
| 14727 | .attributes = .{ .custom_typecheck = true } | ||
| 14728 | |||
| 14729 | __sync_fetch_and_add_8 | ||
| 14730 | .param_str = "LLiLLiD*LLi." | ||
| 14731 | .attributes = .{ .custom_typecheck = true } | ||
| 14732 | |||
| 14733 | __sync_fetch_and_and | ||
| 14734 | .param_str = "v." | ||
| 14735 | .attributes = .{ .custom_typecheck = true } | ||
| 14736 | |||
| 14737 | __sync_fetch_and_and_1 | ||
| 14738 | .param_str = "ccD*c." | ||
| 14739 | .attributes = .{ .custom_typecheck = true } | ||
| 14740 | |||
| 14741 | __sync_fetch_and_and_16 | ||
| 14742 | .param_str = "LLLiLLLiD*LLLi." | ||
| 14743 | .attributes = .{ .custom_typecheck = true } | ||
| 14744 | |||
| 14745 | __sync_fetch_and_and_2 | ||
| 14746 | .param_str = "ssD*s." | ||
| 14747 | .attributes = .{ .custom_typecheck = true } | ||
| 14748 | |||
| 14749 | __sync_fetch_and_and_4 | ||
| 14750 | .param_str = "iiD*i." | ||
| 14751 | .attributes = .{ .custom_typecheck = true } | ||
| 14752 | |||
| 14753 | __sync_fetch_and_and_8 | ||
| 14754 | .param_str = "LLiLLiD*LLi." | ||
| 14755 | .attributes = .{ .custom_typecheck = true } | ||
| 14756 | |||
| 14757 | __sync_fetch_and_max | ||
| 14758 | .param_str = "iiD*i" | ||
| 14759 | |||
| 14760 | __sync_fetch_and_min | ||
| 14761 | .param_str = "iiD*i" | ||
| 14762 | |||
| 14763 | __sync_fetch_and_nand | ||
| 14764 | .param_str = "v." | ||
| 14765 | .attributes = .{ .custom_typecheck = true } | ||
| 14766 | |||
| 14767 | __sync_fetch_and_nand_1 | ||
| 14768 | .param_str = "ccD*c." | ||
| 14769 | .attributes = .{ .custom_typecheck = true } | ||
| 14770 | |||
| 14771 | __sync_fetch_and_nand_16 | ||
| 14772 | .param_str = "LLLiLLLiD*LLLi." | ||
| 14773 | .attributes = .{ .custom_typecheck = true } | ||
| 14774 | |||
| 14775 | __sync_fetch_and_nand_2 | ||
| 14776 | .param_str = "ssD*s." | ||
| 14777 | .attributes = .{ .custom_typecheck = true } | ||
| 14778 | |||
| 14779 | __sync_fetch_and_nand_4 | ||
| 14780 | .param_str = "iiD*i." | ||
| 14781 | .attributes = .{ .custom_typecheck = true } | ||
| 14782 | |||
| 14783 | __sync_fetch_and_nand_8 | ||
| 14784 | .param_str = "LLiLLiD*LLi." | ||
| 14785 | .attributes = .{ .custom_typecheck = true } | ||
| 14786 | |||
| 14787 | __sync_fetch_and_or | ||
| 14788 | .param_str = "v." | ||
| 14789 | .attributes = .{ .custom_typecheck = true } | ||
| 14790 | |||
| 14791 | __sync_fetch_and_or_1 | ||
| 14792 | .param_str = "ccD*c." | ||
| 14793 | .attributes = .{ .custom_typecheck = true } | ||
| 14794 | |||
| 14795 | __sync_fetch_and_or_16 | ||
| 14796 | .param_str = "LLLiLLLiD*LLLi." | ||
| 14797 | .attributes = .{ .custom_typecheck = true } | ||
| 14798 | |||
| 14799 | __sync_fetch_and_or_2 | ||
| 14800 | .param_str = "ssD*s." | ||
| 14801 | .attributes = .{ .custom_typecheck = true } | ||
| 14802 | |||
| 14803 | __sync_fetch_and_or_4 | ||
| 14804 | .param_str = "iiD*i." | ||
| 14805 | .attributes = .{ .custom_typecheck = true } | ||
| 14806 | |||
| 14807 | __sync_fetch_and_or_8 | ||
| 14808 | .param_str = "LLiLLiD*LLi." | ||
| 14809 | .attributes = .{ .custom_typecheck = true } | ||
| 14810 | |||
| 14811 | __sync_fetch_and_sub | ||
| 14812 | .param_str = "v." | ||
| 14813 | .attributes = .{ .custom_typecheck = true } | ||
| 14814 | |||
| 14815 | __sync_fetch_and_sub_1 | ||
| 14816 | .param_str = "ccD*c." | ||
| 14817 | .attributes = .{ .custom_typecheck = true } | ||
| 14818 | |||
| 14819 | __sync_fetch_and_sub_16 | ||
| 14820 | .param_str = "LLLiLLLiD*LLLi." | ||
| 14821 | .attributes = .{ .custom_typecheck = true } | ||
| 14822 | |||
| 14823 | __sync_fetch_and_sub_2 | ||
| 14824 | .param_str = "ssD*s." | ||
| 14825 | .attributes = .{ .custom_typecheck = true } | ||
| 14826 | |||
| 14827 | __sync_fetch_and_sub_4 | ||
| 14828 | .param_str = "iiD*i." | ||
| 14829 | .attributes = .{ .custom_typecheck = true } | ||
| 14830 | |||
| 14831 | __sync_fetch_and_sub_8 | ||
| 14832 | .param_str = "LLiLLiD*LLi." | ||
| 14833 | .attributes = .{ .custom_typecheck = true } | ||
| 14834 | |||
| 14835 | __sync_fetch_and_umax | ||
| 14836 | .param_str = "UiUiD*Ui" | ||
| 14837 | |||
| 14838 | __sync_fetch_and_umin | ||
| 14839 | .param_str = "UiUiD*Ui" | ||
| 14840 | |||
| 14841 | __sync_fetch_and_xor | ||
| 14842 | .param_str = "v." | ||
| 14843 | .attributes = .{ .custom_typecheck = true } | ||
| 14844 | |||
| 14845 | __sync_fetch_and_xor_1 | ||
| 14846 | .param_str = "ccD*c." | ||
| 14847 | .attributes = .{ .custom_typecheck = true } | ||
| 14848 | |||
| 14849 | __sync_fetch_and_xor_16 | ||
| 14850 | .param_str = "LLLiLLLiD*LLLi." | ||
| 14851 | .attributes = .{ .custom_typecheck = true } | ||
| 14852 | |||
| 14853 | __sync_fetch_and_xor_2 | ||
| 14854 | .param_str = "ssD*s." | ||
| 14855 | .attributes = .{ .custom_typecheck = true } | ||
| 14856 | |||
| 14857 | __sync_fetch_and_xor_4 | ||
| 14858 | .param_str = "iiD*i." | ||
| 14859 | .attributes = .{ .custom_typecheck = true } | ||
| 14860 | |||
| 14861 | __sync_fetch_and_xor_8 | ||
| 14862 | .param_str = "LLiLLiD*LLi." | ||
| 14863 | .attributes = .{ .custom_typecheck = true } | ||
| 14864 | |||
| 14865 | __sync_lock_release | ||
| 14866 | .param_str = "v." | ||
| 14867 | .attributes = .{ .custom_typecheck = true } | ||
| 14868 | |||
| 14869 | __sync_lock_release_1 | ||
| 14870 | .param_str = "vcD*." | ||
| 14871 | .attributes = .{ .custom_typecheck = true } | ||
| 14872 | |||
| 14873 | __sync_lock_release_16 | ||
| 14874 | .param_str = "vLLLiD*." | ||
| 14875 | .attributes = .{ .custom_typecheck = true } | ||
| 14876 | |||
| 14877 | __sync_lock_release_2 | ||
| 14878 | .param_str = "vsD*." | ||
| 14879 | .attributes = .{ .custom_typecheck = true } | ||
| 14880 | |||
| 14881 | __sync_lock_release_4 | ||
| 14882 | .param_str = "viD*." | ||
| 14883 | .attributes = .{ .custom_typecheck = true } | ||
| 14884 | |||
| 14885 | __sync_lock_release_8 | ||
| 14886 | .param_str = "vLLiD*." | ||
| 14887 | .attributes = .{ .custom_typecheck = true } | ||
| 14888 | |||
| 14889 | __sync_lock_test_and_set | ||
| 14890 | .param_str = "v." | ||
| 14891 | .attributes = .{ .custom_typecheck = true } | ||
| 14892 | |||
| 14893 | __sync_lock_test_and_set_1 | ||
| 14894 | .param_str = "ccD*c." | ||
| 14895 | .attributes = .{ .custom_typecheck = true } | ||
| 14896 | |||
| 14897 | __sync_lock_test_and_set_16 | ||
| 14898 | .param_str = "LLLiLLLiD*LLLi." | ||
| 14899 | .attributes = .{ .custom_typecheck = true } | ||
| 14900 | |||
| 14901 | __sync_lock_test_and_set_2 | ||
| 14902 | .param_str = "ssD*s." | ||
| 14903 | .attributes = .{ .custom_typecheck = true } | ||
| 14904 | |||
| 14905 | __sync_lock_test_and_set_4 | ||
| 14906 | .param_str = "iiD*i." | ||
| 14907 | .attributes = .{ .custom_typecheck = true } | ||
| 14908 | |||
| 14909 | __sync_lock_test_and_set_8 | ||
| 14910 | .param_str = "LLiLLiD*LLi." | ||
| 14911 | .attributes = .{ .custom_typecheck = true } | ||
| 14912 | |||
| 14913 | __sync_nand_and_fetch | ||
| 14914 | .param_str = "v." | ||
| 14915 | .attributes = .{ .custom_typecheck = true } | ||
| 14916 | |||
| 14917 | __sync_nand_and_fetch_1 | ||
| 14918 | .param_str = "ccD*c." | ||
| 14919 | .attributes = .{ .custom_typecheck = true } | ||
| 14920 | |||
| 14921 | __sync_nand_and_fetch_16 | ||
| 14922 | .param_str = "LLLiLLLiD*LLLi." | ||
| 14923 | .attributes = .{ .custom_typecheck = true } | ||
| 14924 | |||
| 14925 | __sync_nand_and_fetch_2 | ||
| 14926 | .param_str = "ssD*s." | ||
| 14927 | .attributes = .{ .custom_typecheck = true } | ||
| 14928 | |||
| 14929 | __sync_nand_and_fetch_4 | ||
| 14930 | .param_str = "iiD*i." | ||
| 14931 | .attributes = .{ .custom_typecheck = true } | ||
| 14932 | |||
| 14933 | __sync_nand_and_fetch_8 | ||
| 14934 | .param_str = "LLiLLiD*LLi." | ||
| 14935 | .attributes = .{ .custom_typecheck = true } | ||
| 14936 | |||
| 14937 | __sync_or_and_fetch | ||
| 14938 | .param_str = "v." | ||
| 14939 | .attributes = .{ .custom_typecheck = true } | ||
| 14940 | |||
| 14941 | __sync_or_and_fetch_1 | ||
| 14942 | .param_str = "ccD*c." | ||
| 14943 | .attributes = .{ .custom_typecheck = true } | ||
| 14944 | |||
| 14945 | __sync_or_and_fetch_16 | ||
| 14946 | .param_str = "LLLiLLLiD*LLLi." | ||
| 14947 | .attributes = .{ .custom_typecheck = true } | ||
| 14948 | |||
| 14949 | __sync_or_and_fetch_2 | ||
| 14950 | .param_str = "ssD*s." | ||
| 14951 | .attributes = .{ .custom_typecheck = true } | ||
| 14952 | |||
| 14953 | __sync_or_and_fetch_4 | ||
| 14954 | .param_str = "iiD*i." | ||
| 14955 | .attributes = .{ .custom_typecheck = true } | ||
| 14956 | |||
| 14957 | __sync_or_and_fetch_8 | ||
| 14958 | .param_str = "LLiLLiD*LLi." | ||
| 14959 | .attributes = .{ .custom_typecheck = true } | ||
| 14960 | |||
| 14961 | __sync_sub_and_fetch | ||
| 14962 | .param_str = "v." | ||
| 14963 | .attributes = .{ .custom_typecheck = true } | ||
| 14964 | |||
| 14965 | __sync_sub_and_fetch_1 | ||
| 14966 | .param_str = "ccD*c." | ||
| 14967 | .attributes = .{ .custom_typecheck = true } | ||
| 14968 | |||
| 14969 | __sync_sub_and_fetch_16 | ||
| 14970 | .param_str = "LLLiLLLiD*LLLi." | ||
| 14971 | .attributes = .{ .custom_typecheck = true } | ||
| 14972 | |||
| 14973 | __sync_sub_and_fetch_2 | ||
| 14974 | .param_str = "ssD*s." | ||
| 14975 | .attributes = .{ .custom_typecheck = true } | ||
| 14976 | |||
| 14977 | __sync_sub_and_fetch_4 | ||
| 14978 | .param_str = "iiD*i." | ||
| 14979 | .attributes = .{ .custom_typecheck = true } | ||
| 14980 | |||
| 14981 | __sync_sub_and_fetch_8 | ||
| 14982 | .param_str = "LLiLLiD*LLi." | ||
| 14983 | .attributes = .{ .custom_typecheck = true } | ||
| 14984 | |||
| 14985 | __sync_swap | ||
| 14986 | .param_str = "v." | ||
| 14987 | .attributes = .{ .custom_typecheck = true } | ||
| 14988 | |||
| 14989 | __sync_swap_1 | ||
| 14990 | .param_str = "ccD*c." | ||
| 14991 | .attributes = .{ .custom_typecheck = true } | ||
| 14992 | |||
| 14993 | __sync_swap_16 | ||
| 14994 | .param_str = "LLLiLLLiD*LLLi." | ||
| 14995 | .attributes = .{ .custom_typecheck = true } | ||
| 14996 | |||
| 14997 | __sync_swap_2 | ||
| 14998 | .param_str = "ssD*s." | ||
| 14999 | .attributes = .{ .custom_typecheck = true } | ||
| 15000 | |||
| 15001 | __sync_swap_4 | ||
| 15002 | .param_str = "iiD*i." | ||
| 15003 | .attributes = .{ .custom_typecheck = true } | ||
| 15004 | |||
| 15005 | __sync_swap_8 | ||
| 15006 | .param_str = "LLiLLiD*LLi." | ||
| 15007 | .attributes = .{ .custom_typecheck = true } | ||
| 15008 | |||
| 15009 | __sync_synchronize | ||
| 15010 | .param_str = "v" | ||
| 15011 | |||
| 15012 | __sync_val_compare_and_swap | ||
| 15013 | .param_str = "v." | ||
| 15014 | .attributes = .{ .custom_typecheck = true } | ||
| 15015 | |||
| 15016 | __sync_val_compare_and_swap_1 | ||
| 15017 | .param_str = "ccD*cc." | ||
| 15018 | .attributes = .{ .custom_typecheck = true } | ||
| 15019 | |||
| 15020 | __sync_val_compare_and_swap_16 | ||
| 15021 | .param_str = "LLLiLLLiD*LLLiLLLi." | ||
| 15022 | .attributes = .{ .custom_typecheck = true } | ||
| 15023 | |||
| 15024 | __sync_val_compare_and_swap_2 | ||
| 15025 | .param_str = "ssD*ss." | ||
| 15026 | .attributes = .{ .custom_typecheck = true } | ||
| 15027 | |||
| 15028 | __sync_val_compare_and_swap_4 | ||
| 15029 | .param_str = "iiD*ii." | ||
| 15030 | .attributes = .{ .custom_typecheck = true } | ||
| 15031 | |||
| 15032 | __sync_val_compare_and_swap_8 | ||
| 15033 | .param_str = "LLiLLiD*LLiLLi." | ||
| 15034 | .attributes = .{ .custom_typecheck = true } | ||
| 15035 | |||
| 15036 | __sync_xor_and_fetch | ||
| 15037 | .param_str = "v." | ||
| 15038 | .attributes = .{ .custom_typecheck = true } | ||
| 15039 | |||
| 15040 | __sync_xor_and_fetch_1 | ||
| 15041 | .param_str = "ccD*c." | ||
| 15042 | .attributes = .{ .custom_typecheck = true } | ||
| 15043 | |||
| 15044 | __sync_xor_and_fetch_16 | ||
| 15045 | .param_str = "LLLiLLLiD*LLLi." | ||
| 15046 | .attributes = .{ .custom_typecheck = true } | ||
| 15047 | |||
| 15048 | __sync_xor_and_fetch_2 | ||
| 15049 | .param_str = "ssD*s." | ||
| 15050 | .attributes = .{ .custom_typecheck = true } | ||
| 15051 | |||
| 15052 | __sync_xor_and_fetch_4 | ||
| 15053 | .param_str = "iiD*i." | ||
| 15054 | .attributes = .{ .custom_typecheck = true } | ||
| 15055 | |||
| 15056 | __sync_xor_and_fetch_8 | ||
| 15057 | .param_str = "LLiLLiD*LLi." | ||
| 15058 | .attributes = .{ .custom_typecheck = true } | ||
| 15059 | |||
| 15060 | __syncthreads | ||
| 15061 | .param_str = "v" | ||
| 15062 | .target_set = TargetSet.initOne(.nvptx) | ||
| 15063 | |||
| 15064 | __tanpi | ||
| 15065 | .param_str = "dd" | ||
| 15066 | .header = .math | ||
| 15067 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15068 | |||
| 15069 | __tanpif | ||
| 15070 | .param_str = "ff" | ||
| 15071 | .header = .math | ||
| 15072 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15073 | |||
| 15074 | __va_start | ||
| 15075 | .param_str = "vc**." | ||
| 15076 | .language = .all_ms_languages | ||
| 15077 | .attributes = .{ .custom_typecheck = true } | ||
| 15078 | |||
| 15079 | __warn_memset_zero_len | ||
| 15080 | .param_str = "v" | ||
| 15081 | .attributes = .{ .pure = true } | ||
| 15082 | |||
| 15083 | __wfe | ||
| 15084 | .param_str = "v" | ||
| 15085 | .language = .all_ms_languages | ||
| 15086 | .target_set = TargetSet.initMany(&.{ .aarch64, .arm }) | ||
| 15087 | |||
| 15088 | __wfi | ||
| 15089 | .param_str = "v" | ||
| 15090 | .language = .all_ms_languages | ||
| 15091 | .target_set = TargetSet.initMany(&.{ .aarch64, .arm }) | ||
| 15092 | |||
| 15093 | __xray_customevent | ||
| 15094 | .param_str = "vcC*z" | ||
| 15095 | |||
| 15096 | __xray_typedevent | ||
| 15097 | .param_str = "vzcC*z" | ||
| 15098 | |||
| 15099 | __yield | ||
| 15100 | .param_str = "v" | ||
| 15101 | .language = .all_ms_languages | ||
| 15102 | .target_set = TargetSet.initMany(&.{ .aarch64, .arm }) | ||
| 15103 | |||
| 15104 | _abnormal_termination | ||
| 15105 | .param_str = "i" | ||
| 15106 | .language = .all_ms_languages | ||
| 15107 | |||
| 15108 | _alloca | ||
| 15109 | .param_str = "v*z" | ||
| 15110 | .language = .all_ms_languages | ||
| 15111 | |||
| 15112 | _bittest | ||
| 15113 | .param_str = "UcNiC*Ni" | ||
| 15114 | .language = .all_ms_languages | ||
| 15115 | |||
| 15116 | _bittest64 | ||
| 15117 | .param_str = "UcWiC*Wi" | ||
| 15118 | .language = .all_ms_languages | ||
| 15119 | |||
| 15120 | _bittestandcomplement | ||
| 15121 | .param_str = "UcNi*Ni" | ||
| 15122 | .language = .all_ms_languages | ||
| 15123 | |||
| 15124 | _bittestandcomplement64 | ||
| 15125 | .param_str = "UcWi*Wi" | ||
| 15126 | .language = .all_ms_languages | ||
| 15127 | |||
| 15128 | _bittestandreset | ||
| 15129 | .param_str = "UcNi*Ni" | ||
| 15130 | .language = .all_ms_languages | ||
| 15131 | |||
| 15132 | _bittestandreset64 | ||
| 15133 | .param_str = "UcWi*Wi" | ||
| 15134 | .language = .all_ms_languages | ||
| 15135 | |||
| 15136 | _bittestandset | ||
| 15137 | .param_str = "UcNi*Ni" | ||
| 15138 | .language = .all_ms_languages | ||
| 15139 | |||
| 15140 | _bittestandset64 | ||
| 15141 | .param_str = "UcWi*Wi" | ||
| 15142 | .language = .all_ms_languages | ||
| 15143 | |||
| 15144 | _byteswap_uint64 | ||
| 15145 | .param_str = "ULLiULLi" | ||
| 15146 | .header = .stdlib, .language = .all_ms_languages | ||
| 15147 | .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } | ||
| 15148 | |||
| 15149 | _byteswap_ulong | ||
| 15150 | .param_str = "UNiUNi" | ||
| 15151 | .header = .stdlib, .language = .all_ms_languages | ||
| 15152 | .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } | ||
| 15153 | |||
| 15154 | _byteswap_ushort | ||
| 15155 | .param_str = "UsUs" | ||
| 15156 | .header = .stdlib, .language = .all_ms_languages | ||
| 15157 | .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } | ||
| 15158 | |||
| 15159 | _exception_code | ||
| 15160 | .param_str = "UNi" | ||
| 15161 | .language = .all_ms_languages | ||
| 15162 | |||
| 15163 | _exception_info | ||
| 15164 | .param_str = "v*" | ||
| 15165 | .language = .all_ms_languages | ||
| 15166 | |||
| 15167 | _exit | ||
| 15168 | .param_str = "vi" | ||
| 15169 | .header = .unistd, .language = .all_gnu_languages | ||
| 15170 | .attributes = .{ .noreturn = true, .lib_function_without_prefix = true } | ||
| 15171 | |||
| 15172 | _interlockedbittestandreset | ||
| 15173 | .param_str = "UcNiD*Ni" | ||
| 15174 | .language = .all_ms_languages | ||
| 15175 | |||
| 15176 | _interlockedbittestandreset64 | ||
| 15177 | .param_str = "UcWiD*Wi" | ||
| 15178 | .language = .all_ms_languages | ||
| 15179 | |||
| 15180 | _interlockedbittestandreset_acq | ||
| 15181 | .param_str = "UcNiD*Ni" | ||
| 15182 | .language = .all_ms_languages | ||
| 15183 | |||
| 15184 | _interlockedbittestandreset_nf | ||
| 15185 | .param_str = "UcNiD*Ni" | ||
| 15186 | .language = .all_ms_languages | ||
| 15187 | |||
| 15188 | _interlockedbittestandreset_rel | ||
| 15189 | .param_str = "UcNiD*Ni" | ||
| 15190 | .language = .all_ms_languages | ||
| 15191 | |||
| 15192 | _interlockedbittestandset | ||
| 15193 | .param_str = "UcNiD*Ni" | ||
| 15194 | .language = .all_ms_languages | ||
| 15195 | |||
| 15196 | _interlockedbittestandset64 | ||
| 15197 | .param_str = "UcWiD*Wi" | ||
| 15198 | .language = .all_ms_languages | ||
| 15199 | |||
| 15200 | _interlockedbittestandset_acq | ||
| 15201 | .param_str = "UcNiD*Ni" | ||
| 15202 | .language = .all_ms_languages | ||
| 15203 | |||
| 15204 | _interlockedbittestandset_nf | ||
| 15205 | .param_str = "UcNiD*Ni" | ||
| 15206 | .language = .all_ms_languages | ||
| 15207 | |||
| 15208 | _interlockedbittestandset_rel | ||
| 15209 | .param_str = "UcNiD*Ni" | ||
| 15210 | .language = .all_ms_languages | ||
| 15211 | |||
| 15212 | _longjmp | ||
| 15213 | .param_str = "vJi" | ||
| 15214 | .header = .setjmp, .language = .all_gnu_languages | ||
| 15215 | .attributes = .{ .noreturn = true, .allow_type_mismatch = true, .lib_function_without_prefix = true } | ||
| 15216 | |||
| 15217 | _lrotl | ||
| 15218 | .param_str = "ULiULii" | ||
| 15219 | .language = .all_ms_languages | ||
| 15220 | .attributes = .{ .const_evaluable = true } | ||
| 15221 | |||
| 15222 | _lrotr | ||
| 15223 | .param_str = "ULiULii" | ||
| 15224 | .language = .all_ms_languages | ||
| 15225 | .attributes = .{ .const_evaluable = true } | ||
| 15226 | |||
| 15227 | _rotl | ||
| 15228 | .param_str = "UiUii" | ||
| 15229 | .language = .all_ms_languages | ||
| 15230 | .attributes = .{ .const_evaluable = true } | ||
| 15231 | |||
| 15232 | _rotl16 | ||
| 15233 | .param_str = "UsUsUc" | ||
| 15234 | .language = .all_ms_languages | ||
| 15235 | .attributes = .{ .const_evaluable = true } | ||
| 15236 | |||
| 15237 | _rotl64 | ||
| 15238 | .param_str = "UWiUWii" | ||
| 15239 | .language = .all_ms_languages | ||
| 15240 | .attributes = .{ .const_evaluable = true } | ||
| 15241 | |||
| 15242 | _rotl8 | ||
| 15243 | .param_str = "UcUcUc" | ||
| 15244 | .language = .all_ms_languages | ||
| 15245 | .attributes = .{ .const_evaluable = true } | ||
| 15246 | |||
| 15247 | _rotr | ||
| 15248 | .param_str = "UiUii" | ||
| 15249 | .language = .all_ms_languages | ||
| 15250 | .attributes = .{ .const_evaluable = true } | ||
| 15251 | |||
| 15252 | _rotr16 | ||
| 15253 | .param_str = "UsUsUc" | ||
| 15254 | .language = .all_ms_languages | ||
| 15255 | .attributes = .{ .const_evaluable = true } | ||
| 15256 | |||
| 15257 | _rotr64 | ||
| 15258 | .param_str = "UWiUWii" | ||
| 15259 | .language = .all_ms_languages | ||
| 15260 | .attributes = .{ .const_evaluable = true } | ||
| 15261 | |||
| 15262 | _rotr8 | ||
| 15263 | .param_str = "UcUcUc" | ||
| 15264 | .language = .all_ms_languages | ||
| 15265 | .attributes = .{ .const_evaluable = true } | ||
| 15266 | |||
| 15267 | _setjmp | ||
| 15268 | .param_str = "iJ" | ||
| 15269 | .header = .setjmp | ||
| 15270 | .attributes = .{ .allow_type_mismatch = true, .lib_function_without_prefix = true, .returns_twice = true } | ||
| 15271 | |||
| 15272 | _setjmpex | ||
| 15273 | .param_str = "iJ" | ||
| 15274 | .header = .setjmpex, .language = .all_ms_languages | ||
| 15275 | .attributes = .{ .allow_type_mismatch = true, .lib_function_without_prefix = true, .returns_twice = true } | ||
| 15276 | |||
| 15277 | abort | ||
| 15278 | .param_str = "v" | ||
| 15279 | .header = .stdlib | ||
| 15280 | .attributes = .{ .noreturn = true, .lib_function_without_prefix = true } | ||
| 15281 | |||
| 15282 | abs | ||
| 15283 | .param_str = "ii" | ||
| 15284 | .header = .stdlib | ||
| 15285 | .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } | ||
| 15286 | |||
| 15287 | acos | ||
| 15288 | .param_str = "dd" | ||
| 15289 | .header = .math | ||
| 15290 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15291 | |||
| 15292 | acosf | ||
| 15293 | .param_str = "ff" | ||
| 15294 | .header = .math | ||
| 15295 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15296 | |||
| 15297 | acosh | ||
| 15298 | .param_str = "dd" | ||
| 15299 | .header = .math | ||
| 15300 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15301 | |||
| 15302 | acoshf | ||
| 15303 | .param_str = "ff" | ||
| 15304 | .header = .math | ||
| 15305 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15306 | |||
| 15307 | acoshl | ||
| 15308 | .param_str = "LdLd" | ||
| 15309 | .header = .math | ||
| 15310 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15311 | |||
| 15312 | acosl | ||
| 15313 | .param_str = "LdLd" | ||
| 15314 | .header = .math | ||
| 15315 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15316 | |||
| 15317 | aligned_alloc | ||
| 15318 | .param_str = "v*zz" | ||
| 15319 | .header = .stdlib | ||
| 15320 | .attributes = .{ .lib_function_without_prefix = true } | ||
| 15321 | |||
| 15322 | alloca | ||
| 15323 | .param_str = "v*z" | ||
| 15324 | .header = .stdlib, .language = .all_gnu_languages | ||
| 15325 | .attributes = .{ .lib_function_without_prefix = true } | ||
| 15326 | |||
| 15327 | asin | ||
| 15328 | .param_str = "dd" | ||
| 15329 | .header = .math | ||
| 15330 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15331 | |||
| 15332 | asinf | ||
| 15333 | .param_str = "ff" | ||
| 15334 | .header = .math | ||
| 15335 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15336 | |||
| 15337 | asinh | ||
| 15338 | .param_str = "dd" | ||
| 15339 | .header = .math | ||
| 15340 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15341 | |||
| 15342 | asinhf | ||
| 15343 | .param_str = "ff" | ||
| 15344 | .header = .math | ||
| 15345 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15346 | |||
| 15347 | asinhl | ||
| 15348 | .param_str = "LdLd" | ||
| 15349 | .header = .math | ||
| 15350 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15351 | |||
| 15352 | asinl | ||
| 15353 | .param_str = "LdLd" | ||
| 15354 | .header = .math | ||
| 15355 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15356 | |||
| 15357 | atan | ||
| 15358 | .param_str = "dd" | ||
| 15359 | .header = .math | ||
| 15360 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15361 | |||
| 15362 | atan2 | ||
| 15363 | .param_str = "ddd" | ||
| 15364 | .header = .math | ||
| 15365 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15366 | |||
| 15367 | atan2f | ||
| 15368 | .param_str = "fff" | ||
| 15369 | .header = .math | ||
| 15370 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15371 | |||
| 15372 | atan2l | ||
| 15373 | .param_str = "LdLdLd" | ||
| 15374 | .header = .math | ||
| 15375 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15376 | |||
| 15377 | atanf | ||
| 15378 | .param_str = "ff" | ||
| 15379 | .header = .math | ||
| 15380 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15381 | |||
| 15382 | atanh | ||
| 15383 | .param_str = "dd" | ||
| 15384 | .header = .math | ||
| 15385 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15386 | |||
| 15387 | atanhf | ||
| 15388 | .param_str = "ff" | ||
| 15389 | .header = .math | ||
| 15390 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15391 | |||
| 15392 | atanhl | ||
| 15393 | .param_str = "LdLd" | ||
| 15394 | .header = .math | ||
| 15395 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15396 | |||
| 15397 | atanl | ||
| 15398 | .param_str = "LdLd" | ||
| 15399 | .header = .math | ||
| 15400 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15401 | |||
| 15402 | bcmp | ||
| 15403 | .param_str = "ivC*vC*z" | ||
| 15404 | .header = .strings, .language = .all_gnu_languages | ||
| 15405 | .attributes = .{ .lib_function_without_prefix = true, .const_evaluable = true } | ||
| 15406 | |||
| 15407 | bcopy | ||
| 15408 | .param_str = "vvC*v*z" | ||
| 15409 | .header = .strings, .language = .all_gnu_languages | ||
| 15410 | .attributes = .{ .lib_function_without_prefix = true } | ||
| 15411 | |||
| 15412 | bzero | ||
| 15413 | .param_str = "vv*z" | ||
| 15414 | .header = .strings, .language = .all_gnu_languages | ||
| 15415 | .attributes = .{ .lib_function_without_prefix = true } | ||
| 15416 | |||
| 15417 | cabs | ||
| 15418 | .param_str = "dXd" | ||
| 15419 | .header = .complex | ||
| 15420 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15421 | |||
| 15422 | cabsf | ||
| 15423 | .param_str = "fXf" | ||
| 15424 | .header = .complex | ||
| 15425 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15426 | |||
| 15427 | cabsl | ||
| 15428 | .param_str = "LdXLd" | ||
| 15429 | .header = .complex | ||
| 15430 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15431 | |||
| 15432 | cacos | ||
| 15433 | .param_str = "XdXd" | ||
| 15434 | .header = .complex | ||
| 15435 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15436 | |||
| 15437 | cacosf | ||
| 15438 | .param_str = "XfXf" | ||
| 15439 | .header = .complex | ||
| 15440 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15441 | |||
| 15442 | cacosh | ||
| 15443 | .param_str = "XdXd" | ||
| 15444 | .header = .complex | ||
| 15445 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15446 | |||
| 15447 | cacoshf | ||
| 15448 | .param_str = "XfXf" | ||
| 15449 | .header = .complex | ||
| 15450 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15451 | |||
| 15452 | cacoshl | ||
| 15453 | .param_str = "XLdXLd" | ||
| 15454 | .header = .complex | ||
| 15455 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15456 | |||
| 15457 | cacosl | ||
| 15458 | .param_str = "XLdXLd" | ||
| 15459 | .header = .complex | ||
| 15460 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15461 | |||
| 15462 | calloc | ||
| 15463 | .param_str = "v*zz" | ||
| 15464 | .header = .stdlib | ||
| 15465 | .attributes = .{ .lib_function_without_prefix = true } | ||
| 15466 | |||
| 15467 | carg | ||
| 15468 | .param_str = "dXd" | ||
| 15469 | .header = .complex | ||
| 15470 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15471 | |||
| 15472 | cargf | ||
| 15473 | .param_str = "fXf" | ||
| 15474 | .header = .complex | ||
| 15475 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15476 | |||
| 15477 | cargl | ||
| 15478 | .param_str = "LdXLd" | ||
| 15479 | .header = .complex | ||
| 15480 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15481 | |||
| 15482 | casin | ||
| 15483 | .param_str = "XdXd" | ||
| 15484 | .header = .complex | ||
| 15485 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15486 | |||
| 15487 | casinf | ||
| 15488 | .param_str = "XfXf" | ||
| 15489 | .header = .complex | ||
| 15490 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15491 | |||
| 15492 | casinh | ||
| 15493 | .param_str = "XdXd" | ||
| 15494 | .header = .complex | ||
| 15495 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15496 | |||
| 15497 | casinhf | ||
| 15498 | .param_str = "XfXf" | ||
| 15499 | .header = .complex | ||
| 15500 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15501 | |||
| 15502 | casinhl | ||
| 15503 | .param_str = "XLdXLd" | ||
| 15504 | .header = .complex | ||
| 15505 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15506 | |||
| 15507 | casinl | ||
| 15508 | .param_str = "XLdXLd" | ||
| 15509 | .header = .complex | ||
| 15510 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15511 | |||
| 15512 | catan | ||
| 15513 | .param_str = "XdXd" | ||
| 15514 | .header = .complex | ||
| 15515 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15516 | |||
| 15517 | catanf | ||
| 15518 | .param_str = "XfXf" | ||
| 15519 | .header = .complex | ||
| 15520 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15521 | |||
| 15522 | catanh | ||
| 15523 | .param_str = "XdXd" | ||
| 15524 | .header = .complex | ||
| 15525 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15526 | |||
| 15527 | catanhf | ||
| 15528 | .param_str = "XfXf" | ||
| 15529 | .header = .complex | ||
| 15530 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15531 | |||
| 15532 | catanhl | ||
| 15533 | .param_str = "XLdXLd" | ||
| 15534 | .header = .complex | ||
| 15535 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15536 | |||
| 15537 | catanl | ||
| 15538 | .param_str = "XLdXLd" | ||
| 15539 | .header = .complex | ||
| 15540 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15541 | |||
| 15542 | cbrt | ||
| 15543 | .param_str = "dd" | ||
| 15544 | .header = .math | ||
| 15545 | .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } | ||
| 15546 | |||
| 15547 | cbrtf | ||
| 15548 | .param_str = "ff" | ||
| 15549 | .header = .math | ||
| 15550 | .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } | ||
| 15551 | |||
| 15552 | cbrtl | ||
| 15553 | .param_str = "LdLd" | ||
| 15554 | .header = .math | ||
| 15555 | .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } | ||
| 15556 | |||
| 15557 | ccos | ||
| 15558 | .param_str = "XdXd" | ||
| 15559 | .header = .complex | ||
| 15560 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15561 | |||
| 15562 | ccosf | ||
| 15563 | .param_str = "XfXf" | ||
| 15564 | .header = .complex | ||
| 15565 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15566 | |||
| 15567 | ccosh | ||
| 15568 | .param_str = "XdXd" | ||
| 15569 | .header = .complex | ||
| 15570 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15571 | |||
| 15572 | ccoshf | ||
| 15573 | .param_str = "XfXf" | ||
| 15574 | .header = .complex | ||
| 15575 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15576 | |||
| 15577 | ccoshl | ||
| 15578 | .param_str = "XLdXLd" | ||
| 15579 | .header = .complex | ||
| 15580 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15581 | |||
| 15582 | ccosl | ||
| 15583 | .param_str = "XLdXLd" | ||
| 15584 | .header = .complex | ||
| 15585 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15586 | |||
| 15587 | ceil | ||
| 15588 | .param_str = "dd" | ||
| 15589 | .header = .math | ||
| 15590 | .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } | ||
| 15591 | |||
| 15592 | ceilf | ||
| 15593 | .param_str = "ff" | ||
| 15594 | .header = .math | ||
| 15595 | .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } | ||
| 15596 | |||
| 15597 | ceill | ||
| 15598 | .param_str = "LdLd" | ||
| 15599 | .header = .math | ||
| 15600 | .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } | ||
| 15601 | |||
| 15602 | cexp | ||
| 15603 | .param_str = "XdXd" | ||
| 15604 | .header = .complex | ||
| 15605 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15606 | |||
| 15607 | cexpf | ||
| 15608 | .param_str = "XfXf" | ||
| 15609 | .header = .complex | ||
| 15610 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15611 | |||
| 15612 | cexpl | ||
| 15613 | .param_str = "XLdXLd" | ||
| 15614 | .header = .complex | ||
| 15615 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15616 | |||
| 15617 | cimag | ||
| 15618 | .param_str = "dXd" | ||
| 15619 | .header = .complex | ||
| 15620 | .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } | ||
| 15621 | |||
| 15622 | cimagf | ||
| 15623 | .param_str = "fXf" | ||
| 15624 | .header = .complex | ||
| 15625 | .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } | ||
| 15626 | |||
| 15627 | cimagl | ||
| 15628 | .param_str = "LdXLd" | ||
| 15629 | .header = .complex | ||
| 15630 | .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } | ||
| 15631 | |||
| 15632 | clog | ||
| 15633 | .param_str = "XdXd" | ||
| 15634 | .header = .complex | ||
| 15635 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15636 | |||
| 15637 | clogf | ||
| 15638 | .param_str = "XfXf" | ||
| 15639 | .header = .complex | ||
| 15640 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15641 | |||
| 15642 | clogl | ||
| 15643 | .param_str = "XLdXLd" | ||
| 15644 | .header = .complex | ||
| 15645 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15646 | |||
| 15647 | conj | ||
| 15648 | .param_str = "XdXd" | ||
| 15649 | .header = .complex | ||
| 15650 | .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } | ||
| 15651 | |||
| 15652 | conjf | ||
| 15653 | .param_str = "XfXf" | ||
| 15654 | .header = .complex | ||
| 15655 | .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } | ||
| 15656 | |||
| 15657 | conjl | ||
| 15658 | .param_str = "XLdXLd" | ||
| 15659 | .header = .complex | ||
| 15660 | .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } | ||
| 15661 | |||
| 15662 | copysign | ||
| 15663 | .param_str = "ddd" | ||
| 15664 | .header = .math | ||
| 15665 | .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } | ||
| 15666 | |||
| 15667 | copysignf | ||
| 15668 | .param_str = "fff" | ||
| 15669 | .header = .math | ||
| 15670 | .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } | ||
| 15671 | |||
| 15672 | copysignl | ||
| 15673 | .param_str = "LdLdLd" | ||
| 15674 | .header = .math | ||
| 15675 | .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } | ||
| 15676 | |||
| 15677 | cos | ||
| 15678 | .param_str = "dd" | ||
| 15679 | .header = .math | ||
| 15680 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15681 | |||
| 15682 | cosf | ||
| 15683 | .param_str = "ff" | ||
| 15684 | .header = .math | ||
| 15685 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15686 | |||
| 15687 | cosh | ||
| 15688 | .param_str = "dd" | ||
| 15689 | .header = .math | ||
| 15690 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15691 | |||
| 15692 | coshf | ||
| 15693 | .param_str = "ff" | ||
| 15694 | .header = .math | ||
| 15695 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15696 | |||
| 15697 | coshl | ||
| 15698 | .param_str = "LdLd" | ||
| 15699 | .header = .math | ||
| 15700 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15701 | |||
| 15702 | cosl | ||
| 15703 | .param_str = "LdLd" | ||
| 15704 | .header = .math | ||
| 15705 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15706 | |||
| 15707 | cpow | ||
| 15708 | .param_str = "XdXdXd" | ||
| 15709 | .header = .complex | ||
| 15710 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15711 | |||
| 15712 | cpowf | ||
| 15713 | .param_str = "XfXfXf" | ||
| 15714 | .header = .complex | ||
| 15715 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15716 | |||
| 15717 | cpowl | ||
| 15718 | .param_str = "XLdXLdXLd" | ||
| 15719 | .header = .complex | ||
| 15720 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15721 | |||
| 15722 | cproj | ||
| 15723 | .param_str = "XdXd" | ||
| 15724 | .header = .complex | ||
| 15725 | .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } | ||
| 15726 | |||
| 15727 | cprojf | ||
| 15728 | .param_str = "XfXf" | ||
| 15729 | .header = .complex | ||
| 15730 | .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } | ||
| 15731 | |||
| 15732 | cprojl | ||
| 15733 | .param_str = "XLdXLd" | ||
| 15734 | .header = .complex | ||
| 15735 | .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } | ||
| 15736 | |||
| 15737 | creal | ||
| 15738 | .param_str = "dXd" | ||
| 15739 | .header = .complex | ||
| 15740 | .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } | ||
| 15741 | |||
| 15742 | crealf | ||
| 15743 | .param_str = "fXf" | ||
| 15744 | .header = .complex | ||
| 15745 | .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } | ||
| 15746 | |||
| 15747 | creall | ||
| 15748 | .param_str = "LdXLd" | ||
| 15749 | .header = .complex | ||
| 15750 | .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } | ||
| 15751 | |||
| 15752 | csin | ||
| 15753 | .param_str = "XdXd" | ||
| 15754 | .header = .complex | ||
| 15755 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15756 | |||
| 15757 | csinf | ||
| 15758 | .param_str = "XfXf" | ||
| 15759 | .header = .complex | ||
| 15760 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15761 | |||
| 15762 | csinh | ||
| 15763 | .param_str = "XdXd" | ||
| 15764 | .header = .complex | ||
| 15765 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15766 | |||
| 15767 | csinhf | ||
| 15768 | .param_str = "XfXf" | ||
| 15769 | .header = .complex | ||
| 15770 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15771 | |||
| 15772 | csinhl | ||
| 15773 | .param_str = "XLdXLd" | ||
| 15774 | .header = .complex | ||
| 15775 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15776 | |||
| 15777 | csinl | ||
| 15778 | .param_str = "XLdXLd" | ||
| 15779 | .header = .complex | ||
| 15780 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15781 | |||
| 15782 | csqrt | ||
| 15783 | .param_str = "XdXd" | ||
| 15784 | .header = .complex | ||
| 15785 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15786 | |||
| 15787 | csqrtf | ||
| 15788 | .param_str = "XfXf" | ||
| 15789 | .header = .complex | ||
| 15790 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15791 | |||
| 15792 | csqrtl | ||
| 15793 | .param_str = "XLdXLd" | ||
| 15794 | .header = .complex | ||
| 15795 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15796 | |||
| 15797 | ctan | ||
| 15798 | .param_str = "XdXd" | ||
| 15799 | .header = .complex | ||
| 15800 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15801 | |||
| 15802 | ctanf | ||
| 15803 | .param_str = "XfXf" | ||
| 15804 | .header = .complex | ||
| 15805 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15806 | |||
| 15807 | ctanh | ||
| 15808 | .param_str = "XdXd" | ||
| 15809 | .header = .complex | ||
| 15810 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15811 | |||
| 15812 | ctanhf | ||
| 15813 | .param_str = "XfXf" | ||
| 15814 | .header = .complex | ||
| 15815 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15816 | |||
| 15817 | ctanhl | ||
| 15818 | .param_str = "XLdXLd" | ||
| 15819 | .header = .complex | ||
| 15820 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15821 | |||
| 15822 | ctanl | ||
| 15823 | .param_str = "XLdXLd" | ||
| 15824 | .header = .complex | ||
| 15825 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15826 | |||
| 15827 | erf | ||
| 15828 | .param_str = "dd" | ||
| 15829 | .header = .math | ||
| 15830 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15831 | |||
| 15832 | erfc | ||
| 15833 | .param_str = "dd" | ||
| 15834 | .header = .math | ||
| 15835 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15836 | |||
| 15837 | erfcf | ||
| 15838 | .param_str = "ff" | ||
| 15839 | .header = .math | ||
| 15840 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15841 | |||
| 15842 | erfcl | ||
| 15843 | .param_str = "LdLd" | ||
| 15844 | .header = .math | ||
| 15845 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15846 | |||
| 15847 | erff | ||
| 15848 | .param_str = "ff" | ||
| 15849 | .header = .math | ||
| 15850 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15851 | |||
| 15852 | erfl | ||
| 15853 | .param_str = "LdLd" | ||
| 15854 | .header = .math | ||
| 15855 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15856 | |||
| 15857 | exit | ||
| 15858 | .param_str = "vi" | ||
| 15859 | .header = .stdlib | ||
| 15860 | .attributes = .{ .noreturn = true, .lib_function_without_prefix = true } | ||
| 15861 | |||
| 15862 | exp | ||
| 15863 | .param_str = "dd" | ||
| 15864 | .header = .math | ||
| 15865 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15866 | |||
| 15867 | exp2 | ||
| 15868 | .param_str = "dd" | ||
| 15869 | .header = .math | ||
| 15870 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15871 | |||
| 15872 | exp2f | ||
| 15873 | .param_str = "ff" | ||
| 15874 | .header = .math | ||
| 15875 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15876 | |||
| 15877 | exp2l | ||
| 15878 | .param_str = "LdLd" | ||
| 15879 | .header = .math | ||
| 15880 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15881 | |||
| 15882 | expf | ||
| 15883 | .param_str = "ff" | ||
| 15884 | .header = .math | ||
| 15885 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15886 | |||
| 15887 | expl | ||
| 15888 | .param_str = "LdLd" | ||
| 15889 | .header = .math | ||
| 15890 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15891 | |||
| 15892 | expm1 | ||
| 15893 | .param_str = "dd" | ||
| 15894 | .header = .math | ||
| 15895 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15896 | |||
| 15897 | expm1f | ||
| 15898 | .param_str = "ff" | ||
| 15899 | .header = .math | ||
| 15900 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15901 | |||
| 15902 | expm1l | ||
| 15903 | .param_str = "LdLd" | ||
| 15904 | .header = .math | ||
| 15905 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15906 | |||
| 15907 | fabs | ||
| 15908 | .param_str = "dd" | ||
| 15909 | .header = .math | ||
| 15910 | .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } | ||
| 15911 | |||
| 15912 | fabsf | ||
| 15913 | .param_str = "ff" | ||
| 15914 | .header = .math | ||
| 15915 | .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } | ||
| 15916 | |||
| 15917 | fabsl | ||
| 15918 | .param_str = "LdLd" | ||
| 15919 | .header = .math | ||
| 15920 | .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } | ||
| 15921 | |||
| 15922 | fdim | ||
| 15923 | .param_str = "ddd" | ||
| 15924 | .header = .math | ||
| 15925 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15926 | |||
| 15927 | fdimf | ||
| 15928 | .param_str = "fff" | ||
| 15929 | .header = .math | ||
| 15930 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15931 | |||
| 15932 | fdiml | ||
| 15933 | .param_str = "LdLdLd" | ||
| 15934 | .header = .math | ||
| 15935 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15936 | |||
| 15937 | finite | ||
| 15938 | .param_str = "id" | ||
| 15939 | .header = .math, .language = .gnu_lang | ||
| 15940 | .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } | ||
| 15941 | |||
| 15942 | finitef | ||
| 15943 | .param_str = "if" | ||
| 15944 | .header = .math, .language = .gnu_lang | ||
| 15945 | .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } | ||
| 15946 | |||
| 15947 | finitel | ||
| 15948 | .param_str = "iLd" | ||
| 15949 | .header = .math, .language = .gnu_lang | ||
| 15950 | .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } | ||
| 15951 | |||
| 15952 | floor | ||
| 15953 | .param_str = "dd" | ||
| 15954 | .header = .math | ||
| 15955 | .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } | ||
| 15956 | |||
| 15957 | floorf | ||
| 15958 | .param_str = "ff" | ||
| 15959 | .header = .math | ||
| 15960 | .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } | ||
| 15961 | |||
| 15962 | floorl | ||
| 15963 | .param_str = "LdLd" | ||
| 15964 | .header = .math | ||
| 15965 | .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } | ||
| 15966 | |||
| 15967 | fma | ||
| 15968 | .param_str = "dddd" | ||
| 15969 | .header = .math | ||
| 15970 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15971 | |||
| 15972 | fmaf | ||
| 15973 | .param_str = "ffff" | ||
| 15974 | .header = .math | ||
| 15975 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15976 | |||
| 15977 | fmal | ||
| 15978 | .param_str = "LdLdLdLd" | ||
| 15979 | .header = .math | ||
| 15980 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15981 | |||
| 15982 | fmax | ||
| 15983 | .param_str = "ddd" | ||
| 15984 | .header = .math | ||
| 15985 | .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } | ||
| 15986 | |||
| 15987 | fmaxf | ||
| 15988 | .param_str = "fff" | ||
| 15989 | .header = .math | ||
| 15990 | .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } | ||
| 15991 | |||
| 15992 | fmaxl | ||
| 15993 | .param_str = "LdLdLd" | ||
| 15994 | .header = .math | ||
| 15995 | .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } | ||
| 15996 | |||
| 15997 | fmin | ||
| 15998 | .param_str = "ddd" | ||
| 15999 | .header = .math | ||
| 16000 | .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } | ||
| 16001 | |||
| 16002 | fminf | ||
| 16003 | .param_str = "fff" | ||
| 16004 | .header = .math | ||
| 16005 | .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } | ||
| 16006 | |||
| 16007 | fminl | ||
| 16008 | .param_str = "LdLdLd" | ||
| 16009 | .header = .math | ||
| 16010 | .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } | ||
| 16011 | |||
| 16012 | fmod | ||
| 16013 | .param_str = "ddd" | ||
| 16014 | .header = .math | ||
| 16015 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16016 | |||
| 16017 | fmodf | ||
| 16018 | .param_str = "fff" | ||
| 16019 | .header = .math | ||
| 16020 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16021 | |||
| 16022 | fmodl | ||
| 16023 | .param_str = "LdLdLd" | ||
| 16024 | .header = .math | ||
| 16025 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16026 | |||
| 16027 | fopen | ||
| 16028 | .param_str = "P*cC*cC*" | ||
| 16029 | .header = .stdio | ||
| 16030 | .attributes = .{ .lib_function_without_prefix = true } | ||
| 16031 | |||
| 16032 | fprintf | ||
| 16033 | .param_str = "iP*cC*." | ||
| 16034 | .header = .stdio | ||
| 16035 | .attributes = .{ .lib_function_without_prefix = true, .format_kind = .printf, .format_string_position = 1 } | ||
| 16036 | |||
| 16037 | fread | ||
| 16038 | .param_str = "zv*zzP*" | ||
| 16039 | .header = .stdio | ||
| 16040 | .attributes = .{ .lib_function_without_prefix = true } | ||
| 16041 | |||
| 16042 | free | ||
| 16043 | .param_str = "vv*" | ||
| 16044 | .header = .stdlib | ||
| 16045 | .attributes = .{ .lib_function_without_prefix = true } | ||
| 16046 | |||
| 16047 | frexp | ||
| 16048 | .param_str = "ddi*" | ||
| 16049 | .header = .math | ||
| 16050 | .attributes = .{ .lib_function_without_prefix = true } | ||
| 16051 | |||
| 16052 | frexpf | ||
| 16053 | .param_str = "ffi*" | ||
| 16054 | .header = .math | ||
| 16055 | .attributes = .{ .lib_function_without_prefix = true } | ||
| 16056 | |||
| 16057 | frexpl | ||
| 16058 | .param_str = "LdLdi*" | ||
| 16059 | .header = .math | ||
| 16060 | .attributes = .{ .lib_function_without_prefix = true } | ||
| 16061 | |||
| 16062 | fscanf | ||
| 16063 | .param_str = "iP*RcC*R." | ||
| 16064 | .header = .stdio | ||
| 16065 | .attributes = .{ .lib_function_without_prefix = true, .format_kind = .scanf, .format_string_position = 1 } | ||
| 16066 | |||
| 16067 | fwrite | ||
| 16068 | .param_str = "zvC*zzP*" | ||
| 16069 | .header = .stdio | ||
| 16070 | .attributes = .{ .lib_function_without_prefix = true } | ||
| 16071 | |||
| 16072 | getcontext | ||
| 16073 | .param_str = "iK*" | ||
| 16074 | .header = .setjmp | ||
| 16075 | .attributes = .{ .allow_type_mismatch = true, .lib_function_without_prefix = true, .returns_twice = true } | ||
| 16076 | |||
| 16077 | hypot | ||
| 16078 | .param_str = "ddd" | ||
| 16079 | .header = .math | ||
| 16080 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16081 | |||
| 16082 | hypotf | ||
| 16083 | .param_str = "fff" | ||
| 16084 | .header = .math | ||
| 16085 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16086 | |||
| 16087 | hypotl | ||
| 16088 | .param_str = "LdLdLd" | ||
| 16089 | .header = .math | ||
| 16090 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16091 | |||
| 16092 | ilogb | ||
| 16093 | .param_str = "id" | ||
| 16094 | .header = .math | ||
| 16095 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16096 | |||
| 16097 | ilogbf | ||
| 16098 | .param_str = "if" | ||
| 16099 | .header = .math | ||
| 16100 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16101 | |||
| 16102 | ilogbl | ||
| 16103 | .param_str = "iLd" | ||
| 16104 | .header = .math | ||
| 16105 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16106 | |||
| 16107 | index | ||
| 16108 | .param_str = "c*cC*i" | ||
| 16109 | .header = .strings, .language = .all_gnu_languages | ||
| 16110 | .attributes = .{ .lib_function_without_prefix = true } | ||
| 16111 | |||
| 16112 | isalnum | ||
| 16113 | .param_str = "ii" | ||
| 16114 | .header = .ctype | ||
| 16115 | .attributes = .{ .pure = true, .lib_function_without_prefix = true } | ||
| 16116 | |||
| 16117 | isalpha | ||
| 16118 | .param_str = "ii" | ||
| 16119 | .header = .ctype | ||
| 16120 | .attributes = .{ .pure = true, .lib_function_without_prefix = true } | ||
| 16121 | |||
| 16122 | isblank | ||
| 16123 | .param_str = "ii" | ||
| 16124 | .header = .ctype | ||
| 16125 | .attributes = .{ .pure = true, .lib_function_without_prefix = true } | ||
| 16126 | |||
| 16127 | iscntrl | ||
| 16128 | .param_str = "ii" | ||
| 16129 | .header = .ctype | ||
| 16130 | .attributes = .{ .pure = true, .lib_function_without_prefix = true } | ||
| 16131 | |||
| 16132 | isdigit | ||
| 16133 | .param_str = "ii" | ||
| 16134 | .header = .ctype | ||
| 16135 | .attributes = .{ .pure = true, .lib_function_without_prefix = true } | ||
| 16136 | |||
| 16137 | isgraph | ||
| 16138 | .param_str = "ii" | ||
| 16139 | .header = .ctype | ||
| 16140 | .attributes = .{ .pure = true, .lib_function_without_prefix = true } | ||
| 16141 | |||
| 16142 | islower | ||
| 16143 | .param_str = "ii" | ||
| 16144 | .header = .ctype | ||
| 16145 | .attributes = .{ .pure = true, .lib_function_without_prefix = true } | ||
| 16146 | |||
| 16147 | isprint | ||
| 16148 | .param_str = "ii" | ||
| 16149 | .header = .ctype | ||
| 16150 | .attributes = .{ .pure = true, .lib_function_without_prefix = true } | ||
| 16151 | |||
| 16152 | ispunct | ||
| 16153 | .param_str = "ii" | ||
| 16154 | .header = .ctype | ||
| 16155 | .attributes = .{ .pure = true, .lib_function_without_prefix = true } | ||
| 16156 | |||
| 16157 | isspace | ||
| 16158 | .param_str = "ii" | ||
| 16159 | .header = .ctype | ||
| 16160 | .attributes = .{ .pure = true, .lib_function_without_prefix = true } | ||
| 16161 | |||
| 16162 | isupper | ||
| 16163 | .param_str = "ii" | ||
| 16164 | .header = .ctype | ||
| 16165 | .attributes = .{ .pure = true, .lib_function_without_prefix = true } | ||
| 16166 | |||
| 16167 | isxdigit | ||
| 16168 | .param_str = "ii" | ||
| 16169 | .header = .ctype | ||
| 16170 | .attributes = .{ .pure = true, .lib_function_without_prefix = true } | ||
| 16171 | |||
| 16172 | labs | ||
| 16173 | .param_str = "LiLi" | ||
| 16174 | .header = .stdlib | ||
| 16175 | .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } | ||
| 16176 | |||
| 16177 | ldexp | ||
| 16178 | .param_str = "ddi" | ||
| 16179 | .header = .math | ||
| 16180 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16181 | |||
| 16182 | ldexpf | ||
| 16183 | .param_str = "ffi" | ||
| 16184 | .header = .math | ||
| 16185 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16186 | |||
| 16187 | ldexpl | ||
| 16188 | .param_str = "LdLdi" | ||
| 16189 | .header = .math | ||
| 16190 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16191 | |||
| 16192 | lgamma | ||
| 16193 | .param_str = "dd" | ||
| 16194 | .header = .math | ||
| 16195 | .attributes = .{ .lib_function_without_prefix = true } | ||
| 16196 | |||
| 16197 | lgammaf | ||
| 16198 | .param_str = "ff" | ||
| 16199 | .header = .math | ||
| 16200 | .attributes = .{ .lib_function_without_prefix = true } | ||
| 16201 | |||
| 16202 | lgammal | ||
| 16203 | .param_str = "LdLd" | ||
| 16204 | .header = .math | ||
| 16205 | .attributes = .{ .lib_function_without_prefix = true } | ||
| 16206 | |||
| 16207 | llabs | ||
| 16208 | .param_str = "LLiLLi" | ||
| 16209 | .header = .stdlib | ||
| 16210 | .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } | ||
| 16211 | |||
| 16212 | llrint | ||
| 16213 | .param_str = "LLid" | ||
| 16214 | .header = .math | ||
| 16215 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16216 | |||
| 16217 | llrintf | ||
| 16218 | .param_str = "LLif" | ||
| 16219 | .header = .math | ||
| 16220 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16221 | |||
| 16222 | llrintl | ||
| 16223 | .param_str = "LLiLd" | ||
| 16224 | .header = .math | ||
| 16225 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16226 | |||
| 16227 | llround | ||
| 16228 | .param_str = "LLid" | ||
| 16229 | .header = .math | ||
| 16230 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16231 | |||
| 16232 | llroundf | ||
| 16233 | .param_str = "LLif" | ||
| 16234 | .header = .math | ||
| 16235 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16236 | |||
| 16237 | llroundl | ||
| 16238 | .param_str = "LLiLd" | ||
| 16239 | .header = .math | ||
| 16240 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16241 | |||
| 16242 | log | ||
| 16243 | .param_str = "dd" | ||
| 16244 | .header = .math | ||
| 16245 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16246 | |||
| 16247 | log10 | ||
| 16248 | .param_str = "dd" | ||
| 16249 | .header = .math | ||
| 16250 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16251 | |||
| 16252 | log10f | ||
| 16253 | .param_str = "ff" | ||
| 16254 | .header = .math | ||
| 16255 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16256 | |||
| 16257 | log10l | ||
| 16258 | .param_str = "LdLd" | ||
| 16259 | .header = .math | ||
| 16260 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16261 | |||
| 16262 | log1p | ||
| 16263 | .param_str = "dd" | ||
| 16264 | .header = .math | ||
| 16265 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16266 | |||
| 16267 | log1pf | ||
| 16268 | .param_str = "ff" | ||
| 16269 | .header = .math | ||
| 16270 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16271 | |||
| 16272 | log1pl | ||
| 16273 | .param_str = "LdLd" | ||
| 16274 | .header = .math | ||
| 16275 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16276 | |||
| 16277 | log2 | ||
| 16278 | .param_str = "dd" | ||
| 16279 | .header = .math | ||
| 16280 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16281 | |||
| 16282 | log2f | ||
| 16283 | .param_str = "ff" | ||
| 16284 | .header = .math | ||
| 16285 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16286 | |||
| 16287 | log2l | ||
| 16288 | .param_str = "LdLd" | ||
| 16289 | .header = .math | ||
| 16290 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16291 | |||
| 16292 | logb | ||
| 16293 | .param_str = "dd" | ||
| 16294 | .header = .math | ||
| 16295 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16296 | |||
| 16297 | logbf | ||
| 16298 | .param_str = "ff" | ||
| 16299 | .header = .math | ||
| 16300 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16301 | |||
| 16302 | logbl | ||
| 16303 | .param_str = "LdLd" | ||
| 16304 | .header = .math | ||
| 16305 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16306 | |||
| 16307 | logf | ||
| 16308 | .param_str = "ff" | ||
| 16309 | .header = .math | ||
| 16310 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16311 | |||
| 16312 | logl | ||
| 16313 | .param_str = "LdLd" | ||
| 16314 | .header = .math | ||
| 16315 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16316 | |||
| 16317 | longjmp | ||
| 16318 | .param_str = "vJi" | ||
| 16319 | .header = .setjmp | ||
| 16320 | .attributes = .{ .noreturn = true, .allow_type_mismatch = true, .lib_function_without_prefix = true } | ||
| 16321 | |||
| 16322 | lrint | ||
| 16323 | .param_str = "Lid" | ||
| 16324 | .header = .math | ||
| 16325 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16326 | |||
| 16327 | lrintf | ||
| 16328 | .param_str = "Lif" | ||
| 16329 | .header = .math | ||
| 16330 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16331 | |||
| 16332 | lrintl | ||
| 16333 | .param_str = "LiLd" | ||
| 16334 | .header = .math | ||
| 16335 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16336 | |||
| 16337 | lround | ||
| 16338 | .param_str = "Lid" | ||
| 16339 | .header = .math | ||
| 16340 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16341 | |||
| 16342 | lroundf | ||
| 16343 | .param_str = "Lif" | ||
| 16344 | .header = .math | ||
| 16345 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16346 | |||
| 16347 | lroundl | ||
| 16348 | .param_str = "LiLd" | ||
| 16349 | .header = .math | ||
| 16350 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16351 | |||
| 16352 | malloc | ||
| 16353 | .param_str = "v*z" | ||
| 16354 | .header = .stdlib | ||
| 16355 | .attributes = .{ .lib_function_without_prefix = true } | ||
| 16356 | |||
| 16357 | memalign | ||
| 16358 | .param_str = "v*zz" | ||
| 16359 | .header = .malloc, .language = .all_gnu_languages | ||
| 16360 | .attributes = .{ .lib_function_without_prefix = true } | ||
| 16361 | |||
| 16362 | memccpy | ||
| 16363 | .param_str = "v*v*vC*iz" | ||
| 16364 | .header = .string, .language = .all_gnu_languages | ||
| 16365 | .attributes = .{ .lib_function_without_prefix = true } | ||
| 16366 | |||
| 16367 | memchr | ||
| 16368 | .param_str = "v*vC*iz" | ||
| 16369 | .header = .string | ||
| 16370 | .attributes = .{ .lib_function_without_prefix = true, .const_evaluable = true } | ||
| 16371 | |||
| 16372 | memcmp | ||
| 16373 | .param_str = "ivC*vC*z" | ||
| 16374 | .header = .string | ||
| 16375 | .attributes = .{ .lib_function_without_prefix = true, .const_evaluable = true } | ||
| 16376 | |||
| 16377 | memcpy | ||
| 16378 | .param_str = "v*v*vC*z" | ||
| 16379 | .header = .string | ||
| 16380 | .attributes = .{ .lib_function_without_prefix = true, .const_evaluable = true } | ||
| 16381 | |||
| 16382 | memmove | ||
| 16383 | .param_str = "v*v*vC*z" | ||
| 16384 | .header = .string | ||
| 16385 | .attributes = .{ .lib_function_without_prefix = true, .const_evaluable = true } | ||
| 16386 | |||
| 16387 | mempcpy | ||
| 16388 | .param_str = "v*v*vC*z" | ||
| 16389 | .header = .string, .language = .all_gnu_languages | ||
| 16390 | .attributes = .{ .lib_function_without_prefix = true } | ||
| 16391 | |||
| 16392 | memset | ||
| 16393 | .param_str = "v*v*iz" | ||
| 16394 | .header = .string | ||
| 16395 | .attributes = .{ .lib_function_without_prefix = true } | ||
| 16396 | |||
| 16397 | modf | ||
| 16398 | .param_str = "ddd*" | ||
| 16399 | .header = .math | ||
| 16400 | .attributes = .{ .lib_function_without_prefix = true } | ||
| 16401 | |||
| 16402 | modff | ||
| 16403 | .param_str = "fff*" | ||
| 16404 | .header = .math | ||
| 16405 | .attributes = .{ .lib_function_without_prefix = true } | ||
| 16406 | |||
| 16407 | modfl | ||
| 16408 | .param_str = "LdLdLd*" | ||
| 16409 | .header = .math | ||
| 16410 | .attributes = .{ .lib_function_without_prefix = true } | ||
| 16411 | |||
| 16412 | nan | ||
| 16413 | .param_str = "dcC*" | ||
| 16414 | .header = .math | ||
| 16415 | .attributes = .{ .pure = true, .lib_function_without_prefix = true } | ||
| 16416 | |||
| 16417 | nanf | ||
| 16418 | .param_str = "fcC*" | ||
| 16419 | .header = .math | ||
| 16420 | .attributes = .{ .pure = true, .lib_function_without_prefix = true } | ||
| 16421 | |||
| 16422 | nanl | ||
| 16423 | .param_str = "LdcC*" | ||
| 16424 | .header = .math | ||
| 16425 | .attributes = .{ .pure = true, .lib_function_without_prefix = true } | ||
| 16426 | |||
| 16427 | nearbyint | ||
| 16428 | .param_str = "dd" | ||
| 16429 | .header = .math | ||
| 16430 | .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } | ||
| 16431 | |||
| 16432 | nearbyintf | ||
| 16433 | .param_str = "ff" | ||
| 16434 | .header = .math | ||
| 16435 | .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } | ||
| 16436 | |||
| 16437 | nearbyintl | ||
| 16438 | .param_str = "LdLd" | ||
| 16439 | .header = .math | ||
| 16440 | .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } | ||
| 16441 | |||
| 16442 | nextafter | ||
| 16443 | .param_str = "ddd" | ||
| 16444 | .header = .math | ||
| 16445 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16446 | |||
| 16447 | nextafterf | ||
| 16448 | .param_str = "fff" | ||
| 16449 | .header = .math | ||
| 16450 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16451 | |||
| 16452 | nextafterl | ||
| 16453 | .param_str = "LdLdLd" | ||
| 16454 | .header = .math | ||
| 16455 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16456 | |||
| 16457 | nexttoward | ||
| 16458 | .param_str = "ddLd" | ||
| 16459 | .header = .math | ||
| 16460 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16461 | |||
| 16462 | nexttowardf | ||
| 16463 | .param_str = "ffLd" | ||
| 16464 | .header = .math | ||
| 16465 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16466 | |||
| 16467 | nexttowardl | ||
| 16468 | .param_str = "LdLdLd" | ||
| 16469 | .header = .math | ||
| 16470 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16471 | |||
| 16472 | pow | ||
| 16473 | .param_str = "ddd" | ||
| 16474 | .header = .math | ||
| 16475 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16476 | |||
| 16477 | powf | ||
| 16478 | .param_str = "fff" | ||
| 16479 | .header = .math | ||
| 16480 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16481 | |||
| 16482 | powl | ||
| 16483 | .param_str = "LdLdLd" | ||
| 16484 | .header = .math | ||
| 16485 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16486 | |||
| 16487 | printf | ||
| 16488 | .param_str = "icC*." | ||
| 16489 | .header = .stdio | ||
| 16490 | .attributes = .{ .lib_function_without_prefix = true, .format_kind = .printf } | ||
| 16491 | |||
| 16492 | realloc | ||
| 16493 | .param_str = "v*v*z" | ||
| 16494 | .header = .stdlib | ||
| 16495 | .attributes = .{ .lib_function_without_prefix = true } | ||
| 16496 | |||
| 16497 | remainder | ||
| 16498 | .param_str = "ddd" | ||
| 16499 | .header = .math | ||
| 16500 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16501 | |||
| 16502 | remainderf | ||
| 16503 | .param_str = "fff" | ||
| 16504 | .header = .math | ||
| 16505 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16506 | |||
| 16507 | remainderl | ||
| 16508 | .param_str = "LdLdLd" | ||
| 16509 | .header = .math | ||
| 16510 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16511 | |||
| 16512 | remquo | ||
| 16513 | .param_str = "dddi*" | ||
| 16514 | .header = .math | ||
| 16515 | .attributes = .{ .lib_function_without_prefix = true } | ||
| 16516 | |||
| 16517 | remquof | ||
| 16518 | .param_str = "fffi*" | ||
| 16519 | .header = .math | ||
| 16520 | .attributes = .{ .lib_function_without_prefix = true } | ||
| 16521 | |||
| 16522 | remquol | ||
| 16523 | .param_str = "LdLdLdi*" | ||
| 16524 | .header = .math | ||
| 16525 | .attributes = .{ .lib_function_without_prefix = true } | ||
| 16526 | |||
| 16527 | rindex | ||
| 16528 | .param_str = "c*cC*i" | ||
| 16529 | .header = .strings, .language = .all_gnu_languages | ||
| 16530 | .attributes = .{ .lib_function_without_prefix = true } | ||
| 16531 | |||
| 16532 | rint | ||
| 16533 | .param_str = "dd" | ||
| 16534 | .header = .math | ||
| 16535 | .attributes = .{ .lib_function_without_prefix = true, .const_without_fp_exceptions = true } | ||
| 16536 | |||
| 16537 | rintf | ||
| 16538 | .param_str = "ff" | ||
| 16539 | .header = .math | ||
| 16540 | .attributes = .{ .lib_function_without_prefix = true, .const_without_fp_exceptions = true } | ||
| 16541 | |||
| 16542 | rintl | ||
| 16543 | .param_str = "LdLd" | ||
| 16544 | .header = .math | ||
| 16545 | .attributes = .{ .lib_function_without_prefix = true, .const_without_fp_exceptions = true } | ||
| 16546 | |||
| 16547 | round | ||
| 16548 | .param_str = "dd" | ||
| 16549 | .header = .math | ||
| 16550 | .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } | ||
| 16551 | |||
| 16552 | roundeven | ||
| 16553 | .param_str = "dd" | ||
| 16554 | .header = .math | ||
| 16555 | .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } | ||
| 16556 | |||
| 16557 | roundevenf | ||
| 16558 | .param_str = "ff" | ||
| 16559 | .header = .math | ||
| 16560 | .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } | ||
| 16561 | |||
| 16562 | roundevenl | ||
| 16563 | .param_str = "LdLd" | ||
| 16564 | .header = .math | ||
| 16565 | .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } | ||
| 16566 | |||
| 16567 | roundf | ||
| 16568 | .param_str = "ff" | ||
| 16569 | .header = .math | ||
| 16570 | .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } | ||
| 16571 | |||
| 16572 | roundl | ||
| 16573 | .param_str = "LdLd" | ||
| 16574 | .header = .math | ||
| 16575 | .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } | ||
| 16576 | |||
| 16577 | savectx | ||
| 16578 | .param_str = "iJ" | ||
| 16579 | .header = .setjmp | ||
| 16580 | .attributes = .{ .allow_type_mismatch = true, .lib_function_without_prefix = true, .returns_twice = true } | ||
| 16581 | |||
| 16582 | scalbln | ||
| 16583 | .param_str = "ddLi" | ||
| 16584 | .header = .math | ||
| 16585 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16586 | |||
| 16587 | scalblnf | ||
| 16588 | .param_str = "ffLi" | ||
| 16589 | .header = .math | ||
| 16590 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16591 | |||
| 16592 | scalblnl | ||
| 16593 | .param_str = "LdLdLi" | ||
| 16594 | .header = .math | ||
| 16595 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16596 | |||
| 16597 | scalbn | ||
| 16598 | .param_str = "ddi" | ||
| 16599 | .header = .math | ||
| 16600 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16601 | |||
| 16602 | scalbnf | ||
| 16603 | .param_str = "ffi" | ||
| 16604 | .header = .math | ||
| 16605 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16606 | |||
| 16607 | scalbnl | ||
| 16608 | .param_str = "LdLdi" | ||
| 16609 | .header = .math | ||
| 16610 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16611 | |||
| 16612 | scanf | ||
| 16613 | .param_str = "icC*R." | ||
| 16614 | .header = .stdio | ||
| 16615 | .attributes = .{ .lib_function_without_prefix = true, .format_kind = .scanf } | ||
| 16616 | |||
| 16617 | setjmp | ||
| 16618 | .param_str = "iJ" | ||
| 16619 | .header = .setjmp | ||
| 16620 | .attributes = .{ .allow_type_mismatch = true, .lib_function_without_prefix = true, .returns_twice = true } | ||
| 16621 | |||
| 16622 | siglongjmp | ||
| 16623 | .param_str = "vSJi" | ||
| 16624 | .header = .setjmp, .language = .all_gnu_languages | ||
| 16625 | .attributes = .{ .noreturn = true, .allow_type_mismatch = true, .lib_function_without_prefix = true } | ||
| 16626 | |||
| 16627 | sigsetjmp | ||
| 16628 | .param_str = "iSJi" | ||
| 16629 | .header = .setjmp | ||
| 16630 | .attributes = .{ .allow_type_mismatch = true, .lib_function_without_prefix = true, .returns_twice = true } | ||
| 16631 | |||
| 16632 | sin | ||
| 16633 | .param_str = "dd" | ||
| 16634 | .header = .math | ||
| 16635 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16636 | |||
| 16637 | sinf | ||
| 16638 | .param_str = "ff" | ||
| 16639 | .header = .math | ||
| 16640 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16641 | |||
| 16642 | sinh | ||
| 16643 | .param_str = "dd" | ||
| 16644 | .header = .math | ||
| 16645 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16646 | |||
| 16647 | sinhf | ||
| 16648 | .param_str = "ff" | ||
| 16649 | .header = .math | ||
| 16650 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16651 | |||
| 16652 | sinhl | ||
| 16653 | .param_str = "LdLd" | ||
| 16654 | .header = .math | ||
| 16655 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16656 | |||
| 16657 | sinl | ||
| 16658 | .param_str = "LdLd" | ||
| 16659 | .header = .math | ||
| 16660 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16661 | |||
| 16662 | snprintf | ||
| 16663 | .param_str = "ic*zcC*." | ||
| 16664 | .header = .stdio | ||
| 16665 | .attributes = .{ .lib_function_without_prefix = true, .format_kind = .printf, .format_string_position = 2 } | ||
| 16666 | |||
| 16667 | sprintf | ||
| 16668 | .param_str = "ic*cC*." | ||
| 16669 | .header = .stdio | ||
| 16670 | .attributes = .{ .lib_function_without_prefix = true, .format_kind = .printf, .format_string_position = 1 } | ||
| 16671 | |||
| 16672 | sqrt | ||
| 16673 | .param_str = "dd" | ||
| 16674 | .header = .math | ||
| 16675 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16676 | |||
| 16677 | sqrtf | ||
| 16678 | .param_str = "ff" | ||
| 16679 | .header = .math | ||
| 16680 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16681 | |||
| 16682 | sqrtl | ||
| 16683 | .param_str = "LdLd" | ||
| 16684 | .header = .math | ||
| 16685 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16686 | |||
| 16687 | sscanf | ||
| 16688 | .param_str = "icC*RcC*R." | ||
| 16689 | .header = .stdio | ||
| 16690 | .attributes = .{ .lib_function_without_prefix = true, .format_kind = .scanf, .format_string_position = 1 } | ||
| 16691 | |||
| 16692 | stpcpy | ||
| 16693 | .param_str = "c*c*cC*" | ||
| 16694 | .header = .string, .language = .all_gnu_languages | ||
| 16695 | .attributes = .{ .lib_function_without_prefix = true } | ||
| 16696 | |||
| 16697 | stpncpy | ||
| 16698 | .param_str = "c*c*cC*z" | ||
| 16699 | .header = .string, .language = .all_gnu_languages | ||
| 16700 | .attributes = .{ .lib_function_without_prefix = true } | ||
| 16701 | |||
| 16702 | strcasecmp | ||
| 16703 | .param_str = "icC*cC*" | ||
| 16704 | .header = .strings, .language = .all_gnu_languages | ||
| 16705 | .attributes = .{ .lib_function_without_prefix = true } | ||
| 16706 | |||
| 16707 | strcat | ||
| 16708 | .param_str = "c*c*cC*" | ||
| 16709 | .header = .string | ||
| 16710 | .attributes = .{ .lib_function_without_prefix = true } | ||
| 16711 | |||
| 16712 | strchr | ||
| 16713 | .param_str = "c*cC*i" | ||
| 16714 | .header = .string | ||
| 16715 | .attributes = .{ .lib_function_without_prefix = true, .const_evaluable = true } | ||
| 16716 | |||
| 16717 | strcmp | ||
| 16718 | .param_str = "icC*cC*" | ||
| 16719 | .header = .string | ||
| 16720 | .attributes = .{ .lib_function_without_prefix = true, .const_evaluable = true } | ||
| 16721 | |||
| 16722 | strcpy | ||
| 16723 | .param_str = "c*c*cC*" | ||
| 16724 | .header = .string | ||
| 16725 | .attributes = .{ .lib_function_without_prefix = true } | ||
| 16726 | |||
| 16727 | strcspn | ||
| 16728 | .param_str = "zcC*cC*" | ||
| 16729 | .header = .string | ||
| 16730 | .attributes = .{ .lib_function_without_prefix = true } | ||
| 16731 | |||
| 16732 | strdup | ||
| 16733 | .param_str = "c*cC*" | ||
| 16734 | .header = .string, .language = .all_gnu_languages | ||
| 16735 | .attributes = .{ .lib_function_without_prefix = true } | ||
| 16736 | |||
| 16737 | strerror | ||
| 16738 | .param_str = "c*i" | ||
| 16739 | .header = .string | ||
| 16740 | .attributes = .{ .lib_function_without_prefix = true } | ||
| 16741 | |||
| 16742 | strlcat | ||
| 16743 | .param_str = "zc*cC*z" | ||
| 16744 | .header = .string, .language = .all_gnu_languages | ||
| 16745 | .attributes = .{ .lib_function_without_prefix = true } | ||
| 16746 | |||
| 16747 | strlcpy | ||
| 16748 | .param_str = "zc*cC*z" | ||
| 16749 | .header = .string, .language = .all_gnu_languages | ||
| 16750 | .attributes = .{ .lib_function_without_prefix = true } | ||
| 16751 | |||
| 16752 | strlen | ||
| 16753 | .param_str = "zcC*" | ||
| 16754 | .header = .string | ||
| 16755 | .attributes = .{ .lib_function_without_prefix = true, .const_evaluable = true } | ||
| 16756 | |||
| 16757 | strncasecmp | ||
| 16758 | .param_str = "icC*cC*z" | ||
| 16759 | .header = .strings, .language = .all_gnu_languages | ||
| 16760 | .attributes = .{ .lib_function_without_prefix = true } | ||
| 16761 | |||
| 16762 | strncat | ||
| 16763 | .param_str = "c*c*cC*z" | ||
| 16764 | .header = .string | ||
| 16765 | .attributes = .{ .lib_function_without_prefix = true } | ||
| 16766 | |||
| 16767 | strncmp | ||
| 16768 | .param_str = "icC*cC*z" | ||
| 16769 | .header = .string | ||
| 16770 | .attributes = .{ .lib_function_without_prefix = true, .const_evaluable = true } | ||
| 16771 | |||
| 16772 | strncpy | ||
| 16773 | .param_str = "c*c*cC*z" | ||
| 16774 | .header = .string | ||
| 16775 | .attributes = .{ .lib_function_without_prefix = true } | ||
| 16776 | |||
| 16777 | strndup | ||
| 16778 | .param_str = "c*cC*z" | ||
| 16779 | .header = .string, .language = .all_gnu_languages | ||
| 16780 | .attributes = .{ .lib_function_without_prefix = true } | ||
| 16781 | |||
| 16782 | strpbrk | ||
| 16783 | .param_str = "c*cC*cC*" | ||
| 16784 | .header = .string | ||
| 16785 | .attributes = .{ .lib_function_without_prefix = true } | ||
| 16786 | |||
| 16787 | strrchr | ||
| 16788 | .param_str = "c*cC*i" | ||
| 16789 | .header = .string | ||
| 16790 | .attributes = .{ .lib_function_without_prefix = true } | ||
| 16791 | |||
| 16792 | strspn | ||
| 16793 | .param_str = "zcC*cC*" | ||
| 16794 | .header = .string | ||
| 16795 | .attributes = .{ .lib_function_without_prefix = true } | ||
| 16796 | |||
| 16797 | strstr | ||
| 16798 | .param_str = "c*cC*cC*" | ||
| 16799 | .header = .string | ||
| 16800 | .attributes = .{ .lib_function_without_prefix = true } | ||
| 16801 | |||
| 16802 | strtod | ||
| 16803 | .param_str = "dcC*c**" | ||
| 16804 | .header = .stdlib | ||
| 16805 | .attributes = .{ .lib_function_without_prefix = true } | ||
| 16806 | |||
| 16807 | strtof | ||
| 16808 | .param_str = "fcC*c**" | ||
| 16809 | .header = .stdlib | ||
| 16810 | .attributes = .{ .lib_function_without_prefix = true } | ||
| 16811 | |||
| 16812 | strtok | ||
| 16813 | .param_str = "c*c*cC*" | ||
| 16814 | .header = .string | ||
| 16815 | .attributes = .{ .lib_function_without_prefix = true } | ||
| 16816 | |||
| 16817 | strtol | ||
| 16818 | .param_str = "LicC*c**i" | ||
| 16819 | .header = .stdlib | ||
| 16820 | .attributes = .{ .lib_function_without_prefix = true } | ||
| 16821 | |||
| 16822 | strtold | ||
| 16823 | .param_str = "LdcC*c**" | ||
| 16824 | .header = .stdlib | ||
| 16825 | .attributes = .{ .lib_function_without_prefix = true } | ||
| 16826 | |||
| 16827 | strtoll | ||
| 16828 | .param_str = "LLicC*c**i" | ||
| 16829 | .header = .stdlib | ||
| 16830 | .attributes = .{ .lib_function_without_prefix = true } | ||
| 16831 | |||
| 16832 | strtoul | ||
| 16833 | .param_str = "ULicC*c**i" | ||
| 16834 | .header = .stdlib | ||
| 16835 | .attributes = .{ .lib_function_without_prefix = true } | ||
| 16836 | |||
| 16837 | strtoull | ||
| 16838 | .param_str = "ULLicC*c**i" | ||
| 16839 | .header = .stdlib | ||
| 16840 | .attributes = .{ .lib_function_without_prefix = true } | ||
| 16841 | |||
| 16842 | strxfrm | ||
| 16843 | .param_str = "zc*cC*z" | ||
| 16844 | .header = .string | ||
| 16845 | .attributes = .{ .lib_function_without_prefix = true } | ||
| 16846 | |||
| 16847 | tan | ||
| 16848 | .param_str = "dd" | ||
| 16849 | .header = .math | ||
| 16850 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16851 | |||
| 16852 | tanf | ||
| 16853 | .param_str = "ff" | ||
| 16854 | .header = .math | ||
| 16855 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16856 | |||
| 16857 | tanh | ||
| 16858 | .param_str = "dd" | ||
| 16859 | .header = .math | ||
| 16860 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16861 | |||
| 16862 | tanhf | ||
| 16863 | .param_str = "ff" | ||
| 16864 | .header = .math | ||
| 16865 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16866 | |||
| 16867 | tanhl | ||
| 16868 | .param_str = "LdLd" | ||
| 16869 | .header = .math | ||
| 16870 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16871 | |||
| 16872 | tanl | ||
| 16873 | .param_str = "LdLd" | ||
| 16874 | .header = .math | ||
| 16875 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16876 | |||
| 16877 | tgamma | ||
| 16878 | .param_str = "dd" | ||
| 16879 | .header = .math | ||
| 16880 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16881 | |||
| 16882 | tgammaf | ||
| 16883 | .param_str = "ff" | ||
| 16884 | .header = .math | ||
| 16885 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16886 | |||
| 16887 | tgammal | ||
| 16888 | .param_str = "LdLd" | ||
| 16889 | .header = .math | ||
| 16890 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16891 | |||
| 16892 | tolower | ||
| 16893 | .param_str = "ii" | ||
| 16894 | .header = .ctype | ||
| 16895 | .attributes = .{ .pure = true, .lib_function_without_prefix = true } | ||
| 16896 | |||
| 16897 | toupper | ||
| 16898 | .param_str = "ii" | ||
| 16899 | .header = .ctype | ||
| 16900 | .attributes = .{ .pure = true, .lib_function_without_prefix = true } | ||
| 16901 | |||
| 16902 | trunc | ||
| 16903 | .param_str = "dd" | ||
| 16904 | .header = .math | ||
| 16905 | .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } | ||
| 16906 | |||
| 16907 | truncf | ||
| 16908 | .param_str = "ff" | ||
| 16909 | .header = .math | ||
| 16910 | .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } | ||
| 16911 | |||
| 16912 | truncl | ||
| 16913 | .param_str = "LdLd" | ||
| 16914 | .header = .math | ||
| 16915 | .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } | ||
| 16916 | |||
| 16917 | va_copy | ||
| 16918 | .param_str = "vAA" | ||
| 16919 | .header = .stdarg | ||
| 16920 | .attributes = .{ .lib_function_without_prefix = true } | ||
| 16921 | |||
| 16922 | va_end | ||
| 16923 | .param_str = "vA" | ||
| 16924 | .header = .stdarg | ||
| 16925 | .attributes = .{ .lib_function_without_prefix = true } | ||
| 16926 | |||
| 16927 | va_start | ||
| 16928 | .param_str = "vA." | ||
| 16929 | .header = .stdarg | ||
| 16930 | .attributes = .{ .lib_function_without_prefix = true } | ||
| 16931 | |||
| 16932 | vfork | ||
| 16933 | .param_str = "p" | ||
| 16934 | .header = .unistd | ||
| 16935 | .attributes = .{ .allow_type_mismatch = true, .lib_function_without_prefix = true, .returns_twice = true } | ||
| 16936 | |||
| 16937 | vfprintf | ||
| 16938 | .param_str = "iP*cC*a" | ||
| 16939 | .header = .stdio | ||
| 16940 | .attributes = .{ .lib_function_without_prefix = true, .format_kind = .vprintf, .format_string_position = 1 } | ||
| 16941 | |||
| 16942 | vfscanf | ||
| 16943 | .param_str = "iP*RcC*Ra" | ||
| 16944 | .header = .stdio | ||
| 16945 | .attributes = .{ .lib_function_without_prefix = true, .format_kind = .vscanf, .format_string_position = 1 } | ||
| 16946 | |||
| 16947 | vprintf | ||
| 16948 | .param_str = "icC*a" | ||
| 16949 | .header = .stdio | ||
| 16950 | .attributes = .{ .lib_function_without_prefix = true, .format_kind = .vprintf } | ||
| 16951 | |||
| 16952 | vscanf | ||
| 16953 | .param_str = "icC*Ra" | ||
| 16954 | .header = .stdio | ||
| 16955 | .attributes = .{ .lib_function_without_prefix = true, .format_kind = .vscanf } | ||
| 16956 | |||
| 16957 | vsnprintf | ||
| 16958 | .param_str = "ic*zcC*a" | ||
| 16959 | .header = .stdio | ||
| 16960 | .attributes = .{ .lib_function_without_prefix = true, .format_kind = .vprintf, .format_string_position = 2 } | ||
| 16961 | |||
| 16962 | vsprintf | ||
| 16963 | .param_str = "ic*cC*a" | ||
| 16964 | .header = .stdio | ||
| 16965 | .attributes = .{ .lib_function_without_prefix = true, .format_kind = .vprintf, .format_string_position = 1 } | ||
| 16966 | |||
| 16967 | vsscanf | ||
| 16968 | .param_str = "icC*RcC*Ra" | ||
| 16969 | .header = .stdio | ||
| 16970 | .attributes = .{ .lib_function_without_prefix = true, .format_kind = .vscanf, .format_string_position = 1 } | ||
| 16971 | |||
| 16972 | wcschr | ||
| 16973 | .param_str = "w*wC*w" | ||
| 16974 | .header = .wchar | ||
| 16975 | .attributes = .{ .lib_function_without_prefix = true, .const_evaluable = true } | ||
| 16976 | |||
| 16977 | wcscmp | ||
| 16978 | .param_str = "iwC*wC*" | ||
| 16979 | .header = .wchar | ||
| 16980 | .attributes = .{ .lib_function_without_prefix = true, .const_evaluable = true } | ||
| 16981 | |||
| 16982 | wcslen | ||
| 16983 | .param_str = "zwC*" | ||
| 16984 | .header = .wchar | ||
| 16985 | .attributes = .{ .lib_function_without_prefix = true, .const_evaluable = true } | ||
| 16986 | |||
| 16987 | wcsncmp | ||
| 16988 | .param_str = "iwC*wC*z" | ||
| 16989 | .header = .wchar | ||
| 16990 | .attributes = .{ .lib_function_without_prefix = true, .const_evaluable = true } | ||
| 16991 | |||
| 16992 | wmemchr | ||
| 16993 | .param_str = "w*wC*wz" | ||
| 16994 | .header = .wchar | ||
| 16995 | .attributes = .{ .lib_function_without_prefix = true, .const_evaluable = true } | ||
| 16996 | |||
| 16997 | wmemcmp | ||
| 16998 | .param_str = "iwC*wC*z" | ||
| 16999 | .header = .wchar | ||
| 17000 | .attributes = .{ .lib_function_without_prefix = true, .const_evaluable = true } | ||
| 17001 | |||
| 17002 | wmemcpy | ||
| 17003 | .param_str = "w*w*wC*z" | ||
| 17004 | .header = .wchar | ||
| 17005 | .attributes = .{ .lib_function_without_prefix = true, .const_evaluable = true } | ||
| 17006 | |||
| 17007 | wmemmove | ||
| 17008 | .param_str = "w*w*wC*z" | ||
| 17009 | .header = .wchar | ||
| 17010 | .attributes = .{ .lib_function_without_prefix = true, .const_evaluable = true } | ||
deps/aro/Builtins/BuiltinFunction.zig deleted-13037| ... | @@ -1,13037 +0,0 @@ | ||
| 1 | //! Autogenerated by ./scripts/generate_builtins_dafsa.zig, do not edit | ||
| 2 | |||
| 3 | const std = @import("std"); | ||
| 4 | const Properties = @import("Properties.zig"); | ||
| 5 | const TargetSet = Properties.TargetSet; | ||
| 6 | |||
| 7 | tag: Tag, | ||
| 8 | param_str: []const u8, | ||
| 9 | properties: Properties, | ||
| 10 | |||
| 11 | /// Integer starting at 0 derived from the unique index, | ||
| 12 | /// corresponds with the builtin_data array index. | ||
| 13 | pub const Tag = enum(u16) { _ }; | ||
| 14 | |||
| 15 | const Self = @This(); | ||
| 16 | |||
| 17 | pub fn fromName(name: []const u8) ?@This() { | ||
| 18 | const data_index = tagFromName(name) orelse return null; | ||
| 19 | return builtin_data[@intFromEnum(data_index)]; | ||
| 20 | } | ||
| 21 | |||
| 22 | pub fn tagFromName(name: []const u8) ?Tag { | ||
| 23 | const unique_index = uniqueIndex(name) orelse return null; | ||
| 24 | return @enumFromInt(unique_index - 1); | ||
| 25 | } | ||
| 26 | |||
| 27 | pub fn fromTag(tag: Tag) @This() { | ||
| 28 | return builtin_data[@intFromEnum(tag)]; | ||
| 29 | } | ||
| 30 | |||
| 31 | pub fn nameFromTagIntoBuf(tag: Tag, name_buf: []u8) []u8 { | ||
| 32 | std.debug.assert(name_buf.len >= longest_builtin_name); | ||
| 33 | const unique_index = @intFromEnum(tag) + 1; | ||
| 34 | return nameFromUniqueIndex(unique_index, name_buf); | ||
| 35 | } | ||
| 36 | |||
| 37 | pub fn nameFromTag(tag: Tag) NameBuf { | ||
| 38 | var name_buf: NameBuf = undefined; | ||
| 39 | const unique_index = @intFromEnum(tag) + 1; | ||
| 40 | const name = nameFromUniqueIndex(unique_index, &name_buf.buf); | ||
| 41 | name_buf.len = @intCast(name.len); | ||
| 42 | return name_buf; | ||
| 43 | } | ||
| 44 | |||
| 45 | pub const NameBuf = struct { | ||
| 46 | buf: [longest_builtin_name]u8 = undefined, | ||
| 47 | len: std.math.IntFittingRange(0, longest_builtin_name), | ||
| 48 | |||
| 49 | pub fn span(self: *const NameBuf) []const u8 { | ||
| 50 | return self.buf[0..self.len]; | ||
| 51 | } | ||
| 52 | }; | ||
| 53 | |||
| 54 | pub fn exists(name: []const u8) bool { | ||
| 55 | if (name.len < shortest_builtin_name or name.len > longest_builtin_name) return false; | ||
| 56 | |||
| 57 | var index: u16 = 0; | ||
| 58 | for (name) |c| { | ||
| 59 | index = findInList(dafsa[index].child_index, c) orelse return false; | ||
| 60 | } | ||
| 61 | return dafsa[index].end_of_word; | ||
| 62 | } | ||
| 63 | |||
| 64 | test exists { | ||
| 65 | try std.testing.expect(exists("__builtin_canonicalize")); | ||
| 66 | try std.testing.expect(!exists("__builtin_canonicaliz")); | ||
| 67 | try std.testing.expect(!exists("__builtin_canonicalize.")); | ||
| 68 | } | ||
| 69 | |||
| 70 | pub fn isVarArgs(self: @This()) bool { | ||
| 71 | return self.param_str[self.param_str.len - 1] == '.'; | ||
| 72 | } | ||
| 73 | |||
| 74 | pub const shortest_builtin_name = 3; | ||
| 75 | pub const longest_builtin_name = 43; | ||
| 76 | |||
| 77 | pub const BuiltinsIterator = struct { | ||
| 78 | index: u16 = 1, | ||
| 79 | name_buf: [longest_builtin_name]u8 = undefined, | ||
| 80 | |||
| 81 | pub const Entry = struct { | ||
| 82 | /// Memory of this slice is overwritten on every call to `next` | ||
| 83 | name: []const u8, | ||
| 84 | builtin: Self, | ||
| 85 | }; | ||
| 86 | |||
| 87 | pub fn next(self: *BuiltinsIterator) ?Entry { | ||
| 88 | if (self.index > builtin_data.len) return null; | ||
| 89 | const index = self.index; | ||
| 90 | const data_index = index - 1; | ||
| 91 | self.index += 1; | ||
| 92 | return .{ | ||
| 93 | .name = nameFromUniqueIndex(index, &self.name_buf), | ||
| 94 | .builtin = builtin_data[data_index], | ||
| 95 | }; | ||
| 96 | } | ||
| 97 | }; | ||
| 98 | |||
| 99 | test BuiltinsIterator { | ||
| 100 | var it = BuiltinsIterator{}; | ||
| 101 | |||
| 102 | var seen = std.StringHashMap(Self).init(std.testing.allocator); | ||
| 103 | defer seen.deinit(); | ||
| 104 | |||
| 105 | var arena_state = std.heap.ArenaAllocator.init(std.testing.allocator); | ||
| 106 | defer arena_state.deinit(); | ||
| 107 | const arena = arena_state.allocator(); | ||
| 108 | |||
| 109 | while (it.next()) |entry| { | ||
| 110 | const index = uniqueIndex(entry.name).?; | ||
| 111 | var buf: [longest_builtin_name]u8 = undefined; | ||
| 112 | const name_from_index = nameFromUniqueIndex(index, &buf); | ||
| 113 | try std.testing.expectEqualStrings(entry.name, name_from_index); | ||
| 114 | |||
| 115 | if (seen.contains(entry.name)) { | ||
| 116 | std.debug.print("iterated over {s} twice\n", .{entry.name}); | ||
| 117 | std.debug.print("current data: {}\n", .{entry.builtin}); | ||
| 118 | std.debug.print("previous data: {}\n", .{seen.get(entry.name).?}); | ||
| 119 | return error.TestExpectedUniqueEntries; | ||
| 120 | } | ||
| 121 | try seen.put(try arena.dupe(u8, entry.name), entry.builtin); | ||
| 122 | } | ||
| 123 | try std.testing.expectEqual(@as(usize, builtin_data.len), seen.count()); | ||
| 124 | } | ||
| 125 | |||
| 126 | /// Search siblings of `first_child_index` for the `char` | ||
| 127 | /// If found, returns the index of the node within the `dafsa` array. | ||
| 128 | /// Otherwise, returns `null`. | ||
| 129 | fn findInList(first_child_index: u16, char: u8) ?u16 { | ||
| 130 | var index = first_child_index; | ||
| 131 | while (true) { | ||
| 132 | if (dafsa[index].char == char) return index; | ||
| 133 | if (dafsa[index].end_of_list) return null; | ||
| 134 | index += 1; | ||
| 135 | } | ||
| 136 | unreachable; | ||
| 137 | } | ||
| 138 | |||
| 139 | /// Returns a unique (minimal perfect hash) index (starting at 1) for the `name`, | ||
| 140 | /// or null if the name was not found. | ||
| 141 | fn uniqueIndex(name: []const u8) ?u16 { | ||
| 142 | if (name.len < shortest_builtin_name or name.len > longest_builtin_name) return null; | ||
| 143 | |||
| 144 | var index: u16 = 0; | ||
| 145 | var node_index: u16 = 0; | ||
| 146 | |||
| 147 | for (name) |c| { | ||
| 148 | const child_index = findInList(dafsa[node_index].child_index, c) orelse return null; | ||
| 149 | var sibling_index = dafsa[node_index].child_index; | ||
| 150 | while (true) { | ||
| 151 | const sibling_c = dafsa[sibling_index].char; | ||
| 152 | std.debug.assert(sibling_c != 0); | ||
| 153 | if (sibling_c < c) { | ||
| 154 | index += dafsa[sibling_index].number; | ||
| 155 | } | ||
| 156 | if (dafsa[sibling_index].end_of_list) break; | ||
| 157 | sibling_index += 1; | ||
| 158 | } | ||
| 159 | node_index = child_index; | ||
| 160 | if (dafsa[node_index].end_of_word) index += 1; | ||
| 161 | } | ||
| 162 | |||
| 163 | if (!dafsa[node_index].end_of_word) return null; | ||
| 164 | |||
| 165 | return index; | ||
| 166 | } | ||
| 167 | |||
| 168 | /// Returns a slice of `buf` with the name associated with the given `index`. | ||
| 169 | /// This function should only be called with an `index` that | ||
| 170 | /// is already known to exist within the `dafsa`, e.g. an index | ||
| 171 | /// returned from `uniqueIndex`. | ||
| 172 | fn nameFromUniqueIndex(index: u16, buf: []u8) []u8 { | ||
| 173 | std.debug.assert(index >= 1 and index <= builtin_data.len); | ||
| 174 | |||
| 175 | var node_index: u16 = 0; | ||
| 176 | var count: u16 = index; | ||
| 177 | var fbs = std.io.fixedBufferStream(buf); | ||
| 178 | const w = fbs.writer(); | ||
| 179 | |||
| 180 | while (true) { | ||
| 181 | var sibling_index = dafsa[node_index].child_index; | ||
| 182 | while (true) { | ||
| 183 | if (dafsa[sibling_index].number > 0 and dafsa[sibling_index].number < count) { | ||
| 184 | count -= dafsa[sibling_index].number; | ||
| 185 | } else { | ||
| 186 | w.writeByte(dafsa[sibling_index].char) catch unreachable; | ||
| 187 | node_index = sibling_index; | ||
| 188 | if (dafsa[node_index].end_of_word) { | ||
| 189 | count -= 1; | ||
| 190 | } | ||
| 191 | break; | ||
| 192 | } | ||
| 193 | |||
| 194 | if (dafsa[sibling_index].end_of_list) break; | ||
| 195 | sibling_index += 1; | ||
| 196 | } | ||
| 197 | if (count == 0) break; | ||
| 198 | } | ||
| 199 | |||
| 200 | return fbs.getWritten(); | ||
| 201 | } | ||
| 202 | |||
| 203 | pub const MaxParamCount = 12; | ||
| 204 | |||
| 205 | /// We're 1 bit shy of being able to fit this in a u32: | ||
| 206 | /// - char only contains 0-9, a-z, A-Z, and _, so it could use a enum(u6) with a way to convert <-> u8 | ||
| 207 | /// (note: this would have a performance cost that may make the u32 not worth it) | ||
| 208 | /// - number has a max value of > 2047 and < 4095 (the first _ node has the largest number), | ||
| 209 | /// so it could fit into a u12 | ||
| 210 | /// - child_index currently has a max of > 4095 and < 8191, so it could fit into a u13 | ||
| 211 | /// | ||
| 212 | /// with the end_of_word/end_of_list 2 bools, that makes 33 bits total | ||
| 213 | const Node = packed struct(u64) { | ||
| 214 | char: u8, | ||
| 215 | /// Nodes are numbered with "an integer which gives the number of words that | ||
| 216 | /// would be accepted by the automaton starting from that state." This numbering | ||
| 217 | /// allows calculating "a one-to-one correspondence between the integers 1 to L | ||
| 218 | /// (L is the number of words accepted by the automaton) and the words themselves." | ||
| 219 | /// | ||
| 220 | /// Essentially, this allows us to have a minimal perfect hashing scheme such that | ||
| 221 | /// it's possible to store & lookup the properties of each builtin using a separate array. | ||
| 222 | number: u16, | ||
| 223 | /// If true, this node is the end of a valid builtin. | ||
| 224 | /// Note: This does not necessarily mean that this node does not have child nodes. | ||
| 225 | end_of_word: bool, | ||
| 226 | /// If true, this node is the end of a sibling list. | ||
| 227 | /// If false, then (index + 1) will contain the next sibling. | ||
| 228 | end_of_list: bool, | ||
| 229 | /// Padding bits to get to u64, unsure if there's some way to use these to improve something. | ||
| 230 | _extra: u22 = 0, | ||
| 231 | /// Index of the first child of this node. | ||
| 232 | child_index: u16, | ||
| 233 | }; | ||
| 234 | |||
| 235 | const dafsa = [_]Node{ | ||
| 236 | .{ .char = 0, .end_of_word = false, .end_of_list = true, .number = 0, .child_index = 1 }, | ||
| 237 | .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 3601, .child_index = 19 }, | ||
| 238 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 25, .child_index = 32 }, | ||
| 239 | .{ .char = 'b', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 37 }, | ||
| 240 | .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 82, .child_index = 39 }, | ||
| 241 | .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 16, .child_index = 50 }, | ||
| 242 | .{ .char = 'f', .end_of_word = false, .end_of_list = false, .number = 33, .child_index = 52 }, | ||
| 243 | .{ .char = 'g', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 62 }, | ||
| 244 | .{ .char = 'h', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 63 }, | ||
| 245 | .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 16, .child_index = 64 }, | ||
| 246 | .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 36, .child_index = 67 }, | ||
| 247 | .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 12, .child_index = 73 }, | ||
| 248 | .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 12, .child_index = 76 }, | ||
| 249 | .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 78 }, | ||
| 250 | .{ .char = 'r', .end_of_word = false, .end_of_list = false, .number = 17, .child_index = 80 }, | ||
| 251 | .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 54, .child_index = 83 }, | ||
| 252 | .{ .char = 't', .end_of_word = false, .end_of_list = false, .number = 14, .child_index = 92 }, | ||
| 253 | .{ .char = 'v', .end_of_word = false, .end_of_list = false, .number = 11, .child_index = 96 }, | ||
| 254 | .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 100 }, | ||
| 255 | .{ .char = 'B', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 102 }, | ||
| 256 | .{ .char = 'E', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 103 }, | ||
| 257 | .{ .char = 'I', .end_of_word = false, .end_of_list = false, .number = 29, .child_index = 104 }, | ||
| 258 | .{ .char = 'M', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 105 }, | ||
| 259 | .{ .char = 'R', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 106 }, | ||
| 260 | .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 3525, .child_index = 107 }, | ||
| 261 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 125 }, | ||
| 262 | .{ .char = 'b', .end_of_word = false, .end_of_list = false, .number = 11, .child_index = 127 }, | ||
| 263 | .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 129 }, | ||
| 264 | .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 10, .child_index = 130 }, | ||
| 265 | .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 131 }, | ||
| 266 | .{ .char = 'r', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 133 }, | ||
| 267 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 134 }, | ||
| 268 | .{ .char = 'b', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 135 }, | ||
| 269 | .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 137 }, | ||
| 270 | .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 138 }, | ||
| 271 | .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 140 }, | ||
| 272 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 9, .child_index = 141 }, | ||
| 273 | .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 142 }, | ||
| 274 | .{ .char = 'z', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 144 }, | ||
| 275 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 25, .child_index = 145 }, | ||
| 276 | .{ .char = 'b', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 151 }, | ||
| 277 | .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 137 }, | ||
| 278 | .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 152 }, | ||
| 279 | .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 154 }, | ||
| 280 | .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 155 }, | ||
| 281 | .{ .char = 'o', .end_of_word = false, .end_of_list = false, .number = 12, .child_index = 156 }, | ||
| 282 | .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 159 }, | ||
| 283 | .{ .char = 'r', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 161 }, | ||
| 284 | .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 9, .child_index = 162 }, | ||
| 285 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 164 }, | ||
| 286 | .{ .char = 'r', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 165 }, | ||
| 287 | .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 10, .child_index = 166 }, | ||
| 288 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 168 }, | ||
| 289 | .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 169 }, | ||
| 290 | .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 170 }, | ||
| 291 | .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 171 }, | ||
| 292 | .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 12, .child_index = 172 }, | ||
| 293 | .{ .char = 'o', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 175 }, | ||
| 294 | .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 176 }, | ||
| 295 | .{ .char = 'r', .end_of_word = false, .end_of_list = false, .number = 5, .child_index = 177 }, | ||
| 296 | .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 178 }, | ||
| 297 | .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 179 }, | ||
| 298 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 180 }, | ||
| 299 | .{ .char = 'y', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 181 }, | ||
| 300 | .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 182 }, | ||
| 301 | .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 183 }, | ||
| 302 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 12, .child_index = 184 }, | ||
| 303 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 194 }, | ||
| 304 | .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 195 }, | ||
| 305 | .{ .char = 'g', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 196 }, | ||
| 306 | .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 7, .child_index = 197 }, | ||
| 307 | .{ .char = 'o', .end_of_word = false, .end_of_list = false, .number = 16, .child_index = 199 }, | ||
| 308 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 201 }, | ||
| 309 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 203 }, | ||
| 310 | .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 204 }, | ||
| 311 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 205 }, | ||
| 312 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 206 }, | ||
| 313 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 9, .child_index = 207 }, | ||
| 314 | .{ .char = 'o', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 209 }, | ||
| 315 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 210 }, | ||
| 316 | .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 7, .child_index = 211 }, | ||
| 317 | .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 213 }, | ||
| 318 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 214 }, | ||
| 319 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 215 }, | ||
| 320 | .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 7, .child_index = 216 }, | ||
| 321 | .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 217 }, | ||
| 322 | .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 218 }, | ||
| 323 | .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 220 }, | ||
| 324 | .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 176 }, | ||
| 325 | .{ .char = 'q', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 151 }, | ||
| 326 | .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 178 }, | ||
| 327 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 31, .child_index = 221 }, | ||
| 328 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 223 }, | ||
| 329 | .{ .char = 'g', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 196 }, | ||
| 330 | .{ .char = 'o', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 224 }, | ||
| 331 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 226 }, | ||
| 332 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 227 }, | ||
| 333 | .{ .char = 'f', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 228 }, | ||
| 334 | .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 176 }, | ||
| 335 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 231 }, | ||
| 336 | .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 235 }, | ||
| 337 | .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 236 }, | ||
| 338 | .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 237 }, | ||
| 339 | .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 238 }, | ||
| 340 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 29, .child_index = 239 }, | ||
| 341 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 240 }, | ||
| 342 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 241 }, | ||
| 343 | .{ .char = 'G', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 242 }, | ||
| 344 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 10, .child_index = 243 }, | ||
| 345 | .{ .char = 'b', .end_of_word = false, .end_of_list = false, .number = 2967, .child_index = 248 }, | ||
| 346 | .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 249 }, | ||
| 347 | .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 252 }, | ||
| 348 | .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 5, .child_index = 255 }, | ||
| 349 | .{ .char = 'f', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 257 }, | ||
| 350 | .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 9, .child_index = 259 }, | ||
| 351 | .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 260 }, | ||
| 352 | .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 390, .child_index = 262 }, | ||
| 353 | .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 264 }, | ||
| 354 | .{ .char = 'r', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 265 }, | ||
| 355 | .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 113, .child_index = 266 }, | ||
| 356 | .{ .char = 't', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 269 }, | ||
| 357 | .{ .char = 'v', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 270 }, | ||
| 358 | .{ .char = 'w', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 271 }, | ||
| 359 | .{ .char = 'x', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 273 }, | ||
| 360 | .{ .char = 'y', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 274 }, | ||
| 361 | .{ .char = 'b', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 275 }, | ||
| 362 | .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 276 }, | ||
| 363 | .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 277 }, | ||
| 364 | .{ .char = 'y', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 278 }, | ||
| 365 | .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 279 }, | ||
| 366 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 10, .child_index = 281 }, | ||
| 367 | .{ .char = 'o', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 282 }, | ||
| 368 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 283 }, | ||
| 369 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 284 }, | ||
| 370 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 285 }, | ||
| 371 | .{ .char = 'o', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 286 }, | ||
| 372 | .{ .char = 's', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 }, | ||
| 373 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 287 }, | ||
| 374 | .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 288 }, | ||
| 375 | .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 289 }, | ||
| 376 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 223 }, | ||
| 377 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 9, .child_index = 290 }, | ||
| 378 | .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 291 }, | ||
| 379 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 292 }, | ||
| 380 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 293 }, | ||
| 381 | .{ .char = 'b', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 294 }, | ||
| 382 | .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 137 }, | ||
| 383 | .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 295 }, | ||
| 384 | .{ .char = 'r', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 296 }, | ||
| 385 | .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 140 }, | ||
| 386 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 164 }, | ||
| 387 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 297 }, | ||
| 388 | .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 298 }, | ||
| 389 | .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 299 }, | ||
| 390 | .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 300 }, | ||
| 391 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 296 }, | ||
| 392 | .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 301 }, | ||
| 393 | .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 302 }, | ||
| 394 | .{ .char = 's', .end_of_word = true, .end_of_list = true, .number = 6, .child_index = 303 }, | ||
| 395 | .{ .char = 'o', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 209 }, | ||
| 396 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 306 }, | ||
| 397 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 307 }, | ||
| 398 | .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 223 }, | ||
| 399 | .{ .char = 'q', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 151 }, | ||
| 400 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 223 }, | ||
| 401 | .{ .char = 'f', .end_of_word = true, .end_of_list = true, .number = 6, .child_index = 308 }, | ||
| 402 | .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 311 }, | ||
| 403 | .{ .char = 'p', .end_of_word = true, .end_of_list = true, .number = 9, .child_index = 312 }, | ||
| 404 | .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 294 }, | ||
| 405 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 316 }, | ||
| 406 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 317 }, | ||
| 407 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 318 }, | ||
| 408 | .{ .char = 'a', .end_of_word = true, .end_of_list = false, .number = 6, .child_index = 319 }, | ||
| 409 | .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 206 }, | ||
| 410 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 322 }, | ||
| 411 | .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 323 }, | ||
| 412 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 210 }, | ||
| 413 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 324 }, | ||
| 414 | .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 327 }, | ||
| 415 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 328 }, | ||
| 416 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 329 }, | ||
| 417 | .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 330 }, | ||
| 418 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 331 }, | ||
| 419 | .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 332 }, | ||
| 420 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 333 }, | ||
| 421 | .{ .char = 'b', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 334 }, | ||
| 422 | .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 335 }, | ||
| 423 | .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 336 }, | ||
| 424 | .{ .char = 'g', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 337 }, | ||
| 425 | .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 338 }, | ||
| 426 | .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 339 }, | ||
| 427 | .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 341 }, | ||
| 428 | .{ .char = 'u', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 342 }, | ||
| 429 | .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 343 }, | ||
| 430 | .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 344 }, | ||
| 431 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 345 }, | ||
| 432 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 346 }, | ||
| 433 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 194 }, | ||
| 434 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 201 }, | ||
| 435 | .{ .char = 'g', .end_of_word = true, .end_of_list = false, .number = 15, .child_index = 347 }, | ||
| 436 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 352 }, | ||
| 437 | .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 353 }, | ||
| 438 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 354 }, | ||
| 439 | .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 295 }, | ||
| 440 | .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 355 }, | ||
| 441 | .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 360 }, | ||
| 442 | .{ .char = 'n', .end_of_word = true, .end_of_list = true, .number = 3, .child_index = 361 }, | ||
| 443 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 363 }, | ||
| 444 | .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 364 }, | ||
| 445 | .{ .char = 'w', .end_of_word = true, .end_of_list = true, .number = 3, .child_index = 361 }, | ||
| 446 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 365 }, | ||
| 447 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 203 }, | ||
| 448 | .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 366 }, | ||
| 449 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 368 }, | ||
| 450 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 370 }, | ||
| 451 | .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 371 }, | ||
| 452 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 7, .child_index = 372 }, | ||
| 453 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 374 }, | ||
| 454 | .{ .char = 'g', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 375 }, | ||
| 455 | .{ .char = 'n', .end_of_word = true, .end_of_list = true, .number = 6, .child_index = 303 }, | ||
| 456 | .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 176 }, | ||
| 457 | .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 377 }, | ||
| 458 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 29, .child_index = 379 }, | ||
| 459 | .{ .char = 'n', .end_of_word = true, .end_of_list = true, .number = 6, .child_index = 303 }, | ||
| 460 | .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 338 }, | ||
| 461 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 342 }, | ||
| 462 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 389 }, | ||
| 463 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 390 }, | ||
| 464 | .{ .char = 'o', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 393 }, | ||
| 465 | .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 176 }, | ||
| 466 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 178 }, | ||
| 467 | .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 327 }, | ||
| 468 | .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 220 }, | ||
| 469 | .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 176 }, | ||
| 470 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 178 }, | ||
| 471 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 394 }, | ||
| 472 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 397 }, | ||
| 473 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 398 }, | ||
| 474 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 311 }, | ||
| 475 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 29, .child_index = 399 }, | ||
| 476 | .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 400 }, | ||
| 477 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 401 }, | ||
| 478 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 402 }, | ||
| 479 | .{ .char = 'b', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 275 }, | ||
| 480 | .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 403 }, | ||
| 481 | .{ .char = 'r', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 404 }, | ||
| 482 | .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 405 }, | ||
| 483 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 406 }, | ||
| 484 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 2967, .child_index = 407 }, | ||
| 485 | .{ .char = '1', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 408 }, | ||
| 486 | .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 409 }, | ||
| 487 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 410 }, | ||
| 488 | .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 411 }, | ||
| 489 | .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 412 }, | ||
| 490 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 412 }, | ||
| 491 | .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 238 }, | ||
| 492 | .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 413 }, | ||
| 493 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 415 }, | ||
| 494 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 170 }, | ||
| 495 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 9, .child_index = 416 }, | ||
| 496 | .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 418 }, | ||
| 497 | .{ .char = 'z', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 419 }, | ||
| 498 | .{ .char = 'o', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 420 }, | ||
| 499 | .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 389, .child_index = 421 }, | ||
| 500 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 422 }, | ||
| 501 | .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 423 }, | ||
| 502 | .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 424 }, | ||
| 503 | .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 425 }, | ||
| 504 | .{ .char = 'y', .end_of_word = false, .end_of_list = true, .number = 108, .child_index = 427 }, | ||
| 505 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 428 }, | ||
| 506 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 429 }, | ||
| 507 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 430 }, | ||
| 508 | .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 431 }, | ||
| 509 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 433 }, | ||
| 510 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 434 }, | ||
| 511 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 435 }, | ||
| 512 | .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 289 }, | ||
| 513 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 436 }, | ||
| 514 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 437 }, | ||
| 515 | .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 438 }, | ||
| 516 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 311 }, | ||
| 517 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 10, .child_index = 439 }, | ||
| 518 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 352 }, | ||
| 519 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 440 }, | ||
| 520 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 441 }, | ||
| 521 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 443 }, | ||
| 522 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 311 }, | ||
| 523 | .{ .char = 's', .end_of_word = true, .end_of_list = true, .number = 6, .child_index = 303 }, | ||
| 524 | .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 444 }, | ||
| 525 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 445 }, | ||
| 526 | .{ .char = 'n', .end_of_word = true, .end_of_list = true, .number = 9, .child_index = 446 }, | ||
| 527 | .{ .char = 'p', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 }, | ||
| 528 | .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 450 }, | ||
| 529 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 451 }, | ||
| 530 | .{ .char = 's', .end_of_word = true, .end_of_list = true, .number = 3, .child_index = 361 }, | ||
| 531 | .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 452 }, | ||
| 532 | .{ .char = 'g', .end_of_word = true, .end_of_list = true, .number = 3, .child_index = 361 }, | ||
| 533 | .{ .char = 't', .end_of_word = true, .end_of_list = true, .number = 3, .child_index = 361 }, | ||
| 534 | .{ .char = 'l', .end_of_word = true, .end_of_list = true, .number = 3, .child_index = 361 }, | ||
| 535 | .{ .char = 'p', .end_of_word = true, .end_of_list = true, .number = 3, .child_index = 361 }, | ||
| 536 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 296 }, | ||
| 537 | .{ .char = 'j', .end_of_word = true, .end_of_list = true, .number = 3, .child_index = 361 }, | ||
| 538 | .{ .char = 'y', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 453 }, | ||
| 539 | .{ .char = 'f', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 }, | ||
| 540 | .{ .char = 'h', .end_of_word = true, .end_of_list = false, .number = 3, .child_index = 361 }, | ||
| 541 | .{ .char = 'l', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 }, | ||
| 542 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 301 }, | ||
| 543 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 298 }, | ||
| 544 | .{ .char = 'c', .end_of_word = true, .end_of_list = false, .number = 3, .child_index = 361 }, | ||
| 545 | .{ .char = 'f', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 }, | ||
| 546 | .{ .char = 'l', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 }, | ||
| 547 | .{ .char = 't', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 }, | ||
| 548 | .{ .char = '2', .end_of_word = true, .end_of_list = false, .number = 3, .child_index = 361 }, | ||
| 549 | .{ .char = 'f', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 }, | ||
| 550 | .{ .char = 'l', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 }, | ||
| 551 | .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 454 }, | ||
| 552 | .{ .char = 'm', .end_of_word = true, .end_of_list = true, .number = 3, .child_index = 361 }, | ||
| 553 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 455 }, | ||
| 554 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 456 }, | ||
| 555 | .{ .char = 'f', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 }, | ||
| 556 | .{ .char = 'l', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 }, | ||
| 557 | .{ .char = 'x', .end_of_word = true, .end_of_list = true, .number = 3, .child_index = 361 }, | ||
| 558 | .{ .char = 'd', .end_of_word = true, .end_of_list = true, .number = 3, .child_index = 361 }, | ||
| 559 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 457 }, | ||
| 560 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 458 }, | ||
| 561 | .{ .char = 'e', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 }, | ||
| 562 | .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 299 }, | ||
| 563 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 459 }, | ||
| 564 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 460 }, | ||
| 565 | .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 461 }, | ||
| 566 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 297 }, | ||
| 567 | .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 462 }, | ||
| 568 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 463 }, | ||
| 569 | .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 464 }, | ||
| 570 | .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 466 }, | ||
| 571 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 467 }, | ||
| 572 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 468 }, | ||
| 573 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 469 }, | ||
| 574 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 470 }, | ||
| 575 | .{ .char = 'r', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 471 }, | ||
| 576 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 472 }, | ||
| 577 | .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 473 }, | ||
| 578 | .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 474 }, | ||
| 579 | .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 336 }, | ||
| 580 | .{ .char = 's', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 }, | ||
| 581 | .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 299 }, | ||
| 582 | .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 475 }, | ||
| 583 | .{ .char = '1', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 476 }, | ||
| 584 | .{ .char = '2', .end_of_word = true, .end_of_list = false, .number = 3, .child_index = 361 }, | ||
| 585 | .{ .char = 'b', .end_of_word = true, .end_of_list = false, .number = 3, .child_index = 361 }, | ||
| 586 | .{ .char = 'f', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 }, | ||
| 587 | .{ .char = 'l', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 }, | ||
| 588 | .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 374 }, | ||
| 589 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 297 }, | ||
| 590 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 478 }, | ||
| 591 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 479 }, | ||
| 592 | .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 480 }, | ||
| 593 | .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 484 }, | ||
| 594 | .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 485 }, | ||
| 595 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 486 }, | ||
| 596 | .{ .char = 'f', .end_of_word = true, .end_of_list = true, .number = 3, .child_index = 361 }, | ||
| 597 | .{ .char = 'f', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 }, | ||
| 598 | .{ .char = 'l', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 }, | ||
| 599 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 487 }, | ||
| 600 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 488 }, | ||
| 601 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 490 }, | ||
| 602 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 491 }, | ||
| 603 | .{ .char = 'q', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 492 }, | ||
| 604 | .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 332 }, | ||
| 605 | .{ .char = 't', .end_of_word = true, .end_of_list = true, .number = 3, .child_index = 361 }, | ||
| 606 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 493 }, | ||
| 607 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 494 }, | ||
| 608 | .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 495 }, | ||
| 609 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 496 }, | ||
| 610 | .{ .char = 'j', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 497 }, | ||
| 611 | .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 498 }, | ||
| 612 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 499 }, | ||
| 613 | .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 292 }, | ||
| 614 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 485 }, | ||
| 615 | .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 500 }, | ||
| 616 | .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 505 }, | ||
| 617 | .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 506 }, | ||
| 618 | .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 507 }, | ||
| 619 | .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 5, .child_index = 509 }, | ||
| 620 | .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 511 }, | ||
| 621 | .{ .char = 'r', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 512 }, | ||
| 622 | .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 513 }, | ||
| 623 | .{ .char = 't', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 515 }, | ||
| 624 | .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 516 }, | ||
| 625 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 517 }, | ||
| 626 | .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 518 }, | ||
| 627 | .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 519 }, | ||
| 628 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 520 }, | ||
| 629 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 521 }, | ||
| 630 | .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 522 }, | ||
| 631 | .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 323 }, | ||
| 632 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 524 }, | ||
| 633 | .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 525 }, | ||
| 634 | .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 527 }, | ||
| 635 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 29, .child_index = 528 }, | ||
| 636 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 529 }, | ||
| 637 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 531 }, | ||
| 638 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 532 }, | ||
| 639 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 533 }, | ||
| 640 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 534 }, | ||
| 641 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 535 }, | ||
| 642 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 536 }, | ||
| 643 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 2967, .child_index = 537 }, | ||
| 644 | .{ .char = '1', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 538 }, | ||
| 645 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 539 }, | ||
| 646 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 540 }, | ||
| 647 | .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 541 }, | ||
| 648 | .{ .char = 'b', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 }, | ||
| 649 | .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 438 }, | ||
| 650 | .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 542 }, | ||
| 651 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 543 }, | ||
| 652 | .{ .char = 'b', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 }, | ||
| 653 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 544 }, | ||
| 654 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 545 }, | ||
| 655 | .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 546 }, | ||
| 656 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 291 }, | ||
| 657 | .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 389, .child_index = 547 }, | ||
| 658 | .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 419 }, | ||
| 659 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 548 }, | ||
| 660 | .{ .char = 'v', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 549 }, | ||
| 661 | .{ .char = 'g', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 550 }, | ||
| 662 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 540 }, | ||
| 663 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 108, .child_index = 551 }, | ||
| 664 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 540 }, | ||
| 665 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 552 }, | ||
| 666 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 553 }, | ||
| 667 | .{ .char = 'e', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 }, | ||
| 668 | .{ .char = 'i', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 }, | ||
| 669 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 554 }, | ||
| 670 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 555 }, | ||
| 671 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 556 }, | ||
| 672 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 557 }, | ||
| 673 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 558 }, | ||
| 674 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 559 }, | ||
| 675 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 10, .child_index = 560 }, | ||
| 676 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 561 }, | ||
| 677 | .{ .char = 'l', .end_of_word = true, .end_of_list = false, .number = 4, .child_index = 563 }, | ||
| 678 | .{ .char = 'r', .end_of_word = true, .end_of_list = true, .number = 4, .child_index = 563 }, | ||
| 679 | .{ .char = 'j', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 566 }, | ||
| 680 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 567 }, | ||
| 681 | .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 568 }, | ||
| 682 | .{ .char = '2', .end_of_word = true, .end_of_list = false, .number = 3, .child_index = 361 }, | ||
| 683 | .{ .char = 'f', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 }, | ||
| 684 | .{ .char = 'h', .end_of_word = true, .end_of_list = false, .number = 3, .child_index = 361 }, | ||
| 685 | .{ .char = 'l', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 }, | ||
| 686 | .{ .char = 'y', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 }, | ||
| 687 | .{ .char = 'o', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 }, | ||
| 688 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 569 }, | ||
| 689 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 570 }, | ||
| 690 | .{ .char = '1', .end_of_word = true, .end_of_list = true, .number = 3, .child_index = 361 }, | ||
| 691 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 571 }, | ||
| 692 | .{ .char = 'r', .end_of_word = true, .end_of_list = true, .number = 3, .child_index = 361 }, | ||
| 693 | .{ .char = 'n', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 }, | ||
| 694 | .{ .char = 'd', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 }, | ||
| 695 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 496 }, | ||
| 696 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 572 }, | ||
| 697 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 573 }, | ||
| 698 | .{ .char = 'b', .end_of_word = true, .end_of_list = true, .number = 3, .child_index = 361 }, | ||
| 699 | .{ .char = 'x', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 }, | ||
| 700 | .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 574 }, | ||
| 701 | .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 575 }, | ||
| 702 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 576 }, | ||
| 703 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 577 }, | ||
| 704 | .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 238 }, | ||
| 705 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 578 }, | ||
| 706 | .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 579 }, | ||
| 707 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 580 }, | ||
| 708 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 581 }, | ||
| 709 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 582 }, | ||
| 710 | .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 579 }, | ||
| 711 | .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 583 }, | ||
| 712 | .{ .char = '0', .end_of_word = true, .end_of_list = false, .number = 3, .child_index = 361 }, | ||
| 713 | .{ .char = 'p', .end_of_word = true, .end_of_list = true, .number = 3, .child_index = 361 }, | ||
| 714 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 322 }, | ||
| 715 | .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 584 }, | ||
| 716 | .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 292 }, | ||
| 717 | .{ .char = 'h', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 585 }, | ||
| 718 | .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 291 }, | ||
| 719 | .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 450 }, | ||
| 720 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 586 }, | ||
| 721 | .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 292 }, | ||
| 722 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 311 }, | ||
| 723 | .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 587 }, | ||
| 724 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 588 }, | ||
| 725 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 589 }, | ||
| 726 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 496 }, | ||
| 727 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 590 }, | ||
| 728 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 591 }, | ||
| 729 | .{ .char = 'd', .end_of_word = true, .end_of_list = true, .number = 6, .child_index = 592 }, | ||
| 730 | .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 595 }, | ||
| 731 | .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 596 }, | ||
| 732 | .{ .char = 'f', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 }, | ||
| 733 | .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 291 }, | ||
| 734 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 282 }, | ||
| 735 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 217 }, | ||
| 736 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 598 }, | ||
| 737 | .{ .char = 'h', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 585 }, | ||
| 738 | .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 291 }, | ||
| 739 | .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 450 }, | ||
| 740 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 600 }, | ||
| 741 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 291 }, | ||
| 742 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 601 }, | ||
| 743 | .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 602 }, | ||
| 744 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 457 }, | ||
| 745 | .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 604 }, | ||
| 746 | .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 505 }, | ||
| 747 | .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 393 }, | ||
| 748 | .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 607 }, | ||
| 749 | .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 457 }, | ||
| 750 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 585 }, | ||
| 751 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 608 }, | ||
| 752 | .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 613 }, | ||
| 753 | .{ .char = 'c', .end_of_word = true, .end_of_list = true, .number = 3, .child_index = 361 }, | ||
| 754 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 292 }, | ||
| 755 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 458 }, | ||
| 756 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 614 }, | ||
| 757 | .{ .char = 'k', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 }, | ||
| 758 | .{ .char = 'h', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 585 }, | ||
| 759 | .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 291 }, | ||
| 760 | .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 497 }, | ||
| 761 | .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 615 }, | ||
| 762 | .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 484 }, | ||
| 763 | .{ .char = 'k', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 618 }, | ||
| 764 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 29, .child_index = 619 }, | ||
| 765 | .{ .char = 'F', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 620 }, | ||
| 766 | .{ .char = 'T', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 621 }, | ||
| 767 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 622 }, | ||
| 768 | .{ .char = 'E', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 623 }, | ||
| 769 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 624 }, | ||
| 770 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 625 }, | ||
| 771 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 626 }, | ||
| 772 | .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 627 }, | ||
| 773 | .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 2967, .child_index = 628 }, | ||
| 774 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 629 }, | ||
| 775 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 630 }, | ||
| 776 | .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 631 }, | ||
| 777 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 632 }, | ||
| 778 | .{ .char = '1', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 633 }, | ||
| 779 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 634 }, | ||
| 780 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 635 }, | ||
| 781 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 636 }, | ||
| 782 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 637 }, | ||
| 783 | .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 389, .child_index = 638 }, | ||
| 784 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 569 }, | ||
| 785 | .{ .char = 'l', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 }, | ||
| 786 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 499 }, | ||
| 787 | .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 108, .child_index = 639 }, | ||
| 788 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 520 }, | ||
| 789 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 641 }, | ||
| 790 | .{ .char = 'y', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 642 }, | ||
| 791 | .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 458 }, | ||
| 792 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 643 }, | ||
| 793 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 644 }, | ||
| 794 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 645 }, | ||
| 795 | .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 646 }, | ||
| 796 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 10, .child_index = 647 }, | ||
| 797 | .{ .char = 'l', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 }, | ||
| 798 | .{ .char = 'r', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 }, | ||
| 799 | .{ .char = '1', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 648 }, | ||
| 800 | .{ .char = '6', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 649 }, | ||
| 801 | .{ .char = '8', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 }, | ||
| 802 | .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 650 }, | ||
| 803 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 651 }, | ||
| 804 | .{ .char = 'a', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 }, | ||
| 805 | .{ .char = 'c', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 }, | ||
| 806 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 652 }, | ||
| 807 | .{ .char = 'e', .end_of_word = true, .end_of_list = true, .number = 3, .child_index = 361 }, | ||
| 808 | .{ .char = 'e', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 }, | ||
| 809 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 653 }, | ||
| 810 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 654 }, | ||
| 811 | .{ .char = 'h', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 568 }, | ||
| 812 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 521 }, | ||
| 813 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 655 }, | ||
| 814 | .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 656 }, | ||
| 815 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 585 }, | ||
| 816 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 311 }, | ||
| 817 | .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 311 }, | ||
| 818 | .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 572 }, | ||
| 819 | .{ .char = 'a', .end_of_word = true, .end_of_list = true, .number = 3, .child_index = 361 }, | ||
| 820 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 657 }, | ||
| 821 | .{ .char = 'r', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 }, | ||
| 822 | .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 572 }, | ||
| 823 | .{ .char = 'y', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 658 }, | ||
| 824 | .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 659 }, | ||
| 825 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 660 }, | ||
| 826 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 661 }, | ||
| 827 | .{ .char = 'o', .end_of_word = true, .end_of_list = true, .number = 3, .child_index = 361 }, | ||
| 828 | .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 662 }, | ||
| 829 | .{ .char = 'f', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 }, | ||
| 830 | .{ .char = 'l', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 }, | ||
| 831 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 463 }, | ||
| 832 | .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 206 }, | ||
| 833 | .{ .char = 'n', .end_of_word = true, .end_of_list = true, .number = 3, .child_index = 361 }, | ||
| 834 | .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 663 }, | ||
| 835 | .{ .char = 't', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 }, | ||
| 836 | .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 457 }, | ||
| 837 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 664 }, | ||
| 838 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 311 }, | ||
| 839 | .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 450 }, | ||
| 840 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 598 }, | ||
| 841 | .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 291 }, | ||
| 842 | .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 450 }, | ||
| 843 | .{ .char = 'h', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 585 }, | ||
| 844 | .{ .char = 'd', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 }, | ||
| 845 | .{ .char = 'f', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 }, | ||
| 846 | .{ .char = 'k', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 }, | ||
| 847 | .{ .char = 'l', .end_of_word = true, .end_of_list = false, .number = 3, .child_index = 665 }, | ||
| 848 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 667 }, | ||
| 849 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 654 }, | ||
| 850 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 286 }, | ||
| 851 | .{ .char = 'h', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 585 }, | ||
| 852 | .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 291 }, | ||
| 853 | .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 450 }, | ||
| 854 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 668 }, | ||
| 855 | .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 29, .child_index = 669 }, | ||
| 856 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 670 }, | ||
| 857 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 671 }, | ||
| 858 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 672 }, | ||
| 859 | .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 673 }, | ||
| 860 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 674 }, | ||
| 861 | .{ .char = 'h', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 675 }, | ||
| 862 | .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 572 }, | ||
| 863 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 676 }, | ||
| 864 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 2967, .child_index = 677 }, | ||
| 865 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 678 }, | ||
| 866 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 679 }, | ||
| 867 | .{ .char = 'i', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 680 }, | ||
| 868 | .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 681 }, | ||
| 869 | .{ .char = '0', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 680 }, | ||
| 870 | .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 682 }, | ||
| 871 | .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 683 }, | ||
| 872 | .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 458 }, | ||
| 873 | .{ .char = 't', .end_of_word = true, .end_of_list = true, .number = 3, .child_index = 684 }, | ||
| 874 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 389, .child_index = 686 }, | ||
| 875 | .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 107, .child_index = 701 }, | ||
| 876 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 710 }, | ||
| 877 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 711 }, | ||
| 878 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 712 }, | ||
| 879 | .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 714 }, | ||
| 880 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 715 }, | ||
| 881 | .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 716 }, | ||
| 882 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 717 }, | ||
| 883 | .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 10, .child_index = 718 }, | ||
| 884 | .{ .char = '6', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 }, | ||
| 885 | .{ .char = '4', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 }, | ||
| 886 | .{ .char = 'p', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 719 }, | ||
| 887 | .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 720 }, | ||
| 888 | .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 206 }, | ||
| 889 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 721 }, | ||
| 890 | .{ .char = 'm', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 }, | ||
| 891 | .{ .char = 'l', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 }, | ||
| 892 | .{ .char = 'h', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 }, | ||
| 893 | .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 457 }, | ||
| 894 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 353 }, | ||
| 895 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 722 }, | ||
| 896 | .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 723 }, | ||
| 897 | .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 722 }, | ||
| 898 | .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 724 }, | ||
| 899 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 524 }, | ||
| 900 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 585 }, | ||
| 901 | .{ .char = 'd', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 }, | ||
| 902 | .{ .char = 'l', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 }, | ||
| 903 | .{ .char = 'l', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 549 }, | ||
| 904 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 725 }, | ||
| 905 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 29, .child_index = 726 }, | ||
| 906 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 727 }, | ||
| 907 | .{ .char = 'C', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 728 }, | ||
| 908 | .{ .char = 'A', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 729 }, | ||
| 909 | .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 730 }, | ||
| 910 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 731 }, | ||
| 911 | .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 732 }, | ||
| 912 | .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 733 }, | ||
| 913 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 2967, .child_index = 734 }, | ||
| 914 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 735 }, | ||
| 915 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 736 }, | ||
| 916 | .{ .char = 'f', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 }, | ||
| 917 | .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 737 }, | ||
| 918 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 738 }, | ||
| 919 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 739 }, | ||
| 920 | .{ .char = '1', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 648 }, | ||
| 921 | .{ .char = '6', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 649 }, | ||
| 922 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 48, .child_index = 740 }, | ||
| 923 | .{ .char = 'b', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 742 }, | ||
| 924 | .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 7, .child_index = 744 }, | ||
| 925 | .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 40, .child_index = 746 }, | ||
| 926 | .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 748 }, | ||
| 927 | .{ .char = 'f', .end_of_word = false, .end_of_list = false, .number = 58, .child_index = 749 }, | ||
| 928 | .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 12, .child_index = 753 }, | ||
| 929 | .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 84, .child_index = 755 }, | ||
| 930 | .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 23, .child_index = 759 }, | ||
| 931 | .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 761 }, | ||
| 932 | .{ .char = 'r', .end_of_word = false, .end_of_list = false, .number = 53, .child_index = 762 }, | ||
| 933 | .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 29, .child_index = 766 }, | ||
| 934 | .{ .char = 't', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 770 }, | ||
| 935 | .{ .char = 'u', .end_of_word = false, .end_of_list = false, .number = 16, .child_index = 771 }, | ||
| 936 | .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 773 }, | ||
| 937 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 12, .child_index = 774 }, | ||
| 938 | .{ .char = 'b', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 776 }, | ||
| 939 | .{ .char = 'f', .end_of_word = false, .end_of_list = false, .number = 40, .child_index = 777 }, | ||
| 940 | .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 12, .child_index = 778 }, | ||
| 941 | .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 779 }, | ||
| 942 | .{ .char = 'o', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 780 }, | ||
| 943 | .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 13, .child_index = 781 }, | ||
| 944 | .{ .char = 'v', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 784 }, | ||
| 945 | .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 785 }, | ||
| 946 | .{ .char = 'h', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 786 }, | ||
| 947 | .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 787 }, | ||
| 948 | .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 788 }, | ||
| 949 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 789 }, | ||
| 950 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 790 }, | ||
| 951 | .{ .char = 't', .end_of_word = true, .end_of_list = true, .number = 8, .child_index = 791 }, | ||
| 952 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 793 }, | ||
| 953 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 794 }, | ||
| 954 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 10, .child_index = 795 }, | ||
| 955 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 463 }, | ||
| 956 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 796 }, | ||
| 957 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 797 }, | ||
| 958 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 456 }, | ||
| 959 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 798 }, | ||
| 960 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 206 }, | ||
| 961 | .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 799 }, | ||
| 962 | .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 29, .child_index = 800 }, | ||
| 963 | .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 671 }, | ||
| 964 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 801 }, | ||
| 965 | .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 802 }, | ||
| 966 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 803 }, | ||
| 967 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 804 }, | ||
| 968 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 805 }, | ||
| 969 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 806 }, | ||
| 970 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 2967, .child_index = 811 }, | ||
| 971 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 812 }, | ||
| 972 | .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 813 }, | ||
| 973 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 814 }, | ||
| 974 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 655 }, | ||
| 975 | .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 815 }, | ||
| 976 | .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 12, .child_index = 816 }, | ||
| 977 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 36, .child_index = 817 }, | ||
| 978 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 818 }, | ||
| 979 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 819 }, | ||
| 980 | .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 820 }, | ||
| 981 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 821 }, | ||
| 982 | .{ .char = '2', .end_of_word = false, .end_of_list = false, .number = 26, .child_index = 823 }, | ||
| 983 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 14, .child_index = 827 }, | ||
| 984 | .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 828 }, | ||
| 985 | .{ .char = '2', .end_of_word = false, .end_of_list = false, .number = 34, .child_index = 829 }, | ||
| 986 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 833 }, | ||
| 987 | .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 834 }, | ||
| 988 | .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 18, .child_index = 835 }, | ||
| 989 | .{ .char = '2', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 837 }, | ||
| 990 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 839 }, | ||
| 991 | .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 72, .child_index = 840 }, | ||
| 992 | .{ .char = 'g', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 828 }, | ||
| 993 | .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 842 }, | ||
| 994 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 843 }, | ||
| 995 | .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 5, .child_index = 844 }, | ||
| 996 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 18, .child_index = 845 }, | ||
| 997 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 846 }, | ||
| 998 | .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 14, .child_index = 847 }, | ||
| 999 | .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 33, .child_index = 848 }, | ||
| 1000 | .{ .char = 'o', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 849 }, | ||
| 1001 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 850 }, | ||
| 1002 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 5, .child_index = 851 }, | ||
| 1003 | .{ .char = 'h', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 853 }, | ||
| 1004 | .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 854 }, | ||
| 1005 | .{ .char = 'q', .end_of_word = false, .end_of_list = true, .number = 14, .child_index = 855 }, | ||
| 1006 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 856 }, | ||
| 1007 | .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 842 }, | ||
| 1008 | .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 857 }, | ||
| 1009 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 858 }, | ||
| 1010 | .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 859 }, | ||
| 1011 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 859 }, | ||
| 1012 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 860 }, | ||
| 1013 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 40, .child_index = 861 }, | ||
| 1014 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 12, .child_index = 862 }, | ||
| 1015 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 863 }, | ||
| 1016 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 864 }, | ||
| 1017 | .{ .char = 'u', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 865 }, | ||
| 1018 | .{ .char = 'w', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 866 }, | ||
| 1019 | .{ .char = 'y', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 867 }, | ||
| 1020 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 868 }, | ||
| 1021 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 780 }, | ||
| 1022 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 869 }, | ||
| 1023 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 870 }, | ||
| 1024 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 871 }, | ||
| 1025 | .{ .char = 'y', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 872 }, | ||
| 1026 | .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 873 }, | ||
| 1027 | .{ .char = '6', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 649 }, | ||
| 1028 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 874 }, | ||
| 1029 | .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 875 }, | ||
| 1030 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 876 }, | ||
| 1031 | .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 10, .child_index = 877 }, | ||
| 1032 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 203 }, | ||
| 1033 | .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 311 }, | ||
| 1034 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 322 }, | ||
| 1035 | .{ .char = 'j', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 878 }, | ||
| 1036 | .{ .char = 'k', .end_of_word = false, .end_of_list = true, .number = 29, .child_index = 879 }, | ||
| 1037 | .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 880 }, | ||
| 1038 | .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 881 }, | ||
| 1039 | .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 882 }, | ||
| 1040 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 883 }, | ||
| 1041 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 884 }, | ||
| 1042 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 885 }, | ||
| 1043 | .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 886 }, | ||
| 1044 | .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 887 }, | ||
| 1045 | .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 888 }, | ||
| 1046 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 889 }, | ||
| 1047 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2967, .child_index = 891 }, | ||
| 1048 | .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 912 }, | ||
| 1049 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 913 }, | ||
| 1050 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 914 }, | ||
| 1051 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 915 }, | ||
| 1052 | .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 12, .child_index = 916 }, | ||
| 1053 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 36, .child_index = 917 }, | ||
| 1054 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 918 }, | ||
| 1055 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 920 }, | ||
| 1056 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 921 }, | ||
| 1057 | .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 922 }, | ||
| 1058 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 923 }, | ||
| 1059 | .{ .char = 'f', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 924 }, | ||
| 1060 | .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 925 }, | ||
| 1061 | .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 926 }, | ||
| 1062 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 927 }, | ||
| 1063 | .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 14, .child_index = 929 }, | ||
| 1064 | .{ .char = '2', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 930 }, | ||
| 1065 | .{ .char = 'h', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 931 }, | ||
| 1066 | .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 924 }, | ||
| 1067 | .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 932 }, | ||
| 1068 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 16, .child_index = 933 }, | ||
| 1069 | .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 935 }, | ||
| 1070 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 936 }, | ||
| 1071 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 15, .child_index = 937 }, | ||
| 1072 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 939 }, | ||
| 1073 | .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 940 }, | ||
| 1074 | .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 940 }, | ||
| 1075 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 941 }, | ||
| 1076 | .{ .char = 'g', .end_of_word = false, .end_of_list = false, .number = 36, .child_index = 942 }, | ||
| 1077 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 36, .child_index = 942 }, | ||
| 1078 | .{ .char = '2', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 837 }, | ||
| 1079 | .{ .char = 'h', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 943 }, | ||
| 1080 | .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 944 }, | ||
| 1081 | .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 18, .child_index = 947 }, | ||
| 1082 | .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 311 }, | ||
| 1083 | .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 14, .child_index = 950 }, | ||
| 1084 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 33, .child_index = 951 }, | ||
| 1085 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 952 }, | ||
| 1086 | .{ .char = 'q', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 953 }, | ||
| 1087 | .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 954 }, | ||
| 1088 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 955 }, | ||
| 1089 | .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 956 }, | ||
| 1090 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 923 }, | ||
| 1091 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 14, .child_index = 957 }, | ||
| 1092 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 958 }, | ||
| 1093 | .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 842 }, | ||
| 1094 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 959 }, | ||
| 1095 | .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 864 }, | ||
| 1096 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 868 }, | ||
| 1097 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 40, .child_index = 960 }, | ||
| 1098 | .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 12, .child_index = 961 }, | ||
| 1099 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 859 }, | ||
| 1100 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 962 }, | ||
| 1101 | .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 864 }, | ||
| 1102 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 963 }, | ||
| 1103 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 964 }, | ||
| 1104 | .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 965 }, | ||
| 1105 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 966 }, | ||
| 1106 | .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 967 }, | ||
| 1107 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 968 }, | ||
| 1108 | .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 969 }, | ||
| 1109 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 970 }, | ||
| 1110 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 971 }, | ||
| 1111 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 972 }, | ||
| 1112 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 973 }, | ||
| 1113 | .{ .char = 'k', .end_of_word = false, .end_of_list = true, .number = 10, .child_index = 974 }, | ||
| 1114 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 975 }, | ||
| 1115 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 29, .child_index = 976 }, | ||
| 1116 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 977 }, | ||
| 1117 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 978 }, | ||
| 1118 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 979 }, | ||
| 1119 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 457 }, | ||
| 1120 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 980 }, | ||
| 1121 | .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 981 }, | ||
| 1122 | .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 982 }, | ||
| 1123 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 983 }, | ||
| 1124 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 984 }, | ||
| 1125 | .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 985 }, | ||
| 1126 | .{ .char = 'h', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 986 }, | ||
| 1127 | .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 28, .child_index = 987 }, | ||
| 1128 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 302, .child_index = 988 }, | ||
| 1129 | .{ .char = 'b', .end_of_word = false, .end_of_list = false, .number = 11, .child_index = 997 }, | ||
| 1130 | .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 114, .child_index = 1001 }, | ||
| 1131 | .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 1013 }, | ||
| 1132 | .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 58, .child_index = 1018 }, | ||
| 1133 | .{ .char = 'f', .end_of_word = false, .end_of_list = false, .number = 49, .child_index = 1022 }, | ||
| 1134 | .{ .char = 'g', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 1030 }, | ||
| 1135 | .{ .char = 'h', .end_of_word = false, .end_of_list = false, .number = 9, .child_index = 1031 }, | ||
| 1136 | .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 27, .child_index = 1033 }, | ||
| 1137 | .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 52, .child_index = 1037 }, | ||
| 1138 | .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 686, .child_index = 1043 }, | ||
| 1139 | .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 25, .child_index = 1049 }, | ||
| 1140 | .{ .char = 'o', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 1052 }, | ||
| 1141 | .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 142, .child_index = 1055 }, | ||
| 1142 | .{ .char = 'r', .end_of_word = false, .end_of_list = false, .number = 52, .child_index = 1060 }, | ||
| 1143 | .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 71, .child_index = 1064 }, | ||
| 1144 | .{ .char = 't', .end_of_word = false, .end_of_list = false, .number = 19, .child_index = 1076 }, | ||
| 1145 | .{ .char = 'u', .end_of_word = false, .end_of_list = false, .number = 13, .child_index = 1080 }, | ||
| 1146 | .{ .char = 'v', .end_of_word = false, .end_of_list = false, .number = 1273, .child_index = 1084 }, | ||
| 1147 | .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 22, .child_index = 1089 }, | ||
| 1148 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1092 }, | ||
| 1149 | .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1093 }, | ||
| 1150 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 521 }, | ||
| 1151 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 1094 }, | ||
| 1152 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 12, .child_index = 1095 }, | ||
| 1153 | .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 36, .child_index = 1096 }, | ||
| 1154 | .{ .char = '0', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 1097 }, | ||
| 1155 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1098 }, | ||
| 1156 | .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 1099 }, | ||
| 1157 | .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1100 }, | ||
| 1158 | .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1101 }, | ||
| 1159 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1102 }, | ||
| 1160 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 1103 }, | ||
| 1161 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 1104 }, | ||
| 1162 | .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 940 }, | ||
| 1163 | .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 940 }, | ||
| 1164 | .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 926 }, | ||
| 1165 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 14, .child_index = 1107 }, | ||
| 1166 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1109 }, | ||
| 1167 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1110 }, | ||
| 1168 | .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 924 }, | ||
| 1169 | .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 924 }, | ||
| 1170 | .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 932 }, | ||
| 1171 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1100 }, | ||
| 1172 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1111 }, | ||
| 1173 | .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 12, .child_index = 1095 }, | ||
| 1174 | .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1100 }, | ||
| 1175 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1100 }, | ||
| 1176 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 1112 }, | ||
| 1177 | .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 1113 }, | ||
| 1178 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 36, .child_index = 1114 }, | ||
| 1179 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1122 }, | ||
| 1180 | .{ .char = 'b', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 1123 }, | ||
| 1181 | .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 292 }, | ||
| 1182 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 486 }, | ||
| 1183 | .{ .char = '2', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 1124 }, | ||
| 1184 | .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 12, .child_index = 1095 }, | ||
| 1185 | .{ .char = 'h', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 1125 }, | ||
| 1186 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 14, .child_index = 1126 }, | ||
| 1187 | .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 33, .child_index = 1128 }, | ||
| 1188 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1129 }, | ||
| 1189 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1130 }, | ||
| 1190 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1131 }, | ||
| 1191 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1133 }, | ||
| 1192 | .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 1134 }, | ||
| 1193 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 14, .child_index = 929 }, | ||
| 1194 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1135 }, | ||
| 1195 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 1136 }, | ||
| 1196 | .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 40, .child_index = 1137 }, | ||
| 1197 | .{ .char = 'k', .end_of_word = false, .end_of_list = true, .number = 12, .child_index = 1138 }, | ||
| 1198 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 1139 }, | ||
| 1199 | .{ .char = 'p', .end_of_word = true, .end_of_list = true, .number = 6, .child_index = 1140 }, | ||
| 1200 | .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1141 }, | ||
| 1201 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 1142 }, | ||
| 1202 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1143 }, | ||
| 1203 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1144 }, | ||
| 1204 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1145 }, | ||
| 1205 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1146 }, | ||
| 1206 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1147 }, | ||
| 1207 | .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 1148 }, | ||
| 1208 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1151 }, | ||
| 1209 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1154 }, | ||
| 1210 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 10, .child_index = 1156 }, | ||
| 1211 | .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1157 }, | ||
| 1212 | .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 29, .child_index = 1158 }, | ||
| 1213 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1165 }, | ||
| 1214 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1166 }, | ||
| 1215 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1167 }, | ||
| 1216 | .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1168 }, | ||
| 1217 | .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1169 }, | ||
| 1218 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1170 }, | ||
| 1219 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1171 }, | ||
| 1220 | .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1172 }, | ||
| 1221 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1173 }, | ||
| 1222 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1174 }, | ||
| 1223 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 28, .child_index = 1175 }, | ||
| 1224 | .{ .char = 'b', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 135 }, | ||
| 1225 | .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 1184 }, | ||
| 1226 | .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 1185 }, | ||
| 1227 | .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 1186 }, | ||
| 1228 | .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 122, .child_index = 1188 }, | ||
| 1229 | .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 403 }, | ||
| 1230 | .{ .char = 'r', .end_of_word = false, .end_of_list = false, .number = 134, .child_index = 1189 }, | ||
| 1231 | .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 11, .child_index = 1190 }, | ||
| 1232 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 12, .child_index = 1192 }, | ||
| 1233 | .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 142 }, | ||
| 1234 | .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 5, .child_index = 1193 }, | ||
| 1235 | .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 1194 }, | ||
| 1236 | .{ .char = 'z', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 144 }, | ||
| 1237 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 30, .child_index = 1195 }, | ||
| 1238 | .{ .char = 'b', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 1202 }, | ||
| 1239 | .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 137 }, | ||
| 1240 | .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 1203 }, | ||
| 1241 | .{ .char = 'h', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1205 }, | ||
| 1242 | .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 154 }, | ||
| 1243 | .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 11, .child_index = 1206 }, | ||
| 1244 | .{ .char = 'o', .end_of_word = false, .end_of_list = false, .number = 20, .child_index = 1210 }, | ||
| 1245 | .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 9, .child_index = 1214 }, | ||
| 1246 | .{ .char = 'r', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 161 }, | ||
| 1247 | .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 9, .child_index = 162 }, | ||
| 1248 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 10, .child_index = 1217 }, | ||
| 1249 | .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1219 }, | ||
| 1250 | .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1220 }, | ||
| 1251 | .{ .char = 'u', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1221 }, | ||
| 1252 | .{ .char = 'w', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 1222 }, | ||
| 1253 | .{ .char = 'y', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1223 }, | ||
| 1254 | .{ .char = 'h', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 1224 }, | ||
| 1255 | .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 25, .child_index = 1225 }, | ||
| 1256 | .{ .char = 'r', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 1226 }, | ||
| 1257 | .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 23, .child_index = 1227 }, | ||
| 1258 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 5, .child_index = 1229 }, | ||
| 1259 | .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 1230 }, | ||
| 1260 | .{ .char = 'f', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 1231 }, | ||
| 1261 | .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 1232 }, | ||
| 1262 | .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 20, .child_index = 1234 }, | ||
| 1263 | .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 1237 }, | ||
| 1264 | .{ .char = 'r', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 1239 }, | ||
| 1265 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 178 }, | ||
| 1266 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1242 }, | ||
| 1267 | .{ .char = 'u', .end_of_word = false, .end_of_list = false, .number = 5, .child_index = 1243 }, | ||
| 1268 | .{ .char = 'y', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 1244 }, | ||
| 1269 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 1245 }, | ||
| 1270 | .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 1246 }, | ||
| 1271 | .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 7, .child_index = 1247 }, | ||
| 1272 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 13, .child_index = 1250 }, | ||
| 1273 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 1257 }, | ||
| 1274 | .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 5, .child_index = 1259 }, | ||
| 1275 | .{ .char = 'g', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 1260 }, | ||
| 1276 | .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 9, .child_index = 1261 }, | ||
| 1277 | .{ .char = 'o', .end_of_word = false, .end_of_list = false, .number = 24, .child_index = 1263 }, | ||
| 1278 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 1265 }, | ||
| 1279 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 1267 }, | ||
| 1280 | .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 1269 }, | ||
| 1281 | .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 135, .child_index = 1270 }, | ||
| 1282 | .{ .char = 'o', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 1271 }, | ||
| 1283 | .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 534, .child_index = 1272 }, | ||
| 1284 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1273 }, | ||
| 1285 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 10, .child_index = 1274 }, | ||
| 1286 | .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 12, .child_index = 1275 }, | ||
| 1287 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1277 }, | ||
| 1288 | .{ .char = 'b', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 1278 }, | ||
| 1289 | .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 1279 }, | ||
| 1290 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1280 }, | ||
| 1291 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 1281 }, | ||
| 1292 | .{ .char = 'o', .end_of_word = false, .end_of_list = false, .number = 11, .child_index = 1283 }, | ||
| 1293 | .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 108, .child_index = 1285 }, | ||
| 1294 | .{ .char = 'r', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 1286 }, | ||
| 1295 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 16, .child_index = 1288 }, | ||
| 1296 | .{ .char = '6', .end_of_word = false, .end_of_list = false, .number = 9, .child_index = 1289 }, | ||
| 1297 | .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 19, .child_index = 1290 }, | ||
| 1298 | .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 1294 }, | ||
| 1299 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 18, .child_index = 1295 }, | ||
| 1300 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 1297 }, | ||
| 1301 | .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 9, .child_index = 1298 }, | ||
| 1302 | .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 5, .child_index = 1299 }, | ||
| 1303 | .{ .char = 'h', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1300 }, | ||
| 1304 | .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 12, .child_index = 1301 }, | ||
| 1305 | .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 1303 }, | ||
| 1306 | .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 220 }, | ||
| 1307 | .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 1304 }, | ||
| 1308 | .{ .char = 'q', .end_of_word = false, .end_of_list = false, .number = 5, .child_index = 1306 }, | ||
| 1309 | .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 1307 }, | ||
| 1310 | .{ .char = 't', .end_of_word = false, .end_of_list = false, .number = 20, .child_index = 1309 }, | ||
| 1311 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 1312 }, | ||
| 1312 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 1313 }, | ||
| 1313 | .{ .char = 'g', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 1260 }, | ||
| 1314 | .{ .char = 'h', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1314 }, | ||
| 1315 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 1315 }, | ||
| 1316 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 1297 }, | ||
| 1317 | .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 1303 }, | ||
| 1318 | .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 1317 }, | ||
| 1319 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1320 }, | ||
| 1320 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 227 }, | ||
| 1321 | .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 1263, .child_index = 1321 }, | ||
| 1322 | .{ .char = 'f', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 1322 }, | ||
| 1323 | .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 176 }, | ||
| 1324 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 231 }, | ||
| 1325 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 14, .child_index = 1324 }, | ||
| 1326 | .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 235 }, | ||
| 1327 | .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 236 }, | ||
| 1328 | .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1325 }, | ||
| 1329 | .{ .char = 'h', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 572 }, | ||
| 1330 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 1326 }, | ||
| 1331 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 12, .child_index = 1327 }, | ||
| 1332 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 36, .child_index = 1331 }, | ||
| 1333 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1339 }, | ||
| 1334 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1342 }, | ||
| 1335 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 1343 }, | ||
| 1336 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1344 }, | ||
| 1337 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1346 }, | ||
| 1338 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1347 }, | ||
| 1339 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 1348 }, | ||
| 1340 | .{ .char = 'h', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1352 }, | ||
| 1341 | .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 451 }, | ||
| 1342 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 1353 }, | ||
| 1343 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 1347 }, | ||
| 1344 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 12, .child_index = 1327 }, | ||
| 1345 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1357 }, | ||
| 1346 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1358 }, | ||
| 1347 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1100 }, | ||
| 1348 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 1353 }, | ||
| 1349 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 1359 }, | ||
| 1350 | .{ .char = 'c', .end_of_word = true, .end_of_list = false, .number = 3, .child_index = 1360 }, | ||
| 1351 | .{ .char = 'd', .end_of_word = true, .end_of_list = false, .number = 2, .child_index = 1362 }, | ||
| 1352 | .{ .char = 'f', .end_of_word = true, .end_of_list = false, .number = 3, .child_index = 1360 }, | ||
| 1353 | .{ .char = 'h', .end_of_word = true, .end_of_list = false, .number = 2, .child_index = 1362 }, | ||
| 1354 | .{ .char = 'i', .end_of_word = true, .end_of_list = false, .number = 3, .child_index = 1360 }, | ||
| 1355 | .{ .char = 'l', .end_of_word = true, .end_of_list = false, .number = 4, .child_index = 1363 }, | ||
| 1356 | .{ .char = 's', .end_of_word = true, .end_of_list = false, .number = 6, .child_index = 1365 }, | ||
| 1357 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 13, .child_index = 1368 }, | ||
| 1358 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1372 }, | ||
| 1359 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1373 }, | ||
| 1360 | .{ .char = '4', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 954 }, | ||
| 1361 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 1374 }, | ||
| 1362 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 1375 }, | ||
| 1363 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 12, .child_index = 1327 }, | ||
| 1364 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 33, .child_index = 1376 }, | ||
| 1365 | .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1100 }, | ||
| 1366 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 930 }, | ||
| 1367 | .{ .char = 'i', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 }, | ||
| 1368 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1352 }, | ||
| 1369 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1377 }, | ||
| 1370 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 1378 }, | ||
| 1371 | .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1100 }, | ||
| 1372 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 1382 }, | ||
| 1373 | .{ .char = 'h', .end_of_word = false, .end_of_list = true, .number = 40, .child_index = 1385 }, | ||
| 1374 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 12, .child_index = 1386 }, | ||
| 1375 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 1388 }, | ||
| 1376 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 1389 }, | ||
| 1377 | .{ .char = 'h', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1393 }, | ||
| 1378 | .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 1394 }, | ||
| 1379 | .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 344 }, | ||
| 1380 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1395 }, | ||
| 1381 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1396 }, | ||
| 1382 | .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1397 }, | ||
| 1383 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1398 }, | ||
| 1384 | .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 1399 }, | ||
| 1385 | .{ .char = 'r', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 1400 }, | ||
| 1386 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1401 }, | ||
| 1387 | .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1402 }, | ||
| 1388 | .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1403 }, | ||
| 1389 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1404 }, | ||
| 1390 | .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1405 }, | ||
| 1391 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1406 }, | ||
| 1392 | .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 10, .child_index = 1407 }, | ||
| 1393 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1408 }, | ||
| 1394 | .{ .char = 'A', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 1409 }, | ||
| 1395 | .{ .char = 'C', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 1410 }, | ||
| 1396 | .{ .char = 'D', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 1411 }, | ||
| 1397 | .{ .char = 'E', .end_of_word = false, .end_of_list = false, .number = 10, .child_index = 1412 }, | ||
| 1398 | .{ .char = 'I', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 1413 }, | ||
| 1399 | .{ .char = 'O', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 1414 }, | ||
| 1400 | .{ .char = 'X', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1415 }, | ||
| 1401 | .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1416 }, | ||
| 1402 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 344 }, | ||
| 1403 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1417 }, | ||
| 1404 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1418 }, | ||
| 1405 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1419 }, | ||
| 1406 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 585 }, | ||
| 1407 | .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1420 }, | ||
| 1408 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1421 }, | ||
| 1409 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1422 }, | ||
| 1410 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1423 }, | ||
| 1411 | .{ .char = 'C', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1424 }, | ||
| 1412 | .{ .char = 'N', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1425 }, | ||
| 1413 | .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1426 }, | ||
| 1414 | .{ .char = 'f', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1427 }, | ||
| 1415 | .{ .char = 'g', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 1428 }, | ||
| 1416 | .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 5, .child_index = 1429 }, | ||
| 1417 | .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1430 }, | ||
| 1418 | .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 10, .child_index = 1431 }, | ||
| 1419 | .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 1434 }, | ||
| 1420 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 1437 }, | ||
| 1421 | .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 1438 }, | ||
| 1422 | .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 1440 }, | ||
| 1423 | .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 1441 }, | ||
| 1424 | .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 122, .child_index = 1442 }, | ||
| 1425 | .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 134, .child_index = 1443 }, | ||
| 1426 | .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 1313 }, | ||
| 1427 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1444 }, | ||
| 1428 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 12, .child_index = 1445 }, | ||
| 1429 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 1446 }, | ||
| 1430 | .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1447 }, | ||
| 1431 | .{ .char = 'b', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 294 }, | ||
| 1432 | .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 137 }, | ||
| 1433 | .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 1448 }, | ||
| 1434 | .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 1449 }, | ||
| 1435 | .{ .char = 'r', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 296 }, | ||
| 1436 | .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 140 }, | ||
| 1437 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 164 }, | ||
| 1438 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 1450 }, | ||
| 1439 | .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 5, .child_index = 1451 }, | ||
| 1440 | .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 299 }, | ||
| 1441 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1452 }, | ||
| 1442 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1453 }, | ||
| 1443 | .{ .char = 'o', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 296 }, | ||
| 1444 | .{ .char = 'r', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 1454 }, | ||
| 1445 | .{ .char = 'z', .end_of_word = true, .end_of_list = true, .number = 4, .child_index = 1455 }, | ||
| 1446 | .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1457 }, | ||
| 1447 | .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 5, .child_index = 1458 }, | ||
| 1448 | .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 5, .child_index = 1461 }, | ||
| 1449 | .{ .char = 's', .end_of_word = true, .end_of_list = true, .number = 9, .child_index = 1462 }, | ||
| 1450 | .{ .char = 'o', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 209 }, | ||
| 1451 | .{ .char = 'r', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 306 }, | ||
| 1452 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1465 }, | ||
| 1453 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 223 }, | ||
| 1454 | .{ .char = 'z', .end_of_word = true, .end_of_list = true, .number = 4, .child_index = 1455 }, | ||
| 1455 | .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 496 }, | ||
| 1456 | .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1466 }, | ||
| 1457 | .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1467 }, | ||
| 1458 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1468 }, | ||
| 1459 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1469 }, | ||
| 1460 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1470 }, | ||
| 1461 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 25, .child_index = 1471 }, | ||
| 1462 | .{ .char = 'f', .end_of_word = true, .end_of_list = true, .number = 8, .child_index = 1472 }, | ||
| 1463 | .{ .char = 'p', .end_of_word = true, .end_of_list = false, .number = 21, .child_index = 1475 }, | ||
| 1464 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1481 }, | ||
| 1465 | .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 1483 }, | ||
| 1466 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 1484 }, | ||
| 1467 | .{ .char = 's', .end_of_word = true, .end_of_list = true, .number = 3, .child_index = 1485 }, | ||
| 1468 | .{ .char = 'o', .end_of_word = false, .end_of_list = false, .number = 5, .child_index = 1486 }, | ||
| 1469 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1487 }, | ||
| 1470 | .{ .char = 'a', .end_of_word = true, .end_of_list = false, .number = 10, .child_index = 1488 }, | ||
| 1471 | .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 5, .child_index = 1491 }, | ||
| 1472 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 1492 }, | ||
| 1473 | .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1493 }, | ||
| 1474 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 210 }, | ||
| 1475 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1494 }, | ||
| 1476 | .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 1495 }, | ||
| 1477 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1497 }, | ||
| 1478 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1498 }, | ||
| 1479 | .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 1500 }, | ||
| 1480 | .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 1501 }, | ||
| 1481 | .{ .char = '3', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1502 }, | ||
| 1482 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 1503 }, | ||
| 1483 | .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 332 }, | ||
| 1484 | .{ .char = 'f', .end_of_word = true, .end_of_list = false, .number = 5, .child_index = 1504 }, | ||
| 1485 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1506 }, | ||
| 1486 | .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1507 }, | ||
| 1487 | .{ .char = 'f', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 1508 }, | ||
| 1488 | .{ .char = 'g', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 1510 }, | ||
| 1489 | .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 1511 }, | ||
| 1490 | .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 1512 }, | ||
| 1491 | .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 1513 }, | ||
| 1492 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1515 }, | ||
| 1493 | .{ .char = 'b', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 344 }, | ||
| 1494 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1516 }, | ||
| 1495 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 1517 }, | ||
| 1496 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 1518 }, | ||
| 1497 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 194 }, | ||
| 1498 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 1265 }, | ||
| 1499 | .{ .char = 'g', .end_of_word = true, .end_of_list = false, .number = 23, .child_index = 1519 }, | ||
| 1500 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 352 }, | ||
| 1501 | .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 1524 }, | ||
| 1502 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 1525 }, | ||
| 1503 | .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 295 }, | ||
| 1504 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1526 }, | ||
| 1505 | .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 1527 }, | ||
| 1506 | .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 135, .child_index = 1531 }, | ||
| 1507 | .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 1532 }, | ||
| 1508 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 534, .child_index = 1533 }, | ||
| 1509 | .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1534 }, | ||
| 1510 | .{ .char = 'n', .end_of_word = true, .end_of_list = true, .number = 10, .child_index = 1535 }, | ||
| 1511 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 1538 }, | ||
| 1512 | .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 1539 }, | ||
| 1513 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1540 }, | ||
| 1514 | .{ .char = 'j', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1542 }, | ||
| 1515 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1544 }, | ||
| 1516 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1545 }, | ||
| 1517 | .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1546 }, | ||
| 1518 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1547 }, | ||
| 1519 | .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 1548 }, | ||
| 1520 | .{ .char = 'w', .end_of_word = true, .end_of_list = true, .number = 8, .child_index = 1549 }, | ||
| 1521 | .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 108, .child_index = 1552 }, | ||
| 1522 | .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 1553 }, | ||
| 1523 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 365 }, | ||
| 1524 | .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 16, .child_index = 1555 }, | ||
| 1525 | .{ .char = '0', .end_of_word = false, .end_of_list = true, .number = 9, .child_index = 1556 }, | ||
| 1526 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 1557 }, | ||
| 1527 | .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 7, .child_index = 1559 }, | ||
| 1528 | .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 1560 }, | ||
| 1529 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1562 }, | ||
| 1530 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 1563 }, | ||
| 1531 | .{ .char = 't', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 1565 }, | ||
| 1532 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 10, .child_index = 1566 }, | ||
| 1533 | .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1567 }, | ||
| 1534 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 9, .child_index = 1568 }, | ||
| 1535 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 1570 }, | ||
| 1536 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1575 }, | ||
| 1537 | .{ .char = 'g', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 1576 }, | ||
| 1538 | .{ .char = 'n', .end_of_word = true, .end_of_list = true, .number = 9, .child_index = 1462 }, | ||
| 1539 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1577 }, | ||
| 1540 | .{ .char = 'o', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1578 }, | ||
| 1541 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 210 }, | ||
| 1542 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 1579 }, | ||
| 1543 | .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 327 }, | ||
| 1544 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1580 }, | ||
| 1545 | .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1581 }, | ||
| 1546 | .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 377 }, | ||
| 1547 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 17, .child_index = 1582 }, | ||
| 1548 | .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 1438 }, | ||
| 1549 | .{ .char = 'n', .end_of_word = true, .end_of_list = true, .number = 8, .child_index = 1589 }, | ||
| 1550 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1592 }, | ||
| 1551 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 291 }, | ||
| 1552 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 1593 }, | ||
| 1553 | .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 1594 }, | ||
| 1554 | .{ .char = 'r', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1596 }, | ||
| 1555 | .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1597 }, | ||
| 1556 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1580 }, | ||
| 1557 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1263, .child_index = 1598 }, | ||
| 1558 | .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 176 }, | ||
| 1559 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 178 }, | ||
| 1560 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 14, .child_index = 1599 }, | ||
| 1561 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1600 }, | ||
| 1562 | .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 1603 }, | ||
| 1563 | .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 1100 }, | ||
| 1564 | .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 1100 }, | ||
| 1565 | .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 1100 }, | ||
| 1566 | .{ .char = 'z', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1100 }, | ||
| 1567 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 7, .child_index = 1604 }, | ||
| 1568 | .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 1606 }, | ||
| 1569 | .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1607 }, | ||
| 1570 | .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1608 }, | ||
| 1571 | .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 12, .child_index = 1609 }, | ||
| 1572 | .{ .char = 'o', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 1611 }, | ||
| 1573 | .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 1612 }, | ||
| 1574 | .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 1613 }, | ||
| 1575 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 519 }, | ||
| 1576 | .{ .char = 'o', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 585 }, | ||
| 1577 | .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1615 }, | ||
| 1578 | .{ .char = 'y', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1616 }, | ||
| 1579 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 1617 }, | ||
| 1580 | .{ .char = 'd', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 }, | ||
| 1581 | .{ .char = 'f', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 1618 }, | ||
| 1582 | .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1619 }, | ||
| 1583 | .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1620 }, | ||
| 1584 | .{ .char = 'm', .end_of_word = true, .end_of_list = false, .number = 2, .child_index = 1621 }, | ||
| 1585 | .{ .char = 'n', .end_of_word = true, .end_of_list = false, .number = 2, .child_index = 1621 }, | ||
| 1586 | .{ .char = 'p', .end_of_word = true, .end_of_list = false, .number = 2, .child_index = 1621 }, | ||
| 1587 | .{ .char = 'z', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 1621 }, | ||
| 1588 | .{ .char = 'i', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 }, | ||
| 1589 | .{ .char = 'm', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 }, | ||
| 1590 | .{ .char = 'n', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 }, | ||
| 1591 | .{ .char = 'p', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 }, | ||
| 1592 | .{ .char = 'z', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 }, | ||
| 1593 | .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1622 }, | ||
| 1594 | .{ .char = 'n', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 1621 }, | ||
| 1595 | .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 1623 }, | ||
| 1596 | .{ .char = '2', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 }, | ||
| 1597 | .{ .char = '4', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 }, | ||
| 1598 | .{ .char = '2', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 }, | ||
| 1599 | .{ .char = '2', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 }, | ||
| 1600 | .{ .char = 'l', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 1362 }, | ||
| 1601 | .{ .char = '2', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 }, | ||
| 1602 | .{ .char = '4', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 }, | ||
| 1603 | .{ .char = 'c', .end_of_word = true, .end_of_list = true, .number = 3, .child_index = 1360 }, | ||
| 1604 | .{ .char = 'c', .end_of_word = true, .end_of_list = false, .number = 3, .child_index = 1360 }, | ||
| 1605 | .{ .char = 'i', .end_of_word = true, .end_of_list = false, .number = 3, .child_index = 1360 }, | ||
| 1606 | .{ .char = 'l', .end_of_word = true, .end_of_list = false, .number = 4, .child_index = 1363 }, | ||
| 1607 | .{ .char = 's', .end_of_word = true, .end_of_list = true, .number = 3, .child_index = 1360 }, | ||
| 1608 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1624 }, | ||
| 1609 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1625 }, | ||
| 1610 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 1626 }, | ||
| 1611 | .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1629 }, | ||
| 1612 | .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 33, .child_index = 1630 }, | ||
| 1613 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1631 }, | ||
| 1614 | .{ .char = 'b', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 1632 }, | ||
| 1615 | .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 1633 }, | ||
| 1616 | .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 1634 }, | ||
| 1617 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1635 }, | ||
| 1618 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 1636 }, | ||
| 1619 | .{ .char = 'b', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1638 }, | ||
| 1620 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1639 }, | ||
| 1621 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 40, .child_index = 1640 }, | ||
| 1622 | .{ .char = 'r', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 1641 }, | ||
| 1623 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 1642 }, | ||
| 1624 | .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 1643 }, | ||
| 1625 | .{ .char = '1', .end_of_word = true, .end_of_list = false, .number = 2, .child_index = 1644 }, | ||
| 1626 | .{ .char = '2', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 }, | ||
| 1627 | .{ .char = '4', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 }, | ||
| 1628 | .{ .char = '8', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 }, | ||
| 1629 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1645 }, | ||
| 1630 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 1646 }, | ||
| 1631 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1647 }, | ||
| 1632 | .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1397 }, | ||
| 1633 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1648 }, | ||
| 1634 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1649 }, | ||
| 1635 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1650 }, | ||
| 1636 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1651 }, | ||
| 1637 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1652 }, | ||
| 1638 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1653 }, | ||
| 1639 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1654 }, | ||
| 1640 | .{ .char = 'h', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1655 }, | ||
| 1641 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1656 }, | ||
| 1642 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1657 }, | ||
| 1643 | .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 10, .child_index = 1658 }, | ||
| 1644 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1659 }, | ||
| 1645 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1661 }, | ||
| 1646 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 1662 }, | ||
| 1647 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1663 }, | ||
| 1648 | .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 10, .child_index = 1664 }, | ||
| 1649 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1663 }, | ||
| 1650 | .{ .char = 'r', .end_of_word = true, .end_of_list = true, .number = 3, .child_index = 1665 }, | ||
| 1651 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1414 }, | ||
| 1652 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1667 }, | ||
| 1653 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1668 }, | ||
| 1654 | .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1669 }, | ||
| 1655 | .{ .char = 'y', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 887 }, | ||
| 1656 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1670 }, | ||
| 1657 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1671 }, | ||
| 1658 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1672 }, | ||
| 1659 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1673 }, | ||
| 1660 | .{ .char = 'F', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1674 }, | ||
| 1661 | .{ .char = 'S', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1674 }, | ||
| 1662 | .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 409 }, | ||
| 1663 | .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1430 }, | ||
| 1664 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 1675 }, | ||
| 1665 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 1676 }, | ||
| 1666 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1677 }, | ||
| 1667 | .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1427 }, | ||
| 1668 | .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1430 }, | ||
| 1669 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 1678 }, | ||
| 1670 | .{ .char = 'f', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1427 }, | ||
| 1671 | .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1430 }, | ||
| 1672 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1680 }, | ||
| 1673 | .{ .char = 's', .end_of_word = true, .end_of_list = true, .number = 8, .child_index = 1589 }, | ||
| 1674 | .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1682 }, | ||
| 1675 | .{ .char = 'c', .end_of_word = true, .end_of_list = true, .number = 5, .child_index = 1683 }, | ||
| 1676 | .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1686 }, | ||
| 1677 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 1687 }, | ||
| 1678 | .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 122, .child_index = 1688 }, | ||
| 1679 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 134, .child_index = 1689 }, | ||
| 1680 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1705 }, | ||
| 1681 | .{ .char = 'n', .end_of_word = true, .end_of_list = true, .number = 12, .child_index = 1706 }, | ||
| 1682 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 1710 }, | ||
| 1683 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1711 }, | ||
| 1684 | .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1712 }, | ||
| 1685 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 1714 }, | ||
| 1686 | .{ .char = 't', .end_of_word = true, .end_of_list = true, .number = 4, .child_index = 1715 }, | ||
| 1687 | .{ .char = 'l', .end_of_word = true, .end_of_list = true, .number = 5, .child_index = 1504 }, | ||
| 1688 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1717 }, | ||
| 1689 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1718 }, | ||
| 1690 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1719 }, | ||
| 1691 | .{ .char = 'l', .end_of_word = true, .end_of_list = false, .number = 2, .child_index = 549 }, | ||
| 1692 | .{ .char = 's', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 }, | ||
| 1693 | .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1720 }, | ||
| 1694 | .{ .char = 'j', .end_of_word = true, .end_of_list = false, .number = 3, .child_index = 361 }, | ||
| 1695 | .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1721 }, | ||
| 1696 | .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1722 }, | ||
| 1697 | .{ .char = 'y', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 1723 }, | ||
| 1698 | .{ .char = 'f', .end_of_word = true, .end_of_list = false, .number = 3, .child_index = 1724 }, | ||
| 1699 | .{ .char = 'h', .end_of_word = true, .end_of_list = false, .number = 4, .child_index = 1715 }, | ||
| 1700 | .{ .char = 'l', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 }, | ||
| 1701 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1725 }, | ||
| 1702 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1727 }, | ||
| 1703 | .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1728 }, | ||
| 1704 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1729 }, | ||
| 1705 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1730 }, | ||
| 1706 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1731 }, | ||
| 1707 | .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 25, .child_index = 1732 }, | ||
| 1708 | .{ .char = 'c', .end_of_word = true, .end_of_list = false, .number = 4, .child_index = 1715 }, | ||
| 1709 | .{ .char = 'f', .end_of_word = true, .end_of_list = false, .number = 2, .child_index = 1733 }, | ||
| 1710 | .{ .char = 'l', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 }, | ||
| 1711 | .{ .char = '1', .end_of_word = false, .end_of_list = false, .number = 5, .child_index = 1734 }, | ||
| 1712 | .{ .char = '2', .end_of_word = true, .end_of_list = false, .number = 5, .child_index = 1504 }, | ||
| 1713 | .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 1735 }, | ||
| 1714 | .{ .char = 'f', .end_of_word = true, .end_of_list = false, .number = 3, .child_index = 1724 }, | ||
| 1715 | .{ .char = 'l', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 }, | ||
| 1716 | .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 1736 }, | ||
| 1717 | .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1737 }, | ||
| 1718 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1738 }, | ||
| 1719 | .{ .char = 's', .end_of_word = true, .end_of_list = true, .number = 5, .child_index = 1504 }, | ||
| 1720 | .{ .char = 'm', .end_of_word = true, .end_of_list = true, .number = 4, .child_index = 1715 }, | ||
| 1721 | .{ .char = 'l', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 549 }, | ||
| 1722 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 1739 }, | ||
| 1723 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1740 }, | ||
| 1724 | .{ .char = 'f', .end_of_word = true, .end_of_list = false, .number = 3, .child_index = 1724 }, | ||
| 1725 | .{ .char = 'l', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 }, | ||
| 1726 | .{ .char = 'x', .end_of_word = true, .end_of_list = true, .number = 5, .child_index = 1504 }, | ||
| 1727 | .{ .char = 'n', .end_of_word = true, .end_of_list = true, .number = 5, .child_index = 1504 }, | ||
| 1728 | .{ .char = 'd', .end_of_word = true, .end_of_list = true, .number = 5, .child_index = 1504 }, | ||
| 1729 | .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1741 }, | ||
| 1730 | .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1742 }, | ||
| 1731 | .{ .char = 'e', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 }, | ||
| 1732 | .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 1743 }, | ||
| 1733 | .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1744 }, | ||
| 1734 | .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 458 }, | ||
| 1735 | .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 344 }, | ||
| 1736 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 1745 }, | ||
| 1737 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 1450 }, | ||
| 1738 | .{ .char = '2', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1746 }, | ||
| 1739 | .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 1747 }, | ||
| 1740 | .{ .char = 'f', .end_of_word = true, .end_of_list = false, .number = 3, .child_index = 1724 }, | ||
| 1741 | .{ .char = 'l', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 }, | ||
| 1742 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1748 }, | ||
| 1743 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1749 }, | ||
| 1744 | .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1750 }, | ||
| 1745 | .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1751 }, | ||
| 1746 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1752 }, | ||
| 1747 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1753 }, | ||
| 1748 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1754 }, | ||
| 1749 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 457 }, | ||
| 1750 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1755 }, | ||
| 1751 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1756 }, | ||
| 1752 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1757 }, | ||
| 1753 | .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 1743 }, | ||
| 1754 | .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 1758 }, | ||
| 1755 | .{ .char = '1', .end_of_word = false, .end_of_list = false, .number = 9, .child_index = 1759 }, | ||
| 1756 | .{ .char = '2', .end_of_word = true, .end_of_list = false, .number = 5, .child_index = 1504 }, | ||
| 1757 | .{ .char = 'b', .end_of_word = true, .end_of_list = false, .number = 4, .child_index = 1715 }, | ||
| 1758 | .{ .char = 'f', .end_of_word = true, .end_of_list = false, .number = 3, .child_index = 1724 }, | ||
| 1759 | .{ .char = 'l', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 }, | ||
| 1760 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 1450 }, | ||
| 1761 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 1761 }, | ||
| 1762 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1762 }, | ||
| 1763 | .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 1763 }, | ||
| 1764 | .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 484 }, | ||
| 1765 | .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 485 }, | ||
| 1766 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1766 }, | ||
| 1767 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 135, .child_index = 1767 }, | ||
| 1768 | .{ .char = 'f', .end_of_word = true, .end_of_list = true, .number = 4, .child_index = 1715 }, | ||
| 1769 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 534, .child_index = 1768 }, | ||
| 1770 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1682 }, | ||
| 1771 | .{ .char = 'f', .end_of_word = true, .end_of_list = false, .number = 3, .child_index = 1724 }, | ||
| 1772 | .{ .char = 'l', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 }, | ||
| 1773 | .{ .char = 's', .end_of_word = true, .end_of_list = true, .number = 5, .child_index = 1504 }, | ||
| 1774 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 1783 }, | ||
| 1775 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 1784 }, | ||
| 1776 | .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1786 }, | ||
| 1777 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1787 }, | ||
| 1778 | .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1788 }, | ||
| 1779 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1789 }, | ||
| 1780 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1790 }, | ||
| 1781 | .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1791 }, | ||
| 1782 | .{ .char = 'k', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1792 }, | ||
| 1783 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1793 }, | ||
| 1784 | .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1794 }, | ||
| 1785 | .{ .char = 'f', .end_of_word = true, .end_of_list = false, .number = 3, .child_index = 1724 }, | ||
| 1786 | .{ .char = 'i', .end_of_word = true, .end_of_list = false, .number = 3, .child_index = 361 }, | ||
| 1787 | .{ .char = 'l', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 }, | ||
| 1788 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 108, .child_index = 1795 }, | ||
| 1789 | .{ .char = 'f', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1808 }, | ||
| 1790 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1809 }, | ||
| 1791 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 16, .child_index = 1810 }, | ||
| 1792 | .{ .char = '0', .end_of_word = false, .end_of_list = true, .number = 9, .child_index = 1813 }, | ||
| 1793 | .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 1814 }, | ||
| 1794 | .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 295 }, | ||
| 1795 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 7, .child_index = 1816 }, | ||
| 1796 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 1817 }, | ||
| 1797 | .{ .char = 'q', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 1818 }, | ||
| 1798 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1819 }, | ||
| 1799 | .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 332 }, | ||
| 1800 | .{ .char = 't', .end_of_word = true, .end_of_list = true, .number = 5, .child_index = 1504 }, | ||
| 1801 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 1820 }, | ||
| 1802 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 10, .child_index = 1821 }, | ||
| 1803 | .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1822 }, | ||
| 1804 | .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 1824 }, | ||
| 1805 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 496 }, | ||
| 1806 | .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1825 }, | ||
| 1807 | .{ .char = 'f', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1826 }, | ||
| 1808 | .{ .char = 'j', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 497 }, | ||
| 1809 | .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 344 }, | ||
| 1810 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 519 }, | ||
| 1811 | .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1827 }, | ||
| 1812 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1828 }, | ||
| 1813 | .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1822 }, | ||
| 1814 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1829 }, | ||
| 1815 | .{ .char = 't', .end_of_word = true, .end_of_list = true, .number = 5, .child_index = 1504 }, | ||
| 1816 | .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1822 }, | ||
| 1817 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1830 }, | ||
| 1818 | .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 500 }, | ||
| 1819 | .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 505 }, | ||
| 1820 | .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 323 }, | ||
| 1821 | .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 5, .child_index = 509 }, | ||
| 1822 | .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 511 }, | ||
| 1823 | .{ .char = 'r', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 512 }, | ||
| 1824 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 513 }, | ||
| 1825 | .{ .char = 'f', .end_of_word = true, .end_of_list = false, .number = 2, .child_index = 1733 }, | ||
| 1826 | .{ .char = 'h', .end_of_word = true, .end_of_list = false, .number = 4, .child_index = 1715 }, | ||
| 1827 | .{ .char = 'l', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 }, | ||
| 1828 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1831 }, | ||
| 1829 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 1832 }, | ||
| 1830 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1833 }, | ||
| 1831 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1834 }, | ||
| 1832 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1835 }, | ||
| 1833 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1836 }, | ||
| 1834 | .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 1263, .child_index = 1837 }, | ||
| 1835 | .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 14, .child_index = 1838 }, | ||
| 1836 | .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 887 }, | ||
| 1837 | .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 888 }, | ||
| 1838 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1839 }, | ||
| 1839 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 1840 }, | ||
| 1840 | .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 1841 }, | ||
| 1841 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1842 }, | ||
| 1842 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1843 }, | ||
| 1843 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1844 }, | ||
| 1844 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1844 }, | ||
| 1845 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 1845 }, | ||
| 1846 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 1846 }, | ||
| 1847 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1847 }, | ||
| 1848 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1848 }, | ||
| 1849 | .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 1849 }, | ||
| 1850 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1611 }, | ||
| 1851 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1850 }, | ||
| 1852 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 569 }, | ||
| 1853 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 1851 }, | ||
| 1854 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1852 }, | ||
| 1855 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1853 }, | ||
| 1856 | .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1854 }, | ||
| 1857 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1855 }, | ||
| 1858 | .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1856 }, | ||
| 1859 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 1857 }, | ||
| 1860 | .{ .char = '2', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 458 }, | ||
| 1861 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1858 }, | ||
| 1862 | .{ .char = 'i', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 }, | ||
| 1863 | .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 655 }, | ||
| 1864 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1861 }, | ||
| 1865 | .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1863 }, | ||
| 1866 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 33, .child_index = 1864 }, | ||
| 1867 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1865 }, | ||
| 1868 | .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1866 }, | ||
| 1869 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1867 }, | ||
| 1870 | .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1868 }, | ||
| 1871 | .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1869 }, | ||
| 1872 | .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 655 }, | ||
| 1873 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 450 }, | ||
| 1874 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1870 }, | ||
| 1875 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1352 }, | ||
| 1876 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 40, .child_index = 1871 }, | ||
| 1877 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 1872 }, | ||
| 1878 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 1873 }, | ||
| 1879 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 1874 }, | ||
| 1880 | .{ .char = '6', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 }, | ||
| 1881 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1875 }, | ||
| 1882 | .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 1876 }, | ||
| 1883 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1877 }, | ||
| 1884 | .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1878 }, | ||
| 1885 | .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1879 }, | ||
| 1886 | .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1880 }, | ||
| 1887 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1401 }, | ||
| 1888 | .{ .char = 't', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 1881 }, | ||
| 1889 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1882 }, | ||
| 1890 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1883 }, | ||
| 1891 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 286 }, | ||
| 1892 | .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 572 }, | ||
| 1893 | .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 451 }, | ||
| 1894 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 10, .child_index = 1884 }, | ||
| 1895 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1885 }, | ||
| 1896 | .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1886 }, | ||
| 1897 | .{ .char = 'd', .end_of_word = true, .end_of_list = true, .number = 3, .child_index = 1665 }, | ||
| 1898 | .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 1887 }, | ||
| 1899 | .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1888 }, | ||
| 1900 | .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 10, .child_index = 1889 }, | ||
| 1901 | .{ .char = '1', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 648 }, | ||
| 1902 | .{ .char = '8', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 }, | ||
| 1903 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1890 }, | ||
| 1904 | .{ .char = 'I', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1406 }, | ||
| 1905 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1891 }, | ||
| 1906 | .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1892 }, | ||
| 1907 | .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1168 }, | ||
| 1908 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1893 }, | ||
| 1909 | .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1168 }, | ||
| 1910 | .{ .char = 'S', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1894 }, | ||
| 1911 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 1895 }, | ||
| 1912 | .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 1896 }, | ||
| 1913 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1900 }, | ||
| 1914 | .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 1901 }, | ||
| 1915 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 1903 }, | ||
| 1916 | .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1427 }, | ||
| 1917 | .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1430 }, | ||
| 1918 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1906 }, | ||
| 1919 | .{ .char = 'b', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 }, | ||
| 1920 | .{ .char = 'l', .end_of_word = true, .end_of_list = false, .number = 2, .child_index = 549 }, | ||
| 1921 | .{ .char = 's', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 }, | ||
| 1922 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1907 }, | ||
| 1923 | .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 1908 }, | ||
| 1924 | .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 122, .child_index = 1909 }, | ||
| 1925 | .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 11, .child_index = 1910 }, | ||
| 1926 | .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 1913 }, | ||
| 1927 | .{ .char = 'g', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1916 }, | ||
| 1928 | .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1917 }, | ||
| 1929 | .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 7, .child_index = 1918 }, | ||
| 1930 | .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 1919 }, | ||
| 1931 | .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 420 }, | ||
| 1932 | .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1921 }, | ||
| 1933 | .{ .char = 'q', .end_of_word = false, .end_of_list = false, .number = 9, .child_index = 1922 }, | ||
| 1934 | .{ .char = 'r', .end_of_word = false, .end_of_list = false, .number = 5, .child_index = 1925 }, | ||
| 1935 | .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 51, .child_index = 1927 }, | ||
| 1936 | .{ .char = 't', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 1934 }, | ||
| 1937 | .{ .char = 'u', .end_of_word = false, .end_of_list = false, .number = 24, .child_index = 1937 }, | ||
| 1938 | .{ .char = 'v', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 1942 }, | ||
| 1939 | .{ .char = 'w', .end_of_word = false, .end_of_list = false, .number = 5, .child_index = 1943 }, | ||
| 1940 | .{ .char = 'y', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 274 }, | ||
| 1941 | .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1945 }, | ||
| 1942 | .{ .char = '2', .end_of_word = true, .end_of_list = false, .number = 4, .child_index = 1715 }, | ||
| 1943 | .{ .char = 'f', .end_of_word = true, .end_of_list = false, .number = 2, .child_index = 1733 }, | ||
| 1944 | .{ .char = 'h', .end_of_word = true, .end_of_list = false, .number = 4, .child_index = 1715 }, | ||
| 1945 | .{ .char = 'l', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 }, | ||
| 1946 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 1946 }, | ||
| 1947 | .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1947 }, | ||
| 1948 | .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1950 }, | ||
| 1949 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 569 }, | ||
| 1950 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 1951 }, | ||
| 1951 | .{ .char = 'f', .end_of_word = true, .end_of_list = false, .number = 2, .child_index = 1733 }, | ||
| 1952 | .{ .char = 'l', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 }, | ||
| 1953 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1952 }, | ||
| 1954 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1953 }, | ||
| 1955 | .{ .char = 'b', .end_of_word = true, .end_of_list = true, .number = 3, .child_index = 1485 }, | ||
| 1956 | .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 332 }, | ||
| 1957 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1954 }, | ||
| 1958 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1955 }, | ||
| 1959 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 1956 }, | ||
| 1960 | .{ .char = '1', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1957 }, | ||
| 1961 | .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 1959 }, | ||
| 1962 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1961 }, | ||
| 1963 | .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1962 }, | ||
| 1964 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1963 }, | ||
| 1965 | .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1964 }, | ||
| 1966 | .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1965 }, | ||
| 1967 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1966 }, | ||
| 1968 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 25, .child_index = 1967 }, | ||
| 1969 | .{ .char = '1', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1968 }, | ||
| 1970 | .{ .char = '0', .end_of_word = true, .end_of_list = true, .number = 5, .child_index = 1504 }, | ||
| 1971 | .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1969 }, | ||
| 1972 | .{ .char = '1', .end_of_word = true, .end_of_list = true, .number = 4, .child_index = 1715 }, | ||
| 1973 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1970 }, | ||
| 1974 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1971 }, | ||
| 1975 | .{ .char = 'r', .end_of_word = true, .end_of_list = true, .number = 5, .child_index = 1504 }, | ||
| 1976 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1972 }, | ||
| 1977 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1973 }, | ||
| 1978 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1974 }, | ||
| 1979 | .{ .char = 'p', .end_of_word = true, .end_of_list = true, .number = 5, .child_index = 1504 }, | ||
| 1980 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1975 }, | ||
| 1981 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 1976 }, | ||
| 1982 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1977 }, | ||
| 1983 | .{ .char = 'b', .end_of_word = true, .end_of_list = true, .number = 4, .child_index = 1715 }, | ||
| 1984 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1978 }, | ||
| 1985 | .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1979 }, | ||
| 1986 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 328 }, | ||
| 1987 | .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1980 }, | ||
| 1988 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1981 }, | ||
| 1989 | .{ .char = 'f', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 1982 }, | ||
| 1990 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1983 }, | ||
| 1991 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1984 }, | ||
| 1992 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1985 }, | ||
| 1993 | .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 579 }, | ||
| 1994 | .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 1986 }, | ||
| 1995 | .{ .char = '0', .end_of_word = true, .end_of_list = false, .number = 5, .child_index = 1504 }, | ||
| 1996 | .{ .char = 'p', .end_of_word = true, .end_of_list = true, .number = 4, .child_index = 1715 }, | ||
| 1997 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 1987 }, | ||
| 1998 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1988 }, | ||
| 1999 | .{ .char = 'h', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 585 }, | ||
| 2000 | .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 291 }, | ||
| 2001 | .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1989 }, | ||
| 2002 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1990 }, | ||
| 2003 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 135, .child_index = 1991 }, | ||
| 2004 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 50, .child_index = 2003 }, | ||
| 2005 | .{ .char = 'b', .end_of_word = false, .end_of_list = false, .number = 56, .child_index = 2007 }, | ||
| 2006 | .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 50, .child_index = 2013 }, | ||
| 2007 | .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 26, .child_index = 2018 }, | ||
| 2008 | .{ .char = 'f', .end_of_word = false, .end_of_list = false, .number = 106, .child_index = 2021 }, | ||
| 2009 | .{ .char = 'h', .end_of_word = false, .end_of_list = false, .number = 12, .child_index = 2032 }, | ||
| 2010 | .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 24, .child_index = 2034 }, | ||
| 2011 | .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 10, .child_index = 2036 }, | ||
| 2012 | .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 73, .child_index = 2037 }, | ||
| 2013 | .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 10, .child_index = 2042 }, | ||
| 2014 | .{ .char = 'o', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2044 }, | ||
| 2015 | .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 12, .child_index = 2045 }, | ||
| 2016 | .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 97, .child_index = 2046 }, | ||
| 2017 | .{ .char = 'v', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 2053 }, | ||
| 2018 | .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2054 }, | ||
| 2019 | .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2055 }, | ||
| 2020 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 2056 }, | ||
| 2021 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2057 }, | ||
| 2022 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2058 }, | ||
| 2023 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2059 }, | ||
| 2024 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2060 }, | ||
| 2025 | .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2061 }, | ||
| 2026 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2062 }, | ||
| 2027 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2063 }, | ||
| 2028 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2064 }, | ||
| 2029 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 2065 }, | ||
| 2030 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 2066 }, | ||
| 2031 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2067 }, | ||
| 2032 | .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 2068 }, | ||
| 2033 | .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 2070 }, | ||
| 2034 | .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2071 }, | ||
| 2035 | .{ .char = 'f', .end_of_word = false, .end_of_list = false, .number = 41, .child_index = 2072 }, | ||
| 2036 | .{ .char = 'g', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2078 }, | ||
| 2037 | .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 2079 }, | ||
| 2038 | .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 5, .child_index = 2081 }, | ||
| 2039 | .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 19, .child_index = 2084 }, | ||
| 2040 | .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 2089 }, | ||
| 2041 | .{ .char = 'r', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 2090 }, | ||
| 2042 | .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 10, .child_index = 2094 }, | ||
| 2043 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2097 }, | ||
| 2044 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2100 }, | ||
| 2045 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2101 }, | ||
| 2046 | .{ .char = 'g', .end_of_word = false, .end_of_list = false, .number = 5, .child_index = 2102 }, | ||
| 2047 | .{ .char = 'r', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 2103 }, | ||
| 2048 | .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 2104 }, | ||
| 2049 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 9, .child_index = 2105 }, | ||
| 2050 | .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2107 }, | ||
| 2051 | .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1826 }, | ||
| 2052 | .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 7, .child_index = 2108 }, | ||
| 2053 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2109 }, | ||
| 2054 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2110 }, | ||
| 2055 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2111 }, | ||
| 2056 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 2112 }, | ||
| 2057 | .{ .char = 'd', .end_of_word = true, .end_of_list = true, .number = 10, .child_index = 2113 }, | ||
| 2058 | .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1682 }, | ||
| 2059 | .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2116 }, | ||
| 2060 | .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 2118 }, | ||
| 2061 | .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2120 }, | ||
| 2062 | .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 654 }, | ||
| 2063 | .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2121 }, | ||
| 2064 | .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 2122 }, | ||
| 2065 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2123 }, | ||
| 2066 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2124 }, | ||
| 2067 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1970 }, | ||
| 2068 | .{ .char = 'c', .end_of_word = true, .end_of_list = true, .number = 5, .child_index = 1504 }, | ||
| 2069 | .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1546 }, | ||
| 2070 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2125 }, | ||
| 2071 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2126 }, | ||
| 2072 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2127 }, | ||
| 2073 | .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1263, .child_index = 2128 }, | ||
| 2074 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 14, .child_index = 2129 }, | ||
| 2075 | .{ .char = 'h', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 986 }, | ||
| 2076 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 2131 }, | ||
| 2077 | .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2133 }, | ||
| 2078 | .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1847 }, | ||
| 2079 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1847 }, | ||
| 2080 | .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2134 }, | ||
| 2081 | .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 2135 }, | ||
| 2082 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 2135 }, | ||
| 2083 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 2136 }, | ||
| 2084 | .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1847 }, | ||
| 2085 | .{ .char = 'h', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 2137 }, | ||
| 2086 | .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 569 }, | ||
| 2087 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2138 }, | ||
| 2088 | .{ .char = 'z', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2142 }, | ||
| 2089 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2143 }, | ||
| 2090 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2144 }, | ||
| 2091 | .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2145 }, | ||
| 2092 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 2146 }, | ||
| 2093 | .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2147 }, | ||
| 2094 | .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2148 }, | ||
| 2095 | .{ .char = 'g', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 655 }, | ||
| 2096 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2149 }, | ||
| 2097 | .{ .char = 'i', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 }, | ||
| 2098 | .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 655 }, | ||
| 2099 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2150 }, | ||
| 2100 | .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 33, .child_index = 2151 }, | ||
| 2101 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1100 }, | ||
| 2102 | .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2152 }, | ||
| 2103 | .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2153 }, | ||
| 2104 | .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1869 }, | ||
| 2105 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2154 }, | ||
| 2106 | .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2156 }, | ||
| 2107 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 40, .child_index = 2157 }, | ||
| 2108 | .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 2158 }, | ||
| 2109 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 2159 }, | ||
| 2110 | .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 2160 }, | ||
| 2111 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2161 }, | ||
| 2112 | .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 2162 }, | ||
| 2113 | .{ .char = 'z', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2163 }, | ||
| 2114 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 580 }, | ||
| 2115 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2164 }, | ||
| 2116 | .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2165 }, | ||
| 2117 | .{ .char = '6', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 649 }, | ||
| 2118 | .{ .char = '6', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 649 }, | ||
| 2119 | .{ .char = 'g', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 }, | ||
| 2120 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 10, .child_index = 2166 }, | ||
| 2121 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2167 }, | ||
| 2122 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2168 }, | ||
| 2123 | .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 2169 }, | ||
| 2124 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2170 }, | ||
| 2125 | .{ .char = 'h', .end_of_word = false, .end_of_list = true, .number = 10, .child_index = 2171 }, | ||
| 2126 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2172 }, | ||
| 2127 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 582 }, | ||
| 2128 | .{ .char = 'k', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2173 }, | ||
| 2129 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2174 }, | ||
| 2130 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2175 }, | ||
| 2131 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2176 }, | ||
| 2132 | .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2177 }, | ||
| 2133 | .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2179 }, | ||
| 2134 | .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2180 }, | ||
| 2135 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2181 }, | ||
| 2136 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2182 }, | ||
| 2137 | .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2183 }, | ||
| 2138 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2180 }, | ||
| 2139 | .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2184 }, | ||
| 2140 | .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2186 }, | ||
| 2141 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2186 }, | ||
| 2142 | .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2187 }, | ||
| 2143 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2188 }, | ||
| 2144 | .{ .char = 'a', .end_of_word = true, .end_of_list = true, .number = 4, .child_index = 2190 }, | ||
| 2145 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 122, .child_index = 2191 }, | ||
| 2146 | .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2192 }, | ||
| 2147 | .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 5, .child_index = 2193 }, | ||
| 2148 | .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2196 }, | ||
| 2149 | .{ .char = 'b', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1883 }, | ||
| 2150 | .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 412 }, | ||
| 2151 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 412 }, | ||
| 2152 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2197 }, | ||
| 2153 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 412 }, | ||
| 2154 | .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 7, .child_index = 2198 }, | ||
| 2155 | .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 2201 }, | ||
| 2156 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2202 }, | ||
| 2157 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2204 }, | ||
| 2158 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 2205 }, | ||
| 2159 | .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2207 }, | ||
| 2160 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2208 }, | ||
| 2161 | .{ .char = 'b', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2210 }, | ||
| 2162 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 2211 }, | ||
| 2163 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 2212 }, | ||
| 2164 | .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 2214 }, | ||
| 2165 | .{ .char = 'h', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 2217 }, | ||
| 2166 | .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 24, .child_index = 2219 }, | ||
| 2167 | .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 5, .child_index = 2221 }, | ||
| 2168 | .{ .char = 't', .end_of_word = false, .end_of_list = false, .number = 7, .child_index = 2223 }, | ||
| 2169 | .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2226 }, | ||
| 2170 | .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2227 }, | ||
| 2171 | .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 520 }, | ||
| 2172 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2229 }, | ||
| 2173 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 2212 }, | ||
| 2174 | .{ .char = 'h', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 2217 }, | ||
| 2175 | .{ .char = 'q', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 2217 }, | ||
| 2176 | .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 7, .child_index = 2230 }, | ||
| 2177 | .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2226 }, | ||
| 2178 | .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2232 }, | ||
| 2179 | .{ .char = 'f', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 431 }, | ||
| 2180 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 2211 }, | ||
| 2181 | .{ .char = 'e', .end_of_word = true, .end_of_list = true, .number = 3, .child_index = 2233 }, | ||
| 2182 | .{ .char = 'v', .end_of_word = true, .end_of_list = true, .number = 5, .child_index = 2234 }, | ||
| 2183 | .{ .char = '1', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 648 }, | ||
| 2184 | .{ .char = '3', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2235 }, | ||
| 2185 | .{ .char = '6', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 649 }, | ||
| 2186 | .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2236 }, | ||
| 2187 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2237 }, | ||
| 2188 | .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2238 }, | ||
| 2189 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2239 }, | ||
| 2190 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2240 }, | ||
| 2191 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2241 }, | ||
| 2192 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 2242 }, | ||
| 2193 | .{ .char = '2', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2243 }, | ||
| 2194 | .{ .char = '6', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 }, | ||
| 2195 | .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 238 }, | ||
| 2196 | .{ .char = 's', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 }, | ||
| 2197 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2244 }, | ||
| 2198 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2245 }, | ||
| 2199 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2246 }, | ||
| 2200 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2247 }, | ||
| 2201 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2249 }, | ||
| 2202 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2250 }, | ||
| 2203 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 25, .child_index = 2251 }, | ||
| 2204 | .{ .char = '2', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2243 }, | ||
| 2205 | .{ .char = 't', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 2252 }, | ||
| 2206 | .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2253 }, | ||
| 2207 | .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2254 }, | ||
| 2208 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2255 }, | ||
| 2209 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2256 }, | ||
| 2210 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2257 }, | ||
| 2211 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2258 }, | ||
| 2212 | .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 2259 }, | ||
| 2213 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 2260 }, | ||
| 2214 | .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2261 }, | ||
| 2215 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2262 }, | ||
| 2216 | .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2263 }, | ||
| 2217 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2264 }, | ||
| 2218 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2167 }, | ||
| 2219 | .{ .char = 's', .end_of_word = true, .end_of_list = true, .number = 3, .child_index = 2265 }, | ||
| 2220 | .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2267 }, | ||
| 2221 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2268 }, | ||
| 2222 | .{ .char = 'a', .end_of_word = true, .end_of_list = true, .number = 4, .child_index = 1715 }, | ||
| 2223 | .{ .char = 'd', .end_of_word = true, .end_of_list = true, .number = 4, .child_index = 1715 }, | ||
| 2224 | .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 2269 }, | ||
| 2225 | .{ .char = 'y', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 2270 }, | ||
| 2226 | .{ .char = 't', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 2270 }, | ||
| 2227 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 19, .child_index = 2271 }, | ||
| 2228 | .{ .char = 'b', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 2274 }, | ||
| 2229 | .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 12, .child_index = 2277 }, | ||
| 2230 | .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 16, .child_index = 2278 }, | ||
| 2231 | .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 2279 }, | ||
| 2232 | .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2280 }, | ||
| 2233 | .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 2281 }, | ||
| 2234 | .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 24, .child_index = 2284 }, | ||
| 2235 | .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 21, .child_index = 2289 }, | ||
| 2236 | .{ .char = 'r', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 2292 }, | ||
| 2237 | .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 25, .child_index = 2295 }, | ||
| 2238 | .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2297 }, | ||
| 2239 | .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 24, .child_index = 2298 }, | ||
| 2240 | .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2299 }, | ||
| 2241 | .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 2300 }, | ||
| 2242 | .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 16, .child_index = 2301 }, | ||
| 2243 | .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 2302 }, | ||
| 2244 | .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 16, .child_index = 2303 }, | ||
| 2245 | .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 2304 }, | ||
| 2246 | .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 13, .child_index = 2306 }, | ||
| 2247 | .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 10, .child_index = 2308 }, | ||
| 2248 | .{ .char = 'z', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 2309 }, | ||
| 2249 | .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 2310 }, | ||
| 2250 | .{ .char = 'f', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2311 }, | ||
| 2251 | .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 32, .child_index = 2312 }, | ||
| 2252 | .{ .char = 'o', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 2314 }, | ||
| 2253 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2311 }, | ||
| 2254 | .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 2315 }, | ||
| 2255 | .{ .char = 'o', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 2316 }, | ||
| 2256 | .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 12, .child_index = 2032 }, | ||
| 2257 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2317 }, | ||
| 2258 | .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 24, .child_index = 2318 }, | ||
| 2259 | .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2324 }, | ||
| 2260 | .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 2325 }, | ||
| 2261 | .{ .char = 'f', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 2326 }, | ||
| 2262 | .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 2328 }, | ||
| 2263 | .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2329 }, | ||
| 2264 | .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 14, .child_index = 2330 }, | ||
| 2265 | .{ .char = 'r', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 2334 }, | ||
| 2266 | .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 26, .child_index = 2337 }, | ||
| 2267 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 10, .child_index = 2344 }, | ||
| 2268 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 2347 }, | ||
| 2269 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 2348 }, | ||
| 2270 | .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 16, .child_index = 2349 }, | ||
| 2271 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 2350 }, | ||
| 2272 | .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 10, .child_index = 2351 }, | ||
| 2273 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 28, .child_index = 2354 }, | ||
| 2274 | .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 20, .child_index = 2356 }, | ||
| 2275 | .{ .char = 'o', .end_of_word = false, .end_of_list = false, .number = 9, .child_index = 2357 }, | ||
| 2276 | .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 2359 }, | ||
| 2277 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 2360 }, | ||
| 2278 | .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 2361 }, | ||
| 2279 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2044 }, | ||
| 2280 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2363 }, | ||
| 2281 | .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 12, .child_index = 2365 }, | ||
| 2282 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 2367 }, | ||
| 2283 | .{ .char = 'h', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 2368 }, | ||
| 2284 | .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 16, .child_index = 2369 }, | ||
| 2285 | .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 2371 }, | ||
| 2286 | .{ .char = 'r', .end_of_word = false, .end_of_list = false, .number = 32, .child_index = 2372 }, | ||
| 2287 | .{ .char = 't', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 2374 }, | ||
| 2288 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 24, .child_index = 2376 }, | ||
| 2289 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2377 }, | ||
| 2290 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2044 }, | ||
| 2291 | .{ .char = 'y', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2378 }, | ||
| 2292 | .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2379 }, | ||
| 2293 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2380 }, | ||
| 2294 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2381 }, | ||
| 2295 | .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2382 }, | ||
| 2296 | .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2383 }, | ||
| 2297 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2384 }, | ||
| 2298 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2385 }, | ||
| 2299 | .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2386 }, | ||
| 2300 | .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2387 }, | ||
| 2301 | .{ .char = 'y', .end_of_word = true, .end_of_list = true, .number = 3, .child_index = 1485 }, | ||
| 2302 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 2388 }, | ||
| 2303 | .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2389 }, | ||
| 2304 | .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2390 }, | ||
| 2305 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2391 }, | ||
| 2306 | .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 2392 }, | ||
| 2307 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2393 }, | ||
| 2308 | .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 2394 }, | ||
| 2309 | .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 2396 }, | ||
| 2310 | .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2397 }, | ||
| 2311 | .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 2398 }, | ||
| 2312 | .{ .char = 'r', .end_of_word = false, .end_of_list = false, .number = 13, .child_index = 2400 }, | ||
| 2313 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2403 }, | ||
| 2314 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2405 }, | ||
| 2315 | .{ .char = 'o', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 2406 }, | ||
| 2316 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1342 }, | ||
| 2317 | .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2407 }, | ||
| 2318 | .{ .char = 'o', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2408 }, | ||
| 2319 | .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2409 }, | ||
| 2320 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 2411 }, | ||
| 2321 | .{ .char = 'f', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 2412 }, | ||
| 2322 | .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 2415 }, | ||
| 2323 | .{ .char = 't', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 2416 }, | ||
| 2324 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2419 }, | ||
| 2325 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 2420 }, | ||
| 2326 | .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2421 }, | ||
| 2327 | .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2422 }, | ||
| 2328 | .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 2423 }, | ||
| 2329 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2425 }, | ||
| 2330 | .{ .char = 't', .end_of_word = false, .end_of_list = false, .number = 5, .child_index = 2426 }, | ||
| 2331 | .{ .char = 'w', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 2430 }, | ||
| 2332 | .{ .char = 'y', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1616 }, | ||
| 2333 | .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2431 }, | ||
| 2334 | .{ .char = 'r', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2432 }, | ||
| 2335 | .{ .char = 'w', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 }, | ||
| 2336 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2433 }, | ||
| 2337 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2434 }, | ||
| 2338 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 2435 }, | ||
| 2339 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 2436 }, | ||
| 2340 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 2437 }, | ||
| 2341 | .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2438 }, | ||
| 2342 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 2439 }, | ||
| 2343 | .{ .char = 'y', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2440 }, | ||
| 2344 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 7, .child_index = 2441 }, | ||
| 2345 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2442 }, | ||
| 2346 | .{ .char = 'o', .end_of_word = true, .end_of_list = true, .number = 4, .child_index = 1715 }, | ||
| 2347 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1974 }, | ||
| 2348 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 2443 }, | ||
| 2349 | .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 5, .child_index = 2445 }, | ||
| 2350 | .{ .char = 'f', .end_of_word = true, .end_of_list = false, .number = 3, .child_index = 1724 }, | ||
| 2351 | .{ .char = 'l', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 }, | ||
| 2352 | .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1682 }, | ||
| 2353 | .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1534 }, | ||
| 2354 | .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 2446 }, | ||
| 2355 | .{ .char = 'n', .end_of_word = true, .end_of_list = true, .number = 4, .child_index = 1715 }, | ||
| 2356 | .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2447 }, | ||
| 2357 | .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2448 }, | ||
| 2358 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 297 }, | ||
| 2359 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2449 }, | ||
| 2360 | .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 429 }, | ||
| 2361 | .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2450 }, | ||
| 2362 | .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2451 }, | ||
| 2363 | .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2452 }, | ||
| 2364 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1263, .child_index = 2453 }, | ||
| 2365 | .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 2465 }, | ||
| 2366 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 2468 }, | ||
| 2367 | .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 2469 }, | ||
| 2368 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2470 }, | ||
| 2369 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2471 }, | ||
| 2370 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2472 }, | ||
| 2371 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 2473 }, | ||
| 2372 | .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 2474 }, | ||
| 2373 | .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1847 }, | ||
| 2374 | .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2475 }, | ||
| 2375 | .{ .char = 'f', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2476 }, | ||
| 2376 | .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2477 }, | ||
| 2377 | .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2478 }, | ||
| 2378 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 496 }, | ||
| 2379 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2479 }, | ||
| 2380 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2481 }, | ||
| 2381 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2482 }, | ||
| 2382 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 2483 }, | ||
| 2383 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2484 }, | ||
| 2384 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 568 }, | ||
| 2385 | .{ .char = 'y', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 344 }, | ||
| 2386 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2488 }, | ||
| 2387 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 33, .child_index = 2489 }, | ||
| 2388 | .{ .char = 'y', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1869 }, | ||
| 2389 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1869 }, | ||
| 2390 | .{ .char = 'f', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2490 }, | ||
| 2391 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2490 }, | ||
| 2392 | .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2491 }, | ||
| 2393 | .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 40, .child_index = 2492 }, | ||
| 2394 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 2493 }, | ||
| 2395 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 2494 }, | ||
| 2396 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 2495 }, | ||
| 2397 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2496 }, | ||
| 2398 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 2497 }, | ||
| 2399 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2498 }, | ||
| 2400 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 674 }, | ||
| 2401 | .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2499 }, | ||
| 2402 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 10, .child_index = 2500 }, | ||
| 2403 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 584 }, | ||
| 2404 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2501 }, | ||
| 2405 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 2502 }, | ||
| 2406 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2503 }, | ||
| 2407 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 10, .child_index = 2504 }, | ||
| 2408 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2505 }, | ||
| 2409 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2506 }, | ||
| 2410 | .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2507 }, | ||
| 2411 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2508 }, | ||
| 2412 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2509 }, | ||
| 2413 | .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2183 }, | ||
| 2414 | .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2510 }, | ||
| 2415 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2511 }, | ||
| 2416 | .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2183 }, | ||
| 2417 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2512 }, | ||
| 2418 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2513 }, | ||
| 2419 | .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2510 }, | ||
| 2420 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2512 }, | ||
| 2421 | .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2510 }, | ||
| 2422 | .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2184 }, | ||
| 2423 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2514 }, | ||
| 2424 | .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2515 }, | ||
| 2425 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 291 }, | ||
| 2426 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 2516 }, | ||
| 2427 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 122, .child_index = 2518 }, | ||
| 2428 | .{ .char = 'p', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 1362 }, | ||
| 2429 | .{ .char = 'r', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 332 }, | ||
| 2430 | .{ .char = 's', .end_of_word = true, .end_of_list = false, .number = 2, .child_index = 1881 }, | ||
| 2431 | .{ .char = 'z', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 1881 }, | ||
| 2432 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2535 }, | ||
| 2433 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2536 }, | ||
| 2434 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 332 }, | ||
| 2435 | .{ .char = 'c', .end_of_word = true, .end_of_list = false, .number = 4, .child_index = 2537 }, | ||
| 2436 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2539 }, | ||
| 2437 | .{ .char = 'r', .end_of_word = true, .end_of_list = true, .number = 4, .child_index = 2540 }, | ||
| 2438 | .{ .char = 'c', .end_of_word = true, .end_of_list = false, .number = 2, .child_index = 1362 }, | ||
| 2439 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2542 }, | ||
| 2440 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2543 }, | ||
| 2441 | .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 1661 }, | ||
| 2442 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 463 }, | ||
| 2443 | .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 655 }, | ||
| 2444 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 463 }, | ||
| 2445 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 2544 }, | ||
| 2446 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1652 }, | ||
| 2447 | .{ .char = 'r', .end_of_word = true, .end_of_list = true, .number = 3, .child_index = 2545 }, | ||
| 2448 | .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2547 }, | ||
| 2449 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 463 }, | ||
| 2450 | .{ .char = 'l', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 }, | ||
| 2451 | .{ .char = 't', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2536 }, | ||
| 2452 | .{ .char = 'v', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 549 }, | ||
| 2453 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 2212 }, | ||
| 2454 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 2548 }, | ||
| 2455 | .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 14, .child_index = 2550 }, | ||
| 2456 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 10, .child_index = 2552 }, | ||
| 2457 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 2555 }, | ||
| 2458 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2557 }, | ||
| 2459 | .{ .char = 'c', .end_of_word = true, .end_of_list = false, .number = 4, .child_index = 2537 }, | ||
| 2460 | .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 332 }, | ||
| 2461 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2539 }, | ||
| 2462 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2558 }, | ||
| 2463 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2560 }, | ||
| 2464 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2561 }, | ||
| 2465 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2562 }, | ||
| 2466 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 5, .child_index = 2563 }, | ||
| 2467 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2557 }, | ||
| 2468 | .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2566 }, | ||
| 2469 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2567 }, | ||
| 2470 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2569 }, | ||
| 2471 | .{ .char = '2', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 }, | ||
| 2472 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2570 }, | ||
| 2473 | .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2571 }, | ||
| 2474 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2572 }, | ||
| 2475 | .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2573 }, | ||
| 2476 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2574 }, | ||
| 2477 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2575 }, | ||
| 2478 | .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 1491 }, | ||
| 2479 | .{ .char = '8', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 }, | ||
| 2480 | .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2576 }, | ||
| 2481 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2577 }, | ||
| 2482 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2578 }, | ||
| 2483 | .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2579 }, | ||
| 2484 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2580 }, | ||
| 2485 | .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2581 }, | ||
| 2486 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2582 }, | ||
| 2487 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 25, .child_index = 2583 }, | ||
| 2488 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2584 }, | ||
| 2489 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2585 }, | ||
| 2490 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1744 }, | ||
| 2491 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2586 }, | ||
| 2492 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2587 }, | ||
| 2493 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 729 }, | ||
| 2494 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2588 }, | ||
| 2495 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 1451 }, | ||
| 2496 | .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 2589 }, | ||
| 2497 | .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2591 }, | ||
| 2498 | .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2592 }, | ||
| 2499 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1166 }, | ||
| 2500 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2593 }, | ||
| 2501 | .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2594 }, | ||
| 2502 | .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2595 }, | ||
| 2503 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 655 }, | ||
| 2504 | .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2596 }, | ||
| 2505 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 2597 }, | ||
| 2506 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2599 }, | ||
| 2507 | .{ .char = 'b', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 2600 }, | ||
| 2508 | .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 15, .child_index = 2601 }, | ||
| 2509 | .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2602 }, | ||
| 2510 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 479 }, | ||
| 2511 | .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2603 }, | ||
| 2512 | .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2604 }, | ||
| 2513 | .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 12, .child_index = 2605 }, | ||
| 2514 | .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 16, .child_index = 2606 }, | ||
| 2515 | .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 2608 }, | ||
| 2516 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2609 }, | ||
| 2517 | .{ .char = 'b', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2610 }, | ||
| 2518 | .{ .char = 'h', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 463 }, | ||
| 2519 | .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 463 }, | ||
| 2520 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 2611 }, | ||
| 2521 | .{ .char = 'o', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2613 }, | ||
| 2522 | .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2614 }, | ||
| 2523 | .{ .char = 't', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2615 }, | ||
| 2524 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 14, .child_index = 2616 }, | ||
| 2525 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2617 }, | ||
| 2526 | .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2618 }, | ||
| 2527 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 18, .child_index = 2619 }, | ||
| 2528 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2620 }, | ||
| 2529 | .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2621 }, | ||
| 2530 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2622 }, | ||
| 2531 | .{ .char = 'h', .end_of_word = false, .end_of_list = false, .number = 12, .child_index = 2623 }, | ||
| 2532 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 13, .child_index = 2626 }, | ||
| 2533 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2621 }, | ||
| 2534 | .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 24, .child_index = 2627 }, | ||
| 2535 | .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2363 }, | ||
| 2536 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 2630 }, | ||
| 2537 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 16, .child_index = 2631 }, | ||
| 2538 | .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 2633 }, | ||
| 2539 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 16, .child_index = 2634 }, | ||
| 2540 | .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2635 }, | ||
| 2541 | .{ .char = 'z', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2363 }, | ||
| 2542 | .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 2636 }, | ||
| 2543 | .{ .char = 'z', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 2309 }, | ||
| 2544 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 10, .child_index = 2637 }, | ||
| 2545 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 2639 }, | ||
| 2546 | .{ .char = 'q', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 2644 }, | ||
| 2547 | .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2646 }, | ||
| 2548 | .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 16, .child_index = 2647 }, | ||
| 2549 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 16, .child_index = 2647 }, | ||
| 2550 | .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 2649 }, | ||
| 2551 | .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 2650 }, | ||
| 2552 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 2651 }, | ||
| 2553 | .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2652 }, | ||
| 2554 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2653 }, | ||
| 2555 | .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2654 }, | ||
| 2556 | .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 2655 }, | ||
| 2557 | .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2658 }, | ||
| 2558 | .{ .char = 'o', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2659 }, | ||
| 2559 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 10, .child_index = 2660 }, | ||
| 2560 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2663 }, | ||
| 2561 | .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 2664 }, | ||
| 2562 | .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 2667 }, | ||
| 2563 | .{ .char = 'q', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2668 }, | ||
| 2564 | .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2670 }, | ||
| 2565 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2671 }, | ||
| 2566 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 2672 }, | ||
| 2567 | .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 2674 }, | ||
| 2568 | .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2675 }, | ||
| 2569 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2676 }, | ||
| 2570 | .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2677 }, | ||
| 2571 | .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2678 }, | ||
| 2572 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2679 }, | ||
| 2573 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2653 }, | ||
| 2574 | .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2654 }, | ||
| 2575 | .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 2680 }, | ||
| 2576 | .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2658 }, | ||
| 2577 | .{ .char = 'o', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2659 }, | ||
| 2578 | .{ .char = 'q', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2682 }, | ||
| 2579 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 12, .child_index = 2683 }, | ||
| 2580 | .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 2667 }, | ||
| 2581 | .{ .char = 'q', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2687 }, | ||
| 2582 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2688 }, | ||
| 2583 | .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 2689 }, | ||
| 2584 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 2690 }, | ||
| 2585 | .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 16, .child_index = 2691 }, | ||
| 2586 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 2695 }, | ||
| 2587 | .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 2697 }, | ||
| 2588 | .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 2701 }, | ||
| 2589 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2702 }, | ||
| 2590 | .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 2703 }, | ||
| 2591 | .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 20, .child_index = 2704 }, | ||
| 2592 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 20, .child_index = 2704 }, | ||
| 2593 | .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 2650 }, | ||
| 2594 | .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2706 }, | ||
| 2595 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 2707 }, | ||
| 2596 | .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 2708 }, | ||
| 2597 | .{ .char = 'o', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 2711 }, | ||
| 2598 | .{ .char = 'z', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2711 }, | ||
| 2599 | .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2712 }, | ||
| 2600 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2713 }, | ||
| 2601 | .{ .char = 'k', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 2714 }, | ||
| 2602 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2716 }, | ||
| 2603 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 2650 }, | ||
| 2604 | .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 2717 }, | ||
| 2605 | .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 2644 }, | ||
| 2606 | .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 2644 }, | ||
| 2607 | .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 2718 }, | ||
| 2608 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 16, .child_index = 2719 }, | ||
| 2609 | .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 16, .child_index = 2719 }, | ||
| 2610 | .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 2697 }, | ||
| 2611 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2702 }, | ||
| 2612 | .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 24, .child_index = 2722 }, | ||
| 2613 | .{ .char = 'h', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2724 }, | ||
| 2614 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 1524 }, | ||
| 2615 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2725 }, | ||
| 2616 | .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2726 }, | ||
| 2617 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2727 }, | ||
| 2618 | .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2728 }, | ||
| 2619 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2729 }, | ||
| 2620 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2730 }, | ||
| 2621 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2731 }, | ||
| 2622 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2732 }, | ||
| 2623 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2733 }, | ||
| 2624 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 2734 }, | ||
| 2625 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2735 }, | ||
| 2626 | .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 412 }, | ||
| 2627 | .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2736 }, | ||
| 2628 | .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 2737 }, | ||
| 2629 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2741 }, | ||
| 2630 | .{ .char = 'f', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2742 }, | ||
| 2631 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 2744 }, | ||
| 2632 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 2746 }, | ||
| 2633 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2747 }, | ||
| 2634 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2748 }, | ||
| 2635 | .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2749 }, | ||
| 2636 | .{ .char = 'e', .end_of_word = true, .end_of_list = false, .number = 2, .child_index = 2751 }, | ||
| 2637 | .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 9, .child_index = 2752 }, | ||
| 2638 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2757 }, | ||
| 2639 | .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2758 }, | ||
| 2640 | .{ .char = 'q', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2759 }, | ||
| 2641 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2760 }, | ||
| 2642 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 2761 }, | ||
| 2643 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2762 }, | ||
| 2644 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2763 }, | ||
| 2645 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2762 }, | ||
| 2646 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1342 }, | ||
| 2647 | .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 2764 }, | ||
| 2648 | .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2765 }, | ||
| 2649 | .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2766 }, | ||
| 2650 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2767 }, | ||
| 2651 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 2764 }, | ||
| 2652 | .{ .char = 'f', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 2768 }, | ||
| 2653 | .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2765 }, | ||
| 2654 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2766 }, | ||
| 2655 | .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2769 }, | ||
| 2656 | .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 2770 }, | ||
| 2657 | .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2772 }, | ||
| 2658 | .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2773 }, | ||
| 2659 | .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2774 }, | ||
| 2660 | .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2775 }, | ||
| 2661 | .{ .char = 'q', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2777 }, | ||
| 2662 | .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2778 }, | ||
| 2663 | .{ .char = 'f', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2779 }, | ||
| 2664 | .{ .char = 'o', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2780 }, | ||
| 2665 | .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2778 }, | ||
| 2666 | .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2781 }, | ||
| 2667 | .{ .char = 'w', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 }, | ||
| 2668 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2782 }, | ||
| 2669 | .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 656 }, | ||
| 2670 | .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2783 }, | ||
| 2671 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 2784 }, | ||
| 2672 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 2785 }, | ||
| 2673 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 2786 }, | ||
| 2674 | .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2787 }, | ||
| 2675 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 2788 }, | ||
| 2676 | .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2790 }, | ||
| 2677 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 7, .child_index = 2791 }, | ||
| 2678 | .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2725 }, | ||
| 2679 | .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 2795 }, | ||
| 2680 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2796 }, | ||
| 2681 | .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 2797 }, | ||
| 2682 | .{ .char = 'n', .end_of_word = true, .end_of_list = true, .number = 4, .child_index = 1715 }, | ||
| 2683 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1487 }, | ||
| 2684 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2575 }, | ||
| 2685 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2798 }, | ||
| 2686 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2799 }, | ||
| 2687 | .{ .char = 'h', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2800 }, | ||
| 2688 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2801 }, | ||
| 2689 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2802 }, | ||
| 2690 | .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 2803 }, | ||
| 2691 | .{ .char = 'f', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 2805 }, | ||
| 2692 | .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2807 }, | ||
| 2693 | .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 2808 }, | ||
| 2694 | .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 2812 }, | ||
| 2695 | .{ .char = 'o', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2814 }, | ||
| 2696 | .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 393, .child_index = 2815 }, | ||
| 2697 | .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 2819 }, | ||
| 2698 | .{ .char = 't', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2821 }, | ||
| 2699 | .{ .char = 'v', .end_of_word = false, .end_of_list = false, .number = 836, .child_index = 2823 }, | ||
| 2700 | .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2837 }, | ||
| 2701 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2838 }, | ||
| 2702 | .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2839 }, | ||
| 2703 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2840 }, | ||
| 2704 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 2841 }, | ||
| 2705 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2842 }, | ||
| 2706 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2843 }, | ||
| 2707 | .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2844 }, | ||
| 2708 | .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2845 }, | ||
| 2709 | .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 2846 }, | ||
| 2710 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 2847 }, | ||
| 2711 | .{ .char = '2', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2848 }, | ||
| 2712 | .{ .char = '2', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1352 }, | ||
| 2713 | .{ .char = '2', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 496 }, | ||
| 2714 | .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1624 }, | ||
| 2715 | .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 506 }, | ||
| 2716 | .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2849 }, | ||
| 2717 | .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2850 }, | ||
| 2718 | .{ .char = 'z', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 }, | ||
| 2719 | .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1100 }, | ||
| 2720 | .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2851 }, | ||
| 2721 | .{ .char = 'g', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2852 }, | ||
| 2722 | .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2853 }, | ||
| 2723 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2854 }, | ||
| 2724 | .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2855 }, | ||
| 2725 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 33, .child_index = 2856 }, | ||
| 2726 | .{ .char = '3', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2235 }, | ||
| 2727 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 311 }, | ||
| 2728 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 40, .child_index = 2857 }, | ||
| 2729 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 2864 }, | ||
| 2730 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 2865 }, | ||
| 2731 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 2866 }, | ||
| 2732 | .{ .char = 'z', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 572 }, | ||
| 2733 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 2867 }, | ||
| 2734 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2868 }, | ||
| 2735 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2869 }, | ||
| 2736 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 10, .child_index = 2870 }, | ||
| 2737 | .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2871 }, | ||
| 2738 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 2872 }, | ||
| 2739 | .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2873 }, | ||
| 2740 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 10, .child_index = 2874 }, | ||
| 2741 | .{ .char = 'r', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 1362 }, | ||
| 2742 | .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2875 }, | ||
| 2743 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2876 }, | ||
| 2744 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2877 }, | ||
| 2745 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2878 }, | ||
| 2746 | .{ .char = 'y', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2879 }, | ||
| 2747 | .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2880 }, | ||
| 2748 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2879 }, | ||
| 2749 | .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2879 }, | ||
| 2750 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2881 }, | ||
| 2751 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2882 }, | ||
| 2752 | .{ .char = 'u', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2883 }, | ||
| 2753 | .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2884 }, | ||
| 2754 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 2885 }, | ||
| 2755 | .{ .char = 'b', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2887 }, | ||
| 2756 | .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 13, .child_index = 2888 }, | ||
| 2757 | .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 15, .child_index = 2892 }, | ||
| 2758 | .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2894 }, | ||
| 2759 | .{ .char = 'f', .end_of_word = false, .end_of_list = false, .number = 10, .child_index = 2896 }, | ||
| 2760 | .{ .char = 'g', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 2900 }, | ||
| 2761 | .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 9, .child_index = 2901 }, | ||
| 2762 | .{ .char = 'k', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2905 }, | ||
| 2763 | .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 5, .child_index = 2906 }, | ||
| 2764 | .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 5, .child_index = 2909 }, | ||
| 2765 | .{ .char = 'q', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2912 }, | ||
| 2766 | .{ .char = 'r', .end_of_word = false, .end_of_list = false, .number = 11, .child_index = 2914 }, | ||
| 2767 | .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 23, .child_index = 2917 }, | ||
| 2768 | .{ .char = 't', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2923 }, | ||
| 2769 | .{ .char = 'u', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 2924 }, | ||
| 2770 | .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 10, .child_index = 2926 }, | ||
| 2771 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2928 }, | ||
| 2772 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2929 }, | ||
| 2773 | .{ .char = '2', .end_of_word = true, .end_of_list = false, .number = 2, .child_index = 549 }, | ||
| 2774 | .{ .char = 'l', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 }, | ||
| 2775 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2930 }, | ||
| 2776 | .{ .char = '2', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 }, | ||
| 2777 | .{ .char = 'r', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 1362 }, | ||
| 2778 | .{ .char = 'c', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 1362 }, | ||
| 2779 | .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1808 }, | ||
| 2780 | .{ .char = 'b', .end_of_word = true, .end_of_list = true, .number = 3, .child_index = 1665 }, | ||
| 2781 | .{ .char = '6', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 649 }, | ||
| 2782 | .{ .char = 'p', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 }, | ||
| 2783 | .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2931 }, | ||
| 2784 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 463 }, | ||
| 2785 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2557 }, | ||
| 2786 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 10, .child_index = 2933 }, | ||
| 2787 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2938 }, | ||
| 2788 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2940 }, | ||
| 2789 | .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 2941 }, | ||
| 2790 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2940 }, | ||
| 2791 | .{ .char = 't', .end_of_word = true, .end_of_list = false, .number = 2, .child_index = 2944 }, | ||
| 2792 | .{ .char = 'x', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 }, | ||
| 2793 | .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2931 }, | ||
| 2794 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2945 }, | ||
| 2795 | .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2946 }, | ||
| 2796 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2947 }, | ||
| 2797 | .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2948 }, | ||
| 2798 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 311 }, | ||
| 2799 | .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2949 }, | ||
| 2800 | .{ .char = 't', .end_of_word = true, .end_of_list = false, .number = 2, .child_index = 2944 }, | ||
| 2801 | .{ .char = 'x', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 }, | ||
| 2802 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2951 }, | ||
| 2803 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1749 }, | ||
| 2804 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2952 }, | ||
| 2805 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2953 }, | ||
| 2806 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2954 }, | ||
| 2807 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2955 }, | ||
| 2808 | .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 512 }, | ||
| 2809 | .{ .char = 'y', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2956 }, | ||
| 2810 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2957 }, | ||
| 2811 | .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2958 }, | ||
| 2812 | .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2959 }, | ||
| 2813 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 291 }, | ||
| 2814 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2960 }, | ||
| 2815 | .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 568 }, | ||
| 2816 | .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2961 }, | ||
| 2817 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2962 }, | ||
| 2818 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2963 }, | ||
| 2819 | .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 25, .child_index = 2964 }, | ||
| 2820 | .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2965 }, | ||
| 2821 | .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2966 }, | ||
| 2822 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1143 }, | ||
| 2823 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2967 }, | ||
| 2824 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2968 }, | ||
| 2825 | .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2969 }, | ||
| 2826 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2970 }, | ||
| 2827 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2971 }, | ||
| 2828 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2972 }, | ||
| 2829 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2973 }, | ||
| 2830 | .{ .char = 'q', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2974 }, | ||
| 2831 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2975 }, | ||
| 2832 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2976 }, | ||
| 2833 | .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2977 }, | ||
| 2834 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2978 }, | ||
| 2835 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2979 }, | ||
| 2836 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 2980 }, | ||
| 2837 | .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 15, .child_index = 2981 }, | ||
| 2838 | .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2985 }, | ||
| 2839 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2986 }, | ||
| 2840 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2987 }, | ||
| 2841 | .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 12, .child_index = 2988 }, | ||
| 2842 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 2991 }, | ||
| 2843 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 2991 }, | ||
| 2844 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 2995 }, | ||
| 2845 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2712 }, | ||
| 2846 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 463 }, | ||
| 2847 | .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2997 }, | ||
| 2848 | .{ .char = 'q', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2998 }, | ||
| 2849 | .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2999 }, | ||
| 2850 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3000 }, | ||
| 2851 | .{ .char = 'h', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3001 }, | ||
| 2852 | .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 14, .child_index = 3002 }, | ||
| 2853 | .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3007 }, | ||
| 2854 | .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3008 }, | ||
| 2855 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 18, .child_index = 3009 }, | ||
| 2856 | .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3011 }, | ||
| 2857 | .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3012 }, | ||
| 2858 | .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3013 }, | ||
| 2859 | .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3014 }, | ||
| 2860 | .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 3015 }, | ||
| 2861 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 7, .child_index = 3016 }, | ||
| 2862 | .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 13, .child_index = 3018 }, | ||
| 2863 | .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 3020 }, | ||
| 2864 | .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 12, .child_index = 3021 }, | ||
| 2865 | .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 2644 }, | ||
| 2866 | .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 2650 }, | ||
| 2867 | .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 3022 }, | ||
| 2868 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 2650 }, | ||
| 2869 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 2644 }, | ||
| 2870 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 16, .child_index = 3024 }, | ||
| 2871 | .{ .char = 'z', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2363 }, | ||
| 2872 | .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 2644 }, | ||
| 2873 | .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2363 }, | ||
| 2874 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 2644 }, | ||
| 2875 | .{ .char = 'b', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 }, | ||
| 2876 | .{ .char = 'd', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 }, | ||
| 2877 | .{ .char = 'h', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 }, | ||
| 2878 | .{ .char = 'v', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 }, | ||
| 2879 | .{ .char = 'w', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 }, | ||
| 2880 | .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 2697 }, | ||
| 2881 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2701 }, | ||
| 2882 | .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3026 }, | ||
| 2883 | .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 3022 }, | ||
| 2884 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 2650 }, | ||
| 2885 | .{ .char = 'y', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 2650 }, | ||
| 2886 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 3022 }, | ||
| 2887 | .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3027 }, | ||
| 2888 | .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2702 }, | ||
| 2889 | .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2702 }, | ||
| 2890 | .{ .char = 'q', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2702 }, | ||
| 2891 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3028 }, | ||
| 2892 | .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2702 }, | ||
| 2893 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2702 }, | ||
| 2894 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2702 }, | ||
| 2895 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2702 }, | ||
| 2896 | .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2654 }, | ||
| 2897 | .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 2680 }, | ||
| 2898 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3029 }, | ||
| 2899 | .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2702 }, | ||
| 2900 | .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3031 }, | ||
| 2901 | .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3032 }, | ||
| 2902 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3033 }, | ||
| 2903 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3034 }, | ||
| 2904 | .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2702 }, | ||
| 2905 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2702 }, | ||
| 2906 | .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2701 }, | ||
| 2907 | .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3032 }, | ||
| 2908 | .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2652 }, | ||
| 2909 | .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3035 }, | ||
| 2910 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3035 }, | ||
| 2911 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3036 }, | ||
| 2912 | .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2702 }, | ||
| 2913 | .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2702 }, | ||
| 2914 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3037 }, | ||
| 2915 | .{ .char = 'q', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2682 }, | ||
| 2916 | .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2702 }, | ||
| 2917 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2702 }, | ||
| 2918 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3037 }, | ||
| 2919 | .{ .char = 'b', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2702 }, | ||
| 2920 | .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2654 }, | ||
| 2921 | .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 2680 }, | ||
| 2922 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3029 }, | ||
| 2923 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3038 }, | ||
| 2924 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3040 }, | ||
| 2925 | .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3027 }, | ||
| 2926 | .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3027 }, | ||
| 2927 | .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 3041 }, | ||
| 2928 | .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 2701 }, | ||
| 2929 | .{ .char = 'o', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 3042 }, | ||
| 2930 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2701 }, | ||
| 2931 | .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 3043 }, | ||
| 2932 | .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3044 }, | ||
| 2933 | .{ .char = 'b', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 }, | ||
| 2934 | .{ .char = 'd', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 }, | ||
| 2935 | .{ .char = 'h', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 }, | ||
| 2936 | .{ .char = 'w', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 }, | ||
| 2937 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2697 }, | ||
| 2938 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3045 }, | ||
| 2939 | .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 2708 }, | ||
| 2940 | .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 12, .child_index = 3047 }, | ||
| 2941 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 2650 }, | ||
| 2942 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3050 }, | ||
| 2943 | .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 2708 }, | ||
| 2944 | .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3051 }, | ||
| 2945 | .{ .char = 'r', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3052 }, | ||
| 2946 | .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2701 }, | ||
| 2947 | .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2701 }, | ||
| 2948 | .{ .char = 'v', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 }, | ||
| 2949 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 412 }, | ||
| 2950 | .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 3041 }, | ||
| 2951 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3042 }, | ||
| 2952 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2701 }, | ||
| 2953 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 3053 }, | ||
| 2954 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 3056 }, | ||
| 2955 | .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 2697 }, | ||
| 2956 | .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 2701 }, | ||
| 2957 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 2644 }, | ||
| 2958 | .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 16, .child_index = 3057 }, | ||
| 2959 | .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 2644 }, | ||
| 2960 | .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2701 }, | ||
| 2961 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3059 }, | ||
| 2962 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3060 }, | ||
| 2963 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3061 }, | ||
| 2964 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3062 }, | ||
| 2965 | .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3063 }, | ||
| 2966 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2161 }, | ||
| 2967 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3064 }, | ||
| 2968 | .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3065 }, | ||
| 2969 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3066 }, | ||
| 2970 | .{ .char = 't', .end_of_word = true, .end_of_list = true, .number = 3, .child_index = 1485 }, | ||
| 2971 | .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3067 }, | ||
| 2972 | .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3068 }, | ||
| 2973 | .{ .char = 'f', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3069 }, | ||
| 2974 | .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 311 }, | ||
| 2975 | .{ .char = 't', .end_of_word = true, .end_of_list = false, .number = 4, .child_index = 3070 }, | ||
| 2976 | .{ .char = 'z', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 }, | ||
| 2977 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 451 }, | ||
| 2978 | .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 458 }, | ||
| 2979 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 458 }, | ||
| 2980 | .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 3072 }, | ||
| 2981 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3074 }, | ||
| 2982 | .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 3076 }, | ||
| 2983 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3077 }, | ||
| 2984 | .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3078 }, | ||
| 2985 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3079 }, | ||
| 2986 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2747 }, | ||
| 2987 | .{ .char = 's', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 }, | ||
| 2988 | .{ .char = 'c', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 }, | ||
| 2989 | .{ .char = 'm', .end_of_word = true, .end_of_list = false, .number = 2, .child_index = 2751 }, | ||
| 2990 | .{ .char = 'n', .end_of_word = true, .end_of_list = false, .number = 2, .child_index = 2751 }, | ||
| 2991 | .{ .char = 'p', .end_of_word = true, .end_of_list = false, .number = 2, .child_index = 2751 }, | ||
| 2992 | .{ .char = 'z', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 2751 }, | ||
| 2993 | .{ .char = 'q', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3080 }, | ||
| 2994 | .{ .char = 'l', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 2751 }, | ||
| 2995 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3081 }, | ||
| 2996 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3082 }, | ||
| 2997 | .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 3083 }, | ||
| 2998 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 463 }, | ||
| 2999 | .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3084 }, | ||
| 3000 | .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 3086 }, | ||
| 3001 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 585 }, | ||
| 3002 | .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 585 }, | ||
| 3003 | .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3089 }, | ||
| 3004 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3090 }, | ||
| 3005 | .{ .char = 'h', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3092 }, | ||
| 3006 | .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3094 }, | ||
| 3007 | .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3095 }, | ||
| 3008 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 654 }, | ||
| 3009 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3096 }, | ||
| 3010 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3097 }, | ||
| 3011 | .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3097 }, | ||
| 3012 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 654 }, | ||
| 3013 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3098 }, | ||
| 3014 | .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 463 }, | ||
| 3015 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2431 }, | ||
| 3016 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3099 }, | ||
| 3017 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3100 }, | ||
| 3018 | .{ .char = 'p', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 3101 }, | ||
| 3019 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3102 }, | ||
| 3020 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 3103 }, | ||
| 3021 | .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 3104 }, | ||
| 3022 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 3105 }, | ||
| 3023 | .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3106 }, | ||
| 3024 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 3107 }, | ||
| 3025 | .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3108 }, | ||
| 3026 | .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3109 }, | ||
| 3027 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3110 }, | ||
| 3028 | .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 3112 }, | ||
| 3029 | .{ .char = 'o', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 585 }, | ||
| 3030 | .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 664 }, | ||
| 3031 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3115 }, | ||
| 3032 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3116 }, | ||
| 3033 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 1491 }, | ||
| 3034 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 450 }, | ||
| 3035 | .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3117 }, | ||
| 3036 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3118 }, | ||
| 3037 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3119 }, | ||
| 3038 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3120 }, | ||
| 3039 | .{ .char = 'q', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3121 }, | ||
| 3040 | .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3122 }, | ||
| 3041 | .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 3123 }, | ||
| 3042 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3124 }, | ||
| 3043 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3125 }, | ||
| 3044 | .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3126 }, | ||
| 3045 | .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3127 }, | ||
| 3046 | .{ .char = 'v', .end_of_word = false, .end_of_list = false, .number = 5, .child_index = 3128 }, | ||
| 3047 | .{ .char = 'z', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3130 }, | ||
| 3048 | .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3131 }, | ||
| 3049 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3120 }, | ||
| 3050 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3132 }, | ||
| 3051 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3133 }, | ||
| 3052 | .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3130 }, | ||
| 3053 | .{ .char = 'f', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3134 }, | ||
| 3054 | .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 388, .child_index = 3135 }, | ||
| 3055 | .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3126 }, | ||
| 3056 | .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 3147 }, | ||
| 3057 | .{ .char = 'o', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3130 }, | ||
| 3058 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3149 }, | ||
| 3059 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 36, .child_index = 3150 }, | ||
| 3060 | .{ .char = 'b', .end_of_word = false, .end_of_list = false, .number = 15, .child_index = 3152 }, | ||
| 3061 | .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 71, .child_index = 3153 }, | ||
| 3062 | .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 45, .child_index = 3156 }, | ||
| 3063 | .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 7, .child_index = 3157 }, | ||
| 3064 | .{ .char = 'f', .end_of_word = false, .end_of_list = false, .number = 294, .child_index = 3159 }, | ||
| 3065 | .{ .char = 'g', .end_of_word = false, .end_of_list = false, .number = 32, .child_index = 3166 }, | ||
| 3066 | .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 35, .child_index = 3167 }, | ||
| 3067 | .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 81, .child_index = 3168 }, | ||
| 3068 | .{ .char = 'o', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 3173 }, | ||
| 3069 | .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 3174 }, | ||
| 3070 | .{ .char = 'r', .end_of_word = false, .end_of_list = false, .number = 42, .child_index = 3175 }, | ||
| 3071 | .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 163, .child_index = 3181 }, | ||
| 3072 | .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3189 }, | ||
| 3073 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2814 }, | ||
| 3074 | .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3190 }, | ||
| 3075 | .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3191 }, | ||
| 3076 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3190 }, | ||
| 3077 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 3192 }, | ||
| 3078 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3193 }, | ||
| 3079 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3194 }, | ||
| 3080 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3195 }, | ||
| 3081 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3196 }, | ||
| 3082 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3197 }, | ||
| 3083 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 3198 }, | ||
| 3084 | .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 655 }, | ||
| 3085 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3199 }, | ||
| 3086 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3200 }, | ||
| 3087 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3201 }, | ||
| 3088 | .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3202 }, | ||
| 3089 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3203 }, | ||
| 3090 | .{ .char = 'h', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3204 }, | ||
| 3091 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3205 }, | ||
| 3092 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 33, .child_index = 3206 }, | ||
| 3093 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 12, .child_index = 3207 }, | ||
| 3094 | .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3209 }, | ||
| 3095 | .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 3211 }, | ||
| 3096 | .{ .char = 'o', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 3212 }, | ||
| 3097 | .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 3213 }, | ||
| 3098 | .{ .char = 'u', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3214 }, | ||
| 3099 | .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3215 }, | ||
| 3100 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3216 }, | ||
| 3101 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3217 }, | ||
| 3102 | .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3218 }, | ||
| 3103 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3219 }, | ||
| 3104 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3220 }, | ||
| 3105 | .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3221 }, | ||
| 3106 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 10, .child_index = 3222 }, | ||
| 3107 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3223 }, | ||
| 3108 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3224 }, | ||
| 3109 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3225 }, | ||
| 3110 | .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 10, .child_index = 3226 }, | ||
| 3111 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3227 }, | ||
| 3112 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 486 }, | ||
| 3113 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3228 }, | ||
| 3114 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3229 }, | ||
| 3115 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3230 }, | ||
| 3116 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2879 }, | ||
| 3117 | .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3231 }, | ||
| 3118 | .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 457 }, | ||
| 3119 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3232 }, | ||
| 3120 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3233 }, | ||
| 3121 | .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3234 }, | ||
| 3122 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3235 }, | ||
| 3123 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3236 }, | ||
| 3124 | .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3237 }, | ||
| 3125 | .{ .char = 'o', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3238 }, | ||
| 3126 | .{ .char = 'u', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 3239 }, | ||
| 3127 | .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3240 }, | ||
| 3128 | .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 7, .child_index = 3241 }, | ||
| 3129 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 3243 }, | ||
| 3130 | .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3244 }, | ||
| 3131 | .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3245 }, | ||
| 3132 | .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3246 }, | ||
| 3133 | .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1891 }, | ||
| 3134 | .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3247 }, | ||
| 3135 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3248 }, | ||
| 3136 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3250 }, | ||
| 3137 | .{ .char = 'g', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3252 }, | ||
| 3138 | .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2787 }, | ||
| 3139 | .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 5, .child_index = 3253 }, | ||
| 3140 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3254 }, | ||
| 3141 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3255 }, | ||
| 3142 | .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3256 }, | ||
| 3143 | .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3257 }, | ||
| 3144 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3258 }, | ||
| 3145 | .{ .char = 'b', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3259 }, | ||
| 3146 | .{ .char = 'q', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3260 }, | ||
| 3147 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3261 }, | ||
| 3148 | .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3262 }, | ||
| 3149 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3263 }, | ||
| 3150 | .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3264 }, | ||
| 3151 | .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 5, .child_index = 3265 }, | ||
| 3152 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3266 }, | ||
| 3153 | .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 12, .child_index = 3267 }, | ||
| 3154 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 3273 }, | ||
| 3155 | .{ .char = 'b', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3274 }, | ||
| 3156 | .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3275 }, | ||
| 3157 | .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 3276 }, | ||
| 3158 | .{ .char = 'q', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3278 }, | ||
| 3159 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3279 }, | ||
| 3160 | .{ .char = 'b', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3274 }, | ||
| 3161 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3280 }, | ||
| 3162 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3281 }, | ||
| 3163 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 9, .child_index = 3282 }, | ||
| 3164 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3283 }, | ||
| 3165 | .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3284 }, | ||
| 3166 | .{ .char = 'x', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 3101 }, | ||
| 3167 | .{ .char = '1', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 648 }, | ||
| 3168 | .{ .char = '8', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 }, | ||
| 3169 | .{ .char = 'b', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3285 }, | ||
| 3170 | .{ .char = 'd', .end_of_word = true, .end_of_list = false, .number = 2, .child_index = 3287 }, | ||
| 3171 | .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2940 }, | ||
| 3172 | .{ .char = 't', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3285 }, | ||
| 3173 | .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3285 }, | ||
| 3174 | .{ .char = 'd', .end_of_word = true, .end_of_list = false, .number = 2, .child_index = 3287 }, | ||
| 3175 | .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2940 }, | ||
| 3176 | .{ .char = 'd', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 3287 }, | ||
| 3177 | .{ .char = 'b', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3285 }, | ||
| 3178 | .{ .char = 't', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3285 }, | ||
| 3179 | .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3285 }, | ||
| 3180 | .{ .char = '1', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 648 }, | ||
| 3181 | .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2946 }, | ||
| 3182 | .{ .char = '1', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 648 }, | ||
| 3183 | .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3288 }, | ||
| 3184 | .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 238 }, | ||
| 3185 | .{ .char = '8', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 }, | ||
| 3186 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2243 }, | ||
| 3187 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3289 }, | ||
| 3188 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3290 }, | ||
| 3189 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3291 }, | ||
| 3190 | .{ .char = 'h', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3292 }, | ||
| 3191 | .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3293 }, | ||
| 3192 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3294 }, | ||
| 3193 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 291 }, | ||
| 3194 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3295 }, | ||
| 3195 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3296 }, | ||
| 3196 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 581 }, | ||
| 3197 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3297 }, | ||
| 3198 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3298 }, | ||
| 3199 | .{ .char = 'n', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 3299 }, | ||
| 3200 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 25, .child_index = 3300 }, | ||
| 3201 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3301 }, | ||
| 3202 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3302 }, | ||
| 3203 | .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 450 }, | ||
| 3204 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3303 }, | ||
| 3205 | .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 569 }, | ||
| 3206 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3304 }, | ||
| 3207 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3305 }, | ||
| 3208 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 458 }, | ||
| 3209 | .{ .char = 'r', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 3306 }, | ||
| 3210 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2267 }, | ||
| 3211 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3307 }, | ||
| 3212 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2972 }, | ||
| 3213 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3308 }, | ||
| 3214 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3309 }, | ||
| 3215 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3310 }, | ||
| 3216 | .{ .char = 'q', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 3311 }, | ||
| 3217 | .{ .char = 'q', .end_of_word = false, .end_of_list = false, .number = 7, .child_index = 3312 }, | ||
| 3218 | .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 569 }, | ||
| 3219 | .{ .char = 'u', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 3314 }, | ||
| 3220 | .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 569 }, | ||
| 3221 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 519 }, | ||
| 3222 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3316 }, | ||
| 3223 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3317 }, | ||
| 3224 | .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 3318 }, | ||
| 3225 | .{ .char = 'g', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 3320 }, | ||
| 3226 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 3322 }, | ||
| 3227 | .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3323 }, | ||
| 3228 | .{ .char = 'q', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 3324 }, | ||
| 3229 | .{ .char = 'u', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3326 }, | ||
| 3230 | .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3327 }, | ||
| 3231 | .{ .char = 'p', .end_of_word = true, .end_of_list = false, .number = 2, .child_index = 3328 }, | ||
| 3232 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3329 }, | ||
| 3233 | .{ .char = 'd', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 3330 }, | ||
| 3234 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3331 }, | ||
| 3235 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3332 }, | ||
| 3236 | .{ .char = 'b', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 3330 }, | ||
| 3237 | .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3333 }, | ||
| 3238 | .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3334 }, | ||
| 3239 | .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 3336 }, | ||
| 3240 | .{ .char = 'q', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 3338 }, | ||
| 3241 | .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3339 }, | ||
| 3242 | .{ .char = 't', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 3330 }, | ||
| 3243 | .{ .char = 'k', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3340 }, | ||
| 3244 | .{ .char = 'k', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3341 }, | ||
| 3245 | .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 17, .child_index = 3342 }, | ||
| 3246 | .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2985 }, | ||
| 3247 | .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3344 }, | ||
| 3248 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 291 }, | ||
| 3249 | .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3341 }, | ||
| 3250 | .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 451 }, | ||
| 3251 | .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3345 }, | ||
| 3252 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 5, .child_index = 3346 }, | ||
| 3253 | .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3341 }, | ||
| 3254 | .{ .char = 'q', .end_of_word = false, .end_of_list = false, .number = 7, .child_index = 3312 }, | ||
| 3255 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3314 }, | ||
| 3256 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2701 }, | ||
| 3257 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 12, .child_index = 3047 }, | ||
| 3258 | .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 2701 }, | ||
| 3259 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2701 }, | ||
| 3260 | .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 2644 }, | ||
| 3261 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 2644 }, | ||
| 3262 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 568 }, | ||
| 3263 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3347 }, | ||
| 3264 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3349 }, | ||
| 3265 | .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3045 }, | ||
| 3266 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2702 }, | ||
| 3267 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2687 }, | ||
| 3268 | .{ .char = '2', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2702 }, | ||
| 3269 | .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2668 }, | ||
| 3270 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3350 }, | ||
| 3271 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3351 }, | ||
| 3272 | .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2702 }, | ||
| 3273 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2702 }, | ||
| 3274 | .{ .char = 'h', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 }, | ||
| 3275 | .{ .char = 'w', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 }, | ||
| 3276 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3354 }, | ||
| 3277 | .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2701 }, | ||
| 3278 | .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2701 }, | ||
| 3279 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2716 }, | ||
| 3280 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2701 }, | ||
| 3281 | .{ .char = 'd', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 }, | ||
| 3282 | .{ .char = 'w', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 }, | ||
| 3283 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 2701 }, | ||
| 3284 | .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 2701 }, | ||
| 3285 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2701 }, | ||
| 3286 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2712 }, | ||
| 3287 | .{ .char = 'q', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2687 }, | ||
| 3288 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3051 }, | ||
| 3289 | .{ .char = 'b', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 }, | ||
| 3290 | .{ .char = 'h', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 }, | ||
| 3291 | .{ .char = 'w', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 }, | ||
| 3292 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 2644 }, | ||
| 3293 | .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 3022 }, | ||
| 3294 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 3355 }, | ||
| 3295 | .{ .char = 'r', .end_of_word = true, .end_of_list = true, .number = 4, .child_index = 1715 }, | ||
| 3296 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 1987 }, | ||
| 3297 | .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3357 }, | ||
| 3298 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3358 }, | ||
| 3299 | .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3359 }, | ||
| 3300 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3360 }, | ||
| 3301 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3362 }, | ||
| 3302 | .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3363 }, | ||
| 3303 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 463 }, | ||
| 3304 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3364 }, | ||
| 3305 | .{ .char = 'l', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 3365 }, | ||
| 3306 | .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3366 }, | ||
| 3307 | .{ .char = 't', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 }, | ||
| 3308 | .{ .char = 'd', .end_of_word = true, .end_of_list = false, .number = 2, .child_index = 3367 }, | ||
| 3309 | .{ .char = 'w', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 3367 }, | ||
| 3310 | .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2482 }, | ||
| 3311 | .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2482 }, | ||
| 3312 | .{ .char = 'h', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 3368 }, | ||
| 3313 | .{ .char = 'b', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 2751 }, | ||
| 3314 | .{ .char = 's', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 2751 }, | ||
| 3315 | .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3369 }, | ||
| 3316 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3370 }, | ||
| 3317 | .{ .char = 't', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 2751 }, | ||
| 3318 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3371 }, | ||
| 3319 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 3372 }, | ||
| 3320 | .{ .char = '2', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 585 }, | ||
| 3321 | .{ .char = '4', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 585 }, | ||
| 3322 | .{ .char = 'e', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 }, | ||
| 3323 | .{ .char = 'l', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 }, | ||
| 3324 | .{ .char = 's', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 }, | ||
| 3325 | .{ .char = 'u', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 }, | ||
| 3326 | .{ .char = 'b', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3373 }, | ||
| 3327 | .{ .char = 'f', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 3375 }, | ||
| 3328 | .{ .char = 'd', .end_of_word = true, .end_of_list = false, .number = 2, .child_index = 3330 }, | ||
| 3329 | .{ .char = 'w', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 3330 }, | ||
| 3330 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3376 }, | ||
| 3331 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3377 }, | ||
| 3332 | .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3378 }, | ||
| 3333 | .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1352 }, | ||
| 3334 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3379 }, | ||
| 3335 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3084 }, | ||
| 3336 | .{ .char = 'v', .end_of_word = true, .end_of_list = true, .number = 4, .child_index = 3381 }, | ||
| 3337 | .{ .char = 'd', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 }, | ||
| 3338 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3383 }, | ||
| 3339 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 3384 }, | ||
| 3340 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 3385 }, | ||
| 3341 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 3386 }, | ||
| 3342 | .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3387 }, | ||
| 3343 | .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3388 }, | ||
| 3344 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3389 }, | ||
| 3345 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3390 }, | ||
| 3346 | .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 458 }, | ||
| 3347 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 458 }, | ||
| 3348 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 463 }, | ||
| 3349 | .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 457 }, | ||
| 3350 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 655 }, | ||
| 3351 | .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3391 }, | ||
| 3352 | .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3392 }, | ||
| 3353 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2800 }, | ||
| 3354 | .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3393 }, | ||
| 3355 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 238 }, | ||
| 3356 | .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3132 }, | ||
| 3357 | .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3132 }, | ||
| 3358 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3394 }, | ||
| 3359 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 3395 }, | ||
| 3360 | .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3396 }, | ||
| 3361 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3397 }, | ||
| 3362 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3398 }, | ||
| 3363 | .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3399 }, | ||
| 3364 | .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3400 }, | ||
| 3365 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 3401 }, | ||
| 3366 | .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3404 }, | ||
| 3367 | .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3405 }, | ||
| 3368 | .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3406 }, | ||
| 3369 | .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3407 }, | ||
| 3370 | .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3408 }, | ||
| 3371 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 18, .child_index = 3409 }, | ||
| 3372 | .{ .char = 'b', .end_of_word = false, .end_of_list = false, .number = 12, .child_index = 3411 }, | ||
| 3373 | .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 20, .child_index = 3412 }, | ||
| 3374 | .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 3414 }, | ||
| 3375 | .{ .char = 'f', .end_of_word = false, .end_of_list = false, .number = 242, .child_index = 3415 }, | ||
| 3376 | .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 9, .child_index = 3420 }, | ||
| 3377 | .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 12, .child_index = 3421 }, | ||
| 3378 | .{ .char = 'o', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 3423 }, | ||
| 3379 | .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 9, .child_index = 3424 }, | ||
| 3380 | .{ .char = 'r', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 3425 }, | ||
| 3381 | .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 42, .child_index = 3427 }, | ||
| 3382 | .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3431 }, | ||
| 3383 | .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3432 }, | ||
| 3384 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 412 }, | ||
| 3385 | .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3433 }, | ||
| 3386 | .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 30, .child_index = 3434 }, | ||
| 3387 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3435 }, | ||
| 3388 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 15, .child_index = 3436 }, | ||
| 3389 | .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 30, .child_index = 3438 }, | ||
| 3390 | .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3439 }, | ||
| 3391 | .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 40, .child_index = 3440 }, | ||
| 3392 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 45, .child_index = 3441 }, | ||
| 3393 | .{ .char = 'q', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 3442 }, | ||
| 3394 | .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3439 }, | ||
| 3395 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 12, .child_index = 3443 }, | ||
| 3396 | .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 12, .child_index = 3444 }, | ||
| 3397 | .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 12, .child_index = 3445 }, | ||
| 3398 | .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 186, .child_index = 3446 }, | ||
| 3399 | .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 36, .child_index = 3451 }, | ||
| 3400 | .{ .char = 'r', .end_of_word = false, .end_of_list = false, .number = 16, .child_index = 3452 }, | ||
| 3401 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 20, .child_index = 3453 }, | ||
| 3402 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 32, .child_index = 3455 }, | ||
| 3403 | .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 35, .child_index = 3459 }, | ||
| 3404 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 18, .child_index = 3465 }, | ||
| 3405 | .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 18, .child_index = 3466 }, | ||
| 3406 | .{ .char = 'r', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 3467 }, | ||
| 3407 | .{ .char = 'u', .end_of_word = false, .end_of_list = false, .number = 34, .child_index = 3468 }, | ||
| 3408 | .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 3469 }, | ||
| 3409 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3470 }, | ||
| 3410 | .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 3471 }, | ||
| 3411 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3472 }, | ||
| 3412 | .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 3473 }, | ||
| 3413 | .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 24, .child_index = 3474 }, | ||
| 3414 | .{ .char = 'o', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3476 }, | ||
| 3415 | .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 3477 }, | ||
| 3416 | .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3478 }, | ||
| 3417 | .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 24, .child_index = 3479 }, | ||
| 3418 | .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3484 }, | ||
| 3419 | .{ .char = 'f', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 3485 }, | ||
| 3420 | .{ .char = 'h', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3486 }, | ||
| 3421 | .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 24, .child_index = 3487 }, | ||
| 3422 | .{ .char = 'r', .end_of_word = false, .end_of_list = false, .number = 24, .child_index = 3487 }, | ||
| 3423 | .{ .char = 't', .end_of_word = false, .end_of_list = false, .number = 48, .child_index = 3489 }, | ||
| 3424 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 36, .child_index = 3495 }, | ||
| 3425 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3173 }, | ||
| 3426 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3497 }, | ||
| 3427 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3498 }, | ||
| 3428 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 3499 }, | ||
| 3429 | .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3500 }, | ||
| 3430 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3291 }, | ||
| 3431 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3504 }, | ||
| 3432 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3505 }, | ||
| 3433 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3506 }, | ||
| 3434 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 3507 }, | ||
| 3435 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 457 }, | ||
| 3436 | .{ .char = 'f', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 1618 }, | ||
| 3437 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2562 }, | ||
| 3438 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3509 }, | ||
| 3439 | .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2267 }, | ||
| 3440 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2976 }, | ||
| 3441 | .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3510 }, | ||
| 3442 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 33, .child_index = 3511 }, | ||
| 3443 | .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 3512 }, | ||
| 3444 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3512 }, | ||
| 3445 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 463 }, | ||
| 3446 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 457 }, | ||
| 3447 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3513 }, | ||
| 3448 | .{ .char = 'r', .end_of_word = true, .end_of_list = true, .number = 6, .child_index = 1140 }, | ||
| 3449 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3514 }, | ||
| 3450 | .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3209 }, | ||
| 3451 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3212 }, | ||
| 3452 | .{ .char = 'e', .end_of_word = true, .end_of_list = true, .number = 6, .child_index = 1140 }, | ||
| 3453 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3515 }, | ||
| 3454 | .{ .char = 'h', .end_of_word = true, .end_of_list = true, .number = 6, .child_index = 1140 }, | ||
| 3455 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3516 }, | ||
| 3456 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3517 }, | ||
| 3457 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3518 }, | ||
| 3458 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 10, .child_index = 3519 }, | ||
| 3459 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 572 }, | ||
| 3460 | .{ .char = 'E', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3520 }, | ||
| 3461 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3521 }, | ||
| 3462 | .{ .char = 'e', .end_of_word = true, .end_of_list = true, .number = 10, .child_index = 3522 }, | ||
| 3463 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 572 }, | ||
| 3464 | .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3527 }, | ||
| 3465 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3528 }, | ||
| 3466 | .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3529 }, | ||
| 3467 | .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3530 }, | ||
| 3468 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3531 }, | ||
| 3469 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3532 }, | ||
| 3470 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3533 }, | ||
| 3471 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3534 }, | ||
| 3472 | .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3535 }, | ||
| 3473 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3536 }, | ||
| 3474 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 496 }, | ||
| 3475 | .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3537 }, | ||
| 3476 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3538 }, | ||
| 3477 | .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3539 }, | ||
| 3478 | .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3540 }, | ||
| 3479 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 3541 }, | ||
| 3480 | .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3547 }, | ||
| 3481 | .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2477 }, | ||
| 3482 | .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3264 }, | ||
| 3483 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3548 }, | ||
| 3484 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3549 }, | ||
| 3485 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3550 }, | ||
| 3486 | .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 3551 }, | ||
| 3487 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3552 }, | ||
| 3488 | .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3553 }, | ||
| 3489 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 3554 }, | ||
| 3490 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3555 }, | ||
| 3491 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3557 }, | ||
| 3492 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3558 }, | ||
| 3493 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 291 }, | ||
| 3494 | .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3559 }, | ||
| 3495 | .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3561 }, | ||
| 3496 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3562 }, | ||
| 3497 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3563 }, | ||
| 3498 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3564 }, | ||
| 3499 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3565 }, | ||
| 3500 | .{ .char = 'p', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 680 }, | ||
| 3501 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 3566 }, | ||
| 3502 | .{ .char = 'q', .end_of_word = true, .end_of_list = true, .number = 4, .child_index = 3567 }, | ||
| 3503 | .{ .char = 'b', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3569 }, | ||
| 3504 | .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3570 }, | ||
| 3505 | .{ .char = 'g', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3572 }, | ||
| 3506 | .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3573 }, | ||
| 3507 | .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 5, .child_index = 3574 }, | ||
| 3508 | .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3576 }, | ||
| 3509 | .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 3577 }, | ||
| 3510 | .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 572 }, | ||
| 3511 | .{ .char = 'h', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3578 }, | ||
| 3512 | .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3579 }, | ||
| 3513 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 496 }, | ||
| 3514 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3580 }, | ||
| 3515 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3581 }, | ||
| 3516 | .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3579 }, | ||
| 3517 | .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3582 }, | ||
| 3518 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 9, .child_index = 3583 }, | ||
| 3519 | .{ .char = 'T', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3584 }, | ||
| 3520 | .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3585 }, | ||
| 3521 | .{ .char = 'b', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 }, | ||
| 3522 | .{ .char = 't', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 }, | ||
| 3523 | .{ .char = 'x', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 }, | ||
| 3524 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 655 }, | ||
| 3525 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3379 }, | ||
| 3526 | .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3586 }, | ||
| 3527 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3500 }, | ||
| 3528 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3587 }, | ||
| 3529 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3588 }, | ||
| 3530 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3589 }, | ||
| 3531 | .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3590 }, | ||
| 3532 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3591 }, | ||
| 3533 | .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3592 }, | ||
| 3534 | .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3593 }, | ||
| 3535 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3594 }, | ||
| 3536 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 25, .child_index = 3595 }, | ||
| 3537 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3596 }, | ||
| 3538 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3597 }, | ||
| 3539 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3598 }, | ||
| 3540 | .{ .char = 'c', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 3365 }, | ||
| 3541 | .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3599 }, | ||
| 3542 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2594 }, | ||
| 3543 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3600 }, | ||
| 3544 | .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3601 }, | ||
| 3545 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3602 }, | ||
| 3546 | .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3603 }, | ||
| 3547 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 3604 }, | ||
| 3548 | .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 3605 }, | ||
| 3549 | .{ .char = 'h', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3607 }, | ||
| 3550 | .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 3608 }, | ||
| 3551 | .{ .char = 'h', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3611 }, | ||
| 3552 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2712 }, | ||
| 3553 | .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3612 }, | ||
| 3554 | .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3613 }, | ||
| 3555 | .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3614 }, | ||
| 3556 | .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 3616 }, | ||
| 3557 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 3322 }, | ||
| 3558 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 3617 }, | ||
| 3559 | .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3619 }, | ||
| 3560 | .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3620 }, | ||
| 3561 | .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3621 }, | ||
| 3562 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3622 }, | ||
| 3563 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3323 }, | ||
| 3564 | .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 291 }, | ||
| 3565 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3623 }, | ||
| 3566 | .{ .char = 'u', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 }, | ||
| 3567 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3626 }, | ||
| 3568 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 412 }, | ||
| 3569 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 291 }, | ||
| 3570 | .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 656 }, | ||
| 3571 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3619 }, | ||
| 3572 | .{ .char = 'q', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3628 }, | ||
| 3573 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3629 }, | ||
| 3574 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3630 }, | ||
| 3575 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3632 }, | ||
| 3576 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3634 }, | ||
| 3577 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3635 }, | ||
| 3578 | .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 10, .child_index = 3637 }, | ||
| 3579 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 7, .child_index = 3639 }, | ||
| 3580 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3641 }, | ||
| 3581 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3642 }, | ||
| 3582 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 3645 }, | ||
| 3583 | .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 3648 }, | ||
| 3584 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 3648 }, | ||
| 3585 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2702 }, | ||
| 3586 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3649 }, | ||
| 3587 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2702 }, | ||
| 3588 | .{ .char = 'd', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 }, | ||
| 3589 | .{ .char = 'w', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 }, | ||
| 3590 | .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3350 }, | ||
| 3591 | .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 3651 }, | ||
| 3592 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3652 }, | ||
| 3593 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3653 }, | ||
| 3594 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3654 }, | ||
| 3595 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3655 }, | ||
| 3596 | .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3656 }, | ||
| 3597 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3657 }, | ||
| 3598 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3658 }, | ||
| 3599 | .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3659 }, | ||
| 3600 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3660 }, | ||
| 3601 | .{ .char = 'p', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 }, | ||
| 3602 | .{ .char = 't', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 3661 }, | ||
| 3603 | .{ .char = 'z', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 }, | ||
| 3604 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 3662 }, | ||
| 3605 | .{ .char = 'd', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 2751 }, | ||
| 3606 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3663 }, | ||
| 3607 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3664 }, | ||
| 3608 | .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 3665 }, | ||
| 3609 | .{ .char = '0', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 }, | ||
| 3610 | .{ .char = '1', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 }, | ||
| 3611 | .{ .char = 'i', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 }, | ||
| 3612 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 412 }, | ||
| 3613 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3666 }, | ||
| 3614 | .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3668 }, | ||
| 3615 | .{ .char = 'd', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 }, | ||
| 3616 | .{ .char = 'f', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 }, | ||
| 3617 | .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3669 }, | ||
| 3618 | .{ .char = 's', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 3670 }, | ||
| 3619 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3671 }, | ||
| 3620 | .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 3672 }, | ||
| 3621 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 3673 }, | ||
| 3622 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 3674 }, | ||
| 3623 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3675 }, | ||
| 3624 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3676 }, | ||
| 3625 | .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3677 }, | ||
| 3626 | .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3678 }, | ||
| 3627 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3500 }, | ||
| 3628 | .{ .char = 'h', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3391 }, | ||
| 3629 | .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 572 }, | ||
| 3630 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3679 }, | ||
| 3631 | .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 3680 }, | ||
| 3632 | .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3126 }, | ||
| 3633 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3681 }, | ||
| 3634 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3682 }, | ||
| 3635 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3683 }, | ||
| 3636 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3684 }, | ||
| 3637 | .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3686 }, | ||
| 3638 | .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3686 }, | ||
| 3639 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3686 }, | ||
| 3640 | .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3687 }, | ||
| 3641 | .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3688 }, | ||
| 3642 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3689 }, | ||
| 3643 | .{ .char = 'k', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3691 }, | ||
| 3644 | .{ .char = 'h', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3692 }, | ||
| 3645 | .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 12, .child_index = 3693 }, | ||
| 3646 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3694 }, | ||
| 3647 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 12, .child_index = 3695 }, | ||
| 3648 | .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 12, .child_index = 3697 }, | ||
| 3649 | .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 3698 }, | ||
| 3650 | .{ .char = 'q', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3699 }, | ||
| 3651 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 3700 }, | ||
| 3652 | .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 3701 }, | ||
| 3653 | .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 206, .child_index = 3702 }, | ||
| 3654 | .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 18, .child_index = 3707 }, | ||
| 3655 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3708 }, | ||
| 3656 | .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 9, .child_index = 3709 }, | ||
| 3657 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 3710 }, | ||
| 3658 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3711 }, | ||
| 3659 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3712 }, | ||
| 3660 | .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 9, .child_index = 3713 }, | ||
| 3661 | .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3714 }, | ||
| 3662 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3715 }, | ||
| 3663 | .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 3716 }, | ||
| 3664 | .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 12, .child_index = 3717 }, | ||
| 3665 | .{ .char = 'r', .end_of_word = false, .end_of_list = false, .number = 12, .child_index = 3717 }, | ||
| 3666 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 12, .child_index = 3719 }, | ||
| 3667 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3423 }, | ||
| 3668 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3720 }, | ||
| 3669 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3721 }, | ||
| 3670 | .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 30, .child_index = 3722 }, | ||
| 3671 | .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3470 }, | ||
| 3672 | .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 12, .child_index = 3724 }, | ||
| 3673 | .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 3728 }, | ||
| 3674 | .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 30, .child_index = 3722 }, | ||
| 3675 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3729 }, | ||
| 3676 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 40, .child_index = 3730 }, | ||
| 3677 | .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 45, .child_index = 3734 }, | ||
| 3678 | .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3470 }, | ||
| 3679 | .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 12, .child_index = 3736 }, | ||
| 3680 | .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 12, .child_index = 3737 }, | ||
| 3681 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 12, .child_index = 3738 }, | ||
| 3682 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 30, .child_index = 3739 }, | ||
| 3683 | .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 12, .child_index = 3741 }, | ||
| 3684 | .{ .char = 'k', .end_of_word = false, .end_of_list = false, .number = 114, .child_index = 3742 }, | ||
| 3685 | .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 18, .child_index = 3746 }, | ||
| 3686 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 12, .child_index = 3747 }, | ||
| 3687 | .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 36, .child_index = 3748 }, | ||
| 3688 | .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 16, .child_index = 3750 }, | ||
| 3689 | .{ .char = 'q', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 3752 }, | ||
| 3690 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 16, .child_index = 3753 }, | ||
| 3691 | .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 3755 }, | ||
| 3692 | .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 16, .child_index = 3756 }, | ||
| 3693 | .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 3758 }, | ||
| 3694 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 3759 }, | ||
| 3695 | .{ .char = '2', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 3761 }, | ||
| 3696 | .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3762 }, | ||
| 3697 | .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 16, .child_index = 3763 }, | ||
| 3698 | .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3766 }, | ||
| 3699 | .{ .char = 'u', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 3767 }, | ||
| 3700 | .{ .char = 'z', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 3728 }, | ||
| 3701 | .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 18, .child_index = 3770 }, | ||
| 3702 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 18, .child_index = 3770 }, | ||
| 3703 | .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 3771 }, | ||
| 3704 | .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 34, .child_index = 3773 }, | ||
| 3705 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 3775 }, | ||
| 3706 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3776 }, | ||
| 3707 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 3777 }, | ||
| 3708 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3778 }, | ||
| 3709 | .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3779 }, | ||
| 3710 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 12, .child_index = 3781 }, | ||
| 3711 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 12, .child_index = 3782 }, | ||
| 3712 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3783 }, | ||
| 3713 | .{ .char = 'q', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 3784 }, | ||
| 3714 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3476 }, | ||
| 3715 | .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3785 }, | ||
| 3716 | .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 3786 }, | ||
| 3717 | .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 3789 }, | ||
| 3718 | .{ .char = 'o', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3790 }, | ||
| 3719 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 3786 }, | ||
| 3720 | .{ .char = 'q', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3791 }, | ||
| 3721 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 3792 }, | ||
| 3722 | .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3793 }, | ||
| 3723 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 18, .child_index = 3794 }, | ||
| 3724 | .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3796 }, | ||
| 3725 | .{ .char = '2', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 3797 }, | ||
| 3726 | .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3798 }, | ||
| 3727 | .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 16, .child_index = 3799 }, | ||
| 3728 | .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 3803 }, | ||
| 3729 | .{ .char = 'o', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3804 }, | ||
| 3730 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 16, .child_index = 3799 }, | ||
| 3731 | .{ .char = 'b', .end_of_word = false, .end_of_list = false, .number = 30, .child_index = 3722 }, | ||
| 3732 | .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3805 }, | ||
| 3733 | .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3807 }, | ||
| 3734 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3809 }, | ||
| 3735 | .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 3810 }, | ||
| 3736 | .{ .char = '1', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 648 }, | ||
| 3737 | .{ .char = '3', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2235 }, | ||
| 3738 | .{ .char = '6', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 649 }, | ||
| 3739 | .{ .char = '8', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 }, | ||
| 3740 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3811 }, | ||
| 3741 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3814 }, | ||
| 3742 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3815 }, | ||
| 3743 | .{ .char = 'i', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 }, | ||
| 3744 | .{ .char = 'l', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 549 }, | ||
| 3745 | .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2267 }, | ||
| 3746 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3818 }, | ||
| 3747 | .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 33, .child_index = 3819 }, | ||
| 3748 | .{ .char = 'd', .end_of_word = true, .end_of_list = true, .number = 6, .child_index = 1140 }, | ||
| 3749 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3512 }, | ||
| 3750 | .{ .char = 'b', .end_of_word = true, .end_of_list = true, .number = 6, .child_index = 1140 }, | ||
| 3751 | .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3820 }, | ||
| 3752 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3821 }, | ||
| 3753 | .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 323 }, | ||
| 3754 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1652 }, | ||
| 3755 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 10, .child_index = 3822 }, | ||
| 3756 | .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3823 }, | ||
| 3757 | .{ .char = 't', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 2944 }, | ||
| 3758 | .{ .char = '1', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 648 }, | ||
| 3759 | .{ .char = '8', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 }, | ||
| 3760 | .{ .char = 'A', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 3824 }, | ||
| 3761 | .{ .char = 'P', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2966 }, | ||
| 3762 | .{ .char = 'S', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 3825 }, | ||
| 3763 | .{ .char = 'M', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3826 }, | ||
| 3764 | .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3827 }, | ||
| 3765 | .{ .char = 'h', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 521 }, | ||
| 3766 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2431 }, | ||
| 3767 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3828 }, | ||
| 3768 | .{ .char = 'h', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3829 }, | ||
| 3769 | .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3830 }, | ||
| 3770 | .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3831 }, | ||
| 3771 | .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3832 }, | ||
| 3772 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3833 }, | ||
| 3773 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3834 }, | ||
| 3774 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3838 }, | ||
| 3775 | .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3839 }, | ||
| 3776 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3840 }, | ||
| 3777 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3842 }, | ||
| 3778 | .{ .char = 'b', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3843 }, | ||
| 3779 | .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3844 }, | ||
| 3780 | .{ .char = 'f', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 3845 }, | ||
| 3781 | .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3847 }, | ||
| 3782 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3848 }, | ||
| 3783 | .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3849 }, | ||
| 3784 | .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3850 }, | ||
| 3785 | .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3580 }, | ||
| 3786 | .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3851 }, | ||
| 3787 | .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 3852 }, | ||
| 3788 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3853 }, | ||
| 3789 | .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3854 }, | ||
| 3790 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 3855 }, | ||
| 3791 | .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3856 }, | ||
| 3792 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2854 }, | ||
| 3793 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3857 }, | ||
| 3794 | .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3264 }, | ||
| 3795 | .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3858 }, | ||
| 3796 | .{ .char = 'f', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 }, | ||
| 3797 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3859 }, | ||
| 3798 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3860 }, | ||
| 3799 | .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3861 }, | ||
| 3800 | .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3862 }, | ||
| 3801 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3863 }, | ||
| 3802 | .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 3864 }, | ||
| 3803 | .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3867 }, | ||
| 3804 | .{ .char = 'f', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 }, | ||
| 3805 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3868 }, | ||
| 3806 | .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3869 }, | ||
| 3807 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3870 }, | ||
| 3808 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3871 }, | ||
| 3809 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3870 }, | ||
| 3810 | .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 3872 }, | ||
| 3811 | .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3874 }, | ||
| 3812 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3875 }, | ||
| 3813 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 3876 }, | ||
| 3814 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3878 }, | ||
| 3815 | .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3879 }, | ||
| 3816 | .{ .char = 't', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 680 }, | ||
| 3817 | .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3880 }, | ||
| 3818 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3881 }, | ||
| 3819 | .{ .char = 'k', .end_of_word = false, .end_of_list = true, .number = 9, .child_index = 3882 }, | ||
| 3820 | .{ .char = 'T', .end_of_word = true, .end_of_list = true, .number = 4, .child_index = 3884 }, | ||
| 3821 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3886 }, | ||
| 3822 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3887 }, | ||
| 3823 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3888 }, | ||
| 3824 | .{ .char = 'z', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3889 }, | ||
| 3825 | .{ .char = 'y', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3890 }, | ||
| 3826 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 664 }, | ||
| 3827 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 344 }, | ||
| 3828 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3891 }, | ||
| 3829 | .{ .char = 'j', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3892 }, | ||
| 3830 | .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3893 }, | ||
| 3831 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 25, .child_index = 3894 }, | ||
| 3832 | .{ .char = 'h', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3895 }, | ||
| 3833 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3600 }, | ||
| 3834 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3896 }, | ||
| 3835 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3897 }, | ||
| 3836 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 579 }, | ||
| 3837 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3898 }, | ||
| 3838 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2168 }, | ||
| 3839 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3899 }, | ||
| 3840 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 3900 }, | ||
| 3841 | .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 656 }, | ||
| 3842 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3901 }, | ||
| 3843 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3902 }, | ||
| 3844 | .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 656 }, | ||
| 3845 | .{ .char = 'q', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 412 }, | ||
| 3846 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3341 }, | ||
| 3847 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3905 }, | ||
| 3848 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2490 }, | ||
| 3849 | .{ .char = 'q', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3619 }, | ||
| 3850 | .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3619 }, | ||
| 3851 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3619 }, | ||
| 3852 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 3322 }, | ||
| 3853 | .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3907 }, | ||
| 3854 | .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3908 }, | ||
| 3855 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 578 }, | ||
| 3856 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3910 }, | ||
| 3857 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3912 }, | ||
| 3858 | .{ .char = 'h', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3913 }, | ||
| 3859 | .{ .char = 'r', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3914 }, | ||
| 3860 | .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3916 }, | ||
| 3861 | .{ .char = 'w', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 }, | ||
| 3862 | .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3917 }, | ||
| 3863 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3918 }, | ||
| 3864 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3919 }, | ||
| 3865 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3920 }, | ||
| 3866 | .{ .char = 'r', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3921 }, | ||
| 3867 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3901 }, | ||
| 3868 | .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3323 }, | ||
| 3869 | .{ .char = 'q', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3922 }, | ||
| 3870 | .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3619 }, | ||
| 3871 | .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 656 }, | ||
| 3872 | .{ .char = 'q', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 412 }, | ||
| 3873 | .{ .char = 'q', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 3923 }, | ||
| 3874 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3925 }, | ||
| 3875 | .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 3926 }, | ||
| 3876 | .{ .char = 'q', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3928 }, | ||
| 3877 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3930 }, | ||
| 3878 | .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 656 }, | ||
| 3879 | .{ .char = 'q', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 412 }, | ||
| 3880 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3901 }, | ||
| 3881 | .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 656 }, | ||
| 3882 | .{ .char = 'q', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 412 }, | ||
| 3883 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 3900 }, | ||
| 3884 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 3931 }, | ||
| 3885 | .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2702 }, | ||
| 3886 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2702 }, | ||
| 3887 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3934 }, | ||
| 3888 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3935 }, | ||
| 3889 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3936 }, | ||
| 3890 | .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3937 }, | ||
| 3891 | .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3938 }, | ||
| 3892 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3939 }, | ||
| 3893 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2431 }, | ||
| 3894 | .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3940 }, | ||
| 3895 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3941 }, | ||
| 3896 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3942 }, | ||
| 3897 | .{ .char = 't', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 }, | ||
| 3898 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 3943 }, | ||
| 3899 | .{ .char = 'e', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 2751 }, | ||
| 3900 | .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3944 }, | ||
| 3901 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 3945 }, | ||
| 3902 | .{ .char = '4', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 }, | ||
| 3903 | .{ .char = '8', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 }, | ||
| 3904 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3946 }, | ||
| 3905 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3947 }, | ||
| 3906 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3669 }, | ||
| 3907 | .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3948 }, | ||
| 3908 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 3949 }, | ||
| 3909 | .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 3950 }, | ||
| 3910 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 3951 }, | ||
| 3911 | .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3952 }, | ||
| 3912 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3953 }, | ||
| 3913 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3955 }, | ||
| 3914 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3956 }, | ||
| 3915 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3957 }, | ||
| 3916 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 3958 }, | ||
| 3917 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3961 }, | ||
| 3918 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1166 }, | ||
| 3919 | .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3962 }, | ||
| 3920 | .{ .char = 'M', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3963 }, | ||
| 3921 | .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3964 }, | ||
| 3922 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3965 }, | ||
| 3923 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3966 }, | ||
| 3924 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3967 }, | ||
| 3925 | .{ .char = 'M', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3969 }, | ||
| 3926 | .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3970 }, | ||
| 3927 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3971 }, | ||
| 3928 | .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3972 }, | ||
| 3929 | .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 12, .child_index = 3974 }, | ||
| 3930 | .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3712 }, | ||
| 3931 | .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 3976 }, | ||
| 3932 | .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 9, .child_index = 3977 }, | ||
| 3933 | .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 12, .child_index = 3974 }, | ||
| 3934 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 3980 }, | ||
| 3935 | .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3712 }, | ||
| 3936 | .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3694 }, | ||
| 3937 | .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3982 }, | ||
| 3938 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 15, .child_index = 3983 }, | ||
| 3939 | .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 3985 }, | ||
| 3940 | .{ .char = 'k', .end_of_word = false, .end_of_list = false, .number = 170, .child_index = 3986 }, | ||
| 3941 | .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 9, .child_index = 3989 }, | ||
| 3942 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3990 }, | ||
| 3943 | .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 18, .child_index = 3991 }, | ||
| 3944 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3993 }, | ||
| 3945 | .{ .char = 'z', .end_of_word = false, .end_of_list = true, .number = 9, .child_index = 3977 }, | ||
| 3946 | .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3994 }, | ||
| 3947 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3994 }, | ||
| 3948 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3995 }, | ||
| 3949 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 9, .child_index = 3996 }, | ||
| 3950 | .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3997 }, | ||
| 3951 | .{ .char = 'q', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3998 }, | ||
| 3952 | .{ .char = 'q', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3999 }, | ||
| 3953 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 4002 }, | ||
| 3954 | .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4002 }, | ||
| 3955 | .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 12, .child_index = 3974 }, | ||
| 3956 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4003 }, | ||
| 3957 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4005 }, | ||
| 3958 | .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 18, .child_index = 4006 }, | ||
| 3959 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 12, .child_index = 4008 }, | ||
| 3960 | .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 4010 }, | ||
| 3961 | .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 4010 }, | ||
| 3962 | .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 4010 }, | ||
| 3963 | .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4010 }, | ||
| 3964 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4011 }, | ||
| 3965 | .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4012 }, | ||
| 3966 | .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 4013 }, | ||
| 3967 | .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 4016 }, | ||
| 3968 | .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 4017 }, | ||
| 3969 | .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 24, .child_index = 4019 }, | ||
| 3970 | .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 27, .child_index = 4021 }, | ||
| 3971 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 18, .child_index = 4023 }, | ||
| 3972 | .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 12, .child_index = 4025 }, | ||
| 3973 | .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 12, .child_index = 4025 }, | ||
| 3974 | .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 12, .child_index = 4025 }, | ||
| 3975 | .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 18, .child_index = 4027 }, | ||
| 3976 | .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 12, .child_index = 4025 }, | ||
| 3977 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 12, .child_index = 4025 }, | ||
| 3978 | .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 28, .child_index = 4029 }, | ||
| 3979 | .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 30, .child_index = 4033 }, | ||
| 3980 | .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 28, .child_index = 4029 }, | ||
| 3981 | .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 28, .child_index = 4029 }, | ||
| 3982 | .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 18, .child_index = 4027 }, | ||
| 3983 | .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 12, .child_index = 4025 }, | ||
| 3984 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 18, .child_index = 4038 }, | ||
| 3985 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 18, .child_index = 3746 }, | ||
| 3986 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 4039 }, | ||
| 3987 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 4040 }, | ||
| 3988 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4041 }, | ||
| 3989 | .{ .char = 'b', .end_of_word = false, .end_of_list = false, .number = 12, .child_index = 4025 }, | ||
| 3990 | .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4042 }, | ||
| 3991 | .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4044 }, | ||
| 3992 | .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 4045 }, | ||
| 3993 | .{ .char = 'z', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 4045 }, | ||
| 3994 | .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4046 }, | ||
| 3995 | .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 3755 }, | ||
| 3996 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3758 }, | ||
| 3997 | .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4047 }, | ||
| 3998 | .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4049 }, | ||
| 3999 | .{ .char = '2', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 4050 }, | ||
| 4000 | .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 4051 }, | ||
| 4001 | .{ .char = 'z', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4051 }, | ||
| 4002 | .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4052 }, | ||
| 4003 | .{ .char = '2', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 3761 }, | ||
| 4004 | .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3762 }, | ||
| 4005 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3766 }, | ||
| 4006 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 18, .child_index = 4006 }, | ||
| 4007 | .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 4053 }, | ||
| 4008 | .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4054 }, | ||
| 4009 | .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 22, .child_index = 4055 }, | ||
| 4010 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 12, .child_index = 4008 }, | ||
| 4011 | .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4057 }, | ||
| 4012 | .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4058 }, | ||
| 4013 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 3728 }, | ||
| 4014 | .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3783 }, | ||
| 4015 | .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3997 }, | ||
| 4016 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3997 }, | ||
| 4017 | .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 12, .child_index = 4060 }, | ||
| 4018 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 12, .child_index = 4060 }, | ||
| 4019 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4061 }, | ||
| 4020 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 4062 }, | ||
| 4021 | .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3798 }, | ||
| 4022 | .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3785 }, | ||
| 4023 | .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 3789 }, | ||
| 4024 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3790 }, | ||
| 4025 | .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4063 }, | ||
| 4026 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4065 }, | ||
| 4027 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4066 }, | ||
| 4028 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4067 }, | ||
| 4029 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4068 }, | ||
| 4030 | .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 3796 }, | ||
| 4031 | .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 12, .child_index = 4069 }, | ||
| 4032 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4071 }, | ||
| 4033 | .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 4072 }, | ||
| 4034 | .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4075 }, | ||
| 4035 | .{ .char = '2', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 3797 }, | ||
| 4036 | .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3798 }, | ||
| 4037 | .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 3803 }, | ||
| 4038 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3804 }, | ||
| 4039 | .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4076 }, | ||
| 4040 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4078 }, | ||
| 4041 | .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3783 }, | ||
| 4042 | .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4079 }, | ||
| 4043 | .{ .char = '3', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2235 }, | ||
| 4044 | .{ .char = '6', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 649 }, | ||
| 4045 | .{ .char = 'y', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4081 }, | ||
| 4046 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 4082 }, | ||
| 4047 | .{ .char = 'f', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 }, | ||
| 4048 | .{ .char = 'i', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 }, | ||
| 4049 | .{ .char = 'l', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 549 }, | ||
| 4050 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1352 }, | ||
| 4051 | .{ .char = 'i', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 }, | ||
| 4052 | .{ .char = 'l', .end_of_word = true, .end_of_list = false, .number = 2, .child_index = 549 }, | ||
| 4053 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 3507 }, | ||
| 4054 | .{ .char = 'z', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3289 }, | ||
| 4055 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 33, .child_index = 4084 }, | ||
| 4056 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4092 }, | ||
| 4057 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4093 }, | ||
| 4058 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 10, .child_index = 4094 }, | ||
| 4059 | .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4095 }, | ||
| 4060 | .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1661 }, | ||
| 4061 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 2544 }, | ||
| 4062 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4096 }, | ||
| 4063 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4097 }, | ||
| 4064 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4098 }, | ||
| 4065 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4099 }, | ||
| 4066 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4100 }, | ||
| 4067 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4101 }, | ||
| 4068 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4102 }, | ||
| 4069 | .{ .char = 's', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 680 }, | ||
| 4070 | .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 458 }, | ||
| 4071 | .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 568 }, | ||
| 4072 | .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 569 }, | ||
| 4073 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 569 }, | ||
| 4074 | .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4103 }, | ||
| 4075 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4104 }, | ||
| 4076 | .{ .char = 'f', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 4105 }, | ||
| 4077 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4107 }, | ||
| 4078 | .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2602 }, | ||
| 4079 | .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3847 }, | ||
| 4080 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4108 }, | ||
| 4081 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 4109 }, | ||
| 4082 | .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4110 }, | ||
| 4083 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4112 }, | ||
| 4084 | .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4113 }, | ||
| 4085 | .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 654 }, | ||
| 4086 | .{ .char = '3', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 496 }, | ||
| 4087 | .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4114 }, | ||
| 4088 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4115 }, | ||
| 4089 | .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4116 }, | ||
| 4090 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4117 }, | ||
| 4091 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 4118 }, | ||
| 4092 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4119 }, | ||
| 4093 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4120 }, | ||
| 4094 | .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4121 }, | ||
| 4095 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4122 }, | ||
| 4096 | .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4123 }, | ||
| 4097 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4124 }, | ||
| 4098 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4125 }, | ||
| 4099 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4126 }, | ||
| 4100 | .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 4127 }, | ||
| 4101 | .{ .char = 'f', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 4128 }, | ||
| 4102 | .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4129 }, | ||
| 4103 | .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4130 }, | ||
| 4104 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4131 }, | ||
| 4105 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4132 }, | ||
| 4106 | .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4133 }, | ||
| 4107 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4134 }, | ||
| 4108 | .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 4136 }, | ||
| 4109 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4137 }, | ||
| 4110 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4139 }, | ||
| 4111 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4140 }, | ||
| 4112 | .{ .char = 'h', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 4141 }, | ||
| 4113 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2931 }, | ||
| 4114 | .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4142 }, | ||
| 4115 | .{ .char = 'p', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 549 }, | ||
| 4116 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4143 }, | ||
| 4117 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4144 }, | ||
| 4118 | .{ .char = 'g', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 4145 }, | ||
| 4119 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4146 }, | ||
| 4120 | .{ .char = 'A', .end_of_word = true, .end_of_list = false, .number = 2, .child_index = 4147 }, | ||
| 4121 | .{ .char = 'T', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 }, | ||
| 4122 | .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 585 }, | ||
| 4123 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4148 }, | ||
| 4124 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4149 }, | ||
| 4125 | .{ .char = 'e', .end_of_word = true, .end_of_list = true, .number = 4, .child_index = 4150 }, | ||
| 4126 | .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 572 }, | ||
| 4127 | .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4152 }, | ||
| 4128 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1789 }, | ||
| 4129 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4153 }, | ||
| 4130 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 25, .child_index = 4154 }, | ||
| 4131 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4166 }, | ||
| 4132 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4167 }, | ||
| 4133 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4168 }, | ||
| 4134 | .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4169 }, | ||
| 4135 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 572 }, | ||
| 4136 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4170 }, | ||
| 4137 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4173 }, | ||
| 4138 | .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 656 }, | ||
| 4139 | .{ .char = 'r', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3901 }, | ||
| 4140 | .{ .char = 'w', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 }, | ||
| 4141 | .{ .char = 'q', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 412 }, | ||
| 4142 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4175 }, | ||
| 4143 | .{ .char = 'q', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4175 }, | ||
| 4144 | .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 4175 }, | ||
| 4145 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4175 }, | ||
| 4146 | .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3323 }, | ||
| 4147 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4176 }, | ||
| 4148 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4177 }, | ||
| 4149 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4179 }, | ||
| 4150 | .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2431 }, | ||
| 4151 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4180 }, | ||
| 4152 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 656 }, | ||
| 4153 | .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4181 }, | ||
| 4154 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3917 }, | ||
| 4155 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3918 }, | ||
| 4156 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4182 }, | ||
| 4157 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3901 }, | ||
| 4158 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4183 }, | ||
| 4159 | .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3917 }, | ||
| 4160 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3925 }, | ||
| 4161 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4184 }, | ||
| 4162 | .{ .char = 'q', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 4185 }, | ||
| 4163 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4186 }, | ||
| 4164 | .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 4187 }, | ||
| 4165 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4190 }, | ||
| 4166 | .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4175 }, | ||
| 4167 | .{ .char = 'd', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 }, | ||
| 4168 | .{ .char = 'h', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 }, | ||
| 4169 | .{ .char = 'w', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 }, | ||
| 4170 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2701 }, | ||
| 4171 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2701 }, | ||
| 4172 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4191 }, | ||
| 4173 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4192 }, | ||
| 4174 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4194 }, | ||
| 4175 | .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4195 }, | ||
| 4176 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4196 }, | ||
| 4177 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3118 }, | ||
| 4178 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4197 }, | ||
| 4179 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 4198 }, | ||
| 4180 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4199 }, | ||
| 4181 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4200 }, | ||
| 4182 | .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3379 }, | ||
| 4183 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3230 }, | ||
| 4184 | .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4203 }, | ||
| 4185 | .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 4204 }, | ||
| 4186 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 4205 }, | ||
| 4187 | .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4206 }, | ||
| 4188 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4207 }, | ||
| 4189 | .{ .char = 'g', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 4208 }, | ||
| 4190 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4209 }, | ||
| 4191 | .{ .char = 'q', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4210 }, | ||
| 4192 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3597 }, | ||
| 4193 | .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3961 }, | ||
| 4194 | .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 4211 }, | ||
| 4195 | .{ .char = 'i', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 }, | ||
| 4196 | .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4211 }, | ||
| 4197 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4212 }, | ||
| 4198 | .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1166 }, | ||
| 4199 | .{ .char = 'M', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1166 }, | ||
| 4200 | .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1166 }, | ||
| 4201 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4213 }, | ||
| 4202 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4214 }, | ||
| 4203 | .{ .char = 'M', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 4215 }, | ||
| 4204 | .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 654 }, | ||
| 4205 | .{ .char = 'M', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4215 }, | ||
| 4206 | .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 654 }, | ||
| 4207 | .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4216 }, | ||
| 4208 | .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 4217 }, | ||
| 4209 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4218 }, | ||
| 4210 | .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 3712 }, | ||
| 4211 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3712 }, | ||
| 4212 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4219 }, | ||
| 4213 | .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 4220 }, | ||
| 4214 | .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 4221 }, | ||
| 4215 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4222 }, | ||
| 4216 | .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 4223 }, | ||
| 4217 | .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4224 }, | ||
| 4218 | .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3712 }, | ||
| 4219 | .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 9, .child_index = 4225 }, | ||
| 4220 | .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3712 }, | ||
| 4221 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3712 }, | ||
| 4222 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 4226 }, | ||
| 4223 | .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 84, .child_index = 4228 }, | ||
| 4224 | .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 84, .child_index = 4228 }, | ||
| 4225 | .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 9, .child_index = 4225 }, | ||
| 4226 | .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3712 }, | ||
| 4227 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 9, .child_index = 4233 }, | ||
| 4228 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 9, .child_index = 3989 }, | ||
| 4229 | .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3712 }, | ||
| 4230 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3712 }, | ||
| 4231 | .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4234 }, | ||
| 4232 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 9, .child_index = 3977 }, | ||
| 4233 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4236 }, | ||
| 4234 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4237 }, | ||
| 4235 | .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 4066 }, | ||
| 4236 | .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 4238 }, | ||
| 4237 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4239 }, | ||
| 4238 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4240 }, | ||
| 4239 | .{ .char = 'M', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 344 }, | ||
| 4240 | .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 344 }, | ||
| 4241 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3682 }, | ||
| 4242 | .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 3470 }, | ||
| 4243 | .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 12, .child_index = 4241 }, | ||
| 4244 | .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 3470 }, | ||
| 4245 | .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3470 }, | ||
| 4246 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4243 }, | ||
| 4247 | .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4244 }, | ||
| 4248 | .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4245 }, | ||
| 4249 | .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3997 }, | ||
| 4250 | .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3997 }, | ||
| 4251 | .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3997 }, | ||
| 4252 | .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4246 }, | ||
| 4253 | .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3997 }, | ||
| 4254 | .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3997 }, | ||
| 4255 | .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 12, .child_index = 4248 }, | ||
| 4256 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 12, .child_index = 4248 }, | ||
| 4257 | .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 9, .child_index = 4250 }, | ||
| 4258 | .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 18, .child_index = 4251 }, | ||
| 4259 | .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 9, .child_index = 4250 }, | ||
| 4260 | .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 9, .child_index = 4250 }, | ||
| 4261 | .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 3470 }, | ||
| 4262 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3470 }, | ||
| 4263 | .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 9, .child_index = 4253 }, | ||
| 4264 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 9, .child_index = 4253 }, | ||
| 4265 | .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 4254 }, | ||
| 4266 | .{ .char = 'g', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 4255 }, | ||
| 4267 | .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 4255 }, | ||
| 4268 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 4257 }, | ||
| 4269 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 4260 }, | ||
| 4270 | .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 4254 }, | ||
| 4271 | .{ .char = 'g', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 4255 }, | ||
| 4272 | .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 4255 }, | ||
| 4273 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 4257 }, | ||
| 4274 | .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 18, .child_index = 4027 }, | ||
| 4275 | .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 4262 }, | ||
| 4276 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 4262 }, | ||
| 4277 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3779 }, | ||
| 4278 | .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3783 }, | ||
| 4279 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3783 }, | ||
| 4280 | .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4264 }, | ||
| 4281 | .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 3759 }, | ||
| 4282 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3755 }, | ||
| 4283 | .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3762 }, | ||
| 4284 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3766 }, | ||
| 4285 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4265 }, | ||
| 4286 | .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 4266 }, | ||
| 4287 | .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4047 }, | ||
| 4288 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3762 }, | ||
| 4289 | .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4268 }, | ||
| 4290 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4270 }, | ||
| 4291 | .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 10, .child_index = 4271 }, | ||
| 4292 | .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 12, .child_index = 4241 }, | ||
| 4293 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4244 }, | ||
| 4294 | .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 4244 }, | ||
| 4295 | .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4244 }, | ||
| 4296 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 12, .child_index = 4273 }, | ||
| 4297 | .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4275 }, | ||
| 4298 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 4276 }, | ||
| 4299 | .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3785 }, | ||
| 4300 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3790 }, | ||
| 4301 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3785 }, | ||
| 4302 | .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4278 }, | ||
| 4303 | .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4280 }, | ||
| 4304 | .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4281 }, | ||
| 4305 | .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 4282 }, | ||
| 4306 | .{ .char = 'z', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4282 }, | ||
| 4307 | .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4283 }, | ||
| 4308 | .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3798 }, | ||
| 4309 | .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 3803 }, | ||
| 4310 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3804 }, | ||
| 4311 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4284 }, | ||
| 4312 | .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3798 }, | ||
| 4313 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3804 }, | ||
| 4314 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3798 }, | ||
| 4315 | .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 4285 }, | ||
| 4316 | .{ .char = 'z', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4285 }, | ||
| 4317 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4286 }, | ||
| 4318 | .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 4288 }, | ||
| 4319 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4288 }, | ||
| 4320 | .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 4289 }, | ||
| 4321 | .{ .char = 'g', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 4291 }, | ||
| 4322 | .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 4292 }, | ||
| 4323 | .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 10, .child_index = 4293 }, | ||
| 4324 | .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 4297 }, | ||
| 4325 | .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 4298 }, | ||
| 4326 | .{ .char = 't', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 4299 }, | ||
| 4327 | .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4300 }, | ||
| 4328 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4301 }, | ||
| 4329 | .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4302 }, | ||
| 4330 | .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 10, .child_index = 4303 }, | ||
| 4331 | .{ .char = 'h', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4305 }, | ||
| 4332 | .{ .char = 'k', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4306 }, | ||
| 4333 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4307 }, | ||
| 4334 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4308 }, | ||
| 4335 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4309 }, | ||
| 4336 | .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4310 }, | ||
| 4337 | .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4312 }, | ||
| 4338 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4313 }, | ||
| 4339 | .{ .char = 'k', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4314 }, | ||
| 4340 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4317 }, | ||
| 4341 | .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 4318 }, | ||
| 4342 | .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4319 }, | ||
| 4343 | .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4320 }, | ||
| 4344 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 405 }, | ||
| 4345 | .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4321 }, | ||
| 4346 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 4322 }, | ||
| 4347 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 459 }, | ||
| 4348 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4323 }, | ||
| 4349 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4324 }, | ||
| 4350 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4325 }, | ||
| 4351 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4327 }, | ||
| 4352 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4328 }, | ||
| 4353 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4329 }, | ||
| 4354 | .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 4330 }, | ||
| 4355 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4331 }, | ||
| 4356 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4332 }, | ||
| 4357 | .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4333 }, | ||
| 4358 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4334 }, | ||
| 4359 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4336 }, | ||
| 4360 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2243 }, | ||
| 4361 | .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4338 }, | ||
| 4362 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4339 }, | ||
| 4363 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4340 }, | ||
| 4364 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4341 }, | ||
| 4365 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3899 }, | ||
| 4366 | .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4342 }, | ||
| 4367 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4343 }, | ||
| 4368 | .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4344 }, | ||
| 4369 | .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4345 }, | ||
| 4370 | .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 569 }, | ||
| 4371 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4346 }, | ||
| 4372 | .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4347 }, | ||
| 4373 | .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 4348 }, | ||
| 4374 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4346 }, | ||
| 4375 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 291 }, | ||
| 4376 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4349 }, | ||
| 4377 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3861 }, | ||
| 4378 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4350 }, | ||
| 4379 | .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4352 }, | ||
| 4380 | .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3569 }, | ||
| 4381 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4353 }, | ||
| 4382 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4354 }, | ||
| 4383 | .{ .char = 'T', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 }, | ||
| 4384 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4355 }, | ||
| 4385 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4356 }, | ||
| 4386 | .{ .char = 'f', .end_of_word = true, .end_of_list = false, .number = 2, .child_index = 2944 }, | ||
| 4387 | .{ .char = 'l', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 }, | ||
| 4388 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4357 }, | ||
| 4389 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4358 }, | ||
| 4390 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 4359 }, | ||
| 4391 | .{ .char = 'b', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 4361 }, | ||
| 4392 | .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 4362 }, | ||
| 4393 | .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 4365 }, | ||
| 4394 | .{ .char = 'f', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 4366 }, | ||
| 4395 | .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 4368 }, | ||
| 4396 | .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3209 }, | ||
| 4397 | .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 4369 }, | ||
| 4398 | .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3530 }, | ||
| 4399 | .{ .char = 'r', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 4370 }, | ||
| 4400 | .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 4372 }, | ||
| 4401 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4375 }, | ||
| 4402 | .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4376 }, | ||
| 4403 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4377 }, | ||
| 4404 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4378 }, | ||
| 4405 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4379 }, | ||
| 4406 | .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 656 }, | ||
| 4407 | .{ .char = 'q', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 412 }, | ||
| 4408 | .{ .char = 'w', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 }, | ||
| 4409 | .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 656 }, | ||
| 4410 | .{ .char = 'w', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 }, | ||
| 4411 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4380 }, | ||
| 4412 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4381 }, | ||
| 4413 | .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3323 }, | ||
| 4414 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3327 }, | ||
| 4415 | .{ .char = 'q', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4382 }, | ||
| 4416 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2431 }, | ||
| 4417 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4383 }, | ||
| 4418 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4384 }, | ||
| 4419 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3327 }, | ||
| 4420 | .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4385 }, | ||
| 4421 | .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3619 }, | ||
| 4422 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4386 }, | ||
| 4423 | .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 4387 }, | ||
| 4424 | .{ .char = 'q', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 4185 }, | ||
| 4425 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4388 }, | ||
| 4426 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4389 }, | ||
| 4427 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4390 }, | ||
| 4428 | .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 4391 }, | ||
| 4429 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4392 }, | ||
| 4430 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4393 }, | ||
| 4431 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 460 }, | ||
| 4432 | .{ .char = 't', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 4394 }, | ||
| 4433 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4395 }, | ||
| 4434 | .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 4396 }, | ||
| 4435 | .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4397 }, | ||
| 4436 | .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2071 }, | ||
| 4437 | .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 4398 }, | ||
| 4438 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1342 }, | ||
| 4439 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4399 }, | ||
| 4440 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 4400 }, | ||
| 4441 | .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 4401 }, | ||
| 4442 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4402 }, | ||
| 4443 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4403 }, | ||
| 4444 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4404 }, | ||
| 4445 | .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4405 }, | ||
| 4446 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4406 }, | ||
| 4447 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 344 }, | ||
| 4448 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4407 }, | ||
| 4449 | .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 344 }, | ||
| 4450 | .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 655 }, | ||
| 4451 | .{ .char = 'M', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 }, | ||
| 4452 | .{ .char = '3', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4408 }, | ||
| 4453 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4409 }, | ||
| 4454 | .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4410 }, | ||
| 4455 | .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4411 }, | ||
| 4456 | .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4412 }, | ||
| 4457 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 3728 }, | ||
| 4458 | .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 3728 }, | ||
| 4459 | .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3997 }, | ||
| 4460 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4413 }, | ||
| 4461 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 9, .child_index = 4415 }, | ||
| 4462 | .{ .char = 'f', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 4416 }, | ||
| 4463 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4416 }, | ||
| 4464 | .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 4417 }, | ||
| 4465 | .{ .char = 'g', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 4418 }, | ||
| 4466 | .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 36, .child_index = 4420 }, | ||
| 4467 | .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 4423 }, | ||
| 4468 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 28, .child_index = 4426 }, | ||
| 4469 | .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 9, .child_index = 4225 }, | ||
| 4470 | .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 4412 }, | ||
| 4471 | .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4412 }, | ||
| 4472 | .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4066 }, | ||
| 4473 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4427 }, | ||
| 4474 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3791 }, | ||
| 4475 | .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3791 }, | ||
| 4476 | .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4429 }, | ||
| 4477 | .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 4430 }, | ||
| 4478 | .{ .char = 'z', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4430 }, | ||
| 4479 | .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4431 }, | ||
| 4480 | .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4432 }, | ||
| 4481 | .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4435 }, | ||
| 4482 | .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 4011 }, | ||
| 4483 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4436 }, | ||
| 4484 | .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 4437 }, | ||
| 4485 | .{ .char = 'z', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4437 }, | ||
| 4486 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 9, .child_index = 4438 }, | ||
| 4487 | .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 9, .child_index = 4439 }, | ||
| 4488 | .{ .char = 'z', .end_of_word = false, .end_of_list = true, .number = 9, .child_index = 4439 }, | ||
| 4489 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 9, .child_index = 4440 }, | ||
| 4490 | .{ .char = 'q', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4441 }, | ||
| 4491 | .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 4441 }, | ||
| 4492 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4441 }, | ||
| 4493 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 4443 }, | ||
| 4494 | .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 4441 }, | ||
| 4495 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4444 }, | ||
| 4496 | .{ .char = 'f', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 4445 }, | ||
| 4497 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4445 }, | ||
| 4498 | .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 4446 }, | ||
| 4499 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4446 }, | ||
| 4500 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4448 }, | ||
| 4501 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4278 }, | ||
| 4502 | .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 4051 }, | ||
| 4503 | .{ .char = 'z', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4051 }, | ||
| 4504 | .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 4449 }, | ||
| 4505 | .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4449 }, | ||
| 4506 | .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4450 }, | ||
| 4507 | .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 3776 }, | ||
| 4508 | .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4452 }, | ||
| 4509 | .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 4446 }, | ||
| 4510 | .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 4453 }, | ||
| 4511 | .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4455 }, | ||
| 4512 | .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 4427 }, | ||
| 4513 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4427 }, | ||
| 4514 | .{ .char = 'l', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 }, | ||
| 4515 | .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 655 }, | ||
| 4516 | .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4457 }, | ||
| 4517 | .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4458 }, | ||
| 4518 | .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3796 }, | ||
| 4519 | .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4459 }, | ||
| 4520 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4455 }, | ||
| 4521 | .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3783 }, | ||
| 4522 | .{ .char = 'g', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 4461 }, | ||
| 4523 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2161 }, | ||
| 4524 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4462 }, | ||
| 4525 | .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 4463 }, | ||
| 4526 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4464 }, | ||
| 4527 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4465 }, | ||
| 4528 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4466 }, | ||
| 4529 | .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 4467 }, | ||
| 4530 | .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 4298 }, | ||
| 4531 | .{ .char = 't', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 4299 }, | ||
| 4532 | .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4300 }, | ||
| 4533 | .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4468 }, | ||
| 4534 | .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4472 }, | ||
| 4535 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4473 }, | ||
| 4536 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4474 }, | ||
| 4537 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4475 }, | ||
| 4538 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4476 }, | ||
| 4539 | .{ .char = 'r', .end_of_word = false, .end_of_list = false, .number = 5, .child_index = 4477 }, | ||
| 4540 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 4478 }, | ||
| 4541 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4479 }, | ||
| 4542 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4480 }, | ||
| 4543 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4481 }, | ||
| 4544 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4482 }, | ||
| 4545 | .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4483 }, | ||
| 4546 | .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 311 }, | ||
| 4547 | .{ .char = 'y', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 460 }, | ||
| 4548 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4484 }, | ||
| 4549 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4486 }, | ||
| 4550 | .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 4487 }, | ||
| 4551 | .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 4489 }, | ||
| 4552 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2145 }, | ||
| 4553 | .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4490 }, | ||
| 4554 | .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4491 }, | ||
| 4555 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3833 }, | ||
| 4556 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4492 }, | ||
| 4557 | .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 496 }, | ||
| 4558 | .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 496 }, | ||
| 4559 | .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4493 }, | ||
| 4560 | .{ .char = 'z', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4494 }, | ||
| 4561 | .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3558 }, | ||
| 4562 | .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4495 }, | ||
| 4563 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4496 }, | ||
| 4564 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4497 }, | ||
| 4565 | .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 311 }, | ||
| 4566 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 4498 }, | ||
| 4567 | .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4500 }, | ||
| 4568 | .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4501 }, | ||
| 4569 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4502 }, | ||
| 4570 | .{ .char = 'h', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1352 }, | ||
| 4571 | .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 451 }, | ||
| 4572 | .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 4338 }, | ||
| 4573 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4503 }, | ||
| 4574 | .{ .char = 'k', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4504 }, | ||
| 4575 | .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4505 }, | ||
| 4576 | .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4506 }, | ||
| 4577 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4507 }, | ||
| 4578 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3246 }, | ||
| 4579 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 579 }, | ||
| 4580 | .{ .char = 'h', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4508 }, | ||
| 4581 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4509 }, | ||
| 4582 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1883 }, | ||
| 4583 | .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4510 }, | ||
| 4584 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2741 }, | ||
| 4585 | .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 580 }, | ||
| 4586 | .{ .char = 'b', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3569 }, | ||
| 4587 | .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4511 }, | ||
| 4588 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4512 }, | ||
| 4589 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4513 }, | ||
| 4590 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4514 }, | ||
| 4591 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4515 }, | ||
| 4592 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4516 }, | ||
| 4593 | .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 457 }, | ||
| 4594 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4517 }, | ||
| 4595 | .{ .char = 'b', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 344 }, | ||
| 4596 | .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4518 }, | ||
| 4597 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4519 }, | ||
| 4598 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 4520 }, | ||
| 4599 | .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 738 }, | ||
| 4600 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4521 }, | ||
| 4601 | .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2192 }, | ||
| 4602 | .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 4523 }, | ||
| 4603 | .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 568 }, | ||
| 4604 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4524 }, | ||
| 4605 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4525 }, | ||
| 4606 | .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 580 }, | ||
| 4607 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4526 }, | ||
| 4608 | .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 457 }, | ||
| 4609 | .{ .char = 'q', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 286 }, | ||
| 4610 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4527 }, | ||
| 4611 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4528 }, | ||
| 4612 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4529 }, | ||
| 4613 | .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4530 }, | ||
| 4614 | .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4531 }, | ||
| 4615 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4532 }, | ||
| 4616 | .{ .char = 'q', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 412 }, | ||
| 4617 | .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4180 }, | ||
| 4618 | .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 561 }, | ||
| 4619 | .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4533 }, | ||
| 4620 | .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3622 }, | ||
| 4621 | .{ .char = 'h', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4534 }, | ||
| 4622 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4535 }, | ||
| 4623 | .{ .char = 'h', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4180 }, | ||
| 4624 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4536 }, | ||
| 4625 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4537 }, | ||
| 4626 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4538 }, | ||
| 4627 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4539 }, | ||
| 4628 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4540 }, | ||
| 4629 | .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4541 }, | ||
| 4630 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4542 }, | ||
| 4631 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4543 }, | ||
| 4632 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 4544 }, | ||
| 4633 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3223 }, | ||
| 4634 | .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1098 }, | ||
| 4635 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4547 }, | ||
| 4636 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 4548 }, | ||
| 4637 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 4552 }, | ||
| 4638 | .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4554 }, | ||
| 4639 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4555 }, | ||
| 4640 | .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4556 }, | ||
| 4641 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4557 }, | ||
| 4642 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4558 }, | ||
| 4643 | .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4559 }, | ||
| 4644 | .{ .char = '2', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4560 }, | ||
| 4645 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 655 }, | ||
| 4646 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4217 }, | ||
| 4647 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4562 }, | ||
| 4648 | .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4562 }, | ||
| 4649 | .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 4220 }, | ||
| 4650 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4565 }, | ||
| 4651 | .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 9, .child_index = 4566 }, | ||
| 4652 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4568 }, | ||
| 4653 | .{ .char = 'q', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4569 }, | ||
| 4654 | .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 4569 }, | ||
| 4655 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4569 }, | ||
| 4656 | .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 4569 }, | ||
| 4657 | .{ .char = 'o', .end_of_word = false, .end_of_list = false, .number = 28, .child_index = 4029 }, | ||
| 4658 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4569 }, | ||
| 4659 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 4571 }, | ||
| 4660 | .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 4569 }, | ||
| 4661 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4572 }, | ||
| 4662 | .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 28, .child_index = 4029 }, | ||
| 4663 | .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 4236 }, | ||
| 4664 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4573 }, | ||
| 4665 | .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4574 }, | ||
| 4666 | .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3470 }, | ||
| 4667 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4432 }, | ||
| 4668 | .{ .char = 'l', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 }, | ||
| 4669 | .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 4435 }, | ||
| 4670 | .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 655 }, | ||
| 4671 | .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 655 }, | ||
| 4672 | .{ .char = 'z', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 3728 }, | ||
| 4673 | .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4246 }, | ||
| 4674 | .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 9, .child_index = 4576 }, | ||
| 4675 | .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 9, .child_index = 4250 }, | ||
| 4676 | .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 9, .child_index = 4578 }, | ||
| 4677 | .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 4580 }, | ||
| 4678 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4581 }, | ||
| 4679 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4582 }, | ||
| 4680 | .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4582 }, | ||
| 4681 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4214 }, | ||
| 4682 | .{ .char = 'f', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 4583 }, | ||
| 4683 | .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4583 }, | ||
| 4684 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4584 }, | ||
| 4685 | .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4587 }, | ||
| 4686 | .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 4588 }, | ||
| 4687 | .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4588 }, | ||
| 4688 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4589 }, | ||
| 4689 | .{ .char = 'f', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 4590 }, | ||
| 4690 | .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4590 }, | ||
| 4691 | .{ .char = 'l', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 }, | ||
| 4692 | .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 655 }, | ||
| 4693 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4431 }, | ||
| 4694 | .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4265 }, | ||
| 4695 | .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 4432 }, | ||
| 4696 | .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4432 }, | ||
| 4697 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3530 }, | ||
| 4698 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4591 }, | ||
| 4699 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4593 }, | ||
| 4700 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4299 }, | ||
| 4701 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4594 }, | ||
| 4702 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4595 }, | ||
| 4703 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4464 }, | ||
| 4704 | .{ .char = '0', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 }, | ||
| 4705 | .{ .char = '1', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 }, | ||
| 4706 | .{ .char = '2', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 }, | ||
| 4707 | .{ .char = '3', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 }, | ||
| 4708 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 458 }, | ||
| 4709 | .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4596 }, | ||
| 4710 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4597 }, | ||
| 4711 | .{ .char = 't', .end_of_word = true, .end_of_list = true, .number = 6, .child_index = 1140 }, | ||
| 4712 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4598 }, | ||
| 4713 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 4599 }, | ||
| 4714 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 4600 }, | ||
| 4715 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4601 }, | ||
| 4716 | .{ .char = 'C', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4602 }, | ||
| 4717 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4603 }, | ||
| 4718 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4604 }, | ||
| 4719 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4605 }, | ||
| 4720 | .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 4606 }, | ||
| 4721 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4607 }, | ||
| 4722 | .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4608 }, | ||
| 4723 | .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2946 }, | ||
| 4724 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4609 }, | ||
| 4725 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4611 }, | ||
| 4726 | .{ .char = 'h', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4126 }, | ||
| 4727 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3264 }, | ||
| 4728 | .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4612 }, | ||
| 4729 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 460 }, | ||
| 4730 | .{ .char = 'z', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3393 }, | ||
| 4731 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4613 }, | ||
| 4732 | .{ .char = 'z', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4614 }, | ||
| 4733 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4615 }, | ||
| 4734 | .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 4616 }, | ||
| 4735 | .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4617 }, | ||
| 4736 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 460 }, | ||
| 4737 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4619 }, | ||
| 4738 | .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4620 }, | ||
| 4739 | .{ .char = '3', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4621 }, | ||
| 4740 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4622 }, | ||
| 4741 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 585 }, | ||
| 4742 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4623 }, | ||
| 4743 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4624 }, | ||
| 4744 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4625 }, | ||
| 4745 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4626 }, | ||
| 4746 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4627 }, | ||
| 4747 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4628 }, | ||
| 4748 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4629 }, | ||
| 4749 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4630 }, | ||
| 4750 | .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4631 }, | ||
| 4751 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4632 }, | ||
| 4752 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4633 }, | ||
| 4753 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4634 }, | ||
| 4754 | .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4635 }, | ||
| 4755 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4636 }, | ||
| 4756 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4637 }, | ||
| 4757 | .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 4638 }, | ||
| 4758 | .{ .char = 's', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 }, | ||
| 4759 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 664 }, | ||
| 4760 | .{ .char = 'g', .end_of_word = true, .end_of_list = true, .number = 3, .child_index = 4639 }, | ||
| 4761 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4641 }, | ||
| 4762 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4642 }, | ||
| 4763 | .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4635 }, | ||
| 4764 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1616 }, | ||
| 4765 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4643 }, | ||
| 4766 | .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 585 }, | ||
| 4767 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4644 }, | ||
| 4768 | .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4645 }, | ||
| 4769 | .{ .char = 'h', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 561 }, | ||
| 4770 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4646 }, | ||
| 4771 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4647 }, | ||
| 4772 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4649 }, | ||
| 4773 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4650 }, | ||
| 4774 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4651 }, | ||
| 4775 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 458 }, | ||
| 4776 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4652 }, | ||
| 4777 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4653 }, | ||
| 4778 | .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4654 }, | ||
| 4779 | .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4655 }, | ||
| 4780 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 4656 }, | ||
| 4781 | .{ .char = 'o', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 4658 }, | ||
| 4782 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4659 }, | ||
| 4783 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4660 }, | ||
| 4784 | .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 4661 }, | ||
| 4785 | .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 4662 }, | ||
| 4786 | .{ .char = 'h', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 4663 }, | ||
| 4787 | .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4664 }, | ||
| 4788 | .{ .char = '2', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 4665 }, | ||
| 4789 | .{ .char = '3', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4665 }, | ||
| 4790 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4666 }, | ||
| 4791 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4667 }, | ||
| 4792 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4668 }, | ||
| 4793 | .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4556 }, | ||
| 4794 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4671 }, | ||
| 4795 | .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4672 }, | ||
| 4796 | .{ .char = 'a', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 }, | ||
| 4797 | .{ .char = 'p', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 }, | ||
| 4798 | .{ .char = 'M', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 4435 }, | ||
| 4799 | .{ .char = 'l', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 }, | ||
| 4800 | .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 655 }, | ||
| 4801 | .{ .char = 'z', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4673 }, | ||
| 4802 | .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 4220 }, | ||
| 4803 | .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4234 }, | ||
| 4804 | .{ .char = 'M', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 655 }, | ||
| 4805 | .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 4674 }, | ||
| 4806 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4675 }, | ||
| 4807 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4676 }, | ||
| 4808 | .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4676 }, | ||
| 4809 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4677 }, | ||
| 4810 | .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 4562 }, | ||
| 4811 | .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4562 }, | ||
| 4812 | .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 4244 }, | ||
| 4813 | .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4459 }, | ||
| 4814 | .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 4011 }, | ||
| 4815 | .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4058 }, | ||
| 4816 | .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4275 }, | ||
| 4817 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4443 }, | ||
| 4818 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4580 }, | ||
| 4819 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4678 }, | ||
| 4820 | .{ .char = 'l', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 }, | ||
| 4821 | .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 4278 }, | ||
| 4822 | .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 655 }, | ||
| 4823 | .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4278 }, | ||
| 4824 | .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4679 }, | ||
| 4825 | .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4680 }, | ||
| 4826 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4682 }, | ||
| 4827 | .{ .char = '3', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 4683 }, | ||
| 4828 | .{ .char = '6', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4684 }, | ||
| 4829 | .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4685 }, | ||
| 4830 | .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4472 }, | ||
| 4831 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4686 }, | ||
| 4832 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4688 }, | ||
| 4833 | .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4472 }, | ||
| 4834 | .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 866 }, | ||
| 4835 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 4478 }, | ||
| 4836 | .{ .char = 't', .end_of_word = true, .end_of_list = true, .number = 5, .child_index = 4692 }, | ||
| 4837 | .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4694 }, | ||
| 4838 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4695 }, | ||
| 4839 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4696 }, | ||
| 4840 | .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4697 }, | ||
| 4841 | .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4698 }, | ||
| 4842 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4699 }, | ||
| 4843 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4699 }, | ||
| 4844 | .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4700 }, | ||
| 4845 | .{ .char = '1', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 648 }, | ||
| 4846 | .{ .char = '8', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4701 }, | ||
| 4847 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4702 }, | ||
| 4848 | .{ .char = 'e', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 680 }, | ||
| 4849 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3580 }, | ||
| 4850 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4556 }, | ||
| 4851 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4703 }, | ||
| 4852 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2712 }, | ||
| 4853 | .{ .char = '1', .end_of_word = true, .end_of_list = false, .number = 2, .child_index = 4704 }, | ||
| 4854 | .{ .char = '2', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 4704 }, | ||
| 4855 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4705 }, | ||
| 4856 | .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 496 }, | ||
| 4857 | .{ .char = '2', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3861 }, | ||
| 4858 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4706 }, | ||
| 4859 | .{ .char = 'c', .end_of_word = true, .end_of_list = true, .number = 3, .child_index = 4707 }, | ||
| 4860 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4708 }, | ||
| 4861 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4709 }, | ||
| 4862 | .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4710 }, | ||
| 4863 | .{ .char = 'g', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 4711 }, | ||
| 4864 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4712 }, | ||
| 4865 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3264 }, | ||
| 4866 | .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4713 }, | ||
| 4867 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4208 }, | ||
| 4868 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4714 }, | ||
| 4869 | .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4715 }, | ||
| 4870 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4716 }, | ||
| 4871 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4717 }, | ||
| 4872 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4718 }, | ||
| 4873 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4719 }, | ||
| 4874 | .{ .char = 'y', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2167 }, | ||
| 4875 | .{ .char = '1', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 4720 }, | ||
| 4876 | .{ .char = '2', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 }, | ||
| 4877 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4721 }, | ||
| 4878 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4722 }, | ||
| 4879 | .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4723 }, | ||
| 4880 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4724 }, | ||
| 4881 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4725 }, | ||
| 4882 | .{ .char = 'q', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4726 }, | ||
| 4883 | .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 4387 }, | ||
| 4884 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4536 }, | ||
| 4885 | .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4387 }, | ||
| 4886 | .{ .char = 'q', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4185 }, | ||
| 4887 | .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4727 }, | ||
| 4888 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 572 }, | ||
| 4889 | .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4728 }, | ||
| 4890 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4729 }, | ||
| 4891 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4730 }, | ||
| 4892 | .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 4731 }, | ||
| 4893 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4731 }, | ||
| 4894 | .{ .char = 'r', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 4732 }, | ||
| 4895 | .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4733 }, | ||
| 4896 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4734 }, | ||
| 4897 | .{ .char = 'h', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4735 }, | ||
| 4898 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4736 }, | ||
| 4899 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4737 }, | ||
| 4900 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4738 }, | ||
| 4901 | .{ .char = 'D', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4739 }, | ||
| 4902 | .{ .char = '2', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4741 }, | ||
| 4903 | .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4126 }, | ||
| 4904 | .{ .char = 'x', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 }, | ||
| 4905 | .{ .char = 'y', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 }, | ||
| 4906 | .{ .char = 'z', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 }, | ||
| 4907 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4742 }, | ||
| 4908 | .{ .char = '5', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4743 }, | ||
| 4909 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4220 }, | ||
| 4910 | .{ .char = 'M', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4744 }, | ||
| 4911 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4571 }, | ||
| 4912 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4674 }, | ||
| 4913 | .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3997 }, | ||
| 4914 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3997 }, | ||
| 4915 | .{ .char = 'M', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4278 }, | ||
| 4916 | .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 4066 }, | ||
| 4917 | .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4066 }, | ||
| 4918 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4745 }, | ||
| 4919 | .{ .char = '2', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3190 }, | ||
| 4920 | .{ .char = '4', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3190 }, | ||
| 4921 | .{ .char = 'k', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 1881 }, | ||
| 4922 | .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 458 }, | ||
| 4923 | .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 4747 }, | ||
| 4924 | .{ .char = 'w', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 }, | ||
| 4925 | .{ .char = 'x', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 }, | ||
| 4926 | .{ .char = 'y', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 }, | ||
| 4927 | .{ .char = 'z', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 }, | ||
| 4928 | .{ .char = '6', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 649 }, | ||
| 4929 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4748 }, | ||
| 4930 | .{ .char = 'e', .end_of_word = true, .end_of_list = true, .number = 6, .child_index = 4751 }, | ||
| 4931 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4755 }, | ||
| 4932 | .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4756 }, | ||
| 4933 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4757 }, | ||
| 4934 | .{ .char = 'n', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 4758 }, | ||
| 4935 | .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3807 }, | ||
| 4936 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4759 }, | ||
| 4937 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4760 }, | ||
| 4938 | .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4761 }, | ||
| 4939 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4762 }, | ||
| 4940 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4763 }, | ||
| 4941 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4764 }, | ||
| 4942 | .{ .char = '1', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4765 }, | ||
| 4943 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4334 }, | ||
| 4944 | .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4129 }, | ||
| 4945 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4766 }, | ||
| 4946 | .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4767 }, | ||
| 4947 | .{ .char = 'h', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4768 }, | ||
| 4948 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4769 }, | ||
| 4949 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4770 }, | ||
| 4950 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4772 }, | ||
| 4951 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4773 }, | ||
| 4952 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4774 }, | ||
| 4953 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4775 }, | ||
| 4954 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4776 }, | ||
| 4955 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4777 }, | ||
| 4956 | .{ .char = '0', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 }, | ||
| 4957 | .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4778 }, | ||
| 4958 | .{ .char = 'd', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 4779 }, | ||
| 4959 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4780 }, | ||
| 4960 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4781 }, | ||
| 4961 | .{ .char = 'j', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4782 }, | ||
| 4962 | .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4783 }, | ||
| 4963 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4785 }, | ||
| 4964 | .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4786 }, | ||
| 4965 | .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4787 }, | ||
| 4966 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4659 }, | ||
| 4967 | .{ .char = 'd', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 4732 }, | ||
| 4968 | .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 291 }, | ||
| 4969 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4788 }, | ||
| 4970 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4789 }, | ||
| 4971 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4790 }, | ||
| 4972 | .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4791 }, | ||
| 4973 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4792 }, | ||
| 4974 | .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4791 }, | ||
| 4975 | .{ .char = 'f', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 4793 }, | ||
| 4976 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4793 }, | ||
| 4977 | .{ .char = 'D', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4795 }, | ||
| 4978 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4798 }, | ||
| 4979 | .{ .char = '1', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4799 }, | ||
| 4980 | .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4800 }, | ||
| 4981 | .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 4677 }, | ||
| 4982 | .{ .char = 'z', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4677 }, | ||
| 4983 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 4802 }, | ||
| 4984 | .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 4803 }, | ||
| 4985 | .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 496 }, | ||
| 4986 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3288 }, | ||
| 4987 | .{ .char = '1', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 648 }, | ||
| 4988 | .{ .char = '6', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 649 }, | ||
| 4989 | .{ .char = '8', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 }, | ||
| 4990 | .{ .char = 'P', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4804 }, | ||
| 4991 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4805 }, | ||
| 4992 | .{ .char = 'k', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4806 }, | ||
| 4993 | .{ .char = 'z', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2972 }, | ||
| 4994 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4807 }, | ||
| 4995 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4808 }, | ||
| 4996 | .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2490 }, | ||
| 4997 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4809 }, | ||
| 4998 | .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2730 }, | ||
| 4999 | .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2946 }, | ||
| 5000 | .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4811 }, | ||
| 5001 | .{ .char = '6', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3861 }, | ||
| 5002 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2712 }, | ||
| 5003 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4812 }, | ||
| 5004 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4813 }, | ||
| 5005 | .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3881 }, | ||
| 5006 | .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 4404 }, | ||
| 5007 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4327 }, | ||
| 5008 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4814 }, | ||
| 5009 | .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4815 }, | ||
| 5010 | .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4816 }, | ||
| 5011 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 311 }, | ||
| 5012 | .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4817 }, | ||
| 5013 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4818 }, | ||
| 5014 | .{ .char = 'y', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 471 }, | ||
| 5015 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4819 }, | ||
| 5016 | .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4820 }, | ||
| 5017 | .{ .char = 'z', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4821 }, | ||
| 5018 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4822 }, | ||
| 5019 | .{ .char = 'l', .end_of_word = true, .end_of_list = false, .number = 2, .child_index = 4823 }, | ||
| 5020 | .{ .char = 'r', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 4823 }, | ||
| 5021 | .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4824 }, | ||
| 5022 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2799 }, | ||
| 5023 | .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4825 }, | ||
| 5024 | .{ .char = 'p', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 4732 }, | ||
| 5025 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 183 }, | ||
| 5026 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4826 }, | ||
| 5027 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4827 }, | ||
| 5028 | .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4828 }, | ||
| 5029 | .{ .char = 'f', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 4829 }, | ||
| 5030 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4829 }, | ||
| 5031 | .{ .char = 'f', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 4829 }, | ||
| 5032 | .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 4829 }, | ||
| 5033 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4830 }, | ||
| 5034 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4612 }, | ||
| 5035 | .{ .char = '2', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4831 }, | ||
| 5036 | .{ .char = 'M', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 655 }, | ||
| 5037 | .{ .char = 'l', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 }, | ||
| 5038 | .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 4833 }, | ||
| 5039 | .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4834 }, | ||
| 5040 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4835 }, | ||
| 5041 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4836 }, | ||
| 5042 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4837 }, | ||
| 5043 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2883 }, | ||
| 5044 | .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4841 }, | ||
| 5045 | .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2946 }, | ||
| 5046 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2946 }, | ||
| 5047 | .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4842 }, | ||
| 5048 | .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3288 }, | ||
| 5049 | .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 311 }, | ||
| 5050 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4843 }, | ||
| 5051 | .{ .char = 'h', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4844 }, | ||
| 5052 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 451 }, | ||
| 5053 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4845 }, | ||
| 5054 | .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4846 }, | ||
| 5055 | .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 323 }, | ||
| 5056 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4847 }, | ||
| 5057 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4848 }, | ||
| 5058 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3937 }, | ||
| 5059 | .{ .char = 'a', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 }, | ||
| 5060 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4849 }, | ||
| 5061 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4850 }, | ||
| 5062 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4851 }, | ||
| 5063 | .{ .char = 'h', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4830 }, | ||
| 5064 | .{ .char = 'h', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4852 }, | ||
| 5065 | .{ .char = '_', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 }, | ||
| 5066 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4829 }, | ||
| 5067 | .{ .char = 'l', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 }, | ||
| 5068 | .{ .char = 'u', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 }, | ||
| 5069 | .{ .char = 'k', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 4853 }, | ||
| 5070 | .{ .char = 'q', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 }, | ||
| 5071 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4854 }, | ||
| 5072 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4855 }, | ||
| 5073 | .{ .char = 'b', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 4856 }, | ||
| 5074 | .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 4505 }, | ||
| 5075 | .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 520 }, | ||
| 5076 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 420 }, | ||
| 5077 | .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4857 }, | ||
| 5078 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4858 }, | ||
| 5079 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4859 }, | ||
| 5080 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4860 }, | ||
| 5081 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3223 }, | ||
| 5082 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4861 }, | ||
| 5083 | .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4862 }, | ||
| 5084 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3117 }, | ||
| 5085 | .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4863 }, | ||
| 5086 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2384 }, | ||
| 5087 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4864 }, | ||
| 5088 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4830 }, | ||
| 5089 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 4865 }, | ||
| 5090 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4868 }, | ||
| 5091 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4869 }, | ||
| 5092 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4870 }, | ||
| 5093 | .{ .char = '1', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 }, | ||
| 5094 | .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4871 }, | ||
| 5095 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4872 }, | ||
| 5096 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 457 }, | ||
| 5097 | .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2161 }, | ||
| 5098 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4873 }, | ||
| 5099 | .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 572 }, | ||
| 5100 | .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4874 }, | ||
| 5101 | .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 4834 }, | ||
| 5102 | .{ .char = 'g', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 4875 }, | ||
| 5103 | .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4875 }, | ||
| 5104 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4877 }, | ||
| 5105 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4878 }, | ||
| 5106 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4879 }, | ||
| 5107 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4126 }, | ||
| 5108 | .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 572 }, | ||
| 5109 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 450 }, | ||
| 5110 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4880 }, | ||
| 5111 | .{ .char = 'e', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 }, | ||
| 5112 | .{ .char = 't', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 }, | ||
| 5113 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4882 }, | ||
| 5114 | .{ .char = 'S', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4883 }, | ||
| 5115 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4884 }, | ||
| 5116 | .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 4885 }, | ||
| 5117 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4886 }, | ||
| 5118 | .{ .char = 'r', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 4887 }, | ||
| 5119 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4888 }, | ||
| 5120 | .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 654 }, | ||
| 5121 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4889 }, | ||
| 5122 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4890 }, | ||
| 5123 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 459 }, | ||
| 5124 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4891 }, | ||
| 5125 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4892 }, | ||
| 5126 | .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4893 }, | ||
| 5127 | .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1654 }, | ||
| 5128 | .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4894 }, | ||
| 5129 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4895 }, | ||
| 5130 | .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4896 }, | ||
| 5131 | .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4830 }, | ||
| 5132 | .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4897 }, | ||
| 5133 | .{ .char = 'y', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4898 }, | ||
| 5134 | .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4899 }, | ||
| 5135 | .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4830 }, | ||
| 5136 | }; | ||
| 5137 | const builtin_data = blk: { | ||
| 5138 | @setEvalBranchQuota(3948); | ||
| 5139 | break :blk [_]@This(){ | ||
| 5140 | // _Block_object_assign | ||
| 5141 | .{ .tag = @enumFromInt(0), .param_str = "vv*vC*iC", .properties = .{ .header = .blocks, .attributes = .{ .lib_function_without_prefix = true } } }, | ||
| 5142 | // _Block_object_dispose | ||
| 5143 | .{ .tag = @enumFromInt(1), .param_str = "vvC*iC", .properties = .{ .header = .blocks, .attributes = .{ .lib_function_without_prefix = true } } }, | ||
| 5144 | // _Exit | ||
| 5145 | .{ .tag = @enumFromInt(2), .param_str = "vi", .properties = .{ .header = .stdlib, .attributes = .{ .noreturn = true, .lib_function_without_prefix = true } } }, | ||
| 5146 | // _InterlockedAnd | ||
| 5147 | .{ .tag = @enumFromInt(3), .param_str = "NiNiD*Ni", .properties = .{ .language = .all_ms_languages } }, | ||
| 5148 | // _InterlockedAnd16 | ||
| 5149 | .{ .tag = @enumFromInt(4), .param_str = "ssD*s", .properties = .{ .language = .all_ms_languages } }, | ||
| 5150 | // _InterlockedAnd8 | ||
| 5151 | .{ .tag = @enumFromInt(5), .param_str = "ccD*c", .properties = .{ .language = .all_ms_languages } }, | ||
| 5152 | // _InterlockedCompareExchange | ||
| 5153 | .{ .tag = @enumFromInt(6), .param_str = "NiNiD*NiNi", .properties = .{ .language = .all_ms_languages } }, | ||
| 5154 | // _InterlockedCompareExchange16 | ||
| 5155 | .{ .tag = @enumFromInt(7), .param_str = "ssD*ss", .properties = .{ .language = .all_ms_languages } }, | ||
| 5156 | // _InterlockedCompareExchange64 | ||
| 5157 | .{ .tag = @enumFromInt(8), .param_str = "LLiLLiD*LLiLLi", .properties = .{ .language = .all_ms_languages } }, | ||
| 5158 | // _InterlockedCompareExchange8 | ||
| 5159 | .{ .tag = @enumFromInt(9), .param_str = "ccD*cc", .properties = .{ .language = .all_ms_languages } }, | ||
| 5160 | // _InterlockedCompareExchangePointer | ||
| 5161 | .{ .tag = @enumFromInt(10), .param_str = "v*v*D*v*v*", .properties = .{ .language = .all_ms_languages } }, | ||
| 5162 | // _InterlockedCompareExchangePointer_nf | ||
| 5163 | .{ .tag = @enumFromInt(11), .param_str = "v*v*D*v*v*", .properties = .{ .language = .all_ms_languages } }, | ||
| 5164 | // _InterlockedDecrement | ||
| 5165 | .{ .tag = @enumFromInt(12), .param_str = "NiNiD*", .properties = .{ .language = .all_ms_languages } }, | ||
| 5166 | // _InterlockedDecrement16 | ||
| 5167 | .{ .tag = @enumFromInt(13), .param_str = "ssD*", .properties = .{ .language = .all_ms_languages } }, | ||
| 5168 | // _InterlockedExchange | ||
| 5169 | .{ .tag = @enumFromInt(14), .param_str = "NiNiD*Ni", .properties = .{ .language = .all_ms_languages } }, | ||
| 5170 | // _InterlockedExchange16 | ||
| 5171 | .{ .tag = @enumFromInt(15), .param_str = "ssD*s", .properties = .{ .language = .all_ms_languages } }, | ||
| 5172 | // _InterlockedExchange8 | ||
| 5173 | .{ .tag = @enumFromInt(16), .param_str = "ccD*c", .properties = .{ .language = .all_ms_languages } }, | ||
| 5174 | // _InterlockedExchangeAdd | ||
| 5175 | .{ .tag = @enumFromInt(17), .param_str = "NiNiD*Ni", .properties = .{ .language = .all_ms_languages } }, | ||
| 5176 | // _InterlockedExchangeAdd16 | ||
| 5177 | .{ .tag = @enumFromInt(18), .param_str = "ssD*s", .properties = .{ .language = .all_ms_languages } }, | ||
| 5178 | // _InterlockedExchangeAdd8 | ||
| 5179 | .{ .tag = @enumFromInt(19), .param_str = "ccD*c", .properties = .{ .language = .all_ms_languages } }, | ||
| 5180 | // _InterlockedExchangePointer | ||
| 5181 | .{ .tag = @enumFromInt(20), .param_str = "v*v*D*v*", .properties = .{ .language = .all_ms_languages } }, | ||
| 5182 | // _InterlockedExchangeSub | ||
| 5183 | .{ .tag = @enumFromInt(21), .param_str = "NiNiD*Ni", .properties = .{ .language = .all_ms_languages } }, | ||
| 5184 | // _InterlockedExchangeSub16 | ||
| 5185 | .{ .tag = @enumFromInt(22), .param_str = "ssD*s", .properties = .{ .language = .all_ms_languages } }, | ||
| 5186 | // _InterlockedExchangeSub8 | ||
| 5187 | .{ .tag = @enumFromInt(23), .param_str = "ccD*c", .properties = .{ .language = .all_ms_languages } }, | ||
| 5188 | // _InterlockedIncrement | ||
| 5189 | .{ .tag = @enumFromInt(24), .param_str = "NiNiD*", .properties = .{ .language = .all_ms_languages } }, | ||
| 5190 | // _InterlockedIncrement16 | ||
| 5191 | .{ .tag = @enumFromInt(25), .param_str = "ssD*", .properties = .{ .language = .all_ms_languages } }, | ||
| 5192 | // _InterlockedOr | ||
| 5193 | .{ .tag = @enumFromInt(26), .param_str = "NiNiD*Ni", .properties = .{ .language = .all_ms_languages } }, | ||
| 5194 | // _InterlockedOr16 | ||
| 5195 | .{ .tag = @enumFromInt(27), .param_str = "ssD*s", .properties = .{ .language = .all_ms_languages } }, | ||
| 5196 | // _InterlockedOr8 | ||
| 5197 | .{ .tag = @enumFromInt(28), .param_str = "ccD*c", .properties = .{ .language = .all_ms_languages } }, | ||
| 5198 | // _InterlockedXor | ||
| 5199 | .{ .tag = @enumFromInt(29), .param_str = "NiNiD*Ni", .properties = .{ .language = .all_ms_languages } }, | ||
| 5200 | // _InterlockedXor16 | ||
| 5201 | .{ .tag = @enumFromInt(30), .param_str = "ssD*s", .properties = .{ .language = .all_ms_languages } }, | ||
| 5202 | // _InterlockedXor8 | ||
| 5203 | .{ .tag = @enumFromInt(31), .param_str = "ccD*c", .properties = .{ .language = .all_ms_languages } }, | ||
| 5204 | // _MoveFromCoprocessor | ||
| 5205 | .{ .tag = @enumFromInt(32), .param_str = "UiIUiIUiIUiIUiIUi", .properties = .{ .language = .all_ms_languages, .target_set = TargetSet.initOne(.arm) } }, | ||
| 5206 | // _MoveFromCoprocessor2 | ||
| 5207 | .{ .tag = @enumFromInt(33), .param_str = "UiIUiIUiIUiIUiIUi", .properties = .{ .language = .all_ms_languages, .target_set = TargetSet.initOne(.arm) } }, | ||
| 5208 | // _MoveToCoprocessor | ||
| 5209 | .{ .tag = @enumFromInt(34), .param_str = "vUiIUiIUiIUiIUiIUi", .properties = .{ .language = .all_ms_languages, .target_set = TargetSet.initOne(.arm) } }, | ||
| 5210 | // _MoveToCoprocessor2 | ||
| 5211 | .{ .tag = @enumFromInt(35), .param_str = "vUiIUiIUiIUiIUiIUi", .properties = .{ .language = .all_ms_languages, .target_set = TargetSet.initOne(.arm) } }, | ||
| 5212 | // _ReturnAddress | ||
| 5213 | .{ .tag = @enumFromInt(36), .param_str = "v*", .properties = .{ .language = .all_ms_languages } }, | ||
| 5214 | // __GetExceptionInfo | ||
| 5215 | .{ .tag = @enumFromInt(37), .param_str = "v*.", .properties = .{ .language = .all_ms_languages, .attributes = .{ .custom_typecheck = true, .eval_args = false } } }, | ||
| 5216 | // __abnormal_termination | ||
| 5217 | .{ .tag = @enumFromInt(38), .param_str = "i", .properties = .{ .language = .all_ms_languages } }, | ||
| 5218 | // __annotation | ||
| 5219 | .{ .tag = @enumFromInt(39), .param_str = "wC*.", .properties = .{ .language = .all_ms_languages } }, | ||
| 5220 | // __arithmetic_fence | ||
| 5221 | .{ .tag = @enumFromInt(40), .param_str = "v.", .properties = .{ .attributes = .{ .custom_typecheck = true, .const_evaluable = true } } }, | ||
| 5222 | // __assume | ||
| 5223 | .{ .tag = @enumFromInt(41), .param_str = "vb", .properties = .{ .language = .all_ms_languages, .attributes = .{ .const_evaluable = true } } }, | ||
| 5224 | // __atomic_always_lock_free | ||
| 5225 | .{ .tag = @enumFromInt(42), .param_str = "bzvCD*", .properties = .{ .attributes = .{ .const_evaluable = true } } }, | ||
| 5226 | // __atomic_clear | ||
| 5227 | .{ .tag = @enumFromInt(43), .param_str = "vvD*i", .properties = .{} }, | ||
| 5228 | // __atomic_is_lock_free | ||
| 5229 | .{ .tag = @enumFromInt(44), .param_str = "bzvCD*", .properties = .{ .attributes = .{ .const_evaluable = true } } }, | ||
| 5230 | // __atomic_signal_fence | ||
| 5231 | .{ .tag = @enumFromInt(45), .param_str = "vi", .properties = .{} }, | ||
| 5232 | // __atomic_test_and_set | ||
| 5233 | .{ .tag = @enumFromInt(46), .param_str = "bvD*i", .properties = .{} }, | ||
| 5234 | // __atomic_thread_fence | ||
| 5235 | .{ .tag = @enumFromInt(47), .param_str = "vi", .properties = .{} }, | ||
| 5236 | // __builtin___CFStringMakeConstantString | ||
| 5237 | .{ .tag = @enumFromInt(48), .param_str = "FC*cC*", .properties = .{ .attributes = .{ .@"const" = true, .const_evaluable = true } } }, | ||
| 5238 | // __builtin___NSStringMakeConstantString | ||
| 5239 | .{ .tag = @enumFromInt(49), .param_str = "FC*cC*", .properties = .{ .attributes = .{ .@"const" = true, .const_evaluable = true } } }, | ||
| 5240 | // __builtin___clear_cache | ||
| 5241 | .{ .tag = @enumFromInt(50), .param_str = "vc*c*", .properties = .{} }, | ||
| 5242 | // __builtin___fprintf_chk | ||
| 5243 | .{ .tag = @enumFromInt(51), .param_str = "iP*RicC*R.", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .format_kind = .printf, .format_string_position = 2 } } }, | ||
| 5244 | // __builtin___get_unsafe_stack_bottom | ||
| 5245 | .{ .tag = @enumFromInt(52), .param_str = "v*", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true } } }, | ||
| 5246 | // __builtin___get_unsafe_stack_ptr | ||
| 5247 | .{ .tag = @enumFromInt(53), .param_str = "v*", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true } } }, | ||
| 5248 | // __builtin___get_unsafe_stack_start | ||
| 5249 | .{ .tag = @enumFromInt(54), .param_str = "v*", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true } } }, | ||
| 5250 | // __builtin___get_unsafe_stack_top | ||
| 5251 | .{ .tag = @enumFromInt(55), .param_str = "v*", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true } } }, | ||
| 5252 | // __builtin___memccpy_chk | ||
| 5253 | .{ .tag = @enumFromInt(56), .param_str = "v*v*vC*izz", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true } } }, | ||
| 5254 | // __builtin___memcpy_chk | ||
| 5255 | .{ .tag = @enumFromInt(57), .param_str = "v*v*vC*zz", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true } } }, | ||
| 5256 | // __builtin___memmove_chk | ||
| 5257 | .{ .tag = @enumFromInt(58), .param_str = "v*v*vC*zz", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true } } }, | ||
| 5258 | // __builtin___mempcpy_chk | ||
| 5259 | .{ .tag = @enumFromInt(59), .param_str = "v*v*vC*zz", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true } } }, | ||
| 5260 | // __builtin___memset_chk | ||
| 5261 | .{ .tag = @enumFromInt(60), .param_str = "v*v*izz", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true } } }, | ||
| 5262 | // __builtin___printf_chk | ||
| 5263 | .{ .tag = @enumFromInt(61), .param_str = "iicC*R.", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .format_kind = .printf, .format_string_position = 1 } } }, | ||
| 5264 | // __builtin___snprintf_chk | ||
| 5265 | .{ .tag = @enumFromInt(62), .param_str = "ic*RzizcC*R.", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .format_kind = .printf, .format_string_position = 4 } } }, | ||
| 5266 | // __builtin___sprintf_chk | ||
| 5267 | .{ .tag = @enumFromInt(63), .param_str = "ic*RizcC*R.", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .format_kind = .printf, .format_string_position = 3 } } }, | ||
| 5268 | // __builtin___stpcpy_chk | ||
| 5269 | .{ .tag = @enumFromInt(64), .param_str = "c*c*cC*z", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true } } }, | ||
| 5270 | // __builtin___stpncpy_chk | ||
| 5271 | .{ .tag = @enumFromInt(65), .param_str = "c*c*cC*zz", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true } } }, | ||
| 5272 | // __builtin___strcat_chk | ||
| 5273 | .{ .tag = @enumFromInt(66), .param_str = "c*c*cC*z", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true } } }, | ||
| 5274 | // __builtin___strcpy_chk | ||
| 5275 | .{ .tag = @enumFromInt(67), .param_str = "c*c*cC*z", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true } } }, | ||
| 5276 | // __builtin___strlcat_chk | ||
| 5277 | .{ .tag = @enumFromInt(68), .param_str = "zc*cC*zz", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true } } }, | ||
| 5278 | // __builtin___strlcpy_chk | ||
| 5279 | .{ .tag = @enumFromInt(69), .param_str = "zc*cC*zz", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true } } }, | ||
| 5280 | // __builtin___strncat_chk | ||
| 5281 | .{ .tag = @enumFromInt(70), .param_str = "c*c*cC*zz", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true } } }, | ||
| 5282 | // __builtin___strncpy_chk | ||
| 5283 | .{ .tag = @enumFromInt(71), .param_str = "c*c*cC*zz", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true } } }, | ||
| 5284 | // __builtin___vfprintf_chk | ||
| 5285 | .{ .tag = @enumFromInt(72), .param_str = "iP*RicC*Ra", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .format_kind = .vprintf, .format_string_position = 2 } } }, | ||
| 5286 | // __builtin___vprintf_chk | ||
| 5287 | .{ .tag = @enumFromInt(73), .param_str = "iicC*Ra", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .format_kind = .vprintf, .format_string_position = 1 } } }, | ||
| 5288 | // __builtin___vsnprintf_chk | ||
| 5289 | .{ .tag = @enumFromInt(74), .param_str = "ic*RzizcC*Ra", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .format_kind = .vprintf, .format_string_position = 4 } } }, | ||
| 5290 | // __builtin___vsprintf_chk | ||
| 5291 | .{ .tag = @enumFromInt(75), .param_str = "ic*RizcC*Ra", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .format_kind = .vprintf, .format_string_position = 3 } } }, | ||
| 5292 | // __builtin_abort | ||
| 5293 | .{ .tag = @enumFromInt(76), .param_str = "v", .properties = .{ .attributes = .{ .noreturn = true, .lib_function_with_builtin_prefix = true } } }, | ||
| 5294 | // __builtin_abs | ||
| 5295 | .{ .tag = @enumFromInt(77), .param_str = "ii", .properties = .{ .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } }, | ||
| 5296 | // __builtin_acos | ||
| 5297 | .{ .tag = @enumFromInt(78), .param_str = "dd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 5298 | // __builtin_acosf | ||
| 5299 | .{ .tag = @enumFromInt(79), .param_str = "ff", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 5300 | // __builtin_acosf128 | ||
| 5301 | .{ .tag = @enumFromInt(80), .param_str = "LLdLLd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 5302 | // __builtin_acosh | ||
| 5303 | .{ .tag = @enumFromInt(81), .param_str = "dd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 5304 | // __builtin_acoshf | ||
| 5305 | .{ .tag = @enumFromInt(82), .param_str = "ff", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 5306 | // __builtin_acoshf128 | ||
| 5307 | .{ .tag = @enumFromInt(83), .param_str = "LLdLLd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 5308 | // __builtin_acoshl | ||
| 5309 | .{ .tag = @enumFromInt(84), .param_str = "LdLd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 5310 | // __builtin_acosl | ||
| 5311 | .{ .tag = @enumFromInt(85), .param_str = "LdLd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 5312 | // __builtin_add_overflow | ||
| 5313 | .{ .tag = @enumFromInt(86), .param_str = "b.", .properties = .{ .attributes = .{ .custom_typecheck = true, .const_evaluable = true } } }, | ||
| 5314 | // __builtin_addc | ||
| 5315 | .{ .tag = @enumFromInt(87), .param_str = "UiUiCUiCUiCUi*", .properties = .{} }, | ||
| 5316 | // __builtin_addcb | ||
| 5317 | .{ .tag = @enumFromInt(88), .param_str = "UcUcCUcCUcCUc*", .properties = .{} }, | ||
| 5318 | // __builtin_addcl | ||
| 5319 | .{ .tag = @enumFromInt(89), .param_str = "ULiULiCULiCULiCULi*", .properties = .{} }, | ||
| 5320 | // __builtin_addcll | ||
| 5321 | .{ .tag = @enumFromInt(90), .param_str = "ULLiULLiCULLiCULLiCULLi*", .properties = .{} }, | ||
| 5322 | // __builtin_addcs | ||
| 5323 | .{ .tag = @enumFromInt(91), .param_str = "UsUsCUsCUsCUs*", .properties = .{} }, | ||
| 5324 | // __builtin_align_down | ||
| 5325 | .{ .tag = @enumFromInt(92), .param_str = "v*vC*z", .properties = .{ .attributes = .{ .@"const" = true, .custom_typecheck = true, .const_evaluable = true } } }, | ||
| 5326 | // __builtin_align_up | ||
| 5327 | .{ .tag = @enumFromInt(93), .param_str = "v*vC*z", .properties = .{ .attributes = .{ .@"const" = true, .custom_typecheck = true, .const_evaluable = true } } }, | ||
| 5328 | // __builtin_alloca | ||
| 5329 | .{ .tag = @enumFromInt(94), .param_str = "v*z", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true } } }, | ||
| 5330 | // __builtin_alloca_uninitialized | ||
| 5331 | .{ .tag = @enumFromInt(95), .param_str = "v*z", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true } } }, | ||
| 5332 | // __builtin_alloca_with_align | ||
| 5333 | .{ .tag = @enumFromInt(96), .param_str = "v*zIz", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true } } }, | ||
| 5334 | // __builtin_alloca_with_align_uninitialized | ||
| 5335 | .{ .tag = @enumFromInt(97), .param_str = "v*zIz", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true } } }, | ||
| 5336 | // __builtin_amdgcn_alignbit | ||
| 5337 | .{ .tag = @enumFromInt(98), .param_str = "UiUiUiUi", .properties = .{ .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } }, | ||
| 5338 | // __builtin_amdgcn_alignbyte | ||
| 5339 | .{ .tag = @enumFromInt(99), .param_str = "UiUiUiUi", .properties = .{ .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } }, | ||
| 5340 | // __builtin_amdgcn_atomic_dec32 | ||
| 5341 | .{ .tag = @enumFromInt(100), .param_str = "UZiUZiD*UZiUicC*", .properties = .{ .target_set = TargetSet.initOne(.amdgpu) } }, | ||
| 5342 | // __builtin_amdgcn_atomic_dec64 | ||
| 5343 | .{ .tag = @enumFromInt(101), .param_str = "UWiUWiD*UWiUicC*", .properties = .{ .target_set = TargetSet.initOne(.amdgpu) } }, | ||
| 5344 | // __builtin_amdgcn_atomic_inc32 | ||
| 5345 | .{ .tag = @enumFromInt(102), .param_str = "UZiUZiD*UZiUicC*", .properties = .{ .target_set = TargetSet.initOne(.amdgpu) } }, | ||
| 5346 | // __builtin_amdgcn_atomic_inc64 | ||
| 5347 | .{ .tag = @enumFromInt(103), .param_str = "UWiUWiD*UWiUicC*", .properties = .{ .target_set = TargetSet.initOne(.amdgpu) } }, | ||
| 5348 | // __builtin_amdgcn_buffer_wbinvl1 | ||
| 5349 | .{ .tag = @enumFromInt(104), .param_str = "v", .properties = .{ .target_set = TargetSet.initOne(.amdgpu) } }, | ||
| 5350 | // __builtin_amdgcn_class | ||
| 5351 | .{ .tag = @enumFromInt(105), .param_str = "bdi", .properties = .{ .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } }, | ||
| 5352 | // __builtin_amdgcn_classf | ||
| 5353 | .{ .tag = @enumFromInt(106), .param_str = "bfi", .properties = .{ .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } }, | ||
| 5354 | // __builtin_amdgcn_cosf | ||
| 5355 | .{ .tag = @enumFromInt(107), .param_str = "ff", .properties = .{ .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } }, | ||
| 5356 | // __builtin_amdgcn_cubeid | ||
| 5357 | .{ .tag = @enumFromInt(108), .param_str = "ffff", .properties = .{ .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } }, | ||
| 5358 | // __builtin_amdgcn_cubema | ||
| 5359 | .{ .tag = @enumFromInt(109), .param_str = "ffff", .properties = .{ .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } }, | ||
| 5360 | // __builtin_amdgcn_cubesc | ||
| 5361 | .{ .tag = @enumFromInt(110), .param_str = "ffff", .properties = .{ .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } }, | ||
| 5362 | // __builtin_amdgcn_cubetc | ||
| 5363 | .{ .tag = @enumFromInt(111), .param_str = "ffff", .properties = .{ .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } }, | ||
| 5364 | // __builtin_amdgcn_cvt_pk_i16 | ||
| 5365 | .{ .tag = @enumFromInt(112), .param_str = "E2sii", .properties = .{ .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } }, | ||
| 5366 | // __builtin_amdgcn_cvt_pk_u16 | ||
| 5367 | .{ .tag = @enumFromInt(113), .param_str = "E2UsUiUi", .properties = .{ .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } }, | ||
| 5368 | // __builtin_amdgcn_cvt_pk_u8_f32 | ||
| 5369 | .{ .tag = @enumFromInt(114), .param_str = "UifUiUi", .properties = .{ .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } }, | ||
| 5370 | // __builtin_amdgcn_cvt_pknorm_i16 | ||
| 5371 | .{ .tag = @enumFromInt(115), .param_str = "E2sff", .properties = .{ .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } }, | ||
| 5372 | // __builtin_amdgcn_cvt_pknorm_u16 | ||
| 5373 | .{ .tag = @enumFromInt(116), .param_str = "E2Usff", .properties = .{ .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } }, | ||
| 5374 | // __builtin_amdgcn_cvt_pkrtz | ||
| 5375 | .{ .tag = @enumFromInt(117), .param_str = "E2hff", .properties = .{ .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } }, | ||
| 5376 | // __builtin_amdgcn_dispatch_ptr | ||
| 5377 | .{ .tag = @enumFromInt(118), .param_str = "v*4", .properties = .{ .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } }, | ||
| 5378 | // __builtin_amdgcn_div_fixup | ||
| 5379 | .{ .tag = @enumFromInt(119), .param_str = "dddd", .properties = .{ .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } }, | ||
| 5380 | // __builtin_amdgcn_div_fixupf | ||
| 5381 | .{ .tag = @enumFromInt(120), .param_str = "ffff", .properties = .{ .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } }, | ||
| 5382 | // __builtin_amdgcn_div_fmas | ||
| 5383 | .{ .tag = @enumFromInt(121), .param_str = "ddddb", .properties = .{ .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } }, | ||
| 5384 | // __builtin_amdgcn_div_fmasf | ||
| 5385 | .{ .tag = @enumFromInt(122), .param_str = "ffffb", .properties = .{ .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } }, | ||
| 5386 | // __builtin_amdgcn_div_scale | ||
| 5387 | .{ .tag = @enumFromInt(123), .param_str = "dddbb*", .properties = .{ .target_set = TargetSet.initOne(.amdgpu) } }, | ||
| 5388 | // __builtin_amdgcn_div_scalef | ||
| 5389 | .{ .tag = @enumFromInt(124), .param_str = "fffbb*", .properties = .{ .target_set = TargetSet.initOne(.amdgpu) } }, | ||
| 5390 | // __builtin_amdgcn_ds_append | ||
| 5391 | .{ .tag = @enumFromInt(125), .param_str = "ii*3", .properties = .{ .target_set = TargetSet.initOne(.amdgpu) } }, | ||
| 5392 | // __builtin_amdgcn_ds_bpermute | ||
| 5393 | .{ .tag = @enumFromInt(126), .param_str = "iii", .properties = .{ .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } }, | ||
| 5394 | // __builtin_amdgcn_ds_consume | ||
| 5395 | .{ .tag = @enumFromInt(127), .param_str = "ii*3", .properties = .{ .target_set = TargetSet.initOne(.amdgpu) } }, | ||
| 5396 | // __builtin_amdgcn_ds_faddf | ||
| 5397 | .{ .tag = @enumFromInt(128), .param_str = "ff*3fIiIiIb", .properties = .{ .target_set = TargetSet.initOne(.amdgpu) } }, | ||
| 5398 | // __builtin_amdgcn_ds_fmaxf | ||
| 5399 | .{ .tag = @enumFromInt(129), .param_str = "ff*3fIiIiIb", .properties = .{ .target_set = TargetSet.initOne(.amdgpu) } }, | ||
| 5400 | // __builtin_amdgcn_ds_fminf | ||
| 5401 | .{ .tag = @enumFromInt(130), .param_str = "ff*3fIiIiIb", .properties = .{ .target_set = TargetSet.initOne(.amdgpu) } }, | ||
| 5402 | // __builtin_amdgcn_ds_permute | ||
| 5403 | .{ .tag = @enumFromInt(131), .param_str = "iii", .properties = .{ .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } }, | ||
| 5404 | // __builtin_amdgcn_ds_swizzle | ||
| 5405 | .{ .tag = @enumFromInt(132), .param_str = "iiIi", .properties = .{ .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } }, | ||
| 5406 | // __builtin_amdgcn_endpgm | ||
| 5407 | .{ .tag = @enumFromInt(133), .param_str = "v", .properties = .{ .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .noreturn = true } } }, | ||
| 5408 | // __builtin_amdgcn_exp2f | ||
| 5409 | .{ .tag = @enumFromInt(134), .param_str = "ff", .properties = .{ .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } }, | ||
| 5410 | // __builtin_amdgcn_fcmp | ||
| 5411 | .{ .tag = @enumFromInt(135), .param_str = "WUiddIi", .properties = .{ .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } }, | ||
| 5412 | // __builtin_amdgcn_fcmpf | ||
| 5413 | .{ .tag = @enumFromInt(136), .param_str = "WUiffIi", .properties = .{ .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } }, | ||
| 5414 | // __builtin_amdgcn_fence | ||
| 5415 | .{ .tag = @enumFromInt(137), .param_str = "vUicC*", .properties = .{ .target_set = TargetSet.initOne(.amdgpu) } }, | ||
| 5416 | // __builtin_amdgcn_fmed3f | ||
| 5417 | .{ .tag = @enumFromInt(138), .param_str = "ffff", .properties = .{ .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } }, | ||
| 5418 | // __builtin_amdgcn_fract | ||
| 5419 | .{ .tag = @enumFromInt(139), .param_str = "dd", .properties = .{ .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } }, | ||
| 5420 | // __builtin_amdgcn_fractf | ||
| 5421 | .{ .tag = @enumFromInt(140), .param_str = "ff", .properties = .{ .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } }, | ||
| 5422 | // __builtin_amdgcn_frexp_exp | ||
| 5423 | .{ .tag = @enumFromInt(141), .param_str = "id", .properties = .{ .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } }, | ||
| 5424 | // __builtin_amdgcn_frexp_expf | ||
| 5425 | .{ .tag = @enumFromInt(142), .param_str = "if", .properties = .{ .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } }, | ||
| 5426 | // __builtin_amdgcn_frexp_mant | ||
| 5427 | .{ .tag = @enumFromInt(143), .param_str = "dd", .properties = .{ .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } }, | ||
| 5428 | // __builtin_amdgcn_frexp_mantf | ||
| 5429 | .{ .tag = @enumFromInt(144), .param_str = "ff", .properties = .{ .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } }, | ||
| 5430 | // __builtin_amdgcn_grid_size_x | ||
| 5431 | .{ .tag = @enumFromInt(145), .param_str = "Ui", .properties = .{ .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } }, | ||
| 5432 | // __builtin_amdgcn_grid_size_y | ||
| 5433 | .{ .tag = @enumFromInt(146), .param_str = "Ui", .properties = .{ .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } }, | ||
| 5434 | // __builtin_amdgcn_grid_size_z | ||
| 5435 | .{ .tag = @enumFromInt(147), .param_str = "Ui", .properties = .{ .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } }, | ||
| 5436 | // __builtin_amdgcn_groupstaticsize | ||
| 5437 | .{ .tag = @enumFromInt(148), .param_str = "Ui", .properties = .{ .target_set = TargetSet.initOne(.amdgpu) } }, | ||
| 5438 | // __builtin_amdgcn_iglp_opt | ||
| 5439 | .{ .tag = @enumFromInt(149), .param_str = "vIi", .properties = .{ .target_set = TargetSet.initOne(.amdgpu) } }, | ||
| 5440 | // __builtin_amdgcn_implicitarg_ptr | ||
| 5441 | .{ .tag = @enumFromInt(150), .param_str = "v*4", .properties = .{ .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } }, | ||
| 5442 | // __builtin_amdgcn_interp_mov | ||
| 5443 | .{ .tag = @enumFromInt(151), .param_str = "fUiUiUiUi", .properties = .{ .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } }, | ||
| 5444 | // __builtin_amdgcn_interp_p1 | ||
| 5445 | .{ .tag = @enumFromInt(152), .param_str = "ffUiUiUi", .properties = .{ .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } }, | ||
| 5446 | // __builtin_amdgcn_interp_p1_f16 | ||
| 5447 | .{ .tag = @enumFromInt(153), .param_str = "ffUiUibUi", .properties = .{ .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } }, | ||
| 5448 | // __builtin_amdgcn_interp_p2 | ||
| 5449 | .{ .tag = @enumFromInt(154), .param_str = "fffUiUiUi", .properties = .{ .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } }, | ||
| 5450 | // __builtin_amdgcn_interp_p2_f16 | ||
| 5451 | .{ .tag = @enumFromInt(155), .param_str = "hffUiUibUi", .properties = .{ .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } }, | ||
| 5452 | // __builtin_amdgcn_is_private | ||
| 5453 | .{ .tag = @enumFromInt(156), .param_str = "bvC*0", .properties = .{ .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } }, | ||
| 5454 | // __builtin_amdgcn_is_shared | ||
| 5455 | .{ .tag = @enumFromInt(157), .param_str = "bvC*0", .properties = .{ .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } }, | ||
| 5456 | // __builtin_amdgcn_kernarg_segment_ptr | ||
| 5457 | .{ .tag = @enumFromInt(158), .param_str = "v*4", .properties = .{ .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } }, | ||
| 5458 | // __builtin_amdgcn_ldexp | ||
| 5459 | .{ .tag = @enumFromInt(159), .param_str = "ddi", .properties = .{ .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } }, | ||
| 5460 | // __builtin_amdgcn_ldexpf | ||
| 5461 | .{ .tag = @enumFromInt(160), .param_str = "ffi", .properties = .{ .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } }, | ||
| 5462 | // __builtin_amdgcn_lerp | ||
| 5463 | .{ .tag = @enumFromInt(161), .param_str = "UiUiUiUi", .properties = .{ .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } }, | ||
| 5464 | // __builtin_amdgcn_log_clampf | ||
| 5465 | .{ .tag = @enumFromInt(162), .param_str = "ff", .properties = .{ .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } }, | ||
| 5466 | // __builtin_amdgcn_logf | ||
| 5467 | .{ .tag = @enumFromInt(163), .param_str = "ff", .properties = .{ .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } }, | ||
| 5468 | // __builtin_amdgcn_mbcnt_hi | ||
| 5469 | .{ .tag = @enumFromInt(164), .param_str = "UiUiUi", .properties = .{ .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } }, | ||
| 5470 | // __builtin_amdgcn_mbcnt_lo | ||
| 5471 | .{ .tag = @enumFromInt(165), .param_str = "UiUiUi", .properties = .{ .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } }, | ||
| 5472 | // __builtin_amdgcn_mqsad_pk_u16_u8 | ||
| 5473 | .{ .tag = @enumFromInt(166), .param_str = "WUiWUiUiWUi", .properties = .{ .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } }, | ||
| 5474 | // __builtin_amdgcn_mqsad_u32_u8 | ||
| 5475 | .{ .tag = @enumFromInt(167), .param_str = "V4UiWUiUiV4Ui", .properties = .{ .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } }, | ||
| 5476 | // __builtin_amdgcn_msad_u8 | ||
| 5477 | .{ .tag = @enumFromInt(168), .param_str = "UiUiUiUi", .properties = .{ .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } }, | ||
| 5478 | // __builtin_amdgcn_qsad_pk_u16_u8 | ||
| 5479 | .{ .tag = @enumFromInt(169), .param_str = "WUiWUiUiWUi", .properties = .{ .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } }, | ||
| 5480 | // __builtin_amdgcn_queue_ptr | ||
| 5481 | .{ .tag = @enumFromInt(170), .param_str = "v*4", .properties = .{ .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } }, | ||
| 5482 | // __builtin_amdgcn_rcp | ||
| 5483 | .{ .tag = @enumFromInt(171), .param_str = "dd", .properties = .{ .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } }, | ||
| 5484 | // __builtin_amdgcn_rcpf | ||
| 5485 | .{ .tag = @enumFromInt(172), .param_str = "ff", .properties = .{ .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } }, | ||
| 5486 | // __builtin_amdgcn_read_exec | ||
| 5487 | .{ .tag = @enumFromInt(173), .param_str = "WUi", .properties = .{ .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } }, | ||
| 5488 | // __builtin_amdgcn_read_exec_hi | ||
| 5489 | .{ .tag = @enumFromInt(174), .param_str = "Ui", .properties = .{ .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } }, | ||
| 5490 | // __builtin_amdgcn_read_exec_lo | ||
| 5491 | .{ .tag = @enumFromInt(175), .param_str = "Ui", .properties = .{ .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } }, | ||
| 5492 | // __builtin_amdgcn_readfirstlane | ||
| 5493 | .{ .tag = @enumFromInt(176), .param_str = "ii", .properties = .{ .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } }, | ||
| 5494 | // __builtin_amdgcn_readlane | ||
| 5495 | .{ .tag = @enumFromInt(177), .param_str = "iii", .properties = .{ .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } }, | ||
| 5496 | // __builtin_amdgcn_rsq | ||
| 5497 | .{ .tag = @enumFromInt(178), .param_str = "dd", .properties = .{ .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } }, | ||
| 5498 | // __builtin_amdgcn_rsq_clamp | ||
| 5499 | .{ .tag = @enumFromInt(179), .param_str = "dd", .properties = .{ .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } }, | ||
| 5500 | // __builtin_amdgcn_rsq_clampf | ||
| 5501 | .{ .tag = @enumFromInt(180), .param_str = "ff", .properties = .{ .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } }, | ||
| 5502 | // __builtin_amdgcn_rsqf | ||
| 5503 | .{ .tag = @enumFromInt(181), .param_str = "ff", .properties = .{ .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } }, | ||
| 5504 | // __builtin_amdgcn_s_barrier | ||
| 5505 | .{ .tag = @enumFromInt(182), .param_str = "v", .properties = .{ .target_set = TargetSet.initOne(.amdgpu) } }, | ||
| 5506 | // __builtin_amdgcn_s_dcache_inv | ||
| 5507 | .{ .tag = @enumFromInt(183), .param_str = "v", .properties = .{ .target_set = TargetSet.initOne(.amdgpu) } }, | ||
| 5508 | // __builtin_amdgcn_s_decperflevel | ||
| 5509 | .{ .tag = @enumFromInt(184), .param_str = "vIi", .properties = .{ .target_set = TargetSet.initOne(.amdgpu) } }, | ||
| 5510 | // __builtin_amdgcn_s_getpc | ||
| 5511 | .{ .tag = @enumFromInt(185), .param_str = "WUi", .properties = .{ .target_set = TargetSet.initOne(.amdgpu) } }, | ||
| 5512 | // __builtin_amdgcn_s_getreg | ||
| 5513 | .{ .tag = @enumFromInt(186), .param_str = "UiIi", .properties = .{ .target_set = TargetSet.initOne(.amdgpu) } }, | ||
| 5514 | // __builtin_amdgcn_s_incperflevel | ||
| 5515 | .{ .tag = @enumFromInt(187), .param_str = "vIi", .properties = .{ .target_set = TargetSet.initOne(.amdgpu) } }, | ||
| 5516 | // __builtin_amdgcn_s_sendmsg | ||
| 5517 | .{ .tag = @enumFromInt(188), .param_str = "vIiUi", .properties = .{ .target_set = TargetSet.initOne(.amdgpu) } }, | ||
| 5518 | // __builtin_amdgcn_s_sendmsghalt | ||
| 5519 | .{ .tag = @enumFromInt(189), .param_str = "vIiUi", .properties = .{ .target_set = TargetSet.initOne(.amdgpu) } }, | ||
| 5520 | // __builtin_amdgcn_s_setprio | ||
| 5521 | .{ .tag = @enumFromInt(190), .param_str = "vIs", .properties = .{ .target_set = TargetSet.initOne(.amdgpu) } }, | ||
| 5522 | // __builtin_amdgcn_s_setreg | ||
| 5523 | .{ .tag = @enumFromInt(191), .param_str = "vIiUi", .properties = .{ .target_set = TargetSet.initOne(.amdgpu) } }, | ||
| 5524 | // __builtin_amdgcn_s_sleep | ||
| 5525 | .{ .tag = @enumFromInt(192), .param_str = "vIi", .properties = .{ .target_set = TargetSet.initOne(.amdgpu) } }, | ||
| 5526 | // __builtin_amdgcn_s_waitcnt | ||
| 5527 | .{ .tag = @enumFromInt(193), .param_str = "vIi", .properties = .{ .target_set = TargetSet.initOne(.amdgpu) } }, | ||
| 5528 | // __builtin_amdgcn_sad_hi_u8 | ||
| 5529 | .{ .tag = @enumFromInt(194), .param_str = "UiUiUiUi", .properties = .{ .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } }, | ||
| 5530 | // __builtin_amdgcn_sad_u16 | ||
| 5531 | .{ .tag = @enumFromInt(195), .param_str = "UiUiUiUi", .properties = .{ .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } }, | ||
| 5532 | // __builtin_amdgcn_sad_u8 | ||
| 5533 | .{ .tag = @enumFromInt(196), .param_str = "UiUiUiUi", .properties = .{ .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } }, | ||
| 5534 | // __builtin_amdgcn_sbfe | ||
| 5535 | .{ .tag = @enumFromInt(197), .param_str = "UiUiUiUi", .properties = .{ .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } }, | ||
| 5536 | // __builtin_amdgcn_sched_barrier | ||
| 5537 | .{ .tag = @enumFromInt(198), .param_str = "vIi", .properties = .{ .target_set = TargetSet.initOne(.amdgpu) } }, | ||
| 5538 | // __builtin_amdgcn_sched_group_barrier | ||
| 5539 | .{ .tag = @enumFromInt(199), .param_str = "vIiIiIi", .properties = .{ .target_set = TargetSet.initOne(.amdgpu) } }, | ||
| 5540 | // __builtin_amdgcn_sicmp | ||
| 5541 | .{ .tag = @enumFromInt(200), .param_str = "WUiiiIi", .properties = .{ .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } }, | ||
| 5542 | // __builtin_amdgcn_sicmpl | ||
| 5543 | .{ .tag = @enumFromInt(201), .param_str = "WUiWiWiIi", .properties = .{ .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } }, | ||
| 5544 | // __builtin_amdgcn_sinf | ||
| 5545 | .{ .tag = @enumFromInt(202), .param_str = "ff", .properties = .{ .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } }, | ||
| 5546 | // __builtin_amdgcn_sqrt | ||
| 5547 | .{ .tag = @enumFromInt(203), .param_str = "dd", .properties = .{ .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } }, | ||
| 5548 | // __builtin_amdgcn_sqrtf | ||
| 5549 | .{ .tag = @enumFromInt(204), .param_str = "ff", .properties = .{ .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } }, | ||
| 5550 | // __builtin_amdgcn_trig_preop | ||
| 5551 | .{ .tag = @enumFromInt(205), .param_str = "ddi", .properties = .{ .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } }, | ||
| 5552 | // __builtin_amdgcn_trig_preopf | ||
| 5553 | .{ .tag = @enumFromInt(206), .param_str = "ffi", .properties = .{ .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } }, | ||
| 5554 | // __builtin_amdgcn_ubfe | ||
| 5555 | .{ .tag = @enumFromInt(207), .param_str = "UiUiUiUi", .properties = .{ .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } }, | ||
| 5556 | // __builtin_amdgcn_uicmp | ||
| 5557 | .{ .tag = @enumFromInt(208), .param_str = "WUiUiUiIi", .properties = .{ .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } }, | ||
| 5558 | // __builtin_amdgcn_uicmpl | ||
| 5559 | .{ .tag = @enumFromInt(209), .param_str = "WUiWUiWUiIi", .properties = .{ .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } }, | ||
| 5560 | // __builtin_amdgcn_wave_barrier | ||
| 5561 | .{ .tag = @enumFromInt(210), .param_str = "v", .properties = .{ .target_set = TargetSet.initOne(.amdgpu) } }, | ||
| 5562 | // __builtin_amdgcn_workgroup_id_x | ||
| 5563 | .{ .tag = @enumFromInt(211), .param_str = "Ui", .properties = .{ .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } }, | ||
| 5564 | // __builtin_amdgcn_workgroup_id_y | ||
| 5565 | .{ .tag = @enumFromInt(212), .param_str = "Ui", .properties = .{ .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } }, | ||
| 5566 | // __builtin_amdgcn_workgroup_id_z | ||
| 5567 | .{ .tag = @enumFromInt(213), .param_str = "Ui", .properties = .{ .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } }, | ||
| 5568 | // __builtin_amdgcn_workgroup_size_x | ||
| 5569 | .{ .tag = @enumFromInt(214), .param_str = "Us", .properties = .{ .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } }, | ||
| 5570 | // __builtin_amdgcn_workgroup_size_y | ||
| 5571 | .{ .tag = @enumFromInt(215), .param_str = "Us", .properties = .{ .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } }, | ||
| 5572 | // __builtin_amdgcn_workgroup_size_z | ||
| 5573 | .{ .tag = @enumFromInt(216), .param_str = "Us", .properties = .{ .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } }, | ||
| 5574 | // __builtin_amdgcn_workitem_id_x | ||
| 5575 | .{ .tag = @enumFromInt(217), .param_str = "Ui", .properties = .{ .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } }, | ||
| 5576 | // __builtin_amdgcn_workitem_id_y | ||
| 5577 | .{ .tag = @enumFromInt(218), .param_str = "Ui", .properties = .{ .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } }, | ||
| 5578 | // __builtin_amdgcn_workitem_id_z | ||
| 5579 | .{ .tag = @enumFromInt(219), .param_str = "Ui", .properties = .{ .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } }, | ||
| 5580 | // __builtin_annotation | ||
| 5581 | .{ .tag = @enumFromInt(220), .param_str = "v.", .properties = .{ .attributes = .{ .custom_typecheck = true } } }, | ||
| 5582 | // __builtin_arm_cdp | ||
| 5583 | .{ .tag = @enumFromInt(221), .param_str = "vUIiUIiUIiUIiUIiUIi", .properties = .{ .target_set = TargetSet.initOne(.arm) } }, | ||
| 5584 | // __builtin_arm_cdp2 | ||
| 5585 | .{ .tag = @enumFromInt(222), .param_str = "vUIiUIiUIiUIiUIiUIi", .properties = .{ .target_set = TargetSet.initOne(.arm) } }, | ||
| 5586 | // __builtin_arm_clrex | ||
| 5587 | .{ .tag = @enumFromInt(223), .param_str = "v", .properties = .{ .target_set = TargetSet.initMany(&.{ .aarch64, .arm }) } }, | ||
| 5588 | // __builtin_arm_cls | ||
| 5589 | .{ .tag = @enumFromInt(224), .param_str = "UiZUi", .properties = .{ .target_set = TargetSet.initMany(&.{ .aarch64, .arm }), .attributes = .{ .@"const" = true } } }, | ||
| 5590 | // __builtin_arm_cls64 | ||
| 5591 | .{ .tag = @enumFromInt(225), .param_str = "UiWUi", .properties = .{ .target_set = TargetSet.initMany(&.{ .aarch64, .arm }), .attributes = .{ .@"const" = true } } }, | ||
| 5592 | // __builtin_arm_clz | ||
| 5593 | .{ .tag = @enumFromInt(226), .param_str = "UiZUi", .properties = .{ .target_set = TargetSet.initMany(&.{ .aarch64, .arm }), .attributes = .{ .@"const" = true } } }, | ||
| 5594 | // __builtin_arm_clz64 | ||
| 5595 | .{ .tag = @enumFromInt(227), .param_str = "UiWUi", .properties = .{ .target_set = TargetSet.initMany(&.{ .aarch64, .arm }), .attributes = .{ .@"const" = true } } }, | ||
| 5596 | // __builtin_arm_cmse_TT | ||
| 5597 | .{ .tag = @enumFromInt(228), .param_str = "Uiv*", .properties = .{ .target_set = TargetSet.initOne(.arm) } }, | ||
| 5598 | // __builtin_arm_cmse_TTA | ||
| 5599 | .{ .tag = @enumFromInt(229), .param_str = "Uiv*", .properties = .{ .target_set = TargetSet.initOne(.arm) } }, | ||
| 5600 | // __builtin_arm_cmse_TTAT | ||
| 5601 | .{ .tag = @enumFromInt(230), .param_str = "Uiv*", .properties = .{ .target_set = TargetSet.initOne(.arm) } }, | ||
| 5602 | // __builtin_arm_cmse_TTT | ||
| 5603 | .{ .tag = @enumFromInt(231), .param_str = "Uiv*", .properties = .{ .target_set = TargetSet.initOne(.arm) } }, | ||
| 5604 | // __builtin_arm_dbg | ||
| 5605 | .{ .tag = @enumFromInt(232), .param_str = "vUi", .properties = .{ .target_set = TargetSet.initOne(.arm) } }, | ||
| 5606 | // __builtin_arm_dmb | ||
| 5607 | .{ .tag = @enumFromInt(233), .param_str = "vUi", .properties = .{ .target_set = TargetSet.initMany(&.{ .aarch64, .arm }), .attributes = .{ .@"const" = true } } }, | ||
| 5608 | // __builtin_arm_dsb | ||
| 5609 | .{ .tag = @enumFromInt(234), .param_str = "vUi", .properties = .{ .target_set = TargetSet.initMany(&.{ .aarch64, .arm }), .attributes = .{ .@"const" = true } } }, | ||
| 5610 | // __builtin_arm_get_fpscr | ||
| 5611 | .{ .tag = @enumFromInt(235), .param_str = "Ui", .properties = .{ .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } }, | ||
| 5612 | // __builtin_arm_isb | ||
| 5613 | .{ .tag = @enumFromInt(236), .param_str = "vUi", .properties = .{ .target_set = TargetSet.initMany(&.{ .aarch64, .arm }), .attributes = .{ .@"const" = true } } }, | ||
| 5614 | // __builtin_arm_ldaex | ||
| 5615 | .{ .tag = @enumFromInt(237), .param_str = "v.", .properties = .{ .target_set = TargetSet.initMany(&.{ .aarch64, .arm }), .attributes = .{ .custom_typecheck = true } } }, | ||
| 5616 | // __builtin_arm_ldc | ||
| 5617 | .{ .tag = @enumFromInt(238), .param_str = "vUIiUIivC*", .properties = .{ .target_set = TargetSet.initOne(.arm) } }, | ||
| 5618 | // __builtin_arm_ldc2 | ||
| 5619 | .{ .tag = @enumFromInt(239), .param_str = "vUIiUIivC*", .properties = .{ .target_set = TargetSet.initOne(.arm) } }, | ||
| 5620 | // __builtin_arm_ldc2l | ||
| 5621 | .{ .tag = @enumFromInt(240), .param_str = "vUIiUIivC*", .properties = .{ .target_set = TargetSet.initOne(.arm) } }, | ||
| 5622 | // __builtin_arm_ldcl | ||
| 5623 | .{ .tag = @enumFromInt(241), .param_str = "vUIiUIivC*", .properties = .{ .target_set = TargetSet.initOne(.arm) } }, | ||
| 5624 | // __builtin_arm_ldrex | ||
| 5625 | .{ .tag = @enumFromInt(242), .param_str = "v.", .properties = .{ .target_set = TargetSet.initMany(&.{ .aarch64, .arm }), .attributes = .{ .custom_typecheck = true } } }, | ||
| 5626 | // __builtin_arm_ldrexd | ||
| 5627 | .{ .tag = @enumFromInt(243), .param_str = "LLUiv*", .properties = .{ .target_set = TargetSet.initOne(.arm) } }, | ||
| 5628 | // __builtin_arm_mcr | ||
| 5629 | .{ .tag = @enumFromInt(244), .param_str = "vUIiUIiUiUIiUIiUIi", .properties = .{ .target_set = TargetSet.initOne(.arm) } }, | ||
| 5630 | // __builtin_arm_mcr2 | ||
| 5631 | .{ .tag = @enumFromInt(245), .param_str = "vUIiUIiUiUIiUIiUIi", .properties = .{ .target_set = TargetSet.initOne(.arm) } }, | ||
| 5632 | // __builtin_arm_mcrr | ||
| 5633 | .{ .tag = @enumFromInt(246), .param_str = "vUIiUIiLLUiUIi", .properties = .{ .target_set = TargetSet.initOne(.arm) } }, | ||
| 5634 | // __builtin_arm_mcrr2 | ||
| 5635 | .{ .tag = @enumFromInt(247), .param_str = "vUIiUIiLLUiUIi", .properties = .{ .target_set = TargetSet.initOne(.arm) } }, | ||
| 5636 | // __builtin_arm_mrc | ||
| 5637 | .{ .tag = @enumFromInt(248), .param_str = "UiUIiUIiUIiUIiUIi", .properties = .{ .target_set = TargetSet.initOne(.arm) } }, | ||
| 5638 | // __builtin_arm_mrc2 | ||
| 5639 | .{ .tag = @enumFromInt(249), .param_str = "UiUIiUIiUIiUIiUIi", .properties = .{ .target_set = TargetSet.initOne(.arm) } }, | ||
| 5640 | // __builtin_arm_mrrc | ||
| 5641 | .{ .tag = @enumFromInt(250), .param_str = "LLUiUIiUIiUIi", .properties = .{ .target_set = TargetSet.initOne(.arm) } }, | ||
| 5642 | // __builtin_arm_mrrc2 | ||
| 5643 | .{ .tag = @enumFromInt(251), .param_str = "LLUiUIiUIiUIi", .properties = .{ .target_set = TargetSet.initOne(.arm) } }, | ||
| 5644 | // __builtin_arm_nop | ||
| 5645 | .{ .tag = @enumFromInt(252), .param_str = "v", .properties = .{ .target_set = TargetSet.initMany(&.{ .aarch64, .arm }) } }, | ||
| 5646 | // __builtin_arm_prefetch | ||
| 5647 | .{ .tag = @enumFromInt(253), .param_str = "!", .properties = .{ .target_set = TargetSet.initMany(&.{ .aarch64, .arm }), .attributes = .{ .@"const" = true } } }, | ||
| 5648 | // __builtin_arm_qadd | ||
| 5649 | .{ .tag = @enumFromInt(254), .param_str = "iii", .properties = .{ .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } }, | ||
| 5650 | // __builtin_arm_qadd16 | ||
| 5651 | .{ .tag = @enumFromInt(255), .param_str = "iii", .properties = .{ .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } }, | ||
| 5652 | // __builtin_arm_qadd8 | ||
| 5653 | .{ .tag = @enumFromInt(256), .param_str = "iii", .properties = .{ .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } }, | ||
| 5654 | // __builtin_arm_qasx | ||
| 5655 | .{ .tag = @enumFromInt(257), .param_str = "iii", .properties = .{ .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } }, | ||
| 5656 | // __builtin_arm_qdbl | ||
| 5657 | .{ .tag = @enumFromInt(258), .param_str = "ii", .properties = .{ .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } }, | ||
| 5658 | // __builtin_arm_qsax | ||
| 5659 | .{ .tag = @enumFromInt(259), .param_str = "iii", .properties = .{ .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } }, | ||
| 5660 | // __builtin_arm_qsub | ||
| 5661 | .{ .tag = @enumFromInt(260), .param_str = "iii", .properties = .{ .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } }, | ||
| 5662 | // __builtin_arm_qsub16 | ||
| 5663 | .{ .tag = @enumFromInt(261), .param_str = "iii", .properties = .{ .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } }, | ||
| 5664 | // __builtin_arm_qsub8 | ||
| 5665 | .{ .tag = @enumFromInt(262), .param_str = "iii", .properties = .{ .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } }, | ||
| 5666 | // __builtin_arm_rbit | ||
| 5667 | .{ .tag = @enumFromInt(263), .param_str = "UiUi", .properties = .{ .target_set = TargetSet.initMany(&.{ .aarch64, .arm }), .attributes = .{ .@"const" = true } } }, | ||
| 5668 | // __builtin_arm_rbit64 | ||
| 5669 | .{ .tag = @enumFromInt(264), .param_str = "WUiWUi", .properties = .{ .target_set = TargetSet.initOne(.aarch64), .attributes = .{ .@"const" = true } } }, | ||
| 5670 | // __builtin_arm_rsr | ||
| 5671 | .{ .tag = @enumFromInt(265), .param_str = "UicC*", .properties = .{ .target_set = TargetSet.initMany(&.{ .aarch64, .arm }), .attributes = .{ .@"const" = true } } }, | ||
| 5672 | // __builtin_arm_rsr64 | ||
| 5673 | .{ .tag = @enumFromInt(266), .param_str = "!", .properties = .{ .target_set = TargetSet.initMany(&.{ .aarch64, .arm }), .attributes = .{ .@"const" = true } } }, | ||
| 5674 | // __builtin_arm_rsrp | ||
| 5675 | .{ .tag = @enumFromInt(267), .param_str = "v*cC*", .properties = .{ .target_set = TargetSet.initMany(&.{ .aarch64, .arm }), .attributes = .{ .@"const" = true } } }, | ||
| 5676 | // __builtin_arm_sadd16 | ||
| 5677 | .{ .tag = @enumFromInt(268), .param_str = "iii", .properties = .{ .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } }, | ||
| 5678 | // __builtin_arm_sadd8 | ||
| 5679 | .{ .tag = @enumFromInt(269), .param_str = "iii", .properties = .{ .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } }, | ||
| 5680 | // __builtin_arm_sasx | ||
| 5681 | .{ .tag = @enumFromInt(270), .param_str = "iii", .properties = .{ .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } }, | ||
| 5682 | // __builtin_arm_sel | ||
| 5683 | .{ .tag = @enumFromInt(271), .param_str = "iii", .properties = .{ .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } }, | ||
| 5684 | // __builtin_arm_set_fpscr | ||
| 5685 | .{ .tag = @enumFromInt(272), .param_str = "vUi", .properties = .{ .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } }, | ||
| 5686 | // __builtin_arm_sev | ||
| 5687 | .{ .tag = @enumFromInt(273), .param_str = "v", .properties = .{ .target_set = TargetSet.initMany(&.{ .aarch64, .arm }) } }, | ||
| 5688 | // __builtin_arm_sevl | ||
| 5689 | .{ .tag = @enumFromInt(274), .param_str = "v", .properties = .{ .target_set = TargetSet.initMany(&.{ .aarch64, .arm }) } }, | ||
| 5690 | // __builtin_arm_shadd16 | ||
| 5691 | .{ .tag = @enumFromInt(275), .param_str = "iii", .properties = .{ .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } }, | ||
| 5692 | // __builtin_arm_shadd8 | ||
| 5693 | .{ .tag = @enumFromInt(276), .param_str = "iii", .properties = .{ .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } }, | ||
| 5694 | // __builtin_arm_shasx | ||
| 5695 | .{ .tag = @enumFromInt(277), .param_str = "iii", .properties = .{ .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } }, | ||
| 5696 | // __builtin_arm_shsax | ||
| 5697 | .{ .tag = @enumFromInt(278), .param_str = "iii", .properties = .{ .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } }, | ||
| 5698 | // __builtin_arm_shsub16 | ||
| 5699 | .{ .tag = @enumFromInt(279), .param_str = "iii", .properties = .{ .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } }, | ||
| 5700 | // __builtin_arm_shsub8 | ||
| 5701 | .{ .tag = @enumFromInt(280), .param_str = "iii", .properties = .{ .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } }, | ||
| 5702 | // __builtin_arm_smlabb | ||
| 5703 | .{ .tag = @enumFromInt(281), .param_str = "iiii", .properties = .{ .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } }, | ||
| 5704 | // __builtin_arm_smlabt | ||
| 5705 | .{ .tag = @enumFromInt(282), .param_str = "iiii", .properties = .{ .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } }, | ||
| 5706 | // __builtin_arm_smlad | ||
| 5707 | .{ .tag = @enumFromInt(283), .param_str = "iiii", .properties = .{ .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } }, | ||
| 5708 | // __builtin_arm_smladx | ||
| 5709 | .{ .tag = @enumFromInt(284), .param_str = "iiii", .properties = .{ .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } }, | ||
| 5710 | // __builtin_arm_smlald | ||
| 5711 | .{ .tag = @enumFromInt(285), .param_str = "LLiiiLLi", .properties = .{ .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } }, | ||
| 5712 | // __builtin_arm_smlaldx | ||
| 5713 | .{ .tag = @enumFromInt(286), .param_str = "LLiiiLLi", .properties = .{ .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } }, | ||
| 5714 | // __builtin_arm_smlatb | ||
| 5715 | .{ .tag = @enumFromInt(287), .param_str = "iiii", .properties = .{ .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } }, | ||
| 5716 | // __builtin_arm_smlatt | ||
| 5717 | .{ .tag = @enumFromInt(288), .param_str = "iiii", .properties = .{ .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } }, | ||
| 5718 | // __builtin_arm_smlawb | ||
| 5719 | .{ .tag = @enumFromInt(289), .param_str = "iiii", .properties = .{ .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } }, | ||
| 5720 | // __builtin_arm_smlawt | ||
| 5721 | .{ .tag = @enumFromInt(290), .param_str = "iiii", .properties = .{ .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } }, | ||
| 5722 | // __builtin_arm_smlsd | ||
| 5723 | .{ .tag = @enumFromInt(291), .param_str = "iiii", .properties = .{ .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } }, | ||
| 5724 | // __builtin_arm_smlsdx | ||
| 5725 | .{ .tag = @enumFromInt(292), .param_str = "iiii", .properties = .{ .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } }, | ||
| 5726 | // __builtin_arm_smlsld | ||
| 5727 | .{ .tag = @enumFromInt(293), .param_str = "LLiiiLLi", .properties = .{ .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } }, | ||
| 5728 | // __builtin_arm_smlsldx | ||
| 5729 | .{ .tag = @enumFromInt(294), .param_str = "LLiiiLLi", .properties = .{ .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } }, | ||
| 5730 | // __builtin_arm_smuad | ||
| 5731 | .{ .tag = @enumFromInt(295), .param_str = "iii", .properties = .{ .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } }, | ||
| 5732 | // __builtin_arm_smuadx | ||
| 5733 | .{ .tag = @enumFromInt(296), .param_str = "iii", .properties = .{ .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } }, | ||
| 5734 | // __builtin_arm_smulbb | ||
| 5735 | .{ .tag = @enumFromInt(297), .param_str = "iii", .properties = .{ .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } }, | ||
| 5736 | // __builtin_arm_smulbt | ||
| 5737 | .{ .tag = @enumFromInt(298), .param_str = "iii", .properties = .{ .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } }, | ||
| 5738 | // __builtin_arm_smultb | ||
| 5739 | .{ .tag = @enumFromInt(299), .param_str = "iii", .properties = .{ .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } }, | ||
| 5740 | // __builtin_arm_smultt | ||
| 5741 | .{ .tag = @enumFromInt(300), .param_str = "iii", .properties = .{ .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } }, | ||
| 5742 | // __builtin_arm_smulwb | ||
| 5743 | .{ .tag = @enumFromInt(301), .param_str = "iii", .properties = .{ .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } }, | ||
| 5744 | // __builtin_arm_smulwt | ||
| 5745 | .{ .tag = @enumFromInt(302), .param_str = "iii", .properties = .{ .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } }, | ||
| 5746 | // __builtin_arm_smusd | ||
| 5747 | .{ .tag = @enumFromInt(303), .param_str = "iii", .properties = .{ .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } }, | ||
| 5748 | // __builtin_arm_smusdx | ||
| 5749 | .{ .tag = @enumFromInt(304), .param_str = "iii", .properties = .{ .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } }, | ||
| 5750 | // __builtin_arm_ssat | ||
| 5751 | .{ .tag = @enumFromInt(305), .param_str = "iiUi", .properties = .{ .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } }, | ||
| 5752 | // __builtin_arm_ssat16 | ||
| 5753 | .{ .tag = @enumFromInt(306), .param_str = "iii", .properties = .{ .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } }, | ||
| 5754 | // __builtin_arm_ssax | ||
| 5755 | .{ .tag = @enumFromInt(307), .param_str = "iii", .properties = .{ .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } }, | ||
| 5756 | // __builtin_arm_ssub16 | ||
| 5757 | .{ .tag = @enumFromInt(308), .param_str = "iii", .properties = .{ .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } }, | ||
| 5758 | // __builtin_arm_ssub8 | ||
| 5759 | .{ .tag = @enumFromInt(309), .param_str = "iii", .properties = .{ .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } }, | ||
| 5760 | // __builtin_arm_stc | ||
| 5761 | .{ .tag = @enumFromInt(310), .param_str = "vUIiUIiv*", .properties = .{ .target_set = TargetSet.initOne(.arm) } }, | ||
| 5762 | // __builtin_arm_stc2 | ||
| 5763 | .{ .tag = @enumFromInt(311), .param_str = "vUIiUIiv*", .properties = .{ .target_set = TargetSet.initOne(.arm) } }, | ||
| 5764 | // __builtin_arm_stc2l | ||
| 5765 | .{ .tag = @enumFromInt(312), .param_str = "vUIiUIiv*", .properties = .{ .target_set = TargetSet.initOne(.arm) } }, | ||
| 5766 | // __builtin_arm_stcl | ||
| 5767 | .{ .tag = @enumFromInt(313), .param_str = "vUIiUIiv*", .properties = .{ .target_set = TargetSet.initOne(.arm) } }, | ||
| 5768 | // __builtin_arm_stlex | ||
| 5769 | .{ .tag = @enumFromInt(314), .param_str = "i.", .properties = .{ .target_set = TargetSet.initMany(&.{ .aarch64, .arm }), .attributes = .{ .custom_typecheck = true } } }, | ||
| 5770 | // __builtin_arm_strex | ||
| 5771 | .{ .tag = @enumFromInt(315), .param_str = "i.", .properties = .{ .target_set = TargetSet.initMany(&.{ .aarch64, .arm }), .attributes = .{ .custom_typecheck = true } } }, | ||
| 5772 | // __builtin_arm_strexd | ||
| 5773 | .{ .tag = @enumFromInt(316), .param_str = "iLLUiv*", .properties = .{ .target_set = TargetSet.initOne(.arm) } }, | ||
| 5774 | // __builtin_arm_sxtab16 | ||
| 5775 | .{ .tag = @enumFromInt(317), .param_str = "iii", .properties = .{ .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } }, | ||
| 5776 | // __builtin_arm_sxtb16 | ||
| 5777 | .{ .tag = @enumFromInt(318), .param_str = "ii", .properties = .{ .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } }, | ||
| 5778 | // __builtin_arm_tcancel | ||
| 5779 | .{ .tag = @enumFromInt(319), .param_str = "vWUIi", .properties = .{ .target_set = TargetSet.initOne(.aarch64) } }, | ||
| 5780 | // __builtin_arm_tcommit | ||
| 5781 | .{ .tag = @enumFromInt(320), .param_str = "v", .properties = .{ .target_set = TargetSet.initOne(.aarch64) } }, | ||
| 5782 | // __builtin_arm_tstart | ||
| 5783 | .{ .tag = @enumFromInt(321), .param_str = "WUi", .properties = .{ .target_set = TargetSet.initOne(.aarch64), .attributes = .{ .returns_twice = true } } }, | ||
| 5784 | // __builtin_arm_ttest | ||
| 5785 | .{ .tag = @enumFromInt(322), .param_str = "WUi", .properties = .{ .target_set = TargetSet.initOne(.aarch64), .attributes = .{ .@"const" = true } } }, | ||
| 5786 | // __builtin_arm_uadd16 | ||
| 5787 | .{ .tag = @enumFromInt(323), .param_str = "UiUiUi", .properties = .{ .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } }, | ||
| 5788 | // __builtin_arm_uadd8 | ||
| 5789 | .{ .tag = @enumFromInt(324), .param_str = "UiUiUi", .properties = .{ .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } }, | ||
| 5790 | // __builtin_arm_uasx | ||
| 5791 | .{ .tag = @enumFromInt(325), .param_str = "UiUiUi", .properties = .{ .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } }, | ||
| 5792 | // __builtin_arm_uhadd16 | ||
| 5793 | .{ .tag = @enumFromInt(326), .param_str = "UiUiUi", .properties = .{ .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } }, | ||
| 5794 | // __builtin_arm_uhadd8 | ||
| 5795 | .{ .tag = @enumFromInt(327), .param_str = "UiUiUi", .properties = .{ .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } }, | ||
| 5796 | // __builtin_arm_uhasx | ||
| 5797 | .{ .tag = @enumFromInt(328), .param_str = "UiUiUi", .properties = .{ .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } }, | ||
| 5798 | // __builtin_arm_uhsax | ||
| 5799 | .{ .tag = @enumFromInt(329), .param_str = "UiUiUi", .properties = .{ .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } }, | ||
| 5800 | // __builtin_arm_uhsub16 | ||
| 5801 | .{ .tag = @enumFromInt(330), .param_str = "UiUiUi", .properties = .{ .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } }, | ||
| 5802 | // __builtin_arm_uhsub8 | ||
| 5803 | .{ .tag = @enumFromInt(331), .param_str = "UiUiUi", .properties = .{ .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } }, | ||
| 5804 | // __builtin_arm_uqadd16 | ||
| 5805 | .{ .tag = @enumFromInt(332), .param_str = "UiUiUi", .properties = .{ .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } }, | ||
| 5806 | // __builtin_arm_uqadd8 | ||
| 5807 | .{ .tag = @enumFromInt(333), .param_str = "UiUiUi", .properties = .{ .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } }, | ||
| 5808 | // __builtin_arm_uqasx | ||
| 5809 | .{ .tag = @enumFromInt(334), .param_str = "UiUiUi", .properties = .{ .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } }, | ||
| 5810 | // __builtin_arm_uqsax | ||
| 5811 | .{ .tag = @enumFromInt(335), .param_str = "UiUiUi", .properties = .{ .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } }, | ||
| 5812 | // __builtin_arm_uqsub16 | ||
| 5813 | .{ .tag = @enumFromInt(336), .param_str = "UiUiUi", .properties = .{ .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } }, | ||
| 5814 | // __builtin_arm_uqsub8 | ||
| 5815 | .{ .tag = @enumFromInt(337), .param_str = "UiUiUi", .properties = .{ .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } }, | ||
| 5816 | // __builtin_arm_usad8 | ||
| 5817 | .{ .tag = @enumFromInt(338), .param_str = "UiUiUi", .properties = .{ .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } }, | ||
| 5818 | // __builtin_arm_usada8 | ||
| 5819 | .{ .tag = @enumFromInt(339), .param_str = "UiUiUiUi", .properties = .{ .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } }, | ||
| 5820 | // __builtin_arm_usat | ||
| 5821 | .{ .tag = @enumFromInt(340), .param_str = "UiiUi", .properties = .{ .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } }, | ||
| 5822 | // __builtin_arm_usat16 | ||
| 5823 | .{ .tag = @enumFromInt(341), .param_str = "iii", .properties = .{ .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } }, | ||
| 5824 | // __builtin_arm_usax | ||
| 5825 | .{ .tag = @enumFromInt(342), .param_str = "UiUiUi", .properties = .{ .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } }, | ||
| 5826 | // __builtin_arm_usub16 | ||
| 5827 | .{ .tag = @enumFromInt(343), .param_str = "UiUiUi", .properties = .{ .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } }, | ||
| 5828 | // __builtin_arm_usub8 | ||
| 5829 | .{ .tag = @enumFromInt(344), .param_str = "UiUiUi", .properties = .{ .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } }, | ||
| 5830 | // __builtin_arm_uxtab16 | ||
| 5831 | .{ .tag = @enumFromInt(345), .param_str = "iii", .properties = .{ .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } }, | ||
| 5832 | // __builtin_arm_uxtb16 | ||
| 5833 | .{ .tag = @enumFromInt(346), .param_str = "ii", .properties = .{ .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } }, | ||
| 5834 | // __builtin_arm_vcvtr_d | ||
| 5835 | .{ .tag = @enumFromInt(347), .param_str = "fdi", .properties = .{ .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } }, | ||
| 5836 | // __builtin_arm_vcvtr_f | ||
| 5837 | .{ .tag = @enumFromInt(348), .param_str = "ffi", .properties = .{ .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } }, | ||
| 5838 | // __builtin_arm_wfe | ||
| 5839 | .{ .tag = @enumFromInt(349), .param_str = "v", .properties = .{ .target_set = TargetSet.initMany(&.{ .aarch64, .arm }) } }, | ||
| 5840 | // __builtin_arm_wfi | ||
| 5841 | .{ .tag = @enumFromInt(350), .param_str = "v", .properties = .{ .target_set = TargetSet.initMany(&.{ .aarch64, .arm }) } }, | ||
| 5842 | // __builtin_arm_wsr | ||
| 5843 | .{ .tag = @enumFromInt(351), .param_str = "vcC*Ui", .properties = .{ .target_set = TargetSet.initMany(&.{ .aarch64, .arm }), .attributes = .{ .@"const" = true } } }, | ||
| 5844 | // __builtin_arm_wsr64 | ||
| 5845 | .{ .tag = @enumFromInt(352), .param_str = "!", .properties = .{ .target_set = TargetSet.initMany(&.{ .aarch64, .arm }), .attributes = .{ .@"const" = true } } }, | ||
| 5846 | // __builtin_arm_wsrp | ||
| 5847 | .{ .tag = @enumFromInt(353), .param_str = "vcC*vC*", .properties = .{ .target_set = TargetSet.initMany(&.{ .aarch64, .arm }), .attributes = .{ .@"const" = true } } }, | ||
| 5848 | // __builtin_arm_yield | ||
| 5849 | .{ .tag = @enumFromInt(354), .param_str = "v", .properties = .{ .target_set = TargetSet.initMany(&.{ .aarch64, .arm }) } }, | ||
| 5850 | // __builtin_asin | ||
| 5851 | .{ .tag = @enumFromInt(355), .param_str = "dd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 5852 | // __builtin_asinf | ||
| 5853 | .{ .tag = @enumFromInt(356), .param_str = "ff", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 5854 | // __builtin_asinf128 | ||
| 5855 | .{ .tag = @enumFromInt(357), .param_str = "LLdLLd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 5856 | // __builtin_asinh | ||
| 5857 | .{ .tag = @enumFromInt(358), .param_str = "dd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 5858 | // __builtin_asinhf | ||
| 5859 | .{ .tag = @enumFromInt(359), .param_str = "ff", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 5860 | // __builtin_asinhf128 | ||
| 5861 | .{ .tag = @enumFromInt(360), .param_str = "LLdLLd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 5862 | // __builtin_asinhl | ||
| 5863 | .{ .tag = @enumFromInt(361), .param_str = "LdLd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 5864 | // __builtin_asinl | ||
| 5865 | .{ .tag = @enumFromInt(362), .param_str = "LdLd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 5866 | // __builtin_assume | ||
| 5867 | .{ .tag = @enumFromInt(363), .param_str = "vb", .properties = .{ .attributes = .{ .const_evaluable = true } } }, | ||
| 5868 | // __builtin_assume_aligned | ||
| 5869 | .{ .tag = @enumFromInt(364), .param_str = "v*vC*z.", .properties = .{ .attributes = .{ .@"const" = true, .custom_typecheck = true, .const_evaluable = true } } }, | ||
| 5870 | // __builtin_assume_separate_storage | ||
| 5871 | .{ .tag = @enumFromInt(365), .param_str = "vvCD*vCD*", .properties = .{ .attributes = .{ .const_evaluable = true } } }, | ||
| 5872 | // __builtin_atan | ||
| 5873 | .{ .tag = @enumFromInt(366), .param_str = "dd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 5874 | // __builtin_atan2 | ||
| 5875 | .{ .tag = @enumFromInt(367), .param_str = "ddd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 5876 | // __builtin_atan2f | ||
| 5877 | .{ .tag = @enumFromInt(368), .param_str = "fff", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 5878 | // __builtin_atan2f128 | ||
| 5879 | .{ .tag = @enumFromInt(369), .param_str = "LLdLLdLLd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 5880 | // __builtin_atan2l | ||
| 5881 | .{ .tag = @enumFromInt(370), .param_str = "LdLdLd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 5882 | // __builtin_atanf | ||
| 5883 | .{ .tag = @enumFromInt(371), .param_str = "ff", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 5884 | // __builtin_atanf128 | ||
| 5885 | .{ .tag = @enumFromInt(372), .param_str = "LLdLLd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 5886 | // __builtin_atanh | ||
| 5887 | .{ .tag = @enumFromInt(373), .param_str = "dd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 5888 | // __builtin_atanhf | ||
| 5889 | .{ .tag = @enumFromInt(374), .param_str = "ff", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 5890 | // __builtin_atanhf128 | ||
| 5891 | .{ .tag = @enumFromInt(375), .param_str = "LLdLLd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 5892 | // __builtin_atanhl | ||
| 5893 | .{ .tag = @enumFromInt(376), .param_str = "LdLd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 5894 | // __builtin_atanl | ||
| 5895 | .{ .tag = @enumFromInt(377), .param_str = "LdLd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 5896 | // __builtin_bcmp | ||
| 5897 | .{ .tag = @enumFromInt(378), .param_str = "ivC*vC*z", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_evaluable = true } } }, | ||
| 5898 | // __builtin_bcopy | ||
| 5899 | .{ .tag = @enumFromInt(379), .param_str = "vvC*v*z", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true } } }, | ||
| 5900 | // __builtin_bitrev | ||
| 5901 | .{ .tag = @enumFromInt(380), .param_str = "UiUi", .properties = .{ .target_set = TargetSet.initOne(.xcore), .attributes = .{ .@"const" = true } } }, | ||
| 5902 | // __builtin_bitreverse16 | ||
| 5903 | .{ .tag = @enumFromInt(381), .param_str = "UsUs", .properties = .{ .attributes = .{ .@"const" = true, .const_evaluable = true } } }, | ||
| 5904 | // __builtin_bitreverse32 | ||
| 5905 | .{ .tag = @enumFromInt(382), .param_str = "UZiUZi", .properties = .{ .attributes = .{ .@"const" = true, .const_evaluable = true } } }, | ||
| 5906 | // __builtin_bitreverse64 | ||
| 5907 | .{ .tag = @enumFromInt(383), .param_str = "UWiUWi", .properties = .{ .attributes = .{ .@"const" = true, .const_evaluable = true } } }, | ||
| 5908 | // __builtin_bitreverse8 | ||
| 5909 | .{ .tag = @enumFromInt(384), .param_str = "UcUc", .properties = .{ .attributes = .{ .@"const" = true, .const_evaluable = true } } }, | ||
| 5910 | // __builtin_bswap16 | ||
| 5911 | .{ .tag = @enumFromInt(385), .param_str = "UsUs", .properties = .{ .attributes = .{ .@"const" = true, .const_evaluable = true } } }, | ||
| 5912 | // __builtin_bswap32 | ||
| 5913 | .{ .tag = @enumFromInt(386), .param_str = "UZiUZi", .properties = .{ .attributes = .{ .@"const" = true, .const_evaluable = true } } }, | ||
| 5914 | // __builtin_bswap64 | ||
| 5915 | .{ .tag = @enumFromInt(387), .param_str = "UWiUWi", .properties = .{ .attributes = .{ .@"const" = true, .const_evaluable = true } } }, | ||
| 5916 | // __builtin_bzero | ||
| 5917 | .{ .tag = @enumFromInt(388), .param_str = "vv*z", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true } } }, | ||
| 5918 | // __builtin_cabs | ||
| 5919 | .{ .tag = @enumFromInt(389), .param_str = "dXd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 5920 | // __builtin_cabsf | ||
| 5921 | .{ .tag = @enumFromInt(390), .param_str = "fXf", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 5922 | // __builtin_cabsl | ||
| 5923 | .{ .tag = @enumFromInt(391), .param_str = "LdXLd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 5924 | // __builtin_cacos | ||
| 5925 | .{ .tag = @enumFromInt(392), .param_str = "XdXd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 5926 | // __builtin_cacosf | ||
| 5927 | .{ .tag = @enumFromInt(393), .param_str = "XfXf", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 5928 | // __builtin_cacosh | ||
| 5929 | .{ .tag = @enumFromInt(394), .param_str = "XdXd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 5930 | // __builtin_cacoshf | ||
| 5931 | .{ .tag = @enumFromInt(395), .param_str = "XfXf", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 5932 | // __builtin_cacoshl | ||
| 5933 | .{ .tag = @enumFromInt(396), .param_str = "XLdXLd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 5934 | // __builtin_cacosl | ||
| 5935 | .{ .tag = @enumFromInt(397), .param_str = "XLdXLd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 5936 | // __builtin_call_with_static_chain | ||
| 5937 | .{ .tag = @enumFromInt(398), .param_str = "v.", .properties = .{ .attributes = .{ .custom_typecheck = true } } }, | ||
| 5938 | // __builtin_calloc | ||
| 5939 | .{ .tag = @enumFromInt(399), .param_str = "v*zz", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true } } }, | ||
| 5940 | // __builtin_canonicalize | ||
| 5941 | .{ .tag = @enumFromInt(400), .param_str = "dd", .properties = .{ .attributes = .{ .@"const" = true } } }, | ||
| 5942 | // __builtin_canonicalizef | ||
| 5943 | .{ .tag = @enumFromInt(401), .param_str = "ff", .properties = .{ .attributes = .{ .@"const" = true } } }, | ||
| 5944 | // __builtin_canonicalizef16 | ||
| 5945 | .{ .tag = @enumFromInt(402), .param_str = "hh", .properties = .{ .attributes = .{ .@"const" = true } } }, | ||
| 5946 | // __builtin_canonicalizel | ||
| 5947 | .{ .tag = @enumFromInt(403), .param_str = "LdLd", .properties = .{ .attributes = .{ .@"const" = true } } }, | ||
| 5948 | // __builtin_carg | ||
| 5949 | .{ .tag = @enumFromInt(404), .param_str = "dXd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 5950 | // __builtin_cargf | ||
| 5951 | .{ .tag = @enumFromInt(405), .param_str = "fXf", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 5952 | // __builtin_cargl | ||
| 5953 | .{ .tag = @enumFromInt(406), .param_str = "LdXLd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 5954 | // __builtin_casin | ||
| 5955 | .{ .tag = @enumFromInt(407), .param_str = "XdXd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 5956 | // __builtin_casinf | ||
| 5957 | .{ .tag = @enumFromInt(408), .param_str = "XfXf", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 5958 | // __builtin_casinh | ||
| 5959 | .{ .tag = @enumFromInt(409), .param_str = "XdXd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 5960 | // __builtin_casinhf | ||
| 5961 | .{ .tag = @enumFromInt(410), .param_str = "XfXf", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 5962 | // __builtin_casinhl | ||
| 5963 | .{ .tag = @enumFromInt(411), .param_str = "XLdXLd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 5964 | // __builtin_casinl | ||
| 5965 | .{ .tag = @enumFromInt(412), .param_str = "XLdXLd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 5966 | // __builtin_catan | ||
| 5967 | .{ .tag = @enumFromInt(413), .param_str = "XdXd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 5968 | // __builtin_catanf | ||
| 5969 | .{ .tag = @enumFromInt(414), .param_str = "XfXf", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 5970 | // __builtin_catanh | ||
| 5971 | .{ .tag = @enumFromInt(415), .param_str = "XdXd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 5972 | // __builtin_catanhf | ||
| 5973 | .{ .tag = @enumFromInt(416), .param_str = "XfXf", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 5974 | // __builtin_catanhl | ||
| 5975 | .{ .tag = @enumFromInt(417), .param_str = "XLdXLd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 5976 | // __builtin_catanl | ||
| 5977 | .{ .tag = @enumFromInt(418), .param_str = "XLdXLd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 5978 | // __builtin_cbrt | ||
| 5979 | .{ .tag = @enumFromInt(419), .param_str = "dd", .properties = .{ .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } }, | ||
| 5980 | // __builtin_cbrtf | ||
| 5981 | .{ .tag = @enumFromInt(420), .param_str = "ff", .properties = .{ .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } }, | ||
| 5982 | // __builtin_cbrtf128 | ||
| 5983 | .{ .tag = @enumFromInt(421), .param_str = "LLdLLd", .properties = .{ .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } }, | ||
| 5984 | // __builtin_cbrtl | ||
| 5985 | .{ .tag = @enumFromInt(422), .param_str = "LdLd", .properties = .{ .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } }, | ||
| 5986 | // __builtin_ccos | ||
| 5987 | .{ .tag = @enumFromInt(423), .param_str = "XdXd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 5988 | // __builtin_ccosf | ||
| 5989 | .{ .tag = @enumFromInt(424), .param_str = "XfXf", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 5990 | // __builtin_ccosh | ||
| 5991 | .{ .tag = @enumFromInt(425), .param_str = "XdXd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 5992 | // __builtin_ccoshf | ||
| 5993 | .{ .tag = @enumFromInt(426), .param_str = "XfXf", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 5994 | // __builtin_ccoshl | ||
| 5995 | .{ .tag = @enumFromInt(427), .param_str = "XLdXLd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 5996 | // __builtin_ccosl | ||
| 5997 | .{ .tag = @enumFromInt(428), .param_str = "XLdXLd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 5998 | // __builtin_ceil | ||
| 5999 | .{ .tag = @enumFromInt(429), .param_str = "dd", .properties = .{ .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } }, | ||
| 6000 | // __builtin_ceilf | ||
| 6001 | .{ .tag = @enumFromInt(430), .param_str = "ff", .properties = .{ .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } }, | ||
| 6002 | // __builtin_ceilf128 | ||
| 6003 | .{ .tag = @enumFromInt(431), .param_str = "LLdLLd", .properties = .{ .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } }, | ||
| 6004 | // __builtin_ceilf16 | ||
| 6005 | .{ .tag = @enumFromInt(432), .param_str = "hh", .properties = .{ .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } }, | ||
| 6006 | // __builtin_ceill | ||
| 6007 | .{ .tag = @enumFromInt(433), .param_str = "LdLd", .properties = .{ .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } }, | ||
| 6008 | // __builtin_cexp | ||
| 6009 | .{ .tag = @enumFromInt(434), .param_str = "XdXd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 6010 | // __builtin_cexpf | ||
| 6011 | .{ .tag = @enumFromInt(435), .param_str = "XfXf", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 6012 | // __builtin_cexpl | ||
| 6013 | .{ .tag = @enumFromInt(436), .param_str = "XLdXLd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 6014 | // __builtin_char_memchr | ||
| 6015 | .{ .tag = @enumFromInt(437), .param_str = "c*cC*iz", .properties = .{ .attributes = .{ .const_evaluable = true } } }, | ||
| 6016 | // __builtin_cimag | ||
| 6017 | .{ .tag = @enumFromInt(438), .param_str = "dXd", .properties = .{ .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } }, | ||
| 6018 | // __builtin_cimagf | ||
| 6019 | .{ .tag = @enumFromInt(439), .param_str = "fXf", .properties = .{ .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } }, | ||
| 6020 | // __builtin_cimagl | ||
| 6021 | .{ .tag = @enumFromInt(440), .param_str = "LdXLd", .properties = .{ .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } }, | ||
| 6022 | // __builtin_classify_type | ||
| 6023 | .{ .tag = @enumFromInt(441), .param_str = "i.", .properties = .{ .attributes = .{ .@"const" = true, .custom_typecheck = true, .eval_args = false, .const_evaluable = true } } }, | ||
| 6024 | // __builtin_clog | ||
| 6025 | .{ .tag = @enumFromInt(442), .param_str = "XdXd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 6026 | // __builtin_clogf | ||
| 6027 | .{ .tag = @enumFromInt(443), .param_str = "XfXf", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 6028 | // __builtin_clogl | ||
| 6029 | .{ .tag = @enumFromInt(444), .param_str = "XLdXLd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 6030 | // __builtin_clrsb | ||
| 6031 | .{ .tag = @enumFromInt(445), .param_str = "ii", .properties = .{ .attributes = .{ .@"const" = true, .const_evaluable = true } } }, | ||
| 6032 | // __builtin_clrsbl | ||
| 6033 | .{ .tag = @enumFromInt(446), .param_str = "iLi", .properties = .{ .attributes = .{ .@"const" = true, .const_evaluable = true } } }, | ||
| 6034 | // __builtin_clrsbll | ||
| 6035 | .{ .tag = @enumFromInt(447), .param_str = "iLLi", .properties = .{ .attributes = .{ .@"const" = true, .const_evaluable = true } } }, | ||
| 6036 | // __builtin_clz | ||
| 6037 | .{ .tag = @enumFromInt(448), .param_str = "iUi", .properties = .{ .attributes = .{ .@"const" = true, .const_evaluable = true } } }, | ||
| 6038 | // __builtin_clzl | ||
| 6039 | .{ .tag = @enumFromInt(449), .param_str = "iULi", .properties = .{ .attributes = .{ .@"const" = true, .const_evaluable = true } } }, | ||
| 6040 | // __builtin_clzll | ||
| 6041 | .{ .tag = @enumFromInt(450), .param_str = "iULLi", .properties = .{ .attributes = .{ .@"const" = true, .const_evaluable = true } } }, | ||
| 6042 | // __builtin_clzs | ||
| 6043 | .{ .tag = @enumFromInt(451), .param_str = "iUs", .properties = .{ .attributes = .{ .@"const" = true, .const_evaluable = true } } }, | ||
| 6044 | // __builtin_complex | ||
| 6045 | .{ .tag = @enumFromInt(452), .param_str = "v.", .properties = .{ .attributes = .{ .@"const" = true, .custom_typecheck = true, .const_evaluable = true } } }, | ||
| 6046 | // __builtin_conj | ||
| 6047 | .{ .tag = @enumFromInt(453), .param_str = "XdXd", .properties = .{ .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } }, | ||
| 6048 | // __builtin_conjf | ||
| 6049 | .{ .tag = @enumFromInt(454), .param_str = "XfXf", .properties = .{ .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } }, | ||
| 6050 | // __builtin_conjl | ||
| 6051 | .{ .tag = @enumFromInt(455), .param_str = "XLdXLd", .properties = .{ .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } }, | ||
| 6052 | // __builtin_constant_p | ||
| 6053 | .{ .tag = @enumFromInt(456), .param_str = "i.", .properties = .{ .attributes = .{ .@"const" = true, .custom_typecheck = true, .eval_args = false, .const_evaluable = true } } }, | ||
| 6054 | // __builtin_convertvector | ||
| 6055 | .{ .tag = @enumFromInt(457), .param_str = "v.", .properties = .{ .attributes = .{ .@"const" = true, .custom_typecheck = true } } }, | ||
| 6056 | // __builtin_copysign | ||
| 6057 | .{ .tag = @enumFromInt(458), .param_str = "ddd", .properties = .{ .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } } }, | ||
| 6058 | // __builtin_copysignf | ||
| 6059 | .{ .tag = @enumFromInt(459), .param_str = "fff", .properties = .{ .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } } }, | ||
| 6060 | // __builtin_copysignf128 | ||
| 6061 | .{ .tag = @enumFromInt(460), .param_str = "LLdLLdLLd", .properties = .{ .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } } }, | ||
| 6062 | // __builtin_copysignf16 | ||
| 6063 | .{ .tag = @enumFromInt(461), .param_str = "hhh", .properties = .{ .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } }, | ||
| 6064 | // __builtin_copysignl | ||
| 6065 | .{ .tag = @enumFromInt(462), .param_str = "LdLdLd", .properties = .{ .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } } }, | ||
| 6066 | // __builtin_cos | ||
| 6067 | .{ .tag = @enumFromInt(463), .param_str = "dd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 6068 | // __builtin_cosf | ||
| 6069 | .{ .tag = @enumFromInt(464), .param_str = "ff", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 6070 | // __builtin_cosf128 | ||
| 6071 | .{ .tag = @enumFromInt(465), .param_str = "LLdLLd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 6072 | // __builtin_cosf16 | ||
| 6073 | .{ .tag = @enumFromInt(466), .param_str = "hh", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 6074 | // __builtin_cosh | ||
| 6075 | .{ .tag = @enumFromInt(467), .param_str = "dd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 6076 | // __builtin_coshf | ||
| 6077 | .{ .tag = @enumFromInt(468), .param_str = "ff", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 6078 | // __builtin_coshf128 | ||
| 6079 | .{ .tag = @enumFromInt(469), .param_str = "LLdLLd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 6080 | // __builtin_coshl | ||
| 6081 | .{ .tag = @enumFromInt(470), .param_str = "LdLd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 6082 | // __builtin_cosl | ||
| 6083 | .{ .tag = @enumFromInt(471), .param_str = "LdLd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 6084 | // __builtin_cpow | ||
| 6085 | .{ .tag = @enumFromInt(472), .param_str = "XdXdXd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 6086 | // __builtin_cpowf | ||
| 6087 | .{ .tag = @enumFromInt(473), .param_str = "XfXfXf", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 6088 | // __builtin_cpowl | ||
| 6089 | .{ .tag = @enumFromInt(474), .param_str = "XLdXLdXLd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 6090 | // __builtin_cproj | ||
| 6091 | .{ .tag = @enumFromInt(475), .param_str = "XdXd", .properties = .{ .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } }, | ||
| 6092 | // __builtin_cprojf | ||
| 6093 | .{ .tag = @enumFromInt(476), .param_str = "XfXf", .properties = .{ .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } }, | ||
| 6094 | // __builtin_cprojl | ||
| 6095 | .{ .tag = @enumFromInt(477), .param_str = "XLdXLd", .properties = .{ .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } }, | ||
| 6096 | // __builtin_cpu_init | ||
| 6097 | .{ .tag = @enumFromInt(478), .param_str = "v", .properties = .{ .target_set = TargetSet.initOne(.x86) } }, | ||
| 6098 | // __builtin_cpu_is | ||
| 6099 | .{ .tag = @enumFromInt(479), .param_str = "bcC*", .properties = .{ .target_set = TargetSet.initOne(.x86), .attributes = .{ .@"const" = true } } }, | ||
| 6100 | // __builtin_cpu_supports | ||
| 6101 | .{ .tag = @enumFromInt(480), .param_str = "bcC*", .properties = .{ .target_set = TargetSet.initOne(.x86), .attributes = .{ .@"const" = true } } }, | ||
| 6102 | // __builtin_creal | ||
| 6103 | .{ .tag = @enumFromInt(481), .param_str = "dXd", .properties = .{ .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } }, | ||
| 6104 | // __builtin_crealf | ||
| 6105 | .{ .tag = @enumFromInt(482), .param_str = "fXf", .properties = .{ .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } }, | ||
| 6106 | // __builtin_creall | ||
| 6107 | .{ .tag = @enumFromInt(483), .param_str = "LdXLd", .properties = .{ .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } }, | ||
| 6108 | // __builtin_csin | ||
| 6109 | .{ .tag = @enumFromInt(484), .param_str = "XdXd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 6110 | // __builtin_csinf | ||
| 6111 | .{ .tag = @enumFromInt(485), .param_str = "XfXf", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 6112 | // __builtin_csinh | ||
| 6113 | .{ .tag = @enumFromInt(486), .param_str = "XdXd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 6114 | // __builtin_csinhf | ||
| 6115 | .{ .tag = @enumFromInt(487), .param_str = "XfXf", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 6116 | // __builtin_csinhl | ||
| 6117 | .{ .tag = @enumFromInt(488), .param_str = "XLdXLd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 6118 | // __builtin_csinl | ||
| 6119 | .{ .tag = @enumFromInt(489), .param_str = "XLdXLd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 6120 | // __builtin_csqrt | ||
| 6121 | .{ .tag = @enumFromInt(490), .param_str = "XdXd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 6122 | // __builtin_csqrtf | ||
| 6123 | .{ .tag = @enumFromInt(491), .param_str = "XfXf", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 6124 | // __builtin_csqrtl | ||
| 6125 | .{ .tag = @enumFromInt(492), .param_str = "XLdXLd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 6126 | // __builtin_ctan | ||
| 6127 | .{ .tag = @enumFromInt(493), .param_str = "XdXd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 6128 | // __builtin_ctanf | ||
| 6129 | .{ .tag = @enumFromInt(494), .param_str = "XfXf", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 6130 | // __builtin_ctanh | ||
| 6131 | .{ .tag = @enumFromInt(495), .param_str = "XdXd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 6132 | // __builtin_ctanhf | ||
| 6133 | .{ .tag = @enumFromInt(496), .param_str = "XfXf", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 6134 | // __builtin_ctanhl | ||
| 6135 | .{ .tag = @enumFromInt(497), .param_str = "XLdXLd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 6136 | // __builtin_ctanl | ||
| 6137 | .{ .tag = @enumFromInt(498), .param_str = "XLdXLd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 6138 | // __builtin_ctz | ||
| 6139 | .{ .tag = @enumFromInt(499), .param_str = "iUi", .properties = .{ .attributes = .{ .@"const" = true, .const_evaluable = true } } }, | ||
| 6140 | // __builtin_ctzl | ||
| 6141 | .{ .tag = @enumFromInt(500), .param_str = "iULi", .properties = .{ .attributes = .{ .@"const" = true, .const_evaluable = true } } }, | ||
| 6142 | // __builtin_ctzll | ||
| 6143 | .{ .tag = @enumFromInt(501), .param_str = "iULLi", .properties = .{ .attributes = .{ .@"const" = true, .const_evaluable = true } } }, | ||
| 6144 | // __builtin_ctzs | ||
| 6145 | .{ .tag = @enumFromInt(502), .param_str = "iUs", .properties = .{ .attributes = .{ .@"const" = true, .const_evaluable = true } } }, | ||
| 6146 | // __builtin_dcbf | ||
| 6147 | .{ .tag = @enumFromInt(503), .param_str = "vvC*", .properties = .{ .target_set = TargetSet.initOne(.ppc) } }, | ||
| 6148 | // __builtin_debugtrap | ||
| 6149 | .{ .tag = @enumFromInt(504), .param_str = "v", .properties = .{} }, | ||
| 6150 | // __builtin_dump_struct | ||
| 6151 | .{ .tag = @enumFromInt(505), .param_str = "v.", .properties = .{ .attributes = .{ .custom_typecheck = true } } }, | ||
| 6152 | // __builtin_dwarf_cfa | ||
| 6153 | .{ .tag = @enumFromInt(506), .param_str = "v*", .properties = .{} }, | ||
| 6154 | // __builtin_dwarf_sp_column | ||
| 6155 | .{ .tag = @enumFromInt(507), .param_str = "Ui", .properties = .{} }, | ||
| 6156 | // __builtin_dynamic_object_size | ||
| 6157 | .{ .tag = @enumFromInt(508), .param_str = "zvC*i", .properties = .{ .attributes = .{ .eval_args = false, .const_evaluable = true } } }, | ||
| 6158 | // __builtin_eh_return | ||
| 6159 | .{ .tag = @enumFromInt(509), .param_str = "vzv*", .properties = .{ .attributes = .{ .noreturn = true } } }, | ||
| 6160 | // __builtin_eh_return_data_regno | ||
| 6161 | .{ .tag = @enumFromInt(510), .param_str = "iIi", .properties = .{ .attributes = .{ .@"const" = true, .const_evaluable = true } } }, | ||
| 6162 | // __builtin_elementwise_abs | ||
| 6163 | .{ .tag = @enumFromInt(511), .param_str = "v.", .properties = .{ .attributes = .{ .@"const" = true, .custom_typecheck = true } } }, | ||
| 6164 | // __builtin_elementwise_add_sat | ||
| 6165 | .{ .tag = @enumFromInt(512), .param_str = "v.", .properties = .{ .attributes = .{ .@"const" = true, .custom_typecheck = true } } }, | ||
| 6166 | // __builtin_elementwise_bitreverse | ||
| 6167 | .{ .tag = @enumFromInt(513), .param_str = "v.", .properties = .{ .attributes = .{ .@"const" = true, .custom_typecheck = true } } }, | ||
| 6168 | // __builtin_elementwise_canonicalize | ||
| 6169 | .{ .tag = @enumFromInt(514), .param_str = "v.", .properties = .{ .attributes = .{ .@"const" = true, .custom_typecheck = true } } }, | ||
| 6170 | // __builtin_elementwise_ceil | ||
| 6171 | .{ .tag = @enumFromInt(515), .param_str = "v.", .properties = .{ .attributes = .{ .@"const" = true, .custom_typecheck = true } } }, | ||
| 6172 | // __builtin_elementwise_copysign | ||
| 6173 | .{ .tag = @enumFromInt(516), .param_str = "v.", .properties = .{ .attributes = .{ .@"const" = true, .custom_typecheck = true } } }, | ||
| 6174 | // __builtin_elementwise_cos | ||
| 6175 | .{ .tag = @enumFromInt(517), .param_str = "v.", .properties = .{ .attributes = .{ .@"const" = true, .custom_typecheck = true } } }, | ||
| 6176 | // __builtin_elementwise_exp | ||
| 6177 | .{ .tag = @enumFromInt(518), .param_str = "v.", .properties = .{ .attributes = .{ .@"const" = true, .custom_typecheck = true } } }, | ||
| 6178 | // __builtin_elementwise_exp2 | ||
| 6179 | .{ .tag = @enumFromInt(519), .param_str = "v.", .properties = .{ .attributes = .{ .@"const" = true, .custom_typecheck = true } } }, | ||
| 6180 | // __builtin_elementwise_floor | ||
| 6181 | .{ .tag = @enumFromInt(520), .param_str = "v.", .properties = .{ .attributes = .{ .@"const" = true, .custom_typecheck = true } } }, | ||
| 6182 | // __builtin_elementwise_fma | ||
| 6183 | .{ .tag = @enumFromInt(521), .param_str = "v.", .properties = .{ .attributes = .{ .@"const" = true, .custom_typecheck = true } } }, | ||
| 6184 | // __builtin_elementwise_log | ||
| 6185 | .{ .tag = @enumFromInt(522), .param_str = "v.", .properties = .{ .attributes = .{ .@"const" = true, .custom_typecheck = true } } }, | ||
| 6186 | // __builtin_elementwise_log10 | ||
| 6187 | .{ .tag = @enumFromInt(523), .param_str = "v.", .properties = .{ .attributes = .{ .@"const" = true, .custom_typecheck = true } } }, | ||
| 6188 | // __builtin_elementwise_log2 | ||
| 6189 | .{ .tag = @enumFromInt(524), .param_str = "v.", .properties = .{ .attributes = .{ .@"const" = true, .custom_typecheck = true } } }, | ||
| 6190 | // __builtin_elementwise_max | ||
| 6191 | .{ .tag = @enumFromInt(525), .param_str = "v.", .properties = .{ .attributes = .{ .@"const" = true, .custom_typecheck = true } } }, | ||
| 6192 | // __builtin_elementwise_min | ||
| 6193 | .{ .tag = @enumFromInt(526), .param_str = "v.", .properties = .{ .attributes = .{ .@"const" = true, .custom_typecheck = true } } }, | ||
| 6194 | // __builtin_elementwise_nearbyint | ||
| 6195 | .{ .tag = @enumFromInt(527), .param_str = "v.", .properties = .{ .attributes = .{ .@"const" = true, .custom_typecheck = true } } }, | ||
| 6196 | // __builtin_elementwise_pow | ||
| 6197 | .{ .tag = @enumFromInt(528), .param_str = "v.", .properties = .{ .attributes = .{ .@"const" = true, .custom_typecheck = true } } }, | ||
| 6198 | // __builtin_elementwise_rint | ||
| 6199 | .{ .tag = @enumFromInt(529), .param_str = "v.", .properties = .{ .attributes = .{ .@"const" = true, .custom_typecheck = true } } }, | ||
| 6200 | // __builtin_elementwise_round | ||
| 6201 | .{ .tag = @enumFromInt(530), .param_str = "v.", .properties = .{ .attributes = .{ .@"const" = true, .custom_typecheck = true } } }, | ||
| 6202 | // __builtin_elementwise_roundeven | ||
| 6203 | .{ .tag = @enumFromInt(531), .param_str = "v.", .properties = .{ .attributes = .{ .@"const" = true, .custom_typecheck = true } } }, | ||
| 6204 | // __builtin_elementwise_sin | ||
| 6205 | .{ .tag = @enumFromInt(532), .param_str = "v.", .properties = .{ .attributes = .{ .@"const" = true, .custom_typecheck = true } } }, | ||
| 6206 | // __builtin_elementwise_sqrt | ||
| 6207 | .{ .tag = @enumFromInt(533), .param_str = "v.", .properties = .{ .attributes = .{ .@"const" = true, .custom_typecheck = true } } }, | ||
| 6208 | // __builtin_elementwise_sub_sat | ||
| 6209 | .{ .tag = @enumFromInt(534), .param_str = "v.", .properties = .{ .attributes = .{ .@"const" = true, .custom_typecheck = true } } }, | ||
| 6210 | // __builtin_elementwise_trunc | ||
| 6211 | .{ .tag = @enumFromInt(535), .param_str = "v.", .properties = .{ .attributes = .{ .@"const" = true, .custom_typecheck = true } } }, | ||
| 6212 | // __builtin_erf | ||
| 6213 | .{ .tag = @enumFromInt(536), .param_str = "dd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 6214 | // __builtin_erfc | ||
| 6215 | .{ .tag = @enumFromInt(537), .param_str = "dd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 6216 | // __builtin_erfcf | ||
| 6217 | .{ .tag = @enumFromInt(538), .param_str = "ff", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 6218 | // __builtin_erfcf128 | ||
| 6219 | .{ .tag = @enumFromInt(539), .param_str = "LLdLLd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 6220 | // __builtin_erfcl | ||
| 6221 | .{ .tag = @enumFromInt(540), .param_str = "LdLd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 6222 | // __builtin_erff | ||
| 6223 | .{ .tag = @enumFromInt(541), .param_str = "ff", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 6224 | // __builtin_erff128 | ||
| 6225 | .{ .tag = @enumFromInt(542), .param_str = "LLdLLd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 6226 | // __builtin_erfl | ||
| 6227 | .{ .tag = @enumFromInt(543), .param_str = "LdLd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 6228 | // __builtin_exp | ||
| 6229 | .{ .tag = @enumFromInt(544), .param_str = "dd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 6230 | // __builtin_exp10 | ||
| 6231 | .{ .tag = @enumFromInt(545), .param_str = "dd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 6232 | // __builtin_exp10f | ||
| 6233 | .{ .tag = @enumFromInt(546), .param_str = "ff", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 6234 | // __builtin_exp10f128 | ||
| 6235 | .{ .tag = @enumFromInt(547), .param_str = "LLdLLd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 6236 | // __builtin_exp10f16 | ||
| 6237 | .{ .tag = @enumFromInt(548), .param_str = "hh", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 6238 | // __builtin_exp10l | ||
| 6239 | .{ .tag = @enumFromInt(549), .param_str = "LdLd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 6240 | // __builtin_exp2 | ||
| 6241 | .{ .tag = @enumFromInt(550), .param_str = "dd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 6242 | // __builtin_exp2f | ||
| 6243 | .{ .tag = @enumFromInt(551), .param_str = "ff", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 6244 | // __builtin_exp2f128 | ||
| 6245 | .{ .tag = @enumFromInt(552), .param_str = "LLdLLd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 6246 | // __builtin_exp2f16 | ||
| 6247 | .{ .tag = @enumFromInt(553), .param_str = "hh", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 6248 | // __builtin_exp2l | ||
| 6249 | .{ .tag = @enumFromInt(554), .param_str = "LdLd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 6250 | // __builtin_expect | ||
| 6251 | .{ .tag = @enumFromInt(555), .param_str = "LiLiLi", .properties = .{ .attributes = .{ .@"const" = true, .const_evaluable = true } } }, | ||
| 6252 | // __builtin_expect_with_probability | ||
| 6253 | .{ .tag = @enumFromInt(556), .param_str = "LiLiLid", .properties = .{ .attributes = .{ .@"const" = true, .const_evaluable = true } } }, | ||
| 6254 | // __builtin_expf | ||
| 6255 | .{ .tag = @enumFromInt(557), .param_str = "ff", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 6256 | // __builtin_expf128 | ||
| 6257 | .{ .tag = @enumFromInt(558), .param_str = "LLdLLd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 6258 | // __builtin_expf16 | ||
| 6259 | .{ .tag = @enumFromInt(559), .param_str = "hh", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 6260 | // __builtin_expl | ||
| 6261 | .{ .tag = @enumFromInt(560), .param_str = "LdLd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 6262 | // __builtin_expm1 | ||
| 6263 | .{ .tag = @enumFromInt(561), .param_str = "dd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 6264 | // __builtin_expm1f | ||
| 6265 | .{ .tag = @enumFromInt(562), .param_str = "ff", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 6266 | // __builtin_expm1f128 | ||
| 6267 | .{ .tag = @enumFromInt(563), .param_str = "LLdLLd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 6268 | // __builtin_expm1l | ||
| 6269 | .{ .tag = @enumFromInt(564), .param_str = "LdLd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 6270 | // __builtin_extend_pointer | ||
| 6271 | .{ .tag = @enumFromInt(565), .param_str = "ULLiv*", .properties = .{} }, | ||
| 6272 | // __builtin_extract_return_addr | ||
| 6273 | .{ .tag = @enumFromInt(566), .param_str = "v*v*", .properties = .{} }, | ||
| 6274 | // __builtin_fabs | ||
| 6275 | .{ .tag = @enumFromInt(567), .param_str = "dd", .properties = .{ .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } } }, | ||
| 6276 | // __builtin_fabsf | ||
| 6277 | .{ .tag = @enumFromInt(568), .param_str = "ff", .properties = .{ .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } } }, | ||
| 6278 | // __builtin_fabsf128 | ||
| 6279 | .{ .tag = @enumFromInt(569), .param_str = "LLdLLd", .properties = .{ .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } } }, | ||
| 6280 | // __builtin_fabsf16 | ||
| 6281 | .{ .tag = @enumFromInt(570), .param_str = "hh", .properties = .{ .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } }, | ||
| 6282 | // __builtin_fabsl | ||
| 6283 | .{ .tag = @enumFromInt(571), .param_str = "LdLd", .properties = .{ .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } } }, | ||
| 6284 | // __builtin_fdim | ||
| 6285 | .{ .tag = @enumFromInt(572), .param_str = "ddd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 6286 | // __builtin_fdimf | ||
| 6287 | .{ .tag = @enumFromInt(573), .param_str = "fff", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 6288 | // __builtin_fdimf128 | ||
| 6289 | .{ .tag = @enumFromInt(574), .param_str = "LLdLLdLLd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 6290 | // __builtin_fdiml | ||
| 6291 | .{ .tag = @enumFromInt(575), .param_str = "LdLdLd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 6292 | // __builtin_ffs | ||
| 6293 | .{ .tag = @enumFromInt(576), .param_str = "ii", .properties = .{ .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } } }, | ||
| 6294 | // __builtin_ffsl | ||
| 6295 | .{ .tag = @enumFromInt(577), .param_str = "iLi", .properties = .{ .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } } }, | ||
| 6296 | // __builtin_ffsll | ||
| 6297 | .{ .tag = @enumFromInt(578), .param_str = "iLLi", .properties = .{ .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } } }, | ||
| 6298 | // __builtin_floor | ||
| 6299 | .{ .tag = @enumFromInt(579), .param_str = "dd", .properties = .{ .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } }, | ||
| 6300 | // __builtin_floorf | ||
| 6301 | .{ .tag = @enumFromInt(580), .param_str = "ff", .properties = .{ .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } }, | ||
| 6302 | // __builtin_floorf128 | ||
| 6303 | .{ .tag = @enumFromInt(581), .param_str = "LLdLLd", .properties = .{ .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } }, | ||
| 6304 | // __builtin_floorf16 | ||
| 6305 | .{ .tag = @enumFromInt(582), .param_str = "hh", .properties = .{ .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } }, | ||
| 6306 | // __builtin_floorl | ||
| 6307 | .{ .tag = @enumFromInt(583), .param_str = "LdLd", .properties = .{ .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } }, | ||
| 6308 | // __builtin_flt_rounds | ||
| 6309 | .{ .tag = @enumFromInt(584), .param_str = "i", .properties = .{} }, | ||
| 6310 | // __builtin_fma | ||
| 6311 | .{ .tag = @enumFromInt(585), .param_str = "dddd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 6312 | // __builtin_fmaf | ||
| 6313 | .{ .tag = @enumFromInt(586), .param_str = "ffff", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 6314 | // __builtin_fmaf128 | ||
| 6315 | .{ .tag = @enumFromInt(587), .param_str = "LLdLLdLLdLLd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 6316 | // __builtin_fmaf16 | ||
| 6317 | .{ .tag = @enumFromInt(588), .param_str = "hhhh", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 6318 | // __builtin_fmal | ||
| 6319 | .{ .tag = @enumFromInt(589), .param_str = "LdLdLdLd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 6320 | // __builtin_fmax | ||
| 6321 | .{ .tag = @enumFromInt(590), .param_str = "ddd", .properties = .{ .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } } }, | ||
| 6322 | // __builtin_fmaxf | ||
| 6323 | .{ .tag = @enumFromInt(591), .param_str = "fff", .properties = .{ .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } } }, | ||
| 6324 | // __builtin_fmaxf128 | ||
| 6325 | .{ .tag = @enumFromInt(592), .param_str = "LLdLLdLLd", .properties = .{ .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } } }, | ||
| 6326 | // __builtin_fmaxf16 | ||
| 6327 | .{ .tag = @enumFromInt(593), .param_str = "hhh", .properties = .{ .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } } }, | ||
| 6328 | // __builtin_fmaxl | ||
| 6329 | .{ .tag = @enumFromInt(594), .param_str = "LdLdLd", .properties = .{ .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } } }, | ||
| 6330 | // __builtin_fmin | ||
| 6331 | .{ .tag = @enumFromInt(595), .param_str = "ddd", .properties = .{ .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } } }, | ||
| 6332 | // __builtin_fminf | ||
| 6333 | .{ .tag = @enumFromInt(596), .param_str = "fff", .properties = .{ .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } } }, | ||
| 6334 | // __builtin_fminf128 | ||
| 6335 | .{ .tag = @enumFromInt(597), .param_str = "LLdLLdLLd", .properties = .{ .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } } }, | ||
| 6336 | // __builtin_fminf16 | ||
| 6337 | .{ .tag = @enumFromInt(598), .param_str = "hhh", .properties = .{ .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } } }, | ||
| 6338 | // __builtin_fminl | ||
| 6339 | .{ .tag = @enumFromInt(599), .param_str = "LdLdLd", .properties = .{ .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } } }, | ||
| 6340 | // __builtin_fmod | ||
| 6341 | .{ .tag = @enumFromInt(600), .param_str = "ddd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 6342 | // __builtin_fmodf | ||
| 6343 | .{ .tag = @enumFromInt(601), .param_str = "fff", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 6344 | // __builtin_fmodf128 | ||
| 6345 | .{ .tag = @enumFromInt(602), .param_str = "LLdLLdLLd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 6346 | // __builtin_fmodf16 | ||
| 6347 | .{ .tag = @enumFromInt(603), .param_str = "hhh", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 6348 | // __builtin_fmodl | ||
| 6349 | .{ .tag = @enumFromInt(604), .param_str = "LdLdLd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 6350 | // __builtin_fpclassify | ||
| 6351 | .{ .tag = @enumFromInt(605), .param_str = "iiiiii.", .properties = .{ .attributes = .{ .@"const" = true, .custom_typecheck = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } } }, | ||
| 6352 | // __builtin_fprintf | ||
| 6353 | .{ .tag = @enumFromInt(606), .param_str = "iP*RcC*R.", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .format_kind = .printf, .format_string_position = 1 } } }, | ||
| 6354 | // __builtin_frame_address | ||
| 6355 | .{ .tag = @enumFromInt(607), .param_str = "v*IUi", .properties = .{} }, | ||
| 6356 | // __builtin_free | ||
| 6357 | .{ .tag = @enumFromInt(608), .param_str = "vv*", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true } } }, | ||
| 6358 | // __builtin_frexp | ||
| 6359 | .{ .tag = @enumFromInt(609), .param_str = "ddi*", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true } } }, | ||
| 6360 | // __builtin_frexpf | ||
| 6361 | .{ .tag = @enumFromInt(610), .param_str = "ffi*", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true } } }, | ||
| 6362 | // __builtin_frexpf128 | ||
| 6363 | .{ .tag = @enumFromInt(611), .param_str = "LLdLLdi*", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true } } }, | ||
| 6364 | // __builtin_frexpf16 | ||
| 6365 | .{ .tag = @enumFromInt(612), .param_str = "hhi*", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true } } }, | ||
| 6366 | // __builtin_frexpl | ||
| 6367 | .{ .tag = @enumFromInt(613), .param_str = "LdLdi*", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true } } }, | ||
| 6368 | // __builtin_frob_return_addr | ||
| 6369 | .{ .tag = @enumFromInt(614), .param_str = "v*v*", .properties = .{} }, | ||
| 6370 | // __builtin_fscanf | ||
| 6371 | .{ .tag = @enumFromInt(615), .param_str = "iP*RcC*R.", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .format_kind = .scanf, .format_string_position = 1 } } }, | ||
| 6372 | // __builtin_getid | ||
| 6373 | .{ .tag = @enumFromInt(616), .param_str = "Si", .properties = .{ .target_set = TargetSet.initOne(.xcore), .attributes = .{ .@"const" = true } } }, | ||
| 6374 | // __builtin_getps | ||
| 6375 | .{ .tag = @enumFromInt(617), .param_str = "UiUi", .properties = .{ .target_set = TargetSet.initOne(.xcore) } }, | ||
| 6376 | // __builtin_huge_val | ||
| 6377 | .{ .tag = @enumFromInt(618), .param_str = "d", .properties = .{ .attributes = .{ .@"const" = true, .const_evaluable = true } } }, | ||
| 6378 | // __builtin_huge_valf | ||
| 6379 | .{ .tag = @enumFromInt(619), .param_str = "f", .properties = .{ .attributes = .{ .@"const" = true, .const_evaluable = true } } }, | ||
| 6380 | // __builtin_huge_valf128 | ||
| 6381 | .{ .tag = @enumFromInt(620), .param_str = "LLd", .properties = .{ .attributes = .{ .@"const" = true, .const_evaluable = true } } }, | ||
| 6382 | // __builtin_huge_valf16 | ||
| 6383 | .{ .tag = @enumFromInt(621), .param_str = "x", .properties = .{ .attributes = .{ .@"const" = true, .const_evaluable = true } } }, | ||
| 6384 | // __builtin_huge_vall | ||
| 6385 | .{ .tag = @enumFromInt(622), .param_str = "Ld", .properties = .{ .attributes = .{ .@"const" = true, .const_evaluable = true } } }, | ||
| 6386 | // __builtin_hypot | ||
| 6387 | .{ .tag = @enumFromInt(623), .param_str = "ddd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 6388 | // __builtin_hypotf | ||
| 6389 | .{ .tag = @enumFromInt(624), .param_str = "fff", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 6390 | // __builtin_hypotf128 | ||
| 6391 | .{ .tag = @enumFromInt(625), .param_str = "LLdLLdLLd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 6392 | // __builtin_hypotl | ||
| 6393 | .{ .tag = @enumFromInt(626), .param_str = "LdLdLd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 6394 | // __builtin_ia32_rdpmc | ||
| 6395 | .{ .tag = @enumFromInt(627), .param_str = "UOii", .properties = .{ .target_set = TargetSet.initOne(.x86) } }, | ||
| 6396 | // __builtin_ia32_rdtsc | ||
| 6397 | .{ .tag = @enumFromInt(628), .param_str = "UOi", .properties = .{ .target_set = TargetSet.initOne(.x86) } }, | ||
| 6398 | // __builtin_ia32_rdtscp | ||
| 6399 | .{ .tag = @enumFromInt(629), .param_str = "UOiUi*", .properties = .{ .target_set = TargetSet.initOne(.x86) } }, | ||
| 6400 | // __builtin_ilogb | ||
| 6401 | .{ .tag = @enumFromInt(630), .param_str = "id", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 6402 | // __builtin_ilogbf | ||
| 6403 | .{ .tag = @enumFromInt(631), .param_str = "if", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 6404 | // __builtin_ilogbf128 | ||
| 6405 | .{ .tag = @enumFromInt(632), .param_str = "iLLd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 6406 | // __builtin_ilogbl | ||
| 6407 | .{ .tag = @enumFromInt(633), .param_str = "iLd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 6408 | // __builtin_index | ||
| 6409 | .{ .tag = @enumFromInt(634), .param_str = "c*cC*i", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true } } }, | ||
| 6410 | // __builtin_inf | ||
| 6411 | .{ .tag = @enumFromInt(635), .param_str = "d", .properties = .{ .attributes = .{ .@"const" = true, .const_evaluable = true } } }, | ||
| 6412 | // __builtin_inff | ||
| 6413 | .{ .tag = @enumFromInt(636), .param_str = "f", .properties = .{ .attributes = .{ .@"const" = true, .const_evaluable = true } } }, | ||
| 6414 | // __builtin_inff128 | ||
| 6415 | .{ .tag = @enumFromInt(637), .param_str = "LLd", .properties = .{ .attributes = .{ .@"const" = true, .const_evaluable = true } } }, | ||
| 6416 | // __builtin_inff16 | ||
| 6417 | .{ .tag = @enumFromInt(638), .param_str = "x", .properties = .{ .attributes = .{ .@"const" = true, .const_evaluable = true } } }, | ||
| 6418 | // __builtin_infl | ||
| 6419 | .{ .tag = @enumFromInt(639), .param_str = "Ld", .properties = .{ .attributes = .{ .@"const" = true, .const_evaluable = true } } }, | ||
| 6420 | // __builtin_init_dwarf_reg_size_table | ||
| 6421 | .{ .tag = @enumFromInt(640), .param_str = "vv*", .properties = .{} }, | ||
| 6422 | // __builtin_is_aligned | ||
| 6423 | .{ .tag = @enumFromInt(641), .param_str = "bvC*z", .properties = .{ .attributes = .{ .@"const" = true, .custom_typecheck = true, .const_evaluable = true } } }, | ||
| 6424 | // __builtin_isfinite | ||
| 6425 | .{ .tag = @enumFromInt(642), .param_str = "i.", .properties = .{ .attributes = .{ .@"const" = true, .custom_typecheck = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } } }, | ||
| 6426 | // __builtin_isfpclass | ||
| 6427 | .{ .tag = @enumFromInt(643), .param_str = "i.", .properties = .{ .attributes = .{ .@"const" = true, .custom_typecheck = true, .const_evaluable = true } } }, | ||
| 6428 | // __builtin_isgreater | ||
| 6429 | .{ .tag = @enumFromInt(644), .param_str = "i.", .properties = .{ .attributes = .{ .@"const" = true, .custom_typecheck = true, .lib_function_with_builtin_prefix = true } } }, | ||
| 6430 | // __builtin_isgreaterequal | ||
| 6431 | .{ .tag = @enumFromInt(645), .param_str = "i.", .properties = .{ .attributes = .{ .@"const" = true, .custom_typecheck = true, .lib_function_with_builtin_prefix = true } } }, | ||
| 6432 | // __builtin_isinf | ||
| 6433 | .{ .tag = @enumFromInt(646), .param_str = "i.", .properties = .{ .attributes = .{ .@"const" = true, .custom_typecheck = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } } }, | ||
| 6434 | // __builtin_isinf_sign | ||
| 6435 | .{ .tag = @enumFromInt(647), .param_str = "i.", .properties = .{ .attributes = .{ .@"const" = true, .custom_typecheck = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } } }, | ||
| 6436 | // __builtin_isless | ||
| 6437 | .{ .tag = @enumFromInt(648), .param_str = "i.", .properties = .{ .attributes = .{ .@"const" = true, .custom_typecheck = true, .lib_function_with_builtin_prefix = true } } }, | ||
| 6438 | // __builtin_islessequal | ||
| 6439 | .{ .tag = @enumFromInt(649), .param_str = "i.", .properties = .{ .attributes = .{ .@"const" = true, .custom_typecheck = true, .lib_function_with_builtin_prefix = true } } }, | ||
| 6440 | // __builtin_islessgreater | ||
| 6441 | .{ .tag = @enumFromInt(650), .param_str = "i.", .properties = .{ .attributes = .{ .@"const" = true, .custom_typecheck = true, .lib_function_with_builtin_prefix = true } } }, | ||
| 6442 | // __builtin_isnan | ||
| 6443 | .{ .tag = @enumFromInt(651), .param_str = "i.", .properties = .{ .attributes = .{ .@"const" = true, .custom_typecheck = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } } }, | ||
| 6444 | // __builtin_isnormal | ||
| 6445 | .{ .tag = @enumFromInt(652), .param_str = "i.", .properties = .{ .attributes = .{ .@"const" = true, .custom_typecheck = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } } }, | ||
| 6446 | // __builtin_isunordered | ||
| 6447 | .{ .tag = @enumFromInt(653), .param_str = "i.", .properties = .{ .attributes = .{ .@"const" = true, .custom_typecheck = true, .lib_function_with_builtin_prefix = true } } }, | ||
| 6448 | // __builtin_labs | ||
| 6449 | .{ .tag = @enumFromInt(654), .param_str = "LiLi", .properties = .{ .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } }, | ||
| 6450 | // __builtin_launder | ||
| 6451 | .{ .tag = @enumFromInt(655), .param_str = "v*v*", .properties = .{ .attributes = .{ .custom_typecheck = true, .const_evaluable = true } } }, | ||
| 6452 | // __builtin_ldexp | ||
| 6453 | .{ .tag = @enumFromInt(656), .param_str = "ddi", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 6454 | // __builtin_ldexpf | ||
| 6455 | .{ .tag = @enumFromInt(657), .param_str = "ffi", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 6456 | // __builtin_ldexpf128 | ||
| 6457 | .{ .tag = @enumFromInt(658), .param_str = "LLdLLdi", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 6458 | // __builtin_ldexpf16 | ||
| 6459 | .{ .tag = @enumFromInt(659), .param_str = "hhi", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 6460 | // __builtin_ldexpl | ||
| 6461 | .{ .tag = @enumFromInt(660), .param_str = "LdLdi", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 6462 | // __builtin_lgamma | ||
| 6463 | .{ .tag = @enumFromInt(661), .param_str = "dd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true } } }, | ||
| 6464 | // __builtin_lgammaf | ||
| 6465 | .{ .tag = @enumFromInt(662), .param_str = "ff", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true } } }, | ||
| 6466 | // __builtin_lgammaf128 | ||
| 6467 | .{ .tag = @enumFromInt(663), .param_str = "LLdLLd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true } } }, | ||
| 6468 | // __builtin_lgammal | ||
| 6469 | .{ .tag = @enumFromInt(664), .param_str = "LdLd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true } } }, | ||
| 6470 | // __builtin_llabs | ||
| 6471 | .{ .tag = @enumFromInt(665), .param_str = "LLiLLi", .properties = .{ .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } }, | ||
| 6472 | // __builtin_llrint | ||
| 6473 | .{ .tag = @enumFromInt(666), .param_str = "LLid", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 6474 | // __builtin_llrintf | ||
| 6475 | .{ .tag = @enumFromInt(667), .param_str = "LLif", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 6476 | // __builtin_llrintf128 | ||
| 6477 | .{ .tag = @enumFromInt(668), .param_str = "LLiLLd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 6478 | // __builtin_llrintl | ||
| 6479 | .{ .tag = @enumFromInt(669), .param_str = "LLiLd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 6480 | // __builtin_llround | ||
| 6481 | .{ .tag = @enumFromInt(670), .param_str = "LLid", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 6482 | // __builtin_llroundf | ||
| 6483 | .{ .tag = @enumFromInt(671), .param_str = "LLif", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 6484 | // __builtin_llroundf128 | ||
| 6485 | .{ .tag = @enumFromInt(672), .param_str = "LLiLLd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 6486 | // __builtin_llroundl | ||
| 6487 | .{ .tag = @enumFromInt(673), .param_str = "LLiLd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 6488 | // __builtin_log | ||
| 6489 | .{ .tag = @enumFromInt(674), .param_str = "dd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 6490 | // __builtin_log10 | ||
| 6491 | .{ .tag = @enumFromInt(675), .param_str = "dd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 6492 | // __builtin_log10f | ||
| 6493 | .{ .tag = @enumFromInt(676), .param_str = "ff", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 6494 | // __builtin_log10f128 | ||
| 6495 | .{ .tag = @enumFromInt(677), .param_str = "LLdLLd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 6496 | // __builtin_log10f16 | ||
| 6497 | .{ .tag = @enumFromInt(678), .param_str = "hh", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 6498 | // __builtin_log10l | ||
| 6499 | .{ .tag = @enumFromInt(679), .param_str = "LdLd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 6500 | // __builtin_log1p | ||
| 6501 | .{ .tag = @enumFromInt(680), .param_str = "dd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 6502 | // __builtin_log1pf | ||
| 6503 | .{ .tag = @enumFromInt(681), .param_str = "ff", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 6504 | // __builtin_log1pf128 | ||
| 6505 | .{ .tag = @enumFromInt(682), .param_str = "LLdLLd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 6506 | // __builtin_log1pl | ||
| 6507 | .{ .tag = @enumFromInt(683), .param_str = "LdLd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 6508 | // __builtin_log2 | ||
| 6509 | .{ .tag = @enumFromInt(684), .param_str = "dd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 6510 | // __builtin_log2f | ||
| 6511 | .{ .tag = @enumFromInt(685), .param_str = "ff", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 6512 | // __builtin_log2f128 | ||
| 6513 | .{ .tag = @enumFromInt(686), .param_str = "LLdLLd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 6514 | // __builtin_log2f16 | ||
| 6515 | .{ .tag = @enumFromInt(687), .param_str = "hh", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 6516 | // __builtin_log2l | ||
| 6517 | .{ .tag = @enumFromInt(688), .param_str = "LdLd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 6518 | // __builtin_logb | ||
| 6519 | .{ .tag = @enumFromInt(689), .param_str = "dd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 6520 | // __builtin_logbf | ||
| 6521 | .{ .tag = @enumFromInt(690), .param_str = "ff", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 6522 | // __builtin_logbf128 | ||
| 6523 | .{ .tag = @enumFromInt(691), .param_str = "LLdLLd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 6524 | // __builtin_logbl | ||
| 6525 | .{ .tag = @enumFromInt(692), .param_str = "LdLd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 6526 | // __builtin_logf | ||
| 6527 | .{ .tag = @enumFromInt(693), .param_str = "ff", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 6528 | // __builtin_logf128 | ||
| 6529 | .{ .tag = @enumFromInt(694), .param_str = "LLdLLd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 6530 | // __builtin_logf16 | ||
| 6531 | .{ .tag = @enumFromInt(695), .param_str = "hh", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 6532 | // __builtin_logl | ||
| 6533 | .{ .tag = @enumFromInt(696), .param_str = "LdLd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 6534 | // __builtin_longjmp | ||
| 6535 | .{ .tag = @enumFromInt(697), .param_str = "vv**i", .properties = .{ .attributes = .{ .noreturn = true } } }, | ||
| 6536 | // __builtin_lrint | ||
| 6537 | .{ .tag = @enumFromInt(698), .param_str = "Lid", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 6538 | // __builtin_lrintf | ||
| 6539 | .{ .tag = @enumFromInt(699), .param_str = "Lif", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 6540 | // __builtin_lrintf128 | ||
| 6541 | .{ .tag = @enumFromInt(700), .param_str = "LiLLd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 6542 | // __builtin_lrintl | ||
| 6543 | .{ .tag = @enumFromInt(701), .param_str = "LiLd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 6544 | // __builtin_lround | ||
| 6545 | .{ .tag = @enumFromInt(702), .param_str = "Lid", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 6546 | // __builtin_lroundf | ||
| 6547 | .{ .tag = @enumFromInt(703), .param_str = "Lif", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 6548 | // __builtin_lroundf128 | ||
| 6549 | .{ .tag = @enumFromInt(704), .param_str = "LiLLd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 6550 | // __builtin_lroundl | ||
| 6551 | .{ .tag = @enumFromInt(705), .param_str = "LiLd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 6552 | // __builtin_malloc | ||
| 6553 | .{ .tag = @enumFromInt(706), .param_str = "v*z", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true } } }, | ||
| 6554 | // __builtin_matrix_column_major_load | ||
| 6555 | .{ .tag = @enumFromInt(707), .param_str = "v.", .properties = .{ .attributes = .{ .custom_typecheck = true, .lib_function_with_builtin_prefix = true } } }, | ||
| 6556 | // __builtin_matrix_column_major_store | ||
| 6557 | .{ .tag = @enumFromInt(708), .param_str = "v.", .properties = .{ .attributes = .{ .custom_typecheck = true, .lib_function_with_builtin_prefix = true } } }, | ||
| 6558 | // __builtin_matrix_transpose | ||
| 6559 | .{ .tag = @enumFromInt(709), .param_str = "v.", .properties = .{ .attributes = .{ .custom_typecheck = true, .lib_function_with_builtin_prefix = true } } }, | ||
| 6560 | // __builtin_memchr | ||
| 6561 | .{ .tag = @enumFromInt(710), .param_str = "v*vC*iz", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_evaluable = true } } }, | ||
| 6562 | // __builtin_memcmp | ||
| 6563 | .{ .tag = @enumFromInt(711), .param_str = "ivC*vC*z", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_evaluable = true } } }, | ||
| 6564 | // __builtin_memcpy | ||
| 6565 | .{ .tag = @enumFromInt(712), .param_str = "v*v*vC*z", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_evaluable = true } } }, | ||
| 6566 | // __builtin_memcpy_inline | ||
| 6567 | .{ .tag = @enumFromInt(713), .param_str = "vv*vC*Iz", .properties = .{} }, | ||
| 6568 | // __builtin_memmove | ||
| 6569 | .{ .tag = @enumFromInt(714), .param_str = "v*v*vC*z", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_evaluable = true } } }, | ||
| 6570 | // __builtin_mempcpy | ||
| 6571 | .{ .tag = @enumFromInt(715), .param_str = "v*v*vC*z", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true } } }, | ||
| 6572 | // __builtin_memset | ||
| 6573 | .{ .tag = @enumFromInt(716), .param_str = "v*v*iz", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true } } }, | ||
| 6574 | // __builtin_memset_inline | ||
| 6575 | .{ .tag = @enumFromInt(717), .param_str = "vv*iIz", .properties = .{} }, | ||
| 6576 | // __builtin_mips_absq_s_ph | ||
| 6577 | .{ .tag = @enumFromInt(718), .param_str = "V2sV2s", .properties = .{ .target_set = TargetSet.initOne(.mips) } }, | ||
| 6578 | // __builtin_mips_absq_s_qb | ||
| 6579 | .{ .tag = @enumFromInt(719), .param_str = "V4ScV4Sc", .properties = .{ .target_set = TargetSet.initOne(.mips) } }, | ||
| 6580 | // __builtin_mips_absq_s_w | ||
| 6581 | .{ .tag = @enumFromInt(720), .param_str = "ii", .properties = .{ .target_set = TargetSet.initOne(.mips) } }, | ||
| 6582 | // __builtin_mips_addq_ph | ||
| 6583 | .{ .tag = @enumFromInt(721), .param_str = "V2sV2sV2s", .properties = .{ .target_set = TargetSet.initOne(.mips) } }, | ||
| 6584 | // __builtin_mips_addq_s_ph | ||
| 6585 | .{ .tag = @enumFromInt(722), .param_str = "V2sV2sV2s", .properties = .{ .target_set = TargetSet.initOne(.mips) } }, | ||
| 6586 | // __builtin_mips_addq_s_w | ||
| 6587 | .{ .tag = @enumFromInt(723), .param_str = "iii", .properties = .{ .target_set = TargetSet.initOne(.mips) } }, | ||
| 6588 | // __builtin_mips_addqh_ph | ||
| 6589 | .{ .tag = @enumFromInt(724), .param_str = "V2sV2sV2s", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 6590 | // __builtin_mips_addqh_r_ph | ||
| 6591 | .{ .tag = @enumFromInt(725), .param_str = "V2sV2sV2s", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 6592 | // __builtin_mips_addqh_r_w | ||
| 6593 | .{ .tag = @enumFromInt(726), .param_str = "iii", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 6594 | // __builtin_mips_addqh_w | ||
| 6595 | .{ .tag = @enumFromInt(727), .param_str = "iii", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 6596 | // __builtin_mips_addsc | ||
| 6597 | .{ .tag = @enumFromInt(728), .param_str = "iii", .properties = .{ .target_set = TargetSet.initOne(.mips) } }, | ||
| 6598 | // __builtin_mips_addu_ph | ||
| 6599 | .{ .tag = @enumFromInt(729), .param_str = "V2sV2sV2s", .properties = .{ .target_set = TargetSet.initOne(.mips) } }, | ||
| 6600 | // __builtin_mips_addu_qb | ||
| 6601 | .{ .tag = @enumFromInt(730), .param_str = "V4ScV4ScV4Sc", .properties = .{ .target_set = TargetSet.initOne(.mips) } }, | ||
| 6602 | // __builtin_mips_addu_s_ph | ||
| 6603 | .{ .tag = @enumFromInt(731), .param_str = "V2sV2sV2s", .properties = .{ .target_set = TargetSet.initOne(.mips) } }, | ||
| 6604 | // __builtin_mips_addu_s_qb | ||
| 6605 | .{ .tag = @enumFromInt(732), .param_str = "V4ScV4ScV4Sc", .properties = .{ .target_set = TargetSet.initOne(.mips) } }, | ||
| 6606 | // __builtin_mips_adduh_qb | ||
| 6607 | .{ .tag = @enumFromInt(733), .param_str = "V4ScV4ScV4Sc", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 6608 | // __builtin_mips_adduh_r_qb | ||
| 6609 | .{ .tag = @enumFromInt(734), .param_str = "V4ScV4ScV4Sc", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 6610 | // __builtin_mips_addwc | ||
| 6611 | .{ .tag = @enumFromInt(735), .param_str = "iii", .properties = .{ .target_set = TargetSet.initOne(.mips) } }, | ||
| 6612 | // __builtin_mips_append | ||
| 6613 | .{ .tag = @enumFromInt(736), .param_str = "iiiIi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 6614 | // __builtin_mips_balign | ||
| 6615 | .{ .tag = @enumFromInt(737), .param_str = "iiiIi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 6616 | // __builtin_mips_bitrev | ||
| 6617 | .{ .tag = @enumFromInt(738), .param_str = "ii", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 6618 | // __builtin_mips_bposge32 | ||
| 6619 | .{ .tag = @enumFromInt(739), .param_str = "i", .properties = .{ .target_set = TargetSet.initOne(.mips) } }, | ||
| 6620 | // __builtin_mips_cmp_eq_ph | ||
| 6621 | .{ .tag = @enumFromInt(740), .param_str = "vV2sV2s", .properties = .{ .target_set = TargetSet.initOne(.mips) } }, | ||
| 6622 | // __builtin_mips_cmp_le_ph | ||
| 6623 | .{ .tag = @enumFromInt(741), .param_str = "vV2sV2s", .properties = .{ .target_set = TargetSet.initOne(.mips) } }, | ||
| 6624 | // __builtin_mips_cmp_lt_ph | ||
| 6625 | .{ .tag = @enumFromInt(742), .param_str = "vV2sV2s", .properties = .{ .target_set = TargetSet.initOne(.mips) } }, | ||
| 6626 | // __builtin_mips_cmpgdu_eq_qb | ||
| 6627 | .{ .tag = @enumFromInt(743), .param_str = "iV4ScV4Sc", .properties = .{ .target_set = TargetSet.initOne(.mips) } }, | ||
| 6628 | // __builtin_mips_cmpgdu_le_qb | ||
| 6629 | .{ .tag = @enumFromInt(744), .param_str = "iV4ScV4Sc", .properties = .{ .target_set = TargetSet.initOne(.mips) } }, | ||
| 6630 | // __builtin_mips_cmpgdu_lt_qb | ||
| 6631 | .{ .tag = @enumFromInt(745), .param_str = "iV4ScV4Sc", .properties = .{ .target_set = TargetSet.initOne(.mips) } }, | ||
| 6632 | // __builtin_mips_cmpgu_eq_qb | ||
| 6633 | .{ .tag = @enumFromInt(746), .param_str = "iV4ScV4Sc", .properties = .{ .target_set = TargetSet.initOne(.mips) } }, | ||
| 6634 | // __builtin_mips_cmpgu_le_qb | ||
| 6635 | .{ .tag = @enumFromInt(747), .param_str = "iV4ScV4Sc", .properties = .{ .target_set = TargetSet.initOne(.mips) } }, | ||
| 6636 | // __builtin_mips_cmpgu_lt_qb | ||
| 6637 | .{ .tag = @enumFromInt(748), .param_str = "iV4ScV4Sc", .properties = .{ .target_set = TargetSet.initOne(.mips) } }, | ||
| 6638 | // __builtin_mips_cmpu_eq_qb | ||
| 6639 | .{ .tag = @enumFromInt(749), .param_str = "vV4ScV4Sc", .properties = .{ .target_set = TargetSet.initOne(.mips) } }, | ||
| 6640 | // __builtin_mips_cmpu_le_qb | ||
| 6641 | .{ .tag = @enumFromInt(750), .param_str = "vV4ScV4Sc", .properties = .{ .target_set = TargetSet.initOne(.mips) } }, | ||
| 6642 | // __builtin_mips_cmpu_lt_qb | ||
| 6643 | .{ .tag = @enumFromInt(751), .param_str = "vV4ScV4Sc", .properties = .{ .target_set = TargetSet.initOne(.mips) } }, | ||
| 6644 | // __builtin_mips_dpa_w_ph | ||
| 6645 | .{ .tag = @enumFromInt(752), .param_str = "LLiLLiV2sV2s", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 6646 | // __builtin_mips_dpaq_s_w_ph | ||
| 6647 | .{ .tag = @enumFromInt(753), .param_str = "LLiLLiV2sV2s", .properties = .{ .target_set = TargetSet.initOne(.mips) } }, | ||
| 6648 | // __builtin_mips_dpaq_sa_l_w | ||
| 6649 | .{ .tag = @enumFromInt(754), .param_str = "LLiLLiii", .properties = .{ .target_set = TargetSet.initOne(.mips) } }, | ||
| 6650 | // __builtin_mips_dpaqx_s_w_ph | ||
| 6651 | .{ .tag = @enumFromInt(755), .param_str = "LLiLLiV2sV2s", .properties = .{ .target_set = TargetSet.initOne(.mips) } }, | ||
| 6652 | // __builtin_mips_dpaqx_sa_w_ph | ||
| 6653 | .{ .tag = @enumFromInt(756), .param_str = "LLiLLiV2sV2s", .properties = .{ .target_set = TargetSet.initOne(.mips) } }, | ||
| 6654 | // __builtin_mips_dpau_h_qbl | ||
| 6655 | .{ .tag = @enumFromInt(757), .param_str = "LLiLLiV4ScV4Sc", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 6656 | // __builtin_mips_dpau_h_qbr | ||
| 6657 | .{ .tag = @enumFromInt(758), .param_str = "LLiLLiV4ScV4Sc", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 6658 | // __builtin_mips_dpax_w_ph | ||
| 6659 | .{ .tag = @enumFromInt(759), .param_str = "LLiLLiV2sV2s", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 6660 | // __builtin_mips_dps_w_ph | ||
| 6661 | .{ .tag = @enumFromInt(760), .param_str = "LLiLLiV2sV2s", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 6662 | // __builtin_mips_dpsq_s_w_ph | ||
| 6663 | .{ .tag = @enumFromInt(761), .param_str = "LLiLLiV2sV2s", .properties = .{ .target_set = TargetSet.initOne(.mips) } }, | ||
| 6664 | // __builtin_mips_dpsq_sa_l_w | ||
| 6665 | .{ .tag = @enumFromInt(762), .param_str = "LLiLLiii", .properties = .{ .target_set = TargetSet.initOne(.mips) } }, | ||
| 6666 | // __builtin_mips_dpsqx_s_w_ph | ||
| 6667 | .{ .tag = @enumFromInt(763), .param_str = "LLiLLiV2sV2s", .properties = .{ .target_set = TargetSet.initOne(.mips) } }, | ||
| 6668 | // __builtin_mips_dpsqx_sa_w_ph | ||
| 6669 | .{ .tag = @enumFromInt(764), .param_str = "LLiLLiV2sV2s", .properties = .{ .target_set = TargetSet.initOne(.mips) } }, | ||
| 6670 | // __builtin_mips_dpsu_h_qbl | ||
| 6671 | .{ .tag = @enumFromInt(765), .param_str = "LLiLLiV4ScV4Sc", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 6672 | // __builtin_mips_dpsu_h_qbr | ||
| 6673 | .{ .tag = @enumFromInt(766), .param_str = "LLiLLiV4ScV4Sc", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 6674 | // __builtin_mips_dpsx_w_ph | ||
| 6675 | .{ .tag = @enumFromInt(767), .param_str = "LLiLLiV2sV2s", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 6676 | // __builtin_mips_extp | ||
| 6677 | .{ .tag = @enumFromInt(768), .param_str = "iLLii", .properties = .{ .target_set = TargetSet.initOne(.mips) } }, | ||
| 6678 | // __builtin_mips_extpdp | ||
| 6679 | .{ .tag = @enumFromInt(769), .param_str = "iLLii", .properties = .{ .target_set = TargetSet.initOne(.mips) } }, | ||
| 6680 | // __builtin_mips_extr_r_w | ||
| 6681 | .{ .tag = @enumFromInt(770), .param_str = "iLLii", .properties = .{ .target_set = TargetSet.initOne(.mips) } }, | ||
| 6682 | // __builtin_mips_extr_rs_w | ||
| 6683 | .{ .tag = @enumFromInt(771), .param_str = "iLLii", .properties = .{ .target_set = TargetSet.initOne(.mips) } }, | ||
| 6684 | // __builtin_mips_extr_s_h | ||
| 6685 | .{ .tag = @enumFromInt(772), .param_str = "iLLii", .properties = .{ .target_set = TargetSet.initOne(.mips) } }, | ||
| 6686 | // __builtin_mips_extr_w | ||
| 6687 | .{ .tag = @enumFromInt(773), .param_str = "iLLii", .properties = .{ .target_set = TargetSet.initOne(.mips) } }, | ||
| 6688 | // __builtin_mips_insv | ||
| 6689 | .{ .tag = @enumFromInt(774), .param_str = "iii", .properties = .{ .target_set = TargetSet.initOne(.mips) } }, | ||
| 6690 | // __builtin_mips_lbux | ||
| 6691 | .{ .tag = @enumFromInt(775), .param_str = "iv*i", .properties = .{ .target_set = TargetSet.initOne(.mips) } }, | ||
| 6692 | // __builtin_mips_lhx | ||
| 6693 | .{ .tag = @enumFromInt(776), .param_str = "iv*i", .properties = .{ .target_set = TargetSet.initOne(.mips) } }, | ||
| 6694 | // __builtin_mips_lwx | ||
| 6695 | .{ .tag = @enumFromInt(777), .param_str = "iv*i", .properties = .{ .target_set = TargetSet.initOne(.mips) } }, | ||
| 6696 | // __builtin_mips_madd | ||
| 6697 | .{ .tag = @enumFromInt(778), .param_str = "LLiLLiii", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 6698 | // __builtin_mips_maddu | ||
| 6699 | .{ .tag = @enumFromInt(779), .param_str = "LLiLLiUiUi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 6700 | // __builtin_mips_maq_s_w_phl | ||
| 6701 | .{ .tag = @enumFromInt(780), .param_str = "LLiLLiV2sV2s", .properties = .{ .target_set = TargetSet.initOne(.mips) } }, | ||
| 6702 | // __builtin_mips_maq_s_w_phr | ||
| 6703 | .{ .tag = @enumFromInt(781), .param_str = "LLiLLiV2sV2s", .properties = .{ .target_set = TargetSet.initOne(.mips) } }, | ||
| 6704 | // __builtin_mips_maq_sa_w_phl | ||
| 6705 | .{ .tag = @enumFromInt(782), .param_str = "LLiLLiV2sV2s", .properties = .{ .target_set = TargetSet.initOne(.mips) } }, | ||
| 6706 | // __builtin_mips_maq_sa_w_phr | ||
| 6707 | .{ .tag = @enumFromInt(783), .param_str = "LLiLLiV2sV2s", .properties = .{ .target_set = TargetSet.initOne(.mips) } }, | ||
| 6708 | // __builtin_mips_modsub | ||
| 6709 | .{ .tag = @enumFromInt(784), .param_str = "iii", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 6710 | // __builtin_mips_msub | ||
| 6711 | .{ .tag = @enumFromInt(785), .param_str = "LLiLLiii", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 6712 | // __builtin_mips_msubu | ||
| 6713 | .{ .tag = @enumFromInt(786), .param_str = "LLiLLiUiUi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 6714 | // __builtin_mips_mthlip | ||
| 6715 | .{ .tag = @enumFromInt(787), .param_str = "LLiLLii", .properties = .{ .target_set = TargetSet.initOne(.mips) } }, | ||
| 6716 | // __builtin_mips_mul_ph | ||
| 6717 | .{ .tag = @enumFromInt(788), .param_str = "V2sV2sV2s", .properties = .{ .target_set = TargetSet.initOne(.mips) } }, | ||
| 6718 | // __builtin_mips_mul_s_ph | ||
| 6719 | .{ .tag = @enumFromInt(789), .param_str = "V2sV2sV2s", .properties = .{ .target_set = TargetSet.initOne(.mips) } }, | ||
| 6720 | // __builtin_mips_muleq_s_w_phl | ||
| 6721 | .{ .tag = @enumFromInt(790), .param_str = "iV2sV2s", .properties = .{ .target_set = TargetSet.initOne(.mips) } }, | ||
| 6722 | // __builtin_mips_muleq_s_w_phr | ||
| 6723 | .{ .tag = @enumFromInt(791), .param_str = "iV2sV2s", .properties = .{ .target_set = TargetSet.initOne(.mips) } }, | ||
| 6724 | // __builtin_mips_muleu_s_ph_qbl | ||
| 6725 | .{ .tag = @enumFromInt(792), .param_str = "V2sV4ScV2s", .properties = .{ .target_set = TargetSet.initOne(.mips) } }, | ||
| 6726 | // __builtin_mips_muleu_s_ph_qbr | ||
| 6727 | .{ .tag = @enumFromInt(793), .param_str = "V2sV4ScV2s", .properties = .{ .target_set = TargetSet.initOne(.mips) } }, | ||
| 6728 | // __builtin_mips_mulq_rs_ph | ||
| 6729 | .{ .tag = @enumFromInt(794), .param_str = "V2sV2sV2s", .properties = .{ .target_set = TargetSet.initOne(.mips) } }, | ||
| 6730 | // __builtin_mips_mulq_rs_w | ||
| 6731 | .{ .tag = @enumFromInt(795), .param_str = "iii", .properties = .{ .target_set = TargetSet.initOne(.mips) } }, | ||
| 6732 | // __builtin_mips_mulq_s_ph | ||
| 6733 | .{ .tag = @enumFromInt(796), .param_str = "V2sV2sV2s", .properties = .{ .target_set = TargetSet.initOne(.mips) } }, | ||
| 6734 | // __builtin_mips_mulq_s_w | ||
| 6735 | .{ .tag = @enumFromInt(797), .param_str = "iii", .properties = .{ .target_set = TargetSet.initOne(.mips) } }, | ||
| 6736 | // __builtin_mips_mulsa_w_ph | ||
| 6737 | .{ .tag = @enumFromInt(798), .param_str = "LLiLLiV2sV2s", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 6738 | // __builtin_mips_mulsaq_s_w_ph | ||
| 6739 | .{ .tag = @enumFromInt(799), .param_str = "LLiLLiV2sV2s", .properties = .{ .target_set = TargetSet.initOne(.mips) } }, | ||
| 6740 | // __builtin_mips_mult | ||
| 6741 | .{ .tag = @enumFromInt(800), .param_str = "LLiii", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 6742 | // __builtin_mips_multu | ||
| 6743 | .{ .tag = @enumFromInt(801), .param_str = "LLiUiUi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 6744 | // __builtin_mips_packrl_ph | ||
| 6745 | .{ .tag = @enumFromInt(802), .param_str = "V2sV2sV2s", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 6746 | // __builtin_mips_pick_ph | ||
| 6747 | .{ .tag = @enumFromInt(803), .param_str = "V2sV2sV2s", .properties = .{ .target_set = TargetSet.initOne(.mips) } }, | ||
| 6748 | // __builtin_mips_pick_qb | ||
| 6749 | .{ .tag = @enumFromInt(804), .param_str = "V4ScV4ScV4Sc", .properties = .{ .target_set = TargetSet.initOne(.mips) } }, | ||
| 6750 | // __builtin_mips_preceq_w_phl | ||
| 6751 | .{ .tag = @enumFromInt(805), .param_str = "iV2s", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 6752 | // __builtin_mips_preceq_w_phr | ||
| 6753 | .{ .tag = @enumFromInt(806), .param_str = "iV2s", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 6754 | // __builtin_mips_precequ_ph_qbl | ||
| 6755 | .{ .tag = @enumFromInt(807), .param_str = "V2sV4Sc", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 6756 | // __builtin_mips_precequ_ph_qbla | ||
| 6757 | .{ .tag = @enumFromInt(808), .param_str = "V2sV4Sc", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 6758 | // __builtin_mips_precequ_ph_qbr | ||
| 6759 | .{ .tag = @enumFromInt(809), .param_str = "V2sV4Sc", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 6760 | // __builtin_mips_precequ_ph_qbra | ||
| 6761 | .{ .tag = @enumFromInt(810), .param_str = "V2sV4Sc", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 6762 | // __builtin_mips_preceu_ph_qbl | ||
| 6763 | .{ .tag = @enumFromInt(811), .param_str = "V2sV4Sc", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 6764 | // __builtin_mips_preceu_ph_qbla | ||
| 6765 | .{ .tag = @enumFromInt(812), .param_str = "V2sV4Sc", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 6766 | // __builtin_mips_preceu_ph_qbr | ||
| 6767 | .{ .tag = @enumFromInt(813), .param_str = "V2sV4Sc", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 6768 | // __builtin_mips_preceu_ph_qbra | ||
| 6769 | .{ .tag = @enumFromInt(814), .param_str = "V2sV4Sc", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 6770 | // __builtin_mips_precr_qb_ph | ||
| 6771 | .{ .tag = @enumFromInt(815), .param_str = "V4ScV2sV2s", .properties = .{ .target_set = TargetSet.initOne(.mips) } }, | ||
| 6772 | // __builtin_mips_precr_sra_ph_w | ||
| 6773 | .{ .tag = @enumFromInt(816), .param_str = "V2siiIi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 6774 | // __builtin_mips_precr_sra_r_ph_w | ||
| 6775 | .{ .tag = @enumFromInt(817), .param_str = "V2siiIi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 6776 | // __builtin_mips_precrq_ph_w | ||
| 6777 | .{ .tag = @enumFromInt(818), .param_str = "V2sii", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 6778 | // __builtin_mips_precrq_qb_ph | ||
| 6779 | .{ .tag = @enumFromInt(819), .param_str = "V4ScV2sV2s", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 6780 | // __builtin_mips_precrq_rs_ph_w | ||
| 6781 | .{ .tag = @enumFromInt(820), .param_str = "V2sii", .properties = .{ .target_set = TargetSet.initOne(.mips) } }, | ||
| 6782 | // __builtin_mips_precrqu_s_qb_ph | ||
| 6783 | .{ .tag = @enumFromInt(821), .param_str = "V4ScV2sV2s", .properties = .{ .target_set = TargetSet.initOne(.mips) } }, | ||
| 6784 | // __builtin_mips_prepend | ||
| 6785 | .{ .tag = @enumFromInt(822), .param_str = "iiiIi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 6786 | // __builtin_mips_raddu_w_qb | ||
| 6787 | .{ .tag = @enumFromInt(823), .param_str = "iV4Sc", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 6788 | // __builtin_mips_rddsp | ||
| 6789 | .{ .tag = @enumFromInt(824), .param_str = "iIi", .properties = .{ .target_set = TargetSet.initOne(.mips) } }, | ||
| 6790 | // __builtin_mips_repl_ph | ||
| 6791 | .{ .tag = @enumFromInt(825), .param_str = "V2si", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 6792 | // __builtin_mips_repl_qb | ||
| 6793 | .{ .tag = @enumFromInt(826), .param_str = "V4Sci", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 6794 | // __builtin_mips_shilo | ||
| 6795 | .{ .tag = @enumFromInt(827), .param_str = "LLiLLii", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 6796 | // __builtin_mips_shll_ph | ||
| 6797 | .{ .tag = @enumFromInt(828), .param_str = "V2sV2si", .properties = .{ .target_set = TargetSet.initOne(.mips) } }, | ||
| 6798 | // __builtin_mips_shll_qb | ||
| 6799 | .{ .tag = @enumFromInt(829), .param_str = "V4ScV4Sci", .properties = .{ .target_set = TargetSet.initOne(.mips) } }, | ||
| 6800 | // __builtin_mips_shll_s_ph | ||
| 6801 | .{ .tag = @enumFromInt(830), .param_str = "V2sV2si", .properties = .{ .target_set = TargetSet.initOne(.mips) } }, | ||
| 6802 | // __builtin_mips_shll_s_w | ||
| 6803 | .{ .tag = @enumFromInt(831), .param_str = "iii", .properties = .{ .target_set = TargetSet.initOne(.mips) } }, | ||
| 6804 | // __builtin_mips_shra_ph | ||
| 6805 | .{ .tag = @enumFromInt(832), .param_str = "V2sV2si", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 6806 | // __builtin_mips_shra_qb | ||
| 6807 | .{ .tag = @enumFromInt(833), .param_str = "V4ScV4Sci", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 6808 | // __builtin_mips_shra_r_ph | ||
| 6809 | .{ .tag = @enumFromInt(834), .param_str = "V2sV2si", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 6810 | // __builtin_mips_shra_r_qb | ||
| 6811 | .{ .tag = @enumFromInt(835), .param_str = "V4ScV4Sci", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 6812 | // __builtin_mips_shra_r_w | ||
| 6813 | .{ .tag = @enumFromInt(836), .param_str = "iii", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 6814 | // __builtin_mips_shrl_ph | ||
| 6815 | .{ .tag = @enumFromInt(837), .param_str = "V2sV2si", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 6816 | // __builtin_mips_shrl_qb | ||
| 6817 | .{ .tag = @enumFromInt(838), .param_str = "V4ScV4Sci", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 6818 | // __builtin_mips_subq_ph | ||
| 6819 | .{ .tag = @enumFromInt(839), .param_str = "V2sV2sV2s", .properties = .{ .target_set = TargetSet.initOne(.mips) } }, | ||
| 6820 | // __builtin_mips_subq_s_ph | ||
| 6821 | .{ .tag = @enumFromInt(840), .param_str = "V2sV2sV2s", .properties = .{ .target_set = TargetSet.initOne(.mips) } }, | ||
| 6822 | // __builtin_mips_subq_s_w | ||
| 6823 | .{ .tag = @enumFromInt(841), .param_str = "iii", .properties = .{ .target_set = TargetSet.initOne(.mips) } }, | ||
| 6824 | // __builtin_mips_subqh_ph | ||
| 6825 | .{ .tag = @enumFromInt(842), .param_str = "V2sV2sV2s", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 6826 | // __builtin_mips_subqh_r_ph | ||
| 6827 | .{ .tag = @enumFromInt(843), .param_str = "V2sV2sV2s", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 6828 | // __builtin_mips_subqh_r_w | ||
| 6829 | .{ .tag = @enumFromInt(844), .param_str = "iii", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 6830 | // __builtin_mips_subqh_w | ||
| 6831 | .{ .tag = @enumFromInt(845), .param_str = "iii", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 6832 | // __builtin_mips_subu_ph | ||
| 6833 | .{ .tag = @enumFromInt(846), .param_str = "V2sV2sV2s", .properties = .{ .target_set = TargetSet.initOne(.mips) } }, | ||
| 6834 | // __builtin_mips_subu_qb | ||
| 6835 | .{ .tag = @enumFromInt(847), .param_str = "V4ScV4ScV4Sc", .properties = .{ .target_set = TargetSet.initOne(.mips) } }, | ||
| 6836 | // __builtin_mips_subu_s_ph | ||
| 6837 | .{ .tag = @enumFromInt(848), .param_str = "V2sV2sV2s", .properties = .{ .target_set = TargetSet.initOne(.mips) } }, | ||
| 6838 | // __builtin_mips_subu_s_qb | ||
| 6839 | .{ .tag = @enumFromInt(849), .param_str = "V4ScV4ScV4Sc", .properties = .{ .target_set = TargetSet.initOne(.mips) } }, | ||
| 6840 | // __builtin_mips_subuh_qb | ||
| 6841 | .{ .tag = @enumFromInt(850), .param_str = "V4ScV4ScV4Sc", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 6842 | // __builtin_mips_subuh_r_qb | ||
| 6843 | .{ .tag = @enumFromInt(851), .param_str = "V4ScV4ScV4Sc", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 6844 | // __builtin_mips_wrdsp | ||
| 6845 | .{ .tag = @enumFromInt(852), .param_str = "viIi", .properties = .{ .target_set = TargetSet.initOne(.mips) } }, | ||
| 6846 | // __builtin_modf | ||
| 6847 | .{ .tag = @enumFromInt(853), .param_str = "ddd*", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true } } }, | ||
| 6848 | // __builtin_modff | ||
| 6849 | .{ .tag = @enumFromInt(854), .param_str = "fff*", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true } } }, | ||
| 6850 | // __builtin_modff128 | ||
| 6851 | .{ .tag = @enumFromInt(855), .param_str = "LLdLLdLLd*", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true } } }, | ||
| 6852 | // __builtin_modfl | ||
| 6853 | .{ .tag = @enumFromInt(856), .param_str = "LdLdLd*", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true } } }, | ||
| 6854 | // __builtin_msa_add_a_b | ||
| 6855 | .{ .tag = @enumFromInt(857), .param_str = "V16ScV16ScV16Sc", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 6856 | // __builtin_msa_add_a_d | ||
| 6857 | .{ .tag = @enumFromInt(858), .param_str = "V2SLLiV2SLLiV2SLLi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 6858 | // __builtin_msa_add_a_h | ||
| 6859 | .{ .tag = @enumFromInt(859), .param_str = "V8SsV8SsV8Ss", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 6860 | // __builtin_msa_add_a_w | ||
| 6861 | .{ .tag = @enumFromInt(860), .param_str = "V4SiV4SiV4Si", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 6862 | // __builtin_msa_adds_a_b | ||
| 6863 | .{ .tag = @enumFromInt(861), .param_str = "V16ScV16ScV16Sc", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 6864 | // __builtin_msa_adds_a_d | ||
| 6865 | .{ .tag = @enumFromInt(862), .param_str = "V2SLLiV2SLLiV2SLLi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 6866 | // __builtin_msa_adds_a_h | ||
| 6867 | .{ .tag = @enumFromInt(863), .param_str = "V8SsV8SsV8Ss", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 6868 | // __builtin_msa_adds_a_w | ||
| 6869 | .{ .tag = @enumFromInt(864), .param_str = "V4SiV4SiV4Si", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 6870 | // __builtin_msa_adds_s_b | ||
| 6871 | .{ .tag = @enumFromInt(865), .param_str = "V16ScV16ScV16Sc", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 6872 | // __builtin_msa_adds_s_d | ||
| 6873 | .{ .tag = @enumFromInt(866), .param_str = "V2SLLiV2SLLiV2SLLi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 6874 | // __builtin_msa_adds_s_h | ||
| 6875 | .{ .tag = @enumFromInt(867), .param_str = "V8SsV8SsV8Ss", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 6876 | // __builtin_msa_adds_s_w | ||
| 6877 | .{ .tag = @enumFromInt(868), .param_str = "V4SiV4SiV4Si", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 6878 | // __builtin_msa_adds_u_b | ||
| 6879 | .{ .tag = @enumFromInt(869), .param_str = "V16UcV16UcV16Uc", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 6880 | // __builtin_msa_adds_u_d | ||
| 6881 | .{ .tag = @enumFromInt(870), .param_str = "V2ULLiV2ULLiV2ULLi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 6882 | // __builtin_msa_adds_u_h | ||
| 6883 | .{ .tag = @enumFromInt(871), .param_str = "V8UsV8UsV8Us", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 6884 | // __builtin_msa_adds_u_w | ||
| 6885 | .{ .tag = @enumFromInt(872), .param_str = "V4UiV4UiV4Ui", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 6886 | // __builtin_msa_addv_b | ||
| 6887 | .{ .tag = @enumFromInt(873), .param_str = "V16cV16cV16c", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 6888 | // __builtin_msa_addv_d | ||
| 6889 | .{ .tag = @enumFromInt(874), .param_str = "V2LLiV2LLiV2LLi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 6890 | // __builtin_msa_addv_h | ||
| 6891 | .{ .tag = @enumFromInt(875), .param_str = "V8sV8sV8s", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 6892 | // __builtin_msa_addv_w | ||
| 6893 | .{ .tag = @enumFromInt(876), .param_str = "V4iV4iV4i", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 6894 | // __builtin_msa_addvi_b | ||
| 6895 | .{ .tag = @enumFromInt(877), .param_str = "V16cV16cIUi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 6896 | // __builtin_msa_addvi_d | ||
| 6897 | .{ .tag = @enumFromInt(878), .param_str = "V2LLiV2LLiIUi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 6898 | // __builtin_msa_addvi_h | ||
| 6899 | .{ .tag = @enumFromInt(879), .param_str = "V8sV8sIUi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 6900 | // __builtin_msa_addvi_w | ||
| 6901 | .{ .tag = @enumFromInt(880), .param_str = "V4iV4iIUi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 6902 | // __builtin_msa_and_v | ||
| 6903 | .{ .tag = @enumFromInt(881), .param_str = "V16UcV16UcV16Uc", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 6904 | // __builtin_msa_andi_b | ||
| 6905 | .{ .tag = @enumFromInt(882), .param_str = "V16UcV16UcIUi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 6906 | // __builtin_msa_asub_s_b | ||
| 6907 | .{ .tag = @enumFromInt(883), .param_str = "V16ScV16ScV16Sc", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 6908 | // __builtin_msa_asub_s_d | ||
| 6909 | .{ .tag = @enumFromInt(884), .param_str = "V2SLLiV2SLLiV2SLLi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 6910 | // __builtin_msa_asub_s_h | ||
| 6911 | .{ .tag = @enumFromInt(885), .param_str = "V8SsV8SsV8Ss", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 6912 | // __builtin_msa_asub_s_w | ||
| 6913 | .{ .tag = @enumFromInt(886), .param_str = "V4SiV4SiV4Si", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 6914 | // __builtin_msa_asub_u_b | ||
| 6915 | .{ .tag = @enumFromInt(887), .param_str = "V16UcV16UcV16Uc", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 6916 | // __builtin_msa_asub_u_d | ||
| 6917 | .{ .tag = @enumFromInt(888), .param_str = "V2ULLiV2ULLiV2ULLi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 6918 | // __builtin_msa_asub_u_h | ||
| 6919 | .{ .tag = @enumFromInt(889), .param_str = "V8UsV8UsV8Us", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 6920 | // __builtin_msa_asub_u_w | ||
| 6921 | .{ .tag = @enumFromInt(890), .param_str = "V4UiV4UiV4Ui", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 6922 | // __builtin_msa_ave_s_b | ||
| 6923 | .{ .tag = @enumFromInt(891), .param_str = "V16ScV16ScV16Sc", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 6924 | // __builtin_msa_ave_s_d | ||
| 6925 | .{ .tag = @enumFromInt(892), .param_str = "V2SLLiV2SLLiV2SLLi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 6926 | // __builtin_msa_ave_s_h | ||
| 6927 | .{ .tag = @enumFromInt(893), .param_str = "V8SsV8SsV8Ss", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 6928 | // __builtin_msa_ave_s_w | ||
| 6929 | .{ .tag = @enumFromInt(894), .param_str = "V4SiV4SiV4Si", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 6930 | // __builtin_msa_ave_u_b | ||
| 6931 | .{ .tag = @enumFromInt(895), .param_str = "V16UcV16UcV16Uc", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 6932 | // __builtin_msa_ave_u_d | ||
| 6933 | .{ .tag = @enumFromInt(896), .param_str = "V2ULLiV2ULLiV2ULLi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 6934 | // __builtin_msa_ave_u_h | ||
| 6935 | .{ .tag = @enumFromInt(897), .param_str = "V8UsV8UsV8Us", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 6936 | // __builtin_msa_ave_u_w | ||
| 6937 | .{ .tag = @enumFromInt(898), .param_str = "V4UiV4UiV4Ui", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 6938 | // __builtin_msa_aver_s_b | ||
| 6939 | .{ .tag = @enumFromInt(899), .param_str = "V16ScV16ScV16Sc", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 6940 | // __builtin_msa_aver_s_d | ||
| 6941 | .{ .tag = @enumFromInt(900), .param_str = "V2SLLiV2SLLiV2SLLi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 6942 | // __builtin_msa_aver_s_h | ||
| 6943 | .{ .tag = @enumFromInt(901), .param_str = "V8SsV8SsV8Ss", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 6944 | // __builtin_msa_aver_s_w | ||
| 6945 | .{ .tag = @enumFromInt(902), .param_str = "V4SiV4SiV4Si", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 6946 | // __builtin_msa_aver_u_b | ||
| 6947 | .{ .tag = @enumFromInt(903), .param_str = "V16UcV16UcV16Uc", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 6948 | // __builtin_msa_aver_u_d | ||
| 6949 | .{ .tag = @enumFromInt(904), .param_str = "V2ULLiV2ULLiV2ULLi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 6950 | // __builtin_msa_aver_u_h | ||
| 6951 | .{ .tag = @enumFromInt(905), .param_str = "V8UsV8UsV8Us", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 6952 | // __builtin_msa_aver_u_w | ||
| 6953 | .{ .tag = @enumFromInt(906), .param_str = "V4UiV4UiV4Ui", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 6954 | // __builtin_msa_bclr_b | ||
| 6955 | .{ .tag = @enumFromInt(907), .param_str = "V16UcV16UcV16Uc", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 6956 | // __builtin_msa_bclr_d | ||
| 6957 | .{ .tag = @enumFromInt(908), .param_str = "V2ULLiV2ULLiV2ULLi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 6958 | // __builtin_msa_bclr_h | ||
| 6959 | .{ .tag = @enumFromInt(909), .param_str = "V8UsV8UsV8Us", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 6960 | // __builtin_msa_bclr_w | ||
| 6961 | .{ .tag = @enumFromInt(910), .param_str = "V4UiV4UiV4Ui", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 6962 | // __builtin_msa_bclri_b | ||
| 6963 | .{ .tag = @enumFromInt(911), .param_str = "V16UcV16UcIUi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 6964 | // __builtin_msa_bclri_d | ||
| 6965 | .{ .tag = @enumFromInt(912), .param_str = "V2ULLiV2ULLiIUi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 6966 | // __builtin_msa_bclri_h | ||
| 6967 | .{ .tag = @enumFromInt(913), .param_str = "V8UsV8UsIUi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 6968 | // __builtin_msa_bclri_w | ||
| 6969 | .{ .tag = @enumFromInt(914), .param_str = "V4UiV4UiIUi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 6970 | // __builtin_msa_binsl_b | ||
| 6971 | .{ .tag = @enumFromInt(915), .param_str = "V16UcV16UcV16UcV16Uc", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 6972 | // __builtin_msa_binsl_d | ||
| 6973 | .{ .tag = @enumFromInt(916), .param_str = "V2ULLiV2ULLiV2ULLiV2ULLi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 6974 | // __builtin_msa_binsl_h | ||
| 6975 | .{ .tag = @enumFromInt(917), .param_str = "V8UsV8UsV8UsV8Us", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 6976 | // __builtin_msa_binsl_w | ||
| 6977 | .{ .tag = @enumFromInt(918), .param_str = "V4UiV4UiV4UiV4Ui", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 6978 | // __builtin_msa_binsli_b | ||
| 6979 | .{ .tag = @enumFromInt(919), .param_str = "V16UcV16UcV16UcIUi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 6980 | // __builtin_msa_binsli_d | ||
| 6981 | .{ .tag = @enumFromInt(920), .param_str = "V2ULLiV2ULLiV2ULLiIUi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 6982 | // __builtin_msa_binsli_h | ||
| 6983 | .{ .tag = @enumFromInt(921), .param_str = "V8UsV8UsV8UsIUi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 6984 | // __builtin_msa_binsli_w | ||
| 6985 | .{ .tag = @enumFromInt(922), .param_str = "V4UiV4UiV4UiIUi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 6986 | // __builtin_msa_binsr_b | ||
| 6987 | .{ .tag = @enumFromInt(923), .param_str = "V16UcV16UcV16UcV16Uc", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 6988 | // __builtin_msa_binsr_d | ||
| 6989 | .{ .tag = @enumFromInt(924), .param_str = "V2ULLiV2ULLiV2ULLiV2ULLi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 6990 | // __builtin_msa_binsr_h | ||
| 6991 | .{ .tag = @enumFromInt(925), .param_str = "V8UsV8UsV8UsV8Us", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 6992 | // __builtin_msa_binsr_w | ||
| 6993 | .{ .tag = @enumFromInt(926), .param_str = "V4UiV4UiV4UiV4Ui", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 6994 | // __builtin_msa_binsri_b | ||
| 6995 | .{ .tag = @enumFromInt(927), .param_str = "V16UcV16UcV16UcIUi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 6996 | // __builtin_msa_binsri_d | ||
| 6997 | .{ .tag = @enumFromInt(928), .param_str = "V2ULLiV2ULLiV2ULLiIUi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 6998 | // __builtin_msa_binsri_h | ||
| 6999 | .{ .tag = @enumFromInt(929), .param_str = "V8UsV8UsV8UsIUi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7000 | // __builtin_msa_binsri_w | ||
| 7001 | .{ .tag = @enumFromInt(930), .param_str = "V4UiV4UiV4UiIUi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7002 | // __builtin_msa_bmnz_v | ||
| 7003 | .{ .tag = @enumFromInt(931), .param_str = "V16UcV16UcV16UcV16Uc", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7004 | // __builtin_msa_bmnzi_b | ||
| 7005 | .{ .tag = @enumFromInt(932), .param_str = "V16UcV16UcV16UcIUi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7006 | // __builtin_msa_bmz_v | ||
| 7007 | .{ .tag = @enumFromInt(933), .param_str = "V16UcV16UcV16UcV16Uc", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7008 | // __builtin_msa_bmzi_b | ||
| 7009 | .{ .tag = @enumFromInt(934), .param_str = "V16UcV16UcV16UcIUi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7010 | // __builtin_msa_bneg_b | ||
| 7011 | .{ .tag = @enumFromInt(935), .param_str = "V16UcV16UcV16Uc", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7012 | // __builtin_msa_bneg_d | ||
| 7013 | .{ .tag = @enumFromInt(936), .param_str = "V2ULLiV2ULLiV2ULLi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7014 | // __builtin_msa_bneg_h | ||
| 7015 | .{ .tag = @enumFromInt(937), .param_str = "V8UsV8UsV8Us", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7016 | // __builtin_msa_bneg_w | ||
| 7017 | .{ .tag = @enumFromInt(938), .param_str = "V4UiV4UiV4Ui", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7018 | // __builtin_msa_bnegi_b | ||
| 7019 | .{ .tag = @enumFromInt(939), .param_str = "V16UcV16UcIUi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7020 | // __builtin_msa_bnegi_d | ||
| 7021 | .{ .tag = @enumFromInt(940), .param_str = "V2ULLiV2ULLiIUi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7022 | // __builtin_msa_bnegi_h | ||
| 7023 | .{ .tag = @enumFromInt(941), .param_str = "V8UsV8UsIUi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7024 | // __builtin_msa_bnegi_w | ||
| 7025 | .{ .tag = @enumFromInt(942), .param_str = "V4UiV4UiIUi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7026 | // __builtin_msa_bnz_b | ||
| 7027 | .{ .tag = @enumFromInt(943), .param_str = "iV16Uc", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7028 | // __builtin_msa_bnz_d | ||
| 7029 | .{ .tag = @enumFromInt(944), .param_str = "iV2ULLi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7030 | // __builtin_msa_bnz_h | ||
| 7031 | .{ .tag = @enumFromInt(945), .param_str = "iV8Us", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7032 | // __builtin_msa_bnz_v | ||
| 7033 | .{ .tag = @enumFromInt(946), .param_str = "iV16Uc", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7034 | // __builtin_msa_bnz_w | ||
| 7035 | .{ .tag = @enumFromInt(947), .param_str = "iV4Ui", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7036 | // __builtin_msa_bsel_v | ||
| 7037 | .{ .tag = @enumFromInt(948), .param_str = "V16UcV16UcV16UcV16Uc", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7038 | // __builtin_msa_bseli_b | ||
| 7039 | .{ .tag = @enumFromInt(949), .param_str = "V16UcV16UcV16UcIUi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7040 | // __builtin_msa_bset_b | ||
| 7041 | .{ .tag = @enumFromInt(950), .param_str = "V16UcV16UcV16Uc", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7042 | // __builtin_msa_bset_d | ||
| 7043 | .{ .tag = @enumFromInt(951), .param_str = "V2ULLiV2ULLiV2ULLi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7044 | // __builtin_msa_bset_h | ||
| 7045 | .{ .tag = @enumFromInt(952), .param_str = "V8UsV8UsV8Us", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7046 | // __builtin_msa_bset_w | ||
| 7047 | .{ .tag = @enumFromInt(953), .param_str = "V4UiV4UiV4Ui", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7048 | // __builtin_msa_bseti_b | ||
| 7049 | .{ .tag = @enumFromInt(954), .param_str = "V16UcV16UcIUi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7050 | // __builtin_msa_bseti_d | ||
| 7051 | .{ .tag = @enumFromInt(955), .param_str = "V2ULLiV2ULLiIUi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7052 | // __builtin_msa_bseti_h | ||
| 7053 | .{ .tag = @enumFromInt(956), .param_str = "V8UsV8UsIUi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7054 | // __builtin_msa_bseti_w | ||
| 7055 | .{ .tag = @enumFromInt(957), .param_str = "V4UiV4UiIUi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7056 | // __builtin_msa_bz_b | ||
| 7057 | .{ .tag = @enumFromInt(958), .param_str = "iV16Uc", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7058 | // __builtin_msa_bz_d | ||
| 7059 | .{ .tag = @enumFromInt(959), .param_str = "iV2ULLi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7060 | // __builtin_msa_bz_h | ||
| 7061 | .{ .tag = @enumFromInt(960), .param_str = "iV8Us", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7062 | // __builtin_msa_bz_v | ||
| 7063 | .{ .tag = @enumFromInt(961), .param_str = "iV16Uc", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7064 | // __builtin_msa_bz_w | ||
| 7065 | .{ .tag = @enumFromInt(962), .param_str = "iV4Ui", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7066 | // __builtin_msa_ceq_b | ||
| 7067 | .{ .tag = @enumFromInt(963), .param_str = "V16ScV16ScV16Sc", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7068 | // __builtin_msa_ceq_d | ||
| 7069 | .{ .tag = @enumFromInt(964), .param_str = "V2SLLiV2SLLiV2SLLi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7070 | // __builtin_msa_ceq_h | ||
| 7071 | .{ .tag = @enumFromInt(965), .param_str = "V8SsV8SsV8Ss", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7072 | // __builtin_msa_ceq_w | ||
| 7073 | .{ .tag = @enumFromInt(966), .param_str = "V4SiV4SiV4Si", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7074 | // __builtin_msa_ceqi_b | ||
| 7075 | .{ .tag = @enumFromInt(967), .param_str = "V16ScV16ScISi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7076 | // __builtin_msa_ceqi_d | ||
| 7077 | .{ .tag = @enumFromInt(968), .param_str = "V2SLLiV2SLLiISi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7078 | // __builtin_msa_ceqi_h | ||
| 7079 | .{ .tag = @enumFromInt(969), .param_str = "V8SsV8SsISi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7080 | // __builtin_msa_ceqi_w | ||
| 7081 | .{ .tag = @enumFromInt(970), .param_str = "V4SiV4SiISi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7082 | // __builtin_msa_cfcmsa | ||
| 7083 | .{ .tag = @enumFromInt(971), .param_str = "iIi", .properties = .{ .target_set = TargetSet.initOne(.mips) } }, | ||
| 7084 | // __builtin_msa_cle_s_b | ||
| 7085 | .{ .tag = @enumFromInt(972), .param_str = "V16ScV16ScV16Sc", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7086 | // __builtin_msa_cle_s_d | ||
| 7087 | .{ .tag = @enumFromInt(973), .param_str = "V2SLLiV2SLLiV2SLLi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7088 | // __builtin_msa_cle_s_h | ||
| 7089 | .{ .tag = @enumFromInt(974), .param_str = "V8SsV8SsV8Ss", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7090 | // __builtin_msa_cle_s_w | ||
| 7091 | .{ .tag = @enumFromInt(975), .param_str = "V4SiV4SiV4Si", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7092 | // __builtin_msa_cle_u_b | ||
| 7093 | .{ .tag = @enumFromInt(976), .param_str = "V16ScV16UcV16Uc", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7094 | // __builtin_msa_cle_u_d | ||
| 7095 | .{ .tag = @enumFromInt(977), .param_str = "V2SLLiV2ULLiV2ULLi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7096 | // __builtin_msa_cle_u_h | ||
| 7097 | .{ .tag = @enumFromInt(978), .param_str = "V8SsV8UsV8Us", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7098 | // __builtin_msa_cle_u_w | ||
| 7099 | .{ .tag = @enumFromInt(979), .param_str = "V4SiV4UiV4Ui", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7100 | // __builtin_msa_clei_s_b | ||
| 7101 | .{ .tag = @enumFromInt(980), .param_str = "V16ScV16ScISi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7102 | // __builtin_msa_clei_s_d | ||
| 7103 | .{ .tag = @enumFromInt(981), .param_str = "V2SLLiV2SLLiISi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7104 | // __builtin_msa_clei_s_h | ||
| 7105 | .{ .tag = @enumFromInt(982), .param_str = "V8SsV8SsISi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7106 | // __builtin_msa_clei_s_w | ||
| 7107 | .{ .tag = @enumFromInt(983), .param_str = "V4SiV4SiISi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7108 | // __builtin_msa_clei_u_b | ||
| 7109 | .{ .tag = @enumFromInt(984), .param_str = "V16ScV16UcIUi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7110 | // __builtin_msa_clei_u_d | ||
| 7111 | .{ .tag = @enumFromInt(985), .param_str = "V2SLLiV2ULLiIUi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7112 | // __builtin_msa_clei_u_h | ||
| 7113 | .{ .tag = @enumFromInt(986), .param_str = "V8SsV8UsIUi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7114 | // __builtin_msa_clei_u_w | ||
| 7115 | .{ .tag = @enumFromInt(987), .param_str = "V4SiV4UiIUi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7116 | // __builtin_msa_clt_s_b | ||
| 7117 | .{ .tag = @enumFromInt(988), .param_str = "V16ScV16ScV16Sc", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7118 | // __builtin_msa_clt_s_d | ||
| 7119 | .{ .tag = @enumFromInt(989), .param_str = "V2SLLiV2SLLiV2SLLi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7120 | // __builtin_msa_clt_s_h | ||
| 7121 | .{ .tag = @enumFromInt(990), .param_str = "V8SsV8SsV8Ss", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7122 | // __builtin_msa_clt_s_w | ||
| 7123 | .{ .tag = @enumFromInt(991), .param_str = "V4SiV4SiV4Si", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7124 | // __builtin_msa_clt_u_b | ||
| 7125 | .{ .tag = @enumFromInt(992), .param_str = "V16ScV16UcV16Uc", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7126 | // __builtin_msa_clt_u_d | ||
| 7127 | .{ .tag = @enumFromInt(993), .param_str = "V2SLLiV2ULLiV2ULLi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7128 | // __builtin_msa_clt_u_h | ||
| 7129 | .{ .tag = @enumFromInt(994), .param_str = "V8SsV8UsV8Us", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7130 | // __builtin_msa_clt_u_w | ||
| 7131 | .{ .tag = @enumFromInt(995), .param_str = "V4SiV4UiV4Ui", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7132 | // __builtin_msa_clti_s_b | ||
| 7133 | .{ .tag = @enumFromInt(996), .param_str = "V16ScV16ScISi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7134 | // __builtin_msa_clti_s_d | ||
| 7135 | .{ .tag = @enumFromInt(997), .param_str = "V2SLLiV2SLLiISi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7136 | // __builtin_msa_clti_s_h | ||
| 7137 | .{ .tag = @enumFromInt(998), .param_str = "V8SsV8SsISi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7138 | // __builtin_msa_clti_s_w | ||
| 7139 | .{ .tag = @enumFromInt(999), .param_str = "V4SiV4SiISi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7140 | // __builtin_msa_clti_u_b | ||
| 7141 | .{ .tag = @enumFromInt(1000), .param_str = "V16ScV16UcIUi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7142 | // __builtin_msa_clti_u_d | ||
| 7143 | .{ .tag = @enumFromInt(1001), .param_str = "V2SLLiV2ULLiIUi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7144 | // __builtin_msa_clti_u_h | ||
| 7145 | .{ .tag = @enumFromInt(1002), .param_str = "V8SsV8UsIUi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7146 | // __builtin_msa_clti_u_w | ||
| 7147 | .{ .tag = @enumFromInt(1003), .param_str = "V4SiV4UiIUi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7148 | // __builtin_msa_copy_s_b | ||
| 7149 | .{ .tag = @enumFromInt(1004), .param_str = "iV16ScIUi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7150 | // __builtin_msa_copy_s_d | ||
| 7151 | .{ .tag = @enumFromInt(1005), .param_str = "LLiV2SLLiIUi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7152 | // __builtin_msa_copy_s_h | ||
| 7153 | .{ .tag = @enumFromInt(1006), .param_str = "iV8SsIUi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7154 | // __builtin_msa_copy_s_w | ||
| 7155 | .{ .tag = @enumFromInt(1007), .param_str = "iV4SiIUi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7156 | // __builtin_msa_copy_u_b | ||
| 7157 | .{ .tag = @enumFromInt(1008), .param_str = "iV16UcIUi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7158 | // __builtin_msa_copy_u_d | ||
| 7159 | .{ .tag = @enumFromInt(1009), .param_str = "LLiV2ULLiIUi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7160 | // __builtin_msa_copy_u_h | ||
| 7161 | .{ .tag = @enumFromInt(1010), .param_str = "iV8UsIUi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7162 | // __builtin_msa_copy_u_w | ||
| 7163 | .{ .tag = @enumFromInt(1011), .param_str = "iV4UiIUi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7164 | // __builtin_msa_ctcmsa | ||
| 7165 | .{ .tag = @enumFromInt(1012), .param_str = "vIii", .properties = .{ .target_set = TargetSet.initOne(.mips) } }, | ||
| 7166 | // __builtin_msa_div_s_b | ||
| 7167 | .{ .tag = @enumFromInt(1013), .param_str = "V16ScV16ScV16Sc", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7168 | // __builtin_msa_div_s_d | ||
| 7169 | .{ .tag = @enumFromInt(1014), .param_str = "V2SLLiV2SLLiV2SLLi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7170 | // __builtin_msa_div_s_h | ||
| 7171 | .{ .tag = @enumFromInt(1015), .param_str = "V8SsV8SsV8Ss", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7172 | // __builtin_msa_div_s_w | ||
| 7173 | .{ .tag = @enumFromInt(1016), .param_str = "V4SiV4SiV4Si", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7174 | // __builtin_msa_div_u_b | ||
| 7175 | .{ .tag = @enumFromInt(1017), .param_str = "V16UcV16UcV16Uc", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7176 | // __builtin_msa_div_u_d | ||
| 7177 | .{ .tag = @enumFromInt(1018), .param_str = "V2ULLiV2ULLiV2ULLi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7178 | // __builtin_msa_div_u_h | ||
| 7179 | .{ .tag = @enumFromInt(1019), .param_str = "V8UsV8UsV8Us", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7180 | // __builtin_msa_div_u_w | ||
| 7181 | .{ .tag = @enumFromInt(1020), .param_str = "V4UiV4UiV4Ui", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7182 | // __builtin_msa_dotp_s_d | ||
| 7183 | .{ .tag = @enumFromInt(1021), .param_str = "V2SLLiV4SiV4Si", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7184 | // __builtin_msa_dotp_s_h | ||
| 7185 | .{ .tag = @enumFromInt(1022), .param_str = "V8SsV16ScV16Sc", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7186 | // __builtin_msa_dotp_s_w | ||
| 7187 | .{ .tag = @enumFromInt(1023), .param_str = "V4SiV8SsV8Ss", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7188 | // __builtin_msa_dotp_u_d | ||
| 7189 | .{ .tag = @enumFromInt(1024), .param_str = "V2ULLiV4UiV4Ui", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7190 | // __builtin_msa_dotp_u_h | ||
| 7191 | .{ .tag = @enumFromInt(1025), .param_str = "V8UsV16UcV16Uc", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7192 | // __builtin_msa_dotp_u_w | ||
| 7193 | .{ .tag = @enumFromInt(1026), .param_str = "V4UiV8UsV8Us", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7194 | // __builtin_msa_dpadd_s_d | ||
| 7195 | .{ .tag = @enumFromInt(1027), .param_str = "V2SLLiV2SLLiV4SiV4Si", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7196 | // __builtin_msa_dpadd_s_h | ||
| 7197 | .{ .tag = @enumFromInt(1028), .param_str = "V8SsV8SsV16ScV16Sc", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7198 | // __builtin_msa_dpadd_s_w | ||
| 7199 | .{ .tag = @enumFromInt(1029), .param_str = "V4SiV4SiV8SsV8Ss", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7200 | // __builtin_msa_dpadd_u_d | ||
| 7201 | .{ .tag = @enumFromInt(1030), .param_str = "V2ULLiV2ULLiV4UiV4Ui", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7202 | // __builtin_msa_dpadd_u_h | ||
| 7203 | .{ .tag = @enumFromInt(1031), .param_str = "V8UsV8UsV16UcV16Uc", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7204 | // __builtin_msa_dpadd_u_w | ||
| 7205 | .{ .tag = @enumFromInt(1032), .param_str = "V4UiV4UiV8UsV8Us", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7206 | // __builtin_msa_dpsub_s_d | ||
| 7207 | .{ .tag = @enumFromInt(1033), .param_str = "V2SLLiV2SLLiV4SiV4Si", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7208 | // __builtin_msa_dpsub_s_h | ||
| 7209 | .{ .tag = @enumFromInt(1034), .param_str = "V8SsV8SsV16ScV16Sc", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7210 | // __builtin_msa_dpsub_s_w | ||
| 7211 | .{ .tag = @enumFromInt(1035), .param_str = "V4SiV4SiV8SsV8Ss", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7212 | // __builtin_msa_dpsub_u_d | ||
| 7213 | .{ .tag = @enumFromInt(1036), .param_str = "V2ULLiV2ULLiV4UiV4Ui", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7214 | // __builtin_msa_dpsub_u_h | ||
| 7215 | .{ .tag = @enumFromInt(1037), .param_str = "V8UsV8UsV16UcV16Uc", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7216 | // __builtin_msa_dpsub_u_w | ||
| 7217 | .{ .tag = @enumFromInt(1038), .param_str = "V4UiV4UiV8UsV8Us", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7218 | // __builtin_msa_fadd_d | ||
| 7219 | .{ .tag = @enumFromInt(1039), .param_str = "V2dV2dV2d", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7220 | // __builtin_msa_fadd_w | ||
| 7221 | .{ .tag = @enumFromInt(1040), .param_str = "V4fV4fV4f", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7222 | // __builtin_msa_fcaf_d | ||
| 7223 | .{ .tag = @enumFromInt(1041), .param_str = "V2LLiV2dV2d", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7224 | // __builtin_msa_fcaf_w | ||
| 7225 | .{ .tag = @enumFromInt(1042), .param_str = "V4iV4fV4f", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7226 | // __builtin_msa_fceq_d | ||
| 7227 | .{ .tag = @enumFromInt(1043), .param_str = "V2LLiV2dV2d", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7228 | // __builtin_msa_fceq_w | ||
| 7229 | .{ .tag = @enumFromInt(1044), .param_str = "V4iV4fV4f", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7230 | // __builtin_msa_fclass_d | ||
| 7231 | .{ .tag = @enumFromInt(1045), .param_str = "V2LLiV2d", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7232 | // __builtin_msa_fclass_w | ||
| 7233 | .{ .tag = @enumFromInt(1046), .param_str = "V4iV4f", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7234 | // __builtin_msa_fcle_d | ||
| 7235 | .{ .tag = @enumFromInt(1047), .param_str = "V2LLiV2dV2d", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7236 | // __builtin_msa_fcle_w | ||
| 7237 | .{ .tag = @enumFromInt(1048), .param_str = "V4iV4fV4f", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7238 | // __builtin_msa_fclt_d | ||
| 7239 | .{ .tag = @enumFromInt(1049), .param_str = "V2LLiV2dV2d", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7240 | // __builtin_msa_fclt_w | ||
| 7241 | .{ .tag = @enumFromInt(1050), .param_str = "V4iV4fV4f", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7242 | // __builtin_msa_fcne_d | ||
| 7243 | .{ .tag = @enumFromInt(1051), .param_str = "V2LLiV2dV2d", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7244 | // __builtin_msa_fcne_w | ||
| 7245 | .{ .tag = @enumFromInt(1052), .param_str = "V4iV4fV4f", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7246 | // __builtin_msa_fcor_d | ||
| 7247 | .{ .tag = @enumFromInt(1053), .param_str = "V2LLiV2dV2d", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7248 | // __builtin_msa_fcor_w | ||
| 7249 | .{ .tag = @enumFromInt(1054), .param_str = "V4iV4fV4f", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7250 | // __builtin_msa_fcueq_d | ||
| 7251 | .{ .tag = @enumFromInt(1055), .param_str = "V2LLiV2dV2d", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7252 | // __builtin_msa_fcueq_w | ||
| 7253 | .{ .tag = @enumFromInt(1056), .param_str = "V4iV4fV4f", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7254 | // __builtin_msa_fcule_d | ||
| 7255 | .{ .tag = @enumFromInt(1057), .param_str = "V2LLiV2dV2d", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7256 | // __builtin_msa_fcule_w | ||
| 7257 | .{ .tag = @enumFromInt(1058), .param_str = "V4iV4fV4f", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7258 | // __builtin_msa_fcult_d | ||
| 7259 | .{ .tag = @enumFromInt(1059), .param_str = "V2LLiV2dV2d", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7260 | // __builtin_msa_fcult_w | ||
| 7261 | .{ .tag = @enumFromInt(1060), .param_str = "V4iV4fV4f", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7262 | // __builtin_msa_fcun_d | ||
| 7263 | .{ .tag = @enumFromInt(1061), .param_str = "V2LLiV2dV2d", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7264 | // __builtin_msa_fcun_w | ||
| 7265 | .{ .tag = @enumFromInt(1062), .param_str = "V4iV4fV4f", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7266 | // __builtin_msa_fcune_d | ||
| 7267 | .{ .tag = @enumFromInt(1063), .param_str = "V2LLiV2dV2d", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7268 | // __builtin_msa_fcune_w | ||
| 7269 | .{ .tag = @enumFromInt(1064), .param_str = "V4iV4fV4f", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7270 | // __builtin_msa_fdiv_d | ||
| 7271 | .{ .tag = @enumFromInt(1065), .param_str = "V2dV2dV2d", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7272 | // __builtin_msa_fdiv_w | ||
| 7273 | .{ .tag = @enumFromInt(1066), .param_str = "V4fV4fV4f", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7274 | // __builtin_msa_fexdo_h | ||
| 7275 | .{ .tag = @enumFromInt(1067), .param_str = "V8hV4fV4f", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7276 | // __builtin_msa_fexdo_w | ||
| 7277 | .{ .tag = @enumFromInt(1068), .param_str = "V4fV2dV2d", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7278 | // __builtin_msa_fexp2_d | ||
| 7279 | .{ .tag = @enumFromInt(1069), .param_str = "V2dV2dV2LLi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7280 | // __builtin_msa_fexp2_w | ||
| 7281 | .{ .tag = @enumFromInt(1070), .param_str = "V4fV4fV4i", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7282 | // __builtin_msa_fexupl_d | ||
| 7283 | .{ .tag = @enumFromInt(1071), .param_str = "V2dV4f", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7284 | // __builtin_msa_fexupl_w | ||
| 7285 | .{ .tag = @enumFromInt(1072), .param_str = "V4fV8h", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7286 | // __builtin_msa_fexupr_d | ||
| 7287 | .{ .tag = @enumFromInt(1073), .param_str = "V2dV4f", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7288 | // __builtin_msa_fexupr_w | ||
| 7289 | .{ .tag = @enumFromInt(1074), .param_str = "V4fV8h", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7290 | // __builtin_msa_ffint_s_d | ||
| 7291 | .{ .tag = @enumFromInt(1075), .param_str = "V2dV2SLLi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7292 | // __builtin_msa_ffint_s_w | ||
| 7293 | .{ .tag = @enumFromInt(1076), .param_str = "V4fV4Si", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7294 | // __builtin_msa_ffint_u_d | ||
| 7295 | .{ .tag = @enumFromInt(1077), .param_str = "V2dV2ULLi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7296 | // __builtin_msa_ffint_u_w | ||
| 7297 | .{ .tag = @enumFromInt(1078), .param_str = "V4fV4Ui", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7298 | // __builtin_msa_ffql_d | ||
| 7299 | .{ .tag = @enumFromInt(1079), .param_str = "V2dV4Si", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7300 | // __builtin_msa_ffql_w | ||
| 7301 | .{ .tag = @enumFromInt(1080), .param_str = "V4fV8Ss", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7302 | // __builtin_msa_ffqr_d | ||
| 7303 | .{ .tag = @enumFromInt(1081), .param_str = "V2dV4Si", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7304 | // __builtin_msa_ffqr_w | ||
| 7305 | .{ .tag = @enumFromInt(1082), .param_str = "V4fV8Ss", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7306 | // __builtin_msa_fill_b | ||
| 7307 | .{ .tag = @enumFromInt(1083), .param_str = "V16Sci", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7308 | // __builtin_msa_fill_d | ||
| 7309 | .{ .tag = @enumFromInt(1084), .param_str = "V2SLLiLLi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7310 | // __builtin_msa_fill_h | ||
| 7311 | .{ .tag = @enumFromInt(1085), .param_str = "V8Ssi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7312 | // __builtin_msa_fill_w | ||
| 7313 | .{ .tag = @enumFromInt(1086), .param_str = "V4Sii", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7314 | // __builtin_msa_flog2_d | ||
| 7315 | .{ .tag = @enumFromInt(1087), .param_str = "V2dV2d", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7316 | // __builtin_msa_flog2_w | ||
| 7317 | .{ .tag = @enumFromInt(1088), .param_str = "V4fV4f", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7318 | // __builtin_msa_fmadd_d | ||
| 7319 | .{ .tag = @enumFromInt(1089), .param_str = "V2dV2dV2dV2d", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7320 | // __builtin_msa_fmadd_w | ||
| 7321 | .{ .tag = @enumFromInt(1090), .param_str = "V4fV4fV4fV4f", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7322 | // __builtin_msa_fmax_a_d | ||
| 7323 | .{ .tag = @enumFromInt(1091), .param_str = "V2dV2dV2d", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7324 | // __builtin_msa_fmax_a_w | ||
| 7325 | .{ .tag = @enumFromInt(1092), .param_str = "V4fV4fV4f", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7326 | // __builtin_msa_fmax_d | ||
| 7327 | .{ .tag = @enumFromInt(1093), .param_str = "V2dV2dV2d", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7328 | // __builtin_msa_fmax_w | ||
| 7329 | .{ .tag = @enumFromInt(1094), .param_str = "V4fV4fV4f", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7330 | // __builtin_msa_fmin_a_d | ||
| 7331 | .{ .tag = @enumFromInt(1095), .param_str = "V2dV2dV2d", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7332 | // __builtin_msa_fmin_a_w | ||
| 7333 | .{ .tag = @enumFromInt(1096), .param_str = "V4fV4fV4f", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7334 | // __builtin_msa_fmin_d | ||
| 7335 | .{ .tag = @enumFromInt(1097), .param_str = "V2dV2dV2d", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7336 | // __builtin_msa_fmin_w | ||
| 7337 | .{ .tag = @enumFromInt(1098), .param_str = "V4fV4fV4f", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7338 | // __builtin_msa_fmsub_d | ||
| 7339 | .{ .tag = @enumFromInt(1099), .param_str = "V2dV2dV2dV2d", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7340 | // __builtin_msa_fmsub_w | ||
| 7341 | .{ .tag = @enumFromInt(1100), .param_str = "V4fV4fV4fV4f", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7342 | // __builtin_msa_fmul_d | ||
| 7343 | .{ .tag = @enumFromInt(1101), .param_str = "V2dV2dV2d", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7344 | // __builtin_msa_fmul_w | ||
| 7345 | .{ .tag = @enumFromInt(1102), .param_str = "V4fV4fV4f", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7346 | // __builtin_msa_frcp_d | ||
| 7347 | .{ .tag = @enumFromInt(1103), .param_str = "V2dV2d", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7348 | // __builtin_msa_frcp_w | ||
| 7349 | .{ .tag = @enumFromInt(1104), .param_str = "V4fV4f", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7350 | // __builtin_msa_frint_d | ||
| 7351 | .{ .tag = @enumFromInt(1105), .param_str = "V2dV2d", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7352 | // __builtin_msa_frint_w | ||
| 7353 | .{ .tag = @enumFromInt(1106), .param_str = "V4fV4f", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7354 | // __builtin_msa_frsqrt_d | ||
| 7355 | .{ .tag = @enumFromInt(1107), .param_str = "V2dV2d", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7356 | // __builtin_msa_frsqrt_w | ||
| 7357 | .{ .tag = @enumFromInt(1108), .param_str = "V4fV4f", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7358 | // __builtin_msa_fsaf_d | ||
| 7359 | .{ .tag = @enumFromInt(1109), .param_str = "V2LLiV2dV2d", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7360 | // __builtin_msa_fsaf_w | ||
| 7361 | .{ .tag = @enumFromInt(1110), .param_str = "V4iV4fV4f", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7362 | // __builtin_msa_fseq_d | ||
| 7363 | .{ .tag = @enumFromInt(1111), .param_str = "V2LLiV2dV2d", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7364 | // __builtin_msa_fseq_w | ||
| 7365 | .{ .tag = @enumFromInt(1112), .param_str = "V4iV4fV4f", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7366 | // __builtin_msa_fsle_d | ||
| 7367 | .{ .tag = @enumFromInt(1113), .param_str = "V2LLiV2dV2d", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7368 | // __builtin_msa_fsle_w | ||
| 7369 | .{ .tag = @enumFromInt(1114), .param_str = "V4iV4fV4f", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7370 | // __builtin_msa_fslt_d | ||
| 7371 | .{ .tag = @enumFromInt(1115), .param_str = "V2LLiV2dV2d", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7372 | // __builtin_msa_fslt_w | ||
| 7373 | .{ .tag = @enumFromInt(1116), .param_str = "V4iV4fV4f", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7374 | // __builtin_msa_fsne_d | ||
| 7375 | .{ .tag = @enumFromInt(1117), .param_str = "V2LLiV2dV2d", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7376 | // __builtin_msa_fsne_w | ||
| 7377 | .{ .tag = @enumFromInt(1118), .param_str = "V4iV4fV4f", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7378 | // __builtin_msa_fsor_d | ||
| 7379 | .{ .tag = @enumFromInt(1119), .param_str = "V2LLiV2dV2d", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7380 | // __builtin_msa_fsor_w | ||
| 7381 | .{ .tag = @enumFromInt(1120), .param_str = "V4iV4fV4f", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7382 | // __builtin_msa_fsqrt_d | ||
| 7383 | .{ .tag = @enumFromInt(1121), .param_str = "V2dV2d", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7384 | // __builtin_msa_fsqrt_w | ||
| 7385 | .{ .tag = @enumFromInt(1122), .param_str = "V4fV4f", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7386 | // __builtin_msa_fsub_d | ||
| 7387 | .{ .tag = @enumFromInt(1123), .param_str = "V2dV2dV2d", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7388 | // __builtin_msa_fsub_w | ||
| 7389 | .{ .tag = @enumFromInt(1124), .param_str = "V4fV4fV4f", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7390 | // __builtin_msa_fsueq_d | ||
| 7391 | .{ .tag = @enumFromInt(1125), .param_str = "V2LLiV2dV2d", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7392 | // __builtin_msa_fsueq_w | ||
| 7393 | .{ .tag = @enumFromInt(1126), .param_str = "V4iV4fV4f", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7394 | // __builtin_msa_fsule_d | ||
| 7395 | .{ .tag = @enumFromInt(1127), .param_str = "V2LLiV2dV2d", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7396 | // __builtin_msa_fsule_w | ||
| 7397 | .{ .tag = @enumFromInt(1128), .param_str = "V4iV4fV4f", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7398 | // __builtin_msa_fsult_d | ||
| 7399 | .{ .tag = @enumFromInt(1129), .param_str = "V2LLiV2dV2d", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7400 | // __builtin_msa_fsult_w | ||
| 7401 | .{ .tag = @enumFromInt(1130), .param_str = "V4iV4fV4f", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7402 | // __builtin_msa_fsun_d | ||
| 7403 | .{ .tag = @enumFromInt(1131), .param_str = "V2LLiV2dV2d", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7404 | // __builtin_msa_fsun_w | ||
| 7405 | .{ .tag = @enumFromInt(1132), .param_str = "V4iV4fV4f", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7406 | // __builtin_msa_fsune_d | ||
| 7407 | .{ .tag = @enumFromInt(1133), .param_str = "V2LLiV2dV2d", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7408 | // __builtin_msa_fsune_w | ||
| 7409 | .{ .tag = @enumFromInt(1134), .param_str = "V4iV4fV4f", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7410 | // __builtin_msa_ftint_s_d | ||
| 7411 | .{ .tag = @enumFromInt(1135), .param_str = "V2SLLiV2d", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7412 | // __builtin_msa_ftint_s_w | ||
| 7413 | .{ .tag = @enumFromInt(1136), .param_str = "V4SiV4f", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7414 | // __builtin_msa_ftint_u_d | ||
| 7415 | .{ .tag = @enumFromInt(1137), .param_str = "V2ULLiV2d", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7416 | // __builtin_msa_ftint_u_w | ||
| 7417 | .{ .tag = @enumFromInt(1138), .param_str = "V4UiV4f", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7418 | // __builtin_msa_ftq_h | ||
| 7419 | .{ .tag = @enumFromInt(1139), .param_str = "V4UiV4fV4f", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7420 | // __builtin_msa_ftq_w | ||
| 7421 | .{ .tag = @enumFromInt(1140), .param_str = "V2ULLiV2dV2d", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7422 | // __builtin_msa_ftrunc_s_d | ||
| 7423 | .{ .tag = @enumFromInt(1141), .param_str = "V2SLLiV2d", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7424 | // __builtin_msa_ftrunc_s_w | ||
| 7425 | .{ .tag = @enumFromInt(1142), .param_str = "V4SiV4f", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7426 | // __builtin_msa_ftrunc_u_d | ||
| 7427 | .{ .tag = @enumFromInt(1143), .param_str = "V2ULLiV2d", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7428 | // __builtin_msa_ftrunc_u_w | ||
| 7429 | .{ .tag = @enumFromInt(1144), .param_str = "V4UiV4f", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7430 | // __builtin_msa_hadd_s_d | ||
| 7431 | .{ .tag = @enumFromInt(1145), .param_str = "V2SLLiV4SiV4Si", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7432 | // __builtin_msa_hadd_s_h | ||
| 7433 | .{ .tag = @enumFromInt(1146), .param_str = "V8SsV16ScV16Sc", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7434 | // __builtin_msa_hadd_s_w | ||
| 7435 | .{ .tag = @enumFromInt(1147), .param_str = "V4SiV8SsV8Ss", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7436 | // __builtin_msa_hadd_u_d | ||
| 7437 | .{ .tag = @enumFromInt(1148), .param_str = "V2ULLiV4UiV4Ui", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7438 | // __builtin_msa_hadd_u_h | ||
| 7439 | .{ .tag = @enumFromInt(1149), .param_str = "V8UsV16UcV16Uc", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7440 | // __builtin_msa_hadd_u_w | ||
| 7441 | .{ .tag = @enumFromInt(1150), .param_str = "V4UiV8UsV8Us", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7442 | // __builtin_msa_hsub_s_d | ||
| 7443 | .{ .tag = @enumFromInt(1151), .param_str = "V2SLLiV4SiV4Si", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7444 | // __builtin_msa_hsub_s_h | ||
| 7445 | .{ .tag = @enumFromInt(1152), .param_str = "V8SsV16ScV16Sc", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7446 | // __builtin_msa_hsub_s_w | ||
| 7447 | .{ .tag = @enumFromInt(1153), .param_str = "V4SiV8SsV8Ss", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7448 | // __builtin_msa_hsub_u_d | ||
| 7449 | .{ .tag = @enumFromInt(1154), .param_str = "V2ULLiV4UiV4Ui", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7450 | // __builtin_msa_hsub_u_h | ||
| 7451 | .{ .tag = @enumFromInt(1155), .param_str = "V8UsV16UcV16Uc", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7452 | // __builtin_msa_hsub_u_w | ||
| 7453 | .{ .tag = @enumFromInt(1156), .param_str = "V4UiV8UsV8Us", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7454 | // __builtin_msa_ilvev_b | ||
| 7455 | .{ .tag = @enumFromInt(1157), .param_str = "V16cV16cV16c", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7456 | // __builtin_msa_ilvev_d | ||
| 7457 | .{ .tag = @enumFromInt(1158), .param_str = "V2LLiV2LLiV2LLi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7458 | // __builtin_msa_ilvev_h | ||
| 7459 | .{ .tag = @enumFromInt(1159), .param_str = "V8sV8sV8s", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7460 | // __builtin_msa_ilvev_w | ||
| 7461 | .{ .tag = @enumFromInt(1160), .param_str = "V4iV4iV4i", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7462 | // __builtin_msa_ilvl_b | ||
| 7463 | .{ .tag = @enumFromInt(1161), .param_str = "V16cV16cV16c", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7464 | // __builtin_msa_ilvl_d | ||
| 7465 | .{ .tag = @enumFromInt(1162), .param_str = "V2LLiV2LLiV2LLi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7466 | // __builtin_msa_ilvl_h | ||
| 7467 | .{ .tag = @enumFromInt(1163), .param_str = "V8sV8sV8s", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7468 | // __builtin_msa_ilvl_w | ||
| 7469 | .{ .tag = @enumFromInt(1164), .param_str = "V4iV4iV4i", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7470 | // __builtin_msa_ilvod_b | ||
| 7471 | .{ .tag = @enumFromInt(1165), .param_str = "V16cV16cV16c", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7472 | // __builtin_msa_ilvod_d | ||
| 7473 | .{ .tag = @enumFromInt(1166), .param_str = "V2LLiV2LLiV2LLi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7474 | // __builtin_msa_ilvod_h | ||
| 7475 | .{ .tag = @enumFromInt(1167), .param_str = "V8sV8sV8s", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7476 | // __builtin_msa_ilvod_w | ||
| 7477 | .{ .tag = @enumFromInt(1168), .param_str = "V4iV4iV4i", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7478 | // __builtin_msa_ilvr_b | ||
| 7479 | .{ .tag = @enumFromInt(1169), .param_str = "V16cV16cV16c", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7480 | // __builtin_msa_ilvr_d | ||
| 7481 | .{ .tag = @enumFromInt(1170), .param_str = "V2LLiV2LLiV2LLi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7482 | // __builtin_msa_ilvr_h | ||
| 7483 | .{ .tag = @enumFromInt(1171), .param_str = "V8sV8sV8s", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7484 | // __builtin_msa_ilvr_w | ||
| 7485 | .{ .tag = @enumFromInt(1172), .param_str = "V4iV4iV4i", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7486 | // __builtin_msa_insert_b | ||
| 7487 | .{ .tag = @enumFromInt(1173), .param_str = "V16ScV16ScIUii", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7488 | // __builtin_msa_insert_d | ||
| 7489 | .{ .tag = @enumFromInt(1174), .param_str = "V2SLLiV2SLLiIUiLLi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7490 | // __builtin_msa_insert_h | ||
| 7491 | .{ .tag = @enumFromInt(1175), .param_str = "V8SsV8SsIUii", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7492 | // __builtin_msa_insert_w | ||
| 7493 | .{ .tag = @enumFromInt(1176), .param_str = "V4SiV4SiIUii", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7494 | // __builtin_msa_insve_b | ||
| 7495 | .{ .tag = @enumFromInt(1177), .param_str = "V16ScV16ScIUiV16Sc", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7496 | // __builtin_msa_insve_d | ||
| 7497 | .{ .tag = @enumFromInt(1178), .param_str = "V2SLLiV2SLLiIUiV2SLLi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7498 | // __builtin_msa_insve_h | ||
| 7499 | .{ .tag = @enumFromInt(1179), .param_str = "V8SsV8SsIUiV8Ss", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7500 | // __builtin_msa_insve_w | ||
| 7501 | .{ .tag = @enumFromInt(1180), .param_str = "V4SiV4SiIUiV4Si", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7502 | // __builtin_msa_ld_b | ||
| 7503 | .{ .tag = @enumFromInt(1181), .param_str = "V16Scv*Ii", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7504 | // __builtin_msa_ld_d | ||
| 7505 | .{ .tag = @enumFromInt(1182), .param_str = "V2SLLiv*Ii", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7506 | // __builtin_msa_ld_h | ||
| 7507 | .{ .tag = @enumFromInt(1183), .param_str = "V8Ssv*Ii", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7508 | // __builtin_msa_ld_w | ||
| 7509 | .{ .tag = @enumFromInt(1184), .param_str = "V4Siv*Ii", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7510 | // __builtin_msa_ldi_b | ||
| 7511 | .{ .tag = @enumFromInt(1185), .param_str = "V16cIi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7512 | // __builtin_msa_ldi_d | ||
| 7513 | .{ .tag = @enumFromInt(1186), .param_str = "V2LLiIi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7514 | // __builtin_msa_ldi_h | ||
| 7515 | .{ .tag = @enumFromInt(1187), .param_str = "V8sIi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7516 | // __builtin_msa_ldi_w | ||
| 7517 | .{ .tag = @enumFromInt(1188), .param_str = "V4iIi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7518 | // __builtin_msa_ldr_d | ||
| 7519 | .{ .tag = @enumFromInt(1189), .param_str = "V2SLLiv*Ii", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7520 | // __builtin_msa_ldr_w | ||
| 7521 | .{ .tag = @enumFromInt(1190), .param_str = "V4Siv*Ii", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7522 | // __builtin_msa_madd_q_h | ||
| 7523 | .{ .tag = @enumFromInt(1191), .param_str = "V8SsV8SsV8SsV8Ss", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7524 | // __builtin_msa_madd_q_w | ||
| 7525 | .{ .tag = @enumFromInt(1192), .param_str = "V4SiV4SiV4SiV4Si", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7526 | // __builtin_msa_maddr_q_h | ||
| 7527 | .{ .tag = @enumFromInt(1193), .param_str = "V8SsV8SsV8SsV8Ss", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7528 | // __builtin_msa_maddr_q_w | ||
| 7529 | .{ .tag = @enumFromInt(1194), .param_str = "V4SiV4SiV4SiV4Si", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7530 | // __builtin_msa_maddv_b | ||
| 7531 | .{ .tag = @enumFromInt(1195), .param_str = "V16ScV16ScV16ScV16Sc", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7532 | // __builtin_msa_maddv_d | ||
| 7533 | .{ .tag = @enumFromInt(1196), .param_str = "V2SLLiV2SLLiV2SLLiV2SLLi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7534 | // __builtin_msa_maddv_h | ||
| 7535 | .{ .tag = @enumFromInt(1197), .param_str = "V8SsV8SsV8SsV8Ss", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7536 | // __builtin_msa_maddv_w | ||
| 7537 | .{ .tag = @enumFromInt(1198), .param_str = "V4SiV4SiV4SiV4Si", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7538 | // __builtin_msa_max_a_b | ||
| 7539 | .{ .tag = @enumFromInt(1199), .param_str = "V16ScV16ScV16Sc", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7540 | // __builtin_msa_max_a_d | ||
| 7541 | .{ .tag = @enumFromInt(1200), .param_str = "V2SLLiV2SLLiV2SLLi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7542 | // __builtin_msa_max_a_h | ||
| 7543 | .{ .tag = @enumFromInt(1201), .param_str = "V8SsV8SsV8Ss", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7544 | // __builtin_msa_max_a_w | ||
| 7545 | .{ .tag = @enumFromInt(1202), .param_str = "V4SiV4SiV4Si", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7546 | // __builtin_msa_max_s_b | ||
| 7547 | .{ .tag = @enumFromInt(1203), .param_str = "V16ScV16ScV16Sc", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7548 | // __builtin_msa_max_s_d | ||
| 7549 | .{ .tag = @enumFromInt(1204), .param_str = "V2SLLiV2SLLiV2SLLi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7550 | // __builtin_msa_max_s_h | ||
| 7551 | .{ .tag = @enumFromInt(1205), .param_str = "V8SsV8SsV8Ss", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7552 | // __builtin_msa_max_s_w | ||
| 7553 | .{ .tag = @enumFromInt(1206), .param_str = "V4SiV4SiV4Si", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7554 | // __builtin_msa_max_u_b | ||
| 7555 | .{ .tag = @enumFromInt(1207), .param_str = "V16UcV16UcV16Uc", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7556 | // __builtin_msa_max_u_d | ||
| 7557 | .{ .tag = @enumFromInt(1208), .param_str = "V2ULLiV2ULLiV2ULLi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7558 | // __builtin_msa_max_u_h | ||
| 7559 | .{ .tag = @enumFromInt(1209), .param_str = "V8UsV8UsV8Us", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7560 | // __builtin_msa_max_u_w | ||
| 7561 | .{ .tag = @enumFromInt(1210), .param_str = "V4UiV4UiV4Ui", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7562 | // __builtin_msa_maxi_s_b | ||
| 7563 | .{ .tag = @enumFromInt(1211), .param_str = "V16ScV16ScIi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7564 | // __builtin_msa_maxi_s_d | ||
| 7565 | .{ .tag = @enumFromInt(1212), .param_str = "V2SLLiV2SLLiIi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7566 | // __builtin_msa_maxi_s_h | ||
| 7567 | .{ .tag = @enumFromInt(1213), .param_str = "V8SsV8SsIi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7568 | // __builtin_msa_maxi_s_w | ||
| 7569 | .{ .tag = @enumFromInt(1214), .param_str = "V4SiV4SiIi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7570 | // __builtin_msa_maxi_u_b | ||
| 7571 | .{ .tag = @enumFromInt(1215), .param_str = "V16UcV16UcIi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7572 | // __builtin_msa_maxi_u_d | ||
| 7573 | .{ .tag = @enumFromInt(1216), .param_str = "V2ULLiV2ULLiIi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7574 | // __builtin_msa_maxi_u_h | ||
| 7575 | .{ .tag = @enumFromInt(1217), .param_str = "V8UsV8UsIi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7576 | // __builtin_msa_maxi_u_w | ||
| 7577 | .{ .tag = @enumFromInt(1218), .param_str = "V4UiV4UiIi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7578 | // __builtin_msa_min_a_b | ||
| 7579 | .{ .tag = @enumFromInt(1219), .param_str = "V16ScV16ScV16Sc", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7580 | // __builtin_msa_min_a_d | ||
| 7581 | .{ .tag = @enumFromInt(1220), .param_str = "V2SLLiV2SLLiV2SLLi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7582 | // __builtin_msa_min_a_h | ||
| 7583 | .{ .tag = @enumFromInt(1221), .param_str = "V8SsV8SsV8Ss", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7584 | // __builtin_msa_min_a_w | ||
| 7585 | .{ .tag = @enumFromInt(1222), .param_str = "V4SiV4SiV4Si", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7586 | // __builtin_msa_min_s_b | ||
| 7587 | .{ .tag = @enumFromInt(1223), .param_str = "V16ScV16ScV16Sc", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7588 | // __builtin_msa_min_s_d | ||
| 7589 | .{ .tag = @enumFromInt(1224), .param_str = "V2SLLiV2SLLiV2SLLi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7590 | // __builtin_msa_min_s_h | ||
| 7591 | .{ .tag = @enumFromInt(1225), .param_str = "V8SsV8SsV8Ss", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7592 | // __builtin_msa_min_s_w | ||
| 7593 | .{ .tag = @enumFromInt(1226), .param_str = "V4SiV4SiV4Si", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7594 | // __builtin_msa_min_u_b | ||
| 7595 | .{ .tag = @enumFromInt(1227), .param_str = "V16UcV16UcV16Uc", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7596 | // __builtin_msa_min_u_d | ||
| 7597 | .{ .tag = @enumFromInt(1228), .param_str = "V2ULLiV2ULLiV2ULLi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7598 | // __builtin_msa_min_u_h | ||
| 7599 | .{ .tag = @enumFromInt(1229), .param_str = "V8UsV8UsV8Us", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7600 | // __builtin_msa_min_u_w | ||
| 7601 | .{ .tag = @enumFromInt(1230), .param_str = "V4UiV4UiV4Ui", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7602 | // __builtin_msa_mini_s_b | ||
| 7603 | .{ .tag = @enumFromInt(1231), .param_str = "V16ScV16ScIi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7604 | // __builtin_msa_mini_s_d | ||
| 7605 | .{ .tag = @enumFromInt(1232), .param_str = "V2SLLiV2SLLiIi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7606 | // __builtin_msa_mini_s_h | ||
| 7607 | .{ .tag = @enumFromInt(1233), .param_str = "V8SsV8SsIi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7608 | // __builtin_msa_mini_s_w | ||
| 7609 | .{ .tag = @enumFromInt(1234), .param_str = "V4SiV4SiIi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7610 | // __builtin_msa_mini_u_b | ||
| 7611 | .{ .tag = @enumFromInt(1235), .param_str = "V16UcV16UcIi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7612 | // __builtin_msa_mini_u_d | ||
| 7613 | .{ .tag = @enumFromInt(1236), .param_str = "V2ULLiV2ULLiIi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7614 | // __builtin_msa_mini_u_h | ||
| 7615 | .{ .tag = @enumFromInt(1237), .param_str = "V8UsV8UsIi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7616 | // __builtin_msa_mini_u_w | ||
| 7617 | .{ .tag = @enumFromInt(1238), .param_str = "V4UiV4UiIi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7618 | // __builtin_msa_mod_s_b | ||
| 7619 | .{ .tag = @enumFromInt(1239), .param_str = "V16ScV16ScV16Sc", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7620 | // __builtin_msa_mod_s_d | ||
| 7621 | .{ .tag = @enumFromInt(1240), .param_str = "V2SLLiV2SLLiV2SLLi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7622 | // __builtin_msa_mod_s_h | ||
| 7623 | .{ .tag = @enumFromInt(1241), .param_str = "V8SsV8SsV8Ss", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7624 | // __builtin_msa_mod_s_w | ||
| 7625 | .{ .tag = @enumFromInt(1242), .param_str = "V4SiV4SiV4Si", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7626 | // __builtin_msa_mod_u_b | ||
| 7627 | .{ .tag = @enumFromInt(1243), .param_str = "V16UcV16UcV16Uc", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7628 | // __builtin_msa_mod_u_d | ||
| 7629 | .{ .tag = @enumFromInt(1244), .param_str = "V2ULLiV2ULLiV2ULLi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7630 | // __builtin_msa_mod_u_h | ||
| 7631 | .{ .tag = @enumFromInt(1245), .param_str = "V8UsV8UsV8Us", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7632 | // __builtin_msa_mod_u_w | ||
| 7633 | .{ .tag = @enumFromInt(1246), .param_str = "V4UiV4UiV4Ui", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7634 | // __builtin_msa_move_v | ||
| 7635 | .{ .tag = @enumFromInt(1247), .param_str = "V16ScV16Sc", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7636 | // __builtin_msa_msub_q_h | ||
| 7637 | .{ .tag = @enumFromInt(1248), .param_str = "V8SsV8SsV8SsV8Ss", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7638 | // __builtin_msa_msub_q_w | ||
| 7639 | .{ .tag = @enumFromInt(1249), .param_str = "V4SiV4SiV4SiV4Si", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7640 | // __builtin_msa_msubr_q_h | ||
| 7641 | .{ .tag = @enumFromInt(1250), .param_str = "V8SsV8SsV8SsV8Ss", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7642 | // __builtin_msa_msubr_q_w | ||
| 7643 | .{ .tag = @enumFromInt(1251), .param_str = "V4SiV4SiV4SiV4Si", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7644 | // __builtin_msa_msubv_b | ||
| 7645 | .{ .tag = @enumFromInt(1252), .param_str = "V16ScV16ScV16ScV16Sc", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7646 | // __builtin_msa_msubv_d | ||
| 7647 | .{ .tag = @enumFromInt(1253), .param_str = "V2SLLiV2SLLiV2SLLiV2SLLi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7648 | // __builtin_msa_msubv_h | ||
| 7649 | .{ .tag = @enumFromInt(1254), .param_str = "V8SsV8SsV8SsV8Ss", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7650 | // __builtin_msa_msubv_w | ||
| 7651 | .{ .tag = @enumFromInt(1255), .param_str = "V4SiV4SiV4SiV4Si", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7652 | // __builtin_msa_mul_q_h | ||
| 7653 | .{ .tag = @enumFromInt(1256), .param_str = "V8SsV8SsV8Ss", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7654 | // __builtin_msa_mul_q_w | ||
| 7655 | .{ .tag = @enumFromInt(1257), .param_str = "V4SiV4SiV4Si", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7656 | // __builtin_msa_mulr_q_h | ||
| 7657 | .{ .tag = @enumFromInt(1258), .param_str = "V8SsV8SsV8Ss", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7658 | // __builtin_msa_mulr_q_w | ||
| 7659 | .{ .tag = @enumFromInt(1259), .param_str = "V4SiV4SiV4Si", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7660 | // __builtin_msa_mulv_b | ||
| 7661 | .{ .tag = @enumFromInt(1260), .param_str = "V16ScV16ScV16Sc", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7662 | // __builtin_msa_mulv_d | ||
| 7663 | .{ .tag = @enumFromInt(1261), .param_str = "V2SLLiV2SLLiV2SLLi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7664 | // __builtin_msa_mulv_h | ||
| 7665 | .{ .tag = @enumFromInt(1262), .param_str = "V8SsV8SsV8Ss", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7666 | // __builtin_msa_mulv_w | ||
| 7667 | .{ .tag = @enumFromInt(1263), .param_str = "V4SiV4SiV4Si", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7668 | // __builtin_msa_nloc_b | ||
| 7669 | .{ .tag = @enumFromInt(1264), .param_str = "V16ScV16Sc", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7670 | // __builtin_msa_nloc_d | ||
| 7671 | .{ .tag = @enumFromInt(1265), .param_str = "V2SLLiV2SLLi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7672 | // __builtin_msa_nloc_h | ||
| 7673 | .{ .tag = @enumFromInt(1266), .param_str = "V8SsV8Ss", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7674 | // __builtin_msa_nloc_w | ||
| 7675 | .{ .tag = @enumFromInt(1267), .param_str = "V4SiV4Si", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7676 | // __builtin_msa_nlzc_b | ||
| 7677 | .{ .tag = @enumFromInt(1268), .param_str = "V16ScV16Sc", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7678 | // __builtin_msa_nlzc_d | ||
| 7679 | .{ .tag = @enumFromInt(1269), .param_str = "V2SLLiV2SLLi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7680 | // __builtin_msa_nlzc_h | ||
| 7681 | .{ .tag = @enumFromInt(1270), .param_str = "V8SsV8Ss", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7682 | // __builtin_msa_nlzc_w | ||
| 7683 | .{ .tag = @enumFromInt(1271), .param_str = "V4SiV4Si", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7684 | // __builtin_msa_nor_v | ||
| 7685 | .{ .tag = @enumFromInt(1272), .param_str = "V16UcV16UcV16Uc", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7686 | // __builtin_msa_nori_b | ||
| 7687 | .{ .tag = @enumFromInt(1273), .param_str = "V16UcV16cIUi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7688 | // __builtin_msa_or_v | ||
| 7689 | .{ .tag = @enumFromInt(1274), .param_str = "V16UcV16UcV16Uc", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7690 | // __builtin_msa_ori_b | ||
| 7691 | .{ .tag = @enumFromInt(1275), .param_str = "V16UcV16UcIUi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7692 | // __builtin_msa_pckev_b | ||
| 7693 | .{ .tag = @enumFromInt(1276), .param_str = "V16cV16cV16c", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7694 | // __builtin_msa_pckev_d | ||
| 7695 | .{ .tag = @enumFromInt(1277), .param_str = "V2LLiV2LLiV2LLi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7696 | // __builtin_msa_pckev_h | ||
| 7697 | .{ .tag = @enumFromInt(1278), .param_str = "V8sV8sV8s", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7698 | // __builtin_msa_pckev_w | ||
| 7699 | .{ .tag = @enumFromInt(1279), .param_str = "V4iV4iV4i", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7700 | // __builtin_msa_pckod_b | ||
| 7701 | .{ .tag = @enumFromInt(1280), .param_str = "V16cV16cV16c", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7702 | // __builtin_msa_pckod_d | ||
| 7703 | .{ .tag = @enumFromInt(1281), .param_str = "V2LLiV2LLiV2LLi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7704 | // __builtin_msa_pckod_h | ||
| 7705 | .{ .tag = @enumFromInt(1282), .param_str = "V8sV8sV8s", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7706 | // __builtin_msa_pckod_w | ||
| 7707 | .{ .tag = @enumFromInt(1283), .param_str = "V4iV4iV4i", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7708 | // __builtin_msa_pcnt_b | ||
| 7709 | .{ .tag = @enumFromInt(1284), .param_str = "V16ScV16Sc", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7710 | // __builtin_msa_pcnt_d | ||
| 7711 | .{ .tag = @enumFromInt(1285), .param_str = "V2SLLiV2SLLi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7712 | // __builtin_msa_pcnt_h | ||
| 7713 | .{ .tag = @enumFromInt(1286), .param_str = "V8SsV8Ss", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7714 | // __builtin_msa_pcnt_w | ||
| 7715 | .{ .tag = @enumFromInt(1287), .param_str = "V4SiV4Si", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7716 | // __builtin_msa_sat_s_b | ||
| 7717 | .{ .tag = @enumFromInt(1288), .param_str = "V16ScV16ScIUi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7718 | // __builtin_msa_sat_s_d | ||
| 7719 | .{ .tag = @enumFromInt(1289), .param_str = "V2SLLiV2SLLiIUi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7720 | // __builtin_msa_sat_s_h | ||
| 7721 | .{ .tag = @enumFromInt(1290), .param_str = "V8SsV8SsIUi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7722 | // __builtin_msa_sat_s_w | ||
| 7723 | .{ .tag = @enumFromInt(1291), .param_str = "V4SiV4SiIUi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7724 | // __builtin_msa_sat_u_b | ||
| 7725 | .{ .tag = @enumFromInt(1292), .param_str = "V16UcV16UcIUi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7726 | // __builtin_msa_sat_u_d | ||
| 7727 | .{ .tag = @enumFromInt(1293), .param_str = "V2ULLiV2ULLiIUi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7728 | // __builtin_msa_sat_u_h | ||
| 7729 | .{ .tag = @enumFromInt(1294), .param_str = "V8UsV8UsIUi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7730 | // __builtin_msa_sat_u_w | ||
| 7731 | .{ .tag = @enumFromInt(1295), .param_str = "V4UiV4UiIUi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7732 | // __builtin_msa_shf_b | ||
| 7733 | .{ .tag = @enumFromInt(1296), .param_str = "V16cV16cIUi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7734 | // __builtin_msa_shf_h | ||
| 7735 | .{ .tag = @enumFromInt(1297), .param_str = "V8sV8sIUi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7736 | // __builtin_msa_shf_w | ||
| 7737 | .{ .tag = @enumFromInt(1298), .param_str = "V4iV4iIUi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7738 | // __builtin_msa_sld_b | ||
| 7739 | .{ .tag = @enumFromInt(1299), .param_str = "V16cV16cV16cUi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7740 | // __builtin_msa_sld_d | ||
| 7741 | .{ .tag = @enumFromInt(1300), .param_str = "V2LLiV2LLiV2LLiUi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7742 | // __builtin_msa_sld_h | ||
| 7743 | .{ .tag = @enumFromInt(1301), .param_str = "V8sV8sV8sUi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7744 | // __builtin_msa_sld_w | ||
| 7745 | .{ .tag = @enumFromInt(1302), .param_str = "V4iV4iV4iUi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7746 | // __builtin_msa_sldi_b | ||
| 7747 | .{ .tag = @enumFromInt(1303), .param_str = "V16cV16cV16cIUi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7748 | // __builtin_msa_sldi_d | ||
| 7749 | .{ .tag = @enumFromInt(1304), .param_str = "V2LLiV2LLiV2LLiIUi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7750 | // __builtin_msa_sldi_h | ||
| 7751 | .{ .tag = @enumFromInt(1305), .param_str = "V8sV8sV8sIUi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7752 | // __builtin_msa_sldi_w | ||
| 7753 | .{ .tag = @enumFromInt(1306), .param_str = "V4iV4iV4iIUi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7754 | // __builtin_msa_sll_b | ||
| 7755 | .{ .tag = @enumFromInt(1307), .param_str = "V16cV16cV16c", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7756 | // __builtin_msa_sll_d | ||
| 7757 | .{ .tag = @enumFromInt(1308), .param_str = "V2LLiV2LLiV2LLi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7758 | // __builtin_msa_sll_h | ||
| 7759 | .{ .tag = @enumFromInt(1309), .param_str = "V8sV8sV8s", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7760 | // __builtin_msa_sll_w | ||
| 7761 | .{ .tag = @enumFromInt(1310), .param_str = "V4iV4iV4i", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7762 | // __builtin_msa_slli_b | ||
| 7763 | .{ .tag = @enumFromInt(1311), .param_str = "V16cV16cIUi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7764 | // __builtin_msa_slli_d | ||
| 7765 | .{ .tag = @enumFromInt(1312), .param_str = "V2LLiV2LLiIUi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7766 | // __builtin_msa_slli_h | ||
| 7767 | .{ .tag = @enumFromInt(1313), .param_str = "V8sV8sIUi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7768 | // __builtin_msa_slli_w | ||
| 7769 | .{ .tag = @enumFromInt(1314), .param_str = "V4iV4iIUi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7770 | // __builtin_msa_splat_b | ||
| 7771 | .{ .tag = @enumFromInt(1315), .param_str = "V16cV16cUi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7772 | // __builtin_msa_splat_d | ||
| 7773 | .{ .tag = @enumFromInt(1316), .param_str = "V2LLiV2LLiUi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7774 | // __builtin_msa_splat_h | ||
| 7775 | .{ .tag = @enumFromInt(1317), .param_str = "V8sV8sUi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7776 | // __builtin_msa_splat_w | ||
| 7777 | .{ .tag = @enumFromInt(1318), .param_str = "V4iV4iUi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7778 | // __builtin_msa_splati_b | ||
| 7779 | .{ .tag = @enumFromInt(1319), .param_str = "V16cV16cIUi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7780 | // __builtin_msa_splati_d | ||
| 7781 | .{ .tag = @enumFromInt(1320), .param_str = "V2LLiV2LLiIUi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7782 | // __builtin_msa_splati_h | ||
| 7783 | .{ .tag = @enumFromInt(1321), .param_str = "V8sV8sIUi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7784 | // __builtin_msa_splati_w | ||
| 7785 | .{ .tag = @enumFromInt(1322), .param_str = "V4iV4iIUi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7786 | // __builtin_msa_sra_b | ||
| 7787 | .{ .tag = @enumFromInt(1323), .param_str = "V16cV16cV16c", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7788 | // __builtin_msa_sra_d | ||
| 7789 | .{ .tag = @enumFromInt(1324), .param_str = "V2LLiV2LLiV2LLi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7790 | // __builtin_msa_sra_h | ||
| 7791 | .{ .tag = @enumFromInt(1325), .param_str = "V8sV8sV8s", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7792 | // __builtin_msa_sra_w | ||
| 7793 | .{ .tag = @enumFromInt(1326), .param_str = "V4iV4iV4i", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7794 | // __builtin_msa_srai_b | ||
| 7795 | .{ .tag = @enumFromInt(1327), .param_str = "V16cV16cIUi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7796 | // __builtin_msa_srai_d | ||
| 7797 | .{ .tag = @enumFromInt(1328), .param_str = "V2LLiV2LLiIUi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7798 | // __builtin_msa_srai_h | ||
| 7799 | .{ .tag = @enumFromInt(1329), .param_str = "V8sV8sIUi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7800 | // __builtin_msa_srai_w | ||
| 7801 | .{ .tag = @enumFromInt(1330), .param_str = "V4iV4iIUi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7802 | // __builtin_msa_srar_b | ||
| 7803 | .{ .tag = @enumFromInt(1331), .param_str = "V16cV16cV16c", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7804 | // __builtin_msa_srar_d | ||
| 7805 | .{ .tag = @enumFromInt(1332), .param_str = "V2LLiV2LLiV2LLi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7806 | // __builtin_msa_srar_h | ||
| 7807 | .{ .tag = @enumFromInt(1333), .param_str = "V8sV8sV8s", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7808 | // __builtin_msa_srar_w | ||
| 7809 | .{ .tag = @enumFromInt(1334), .param_str = "V4iV4iV4i", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7810 | // __builtin_msa_srari_b | ||
| 7811 | .{ .tag = @enumFromInt(1335), .param_str = "V16cV16cIUi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7812 | // __builtin_msa_srari_d | ||
| 7813 | .{ .tag = @enumFromInt(1336), .param_str = "V2LLiV2LLiIUi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7814 | // __builtin_msa_srari_h | ||
| 7815 | .{ .tag = @enumFromInt(1337), .param_str = "V8sV8sIUi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7816 | // __builtin_msa_srari_w | ||
| 7817 | .{ .tag = @enumFromInt(1338), .param_str = "V4iV4iIUi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7818 | // __builtin_msa_srl_b | ||
| 7819 | .{ .tag = @enumFromInt(1339), .param_str = "V16cV16cV16c", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7820 | // __builtin_msa_srl_d | ||
| 7821 | .{ .tag = @enumFromInt(1340), .param_str = "V2LLiV2LLiV2LLi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7822 | // __builtin_msa_srl_h | ||
| 7823 | .{ .tag = @enumFromInt(1341), .param_str = "V8sV8sV8s", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7824 | // __builtin_msa_srl_w | ||
| 7825 | .{ .tag = @enumFromInt(1342), .param_str = "V4iV4iV4i", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7826 | // __builtin_msa_srli_b | ||
| 7827 | .{ .tag = @enumFromInt(1343), .param_str = "V16cV16cIUi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7828 | // __builtin_msa_srli_d | ||
| 7829 | .{ .tag = @enumFromInt(1344), .param_str = "V2LLiV2LLiIUi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7830 | // __builtin_msa_srli_h | ||
| 7831 | .{ .tag = @enumFromInt(1345), .param_str = "V8sV8sIUi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7832 | // __builtin_msa_srli_w | ||
| 7833 | .{ .tag = @enumFromInt(1346), .param_str = "V4iV4iIUi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7834 | // __builtin_msa_srlr_b | ||
| 7835 | .{ .tag = @enumFromInt(1347), .param_str = "V16cV16cV16c", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7836 | // __builtin_msa_srlr_d | ||
| 7837 | .{ .tag = @enumFromInt(1348), .param_str = "V2LLiV2LLiV2LLi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7838 | // __builtin_msa_srlr_h | ||
| 7839 | .{ .tag = @enumFromInt(1349), .param_str = "V8sV8sV8s", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7840 | // __builtin_msa_srlr_w | ||
| 7841 | .{ .tag = @enumFromInt(1350), .param_str = "V4iV4iV4i", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7842 | // __builtin_msa_srlri_b | ||
| 7843 | .{ .tag = @enumFromInt(1351), .param_str = "V16cV16cIUi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7844 | // __builtin_msa_srlri_d | ||
| 7845 | .{ .tag = @enumFromInt(1352), .param_str = "V2LLiV2LLiIUi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7846 | // __builtin_msa_srlri_h | ||
| 7847 | .{ .tag = @enumFromInt(1353), .param_str = "V8sV8sIUi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7848 | // __builtin_msa_srlri_w | ||
| 7849 | .{ .tag = @enumFromInt(1354), .param_str = "V4iV4iIUi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7850 | // __builtin_msa_st_b | ||
| 7851 | .{ .tag = @enumFromInt(1355), .param_str = "vV16Scv*Ii", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7852 | // __builtin_msa_st_d | ||
| 7853 | .{ .tag = @enumFromInt(1356), .param_str = "vV2SLLiv*Ii", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7854 | // __builtin_msa_st_h | ||
| 7855 | .{ .tag = @enumFromInt(1357), .param_str = "vV8Ssv*Ii", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7856 | // __builtin_msa_st_w | ||
| 7857 | .{ .tag = @enumFromInt(1358), .param_str = "vV4Siv*Ii", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7858 | // __builtin_msa_str_d | ||
| 7859 | .{ .tag = @enumFromInt(1359), .param_str = "vV2SLLiv*Ii", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7860 | // __builtin_msa_str_w | ||
| 7861 | .{ .tag = @enumFromInt(1360), .param_str = "vV4Siv*Ii", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7862 | // __builtin_msa_subs_s_b | ||
| 7863 | .{ .tag = @enumFromInt(1361), .param_str = "V16ScV16ScV16Sc", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7864 | // __builtin_msa_subs_s_d | ||
| 7865 | .{ .tag = @enumFromInt(1362), .param_str = "V2SLLiV2SLLiV2SLLi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7866 | // __builtin_msa_subs_s_h | ||
| 7867 | .{ .tag = @enumFromInt(1363), .param_str = "V8SsV8SsV8Ss", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7868 | // __builtin_msa_subs_s_w | ||
| 7869 | .{ .tag = @enumFromInt(1364), .param_str = "V4SiV4SiV4Si", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7870 | // __builtin_msa_subs_u_b | ||
| 7871 | .{ .tag = @enumFromInt(1365), .param_str = "V16UcV16UcV16Uc", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7872 | // __builtin_msa_subs_u_d | ||
| 7873 | .{ .tag = @enumFromInt(1366), .param_str = "V2ULLiV2ULLiV2ULLi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7874 | // __builtin_msa_subs_u_h | ||
| 7875 | .{ .tag = @enumFromInt(1367), .param_str = "V8UsV8UsV8Us", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7876 | // __builtin_msa_subs_u_w | ||
| 7877 | .{ .tag = @enumFromInt(1368), .param_str = "V4UiV4UiV4Ui", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7878 | // __builtin_msa_subsus_u_b | ||
| 7879 | .{ .tag = @enumFromInt(1369), .param_str = "V16UcV16UcV16Sc", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7880 | // __builtin_msa_subsus_u_d | ||
| 7881 | .{ .tag = @enumFromInt(1370), .param_str = "V2ULLiV2ULLiV2SLLi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7882 | // __builtin_msa_subsus_u_h | ||
| 7883 | .{ .tag = @enumFromInt(1371), .param_str = "V8UsV8UsV8Ss", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7884 | // __builtin_msa_subsus_u_w | ||
| 7885 | .{ .tag = @enumFromInt(1372), .param_str = "V4UiV4UiV4Si", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7886 | // __builtin_msa_subsuu_s_b | ||
| 7887 | .{ .tag = @enumFromInt(1373), .param_str = "V16ScV16UcV16Uc", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7888 | // __builtin_msa_subsuu_s_d | ||
| 7889 | .{ .tag = @enumFromInt(1374), .param_str = "V2SLLiV2ULLiV2ULLi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7890 | // __builtin_msa_subsuu_s_h | ||
| 7891 | .{ .tag = @enumFromInt(1375), .param_str = "V8SsV8UsV8Us", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7892 | // __builtin_msa_subsuu_s_w | ||
| 7893 | .{ .tag = @enumFromInt(1376), .param_str = "V4SiV4UiV4Ui", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7894 | // __builtin_msa_subv_b | ||
| 7895 | .{ .tag = @enumFromInt(1377), .param_str = "V16cV16cV16c", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7896 | // __builtin_msa_subv_d | ||
| 7897 | .{ .tag = @enumFromInt(1378), .param_str = "V2LLiV2LLiV2LLi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7898 | // __builtin_msa_subv_h | ||
| 7899 | .{ .tag = @enumFromInt(1379), .param_str = "V8sV8sV8s", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7900 | // __builtin_msa_subv_w | ||
| 7901 | .{ .tag = @enumFromInt(1380), .param_str = "V4iV4iV4i", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7902 | // __builtin_msa_subvi_b | ||
| 7903 | .{ .tag = @enumFromInt(1381), .param_str = "V16cV16cIUi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7904 | // __builtin_msa_subvi_d | ||
| 7905 | .{ .tag = @enumFromInt(1382), .param_str = "V2LLiV2LLiIUi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7906 | // __builtin_msa_subvi_h | ||
| 7907 | .{ .tag = @enumFromInt(1383), .param_str = "V8sV8sIUi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7908 | // __builtin_msa_subvi_w | ||
| 7909 | .{ .tag = @enumFromInt(1384), .param_str = "V4iV4iIUi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7910 | // __builtin_msa_vshf_b | ||
| 7911 | .{ .tag = @enumFromInt(1385), .param_str = "V16cV16cV16cV16c", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7912 | // __builtin_msa_vshf_d | ||
| 7913 | .{ .tag = @enumFromInt(1386), .param_str = "V2LLiV2LLiV2LLiV2LLi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7914 | // __builtin_msa_vshf_h | ||
| 7915 | .{ .tag = @enumFromInt(1387), .param_str = "V8sV8sV8sV8s", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7916 | // __builtin_msa_vshf_w | ||
| 7917 | .{ .tag = @enumFromInt(1388), .param_str = "V4iV4iV4iV4i", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7918 | // __builtin_msa_xor_v | ||
| 7919 | .{ .tag = @enumFromInt(1389), .param_str = "V16cV16cV16c", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7920 | // __builtin_msa_xori_b | ||
| 7921 | .{ .tag = @enumFromInt(1390), .param_str = "V16cV16cIUi", .properties = .{ .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } }, | ||
| 7922 | // __builtin_mul_overflow | ||
| 7923 | .{ .tag = @enumFromInt(1391), .param_str = "b.", .properties = .{ .attributes = .{ .custom_typecheck = true, .const_evaluable = true } } }, | ||
| 7924 | // __builtin_nan | ||
| 7925 | .{ .tag = @enumFromInt(1392), .param_str = "dcC*", .properties = .{ .attributes = .{ .pure = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } } }, | ||
| 7926 | // __builtin_nanf | ||
| 7927 | .{ .tag = @enumFromInt(1393), .param_str = "fcC*", .properties = .{ .attributes = .{ .pure = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } } }, | ||
| 7928 | // __builtin_nanf128 | ||
| 7929 | .{ .tag = @enumFromInt(1394), .param_str = "LLdcC*", .properties = .{ .attributes = .{ .pure = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } } }, | ||
| 7930 | // __builtin_nanf16 | ||
| 7931 | .{ .tag = @enumFromInt(1395), .param_str = "xcC*", .properties = .{ .attributes = .{ .pure = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } } }, | ||
| 7932 | // __builtin_nanl | ||
| 7933 | .{ .tag = @enumFromInt(1396), .param_str = "LdcC*", .properties = .{ .attributes = .{ .pure = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } } }, | ||
| 7934 | // __builtin_nans | ||
| 7935 | .{ .tag = @enumFromInt(1397), .param_str = "dcC*", .properties = .{ .attributes = .{ .pure = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } } }, | ||
| 7936 | // __builtin_nansf | ||
| 7937 | .{ .tag = @enumFromInt(1398), .param_str = "fcC*", .properties = .{ .attributes = .{ .pure = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } } }, | ||
| 7938 | // __builtin_nansf128 | ||
| 7939 | .{ .tag = @enumFromInt(1399), .param_str = "LLdcC*", .properties = .{ .attributes = .{ .pure = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } } }, | ||
| 7940 | // __builtin_nansf16 | ||
| 7941 | .{ .tag = @enumFromInt(1400), .param_str = "xcC*", .properties = .{ .attributes = .{ .pure = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } } }, | ||
| 7942 | // __builtin_nansl | ||
| 7943 | .{ .tag = @enumFromInt(1401), .param_str = "LdcC*", .properties = .{ .attributes = .{ .pure = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } } }, | ||
| 7944 | // __builtin_nearbyint | ||
| 7945 | .{ .tag = @enumFromInt(1402), .param_str = "dd", .properties = .{ .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } }, | ||
| 7946 | // __builtin_nearbyintf | ||
| 7947 | .{ .tag = @enumFromInt(1403), .param_str = "ff", .properties = .{ .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } }, | ||
| 7948 | // __builtin_nearbyintf128 | ||
| 7949 | .{ .tag = @enumFromInt(1404), .param_str = "LLdLLd", .properties = .{ .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } }, | ||
| 7950 | // __builtin_nearbyintl | ||
| 7951 | .{ .tag = @enumFromInt(1405), .param_str = "LdLd", .properties = .{ .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } }, | ||
| 7952 | // __builtin_nextafter | ||
| 7953 | .{ .tag = @enumFromInt(1406), .param_str = "ddd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 7954 | // __builtin_nextafterf | ||
| 7955 | .{ .tag = @enumFromInt(1407), .param_str = "fff", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 7956 | // __builtin_nextafterf128 | ||
| 7957 | .{ .tag = @enumFromInt(1408), .param_str = "LLdLLdLLd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 7958 | // __builtin_nextafterl | ||
| 7959 | .{ .tag = @enumFromInt(1409), .param_str = "LdLdLd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 7960 | // __builtin_nexttoward | ||
| 7961 | .{ .tag = @enumFromInt(1410), .param_str = "ddLd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 7962 | // __builtin_nexttowardf | ||
| 7963 | .{ .tag = @enumFromInt(1411), .param_str = "ffLd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 7964 | // __builtin_nexttowardf128 | ||
| 7965 | .{ .tag = @enumFromInt(1412), .param_str = "LLdLLdLLd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 7966 | // __builtin_nexttowardl | ||
| 7967 | .{ .tag = @enumFromInt(1413), .param_str = "LdLdLd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 7968 | // __builtin_nondeterministic_value | ||
| 7969 | .{ .tag = @enumFromInt(1414), .param_str = "v.", .properties = .{ .attributes = .{ .custom_typecheck = true } } }, | ||
| 7970 | // __builtin_nontemporal_load | ||
| 7971 | .{ .tag = @enumFromInt(1415), .param_str = "v.", .properties = .{ .attributes = .{ .custom_typecheck = true } } }, | ||
| 7972 | // __builtin_nontemporal_store | ||
| 7973 | .{ .tag = @enumFromInt(1416), .param_str = "v.", .properties = .{ .attributes = .{ .custom_typecheck = true } } }, | ||
| 7974 | // __builtin_objc_memmove_collectable | ||
| 7975 | .{ .tag = @enumFromInt(1417), .param_str = "v*v*vC*z", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true } } }, | ||
| 7976 | // __builtin_object_size | ||
| 7977 | .{ .tag = @enumFromInt(1418), .param_str = "zvC*i", .properties = .{ .attributes = .{ .eval_args = false, .const_evaluable = true } } }, | ||
| 7978 | // __builtin_operator_delete | ||
| 7979 | .{ .tag = @enumFromInt(1419), .param_str = "vv*", .properties = .{ .attributes = .{ .custom_typecheck = true, .const_evaluable = true } } }, | ||
| 7980 | // __builtin_operator_new | ||
| 7981 | .{ .tag = @enumFromInt(1420), .param_str = "v*z", .properties = .{ .attributes = .{ .@"const" = true, .custom_typecheck = true, .const_evaluable = true } } }, | ||
| 7982 | // __builtin_os_log_format | ||
| 7983 | .{ .tag = @enumFromInt(1421), .param_str = "v*v*cC*.", .properties = .{ .attributes = .{ .custom_typecheck = true, .format_kind = .printf } } }, | ||
| 7984 | // __builtin_os_log_format_buffer_size | ||
| 7985 | .{ .tag = @enumFromInt(1422), .param_str = "zcC*.", .properties = .{ .attributes = .{ .custom_typecheck = true, .format_kind = .printf, .eval_args = false, .const_evaluable = true } } }, | ||
| 7986 | // __builtin_pack_longdouble | ||
| 7987 | .{ .tag = @enumFromInt(1423), .param_str = "Lddd", .properties = .{ .target_set = TargetSet.initOne(.ppc) } }, | ||
| 7988 | // __builtin_parity | ||
| 7989 | .{ .tag = @enumFromInt(1424), .param_str = "iUi", .properties = .{ .attributes = .{ .@"const" = true, .const_evaluable = true } } }, | ||
| 7990 | // __builtin_parityl | ||
| 7991 | .{ .tag = @enumFromInt(1425), .param_str = "iULi", .properties = .{ .attributes = .{ .@"const" = true, .const_evaluable = true } } }, | ||
| 7992 | // __builtin_parityll | ||
| 7993 | .{ .tag = @enumFromInt(1426), .param_str = "iULLi", .properties = .{ .attributes = .{ .@"const" = true, .const_evaluable = true } } }, | ||
| 7994 | // __builtin_popcount | ||
| 7995 | .{ .tag = @enumFromInt(1427), .param_str = "iUi", .properties = .{ .attributes = .{ .@"const" = true, .const_evaluable = true } } }, | ||
| 7996 | // __builtin_popcountl | ||
| 7997 | .{ .tag = @enumFromInt(1428), .param_str = "iULi", .properties = .{ .attributes = .{ .@"const" = true, .const_evaluable = true } } }, | ||
| 7998 | // __builtin_popcountll | ||
| 7999 | .{ .tag = @enumFromInt(1429), .param_str = "iULLi", .properties = .{ .attributes = .{ .@"const" = true, .const_evaluable = true } } }, | ||
| 8000 | // __builtin_pow | ||
| 8001 | .{ .tag = @enumFromInt(1430), .param_str = "ddd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 8002 | // __builtin_powf | ||
| 8003 | .{ .tag = @enumFromInt(1431), .param_str = "fff", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 8004 | // __builtin_powf128 | ||
| 8005 | .{ .tag = @enumFromInt(1432), .param_str = "LLdLLdLLd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 8006 | // __builtin_powf16 | ||
| 8007 | .{ .tag = @enumFromInt(1433), .param_str = "hhh", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 8008 | // __builtin_powi | ||
| 8009 | .{ .tag = @enumFromInt(1434), .param_str = "ddi", .properties = .{ .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } }, | ||
| 8010 | // __builtin_powif | ||
| 8011 | .{ .tag = @enumFromInt(1435), .param_str = "ffi", .properties = .{ .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } }, | ||
| 8012 | // __builtin_powil | ||
| 8013 | .{ .tag = @enumFromInt(1436), .param_str = "LdLdi", .properties = .{ .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } }, | ||
| 8014 | // __builtin_powl | ||
| 8015 | .{ .tag = @enumFromInt(1437), .param_str = "LdLdLd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 8016 | // __builtin_ppc_alignx | ||
| 8017 | .{ .tag = @enumFromInt(1438), .param_str = "vIivC*", .properties = .{ .target_set = TargetSet.initOne(.ppc), .attributes = .{ .@"const" = true } } }, | ||
| 8018 | // __builtin_ppc_cmpb | ||
| 8019 | .{ .tag = @enumFromInt(1439), .param_str = "LLiLLiLLi", .properties = .{ .target_set = TargetSet.initOne(.ppc) } }, | ||
| 8020 | // __builtin_ppc_compare_and_swap | ||
| 8021 | .{ .tag = @enumFromInt(1440), .param_str = "iiD*i*i", .properties = .{ .target_set = TargetSet.initOne(.ppc) } }, | ||
| 8022 | // __builtin_ppc_compare_and_swaplp | ||
| 8023 | .{ .tag = @enumFromInt(1441), .param_str = "iLiD*Li*Li", .properties = .{ .target_set = TargetSet.initOne(.ppc) } }, | ||
| 8024 | // __builtin_ppc_dcbfl | ||
| 8025 | .{ .tag = @enumFromInt(1442), .param_str = "vvC*", .properties = .{ .target_set = TargetSet.initOne(.ppc) } }, | ||
| 8026 | // __builtin_ppc_dcbflp | ||
| 8027 | .{ .tag = @enumFromInt(1443), .param_str = "vvC*", .properties = .{ .target_set = TargetSet.initOne(.ppc) } }, | ||
| 8028 | // __builtin_ppc_dcbst | ||
| 8029 | .{ .tag = @enumFromInt(1444), .param_str = "vvC*", .properties = .{ .target_set = TargetSet.initOne(.ppc) } }, | ||
| 8030 | // __builtin_ppc_dcbt | ||
| 8031 | .{ .tag = @enumFromInt(1445), .param_str = "vv*", .properties = .{ .target_set = TargetSet.initOne(.ppc) } }, | ||
| 8032 | // __builtin_ppc_dcbtst | ||
| 8033 | .{ .tag = @enumFromInt(1446), .param_str = "vv*", .properties = .{ .target_set = TargetSet.initOne(.ppc) } }, | ||
| 8034 | // __builtin_ppc_dcbtstt | ||
| 8035 | .{ .tag = @enumFromInt(1447), .param_str = "vv*", .properties = .{ .target_set = TargetSet.initOne(.ppc) } }, | ||
| 8036 | // __builtin_ppc_dcbtt | ||
| 8037 | .{ .tag = @enumFromInt(1448), .param_str = "vv*", .properties = .{ .target_set = TargetSet.initOne(.ppc) } }, | ||
| 8038 | // __builtin_ppc_dcbz | ||
| 8039 | .{ .tag = @enumFromInt(1449), .param_str = "vv*", .properties = .{ .target_set = TargetSet.initOne(.ppc) } }, | ||
| 8040 | // __builtin_ppc_eieio | ||
| 8041 | .{ .tag = @enumFromInt(1450), .param_str = "v", .properties = .{ .target_set = TargetSet.initOne(.ppc) } }, | ||
| 8042 | // __builtin_ppc_fcfid | ||
| 8043 | .{ .tag = @enumFromInt(1451), .param_str = "dd", .properties = .{ .target_set = TargetSet.initOne(.ppc) } }, | ||
| 8044 | // __builtin_ppc_fcfud | ||
| 8045 | .{ .tag = @enumFromInt(1452), .param_str = "dd", .properties = .{ .target_set = TargetSet.initOne(.ppc) } }, | ||
| 8046 | // __builtin_ppc_fctid | ||
| 8047 | .{ .tag = @enumFromInt(1453), .param_str = "dd", .properties = .{ .target_set = TargetSet.initOne(.ppc) } }, | ||
| 8048 | // __builtin_ppc_fctidz | ||
| 8049 | .{ .tag = @enumFromInt(1454), .param_str = "dd", .properties = .{ .target_set = TargetSet.initOne(.ppc) } }, | ||
| 8050 | // __builtin_ppc_fctiw | ||
| 8051 | .{ .tag = @enumFromInt(1455), .param_str = "dd", .properties = .{ .target_set = TargetSet.initOne(.ppc) } }, | ||
| 8052 | // __builtin_ppc_fctiwz | ||
| 8053 | .{ .tag = @enumFromInt(1456), .param_str = "dd", .properties = .{ .target_set = TargetSet.initOne(.ppc) } }, | ||
| 8054 | // __builtin_ppc_fctudz | ||
| 8055 | .{ .tag = @enumFromInt(1457), .param_str = "dd", .properties = .{ .target_set = TargetSet.initOne(.ppc) } }, | ||
| 8056 | // __builtin_ppc_fctuwz | ||
| 8057 | .{ .tag = @enumFromInt(1458), .param_str = "dd", .properties = .{ .target_set = TargetSet.initOne(.ppc) } }, | ||
| 8058 | // __builtin_ppc_fetch_and_add | ||
| 8059 | .{ .tag = @enumFromInt(1459), .param_str = "iiD*i", .properties = .{ .target_set = TargetSet.initOne(.ppc) } }, | ||
| 8060 | // __builtin_ppc_fetch_and_addlp | ||
| 8061 | .{ .tag = @enumFromInt(1460), .param_str = "LiLiD*Li", .properties = .{ .target_set = TargetSet.initOne(.ppc) } }, | ||
| 8062 | // __builtin_ppc_fetch_and_and | ||
| 8063 | .{ .tag = @enumFromInt(1461), .param_str = "UiUiD*Ui", .properties = .{ .target_set = TargetSet.initOne(.ppc) } }, | ||
| 8064 | // __builtin_ppc_fetch_and_andlp | ||
| 8065 | .{ .tag = @enumFromInt(1462), .param_str = "ULiULiD*ULi", .properties = .{ .target_set = TargetSet.initOne(.ppc) } }, | ||
| 8066 | // __builtin_ppc_fetch_and_or | ||
| 8067 | .{ .tag = @enumFromInt(1463), .param_str = "UiUiD*Ui", .properties = .{ .target_set = TargetSet.initOne(.ppc) } }, | ||
| 8068 | // __builtin_ppc_fetch_and_orlp | ||
| 8069 | .{ .tag = @enumFromInt(1464), .param_str = "ULiULiD*ULi", .properties = .{ .target_set = TargetSet.initOne(.ppc) } }, | ||
| 8070 | // __builtin_ppc_fetch_and_swap | ||
| 8071 | .{ .tag = @enumFromInt(1465), .param_str = "UiUiD*Ui", .properties = .{ .target_set = TargetSet.initOne(.ppc) } }, | ||
| 8072 | // __builtin_ppc_fetch_and_swaplp | ||
| 8073 | .{ .tag = @enumFromInt(1466), .param_str = "ULiULiD*ULi", .properties = .{ .target_set = TargetSet.initOne(.ppc) } }, | ||
| 8074 | // __builtin_ppc_fmsub | ||
| 8075 | .{ .tag = @enumFromInt(1467), .param_str = "dddd", .properties = .{ .target_set = TargetSet.initOne(.ppc) } }, | ||
| 8076 | // __builtin_ppc_fmsubs | ||
| 8077 | .{ .tag = @enumFromInt(1468), .param_str = "ffff", .properties = .{ .target_set = TargetSet.initOne(.ppc) } }, | ||
| 8078 | // __builtin_ppc_fnabs | ||
| 8079 | .{ .tag = @enumFromInt(1469), .param_str = "dd", .properties = .{ .target_set = TargetSet.initOne(.ppc) } }, | ||
| 8080 | // __builtin_ppc_fnabss | ||
| 8081 | .{ .tag = @enumFromInt(1470), .param_str = "ff", .properties = .{ .target_set = TargetSet.initOne(.ppc) } }, | ||
| 8082 | // __builtin_ppc_fnmadd | ||
| 8083 | .{ .tag = @enumFromInt(1471), .param_str = "dddd", .properties = .{ .target_set = TargetSet.initOne(.ppc) } }, | ||
| 8084 | // __builtin_ppc_fnmadds | ||
| 8085 | .{ .tag = @enumFromInt(1472), .param_str = "ffff", .properties = .{ .target_set = TargetSet.initOne(.ppc) } }, | ||
| 8086 | // __builtin_ppc_fnmsub | ||
| 8087 | .{ .tag = @enumFromInt(1473), .param_str = "dddd", .properties = .{ .target_set = TargetSet.initOne(.ppc) } }, | ||
| 8088 | // __builtin_ppc_fnmsubs | ||
| 8089 | .{ .tag = @enumFromInt(1474), .param_str = "ffff", .properties = .{ .target_set = TargetSet.initOne(.ppc) } }, | ||
| 8090 | // __builtin_ppc_fre | ||
| 8091 | .{ .tag = @enumFromInt(1475), .param_str = "dd", .properties = .{ .target_set = TargetSet.initOne(.ppc) } }, | ||
| 8092 | // __builtin_ppc_fres | ||
| 8093 | .{ .tag = @enumFromInt(1476), .param_str = "ff", .properties = .{ .target_set = TargetSet.initOne(.ppc) } }, | ||
| 8094 | // __builtin_ppc_fric | ||
| 8095 | .{ .tag = @enumFromInt(1477), .param_str = "dd", .properties = .{ .target_set = TargetSet.initOne(.ppc) } }, | ||
| 8096 | // __builtin_ppc_frim | ||
| 8097 | .{ .tag = @enumFromInt(1478), .param_str = "dd", .properties = .{ .target_set = TargetSet.initOne(.ppc) } }, | ||
| 8098 | // __builtin_ppc_frims | ||
| 8099 | .{ .tag = @enumFromInt(1479), .param_str = "ff", .properties = .{ .target_set = TargetSet.initOne(.ppc) } }, | ||
| 8100 | // __builtin_ppc_frin | ||
| 8101 | .{ .tag = @enumFromInt(1480), .param_str = "dd", .properties = .{ .target_set = TargetSet.initOne(.ppc) } }, | ||
| 8102 | // __builtin_ppc_frins | ||
| 8103 | .{ .tag = @enumFromInt(1481), .param_str = "ff", .properties = .{ .target_set = TargetSet.initOne(.ppc) } }, | ||
| 8104 | // __builtin_ppc_frip | ||
| 8105 | .{ .tag = @enumFromInt(1482), .param_str = "dd", .properties = .{ .target_set = TargetSet.initOne(.ppc) } }, | ||
| 8106 | // __builtin_ppc_frips | ||
| 8107 | .{ .tag = @enumFromInt(1483), .param_str = "ff", .properties = .{ .target_set = TargetSet.initOne(.ppc) } }, | ||
| 8108 | // __builtin_ppc_friz | ||
| 8109 | .{ .tag = @enumFromInt(1484), .param_str = "dd", .properties = .{ .target_set = TargetSet.initOne(.ppc) } }, | ||
| 8110 | // __builtin_ppc_frizs | ||
| 8111 | .{ .tag = @enumFromInt(1485), .param_str = "ff", .properties = .{ .target_set = TargetSet.initOne(.ppc) } }, | ||
| 8112 | // __builtin_ppc_frsqrte | ||
| 8113 | .{ .tag = @enumFromInt(1486), .param_str = "dd", .properties = .{ .target_set = TargetSet.initOne(.ppc) } }, | ||
| 8114 | // __builtin_ppc_frsqrtes | ||
| 8115 | .{ .tag = @enumFromInt(1487), .param_str = "ff", .properties = .{ .target_set = TargetSet.initOne(.ppc) } }, | ||
| 8116 | // __builtin_ppc_fsel | ||
| 8117 | .{ .tag = @enumFromInt(1488), .param_str = "dddd", .properties = .{ .target_set = TargetSet.initOne(.ppc) } }, | ||
| 8118 | // __builtin_ppc_fsels | ||
| 8119 | .{ .tag = @enumFromInt(1489), .param_str = "ffff", .properties = .{ .target_set = TargetSet.initOne(.ppc) } }, | ||
| 8120 | // __builtin_ppc_fsqrt | ||
| 8121 | .{ .tag = @enumFromInt(1490), .param_str = "dd", .properties = .{ .target_set = TargetSet.initOne(.ppc) } }, | ||
| 8122 | // __builtin_ppc_fsqrts | ||
| 8123 | .{ .tag = @enumFromInt(1491), .param_str = "ff", .properties = .{ .target_set = TargetSet.initOne(.ppc) } }, | ||
| 8124 | // __builtin_ppc_get_timebase | ||
| 8125 | .{ .tag = @enumFromInt(1492), .param_str = "ULLi", .properties = .{ .target_set = TargetSet.initOne(.ppc) } }, | ||
| 8126 | // __builtin_ppc_iospace_eieio | ||
| 8127 | .{ .tag = @enumFromInt(1493), .param_str = "v", .properties = .{ .target_set = TargetSet.initOne(.ppc) } }, | ||
| 8128 | // __builtin_ppc_iospace_lwsync | ||
| 8129 | .{ .tag = @enumFromInt(1494), .param_str = "v", .properties = .{ .target_set = TargetSet.initOne(.ppc) } }, | ||
| 8130 | // __builtin_ppc_iospace_sync | ||
| 8131 | .{ .tag = @enumFromInt(1495), .param_str = "v", .properties = .{ .target_set = TargetSet.initOne(.ppc) } }, | ||
| 8132 | // __builtin_ppc_isync | ||
| 8133 | .{ .tag = @enumFromInt(1496), .param_str = "v", .properties = .{ .target_set = TargetSet.initOne(.ppc) } }, | ||
| 8134 | // __builtin_ppc_ldarx | ||
| 8135 | .{ .tag = @enumFromInt(1497), .param_str = "LiLiD*", .properties = .{ .target_set = TargetSet.initOne(.ppc) } }, | ||
| 8136 | // __builtin_ppc_load2r | ||
| 8137 | .{ .tag = @enumFromInt(1498), .param_str = "UsUs*", .properties = .{ .target_set = TargetSet.initOne(.ppc) } }, | ||
| 8138 | // __builtin_ppc_load4r | ||
| 8139 | .{ .tag = @enumFromInt(1499), .param_str = "UiUi*", .properties = .{ .target_set = TargetSet.initOne(.ppc) } }, | ||
| 8140 | // __builtin_ppc_lwarx | ||
| 8141 | .{ .tag = @enumFromInt(1500), .param_str = "iiD*", .properties = .{ .target_set = TargetSet.initOne(.ppc) } }, | ||
| 8142 | // __builtin_ppc_lwsync | ||
| 8143 | .{ .tag = @enumFromInt(1501), .param_str = "v", .properties = .{ .target_set = TargetSet.initOne(.ppc) } }, | ||
| 8144 | // __builtin_ppc_maxfe | ||
| 8145 | .{ .tag = @enumFromInt(1502), .param_str = "LdLdLdLd.", .properties = .{ .target_set = TargetSet.initOne(.ppc), .attributes = .{ .custom_typecheck = true } } }, | ||
| 8146 | // __builtin_ppc_maxfl | ||
| 8147 | .{ .tag = @enumFromInt(1503), .param_str = "dddd.", .properties = .{ .target_set = TargetSet.initOne(.ppc), .attributes = .{ .custom_typecheck = true } } }, | ||
| 8148 | // __builtin_ppc_maxfs | ||
| 8149 | .{ .tag = @enumFromInt(1504), .param_str = "ffff.", .properties = .{ .target_set = TargetSet.initOne(.ppc), .attributes = .{ .custom_typecheck = true } } }, | ||
| 8150 | // __builtin_ppc_mfmsr | ||
| 8151 | .{ .tag = @enumFromInt(1505), .param_str = "Ui", .properties = .{ .target_set = TargetSet.initOne(.ppc) } }, | ||
| 8152 | // __builtin_ppc_mfspr | ||
| 8153 | .{ .tag = @enumFromInt(1506), .param_str = "ULiIi", .properties = .{ .target_set = TargetSet.initOne(.ppc) } }, | ||
| 8154 | // __builtin_ppc_mftbu | ||
| 8155 | .{ .tag = @enumFromInt(1507), .param_str = "Ui", .properties = .{ .target_set = TargetSet.initOne(.ppc) } }, | ||
| 8156 | // __builtin_ppc_minfe | ||
| 8157 | .{ .tag = @enumFromInt(1508), .param_str = "LdLdLdLd.", .properties = .{ .target_set = TargetSet.initOne(.ppc), .attributes = .{ .custom_typecheck = true } } }, | ||
| 8158 | // __builtin_ppc_minfl | ||
| 8159 | .{ .tag = @enumFromInt(1509), .param_str = "dddd.", .properties = .{ .target_set = TargetSet.initOne(.ppc), .attributes = .{ .custom_typecheck = true } } }, | ||
| 8160 | // __builtin_ppc_minfs | ||
| 8161 | .{ .tag = @enumFromInt(1510), .param_str = "ffff.", .properties = .{ .target_set = TargetSet.initOne(.ppc), .attributes = .{ .custom_typecheck = true } } }, | ||
| 8162 | // __builtin_ppc_mtfsb0 | ||
| 8163 | .{ .tag = @enumFromInt(1511), .param_str = "vUIi", .properties = .{ .target_set = TargetSet.initOne(.ppc) } }, | ||
| 8164 | // __builtin_ppc_mtfsb1 | ||
| 8165 | .{ .tag = @enumFromInt(1512), .param_str = "vUIi", .properties = .{ .target_set = TargetSet.initOne(.ppc) } }, | ||
| 8166 | // __builtin_ppc_mtfsf | ||
| 8167 | .{ .tag = @enumFromInt(1513), .param_str = "vUIiUi", .properties = .{ .target_set = TargetSet.initOne(.ppc) } }, | ||
| 8168 | // __builtin_ppc_mtfsfi | ||
| 8169 | .{ .tag = @enumFromInt(1514), .param_str = "vUIiUIi", .properties = .{ .target_set = TargetSet.initOne(.ppc) } }, | ||
| 8170 | // __builtin_ppc_mtmsr | ||
| 8171 | .{ .tag = @enumFromInt(1515), .param_str = "vUi", .properties = .{ .target_set = TargetSet.initOne(.ppc) } }, | ||
| 8172 | // __builtin_ppc_mtspr | ||
| 8173 | .{ .tag = @enumFromInt(1516), .param_str = "vIiULi", .properties = .{ .target_set = TargetSet.initOne(.ppc) } }, | ||
| 8174 | // __builtin_ppc_mulhd | ||
| 8175 | .{ .tag = @enumFromInt(1517), .param_str = "LLiLiLi", .properties = .{ .target_set = TargetSet.initOne(.ppc) } }, | ||
| 8176 | // __builtin_ppc_mulhdu | ||
| 8177 | .{ .tag = @enumFromInt(1518), .param_str = "ULLiULiULi", .properties = .{ .target_set = TargetSet.initOne(.ppc) } }, | ||
| 8178 | // __builtin_ppc_mulhw | ||
| 8179 | .{ .tag = @enumFromInt(1519), .param_str = "iii", .properties = .{ .target_set = TargetSet.initOne(.ppc) } }, | ||
| 8180 | // __builtin_ppc_mulhwu | ||
| 8181 | .{ .tag = @enumFromInt(1520), .param_str = "UiUiUi", .properties = .{ .target_set = TargetSet.initOne(.ppc) } }, | ||
| 8182 | // __builtin_ppc_popcntb | ||
| 8183 | .{ .tag = @enumFromInt(1521), .param_str = "ULiULi", .properties = .{ .target_set = TargetSet.initOne(.ppc) } }, | ||
| 8184 | // __builtin_ppc_poppar4 | ||
| 8185 | .{ .tag = @enumFromInt(1522), .param_str = "iUi", .properties = .{ .target_set = TargetSet.initOne(.ppc) } }, | ||
| 8186 | // __builtin_ppc_poppar8 | ||
| 8187 | .{ .tag = @enumFromInt(1523), .param_str = "iULLi", .properties = .{ .target_set = TargetSet.initOne(.ppc) } }, | ||
| 8188 | // __builtin_ppc_rdlam | ||
| 8189 | .{ .tag = @enumFromInt(1524), .param_str = "UWiUWiUWiUWIi", .properties = .{ .target_set = TargetSet.initOne(.ppc), .attributes = .{ .@"const" = true } } }, | ||
| 8190 | // __builtin_ppc_recipdivd | ||
| 8191 | .{ .tag = @enumFromInt(1525), .param_str = "V2dV2dV2d", .properties = .{ .target_set = TargetSet.initOne(.ppc) } }, | ||
| 8192 | // __builtin_ppc_recipdivf | ||
| 8193 | .{ .tag = @enumFromInt(1526), .param_str = "V4fV4fV4f", .properties = .{ .target_set = TargetSet.initOne(.ppc) } }, | ||
| 8194 | // __builtin_ppc_rldimi | ||
| 8195 | .{ .tag = @enumFromInt(1527), .param_str = "ULLiULLiULLiIUiIULLi", .properties = .{ .target_set = TargetSet.initOne(.ppc) } }, | ||
| 8196 | // __builtin_ppc_rlwimi | ||
| 8197 | .{ .tag = @enumFromInt(1528), .param_str = "UiUiUiIUiIUi", .properties = .{ .target_set = TargetSet.initOne(.ppc) } }, | ||
| 8198 | // __builtin_ppc_rlwnm | ||
| 8199 | .{ .tag = @enumFromInt(1529), .param_str = "UiUiUiIUi", .properties = .{ .target_set = TargetSet.initOne(.ppc) } }, | ||
| 8200 | // __builtin_ppc_rsqrtd | ||
| 8201 | .{ .tag = @enumFromInt(1530), .param_str = "V2dV2d", .properties = .{ .target_set = TargetSet.initOne(.ppc) } }, | ||
| 8202 | // __builtin_ppc_rsqrtf | ||
| 8203 | .{ .tag = @enumFromInt(1531), .param_str = "V4fV4f", .properties = .{ .target_set = TargetSet.initOne(.ppc) } }, | ||
| 8204 | // __builtin_ppc_stdcx | ||
| 8205 | .{ .tag = @enumFromInt(1532), .param_str = "iLiD*Li", .properties = .{ .target_set = TargetSet.initOne(.ppc) } }, | ||
| 8206 | // __builtin_ppc_stfiw | ||
| 8207 | .{ .tag = @enumFromInt(1533), .param_str = "viC*d", .properties = .{ .target_set = TargetSet.initOne(.ppc) } }, | ||
| 8208 | // __builtin_ppc_store2r | ||
| 8209 | .{ .tag = @enumFromInt(1534), .param_str = "vUiUs*", .properties = .{ .target_set = TargetSet.initOne(.ppc) } }, | ||
| 8210 | // __builtin_ppc_store4r | ||
| 8211 | .{ .tag = @enumFromInt(1535), .param_str = "vUiUi*", .properties = .{ .target_set = TargetSet.initOne(.ppc) } }, | ||
| 8212 | // __builtin_ppc_stwcx | ||
| 8213 | .{ .tag = @enumFromInt(1536), .param_str = "iiD*i", .properties = .{ .target_set = TargetSet.initOne(.ppc) } }, | ||
| 8214 | // __builtin_ppc_swdiv | ||
| 8215 | .{ .tag = @enumFromInt(1537), .param_str = "ddd", .properties = .{ .target_set = TargetSet.initOne(.ppc) } }, | ||
| 8216 | // __builtin_ppc_swdiv_nochk | ||
| 8217 | .{ .tag = @enumFromInt(1538), .param_str = "ddd", .properties = .{ .target_set = TargetSet.initOne(.ppc) } }, | ||
| 8218 | // __builtin_ppc_swdivs | ||
| 8219 | .{ .tag = @enumFromInt(1539), .param_str = "fff", .properties = .{ .target_set = TargetSet.initOne(.ppc) } }, | ||
| 8220 | // __builtin_ppc_swdivs_nochk | ||
| 8221 | .{ .tag = @enumFromInt(1540), .param_str = "fff", .properties = .{ .target_set = TargetSet.initOne(.ppc) } }, | ||
| 8222 | // __builtin_ppc_sync | ||
| 8223 | .{ .tag = @enumFromInt(1541), .param_str = "v", .properties = .{ .target_set = TargetSet.initOne(.ppc) } }, | ||
| 8224 | // __builtin_ppc_tdw | ||
| 8225 | .{ .tag = @enumFromInt(1542), .param_str = "vLLiLLiIUi", .properties = .{ .target_set = TargetSet.initOne(.ppc) } }, | ||
| 8226 | // __builtin_ppc_trap | ||
| 8227 | .{ .tag = @enumFromInt(1543), .param_str = "vi", .properties = .{ .target_set = TargetSet.initOne(.ppc) } }, | ||
| 8228 | // __builtin_ppc_trapd | ||
| 8229 | .{ .tag = @enumFromInt(1544), .param_str = "vLi", .properties = .{ .target_set = TargetSet.initOne(.ppc) } }, | ||
| 8230 | // __builtin_ppc_tw | ||
| 8231 | .{ .tag = @enumFromInt(1545), .param_str = "viiIUi", .properties = .{ .target_set = TargetSet.initOne(.ppc) } }, | ||
| 8232 | // __builtin_prefetch | ||
| 8233 | .{ .tag = @enumFromInt(1546), .param_str = "vvC*.", .properties = .{ .attributes = .{ .@"const" = true } } }, | ||
| 8234 | // __builtin_preserve_access_index | ||
| 8235 | .{ .tag = @enumFromInt(1547), .param_str = "v.", .properties = .{ .attributes = .{ .custom_typecheck = true } } }, | ||
| 8236 | // __builtin_printf | ||
| 8237 | .{ .tag = @enumFromInt(1548), .param_str = "icC*R.", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .format_kind = .printf } } }, | ||
| 8238 | // __builtin_ptx_get_image_channel_data_typei_ | ||
| 8239 | .{ .tag = @enumFromInt(1549), .param_str = "ii", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 8240 | // __builtin_ptx_get_image_channel_orderi_ | ||
| 8241 | .{ .tag = @enumFromInt(1550), .param_str = "ii", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 8242 | // __builtin_ptx_get_image_depthi_ | ||
| 8243 | .{ .tag = @enumFromInt(1551), .param_str = "ii", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 8244 | // __builtin_ptx_get_image_heighti_ | ||
| 8245 | .{ .tag = @enumFromInt(1552), .param_str = "ii", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 8246 | // __builtin_ptx_get_image_widthi_ | ||
| 8247 | .{ .tag = @enumFromInt(1553), .param_str = "ii", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 8248 | // __builtin_ptx_read_image2Dff_ | ||
| 8249 | .{ .tag = @enumFromInt(1554), .param_str = "V4fiiff", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 8250 | // __builtin_ptx_read_image2Dfi_ | ||
| 8251 | .{ .tag = @enumFromInt(1555), .param_str = "V4fiiii", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 8252 | // __builtin_ptx_read_image2Dif_ | ||
| 8253 | .{ .tag = @enumFromInt(1556), .param_str = "V4iiiff", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 8254 | // __builtin_ptx_read_image2Dii_ | ||
| 8255 | .{ .tag = @enumFromInt(1557), .param_str = "V4iiiii", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 8256 | // __builtin_ptx_read_image3Dff_ | ||
| 8257 | .{ .tag = @enumFromInt(1558), .param_str = "V4fiiffff", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 8258 | // __builtin_ptx_read_image3Dfi_ | ||
| 8259 | .{ .tag = @enumFromInt(1559), .param_str = "V4fiiiiii", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 8260 | // __builtin_ptx_read_image3Dif_ | ||
| 8261 | .{ .tag = @enumFromInt(1560), .param_str = "V4iiiffff", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 8262 | // __builtin_ptx_read_image3Dii_ | ||
| 8263 | .{ .tag = @enumFromInt(1561), .param_str = "V4iiiiiii", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 8264 | // __builtin_ptx_write_image2Df_ | ||
| 8265 | .{ .tag = @enumFromInt(1562), .param_str = "viiiffff", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 8266 | // __builtin_ptx_write_image2Di_ | ||
| 8267 | .{ .tag = @enumFromInt(1563), .param_str = "viiiiiii", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 8268 | // __builtin_ptx_write_image2Dui_ | ||
| 8269 | .{ .tag = @enumFromInt(1564), .param_str = "viiiUiUiUiUi", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 8270 | // __builtin_r600_implicitarg_ptr | ||
| 8271 | .{ .tag = @enumFromInt(1565), .param_str = "Uc*7", .properties = .{ .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } }, | ||
| 8272 | // __builtin_r600_read_tgid_x | ||
| 8273 | .{ .tag = @enumFromInt(1566), .param_str = "Ui", .properties = .{ .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } }, | ||
| 8274 | // __builtin_r600_read_tgid_y | ||
| 8275 | .{ .tag = @enumFromInt(1567), .param_str = "Ui", .properties = .{ .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } }, | ||
| 8276 | // __builtin_r600_read_tgid_z | ||
| 8277 | .{ .tag = @enumFromInt(1568), .param_str = "Ui", .properties = .{ .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } }, | ||
| 8278 | // __builtin_r600_read_tidig_x | ||
| 8279 | .{ .tag = @enumFromInt(1569), .param_str = "Ui", .properties = .{ .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } }, | ||
| 8280 | // __builtin_r600_read_tidig_y | ||
| 8281 | .{ .tag = @enumFromInt(1570), .param_str = "Ui", .properties = .{ .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } }, | ||
| 8282 | // __builtin_r600_read_tidig_z | ||
| 8283 | .{ .tag = @enumFromInt(1571), .param_str = "Ui", .properties = .{ .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } }, | ||
| 8284 | // __builtin_r600_recipsqrt_ieee | ||
| 8285 | .{ .tag = @enumFromInt(1572), .param_str = "dd", .properties = .{ .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } }, | ||
| 8286 | // __builtin_r600_recipsqrt_ieeef | ||
| 8287 | .{ .tag = @enumFromInt(1573), .param_str = "ff", .properties = .{ .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } }, | ||
| 8288 | // __builtin_readcyclecounter | ||
| 8289 | .{ .tag = @enumFromInt(1574), .param_str = "ULLi", .properties = .{} }, | ||
| 8290 | // __builtin_readflm | ||
| 8291 | .{ .tag = @enumFromInt(1575), .param_str = "d", .properties = .{ .target_set = TargetSet.initOne(.ppc) } }, | ||
| 8292 | // __builtin_realloc | ||
| 8293 | .{ .tag = @enumFromInt(1576), .param_str = "v*v*z", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true } } }, | ||
| 8294 | // __builtin_reduce_add | ||
| 8295 | .{ .tag = @enumFromInt(1577), .param_str = "v.", .properties = .{ .attributes = .{ .@"const" = true, .custom_typecheck = true } } }, | ||
| 8296 | // __builtin_reduce_and | ||
| 8297 | .{ .tag = @enumFromInt(1578), .param_str = "v.", .properties = .{ .attributes = .{ .@"const" = true, .custom_typecheck = true } } }, | ||
| 8298 | // __builtin_reduce_max | ||
| 8299 | .{ .tag = @enumFromInt(1579), .param_str = "v.", .properties = .{ .attributes = .{ .@"const" = true, .custom_typecheck = true } } }, | ||
| 8300 | // __builtin_reduce_min | ||
| 8301 | .{ .tag = @enumFromInt(1580), .param_str = "v.", .properties = .{ .attributes = .{ .@"const" = true, .custom_typecheck = true } } }, | ||
| 8302 | // __builtin_reduce_mul | ||
| 8303 | .{ .tag = @enumFromInt(1581), .param_str = "v.", .properties = .{ .attributes = .{ .@"const" = true, .custom_typecheck = true } } }, | ||
| 8304 | // __builtin_reduce_or | ||
| 8305 | .{ .tag = @enumFromInt(1582), .param_str = "v.", .properties = .{ .attributes = .{ .@"const" = true, .custom_typecheck = true } } }, | ||
| 8306 | // __builtin_reduce_xor | ||
| 8307 | .{ .tag = @enumFromInt(1583), .param_str = "v.", .properties = .{ .attributes = .{ .@"const" = true, .custom_typecheck = true } } }, | ||
| 8308 | // __builtin_remainder | ||
| 8309 | .{ .tag = @enumFromInt(1584), .param_str = "ddd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 8310 | // __builtin_remainderf | ||
| 8311 | .{ .tag = @enumFromInt(1585), .param_str = "fff", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 8312 | // __builtin_remainderf128 | ||
| 8313 | .{ .tag = @enumFromInt(1586), .param_str = "LLdLLdLLd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 8314 | // __builtin_remainderl | ||
| 8315 | .{ .tag = @enumFromInt(1587), .param_str = "LdLdLd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 8316 | // __builtin_remquo | ||
| 8317 | .{ .tag = @enumFromInt(1588), .param_str = "dddi*", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true } } }, | ||
| 8318 | // __builtin_remquof | ||
| 8319 | .{ .tag = @enumFromInt(1589), .param_str = "fffi*", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true } } }, | ||
| 8320 | // __builtin_remquof128 | ||
| 8321 | .{ .tag = @enumFromInt(1590), .param_str = "LLdLLdLLdi*", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true } } }, | ||
| 8322 | // __builtin_remquol | ||
| 8323 | .{ .tag = @enumFromInt(1591), .param_str = "LdLdLdi*", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true } } }, | ||
| 8324 | // __builtin_return_address | ||
| 8325 | .{ .tag = @enumFromInt(1592), .param_str = "v*IUi", .properties = .{} }, | ||
| 8326 | // __builtin_rindex | ||
| 8327 | .{ .tag = @enumFromInt(1593), .param_str = "c*cC*i", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true } } }, | ||
| 8328 | // __builtin_rint | ||
| 8329 | .{ .tag = @enumFromInt(1594), .param_str = "dd", .properties = .{ .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } }, | ||
| 8330 | // __builtin_rintf | ||
| 8331 | .{ .tag = @enumFromInt(1595), .param_str = "ff", .properties = .{ .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } }, | ||
| 8332 | // __builtin_rintf128 | ||
| 8333 | .{ .tag = @enumFromInt(1596), .param_str = "LLdLLd", .properties = .{ .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } }, | ||
| 8334 | // __builtin_rintf16 | ||
| 8335 | .{ .tag = @enumFromInt(1597), .param_str = "hh", .properties = .{ .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } }, | ||
| 8336 | // __builtin_rintl | ||
| 8337 | .{ .tag = @enumFromInt(1598), .param_str = "LdLd", .properties = .{ .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } }, | ||
| 8338 | // __builtin_rotateleft16 | ||
| 8339 | .{ .tag = @enumFromInt(1599), .param_str = "UsUsUs", .properties = .{ .attributes = .{ .@"const" = true, .const_evaluable = true } } }, | ||
| 8340 | // __builtin_rotateleft32 | ||
| 8341 | .{ .tag = @enumFromInt(1600), .param_str = "UZiUZiUZi", .properties = .{ .attributes = .{ .@"const" = true, .const_evaluable = true } } }, | ||
| 8342 | // __builtin_rotateleft64 | ||
| 8343 | .{ .tag = @enumFromInt(1601), .param_str = "UWiUWiUWi", .properties = .{ .attributes = .{ .@"const" = true, .const_evaluable = true } } }, | ||
| 8344 | // __builtin_rotateleft8 | ||
| 8345 | .{ .tag = @enumFromInt(1602), .param_str = "UcUcUc", .properties = .{ .attributes = .{ .@"const" = true, .const_evaluable = true } } }, | ||
| 8346 | // __builtin_rotateright16 | ||
| 8347 | .{ .tag = @enumFromInt(1603), .param_str = "UsUsUs", .properties = .{ .attributes = .{ .@"const" = true, .const_evaluable = true } } }, | ||
| 8348 | // __builtin_rotateright32 | ||
| 8349 | .{ .tag = @enumFromInt(1604), .param_str = "UZiUZiUZi", .properties = .{ .attributes = .{ .@"const" = true, .const_evaluable = true } } }, | ||
| 8350 | // __builtin_rotateright64 | ||
| 8351 | .{ .tag = @enumFromInt(1605), .param_str = "UWiUWiUWi", .properties = .{ .attributes = .{ .@"const" = true, .const_evaluable = true } } }, | ||
| 8352 | // __builtin_rotateright8 | ||
| 8353 | .{ .tag = @enumFromInt(1606), .param_str = "UcUcUc", .properties = .{ .attributes = .{ .@"const" = true, .const_evaluable = true } } }, | ||
| 8354 | // __builtin_round | ||
| 8355 | .{ .tag = @enumFromInt(1607), .param_str = "dd", .properties = .{ .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } }, | ||
| 8356 | // __builtin_roundeven | ||
| 8357 | .{ .tag = @enumFromInt(1608), .param_str = "dd", .properties = .{ .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } }, | ||
| 8358 | // __builtin_roundevenf | ||
| 8359 | .{ .tag = @enumFromInt(1609), .param_str = "ff", .properties = .{ .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } }, | ||
| 8360 | // __builtin_roundevenf128 | ||
| 8361 | .{ .tag = @enumFromInt(1610), .param_str = "LLdLLd", .properties = .{ .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } }, | ||
| 8362 | // __builtin_roundevenf16 | ||
| 8363 | .{ .tag = @enumFromInt(1611), .param_str = "hh", .properties = .{ .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } }, | ||
| 8364 | // __builtin_roundevenl | ||
| 8365 | .{ .tag = @enumFromInt(1612), .param_str = "LdLd", .properties = .{ .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } }, | ||
| 8366 | // __builtin_roundf | ||
| 8367 | .{ .tag = @enumFromInt(1613), .param_str = "ff", .properties = .{ .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } }, | ||
| 8368 | // __builtin_roundf128 | ||
| 8369 | .{ .tag = @enumFromInt(1614), .param_str = "LLdLLd", .properties = .{ .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } }, | ||
| 8370 | // __builtin_roundf16 | ||
| 8371 | .{ .tag = @enumFromInt(1615), .param_str = "hh", .properties = .{ .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } }, | ||
| 8372 | // __builtin_roundl | ||
| 8373 | .{ .tag = @enumFromInt(1616), .param_str = "LdLd", .properties = .{ .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } }, | ||
| 8374 | // __builtin_sadd_overflow | ||
| 8375 | .{ .tag = @enumFromInt(1617), .param_str = "bSiCSiCSi*", .properties = .{ .attributes = .{ .const_evaluable = true } } }, | ||
| 8376 | // __builtin_saddl_overflow | ||
| 8377 | .{ .tag = @enumFromInt(1618), .param_str = "bSLiCSLiCSLi*", .properties = .{ .attributes = .{ .const_evaluable = true } } }, | ||
| 8378 | // __builtin_saddll_overflow | ||
| 8379 | .{ .tag = @enumFromInt(1619), .param_str = "bSLLiCSLLiCSLLi*", .properties = .{ .attributes = .{ .const_evaluable = true } } }, | ||
| 8380 | // __builtin_scalbln | ||
| 8381 | .{ .tag = @enumFromInt(1620), .param_str = "ddLi", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 8382 | // __builtin_scalblnf | ||
| 8383 | .{ .tag = @enumFromInt(1621), .param_str = "ffLi", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 8384 | // __builtin_scalblnf128 | ||
| 8385 | .{ .tag = @enumFromInt(1622), .param_str = "LLdLLdLi", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 8386 | // __builtin_scalblnl | ||
| 8387 | .{ .tag = @enumFromInt(1623), .param_str = "LdLdLi", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 8388 | // __builtin_scalbn | ||
| 8389 | .{ .tag = @enumFromInt(1624), .param_str = "ddi", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 8390 | // __builtin_scalbnf | ||
| 8391 | .{ .tag = @enumFromInt(1625), .param_str = "ffi", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 8392 | // __builtin_scalbnf128 | ||
| 8393 | .{ .tag = @enumFromInt(1626), .param_str = "LLdLLdi", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 8394 | // __builtin_scalbnl | ||
| 8395 | .{ .tag = @enumFromInt(1627), .param_str = "LdLdi", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 8396 | // __builtin_scanf | ||
| 8397 | .{ .tag = @enumFromInt(1628), .param_str = "icC*R.", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .format_kind = .scanf } } }, | ||
| 8398 | // __builtin_set_flt_rounds | ||
| 8399 | .{ .tag = @enumFromInt(1629), .param_str = "vi", .properties = .{} }, | ||
| 8400 | // __builtin_setflm | ||
| 8401 | .{ .tag = @enumFromInt(1630), .param_str = "dd", .properties = .{ .target_set = TargetSet.initOne(.ppc) } }, | ||
| 8402 | // __builtin_setjmp | ||
| 8403 | .{ .tag = @enumFromInt(1631), .param_str = "iv**", .properties = .{ .attributes = .{ .returns_twice = true } } }, | ||
| 8404 | // __builtin_setps | ||
| 8405 | .{ .tag = @enumFromInt(1632), .param_str = "vUiUi", .properties = .{ .target_set = TargetSet.initOne(.xcore) } }, | ||
| 8406 | // __builtin_setrnd | ||
| 8407 | .{ .tag = @enumFromInt(1633), .param_str = "di", .properties = .{ .target_set = TargetSet.initOne(.ppc) } }, | ||
| 8408 | // __builtin_shufflevector | ||
| 8409 | .{ .tag = @enumFromInt(1634), .param_str = "v.", .properties = .{ .attributes = .{ .@"const" = true, .custom_typecheck = true } } }, | ||
| 8410 | // __builtin_signbit | ||
| 8411 | .{ .tag = @enumFromInt(1635), .param_str = "i.", .properties = .{ .attributes = .{ .@"const" = true, .custom_typecheck = true, .lib_function_with_builtin_prefix = true } } }, | ||
| 8412 | // __builtin_signbitf | ||
| 8413 | .{ .tag = @enumFromInt(1636), .param_str = "if", .properties = .{ .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } }, | ||
| 8414 | // __builtin_signbitl | ||
| 8415 | .{ .tag = @enumFromInt(1637), .param_str = "iLd", .properties = .{ .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } }, | ||
| 8416 | // __builtin_sin | ||
| 8417 | .{ .tag = @enumFromInt(1638), .param_str = "dd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 8418 | // __builtin_sinf | ||
| 8419 | .{ .tag = @enumFromInt(1639), .param_str = "ff", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 8420 | // __builtin_sinf128 | ||
| 8421 | .{ .tag = @enumFromInt(1640), .param_str = "LLdLLd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 8422 | // __builtin_sinf16 | ||
| 8423 | .{ .tag = @enumFromInt(1641), .param_str = "hh", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 8424 | // __builtin_sinh | ||
| 8425 | .{ .tag = @enumFromInt(1642), .param_str = "dd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 8426 | // __builtin_sinhf | ||
| 8427 | .{ .tag = @enumFromInt(1643), .param_str = "ff", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 8428 | // __builtin_sinhf128 | ||
| 8429 | .{ .tag = @enumFromInt(1644), .param_str = "LLdLLd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 8430 | // __builtin_sinhl | ||
| 8431 | .{ .tag = @enumFromInt(1645), .param_str = "LdLd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 8432 | // __builtin_sinl | ||
| 8433 | .{ .tag = @enumFromInt(1646), .param_str = "LdLd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 8434 | // __builtin_smul_overflow | ||
| 8435 | .{ .tag = @enumFromInt(1647), .param_str = "bSiCSiCSi*", .properties = .{ .attributes = .{ .const_evaluable = true } } }, | ||
| 8436 | // __builtin_smull_overflow | ||
| 8437 | .{ .tag = @enumFromInt(1648), .param_str = "bSLiCSLiCSLi*", .properties = .{ .attributes = .{ .const_evaluable = true } } }, | ||
| 8438 | // __builtin_smulll_overflow | ||
| 8439 | .{ .tag = @enumFromInt(1649), .param_str = "bSLLiCSLLiCSLLi*", .properties = .{ .attributes = .{ .const_evaluable = true } } }, | ||
| 8440 | // __builtin_snprintf | ||
| 8441 | .{ .tag = @enumFromInt(1650), .param_str = "ic*RzcC*R.", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .format_kind = .printf, .format_string_position = 2 } } }, | ||
| 8442 | // __builtin_sponentry | ||
| 8443 | .{ .tag = @enumFromInt(1651), .param_str = "v*", .properties = .{ .target_set = TargetSet.initMany(&.{ .aarch64, .arm }), .attributes = .{ .@"const" = true } } }, | ||
| 8444 | // __builtin_sprintf | ||
| 8445 | .{ .tag = @enumFromInt(1652), .param_str = "ic*RcC*R.", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .format_kind = .printf, .format_string_position = 1 } } }, | ||
| 8446 | // __builtin_sqrt | ||
| 8447 | .{ .tag = @enumFromInt(1653), .param_str = "dd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 8448 | // __builtin_sqrtf | ||
| 8449 | .{ .tag = @enumFromInt(1654), .param_str = "ff", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 8450 | // __builtin_sqrtf128 | ||
| 8451 | .{ .tag = @enumFromInt(1655), .param_str = "LLdLLd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 8452 | // __builtin_sqrtf16 | ||
| 8453 | .{ .tag = @enumFromInt(1656), .param_str = "hh", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 8454 | // __builtin_sqrtl | ||
| 8455 | .{ .tag = @enumFromInt(1657), .param_str = "LdLd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 8456 | // __builtin_sscanf | ||
| 8457 | .{ .tag = @enumFromInt(1658), .param_str = "icC*RcC*R.", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .format_kind = .scanf, .format_string_position = 1 } } }, | ||
| 8458 | // __builtin_ssub_overflow | ||
| 8459 | .{ .tag = @enumFromInt(1659), .param_str = "bSiCSiCSi*", .properties = .{ .attributes = .{ .const_evaluable = true } } }, | ||
| 8460 | // __builtin_ssubl_overflow | ||
| 8461 | .{ .tag = @enumFromInt(1660), .param_str = "bSLiCSLiCSLi*", .properties = .{ .attributes = .{ .const_evaluable = true } } }, | ||
| 8462 | // __builtin_ssubll_overflow | ||
| 8463 | .{ .tag = @enumFromInt(1661), .param_str = "bSLLiCSLLiCSLLi*", .properties = .{ .attributes = .{ .const_evaluable = true } } }, | ||
| 8464 | // __builtin_stdarg_start | ||
| 8465 | .{ .tag = @enumFromInt(1662), .param_str = "vA.", .properties = .{ .attributes = .{ .custom_typecheck = true } } }, | ||
| 8466 | // __builtin_stpcpy | ||
| 8467 | .{ .tag = @enumFromInt(1663), .param_str = "c*c*cC*", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true } } }, | ||
| 8468 | // __builtin_stpncpy | ||
| 8469 | .{ .tag = @enumFromInt(1664), .param_str = "c*c*cC*z", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true } } }, | ||
| 8470 | // __builtin_strcasecmp | ||
| 8471 | .{ .tag = @enumFromInt(1665), .param_str = "icC*cC*", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true } } }, | ||
| 8472 | // __builtin_strcat | ||
| 8473 | .{ .tag = @enumFromInt(1666), .param_str = "c*c*cC*", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true } } }, | ||
| 8474 | // __builtin_strchr | ||
| 8475 | .{ .tag = @enumFromInt(1667), .param_str = "c*cC*i", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_evaluable = true } } }, | ||
| 8476 | // __builtin_strcmp | ||
| 8477 | .{ .tag = @enumFromInt(1668), .param_str = "icC*cC*", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_evaluable = true } } }, | ||
| 8478 | // __builtin_strcpy | ||
| 8479 | .{ .tag = @enumFromInt(1669), .param_str = "c*c*cC*", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true } } }, | ||
| 8480 | // __builtin_strcspn | ||
| 8481 | .{ .tag = @enumFromInt(1670), .param_str = "zcC*cC*", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true } } }, | ||
| 8482 | // __builtin_strdup | ||
| 8483 | .{ .tag = @enumFromInt(1671), .param_str = "c*cC*", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true } } }, | ||
| 8484 | // __builtin_strlen | ||
| 8485 | .{ .tag = @enumFromInt(1672), .param_str = "zcC*", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_evaluable = true } } }, | ||
| 8486 | // __builtin_strncasecmp | ||
| 8487 | .{ .tag = @enumFromInt(1673), .param_str = "icC*cC*z", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true } } }, | ||
| 8488 | // __builtin_strncat | ||
| 8489 | .{ .tag = @enumFromInt(1674), .param_str = "c*c*cC*z", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true } } }, | ||
| 8490 | // __builtin_strncmp | ||
| 8491 | .{ .tag = @enumFromInt(1675), .param_str = "icC*cC*z", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_evaluable = true } } }, | ||
| 8492 | // __builtin_strncpy | ||
| 8493 | .{ .tag = @enumFromInt(1676), .param_str = "c*c*cC*z", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true } } }, | ||
| 8494 | // __builtin_strndup | ||
| 8495 | .{ .tag = @enumFromInt(1677), .param_str = "c*cC*z", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true } } }, | ||
| 8496 | // __builtin_strpbrk | ||
| 8497 | .{ .tag = @enumFromInt(1678), .param_str = "c*cC*cC*", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true } } }, | ||
| 8498 | // __builtin_strrchr | ||
| 8499 | .{ .tag = @enumFromInt(1679), .param_str = "c*cC*i", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true } } }, | ||
| 8500 | // __builtin_strspn | ||
| 8501 | .{ .tag = @enumFromInt(1680), .param_str = "zcC*cC*", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true } } }, | ||
| 8502 | // __builtin_strstr | ||
| 8503 | .{ .tag = @enumFromInt(1681), .param_str = "c*cC*cC*", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true } } }, | ||
| 8504 | // __builtin_sub_overflow | ||
| 8505 | .{ .tag = @enumFromInt(1682), .param_str = "b.", .properties = .{ .attributes = .{ .custom_typecheck = true, .const_evaluable = true } } }, | ||
| 8506 | // __builtin_subc | ||
| 8507 | .{ .tag = @enumFromInt(1683), .param_str = "UiUiCUiCUiCUi*", .properties = .{} }, | ||
| 8508 | // __builtin_subcb | ||
| 8509 | .{ .tag = @enumFromInt(1684), .param_str = "UcUcCUcCUcCUc*", .properties = .{} }, | ||
| 8510 | // __builtin_subcl | ||
| 8511 | .{ .tag = @enumFromInt(1685), .param_str = "ULiULiCULiCULiCULi*", .properties = .{} }, | ||
| 8512 | // __builtin_subcll | ||
| 8513 | .{ .tag = @enumFromInt(1686), .param_str = "ULLiULLiCULLiCULLiCULLi*", .properties = .{} }, | ||
| 8514 | // __builtin_subcs | ||
| 8515 | .{ .tag = @enumFromInt(1687), .param_str = "UsUsCUsCUsCUs*", .properties = .{} }, | ||
| 8516 | // __builtin_tan | ||
| 8517 | .{ .tag = @enumFromInt(1688), .param_str = "dd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 8518 | // __builtin_tanf | ||
| 8519 | .{ .tag = @enumFromInt(1689), .param_str = "ff", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 8520 | // __builtin_tanf128 | ||
| 8521 | .{ .tag = @enumFromInt(1690), .param_str = "LLdLLd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 8522 | // __builtin_tanh | ||
| 8523 | .{ .tag = @enumFromInt(1691), .param_str = "dd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 8524 | // __builtin_tanhf | ||
| 8525 | .{ .tag = @enumFromInt(1692), .param_str = "ff", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 8526 | // __builtin_tanhf128 | ||
| 8527 | .{ .tag = @enumFromInt(1693), .param_str = "LLdLLd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 8528 | // __builtin_tanhl | ||
| 8529 | .{ .tag = @enumFromInt(1694), .param_str = "LdLd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 8530 | // __builtin_tanl | ||
| 8531 | .{ .tag = @enumFromInt(1695), .param_str = "LdLd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 8532 | // __builtin_tgamma | ||
| 8533 | .{ .tag = @enumFromInt(1696), .param_str = "dd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 8534 | // __builtin_tgammaf | ||
| 8535 | .{ .tag = @enumFromInt(1697), .param_str = "ff", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 8536 | // __builtin_tgammaf128 | ||
| 8537 | .{ .tag = @enumFromInt(1698), .param_str = "LLdLLd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 8538 | // __builtin_tgammal | ||
| 8539 | .{ .tag = @enumFromInt(1699), .param_str = "LdLd", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 8540 | // __builtin_thread_pointer | ||
| 8541 | .{ .tag = @enumFromInt(1700), .param_str = "v*", .properties = .{ .attributes = .{ .@"const" = true } } }, | ||
| 8542 | // __builtin_trap | ||
| 8543 | .{ .tag = @enumFromInt(1701), .param_str = "v", .properties = .{ .attributes = .{ .noreturn = true } } }, | ||
| 8544 | // __builtin_trunc | ||
| 8545 | .{ .tag = @enumFromInt(1702), .param_str = "dd", .properties = .{ .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } }, | ||
| 8546 | // __builtin_truncf | ||
| 8547 | .{ .tag = @enumFromInt(1703), .param_str = "ff", .properties = .{ .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } }, | ||
| 8548 | // __builtin_truncf128 | ||
| 8549 | .{ .tag = @enumFromInt(1704), .param_str = "LLdLLd", .properties = .{ .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } }, | ||
| 8550 | // __builtin_truncf16 | ||
| 8551 | .{ .tag = @enumFromInt(1705), .param_str = "hh", .properties = .{ .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } }, | ||
| 8552 | // __builtin_truncl | ||
| 8553 | .{ .tag = @enumFromInt(1706), .param_str = "LdLd", .properties = .{ .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } }, | ||
| 8554 | // __builtin_uadd_overflow | ||
| 8555 | .{ .tag = @enumFromInt(1707), .param_str = "bUiCUiCUi*", .properties = .{ .attributes = .{ .const_evaluable = true } } }, | ||
| 8556 | // __builtin_uaddl_overflow | ||
| 8557 | .{ .tag = @enumFromInt(1708), .param_str = "bULiCULiCULi*", .properties = .{ .attributes = .{ .const_evaluable = true } } }, | ||
| 8558 | // __builtin_uaddll_overflow | ||
| 8559 | .{ .tag = @enumFromInt(1709), .param_str = "bULLiCULLiCULLi*", .properties = .{ .attributes = .{ .const_evaluable = true } } }, | ||
| 8560 | // __builtin_umul_overflow | ||
| 8561 | .{ .tag = @enumFromInt(1710), .param_str = "bUiCUiCUi*", .properties = .{ .attributes = .{ .const_evaluable = true } } }, | ||
| 8562 | // __builtin_umull_overflow | ||
| 8563 | .{ .tag = @enumFromInt(1711), .param_str = "bULiCULiCULi*", .properties = .{ .attributes = .{ .const_evaluable = true } } }, | ||
| 8564 | // __builtin_umulll_overflow | ||
| 8565 | .{ .tag = @enumFromInt(1712), .param_str = "bULLiCULLiCULLi*", .properties = .{ .attributes = .{ .const_evaluable = true } } }, | ||
| 8566 | // __builtin_unpack_longdouble | ||
| 8567 | .{ .tag = @enumFromInt(1713), .param_str = "dLdIi", .properties = .{ .target_set = TargetSet.initOne(.ppc) } }, | ||
| 8568 | // __builtin_unpredictable | ||
| 8569 | .{ .tag = @enumFromInt(1714), .param_str = "LiLi", .properties = .{ .attributes = .{ .@"const" = true } } }, | ||
| 8570 | // __builtin_unreachable | ||
| 8571 | .{ .tag = @enumFromInt(1715), .param_str = "v", .properties = .{ .attributes = .{ .noreturn = true } } }, | ||
| 8572 | // __builtin_unwind_init | ||
| 8573 | .{ .tag = @enumFromInt(1716), .param_str = "v", .properties = .{} }, | ||
| 8574 | // __builtin_usub_overflow | ||
| 8575 | .{ .tag = @enumFromInt(1717), .param_str = "bUiCUiCUi*", .properties = .{ .attributes = .{ .const_evaluable = true } } }, | ||
| 8576 | // __builtin_usubl_overflow | ||
| 8577 | .{ .tag = @enumFromInt(1718), .param_str = "bULiCULiCULi*", .properties = .{ .attributes = .{ .const_evaluable = true } } }, | ||
| 8578 | // __builtin_usubll_overflow | ||
| 8579 | .{ .tag = @enumFromInt(1719), .param_str = "bULLiCULLiCULLi*", .properties = .{ .attributes = .{ .const_evaluable = true } } }, | ||
| 8580 | // __builtin_va_copy | ||
| 8581 | .{ .tag = @enumFromInt(1720), .param_str = "vAA", .properties = .{} }, | ||
| 8582 | // __builtin_va_end | ||
| 8583 | .{ .tag = @enumFromInt(1721), .param_str = "vA", .properties = .{} }, | ||
| 8584 | // __builtin_va_start | ||
| 8585 | .{ .tag = @enumFromInt(1722), .param_str = "vA.", .properties = .{ .attributes = .{ .custom_typecheck = true } } }, | ||
| 8586 | // __builtin_ve_vl_andm_MMM | ||
| 8587 | .{ .tag = @enumFromInt(1723), .param_str = "V512bV512bV512b", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8588 | // __builtin_ve_vl_andm_mmm | ||
| 8589 | .{ .tag = @enumFromInt(1724), .param_str = "V256bV256bV256b", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8590 | // __builtin_ve_vl_eqvm_MMM | ||
| 8591 | .{ .tag = @enumFromInt(1725), .param_str = "V512bV512bV512b", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8592 | // __builtin_ve_vl_eqvm_mmm | ||
| 8593 | .{ .tag = @enumFromInt(1726), .param_str = "V256bV256bV256b", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8594 | // __builtin_ve_vl_extract_vm512l | ||
| 8595 | .{ .tag = @enumFromInt(1727), .param_str = "V256bV512b", .properties = .{ .target_set = TargetSet.initOne(.ve) } }, | ||
| 8596 | // __builtin_ve_vl_extract_vm512u | ||
| 8597 | .{ .tag = @enumFromInt(1728), .param_str = "V256bV512b", .properties = .{ .target_set = TargetSet.initOne(.ve) } }, | ||
| 8598 | // __builtin_ve_vl_fencec_s | ||
| 8599 | .{ .tag = @enumFromInt(1729), .param_str = "vUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8600 | // __builtin_ve_vl_fencei | ||
| 8601 | .{ .tag = @enumFromInt(1730), .param_str = "v", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8602 | // __builtin_ve_vl_fencem_s | ||
| 8603 | .{ .tag = @enumFromInt(1731), .param_str = "vUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8604 | // __builtin_ve_vl_fidcr_sss | ||
| 8605 | .{ .tag = @enumFromInt(1732), .param_str = "LUiLUiUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8606 | // __builtin_ve_vl_insert_vm512l | ||
| 8607 | .{ .tag = @enumFromInt(1733), .param_str = "V512bV512bV256b", .properties = .{ .target_set = TargetSet.initOne(.ve) } }, | ||
| 8608 | // __builtin_ve_vl_insert_vm512u | ||
| 8609 | .{ .tag = @enumFromInt(1734), .param_str = "V512bV512bV256b", .properties = .{ .target_set = TargetSet.initOne(.ve) } }, | ||
| 8610 | // __builtin_ve_vl_lcr_sss | ||
| 8611 | .{ .tag = @enumFromInt(1735), .param_str = "LUiLUiLUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8612 | // __builtin_ve_vl_lsv_vvss | ||
| 8613 | .{ .tag = @enumFromInt(1736), .param_str = "V256dV256dUiLUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8614 | // __builtin_ve_vl_lvm_MMss | ||
| 8615 | .{ .tag = @enumFromInt(1737), .param_str = "V512bV512bLUiLUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8616 | // __builtin_ve_vl_lvm_mmss | ||
| 8617 | .{ .tag = @enumFromInt(1738), .param_str = "V256bV256bLUiLUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8618 | // __builtin_ve_vl_lvsd_svs | ||
| 8619 | .{ .tag = @enumFromInt(1739), .param_str = "dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8620 | // __builtin_ve_vl_lvsl_svs | ||
| 8621 | .{ .tag = @enumFromInt(1740), .param_str = "LUiV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8622 | // __builtin_ve_vl_lvss_svs | ||
| 8623 | .{ .tag = @enumFromInt(1741), .param_str = "fV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8624 | // __builtin_ve_vl_lzvm_sml | ||
| 8625 | .{ .tag = @enumFromInt(1742), .param_str = "LUiV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8626 | // __builtin_ve_vl_negm_MM | ||
| 8627 | .{ .tag = @enumFromInt(1743), .param_str = "V512bV512b", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8628 | // __builtin_ve_vl_negm_mm | ||
| 8629 | .{ .tag = @enumFromInt(1744), .param_str = "V256bV256b", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8630 | // __builtin_ve_vl_nndm_MMM | ||
| 8631 | .{ .tag = @enumFromInt(1745), .param_str = "V512bV512bV512b", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8632 | // __builtin_ve_vl_nndm_mmm | ||
| 8633 | .{ .tag = @enumFromInt(1746), .param_str = "V256bV256bV256b", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8634 | // __builtin_ve_vl_orm_MMM | ||
| 8635 | .{ .tag = @enumFromInt(1747), .param_str = "V512bV512bV512b", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8636 | // __builtin_ve_vl_orm_mmm | ||
| 8637 | .{ .tag = @enumFromInt(1748), .param_str = "V256bV256bV256b", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8638 | // __builtin_ve_vl_pack_f32a | ||
| 8639 | .{ .tag = @enumFromInt(1749), .param_str = "ULifC*", .properties = .{ .target_set = TargetSet.initOne(.ve) } }, | ||
| 8640 | // __builtin_ve_vl_pack_f32p | ||
| 8641 | .{ .tag = @enumFromInt(1750), .param_str = "ULifC*fC*", .properties = .{ .target_set = TargetSet.initOne(.ve) } }, | ||
| 8642 | // __builtin_ve_vl_pcvm_sml | ||
| 8643 | .{ .tag = @enumFromInt(1751), .param_str = "LUiV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8644 | // __builtin_ve_vl_pfchv_ssl | ||
| 8645 | .{ .tag = @enumFromInt(1752), .param_str = "vLivC*Ui", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8646 | // __builtin_ve_vl_pfchvnc_ssl | ||
| 8647 | .{ .tag = @enumFromInt(1753), .param_str = "vLivC*Ui", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8648 | // __builtin_ve_vl_pvadds_vsvMvl | ||
| 8649 | .{ .tag = @enumFromInt(1754), .param_str = "V256dLUiV256dV512bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8650 | // __builtin_ve_vl_pvadds_vsvl | ||
| 8651 | .{ .tag = @enumFromInt(1755), .param_str = "V256dLUiV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8652 | // __builtin_ve_vl_pvadds_vsvvl | ||
| 8653 | .{ .tag = @enumFromInt(1756), .param_str = "V256dLUiV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8654 | // __builtin_ve_vl_pvadds_vvvMvl | ||
| 8655 | .{ .tag = @enumFromInt(1757), .param_str = "V256dV256dV256dV512bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8656 | // __builtin_ve_vl_pvadds_vvvl | ||
| 8657 | .{ .tag = @enumFromInt(1758), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8658 | // __builtin_ve_vl_pvadds_vvvvl | ||
| 8659 | .{ .tag = @enumFromInt(1759), .param_str = "V256dV256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8660 | // __builtin_ve_vl_pvaddu_vsvMvl | ||
| 8661 | .{ .tag = @enumFromInt(1760), .param_str = "V256dLUiV256dV512bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8662 | // __builtin_ve_vl_pvaddu_vsvl | ||
| 8663 | .{ .tag = @enumFromInt(1761), .param_str = "V256dLUiV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8664 | // __builtin_ve_vl_pvaddu_vsvvl | ||
| 8665 | .{ .tag = @enumFromInt(1762), .param_str = "V256dLUiV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8666 | // __builtin_ve_vl_pvaddu_vvvMvl | ||
| 8667 | .{ .tag = @enumFromInt(1763), .param_str = "V256dV256dV256dV512bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8668 | // __builtin_ve_vl_pvaddu_vvvl | ||
| 8669 | .{ .tag = @enumFromInt(1764), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8670 | // __builtin_ve_vl_pvaddu_vvvvl | ||
| 8671 | .{ .tag = @enumFromInt(1765), .param_str = "V256dV256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8672 | // __builtin_ve_vl_pvand_vsvMvl | ||
| 8673 | .{ .tag = @enumFromInt(1766), .param_str = "V256dLUiV256dV512bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8674 | // __builtin_ve_vl_pvand_vsvl | ||
| 8675 | .{ .tag = @enumFromInt(1767), .param_str = "V256dLUiV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8676 | // __builtin_ve_vl_pvand_vsvvl | ||
| 8677 | .{ .tag = @enumFromInt(1768), .param_str = "V256dLUiV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8678 | // __builtin_ve_vl_pvand_vvvMvl | ||
| 8679 | .{ .tag = @enumFromInt(1769), .param_str = "V256dV256dV256dV512bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8680 | // __builtin_ve_vl_pvand_vvvl | ||
| 8681 | .{ .tag = @enumFromInt(1770), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8682 | // __builtin_ve_vl_pvand_vvvvl | ||
| 8683 | .{ .tag = @enumFromInt(1771), .param_str = "V256dV256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8684 | // __builtin_ve_vl_pvbrd_vsMvl | ||
| 8685 | .{ .tag = @enumFromInt(1772), .param_str = "V256dLUiV512bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8686 | // __builtin_ve_vl_pvbrd_vsl | ||
| 8687 | .{ .tag = @enumFromInt(1773), .param_str = "V256dLUiUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8688 | // __builtin_ve_vl_pvbrd_vsvl | ||
| 8689 | .{ .tag = @enumFromInt(1774), .param_str = "V256dLUiV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8690 | // __builtin_ve_vl_pvbrv_vvMvl | ||
| 8691 | .{ .tag = @enumFromInt(1775), .param_str = "V256dV256dV512bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8692 | // __builtin_ve_vl_pvbrv_vvl | ||
| 8693 | .{ .tag = @enumFromInt(1776), .param_str = "V256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8694 | // __builtin_ve_vl_pvbrv_vvvl | ||
| 8695 | .{ .tag = @enumFromInt(1777), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8696 | // __builtin_ve_vl_pvbrvlo_vvl | ||
| 8697 | .{ .tag = @enumFromInt(1778), .param_str = "V256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8698 | // __builtin_ve_vl_pvbrvlo_vvmvl | ||
| 8699 | .{ .tag = @enumFromInt(1779), .param_str = "V256dV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8700 | // __builtin_ve_vl_pvbrvlo_vvvl | ||
| 8701 | .{ .tag = @enumFromInt(1780), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8702 | // __builtin_ve_vl_pvbrvup_vvl | ||
| 8703 | .{ .tag = @enumFromInt(1781), .param_str = "V256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8704 | // __builtin_ve_vl_pvbrvup_vvmvl | ||
| 8705 | .{ .tag = @enumFromInt(1782), .param_str = "V256dV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8706 | // __builtin_ve_vl_pvbrvup_vvvl | ||
| 8707 | .{ .tag = @enumFromInt(1783), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8708 | // __builtin_ve_vl_pvcmps_vsvMvl | ||
| 8709 | .{ .tag = @enumFromInt(1784), .param_str = "V256dLUiV256dV512bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8710 | // __builtin_ve_vl_pvcmps_vsvl | ||
| 8711 | .{ .tag = @enumFromInt(1785), .param_str = "V256dLUiV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8712 | // __builtin_ve_vl_pvcmps_vsvvl | ||
| 8713 | .{ .tag = @enumFromInt(1786), .param_str = "V256dLUiV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8714 | // __builtin_ve_vl_pvcmps_vvvMvl | ||
| 8715 | .{ .tag = @enumFromInt(1787), .param_str = "V256dV256dV256dV512bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8716 | // __builtin_ve_vl_pvcmps_vvvl | ||
| 8717 | .{ .tag = @enumFromInt(1788), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8718 | // __builtin_ve_vl_pvcmps_vvvvl | ||
| 8719 | .{ .tag = @enumFromInt(1789), .param_str = "V256dV256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8720 | // __builtin_ve_vl_pvcmpu_vsvMvl | ||
| 8721 | .{ .tag = @enumFromInt(1790), .param_str = "V256dLUiV256dV512bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8722 | // __builtin_ve_vl_pvcmpu_vsvl | ||
| 8723 | .{ .tag = @enumFromInt(1791), .param_str = "V256dLUiV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8724 | // __builtin_ve_vl_pvcmpu_vsvvl | ||
| 8725 | .{ .tag = @enumFromInt(1792), .param_str = "V256dLUiV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8726 | // __builtin_ve_vl_pvcmpu_vvvMvl | ||
| 8727 | .{ .tag = @enumFromInt(1793), .param_str = "V256dV256dV256dV512bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8728 | // __builtin_ve_vl_pvcmpu_vvvl | ||
| 8729 | .{ .tag = @enumFromInt(1794), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8730 | // __builtin_ve_vl_pvcmpu_vvvvl | ||
| 8731 | .{ .tag = @enumFromInt(1795), .param_str = "V256dV256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8732 | // __builtin_ve_vl_pvcvtsw_vvl | ||
| 8733 | .{ .tag = @enumFromInt(1796), .param_str = "V256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8734 | // __builtin_ve_vl_pvcvtsw_vvvl | ||
| 8735 | .{ .tag = @enumFromInt(1797), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8736 | // __builtin_ve_vl_pvcvtws_vvMvl | ||
| 8737 | .{ .tag = @enumFromInt(1798), .param_str = "V256dV256dV512bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8738 | // __builtin_ve_vl_pvcvtws_vvl | ||
| 8739 | .{ .tag = @enumFromInt(1799), .param_str = "V256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8740 | // __builtin_ve_vl_pvcvtws_vvvl | ||
| 8741 | .{ .tag = @enumFromInt(1800), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8742 | // __builtin_ve_vl_pvcvtwsrz_vvMvl | ||
| 8743 | .{ .tag = @enumFromInt(1801), .param_str = "V256dV256dV512bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8744 | // __builtin_ve_vl_pvcvtwsrz_vvl | ||
| 8745 | .{ .tag = @enumFromInt(1802), .param_str = "V256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8746 | // __builtin_ve_vl_pvcvtwsrz_vvvl | ||
| 8747 | .{ .tag = @enumFromInt(1803), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8748 | // __builtin_ve_vl_pveqv_vsvMvl | ||
| 8749 | .{ .tag = @enumFromInt(1804), .param_str = "V256dLUiV256dV512bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8750 | // __builtin_ve_vl_pveqv_vsvl | ||
| 8751 | .{ .tag = @enumFromInt(1805), .param_str = "V256dLUiV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8752 | // __builtin_ve_vl_pveqv_vsvvl | ||
| 8753 | .{ .tag = @enumFromInt(1806), .param_str = "V256dLUiV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8754 | // __builtin_ve_vl_pveqv_vvvMvl | ||
| 8755 | .{ .tag = @enumFromInt(1807), .param_str = "V256dV256dV256dV512bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8756 | // __builtin_ve_vl_pveqv_vvvl | ||
| 8757 | .{ .tag = @enumFromInt(1808), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8758 | // __builtin_ve_vl_pveqv_vvvvl | ||
| 8759 | .{ .tag = @enumFromInt(1809), .param_str = "V256dV256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8760 | // __builtin_ve_vl_pvfadd_vsvMvl | ||
| 8761 | .{ .tag = @enumFromInt(1810), .param_str = "V256dLUiV256dV512bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8762 | // __builtin_ve_vl_pvfadd_vsvl | ||
| 8763 | .{ .tag = @enumFromInt(1811), .param_str = "V256dLUiV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8764 | // __builtin_ve_vl_pvfadd_vsvvl | ||
| 8765 | .{ .tag = @enumFromInt(1812), .param_str = "V256dLUiV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8766 | // __builtin_ve_vl_pvfadd_vvvMvl | ||
| 8767 | .{ .tag = @enumFromInt(1813), .param_str = "V256dV256dV256dV512bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8768 | // __builtin_ve_vl_pvfadd_vvvl | ||
| 8769 | .{ .tag = @enumFromInt(1814), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8770 | // __builtin_ve_vl_pvfadd_vvvvl | ||
| 8771 | .{ .tag = @enumFromInt(1815), .param_str = "V256dV256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8772 | // __builtin_ve_vl_pvfcmp_vsvMvl | ||
| 8773 | .{ .tag = @enumFromInt(1816), .param_str = "V256dLUiV256dV512bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8774 | // __builtin_ve_vl_pvfcmp_vsvl | ||
| 8775 | .{ .tag = @enumFromInt(1817), .param_str = "V256dLUiV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8776 | // __builtin_ve_vl_pvfcmp_vsvvl | ||
| 8777 | .{ .tag = @enumFromInt(1818), .param_str = "V256dLUiV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8778 | // __builtin_ve_vl_pvfcmp_vvvMvl | ||
| 8779 | .{ .tag = @enumFromInt(1819), .param_str = "V256dV256dV256dV512bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8780 | // __builtin_ve_vl_pvfcmp_vvvl | ||
| 8781 | .{ .tag = @enumFromInt(1820), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8782 | // __builtin_ve_vl_pvfcmp_vvvvl | ||
| 8783 | .{ .tag = @enumFromInt(1821), .param_str = "V256dV256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8784 | // __builtin_ve_vl_pvfmad_vsvvMvl | ||
| 8785 | .{ .tag = @enumFromInt(1822), .param_str = "V256dLUiV256dV256dV512bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8786 | // __builtin_ve_vl_pvfmad_vsvvl | ||
| 8787 | .{ .tag = @enumFromInt(1823), .param_str = "V256dLUiV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8788 | // __builtin_ve_vl_pvfmad_vsvvvl | ||
| 8789 | .{ .tag = @enumFromInt(1824), .param_str = "V256dLUiV256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8790 | // __builtin_ve_vl_pvfmad_vvsvMvl | ||
| 8791 | .{ .tag = @enumFromInt(1825), .param_str = "V256dV256dLUiV256dV512bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8792 | // __builtin_ve_vl_pvfmad_vvsvl | ||
| 8793 | .{ .tag = @enumFromInt(1826), .param_str = "V256dV256dLUiV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8794 | // __builtin_ve_vl_pvfmad_vvsvvl | ||
| 8795 | .{ .tag = @enumFromInt(1827), .param_str = "V256dV256dLUiV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8796 | // __builtin_ve_vl_pvfmad_vvvvMvl | ||
| 8797 | .{ .tag = @enumFromInt(1828), .param_str = "V256dV256dV256dV256dV512bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8798 | // __builtin_ve_vl_pvfmad_vvvvl | ||
| 8799 | .{ .tag = @enumFromInt(1829), .param_str = "V256dV256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8800 | // __builtin_ve_vl_pvfmad_vvvvvl | ||
| 8801 | .{ .tag = @enumFromInt(1830), .param_str = "V256dV256dV256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8802 | // __builtin_ve_vl_pvfmax_vsvMvl | ||
| 8803 | .{ .tag = @enumFromInt(1831), .param_str = "V256dLUiV256dV512bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8804 | // __builtin_ve_vl_pvfmax_vsvl | ||
| 8805 | .{ .tag = @enumFromInt(1832), .param_str = "V256dLUiV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8806 | // __builtin_ve_vl_pvfmax_vsvvl | ||
| 8807 | .{ .tag = @enumFromInt(1833), .param_str = "V256dLUiV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8808 | // __builtin_ve_vl_pvfmax_vvvMvl | ||
| 8809 | .{ .tag = @enumFromInt(1834), .param_str = "V256dV256dV256dV512bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8810 | // __builtin_ve_vl_pvfmax_vvvl | ||
| 8811 | .{ .tag = @enumFromInt(1835), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8812 | // __builtin_ve_vl_pvfmax_vvvvl | ||
| 8813 | .{ .tag = @enumFromInt(1836), .param_str = "V256dV256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8814 | // __builtin_ve_vl_pvfmin_vsvMvl | ||
| 8815 | .{ .tag = @enumFromInt(1837), .param_str = "V256dLUiV256dV512bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8816 | // __builtin_ve_vl_pvfmin_vsvl | ||
| 8817 | .{ .tag = @enumFromInt(1838), .param_str = "V256dLUiV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8818 | // __builtin_ve_vl_pvfmin_vsvvl | ||
| 8819 | .{ .tag = @enumFromInt(1839), .param_str = "V256dLUiV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8820 | // __builtin_ve_vl_pvfmin_vvvMvl | ||
| 8821 | .{ .tag = @enumFromInt(1840), .param_str = "V256dV256dV256dV512bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8822 | // __builtin_ve_vl_pvfmin_vvvl | ||
| 8823 | .{ .tag = @enumFromInt(1841), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8824 | // __builtin_ve_vl_pvfmin_vvvvl | ||
| 8825 | .{ .tag = @enumFromInt(1842), .param_str = "V256dV256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8826 | // __builtin_ve_vl_pvfmkaf_Ml | ||
| 8827 | .{ .tag = @enumFromInt(1843), .param_str = "V512bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8828 | // __builtin_ve_vl_pvfmkat_Ml | ||
| 8829 | .{ .tag = @enumFromInt(1844), .param_str = "V512bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8830 | // __builtin_ve_vl_pvfmkseq_MvMl | ||
| 8831 | .{ .tag = @enumFromInt(1845), .param_str = "V512bV256dV512bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8832 | // __builtin_ve_vl_pvfmkseq_Mvl | ||
| 8833 | .{ .tag = @enumFromInt(1846), .param_str = "V512bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8834 | // __builtin_ve_vl_pvfmkseqnan_MvMl | ||
| 8835 | .{ .tag = @enumFromInt(1847), .param_str = "V512bV256dV512bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8836 | // __builtin_ve_vl_pvfmkseqnan_Mvl | ||
| 8837 | .{ .tag = @enumFromInt(1848), .param_str = "V512bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8838 | // __builtin_ve_vl_pvfmksge_MvMl | ||
| 8839 | .{ .tag = @enumFromInt(1849), .param_str = "V512bV256dV512bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8840 | // __builtin_ve_vl_pvfmksge_Mvl | ||
| 8841 | .{ .tag = @enumFromInt(1850), .param_str = "V512bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8842 | // __builtin_ve_vl_pvfmksgenan_MvMl | ||
| 8843 | .{ .tag = @enumFromInt(1851), .param_str = "V512bV256dV512bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8844 | // __builtin_ve_vl_pvfmksgenan_Mvl | ||
| 8845 | .{ .tag = @enumFromInt(1852), .param_str = "V512bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8846 | // __builtin_ve_vl_pvfmksgt_MvMl | ||
| 8847 | .{ .tag = @enumFromInt(1853), .param_str = "V512bV256dV512bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8848 | // __builtin_ve_vl_pvfmksgt_Mvl | ||
| 8849 | .{ .tag = @enumFromInt(1854), .param_str = "V512bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8850 | // __builtin_ve_vl_pvfmksgtnan_MvMl | ||
| 8851 | .{ .tag = @enumFromInt(1855), .param_str = "V512bV256dV512bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8852 | // __builtin_ve_vl_pvfmksgtnan_Mvl | ||
| 8853 | .{ .tag = @enumFromInt(1856), .param_str = "V512bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8854 | // __builtin_ve_vl_pvfmksle_MvMl | ||
| 8855 | .{ .tag = @enumFromInt(1857), .param_str = "V512bV256dV512bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8856 | // __builtin_ve_vl_pvfmksle_Mvl | ||
| 8857 | .{ .tag = @enumFromInt(1858), .param_str = "V512bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8858 | // __builtin_ve_vl_pvfmkslenan_MvMl | ||
| 8859 | .{ .tag = @enumFromInt(1859), .param_str = "V512bV256dV512bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8860 | // __builtin_ve_vl_pvfmkslenan_Mvl | ||
| 8861 | .{ .tag = @enumFromInt(1860), .param_str = "V512bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8862 | // __builtin_ve_vl_pvfmksloeq_mvl | ||
| 8863 | .{ .tag = @enumFromInt(1861), .param_str = "V256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8864 | // __builtin_ve_vl_pvfmksloeq_mvml | ||
| 8865 | .{ .tag = @enumFromInt(1862), .param_str = "V256bV256dV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8866 | // __builtin_ve_vl_pvfmksloeqnan_mvl | ||
| 8867 | .{ .tag = @enumFromInt(1863), .param_str = "V256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8868 | // __builtin_ve_vl_pvfmksloeqnan_mvml | ||
| 8869 | .{ .tag = @enumFromInt(1864), .param_str = "V256bV256dV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8870 | // __builtin_ve_vl_pvfmksloge_mvl | ||
| 8871 | .{ .tag = @enumFromInt(1865), .param_str = "V256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8872 | // __builtin_ve_vl_pvfmksloge_mvml | ||
| 8873 | .{ .tag = @enumFromInt(1866), .param_str = "V256bV256dV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8874 | // __builtin_ve_vl_pvfmkslogenan_mvl | ||
| 8875 | .{ .tag = @enumFromInt(1867), .param_str = "V256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8876 | // __builtin_ve_vl_pvfmkslogenan_mvml | ||
| 8877 | .{ .tag = @enumFromInt(1868), .param_str = "V256bV256dV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8878 | // __builtin_ve_vl_pvfmkslogt_mvl | ||
| 8879 | .{ .tag = @enumFromInt(1869), .param_str = "V256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8880 | // __builtin_ve_vl_pvfmkslogt_mvml | ||
| 8881 | .{ .tag = @enumFromInt(1870), .param_str = "V256bV256dV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8882 | // __builtin_ve_vl_pvfmkslogtnan_mvl | ||
| 8883 | .{ .tag = @enumFromInt(1871), .param_str = "V256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8884 | // __builtin_ve_vl_pvfmkslogtnan_mvml | ||
| 8885 | .{ .tag = @enumFromInt(1872), .param_str = "V256bV256dV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8886 | // __builtin_ve_vl_pvfmkslole_mvl | ||
| 8887 | .{ .tag = @enumFromInt(1873), .param_str = "V256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8888 | // __builtin_ve_vl_pvfmkslole_mvml | ||
| 8889 | .{ .tag = @enumFromInt(1874), .param_str = "V256bV256dV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8890 | // __builtin_ve_vl_pvfmkslolenan_mvl | ||
| 8891 | .{ .tag = @enumFromInt(1875), .param_str = "V256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8892 | // __builtin_ve_vl_pvfmkslolenan_mvml | ||
| 8893 | .{ .tag = @enumFromInt(1876), .param_str = "V256bV256dV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8894 | // __builtin_ve_vl_pvfmkslolt_mvl | ||
| 8895 | .{ .tag = @enumFromInt(1877), .param_str = "V256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8896 | // __builtin_ve_vl_pvfmkslolt_mvml | ||
| 8897 | .{ .tag = @enumFromInt(1878), .param_str = "V256bV256dV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8898 | // __builtin_ve_vl_pvfmksloltnan_mvl | ||
| 8899 | .{ .tag = @enumFromInt(1879), .param_str = "V256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8900 | // __builtin_ve_vl_pvfmksloltnan_mvml | ||
| 8901 | .{ .tag = @enumFromInt(1880), .param_str = "V256bV256dV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8902 | // __builtin_ve_vl_pvfmkslonan_mvl | ||
| 8903 | .{ .tag = @enumFromInt(1881), .param_str = "V256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8904 | // __builtin_ve_vl_pvfmkslonan_mvml | ||
| 8905 | .{ .tag = @enumFromInt(1882), .param_str = "V256bV256dV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8906 | // __builtin_ve_vl_pvfmkslone_mvl | ||
| 8907 | .{ .tag = @enumFromInt(1883), .param_str = "V256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8908 | // __builtin_ve_vl_pvfmkslone_mvml | ||
| 8909 | .{ .tag = @enumFromInt(1884), .param_str = "V256bV256dV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8910 | // __builtin_ve_vl_pvfmkslonenan_mvl | ||
| 8911 | .{ .tag = @enumFromInt(1885), .param_str = "V256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8912 | // __builtin_ve_vl_pvfmkslonenan_mvml | ||
| 8913 | .{ .tag = @enumFromInt(1886), .param_str = "V256bV256dV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8914 | // __builtin_ve_vl_pvfmkslonum_mvl | ||
| 8915 | .{ .tag = @enumFromInt(1887), .param_str = "V256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8916 | // __builtin_ve_vl_pvfmkslonum_mvml | ||
| 8917 | .{ .tag = @enumFromInt(1888), .param_str = "V256bV256dV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8918 | // __builtin_ve_vl_pvfmkslt_MvMl | ||
| 8919 | .{ .tag = @enumFromInt(1889), .param_str = "V512bV256dV512bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8920 | // __builtin_ve_vl_pvfmkslt_Mvl | ||
| 8921 | .{ .tag = @enumFromInt(1890), .param_str = "V512bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8922 | // __builtin_ve_vl_pvfmksltnan_MvMl | ||
| 8923 | .{ .tag = @enumFromInt(1891), .param_str = "V512bV256dV512bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8924 | // __builtin_ve_vl_pvfmksltnan_Mvl | ||
| 8925 | .{ .tag = @enumFromInt(1892), .param_str = "V512bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8926 | // __builtin_ve_vl_pvfmksnan_MvMl | ||
| 8927 | .{ .tag = @enumFromInt(1893), .param_str = "V512bV256dV512bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8928 | // __builtin_ve_vl_pvfmksnan_Mvl | ||
| 8929 | .{ .tag = @enumFromInt(1894), .param_str = "V512bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8930 | // __builtin_ve_vl_pvfmksne_MvMl | ||
| 8931 | .{ .tag = @enumFromInt(1895), .param_str = "V512bV256dV512bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8932 | // __builtin_ve_vl_pvfmksne_Mvl | ||
| 8933 | .{ .tag = @enumFromInt(1896), .param_str = "V512bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8934 | // __builtin_ve_vl_pvfmksnenan_MvMl | ||
| 8935 | .{ .tag = @enumFromInt(1897), .param_str = "V512bV256dV512bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8936 | // __builtin_ve_vl_pvfmksnenan_Mvl | ||
| 8937 | .{ .tag = @enumFromInt(1898), .param_str = "V512bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8938 | // __builtin_ve_vl_pvfmksnum_MvMl | ||
| 8939 | .{ .tag = @enumFromInt(1899), .param_str = "V512bV256dV512bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8940 | // __builtin_ve_vl_pvfmksnum_Mvl | ||
| 8941 | .{ .tag = @enumFromInt(1900), .param_str = "V512bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8942 | // __builtin_ve_vl_pvfmksupeq_mvl | ||
| 8943 | .{ .tag = @enumFromInt(1901), .param_str = "V256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8944 | // __builtin_ve_vl_pvfmksupeq_mvml | ||
| 8945 | .{ .tag = @enumFromInt(1902), .param_str = "V256bV256dV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8946 | // __builtin_ve_vl_pvfmksupeqnan_mvl | ||
| 8947 | .{ .tag = @enumFromInt(1903), .param_str = "V256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8948 | // __builtin_ve_vl_pvfmksupeqnan_mvml | ||
| 8949 | .{ .tag = @enumFromInt(1904), .param_str = "V256bV256dV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8950 | // __builtin_ve_vl_pvfmksupge_mvl | ||
| 8951 | .{ .tag = @enumFromInt(1905), .param_str = "V256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8952 | // __builtin_ve_vl_pvfmksupge_mvml | ||
| 8953 | .{ .tag = @enumFromInt(1906), .param_str = "V256bV256dV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8954 | // __builtin_ve_vl_pvfmksupgenan_mvl | ||
| 8955 | .{ .tag = @enumFromInt(1907), .param_str = "V256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8956 | // __builtin_ve_vl_pvfmksupgenan_mvml | ||
| 8957 | .{ .tag = @enumFromInt(1908), .param_str = "V256bV256dV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8958 | // __builtin_ve_vl_pvfmksupgt_mvl | ||
| 8959 | .{ .tag = @enumFromInt(1909), .param_str = "V256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8960 | // __builtin_ve_vl_pvfmksupgt_mvml | ||
| 8961 | .{ .tag = @enumFromInt(1910), .param_str = "V256bV256dV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8962 | // __builtin_ve_vl_pvfmksupgtnan_mvl | ||
| 8963 | .{ .tag = @enumFromInt(1911), .param_str = "V256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8964 | // __builtin_ve_vl_pvfmksupgtnan_mvml | ||
| 8965 | .{ .tag = @enumFromInt(1912), .param_str = "V256bV256dV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8966 | // __builtin_ve_vl_pvfmksuple_mvl | ||
| 8967 | .{ .tag = @enumFromInt(1913), .param_str = "V256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8968 | // __builtin_ve_vl_pvfmksuple_mvml | ||
| 8969 | .{ .tag = @enumFromInt(1914), .param_str = "V256bV256dV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8970 | // __builtin_ve_vl_pvfmksuplenan_mvl | ||
| 8971 | .{ .tag = @enumFromInt(1915), .param_str = "V256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8972 | // __builtin_ve_vl_pvfmksuplenan_mvml | ||
| 8973 | .{ .tag = @enumFromInt(1916), .param_str = "V256bV256dV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8974 | // __builtin_ve_vl_pvfmksuplt_mvl | ||
| 8975 | .{ .tag = @enumFromInt(1917), .param_str = "V256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8976 | // __builtin_ve_vl_pvfmksuplt_mvml | ||
| 8977 | .{ .tag = @enumFromInt(1918), .param_str = "V256bV256dV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8978 | // __builtin_ve_vl_pvfmksupltnan_mvl | ||
| 8979 | .{ .tag = @enumFromInt(1919), .param_str = "V256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8980 | // __builtin_ve_vl_pvfmksupltnan_mvml | ||
| 8981 | .{ .tag = @enumFromInt(1920), .param_str = "V256bV256dV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8982 | // __builtin_ve_vl_pvfmksupnan_mvl | ||
| 8983 | .{ .tag = @enumFromInt(1921), .param_str = "V256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8984 | // __builtin_ve_vl_pvfmksupnan_mvml | ||
| 8985 | .{ .tag = @enumFromInt(1922), .param_str = "V256bV256dV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8986 | // __builtin_ve_vl_pvfmksupne_mvl | ||
| 8987 | .{ .tag = @enumFromInt(1923), .param_str = "V256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8988 | // __builtin_ve_vl_pvfmksupne_mvml | ||
| 8989 | .{ .tag = @enumFromInt(1924), .param_str = "V256bV256dV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8990 | // __builtin_ve_vl_pvfmksupnenan_mvl | ||
| 8991 | .{ .tag = @enumFromInt(1925), .param_str = "V256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8992 | // __builtin_ve_vl_pvfmksupnenan_mvml | ||
| 8993 | .{ .tag = @enumFromInt(1926), .param_str = "V256bV256dV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8994 | // __builtin_ve_vl_pvfmksupnum_mvl | ||
| 8995 | .{ .tag = @enumFromInt(1927), .param_str = "V256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8996 | // __builtin_ve_vl_pvfmksupnum_mvml | ||
| 8997 | .{ .tag = @enumFromInt(1928), .param_str = "V256bV256dV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 8998 | // __builtin_ve_vl_pvfmkweq_MvMl | ||
| 8999 | .{ .tag = @enumFromInt(1929), .param_str = "V512bV256dV512bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9000 | // __builtin_ve_vl_pvfmkweq_Mvl | ||
| 9001 | .{ .tag = @enumFromInt(1930), .param_str = "V512bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9002 | // __builtin_ve_vl_pvfmkweqnan_MvMl | ||
| 9003 | .{ .tag = @enumFromInt(1931), .param_str = "V512bV256dV512bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9004 | // __builtin_ve_vl_pvfmkweqnan_Mvl | ||
| 9005 | .{ .tag = @enumFromInt(1932), .param_str = "V512bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9006 | // __builtin_ve_vl_pvfmkwge_MvMl | ||
| 9007 | .{ .tag = @enumFromInt(1933), .param_str = "V512bV256dV512bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9008 | // __builtin_ve_vl_pvfmkwge_Mvl | ||
| 9009 | .{ .tag = @enumFromInt(1934), .param_str = "V512bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9010 | // __builtin_ve_vl_pvfmkwgenan_MvMl | ||
| 9011 | .{ .tag = @enumFromInt(1935), .param_str = "V512bV256dV512bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9012 | // __builtin_ve_vl_pvfmkwgenan_Mvl | ||
| 9013 | .{ .tag = @enumFromInt(1936), .param_str = "V512bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9014 | // __builtin_ve_vl_pvfmkwgt_MvMl | ||
| 9015 | .{ .tag = @enumFromInt(1937), .param_str = "V512bV256dV512bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9016 | // __builtin_ve_vl_pvfmkwgt_Mvl | ||
| 9017 | .{ .tag = @enumFromInt(1938), .param_str = "V512bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9018 | // __builtin_ve_vl_pvfmkwgtnan_MvMl | ||
| 9019 | .{ .tag = @enumFromInt(1939), .param_str = "V512bV256dV512bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9020 | // __builtin_ve_vl_pvfmkwgtnan_Mvl | ||
| 9021 | .{ .tag = @enumFromInt(1940), .param_str = "V512bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9022 | // __builtin_ve_vl_pvfmkwle_MvMl | ||
| 9023 | .{ .tag = @enumFromInt(1941), .param_str = "V512bV256dV512bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9024 | // __builtin_ve_vl_pvfmkwle_Mvl | ||
| 9025 | .{ .tag = @enumFromInt(1942), .param_str = "V512bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9026 | // __builtin_ve_vl_pvfmkwlenan_MvMl | ||
| 9027 | .{ .tag = @enumFromInt(1943), .param_str = "V512bV256dV512bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9028 | // __builtin_ve_vl_pvfmkwlenan_Mvl | ||
| 9029 | .{ .tag = @enumFromInt(1944), .param_str = "V512bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9030 | // __builtin_ve_vl_pvfmkwloeq_mvl | ||
| 9031 | .{ .tag = @enumFromInt(1945), .param_str = "V256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9032 | // __builtin_ve_vl_pvfmkwloeq_mvml | ||
| 9033 | .{ .tag = @enumFromInt(1946), .param_str = "V256bV256dV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9034 | // __builtin_ve_vl_pvfmkwloeqnan_mvl | ||
| 9035 | .{ .tag = @enumFromInt(1947), .param_str = "V256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9036 | // __builtin_ve_vl_pvfmkwloeqnan_mvml | ||
| 9037 | .{ .tag = @enumFromInt(1948), .param_str = "V256bV256dV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9038 | // __builtin_ve_vl_pvfmkwloge_mvl | ||
| 9039 | .{ .tag = @enumFromInt(1949), .param_str = "V256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9040 | // __builtin_ve_vl_pvfmkwloge_mvml | ||
| 9041 | .{ .tag = @enumFromInt(1950), .param_str = "V256bV256dV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9042 | // __builtin_ve_vl_pvfmkwlogenan_mvl | ||
| 9043 | .{ .tag = @enumFromInt(1951), .param_str = "V256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9044 | // __builtin_ve_vl_pvfmkwlogenan_mvml | ||
| 9045 | .{ .tag = @enumFromInt(1952), .param_str = "V256bV256dV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9046 | // __builtin_ve_vl_pvfmkwlogt_mvl | ||
| 9047 | .{ .tag = @enumFromInt(1953), .param_str = "V256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9048 | // __builtin_ve_vl_pvfmkwlogt_mvml | ||
| 9049 | .{ .tag = @enumFromInt(1954), .param_str = "V256bV256dV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9050 | // __builtin_ve_vl_pvfmkwlogtnan_mvl | ||
| 9051 | .{ .tag = @enumFromInt(1955), .param_str = "V256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9052 | // __builtin_ve_vl_pvfmkwlogtnan_mvml | ||
| 9053 | .{ .tag = @enumFromInt(1956), .param_str = "V256bV256dV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9054 | // __builtin_ve_vl_pvfmkwlole_mvl | ||
| 9055 | .{ .tag = @enumFromInt(1957), .param_str = "V256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9056 | // __builtin_ve_vl_pvfmkwlole_mvml | ||
| 9057 | .{ .tag = @enumFromInt(1958), .param_str = "V256bV256dV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9058 | // __builtin_ve_vl_pvfmkwlolenan_mvl | ||
| 9059 | .{ .tag = @enumFromInt(1959), .param_str = "V256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9060 | // __builtin_ve_vl_pvfmkwlolenan_mvml | ||
| 9061 | .{ .tag = @enumFromInt(1960), .param_str = "V256bV256dV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9062 | // __builtin_ve_vl_pvfmkwlolt_mvl | ||
| 9063 | .{ .tag = @enumFromInt(1961), .param_str = "V256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9064 | // __builtin_ve_vl_pvfmkwlolt_mvml | ||
| 9065 | .{ .tag = @enumFromInt(1962), .param_str = "V256bV256dV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9066 | // __builtin_ve_vl_pvfmkwloltnan_mvl | ||
| 9067 | .{ .tag = @enumFromInt(1963), .param_str = "V256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9068 | // __builtin_ve_vl_pvfmkwloltnan_mvml | ||
| 9069 | .{ .tag = @enumFromInt(1964), .param_str = "V256bV256dV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9070 | // __builtin_ve_vl_pvfmkwlonan_mvl | ||
| 9071 | .{ .tag = @enumFromInt(1965), .param_str = "V256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9072 | // __builtin_ve_vl_pvfmkwlonan_mvml | ||
| 9073 | .{ .tag = @enumFromInt(1966), .param_str = "V256bV256dV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9074 | // __builtin_ve_vl_pvfmkwlone_mvl | ||
| 9075 | .{ .tag = @enumFromInt(1967), .param_str = "V256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9076 | // __builtin_ve_vl_pvfmkwlone_mvml | ||
| 9077 | .{ .tag = @enumFromInt(1968), .param_str = "V256bV256dV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9078 | // __builtin_ve_vl_pvfmkwlonenan_mvl | ||
| 9079 | .{ .tag = @enumFromInt(1969), .param_str = "V256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9080 | // __builtin_ve_vl_pvfmkwlonenan_mvml | ||
| 9081 | .{ .tag = @enumFromInt(1970), .param_str = "V256bV256dV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9082 | // __builtin_ve_vl_pvfmkwlonum_mvl | ||
| 9083 | .{ .tag = @enumFromInt(1971), .param_str = "V256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9084 | // __builtin_ve_vl_pvfmkwlonum_mvml | ||
| 9085 | .{ .tag = @enumFromInt(1972), .param_str = "V256bV256dV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9086 | // __builtin_ve_vl_pvfmkwlt_MvMl | ||
| 9087 | .{ .tag = @enumFromInt(1973), .param_str = "V512bV256dV512bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9088 | // __builtin_ve_vl_pvfmkwlt_Mvl | ||
| 9089 | .{ .tag = @enumFromInt(1974), .param_str = "V512bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9090 | // __builtin_ve_vl_pvfmkwltnan_MvMl | ||
| 9091 | .{ .tag = @enumFromInt(1975), .param_str = "V512bV256dV512bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9092 | // __builtin_ve_vl_pvfmkwltnan_Mvl | ||
| 9093 | .{ .tag = @enumFromInt(1976), .param_str = "V512bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9094 | // __builtin_ve_vl_pvfmkwnan_MvMl | ||
| 9095 | .{ .tag = @enumFromInt(1977), .param_str = "V512bV256dV512bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9096 | // __builtin_ve_vl_pvfmkwnan_Mvl | ||
| 9097 | .{ .tag = @enumFromInt(1978), .param_str = "V512bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9098 | // __builtin_ve_vl_pvfmkwne_MvMl | ||
| 9099 | .{ .tag = @enumFromInt(1979), .param_str = "V512bV256dV512bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9100 | // __builtin_ve_vl_pvfmkwne_Mvl | ||
| 9101 | .{ .tag = @enumFromInt(1980), .param_str = "V512bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9102 | // __builtin_ve_vl_pvfmkwnenan_MvMl | ||
| 9103 | .{ .tag = @enumFromInt(1981), .param_str = "V512bV256dV512bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9104 | // __builtin_ve_vl_pvfmkwnenan_Mvl | ||
| 9105 | .{ .tag = @enumFromInt(1982), .param_str = "V512bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9106 | // __builtin_ve_vl_pvfmkwnum_MvMl | ||
| 9107 | .{ .tag = @enumFromInt(1983), .param_str = "V512bV256dV512bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9108 | // __builtin_ve_vl_pvfmkwnum_Mvl | ||
| 9109 | .{ .tag = @enumFromInt(1984), .param_str = "V512bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9110 | // __builtin_ve_vl_pvfmkwupeq_mvl | ||
| 9111 | .{ .tag = @enumFromInt(1985), .param_str = "V256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9112 | // __builtin_ve_vl_pvfmkwupeq_mvml | ||
| 9113 | .{ .tag = @enumFromInt(1986), .param_str = "V256bV256dV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9114 | // __builtin_ve_vl_pvfmkwupeqnan_mvl | ||
| 9115 | .{ .tag = @enumFromInt(1987), .param_str = "V256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9116 | // __builtin_ve_vl_pvfmkwupeqnan_mvml | ||
| 9117 | .{ .tag = @enumFromInt(1988), .param_str = "V256bV256dV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9118 | // __builtin_ve_vl_pvfmkwupge_mvl | ||
| 9119 | .{ .tag = @enumFromInt(1989), .param_str = "V256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9120 | // __builtin_ve_vl_pvfmkwupge_mvml | ||
| 9121 | .{ .tag = @enumFromInt(1990), .param_str = "V256bV256dV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9122 | // __builtin_ve_vl_pvfmkwupgenan_mvl | ||
| 9123 | .{ .tag = @enumFromInt(1991), .param_str = "V256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9124 | // __builtin_ve_vl_pvfmkwupgenan_mvml | ||
| 9125 | .{ .tag = @enumFromInt(1992), .param_str = "V256bV256dV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9126 | // __builtin_ve_vl_pvfmkwupgt_mvl | ||
| 9127 | .{ .tag = @enumFromInt(1993), .param_str = "V256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9128 | // __builtin_ve_vl_pvfmkwupgt_mvml | ||
| 9129 | .{ .tag = @enumFromInt(1994), .param_str = "V256bV256dV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9130 | // __builtin_ve_vl_pvfmkwupgtnan_mvl | ||
| 9131 | .{ .tag = @enumFromInt(1995), .param_str = "V256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9132 | // __builtin_ve_vl_pvfmkwupgtnan_mvml | ||
| 9133 | .{ .tag = @enumFromInt(1996), .param_str = "V256bV256dV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9134 | // __builtin_ve_vl_pvfmkwuple_mvl | ||
| 9135 | .{ .tag = @enumFromInt(1997), .param_str = "V256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9136 | // __builtin_ve_vl_pvfmkwuple_mvml | ||
| 9137 | .{ .tag = @enumFromInt(1998), .param_str = "V256bV256dV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9138 | // __builtin_ve_vl_pvfmkwuplenan_mvl | ||
| 9139 | .{ .tag = @enumFromInt(1999), .param_str = "V256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9140 | // __builtin_ve_vl_pvfmkwuplenan_mvml | ||
| 9141 | .{ .tag = @enumFromInt(2000), .param_str = "V256bV256dV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9142 | // __builtin_ve_vl_pvfmkwuplt_mvl | ||
| 9143 | .{ .tag = @enumFromInt(2001), .param_str = "V256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9144 | // __builtin_ve_vl_pvfmkwuplt_mvml | ||
| 9145 | .{ .tag = @enumFromInt(2002), .param_str = "V256bV256dV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9146 | // __builtin_ve_vl_pvfmkwupltnan_mvl | ||
| 9147 | .{ .tag = @enumFromInt(2003), .param_str = "V256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9148 | // __builtin_ve_vl_pvfmkwupltnan_mvml | ||
| 9149 | .{ .tag = @enumFromInt(2004), .param_str = "V256bV256dV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9150 | // __builtin_ve_vl_pvfmkwupnan_mvl | ||
| 9151 | .{ .tag = @enumFromInt(2005), .param_str = "V256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9152 | // __builtin_ve_vl_pvfmkwupnan_mvml | ||
| 9153 | .{ .tag = @enumFromInt(2006), .param_str = "V256bV256dV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9154 | // __builtin_ve_vl_pvfmkwupne_mvl | ||
| 9155 | .{ .tag = @enumFromInt(2007), .param_str = "V256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9156 | // __builtin_ve_vl_pvfmkwupne_mvml | ||
| 9157 | .{ .tag = @enumFromInt(2008), .param_str = "V256bV256dV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9158 | // __builtin_ve_vl_pvfmkwupnenan_mvl | ||
| 9159 | .{ .tag = @enumFromInt(2009), .param_str = "V256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9160 | // __builtin_ve_vl_pvfmkwupnenan_mvml | ||
| 9161 | .{ .tag = @enumFromInt(2010), .param_str = "V256bV256dV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9162 | // __builtin_ve_vl_pvfmkwupnum_mvl | ||
| 9163 | .{ .tag = @enumFromInt(2011), .param_str = "V256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9164 | // __builtin_ve_vl_pvfmkwupnum_mvml | ||
| 9165 | .{ .tag = @enumFromInt(2012), .param_str = "V256bV256dV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9166 | // __builtin_ve_vl_pvfmsb_vsvvMvl | ||
| 9167 | .{ .tag = @enumFromInt(2013), .param_str = "V256dLUiV256dV256dV512bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9168 | // __builtin_ve_vl_pvfmsb_vsvvl | ||
| 9169 | .{ .tag = @enumFromInt(2014), .param_str = "V256dLUiV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9170 | // __builtin_ve_vl_pvfmsb_vsvvvl | ||
| 9171 | .{ .tag = @enumFromInt(2015), .param_str = "V256dLUiV256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9172 | // __builtin_ve_vl_pvfmsb_vvsvMvl | ||
| 9173 | .{ .tag = @enumFromInt(2016), .param_str = "V256dV256dLUiV256dV512bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9174 | // __builtin_ve_vl_pvfmsb_vvsvl | ||
| 9175 | .{ .tag = @enumFromInt(2017), .param_str = "V256dV256dLUiV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9176 | // __builtin_ve_vl_pvfmsb_vvsvvl | ||
| 9177 | .{ .tag = @enumFromInt(2018), .param_str = "V256dV256dLUiV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9178 | // __builtin_ve_vl_pvfmsb_vvvvMvl | ||
| 9179 | .{ .tag = @enumFromInt(2019), .param_str = "V256dV256dV256dV256dV512bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9180 | // __builtin_ve_vl_pvfmsb_vvvvl | ||
| 9181 | .{ .tag = @enumFromInt(2020), .param_str = "V256dV256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9182 | // __builtin_ve_vl_pvfmsb_vvvvvl | ||
| 9183 | .{ .tag = @enumFromInt(2021), .param_str = "V256dV256dV256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9184 | // __builtin_ve_vl_pvfmul_vsvMvl | ||
| 9185 | .{ .tag = @enumFromInt(2022), .param_str = "V256dLUiV256dV512bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9186 | // __builtin_ve_vl_pvfmul_vsvl | ||
| 9187 | .{ .tag = @enumFromInt(2023), .param_str = "V256dLUiV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9188 | // __builtin_ve_vl_pvfmul_vsvvl | ||
| 9189 | .{ .tag = @enumFromInt(2024), .param_str = "V256dLUiV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9190 | // __builtin_ve_vl_pvfmul_vvvMvl | ||
| 9191 | .{ .tag = @enumFromInt(2025), .param_str = "V256dV256dV256dV512bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9192 | // __builtin_ve_vl_pvfmul_vvvl | ||
| 9193 | .{ .tag = @enumFromInt(2026), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9194 | // __builtin_ve_vl_pvfmul_vvvvl | ||
| 9195 | .{ .tag = @enumFromInt(2027), .param_str = "V256dV256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9196 | // __builtin_ve_vl_pvfnmad_vsvvMvl | ||
| 9197 | .{ .tag = @enumFromInt(2028), .param_str = "V256dLUiV256dV256dV512bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9198 | // __builtin_ve_vl_pvfnmad_vsvvl | ||
| 9199 | .{ .tag = @enumFromInt(2029), .param_str = "V256dLUiV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9200 | // __builtin_ve_vl_pvfnmad_vsvvvl | ||
| 9201 | .{ .tag = @enumFromInt(2030), .param_str = "V256dLUiV256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9202 | // __builtin_ve_vl_pvfnmad_vvsvMvl | ||
| 9203 | .{ .tag = @enumFromInt(2031), .param_str = "V256dV256dLUiV256dV512bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9204 | // __builtin_ve_vl_pvfnmad_vvsvl | ||
| 9205 | .{ .tag = @enumFromInt(2032), .param_str = "V256dV256dLUiV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9206 | // __builtin_ve_vl_pvfnmad_vvsvvl | ||
| 9207 | .{ .tag = @enumFromInt(2033), .param_str = "V256dV256dLUiV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9208 | // __builtin_ve_vl_pvfnmad_vvvvMvl | ||
| 9209 | .{ .tag = @enumFromInt(2034), .param_str = "V256dV256dV256dV256dV512bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9210 | // __builtin_ve_vl_pvfnmad_vvvvl | ||
| 9211 | .{ .tag = @enumFromInt(2035), .param_str = "V256dV256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9212 | // __builtin_ve_vl_pvfnmad_vvvvvl | ||
| 9213 | .{ .tag = @enumFromInt(2036), .param_str = "V256dV256dV256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9214 | // __builtin_ve_vl_pvfnmsb_vsvvMvl | ||
| 9215 | .{ .tag = @enumFromInt(2037), .param_str = "V256dLUiV256dV256dV512bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9216 | // __builtin_ve_vl_pvfnmsb_vsvvl | ||
| 9217 | .{ .tag = @enumFromInt(2038), .param_str = "V256dLUiV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9218 | // __builtin_ve_vl_pvfnmsb_vsvvvl | ||
| 9219 | .{ .tag = @enumFromInt(2039), .param_str = "V256dLUiV256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9220 | // __builtin_ve_vl_pvfnmsb_vvsvMvl | ||
| 9221 | .{ .tag = @enumFromInt(2040), .param_str = "V256dV256dLUiV256dV512bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9222 | // __builtin_ve_vl_pvfnmsb_vvsvl | ||
| 9223 | .{ .tag = @enumFromInt(2041), .param_str = "V256dV256dLUiV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9224 | // __builtin_ve_vl_pvfnmsb_vvsvvl | ||
| 9225 | .{ .tag = @enumFromInt(2042), .param_str = "V256dV256dLUiV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9226 | // __builtin_ve_vl_pvfnmsb_vvvvMvl | ||
| 9227 | .{ .tag = @enumFromInt(2043), .param_str = "V256dV256dV256dV256dV512bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9228 | // __builtin_ve_vl_pvfnmsb_vvvvl | ||
| 9229 | .{ .tag = @enumFromInt(2044), .param_str = "V256dV256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9230 | // __builtin_ve_vl_pvfnmsb_vvvvvl | ||
| 9231 | .{ .tag = @enumFromInt(2045), .param_str = "V256dV256dV256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9232 | // __builtin_ve_vl_pvfsub_vsvMvl | ||
| 9233 | .{ .tag = @enumFromInt(2046), .param_str = "V256dLUiV256dV512bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9234 | // __builtin_ve_vl_pvfsub_vsvl | ||
| 9235 | .{ .tag = @enumFromInt(2047), .param_str = "V256dLUiV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9236 | // __builtin_ve_vl_pvfsub_vsvvl | ||
| 9237 | .{ .tag = @enumFromInt(2048), .param_str = "V256dLUiV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9238 | // __builtin_ve_vl_pvfsub_vvvMvl | ||
| 9239 | .{ .tag = @enumFromInt(2049), .param_str = "V256dV256dV256dV512bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9240 | // __builtin_ve_vl_pvfsub_vvvl | ||
| 9241 | .{ .tag = @enumFromInt(2050), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9242 | // __builtin_ve_vl_pvfsub_vvvvl | ||
| 9243 | .{ .tag = @enumFromInt(2051), .param_str = "V256dV256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9244 | // __builtin_ve_vl_pvldz_vvMvl | ||
| 9245 | .{ .tag = @enumFromInt(2052), .param_str = "V256dV256dV512bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9246 | // __builtin_ve_vl_pvldz_vvl | ||
| 9247 | .{ .tag = @enumFromInt(2053), .param_str = "V256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9248 | // __builtin_ve_vl_pvldz_vvvl | ||
| 9249 | .{ .tag = @enumFromInt(2054), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9250 | // __builtin_ve_vl_pvldzlo_vvl | ||
| 9251 | .{ .tag = @enumFromInt(2055), .param_str = "V256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9252 | // __builtin_ve_vl_pvldzlo_vvmvl | ||
| 9253 | .{ .tag = @enumFromInt(2056), .param_str = "V256dV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9254 | // __builtin_ve_vl_pvldzlo_vvvl | ||
| 9255 | .{ .tag = @enumFromInt(2057), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9256 | // __builtin_ve_vl_pvldzup_vvl | ||
| 9257 | .{ .tag = @enumFromInt(2058), .param_str = "V256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9258 | // __builtin_ve_vl_pvldzup_vvmvl | ||
| 9259 | .{ .tag = @enumFromInt(2059), .param_str = "V256dV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9260 | // __builtin_ve_vl_pvldzup_vvvl | ||
| 9261 | .{ .tag = @enumFromInt(2060), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9262 | // __builtin_ve_vl_pvmaxs_vsvMvl | ||
| 9263 | .{ .tag = @enumFromInt(2061), .param_str = "V256dLUiV256dV512bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9264 | // __builtin_ve_vl_pvmaxs_vsvl | ||
| 9265 | .{ .tag = @enumFromInt(2062), .param_str = "V256dLUiV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9266 | // __builtin_ve_vl_pvmaxs_vsvvl | ||
| 9267 | .{ .tag = @enumFromInt(2063), .param_str = "V256dLUiV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9268 | // __builtin_ve_vl_pvmaxs_vvvMvl | ||
| 9269 | .{ .tag = @enumFromInt(2064), .param_str = "V256dV256dV256dV512bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9270 | // __builtin_ve_vl_pvmaxs_vvvl | ||
| 9271 | .{ .tag = @enumFromInt(2065), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9272 | // __builtin_ve_vl_pvmaxs_vvvvl | ||
| 9273 | .{ .tag = @enumFromInt(2066), .param_str = "V256dV256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9274 | // __builtin_ve_vl_pvmins_vsvMvl | ||
| 9275 | .{ .tag = @enumFromInt(2067), .param_str = "V256dLUiV256dV512bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9276 | // __builtin_ve_vl_pvmins_vsvl | ||
| 9277 | .{ .tag = @enumFromInt(2068), .param_str = "V256dLUiV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9278 | // __builtin_ve_vl_pvmins_vsvvl | ||
| 9279 | .{ .tag = @enumFromInt(2069), .param_str = "V256dLUiV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9280 | // __builtin_ve_vl_pvmins_vvvMvl | ||
| 9281 | .{ .tag = @enumFromInt(2070), .param_str = "V256dV256dV256dV512bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9282 | // __builtin_ve_vl_pvmins_vvvl | ||
| 9283 | .{ .tag = @enumFromInt(2071), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9284 | // __builtin_ve_vl_pvmins_vvvvl | ||
| 9285 | .{ .tag = @enumFromInt(2072), .param_str = "V256dV256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9286 | // __builtin_ve_vl_pvor_vsvMvl | ||
| 9287 | .{ .tag = @enumFromInt(2073), .param_str = "V256dLUiV256dV512bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9288 | // __builtin_ve_vl_pvor_vsvl | ||
| 9289 | .{ .tag = @enumFromInt(2074), .param_str = "V256dLUiV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9290 | // __builtin_ve_vl_pvor_vsvvl | ||
| 9291 | .{ .tag = @enumFromInt(2075), .param_str = "V256dLUiV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9292 | // __builtin_ve_vl_pvor_vvvMvl | ||
| 9293 | .{ .tag = @enumFromInt(2076), .param_str = "V256dV256dV256dV512bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9294 | // __builtin_ve_vl_pvor_vvvl | ||
| 9295 | .{ .tag = @enumFromInt(2077), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9296 | // __builtin_ve_vl_pvor_vvvvl | ||
| 9297 | .{ .tag = @enumFromInt(2078), .param_str = "V256dV256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9298 | // __builtin_ve_vl_pvpcnt_vvMvl | ||
| 9299 | .{ .tag = @enumFromInt(2079), .param_str = "V256dV256dV512bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9300 | // __builtin_ve_vl_pvpcnt_vvl | ||
| 9301 | .{ .tag = @enumFromInt(2080), .param_str = "V256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9302 | // __builtin_ve_vl_pvpcnt_vvvl | ||
| 9303 | .{ .tag = @enumFromInt(2081), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9304 | // __builtin_ve_vl_pvpcntlo_vvl | ||
| 9305 | .{ .tag = @enumFromInt(2082), .param_str = "V256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9306 | // __builtin_ve_vl_pvpcntlo_vvmvl | ||
| 9307 | .{ .tag = @enumFromInt(2083), .param_str = "V256dV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9308 | // __builtin_ve_vl_pvpcntlo_vvvl | ||
| 9309 | .{ .tag = @enumFromInt(2084), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9310 | // __builtin_ve_vl_pvpcntup_vvl | ||
| 9311 | .{ .tag = @enumFromInt(2085), .param_str = "V256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9312 | // __builtin_ve_vl_pvpcntup_vvmvl | ||
| 9313 | .{ .tag = @enumFromInt(2086), .param_str = "V256dV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9314 | // __builtin_ve_vl_pvpcntup_vvvl | ||
| 9315 | .{ .tag = @enumFromInt(2087), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9316 | // __builtin_ve_vl_pvrcp_vvl | ||
| 9317 | .{ .tag = @enumFromInt(2088), .param_str = "V256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9318 | // __builtin_ve_vl_pvrcp_vvvl | ||
| 9319 | .{ .tag = @enumFromInt(2089), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9320 | // __builtin_ve_vl_pvrsqrt_vvl | ||
| 9321 | .{ .tag = @enumFromInt(2090), .param_str = "V256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9322 | // __builtin_ve_vl_pvrsqrt_vvvl | ||
| 9323 | .{ .tag = @enumFromInt(2091), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9324 | // __builtin_ve_vl_pvrsqrtnex_vvl | ||
| 9325 | .{ .tag = @enumFromInt(2092), .param_str = "V256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9326 | // __builtin_ve_vl_pvrsqrtnex_vvvl | ||
| 9327 | .{ .tag = @enumFromInt(2093), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9328 | // __builtin_ve_vl_pvseq_vl | ||
| 9329 | .{ .tag = @enumFromInt(2094), .param_str = "V256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9330 | // __builtin_ve_vl_pvseq_vvl | ||
| 9331 | .{ .tag = @enumFromInt(2095), .param_str = "V256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9332 | // __builtin_ve_vl_pvseqlo_vl | ||
| 9333 | .{ .tag = @enumFromInt(2096), .param_str = "V256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9334 | // __builtin_ve_vl_pvseqlo_vvl | ||
| 9335 | .{ .tag = @enumFromInt(2097), .param_str = "V256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9336 | // __builtin_ve_vl_pvsequp_vl | ||
| 9337 | .{ .tag = @enumFromInt(2098), .param_str = "V256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9338 | // __builtin_ve_vl_pvsequp_vvl | ||
| 9339 | .{ .tag = @enumFromInt(2099), .param_str = "V256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9340 | // __builtin_ve_vl_pvsla_vvsMvl | ||
| 9341 | .{ .tag = @enumFromInt(2100), .param_str = "V256dV256dLUiV512bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9342 | // __builtin_ve_vl_pvsla_vvsl | ||
| 9343 | .{ .tag = @enumFromInt(2101), .param_str = "V256dV256dLUiUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9344 | // __builtin_ve_vl_pvsla_vvsvl | ||
| 9345 | .{ .tag = @enumFromInt(2102), .param_str = "V256dV256dLUiV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9346 | // __builtin_ve_vl_pvsla_vvvMvl | ||
| 9347 | .{ .tag = @enumFromInt(2103), .param_str = "V256dV256dV256dV512bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9348 | // __builtin_ve_vl_pvsla_vvvl | ||
| 9349 | .{ .tag = @enumFromInt(2104), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9350 | // __builtin_ve_vl_pvsla_vvvvl | ||
| 9351 | .{ .tag = @enumFromInt(2105), .param_str = "V256dV256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9352 | // __builtin_ve_vl_pvsll_vvsMvl | ||
| 9353 | .{ .tag = @enumFromInt(2106), .param_str = "V256dV256dLUiV512bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9354 | // __builtin_ve_vl_pvsll_vvsl | ||
| 9355 | .{ .tag = @enumFromInt(2107), .param_str = "V256dV256dLUiUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9356 | // __builtin_ve_vl_pvsll_vvsvl | ||
| 9357 | .{ .tag = @enumFromInt(2108), .param_str = "V256dV256dLUiV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9358 | // __builtin_ve_vl_pvsll_vvvMvl | ||
| 9359 | .{ .tag = @enumFromInt(2109), .param_str = "V256dV256dV256dV512bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9360 | // __builtin_ve_vl_pvsll_vvvl | ||
| 9361 | .{ .tag = @enumFromInt(2110), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9362 | // __builtin_ve_vl_pvsll_vvvvl | ||
| 9363 | .{ .tag = @enumFromInt(2111), .param_str = "V256dV256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9364 | // __builtin_ve_vl_pvsra_vvsMvl | ||
| 9365 | .{ .tag = @enumFromInt(2112), .param_str = "V256dV256dLUiV512bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9366 | // __builtin_ve_vl_pvsra_vvsl | ||
| 9367 | .{ .tag = @enumFromInt(2113), .param_str = "V256dV256dLUiUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9368 | // __builtin_ve_vl_pvsra_vvsvl | ||
| 9369 | .{ .tag = @enumFromInt(2114), .param_str = "V256dV256dLUiV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9370 | // __builtin_ve_vl_pvsra_vvvMvl | ||
| 9371 | .{ .tag = @enumFromInt(2115), .param_str = "V256dV256dV256dV512bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9372 | // __builtin_ve_vl_pvsra_vvvl | ||
| 9373 | .{ .tag = @enumFromInt(2116), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9374 | // __builtin_ve_vl_pvsra_vvvvl | ||
| 9375 | .{ .tag = @enumFromInt(2117), .param_str = "V256dV256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9376 | // __builtin_ve_vl_pvsrl_vvsMvl | ||
| 9377 | .{ .tag = @enumFromInt(2118), .param_str = "V256dV256dLUiV512bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9378 | // __builtin_ve_vl_pvsrl_vvsl | ||
| 9379 | .{ .tag = @enumFromInt(2119), .param_str = "V256dV256dLUiUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9380 | // __builtin_ve_vl_pvsrl_vvsvl | ||
| 9381 | .{ .tag = @enumFromInt(2120), .param_str = "V256dV256dLUiV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9382 | // __builtin_ve_vl_pvsrl_vvvMvl | ||
| 9383 | .{ .tag = @enumFromInt(2121), .param_str = "V256dV256dV256dV512bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9384 | // __builtin_ve_vl_pvsrl_vvvl | ||
| 9385 | .{ .tag = @enumFromInt(2122), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9386 | // __builtin_ve_vl_pvsrl_vvvvl | ||
| 9387 | .{ .tag = @enumFromInt(2123), .param_str = "V256dV256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9388 | // __builtin_ve_vl_pvsubs_vsvMvl | ||
| 9389 | .{ .tag = @enumFromInt(2124), .param_str = "V256dLUiV256dV512bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9390 | // __builtin_ve_vl_pvsubs_vsvl | ||
| 9391 | .{ .tag = @enumFromInt(2125), .param_str = "V256dLUiV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9392 | // __builtin_ve_vl_pvsubs_vsvvl | ||
| 9393 | .{ .tag = @enumFromInt(2126), .param_str = "V256dLUiV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9394 | // __builtin_ve_vl_pvsubs_vvvMvl | ||
| 9395 | .{ .tag = @enumFromInt(2127), .param_str = "V256dV256dV256dV512bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9396 | // __builtin_ve_vl_pvsubs_vvvl | ||
| 9397 | .{ .tag = @enumFromInt(2128), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9398 | // __builtin_ve_vl_pvsubs_vvvvl | ||
| 9399 | .{ .tag = @enumFromInt(2129), .param_str = "V256dV256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9400 | // __builtin_ve_vl_pvsubu_vsvMvl | ||
| 9401 | .{ .tag = @enumFromInt(2130), .param_str = "V256dLUiV256dV512bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9402 | // __builtin_ve_vl_pvsubu_vsvl | ||
| 9403 | .{ .tag = @enumFromInt(2131), .param_str = "V256dLUiV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9404 | // __builtin_ve_vl_pvsubu_vsvvl | ||
| 9405 | .{ .tag = @enumFromInt(2132), .param_str = "V256dLUiV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9406 | // __builtin_ve_vl_pvsubu_vvvMvl | ||
| 9407 | .{ .tag = @enumFromInt(2133), .param_str = "V256dV256dV256dV512bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9408 | // __builtin_ve_vl_pvsubu_vvvl | ||
| 9409 | .{ .tag = @enumFromInt(2134), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9410 | // __builtin_ve_vl_pvsubu_vvvvl | ||
| 9411 | .{ .tag = @enumFromInt(2135), .param_str = "V256dV256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9412 | // __builtin_ve_vl_pvxor_vsvMvl | ||
| 9413 | .{ .tag = @enumFromInt(2136), .param_str = "V256dLUiV256dV512bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9414 | // __builtin_ve_vl_pvxor_vsvl | ||
| 9415 | .{ .tag = @enumFromInt(2137), .param_str = "V256dLUiV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9416 | // __builtin_ve_vl_pvxor_vsvvl | ||
| 9417 | .{ .tag = @enumFromInt(2138), .param_str = "V256dLUiV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9418 | // __builtin_ve_vl_pvxor_vvvMvl | ||
| 9419 | .{ .tag = @enumFromInt(2139), .param_str = "V256dV256dV256dV512bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9420 | // __builtin_ve_vl_pvxor_vvvl | ||
| 9421 | .{ .tag = @enumFromInt(2140), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9422 | // __builtin_ve_vl_pvxor_vvvvl | ||
| 9423 | .{ .tag = @enumFromInt(2141), .param_str = "V256dV256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9424 | // __builtin_ve_vl_scr_sss | ||
| 9425 | .{ .tag = @enumFromInt(2142), .param_str = "vLUiLUiLUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9426 | // __builtin_ve_vl_svm_sMs | ||
| 9427 | .{ .tag = @enumFromInt(2143), .param_str = "LUiV512bLUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9428 | // __builtin_ve_vl_svm_sms | ||
| 9429 | .{ .tag = @enumFromInt(2144), .param_str = "LUiV256bLUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9430 | // __builtin_ve_vl_svob | ||
| 9431 | .{ .tag = @enumFromInt(2145), .param_str = "v", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9432 | // __builtin_ve_vl_tovm_sml | ||
| 9433 | .{ .tag = @enumFromInt(2146), .param_str = "LUiV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9434 | // __builtin_ve_vl_tscr_ssss | ||
| 9435 | .{ .tag = @enumFromInt(2147), .param_str = "LUiLUiLUiLUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9436 | // __builtin_ve_vl_vaddsl_vsvl | ||
| 9437 | .{ .tag = @enumFromInt(2148), .param_str = "V256dLiV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9438 | // __builtin_ve_vl_vaddsl_vsvmvl | ||
| 9439 | .{ .tag = @enumFromInt(2149), .param_str = "V256dLiV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9440 | // __builtin_ve_vl_vaddsl_vsvvl | ||
| 9441 | .{ .tag = @enumFromInt(2150), .param_str = "V256dLiV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9442 | // __builtin_ve_vl_vaddsl_vvvl | ||
| 9443 | .{ .tag = @enumFromInt(2151), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9444 | // __builtin_ve_vl_vaddsl_vvvmvl | ||
| 9445 | .{ .tag = @enumFromInt(2152), .param_str = "V256dV256dV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9446 | // __builtin_ve_vl_vaddsl_vvvvl | ||
| 9447 | .{ .tag = @enumFromInt(2153), .param_str = "V256dV256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9448 | // __builtin_ve_vl_vaddswsx_vsvl | ||
| 9449 | .{ .tag = @enumFromInt(2154), .param_str = "V256diV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9450 | // __builtin_ve_vl_vaddswsx_vsvmvl | ||
| 9451 | .{ .tag = @enumFromInt(2155), .param_str = "V256diV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9452 | // __builtin_ve_vl_vaddswsx_vsvvl | ||
| 9453 | .{ .tag = @enumFromInt(2156), .param_str = "V256diV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9454 | // __builtin_ve_vl_vaddswsx_vvvl | ||
| 9455 | .{ .tag = @enumFromInt(2157), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9456 | // __builtin_ve_vl_vaddswsx_vvvmvl | ||
| 9457 | .{ .tag = @enumFromInt(2158), .param_str = "V256dV256dV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9458 | // __builtin_ve_vl_vaddswsx_vvvvl | ||
| 9459 | .{ .tag = @enumFromInt(2159), .param_str = "V256dV256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9460 | // __builtin_ve_vl_vaddswzx_vsvl | ||
| 9461 | .{ .tag = @enumFromInt(2160), .param_str = "V256diV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9462 | // __builtin_ve_vl_vaddswzx_vsvmvl | ||
| 9463 | .{ .tag = @enumFromInt(2161), .param_str = "V256diV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9464 | // __builtin_ve_vl_vaddswzx_vsvvl | ||
| 9465 | .{ .tag = @enumFromInt(2162), .param_str = "V256diV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9466 | // __builtin_ve_vl_vaddswzx_vvvl | ||
| 9467 | .{ .tag = @enumFromInt(2163), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9468 | // __builtin_ve_vl_vaddswzx_vvvmvl | ||
| 9469 | .{ .tag = @enumFromInt(2164), .param_str = "V256dV256dV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9470 | // __builtin_ve_vl_vaddswzx_vvvvl | ||
| 9471 | .{ .tag = @enumFromInt(2165), .param_str = "V256dV256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9472 | // __builtin_ve_vl_vaddul_vsvl | ||
| 9473 | .{ .tag = @enumFromInt(2166), .param_str = "V256dLUiV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9474 | // __builtin_ve_vl_vaddul_vsvmvl | ||
| 9475 | .{ .tag = @enumFromInt(2167), .param_str = "V256dLUiV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9476 | // __builtin_ve_vl_vaddul_vsvvl | ||
| 9477 | .{ .tag = @enumFromInt(2168), .param_str = "V256dLUiV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9478 | // __builtin_ve_vl_vaddul_vvvl | ||
| 9479 | .{ .tag = @enumFromInt(2169), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9480 | // __builtin_ve_vl_vaddul_vvvmvl | ||
| 9481 | .{ .tag = @enumFromInt(2170), .param_str = "V256dV256dV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9482 | // __builtin_ve_vl_vaddul_vvvvl | ||
| 9483 | .{ .tag = @enumFromInt(2171), .param_str = "V256dV256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9484 | // __builtin_ve_vl_vadduw_vsvl | ||
| 9485 | .{ .tag = @enumFromInt(2172), .param_str = "V256dUiV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9486 | // __builtin_ve_vl_vadduw_vsvmvl | ||
| 9487 | .{ .tag = @enumFromInt(2173), .param_str = "V256dUiV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9488 | // __builtin_ve_vl_vadduw_vsvvl | ||
| 9489 | .{ .tag = @enumFromInt(2174), .param_str = "V256dUiV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9490 | // __builtin_ve_vl_vadduw_vvvl | ||
| 9491 | .{ .tag = @enumFromInt(2175), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9492 | // __builtin_ve_vl_vadduw_vvvmvl | ||
| 9493 | .{ .tag = @enumFromInt(2176), .param_str = "V256dV256dV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9494 | // __builtin_ve_vl_vadduw_vvvvl | ||
| 9495 | .{ .tag = @enumFromInt(2177), .param_str = "V256dV256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9496 | // __builtin_ve_vl_vand_vsvl | ||
| 9497 | .{ .tag = @enumFromInt(2178), .param_str = "V256dLUiV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9498 | // __builtin_ve_vl_vand_vsvmvl | ||
| 9499 | .{ .tag = @enumFromInt(2179), .param_str = "V256dLUiV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9500 | // __builtin_ve_vl_vand_vsvvl | ||
| 9501 | .{ .tag = @enumFromInt(2180), .param_str = "V256dLUiV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9502 | // __builtin_ve_vl_vand_vvvl | ||
| 9503 | .{ .tag = @enumFromInt(2181), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9504 | // __builtin_ve_vl_vand_vvvmvl | ||
| 9505 | .{ .tag = @enumFromInt(2182), .param_str = "V256dV256dV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9506 | // __builtin_ve_vl_vand_vvvvl | ||
| 9507 | .{ .tag = @enumFromInt(2183), .param_str = "V256dV256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9508 | // __builtin_ve_vl_vbrdd_vsl | ||
| 9509 | .{ .tag = @enumFromInt(2184), .param_str = "V256ddUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9510 | // __builtin_ve_vl_vbrdd_vsmvl | ||
| 9511 | .{ .tag = @enumFromInt(2185), .param_str = "V256ddV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9512 | // __builtin_ve_vl_vbrdd_vsvl | ||
| 9513 | .{ .tag = @enumFromInt(2186), .param_str = "V256ddV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9514 | // __builtin_ve_vl_vbrdl_vsl | ||
| 9515 | .{ .tag = @enumFromInt(2187), .param_str = "V256dLiUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9516 | // __builtin_ve_vl_vbrdl_vsmvl | ||
| 9517 | .{ .tag = @enumFromInt(2188), .param_str = "V256dLiV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9518 | // __builtin_ve_vl_vbrdl_vsvl | ||
| 9519 | .{ .tag = @enumFromInt(2189), .param_str = "V256dLiV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9520 | // __builtin_ve_vl_vbrds_vsl | ||
| 9521 | .{ .tag = @enumFromInt(2190), .param_str = "V256dfUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9522 | // __builtin_ve_vl_vbrds_vsmvl | ||
| 9523 | .{ .tag = @enumFromInt(2191), .param_str = "V256dfV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9524 | // __builtin_ve_vl_vbrds_vsvl | ||
| 9525 | .{ .tag = @enumFromInt(2192), .param_str = "V256dfV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9526 | // __builtin_ve_vl_vbrdw_vsl | ||
| 9527 | .{ .tag = @enumFromInt(2193), .param_str = "V256diUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9528 | // __builtin_ve_vl_vbrdw_vsmvl | ||
| 9529 | .{ .tag = @enumFromInt(2194), .param_str = "V256diV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9530 | // __builtin_ve_vl_vbrdw_vsvl | ||
| 9531 | .{ .tag = @enumFromInt(2195), .param_str = "V256diV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9532 | // __builtin_ve_vl_vbrv_vvl | ||
| 9533 | .{ .tag = @enumFromInt(2196), .param_str = "V256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9534 | // __builtin_ve_vl_vbrv_vvmvl | ||
| 9535 | .{ .tag = @enumFromInt(2197), .param_str = "V256dV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9536 | // __builtin_ve_vl_vbrv_vvvl | ||
| 9537 | .{ .tag = @enumFromInt(2198), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9538 | // __builtin_ve_vl_vcmpsl_vsvl | ||
| 9539 | .{ .tag = @enumFromInt(2199), .param_str = "V256dLiV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9540 | // __builtin_ve_vl_vcmpsl_vsvmvl | ||
| 9541 | .{ .tag = @enumFromInt(2200), .param_str = "V256dLiV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9542 | // __builtin_ve_vl_vcmpsl_vsvvl | ||
| 9543 | .{ .tag = @enumFromInt(2201), .param_str = "V256dLiV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9544 | // __builtin_ve_vl_vcmpsl_vvvl | ||
| 9545 | .{ .tag = @enumFromInt(2202), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9546 | // __builtin_ve_vl_vcmpsl_vvvmvl | ||
| 9547 | .{ .tag = @enumFromInt(2203), .param_str = "V256dV256dV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9548 | // __builtin_ve_vl_vcmpsl_vvvvl | ||
| 9549 | .{ .tag = @enumFromInt(2204), .param_str = "V256dV256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9550 | // __builtin_ve_vl_vcmpswsx_vsvl | ||
| 9551 | .{ .tag = @enumFromInt(2205), .param_str = "V256diV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9552 | // __builtin_ve_vl_vcmpswsx_vsvmvl | ||
| 9553 | .{ .tag = @enumFromInt(2206), .param_str = "V256diV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9554 | // __builtin_ve_vl_vcmpswsx_vsvvl | ||
| 9555 | .{ .tag = @enumFromInt(2207), .param_str = "V256diV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9556 | // __builtin_ve_vl_vcmpswsx_vvvl | ||
| 9557 | .{ .tag = @enumFromInt(2208), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9558 | // __builtin_ve_vl_vcmpswsx_vvvmvl | ||
| 9559 | .{ .tag = @enumFromInt(2209), .param_str = "V256dV256dV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9560 | // __builtin_ve_vl_vcmpswsx_vvvvl | ||
| 9561 | .{ .tag = @enumFromInt(2210), .param_str = "V256dV256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9562 | // __builtin_ve_vl_vcmpswzx_vsvl | ||
| 9563 | .{ .tag = @enumFromInt(2211), .param_str = "V256diV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9564 | // __builtin_ve_vl_vcmpswzx_vsvmvl | ||
| 9565 | .{ .tag = @enumFromInt(2212), .param_str = "V256diV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9566 | // __builtin_ve_vl_vcmpswzx_vsvvl | ||
| 9567 | .{ .tag = @enumFromInt(2213), .param_str = "V256diV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9568 | // __builtin_ve_vl_vcmpswzx_vvvl | ||
| 9569 | .{ .tag = @enumFromInt(2214), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9570 | // __builtin_ve_vl_vcmpswzx_vvvmvl | ||
| 9571 | .{ .tag = @enumFromInt(2215), .param_str = "V256dV256dV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9572 | // __builtin_ve_vl_vcmpswzx_vvvvl | ||
| 9573 | .{ .tag = @enumFromInt(2216), .param_str = "V256dV256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9574 | // __builtin_ve_vl_vcmpul_vsvl | ||
| 9575 | .{ .tag = @enumFromInt(2217), .param_str = "V256dLUiV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9576 | // __builtin_ve_vl_vcmpul_vsvmvl | ||
| 9577 | .{ .tag = @enumFromInt(2218), .param_str = "V256dLUiV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9578 | // __builtin_ve_vl_vcmpul_vsvvl | ||
| 9579 | .{ .tag = @enumFromInt(2219), .param_str = "V256dLUiV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9580 | // __builtin_ve_vl_vcmpul_vvvl | ||
| 9581 | .{ .tag = @enumFromInt(2220), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9582 | // __builtin_ve_vl_vcmpul_vvvmvl | ||
| 9583 | .{ .tag = @enumFromInt(2221), .param_str = "V256dV256dV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9584 | // __builtin_ve_vl_vcmpul_vvvvl | ||
| 9585 | .{ .tag = @enumFromInt(2222), .param_str = "V256dV256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9586 | // __builtin_ve_vl_vcmpuw_vsvl | ||
| 9587 | .{ .tag = @enumFromInt(2223), .param_str = "V256dUiV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9588 | // __builtin_ve_vl_vcmpuw_vsvmvl | ||
| 9589 | .{ .tag = @enumFromInt(2224), .param_str = "V256dUiV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9590 | // __builtin_ve_vl_vcmpuw_vsvvl | ||
| 9591 | .{ .tag = @enumFromInt(2225), .param_str = "V256dUiV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9592 | // __builtin_ve_vl_vcmpuw_vvvl | ||
| 9593 | .{ .tag = @enumFromInt(2226), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9594 | // __builtin_ve_vl_vcmpuw_vvvmvl | ||
| 9595 | .{ .tag = @enumFromInt(2227), .param_str = "V256dV256dV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9596 | // __builtin_ve_vl_vcmpuw_vvvvl | ||
| 9597 | .{ .tag = @enumFromInt(2228), .param_str = "V256dV256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9598 | // __builtin_ve_vl_vcp_vvmvl | ||
| 9599 | .{ .tag = @enumFromInt(2229), .param_str = "V256dV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9600 | // __builtin_ve_vl_vcvtdl_vvl | ||
| 9601 | .{ .tag = @enumFromInt(2230), .param_str = "V256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9602 | // __builtin_ve_vl_vcvtdl_vvvl | ||
| 9603 | .{ .tag = @enumFromInt(2231), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9604 | // __builtin_ve_vl_vcvtds_vvl | ||
| 9605 | .{ .tag = @enumFromInt(2232), .param_str = "V256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9606 | // __builtin_ve_vl_vcvtds_vvvl | ||
| 9607 | .{ .tag = @enumFromInt(2233), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9608 | // __builtin_ve_vl_vcvtdw_vvl | ||
| 9609 | .{ .tag = @enumFromInt(2234), .param_str = "V256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9610 | // __builtin_ve_vl_vcvtdw_vvvl | ||
| 9611 | .{ .tag = @enumFromInt(2235), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9612 | // __builtin_ve_vl_vcvtld_vvl | ||
| 9613 | .{ .tag = @enumFromInt(2236), .param_str = "V256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9614 | // __builtin_ve_vl_vcvtld_vvmvl | ||
| 9615 | .{ .tag = @enumFromInt(2237), .param_str = "V256dV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9616 | // __builtin_ve_vl_vcvtld_vvvl | ||
| 9617 | .{ .tag = @enumFromInt(2238), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9618 | // __builtin_ve_vl_vcvtldrz_vvl | ||
| 9619 | .{ .tag = @enumFromInt(2239), .param_str = "V256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9620 | // __builtin_ve_vl_vcvtldrz_vvmvl | ||
| 9621 | .{ .tag = @enumFromInt(2240), .param_str = "V256dV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9622 | // __builtin_ve_vl_vcvtldrz_vvvl | ||
| 9623 | .{ .tag = @enumFromInt(2241), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9624 | // __builtin_ve_vl_vcvtsd_vvl | ||
| 9625 | .{ .tag = @enumFromInt(2242), .param_str = "V256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9626 | // __builtin_ve_vl_vcvtsd_vvvl | ||
| 9627 | .{ .tag = @enumFromInt(2243), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9628 | // __builtin_ve_vl_vcvtsw_vvl | ||
| 9629 | .{ .tag = @enumFromInt(2244), .param_str = "V256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9630 | // __builtin_ve_vl_vcvtsw_vvvl | ||
| 9631 | .{ .tag = @enumFromInt(2245), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9632 | // __builtin_ve_vl_vcvtwdsx_vvl | ||
| 9633 | .{ .tag = @enumFromInt(2246), .param_str = "V256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9634 | // __builtin_ve_vl_vcvtwdsx_vvmvl | ||
| 9635 | .{ .tag = @enumFromInt(2247), .param_str = "V256dV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9636 | // __builtin_ve_vl_vcvtwdsx_vvvl | ||
| 9637 | .{ .tag = @enumFromInt(2248), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9638 | // __builtin_ve_vl_vcvtwdsxrz_vvl | ||
| 9639 | .{ .tag = @enumFromInt(2249), .param_str = "V256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9640 | // __builtin_ve_vl_vcvtwdsxrz_vvmvl | ||
| 9641 | .{ .tag = @enumFromInt(2250), .param_str = "V256dV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9642 | // __builtin_ve_vl_vcvtwdsxrz_vvvl | ||
| 9643 | .{ .tag = @enumFromInt(2251), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9644 | // __builtin_ve_vl_vcvtwdzx_vvl | ||
| 9645 | .{ .tag = @enumFromInt(2252), .param_str = "V256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9646 | // __builtin_ve_vl_vcvtwdzx_vvmvl | ||
| 9647 | .{ .tag = @enumFromInt(2253), .param_str = "V256dV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9648 | // __builtin_ve_vl_vcvtwdzx_vvvl | ||
| 9649 | .{ .tag = @enumFromInt(2254), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9650 | // __builtin_ve_vl_vcvtwdzxrz_vvl | ||
| 9651 | .{ .tag = @enumFromInt(2255), .param_str = "V256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9652 | // __builtin_ve_vl_vcvtwdzxrz_vvmvl | ||
| 9653 | .{ .tag = @enumFromInt(2256), .param_str = "V256dV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9654 | // __builtin_ve_vl_vcvtwdzxrz_vvvl | ||
| 9655 | .{ .tag = @enumFromInt(2257), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9656 | // __builtin_ve_vl_vcvtwssx_vvl | ||
| 9657 | .{ .tag = @enumFromInt(2258), .param_str = "V256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9658 | // __builtin_ve_vl_vcvtwssx_vvmvl | ||
| 9659 | .{ .tag = @enumFromInt(2259), .param_str = "V256dV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9660 | // __builtin_ve_vl_vcvtwssx_vvvl | ||
| 9661 | .{ .tag = @enumFromInt(2260), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9662 | // __builtin_ve_vl_vcvtwssxrz_vvl | ||
| 9663 | .{ .tag = @enumFromInt(2261), .param_str = "V256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9664 | // __builtin_ve_vl_vcvtwssxrz_vvmvl | ||
| 9665 | .{ .tag = @enumFromInt(2262), .param_str = "V256dV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9666 | // __builtin_ve_vl_vcvtwssxrz_vvvl | ||
| 9667 | .{ .tag = @enumFromInt(2263), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9668 | // __builtin_ve_vl_vcvtwszx_vvl | ||
| 9669 | .{ .tag = @enumFromInt(2264), .param_str = "V256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9670 | // __builtin_ve_vl_vcvtwszx_vvmvl | ||
| 9671 | .{ .tag = @enumFromInt(2265), .param_str = "V256dV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9672 | // __builtin_ve_vl_vcvtwszx_vvvl | ||
| 9673 | .{ .tag = @enumFromInt(2266), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9674 | // __builtin_ve_vl_vcvtwszxrz_vvl | ||
| 9675 | .{ .tag = @enumFromInt(2267), .param_str = "V256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9676 | // __builtin_ve_vl_vcvtwszxrz_vvmvl | ||
| 9677 | .{ .tag = @enumFromInt(2268), .param_str = "V256dV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9678 | // __builtin_ve_vl_vcvtwszxrz_vvvl | ||
| 9679 | .{ .tag = @enumFromInt(2269), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9680 | // __builtin_ve_vl_vdivsl_vsvl | ||
| 9681 | .{ .tag = @enumFromInt(2270), .param_str = "V256dLiV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9682 | // __builtin_ve_vl_vdivsl_vsvmvl | ||
| 9683 | .{ .tag = @enumFromInt(2271), .param_str = "V256dLiV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9684 | // __builtin_ve_vl_vdivsl_vsvvl | ||
| 9685 | .{ .tag = @enumFromInt(2272), .param_str = "V256dLiV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9686 | // __builtin_ve_vl_vdivsl_vvsl | ||
| 9687 | .{ .tag = @enumFromInt(2273), .param_str = "V256dV256dLiUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9688 | // __builtin_ve_vl_vdivsl_vvsmvl | ||
| 9689 | .{ .tag = @enumFromInt(2274), .param_str = "V256dV256dLiV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9690 | // __builtin_ve_vl_vdivsl_vvsvl | ||
| 9691 | .{ .tag = @enumFromInt(2275), .param_str = "V256dV256dLiV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9692 | // __builtin_ve_vl_vdivsl_vvvl | ||
| 9693 | .{ .tag = @enumFromInt(2276), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9694 | // __builtin_ve_vl_vdivsl_vvvmvl | ||
| 9695 | .{ .tag = @enumFromInt(2277), .param_str = "V256dV256dV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9696 | // __builtin_ve_vl_vdivsl_vvvvl | ||
| 9697 | .{ .tag = @enumFromInt(2278), .param_str = "V256dV256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9698 | // __builtin_ve_vl_vdivswsx_vsvl | ||
| 9699 | .{ .tag = @enumFromInt(2279), .param_str = "V256diV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9700 | // __builtin_ve_vl_vdivswsx_vsvmvl | ||
| 9701 | .{ .tag = @enumFromInt(2280), .param_str = "V256diV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9702 | // __builtin_ve_vl_vdivswsx_vsvvl | ||
| 9703 | .{ .tag = @enumFromInt(2281), .param_str = "V256diV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9704 | // __builtin_ve_vl_vdivswsx_vvsl | ||
| 9705 | .{ .tag = @enumFromInt(2282), .param_str = "V256dV256diUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9706 | // __builtin_ve_vl_vdivswsx_vvsmvl | ||
| 9707 | .{ .tag = @enumFromInt(2283), .param_str = "V256dV256diV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9708 | // __builtin_ve_vl_vdivswsx_vvsvl | ||
| 9709 | .{ .tag = @enumFromInt(2284), .param_str = "V256dV256diV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9710 | // __builtin_ve_vl_vdivswsx_vvvl | ||
| 9711 | .{ .tag = @enumFromInt(2285), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9712 | // __builtin_ve_vl_vdivswsx_vvvmvl | ||
| 9713 | .{ .tag = @enumFromInt(2286), .param_str = "V256dV256dV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9714 | // __builtin_ve_vl_vdivswsx_vvvvl | ||
| 9715 | .{ .tag = @enumFromInt(2287), .param_str = "V256dV256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9716 | // __builtin_ve_vl_vdivswzx_vsvl | ||
| 9717 | .{ .tag = @enumFromInt(2288), .param_str = "V256diV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9718 | // __builtin_ve_vl_vdivswzx_vsvmvl | ||
| 9719 | .{ .tag = @enumFromInt(2289), .param_str = "V256diV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9720 | // __builtin_ve_vl_vdivswzx_vsvvl | ||
| 9721 | .{ .tag = @enumFromInt(2290), .param_str = "V256diV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9722 | // __builtin_ve_vl_vdivswzx_vvsl | ||
| 9723 | .{ .tag = @enumFromInt(2291), .param_str = "V256dV256diUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9724 | // __builtin_ve_vl_vdivswzx_vvsmvl | ||
| 9725 | .{ .tag = @enumFromInt(2292), .param_str = "V256dV256diV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9726 | // __builtin_ve_vl_vdivswzx_vvsvl | ||
| 9727 | .{ .tag = @enumFromInt(2293), .param_str = "V256dV256diV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9728 | // __builtin_ve_vl_vdivswzx_vvvl | ||
| 9729 | .{ .tag = @enumFromInt(2294), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9730 | // __builtin_ve_vl_vdivswzx_vvvmvl | ||
| 9731 | .{ .tag = @enumFromInt(2295), .param_str = "V256dV256dV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9732 | // __builtin_ve_vl_vdivswzx_vvvvl | ||
| 9733 | .{ .tag = @enumFromInt(2296), .param_str = "V256dV256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9734 | // __builtin_ve_vl_vdivul_vsvl | ||
| 9735 | .{ .tag = @enumFromInt(2297), .param_str = "V256dLUiV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9736 | // __builtin_ve_vl_vdivul_vsvmvl | ||
| 9737 | .{ .tag = @enumFromInt(2298), .param_str = "V256dLUiV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9738 | // __builtin_ve_vl_vdivul_vsvvl | ||
| 9739 | .{ .tag = @enumFromInt(2299), .param_str = "V256dLUiV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9740 | // __builtin_ve_vl_vdivul_vvsl | ||
| 9741 | .{ .tag = @enumFromInt(2300), .param_str = "V256dV256dLUiUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9742 | // __builtin_ve_vl_vdivul_vvsmvl | ||
| 9743 | .{ .tag = @enumFromInt(2301), .param_str = "V256dV256dLUiV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9744 | // __builtin_ve_vl_vdivul_vvsvl | ||
| 9745 | .{ .tag = @enumFromInt(2302), .param_str = "V256dV256dLUiV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9746 | // __builtin_ve_vl_vdivul_vvvl | ||
| 9747 | .{ .tag = @enumFromInt(2303), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9748 | // __builtin_ve_vl_vdivul_vvvmvl | ||
| 9749 | .{ .tag = @enumFromInt(2304), .param_str = "V256dV256dV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9750 | // __builtin_ve_vl_vdivul_vvvvl | ||
| 9751 | .{ .tag = @enumFromInt(2305), .param_str = "V256dV256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9752 | // __builtin_ve_vl_vdivuw_vsvl | ||
| 9753 | .{ .tag = @enumFromInt(2306), .param_str = "V256dUiV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9754 | // __builtin_ve_vl_vdivuw_vsvmvl | ||
| 9755 | .{ .tag = @enumFromInt(2307), .param_str = "V256dUiV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9756 | // __builtin_ve_vl_vdivuw_vsvvl | ||
| 9757 | .{ .tag = @enumFromInt(2308), .param_str = "V256dUiV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9758 | // __builtin_ve_vl_vdivuw_vvsl | ||
| 9759 | .{ .tag = @enumFromInt(2309), .param_str = "V256dV256dUiUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9760 | // __builtin_ve_vl_vdivuw_vvsmvl | ||
| 9761 | .{ .tag = @enumFromInt(2310), .param_str = "V256dV256dUiV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9762 | // __builtin_ve_vl_vdivuw_vvsvl | ||
| 9763 | .{ .tag = @enumFromInt(2311), .param_str = "V256dV256dUiV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9764 | // __builtin_ve_vl_vdivuw_vvvl | ||
| 9765 | .{ .tag = @enumFromInt(2312), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9766 | // __builtin_ve_vl_vdivuw_vvvmvl | ||
| 9767 | .{ .tag = @enumFromInt(2313), .param_str = "V256dV256dV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9768 | // __builtin_ve_vl_vdivuw_vvvvl | ||
| 9769 | .{ .tag = @enumFromInt(2314), .param_str = "V256dV256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9770 | // __builtin_ve_vl_veqv_vsvl | ||
| 9771 | .{ .tag = @enumFromInt(2315), .param_str = "V256dLUiV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9772 | // __builtin_ve_vl_veqv_vsvmvl | ||
| 9773 | .{ .tag = @enumFromInt(2316), .param_str = "V256dLUiV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9774 | // __builtin_ve_vl_veqv_vsvvl | ||
| 9775 | .{ .tag = @enumFromInt(2317), .param_str = "V256dLUiV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9776 | // __builtin_ve_vl_veqv_vvvl | ||
| 9777 | .{ .tag = @enumFromInt(2318), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9778 | // __builtin_ve_vl_veqv_vvvmvl | ||
| 9779 | .{ .tag = @enumFromInt(2319), .param_str = "V256dV256dV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9780 | // __builtin_ve_vl_veqv_vvvvl | ||
| 9781 | .{ .tag = @enumFromInt(2320), .param_str = "V256dV256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9782 | // __builtin_ve_vl_vex_vvmvl | ||
| 9783 | .{ .tag = @enumFromInt(2321), .param_str = "V256dV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9784 | // __builtin_ve_vl_vfaddd_vsvl | ||
| 9785 | .{ .tag = @enumFromInt(2322), .param_str = "V256ddV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9786 | // __builtin_ve_vl_vfaddd_vsvmvl | ||
| 9787 | .{ .tag = @enumFromInt(2323), .param_str = "V256ddV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9788 | // __builtin_ve_vl_vfaddd_vsvvl | ||
| 9789 | .{ .tag = @enumFromInt(2324), .param_str = "V256ddV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9790 | // __builtin_ve_vl_vfaddd_vvvl | ||
| 9791 | .{ .tag = @enumFromInt(2325), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9792 | // __builtin_ve_vl_vfaddd_vvvmvl | ||
| 9793 | .{ .tag = @enumFromInt(2326), .param_str = "V256dV256dV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9794 | // __builtin_ve_vl_vfaddd_vvvvl | ||
| 9795 | .{ .tag = @enumFromInt(2327), .param_str = "V256dV256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9796 | // __builtin_ve_vl_vfadds_vsvl | ||
| 9797 | .{ .tag = @enumFromInt(2328), .param_str = "V256dfV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9798 | // __builtin_ve_vl_vfadds_vsvmvl | ||
| 9799 | .{ .tag = @enumFromInt(2329), .param_str = "V256dfV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9800 | // __builtin_ve_vl_vfadds_vsvvl | ||
| 9801 | .{ .tag = @enumFromInt(2330), .param_str = "V256dfV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9802 | // __builtin_ve_vl_vfadds_vvvl | ||
| 9803 | .{ .tag = @enumFromInt(2331), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9804 | // __builtin_ve_vl_vfadds_vvvmvl | ||
| 9805 | .{ .tag = @enumFromInt(2332), .param_str = "V256dV256dV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9806 | // __builtin_ve_vl_vfadds_vvvvl | ||
| 9807 | .{ .tag = @enumFromInt(2333), .param_str = "V256dV256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9808 | // __builtin_ve_vl_vfcmpd_vsvl | ||
| 9809 | .{ .tag = @enumFromInt(2334), .param_str = "V256ddV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9810 | // __builtin_ve_vl_vfcmpd_vsvmvl | ||
| 9811 | .{ .tag = @enumFromInt(2335), .param_str = "V256ddV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9812 | // __builtin_ve_vl_vfcmpd_vsvvl | ||
| 9813 | .{ .tag = @enumFromInt(2336), .param_str = "V256ddV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9814 | // __builtin_ve_vl_vfcmpd_vvvl | ||
| 9815 | .{ .tag = @enumFromInt(2337), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9816 | // __builtin_ve_vl_vfcmpd_vvvmvl | ||
| 9817 | .{ .tag = @enumFromInt(2338), .param_str = "V256dV256dV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9818 | // __builtin_ve_vl_vfcmpd_vvvvl | ||
| 9819 | .{ .tag = @enumFromInt(2339), .param_str = "V256dV256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9820 | // __builtin_ve_vl_vfcmps_vsvl | ||
| 9821 | .{ .tag = @enumFromInt(2340), .param_str = "V256dfV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9822 | // __builtin_ve_vl_vfcmps_vsvmvl | ||
| 9823 | .{ .tag = @enumFromInt(2341), .param_str = "V256dfV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9824 | // __builtin_ve_vl_vfcmps_vsvvl | ||
| 9825 | .{ .tag = @enumFromInt(2342), .param_str = "V256dfV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9826 | // __builtin_ve_vl_vfcmps_vvvl | ||
| 9827 | .{ .tag = @enumFromInt(2343), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9828 | // __builtin_ve_vl_vfcmps_vvvmvl | ||
| 9829 | .{ .tag = @enumFromInt(2344), .param_str = "V256dV256dV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9830 | // __builtin_ve_vl_vfcmps_vvvvl | ||
| 9831 | .{ .tag = @enumFromInt(2345), .param_str = "V256dV256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9832 | // __builtin_ve_vl_vfdivd_vsvl | ||
| 9833 | .{ .tag = @enumFromInt(2346), .param_str = "V256ddV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9834 | // __builtin_ve_vl_vfdivd_vsvmvl | ||
| 9835 | .{ .tag = @enumFromInt(2347), .param_str = "V256ddV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9836 | // __builtin_ve_vl_vfdivd_vsvvl | ||
| 9837 | .{ .tag = @enumFromInt(2348), .param_str = "V256ddV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9838 | // __builtin_ve_vl_vfdivd_vvvl | ||
| 9839 | .{ .tag = @enumFromInt(2349), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9840 | // __builtin_ve_vl_vfdivd_vvvmvl | ||
| 9841 | .{ .tag = @enumFromInt(2350), .param_str = "V256dV256dV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9842 | // __builtin_ve_vl_vfdivd_vvvvl | ||
| 9843 | .{ .tag = @enumFromInt(2351), .param_str = "V256dV256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9844 | // __builtin_ve_vl_vfdivs_vsvl | ||
| 9845 | .{ .tag = @enumFromInt(2352), .param_str = "V256dfV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9846 | // __builtin_ve_vl_vfdivs_vsvmvl | ||
| 9847 | .{ .tag = @enumFromInt(2353), .param_str = "V256dfV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9848 | // __builtin_ve_vl_vfdivs_vsvvl | ||
| 9849 | .{ .tag = @enumFromInt(2354), .param_str = "V256dfV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9850 | // __builtin_ve_vl_vfdivs_vvvl | ||
| 9851 | .{ .tag = @enumFromInt(2355), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9852 | // __builtin_ve_vl_vfdivs_vvvmvl | ||
| 9853 | .{ .tag = @enumFromInt(2356), .param_str = "V256dV256dV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9854 | // __builtin_ve_vl_vfdivs_vvvvl | ||
| 9855 | .{ .tag = @enumFromInt(2357), .param_str = "V256dV256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9856 | // __builtin_ve_vl_vfmadd_vsvvl | ||
| 9857 | .{ .tag = @enumFromInt(2358), .param_str = "V256ddV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9858 | // __builtin_ve_vl_vfmadd_vsvvmvl | ||
| 9859 | .{ .tag = @enumFromInt(2359), .param_str = "V256ddV256dV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9860 | // __builtin_ve_vl_vfmadd_vsvvvl | ||
| 9861 | .{ .tag = @enumFromInt(2360), .param_str = "V256ddV256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9862 | // __builtin_ve_vl_vfmadd_vvsvl | ||
| 9863 | .{ .tag = @enumFromInt(2361), .param_str = "V256dV256ddV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9864 | // __builtin_ve_vl_vfmadd_vvsvmvl | ||
| 9865 | .{ .tag = @enumFromInt(2362), .param_str = "V256dV256ddV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9866 | // __builtin_ve_vl_vfmadd_vvsvvl | ||
| 9867 | .{ .tag = @enumFromInt(2363), .param_str = "V256dV256ddV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9868 | // __builtin_ve_vl_vfmadd_vvvvl | ||
| 9869 | .{ .tag = @enumFromInt(2364), .param_str = "V256dV256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9870 | // __builtin_ve_vl_vfmadd_vvvvmvl | ||
| 9871 | .{ .tag = @enumFromInt(2365), .param_str = "V256dV256dV256dV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9872 | // __builtin_ve_vl_vfmadd_vvvvvl | ||
| 9873 | .{ .tag = @enumFromInt(2366), .param_str = "V256dV256dV256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9874 | // __builtin_ve_vl_vfmads_vsvvl | ||
| 9875 | .{ .tag = @enumFromInt(2367), .param_str = "V256dfV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9876 | // __builtin_ve_vl_vfmads_vsvvmvl | ||
| 9877 | .{ .tag = @enumFromInt(2368), .param_str = "V256dfV256dV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9878 | // __builtin_ve_vl_vfmads_vsvvvl | ||
| 9879 | .{ .tag = @enumFromInt(2369), .param_str = "V256dfV256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9880 | // __builtin_ve_vl_vfmads_vvsvl | ||
| 9881 | .{ .tag = @enumFromInt(2370), .param_str = "V256dV256dfV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9882 | // __builtin_ve_vl_vfmads_vvsvmvl | ||
| 9883 | .{ .tag = @enumFromInt(2371), .param_str = "V256dV256dfV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9884 | // __builtin_ve_vl_vfmads_vvsvvl | ||
| 9885 | .{ .tag = @enumFromInt(2372), .param_str = "V256dV256dfV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9886 | // __builtin_ve_vl_vfmads_vvvvl | ||
| 9887 | .{ .tag = @enumFromInt(2373), .param_str = "V256dV256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9888 | // __builtin_ve_vl_vfmads_vvvvmvl | ||
| 9889 | .{ .tag = @enumFromInt(2374), .param_str = "V256dV256dV256dV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9890 | // __builtin_ve_vl_vfmads_vvvvvl | ||
| 9891 | .{ .tag = @enumFromInt(2375), .param_str = "V256dV256dV256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9892 | // __builtin_ve_vl_vfmaxd_vsvl | ||
| 9893 | .{ .tag = @enumFromInt(2376), .param_str = "V256ddV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9894 | // __builtin_ve_vl_vfmaxd_vsvmvl | ||
| 9895 | .{ .tag = @enumFromInt(2377), .param_str = "V256ddV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9896 | // __builtin_ve_vl_vfmaxd_vsvvl | ||
| 9897 | .{ .tag = @enumFromInt(2378), .param_str = "V256ddV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9898 | // __builtin_ve_vl_vfmaxd_vvvl | ||
| 9899 | .{ .tag = @enumFromInt(2379), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9900 | // __builtin_ve_vl_vfmaxd_vvvmvl | ||
| 9901 | .{ .tag = @enumFromInt(2380), .param_str = "V256dV256dV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9902 | // __builtin_ve_vl_vfmaxd_vvvvl | ||
| 9903 | .{ .tag = @enumFromInt(2381), .param_str = "V256dV256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9904 | // __builtin_ve_vl_vfmaxs_vsvl | ||
| 9905 | .{ .tag = @enumFromInt(2382), .param_str = "V256dfV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9906 | // __builtin_ve_vl_vfmaxs_vsvmvl | ||
| 9907 | .{ .tag = @enumFromInt(2383), .param_str = "V256dfV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9908 | // __builtin_ve_vl_vfmaxs_vsvvl | ||
| 9909 | .{ .tag = @enumFromInt(2384), .param_str = "V256dfV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9910 | // __builtin_ve_vl_vfmaxs_vvvl | ||
| 9911 | .{ .tag = @enumFromInt(2385), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9912 | // __builtin_ve_vl_vfmaxs_vvvmvl | ||
| 9913 | .{ .tag = @enumFromInt(2386), .param_str = "V256dV256dV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9914 | // __builtin_ve_vl_vfmaxs_vvvvl | ||
| 9915 | .{ .tag = @enumFromInt(2387), .param_str = "V256dV256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9916 | // __builtin_ve_vl_vfmind_vsvl | ||
| 9917 | .{ .tag = @enumFromInt(2388), .param_str = "V256ddV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9918 | // __builtin_ve_vl_vfmind_vsvmvl | ||
| 9919 | .{ .tag = @enumFromInt(2389), .param_str = "V256ddV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9920 | // __builtin_ve_vl_vfmind_vsvvl | ||
| 9921 | .{ .tag = @enumFromInt(2390), .param_str = "V256ddV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9922 | // __builtin_ve_vl_vfmind_vvvl | ||
| 9923 | .{ .tag = @enumFromInt(2391), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9924 | // __builtin_ve_vl_vfmind_vvvmvl | ||
| 9925 | .{ .tag = @enumFromInt(2392), .param_str = "V256dV256dV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9926 | // __builtin_ve_vl_vfmind_vvvvl | ||
| 9927 | .{ .tag = @enumFromInt(2393), .param_str = "V256dV256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9928 | // __builtin_ve_vl_vfmins_vsvl | ||
| 9929 | .{ .tag = @enumFromInt(2394), .param_str = "V256dfV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9930 | // __builtin_ve_vl_vfmins_vsvmvl | ||
| 9931 | .{ .tag = @enumFromInt(2395), .param_str = "V256dfV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9932 | // __builtin_ve_vl_vfmins_vsvvl | ||
| 9933 | .{ .tag = @enumFromInt(2396), .param_str = "V256dfV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9934 | // __builtin_ve_vl_vfmins_vvvl | ||
| 9935 | .{ .tag = @enumFromInt(2397), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9936 | // __builtin_ve_vl_vfmins_vvvmvl | ||
| 9937 | .{ .tag = @enumFromInt(2398), .param_str = "V256dV256dV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9938 | // __builtin_ve_vl_vfmins_vvvvl | ||
| 9939 | .{ .tag = @enumFromInt(2399), .param_str = "V256dV256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9940 | // __builtin_ve_vl_vfmkdeq_mvl | ||
| 9941 | .{ .tag = @enumFromInt(2400), .param_str = "V256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9942 | // __builtin_ve_vl_vfmkdeq_mvml | ||
| 9943 | .{ .tag = @enumFromInt(2401), .param_str = "V256bV256dV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9944 | // __builtin_ve_vl_vfmkdeqnan_mvl | ||
| 9945 | .{ .tag = @enumFromInt(2402), .param_str = "V256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9946 | // __builtin_ve_vl_vfmkdeqnan_mvml | ||
| 9947 | .{ .tag = @enumFromInt(2403), .param_str = "V256bV256dV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9948 | // __builtin_ve_vl_vfmkdge_mvl | ||
| 9949 | .{ .tag = @enumFromInt(2404), .param_str = "V256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9950 | // __builtin_ve_vl_vfmkdge_mvml | ||
| 9951 | .{ .tag = @enumFromInt(2405), .param_str = "V256bV256dV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9952 | // __builtin_ve_vl_vfmkdgenan_mvl | ||
| 9953 | .{ .tag = @enumFromInt(2406), .param_str = "V256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9954 | // __builtin_ve_vl_vfmkdgenan_mvml | ||
| 9955 | .{ .tag = @enumFromInt(2407), .param_str = "V256bV256dV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9956 | // __builtin_ve_vl_vfmkdgt_mvl | ||
| 9957 | .{ .tag = @enumFromInt(2408), .param_str = "V256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9958 | // __builtin_ve_vl_vfmkdgt_mvml | ||
| 9959 | .{ .tag = @enumFromInt(2409), .param_str = "V256bV256dV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9960 | // __builtin_ve_vl_vfmkdgtnan_mvl | ||
| 9961 | .{ .tag = @enumFromInt(2410), .param_str = "V256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9962 | // __builtin_ve_vl_vfmkdgtnan_mvml | ||
| 9963 | .{ .tag = @enumFromInt(2411), .param_str = "V256bV256dV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9964 | // __builtin_ve_vl_vfmkdle_mvl | ||
| 9965 | .{ .tag = @enumFromInt(2412), .param_str = "V256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9966 | // __builtin_ve_vl_vfmkdle_mvml | ||
| 9967 | .{ .tag = @enumFromInt(2413), .param_str = "V256bV256dV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9968 | // __builtin_ve_vl_vfmkdlenan_mvl | ||
| 9969 | .{ .tag = @enumFromInt(2414), .param_str = "V256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9970 | // __builtin_ve_vl_vfmkdlenan_mvml | ||
| 9971 | .{ .tag = @enumFromInt(2415), .param_str = "V256bV256dV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9972 | // __builtin_ve_vl_vfmkdlt_mvl | ||
| 9973 | .{ .tag = @enumFromInt(2416), .param_str = "V256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9974 | // __builtin_ve_vl_vfmkdlt_mvml | ||
| 9975 | .{ .tag = @enumFromInt(2417), .param_str = "V256bV256dV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9976 | // __builtin_ve_vl_vfmkdltnan_mvl | ||
| 9977 | .{ .tag = @enumFromInt(2418), .param_str = "V256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9978 | // __builtin_ve_vl_vfmkdltnan_mvml | ||
| 9979 | .{ .tag = @enumFromInt(2419), .param_str = "V256bV256dV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9980 | // __builtin_ve_vl_vfmkdnan_mvl | ||
| 9981 | .{ .tag = @enumFromInt(2420), .param_str = "V256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9982 | // __builtin_ve_vl_vfmkdnan_mvml | ||
| 9983 | .{ .tag = @enumFromInt(2421), .param_str = "V256bV256dV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9984 | // __builtin_ve_vl_vfmkdne_mvl | ||
| 9985 | .{ .tag = @enumFromInt(2422), .param_str = "V256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9986 | // __builtin_ve_vl_vfmkdne_mvml | ||
| 9987 | .{ .tag = @enumFromInt(2423), .param_str = "V256bV256dV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9988 | // __builtin_ve_vl_vfmkdnenan_mvl | ||
| 9989 | .{ .tag = @enumFromInt(2424), .param_str = "V256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9990 | // __builtin_ve_vl_vfmkdnenan_mvml | ||
| 9991 | .{ .tag = @enumFromInt(2425), .param_str = "V256bV256dV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9992 | // __builtin_ve_vl_vfmkdnum_mvl | ||
| 9993 | .{ .tag = @enumFromInt(2426), .param_str = "V256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9994 | // __builtin_ve_vl_vfmkdnum_mvml | ||
| 9995 | .{ .tag = @enumFromInt(2427), .param_str = "V256bV256dV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9996 | // __builtin_ve_vl_vfmklaf_ml | ||
| 9997 | .{ .tag = @enumFromInt(2428), .param_str = "V256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 9998 | // __builtin_ve_vl_vfmklat_ml | ||
| 9999 | .{ .tag = @enumFromInt(2429), .param_str = "V256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10000 | // __builtin_ve_vl_vfmkleq_mvl | ||
| 10001 | .{ .tag = @enumFromInt(2430), .param_str = "V256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10002 | // __builtin_ve_vl_vfmkleq_mvml | ||
| 10003 | .{ .tag = @enumFromInt(2431), .param_str = "V256bV256dV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10004 | // __builtin_ve_vl_vfmkleqnan_mvl | ||
| 10005 | .{ .tag = @enumFromInt(2432), .param_str = "V256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10006 | // __builtin_ve_vl_vfmkleqnan_mvml | ||
| 10007 | .{ .tag = @enumFromInt(2433), .param_str = "V256bV256dV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10008 | // __builtin_ve_vl_vfmklge_mvl | ||
| 10009 | .{ .tag = @enumFromInt(2434), .param_str = "V256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10010 | // __builtin_ve_vl_vfmklge_mvml | ||
| 10011 | .{ .tag = @enumFromInt(2435), .param_str = "V256bV256dV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10012 | // __builtin_ve_vl_vfmklgenan_mvl | ||
| 10013 | .{ .tag = @enumFromInt(2436), .param_str = "V256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10014 | // __builtin_ve_vl_vfmklgenan_mvml | ||
| 10015 | .{ .tag = @enumFromInt(2437), .param_str = "V256bV256dV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10016 | // __builtin_ve_vl_vfmklgt_mvl | ||
| 10017 | .{ .tag = @enumFromInt(2438), .param_str = "V256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10018 | // __builtin_ve_vl_vfmklgt_mvml | ||
| 10019 | .{ .tag = @enumFromInt(2439), .param_str = "V256bV256dV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10020 | // __builtin_ve_vl_vfmklgtnan_mvl | ||
| 10021 | .{ .tag = @enumFromInt(2440), .param_str = "V256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10022 | // __builtin_ve_vl_vfmklgtnan_mvml | ||
| 10023 | .{ .tag = @enumFromInt(2441), .param_str = "V256bV256dV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10024 | // __builtin_ve_vl_vfmklle_mvl | ||
| 10025 | .{ .tag = @enumFromInt(2442), .param_str = "V256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10026 | // __builtin_ve_vl_vfmklle_mvml | ||
| 10027 | .{ .tag = @enumFromInt(2443), .param_str = "V256bV256dV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10028 | // __builtin_ve_vl_vfmkllenan_mvl | ||
| 10029 | .{ .tag = @enumFromInt(2444), .param_str = "V256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10030 | // __builtin_ve_vl_vfmkllenan_mvml | ||
| 10031 | .{ .tag = @enumFromInt(2445), .param_str = "V256bV256dV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10032 | // __builtin_ve_vl_vfmkllt_mvl | ||
| 10033 | .{ .tag = @enumFromInt(2446), .param_str = "V256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10034 | // __builtin_ve_vl_vfmkllt_mvml | ||
| 10035 | .{ .tag = @enumFromInt(2447), .param_str = "V256bV256dV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10036 | // __builtin_ve_vl_vfmklltnan_mvl | ||
| 10037 | .{ .tag = @enumFromInt(2448), .param_str = "V256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10038 | // __builtin_ve_vl_vfmklltnan_mvml | ||
| 10039 | .{ .tag = @enumFromInt(2449), .param_str = "V256bV256dV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10040 | // __builtin_ve_vl_vfmklnan_mvl | ||
| 10041 | .{ .tag = @enumFromInt(2450), .param_str = "V256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10042 | // __builtin_ve_vl_vfmklnan_mvml | ||
| 10043 | .{ .tag = @enumFromInt(2451), .param_str = "V256bV256dV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10044 | // __builtin_ve_vl_vfmklne_mvl | ||
| 10045 | .{ .tag = @enumFromInt(2452), .param_str = "V256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10046 | // __builtin_ve_vl_vfmklne_mvml | ||
| 10047 | .{ .tag = @enumFromInt(2453), .param_str = "V256bV256dV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10048 | // __builtin_ve_vl_vfmklnenan_mvl | ||
| 10049 | .{ .tag = @enumFromInt(2454), .param_str = "V256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10050 | // __builtin_ve_vl_vfmklnenan_mvml | ||
| 10051 | .{ .tag = @enumFromInt(2455), .param_str = "V256bV256dV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10052 | // __builtin_ve_vl_vfmklnum_mvl | ||
| 10053 | .{ .tag = @enumFromInt(2456), .param_str = "V256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10054 | // __builtin_ve_vl_vfmklnum_mvml | ||
| 10055 | .{ .tag = @enumFromInt(2457), .param_str = "V256bV256dV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10056 | // __builtin_ve_vl_vfmkseq_mvl | ||
| 10057 | .{ .tag = @enumFromInt(2458), .param_str = "V256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10058 | // __builtin_ve_vl_vfmkseq_mvml | ||
| 10059 | .{ .tag = @enumFromInt(2459), .param_str = "V256bV256dV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10060 | // __builtin_ve_vl_vfmkseqnan_mvl | ||
| 10061 | .{ .tag = @enumFromInt(2460), .param_str = "V256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10062 | // __builtin_ve_vl_vfmkseqnan_mvml | ||
| 10063 | .{ .tag = @enumFromInt(2461), .param_str = "V256bV256dV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10064 | // __builtin_ve_vl_vfmksge_mvl | ||
| 10065 | .{ .tag = @enumFromInt(2462), .param_str = "V256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10066 | // __builtin_ve_vl_vfmksge_mvml | ||
| 10067 | .{ .tag = @enumFromInt(2463), .param_str = "V256bV256dV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10068 | // __builtin_ve_vl_vfmksgenan_mvl | ||
| 10069 | .{ .tag = @enumFromInt(2464), .param_str = "V256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10070 | // __builtin_ve_vl_vfmksgenan_mvml | ||
| 10071 | .{ .tag = @enumFromInt(2465), .param_str = "V256bV256dV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10072 | // __builtin_ve_vl_vfmksgt_mvl | ||
| 10073 | .{ .tag = @enumFromInt(2466), .param_str = "V256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10074 | // __builtin_ve_vl_vfmksgt_mvml | ||
| 10075 | .{ .tag = @enumFromInt(2467), .param_str = "V256bV256dV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10076 | // __builtin_ve_vl_vfmksgtnan_mvl | ||
| 10077 | .{ .tag = @enumFromInt(2468), .param_str = "V256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10078 | // __builtin_ve_vl_vfmksgtnan_mvml | ||
| 10079 | .{ .tag = @enumFromInt(2469), .param_str = "V256bV256dV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10080 | // __builtin_ve_vl_vfmksle_mvl | ||
| 10081 | .{ .tag = @enumFromInt(2470), .param_str = "V256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10082 | // __builtin_ve_vl_vfmksle_mvml | ||
| 10083 | .{ .tag = @enumFromInt(2471), .param_str = "V256bV256dV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10084 | // __builtin_ve_vl_vfmkslenan_mvl | ||
| 10085 | .{ .tag = @enumFromInt(2472), .param_str = "V256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10086 | // __builtin_ve_vl_vfmkslenan_mvml | ||
| 10087 | .{ .tag = @enumFromInt(2473), .param_str = "V256bV256dV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10088 | // __builtin_ve_vl_vfmkslt_mvl | ||
| 10089 | .{ .tag = @enumFromInt(2474), .param_str = "V256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10090 | // __builtin_ve_vl_vfmkslt_mvml | ||
| 10091 | .{ .tag = @enumFromInt(2475), .param_str = "V256bV256dV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10092 | // __builtin_ve_vl_vfmksltnan_mvl | ||
| 10093 | .{ .tag = @enumFromInt(2476), .param_str = "V256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10094 | // __builtin_ve_vl_vfmksltnan_mvml | ||
| 10095 | .{ .tag = @enumFromInt(2477), .param_str = "V256bV256dV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10096 | // __builtin_ve_vl_vfmksnan_mvl | ||
| 10097 | .{ .tag = @enumFromInt(2478), .param_str = "V256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10098 | // __builtin_ve_vl_vfmksnan_mvml | ||
| 10099 | .{ .tag = @enumFromInt(2479), .param_str = "V256bV256dV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10100 | // __builtin_ve_vl_vfmksne_mvl | ||
| 10101 | .{ .tag = @enumFromInt(2480), .param_str = "V256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10102 | // __builtin_ve_vl_vfmksne_mvml | ||
| 10103 | .{ .tag = @enumFromInt(2481), .param_str = "V256bV256dV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10104 | // __builtin_ve_vl_vfmksnenan_mvl | ||
| 10105 | .{ .tag = @enumFromInt(2482), .param_str = "V256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10106 | // __builtin_ve_vl_vfmksnenan_mvml | ||
| 10107 | .{ .tag = @enumFromInt(2483), .param_str = "V256bV256dV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10108 | // __builtin_ve_vl_vfmksnum_mvl | ||
| 10109 | .{ .tag = @enumFromInt(2484), .param_str = "V256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10110 | // __builtin_ve_vl_vfmksnum_mvml | ||
| 10111 | .{ .tag = @enumFromInt(2485), .param_str = "V256bV256dV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10112 | // __builtin_ve_vl_vfmkweq_mvl | ||
| 10113 | .{ .tag = @enumFromInt(2486), .param_str = "V256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10114 | // __builtin_ve_vl_vfmkweq_mvml | ||
| 10115 | .{ .tag = @enumFromInt(2487), .param_str = "V256bV256dV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10116 | // __builtin_ve_vl_vfmkweqnan_mvl | ||
| 10117 | .{ .tag = @enumFromInt(2488), .param_str = "V256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10118 | // __builtin_ve_vl_vfmkweqnan_mvml | ||
| 10119 | .{ .tag = @enumFromInt(2489), .param_str = "V256bV256dV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10120 | // __builtin_ve_vl_vfmkwge_mvl | ||
| 10121 | .{ .tag = @enumFromInt(2490), .param_str = "V256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10122 | // __builtin_ve_vl_vfmkwge_mvml | ||
| 10123 | .{ .tag = @enumFromInt(2491), .param_str = "V256bV256dV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10124 | // __builtin_ve_vl_vfmkwgenan_mvl | ||
| 10125 | .{ .tag = @enumFromInt(2492), .param_str = "V256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10126 | // __builtin_ve_vl_vfmkwgenan_mvml | ||
| 10127 | .{ .tag = @enumFromInt(2493), .param_str = "V256bV256dV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10128 | // __builtin_ve_vl_vfmkwgt_mvl | ||
| 10129 | .{ .tag = @enumFromInt(2494), .param_str = "V256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10130 | // __builtin_ve_vl_vfmkwgt_mvml | ||
| 10131 | .{ .tag = @enumFromInt(2495), .param_str = "V256bV256dV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10132 | // __builtin_ve_vl_vfmkwgtnan_mvl | ||
| 10133 | .{ .tag = @enumFromInt(2496), .param_str = "V256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10134 | // __builtin_ve_vl_vfmkwgtnan_mvml | ||
| 10135 | .{ .tag = @enumFromInt(2497), .param_str = "V256bV256dV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10136 | // __builtin_ve_vl_vfmkwle_mvl | ||
| 10137 | .{ .tag = @enumFromInt(2498), .param_str = "V256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10138 | // __builtin_ve_vl_vfmkwle_mvml | ||
| 10139 | .{ .tag = @enumFromInt(2499), .param_str = "V256bV256dV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10140 | // __builtin_ve_vl_vfmkwlenan_mvl | ||
| 10141 | .{ .tag = @enumFromInt(2500), .param_str = "V256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10142 | // __builtin_ve_vl_vfmkwlenan_mvml | ||
| 10143 | .{ .tag = @enumFromInt(2501), .param_str = "V256bV256dV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10144 | // __builtin_ve_vl_vfmkwlt_mvl | ||
| 10145 | .{ .tag = @enumFromInt(2502), .param_str = "V256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10146 | // __builtin_ve_vl_vfmkwlt_mvml | ||
| 10147 | .{ .tag = @enumFromInt(2503), .param_str = "V256bV256dV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10148 | // __builtin_ve_vl_vfmkwltnan_mvl | ||
| 10149 | .{ .tag = @enumFromInt(2504), .param_str = "V256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10150 | // __builtin_ve_vl_vfmkwltnan_mvml | ||
| 10151 | .{ .tag = @enumFromInt(2505), .param_str = "V256bV256dV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10152 | // __builtin_ve_vl_vfmkwnan_mvl | ||
| 10153 | .{ .tag = @enumFromInt(2506), .param_str = "V256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10154 | // __builtin_ve_vl_vfmkwnan_mvml | ||
| 10155 | .{ .tag = @enumFromInt(2507), .param_str = "V256bV256dV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10156 | // __builtin_ve_vl_vfmkwne_mvl | ||
| 10157 | .{ .tag = @enumFromInt(2508), .param_str = "V256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10158 | // __builtin_ve_vl_vfmkwne_mvml | ||
| 10159 | .{ .tag = @enumFromInt(2509), .param_str = "V256bV256dV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10160 | // __builtin_ve_vl_vfmkwnenan_mvl | ||
| 10161 | .{ .tag = @enumFromInt(2510), .param_str = "V256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10162 | // __builtin_ve_vl_vfmkwnenan_mvml | ||
| 10163 | .{ .tag = @enumFromInt(2511), .param_str = "V256bV256dV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10164 | // __builtin_ve_vl_vfmkwnum_mvl | ||
| 10165 | .{ .tag = @enumFromInt(2512), .param_str = "V256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10166 | // __builtin_ve_vl_vfmkwnum_mvml | ||
| 10167 | .{ .tag = @enumFromInt(2513), .param_str = "V256bV256dV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10168 | // __builtin_ve_vl_vfmsbd_vsvvl | ||
| 10169 | .{ .tag = @enumFromInt(2514), .param_str = "V256ddV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10170 | // __builtin_ve_vl_vfmsbd_vsvvmvl | ||
| 10171 | .{ .tag = @enumFromInt(2515), .param_str = "V256ddV256dV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10172 | // __builtin_ve_vl_vfmsbd_vsvvvl | ||
| 10173 | .{ .tag = @enumFromInt(2516), .param_str = "V256ddV256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10174 | // __builtin_ve_vl_vfmsbd_vvsvl | ||
| 10175 | .{ .tag = @enumFromInt(2517), .param_str = "V256dV256ddV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10176 | // __builtin_ve_vl_vfmsbd_vvsvmvl | ||
| 10177 | .{ .tag = @enumFromInt(2518), .param_str = "V256dV256ddV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10178 | // __builtin_ve_vl_vfmsbd_vvsvvl | ||
| 10179 | .{ .tag = @enumFromInt(2519), .param_str = "V256dV256ddV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10180 | // __builtin_ve_vl_vfmsbd_vvvvl | ||
| 10181 | .{ .tag = @enumFromInt(2520), .param_str = "V256dV256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10182 | // __builtin_ve_vl_vfmsbd_vvvvmvl | ||
| 10183 | .{ .tag = @enumFromInt(2521), .param_str = "V256dV256dV256dV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10184 | // __builtin_ve_vl_vfmsbd_vvvvvl | ||
| 10185 | .{ .tag = @enumFromInt(2522), .param_str = "V256dV256dV256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10186 | // __builtin_ve_vl_vfmsbs_vsvvl | ||
| 10187 | .{ .tag = @enumFromInt(2523), .param_str = "V256dfV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10188 | // __builtin_ve_vl_vfmsbs_vsvvmvl | ||
| 10189 | .{ .tag = @enumFromInt(2524), .param_str = "V256dfV256dV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10190 | // __builtin_ve_vl_vfmsbs_vsvvvl | ||
| 10191 | .{ .tag = @enumFromInt(2525), .param_str = "V256dfV256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10192 | // __builtin_ve_vl_vfmsbs_vvsvl | ||
| 10193 | .{ .tag = @enumFromInt(2526), .param_str = "V256dV256dfV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10194 | // __builtin_ve_vl_vfmsbs_vvsvmvl | ||
| 10195 | .{ .tag = @enumFromInt(2527), .param_str = "V256dV256dfV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10196 | // __builtin_ve_vl_vfmsbs_vvsvvl | ||
| 10197 | .{ .tag = @enumFromInt(2528), .param_str = "V256dV256dfV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10198 | // __builtin_ve_vl_vfmsbs_vvvvl | ||
| 10199 | .{ .tag = @enumFromInt(2529), .param_str = "V256dV256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10200 | // __builtin_ve_vl_vfmsbs_vvvvmvl | ||
| 10201 | .{ .tag = @enumFromInt(2530), .param_str = "V256dV256dV256dV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10202 | // __builtin_ve_vl_vfmsbs_vvvvvl | ||
| 10203 | .{ .tag = @enumFromInt(2531), .param_str = "V256dV256dV256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10204 | // __builtin_ve_vl_vfmuld_vsvl | ||
| 10205 | .{ .tag = @enumFromInt(2532), .param_str = "V256ddV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10206 | // __builtin_ve_vl_vfmuld_vsvmvl | ||
| 10207 | .{ .tag = @enumFromInt(2533), .param_str = "V256ddV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10208 | // __builtin_ve_vl_vfmuld_vsvvl | ||
| 10209 | .{ .tag = @enumFromInt(2534), .param_str = "V256ddV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10210 | // __builtin_ve_vl_vfmuld_vvvl | ||
| 10211 | .{ .tag = @enumFromInt(2535), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10212 | // __builtin_ve_vl_vfmuld_vvvmvl | ||
| 10213 | .{ .tag = @enumFromInt(2536), .param_str = "V256dV256dV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10214 | // __builtin_ve_vl_vfmuld_vvvvl | ||
| 10215 | .{ .tag = @enumFromInt(2537), .param_str = "V256dV256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10216 | // __builtin_ve_vl_vfmuls_vsvl | ||
| 10217 | .{ .tag = @enumFromInt(2538), .param_str = "V256dfV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10218 | // __builtin_ve_vl_vfmuls_vsvmvl | ||
| 10219 | .{ .tag = @enumFromInt(2539), .param_str = "V256dfV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10220 | // __builtin_ve_vl_vfmuls_vsvvl | ||
| 10221 | .{ .tag = @enumFromInt(2540), .param_str = "V256dfV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10222 | // __builtin_ve_vl_vfmuls_vvvl | ||
| 10223 | .{ .tag = @enumFromInt(2541), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10224 | // __builtin_ve_vl_vfmuls_vvvmvl | ||
| 10225 | .{ .tag = @enumFromInt(2542), .param_str = "V256dV256dV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10226 | // __builtin_ve_vl_vfmuls_vvvvl | ||
| 10227 | .{ .tag = @enumFromInt(2543), .param_str = "V256dV256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10228 | // __builtin_ve_vl_vfnmadd_vsvvl | ||
| 10229 | .{ .tag = @enumFromInt(2544), .param_str = "V256ddV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10230 | // __builtin_ve_vl_vfnmadd_vsvvmvl | ||
| 10231 | .{ .tag = @enumFromInt(2545), .param_str = "V256ddV256dV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10232 | // __builtin_ve_vl_vfnmadd_vsvvvl | ||
| 10233 | .{ .tag = @enumFromInt(2546), .param_str = "V256ddV256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10234 | // __builtin_ve_vl_vfnmadd_vvsvl | ||
| 10235 | .{ .tag = @enumFromInt(2547), .param_str = "V256dV256ddV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10236 | // __builtin_ve_vl_vfnmadd_vvsvmvl | ||
| 10237 | .{ .tag = @enumFromInt(2548), .param_str = "V256dV256ddV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10238 | // __builtin_ve_vl_vfnmadd_vvsvvl | ||
| 10239 | .{ .tag = @enumFromInt(2549), .param_str = "V256dV256ddV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10240 | // __builtin_ve_vl_vfnmadd_vvvvl | ||
| 10241 | .{ .tag = @enumFromInt(2550), .param_str = "V256dV256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10242 | // __builtin_ve_vl_vfnmadd_vvvvmvl | ||
| 10243 | .{ .tag = @enumFromInt(2551), .param_str = "V256dV256dV256dV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10244 | // __builtin_ve_vl_vfnmadd_vvvvvl | ||
| 10245 | .{ .tag = @enumFromInt(2552), .param_str = "V256dV256dV256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10246 | // __builtin_ve_vl_vfnmads_vsvvl | ||
| 10247 | .{ .tag = @enumFromInt(2553), .param_str = "V256dfV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10248 | // __builtin_ve_vl_vfnmads_vsvvmvl | ||
| 10249 | .{ .tag = @enumFromInt(2554), .param_str = "V256dfV256dV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10250 | // __builtin_ve_vl_vfnmads_vsvvvl | ||
| 10251 | .{ .tag = @enumFromInt(2555), .param_str = "V256dfV256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10252 | // __builtin_ve_vl_vfnmads_vvsvl | ||
| 10253 | .{ .tag = @enumFromInt(2556), .param_str = "V256dV256dfV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10254 | // __builtin_ve_vl_vfnmads_vvsvmvl | ||
| 10255 | .{ .tag = @enumFromInt(2557), .param_str = "V256dV256dfV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10256 | // __builtin_ve_vl_vfnmads_vvsvvl | ||
| 10257 | .{ .tag = @enumFromInt(2558), .param_str = "V256dV256dfV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10258 | // __builtin_ve_vl_vfnmads_vvvvl | ||
| 10259 | .{ .tag = @enumFromInt(2559), .param_str = "V256dV256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10260 | // __builtin_ve_vl_vfnmads_vvvvmvl | ||
| 10261 | .{ .tag = @enumFromInt(2560), .param_str = "V256dV256dV256dV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10262 | // __builtin_ve_vl_vfnmads_vvvvvl | ||
| 10263 | .{ .tag = @enumFromInt(2561), .param_str = "V256dV256dV256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10264 | // __builtin_ve_vl_vfnmsbd_vsvvl | ||
| 10265 | .{ .tag = @enumFromInt(2562), .param_str = "V256ddV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10266 | // __builtin_ve_vl_vfnmsbd_vsvvmvl | ||
| 10267 | .{ .tag = @enumFromInt(2563), .param_str = "V256ddV256dV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10268 | // __builtin_ve_vl_vfnmsbd_vsvvvl | ||
| 10269 | .{ .tag = @enumFromInt(2564), .param_str = "V256ddV256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10270 | // __builtin_ve_vl_vfnmsbd_vvsvl | ||
| 10271 | .{ .tag = @enumFromInt(2565), .param_str = "V256dV256ddV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10272 | // __builtin_ve_vl_vfnmsbd_vvsvmvl | ||
| 10273 | .{ .tag = @enumFromInt(2566), .param_str = "V256dV256ddV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10274 | // __builtin_ve_vl_vfnmsbd_vvsvvl | ||
| 10275 | .{ .tag = @enumFromInt(2567), .param_str = "V256dV256ddV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10276 | // __builtin_ve_vl_vfnmsbd_vvvvl | ||
| 10277 | .{ .tag = @enumFromInt(2568), .param_str = "V256dV256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10278 | // __builtin_ve_vl_vfnmsbd_vvvvmvl | ||
| 10279 | .{ .tag = @enumFromInt(2569), .param_str = "V256dV256dV256dV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10280 | // __builtin_ve_vl_vfnmsbd_vvvvvl | ||
| 10281 | .{ .tag = @enumFromInt(2570), .param_str = "V256dV256dV256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10282 | // __builtin_ve_vl_vfnmsbs_vsvvl | ||
| 10283 | .{ .tag = @enumFromInt(2571), .param_str = "V256dfV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10284 | // __builtin_ve_vl_vfnmsbs_vsvvmvl | ||
| 10285 | .{ .tag = @enumFromInt(2572), .param_str = "V256dfV256dV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10286 | // __builtin_ve_vl_vfnmsbs_vsvvvl | ||
| 10287 | .{ .tag = @enumFromInt(2573), .param_str = "V256dfV256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10288 | // __builtin_ve_vl_vfnmsbs_vvsvl | ||
| 10289 | .{ .tag = @enumFromInt(2574), .param_str = "V256dV256dfV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10290 | // __builtin_ve_vl_vfnmsbs_vvsvmvl | ||
| 10291 | .{ .tag = @enumFromInt(2575), .param_str = "V256dV256dfV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10292 | // __builtin_ve_vl_vfnmsbs_vvsvvl | ||
| 10293 | .{ .tag = @enumFromInt(2576), .param_str = "V256dV256dfV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10294 | // __builtin_ve_vl_vfnmsbs_vvvvl | ||
| 10295 | .{ .tag = @enumFromInt(2577), .param_str = "V256dV256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10296 | // __builtin_ve_vl_vfnmsbs_vvvvmvl | ||
| 10297 | .{ .tag = @enumFromInt(2578), .param_str = "V256dV256dV256dV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10298 | // __builtin_ve_vl_vfnmsbs_vvvvvl | ||
| 10299 | .{ .tag = @enumFromInt(2579), .param_str = "V256dV256dV256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10300 | // __builtin_ve_vl_vfrmaxdfst_vvl | ||
| 10301 | .{ .tag = @enumFromInt(2580), .param_str = "V256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10302 | // __builtin_ve_vl_vfrmaxdfst_vvvl | ||
| 10303 | .{ .tag = @enumFromInt(2581), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10304 | // __builtin_ve_vl_vfrmaxdlst_vvl | ||
| 10305 | .{ .tag = @enumFromInt(2582), .param_str = "V256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10306 | // __builtin_ve_vl_vfrmaxdlst_vvvl | ||
| 10307 | .{ .tag = @enumFromInt(2583), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10308 | // __builtin_ve_vl_vfrmaxsfst_vvl | ||
| 10309 | .{ .tag = @enumFromInt(2584), .param_str = "V256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10310 | // __builtin_ve_vl_vfrmaxsfst_vvvl | ||
| 10311 | .{ .tag = @enumFromInt(2585), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10312 | // __builtin_ve_vl_vfrmaxslst_vvl | ||
| 10313 | .{ .tag = @enumFromInt(2586), .param_str = "V256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10314 | // __builtin_ve_vl_vfrmaxslst_vvvl | ||
| 10315 | .{ .tag = @enumFromInt(2587), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10316 | // __builtin_ve_vl_vfrmindfst_vvl | ||
| 10317 | .{ .tag = @enumFromInt(2588), .param_str = "V256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10318 | // __builtin_ve_vl_vfrmindfst_vvvl | ||
| 10319 | .{ .tag = @enumFromInt(2589), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10320 | // __builtin_ve_vl_vfrmindlst_vvl | ||
| 10321 | .{ .tag = @enumFromInt(2590), .param_str = "V256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10322 | // __builtin_ve_vl_vfrmindlst_vvvl | ||
| 10323 | .{ .tag = @enumFromInt(2591), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10324 | // __builtin_ve_vl_vfrminsfst_vvl | ||
| 10325 | .{ .tag = @enumFromInt(2592), .param_str = "V256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10326 | // __builtin_ve_vl_vfrminsfst_vvvl | ||
| 10327 | .{ .tag = @enumFromInt(2593), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10328 | // __builtin_ve_vl_vfrminslst_vvl | ||
| 10329 | .{ .tag = @enumFromInt(2594), .param_str = "V256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10330 | // __builtin_ve_vl_vfrminslst_vvvl | ||
| 10331 | .{ .tag = @enumFromInt(2595), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10332 | // __builtin_ve_vl_vfsqrtd_vvl | ||
| 10333 | .{ .tag = @enumFromInt(2596), .param_str = "V256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10334 | // __builtin_ve_vl_vfsqrtd_vvvl | ||
| 10335 | .{ .tag = @enumFromInt(2597), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10336 | // __builtin_ve_vl_vfsqrts_vvl | ||
| 10337 | .{ .tag = @enumFromInt(2598), .param_str = "V256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10338 | // __builtin_ve_vl_vfsqrts_vvvl | ||
| 10339 | .{ .tag = @enumFromInt(2599), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10340 | // __builtin_ve_vl_vfsubd_vsvl | ||
| 10341 | .{ .tag = @enumFromInt(2600), .param_str = "V256ddV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10342 | // __builtin_ve_vl_vfsubd_vsvmvl | ||
| 10343 | .{ .tag = @enumFromInt(2601), .param_str = "V256ddV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10344 | // __builtin_ve_vl_vfsubd_vsvvl | ||
| 10345 | .{ .tag = @enumFromInt(2602), .param_str = "V256ddV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10346 | // __builtin_ve_vl_vfsubd_vvvl | ||
| 10347 | .{ .tag = @enumFromInt(2603), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10348 | // __builtin_ve_vl_vfsubd_vvvmvl | ||
| 10349 | .{ .tag = @enumFromInt(2604), .param_str = "V256dV256dV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10350 | // __builtin_ve_vl_vfsubd_vvvvl | ||
| 10351 | .{ .tag = @enumFromInt(2605), .param_str = "V256dV256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10352 | // __builtin_ve_vl_vfsubs_vsvl | ||
| 10353 | .{ .tag = @enumFromInt(2606), .param_str = "V256dfV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10354 | // __builtin_ve_vl_vfsubs_vsvmvl | ||
| 10355 | .{ .tag = @enumFromInt(2607), .param_str = "V256dfV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10356 | // __builtin_ve_vl_vfsubs_vsvvl | ||
| 10357 | .{ .tag = @enumFromInt(2608), .param_str = "V256dfV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10358 | // __builtin_ve_vl_vfsubs_vvvl | ||
| 10359 | .{ .tag = @enumFromInt(2609), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10360 | // __builtin_ve_vl_vfsubs_vvvmvl | ||
| 10361 | .{ .tag = @enumFromInt(2610), .param_str = "V256dV256dV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10362 | // __builtin_ve_vl_vfsubs_vvvvl | ||
| 10363 | .{ .tag = @enumFromInt(2611), .param_str = "V256dV256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10364 | // __builtin_ve_vl_vfsumd_vvl | ||
| 10365 | .{ .tag = @enumFromInt(2612), .param_str = "V256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10366 | // __builtin_ve_vl_vfsumd_vvml | ||
| 10367 | .{ .tag = @enumFromInt(2613), .param_str = "V256dV256dV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10368 | // __builtin_ve_vl_vfsums_vvl | ||
| 10369 | .{ .tag = @enumFromInt(2614), .param_str = "V256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10370 | // __builtin_ve_vl_vfsums_vvml | ||
| 10371 | .{ .tag = @enumFromInt(2615), .param_str = "V256dV256dV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10372 | // __builtin_ve_vl_vgt_vvssl | ||
| 10373 | .{ .tag = @enumFromInt(2616), .param_str = "V256dV256dLUiLUiUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10374 | // __builtin_ve_vl_vgt_vvssml | ||
| 10375 | .{ .tag = @enumFromInt(2617), .param_str = "V256dV256dLUiLUiV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10376 | // __builtin_ve_vl_vgt_vvssmvl | ||
| 10377 | .{ .tag = @enumFromInt(2618), .param_str = "V256dV256dLUiLUiV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10378 | // __builtin_ve_vl_vgt_vvssvl | ||
| 10379 | .{ .tag = @enumFromInt(2619), .param_str = "V256dV256dLUiLUiV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10380 | // __builtin_ve_vl_vgtlsx_vvssl | ||
| 10381 | .{ .tag = @enumFromInt(2620), .param_str = "V256dV256dLUiLUiUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10382 | // __builtin_ve_vl_vgtlsx_vvssml | ||
| 10383 | .{ .tag = @enumFromInt(2621), .param_str = "V256dV256dLUiLUiV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10384 | // __builtin_ve_vl_vgtlsx_vvssmvl | ||
| 10385 | .{ .tag = @enumFromInt(2622), .param_str = "V256dV256dLUiLUiV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10386 | // __builtin_ve_vl_vgtlsx_vvssvl | ||
| 10387 | .{ .tag = @enumFromInt(2623), .param_str = "V256dV256dLUiLUiV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10388 | // __builtin_ve_vl_vgtlsxnc_vvssl | ||
| 10389 | .{ .tag = @enumFromInt(2624), .param_str = "V256dV256dLUiLUiUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10390 | // __builtin_ve_vl_vgtlsxnc_vvssml | ||
| 10391 | .{ .tag = @enumFromInt(2625), .param_str = "V256dV256dLUiLUiV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10392 | // __builtin_ve_vl_vgtlsxnc_vvssmvl | ||
| 10393 | .{ .tag = @enumFromInt(2626), .param_str = "V256dV256dLUiLUiV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10394 | // __builtin_ve_vl_vgtlsxnc_vvssvl | ||
| 10395 | .{ .tag = @enumFromInt(2627), .param_str = "V256dV256dLUiLUiV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10396 | // __builtin_ve_vl_vgtlzx_vvssl | ||
| 10397 | .{ .tag = @enumFromInt(2628), .param_str = "V256dV256dLUiLUiUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10398 | // __builtin_ve_vl_vgtlzx_vvssml | ||
| 10399 | .{ .tag = @enumFromInt(2629), .param_str = "V256dV256dLUiLUiV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10400 | // __builtin_ve_vl_vgtlzx_vvssmvl | ||
| 10401 | .{ .tag = @enumFromInt(2630), .param_str = "V256dV256dLUiLUiV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10402 | // __builtin_ve_vl_vgtlzx_vvssvl | ||
| 10403 | .{ .tag = @enumFromInt(2631), .param_str = "V256dV256dLUiLUiV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10404 | // __builtin_ve_vl_vgtlzxnc_vvssl | ||
| 10405 | .{ .tag = @enumFromInt(2632), .param_str = "V256dV256dLUiLUiUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10406 | // __builtin_ve_vl_vgtlzxnc_vvssml | ||
| 10407 | .{ .tag = @enumFromInt(2633), .param_str = "V256dV256dLUiLUiV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10408 | // __builtin_ve_vl_vgtlzxnc_vvssmvl | ||
| 10409 | .{ .tag = @enumFromInt(2634), .param_str = "V256dV256dLUiLUiV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10410 | // __builtin_ve_vl_vgtlzxnc_vvssvl | ||
| 10411 | .{ .tag = @enumFromInt(2635), .param_str = "V256dV256dLUiLUiV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10412 | // __builtin_ve_vl_vgtnc_vvssl | ||
| 10413 | .{ .tag = @enumFromInt(2636), .param_str = "V256dV256dLUiLUiUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10414 | // __builtin_ve_vl_vgtnc_vvssml | ||
| 10415 | .{ .tag = @enumFromInt(2637), .param_str = "V256dV256dLUiLUiV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10416 | // __builtin_ve_vl_vgtnc_vvssmvl | ||
| 10417 | .{ .tag = @enumFromInt(2638), .param_str = "V256dV256dLUiLUiV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10418 | // __builtin_ve_vl_vgtnc_vvssvl | ||
| 10419 | .{ .tag = @enumFromInt(2639), .param_str = "V256dV256dLUiLUiV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10420 | // __builtin_ve_vl_vgtu_vvssl | ||
| 10421 | .{ .tag = @enumFromInt(2640), .param_str = "V256dV256dLUiLUiUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10422 | // __builtin_ve_vl_vgtu_vvssml | ||
| 10423 | .{ .tag = @enumFromInt(2641), .param_str = "V256dV256dLUiLUiV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10424 | // __builtin_ve_vl_vgtu_vvssmvl | ||
| 10425 | .{ .tag = @enumFromInt(2642), .param_str = "V256dV256dLUiLUiV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10426 | // __builtin_ve_vl_vgtu_vvssvl | ||
| 10427 | .{ .tag = @enumFromInt(2643), .param_str = "V256dV256dLUiLUiV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10428 | // __builtin_ve_vl_vgtunc_vvssl | ||
| 10429 | .{ .tag = @enumFromInt(2644), .param_str = "V256dV256dLUiLUiUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10430 | // __builtin_ve_vl_vgtunc_vvssml | ||
| 10431 | .{ .tag = @enumFromInt(2645), .param_str = "V256dV256dLUiLUiV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10432 | // __builtin_ve_vl_vgtunc_vvssmvl | ||
| 10433 | .{ .tag = @enumFromInt(2646), .param_str = "V256dV256dLUiLUiV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10434 | // __builtin_ve_vl_vgtunc_vvssvl | ||
| 10435 | .{ .tag = @enumFromInt(2647), .param_str = "V256dV256dLUiLUiV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10436 | // __builtin_ve_vl_vld2d_vssl | ||
| 10437 | .{ .tag = @enumFromInt(2648), .param_str = "V256dLUivC*Ui", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10438 | // __builtin_ve_vl_vld2d_vssvl | ||
| 10439 | .{ .tag = @enumFromInt(2649), .param_str = "V256dLUivC*V256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10440 | // __builtin_ve_vl_vld2dnc_vssl | ||
| 10441 | .{ .tag = @enumFromInt(2650), .param_str = "V256dLUivC*Ui", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10442 | // __builtin_ve_vl_vld2dnc_vssvl | ||
| 10443 | .{ .tag = @enumFromInt(2651), .param_str = "V256dLUivC*V256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10444 | // __builtin_ve_vl_vld_vssl | ||
| 10445 | .{ .tag = @enumFromInt(2652), .param_str = "V256dLUivC*Ui", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10446 | // __builtin_ve_vl_vld_vssvl | ||
| 10447 | .{ .tag = @enumFromInt(2653), .param_str = "V256dLUivC*V256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10448 | // __builtin_ve_vl_vldl2dsx_vssl | ||
| 10449 | .{ .tag = @enumFromInt(2654), .param_str = "V256dLUivC*Ui", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10450 | // __builtin_ve_vl_vldl2dsx_vssvl | ||
| 10451 | .{ .tag = @enumFromInt(2655), .param_str = "V256dLUivC*V256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10452 | // __builtin_ve_vl_vldl2dsxnc_vssl | ||
| 10453 | .{ .tag = @enumFromInt(2656), .param_str = "V256dLUivC*Ui", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10454 | // __builtin_ve_vl_vldl2dsxnc_vssvl | ||
| 10455 | .{ .tag = @enumFromInt(2657), .param_str = "V256dLUivC*V256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10456 | // __builtin_ve_vl_vldl2dzx_vssl | ||
| 10457 | .{ .tag = @enumFromInt(2658), .param_str = "V256dLUivC*Ui", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10458 | // __builtin_ve_vl_vldl2dzx_vssvl | ||
| 10459 | .{ .tag = @enumFromInt(2659), .param_str = "V256dLUivC*V256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10460 | // __builtin_ve_vl_vldl2dzxnc_vssl | ||
| 10461 | .{ .tag = @enumFromInt(2660), .param_str = "V256dLUivC*Ui", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10462 | // __builtin_ve_vl_vldl2dzxnc_vssvl | ||
| 10463 | .{ .tag = @enumFromInt(2661), .param_str = "V256dLUivC*V256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10464 | // __builtin_ve_vl_vldlsx_vssl | ||
| 10465 | .{ .tag = @enumFromInt(2662), .param_str = "V256dLUivC*Ui", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10466 | // __builtin_ve_vl_vldlsx_vssvl | ||
| 10467 | .{ .tag = @enumFromInt(2663), .param_str = "V256dLUivC*V256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10468 | // __builtin_ve_vl_vldlsxnc_vssl | ||
| 10469 | .{ .tag = @enumFromInt(2664), .param_str = "V256dLUivC*Ui", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10470 | // __builtin_ve_vl_vldlsxnc_vssvl | ||
| 10471 | .{ .tag = @enumFromInt(2665), .param_str = "V256dLUivC*V256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10472 | // __builtin_ve_vl_vldlzx_vssl | ||
| 10473 | .{ .tag = @enumFromInt(2666), .param_str = "V256dLUivC*Ui", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10474 | // __builtin_ve_vl_vldlzx_vssvl | ||
| 10475 | .{ .tag = @enumFromInt(2667), .param_str = "V256dLUivC*V256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10476 | // __builtin_ve_vl_vldlzxnc_vssl | ||
| 10477 | .{ .tag = @enumFromInt(2668), .param_str = "V256dLUivC*Ui", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10478 | // __builtin_ve_vl_vldlzxnc_vssvl | ||
| 10479 | .{ .tag = @enumFromInt(2669), .param_str = "V256dLUivC*V256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10480 | // __builtin_ve_vl_vldnc_vssl | ||
| 10481 | .{ .tag = @enumFromInt(2670), .param_str = "V256dLUivC*Ui", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10482 | // __builtin_ve_vl_vldnc_vssvl | ||
| 10483 | .{ .tag = @enumFromInt(2671), .param_str = "V256dLUivC*V256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10484 | // __builtin_ve_vl_vldu2d_vssl | ||
| 10485 | .{ .tag = @enumFromInt(2672), .param_str = "V256dLUivC*Ui", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10486 | // __builtin_ve_vl_vldu2d_vssvl | ||
| 10487 | .{ .tag = @enumFromInt(2673), .param_str = "V256dLUivC*V256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10488 | // __builtin_ve_vl_vldu2dnc_vssl | ||
| 10489 | .{ .tag = @enumFromInt(2674), .param_str = "V256dLUivC*Ui", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10490 | // __builtin_ve_vl_vldu2dnc_vssvl | ||
| 10491 | .{ .tag = @enumFromInt(2675), .param_str = "V256dLUivC*V256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10492 | // __builtin_ve_vl_vldu_vssl | ||
| 10493 | .{ .tag = @enumFromInt(2676), .param_str = "V256dLUivC*Ui", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10494 | // __builtin_ve_vl_vldu_vssvl | ||
| 10495 | .{ .tag = @enumFromInt(2677), .param_str = "V256dLUivC*V256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10496 | // __builtin_ve_vl_vldunc_vssl | ||
| 10497 | .{ .tag = @enumFromInt(2678), .param_str = "V256dLUivC*Ui", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10498 | // __builtin_ve_vl_vldunc_vssvl | ||
| 10499 | .{ .tag = @enumFromInt(2679), .param_str = "V256dLUivC*V256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10500 | // __builtin_ve_vl_vldz_vvl | ||
| 10501 | .{ .tag = @enumFromInt(2680), .param_str = "V256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10502 | // __builtin_ve_vl_vldz_vvmvl | ||
| 10503 | .{ .tag = @enumFromInt(2681), .param_str = "V256dV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10504 | // __builtin_ve_vl_vldz_vvvl | ||
| 10505 | .{ .tag = @enumFromInt(2682), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10506 | // __builtin_ve_vl_vmaxsl_vsvl | ||
| 10507 | .{ .tag = @enumFromInt(2683), .param_str = "V256dLiV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10508 | // __builtin_ve_vl_vmaxsl_vsvmvl | ||
| 10509 | .{ .tag = @enumFromInt(2684), .param_str = "V256dLiV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10510 | // __builtin_ve_vl_vmaxsl_vsvvl | ||
| 10511 | .{ .tag = @enumFromInt(2685), .param_str = "V256dLiV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10512 | // __builtin_ve_vl_vmaxsl_vvvl | ||
| 10513 | .{ .tag = @enumFromInt(2686), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10514 | // __builtin_ve_vl_vmaxsl_vvvmvl | ||
| 10515 | .{ .tag = @enumFromInt(2687), .param_str = "V256dV256dV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10516 | // __builtin_ve_vl_vmaxsl_vvvvl | ||
| 10517 | .{ .tag = @enumFromInt(2688), .param_str = "V256dV256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10518 | // __builtin_ve_vl_vmaxswsx_vsvl | ||
| 10519 | .{ .tag = @enumFromInt(2689), .param_str = "V256diV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10520 | // __builtin_ve_vl_vmaxswsx_vsvmvl | ||
| 10521 | .{ .tag = @enumFromInt(2690), .param_str = "V256diV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10522 | // __builtin_ve_vl_vmaxswsx_vsvvl | ||
| 10523 | .{ .tag = @enumFromInt(2691), .param_str = "V256diV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10524 | // __builtin_ve_vl_vmaxswsx_vvvl | ||
| 10525 | .{ .tag = @enumFromInt(2692), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10526 | // __builtin_ve_vl_vmaxswsx_vvvmvl | ||
| 10527 | .{ .tag = @enumFromInt(2693), .param_str = "V256dV256dV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10528 | // __builtin_ve_vl_vmaxswsx_vvvvl | ||
| 10529 | .{ .tag = @enumFromInt(2694), .param_str = "V256dV256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10530 | // __builtin_ve_vl_vmaxswzx_vsvl | ||
| 10531 | .{ .tag = @enumFromInt(2695), .param_str = "V256diV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10532 | // __builtin_ve_vl_vmaxswzx_vsvmvl | ||
| 10533 | .{ .tag = @enumFromInt(2696), .param_str = "V256diV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10534 | // __builtin_ve_vl_vmaxswzx_vsvvl | ||
| 10535 | .{ .tag = @enumFromInt(2697), .param_str = "V256diV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10536 | // __builtin_ve_vl_vmaxswzx_vvvl | ||
| 10537 | .{ .tag = @enumFromInt(2698), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10538 | // __builtin_ve_vl_vmaxswzx_vvvmvl | ||
| 10539 | .{ .tag = @enumFromInt(2699), .param_str = "V256dV256dV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10540 | // __builtin_ve_vl_vmaxswzx_vvvvl | ||
| 10541 | .{ .tag = @enumFromInt(2700), .param_str = "V256dV256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10542 | // __builtin_ve_vl_vminsl_vsvl | ||
| 10543 | .{ .tag = @enumFromInt(2701), .param_str = "V256dLiV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10544 | // __builtin_ve_vl_vminsl_vsvmvl | ||
| 10545 | .{ .tag = @enumFromInt(2702), .param_str = "V256dLiV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10546 | // __builtin_ve_vl_vminsl_vsvvl | ||
| 10547 | .{ .tag = @enumFromInt(2703), .param_str = "V256dLiV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10548 | // __builtin_ve_vl_vminsl_vvvl | ||
| 10549 | .{ .tag = @enumFromInt(2704), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10550 | // __builtin_ve_vl_vminsl_vvvmvl | ||
| 10551 | .{ .tag = @enumFromInt(2705), .param_str = "V256dV256dV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10552 | // __builtin_ve_vl_vminsl_vvvvl | ||
| 10553 | .{ .tag = @enumFromInt(2706), .param_str = "V256dV256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10554 | // __builtin_ve_vl_vminswsx_vsvl | ||
| 10555 | .{ .tag = @enumFromInt(2707), .param_str = "V256diV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10556 | // __builtin_ve_vl_vminswsx_vsvmvl | ||
| 10557 | .{ .tag = @enumFromInt(2708), .param_str = "V256diV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10558 | // __builtin_ve_vl_vminswsx_vsvvl | ||
| 10559 | .{ .tag = @enumFromInt(2709), .param_str = "V256diV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10560 | // __builtin_ve_vl_vminswsx_vvvl | ||
| 10561 | .{ .tag = @enumFromInt(2710), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10562 | // __builtin_ve_vl_vminswsx_vvvmvl | ||
| 10563 | .{ .tag = @enumFromInt(2711), .param_str = "V256dV256dV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10564 | // __builtin_ve_vl_vminswsx_vvvvl | ||
| 10565 | .{ .tag = @enumFromInt(2712), .param_str = "V256dV256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10566 | // __builtin_ve_vl_vminswzx_vsvl | ||
| 10567 | .{ .tag = @enumFromInt(2713), .param_str = "V256diV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10568 | // __builtin_ve_vl_vminswzx_vsvmvl | ||
| 10569 | .{ .tag = @enumFromInt(2714), .param_str = "V256diV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10570 | // __builtin_ve_vl_vminswzx_vsvvl | ||
| 10571 | .{ .tag = @enumFromInt(2715), .param_str = "V256diV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10572 | // __builtin_ve_vl_vminswzx_vvvl | ||
| 10573 | .{ .tag = @enumFromInt(2716), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10574 | // __builtin_ve_vl_vminswzx_vvvmvl | ||
| 10575 | .{ .tag = @enumFromInt(2717), .param_str = "V256dV256dV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10576 | // __builtin_ve_vl_vminswzx_vvvvl | ||
| 10577 | .{ .tag = @enumFromInt(2718), .param_str = "V256dV256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10578 | // __builtin_ve_vl_vmrg_vsvml | ||
| 10579 | .{ .tag = @enumFromInt(2719), .param_str = "V256dLUiV256dV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10580 | // __builtin_ve_vl_vmrg_vsvmvl | ||
| 10581 | .{ .tag = @enumFromInt(2720), .param_str = "V256dLUiV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10582 | // __builtin_ve_vl_vmrg_vvvml | ||
| 10583 | .{ .tag = @enumFromInt(2721), .param_str = "V256dV256dV256dV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10584 | // __builtin_ve_vl_vmrg_vvvmvl | ||
| 10585 | .{ .tag = @enumFromInt(2722), .param_str = "V256dV256dV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10586 | // __builtin_ve_vl_vmrgw_vsvMl | ||
| 10587 | .{ .tag = @enumFromInt(2723), .param_str = "V256dUiV256dV512bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10588 | // __builtin_ve_vl_vmrgw_vsvMvl | ||
| 10589 | .{ .tag = @enumFromInt(2724), .param_str = "V256dUiV256dV512bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10590 | // __builtin_ve_vl_vmrgw_vvvMl | ||
| 10591 | .{ .tag = @enumFromInt(2725), .param_str = "V256dV256dV256dV512bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10592 | // __builtin_ve_vl_vmrgw_vvvMvl | ||
| 10593 | .{ .tag = @enumFromInt(2726), .param_str = "V256dV256dV256dV512bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10594 | // __builtin_ve_vl_vmulsl_vsvl | ||
| 10595 | .{ .tag = @enumFromInt(2727), .param_str = "V256dLiV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10596 | // __builtin_ve_vl_vmulsl_vsvmvl | ||
| 10597 | .{ .tag = @enumFromInt(2728), .param_str = "V256dLiV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10598 | // __builtin_ve_vl_vmulsl_vsvvl | ||
| 10599 | .{ .tag = @enumFromInt(2729), .param_str = "V256dLiV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10600 | // __builtin_ve_vl_vmulsl_vvvl | ||
| 10601 | .{ .tag = @enumFromInt(2730), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10602 | // __builtin_ve_vl_vmulsl_vvvmvl | ||
| 10603 | .{ .tag = @enumFromInt(2731), .param_str = "V256dV256dV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10604 | // __builtin_ve_vl_vmulsl_vvvvl | ||
| 10605 | .{ .tag = @enumFromInt(2732), .param_str = "V256dV256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10606 | // __builtin_ve_vl_vmulslw_vsvl | ||
| 10607 | .{ .tag = @enumFromInt(2733), .param_str = "V256diV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10608 | // __builtin_ve_vl_vmulslw_vsvvl | ||
| 10609 | .{ .tag = @enumFromInt(2734), .param_str = "V256diV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10610 | // __builtin_ve_vl_vmulslw_vvvl | ||
| 10611 | .{ .tag = @enumFromInt(2735), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10612 | // __builtin_ve_vl_vmulslw_vvvvl | ||
| 10613 | .{ .tag = @enumFromInt(2736), .param_str = "V256dV256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10614 | // __builtin_ve_vl_vmulswsx_vsvl | ||
| 10615 | .{ .tag = @enumFromInt(2737), .param_str = "V256diV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10616 | // __builtin_ve_vl_vmulswsx_vsvmvl | ||
| 10617 | .{ .tag = @enumFromInt(2738), .param_str = "V256diV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10618 | // __builtin_ve_vl_vmulswsx_vsvvl | ||
| 10619 | .{ .tag = @enumFromInt(2739), .param_str = "V256diV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10620 | // __builtin_ve_vl_vmulswsx_vvvl | ||
| 10621 | .{ .tag = @enumFromInt(2740), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10622 | // __builtin_ve_vl_vmulswsx_vvvmvl | ||
| 10623 | .{ .tag = @enumFromInt(2741), .param_str = "V256dV256dV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10624 | // __builtin_ve_vl_vmulswsx_vvvvl | ||
| 10625 | .{ .tag = @enumFromInt(2742), .param_str = "V256dV256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10626 | // __builtin_ve_vl_vmulswzx_vsvl | ||
| 10627 | .{ .tag = @enumFromInt(2743), .param_str = "V256diV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10628 | // __builtin_ve_vl_vmulswzx_vsvmvl | ||
| 10629 | .{ .tag = @enumFromInt(2744), .param_str = "V256diV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10630 | // __builtin_ve_vl_vmulswzx_vsvvl | ||
| 10631 | .{ .tag = @enumFromInt(2745), .param_str = "V256diV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10632 | // __builtin_ve_vl_vmulswzx_vvvl | ||
| 10633 | .{ .tag = @enumFromInt(2746), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10634 | // __builtin_ve_vl_vmulswzx_vvvmvl | ||
| 10635 | .{ .tag = @enumFromInt(2747), .param_str = "V256dV256dV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10636 | // __builtin_ve_vl_vmulswzx_vvvvl | ||
| 10637 | .{ .tag = @enumFromInt(2748), .param_str = "V256dV256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10638 | // __builtin_ve_vl_vmulul_vsvl | ||
| 10639 | .{ .tag = @enumFromInt(2749), .param_str = "V256dLUiV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10640 | // __builtin_ve_vl_vmulul_vsvmvl | ||
| 10641 | .{ .tag = @enumFromInt(2750), .param_str = "V256dLUiV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10642 | // __builtin_ve_vl_vmulul_vsvvl | ||
| 10643 | .{ .tag = @enumFromInt(2751), .param_str = "V256dLUiV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10644 | // __builtin_ve_vl_vmulul_vvvl | ||
| 10645 | .{ .tag = @enumFromInt(2752), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10646 | // __builtin_ve_vl_vmulul_vvvmvl | ||
| 10647 | .{ .tag = @enumFromInt(2753), .param_str = "V256dV256dV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10648 | // __builtin_ve_vl_vmulul_vvvvl | ||
| 10649 | .{ .tag = @enumFromInt(2754), .param_str = "V256dV256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10650 | // __builtin_ve_vl_vmuluw_vsvl | ||
| 10651 | .{ .tag = @enumFromInt(2755), .param_str = "V256dUiV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10652 | // __builtin_ve_vl_vmuluw_vsvmvl | ||
| 10653 | .{ .tag = @enumFromInt(2756), .param_str = "V256dUiV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10654 | // __builtin_ve_vl_vmuluw_vsvvl | ||
| 10655 | .{ .tag = @enumFromInt(2757), .param_str = "V256dUiV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10656 | // __builtin_ve_vl_vmuluw_vvvl | ||
| 10657 | .{ .tag = @enumFromInt(2758), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10658 | // __builtin_ve_vl_vmuluw_vvvmvl | ||
| 10659 | .{ .tag = @enumFromInt(2759), .param_str = "V256dV256dV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10660 | // __builtin_ve_vl_vmuluw_vvvvl | ||
| 10661 | .{ .tag = @enumFromInt(2760), .param_str = "V256dV256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10662 | // __builtin_ve_vl_vmv_vsvl | ||
| 10663 | .{ .tag = @enumFromInt(2761), .param_str = "V256dUiV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10664 | // __builtin_ve_vl_vmv_vsvmvl | ||
| 10665 | .{ .tag = @enumFromInt(2762), .param_str = "V256dUiV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10666 | // __builtin_ve_vl_vmv_vsvvl | ||
| 10667 | .{ .tag = @enumFromInt(2763), .param_str = "V256dUiV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10668 | // __builtin_ve_vl_vor_vsvl | ||
| 10669 | .{ .tag = @enumFromInt(2764), .param_str = "V256dLUiV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10670 | // __builtin_ve_vl_vor_vsvmvl | ||
| 10671 | .{ .tag = @enumFromInt(2765), .param_str = "V256dLUiV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10672 | // __builtin_ve_vl_vor_vsvvl | ||
| 10673 | .{ .tag = @enumFromInt(2766), .param_str = "V256dLUiV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10674 | // __builtin_ve_vl_vor_vvvl | ||
| 10675 | .{ .tag = @enumFromInt(2767), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10676 | // __builtin_ve_vl_vor_vvvmvl | ||
| 10677 | .{ .tag = @enumFromInt(2768), .param_str = "V256dV256dV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10678 | // __builtin_ve_vl_vor_vvvvl | ||
| 10679 | .{ .tag = @enumFromInt(2769), .param_str = "V256dV256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10680 | // __builtin_ve_vl_vpcnt_vvl | ||
| 10681 | .{ .tag = @enumFromInt(2770), .param_str = "V256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10682 | // __builtin_ve_vl_vpcnt_vvmvl | ||
| 10683 | .{ .tag = @enumFromInt(2771), .param_str = "V256dV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10684 | // __builtin_ve_vl_vpcnt_vvvl | ||
| 10685 | .{ .tag = @enumFromInt(2772), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10686 | // __builtin_ve_vl_vrand_vvl | ||
| 10687 | .{ .tag = @enumFromInt(2773), .param_str = "V256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10688 | // __builtin_ve_vl_vrand_vvml | ||
| 10689 | .{ .tag = @enumFromInt(2774), .param_str = "V256dV256dV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10690 | // __builtin_ve_vl_vrcpd_vvl | ||
| 10691 | .{ .tag = @enumFromInt(2775), .param_str = "V256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10692 | // __builtin_ve_vl_vrcpd_vvvl | ||
| 10693 | .{ .tag = @enumFromInt(2776), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10694 | // __builtin_ve_vl_vrcps_vvl | ||
| 10695 | .{ .tag = @enumFromInt(2777), .param_str = "V256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10696 | // __builtin_ve_vl_vrcps_vvvl | ||
| 10697 | .{ .tag = @enumFromInt(2778), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10698 | // __builtin_ve_vl_vrmaxslfst_vvl | ||
| 10699 | .{ .tag = @enumFromInt(2779), .param_str = "V256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10700 | // __builtin_ve_vl_vrmaxslfst_vvvl | ||
| 10701 | .{ .tag = @enumFromInt(2780), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10702 | // __builtin_ve_vl_vrmaxsllst_vvl | ||
| 10703 | .{ .tag = @enumFromInt(2781), .param_str = "V256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10704 | // __builtin_ve_vl_vrmaxsllst_vvvl | ||
| 10705 | .{ .tag = @enumFromInt(2782), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10706 | // __builtin_ve_vl_vrmaxswfstsx_vvl | ||
| 10707 | .{ .tag = @enumFromInt(2783), .param_str = "V256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10708 | // __builtin_ve_vl_vrmaxswfstsx_vvvl | ||
| 10709 | .{ .tag = @enumFromInt(2784), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10710 | // __builtin_ve_vl_vrmaxswfstzx_vvl | ||
| 10711 | .{ .tag = @enumFromInt(2785), .param_str = "V256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10712 | // __builtin_ve_vl_vrmaxswfstzx_vvvl | ||
| 10713 | .{ .tag = @enumFromInt(2786), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10714 | // __builtin_ve_vl_vrmaxswlstsx_vvl | ||
| 10715 | .{ .tag = @enumFromInt(2787), .param_str = "V256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10716 | // __builtin_ve_vl_vrmaxswlstsx_vvvl | ||
| 10717 | .{ .tag = @enumFromInt(2788), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10718 | // __builtin_ve_vl_vrmaxswlstzx_vvl | ||
| 10719 | .{ .tag = @enumFromInt(2789), .param_str = "V256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10720 | // __builtin_ve_vl_vrmaxswlstzx_vvvl | ||
| 10721 | .{ .tag = @enumFromInt(2790), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10722 | // __builtin_ve_vl_vrminslfst_vvl | ||
| 10723 | .{ .tag = @enumFromInt(2791), .param_str = "V256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10724 | // __builtin_ve_vl_vrminslfst_vvvl | ||
| 10725 | .{ .tag = @enumFromInt(2792), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10726 | // __builtin_ve_vl_vrminsllst_vvl | ||
| 10727 | .{ .tag = @enumFromInt(2793), .param_str = "V256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10728 | // __builtin_ve_vl_vrminsllst_vvvl | ||
| 10729 | .{ .tag = @enumFromInt(2794), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10730 | // __builtin_ve_vl_vrminswfstsx_vvl | ||
| 10731 | .{ .tag = @enumFromInt(2795), .param_str = "V256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10732 | // __builtin_ve_vl_vrminswfstsx_vvvl | ||
| 10733 | .{ .tag = @enumFromInt(2796), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10734 | // __builtin_ve_vl_vrminswfstzx_vvl | ||
| 10735 | .{ .tag = @enumFromInt(2797), .param_str = "V256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10736 | // __builtin_ve_vl_vrminswfstzx_vvvl | ||
| 10737 | .{ .tag = @enumFromInt(2798), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10738 | // __builtin_ve_vl_vrminswlstsx_vvl | ||
| 10739 | .{ .tag = @enumFromInt(2799), .param_str = "V256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10740 | // __builtin_ve_vl_vrminswlstsx_vvvl | ||
| 10741 | .{ .tag = @enumFromInt(2800), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10742 | // __builtin_ve_vl_vrminswlstzx_vvl | ||
| 10743 | .{ .tag = @enumFromInt(2801), .param_str = "V256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10744 | // __builtin_ve_vl_vrminswlstzx_vvvl | ||
| 10745 | .{ .tag = @enumFromInt(2802), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10746 | // __builtin_ve_vl_vror_vvl | ||
| 10747 | .{ .tag = @enumFromInt(2803), .param_str = "V256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10748 | // __builtin_ve_vl_vror_vvml | ||
| 10749 | .{ .tag = @enumFromInt(2804), .param_str = "V256dV256dV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10750 | // __builtin_ve_vl_vrsqrtd_vvl | ||
| 10751 | .{ .tag = @enumFromInt(2805), .param_str = "V256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10752 | // __builtin_ve_vl_vrsqrtd_vvvl | ||
| 10753 | .{ .tag = @enumFromInt(2806), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10754 | // __builtin_ve_vl_vrsqrtdnex_vvl | ||
| 10755 | .{ .tag = @enumFromInt(2807), .param_str = "V256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10756 | // __builtin_ve_vl_vrsqrtdnex_vvvl | ||
| 10757 | .{ .tag = @enumFromInt(2808), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10758 | // __builtin_ve_vl_vrsqrts_vvl | ||
| 10759 | .{ .tag = @enumFromInt(2809), .param_str = "V256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10760 | // __builtin_ve_vl_vrsqrts_vvvl | ||
| 10761 | .{ .tag = @enumFromInt(2810), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10762 | // __builtin_ve_vl_vrsqrtsnex_vvl | ||
| 10763 | .{ .tag = @enumFromInt(2811), .param_str = "V256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10764 | // __builtin_ve_vl_vrsqrtsnex_vvvl | ||
| 10765 | .{ .tag = @enumFromInt(2812), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10766 | // __builtin_ve_vl_vrxor_vvl | ||
| 10767 | .{ .tag = @enumFromInt(2813), .param_str = "V256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10768 | // __builtin_ve_vl_vrxor_vvml | ||
| 10769 | .{ .tag = @enumFromInt(2814), .param_str = "V256dV256dV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10770 | // __builtin_ve_vl_vsc_vvssl | ||
| 10771 | .{ .tag = @enumFromInt(2815), .param_str = "vV256dV256dLUiLUiUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10772 | // __builtin_ve_vl_vsc_vvssml | ||
| 10773 | .{ .tag = @enumFromInt(2816), .param_str = "vV256dV256dLUiLUiV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10774 | // __builtin_ve_vl_vscl_vvssl | ||
| 10775 | .{ .tag = @enumFromInt(2817), .param_str = "vV256dV256dLUiLUiUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10776 | // __builtin_ve_vl_vscl_vvssml | ||
| 10777 | .{ .tag = @enumFromInt(2818), .param_str = "vV256dV256dLUiLUiV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10778 | // __builtin_ve_vl_vsclnc_vvssl | ||
| 10779 | .{ .tag = @enumFromInt(2819), .param_str = "vV256dV256dLUiLUiUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10780 | // __builtin_ve_vl_vsclnc_vvssml | ||
| 10781 | .{ .tag = @enumFromInt(2820), .param_str = "vV256dV256dLUiLUiV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10782 | // __builtin_ve_vl_vsclncot_vvssl | ||
| 10783 | .{ .tag = @enumFromInt(2821), .param_str = "vV256dV256dLUiLUiUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10784 | // __builtin_ve_vl_vsclncot_vvssml | ||
| 10785 | .{ .tag = @enumFromInt(2822), .param_str = "vV256dV256dLUiLUiV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10786 | // __builtin_ve_vl_vsclot_vvssl | ||
| 10787 | .{ .tag = @enumFromInt(2823), .param_str = "vV256dV256dLUiLUiUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10788 | // __builtin_ve_vl_vsclot_vvssml | ||
| 10789 | .{ .tag = @enumFromInt(2824), .param_str = "vV256dV256dLUiLUiV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10790 | // __builtin_ve_vl_vscnc_vvssl | ||
| 10791 | .{ .tag = @enumFromInt(2825), .param_str = "vV256dV256dLUiLUiUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10792 | // __builtin_ve_vl_vscnc_vvssml | ||
| 10793 | .{ .tag = @enumFromInt(2826), .param_str = "vV256dV256dLUiLUiV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10794 | // __builtin_ve_vl_vscncot_vvssl | ||
| 10795 | .{ .tag = @enumFromInt(2827), .param_str = "vV256dV256dLUiLUiUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10796 | // __builtin_ve_vl_vscncot_vvssml | ||
| 10797 | .{ .tag = @enumFromInt(2828), .param_str = "vV256dV256dLUiLUiV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10798 | // __builtin_ve_vl_vscot_vvssl | ||
| 10799 | .{ .tag = @enumFromInt(2829), .param_str = "vV256dV256dLUiLUiUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10800 | // __builtin_ve_vl_vscot_vvssml | ||
| 10801 | .{ .tag = @enumFromInt(2830), .param_str = "vV256dV256dLUiLUiV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10802 | // __builtin_ve_vl_vscu_vvssl | ||
| 10803 | .{ .tag = @enumFromInt(2831), .param_str = "vV256dV256dLUiLUiUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10804 | // __builtin_ve_vl_vscu_vvssml | ||
| 10805 | .{ .tag = @enumFromInt(2832), .param_str = "vV256dV256dLUiLUiV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10806 | // __builtin_ve_vl_vscunc_vvssl | ||
| 10807 | .{ .tag = @enumFromInt(2833), .param_str = "vV256dV256dLUiLUiUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10808 | // __builtin_ve_vl_vscunc_vvssml | ||
| 10809 | .{ .tag = @enumFromInt(2834), .param_str = "vV256dV256dLUiLUiV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10810 | // __builtin_ve_vl_vscuncot_vvssl | ||
| 10811 | .{ .tag = @enumFromInt(2835), .param_str = "vV256dV256dLUiLUiUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10812 | // __builtin_ve_vl_vscuncot_vvssml | ||
| 10813 | .{ .tag = @enumFromInt(2836), .param_str = "vV256dV256dLUiLUiV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10814 | // __builtin_ve_vl_vscuot_vvssl | ||
| 10815 | .{ .tag = @enumFromInt(2837), .param_str = "vV256dV256dLUiLUiUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10816 | // __builtin_ve_vl_vscuot_vvssml | ||
| 10817 | .{ .tag = @enumFromInt(2838), .param_str = "vV256dV256dLUiLUiV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10818 | // __builtin_ve_vl_vseq_vl | ||
| 10819 | .{ .tag = @enumFromInt(2839), .param_str = "V256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10820 | // __builtin_ve_vl_vseq_vvl | ||
| 10821 | .{ .tag = @enumFromInt(2840), .param_str = "V256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10822 | // __builtin_ve_vl_vsfa_vvssl | ||
| 10823 | .{ .tag = @enumFromInt(2841), .param_str = "V256dV256dLUiLUiUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10824 | // __builtin_ve_vl_vsfa_vvssmvl | ||
| 10825 | .{ .tag = @enumFromInt(2842), .param_str = "V256dV256dLUiLUiV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10826 | // __builtin_ve_vl_vsfa_vvssvl | ||
| 10827 | .{ .tag = @enumFromInt(2843), .param_str = "V256dV256dLUiLUiV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10828 | // __builtin_ve_vl_vshf_vvvsl | ||
| 10829 | .{ .tag = @enumFromInt(2844), .param_str = "V256dV256dV256dLUiUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10830 | // __builtin_ve_vl_vshf_vvvsvl | ||
| 10831 | .{ .tag = @enumFromInt(2845), .param_str = "V256dV256dV256dLUiV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10832 | // __builtin_ve_vl_vslal_vvsl | ||
| 10833 | .{ .tag = @enumFromInt(2846), .param_str = "V256dV256dLiUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10834 | // __builtin_ve_vl_vslal_vvsmvl | ||
| 10835 | .{ .tag = @enumFromInt(2847), .param_str = "V256dV256dLiV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10836 | // __builtin_ve_vl_vslal_vvsvl | ||
| 10837 | .{ .tag = @enumFromInt(2848), .param_str = "V256dV256dLiV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10838 | // __builtin_ve_vl_vslal_vvvl | ||
| 10839 | .{ .tag = @enumFromInt(2849), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10840 | // __builtin_ve_vl_vslal_vvvmvl | ||
| 10841 | .{ .tag = @enumFromInt(2850), .param_str = "V256dV256dV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10842 | // __builtin_ve_vl_vslal_vvvvl | ||
| 10843 | .{ .tag = @enumFromInt(2851), .param_str = "V256dV256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10844 | // __builtin_ve_vl_vslawsx_vvsl | ||
| 10845 | .{ .tag = @enumFromInt(2852), .param_str = "V256dV256diUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10846 | // __builtin_ve_vl_vslawsx_vvsmvl | ||
| 10847 | .{ .tag = @enumFromInt(2853), .param_str = "V256dV256diV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10848 | // __builtin_ve_vl_vslawsx_vvsvl | ||
| 10849 | .{ .tag = @enumFromInt(2854), .param_str = "V256dV256diV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10850 | // __builtin_ve_vl_vslawsx_vvvl | ||
| 10851 | .{ .tag = @enumFromInt(2855), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10852 | // __builtin_ve_vl_vslawsx_vvvmvl | ||
| 10853 | .{ .tag = @enumFromInt(2856), .param_str = "V256dV256dV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10854 | // __builtin_ve_vl_vslawsx_vvvvl | ||
| 10855 | .{ .tag = @enumFromInt(2857), .param_str = "V256dV256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10856 | // __builtin_ve_vl_vslawzx_vvsl | ||
| 10857 | .{ .tag = @enumFromInt(2858), .param_str = "V256dV256diUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10858 | // __builtin_ve_vl_vslawzx_vvsmvl | ||
| 10859 | .{ .tag = @enumFromInt(2859), .param_str = "V256dV256diV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10860 | // __builtin_ve_vl_vslawzx_vvsvl | ||
| 10861 | .{ .tag = @enumFromInt(2860), .param_str = "V256dV256diV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10862 | // __builtin_ve_vl_vslawzx_vvvl | ||
| 10863 | .{ .tag = @enumFromInt(2861), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10864 | // __builtin_ve_vl_vslawzx_vvvmvl | ||
| 10865 | .{ .tag = @enumFromInt(2862), .param_str = "V256dV256dV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10866 | // __builtin_ve_vl_vslawzx_vvvvl | ||
| 10867 | .{ .tag = @enumFromInt(2863), .param_str = "V256dV256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10868 | // __builtin_ve_vl_vsll_vvsl | ||
| 10869 | .{ .tag = @enumFromInt(2864), .param_str = "V256dV256dLUiUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10870 | // __builtin_ve_vl_vsll_vvsmvl | ||
| 10871 | .{ .tag = @enumFromInt(2865), .param_str = "V256dV256dLUiV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10872 | // __builtin_ve_vl_vsll_vvsvl | ||
| 10873 | .{ .tag = @enumFromInt(2866), .param_str = "V256dV256dLUiV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10874 | // __builtin_ve_vl_vsll_vvvl | ||
| 10875 | .{ .tag = @enumFromInt(2867), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10876 | // __builtin_ve_vl_vsll_vvvmvl | ||
| 10877 | .{ .tag = @enumFromInt(2868), .param_str = "V256dV256dV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10878 | // __builtin_ve_vl_vsll_vvvvl | ||
| 10879 | .{ .tag = @enumFromInt(2869), .param_str = "V256dV256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10880 | // __builtin_ve_vl_vsral_vvsl | ||
| 10881 | .{ .tag = @enumFromInt(2870), .param_str = "V256dV256dLiUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10882 | // __builtin_ve_vl_vsral_vvsmvl | ||
| 10883 | .{ .tag = @enumFromInt(2871), .param_str = "V256dV256dLiV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10884 | // __builtin_ve_vl_vsral_vvsvl | ||
| 10885 | .{ .tag = @enumFromInt(2872), .param_str = "V256dV256dLiV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10886 | // __builtin_ve_vl_vsral_vvvl | ||
| 10887 | .{ .tag = @enumFromInt(2873), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10888 | // __builtin_ve_vl_vsral_vvvmvl | ||
| 10889 | .{ .tag = @enumFromInt(2874), .param_str = "V256dV256dV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10890 | // __builtin_ve_vl_vsral_vvvvl | ||
| 10891 | .{ .tag = @enumFromInt(2875), .param_str = "V256dV256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10892 | // __builtin_ve_vl_vsrawsx_vvsl | ||
| 10893 | .{ .tag = @enumFromInt(2876), .param_str = "V256dV256diUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10894 | // __builtin_ve_vl_vsrawsx_vvsmvl | ||
| 10895 | .{ .tag = @enumFromInt(2877), .param_str = "V256dV256diV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10896 | // __builtin_ve_vl_vsrawsx_vvsvl | ||
| 10897 | .{ .tag = @enumFromInt(2878), .param_str = "V256dV256diV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10898 | // __builtin_ve_vl_vsrawsx_vvvl | ||
| 10899 | .{ .tag = @enumFromInt(2879), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10900 | // __builtin_ve_vl_vsrawsx_vvvmvl | ||
| 10901 | .{ .tag = @enumFromInt(2880), .param_str = "V256dV256dV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10902 | // __builtin_ve_vl_vsrawsx_vvvvl | ||
| 10903 | .{ .tag = @enumFromInt(2881), .param_str = "V256dV256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10904 | // __builtin_ve_vl_vsrawzx_vvsl | ||
| 10905 | .{ .tag = @enumFromInt(2882), .param_str = "V256dV256diUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10906 | // __builtin_ve_vl_vsrawzx_vvsmvl | ||
| 10907 | .{ .tag = @enumFromInt(2883), .param_str = "V256dV256diV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10908 | // __builtin_ve_vl_vsrawzx_vvsvl | ||
| 10909 | .{ .tag = @enumFromInt(2884), .param_str = "V256dV256diV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10910 | // __builtin_ve_vl_vsrawzx_vvvl | ||
| 10911 | .{ .tag = @enumFromInt(2885), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10912 | // __builtin_ve_vl_vsrawzx_vvvmvl | ||
| 10913 | .{ .tag = @enumFromInt(2886), .param_str = "V256dV256dV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10914 | // __builtin_ve_vl_vsrawzx_vvvvl | ||
| 10915 | .{ .tag = @enumFromInt(2887), .param_str = "V256dV256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10916 | // __builtin_ve_vl_vsrl_vvsl | ||
| 10917 | .{ .tag = @enumFromInt(2888), .param_str = "V256dV256dLUiUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10918 | // __builtin_ve_vl_vsrl_vvsmvl | ||
| 10919 | .{ .tag = @enumFromInt(2889), .param_str = "V256dV256dLUiV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10920 | // __builtin_ve_vl_vsrl_vvsvl | ||
| 10921 | .{ .tag = @enumFromInt(2890), .param_str = "V256dV256dLUiV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10922 | // __builtin_ve_vl_vsrl_vvvl | ||
| 10923 | .{ .tag = @enumFromInt(2891), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10924 | // __builtin_ve_vl_vsrl_vvvmvl | ||
| 10925 | .{ .tag = @enumFromInt(2892), .param_str = "V256dV256dV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10926 | // __builtin_ve_vl_vsrl_vvvvl | ||
| 10927 | .{ .tag = @enumFromInt(2893), .param_str = "V256dV256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10928 | // __builtin_ve_vl_vst2d_vssl | ||
| 10929 | .{ .tag = @enumFromInt(2894), .param_str = "vV256dLUiv*Ui", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10930 | // __builtin_ve_vl_vst2d_vssml | ||
| 10931 | .{ .tag = @enumFromInt(2895), .param_str = "vV256dLUiv*V256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10932 | // __builtin_ve_vl_vst2dnc_vssl | ||
| 10933 | .{ .tag = @enumFromInt(2896), .param_str = "vV256dLUiv*Ui", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10934 | // __builtin_ve_vl_vst2dnc_vssml | ||
| 10935 | .{ .tag = @enumFromInt(2897), .param_str = "vV256dLUiv*V256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10936 | // __builtin_ve_vl_vst2dncot_vssl | ||
| 10937 | .{ .tag = @enumFromInt(2898), .param_str = "vV256dLUiv*Ui", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10938 | // __builtin_ve_vl_vst2dncot_vssml | ||
| 10939 | .{ .tag = @enumFromInt(2899), .param_str = "vV256dLUiv*V256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10940 | // __builtin_ve_vl_vst2dot_vssl | ||
| 10941 | .{ .tag = @enumFromInt(2900), .param_str = "vV256dLUiv*Ui", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10942 | // __builtin_ve_vl_vst2dot_vssml | ||
| 10943 | .{ .tag = @enumFromInt(2901), .param_str = "vV256dLUiv*V256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10944 | // __builtin_ve_vl_vst_vssl | ||
| 10945 | .{ .tag = @enumFromInt(2902), .param_str = "vV256dLUiv*Ui", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10946 | // __builtin_ve_vl_vst_vssml | ||
| 10947 | .{ .tag = @enumFromInt(2903), .param_str = "vV256dLUiv*V256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10948 | // __builtin_ve_vl_vstl2d_vssl | ||
| 10949 | .{ .tag = @enumFromInt(2904), .param_str = "vV256dLUiv*Ui", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10950 | // __builtin_ve_vl_vstl2d_vssml | ||
| 10951 | .{ .tag = @enumFromInt(2905), .param_str = "vV256dLUiv*V256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10952 | // __builtin_ve_vl_vstl2dnc_vssl | ||
| 10953 | .{ .tag = @enumFromInt(2906), .param_str = "vV256dLUiv*Ui", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10954 | // __builtin_ve_vl_vstl2dnc_vssml | ||
| 10955 | .{ .tag = @enumFromInt(2907), .param_str = "vV256dLUiv*V256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10956 | // __builtin_ve_vl_vstl2dncot_vssl | ||
| 10957 | .{ .tag = @enumFromInt(2908), .param_str = "vV256dLUiv*Ui", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10958 | // __builtin_ve_vl_vstl2dncot_vssml | ||
| 10959 | .{ .tag = @enumFromInt(2909), .param_str = "vV256dLUiv*V256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10960 | // __builtin_ve_vl_vstl2dot_vssl | ||
| 10961 | .{ .tag = @enumFromInt(2910), .param_str = "vV256dLUiv*Ui", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10962 | // __builtin_ve_vl_vstl2dot_vssml | ||
| 10963 | .{ .tag = @enumFromInt(2911), .param_str = "vV256dLUiv*V256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10964 | // __builtin_ve_vl_vstl_vssl | ||
| 10965 | .{ .tag = @enumFromInt(2912), .param_str = "vV256dLUiv*Ui", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10966 | // __builtin_ve_vl_vstl_vssml | ||
| 10967 | .{ .tag = @enumFromInt(2913), .param_str = "vV256dLUiv*V256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10968 | // __builtin_ve_vl_vstlnc_vssl | ||
| 10969 | .{ .tag = @enumFromInt(2914), .param_str = "vV256dLUiv*Ui", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10970 | // __builtin_ve_vl_vstlnc_vssml | ||
| 10971 | .{ .tag = @enumFromInt(2915), .param_str = "vV256dLUiv*V256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10972 | // __builtin_ve_vl_vstlncot_vssl | ||
| 10973 | .{ .tag = @enumFromInt(2916), .param_str = "vV256dLUiv*Ui", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10974 | // __builtin_ve_vl_vstlncot_vssml | ||
| 10975 | .{ .tag = @enumFromInt(2917), .param_str = "vV256dLUiv*V256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10976 | // __builtin_ve_vl_vstlot_vssl | ||
| 10977 | .{ .tag = @enumFromInt(2918), .param_str = "vV256dLUiv*Ui", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10978 | // __builtin_ve_vl_vstlot_vssml | ||
| 10979 | .{ .tag = @enumFromInt(2919), .param_str = "vV256dLUiv*V256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10980 | // __builtin_ve_vl_vstnc_vssl | ||
| 10981 | .{ .tag = @enumFromInt(2920), .param_str = "vV256dLUiv*Ui", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10982 | // __builtin_ve_vl_vstnc_vssml | ||
| 10983 | .{ .tag = @enumFromInt(2921), .param_str = "vV256dLUiv*V256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10984 | // __builtin_ve_vl_vstncot_vssl | ||
| 10985 | .{ .tag = @enumFromInt(2922), .param_str = "vV256dLUiv*Ui", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10986 | // __builtin_ve_vl_vstncot_vssml | ||
| 10987 | .{ .tag = @enumFromInt(2923), .param_str = "vV256dLUiv*V256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10988 | // __builtin_ve_vl_vstot_vssl | ||
| 10989 | .{ .tag = @enumFromInt(2924), .param_str = "vV256dLUiv*Ui", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10990 | // __builtin_ve_vl_vstot_vssml | ||
| 10991 | .{ .tag = @enumFromInt(2925), .param_str = "vV256dLUiv*V256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10992 | // __builtin_ve_vl_vstu2d_vssl | ||
| 10993 | .{ .tag = @enumFromInt(2926), .param_str = "vV256dLUiv*Ui", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10994 | // __builtin_ve_vl_vstu2d_vssml | ||
| 10995 | .{ .tag = @enumFromInt(2927), .param_str = "vV256dLUiv*V256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10996 | // __builtin_ve_vl_vstu2dnc_vssl | ||
| 10997 | .{ .tag = @enumFromInt(2928), .param_str = "vV256dLUiv*Ui", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 10998 | // __builtin_ve_vl_vstu2dnc_vssml | ||
| 10999 | .{ .tag = @enumFromInt(2929), .param_str = "vV256dLUiv*V256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 11000 | // __builtin_ve_vl_vstu2dncot_vssl | ||
| 11001 | .{ .tag = @enumFromInt(2930), .param_str = "vV256dLUiv*Ui", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 11002 | // __builtin_ve_vl_vstu2dncot_vssml | ||
| 11003 | .{ .tag = @enumFromInt(2931), .param_str = "vV256dLUiv*V256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 11004 | // __builtin_ve_vl_vstu2dot_vssl | ||
| 11005 | .{ .tag = @enumFromInt(2932), .param_str = "vV256dLUiv*Ui", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 11006 | // __builtin_ve_vl_vstu2dot_vssml | ||
| 11007 | .{ .tag = @enumFromInt(2933), .param_str = "vV256dLUiv*V256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 11008 | // __builtin_ve_vl_vstu_vssl | ||
| 11009 | .{ .tag = @enumFromInt(2934), .param_str = "vV256dLUiv*Ui", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 11010 | // __builtin_ve_vl_vstu_vssml | ||
| 11011 | .{ .tag = @enumFromInt(2935), .param_str = "vV256dLUiv*V256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 11012 | // __builtin_ve_vl_vstunc_vssl | ||
| 11013 | .{ .tag = @enumFromInt(2936), .param_str = "vV256dLUiv*Ui", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 11014 | // __builtin_ve_vl_vstunc_vssml | ||
| 11015 | .{ .tag = @enumFromInt(2937), .param_str = "vV256dLUiv*V256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 11016 | // __builtin_ve_vl_vstuncot_vssl | ||
| 11017 | .{ .tag = @enumFromInt(2938), .param_str = "vV256dLUiv*Ui", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 11018 | // __builtin_ve_vl_vstuncot_vssml | ||
| 11019 | .{ .tag = @enumFromInt(2939), .param_str = "vV256dLUiv*V256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 11020 | // __builtin_ve_vl_vstuot_vssl | ||
| 11021 | .{ .tag = @enumFromInt(2940), .param_str = "vV256dLUiv*Ui", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 11022 | // __builtin_ve_vl_vstuot_vssml | ||
| 11023 | .{ .tag = @enumFromInt(2941), .param_str = "vV256dLUiv*V256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 11024 | // __builtin_ve_vl_vsubsl_vsvl | ||
| 11025 | .{ .tag = @enumFromInt(2942), .param_str = "V256dLiV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 11026 | // __builtin_ve_vl_vsubsl_vsvmvl | ||
| 11027 | .{ .tag = @enumFromInt(2943), .param_str = "V256dLiV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 11028 | // __builtin_ve_vl_vsubsl_vsvvl | ||
| 11029 | .{ .tag = @enumFromInt(2944), .param_str = "V256dLiV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 11030 | // __builtin_ve_vl_vsubsl_vvvl | ||
| 11031 | .{ .tag = @enumFromInt(2945), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 11032 | // __builtin_ve_vl_vsubsl_vvvmvl | ||
| 11033 | .{ .tag = @enumFromInt(2946), .param_str = "V256dV256dV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 11034 | // __builtin_ve_vl_vsubsl_vvvvl | ||
| 11035 | .{ .tag = @enumFromInt(2947), .param_str = "V256dV256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 11036 | // __builtin_ve_vl_vsubswsx_vsvl | ||
| 11037 | .{ .tag = @enumFromInt(2948), .param_str = "V256diV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 11038 | // __builtin_ve_vl_vsubswsx_vsvmvl | ||
| 11039 | .{ .tag = @enumFromInt(2949), .param_str = "V256diV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 11040 | // __builtin_ve_vl_vsubswsx_vsvvl | ||
| 11041 | .{ .tag = @enumFromInt(2950), .param_str = "V256diV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 11042 | // __builtin_ve_vl_vsubswsx_vvvl | ||
| 11043 | .{ .tag = @enumFromInt(2951), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 11044 | // __builtin_ve_vl_vsubswsx_vvvmvl | ||
| 11045 | .{ .tag = @enumFromInt(2952), .param_str = "V256dV256dV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 11046 | // __builtin_ve_vl_vsubswsx_vvvvl | ||
| 11047 | .{ .tag = @enumFromInt(2953), .param_str = "V256dV256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 11048 | // __builtin_ve_vl_vsubswzx_vsvl | ||
| 11049 | .{ .tag = @enumFromInt(2954), .param_str = "V256diV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 11050 | // __builtin_ve_vl_vsubswzx_vsvmvl | ||
| 11051 | .{ .tag = @enumFromInt(2955), .param_str = "V256diV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 11052 | // __builtin_ve_vl_vsubswzx_vsvvl | ||
| 11053 | .{ .tag = @enumFromInt(2956), .param_str = "V256diV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 11054 | // __builtin_ve_vl_vsubswzx_vvvl | ||
| 11055 | .{ .tag = @enumFromInt(2957), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 11056 | // __builtin_ve_vl_vsubswzx_vvvmvl | ||
| 11057 | .{ .tag = @enumFromInt(2958), .param_str = "V256dV256dV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 11058 | // __builtin_ve_vl_vsubswzx_vvvvl | ||
| 11059 | .{ .tag = @enumFromInt(2959), .param_str = "V256dV256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 11060 | // __builtin_ve_vl_vsubul_vsvl | ||
| 11061 | .{ .tag = @enumFromInt(2960), .param_str = "V256dLUiV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 11062 | // __builtin_ve_vl_vsubul_vsvmvl | ||
| 11063 | .{ .tag = @enumFromInt(2961), .param_str = "V256dLUiV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 11064 | // __builtin_ve_vl_vsubul_vsvvl | ||
| 11065 | .{ .tag = @enumFromInt(2962), .param_str = "V256dLUiV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 11066 | // __builtin_ve_vl_vsubul_vvvl | ||
| 11067 | .{ .tag = @enumFromInt(2963), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 11068 | // __builtin_ve_vl_vsubul_vvvmvl | ||
| 11069 | .{ .tag = @enumFromInt(2964), .param_str = "V256dV256dV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 11070 | // __builtin_ve_vl_vsubul_vvvvl | ||
| 11071 | .{ .tag = @enumFromInt(2965), .param_str = "V256dV256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 11072 | // __builtin_ve_vl_vsubuw_vsvl | ||
| 11073 | .{ .tag = @enumFromInt(2966), .param_str = "V256dUiV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 11074 | // __builtin_ve_vl_vsubuw_vsvmvl | ||
| 11075 | .{ .tag = @enumFromInt(2967), .param_str = "V256dUiV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 11076 | // __builtin_ve_vl_vsubuw_vsvvl | ||
| 11077 | .{ .tag = @enumFromInt(2968), .param_str = "V256dUiV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 11078 | // __builtin_ve_vl_vsubuw_vvvl | ||
| 11079 | .{ .tag = @enumFromInt(2969), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 11080 | // __builtin_ve_vl_vsubuw_vvvmvl | ||
| 11081 | .{ .tag = @enumFromInt(2970), .param_str = "V256dV256dV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 11082 | // __builtin_ve_vl_vsubuw_vvvvl | ||
| 11083 | .{ .tag = @enumFromInt(2971), .param_str = "V256dV256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 11084 | // __builtin_ve_vl_vsuml_vvl | ||
| 11085 | .{ .tag = @enumFromInt(2972), .param_str = "V256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 11086 | // __builtin_ve_vl_vsuml_vvml | ||
| 11087 | .{ .tag = @enumFromInt(2973), .param_str = "V256dV256dV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 11088 | // __builtin_ve_vl_vsumwsx_vvl | ||
| 11089 | .{ .tag = @enumFromInt(2974), .param_str = "V256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 11090 | // __builtin_ve_vl_vsumwsx_vvml | ||
| 11091 | .{ .tag = @enumFromInt(2975), .param_str = "V256dV256dV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 11092 | // __builtin_ve_vl_vsumwzx_vvl | ||
| 11093 | .{ .tag = @enumFromInt(2976), .param_str = "V256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 11094 | // __builtin_ve_vl_vsumwzx_vvml | ||
| 11095 | .{ .tag = @enumFromInt(2977), .param_str = "V256dV256dV256bUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 11096 | // __builtin_ve_vl_vxor_vsvl | ||
| 11097 | .{ .tag = @enumFromInt(2978), .param_str = "V256dLUiV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 11098 | // __builtin_ve_vl_vxor_vsvmvl | ||
| 11099 | .{ .tag = @enumFromInt(2979), .param_str = "V256dLUiV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 11100 | // __builtin_ve_vl_vxor_vsvvl | ||
| 11101 | .{ .tag = @enumFromInt(2980), .param_str = "V256dLUiV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 11102 | // __builtin_ve_vl_vxor_vvvl | ||
| 11103 | .{ .tag = @enumFromInt(2981), .param_str = "V256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 11104 | // __builtin_ve_vl_vxor_vvvmvl | ||
| 11105 | .{ .tag = @enumFromInt(2982), .param_str = "V256dV256dV256dV256bV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 11106 | // __builtin_ve_vl_vxor_vvvvl | ||
| 11107 | .{ .tag = @enumFromInt(2983), .param_str = "V256dV256dV256dV256dUi", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 11108 | // __builtin_ve_vl_xorm_MMM | ||
| 11109 | .{ .tag = @enumFromInt(2984), .param_str = "V512bV512bV512b", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 11110 | // __builtin_ve_vl_xorm_mmm | ||
| 11111 | .{ .tag = @enumFromInt(2985), .param_str = "V256bV256bV256b", .properties = .{ .target_set = TargetSet.initOne(.vevl_gen) } }, | ||
| 11112 | // __builtin_vfprintf | ||
| 11113 | .{ .tag = @enumFromInt(2986), .param_str = "iP*RcC*Ra", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .format_kind = .vprintf, .format_string_position = 1 } } }, | ||
| 11114 | // __builtin_vfscanf | ||
| 11115 | .{ .tag = @enumFromInt(2987), .param_str = "iP*RcC*Ra", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .format_kind = .vscanf, .format_string_position = 1 } } }, | ||
| 11116 | // __builtin_vprintf | ||
| 11117 | .{ .tag = @enumFromInt(2988), .param_str = "icC*Ra", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .format_kind = .vprintf } } }, | ||
| 11118 | // __builtin_vscanf | ||
| 11119 | .{ .tag = @enumFromInt(2989), .param_str = "icC*Ra", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .format_kind = .vscanf } } }, | ||
| 11120 | // __builtin_vsnprintf | ||
| 11121 | .{ .tag = @enumFromInt(2990), .param_str = "ic*RzcC*Ra", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .format_kind = .vprintf, .format_string_position = 2 } } }, | ||
| 11122 | // __builtin_vsprintf | ||
| 11123 | .{ .tag = @enumFromInt(2991), .param_str = "ic*RcC*Ra", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .format_kind = .vprintf, .format_string_position = 1 } } }, | ||
| 11124 | // __builtin_vsscanf | ||
| 11125 | .{ .tag = @enumFromInt(2992), .param_str = "icC*RcC*Ra", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .format_kind = .vscanf, .format_string_position = 1 } } }, | ||
| 11126 | // __builtin_wasm_max_f32 | ||
| 11127 | .{ .tag = @enumFromInt(2993), .param_str = "fff", .properties = .{ .target_set = TargetSet.initOne(.webassembly), .attributes = .{ .@"const" = true } } }, | ||
| 11128 | // __builtin_wasm_max_f64 | ||
| 11129 | .{ .tag = @enumFromInt(2994), .param_str = "ddd", .properties = .{ .target_set = TargetSet.initOne(.webassembly), .attributes = .{ .@"const" = true } } }, | ||
| 11130 | // __builtin_wasm_memory_grow | ||
| 11131 | .{ .tag = @enumFromInt(2995), .param_str = "zIiz", .properties = .{ .target_set = TargetSet.initOne(.webassembly) } }, | ||
| 11132 | // __builtin_wasm_memory_size | ||
| 11133 | .{ .tag = @enumFromInt(2996), .param_str = "zIi", .properties = .{ .target_set = TargetSet.initOne(.webassembly) } }, | ||
| 11134 | // __builtin_wasm_min_f32 | ||
| 11135 | .{ .tag = @enumFromInt(2997), .param_str = "fff", .properties = .{ .target_set = TargetSet.initOne(.webassembly), .attributes = .{ .@"const" = true } } }, | ||
| 11136 | // __builtin_wasm_min_f64 | ||
| 11137 | .{ .tag = @enumFromInt(2998), .param_str = "ddd", .properties = .{ .target_set = TargetSet.initOne(.webassembly), .attributes = .{ .@"const" = true } } }, | ||
| 11138 | // __builtin_wasm_trunc_s_i32_f32 | ||
| 11139 | .{ .tag = @enumFromInt(2999), .param_str = "if", .properties = .{ .target_set = TargetSet.initOne(.webassembly), .attributes = .{ .@"const" = true } } }, | ||
| 11140 | // __builtin_wasm_trunc_s_i32_f64 | ||
| 11141 | .{ .tag = @enumFromInt(3000), .param_str = "id", .properties = .{ .target_set = TargetSet.initOne(.webassembly), .attributes = .{ .@"const" = true } } }, | ||
| 11142 | // __builtin_wasm_trunc_s_i64_f32 | ||
| 11143 | .{ .tag = @enumFromInt(3001), .param_str = "LLif", .properties = .{ .target_set = TargetSet.initOne(.webassembly), .attributes = .{ .@"const" = true } } }, | ||
| 11144 | // __builtin_wasm_trunc_s_i64_f64 | ||
| 11145 | .{ .tag = @enumFromInt(3002), .param_str = "LLid", .properties = .{ .target_set = TargetSet.initOne(.webassembly), .attributes = .{ .@"const" = true } } }, | ||
| 11146 | // __builtin_wasm_trunc_u_i32_f32 | ||
| 11147 | .{ .tag = @enumFromInt(3003), .param_str = "if", .properties = .{ .target_set = TargetSet.initOne(.webassembly), .attributes = .{ .@"const" = true } } }, | ||
| 11148 | // __builtin_wasm_trunc_u_i32_f64 | ||
| 11149 | .{ .tag = @enumFromInt(3004), .param_str = "id", .properties = .{ .target_set = TargetSet.initOne(.webassembly), .attributes = .{ .@"const" = true } } }, | ||
| 11150 | // __builtin_wasm_trunc_u_i64_f32 | ||
| 11151 | .{ .tag = @enumFromInt(3005), .param_str = "LLif", .properties = .{ .target_set = TargetSet.initOne(.webassembly), .attributes = .{ .@"const" = true } } }, | ||
| 11152 | // __builtin_wasm_trunc_u_i64_f64 | ||
| 11153 | .{ .tag = @enumFromInt(3006), .param_str = "LLid", .properties = .{ .target_set = TargetSet.initOne(.webassembly), .attributes = .{ .@"const" = true } } }, | ||
| 11154 | // __builtin_wcschr | ||
| 11155 | .{ .tag = @enumFromInt(3007), .param_str = "w*wC*w", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_evaluable = true } } }, | ||
| 11156 | // __builtin_wcscmp | ||
| 11157 | .{ .tag = @enumFromInt(3008), .param_str = "iwC*wC*", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_evaluable = true } } }, | ||
| 11158 | // __builtin_wcslen | ||
| 11159 | .{ .tag = @enumFromInt(3009), .param_str = "zwC*", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_evaluable = true } } }, | ||
| 11160 | // __builtin_wcsncmp | ||
| 11161 | .{ .tag = @enumFromInt(3010), .param_str = "iwC*wC*z", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_evaluable = true } } }, | ||
| 11162 | // __builtin_wmemchr | ||
| 11163 | .{ .tag = @enumFromInt(3011), .param_str = "w*wC*wz", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_evaluable = true } } }, | ||
| 11164 | // __builtin_wmemcmp | ||
| 11165 | .{ .tag = @enumFromInt(3012), .param_str = "iwC*wC*z", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_evaluable = true } } }, | ||
| 11166 | // __builtin_wmemcpy | ||
| 11167 | .{ .tag = @enumFromInt(3013), .param_str = "w*w*wC*z", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_evaluable = true } } }, | ||
| 11168 | // __builtin_wmemmove | ||
| 11169 | .{ .tag = @enumFromInt(3014), .param_str = "w*w*wC*z", .properties = .{ .attributes = .{ .lib_function_with_builtin_prefix = true, .const_evaluable = true } } }, | ||
| 11170 | // __c11_atomic_is_lock_free | ||
| 11171 | .{ .tag = @enumFromInt(3015), .param_str = "bz", .properties = .{ .attributes = .{ .const_evaluable = true } } }, | ||
| 11172 | // __c11_atomic_signal_fence | ||
| 11173 | .{ .tag = @enumFromInt(3016), .param_str = "vi", .properties = .{} }, | ||
| 11174 | // __c11_atomic_thread_fence | ||
| 11175 | .{ .tag = @enumFromInt(3017), .param_str = "vi", .properties = .{} }, | ||
| 11176 | // __clear_cache | ||
| 11177 | .{ .tag = @enumFromInt(3018), .param_str = "vv*v*", .properties = .{ .target_set = TargetSet.initMany(&.{ .aarch64, .arm }) } }, | ||
| 11178 | // __cospi | ||
| 11179 | .{ .tag = @enumFromInt(3019), .param_str = "dd", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 11180 | // __cospif | ||
| 11181 | .{ .tag = @enumFromInt(3020), .param_str = "ff", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 11182 | // __debugbreak | ||
| 11183 | .{ .tag = @enumFromInt(3021), .param_str = "v", .properties = .{ .language = .all_ms_languages } }, | ||
| 11184 | // __dmb | ||
| 11185 | .{ .tag = @enumFromInt(3022), .param_str = "vUi", .properties = .{ .language = .all_ms_languages, .target_set = TargetSet.initMany(&.{ .aarch64, .arm }), .attributes = .{ .@"const" = true } } }, | ||
| 11186 | // __dsb | ||
| 11187 | .{ .tag = @enumFromInt(3023), .param_str = "vUi", .properties = .{ .language = .all_ms_languages, .target_set = TargetSet.initMany(&.{ .aarch64, .arm }), .attributes = .{ .@"const" = true } } }, | ||
| 11188 | // __emit | ||
| 11189 | .{ .tag = @enumFromInt(3024), .param_str = "vIUiC", .properties = .{ .language = .all_ms_languages, .target_set = TargetSet.initOne(.arm) } }, | ||
| 11190 | // __exception_code | ||
| 11191 | .{ .tag = @enumFromInt(3025), .param_str = "UNi", .properties = .{ .language = .all_ms_languages } }, | ||
| 11192 | // __exception_info | ||
| 11193 | .{ .tag = @enumFromInt(3026), .param_str = "v*", .properties = .{ .language = .all_ms_languages } }, | ||
| 11194 | // __exp10 | ||
| 11195 | .{ .tag = @enumFromInt(3027), .param_str = "dd", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 11196 | // __exp10f | ||
| 11197 | .{ .tag = @enumFromInt(3028), .param_str = "ff", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 11198 | // __fastfail | ||
| 11199 | .{ .tag = @enumFromInt(3029), .param_str = "vUi", .properties = .{ .language = .all_ms_languages, .attributes = .{ .noreturn = true } } }, | ||
| 11200 | // __finite | ||
| 11201 | .{ .tag = @enumFromInt(3030), .param_str = "id", .properties = .{ .header = .math, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } }, | ||
| 11202 | // __finitef | ||
| 11203 | .{ .tag = @enumFromInt(3031), .param_str = "if", .properties = .{ .header = .math, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } }, | ||
| 11204 | // __finitel | ||
| 11205 | .{ .tag = @enumFromInt(3032), .param_str = "iLd", .properties = .{ .header = .math, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } }, | ||
| 11206 | // __isb | ||
| 11207 | .{ .tag = @enumFromInt(3033), .param_str = "vUi", .properties = .{ .language = .all_ms_languages, .target_set = TargetSet.initMany(&.{ .aarch64, .arm }), .attributes = .{ .@"const" = true } } }, | ||
| 11208 | // __iso_volatile_load16 | ||
| 11209 | .{ .tag = @enumFromInt(3034), .param_str = "ssCD*", .properties = .{ .language = .all_ms_languages } }, | ||
| 11210 | // __iso_volatile_load32 | ||
| 11211 | .{ .tag = @enumFromInt(3035), .param_str = "iiCD*", .properties = .{ .language = .all_ms_languages } }, | ||
| 11212 | // __iso_volatile_load64 | ||
| 11213 | .{ .tag = @enumFromInt(3036), .param_str = "LLiLLiCD*", .properties = .{ .language = .all_ms_languages } }, | ||
| 11214 | // __iso_volatile_load8 | ||
| 11215 | .{ .tag = @enumFromInt(3037), .param_str = "ccCD*", .properties = .{ .language = .all_ms_languages } }, | ||
| 11216 | // __iso_volatile_store16 | ||
| 11217 | .{ .tag = @enumFromInt(3038), .param_str = "vsD*s", .properties = .{ .language = .all_ms_languages } }, | ||
| 11218 | // __iso_volatile_store32 | ||
| 11219 | .{ .tag = @enumFromInt(3039), .param_str = "viD*i", .properties = .{ .language = .all_ms_languages } }, | ||
| 11220 | // __iso_volatile_store64 | ||
| 11221 | .{ .tag = @enumFromInt(3040), .param_str = "vLLiD*LLi", .properties = .{ .language = .all_ms_languages } }, | ||
| 11222 | // __iso_volatile_store8 | ||
| 11223 | .{ .tag = @enumFromInt(3041), .param_str = "vcD*c", .properties = .{ .language = .all_ms_languages } }, | ||
| 11224 | // __ldrexd | ||
| 11225 | .{ .tag = @enumFromInt(3042), .param_str = "WiWiCD*", .properties = .{ .language = .all_ms_languages, .target_set = TargetSet.initOne(.arm) } }, | ||
| 11226 | // __lzcnt | ||
| 11227 | .{ .tag = @enumFromInt(3043), .param_str = "UiUi", .properties = .{ .language = .all_ms_languages, .attributes = .{ .@"const" = true, .const_evaluable = true } } }, | ||
| 11228 | // __lzcnt16 | ||
| 11229 | .{ .tag = @enumFromInt(3044), .param_str = "UsUs", .properties = .{ .language = .all_ms_languages, .attributes = .{ .@"const" = true, .const_evaluable = true } } }, | ||
| 11230 | // __lzcnt64 | ||
| 11231 | .{ .tag = @enumFromInt(3045), .param_str = "UWiUWi", .properties = .{ .language = .all_ms_languages, .attributes = .{ .@"const" = true, .const_evaluable = true } } }, | ||
| 11232 | // __noop | ||
| 11233 | .{ .tag = @enumFromInt(3046), .param_str = "i.", .properties = .{ .language = .all_ms_languages } }, | ||
| 11234 | // __nvvm_add_rm_d | ||
| 11235 | .{ .tag = @enumFromInt(3047), .param_str = "ddd", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11236 | // __nvvm_add_rm_f | ||
| 11237 | .{ .tag = @enumFromInt(3048), .param_str = "fff", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11238 | // __nvvm_add_rm_ftz_f | ||
| 11239 | .{ .tag = @enumFromInt(3049), .param_str = "fff", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11240 | // __nvvm_add_rn_d | ||
| 11241 | .{ .tag = @enumFromInt(3050), .param_str = "ddd", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11242 | // __nvvm_add_rn_f | ||
| 11243 | .{ .tag = @enumFromInt(3051), .param_str = "fff", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11244 | // __nvvm_add_rn_ftz_f | ||
| 11245 | .{ .tag = @enumFromInt(3052), .param_str = "fff", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11246 | // __nvvm_add_rp_d | ||
| 11247 | .{ .tag = @enumFromInt(3053), .param_str = "ddd", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11248 | // __nvvm_add_rp_f | ||
| 11249 | .{ .tag = @enumFromInt(3054), .param_str = "fff", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11250 | // __nvvm_add_rp_ftz_f | ||
| 11251 | .{ .tag = @enumFromInt(3055), .param_str = "fff", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11252 | // __nvvm_add_rz_d | ||
| 11253 | .{ .tag = @enumFromInt(3056), .param_str = "ddd", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11254 | // __nvvm_add_rz_f | ||
| 11255 | .{ .tag = @enumFromInt(3057), .param_str = "fff", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11256 | // __nvvm_add_rz_ftz_f | ||
| 11257 | .{ .tag = @enumFromInt(3058), .param_str = "fff", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11258 | // __nvvm_atom_add_gen_f | ||
| 11259 | .{ .tag = @enumFromInt(3059), .param_str = "ffD*f", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11260 | // __nvvm_atom_add_gen_i | ||
| 11261 | .{ .tag = @enumFromInt(3060), .param_str = "iiD*i", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11262 | // __nvvm_atom_add_gen_l | ||
| 11263 | .{ .tag = @enumFromInt(3061), .param_str = "LiLiD*Li", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11264 | // __nvvm_atom_add_gen_ll | ||
| 11265 | .{ .tag = @enumFromInt(3062), .param_str = "LLiLLiD*LLi", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11266 | // __nvvm_atom_and_gen_i | ||
| 11267 | .{ .tag = @enumFromInt(3063), .param_str = "iiD*i", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11268 | // __nvvm_atom_and_gen_l | ||
| 11269 | .{ .tag = @enumFromInt(3064), .param_str = "LiLiD*Li", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11270 | // __nvvm_atom_and_gen_ll | ||
| 11271 | .{ .tag = @enumFromInt(3065), .param_str = "LLiLLiD*LLi", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11272 | // __nvvm_atom_cas_gen_i | ||
| 11273 | .{ .tag = @enumFromInt(3066), .param_str = "iiD*ii", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11274 | // __nvvm_atom_cas_gen_l | ||
| 11275 | .{ .tag = @enumFromInt(3067), .param_str = "LiLiD*LiLi", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11276 | // __nvvm_atom_cas_gen_ll | ||
| 11277 | .{ .tag = @enumFromInt(3068), .param_str = "LLiLLiD*LLiLLi", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11278 | // __nvvm_atom_dec_gen_ui | ||
| 11279 | .{ .tag = @enumFromInt(3069), .param_str = "UiUiD*Ui", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11280 | // __nvvm_atom_inc_gen_ui | ||
| 11281 | .{ .tag = @enumFromInt(3070), .param_str = "UiUiD*Ui", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11282 | // __nvvm_atom_max_gen_i | ||
| 11283 | .{ .tag = @enumFromInt(3071), .param_str = "iiD*i", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11284 | // __nvvm_atom_max_gen_l | ||
| 11285 | .{ .tag = @enumFromInt(3072), .param_str = "LiLiD*Li", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11286 | // __nvvm_atom_max_gen_ll | ||
| 11287 | .{ .tag = @enumFromInt(3073), .param_str = "LLiLLiD*LLi", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11288 | // __nvvm_atom_max_gen_ui | ||
| 11289 | .{ .tag = @enumFromInt(3074), .param_str = "UiUiD*Ui", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11290 | // __nvvm_atom_max_gen_ul | ||
| 11291 | .{ .tag = @enumFromInt(3075), .param_str = "ULiULiD*ULi", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11292 | // __nvvm_atom_max_gen_ull | ||
| 11293 | .{ .tag = @enumFromInt(3076), .param_str = "ULLiULLiD*ULLi", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11294 | // __nvvm_atom_min_gen_i | ||
| 11295 | .{ .tag = @enumFromInt(3077), .param_str = "iiD*i", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11296 | // __nvvm_atom_min_gen_l | ||
| 11297 | .{ .tag = @enumFromInt(3078), .param_str = "LiLiD*Li", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11298 | // __nvvm_atom_min_gen_ll | ||
| 11299 | .{ .tag = @enumFromInt(3079), .param_str = "LLiLLiD*LLi", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11300 | // __nvvm_atom_min_gen_ui | ||
| 11301 | .{ .tag = @enumFromInt(3080), .param_str = "UiUiD*Ui", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11302 | // __nvvm_atom_min_gen_ul | ||
| 11303 | .{ .tag = @enumFromInt(3081), .param_str = "ULiULiD*ULi", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11304 | // __nvvm_atom_min_gen_ull | ||
| 11305 | .{ .tag = @enumFromInt(3082), .param_str = "ULLiULLiD*ULLi", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11306 | // __nvvm_atom_or_gen_i | ||
| 11307 | .{ .tag = @enumFromInt(3083), .param_str = "iiD*i", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11308 | // __nvvm_atom_or_gen_l | ||
| 11309 | .{ .tag = @enumFromInt(3084), .param_str = "LiLiD*Li", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11310 | // __nvvm_atom_or_gen_ll | ||
| 11311 | .{ .tag = @enumFromInt(3085), .param_str = "LLiLLiD*LLi", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11312 | // __nvvm_atom_sub_gen_i | ||
| 11313 | .{ .tag = @enumFromInt(3086), .param_str = "iiD*i", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11314 | // __nvvm_atom_sub_gen_l | ||
| 11315 | .{ .tag = @enumFromInt(3087), .param_str = "LiLiD*Li", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11316 | // __nvvm_atom_sub_gen_ll | ||
| 11317 | .{ .tag = @enumFromInt(3088), .param_str = "LLiLLiD*LLi", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11318 | // __nvvm_atom_xchg_gen_i | ||
| 11319 | .{ .tag = @enumFromInt(3089), .param_str = "iiD*i", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11320 | // __nvvm_atom_xchg_gen_l | ||
| 11321 | .{ .tag = @enumFromInt(3090), .param_str = "LiLiD*Li", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11322 | // __nvvm_atom_xchg_gen_ll | ||
| 11323 | .{ .tag = @enumFromInt(3091), .param_str = "LLiLLiD*LLi", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11324 | // __nvvm_atom_xor_gen_i | ||
| 11325 | .{ .tag = @enumFromInt(3092), .param_str = "iiD*i", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11326 | // __nvvm_atom_xor_gen_l | ||
| 11327 | .{ .tag = @enumFromInt(3093), .param_str = "LiLiD*Li", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11328 | // __nvvm_atom_xor_gen_ll | ||
| 11329 | .{ .tag = @enumFromInt(3094), .param_str = "LLiLLiD*LLi", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11330 | // __nvvm_bar0_and | ||
| 11331 | .{ .tag = @enumFromInt(3095), .param_str = "ii", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11332 | // __nvvm_bar0_or | ||
| 11333 | .{ .tag = @enumFromInt(3096), .param_str = "ii", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11334 | // __nvvm_bar0_popc | ||
| 11335 | .{ .tag = @enumFromInt(3097), .param_str = "ii", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11336 | // __nvvm_bar_sync | ||
| 11337 | .{ .tag = @enumFromInt(3098), .param_str = "vi", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11338 | // __nvvm_bitcast_d2ll | ||
| 11339 | .{ .tag = @enumFromInt(3099), .param_str = "LLid", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11340 | // __nvvm_bitcast_f2i | ||
| 11341 | .{ .tag = @enumFromInt(3100), .param_str = "if", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11342 | // __nvvm_bitcast_i2f | ||
| 11343 | .{ .tag = @enumFromInt(3101), .param_str = "fi", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11344 | // __nvvm_bitcast_ll2d | ||
| 11345 | .{ .tag = @enumFromInt(3102), .param_str = "dLLi", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11346 | // __nvvm_ceil_d | ||
| 11347 | .{ .tag = @enumFromInt(3103), .param_str = "dd", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11348 | // __nvvm_ceil_f | ||
| 11349 | .{ .tag = @enumFromInt(3104), .param_str = "ff", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11350 | // __nvvm_ceil_ftz_f | ||
| 11351 | .{ .tag = @enumFromInt(3105), .param_str = "ff", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11352 | // __nvvm_compiler_error | ||
| 11353 | .{ .tag = @enumFromInt(3106), .param_str = "vcC*4", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11354 | // __nvvm_compiler_warn | ||
| 11355 | .{ .tag = @enumFromInt(3107), .param_str = "vcC*4", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11356 | // __nvvm_cos_approx_f | ||
| 11357 | .{ .tag = @enumFromInt(3108), .param_str = "ff", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11358 | // __nvvm_cos_approx_ftz_f | ||
| 11359 | .{ .tag = @enumFromInt(3109), .param_str = "ff", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11360 | // __nvvm_d2f_rm | ||
| 11361 | .{ .tag = @enumFromInt(3110), .param_str = "fd", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11362 | // __nvvm_d2f_rm_ftz | ||
| 11363 | .{ .tag = @enumFromInt(3111), .param_str = "fd", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11364 | // __nvvm_d2f_rn | ||
| 11365 | .{ .tag = @enumFromInt(3112), .param_str = "fd", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11366 | // __nvvm_d2f_rn_ftz | ||
| 11367 | .{ .tag = @enumFromInt(3113), .param_str = "fd", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11368 | // __nvvm_d2f_rp | ||
| 11369 | .{ .tag = @enumFromInt(3114), .param_str = "fd", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11370 | // __nvvm_d2f_rp_ftz | ||
| 11371 | .{ .tag = @enumFromInt(3115), .param_str = "fd", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11372 | // __nvvm_d2f_rz | ||
| 11373 | .{ .tag = @enumFromInt(3116), .param_str = "fd", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11374 | // __nvvm_d2f_rz_ftz | ||
| 11375 | .{ .tag = @enumFromInt(3117), .param_str = "fd", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11376 | // __nvvm_d2i_hi | ||
| 11377 | .{ .tag = @enumFromInt(3118), .param_str = "id", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11378 | // __nvvm_d2i_lo | ||
| 11379 | .{ .tag = @enumFromInt(3119), .param_str = "id", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11380 | // __nvvm_d2i_rm | ||
| 11381 | .{ .tag = @enumFromInt(3120), .param_str = "id", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11382 | // __nvvm_d2i_rn | ||
| 11383 | .{ .tag = @enumFromInt(3121), .param_str = "id", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11384 | // __nvvm_d2i_rp | ||
| 11385 | .{ .tag = @enumFromInt(3122), .param_str = "id", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11386 | // __nvvm_d2i_rz | ||
| 11387 | .{ .tag = @enumFromInt(3123), .param_str = "id", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11388 | // __nvvm_d2ll_rm | ||
| 11389 | .{ .tag = @enumFromInt(3124), .param_str = "LLid", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11390 | // __nvvm_d2ll_rn | ||
| 11391 | .{ .tag = @enumFromInt(3125), .param_str = "LLid", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11392 | // __nvvm_d2ll_rp | ||
| 11393 | .{ .tag = @enumFromInt(3126), .param_str = "LLid", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11394 | // __nvvm_d2ll_rz | ||
| 11395 | .{ .tag = @enumFromInt(3127), .param_str = "LLid", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11396 | // __nvvm_d2ui_rm | ||
| 11397 | .{ .tag = @enumFromInt(3128), .param_str = "Uid", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11398 | // __nvvm_d2ui_rn | ||
| 11399 | .{ .tag = @enumFromInt(3129), .param_str = "Uid", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11400 | // __nvvm_d2ui_rp | ||
| 11401 | .{ .tag = @enumFromInt(3130), .param_str = "Uid", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11402 | // __nvvm_d2ui_rz | ||
| 11403 | .{ .tag = @enumFromInt(3131), .param_str = "Uid", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11404 | // __nvvm_d2ull_rm | ||
| 11405 | .{ .tag = @enumFromInt(3132), .param_str = "ULLid", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11406 | // __nvvm_d2ull_rn | ||
| 11407 | .{ .tag = @enumFromInt(3133), .param_str = "ULLid", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11408 | // __nvvm_d2ull_rp | ||
| 11409 | .{ .tag = @enumFromInt(3134), .param_str = "ULLid", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11410 | // __nvvm_d2ull_rz | ||
| 11411 | .{ .tag = @enumFromInt(3135), .param_str = "ULLid", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11412 | // __nvvm_div_approx_f | ||
| 11413 | .{ .tag = @enumFromInt(3136), .param_str = "fff", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11414 | // __nvvm_div_approx_ftz_f | ||
| 11415 | .{ .tag = @enumFromInt(3137), .param_str = "fff", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11416 | // __nvvm_div_rm_d | ||
| 11417 | .{ .tag = @enumFromInt(3138), .param_str = "ddd", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11418 | // __nvvm_div_rm_f | ||
| 11419 | .{ .tag = @enumFromInt(3139), .param_str = "fff", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11420 | // __nvvm_div_rm_ftz_f | ||
| 11421 | .{ .tag = @enumFromInt(3140), .param_str = "fff", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11422 | // __nvvm_div_rn_d | ||
| 11423 | .{ .tag = @enumFromInt(3141), .param_str = "ddd", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11424 | // __nvvm_div_rn_f | ||
| 11425 | .{ .tag = @enumFromInt(3142), .param_str = "fff", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11426 | // __nvvm_div_rn_ftz_f | ||
| 11427 | .{ .tag = @enumFromInt(3143), .param_str = "fff", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11428 | // __nvvm_div_rp_d | ||
| 11429 | .{ .tag = @enumFromInt(3144), .param_str = "ddd", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11430 | // __nvvm_div_rp_f | ||
| 11431 | .{ .tag = @enumFromInt(3145), .param_str = "fff", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11432 | // __nvvm_div_rp_ftz_f | ||
| 11433 | .{ .tag = @enumFromInt(3146), .param_str = "fff", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11434 | // __nvvm_div_rz_d | ||
| 11435 | .{ .tag = @enumFromInt(3147), .param_str = "ddd", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11436 | // __nvvm_div_rz_f | ||
| 11437 | .{ .tag = @enumFromInt(3148), .param_str = "fff", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11438 | // __nvvm_div_rz_ftz_f | ||
| 11439 | .{ .tag = @enumFromInt(3149), .param_str = "fff", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11440 | // __nvvm_ex2_approx_d | ||
| 11441 | .{ .tag = @enumFromInt(3150), .param_str = "dd", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11442 | // __nvvm_ex2_approx_f | ||
| 11443 | .{ .tag = @enumFromInt(3151), .param_str = "ff", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11444 | // __nvvm_ex2_approx_ftz_f | ||
| 11445 | .{ .tag = @enumFromInt(3152), .param_str = "ff", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11446 | // __nvvm_f2h_rn | ||
| 11447 | .{ .tag = @enumFromInt(3153), .param_str = "Usf", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11448 | // __nvvm_f2h_rn_ftz | ||
| 11449 | .{ .tag = @enumFromInt(3154), .param_str = "Usf", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11450 | // __nvvm_f2i_rm | ||
| 11451 | .{ .tag = @enumFromInt(3155), .param_str = "if", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11452 | // __nvvm_f2i_rm_ftz | ||
| 11453 | .{ .tag = @enumFromInt(3156), .param_str = "if", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11454 | // __nvvm_f2i_rn | ||
| 11455 | .{ .tag = @enumFromInt(3157), .param_str = "if", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11456 | // __nvvm_f2i_rn_ftz | ||
| 11457 | .{ .tag = @enumFromInt(3158), .param_str = "if", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11458 | // __nvvm_f2i_rp | ||
| 11459 | .{ .tag = @enumFromInt(3159), .param_str = "if", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11460 | // __nvvm_f2i_rp_ftz | ||
| 11461 | .{ .tag = @enumFromInt(3160), .param_str = "if", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11462 | // __nvvm_f2i_rz | ||
| 11463 | .{ .tag = @enumFromInt(3161), .param_str = "if", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11464 | // __nvvm_f2i_rz_ftz | ||
| 11465 | .{ .tag = @enumFromInt(3162), .param_str = "if", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11466 | // __nvvm_f2ll_rm | ||
| 11467 | .{ .tag = @enumFromInt(3163), .param_str = "LLif", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11468 | // __nvvm_f2ll_rm_ftz | ||
| 11469 | .{ .tag = @enumFromInt(3164), .param_str = "LLif", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11470 | // __nvvm_f2ll_rn | ||
| 11471 | .{ .tag = @enumFromInt(3165), .param_str = "LLif", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11472 | // __nvvm_f2ll_rn_ftz | ||
| 11473 | .{ .tag = @enumFromInt(3166), .param_str = "LLif", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11474 | // __nvvm_f2ll_rp | ||
| 11475 | .{ .tag = @enumFromInt(3167), .param_str = "LLif", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11476 | // __nvvm_f2ll_rp_ftz | ||
| 11477 | .{ .tag = @enumFromInt(3168), .param_str = "LLif", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11478 | // __nvvm_f2ll_rz | ||
| 11479 | .{ .tag = @enumFromInt(3169), .param_str = "LLif", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11480 | // __nvvm_f2ll_rz_ftz | ||
| 11481 | .{ .tag = @enumFromInt(3170), .param_str = "LLif", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11482 | // __nvvm_f2ui_rm | ||
| 11483 | .{ .tag = @enumFromInt(3171), .param_str = "Uif", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11484 | // __nvvm_f2ui_rm_ftz | ||
| 11485 | .{ .tag = @enumFromInt(3172), .param_str = "Uif", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11486 | // __nvvm_f2ui_rn | ||
| 11487 | .{ .tag = @enumFromInt(3173), .param_str = "Uif", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11488 | // __nvvm_f2ui_rn_ftz | ||
| 11489 | .{ .tag = @enumFromInt(3174), .param_str = "Uif", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11490 | // __nvvm_f2ui_rp | ||
| 11491 | .{ .tag = @enumFromInt(3175), .param_str = "Uif", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11492 | // __nvvm_f2ui_rp_ftz | ||
| 11493 | .{ .tag = @enumFromInt(3176), .param_str = "Uif", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11494 | // __nvvm_f2ui_rz | ||
| 11495 | .{ .tag = @enumFromInt(3177), .param_str = "Uif", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11496 | // __nvvm_f2ui_rz_ftz | ||
| 11497 | .{ .tag = @enumFromInt(3178), .param_str = "Uif", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11498 | // __nvvm_f2ull_rm | ||
| 11499 | .{ .tag = @enumFromInt(3179), .param_str = "ULLif", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11500 | // __nvvm_f2ull_rm_ftz | ||
| 11501 | .{ .tag = @enumFromInt(3180), .param_str = "ULLif", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11502 | // __nvvm_f2ull_rn | ||
| 11503 | .{ .tag = @enumFromInt(3181), .param_str = "ULLif", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11504 | // __nvvm_f2ull_rn_ftz | ||
| 11505 | .{ .tag = @enumFromInt(3182), .param_str = "ULLif", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11506 | // __nvvm_f2ull_rp | ||
| 11507 | .{ .tag = @enumFromInt(3183), .param_str = "ULLif", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11508 | // __nvvm_f2ull_rp_ftz | ||
| 11509 | .{ .tag = @enumFromInt(3184), .param_str = "ULLif", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11510 | // __nvvm_f2ull_rz | ||
| 11511 | .{ .tag = @enumFromInt(3185), .param_str = "ULLif", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11512 | // __nvvm_f2ull_rz_ftz | ||
| 11513 | .{ .tag = @enumFromInt(3186), .param_str = "ULLif", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11514 | // __nvvm_fabs_d | ||
| 11515 | .{ .tag = @enumFromInt(3187), .param_str = "dd", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11516 | // __nvvm_fabs_f | ||
| 11517 | .{ .tag = @enumFromInt(3188), .param_str = "ff", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11518 | // __nvvm_fabs_ftz_f | ||
| 11519 | .{ .tag = @enumFromInt(3189), .param_str = "ff", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11520 | // __nvvm_floor_d | ||
| 11521 | .{ .tag = @enumFromInt(3190), .param_str = "dd", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11522 | // __nvvm_floor_f | ||
| 11523 | .{ .tag = @enumFromInt(3191), .param_str = "ff", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11524 | // __nvvm_floor_ftz_f | ||
| 11525 | .{ .tag = @enumFromInt(3192), .param_str = "ff", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11526 | // __nvvm_fma_rm_d | ||
| 11527 | .{ .tag = @enumFromInt(3193), .param_str = "dddd", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11528 | // __nvvm_fma_rm_f | ||
| 11529 | .{ .tag = @enumFromInt(3194), .param_str = "ffff", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11530 | // __nvvm_fma_rm_ftz_f | ||
| 11531 | .{ .tag = @enumFromInt(3195), .param_str = "ffff", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11532 | // __nvvm_fma_rn_d | ||
| 11533 | .{ .tag = @enumFromInt(3196), .param_str = "dddd", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11534 | // __nvvm_fma_rn_f | ||
| 11535 | .{ .tag = @enumFromInt(3197), .param_str = "ffff", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11536 | // __nvvm_fma_rn_ftz_f | ||
| 11537 | .{ .tag = @enumFromInt(3198), .param_str = "ffff", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11538 | // __nvvm_fma_rp_d | ||
| 11539 | .{ .tag = @enumFromInt(3199), .param_str = "dddd", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11540 | // __nvvm_fma_rp_f | ||
| 11541 | .{ .tag = @enumFromInt(3200), .param_str = "ffff", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11542 | // __nvvm_fma_rp_ftz_f | ||
| 11543 | .{ .tag = @enumFromInt(3201), .param_str = "ffff", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11544 | // __nvvm_fma_rz_d | ||
| 11545 | .{ .tag = @enumFromInt(3202), .param_str = "dddd", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11546 | // __nvvm_fma_rz_f | ||
| 11547 | .{ .tag = @enumFromInt(3203), .param_str = "ffff", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11548 | // __nvvm_fma_rz_ftz_f | ||
| 11549 | .{ .tag = @enumFromInt(3204), .param_str = "ffff", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11550 | // __nvvm_fmax_d | ||
| 11551 | .{ .tag = @enumFromInt(3205), .param_str = "ddd", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11552 | // __nvvm_fmax_f | ||
| 11553 | .{ .tag = @enumFromInt(3206), .param_str = "fff", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11554 | // __nvvm_fmax_ftz_f | ||
| 11555 | .{ .tag = @enumFromInt(3207), .param_str = "fff", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11556 | // __nvvm_fmin_d | ||
| 11557 | .{ .tag = @enumFromInt(3208), .param_str = "ddd", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11558 | // __nvvm_fmin_f | ||
| 11559 | .{ .tag = @enumFromInt(3209), .param_str = "fff", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11560 | // __nvvm_fmin_ftz_f | ||
| 11561 | .{ .tag = @enumFromInt(3210), .param_str = "fff", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11562 | // __nvvm_i2d_rm | ||
| 11563 | .{ .tag = @enumFromInt(3211), .param_str = "di", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11564 | // __nvvm_i2d_rn | ||
| 11565 | .{ .tag = @enumFromInt(3212), .param_str = "di", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11566 | // __nvvm_i2d_rp | ||
| 11567 | .{ .tag = @enumFromInt(3213), .param_str = "di", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11568 | // __nvvm_i2d_rz | ||
| 11569 | .{ .tag = @enumFromInt(3214), .param_str = "di", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11570 | // __nvvm_i2f_rm | ||
| 11571 | .{ .tag = @enumFromInt(3215), .param_str = "fi", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11572 | // __nvvm_i2f_rn | ||
| 11573 | .{ .tag = @enumFromInt(3216), .param_str = "fi", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11574 | // __nvvm_i2f_rp | ||
| 11575 | .{ .tag = @enumFromInt(3217), .param_str = "fi", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11576 | // __nvvm_i2f_rz | ||
| 11577 | .{ .tag = @enumFromInt(3218), .param_str = "fi", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11578 | // __nvvm_isspacep_const | ||
| 11579 | .{ .tag = @enumFromInt(3219), .param_str = "bvC*", .properties = .{ .target_set = TargetSet.initOne(.nvptx), .attributes = .{ .@"const" = true } } }, | ||
| 11580 | // __nvvm_isspacep_global | ||
| 11581 | .{ .tag = @enumFromInt(3220), .param_str = "bvC*", .properties = .{ .target_set = TargetSet.initOne(.nvptx), .attributes = .{ .@"const" = true } } }, | ||
| 11582 | // __nvvm_isspacep_local | ||
| 11583 | .{ .tag = @enumFromInt(3221), .param_str = "bvC*", .properties = .{ .target_set = TargetSet.initOne(.nvptx), .attributes = .{ .@"const" = true } } }, | ||
| 11584 | // __nvvm_isspacep_shared | ||
| 11585 | .{ .tag = @enumFromInt(3222), .param_str = "bvC*", .properties = .{ .target_set = TargetSet.initOne(.nvptx), .attributes = .{ .@"const" = true } } }, | ||
| 11586 | // __nvvm_ldg_c | ||
| 11587 | .{ .tag = @enumFromInt(3223), .param_str = "ccC*", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11588 | // __nvvm_ldg_c2 | ||
| 11589 | .{ .tag = @enumFromInt(3224), .param_str = "E2cE2cC*", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11590 | // __nvvm_ldg_c4 | ||
| 11591 | .{ .tag = @enumFromInt(3225), .param_str = "E4cE4cC*", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11592 | // __nvvm_ldg_d | ||
| 11593 | .{ .tag = @enumFromInt(3226), .param_str = "ddC*", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11594 | // __nvvm_ldg_d2 | ||
| 11595 | .{ .tag = @enumFromInt(3227), .param_str = "E2dE2dC*", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11596 | // __nvvm_ldg_f | ||
| 11597 | .{ .tag = @enumFromInt(3228), .param_str = "ffC*", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11598 | // __nvvm_ldg_f2 | ||
| 11599 | .{ .tag = @enumFromInt(3229), .param_str = "E2fE2fC*", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11600 | // __nvvm_ldg_f4 | ||
| 11601 | .{ .tag = @enumFromInt(3230), .param_str = "E4fE4fC*", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11602 | // __nvvm_ldg_h | ||
| 11603 | .{ .tag = @enumFromInt(3231), .param_str = "hhC*", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11604 | // __nvvm_ldg_h2 | ||
| 11605 | .{ .tag = @enumFromInt(3232), .param_str = "E2hE2hC*", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11606 | // __nvvm_ldg_i | ||
| 11607 | .{ .tag = @enumFromInt(3233), .param_str = "iiC*", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11608 | // __nvvm_ldg_i2 | ||
| 11609 | .{ .tag = @enumFromInt(3234), .param_str = "E2iE2iC*", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11610 | // __nvvm_ldg_i4 | ||
| 11611 | .{ .tag = @enumFromInt(3235), .param_str = "E4iE4iC*", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11612 | // __nvvm_ldg_l | ||
| 11613 | .{ .tag = @enumFromInt(3236), .param_str = "LiLiC*", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11614 | // __nvvm_ldg_l2 | ||
| 11615 | .{ .tag = @enumFromInt(3237), .param_str = "E2LiE2LiC*", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11616 | // __nvvm_ldg_ll | ||
| 11617 | .{ .tag = @enumFromInt(3238), .param_str = "LLiLLiC*", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11618 | // __nvvm_ldg_ll2 | ||
| 11619 | .{ .tag = @enumFromInt(3239), .param_str = "E2LLiE2LLiC*", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11620 | // __nvvm_ldg_s | ||
| 11621 | .{ .tag = @enumFromInt(3240), .param_str = "ssC*", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11622 | // __nvvm_ldg_s2 | ||
| 11623 | .{ .tag = @enumFromInt(3241), .param_str = "E2sE2sC*", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11624 | // __nvvm_ldg_s4 | ||
| 11625 | .{ .tag = @enumFromInt(3242), .param_str = "E4sE4sC*", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11626 | // __nvvm_ldg_sc | ||
| 11627 | .{ .tag = @enumFromInt(3243), .param_str = "ScScC*", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11628 | // __nvvm_ldg_sc2 | ||
| 11629 | .{ .tag = @enumFromInt(3244), .param_str = "E2ScE2ScC*", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11630 | // __nvvm_ldg_sc4 | ||
| 11631 | .{ .tag = @enumFromInt(3245), .param_str = "E4ScE4ScC*", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11632 | // __nvvm_ldg_uc | ||
| 11633 | .{ .tag = @enumFromInt(3246), .param_str = "UcUcC*", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11634 | // __nvvm_ldg_uc2 | ||
| 11635 | .{ .tag = @enumFromInt(3247), .param_str = "E2UcE2UcC*", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11636 | // __nvvm_ldg_uc4 | ||
| 11637 | .{ .tag = @enumFromInt(3248), .param_str = "E4UcE4UcC*", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11638 | // __nvvm_ldg_ui | ||
| 11639 | .{ .tag = @enumFromInt(3249), .param_str = "UiUiC*", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11640 | // __nvvm_ldg_ui2 | ||
| 11641 | .{ .tag = @enumFromInt(3250), .param_str = "E2UiE2UiC*", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11642 | // __nvvm_ldg_ui4 | ||
| 11643 | .{ .tag = @enumFromInt(3251), .param_str = "E4UiE4UiC*", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11644 | // __nvvm_ldg_ul | ||
| 11645 | .{ .tag = @enumFromInt(3252), .param_str = "ULiULiC*", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11646 | // __nvvm_ldg_ul2 | ||
| 11647 | .{ .tag = @enumFromInt(3253), .param_str = "E2ULiE2ULiC*", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11648 | // __nvvm_ldg_ull | ||
| 11649 | .{ .tag = @enumFromInt(3254), .param_str = "ULLiULLiC*", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11650 | // __nvvm_ldg_ull2 | ||
| 11651 | .{ .tag = @enumFromInt(3255), .param_str = "E2ULLiE2ULLiC*", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11652 | // __nvvm_ldg_us | ||
| 11653 | .{ .tag = @enumFromInt(3256), .param_str = "UsUsC*", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11654 | // __nvvm_ldg_us2 | ||
| 11655 | .{ .tag = @enumFromInt(3257), .param_str = "E2UsE2UsC*", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11656 | // __nvvm_ldg_us4 | ||
| 11657 | .{ .tag = @enumFromInt(3258), .param_str = "E4UsE4UsC*", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11658 | // __nvvm_ldu_c | ||
| 11659 | .{ .tag = @enumFromInt(3259), .param_str = "ccC*", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11660 | // __nvvm_ldu_c2 | ||
| 11661 | .{ .tag = @enumFromInt(3260), .param_str = "E2cE2cC*", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11662 | // __nvvm_ldu_c4 | ||
| 11663 | .{ .tag = @enumFromInt(3261), .param_str = "E4cE4cC*", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11664 | // __nvvm_ldu_d | ||
| 11665 | .{ .tag = @enumFromInt(3262), .param_str = "ddC*", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11666 | // __nvvm_ldu_d2 | ||
| 11667 | .{ .tag = @enumFromInt(3263), .param_str = "E2dE2dC*", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11668 | // __nvvm_ldu_f | ||
| 11669 | .{ .tag = @enumFromInt(3264), .param_str = "ffC*", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11670 | // __nvvm_ldu_f2 | ||
| 11671 | .{ .tag = @enumFromInt(3265), .param_str = "E2fE2fC*", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11672 | // __nvvm_ldu_f4 | ||
| 11673 | .{ .tag = @enumFromInt(3266), .param_str = "E4fE4fC*", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11674 | // __nvvm_ldu_h | ||
| 11675 | .{ .tag = @enumFromInt(3267), .param_str = "hhC*", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11676 | // __nvvm_ldu_h2 | ||
| 11677 | .{ .tag = @enumFromInt(3268), .param_str = "E2hE2hC*", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11678 | // __nvvm_ldu_i | ||
| 11679 | .{ .tag = @enumFromInt(3269), .param_str = "iiC*", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11680 | // __nvvm_ldu_i2 | ||
| 11681 | .{ .tag = @enumFromInt(3270), .param_str = "E2iE2iC*", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11682 | // __nvvm_ldu_i4 | ||
| 11683 | .{ .tag = @enumFromInt(3271), .param_str = "E4iE4iC*", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11684 | // __nvvm_ldu_l | ||
| 11685 | .{ .tag = @enumFromInt(3272), .param_str = "LiLiC*", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11686 | // __nvvm_ldu_l2 | ||
| 11687 | .{ .tag = @enumFromInt(3273), .param_str = "E2LiE2LiC*", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11688 | // __nvvm_ldu_ll | ||
| 11689 | .{ .tag = @enumFromInt(3274), .param_str = "LLiLLiC*", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11690 | // __nvvm_ldu_ll2 | ||
| 11691 | .{ .tag = @enumFromInt(3275), .param_str = "E2LLiE2LLiC*", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11692 | // __nvvm_ldu_s | ||
| 11693 | .{ .tag = @enumFromInt(3276), .param_str = "ssC*", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11694 | // __nvvm_ldu_s2 | ||
| 11695 | .{ .tag = @enumFromInt(3277), .param_str = "E2sE2sC*", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11696 | // __nvvm_ldu_s4 | ||
| 11697 | .{ .tag = @enumFromInt(3278), .param_str = "E4sE4sC*", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11698 | // __nvvm_ldu_sc | ||
| 11699 | .{ .tag = @enumFromInt(3279), .param_str = "ScScC*", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11700 | // __nvvm_ldu_sc2 | ||
| 11701 | .{ .tag = @enumFromInt(3280), .param_str = "E2ScE2ScC*", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11702 | // __nvvm_ldu_sc4 | ||
| 11703 | .{ .tag = @enumFromInt(3281), .param_str = "E4ScE4ScC*", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11704 | // __nvvm_ldu_uc | ||
| 11705 | .{ .tag = @enumFromInt(3282), .param_str = "UcUcC*", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11706 | // __nvvm_ldu_uc2 | ||
| 11707 | .{ .tag = @enumFromInt(3283), .param_str = "E2UcE2UcC*", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11708 | // __nvvm_ldu_uc4 | ||
| 11709 | .{ .tag = @enumFromInt(3284), .param_str = "E4UcE4UcC*", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11710 | // __nvvm_ldu_ui | ||
| 11711 | .{ .tag = @enumFromInt(3285), .param_str = "UiUiC*", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11712 | // __nvvm_ldu_ui2 | ||
| 11713 | .{ .tag = @enumFromInt(3286), .param_str = "E2UiE2UiC*", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11714 | // __nvvm_ldu_ui4 | ||
| 11715 | .{ .tag = @enumFromInt(3287), .param_str = "E4UiE4UiC*", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11716 | // __nvvm_ldu_ul | ||
| 11717 | .{ .tag = @enumFromInt(3288), .param_str = "ULiULiC*", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11718 | // __nvvm_ldu_ul2 | ||
| 11719 | .{ .tag = @enumFromInt(3289), .param_str = "E2ULiE2ULiC*", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11720 | // __nvvm_ldu_ull | ||
| 11721 | .{ .tag = @enumFromInt(3290), .param_str = "ULLiULLiC*", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11722 | // __nvvm_ldu_ull2 | ||
| 11723 | .{ .tag = @enumFromInt(3291), .param_str = "E2ULLiE2ULLiC*", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11724 | // __nvvm_ldu_us | ||
| 11725 | .{ .tag = @enumFromInt(3292), .param_str = "UsUsC*", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11726 | // __nvvm_ldu_us2 | ||
| 11727 | .{ .tag = @enumFromInt(3293), .param_str = "E2UsE2UsC*", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11728 | // __nvvm_ldu_us4 | ||
| 11729 | .{ .tag = @enumFromInt(3294), .param_str = "E4UsE4UsC*", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11730 | // __nvvm_lg2_approx_d | ||
| 11731 | .{ .tag = @enumFromInt(3295), .param_str = "dd", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11732 | // __nvvm_lg2_approx_f | ||
| 11733 | .{ .tag = @enumFromInt(3296), .param_str = "ff", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11734 | // __nvvm_lg2_approx_ftz_f | ||
| 11735 | .{ .tag = @enumFromInt(3297), .param_str = "ff", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11736 | // __nvvm_ll2d_rm | ||
| 11737 | .{ .tag = @enumFromInt(3298), .param_str = "dLLi", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11738 | // __nvvm_ll2d_rn | ||
| 11739 | .{ .tag = @enumFromInt(3299), .param_str = "dLLi", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11740 | // __nvvm_ll2d_rp | ||
| 11741 | .{ .tag = @enumFromInt(3300), .param_str = "dLLi", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11742 | // __nvvm_ll2d_rz | ||
| 11743 | .{ .tag = @enumFromInt(3301), .param_str = "dLLi", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11744 | // __nvvm_ll2f_rm | ||
| 11745 | .{ .tag = @enumFromInt(3302), .param_str = "fLLi", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11746 | // __nvvm_ll2f_rn | ||
| 11747 | .{ .tag = @enumFromInt(3303), .param_str = "fLLi", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11748 | // __nvvm_ll2f_rp | ||
| 11749 | .{ .tag = @enumFromInt(3304), .param_str = "fLLi", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11750 | // __nvvm_ll2f_rz | ||
| 11751 | .{ .tag = @enumFromInt(3305), .param_str = "fLLi", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11752 | // __nvvm_lohi_i2d | ||
| 11753 | .{ .tag = @enumFromInt(3306), .param_str = "dii", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11754 | // __nvvm_membar_cta | ||
| 11755 | .{ .tag = @enumFromInt(3307), .param_str = "v", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11756 | // __nvvm_membar_gl | ||
| 11757 | .{ .tag = @enumFromInt(3308), .param_str = "v", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11758 | // __nvvm_membar_sys | ||
| 11759 | .{ .tag = @enumFromInt(3309), .param_str = "v", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11760 | // __nvvm_memcpy | ||
| 11761 | .{ .tag = @enumFromInt(3310), .param_str = "vUc*Uc*zi", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11762 | // __nvvm_memset | ||
| 11763 | .{ .tag = @enumFromInt(3311), .param_str = "vUc*Uczi", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11764 | // __nvvm_mul24_i | ||
| 11765 | .{ .tag = @enumFromInt(3312), .param_str = "iii", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11766 | // __nvvm_mul24_ui | ||
| 11767 | .{ .tag = @enumFromInt(3313), .param_str = "UiUiUi", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11768 | // __nvvm_mul_rm_d | ||
| 11769 | .{ .tag = @enumFromInt(3314), .param_str = "ddd", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11770 | // __nvvm_mul_rm_f | ||
| 11771 | .{ .tag = @enumFromInt(3315), .param_str = "fff", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11772 | // __nvvm_mul_rm_ftz_f | ||
| 11773 | .{ .tag = @enumFromInt(3316), .param_str = "fff", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11774 | // __nvvm_mul_rn_d | ||
| 11775 | .{ .tag = @enumFromInt(3317), .param_str = "ddd", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11776 | // __nvvm_mul_rn_f | ||
| 11777 | .{ .tag = @enumFromInt(3318), .param_str = "fff", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11778 | // __nvvm_mul_rn_ftz_f | ||
| 11779 | .{ .tag = @enumFromInt(3319), .param_str = "fff", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11780 | // __nvvm_mul_rp_d | ||
| 11781 | .{ .tag = @enumFromInt(3320), .param_str = "ddd", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11782 | // __nvvm_mul_rp_f | ||
| 11783 | .{ .tag = @enumFromInt(3321), .param_str = "fff", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11784 | // __nvvm_mul_rp_ftz_f | ||
| 11785 | .{ .tag = @enumFromInt(3322), .param_str = "fff", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11786 | // __nvvm_mul_rz_d | ||
| 11787 | .{ .tag = @enumFromInt(3323), .param_str = "ddd", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11788 | // __nvvm_mul_rz_f | ||
| 11789 | .{ .tag = @enumFromInt(3324), .param_str = "fff", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11790 | // __nvvm_mul_rz_ftz_f | ||
| 11791 | .{ .tag = @enumFromInt(3325), .param_str = "fff", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11792 | // __nvvm_mulhi_i | ||
| 11793 | .{ .tag = @enumFromInt(3326), .param_str = "iii", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11794 | // __nvvm_mulhi_ll | ||
| 11795 | .{ .tag = @enumFromInt(3327), .param_str = "LLiLLiLLi", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11796 | // __nvvm_mulhi_ui | ||
| 11797 | .{ .tag = @enumFromInt(3328), .param_str = "UiUiUi", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11798 | // __nvvm_mulhi_ull | ||
| 11799 | .{ .tag = @enumFromInt(3329), .param_str = "ULLiULLiULLi", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11800 | // __nvvm_prmt | ||
| 11801 | .{ .tag = @enumFromInt(3330), .param_str = "UiUiUiUi", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11802 | // __nvvm_rcp_approx_ftz_d | ||
| 11803 | .{ .tag = @enumFromInt(3331), .param_str = "dd", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11804 | // __nvvm_rcp_approx_ftz_f | ||
| 11805 | .{ .tag = @enumFromInt(3332), .param_str = "ff", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11806 | // __nvvm_rcp_rm_d | ||
| 11807 | .{ .tag = @enumFromInt(3333), .param_str = "dd", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11808 | // __nvvm_rcp_rm_f | ||
| 11809 | .{ .tag = @enumFromInt(3334), .param_str = "ff", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11810 | // __nvvm_rcp_rm_ftz_f | ||
| 11811 | .{ .tag = @enumFromInt(3335), .param_str = "ff", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11812 | // __nvvm_rcp_rn_d | ||
| 11813 | .{ .tag = @enumFromInt(3336), .param_str = "dd", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11814 | // __nvvm_rcp_rn_f | ||
| 11815 | .{ .tag = @enumFromInt(3337), .param_str = "ff", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11816 | // __nvvm_rcp_rn_ftz_f | ||
| 11817 | .{ .tag = @enumFromInt(3338), .param_str = "ff", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11818 | // __nvvm_rcp_rp_d | ||
| 11819 | .{ .tag = @enumFromInt(3339), .param_str = "dd", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11820 | // __nvvm_rcp_rp_f | ||
| 11821 | .{ .tag = @enumFromInt(3340), .param_str = "ff", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11822 | // __nvvm_rcp_rp_ftz_f | ||
| 11823 | .{ .tag = @enumFromInt(3341), .param_str = "ff", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11824 | // __nvvm_rcp_rz_d | ||
| 11825 | .{ .tag = @enumFromInt(3342), .param_str = "dd", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11826 | // __nvvm_rcp_rz_f | ||
| 11827 | .{ .tag = @enumFromInt(3343), .param_str = "ff", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11828 | // __nvvm_rcp_rz_ftz_f | ||
| 11829 | .{ .tag = @enumFromInt(3344), .param_str = "ff", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11830 | // __nvvm_read_ptx_sreg_clock | ||
| 11831 | .{ .tag = @enumFromInt(3345), .param_str = "i", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11832 | // __nvvm_read_ptx_sreg_clock64 | ||
| 11833 | .{ .tag = @enumFromInt(3346), .param_str = "LLi", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11834 | // __nvvm_read_ptx_sreg_ctaid_w | ||
| 11835 | .{ .tag = @enumFromInt(3347), .param_str = "i", .properties = .{ .target_set = TargetSet.initOne(.nvptx), .attributes = .{ .@"const" = true } } }, | ||
| 11836 | // __nvvm_read_ptx_sreg_ctaid_x | ||
| 11837 | .{ .tag = @enumFromInt(3348), .param_str = "i", .properties = .{ .target_set = TargetSet.initOne(.nvptx), .attributes = .{ .@"const" = true } } }, | ||
| 11838 | // __nvvm_read_ptx_sreg_ctaid_y | ||
| 11839 | .{ .tag = @enumFromInt(3349), .param_str = "i", .properties = .{ .target_set = TargetSet.initOne(.nvptx), .attributes = .{ .@"const" = true } } }, | ||
| 11840 | // __nvvm_read_ptx_sreg_ctaid_z | ||
| 11841 | .{ .tag = @enumFromInt(3350), .param_str = "i", .properties = .{ .target_set = TargetSet.initOne(.nvptx), .attributes = .{ .@"const" = true } } }, | ||
| 11842 | // __nvvm_read_ptx_sreg_gridid | ||
| 11843 | .{ .tag = @enumFromInt(3351), .param_str = "i", .properties = .{ .target_set = TargetSet.initOne(.nvptx), .attributes = .{ .@"const" = true } } }, | ||
| 11844 | // __nvvm_read_ptx_sreg_laneid | ||
| 11845 | .{ .tag = @enumFromInt(3352), .param_str = "i", .properties = .{ .target_set = TargetSet.initOne(.nvptx), .attributes = .{ .@"const" = true } } }, | ||
| 11846 | // __nvvm_read_ptx_sreg_lanemask_eq | ||
| 11847 | .{ .tag = @enumFromInt(3353), .param_str = "i", .properties = .{ .target_set = TargetSet.initOne(.nvptx), .attributes = .{ .@"const" = true } } }, | ||
| 11848 | // __nvvm_read_ptx_sreg_lanemask_ge | ||
| 11849 | .{ .tag = @enumFromInt(3354), .param_str = "i", .properties = .{ .target_set = TargetSet.initOne(.nvptx), .attributes = .{ .@"const" = true } } }, | ||
| 11850 | // __nvvm_read_ptx_sreg_lanemask_gt | ||
| 11851 | .{ .tag = @enumFromInt(3355), .param_str = "i", .properties = .{ .target_set = TargetSet.initOne(.nvptx), .attributes = .{ .@"const" = true } } }, | ||
| 11852 | // __nvvm_read_ptx_sreg_lanemask_le | ||
| 11853 | .{ .tag = @enumFromInt(3356), .param_str = "i", .properties = .{ .target_set = TargetSet.initOne(.nvptx), .attributes = .{ .@"const" = true } } }, | ||
| 11854 | // __nvvm_read_ptx_sreg_lanemask_lt | ||
| 11855 | .{ .tag = @enumFromInt(3357), .param_str = "i", .properties = .{ .target_set = TargetSet.initOne(.nvptx), .attributes = .{ .@"const" = true } } }, | ||
| 11856 | // __nvvm_read_ptx_sreg_nctaid_w | ||
| 11857 | .{ .tag = @enumFromInt(3358), .param_str = "i", .properties = .{ .target_set = TargetSet.initOne(.nvptx), .attributes = .{ .@"const" = true } } }, | ||
| 11858 | // __nvvm_read_ptx_sreg_nctaid_x | ||
| 11859 | .{ .tag = @enumFromInt(3359), .param_str = "i", .properties = .{ .target_set = TargetSet.initOne(.nvptx), .attributes = .{ .@"const" = true } } }, | ||
| 11860 | // __nvvm_read_ptx_sreg_nctaid_y | ||
| 11861 | .{ .tag = @enumFromInt(3360), .param_str = "i", .properties = .{ .target_set = TargetSet.initOne(.nvptx), .attributes = .{ .@"const" = true } } }, | ||
| 11862 | // __nvvm_read_ptx_sreg_nctaid_z | ||
| 11863 | .{ .tag = @enumFromInt(3361), .param_str = "i", .properties = .{ .target_set = TargetSet.initOne(.nvptx), .attributes = .{ .@"const" = true } } }, | ||
| 11864 | // __nvvm_read_ptx_sreg_nsmid | ||
| 11865 | .{ .tag = @enumFromInt(3362), .param_str = "i", .properties = .{ .target_set = TargetSet.initOne(.nvptx), .attributes = .{ .@"const" = true } } }, | ||
| 11866 | // __nvvm_read_ptx_sreg_ntid_w | ||
| 11867 | .{ .tag = @enumFromInt(3363), .param_str = "i", .properties = .{ .target_set = TargetSet.initOne(.nvptx), .attributes = .{ .@"const" = true } } }, | ||
| 11868 | // __nvvm_read_ptx_sreg_ntid_x | ||
| 11869 | .{ .tag = @enumFromInt(3364), .param_str = "i", .properties = .{ .target_set = TargetSet.initOne(.nvptx), .attributes = .{ .@"const" = true } } }, | ||
| 11870 | // __nvvm_read_ptx_sreg_ntid_y | ||
| 11871 | .{ .tag = @enumFromInt(3365), .param_str = "i", .properties = .{ .target_set = TargetSet.initOne(.nvptx), .attributes = .{ .@"const" = true } } }, | ||
| 11872 | // __nvvm_read_ptx_sreg_ntid_z | ||
| 11873 | .{ .tag = @enumFromInt(3366), .param_str = "i", .properties = .{ .target_set = TargetSet.initOne(.nvptx), .attributes = .{ .@"const" = true } } }, | ||
| 11874 | // __nvvm_read_ptx_sreg_nwarpid | ||
| 11875 | .{ .tag = @enumFromInt(3367), .param_str = "i", .properties = .{ .target_set = TargetSet.initOne(.nvptx), .attributes = .{ .@"const" = true } } }, | ||
| 11876 | // __nvvm_read_ptx_sreg_pm0 | ||
| 11877 | .{ .tag = @enumFromInt(3368), .param_str = "i", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11878 | // __nvvm_read_ptx_sreg_pm1 | ||
| 11879 | .{ .tag = @enumFromInt(3369), .param_str = "i", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11880 | // __nvvm_read_ptx_sreg_pm2 | ||
| 11881 | .{ .tag = @enumFromInt(3370), .param_str = "i", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11882 | // __nvvm_read_ptx_sreg_pm3 | ||
| 11883 | .{ .tag = @enumFromInt(3371), .param_str = "i", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11884 | // __nvvm_read_ptx_sreg_smid | ||
| 11885 | .{ .tag = @enumFromInt(3372), .param_str = "i", .properties = .{ .target_set = TargetSet.initOne(.nvptx), .attributes = .{ .@"const" = true } } }, | ||
| 11886 | // __nvvm_read_ptx_sreg_tid_w | ||
| 11887 | .{ .tag = @enumFromInt(3373), .param_str = "i", .properties = .{ .target_set = TargetSet.initOne(.nvptx), .attributes = .{ .@"const" = true } } }, | ||
| 11888 | // __nvvm_read_ptx_sreg_tid_x | ||
| 11889 | .{ .tag = @enumFromInt(3374), .param_str = "i", .properties = .{ .target_set = TargetSet.initOne(.nvptx), .attributes = .{ .@"const" = true } } }, | ||
| 11890 | // __nvvm_read_ptx_sreg_tid_y | ||
| 11891 | .{ .tag = @enumFromInt(3375), .param_str = "i", .properties = .{ .target_set = TargetSet.initOne(.nvptx), .attributes = .{ .@"const" = true } } }, | ||
| 11892 | // __nvvm_read_ptx_sreg_tid_z | ||
| 11893 | .{ .tag = @enumFromInt(3376), .param_str = "i", .properties = .{ .target_set = TargetSet.initOne(.nvptx), .attributes = .{ .@"const" = true } } }, | ||
| 11894 | // __nvvm_read_ptx_sreg_warpid | ||
| 11895 | .{ .tag = @enumFromInt(3377), .param_str = "i", .properties = .{ .target_set = TargetSet.initOne(.nvptx), .attributes = .{ .@"const" = true } } }, | ||
| 11896 | // __nvvm_round_d | ||
| 11897 | .{ .tag = @enumFromInt(3378), .param_str = "dd", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11898 | // __nvvm_round_f | ||
| 11899 | .{ .tag = @enumFromInt(3379), .param_str = "ff", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11900 | // __nvvm_round_ftz_f | ||
| 11901 | .{ .tag = @enumFromInt(3380), .param_str = "ff", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11902 | // __nvvm_rsqrt_approx_d | ||
| 11903 | .{ .tag = @enumFromInt(3381), .param_str = "dd", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11904 | // __nvvm_rsqrt_approx_f | ||
| 11905 | .{ .tag = @enumFromInt(3382), .param_str = "ff", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11906 | // __nvvm_rsqrt_approx_ftz_f | ||
| 11907 | .{ .tag = @enumFromInt(3383), .param_str = "ff", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11908 | // __nvvm_sad_i | ||
| 11909 | .{ .tag = @enumFromInt(3384), .param_str = "iiii", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11910 | // __nvvm_sad_ui | ||
| 11911 | .{ .tag = @enumFromInt(3385), .param_str = "UiUiUiUi", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11912 | // __nvvm_saturate_d | ||
| 11913 | .{ .tag = @enumFromInt(3386), .param_str = "dd", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11914 | // __nvvm_saturate_f | ||
| 11915 | .{ .tag = @enumFromInt(3387), .param_str = "ff", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11916 | // __nvvm_saturate_ftz_f | ||
| 11917 | .{ .tag = @enumFromInt(3388), .param_str = "ff", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11918 | // __nvvm_shfl_bfly_f32 | ||
| 11919 | .{ .tag = @enumFromInt(3389), .param_str = "ffii", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11920 | // __nvvm_shfl_bfly_i32 | ||
| 11921 | .{ .tag = @enumFromInt(3390), .param_str = "iiii", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11922 | // __nvvm_shfl_down_f32 | ||
| 11923 | .{ .tag = @enumFromInt(3391), .param_str = "ffii", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11924 | // __nvvm_shfl_down_i32 | ||
| 11925 | .{ .tag = @enumFromInt(3392), .param_str = "iiii", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11926 | // __nvvm_shfl_idx_f32 | ||
| 11927 | .{ .tag = @enumFromInt(3393), .param_str = "ffii", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11928 | // __nvvm_shfl_idx_i32 | ||
| 11929 | .{ .tag = @enumFromInt(3394), .param_str = "iiii", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11930 | // __nvvm_shfl_up_f32 | ||
| 11931 | .{ .tag = @enumFromInt(3395), .param_str = "ffii", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11932 | // __nvvm_shfl_up_i32 | ||
| 11933 | .{ .tag = @enumFromInt(3396), .param_str = "iiii", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11934 | // __nvvm_sin_approx_f | ||
| 11935 | .{ .tag = @enumFromInt(3397), .param_str = "ff", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11936 | // __nvvm_sin_approx_ftz_f | ||
| 11937 | .{ .tag = @enumFromInt(3398), .param_str = "ff", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11938 | // __nvvm_sqrt_approx_f | ||
| 11939 | .{ .tag = @enumFromInt(3399), .param_str = "ff", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11940 | // __nvvm_sqrt_approx_ftz_f | ||
| 11941 | .{ .tag = @enumFromInt(3400), .param_str = "ff", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11942 | // __nvvm_sqrt_rm_d | ||
| 11943 | .{ .tag = @enumFromInt(3401), .param_str = "dd", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11944 | // __nvvm_sqrt_rm_f | ||
| 11945 | .{ .tag = @enumFromInt(3402), .param_str = "ff", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11946 | // __nvvm_sqrt_rm_ftz_f | ||
| 11947 | .{ .tag = @enumFromInt(3403), .param_str = "ff", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11948 | // __nvvm_sqrt_rn_d | ||
| 11949 | .{ .tag = @enumFromInt(3404), .param_str = "dd", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11950 | // __nvvm_sqrt_rn_f | ||
| 11951 | .{ .tag = @enumFromInt(3405), .param_str = "ff", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11952 | // __nvvm_sqrt_rn_ftz_f | ||
| 11953 | .{ .tag = @enumFromInt(3406), .param_str = "ff", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11954 | // __nvvm_sqrt_rp_d | ||
| 11955 | .{ .tag = @enumFromInt(3407), .param_str = "dd", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11956 | // __nvvm_sqrt_rp_f | ||
| 11957 | .{ .tag = @enumFromInt(3408), .param_str = "ff", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11958 | // __nvvm_sqrt_rp_ftz_f | ||
| 11959 | .{ .tag = @enumFromInt(3409), .param_str = "ff", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11960 | // __nvvm_sqrt_rz_d | ||
| 11961 | .{ .tag = @enumFromInt(3410), .param_str = "dd", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11962 | // __nvvm_sqrt_rz_f | ||
| 11963 | .{ .tag = @enumFromInt(3411), .param_str = "ff", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11964 | // __nvvm_sqrt_rz_ftz_f | ||
| 11965 | .{ .tag = @enumFromInt(3412), .param_str = "ff", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11966 | // __nvvm_trunc_d | ||
| 11967 | .{ .tag = @enumFromInt(3413), .param_str = "dd", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11968 | // __nvvm_trunc_f | ||
| 11969 | .{ .tag = @enumFromInt(3414), .param_str = "ff", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11970 | // __nvvm_trunc_ftz_f | ||
| 11971 | .{ .tag = @enumFromInt(3415), .param_str = "ff", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11972 | // __nvvm_ui2d_rm | ||
| 11973 | .{ .tag = @enumFromInt(3416), .param_str = "dUi", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11974 | // __nvvm_ui2d_rn | ||
| 11975 | .{ .tag = @enumFromInt(3417), .param_str = "dUi", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11976 | // __nvvm_ui2d_rp | ||
| 11977 | .{ .tag = @enumFromInt(3418), .param_str = "dUi", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11978 | // __nvvm_ui2d_rz | ||
| 11979 | .{ .tag = @enumFromInt(3419), .param_str = "dUi", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11980 | // __nvvm_ui2f_rm | ||
| 11981 | .{ .tag = @enumFromInt(3420), .param_str = "fUi", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11982 | // __nvvm_ui2f_rn | ||
| 11983 | .{ .tag = @enumFromInt(3421), .param_str = "fUi", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11984 | // __nvvm_ui2f_rp | ||
| 11985 | .{ .tag = @enumFromInt(3422), .param_str = "fUi", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11986 | // __nvvm_ui2f_rz | ||
| 11987 | .{ .tag = @enumFromInt(3423), .param_str = "fUi", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11988 | // __nvvm_ull2d_rm | ||
| 11989 | .{ .tag = @enumFromInt(3424), .param_str = "dULLi", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11990 | // __nvvm_ull2d_rn | ||
| 11991 | .{ .tag = @enumFromInt(3425), .param_str = "dULLi", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11992 | // __nvvm_ull2d_rp | ||
| 11993 | .{ .tag = @enumFromInt(3426), .param_str = "dULLi", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11994 | // __nvvm_ull2d_rz | ||
| 11995 | .{ .tag = @enumFromInt(3427), .param_str = "dULLi", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11996 | // __nvvm_ull2f_rm | ||
| 11997 | .{ .tag = @enumFromInt(3428), .param_str = "fULLi", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 11998 | // __nvvm_ull2f_rn | ||
| 11999 | .{ .tag = @enumFromInt(3429), .param_str = "fULLi", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 12000 | // __nvvm_ull2f_rp | ||
| 12001 | .{ .tag = @enumFromInt(3430), .param_str = "fULLi", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 12002 | // __nvvm_ull2f_rz | ||
| 12003 | .{ .tag = @enumFromInt(3431), .param_str = "fULLi", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 12004 | // __nvvm_vote_all | ||
| 12005 | .{ .tag = @enumFromInt(3432), .param_str = "bb", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 12006 | // __nvvm_vote_any | ||
| 12007 | .{ .tag = @enumFromInt(3433), .param_str = "bb", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 12008 | // __nvvm_vote_ballot | ||
| 12009 | .{ .tag = @enumFromInt(3434), .param_str = "Uib", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 12010 | // __nvvm_vote_uni | ||
| 12011 | .{ .tag = @enumFromInt(3435), .param_str = "bb", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 12012 | // __popcnt | ||
| 12013 | .{ .tag = @enumFromInt(3436), .param_str = "UiUi", .properties = .{ .language = .all_ms_languages, .attributes = .{ .@"const" = true, .const_evaluable = true } } }, | ||
| 12014 | // __popcnt16 | ||
| 12015 | .{ .tag = @enumFromInt(3437), .param_str = "UsUs", .properties = .{ .language = .all_ms_languages, .attributes = .{ .@"const" = true, .const_evaluable = true } } }, | ||
| 12016 | // __popcnt64 | ||
| 12017 | .{ .tag = @enumFromInt(3438), .param_str = "UWiUWi", .properties = .{ .language = .all_ms_languages, .attributes = .{ .@"const" = true, .const_evaluable = true } } }, | ||
| 12018 | // __rdtsc | ||
| 12019 | .{ .tag = @enumFromInt(3439), .param_str = "UOi", .properties = .{ .target_set = TargetSet.initOne(.x86) } }, | ||
| 12020 | // __sev | ||
| 12021 | .{ .tag = @enumFromInt(3440), .param_str = "v", .properties = .{ .language = .all_ms_languages, .target_set = TargetSet.initMany(&.{ .aarch64, .arm }) } }, | ||
| 12022 | // __sevl | ||
| 12023 | .{ .tag = @enumFromInt(3441), .param_str = "v", .properties = .{ .language = .all_ms_languages, .target_set = TargetSet.initMany(&.{ .aarch64, .arm }) } }, | ||
| 12024 | // __sigsetjmp | ||
| 12025 | .{ .tag = @enumFromInt(3442), .param_str = "iSJi", .properties = .{ .header = .setjmp, .attributes = .{ .allow_type_mismatch = true, .lib_function_without_prefix = true, .returns_twice = true } } }, | ||
| 12026 | // __sinpi | ||
| 12027 | .{ .tag = @enumFromInt(3443), .param_str = "dd", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12028 | // __sinpif | ||
| 12029 | .{ .tag = @enumFromInt(3444), .param_str = "ff", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12030 | // __sync_add_and_fetch | ||
| 12031 | .{ .tag = @enumFromInt(3445), .param_str = "v.", .properties = .{ .attributes = .{ .custom_typecheck = true } } }, | ||
| 12032 | // __sync_add_and_fetch_1 | ||
| 12033 | .{ .tag = @enumFromInt(3446), .param_str = "ccD*c.", .properties = .{ .attributes = .{ .custom_typecheck = true } } }, | ||
| 12034 | // __sync_add_and_fetch_16 | ||
| 12035 | .{ .tag = @enumFromInt(3447), .param_str = "LLLiLLLiD*LLLi.", .properties = .{ .attributes = .{ .custom_typecheck = true } } }, | ||
| 12036 | // __sync_add_and_fetch_2 | ||
| 12037 | .{ .tag = @enumFromInt(3448), .param_str = "ssD*s.", .properties = .{ .attributes = .{ .custom_typecheck = true } } }, | ||
| 12038 | // __sync_add_and_fetch_4 | ||
| 12039 | .{ .tag = @enumFromInt(3449), .param_str = "iiD*i.", .properties = .{ .attributes = .{ .custom_typecheck = true } } }, | ||
| 12040 | // __sync_add_and_fetch_8 | ||
| 12041 | .{ .tag = @enumFromInt(3450), .param_str = "LLiLLiD*LLi.", .properties = .{ .attributes = .{ .custom_typecheck = true } } }, | ||
| 12042 | // __sync_and_and_fetch | ||
| 12043 | .{ .tag = @enumFromInt(3451), .param_str = "v.", .properties = .{ .attributes = .{ .custom_typecheck = true } } }, | ||
| 12044 | // __sync_and_and_fetch_1 | ||
| 12045 | .{ .tag = @enumFromInt(3452), .param_str = "ccD*c.", .properties = .{ .attributes = .{ .custom_typecheck = true } } }, | ||
| 12046 | // __sync_and_and_fetch_16 | ||
| 12047 | .{ .tag = @enumFromInt(3453), .param_str = "LLLiLLLiD*LLLi.", .properties = .{ .attributes = .{ .custom_typecheck = true } } }, | ||
| 12048 | // __sync_and_and_fetch_2 | ||
| 12049 | .{ .tag = @enumFromInt(3454), .param_str = "ssD*s.", .properties = .{ .attributes = .{ .custom_typecheck = true } } }, | ||
| 12050 | // __sync_and_and_fetch_4 | ||
| 12051 | .{ .tag = @enumFromInt(3455), .param_str = "iiD*i.", .properties = .{ .attributes = .{ .custom_typecheck = true } } }, | ||
| 12052 | // __sync_and_and_fetch_8 | ||
| 12053 | .{ .tag = @enumFromInt(3456), .param_str = "LLiLLiD*LLi.", .properties = .{ .attributes = .{ .custom_typecheck = true } } }, | ||
| 12054 | // __sync_bool_compare_and_swap | ||
| 12055 | .{ .tag = @enumFromInt(3457), .param_str = "v.", .properties = .{ .attributes = .{ .custom_typecheck = true } } }, | ||
| 12056 | // __sync_bool_compare_and_swap_1 | ||
| 12057 | .{ .tag = @enumFromInt(3458), .param_str = "bcD*cc.", .properties = .{ .attributes = .{ .custom_typecheck = true } } }, | ||
| 12058 | // __sync_bool_compare_and_swap_16 | ||
| 12059 | .{ .tag = @enumFromInt(3459), .param_str = "bLLLiD*LLLiLLLi.", .properties = .{ .attributes = .{ .custom_typecheck = true } } }, | ||
| 12060 | // __sync_bool_compare_and_swap_2 | ||
| 12061 | .{ .tag = @enumFromInt(3460), .param_str = "bsD*ss.", .properties = .{ .attributes = .{ .custom_typecheck = true } } }, | ||
| 12062 | // __sync_bool_compare_and_swap_4 | ||
| 12063 | .{ .tag = @enumFromInt(3461), .param_str = "biD*ii.", .properties = .{ .attributes = .{ .custom_typecheck = true } } }, | ||
| 12064 | // __sync_bool_compare_and_swap_8 | ||
| 12065 | .{ .tag = @enumFromInt(3462), .param_str = "bLLiD*LLiLLi.", .properties = .{ .attributes = .{ .custom_typecheck = true } } }, | ||
| 12066 | // __sync_fetch_and_add | ||
| 12067 | .{ .tag = @enumFromInt(3463), .param_str = "v.", .properties = .{ .attributes = .{ .custom_typecheck = true } } }, | ||
| 12068 | // __sync_fetch_and_add_1 | ||
| 12069 | .{ .tag = @enumFromInt(3464), .param_str = "ccD*c.", .properties = .{ .attributes = .{ .custom_typecheck = true } } }, | ||
| 12070 | // __sync_fetch_and_add_16 | ||
| 12071 | .{ .tag = @enumFromInt(3465), .param_str = "LLLiLLLiD*LLLi.", .properties = .{ .attributes = .{ .custom_typecheck = true } } }, | ||
| 12072 | // __sync_fetch_and_add_2 | ||
| 12073 | .{ .tag = @enumFromInt(3466), .param_str = "ssD*s.", .properties = .{ .attributes = .{ .custom_typecheck = true } } }, | ||
| 12074 | // __sync_fetch_and_add_4 | ||
| 12075 | .{ .tag = @enumFromInt(3467), .param_str = "iiD*i.", .properties = .{ .attributes = .{ .custom_typecheck = true } } }, | ||
| 12076 | // __sync_fetch_and_add_8 | ||
| 12077 | .{ .tag = @enumFromInt(3468), .param_str = "LLiLLiD*LLi.", .properties = .{ .attributes = .{ .custom_typecheck = true } } }, | ||
| 12078 | // __sync_fetch_and_and | ||
| 12079 | .{ .tag = @enumFromInt(3469), .param_str = "v.", .properties = .{ .attributes = .{ .custom_typecheck = true } } }, | ||
| 12080 | // __sync_fetch_and_and_1 | ||
| 12081 | .{ .tag = @enumFromInt(3470), .param_str = "ccD*c.", .properties = .{ .attributes = .{ .custom_typecheck = true } } }, | ||
| 12082 | // __sync_fetch_and_and_16 | ||
| 12083 | .{ .tag = @enumFromInt(3471), .param_str = "LLLiLLLiD*LLLi.", .properties = .{ .attributes = .{ .custom_typecheck = true } } }, | ||
| 12084 | // __sync_fetch_and_and_2 | ||
| 12085 | .{ .tag = @enumFromInt(3472), .param_str = "ssD*s.", .properties = .{ .attributes = .{ .custom_typecheck = true } } }, | ||
| 12086 | // __sync_fetch_and_and_4 | ||
| 12087 | .{ .tag = @enumFromInt(3473), .param_str = "iiD*i.", .properties = .{ .attributes = .{ .custom_typecheck = true } } }, | ||
| 12088 | // __sync_fetch_and_and_8 | ||
| 12089 | .{ .tag = @enumFromInt(3474), .param_str = "LLiLLiD*LLi.", .properties = .{ .attributes = .{ .custom_typecheck = true } } }, | ||
| 12090 | // __sync_fetch_and_max | ||
| 12091 | .{ .tag = @enumFromInt(3475), .param_str = "iiD*i", .properties = .{} }, | ||
| 12092 | // __sync_fetch_and_min | ||
| 12093 | .{ .tag = @enumFromInt(3476), .param_str = "iiD*i", .properties = .{} }, | ||
| 12094 | // __sync_fetch_and_nand | ||
| 12095 | .{ .tag = @enumFromInt(3477), .param_str = "v.", .properties = .{ .attributes = .{ .custom_typecheck = true } } }, | ||
| 12096 | // __sync_fetch_and_nand_1 | ||
| 12097 | .{ .tag = @enumFromInt(3478), .param_str = "ccD*c.", .properties = .{ .attributes = .{ .custom_typecheck = true } } }, | ||
| 12098 | // __sync_fetch_and_nand_16 | ||
| 12099 | .{ .tag = @enumFromInt(3479), .param_str = "LLLiLLLiD*LLLi.", .properties = .{ .attributes = .{ .custom_typecheck = true } } }, | ||
| 12100 | // __sync_fetch_and_nand_2 | ||
| 12101 | .{ .tag = @enumFromInt(3480), .param_str = "ssD*s.", .properties = .{ .attributes = .{ .custom_typecheck = true } } }, | ||
| 12102 | // __sync_fetch_and_nand_4 | ||
| 12103 | .{ .tag = @enumFromInt(3481), .param_str = "iiD*i.", .properties = .{ .attributes = .{ .custom_typecheck = true } } }, | ||
| 12104 | // __sync_fetch_and_nand_8 | ||
| 12105 | .{ .tag = @enumFromInt(3482), .param_str = "LLiLLiD*LLi.", .properties = .{ .attributes = .{ .custom_typecheck = true } } }, | ||
| 12106 | // __sync_fetch_and_or | ||
| 12107 | .{ .tag = @enumFromInt(3483), .param_str = "v.", .properties = .{ .attributes = .{ .custom_typecheck = true } } }, | ||
| 12108 | // __sync_fetch_and_or_1 | ||
| 12109 | .{ .tag = @enumFromInt(3484), .param_str = "ccD*c.", .properties = .{ .attributes = .{ .custom_typecheck = true } } }, | ||
| 12110 | // __sync_fetch_and_or_16 | ||
| 12111 | .{ .tag = @enumFromInt(3485), .param_str = "LLLiLLLiD*LLLi.", .properties = .{ .attributes = .{ .custom_typecheck = true } } }, | ||
| 12112 | // __sync_fetch_and_or_2 | ||
| 12113 | .{ .tag = @enumFromInt(3486), .param_str = "ssD*s.", .properties = .{ .attributes = .{ .custom_typecheck = true } } }, | ||
| 12114 | // __sync_fetch_and_or_4 | ||
| 12115 | .{ .tag = @enumFromInt(3487), .param_str = "iiD*i.", .properties = .{ .attributes = .{ .custom_typecheck = true } } }, | ||
| 12116 | // __sync_fetch_and_or_8 | ||
| 12117 | .{ .tag = @enumFromInt(3488), .param_str = "LLiLLiD*LLi.", .properties = .{ .attributes = .{ .custom_typecheck = true } } }, | ||
| 12118 | // __sync_fetch_and_sub | ||
| 12119 | .{ .tag = @enumFromInt(3489), .param_str = "v.", .properties = .{ .attributes = .{ .custom_typecheck = true } } }, | ||
| 12120 | // __sync_fetch_and_sub_1 | ||
| 12121 | .{ .tag = @enumFromInt(3490), .param_str = "ccD*c.", .properties = .{ .attributes = .{ .custom_typecheck = true } } }, | ||
| 12122 | // __sync_fetch_and_sub_16 | ||
| 12123 | .{ .tag = @enumFromInt(3491), .param_str = "LLLiLLLiD*LLLi.", .properties = .{ .attributes = .{ .custom_typecheck = true } } }, | ||
| 12124 | // __sync_fetch_and_sub_2 | ||
| 12125 | .{ .tag = @enumFromInt(3492), .param_str = "ssD*s.", .properties = .{ .attributes = .{ .custom_typecheck = true } } }, | ||
| 12126 | // __sync_fetch_and_sub_4 | ||
| 12127 | .{ .tag = @enumFromInt(3493), .param_str = "iiD*i.", .properties = .{ .attributes = .{ .custom_typecheck = true } } }, | ||
| 12128 | // __sync_fetch_and_sub_8 | ||
| 12129 | .{ .tag = @enumFromInt(3494), .param_str = "LLiLLiD*LLi.", .properties = .{ .attributes = .{ .custom_typecheck = true } } }, | ||
| 12130 | // __sync_fetch_and_umax | ||
| 12131 | .{ .tag = @enumFromInt(3495), .param_str = "UiUiD*Ui", .properties = .{} }, | ||
| 12132 | // __sync_fetch_and_umin | ||
| 12133 | .{ .tag = @enumFromInt(3496), .param_str = "UiUiD*Ui", .properties = .{} }, | ||
| 12134 | // __sync_fetch_and_xor | ||
| 12135 | .{ .tag = @enumFromInt(3497), .param_str = "v.", .properties = .{ .attributes = .{ .custom_typecheck = true } } }, | ||
| 12136 | // __sync_fetch_and_xor_1 | ||
| 12137 | .{ .tag = @enumFromInt(3498), .param_str = "ccD*c.", .properties = .{ .attributes = .{ .custom_typecheck = true } } }, | ||
| 12138 | // __sync_fetch_and_xor_16 | ||
| 12139 | .{ .tag = @enumFromInt(3499), .param_str = "LLLiLLLiD*LLLi.", .properties = .{ .attributes = .{ .custom_typecheck = true } } }, | ||
| 12140 | // __sync_fetch_and_xor_2 | ||
| 12141 | .{ .tag = @enumFromInt(3500), .param_str = "ssD*s.", .properties = .{ .attributes = .{ .custom_typecheck = true } } }, | ||
| 12142 | // __sync_fetch_and_xor_4 | ||
| 12143 | .{ .tag = @enumFromInt(3501), .param_str = "iiD*i.", .properties = .{ .attributes = .{ .custom_typecheck = true } } }, | ||
| 12144 | // __sync_fetch_and_xor_8 | ||
| 12145 | .{ .tag = @enumFromInt(3502), .param_str = "LLiLLiD*LLi.", .properties = .{ .attributes = .{ .custom_typecheck = true } } }, | ||
| 12146 | // __sync_lock_release | ||
| 12147 | .{ .tag = @enumFromInt(3503), .param_str = "v.", .properties = .{ .attributes = .{ .custom_typecheck = true } } }, | ||
| 12148 | // __sync_lock_release_1 | ||
| 12149 | .{ .tag = @enumFromInt(3504), .param_str = "vcD*.", .properties = .{ .attributes = .{ .custom_typecheck = true } } }, | ||
| 12150 | // __sync_lock_release_16 | ||
| 12151 | .{ .tag = @enumFromInt(3505), .param_str = "vLLLiD*.", .properties = .{ .attributes = .{ .custom_typecheck = true } } }, | ||
| 12152 | // __sync_lock_release_2 | ||
| 12153 | .{ .tag = @enumFromInt(3506), .param_str = "vsD*.", .properties = .{ .attributes = .{ .custom_typecheck = true } } }, | ||
| 12154 | // __sync_lock_release_4 | ||
| 12155 | .{ .tag = @enumFromInt(3507), .param_str = "viD*.", .properties = .{ .attributes = .{ .custom_typecheck = true } } }, | ||
| 12156 | // __sync_lock_release_8 | ||
| 12157 | .{ .tag = @enumFromInt(3508), .param_str = "vLLiD*.", .properties = .{ .attributes = .{ .custom_typecheck = true } } }, | ||
| 12158 | // __sync_lock_test_and_set | ||
| 12159 | .{ .tag = @enumFromInt(3509), .param_str = "v.", .properties = .{ .attributes = .{ .custom_typecheck = true } } }, | ||
| 12160 | // __sync_lock_test_and_set_1 | ||
| 12161 | .{ .tag = @enumFromInt(3510), .param_str = "ccD*c.", .properties = .{ .attributes = .{ .custom_typecheck = true } } }, | ||
| 12162 | // __sync_lock_test_and_set_16 | ||
| 12163 | .{ .tag = @enumFromInt(3511), .param_str = "LLLiLLLiD*LLLi.", .properties = .{ .attributes = .{ .custom_typecheck = true } } }, | ||
| 12164 | // __sync_lock_test_and_set_2 | ||
| 12165 | .{ .tag = @enumFromInt(3512), .param_str = "ssD*s.", .properties = .{ .attributes = .{ .custom_typecheck = true } } }, | ||
| 12166 | // __sync_lock_test_and_set_4 | ||
| 12167 | .{ .tag = @enumFromInt(3513), .param_str = "iiD*i.", .properties = .{ .attributes = .{ .custom_typecheck = true } } }, | ||
| 12168 | // __sync_lock_test_and_set_8 | ||
| 12169 | .{ .tag = @enumFromInt(3514), .param_str = "LLiLLiD*LLi.", .properties = .{ .attributes = .{ .custom_typecheck = true } } }, | ||
| 12170 | // __sync_nand_and_fetch | ||
| 12171 | .{ .tag = @enumFromInt(3515), .param_str = "v.", .properties = .{ .attributes = .{ .custom_typecheck = true } } }, | ||
| 12172 | // __sync_nand_and_fetch_1 | ||
| 12173 | .{ .tag = @enumFromInt(3516), .param_str = "ccD*c.", .properties = .{ .attributes = .{ .custom_typecheck = true } } }, | ||
| 12174 | // __sync_nand_and_fetch_16 | ||
| 12175 | .{ .tag = @enumFromInt(3517), .param_str = "LLLiLLLiD*LLLi.", .properties = .{ .attributes = .{ .custom_typecheck = true } } }, | ||
| 12176 | // __sync_nand_and_fetch_2 | ||
| 12177 | .{ .tag = @enumFromInt(3518), .param_str = "ssD*s.", .properties = .{ .attributes = .{ .custom_typecheck = true } } }, | ||
| 12178 | // __sync_nand_and_fetch_4 | ||
| 12179 | .{ .tag = @enumFromInt(3519), .param_str = "iiD*i.", .properties = .{ .attributes = .{ .custom_typecheck = true } } }, | ||
| 12180 | // __sync_nand_and_fetch_8 | ||
| 12181 | .{ .tag = @enumFromInt(3520), .param_str = "LLiLLiD*LLi.", .properties = .{ .attributes = .{ .custom_typecheck = true } } }, | ||
| 12182 | // __sync_or_and_fetch | ||
| 12183 | .{ .tag = @enumFromInt(3521), .param_str = "v.", .properties = .{ .attributes = .{ .custom_typecheck = true } } }, | ||
| 12184 | // __sync_or_and_fetch_1 | ||
| 12185 | .{ .tag = @enumFromInt(3522), .param_str = "ccD*c.", .properties = .{ .attributes = .{ .custom_typecheck = true } } }, | ||
| 12186 | // __sync_or_and_fetch_16 | ||
| 12187 | .{ .tag = @enumFromInt(3523), .param_str = "LLLiLLLiD*LLLi.", .properties = .{ .attributes = .{ .custom_typecheck = true } } }, | ||
| 12188 | // __sync_or_and_fetch_2 | ||
| 12189 | .{ .tag = @enumFromInt(3524), .param_str = "ssD*s.", .properties = .{ .attributes = .{ .custom_typecheck = true } } }, | ||
| 12190 | // __sync_or_and_fetch_4 | ||
| 12191 | .{ .tag = @enumFromInt(3525), .param_str = "iiD*i.", .properties = .{ .attributes = .{ .custom_typecheck = true } } }, | ||
| 12192 | // __sync_or_and_fetch_8 | ||
| 12193 | .{ .tag = @enumFromInt(3526), .param_str = "LLiLLiD*LLi.", .properties = .{ .attributes = .{ .custom_typecheck = true } } }, | ||
| 12194 | // __sync_sub_and_fetch | ||
| 12195 | .{ .tag = @enumFromInt(3527), .param_str = "v.", .properties = .{ .attributes = .{ .custom_typecheck = true } } }, | ||
| 12196 | // __sync_sub_and_fetch_1 | ||
| 12197 | .{ .tag = @enumFromInt(3528), .param_str = "ccD*c.", .properties = .{ .attributes = .{ .custom_typecheck = true } } }, | ||
| 12198 | // __sync_sub_and_fetch_16 | ||
| 12199 | .{ .tag = @enumFromInt(3529), .param_str = "LLLiLLLiD*LLLi.", .properties = .{ .attributes = .{ .custom_typecheck = true } } }, | ||
| 12200 | // __sync_sub_and_fetch_2 | ||
| 12201 | .{ .tag = @enumFromInt(3530), .param_str = "ssD*s.", .properties = .{ .attributes = .{ .custom_typecheck = true } } }, | ||
| 12202 | // __sync_sub_and_fetch_4 | ||
| 12203 | .{ .tag = @enumFromInt(3531), .param_str = "iiD*i.", .properties = .{ .attributes = .{ .custom_typecheck = true } } }, | ||
| 12204 | // __sync_sub_and_fetch_8 | ||
| 12205 | .{ .tag = @enumFromInt(3532), .param_str = "LLiLLiD*LLi.", .properties = .{ .attributes = .{ .custom_typecheck = true } } }, | ||
| 12206 | // __sync_swap | ||
| 12207 | .{ .tag = @enumFromInt(3533), .param_str = "v.", .properties = .{ .attributes = .{ .custom_typecheck = true } } }, | ||
| 12208 | // __sync_swap_1 | ||
| 12209 | .{ .tag = @enumFromInt(3534), .param_str = "ccD*c.", .properties = .{ .attributes = .{ .custom_typecheck = true } } }, | ||
| 12210 | // __sync_swap_16 | ||
| 12211 | .{ .tag = @enumFromInt(3535), .param_str = "LLLiLLLiD*LLLi.", .properties = .{ .attributes = .{ .custom_typecheck = true } } }, | ||
| 12212 | // __sync_swap_2 | ||
| 12213 | .{ .tag = @enumFromInt(3536), .param_str = "ssD*s.", .properties = .{ .attributes = .{ .custom_typecheck = true } } }, | ||
| 12214 | // __sync_swap_4 | ||
| 12215 | .{ .tag = @enumFromInt(3537), .param_str = "iiD*i.", .properties = .{ .attributes = .{ .custom_typecheck = true } } }, | ||
| 12216 | // __sync_swap_8 | ||
| 12217 | .{ .tag = @enumFromInt(3538), .param_str = "LLiLLiD*LLi.", .properties = .{ .attributes = .{ .custom_typecheck = true } } }, | ||
| 12218 | // __sync_synchronize | ||
| 12219 | .{ .tag = @enumFromInt(3539), .param_str = "v", .properties = .{} }, | ||
| 12220 | // __sync_val_compare_and_swap | ||
| 12221 | .{ .tag = @enumFromInt(3540), .param_str = "v.", .properties = .{ .attributes = .{ .custom_typecheck = true } } }, | ||
| 12222 | // __sync_val_compare_and_swap_1 | ||
| 12223 | .{ .tag = @enumFromInt(3541), .param_str = "ccD*cc.", .properties = .{ .attributes = .{ .custom_typecheck = true } } }, | ||
| 12224 | // __sync_val_compare_and_swap_16 | ||
| 12225 | .{ .tag = @enumFromInt(3542), .param_str = "LLLiLLLiD*LLLiLLLi.", .properties = .{ .attributes = .{ .custom_typecheck = true } } }, | ||
| 12226 | // __sync_val_compare_and_swap_2 | ||
| 12227 | .{ .tag = @enumFromInt(3543), .param_str = "ssD*ss.", .properties = .{ .attributes = .{ .custom_typecheck = true } } }, | ||
| 12228 | // __sync_val_compare_and_swap_4 | ||
| 12229 | .{ .tag = @enumFromInt(3544), .param_str = "iiD*ii.", .properties = .{ .attributes = .{ .custom_typecheck = true } } }, | ||
| 12230 | // __sync_val_compare_and_swap_8 | ||
| 12231 | .{ .tag = @enumFromInt(3545), .param_str = "LLiLLiD*LLiLLi.", .properties = .{ .attributes = .{ .custom_typecheck = true } } }, | ||
| 12232 | // __sync_xor_and_fetch | ||
| 12233 | .{ .tag = @enumFromInt(3546), .param_str = "v.", .properties = .{ .attributes = .{ .custom_typecheck = true } } }, | ||
| 12234 | // __sync_xor_and_fetch_1 | ||
| 12235 | .{ .tag = @enumFromInt(3547), .param_str = "ccD*c.", .properties = .{ .attributes = .{ .custom_typecheck = true } } }, | ||
| 12236 | // __sync_xor_and_fetch_16 | ||
| 12237 | .{ .tag = @enumFromInt(3548), .param_str = "LLLiLLLiD*LLLi.", .properties = .{ .attributes = .{ .custom_typecheck = true } } }, | ||
| 12238 | // __sync_xor_and_fetch_2 | ||
| 12239 | .{ .tag = @enumFromInt(3549), .param_str = "ssD*s.", .properties = .{ .attributes = .{ .custom_typecheck = true } } }, | ||
| 12240 | // __sync_xor_and_fetch_4 | ||
| 12241 | .{ .tag = @enumFromInt(3550), .param_str = "iiD*i.", .properties = .{ .attributes = .{ .custom_typecheck = true } } }, | ||
| 12242 | // __sync_xor_and_fetch_8 | ||
| 12243 | .{ .tag = @enumFromInt(3551), .param_str = "LLiLLiD*LLi.", .properties = .{ .attributes = .{ .custom_typecheck = true } } }, | ||
| 12244 | // __syncthreads | ||
| 12245 | .{ .tag = @enumFromInt(3552), .param_str = "v", .properties = .{ .target_set = TargetSet.initOne(.nvptx) } }, | ||
| 12246 | // __tanpi | ||
| 12247 | .{ .tag = @enumFromInt(3553), .param_str = "dd", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12248 | // __tanpif | ||
| 12249 | .{ .tag = @enumFromInt(3554), .param_str = "ff", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12250 | // __va_start | ||
| 12251 | .{ .tag = @enumFromInt(3555), .param_str = "vc**.", .properties = .{ .language = .all_ms_languages, .attributes = .{ .custom_typecheck = true } } }, | ||
| 12252 | // __warn_memset_zero_len | ||
| 12253 | .{ .tag = @enumFromInt(3556), .param_str = "v", .properties = .{ .attributes = .{ .pure = true } } }, | ||
| 12254 | // __wfe | ||
| 12255 | .{ .tag = @enumFromInt(3557), .param_str = "v", .properties = .{ .language = .all_ms_languages, .target_set = TargetSet.initMany(&.{ .aarch64, .arm }) } }, | ||
| 12256 | // __wfi | ||
| 12257 | .{ .tag = @enumFromInt(3558), .param_str = "v", .properties = .{ .language = .all_ms_languages, .target_set = TargetSet.initMany(&.{ .aarch64, .arm }) } }, | ||
| 12258 | // __xray_customevent | ||
| 12259 | .{ .tag = @enumFromInt(3559), .param_str = "vcC*z", .properties = .{} }, | ||
| 12260 | // __xray_typedevent | ||
| 12261 | .{ .tag = @enumFromInt(3560), .param_str = "vzcC*z", .properties = .{} }, | ||
| 12262 | // __yield | ||
| 12263 | .{ .tag = @enumFromInt(3561), .param_str = "v", .properties = .{ .language = .all_ms_languages, .target_set = TargetSet.initMany(&.{ .aarch64, .arm }) } }, | ||
| 12264 | // _abnormal_termination | ||
| 12265 | .{ .tag = @enumFromInt(3562), .param_str = "i", .properties = .{ .language = .all_ms_languages } }, | ||
| 12266 | // _alloca | ||
| 12267 | .{ .tag = @enumFromInt(3563), .param_str = "v*z", .properties = .{ .language = .all_ms_languages } }, | ||
| 12268 | // _bittest | ||
| 12269 | .{ .tag = @enumFromInt(3564), .param_str = "UcNiC*Ni", .properties = .{ .language = .all_ms_languages } }, | ||
| 12270 | // _bittest64 | ||
| 12271 | .{ .tag = @enumFromInt(3565), .param_str = "UcWiC*Wi", .properties = .{ .language = .all_ms_languages } }, | ||
| 12272 | // _bittestandcomplement | ||
| 12273 | .{ .tag = @enumFromInt(3566), .param_str = "UcNi*Ni", .properties = .{ .language = .all_ms_languages } }, | ||
| 12274 | // _bittestandcomplement64 | ||
| 12275 | .{ .tag = @enumFromInt(3567), .param_str = "UcWi*Wi", .properties = .{ .language = .all_ms_languages } }, | ||
| 12276 | // _bittestandreset | ||
| 12277 | .{ .tag = @enumFromInt(3568), .param_str = "UcNi*Ni", .properties = .{ .language = .all_ms_languages } }, | ||
| 12278 | // _bittestandreset64 | ||
| 12279 | .{ .tag = @enumFromInt(3569), .param_str = "UcWi*Wi", .properties = .{ .language = .all_ms_languages } }, | ||
| 12280 | // _bittestandset | ||
| 12281 | .{ .tag = @enumFromInt(3570), .param_str = "UcNi*Ni", .properties = .{ .language = .all_ms_languages } }, | ||
| 12282 | // _bittestandset64 | ||
| 12283 | .{ .tag = @enumFromInt(3571), .param_str = "UcWi*Wi", .properties = .{ .language = .all_ms_languages } }, | ||
| 12284 | // _byteswap_uint64 | ||
| 12285 | .{ .tag = @enumFromInt(3572), .param_str = "ULLiULLi", .properties = .{ .header = .stdlib, .language = .all_ms_languages, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } }, | ||
| 12286 | // _byteswap_ulong | ||
| 12287 | .{ .tag = @enumFromInt(3573), .param_str = "UNiUNi", .properties = .{ .header = .stdlib, .language = .all_ms_languages, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } }, | ||
| 12288 | // _byteswap_ushort | ||
| 12289 | .{ .tag = @enumFromInt(3574), .param_str = "UsUs", .properties = .{ .header = .stdlib, .language = .all_ms_languages, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } }, | ||
| 12290 | // _exception_code | ||
| 12291 | .{ .tag = @enumFromInt(3575), .param_str = "UNi", .properties = .{ .language = .all_ms_languages } }, | ||
| 12292 | // _exception_info | ||
| 12293 | .{ .tag = @enumFromInt(3576), .param_str = "v*", .properties = .{ .language = .all_ms_languages } }, | ||
| 12294 | // _exit | ||
| 12295 | .{ .tag = @enumFromInt(3577), .param_str = "vi", .properties = .{ .header = .unistd, .language = .all_gnu_languages, .attributes = .{ .noreturn = true, .lib_function_without_prefix = true } } }, | ||
| 12296 | // _interlockedbittestandreset | ||
| 12297 | .{ .tag = @enumFromInt(3578), .param_str = "UcNiD*Ni", .properties = .{ .language = .all_ms_languages } }, | ||
| 12298 | // _interlockedbittestandreset64 | ||
| 12299 | .{ .tag = @enumFromInt(3579), .param_str = "UcWiD*Wi", .properties = .{ .language = .all_ms_languages } }, | ||
| 12300 | // _interlockedbittestandreset_acq | ||
| 12301 | .{ .tag = @enumFromInt(3580), .param_str = "UcNiD*Ni", .properties = .{ .language = .all_ms_languages } }, | ||
| 12302 | // _interlockedbittestandreset_nf | ||
| 12303 | .{ .tag = @enumFromInt(3581), .param_str = "UcNiD*Ni", .properties = .{ .language = .all_ms_languages } }, | ||
| 12304 | // _interlockedbittestandreset_rel | ||
| 12305 | .{ .tag = @enumFromInt(3582), .param_str = "UcNiD*Ni", .properties = .{ .language = .all_ms_languages } }, | ||
| 12306 | // _interlockedbittestandset | ||
| 12307 | .{ .tag = @enumFromInt(3583), .param_str = "UcNiD*Ni", .properties = .{ .language = .all_ms_languages } }, | ||
| 12308 | // _interlockedbittestandset64 | ||
| 12309 | .{ .tag = @enumFromInt(3584), .param_str = "UcWiD*Wi", .properties = .{ .language = .all_ms_languages } }, | ||
| 12310 | // _interlockedbittestandset_acq | ||
| 12311 | .{ .tag = @enumFromInt(3585), .param_str = "UcNiD*Ni", .properties = .{ .language = .all_ms_languages } }, | ||
| 12312 | // _interlockedbittestandset_nf | ||
| 12313 | .{ .tag = @enumFromInt(3586), .param_str = "UcNiD*Ni", .properties = .{ .language = .all_ms_languages } }, | ||
| 12314 | // _interlockedbittestandset_rel | ||
| 12315 | .{ .tag = @enumFromInt(3587), .param_str = "UcNiD*Ni", .properties = .{ .language = .all_ms_languages } }, | ||
| 12316 | // _longjmp | ||
| 12317 | .{ .tag = @enumFromInt(3588), .param_str = "vJi", .properties = .{ .header = .setjmp, .language = .all_gnu_languages, .attributes = .{ .noreturn = true, .allow_type_mismatch = true, .lib_function_without_prefix = true } } }, | ||
| 12318 | // _lrotl | ||
| 12319 | .{ .tag = @enumFromInt(3589), .param_str = "ULiULii", .properties = .{ .language = .all_ms_languages, .attributes = .{ .const_evaluable = true } } }, | ||
| 12320 | // _lrotr | ||
| 12321 | .{ .tag = @enumFromInt(3590), .param_str = "ULiULii", .properties = .{ .language = .all_ms_languages, .attributes = .{ .const_evaluable = true } } }, | ||
| 12322 | // _rotl | ||
| 12323 | .{ .tag = @enumFromInt(3591), .param_str = "UiUii", .properties = .{ .language = .all_ms_languages, .attributes = .{ .const_evaluable = true } } }, | ||
| 12324 | // _rotl16 | ||
| 12325 | .{ .tag = @enumFromInt(3592), .param_str = "UsUsUc", .properties = .{ .language = .all_ms_languages, .attributes = .{ .const_evaluable = true } } }, | ||
| 12326 | // _rotl64 | ||
| 12327 | .{ .tag = @enumFromInt(3593), .param_str = "UWiUWii", .properties = .{ .language = .all_ms_languages, .attributes = .{ .const_evaluable = true } } }, | ||
| 12328 | // _rotl8 | ||
| 12329 | .{ .tag = @enumFromInt(3594), .param_str = "UcUcUc", .properties = .{ .language = .all_ms_languages, .attributes = .{ .const_evaluable = true } } }, | ||
| 12330 | // _rotr | ||
| 12331 | .{ .tag = @enumFromInt(3595), .param_str = "UiUii", .properties = .{ .language = .all_ms_languages, .attributes = .{ .const_evaluable = true } } }, | ||
| 12332 | // _rotr16 | ||
| 12333 | .{ .tag = @enumFromInt(3596), .param_str = "UsUsUc", .properties = .{ .language = .all_ms_languages, .attributes = .{ .const_evaluable = true } } }, | ||
| 12334 | // _rotr64 | ||
| 12335 | .{ .tag = @enumFromInt(3597), .param_str = "UWiUWii", .properties = .{ .language = .all_ms_languages, .attributes = .{ .const_evaluable = true } } }, | ||
| 12336 | // _rotr8 | ||
| 12337 | .{ .tag = @enumFromInt(3598), .param_str = "UcUcUc", .properties = .{ .language = .all_ms_languages, .attributes = .{ .const_evaluable = true } } }, | ||
| 12338 | // _setjmp | ||
| 12339 | .{ .tag = @enumFromInt(3599), .param_str = "iJ", .properties = .{ .header = .setjmp, .attributes = .{ .allow_type_mismatch = true, .lib_function_without_prefix = true, .returns_twice = true } } }, | ||
| 12340 | // _setjmpex | ||
| 12341 | .{ .tag = @enumFromInt(3600), .param_str = "iJ", .properties = .{ .header = .setjmpex, .language = .all_ms_languages, .attributes = .{ .allow_type_mismatch = true, .lib_function_without_prefix = true, .returns_twice = true } } }, | ||
| 12342 | // abort | ||
| 12343 | .{ .tag = @enumFromInt(3601), .param_str = "v", .properties = .{ .header = .stdlib, .attributes = .{ .noreturn = true, .lib_function_without_prefix = true } } }, | ||
| 12344 | // abs | ||
| 12345 | .{ .tag = @enumFromInt(3602), .param_str = "ii", .properties = .{ .header = .stdlib, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } }, | ||
| 12346 | // acos | ||
| 12347 | .{ .tag = @enumFromInt(3603), .param_str = "dd", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12348 | // acosf | ||
| 12349 | .{ .tag = @enumFromInt(3604), .param_str = "ff", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12350 | // acosh | ||
| 12351 | .{ .tag = @enumFromInt(3605), .param_str = "dd", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12352 | // acoshf | ||
| 12353 | .{ .tag = @enumFromInt(3606), .param_str = "ff", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12354 | // acoshl | ||
| 12355 | .{ .tag = @enumFromInt(3607), .param_str = "LdLd", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12356 | // acosl | ||
| 12357 | .{ .tag = @enumFromInt(3608), .param_str = "LdLd", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12358 | // aligned_alloc | ||
| 12359 | .{ .tag = @enumFromInt(3609), .param_str = "v*zz", .properties = .{ .header = .stdlib, .attributes = .{ .lib_function_without_prefix = true } } }, | ||
| 12360 | // alloca | ||
| 12361 | .{ .tag = @enumFromInt(3610), .param_str = "v*z", .properties = .{ .header = .stdlib, .language = .all_gnu_languages, .attributes = .{ .lib_function_without_prefix = true } } }, | ||
| 12362 | // asin | ||
| 12363 | .{ .tag = @enumFromInt(3611), .param_str = "dd", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12364 | // asinf | ||
| 12365 | .{ .tag = @enumFromInt(3612), .param_str = "ff", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12366 | // asinh | ||
| 12367 | .{ .tag = @enumFromInt(3613), .param_str = "dd", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12368 | // asinhf | ||
| 12369 | .{ .tag = @enumFromInt(3614), .param_str = "ff", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12370 | // asinhl | ||
| 12371 | .{ .tag = @enumFromInt(3615), .param_str = "LdLd", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12372 | // asinl | ||
| 12373 | .{ .tag = @enumFromInt(3616), .param_str = "LdLd", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12374 | // atan | ||
| 12375 | .{ .tag = @enumFromInt(3617), .param_str = "dd", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12376 | // atan2 | ||
| 12377 | .{ .tag = @enumFromInt(3618), .param_str = "ddd", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12378 | // atan2f | ||
| 12379 | .{ .tag = @enumFromInt(3619), .param_str = "fff", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12380 | // atan2l | ||
| 12381 | .{ .tag = @enumFromInt(3620), .param_str = "LdLdLd", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12382 | // atanf | ||
| 12383 | .{ .tag = @enumFromInt(3621), .param_str = "ff", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12384 | // atanh | ||
| 12385 | .{ .tag = @enumFromInt(3622), .param_str = "dd", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12386 | // atanhf | ||
| 12387 | .{ .tag = @enumFromInt(3623), .param_str = "ff", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12388 | // atanhl | ||
| 12389 | .{ .tag = @enumFromInt(3624), .param_str = "LdLd", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12390 | // atanl | ||
| 12391 | .{ .tag = @enumFromInt(3625), .param_str = "LdLd", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12392 | // bcmp | ||
| 12393 | .{ .tag = @enumFromInt(3626), .param_str = "ivC*vC*z", .properties = .{ .header = .strings, .language = .all_gnu_languages, .attributes = .{ .lib_function_without_prefix = true, .const_evaluable = true } } }, | ||
| 12394 | // bcopy | ||
| 12395 | .{ .tag = @enumFromInt(3627), .param_str = "vvC*v*z", .properties = .{ .header = .strings, .language = .all_gnu_languages, .attributes = .{ .lib_function_without_prefix = true } } }, | ||
| 12396 | // bzero | ||
| 12397 | .{ .tag = @enumFromInt(3628), .param_str = "vv*z", .properties = .{ .header = .strings, .language = .all_gnu_languages, .attributes = .{ .lib_function_without_prefix = true } } }, | ||
| 12398 | // cabs | ||
| 12399 | .{ .tag = @enumFromInt(3629), .param_str = "dXd", .properties = .{ .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12400 | // cabsf | ||
| 12401 | .{ .tag = @enumFromInt(3630), .param_str = "fXf", .properties = .{ .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12402 | // cabsl | ||
| 12403 | .{ .tag = @enumFromInt(3631), .param_str = "LdXLd", .properties = .{ .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12404 | // cacos | ||
| 12405 | .{ .tag = @enumFromInt(3632), .param_str = "XdXd", .properties = .{ .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12406 | // cacosf | ||
| 12407 | .{ .tag = @enumFromInt(3633), .param_str = "XfXf", .properties = .{ .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12408 | // cacosh | ||
| 12409 | .{ .tag = @enumFromInt(3634), .param_str = "XdXd", .properties = .{ .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12410 | // cacoshf | ||
| 12411 | .{ .tag = @enumFromInt(3635), .param_str = "XfXf", .properties = .{ .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12412 | // cacoshl | ||
| 12413 | .{ .tag = @enumFromInt(3636), .param_str = "XLdXLd", .properties = .{ .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12414 | // cacosl | ||
| 12415 | .{ .tag = @enumFromInt(3637), .param_str = "XLdXLd", .properties = .{ .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12416 | // calloc | ||
| 12417 | .{ .tag = @enumFromInt(3638), .param_str = "v*zz", .properties = .{ .header = .stdlib, .attributes = .{ .lib_function_without_prefix = true } } }, | ||
| 12418 | // carg | ||
| 12419 | .{ .tag = @enumFromInt(3639), .param_str = "dXd", .properties = .{ .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12420 | // cargf | ||
| 12421 | .{ .tag = @enumFromInt(3640), .param_str = "fXf", .properties = .{ .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12422 | // cargl | ||
| 12423 | .{ .tag = @enumFromInt(3641), .param_str = "LdXLd", .properties = .{ .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12424 | // casin | ||
| 12425 | .{ .tag = @enumFromInt(3642), .param_str = "XdXd", .properties = .{ .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12426 | // casinf | ||
| 12427 | .{ .tag = @enumFromInt(3643), .param_str = "XfXf", .properties = .{ .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12428 | // casinh | ||
| 12429 | .{ .tag = @enumFromInt(3644), .param_str = "XdXd", .properties = .{ .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12430 | // casinhf | ||
| 12431 | .{ .tag = @enumFromInt(3645), .param_str = "XfXf", .properties = .{ .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12432 | // casinhl | ||
| 12433 | .{ .tag = @enumFromInt(3646), .param_str = "XLdXLd", .properties = .{ .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12434 | // casinl | ||
| 12435 | .{ .tag = @enumFromInt(3647), .param_str = "XLdXLd", .properties = .{ .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12436 | // catan | ||
| 12437 | .{ .tag = @enumFromInt(3648), .param_str = "XdXd", .properties = .{ .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12438 | // catanf | ||
| 12439 | .{ .tag = @enumFromInt(3649), .param_str = "XfXf", .properties = .{ .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12440 | // catanh | ||
| 12441 | .{ .tag = @enumFromInt(3650), .param_str = "XdXd", .properties = .{ .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12442 | // catanhf | ||
| 12443 | .{ .tag = @enumFromInt(3651), .param_str = "XfXf", .properties = .{ .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12444 | // catanhl | ||
| 12445 | .{ .tag = @enumFromInt(3652), .param_str = "XLdXLd", .properties = .{ .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12446 | // catanl | ||
| 12447 | .{ .tag = @enumFromInt(3653), .param_str = "XLdXLd", .properties = .{ .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12448 | // cbrt | ||
| 12449 | .{ .tag = @enumFromInt(3654), .param_str = "dd", .properties = .{ .header = .math, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } }, | ||
| 12450 | // cbrtf | ||
| 12451 | .{ .tag = @enumFromInt(3655), .param_str = "ff", .properties = .{ .header = .math, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } }, | ||
| 12452 | // cbrtl | ||
| 12453 | .{ .tag = @enumFromInt(3656), .param_str = "LdLd", .properties = .{ .header = .math, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } }, | ||
| 12454 | // ccos | ||
| 12455 | .{ .tag = @enumFromInt(3657), .param_str = "XdXd", .properties = .{ .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12456 | // ccosf | ||
| 12457 | .{ .tag = @enumFromInt(3658), .param_str = "XfXf", .properties = .{ .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12458 | // ccosh | ||
| 12459 | .{ .tag = @enumFromInt(3659), .param_str = "XdXd", .properties = .{ .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12460 | // ccoshf | ||
| 12461 | .{ .tag = @enumFromInt(3660), .param_str = "XfXf", .properties = .{ .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12462 | // ccoshl | ||
| 12463 | .{ .tag = @enumFromInt(3661), .param_str = "XLdXLd", .properties = .{ .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12464 | // ccosl | ||
| 12465 | .{ .tag = @enumFromInt(3662), .param_str = "XLdXLd", .properties = .{ .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12466 | // ceil | ||
| 12467 | .{ .tag = @enumFromInt(3663), .param_str = "dd", .properties = .{ .header = .math, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } }, | ||
| 12468 | // ceilf | ||
| 12469 | .{ .tag = @enumFromInt(3664), .param_str = "ff", .properties = .{ .header = .math, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } }, | ||
| 12470 | // ceill | ||
| 12471 | .{ .tag = @enumFromInt(3665), .param_str = "LdLd", .properties = .{ .header = .math, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } }, | ||
| 12472 | // cexp | ||
| 12473 | .{ .tag = @enumFromInt(3666), .param_str = "XdXd", .properties = .{ .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12474 | // cexpf | ||
| 12475 | .{ .tag = @enumFromInt(3667), .param_str = "XfXf", .properties = .{ .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12476 | // cexpl | ||
| 12477 | .{ .tag = @enumFromInt(3668), .param_str = "XLdXLd", .properties = .{ .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12478 | // cimag | ||
| 12479 | .{ .tag = @enumFromInt(3669), .param_str = "dXd", .properties = .{ .header = .complex, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } }, | ||
| 12480 | // cimagf | ||
| 12481 | .{ .tag = @enumFromInt(3670), .param_str = "fXf", .properties = .{ .header = .complex, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } }, | ||
| 12482 | // cimagl | ||
| 12483 | .{ .tag = @enumFromInt(3671), .param_str = "LdXLd", .properties = .{ .header = .complex, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } }, | ||
| 12484 | // clog | ||
| 12485 | .{ .tag = @enumFromInt(3672), .param_str = "XdXd", .properties = .{ .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12486 | // clogf | ||
| 12487 | .{ .tag = @enumFromInt(3673), .param_str = "XfXf", .properties = .{ .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12488 | // clogl | ||
| 12489 | .{ .tag = @enumFromInt(3674), .param_str = "XLdXLd", .properties = .{ .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12490 | // conj | ||
| 12491 | .{ .tag = @enumFromInt(3675), .param_str = "XdXd", .properties = .{ .header = .complex, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } }, | ||
| 12492 | // conjf | ||
| 12493 | .{ .tag = @enumFromInt(3676), .param_str = "XfXf", .properties = .{ .header = .complex, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } }, | ||
| 12494 | // conjl | ||
| 12495 | .{ .tag = @enumFromInt(3677), .param_str = "XLdXLd", .properties = .{ .header = .complex, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } }, | ||
| 12496 | // copysign | ||
| 12497 | .{ .tag = @enumFromInt(3678), .param_str = "ddd", .properties = .{ .header = .math, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } }, | ||
| 12498 | // copysignf | ||
| 12499 | .{ .tag = @enumFromInt(3679), .param_str = "fff", .properties = .{ .header = .math, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } }, | ||
| 12500 | // copysignl | ||
| 12501 | .{ .tag = @enumFromInt(3680), .param_str = "LdLdLd", .properties = .{ .header = .math, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } }, | ||
| 12502 | // cos | ||
| 12503 | .{ .tag = @enumFromInt(3681), .param_str = "dd", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12504 | // cosf | ||
| 12505 | .{ .tag = @enumFromInt(3682), .param_str = "ff", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12506 | // cosh | ||
| 12507 | .{ .tag = @enumFromInt(3683), .param_str = "dd", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12508 | // coshf | ||
| 12509 | .{ .tag = @enumFromInt(3684), .param_str = "ff", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12510 | // coshl | ||
| 12511 | .{ .tag = @enumFromInt(3685), .param_str = "LdLd", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12512 | // cosl | ||
| 12513 | .{ .tag = @enumFromInt(3686), .param_str = "LdLd", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12514 | // cpow | ||
| 12515 | .{ .tag = @enumFromInt(3687), .param_str = "XdXdXd", .properties = .{ .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12516 | // cpowf | ||
| 12517 | .{ .tag = @enumFromInt(3688), .param_str = "XfXfXf", .properties = .{ .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12518 | // cpowl | ||
| 12519 | .{ .tag = @enumFromInt(3689), .param_str = "XLdXLdXLd", .properties = .{ .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12520 | // cproj | ||
| 12521 | .{ .tag = @enumFromInt(3690), .param_str = "XdXd", .properties = .{ .header = .complex, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } }, | ||
| 12522 | // cprojf | ||
| 12523 | .{ .tag = @enumFromInt(3691), .param_str = "XfXf", .properties = .{ .header = .complex, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } }, | ||
| 12524 | // cprojl | ||
| 12525 | .{ .tag = @enumFromInt(3692), .param_str = "XLdXLd", .properties = .{ .header = .complex, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } }, | ||
| 12526 | // creal | ||
| 12527 | .{ .tag = @enumFromInt(3693), .param_str = "dXd", .properties = .{ .header = .complex, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } }, | ||
| 12528 | // crealf | ||
| 12529 | .{ .tag = @enumFromInt(3694), .param_str = "fXf", .properties = .{ .header = .complex, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } }, | ||
| 12530 | // creall | ||
| 12531 | .{ .tag = @enumFromInt(3695), .param_str = "LdXLd", .properties = .{ .header = .complex, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } }, | ||
| 12532 | // csin | ||
| 12533 | .{ .tag = @enumFromInt(3696), .param_str = "XdXd", .properties = .{ .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12534 | // csinf | ||
| 12535 | .{ .tag = @enumFromInt(3697), .param_str = "XfXf", .properties = .{ .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12536 | // csinh | ||
| 12537 | .{ .tag = @enumFromInt(3698), .param_str = "XdXd", .properties = .{ .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12538 | // csinhf | ||
| 12539 | .{ .tag = @enumFromInt(3699), .param_str = "XfXf", .properties = .{ .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12540 | // csinhl | ||
| 12541 | .{ .tag = @enumFromInt(3700), .param_str = "XLdXLd", .properties = .{ .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12542 | // csinl | ||
| 12543 | .{ .tag = @enumFromInt(3701), .param_str = "XLdXLd", .properties = .{ .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12544 | // csqrt | ||
| 12545 | .{ .tag = @enumFromInt(3702), .param_str = "XdXd", .properties = .{ .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12546 | // csqrtf | ||
| 12547 | .{ .tag = @enumFromInt(3703), .param_str = "XfXf", .properties = .{ .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12548 | // csqrtl | ||
| 12549 | .{ .tag = @enumFromInt(3704), .param_str = "XLdXLd", .properties = .{ .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12550 | // ctan | ||
| 12551 | .{ .tag = @enumFromInt(3705), .param_str = "XdXd", .properties = .{ .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12552 | // ctanf | ||
| 12553 | .{ .tag = @enumFromInt(3706), .param_str = "XfXf", .properties = .{ .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12554 | // ctanh | ||
| 12555 | .{ .tag = @enumFromInt(3707), .param_str = "XdXd", .properties = .{ .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12556 | // ctanhf | ||
| 12557 | .{ .tag = @enumFromInt(3708), .param_str = "XfXf", .properties = .{ .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12558 | // ctanhl | ||
| 12559 | .{ .tag = @enumFromInt(3709), .param_str = "XLdXLd", .properties = .{ .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12560 | // ctanl | ||
| 12561 | .{ .tag = @enumFromInt(3710), .param_str = "XLdXLd", .properties = .{ .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12562 | // erf | ||
| 12563 | .{ .tag = @enumFromInt(3711), .param_str = "dd", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12564 | // erfc | ||
| 12565 | .{ .tag = @enumFromInt(3712), .param_str = "dd", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12566 | // erfcf | ||
| 12567 | .{ .tag = @enumFromInt(3713), .param_str = "ff", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12568 | // erfcl | ||
| 12569 | .{ .tag = @enumFromInt(3714), .param_str = "LdLd", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12570 | // erff | ||
| 12571 | .{ .tag = @enumFromInt(3715), .param_str = "ff", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12572 | // erfl | ||
| 12573 | .{ .tag = @enumFromInt(3716), .param_str = "LdLd", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12574 | // exit | ||
| 12575 | .{ .tag = @enumFromInt(3717), .param_str = "vi", .properties = .{ .header = .stdlib, .attributes = .{ .noreturn = true, .lib_function_without_prefix = true } } }, | ||
| 12576 | // exp | ||
| 12577 | .{ .tag = @enumFromInt(3718), .param_str = "dd", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12578 | // exp2 | ||
| 12579 | .{ .tag = @enumFromInt(3719), .param_str = "dd", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12580 | // exp2f | ||
| 12581 | .{ .tag = @enumFromInt(3720), .param_str = "ff", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12582 | // exp2l | ||
| 12583 | .{ .tag = @enumFromInt(3721), .param_str = "LdLd", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12584 | // expf | ||
| 12585 | .{ .tag = @enumFromInt(3722), .param_str = "ff", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12586 | // expl | ||
| 12587 | .{ .tag = @enumFromInt(3723), .param_str = "LdLd", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12588 | // expm1 | ||
| 12589 | .{ .tag = @enumFromInt(3724), .param_str = "dd", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12590 | // expm1f | ||
| 12591 | .{ .tag = @enumFromInt(3725), .param_str = "ff", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12592 | // expm1l | ||
| 12593 | .{ .tag = @enumFromInt(3726), .param_str = "LdLd", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12594 | // fabs | ||
| 12595 | .{ .tag = @enumFromInt(3727), .param_str = "dd", .properties = .{ .header = .math, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } }, | ||
| 12596 | // fabsf | ||
| 12597 | .{ .tag = @enumFromInt(3728), .param_str = "ff", .properties = .{ .header = .math, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } }, | ||
| 12598 | // fabsl | ||
| 12599 | .{ .tag = @enumFromInt(3729), .param_str = "LdLd", .properties = .{ .header = .math, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } }, | ||
| 12600 | // fdim | ||
| 12601 | .{ .tag = @enumFromInt(3730), .param_str = "ddd", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12602 | // fdimf | ||
| 12603 | .{ .tag = @enumFromInt(3731), .param_str = "fff", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12604 | // fdiml | ||
| 12605 | .{ .tag = @enumFromInt(3732), .param_str = "LdLdLd", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12606 | // finite | ||
| 12607 | .{ .tag = @enumFromInt(3733), .param_str = "id", .properties = .{ .header = .math, .language = .gnu_lang, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } }, | ||
| 12608 | // finitef | ||
| 12609 | .{ .tag = @enumFromInt(3734), .param_str = "if", .properties = .{ .header = .math, .language = .gnu_lang, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } }, | ||
| 12610 | // finitel | ||
| 12611 | .{ .tag = @enumFromInt(3735), .param_str = "iLd", .properties = .{ .header = .math, .language = .gnu_lang, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } }, | ||
| 12612 | // floor | ||
| 12613 | .{ .tag = @enumFromInt(3736), .param_str = "dd", .properties = .{ .header = .math, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } }, | ||
| 12614 | // floorf | ||
| 12615 | .{ .tag = @enumFromInt(3737), .param_str = "ff", .properties = .{ .header = .math, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } }, | ||
| 12616 | // floorl | ||
| 12617 | .{ .tag = @enumFromInt(3738), .param_str = "LdLd", .properties = .{ .header = .math, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } }, | ||
| 12618 | // fma | ||
| 12619 | .{ .tag = @enumFromInt(3739), .param_str = "dddd", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12620 | // fmaf | ||
| 12621 | .{ .tag = @enumFromInt(3740), .param_str = "ffff", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12622 | // fmal | ||
| 12623 | .{ .tag = @enumFromInt(3741), .param_str = "LdLdLdLd", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12624 | // fmax | ||
| 12625 | .{ .tag = @enumFromInt(3742), .param_str = "ddd", .properties = .{ .header = .math, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } }, | ||
| 12626 | // fmaxf | ||
| 12627 | .{ .tag = @enumFromInt(3743), .param_str = "fff", .properties = .{ .header = .math, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } }, | ||
| 12628 | // fmaxl | ||
| 12629 | .{ .tag = @enumFromInt(3744), .param_str = "LdLdLd", .properties = .{ .header = .math, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } }, | ||
| 12630 | // fmin | ||
| 12631 | .{ .tag = @enumFromInt(3745), .param_str = "ddd", .properties = .{ .header = .math, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } }, | ||
| 12632 | // fminf | ||
| 12633 | .{ .tag = @enumFromInt(3746), .param_str = "fff", .properties = .{ .header = .math, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } }, | ||
| 12634 | // fminl | ||
| 12635 | .{ .tag = @enumFromInt(3747), .param_str = "LdLdLd", .properties = .{ .header = .math, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } }, | ||
| 12636 | // fmod | ||
| 12637 | .{ .tag = @enumFromInt(3748), .param_str = "ddd", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12638 | // fmodf | ||
| 12639 | .{ .tag = @enumFromInt(3749), .param_str = "fff", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12640 | // fmodl | ||
| 12641 | .{ .tag = @enumFromInt(3750), .param_str = "LdLdLd", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12642 | // fopen | ||
| 12643 | .{ .tag = @enumFromInt(3751), .param_str = "P*cC*cC*", .properties = .{ .header = .stdio, .attributes = .{ .lib_function_without_prefix = true } } }, | ||
| 12644 | // fprintf | ||
| 12645 | .{ .tag = @enumFromInt(3752), .param_str = "iP*cC*.", .properties = .{ .header = .stdio, .attributes = .{ .lib_function_without_prefix = true, .format_kind = .printf, .format_string_position = 1 } } }, | ||
| 12646 | // fread | ||
| 12647 | .{ .tag = @enumFromInt(3753), .param_str = "zv*zzP*", .properties = .{ .header = .stdio, .attributes = .{ .lib_function_without_prefix = true } } }, | ||
| 12648 | // free | ||
| 12649 | .{ .tag = @enumFromInt(3754), .param_str = "vv*", .properties = .{ .header = .stdlib, .attributes = .{ .lib_function_without_prefix = true } } }, | ||
| 12650 | // frexp | ||
| 12651 | .{ .tag = @enumFromInt(3755), .param_str = "ddi*", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true } } }, | ||
| 12652 | // frexpf | ||
| 12653 | .{ .tag = @enumFromInt(3756), .param_str = "ffi*", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true } } }, | ||
| 12654 | // frexpl | ||
| 12655 | .{ .tag = @enumFromInt(3757), .param_str = "LdLdi*", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true } } }, | ||
| 12656 | // fscanf | ||
| 12657 | .{ .tag = @enumFromInt(3758), .param_str = "iP*RcC*R.", .properties = .{ .header = .stdio, .attributes = .{ .lib_function_without_prefix = true, .format_kind = .scanf, .format_string_position = 1 } } }, | ||
| 12658 | // fwrite | ||
| 12659 | .{ .tag = @enumFromInt(3759), .param_str = "zvC*zzP*", .properties = .{ .header = .stdio, .attributes = .{ .lib_function_without_prefix = true } } }, | ||
| 12660 | // getcontext | ||
| 12661 | .{ .tag = @enumFromInt(3760), .param_str = "iK*", .properties = .{ .header = .setjmp, .attributes = .{ .allow_type_mismatch = true, .lib_function_without_prefix = true, .returns_twice = true } } }, | ||
| 12662 | // hypot | ||
| 12663 | .{ .tag = @enumFromInt(3761), .param_str = "ddd", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12664 | // hypotf | ||
| 12665 | .{ .tag = @enumFromInt(3762), .param_str = "fff", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12666 | // hypotl | ||
| 12667 | .{ .tag = @enumFromInt(3763), .param_str = "LdLdLd", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12668 | // ilogb | ||
| 12669 | .{ .tag = @enumFromInt(3764), .param_str = "id", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12670 | // ilogbf | ||
| 12671 | .{ .tag = @enumFromInt(3765), .param_str = "if", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12672 | // ilogbl | ||
| 12673 | .{ .tag = @enumFromInt(3766), .param_str = "iLd", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12674 | // index | ||
| 12675 | .{ .tag = @enumFromInt(3767), .param_str = "c*cC*i", .properties = .{ .header = .strings, .language = .all_gnu_languages, .attributes = .{ .lib_function_without_prefix = true } } }, | ||
| 12676 | // isalnum | ||
| 12677 | .{ .tag = @enumFromInt(3768), .param_str = "ii", .properties = .{ .header = .ctype, .attributes = .{ .pure = true, .lib_function_without_prefix = true } } }, | ||
| 12678 | // isalpha | ||
| 12679 | .{ .tag = @enumFromInt(3769), .param_str = "ii", .properties = .{ .header = .ctype, .attributes = .{ .pure = true, .lib_function_without_prefix = true } } }, | ||
| 12680 | // isblank | ||
| 12681 | .{ .tag = @enumFromInt(3770), .param_str = "ii", .properties = .{ .header = .ctype, .attributes = .{ .pure = true, .lib_function_without_prefix = true } } }, | ||
| 12682 | // iscntrl | ||
| 12683 | .{ .tag = @enumFromInt(3771), .param_str = "ii", .properties = .{ .header = .ctype, .attributes = .{ .pure = true, .lib_function_without_prefix = true } } }, | ||
| 12684 | // isdigit | ||
| 12685 | .{ .tag = @enumFromInt(3772), .param_str = "ii", .properties = .{ .header = .ctype, .attributes = .{ .pure = true, .lib_function_without_prefix = true } } }, | ||
| 12686 | // isgraph | ||
| 12687 | .{ .tag = @enumFromInt(3773), .param_str = "ii", .properties = .{ .header = .ctype, .attributes = .{ .pure = true, .lib_function_without_prefix = true } } }, | ||
| 12688 | // islower | ||
| 12689 | .{ .tag = @enumFromInt(3774), .param_str = "ii", .properties = .{ .header = .ctype, .attributes = .{ .pure = true, .lib_function_without_prefix = true } } }, | ||
| 12690 | // isprint | ||
| 12691 | .{ .tag = @enumFromInt(3775), .param_str = "ii", .properties = .{ .header = .ctype, .attributes = .{ .pure = true, .lib_function_without_prefix = true } } }, | ||
| 12692 | // ispunct | ||
| 12693 | .{ .tag = @enumFromInt(3776), .param_str = "ii", .properties = .{ .header = .ctype, .attributes = .{ .pure = true, .lib_function_without_prefix = true } } }, | ||
| 12694 | // isspace | ||
| 12695 | .{ .tag = @enumFromInt(3777), .param_str = "ii", .properties = .{ .header = .ctype, .attributes = .{ .pure = true, .lib_function_without_prefix = true } } }, | ||
| 12696 | // isupper | ||
| 12697 | .{ .tag = @enumFromInt(3778), .param_str = "ii", .properties = .{ .header = .ctype, .attributes = .{ .pure = true, .lib_function_without_prefix = true } } }, | ||
| 12698 | // isxdigit | ||
| 12699 | .{ .tag = @enumFromInt(3779), .param_str = "ii", .properties = .{ .header = .ctype, .attributes = .{ .pure = true, .lib_function_without_prefix = true } } }, | ||
| 12700 | // labs | ||
| 12701 | .{ .tag = @enumFromInt(3780), .param_str = "LiLi", .properties = .{ .header = .stdlib, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } }, | ||
| 12702 | // ldexp | ||
| 12703 | .{ .tag = @enumFromInt(3781), .param_str = "ddi", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12704 | // ldexpf | ||
| 12705 | .{ .tag = @enumFromInt(3782), .param_str = "ffi", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12706 | // ldexpl | ||
| 12707 | .{ .tag = @enumFromInt(3783), .param_str = "LdLdi", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12708 | // lgamma | ||
| 12709 | .{ .tag = @enumFromInt(3784), .param_str = "dd", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true } } }, | ||
| 12710 | // lgammaf | ||
| 12711 | .{ .tag = @enumFromInt(3785), .param_str = "ff", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true } } }, | ||
| 12712 | // lgammal | ||
| 12713 | .{ .tag = @enumFromInt(3786), .param_str = "LdLd", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true } } }, | ||
| 12714 | // llabs | ||
| 12715 | .{ .tag = @enumFromInt(3787), .param_str = "LLiLLi", .properties = .{ .header = .stdlib, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } }, | ||
| 12716 | // llrint | ||
| 12717 | .{ .tag = @enumFromInt(3788), .param_str = "LLid", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12718 | // llrintf | ||
| 12719 | .{ .tag = @enumFromInt(3789), .param_str = "LLif", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12720 | // llrintl | ||
| 12721 | .{ .tag = @enumFromInt(3790), .param_str = "LLiLd", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12722 | // llround | ||
| 12723 | .{ .tag = @enumFromInt(3791), .param_str = "LLid", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12724 | // llroundf | ||
| 12725 | .{ .tag = @enumFromInt(3792), .param_str = "LLif", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12726 | // llroundl | ||
| 12727 | .{ .tag = @enumFromInt(3793), .param_str = "LLiLd", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12728 | // log | ||
| 12729 | .{ .tag = @enumFromInt(3794), .param_str = "dd", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12730 | // log10 | ||
| 12731 | .{ .tag = @enumFromInt(3795), .param_str = "dd", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12732 | // log10f | ||
| 12733 | .{ .tag = @enumFromInt(3796), .param_str = "ff", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12734 | // log10l | ||
| 12735 | .{ .tag = @enumFromInt(3797), .param_str = "LdLd", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12736 | // log1p | ||
| 12737 | .{ .tag = @enumFromInt(3798), .param_str = "dd", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12738 | // log1pf | ||
| 12739 | .{ .tag = @enumFromInt(3799), .param_str = "ff", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12740 | // log1pl | ||
| 12741 | .{ .tag = @enumFromInt(3800), .param_str = "LdLd", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12742 | // log2 | ||
| 12743 | .{ .tag = @enumFromInt(3801), .param_str = "dd", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12744 | // log2f | ||
| 12745 | .{ .tag = @enumFromInt(3802), .param_str = "ff", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12746 | // log2l | ||
| 12747 | .{ .tag = @enumFromInt(3803), .param_str = "LdLd", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12748 | // logb | ||
| 12749 | .{ .tag = @enumFromInt(3804), .param_str = "dd", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12750 | // logbf | ||
| 12751 | .{ .tag = @enumFromInt(3805), .param_str = "ff", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12752 | // logbl | ||
| 12753 | .{ .tag = @enumFromInt(3806), .param_str = "LdLd", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12754 | // logf | ||
| 12755 | .{ .tag = @enumFromInt(3807), .param_str = "ff", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12756 | // logl | ||
| 12757 | .{ .tag = @enumFromInt(3808), .param_str = "LdLd", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12758 | // longjmp | ||
| 12759 | .{ .tag = @enumFromInt(3809), .param_str = "vJi", .properties = .{ .header = .setjmp, .attributes = .{ .noreturn = true, .allow_type_mismatch = true, .lib_function_without_prefix = true } } }, | ||
| 12760 | // lrint | ||
| 12761 | .{ .tag = @enumFromInt(3810), .param_str = "Lid", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12762 | // lrintf | ||
| 12763 | .{ .tag = @enumFromInt(3811), .param_str = "Lif", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12764 | // lrintl | ||
| 12765 | .{ .tag = @enumFromInt(3812), .param_str = "LiLd", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12766 | // lround | ||
| 12767 | .{ .tag = @enumFromInt(3813), .param_str = "Lid", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12768 | // lroundf | ||
| 12769 | .{ .tag = @enumFromInt(3814), .param_str = "Lif", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12770 | // lroundl | ||
| 12771 | .{ .tag = @enumFromInt(3815), .param_str = "LiLd", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12772 | // malloc | ||
| 12773 | .{ .tag = @enumFromInt(3816), .param_str = "v*z", .properties = .{ .header = .stdlib, .attributes = .{ .lib_function_without_prefix = true } } }, | ||
| 12774 | // memalign | ||
| 12775 | .{ .tag = @enumFromInt(3817), .param_str = "v*zz", .properties = .{ .header = .malloc, .language = .all_gnu_languages, .attributes = .{ .lib_function_without_prefix = true } } }, | ||
| 12776 | // memccpy | ||
| 12777 | .{ .tag = @enumFromInt(3818), .param_str = "v*v*vC*iz", .properties = .{ .header = .string, .language = .all_gnu_languages, .attributes = .{ .lib_function_without_prefix = true } } }, | ||
| 12778 | // memchr | ||
| 12779 | .{ .tag = @enumFromInt(3819), .param_str = "v*vC*iz", .properties = .{ .header = .string, .attributes = .{ .lib_function_without_prefix = true, .const_evaluable = true } } }, | ||
| 12780 | // memcmp | ||
| 12781 | .{ .tag = @enumFromInt(3820), .param_str = "ivC*vC*z", .properties = .{ .header = .string, .attributes = .{ .lib_function_without_prefix = true, .const_evaluable = true } } }, | ||
| 12782 | // memcpy | ||
| 12783 | .{ .tag = @enumFromInt(3821), .param_str = "v*v*vC*z", .properties = .{ .header = .string, .attributes = .{ .lib_function_without_prefix = true, .const_evaluable = true } } }, | ||
| 12784 | // memmove | ||
| 12785 | .{ .tag = @enumFromInt(3822), .param_str = "v*v*vC*z", .properties = .{ .header = .string, .attributes = .{ .lib_function_without_prefix = true, .const_evaluable = true } } }, | ||
| 12786 | // mempcpy | ||
| 12787 | .{ .tag = @enumFromInt(3823), .param_str = "v*v*vC*z", .properties = .{ .header = .string, .language = .all_gnu_languages, .attributes = .{ .lib_function_without_prefix = true } } }, | ||
| 12788 | // memset | ||
| 12789 | .{ .tag = @enumFromInt(3824), .param_str = "v*v*iz", .properties = .{ .header = .string, .attributes = .{ .lib_function_without_prefix = true } } }, | ||
| 12790 | // modf | ||
| 12791 | .{ .tag = @enumFromInt(3825), .param_str = "ddd*", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true } } }, | ||
| 12792 | // modff | ||
| 12793 | .{ .tag = @enumFromInt(3826), .param_str = "fff*", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true } } }, | ||
| 12794 | // modfl | ||
| 12795 | .{ .tag = @enumFromInt(3827), .param_str = "LdLdLd*", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true } } }, | ||
| 12796 | // nan | ||
| 12797 | .{ .tag = @enumFromInt(3828), .param_str = "dcC*", .properties = .{ .header = .math, .attributes = .{ .pure = true, .lib_function_without_prefix = true } } }, | ||
| 12798 | // nanf | ||
| 12799 | .{ .tag = @enumFromInt(3829), .param_str = "fcC*", .properties = .{ .header = .math, .attributes = .{ .pure = true, .lib_function_without_prefix = true } } }, | ||
| 12800 | // nanl | ||
| 12801 | .{ .tag = @enumFromInt(3830), .param_str = "LdcC*", .properties = .{ .header = .math, .attributes = .{ .pure = true, .lib_function_without_prefix = true } } }, | ||
| 12802 | // nearbyint | ||
| 12803 | .{ .tag = @enumFromInt(3831), .param_str = "dd", .properties = .{ .header = .math, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } }, | ||
| 12804 | // nearbyintf | ||
| 12805 | .{ .tag = @enumFromInt(3832), .param_str = "ff", .properties = .{ .header = .math, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } }, | ||
| 12806 | // nearbyintl | ||
| 12807 | .{ .tag = @enumFromInt(3833), .param_str = "LdLd", .properties = .{ .header = .math, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } }, | ||
| 12808 | // nextafter | ||
| 12809 | .{ .tag = @enumFromInt(3834), .param_str = "ddd", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12810 | // nextafterf | ||
| 12811 | .{ .tag = @enumFromInt(3835), .param_str = "fff", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12812 | // nextafterl | ||
| 12813 | .{ .tag = @enumFromInt(3836), .param_str = "LdLdLd", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12814 | // nexttoward | ||
| 12815 | .{ .tag = @enumFromInt(3837), .param_str = "ddLd", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12816 | // nexttowardf | ||
| 12817 | .{ .tag = @enumFromInt(3838), .param_str = "ffLd", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12818 | // nexttowardl | ||
| 12819 | .{ .tag = @enumFromInt(3839), .param_str = "LdLdLd", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12820 | // pow | ||
| 12821 | .{ .tag = @enumFromInt(3840), .param_str = "ddd", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12822 | // powf | ||
| 12823 | .{ .tag = @enumFromInt(3841), .param_str = "fff", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12824 | // powl | ||
| 12825 | .{ .tag = @enumFromInt(3842), .param_str = "LdLdLd", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12826 | // printf | ||
| 12827 | .{ .tag = @enumFromInt(3843), .param_str = "icC*.", .properties = .{ .header = .stdio, .attributes = .{ .lib_function_without_prefix = true, .format_kind = .printf } } }, | ||
| 12828 | // realloc | ||
| 12829 | .{ .tag = @enumFromInt(3844), .param_str = "v*v*z", .properties = .{ .header = .stdlib, .attributes = .{ .lib_function_without_prefix = true } } }, | ||
| 12830 | // remainder | ||
| 12831 | .{ .tag = @enumFromInt(3845), .param_str = "ddd", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12832 | // remainderf | ||
| 12833 | .{ .tag = @enumFromInt(3846), .param_str = "fff", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12834 | // remainderl | ||
| 12835 | .{ .tag = @enumFromInt(3847), .param_str = "LdLdLd", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12836 | // remquo | ||
| 12837 | .{ .tag = @enumFromInt(3848), .param_str = "dddi*", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true } } }, | ||
| 12838 | // remquof | ||
| 12839 | .{ .tag = @enumFromInt(3849), .param_str = "fffi*", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true } } }, | ||
| 12840 | // remquol | ||
| 12841 | .{ .tag = @enumFromInt(3850), .param_str = "LdLdLdi*", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true } } }, | ||
| 12842 | // rindex | ||
| 12843 | .{ .tag = @enumFromInt(3851), .param_str = "c*cC*i", .properties = .{ .header = .strings, .language = .all_gnu_languages, .attributes = .{ .lib_function_without_prefix = true } } }, | ||
| 12844 | // rint | ||
| 12845 | .{ .tag = @enumFromInt(3852), .param_str = "dd", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_fp_exceptions = true } } }, | ||
| 12846 | // rintf | ||
| 12847 | .{ .tag = @enumFromInt(3853), .param_str = "ff", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_fp_exceptions = true } } }, | ||
| 12848 | // rintl | ||
| 12849 | .{ .tag = @enumFromInt(3854), .param_str = "LdLd", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_fp_exceptions = true } } }, | ||
| 12850 | // round | ||
| 12851 | .{ .tag = @enumFromInt(3855), .param_str = "dd", .properties = .{ .header = .math, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } }, | ||
| 12852 | // roundeven | ||
| 12853 | .{ .tag = @enumFromInt(3856), .param_str = "dd", .properties = .{ .header = .math, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } }, | ||
| 12854 | // roundevenf | ||
| 12855 | .{ .tag = @enumFromInt(3857), .param_str = "ff", .properties = .{ .header = .math, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } }, | ||
| 12856 | // roundevenl | ||
| 12857 | .{ .tag = @enumFromInt(3858), .param_str = "LdLd", .properties = .{ .header = .math, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } }, | ||
| 12858 | // roundf | ||
| 12859 | .{ .tag = @enumFromInt(3859), .param_str = "ff", .properties = .{ .header = .math, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } }, | ||
| 12860 | // roundl | ||
| 12861 | .{ .tag = @enumFromInt(3860), .param_str = "LdLd", .properties = .{ .header = .math, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } }, | ||
| 12862 | // savectx | ||
| 12863 | .{ .tag = @enumFromInt(3861), .param_str = "iJ", .properties = .{ .header = .setjmp, .attributes = .{ .allow_type_mismatch = true, .lib_function_without_prefix = true, .returns_twice = true } } }, | ||
| 12864 | // scalbln | ||
| 12865 | .{ .tag = @enumFromInt(3862), .param_str = "ddLi", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12866 | // scalblnf | ||
| 12867 | .{ .tag = @enumFromInt(3863), .param_str = "ffLi", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12868 | // scalblnl | ||
| 12869 | .{ .tag = @enumFromInt(3864), .param_str = "LdLdLi", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12870 | // scalbn | ||
| 12871 | .{ .tag = @enumFromInt(3865), .param_str = "ddi", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12872 | // scalbnf | ||
| 12873 | .{ .tag = @enumFromInt(3866), .param_str = "ffi", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12874 | // scalbnl | ||
| 12875 | .{ .tag = @enumFromInt(3867), .param_str = "LdLdi", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12876 | // scanf | ||
| 12877 | .{ .tag = @enumFromInt(3868), .param_str = "icC*R.", .properties = .{ .header = .stdio, .attributes = .{ .lib_function_without_prefix = true, .format_kind = .scanf } } }, | ||
| 12878 | // setjmp | ||
| 12879 | .{ .tag = @enumFromInt(3869), .param_str = "iJ", .properties = .{ .header = .setjmp, .attributes = .{ .allow_type_mismatch = true, .lib_function_without_prefix = true, .returns_twice = true } } }, | ||
| 12880 | // siglongjmp | ||
| 12881 | .{ .tag = @enumFromInt(3870), .param_str = "vSJi", .properties = .{ .header = .setjmp, .language = .all_gnu_languages, .attributes = .{ .noreturn = true, .allow_type_mismatch = true, .lib_function_without_prefix = true } } }, | ||
| 12882 | // sigsetjmp | ||
| 12883 | .{ .tag = @enumFromInt(3871), .param_str = "iSJi", .properties = .{ .header = .setjmp, .attributes = .{ .allow_type_mismatch = true, .lib_function_without_prefix = true, .returns_twice = true } } }, | ||
| 12884 | // sin | ||
| 12885 | .{ .tag = @enumFromInt(3872), .param_str = "dd", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12886 | // sinf | ||
| 12887 | .{ .tag = @enumFromInt(3873), .param_str = "ff", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12888 | // sinh | ||
| 12889 | .{ .tag = @enumFromInt(3874), .param_str = "dd", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12890 | // sinhf | ||
| 12891 | .{ .tag = @enumFromInt(3875), .param_str = "ff", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12892 | // sinhl | ||
| 12893 | .{ .tag = @enumFromInt(3876), .param_str = "LdLd", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12894 | // sinl | ||
| 12895 | .{ .tag = @enumFromInt(3877), .param_str = "LdLd", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12896 | // snprintf | ||
| 12897 | .{ .tag = @enumFromInt(3878), .param_str = "ic*zcC*.", .properties = .{ .header = .stdio, .attributes = .{ .lib_function_without_prefix = true, .format_kind = .printf, .format_string_position = 2 } } }, | ||
| 12898 | // sprintf | ||
| 12899 | .{ .tag = @enumFromInt(3879), .param_str = "ic*cC*.", .properties = .{ .header = .stdio, .attributes = .{ .lib_function_without_prefix = true, .format_kind = .printf, .format_string_position = 1 } } }, | ||
| 12900 | // sqrt | ||
| 12901 | .{ .tag = @enumFromInt(3880), .param_str = "dd", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12902 | // sqrtf | ||
| 12903 | .{ .tag = @enumFromInt(3881), .param_str = "ff", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12904 | // sqrtl | ||
| 12905 | .{ .tag = @enumFromInt(3882), .param_str = "LdLd", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12906 | // sscanf | ||
| 12907 | .{ .tag = @enumFromInt(3883), .param_str = "icC*RcC*R.", .properties = .{ .header = .stdio, .attributes = .{ .lib_function_without_prefix = true, .format_kind = .scanf, .format_string_position = 1 } } }, | ||
| 12908 | // stpcpy | ||
| 12909 | .{ .tag = @enumFromInt(3884), .param_str = "c*c*cC*", .properties = .{ .header = .string, .language = .all_gnu_languages, .attributes = .{ .lib_function_without_prefix = true } } }, | ||
| 12910 | // stpncpy | ||
| 12911 | .{ .tag = @enumFromInt(3885), .param_str = "c*c*cC*z", .properties = .{ .header = .string, .language = .all_gnu_languages, .attributes = .{ .lib_function_without_prefix = true } } }, | ||
| 12912 | // strcasecmp | ||
| 12913 | .{ .tag = @enumFromInt(3886), .param_str = "icC*cC*", .properties = .{ .header = .strings, .language = .all_gnu_languages, .attributes = .{ .lib_function_without_prefix = true } } }, | ||
| 12914 | // strcat | ||
| 12915 | .{ .tag = @enumFromInt(3887), .param_str = "c*c*cC*", .properties = .{ .header = .string, .attributes = .{ .lib_function_without_prefix = true } } }, | ||
| 12916 | // strchr | ||
| 12917 | .{ .tag = @enumFromInt(3888), .param_str = "c*cC*i", .properties = .{ .header = .string, .attributes = .{ .lib_function_without_prefix = true, .const_evaluable = true } } }, | ||
| 12918 | // strcmp | ||
| 12919 | .{ .tag = @enumFromInt(3889), .param_str = "icC*cC*", .properties = .{ .header = .string, .attributes = .{ .lib_function_without_prefix = true, .const_evaluable = true } } }, | ||
| 12920 | // strcpy | ||
| 12921 | .{ .tag = @enumFromInt(3890), .param_str = "c*c*cC*", .properties = .{ .header = .string, .attributes = .{ .lib_function_without_prefix = true } } }, | ||
| 12922 | // strcspn | ||
| 12923 | .{ .tag = @enumFromInt(3891), .param_str = "zcC*cC*", .properties = .{ .header = .string, .attributes = .{ .lib_function_without_prefix = true } } }, | ||
| 12924 | // strdup | ||
| 12925 | .{ .tag = @enumFromInt(3892), .param_str = "c*cC*", .properties = .{ .header = .string, .language = .all_gnu_languages, .attributes = .{ .lib_function_without_prefix = true } } }, | ||
| 12926 | // strerror | ||
| 12927 | .{ .tag = @enumFromInt(3893), .param_str = "c*i", .properties = .{ .header = .string, .attributes = .{ .lib_function_without_prefix = true } } }, | ||
| 12928 | // strlcat | ||
| 12929 | .{ .tag = @enumFromInt(3894), .param_str = "zc*cC*z", .properties = .{ .header = .string, .language = .all_gnu_languages, .attributes = .{ .lib_function_without_prefix = true } } }, | ||
| 12930 | // strlcpy | ||
| 12931 | .{ .tag = @enumFromInt(3895), .param_str = "zc*cC*z", .properties = .{ .header = .string, .language = .all_gnu_languages, .attributes = .{ .lib_function_without_prefix = true } } }, | ||
| 12932 | // strlen | ||
| 12933 | .{ .tag = @enumFromInt(3896), .param_str = "zcC*", .properties = .{ .header = .string, .attributes = .{ .lib_function_without_prefix = true, .const_evaluable = true } } }, | ||
| 12934 | // strncasecmp | ||
| 12935 | .{ .tag = @enumFromInt(3897), .param_str = "icC*cC*z", .properties = .{ .header = .strings, .language = .all_gnu_languages, .attributes = .{ .lib_function_without_prefix = true } } }, | ||
| 12936 | // strncat | ||
| 12937 | .{ .tag = @enumFromInt(3898), .param_str = "c*c*cC*z", .properties = .{ .header = .string, .attributes = .{ .lib_function_without_prefix = true } } }, | ||
| 12938 | // strncmp | ||
| 12939 | .{ .tag = @enumFromInt(3899), .param_str = "icC*cC*z", .properties = .{ .header = .string, .attributes = .{ .lib_function_without_prefix = true, .const_evaluable = true } } }, | ||
| 12940 | // strncpy | ||
| 12941 | .{ .tag = @enumFromInt(3900), .param_str = "c*c*cC*z", .properties = .{ .header = .string, .attributes = .{ .lib_function_without_prefix = true } } }, | ||
| 12942 | // strndup | ||
| 12943 | .{ .tag = @enumFromInt(3901), .param_str = "c*cC*z", .properties = .{ .header = .string, .language = .all_gnu_languages, .attributes = .{ .lib_function_without_prefix = true } } }, | ||
| 12944 | // strpbrk | ||
| 12945 | .{ .tag = @enumFromInt(3902), .param_str = "c*cC*cC*", .properties = .{ .header = .string, .attributes = .{ .lib_function_without_prefix = true } } }, | ||
| 12946 | // strrchr | ||
| 12947 | .{ .tag = @enumFromInt(3903), .param_str = "c*cC*i", .properties = .{ .header = .string, .attributes = .{ .lib_function_without_prefix = true } } }, | ||
| 12948 | // strspn | ||
| 12949 | .{ .tag = @enumFromInt(3904), .param_str = "zcC*cC*", .properties = .{ .header = .string, .attributes = .{ .lib_function_without_prefix = true } } }, | ||
| 12950 | // strstr | ||
| 12951 | .{ .tag = @enumFromInt(3905), .param_str = "c*cC*cC*", .properties = .{ .header = .string, .attributes = .{ .lib_function_without_prefix = true } } }, | ||
| 12952 | // strtod | ||
| 12953 | .{ .tag = @enumFromInt(3906), .param_str = "dcC*c**", .properties = .{ .header = .stdlib, .attributes = .{ .lib_function_without_prefix = true } } }, | ||
| 12954 | // strtof | ||
| 12955 | .{ .tag = @enumFromInt(3907), .param_str = "fcC*c**", .properties = .{ .header = .stdlib, .attributes = .{ .lib_function_without_prefix = true } } }, | ||
| 12956 | // strtok | ||
| 12957 | .{ .tag = @enumFromInt(3908), .param_str = "c*c*cC*", .properties = .{ .header = .string, .attributes = .{ .lib_function_without_prefix = true } } }, | ||
| 12958 | // strtol | ||
| 12959 | .{ .tag = @enumFromInt(3909), .param_str = "LicC*c**i", .properties = .{ .header = .stdlib, .attributes = .{ .lib_function_without_prefix = true } } }, | ||
| 12960 | // strtold | ||
| 12961 | .{ .tag = @enumFromInt(3910), .param_str = "LdcC*c**", .properties = .{ .header = .stdlib, .attributes = .{ .lib_function_without_prefix = true } } }, | ||
| 12962 | // strtoll | ||
| 12963 | .{ .tag = @enumFromInt(3911), .param_str = "LLicC*c**i", .properties = .{ .header = .stdlib, .attributes = .{ .lib_function_without_prefix = true } } }, | ||
| 12964 | // strtoul | ||
| 12965 | .{ .tag = @enumFromInt(3912), .param_str = "ULicC*c**i", .properties = .{ .header = .stdlib, .attributes = .{ .lib_function_without_prefix = true } } }, | ||
| 12966 | // strtoull | ||
| 12967 | .{ .tag = @enumFromInt(3913), .param_str = "ULLicC*c**i", .properties = .{ .header = .stdlib, .attributes = .{ .lib_function_without_prefix = true } } }, | ||
| 12968 | // strxfrm | ||
| 12969 | .{ .tag = @enumFromInt(3914), .param_str = "zc*cC*z", .properties = .{ .header = .string, .attributes = .{ .lib_function_without_prefix = true } } }, | ||
| 12970 | // tan | ||
| 12971 | .{ .tag = @enumFromInt(3915), .param_str = "dd", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12972 | // tanf | ||
| 12973 | .{ .tag = @enumFromInt(3916), .param_str = "ff", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12974 | // tanh | ||
| 12975 | .{ .tag = @enumFromInt(3917), .param_str = "dd", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12976 | // tanhf | ||
| 12977 | .{ .tag = @enumFromInt(3918), .param_str = "ff", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12978 | // tanhl | ||
| 12979 | .{ .tag = @enumFromInt(3919), .param_str = "LdLd", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12980 | // tanl | ||
| 12981 | .{ .tag = @enumFromInt(3920), .param_str = "LdLd", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12982 | // tgamma | ||
| 12983 | .{ .tag = @enumFromInt(3921), .param_str = "dd", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12984 | // tgammaf | ||
| 12985 | .{ .tag = @enumFromInt(3922), .param_str = "ff", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12986 | // tgammal | ||
| 12987 | .{ .tag = @enumFromInt(3923), .param_str = "LdLd", .properties = .{ .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } }, | ||
| 12988 | // tolower | ||
| 12989 | .{ .tag = @enumFromInt(3924), .param_str = "ii", .properties = .{ .header = .ctype, .attributes = .{ .pure = true, .lib_function_without_prefix = true } } }, | ||
| 12990 | // toupper | ||
| 12991 | .{ .tag = @enumFromInt(3925), .param_str = "ii", .properties = .{ .header = .ctype, .attributes = .{ .pure = true, .lib_function_without_prefix = true } } }, | ||
| 12992 | // trunc | ||
| 12993 | .{ .tag = @enumFromInt(3926), .param_str = "dd", .properties = .{ .header = .math, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } }, | ||
| 12994 | // truncf | ||
| 12995 | .{ .tag = @enumFromInt(3927), .param_str = "ff", .properties = .{ .header = .math, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } }, | ||
| 12996 | // truncl | ||
| 12997 | .{ .tag = @enumFromInt(3928), .param_str = "LdLd", .properties = .{ .header = .math, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } }, | ||
| 12998 | // va_copy | ||
| 12999 | .{ .tag = @enumFromInt(3929), .param_str = "vAA", .properties = .{ .header = .stdarg, .attributes = .{ .lib_function_without_prefix = true } } }, | ||
| 13000 | // va_end | ||
| 13001 | .{ .tag = @enumFromInt(3930), .param_str = "vA", .properties = .{ .header = .stdarg, .attributes = .{ .lib_function_without_prefix = true } } }, | ||
| 13002 | // va_start | ||
| 13003 | .{ .tag = @enumFromInt(3931), .param_str = "vA.", .properties = .{ .header = .stdarg, .attributes = .{ .lib_function_without_prefix = true } } }, | ||
| 13004 | // vfork | ||
| 13005 | .{ .tag = @enumFromInt(3932), .param_str = "p", .properties = .{ .header = .unistd, .attributes = .{ .allow_type_mismatch = true, .lib_function_without_prefix = true, .returns_twice = true } } }, | ||
| 13006 | // vfprintf | ||
| 13007 | .{ .tag = @enumFromInt(3933), .param_str = "iP*cC*a", .properties = .{ .header = .stdio, .attributes = .{ .lib_function_without_prefix = true, .format_kind = .vprintf, .format_string_position = 1 } } }, | ||
| 13008 | // vfscanf | ||
| 13009 | .{ .tag = @enumFromInt(3934), .param_str = "iP*RcC*Ra", .properties = .{ .header = .stdio, .attributes = .{ .lib_function_without_prefix = true, .format_kind = .vscanf, .format_string_position = 1 } } }, | ||
| 13010 | // vprintf | ||
| 13011 | .{ .tag = @enumFromInt(3935), .param_str = "icC*a", .properties = .{ .header = .stdio, .attributes = .{ .lib_function_without_prefix = true, .format_kind = .vprintf } } }, | ||
| 13012 | // vscanf | ||
| 13013 | .{ .tag = @enumFromInt(3936), .param_str = "icC*Ra", .properties = .{ .header = .stdio, .attributes = .{ .lib_function_without_prefix = true, .format_kind = .vscanf } } }, | ||
| 13014 | // vsnprintf | ||
| 13015 | .{ .tag = @enumFromInt(3937), .param_str = "ic*zcC*a", .properties = .{ .header = .stdio, .attributes = .{ .lib_function_without_prefix = true, .format_kind = .vprintf, .format_string_position = 2 } } }, | ||
| 13016 | // vsprintf | ||
| 13017 | .{ .tag = @enumFromInt(3938), .param_str = "ic*cC*a", .properties = .{ .header = .stdio, .attributes = .{ .lib_function_without_prefix = true, .format_kind = .vprintf, .format_string_position = 1 } } }, | ||
| 13018 | // vsscanf | ||
| 13019 | .{ .tag = @enumFromInt(3939), .param_str = "icC*RcC*Ra", .properties = .{ .header = .stdio, .attributes = .{ .lib_function_without_prefix = true, .format_kind = .vscanf, .format_string_position = 1 } } }, | ||
| 13020 | // wcschr | ||
| 13021 | .{ .tag = @enumFromInt(3940), .param_str = "w*wC*w", .properties = .{ .header = .wchar, .attributes = .{ .lib_function_without_prefix = true, .const_evaluable = true } } }, | ||
| 13022 | // wcscmp | ||
| 13023 | .{ .tag = @enumFromInt(3941), .param_str = "iwC*wC*", .properties = .{ .header = .wchar, .attributes = .{ .lib_function_without_prefix = true, .const_evaluable = true } } }, | ||
| 13024 | // wcslen | ||
| 13025 | .{ .tag = @enumFromInt(3942), .param_str = "zwC*", .properties = .{ .header = .wchar, .attributes = .{ .lib_function_without_prefix = true, .const_evaluable = true } } }, | ||
| 13026 | // wcsncmp | ||
| 13027 | .{ .tag = @enumFromInt(3943), .param_str = "iwC*wC*z", .properties = .{ .header = .wchar, .attributes = .{ .lib_function_without_prefix = true, .const_evaluable = true } } }, | ||
| 13028 | // wmemchr | ||
| 13029 | .{ .tag = @enumFromInt(3944), .param_str = "w*wC*wz", .properties = .{ .header = .wchar, .attributes = .{ .lib_function_without_prefix = true, .const_evaluable = true } } }, | ||
| 13030 | // wmemcmp | ||
| 13031 | .{ .tag = @enumFromInt(3945), .param_str = "iwC*wC*z", .properties = .{ .header = .wchar, .attributes = .{ .lib_function_without_prefix = true, .const_evaluable = true } } }, | ||
| 13032 | // wmemcpy | ||
| 13033 | .{ .tag = @enumFromInt(3946), .param_str = "w*w*wC*z", .properties = .{ .header = .wchar, .attributes = .{ .lib_function_without_prefix = true, .const_evaluable = true } } }, | ||
| 13034 | // wmemmove | ||
| 13035 | .{ .tag = @enumFromInt(3947), .param_str = "w*w*wC*z", .properties = .{ .header = .wchar, .attributes = .{ .lib_function_without_prefix = true, .const_evaluable = true } } }, | ||
| 13036 | }; | ||
| 13037 | }; | ||
deps/aro/Builtins/Properties.zig deleted-143| ... | @@ -1,143 +0,0 @@ | ||
| 1 | const std = @import("std"); | ||
| 2 | |||
| 3 | const Properties = @This(); | ||
| 4 | |||
| 5 | param_str: []const u8, | ||
| 6 | language: Language = .all_languages, | ||
| 7 | attributes: Attributes = Attributes{}, | ||
| 8 | header: Header = .none, | ||
| 9 | target_set: TargetSet = TargetSet.initOne(.basic), | ||
| 10 | |||
| 11 | /// Header which must be included for a builtin to be available | ||
| 12 | pub const Header = enum { | ||
| 13 | none, | ||
| 14 | /// stdio.h | ||
| 15 | stdio, | ||
| 16 | /// stdlib.h | ||
| 17 | stdlib, | ||
| 18 | /// setjmpex.h | ||
| 19 | setjmpex, | ||
| 20 | /// stdarg.h | ||
| 21 | stdarg, | ||
| 22 | /// string.h | ||
| 23 | string, | ||
| 24 | /// ctype.h | ||
| 25 | ctype, | ||
| 26 | /// wchar.h | ||
| 27 | wchar, | ||
| 28 | /// setjmp.h | ||
| 29 | setjmp, | ||
| 30 | /// malloc.h | ||
| 31 | malloc, | ||
| 32 | /// strings.h | ||
| 33 | strings, | ||
| 34 | /// unistd.h | ||
| 35 | unistd, | ||
| 36 | /// pthread.h | ||
| 37 | pthread, | ||
| 38 | /// math.h | ||
| 39 | math, | ||
| 40 | /// complex.h | ||
| 41 | complex, | ||
| 42 | /// Blocks.h | ||
| 43 | blocks, | ||
| 44 | }; | ||
| 45 | |||
| 46 | /// Languages in which a builtin is available | ||
| 47 | pub const Language = enum { | ||
| 48 | all_languages, | ||
| 49 | all_ms_languages, | ||
| 50 | all_gnu_languages, | ||
| 51 | gnu_lang, | ||
| 52 | }; | ||
| 53 | |||
| 54 | pub const Attributes = packed struct { | ||
| 55 | /// Function does not return | ||
| 56 | noreturn: bool = false, | ||
| 57 | |||
| 58 | /// Function has no side effects | ||
| 59 | pure: bool = false, | ||
| 60 | |||
| 61 | /// Function has no side effects and does not read memory | ||
| 62 | @"const": bool = false, | ||
| 63 | |||
| 64 | /// Signature is meaningless; use custom typecheck | ||
| 65 | custom_typecheck: bool = false, | ||
| 66 | |||
| 67 | /// A declaration of this builtin should be recognized even if the type doesn't match the specified signature. | ||
| 68 | allow_type_mismatch: bool = false, | ||
| 69 | |||
| 70 | /// this is a libc/libm function with a '__builtin_' prefix added. | ||
| 71 | lib_function_with_builtin_prefix: bool = false, | ||
| 72 | |||
| 73 | /// this is a libc/libm function without a '__builtin_' prefix. This builtin is disableable by '-fno-builtin-foo' | ||
| 74 | lib_function_without_prefix: bool = false, | ||
| 75 | |||
| 76 | /// Function returns twice (e.g. setjmp) | ||
| 77 | returns_twice: bool = false, | ||
| 78 | |||
| 79 | /// Nature of the format string passed to this function | ||
| 80 | format_kind: enum(u3) { | ||
| 81 | /// Does not take a format string | ||
| 82 | none, | ||
| 83 | /// this is a printf-like function whose Nth argument is the format string | ||
| 84 | printf, | ||
| 85 | /// function is like vprintf in that it accepts its arguments as a va_list rather than through an ellipsis | ||
| 86 | vprintf, | ||
| 87 | /// this is a scanf-like function whose Nth argument is the format string | ||
| 88 | scanf, | ||
| 89 | /// the function is like vscanf in that it accepts its arguments as a va_list rather than through an ellipsis | ||
| 90 | vscanf, | ||
| 91 | } = .none, | ||
| 92 | |||
| 93 | /// Position of format string argument. Only meaningful if format_kind is not .none | ||
| 94 | format_string_position: u5 = 0, | ||
| 95 | |||
| 96 | /// if false, arguments are not evaluated | ||
| 97 | eval_args: bool = true, | ||
| 98 | |||
| 99 | /// no side effects and does not read memory, but only when -fno-math-errno and FP exceptions are ignored | ||
| 100 | const_without_errno_and_fp_exceptions: bool = false, | ||
| 101 | |||
| 102 | /// no side effects and does not read memory, but only when FP exceptions are ignored | ||
| 103 | const_without_fp_exceptions: bool = false, | ||
| 104 | |||
| 105 | /// this function can be constant evaluated by the frontend | ||
| 106 | const_evaluable: bool = false, | ||
| 107 | }; | ||
| 108 | |||
| 109 | pub const Target = enum { | ||
| 110 | /// Supported on all targets | ||
| 111 | basic, | ||
| 112 | aarch64, | ||
| 113 | aarch64_neon_sve_bridge, | ||
| 114 | aarch64_neon_sve_bridge_cg, | ||
| 115 | amdgpu, | ||
| 116 | arm, | ||
| 117 | bpf, | ||
| 118 | hexagon, | ||
| 119 | hexagon_dep, | ||
| 120 | hexagon_map_custom_dep, | ||
| 121 | loong_arch, | ||
| 122 | mips, | ||
| 123 | neon, | ||
| 124 | nvptx, | ||
| 125 | ppc, | ||
| 126 | riscv, | ||
| 127 | riscv_vector, | ||
| 128 | sve, | ||
| 129 | systemz, | ||
| 130 | ve, | ||
| 131 | vevl_gen, | ||
| 132 | webassembly, | ||
| 133 | x86, | ||
| 134 | x86_64, | ||
| 135 | xcore, | ||
| 136 | }; | ||
| 137 | |||
| 138 | /// Targets for which a builtin is enabled | ||
| 139 | pub const TargetSet = std.enums.EnumSet(Target); | ||
| 140 | |||
| 141 | pub fn isVarArgs(properties: Properties) bool { | ||
| 142 | return properties.param_str[properties.param_str.len - 1] == '.'; | ||
| 143 | } | ||
deps/aro/Builtins/TypeDescription.zig deleted-286| ... | @@ -1,286 +0,0 @@ | ||
| 1 | const std = @import("std"); | ||
| 2 | |||
| 3 | const TypeDescription = @This(); | ||
| 4 | |||
| 5 | prefix: []const Prefix, | ||
| 6 | spec: Spec, | ||
| 7 | suffix: []const Suffix, | ||
| 8 | |||
| 9 | pub const Component = union(enum) { | ||
| 10 | prefix: Prefix, | ||
| 11 | spec: Spec, | ||
| 12 | suffix: Suffix, | ||
| 13 | }; | ||
| 14 | |||
| 15 | pub const ComponentIterator = struct { | ||
| 16 | str: []const u8, | ||
| 17 | idx: usize, | ||
| 18 | |||
| 19 | pub fn init(str: []const u8) ComponentIterator { | ||
| 20 | return .{ | ||
| 21 | .str = str, | ||
| 22 | .idx = 0, | ||
| 23 | }; | ||
| 24 | } | ||
| 25 | |||
| 26 | pub fn peek(self: *ComponentIterator) ?Component { | ||
| 27 | const idx = self.idx; | ||
| 28 | defer self.idx = idx; | ||
| 29 | return self.next(); | ||
| 30 | } | ||
| 31 | |||
| 32 | pub fn next(self: *ComponentIterator) ?Component { | ||
| 33 | if (self.idx == self.str.len) return null; | ||
| 34 | const c = self.str[self.idx]; | ||
| 35 | self.idx += 1; | ||
| 36 | switch (c) { | ||
| 37 | 'L' => { | ||
| 38 | if (self.str[self.idx] != 'L') return .{ .prefix = .L }; | ||
| 39 | self.idx += 1; | ||
| 40 | if (self.str[self.idx] != 'L') return .{ .prefix = .LL }; | ||
| 41 | self.idx += 1; | ||
| 42 | return .{ .prefix = .LLL }; | ||
| 43 | }, | ||
| 44 | 'Z' => return .{ .prefix = .Z }, | ||
| 45 | 'W' => return .{ .prefix = .W }, | ||
| 46 | 'N' => return .{ .prefix = .N }, | ||
| 47 | 'O' => return .{ .prefix = .O }, | ||
| 48 | 'S' => { | ||
| 49 | if (self.str[self.idx] == 'J') { | ||
| 50 | self.idx += 1; | ||
| 51 | return .{ .spec = .SJ }; | ||
| 52 | } | ||
| 53 | return .{ .prefix = .S }; | ||
| 54 | }, | ||
| 55 | 'U' => return .{ .prefix = .U }, | ||
| 56 | 'I' => return .{ .prefix = .I }, | ||
| 57 | |||
| 58 | 'v' => return .{ .spec = .v }, | ||
| 59 | 'b' => return .{ .spec = .b }, | ||
| 60 | 'c' => return .{ .spec = .c }, | ||
| 61 | 's' => return .{ .spec = .s }, | ||
| 62 | 'i' => return .{ .spec = .i }, | ||
| 63 | 'h' => return .{ .spec = .h }, | ||
| 64 | 'x' => return .{ .spec = .x }, | ||
| 65 | 'y' => return .{ .spec = .y }, | ||
| 66 | 'f' => return .{ .spec = .f }, | ||
| 67 | 'd' => return .{ .spec = .d }, | ||
| 68 | 'z' => return .{ .spec = .z }, | ||
| 69 | 'w' => return .{ .spec = .w }, | ||
| 70 | 'F' => return .{ .spec = .F }, | ||
| 71 | 'G' => return .{ .spec = .G }, | ||
| 72 | 'H' => return .{ .spec = .H }, | ||
| 73 | 'M' => return .{ .spec = .M }, | ||
| 74 | 'a' => return .{ .spec = .a }, | ||
| 75 | 'A' => return .{ .spec = .A }, | ||
| 76 | 'V', 'q', 'E' => { | ||
| 77 | const start = self.idx; | ||
| 78 | while (std.ascii.isDigit(self.str[self.idx])) : (self.idx += 1) {} | ||
| 79 | const count = std.fmt.parseUnsigned(u32, self.str[start..self.idx], 10) catch unreachable; | ||
| 80 | return switch (c) { | ||
| 81 | 'V' => .{ .spec = .{ .V = count } }, | ||
| 82 | 'q' => .{ .spec = .{ .q = count } }, | ||
| 83 | 'E' => .{ .spec = .{ .E = count } }, | ||
| 84 | else => unreachable, | ||
| 85 | }; | ||
| 86 | }, | ||
| 87 | 'X' => { | ||
| 88 | defer self.idx += 1; | ||
| 89 | switch (self.str[self.idx]) { | ||
| 90 | 'f' => return .{ .spec = .{ .X = .float } }, | ||
| 91 | 'd' => return .{ .spec = .{ .X = .double } }, | ||
| 92 | 'L' => { | ||
| 93 | self.idx += 1; | ||
| 94 | return .{ .spec = .{ .X = .longdouble } }; | ||
| 95 | }, | ||
| 96 | else => unreachable, | ||
| 97 | } | ||
| 98 | }, | ||
| 99 | 'Y' => return .{ .spec = .Y }, | ||
| 100 | 'P' => return .{ .spec = .P }, | ||
| 101 | 'J' => return .{ .spec = .J }, | ||
| 102 | 'K' => return .{ .spec = .K }, | ||
| 103 | 'p' => return .{ .spec = .p }, | ||
| 104 | '.' => { | ||
| 105 | // can only appear at end of param string; indicates varargs function | ||
| 106 | std.debug.assert(self.idx == self.str.len); | ||
| 107 | return null; | ||
| 108 | }, | ||
| 109 | '!' => { | ||
| 110 | std.debug.assert(self.str.len == 1); | ||
| 111 | return .{ .spec = .@"!" }; | ||
| 112 | }, | ||
| 113 | |||
| 114 | '*' => { | ||
| 115 | if (self.idx < self.str.len and std.ascii.isDigit(self.str[self.idx])) { | ||
| 116 | defer self.idx += 1; | ||
| 117 | const addr_space = self.str[self.idx] - '0'; | ||
| 118 | return .{ .suffix = .{ .@"*" = addr_space } }; | ||
| 119 | } else { | ||
| 120 | return .{ .suffix = .{ .@"*" = null } }; | ||
| 121 | } | ||
| 122 | }, | ||
| 123 | 'C' => return .{ .suffix = .C }, | ||
| 124 | 'D' => return .{ .suffix = .D }, | ||
| 125 | 'R' => return .{ .suffix = .R }, | ||
| 126 | else => unreachable, | ||
| 127 | } | ||
| 128 | return null; | ||
| 129 | } | ||
| 130 | }; | ||
| 131 | |||
| 132 | pub const TypeIterator = struct { | ||
| 133 | param_str: []const u8, | ||
| 134 | prefix: [4]Prefix, | ||
| 135 | spec: Spec, | ||
| 136 | suffix: [4]Suffix, | ||
| 137 | idx: usize, | ||
| 138 | |||
| 139 | pub fn init(param_str: []const u8) TypeIterator { | ||
| 140 | return .{ | ||
| 141 | .param_str = param_str, | ||
| 142 | .prefix = undefined, | ||
| 143 | .spec = undefined, | ||
| 144 | .suffix = undefined, | ||
| 145 | .idx = 0, | ||
| 146 | }; | ||
| 147 | } | ||
| 148 | |||
| 149 | /// Returned `TypeDescription` contains fields which are slices into the underlying `TypeIterator` | ||
| 150 | /// The returned value is invalidated when `.next()` is called again or the TypeIterator goes out | ||
| 151 | // of scope. | ||
| 152 | pub fn next(self: *TypeIterator) ?TypeDescription { | ||
| 153 | var it = ComponentIterator.init(self.param_str[self.idx..]); | ||
| 154 | defer self.idx += it.idx; | ||
| 155 | |||
| 156 | var prefix_count: usize = 0; | ||
| 157 | var maybe_spec: ?Spec = null; | ||
| 158 | var suffix_count: usize = 0; | ||
| 159 | while (it.peek()) |component| { | ||
| 160 | switch (component) { | ||
| 161 | .prefix => |prefix| { | ||
| 162 | if (maybe_spec != null) break; | ||
| 163 | self.prefix[prefix_count] = prefix; | ||
| 164 | prefix_count += 1; | ||
| 165 | }, | ||
| 166 | .spec => |spec| { | ||
| 167 | if (maybe_spec != null) break; | ||
| 168 | maybe_spec = spec; | ||
| 169 | }, | ||
| 170 | .suffix => |suffix| { | ||
| 171 | std.debug.assert(maybe_spec != null); | ||
| 172 | self.suffix[suffix_count] = suffix; | ||
| 173 | suffix_count += 1; | ||
| 174 | }, | ||
| 175 | } | ||
| 176 | _ = it.next(); | ||
| 177 | } | ||
| 178 | if (maybe_spec) |spec| { | ||
| 179 | return TypeDescription{ | ||
| 180 | .prefix = self.prefix[0..prefix_count], | ||
| 181 | .spec = spec, | ||
| 182 | .suffix = self.suffix[0..suffix_count], | ||
| 183 | }; | ||
| 184 | } | ||
| 185 | return null; | ||
| 186 | } | ||
| 187 | }; | ||
| 188 | |||
| 189 | const Prefix = enum { | ||
| 190 | /// long (e.g. Li for 'long int', Ld for 'long double') | ||
| 191 | L, | ||
| 192 | /// long long (e.g. LLi for 'long long int', LLd for __float128) | ||
| 193 | LL, | ||
| 194 | /// __int128_t (e.g. LLLi) | ||
| 195 | LLL, | ||
| 196 | /// int32_t (require a native 32-bit integer type on the target) | ||
| 197 | Z, | ||
| 198 | /// int64_t (require a native 64-bit integer type on the target) | ||
| 199 | W, | ||
| 200 | /// 'int' size if target is LP64, 'L' otherwise. | ||
| 201 | N, | ||
| 202 | /// long for OpenCL targets, long long otherwise. | ||
| 203 | O, | ||
| 204 | /// signed | ||
| 205 | S, | ||
| 206 | /// unsigned | ||
| 207 | U, | ||
| 208 | /// Required to constant fold to an integer constant expression. | ||
| 209 | I, | ||
| 210 | }; | ||
| 211 | |||
| 212 | const Spec = union(enum) { | ||
| 213 | /// void | ||
| 214 | v, | ||
| 215 | /// boolean | ||
| 216 | b, | ||
| 217 | /// char | ||
| 218 | c, | ||
| 219 | /// short | ||
| 220 | s, | ||
| 221 | /// int | ||
| 222 | i, | ||
| 223 | /// half (__fp16, OpenCL) | ||
| 224 | h, | ||
| 225 | /// half (_Float16) | ||
| 226 | x, | ||
| 227 | /// half (__bf16) | ||
| 228 | y, | ||
| 229 | /// float | ||
| 230 | f, | ||
| 231 | /// double | ||
| 232 | d, | ||
| 233 | /// size_t | ||
| 234 | z, | ||
| 235 | /// wchar_t | ||
| 236 | w, | ||
| 237 | /// constant CFString | ||
| 238 | F, | ||
| 239 | /// id | ||
| 240 | G, | ||
| 241 | /// SEL | ||
| 242 | H, | ||
| 243 | /// struct objc_super | ||
| 244 | M, | ||
| 245 | /// __builtin_va_list | ||
| 246 | a, | ||
| 247 | /// "reference" to __builtin_va_list | ||
| 248 | A, | ||
| 249 | /// Vector, followed by the number of elements and the base type. | ||
| 250 | V: u32, | ||
| 251 | /// Scalable vector, followed by the number of elements and the base type. | ||
| 252 | q: u32, | ||
| 253 | /// ext_vector, followed by the number of elements and the base type. | ||
| 254 | E: u32, | ||
| 255 | /// _Complex, followed by the base type. | ||
| 256 | X: enum { | ||
| 257 | float, | ||
| 258 | double, | ||
| 259 | longdouble, | ||
| 260 | }, | ||
| 261 | /// ptrdiff_t | ||
| 262 | Y, | ||
| 263 | /// FILE | ||
| 264 | P, | ||
| 265 | /// jmp_buf | ||
| 266 | J, | ||
| 267 | /// sigjmp_buf | ||
| 268 | SJ, | ||
| 269 | /// ucontext_t | ||
| 270 | K, | ||
| 271 | /// pid_t | ||
| 272 | p, | ||
| 273 | /// Used to indicate a builtin with target-dependent param types. Must appear by itself | ||
| 274 | @"!", | ||
| 275 | }; | ||
| 276 | |||
| 277 | const Suffix = union(enum) { | ||
| 278 | /// pointer (optionally followed by an address space number,if no address space is specified than any address space will be accepted) | ||
| 279 | @"*": ?u8, | ||
| 280 | /// const | ||
| 281 | C, | ||
| 282 | /// volatile | ||
| 283 | D, | ||
| 284 | /// restrict | ||
| 285 | R, | ||
| 286 | }; | ||
deps/aro/CharInfo.zig deleted-487| ... | @@ -1,487 +0,0 @@ | ||
| 1 | //! This module provides functions for classifying characters according to | ||
| 2 | //! various C standards. All classification routines *do not* consider | ||
| 3 | //! characters from the basic character set; it is assumed those will be | ||
| 4 | //! checked separately | ||
| 5 | |||
| 6 | const assert = @import("std").debug.assert; | ||
| 7 | |||
| 8 | /// C11 Standard Annex D | ||
| 9 | pub fn isC11IdChar(codepoint: u21) bool { | ||
| 10 | assert(codepoint > 0x7F); | ||
| 11 | return switch (codepoint) { | ||
| 12 | // 1 | ||
| 13 | 0x00A8, | ||
| 14 | 0x00AA, | ||
| 15 | 0x00AD, | ||
| 16 | 0x00AF, | ||
| 17 | 0x00B2...0x00B5, | ||
| 18 | 0x00B7...0x00BA, | ||
| 19 | 0x00BC...0x00BE, | ||
| 20 | 0x00C0...0x00D6, | ||
| 21 | 0x00D8...0x00F6, | ||
| 22 | 0x00F8...0x00FF, | ||
| 23 | |||
| 24 | // 2 | ||
| 25 | 0x0100...0x167F, | ||
| 26 | 0x1681...0x180D, | ||
| 27 | 0x180F...0x1FFF, | ||
| 28 | |||
| 29 | // 3 | ||
| 30 | 0x200B...0x200D, | ||
| 31 | 0x202A...0x202E, | ||
| 32 | 0x203F...0x2040, | ||
| 33 | 0x2054, | ||
| 34 | 0x2060...0x206F, | ||
| 35 | |||
| 36 | // 4 | ||
| 37 | 0x2070...0x218F, | ||
| 38 | 0x2460...0x24FF, | ||
| 39 | 0x2776...0x2793, | ||
| 40 | 0x2C00...0x2DFF, | ||
| 41 | 0x2E80...0x2FFF, | ||
| 42 | |||
| 43 | // 5 | ||
| 44 | 0x3004...0x3007, | ||
| 45 | 0x3021...0x302F, | ||
| 46 | 0x3031...0x303F, | ||
| 47 | |||
| 48 | // 6 | ||
| 49 | 0x3040...0xD7FF, | ||
| 50 | |||
| 51 | // 7 | ||
| 52 | 0xF900...0xFD3D, | ||
| 53 | 0xFD40...0xFDCF, | ||
| 54 | 0xFDF0...0xFE44, | ||
| 55 | 0xFE47...0xFFFD, | ||
| 56 | |||
| 57 | // 8 | ||
| 58 | 0x10000...0x1FFFD, | ||
| 59 | 0x20000...0x2FFFD, | ||
| 60 | 0x30000...0x3FFFD, | ||
| 61 | 0x40000...0x4FFFD, | ||
| 62 | 0x50000...0x5FFFD, | ||
| 63 | 0x60000...0x6FFFD, | ||
| 64 | 0x70000...0x7FFFD, | ||
| 65 | 0x80000...0x8FFFD, | ||
| 66 | 0x90000...0x9FFFD, | ||
| 67 | 0xA0000...0xAFFFD, | ||
| 68 | 0xB0000...0xBFFFD, | ||
| 69 | 0xC0000...0xCFFFD, | ||
| 70 | 0xD0000...0xDFFFD, | ||
| 71 | 0xE0000...0xEFFFD, | ||
| 72 | => true, | ||
| 73 | else => false, | ||
| 74 | }; | ||
| 75 | } | ||
| 76 | |||
| 77 | /// C99 Standard Annex D | ||
| 78 | pub fn isC99IdChar(codepoint: u21) bool { | ||
| 79 | assert(codepoint > 0x7F); | ||
| 80 | return switch (codepoint) { | ||
| 81 | // Latin | ||
| 82 | 0x00AA, | ||
| 83 | 0x00BA, | ||
| 84 | 0x00C0...0x00D6, | ||
| 85 | 0x00D8...0x00F6, | ||
| 86 | 0x00F8...0x01F5, | ||
| 87 | 0x01FA...0x0217, | ||
| 88 | 0x0250...0x02A8, | ||
| 89 | 0x1E00...0x1E9B, | ||
| 90 | 0x1EA0...0x1EF9, | ||
| 91 | 0x207F, | ||
| 92 | |||
| 93 | // Greek | ||
| 94 | 0x0386, | ||
| 95 | 0x0388...0x038A, | ||
| 96 | 0x038C, | ||
| 97 | 0x038E...0x03A1, | ||
| 98 | 0x03A3...0x03CE, | ||
| 99 | 0x03D0...0x03D6, | ||
| 100 | 0x03DA, | ||
| 101 | 0x03DC, | ||
| 102 | 0x03DE, | ||
| 103 | 0x03E0, | ||
| 104 | 0x03E2...0x03F3, | ||
| 105 | 0x1F00...0x1F15, | ||
| 106 | 0x1F18...0x1F1D, | ||
| 107 | 0x1F20...0x1F45, | ||
| 108 | 0x1F48...0x1F4D, | ||
| 109 | 0x1F50...0x1F57, | ||
| 110 | 0x1F59, | ||
| 111 | 0x1F5B, | ||
| 112 | 0x1F5D, | ||
| 113 | 0x1F5F...0x1F7D, | ||
| 114 | 0x1F80...0x1FB4, | ||
| 115 | 0x1FB6...0x1FBC, | ||
| 116 | 0x1FC2...0x1FC4, | ||
| 117 | 0x1FC6...0x1FCC, | ||
| 118 | 0x1FD0...0x1FD3, | ||
| 119 | 0x1FD6...0x1FDB, | ||
| 120 | 0x1FE0...0x1FEC, | ||
| 121 | 0x1FF2...0x1FF4, | ||
| 122 | 0x1FF6...0x1FFC, | ||
| 123 | |||
| 124 | // Cyrillic | ||
| 125 | 0x0401...0x040C, | ||
| 126 | 0x040E...0x044F, | ||
| 127 | 0x0451...0x045C, | ||
| 128 | 0x045E...0x0481, | ||
| 129 | 0x0490...0x04C4, | ||
| 130 | 0x04C7...0x04C8, | ||
| 131 | 0x04CB...0x04CC, | ||
| 132 | 0x04D0...0x04EB, | ||
| 133 | 0x04EE...0x04F5, | ||
| 134 | 0x04F8...0x04F9, | ||
| 135 | |||
| 136 | // Armenian | ||
| 137 | 0x0531...0x0556, | ||
| 138 | 0x0561...0x0587, | ||
| 139 | |||
| 140 | // Hebrew | ||
| 141 | 0x05B0...0x05B9, | ||
| 142 | 0x05BB...0x05BD, | ||
| 143 | 0x05BF, | ||
| 144 | 0x05C1...0x05C2, | ||
| 145 | 0x05D0...0x05EA, | ||
| 146 | 0x05F0...0x05F2, | ||
| 147 | |||
| 148 | // Arabic | ||
| 149 | 0x0621...0x063A, | ||
| 150 | 0x0640...0x0652, | ||
| 151 | 0x0670...0x06B7, | ||
| 152 | 0x06BA...0x06BE, | ||
| 153 | 0x06C0...0x06CE, | ||
| 154 | 0x06D0...0x06DC, | ||
| 155 | 0x06E5...0x06E8, | ||
| 156 | 0x06EA...0x06ED, | ||
| 157 | |||
| 158 | // Devanagari | ||
| 159 | 0x0901...0x0903, | ||
| 160 | 0x0905...0x0939, | ||
| 161 | 0x093E...0x094D, | ||
| 162 | 0x0950...0x0952, | ||
| 163 | 0x0958...0x0963, | ||
| 164 | |||
| 165 | // Bengali | ||
| 166 | 0x0981...0x0983, | ||
| 167 | 0x0985...0x098C, | ||
| 168 | 0x098F...0x0990, | ||
| 169 | 0x0993...0x09A8, | ||
| 170 | 0x09AA...0x09B0, | ||
| 171 | 0x09B2, | ||
| 172 | 0x09B6...0x09B9, | ||
| 173 | 0x09BE...0x09C4, | ||
| 174 | 0x09C7...0x09C8, | ||
| 175 | 0x09CB...0x09CD, | ||
| 176 | 0x09DC...0x09DD, | ||
| 177 | 0x09DF...0x09E3, | ||
| 178 | 0x09F0...0x09F1, | ||
| 179 | |||
| 180 | // Gurmukhi | ||
| 181 | 0x0A02, | ||
| 182 | 0x0A05...0x0A0A, | ||
| 183 | 0x0A0F...0x0A10, | ||
| 184 | 0x0A13...0x0A28, | ||
| 185 | 0x0A2A...0x0A30, | ||
| 186 | 0x0A32...0x0A33, | ||
| 187 | 0x0A35...0x0A36, | ||
| 188 | 0x0A38...0x0A39, | ||
| 189 | 0x0A3E...0x0A42, | ||
| 190 | 0x0A47...0x0A48, | ||
| 191 | 0x0A4B...0x0A4D, | ||
| 192 | 0x0A59...0x0A5C, | ||
| 193 | 0x0A5E, | ||
| 194 | 0x0A74, | ||
| 195 | |||
| 196 | // Gujarati | ||
| 197 | 0x0A81...0x0A83, | ||
| 198 | 0x0A85...0x0A8B, | ||
| 199 | 0x0A8D, | ||
| 200 | 0x0A8F...0x0A91, | ||
| 201 | 0x0A93...0x0AA8, | ||
| 202 | 0x0AAA...0x0AB0, | ||
| 203 | 0x0AB2...0x0AB3, | ||
| 204 | 0x0AB5...0x0AB9, | ||
| 205 | 0x0ABD...0x0AC5, | ||
| 206 | 0x0AC7...0x0AC9, | ||
| 207 | 0x0ACB...0x0ACD, | ||
| 208 | 0x0AD0, | ||
| 209 | 0x0AE0, | ||
| 210 | |||
| 211 | // Oriya | ||
| 212 | 0x0B01...0x0B03, | ||
| 213 | 0x0B05...0x0B0C, | ||
| 214 | 0x0B0F...0x0B10, | ||
| 215 | 0x0B13...0x0B28, | ||
| 216 | 0x0B2A...0x0B30, | ||
| 217 | 0x0B32...0x0B33, | ||
| 218 | 0x0B36...0x0B39, | ||
| 219 | 0x0B3E...0x0B43, | ||
| 220 | 0x0B47...0x0B48, | ||
| 221 | 0x0B4B...0x0B4D, | ||
| 222 | 0x0B5C...0x0B5D, | ||
| 223 | 0x0B5F...0x0B61, | ||
| 224 | |||
| 225 | // Tamil | ||
| 226 | 0x0B82...0x0B83, | ||
| 227 | 0x0B85...0x0B8A, | ||
| 228 | 0x0B8E...0x0B90, | ||
| 229 | 0x0B92...0x0B95, | ||
| 230 | 0x0B99...0x0B9A, | ||
| 231 | 0x0B9C, | ||
| 232 | 0x0B9E...0x0B9F, | ||
| 233 | 0x0BA3...0x0BA4, | ||
| 234 | 0x0BA8...0x0BAA, | ||
| 235 | 0x0BAE...0x0BB5, | ||
| 236 | 0x0BB7...0x0BB9, | ||
| 237 | 0x0BBE...0x0BC2, | ||
| 238 | 0x0BC6...0x0BC8, | ||
| 239 | 0x0BCA...0x0BCD, | ||
| 240 | |||
| 241 | // Telugu | ||
| 242 | 0x0C01...0x0C03, | ||
| 243 | 0x0C05...0x0C0C, | ||
| 244 | 0x0C0E...0x0C10, | ||
| 245 | 0x0C12...0x0C28, | ||
| 246 | 0x0C2A...0x0C33, | ||
| 247 | 0x0C35...0x0C39, | ||
| 248 | 0x0C3E...0x0C44, | ||
| 249 | 0x0C46...0x0C48, | ||
| 250 | 0x0C4A...0x0C4D, | ||
| 251 | 0x0C60...0x0C61, | ||
| 252 | |||
| 253 | // Kannada | ||
| 254 | 0x0C82...0x0C83, | ||
| 255 | 0x0C85...0x0C8C, | ||
| 256 | 0x0C8E...0x0C90, | ||
| 257 | 0x0C92...0x0CA8, | ||
| 258 | 0x0CAA...0x0CB3, | ||
| 259 | 0x0CB5...0x0CB9, | ||
| 260 | 0x0CBE...0x0CC4, | ||
| 261 | 0x0CC6...0x0CC8, | ||
| 262 | 0x0CCA...0x0CCD, | ||
| 263 | 0x0CDE, | ||
| 264 | 0x0CE0...0x0CE1, | ||
| 265 | |||
| 266 | // Malayalam | ||
| 267 | 0x0D02...0x0D03, | ||
| 268 | 0x0D05...0x0D0C, | ||
| 269 | 0x0D0E...0x0D10, | ||
| 270 | 0x0D12...0x0D28, | ||
| 271 | 0x0D2A...0x0D39, | ||
| 272 | 0x0D3E...0x0D43, | ||
| 273 | 0x0D46...0x0D48, | ||
| 274 | 0x0D4A...0x0D4D, | ||
| 275 | 0x0D60...0x0D61, | ||
| 276 | |||
| 277 | // Thai (excluding digits 0x0E50...0x0E59; originally 0x0E01...0x0E3A and 0x0E40...0x0E5B | ||
| 278 | 0x0E01...0x0E3A, | ||
| 279 | 0x0E40...0x0E4F, | ||
| 280 | 0x0E5A...0x0E5B, | ||
| 281 | |||
| 282 | // Lao | ||
| 283 | 0x0E81...0x0E82, | ||
| 284 | 0x0E84, | ||
| 285 | 0x0E87...0x0E88, | ||
| 286 | 0x0E8A, | ||
| 287 | 0x0E8D, | ||
| 288 | 0x0E94...0x0E97, | ||
| 289 | 0x0E99...0x0E9F, | ||
| 290 | 0x0EA1...0x0EA3, | ||
| 291 | 0x0EA5, | ||
| 292 | 0x0EA7, | ||
| 293 | 0x0EAA...0x0EAB, | ||
| 294 | 0x0EAD...0x0EAE, | ||
| 295 | 0x0EB0...0x0EB9, | ||
| 296 | 0x0EBB...0x0EBD, | ||
| 297 | 0x0EC0...0x0EC4, | ||
| 298 | 0x0EC6, | ||
| 299 | 0x0EC8...0x0ECD, | ||
| 300 | 0x0EDC...0x0EDD, | ||
| 301 | |||
| 302 | // Tibetan | ||
| 303 | 0x0F00, | ||
| 304 | 0x0F18...0x0F19, | ||
| 305 | 0x0F35, | ||
| 306 | 0x0F37, | ||
| 307 | 0x0F39, | ||
| 308 | 0x0F3E...0x0F47, | ||
| 309 | 0x0F49...0x0F69, | ||
| 310 | 0x0F71...0x0F84, | ||
| 311 | 0x0F86...0x0F8B, | ||
| 312 | 0x0F90...0x0F95, | ||
| 313 | 0x0F97, | ||
| 314 | 0x0F99...0x0FAD, | ||
| 315 | 0x0FB1...0x0FB7, | ||
| 316 | 0x0FB9, | ||
| 317 | |||
| 318 | // Georgian | ||
| 319 | 0x10A0...0x10C5, | ||
| 320 | 0x10D0...0x10F6, | ||
| 321 | |||
| 322 | // Hiragana | ||
| 323 | 0x3041...0x3093, | ||
| 324 | 0x309B...0x309C, | ||
| 325 | |||
| 326 | // Katakana | ||
| 327 | 0x30A1...0x30F6, | ||
| 328 | 0x30FB...0x30FC, | ||
| 329 | |||
| 330 | // Bopomofo | ||
| 331 | 0x3105...0x312C, | ||
| 332 | |||
| 333 | // CJK Unified Ideographs | ||
| 334 | 0x4E00...0x9FA5, | ||
| 335 | |||
| 336 | // Hangul | ||
| 337 | 0xAC00...0xD7A3, | ||
| 338 | |||
| 339 | // Digits | ||
| 340 | 0x0660...0x0669, | ||
| 341 | 0x06F0...0x06F9, | ||
| 342 | 0x0966...0x096F, | ||
| 343 | 0x09E6...0x09EF, | ||
| 344 | 0x0A66...0x0A6F, | ||
| 345 | 0x0AE6...0x0AEF, | ||
| 346 | 0x0B66...0x0B6F, | ||
| 347 | 0x0BE7...0x0BEF, | ||
| 348 | 0x0C66...0x0C6F, | ||
| 349 | 0x0CE6...0x0CEF, | ||
| 350 | 0x0D66...0x0D6F, | ||
| 351 | 0x0E50...0x0E59, | ||
| 352 | 0x0ED0...0x0ED9, | ||
| 353 | 0x0F20...0x0F33, | ||
| 354 | |||
| 355 | // Special characters | ||
| 356 | 0x00B5, | ||
| 357 | 0x00B7, | ||
| 358 | 0x02B0...0x02B8, | ||
| 359 | 0x02BB, | ||
| 360 | 0x02BD...0x02C1, | ||
| 361 | 0x02D0...0x02D1, | ||
| 362 | 0x02E0...0x02E4, | ||
| 363 | 0x037A, | ||
| 364 | 0x0559, | ||
| 365 | 0x093D, | ||
| 366 | 0x0B3D, | ||
| 367 | 0x1FBE, | ||
| 368 | 0x203F...0x2040, | ||
| 369 | 0x2102, | ||
| 370 | 0x2107, | ||
| 371 | 0x210A...0x2113, | ||
| 372 | 0x2115, | ||
| 373 | 0x2118...0x211D, | ||
| 374 | 0x2124, | ||
| 375 | 0x2126, | ||
| 376 | 0x2128, | ||
| 377 | 0x212A...0x2131, | ||
| 378 | 0x2133...0x2138, | ||
| 379 | 0x2160...0x2182, | ||
| 380 | 0x3005...0x3007, | ||
| 381 | 0x3021...0x3029, | ||
| 382 | => true, | ||
| 383 | else => false, | ||
| 384 | }; | ||
| 385 | } | ||
| 386 | |||
| 387 | /// C11 standard Annex D | ||
| 388 | pub fn isC11DisallowedInitialIdChar(codepoint: u21) bool { | ||
| 389 | assert(codepoint > 0x7F); | ||
| 390 | return switch (codepoint) { | ||
| 391 | 0x0300...0x036F, | ||
| 392 | 0x1DC0...0x1DFF, | ||
| 393 | 0x20D0...0x20FF, | ||
| 394 | 0xFE20...0xFE2F, | ||
| 395 | => true, | ||
| 396 | else => false, | ||
| 397 | }; | ||
| 398 | } | ||
| 399 | |||
| 400 | /// These are "digit" characters; C99 disallows them as the first | ||
| 401 | /// character of an identifier | ||
| 402 | pub fn isC99DisallowedInitialIDChar(codepoint: u21) bool { | ||
| 403 | assert(codepoint > 0x7F); | ||
| 404 | return switch (codepoint) { | ||
| 405 | 0x0660...0x0669, | ||
| 406 | 0x06F0...0x06F9, | ||
| 407 | 0x0966...0x096F, | ||
| 408 | 0x09E6...0x09EF, | ||
| 409 | 0x0A66...0x0A6F, | ||
| 410 | 0x0AE6...0x0AEF, | ||
| 411 | 0x0B66...0x0B6F, | ||
| 412 | 0x0BE7...0x0BEF, | ||
| 413 | 0x0C66...0x0C6F, | ||
| 414 | 0x0CE6...0x0CEF, | ||
| 415 | 0x0D66...0x0D6F, | ||
| 416 | 0x0E50...0x0E59, | ||
| 417 | 0x0ED0...0x0ED9, | ||
| 418 | 0x0F20...0x0F33, | ||
| 419 | => true, | ||
| 420 | else => false, | ||
| 421 | }; | ||
| 422 | } | ||
| 423 | |||
| 424 | pub fn isInvisible(codepoint: u21) bool { | ||
| 425 | assert(codepoint > 0x7F); | ||
| 426 | return switch (codepoint) { | ||
| 427 | 0x00ad, // SOFT HYPHEN | ||
| 428 | 0x200b, // ZERO WIDTH SPACE | ||
| 429 | 0x200c, // ZERO WIDTH NON-JOINER | ||
| 430 | 0x200d, // ZERO WIDTH JOINER | ||
| 431 | 0x2060, // WORD JOINER | ||
| 432 | 0x2061, // FUNCTION APPLICATION | ||
| 433 | 0x2062, // INVISIBLE TIMES | ||
| 434 | 0x2063, // INVISIBLE SEPARATOR | ||
| 435 | 0x2064, // INVISIBLE PLUS | ||
| 436 | 0xfeff, // ZERO WIDTH NO-BREAK SPACE | ||
| 437 | => true, | ||
| 438 | else => false, | ||
| 439 | }; | ||
| 440 | } | ||
| 441 | |||
| 442 | /// Checks for identifier characters which resemble non-identifier characters | ||
| 443 | pub fn homoglyph(codepoint: u21) ?u21 { | ||
| 444 | assert(codepoint > 0x7F); | ||
| 445 | return switch (codepoint) { | ||
| 446 | 0x01c3 => '!', // LATIN LETTER RETROFLEX CLICK | ||
| 447 | 0x037e => ';', // GREEK QUESTION MARK | ||
| 448 | 0x2212 => '-', // MINUS SIGN | ||
| 449 | 0x2215 => '/', // DIVISION SLASH | ||
| 450 | 0x2216 => '\\', // SET MINUS | ||
| 451 | 0x2217 => '*', // ASTERISK OPERATOR | ||
| 452 | 0x2223 => '|', // DIVIDES | ||
| 453 | 0x2227 => '^', // LOGICAL AND | ||
| 454 | 0x2236 => ':', // RATIO | ||
| 455 | 0x223c => '~', // TILDE OPERATOR | ||
| 456 | 0xa789 => ':', // MODIFIER LETTER COLON | ||
| 457 | 0xff01 => '!', // FULLWIDTH EXCLAMATION MARK | ||
| 458 | 0xff03 => '#', // FULLWIDTH NUMBER SIGN | ||
| 459 | 0xff04 => '$', // FULLWIDTH DOLLAR SIGN | ||
| 460 | 0xff05 => '%', // FULLWIDTH PERCENT SIGN | ||
| 461 | 0xff06 => '&', // FULLWIDTH AMPERSAND | ||
| 462 | 0xff08 => '(', // FULLWIDTH LEFT PARENTHESIS | ||
| 463 | 0xff09 => ')', // FULLWIDTH RIGHT PARENTHESIS | ||
| 464 | 0xff0a => '*', // FULLWIDTH ASTERISK | ||
| 465 | 0xff0b => '+', // FULLWIDTH ASTERISK | ||
| 466 | 0xff0c => ',', // FULLWIDTH COMMA | ||
| 467 | 0xff0d => '-', // FULLWIDTH HYPHEN-MINUS | ||
| 468 | 0xff0e => '.', // FULLWIDTH FULL STOP | ||
| 469 | 0xff0f => '/', // FULLWIDTH SOLIDUS | ||
| 470 | 0xff1a => ':', // FULLWIDTH COLON | ||
| 471 | 0xff1b => ';', // FULLWIDTH SEMICOLON | ||
| 472 | 0xff1c => '<', // FULLWIDTH LESS-THAN SIGN | ||
| 473 | 0xff1d => '=', // FULLWIDTH EQUALS SIGN | ||
| 474 | 0xff1e => '>', // FULLWIDTH GREATER-THAN SIGN | ||
| 475 | 0xff1f => '?', // FULLWIDTH QUESTION MARK | ||
| 476 | 0xff20 => '@', // FULLWIDTH COMMERCIAL AT | ||
| 477 | 0xff3b => '[', // FULLWIDTH LEFT SQUARE BRACKET | ||
| 478 | 0xff3c => '\\', // FULLWIDTH REVERSE SOLIDUS | ||
| 479 | 0xff3d => ']', // FULLWIDTH RIGHT SQUARE BRACKET | ||
| 480 | 0xff3e => '^', // FULLWIDTH CIRCUMFLEX ACCENT | ||
| 481 | 0xff5b => '{', // FULLWIDTH LEFT CURLY BRACKET | ||
| 482 | 0xff5c => '|', // FULLWIDTH VERTICAL LINE | ||
| 483 | 0xff5d => '}', // FULLWIDTH RIGHT CURLY BRACKET | ||
| 484 | 0xff5e => '~', // FULLWIDTH TILDE | ||
| 485 | else => null, | ||
| 486 | }; | ||
| 487 | } | ||
deps/aro/CharLiteral.zig deleted-298| ... | @@ -1,298 +0,0 @@ | ||
| 1 | const std = @import("std"); | ||
| 2 | const Compilation = @import("Compilation.zig"); | ||
| 3 | const Type = @import("Type.zig"); | ||
| 4 | const Diagnostics = @import("Diagnostics.zig"); | ||
| 5 | const Tokenizer = @import("Tokenizer.zig"); | ||
| 6 | const mem = std.mem; | ||
| 7 | |||
| 8 | pub const Item = union(enum) { | ||
| 9 | /// decoded escape | ||
| 10 | value: u32, | ||
| 11 | /// Char literal in the source text is not utf8 encoded | ||
| 12 | improperly_encoded: []const u8, | ||
| 13 | /// 1 or more unescaped bytes | ||
| 14 | utf8_text: std.unicode.Utf8View, | ||
| 15 | }; | ||
| 16 | |||
| 17 | const CharDiagnostic = struct { | ||
| 18 | tag: Diagnostics.Tag, | ||
| 19 | extra: Diagnostics.Message.Extra, | ||
| 20 | }; | ||
| 21 | |||
| 22 | pub const Kind = enum { | ||
| 23 | char, | ||
| 24 | wide, | ||
| 25 | utf_8, | ||
| 26 | utf_16, | ||
| 27 | utf_32, | ||
| 28 | |||
| 29 | pub fn classify(id: Tokenizer.Token.Id) Kind { | ||
| 30 | return switch (id) { | ||
| 31 | .char_literal, | ||
| 32 | .string_literal, | ||
| 33 | => .char, | ||
| 34 | .char_literal_utf_8, | ||
| 35 | .string_literal_utf_8, | ||
| 36 | => .utf_8, | ||
| 37 | .char_literal_wide, | ||
| 38 | .string_literal_wide, | ||
| 39 | => .wide, | ||
| 40 | .char_literal_utf_16, | ||
| 41 | .string_literal_utf_16, | ||
| 42 | => .utf_16, | ||
| 43 | .char_literal_utf_32, | ||
| 44 | .string_literal_utf_32, | ||
| 45 | => .utf_32, | ||
| 46 | else => unreachable, | ||
| 47 | }; | ||
| 48 | } | ||
| 49 | |||
| 50 | /// Largest unicode codepoint that can be represented by this character kind | ||
| 51 | /// May be smaller than the largest value that can be represented. | ||
| 52 | /// For example u8 char literals may only specify 0-127 via literals or | ||
| 53 | /// character escapes, but may specify up to \xFF via hex escapes. | ||
| 54 | pub fn maxCodepoint(kind: Kind, comp: *const Compilation) u21 { | ||
| 55 | return @intCast(switch (kind) { | ||
| 56 | .char => std.math.maxInt(u7), | ||
| 57 | .wide => @min(0x10FFFF, comp.types.wchar.maxInt(comp)), | ||
| 58 | .utf_8 => std.math.maxInt(u7), | ||
| 59 | .utf_16 => std.math.maxInt(u16), | ||
| 60 | .utf_32 => 0x10FFFF, | ||
| 61 | }); | ||
| 62 | } | ||
| 63 | |||
| 64 | /// Largest integer that can be represented by this character kind | ||
| 65 | pub fn maxInt(kind: Kind, comp: *const Compilation) u32 { | ||
| 66 | return @intCast(switch (kind) { | ||
| 67 | .char, .utf_8 => std.math.maxInt(u8), | ||
| 68 | .wide => comp.types.wchar.maxInt(comp), | ||
| 69 | .utf_16 => std.math.maxInt(u16), | ||
| 70 | .utf_32 => std.math.maxInt(u32), | ||
| 71 | }); | ||
| 72 | } | ||
| 73 | |||
| 74 | pub fn charLiteralType(kind: Kind, comp: *const Compilation) Type { | ||
| 75 | return switch (kind) { | ||
| 76 | .char => Type.int, | ||
| 77 | .wide => comp.types.wchar, | ||
| 78 | .utf_8 => .{ .specifier = .uchar }, | ||
| 79 | .utf_16 => comp.types.uint_least16_t, | ||
| 80 | .utf_32 => comp.types.uint_least32_t, | ||
| 81 | }; | ||
| 82 | } | ||
| 83 | |||
| 84 | /// Return the actual contents of the string literal with leading / trailing quotes and | ||
| 85 | /// specifiers removed | ||
| 86 | pub fn contentSlice(kind: Kind, delimited: []const u8) []const u8 { | ||
| 87 | const end = delimited.len - 1; // remove trailing quote | ||
| 88 | return switch (kind) { | ||
| 89 | .char => delimited[1..end], | ||
| 90 | .wide => delimited[2..end], | ||
| 91 | .utf_8 => delimited[3..end], | ||
| 92 | .utf_16 => delimited[2..end], | ||
| 93 | .utf_32 => delimited[2..end], | ||
| 94 | }; | ||
| 95 | } | ||
| 96 | }; | ||
| 97 | |||
| 98 | pub const Parser = struct { | ||
| 99 | literal: []const u8, | ||
| 100 | i: usize = 0, | ||
| 101 | kind: Kind, | ||
| 102 | /// We only want to issue a max of 1 error per char literal | ||
| 103 | errored: bool = false, | ||
| 104 | errors: std.BoundedArray(CharDiagnostic, 4) = .{}, | ||
| 105 | comp: *const Compilation, | ||
| 106 | |||
| 107 | pub fn init(literal: []const u8, kind: Kind, comp: *const Compilation) Parser { | ||
| 108 | return .{ | ||
| 109 | .literal = literal, | ||
| 110 | .comp = comp, | ||
| 111 | .kind = kind, | ||
| 112 | }; | ||
| 113 | } | ||
| 114 | |||
| 115 | pub fn err(self: *Parser, tag: Diagnostics.Tag, extra: Diagnostics.Message.Extra) void { | ||
| 116 | if (self.errored) return; | ||
| 117 | self.errored = true; | ||
| 118 | self.errors.append(.{ .tag = tag, .extra = extra }) catch {}; | ||
| 119 | } | ||
| 120 | |||
| 121 | pub fn warn(self: *Parser, tag: Diagnostics.Tag, extra: Diagnostics.Message.Extra) void { | ||
| 122 | if (self.errored) return; | ||
| 123 | self.errors.append(.{ .tag = tag, .extra = extra }) catch {}; | ||
| 124 | } | ||
| 125 | |||
| 126 | pub fn next(self: *Parser) ?Item { | ||
| 127 | if (self.i >= self.literal.len) return null; | ||
| 128 | |||
| 129 | const start = self.i; | ||
| 130 | if (self.literal[start] != '\\') { | ||
| 131 | self.i = mem.indexOfScalarPos(u8, self.literal, start + 1, '\\') orelse self.literal.len; | ||
| 132 | const unescaped_slice = self.literal[start..self.i]; | ||
| 133 | |||
| 134 | const view = std.unicode.Utf8View.init(unescaped_slice) catch { | ||
| 135 | if (self.kind != .char) { | ||
| 136 | self.err(.illegal_char_encoding_error, .{ .none = {} }); | ||
| 137 | } else { | ||
| 138 | self.warn(.illegal_char_encoding_warning, .{ .none = {} }); | ||
| 139 | } | ||
| 140 | return .{ .improperly_encoded = self.literal[start..self.i] }; | ||
| 141 | }; | ||
| 142 | return .{ .utf8_text = view }; | ||
| 143 | } | ||
| 144 | switch (self.literal[start + 1]) { | ||
| 145 | 'u', 'U' => return self.parseUnicodeEscape(), | ||
| 146 | else => return self.parseEscapedChar(), | ||
| 147 | } | ||
| 148 | } | ||
| 149 | |||
| 150 | fn parseUnicodeEscape(self: *Parser) ?Item { | ||
| 151 | const start = self.i; | ||
| 152 | |||
| 153 | std.debug.assert(self.literal[self.i] == '\\'); | ||
| 154 | |||
| 155 | const kind = self.literal[self.i + 1]; | ||
| 156 | std.debug.assert(kind == 'u' or kind == 'U'); | ||
| 157 | |||
| 158 | self.i += 2; | ||
| 159 | if (self.i >= self.literal.len or !std.ascii.isHex(self.literal[self.i])) { | ||
| 160 | self.err(.missing_hex_escape, .{ .ascii = @intCast(kind) }); | ||
| 161 | return null; | ||
| 162 | } | ||
| 163 | const expected_len: usize = if (kind == 'u') 4 else 8; | ||
| 164 | var overflowed = false; | ||
| 165 | var count: usize = 0; | ||
| 166 | var val: u32 = 0; | ||
| 167 | |||
| 168 | for (self.literal[self.i..], 0..) |c, i| { | ||
| 169 | if (i == expected_len) break; | ||
| 170 | |||
| 171 | const char = std.fmt.charToDigit(c, 16) catch { | ||
| 172 | break; | ||
| 173 | }; | ||
| 174 | |||
| 175 | val, const overflow = @shlWithOverflow(val, 4); | ||
| 176 | overflowed = overflowed or overflow != 0; | ||
| 177 | val |= char; | ||
| 178 | count += 1; | ||
| 179 | } | ||
| 180 | self.i += expected_len; | ||
| 181 | |||
| 182 | if (overflowed) { | ||
| 183 | self.err(.escape_sequence_overflow, .{ .unsigned = start }); | ||
| 184 | return null; | ||
| 185 | } | ||
| 186 | |||
| 187 | if (count != expected_len) { | ||
| 188 | self.err(.incomplete_universal_character, .{ .none = {} }); | ||
| 189 | return null; | ||
| 190 | } | ||
| 191 | |||
| 192 | if (val > std.math.maxInt(u21) or !std.unicode.utf8ValidCodepoint(@intCast(val))) { | ||
| 193 | self.err(.invalid_universal_character, .{ .unsigned = start }); | ||
| 194 | return null; | ||
| 195 | } | ||
| 196 | |||
| 197 | if (val > self.kind.maxCodepoint(self.comp)) { | ||
| 198 | self.err(.char_too_large, .{ .none = {} }); | ||
| 199 | } | ||
| 200 | |||
| 201 | if (val < 0xA0 and (val != '$' and val != '@' and val != '`')) { | ||
| 202 | const is_error = !self.comp.langopts.standard.atLeast(.c2x); | ||
| 203 | if (val >= 0x20 and val <= 0x7F) { | ||
| 204 | if (is_error) { | ||
| 205 | self.err(.ucn_basic_char_error, .{ .ascii = @intCast(val) }); | ||
| 206 | } else { | ||
| 207 | self.warn(.ucn_basic_char_warning, .{ .ascii = @intCast(val) }); | ||
| 208 | } | ||
| 209 | } else { | ||
| 210 | if (is_error) { | ||
| 211 | self.err(.ucn_control_char_error, .{ .none = {} }); | ||
| 212 | } else { | ||
| 213 | self.warn(.ucn_control_char_warning, .{ .none = {} }); | ||
| 214 | } | ||
| 215 | } | ||
| 216 | } | ||
| 217 | |||
| 218 | self.warn(.c89_ucn_in_literal, .{ .none = {} }); | ||
| 219 | return .{ .value = val }; | ||
| 220 | } | ||
| 221 | |||
| 222 | fn parseEscapedChar(self: *Parser) Item { | ||
| 223 | self.i += 1; | ||
| 224 | const c = self.literal[self.i]; | ||
| 225 | defer if (c != 'x' and (c < '0' or c > '7')) { | ||
| 226 | self.i += 1; | ||
| 227 | }; | ||
| 228 | |||
| 229 | switch (c) { | ||
| 230 | '\n' => unreachable, // removed by line splicing | ||
| 231 | '\r' => unreachable, // removed by line splicing | ||
| 232 | '\'', '\"', '\\', '?' => return .{ .value = c }, | ||
| 233 | 'n' => return .{ .value = '\n' }, | ||
| 234 | 'r' => return .{ .value = '\r' }, | ||
| 235 | 't' => return .{ .value = '\t' }, | ||
| 236 | 'a' => return .{ .value = 0x07 }, | ||
| 237 | 'b' => return .{ .value = 0x08 }, | ||
| 238 | 'e', 'E' => { | ||
| 239 | self.warn(.non_standard_escape_char, .{ .invalid_escape = .{ .char = c, .offset = @intCast(self.i) } }); | ||
| 240 | return .{ .value = 0x1B }; | ||
| 241 | }, | ||
| 242 | '(', '{', '[', '%' => { | ||
| 243 | self.warn(.non_standard_escape_char, .{ .invalid_escape = .{ .char = c, .offset = @intCast(self.i) } }); | ||
| 244 | return .{ .value = c }; | ||
| 245 | }, | ||
| 246 | 'f' => return .{ .value = 0x0C }, | ||
| 247 | 'v' => return .{ .value = 0x0B }, | ||
| 248 | 'x' => return .{ .value = self.parseNumberEscape(.hex) }, | ||
| 249 | '0'...'7' => return .{ .value = self.parseNumberEscape(.octal) }, | ||
| 250 | 'u', 'U' => unreachable, // handled by parseUnicodeEscape | ||
| 251 | else => { | ||
| 252 | self.warn(.unknown_escape_sequence, .{ .invalid_escape = .{ .char = c, .offset = @intCast(self.i) } }); | ||
| 253 | return .{ .value = c }; | ||
| 254 | }, | ||
| 255 | } | ||
| 256 | } | ||
| 257 | |||
| 258 | fn parseNumberEscape(self: *Parser, base: EscapeBase) u32 { | ||
| 259 | var val: u32 = 0; | ||
| 260 | var count: usize = 0; | ||
| 261 | var overflowed = false; | ||
| 262 | defer self.i += count; | ||
| 263 | const slice = switch (base) { | ||
| 264 | .octal => self.literal[self.i..@min(self.literal.len, self.i + 3)], // max 3 chars | ||
| 265 | .hex => blk: { | ||
| 266 | self.i += 1; | ||
| 267 | break :blk self.literal[self.i..]; // skip over 'x'; could have an arbitrary number of chars | ||
| 268 | }, | ||
| 269 | }; | ||
| 270 | for (slice) |c| { | ||
| 271 | const char = std.fmt.charToDigit(c, @intFromEnum(base)) catch break; | ||
| 272 | val, const overflow = @shlWithOverflow(val, base.log2()); | ||
| 273 | if (overflow != 0) overflowed = true; | ||
| 274 | val += char; | ||
| 275 | count += 1; | ||
| 276 | } | ||
| 277 | if (overflowed or val > self.kind.maxInt(self.comp)) { | ||
| 278 | self.err(.escape_sequence_overflow, .{ .unsigned = 0 }); | ||
| 279 | } | ||
| 280 | if (count == 0) { | ||
| 281 | std.debug.assert(base == .hex); | ||
| 282 | self.err(.missing_hex_escape, .{ .ascii = 'x' }); | ||
| 283 | } | ||
| 284 | return val; | ||
| 285 | } | ||
| 286 | }; | ||
| 287 | |||
| 288 | const EscapeBase = enum(u8) { | ||
| 289 | octal = 8, | ||
| 290 | hex = 16, | ||
| 291 | |||
| 292 | fn log2(base: EscapeBase) u4 { | ||
| 293 | return switch (base) { | ||
| 294 | .octal => 3, | ||
| 295 | .hex => 4, | ||
| 296 | }; | ||
| 297 | } | ||
| 298 | }; | ||
deps/aro/CodeGen.zig deleted-1292| ... | @@ -1,1292 +0,0 @@ | ||
| 1 | const std = @import("std"); | ||
| 2 | const Allocator = std.mem.Allocator; | ||
| 3 | const assert = std.debug.assert; | ||
| 4 | const Builtins = @import("Builtins.zig"); | ||
| 5 | const Builtin = Builtins.Builtin; | ||
| 6 | const Compilation = @import("Compilation.zig"); | ||
| 7 | const Interner = @import("Interner.zig"); | ||
| 8 | const Ir = @import("Ir.zig"); | ||
| 9 | const Builder = Ir.Builder; | ||
| 10 | const StringId = @import("StringInterner.zig").StringId; | ||
| 11 | const Tree = @import("Tree.zig"); | ||
| 12 | const NodeIndex = Tree.NodeIndex; | ||
| 13 | const Type = @import("Type.zig"); | ||
| 14 | const Value = @import("Value.zig"); | ||
| 15 | |||
| 16 | const CodeGen = @This(); | ||
| 17 | |||
| 18 | const WipSwitch = struct { | ||
| 19 | cases: Cases = .{}, | ||
| 20 | default: ?Ir.Ref = null, | ||
| 21 | size: u64, | ||
| 22 | |||
| 23 | const Cases = std.MultiArrayList(struct { | ||
| 24 | val: Interner.Ref, | ||
| 25 | label: Ir.Ref, | ||
| 26 | }); | ||
| 27 | }; | ||
| 28 | |||
| 29 | const Symbol = struct { | ||
| 30 | name: StringId, | ||
| 31 | val: Ir.Ref, | ||
| 32 | }; | ||
| 33 | |||
| 34 | const Error = Compilation.Error; | ||
| 35 | |||
| 36 | tree: Tree, | ||
| 37 | comp: *Compilation, | ||
| 38 | builder: Builder, | ||
| 39 | node_tag: []const Tree.Tag, | ||
| 40 | node_data: []const Tree.Node.Data, | ||
| 41 | node_ty: []const Type, | ||
| 42 | wip_switch: *WipSwitch = undefined, | ||
| 43 | symbols: std.ArrayListUnmanaged(Symbol) = .{}, | ||
| 44 | ret_nodes: std.ArrayListUnmanaged(Ir.Inst.Phi.Input) = .{}, | ||
| 45 | phi_nodes: std.ArrayListUnmanaged(Ir.Inst.Phi.Input) = .{}, | ||
| 46 | record_elem_buf: std.ArrayListUnmanaged(Interner.Ref) = .{}, | ||
| 47 | cond_dummy_ty: ?Interner.Ref = null, | ||
| 48 | bool_invert: bool = false, | ||
| 49 | bool_end_label: Ir.Ref = .none, | ||
| 50 | cond_dummy_ref: Ir.Ref = undefined, | ||
| 51 | continue_label: Ir.Ref = undefined, | ||
| 52 | break_label: Ir.Ref = undefined, | ||
| 53 | return_label: Ir.Ref = undefined, | ||
| 54 | |||
| 55 | pub fn generateTree(comp: *Compilation, tree: Tree) Compilation.Error!void { | ||
| 56 | var c = CodeGen{ | ||
| 57 | .builder = .{ | ||
| 58 | .gpa = comp.gpa, | ||
| 59 | .arena = std.heap.ArenaAllocator.init(comp.gpa), | ||
| 60 | }, | ||
| 61 | .tree = tree, | ||
| 62 | .comp = comp, | ||
| 63 | .node_tag = tree.nodes.items(.tag), | ||
| 64 | .node_data = tree.nodes.items(.data), | ||
| 65 | .node_ty = tree.nodes.items(.ty), | ||
| 66 | }; | ||
| 67 | defer c.symbols.deinit(c.comp.gpa); | ||
| 68 | defer c.ret_nodes.deinit(c.comp.gpa); | ||
| 69 | defer c.phi_nodes.deinit(c.comp.gpa); | ||
| 70 | defer c.record_elem_buf.deinit(c.comp.gpa); | ||
| 71 | defer c.builder.deinit(); | ||
| 72 | |||
| 73 | const node_tags = tree.nodes.items(.tag); | ||
| 74 | for (tree.root_decls) |decl| { | ||
| 75 | c.builder.arena.deinit(); | ||
| 76 | c.builder.arena = std.heap.ArenaAllocator.init(comp.gpa); | ||
| 77 | |||
| 78 | switch (node_tags[@intFromEnum(decl)]) { | ||
| 79 | .static_assert, | ||
| 80 | .typedef, | ||
| 81 | .struct_decl_two, | ||
| 82 | .union_decl_two, | ||
| 83 | .enum_decl_two, | ||
| 84 | .struct_decl, | ||
| 85 | .union_decl, | ||
| 86 | .enum_decl, | ||
| 87 | => {}, | ||
| 88 | |||
| 89 | .fn_proto, | ||
| 90 | .static_fn_proto, | ||
| 91 | .inline_fn_proto, | ||
| 92 | .inline_static_fn_proto, | ||
| 93 | .extern_var, | ||
| 94 | .threadlocal_extern_var, | ||
| 95 | => {}, | ||
| 96 | |||
| 97 | .fn_def, | ||
| 98 | .static_fn_def, | ||
| 99 | .inline_fn_def, | ||
| 100 | .inline_static_fn_def, | ||
| 101 | => c.genFn(decl) catch |err| switch (err) { | ||
| 102 | error.FatalError => return error.FatalError, | ||
| 103 | error.OutOfMemory => return error.OutOfMemory, | ||
| 104 | }, | ||
| 105 | |||
| 106 | .@"var", | ||
| 107 | .static_var, | ||
| 108 | .threadlocal_var, | ||
| 109 | .threadlocal_static_var, | ||
| 110 | => c.genVar(decl) catch |err| switch (err) { | ||
| 111 | error.FatalError => return error.FatalError, | ||
| 112 | error.OutOfMemory => return error.OutOfMemory, | ||
| 113 | }, | ||
| 114 | else => unreachable, | ||
| 115 | } | ||
| 116 | } | ||
| 117 | } | ||
| 118 | |||
| 119 | fn genType(c: *CodeGen, base_ty: Type) !Interner.Ref { | ||
| 120 | var key: Interner.Key = undefined; | ||
| 121 | const ty = base_ty.canonicalize(.standard); | ||
| 122 | switch (ty.specifier) { | ||
| 123 | .void => return .void, | ||
| 124 | .bool => return .i1, | ||
| 125 | .@"struct" => { | ||
| 126 | key = .{ | ||
| 127 | .record = .{ | ||
| 128 | .user_ptr = ty.data.record, | ||
| 129 | .elements = undefined, // Not needed for hash lookup. | ||
| 130 | }, | ||
| 131 | }; | ||
| 132 | if (c.builder.pool.has(key)) |some| return some; | ||
| 133 | const elem_buf_top = c.record_elem_buf.items.len; | ||
| 134 | defer c.record_elem_buf.items.len = elem_buf_top; | ||
| 135 | |||
| 136 | for (ty.data.record.fields) |field| { | ||
| 137 | if (!field.isRegularField()) { | ||
| 138 | return c.comp.diag.fatalNoSrc("TODO lower struct bitfields", .{}); | ||
| 139 | } | ||
| 140 | // TODO handle padding bits | ||
| 141 | const field_ref = try c.genType(field.ty); | ||
| 142 | try c.record_elem_buf.append(c.builder.gpa, field_ref); | ||
| 143 | } | ||
| 144 | |||
| 145 | key.record.elements = try c.builder.arena.allocator().dupe(Interner.Ref, c.record_elem_buf.items[elem_buf_top..]); | ||
| 146 | return c.builder.pool.put(c.builder.gpa, key); | ||
| 147 | }, | ||
| 148 | .@"union" => { | ||
| 149 | return c.comp.diag.fatalNoSrc("TODO lower union types", .{}); | ||
| 150 | }, | ||
| 151 | else => {}, | ||
| 152 | } | ||
| 153 | if (ty.isPtr()) return .ptr; | ||
| 154 | if (ty.isFunc()) return .func; | ||
| 155 | if (!ty.isReal()) return c.comp.diag.fatalNoSrc("TODO lower complex types", .{}); | ||
| 156 | if (ty.isInt()) { | ||
| 157 | const bits = ty.bitSizeof(c.comp).?; | ||
| 158 | key = .{ .int = @intCast(bits) }; | ||
| 159 | } else if (ty.isFloat()) { | ||
| 160 | const bits = ty.bitSizeof(c.comp).?; | ||
| 161 | key = .{ .float = @intCast(bits) }; | ||
| 162 | } else if (ty.isArray()) { | ||
| 163 | const elem = try c.genType(ty.elemType()); | ||
| 164 | key = .{ .array = .{ .child = elem, .len = ty.arrayLen().? } }; | ||
| 165 | } else if (ty.specifier == .vector) { | ||
| 166 | const elem = try c.genType(ty.elemType()); | ||
| 167 | key = .{ .vector = .{ .child = elem, .len = @intCast(ty.data.array.len) } }; | ||
| 168 | } else if (ty.is(.nullptr_t)) { | ||
| 169 | return c.comp.diag.fatalNoSrc("TODO lower nullptr_t", .{}); | ||
| 170 | } | ||
| 171 | return c.builder.pool.put(c.builder.gpa, key); | ||
| 172 | } | ||
| 173 | |||
| 174 | fn genFn(c: *CodeGen, decl: NodeIndex) Error!void { | ||
| 175 | const name = c.tree.tokSlice(c.node_data[@intFromEnum(decl)].decl.name); | ||
| 176 | const func_ty = c.node_ty[@intFromEnum(decl)].canonicalize(.standard); | ||
| 177 | c.ret_nodes.items.len = 0; | ||
| 178 | |||
| 179 | try c.builder.startFn(); | ||
| 180 | |||
| 181 | for (func_ty.data.func.params) |param| { | ||
| 182 | // TODO handle calling convention here | ||
| 183 | const arg = try c.builder.addArg(try c.genType(param.ty)); | ||
| 184 | |||
| 185 | const size: u32 = @intCast(param.ty.sizeof(c.comp).?); // TODO add error in parser | ||
| 186 | const @"align" = param.ty.alignof(c.comp); | ||
| 187 | const alloc = try c.builder.addAlloc(size, @"align"); | ||
| 188 | try c.builder.addStore(alloc, arg); | ||
| 189 | try c.symbols.append(c.comp.gpa, .{ .name = param.name, .val = alloc }); | ||
| 190 | } | ||
| 191 | |||
| 192 | // Generate body | ||
| 193 | c.return_label = try c.builder.makeLabel("return"); | ||
| 194 | try c.genStmt(c.node_data[@intFromEnum(decl)].decl.node); | ||
| 195 | |||
| 196 | // Relocate returns | ||
| 197 | if (c.ret_nodes.items.len == 0) { | ||
| 198 | _ = try c.builder.addInst(.ret, .{ .un = .none }, .noreturn); | ||
| 199 | } else if (c.ret_nodes.items.len == 1) { | ||
| 200 | c.builder.body.items.len -= 1; | ||
| 201 | _ = try c.builder.addInst(.ret, .{ .un = c.ret_nodes.items[0].value }, .noreturn); | ||
| 202 | } else { | ||
| 203 | try c.builder.startBlock(c.return_label); | ||
| 204 | const phi = try c.builder.addPhi(c.ret_nodes.items, try c.genType(func_ty.returnType())); | ||
| 205 | _ = try c.builder.addInst(.ret, .{ .un = phi }, .noreturn); | ||
| 206 | } | ||
| 207 | |||
| 208 | var res = Ir{ | ||
| 209 | .pool = c.builder.pool, | ||
| 210 | .instructions = c.builder.instructions, | ||
| 211 | .arena = c.builder.arena.state, | ||
| 212 | .body = c.builder.body, | ||
| 213 | .strings = c.tree.strings, | ||
| 214 | }; | ||
| 215 | res.dump(c.builder.gpa, name, c.comp.diag.color, std.io.getStdOut().writer()) catch {}; | ||
| 216 | } | ||
| 217 | |||
| 218 | fn addUn(c: *CodeGen, tag: Ir.Inst.Tag, operand: Ir.Ref, ty: Type) !Ir.Ref { | ||
| 219 | return c.builder.addInst(tag, .{ .un = operand }, try c.genType(ty)); | ||
| 220 | } | ||
| 221 | |||
| 222 | fn addBin(c: *CodeGen, tag: Ir.Inst.Tag, lhs: Ir.Ref, rhs: Ir.Ref, ty: Type) !Ir.Ref { | ||
| 223 | return c.builder.addInst(tag, .{ .bin = .{ .lhs = lhs, .rhs = rhs } }, try c.genType(ty)); | ||
| 224 | } | ||
| 225 | |||
| 226 | fn addBranch(c: *CodeGen, cond: Ir.Ref, true_label: Ir.Ref, false_label: Ir.Ref) !void { | ||
| 227 | if (true_label == c.bool_end_label) { | ||
| 228 | if (false_label == c.bool_end_label) { | ||
| 229 | try c.phi_nodes.append(c.comp.gpa, .{ .label = c.builder.current_label, .value = cond }); | ||
| 230 | return; | ||
| 231 | } | ||
| 232 | try c.addBoolPhi(!c.bool_invert); | ||
| 233 | } | ||
| 234 | if (false_label == c.bool_end_label) { | ||
| 235 | try c.addBoolPhi(c.bool_invert); | ||
| 236 | } | ||
| 237 | return c.builder.addBranch(cond, true_label, false_label); | ||
| 238 | } | ||
| 239 | |||
| 240 | fn addBoolPhi(c: *CodeGen, value: bool) !void { | ||
| 241 | const val = try c.builder.addConstant(Value.int(@intFromBool(value)), .i1); | ||
| 242 | try c.phi_nodes.append(c.comp.gpa, .{ .label = c.builder.current_label, .value = val }); | ||
| 243 | } | ||
| 244 | |||
| 245 | fn genStmt(c: *CodeGen, node: NodeIndex) Error!void { | ||
| 246 | _ = try c.genExpr(node); | ||
| 247 | } | ||
| 248 | |||
| 249 | fn genExpr(c: *CodeGen, node: NodeIndex) Error!Ir.Ref { | ||
| 250 | std.debug.assert(node != .none); | ||
| 251 | const ty = c.node_ty[@intFromEnum(node)]; | ||
| 252 | if (c.tree.value_map.get(node)) |val| { | ||
| 253 | return c.builder.addConstant(val, try c.genType(ty)); | ||
| 254 | } | ||
| 255 | const data = c.node_data[@intFromEnum(node)]; | ||
| 256 | switch (c.node_tag[@intFromEnum(node)]) { | ||
| 257 | .enumeration_ref, | ||
| 258 | .bool_literal, | ||
| 259 | .int_literal, | ||
| 260 | .char_literal, | ||
| 261 | .float_literal, | ||
| 262 | .double_literal, | ||
| 263 | .imaginary_literal, | ||
| 264 | .string_literal_expr, | ||
| 265 | .alignof_expr, | ||
| 266 | => unreachable, // These should have an entry in value_map. | ||
| 267 | .fn_def, | ||
| 268 | .static_fn_def, | ||
| 269 | .inline_fn_def, | ||
| 270 | .inline_static_fn_def, | ||
| 271 | .invalid, | ||
| 272 | .threadlocal_var, | ||
| 273 | => unreachable, | ||
| 274 | .static_assert, | ||
| 275 | .fn_proto, | ||
| 276 | .static_fn_proto, | ||
| 277 | .inline_fn_proto, | ||
| 278 | .inline_static_fn_proto, | ||
| 279 | .extern_var, | ||
| 280 | .threadlocal_extern_var, | ||
| 281 | .typedef, | ||
| 282 | .struct_decl_two, | ||
| 283 | .union_decl_two, | ||
| 284 | .enum_decl_two, | ||
| 285 | .struct_decl, | ||
| 286 | .union_decl, | ||
| 287 | .enum_decl, | ||
| 288 | .enum_field_decl, | ||
| 289 | .record_field_decl, | ||
| 290 | .indirect_record_field_decl, | ||
| 291 | .struct_forward_decl, | ||
| 292 | .union_forward_decl, | ||
| 293 | .enum_forward_decl, | ||
| 294 | .null_stmt, | ||
| 295 | => {}, | ||
| 296 | .static_var, | ||
| 297 | .implicit_static_var, | ||
| 298 | .threadlocal_static_var, | ||
| 299 | => try c.genVar(node), // TODO | ||
| 300 | .@"var" => { | ||
| 301 | const size: u32 = @intCast(ty.sizeof(c.comp).?); // TODO add error in parser | ||
| 302 | const @"align" = ty.alignof(c.comp); | ||
| 303 | const alloc = try c.builder.addAlloc(size, @"align"); | ||
| 304 | const name = try c.comp.intern(c.tree.tokSlice(data.decl.name)); | ||
| 305 | try c.symbols.append(c.comp.gpa, .{ .name = name, .val = alloc }); | ||
| 306 | if (data.decl.node != .none) { | ||
| 307 | try c.genInitializer(alloc, ty, data.decl.node); | ||
| 308 | } | ||
| 309 | }, | ||
| 310 | .labeled_stmt => { | ||
| 311 | const label = try c.builder.makeLabel("label"); | ||
| 312 | try c.builder.startBlock(label); | ||
| 313 | try c.genStmt(data.decl.node); | ||
| 314 | }, | ||
| 315 | .compound_stmt_two => { | ||
| 316 | const old_sym_len = c.symbols.items.len; | ||
| 317 | c.symbols.items.len = old_sym_len; | ||
| 318 | |||
| 319 | if (data.bin.lhs != .none) try c.genStmt(data.bin.lhs); | ||
| 320 | if (data.bin.rhs != .none) try c.genStmt(data.bin.rhs); | ||
| 321 | }, | ||
| 322 | .compound_stmt => { | ||
| 323 | const old_sym_len = c.symbols.items.len; | ||
| 324 | c.symbols.items.len = old_sym_len; | ||
| 325 | |||
| 326 | for (c.tree.data[data.range.start..data.range.end]) |stmt| try c.genStmt(stmt); | ||
| 327 | }, | ||
| 328 | .if_then_else_stmt => { | ||
| 329 | const then_label = try c.builder.makeLabel("if.then"); | ||
| 330 | const else_label = try c.builder.makeLabel("if.else"); | ||
| 331 | const end_label = try c.builder.makeLabel("if.end"); | ||
| 332 | |||
| 333 | try c.genBoolExpr(data.if3.cond, then_label, else_label); | ||
| 334 | |||
| 335 | try c.builder.startBlock(then_label); | ||
| 336 | try c.genStmt(c.tree.data[data.if3.body]); // then | ||
| 337 | try c.builder.addJump(end_label); | ||
| 338 | |||
| 339 | try c.builder.startBlock(else_label); | ||
| 340 | try c.genStmt(c.tree.data[data.if3.body + 1]); // else | ||
| 341 | |||
| 342 | try c.builder.startBlock(end_label); | ||
| 343 | }, | ||
| 344 | .if_then_stmt => { | ||
| 345 | const then_label = try c.builder.makeLabel("if.then"); | ||
| 346 | const end_label = try c.builder.makeLabel("if.end"); | ||
| 347 | |||
| 348 | try c.genBoolExpr(data.bin.lhs, then_label, end_label); | ||
| 349 | |||
| 350 | try c.builder.startBlock(then_label); | ||
| 351 | try c.genStmt(data.bin.rhs); // then | ||
| 352 | try c.builder.startBlock(end_label); | ||
| 353 | }, | ||
| 354 | .switch_stmt => { | ||
| 355 | var wip_switch = WipSwitch{ | ||
| 356 | .size = c.node_ty[@intFromEnum(data.bin.lhs)].sizeof(c.comp).?, | ||
| 357 | }; | ||
| 358 | defer wip_switch.cases.deinit(c.builder.gpa); | ||
| 359 | |||
| 360 | const old_wip_switch = c.wip_switch; | ||
| 361 | defer c.wip_switch = old_wip_switch; | ||
| 362 | c.wip_switch = &wip_switch; | ||
| 363 | |||
| 364 | const old_break_label = c.break_label; | ||
| 365 | defer c.break_label = old_break_label; | ||
| 366 | const end_ref = try c.builder.makeLabel("switch.end"); | ||
| 367 | c.break_label = end_ref; | ||
| 368 | |||
| 369 | const cond = try c.genExpr(data.bin.lhs); | ||
| 370 | const switch_index = c.builder.instructions.len; | ||
| 371 | _ = try c.builder.addInst(.@"switch", undefined, .noreturn); | ||
| 372 | |||
| 373 | try c.genStmt(data.bin.rhs); // body | ||
| 374 | |||
| 375 | const default_ref = wip_switch.default orelse end_ref; | ||
| 376 | try c.builder.startBlock(end_ref); | ||
| 377 | |||
| 378 | const a = c.builder.arena.allocator(); | ||
| 379 | const switch_data = try a.create(Ir.Inst.Switch); | ||
| 380 | switch_data.* = .{ | ||
| 381 | .target = cond, | ||
| 382 | .cases_len = @intCast(wip_switch.cases.len), | ||
| 383 | .case_vals = (try a.dupe(Interner.Ref, wip_switch.cases.items(.val))).ptr, | ||
| 384 | .case_labels = (try a.dupe(Ir.Ref, wip_switch.cases.items(.label))).ptr, | ||
| 385 | .default = default_ref, | ||
| 386 | }; | ||
| 387 | c.builder.instructions.items(.data)[switch_index] = .{ .@"switch" = switch_data }; | ||
| 388 | }, | ||
| 389 | .case_stmt => { | ||
| 390 | const val = c.tree.value_map.get(data.bin.lhs).?; | ||
| 391 | const label = try c.builder.makeLabel("case"); | ||
| 392 | try c.builder.startBlock(label); | ||
| 393 | try c.wip_switch.cases.append(c.builder.gpa, .{ | ||
| 394 | .val = try c.builder.pool.put(c.builder.gpa, .{ .value = val }), | ||
| 395 | .label = label, | ||
| 396 | }); | ||
| 397 | try c.genStmt(data.bin.rhs); | ||
| 398 | }, | ||
| 399 | .default_stmt => { | ||
| 400 | const default = try c.builder.makeLabel("default"); | ||
| 401 | try c.builder.startBlock(default); | ||
| 402 | c.wip_switch.default = default; | ||
| 403 | try c.genStmt(data.un); | ||
| 404 | }, | ||
| 405 | .while_stmt => { | ||
| 406 | const old_break_label = c.break_label; | ||
| 407 | defer c.break_label = old_break_label; | ||
| 408 | |||
| 409 | const old_continue_label = c.continue_label; | ||
| 410 | defer c.continue_label = old_continue_label; | ||
| 411 | |||
| 412 | const cond_label = try c.builder.makeLabel("while.cond"); | ||
| 413 | const then_label = try c.builder.makeLabel("while.then"); | ||
| 414 | const end_label = try c.builder.makeLabel("while.end"); | ||
| 415 | |||
| 416 | c.continue_label = cond_label; | ||
| 417 | c.break_label = end_label; | ||
| 418 | |||
| 419 | try c.builder.startBlock(cond_label); | ||
| 420 | try c.genBoolExpr(data.bin.lhs, then_label, end_label); | ||
| 421 | |||
| 422 | try c.builder.startBlock(then_label); | ||
| 423 | try c.genStmt(data.bin.rhs); | ||
| 424 | try c.builder.addJump(cond_label); | ||
| 425 | try c.builder.startBlock(end_label); | ||
| 426 | }, | ||
| 427 | .do_while_stmt => { | ||
| 428 | const old_break_label = c.break_label; | ||
| 429 | defer c.break_label = old_break_label; | ||
| 430 | |||
| 431 | const old_continue_label = c.continue_label; | ||
| 432 | defer c.continue_label = old_continue_label; | ||
| 433 | |||
| 434 | const then_label = try c.builder.makeLabel("do.then"); | ||
| 435 | const cond_label = try c.builder.makeLabel("do.cond"); | ||
| 436 | const end_label = try c.builder.makeLabel("do.end"); | ||
| 437 | |||
| 438 | c.continue_label = cond_label; | ||
| 439 | c.break_label = end_label; | ||
| 440 | |||
| 441 | try c.builder.startBlock(then_label); | ||
| 442 | try c.genStmt(data.bin.rhs); | ||
| 443 | |||
| 444 | try c.builder.startBlock(cond_label); | ||
| 445 | try c.genBoolExpr(data.bin.lhs, then_label, end_label); | ||
| 446 | |||
| 447 | try c.builder.startBlock(end_label); | ||
| 448 | }, | ||
| 449 | .for_decl_stmt => { | ||
| 450 | const old_break_label = c.break_label; | ||
| 451 | defer c.break_label = old_break_label; | ||
| 452 | |||
| 453 | const old_continue_label = c.continue_label; | ||
| 454 | defer c.continue_label = old_continue_label; | ||
| 455 | |||
| 456 | const for_decl = data.forDecl(c.tree); | ||
| 457 | for (for_decl.decls) |decl| try c.genStmt(decl); | ||
| 458 | |||
| 459 | const then_label = try c.builder.makeLabel("for.then"); | ||
| 460 | var cond_label = then_label; | ||
| 461 | const cont_label = try c.builder.makeLabel("for.cont"); | ||
| 462 | const end_label = try c.builder.makeLabel("for.end"); | ||
| 463 | |||
| 464 | c.continue_label = cont_label; | ||
| 465 | c.break_label = end_label; | ||
| 466 | |||
| 467 | if (for_decl.cond != .none) { | ||
| 468 | cond_label = try c.builder.makeLabel("for.cond"); | ||
| 469 | try c.builder.startBlock(cond_label); | ||
| 470 | try c.genBoolExpr(for_decl.cond, then_label, end_label); | ||
| 471 | } | ||
| 472 | try c.builder.startBlock(then_label); | ||
| 473 | try c.genStmt(for_decl.body); | ||
| 474 | if (for_decl.incr != .none) { | ||
| 475 | _ = try c.genExpr(for_decl.incr); | ||
| 476 | } | ||
| 477 | try c.builder.addJump(cond_label); | ||
| 478 | try c.builder.startBlock(end_label); | ||
| 479 | }, | ||
| 480 | .forever_stmt => { | ||
| 481 | const old_break_label = c.break_label; | ||
| 482 | defer c.break_label = old_break_label; | ||
| 483 | |||
| 484 | const old_continue_label = c.continue_label; | ||
| 485 | defer c.continue_label = old_continue_label; | ||
| 486 | |||
| 487 | const then_label = try c.builder.makeLabel("for.then"); | ||
| 488 | const end_label = try c.builder.makeLabel("for.end"); | ||
| 489 | |||
| 490 | c.continue_label = then_label; | ||
| 491 | c.break_label = end_label; | ||
| 492 | |||
| 493 | try c.builder.startBlock(then_label); | ||
| 494 | try c.genStmt(data.un); | ||
| 495 | try c.builder.startBlock(end_label); | ||
| 496 | }, | ||
| 497 | .for_stmt => { | ||
| 498 | const old_break_label = c.break_label; | ||
| 499 | defer c.break_label = old_break_label; | ||
| 500 | |||
| 501 | const old_continue_label = c.continue_label; | ||
| 502 | defer c.continue_label = old_continue_label; | ||
| 503 | |||
| 504 | const for_stmt = data.forStmt(c.tree); | ||
| 505 | if (for_stmt.init != .none) _ = try c.genExpr(for_stmt.init); | ||
| 506 | |||
| 507 | const then_label = try c.builder.makeLabel("for.then"); | ||
| 508 | var cond_label = then_label; | ||
| 509 | const cont_label = try c.builder.makeLabel("for.cont"); | ||
| 510 | const end_label = try c.builder.makeLabel("for.end"); | ||
| 511 | |||
| 512 | c.continue_label = cont_label; | ||
| 513 | c.break_label = end_label; | ||
| 514 | |||
| 515 | if (for_stmt.cond != .none) { | ||
| 516 | cond_label = try c.builder.makeLabel("for.cond"); | ||
| 517 | try c.builder.startBlock(cond_label); | ||
| 518 | try c.genBoolExpr(for_stmt.cond, then_label, end_label); | ||
| 519 | } | ||
| 520 | try c.builder.startBlock(then_label); | ||
| 521 | try c.genStmt(for_stmt.body); | ||
| 522 | if (for_stmt.incr != .none) { | ||
| 523 | _ = try c.genExpr(for_stmt.incr); | ||
| 524 | } | ||
| 525 | try c.builder.addJump(cond_label); | ||
| 526 | try c.builder.startBlock(end_label); | ||
| 527 | }, | ||
| 528 | .continue_stmt => try c.builder.addJump(c.continue_label), | ||
| 529 | .break_stmt => try c.builder.addJump(c.break_label), | ||
| 530 | .return_stmt => { | ||
| 531 | if (data.un != .none) { | ||
| 532 | const operand = try c.genExpr(data.un); | ||
| 533 | try c.ret_nodes.append(c.comp.gpa, .{ .value = operand, .label = c.builder.current_label }); | ||
| 534 | } | ||
| 535 | try c.builder.addJump(c.return_label); | ||
| 536 | }, | ||
| 537 | .implicit_return => { | ||
| 538 | if (data.return_zero) { | ||
| 539 | const operand = try c.builder.addConstant(Value.int(0), try c.genType(ty)); | ||
| 540 | try c.ret_nodes.append(c.comp.gpa, .{ .value = operand, .label = c.builder.current_label }); | ||
| 541 | } | ||
| 542 | // No need to emit a jump since implicit_return is always the last instruction. | ||
| 543 | }, | ||
| 544 | .case_range_stmt, | ||
| 545 | .goto_stmt, | ||
| 546 | .computed_goto_stmt, | ||
| 547 | .nullptr_literal, | ||
| 548 | => return c.comp.diag.fatalNoSrc("TODO CodeGen.genStmt {}\n", .{c.node_tag[@intFromEnum(node)]}), | ||
| 549 | .comma_expr => { | ||
| 550 | _ = try c.genExpr(data.bin.lhs); | ||
| 551 | return c.genExpr(data.bin.rhs); | ||
| 552 | }, | ||
| 553 | .assign_expr => { | ||
| 554 | const rhs = try c.genExpr(data.bin.rhs); | ||
| 555 | const lhs = try c.genLval(data.bin.lhs); | ||
| 556 | try c.builder.addStore(lhs, rhs); | ||
| 557 | return rhs; | ||
| 558 | }, | ||
| 559 | .mul_assign_expr => return c.genCompoundAssign(node, .mul), | ||
| 560 | .div_assign_expr => return c.genCompoundAssign(node, .div), | ||
| 561 | .mod_assign_expr => return c.genCompoundAssign(node, .mod), | ||
| 562 | .add_assign_expr => return c.genCompoundAssign(node, .add), | ||
| 563 | .sub_assign_expr => return c.genCompoundAssign(node, .sub), | ||
| 564 | .shl_assign_expr => return c.genCompoundAssign(node, .bit_shl), | ||
| 565 | .shr_assign_expr => return c.genCompoundAssign(node, .bit_shr), | ||
| 566 | .bit_and_assign_expr => return c.genCompoundAssign(node, .bit_and), | ||
| 567 | .bit_xor_assign_expr => return c.genCompoundAssign(node, .bit_xor), | ||
| 568 | .bit_or_assign_expr => return c.genCompoundAssign(node, .bit_or), | ||
| 569 | .bit_or_expr => return c.genBinOp(node, .bit_or), | ||
| 570 | .bit_xor_expr => return c.genBinOp(node, .bit_xor), | ||
| 571 | .bit_and_expr => return c.genBinOp(node, .bit_and), | ||
| 572 | .equal_expr => { | ||
| 573 | const cmp = try c.genComparison(node, .cmp_eq); | ||
| 574 | return c.addUn(.zext, cmp, ty); | ||
| 575 | }, | ||
| 576 | .not_equal_expr => { | ||
| 577 | const cmp = try c.genComparison(node, .cmp_ne); | ||
| 578 | return c.addUn(.zext, cmp, ty); | ||
| 579 | }, | ||
| 580 | .less_than_expr => { | ||
| 581 | const cmp = try c.genComparison(node, .cmp_lt); | ||
| 582 | return c.addUn(.zext, cmp, ty); | ||
| 583 | }, | ||
| 584 | .less_than_equal_expr => { | ||
| 585 | const cmp = try c.genComparison(node, .cmp_lte); | ||
| 586 | return c.addUn(.zext, cmp, ty); | ||
| 587 | }, | ||
| 588 | .greater_than_expr => { | ||
| 589 | const cmp = try c.genComparison(node, .cmp_gt); | ||
| 590 | return c.addUn(.zext, cmp, ty); | ||
| 591 | }, | ||
| 592 | .greater_than_equal_expr => { | ||
| 593 | const cmp = try c.genComparison(node, .cmp_gte); | ||
| 594 | return c.addUn(.zext, cmp, ty); | ||
| 595 | }, | ||
| 596 | .shl_expr => return c.genBinOp(node, .bit_shl), | ||
| 597 | .shr_expr => return c.genBinOp(node, .bit_shr), | ||
| 598 | .add_expr => { | ||
| 599 | if (ty.isPtr()) { | ||
| 600 | const lhs_ty = c.node_ty[@intFromEnum(data.bin.lhs)]; | ||
| 601 | if (lhs_ty.isPtr()) { | ||
| 602 | const ptr = try c.genExpr(data.bin.lhs); | ||
| 603 | const offset = try c.genExpr(data.bin.rhs); | ||
| 604 | const offset_ty = c.node_ty[@intFromEnum(data.bin.rhs)]; | ||
| 605 | return c.genPtrArithmetic(ptr, offset, offset_ty, ty); | ||
| 606 | } else { | ||
| 607 | const offset = try c.genExpr(data.bin.lhs); | ||
| 608 | const ptr = try c.genExpr(data.bin.rhs); | ||
| 609 | const offset_ty = lhs_ty; | ||
| 610 | return c.genPtrArithmetic(ptr, offset, offset_ty, ty); | ||
| 611 | } | ||
| 612 | } | ||
| 613 | return c.genBinOp(node, .add); | ||
| 614 | }, | ||
| 615 | .sub_expr => { | ||
| 616 | if (ty.isPtr()) { | ||
| 617 | const ptr = try c.genExpr(data.bin.lhs); | ||
| 618 | const offset = try c.genExpr(data.bin.rhs); | ||
| 619 | const offset_ty = c.node_ty[@intFromEnum(data.bin.rhs)]; | ||
| 620 | return c.genPtrArithmetic(ptr, offset, offset_ty, ty); | ||
| 621 | } | ||
| 622 | return c.genBinOp(node, .sub); | ||
| 623 | }, | ||
| 624 | .mul_expr => return c.genBinOp(node, .mul), | ||
| 625 | .div_expr => return c.genBinOp(node, .div), | ||
| 626 | .mod_expr => return c.genBinOp(node, .mod), | ||
| 627 | .addr_of_expr => return try c.genLval(data.un), | ||
| 628 | .deref_expr => { | ||
| 629 | const un_data = c.node_data[@intFromEnum(data.un)]; | ||
| 630 | if (c.node_tag[@intFromEnum(data.un)] == .implicit_cast and un_data.cast.kind == .function_to_pointer) { | ||
| 631 | return c.genExpr(data.un); | ||
| 632 | } | ||
| 633 | const operand = try c.genLval(data.un); | ||
| 634 | return c.addUn(.load, operand, ty); | ||
| 635 | }, | ||
| 636 | .plus_expr => return c.genExpr(data.un), | ||
| 637 | .negate_expr => { | ||
| 638 | const zero = try c.builder.addConstant(Value.int(0), try c.genType(ty)); | ||
| 639 | const operand = try c.genExpr(data.un); | ||
| 640 | return c.addBin(.sub, zero, operand, ty); | ||
| 641 | }, | ||
| 642 | .bit_not_expr => { | ||
| 643 | const operand = try c.genExpr(data.un); | ||
| 644 | return c.addUn(.bit_not, operand, ty); | ||
| 645 | }, | ||
| 646 | .bool_not_expr => { | ||
| 647 | const zero = try c.builder.addConstant(Value.int(0), try c.genType(ty)); | ||
| 648 | const operand = try c.genExpr(data.un); | ||
| 649 | return c.addBin(.cmp_ne, zero, operand, ty); | ||
| 650 | }, | ||
| 651 | .pre_inc_expr => { | ||
| 652 | const operand = try c.genLval(data.un); | ||
| 653 | const val = try c.addUn(.load, operand, ty); | ||
| 654 | const one = try c.builder.addConstant(Value.int(1), try c.genType(ty)); | ||
| 655 | const plus_one = try c.addBin(.add, val, one, ty); | ||
| 656 | try c.builder.addStore(operand, plus_one); | ||
| 657 | return plus_one; | ||
| 658 | }, | ||
| 659 | .pre_dec_expr => { | ||
| 660 | const operand = try c.genLval(data.un); | ||
| 661 | const val = try c.addUn(.load, operand, ty); | ||
| 662 | const one = try c.builder.addConstant(Value.int(1), try c.genType(ty)); | ||
| 663 | const plus_one = try c.addBin(.sub, val, one, ty); | ||
| 664 | try c.builder.addStore(operand, plus_one); | ||
| 665 | return plus_one; | ||
| 666 | }, | ||
| 667 | .post_inc_expr => { | ||
| 668 | const operand = try c.genLval(data.un); | ||
| 669 | const val = try c.addUn(.load, operand, ty); | ||
| 670 | const one = try c.builder.addConstant(Value.int(1), try c.genType(ty)); | ||
| 671 | const plus_one = try c.addBin(.add, val, one, ty); | ||
| 672 | try c.builder.addStore(operand, plus_one); | ||
| 673 | return val; | ||
| 674 | }, | ||
| 675 | .post_dec_expr => { | ||
| 676 | const operand = try c.genLval(data.un); | ||
| 677 | const val = try c.addUn(.load, operand, ty); | ||
| 678 | const one = try c.builder.addConstant(Value.int(1), try c.genType(ty)); | ||
| 679 | const plus_one = try c.addBin(.sub, val, one, ty); | ||
| 680 | try c.builder.addStore(operand, plus_one); | ||
| 681 | return val; | ||
| 682 | }, | ||
| 683 | .paren_expr => return c.genExpr(data.un), | ||
| 684 | .decl_ref_expr => unreachable, // Lval expression. | ||
| 685 | .explicit_cast, .implicit_cast => switch (data.cast.kind) { | ||
| 686 | .no_op => return c.genExpr(data.cast.operand), | ||
| 687 | .to_void => { | ||
| 688 | _ = try c.genExpr(data.cast.operand); | ||
| 689 | return .none; | ||
| 690 | }, | ||
| 691 | .lval_to_rval => { | ||
| 692 | const operand = try c.genLval(data.cast.operand); | ||
| 693 | return c.addUn(.load, operand, ty); | ||
| 694 | }, | ||
| 695 | .function_to_pointer, .array_to_pointer => { | ||
| 696 | return c.genLval(data.cast.operand); | ||
| 697 | }, | ||
| 698 | .int_cast => { | ||
| 699 | const operand = try c.genExpr(data.cast.operand); | ||
| 700 | const src_ty = c.node_ty[@intFromEnum(data.cast.operand)]; | ||
| 701 | const src_bits = src_ty.bitSizeof(c.comp).?; | ||
| 702 | const dest_bits = ty.bitSizeof(c.comp).?; | ||
| 703 | if (src_bits == dest_bits) { | ||
| 704 | return operand; | ||
| 705 | } else if (src_bits < dest_bits) { | ||
| 706 | if (src_ty.isUnsignedInt(c.comp)) | ||
| 707 | return c.addUn(.zext, operand, ty) | ||
| 708 | else | ||
| 709 | return c.addUn(.sext, operand, ty); | ||
| 710 | } else { | ||
| 711 | return c.addUn(.trunc, operand, ty); | ||
| 712 | } | ||
| 713 | }, | ||
| 714 | .bool_to_int => { | ||
| 715 | const operand = try c.genExpr(data.cast.operand); | ||
| 716 | return c.addUn(.zext, operand, ty); | ||
| 717 | }, | ||
| 718 | .pointer_to_bool, .int_to_bool, .float_to_bool => { | ||
| 719 | const lhs = try c.genExpr(data.cast.operand); | ||
| 720 | const rhs = try c.builder.addConstant(Value.int(0), try c.genType(c.node_ty[@intFromEnum(node)])); | ||
| 721 | return c.builder.addInst(.cmp_ne, .{ .bin = .{ .lhs = lhs, .rhs = rhs } }, .i1); | ||
| 722 | }, | ||
| 723 | .bitcast, | ||
| 724 | .pointer_to_int, | ||
| 725 | .bool_to_float, | ||
| 726 | .bool_to_pointer, | ||
| 727 | .int_to_float, | ||
| 728 | .complex_int_to_complex_float, | ||
| 729 | .int_to_pointer, | ||
| 730 | .float_to_int, | ||
| 731 | .complex_float_to_complex_int, | ||
| 732 | .complex_int_cast, | ||
| 733 | .complex_int_to_real, | ||
| 734 | .real_to_complex_int, | ||
| 735 | .float_cast, | ||
| 736 | .complex_float_cast, | ||
| 737 | .complex_float_to_real, | ||
| 738 | .real_to_complex_float, | ||
| 739 | .null_to_pointer, | ||
| 740 | .union_cast, | ||
| 741 | .vector_splat, | ||
| 742 | => return c.comp.diag.fatalNoSrc("TODO CodeGen gen CastKind {}\n", .{data.cast.kind}), | ||
| 743 | }, | ||
| 744 | .binary_cond_expr => { | ||
| 745 | if (c.tree.value_map.get(data.if3.cond)) |cond| { | ||
| 746 | if (cond.getBool()) { | ||
| 747 | c.cond_dummy_ref = try c.genExpr(data.if3.cond); | ||
| 748 | return c.genExpr(c.tree.data[data.if3.body]); // then | ||
| 749 | } else { | ||
| 750 | return c.genExpr(c.tree.data[data.if3.body + 1]); // else | ||
| 751 | } | ||
| 752 | } | ||
| 753 | |||
| 754 | const then_label = try c.builder.makeLabel("ternary.then"); | ||
| 755 | const else_label = try c.builder.makeLabel("ternary.else"); | ||
| 756 | const end_label = try c.builder.makeLabel("ternary.end"); | ||
| 757 | const cond_ty = c.node_ty[@intFromEnum(data.if3.cond)]; | ||
| 758 | { | ||
| 759 | const old_cond_dummy_ty = c.cond_dummy_ty; | ||
| 760 | defer c.cond_dummy_ty = old_cond_dummy_ty; | ||
| 761 | c.cond_dummy_ty = try c.genType(cond_ty); | ||
| 762 | |||
| 763 | try c.genBoolExpr(data.if3.cond, then_label, else_label); | ||
| 764 | } | ||
| 765 | |||
| 766 | try c.builder.startBlock(then_label); | ||
| 767 | if (c.builder.instructions.items(.ty)[@intFromEnum(c.cond_dummy_ref)] == .i1) { | ||
| 768 | c.cond_dummy_ref = try c.addUn(.zext, c.cond_dummy_ref, cond_ty); | ||
| 769 | } | ||
| 770 | const then_val = try c.genExpr(c.tree.data[data.if3.body]); // then | ||
| 771 | try c.builder.addJump(end_label); | ||
| 772 | const then_exit = c.builder.current_label; | ||
| 773 | |||
| 774 | try c.builder.startBlock(else_label); | ||
| 775 | const else_val = try c.genExpr(c.tree.data[data.if3.body + 1]); // else | ||
| 776 | const else_exit = c.builder.current_label; | ||
| 777 | |||
| 778 | try c.builder.startBlock(end_label); | ||
| 779 | |||
| 780 | var phi_buf: [2]Ir.Inst.Phi.Input = .{ | ||
| 781 | .{ .value = then_val, .label = then_exit }, | ||
| 782 | .{ .value = else_val, .label = else_exit }, | ||
| 783 | }; | ||
| 784 | return c.builder.addPhi(&phi_buf, try c.genType(ty)); | ||
| 785 | }, | ||
| 786 | .cond_dummy_expr => return c.cond_dummy_ref, | ||
| 787 | .cond_expr => { | ||
| 788 | if (c.tree.value_map.get(data.if3.cond)) |cond| { | ||
| 789 | if (cond.getBool()) { | ||
| 790 | return c.genExpr(c.tree.data[data.if3.body]); // then | ||
| 791 | } else { | ||
| 792 | return c.genExpr(c.tree.data[data.if3.body + 1]); // else | ||
| 793 | } | ||
| 794 | } | ||
| 795 | |||
| 796 | const then_label = try c.builder.makeLabel("ternary.then"); | ||
| 797 | const else_label = try c.builder.makeLabel("ternary.else"); | ||
| 798 | const end_label = try c.builder.makeLabel("ternary.end"); | ||
| 799 | |||
| 800 | try c.genBoolExpr(data.if3.cond, then_label, else_label); | ||
| 801 | |||
| 802 | try c.builder.startBlock(then_label); | ||
| 803 | const then_val = try c.genExpr(c.tree.data[data.if3.body]); // then | ||
| 804 | try c.builder.addJump(end_label); | ||
| 805 | const then_exit = c.builder.current_label; | ||
| 806 | |||
| 807 | try c.builder.startBlock(else_label); | ||
| 808 | const else_val = try c.genExpr(c.tree.data[data.if3.body + 1]); // else | ||
| 809 | const else_exit = c.builder.current_label; | ||
| 810 | |||
| 811 | try c.builder.startBlock(end_label); | ||
| 812 | |||
| 813 | var phi_buf: [2]Ir.Inst.Phi.Input = .{ | ||
| 814 | .{ .value = then_val, .label = then_exit }, | ||
| 815 | .{ .value = else_val, .label = else_exit }, | ||
| 816 | }; | ||
| 817 | return c.builder.addPhi(&phi_buf, try c.genType(ty)); | ||
| 818 | }, | ||
| 819 | .call_expr_one => if (data.bin.rhs == .none) { | ||
| 820 | return c.genCall(data.bin.lhs, &.{}, ty); | ||
| 821 | } else { | ||
| 822 | return c.genCall(data.bin.lhs, &.{data.bin.rhs}, ty); | ||
| 823 | }, | ||
| 824 | .call_expr => { | ||
| 825 | return c.genCall(c.tree.data[data.range.start], c.tree.data[data.range.start + 1 .. data.range.end], ty); | ||
| 826 | }, | ||
| 827 | .bool_or_expr => { | ||
| 828 | if (c.tree.value_map.get(data.bin.lhs)) |lhs| { | ||
| 829 | const cond = lhs.getBool(); | ||
| 830 | if (!cond) { | ||
| 831 | return c.builder.addConstant(Value.int(1), try c.genType(ty)); | ||
| 832 | } | ||
| 833 | return c.genExpr(data.bin.rhs); | ||
| 834 | } | ||
| 835 | |||
| 836 | const false_label = try c.builder.makeLabel("bool_false"); | ||
| 837 | const exit_label = try c.builder.makeLabel("bool_exit"); | ||
| 838 | |||
| 839 | const old_bool_end_label = c.bool_end_label; | ||
| 840 | defer c.bool_end_label = old_bool_end_label; | ||
| 841 | c.bool_end_label = exit_label; | ||
| 842 | |||
| 843 | const phi_nodes_top = c.phi_nodes.items.len; | ||
| 844 | defer c.phi_nodes.items.len = phi_nodes_top; | ||
| 845 | |||
| 846 | try c.genBoolExpr(data.bin.lhs, exit_label, false_label); | ||
| 847 | |||
| 848 | try c.builder.startBlock(false_label); | ||
| 849 | try c.genBoolExpr(data.bin.rhs, exit_label, exit_label); | ||
| 850 | |||
| 851 | try c.builder.startBlock(exit_label); | ||
| 852 | |||
| 853 | const phi = try c.builder.addPhi(c.phi_nodes.items[phi_nodes_top..], .i1); | ||
| 854 | return c.addUn(.zext, phi, ty); | ||
| 855 | }, | ||
| 856 | .bool_and_expr => { | ||
| 857 | if (c.tree.value_map.get(data.bin.lhs)) |lhs| { | ||
| 858 | const cond = lhs.getBool(); | ||
| 859 | if (!cond) { | ||
| 860 | return c.builder.addConstant(Value.int(0), try c.genType(ty)); | ||
| 861 | } | ||
| 862 | return c.genExpr(data.bin.rhs); | ||
| 863 | } | ||
| 864 | |||
| 865 | const true_label = try c.builder.makeLabel("bool_true"); | ||
| 866 | const exit_label = try c.builder.makeLabel("bool_exit"); | ||
| 867 | |||
| 868 | const old_bool_end_label = c.bool_end_label; | ||
| 869 | defer c.bool_end_label = old_bool_end_label; | ||
| 870 | c.bool_end_label = exit_label; | ||
| 871 | |||
| 872 | const phi_nodes_top = c.phi_nodes.items.len; | ||
| 873 | defer c.phi_nodes.items.len = phi_nodes_top; | ||
| 874 | |||
| 875 | try c.genBoolExpr(data.bin.lhs, true_label, exit_label); | ||
| 876 | |||
| 877 | try c.builder.startBlock(true_label); | ||
| 878 | try c.genBoolExpr(data.bin.rhs, exit_label, exit_label); | ||
| 879 | |||
| 880 | try c.builder.startBlock(exit_label); | ||
| 881 | |||
| 882 | const phi = try c.builder.addPhi(c.phi_nodes.items[phi_nodes_top..], .i1); | ||
| 883 | return c.addUn(.zext, phi, ty); | ||
| 884 | }, | ||
| 885 | .builtin_choose_expr => { | ||
| 886 | const cond = c.tree.value_map.get(data.if3.cond).?; | ||
| 887 | if (cond.getBool()) { | ||
| 888 | return c.genExpr(c.tree.data[data.if3.body]); | ||
| 889 | } else { | ||
| 890 | return c.genExpr(c.tree.data[data.if3.body + 1]); | ||
| 891 | } | ||
| 892 | }, | ||
| 893 | .generic_expr_one => { | ||
| 894 | const index = @intFromEnum(data.bin.rhs); | ||
| 895 | switch (c.node_tag[index]) { | ||
| 896 | .generic_association_expr, .generic_default_expr => { | ||
| 897 | return c.genExpr(c.node_data[index].un); | ||
| 898 | }, | ||
| 899 | else => unreachable, | ||
| 900 | } | ||
| 901 | }, | ||
| 902 | .generic_expr => { | ||
| 903 | const index = @intFromEnum(c.tree.data[data.range.start + 1]); | ||
| 904 | switch (c.node_tag[index]) { | ||
| 905 | .generic_association_expr, .generic_default_expr => { | ||
| 906 | return c.genExpr(c.node_data[index].un); | ||
| 907 | }, | ||
| 908 | else => unreachable, | ||
| 909 | } | ||
| 910 | }, | ||
| 911 | .generic_association_expr, .generic_default_expr => unreachable, | ||
| 912 | .stmt_expr => switch (c.node_tag[@intFromEnum(data.un)]) { | ||
| 913 | .compound_stmt_two => { | ||
| 914 | const old_sym_len = c.symbols.items.len; | ||
| 915 | c.symbols.items.len = old_sym_len; | ||
| 916 | |||
| 917 | const stmt_data = c.node_data[@intFromEnum(data.un)]; | ||
| 918 | if (stmt_data.bin.rhs == .none) return c.genExpr(stmt_data.bin.lhs); | ||
| 919 | try c.genStmt(stmt_data.bin.lhs); | ||
| 920 | return c.genExpr(stmt_data.bin.rhs); | ||
| 921 | }, | ||
| 922 | .compound_stmt => { | ||
| 923 | const old_sym_len = c.symbols.items.len; | ||
| 924 | c.symbols.items.len = old_sym_len; | ||
| 925 | |||
| 926 | const stmt_data = c.node_data[@intFromEnum(data.un)]; | ||
| 927 | for (c.tree.data[stmt_data.range.start .. stmt_data.range.end - 1]) |stmt| try c.genStmt(stmt); | ||
| 928 | return c.genExpr(c.tree.data[stmt_data.range.end]); | ||
| 929 | }, | ||
| 930 | else => unreachable, | ||
| 931 | }, | ||
| 932 | .builtin_call_expr_one => { | ||
| 933 | const name = c.tree.tokSlice(data.decl.name); | ||
| 934 | const builtin = c.comp.builtins.lookup(name).builtin; | ||
| 935 | if (data.decl.node == .none) { | ||
| 936 | return c.genBuiltinCall(builtin, &.{}, ty); | ||
| 937 | } else { | ||
| 938 | return c.genBuiltinCall(builtin, &.{data.decl.node}, ty); | ||
| 939 | } | ||
| 940 | }, | ||
| 941 | .builtin_call_expr => { | ||
| 942 | const name_node_idx = c.tree.data[data.range.start]; | ||
| 943 | const name = c.tree.tokSlice(@intFromEnum(name_node_idx)); | ||
| 944 | const builtin = c.comp.builtins.lookup(name).builtin; | ||
| 945 | return c.genBuiltinCall(builtin, c.tree.data[data.range.start + 1 .. data.range.end], ty); | ||
| 946 | }, | ||
| 947 | .addr_of_label, | ||
| 948 | .imag_expr, | ||
| 949 | .real_expr, | ||
| 950 | .sizeof_expr, | ||
| 951 | .special_builtin_call_one, | ||
| 952 | => return c.comp.diag.fatalNoSrc("TODO CodeGen.genExpr {}\n", .{c.node_tag[@intFromEnum(node)]}), | ||
| 953 | else => unreachable, // Not an expression. | ||
| 954 | } | ||
| 955 | return .none; | ||
| 956 | } | ||
| 957 | |||
| 958 | fn genLval(c: *CodeGen, node: NodeIndex) Error!Ir.Ref { | ||
| 959 | std.debug.assert(node != .none); | ||
| 960 | assert(Tree.isLval(c.tree.nodes, c.tree.data, c.tree.value_map, node)); | ||
| 961 | const data = c.node_data[@intFromEnum(node)]; | ||
| 962 | switch (c.node_tag[@intFromEnum(node)]) { | ||
| 963 | .string_literal_expr => { | ||
| 964 | const val = c.tree.value_map.get(node).?; | ||
| 965 | return c.builder.addConstant(val, .ptr); | ||
| 966 | }, | ||
| 967 | .paren_expr => return c.genLval(data.un), | ||
| 968 | .decl_ref_expr => { | ||
| 969 | const slice = c.tree.tokSlice(data.decl_ref); | ||
| 970 | const name = try c.comp.intern(slice); | ||
| 971 | var i = c.symbols.items.len; | ||
| 972 | while (i > 0) { | ||
| 973 | i -= 1; | ||
| 974 | if (c.symbols.items[i].name == name) { | ||
| 975 | return c.symbols.items[i].val; | ||
| 976 | } | ||
| 977 | } | ||
| 978 | |||
| 979 | const duped_name = try c.builder.arena.allocator().dupeZ(u8, slice); | ||
| 980 | const ref: Ir.Ref = @enumFromInt(c.builder.instructions.len); | ||
| 981 | try c.builder.instructions.append(c.builder.gpa, .{ .tag = .symbol, .data = .{ .label = duped_name }, .ty = .ptr }); | ||
| 982 | return ref; | ||
| 983 | }, | ||
| 984 | .deref_expr => return c.genExpr(data.un), | ||
| 985 | .compound_literal_expr => { | ||
| 986 | const ty = c.node_ty[@intFromEnum(node)]; | ||
| 987 | const size: u32 = @intCast(ty.sizeof(c.comp).?); // TODO add error in parser | ||
| 988 | const @"align" = ty.alignof(c.comp); | ||
| 989 | const alloc = try c.builder.addAlloc(size, @"align"); | ||
| 990 | try c.genInitializer(alloc, ty, data.un); | ||
| 991 | return alloc; | ||
| 992 | }, | ||
| 993 | .builtin_choose_expr => { | ||
| 994 | const cond = c.tree.value_map.get(data.if3.cond).?; | ||
| 995 | if (cond.getBool()) { | ||
| 996 | return c.genLval(c.tree.data[data.if3.body]); | ||
| 997 | } else { | ||
| 998 | return c.genLval(c.tree.data[data.if3.body + 1]); | ||
| 999 | } | ||
| 1000 | }, | ||
| 1001 | .member_access_expr, | ||
| 1002 | .member_access_ptr_expr, | ||
| 1003 | .array_access_expr, | ||
| 1004 | => return c.comp.diag.fatalNoSrc("TODO CodeGen.genLval {}\n", .{c.node_tag[@intFromEnum(node)]}), | ||
| 1005 | else => unreachable, // Not an lval expression. | ||
| 1006 | } | ||
| 1007 | } | ||
| 1008 | |||
| 1009 | fn genBoolExpr(c: *CodeGen, base: NodeIndex, true_label: Ir.Ref, false_label: Ir.Ref) Error!void { | ||
| 1010 | var node = base; | ||
| 1011 | while (true) switch (c.node_tag[@intFromEnum(node)]) { | ||
| 1012 | .paren_expr => { | ||
| 1013 | node = c.node_data[@intFromEnum(node)].un; | ||
| 1014 | }, | ||
| 1015 | else => break, | ||
| 1016 | }; | ||
| 1017 | |||
| 1018 | const data = c.node_data[@intFromEnum(node)]; | ||
| 1019 | switch (c.node_tag[@intFromEnum(node)]) { | ||
| 1020 | .bool_or_expr => { | ||
| 1021 | if (c.tree.value_map.get(data.bin.lhs)) |lhs| { | ||
| 1022 | const cond = lhs.getBool(); | ||
| 1023 | if (cond) { | ||
| 1024 | if (true_label == c.bool_end_label) { | ||
| 1025 | return c.addBoolPhi(!c.bool_invert); | ||
| 1026 | } | ||
| 1027 | return c.builder.addJump(true_label); | ||
| 1028 | } | ||
| 1029 | return c.genBoolExpr(data.bin.rhs, true_label, false_label); | ||
| 1030 | } | ||
| 1031 | |||
| 1032 | const new_false_label = try c.builder.makeLabel("bool_false"); | ||
| 1033 | try c.genBoolExpr(data.bin.lhs, true_label, new_false_label); | ||
| 1034 | try c.builder.startBlock(new_false_label); | ||
| 1035 | |||
| 1036 | if (c.cond_dummy_ty) |ty| c.cond_dummy_ref = try c.builder.addConstant(Value.int(1), ty); | ||
| 1037 | return c.genBoolExpr(data.bin.rhs, true_label, false_label); | ||
| 1038 | }, | ||
| 1039 | .bool_and_expr => { | ||
| 1040 | if (c.tree.value_map.get(data.bin.lhs)) |lhs| { | ||
| 1041 | const cond = lhs.getBool(); | ||
| 1042 | if (!cond) { | ||
| 1043 | if (false_label == c.bool_end_label) { | ||
| 1044 | return c.addBoolPhi(c.bool_invert); | ||
| 1045 | } | ||
| 1046 | return c.builder.addJump(false_label); | ||
| 1047 | } | ||
| 1048 | return c.genBoolExpr(data.bin.rhs, true_label, false_label); | ||
| 1049 | } | ||
| 1050 | |||
| 1051 | const new_true_label = try c.builder.makeLabel("bool_true"); | ||
| 1052 | try c.genBoolExpr(data.bin.lhs, new_true_label, false_label); | ||
| 1053 | try c.builder.startBlock(new_true_label); | ||
| 1054 | |||
| 1055 | if (c.cond_dummy_ty) |ty| c.cond_dummy_ref = try c.builder.addConstant(Value.int(1), ty); | ||
| 1056 | return c.genBoolExpr(data.bin.rhs, true_label, false_label); | ||
| 1057 | }, | ||
| 1058 | .bool_not_expr => { | ||
| 1059 | c.bool_invert = !c.bool_invert; | ||
| 1060 | defer c.bool_invert = !c.bool_invert; | ||
| 1061 | |||
| 1062 | if (c.cond_dummy_ty) |ty| c.cond_dummy_ref = try c.builder.addConstant(Value.int(0), ty); | ||
| 1063 | return c.genBoolExpr(data.un, false_label, true_label); | ||
| 1064 | }, | ||
| 1065 | .equal_expr => { | ||
| 1066 | const cmp = try c.genComparison(node, .cmp_eq); | ||
| 1067 | if (c.cond_dummy_ty != null) c.cond_dummy_ref = cmp; | ||
| 1068 | return c.addBranch(cmp, true_label, false_label); | ||
| 1069 | }, | ||
| 1070 | .not_equal_expr => { | ||
| 1071 | const cmp = try c.genComparison(node, .cmp_ne); | ||
| 1072 | if (c.cond_dummy_ty != null) c.cond_dummy_ref = cmp; | ||
| 1073 | return c.addBranch(cmp, true_label, false_label); | ||
| 1074 | }, | ||
| 1075 | .less_than_expr => { | ||
| 1076 | const cmp = try c.genComparison(node, .cmp_lt); | ||
| 1077 | if (c.cond_dummy_ty != null) c.cond_dummy_ref = cmp; | ||
| 1078 | return c.addBranch(cmp, true_label, false_label); | ||
| 1079 | }, | ||
| 1080 | .less_than_equal_expr => { | ||
| 1081 | const cmp = try c.genComparison(node, .cmp_lte); | ||
| 1082 | if (c.cond_dummy_ty != null) c.cond_dummy_ref = cmp; | ||
| 1083 | return c.addBranch(cmp, true_label, false_label); | ||
| 1084 | }, | ||
| 1085 | .greater_than_expr => { | ||
| 1086 | const cmp = try c.genComparison(node, .cmp_gt); | ||
| 1087 | if (c.cond_dummy_ty != null) c.cond_dummy_ref = cmp; | ||
| 1088 | return c.addBranch(cmp, true_label, false_label); | ||
| 1089 | }, | ||
| 1090 | .greater_than_equal_expr => { | ||
| 1091 | const cmp = try c.genComparison(node, .cmp_gte); | ||
| 1092 | if (c.cond_dummy_ty != null) c.cond_dummy_ref = cmp; | ||
| 1093 | return c.addBranch(cmp, true_label, false_label); | ||
| 1094 | }, | ||
| 1095 | .explicit_cast, .implicit_cast => switch (data.cast.kind) { | ||
| 1096 | .bool_to_int => { | ||
| 1097 | const operand = try c.genExpr(data.cast.operand); | ||
| 1098 | if (c.cond_dummy_ty != null) c.cond_dummy_ref = operand; | ||
| 1099 | return c.addBranch(operand, true_label, false_label); | ||
| 1100 | }, | ||
| 1101 | else => {}, | ||
| 1102 | }, | ||
| 1103 | .binary_cond_expr => { | ||
| 1104 | if (c.tree.value_map.get(data.if3.cond)) |cond| { | ||
| 1105 | if (cond.getBool()) { | ||
| 1106 | return c.genBoolExpr(c.tree.data[data.if3.body], true_label, false_label); // then | ||
| 1107 | } else { | ||
| 1108 | return c.genBoolExpr(c.tree.data[data.if3.body + 1], true_label, false_label); // else | ||
| 1109 | } | ||
| 1110 | } | ||
| 1111 | |||
| 1112 | const new_false_label = try c.builder.makeLabel("ternary.else"); | ||
| 1113 | try c.genBoolExpr(data.if3.cond, true_label, new_false_label); | ||
| 1114 | |||
| 1115 | try c.builder.startBlock(new_false_label); | ||
| 1116 | if (c.cond_dummy_ty) |ty| c.cond_dummy_ref = try c.builder.addConstant(Value.int(1), ty); | ||
| 1117 | return c.genBoolExpr(c.tree.data[data.if3.body + 1], true_label, false_label); // else | ||
| 1118 | }, | ||
| 1119 | .cond_expr => { | ||
| 1120 | if (c.tree.value_map.get(data.if3.cond)) |cond| { | ||
| 1121 | if (cond.getBool()) { | ||
| 1122 | return c.genBoolExpr(c.tree.data[data.if3.body], true_label, false_label); // then | ||
| 1123 | } else { | ||
| 1124 | return c.genBoolExpr(c.tree.data[data.if3.body + 1], true_label, false_label); // else | ||
| 1125 | } | ||
| 1126 | } | ||
| 1127 | |||
| 1128 | const new_true_label = try c.builder.makeLabel("ternary.then"); | ||
| 1129 | const new_false_label = try c.builder.makeLabel("ternary.else"); | ||
| 1130 | try c.genBoolExpr(data.if3.cond, new_true_label, new_false_label); | ||
| 1131 | |||
| 1132 | try c.builder.startBlock(new_true_label); | ||
| 1133 | try c.genBoolExpr(c.tree.data[data.if3.body], true_label, false_label); // then | ||
| 1134 | try c.builder.startBlock(new_false_label); | ||
| 1135 | if (c.cond_dummy_ty) |ty| c.cond_dummy_ref = try c.builder.addConstant(Value.int(1), ty); | ||
| 1136 | return c.genBoolExpr(c.tree.data[data.if3.body + 1], true_label, false_label); // else | ||
| 1137 | }, | ||
| 1138 | else => {}, | ||
| 1139 | } | ||
| 1140 | |||
| 1141 | if (c.tree.value_map.get(node)) |value| { | ||
| 1142 | if (value.getBool()) { | ||
| 1143 | if (true_label == c.bool_end_label) { | ||
| 1144 | return c.addBoolPhi(!c.bool_invert); | ||
| 1145 | } | ||
| 1146 | return c.builder.addJump(true_label); | ||
| 1147 | } else { | ||
| 1148 | if (false_label == c.bool_end_label) { | ||
| 1149 | return c.addBoolPhi(c.bool_invert); | ||
| 1150 | } | ||
| 1151 | return c.builder.addJump(false_label); | ||
| 1152 | } | ||
| 1153 | } | ||
| 1154 | |||
| 1155 | // Assume int operand. | ||
| 1156 | const lhs = try c.genExpr(node); | ||
| 1157 | const rhs = try c.builder.addConstant(Value.int(0), try c.genType(c.node_ty[@intFromEnum(node)])); | ||
| 1158 | const cmp = try c.builder.addInst(.cmp_ne, .{ .bin = .{ .lhs = lhs, .rhs = rhs } }, .i1); | ||
| 1159 | if (c.cond_dummy_ty != null) c.cond_dummy_ref = cmp; | ||
| 1160 | try c.addBranch(cmp, true_label, false_label); | ||
| 1161 | } | ||
| 1162 | |||
| 1163 | fn genBuiltinCall(c: *CodeGen, builtin: Builtin, arg_nodes: []const NodeIndex, ty: Type) Error!Ir.Ref { | ||
| 1164 | _ = arg_nodes; | ||
| 1165 | _ = ty; | ||
| 1166 | return c.comp.diag.fatalNoSrc("TODO CodeGen.genBuiltinCall {s}\n", .{Builtin.nameFromTag(builtin.tag).span()}); | ||
| 1167 | } | ||
| 1168 | |||
| 1169 | fn genCall(c: *CodeGen, fn_node: NodeIndex, arg_nodes: []const NodeIndex, ty: Type) Error!Ir.Ref { | ||
| 1170 | // Detect direct calls. | ||
| 1171 | const fn_ref = blk: { | ||
| 1172 | const data = c.node_data[@intFromEnum(fn_node)]; | ||
| 1173 | if (c.node_tag[@intFromEnum(fn_node)] != .implicit_cast or data.cast.kind != .function_to_pointer) { | ||
| 1174 | break :blk try c.genExpr(fn_node); | ||
| 1175 | } | ||
| 1176 | |||
| 1177 | var cur = @intFromEnum(data.cast.operand); | ||
| 1178 | while (true) switch (c.node_tag[cur]) { | ||
| 1179 | .paren_expr, .addr_of_expr, .deref_expr => { | ||
| 1180 | cur = @intFromEnum(c.node_data[cur].un); | ||
| 1181 | }, | ||
| 1182 | .implicit_cast => { | ||
| 1183 | const cast = c.node_data[cur].cast; | ||
| 1184 | if (cast.kind != .function_to_pointer) { | ||
| 1185 | break :blk try c.genExpr(fn_node); | ||
| 1186 | } | ||
| 1187 | cur = @intFromEnum(cast.operand); | ||
| 1188 | }, | ||
| 1189 | .decl_ref_expr => { | ||
| 1190 | const slice = c.tree.tokSlice(c.node_data[cur].decl_ref); | ||
| 1191 | const name = try c.comp.intern(slice); | ||
| 1192 | var i = c.symbols.items.len; | ||
| 1193 | while (i > 0) { | ||
| 1194 | i -= 1; | ||
| 1195 | if (c.symbols.items[i].name == name) { | ||
| 1196 | break :blk try c.genExpr(fn_node); | ||
| 1197 | } | ||
| 1198 | } | ||
| 1199 | |||
| 1200 | const duped_name = try c.builder.arena.allocator().dupeZ(u8, slice); | ||
| 1201 | const ref: Ir.Ref = @enumFromInt(c.builder.instructions.len); | ||
| 1202 | try c.builder.instructions.append(c.builder.gpa, .{ .tag = .symbol, .data = .{ .label = duped_name }, .ty = .ptr }); | ||
| 1203 | break :blk ref; | ||
| 1204 | }, | ||
| 1205 | else => break :blk try c.genExpr(fn_node), | ||
| 1206 | }; | ||
| 1207 | }; | ||
| 1208 | |||
| 1209 | const args = try c.builder.arena.allocator().alloc(Ir.Ref, arg_nodes.len); | ||
| 1210 | for (arg_nodes, args) |node, *arg| { | ||
| 1211 | // TODO handle calling convention here | ||
| 1212 | arg.* = try c.genExpr(node); | ||
| 1213 | } | ||
| 1214 | // TODO handle variadic call | ||
| 1215 | const call = try c.builder.arena.allocator().create(Ir.Inst.Call); | ||
| 1216 | call.* = .{ | ||
| 1217 | .func = fn_ref, | ||
| 1218 | .args_len = @intCast(args.len), | ||
| 1219 | .args_ptr = args.ptr, | ||
| 1220 | }; | ||
| 1221 | return c.builder.addInst(.call, .{ .call = call }, try c.genType(ty)); | ||
| 1222 | } | ||
| 1223 | |||
| 1224 | fn genCompoundAssign(c: *CodeGen, node: NodeIndex, tag: Ir.Inst.Tag) Error!Ir.Ref { | ||
| 1225 | const bin = c.node_data[@intFromEnum(node)].bin; | ||
| 1226 | const ty = c.node_ty[@intFromEnum(node)]; | ||
| 1227 | const rhs = try c.genExpr(bin.rhs); | ||
| 1228 | const lhs = try c.genLval(bin.lhs); | ||
| 1229 | const res = try c.addBin(tag, lhs, rhs, ty); | ||
| 1230 | try c.builder.addStore(lhs, res); | ||
| 1231 | return res; | ||
| 1232 | } | ||
| 1233 | |||
| 1234 | fn genBinOp(c: *CodeGen, node: NodeIndex, tag: Ir.Inst.Tag) Error!Ir.Ref { | ||
| 1235 | const bin = c.node_data[@intFromEnum(node)].bin; | ||
| 1236 | const ty = c.node_ty[@intFromEnum(node)]; | ||
| 1237 | const lhs = try c.genExpr(bin.lhs); | ||
| 1238 | const rhs = try c.genExpr(bin.rhs); | ||
| 1239 | return c.addBin(tag, lhs, rhs, ty); | ||
| 1240 | } | ||
| 1241 | |||
| 1242 | fn genComparison(c: *CodeGen, node: NodeIndex, tag: Ir.Inst.Tag) Error!Ir.Ref { | ||
| 1243 | const bin = c.node_data[@intFromEnum(node)].bin; | ||
| 1244 | const lhs = try c.genExpr(bin.lhs); | ||
| 1245 | const rhs = try c.genExpr(bin.rhs); | ||
| 1246 | |||
| 1247 | return c.builder.addInst(tag, .{ .bin = .{ .lhs = lhs, .rhs = rhs } }, .i1); | ||
| 1248 | } | ||
| 1249 | |||
| 1250 | fn genPtrArithmetic(c: *CodeGen, ptr: Ir.Ref, offset: Ir.Ref, offset_ty: Type, ty: Type) Error!Ir.Ref { | ||
| 1251 | // TODO consider adding a getelemptr instruction | ||
| 1252 | const size = ty.elemType().sizeof(c.comp).?; | ||
| 1253 | if (size == 1) { | ||
| 1254 | return c.builder.addInst(.add, .{ .bin = .{ .lhs = ptr, .rhs = offset } }, try c.genType(ty)); | ||
| 1255 | } | ||
| 1256 | |||
| 1257 | const size_inst = try c.builder.addConstant(Value.int(size), try c.genType(offset_ty)); | ||
| 1258 | const offset_inst = try c.addBin(.mul, offset, size_inst, offset_ty); | ||
| 1259 | return c.addBin(.add, ptr, offset_inst, offset_ty); | ||
| 1260 | } | ||
| 1261 | |||
| 1262 | fn genInitializer(c: *CodeGen, ptr: Ir.Ref, dest_ty: Type, initializer: NodeIndex) Error!void { | ||
| 1263 | std.debug.assert(initializer != .none); | ||
| 1264 | switch (c.node_tag[@intFromEnum(initializer)]) { | ||
| 1265 | .array_init_expr_two, | ||
| 1266 | .array_init_expr, | ||
| 1267 | .struct_init_expr_two, | ||
| 1268 | .struct_init_expr, | ||
| 1269 | .union_init_expr, | ||
| 1270 | .array_filler_expr, | ||
| 1271 | .default_init_expr, | ||
| 1272 | => return c.comp.diag.fatalNoSrc("TODO CodeGen.genInitializer {}\n", .{c.node_tag[@intFromEnum(initializer)]}), | ||
| 1273 | .string_literal_expr => { | ||
| 1274 | const val = c.tree.value_map.get(initializer).?; | ||
| 1275 | const str_ptr = try c.builder.addConstant(val, .ptr); | ||
| 1276 | if (dest_ty.isArray()) { | ||
| 1277 | return c.comp.diag.fatalNoSrc("TODO memcpy\n", .{}); | ||
| 1278 | } else { | ||
| 1279 | try c.builder.addStore(ptr, str_ptr); | ||
| 1280 | } | ||
| 1281 | }, | ||
| 1282 | else => { | ||
| 1283 | const res = try c.genExpr(initializer); | ||
| 1284 | try c.builder.addStore(ptr, res); | ||
| 1285 | }, | ||
| 1286 | } | ||
| 1287 | } | ||
| 1288 | |||
| 1289 | fn genVar(c: *CodeGen, decl: NodeIndex) Error!void { | ||
| 1290 | _ = decl; | ||
| 1291 | return c.comp.diag.fatalNoSrc("TODO CodeGen.genVar\n", .{}); | ||
| 1292 | } | ||
deps/aro/Codegen_legacy.zig deleted-108| ... | @@ -1,108 +0,0 @@ | ||
| 1 | const std = @import("std"); | ||
| 2 | const Compilation = @import("Compilation.zig"); | ||
| 3 | const Tree = @import("Tree.zig"); | ||
| 4 | const NodeIndex = Tree.NodeIndex; | ||
| 5 | const Object = @import("Object.zig"); | ||
| 6 | const x86_64 = @import("codegen/x86_64.zig"); | ||
| 7 | |||
| 8 | const Codegen = @This(); | ||
| 9 | |||
| 10 | comp: *Compilation, | ||
| 11 | tree: Tree, | ||
| 12 | obj: *Object, | ||
| 13 | node_tag: []const Tree.Tag, | ||
| 14 | node_data: []const Tree.Node.Data, | ||
| 15 | |||
| 16 | pub const Error = Compilation.Error || error{CodegenFailed}; | ||
| 17 | |||
| 18 | /// Generate tree to an object file. | ||
| 19 | /// Caller is responsible for flushing and freeing the returned object. | ||
| 20 | pub fn generateTree(comp: *Compilation, tree: Tree) Compilation.Error!*Object { | ||
| 21 | var c = Codegen{ | ||
| 22 | .comp = comp, | ||
| 23 | .tree = tree, | ||
| 24 | .obj = try Object.create(comp), | ||
| 25 | .node_tag = tree.nodes.items(.tag), | ||
| 26 | .node_data = tree.nodes.items(.data), | ||
| 27 | }; | ||
| 28 | errdefer c.obj.deinit(); | ||
| 29 | |||
| 30 | const node_tags = tree.nodes.items(.tag); | ||
| 31 | for (tree.root_decls) |decl| { | ||
| 32 | switch (node_tags[@intFromEnum(decl)]) { | ||
| 33 | // these produce no code | ||
| 34 | .static_assert, | ||
| 35 | .typedef, | ||
| 36 | .struct_decl_two, | ||
| 37 | .union_decl_two, | ||
| 38 | .enum_decl_two, | ||
| 39 | .struct_decl, | ||
| 40 | .union_decl, | ||
| 41 | .enum_decl, | ||
| 42 | .struct_forward_decl, | ||
| 43 | .union_forward_decl, | ||
| 44 | .enum_forward_decl, | ||
| 45 | => {}, | ||
| 46 | |||
| 47 | // define symbol | ||
| 48 | .fn_proto, | ||
| 49 | .static_fn_proto, | ||
| 50 | .inline_fn_proto, | ||
| 51 | .inline_static_fn_proto, | ||
| 52 | .extern_var, | ||
| 53 | .threadlocal_extern_var, | ||
| 54 | => { | ||
| 55 | const name = c.tree.tokSlice(c.node_data[@intFromEnum(decl)].decl.name); | ||
| 56 | _ = try c.obj.declareSymbol(.undefined, name, .Strong, .external, 0, 0); | ||
| 57 | }, | ||
| 58 | |||
| 59 | // function definition | ||
| 60 | .fn_def, | ||
| 61 | .static_fn_def, | ||
| 62 | .inline_fn_def, | ||
| 63 | .inline_static_fn_def, | ||
| 64 | => c.genFn(decl) catch |err| switch (err) { | ||
| 65 | error.FatalError => return error.FatalError, | ||
| 66 | error.OutOfMemory => return error.OutOfMemory, | ||
| 67 | error.CodegenFailed => continue, | ||
| 68 | }, | ||
| 69 | |||
| 70 | .@"var", | ||
| 71 | .static_var, | ||
| 72 | .threadlocal_var, | ||
| 73 | .threadlocal_static_var, | ||
| 74 | .implicit_static_var, | ||
| 75 | => c.genVar(decl) catch |err| switch (err) { | ||
| 76 | error.FatalError => return error.FatalError, | ||
| 77 | error.OutOfMemory => return error.OutOfMemory, | ||
| 78 | error.CodegenFailed => continue, | ||
| 79 | }, | ||
| 80 | |||
| 81 | // TODO | ||
| 82 | .file_scope_asm => {}, | ||
| 83 | |||
| 84 | else => unreachable, | ||
| 85 | } | ||
| 86 | } | ||
| 87 | |||
| 88 | return c.obj; | ||
| 89 | } | ||
| 90 | |||
| 91 | fn genFn(c: *Codegen, decl: NodeIndex) Error!void { | ||
| 92 | const section: Object.Section = .func; | ||
| 93 | const data = try c.obj.getSection(section); | ||
| 94 | const start_len = data.items.len; | ||
| 95 | switch (c.comp.target.cpu.arch) { | ||
| 96 | .x86_64 => try x86_64.genFn(c, decl, data), | ||
| 97 | else => unreachable, | ||
| 98 | } | ||
| 99 | const name = c.tree.tokSlice(c.node_data[@intFromEnum(decl)].decl.name); | ||
| 100 | _ = try c.obj.declareSymbol(section, name, .Strong, .func, start_len, data.items.len - start_len); | ||
| 101 | } | ||
| 102 | |||
| 103 | fn genVar(c: *Codegen, decl: NodeIndex) Error!void { | ||
| 104 | switch (c.comp.target.cpu.arch) { | ||
| 105 | .x86_64 => try x86_64.genVar(c, decl), | ||
| 106 | else => unreachable, | ||
| 107 | } | ||
| 108 | } | ||
deps/aro/Compilation.zig deleted-1555| ... | @@ -1,1555 +0,0 @@ | ||
| 1 | const std = @import("std"); | ||
| 2 | const assert = std.debug.assert; | ||
| 3 | const mem = std.mem; | ||
| 4 | const Allocator = mem.Allocator; | ||
| 5 | const EpochSeconds = std.time.epoch.EpochSeconds; | ||
| 6 | const Builtins = @import("Builtins.zig"); | ||
| 7 | const Builtin = Builtins.Builtin; | ||
| 8 | const Diagnostics = @import("Diagnostics.zig"); | ||
| 9 | const LangOpts = @import("LangOpts.zig"); | ||
| 10 | const Source = @import("Source.zig"); | ||
| 11 | const Tokenizer = @import("Tokenizer.zig"); | ||
| 12 | const Token = Tokenizer.Token; | ||
| 13 | const Type = @import("Type.zig"); | ||
| 14 | const Pragma = @import("Pragma.zig"); | ||
| 15 | const StringInterner = @import("StringInterner.zig"); | ||
| 16 | const record_layout = @import("record_layout.zig"); | ||
| 17 | const target_util = @import("target.zig"); | ||
| 18 | |||
| 19 | const Compilation = @This(); | ||
| 20 | |||
| 21 | pub const Error = error{ | ||
| 22 | /// A fatal error has ocurred and compilation has stopped. | ||
| 23 | FatalError, | ||
| 24 | } || Allocator.Error; | ||
| 25 | |||
| 26 | pub const bit_int_max_bits = 128; | ||
| 27 | const path_buf_stack_limit = 1024; | ||
| 28 | |||
| 29 | /// Environment variables used during compilation / linking. | ||
| 30 | pub const Environment = struct { | ||
| 31 | /// Directory to use for temporary files | ||
| 32 | /// TODO: not implemented yet | ||
| 33 | tmpdir: ?[]const u8 = null, | ||
| 34 | |||
| 35 | /// PATH environment variable used to search for programs | ||
| 36 | path: ?[]const u8 = null, | ||
| 37 | |||
| 38 | /// Directories to try when searching for subprograms. | ||
| 39 | /// TODO: not implemented yet | ||
| 40 | compiler_path: ?[]const u8 = null, | ||
| 41 | |||
| 42 | /// Directories to try when searching for special linker files, if compiling for the native target | ||
| 43 | /// TODO: not implemented yet | ||
| 44 | library_path: ?[]const u8 = null, | ||
| 45 | |||
| 46 | /// List of directories to be searched as if specified with -I, but after any paths given with -I options on the command line | ||
| 47 | /// Used regardless of the language being compiled | ||
| 48 | /// TODO: not implemented yet | ||
| 49 | cpath: ?[]const u8 = null, | ||
| 50 | |||
| 51 | /// List of directories to be searched as if specified with -I, but after any paths given with -I options on the command line | ||
| 52 | /// Used if the language being compiled is C | ||
| 53 | /// TODO: not implemented yet | ||
| 54 | c_include_path: ?[]const u8 = null, | ||
| 55 | |||
| 56 | /// UNIX timestamp to be used instead of the current date and time in the __DATE__ and __TIME__ macros | ||
| 57 | source_date_epoch: ?[]const u8 = null, | ||
| 58 | |||
| 59 | /// Load all of the environment variables using the std.process API. Do not use if using Aro as a shared library on Linux without libc | ||
| 60 | /// See https://github.com/ziglang/zig/issues/4524 | ||
| 61 | /// Assumes that `self` has been default-initialized | ||
| 62 | pub fn loadAll(self: *Environment, allocator: std.mem.Allocator) !void { | ||
| 63 | errdefer self.deinit(allocator); | ||
| 64 | |||
| 65 | inline for (@typeInfo(@TypeOf(self.*)).Struct.fields) |field| { | ||
| 66 | std.debug.assert(@field(self, field.name) == null); | ||
| 67 | |||
| 68 | var env_var_buf: [field.name.len]u8 = undefined; | ||
| 69 | const env_var_name = std.ascii.upperString(&env_var_buf, field.name); | ||
| 70 | const val: ?[]const u8 = std.process.getEnvVarOwned(allocator, env_var_name) catch |err| switch (err) { | ||
| 71 | error.OutOfMemory => |e| return e, | ||
| 72 | error.EnvironmentVariableNotFound => null, | ||
| 73 | error.InvalidUtf8 => null, | ||
| 74 | }; | ||
| 75 | @field(self, field.name) = val; | ||
| 76 | } | ||
| 77 | } | ||
| 78 | |||
| 79 | /// Use this only if environment slices were allocated with `allocator` (such as via `loadAll`) | ||
| 80 | pub fn deinit(self: *Environment, allocator: std.mem.Allocator) void { | ||
| 81 | inline for (@typeInfo(@TypeOf(self.*)).Struct.fields) |field| { | ||
| 82 | if (@field(self, field.name)) |slice| { | ||
| 83 | allocator.free(slice); | ||
| 84 | } | ||
| 85 | } | ||
| 86 | self.* = undefined; | ||
| 87 | } | ||
| 88 | }; | ||
| 89 | |||
| 90 | gpa: Allocator, | ||
| 91 | environment: Environment = .{}, | ||
| 92 | sources: std.StringArrayHashMap(Source), | ||
| 93 | diag: Diagnostics, | ||
| 94 | include_dirs: std.ArrayList([]const u8), | ||
| 95 | system_include_dirs: std.ArrayList([]const u8), | ||
| 96 | target: std.Target = @import("builtin").target, | ||
| 97 | pragma_handlers: std.StringArrayHashMap(*Pragma), | ||
| 98 | langopts: LangOpts = .{}, | ||
| 99 | generated_buf: std.ArrayList(u8), | ||
| 100 | builtins: Builtins = .{}, | ||
| 101 | types: struct { | ||
| 102 | wchar: Type = undefined, | ||
| 103 | uint_least16_t: Type = undefined, | ||
| 104 | uint_least32_t: Type = undefined, | ||
| 105 | ptrdiff: Type = undefined, | ||
| 106 | size: Type = undefined, | ||
| 107 | va_list: Type = undefined, | ||
| 108 | pid_t: Type = undefined, | ||
| 109 | ns_constant_string: struct { | ||
| 110 | ty: Type = undefined, | ||
| 111 | record: Type.Record = undefined, | ||
| 112 | fields: [4]Type.Record.Field = undefined, | ||
| 113 | int_ty: Type = .{ .specifier = .int, .qual = .{ .@"const" = true } }, | ||
| 114 | char_ty: Type = .{ .specifier = .char, .qual = .{ .@"const" = true } }, | ||
| 115 | } = .{}, | ||
| 116 | file: Type = .{ .specifier = .invalid }, | ||
| 117 | jmp_buf: Type = .{ .specifier = .invalid }, | ||
| 118 | sigjmp_buf: Type = .{ .specifier = .invalid }, | ||
| 119 | ucontext_t: Type = .{ .specifier = .invalid }, | ||
| 120 | intmax: Type = .{ .specifier = .invalid }, | ||
| 121 | intptr: Type = .{ .specifier = .invalid }, | ||
| 122 | int16: Type = .{ .specifier = .invalid }, | ||
| 123 | int64: Type = .{ .specifier = .invalid }, | ||
| 124 | } = .{}, | ||
| 125 | string_interner: StringInterner = .{}, | ||
| 126 | ms_cwd_source_id: ?Source.Id = null, | ||
| 127 | |||
| 128 | pub fn init(gpa: Allocator) Compilation { | ||
| 129 | return .{ | ||
| 130 | .gpa = gpa, | ||
| 131 | .sources = std.StringArrayHashMap(Source).init(gpa), | ||
| 132 | .diag = Diagnostics.init(gpa), | ||
| 133 | .include_dirs = std.ArrayList([]const u8).init(gpa), | ||
| 134 | .system_include_dirs = std.ArrayList([]const u8).init(gpa), | ||
| 135 | .pragma_handlers = std.StringArrayHashMap(*Pragma).init(gpa), | ||
| 136 | .generated_buf = std.ArrayList(u8).init(gpa), | ||
| 137 | }; | ||
| 138 | } | ||
| 139 | |||
| 140 | pub fn deinit(comp: *Compilation) void { | ||
| 141 | for (comp.pragma_handlers.values()) |pragma| { | ||
| 142 | pragma.deinit(pragma, comp); | ||
| 143 | } | ||
| 144 | for (comp.sources.values()) |source| { | ||
| 145 | comp.gpa.free(source.path); | ||
| 146 | comp.gpa.free(source.buf); | ||
| 147 | comp.gpa.free(source.splice_locs); | ||
| 148 | } | ||
| 149 | comp.sources.deinit(); | ||
| 150 | comp.diag.deinit(); | ||
| 151 | comp.include_dirs.deinit(); | ||
| 152 | for (comp.system_include_dirs.items) |path| comp.gpa.free(path); | ||
| 153 | comp.system_include_dirs.deinit(); | ||
| 154 | comp.pragma_handlers.deinit(); | ||
| 155 | comp.generated_buf.deinit(); | ||
| 156 | comp.builtins.deinit(comp.gpa); | ||
| 157 | comp.string_interner.deinit(comp.gpa); | ||
| 158 | } | ||
| 159 | |||
| 160 | pub fn intern(comp: *Compilation, str: []const u8) !StringInterner.StringId { | ||
| 161 | return comp.string_interner.intern(comp.gpa, str); | ||
| 162 | } | ||
| 163 | |||
| 164 | pub fn getSourceEpoch(self: *const Compilation, max: i64) !?i64 { | ||
| 165 | const provided = self.environment.source_date_epoch orelse return null; | ||
| 166 | const parsed = std.fmt.parseInt(i64, provided, 10) catch return error.InvalidEpoch; | ||
| 167 | if (parsed < 0 or parsed > max) return error.InvalidEpoch; | ||
| 168 | return parsed; | ||
| 169 | } | ||
| 170 | |||
| 171 | /// Dec 31 9999 23:59:59 | ||
| 172 | const max_timestamp = 253402300799; | ||
| 173 | |||
| 174 | fn getTimestamp(comp: *Compilation) !u47 { | ||
| 175 | const provided: ?i64 = comp.getSourceEpoch(max_timestamp) catch blk: { | ||
| 176 | try comp.diag.add(.{ | ||
| 177 | .tag = .invalid_source_epoch, | ||
| 178 | .loc = .{ .id = .unused, .byte_offset = 0, .line = 0 }, | ||
| 179 | }, &.{}); | ||
| 180 | break :blk null; | ||
| 181 | }; | ||
| 182 | const timestamp = provided orelse std.time.timestamp(); | ||
| 183 | return @intCast(std.math.clamp(timestamp, 0, max_timestamp)); | ||
| 184 | } | ||
| 185 | |||
| 186 | fn generateDateAndTime(w: anytype, timestamp: u47) !void { | ||
| 187 | const epoch_seconds = EpochSeconds{ .secs = timestamp }; | ||
| 188 | const epoch_day = epoch_seconds.getEpochDay(); | ||
| 189 | const day_seconds = epoch_seconds.getDaySeconds(); | ||
| 190 | const year_day = epoch_day.calculateYearDay(); | ||
| 191 | const month_day = year_day.calculateMonthDay(); | ||
| 192 | |||
| 193 | const month_names = [_][]const u8{ "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" }; | ||
| 194 | std.debug.assert(std.time.epoch.Month.jan.numeric() == 1); | ||
| 195 | |||
| 196 | const month_name = month_names[month_day.month.numeric() - 1]; | ||
| 197 | try w.print("#define __DATE__ \"{s} {d: >2} {d}\"\n", .{ | ||
| 198 | month_name, | ||
| 199 | month_day.day_index + 1, | ||
| 200 | year_day.year, | ||
| 201 | }); | ||
| 202 | try w.print("#define __TIME__ \"{d:0>2}:{d:0>2}:{d:0>2}\"\n", .{ | ||
| 203 | day_seconds.getHoursIntoDay(), | ||
| 204 | day_seconds.getMinutesIntoHour(), | ||
| 205 | day_seconds.getSecondsIntoMinute(), | ||
| 206 | }); | ||
| 207 | |||
| 208 | const day_names = [_][]const u8{ "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun" }; | ||
| 209 | // days since Thu Oct 1 1970 | ||
| 210 | const day_name = day_names[@intCast((epoch_day.day + 3) % 7)]; | ||
| 211 | try w.print("#define __TIMESTAMP__ \"{s} {s} {d: >2} {d:0>2}:{d:0>2}:{d:0>2} {d}\"\n", .{ | ||
| 212 | day_name, | ||
| 213 | month_name, | ||
| 214 | month_day.day_index + 1, | ||
| 215 | day_seconds.getHoursIntoDay(), | ||
| 216 | day_seconds.getMinutesIntoHour(), | ||
| 217 | day_seconds.getSecondsIntoMinute(), | ||
| 218 | year_day.year, | ||
| 219 | }); | ||
| 220 | } | ||
| 221 | |||
| 222 | /// Generate builtin macros that will be available to each source file. | ||
| 223 | pub fn generateBuiltinMacros(comp: *Compilation) !Source { | ||
| 224 | try comp.generateBuiltinTypes(); | ||
| 225 | |||
| 226 | var buf = std.ArrayList(u8).init(comp.gpa); | ||
| 227 | defer buf.deinit(); | ||
| 228 | const w = buf.writer(); | ||
| 229 | |||
| 230 | // standard macros | ||
| 231 | try w.writeAll( | ||
| 232 | \\#define __VERSION__ "Aro | ||
| 233 | ++ @import("lib.zig").version_str ++ "\"\n" ++ | ||
| 234 | \\#define __Aro__ | ||
| 235 | \\#define __STDC__ 1 | ||
| 236 | \\#define __STDC_HOSTED__ 1 | ||
| 237 | \\#define __STDC_NO_ATOMICS__ 1 | ||
| 238 | \\#define __STDC_NO_COMPLEX__ 1 | ||
| 239 | \\#define __STDC_NO_THREADS__ 1 | ||
| 240 | \\#define __STDC_NO_VLA__ 1 | ||
| 241 | \\#define __STDC_UTF_16__ 1 | ||
| 242 | \\#define __STDC_UTF_32__ 1 | ||
| 243 | \\ | ||
| 244 | ); | ||
| 245 | if (comp.langopts.standard.StdCVersionMacro()) |stdc_version| { | ||
| 246 | try w.print("#define __STDC_VERSION__ {s}\n", .{stdc_version}); | ||
| 247 | } | ||
| 248 | const ptr_width = comp.target.ptrBitWidth(); | ||
| 249 | |||
| 250 | // os macros | ||
| 251 | switch (comp.target.os.tag) { | ||
| 252 | .linux => try w.writeAll( | ||
| 253 | \\#define linux 1 | ||
| 254 | \\#define __linux 1 | ||
| 255 | \\#define __linux__ 1 | ||
| 256 | \\ | ||
| 257 | ), | ||
| 258 | .windows => if (ptr_width == 32) try w.writeAll( | ||
| 259 | \\#define WIN32 1 | ||
| 260 | \\#define _WIN32 1 | ||
| 261 | \\#define __WIN32 1 | ||
| 262 | \\#define __WIN32__ 1 | ||
| 263 | \\ | ||
| 264 | ) else try w.writeAll( | ||
| 265 | \\#define WIN32 1 | ||
| 266 | \\#define WIN64 1 | ||
| 267 | \\#define _WIN32 1 | ||
| 268 | \\#define _WIN64 1 | ||
| 269 | \\#define __WIN32 1 | ||
| 270 | \\#define __WIN64 1 | ||
| 271 | \\#define __WIN32__ 1 | ||
| 272 | \\#define __WIN64__ 1 | ||
| 273 | \\ | ||
| 274 | ), | ||
| 275 | .freebsd => try w.print("#define __FreeBSD__ {d}\n", .{comp.target.os.version_range.semver.min.major}), | ||
| 276 | .netbsd => try w.writeAll("#define __NetBSD__ 1\n"), | ||
| 277 | .openbsd => try w.writeAll("#define __OpenBSD__ 1\n"), | ||
| 278 | .dragonfly => try w.writeAll("#define __DragonFly__ 1\n"), | ||
| 279 | .solaris => try w.writeAll( | ||
| 280 | \\#define sun 1 | ||
| 281 | \\#define __sun 1 | ||
| 282 | \\ | ||
| 283 | ), | ||
| 284 | .macos => try w.writeAll( | ||
| 285 | \\#define __APPLE__ 1 | ||
| 286 | \\#define __MACH__ 1 | ||
| 287 | \\ | ||
| 288 | ), | ||
| 289 | else => {}, | ||
| 290 | } | ||
| 291 | |||
| 292 | // unix and other additional os macros | ||
| 293 | switch (comp.target.os.tag) { | ||
| 294 | .freebsd, | ||
| 295 | .netbsd, | ||
| 296 | .openbsd, | ||
| 297 | .dragonfly, | ||
| 298 | .linux, | ||
| 299 | => try w.writeAll( | ||
| 300 | \\#define unix 1 | ||
| 301 | \\#define __unix 1 | ||
| 302 | \\#define __unix__ 1 | ||
| 303 | \\ | ||
| 304 | ), | ||
| 305 | else => {}, | ||
| 306 | } | ||
| 307 | if (comp.target.abi == .android) { | ||
| 308 | try w.writeAll("#define __ANDROID__ 1\n"); | ||
| 309 | } | ||
| 310 | |||
| 311 | // architecture macros | ||
| 312 | switch (comp.target.cpu.arch) { | ||
| 313 | .x86_64 => try w.writeAll( | ||
| 314 | \\#define __amd64__ 1 | ||
| 315 | \\#define __amd64 1 | ||
| 316 | \\#define __x86_64 1 | ||
| 317 | \\#define __x86_64__ 1 | ||
| 318 | \\ | ||
| 319 | ), | ||
| 320 | .x86 => try w.writeAll( | ||
| 321 | \\#define i386 1 | ||
| 322 | \\#define __i386 1 | ||
| 323 | \\#define __i386__ 1 | ||
| 324 | \\ | ||
| 325 | ), | ||
| 326 | .mips, | ||
| 327 | .mipsel, | ||
| 328 | .mips64, | ||
| 329 | .mips64el, | ||
| 330 | => try w.writeAll( | ||
| 331 | \\#define __mips__ 1 | ||
| 332 | \\#define mips 1 | ||
| 333 | \\ | ||
| 334 | ), | ||
| 335 | .powerpc, | ||
| 336 | .powerpcle, | ||
| 337 | => try w.writeAll( | ||
| 338 | \\#define __powerpc__ 1 | ||
| 339 | \\#define __POWERPC__ 1 | ||
| 340 | \\#define __ppc__ 1 | ||
| 341 | \\#define __PPC__ 1 | ||
| 342 | \\#define _ARCH_PPC 1 | ||
| 343 | \\ | ||
| 344 | ), | ||
| 345 | .powerpc64, | ||
| 346 | .powerpc64le, | ||
| 347 | => try w.writeAll( | ||
| 348 | \\#define __powerpc 1 | ||
| 349 | \\#define __powerpc__ 1 | ||
| 350 | \\#define __powerpc64__ 1 | ||
| 351 | \\#define __POWERPC__ 1 | ||
| 352 | \\#define __ppc__ 1 | ||
| 353 | \\#define __ppc64__ 1 | ||
| 354 | \\#define __PPC__ 1 | ||
| 355 | \\#define __PPC64__ 1 | ||
| 356 | \\#define _ARCH_PPC 1 | ||
| 357 | \\#define _ARCH_PPC64 1 | ||
| 358 | \\ | ||
| 359 | ), | ||
| 360 | .sparc64 => try w.writeAll( | ||
| 361 | \\#define __sparc__ 1 | ||
| 362 | \\#define __sparc 1 | ||
| 363 | \\#define __sparc_v9__ 1 | ||
| 364 | \\ | ||
| 365 | ), | ||
| 366 | .sparc, .sparcel => try w.writeAll( | ||
| 367 | \\#define __sparc__ 1 | ||
| 368 | \\#define __sparc 1 | ||
| 369 | \\ | ||
| 370 | ), | ||
| 371 | .arm, .armeb => try w.writeAll( | ||
| 372 | \\#define __arm__ 1 | ||
| 373 | \\#define __arm 1 | ||
| 374 | \\ | ||
| 375 | ), | ||
| 376 | .thumb, .thumbeb => try w.writeAll( | ||
| 377 | \\#define __arm__ 1 | ||
| 378 | \\#define __arm 1 | ||
| 379 | \\#define __thumb__ 1 | ||
| 380 | \\ | ||
| 381 | ), | ||
| 382 | .aarch64, .aarch64_be => try w.writeAll("#define __aarch64__ 1\n"), | ||
| 383 | .msp430 => try w.writeAll( | ||
| 384 | \\#define MSP430 1 | ||
| 385 | \\#define __MSP430__ 1 | ||
| 386 | \\ | ||
| 387 | ), | ||
| 388 | else => {}, | ||
| 389 | } | ||
| 390 | |||
| 391 | if (comp.target.os.tag != .windows) switch (ptr_width) { | ||
| 392 | 64 => try w.writeAll( | ||
| 393 | \\#define _LP64 1 | ||
| 394 | \\#define __LP64__ 1 | ||
| 395 | \\ | ||
| 396 | ), | ||
| 397 | 32 => try w.writeAll("#define _ILP32 1\n"), | ||
| 398 | else => {}, | ||
| 399 | }; | ||
| 400 | |||
| 401 | try w.writeAll( | ||
| 402 | \\#define __ORDER_LITTLE_ENDIAN__ 1234 | ||
| 403 | \\#define __ORDER_BIG_ENDIAN__ 4321 | ||
| 404 | \\#define __ORDER_PDP_ENDIAN__ 3412 | ||
| 405 | \\ | ||
| 406 | ); | ||
| 407 | if (comp.target.cpu.arch.endian() == .little) try w.writeAll( | ||
| 408 | \\#define __BYTE_ORDER__ __ORDER_LITTLE_ENDIAN__ | ||
| 409 | \\#define __LITTLE_ENDIAN__ 1 | ||
| 410 | \\ | ||
| 411 | ) else try w.writeAll( | ||
| 412 | \\#define __BYTE_ORDER__ __ORDER_BIG_ENDIAN__ | ||
| 413 | \\#define __BIG_ENDIAN__ 1 | ||
| 414 | \\ | ||
| 415 | ); | ||
| 416 | |||
| 417 | // timestamps | ||
| 418 | const timestamp = try comp.getTimestamp(); | ||
| 419 | try generateDateAndTime(w, timestamp); | ||
| 420 | |||
| 421 | // types | ||
| 422 | if (comp.getCharSignedness() == .unsigned) try w.writeAll("#define __CHAR_UNSIGNED__ 1\n"); | ||
| 423 | try w.writeAll("#define __CHAR_BIT__ 8\n"); | ||
| 424 | |||
| 425 | // int maxs | ||
| 426 | try comp.generateIntWidth(w, "BOOL", .{ .specifier = .bool }); | ||
| 427 | try comp.generateIntMaxAndWidth(w, "SCHAR", .{ .specifier = .schar }); | ||
| 428 | try comp.generateIntMaxAndWidth(w, "SHRT", .{ .specifier = .short }); | ||
| 429 | try comp.generateIntMaxAndWidth(w, "INT", .{ .specifier = .int }); | ||
| 430 | try comp.generateIntMaxAndWidth(w, "LONG", .{ .specifier = .long }); | ||
| 431 | try comp.generateIntMaxAndWidth(w, "LONG_LONG", .{ .specifier = .long_long }); | ||
| 432 | try comp.generateIntMaxAndWidth(w, "WCHAR", comp.types.wchar); | ||
| 433 | // try comp.generateIntMax(w, "WINT", comp.types.wchar); | ||
| 434 | try comp.generateIntMaxAndWidth(w, "INTMAX", comp.types.intmax); | ||
| 435 | try comp.generateIntMaxAndWidth(w, "SIZE", comp.types.size); | ||
| 436 | try comp.generateIntMaxAndWidth(w, "UINTMAX", comp.types.intmax.makeIntegerUnsigned()); | ||
| 437 | try comp.generateIntMaxAndWidth(w, "PTRDIFF", comp.types.ptrdiff); | ||
| 438 | try comp.generateIntMaxAndWidth(w, "INTPTR", comp.types.intptr); | ||
| 439 | try comp.generateIntMaxAndWidth(w, "UINTPTR", comp.types.intptr.makeIntegerUnsigned()); | ||
| 440 | |||
| 441 | // int widths | ||
| 442 | try w.print("#define __BITINT_MAXWIDTH__ {d}\n", .{bit_int_max_bits}); | ||
| 443 | |||
| 444 | // sizeof types | ||
| 445 | try comp.generateSizeofType(w, "__SIZEOF_FLOAT__", .{ .specifier = .float }); | ||
| 446 | try comp.generateSizeofType(w, "__SIZEOF_DOUBLE__", .{ .specifier = .double }); | ||
| 447 | try comp.generateSizeofType(w, "__SIZEOF_LONG_DOUBLE__", .{ .specifier = .long_double }); | ||
| 448 | try comp.generateSizeofType(w, "__SIZEOF_SHORT__", .{ .specifier = .short }); | ||
| 449 | try comp.generateSizeofType(w, "__SIZEOF_INT__", .{ .specifier = .int }); | ||
| 450 | try comp.generateSizeofType(w, "__SIZEOF_LONG__", .{ .specifier = .long }); | ||
| 451 | try comp.generateSizeofType(w, "__SIZEOF_LONG_LONG__", .{ .specifier = .long_long }); | ||
| 452 | try comp.generateSizeofType(w, "__SIZEOF_POINTER__", .{ .specifier = .pointer }); | ||
| 453 | try comp.generateSizeofType(w, "__SIZEOF_PTRDIFF_T__", comp.types.ptrdiff); | ||
| 454 | try comp.generateSizeofType(w, "__SIZEOF_SIZE_T__", comp.types.size); | ||
| 455 | try comp.generateSizeofType(w, "__SIZEOF_WCHAR_T__", comp.types.wchar); | ||
| 456 | // try comp.generateSizeofType(w, "__SIZEOF_WINT_T__", .{ .specifier = .pointer }); | ||
| 457 | |||
| 458 | // various int types | ||
| 459 | const mapper = comp.string_interner.getSlowTypeMapper(); | ||
| 460 | try generateTypeMacro(w, mapper, "__INTPTR_TYPE__", comp.types.intptr, comp.langopts); | ||
| 461 | try generateTypeMacro(w, mapper, "__UINTPTR_TYPE__", comp.types.intptr.makeIntegerUnsigned(), comp.langopts); | ||
| 462 | |||
| 463 | try generateTypeMacro(w, mapper, "__INTMAX_TYPE__", comp.types.intmax, comp.langopts); | ||
| 464 | try comp.generateSuffixMacro("__INTMAX", w, comp.types.intptr); | ||
| 465 | |||
| 466 | try generateTypeMacro(w, mapper, "__UINTMAX_TYPE__", comp.types.intmax.makeIntegerUnsigned(), comp.langopts); | ||
| 467 | try comp.generateSuffixMacro("__UINTMAX", w, comp.types.intptr.makeIntegerUnsigned()); | ||
| 468 | |||
| 469 | try generateTypeMacro(w, mapper, "__PTRDIFF_TYPE__", comp.types.ptrdiff, comp.langopts); | ||
| 470 | try generateTypeMacro(w, mapper, "__SIZE_TYPE__", comp.types.size, comp.langopts); | ||
| 471 | try generateTypeMacro(w, mapper, "__WCHAR_TYPE__", comp.types.wchar, comp.langopts); | ||
| 472 | |||
| 473 | try comp.generateExactWidthTypes(w, mapper); | ||
| 474 | |||
| 475 | if (target_util.FPSemantics.halfPrecisionType(comp.target)) |half| { | ||
| 476 | try generateFloatMacros(w, "FLT16", half, "F16"); | ||
| 477 | } | ||
| 478 | try generateFloatMacros(w, "FLT", target_util.FPSemantics.forType(.float, comp.target), "F"); | ||
| 479 | try generateFloatMacros(w, "DBL", target_util.FPSemantics.forType(.double, comp.target), ""); | ||
| 480 | try generateFloatMacros(w, "LDBL", target_util.FPSemantics.forType(.longdouble, comp.target), "L"); | ||
| 481 | |||
| 482 | // TODO: clang treats __FLT_EVAL_METHOD__ as a special-cased macro because evaluating it within a scope | ||
| 483 | // where `#pragma clang fp eval_method(X)` has been called produces an error diagnostic. | ||
| 484 | const flt_eval_method = comp.langopts.fp_eval_method orelse target_util.defaultFpEvalMethod(comp.target); | ||
| 485 | try w.print("#define __FLT_EVAL_METHOD__ {d}\n", .{@intFromEnum(flt_eval_method)}); | ||
| 486 | |||
| 487 | try w.writeAll( | ||
| 488 | \\#define __FLT_RADIX__ 2 | ||
| 489 | \\#define __DECIMAL_DIG__ __LDBL_DECIMAL_DIG__ | ||
| 490 | \\ | ||
| 491 | ); | ||
| 492 | |||
| 493 | return comp.addSourceFromBuffer("<builtin>", buf.items); | ||
| 494 | } | ||
| 495 | |||
| 496 | fn generateFloatMacros(w: anytype, prefix: []const u8, semantics: target_util.FPSemantics, ext: []const u8) !void { | ||
| 497 | const denormMin = semantics.chooseValue( | ||
| 498 | []const u8, | ||
| 499 | .{ | ||
| 500 | "5.9604644775390625e-8", | ||
| 501 | "1.40129846e-45", | ||
| 502 | "4.9406564584124654e-324", | ||
| 503 | "3.64519953188247460253e-4951", | ||
| 504 | "4.94065645841246544176568792868221e-324", | ||
| 505 | "6.47517511943802511092443895822764655e-4966", | ||
| 506 | }, | ||
| 507 | ); | ||
| 508 | const digits = semantics.chooseValue(i32, .{ 3, 6, 15, 18, 31, 33 }); | ||
| 509 | const decimalDigits = semantics.chooseValue(i32, .{ 5, 9, 17, 21, 33, 36 }); | ||
| 510 | const epsilon = semantics.chooseValue( | ||
| 511 | []const u8, | ||
| 512 | .{ | ||
| 513 | "9.765625e-4", | ||
| 514 | "1.19209290e-7", | ||
| 515 | "2.2204460492503131e-16", | ||
| 516 | "1.08420217248550443401e-19", | ||
| 517 | "4.94065645841246544176568792868221e-324", | ||
| 518 | "1.92592994438723585305597794258492732e-34", | ||
| 519 | }, | ||
| 520 | ); | ||
| 521 | const mantissaDigits = semantics.chooseValue(i32, .{ 11, 24, 53, 64, 106, 113 }); | ||
| 522 | |||
| 523 | const min10Exp = semantics.chooseValue(i32, .{ -4, -37, -307, -4931, -291, -4931 }); | ||
| 524 | const max10Exp = semantics.chooseValue(i32, .{ 4, 38, 308, 4932, 308, 4932 }); | ||
| 525 | |||
| 526 | const minExp = semantics.chooseValue(i32, .{ -13, -125, -1021, -16381, -968, -16381 }); | ||
| 527 | const maxExp = semantics.chooseValue(i32, .{ 16, 128, 1024, 16384, 1024, 16384 }); | ||
| 528 | |||
| 529 | const min = semantics.chooseValue( | ||
| 530 | []const u8, | ||
| 531 | .{ | ||
| 532 | "6.103515625e-5", | ||
| 533 | "1.17549435e-38", | ||
| 534 | "2.2250738585072014e-308", | ||
| 535 | "3.36210314311209350626e-4932", | ||
| 536 | "2.00416836000897277799610805135016e-292", | ||
| 537 | "3.36210314311209350626267781732175260e-4932", | ||
| 538 | }, | ||
| 539 | ); | ||
| 540 | const max = semantics.chooseValue( | ||
| 541 | []const u8, | ||
| 542 | .{ | ||
| 543 | "6.5504e+4", | ||
| 544 | "3.40282347e+38", | ||
| 545 | "1.7976931348623157e+308", | ||
| 546 | "1.18973149535723176502e+4932", | ||
| 547 | "1.79769313486231580793728971405301e+308", | ||
| 548 | "1.18973149535723176508575932662800702e+4932", | ||
| 549 | }, | ||
| 550 | ); | ||
| 551 | |||
| 552 | var defPrefix = std.BoundedArray(u8, 32).init(0) catch unreachable; | ||
| 553 | defPrefix.writer().print("__{s}_", .{prefix}) catch return error.OutOfMemory; | ||
| 554 | |||
| 555 | const prefix_slice = defPrefix.constSlice(); | ||
| 556 | |||
| 557 | try w.print("#define {s}DENORM_MIN__ {s}{s}\n", .{ prefix_slice, denormMin, ext }); | ||
| 558 | try w.print("#define {s}HAS_DENORM__\n", .{prefix_slice}); | ||
| 559 | try w.print("#define {s}DIG__ {d}\n", .{ prefix_slice, digits }); | ||
| 560 | try w.print("#define {s}DECIMAL_DIG__ {d}\n", .{ prefix_slice, decimalDigits }); | ||
| 561 | |||
| 562 | try w.print("#define {s}EPSILON__ {s}{s}\n", .{ prefix_slice, epsilon, ext }); | ||
| 563 | try w.print("#define {s}HAS_INFINITY__\n", .{prefix_slice}); | ||
| 564 | try w.print("#define {s}HAS_QUIET_NAN__\n", .{prefix_slice}); | ||
| 565 | try w.print("#define {s}MANT_DIG__ {d}\n", .{ prefix_slice, mantissaDigits }); | ||
| 566 | |||
| 567 | try w.print("#define {s}MAX_10_EXP__ {d}\n", .{ prefix_slice, max10Exp }); | ||
| 568 | try w.print("#define {s}MAX_EXP__ {d}\n", .{ prefix_slice, maxExp }); | ||
| 569 | try w.print("#define {s}MAX__ {s}{s}\n", .{ prefix_slice, max, ext }); | ||
| 570 | |||
| 571 | try w.print("#define {s}MIN_10_EXP__ ({d})\n", .{ prefix_slice, min10Exp }); | ||
| 572 | try w.print("#define {s}MIN_EXP__ ({d})\n", .{ prefix_slice, minExp }); | ||
| 573 | try w.print("#define {s}MIN__ {s}{s}\n", .{ prefix_slice, min, ext }); | ||
| 574 | } | ||
| 575 | |||
| 576 | fn generateTypeMacro(w: anytype, mapper: StringInterner.TypeMapper, name: []const u8, ty: Type, langopts: LangOpts) !void { | ||
| 577 | try w.print("#define {s} ", .{name}); | ||
| 578 | try ty.print(mapper, langopts, w); | ||
| 579 | try w.writeByte('\n'); | ||
| 580 | } | ||
| 581 | |||
| 582 | fn generateBuiltinTypes(comp: *Compilation) !void { | ||
| 583 | const os = comp.target.os.tag; | ||
| 584 | const wchar: Type = switch (comp.target.cpu.arch) { | ||
| 585 | .xcore => .{ .specifier = .uchar }, | ||
| 586 | .ve, .msp430 => .{ .specifier = .uint }, | ||
| 587 | .arm, .armeb, .thumb, .thumbeb => .{ | ||
| 588 | .specifier = if (os != .windows and os != .netbsd and os != .openbsd) .uint else .int, | ||
| 589 | }, | ||
| 590 | .aarch64, .aarch64_be, .aarch64_32 => .{ | ||
| 591 | .specifier = if (!os.isDarwin() and os != .netbsd) .uint else .int, | ||
| 592 | }, | ||
| 593 | .x86_64, .x86 => .{ .specifier = if (os == .windows) .ushort else .int }, | ||
| 594 | else => .{ .specifier = .int }, | ||
| 595 | }; | ||
| 596 | |||
| 597 | const ptr_width = comp.target.ptrBitWidth(); | ||
| 598 | const ptrdiff = if (os == .windows and ptr_width == 64) | ||
| 599 | Type{ .specifier = .long_long } | ||
| 600 | else switch (ptr_width) { | ||
| 601 | 16 => Type{ .specifier = .int }, | ||
| 602 | 32 => Type{ .specifier = .int }, | ||
| 603 | 64 => Type{ .specifier = .long }, | ||
| 604 | else => unreachable, | ||
| 605 | }; | ||
| 606 | |||
| 607 | const size = if (os == .windows and ptr_width == 64) | ||
| 608 | Type{ .specifier = .ulong_long } | ||
| 609 | else switch (ptr_width) { | ||
| 610 | 16 => Type{ .specifier = .uint }, | ||
| 611 | 32 => Type{ .specifier = .uint }, | ||
| 612 | 64 => Type{ .specifier = .ulong }, | ||
| 613 | else => unreachable, | ||
| 614 | }; | ||
| 615 | |||
| 616 | const va_list = try comp.generateVaListType(); | ||
| 617 | |||
| 618 | const pid_t: Type = switch (os) { | ||
| 619 | .haiku => .{ .specifier = .long }, | ||
| 620 | // Todo: pid_t is required to "a signed integer type"; are there any systems | ||
| 621 | // on which it is `short int`? | ||
| 622 | else => .{ .specifier = .int }, | ||
| 623 | }; | ||
| 624 | |||
| 625 | const intmax = target_util.intMaxType(comp.target); | ||
| 626 | const intptr = target_util.intPtrType(comp.target); | ||
| 627 | const int16 = target_util.int16Type(comp.target); | ||
| 628 | const int64 = target_util.int64Type(comp.target); | ||
| 629 | |||
| 630 | comp.types = .{ | ||
| 631 | .wchar = wchar, | ||
| 632 | .ptrdiff = ptrdiff, | ||
| 633 | .size = size, | ||
| 634 | .va_list = va_list, | ||
| 635 | .pid_t = pid_t, | ||
| 636 | .intmax = intmax, | ||
| 637 | .intptr = intptr, | ||
| 638 | .int16 = int16, | ||
| 639 | .int64 = int64, | ||
| 640 | .uint_least16_t = comp.intLeastN(16, .unsigned), | ||
| 641 | .uint_least32_t = comp.intLeastN(32, .unsigned), | ||
| 642 | }; | ||
| 643 | |||
| 644 | try comp.generateNsConstantStringType(); | ||
| 645 | } | ||
| 646 | |||
| 647 | /// Smallest integer type with at least N bits | ||
| 648 | fn intLeastN(comp: *const Compilation, bits: usize, signedness: std.builtin.Signedness) Type { | ||
| 649 | const candidates = switch (signedness) { | ||
| 650 | .signed => &[_]Type.Specifier{ .schar, .short, .int, .long, .long_long }, | ||
| 651 | .unsigned => &[_]Type.Specifier{ .uchar, .ushort, .uint, .ulong, .ulong_long }, | ||
| 652 | }; | ||
| 653 | for (candidates) |specifier| { | ||
| 654 | const ty: Type = .{ .specifier = specifier }; | ||
| 655 | if (ty.sizeof(comp).? * 8 >= bits) return ty; | ||
| 656 | } else unreachable; | ||
| 657 | } | ||
| 658 | |||
| 659 | fn intSize(comp: *const Compilation, specifier: Type.Specifier) u64 { | ||
| 660 | const ty = Type{ .specifier = specifier }; | ||
| 661 | return ty.sizeof(comp).?; | ||
| 662 | } | ||
| 663 | |||
| 664 | fn generateExactWidthTypes(comp: *const Compilation, w: anytype, mapper: StringInterner.TypeMapper) !void { | ||
| 665 | try comp.generateExactWidthType(w, mapper, .schar); | ||
| 666 | |||
| 667 | if (comp.intSize(.short) > comp.intSize(.char)) { | ||
| 668 | try comp.generateExactWidthType(w, mapper, .short); | ||
| 669 | } | ||
| 670 | |||
| 671 | if (comp.intSize(.int) > comp.intSize(.short)) { | ||
| 672 | try comp.generateExactWidthType(w, mapper, .int); | ||
| 673 | } | ||
| 674 | |||
| 675 | if (comp.intSize(.long) > comp.intSize(.int)) { | ||
| 676 | try comp.generateExactWidthType(w, mapper, .long); | ||
| 677 | } | ||
| 678 | |||
| 679 | if (comp.intSize(.long_long) > comp.intSize(.long)) { | ||
| 680 | try comp.generateExactWidthType(w, mapper, .long_long); | ||
| 681 | } | ||
| 682 | |||
| 683 | try comp.generateExactWidthType(w, mapper, .uchar); | ||
| 684 | try comp.generateExactWidthIntMax(w, .uchar); | ||
| 685 | try comp.generateExactWidthIntMax(w, .schar); | ||
| 686 | |||
| 687 | if (comp.intSize(.short) > comp.intSize(.char)) { | ||
| 688 | try comp.generateExactWidthType(w, mapper, .ushort); | ||
| 689 | try comp.generateExactWidthIntMax(w, .ushort); | ||
| 690 | try comp.generateExactWidthIntMax(w, .short); | ||
| 691 | } | ||
| 692 | |||
| 693 | if (comp.intSize(.int) > comp.intSize(.short)) { | ||
| 694 | try comp.generateExactWidthType(w, mapper, .uint); | ||
| 695 | try comp.generateExactWidthIntMax(w, .uint); | ||
| 696 | try comp.generateExactWidthIntMax(w, .int); | ||
| 697 | } | ||
| 698 | |||
| 699 | if (comp.intSize(.long) > comp.intSize(.int)) { | ||
| 700 | try comp.generateExactWidthType(w, mapper, .ulong); | ||
| 701 | try comp.generateExactWidthIntMax(w, .ulong); | ||
| 702 | try comp.generateExactWidthIntMax(w, .long); | ||
| 703 | } | ||
| 704 | |||
| 705 | if (comp.intSize(.long_long) > comp.intSize(.long)) { | ||
| 706 | try comp.generateExactWidthType(w, mapper, .ulong_long); | ||
| 707 | try comp.generateExactWidthIntMax(w, .ulong_long); | ||
| 708 | try comp.generateExactWidthIntMax(w, .long_long); | ||
| 709 | } | ||
| 710 | } | ||
| 711 | |||
| 712 | fn generateFmt(comp: *const Compilation, prefix: []const u8, w: anytype, ty: Type) !void { | ||
| 713 | const unsigned = ty.isUnsignedInt(comp); | ||
| 714 | const modifier = ty.formatModifier(); | ||
| 715 | const formats = if (unsigned) "ouxX" else "di"; | ||
| 716 | for (formats) |c| { | ||
| 717 | try w.print("#define {s}_FMT{c}__ \"{s}{c}\"\n", .{ prefix, c, modifier, c }); | ||
| 718 | } | ||
| 719 | } | ||
| 720 | |||
| 721 | fn generateSuffixMacro(comp: *const Compilation, prefix: []const u8, w: anytype, ty: Type) !void { | ||
| 722 | return w.print("#define {s}_C_SUFFIX__ {s}\n", .{ prefix, ty.intValueSuffix(comp) }); | ||
| 723 | } | ||
| 724 | |||
| 725 | /// Generate the following for ty: | ||
| 726 | /// Name macro (e.g. #define __UINT32_TYPE__ unsigned int) | ||
| 727 | /// Format strings (e.g. #define __UINT32_FMTu__ "u") | ||
| 728 | /// Suffix macro (e.g. #define __UINT32_C_SUFFIX__ U) | ||
| 729 | fn generateExactWidthType(comp: *const Compilation, w: anytype, mapper: StringInterner.TypeMapper, specifier: Type.Specifier) !void { | ||
| 730 | var ty = Type{ .specifier = specifier }; | ||
| 731 | const width = 8 * ty.sizeof(comp).?; | ||
| 732 | const unsigned = ty.isUnsignedInt(comp); | ||
| 733 | |||
| 734 | if (width == 16) { | ||
| 735 | ty = if (unsigned) comp.types.int16.makeIntegerUnsigned() else comp.types.int16; | ||
| 736 | } else if (width == 64) { | ||
| 737 | ty = if (unsigned) comp.types.int64.makeIntegerUnsigned() else comp.types.int64; | ||
| 738 | } | ||
| 739 | |||
| 740 | var prefix = std.BoundedArray(u8, 16).init(0) catch unreachable; | ||
| 741 | prefix.writer().print("{s}{d}", .{ if (unsigned) "__UINT" else "__INT", width }) catch return error.OutOfMemory; | ||
| 742 | |||
| 743 | { | ||
| 744 | const len = prefix.len; | ||
| 745 | defer prefix.resize(len) catch unreachable; // restoring previous size | ||
| 746 | prefix.appendSliceAssumeCapacity("_TYPE__"); | ||
| 747 | try generateTypeMacro(w, mapper, prefix.constSlice(), ty, comp.langopts); | ||
| 748 | } | ||
| 749 | |||
| 750 | try comp.generateFmt(prefix.constSlice(), w, ty); | ||
| 751 | try comp.generateSuffixMacro(prefix.constSlice(), w, ty); | ||
| 752 | } | ||
| 753 | |||
| 754 | pub fn hasHalfPrecisionFloatABI(comp: *const Compilation) bool { | ||
| 755 | return comp.langopts.allow_half_args_and_returns or target_util.hasHalfPrecisionFloatABI(comp.target); | ||
| 756 | } | ||
| 757 | |||
| 758 | fn generateNsConstantStringType(comp: *Compilation) !void { | ||
| 759 | comp.types.ns_constant_string.record = .{ | ||
| 760 | .name = try comp.intern("__NSConstantString_tag"), | ||
| 761 | .fields = &comp.types.ns_constant_string.fields, | ||
| 762 | .field_attributes = null, | ||
| 763 | .type_layout = undefined, | ||
| 764 | }; | ||
| 765 | const const_int_ptr = Type{ .specifier = .pointer, .data = .{ .sub_type = &comp.types.ns_constant_string.int_ty } }; | ||
| 766 | const const_char_ptr = Type{ .specifier = .pointer, .data = .{ .sub_type = &comp.types.ns_constant_string.char_ty } }; | ||
| 767 | |||
| 768 | comp.types.ns_constant_string.fields[0] = .{ .name = try comp.intern("isa"), .ty = const_int_ptr }; | ||
| 769 | comp.types.ns_constant_string.fields[1] = .{ .name = try comp.intern("flags"), .ty = .{ .specifier = .int } }; | ||
| 770 | comp.types.ns_constant_string.fields[2] = .{ .name = try comp.intern("str"), .ty = const_char_ptr }; | ||
| 771 | comp.types.ns_constant_string.fields[3] = .{ .name = try comp.intern("length"), .ty = .{ .specifier = .long } }; | ||
| 772 | comp.types.ns_constant_string.ty = .{ .specifier = .@"struct", .data = .{ .record = &comp.types.ns_constant_string.record } }; | ||
| 773 | record_layout.compute(&comp.types.ns_constant_string.record, comp.types.ns_constant_string.ty, comp, null); | ||
| 774 | } | ||
| 775 | |||
| 776 | fn generateVaListType(comp: *Compilation) !Type { | ||
| 777 | const Kind = enum { char_ptr, void_ptr, aarch64_va_list, x86_64_va_list }; | ||
| 778 | const kind: Kind = switch (comp.target.cpu.arch) { | ||
| 779 | .aarch64 => switch (comp.target.os.tag) { | ||
| 780 | .windows => @as(Kind, .char_ptr), | ||
| 781 | .ios, .macos, .tvos, .watchos => .char_ptr, | ||
| 782 | else => .aarch64_va_list, | ||
| 783 | }, | ||
| 784 | .sparc, .wasm32, .wasm64, .bpfel, .bpfeb, .riscv32, .riscv64, .avr, .spirv32, .spirv64 => .void_ptr, | ||
| 785 | .powerpc => switch (comp.target.os.tag) { | ||
| 786 | .ios, .macos, .tvos, .watchos, .aix => @as(Kind, .char_ptr), | ||
| 787 | else => return Type{ .specifier = .void }, // unknown | ||
| 788 | }, | ||
| 789 | .x86, .msp430 => .char_ptr, | ||
| 790 | .x86_64 => switch (comp.target.os.tag) { | ||
| 791 | .windows => @as(Kind, .char_ptr), | ||
| 792 | else => .x86_64_va_list, | ||
| 793 | }, | ||
| 794 | else => return Type{ .specifier = .void }, // unknown | ||
| 795 | }; | ||
| 796 | |||
| 797 | // TODO this might be bad? | ||
| 798 | const arena = comp.diag.arena.allocator(); | ||
| 799 | |||
| 800 | var ty: Type = undefined; | ||
| 801 | switch (kind) { | ||
| 802 | .char_ptr => ty = .{ .specifier = .char }, | ||
| 803 | .void_ptr => ty = .{ .specifier = .void }, | ||
| 804 | .aarch64_va_list => { | ||
| 805 | const record_ty = try arena.create(Type.Record); | ||
| 806 | record_ty.* = .{ | ||
| 807 | .name = try comp.intern("__va_list_tag"), | ||
| 808 | .fields = try arena.alloc(Type.Record.Field, 5), | ||
| 809 | .field_attributes = null, | ||
| 810 | .type_layout = undefined, // computed below | ||
| 811 | }; | ||
| 812 | const void_ty = try arena.create(Type); | ||
| 813 | void_ty.* = .{ .specifier = .void }; | ||
| 814 | const void_ptr = Type{ .specifier = .pointer, .data = .{ .sub_type = void_ty } }; | ||
| 815 | record_ty.fields[0] = .{ .name = try comp.intern("__stack"), .ty = void_ptr }; | ||
| 816 | record_ty.fields[1] = .{ .name = try comp.intern("__gr_top"), .ty = void_ptr }; | ||
| 817 | record_ty.fields[2] = .{ .name = try comp.intern("__vr_top"), .ty = void_ptr }; | ||
| 818 | record_ty.fields[3] = .{ .name = try comp.intern("__gr_offs"), .ty = .{ .specifier = .int } }; | ||
| 819 | record_ty.fields[4] = .{ .name = try comp.intern("__vr_offs"), .ty = .{ .specifier = .int } }; | ||
| 820 | ty = .{ .specifier = .@"struct", .data = .{ .record = record_ty } }; | ||
| 821 | record_layout.compute(record_ty, ty, comp, null); | ||
| 822 | }, | ||
| 823 | .x86_64_va_list => { | ||
| 824 | const record_ty = try arena.create(Type.Record); | ||
| 825 | record_ty.* = .{ | ||
| 826 | .name = try comp.intern("__va_list_tag"), | ||
| 827 | .fields = try arena.alloc(Type.Record.Field, 4), | ||
| 828 | .field_attributes = null, | ||
| 829 | .type_layout = undefined, // computed below | ||
| 830 | }; | ||
| 831 | const void_ty = try arena.create(Type); | ||
| 832 | void_ty.* = .{ .specifier = .void }; | ||
| 833 | const void_ptr = Type{ .specifier = .pointer, .data = .{ .sub_type = void_ty } }; | ||
| 834 | record_ty.fields[0] = .{ .name = try comp.intern("gp_offset"), .ty = .{ .specifier = .uint } }; | ||
| 835 | record_ty.fields[1] = .{ .name = try comp.intern("fp_offset"), .ty = .{ .specifier = .uint } }; | ||
| 836 | record_ty.fields[2] = .{ .name = try comp.intern("overflow_arg_area"), .ty = void_ptr }; | ||
| 837 | record_ty.fields[3] = .{ .name = try comp.intern("reg_save_area"), .ty = void_ptr }; | ||
| 838 | ty = .{ .specifier = .@"struct", .data = .{ .record = record_ty } }; | ||
| 839 | record_layout.compute(record_ty, ty, comp, null); | ||
| 840 | }, | ||
| 841 | } | ||
| 842 | if (kind == .char_ptr or kind == .void_ptr) { | ||
| 843 | const elem_ty = try arena.create(Type); | ||
| 844 | elem_ty.* = ty; | ||
| 845 | ty = Type{ .specifier = .pointer, .data = .{ .sub_type = elem_ty } }; | ||
| 846 | } else { | ||
| 847 | const arr_ty = try arena.create(Type.Array); | ||
| 848 | arr_ty.* = .{ .len = 1, .elem = ty }; | ||
| 849 | ty = Type{ .specifier = .array, .data = .{ .array = arr_ty } }; | ||
| 850 | } | ||
| 851 | |||
| 852 | return ty; | ||
| 853 | } | ||
| 854 | |||
| 855 | fn generateIntMax(comp: *const Compilation, w: anytype, name: []const u8, ty: Type) !void { | ||
| 856 | const bit_count: u8 = @intCast(ty.sizeof(comp).? * 8); | ||
| 857 | const unsigned = ty.isUnsignedInt(comp); | ||
| 858 | const max = if (bit_count == 128) | ||
| 859 | @as(u128, if (unsigned) std.math.maxInt(u128) else std.math.maxInt(u128)) | ||
| 860 | else | ||
| 861 | ty.maxInt(comp); | ||
| 862 | try w.print("#define __{s}_MAX__ {d}{s}\n", .{ name, max, ty.intValueSuffix(comp) }); | ||
| 863 | } | ||
| 864 | |||
| 865 | fn generateExactWidthIntMax(comp: *const Compilation, w: anytype, specifier: Type.Specifier) !void { | ||
| 866 | var ty = Type{ .specifier = specifier }; | ||
| 867 | const bit_count: u8 = @intCast(ty.sizeof(comp).? * 8); | ||
| 868 | const unsigned = ty.isUnsignedInt(comp); | ||
| 869 | |||
| 870 | if (bit_count == 64) { | ||
| 871 | ty = if (unsigned) comp.types.int64.makeIntegerUnsigned() else comp.types.int64; | ||
| 872 | } | ||
| 873 | |||
| 874 | var name = std.BoundedArray(u8, 6).init(0) catch unreachable; | ||
| 875 | name.writer().print("{s}{d}", .{ if (unsigned) "UINT" else "INT", bit_count }) catch return error.OutOfMemory; | ||
| 876 | |||
| 877 | return comp.generateIntMax(w, name.constSlice(), ty); | ||
| 878 | } | ||
| 879 | |||
| 880 | fn generateIntWidth(comp: *Compilation, w: anytype, name: []const u8, ty: Type) !void { | ||
| 881 | try w.print("#define __{s}_WIDTH__ {d}\n", .{ name, 8 * ty.sizeof(comp).? }); | ||
| 882 | } | ||
| 883 | |||
| 884 | fn generateIntMaxAndWidth(comp: *Compilation, w: anytype, name: []const u8, ty: Type) !void { | ||
| 885 | try comp.generateIntMax(w, name, ty); | ||
| 886 | try comp.generateIntWidth(w, name, ty); | ||
| 887 | } | ||
| 888 | |||
| 889 | fn generateSizeofType(comp: *Compilation, w: anytype, name: []const u8, ty: Type) !void { | ||
| 890 | try w.print("#define {s} {d}\n", .{ name, ty.sizeof(comp).? }); | ||
| 891 | } | ||
| 892 | |||
| 893 | pub fn nextLargestIntSameSign(comp: *const Compilation, ty: Type) ?Type { | ||
| 894 | assert(ty.isInt()); | ||
| 895 | const specifiers = if (ty.isUnsignedInt(comp)) | ||
| 896 | [_]Type.Specifier{ .short, .int, .long, .long_long } | ||
| 897 | else | ||
| 898 | [_]Type.Specifier{ .ushort, .uint, .ulong, .ulong_long }; | ||
| 899 | const size = ty.sizeof(comp).?; | ||
| 900 | for (specifiers) |specifier| { | ||
| 901 | const candidate = Type{ .specifier = specifier }; | ||
| 902 | if (candidate.sizeof(comp).? > size) return candidate; | ||
| 903 | } | ||
| 904 | return null; | ||
| 905 | } | ||
| 906 | |||
| 907 | /// If `enum E { ... }` syntax has a fixed underlying integer type regardless of the presence of | ||
| 908 | /// __attribute__((packed)) or the range of values of the corresponding enumerator constants, | ||
| 909 | /// specify it here. | ||
| 910 | /// TODO: likely incomplete | ||
| 911 | pub fn fixedEnumTagSpecifier(comp: *const Compilation) ?Type.Specifier { | ||
| 912 | switch (comp.langopts.emulate) { | ||
| 913 | .msvc => return .int, | ||
| 914 | .clang => if (comp.target.os.tag == .windows) return .int, | ||
| 915 | .gcc => {}, | ||
| 916 | } | ||
| 917 | return null; | ||
| 918 | } | ||
| 919 | |||
| 920 | pub fn getCharSignedness(comp: *const Compilation) std.builtin.Signedness { | ||
| 921 | return comp.langopts.char_signedness_override orelse comp.target.charSignedness(); | ||
| 922 | } | ||
| 923 | |||
| 924 | pub fn defineSystemIncludes(comp: *Compilation, aro_dir: []const u8) !void { | ||
| 925 | var stack_fallback = std.heap.stackFallback(path_buf_stack_limit, comp.gpa); | ||
| 926 | const allocator = stack_fallback.get(); | ||
| 927 | var search_path = aro_dir; | ||
| 928 | while (std.fs.path.dirname(search_path)) |dirname| : (search_path = dirname) { | ||
| 929 | var base_dir = std.fs.cwd().openDir(dirname, .{}) catch continue; | ||
| 930 | defer base_dir.close(); | ||
| 931 | |||
| 932 | base_dir.access("include/stddef.h", .{}) catch continue; | ||
| 933 | const path = try std.fs.path.join(comp.gpa, &.{ dirname, "include" }); | ||
| 934 | errdefer comp.gpa.free(path); | ||
| 935 | try comp.system_include_dirs.append(path); | ||
| 936 | break; | ||
| 937 | } else return error.AroIncludeNotFound; | ||
| 938 | |||
| 939 | if (comp.target.os.tag == .linux) { | ||
| 940 | const triple_str = try comp.target.linuxTriple(allocator); | ||
| 941 | defer allocator.free(triple_str); | ||
| 942 | |||
| 943 | const multiarch_path = try std.fs.path.join(allocator, &.{ "/usr/include", triple_str }); | ||
| 944 | defer allocator.free(multiarch_path); | ||
| 945 | |||
| 946 | if (!std.meta.isError(std.fs.accessAbsolute(multiarch_path, .{}))) { | ||
| 947 | const duped = try comp.gpa.dupe(u8, multiarch_path); | ||
| 948 | errdefer comp.gpa.free(duped); | ||
| 949 | try comp.system_include_dirs.append(duped); | ||
| 950 | } | ||
| 951 | } | ||
| 952 | const usr_include = try comp.gpa.dupe(u8, "/usr/include"); | ||
| 953 | errdefer comp.gpa.free(usr_include); | ||
| 954 | try comp.system_include_dirs.append(usr_include); | ||
| 955 | } | ||
| 956 | |||
| 957 | pub fn getSource(comp: *const Compilation, id: Source.Id) Source { | ||
| 958 | if (id == .generated) return .{ | ||
| 959 | .path = "<scratch space>", | ||
| 960 | .buf = comp.generated_buf.items, | ||
| 961 | .id = .generated, | ||
| 962 | .splice_locs = &.{}, | ||
| 963 | .kind = .user, | ||
| 964 | }; | ||
| 965 | return comp.sources.values()[@intFromEnum(id) - 2]; | ||
| 966 | } | ||
| 967 | |||
| 968 | /// Creates a Source from the contents of `reader` and adds it to the Compilation | ||
| 969 | pub fn addSourceFromReader(comp: *Compilation, reader: anytype, path: []const u8, kind: Source.Kind) !Source { | ||
| 970 | const contents = try reader.readAllAlloc(comp.gpa, std.math.maxInt(u32)); | ||
| 971 | errdefer comp.gpa.free(contents); | ||
| 972 | return comp.addSourceFromOwnedBuffer(contents, path, kind); | ||
| 973 | } | ||
| 974 | |||
| 975 | /// Creates a Source from `buf` and adds it to the Compilation | ||
| 976 | /// Performs newline splicing and line-ending normalization to '\n' | ||
| 977 | /// `buf` will be modified and the allocation will be resized if newline splicing | ||
| 978 | /// or line-ending changes happen. | ||
| 979 | /// caller retains ownership of `path` | ||
| 980 | /// To add the contents of an arbitrary reader as a Source, see addSourceFromReader | ||
| 981 | /// To add a file's contents given its path, see addSourceFromPath | ||
| 982 | pub fn addSourceFromOwnedBuffer(comp: *Compilation, buf: []u8, path: []const u8, kind: Source.Kind) !Source { | ||
| 983 | try comp.sources.ensureUnusedCapacity(1); | ||
| 984 | |||
| 985 | var contents = buf; | ||
| 986 | const duped_path = try comp.gpa.dupe(u8, path); | ||
| 987 | errdefer comp.gpa.free(duped_path); | ||
| 988 | |||
| 989 | var splice_list = std.ArrayList(u32).init(comp.gpa); | ||
| 990 | defer splice_list.deinit(); | ||
| 991 | |||
| 992 | const source_id: Source.Id = @enumFromInt(comp.sources.count() + 2); | ||
| 993 | |||
| 994 | var i: u32 = 0; | ||
| 995 | var backslash_loc: u32 = undefined; | ||
| 996 | var state: enum { | ||
| 997 | beginning_of_file, | ||
| 998 | bom1, | ||
| 999 | bom2, | ||
| 1000 | start, | ||
| 1001 | back_slash, | ||
| 1002 | cr, | ||
| 1003 | back_slash_cr, | ||
| 1004 | trailing_ws, | ||
| 1005 | } = .beginning_of_file; | ||
| 1006 | var line: u32 = 1; | ||
| 1007 | |||
| 1008 | for (contents) |byte| { | ||
| 1009 | contents[i] = byte; | ||
| 1010 | |||
| 1011 | switch (byte) { | ||
| 1012 | '\r' => { | ||
| 1013 | switch (state) { | ||
| 1014 | .start, .cr, .beginning_of_file => { | ||
| 1015 | state = .start; | ||
| 1016 | line += 1; | ||
| 1017 | state = .cr; | ||
| 1018 | contents[i] = '\n'; | ||
| 1019 | i += 1; | ||
| 1020 | }, | ||
| 1021 | .back_slash, .trailing_ws, .back_slash_cr => { | ||
| 1022 | i = backslash_loc; | ||
| 1023 | try splice_list.append(i); | ||
| 1024 | if (state == .trailing_ws) { | ||
| 1025 | try comp.diag.add(.{ | ||
| 1026 | .tag = .backslash_newline_escape, | ||
| 1027 | .loc = .{ .id = source_id, .byte_offset = i, .line = line }, | ||
| 1028 | }, &.{}); | ||
| 1029 | } | ||
| 1030 | state = if (state == .back_slash_cr) .cr else .back_slash_cr; | ||
| 1031 | }, | ||
| 1032 | .bom1, .bom2 => break, // invalid utf-8 | ||
| 1033 | } | ||
| 1034 | }, | ||
| 1035 | '\n' => { | ||
| 1036 | switch (state) { | ||
| 1037 | .start, .beginning_of_file => { | ||
| 1038 | state = .start; | ||
| 1039 | line += 1; | ||
| 1040 | i += 1; | ||
| 1041 | }, | ||
| 1042 | .cr, .back_slash_cr => {}, | ||
| 1043 | .back_slash, .trailing_ws => { | ||
| 1044 | i = backslash_loc; | ||
| 1045 | if (state == .back_slash or state == .trailing_ws) { | ||
| 1046 | try splice_list.append(i); | ||
| 1047 | } | ||
| 1048 | if (state == .trailing_ws) { | ||
| 1049 | try comp.diag.add(.{ | ||
| 1050 | .tag = .backslash_newline_escape, | ||
| 1051 | .loc = .{ .id = source_id, .byte_offset = i, .line = line }, | ||
| 1052 | }, &.{}); | ||
| 1053 | } | ||
| 1054 | }, | ||
| 1055 | .bom1, .bom2 => break, | ||
| 1056 | } | ||
| 1057 | state = .start; | ||
| 1058 | }, | ||
| 1059 | '\\' => { | ||
| 1060 | backslash_loc = i; | ||
| 1061 | state = .back_slash; | ||
| 1062 | i += 1; | ||
| 1063 | }, | ||
| 1064 | '\t', '\x0B', '\x0C', ' ' => { | ||
| 1065 | switch (state) { | ||
| 1066 | .start, .trailing_ws => {}, | ||
| 1067 | .beginning_of_file => state = .start, | ||
| 1068 | .cr, .back_slash_cr => state = .start, | ||
| 1069 | .back_slash => state = .trailing_ws, | ||
| 1070 | .bom1, .bom2 => break, | ||
| 1071 | } | ||
| 1072 | i += 1; | ||
| 1073 | }, | ||
| 1074 | '\xEF' => { | ||
| 1075 | i += 1; | ||
| 1076 | state = switch (state) { | ||
| 1077 | .beginning_of_file => .bom1, | ||
| 1078 | else => .start, | ||
| 1079 | }; | ||
| 1080 | }, | ||
| 1081 | '\xBB' => { | ||
| 1082 | i += 1; | ||
| 1083 | state = switch (state) { | ||
| 1084 | .bom1 => .bom2, | ||
| 1085 | else => .start, | ||
| 1086 | }; | ||
| 1087 | }, | ||
| 1088 | '\xBF' => { | ||
| 1089 | switch (state) { | ||
| 1090 | .bom2 => i = 0, // rewind and overwrite the BOM | ||
| 1091 | else => i += 1, | ||
| 1092 | } | ||
| 1093 | state = .start; | ||
| 1094 | }, | ||
| 1095 | else => { | ||
| 1096 | i += 1; | ||
| 1097 | state = .start; | ||
| 1098 | }, | ||
| 1099 | } | ||
| 1100 | } | ||
| 1101 | |||
| 1102 | const splice_locs = try splice_list.toOwnedSlice(); | ||
| 1103 | errdefer comp.gpa.free(splice_locs); | ||
| 1104 | |||
| 1105 | if (i != contents.len) contents = try comp.gpa.realloc(contents, i); | ||
| 1106 | errdefer @compileError("errdefers in callers would possibly free the realloced slice using the original len"); | ||
| 1107 | |||
| 1108 | var source = Source{ | ||
| 1109 | .id = source_id, | ||
| 1110 | .path = duped_path, | ||
| 1111 | .buf = contents, | ||
| 1112 | .splice_locs = splice_locs, | ||
| 1113 | .kind = kind, | ||
| 1114 | }; | ||
| 1115 | |||
| 1116 | comp.sources.putAssumeCapacityNoClobber(duped_path, source); | ||
| 1117 | return source; | ||
| 1118 | } | ||
| 1119 | |||
| 1120 | /// Caller retains ownership of `path` and `buf`. | ||
| 1121 | /// Dupes the source buffer; if it is acceptable to modify the source buffer and possibly resize | ||
| 1122 | /// the allocation, please use `addSourceFromOwnedBuffer` | ||
| 1123 | pub fn addSourceFromBuffer(comp: *Compilation, path: []const u8, buf: []const u8) !Source { | ||
| 1124 | if (comp.sources.get(path)) |some| return some; | ||
| 1125 | if (@as(u64, buf.len) > std.math.maxInt(u32)) return error.StreamTooLong; | ||
| 1126 | |||
| 1127 | const contents = try comp.gpa.dupe(u8, buf); | ||
| 1128 | errdefer comp.gpa.free(contents); | ||
| 1129 | |||
| 1130 | return comp.addSourceFromOwnedBuffer(contents, path, .user); | ||
| 1131 | } | ||
| 1132 | |||
| 1133 | /// Caller retains ownership of `path`. | ||
| 1134 | pub fn addSourceFromPath(comp: *Compilation, path: []const u8) !Source { | ||
| 1135 | return comp.addSourceFromPathExtra(path, .user); | ||
| 1136 | } | ||
| 1137 | |||
| 1138 | /// Caller retains ownership of `path`. | ||
| 1139 | fn addSourceFromPathExtra(comp: *Compilation, path: []const u8, kind: Source.Kind) !Source { | ||
| 1140 | if (comp.sources.get(path)) |some| return some; | ||
| 1141 | |||
| 1142 | if (mem.indexOfScalar(u8, path, 0) != null) { | ||
| 1143 | return error.FileNotFound; | ||
| 1144 | } | ||
| 1145 | |||
| 1146 | const file = try std.fs.cwd().openFile(path, .{}); | ||
| 1147 | defer file.close(); | ||
| 1148 | |||
| 1149 | const contents = file.readToEndAlloc(comp.gpa, std.math.maxInt(u32)) catch |err| switch (err) { | ||
| 1150 | error.FileTooBig => return error.StreamTooLong, | ||
| 1151 | else => |e| return e, | ||
| 1152 | }; | ||
| 1153 | errdefer comp.gpa.free(contents); | ||
| 1154 | |||
| 1155 | return comp.addSourceFromOwnedBuffer(contents, path, kind); | ||
| 1156 | } | ||
| 1157 | |||
| 1158 | pub const IncludeDirIterator = struct { | ||
| 1159 | comp: *const Compilation, | ||
| 1160 | cwd_source_id: ?Source.Id, | ||
| 1161 | include_dirs_idx: usize = 0, | ||
| 1162 | sys_include_dirs_idx: usize = 0, | ||
| 1163 | tried_ms_cwd: bool = false, | ||
| 1164 | |||
| 1165 | const FoundSource = struct { | ||
| 1166 | path: []const u8, | ||
| 1167 | kind: Source.Kind, | ||
| 1168 | }; | ||
| 1169 | |||
| 1170 | fn next(self: *IncludeDirIterator) ?FoundSource { | ||
| 1171 | if (self.cwd_source_id) |source_id| { | ||
| 1172 | self.cwd_source_id = null; | ||
| 1173 | const path = self.comp.getSource(source_id).path; | ||
| 1174 | return .{ .path = std.fs.path.dirname(path) orelse ".", .kind = .user }; | ||
| 1175 | } | ||
| 1176 | if (self.include_dirs_idx < self.comp.include_dirs.items.len) { | ||
| 1177 | defer self.include_dirs_idx += 1; | ||
| 1178 | return .{ .path = self.comp.include_dirs.items[self.include_dirs_idx], .kind = .user }; | ||
| 1179 | } | ||
| 1180 | if (self.sys_include_dirs_idx < self.comp.system_include_dirs.items.len) { | ||
| 1181 | defer self.sys_include_dirs_idx += 1; | ||
| 1182 | return .{ .path = self.comp.system_include_dirs.items[self.sys_include_dirs_idx], .kind = .system }; | ||
| 1183 | } | ||
| 1184 | if (self.comp.ms_cwd_source_id) |source_id| { | ||
| 1185 | if (self.tried_ms_cwd) return null; | ||
| 1186 | self.tried_ms_cwd = true; | ||
| 1187 | const path = self.comp.getSource(source_id).path; | ||
| 1188 | return .{ .path = std.fs.path.dirname(path) orelse ".", .kind = .user }; | ||
| 1189 | } | ||
| 1190 | return null; | ||
| 1191 | } | ||
| 1192 | |||
| 1193 | /// Returned value's path field must be freed by allocator | ||
| 1194 | fn nextWithFile(self: *IncludeDirIterator, filename: []const u8, allocator: Allocator) !?FoundSource { | ||
| 1195 | while (self.next()) |found| { | ||
| 1196 | const path = try std.fs.path.join(allocator, &.{ found.path, filename }); | ||
| 1197 | if (self.comp.langopts.ms_extensions) { | ||
| 1198 | std.mem.replaceScalar(u8, path, '\\', '/'); | ||
| 1199 | } | ||
| 1200 | return .{ .path = path, .kind = found.kind }; | ||
| 1201 | } | ||
| 1202 | return null; | ||
| 1203 | } | ||
| 1204 | |||
| 1205 | /// Advance the iterator until it finds an include directory that matches | ||
| 1206 | /// the directory which contains `source`. | ||
| 1207 | fn skipUntilDirMatch(self: *IncludeDirIterator, source: Source.Id) void { | ||
| 1208 | const path = self.comp.getSource(source).path; | ||
| 1209 | const includer_path = std.fs.path.dirname(path) orelse "."; | ||
| 1210 | while (self.next()) |found| { | ||
| 1211 | if (mem.eql(u8, includer_path, found.path)) break; | ||
| 1212 | } | ||
| 1213 | } | ||
| 1214 | }; | ||
| 1215 | |||
| 1216 | pub fn hasInclude( | ||
| 1217 | comp: *const Compilation, | ||
| 1218 | filename: []const u8, | ||
| 1219 | includer_token_source: Source.Id, | ||
| 1220 | /// angle bracket vs quotes | ||
| 1221 | include_type: IncludeType, | ||
| 1222 | /// __has_include vs __has_include_next | ||
| 1223 | which: WhichInclude, | ||
| 1224 | ) !bool { | ||
| 1225 | const cwd = std.fs.cwd(); | ||
| 1226 | if (std.fs.path.isAbsolute(filename)) { | ||
| 1227 | if (which == .next) return false; | ||
| 1228 | return !std.meta.isError(cwd.access(filename, .{})); | ||
| 1229 | } | ||
| 1230 | |||
| 1231 | const cwd_source_id = switch (include_type) { | ||
| 1232 | .quotes => switch (which) { | ||
| 1233 | .first => includer_token_source, | ||
| 1234 | .next => null, | ||
| 1235 | }, | ||
| 1236 | .angle_brackets => null, | ||
| 1237 | }; | ||
| 1238 | var it = IncludeDirIterator{ .comp = comp, .cwd_source_id = cwd_source_id }; | ||
| 1239 | if (which == .next) { | ||
| 1240 | it.skipUntilDirMatch(includer_token_source); | ||
| 1241 | } | ||
| 1242 | |||
| 1243 | var stack_fallback = std.heap.stackFallback(path_buf_stack_limit, comp.gpa); | ||
| 1244 | |||
| 1245 | while (try it.nextWithFile(filename, stack_fallback.get())) |found| { | ||
| 1246 | defer stack_fallback.get().free(found.path); | ||
| 1247 | if (!std.meta.isError(cwd.access(found.path, .{}))) return true; | ||
| 1248 | } | ||
| 1249 | return false; | ||
| 1250 | } | ||
| 1251 | |||
| 1252 | pub const WhichInclude = enum { | ||
| 1253 | first, | ||
| 1254 | next, | ||
| 1255 | }; | ||
| 1256 | |||
| 1257 | pub const IncludeType = enum { | ||
| 1258 | quotes, | ||
| 1259 | angle_brackets, | ||
| 1260 | }; | ||
| 1261 | |||
| 1262 | fn getFileContents(comp: *Compilation, path: []const u8) ![]const u8 { | ||
| 1263 | if (mem.indexOfScalar(u8, path, 0) != null) { | ||
| 1264 | return error.FileNotFound; | ||
| 1265 | } | ||
| 1266 | |||
| 1267 | const file = try std.fs.cwd().openFile(path, .{}); | ||
| 1268 | defer file.close(); | ||
| 1269 | |||
| 1270 | return file.readToEndAlloc(comp.gpa, std.math.maxInt(u32)); | ||
| 1271 | } | ||
| 1272 | |||
| 1273 | pub fn findEmbed( | ||
| 1274 | comp: *Compilation, | ||
| 1275 | filename: []const u8, | ||
| 1276 | includer_token_source: Source.Id, | ||
| 1277 | /// angle bracket vs quotes | ||
| 1278 | include_type: IncludeType, | ||
| 1279 | ) !?[]const u8 { | ||
| 1280 | if (std.fs.path.isAbsolute(filename)) { | ||
| 1281 | return if (comp.getFileContents(filename)) |some| | ||
| 1282 | some | ||
| 1283 | else |err| switch (err) { | ||
| 1284 | error.OutOfMemory => |e| return e, | ||
| 1285 | else => null, | ||
| 1286 | }; | ||
| 1287 | } | ||
| 1288 | |||
| 1289 | const cwd_source_id = switch (include_type) { | ||
| 1290 | .quotes => includer_token_source, | ||
| 1291 | .angle_brackets => null, | ||
| 1292 | }; | ||
| 1293 | var it = IncludeDirIterator{ .comp = comp, .cwd_source_id = cwd_source_id }; | ||
| 1294 | var stack_fallback = std.heap.stackFallback(path_buf_stack_limit, comp.gpa); | ||
| 1295 | |||
| 1296 | while (try it.nextWithFile(filename, stack_fallback.get())) |found| { | ||
| 1297 | defer stack_fallback.get().free(found.path); | ||
| 1298 | if (comp.getFileContents(found.path)) |some| | ||
| 1299 | return some | ||
| 1300 | else |err| switch (err) { | ||
| 1301 | error.OutOfMemory => return error.OutOfMemory, | ||
| 1302 | else => {}, | ||
| 1303 | } | ||
| 1304 | } | ||
| 1305 | return null; | ||
| 1306 | } | ||
| 1307 | |||
| 1308 | pub fn findInclude( | ||
| 1309 | comp: *Compilation, | ||
| 1310 | filename: []const u8, | ||
| 1311 | includer_token: Token, | ||
| 1312 | /// angle bracket vs quotes | ||
| 1313 | include_type: IncludeType, | ||
| 1314 | /// include vs include_next | ||
| 1315 | which: WhichInclude, | ||
| 1316 | ) !?Source { | ||
| 1317 | if (std.fs.path.isAbsolute(filename)) { | ||
| 1318 | if (which == .next) return null; | ||
| 1319 | // TODO: classify absolute file as belonging to system includes or not? | ||
| 1320 | return if (comp.addSourceFromPath(filename)) |some| | ||
| 1321 | some | ||
| 1322 | else |err| switch (err) { | ||
| 1323 | error.OutOfMemory => |e| return e, | ||
| 1324 | else => null, | ||
| 1325 | }; | ||
| 1326 | } | ||
| 1327 | const cwd_source_id = switch (include_type) { | ||
| 1328 | .quotes => switch (which) { | ||
| 1329 | .first => includer_token.source, | ||
| 1330 | .next => null, | ||
| 1331 | }, | ||
| 1332 | .angle_brackets => null, | ||
| 1333 | }; | ||
| 1334 | var it = IncludeDirIterator{ .comp = comp, .cwd_source_id = cwd_source_id }; | ||
| 1335 | |||
| 1336 | if (which == .next) { | ||
| 1337 | it.skipUntilDirMatch(includer_token.source); | ||
| 1338 | } | ||
| 1339 | |||
| 1340 | var stack_fallback = std.heap.stackFallback(path_buf_stack_limit, comp.gpa); | ||
| 1341 | while (try it.nextWithFile(filename, stack_fallback.get())) |found| { | ||
| 1342 | defer stack_fallback.get().free(found.path); | ||
| 1343 | if (comp.addSourceFromPathExtra(found.path, found.kind)) |some| { | ||
| 1344 | if (it.tried_ms_cwd) { | ||
| 1345 | try comp.diag.add(.{ | ||
| 1346 | .tag = .ms_search_rule, | ||
| 1347 | .extra = .{ .str = some.path }, | ||
| 1348 | .loc = .{ | ||
| 1349 | .id = includer_token.source, | ||
| 1350 | .byte_offset = includer_token.start, | ||
| 1351 | .line = includer_token.line, | ||
| 1352 | }, | ||
| 1353 | }, &.{}); | ||
| 1354 | } | ||
| 1355 | return some; | ||
| 1356 | } else |err| switch (err) { | ||
| 1357 | error.OutOfMemory => return error.OutOfMemory, | ||
| 1358 | else => {}, | ||
| 1359 | } | ||
| 1360 | } | ||
| 1361 | return null; | ||
| 1362 | } | ||
| 1363 | |||
| 1364 | pub fn addPragmaHandler(comp: *Compilation, name: []const u8, handler: *Pragma) Allocator.Error!void { | ||
| 1365 | try comp.pragma_handlers.putNoClobber(name, handler); | ||
| 1366 | } | ||
| 1367 | |||
| 1368 | pub fn addDefaultPragmaHandlers(comp: *Compilation) Allocator.Error!void { | ||
| 1369 | const GCC = @import("pragmas/gcc.zig"); | ||
| 1370 | var gcc = try GCC.init(comp.gpa); | ||
| 1371 | errdefer gcc.deinit(gcc, comp); | ||
| 1372 | |||
| 1373 | const Once = @import("pragmas/once.zig"); | ||
| 1374 | var once = try Once.init(comp.gpa); | ||
| 1375 | errdefer once.deinit(once, comp); | ||
| 1376 | |||
| 1377 | const Message = @import("pragmas/message.zig"); | ||
| 1378 | var message = try Message.init(comp.gpa); | ||
| 1379 | errdefer message.deinit(message, comp); | ||
| 1380 | |||
| 1381 | const Pack = @import("pragmas/pack.zig"); | ||
| 1382 | var pack = try Pack.init(comp.gpa); | ||
| 1383 | errdefer pack.deinit(pack, comp); | ||
| 1384 | |||
| 1385 | try comp.addPragmaHandler("GCC", gcc); | ||
| 1386 | try comp.addPragmaHandler("once", once); | ||
| 1387 | try comp.addPragmaHandler("message", message); | ||
| 1388 | try comp.addPragmaHandler("pack", pack); | ||
| 1389 | } | ||
| 1390 | |||
| 1391 | pub fn getPragma(comp: *Compilation, name: []const u8) ?*Pragma { | ||
| 1392 | return comp.pragma_handlers.get(name); | ||
| 1393 | } | ||
| 1394 | |||
| 1395 | const PragmaEvent = enum { | ||
| 1396 | before_preprocess, | ||
| 1397 | before_parse, | ||
| 1398 | after_parse, | ||
| 1399 | }; | ||
| 1400 | |||
| 1401 | pub fn pragmaEvent(comp: *Compilation, event: PragmaEvent) void { | ||
| 1402 | for (comp.pragma_handlers.values()) |pragma| { | ||
| 1403 | const maybe_func = switch (event) { | ||
| 1404 | .before_preprocess => pragma.beforePreprocess, | ||
| 1405 | .before_parse => pragma.beforeParse, | ||
| 1406 | .after_parse => pragma.afterParse, | ||
| 1407 | }; | ||
| 1408 | if (maybe_func) |func| func(pragma, comp); | ||
| 1409 | } | ||
| 1410 | } | ||
| 1411 | |||
| 1412 | pub fn hasBuiltin(comp: *const Compilation, name: []const u8) bool { | ||
| 1413 | if (std.mem.eql(u8, name, "__builtin_va_arg") or | ||
| 1414 | std.mem.eql(u8, name, "__builtin_choose_expr") or | ||
| 1415 | std.mem.eql(u8, name, "__builtin_bitoffsetof") or | ||
| 1416 | std.mem.eql(u8, name, "__builtin_offsetof") or | ||
| 1417 | std.mem.eql(u8, name, "__builtin_types_compatible_p")) return true; | ||
| 1418 | |||
| 1419 | const builtin = Builtin.fromName(name) orelse return false; | ||
| 1420 | return comp.hasBuiltinFunction(builtin); | ||
| 1421 | } | ||
| 1422 | |||
| 1423 | pub fn hasBuiltinFunction(comp: *const Compilation, builtin: Builtin) bool { | ||
| 1424 | if (!target_util.builtinEnabled(comp.target, builtin.properties.target_set)) return false; | ||
| 1425 | |||
| 1426 | switch (builtin.properties.language) { | ||
| 1427 | .all_languages => return true, | ||
| 1428 | .all_ms_languages => return comp.langopts.emulate == .msvc, | ||
| 1429 | .gnu_lang, .all_gnu_languages => return comp.langopts.standard.isGNU(), | ||
| 1430 | } | ||
| 1431 | } | ||
| 1432 | |||
| 1433 | pub const CharUnitSize = enum(u32) { | ||
| 1434 | @"1" = 1, | ||
| 1435 | @"2" = 2, | ||
| 1436 | @"4" = 4, | ||
| 1437 | |||
| 1438 | pub fn Type(comptime self: CharUnitSize) type { | ||
| 1439 | return switch (self) { | ||
| 1440 | .@"1" => u8, | ||
| 1441 | .@"2" => u16, | ||
| 1442 | .@"4" => u32, | ||
| 1443 | }; | ||
| 1444 | } | ||
| 1445 | }; | ||
| 1446 | |||
| 1447 | pub const renderErrors = Diagnostics.render; | ||
| 1448 | |||
| 1449 | test "addSourceFromReader" { | ||
| 1450 | const Test = struct { | ||
| 1451 | fn addSourceFromReader(str: []const u8, expected: []const u8, warning_count: u32, splices: []const u32) !void { | ||
| 1452 | var comp = Compilation.init(std.testing.allocator); | ||
| 1453 | defer comp.deinit(); | ||
| 1454 | |||
| 1455 | var buf_reader = std.io.fixedBufferStream(str); | ||
| 1456 | const source = try comp.addSourceFromReader(buf_reader.reader(), "path", .user); | ||
| 1457 | |||
| 1458 | try std.testing.expectEqualStrings(expected, source.buf); | ||
| 1459 | try std.testing.expectEqual(warning_count, @as(u32, @intCast(comp.diag.list.items.len))); | ||
| 1460 | try std.testing.expectEqualSlices(u32, splices, source.splice_locs); | ||
| 1461 | } | ||
| 1462 | |||
| 1463 | fn withAllocationFailures(allocator: std.mem.Allocator) !void { | ||
| 1464 | var comp = Compilation.init(allocator); | ||
| 1465 | defer comp.deinit(); | ||
| 1466 | |||
| 1467 | _ = try comp.addSourceFromBuffer("path", "spliced\\\nbuffer\n"); | ||
| 1468 | _ = try comp.addSourceFromBuffer("path", "non-spliced buffer\n"); | ||
| 1469 | } | ||
| 1470 | }; | ||
| 1471 | try Test.addSourceFromReader("ab\\\nc", "abc", 0, &.{2}); | ||
| 1472 | try Test.addSourceFromReader("ab\\\rc", "abc", 0, &.{2}); | ||
| 1473 | try Test.addSourceFromReader("ab\\\r\nc", "abc", 0, &.{2}); | ||
| 1474 | try Test.addSourceFromReader("ab\\ \nc", "abc", 1, &.{2}); | ||
| 1475 | try Test.addSourceFromReader("ab\\\t\nc", "abc", 1, &.{2}); | ||
| 1476 | try Test.addSourceFromReader("ab\\ \t\nc", "abc", 1, &.{2}); | ||
| 1477 | try Test.addSourceFromReader("ab\\\r \nc", "ab \nc", 0, &.{2}); | ||
| 1478 | try Test.addSourceFromReader("ab\\\\\nc", "ab\\c", 0, &.{3}); | ||
| 1479 | try Test.addSourceFromReader("ab\\ \r\nc", "abc", 1, &.{2}); | ||
| 1480 | try Test.addSourceFromReader("ab\\ \\\nc", "ab\\ c", 0, &.{4}); | ||
| 1481 | try Test.addSourceFromReader("ab\\\r\\\nc", "abc", 0, &.{ 2, 2 }); | ||
| 1482 | try Test.addSourceFromReader("ab\\ \rc", "abc", 1, &.{2}); | ||
| 1483 | try Test.addSourceFromReader("ab\\", "ab\\", 0, &.{}); | ||
| 1484 | try Test.addSourceFromReader("ab\\\\", "ab\\\\", 0, &.{}); | ||
| 1485 | try Test.addSourceFromReader("ab\\ ", "ab\\ ", 0, &.{}); | ||
| 1486 | try Test.addSourceFromReader("ab\\\n", "ab", 0, &.{2}); | ||
| 1487 | try Test.addSourceFromReader("ab\\\r\n", "ab", 0, &.{2}); | ||
| 1488 | try Test.addSourceFromReader("ab\\\r", "ab", 0, &.{2}); | ||
| 1489 | |||
| 1490 | // carriage return normalization | ||
| 1491 | try Test.addSourceFromReader("ab\r", "ab\n", 0, &.{}); | ||
| 1492 | try Test.addSourceFromReader("ab\r\r", "ab\n\n", 0, &.{}); | ||
| 1493 | try Test.addSourceFromReader("ab\r\r\n", "ab\n\n", 0, &.{}); | ||
| 1494 | try Test.addSourceFromReader("ab\r\r\n\r", "ab\n\n\n", 0, &.{}); | ||
| 1495 | try Test.addSourceFromReader("\r\\", "\n\\", 0, &.{}); | ||
| 1496 | try Test.addSourceFromReader("\\\r\\", "\\", 0, &.{0}); | ||
| 1497 | |||
| 1498 | try std.testing.checkAllAllocationFailures(std.testing.allocator, Test.withAllocationFailures, .{}); | ||
| 1499 | } | ||
| 1500 | |||
| 1501 | test "addSourceFromReader - exhaustive check for carriage return elimination" { | ||
| 1502 | const alphabet = [_]u8{ '\r', '\n', ' ', '\\', 'a' }; | ||
| 1503 | const alen = alphabet.len; | ||
| 1504 | var buf: [alphabet.len]u8 = [1]u8{alphabet[0]} ** alen; | ||
| 1505 | |||
| 1506 | var comp = Compilation.init(std.testing.allocator); | ||
| 1507 | defer comp.deinit(); | ||
| 1508 | |||
| 1509 | var source_count: u32 = 0; | ||
| 1510 | |||
| 1511 | while (true) { | ||
| 1512 | const source = try comp.addSourceFromBuffer(&buf, &buf); | ||
| 1513 | source_count += 1; | ||
| 1514 | try std.testing.expect(std.mem.indexOfScalar(u8, source.buf, '\r') == null); | ||
| 1515 | |||
| 1516 | if (std.mem.allEqual(u8, &buf, alphabet[alen - 1])) break; | ||
| 1517 | |||
| 1518 | var idx = std.mem.indexOfScalar(u8, &alphabet, buf[buf.len - 1]).?; | ||
| 1519 | buf[buf.len - 1] = alphabet[(idx + 1) % alen]; | ||
| 1520 | var j = buf.len - 1; | ||
| 1521 | while (j > 0) : (j -= 1) { | ||
| 1522 | idx = std.mem.indexOfScalar(u8, &alphabet, buf[j - 1]).?; | ||
| 1523 | if (buf[j] == alphabet[0]) buf[j - 1] = alphabet[(idx + 1) % alen] else break; | ||
| 1524 | } | ||
| 1525 | } | ||
| 1526 | try std.testing.expect(source_count == std.math.powi(usize, alen, alen) catch unreachable); | ||
| 1527 | } | ||
| 1528 | |||
| 1529 | test "ignore BOM at beginning of file" { | ||
| 1530 | const BOM = "\xEF\xBB\xBF"; | ||
| 1531 | |||
| 1532 | const Test = struct { | ||
| 1533 | fn run(buf: []const u8) !void { | ||
| 1534 | var comp = Compilation.init(std.testing.allocator); | ||
| 1535 | defer comp.deinit(); | ||
| 1536 | |||
| 1537 | var buf_reader = std.io.fixedBufferStream(buf); | ||
| 1538 | const source = try comp.addSourceFromReader(buf_reader.reader(), "file.c", .user); | ||
| 1539 | const expected_output = if (mem.startsWith(u8, buf, BOM)) buf[BOM.len..] else buf; | ||
| 1540 | try std.testing.expectEqualStrings(expected_output, source.buf); | ||
| 1541 | } | ||
| 1542 | }; | ||
| 1543 | |||
| 1544 | try Test.run(BOM); | ||
| 1545 | try Test.run(BOM ++ "x"); | ||
| 1546 | try Test.run("x" ++ BOM); | ||
| 1547 | try Test.run(BOM ++ " "); | ||
| 1548 | try Test.run(BOM ++ "\n"); | ||
| 1549 | try Test.run(BOM ++ "\\"); | ||
| 1550 | |||
| 1551 | try Test.run(BOM[0..1] ++ "x"); | ||
| 1552 | try Test.run(BOM[0..2] ++ "x"); | ||
| 1553 | try Test.run(BOM[1..] ++ "x"); | ||
| 1554 | try Test.run(BOM[2..] ++ "x"); | ||
| 1555 | } | ||
deps/aro/Diagnostics.zig deleted-2935| ... | @@ -1,2935 +0,0 @@ | ||
| 1 | const std = @import("std"); | ||
| 2 | const mem = std.mem; | ||
| 3 | const Allocator = mem.Allocator; | ||
| 4 | const Source = @import("Source.zig"); | ||
| 5 | const Compilation = @import("Compilation.zig"); | ||
| 6 | const Attribute = @import("Attribute.zig"); | ||
| 7 | const Builtins = @import("Builtins.zig"); | ||
| 8 | const Builtin = Builtins.Builtin; | ||
| 9 | const Header = @import("Builtins/Properties.zig").Header; | ||
| 10 | const Tree = @import("Tree.zig"); | ||
| 11 | const util = @import("util.zig"); | ||
| 12 | const is_windows = @import("builtin").os.tag == .windows; | ||
| 13 | |||
| 14 | const Diagnostics = @This(); | ||
| 15 | |||
| 16 | const PointerSignMessage = " converts between pointers to integer types with different sign"; | ||
| 17 | |||
| 18 | pub const Message = struct { | ||
| 19 | tag: Tag, | ||
| 20 | kind: Kind = undefined, | ||
| 21 | loc: Source.Location = .{}, | ||
| 22 | extra: Extra = .{ .none = {} }, | ||
| 23 | |||
| 24 | pub const Extra = union { | ||
| 25 | str: []const u8, | ||
| 26 | tok_id: struct { | ||
| 27 | expected: Tree.Token.Id, | ||
| 28 | actual: Tree.Token.Id, | ||
| 29 | }, | ||
| 30 | tok_id_expected: Tree.Token.Id, | ||
| 31 | arguments: struct { | ||
| 32 | expected: u32, | ||
| 33 | actual: u32, | ||
| 34 | }, | ||
| 35 | codepoints: struct { | ||
| 36 | actual: u21, | ||
| 37 | resembles: u21, | ||
| 38 | }, | ||
| 39 | attr_arg_count: struct { | ||
| 40 | attribute: Attribute.Tag, | ||
| 41 | expected: u32, | ||
| 42 | }, | ||
| 43 | attr_arg_type: struct { | ||
| 44 | expected: Attribute.ArgumentType, | ||
| 45 | actual: Attribute.ArgumentType, | ||
| 46 | }, | ||
| 47 | attr_enum: struct { | ||
| 48 | tag: Attribute.Tag, | ||
| 49 | }, | ||
| 50 | ignored_record_attr: struct { | ||
| 51 | tag: Attribute.Tag, | ||
| 52 | specifier: enum { @"struct", @"union", @"enum" }, | ||
| 53 | }, | ||
| 54 | builtin_with_header: struct { | ||
| 55 | builtin: Builtin.Tag, | ||
| 56 | header: Header, | ||
| 57 | }, | ||
| 58 | invalid_escape: struct { | ||
| 59 | offset: u32, | ||
| 60 | char: u8, | ||
| 61 | }, | ||
| 62 | actual_codepoint: u21, | ||
| 63 | ascii: u7, | ||
| 64 | unsigned: u64, | ||
| 65 | pow_2_as_string: u8, | ||
| 66 | signed: i64, | ||
| 67 | none: void, | ||
| 68 | }; | ||
| 69 | }; | ||
| 70 | |||
| 71 | pub const Tag = std.meta.DeclEnum(messages); | ||
| 72 | |||
| 73 | pub const Kind = enum { @"fatal error", @"error", note, warning, off, default }; | ||
| 74 | |||
| 75 | pub const Options = struct { | ||
| 76 | // do not directly use these, instead add `const NAME = true;` | ||
| 77 | all: Kind = .default, | ||
| 78 | extra: Kind = .default, | ||
| 79 | pedantic: Kind = .default, | ||
| 80 | |||
| 81 | @"unsupported-pragma": Kind = .default, | ||
| 82 | @"c99-extensions": Kind = .default, | ||
| 83 | @"implicit-int": Kind = .default, | ||
| 84 | @"duplicate-decl-specifier": Kind = .default, | ||
| 85 | @"missing-declaration": Kind = .default, | ||
| 86 | @"extern-initializer": Kind = .default, | ||
| 87 | @"implicit-function-declaration": Kind = .default, | ||
| 88 | @"unused-value": Kind = .default, | ||
| 89 | @"unreachable-code": Kind = .default, | ||
| 90 | @"unknown-warning-option": Kind = .default, | ||
| 91 | @"gnu-empty-struct": Kind = .default, | ||
| 92 | @"gnu-alignof-expression": Kind = .default, | ||
| 93 | @"macro-redefined": Kind = .default, | ||
| 94 | @"generic-qual-type": Kind = .default, | ||
| 95 | multichar: Kind = .default, | ||
| 96 | @"pointer-integer-compare": Kind = .default, | ||
| 97 | @"compare-distinct-pointer-types": Kind = .default, | ||
| 98 | @"literal-conversion": Kind = .default, | ||
| 99 | @"cast-qualifiers": Kind = .default, | ||
| 100 | @"array-bounds": Kind = .default, | ||
| 101 | @"int-conversion": Kind = .default, | ||
| 102 | @"pointer-type-mismatch": Kind = .default, | ||
| 103 | @"c2x-extensions": Kind = .default, | ||
| 104 | @"incompatible-pointer-types": Kind = .default, | ||
| 105 | @"excess-initializers": Kind = .default, | ||
| 106 | @"division-by-zero": Kind = .default, | ||
| 107 | @"initializer-overrides": Kind = .default, | ||
| 108 | @"incompatible-pointer-types-discards-qualifiers": Kind = .default, | ||
| 109 | @"unknown-attributes": Kind = .default, | ||
| 110 | @"ignored-attributes": Kind = .default, | ||
| 111 | @"builtin-macro-redefined": Kind = .default, | ||
| 112 | @"gnu-label-as-value": Kind = .default, | ||
| 113 | @"malformed-warning-check": Kind = .default, | ||
| 114 | @"#pragma-messages": Kind = .default, | ||
| 115 | @"newline-eof": Kind = .default, | ||
| 116 | @"empty-translation-unit": Kind = .default, | ||
| 117 | @"implicitly-unsigned-literal": Kind = .default, | ||
| 118 | @"c99-compat": Kind = .default, | ||
| 119 | @"unicode-zero-width": Kind = .default, | ||
| 120 | @"unicode-homoglyph": Kind = .default, | ||
| 121 | unicode: Kind = .default, | ||
| 122 | @"return-type": Kind = .default, | ||
| 123 | @"dollar-in-identifier-extension": Kind = .default, | ||
| 124 | @"unknown-pragmas": Kind = .default, | ||
| 125 | @"predefined-identifier-outside-function": Kind = .default, | ||
| 126 | @"many-braces-around-scalar-init": Kind = .default, | ||
| 127 | uninitialized: Kind = .default, | ||
| 128 | @"gnu-statement-expression": Kind = .default, | ||
| 129 | @"gnu-imaginary-constant": Kind = .default, | ||
| 130 | @"gnu-complex-integer": Kind = .default, | ||
| 131 | @"ignored-qualifiers": Kind = .default, | ||
| 132 | @"integer-overflow": Kind = .default, | ||
| 133 | @"extra-semi": Kind = .default, | ||
| 134 | @"gnu-binary-literal": Kind = .default, | ||
| 135 | @"variadic-macros": Kind = .default, | ||
| 136 | varargs: Kind = .default, | ||
| 137 | @"#warnings": Kind = .default, | ||
| 138 | @"deprecated-declarations": Kind = .default, | ||
| 139 | @"backslash-newline-escape": Kind = .default, | ||
| 140 | @"pointer-to-int-cast": Kind = .default, | ||
| 141 | @"gnu-case-range": Kind = .default, | ||
| 142 | @"c++-compat": Kind = .default, | ||
| 143 | vla: Kind = .default, | ||
| 144 | @"float-overflow-conversion": Kind = .default, | ||
| 145 | @"float-zero-conversion": Kind = .default, | ||
| 146 | @"float-conversion": Kind = .default, | ||
| 147 | @"gnu-folding-constant": Kind = .default, | ||
| 148 | undef: Kind = .default, | ||
| 149 | @"ignored-pragmas": Kind = .default, | ||
| 150 | @"gnu-include-next": Kind = .default, | ||
| 151 | @"include-next-outside-header": Kind = .default, | ||
| 152 | @"include-next-absolute-path": Kind = .default, | ||
| 153 | @"enum-too-large": Kind = .default, | ||
| 154 | @"fixed-enum-extension": Kind = .default, | ||
| 155 | @"designated-init": Kind = .default, | ||
| 156 | @"attribute-warning": Kind = .default, | ||
| 157 | @"invalid-noreturn": Kind = .default, | ||
| 158 | @"zero-length-array": Kind = .default, | ||
| 159 | @"old-style-flexible-struct": Kind = .default, | ||
| 160 | @"gnu-zero-variadic-macro-arguments": Kind = .default, | ||
| 161 | @"main-return-type": Kind = .default, | ||
| 162 | @"expansion-to-defined": Kind = .default, | ||
| 163 | @"bit-int-extension": Kind = .default, | ||
| 164 | @"keyword-macro": Kind = .default, | ||
| 165 | @"pointer-arith": Kind = .default, | ||
| 166 | @"sizeof-array-argument": Kind = .default, | ||
| 167 | @"pre-c2x-compat": Kind = .default, | ||
| 168 | @"pointer-bool-conversion": Kind = .default, | ||
| 169 | @"string-conversion": Kind = .default, | ||
| 170 | @"gnu-auto-type": Kind = .default, | ||
| 171 | @"gnu-union-cast": Kind = .default, | ||
| 172 | @"pointer-sign": Kind = .default, | ||
| 173 | @"fuse-ld-path": Kind = .default, | ||
| 174 | @"language-extension-token": Kind = .default, | ||
| 175 | @"complex-component-init": Kind = .default, | ||
| 176 | @"microsoft-include": Kind = .default, | ||
| 177 | @"microsoft-end-of-file": Kind = .default, | ||
| 178 | @"invalid-source-encoding": Kind = .default, | ||
| 179 | @"four-char-constants": Kind = .default, | ||
| 180 | @"unknown-escape-sequence": Kind = .default, | ||
| 181 | @"invalid-pp-token": Kind = .default, | ||
| 182 | }; | ||
| 183 | |||
| 184 | const messages = struct { | ||
| 185 | pub const todo = struct { // Maybe someday this will no longer be needed. | ||
| 186 | const msg = "TODO: {s}"; | ||
| 187 | const extra = .str; | ||
| 188 | const kind = .@"error"; | ||
| 189 | }; | ||
| 190 | pub const error_directive = struct { | ||
| 191 | const msg = "{s}"; | ||
| 192 | const extra = .str; | ||
| 193 | const kind = .@"error"; | ||
| 194 | }; | ||
| 195 | pub const warning_directive = struct { | ||
| 196 | const msg = "{s}"; | ||
| 197 | const opt = "#warnings"; | ||
| 198 | const extra = .str; | ||
| 199 | const kind = .warning; | ||
| 200 | }; | ||
| 201 | pub const elif_without_if = struct { | ||
| 202 | const msg = "#elif without #if"; | ||
| 203 | const kind = .@"error"; | ||
| 204 | }; | ||
| 205 | pub const elif_after_else = struct { | ||
| 206 | const msg = "#elif after #else"; | ||
| 207 | const kind = .@"error"; | ||
| 208 | }; | ||
| 209 | pub const elifdef_without_if = struct { | ||
| 210 | const msg = "#elifdef without #if"; | ||
| 211 | const kind = .@"error"; | ||
| 212 | }; | ||
| 213 | pub const elifdef_after_else = struct { | ||
| 214 | const msg = "#elifdef after #else"; | ||
| 215 | const kind = .@"error"; | ||
| 216 | }; | ||
| 217 | pub const elifndef_without_if = struct { | ||
| 218 | const msg = "#elifndef without #if"; | ||
| 219 | const kind = .@"error"; | ||
| 220 | }; | ||
| 221 | pub const elifndef_after_else = struct { | ||
| 222 | const msg = "#elifndef after #else"; | ||
| 223 | const kind = .@"error"; | ||
| 224 | }; | ||
| 225 | pub const else_without_if = struct { | ||
| 226 | const msg = "#else without #if"; | ||
| 227 | const kind = .@"error"; | ||
| 228 | }; | ||
| 229 | pub const else_after_else = struct { | ||
| 230 | const msg = "#else after #else"; | ||
| 231 | const kind = .@"error"; | ||
| 232 | }; | ||
| 233 | pub const endif_without_if = struct { | ||
| 234 | const msg = "#endif without #if"; | ||
| 235 | const kind = .@"error"; | ||
| 236 | }; | ||
| 237 | pub const unknown_pragma = struct { | ||
| 238 | const msg = "unknown pragma ignored"; | ||
| 239 | const opt = "unknown-pragmas"; | ||
| 240 | const kind = .off; | ||
| 241 | const all = true; | ||
| 242 | }; | ||
| 243 | pub const line_simple_digit = struct { | ||
| 244 | const msg = "#line directive requires a simple digit sequence"; | ||
| 245 | const kind = .@"error"; | ||
| 246 | }; | ||
| 247 | pub const line_invalid_filename = struct { | ||
| 248 | const msg = "invalid filename for #line directive"; | ||
| 249 | const kind = .@"error"; | ||
| 250 | }; | ||
| 251 | pub const unterminated_conditional_directive = struct { | ||
| 252 | const msg = "unterminated conditional directive"; | ||
| 253 | const kind = .@"error"; | ||
| 254 | }; | ||
| 255 | pub const invalid_preprocessing_directive = struct { | ||
| 256 | const msg = "invalid preprocessing directive"; | ||
| 257 | const kind = .@"error"; | ||
| 258 | }; | ||
| 259 | pub const macro_name_missing = struct { | ||
| 260 | const msg = "macro name missing"; | ||
| 261 | const kind = .@"error"; | ||
| 262 | }; | ||
| 263 | pub const extra_tokens_directive_end = struct { | ||
| 264 | const msg = "extra tokens at end of macro directive"; | ||
| 265 | const kind = .@"error"; | ||
| 266 | }; | ||
| 267 | pub const expected_value_in_expr = struct { | ||
| 268 | const msg = "expected value in expression"; | ||
| 269 | const kind = .@"error"; | ||
| 270 | }; | ||
| 271 | pub const closing_paren = struct { | ||
| 272 | const msg = "expected closing ')'"; | ||
| 273 | const kind = .@"error"; | ||
| 274 | }; | ||
| 275 | pub const to_match_paren = struct { | ||
| 276 | const msg = "to match this '('"; | ||
| 277 | const kind = .note; | ||
| 278 | }; | ||
| 279 | pub const to_match_brace = struct { | ||
| 280 | const msg = "to match this '{'"; | ||
| 281 | const kind = .note; | ||
| 282 | }; | ||
| 283 | pub const to_match_bracket = struct { | ||
| 284 | const msg = "to match this '['"; | ||
| 285 | const kind = .note; | ||
| 286 | }; | ||
| 287 | pub const header_str_closing = struct { | ||
| 288 | const msg = "expected closing '>'"; | ||
| 289 | const kind = .@"error"; | ||
| 290 | }; | ||
| 291 | pub const header_str_match = struct { | ||
| 292 | const msg = "to match this '<'"; | ||
| 293 | const kind = .note; | ||
| 294 | }; | ||
| 295 | pub const string_literal_in_pp_expr = struct { | ||
| 296 | const msg = "string literal in preprocessor expression"; | ||
| 297 | const kind = .@"error"; | ||
| 298 | }; | ||
| 299 | pub const float_literal_in_pp_expr = struct { | ||
| 300 | const msg = "floating point literal in preprocessor expression"; | ||
| 301 | const kind = .@"error"; | ||
| 302 | }; | ||
| 303 | pub const defined_as_macro_name = struct { | ||
| 304 | const msg = "'defined' cannot be used as a macro name"; | ||
| 305 | const kind = .@"error"; | ||
| 306 | }; | ||
| 307 | pub const macro_name_must_be_identifier = struct { | ||
| 308 | const msg = "macro name must be an identifier"; | ||
| 309 | const kind = .@"error"; | ||
| 310 | }; | ||
| 311 | pub const whitespace_after_macro_name = struct { | ||
| 312 | const msg = "ISO C99 requires whitespace after the macro name"; | ||
| 313 | const opt = "c99-extensions"; | ||
| 314 | const kind = .warning; | ||
| 315 | }; | ||
| 316 | pub const hash_hash_at_start = struct { | ||
| 317 | const msg = "'##' cannot appear at the start of a macro expansion"; | ||
| 318 | const kind = .@"error"; | ||
| 319 | }; | ||
| 320 | pub const hash_hash_at_end = struct { | ||
| 321 | const msg = "'##' cannot appear at the end of a macro expansion"; | ||
| 322 | const kind = .@"error"; | ||
| 323 | }; | ||
| 324 | pub const pasting_formed_invalid = struct { | ||
| 325 | const msg = "pasting formed '{s}', an invalid preprocessing token"; | ||
| 326 | const extra = .str; | ||
| 327 | const kind = .@"error"; | ||
| 328 | }; | ||
| 329 | pub const missing_paren_param_list = struct { | ||
| 330 | const msg = "missing ')' in macro parameter list"; | ||
| 331 | const kind = .@"error"; | ||
| 332 | }; | ||
| 333 | pub const unterminated_macro_param_list = struct { | ||
| 334 | const msg = "unterminated macro param list"; | ||
| 335 | const kind = .@"error"; | ||
| 336 | }; | ||
| 337 | pub const invalid_token_param_list = struct { | ||
| 338 | const msg = "invalid token in macro parameter list"; | ||
| 339 | const kind = .@"error"; | ||
| 340 | }; | ||
| 341 | pub const expected_comma_param_list = struct { | ||
| 342 | const msg = "expected comma in macro parameter list"; | ||
| 343 | const kind = .@"error"; | ||
| 344 | }; | ||
| 345 | pub const hash_not_followed_param = struct { | ||
| 346 | const msg = "'#' is not followed by a macro parameter"; | ||
| 347 | const kind = .@"error"; | ||
| 348 | }; | ||
| 349 | pub const expected_filename = struct { | ||
| 350 | const msg = "expected \"FILENAME\" or <FILENAME>"; | ||
| 351 | const kind = .@"error"; | ||
| 352 | }; | ||
| 353 | pub const empty_filename = struct { | ||
| 354 | const msg = "empty filename"; | ||
| 355 | const kind = .@"error"; | ||
| 356 | }; | ||
| 357 | pub const expected_invalid = struct { | ||
| 358 | const msg = "expected '{s}', found invalid bytes"; | ||
| 359 | const extra = .tok_id_expected; | ||
| 360 | const kind = .@"error"; | ||
| 361 | }; | ||
| 362 | pub const expected_eof = struct { | ||
| 363 | const msg = "expected '{s}' before end of file"; | ||
| 364 | const extra = .tok_id_expected; | ||
| 365 | const kind = .@"error"; | ||
| 366 | }; | ||
| 367 | pub const expected_token = struct { | ||
| 368 | const msg = "expected '{s}', found '{s}'"; | ||
| 369 | const extra = .tok_id; | ||
| 370 | const kind = .@"error"; | ||
| 371 | }; | ||
| 372 | pub const expected_expr = struct { | ||
| 373 | const msg = "expected expression"; | ||
| 374 | const kind = .@"error"; | ||
| 375 | }; | ||
| 376 | pub const expected_integer_constant_expr = struct { | ||
| 377 | const msg = "expression is not an integer constant expression"; | ||
| 378 | const kind = .@"error"; | ||
| 379 | }; | ||
| 380 | pub const missing_type_specifier = struct { | ||
| 381 | const msg = "type specifier missing, defaults to 'int'"; | ||
| 382 | const opt = "implicit-int"; | ||
| 383 | const kind = .warning; | ||
| 384 | const all = true; | ||
| 385 | }; | ||
| 386 | pub const missing_type_specifier_c2x = struct { | ||
| 387 | const msg = "a type specifier is required for all declarations"; | ||
| 388 | const kind = .@"error"; | ||
| 389 | }; | ||
| 390 | pub const multiple_storage_class = struct { | ||
| 391 | const msg = "cannot combine with previous '{s}' declaration specifier"; | ||
| 392 | const extra = .str; | ||
| 393 | const kind = .@"error"; | ||
| 394 | }; | ||
| 395 | pub const static_assert_failure = struct { | ||
| 396 | const msg = "static assertion failed"; | ||
| 397 | const kind = .@"error"; | ||
| 398 | }; | ||
| 399 | pub const static_assert_failure_message = struct { | ||
| 400 | const msg = "static assertion failed {s}"; | ||
| 401 | const extra = .str; | ||
| 402 | const kind = .@"error"; | ||
| 403 | }; | ||
| 404 | pub const expected_type = struct { | ||
| 405 | const msg = "expected a type"; | ||
| 406 | const kind = .@"error"; | ||
| 407 | }; | ||
| 408 | pub const cannot_combine_spec = struct { | ||
| 409 | const msg = "cannot combine with previous '{s}' specifier"; | ||
| 410 | const extra = .str; | ||
| 411 | const kind = .@"error"; | ||
| 412 | }; | ||
| 413 | pub const duplicate_decl_spec = struct { | ||
| 414 | const msg = "duplicate '{s}' declaration specifier"; | ||
| 415 | const extra = .str; | ||
| 416 | const opt = "duplicate-decl-specifier"; | ||
| 417 | const kind = .warning; | ||
| 418 | const all = true; | ||
| 419 | }; | ||
| 420 | pub const restrict_non_pointer = struct { | ||
| 421 | const msg = "restrict requires a pointer or reference ('{s}' is invalid)"; | ||
| 422 | const extra = .str; | ||
| 423 | const kind = .@"error"; | ||
| 424 | }; | ||
| 425 | pub const expected_external_decl = struct { | ||
| 426 | const msg = "expected external declaration"; | ||
| 427 | const kind = .@"error"; | ||
| 428 | }; | ||
| 429 | pub const expected_ident_or_l_paren = struct { | ||
| 430 | const msg = "expected identifier or '('"; | ||
| 431 | const kind = .@"error"; | ||
| 432 | }; | ||
| 433 | pub const missing_declaration = struct { | ||
| 434 | const msg = "declaration does not declare anything"; | ||
| 435 | const opt = "missing-declaration"; | ||
| 436 | const kind = .warning; | ||
| 437 | }; | ||
| 438 | pub const func_not_in_root = struct { | ||
| 439 | const msg = "function definition is not allowed here"; | ||
| 440 | const kind = .@"error"; | ||
| 441 | }; | ||
| 442 | pub const illegal_initializer = struct { | ||
| 443 | const msg = "illegal initializer (only variables can be initialized)"; | ||
| 444 | const kind = .@"error"; | ||
| 445 | }; | ||
| 446 | pub const extern_initializer = struct { | ||
| 447 | const msg = "extern variable has initializer"; | ||
| 448 | const opt = "extern-initializer"; | ||
| 449 | const kind = .warning; | ||
| 450 | }; | ||
| 451 | pub const spec_from_typedef = struct { | ||
| 452 | const msg = "'{s}' came from typedef"; | ||
| 453 | const extra = .str; | ||
| 454 | const kind = .note; | ||
| 455 | }; | ||
| 456 | pub const param_before_var_args = struct { | ||
| 457 | const msg = "ISO C requires a named parameter before '...'"; | ||
| 458 | const kind = .@"error"; | ||
| 459 | }; | ||
| 460 | pub const void_only_param = struct { | ||
| 461 | const msg = "'void' must be the only parameter if specified"; | ||
| 462 | const kind = .@"error"; | ||
| 463 | }; | ||
| 464 | pub const void_param_qualified = struct { | ||
| 465 | const msg = "'void' parameter cannot be qualified"; | ||
| 466 | const kind = .@"error"; | ||
| 467 | }; | ||
| 468 | pub const void_must_be_first_param = struct { | ||
| 469 | const msg = "'void' must be the first parameter if specified"; | ||
| 470 | const kind = .@"error"; | ||
| 471 | }; | ||
| 472 | pub const invalid_storage_on_param = struct { | ||
| 473 | const msg = "invalid storage class on function parameter"; | ||
| 474 | const kind = .@"error"; | ||
| 475 | }; | ||
| 476 | pub const threadlocal_non_var = struct { | ||
| 477 | const msg = "_Thread_local only allowed on variables"; | ||
| 478 | const kind = .@"error"; | ||
| 479 | }; | ||
| 480 | pub const func_spec_non_func = struct { | ||
| 481 | const msg = "'{s}' can only appear on functions"; | ||
| 482 | const extra = .str; | ||
| 483 | const kind = .@"error"; | ||
| 484 | }; | ||
| 485 | pub const illegal_storage_on_func = struct { | ||
| 486 | const msg = "illegal storage class on function"; | ||
| 487 | const kind = .@"error"; | ||
| 488 | }; | ||
| 489 | pub const illegal_storage_on_global = struct { | ||
| 490 | const msg = "illegal storage class on global variable"; | ||
| 491 | const kind = .@"error"; | ||
| 492 | }; | ||
| 493 | pub const expected_stmt = struct { | ||
| 494 | const msg = "expected statement"; | ||
| 495 | const kind = .@"error"; | ||
| 496 | }; | ||
| 497 | pub const func_cannot_return_func = struct { | ||
| 498 | const msg = "function cannot return a function"; | ||
| 499 | const kind = .@"error"; | ||
| 500 | }; | ||
| 501 | pub const func_cannot_return_array = struct { | ||
| 502 | const msg = "function cannot return an array"; | ||
| 503 | const kind = .@"error"; | ||
| 504 | }; | ||
| 505 | pub const undeclared_identifier = struct { | ||
| 506 | const msg = "use of undeclared identifier '{s}'"; | ||
| 507 | const extra = .str; | ||
| 508 | const kind = .@"error"; | ||
| 509 | }; | ||
| 510 | pub const not_callable = struct { | ||
| 511 | const msg = "cannot call non function type '{s}'"; | ||
| 512 | const extra = .str; | ||
| 513 | const kind = .@"error"; | ||
| 514 | }; | ||
| 515 | pub const unsupported_str_cat = struct { | ||
| 516 | const msg = "unsupported string literal concatenation"; | ||
| 517 | const kind = .@"error"; | ||
| 518 | }; | ||
| 519 | pub const static_func_not_global = struct { | ||
| 520 | const msg = "static functions must be global"; | ||
| 521 | const kind = .@"error"; | ||
| 522 | }; | ||
| 523 | pub const implicit_func_decl = struct { | ||
| 524 | const msg = "implicit declaration of function '{s}' is invalid in C99"; | ||
| 525 | const extra = .str; | ||
| 526 | const opt = "implicit-function-declaration"; | ||
| 527 | const kind = .warning; | ||
| 528 | const all = true; | ||
| 529 | }; | ||
| 530 | pub const unknown_builtin = struct { | ||
| 531 | const msg = "use of unknown builtin '{s}'"; | ||
| 532 | const extra = .str; | ||
| 533 | const opt = "implicit-function-declaration"; | ||
| 534 | const kind = .@"error"; | ||
| 535 | const all = true; | ||
| 536 | }; | ||
| 537 | pub const implicit_builtin = struct { | ||
| 538 | const msg = "implicitly declaring library function '{s}'"; | ||
| 539 | const extra = .str; | ||
| 540 | const opt = "implicit-function-declaration"; | ||
| 541 | const kind = .@"error"; | ||
| 542 | const all = true; | ||
| 543 | }; | ||
| 544 | pub const implicit_builtin_header_note = struct { | ||
| 545 | const msg = "include the header <{s}.h> or explicitly provide a declaration for '{s}'"; | ||
| 546 | const extra = .builtin_with_header; | ||
| 547 | const opt = "implicit-function-declaration"; | ||
| 548 | const kind = .note; | ||
| 549 | const all = true; | ||
| 550 | }; | ||
| 551 | pub const expected_param_decl = struct { | ||
| 552 | const msg = "expected parameter declaration"; | ||
| 553 | const kind = .@"error"; | ||
| 554 | }; | ||
| 555 | pub const invalid_old_style_params = struct { | ||
| 556 | const msg = "identifier parameter lists are only allowed in function definitions"; | ||
| 557 | const kind = .@"error"; | ||
| 558 | }; | ||
| 559 | pub const expected_fn_body = struct { | ||
| 560 | const msg = "expected function body after function declaration"; | ||
| 561 | const kind = .@"error"; | ||
| 562 | }; | ||
| 563 | pub const invalid_void_param = struct { | ||
| 564 | const msg = "parameter cannot have void type"; | ||
| 565 | const kind = .@"error"; | ||
| 566 | }; | ||
| 567 | pub const unused_value = struct { | ||
| 568 | const msg = "expression result unused"; | ||
| 569 | const opt = "unused-value"; | ||
| 570 | const kind = .warning; | ||
| 571 | const all = true; | ||
| 572 | }; | ||
| 573 | pub const continue_not_in_loop = struct { | ||
| 574 | const msg = "'continue' statement not in a loop"; | ||
| 575 | const kind = .@"error"; | ||
| 576 | }; | ||
| 577 | pub const break_not_in_loop_or_switch = struct { | ||
| 578 | const msg = "'break' statement not in a loop or a switch"; | ||
| 579 | const kind = .@"error"; | ||
| 580 | }; | ||
| 581 | pub const unreachable_code = struct { | ||
| 582 | const msg = "unreachable code"; | ||
| 583 | const opt = "unreachable-code"; | ||
| 584 | const kind = .warning; | ||
| 585 | const all = true; | ||
| 586 | }; | ||
| 587 | pub const duplicate_label = struct { | ||
| 588 | const msg = "duplicate label '{s}'"; | ||
| 589 | const extra = .str; | ||
| 590 | const kind = .@"error"; | ||
| 591 | }; | ||
| 592 | pub const previous_label = struct { | ||
| 593 | const msg = "previous definition of label '{s}' was here"; | ||
| 594 | const extra = .str; | ||
| 595 | const kind = .note; | ||
| 596 | }; | ||
| 597 | pub const undeclared_label = struct { | ||
| 598 | const msg = "use of undeclared label '{s}'"; | ||
| 599 | const extra = .str; | ||
| 600 | const kind = .@"error"; | ||
| 601 | }; | ||
| 602 | pub const case_not_in_switch = struct { | ||
| 603 | const msg = "'{s}' statement not in a switch statement"; | ||
| 604 | const extra = .str; | ||
| 605 | const kind = .@"error"; | ||
| 606 | }; | ||
| 607 | pub const duplicate_switch_case_signed = struct { | ||
| 608 | const msg = "duplicate case value '{d}'"; | ||
| 609 | const extra = .signed; | ||
| 610 | const kind = .@"error"; | ||
| 611 | }; | ||
| 612 | pub const duplicate_switch_case_unsigned = struct { | ||
| 613 | const msg = "duplicate case value '{d}'"; | ||
| 614 | const extra = .unsigned; | ||
| 615 | const kind = .@"error"; | ||
| 616 | }; | ||
| 617 | pub const multiple_default = struct { | ||
| 618 | const msg = "multiple default cases in the same switch"; | ||
| 619 | const kind = .@"error"; | ||
| 620 | }; | ||
| 621 | pub const previous_case = struct { | ||
| 622 | const msg = "previous case defined here"; | ||
| 623 | const kind = .note; | ||
| 624 | }; | ||
| 625 | pub const expected_arguments = struct { | ||
| 626 | const msg = "expected {d} argument(s) got {d}"; | ||
| 627 | const extra = .arguments; | ||
| 628 | const kind = .@"error"; | ||
| 629 | }; | ||
| 630 | pub const expected_arguments_old = struct { | ||
| 631 | const msg = expected_arguments.msg; | ||
| 632 | const extra = .arguments; | ||
| 633 | const kind = .warning; | ||
| 634 | }; | ||
| 635 | pub const expected_at_least_arguments = struct { | ||
| 636 | const msg = "expected at least {d} argument(s) got {d}"; | ||
| 637 | const extra = .arguments; | ||
| 638 | const kind = .warning; | ||
| 639 | }; | ||
| 640 | pub const invalid_static_star = struct { | ||
| 641 | const msg = "'static' may not be used with an unspecified variable length array size"; | ||
| 642 | const kind = .@"error"; | ||
| 643 | }; | ||
| 644 | pub const static_non_param = struct { | ||
| 645 | const msg = "'static' used outside of function parameters"; | ||
| 646 | const kind = .@"error"; | ||
| 647 | }; | ||
| 648 | pub const array_qualifiers = struct { | ||
| 649 | const msg = "type qualifier in non parameter array type"; | ||
| 650 | const kind = .@"error"; | ||
| 651 | }; | ||
| 652 | pub const star_non_param = struct { | ||
| 653 | const msg = "star modifier used outside of function parameters"; | ||
| 654 | const kind = .@"error"; | ||
| 655 | }; | ||
| 656 | pub const variable_len_array_file_scope = struct { | ||
| 657 | const msg = "variable length arrays not allowed at file scope"; | ||
| 658 | const kind = .@"error"; | ||
| 659 | }; | ||
| 660 | pub const useless_static = struct { | ||
| 661 | const msg = "'static' useless without a constant size"; | ||
| 662 | const kind = .warning; | ||
| 663 | const w_extra = true; | ||
| 664 | }; | ||
| 665 | pub const negative_array_size = struct { | ||
| 666 | const msg = "array size must be 0 or greater"; | ||
| 667 | const kind = .@"error"; | ||
| 668 | }; | ||
| 669 | pub const array_incomplete_elem = struct { | ||
| 670 | const msg = "array has incomplete element type '{s}'"; | ||
| 671 | const extra = .str; | ||
| 672 | const kind = .@"error"; | ||
| 673 | }; | ||
| 674 | pub const array_func_elem = struct { | ||
| 675 | const msg = "arrays cannot have functions as their element type"; | ||
| 676 | const kind = .@"error"; | ||
| 677 | }; | ||
| 678 | pub const static_non_outermost_array = struct { | ||
| 679 | const msg = "'static' used in non-outermost array type"; | ||
| 680 | const kind = .@"error"; | ||
| 681 | }; | ||
| 682 | pub const qualifier_non_outermost_array = struct { | ||
| 683 | const msg = "type qualifier used in non-outermost array type"; | ||
| 684 | const kind = .@"error"; | ||
| 685 | }; | ||
| 686 | pub const unterminated_macro_arg_list = struct { | ||
| 687 | const msg = "unterminated function macro argument list"; | ||
| 688 | const kind = .@"error"; | ||
| 689 | }; | ||
| 690 | pub const unknown_warning = struct { | ||
| 691 | const msg = "unknown warning '{s}'"; | ||
| 692 | const extra = .str; | ||
| 693 | const opt = "unknown-warning-option"; | ||
| 694 | const kind = .warning; | ||
| 695 | }; | ||
| 696 | pub const overflow_signed = struct { | ||
| 697 | const msg = "overflow in expression; result is '{d}'"; | ||
| 698 | const extra = .signed; | ||
| 699 | const opt = "integer-overflow"; | ||
| 700 | const kind = .warning; | ||
| 701 | }; | ||
| 702 | pub const overflow_unsigned = struct { | ||
| 703 | const msg = overflow_signed.msg; | ||
| 704 | const extra = .unsigned; | ||
| 705 | const opt = "integer-overflow"; | ||
| 706 | const kind = .warning; | ||
| 707 | }; | ||
| 708 | pub const int_literal_too_big = struct { | ||
| 709 | const msg = "integer literal is too large to be represented in any integer type"; | ||
| 710 | const kind = .@"error"; | ||
| 711 | }; | ||
| 712 | pub const indirection_ptr = struct { | ||
| 713 | const msg = "indirection requires pointer operand"; | ||
| 714 | const kind = .@"error"; | ||
| 715 | }; | ||
| 716 | pub const addr_of_rvalue = struct { | ||
| 717 | const msg = "cannot take the address of an rvalue"; | ||
| 718 | const kind = .@"error"; | ||
| 719 | }; | ||
| 720 | pub const addr_of_bitfield = struct { | ||
| 721 | const msg = "address of bit-field requested"; | ||
| 722 | const kind = .@"error"; | ||
| 723 | }; | ||
| 724 | pub const not_assignable = struct { | ||
| 725 | const msg = "expression is not assignable"; | ||
| 726 | const kind = .@"error"; | ||
| 727 | }; | ||
| 728 | pub const ident_or_l_brace = struct { | ||
| 729 | const msg = "expected identifier or '{'"; | ||
| 730 | const kind = .@"error"; | ||
| 731 | }; | ||
| 732 | pub const empty_enum = struct { | ||
| 733 | const msg = "empty enum is invalid"; | ||
| 734 | const kind = .@"error"; | ||
| 735 | }; | ||
| 736 | pub const redefinition = struct { | ||
| 737 | const msg = "redefinition of '{s}'"; | ||
| 738 | const extra = .str; | ||
| 739 | const kind = .@"error"; | ||
| 740 | }; | ||
| 741 | pub const previous_definition = struct { | ||
| 742 | const msg = "previous definition is here"; | ||
| 743 | const kind = .note; | ||
| 744 | }; | ||
| 745 | pub const expected_identifier = struct { | ||
| 746 | const msg = "expected identifier"; | ||
| 747 | const kind = .@"error"; | ||
| 748 | }; | ||
| 749 | pub const expected_str_literal = struct { | ||
| 750 | const msg = "expected string literal for diagnostic message in static_assert"; | ||
| 751 | const kind = .@"error"; | ||
| 752 | }; | ||
| 753 | pub const expected_str_literal_in = struct { | ||
| 754 | const msg = "expected string literal in '{s}'"; | ||
| 755 | const extra = .str; | ||
| 756 | const kind = .@"error"; | ||
| 757 | }; | ||
| 758 | pub const parameter_missing = struct { | ||
| 759 | const msg = "parameter named '{s}' is missing"; | ||
| 760 | const extra = .str; | ||
| 761 | const kind = .@"error"; | ||
| 762 | }; | ||
| 763 | pub const empty_record = struct { | ||
| 764 | const msg = "empty {s} is a GNU extension"; | ||
| 765 | const extra = .str; | ||
| 766 | const opt = "gnu-empty-struct"; | ||
| 767 | const kind = .off; | ||
| 768 | const pedantic = true; | ||
| 769 | }; | ||
| 770 | pub const empty_record_size = struct { | ||
| 771 | const msg = "empty {s} has size 0 in C, size 1 in C++"; | ||
| 772 | const extra = .str; | ||
| 773 | const opt = "c++-compat"; | ||
| 774 | const kind = .off; | ||
| 775 | }; | ||
| 776 | pub const wrong_tag = struct { | ||
| 777 | const msg = "use of '{s}' with tag type that does not match previous definition"; | ||
| 778 | const extra = .str; | ||
| 779 | const kind = .@"error"; | ||
| 780 | }; | ||
| 781 | pub const expected_parens_around_typename = struct { | ||
| 782 | const msg = "expected parentheses around type name"; | ||
| 783 | const kind = .@"error"; | ||
| 784 | }; | ||
| 785 | pub const alignof_expr = struct { | ||
| 786 | const msg = "'_Alignof' applied to an expression is a GNU extension"; | ||
| 787 | const opt = "gnu-alignof-expression"; | ||
| 788 | const kind = .warning; | ||
| 789 | const suppress_gnu = true; | ||
| 790 | }; | ||
| 791 | pub const invalid_alignof = struct { | ||
| 792 | const msg = "invalid application of 'alignof' to an incomplete type '{s}'"; | ||
| 793 | const extra = .str; | ||
| 794 | const kind = .@"error"; | ||
| 795 | }; | ||
| 796 | pub const invalid_sizeof = struct { | ||
| 797 | const msg = "invalid application of 'sizeof' to an incomplete type '{s}'"; | ||
| 798 | const extra = .str; | ||
| 799 | const kind = .@"error"; | ||
| 800 | }; | ||
| 801 | pub const macro_redefined = struct { | ||
| 802 | const msg = "'{s}' macro redefined"; | ||
| 803 | const extra = .str; | ||
| 804 | const opt = "macro-redefined"; | ||
| 805 | const kind = .warning; | ||
| 806 | }; | ||
| 807 | pub const generic_qual_type = struct { | ||
| 808 | const msg = "generic association with qualifiers cannot be matched with"; | ||
| 809 | const opt = "generic-qual-type"; | ||
| 810 | const kind = .warning; | ||
| 811 | }; | ||
| 812 | pub const generic_array_type = struct { | ||
| 813 | const msg = "generic association array type cannot be matched with"; | ||
| 814 | const opt = "generic-qual-type"; | ||
| 815 | const kind = .warning; | ||
| 816 | }; | ||
| 817 | pub const generic_func_type = struct { | ||
| 818 | const msg = "generic association function type cannot be matched with"; | ||
| 819 | const opt = "generic-qual-type"; | ||
| 820 | const kind = .warning; | ||
| 821 | }; | ||
| 822 | pub const generic_duplicate = struct { | ||
| 823 | const msg = "type '{s}' in generic association compatible with previously specified type"; | ||
| 824 | const extra = .str; | ||
| 825 | const kind = .@"error"; | ||
| 826 | }; | ||
| 827 | pub const generic_duplicate_here = struct { | ||
| 828 | const msg = "compatible type '{s}' specified here"; | ||
| 829 | const extra = .str; | ||
| 830 | const kind = .note; | ||
| 831 | }; | ||
| 832 | pub const generic_duplicate_default = struct { | ||
| 833 | const msg = "duplicate default generic association"; | ||
| 834 | const kind = .@"error"; | ||
| 835 | }; | ||
| 836 | pub const generic_no_match = struct { | ||
| 837 | const msg = "controlling expression type '{s}' not compatible with any generic association type"; | ||
| 838 | const extra = .str; | ||
| 839 | const kind = .@"error"; | ||
| 840 | }; | ||
| 841 | pub const escape_sequence_overflow = struct { | ||
| 842 | const msg = "escape sequence out of range"; | ||
| 843 | const kind = .@"error"; | ||
| 844 | }; | ||
| 845 | pub const invalid_universal_character = struct { | ||
| 846 | const msg = "invalid universal character"; | ||
| 847 | const kind = .@"error"; | ||
| 848 | }; | ||
| 849 | pub const incomplete_universal_character = struct { | ||
| 850 | const msg = "incomplete universal character name"; | ||
| 851 | const kind = .@"error"; | ||
| 852 | }; | ||
| 853 | pub const multichar_literal_warning = struct { | ||
| 854 | const msg = "multi-character character constant"; | ||
| 855 | const opt = "multichar"; | ||
| 856 | const kind = .warning; | ||
| 857 | const all = true; | ||
| 858 | }; | ||
| 859 | pub const invalid_multichar_literal = struct { | ||
| 860 | const msg = "{s} character literals may not contain multiple characters"; | ||
| 861 | const kind = .@"error"; | ||
| 862 | const extra = .str; | ||
| 863 | }; | ||
| 864 | pub const wide_multichar_literal = struct { | ||
| 865 | const msg = "extraneous characters in character constant ignored"; | ||
| 866 | const kind = .warning; | ||
| 867 | }; | ||
| 868 | pub const char_lit_too_wide = struct { | ||
| 869 | const msg = "character constant too long for its type"; | ||
| 870 | const kind = .warning; | ||
| 871 | const all = true; | ||
| 872 | }; | ||
| 873 | pub const char_too_large = struct { | ||
| 874 | const msg = "character too large for enclosing character literal type"; | ||
| 875 | const kind = .@"error"; | ||
| 876 | }; | ||
| 877 | pub const must_use_struct = struct { | ||
| 878 | const msg = "must use 'struct' tag to refer to type '{s}'"; | ||
| 879 | const extra = .str; | ||
| 880 | const kind = .@"error"; | ||
| 881 | }; | ||
| 882 | pub const must_use_union = struct { | ||
| 883 | const msg = "must use 'union' tag to refer to type '{s}'"; | ||
| 884 | const extra = .str; | ||
| 885 | const kind = .@"error"; | ||
| 886 | }; | ||
| 887 | pub const must_use_enum = struct { | ||
| 888 | const msg = "must use 'enum' tag to refer to type '{s}'"; | ||
| 889 | const extra = .str; | ||
| 890 | const kind = .@"error"; | ||
| 891 | }; | ||
| 892 | pub const redefinition_different_sym = struct { | ||
| 893 | const msg = "redefinition of '{s}' as different kind of symbol"; | ||
| 894 | const extra = .str; | ||
| 895 | const kind = .@"error"; | ||
| 896 | }; | ||
| 897 | pub const redefinition_incompatible = struct { | ||
| 898 | const msg = "redefinition of '{s}' with a different type"; | ||
| 899 | const extra = .str; | ||
| 900 | const kind = .@"error"; | ||
| 901 | }; | ||
| 902 | pub const redefinition_of_parameter = struct { | ||
| 903 | const msg = "redefinition of parameter '{s}'"; | ||
| 904 | const extra = .str; | ||
| 905 | const kind = .@"error"; | ||
| 906 | }; | ||
| 907 | pub const invalid_bin_types = struct { | ||
| 908 | const msg = "invalid operands to binary expression ({s})"; | ||
| 909 | const extra = .str; | ||
| 910 | const kind = .@"error"; | ||
| 911 | }; | ||
| 912 | pub const comparison_ptr_int = struct { | ||
| 913 | const msg = "comparison between pointer and integer ({s})"; | ||
| 914 | const extra = .str; | ||
| 915 | const opt = "pointer-integer-compare"; | ||
| 916 | const kind = .warning; | ||
| 917 | }; | ||
| 918 | pub const comparison_distinct_ptr = struct { | ||
| 919 | const msg = "comparison of distinct pointer types ({s})"; | ||
| 920 | const extra = .str; | ||
| 921 | const opt = "compare-distinct-pointer-types"; | ||
| 922 | const kind = .warning; | ||
| 923 | }; | ||
| 924 | pub const incompatible_pointers = struct { | ||
| 925 | const msg = "incompatible pointer types ({s})"; | ||
| 926 | const extra = .str; | ||
| 927 | const kind = .@"error"; | ||
| 928 | }; | ||
| 929 | pub const invalid_argument_un = struct { | ||
| 930 | const msg = "invalid argument type '{s}' to unary expression"; | ||
| 931 | const extra = .str; | ||
| 932 | const kind = .@"error"; | ||
| 933 | }; | ||
| 934 | pub const incompatible_assign = struct { | ||
| 935 | const msg = "assignment to {s}"; | ||
| 936 | const extra = .str; | ||
| 937 | const kind = .@"error"; | ||
| 938 | }; | ||
| 939 | pub const implicit_ptr_to_int = struct { | ||
| 940 | const msg = "implicit pointer to integer conversion from {s}"; | ||
| 941 | const extra = .str; | ||
| 942 | const opt = "int-conversion"; | ||
| 943 | const kind = .warning; | ||
| 944 | }; | ||
| 945 | pub const invalid_cast_to_float = struct { | ||
| 946 | const msg = "pointer cannot be cast to type '{s}'"; | ||
| 947 | const extra = .str; | ||
| 948 | const kind = .@"error"; | ||
| 949 | }; | ||
| 950 | pub const invalid_cast_to_pointer = struct { | ||
| 951 | const msg = "operand of type '{s}' cannot be cast to a pointer type"; | ||
| 952 | const extra = .str; | ||
| 953 | const kind = .@"error"; | ||
| 954 | }; | ||
| 955 | pub const invalid_cast_type = struct { | ||
| 956 | const msg = "cannot cast to non arithmetic or pointer type '{s}'"; | ||
| 957 | const extra = .str; | ||
| 958 | const kind = .@"error"; | ||
| 959 | }; | ||
| 960 | pub const qual_cast = struct { | ||
| 961 | const msg = "cast to type '{s}' will not preserve qualifiers"; | ||
| 962 | const extra = .str; | ||
| 963 | const opt = "cast-qualifiers"; | ||
| 964 | const kind = .warning; | ||
| 965 | }; | ||
| 966 | pub const invalid_index = struct { | ||
| 967 | const msg = "array subscript is not an integer"; | ||
| 968 | const kind = .@"error"; | ||
| 969 | }; | ||
| 970 | pub const invalid_subscript = struct { | ||
| 971 | const msg = "subscripted value is not an array or pointer"; | ||
| 972 | const kind = .@"error"; | ||
| 973 | }; | ||
| 974 | pub const array_after = struct { | ||
| 975 | const msg = "array index {d} is past the end of the array"; | ||
| 976 | const extra = .unsigned; | ||
| 977 | const opt = "array-bounds"; | ||
| 978 | const kind = .warning; | ||
| 979 | }; | ||
| 980 | pub const array_before = struct { | ||
| 981 | const msg = "array index {d} is before the beginning of the array"; | ||
| 982 | const extra = .signed; | ||
| 983 | const opt = "array-bounds"; | ||
| 984 | const kind = .warning; | ||
| 985 | }; | ||
| 986 | pub const statement_int = struct { | ||
| 987 | const msg = "statement requires expression with integer type ('{s}' invalid)"; | ||
| 988 | const extra = .str; | ||
| 989 | const kind = .@"error"; | ||
| 990 | }; | ||
| 991 | pub const statement_scalar = struct { | ||
| 992 | const msg = "statement requires expression with scalar type ('{s}' invalid)"; | ||
| 993 | const extra = .str; | ||
| 994 | const kind = .@"error"; | ||
| 995 | }; | ||
| 996 | pub const func_should_return = struct { | ||
| 997 | const msg = "non-void function '{s}' should return a value"; | ||
| 998 | const extra = .str; | ||
| 999 | const opt = "return-type"; | ||
| 1000 | const kind = .@"error"; | ||
| 1001 | const all = true; | ||
| 1002 | }; | ||
| 1003 | pub const incompatible_return = struct { | ||
| 1004 | const msg = "returning {s}"; | ||
| 1005 | const extra = .str; | ||
| 1006 | const kind = .@"error"; | ||
| 1007 | }; | ||
| 1008 | pub const incompatible_return_sign = struct { | ||
| 1009 | const msg = "returning {s}" ++ PointerSignMessage; | ||
| 1010 | const extra = .str; | ||
| 1011 | const kind = .warning; | ||
| 1012 | const opt = "pointer-sign"; | ||
| 1013 | }; | ||
| 1014 | pub const implicit_int_to_ptr = struct { | ||
| 1015 | const msg = "implicit integer to pointer conversion from {s}"; | ||
| 1016 | const extra = .str; | ||
| 1017 | const opt = "int-conversion"; | ||
| 1018 | const kind = .warning; | ||
| 1019 | }; | ||
| 1020 | pub const func_does_not_return = struct { | ||
| 1021 | const msg = "non-void function '{s}' does not return a value"; | ||
| 1022 | const extra = .str; | ||
| 1023 | const opt = "return-type"; | ||
| 1024 | const kind = .warning; | ||
| 1025 | const all = true; | ||
| 1026 | }; | ||
| 1027 | pub const void_func_returns_value = struct { | ||
| 1028 | const msg = "void function '{s}' should not return a value"; | ||
| 1029 | const extra = .str; | ||
| 1030 | const opt = "return-type"; | ||
| 1031 | const kind = .@"error"; | ||
| 1032 | const all = true; | ||
| 1033 | }; | ||
| 1034 | pub const incompatible_arg = struct { | ||
| 1035 | const msg = "passing {s}"; | ||
| 1036 | const extra = .str; | ||
| 1037 | const kind = .@"error"; | ||
| 1038 | }; | ||
| 1039 | pub const incompatible_ptr_arg = struct { | ||
| 1040 | const msg = "passing {s}"; | ||
| 1041 | const extra = .str; | ||
| 1042 | const kind = .warning; | ||
| 1043 | const opt = "incompatible-pointer-types"; | ||
| 1044 | }; | ||
| 1045 | pub const incompatible_ptr_arg_sign = struct { | ||
| 1046 | const msg = "passing {s}" ++ PointerSignMessage; | ||
| 1047 | const extra = .str; | ||
| 1048 | const kind = .warning; | ||
| 1049 | const opt = "pointer-sign"; | ||
| 1050 | }; | ||
| 1051 | pub const parameter_here = struct { | ||
| 1052 | const msg = "passing argument to parameter here"; | ||
| 1053 | const kind = .note; | ||
| 1054 | }; | ||
| 1055 | pub const atomic_array = struct { | ||
| 1056 | const msg = "atomic cannot be applied to array type '{s}'"; | ||
| 1057 | const extra = .str; | ||
| 1058 | const kind = .@"error"; | ||
| 1059 | }; | ||
| 1060 | pub const atomic_func = struct { | ||
| 1061 | const msg = "atomic cannot be applied to function type '{s}'"; | ||
| 1062 | const extra = .str; | ||
| 1063 | const kind = .@"error"; | ||
| 1064 | }; | ||
| 1065 | pub const atomic_incomplete = struct { | ||
| 1066 | const msg = "atomic cannot be applied to incomplete type '{s}'"; | ||
| 1067 | const extra = .str; | ||
| 1068 | const kind = .@"error"; | ||
| 1069 | }; | ||
| 1070 | pub const addr_of_register = struct { | ||
| 1071 | const msg = "address of register variable requested"; | ||
| 1072 | const kind = .@"error"; | ||
| 1073 | }; | ||
| 1074 | pub const variable_incomplete_ty = struct { | ||
| 1075 | const msg = "variable has incomplete type '{s}'"; | ||
| 1076 | const extra = .str; | ||
| 1077 | const kind = .@"error"; | ||
| 1078 | }; | ||
| 1079 | pub const parameter_incomplete_ty = struct { | ||
| 1080 | const msg = "parameter has incomplete type '{s}'"; | ||
| 1081 | const extra = .str; | ||
| 1082 | const kind = .@"error"; | ||
| 1083 | }; | ||
| 1084 | pub const tentative_array = struct { | ||
| 1085 | const msg = "tentative array definition assumed to have one element"; | ||
| 1086 | const kind = .warning; | ||
| 1087 | }; | ||
| 1088 | pub const deref_incomplete_ty_ptr = struct { | ||
| 1089 | const msg = "dereferencing pointer to incomplete type '{s}'"; | ||
| 1090 | const extra = .str; | ||
| 1091 | const kind = .@"error"; | ||
| 1092 | }; | ||
| 1093 | pub const alignas_on_func = struct { | ||
| 1094 | const msg = "'_Alignas' attribute only applies to variables and fields"; | ||
| 1095 | const kind = .@"error"; | ||
| 1096 | }; | ||
| 1097 | pub const alignas_on_param = struct { | ||
| 1098 | const msg = "'_Alignas' attribute cannot be applied to a function parameter"; | ||
| 1099 | const kind = .@"error"; | ||
| 1100 | }; | ||
| 1101 | pub const minimum_alignment = struct { | ||
| 1102 | const msg = "requested alignment is less than minimum alignment of {d}"; | ||
| 1103 | const extra = .unsigned; | ||
| 1104 | const kind = .@"error"; | ||
| 1105 | }; | ||
| 1106 | pub const maximum_alignment = struct { | ||
| 1107 | const msg = "requested alignment of {d} is too large"; | ||
| 1108 | const extra = .unsigned; | ||
| 1109 | const kind = .@"error"; | ||
| 1110 | }; | ||
| 1111 | pub const negative_alignment = struct { | ||
| 1112 | const msg = "requested negative alignment of {d} is invalid"; | ||
| 1113 | const extra = .signed; | ||
| 1114 | const kind = .@"error"; | ||
| 1115 | }; | ||
| 1116 | pub const align_ignored = struct { | ||
| 1117 | const msg = "'_Alignas' attribute is ignored here"; | ||
| 1118 | const kind = .warning; | ||
| 1119 | }; | ||
| 1120 | pub const zero_align_ignored = struct { | ||
| 1121 | const msg = "requested alignment of zero is ignored"; | ||
| 1122 | const kind = .warning; | ||
| 1123 | }; | ||
| 1124 | pub const non_pow2_align = struct { | ||
| 1125 | const msg = "requested alignment is not a power of 2"; | ||
| 1126 | const kind = .@"error"; | ||
| 1127 | }; | ||
| 1128 | pub const pointer_mismatch = struct { | ||
| 1129 | const msg = "pointer type mismatch ({s})"; | ||
| 1130 | const extra = .str; | ||
| 1131 | const opt = "pointer-type-mismatch"; | ||
| 1132 | const kind = .warning; | ||
| 1133 | }; | ||
| 1134 | pub const static_assert_not_constant = struct { | ||
| 1135 | const msg = "static_assert expression is not an integral constant expression"; | ||
| 1136 | const kind = .@"error"; | ||
| 1137 | }; | ||
| 1138 | pub const static_assert_missing_message = struct { | ||
| 1139 | const msg = "static_assert with no message is a C2X extension"; | ||
| 1140 | const opt = "c2x-extensions"; | ||
| 1141 | const kind = .warning; | ||
| 1142 | const suppress_version = .c2x; | ||
| 1143 | }; | ||
| 1144 | pub const pre_c2x_compat = struct { | ||
| 1145 | const msg = "{s} is incompatible with C standards before C2x"; | ||
| 1146 | const extra = .str; | ||
| 1147 | const kind = .off; | ||
| 1148 | const suppress_unless_version = .c2x; | ||
| 1149 | const opt = "pre-c2x-compat"; | ||
| 1150 | }; | ||
| 1151 | pub const unbound_vla = struct { | ||
| 1152 | const msg = "variable length array must be bound in function definition"; | ||
| 1153 | const kind = .@"error"; | ||
| 1154 | }; | ||
| 1155 | pub const array_too_large = struct { | ||
| 1156 | const msg = "array is too large"; | ||
| 1157 | const kind = .@"error"; | ||
| 1158 | }; | ||
| 1159 | pub const incompatible_ptr_init = struct { | ||
| 1160 | const msg = "incompatible pointer types initializing {s}"; | ||
| 1161 | const extra = .str; | ||
| 1162 | const opt = "incompatible-pointer-types"; | ||
| 1163 | const kind = .warning; | ||
| 1164 | }; | ||
| 1165 | pub const incompatible_ptr_init_sign = struct { | ||
| 1166 | const msg = "incompatible pointer types initializing {s}" ++ PointerSignMessage; | ||
| 1167 | const extra = .str; | ||
| 1168 | const opt = "pointer-sign"; | ||
| 1169 | const kind = .warning; | ||
| 1170 | }; | ||
| 1171 | pub const incompatible_ptr_assign = struct { | ||
| 1172 | const msg = "incompatible pointer types assigning to {s}"; | ||
| 1173 | const extra = .str; | ||
| 1174 | const opt = "incompatible-pointer-types"; | ||
| 1175 | const kind = .warning; | ||
| 1176 | }; | ||
| 1177 | pub const incompatible_ptr_assign_sign = struct { | ||
| 1178 | const msg = "incompatible pointer types assigning to {s} " ++ PointerSignMessage; | ||
| 1179 | const extra = .str; | ||
| 1180 | const opt = "pointer-sign"; | ||
| 1181 | const kind = .warning; | ||
| 1182 | }; | ||
| 1183 | pub const vla_init = struct { | ||
| 1184 | const msg = "variable-sized object may not be initialized"; | ||
| 1185 | const kind = .@"error"; | ||
| 1186 | }; | ||
| 1187 | pub const func_init = struct { | ||
| 1188 | const msg = "illegal initializer type"; | ||
| 1189 | const kind = .@"error"; | ||
| 1190 | }; | ||
| 1191 | pub const incompatible_init = struct { | ||
| 1192 | const msg = "initializing {s}"; | ||
| 1193 | const extra = .str; | ||
| 1194 | const kind = .@"error"; | ||
| 1195 | }; | ||
| 1196 | pub const empty_scalar_init = struct { | ||
| 1197 | const msg = "scalar initializer cannot be empty"; | ||
| 1198 | const kind = .@"error"; | ||
| 1199 | }; | ||
| 1200 | pub const excess_scalar_init = struct { | ||
| 1201 | const msg = "excess elements in scalar initializer"; | ||
| 1202 | const opt = "excess-initializers"; | ||
| 1203 | const kind = .warning; | ||
| 1204 | }; | ||
| 1205 | pub const excess_str_init = struct { | ||
| 1206 | const msg = "excess elements in string initializer"; | ||
| 1207 | const opt = "excess-initializers"; | ||
| 1208 | const kind = .warning; | ||
| 1209 | }; | ||
| 1210 | pub const excess_struct_init = struct { | ||
| 1211 | const msg = "excess elements in struct initializer"; | ||
| 1212 | const opt = "excess-initializers"; | ||
| 1213 | const kind = .warning; | ||
| 1214 | }; | ||
| 1215 | pub const excess_array_init = struct { | ||
| 1216 | const msg = "excess elements in array initializer"; | ||
| 1217 | const opt = "excess-initializers"; | ||
| 1218 | const kind = .warning; | ||
| 1219 | }; | ||
| 1220 | pub const str_init_too_long = struct { | ||
| 1221 | const msg = "initializer-string for char array is too long"; | ||
| 1222 | const opt = "excess-initializers"; | ||
| 1223 | const kind = .warning; | ||
| 1224 | }; | ||
| 1225 | pub const arr_init_too_long = struct { | ||
| 1226 | const msg = "cannot initialize type ({s})"; | ||
| 1227 | const extra = .str; | ||
| 1228 | const kind = .@"error"; | ||
| 1229 | }; | ||
| 1230 | pub const invalid_typeof = struct { | ||
| 1231 | const msg = "'{s} typeof' is invalid"; | ||
| 1232 | const extra = .str; | ||
| 1233 | const kind = .@"error"; | ||
| 1234 | }; | ||
| 1235 | pub const division_by_zero = struct { | ||
| 1236 | const msg = "{s} by zero is undefined"; | ||
| 1237 | const extra = .str; | ||
| 1238 | const opt = "division-by-zero"; | ||
| 1239 | const kind = .warning; | ||
| 1240 | }; | ||
| 1241 | pub const division_by_zero_macro = struct { | ||
| 1242 | const msg = "{s} by zero in preprocessor expression"; | ||
| 1243 | const extra = .str; | ||
| 1244 | const kind = .@"error"; | ||
| 1245 | }; | ||
| 1246 | pub const builtin_choose_cond = struct { | ||
| 1247 | const msg = "'__builtin_choose_expr' requires a constant expression"; | ||
| 1248 | const kind = .@"error"; | ||
| 1249 | }; | ||
| 1250 | pub const alignas_unavailable = struct { | ||
| 1251 | const msg = "'_Alignas' attribute requires integer constant expression"; | ||
| 1252 | const kind = .@"error"; | ||
| 1253 | }; | ||
| 1254 | pub const case_val_unavailable = struct { | ||
| 1255 | const msg = "case value must be an integer constant expression"; | ||
| 1256 | const kind = .@"error"; | ||
| 1257 | }; | ||
| 1258 | pub const enum_val_unavailable = struct { | ||
| 1259 | const msg = "enum value must be an integer constant expression"; | ||
| 1260 | const kind = .@"error"; | ||
| 1261 | }; | ||
| 1262 | pub const incompatible_array_init = struct { | ||
| 1263 | const msg = "cannot initialize array of type {s}"; | ||
| 1264 | const extra = .str; | ||
| 1265 | const kind = .@"error"; | ||
| 1266 | }; | ||
| 1267 | pub const array_init_str = struct { | ||
| 1268 | const msg = "array initializer must be an initializer list or wide string literal"; | ||
| 1269 | const kind = .@"error"; | ||
| 1270 | }; | ||
| 1271 | pub const initializer_overrides = struct { | ||
| 1272 | const msg = "initializer overrides previous initialization"; | ||
| 1273 | const opt = "initializer-overrides"; | ||
| 1274 | const kind = .warning; | ||
| 1275 | const w_extra = true; | ||
| 1276 | }; | ||
| 1277 | pub const previous_initializer = struct { | ||
| 1278 | const msg = "previous initialization"; | ||
| 1279 | const kind = .note; | ||
| 1280 | }; | ||
| 1281 | pub const invalid_array_designator = struct { | ||
| 1282 | const msg = "array designator used for non-array type '{s}'"; | ||
| 1283 | const extra = .str; | ||
| 1284 | const kind = .@"error"; | ||
| 1285 | }; | ||
| 1286 | pub const negative_array_designator = struct { | ||
| 1287 | const msg = "array designator value {d} is negative"; | ||
| 1288 | const extra = .signed; | ||
| 1289 | const kind = .@"error"; | ||
| 1290 | }; | ||
| 1291 | pub const oob_array_designator = struct { | ||
| 1292 | const msg = "array designator index {d} exceeds array bounds"; | ||
| 1293 | const extra = .unsigned; | ||
| 1294 | const kind = .@"error"; | ||
| 1295 | }; | ||
| 1296 | pub const invalid_field_designator = struct { | ||
| 1297 | const msg = "field designator used for non-record type '{s}'"; | ||
| 1298 | const extra = .str; | ||
| 1299 | const kind = .@"error"; | ||
| 1300 | }; | ||
| 1301 | pub const no_such_field_designator = struct { | ||
| 1302 | const msg = "record type has no field named '{s}'"; | ||
| 1303 | const extra = .str; | ||
| 1304 | const kind = .@"error"; | ||
| 1305 | }; | ||
| 1306 | pub const empty_aggregate_init_braces = struct { | ||
| 1307 | const msg = "initializer for aggregate with no elements requires explicit braces"; | ||
| 1308 | const kind = .@"error"; | ||
| 1309 | }; | ||
| 1310 | pub const ptr_init_discards_quals = struct { | ||
| 1311 | const msg = "initializing {s} discards qualifiers"; | ||
| 1312 | const extra = .str; | ||
| 1313 | const opt = "incompatible-pointer-types-discards-qualifiers"; | ||
| 1314 | const kind = .warning; | ||
| 1315 | }; | ||
| 1316 | pub const ptr_assign_discards_quals = struct { | ||
| 1317 | const msg = "assigning to {s} discards qualifiers"; | ||
| 1318 | const extra = .str; | ||
| 1319 | const opt = "incompatible-pointer-types-discards-qualifiers"; | ||
| 1320 | const kind = .warning; | ||
| 1321 | }; | ||
| 1322 | pub const ptr_ret_discards_quals = struct { | ||
| 1323 | const msg = "returning {s} discards qualifiers"; | ||
| 1324 | const extra = .str; | ||
| 1325 | const opt = "incompatible-pointer-types-discards-qualifiers"; | ||
| 1326 | const kind = .warning; | ||
| 1327 | }; | ||
| 1328 | pub const ptr_arg_discards_quals = struct { | ||
| 1329 | const msg = "passing {s} discards qualifiers"; | ||
| 1330 | const extra = .str; | ||
| 1331 | const opt = "incompatible-pointer-types-discards-qualifiers"; | ||
| 1332 | const kind = .warning; | ||
| 1333 | }; | ||
| 1334 | pub const unknown_attribute = struct { | ||
| 1335 | const msg = "unknown attribute '{s}' ignored"; | ||
| 1336 | const extra = .str; | ||
| 1337 | const opt = "unknown-attributes"; | ||
| 1338 | const kind = .warning; | ||
| 1339 | }; | ||
| 1340 | pub const ignored_attribute = struct { | ||
| 1341 | const msg = "{s}"; | ||
| 1342 | const extra = .str; | ||
| 1343 | const opt = "ignored-attributes"; | ||
| 1344 | const kind = .warning; | ||
| 1345 | }; | ||
| 1346 | pub const invalid_fallthrough = struct { | ||
| 1347 | const msg = "fallthrough annotation does not directly precede switch label"; | ||
| 1348 | const kind = .@"error"; | ||
| 1349 | }; | ||
| 1350 | pub const cannot_apply_attribute_to_statement = struct { | ||
| 1351 | const msg = "'{s}' attribute cannot be applied to a statement"; | ||
| 1352 | const extra = .str; | ||
| 1353 | const kind = .@"error"; | ||
| 1354 | }; | ||
| 1355 | pub const builtin_macro_redefined = struct { | ||
| 1356 | const msg = "redefining builtin macro"; | ||
| 1357 | const opt = "builtin-macro-redefined"; | ||
| 1358 | const kind = .warning; | ||
| 1359 | }; | ||
| 1360 | pub const feature_check_requires_identifier = struct { | ||
| 1361 | const msg = "builtin feature check macro requires a parenthesized identifier"; | ||
| 1362 | const kind = .@"error"; | ||
| 1363 | }; | ||
| 1364 | pub const missing_tok_builtin = struct { | ||
| 1365 | const msg = "missing '{s}', after builtin feature-check macro"; | ||
| 1366 | const extra = .tok_id_expected; | ||
| 1367 | const kind = .@"error"; | ||
| 1368 | }; | ||
| 1369 | pub const gnu_label_as_value = struct { | ||
| 1370 | const msg = "use of GNU address-of-label extension"; | ||
| 1371 | const opt = "gnu-label-as-value"; | ||
| 1372 | const kind = .off; | ||
| 1373 | const pedantic = true; | ||
| 1374 | }; | ||
| 1375 | pub const expected_record_ty = struct { | ||
| 1376 | const msg = "member reference base type '{s}' is not a structure or union"; | ||
| 1377 | const extra = .str; | ||
| 1378 | const kind = .@"error"; | ||
| 1379 | }; | ||
| 1380 | pub const member_expr_not_ptr = struct { | ||
| 1381 | const msg = "member reference type '{s}' is not a pointer; did you mean to use '.'?"; | ||
| 1382 | const extra = .str; | ||
| 1383 | const kind = .@"error"; | ||
| 1384 | }; | ||
| 1385 | pub const member_expr_ptr = struct { | ||
| 1386 | const msg = "member reference type '{s}' is a pointer; did you mean to use '->'?"; | ||
| 1387 | const extra = .str; | ||
| 1388 | const kind = .@"error"; | ||
| 1389 | }; | ||
| 1390 | pub const no_such_member = struct { | ||
| 1391 | const msg = "no member named {s}"; | ||
| 1392 | const extra = .str; | ||
| 1393 | const kind = .@"error"; | ||
| 1394 | }; | ||
| 1395 | pub const malformed_warning_check = struct { | ||
| 1396 | const msg = "{s} expected option name (e.g. \"-Wundef\")"; | ||
| 1397 | const extra = .str; | ||
| 1398 | const opt = "malformed-warning-check"; | ||
| 1399 | const kind = .warning; | ||
| 1400 | const all = true; | ||
| 1401 | }; | ||
| 1402 | pub const invalid_computed_goto = struct { | ||
| 1403 | const msg = "computed goto in function with no address-of-label expressions"; | ||
| 1404 | const kind = .@"error"; | ||
| 1405 | }; | ||
| 1406 | pub const pragma_warning_message = struct { | ||
| 1407 | const msg = "{s}"; | ||
| 1408 | const extra = .str; | ||
| 1409 | const opt = "#pragma-messages"; | ||
| 1410 | const kind = .warning; | ||
| 1411 | }; | ||
| 1412 | pub const pragma_error_message = struct { | ||
| 1413 | const msg = "{s}"; | ||
| 1414 | const extra = .str; | ||
| 1415 | const kind = .@"error"; | ||
| 1416 | }; | ||
| 1417 | pub const pragma_message = struct { | ||
| 1418 | const msg = "#pragma message: {s}"; | ||
| 1419 | const extra = .str; | ||
| 1420 | const kind = .note; | ||
| 1421 | }; | ||
| 1422 | pub const pragma_requires_string_literal = struct { | ||
| 1423 | const msg = "pragma {s} requires string literal"; | ||
| 1424 | const extra = .str; | ||
| 1425 | const kind = .@"error"; | ||
| 1426 | }; | ||
| 1427 | pub const poisoned_identifier = struct { | ||
| 1428 | const msg = "attempt to use a poisoned identifier"; | ||
| 1429 | const kind = .@"error"; | ||
| 1430 | }; | ||
| 1431 | pub const pragma_poison_identifier = struct { | ||
| 1432 | const msg = "can only poison identifier tokens"; | ||
| 1433 | const kind = .@"error"; | ||
| 1434 | }; | ||
| 1435 | pub const pragma_poison_macro = struct { | ||
| 1436 | const msg = "poisoning existing macro"; | ||
| 1437 | const kind = .warning; | ||
| 1438 | }; | ||
| 1439 | pub const newline_eof = struct { | ||
| 1440 | const msg = "no newline at end of file"; | ||
| 1441 | const opt = "newline-eof"; | ||
| 1442 | const kind = .off; | ||
| 1443 | const pedantic = true; | ||
| 1444 | }; | ||
| 1445 | pub const empty_translation_unit = struct { | ||
| 1446 | const msg = "ISO C requires a translation unit to contain at least one declaration"; | ||
| 1447 | const opt = "empty-translation-unit"; | ||
| 1448 | const kind = .off; | ||
| 1449 | const pedantic = true; | ||
| 1450 | }; | ||
| 1451 | pub const omitting_parameter_name = struct { | ||
| 1452 | const msg = "omitting the parameter name in a function definition is a C2x extension"; | ||
| 1453 | const opt = "c2x-extensions"; | ||
| 1454 | const kind = .warning; | ||
| 1455 | const suppress_version = .c2x; | ||
| 1456 | }; | ||
| 1457 | pub const non_int_bitfield = struct { | ||
| 1458 | const msg = "bit-field has non-integer type '{s}'"; | ||
| 1459 | const extra = .str; | ||
| 1460 | const kind = .@"error"; | ||
| 1461 | }; | ||
| 1462 | pub const negative_bitwidth = struct { | ||
| 1463 | const msg = "bit-field has negative width ({d})"; | ||
| 1464 | const extra = .signed; | ||
| 1465 | const kind = .@"error"; | ||
| 1466 | }; | ||
| 1467 | pub const zero_width_named_field = struct { | ||
| 1468 | const msg = "named bit-field has zero width"; | ||
| 1469 | const kind = .@"error"; | ||
| 1470 | }; | ||
| 1471 | pub const bitfield_too_big = struct { | ||
| 1472 | const msg = "width of bit-field exceeds width of its type"; | ||
| 1473 | const kind = .@"error"; | ||
| 1474 | }; | ||
| 1475 | pub const invalid_utf8 = struct { | ||
| 1476 | const msg = "source file is not valid UTF-8"; | ||
| 1477 | const kind = .@"error"; | ||
| 1478 | }; | ||
| 1479 | pub const implicitly_unsigned_literal = struct { | ||
| 1480 | const msg = "integer literal is too large to be represented in a signed integer type, interpreting as unsigned"; | ||
| 1481 | const opt = "implicitly-unsigned-literal"; | ||
| 1482 | const kind = .warning; | ||
| 1483 | }; | ||
| 1484 | pub const invalid_preproc_operator = struct { | ||
| 1485 | const msg = "token is not a valid binary operator in a preprocessor subexpression"; | ||
| 1486 | const kind = .@"error"; | ||
| 1487 | }; | ||
| 1488 | pub const invalid_preproc_expr_start = struct { | ||
| 1489 | const msg = "invalid token at start of a preprocessor expression"; | ||
| 1490 | const kind = .@"error"; | ||
| 1491 | }; | ||
| 1492 | pub const c99_compat = struct { | ||
| 1493 | const msg = "using this character in an identifier is incompatible with C99"; | ||
| 1494 | const opt = "c99-compat"; | ||
| 1495 | const kind = .off; | ||
| 1496 | }; | ||
| 1497 | pub const unexpected_character = struct { | ||
| 1498 | const msg = "unexpected character <U+{X:0>4}>"; | ||
| 1499 | const extra = .actual_codepoint; | ||
| 1500 | const kind = .@"error"; | ||
| 1501 | }; | ||
| 1502 | pub const invalid_identifier_start_char = struct { | ||
| 1503 | const msg = "character <U+{X:0>4}> not allowed at the start of an identifier"; | ||
| 1504 | const extra = .actual_codepoint; | ||
| 1505 | const kind = .@"error"; | ||
| 1506 | }; | ||
| 1507 | pub const unicode_zero_width = struct { | ||
| 1508 | const msg = "identifier contains Unicode character <U+{X:0>4}> that is invisible in some environments"; | ||
| 1509 | const opt = "unicode-homoglyph"; | ||
| 1510 | const extra = .actual_codepoint; | ||
| 1511 | const kind = .warning; | ||
| 1512 | }; | ||
| 1513 | pub const unicode_homoglyph = struct { | ||
| 1514 | const msg = "treating Unicode character <U+{X:0>4}> as identifier character rather than as '{u}' symbol"; | ||
| 1515 | const extra = .codepoints; | ||
| 1516 | const opt = "unicode-homoglyph"; | ||
| 1517 | const kind = .warning; | ||
| 1518 | }; | ||
| 1519 | pub const meaningless_asm_qual = struct { | ||
| 1520 | const msg = "meaningless '{s}' on assembly outside function"; | ||
| 1521 | const extra = .str; | ||
| 1522 | const kind = .@"error"; | ||
| 1523 | }; | ||
| 1524 | pub const duplicate_asm_qual = struct { | ||
| 1525 | const msg = "duplicate asm qualifier '{s}'"; | ||
| 1526 | const extra = .str; | ||
| 1527 | const kind = .@"error"; | ||
| 1528 | }; | ||
| 1529 | pub const invalid_asm_str = struct { | ||
| 1530 | const msg = "cannot use {s} string literal in assembly"; | ||
| 1531 | const extra = .str; | ||
| 1532 | const kind = .@"error"; | ||
| 1533 | }; | ||
| 1534 | pub const dollar_in_identifier_extension = struct { | ||
| 1535 | const msg = "'$' in identifier"; | ||
| 1536 | const opt = "dollar-in-identifier-extension"; | ||
| 1537 | const kind = .off; | ||
| 1538 | const suppress_language_option = "dollars_in_identifiers"; | ||
| 1539 | const pedantic = true; | ||
| 1540 | }; | ||
| 1541 | pub const dollars_in_identifiers = struct { | ||
| 1542 | const msg = "illegal character '$' in identifier"; | ||
| 1543 | const kind = .@"error"; | ||
| 1544 | }; | ||
| 1545 | pub const expanded_from_here = struct { | ||
| 1546 | const msg = "expanded from here"; | ||
| 1547 | const kind = .note; | ||
| 1548 | }; | ||
| 1549 | pub const skipping_macro_backtrace = struct { | ||
| 1550 | const msg = "(skipping {d} expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)"; | ||
| 1551 | const extra = .unsigned; | ||
| 1552 | const kind = .note; | ||
| 1553 | }; | ||
| 1554 | pub const pragma_operator_string_literal = struct { | ||
| 1555 | const msg = "_Pragma requires exactly one string literal token"; | ||
| 1556 | const kind = .@"error"; | ||
| 1557 | }; | ||
| 1558 | pub const unknown_gcc_pragma = struct { | ||
| 1559 | const msg = "pragma GCC expected 'error', 'warning', 'diagnostic', 'poison'"; | ||
| 1560 | const opt = "unknown-pragmas"; | ||
| 1561 | const kind = .off; | ||
| 1562 | const all = true; | ||
| 1563 | }; | ||
| 1564 | pub const unknown_gcc_pragma_directive = struct { | ||
| 1565 | const msg = "pragma GCC diagnostic expected 'error', 'warning', 'ignored', 'fatal', 'push', or 'pop'"; | ||
| 1566 | const opt = "unknown-pragmas"; | ||
| 1567 | const kind = .warning; | ||
| 1568 | const all = true; | ||
| 1569 | }; | ||
| 1570 | pub const predefined_top_level = struct { | ||
| 1571 | const msg = "predefined identifier is only valid inside function"; | ||
| 1572 | const opt = "predefined-identifier-outside-function"; | ||
| 1573 | const kind = .warning; | ||
| 1574 | }; | ||
| 1575 | pub const incompatible_va_arg = struct { | ||
| 1576 | const msg = "first argument to va_arg, is of type '{s}' and not 'va_list'"; | ||
| 1577 | const extra = .str; | ||
| 1578 | const kind = .@"error"; | ||
| 1579 | }; | ||
| 1580 | pub const too_many_scalar_init_braces = struct { | ||
| 1581 | const msg = "too many braces around scalar initializer"; | ||
| 1582 | const opt = "many-braces-around-scalar-init"; | ||
| 1583 | const kind = .warning; | ||
| 1584 | }; | ||
| 1585 | pub const uninitialized_in_own_init = struct { | ||
| 1586 | const msg = "variable '{s}' is uninitialized when used within its own initialization"; | ||
| 1587 | const extra = .str; | ||
| 1588 | const opt = "uninitialized"; | ||
| 1589 | const kind = .off; | ||
| 1590 | const all = true; | ||
| 1591 | }; | ||
| 1592 | pub const gnu_statement_expression = struct { | ||
| 1593 | const msg = "use of GNU statement expression extension"; | ||
| 1594 | const opt = "gnu-statement-expression"; | ||
| 1595 | const kind = .off; | ||
| 1596 | const suppress_gnu = true; | ||
| 1597 | const pedantic = true; | ||
| 1598 | }; | ||
| 1599 | pub const stmt_expr_not_allowed_file_scope = struct { | ||
| 1600 | const msg = "statement expression not allowed at file scope"; | ||
| 1601 | const kind = .@"error"; | ||
| 1602 | }; | ||
| 1603 | pub const gnu_imaginary_constant = struct { | ||
| 1604 | const msg = "imaginary constants are a GNU extension"; | ||
| 1605 | const opt = "gnu-imaginary-constant"; | ||
| 1606 | const kind = .off; | ||
| 1607 | const suppress_gnu = true; | ||
| 1608 | const pedantic = true; | ||
| 1609 | }; | ||
| 1610 | pub const plain_complex = struct { | ||
| 1611 | const msg = "plain '_Complex' requires a type specifier; assuming '_Complex double'"; | ||
| 1612 | const kind = .warning; | ||
| 1613 | }; | ||
| 1614 | pub const complex_int = struct { | ||
| 1615 | const msg = "complex integer types are a GNU extension"; | ||
| 1616 | const opt = "gnu-complex-integer"; | ||
| 1617 | const suppress_gnu = true; | ||
| 1618 | const kind = .off; | ||
| 1619 | }; | ||
| 1620 | pub const qual_on_ret_type = struct { | ||
| 1621 | const msg = "'{s}' type qualifier on return type has no effect"; | ||
| 1622 | const opt = "ignored-qualifiers"; | ||
| 1623 | const extra = .str; | ||
| 1624 | const kind = .off; | ||
| 1625 | const all = true; | ||
| 1626 | }; | ||
| 1627 | pub const cli_invalid_standard = struct { | ||
| 1628 | const msg = "invalid standard '{s}'"; | ||
| 1629 | const extra = .str; | ||
| 1630 | const kind = .@"error"; | ||
| 1631 | }; | ||
| 1632 | pub const cli_invalid_target = struct { | ||
| 1633 | const msg = "invalid target '{s}'"; | ||
| 1634 | const extra = .str; | ||
| 1635 | const kind = .@"error"; | ||
| 1636 | }; | ||
| 1637 | pub const cli_invalid_emulate = struct { | ||
| 1638 | const msg = "invalid compiler '{s}'"; | ||
| 1639 | const extra = .str; | ||
| 1640 | const kind = .@"error"; | ||
| 1641 | }; | ||
| 1642 | pub const cli_unknown_arg = struct { | ||
| 1643 | const msg = "unknown argument '{s}'"; | ||
| 1644 | const extra = .str; | ||
| 1645 | const kind = .@"error"; | ||
| 1646 | }; | ||
| 1647 | pub const cli_error = struct { | ||
| 1648 | const msg = "{s}"; | ||
| 1649 | const extra = .str; | ||
| 1650 | const kind = .@"error"; | ||
| 1651 | }; | ||
| 1652 | pub const cli_unused_link_object = struct { | ||
| 1653 | const msg = "{s}: linker input file unused because linking not done"; | ||
| 1654 | const extra = .str; | ||
| 1655 | const kind = .warning; | ||
| 1656 | }; | ||
| 1657 | pub const cli_unknown_linker = struct { | ||
| 1658 | const msg = "unrecognized linker '{s}'"; | ||
| 1659 | const extra = .str; | ||
| 1660 | const kind = .@"error"; | ||
| 1661 | }; | ||
| 1662 | pub const extra_semi = struct { | ||
| 1663 | const msg = "extra ';' outside of a function"; | ||
| 1664 | const opt = "extra-semi"; | ||
| 1665 | const kind = .off; | ||
| 1666 | const pedantic = true; | ||
| 1667 | }; | ||
| 1668 | pub const func_field = struct { | ||
| 1669 | const msg = "field declared as a function"; | ||
| 1670 | const kind = .@"error"; | ||
| 1671 | }; | ||
| 1672 | pub const vla_field = struct { | ||
| 1673 | const msg = "variable length array fields extension is not supported"; | ||
| 1674 | const kind = .@"error"; | ||
| 1675 | }; | ||
| 1676 | pub const field_incomplete_ty = struct { | ||
| 1677 | const msg = "field has incomplete type '{s}'"; | ||
| 1678 | const extra = .str; | ||
| 1679 | const kind = .@"error"; | ||
| 1680 | }; | ||
| 1681 | pub const flexible_in_union = struct { | ||
| 1682 | const msg = "flexible array member in union is not allowed"; | ||
| 1683 | const kind = .@"error"; | ||
| 1684 | const suppress_msvc = true; | ||
| 1685 | }; | ||
| 1686 | pub const flexible_non_final = struct { | ||
| 1687 | const msg = "flexible array member is not at the end of struct"; | ||
| 1688 | const kind = .@"error"; | ||
| 1689 | }; | ||
| 1690 | pub const flexible_in_empty = struct { | ||
| 1691 | const msg = "flexible array member in otherwise empty struct"; | ||
| 1692 | const kind = .@"error"; | ||
| 1693 | const suppress_msvc = true; | ||
| 1694 | }; | ||
| 1695 | pub const duplicate_member = struct { | ||
| 1696 | const msg = "duplicate member '{s}'"; | ||
| 1697 | const extra = .str; | ||
| 1698 | const kind = .@"error"; | ||
| 1699 | }; | ||
| 1700 | pub const binary_integer_literal = struct { | ||
| 1701 | const msg = "binary integer literals are a GNU extension"; | ||
| 1702 | const kind = .off; | ||
| 1703 | const opt = "gnu-binary-literal"; | ||
| 1704 | const pedantic = true; | ||
| 1705 | }; | ||
| 1706 | pub const gnu_va_macro = struct { | ||
| 1707 | const msg = "named variadic macros are a GNU extension"; | ||
| 1708 | const opt = "variadic-macros"; | ||
| 1709 | const kind = .off; | ||
| 1710 | const pedantic = true; | ||
| 1711 | }; | ||
| 1712 | pub const builtin_must_be_called = struct { | ||
| 1713 | const msg = "builtin function must be directly called"; | ||
| 1714 | const kind = .@"error"; | ||
| 1715 | }; | ||
| 1716 | pub const va_start_not_in_func = struct { | ||
| 1717 | const msg = "'va_start' cannot be used outside a function"; | ||
| 1718 | const kind = .@"error"; | ||
| 1719 | }; | ||
| 1720 | pub const va_start_fixed_args = struct { | ||
| 1721 | const msg = "'va_start' used in a function with fixed args"; | ||
| 1722 | const kind = .@"error"; | ||
| 1723 | }; | ||
| 1724 | pub const va_start_not_last_param = struct { | ||
| 1725 | const msg = "second argument to 'va_start' is not the last named parameter"; | ||
| 1726 | const opt = "varargs"; | ||
| 1727 | const kind = .warning; | ||
| 1728 | }; | ||
| 1729 | pub const attribute_not_enough_args = struct { | ||
| 1730 | const msg = "'{s}' attribute takes at least {d} argument(s)"; | ||
| 1731 | const kind = .@"error"; | ||
| 1732 | const extra = .attr_arg_count; | ||
| 1733 | }; | ||
| 1734 | pub const attribute_too_many_args = struct { | ||
| 1735 | const msg = "'{s}' attribute takes at most {d} argument(s)"; | ||
| 1736 | const kind = .@"error"; | ||
| 1737 | const extra = .attr_arg_count; | ||
| 1738 | }; | ||
| 1739 | pub const attribute_arg_invalid = struct { | ||
| 1740 | const msg = "Attribute argument is invalid, expected {s} but got {s}"; | ||
| 1741 | const kind = .@"error"; | ||
| 1742 | const extra = .attr_arg_type; | ||
| 1743 | }; | ||
| 1744 | pub const unknown_attr_enum = struct { | ||
| 1745 | const msg = "Unknown `{s}` argument. Possible values are: {s}"; | ||
| 1746 | const kind = .@"error"; | ||
| 1747 | const extra = .attr_enum; | ||
| 1748 | }; | ||
| 1749 | pub const attribute_requires_identifier = struct { | ||
| 1750 | const msg = "'{s}' attribute requires an identifier"; | ||
| 1751 | const kind = .@"error"; | ||
| 1752 | const extra = .str; | ||
| 1753 | }; | ||
| 1754 | pub const declspec_not_enabled = struct { | ||
| 1755 | const msg = "'__declspec' attributes are not enabled; use '-fdeclspec' or '-fms-extensions' to enable support for __declspec attributes"; | ||
| 1756 | const kind = .@"error"; | ||
| 1757 | }; | ||
| 1758 | pub const declspec_attr_not_supported = struct { | ||
| 1759 | const msg = "__declspec attribute '{s}' is not supported"; | ||
| 1760 | const extra = .str; | ||
| 1761 | const opt = "ignored-attributes"; | ||
| 1762 | const kind = .warning; | ||
| 1763 | }; | ||
| 1764 | pub const deprecated_declarations = struct { | ||
| 1765 | const msg = "{s}"; | ||
| 1766 | const extra = .str; | ||
| 1767 | const opt = "deprecated-declarations"; | ||
| 1768 | const kind = .warning; | ||
| 1769 | }; | ||
| 1770 | pub const deprecated_note = struct { | ||
| 1771 | const msg = "'{s}' has been explicitly marked deprecated here"; | ||
| 1772 | const extra = .str; | ||
| 1773 | const opt = "deprecated-declarations"; | ||
| 1774 | const kind = .note; | ||
| 1775 | }; | ||
| 1776 | pub const unavailable = struct { | ||
| 1777 | const msg = "{s}"; | ||
| 1778 | const extra = .str; | ||
| 1779 | const kind = .@"error"; | ||
| 1780 | }; | ||
| 1781 | pub const unavailable_note = struct { | ||
| 1782 | const msg = "'{s}' has been explicitly marked unavailable here"; | ||
| 1783 | const extra = .str; | ||
| 1784 | const kind = .note; | ||
| 1785 | }; | ||
| 1786 | pub const warning_attribute = struct { | ||
| 1787 | const msg = "{s}"; | ||
| 1788 | const extra = .str; | ||
| 1789 | const kind = .warning; | ||
| 1790 | const opt = "attribute-warning"; | ||
| 1791 | }; | ||
| 1792 | pub const error_attribute = struct { | ||
| 1793 | const msg = "{s}"; | ||
| 1794 | const extra = .str; | ||
| 1795 | const kind = .@"error"; | ||
| 1796 | }; | ||
| 1797 | pub const ignored_record_attr = struct { | ||
| 1798 | const msg = "attribute '{s}' is ignored, place it after \"{s}\" to apply attribute to type declaration"; | ||
| 1799 | const extra = .ignored_record_attr; | ||
| 1800 | const kind = .warning; | ||
| 1801 | const opt = "ignored-attributes"; | ||
| 1802 | }; | ||
| 1803 | pub const backslash_newline_escape = struct { | ||
| 1804 | const msg = "backslash and newline separated by space"; | ||
| 1805 | const kind = .warning; | ||
| 1806 | const opt = "backslash-newline-escape"; | ||
| 1807 | }; | ||
| 1808 | pub const array_size_non_int = struct { | ||
| 1809 | const msg = "size of array has non-integer type '{s}'"; | ||
| 1810 | const extra = .str; | ||
| 1811 | const kind = .@"error"; | ||
| 1812 | }; | ||
| 1813 | pub const cast_to_smaller_int = struct { | ||
| 1814 | const msg = "cast to smaller integer type {s}"; | ||
| 1815 | const extra = .str; | ||
| 1816 | const kind = .warning; | ||
| 1817 | const opt = "pointer-to-int-cast"; | ||
| 1818 | }; | ||
| 1819 | pub const gnu_switch_range = struct { | ||
| 1820 | const msg = "use of GNU case range extension"; | ||
| 1821 | const opt = "gnu-case-range"; | ||
| 1822 | const kind = .off; | ||
| 1823 | const pedantic = true; | ||
| 1824 | }; | ||
| 1825 | pub const empty_case_range = struct { | ||
| 1826 | const msg = "empty case range specified"; | ||
| 1827 | const kind = .warning; | ||
| 1828 | }; | ||
| 1829 | pub const non_standard_escape_char = struct { | ||
| 1830 | const msg = "use of non-standard escape character '\\{s}'"; | ||
| 1831 | const kind = .off; | ||
| 1832 | const opt = "pedantic"; | ||
| 1833 | const extra = .invalid_escape; | ||
| 1834 | }; | ||
| 1835 | pub const invalid_pp_stringify_escape = struct { | ||
| 1836 | const msg = "invalid string literal, ignoring final '\\'"; | ||
| 1837 | const kind = .warning; | ||
| 1838 | }; | ||
| 1839 | pub const vla = struct { | ||
| 1840 | const msg = "variable length array used"; | ||
| 1841 | const kind = .off; | ||
| 1842 | const opt = "vla"; | ||
| 1843 | }; | ||
| 1844 | pub const float_overflow_conversion = struct { | ||
| 1845 | const msg = "implicit conversion of non-finite value from {s} is undefined"; | ||
| 1846 | const extra = .str; | ||
| 1847 | const kind = .off; | ||
| 1848 | const opt = "float-overflow-conversion"; | ||
| 1849 | }; | ||
| 1850 | pub const float_out_of_range = struct { | ||
| 1851 | const msg = "implicit conversion of out of range value from {s} is undefined"; | ||
| 1852 | const extra = .str; | ||
| 1853 | const kind = .warning; | ||
| 1854 | const opt = "literal-conversion"; | ||
| 1855 | }; | ||
| 1856 | pub const float_zero_conversion = struct { | ||
| 1857 | const msg = "implicit conversion from {s}"; | ||
| 1858 | const extra = .str; | ||
| 1859 | const kind = .off; | ||
| 1860 | const opt = "float-zero-conversion"; | ||
| 1861 | }; | ||
| 1862 | pub const float_value_changed = struct { | ||
| 1863 | const msg = "implicit conversion from {s}"; | ||
| 1864 | const extra = .str; | ||
| 1865 | const kind = .warning; | ||
| 1866 | const opt = "float-conversion"; | ||
| 1867 | }; | ||
| 1868 | pub const float_to_int = struct { | ||
| 1869 | const msg = "implicit conversion turns floating-point number into integer: {s}"; | ||
| 1870 | const extra = .str; | ||
| 1871 | const kind = .off; | ||
| 1872 | const opt = "literal-conversion"; | ||
| 1873 | }; | ||
| 1874 | pub const const_decl_folded = struct { | ||
| 1875 | const msg = "expression is not an integer constant expression; folding it to a constant is a GNU extension"; | ||
| 1876 | const kind = .off; | ||
| 1877 | const opt = "gnu-folding-constant"; | ||
| 1878 | const pedantic = true; | ||
| 1879 | }; | ||
| 1880 | pub const const_decl_folded_vla = struct { | ||
| 1881 | const msg = "variable length array folded to constant array as an extension"; | ||
| 1882 | const kind = .off; | ||
| 1883 | const opt = "gnu-folding-constant"; | ||
| 1884 | const pedantic = true; | ||
| 1885 | }; | ||
| 1886 | pub const redefinition_of_typedef = struct { | ||
| 1887 | const msg = "typedef redefinition with different types ({s})"; | ||
| 1888 | const extra = .str; | ||
| 1889 | const kind = .@"error"; | ||
| 1890 | }; | ||
| 1891 | pub const undefined_macro = struct { | ||
| 1892 | const msg = "'{s}' is not defined, evaluates to 0"; | ||
| 1893 | const extra = .str; | ||
| 1894 | const kind = .off; | ||
| 1895 | const opt = "undef"; | ||
| 1896 | }; | ||
| 1897 | pub const fn_macro_undefined = struct { | ||
| 1898 | const msg = "function-like macro '{s}' is not defined"; | ||
| 1899 | const extra = .str; | ||
| 1900 | const kind = .@"error"; | ||
| 1901 | }; | ||
| 1902 | pub const preprocessing_directive_only = struct { | ||
| 1903 | const msg = "'{s}' must be used within a preprocessing directive"; | ||
| 1904 | const extra = .tok_id_expected; | ||
| 1905 | const kind = .@"error"; | ||
| 1906 | }; | ||
| 1907 | pub const missing_lparen_after_builtin = struct { | ||
| 1908 | const msg = "Missing '(' after built-in macro '{s}'"; | ||
| 1909 | const extra = .str; | ||
| 1910 | const kind = .@"error"; | ||
| 1911 | }; | ||
| 1912 | pub const offsetof_ty = struct { | ||
| 1913 | const msg = "offsetof requires struct or union type, '{s}' invalid"; | ||
| 1914 | const extra = .str; | ||
| 1915 | const kind = .@"error"; | ||
| 1916 | }; | ||
| 1917 | pub const offsetof_incomplete = struct { | ||
| 1918 | const msg = "offsetof of incomplete type '{s}'"; | ||
| 1919 | const extra = .str; | ||
| 1920 | const kind = .@"error"; | ||
| 1921 | }; | ||
| 1922 | pub const offsetof_array = struct { | ||
| 1923 | const msg = "offsetof requires array type, '{s}' invalid"; | ||
| 1924 | const extra = .str; | ||
| 1925 | const kind = .@"error"; | ||
| 1926 | }; | ||
| 1927 | pub const pragma_pack_lparen = struct { | ||
| 1928 | const msg = "missing '(' after '#pragma pack' - ignoring"; | ||
| 1929 | const kind = .warning; | ||
| 1930 | const opt = "ignored-pragmas"; | ||
| 1931 | }; | ||
| 1932 | pub const pragma_pack_rparen = struct { | ||
| 1933 | const msg = "missing ')' after '#pragma pack' - ignoring"; | ||
| 1934 | const kind = .warning; | ||
| 1935 | const opt = "ignored-pragmas"; | ||
| 1936 | }; | ||
| 1937 | pub const pragma_pack_unknown_action = struct { | ||
| 1938 | const msg = "unknown action for '#pragma pack' - ignoring"; | ||
| 1939 | const opt = "ignored-pragmas"; | ||
| 1940 | const kind = .warning; | ||
| 1941 | }; | ||
| 1942 | pub const pragma_pack_show = struct { | ||
| 1943 | const msg = "value of #pragma pack(show) == {d}"; | ||
| 1944 | const extra = .unsigned; | ||
| 1945 | const kind = .warning; | ||
| 1946 | }; | ||
| 1947 | pub const pragma_pack_int = struct { | ||
| 1948 | const msg = "expected #pragma pack parameter to be '1', '2', '4', '8', or '16'"; | ||
| 1949 | const opt = "ignored-pragmas"; | ||
| 1950 | const kind = .warning; | ||
| 1951 | }; | ||
| 1952 | pub const pragma_pack_int_ident = struct { | ||
| 1953 | const msg = "expected integer or identifier in '#pragma pack' - ignored"; | ||
| 1954 | const opt = "ignored-pragmas"; | ||
| 1955 | const kind = .warning; | ||
| 1956 | }; | ||
| 1957 | pub const pragma_pack_undefined_pop = struct { | ||
| 1958 | const msg = "specifying both a name and alignment to 'pop' is undefined"; | ||
| 1959 | const kind = .warning; | ||
| 1960 | }; | ||
| 1961 | pub const pragma_pack_empty_stack = struct { | ||
| 1962 | const msg = "#pragma pack(pop, ...) failed: stack empty"; | ||
| 1963 | const opt = "ignored-pragmas"; | ||
| 1964 | const kind = .warning; | ||
| 1965 | }; | ||
| 1966 | pub const cond_expr_type = struct { | ||
| 1967 | const msg = "used type '{s}' where arithmetic or pointer type is required"; | ||
| 1968 | const extra = .str; | ||
| 1969 | const kind = .@"error"; | ||
| 1970 | }; | ||
| 1971 | pub const too_many_includes = struct { | ||
| 1972 | const msg = "#include nested too deeply"; | ||
| 1973 | const kind = .@"error"; | ||
| 1974 | }; | ||
| 1975 | pub const enumerator_too_small = struct { | ||
| 1976 | const msg = "ISO C restricts enumerator values to range of 'int' ({d} is too small)"; | ||
| 1977 | const extra = .signed; | ||
| 1978 | const kind = .off; | ||
| 1979 | const opt = "pedantic"; | ||
| 1980 | }; | ||
| 1981 | pub const enumerator_too_large = struct { | ||
| 1982 | const msg = "ISO C restricts enumerator values to range of 'int' ({d} is too large)"; | ||
| 1983 | const extra = .unsigned; | ||
| 1984 | const kind = .off; | ||
| 1985 | const opt = "pedantic"; | ||
| 1986 | }; | ||
| 1987 | pub const include_next = struct { | ||
| 1988 | const msg = "#include_next is a language extension"; | ||
| 1989 | const kind = .off; | ||
| 1990 | const pedantic = true; | ||
| 1991 | const opt = "gnu-include-next"; | ||
| 1992 | }; | ||
| 1993 | pub const include_next_outside_header = struct { | ||
| 1994 | const msg = "#include_next in primary source file; will search from start of include path"; | ||
| 1995 | const kind = .warning; | ||
| 1996 | const opt = "include-next-outside-header"; | ||
| 1997 | }; | ||
| 1998 | pub const enumerator_overflow = struct { | ||
| 1999 | const msg = "overflow in enumeration value"; | ||
| 2000 | const kind = .warning; | ||
| 2001 | }; | ||
| 2002 | pub const enum_not_representable = struct { | ||
| 2003 | const msg = "incremented enumerator value {s} is not representable in the largest integer type"; | ||
| 2004 | const kind = .warning; | ||
| 2005 | const opt = "enum-too-large"; | ||
| 2006 | const extra = .pow_2_as_string; | ||
| 2007 | }; | ||
| 2008 | pub const enum_too_large = struct { | ||
| 2009 | const msg = "enumeration values exceed range of largest integer"; | ||
| 2010 | const kind = .warning; | ||
| 2011 | const opt = "enum-too-large"; | ||
| 2012 | }; | ||
| 2013 | pub const enum_fixed = struct { | ||
| 2014 | const msg = "enumeration types with a fixed underlying type are a Clang extension"; | ||
| 2015 | const kind = .off; | ||
| 2016 | const pedantic = true; | ||
| 2017 | const opt = "fixed-enum-extension"; | ||
| 2018 | }; | ||
| 2019 | pub const enum_prev_nonfixed = struct { | ||
| 2020 | const msg = "enumeration previously declared with nonfixed underlying type"; | ||
| 2021 | const kind = .@"error"; | ||
| 2022 | }; | ||
| 2023 | pub const enum_prev_fixed = struct { | ||
| 2024 | const msg = "enumeration previously declared with fixed underlying type"; | ||
| 2025 | const kind = .@"error"; | ||
| 2026 | }; | ||
| 2027 | pub const enum_different_explicit_ty = struct { | ||
| 2028 | // str will be like 'new' (was 'old' | ||
| 2029 | const msg = "enumeration redeclared with different underlying type {s})"; | ||
| 2030 | const extra = .str; | ||
| 2031 | const kind = .@"error"; | ||
| 2032 | }; | ||
| 2033 | pub const enum_not_representable_fixed = struct { | ||
| 2034 | const msg = "enumerator value is not representable in the underlying type '{s}'"; | ||
| 2035 | const extra = .str; | ||
| 2036 | const kind = .@"error"; | ||
| 2037 | }; | ||
| 2038 | pub const transparent_union_wrong_type = struct { | ||
| 2039 | const msg = "'transparent_union' attribute only applies to unions"; | ||
| 2040 | const opt = "ignored-attributes"; | ||
| 2041 | const kind = .warning; | ||
| 2042 | }; | ||
| 2043 | pub const transparent_union_one_field = struct { | ||
| 2044 | const msg = "transparent union definition must contain at least one field; transparent_union attribute ignored"; | ||
| 2045 | const opt = "ignored-attributes"; | ||
| 2046 | const kind = .warning; | ||
| 2047 | }; | ||
| 2048 | pub const transparent_union_size = struct { | ||
| 2049 | const msg = "size of field {s} bits) does not match the size of the first field in transparent union; transparent_union attribute ignored"; | ||
| 2050 | const extra = .str; | ||
| 2051 | const opt = "ignored-attributes"; | ||
| 2052 | const kind = .warning; | ||
| 2053 | }; | ||
| 2054 | pub const transparent_union_size_note = struct { | ||
| 2055 | const msg = "size of first field is {d}"; | ||
| 2056 | const extra = .unsigned; | ||
| 2057 | const kind = .note; | ||
| 2058 | }; | ||
| 2059 | pub const designated_init_invalid = struct { | ||
| 2060 | const msg = "'designated_init' attribute is only valid on 'struct' type'"; | ||
| 2061 | const kind = .@"error"; | ||
| 2062 | }; | ||
| 2063 | pub const designated_init_needed = struct { | ||
| 2064 | const msg = "positional initialization of field in 'struct' declared with 'designated_init' attribute"; | ||
| 2065 | const opt = "designated-init"; | ||
| 2066 | const kind = .warning; | ||
| 2067 | }; | ||
| 2068 | pub const ignore_common = struct { | ||
| 2069 | const msg = "ignoring attribute 'common' because it conflicts with attribute 'nocommon'"; | ||
| 2070 | const opt = "ignored-attributes"; | ||
| 2071 | const kind = .warning; | ||
| 2072 | }; | ||
| 2073 | pub const ignore_nocommon = struct { | ||
| 2074 | const msg = "ignoring attribute 'nocommon' because it conflicts with attribute 'common'"; | ||
| 2075 | const opt = "ignored-attributes"; | ||
| 2076 | const kind = .warning; | ||
| 2077 | }; | ||
| 2078 | pub const non_string_ignored = struct { | ||
| 2079 | const msg = "'nonstring' attribute ignored on objects of type '{s}'"; | ||
| 2080 | const opt = "ignored-attributes"; | ||
| 2081 | const kind = .warning; | ||
| 2082 | }; | ||
| 2083 | pub const local_variable_attribute = struct { | ||
| 2084 | const msg = "'{s}' attribute only applies to local variables"; | ||
| 2085 | const extra = .str; | ||
| 2086 | const opt = "ignored-attributes"; | ||
| 2087 | const kind = .warning; | ||
| 2088 | }; | ||
| 2089 | pub const ignore_cold = struct { | ||
| 2090 | const msg = "ignoring attribute 'cold' because it conflicts with attribute 'hot'"; | ||
| 2091 | const opt = "ignored-attributes"; | ||
| 2092 | const kind = .warning; | ||
| 2093 | }; | ||
| 2094 | pub const ignore_hot = struct { | ||
| 2095 | const msg = "ignoring attribute 'hot' because it conflicts with attribute 'cold'"; | ||
| 2096 | const opt = "ignored-attributes"; | ||
| 2097 | const kind = .warning; | ||
| 2098 | }; | ||
| 2099 | pub const ignore_noinline = struct { | ||
| 2100 | const msg = "ignoring attribute 'noinline' because it conflicts with attribute 'always_inline'"; | ||
| 2101 | const opt = "ignored-attributes"; | ||
| 2102 | const kind = .warning; | ||
| 2103 | }; | ||
| 2104 | pub const ignore_always_inline = struct { | ||
| 2105 | const msg = "ignoring attribute 'always_inline' because it conflicts with attribute 'noinline'"; | ||
| 2106 | const opt = "ignored-attributes"; | ||
| 2107 | const kind = .warning; | ||
| 2108 | }; | ||
| 2109 | pub const invalid_noreturn = struct { | ||
| 2110 | const msg = "function '{s}' declared 'noreturn' should not return"; | ||
| 2111 | const extra = .str; | ||
| 2112 | const kind = .warning; | ||
| 2113 | const opt = "invalid-noreturn"; | ||
| 2114 | }; | ||
| 2115 | pub const nodiscard_unused = struct { | ||
| 2116 | const msg = "ignoring return value of '{s}', declared with 'nodiscard' attribute"; | ||
| 2117 | const extra = .str; | ||
| 2118 | const kind = .warning; | ||
| 2119 | const op = "unused-result"; | ||
| 2120 | }; | ||
| 2121 | pub const warn_unused_result = struct { | ||
| 2122 | const msg = "ignoring return value of '{s}', declared with 'warn_unused_result' attribute"; | ||
| 2123 | const extra = .str; | ||
| 2124 | const kind = .warning; | ||
| 2125 | const op = "unused-result"; | ||
| 2126 | }; | ||
| 2127 | pub const invalid_vec_elem_ty = struct { | ||
| 2128 | const msg = "invalid vector element type '{s}'"; | ||
| 2129 | const extra = .str; | ||
| 2130 | const kind = .@"error"; | ||
| 2131 | }; | ||
| 2132 | pub const vec_size_not_multiple = struct { | ||
| 2133 | const msg = "vector size not an integral multiple of component size"; | ||
| 2134 | const kind = .@"error"; | ||
| 2135 | }; | ||
| 2136 | pub const invalid_imag = struct { | ||
| 2137 | const msg = "invalid type '{s}' to __imag operator"; | ||
| 2138 | const extra = .str; | ||
| 2139 | const kind = .@"error"; | ||
| 2140 | }; | ||
| 2141 | pub const invalid_real = struct { | ||
| 2142 | const msg = "invalid type '{s}' to __real operator"; | ||
| 2143 | const extra = .str; | ||
| 2144 | const kind = .@"error"; | ||
| 2145 | }; | ||
| 2146 | pub const zero_length_array = struct { | ||
| 2147 | const msg = "zero size arrays are an extension"; | ||
| 2148 | const kind = .off; | ||
| 2149 | const pedantic = true; | ||
| 2150 | const opt = "zero-length-array"; | ||
| 2151 | }; | ||
| 2152 | pub const old_style_flexible_struct = struct { | ||
| 2153 | const msg = "array index {d} is past the end of the array"; | ||
| 2154 | const extra = .unsigned; | ||
| 2155 | const kind = .off; | ||
| 2156 | const pedantic = true; | ||
| 2157 | const opt = "old-style-flexible-struct"; | ||
| 2158 | }; | ||
| 2159 | pub const comma_deletion_va_args = struct { | ||
| 2160 | const msg = "token pasting of ',' and __VA_ARGS__ is a GNU extension"; | ||
| 2161 | const kind = .off; | ||
| 2162 | const pedantic = true; | ||
| 2163 | const opt = "gnu-zero-variadic-macro-arguments"; | ||
| 2164 | const suppress_gcc = true; | ||
| 2165 | }; | ||
| 2166 | pub const main_return_type = struct { | ||
| 2167 | const msg = "return type of 'main' is not 'int'"; | ||
| 2168 | const kind = .warning; | ||
| 2169 | const opt = "main-return-type"; | ||
| 2170 | }; | ||
| 2171 | pub const expansion_to_defined = struct { | ||
| 2172 | const msg = "macro expansion producing 'defined' has undefined behavior"; | ||
| 2173 | const kind = .off; | ||
| 2174 | const pedantic = true; | ||
| 2175 | const opt = "expansion-to-defined"; | ||
| 2176 | }; | ||
| 2177 | pub const invalid_int_suffix = struct { | ||
| 2178 | const msg = "invalid suffix '{s}' on integer constant"; | ||
| 2179 | const extra = .str; | ||
| 2180 | const kind = .@"error"; | ||
| 2181 | }; | ||
| 2182 | pub const invalid_float_suffix = struct { | ||
| 2183 | const msg = "invalid suffix '{s}' on floating constant"; | ||
| 2184 | const extra = .str; | ||
| 2185 | const kind = .@"error"; | ||
| 2186 | }; | ||
| 2187 | pub const invalid_octal_digit = struct { | ||
| 2188 | const msg = "invalid digit '{c}' in octal constant"; | ||
| 2189 | const extra = .ascii; | ||
| 2190 | const kind = .@"error"; | ||
| 2191 | }; | ||
| 2192 | pub const invalid_binary_digit = struct { | ||
| 2193 | const msg = "invalid digit '{c}' in binary constant"; | ||
| 2194 | const extra = .ascii; | ||
| 2195 | const kind = .@"error"; | ||
| 2196 | }; | ||
| 2197 | pub const exponent_has_no_digits = struct { | ||
| 2198 | const msg = "exponent has no digits"; | ||
| 2199 | const kind = .@"error"; | ||
| 2200 | }; | ||
| 2201 | pub const hex_floating_constant_requires_exponent = struct { | ||
| 2202 | const msg = "hexadecimal floating constant requires an exponent"; | ||
| 2203 | const kind = .@"error"; | ||
| 2204 | }; | ||
| 2205 | pub const sizeof_returns_zero = struct { | ||
| 2206 | const msg = "sizeof returns 0"; | ||
| 2207 | const kind = .warning; | ||
| 2208 | const suppress_gcc = true; | ||
| 2209 | const suppress_clang = true; | ||
| 2210 | }; | ||
| 2211 | pub const declspec_not_allowed_after_declarator = struct { | ||
| 2212 | const msg = "'declspec' attribute not allowed after declarator"; | ||
| 2213 | const kind = .@"error"; | ||
| 2214 | }; | ||
| 2215 | pub const declarator_name_tok = struct { | ||
| 2216 | const msg = "this declarator"; | ||
| 2217 | const kind = .note; | ||
| 2218 | }; | ||
| 2219 | pub const type_not_supported_on_target = struct { | ||
| 2220 | const msg = "{s} is not supported on this target"; | ||
| 2221 | const extra = .str; | ||
| 2222 | const kind = .@"error"; | ||
| 2223 | }; | ||
| 2224 | pub const bit_int = struct { | ||
| 2225 | const msg = "'_BitInt' in C17 and earlier is a Clang extension'"; | ||
| 2226 | const kind = .off; | ||
| 2227 | const pedantic = true; | ||
| 2228 | const opt = "bit-int-extension"; | ||
| 2229 | const suppress_version = .c2x; | ||
| 2230 | }; | ||
| 2231 | pub const unsigned_bit_int_too_small = struct { | ||
| 2232 | const msg = "{s} must have a bit size of at least 1"; | ||
| 2233 | const extra = .str; | ||
| 2234 | const kind = .@"error"; | ||
| 2235 | }; | ||
| 2236 | pub const signed_bit_int_too_small = struct { | ||
| 2237 | const msg = "{s} must have a bit size of at least 2"; | ||
| 2238 | const extra = .str; | ||
| 2239 | const kind = .@"error"; | ||
| 2240 | }; | ||
| 2241 | pub const bit_int_too_big = struct { | ||
| 2242 | const msg = "{s} of bit sizes greater than " ++ std.fmt.comptimePrint("{d}", .{Compilation.bit_int_max_bits}) ++ " not supported"; | ||
| 2243 | const extra = .str; | ||
| 2244 | const kind = .@"error"; | ||
| 2245 | }; | ||
| 2246 | pub const keyword_macro = struct { | ||
| 2247 | const msg = "keyword is hidden by macro definition"; | ||
| 2248 | const kind = .off; | ||
| 2249 | const pedantic = true; | ||
| 2250 | const opt = "keyword-macro"; | ||
| 2251 | }; | ||
| 2252 | pub const ptr_arithmetic_incomplete = struct { | ||
| 2253 | const msg = "arithmetic on a pointer to an incomplete type '{s}'"; | ||
| 2254 | const extra = .str; | ||
| 2255 | const kind = .@"error"; | ||
| 2256 | }; | ||
| 2257 | pub const callconv_not_supported = struct { | ||
| 2258 | const msg = "'{s}' calling convention is not supported for this target"; | ||
| 2259 | const extra = .str; | ||
| 2260 | const opt = "ignored-attributes"; | ||
| 2261 | const kind = .warning; | ||
| 2262 | }; | ||
| 2263 | pub const pointer_arith_void = struct { | ||
| 2264 | const msg = "invalid application of '{s}' to a void type"; | ||
| 2265 | const extra = .str; | ||
| 2266 | const kind = .off; | ||
| 2267 | const pedantic = true; | ||
| 2268 | const opt = "pointer-arith"; | ||
| 2269 | }; | ||
| 2270 | pub const sizeof_array_arg = struct { | ||
| 2271 | const msg = "sizeof on array function parameter will return size of {s}"; | ||
| 2272 | const extra = .str; | ||
| 2273 | const kind = .warning; | ||
| 2274 | const opt = "sizeof-array-argument"; | ||
| 2275 | }; | ||
| 2276 | pub const array_address_to_bool = struct { | ||
| 2277 | const msg = "address of array '{s}' will always evaluate to 'true'"; | ||
| 2278 | const extra = .str; | ||
| 2279 | const kind = .warning; | ||
| 2280 | const opt = "pointer-bool-conversion"; | ||
| 2281 | }; | ||
| 2282 | pub const string_literal_to_bool = struct { | ||
| 2283 | const msg = "implicit conversion turns string literal into bool: {s}"; | ||
| 2284 | const extra = .str; | ||
| 2285 | const kind = .off; | ||
| 2286 | const opt = "string-conversion"; | ||
| 2287 | }; | ||
| 2288 | pub const constant_expression_conversion_not_allowed = struct { | ||
| 2289 | const msg = "this conversion is not allowed in a constant expression"; | ||
| 2290 | const kind = .note; | ||
| 2291 | }; | ||
| 2292 | pub const invalid_object_cast = struct { | ||
| 2293 | const msg = "cannot cast an object of type {s}"; | ||
| 2294 | const extra = .str; | ||
| 2295 | const kind = .@"error"; | ||
| 2296 | }; | ||
| 2297 | pub const cli_invalid_fp_eval_method = struct { | ||
| 2298 | const msg = "unsupported argument '{s}' to option '-ffp-eval-method='; expected 'source', 'double', or 'extended'"; | ||
| 2299 | const extra = .str; | ||
| 2300 | const kind = .@"error"; | ||
| 2301 | }; | ||
| 2302 | pub const suggest_pointer_for_invalid_fp16 = struct { | ||
| 2303 | const msg = "{s} cannot have __fp16 type; did you forget * ?"; | ||
| 2304 | const extra = .str; | ||
| 2305 | const kind = .@"error"; | ||
| 2306 | }; | ||
| 2307 | pub const bitint_suffix = struct { | ||
| 2308 | const msg = "'_BitInt' suffix for literals is a C2x extension"; | ||
| 2309 | const opt = "c2x-extensions"; | ||
| 2310 | const kind = .warning; | ||
| 2311 | const suppress_version = .c2x; | ||
| 2312 | }; | ||
| 2313 | pub const auto_type_extension = struct { | ||
| 2314 | const msg = "'__auto_type' is a GNU extension"; | ||
| 2315 | const opt = "gnu-auto-type"; | ||
| 2316 | const kind = .off; | ||
| 2317 | const pedantic = true; | ||
| 2318 | }; | ||
| 2319 | pub const auto_type_not_allowed = struct { | ||
| 2320 | const msg = "'__auto_type' not allowed in {s}"; | ||
| 2321 | const kind = .@"error"; | ||
| 2322 | const extra = .str; | ||
| 2323 | }; | ||
| 2324 | pub const auto_type_requires_initializer = struct { | ||
| 2325 | const msg = "declaration of variable '{s}' with deduced type requires an initializer"; | ||
| 2326 | const kind = .@"error"; | ||
| 2327 | const extra = .str; | ||
| 2328 | }; | ||
| 2329 | pub const auto_type_requires_single_declarator = struct { | ||
| 2330 | const msg = "'__auto_type' may only be used with a single declarator"; | ||
| 2331 | const kind = .@"error"; | ||
| 2332 | }; | ||
| 2333 | pub const auto_type_requires_plain_declarator = struct { | ||
| 2334 | const msg = "'__auto_type' requires a plain identifier as declarator"; | ||
| 2335 | const kind = .@"error"; | ||
| 2336 | }; | ||
| 2337 | pub const invalid_cast_to_auto_type = struct { | ||
| 2338 | const msg = "invalid cast to '__auto_type'"; | ||
| 2339 | const kind = .@"error"; | ||
| 2340 | }; | ||
| 2341 | pub const auto_type_from_bitfield = struct { | ||
| 2342 | const msg = "cannot use bit-field as '__auto_type' initializer"; | ||
| 2343 | const kind = .@"error"; | ||
| 2344 | }; | ||
| 2345 | pub const array_of_auto_type = struct { | ||
| 2346 | const msg = "'{s}' declared as array of '__auto_type'"; | ||
| 2347 | const kind = .@"error"; | ||
| 2348 | const extra = .str; | ||
| 2349 | }; | ||
| 2350 | pub const auto_type_with_init_list = struct { | ||
| 2351 | const msg = "cannot use '__auto_type' with initializer list"; | ||
| 2352 | const kind = .@"error"; | ||
| 2353 | }; | ||
| 2354 | pub const missing_semicolon = struct { | ||
| 2355 | const msg = "expected ';' at end of declaration list"; | ||
| 2356 | const kind = .warning; | ||
| 2357 | }; | ||
| 2358 | pub const tentative_definition_incomplete = struct { | ||
| 2359 | const msg = "tentative definition has type '{s}' that is never completed"; | ||
| 2360 | const kind = .@"error"; | ||
| 2361 | const extra = .str; | ||
| 2362 | }; | ||
| 2363 | pub const forward_declaration_here = struct { | ||
| 2364 | const msg = "forward declaration of '{s}'"; | ||
| 2365 | const kind = .note; | ||
| 2366 | const extra = .str; | ||
| 2367 | }; | ||
| 2368 | pub const gnu_union_cast = struct { | ||
| 2369 | const msg = "cast to union type is a GNU extension"; | ||
| 2370 | const opt = "gnu-union-cast"; | ||
| 2371 | const kind = .off; | ||
| 2372 | const pedantic = true; | ||
| 2373 | }; | ||
| 2374 | pub const invalid_union_cast = struct { | ||
| 2375 | const msg = "cast to union type from type '{s}' not present in union"; | ||
| 2376 | const kind = .@"error"; | ||
| 2377 | const extra = .str; | ||
| 2378 | }; | ||
| 2379 | pub const cast_to_incomplete_type = struct { | ||
| 2380 | const msg = "cast to incomplete type '{s}'"; | ||
| 2381 | const kind = .@"error"; | ||
| 2382 | const extra = .str; | ||
| 2383 | }; | ||
| 2384 | pub const invalid_source_epoch = struct { | ||
| 2385 | const msg = "environment variable SOURCE_DATE_EPOCH must expand to a non-negative integer less than or equal to 253402300799"; | ||
| 2386 | const kind = .@"error"; | ||
| 2387 | }; | ||
| 2388 | pub const fuse_ld_path = struct { | ||
| 2389 | const msg = "'-fuse-ld=' taking a path is deprecated; use '--ld-path=' instead"; | ||
| 2390 | const kind = .off; | ||
| 2391 | const opt = "fuse-ld-path"; | ||
| 2392 | }; | ||
| 2393 | pub const invalid_rtlib = struct { | ||
| 2394 | const msg = "invalid runtime library name '{s}'"; | ||
| 2395 | const kind = .@"error"; | ||
| 2396 | const extra = .str; | ||
| 2397 | }; | ||
| 2398 | pub const unsupported_rtlib_gcc = struct { | ||
| 2399 | const msg = "unsupported runtime library 'libgcc' for platform '{s}'"; | ||
| 2400 | const kind = .@"error"; | ||
| 2401 | const extra = .str; | ||
| 2402 | }; | ||
| 2403 | pub const invalid_unwindlib = struct { | ||
| 2404 | const msg = "invalid unwind library name '{s}'"; | ||
| 2405 | const kind = .@"error"; | ||
| 2406 | const extra = .str; | ||
| 2407 | }; | ||
| 2408 | pub const incompatible_unwindlib = struct { | ||
| 2409 | const msg = "--rtlib=libgcc requires --unwindlib=libgcc"; | ||
| 2410 | const kind = .@"error"; | ||
| 2411 | }; | ||
| 2412 | pub const gnu_asm_disabled = struct { | ||
| 2413 | const msg = "GNU-style inline assembly is disabled"; | ||
| 2414 | const kind = .@"error"; | ||
| 2415 | }; | ||
| 2416 | pub const extension_token_used = struct { | ||
| 2417 | const msg = "extension used"; | ||
| 2418 | const kind = .off; | ||
| 2419 | const pedantic = true; | ||
| 2420 | const opt = "language-extension-token"; | ||
| 2421 | }; | ||
| 2422 | pub const complex_component_init = struct { | ||
| 2423 | const msg = "complex initialization specifying real and imaginary components is an extension"; | ||
| 2424 | const opt = "complex-component-init"; | ||
| 2425 | const kind = .off; | ||
| 2426 | const pedantic = true; | ||
| 2427 | }; | ||
| 2428 | pub const complex_prefix_postfix_op = struct { | ||
| 2429 | const msg = "ISO C does not support '++'/'--' on complex type '{s}'"; | ||
| 2430 | const opt = "pedantic"; | ||
| 2431 | const extra = .str; | ||
| 2432 | const kind = .off; | ||
| 2433 | }; | ||
| 2434 | pub const not_floating_type = struct { | ||
| 2435 | const msg = "argument type '{s}' is not a real floating point type"; | ||
| 2436 | const extra = .str; | ||
| 2437 | const kind = .@"error"; | ||
| 2438 | }; | ||
| 2439 | pub const argument_types_differ = struct { | ||
| 2440 | const msg = "arguments are of different types ({s})"; | ||
| 2441 | const extra = .str; | ||
| 2442 | const kind = .@"error"; | ||
| 2443 | }; | ||
| 2444 | pub const ms_search_rule = struct { | ||
| 2445 | const msg = "#include resolved using non-portable Microsoft search rules as: {s}"; | ||
| 2446 | const extra = .str; | ||
| 2447 | const opt = "microsoft-include"; | ||
| 2448 | const kind = .warning; | ||
| 2449 | }; | ||
| 2450 | pub const ctrl_z_eof = struct { | ||
| 2451 | const msg = "treating Ctrl-Z as end-of-file is a Microsoft extension"; | ||
| 2452 | const opt = "microsoft-end-of-file"; | ||
| 2453 | const kind = .off; | ||
| 2454 | const pedantic = true; | ||
| 2455 | }; | ||
| 2456 | pub const illegal_char_encoding_warning = struct { | ||
| 2457 | const msg = "illegal character encoding in character literal"; | ||
| 2458 | const opt = "invalid-source-encoding"; | ||
| 2459 | const kind = .warning; | ||
| 2460 | }; | ||
| 2461 | pub const illegal_char_encoding_error = struct { | ||
| 2462 | const msg = "illegal character encoding in character literal"; | ||
| 2463 | const kind = .@"error"; | ||
| 2464 | }; | ||
| 2465 | pub const ucn_basic_char_error = struct { | ||
| 2466 | const msg = "character '{c}' cannot be specified by a universal character name"; | ||
| 2467 | const kind = .@"error"; | ||
| 2468 | const extra = .ascii; | ||
| 2469 | }; | ||
| 2470 | pub const ucn_basic_char_warning = struct { | ||
| 2471 | const msg = "specifying character '{c}' with a universal character name is incompatible with C standards before C2x"; | ||
| 2472 | const kind = .off; | ||
| 2473 | const extra = .ascii; | ||
| 2474 | const suppress_unless_version = .c2x; | ||
| 2475 | const opt = "pre-c2x-compat"; | ||
| 2476 | }; | ||
| 2477 | pub const ucn_control_char_error = struct { | ||
| 2478 | const msg = "universal character name refers to a control character"; | ||
| 2479 | const kind = .@"error"; | ||
| 2480 | }; | ||
| 2481 | pub const ucn_control_char_warning = struct { | ||
| 2482 | const msg = "universal character name referring to a control character is incompatible with C standards before C2x"; | ||
| 2483 | const kind = .off; | ||
| 2484 | const suppress_unless_version = .c2x; | ||
| 2485 | const opt = "pre-c2x-compat"; | ||
| 2486 | }; | ||
| 2487 | pub const c89_ucn_in_literal = struct { | ||
| 2488 | const msg = "universal character names are only valid in C99 or later"; | ||
| 2489 | const suppress_version = .c99; | ||
| 2490 | const kind = .warning; | ||
| 2491 | const opt = "unicode"; | ||
| 2492 | }; | ||
| 2493 | pub const four_char_char_literal = struct { | ||
| 2494 | const msg = "multi-character character constant"; | ||
| 2495 | const opt = "four-char-constants"; | ||
| 2496 | const kind = .off; | ||
| 2497 | }; | ||
| 2498 | pub const multi_char_char_literal = struct { | ||
| 2499 | const msg = "multi-character character constant"; | ||
| 2500 | const kind = .off; | ||
| 2501 | }; | ||
| 2502 | pub const missing_hex_escape = struct { | ||
| 2503 | const msg = "\\{c} used with no following hex digits"; | ||
| 2504 | const kind = .@"error"; | ||
| 2505 | const extra = .ascii; | ||
| 2506 | }; | ||
| 2507 | pub const unknown_escape_sequence = struct { | ||
| 2508 | const msg = "unknown escape sequence '\\{s}'"; | ||
| 2509 | const kind = .warning; | ||
| 2510 | const opt = "unknown-escape-sequence"; | ||
| 2511 | const extra = .invalid_escape; | ||
| 2512 | }; | ||
| 2513 | pub const attribute_requires_string = struct { | ||
| 2514 | const msg = "attribute '{s}' requires an ordinary string"; | ||
| 2515 | const kind = .@"error"; | ||
| 2516 | const extra = .str; | ||
| 2517 | }; | ||
| 2518 | pub const unterminated_string_literal_warning = struct { | ||
| 2519 | const msg = "missing terminating '\"' character"; | ||
| 2520 | const kind = .warning; | ||
| 2521 | const opt = "invalid-pp-token"; | ||
| 2522 | }; | ||
| 2523 | pub const unterminated_string_literal_error = struct { | ||
| 2524 | const msg = "missing terminating '\"' character"; | ||
| 2525 | const kind = .@"error"; | ||
| 2526 | }; | ||
| 2527 | pub const empty_char_literal_warning = struct { | ||
| 2528 | const msg = "empty character constant"; | ||
| 2529 | const kind = .warning; | ||
| 2530 | const opt = "invalid-pp-token"; | ||
| 2531 | }; | ||
| 2532 | pub const empty_char_literal_error = struct { | ||
| 2533 | const msg = "empty character constant"; | ||
| 2534 | const kind = .@"error"; | ||
| 2535 | }; | ||
| 2536 | pub const unterminated_char_literal_warning = struct { | ||
| 2537 | const msg = "missing terminating ' character"; | ||
| 2538 | const kind = .warning; | ||
| 2539 | const opt = "invalid-pp-token"; | ||
| 2540 | }; | ||
| 2541 | pub const unterminated_char_literal_error = struct { | ||
| 2542 | const msg = "missing terminating ' character"; | ||
| 2543 | const kind = .@"error"; | ||
| 2544 | }; | ||
| 2545 | pub const unterminated_comment = struct { | ||
| 2546 | const msg = "unterminated comment"; | ||
| 2547 | const kind = .@"error"; | ||
| 2548 | }; | ||
| 2549 | }; | ||
| 2550 | |||
| 2551 | list: std.ArrayListUnmanaged(Message) = .{}, | ||
| 2552 | arena: std.heap.ArenaAllocator, | ||
| 2553 | color: bool = true, | ||
| 2554 | fatal_errors: bool = false, | ||
| 2555 | options: Options = .{}, | ||
| 2556 | errors: u32 = 0, | ||
| 2557 | macro_backtrace_limit: u32 = 6, | ||
| 2558 | |||
| 2559 | pub fn warningExists(name: []const u8) bool { | ||
| 2560 | inline for (std.meta.fields(Options)) |f| { | ||
| 2561 | if (mem.eql(u8, f.name, name)) return true; | ||
| 2562 | } | ||
| 2563 | return false; | ||
| 2564 | } | ||
| 2565 | |||
| 2566 | pub fn set(diag: *Diagnostics, name: []const u8, to: Kind) !void { | ||
| 2567 | inline for (std.meta.fields(Options)) |f| { | ||
| 2568 | if (mem.eql(u8, f.name, name)) { | ||
| 2569 | @field(diag.options, f.name) = to; | ||
| 2570 | return; | ||
| 2571 | } | ||
| 2572 | } | ||
| 2573 | try diag.add(.{ | ||
| 2574 | .tag = .unknown_warning, | ||
| 2575 | .extra = .{ .str = name }, | ||
| 2576 | }, &.{}); | ||
| 2577 | } | ||
| 2578 | |||
| 2579 | pub fn init(gpa: Allocator) Diagnostics { | ||
| 2580 | return .{ | ||
| 2581 | .arena = std.heap.ArenaAllocator.init(gpa), | ||
| 2582 | }; | ||
| 2583 | } | ||
| 2584 | |||
| 2585 | pub fn deinit(diag: *Diagnostics) void { | ||
| 2586 | diag.list.deinit(diag.arena.allocator()); | ||
| 2587 | diag.arena.deinit(); | ||
| 2588 | } | ||
| 2589 | |||
| 2590 | pub fn add(diag: *Diagnostics, msg: Message, expansion_locs: []const Source.Location) Compilation.Error!void { | ||
| 2591 | const kind = diag.tagKind(msg.tag); | ||
| 2592 | if (kind == .off) return; | ||
| 2593 | var copy = msg; | ||
| 2594 | copy.kind = kind; | ||
| 2595 | |||
| 2596 | if (expansion_locs.len != 0) copy.loc = expansion_locs[expansion_locs.len - 1]; | ||
| 2597 | try diag.list.append(diag.arena.allocator(), copy); | ||
| 2598 | if (expansion_locs.len != 0) { | ||
| 2599 | // Add macro backtrace notes in reverse order omitting from the middle if needed. | ||
| 2600 | var i = expansion_locs.len - 1; | ||
| 2601 | const half = diag.macro_backtrace_limit / 2; | ||
| 2602 | const limit = if (i < diag.macro_backtrace_limit) 0 else i - half; | ||
| 2603 | try diag.list.ensureUnusedCapacity( | ||
| 2604 | diag.arena.allocator(), | ||
| 2605 | if (limit == 0) expansion_locs.len else diag.macro_backtrace_limit + 1, | ||
| 2606 | ); | ||
| 2607 | while (i > limit) { | ||
| 2608 | i -= 1; | ||
| 2609 | diag.list.appendAssumeCapacity(.{ | ||
| 2610 | .tag = .expanded_from_here, | ||
| 2611 | .kind = .note, | ||
| 2612 | .loc = expansion_locs[i], | ||
| 2613 | }); | ||
| 2614 | } | ||
| 2615 | if (limit != 0) { | ||
| 2616 | diag.list.appendAssumeCapacity(.{ | ||
| 2617 | .tag = .skipping_macro_backtrace, | ||
| 2618 | .kind = .note, | ||
| 2619 | .extra = .{ .unsigned = expansion_locs.len - diag.macro_backtrace_limit }, | ||
| 2620 | }); | ||
| 2621 | i = half - 1; | ||
| 2622 | while (i > 0) { | ||
| 2623 | i -= 1; | ||
| 2624 | diag.list.appendAssumeCapacity(.{ | ||
| 2625 | .tag = .expanded_from_here, | ||
| 2626 | .kind = .note, | ||
| 2627 | .loc = expansion_locs[i], | ||
| 2628 | }); | ||
| 2629 | } | ||
| 2630 | } | ||
| 2631 | |||
| 2632 | diag.list.appendAssumeCapacity(.{ | ||
| 2633 | .tag = .expanded_from_here, | ||
| 2634 | .kind = .note, | ||
| 2635 | .loc = msg.loc, | ||
| 2636 | }); | ||
| 2637 | } | ||
| 2638 | if (kind == .@"fatal error" or (kind == .@"error" and diag.fatal_errors)) | ||
| 2639 | return error.FatalError; | ||
| 2640 | } | ||
| 2641 | |||
| 2642 | pub fn fatal( | ||
| 2643 | diag: *Diagnostics, | ||
| 2644 | path: []const u8, | ||
| 2645 | line: []const u8, | ||
| 2646 | line_no: u32, | ||
| 2647 | col: u32, | ||
| 2648 | comptime fmt: []const u8, | ||
| 2649 | args: anytype, | ||
| 2650 | ) Compilation.Error { | ||
| 2651 | var m = MsgWriter.init(diag.color); | ||
| 2652 | defer m.deinit(); | ||
| 2653 | |||
| 2654 | m.location(path, line_no, col); | ||
| 2655 | m.start(.@"fatal error"); | ||
| 2656 | m.print(fmt, args); | ||
| 2657 | m.end(line, col, false); | ||
| 2658 | |||
| 2659 | diag.errors += 1; | ||
| 2660 | return error.FatalError; | ||
| 2661 | } | ||
| 2662 | |||
| 2663 | pub fn fatalNoSrc(diag: *Diagnostics, comptime fmt: []const u8, args: anytype) error{FatalError} { | ||
| 2664 | if (!diag.color) { | ||
| 2665 | std.debug.print("fatal error: " ++ fmt ++ "\n", args); | ||
| 2666 | } else { | ||
| 2667 | const std_err = std.io.getStdErr().writer(); | ||
| 2668 | util.setColor(.red, std_err); | ||
| 2669 | std_err.writeAll("fatal error: ") catch {}; | ||
| 2670 | util.setColor(.white, std_err); | ||
| 2671 | std_err.print(fmt ++ "\n", args) catch {}; | ||
| 2672 | util.setColor(.reset, std_err); | ||
| 2673 | } | ||
| 2674 | diag.errors += 1; | ||
| 2675 | return error.FatalError; | ||
| 2676 | } | ||
| 2677 | |||
| 2678 | pub fn render(comp: *Compilation) void { | ||
| 2679 | if (comp.diag.list.items.len == 0) return; | ||
| 2680 | var m = defaultMsgWriter(comp); | ||
| 2681 | defer m.deinit(); | ||
| 2682 | renderMessages(comp, &m); | ||
| 2683 | } | ||
| 2684 | pub fn defaultMsgWriter(comp: *const Compilation) MsgWriter { | ||
| 2685 | return MsgWriter.init(comp.diag.color); | ||
| 2686 | } | ||
| 2687 | |||
| 2688 | pub fn renderMessages(comp: *Compilation, m: anytype) void { | ||
| 2689 | var errors: u32 = 0; | ||
| 2690 | var warnings: u32 = 0; | ||
| 2691 | for (comp.diag.list.items) |msg| { | ||
| 2692 | switch (msg.kind) { | ||
| 2693 | .@"fatal error", .@"error" => errors += 1, | ||
| 2694 | .warning => warnings += 1, | ||
| 2695 | .note => {}, | ||
| 2696 | .off => continue, // happens if an error is added before it is disabled | ||
| 2697 | .default => unreachable, | ||
| 2698 | } | ||
| 2699 | renderMessage(comp, m, msg); | ||
| 2700 | } | ||
| 2701 | const w_s: []const u8 = if (warnings == 1) "" else "s"; | ||
| 2702 | const e_s: []const u8 = if (errors == 1) "" else "s"; | ||
| 2703 | if (errors != 0 and warnings != 0) { | ||
| 2704 | m.print("{d} warning{s} and {d} error{s} generated.\n", .{ warnings, w_s, errors, e_s }); | ||
| 2705 | } else if (warnings != 0) { | ||
| 2706 | m.print("{d} warning{s} generated.\n", .{ warnings, w_s }); | ||
| 2707 | } else if (errors != 0) { | ||
| 2708 | m.print("{d} error{s} generated.\n", .{ errors, e_s }); | ||
| 2709 | } | ||
| 2710 | |||
| 2711 | comp.diag.list.items.len = 0; | ||
| 2712 | comp.diag.errors += errors; | ||
| 2713 | } | ||
| 2714 | |||
| 2715 | pub fn renderMessage(comp: *Compilation, m: anytype, msg: Message) void { | ||
| 2716 | var line: ?[]const u8 = null; | ||
| 2717 | var end_with_splice = false; | ||
| 2718 | const width = if (msg.loc.id != .unused) blk: { | ||
| 2719 | var loc = msg.loc; | ||
| 2720 | switch (msg.tag) { | ||
| 2721 | .escape_sequence_overflow, | ||
| 2722 | .invalid_universal_character, | ||
| 2723 | // use msg.extra.unsigned for index into string literal | ||
| 2724 | => loc.byte_offset += @truncate(msg.extra.unsigned), | ||
| 2725 | .non_standard_escape_char, | ||
| 2726 | .unknown_escape_sequence, | ||
| 2727 | => loc.byte_offset += msg.extra.invalid_escape.offset, | ||
| 2728 | else => {}, | ||
| 2729 | } | ||
| 2730 | const source = comp.getSource(loc.id); | ||
| 2731 | var line_col = source.lineCol(loc); | ||
| 2732 | line = line_col.line; | ||
| 2733 | end_with_splice = line_col.end_with_splice; | ||
| 2734 | if (msg.tag == .backslash_newline_escape) { | ||
| 2735 | line = line_col.line[0 .. line_col.col - 1]; | ||
| 2736 | line_col.col += 1; | ||
| 2737 | line_col.width += 1; | ||
| 2738 | } | ||
| 2739 | m.location(source.path, line_col.line_no, line_col.col); | ||
| 2740 | break :blk line_col.width; | ||
| 2741 | } else 0; | ||
| 2742 | |||
| 2743 | m.start(msg.kind); | ||
| 2744 | @setEvalBranchQuota(1500); | ||
| 2745 | switch (msg.tag) { | ||
| 2746 | inline else => |tag| { | ||
| 2747 | const info = @field(messages, @tagName(tag)); | ||
| 2748 | if (@hasDecl(info, "extra")) { | ||
| 2749 | switch (info.extra) { | ||
| 2750 | .str => m.print(info.msg, .{msg.extra.str}), | ||
| 2751 | .tok_id => m.print(info.msg, .{ | ||
| 2752 | msg.extra.tok_id.expected.symbol(), | ||
| 2753 | msg.extra.tok_id.actual.symbol(), | ||
| 2754 | }), | ||
| 2755 | .tok_id_expected => m.print(info.msg, .{msg.extra.tok_id_expected.symbol()}), | ||
| 2756 | .arguments => m.print(info.msg, .{ msg.extra.arguments.expected, msg.extra.arguments.actual }), | ||
| 2757 | .codepoints => m.print(info.msg, .{ | ||
| 2758 | msg.extra.codepoints.actual, | ||
| 2759 | msg.extra.codepoints.resembles, | ||
| 2760 | }), | ||
| 2761 | .attr_arg_count => m.print(info.msg, .{ | ||
| 2762 | @tagName(msg.extra.attr_arg_count.attribute), | ||
| 2763 | msg.extra.attr_arg_count.expected, | ||
| 2764 | }), | ||
| 2765 | .attr_arg_type => m.print(info.msg, .{ | ||
| 2766 | msg.extra.attr_arg_type.expected.toString(), | ||
| 2767 | msg.extra.attr_arg_type.actual.toString(), | ||
| 2768 | }), | ||
| 2769 | .actual_codepoint => m.print(info.msg, .{msg.extra.actual_codepoint}), | ||
| 2770 | .ascii => m.print(info.msg, .{msg.extra.ascii}), | ||
| 2771 | .unsigned => m.print(info.msg, .{msg.extra.unsigned}), | ||
| 2772 | .pow_2_as_string => m.print(info.msg, .{switch (msg.extra.pow_2_as_string) { | ||
| 2773 | 63 => "9223372036854775808", | ||
| 2774 | 64 => "18446744073709551616", | ||
| 2775 | 127 => "170141183460469231731687303715884105728", | ||
| 2776 | 128 => "340282366920938463463374607431768211456", | ||
| 2777 | else => unreachable, | ||
| 2778 | }}), | ||
| 2779 | .signed => m.print(info.msg, .{msg.extra.signed}), | ||
| 2780 | .attr_enum => m.print(info.msg, .{ | ||
| 2781 | @tagName(msg.extra.attr_enum.tag), | ||
| 2782 | Attribute.Formatting.choices(msg.extra.attr_enum.tag), | ||
| 2783 | }), | ||
| 2784 | .ignored_record_attr => m.print(info.msg, .{ | ||
| 2785 | @tagName(msg.extra.ignored_record_attr.tag), | ||
| 2786 | @tagName(msg.extra.ignored_record_attr.specifier), | ||
| 2787 | }), | ||
| 2788 | .builtin_with_header => m.print(info.msg, .{ | ||
| 2789 | @tagName(msg.extra.builtin_with_header.header), | ||
| 2790 | Builtin.nameFromTag(msg.extra.builtin_with_header.builtin).span(), | ||
| 2791 | }), | ||
| 2792 | .invalid_escape => { | ||
| 2793 | if (std.ascii.isPrint(msg.extra.invalid_escape.char)) { | ||
| 2794 | const str: [1]u8 = .{msg.extra.invalid_escape.char}; | ||
| 2795 | m.print(info.msg, .{&str}); | ||
| 2796 | } else { | ||
| 2797 | var buf: [3]u8 = undefined; | ||
| 2798 | _ = std.fmt.bufPrint(&buf, "x{x}", .{std.fmt.fmtSliceHexLower(&.{msg.extra.invalid_escape.char})}) catch unreachable; | ||
| 2799 | m.print(info.msg, .{&buf}); | ||
| 2800 | } | ||
| 2801 | }, | ||
| 2802 | else => @compileError("invalid extra kind " ++ @tagName(info.extra)), | ||
| 2803 | } | ||
| 2804 | } else { | ||
| 2805 | m.write(info.msg); | ||
| 2806 | } | ||
| 2807 | |||
| 2808 | if (@hasDecl(info, "opt")) { | ||
| 2809 | if (msg.kind == .@"error" and info.kind != .@"error") { | ||
| 2810 | m.print(" [-Werror,-W{s}]", .{info.opt}); | ||
| 2811 | } else if (msg.kind != .note) { | ||
| 2812 | m.print(" [-W{s}]", .{info.opt}); | ||
| 2813 | } | ||
| 2814 | } | ||
| 2815 | }, | ||
| 2816 | } | ||
| 2817 | |||
| 2818 | m.end(line, width, end_with_splice); | ||
| 2819 | } | ||
| 2820 | |||
| 2821 | fn tagKind(diag: *Diagnostics, tag: Tag) Kind { | ||
| 2822 | // XXX: horrible hack, do not do this | ||
| 2823 | const comp = @fieldParentPtr(Compilation, "diag", diag); | ||
| 2824 | |||
| 2825 | var kind: Kind = undefined; | ||
| 2826 | switch (tag) { | ||
| 2827 | inline else => |tag_val| { | ||
| 2828 | const info = @field(messages, @tagName(tag_val)); | ||
| 2829 | kind = info.kind; | ||
| 2830 | |||
| 2831 | // stage1 doesn't like when I combine these ifs | ||
| 2832 | if (@hasDecl(info, "all")) { | ||
| 2833 | if (diag.options.all != .default) kind = diag.options.all; | ||
| 2834 | } | ||
| 2835 | if (@hasDecl(info, "w_extra")) { | ||
| 2836 | if (diag.options.extra != .default) kind = diag.options.extra; | ||
| 2837 | } | ||
| 2838 | if (@hasDecl(info, "pedantic")) { | ||
| 2839 | if (diag.options.pedantic != .default) kind = diag.options.pedantic; | ||
| 2840 | } | ||
| 2841 | if (@hasDecl(info, "opt")) { | ||
| 2842 | if (@field(diag.options, info.opt) != .default) kind = @field(diag.options, info.opt); | ||
| 2843 | } | ||
| 2844 | if (@hasDecl(info, "suppress_version")) if (comp.langopts.standard.atLeast(info.suppress_version)) return .off; | ||
| 2845 | if (@hasDecl(info, "suppress_unless_version")) if (!comp.langopts.standard.atLeast(info.suppress_unless_version)) return .off; | ||
| 2846 | if (@hasDecl(info, "suppress_gnu")) if (comp.langopts.standard.isExplicitGNU()) return .off; | ||
| 2847 | if (@hasDecl(info, "suppress_language_option")) if (!@field(comp.langopts, info.suppress_language_option)) return .off; | ||
| 2848 | if (@hasDecl(info, "suppress_gcc")) if (comp.langopts.emulate == .gcc) return .off; | ||
| 2849 | if (@hasDecl(info, "suppress_clang")) if (comp.langopts.emulate == .clang) return .off; | ||
| 2850 | if (@hasDecl(info, "suppress_msvc")) if (comp.langopts.emulate == .msvc) return .off; | ||
| 2851 | if (kind == .@"error" and diag.fatal_errors) kind = .@"fatal error"; | ||
| 2852 | return kind; | ||
| 2853 | }, | ||
| 2854 | } | ||
| 2855 | } | ||
| 2856 | |||
| 2857 | const MsgWriter = struct { | ||
| 2858 | w: std.io.BufferedWriter(4096, std.fs.File.Writer), | ||
| 2859 | color: bool, | ||
| 2860 | |||
| 2861 | fn init(color: bool) MsgWriter { | ||
| 2862 | std.debug.getStderrMutex().lock(); | ||
| 2863 | return .{ | ||
| 2864 | .w = std.io.bufferedWriter(std.io.getStdErr().writer()), | ||
| 2865 | .color = color, | ||
| 2866 | }; | ||
| 2867 | } | ||
| 2868 | |||
| 2869 | pub fn deinit(m: *MsgWriter) void { | ||
| 2870 | m.w.flush() catch {}; | ||
| 2871 | std.debug.getStderrMutex().unlock(); | ||
| 2872 | } | ||
| 2873 | |||
| 2874 | pub fn print(m: *MsgWriter, comptime fmt: []const u8, args: anytype) void { | ||
| 2875 | m.w.writer().print(fmt, args) catch {}; | ||
| 2876 | } | ||
| 2877 | |||
| 2878 | fn write(m: *MsgWriter, msg: []const u8) void { | ||
| 2879 | m.w.writer().writeAll(msg) catch {}; | ||
| 2880 | } | ||
| 2881 | |||
| 2882 | fn setColor(m: *MsgWriter, color: util.Color) void { | ||
| 2883 | util.setColor(color, m.w.writer()); | ||
| 2884 | } | ||
| 2885 | |||
| 2886 | fn location(m: *MsgWriter, path: []const u8, line: u32, col: u32) void { | ||
| 2887 | const prefix = if (std.fs.path.dirname(path) == null and path[0] != '<') "." ++ std.fs.path.sep_str else ""; | ||
| 2888 | if (!m.color) { | ||
| 2889 | m.print("{s}{s}:{d}:{d}: ", .{ prefix, path, line, col }); | ||
| 2890 | } else { | ||
| 2891 | m.setColor(.white); | ||
| 2892 | m.print("{s}{s}:{d}:{d}: ", .{ prefix, path, line, col }); | ||
| 2893 | } | ||
| 2894 | } | ||
| 2895 | |||
| 2896 | fn start(m: *MsgWriter, kind: Kind) void { | ||
| 2897 | if (!m.color) { | ||
| 2898 | m.print("{s}: ", .{@tagName(kind)}); | ||
| 2899 | } else { | ||
| 2900 | switch (kind) { | ||
| 2901 | .@"fatal error", .@"error" => m.setColor(.red), | ||
| 2902 | .note => m.setColor(.cyan), | ||
| 2903 | .warning => m.setColor(.purple), | ||
| 2904 | .off, .default => unreachable, | ||
| 2905 | } | ||
| 2906 | m.write(switch (kind) { | ||
| 2907 | .@"fatal error" => "fatal error: ", | ||
| 2908 | .@"error" => "error: ", | ||
| 2909 | .note => "note: ", | ||
| 2910 | .warning => "warning: ", | ||
| 2911 | .off, .default => unreachable, | ||
| 2912 | }); | ||
| 2913 | m.setColor(.white); | ||
| 2914 | } | ||
| 2915 | } | ||
| 2916 | |||
| 2917 | fn end(m: *MsgWriter, maybe_line: ?[]const u8, col: u32, end_with_splice: bool) void { | ||
| 2918 | const line = maybe_line orelse { | ||
| 2919 | m.write("\n"); | ||
| 2920 | m.setColor(.reset); | ||
| 2921 | return; | ||
| 2922 | }; | ||
| 2923 | const trailer = if (end_with_splice) "\\ " else ""; | ||
| 2924 | if (!m.color) { | ||
| 2925 | m.print("\n{s}{s}\n", .{ line, trailer }); | ||
| 2926 | m.print("{s: >[1]}^\n", .{ "", col }); | ||
| 2927 | } else { | ||
| 2928 | m.setColor(.reset); | ||
| 2929 | m.print("\n{s}{s}\n{s: >[3]}", .{ line, trailer, "", col }); | ||
| 2930 | m.setColor(.green); | ||
| 2931 | m.write("^\n"); | ||
| 2932 | m.setColor(.reset); | ||
| 2933 | } | ||
| 2934 | } | ||
| 2935 | }; | ||
deps/aro/Driver.zig deleted-721| ... | @@ -1,721 +0,0 @@ | ||
| 1 | const std = @import("std"); | ||
| 2 | const mem = std.mem; | ||
| 3 | const Allocator = mem.Allocator; | ||
| 4 | const process = std.process; | ||
| 5 | const Codegen = @import("Codegen_legacy.zig"); | ||
| 6 | const Compilation = @import("Compilation.zig"); | ||
| 7 | const LangOpts = @import("LangOpts.zig"); | ||
| 8 | const Preprocessor = @import("Preprocessor.zig"); | ||
| 9 | const Parser = @import("Parser.zig"); | ||
| 10 | const Source = @import("Source.zig"); | ||
| 11 | const Toolchain = @import("Toolchain.zig"); | ||
| 12 | const util = @import("util.zig"); | ||
| 13 | const target_util = @import("target.zig"); | ||
| 14 | |||
| 15 | const Driver = @This(); | ||
| 16 | |||
| 17 | pub const Linker = enum { | ||
| 18 | ld, | ||
| 19 | bfd, | ||
| 20 | gold, | ||
| 21 | lld, | ||
| 22 | mold, | ||
| 23 | }; | ||
| 24 | |||
| 25 | comp: *Compilation, | ||
| 26 | inputs: std.ArrayListUnmanaged(Source) = .{}, | ||
| 27 | link_objects: std.ArrayListUnmanaged([]const u8) = .{}, | ||
| 28 | output_name: ?[]const u8 = null, | ||
| 29 | sysroot: ?[]const u8 = null, | ||
| 30 | temp_file_count: u32 = 0, | ||
| 31 | /// If false, do not emit line directives in -E mode | ||
| 32 | line_commands: bool = true, | ||
| 33 | /// If true, use `#line <num>` instead of `# <num>` for line directives | ||
| 34 | use_line_directives: bool = false, | ||
| 35 | only_preprocess: bool = false, | ||
| 36 | only_syntax: bool = false, | ||
| 37 | only_compile: bool = false, | ||
| 38 | only_preprocess_and_compile: bool = false, | ||
| 39 | verbose_ast: bool = false, | ||
| 40 | verbose_pp: bool = false, | ||
| 41 | verbose_ir: bool = false, | ||
| 42 | verbose_linker_args: bool = false, | ||
| 43 | |||
| 44 | /// Full path to the aro executable | ||
| 45 | aro_name: []const u8 = "", | ||
| 46 | |||
| 47 | /// Value of --triple= passed via CLI | ||
| 48 | raw_target_triple: ?[]const u8 = null, | ||
| 49 | |||
| 50 | // linker options | ||
| 51 | use_linker: ?[]const u8 = null, | ||
| 52 | linker_path: ?[]const u8 = null, | ||
| 53 | nodefaultlibs: bool = false, | ||
| 54 | nolibc: bool = false, | ||
| 55 | nostartfiles: bool = false, | ||
| 56 | nostdlib: bool = false, | ||
| 57 | pie: ?bool = null, | ||
| 58 | rdynamic: bool = false, | ||
| 59 | relocatable: bool = false, | ||
| 60 | rtlib: ?[]const u8 = null, | ||
| 61 | shared: bool = false, | ||
| 62 | shared_libgcc: bool = false, | ||
| 63 | static: bool = false, | ||
| 64 | static_libgcc: bool = false, | ||
| 65 | static_pie: bool = false, | ||
| 66 | strip: bool = false, | ||
| 67 | unwindlib: ?[]const u8 = null, | ||
| 68 | |||
| 69 | pub fn deinit(d: *Driver) void { | ||
| 70 | for (d.link_objects.items[d.link_objects.items.len - d.temp_file_count ..]) |obj| { | ||
| 71 | std.fs.deleteFileAbsolute(obj) catch {}; | ||
| 72 | d.comp.gpa.free(obj); | ||
| 73 | } | ||
| 74 | d.inputs.deinit(d.comp.gpa); | ||
| 75 | d.link_objects.deinit(d.comp.gpa); | ||
| 76 | d.* = undefined; | ||
| 77 | } | ||
| 78 | |||
| 79 | pub const usage = | ||
| 80 | \\Usage {s}: [options] file.. | ||
| 81 | \\ | ||
| 82 | \\General options: | ||
| 83 | \\ -h, --help Print this message. | ||
| 84 | \\ -v, --version Print aro version. | ||
| 85 | \\ | ||
| 86 | \\Compile options: | ||
| 87 | \\ -c, --compile Only run preprocess, compile, and assemble steps | ||
| 88 | \\ -D <macro>=<value> Define <macro> to <value> (defaults to 1) | ||
| 89 | \\ -E Only run the preprocessor | ||
| 90 | \\ -fchar8_t Enable char8_t (enabled by default in C2X and later) | ||
| 91 | \\ -fno-char8_t Disable char8_t (disabled by default for pre-C2X) | ||
| 92 | \\ -fcolor-diagnostics Enable colors in diagnostics | ||
| 93 | \\ -fno-color-diagnostics Disable colors in diagnostics | ||
| 94 | \\ -fdeclspec Enable support for __declspec attributes | ||
| 95 | \\ -fno-declspec Disable support for __declspec attributes | ||
| 96 | \\ -ffp-eval-method=[source|double|extended] | ||
| 97 | \\ Evaluation method to use for floating-point arithmetic | ||
| 98 | \\ -fgnu-inline-asm Enable GNU style inline asm (default: enabled) | ||
| 99 | \\ -fno-gnu-inline-asm Disable GNU style inline asm | ||
| 100 | \\ -fms-extensions Enable support for Microsoft extensions | ||
| 101 | \\ -fno-ms-extensions Disable support for Microsoft extensions | ||
| 102 | \\ -fdollars-in-identifiers | ||
| 103 | \\ Allow '$' in identifiers | ||
| 104 | \\ -fno-dollars-in-identifiers | ||
| 105 | \\ Disallow '$' in identifiers | ||
| 106 | \\ -fmacro-backtrace-limit=<limit> | ||
| 107 | \\ Set limit on how many macro expansion traces are shown in errors (default 6) | ||
| 108 | \\ -fnative-half-type Use the native half type for __fp16 instead of promoting to float | ||
| 109 | \\ -fnative-half-arguments-and-returns | ||
| 110 | \\ Allow half-precision function arguments and return values | ||
| 111 | \\ -fshort-enums Use the narrowest possible integer type for enums | ||
| 112 | \\ -fno-short-enums Use "int" as the tag type for enums | ||
| 113 | \\ -fsigned-char "char" is signed | ||
| 114 | \\ -fno-signed-char "char" is unsigned | ||
| 115 | \\ -fsyntax-only Only run the preprocessor, parser, and semantic analysis stages | ||
| 116 | \\ -funsigned-char "char" is unsigned | ||
| 117 | \\ -fno-unsigned-char "char" is signed | ||
| 118 | \\ -fuse-line-directives Use `#line <num>` linemarkers in preprocessed output | ||
| 119 | \\ -fno-use-line-directives | ||
| 120 | \\ Use `# <num>` linemarkers in preprocessed output | ||
| 121 | \\ -I <dir> Add directory to include search path | ||
| 122 | \\ -isystem Add directory to SYSTEM include search path | ||
| 123 | \\ --emulate=[clang|gcc|msvc] | ||
| 124 | \\ Select which C compiler to emulate (default clang) | ||
| 125 | \\ -o <file> Write output to <file> | ||
| 126 | \\ -P, --no-line-commands Disable linemarker output in -E mode | ||
| 127 | \\ -pedantic Warn on language extensions | ||
| 128 | \\ --rtlib=<arg> Compiler runtime library to use (libgcc or compiler-rt) | ||
| 129 | \\ -std=<standard> Specify language standard | ||
| 130 | \\ -S, --assemble Only run preprocess and compilation steps | ||
| 131 | \\ --sysroot=<dir> Use dir as the logical root directory for headers and libraries (not fully implemented) | ||
| 132 | \\ --target=<value> Generate code for the given target | ||
| 133 | \\ -U <macro> Undefine <macro> | ||
| 134 | \\ -Werror Treat all warnings as errors | ||
| 135 | \\ -Werror=<warning> Treat warning as error | ||
| 136 | \\ -W<warning> Enable the specified warning | ||
| 137 | \\ -Wno-<warning> Disable the specified warning | ||
| 138 | \\ | ||
| 139 | \\Link options: | ||
| 140 | \\ -fuse-ld=[bfd|gold|lld|mold] | ||
| 141 | \\ Use specific linker | ||
| 142 | \\ -nodefaultlibs Do not use the standard system libraries when linking. | ||
| 143 | \\ -nolibc Do not use the C library or system libraries tightly coupled with it when linking. | ||
| 144 | \\ -nostdlib Do not use the standard system startup files or libraries when linking | ||
| 145 | \\ -nostartfiles Do not use the standard system startup files when linking. | ||
| 146 | \\ -pie Produce a dynamically linked position independent executable on targets that support it. | ||
| 147 | \\ --ld-path=<path> Use linker specified by <path> | ||
| 148 | \\ -r Produce a relocatable object as output. | ||
| 149 | \\ -rdynamic Pass the flag -export-dynamic to the ELF linker, on targets that support it. | ||
| 150 | \\ -s Remove all symbol table and relocation information from the executable. | ||
| 151 | \\ -shared Produce a shared object which can then be linked with other objects to form an executable. | ||
| 152 | \\ -shared-libgcc On systems that provide libgcc as a shared library, force the use of the shared version | ||
| 153 | \\ -static On systems that support dynamic linking, this overrides -pie and prevents linking with the shared libraries. | ||
| 154 | \\ -static-libgcc On systems that provide libgcc as a shared library, force the use of the static version | ||
| 155 | \\ -static-pie Produce a static position independent executable on targets that support it. | ||
| 156 | \\ --unwindlib=<arg> Unwind library to use ("none", "libgcc", or "libunwind") If not specified, will match runtime library | ||
| 157 | \\ | ||
| 158 | \\Debug options: | ||
| 159 | \\ --verbose-ast Dump produced AST to stdout | ||
| 160 | \\ --verbose-pp Dump preprocessor state | ||
| 161 | \\ --verbose-ir Dump ir to stdout | ||
| 162 | \\ --verbose-linker-args Dump linker args to stdout | ||
| 163 | \\ | ||
| 164 | \\ | ||
| 165 | ; | ||
| 166 | |||
| 167 | /// Process command line arguments, returns true if something was written to std_out. | ||
| 168 | pub fn parseArgs( | ||
| 169 | d: *Driver, | ||
| 170 | std_out: anytype, | ||
| 171 | macro_buf: anytype, | ||
| 172 | args: []const []const u8, | ||
| 173 | ) !bool { | ||
| 174 | var i: usize = 1; | ||
| 175 | var color_setting: enum { | ||
| 176 | on, | ||
| 177 | off, | ||
| 178 | unset, | ||
| 179 | } = .unset; | ||
| 180 | var comment_arg: []const u8 = ""; | ||
| 181 | while (i < args.len) : (i += 1) { | ||
| 182 | const arg = args[i]; | ||
| 183 | if (mem.startsWith(u8, arg, "-") and arg.len > 1) { | ||
| 184 | if (mem.eql(u8, arg, "-h") or mem.eql(u8, arg, "--help")) { | ||
| 185 | std_out.print(usage, .{args[0]}) catch |er| { | ||
| 186 | return d.fatal("unable to print usage: {s}", .{util.errorDescription(er)}); | ||
| 187 | }; | ||
| 188 | return true; | ||
| 189 | } else if (mem.eql(u8, arg, "-v") or mem.eql(u8, arg, "--version")) { | ||
| 190 | std_out.writeAll(@import("lib.zig").version_str ++ "\n") catch |er| { | ||
| 191 | return d.fatal("unable to print version: {s}", .{util.errorDescription(er)}); | ||
| 192 | }; | ||
| 193 | return true; | ||
| 194 | } else if (mem.startsWith(u8, arg, "-D")) { | ||
| 195 | var macro = arg["-D".len..]; | ||
| 196 | if (macro.len == 0) { | ||
| 197 | i += 1; | ||
| 198 | if (i >= args.len) { | ||
| 199 | try d.err("expected argument after -I"); | ||
| 200 | continue; | ||
| 201 | } | ||
| 202 | macro = args[i]; | ||
| 203 | } | ||
| 204 | var value: []const u8 = "1"; | ||
| 205 | if (mem.indexOfScalar(u8, macro, '=')) |some| { | ||
| 206 | value = macro[some + 1 ..]; | ||
| 207 | macro = macro[0..some]; | ||
| 208 | } | ||
| 209 | try macro_buf.print("#define {s} {s}\n", .{ macro, value }); | ||
| 210 | } else if (mem.startsWith(u8, arg, "-U")) { | ||
| 211 | var macro = arg["-U".len..]; | ||
| 212 | if (macro.len == 0) { | ||
| 213 | i += 1; | ||
| 214 | if (i >= args.len) { | ||
| 215 | try d.err("expected argument after -I"); | ||
| 216 | continue; | ||
| 217 | } | ||
| 218 | macro = args[i]; | ||
| 219 | } | ||
| 220 | try macro_buf.print("#undef {s}\n", .{macro}); | ||
| 221 | } else if (mem.eql(u8, arg, "-c") or mem.eql(u8, arg, "--compile")) { | ||
| 222 | d.only_compile = true; | ||
| 223 | } else if (mem.eql(u8, arg, "-E")) { | ||
| 224 | d.only_preprocess = true; | ||
| 225 | } else if (mem.eql(u8, arg, "-P") or mem.eql(u8, arg, "--no-line-commands")) { | ||
| 226 | d.line_commands = false; | ||
| 227 | } else if (mem.eql(u8, arg, "-fuse-line-directives")) { | ||
| 228 | d.use_line_directives = true; | ||
| 229 | } else if (mem.eql(u8, arg, "-fno-use-line-directives")) { | ||
| 230 | d.use_line_directives = false; | ||
| 231 | } else if (mem.eql(u8, arg, "-fchar8_t")) { | ||
| 232 | d.comp.langopts.has_char8_t_override = true; | ||
| 233 | } else if (mem.eql(u8, arg, "-fno-char8_t")) { | ||
| 234 | d.comp.langopts.has_char8_t_override = false; | ||
| 235 | } else if (mem.eql(u8, arg, "-fcolor-diagnostics")) { | ||
| 236 | color_setting = .on; | ||
| 237 | } else if (mem.eql(u8, arg, "-fno-color-diagnostics")) { | ||
| 238 | color_setting = .off; | ||
| 239 | } else if (mem.eql(u8, arg, "-fdollars-in-identifiers")) { | ||
| 240 | d.comp.langopts.dollars_in_identifiers = true; | ||
| 241 | } else if (mem.eql(u8, arg, "-fno-dollars-in-identifiers")) { | ||
| 242 | d.comp.langopts.dollars_in_identifiers = false; | ||
| 243 | } else if (mem.eql(u8, arg, "-fdigraphs")) { | ||
| 244 | d.comp.langopts.digraphs = true; | ||
| 245 | } else if (mem.eql(u8, arg, "-fgnu-inline-asm")) { | ||
| 246 | d.comp.langopts.gnu_asm = true; | ||
| 247 | } else if (mem.eql(u8, arg, "-fno-gnu-inline-asm")) { | ||
| 248 | d.comp.langopts.gnu_asm = false; | ||
| 249 | } else if (mem.eql(u8, arg, "-fno-digraphs")) { | ||
| 250 | d.comp.langopts.digraphs = false; | ||
| 251 | } else if (option(arg, "-fmacro-backtrace-limit=")) |limit_str| { | ||
| 252 | var limit = std.fmt.parseInt(u32, limit_str, 10) catch { | ||
| 253 | try d.err("-fmacro-backtrace-limit takes a number argument"); | ||
| 254 | continue; | ||
| 255 | }; | ||
| 256 | |||
| 257 | if (limit == 0) limit = std.math.maxInt(u32); | ||
| 258 | d.comp.diag.macro_backtrace_limit = limit; | ||
| 259 | } else if (mem.eql(u8, arg, "-fnative-half-type")) { | ||
| 260 | d.comp.langopts.use_native_half_type = true; | ||
| 261 | } else if (mem.eql(u8, arg, "-fnative-half-arguments-and-returns")) { | ||
| 262 | d.comp.langopts.allow_half_args_and_returns = true; | ||
| 263 | } else if (mem.eql(u8, arg, "-fshort-enums")) { | ||
| 264 | d.comp.langopts.short_enums = true; | ||
| 265 | } else if (mem.eql(u8, arg, "-fno-short-enums")) { | ||
| 266 | d.comp.langopts.short_enums = false; | ||
| 267 | } else if (mem.eql(u8, arg, "-fsigned-char")) { | ||
| 268 | d.comp.langopts.setCharSignedness(.signed); | ||
| 269 | } else if (mem.eql(u8, arg, "-fno-signed-char")) { | ||
| 270 | d.comp.langopts.setCharSignedness(.unsigned); | ||
| 271 | } else if (mem.eql(u8, arg, "-funsigned-char")) { | ||
| 272 | d.comp.langopts.setCharSignedness(.unsigned); | ||
| 273 | } else if (mem.eql(u8, arg, "-fno-unsigned-char")) { | ||
| 274 | d.comp.langopts.setCharSignedness(.signed); | ||
| 275 | } else if (mem.eql(u8, arg, "-fdeclspec")) { | ||
| 276 | d.comp.langopts.declspec_attrs = true; | ||
| 277 | } else if (mem.eql(u8, arg, "-fno-declspec")) { | ||
| 278 | d.comp.langopts.declspec_attrs = false; | ||
| 279 | } else if (mem.eql(u8, arg, "-fms-extensions")) { | ||
| 280 | d.comp.langopts.enableMSExtensions(); | ||
| 281 | } else if (mem.eql(u8, arg, "-fno-ms-extensions")) { | ||
| 282 | d.comp.langopts.disableMSExtensions(); | ||
| 283 | } else if (mem.startsWith(u8, arg, "-I")) { | ||
| 284 | var path = arg["-I".len..]; | ||
| 285 | if (path.len == 0) { | ||
| 286 | i += 1; | ||
| 287 | if (i >= args.len) { | ||
| 288 | try d.err("expected argument after -I"); | ||
| 289 | continue; | ||
| 290 | } | ||
| 291 | path = args[i]; | ||
| 292 | } | ||
| 293 | try d.comp.include_dirs.append(path); | ||
| 294 | } else if (mem.startsWith(u8, arg, "-fsyntax-only")) { | ||
| 295 | d.only_syntax = true; | ||
| 296 | } else if (mem.startsWith(u8, arg, "-fno-syntax-only")) { | ||
| 297 | d.only_syntax = false; | ||
| 298 | } else if (mem.startsWith(u8, arg, "-isystem")) { | ||
| 299 | var path = arg["-isystem".len..]; | ||
| 300 | if (path.len == 0) { | ||
| 301 | i += 1; | ||
| 302 | if (i >= args.len) { | ||
| 303 | try d.err("expected argument after -isystem"); | ||
| 304 | continue; | ||
| 305 | } | ||
| 306 | path = args[i]; | ||
| 307 | } | ||
| 308 | const duped = try d.comp.gpa.dupe(u8, path); | ||
| 309 | errdefer d.comp.gpa.free(duped); | ||
| 310 | try d.comp.system_include_dirs.append(duped); | ||
| 311 | } else if (option(arg, "--emulate=")) |compiler_str| { | ||
| 312 | const compiler = std.meta.stringToEnum(LangOpts.Compiler, compiler_str) orelse { | ||
| 313 | try d.comp.diag.add(.{ .tag = .cli_invalid_emulate, .extra = .{ .str = arg } }, &.{}); | ||
| 314 | continue; | ||
| 315 | }; | ||
| 316 | d.comp.langopts.setEmulatedCompiler(compiler); | ||
| 317 | } else if (option(arg, "-ffp-eval-method=")) |fp_method_str| { | ||
| 318 | const fp_eval_method = std.meta.stringToEnum(LangOpts.FPEvalMethod, fp_method_str) orelse .indeterminate; | ||
| 319 | if (fp_eval_method == .indeterminate) { | ||
| 320 | try d.comp.diag.add(.{ .tag = .cli_invalid_fp_eval_method, .extra = .{ .str = fp_method_str } }, &.{}); | ||
| 321 | continue; | ||
| 322 | } | ||
| 323 | d.comp.langopts.setFpEvalMethod(fp_eval_method); | ||
| 324 | } else if (mem.startsWith(u8, arg, "-o")) { | ||
| 325 | var file = arg["-o".len..]; | ||
| 326 | if (file.len == 0) { | ||
| 327 | i += 1; | ||
| 328 | if (i >= args.len) { | ||
| 329 | try d.err("expected argument after -o"); | ||
| 330 | continue; | ||
| 331 | } | ||
| 332 | file = args[i]; | ||
| 333 | } | ||
| 334 | d.output_name = file; | ||
| 335 | } else if (option(arg, "--sysroot=")) |sysroot| { | ||
| 336 | d.sysroot = sysroot; | ||
| 337 | } else if (mem.eql(u8, arg, "-pedantic")) { | ||
| 338 | d.comp.diag.options.pedantic = .warning; | ||
| 339 | } else if (option(arg, "--rtlib=")) |rtlib| { | ||
| 340 | if (mem.eql(u8, rtlib, "compiler-rt") or mem.eql(u8, rtlib, "libgcc") or mem.eql(u8, rtlib, "platform")) { | ||
| 341 | d.rtlib = rtlib; | ||
| 342 | } else { | ||
| 343 | try d.comp.diag.add(.{ .tag = .invalid_rtlib, .extra = .{ .str = rtlib } }, &.{}); | ||
| 344 | } | ||
| 345 | } else if (option(arg, "-Werror=")) |err_name| { | ||
| 346 | try d.comp.diag.set(err_name, .@"error"); | ||
| 347 | } else if (mem.eql(u8, arg, "-Wno-fatal-errors")) { | ||
| 348 | d.comp.diag.fatal_errors = false; | ||
| 349 | } else if (option(arg, "-Wno-")) |err_name| { | ||
| 350 | try d.comp.diag.set(err_name, .off); | ||
| 351 | } else if (mem.eql(u8, arg, "-Wfatal-errors")) { | ||
| 352 | d.comp.diag.fatal_errors = true; | ||
| 353 | } else if (option(arg, "-W")) |err_name| { | ||
| 354 | try d.comp.diag.set(err_name, .warning); | ||
| 355 | } else if (option(arg, "-std=")) |standard| { | ||
| 356 | d.comp.langopts.setStandard(standard) catch | ||
| 357 | try d.comp.diag.add(.{ .tag = .cli_invalid_standard, .extra = .{ .str = arg } }, &.{}); | ||
| 358 | } else if (mem.eql(u8, arg, "-S") or mem.eql(u8, arg, "--assemble")) { | ||
| 359 | d.only_preprocess_and_compile = true; | ||
| 360 | } else if (option(arg, "--target=")) |triple| { | ||
| 361 | const cross = std.zig.CrossTarget.parse(.{ .arch_os_abi = triple }) catch { | ||
| 362 | try d.comp.diag.add(.{ .tag = .cli_invalid_target, .extra = .{ .str = arg } }, &.{}); | ||
| 363 | continue; | ||
| 364 | }; | ||
| 365 | d.comp.target = cross.toTarget(); // TODO deprecated | ||
| 366 | d.comp.langopts.setEmulatedCompiler(target_util.systemCompiler(d.comp.target)); | ||
| 367 | d.raw_target_triple = triple; | ||
| 368 | } else if (mem.eql(u8, arg, "--verbose-ast")) { | ||
| 369 | d.verbose_ast = true; | ||
| 370 | } else if (mem.eql(u8, arg, "--verbose-pp")) { | ||
| 371 | d.verbose_pp = true; | ||
| 372 | } else if (mem.eql(u8, arg, "--verbose-ir")) { | ||
| 373 | d.verbose_ir = true; | ||
| 374 | } else if (mem.eql(u8, arg, "--verbose-linker-args")) { | ||
| 375 | d.verbose_linker_args = true; | ||
| 376 | } else if (mem.eql(u8, arg, "-C") or mem.eql(u8, arg, "--comments")) { | ||
| 377 | d.comp.langopts.preserve_comments = true; | ||
| 378 | comment_arg = arg; | ||
| 379 | } else if (mem.eql(u8, arg, "-CC") or mem.eql(u8, arg, "--comments-in-macros")) { | ||
| 380 | d.comp.langopts.preserve_comments = true; | ||
| 381 | d.comp.langopts.preserve_comments_in_macros = true; | ||
| 382 | comment_arg = arg; | ||
| 383 | } else if (option(arg, "-fuse-ld=")) |linker_name| { | ||
| 384 | d.use_linker = linker_name; | ||
| 385 | } else if (mem.eql(u8, arg, "-fuse-ld=")) { | ||
| 386 | d.use_linker = null; | ||
| 387 | } else if (option(arg, "--ld-path=")) |linker_path| { | ||
| 388 | d.linker_path = linker_path; | ||
| 389 | } else if (mem.eql(u8, arg, "-r")) { | ||
| 390 | d.relocatable = true; | ||
| 391 | } else if (mem.eql(u8, arg, "-shared")) { | ||
| 392 | d.shared = true; | ||
| 393 | } else if (mem.eql(u8, arg, "-shared-libgcc")) { | ||
| 394 | d.shared_libgcc = true; | ||
| 395 | } else if (mem.eql(u8, arg, "-static")) { | ||
| 396 | d.static = true; | ||
| 397 | } else if (mem.eql(u8, arg, "-static-libgcc")) { | ||
| 398 | d.static_libgcc = true; | ||
| 399 | } else if (mem.eql(u8, arg, "-static-pie")) { | ||
| 400 | d.static_pie = true; | ||
| 401 | } else if (mem.eql(u8, arg, "-pie")) { | ||
| 402 | d.pie = true; | ||
| 403 | } else if (mem.eql(u8, arg, "-no-pie") or mem.eql(u8, arg, "-nopie")) { | ||
| 404 | d.pie = false; | ||
| 405 | } else if (mem.eql(u8, arg, "-rdynamic")) { | ||
| 406 | d.rdynamic = true; | ||
| 407 | } else if (mem.eql(u8, arg, "-s")) { | ||
| 408 | d.strip = true; | ||
| 409 | } else if (mem.eql(u8, arg, "-nodefaultlibs")) { | ||
| 410 | d.nodefaultlibs = true; | ||
| 411 | } else if (mem.eql(u8, arg, "-nolibc")) { | ||
| 412 | d.nolibc = true; | ||
| 413 | } else if (mem.eql(u8, arg, "-nostdlib")) { | ||
| 414 | d.nostdlib = true; | ||
| 415 | } else if (mem.eql(u8, arg, "-nostartfiles")) { | ||
| 416 | d.nostartfiles = true; | ||
| 417 | } else if (option(arg, "--unwindlib=")) |unwindlib| { | ||
| 418 | const valid_unwindlibs: [5][]const u8 = .{ "", "none", "platform", "libunwind", "libgcc" }; | ||
| 419 | for (valid_unwindlibs) |name| { | ||
| 420 | if (mem.eql(u8, name, unwindlib)) { | ||
| 421 | d.unwindlib = unwindlib; | ||
| 422 | break; | ||
| 423 | } | ||
| 424 | } else { | ||
| 425 | try d.comp.diag.add(.{ .tag = .invalid_unwindlib, .extra = .{ .str = unwindlib } }, &.{}); | ||
| 426 | } | ||
| 427 | } else { | ||
| 428 | try d.comp.diag.add(.{ .tag = .cli_unknown_arg, .extra = .{ .str = arg } }, &.{}); | ||
| 429 | } | ||
| 430 | } else if (std.mem.endsWith(u8, arg, ".o") or std.mem.endsWith(u8, arg, ".obj")) { | ||
| 431 | try d.link_objects.append(d.comp.gpa, arg); | ||
| 432 | } else { | ||
| 433 | const source = d.addSource(arg) catch |er| { | ||
| 434 | return d.fatal("unable to add source file '{s}': {s}", .{ arg, util.errorDescription(er) }); | ||
| 435 | }; | ||
| 436 | try d.inputs.append(d.comp.gpa, source); | ||
| 437 | } | ||
| 438 | } | ||
| 439 | d.comp.diag.color = switch (color_setting) { | ||
| 440 | .on => true, | ||
| 441 | .off => false, | ||
| 442 | .unset => util.fileSupportsColor(std.io.getStdErr()) and !std.process.hasEnvVarConstant("NO_COLOR"), | ||
| 443 | }; | ||
| 444 | if (d.comp.langopts.preserve_comments and !d.only_preprocess) { | ||
| 445 | return d.fatal("invalid argument '{s}' only allowed with '-E'", .{comment_arg}); | ||
| 446 | } | ||
| 447 | return false; | ||
| 448 | } | ||
| 449 | |||
| 450 | fn option(arg: []const u8, name: []const u8) ?[]const u8 { | ||
| 451 | if (std.mem.startsWith(u8, arg, name) and arg.len > name.len) { | ||
| 452 | return arg[name.len..]; | ||
| 453 | } | ||
| 454 | return null; | ||
| 455 | } | ||
| 456 | |||
| 457 | fn addSource(d: *Driver, path: []const u8) !Source { | ||
| 458 | if (mem.eql(u8, "-", path)) { | ||
| 459 | const stdin = std.io.getStdIn().reader(); | ||
| 460 | const input = try stdin.readAllAlloc(d.comp.gpa, std.math.maxInt(u32)); | ||
| 461 | defer d.comp.gpa.free(input); | ||
| 462 | return d.comp.addSourceFromBuffer("<stdin>", input); | ||
| 463 | } | ||
| 464 | return d.comp.addSourceFromPath(path); | ||
| 465 | } | ||
| 466 | |||
| 467 | pub fn err(d: *Driver, msg: []const u8) !void { | ||
| 468 | try d.comp.diag.add(.{ .tag = .cli_error, .extra = .{ .str = msg } }, &.{}); | ||
| 469 | } | ||
| 470 | |||
| 471 | pub fn fatal(d: *Driver, comptime fmt: []const u8, args: anytype) error{FatalError} { | ||
| 472 | d.comp.renderErrors(); | ||
| 473 | return d.comp.diag.fatalNoSrc(fmt, args); | ||
| 474 | } | ||
| 475 | |||
| 476 | pub fn main(d: *Driver, tc: *Toolchain, args: []const []const u8) !void { | ||
| 477 | var macro_buf = std.ArrayList(u8).init(d.comp.gpa); | ||
| 478 | defer macro_buf.deinit(); | ||
| 479 | |||
| 480 | const std_out = std.io.getStdOut().writer(); | ||
| 481 | if (try parseArgs(d, std_out, macro_buf.writer(), args)) return; | ||
| 482 | |||
| 483 | const linking = !(d.only_preprocess or d.only_syntax or d.only_compile or d.only_preprocess_and_compile); | ||
| 484 | |||
| 485 | if (d.inputs.items.len == 0) { | ||
| 486 | return d.fatal("no input files", .{}); | ||
| 487 | } else if (d.inputs.items.len != 1 and d.output_name != null and !linking) { | ||
| 488 | return d.fatal("cannot specify -o when generating multiple output files", .{}); | ||
| 489 | } | ||
| 490 | |||
| 491 | if (!linking) for (d.link_objects.items) |obj| { | ||
| 492 | try d.comp.diag.add(.{ .tag = .cli_unused_link_object, .extra = .{ .str = obj } }, &.{}); | ||
| 493 | }; | ||
| 494 | |||
| 495 | d.comp.defineSystemIncludes(d.aro_name) catch |er| switch (er) { | ||
| 496 | error.OutOfMemory => return error.OutOfMemory, | ||
| 497 | error.AroIncludeNotFound => return d.fatal("unable to find Aro builtin headers", .{}), | ||
| 498 | }; | ||
| 499 | |||
| 500 | const builtin = try d.comp.generateBuiltinMacros(); | ||
| 501 | const user_macros = try d.comp.addSourceFromBuffer("<command line>", macro_buf.items); | ||
| 502 | |||
| 503 | const fast_exit = @import("builtin").mode != .Debug; | ||
| 504 | |||
| 505 | if (fast_exit and d.inputs.items.len == 1) { | ||
| 506 | d.processSource(tc, d.inputs.items[0], builtin, user_macros, fast_exit) catch |e| switch (e) { | ||
| 507 | error.FatalError => { | ||
| 508 | d.comp.renderErrors(); | ||
| 509 | d.exitWithCleanup(1); | ||
| 510 | }, | ||
| 511 | else => |er| return er, | ||
| 512 | }; | ||
| 513 | unreachable; | ||
| 514 | } | ||
| 515 | |||
| 516 | for (d.inputs.items) |source| { | ||
| 517 | d.processSource(tc, source, builtin, user_macros, fast_exit) catch |e| switch (e) { | ||
| 518 | error.FatalError => { | ||
| 519 | d.comp.renderErrors(); | ||
| 520 | }, | ||
| 521 | else => |er| return er, | ||
| 522 | }; | ||
| 523 | } | ||
| 524 | if (d.comp.diag.errors != 0) { | ||
| 525 | if (fast_exit) d.exitWithCleanup(1); | ||
| 526 | return; | ||
| 527 | } | ||
| 528 | if (linking) { | ||
| 529 | try d.invokeLinker(tc, fast_exit); | ||
| 530 | } | ||
| 531 | if (fast_exit) std.process.exit(0); | ||
| 532 | } | ||
| 533 | |||
| 534 | fn processSource( | ||
| 535 | d: *Driver, | ||
| 536 | tc: *Toolchain, | ||
| 537 | source: Source, | ||
| 538 | builtin: Source, | ||
| 539 | user_macros: Source, | ||
| 540 | comptime fast_exit: bool, | ||
| 541 | ) !void { | ||
| 542 | d.comp.generated_buf.items.len = 0; | ||
| 543 | var pp = Preprocessor.init(d.comp); | ||
| 544 | defer pp.deinit(); | ||
| 545 | |||
| 546 | if (d.comp.langopts.ms_extensions) { | ||
| 547 | d.comp.ms_cwd_source_id = source.id; | ||
| 548 | } | ||
| 549 | |||
| 550 | if (d.verbose_pp) pp.verbose = true; | ||
| 551 | if (d.only_preprocess) { | ||
| 552 | pp.preserve_whitespace = true; | ||
| 553 | if (d.line_commands) { | ||
| 554 | pp.linemarkers = if (d.use_line_directives) .line_directives else .numeric_directives; | ||
| 555 | } | ||
| 556 | } | ||
| 557 | try pp.addBuiltinMacros(); | ||
| 558 | |||
| 559 | try pp.addIncludeStart(source); | ||
| 560 | try pp.addIncludeStart(builtin); | ||
| 561 | _ = try pp.preprocess(builtin); | ||
| 562 | try pp.addIncludeStart(user_macros); | ||
| 563 | _ = try pp.preprocess(user_macros); | ||
| 564 | try pp.addIncludeResume(source.id, 0, 0); | ||
| 565 | const eof = try pp.preprocess(source); | ||
| 566 | try pp.tokens.append(pp.comp.gpa, eof); | ||
| 567 | |||
| 568 | if (d.only_preprocess) { | ||
| 569 | d.comp.renderErrors(); | ||
| 570 | |||
| 571 | const file = if (d.output_name) |some| | ||
| 572 | std.fs.cwd().createFile(some, .{}) catch |er| | ||
| 573 | return d.fatal("unable to create output file '{s}': {s}", .{ some, util.errorDescription(er) }) | ||
| 574 | else | ||
| 575 | std.io.getStdOut(); | ||
| 576 | defer if (d.output_name != null) file.close(); | ||
| 577 | |||
| 578 | var buf_w = std.io.bufferedWriter(file.writer()); | ||
| 579 | pp.prettyPrintTokens(buf_w.writer()) catch |er| | ||
| 580 | return d.fatal("unable to write result: {s}", .{util.errorDescription(er)}); | ||
| 581 | |||
| 582 | buf_w.flush() catch |er| | ||
| 583 | return d.fatal("unable to write result: {s}", .{util.errorDescription(er)}); | ||
| 584 | if (fast_exit) std.process.exit(0); // Not linking, no need for cleanup. | ||
| 585 | return; | ||
| 586 | } | ||
| 587 | |||
| 588 | var tree = try Parser.parse(&pp); | ||
| 589 | defer tree.deinit(); | ||
| 590 | |||
| 591 | if (d.verbose_ast) { | ||
| 592 | const stdout = std.io.getStdOut(); | ||
| 593 | var buf_writer = std.io.bufferedWriter(stdout.writer()); | ||
| 594 | const color = d.comp.diag.color and util.fileSupportsColor(stdout); | ||
| 595 | tree.dump(color, buf_writer.writer()) catch {}; | ||
| 596 | buf_writer.flush() catch {}; | ||
| 597 | } | ||
| 598 | |||
| 599 | const prev_errors = d.comp.diag.errors; | ||
| 600 | d.comp.renderErrors(); | ||
| 601 | |||
| 602 | if (d.comp.diag.errors != prev_errors) { | ||
| 603 | if (fast_exit) d.exitWithCleanup(1); | ||
| 604 | return; // do not compile if there were errors | ||
| 605 | } | ||
| 606 | |||
| 607 | if (d.only_syntax) { | ||
| 608 | if (fast_exit) std.process.exit(0); // Not linking, no need for cleanup. | ||
| 609 | return; | ||
| 610 | } | ||
| 611 | |||
| 612 | if (d.comp.target.ofmt != .elf or d.comp.target.cpu.arch != .x86_64) { | ||
| 613 | return d.fatal( | ||
| 614 | "unsupported target {s}-{s}-{s}, currently only x86-64 elf is supported", | ||
| 615 | .{ @tagName(d.comp.target.cpu.arch), @tagName(d.comp.target.os.tag), @tagName(d.comp.target.abi) }, | ||
| 616 | ); | ||
| 617 | } | ||
| 618 | |||
| 619 | if (d.verbose_ir) { | ||
| 620 | try @import("CodeGen.zig").generateTree(d.comp, tree); | ||
| 621 | } | ||
| 622 | |||
| 623 | const obj = try Codegen.generateTree(d.comp, tree); | ||
| 624 | defer obj.deinit(); | ||
| 625 | |||
| 626 | // If it's used, name_buf will either hold a filename or `/tmp/<12 random bytes with base-64 encoding>.<extension>` | ||
| 627 | // both of which should fit into MAX_NAME_BYTES for all systems | ||
| 628 | var name_buf: [std.fs.MAX_NAME_BYTES]u8 = undefined; | ||
| 629 | |||
| 630 | const out_file_name = if (d.only_compile) blk: { | ||
| 631 | const fmt_template = "{s}{s}"; | ||
| 632 | const fmt_args = .{ | ||
| 633 | std.fs.path.stem(source.path), | ||
| 634 | d.comp.target.ofmt.fileExt(d.comp.target.cpu.arch), | ||
| 635 | }; | ||
| 636 | break :blk d.output_name orelse | ||
| 637 | std.fmt.bufPrint(&name_buf, fmt_template, fmt_args) catch return d.fatal("Filename too long for filesystem: " ++ fmt_template, fmt_args); | ||
| 638 | } else blk: { | ||
| 639 | const random_bytes_count = 12; | ||
| 640 | const sub_path_len = comptime std.fs.base64_encoder.calcSize(random_bytes_count); | ||
| 641 | |||
| 642 | var random_bytes: [random_bytes_count]u8 = undefined; | ||
| 643 | std.crypto.random.bytes(&random_bytes); | ||
| 644 | var random_name: [sub_path_len]u8 = undefined; | ||
| 645 | _ = std.fs.base64_encoder.encode(&random_name, &random_bytes); | ||
| 646 | |||
| 647 | const fmt_template = "/tmp/{s}{s}"; | ||
| 648 | const fmt_args = .{ | ||
| 649 | random_name, | ||
| 650 | d.comp.target.ofmt.fileExt(d.comp.target.cpu.arch), | ||
| 651 | }; | ||
| 652 | break :blk std.fmt.bufPrint(&name_buf, fmt_template, fmt_args) catch return d.fatal("Filename too long for filesystem: " ++ fmt_template, fmt_args); | ||
| 653 | }; | ||
| 654 | |||
| 655 | const out_file = std.fs.cwd().createFile(out_file_name, .{}) catch |er| | ||
| 656 | return d.fatal("unable to create output file '{s}': {s}", .{ out_file_name, util.errorDescription(er) }); | ||
| 657 | defer out_file.close(); | ||
| 658 | |||
| 659 | obj.finish(out_file) catch |er| | ||
| 660 | return d.fatal("could not output to object file '{s}': {s}", .{ out_file_name, util.errorDescription(er) }); | ||
| 661 | |||
| 662 | if (d.only_compile) { | ||
| 663 | if (fast_exit) std.process.exit(0); // Not linking, no need for cleanup. | ||
| 664 | return; | ||
| 665 | } | ||
| 666 | try d.link_objects.ensureUnusedCapacity(d.comp.gpa, 1); | ||
| 667 | d.link_objects.appendAssumeCapacity(try d.comp.gpa.dupe(u8, out_file_name)); | ||
| 668 | d.temp_file_count += 1; | ||
| 669 | if (fast_exit) { | ||
| 670 | try d.invokeLinker(tc, fast_exit); | ||
| 671 | } | ||
| 672 | } | ||
| 673 | |||
| 674 | fn dumpLinkerArgs(items: []const []const u8) !void { | ||
| 675 | const stdout = std.io.getStdOut().writer(); | ||
| 676 | for (items, 0..) |item, i| { | ||
| 677 | if (i > 0) try stdout.writeByte(' '); | ||
| 678 | try stdout.print("\"{}\"", .{std.zig.fmtEscapes(item)}); | ||
| 679 | } | ||
| 680 | try stdout.writeByte('\n'); | ||
| 681 | } | ||
| 682 | |||
| 683 | pub fn invokeLinker(d: *Driver, tc: *Toolchain, comptime fast_exit: bool) !void { | ||
| 684 | try tc.discover(); | ||
| 685 | |||
| 686 | var argv = std.ArrayList([]const u8).init(d.comp.gpa); | ||
| 687 | defer argv.deinit(); | ||
| 688 | |||
| 689 | var linker_path_buf: [std.fs.MAX_PATH_BYTES]u8 = undefined; | ||
| 690 | const linker_path = try tc.getLinkerPath(&linker_path_buf); | ||
| 691 | try argv.append(linker_path); | ||
| 692 | |||
| 693 | try tc.buildLinkerArgs(&argv); | ||
| 694 | |||
| 695 | if (d.verbose_linker_args) { | ||
| 696 | dumpLinkerArgs(argv.items) catch |er| { | ||
| 697 | return d.fatal("unable to dump linker args: {s}", .{util.errorDescription(er)}); | ||
| 698 | }; | ||
| 699 | } | ||
| 700 | var child = std.ChildProcess.init(argv.items, d.comp.gpa); | ||
| 701 | // TODO handle better | ||
| 702 | child.stdin_behavior = .Inherit; | ||
| 703 | child.stdout_behavior = .Inherit; | ||
| 704 | child.stderr_behavior = .Inherit; | ||
| 705 | |||
| 706 | const term = child.spawnAndWait() catch |er| { | ||
| 707 | return d.fatal("unable to spawn linker: {s}", .{util.errorDescription(er)}); | ||
| 708 | }; | ||
| 709 | switch (term) { | ||
| 710 | .Exited => |code| if (code != 0) d.exitWithCleanup(code), | ||
| 711 | else => std.process.abort(), | ||
| 712 | } | ||
| 713 | if (fast_exit) d.exitWithCleanup(0); | ||
| 714 | } | ||
| 715 | |||
| 716 | fn exitWithCleanup(d: *Driver, code: u8) noreturn { | ||
| 717 | for (d.link_objects.items[d.link_objects.items.len - d.temp_file_count ..]) |obj| { | ||
| 718 | std.fs.deleteFileAbsolute(obj) catch {}; | ||
| 719 | } | ||
| 720 | std.process.exit(code); | ||
| 721 | } | ||
deps/aro/Driver/Distro.zig deleted-329| ... | @@ -1,329 +0,0 @@ | ||
| 1 | //! Tools for figuring out what Linux distro we're running on | ||
| 2 | |||
| 3 | const std = @import("std"); | ||
| 4 | const mem = std.mem; | ||
| 5 | const util = @import("../util.zig"); | ||
| 6 | const Filesystem = @import("Filesystem.zig").Filesystem; | ||
| 7 | |||
| 8 | const MAX_BYTES = 1024; // TODO: Can we assume 1024 bytes enough for the info we need? | ||
| 9 | |||
| 10 | /// Value for linker `--hash-style=` argument | ||
| 11 | pub const HashStyle = enum { | ||
| 12 | both, | ||
| 13 | gnu, | ||
| 14 | }; | ||
| 15 | |||
| 16 | pub const Tag = enum { | ||
| 17 | alpine, | ||
| 18 | arch, | ||
| 19 | debian_lenny, | ||
| 20 | debian_squeeze, | ||
| 21 | debian_wheezy, | ||
| 22 | debian_jessie, | ||
| 23 | debian_stretch, | ||
| 24 | debian_buster, | ||
| 25 | debian_bullseye, | ||
| 26 | debian_bookworm, | ||
| 27 | debian_trixie, | ||
| 28 | exherbo, | ||
| 29 | rhel5, | ||
| 30 | rhel6, | ||
| 31 | rhel7, | ||
| 32 | fedora, | ||
| 33 | gentoo, | ||
| 34 | open_suse, | ||
| 35 | ubuntu_hardy, | ||
| 36 | ubuntu_intrepid, | ||
| 37 | ubuntu_jaunty, | ||
| 38 | ubuntu_karmic, | ||
| 39 | ubuntu_lucid, | ||
| 40 | ubuntu_maverick, | ||
| 41 | ubuntu_natty, | ||
| 42 | ubuntu_oneiric, | ||
| 43 | ubuntu_precise, | ||
| 44 | ubuntu_quantal, | ||
| 45 | ubuntu_raring, | ||
| 46 | ubuntu_saucy, | ||
| 47 | ubuntu_trusty, | ||
| 48 | ubuntu_utopic, | ||
| 49 | ubuntu_vivid, | ||
| 50 | ubuntu_wily, | ||
| 51 | ubuntu_xenial, | ||
| 52 | ubuntu_yakkety, | ||
| 53 | ubuntu_zesty, | ||
| 54 | ubuntu_artful, | ||
| 55 | ubuntu_bionic, | ||
| 56 | ubuntu_cosmic, | ||
| 57 | ubuntu_disco, | ||
| 58 | ubuntu_eoan, | ||
| 59 | ubuntu_focal, | ||
| 60 | ubuntu_groovy, | ||
| 61 | ubuntu_hirsute, | ||
| 62 | ubuntu_impish, | ||
| 63 | ubuntu_jammy, | ||
| 64 | ubuntu_kinetic, | ||
| 65 | ubuntu_lunar, | ||
| 66 | unknown, | ||
| 67 | |||
| 68 | pub fn getHashStyle(self: Tag) HashStyle { | ||
| 69 | if (self.isOpenSUSE()) return .both; | ||
| 70 | return switch (self) { | ||
| 71 | .ubuntu_lucid, | ||
| 72 | .ubuntu_jaunty, | ||
| 73 | .ubuntu_karmic, | ||
| 74 | => .both, | ||
| 75 | else => .gnu, | ||
| 76 | }; | ||
| 77 | } | ||
| 78 | |||
| 79 | pub fn isRedhat(self: Tag) bool { | ||
| 80 | return switch (self) { | ||
| 81 | .fedora, | ||
| 82 | .rhel5, | ||
| 83 | .rhel6, | ||
| 84 | .rhel7, | ||
| 85 | => true, | ||
| 86 | else => false, | ||
| 87 | }; | ||
| 88 | } | ||
| 89 | |||
| 90 | pub fn isOpenSUSE(self: Tag) bool { | ||
| 91 | return self == .open_suse; | ||
| 92 | } | ||
| 93 | |||
| 94 | pub fn isDebian(self: Tag) bool { | ||
| 95 | return switch (self) { | ||
| 96 | .debian_lenny, | ||
| 97 | .debian_squeeze, | ||
| 98 | .debian_wheezy, | ||
| 99 | .debian_jessie, | ||
| 100 | .debian_stretch, | ||
| 101 | .debian_buster, | ||
| 102 | .debian_bullseye, | ||
| 103 | .debian_bookworm, | ||
| 104 | .debian_trixie, | ||
| 105 | => true, | ||
| 106 | else => false, | ||
| 107 | }; | ||
| 108 | } | ||
| 109 | pub fn isUbuntu(self: Tag) bool { | ||
| 110 | return switch (self) { | ||
| 111 | .ubuntu_hardy, | ||
| 112 | .ubuntu_intrepid, | ||
| 113 | .ubuntu_jaunty, | ||
| 114 | .ubuntu_karmic, | ||
| 115 | .ubuntu_lucid, | ||
| 116 | .ubuntu_maverick, | ||
| 117 | .ubuntu_natty, | ||
| 118 | .ubuntu_oneiric, | ||
| 119 | .ubuntu_precise, | ||
| 120 | .ubuntu_quantal, | ||
| 121 | .ubuntu_raring, | ||
| 122 | .ubuntu_saucy, | ||
| 123 | .ubuntu_trusty, | ||
| 124 | .ubuntu_utopic, | ||
| 125 | .ubuntu_vivid, | ||
| 126 | .ubuntu_wily, | ||
| 127 | .ubuntu_xenial, | ||
| 128 | .ubuntu_yakkety, | ||
| 129 | .ubuntu_zesty, | ||
| 130 | .ubuntu_artful, | ||
| 131 | .ubuntu_bionic, | ||
| 132 | .ubuntu_cosmic, | ||
| 133 | .ubuntu_disco, | ||
| 134 | .ubuntu_eoan, | ||
| 135 | .ubuntu_focal, | ||
| 136 | .ubuntu_groovy, | ||
| 137 | .ubuntu_hirsute, | ||
| 138 | .ubuntu_impish, | ||
| 139 | .ubuntu_jammy, | ||
| 140 | .ubuntu_kinetic, | ||
| 141 | .ubuntu_lunar, | ||
| 142 | => true, | ||
| 143 | |||
| 144 | else => false, | ||
| 145 | }; | ||
| 146 | } | ||
| 147 | pub fn isAlpine(self: Tag) bool { | ||
| 148 | return self == .alpine; | ||
| 149 | } | ||
| 150 | pub fn isGentoo(self: Tag) bool { | ||
| 151 | return self == .gentoo; | ||
| 152 | } | ||
| 153 | }; | ||
| 154 | |||
| 155 | fn scanForOsRelease(buf: []const u8) ?Tag { | ||
| 156 | var it = mem.splitScalar(u8, buf, '\n'); | ||
| 157 | while (it.next()) |line| { | ||
| 158 | if (mem.startsWith(u8, line, "ID=")) { | ||
| 159 | const rest = line["ID=".len..]; | ||
| 160 | if (mem.eql(u8, rest, "alpine")) return .alpine; | ||
| 161 | if (mem.eql(u8, rest, "fedora")) return .fedora; | ||
| 162 | if (mem.eql(u8, rest, "gentoo")) return .gentoo; | ||
| 163 | if (mem.eql(u8, rest, "arch")) return .arch; | ||
| 164 | if (mem.eql(u8, rest, "sles")) return .open_suse; | ||
| 165 | if (mem.eql(u8, rest, "opensuse")) return .open_suse; | ||
| 166 | if (mem.eql(u8, rest, "exherbo")) return .exherbo; | ||
| 167 | } | ||
| 168 | } | ||
| 169 | return null; | ||
| 170 | } | ||
| 171 | |||
| 172 | fn detectOsRelease(fs: Filesystem) ?Tag { | ||
| 173 | var buf: [MAX_BYTES]u8 = undefined; | ||
| 174 | const data = fs.readFile("/etc/os-release", &buf) orelse fs.readFile("/usr/lib/os-release", &buf) orelse return null; | ||
| 175 | return scanForOsRelease(data); | ||
| 176 | } | ||
| 177 | |||
| 178 | fn scanForLSBRelease(buf: []const u8) ?Tag { | ||
| 179 | var it = mem.splitScalar(u8, buf, '\n'); | ||
| 180 | while (it.next()) |line| { | ||
| 181 | if (mem.startsWith(u8, line, "DISTRIB_CODENAME=")) { | ||
| 182 | const rest = line["DISTRIB_CODENAME=".len..]; | ||
| 183 | if (mem.eql(u8, rest, "hardy")) return .ubuntu_hardy; | ||
| 184 | if (mem.eql(u8, rest, "intrepid")) return .ubuntu_intrepid; | ||
| 185 | if (mem.eql(u8, rest, "jaunty")) return .ubuntu_jaunty; | ||
| 186 | if (mem.eql(u8, rest, "karmic")) return .ubuntu_karmic; | ||
| 187 | if (mem.eql(u8, rest, "lucid")) return .ubuntu_lucid; | ||
| 188 | if (mem.eql(u8, rest, "maverick")) return .ubuntu_maverick; | ||
| 189 | if (mem.eql(u8, rest, "natty")) return .ubuntu_natty; | ||
| 190 | if (mem.eql(u8, rest, "oneiric")) return .ubuntu_oneiric; | ||
| 191 | if (mem.eql(u8, rest, "precise")) return .ubuntu_precise; | ||
| 192 | if (mem.eql(u8, rest, "quantal")) return .ubuntu_quantal; | ||
| 193 | if (mem.eql(u8, rest, "raring")) return .ubuntu_raring; | ||
| 194 | if (mem.eql(u8, rest, "saucy")) return .ubuntu_saucy; | ||
| 195 | if (mem.eql(u8, rest, "trusty")) return .ubuntu_trusty; | ||
| 196 | if (mem.eql(u8, rest, "utopic")) return .ubuntu_utopic; | ||
| 197 | if (mem.eql(u8, rest, "vivid")) return .ubuntu_vivid; | ||
| 198 | if (mem.eql(u8, rest, "wily")) return .ubuntu_wily; | ||
| 199 | if (mem.eql(u8, rest, "xenial")) return .ubuntu_xenial; | ||
| 200 | if (mem.eql(u8, rest, "yakkety")) return .ubuntu_yakkety; | ||
| 201 | if (mem.eql(u8, rest, "zesty")) return .ubuntu_zesty; | ||
| 202 | if (mem.eql(u8, rest, "artful")) return .ubuntu_artful; | ||
| 203 | if (mem.eql(u8, rest, "bionic")) return .ubuntu_bionic; | ||
| 204 | if (mem.eql(u8, rest, "cosmic")) return .ubuntu_cosmic; | ||
| 205 | if (mem.eql(u8, rest, "disco")) return .ubuntu_disco; | ||
| 206 | if (mem.eql(u8, rest, "eoan")) return .ubuntu_eoan; | ||
| 207 | if (mem.eql(u8, rest, "focal")) return .ubuntu_focal; | ||
| 208 | if (mem.eql(u8, rest, "groovy")) return .ubuntu_groovy; | ||
| 209 | if (mem.eql(u8, rest, "hirsute")) return .ubuntu_hirsute; | ||
| 210 | if (mem.eql(u8, rest, "impish")) return .ubuntu_impish; | ||
| 211 | if (mem.eql(u8, rest, "jammy")) return .ubuntu_jammy; | ||
| 212 | if (mem.eql(u8, rest, "kinetic")) return .ubuntu_kinetic; | ||
| 213 | if (mem.eql(u8, rest, "lunar")) return .ubuntu_lunar; | ||
| 214 | } | ||
| 215 | } | ||
| 216 | return null; | ||
| 217 | } | ||
| 218 | |||
| 219 | fn detectLSBRelease(fs: Filesystem) ?Tag { | ||
| 220 | var buf: [MAX_BYTES]u8 = undefined; | ||
| 221 | const data = fs.readFile("/etc/lsb-release", &buf) orelse return null; | ||
| 222 | |||
| 223 | return scanForLSBRelease(data); | ||
| 224 | } | ||
| 225 | |||
| 226 | fn scanForRedHat(buf: []const u8) Tag { | ||
| 227 | if (mem.startsWith(u8, buf, "Fedora release")) return .fedora; | ||
| 228 | if (mem.startsWith(u8, buf, "Red Hat Enterprise Linux") or mem.startsWith(u8, buf, "CentOS") or mem.startsWith(u8, buf, "Scientific Linux")) { | ||
| 229 | if (mem.indexOfPos(u8, buf, 0, "release 7") != null) return .rhel7; | ||
| 230 | if (mem.indexOfPos(u8, buf, 0, "release 6") != null) return .rhel6; | ||
| 231 | if (mem.indexOfPos(u8, buf, 0, "release 5") != null) return .rhel5; | ||
| 232 | } | ||
| 233 | |||
| 234 | return .unknown; | ||
| 235 | } | ||
| 236 | |||
| 237 | fn detectRedhat(fs: Filesystem) ?Tag { | ||
| 238 | var buf: [MAX_BYTES]u8 = undefined; | ||
| 239 | const data = fs.readFile("/etc/redhat-release", &buf) orelse return null; | ||
| 240 | return scanForRedHat(data); | ||
| 241 | } | ||
| 242 | |||
| 243 | fn scanForDebian(buf: []const u8) Tag { | ||
| 244 | var it = mem.splitScalar(u8, buf, '.'); | ||
| 245 | if (std.fmt.parseInt(u8, it.next().?, 10)) |major| { | ||
| 246 | return switch (major) { | ||
| 247 | 5 => .debian_lenny, | ||
| 248 | 6 => .debian_squeeze, | ||
| 249 | 7 => .debian_wheezy, | ||
| 250 | 8 => .debian_jessie, | ||
| 251 | 9 => .debian_stretch, | ||
| 252 | 10 => .debian_buster, | ||
| 253 | 11 => .debian_bullseye, | ||
| 254 | 12 => .debian_bookworm, | ||
| 255 | 13 => .debian_trixie, | ||
| 256 | else => .unknown, | ||
| 257 | }; | ||
| 258 | } else |_| {} | ||
| 259 | |||
| 260 | it = mem.splitScalar(u8, buf, '\n'); | ||
| 261 | const name = it.next().?; | ||
| 262 | if (mem.eql(u8, name, "squeeze/sid")) return .debian_squeeze; | ||
| 263 | if (mem.eql(u8, name, "wheezy/sid")) return .debian_wheezy; | ||
| 264 | if (mem.eql(u8, name, "jessie/sid")) return .debian_jessie; | ||
| 265 | if (mem.eql(u8, name, "stretch/sid")) return .debian_stretch; | ||
| 266 | if (mem.eql(u8, name, "buster/sid")) return .debian_buster; | ||
| 267 | if (mem.eql(u8, name, "bullseye/sid")) return .debian_bullseye; | ||
| 268 | if (mem.eql(u8, name, "bookworm/sid")) return .debian_bookworm; | ||
| 269 | |||
| 270 | return .unknown; | ||
| 271 | } | ||
| 272 | |||
| 273 | fn detectDebian(fs: Filesystem) ?Tag { | ||
| 274 | var buf: [MAX_BYTES]u8 = undefined; | ||
| 275 | const data = fs.readFile("/etc/debian_version", &buf) orelse return null; | ||
| 276 | return scanForDebian(data); | ||
| 277 | } | ||
| 278 | |||
| 279 | pub fn detect(target: std.Target, fs: Filesystem) Tag { | ||
| 280 | if (target.os.tag != .linux) return .unknown; | ||
| 281 | |||
| 282 | if (detectOsRelease(fs)) |tag| return tag; | ||
| 283 | if (detectLSBRelease(fs)) |tag| return tag; | ||
| 284 | if (detectRedhat(fs)) |tag| return tag; | ||
| 285 | if (detectDebian(fs)) |tag| return tag; | ||
| 286 | |||
| 287 | if (fs.exists("/etc/gentoo-release")) return .gentoo; | ||
| 288 | |||
| 289 | return .unknown; | ||
| 290 | } | ||
| 291 | |||
| 292 | test scanForDebian { | ||
| 293 | try std.testing.expectEqual(Tag.debian_squeeze, scanForDebian("squeeze/sid")); | ||
| 294 | try std.testing.expectEqual(Tag.debian_bullseye, scanForDebian("11.1.2")); | ||
| 295 | try std.testing.expectEqual(Tag.unknown, scanForDebian("None")); | ||
| 296 | try std.testing.expectEqual(Tag.unknown, scanForDebian("")); | ||
| 297 | } | ||
| 298 | |||
| 299 | test scanForRedHat { | ||
| 300 | try std.testing.expectEqual(Tag.fedora, scanForRedHat("Fedora release 7")); | ||
| 301 | try std.testing.expectEqual(Tag.rhel7, scanForRedHat("Red Hat Enterprise Linux release 7")); | ||
| 302 | try std.testing.expectEqual(Tag.rhel5, scanForRedHat("CentOS release 5")); | ||
| 303 | try std.testing.expectEqual(Tag.unknown, scanForRedHat("CentOS release 4")); | ||
| 304 | try std.testing.expectEqual(Tag.unknown, scanForRedHat("")); | ||
| 305 | } | ||
| 306 | |||
| 307 | test scanForLSBRelease { | ||
| 308 | const text = | ||
| 309 | \\DISTRIB_ID=Ubuntu | ||
| 310 | \\DISTRIB_RELEASE=20.04 | ||
| 311 | \\DISTRIB_CODENAME=focal | ||
| 312 | \\DISTRIB_DESCRIPTION="Ubuntu 20.04.6 LTS" | ||
| 313 | \\ | ||
| 314 | ; | ||
| 315 | try std.testing.expectEqual(Tag.ubuntu_focal, scanForLSBRelease(text).?); | ||
| 316 | } | ||
| 317 | |||
| 318 | test scanForOsRelease { | ||
| 319 | const text = | ||
| 320 | \\NAME="Alpine Linux" | ||
| 321 | \\ID=alpine | ||
| 322 | \\VERSION_ID=3.18.2 | ||
| 323 | \\PRETTY_NAME="Alpine Linux v3.18" | ||
| 324 | \\HOME_URL="https://alpinelinux.org/" | ||
| 325 | \\BUG_REPORT_URL="https://gitlab.alpinelinux.org/alpine/aports/-/issues" | ||
| 326 | \\ | ||
| 327 | ; | ||
| 328 | try std.testing.expectEqual(Tag.alpine, scanForOsRelease(text).?); | ||
| 329 | } | ||
deps/aro/Driver/Filesystem.zig deleted-242| ... | @@ -1,242 +0,0 @@ | ||
| 1 | const std = @import("std"); | ||
| 2 | const mem = std.mem; | ||
| 3 | const builtin = @import("builtin"); | ||
| 4 | const system_defaults = @import("system_defaults"); | ||
| 5 | const is_windows = builtin.os.tag == .windows; | ||
| 6 | |||
| 7 | fn readFileFake(entries: []const Filesystem.Entry, path: []const u8, buf: []u8) ?[]const u8 { | ||
| 8 | @setCold(true); | ||
| 9 | for (entries) |entry| { | ||
| 10 | if (mem.eql(u8, entry.path, path)) { | ||
| 11 | const len = @min(entry.contents.len, buf.len); | ||
| 12 | @memcpy(buf[0..len], entry.contents[0..len]); | ||
| 13 | return buf[0..len]; | ||
| 14 | } | ||
| 15 | } | ||
| 16 | return null; | ||
| 17 | } | ||
| 18 | |||
| 19 | fn findProgramByNameFake(entries: []const Filesystem.Entry, name: []const u8, path: ?[]const u8, buf: []u8) ?[]const u8 { | ||
| 20 | @setCold(true); | ||
| 21 | if (mem.indexOfScalar(u8, name, '/') != null) { | ||
| 22 | @memcpy(buf[0..name.len], name); | ||
| 23 | return buf[0..name.len]; | ||
| 24 | } | ||
| 25 | const path_env = path orelse return null; | ||
| 26 | var fib = std.heap.FixedBufferAllocator.init(buf); | ||
| 27 | |||
| 28 | var it = mem.tokenizeScalar(u8, path_env, system_defaults.path_sep); | ||
| 29 | while (it.next()) |path_dir| { | ||
| 30 | defer fib.reset(); | ||
| 31 | const full_path = std.fs.path.join(fib.allocator(), &.{ path_dir, name }) catch continue; | ||
| 32 | if (canExecuteFake(entries, full_path)) return full_path; | ||
| 33 | } | ||
| 34 | |||
| 35 | return null; | ||
| 36 | } | ||
| 37 | |||
| 38 | fn canExecuteFake(entries: []const Filesystem.Entry, path: []const u8) bool { | ||
| 39 | @setCold(true); | ||
| 40 | for (entries) |entry| { | ||
| 41 | if (mem.eql(u8, entry.path, path)) { | ||
| 42 | return entry.executable; | ||
| 43 | } | ||
| 44 | } | ||
| 45 | return false; | ||
| 46 | } | ||
| 47 | |||
| 48 | fn existsFake(entries: []const Filesystem.Entry, path: []const u8) bool { | ||
| 49 | @setCold(true); | ||
| 50 | var buf: [std.fs.MAX_PATH_BYTES]u8 = undefined; | ||
| 51 | var fib = std.heap.FixedBufferAllocator.init(&buf); | ||
| 52 | const resolved = std.fs.path.resolvePosix(fib.allocator(), &.{path}) catch return false; | ||
| 53 | for (entries) |entry| { | ||
| 54 | if (mem.eql(u8, entry.path, resolved)) return true; | ||
| 55 | } | ||
| 56 | return false; | ||
| 57 | } | ||
| 58 | |||
| 59 | fn canExecutePosix(path: []const u8) bool { | ||
| 60 | std.os.access(path, std.os.X_OK) catch return false; | ||
| 61 | // Todo: ensure path is not a directory | ||
| 62 | return true; | ||
| 63 | } | ||
| 64 | |||
| 65 | /// TODO | ||
| 66 | fn canExecuteWindows(path: []const u8) bool { | ||
| 67 | _ = path; | ||
| 68 | return true; | ||
| 69 | } | ||
| 70 | |||
| 71 | /// TODO | ||
| 72 | fn findProgramByNameWindows(allocator: std.mem.Allocator, name: []const u8, path: ?[]const u8, buf: []u8) ?[]const u8 { | ||
| 73 | _ = path; | ||
| 74 | _ = buf; | ||
| 75 | _ = name; | ||
| 76 | _ = allocator; | ||
| 77 | return null; | ||
| 78 | } | ||
| 79 | |||
| 80 | /// TODO: does WASI need special handling? | ||
| 81 | fn findProgramByNamePosix(name: []const u8, path: ?[]const u8, buf: []u8) ?[]const u8 { | ||
| 82 | if (mem.indexOfScalar(u8, name, '/') != null) { | ||
| 83 | @memcpy(buf[0..name.len], name); | ||
| 84 | return buf[0..name.len]; | ||
| 85 | } | ||
| 86 | const path_env = path orelse return null; | ||
| 87 | var fib = std.heap.FixedBufferAllocator.init(buf); | ||
| 88 | |||
| 89 | var it = mem.tokenizeScalar(u8, path_env, system_defaults.path_sep); | ||
| 90 | while (it.next()) |path_dir| { | ||
| 91 | defer fib.reset(); | ||
| 92 | const full_path = std.fs.path.join(fib.allocator(), &.{ path_dir, name }) catch continue; | ||
| 93 | if (canExecutePosix(full_path)) return full_path; | ||
| 94 | } | ||
| 95 | |||
| 96 | return null; | ||
| 97 | } | ||
| 98 | |||
| 99 | pub const Filesystem = union(enum) { | ||
| 100 | real: void, | ||
| 101 | fake: []const Entry, | ||
| 102 | |||
| 103 | const Entry = struct { | ||
| 104 | path: []const u8, | ||
| 105 | contents: []const u8 = "", | ||
| 106 | executable: bool = false, | ||
| 107 | }; | ||
| 108 | |||
| 109 | const FakeDir = struct { | ||
| 110 | entries: []const Entry, | ||
| 111 | path: []const u8, | ||
| 112 | |||
| 113 | fn iterate(self: FakeDir) FakeDir.Iterator { | ||
| 114 | return .{ | ||
| 115 | .entries = self.entries, | ||
| 116 | .base = self.path, | ||
| 117 | }; | ||
| 118 | } | ||
| 119 | |||
| 120 | const Iterator = struct { | ||
| 121 | entries: []const Entry, | ||
| 122 | base: []const u8, | ||
| 123 | i: usize = 0, | ||
| 124 | |||
| 125 | const Self = @This(); | ||
| 126 | |||
| 127 | fn next(self: *@This()) !?std.fs.IterableDir.Entry { | ||
| 128 | while (self.i < self.entries.len) { | ||
| 129 | const entry = self.entries[self.i]; | ||
| 130 | self.i += 1; | ||
| 131 | if (entry.path.len == self.base.len) continue; | ||
| 132 | if (std.mem.startsWith(u8, entry.path, self.base)) { | ||
| 133 | const remaining = entry.path[self.base.len + 1 ..]; | ||
| 134 | if (std.mem.indexOfScalar(u8, remaining, std.fs.path.sep) != null) continue; | ||
| 135 | const extension = std.fs.path.extension(remaining); | ||
| 136 | const kind: std.fs.IterableDir.Entry.Kind = if (extension.len == 0) .directory else .file; | ||
| 137 | return .{ .name = remaining, .kind = kind }; | ||
| 138 | } | ||
| 139 | } | ||
| 140 | return null; | ||
| 141 | } | ||
| 142 | }; | ||
| 143 | }; | ||
| 144 | |||
| 145 | const IterableDir = union(enum) { | ||
| 146 | dir: std.fs.IterableDir, | ||
| 147 | fake: FakeDir, | ||
| 148 | |||
| 149 | pub fn iterate(self: IterableDir) Iterator { | ||
| 150 | return switch (self) { | ||
| 151 | .dir => |dir| .{ .iterator = dir.iterate() }, | ||
| 152 | .fake => |fake| .{ .fake = fake.iterate() }, | ||
| 153 | }; | ||
| 154 | } | ||
| 155 | |||
| 156 | pub fn close(self: *IterableDir) void { | ||
| 157 | switch (self.*) { | ||
| 158 | .dir => |*d| d.close(), | ||
| 159 | .fake => {}, | ||
| 160 | } | ||
| 161 | } | ||
| 162 | }; | ||
| 163 | |||
| 164 | const Iterator = union(enum) { | ||
| 165 | iterator: std.fs.IterableDir.Iterator, | ||
| 166 | fake: FakeDir.Iterator, | ||
| 167 | |||
| 168 | pub fn next(self: *Iterator) std.fs.IterableDir.Iterator.Error!?std.fs.IterableDir.Entry { | ||
| 169 | return switch (self.*) { | ||
| 170 | .iterator => |*it| it.next(), | ||
| 171 | .fake => |*it| it.next(), | ||
| 172 | }; | ||
| 173 | } | ||
| 174 | }; | ||
| 175 | |||
| 176 | pub fn exists(fs: Filesystem, path: []const u8) bool { | ||
| 177 | switch (fs) { | ||
| 178 | .real => { | ||
| 179 | std.os.access(path, std.os.F_OK) catch return false; | ||
| 180 | return true; | ||
| 181 | }, | ||
| 182 | .fake => |paths| return existsFake(paths, path), | ||
| 183 | } | ||
| 184 | } | ||
| 185 | |||
| 186 | pub fn joinedExists(fs: Filesystem, parts: []const []const u8) bool { | ||
| 187 | var buf: [std.fs.MAX_PATH_BYTES]u8 = undefined; | ||
| 188 | var fib = std.heap.FixedBufferAllocator.init(&buf); | ||
| 189 | const joined = std.fs.path.join(fib.allocator(), parts) catch return false; | ||
| 190 | return fs.exists(joined); | ||
| 191 | } | ||
| 192 | |||
| 193 | pub fn canExecute(fs: Filesystem, path: []const u8) bool { | ||
| 194 | return switch (fs) { | ||
| 195 | .real => if (is_windows) canExecuteWindows(path) else canExecutePosix(path), | ||
| 196 | .fake => |entries| canExecuteFake(entries, path), | ||
| 197 | }; | ||
| 198 | } | ||
| 199 | |||
| 200 | /// Search for an executable named `name` using platform-specific logic | ||
| 201 | /// If it's found, write the full path to `buf` and return a slice of it | ||
| 202 | /// Otherwise retun null | ||
| 203 | pub fn findProgramByName(fs: Filesystem, allocator: std.mem.Allocator, name: []const u8, path: ?[]const u8, buf: []u8) ?[]const u8 { | ||
| 204 | std.debug.assert(name.len > 0); | ||
| 205 | return switch (fs) { | ||
| 206 | .real => if (is_windows) findProgramByNameWindows(allocator, name, path, buf) else findProgramByNamePosix(name, path, buf), | ||
| 207 | .fake => |entries| findProgramByNameFake(entries, name, path, buf), | ||
| 208 | }; | ||
| 209 | } | ||
| 210 | |||
| 211 | /// Read the file at `path` into `buf`. | ||
| 212 | /// Returns null if any errors are encountered | ||
| 213 | /// Otherwise returns a slice of `buf`. If the file is larger than `buf` partial contents are returned | ||
| 214 | pub fn readFile(fs: Filesystem, path: []const u8, buf: []u8) ?[]const u8 { | ||
| 215 | return switch (fs) { | ||
| 216 | .real => { | ||
| 217 | const file = std.fs.cwd().openFile(path, .{}) catch return null; | ||
| 218 | defer file.close(); | ||
| 219 | |||
| 220 | const bytes_read = file.readAll(buf) catch return null; | ||
| 221 | return buf[0..bytes_read]; | ||
| 222 | }, | ||
| 223 | .fake => |entries| readFileFake(entries, path, buf), | ||
| 224 | }; | ||
| 225 | } | ||
| 226 | |||
| 227 | pub fn openIterableDir(fs: Filesystem, dir_name: []const u8) std.fs.Dir.OpenError!IterableDir { | ||
| 228 | return switch (fs) { | ||
| 229 | .real => .{ .dir = try std.fs.cwd().openIterableDir(dir_name, .{ .access_sub_paths = false }) }, | ||
| 230 | .fake => |entries| .{ .fake = .{ .entries = entries, .path = dir_name } }, | ||
| 231 | }; | ||
| 232 | } | ||
| 233 | }; | ||
| 234 | |||
| 235 | test "Fake filesystem" { | ||
| 236 | const fs: Filesystem = .{ .fake = &.{ | ||
| 237 | .{ .path = "/usr/bin" }, | ||
| 238 | } }; | ||
| 239 | try std.testing.expect(fs.exists("/usr/bin")); | ||
| 240 | try std.testing.expect(fs.exists("/usr/bin/foo/..")); | ||
| 241 | try std.testing.expect(!fs.exists("/usr/bin/bar")); | ||
| 242 | } | ||
deps/aro/Driver/GCCDetector.zig deleted-610| ... | @@ -1,610 +0,0 @@ | ||
| 1 | const std = @import("std"); | ||
| 2 | const Toolchain = @import("../Toolchain.zig"); | ||
| 3 | const target_util = @import("../target.zig"); | ||
| 4 | const system_defaults = @import("system_defaults"); | ||
| 5 | const util = @import("../util.zig"); | ||
| 6 | const GCCVersion = @import("GCCVersion.zig"); | ||
| 7 | const Multilib = @import("Multilib.zig"); | ||
| 8 | const GCCDetector = @This(); | ||
| 9 | |||
| 10 | is_valid: bool = false, | ||
| 11 | install_path: []const u8 = "", | ||
| 12 | parent_lib_path: []const u8 = "", | ||
| 13 | version: GCCVersion = .{}, | ||
| 14 | gcc_triple: []const u8 = "", | ||
| 15 | selected: Multilib = .{}, | ||
| 16 | biarch_sibling: ?Multilib = null, | ||
| 17 | |||
| 18 | pub fn deinit(self: *GCCDetector) void { | ||
| 19 | if (!self.is_valid) return; | ||
| 20 | } | ||
| 21 | |||
| 22 | pub fn appendToolPath(self: *const GCCDetector, tc: *Toolchain) !void { | ||
| 23 | if (!self.is_valid) return; | ||
| 24 | return tc.addPathFromComponents(&.{ | ||
| 25 | self.parent_lib_path, | ||
| 26 | "..", | ||
| 27 | self.gcc_triple, | ||
| 28 | "bin", | ||
| 29 | }, .program); | ||
| 30 | } | ||
| 31 | |||
| 32 | fn addDefaultGCCPrefixes(prefixes: *PathPrefixes, tc: *const Toolchain) !void { | ||
| 33 | const sysroot = tc.getSysroot(); | ||
| 34 | const target = tc.getTarget(); | ||
| 35 | if (sysroot.len == 0 and target.os.tag == .linux and tc.filesystem.exists("/opt/rh")) { | ||
| 36 | prefixes.appendAssumeCapacity("/opt/rh/gcc-toolset-12/root/usr"); | ||
| 37 | prefixes.appendAssumeCapacity("/opt/rh/gcc-toolset-11/root/usr"); | ||
| 38 | prefixes.appendAssumeCapacity("/opt/rh/gcc-toolset-10/root/usr"); | ||
| 39 | prefixes.appendAssumeCapacity("/opt/rh/devtoolset-12/root/usr"); | ||
| 40 | prefixes.appendAssumeCapacity("/opt/rh/devtoolset-11/root/usr"); | ||
| 41 | prefixes.appendAssumeCapacity("/opt/rh/devtoolset-10/root/usr"); | ||
| 42 | prefixes.appendAssumeCapacity("/opt/rh/devtoolset-9/root/usr"); | ||
| 43 | prefixes.appendAssumeCapacity("/opt/rh/devtoolset-8/root/usr"); | ||
| 44 | prefixes.appendAssumeCapacity("/opt/rh/devtoolset-7/root/usr"); | ||
| 45 | prefixes.appendAssumeCapacity("/opt/rh/devtoolset-6/root/usr"); | ||
| 46 | prefixes.appendAssumeCapacity("/opt/rh/devtoolset-4/root/usr"); | ||
| 47 | prefixes.appendAssumeCapacity("/opt/rh/devtoolset-3/root/usr"); | ||
| 48 | prefixes.appendAssumeCapacity("/opt/rh/devtoolset-2/root/usr"); | ||
| 49 | } | ||
| 50 | if (sysroot.len == 0) { | ||
| 51 | prefixes.appendAssumeCapacity("/usr"); | ||
| 52 | } else { | ||
| 53 | var usr_path = try tc.arena.alloc(u8, 4 + sysroot.len); | ||
| 54 | @memcpy(usr_path[0..4], "/usr"); | ||
| 55 | @memcpy(usr_path[4..], sysroot); | ||
| 56 | prefixes.appendAssumeCapacity(usr_path); | ||
| 57 | } | ||
| 58 | } | ||
| 59 | |||
| 60 | const PathPrefixes = std.BoundedArray([]const u8, 16); | ||
| 61 | |||
| 62 | fn collectLibDirsAndTriples( | ||
| 63 | tc: *Toolchain, | ||
| 64 | lib_dirs: *PathPrefixes, | ||
| 65 | triple_aliases: *PathPrefixes, | ||
| 66 | biarch_libdirs: *PathPrefixes, | ||
| 67 | biarch_triple_aliases: *PathPrefixes, | ||
| 68 | ) !void { | ||
| 69 | const AArch64LibDirs: [2][]const u8 = .{ "/lib64", "/lib" }; | ||
| 70 | const AArch64Triples: [4][]const u8 = .{ "aarch64-none-linux-gnu", "aarch64-linux-gnu", "aarch64-redhat-linux", "aarch64-suse-linux" }; | ||
| 71 | const AArch64beLibDirs: [1][]const u8 = .{"/lib"}; | ||
| 72 | const AArch64beTriples: [2][]const u8 = .{ "aarch64_be-none-linux-gnu", "aarch64_be-linux-gnu" }; | ||
| 73 | |||
| 74 | const ARMLibDirs: [1][]const u8 = .{"/lib"}; | ||
| 75 | const ARMTriples: [1][]const u8 = .{"arm-linux-gnueabi"}; | ||
| 76 | const ARMHFTriples: [4][]const u8 = .{ "arm-linux-gnueabihf", "armv7hl-redhat-linux-gnueabi", "armv6hl-suse-linux-gnueabi", "armv7hl-suse-linux-gnueabi" }; | ||
| 77 | |||
| 78 | const ARMebLibDirs: [1][]const u8 = .{"/lib"}; | ||
| 79 | const ARMebTriples: [1][]const u8 = .{"armeb-linux-gnueabi"}; | ||
| 80 | const ARMebHFTriples: [2][]const u8 = .{ "armeb-linux-gnueabihf", "armebv7hl-redhat-linux-gnueabi" }; | ||
| 81 | |||
| 82 | const AVRLibDirs: [1][]const u8 = .{"/lib"}; | ||
| 83 | const AVRTriples: [1][]const u8 = .{"avr"}; | ||
| 84 | |||
| 85 | const CSKYLibDirs: [1][]const u8 = .{"/lib"}; | ||
| 86 | const CSKYTriples: [3][]const u8 = .{ "csky-linux-gnuabiv2", "csky-linux-uclibcabiv2", "csky-elf-noneabiv2" }; | ||
| 87 | |||
| 88 | const X86_64LibDirs: [2][]const u8 = .{ "/lib64", "/lib" }; | ||
| 89 | const X86_64Triples: [11][]const u8 = .{ | ||
| 90 | "x86_64-linux-gnu", "x86_64-unknown-linux-gnu", | ||
| 91 | "x86_64-pc-linux-gnu", "x86_64-redhat-linux6E", | ||
| 92 | "x86_64-redhat-linux", "x86_64-suse-linux", | ||
| 93 | "x86_64-manbo-linux-gnu", "x86_64-linux-gnu", | ||
| 94 | "x86_64-slackware-linux", "x86_64-unknown-linux", | ||
| 95 | "x86_64-amazon-linux", | ||
| 96 | }; | ||
| 97 | const X32Triples: [2][]const u8 = .{ "x86_64-linux-gnux32", "x86_64-pc-linux-gnux32" }; | ||
| 98 | const X32LibDirs: [2][]const u8 = .{ "/libx32", "/lib" }; | ||
| 99 | const X86LibDirs: [2][]const u8 = .{ "/lib32", "/lib" }; | ||
| 100 | const X86Triples: [9][]const u8 = .{ | ||
| 101 | "i586-linux-gnu", "i686-linux-gnu", "i686-pc-linux-gnu", | ||
| 102 | "i386-redhat-linux6E", "i686-redhat-linux", "i386-redhat-linux", | ||
| 103 | "i586-suse-linux", "i686-montavista-linux", "i686-gnu", | ||
| 104 | }; | ||
| 105 | |||
| 106 | const LoongArch64LibDirs: [2][]const u8 = .{ "/lib64", "/lib" }; | ||
| 107 | const LoongArch64Triples: [2][]const u8 = .{ "loongarch64-linux-gnu", "loongarch64-unknown-linux-gnu" }; | ||
| 108 | |||
| 109 | const M68kLibDirs: [1][]const u8 = .{"/lib"}; | ||
| 110 | const M68kTriples: [3][]const u8 = .{ "m68k-linux-gnu", "m68k-unknown-linux-gnu", "m68k-suse-linux" }; | ||
| 111 | |||
| 112 | const MIPSLibDirs: [2][]const u8 = .{ "/libo32", "/lib" }; | ||
| 113 | const MIPSTriples: [5][]const u8 = .{ | ||
| 114 | "mips-linux-gnu", "mips-mti-linux", | ||
| 115 | "mips-mti-linux-gnu", "mips-img-linux-gnu", | ||
| 116 | "mipsisa32r6-linux-gnu", | ||
| 117 | }; | ||
| 118 | const MIPSELLibDirs: [2][]const u8 = .{ "/libo32", "/lib" }; | ||
| 119 | const MIPSELTriples: [3][]const u8 = .{ "mipsel-linux-gnu", "mips-img-linux-gnu", "mipsisa32r6el-linux-gnu" }; | ||
| 120 | |||
| 121 | const MIPS64LibDirs: [2][]const u8 = .{ "/lib64", "/lib" }; | ||
| 122 | const MIPS64Triples: [6][]const u8 = .{ | ||
| 123 | "mips64-linux-gnu", "mips-mti-linux-gnu", | ||
| 124 | "mips-img-linux-gnu", "mips64-linux-gnuabi64", | ||
| 125 | "mipsisa64r6-linux-gnu", "mipsisa64r6-linux-gnuabi64", | ||
| 126 | }; | ||
| 127 | const MIPS64ELLibDirs: [2][]const u8 = .{ "/lib64", "/lib" }; | ||
| 128 | const MIPS64ELTriples: [6][]const u8 = .{ | ||
| 129 | "mips64el-linux-gnu", "mips-mti-linux-gnu", | ||
| 130 | "mips-img-linux-gnu", "mips64el-linux-gnuabi64", | ||
| 131 | "mipsisa64r6el-linux-gnu", "mipsisa64r6el-linux-gnuabi64", | ||
| 132 | }; | ||
| 133 | |||
| 134 | const MIPSN32LibDirs: [1][]const u8 = .{"/lib32"}; | ||
| 135 | const MIPSN32Triples: [2][]const u8 = .{ "mips64-linux-gnuabin32", "mipsisa64r6-linux-gnuabin32" }; | ||
| 136 | const MIPSN32ELLibDirs: [1][]const u8 = .{"/lib32"}; | ||
| 137 | const MIPSN32ELTriples: [2][]const u8 = .{ "mips64el-linux-gnuabin32", "mipsisa64r6el-linux-gnuabin32" }; | ||
| 138 | |||
| 139 | const MSP430LibDirs: [1][]const u8 = .{"/lib"}; | ||
| 140 | const MSP430Triples: [1][]const u8 = .{"msp430-elf"}; | ||
| 141 | |||
| 142 | const PPCLibDirs: [2][]const u8 = .{ "/lib32", "/lib" }; | ||
| 143 | const PPCTriples: [5][]const u8 = .{ | ||
| 144 | "powerpc-linux-gnu", "powerpc-unknown-linux-gnu", "powerpc-linux-gnuspe", | ||
| 145 | // On 32-bit PowerPC systems running SUSE Linux, gcc is configured as a | ||
| 146 | // 64-bit compiler which defaults to "-m32", hence "powerpc64-suse-linux". | ||
| 147 | "powerpc64-suse-linux", "powerpc-montavista-linuxspe", | ||
| 148 | }; | ||
| 149 | const PPCLELibDirs: [2][]const u8 = .{ "/lib32", "/lib" }; | ||
| 150 | const PPCLETriples: [3][]const u8 = .{ "powerpcle-linux-gnu", "powerpcle-unknown-linux-gnu", "powerpcle-linux-musl" }; | ||
| 151 | |||
| 152 | const PPC64LibDirs: [2][]const u8 = .{ "/lib64", "/lib" }; | ||
| 153 | const PPC64Triples: [4][]const u8 = .{ | ||
| 154 | "powerpc64-linux-gnu", "powerpc64-unknown-linux-gnu", | ||
| 155 | "powerpc64-suse-linux", "ppc64-redhat-linux", | ||
| 156 | }; | ||
| 157 | const PPC64LELibDirs: [2][]const u8 = .{ "/lib64", "/lib" }; | ||
| 158 | const PPC64LETriples: [5][]const u8 = .{ | ||
| 159 | "powerpc64le-linux-gnu", "powerpc64le-unknown-linux-gnu", | ||
| 160 | "powerpc64le-none-linux-gnu", "powerpc64le-suse-linux", | ||
| 161 | "ppc64le-redhat-linux", | ||
| 162 | }; | ||
| 163 | |||
| 164 | const RISCV32LibDirs: [2][]const u8 = .{ "/lib32", "/lib" }; | ||
| 165 | const RISCV32Triples: [3][]const u8 = .{ "riscv32-unknown-linux-gnu", "riscv32-linux-gnu", "riscv32-unknown-elf" }; | ||
| 166 | const RISCV64LibDirs: [2][]const u8 = .{ "/lib64", "/lib" }; | ||
| 167 | const RISCV64Triples: [3][]const u8 = .{ | ||
| 168 | "riscv64-unknown-linux-gnu", | ||
| 169 | "riscv64-linux-gnu", | ||
| 170 | "riscv64-unknown-elf", | ||
| 171 | }; | ||
| 172 | |||
| 173 | const SPARCv8LibDirs: [2][]const u8 = .{ "/lib32", "/lib" }; | ||
| 174 | const SPARCv8Triples: [2][]const u8 = .{ "sparc-linux-gnu", "sparcv8-linux-gnu" }; | ||
| 175 | const SPARCv9LibDirs: [2][]const u8 = .{ "/lib64", "/lib" }; | ||
| 176 | const SPARCv9Triples: [2][]const u8 = .{ "sparc64-linux-gnu", "sparcv9-linux-gnu" }; | ||
| 177 | |||
| 178 | const SystemZLibDirs: [2][]const u8 = .{ "/lib64", "/lib" }; | ||
| 179 | const SystemZTriples: [5][]const u8 = .{ | ||
| 180 | "s390x-linux-gnu", "s390x-unknown-linux-gnu", "s390x-ibm-linux-gnu", | ||
| 181 | "s390x-suse-linux", "s390x-redhat-linux", | ||
| 182 | }; | ||
| 183 | const target = tc.getTarget(); | ||
| 184 | if (target.os.tag == .solaris) { | ||
| 185 | // TODO | ||
| 186 | return; | ||
| 187 | } | ||
| 188 | if (target.isAndroid()) { | ||
| 189 | const AArch64AndroidTriples: [1][]const u8 = .{"aarch64-linux-android"}; | ||
| 190 | const ARMAndroidTriples: [1][]const u8 = .{"arm-linux-androideabi"}; | ||
| 191 | const MIPSELAndroidTriples: [1][]const u8 = .{"mipsel-linux-android"}; | ||
| 192 | const MIPS64ELAndroidTriples: [1][]const u8 = .{"mips64el-linux-android"}; | ||
| 193 | const X86AndroidTriples: [1][]const u8 = .{"i686-linux-android"}; | ||
| 194 | const X86_64AndroidTriples: [1][]const u8 = .{"x86_64-linux-android"}; | ||
| 195 | |||
| 196 | switch (target.cpu.arch) { | ||
| 197 | .aarch64 => { | ||
| 198 | lib_dirs.appendSliceAssumeCapacity(&AArch64LibDirs); | ||
| 199 | triple_aliases.appendSliceAssumeCapacity(&AArch64AndroidTriples); | ||
| 200 | }, | ||
| 201 | .arm, | ||
| 202 | .thumb, | ||
| 203 | => { | ||
| 204 | lib_dirs.appendSliceAssumeCapacity(&ARMLibDirs); | ||
| 205 | triple_aliases.appendSliceAssumeCapacity(&ARMAndroidTriples); | ||
| 206 | }, | ||
| 207 | .mipsel => { | ||
| 208 | lib_dirs.appendSliceAssumeCapacity(&MIPSELLibDirs); | ||
| 209 | triple_aliases.appendSliceAssumeCapacity(&MIPSELAndroidTriples); | ||
| 210 | biarch_libdirs.appendSliceAssumeCapacity(&MIPS64ELLibDirs); | ||
| 211 | biarch_triple_aliases.appendSliceAssumeCapacity(&MIPS64ELAndroidTriples); | ||
| 212 | }, | ||
| 213 | .mips64el => { | ||
| 214 | lib_dirs.appendSliceAssumeCapacity(&MIPS64ELLibDirs); | ||
| 215 | triple_aliases.appendSliceAssumeCapacity(&MIPS64ELAndroidTriples); | ||
| 216 | biarch_libdirs.appendSliceAssumeCapacity(&MIPSELLibDirs); | ||
| 217 | biarch_triple_aliases.appendSliceAssumeCapacity(&MIPSELAndroidTriples); | ||
| 218 | }, | ||
| 219 | .x86_64 => { | ||
| 220 | lib_dirs.appendSliceAssumeCapacity(&X86_64LibDirs); | ||
| 221 | triple_aliases.appendSliceAssumeCapacity(&X86_64AndroidTriples); | ||
| 222 | biarch_libdirs.appendSliceAssumeCapacity(&X86LibDirs); | ||
| 223 | biarch_triple_aliases.appendSliceAssumeCapacity(&X86AndroidTriples); | ||
| 224 | }, | ||
| 225 | .x86 => { | ||
| 226 | lib_dirs.appendSliceAssumeCapacity(&X86LibDirs); | ||
| 227 | triple_aliases.appendSliceAssumeCapacity(&X86AndroidTriples); | ||
| 228 | biarch_libdirs.appendSliceAssumeCapacity(&X86_64LibDirs); | ||
| 229 | biarch_triple_aliases.appendSliceAssumeCapacity(&X86_64AndroidTriples); | ||
| 230 | }, | ||
| 231 | else => {}, | ||
| 232 | } | ||
| 233 | return; | ||
| 234 | } | ||
| 235 | switch (target.cpu.arch) { | ||
| 236 | .aarch64 => { | ||
| 237 | lib_dirs.appendSliceAssumeCapacity(&AArch64LibDirs); | ||
| 238 | triple_aliases.appendSliceAssumeCapacity(&AArch64Triples); | ||
| 239 | biarch_libdirs.appendSliceAssumeCapacity(&AArch64LibDirs); | ||
| 240 | biarch_triple_aliases.appendSliceAssumeCapacity(&AArch64Triples); | ||
| 241 | }, | ||
| 242 | .aarch64_be => { | ||
| 243 | lib_dirs.appendSliceAssumeCapacity(&AArch64beLibDirs); | ||
| 244 | triple_aliases.appendSliceAssumeCapacity(&AArch64beTriples); | ||
| 245 | biarch_libdirs.appendSliceAssumeCapacity(&AArch64beLibDirs); | ||
| 246 | biarch_triple_aliases.appendSliceAssumeCapacity(&AArch64beTriples); | ||
| 247 | }, | ||
| 248 | .arm, .thumb => { | ||
| 249 | lib_dirs.appendSliceAssumeCapacity(&ARMLibDirs); | ||
| 250 | if (target.abi == .gnueabihf) { | ||
| 251 | triple_aliases.appendSliceAssumeCapacity(&ARMHFTriples); | ||
| 252 | } else { | ||
| 253 | triple_aliases.appendSliceAssumeCapacity(&ARMTriples); | ||
| 254 | } | ||
| 255 | }, | ||
| 256 | .armeb, .thumbeb => { | ||
| 257 | lib_dirs.appendSliceAssumeCapacity(&ARMebLibDirs); | ||
| 258 | if (target.abi == .gnueabihf) { | ||
| 259 | triple_aliases.appendSliceAssumeCapacity(&ARMebHFTriples); | ||
| 260 | } else { | ||
| 261 | triple_aliases.appendSliceAssumeCapacity(&ARMebTriples); | ||
| 262 | } | ||
| 263 | }, | ||
| 264 | .avr => { | ||
| 265 | lib_dirs.appendSliceAssumeCapacity(&AVRLibDirs); | ||
| 266 | triple_aliases.appendSliceAssumeCapacity(&AVRTriples); | ||
| 267 | }, | ||
| 268 | .csky => { | ||
| 269 | lib_dirs.appendSliceAssumeCapacity(&CSKYLibDirs); | ||
| 270 | triple_aliases.appendSliceAssumeCapacity(&CSKYTriples); | ||
| 271 | }, | ||
| 272 | .x86_64 => { | ||
| 273 | if (target.abi == .gnux32 or target.abi == .muslx32) { | ||
| 274 | lib_dirs.appendSliceAssumeCapacity(&X32LibDirs); | ||
| 275 | triple_aliases.appendSliceAssumeCapacity(&X32Triples); | ||
| 276 | biarch_libdirs.appendSliceAssumeCapacity(&X86_64LibDirs); | ||
| 277 | biarch_triple_aliases.appendSliceAssumeCapacity(&X86_64Triples); | ||
| 278 | } else { | ||
| 279 | lib_dirs.appendSliceAssumeCapacity(&X86_64LibDirs); | ||
| 280 | triple_aliases.appendSliceAssumeCapacity(&X86_64Triples); | ||
| 281 | biarch_libdirs.appendSliceAssumeCapacity(&X32LibDirs); | ||
| 282 | biarch_triple_aliases.appendSliceAssumeCapacity(&X32Triples); | ||
| 283 | } | ||
| 284 | biarch_libdirs.appendSliceAssumeCapacity(&X86LibDirs); | ||
| 285 | biarch_triple_aliases.appendSliceAssumeCapacity(&X86Triples); | ||
| 286 | }, | ||
| 287 | .x86 => { | ||
| 288 | lib_dirs.appendSliceAssumeCapacity(&X86LibDirs); | ||
| 289 | // MCU toolchain is 32 bit only and its triple alias is TargetTriple | ||
| 290 | // itself, which will be appended below. | ||
| 291 | if (target.os.tag != .elfiamcu) { | ||
| 292 | triple_aliases.appendSliceAssumeCapacity(&X86Triples); | ||
| 293 | biarch_libdirs.appendSliceAssumeCapacity(&X86_64LibDirs); | ||
| 294 | biarch_triple_aliases.appendSliceAssumeCapacity(&X86_64Triples); | ||
| 295 | biarch_libdirs.appendSliceAssumeCapacity(&X32LibDirs); | ||
| 296 | biarch_triple_aliases.appendSliceAssumeCapacity(&X32Triples); | ||
| 297 | } | ||
| 298 | }, | ||
| 299 | .loongarch64 => { | ||
| 300 | lib_dirs.appendSliceAssumeCapacity(&LoongArch64LibDirs); | ||
| 301 | triple_aliases.appendSliceAssumeCapacity(&LoongArch64Triples); | ||
| 302 | }, | ||
| 303 | .m68k => { | ||
| 304 | lib_dirs.appendSliceAssumeCapacity(&M68kLibDirs); | ||
| 305 | triple_aliases.appendSliceAssumeCapacity(&M68kTriples); | ||
| 306 | }, | ||
| 307 | .mips => { | ||
| 308 | lib_dirs.appendSliceAssumeCapacity(&MIPSLibDirs); | ||
| 309 | triple_aliases.appendSliceAssumeCapacity(&MIPSTriples); | ||
| 310 | biarch_libdirs.appendSliceAssumeCapacity(&MIPS64LibDirs); | ||
| 311 | biarch_triple_aliases.appendSliceAssumeCapacity(&MIPS64Triples); | ||
| 312 | biarch_libdirs.appendSliceAssumeCapacity(&MIPSN32LibDirs); | ||
| 313 | biarch_triple_aliases.appendSliceAssumeCapacity(&MIPSN32Triples); | ||
| 314 | }, | ||
| 315 | .mipsel => { | ||
| 316 | lib_dirs.appendSliceAssumeCapacity(&MIPSELLibDirs); | ||
| 317 | triple_aliases.appendSliceAssumeCapacity(&MIPSELTriples); | ||
| 318 | triple_aliases.appendSliceAssumeCapacity(&MIPSTriples); | ||
| 319 | biarch_libdirs.appendSliceAssumeCapacity(&MIPS64ELLibDirs); | ||
| 320 | biarch_triple_aliases.appendSliceAssumeCapacity(&MIPS64ELTriples); | ||
| 321 | biarch_libdirs.appendSliceAssumeCapacity(&MIPSN32ELLibDirs); | ||
| 322 | biarch_triple_aliases.appendSliceAssumeCapacity(&MIPSN32ELTriples); | ||
| 323 | }, | ||
| 324 | .mips64 => { | ||
| 325 | lib_dirs.appendSliceAssumeCapacity(&MIPS64LibDirs); | ||
| 326 | triple_aliases.appendSliceAssumeCapacity(&MIPS64Triples); | ||
| 327 | biarch_libdirs.appendSliceAssumeCapacity(&MIPSLibDirs); | ||
| 328 | biarch_triple_aliases.appendSliceAssumeCapacity(&MIPSTriples); | ||
| 329 | biarch_libdirs.appendSliceAssumeCapacity(&MIPSN32LibDirs); | ||
| 330 | biarch_triple_aliases.appendSliceAssumeCapacity(&MIPSN32Triples); | ||
| 331 | }, | ||
| 332 | .mips64el => { | ||
| 333 | lib_dirs.appendSliceAssumeCapacity(&MIPS64ELLibDirs); | ||
| 334 | triple_aliases.appendSliceAssumeCapacity(&MIPS64ELTriples); | ||
| 335 | biarch_libdirs.appendSliceAssumeCapacity(&MIPSELLibDirs); | ||
| 336 | biarch_triple_aliases.appendSliceAssumeCapacity(&MIPSELTriples); | ||
| 337 | biarch_libdirs.appendSliceAssumeCapacity(&MIPSN32ELLibDirs); | ||
| 338 | biarch_triple_aliases.appendSliceAssumeCapacity(&MIPSN32ELTriples); | ||
| 339 | biarch_triple_aliases.appendSliceAssumeCapacity(&MIPSTriples); | ||
| 340 | }, | ||
| 341 | .msp430 => { | ||
| 342 | lib_dirs.appendSliceAssumeCapacity(&MSP430LibDirs); | ||
| 343 | triple_aliases.appendSliceAssumeCapacity(&MSP430Triples); | ||
| 344 | }, | ||
| 345 | .powerpc => { | ||
| 346 | lib_dirs.appendSliceAssumeCapacity(&PPCLibDirs); | ||
| 347 | triple_aliases.appendSliceAssumeCapacity(&PPCTriples); | ||
| 348 | biarch_libdirs.appendSliceAssumeCapacity(&PPC64LibDirs); | ||
| 349 | biarch_triple_aliases.appendSliceAssumeCapacity(&PPC64Triples); | ||
| 350 | }, | ||
| 351 | .powerpcle => { | ||
| 352 | lib_dirs.appendSliceAssumeCapacity(&PPCLELibDirs); | ||
| 353 | triple_aliases.appendSliceAssumeCapacity(&PPCLETriples); | ||
| 354 | biarch_libdirs.appendSliceAssumeCapacity(&PPC64LELibDirs); | ||
| 355 | biarch_triple_aliases.appendSliceAssumeCapacity(&PPC64LETriples); | ||
| 356 | }, | ||
| 357 | .powerpc64 => { | ||
| 358 | lib_dirs.appendSliceAssumeCapacity(&PPC64LibDirs); | ||
| 359 | triple_aliases.appendSliceAssumeCapacity(&PPC64Triples); | ||
| 360 | biarch_libdirs.appendSliceAssumeCapacity(&PPCLibDirs); | ||
| 361 | biarch_triple_aliases.appendSliceAssumeCapacity(&PPCTriples); | ||
| 362 | }, | ||
| 363 | .powerpc64le => { | ||
| 364 | lib_dirs.appendSliceAssumeCapacity(&PPC64LELibDirs); | ||
| 365 | triple_aliases.appendSliceAssumeCapacity(&PPC64LETriples); | ||
| 366 | biarch_libdirs.appendSliceAssumeCapacity(&PPCLELibDirs); | ||
| 367 | biarch_triple_aliases.appendSliceAssumeCapacity(&PPCLETriples); | ||
| 368 | }, | ||
| 369 | .riscv32 => { | ||
| 370 | lib_dirs.appendSliceAssumeCapacity(&RISCV32LibDirs); | ||
| 371 | triple_aliases.appendSliceAssumeCapacity(&RISCV32Triples); | ||
| 372 | biarch_libdirs.appendSliceAssumeCapacity(&RISCV64LibDirs); | ||
| 373 | biarch_triple_aliases.appendSliceAssumeCapacity(&RISCV64Triples); | ||
| 374 | }, | ||
| 375 | .riscv64 => { | ||
| 376 | lib_dirs.appendSliceAssumeCapacity(&RISCV64LibDirs); | ||
| 377 | triple_aliases.appendSliceAssumeCapacity(&RISCV64Triples); | ||
| 378 | biarch_libdirs.appendSliceAssumeCapacity(&RISCV32LibDirs); | ||
| 379 | biarch_triple_aliases.appendSliceAssumeCapacity(&RISCV32Triples); | ||
| 380 | }, | ||
| 381 | .sparc, .sparcel => { | ||
| 382 | lib_dirs.appendSliceAssumeCapacity(&SPARCv8LibDirs); | ||
| 383 | triple_aliases.appendSliceAssumeCapacity(&SPARCv8Triples); | ||
| 384 | biarch_libdirs.appendSliceAssumeCapacity(&SPARCv9LibDirs); | ||
| 385 | biarch_triple_aliases.appendSliceAssumeCapacity(&SPARCv9Triples); | ||
| 386 | }, | ||
| 387 | .sparc64 => { | ||
| 388 | lib_dirs.appendSliceAssumeCapacity(&SPARCv9LibDirs); | ||
| 389 | triple_aliases.appendSliceAssumeCapacity(&SPARCv9Triples); | ||
| 390 | biarch_libdirs.appendSliceAssumeCapacity(&SPARCv8LibDirs); | ||
| 391 | biarch_triple_aliases.appendSliceAssumeCapacity(&SPARCv8Triples); | ||
| 392 | }, | ||
| 393 | .s390x => { | ||
| 394 | lib_dirs.appendSliceAssumeCapacity(&SystemZLibDirs); | ||
| 395 | triple_aliases.appendSliceAssumeCapacity(&SystemZTriples); | ||
| 396 | }, | ||
| 397 | else => {}, | ||
| 398 | } | ||
| 399 | } | ||
| 400 | |||
| 401 | pub fn discover(self: *GCCDetector, tc: *Toolchain) !void { | ||
| 402 | var path_buf: [std.fs.MAX_PATH_BYTES]u8 = undefined; | ||
| 403 | var fib = std.heap.FixedBufferAllocator.init(&path_buf); | ||
| 404 | |||
| 405 | const target = tc.getTarget(); | ||
| 406 | const biarch_variant_target = if (target.ptrBitWidth() == 32) target_util.get64BitArchVariant(target) else target_util.get32BitArchVariant(target); | ||
| 407 | |||
| 408 | var candidate_lib_dirs: PathPrefixes = .{}; | ||
| 409 | var candidate_biarch_lib_dirs: PathPrefixes = .{}; | ||
| 410 | var candidate_triple_aliases: PathPrefixes = .{}; | ||
| 411 | var candidate_biarch_triple_aliases: PathPrefixes = .{}; | ||
| 412 | try collectLibDirsAndTriples(tc, &candidate_lib_dirs, &candidate_biarch_lib_dirs, &candidate_triple_aliases, &candidate_biarch_triple_aliases); | ||
| 413 | |||
| 414 | var target_buf: [64]u8 = undefined; | ||
| 415 | const triple_str = target_util.toLLVMTriple(target, &target_buf); | ||
| 416 | candidate_triple_aliases.appendAssumeCapacity(triple_str); | ||
| 417 | |||
| 418 | // Also include the multiarch variant if it's different. | ||
| 419 | var biarch_buf: [64]u8 = undefined; | ||
| 420 | if (biarch_variant_target) |biarch_target| { | ||
| 421 | const biarch_triple_str = target_util.toLLVMTriple(biarch_target, &biarch_buf); | ||
| 422 | if (!std.mem.eql(u8, biarch_triple_str, triple_str)) { | ||
| 423 | candidate_triple_aliases.appendAssumeCapacity(biarch_triple_str); | ||
| 424 | } | ||
| 425 | } | ||
| 426 | |||
| 427 | var prefixes: PathPrefixes = .{}; | ||
| 428 | const gcc_toolchain_dir = gccToolchainDir(tc); | ||
| 429 | if (gcc_toolchain_dir.len != 0) { | ||
| 430 | const adjusted = if (gcc_toolchain_dir[gcc_toolchain_dir.len - 1] == '/') | ||
| 431 | gcc_toolchain_dir[0 .. gcc_toolchain_dir.len - 1] | ||
| 432 | else | ||
| 433 | gcc_toolchain_dir; | ||
| 434 | prefixes.appendAssumeCapacity(adjusted); | ||
| 435 | } else { | ||
| 436 | const sysroot = tc.getSysroot(); | ||
| 437 | if (sysroot.len > 0) { | ||
| 438 | prefixes.appendAssumeCapacity(sysroot); | ||
| 439 | try addDefaultGCCPrefixes(&prefixes, tc); | ||
| 440 | } | ||
| 441 | |||
| 442 | if (sysroot.len == 0) { | ||
| 443 | try addDefaultGCCPrefixes(&prefixes, tc); | ||
| 444 | } | ||
| 445 | // TODO: Special-case handling for Gentoo | ||
| 446 | } | ||
| 447 | |||
| 448 | const v0 = GCCVersion.parse("0.0.0"); | ||
| 449 | for (prefixes.constSlice()) |prefix| { | ||
| 450 | if (!tc.filesystem.exists(prefix)) continue; | ||
| 451 | |||
| 452 | for (candidate_lib_dirs.constSlice()) |suffix| { | ||
| 453 | defer fib.reset(); | ||
| 454 | const lib_dir = std.fs.path.join(fib.allocator(), &.{ prefix, suffix }) catch continue; | ||
| 455 | if (!tc.filesystem.exists(lib_dir)) continue; | ||
| 456 | |||
| 457 | const gcc_dir_exists = tc.filesystem.joinedExists(&.{ lib_dir, "/gcc" }); | ||
| 458 | const gcc_cross_dir_exists = tc.filesystem.joinedExists(&.{ lib_dir, "/gcc-cross" }); | ||
| 459 | |||
| 460 | try self.scanLibDirForGCCTriple(tc, target, lib_dir, triple_str, false, gcc_dir_exists, gcc_cross_dir_exists); | ||
| 461 | for (candidate_triple_aliases.constSlice()) |candidate| { | ||
| 462 | try self.scanLibDirForGCCTriple(tc, target, lib_dir, candidate, false, gcc_dir_exists, gcc_cross_dir_exists); | ||
| 463 | } | ||
| 464 | } | ||
| 465 | for (candidate_biarch_lib_dirs.constSlice()) |suffix| { | ||
| 466 | const lib_dir = std.fs.path.join(fib.allocator(), &.{ prefix, suffix }) catch continue; | ||
| 467 | if (!tc.filesystem.exists(lib_dir)) continue; | ||
| 468 | |||
| 469 | const gcc_dir_exists = tc.filesystem.joinedExists(&.{ lib_dir, "/gcc" }); | ||
| 470 | const gcc_cross_dir_exists = tc.filesystem.joinedExists(&.{ lib_dir, "/gcc-cross" }); | ||
| 471 | for (candidate_biarch_triple_aliases.constSlice()) |candidate| { | ||
| 472 | try self.scanLibDirForGCCTriple(tc, target, lib_dir, candidate, true, gcc_dir_exists, gcc_cross_dir_exists); | ||
| 473 | } | ||
| 474 | } | ||
| 475 | if (self.version.order(v0) == .gt) break; | ||
| 476 | } | ||
| 477 | } | ||
| 478 | |||
| 479 | fn findBiarchMultilibs(tc: *const Toolchain, result: *Multilib.Detected, target: std.Target, path: [2][]const u8, needs_biarch_suffix: bool) !bool { | ||
| 480 | const suff64 = if (target.os.tag == .solaris) switch (target.cpu.arch) { | ||
| 481 | .x86, .x86_64 => "/amd64", | ||
| 482 | .sparc => "/sparcv9", | ||
| 483 | else => "/64", | ||
| 484 | } else "/64"; | ||
| 485 | |||
| 486 | const alt_64 = Multilib.init(suff64, suff64, &.{ "-m32", "+m64", "-mx32" }); | ||
| 487 | const alt_32 = Multilib.init("/32", "/32", &.{ "+m32", "-m64", "-mx32" }); | ||
| 488 | const alt_x32 = Multilib.init("/x32", "/x32", &.{ "-m32", "-m64", "+mx32" }); | ||
| 489 | |||
| 490 | const multilib_filter = Multilib.Filter{ | ||
| 491 | .base = path, | ||
| 492 | .file = if (target.os.tag == .elfiamcu) "libgcc.a" else "crtbegin.o", | ||
| 493 | }; | ||
| 494 | |||
| 495 | const Want = enum { | ||
| 496 | want32, | ||
| 497 | want64, | ||
| 498 | wantx32, | ||
| 499 | }; | ||
| 500 | const is_x32 = target.abi == .gnux32 or target.abi == .muslx32; | ||
| 501 | const target_ptr_width = target.ptrBitWidth(); | ||
| 502 | const want: Want = if (target_ptr_width == 32 and multilib_filter.exists(alt_32, tc.filesystem)) | ||
| 503 | .want64 | ||
| 504 | else if (target_ptr_width == 64 and is_x32 and multilib_filter.exists(alt_x32, tc.filesystem)) | ||
| 505 | .want64 | ||
| 506 | else if (target_ptr_width == 64 and !is_x32 and multilib_filter.exists(alt_64, tc.filesystem)) | ||
| 507 | .want32 | ||
| 508 | else if (target_ptr_width == 32) | ||
| 509 | if (needs_biarch_suffix) .want64 else .want32 | ||
| 510 | else if (is_x32) | ||
| 511 | if (needs_biarch_suffix) .want64 else .wantx32 | ||
| 512 | else if (needs_biarch_suffix) .want32 else .want64; | ||
| 513 | |||
| 514 | const default = switch (want) { | ||
| 515 | .want32 => Multilib.init("", "", &.{ "+m32", "-m64", "-mx32" }), | ||
| 516 | .want64 => Multilib.init("", "", &.{ "-m32", "+m64", "-mx32" }), | ||
| 517 | .wantx32 => Multilib.init("", "", &.{ "-m32", "-m64", "+mx32" }), | ||
| 518 | }; | ||
| 519 | result.multilibs.appendSliceAssumeCapacity(&.{ | ||
| 520 | default, | ||
| 521 | alt_64, | ||
| 522 | alt_32, | ||
| 523 | alt_x32, | ||
| 524 | }); | ||
| 525 | result.filter(multilib_filter, tc.filesystem); | ||
| 526 | var flags: Multilib.Flags = .{}; | ||
| 527 | flags.appendAssumeCapacity(if (target_ptr_width == 64 and !is_x32) "+m64" else "-m64"); | ||
| 528 | flags.appendAssumeCapacity(if (target_ptr_width == 32) "+m32" else "-m32"); | ||
| 529 | flags.appendAssumeCapacity(if (target_ptr_width == 64 and is_x32) "+mx32" else "-mx32"); | ||
| 530 | |||
| 531 | return result.select(flags); | ||
| 532 | } | ||
| 533 | |||
| 534 | fn scanGCCForMultilibs(self: *GCCDetector, tc: *const Toolchain, target: std.Target, path: [2][]const u8, needs_biarch_suffix: bool) !bool { | ||
| 535 | var detected: Multilib.Detected = .{}; | ||
| 536 | if (target.cpu.arch == .csky) { | ||
| 537 | // TODO | ||
| 538 | } else if (target.cpu.arch.isMIPS()) { | ||
| 539 | // TODO | ||
| 540 | } else if (target.cpu.arch.isRISCV()) { | ||
| 541 | // TODO | ||
| 542 | } else if (target.cpu.arch == .msp430) { | ||
| 543 | // TODO | ||
| 544 | } else if (target.cpu.arch == .avr) { | ||
| 545 | // No multilibs | ||
| 546 | } else if (!try findBiarchMultilibs(tc, &detected, target, path, needs_biarch_suffix)) { | ||
| 547 | return false; | ||
| 548 | } | ||
| 549 | self.selected = detected.selected; | ||
| 550 | self.biarch_sibling = detected.biarch_sibling; | ||
| 551 | return true; | ||
| 552 | } | ||
| 553 | |||
| 554 | fn scanLibDirForGCCTriple( | ||
| 555 | self: *GCCDetector, | ||
| 556 | tc: *const Toolchain, | ||
| 557 | target: std.Target, | ||
| 558 | lib_dir: []const u8, | ||
| 559 | candidate_triple: []const u8, | ||
| 560 | needs_biarch_suffix: bool, | ||
| 561 | gcc_dir_exists: bool, | ||
| 562 | gcc_cross_dir_exists: bool, | ||
| 563 | ) !void { | ||
| 564 | var path_buf: [std.fs.MAX_PATH_BYTES]u8 = undefined; | ||
| 565 | var fib = std.heap.FixedBufferAllocator.init(&path_buf); | ||
| 566 | for (0..2) |i| { | ||
| 567 | if (i == 0 and !gcc_dir_exists) continue; | ||
| 568 | if (i == 1 and !gcc_cross_dir_exists) continue; | ||
| 569 | defer fib.reset(); | ||
| 570 | |||
| 571 | const base: []const u8 = if (i == 0) "gcc" else "gcc-cross"; | ||
| 572 | var lib_suffix_buf: [64]u8 = undefined; | ||
| 573 | var suffix_buf_fib = std.heap.FixedBufferAllocator.init(&lib_suffix_buf); | ||
| 574 | const lib_suffix = std.fs.path.join(suffix_buf_fib.allocator(), &.{ base, candidate_triple }) catch continue; | ||
| 575 | |||
| 576 | const dir_name = std.fs.path.join(fib.allocator(), &.{ lib_dir, lib_suffix }) catch continue; | ||
| 577 | var parent_dir = tc.filesystem.openIterableDir(dir_name) catch continue; | ||
| 578 | defer parent_dir.close(); | ||
| 579 | |||
| 580 | var it = parent_dir.iterate(); | ||
| 581 | while (it.next() catch continue) |entry| { | ||
| 582 | if (entry.kind != .directory) continue; | ||
| 583 | |||
| 584 | const version_text = entry.name; | ||
| 585 | const candidate_version = GCCVersion.parse(version_text); | ||
| 586 | if (candidate_version.major != -1) { | ||
| 587 | // TODO: cache path so we're not repeatedly scanning | ||
| 588 | } | ||
| 589 | if (candidate_version.isLessThan(4, 1, 1, "")) continue; | ||
| 590 | switch (candidate_version.order(self.version)) { | ||
| 591 | .lt, .eq => continue, | ||
| 592 | .gt => {}, | ||
| 593 | } | ||
| 594 | |||
| 595 | if (!try self.scanGCCForMultilibs(tc, target, .{ dir_name, version_text }, needs_biarch_suffix)) continue; | ||
| 596 | |||
| 597 | self.version = candidate_version; | ||
| 598 | self.gcc_triple = try tc.arena.dupe(u8, candidate_triple); | ||
| 599 | self.install_path = try std.fs.path.join(tc.arena, &.{ lib_dir, lib_suffix, version_text }); | ||
| 600 | self.parent_lib_path = try std.fs.path.join(tc.arena, &.{ self.install_path, "..", "..", ".." }); | ||
| 601 | self.is_valid = true; | ||
| 602 | } | ||
| 603 | } | ||
| 604 | } | ||
| 605 | |||
| 606 | fn gccToolchainDir(tc: *const Toolchain) []const u8 { | ||
| 607 | const sysroot = tc.getSysroot(); | ||
| 608 | if (sysroot.len != 0) return ""; | ||
| 609 | return system_defaults.gcc_install_prefix; | ||
| 610 | } | ||
deps/aro/Driver/GCCVersion.zig deleted-122| ... | @@ -1,122 +0,0 @@ | ||
| 1 | const std = @import("std"); | ||
| 2 | const mem = std.mem; | ||
| 3 | const Order = std.math.Order; | ||
| 4 | |||
| 5 | const GCCVersion = @This(); | ||
| 6 | |||
| 7 | /// Raw version number text | ||
| 8 | raw: []const u8 = "", | ||
| 9 | |||
| 10 | /// -1 indicates not present | ||
| 11 | major: i32 = -1, | ||
| 12 | /// -1 indicates not present | ||
| 13 | minor: i32 = -1, | ||
| 14 | /// -1 indicates not present | ||
| 15 | patch: i32 = -1, | ||
| 16 | |||
| 17 | /// Text of parsed major version number | ||
| 18 | major_str: []const u8 = "", | ||
| 19 | /// Text of parsed major + minor version number | ||
| 20 | minor_str: []const u8 = "", | ||
| 21 | |||
| 22 | /// Patch number suffix | ||
| 23 | suffix: []const u8 = "", | ||
| 24 | |||
| 25 | /// This orders versions according to the preferred usage order, not a notion of release-time ordering | ||
| 26 | /// Higher version numbers are preferred, but nonexistent minor/patch/suffix is preferred to one that does exist | ||
| 27 | /// e.g. `4.1` is preferred over `4.0` but `4` is preferred over both `4.0` and `4.1` | ||
| 28 | pub fn isLessThan(self: GCCVersion, rhs_major: i32, rhs_minor: i32, rhs_patch: i32, rhs_suffix: []const u8) bool { | ||
| 29 | if (self.major != rhs_major) { | ||
| 30 | return self.major < rhs_major; | ||
| 31 | } | ||
| 32 | if (self.minor != rhs_minor) { | ||
| 33 | if (rhs_minor == -1) return true; | ||
| 34 | if (self.minor == -1) return false; | ||
| 35 | return self.minor < rhs_minor; | ||
| 36 | } | ||
| 37 | if (self.patch != rhs_patch) { | ||
| 38 | if (rhs_patch == -1) return true; | ||
| 39 | if (self.patch == -1) return false; | ||
| 40 | return self.patch < rhs_patch; | ||
| 41 | } | ||
| 42 | if (!mem.eql(u8, self.suffix, rhs_suffix)) { | ||
| 43 | if (rhs_suffix.len == 0) return true; | ||
| 44 | if (self.suffix.len == 0) return false; | ||
| 45 | return switch (std.mem.order(u8, self.suffix, rhs_suffix)) { | ||
| 46 | .lt => true, | ||
| 47 | .eq => unreachable, | ||
| 48 | .gt => false, | ||
| 49 | }; | ||
| 50 | } | ||
| 51 | return false; | ||
| 52 | } | ||
| 53 | |||
| 54 | /// Strings in the returned GCCVersion struct have the same lifetime as `text` | ||
| 55 | pub fn parse(text: []const u8) GCCVersion { | ||
| 56 | const bad = GCCVersion{ .major = -1 }; | ||
| 57 | var good = bad; | ||
| 58 | |||
| 59 | var it = mem.splitScalar(u8, text, '.'); | ||
| 60 | const first = it.next().?; | ||
| 61 | const second = it.next() orelse ""; | ||
| 62 | const rest = it.next() orelse ""; | ||
| 63 | |||
| 64 | good.major = std.fmt.parseInt(i32, first, 10) catch return bad; | ||
| 65 | if (good.major < 0) return bad; | ||
| 66 | good.major_str = first; | ||
| 67 | |||
| 68 | if (second.len == 0) return good; | ||
| 69 | var minor_str = second; | ||
| 70 | |||
| 71 | if (rest.len == 0) { | ||
| 72 | const end = mem.indexOfNone(u8, minor_str, "0123456789") orelse minor_str.len; | ||
| 73 | if (end > 0) { | ||
| 74 | good.suffix = minor_str[end..]; | ||
| 75 | minor_str = minor_str[0..end]; | ||
| 76 | } | ||
| 77 | } | ||
| 78 | good.minor = std.fmt.parseInt(i32, minor_str, 10) catch return bad; | ||
| 79 | if (good.minor < 0) return bad; | ||
| 80 | good.minor_str = minor_str; | ||
| 81 | |||
| 82 | if (rest.len > 0) { | ||
| 83 | const end = mem.indexOfNone(u8, rest, "0123456789") orelse rest.len; | ||
| 84 | if (end > 0) { | ||
| 85 | const patch_num_text = rest[0..end]; | ||
| 86 | good.patch = std.fmt.parseInt(i32, patch_num_text, 10) catch return bad; | ||
| 87 | if (good.patch < 0) return bad; | ||
| 88 | good.suffix = rest[end..]; | ||
| 89 | } | ||
| 90 | } | ||
| 91 | |||
| 92 | return good; | ||
| 93 | } | ||
| 94 | |||
| 95 | pub fn order(a: GCCVersion, b: GCCVersion) Order { | ||
| 96 | if (a.isLessThan(b.major, b.minor, b.patch, b.suffix)) return .lt; | ||
| 97 | if (b.isLessThan(a.major, a.minor, a.patch, a.suffix)) return .gt; | ||
| 98 | return .eq; | ||
| 99 | } | ||
| 100 | |||
| 101 | test parse { | ||
| 102 | const versions = [10]GCCVersion{ | ||
| 103 | parse("5"), | ||
| 104 | parse("4"), | ||
| 105 | parse("4.2"), | ||
| 106 | parse("4.0"), | ||
| 107 | parse("4.0-patched"), | ||
| 108 | parse("4.0.2"), | ||
| 109 | parse("4.0.1"), | ||
| 110 | parse("4.0.1-patched"), | ||
| 111 | parse("4.0.0"), | ||
| 112 | parse("4.0.0-patched"), | ||
| 113 | }; | ||
| 114 | |||
| 115 | for (versions[0 .. versions.len - 1], versions[1..versions.len]) |first, second| { | ||
| 116 | try std.testing.expectEqual(Order.eq, first.order(first)); | ||
| 117 | try std.testing.expectEqual(Order.gt, first.order(second)); | ||
| 118 | try std.testing.expectEqual(Order.lt, second.order(first)); | ||
| 119 | } | ||
| 120 | const last = versions[versions.len - 1]; | ||
| 121 | try std.testing.expectEqual(Order.eq, last.order(last)); | ||
| 122 | } | ||
deps/aro/Driver/Multilib.zig deleted-72| ... | @@ -1,72 +0,0 @@ | ||
| 1 | const std = @import("std"); | ||
| 2 | const util = @import("../util.zig"); | ||
| 3 | const Filesystem = @import("Filesystem.zig").Filesystem; | ||
| 4 | |||
| 5 | pub const Flags = std.BoundedArray([]const u8, 6); | ||
| 6 | |||
| 7 | /// Large enough for GCCDetector for Linux; may need to be increased to support other toolchains. | ||
| 8 | const max_multilibs = 4; | ||
| 9 | |||
| 10 | const MultilibArray = std.BoundedArray(Multilib, max_multilibs); | ||
| 11 | |||
| 12 | pub const Detected = struct { | ||
| 13 | multilibs: MultilibArray = .{}, | ||
| 14 | selected: Multilib = .{}, | ||
| 15 | biarch_sibling: ?Multilib = null, | ||
| 16 | |||
| 17 | pub fn filter(self: *Detected, multilib_filter: Filter, fs: Filesystem) void { | ||
| 18 | var found_count: usize = 0; | ||
| 19 | for (self.multilibs.constSlice()) |multilib| { | ||
| 20 | if (multilib_filter.exists(multilib, fs)) { | ||
| 21 | self.multilibs.set(found_count, multilib); | ||
| 22 | found_count += 1; | ||
| 23 | } | ||
| 24 | } | ||
| 25 | self.multilibs.resize(found_count) catch unreachable; | ||
| 26 | } | ||
| 27 | |||
| 28 | pub fn select(self: *Detected, flags: Flags) !bool { | ||
| 29 | var filtered: MultilibArray = .{}; | ||
| 30 | for (self.multilibs.constSlice()) |multilib| { | ||
| 31 | for (multilib.flags.constSlice()) |multilib_flag| { | ||
| 32 | const matched = for (flags.constSlice()) |arg_flag| { | ||
| 33 | if (std.mem.eql(u8, arg_flag[1..], multilib_flag[1..])) break arg_flag; | ||
| 34 | } else multilib_flag; | ||
| 35 | if (matched[0] != multilib_flag[0]) break; | ||
| 36 | } else { | ||
| 37 | filtered.appendAssumeCapacity(multilib); | ||
| 38 | } | ||
| 39 | } | ||
| 40 | if (filtered.len == 0) return false; | ||
| 41 | if (filtered.len == 1) { | ||
| 42 | self.selected = filtered.get(0); | ||
| 43 | return true; | ||
| 44 | } | ||
| 45 | return error.TooManyMultilibs; | ||
| 46 | } | ||
| 47 | }; | ||
| 48 | |||
| 49 | pub const Filter = struct { | ||
| 50 | base: [2][]const u8, | ||
| 51 | file: []const u8, | ||
| 52 | pub fn exists(self: Filter, m: Multilib, fs: Filesystem) bool { | ||
| 53 | return fs.joinedExists(&.{ self.base[0], self.base[1], m.gcc_suffix, self.file }); | ||
| 54 | } | ||
| 55 | }; | ||
| 56 | |||
| 57 | const Multilib = @This(); | ||
| 58 | |||
| 59 | gcc_suffix: []const u8 = "", | ||
| 60 | os_suffix: []const u8 = "", | ||
| 61 | include_suffix: []const u8 = "", | ||
| 62 | flags: Flags = .{}, | ||
| 63 | priority: u32 = 0, | ||
| 64 | |||
| 65 | pub fn init(gcc_suffix: []const u8, os_suffix: []const u8, flags: []const []const u8) Multilib { | ||
| 66 | var self: Multilib = .{ | ||
| 67 | .gcc_suffix = gcc_suffix, | ||
| 68 | .os_suffix = os_suffix, | ||
| 69 | }; | ||
| 70 | self.flags.appendSliceAssumeCapacity(flags); | ||
| 71 | return self; | ||
| 72 | } | ||
deps/aro/InitList.zig deleted-153| ... | @@ -1,153 +0,0 @@ | ||
| 1 | //! Sparsely populated list of used indexes. | ||
| 2 | //! Used for detecting duplicate initializers. | ||
| 3 | const std = @import("std"); | ||
| 4 | const Allocator = std.mem.Allocator; | ||
| 5 | const testing = std.testing; | ||
| 6 | const Tree = @import("Tree.zig"); | ||
| 7 | const Token = Tree.Token; | ||
| 8 | const TokenIndex = Tree.TokenIndex; | ||
| 9 | const NodeIndex = Tree.NodeIndex; | ||
| 10 | const Type = @import("Type.zig"); | ||
| 11 | const Diagnostics = @import("Diagnostics.zig"); | ||
| 12 | const NodeList = std.ArrayList(NodeIndex); | ||
| 13 | const Parser = @import("Parser.zig"); | ||
| 14 | |||
| 15 | const InitList = @This(); | ||
| 16 | |||
| 17 | const Item = struct { | ||
| 18 | list: InitList = .{}, | ||
| 19 | index: u64, | ||
| 20 | |||
| 21 | fn order(_: void, a: Item, b: Item) std.math.Order { | ||
| 22 | return std.math.order(a.index, b.index); | ||
| 23 | } | ||
| 24 | }; | ||
| 25 | |||
| 26 | list: std.ArrayListUnmanaged(Item) = .{}, | ||
| 27 | node: NodeIndex = .none, | ||
| 28 | tok: TokenIndex = 0, | ||
| 29 | |||
| 30 | /// Deinitialize freeing all memory. | ||
| 31 | pub fn deinit(il: *InitList, gpa: Allocator) void { | ||
| 32 | for (il.list.items) |*item| item.list.deinit(gpa); | ||
| 33 | il.list.deinit(gpa); | ||
| 34 | il.* = undefined; | ||
| 35 | } | ||
| 36 | |||
| 37 | /// Insert initializer at index, returning previous entry if one exists. | ||
| 38 | pub fn put(il: *InitList, gpa: Allocator, index: usize, node: NodeIndex, tok: TokenIndex) !?TokenIndex { | ||
| 39 | const items = il.list.items; | ||
| 40 | var left: usize = 0; | ||
| 41 | var right: usize = items.len; | ||
| 42 | |||
| 43 | // Append new value to empty list | ||
| 44 | if (left == right) { | ||
| 45 | const item = try il.list.addOne(gpa); | ||
| 46 | item.* = .{ | ||
| 47 | .list = .{ .node = node, .tok = tok }, | ||
| 48 | .index = index, | ||
| 49 | }; | ||
| 50 | return null; | ||
| 51 | } | ||
| 52 | |||
| 53 | while (left < right) { | ||
| 54 | // Avoid overflowing in the midpoint calculation | ||
| 55 | const mid = left + (right - left) / 2; | ||
| 56 | // Compare the key with the midpoint element | ||
| 57 | switch (std.math.order(index, items[mid].index)) { | ||
| 58 | .eq => { | ||
| 59 | // Replace previous entry. | ||
| 60 | const prev = items[mid].list.tok; | ||
| 61 | items[mid].list.deinit(gpa); | ||
| 62 | items[mid] = .{ | ||
| 63 | .list = .{ .node = node, .tok = tok }, | ||
| 64 | .index = index, | ||
| 65 | }; | ||
| 66 | return prev; | ||
| 67 | }, | ||
| 68 | .gt => left = mid + 1, | ||
| 69 | .lt => right = mid, | ||
| 70 | } | ||
| 71 | } | ||
| 72 | |||
| 73 | // Insert a new value into a sorted position. | ||
| 74 | try il.list.insert(gpa, left, .{ | ||
| 75 | .list = .{ .node = node, .tok = tok }, | ||
| 76 | .index = index, | ||
| 77 | }); | ||
| 78 | return null; | ||
| 79 | } | ||
| 80 | |||
| 81 | /// Find item at index, create new if one does not exist. | ||
| 82 | pub fn find(il: *InitList, gpa: Allocator, index: u64) !*InitList { | ||
| 83 | const items = il.list.items; | ||
| 84 | var left: usize = 0; | ||
| 85 | var right: usize = items.len; | ||
| 86 | |||
| 87 | // Append new value to empty list | ||
| 88 | if (left == right) { | ||
| 89 | const item = try il.list.addOne(gpa); | ||
| 90 | item.* = .{ | ||
| 91 | .list = .{ .node = .none, .tok = 0 }, | ||
| 92 | .index = index, | ||
| 93 | }; | ||
| 94 | return &item.list; | ||
| 95 | } | ||
| 96 | |||
| 97 | while (left < right) { | ||
| 98 | // Avoid overflowing in the midpoint calculation | ||
| 99 | const mid = left + (right - left) / 2; | ||
| 100 | // Compare the key with the midpoint element | ||
| 101 | switch (std.math.order(index, items[mid].index)) { | ||
| 102 | .eq => return &items[mid].list, | ||
| 103 | .gt => left = mid + 1, | ||
| 104 | .lt => right = mid, | ||
| 105 | } | ||
| 106 | } | ||
| 107 | |||
| 108 | // Insert a new value into a sorted position. | ||
| 109 | try il.list.insert(gpa, left, .{ | ||
| 110 | .list = .{ .node = .none, .tok = 0 }, | ||
| 111 | .index = index, | ||
| 112 | }); | ||
| 113 | return &il.list.items[left].list; | ||
| 114 | } | ||
| 115 | |||
| 116 | test "basic usage" { | ||
| 117 | const gpa = testing.allocator; | ||
| 118 | var il: InitList = .{}; | ||
| 119 | defer il.deinit(gpa); | ||
| 120 | |||
| 121 | { | ||
| 122 | var i: usize = 0; | ||
| 123 | while (i < 5) : (i += 1) { | ||
| 124 | const prev = try il.put(gpa, i, .none, 0); | ||
| 125 | try testing.expect(prev == null); | ||
| 126 | } | ||
| 127 | } | ||
| 128 | |||
| 129 | { | ||
| 130 | const failing = testing.failing_allocator; | ||
| 131 | var i: usize = 0; | ||
| 132 | while (i < 5) : (i += 1) { | ||
| 133 | _ = try il.find(failing, i); | ||
| 134 | } | ||
| 135 | } | ||
| 136 | |||
| 137 | { | ||
| 138 | var item = try il.find(gpa, 0); | ||
| 139 | var i: usize = 1; | ||
| 140 | while (i < 5) : (i += 1) { | ||
| 141 | item = try item.find(gpa, i); | ||
| 142 | } | ||
| 143 | } | ||
| 144 | |||
| 145 | { | ||
| 146 | const failing = testing.failing_allocator; | ||
| 147 | var item = try il.find(failing, 0); | ||
| 148 | var i: usize = 1; | ||
| 149 | while (i < 5) : (i += 1) { | ||
| 150 | item = try item.find(failing, i); | ||
| 151 | } | ||
| 152 | } | ||
| 153 | } | ||
deps/aro/Interner.zig deleted-180| ... | @@ -1,180 +0,0 @@ | ||
| 1 | const Interner = @This(); | ||
| 2 | const std = @import("std"); | ||
| 3 | const Allocator = std.mem.Allocator; | ||
| 4 | const assert = std.debug.assert; | ||
| 5 | const Value = @import("Value.zig"); | ||
| 6 | |||
| 7 | map: std.ArrayHashMapUnmanaged(Key, void, KeyContext, false) = .{}, | ||
| 8 | |||
| 9 | const KeyContext = struct { | ||
| 10 | pub fn eql(_: @This(), a: Key, b: Key, _: usize) bool { | ||
| 11 | return b.eql(a); | ||
| 12 | } | ||
| 13 | |||
| 14 | pub fn hash(_: @This(), a: Key) u32 { | ||
| 15 | return a.hash(); | ||
| 16 | } | ||
| 17 | }; | ||
| 18 | |||
| 19 | pub const Key = union(enum) { | ||
| 20 | int: u16, | ||
| 21 | float: u16, | ||
| 22 | ptr, | ||
| 23 | noreturn, | ||
| 24 | void, | ||
| 25 | func, | ||
| 26 | array: struct { | ||
| 27 | len: u64, | ||
| 28 | child: Ref, | ||
| 29 | }, | ||
| 30 | vector: struct { | ||
| 31 | len: u32, | ||
| 32 | child: Ref, | ||
| 33 | }, | ||
| 34 | value: Value, | ||
| 35 | record: struct { | ||
| 36 | /// Pointer to user data, value used for hash and equality check. | ||
| 37 | user_ptr: *anyopaque, | ||
| 38 | /// TODO make smaller if Value is made smaller | ||
| 39 | elements: []const Ref, | ||
| 40 | }, | ||
| 41 | |||
| 42 | pub fn hash(key: Key) u32 { | ||
| 43 | var hasher = std.hash.Wyhash.init(0); | ||
| 44 | switch (key) { | ||
| 45 | .value => |val| { | ||
| 46 | std.hash.autoHash(&hasher, val.tag); | ||
| 47 | switch (val.tag) { | ||
| 48 | .unavailable => unreachable, | ||
| 49 | .nullptr_t => std.hash.autoHash(&hasher, @as(u64, 0)), | ||
| 50 | .int => std.hash.autoHash(&hasher, val.data.int), | ||
| 51 | .float => std.hash.autoHash(&hasher, @as(u64, @bitCast(val.data.float))), | ||
| 52 | .bytes => std.hash.autoHashStrat(&hasher, val.data.bytes, .Shallow), | ||
| 53 | } | ||
| 54 | }, | ||
| 55 | .record => |info| { | ||
| 56 | std.hash.autoHash(&hasher, @intFromPtr(info.user_ptr)); | ||
| 57 | }, | ||
| 58 | inline else => |info| { | ||
| 59 | std.hash.autoHash(&hasher, info); | ||
| 60 | }, | ||
| 61 | } | ||
| 62 | return @truncate(hasher.final()); | ||
| 63 | } | ||
| 64 | |||
| 65 | pub fn eql(a: Key, b: Key) bool { | ||
| 66 | const KeyTag = std.meta.Tag(Key); | ||
| 67 | const a_tag: KeyTag = a; | ||
| 68 | const b_tag: KeyTag = b; | ||
| 69 | if (a_tag != b_tag) return false; | ||
| 70 | switch (a) { | ||
| 71 | .value => |a_info| { | ||
| 72 | const b_info = b.value; | ||
| 73 | if (a_info.tag != b_info.tag) return false; | ||
| 74 | switch (a_info.tag) { | ||
| 75 | .unavailable => unreachable, | ||
| 76 | .nullptr_t => return true, | ||
| 77 | .int => return a_info.data.int == b_info.data.int, | ||
| 78 | .float => return a_info.data.float == b_info.data.float, | ||
| 79 | .bytes => return a_info.data.bytes.start == b_info.data.bytes.start and a_info.data.bytes.end == b_info.data.bytes.end, | ||
| 80 | } | ||
| 81 | }, | ||
| 82 | .record => |a_info| { | ||
| 83 | return a_info.user_ptr == b.record.user_ptr; | ||
| 84 | }, | ||
| 85 | inline else => |a_info, tag| { | ||
| 86 | const b_info = @field(b, @tagName(tag)); | ||
| 87 | return std.meta.eql(a_info, b_info); | ||
| 88 | }, | ||
| 89 | } | ||
| 90 | } | ||
| 91 | |||
| 92 | fn toRef(key: Key) ?Ref { | ||
| 93 | switch (key) { | ||
| 94 | .int => |bits| switch (bits) { | ||
| 95 | 1 => return .i1, | ||
| 96 | 8 => return .i8, | ||
| 97 | 16 => return .i16, | ||
| 98 | 32 => return .i32, | ||
| 99 | 64 => return .i64, | ||
| 100 | 128 => return .i128, | ||
| 101 | else => {}, | ||
| 102 | }, | ||
| 103 | .float => |bits| switch (bits) { | ||
| 104 | 16 => return .f16, | ||
| 105 | 32 => return .f32, | ||
| 106 | 64 => return .f64, | ||
| 107 | 80 => return .f80, | ||
| 108 | 128 => return .f128, | ||
| 109 | else => unreachable, | ||
| 110 | }, | ||
| 111 | .ptr => return .ptr, | ||
| 112 | .func => return .func, | ||
| 113 | .noreturn => return .noreturn, | ||
| 114 | .void => return .void, | ||
| 115 | else => {}, | ||
| 116 | } | ||
| 117 | return null; | ||
| 118 | } | ||
| 119 | }; | ||
| 120 | |||
| 121 | pub const Ref = enum(u32) { | ||
| 122 | const max = std.math.maxInt(u32); | ||
| 123 | |||
| 124 | ptr = max - 0, | ||
| 125 | noreturn = max - 1, | ||
| 126 | void = max - 2, | ||
| 127 | i1 = max - 3, | ||
| 128 | i8 = max - 4, | ||
| 129 | i16 = max - 5, | ||
| 130 | i32 = max - 6, | ||
| 131 | i64 = max - 7, | ||
| 132 | i128 = max - 8, | ||
| 133 | f16 = max - 9, | ||
| 134 | f32 = max - 10, | ||
| 135 | f64 = max - 11, | ||
| 136 | f80 = max - 12, | ||
| 137 | f128 = max - 13, | ||
| 138 | func = max - 14, | ||
| 139 | _, | ||
| 140 | }; | ||
| 141 | |||
| 142 | pub fn deinit(ip: *Interner, gpa: Allocator) void { | ||
| 143 | ip.map.deinit(gpa); | ||
| 144 | } | ||
| 145 | |||
| 146 | pub fn put(ip: *Interner, gpa: Allocator, key: Key) !Ref { | ||
| 147 | if (key.toRef()) |some| return some; | ||
| 148 | const gop = try ip.map.getOrPut(gpa, key); | ||
| 149 | return @enumFromInt(gop.index); | ||
| 150 | } | ||
| 151 | |||
| 152 | pub fn has(ip: *Interner, key: Key) ?Ref { | ||
| 153 | if (key.toRef()) |some| return some; | ||
| 154 | if (ip.map.getIndex(key)) |index| { | ||
| 155 | return @enumFromInt(index); | ||
| 156 | } | ||
| 157 | return null; | ||
| 158 | } | ||
| 159 | |||
| 160 | pub fn get(ip: Interner, ref: Ref) Key { | ||
| 161 | switch (ref) { | ||
| 162 | .ptr => return .ptr, | ||
| 163 | .func => return .func, | ||
| 164 | .noreturn => return .noreturn, | ||
| 165 | .void => return .void, | ||
| 166 | .i1 => return .{ .int = 1 }, | ||
| 167 | .i8 => return .{ .int = 8 }, | ||
| 168 | .i16 => return .{ .int = 16 }, | ||
| 169 | .i32 => return .{ .int = 32 }, | ||
| 170 | .i64 => return .{ .int = 64 }, | ||
| 171 | .i128 => return .{ .int = 128 }, | ||
| 172 | .f16 => return .{ .float = 16 }, | ||
| 173 | .f32 => return .{ .float = 32 }, | ||
| 174 | .f64 => return .{ .float = 64 }, | ||
| 175 | .f80 => return .{ .float = 80 }, | ||
| 176 | .f128 => return .{ .float = 128 }, | ||
| 177 | else => {}, | ||
| 178 | } | ||
| 179 | return ip.map.keys()[@intFromEnum(ref)]; | ||
| 180 | } | ||
deps/aro/Ir.zig deleted-601| ... | @@ -1,601 +0,0 @@ | ||
| 1 | const std = @import("std"); | ||
| 2 | const assert = std.debug.assert; | ||
| 3 | const Allocator = std.mem.Allocator; | ||
| 4 | const Compilation = @import("Compilation.zig"); | ||
| 5 | const Interner = @import("Interner.zig"); | ||
| 6 | const StringId = @import("StringInterner.zig").StringId; | ||
| 7 | const Value = @import("Value.zig"); | ||
| 8 | |||
| 9 | const Ir = @This(); | ||
| 10 | |||
| 11 | pool: Interner, | ||
| 12 | strings: []const u8, | ||
| 13 | // decls: std.StringArrayHashMapUnmanaged(Decl), | ||
| 14 | |||
| 15 | // pub const Decl = struct { | ||
| 16 | instructions: std.MultiArrayList(Inst), | ||
| 17 | body: std.ArrayListUnmanaged(Ref), | ||
| 18 | arena: std.heap.ArenaAllocator.State, | ||
| 19 | // }; | ||
| 20 | |||
| 21 | pub const Builder = struct { | ||
| 22 | gpa: Allocator, | ||
| 23 | arena: std.heap.ArenaAllocator, | ||
| 24 | instructions: std.MultiArrayList(Ir.Inst) = .{}, | ||
| 25 | body: std.ArrayListUnmanaged(Ref) = .{}, | ||
| 26 | alloc_count: u32 = 0, | ||
| 27 | arg_count: u32 = 0, | ||
| 28 | pool: Interner = .{}, | ||
| 29 | current_label: Ref = undefined, | ||
| 30 | |||
| 31 | pub fn deinit(b: *Builder) void { | ||
| 32 | b.arena.deinit(); | ||
| 33 | b.instructions.deinit(b.gpa); | ||
| 34 | b.body.deinit(b.gpa); | ||
| 35 | b.pool.deinit(b.gpa); | ||
| 36 | b.* = undefined; | ||
| 37 | } | ||
| 38 | |||
| 39 | pub fn startFn(b: *Builder) Allocator.Error!void { | ||
| 40 | b.alloc_count = 0; | ||
| 41 | b.arg_count = 0; | ||
| 42 | b.instructions.len = 0; | ||
| 43 | b.body.items.len = 0; | ||
| 44 | const entry = try b.makeLabel("entry"); | ||
| 45 | try b.body.append(b.gpa, entry); | ||
| 46 | b.current_label = entry; | ||
| 47 | } | ||
| 48 | |||
| 49 | pub fn startBlock(b: *Builder, label: Ref) !void { | ||
| 50 | try b.body.append(b.gpa, label); | ||
| 51 | b.current_label = label; | ||
| 52 | } | ||
| 53 | |||
| 54 | pub fn addArg(b: *Builder, ty: Interner.Ref) Allocator.Error!Ref { | ||
| 55 | const ref: Ref = @enumFromInt(b.instructions.len); | ||
| 56 | try b.instructions.append(b.gpa, .{ .tag = .arg, .data = .{ .none = {} }, .ty = ty }); | ||
| 57 | try b.body.insert(b.gpa, b.arg_count, ref); | ||
| 58 | b.arg_count += 1; | ||
| 59 | return ref; | ||
| 60 | } | ||
| 61 | |||
| 62 | pub fn addAlloc(b: *Builder, size: u32, @"align": u32) Allocator.Error!Ref { | ||
| 63 | const ref: Ref = @enumFromInt(b.instructions.len); | ||
| 64 | try b.instructions.append(b.gpa, .{ | ||
| 65 | .tag = .alloc, | ||
| 66 | .data = .{ .alloc = .{ .size = size, .@"align" = @"align" } }, | ||
| 67 | .ty = .ptr, | ||
| 68 | }); | ||
| 69 | try b.body.insert(b.gpa, b.alloc_count + b.arg_count + 1, ref); | ||
| 70 | b.alloc_count += 1; | ||
| 71 | return ref; | ||
| 72 | } | ||
| 73 | |||
| 74 | pub fn addInst(b: *Builder, tag: Ir.Inst.Tag, data: Ir.Inst.Data, ty: Interner.Ref) Allocator.Error!Ref { | ||
| 75 | const ref: Ref = @enumFromInt(b.instructions.len); | ||
| 76 | try b.instructions.append(b.gpa, .{ .tag = tag, .data = data, .ty = ty }); | ||
| 77 | try b.body.append(b.gpa, ref); | ||
| 78 | return ref; | ||
| 79 | } | ||
| 80 | |||
| 81 | pub fn makeLabel(b: *Builder, name: [*:0]const u8) Allocator.Error!Ref { | ||
| 82 | const ref: Ref = @enumFromInt(b.instructions.len); | ||
| 83 | try b.instructions.append(b.gpa, .{ .tag = .label, .data = .{ .label = name }, .ty = .void }); | ||
| 84 | return ref; | ||
| 85 | } | ||
| 86 | |||
| 87 | pub fn addJump(b: *Builder, label: Ref) Allocator.Error!void { | ||
| 88 | _ = try b.addInst(.jmp, .{ .un = label }, .noreturn); | ||
| 89 | } | ||
| 90 | |||
| 91 | pub fn addBranch(b: *Builder, cond: Ref, true_label: Ref, false_label: Ref) Allocator.Error!void { | ||
| 92 | const branch = try b.arena.allocator().create(Ir.Inst.Branch); | ||
| 93 | branch.* = .{ | ||
| 94 | .cond = cond, | ||
| 95 | .then = true_label, | ||
| 96 | .@"else" = false_label, | ||
| 97 | }; | ||
| 98 | _ = try b.addInst(.branch, .{ .branch = branch }, .noreturn); | ||
| 99 | } | ||
| 100 | |||
| 101 | pub fn addSwitch(b: *Builder, target: Ref, values: []Interner.Ref, labels: []Ref, default: Ref) Allocator.Error!void { | ||
| 102 | assert(values.len == labels.len); | ||
| 103 | const a = b.arena.allocator(); | ||
| 104 | const @"switch" = try a.create(Ir.Inst.Switch); | ||
| 105 | @"switch".* = .{ | ||
| 106 | .target = target, | ||
| 107 | .cases_len = @intCast(values.len), | ||
| 108 | .case_vals = (try a.dupe(Interner.Ref, values)).ptr, | ||
| 109 | .case_labels = (try a.dupe(Ref, labels)).ptr, | ||
| 110 | .default = default, | ||
| 111 | }; | ||
| 112 | _ = try b.addInst(.@"switch", .{ .@"switch" = @"switch" }, .noreturn); | ||
| 113 | } | ||
| 114 | |||
| 115 | pub fn addStore(b: *Builder, ptr: Ref, val: Ref) Allocator.Error!void { | ||
| 116 | _ = try b.addInst(.store, .{ .bin = .{ .lhs = ptr, .rhs = val } }, .void); | ||
| 117 | } | ||
| 118 | |||
| 119 | pub fn addConstant(b: *Builder, val: Value, ty: Interner.Ref) Allocator.Error!Ref { | ||
| 120 | const ref: Ref = @enumFromInt(b.instructions.len); | ||
| 121 | const key: Interner.Key = .{ | ||
| 122 | .value = val, | ||
| 123 | }; | ||
| 124 | const val_ref = try b.pool.put(b.gpa, key); | ||
| 125 | try b.instructions.append(b.gpa, .{ .tag = .constant, .data = .{ | ||
| 126 | .constant = val_ref, | ||
| 127 | }, .ty = ty }); | ||
| 128 | return ref; | ||
| 129 | } | ||
| 130 | |||
| 131 | pub fn addPhi(b: *Builder, inputs: []const Inst.Phi.Input, ty: Interner.Ref) Allocator.Error!Ref { | ||
| 132 | const a = b.arena.allocator(); | ||
| 133 | const input_refs = try a.alloc(Ref, inputs.len * 2 + 1); | ||
| 134 | input_refs[0] = @enumFromInt(inputs.len); | ||
| 135 | std.mem.copy(Ref, input_refs[1..], std.mem.bytesAsSlice(Ref, std.mem.sliceAsBytes(inputs))); | ||
| 136 | |||
| 137 | return b.addInst(.phi, .{ .phi = .{ .ptr = input_refs.ptr } }, ty); | ||
| 138 | } | ||
| 139 | |||
| 140 | pub fn addSelect(b: *Builder, cond: Ref, then: Ref, @"else": Ref, ty: Interner.Ref) Allocator.Error!Ref { | ||
| 141 | const branch = try b.arena.allocator().create(Ir.Inst.Branch); | ||
| 142 | branch.* = .{ | ||
| 143 | .cond = cond, | ||
| 144 | .then = then, | ||
| 145 | .@"else" = @"else", | ||
| 146 | }; | ||
| 147 | return b.addInst(.select, .{ .branch = branch }, ty); | ||
| 148 | } | ||
| 149 | }; | ||
| 150 | |||
| 151 | pub const Ref = enum(u32) { none = std.math.maxInt(u32), _ }; | ||
| 152 | |||
| 153 | pub const Inst = struct { | ||
| 154 | tag: Tag, | ||
| 155 | data: Data, | ||
| 156 | ty: Interner.Ref, | ||
| 157 | |||
| 158 | pub const Tag = enum { | ||
| 159 | // data.constant | ||
| 160 | // not included in blocks | ||
| 161 | constant, | ||
| 162 | |||
| 163 | // data.arg | ||
| 164 | // not included in blocks | ||
| 165 | arg, | ||
| 166 | symbol, | ||
| 167 | |||
| 168 | // data.label | ||
| 169 | label, | ||
| 170 | |||
| 171 | // data.block | ||
| 172 | label_addr, | ||
| 173 | jmp, | ||
| 174 | |||
| 175 | // data.switch | ||
| 176 | @"switch", | ||
| 177 | |||
| 178 | // data.branch | ||
| 179 | branch, | ||
| 180 | select, | ||
| 181 | |||
| 182 | // data.un | ||
| 183 | jmp_val, | ||
| 184 | |||
| 185 | // data.call | ||
| 186 | call, | ||
| 187 | |||
| 188 | // data.alloc | ||
| 189 | alloc, | ||
| 190 | |||
| 191 | // data.phi | ||
| 192 | phi, | ||
| 193 | |||
| 194 | // data.bin | ||
| 195 | store, | ||
| 196 | bit_or, | ||
| 197 | bit_xor, | ||
| 198 | bit_and, | ||
| 199 | bit_shl, | ||
| 200 | bit_shr, | ||
| 201 | cmp_eq, | ||
| 202 | cmp_ne, | ||
| 203 | cmp_lt, | ||
| 204 | cmp_lte, | ||
| 205 | cmp_gt, | ||
| 206 | cmp_gte, | ||
| 207 | add, | ||
| 208 | sub, | ||
| 209 | mul, | ||
| 210 | div, | ||
| 211 | mod, | ||
| 212 | |||
| 213 | // data.un | ||
| 214 | ret, | ||
| 215 | load, | ||
| 216 | bit_not, | ||
| 217 | negate, | ||
| 218 | trunc, | ||
| 219 | zext, | ||
| 220 | sext, | ||
| 221 | }; | ||
| 222 | |||
| 223 | pub const Data = union { | ||
| 224 | constant: Interner.Ref, | ||
| 225 | none: void, | ||
| 226 | bin: struct { | ||
| 227 | lhs: Ref, | ||
| 228 | rhs: Ref, | ||
| 229 | }, | ||
| 230 | un: Ref, | ||
| 231 | arg: u32, | ||
| 232 | alloc: struct { | ||
| 233 | size: u32, | ||
| 234 | @"align": u32, | ||
| 235 | }, | ||
| 236 | @"switch": *Switch, | ||
| 237 | call: *Call, | ||
| 238 | label: [*:0]const u8, | ||
| 239 | branch: *Branch, | ||
| 240 | phi: Phi, | ||
| 241 | }; | ||
| 242 | |||
| 243 | pub const Branch = struct { | ||
| 244 | cond: Ref, | ||
| 245 | then: Ref, | ||
| 246 | @"else": Ref, | ||
| 247 | }; | ||
| 248 | |||
| 249 | pub const Switch = struct { | ||
| 250 | target: Ref, | ||
| 251 | cases_len: u32, | ||
| 252 | default: Ref, | ||
| 253 | case_vals: [*]Interner.Ref, | ||
| 254 | case_labels: [*]Ref, | ||
| 255 | }; | ||
| 256 | |||
| 257 | pub const Call = struct { | ||
| 258 | func: Ref, | ||
| 259 | args_len: u32, | ||
| 260 | args_ptr: [*]Ref, | ||
| 261 | |||
| 262 | pub fn args(c: Call) []Ref { | ||
| 263 | return c.args_ptr[0..c.args_len]; | ||
| 264 | } | ||
| 265 | }; | ||
| 266 | |||
| 267 | pub const Phi = struct { | ||
| 268 | ptr: [*]Ir.Ref, | ||
| 269 | |||
| 270 | pub const Input = struct { | ||
| 271 | label: Ir.Ref, | ||
| 272 | value: Ir.Ref, | ||
| 273 | }; | ||
| 274 | |||
| 275 | pub fn inputs(p: Phi) []Input { | ||
| 276 | const len = @intFromEnum(p.ptr[0]) * 2; | ||
| 277 | const slice = (p.ptr + 1)[0..len]; | ||
| 278 | return std.mem.bytesAsSlice(Input, std.mem.sliceAsBytes(slice)); | ||
| 279 | } | ||
| 280 | }; | ||
| 281 | }; | ||
| 282 | |||
| 283 | pub fn deinit(ir: *Ir, gpa: std.mem.Allocator) void { | ||
| 284 | ir.arena.promote(gpa).deinit(); | ||
| 285 | ir.instructions.deinit(gpa); | ||
| 286 | ir.* = undefined; | ||
| 287 | } | ||
| 288 | |||
| 289 | const util = @import("util.zig"); | ||
| 290 | const TYPE = util.Color.purple; | ||
| 291 | const INST = util.Color.cyan; | ||
| 292 | const REF = util.Color.blue; | ||
| 293 | const LITERAL = util.Color.green; | ||
| 294 | const ATTRIBUTE = util.Color.yellow; | ||
| 295 | |||
| 296 | const RefMap = std.AutoArrayHashMap(Ref, void); | ||
| 297 | |||
| 298 | pub fn dump(ir: Ir, gpa: Allocator, name: []const u8, color: bool, w: anytype) !void { | ||
| 299 | const tags = ir.instructions.items(.tag); | ||
| 300 | const data = ir.instructions.items(.data); | ||
| 301 | |||
| 302 | var ref_map = RefMap.init(gpa); | ||
| 303 | defer ref_map.deinit(); | ||
| 304 | |||
| 305 | var label_map = RefMap.init(gpa); | ||
| 306 | defer label_map.deinit(); | ||
| 307 | |||
| 308 | const ret_inst = ir.body.items[ir.body.items.len - 1]; | ||
| 309 | const ret_operand = data[@intFromEnum(ret_inst)].un; | ||
| 310 | const ret_ty = ir.instructions.items(.ty)[@intFromEnum(ret_operand)]; | ||
| 311 | try ir.writeType(ret_ty, color, w); | ||
| 312 | if (color) util.setColor(REF, w); | ||
| 313 | try w.print(" @{s}", .{name}); | ||
| 314 | if (color) util.setColor(.reset, w); | ||
| 315 | try w.writeAll("("); | ||
| 316 | |||
| 317 | var arg_count: u32 = 0; | ||
| 318 | while (true) : (arg_count += 1) { | ||
| 319 | const ref = ir.body.items[arg_count]; | ||
| 320 | if (tags[@intFromEnum(ref)] != .arg) break; | ||
| 321 | if (arg_count != 0) try w.writeAll(", "); | ||
| 322 | try ref_map.put(ref, {}); | ||
| 323 | try ir.writeRef(&ref_map, ref, color, w); | ||
| 324 | if (color) util.setColor(.reset, w); | ||
| 325 | } | ||
| 326 | try w.writeAll(") {\n"); | ||
| 327 | for (ir.body.items[arg_count..]) |ref| { | ||
| 328 | switch (tags[@intFromEnum(ref)]) { | ||
| 329 | .label => try label_map.put(ref, {}), | ||
| 330 | else => {}, | ||
| 331 | } | ||
| 332 | } | ||
| 333 | |||
| 334 | for (ir.body.items[arg_count..]) |ref| { | ||
| 335 | const i = @intFromEnum(ref); | ||
| 336 | const tag = tags[i]; | ||
| 337 | switch (tag) { | ||
| 338 | .arg, .constant, .symbol => unreachable, | ||
| 339 | .label => { | ||
| 340 | const label_index = label_map.getIndex(ref).?; | ||
| 341 | if (color) util.setColor(REF, w); | ||
| 342 | try w.print("{s}.{d}:\n", .{ data[i].label, label_index }); | ||
| 343 | }, | ||
| 344 | // .label_val => { | ||
| 345 | // const un = data[i].un; | ||
| 346 | // try w.print(" %{d} = label.{d}\n", .{ i, @intFromEnum(un) }); | ||
| 347 | // }, | ||
| 348 | .jmp => { | ||
| 349 | const un = data[i].un; | ||
| 350 | if (color) util.setColor(INST, w); | ||
| 351 | try w.writeAll(" jmp "); | ||
| 352 | try ir.writeLabel(&label_map, un, color, w); | ||
| 353 | try w.writeByte('\n'); | ||
| 354 | }, | ||
| 355 | .branch => { | ||
| 356 | const br = data[i].branch; | ||
| 357 | if (color) util.setColor(INST, w); | ||
| 358 | try w.writeAll(" branch "); | ||
| 359 | try ir.writeRef(&ref_map, br.cond, color, w); | ||
| 360 | if (color) util.setColor(.reset, w); | ||
| 361 | try w.writeAll(", "); | ||
| 362 | try ir.writeLabel(&label_map, br.then, color, w); | ||
| 363 | if (color) util.setColor(.reset, w); | ||
| 364 | try w.writeAll(", "); | ||
| 365 | try ir.writeLabel(&label_map, br.@"else", color, w); | ||
| 366 | try w.writeByte('\n'); | ||
| 367 | }, | ||
| 368 | .select => { | ||
| 369 | const br = data[i].branch; | ||
| 370 | try ir.writeNewRef(&ref_map, ref, color, w); | ||
| 371 | try w.writeAll("select "); | ||
| 372 | try ir.writeRef(&ref_map, br.cond, color, w); | ||
| 373 | if (color) util.setColor(.reset, w); | ||
| 374 | try w.writeAll(", "); | ||
| 375 | try ir.writeRef(&ref_map, br.then, color, w); | ||
| 376 | if (color) util.setColor(.reset, w); | ||
| 377 | try w.writeAll(", "); | ||
| 378 | try ir.writeRef(&ref_map, br.@"else", color, w); | ||
| 379 | try w.writeByte('\n'); | ||
| 380 | }, | ||
| 381 | // .jmp_val => { | ||
| 382 | // const bin = data[i].bin; | ||
| 383 | // try w.print(" %{s} %{d} label.{d}\n", .{ @tagName(tag), @intFromEnum(bin.lhs), @intFromEnum(bin.rhs) }); | ||
| 384 | // }, | ||
| 385 | .@"switch" => { | ||
| 386 | const @"switch" = data[i].@"switch"; | ||
| 387 | if (color) util.setColor(INST, w); | ||
| 388 | try w.writeAll(" switch "); | ||
| 389 | try ir.writeRef(&ref_map, @"switch".target, color, w); | ||
| 390 | if (color) util.setColor(.reset, w); | ||
| 391 | try w.writeAll(" {"); | ||
| 392 | for (@"switch".case_vals[0..@"switch".cases_len], @"switch".case_labels) |val_ref, label_ref| { | ||
| 393 | try w.writeAll("\n "); | ||
| 394 | try ir.writeValue(val_ref, color, w); | ||
| 395 | if (color) util.setColor(.reset, w); | ||
| 396 | try w.writeAll(" => "); | ||
| 397 | try ir.writeLabel(&label_map, label_ref, color, w); | ||
| 398 | if (color) util.setColor(.reset, w); | ||
| 399 | } | ||
| 400 | if (color) util.setColor(LITERAL, w); | ||
| 401 | try w.writeAll("\n default "); | ||
| 402 | if (color) util.setColor(.reset, w); | ||
| 403 | try w.writeAll("=> "); | ||
| 404 | try ir.writeLabel(&label_map, @"switch".default, color, w); | ||
| 405 | if (color) util.setColor(.reset, w); | ||
| 406 | try w.writeAll("\n }\n"); | ||
| 407 | }, | ||
| 408 | .call => { | ||
| 409 | const call = data[i].call; | ||
| 410 | try ir.writeNewRef(&ref_map, ref, color, w); | ||
| 411 | try w.writeAll("call "); | ||
| 412 | try ir.writeRef(&ref_map, call.func, color, w); | ||
| 413 | if (color) util.setColor(.reset, w); | ||
| 414 | try w.writeAll("("); | ||
| 415 | for (call.args(), 0..) |arg, arg_i| { | ||
| 416 | if (arg_i != 0) try w.writeAll(", "); | ||
| 417 | try ir.writeRef(&ref_map, arg, color, w); | ||
| 418 | if (color) util.setColor(.reset, w); | ||
| 419 | } | ||
| 420 | try w.writeAll(")\n"); | ||
| 421 | }, | ||
| 422 | .alloc => { | ||
| 423 | const alloc = data[i].alloc; | ||
| 424 | try ir.writeNewRef(&ref_map, ref, color, w); | ||
| 425 | try w.writeAll("alloc "); | ||
| 426 | if (color) util.setColor(ATTRIBUTE, w); | ||
| 427 | try w.writeAll("size "); | ||
| 428 | if (color) util.setColor(LITERAL, w); | ||
| 429 | try w.print("{d}", .{alloc.size}); | ||
| 430 | if (color) util.setColor(ATTRIBUTE, w); | ||
| 431 | try w.writeAll(" align "); | ||
| 432 | if (color) util.setColor(LITERAL, w); | ||
| 433 | try w.print("{d}", .{alloc.@"align"}); | ||
| 434 | try w.writeByte('\n'); | ||
| 435 | }, | ||
| 436 | .phi => { | ||
| 437 | try ir.writeNewRef(&ref_map, ref, color, w); | ||
| 438 | try w.writeAll("phi"); | ||
| 439 | if (color) util.setColor(.reset, w); | ||
| 440 | try w.writeAll(" {"); | ||
| 441 | for (data[i].phi.inputs()) |input| { | ||
| 442 | try w.writeAll("\n "); | ||
| 443 | try ir.writeLabel(&label_map, input.label, color, w); | ||
| 444 | if (color) util.setColor(.reset, w); | ||
| 445 | try w.writeAll(" => "); | ||
| 446 | try ir.writeRef(&ref_map, input.value, color, w); | ||
| 447 | if (color) util.setColor(.reset, w); | ||
| 448 | } | ||
| 449 | if (color) util.setColor(.reset, w); | ||
| 450 | try w.writeAll("\n }\n"); | ||
| 451 | }, | ||
| 452 | .store => { | ||
| 453 | const bin = data[i].bin; | ||
| 454 | if (color) util.setColor(INST, w); | ||
| 455 | try w.writeAll(" store "); | ||
| 456 | try ir.writeRef(&ref_map, bin.lhs, color, w); | ||
| 457 | if (color) util.setColor(.reset, w); | ||
| 458 | try w.writeAll(", "); | ||
| 459 | try ir.writeRef(&ref_map, bin.rhs, color, w); | ||
| 460 | try w.writeByte('\n'); | ||
| 461 | }, | ||
| 462 | .ret => { | ||
| 463 | if (color) util.setColor(INST, w); | ||
| 464 | try w.writeAll(" ret "); | ||
| 465 | if (data[i].un != .none) try ir.writeRef(&ref_map, data[i].un, color, w); | ||
| 466 | try w.writeByte('\n'); | ||
| 467 | }, | ||
| 468 | .load => { | ||
| 469 | try ir.writeNewRef(&ref_map, ref, color, w); | ||
| 470 | try w.writeAll("load "); | ||
| 471 | try ir.writeRef(&ref_map, data[i].un, color, w); | ||
| 472 | try w.writeByte('\n'); | ||
| 473 | }, | ||
| 474 | .bit_or, | ||
| 475 | .bit_xor, | ||
| 476 | .bit_and, | ||
| 477 | .bit_shl, | ||
| 478 | .bit_shr, | ||
| 479 | .cmp_eq, | ||
| 480 | .cmp_ne, | ||
| 481 | .cmp_lt, | ||
| 482 | .cmp_lte, | ||
| 483 | .cmp_gt, | ||
| 484 | .cmp_gte, | ||
| 485 | .add, | ||
| 486 | .sub, | ||
| 487 | .mul, | ||
| 488 | .div, | ||
| 489 | .mod, | ||
| 490 | => { | ||
| 491 | const bin = data[i].bin; | ||
| 492 | try ir.writeNewRef(&ref_map, ref, color, w); | ||
| 493 | try w.print("{s} ", .{@tagName(tag)}); | ||
| 494 | try ir.writeRef(&ref_map, bin.lhs, color, w); | ||
| 495 | if (color) util.setColor(.reset, w); | ||
| 496 | try w.writeAll(", "); | ||
| 497 | try ir.writeRef(&ref_map, bin.rhs, color, w); | ||
| 498 | try w.writeByte('\n'); | ||
| 499 | }, | ||
| 500 | .bit_not, | ||
| 501 | .negate, | ||
| 502 | .trunc, | ||
| 503 | .zext, | ||
| 504 | .sext, | ||
| 505 | => { | ||
| 506 | const un = data[i].un; | ||
| 507 | try ir.writeNewRef(&ref_map, ref, color, w); | ||
| 508 | try w.print("{s} ", .{@tagName(tag)}); | ||
| 509 | try ir.writeRef(&ref_map, un, color, w); | ||
| 510 | try w.writeByte('\n'); | ||
| 511 | }, | ||
| 512 | .label_addr, .jmp_val => {}, | ||
| 513 | } | ||
| 514 | } | ||
| 515 | if (color) util.setColor(.reset, w); | ||
| 516 | try w.writeAll("}\n\n"); | ||
| 517 | } | ||
| 518 | |||
| 519 | fn writeType(ir: Ir, ty_ref: Interner.Ref, color: bool, w: anytype) !void { | ||
| 520 | const ty = ir.pool.get(ty_ref); | ||
| 521 | if (color) util.setColor(TYPE, w); | ||
| 522 | switch (ty) { | ||
| 523 | .value => unreachable, | ||
| 524 | .ptr, .noreturn, .void, .func => try w.writeAll(@tagName(ty)), | ||
| 525 | .int => |bits| try w.print("i{d}", .{bits}), | ||
| 526 | .float => |bits| try w.print("f{d}", .{bits}), | ||
| 527 | .array => |info| { | ||
| 528 | try w.print("[{d} * ", .{info.len}); | ||
| 529 | try ir.writeType(info.child, false, w); | ||
| 530 | try w.writeByte(']'); | ||
| 531 | }, | ||
| 532 | .vector => |info| { | ||
| 533 | try w.print("<{d} * ", .{info.len}); | ||
| 534 | try ir.writeType(info.child, false, w); | ||
| 535 | try w.writeByte('>'); | ||
| 536 | }, | ||
| 537 | .record => |info| { | ||
| 538 | // TODO collect into buffer and only print once | ||
| 539 | try w.writeAll("{ "); | ||
| 540 | for (info.elements, 0..) |elem, i| { | ||
| 541 | if (i != 0) try w.writeAll(", "); | ||
| 542 | try ir.writeType(elem, color, w); | ||
| 543 | } | ||
| 544 | try w.writeAll(" }"); | ||
| 545 | }, | ||
| 546 | } | ||
| 547 | } | ||
| 548 | |||
| 549 | fn writeValue(ir: Ir, val_ref: Interner.Ref, color: bool, w: anytype) !void { | ||
| 550 | const v = ir.pool.get(val_ref).value; | ||
| 551 | if (color) util.setColor(LITERAL, w); | ||
| 552 | switch (v.tag) { | ||
| 553 | .unavailable => try w.writeAll(" unavailable"), | ||
| 554 | .int => try w.print("{d}", .{v.data.int}), | ||
| 555 | .bytes => try w.print("\"{s}\"", .{v.data.bytes.slice(ir.strings, .@"1")}), | ||
| 556 | // std.fmt does @as instead of @floatCast | ||
| 557 | .float => try w.print("{d}", .{@as(f64, @floatCast(v.data.float))}), | ||
| 558 | else => try w.print("({s})", .{@tagName(v.tag)}), | ||
| 559 | } | ||
| 560 | } | ||
| 561 | |||
| 562 | fn writeRef(ir: Ir, ref_map: *RefMap, ref: Ref, color: bool, w: anytype) !void { | ||
| 563 | assert(ref != .none); | ||
| 564 | const index = @intFromEnum(ref); | ||
| 565 | const ty_ref = ir.instructions.items(.ty)[index]; | ||
| 566 | if (ir.instructions.items(.tag)[index] == .constant) { | ||
| 567 | try ir.writeType(ty_ref, color, w); | ||
| 568 | const v_ref = ir.instructions.items(.data)[index].constant; | ||
| 569 | try w.writeByte(' '); | ||
| 570 | try ir.writeValue(v_ref, color, w); | ||
| 571 | return; | ||
| 572 | } else if (ir.instructions.items(.tag)[index] == .symbol) { | ||
| 573 | const name = ir.instructions.items(.data)[index].label; | ||
| 574 | try ir.writeType(ty_ref, color, w); | ||
| 575 | if (color) util.setColor(REF, w); | ||
| 576 | try w.print(" @{s}", .{name}); | ||
| 577 | return; | ||
| 578 | } | ||
| 579 | try ir.writeType(ty_ref, color, w); | ||
| 580 | if (color) util.setColor(REF, w); | ||
| 581 | const ref_index = ref_map.getIndex(ref).?; | ||
| 582 | try w.print(" %{d}", .{ref_index}); | ||
| 583 | } | ||
| 584 | |||
| 585 | fn writeNewRef(ir: Ir, ref_map: *RefMap, ref: Ref, color: bool, w: anytype) !void { | ||
| 586 | try ref_map.put(ref, {}); | ||
| 587 | try w.writeAll(" "); | ||
| 588 | try ir.writeRef(ref_map, ref, color, w); | ||
| 589 | if (color) util.setColor(.reset, w); | ||
| 590 | try w.writeAll(" = "); | ||
| 591 | if (color) util.setColor(INST, w); | ||
| 592 | } | ||
| 593 | |||
| 594 | fn writeLabel(ir: Ir, label_map: *RefMap, ref: Ref, color: bool, w: anytype) !void { | ||
| 595 | assert(ref != .none); | ||
| 596 | const index = @intFromEnum(ref); | ||
| 597 | const label = ir.instructions.items(.data)[index].label; | ||
| 598 | if (color) util.setColor(REF, w); | ||
| 599 | const label_index = label_map.getIndex(ref).?; | ||
| 600 | try w.print("{s}.{d}", .{ label, label_index }); | ||
| 601 | } | ||
deps/aro/LangOpts.zig deleted-166| ... | @@ -1,166 +0,0 @@ | ||
| 1 | const std = @import("std"); | ||
| 2 | const DiagnosticTag = @import("Diagnostics.zig").Tag; | ||
| 3 | const CharInfo = @import("CharInfo.zig"); | ||
| 4 | |||
| 5 | const LangOpts = @This(); | ||
| 6 | |||
| 7 | pub const Compiler = enum { | ||
| 8 | clang, | ||
| 9 | gcc, | ||
| 10 | msvc, | ||
| 11 | }; | ||
| 12 | |||
| 13 | /// The floating-point evaluation method for intermediate results within a single expression | ||
| 14 | pub const FPEvalMethod = enum(i8) { | ||
| 15 | /// The evaluation method cannot be determined or is inconsistent for this target. | ||
| 16 | indeterminate = -1, | ||
| 17 | /// Use the type declared in the source | ||
| 18 | source = 0, | ||
| 19 | /// Use double as the floating-point evaluation method for all float expressions narrower than double. | ||
| 20 | double = 1, | ||
| 21 | /// Use long double as the floating-point evaluation method for all float expressions narrower than long double. | ||
| 22 | extended = 2, | ||
| 23 | }; | ||
| 24 | |||
| 25 | pub const Standard = enum { | ||
| 26 | /// ISO C 1990 | ||
| 27 | c89, | ||
| 28 | /// ISO C 1990 with amendment 1 | ||
| 29 | iso9899, | ||
| 30 | /// ISO C 1990 with GNU extensions | ||
| 31 | gnu89, | ||
| 32 | /// ISO C 1999 | ||
| 33 | c99, | ||
| 34 | /// ISO C 1999 with GNU extensions | ||
| 35 | gnu99, | ||
| 36 | /// ISO C 2011 | ||
| 37 | c11, | ||
| 38 | /// ISO C 2011 with GNU extensions | ||
| 39 | gnu11, | ||
| 40 | /// ISO C 2017 | ||
| 41 | c17, | ||
| 42 | /// Default value if nothing specified; adds the GNU keywords to | ||
| 43 | /// C17 but does not suppress warnings about using GNU extensions | ||
| 44 | default, | ||
| 45 | /// ISO C 2017 with GNU extensions | ||
| 46 | gnu17, | ||
| 47 | /// Working Draft for ISO C2x | ||
| 48 | c2x, | ||
| 49 | /// Working Draft for ISO C2x with GNU extensions | ||
| 50 | gnu2x, | ||
| 51 | |||
| 52 | const NameMap = std.ComptimeStringMap(Standard, .{ | ||
| 53 | .{ "c89", .c89 }, .{ "c90", .c89 }, .{ "iso9899:1990", .c89 }, | ||
| 54 | .{ "iso9899:199409", .iso9899 }, .{ "gnu89", .gnu89 }, .{ "gnu90", .gnu89 }, | ||
| 55 | .{ "c99", .c99 }, .{ "iso9899:1999", .c99 }, .{ "gnu99", .gnu99 }, | ||
| 56 | .{ "c11", .c11 }, .{ "iso9899:2011", .c11 }, .{ "gnu11", .gnu11 }, | ||
| 57 | .{ "c17", .c17 }, .{ "iso9899:2017", .c17 }, .{ "c18", .c17 }, | ||
| 58 | .{ "iso9899:2018", .c17 }, .{ "gnu17", .gnu17 }, .{ "gnu18", .gnu17 }, | ||
| 59 | .{ "c2x", .c2x }, .{ "gnu2x", .gnu2x }, | ||
| 60 | }); | ||
| 61 | |||
| 62 | pub fn atLeast(self: Standard, other: Standard) bool { | ||
| 63 | return @intFromEnum(self) >= @intFromEnum(other); | ||
| 64 | } | ||
| 65 | |||
| 66 | pub fn isGNU(standard: Standard) bool { | ||
| 67 | return switch (standard) { | ||
| 68 | .gnu89, .gnu99, .gnu11, .default, .gnu17, .gnu2x => true, | ||
| 69 | else => false, | ||
| 70 | }; | ||
| 71 | } | ||
| 72 | |||
| 73 | pub fn isExplicitGNU(standard: Standard) bool { | ||
| 74 | return standard.isGNU() and standard != .default; | ||
| 75 | } | ||
| 76 | |||
| 77 | /// Value reported by __STDC_VERSION__ macro | ||
| 78 | pub fn StdCVersionMacro(standard: Standard) ?[]const u8 { | ||
| 79 | return switch (standard) { | ||
| 80 | .c89, .gnu89 => null, | ||
| 81 | .iso9899 => "199409L", | ||
| 82 | .c99, .gnu99 => "199901L", | ||
| 83 | .c11, .gnu11 => "201112L", | ||
| 84 | .default, .c17, .gnu17 => "201710L", | ||
| 85 | // todo: subject to change, verify once c23 finalized | ||
| 86 | .c2x, .gnu2x => "202311L", | ||
| 87 | }; | ||
| 88 | } | ||
| 89 | |||
| 90 | pub fn codepointAllowedInIdentifier(standard: Standard, codepoint: u21, is_start: bool) bool { | ||
| 91 | if (is_start) { | ||
| 92 | return if (standard.atLeast(.c11)) | ||
| 93 | CharInfo.isC11IdChar(codepoint) and !CharInfo.isC11DisallowedInitialIdChar(codepoint) | ||
| 94 | else | ||
| 95 | CharInfo.isC99IdChar(codepoint) and !CharInfo.isC99DisallowedInitialIDChar(codepoint); | ||
| 96 | } else { | ||
| 97 | return if (standard.atLeast(.c11)) | ||
| 98 | CharInfo.isC11IdChar(codepoint) | ||
| 99 | else | ||
| 100 | CharInfo.isC99IdChar(codepoint); | ||
| 101 | } | ||
| 102 | } | ||
| 103 | }; | ||
| 104 | |||
| 105 | emulate: Compiler = .clang, | ||
| 106 | standard: Standard = .default, | ||
| 107 | /// -fshort-enums option, makes enums only take up as much space as they need to hold all the values. | ||
| 108 | short_enums: bool = false, | ||
| 109 | dollars_in_identifiers: bool = true, | ||
| 110 | declspec_attrs: bool = false, | ||
| 111 | ms_extensions: bool = false, | ||
| 112 | /// true or false if digraph support explicitly enabled/disabled with -fdigraphs/-fno-digraphs | ||
| 113 | digraphs: ?bool = null, | ||
| 114 | /// If set, use the native half type instead of promoting to float | ||
| 115 | use_native_half_type: bool = false, | ||
| 116 | /// If set, function arguments and return values may be of type __fp16 even if there is no standard ABI for it | ||
| 117 | allow_half_args_and_returns: bool = false, | ||
| 118 | /// null indicates that the user did not select a value, use target to determine default | ||
| 119 | fp_eval_method: ?FPEvalMethod = null, | ||
| 120 | /// If set, use specified signedness for `char` instead of the target's default char signedness | ||
| 121 | char_signedness_override: ?std.builtin.Signedness = null, | ||
| 122 | /// If set, override the default availability of char8_t (by default, enabled in C2X and later; disabled otherwise) | ||
| 123 | has_char8_t_override: ?bool = null, | ||
| 124 | |||
| 125 | /// Whether to allow GNU-style inline assembly | ||
| 126 | gnu_asm: bool = true, | ||
| 127 | |||
| 128 | /// Preserve comments when preprocessing | ||
| 129 | preserve_comments: bool = false, | ||
| 130 | /// Preserve comments in macros when preprocessing | ||
| 131 | preserve_comments_in_macros: bool = false, | ||
| 132 | |||
| 133 | pub fn setStandard(self: *LangOpts, name: []const u8) error{InvalidStandard}!void { | ||
| 134 | self.standard = Standard.NameMap.get(name) orelse return error.InvalidStandard; | ||
| 135 | } | ||
| 136 | |||
| 137 | pub fn enableMSExtensions(self: *LangOpts) void { | ||
| 138 | self.declspec_attrs = true; | ||
| 139 | self.ms_extensions = true; | ||
| 140 | } | ||
| 141 | |||
| 142 | pub fn disableMSExtensions(self: *LangOpts) void { | ||
| 143 | self.declspec_attrs = false; | ||
| 144 | self.ms_extensions = true; | ||
| 145 | } | ||
| 146 | |||
| 147 | pub fn hasChar8_T(self: *const LangOpts) bool { | ||
| 148 | return self.has_char8_t_override orelse self.standard.atLeast(.c2x); | ||
| 149 | } | ||
| 150 | |||
| 151 | pub fn hasDigraphs(self: *const LangOpts) bool { | ||
| 152 | return self.digraphs orelse self.standard.atLeast(.gnu89); | ||
| 153 | } | ||
| 154 | |||
| 155 | pub fn setEmulatedCompiler(self: *LangOpts, compiler: Compiler) void { | ||
| 156 | self.emulate = compiler; | ||
| 157 | if (compiler == .msvc) self.enableMSExtensions(); | ||
| 158 | } | ||
| 159 | |||
| 160 | pub fn setFpEvalMethod(self: *LangOpts, fp_eval_method: FPEvalMethod) void { | ||
| 161 | self.fp_eval_method = fp_eval_method; | ||
| 162 | } | ||
| 163 | |||
| 164 | pub fn setCharSignedness(self: *LangOpts, signedness: std.builtin.Signedness) void { | ||
| 165 | self.char_signedness_override = signedness; | ||
| 166 | } | ||
deps/aro/Object.zig deleted-73| ... | @@ -1,73 +0,0 @@ | ||
| 1 | const std = @import("std"); | ||
| 2 | const Compilation = @import("Compilation.zig"); | ||
| 3 | const Elf = @import("object/Elf.zig"); | ||
| 4 | |||
| 5 | const Object = @This(); | ||
| 6 | |||
| 7 | format: std.Target.ObjectFormat, | ||
| 8 | comp: *Compilation, | ||
| 9 | |||
| 10 | pub fn create(comp: *Compilation) !*Object { | ||
| 11 | switch (comp.target.ofmt) { | ||
| 12 | .elf => return Elf.create(comp), | ||
| 13 | else => unreachable, | ||
| 14 | } | ||
| 15 | } | ||
| 16 | |||
| 17 | pub fn deinit(obj: *Object) void { | ||
| 18 | switch (obj.format) { | ||
| 19 | .elf => @fieldParentPtr(Elf, "obj", obj).deinit(), | ||
| 20 | else => unreachable, | ||
| 21 | } | ||
| 22 | } | ||
| 23 | |||
| 24 | pub const Section = union(enum) { | ||
| 25 | undefined, | ||
| 26 | data, | ||
| 27 | read_only_data, | ||
| 28 | func, | ||
| 29 | strings, | ||
| 30 | custom: []const u8, | ||
| 31 | }; | ||
| 32 | |||
| 33 | pub fn getSection(obj: *Object, section: Section) !*std.ArrayList(u8) { | ||
| 34 | switch (obj.format) { | ||
| 35 | .elf => return @fieldParentPtr(Elf, "obj", obj).getSection(section), | ||
| 36 | else => unreachable, | ||
| 37 | } | ||
| 38 | } | ||
| 39 | |||
| 40 | pub const SymbolType = enum { | ||
| 41 | func, | ||
| 42 | variable, | ||
| 43 | external, | ||
| 44 | }; | ||
| 45 | |||
| 46 | pub fn declareSymbol( | ||
| 47 | obj: *Object, | ||
| 48 | section: Section, | ||
| 49 | name: ?[]const u8, | ||
| 50 | linkage: std.builtin.GlobalLinkage, | ||
| 51 | @"type": SymbolType, | ||
| 52 | offset: u64, | ||
| 53 | size: u64, | ||
| 54 | ) ![]const u8 { | ||
| 55 | switch (obj.format) { | ||
| 56 | .elf => return @fieldParentPtr(Elf, "obj", obj).declareSymbol(section, name, linkage, @"type", offset, size), | ||
| 57 | else => unreachable, | ||
| 58 | } | ||
| 59 | } | ||
| 60 | |||
| 61 | pub fn addRelocation(obj: *Object, name: []const u8, section: Section, address: u64, addend: i64) !void { | ||
| 62 | switch (obj.format) { | ||
| 63 | .elf => return @fieldParentPtr(Elf, "obj", obj).addRelocation(name, section, address, addend), | ||
| 64 | else => unreachable, | ||
| 65 | } | ||
| 66 | } | ||
| 67 | |||
| 68 | pub fn finish(obj: *Object, file: std.fs.File) !void { | ||
| 69 | switch (obj.format) { | ||
| 70 | .elf => return @fieldParentPtr(Elf, "obj", obj).finish(file), | ||
| 71 | else => unreachable, | ||
| 72 | } | ||
| 73 | } | ||
deps/aro/Parser.zig deleted-8218| ... | @@ -1,8218 +0,0 @@ | ||
| 1 | const std = @import("std"); | ||
| 2 | const mem = std.mem; | ||
| 3 | const Allocator = mem.Allocator; | ||
| 4 | const assert = std.debug.assert; | ||
| 5 | const big = std.math.big; | ||
| 6 | const Compilation = @import("Compilation.zig"); | ||
| 7 | const Source = @import("Source.zig"); | ||
| 8 | const Tokenizer = @import("Tokenizer.zig"); | ||
| 9 | const Preprocessor = @import("Preprocessor.zig"); | ||
| 10 | const Tree = @import("Tree.zig"); | ||
| 11 | const Token = Tree.Token; | ||
| 12 | const TokenIndex = Tree.TokenIndex; | ||
| 13 | const NodeIndex = Tree.NodeIndex; | ||
| 14 | const Type = @import("Type.zig"); | ||
| 15 | const Diagnostics = @import("Diagnostics.zig"); | ||
| 16 | const NodeList = std.ArrayList(NodeIndex); | ||
| 17 | const InitList = @import("InitList.zig"); | ||
| 18 | const Attribute = @import("Attribute.zig"); | ||
| 19 | const CharInfo = @import("CharInfo.zig"); | ||
| 20 | const TextLiteral = @import("TextLiteral.zig"); | ||
| 21 | const Value = @import("Value.zig"); | ||
| 22 | const SymbolStack = @import("SymbolStack.zig"); | ||
| 23 | const Symbol = SymbolStack.Symbol; | ||
| 24 | const record_layout = @import("record_layout.zig"); | ||
| 25 | const StringId = @import("StringInterner.zig").StringId; | ||
| 26 | const number_affixes = @import("number_affixes.zig"); | ||
| 27 | const NumberPrefix = number_affixes.Prefix; | ||
| 28 | const NumberSuffix = number_affixes.Suffix; | ||
| 29 | const Builtins = @import("Builtins.zig"); | ||
| 30 | const Builtin = Builtins.Builtin; | ||
| 31 | const target_util = @import("target.zig"); | ||
| 32 | |||
| 33 | const Parser = @This(); | ||
| 34 | |||
| 35 | const Switch = struct { | ||
| 36 | default: ?TokenIndex = null, | ||
| 37 | ranges: std.ArrayList(Range), | ||
| 38 | ty: Type, | ||
| 39 | |||
| 40 | const Range = struct { | ||
| 41 | first: Value, | ||
| 42 | last: Value, | ||
| 43 | tok: TokenIndex, | ||
| 44 | }; | ||
| 45 | |||
| 46 | fn add( | ||
| 47 | self: *Switch, | ||
| 48 | comp: *Compilation, | ||
| 49 | first: Value, | ||
| 50 | last: Value, | ||
| 51 | tok: TokenIndex, | ||
| 52 | ) !?Range { | ||
| 53 | for (self.ranges.items) |range| { | ||
| 54 | if (last.compare(.gte, range.first, self.ty, comp) and first.compare(.lte, range.last, self.ty, comp)) { | ||
| 55 | return range; // They overlap. | ||
| 56 | } | ||
| 57 | } | ||
| 58 | try self.ranges.append(.{ | ||
| 59 | .first = first, | ||
| 60 | .last = last, | ||
| 61 | .tok = tok, | ||
| 62 | }); | ||
| 63 | return null; | ||
| 64 | } | ||
| 65 | }; | ||
| 66 | |||
| 67 | const Label = union(enum) { | ||
| 68 | unresolved_goto: TokenIndex, | ||
| 69 | label: TokenIndex, | ||
| 70 | }; | ||
| 71 | |||
| 72 | pub const Error = Compilation.Error || error{ParsingFailed}; | ||
| 73 | |||
| 74 | /// An attribute that has been parsed but not yet validated in its context | ||
| 75 | const TentativeAttribute = struct { | ||
| 76 | attr: Attribute, | ||
| 77 | tok: TokenIndex, | ||
| 78 | }; | ||
| 79 | |||
| 80 | /// How the parser handles const int decl references when it is expecting an integer | ||
| 81 | /// constant expression. | ||
| 82 | const ConstDeclFoldingMode = enum { | ||
| 83 | /// fold const decls as if they were literals | ||
| 84 | fold_const_decls, | ||
| 85 | /// fold const decls as if they were literals and issue GNU extension diagnostic | ||
| 86 | gnu_folding_extension, | ||
| 87 | /// fold const decls as if they were literals and issue VLA diagnostic | ||
| 88 | gnu_vla_folding_extension, | ||
| 89 | /// folding const decls is prohibited; return an unavailable value | ||
| 90 | no_const_decl_folding, | ||
| 91 | }; | ||
| 92 | |||
| 93 | // values from preprocessor | ||
| 94 | pp: *Preprocessor, | ||
| 95 | comp: *Compilation, | ||
| 96 | gpa: mem.Allocator, | ||
| 97 | tok_ids: []const Token.Id, | ||
| 98 | tok_i: TokenIndex = 0, | ||
| 99 | |||
| 100 | // values of the incomplete Tree | ||
| 101 | arena: Allocator, | ||
| 102 | nodes: Tree.Node.List = .{}, | ||
| 103 | data: NodeList, | ||
| 104 | retained_strings: std.ArrayList(u8), | ||
| 105 | value_map: Tree.ValueMap, | ||
| 106 | |||
| 107 | // buffers used during compilation | ||
| 108 | syms: SymbolStack = .{}, | ||
| 109 | strings: std.ArrayList(u8), | ||
| 110 | labels: std.ArrayList(Label), | ||
| 111 | list_buf: NodeList, | ||
| 112 | decl_buf: NodeList, | ||
| 113 | param_buf: std.ArrayList(Type.Func.Param), | ||
| 114 | enum_buf: std.ArrayList(Type.Enum.Field), | ||
| 115 | record_buf: std.ArrayList(Type.Record.Field), | ||
| 116 | attr_buf: std.MultiArrayList(TentativeAttribute) = .{}, | ||
| 117 | attr_application_buf: std.ArrayListUnmanaged(Attribute) = .{}, | ||
| 118 | field_attr_buf: std.ArrayList([]const Attribute), | ||
| 119 | /// type name -> variable name location for tentative definitions (top-level defs with thus-far-incomplete types) | ||
| 120 | /// e.g. `struct Foo bar;` where `struct Foo` is not defined yet. | ||
| 121 | /// The key is the StringId of `Foo` and the value is the TokenIndex of `bar` | ||
| 122 | /// Items are removed if the type is subsequently completed with a definition. | ||
| 123 | /// We only store the first tentative definition that uses a given type because this map is only used | ||
| 124 | /// for issuing an error message, and correcting the first error for a type will fix all of them for that type. | ||
| 125 | tentative_defs: std.AutoHashMapUnmanaged(StringId, TokenIndex) = .{}, | ||
| 126 | |||
| 127 | // configuration and miscellaneous info | ||
| 128 | no_eval: bool = false, | ||
| 129 | in_macro: bool = false, | ||
| 130 | extension_suppressed: bool = false, | ||
| 131 | contains_address_of_label: bool = false, | ||
| 132 | label_count: u32 = 0, | ||
| 133 | const_decl_folding: ConstDeclFoldingMode = .fold_const_decls, | ||
| 134 | /// location of first computed goto in function currently being parsed | ||
| 135 | /// if a computed goto is used, the function must contain an | ||
| 136 | /// address-of-label expression (tracked with contains_address_of_label) | ||
| 137 | computed_goto_tok: ?TokenIndex = null, | ||
| 138 | |||
| 139 | /// Various variables that are different for each function. | ||
| 140 | func: struct { | ||
| 141 | /// null if not in function, will always be plain func, var_args_func or old_style_func | ||
| 142 | ty: ?Type = null, | ||
| 143 | name: TokenIndex = 0, | ||
| 144 | ident: ?Result = null, | ||
| 145 | pretty_ident: ?Result = null, | ||
| 146 | } = .{}, | ||
| 147 | /// Various variables that are different for each record. | ||
| 148 | record: struct { | ||
| 149 | // invalid means we're not parsing a record | ||
| 150 | kind: Token.Id = .invalid, | ||
| 151 | flexible_field: ?TokenIndex = null, | ||
| 152 | start: usize = 0, | ||
| 153 | field_attr_start: usize = 0, | ||
| 154 | |||
| 155 | fn addField(r: @This(), p: *Parser, name: StringId, tok: TokenIndex) Error!void { | ||
| 156 | var i = p.record_members.items.len; | ||
| 157 | while (i > r.start) { | ||
| 158 | i -= 1; | ||
| 159 | if (p.record_members.items[i].name == name) { | ||
| 160 | try p.errStr(.duplicate_member, tok, p.tokSlice(tok)); | ||
| 161 | try p.errTok(.previous_definition, p.record_members.items[i].tok); | ||
| 162 | break; | ||
| 163 | } | ||
| 164 | } | ||
| 165 | try p.record_members.append(p.gpa, .{ .name = name, .tok = tok }); | ||
| 166 | } | ||
| 167 | |||
| 168 | fn addFieldsFromAnonymous(r: @This(), p: *Parser, ty: Type) Error!void { | ||
| 169 | for (ty.data.record.fields) |f| { | ||
| 170 | if (f.isAnonymousRecord()) { | ||
| 171 | try r.addFieldsFromAnonymous(p, f.ty.canonicalize(.standard)); | ||
| 172 | } else if (f.name_tok != 0) { | ||
| 173 | try r.addField(p, f.name, f.name_tok); | ||
| 174 | } | ||
| 175 | } | ||
| 176 | } | ||
| 177 | } = .{}, | ||
| 178 | record_members: std.ArrayListUnmanaged(struct { tok: TokenIndex, name: StringId }) = .{}, | ||
| 179 | @"switch": ?*Switch = null, | ||
| 180 | in_loop: bool = false, | ||
| 181 | pragma_pack: ?u8 = null, | ||
| 182 | string_ids: struct { | ||
| 183 | declspec_id: StringId, | ||
| 184 | main_id: StringId, | ||
| 185 | file: StringId, | ||
| 186 | jmp_buf: StringId, | ||
| 187 | sigjmp_buf: StringId, | ||
| 188 | ucontext_t: StringId, | ||
| 189 | }, | ||
| 190 | |||
| 191 | /// Checks codepoint for various pedantic warnings | ||
| 192 | /// Returns true if diagnostic issued | ||
| 193 | fn checkIdentifierCodepointWarnings(comp: *Compilation, codepoint: u21, loc: Source.Location) Compilation.Error!bool { | ||
| 194 | assert(codepoint >= 0x80); | ||
| 195 | |||
| 196 | const err_start = comp.diag.list.items.len; | ||
| 197 | |||
| 198 | if (!CharInfo.isC99IdChar(codepoint)) { | ||
| 199 | try comp.diag.add(.{ | ||
| 200 | .tag = .c99_compat, | ||
| 201 | .loc = loc, | ||
| 202 | }, &.{}); | ||
| 203 | } | ||
| 204 | if (CharInfo.isInvisible(codepoint)) { | ||
| 205 | try comp.diag.add(.{ | ||
| 206 | .tag = .unicode_zero_width, | ||
| 207 | .loc = loc, | ||
| 208 | .extra = .{ .actual_codepoint = codepoint }, | ||
| 209 | }, &.{}); | ||
| 210 | } | ||
| 211 | if (CharInfo.homoglyph(codepoint)) |resembles| { | ||
| 212 | try comp.diag.add(.{ | ||
| 213 | .tag = .unicode_homoglyph, | ||
| 214 | .loc = loc, | ||
| 215 | .extra = .{ .codepoints = .{ .actual = codepoint, .resembles = resembles } }, | ||
| 216 | }, &.{}); | ||
| 217 | } | ||
| 218 | return comp.diag.list.items.len != err_start; | ||
| 219 | } | ||
| 220 | |||
| 221 | /// Issues diagnostics for the current extended identifier token | ||
| 222 | /// Return value indicates whether the token should be considered an identifier | ||
| 223 | /// true means consider the token to actually be an identifier | ||
| 224 | /// false means it is not | ||
| 225 | fn validateExtendedIdentifier(p: *Parser) !bool { | ||
| 226 | assert(p.tok_ids[p.tok_i] == .extended_identifier); | ||
| 227 | |||
| 228 | const slice = p.tokSlice(p.tok_i); | ||
| 229 | const view = std.unicode.Utf8View.init(slice) catch { | ||
| 230 | try p.errTok(.invalid_utf8, p.tok_i); | ||
| 231 | return error.FatalError; | ||
| 232 | }; | ||
| 233 | var it = view.iterator(); | ||
| 234 | |||
| 235 | var valid_identifier = true; | ||
| 236 | var warned = false; | ||
| 237 | var len: usize = 0; | ||
| 238 | var invalid_char: u21 = undefined; | ||
| 239 | var loc = p.pp.tokens.items(.loc)[p.tok_i]; | ||
| 240 | |||
| 241 | const standard = p.comp.langopts.standard; | ||
| 242 | while (it.nextCodepoint()) |codepoint| { | ||
| 243 | defer { | ||
| 244 | len += 1; | ||
| 245 | loc.byte_offset += std.unicode.utf8CodepointSequenceLength(codepoint) catch unreachable; | ||
| 246 | } | ||
| 247 | if (codepoint == '$') { | ||
| 248 | warned = true; | ||
| 249 | try p.comp.diag.add(.{ | ||
| 250 | .tag = .dollar_in_identifier_extension, | ||
| 251 | .loc = loc, | ||
| 252 | }, &.{}); | ||
| 253 | } | ||
| 254 | |||
| 255 | if (codepoint <= 0x7F) continue; | ||
| 256 | if (!valid_identifier) continue; | ||
| 257 | |||
| 258 | const allowed = standard.codepointAllowedInIdentifier(codepoint, len == 0); | ||
| 259 | if (!allowed) { | ||
| 260 | invalid_char = codepoint; | ||
| 261 | valid_identifier = false; | ||
| 262 | continue; | ||
| 263 | } | ||
| 264 | |||
| 265 | if (!warned) { | ||
| 266 | warned = try checkIdentifierCodepointWarnings(p.comp, codepoint, loc); | ||
| 267 | } | ||
| 268 | } | ||
| 269 | |||
| 270 | if (!valid_identifier) { | ||
| 271 | if (len == 1) { | ||
| 272 | try p.errExtra(.unexpected_character, p.tok_i, .{ .actual_codepoint = invalid_char }); | ||
| 273 | return false; | ||
| 274 | } else { | ||
| 275 | try p.errExtra(.invalid_identifier_start_char, p.tok_i, .{ .actual_codepoint = invalid_char }); | ||
| 276 | } | ||
| 277 | } | ||
| 278 | |||
| 279 | return true; | ||
| 280 | } | ||
| 281 | |||
| 282 | fn eatIdentifier(p: *Parser) !?TokenIndex { | ||
| 283 | switch (p.tok_ids[p.tok_i]) { | ||
| 284 | .identifier => {}, | ||
| 285 | .extended_identifier => { | ||
| 286 | if (!try p.validateExtendedIdentifier()) { | ||
| 287 | p.tok_i += 1; | ||
| 288 | return null; | ||
| 289 | } | ||
| 290 | }, | ||
| 291 | else => return null, | ||
| 292 | } | ||
| 293 | p.tok_i += 1; | ||
| 294 | |||
| 295 | // Handle illegal '$' characters in identifiers | ||
| 296 | if (!p.comp.langopts.dollars_in_identifiers) { | ||
| 297 | if (p.tok_ids[p.tok_i] == .invalid and p.tokSlice(p.tok_i)[0] == '$') { | ||
| 298 | try p.err(.dollars_in_identifiers); | ||
| 299 | p.tok_i += 1; | ||
| 300 | return error.ParsingFailed; | ||
| 301 | } | ||
| 302 | } | ||
| 303 | |||
| 304 | return p.tok_i - 1; | ||
| 305 | } | ||
| 306 | |||
| 307 | fn expectIdentifier(p: *Parser) Error!TokenIndex { | ||
| 308 | const actual = p.tok_ids[p.tok_i]; | ||
| 309 | if (actual != .identifier and actual != .extended_identifier) { | ||
| 310 | return p.errExpectedToken(.identifier, actual); | ||
| 311 | } | ||
| 312 | |||
| 313 | return (try p.eatIdentifier()) orelse unreachable; | ||
| 314 | } | ||
| 315 | |||
| 316 | fn eatToken(p: *Parser, id: Token.Id) ?TokenIndex { | ||
| 317 | assert(id != .identifier and id != .extended_identifier); // use eatIdentifier | ||
| 318 | if (p.tok_ids[p.tok_i] == id) { | ||
| 319 | defer p.tok_i += 1; | ||
| 320 | return p.tok_i; | ||
| 321 | } else return null; | ||
| 322 | } | ||
| 323 | |||
| 324 | fn expectToken(p: *Parser, expected: Token.Id) Error!TokenIndex { | ||
| 325 | assert(expected != .identifier and expected != .extended_identifier); // use expectIdentifier | ||
| 326 | const actual = p.tok_ids[p.tok_i]; | ||
| 327 | if (actual != expected) return p.errExpectedToken(expected, actual); | ||
| 328 | defer p.tok_i += 1; | ||
| 329 | return p.tok_i; | ||
| 330 | } | ||
| 331 | |||
| 332 | pub fn tokSlice(p: *Parser, tok: TokenIndex) []const u8 { | ||
| 333 | if (p.tok_ids[tok].lexeme()) |some| return some; | ||
| 334 | const loc = p.pp.tokens.items(.loc)[tok]; | ||
| 335 | var tmp_tokenizer = Tokenizer{ | ||
| 336 | .buf = p.comp.getSource(loc.id).buf, | ||
| 337 | .comp = p.comp, | ||
| 338 | .index = loc.byte_offset, | ||
| 339 | .source = .generated, | ||
| 340 | }; | ||
| 341 | const res = tmp_tokenizer.next(); | ||
| 342 | return tmp_tokenizer.buf[res.start..res.end]; | ||
| 343 | } | ||
| 344 | |||
| 345 | fn expectClosing(p: *Parser, opening: TokenIndex, id: Token.Id) Error!void { | ||
| 346 | _ = p.expectToken(id) catch |e| { | ||
| 347 | if (e == error.ParsingFailed) { | ||
| 348 | try p.errTok(switch (id) { | ||
| 349 | .r_paren => .to_match_paren, | ||
| 350 | .r_brace => .to_match_brace, | ||
| 351 | .r_bracket => .to_match_brace, | ||
| 352 | else => unreachable, | ||
| 353 | }, opening); | ||
| 354 | } | ||
| 355 | return e; | ||
| 356 | }; | ||
| 357 | } | ||
| 358 | |||
| 359 | fn errOverflow(p: *Parser, op_tok: TokenIndex, res: Result) !void { | ||
| 360 | if (res.ty.isUnsignedInt(p.comp)) { | ||
| 361 | try p.errExtra(.overflow_unsigned, op_tok, .{ .unsigned = res.val.data.int }); | ||
| 362 | } else { | ||
| 363 | try p.errExtra(.overflow_signed, op_tok, .{ .signed = res.val.signExtend(res.ty, p.comp) }); | ||
| 364 | } | ||
| 365 | } | ||
| 366 | |||
| 367 | fn errExpectedToken(p: *Parser, expected: Token.Id, actual: Token.Id) Error { | ||
| 368 | switch (actual) { | ||
| 369 | .invalid => try p.errExtra(.expected_invalid, p.tok_i, .{ .tok_id_expected = expected }), | ||
| 370 | .eof => try p.errExtra(.expected_eof, p.tok_i, .{ .tok_id_expected = expected }), | ||
| 371 | else => try p.errExtra(.expected_token, p.tok_i, .{ .tok_id = .{ | ||
| 372 | .expected = expected, | ||
| 373 | .actual = actual, | ||
| 374 | } }), | ||
| 375 | } | ||
| 376 | return error.ParsingFailed; | ||
| 377 | } | ||
| 378 | |||
| 379 | pub fn errStr(p: *Parser, tag: Diagnostics.Tag, tok_i: TokenIndex, str: []const u8) Compilation.Error!void { | ||
| 380 | @setCold(true); | ||
| 381 | return p.errExtra(tag, tok_i, .{ .str = str }); | ||
| 382 | } | ||
| 383 | |||
| 384 | pub fn errExtra(p: *Parser, tag: Diagnostics.Tag, tok_i: TokenIndex, extra: Diagnostics.Message.Extra) Compilation.Error!void { | ||
| 385 | @setCold(true); | ||
| 386 | const tok = p.pp.tokens.get(tok_i); | ||
| 387 | var loc = tok.loc; | ||
| 388 | if (tok_i != 0 and tok.id == .eof) { | ||
| 389 | // if the token is EOF, point at the end of the previous token instead | ||
| 390 | const prev = p.pp.tokens.get(tok_i - 1); | ||
| 391 | loc = prev.loc; | ||
| 392 | loc.byte_offset += @intCast(p.tokSlice(tok_i - 1).len); | ||
| 393 | } | ||
| 394 | try p.comp.diag.add(.{ | ||
| 395 | .tag = tag, | ||
| 396 | .loc = loc, | ||
| 397 | .extra = extra, | ||
| 398 | }, tok.expansionSlice()); | ||
| 399 | } | ||
| 400 | |||
| 401 | pub fn errTok(p: *Parser, tag: Diagnostics.Tag, tok_i: TokenIndex) Compilation.Error!void { | ||
| 402 | @setCold(true); | ||
| 403 | return p.errExtra(tag, tok_i, .{ .none = {} }); | ||
| 404 | } | ||
| 405 | |||
| 406 | pub fn err(p: *Parser, tag: Diagnostics.Tag) Compilation.Error!void { | ||
| 407 | @setCold(true); | ||
| 408 | return p.errExtra(tag, p.tok_i, .{ .none = {} }); | ||
| 409 | } | ||
| 410 | |||
| 411 | pub fn todo(p: *Parser, msg: []const u8) Error { | ||
| 412 | try p.errStr(.todo, p.tok_i, msg); | ||
| 413 | return error.ParsingFailed; | ||
| 414 | } | ||
| 415 | |||
| 416 | pub fn typeStr(p: *Parser, ty: Type) ![]const u8 { | ||
| 417 | if (Type.Builder.fromType(ty).str(p.comp.langopts)) |str| return str; | ||
| 418 | const strings_top = p.strings.items.len; | ||
| 419 | defer p.strings.items.len = strings_top; | ||
| 420 | |||
| 421 | const mapper = p.comp.string_interner.getSlowTypeMapper(); | ||
| 422 | try ty.print(mapper, p.comp.langopts, p.strings.writer()); | ||
| 423 | return try p.comp.diag.arena.allocator().dupe(u8, p.strings.items[strings_top..]); | ||
| 424 | } | ||
| 425 | |||
| 426 | pub fn typePairStr(p: *Parser, a: Type, b: Type) ![]const u8 { | ||
| 427 | return p.typePairStrExtra(a, " and ", b); | ||
| 428 | } | ||
| 429 | |||
| 430 | pub fn typePairStrExtra(p: *Parser, a: Type, msg: []const u8, b: Type) ![]const u8 { | ||
| 431 | const strings_top = p.strings.items.len; | ||
| 432 | defer p.strings.items.len = strings_top; | ||
| 433 | |||
| 434 | try p.strings.append('\''); | ||
| 435 | const mapper = p.comp.string_interner.getSlowTypeMapper(); | ||
| 436 | try a.print(mapper, p.comp.langopts, p.strings.writer()); | ||
| 437 | try p.strings.append('\''); | ||
| 438 | try p.strings.appendSlice(msg); | ||
| 439 | try p.strings.append('\''); | ||
| 440 | try b.print(mapper, p.comp.langopts, p.strings.writer()); | ||
| 441 | try p.strings.append('\''); | ||
| 442 | return try p.comp.diag.arena.allocator().dupe(u8, p.strings.items[strings_top..]); | ||
| 443 | } | ||
| 444 | |||
| 445 | pub fn floatValueChangedStr(p: *Parser, res: *Result, old_value: f64, int_ty: Type) ![]const u8 { | ||
| 446 | const strings_top = p.strings.items.len; | ||
| 447 | defer p.strings.items.len = strings_top; | ||
| 448 | |||
| 449 | var w = p.strings.writer(); | ||
| 450 | const type_pair_str = try p.typePairStrExtra(res.ty, " to ", int_ty); | ||
| 451 | try w.writeAll(type_pair_str); | ||
| 452 | const is_zero = res.val.isZero(); | ||
| 453 | const non_zero_str: []const u8 = if (is_zero) "non-zero " else ""; | ||
| 454 | if (int_ty.is(.bool)) { | ||
| 455 | try w.print(" changes {s}value from {d} to {}", .{ non_zero_str, old_value, res.val.getBool() }); | ||
| 456 | } else if (int_ty.isUnsignedInt(p.comp)) { | ||
| 457 | try w.print(" changes {s}value from {d} to {d}", .{ non_zero_str, old_value, res.val.getInt(u64) }); | ||
| 458 | } else { | ||
| 459 | try w.print(" changes {s}value from {d} to {d}", .{ non_zero_str, old_value, res.val.getInt(i64) }); | ||
| 460 | } | ||
| 461 | |||
| 462 | return try p.comp.diag.arena.allocator().dupe(u8, p.strings.items[strings_top..]); | ||
| 463 | } | ||
| 464 | |||
| 465 | fn checkDeprecatedUnavailable(p: *Parser, ty: Type, usage_tok: TokenIndex, decl_tok: TokenIndex) !void { | ||
| 466 | if (ty.getAttribute(.@"error")) |@"error"| { | ||
| 467 | const strings_top = p.strings.items.len; | ||
| 468 | defer p.strings.items.len = strings_top; | ||
| 469 | |||
| 470 | const w = p.strings.writer(); | ||
| 471 | const msg_str = p.attributeMessageString(@"error".msg); | ||
| 472 | try w.print("call to '{s}' declared with attribute error: {s}", .{ p.tokSlice(@"error".__name_tok), msg_str }); | ||
| 473 | const str = try p.comp.diag.arena.allocator().dupe(u8, p.strings.items[strings_top..]); | ||
| 474 | try p.errStr(.error_attribute, usage_tok, str); | ||
| 475 | } | ||
| 476 | if (ty.getAttribute(.warning)) |warning| { | ||
| 477 | const strings_top = p.strings.items.len; | ||
| 478 | defer p.strings.items.len = strings_top; | ||
| 479 | |||
| 480 | const w = p.strings.writer(); | ||
| 481 | const msg_str = p.attributeMessageString(warning.msg); | ||
| 482 | try w.print("call to '{s}' declared with attribute warning: {s}", .{ p.tokSlice(warning.__name_tok), msg_str }); | ||
| 483 | const str = try p.comp.diag.arena.allocator().dupe(u8, p.strings.items[strings_top..]); | ||
| 484 | try p.errStr(.warning_attribute, usage_tok, str); | ||
| 485 | } | ||
| 486 | if (ty.getAttribute(.unavailable)) |unavailable| { | ||
| 487 | try p.errDeprecated(.unavailable, usage_tok, unavailable.msg); | ||
| 488 | try p.errStr(.unavailable_note, unavailable.__name_tok, p.tokSlice(decl_tok)); | ||
| 489 | return error.ParsingFailed; | ||
| 490 | } else if (ty.getAttribute(.deprecated)) |deprecated| { | ||
| 491 | try p.errDeprecated(.deprecated_declarations, usage_tok, deprecated.msg); | ||
| 492 | try p.errStr(.deprecated_note, deprecated.__name_tok, p.tokSlice(decl_tok)); | ||
| 493 | } | ||
| 494 | } | ||
| 495 | |||
| 496 | /// Assumes that the specified range was created by an ordinary or `u8` string literal | ||
| 497 | /// Returned slice is invalidated if additional strings are added to p.retained_strings | ||
| 498 | fn attributeMessageString(p: *Parser, range: Value.ByteRange) []const u8 { | ||
| 499 | return range.slice(p.retained_strings.items, .@"1"); | ||
| 500 | } | ||
| 501 | |||
| 502 | fn errDeprecated(p: *Parser, tag: Diagnostics.Tag, tok_i: TokenIndex, msg: ?Value.ByteRange) Compilation.Error!void { | ||
| 503 | const strings_top = p.strings.items.len; | ||
| 504 | defer p.strings.items.len = strings_top; | ||
| 505 | |||
| 506 | const w = p.strings.writer(); | ||
| 507 | try w.print("'{s}' is ", .{p.tokSlice(tok_i)}); | ||
| 508 | const reason: []const u8 = switch (tag) { | ||
| 509 | .unavailable => "unavailable", | ||
| 510 | .deprecated_declarations => "deprecated", | ||
| 511 | else => unreachable, | ||
| 512 | }; | ||
| 513 | try w.writeAll(reason); | ||
| 514 | if (msg) |m| { | ||
| 515 | const str = p.attributeMessageString(m); | ||
| 516 | try w.print(": {s}", .{str}); | ||
| 517 | } | ||
| 518 | const str = try p.comp.diag.arena.allocator().dupe(u8, p.strings.items[strings_top..]); | ||
| 519 | return p.errStr(tag, tok_i, str); | ||
| 520 | } | ||
| 521 | |||
| 522 | fn addNode(p: *Parser, node: Tree.Node) Allocator.Error!NodeIndex { | ||
| 523 | if (p.in_macro) return .none; | ||
| 524 | const res = p.nodes.len; | ||
| 525 | try p.nodes.append(p.gpa, node); | ||
| 526 | return @enumFromInt(res); | ||
| 527 | } | ||
| 528 | |||
| 529 | fn addList(p: *Parser, nodes: []const NodeIndex) Allocator.Error!Tree.Node.Range { | ||
| 530 | if (p.in_macro) return Tree.Node.Range{ .start = 0, .end = 0 }; | ||
| 531 | const start: u32 = @intCast(p.data.items.len); | ||
| 532 | try p.data.appendSlice(nodes); | ||
| 533 | const end: u32 = @intCast(p.data.items.len); | ||
| 534 | return Tree.Node.Range{ .start = start, .end = end }; | ||
| 535 | } | ||
| 536 | |||
| 537 | fn findLabel(p: *Parser, name: []const u8) ?TokenIndex { | ||
| 538 | for (p.labels.items) |item| { | ||
| 539 | switch (item) { | ||
| 540 | .label => |l| if (mem.eql(u8, p.tokSlice(l), name)) return l, | ||
| 541 | .unresolved_goto => {}, | ||
| 542 | } | ||
| 543 | } | ||
| 544 | return null; | ||
| 545 | } | ||
| 546 | |||
| 547 | fn nodeIs(p: *Parser, node: NodeIndex, tag: Tree.Tag) bool { | ||
| 548 | return p.getNode(node, tag) != null; | ||
| 549 | } | ||
| 550 | |||
| 551 | fn getNode(p: *Parser, node: NodeIndex, tag: Tree.Tag) ?NodeIndex { | ||
| 552 | var cur = node; | ||
| 553 | const tags = p.nodes.items(.tag); | ||
| 554 | const data = p.nodes.items(.data); | ||
| 555 | while (true) { | ||
| 556 | const cur_tag = tags[@intFromEnum(cur)]; | ||
| 557 | if (cur_tag == .paren_expr) { | ||
| 558 | cur = data[@intFromEnum(cur)].un; | ||
| 559 | } else if (cur_tag == tag) { | ||
| 560 | return cur; | ||
| 561 | } else { | ||
| 562 | return null; | ||
| 563 | } | ||
| 564 | } | ||
| 565 | } | ||
| 566 | |||
| 567 | fn pragma(p: *Parser) Compilation.Error!bool { | ||
| 568 | var found_pragma = false; | ||
| 569 | while (p.eatToken(.keyword_pragma)) |_| { | ||
| 570 | found_pragma = true; | ||
| 571 | |||
| 572 | const name_tok = p.tok_i; | ||
| 573 | const name = p.tokSlice(name_tok); | ||
| 574 | |||
| 575 | const end_idx = mem.indexOfScalarPos(Token.Id, p.tok_ids, p.tok_i, .nl).?; | ||
| 576 | const pragma_len = @as(TokenIndex, @intCast(end_idx)) - p.tok_i; | ||
| 577 | defer p.tok_i += pragma_len + 1; // skip past .nl as well | ||
| 578 | if (p.comp.getPragma(name)) |prag| { | ||
| 579 | try prag.parserCB(p, p.tok_i); | ||
| 580 | } | ||
| 581 | } | ||
| 582 | return found_pragma; | ||
| 583 | } | ||
| 584 | |||
| 585 | /// Issue errors for top-level definitions whose type was never completed. | ||
| 586 | fn diagnoseIncompleteDefinitions(p: *Parser) !void { | ||
| 587 | @setCold(true); | ||
| 588 | |||
| 589 | const node_slices = p.nodes.slice(); | ||
| 590 | const tags = node_slices.items(.tag); | ||
| 591 | const tys = node_slices.items(.ty); | ||
| 592 | const data = node_slices.items(.data); | ||
| 593 | |||
| 594 | const err_start = p.comp.diag.list.items.len; | ||
| 595 | for (p.decl_buf.items) |decl_node| { | ||
| 596 | const idx = @intFromEnum(decl_node); | ||
| 597 | switch (tags[idx]) { | ||
| 598 | .struct_forward_decl, .union_forward_decl, .enum_forward_decl => {}, | ||
| 599 | else => continue, | ||
| 600 | } | ||
| 601 | |||
| 602 | const ty = tys[idx]; | ||
| 603 | const decl_type_name = if (ty.getRecord()) |rec| | ||
| 604 | rec.name | ||
| 605 | else if (ty.get(.@"enum")) |en| | ||
| 606 | en.data.@"enum".name | ||
| 607 | else | ||
| 608 | unreachable; | ||
| 609 | |||
| 610 | const tentative_def_tok = p.tentative_defs.get(decl_type_name) orelse continue; | ||
| 611 | const type_str = try p.typeStr(ty); | ||
| 612 | try p.errStr(.tentative_definition_incomplete, tentative_def_tok, type_str); | ||
| 613 | try p.errStr(.forward_declaration_here, data[idx].decl_ref, type_str); | ||
| 614 | } | ||
| 615 | const errors_added = p.comp.diag.list.items.len - err_start; | ||
| 616 | assert(errors_added == 2 * p.tentative_defs.count()); // Each tentative def should add an error + note | ||
| 617 | } | ||
| 618 | |||
| 619 | /// root : (decl | assembly ';' | staticAssert)* | ||
| 620 | pub fn parse(pp: *Preprocessor) Compilation.Error!Tree { | ||
| 621 | assert(pp.linemarkers == .none); | ||
| 622 | pp.comp.pragmaEvent(.before_parse); | ||
| 623 | |||
| 624 | var arena = std.heap.ArenaAllocator.init(pp.comp.gpa); | ||
| 625 | errdefer arena.deinit(); | ||
| 626 | var p = Parser{ | ||
| 627 | .pp = pp, | ||
| 628 | .comp = pp.comp, | ||
| 629 | .gpa = pp.comp.gpa, | ||
| 630 | .arena = arena.allocator(), | ||
| 631 | .tok_ids = pp.tokens.items(.id), | ||
| 632 | .strings = std.ArrayList(u8).init(pp.comp.gpa), | ||
| 633 | .retained_strings = std.ArrayList(u8).init(pp.comp.gpa), | ||
| 634 | .value_map = Tree.ValueMap.init(pp.comp.gpa), | ||
| 635 | .data = NodeList.init(pp.comp.gpa), | ||
| 636 | .labels = std.ArrayList(Label).init(pp.comp.gpa), | ||
| 637 | .list_buf = NodeList.init(pp.comp.gpa), | ||
| 638 | .decl_buf = NodeList.init(pp.comp.gpa), | ||
| 639 | .param_buf = std.ArrayList(Type.Func.Param).init(pp.comp.gpa), | ||
| 640 | .enum_buf = std.ArrayList(Type.Enum.Field).init(pp.comp.gpa), | ||
| 641 | .record_buf = std.ArrayList(Type.Record.Field).init(pp.comp.gpa), | ||
| 642 | .field_attr_buf = std.ArrayList([]const Attribute).init(pp.comp.gpa), | ||
| 643 | .string_ids = .{ | ||
| 644 | .declspec_id = try pp.comp.intern("__declspec"), | ||
| 645 | .main_id = try pp.comp.intern("main"), | ||
| 646 | .file = try pp.comp.intern("FILE"), | ||
| 647 | .jmp_buf = try pp.comp.intern("jmp_buf"), | ||
| 648 | .sigjmp_buf = try pp.comp.intern("sigjmp_buf"), | ||
| 649 | .ucontext_t = try pp.comp.intern("ucontext_t"), | ||
| 650 | }, | ||
| 651 | }; | ||
| 652 | errdefer { | ||
| 653 | p.nodes.deinit(pp.comp.gpa); | ||
| 654 | p.retained_strings.deinit(); | ||
| 655 | p.value_map.deinit(); | ||
| 656 | } | ||
| 657 | defer { | ||
| 658 | p.data.deinit(); | ||
| 659 | p.labels.deinit(); | ||
| 660 | p.strings.deinit(); | ||
| 661 | p.syms.deinit(pp.comp.gpa); | ||
| 662 | p.list_buf.deinit(); | ||
| 663 | p.decl_buf.deinit(); | ||
| 664 | p.param_buf.deinit(); | ||
| 665 | p.enum_buf.deinit(); | ||
| 666 | p.record_buf.deinit(); | ||
| 667 | p.record_members.deinit(pp.comp.gpa); | ||
| 668 | p.attr_buf.deinit(pp.comp.gpa); | ||
| 669 | p.attr_application_buf.deinit(pp.comp.gpa); | ||
| 670 | p.tentative_defs.deinit(pp.comp.gpa); | ||
| 671 | assert(p.field_attr_buf.items.len == 0); | ||
| 672 | p.field_attr_buf.deinit(); | ||
| 673 | } | ||
| 674 | |||
| 675 | // NodeIndex 0 must be invalid | ||
| 676 | _ = try p.addNode(.{ .tag = .invalid, .ty = undefined, .data = undefined }); | ||
| 677 | |||
| 678 | { | ||
| 679 | if (p.comp.langopts.hasChar8_T()) { | ||
| 680 | try p.syms.defineTypedef(&p, try p.comp.intern("char8_t"), .{ .specifier = .uchar }, 0, .none); | ||
| 681 | } | ||
| 682 | try p.syms.defineTypedef(&p, try p.comp.intern("__int128_t"), .{ .specifier = .int128 }, 0, .none); | ||
| 683 | try p.syms.defineTypedef(&p, try p.comp.intern("__uint128_t"), .{ .specifier = .uint128 }, 0, .none); | ||
| 684 | |||
| 685 | const elem_ty = try p.arena.create(Type); | ||
| 686 | elem_ty.* = .{ .specifier = .char }; | ||
| 687 | try p.syms.defineTypedef(&p, try p.comp.intern("__builtin_ms_va_list"), .{ | ||
| 688 | .specifier = .pointer, | ||
| 689 | .data = .{ .sub_type = elem_ty }, | ||
| 690 | }, 0, .none); | ||
| 691 | |||
| 692 | const ty = &pp.comp.types.va_list; | ||
| 693 | try p.syms.defineTypedef(&p, try p.comp.intern("__builtin_va_list"), ty.*, 0, .none); | ||
| 694 | |||
| 695 | if (ty.isArray()) ty.decayArray(); | ||
| 696 | |||
| 697 | try p.syms.defineTypedef(&p, try p.comp.intern("__NSConstantString"), pp.comp.types.ns_constant_string.ty, 0, .none); | ||
| 698 | } | ||
| 699 | |||
| 700 | while (p.eatToken(.eof) == null) { | ||
| 701 | if (try p.pragma()) continue; | ||
| 702 | if (try p.parseOrNextDecl(staticAssert)) continue; | ||
| 703 | if (try p.parseOrNextDecl(decl)) continue; | ||
| 704 | if (p.eatToken(.keyword_extension)) |_| { | ||
| 705 | const saved_extension = p.extension_suppressed; | ||
| 706 | defer p.extension_suppressed = saved_extension; | ||
| 707 | p.extension_suppressed = true; | ||
| 708 | |||
| 709 | if (try p.parseOrNextDecl(decl)) continue; | ||
| 710 | switch (p.tok_ids[p.tok_i]) { | ||
| 711 | .semicolon => p.tok_i += 1, | ||
| 712 | .keyword_static_assert, | ||
| 713 | .keyword_c23_static_assert, | ||
| 714 | .keyword_pragma, | ||
| 715 | .keyword_extension, | ||
| 716 | .keyword_asm, | ||
| 717 | .keyword_asm1, | ||
| 718 | .keyword_asm2, | ||
| 719 | => {}, | ||
| 720 | else => try p.err(.expected_external_decl), | ||
| 721 | } | ||
| 722 | continue; | ||
| 723 | } | ||
| 724 | if (p.assembly(.global) catch |er| switch (er) { | ||
| 725 | error.ParsingFailed => { | ||
| 726 | p.nextExternDecl(); | ||
| 727 | continue; | ||
| 728 | }, | ||
| 729 | else => |e| return e, | ||
| 730 | }) |node| { | ||
| 731 | try p.decl_buf.append(node); | ||
| 732 | continue; | ||
| 733 | } | ||
| 734 | if (p.eatToken(.semicolon)) |tok| { | ||
| 735 | try p.errTok(.extra_semi, tok); | ||
| 736 | continue; | ||
| 737 | } | ||
| 738 | try p.err(.expected_external_decl); | ||
| 739 | p.tok_i += 1; | ||
| 740 | } | ||
| 741 | if (p.tentative_defs.count() > 0) { | ||
| 742 | try p.diagnoseIncompleteDefinitions(); | ||
| 743 | } | ||
| 744 | |||
| 745 | const root_decls = try p.decl_buf.toOwnedSlice(); | ||
| 746 | errdefer pp.comp.gpa.free(root_decls); | ||
| 747 | if (root_decls.len == 0) { | ||
| 748 | try p.errTok(.empty_translation_unit, p.tok_i - 1); | ||
| 749 | } | ||
| 750 | pp.comp.pragmaEvent(.after_parse); | ||
| 751 | |||
| 752 | const data = try p.data.toOwnedSlice(); | ||
| 753 | errdefer pp.comp.gpa.free(data); | ||
| 754 | const strings = try p.retained_strings.toOwnedSlice(); | ||
| 755 | errdefer pp.comp.gpa.free(strings); | ||
| 756 | return Tree{ | ||
| 757 | .comp = pp.comp, | ||
| 758 | .tokens = pp.tokens.slice(), | ||
| 759 | .arena = arena, | ||
| 760 | .generated = pp.comp.generated_buf.items, | ||
| 761 | .nodes = p.nodes.toOwnedSlice(), | ||
| 762 | .data = data, | ||
| 763 | .root_decls = root_decls, | ||
| 764 | .strings = strings, | ||
| 765 | .value_map = p.value_map, | ||
| 766 | }; | ||
| 767 | } | ||
| 768 | |||
| 769 | fn skipToPragmaSentinel(p: *Parser) void { | ||
| 770 | while (true) : (p.tok_i += 1) { | ||
| 771 | if (p.tok_ids[p.tok_i] == .nl) return; | ||
| 772 | if (p.tok_ids[p.tok_i] == .eof) { | ||
| 773 | p.tok_i -= 1; | ||
| 774 | return; | ||
| 775 | } | ||
| 776 | } | ||
| 777 | } | ||
| 778 | |||
| 779 | fn parseOrNextDecl(p: *Parser, comptime func: fn (*Parser) Error!bool) Compilation.Error!bool { | ||
| 780 | return func(p) catch |er| switch (er) { | ||
| 781 | error.ParsingFailed => { | ||
| 782 | p.nextExternDecl(); | ||
| 783 | return true; | ||
| 784 | }, | ||
| 785 | else => |e| return e, | ||
| 786 | }; | ||
| 787 | } | ||
| 788 | |||
| 789 | fn nextExternDecl(p: *Parser) void { | ||
| 790 | var parens: u32 = 0; | ||
| 791 | while (true) : (p.tok_i += 1) { | ||
| 792 | switch (p.tok_ids[p.tok_i]) { | ||
| 793 | .l_paren, .l_brace, .l_bracket => parens += 1, | ||
| 794 | .r_paren, .r_brace, .r_bracket => if (parens != 0) { | ||
| 795 | parens -= 1; | ||
| 796 | }, | ||
| 797 | .keyword_typedef, | ||
| 798 | .keyword_extern, | ||
| 799 | .keyword_static, | ||
| 800 | .keyword_auto, | ||
| 801 | .keyword_register, | ||
| 802 | .keyword_thread_local, | ||
| 803 | .keyword_c23_thread_local, | ||
| 804 | .keyword_inline, | ||
| 805 | .keyword_inline1, | ||
| 806 | .keyword_inline2, | ||
| 807 | .keyword_noreturn, | ||
| 808 | .keyword_void, | ||
| 809 | .keyword_bool, | ||
| 810 | .keyword_c23_bool, | ||
| 811 | .keyword_char, | ||
| 812 | .keyword_short, | ||
| 813 | .keyword_int, | ||
| 814 | .keyword_long, | ||
| 815 | .keyword_signed, | ||
| 816 | .keyword_unsigned, | ||
| 817 | .keyword_float, | ||
| 818 | .keyword_double, | ||
| 819 | .keyword_complex, | ||
| 820 | .keyword_atomic, | ||
| 821 | .keyword_enum, | ||
| 822 | .keyword_struct, | ||
| 823 | .keyword_union, | ||
| 824 | .keyword_alignas, | ||
| 825 | .keyword_c23_alignas, | ||
| 826 | .identifier, | ||
| 827 | .extended_identifier, | ||
| 828 | .keyword_typeof, | ||
| 829 | .keyword_typeof1, | ||
| 830 | .keyword_typeof2, | ||
| 831 | .keyword_extension, | ||
| 832 | .keyword_bit_int, | ||
| 833 | => if (parens == 0) return, | ||
| 834 | .keyword_pragma => p.skipToPragmaSentinel(), | ||
| 835 | .eof => return, | ||
| 836 | .semicolon => if (parens == 0) { | ||
| 837 | p.tok_i += 1; | ||
| 838 | return; | ||
| 839 | }, | ||
| 840 | else => {}, | ||
| 841 | } | ||
| 842 | } | ||
| 843 | } | ||
| 844 | |||
| 845 | fn skipTo(p: *Parser, id: Token.Id) void { | ||
| 846 | var parens: u32 = 0; | ||
| 847 | while (true) : (p.tok_i += 1) { | ||
| 848 | if (p.tok_ids[p.tok_i] == id and parens == 0) { | ||
| 849 | p.tok_i += 1; | ||
| 850 | return; | ||
| 851 | } | ||
| 852 | switch (p.tok_ids[p.tok_i]) { | ||
| 853 | .l_paren, .l_brace, .l_bracket => parens += 1, | ||
| 854 | .r_paren, .r_brace, .r_bracket => if (parens != 0) { | ||
| 855 | parens -= 1; | ||
| 856 | }, | ||
| 857 | .keyword_pragma => p.skipToPragmaSentinel(), | ||
| 858 | .eof => return, | ||
| 859 | else => {}, | ||
| 860 | } | ||
| 861 | } | ||
| 862 | } | ||
| 863 | |||
| 864 | /// Called after a typedef is defined | ||
| 865 | fn typedefDefined(p: *Parser, name: StringId, ty: Type) void { | ||
| 866 | if (name == p.string_ids.file) { | ||
| 867 | p.comp.types.file = ty; | ||
| 868 | } else if (name == p.string_ids.jmp_buf) { | ||
| 869 | p.comp.types.jmp_buf = ty; | ||
| 870 | } else if (name == p.string_ids.sigjmp_buf) { | ||
| 871 | p.comp.types.sigjmp_buf = ty; | ||
| 872 | } else if (name == p.string_ids.ucontext_t) { | ||
| 873 | p.comp.types.ucontext_t = ty; | ||
| 874 | } | ||
| 875 | } | ||
| 876 | |||
| 877 | // ====== declarations ====== | ||
| 878 | |||
| 879 | /// decl | ||
| 880 | /// : declSpec (initDeclarator ( ',' initDeclarator)*)? ';' | ||
| 881 | /// | declSpec declarator decl* compoundStmt | ||
| 882 | fn decl(p: *Parser) Error!bool { | ||
| 883 | _ = try p.pragma(); | ||
| 884 | const first_tok = p.tok_i; | ||
| 885 | const attr_buf_top = p.attr_buf.len; | ||
| 886 | defer p.attr_buf.len = attr_buf_top; | ||
| 887 | |||
| 888 | try p.attributeSpecifier(); | ||
| 889 | |||
| 890 | var decl_spec = if (try p.declSpec()) |some| some else blk: { | ||
| 891 | if (p.func.ty != null) { | ||
| 892 | p.tok_i = first_tok; | ||
| 893 | return false; | ||
| 894 | } | ||
| 895 | switch (p.tok_ids[first_tok]) { | ||
| 896 | .asterisk, .l_paren, .identifier, .extended_identifier => {}, | ||
| 897 | else => if (p.tok_i != first_tok) { | ||
| 898 | try p.err(.expected_ident_or_l_paren); | ||
| 899 | return error.ParsingFailed; | ||
| 900 | } else return false, | ||
| 901 | } | ||
| 902 | var spec: Type.Builder = .{}; | ||
| 903 | break :blk DeclSpec{ .ty = try spec.finish(p) }; | ||
| 904 | }; | ||
| 905 | if (decl_spec.noreturn) |tok| { | ||
| 906 | const attr = Attribute{ .tag = .noreturn, .args = .{ .noreturn = .{} }, .syntax = .keyword }; | ||
| 907 | try p.attr_buf.append(p.gpa, .{ .attr = attr, .tok = tok }); | ||
| 908 | } | ||
| 909 | var init_d = (try p.initDeclarator(&decl_spec, attr_buf_top)) orelse { | ||
| 910 | _ = try p.expectToken(.semicolon); | ||
| 911 | if (decl_spec.ty.is(.@"enum") or | ||
| 912 | (decl_spec.ty.isRecord() and !decl_spec.ty.isAnonymousRecord(p.comp) and | ||
| 913 | !decl_spec.ty.isTypeof())) // we follow GCC and clang's behavior here | ||
| 914 | { | ||
| 915 | const specifier = decl_spec.ty.canonicalize(.standard).specifier; | ||
| 916 | const attrs = p.attr_buf.items(.attr)[attr_buf_top..]; | ||
| 917 | const toks = p.attr_buf.items(.tok)[attr_buf_top..]; | ||
| 918 | for (attrs, toks) |attr, tok| { | ||
| 919 | try p.errExtra(.ignored_record_attr, tok, .{ | ||
| 920 | .ignored_record_attr = .{ .tag = attr.tag, .specifier = switch (specifier) { | ||
| 921 | .@"enum" => .@"enum", | ||
| 922 | .@"struct" => .@"struct", | ||
| 923 | .@"union" => .@"union", | ||
| 924 | else => unreachable, | ||
| 925 | } }, | ||
| 926 | }); | ||
| 927 | } | ||
| 928 | return true; | ||
| 929 | } | ||
| 930 | |||
| 931 | try p.errTok(.missing_declaration, first_tok); | ||
| 932 | return true; | ||
| 933 | }; | ||
| 934 | |||
| 935 | // Check for function definition. | ||
| 936 | if (init_d.d.func_declarator != null and init_d.initializer.node == .none and init_d.d.ty.isFunc()) fn_def: { | ||
| 937 | if (decl_spec.auto_type) |tok_i| { | ||
| 938 | try p.errStr(.auto_type_not_allowed, tok_i, "function return type"); | ||
| 939 | return error.ParsingFailed; | ||
| 940 | } | ||
| 941 | |||
| 942 | switch (p.tok_ids[p.tok_i]) { | ||
| 943 | .comma, .semicolon => break :fn_def, | ||
| 944 | .l_brace => {}, | ||
| 945 | else => if (init_d.d.old_style_func == null) { | ||
| 946 | try p.err(.expected_fn_body); | ||
| 947 | return true; | ||
| 948 | }, | ||
| 949 | } | ||
| 950 | if (p.func.ty != null) try p.err(.func_not_in_root); | ||
| 951 | |||
| 952 | const node = try p.addNode(undefined); // reserve space | ||
| 953 | const interned_declarator_name = try p.comp.intern(p.tokSlice(init_d.d.name)); | ||
| 954 | try p.syms.defineSymbol(p, interned_declarator_name, init_d.d.ty, init_d.d.name, node, .{}, false); | ||
| 955 | |||
| 956 | const func = p.func; | ||
| 957 | p.func = .{ | ||
| 958 | .ty = init_d.d.ty, | ||
| 959 | .name = init_d.d.name, | ||
| 960 | }; | ||
| 961 | if (interned_declarator_name == p.string_ids.main_id and !init_d.d.ty.returnType().is(.int)) { | ||
| 962 | try p.errTok(.main_return_type, init_d.d.name); | ||
| 963 | } | ||
| 964 | defer p.func = func; | ||
| 965 | |||
| 966 | try p.syms.pushScope(p); | ||
| 967 | defer p.syms.popScope(); | ||
| 968 | |||
| 969 | // Collect old style parameter declarations. | ||
| 970 | if (init_d.d.old_style_func != null) { | ||
| 971 | const attrs = init_d.d.ty.getAttributes(); | ||
| 972 | var base_ty = if (init_d.d.ty.specifier == .attributed) init_d.d.ty.elemType() else init_d.d.ty; | ||
| 973 | base_ty.specifier = .func; | ||
| 974 | init_d.d.ty = try base_ty.withAttributes(p.arena, attrs); | ||
| 975 | |||
| 976 | const param_buf_top = p.param_buf.items.len; | ||
| 977 | defer p.param_buf.items.len = param_buf_top; | ||
| 978 | |||
| 979 | param_loop: while (true) { | ||
| 980 | const param_decl_spec = (try p.declSpec()) orelse break; | ||
| 981 | if (p.eatToken(.semicolon)) |semi| { | ||
| 982 | try p.errTok(.missing_declaration, semi); | ||
| 983 | continue :param_loop; | ||
| 984 | } | ||
| 985 | |||
| 986 | while (true) { | ||
| 987 | const attr_buf_top_declarator = p.attr_buf.len; | ||
| 988 | defer p.attr_buf.len = attr_buf_top_declarator; | ||
| 989 | |||
| 990 | var d = (try p.declarator(param_decl_spec.ty, .param)) orelse { | ||
| 991 | try p.errTok(.missing_declaration, first_tok); | ||
| 992 | _ = try p.expectToken(.semicolon); | ||
| 993 | continue :param_loop; | ||
| 994 | }; | ||
| 995 | try p.attributeSpecifier(); | ||
| 996 | |||
| 997 | if (d.ty.hasIncompleteSize() and !d.ty.is(.void)) try p.errStr(.parameter_incomplete_ty, d.name, try p.typeStr(d.ty)); | ||
| 998 | if (d.ty.isFunc()) { | ||
| 999 | // Params declared as functions are converted to function pointers. | ||
| 1000 | const elem_ty = try p.arena.create(Type); | ||
| 1001 | elem_ty.* = d.ty; | ||
| 1002 | d.ty = Type{ | ||
| 1003 | .specifier = .pointer, | ||
| 1004 | .data = .{ .sub_type = elem_ty }, | ||
| 1005 | }; | ||
| 1006 | } else if (d.ty.isArray()) { | ||
| 1007 | // params declared as arrays are converted to pointers | ||
| 1008 | d.ty.decayArray(); | ||
| 1009 | } else if (d.ty.is(.void)) { | ||
| 1010 | try p.errTok(.invalid_void_param, d.name); | ||
| 1011 | } | ||
| 1012 | |||
| 1013 | // find and correct parameter types | ||
| 1014 | // TODO check for missing declarations and redefinitions | ||
| 1015 | const name_str = p.tokSlice(d.name); | ||
| 1016 | const interned_name = try p.comp.intern(name_str); | ||
| 1017 | for (init_d.d.ty.params()) |*param| { | ||
| 1018 | if (param.name == interned_name) { | ||
| 1019 | param.ty = d.ty; | ||
| 1020 | break; | ||
| 1021 | } | ||
| 1022 | } else { | ||
| 1023 | try p.errStr(.parameter_missing, d.name, name_str); | ||
| 1024 | } | ||
| 1025 | d.ty = try Attribute.applyParameterAttributes(p, d.ty, attr_buf_top_declarator, .alignas_on_param); | ||
| 1026 | |||
| 1027 | // bypass redefinition check to avoid duplicate errors | ||
| 1028 | try p.syms.syms.append(p.gpa, .{ | ||
| 1029 | .kind = .def, | ||
| 1030 | .name = interned_name, | ||
| 1031 | .tok = d.name, | ||
| 1032 | .ty = d.ty, | ||
| 1033 | .val = .{}, | ||
| 1034 | }); | ||
| 1035 | if (p.eatToken(.comma) == null) break; | ||
| 1036 | } | ||
| 1037 | _ = try p.expectToken(.semicolon); | ||
| 1038 | } | ||
| 1039 | } else { | ||
| 1040 | for (init_d.d.ty.params()) |param| { | ||
| 1041 | if (param.ty.hasUnboundVLA()) try p.errTok(.unbound_vla, param.name_tok); | ||
| 1042 | if (param.ty.hasIncompleteSize() and !param.ty.is(.void) and param.ty.specifier != .invalid) try p.errStr(.parameter_incomplete_ty, param.name_tok, try p.typeStr(param.ty)); | ||
| 1043 | |||
| 1044 | if (param.name == .empty) { | ||
| 1045 | try p.errTok(.omitting_parameter_name, param.name_tok); | ||
| 1046 | continue; | ||
| 1047 | } | ||
| 1048 | |||
| 1049 | // bypass redefinition check to avoid duplicate errors | ||
| 1050 | try p.syms.syms.append(p.gpa, .{ | ||
| 1051 | .kind = .def, | ||
| 1052 | .name = param.name, | ||
| 1053 | .tok = param.name_tok, | ||
| 1054 | .ty = param.ty, | ||
| 1055 | .val = .{}, | ||
| 1056 | }); | ||
| 1057 | } | ||
| 1058 | } | ||
| 1059 | |||
| 1060 | const body = (try p.compoundStmt(true, null)) orelse { | ||
| 1061 | assert(init_d.d.old_style_func != null); | ||
| 1062 | try p.err(.expected_fn_body); | ||
| 1063 | return true; | ||
| 1064 | }; | ||
| 1065 | p.nodes.set(@intFromEnum(node), .{ | ||
| 1066 | .ty = init_d.d.ty, | ||
| 1067 | .tag = try decl_spec.validateFnDef(p), | ||
| 1068 | .data = .{ .decl = .{ .name = init_d.d.name, .node = body } }, | ||
| 1069 | }); | ||
| 1070 | try p.decl_buf.append(node); | ||
| 1071 | |||
| 1072 | // check gotos | ||
| 1073 | if (func.ty == null) { | ||
| 1074 | for (p.labels.items) |item| { | ||
| 1075 | if (item == .unresolved_goto) | ||
| 1076 | try p.errStr(.undeclared_label, item.unresolved_goto, p.tokSlice(item.unresolved_goto)); | ||
| 1077 | } | ||
| 1078 | if (p.computed_goto_tok) |goto_tok| { | ||
| 1079 | if (!p.contains_address_of_label) try p.errTok(.invalid_computed_goto, goto_tok); | ||
| 1080 | } | ||
| 1081 | p.labels.items.len = 0; | ||
| 1082 | p.label_count = 0; | ||
| 1083 | p.contains_address_of_label = false; | ||
| 1084 | p.computed_goto_tok = null; | ||
| 1085 | } | ||
| 1086 | return true; | ||
| 1087 | } | ||
| 1088 | |||
| 1089 | // Declare all variable/typedef declarators. | ||
| 1090 | while (true) { | ||
| 1091 | if (init_d.d.old_style_func) |tok_i| try p.errTok(.invalid_old_style_params, tok_i); | ||
| 1092 | const tag = try decl_spec.validate(p, &init_d.d.ty, init_d.initializer.node != .none); | ||
| 1093 | |||
| 1094 | const node = try p.addNode(.{ .ty = init_d.d.ty, .tag = tag, .data = .{ | ||
| 1095 | .decl = .{ .name = init_d.d.name, .node = init_d.initializer.node }, | ||
| 1096 | } }); | ||
| 1097 | try p.decl_buf.append(node); | ||
| 1098 | |||
| 1099 | const interned_name = try p.comp.intern(p.tokSlice(init_d.d.name)); | ||
| 1100 | if (decl_spec.storage_class == .typedef) { | ||
| 1101 | try p.syms.defineTypedef(p, interned_name, init_d.d.ty, init_d.d.name, node); | ||
| 1102 | p.typedefDefined(interned_name, init_d.d.ty); | ||
| 1103 | } else if (init_d.initializer.node != .none or | ||
| 1104 | (p.func.ty != null and decl_spec.storage_class != .@"extern")) | ||
| 1105 | { | ||
| 1106 | // TODO validate global variable/constexpr initializer comptime known | ||
| 1107 | try p.syms.defineSymbol( | ||
| 1108 | p, | ||
| 1109 | interned_name, | ||
| 1110 | init_d.d.ty, | ||
| 1111 | init_d.d.name, | ||
| 1112 | node, | ||
| 1113 | if (init_d.d.ty.isConst() or decl_spec.constexpr != null) init_d.initializer.val else .{}, | ||
| 1114 | decl_spec.constexpr != null, | ||
| 1115 | ); | ||
| 1116 | } else { | ||
| 1117 | try p.syms.declareSymbol(p, interned_name, init_d.d.ty, init_d.d.name, node); | ||
| 1118 | } | ||
| 1119 | |||
| 1120 | if (p.eatToken(.comma) == null) break; | ||
| 1121 | |||
| 1122 | if (decl_spec.auto_type) |tok_i| try p.errTok(.auto_type_requires_single_declarator, tok_i); | ||
| 1123 | |||
| 1124 | init_d = (try p.initDeclarator(&decl_spec, attr_buf_top)) orelse { | ||
| 1125 | try p.err(.expected_ident_or_l_paren); | ||
| 1126 | continue; | ||
| 1127 | }; | ||
| 1128 | } | ||
| 1129 | |||
| 1130 | _ = try p.expectToken(.semicolon); | ||
| 1131 | return true; | ||
| 1132 | } | ||
| 1133 | |||
| 1134 | fn staticAssertMessage(p: *Parser, cond_node: NodeIndex, message: Result) !?[]const u8 { | ||
| 1135 | const cond_tag = p.nodes.items(.tag)[@intFromEnum(cond_node)]; | ||
| 1136 | if (cond_tag != .builtin_types_compatible_p and message.node == .none) return null; | ||
| 1137 | |||
| 1138 | var buf = std.ArrayList(u8).init(p.gpa); | ||
| 1139 | defer buf.deinit(); | ||
| 1140 | |||
| 1141 | if (cond_tag == .builtin_types_compatible_p) { | ||
| 1142 | const mapper = p.comp.string_interner.getSlowTypeMapper(); | ||
| 1143 | const data = p.nodes.items(.data)[@intFromEnum(cond_node)].bin; | ||
| 1144 | |||
| 1145 | try buf.appendSlice("'__builtin_types_compatible_p("); | ||
| 1146 | |||
| 1147 | const lhs_ty = p.nodes.items(.ty)[@intFromEnum(data.lhs)]; | ||
| 1148 | try lhs_ty.print(mapper, p.comp.langopts, buf.writer()); | ||
| 1149 | try buf.appendSlice(", "); | ||
| 1150 | |||
| 1151 | const rhs_ty = p.nodes.items(.ty)[@intFromEnum(data.rhs)]; | ||
| 1152 | try rhs_ty.print(mapper, p.comp.langopts, buf.writer()); | ||
| 1153 | |||
| 1154 | try buf.appendSlice(")'"); | ||
| 1155 | } | ||
| 1156 | if (message.node != .none) { | ||
| 1157 | assert(p.nodes.items(.tag)[@intFromEnum(message.node)] == .string_literal_expr); | ||
| 1158 | if (buf.items.len > 0) { | ||
| 1159 | try buf.append(' '); | ||
| 1160 | } | ||
| 1161 | const byte_range = message.val.data.bytes; | ||
| 1162 | try buf.ensureUnusedCapacity(byte_range.len()); | ||
| 1163 | try byte_range.dumpString(message.ty, p.comp, p.retained_strings.items, buf.writer()); | ||
| 1164 | } | ||
| 1165 | return try p.comp.diag.arena.allocator().dupe(u8, buf.items); | ||
| 1166 | } | ||
| 1167 | |||
| 1168 | /// staticAssert | ||
| 1169 | /// : keyword_static_assert '(' integerConstExpr (',' STRING_LITERAL)? ')' ';' | ||
| 1170 | /// | keyword_c23_static_assert '(' integerConstExpr (',' STRING_LITERAL)? ')' ';' | ||
| 1171 | fn staticAssert(p: *Parser) Error!bool { | ||
| 1172 | const static_assert = p.eatToken(.keyword_static_assert) orelse p.eatToken(.keyword_c23_static_assert) orelse return false; | ||
| 1173 | const l_paren = try p.expectToken(.l_paren); | ||
| 1174 | const res_token = p.tok_i; | ||
| 1175 | var res = try p.constExpr(.gnu_folding_extension); | ||
| 1176 | const res_node = res.node; | ||
| 1177 | const str = if (p.eatToken(.comma) != null) | ||
| 1178 | switch (p.tok_ids[p.tok_i]) { | ||
| 1179 | .string_literal, | ||
| 1180 | .string_literal_utf_16, | ||
| 1181 | .string_literal_utf_8, | ||
| 1182 | .string_literal_utf_32, | ||
| 1183 | .string_literal_wide, | ||
| 1184 | .unterminated_string_literal, | ||
| 1185 | => try p.stringLiteral(), | ||
| 1186 | else => { | ||
| 1187 | try p.err(.expected_str_literal); | ||
| 1188 | return error.ParsingFailed; | ||
| 1189 | }, | ||
| 1190 | } | ||
| 1191 | else | ||
| 1192 | Result{}; | ||
| 1193 | try p.expectClosing(l_paren, .r_paren); | ||
| 1194 | _ = try p.expectToken(.semicolon); | ||
| 1195 | if (str.node == .none) { | ||
| 1196 | try p.errTok(.static_assert_missing_message, static_assert); | ||
| 1197 | try p.errStr(.pre_c2x_compat, static_assert, "'_Static_assert' with no message"); | ||
| 1198 | } | ||
| 1199 | |||
| 1200 | // Array will never be zero; a value of zero for a pointer is a null pointer constant | ||
| 1201 | if ((res.ty.isArray() or res.ty.isPtr()) and !res.val.isZero()) { | ||
| 1202 | const err_start = p.comp.diag.list.items.len; | ||
| 1203 | try p.errTok(.const_decl_folded, res_token); | ||
| 1204 | if (res.ty.isPtr() and err_start != p.comp.diag.list.items.len) { | ||
| 1205 | // Don't show the note if the .const_decl_folded diagnostic was not added | ||
| 1206 | try p.errTok(.constant_expression_conversion_not_allowed, res_token); | ||
| 1207 | } | ||
| 1208 | } | ||
| 1209 | try res.boolCast(p, .{ .specifier = .bool }, res_token); | ||
| 1210 | if (res.val.tag == .unavailable) { | ||
| 1211 | if (res.ty.specifier != .invalid) { | ||
| 1212 | try p.errTok(.static_assert_not_constant, res_token); | ||
| 1213 | } | ||
| 1214 | } else { | ||
| 1215 | if (!res.val.getBool()) { | ||
| 1216 | if (try p.staticAssertMessage(res_node, str)) |message| { | ||
| 1217 | try p.errStr(.static_assert_failure_message, static_assert, message); | ||
| 1218 | } else { | ||
| 1219 | try p.errTok(.static_assert_failure, static_assert); | ||
| 1220 | } | ||
| 1221 | } | ||
| 1222 | } | ||
| 1223 | |||
| 1224 | const node = try p.addNode(.{ | ||
| 1225 | .tag = .static_assert, | ||
| 1226 | .data = .{ .bin = .{ | ||
| 1227 | .lhs = res.node, | ||
| 1228 | .rhs = str.node, | ||
| 1229 | } }, | ||
| 1230 | }); | ||
| 1231 | try p.decl_buf.append(node); | ||
| 1232 | return true; | ||
| 1233 | } | ||
| 1234 | |||
| 1235 | pub const DeclSpec = struct { | ||
| 1236 | storage_class: union(enum) { | ||
| 1237 | auto: TokenIndex, | ||
| 1238 | @"extern": TokenIndex, | ||
| 1239 | register: TokenIndex, | ||
| 1240 | static: TokenIndex, | ||
| 1241 | typedef: TokenIndex, | ||
| 1242 | none, | ||
| 1243 | } = .none, | ||
| 1244 | thread_local: ?TokenIndex = null, | ||
| 1245 | constexpr: ?TokenIndex = null, | ||
| 1246 | @"inline": ?TokenIndex = null, | ||
| 1247 | noreturn: ?TokenIndex = null, | ||
| 1248 | auto_type: ?TokenIndex = null, | ||
| 1249 | ty: Type, | ||
| 1250 | |||
| 1251 | fn validateParam(d: DeclSpec, p: *Parser, ty: *Type) Error!void { | ||
| 1252 | switch (d.storage_class) { | ||
| 1253 | .none => {}, | ||
| 1254 | .register => ty.qual.register = true, | ||
| 1255 | .auto, .@"extern", .static, .typedef => |tok_i| try p.errTok(.invalid_storage_on_param, tok_i), | ||
| 1256 | } | ||
| 1257 | if (d.thread_local) |tok_i| try p.errTok(.threadlocal_non_var, tok_i); | ||
| 1258 | if (d.@"inline") |tok_i| try p.errStr(.func_spec_non_func, tok_i, "inline"); | ||
| 1259 | if (d.noreturn) |tok_i| try p.errStr(.func_spec_non_func, tok_i, "_Noreturn"); | ||
| 1260 | if (d.constexpr) |tok_i| try p.errTok(.invalid_storage_on_param, tok_i); | ||
| 1261 | if (d.auto_type) |tok_i| { | ||
| 1262 | try p.errStr(.auto_type_not_allowed, tok_i, "function prototype"); | ||
| 1263 | ty.* = Type.invalid; | ||
| 1264 | } | ||
| 1265 | } | ||
| 1266 | |||
| 1267 | fn validateFnDef(d: DeclSpec, p: *Parser) Error!Tree.Tag { | ||
| 1268 | switch (d.storage_class) { | ||
| 1269 | .none, .@"extern", .static => {}, | ||
| 1270 | .auto, .register, .typedef => |tok_i| try p.errTok(.illegal_storage_on_func, tok_i), | ||
| 1271 | } | ||
| 1272 | if (d.thread_local) |tok_i| try p.errTok(.threadlocal_non_var, tok_i); | ||
| 1273 | if (d.constexpr) |tok_i| try p.errTok(.illegal_storage_on_func, tok_i); | ||
| 1274 | |||
| 1275 | const is_static = d.storage_class == .static; | ||
| 1276 | const is_inline = d.@"inline" != null; | ||
| 1277 | if (is_static) { | ||
| 1278 | if (is_inline) return .inline_static_fn_def; | ||
| 1279 | return .static_fn_def; | ||
| 1280 | } else { | ||
| 1281 | if (is_inline) return .inline_fn_def; | ||
| 1282 | return .fn_def; | ||
| 1283 | } | ||
| 1284 | } | ||
| 1285 | |||
| 1286 | fn validate(d: DeclSpec, p: *Parser, ty: *Type, has_init: bool) Error!Tree.Tag { | ||
| 1287 | const is_static = d.storage_class == .static; | ||
| 1288 | if (ty.isFunc() and d.storage_class != .typedef) { | ||
| 1289 | switch (d.storage_class) { | ||
| 1290 | .none, .@"extern" => {}, | ||
| 1291 | .static => |tok_i| if (p.func.ty != null) try p.errTok(.static_func_not_global, tok_i), | ||
| 1292 | .typedef => unreachable, | ||
| 1293 | .auto, .register => |tok_i| try p.errTok(.illegal_storage_on_func, tok_i), | ||
| 1294 | } | ||
| 1295 | if (d.thread_local) |tok_i| try p.errTok(.threadlocal_non_var, tok_i); | ||
| 1296 | if (d.constexpr) |tok_i| try p.errTok(.illegal_storage_on_func, tok_i); | ||
| 1297 | |||
| 1298 | const is_inline = d.@"inline" != null; | ||
| 1299 | if (is_static) { | ||
| 1300 | if (is_inline) return .inline_static_fn_proto; | ||
| 1301 | return .static_fn_proto; | ||
| 1302 | } else { | ||
| 1303 | if (is_inline) return .inline_fn_proto; | ||
| 1304 | return .fn_proto; | ||
| 1305 | } | ||
| 1306 | } else { | ||
| 1307 | if (d.@"inline") |tok_i| try p.errStr(.func_spec_non_func, tok_i, "inline"); | ||
| 1308 | // TODO move to attribute validation | ||
| 1309 | if (d.noreturn) |tok_i| try p.errStr(.func_spec_non_func, tok_i, "_Noreturn"); | ||
| 1310 | switch (d.storage_class) { | ||
| 1311 | .auto, .register => if (p.func.ty == null) try p.err(.illegal_storage_on_global), | ||
| 1312 | .typedef => return .typedef, | ||
| 1313 | else => {}, | ||
| 1314 | } | ||
| 1315 | ty.qual.register = d.storage_class == .register; | ||
| 1316 | |||
| 1317 | const is_extern = d.storage_class == .@"extern" and !has_init; | ||
| 1318 | if (d.thread_local != null) { | ||
| 1319 | if (is_static) return .threadlocal_static_var; | ||
| 1320 | if (is_extern) return .threadlocal_extern_var; | ||
| 1321 | return .threadlocal_var; | ||
| 1322 | } else { | ||
| 1323 | if (is_static) return .static_var; | ||
| 1324 | if (is_extern) return .extern_var; | ||
| 1325 | return .@"var"; | ||
| 1326 | } | ||
| 1327 | } | ||
| 1328 | } | ||
| 1329 | }; | ||
| 1330 | |||
| 1331 | /// typeof | ||
| 1332 | /// : keyword_typeof '(' typeName ')' | ||
| 1333 | /// | keyword_typeof '(' expr ')' | ||
| 1334 | fn typeof(p: *Parser) Error!?Type { | ||
| 1335 | switch (p.tok_ids[p.tok_i]) { | ||
| 1336 | .keyword_typeof, .keyword_typeof1, .keyword_typeof2 => p.tok_i += 1, | ||
| 1337 | else => return null, | ||
| 1338 | } | ||
| 1339 | const l_paren = try p.expectToken(.l_paren); | ||
| 1340 | if (try p.typeName()) |ty| { | ||
| 1341 | try p.expectClosing(l_paren, .r_paren); | ||
| 1342 | const typeof_ty = try p.arena.create(Type); | ||
| 1343 | typeof_ty.* = .{ | ||
| 1344 | .data = ty.data, | ||
| 1345 | .qual = ty.qual.inheritFromTypeof(), | ||
| 1346 | .specifier = ty.specifier, | ||
| 1347 | }; | ||
| 1348 | |||
| 1349 | return Type{ | ||
| 1350 | .data = .{ .sub_type = typeof_ty }, | ||
| 1351 | .specifier = .typeof_type, | ||
| 1352 | }; | ||
| 1353 | } | ||
| 1354 | const typeof_expr = try p.parseNoEval(expr); | ||
| 1355 | try typeof_expr.expect(p); | ||
| 1356 | try p.expectClosing(l_paren, .r_paren); | ||
| 1357 | // Special case nullptr_t since it's defined as typeof(nullptr) | ||
| 1358 | if (typeof_expr.ty.is(.nullptr_t)) { | ||
| 1359 | return Type{ .specifier = .nullptr_t, .qual = typeof_expr.ty.qual.inheritFromTypeof() }; | ||
| 1360 | } | ||
| 1361 | |||
| 1362 | const inner = try p.arena.create(Type.Expr); | ||
| 1363 | inner.* = .{ | ||
| 1364 | .node = typeof_expr.node, | ||
| 1365 | .ty = .{ | ||
| 1366 | .data = typeof_expr.ty.data, | ||
| 1367 | .qual = typeof_expr.ty.qual.inheritFromTypeof(), | ||
| 1368 | .specifier = typeof_expr.ty.specifier, | ||
| 1369 | }, | ||
| 1370 | }; | ||
| 1371 | |||
| 1372 | return Type{ | ||
| 1373 | .data = .{ .expr = inner }, | ||
| 1374 | .specifier = .typeof_expr, | ||
| 1375 | }; | ||
| 1376 | } | ||
| 1377 | |||
| 1378 | /// declSpec: (storageClassSpec | typeSpec | typeQual | funcSpec | alignSpec)+ | ||
| 1379 | /// storageClassSpec: | ||
| 1380 | /// : keyword_typedef | ||
| 1381 | /// | keyword_extern | ||
| 1382 | /// | keyword_static | ||
| 1383 | /// | keyword_threadlocal | ||
| 1384 | /// | keyword_auto | ||
| 1385 | /// | keyword_register | ||
| 1386 | /// funcSpec : keyword_inline | keyword_noreturn | ||
| 1387 | fn declSpec(p: *Parser) Error!?DeclSpec { | ||
| 1388 | var d: DeclSpec = .{ .ty = .{ .specifier = undefined } }; | ||
| 1389 | var spec: Type.Builder = .{}; | ||
| 1390 | |||
| 1391 | const start = p.tok_i; | ||
| 1392 | while (true) { | ||
| 1393 | if (try p.typeSpec(&spec)) continue; | ||
| 1394 | const id = p.tok_ids[p.tok_i]; | ||
| 1395 | switch (id) { | ||
| 1396 | .keyword_typedef, | ||
| 1397 | .keyword_extern, | ||
| 1398 | .keyword_static, | ||
| 1399 | .keyword_auto, | ||
| 1400 | .keyword_register, | ||
| 1401 | => { | ||
| 1402 | if (d.storage_class != .none) { | ||
| 1403 | try p.errStr(.multiple_storage_class, p.tok_i, @tagName(d.storage_class)); | ||
| 1404 | return error.ParsingFailed; | ||
| 1405 | } | ||
| 1406 | if (d.thread_local != null) { | ||
| 1407 | switch (id) { | ||
| 1408 | .keyword_extern, .keyword_static => {}, | ||
| 1409 | else => try p.errStr(.cannot_combine_spec, p.tok_i, id.lexeme().?), | ||
| 1410 | } | ||
| 1411 | if (d.constexpr) |tok| try p.errStr(.cannot_combine_spec, p.tok_i, p.tok_ids[tok].lexeme().?); | ||
| 1412 | } | ||
| 1413 | if (d.constexpr != null) { | ||
| 1414 | switch (id) { | ||
| 1415 | .keyword_auto, .keyword_register, .keyword_static => {}, | ||
| 1416 | else => try p.errStr(.cannot_combine_spec, p.tok_i, id.lexeme().?), | ||
| 1417 | } | ||
| 1418 | if (d.thread_local) |tok| try p.errStr(.cannot_combine_spec, p.tok_i, p.tok_ids[tok].lexeme().?); | ||
| 1419 | } | ||
| 1420 | switch (id) { | ||
| 1421 | .keyword_typedef => d.storage_class = .{ .typedef = p.tok_i }, | ||
| 1422 | .keyword_extern => d.storage_class = .{ .@"extern" = p.tok_i }, | ||
| 1423 | .keyword_static => d.storage_class = .{ .static = p.tok_i }, | ||
| 1424 | .keyword_auto => d.storage_class = .{ .auto = p.tok_i }, | ||
| 1425 | .keyword_register => d.storage_class = .{ .register = p.tok_i }, | ||
| 1426 | else => unreachable, | ||
| 1427 | } | ||
| 1428 | }, | ||
| 1429 | .keyword_thread_local, | ||
| 1430 | .keyword_c23_thread_local, | ||
| 1431 | => { | ||
| 1432 | if (d.thread_local != null) { | ||
| 1433 | try p.errStr(.duplicate_decl_spec, p.tok_i, id.lexeme().?); | ||
| 1434 | } | ||
| 1435 | if (d.constexpr) |tok| try p.errStr(.cannot_combine_spec, p.tok_i, p.tok_ids[tok].lexeme().?); | ||
| 1436 | switch (d.storage_class) { | ||
| 1437 | .@"extern", .none, .static => {}, | ||
| 1438 | else => try p.errStr(.cannot_combine_spec, p.tok_i, @tagName(d.storage_class)), | ||
| 1439 | } | ||
| 1440 | d.thread_local = p.tok_i; | ||
| 1441 | }, | ||
| 1442 | .keyword_constexpr => { | ||
| 1443 | if (d.constexpr != null) { | ||
| 1444 | try p.errStr(.duplicate_decl_spec, p.tok_i, id.lexeme().?); | ||
| 1445 | } | ||
| 1446 | if (d.thread_local) |tok| try p.errStr(.cannot_combine_spec, p.tok_i, p.tok_ids[tok].lexeme().?); | ||
| 1447 | switch (d.storage_class) { | ||
| 1448 | .auto, .register, .none, .static => {}, | ||
| 1449 | else => try p.errStr(.cannot_combine_spec, p.tok_i, @tagName(d.storage_class)), | ||
| 1450 | } | ||
| 1451 | d.constexpr = p.tok_i; | ||
| 1452 | }, | ||
| 1453 | .keyword_inline, .keyword_inline1, .keyword_inline2 => { | ||
| 1454 | if (d.@"inline" != null) { | ||
| 1455 | try p.errStr(.duplicate_decl_spec, p.tok_i, "inline"); | ||
| 1456 | } | ||
| 1457 | d.@"inline" = p.tok_i; | ||
| 1458 | }, | ||
| 1459 | .keyword_noreturn => { | ||
| 1460 | if (d.noreturn != null) { | ||
| 1461 | try p.errStr(.duplicate_decl_spec, p.tok_i, "_Noreturn"); | ||
| 1462 | } | ||
| 1463 | d.noreturn = p.tok_i; | ||
| 1464 | }, | ||
| 1465 | else => break, | ||
| 1466 | } | ||
| 1467 | p.tok_i += 1; | ||
| 1468 | } | ||
| 1469 | |||
| 1470 | if (p.tok_i == start) return null; | ||
| 1471 | |||
| 1472 | d.ty = try spec.finish(p); | ||
| 1473 | d.auto_type = spec.auto_type_tok; | ||
| 1474 | return d; | ||
| 1475 | } | ||
| 1476 | |||
| 1477 | const InitDeclarator = struct { d: Declarator, initializer: Result = .{} }; | ||
| 1478 | |||
| 1479 | /// attribute | ||
| 1480 | /// : attrIdentifier | ||
| 1481 | /// | attrIdentifier '(' identifier ')' | ||
| 1482 | /// | attrIdentifier '(' identifier (',' expr)+ ')' | ||
| 1483 | /// | attrIdentifier '(' (expr (',' expr)*)? ')' | ||
| 1484 | fn attribute(p: *Parser, kind: Attribute.Kind, namespace: ?[]const u8) Error!?TentativeAttribute { | ||
| 1485 | const name_tok = p.tok_i; | ||
| 1486 | switch (p.tok_ids[p.tok_i]) { | ||
| 1487 | .keyword_const, .keyword_const1, .keyword_const2 => p.tok_i += 1, | ||
| 1488 | else => _ = try p.expectIdentifier(), | ||
| 1489 | } | ||
| 1490 | const name = p.tokSlice(name_tok); | ||
| 1491 | |||
| 1492 | const attr = Attribute.fromString(kind, namespace, name) orelse { | ||
| 1493 | const tag: Diagnostics.Tag = if (kind == .declspec) .declspec_attr_not_supported else .unknown_attribute; | ||
| 1494 | try p.errStr(tag, name_tok, name); | ||
| 1495 | if (p.eatToken(.l_paren)) |_| p.skipTo(.r_paren); | ||
| 1496 | return null; | ||
| 1497 | }; | ||
| 1498 | |||
| 1499 | const required_count = Attribute.requiredArgCount(attr); | ||
| 1500 | var arguments = Attribute.initArguments(attr, name_tok); | ||
| 1501 | var arg_idx: u32 = 0; | ||
| 1502 | |||
| 1503 | switch (p.tok_ids[p.tok_i]) { | ||
| 1504 | .comma, .r_paren => {}, // will be consumed in attributeList | ||
| 1505 | .l_paren => blk: { | ||
| 1506 | p.tok_i += 1; | ||
| 1507 | if (p.eatToken(.r_paren)) |_| break :blk; | ||
| 1508 | |||
| 1509 | if (Attribute.wantsIdentEnum(attr)) { | ||
| 1510 | if (try p.eatIdentifier()) |ident| { | ||
| 1511 | if (Attribute.diagnoseIdent(attr, &arguments, p.tokSlice(ident))) |msg| { | ||
| 1512 | try p.errExtra(msg.tag, ident, msg.extra); | ||
| 1513 | p.skipTo(.r_paren); | ||
| 1514 | return error.ParsingFailed; | ||
| 1515 | } | ||
| 1516 | } else { | ||
| 1517 | try p.errExtra(.attribute_requires_identifier, name_tok, .{ .str = name }); | ||
| 1518 | return error.ParsingFailed; | ||
| 1519 | } | ||
| 1520 | } else { | ||
| 1521 | const arg_start = p.tok_i; | ||
| 1522 | var first_expr = try p.assignExpr(); | ||
| 1523 | try first_expr.expect(p); | ||
| 1524 | if (p.diagnose(attr, &arguments, arg_idx, first_expr)) |msg| { | ||
| 1525 | try p.errExtra(msg.tag, arg_start, msg.extra); | ||
| 1526 | p.skipTo(.r_paren); | ||
| 1527 | return error.ParsingFailed; | ||
| 1528 | } | ||
| 1529 | } | ||
| 1530 | arg_idx += 1; | ||
| 1531 | while (p.eatToken(.r_paren) == null) : (arg_idx += 1) { | ||
| 1532 | _ = try p.expectToken(.comma); | ||
| 1533 | |||
| 1534 | const arg_start = p.tok_i; | ||
| 1535 | var arg_expr = try p.assignExpr(); | ||
| 1536 | try arg_expr.expect(p); | ||
| 1537 | if (p.diagnose(attr, &arguments, arg_idx, arg_expr)) |msg| { | ||
| 1538 | try p.errExtra(msg.tag, arg_start, msg.extra); | ||
| 1539 | p.skipTo(.r_paren); | ||
| 1540 | return error.ParsingFailed; | ||
| 1541 | } | ||
| 1542 | } | ||
| 1543 | }, | ||
| 1544 | else => {}, | ||
| 1545 | } | ||
| 1546 | if (arg_idx < required_count) { | ||
| 1547 | try p.errExtra(.attribute_not_enough_args, name_tok, .{ .attr_arg_count = .{ .attribute = attr, .expected = required_count } }); | ||
| 1548 | return error.ParsingFailed; | ||
| 1549 | } | ||
| 1550 | return TentativeAttribute{ .attr = .{ .tag = attr, .args = arguments, .syntax = kind.toSyntax() }, .tok = name_tok }; | ||
| 1551 | } | ||
| 1552 | |||
| 1553 | fn diagnose(p: *Parser, attr: Attribute.Tag, arguments: *Attribute.Arguments, arg_idx: u32, res: Result) ?Diagnostics.Message { | ||
| 1554 | if (Attribute.wantsAlignment(attr, arg_idx)) { | ||
| 1555 | return Attribute.diagnoseAlignment(attr, arguments, arg_idx, res.val, res.ty, p.comp); | ||
| 1556 | } | ||
| 1557 | const node = p.nodes.get(@intFromEnum(res.node)); | ||
| 1558 | return Attribute.diagnose(attr, arguments, arg_idx, res.val, node, p.retained_strings.items); | ||
| 1559 | } | ||
| 1560 | |||
| 1561 | /// attributeList : (attribute (',' attribute)*)? | ||
| 1562 | fn gnuAttributeList(p: *Parser) Error!void { | ||
| 1563 | if (p.tok_ids[p.tok_i] == .r_paren) return; | ||
| 1564 | |||
| 1565 | if (try p.attribute(.gnu, null)) |attr| try p.attr_buf.append(p.gpa, attr); | ||
| 1566 | while (p.tok_ids[p.tok_i] != .r_paren) { | ||
| 1567 | _ = try p.expectToken(.comma); | ||
| 1568 | if (try p.attribute(.gnu, null)) |attr| try p.attr_buf.append(p.gpa, attr); | ||
| 1569 | } | ||
| 1570 | } | ||
| 1571 | |||
| 1572 | fn c2xAttributeList(p: *Parser) Error!void { | ||
| 1573 | while (p.tok_ids[p.tok_i] != .r_bracket) { | ||
| 1574 | var namespace_tok = try p.expectIdentifier(); | ||
| 1575 | var namespace: ?[]const u8 = null; | ||
| 1576 | if (p.eatToken(.colon_colon)) |_| { | ||
| 1577 | namespace = p.tokSlice(namespace_tok); | ||
| 1578 | } else { | ||
| 1579 | p.tok_i -= 1; | ||
| 1580 | } | ||
| 1581 | if (try p.attribute(.c2x, namespace)) |attr| try p.attr_buf.append(p.gpa, attr); | ||
| 1582 | _ = p.eatToken(.comma); | ||
| 1583 | } | ||
| 1584 | } | ||
| 1585 | |||
| 1586 | fn msvcAttributeList(p: *Parser) Error!void { | ||
| 1587 | while (p.tok_ids[p.tok_i] != .r_paren) { | ||
| 1588 | if (try p.attribute(.declspec, null)) |attr| try p.attr_buf.append(p.gpa, attr); | ||
| 1589 | _ = p.eatToken(.comma); | ||
| 1590 | } | ||
| 1591 | } | ||
| 1592 | |||
| 1593 | fn c2xAttribute(p: *Parser) !bool { | ||
| 1594 | if (!p.comp.langopts.standard.atLeast(.c2x)) return false; | ||
| 1595 | const bracket1 = p.eatToken(.l_bracket) orelse return false; | ||
| 1596 | const bracket2 = p.eatToken(.l_bracket) orelse { | ||
| 1597 | p.tok_i -= 1; | ||
| 1598 | return false; | ||
| 1599 | }; | ||
| 1600 | |||
| 1601 | try p.c2xAttributeList(); | ||
| 1602 | |||
| 1603 | _ = try p.expectClosing(bracket2, .r_bracket); | ||
| 1604 | _ = try p.expectClosing(bracket1, .r_bracket); | ||
| 1605 | |||
| 1606 | return true; | ||
| 1607 | } | ||
| 1608 | |||
| 1609 | fn msvcAttribute(p: *Parser) !bool { | ||
| 1610 | _ = p.eatToken(.keyword_declspec) orelse return false; | ||
| 1611 | const l_paren = try p.expectToken(.l_paren); | ||
| 1612 | try p.msvcAttributeList(); | ||
| 1613 | _ = try p.expectClosing(l_paren, .r_paren); | ||
| 1614 | |||
| 1615 | return true; | ||
| 1616 | } | ||
| 1617 | |||
| 1618 | fn gnuAttribute(p: *Parser) !bool { | ||
| 1619 | switch (p.tok_ids[p.tok_i]) { | ||
| 1620 | .keyword_attribute1, .keyword_attribute2 => p.tok_i += 1, | ||
| 1621 | else => return false, | ||
| 1622 | } | ||
| 1623 | const paren1 = try p.expectToken(.l_paren); | ||
| 1624 | const paren2 = try p.expectToken(.l_paren); | ||
| 1625 | |||
| 1626 | try p.gnuAttributeList(); | ||
| 1627 | |||
| 1628 | _ = try p.expectClosing(paren2, .r_paren); | ||
| 1629 | _ = try p.expectClosing(paren1, .r_paren); | ||
| 1630 | return true; | ||
| 1631 | } | ||
| 1632 | |||
| 1633 | fn attributeSpecifier(p: *Parser) Error!void { | ||
| 1634 | return attributeSpecifierExtra(p, null); | ||
| 1635 | } | ||
| 1636 | |||
| 1637 | /// attributeSpecifier : (keyword_attribute '( '(' attributeList ')' ')')* | ||
| 1638 | fn attributeSpecifierExtra(p: *Parser, declarator_name: ?TokenIndex) Error!void { | ||
| 1639 | while (true) { | ||
| 1640 | if (try p.gnuAttribute()) continue; | ||
| 1641 | if (try p.c2xAttribute()) continue; | ||
| 1642 | const maybe_declspec_tok = p.tok_i; | ||
| 1643 | const attr_buf_top = p.attr_buf.len; | ||
| 1644 | if (try p.msvcAttribute()) { | ||
| 1645 | if (declarator_name) |name_tok| { | ||
| 1646 | try p.errTok(.declspec_not_allowed_after_declarator, maybe_declspec_tok); | ||
| 1647 | try p.errTok(.declarator_name_tok, name_tok); | ||
| 1648 | p.attr_buf.len = attr_buf_top; | ||
| 1649 | } | ||
| 1650 | continue; | ||
| 1651 | } | ||
| 1652 | break; | ||
| 1653 | } | ||
| 1654 | } | ||
| 1655 | |||
| 1656 | /// initDeclarator : declarator assembly? attributeSpecifier? ('=' initializer)? | ||
| 1657 | fn initDeclarator(p: *Parser, decl_spec: *DeclSpec, attr_buf_top: usize) Error!?InitDeclarator { | ||
| 1658 | const this_attr_buf_top = p.attr_buf.len; | ||
| 1659 | defer p.attr_buf.len = this_attr_buf_top; | ||
| 1660 | |||
| 1661 | var init_d = InitDeclarator{ | ||
| 1662 | .d = (try p.declarator(decl_spec.ty, .normal)) orelse return null, | ||
| 1663 | }; | ||
| 1664 | |||
| 1665 | try p.attributeSpecifierExtra(init_d.d.name); | ||
| 1666 | _ = try p.assembly(.decl_label); | ||
| 1667 | try p.attributeSpecifierExtra(init_d.d.name); | ||
| 1668 | |||
| 1669 | var apply_var_attributes = false; | ||
| 1670 | if (decl_spec.storage_class == .typedef) { | ||
| 1671 | if (decl_spec.auto_type) |tok_i| { | ||
| 1672 | try p.errStr(.auto_type_not_allowed, tok_i, "typedef"); | ||
| 1673 | return error.ParsingFailed; | ||
| 1674 | } | ||
| 1675 | init_d.d.ty = try Attribute.applyTypeAttributes(p, init_d.d.ty, attr_buf_top, null); | ||
| 1676 | } else if (init_d.d.ty.isFunc()) { | ||
| 1677 | init_d.d.ty = try Attribute.applyFunctionAttributes(p, init_d.d.ty, attr_buf_top); | ||
| 1678 | } else { | ||
| 1679 | apply_var_attributes = true; | ||
| 1680 | } | ||
| 1681 | |||
| 1682 | if (p.eatToken(.equal)) |eq| init: { | ||
| 1683 | if (decl_spec.storage_class == .typedef or init_d.d.func_declarator != null) { | ||
| 1684 | try p.errTok(.illegal_initializer, eq); | ||
| 1685 | } else if (init_d.d.ty.is(.variable_len_array)) { | ||
| 1686 | try p.errTok(.vla_init, eq); | ||
| 1687 | } else if (decl_spec.storage_class == .@"extern") { | ||
| 1688 | try p.err(.extern_initializer); | ||
| 1689 | decl_spec.storage_class = .none; | ||
| 1690 | } | ||
| 1691 | |||
| 1692 | if (init_d.d.ty.hasIncompleteSize() and !init_d.d.ty.is(.incomplete_array)) { | ||
| 1693 | try p.errStr(.variable_incomplete_ty, init_d.d.name, try p.typeStr(init_d.d.ty)); | ||
| 1694 | return error.ParsingFailed; | ||
| 1695 | } | ||
| 1696 | |||
| 1697 | try p.syms.pushScope(p); | ||
| 1698 | defer p.syms.popScope(); | ||
| 1699 | |||
| 1700 | const interned_name = try p.comp.intern(p.tokSlice(init_d.d.name)); | ||
| 1701 | try p.syms.declareSymbol(p, interned_name, init_d.d.ty, init_d.d.name, .none); | ||
| 1702 | var init_list_expr = try p.initializer(init_d.d.ty); | ||
| 1703 | init_d.initializer = init_list_expr; | ||
| 1704 | if (!init_list_expr.ty.isArray()) break :init; | ||
| 1705 | if (init_d.d.ty.specifier == .incomplete_array) { | ||
| 1706 | // Modifying .data is exceptionally allowed for .incomplete_array. | ||
| 1707 | init_d.d.ty.data.array.len = init_list_expr.ty.arrayLen() orelse break :init; | ||
| 1708 | init_d.d.ty.specifier = .array; | ||
| 1709 | } | ||
| 1710 | } | ||
| 1711 | |||
| 1712 | const name = init_d.d.name; | ||
| 1713 | if (init_d.d.ty.is(.auto_type)) { | ||
| 1714 | if (init_d.initializer.node == .none) { | ||
| 1715 | init_d.d.ty = Type.invalid; | ||
| 1716 | try p.errStr(.auto_type_requires_initializer, name, p.tokSlice(name)); | ||
| 1717 | return init_d; | ||
| 1718 | } else { | ||
| 1719 | init_d.d.ty.specifier = init_d.initializer.ty.specifier; | ||
| 1720 | init_d.d.ty.data = init_d.initializer.ty.data; | ||
| 1721 | } | ||
| 1722 | } | ||
| 1723 | if (apply_var_attributes) { | ||
| 1724 | init_d.d.ty = try Attribute.applyVariableAttributes(p, init_d.d.ty, attr_buf_top, null); | ||
| 1725 | } | ||
| 1726 | if (decl_spec.storage_class != .typedef and init_d.d.ty.hasIncompleteSize()) incomplete: { | ||
| 1727 | const specifier = init_d.d.ty.canonicalize(.standard).specifier; | ||
| 1728 | if (decl_spec.storage_class == .@"extern") switch (specifier) { | ||
| 1729 | .@"struct", .@"union", .@"enum" => break :incomplete, | ||
| 1730 | .incomplete_array => { | ||
| 1731 | init_d.d.ty.decayArray(); | ||
| 1732 | break :incomplete; | ||
| 1733 | }, | ||
| 1734 | else => {}, | ||
| 1735 | }; | ||
| 1736 | // if there was an initializer expression it must have contained an error | ||
| 1737 | if (init_d.initializer.node != .none) break :incomplete; | ||
| 1738 | |||
| 1739 | if (p.func.ty == null) { | ||
| 1740 | if (specifier == .incomplete_array) { | ||
| 1741 | // TODO properly check this after finishing parsing | ||
| 1742 | try p.errStr(.tentative_array, name, try p.typeStr(init_d.d.ty)); | ||
| 1743 | break :incomplete; | ||
| 1744 | } else if (init_d.d.ty.getRecord()) |record| { | ||
| 1745 | _ = try p.tentative_defs.getOrPutValue(p.gpa, record.name, init_d.d.name); | ||
| 1746 | break :incomplete; | ||
| 1747 | } else if (init_d.d.ty.get(.@"enum")) |en| { | ||
| 1748 | _ = try p.tentative_defs.getOrPutValue(p.gpa, en.data.@"enum".name, init_d.d.name); | ||
| 1749 | break :incomplete; | ||
| 1750 | } | ||
| 1751 | } | ||
| 1752 | try p.errStr(.variable_incomplete_ty, name, try p.typeStr(init_d.d.ty)); | ||
| 1753 | } | ||
| 1754 | return init_d; | ||
| 1755 | } | ||
| 1756 | |||
| 1757 | /// typeSpec | ||
| 1758 | /// : keyword_void | ||
| 1759 | /// | keyword_auto_type | ||
| 1760 | /// | keyword_char | ||
| 1761 | /// | keyword_short | ||
| 1762 | /// | keyword_int | ||
| 1763 | /// | keyword_long | ||
| 1764 | /// | keyword_float | ||
| 1765 | /// | keyword_double | ||
| 1766 | /// | keyword_signed | ||
| 1767 | /// | keyword_unsigned | ||
| 1768 | /// | keyword_bool | ||
| 1769 | /// | keyword_c23_bool | ||
| 1770 | /// | keyword_complex | ||
| 1771 | /// | atomicTypeSpec | ||
| 1772 | /// | recordSpec | ||
| 1773 | /// | enumSpec | ||
| 1774 | /// | typedef // IDENTIFIER | ||
| 1775 | /// | typeof | ||
| 1776 | /// | keyword_bit_int '(' integerConstExpr ')' | ||
| 1777 | /// atomicTypeSpec : keyword_atomic '(' typeName ')' | ||
| 1778 | /// alignSpec | ||
| 1779 | /// : keyword_alignas '(' typeName ')' | ||
| 1780 | /// | keyword_alignas '(' integerConstExpr ')' | ||
| 1781 | /// | keyword_c23_alignas '(' typeName ')' | ||
| 1782 | /// | keyword_c23_alignas '(' integerConstExpr ')' | ||
| 1783 | fn typeSpec(p: *Parser, ty: *Type.Builder) Error!bool { | ||
| 1784 | const start = p.tok_i; | ||
| 1785 | while (true) { | ||
| 1786 | try p.attributeSpecifier(); | ||
| 1787 | |||
| 1788 | if (try p.typeof()) |inner_ty| { | ||
| 1789 | try ty.combineFromTypeof(p, inner_ty, start); | ||
| 1790 | continue; | ||
| 1791 | } | ||
| 1792 | if (try p.typeQual(&ty.qual)) continue; | ||
| 1793 | switch (p.tok_ids[p.tok_i]) { | ||
| 1794 | .keyword_void => try ty.combine(p, .void, p.tok_i), | ||
| 1795 | .keyword_auto_type => { | ||
| 1796 | try p.errTok(.auto_type_extension, p.tok_i); | ||
| 1797 | try ty.combine(p, .auto_type, p.tok_i); | ||
| 1798 | }, | ||
| 1799 | .keyword_bool, .keyword_c23_bool => try ty.combine(p, .bool, p.tok_i), | ||
| 1800 | .keyword_int8, .keyword_int8_2, .keyword_char => try ty.combine(p, .char, p.tok_i), | ||
| 1801 | .keyword_int16, .keyword_int16_2, .keyword_short => try ty.combine(p, .short, p.tok_i), | ||
| 1802 | .keyword_int32, .keyword_int32_2, .keyword_int => try ty.combine(p, .int, p.tok_i), | ||
| 1803 | .keyword_long => try ty.combine(p, .long, p.tok_i), | ||
| 1804 | .keyword_int64, .keyword_int64_2 => try ty.combine(p, .long_long, p.tok_i), | ||
| 1805 | .keyword_int128 => try ty.combine(p, .int128, p.tok_i), | ||
| 1806 | .keyword_signed => try ty.combine(p, .signed, p.tok_i), | ||
| 1807 | .keyword_unsigned => try ty.combine(p, .unsigned, p.tok_i), | ||
| 1808 | .keyword_fp16 => try ty.combine(p, .fp16, p.tok_i), | ||
| 1809 | .keyword_float16 => try ty.combine(p, .float16, p.tok_i), | ||
| 1810 | .keyword_float => try ty.combine(p, .float, p.tok_i), | ||
| 1811 | .keyword_double => try ty.combine(p, .double, p.tok_i), | ||
| 1812 | .keyword_complex => try ty.combine(p, .complex, p.tok_i), | ||
| 1813 | .keyword_float80 => try ty.combine(p, .float80, p.tok_i), | ||
| 1814 | .keyword_float128 => try ty.combine(p, .float128, p.tok_i), | ||
| 1815 | .keyword_atomic => { | ||
| 1816 | const atomic_tok = p.tok_i; | ||
| 1817 | p.tok_i += 1; | ||
| 1818 | const l_paren = p.eatToken(.l_paren) orelse { | ||
| 1819 | // _Atomic qualifier not _Atomic(typeName) | ||
| 1820 | p.tok_i = atomic_tok; | ||
| 1821 | break; | ||
| 1822 | }; | ||
| 1823 | const inner_ty = (try p.typeName()) orelse { | ||
| 1824 | try p.err(.expected_type); | ||
| 1825 | return error.ParsingFailed; | ||
| 1826 | }; | ||
| 1827 | try p.expectClosing(l_paren, .r_paren); | ||
| 1828 | |||
| 1829 | const new_spec = Type.Builder.fromType(inner_ty); | ||
| 1830 | try ty.combine(p, new_spec, atomic_tok); | ||
| 1831 | |||
| 1832 | if (ty.qual.atomic != null) | ||
| 1833 | try p.errStr(.duplicate_decl_spec, atomic_tok, "atomic") | ||
| 1834 | else | ||
| 1835 | ty.qual.atomic = atomic_tok; | ||
| 1836 | continue; | ||
| 1837 | }, | ||
| 1838 | .keyword_alignas, | ||
| 1839 | .keyword_c23_alignas, | ||
| 1840 | => { | ||
| 1841 | const align_tok = p.tok_i; | ||
| 1842 | p.tok_i += 1; | ||
| 1843 | const l_paren = try p.expectToken(.l_paren); | ||
| 1844 | const typename_start = p.tok_i; | ||
| 1845 | if (try p.typeName()) |inner_ty| { | ||
| 1846 | if (!inner_ty.alignable()) { | ||
| 1847 | try p.errStr(.invalid_alignof, typename_start, try p.typeStr(inner_ty)); | ||
| 1848 | } | ||
| 1849 | const alignment = Attribute.Alignment{ .requested = inner_ty.alignof(p.comp) }; | ||
| 1850 | try p.attr_buf.append(p.gpa, .{ | ||
| 1851 | .attr = .{ .tag = .aligned, .args = .{ | ||
| 1852 | .aligned = .{ .alignment = alignment, .__name_tok = align_tok }, | ||
| 1853 | }, .syntax = .keyword }, | ||
| 1854 | .tok = align_tok, | ||
| 1855 | }); | ||
| 1856 | } else { | ||
| 1857 | const arg_start = p.tok_i; | ||
| 1858 | const res = try p.integerConstExpr(.no_const_decl_folding); | ||
| 1859 | if (!res.val.isZero()) { | ||
| 1860 | var args = Attribute.initArguments(.aligned, align_tok); | ||
| 1861 | if (p.diagnose(.aligned, &args, 0, res)) |msg| { | ||
| 1862 | try p.errExtra(msg.tag, arg_start, msg.extra); | ||
| 1863 | p.skipTo(.r_paren); | ||
| 1864 | return error.ParsingFailed; | ||
| 1865 | } | ||
| 1866 | args.aligned.alignment.?.node = res.node; | ||
| 1867 | try p.attr_buf.append(p.gpa, .{ | ||
| 1868 | .attr = .{ .tag = .aligned, .args = args, .syntax = .keyword }, | ||
| 1869 | .tok = align_tok, | ||
| 1870 | }); | ||
| 1871 | } | ||
| 1872 | } | ||
| 1873 | try p.expectClosing(l_paren, .r_paren); | ||
| 1874 | continue; | ||
| 1875 | }, | ||
| 1876 | .keyword_stdcall, | ||
| 1877 | .keyword_stdcall2, | ||
| 1878 | .keyword_thiscall, | ||
| 1879 | .keyword_thiscall2, | ||
| 1880 | .keyword_vectorcall, | ||
| 1881 | .keyword_vectorcall2, | ||
| 1882 | => try p.attr_buf.append(p.gpa, .{ | ||
| 1883 | .attr = .{ .tag = .calling_convention, .args = .{ | ||
| 1884 | .calling_convention = .{ .cc = switch (p.tok_ids[p.tok_i]) { | ||
| 1885 | .keyword_stdcall, | ||
| 1886 | .keyword_stdcall2, | ||
| 1887 | => .stdcall, | ||
| 1888 | .keyword_thiscall, | ||
| 1889 | .keyword_thiscall2, | ||
| 1890 | => .thiscall, | ||
| 1891 | .keyword_vectorcall, | ||
| 1892 | .keyword_vectorcall2, | ||
| 1893 | => .vectorcall, | ||
| 1894 | else => unreachable, | ||
| 1895 | } }, | ||
| 1896 | }, .syntax = .keyword }, | ||
| 1897 | .tok = p.tok_i, | ||
| 1898 | }), | ||
| 1899 | .keyword_struct, .keyword_union => { | ||
| 1900 | const tag_tok = p.tok_i; | ||
| 1901 | const record_ty = try p.recordSpec(); | ||
| 1902 | try ty.combine(p, Type.Builder.fromType(record_ty), tag_tok); | ||
| 1903 | continue; | ||
| 1904 | }, | ||
| 1905 | .keyword_enum => { | ||
| 1906 | const tag_tok = p.tok_i; | ||
| 1907 | const enum_ty = try p.enumSpec(); | ||
| 1908 | try ty.combine(p, Type.Builder.fromType(enum_ty), tag_tok); | ||
| 1909 | continue; | ||
| 1910 | }, | ||
| 1911 | .identifier, .extended_identifier => { | ||
| 1912 | var interned_name = try p.comp.intern(p.tokSlice(p.tok_i)); | ||
| 1913 | var declspec_found = false; | ||
| 1914 | |||
| 1915 | if (interned_name == p.string_ids.declspec_id) { | ||
| 1916 | try p.errTok(.declspec_not_enabled, p.tok_i); | ||
| 1917 | p.tok_i += 1; | ||
| 1918 | if (p.eatToken(.l_paren)) |_| { | ||
| 1919 | p.skipTo(.r_paren); | ||
| 1920 | continue; | ||
| 1921 | } | ||
| 1922 | declspec_found = true; | ||
| 1923 | } | ||
| 1924 | if (ty.typedef != null) break; | ||
| 1925 | if (declspec_found) { | ||
| 1926 | interned_name = try p.comp.intern(p.tokSlice(p.tok_i)); | ||
| 1927 | } | ||
| 1928 | const typedef = (try p.syms.findTypedef(p, interned_name, p.tok_i, ty.specifier != .none)) orelse break; | ||
| 1929 | if (!ty.combineTypedef(p, typedef.ty, typedef.tok)) break; | ||
| 1930 | }, | ||
| 1931 | .keyword_bit_int => { | ||
| 1932 | try p.err(.bit_int); | ||
| 1933 | const bit_int_tok = p.tok_i; | ||
| 1934 | p.tok_i += 1; | ||
| 1935 | const l_paren = try p.expectToken(.l_paren); | ||
| 1936 | const res = try p.integerConstExpr(.gnu_folding_extension); | ||
| 1937 | try p.expectClosing(l_paren, .r_paren); | ||
| 1938 | |||
| 1939 | var bits: i16 = undefined; | ||
| 1940 | if (res.val.tag == .unavailable) { | ||
| 1941 | try p.errTok(.expected_integer_constant_expr, bit_int_tok); | ||
| 1942 | return error.ParsingFailed; | ||
| 1943 | } else if (res.val.compare(.lte, Value.int(0), res.ty, p.comp)) { | ||
| 1944 | bits = -1; | ||
| 1945 | } else if (res.val.compare(.gt, Value.int(128), res.ty, p.comp)) { | ||
| 1946 | bits = 129; | ||
| 1947 | } else { | ||
| 1948 | bits = res.val.getInt(i16); | ||
| 1949 | } | ||
| 1950 | |||
| 1951 | try ty.combine(p, .{ .bit_int = bits }, bit_int_tok); | ||
| 1952 | continue; | ||
| 1953 | }, | ||
| 1954 | else => break, | ||
| 1955 | } | ||
| 1956 | // consume single token specifiers here | ||
| 1957 | p.tok_i += 1; | ||
| 1958 | } | ||
| 1959 | return p.tok_i != start; | ||
| 1960 | } | ||
| 1961 | |||
| 1962 | fn getAnonymousName(p: *Parser, kind_tok: TokenIndex) !StringId { | ||
| 1963 | const loc = p.pp.tokens.items(.loc)[kind_tok]; | ||
| 1964 | const source = p.comp.getSource(loc.id); | ||
| 1965 | const line_col = source.lineCol(loc); | ||
| 1966 | |||
| 1967 | const kind_str = switch (p.tok_ids[kind_tok]) { | ||
| 1968 | .keyword_struct, .keyword_union, .keyword_enum => p.tokSlice(kind_tok), | ||
| 1969 | else => "record field", | ||
| 1970 | }; | ||
| 1971 | |||
| 1972 | const str = try std.fmt.allocPrint( | ||
| 1973 | p.arena, | ||
| 1974 | "(anonymous {s} at {s}:{d}:{d})", | ||
| 1975 | .{ kind_str, source.path, line_col.line_no, line_col.col }, | ||
| 1976 | ); | ||
| 1977 | return p.comp.intern(str); | ||
| 1978 | } | ||
| 1979 | |||
| 1980 | /// recordSpec | ||
| 1981 | /// : (keyword_struct | keyword_union) IDENTIFIER? { recordDecl* } | ||
| 1982 | /// | (keyword_struct | keyword_union) IDENTIFIER | ||
| 1983 | fn recordSpec(p: *Parser) Error!Type { | ||
| 1984 | const starting_pragma_pack = p.pragma_pack; | ||
| 1985 | const kind_tok = p.tok_i; | ||
| 1986 | const is_struct = p.tok_ids[kind_tok] == .keyword_struct; | ||
| 1987 | p.tok_i += 1; | ||
| 1988 | const attr_buf_top = p.attr_buf.len; | ||
| 1989 | defer p.attr_buf.len = attr_buf_top; | ||
| 1990 | try p.attributeSpecifier(); | ||
| 1991 | |||
| 1992 | const maybe_ident = try p.eatIdentifier(); | ||
| 1993 | const l_brace = p.eatToken(.l_brace) orelse { | ||
| 1994 | const ident = maybe_ident orelse { | ||
| 1995 | try p.err(.ident_or_l_brace); | ||
| 1996 | return error.ParsingFailed; | ||
| 1997 | }; | ||
| 1998 | // check if this is a reference to a previous type | ||
| 1999 | const interned_name = try p.comp.intern(p.tokSlice(ident)); | ||
| 2000 | if (try p.syms.findTag(p, interned_name, p.tok_ids[kind_tok], ident, p.tok_ids[p.tok_i])) |prev| { | ||
| 2001 | return prev.ty; | ||
| 2002 | } else { | ||
| 2003 | // this is a forward declaration, create a new record Type. | ||
| 2004 | const record_ty = try Type.Record.create(p.arena, interned_name); | ||
| 2005 | const ty = try Attribute.applyTypeAttributes(p, .{ | ||
| 2006 | .specifier = if (is_struct) .@"struct" else .@"union", | ||
| 2007 | .data = .{ .record = record_ty }, | ||
| 2008 | }, attr_buf_top, null); | ||
| 2009 | try p.syms.syms.append(p.gpa, .{ | ||
| 2010 | .kind = if (is_struct) .@"struct" else .@"union", | ||
| 2011 | .name = interned_name, | ||
| 2012 | .tok = ident, | ||
| 2013 | .ty = ty, | ||
| 2014 | .val = .{}, | ||
| 2015 | }); | ||
| 2016 | try p.decl_buf.append(try p.addNode(.{ | ||
| 2017 | .tag = if (is_struct) .struct_forward_decl else .union_forward_decl, | ||
| 2018 | .ty = ty, | ||
| 2019 | .data = .{ .decl_ref = ident }, | ||
| 2020 | })); | ||
| 2021 | return ty; | ||
| 2022 | } | ||
| 2023 | }; | ||
| 2024 | |||
| 2025 | var done = false; | ||
| 2026 | errdefer if (!done) p.skipTo(.r_brace); | ||
| 2027 | |||
| 2028 | // Get forward declared type or create a new one | ||
| 2029 | var defined = false; | ||
| 2030 | const record_ty: *Type.Record = if (maybe_ident) |ident| record_ty: { | ||
| 2031 | const ident_str = p.tokSlice(ident); | ||
| 2032 | const interned_name = try p.comp.intern(ident_str); | ||
| 2033 | if (try p.syms.defineTag(p, interned_name, p.tok_ids[kind_tok], ident)) |prev| { | ||
| 2034 | if (!prev.ty.hasIncompleteSize()) { | ||
| 2035 | // if the record isn't incomplete, this is a redefinition | ||
| 2036 | try p.errStr(.redefinition, ident, ident_str); | ||
| 2037 | try p.errTok(.previous_definition, prev.tok); | ||
| 2038 | } else { | ||
| 2039 | defined = true; | ||
| 2040 | break :record_ty prev.ty.get(if (is_struct) .@"struct" else .@"union").?.data.record; | ||
| 2041 | } | ||
| 2042 | } | ||
| 2043 | break :record_ty try Type.Record.create(p.arena, interned_name); | ||
| 2044 | } else try Type.Record.create(p.arena, try p.getAnonymousName(kind_tok)); | ||
| 2045 | |||
| 2046 | // Initially create ty as a regular non-attributed type, since attributes for a record | ||
| 2047 | // can be specified after the closing rbrace, which we haven't encountered yet. | ||
| 2048 | var ty = Type{ | ||
| 2049 | .specifier = if (is_struct) .@"struct" else .@"union", | ||
| 2050 | .data = .{ .record = record_ty }, | ||
| 2051 | }; | ||
| 2052 | |||
| 2053 | // declare a symbol for the type | ||
| 2054 | // We need to replace the symbol's type if it has attributes | ||
| 2055 | var symbol_index: ?usize = null; | ||
| 2056 | if (maybe_ident != null and !defined) { | ||
| 2057 | symbol_index = p.syms.syms.len; | ||
| 2058 | try p.syms.syms.append(p.gpa, .{ | ||
| 2059 | .kind = if (is_struct) .@"struct" else .@"union", | ||
| 2060 | .name = record_ty.name, | ||
| 2061 | .tok = maybe_ident.?, | ||
| 2062 | .ty = ty, | ||
| 2063 | .val = .{}, | ||
| 2064 | }); | ||
| 2065 | } | ||
| 2066 | |||
| 2067 | // reserve space for this record | ||
| 2068 | try p.decl_buf.append(.none); | ||
| 2069 | const decl_buf_top = p.decl_buf.items.len; | ||
| 2070 | const record_buf_top = p.record_buf.items.len; | ||
| 2071 | errdefer p.decl_buf.items.len = decl_buf_top - 1; | ||
| 2072 | defer { | ||
| 2073 | p.decl_buf.items.len = decl_buf_top; | ||
| 2074 | p.record_buf.items.len = record_buf_top; | ||
| 2075 | } | ||
| 2076 | |||
| 2077 | const old_record = p.record; | ||
| 2078 | const old_members = p.record_members.items.len; | ||
| 2079 | const old_field_attr_start = p.field_attr_buf.items.len; | ||
| 2080 | p.record = .{ | ||
| 2081 | .kind = p.tok_ids[kind_tok], | ||
| 2082 | .start = p.record_members.items.len, | ||
| 2083 | .field_attr_start = p.field_attr_buf.items.len, | ||
| 2084 | }; | ||
| 2085 | defer p.record = old_record; | ||
| 2086 | defer p.record_members.items.len = old_members; | ||
| 2087 | defer p.field_attr_buf.items.len = old_field_attr_start; | ||
| 2088 | |||
| 2089 | try p.recordDecls(); | ||
| 2090 | |||
| 2091 | if (p.record.flexible_field) |some| { | ||
| 2092 | if (p.record_buf.items[record_buf_top..].len == 1 and is_struct) { | ||
| 2093 | try p.errTok(.flexible_in_empty, some); | ||
| 2094 | } | ||
| 2095 | } | ||
| 2096 | |||
| 2097 | for (p.record_buf.items[record_buf_top..]) |field| { | ||
| 2098 | if (field.ty.hasIncompleteSize() and !field.ty.is(.incomplete_array)) break; | ||
| 2099 | } else { | ||
| 2100 | record_ty.fields = try p.arena.dupe(Type.Record.Field, p.record_buf.items[record_buf_top..]); | ||
| 2101 | } | ||
| 2102 | if (old_field_attr_start < p.field_attr_buf.items.len) { | ||
| 2103 | const field_attr_slice = p.field_attr_buf.items[old_field_attr_start..]; | ||
| 2104 | const duped = try p.arena.dupe([]const Attribute, field_attr_slice); | ||
| 2105 | record_ty.field_attributes = duped.ptr; | ||
| 2106 | } | ||
| 2107 | |||
| 2108 | if (p.record_buf.items.len == record_buf_top) { | ||
| 2109 | try p.errStr(.empty_record, kind_tok, p.tokSlice(kind_tok)); | ||
| 2110 | try p.errStr(.empty_record_size, kind_tok, p.tokSlice(kind_tok)); | ||
| 2111 | } | ||
| 2112 | try p.expectClosing(l_brace, .r_brace); | ||
| 2113 | done = true; | ||
| 2114 | try p.attributeSpecifier(); | ||
| 2115 | |||
| 2116 | ty = try Attribute.applyTypeAttributes(p, .{ | ||
| 2117 | .specifier = if (is_struct) .@"struct" else .@"union", | ||
| 2118 | .data = .{ .record = record_ty }, | ||
| 2119 | }, attr_buf_top, null); | ||
| 2120 | if (ty.specifier == .attributed and symbol_index != null) { | ||
| 2121 | p.syms.syms.items(.ty)[symbol_index.?] = ty; | ||
| 2122 | } | ||
| 2123 | |||
| 2124 | if (!ty.hasIncompleteSize()) { | ||
| 2125 | const pragma_pack_value = switch (p.comp.langopts.emulate) { | ||
| 2126 | .clang => starting_pragma_pack, | ||
| 2127 | .gcc => p.pragma_pack, | ||
| 2128 | // TODO: msvc considers `#pragma pack` on a per-field basis | ||
| 2129 | .msvc => p.pragma_pack, | ||
| 2130 | }; | ||
| 2131 | record_layout.compute(record_ty, ty, p.comp, pragma_pack_value); | ||
| 2132 | } | ||
| 2133 | |||
| 2134 | // finish by creating a node | ||
| 2135 | var node: Tree.Node = .{ | ||
| 2136 | .tag = if (is_struct) .struct_decl_two else .union_decl_two, | ||
| 2137 | .ty = ty, | ||
| 2138 | .data = .{ .bin = .{ .lhs = .none, .rhs = .none } }, | ||
| 2139 | }; | ||
| 2140 | const record_decls = p.decl_buf.items[decl_buf_top..]; | ||
| 2141 | switch (record_decls.len) { | ||
| 2142 | 0 => {}, | ||
| 2143 | 1 => node.data = .{ .bin = .{ .lhs = record_decls[0], .rhs = .none } }, | ||
| 2144 | 2 => node.data = .{ .bin = .{ .lhs = record_decls[0], .rhs = record_decls[1] } }, | ||
| 2145 | else => { | ||
| 2146 | node.tag = if (is_struct) .struct_decl else .union_decl; | ||
| 2147 | node.data = .{ .range = try p.addList(record_decls) }; | ||
| 2148 | }, | ||
| 2149 | } | ||
| 2150 | p.decl_buf.items[decl_buf_top - 1] = try p.addNode(node); | ||
| 2151 | if (p.func.ty == null) { | ||
| 2152 | _ = p.tentative_defs.remove(record_ty.name); | ||
| 2153 | } | ||
| 2154 | return ty; | ||
| 2155 | } | ||
| 2156 | |||
| 2157 | /// recordDecl | ||
| 2158 | /// : specQual (recordDeclarator (',' recordDeclarator)*)? ; | ||
| 2159 | /// | staticAssert | ||
| 2160 | fn recordDecls(p: *Parser) Error!void { | ||
| 2161 | while (true) { | ||
| 2162 | if (try p.pragma()) continue; | ||
| 2163 | if (try p.parseOrNextDecl(staticAssert)) continue; | ||
| 2164 | if (p.eatToken(.keyword_extension)) |_| { | ||
| 2165 | const saved_extension = p.extension_suppressed; | ||
| 2166 | defer p.extension_suppressed = saved_extension; | ||
| 2167 | p.extension_suppressed = true; | ||
| 2168 | |||
| 2169 | if (try p.parseOrNextDecl(recordDeclarator)) continue; | ||
| 2170 | try p.err(.expected_type); | ||
| 2171 | p.nextExternDecl(); | ||
| 2172 | continue; | ||
| 2173 | } | ||
| 2174 | if (try p.parseOrNextDecl(recordDeclarator)) continue; | ||
| 2175 | break; | ||
| 2176 | } | ||
| 2177 | } | ||
| 2178 | |||
| 2179 | /// recordDeclarator : keyword_extension? declarator (':' integerConstExpr)? | ||
| 2180 | fn recordDeclarator(p: *Parser) Error!bool { | ||
| 2181 | const attr_buf_top = p.attr_buf.len; | ||
| 2182 | defer p.attr_buf.len = attr_buf_top; | ||
| 2183 | const base_ty = (try p.specQual()) orelse return false; | ||
| 2184 | |||
| 2185 | try p.attributeSpecifier(); // .record | ||
| 2186 | while (true) { | ||
| 2187 | const this_decl_top = p.attr_buf.len; | ||
| 2188 | defer p.attr_buf.len = this_decl_top; | ||
| 2189 | |||
| 2190 | try p.attributeSpecifier(); | ||
| 2191 | |||
| 2192 | // 0 means unnamed | ||
| 2193 | var name_tok: TokenIndex = 0; | ||
| 2194 | var ty = base_ty; | ||
| 2195 | if (ty.is(.auto_type)) { | ||
| 2196 | try p.errStr(.auto_type_not_allowed, p.tok_i, if (p.record.kind == .keyword_struct) "struct member" else "union member"); | ||
| 2197 | ty = Type.invalid; | ||
| 2198 | } | ||
| 2199 | var bits_node: NodeIndex = .none; | ||
| 2200 | var bits: ?u32 = null; | ||
| 2201 | const first_tok = p.tok_i; | ||
| 2202 | if (try p.declarator(ty, .record)) |d| { | ||
| 2203 | name_tok = d.name; | ||
| 2204 | ty = d.ty; | ||
| 2205 | } | ||
| 2206 | |||
| 2207 | if (p.eatToken(.colon)) |_| bits: { | ||
| 2208 | const bits_tok = p.tok_i; | ||
| 2209 | const res = try p.integerConstExpr(.gnu_folding_extension); | ||
| 2210 | if (!ty.isInt()) { | ||
| 2211 | try p.errStr(.non_int_bitfield, first_tok, try p.typeStr(ty)); | ||
| 2212 | break :bits; | ||
| 2213 | } | ||
| 2214 | |||
| 2215 | if (res.val.tag == .unavailable) { | ||
| 2216 | try p.errTok(.expected_integer_constant_expr, bits_tok); | ||
| 2217 | break :bits; | ||
| 2218 | } else if (res.val.compare(.lt, Value.int(0), res.ty, p.comp)) { | ||
| 2219 | try p.errExtra(.negative_bitwidth, first_tok, .{ | ||
| 2220 | .signed = res.val.signExtend(res.ty, p.comp), | ||
| 2221 | }); | ||
| 2222 | break :bits; | ||
| 2223 | } | ||
| 2224 | |||
| 2225 | // incomplete size error is reported later | ||
| 2226 | const bit_size = ty.bitSizeof(p.comp) orelse break :bits; | ||
| 2227 | if (res.val.compare(.gt, Value.int(bit_size), res.ty, p.comp)) { | ||
| 2228 | try p.errTok(.bitfield_too_big, name_tok); | ||
| 2229 | break :bits; | ||
| 2230 | } else if (res.val.isZero() and name_tok != 0) { | ||
| 2231 | try p.errTok(.zero_width_named_field, name_tok); | ||
| 2232 | break :bits; | ||
| 2233 | } | ||
| 2234 | |||
| 2235 | bits = res.val.getInt(u32); | ||
| 2236 | bits_node = res.node; | ||
| 2237 | } | ||
| 2238 | |||
| 2239 | try p.attributeSpecifier(); // .record | ||
| 2240 | const to_append = try Attribute.applyFieldAttributes(p, &ty, attr_buf_top); | ||
| 2241 | |||
| 2242 | const any_fields_have_attrs = p.field_attr_buf.items.len > p.record.field_attr_start; | ||
| 2243 | |||
| 2244 | if (any_fields_have_attrs) { | ||
| 2245 | try p.field_attr_buf.append(to_append); | ||
| 2246 | } else { | ||
| 2247 | if (to_append.len > 0) { | ||
| 2248 | const preceding = p.record_members.items.len - p.record.start; | ||
| 2249 | if (preceding > 0) { | ||
| 2250 | try p.field_attr_buf.appendNTimes(&.{}, preceding); | ||
| 2251 | } | ||
| 2252 | try p.field_attr_buf.append(to_append); | ||
| 2253 | } | ||
| 2254 | } | ||
| 2255 | |||
| 2256 | if (name_tok == 0 and bits_node == .none) unnamed: { | ||
| 2257 | if (ty.is(.@"enum") or ty.hasIncompleteSize()) break :unnamed; | ||
| 2258 | if (ty.isAnonymousRecord(p.comp)) { | ||
| 2259 | // An anonymous record appears as indirect fields on the parent | ||
| 2260 | try p.record_buf.append(.{ | ||
| 2261 | .name = try p.getAnonymousName(first_tok), | ||
| 2262 | .ty = ty, | ||
| 2263 | }); | ||
| 2264 | const node = try p.addNode(.{ | ||
| 2265 | .tag = .indirect_record_field_decl, | ||
| 2266 | .ty = ty, | ||
| 2267 | .data = undefined, | ||
| 2268 | }); | ||
| 2269 | try p.decl_buf.append(node); | ||
| 2270 | try p.record.addFieldsFromAnonymous(p, ty); | ||
| 2271 | break; // must be followed by a semicolon | ||
| 2272 | } | ||
| 2273 | try p.err(.missing_declaration); | ||
| 2274 | } else { | ||
| 2275 | const interned_name = if (name_tok != 0) try p.comp.intern(p.tokSlice(name_tok)) else try p.getAnonymousName(first_tok); | ||
| 2276 | try p.record_buf.append(.{ | ||
| 2277 | .name = interned_name, | ||
| 2278 | .ty = ty, | ||
| 2279 | .name_tok = name_tok, | ||
| 2280 | .bit_width = bits, | ||
| 2281 | }); | ||
| 2282 | if (name_tok != 0) try p.record.addField(p, interned_name, name_tok); | ||
| 2283 | const node = try p.addNode(.{ | ||
| 2284 | .tag = .record_field_decl, | ||
| 2285 | .ty = ty, | ||
| 2286 | .data = .{ .decl = .{ .name = name_tok, .node = bits_node } }, | ||
| 2287 | }); | ||
| 2288 | try p.decl_buf.append(node); | ||
| 2289 | } | ||
| 2290 | |||
| 2291 | if (ty.isFunc()) { | ||
| 2292 | try p.errTok(.func_field, first_tok); | ||
| 2293 | } else if (ty.is(.variable_len_array)) { | ||
| 2294 | try p.errTok(.vla_field, first_tok); | ||
| 2295 | } else if (ty.is(.incomplete_array)) { | ||
| 2296 | if (p.record.kind == .keyword_union) { | ||
| 2297 | try p.errTok(.flexible_in_union, first_tok); | ||
| 2298 | } | ||
| 2299 | if (p.record.flexible_field) |some| { | ||
| 2300 | if (p.record.kind == .keyword_struct) { | ||
| 2301 | try p.errTok(.flexible_non_final, some); | ||
| 2302 | } | ||
| 2303 | } | ||
| 2304 | p.record.flexible_field = first_tok; | ||
| 2305 | } else if (ty.specifier != .invalid and ty.hasIncompleteSize()) { | ||
| 2306 | try p.errStr(.field_incomplete_ty, first_tok, try p.typeStr(ty)); | ||
| 2307 | } else if (p.record.flexible_field) |some| { | ||
| 2308 | if (some != first_tok and p.record.kind == .keyword_struct) try p.errTok(.flexible_non_final, some); | ||
| 2309 | } | ||
| 2310 | if (p.eatToken(.comma) == null) break; | ||
| 2311 | } | ||
| 2312 | |||
| 2313 | if (p.eatToken(.semicolon) == null) { | ||
| 2314 | const tok_id = p.tok_ids[p.tok_i]; | ||
| 2315 | if (tok_id == .r_brace) { | ||
| 2316 | try p.err(.missing_semicolon); | ||
| 2317 | } else { | ||
| 2318 | return p.errExpectedToken(.semicolon, tok_id); | ||
| 2319 | } | ||
| 2320 | } | ||
| 2321 | |||
| 2322 | return true; | ||
| 2323 | } | ||
| 2324 | |||
| 2325 | /// specQual : (typeSpec | typeQual | alignSpec)+ | ||
| 2326 | fn specQual(p: *Parser) Error!?Type { | ||
| 2327 | var spec: Type.Builder = .{}; | ||
| 2328 | if (try p.typeSpec(&spec)) { | ||
| 2329 | return try spec.finish(p); | ||
| 2330 | } | ||
| 2331 | return null; | ||
| 2332 | } | ||
| 2333 | |||
| 2334 | /// enumSpec | ||
| 2335 | /// : keyword_enum IDENTIFIER? (: typeName)? { enumerator (',' enumerator)? ',') } | ||
| 2336 | /// | keyword_enum IDENTIFIER (: typeName)? | ||
| 2337 | fn enumSpec(p: *Parser) Error!Type { | ||
| 2338 | const enum_tok = p.tok_i; | ||
| 2339 | p.tok_i += 1; | ||
| 2340 | const attr_buf_top = p.attr_buf.len; | ||
| 2341 | defer p.attr_buf.len = attr_buf_top; | ||
| 2342 | try p.attributeSpecifier(); | ||
| 2343 | |||
| 2344 | const maybe_ident = try p.eatIdentifier(); | ||
| 2345 | const fixed_ty = if (p.eatToken(.colon)) |colon| fixed: { | ||
| 2346 | const fixed = (try p.typeName()) orelse { | ||
| 2347 | if (p.record.kind != .invalid) { | ||
| 2348 | // This is a bit field. | ||
| 2349 | p.tok_i -= 1; | ||
| 2350 | break :fixed null; | ||
| 2351 | } | ||
| 2352 | try p.err(.expected_type); | ||
| 2353 | try p.errTok(.enum_fixed, colon); | ||
| 2354 | break :fixed null; | ||
| 2355 | }; | ||
| 2356 | try p.errTok(.enum_fixed, colon); | ||
| 2357 | break :fixed fixed; | ||
| 2358 | } else null; | ||
| 2359 | |||
| 2360 | const l_brace = p.eatToken(.l_brace) orelse { | ||
| 2361 | const ident = maybe_ident orelse { | ||
| 2362 | try p.err(.ident_or_l_brace); | ||
| 2363 | return error.ParsingFailed; | ||
| 2364 | }; | ||
| 2365 | // check if this is a reference to a previous type | ||
| 2366 | const interned_name = try p.comp.intern(p.tokSlice(ident)); | ||
| 2367 | if (try p.syms.findTag(p, interned_name, .keyword_enum, ident, p.tok_ids[p.tok_i])) |prev| { | ||
| 2368 | // only check fixed underlying type in forward declarations and not in references. | ||
| 2369 | if (p.tok_ids[p.tok_i] == .semicolon) | ||
| 2370 | try p.checkEnumFixedTy(fixed_ty, ident, prev); | ||
| 2371 | return prev.ty; | ||
| 2372 | } else { | ||
| 2373 | // this is a forward declaration, create a new enum Type. | ||
| 2374 | const enum_ty = try Type.Enum.create(p.arena, interned_name, fixed_ty); | ||
| 2375 | const ty = try Attribute.applyTypeAttributes(p, .{ | ||
| 2376 | .specifier = .@"enum", | ||
| 2377 | .data = .{ .@"enum" = enum_ty }, | ||
| 2378 | }, attr_buf_top, null); | ||
| 2379 | try p.syms.syms.append(p.gpa, .{ | ||
| 2380 | .kind = .@"enum", | ||
| 2381 | .name = interned_name, | ||
| 2382 | .tok = ident, | ||
| 2383 | .ty = ty, | ||
| 2384 | .val = .{}, | ||
| 2385 | }); | ||
| 2386 | try p.decl_buf.append(try p.addNode(.{ | ||
| 2387 | .tag = .enum_forward_decl, | ||
| 2388 | .ty = ty, | ||
| 2389 | .data = .{ .decl_ref = ident }, | ||
| 2390 | })); | ||
| 2391 | return ty; | ||
| 2392 | } | ||
| 2393 | }; | ||
| 2394 | |||
| 2395 | var done = false; | ||
| 2396 | errdefer if (!done) p.skipTo(.r_brace); | ||
| 2397 | |||
| 2398 | // Get forward declared type or create a new one | ||
| 2399 | var defined = false; | ||
| 2400 | const enum_ty: *Type.Enum = if (maybe_ident) |ident| enum_ty: { | ||
| 2401 | const ident_str = p.tokSlice(ident); | ||
| 2402 | const interned_name = try p.comp.intern(ident_str); | ||
| 2403 | if (try p.syms.defineTag(p, interned_name, .keyword_enum, ident)) |prev| { | ||
| 2404 | const enum_ty = prev.ty.get(.@"enum").?.data.@"enum"; | ||
| 2405 | if (!enum_ty.isIncomplete() and !enum_ty.fixed) { | ||
| 2406 | // if the enum isn't incomplete, this is a redefinition | ||
| 2407 | try p.errStr(.redefinition, ident, ident_str); | ||
| 2408 | try p.errTok(.previous_definition, prev.tok); | ||
| 2409 | } else { | ||
| 2410 | try p.checkEnumFixedTy(fixed_ty, ident, prev); | ||
| 2411 | defined = true; | ||
| 2412 | break :enum_ty enum_ty; | ||
| 2413 | } | ||
| 2414 | } | ||
| 2415 | break :enum_ty try Type.Enum.create(p.arena, interned_name, fixed_ty); | ||
| 2416 | } else try Type.Enum.create(p.arena, try p.getAnonymousName(enum_tok), fixed_ty); | ||
| 2417 | |||
| 2418 | // reserve space for this enum | ||
| 2419 | try p.decl_buf.append(.none); | ||
| 2420 | const decl_buf_top = p.decl_buf.items.len; | ||
| 2421 | const list_buf_top = p.list_buf.items.len; | ||
| 2422 | const enum_buf_top = p.enum_buf.items.len; | ||
| 2423 | errdefer p.decl_buf.items.len = decl_buf_top - 1; | ||
| 2424 | defer { | ||
| 2425 | p.decl_buf.items.len = decl_buf_top; | ||
| 2426 | p.list_buf.items.len = list_buf_top; | ||
| 2427 | p.enum_buf.items.len = enum_buf_top; | ||
| 2428 | } | ||
| 2429 | |||
| 2430 | const sym_stack_top = p.syms.syms.len; | ||
| 2431 | var e = Enumerator.init(fixed_ty); | ||
| 2432 | while (try p.enumerator(&e)) |field_and_node| { | ||
| 2433 | try p.enum_buf.append(field_and_node.field); | ||
| 2434 | try p.list_buf.append(field_and_node.node); | ||
| 2435 | if (p.eatToken(.comma) == null) break; | ||
| 2436 | } | ||
| 2437 | |||
| 2438 | if (p.enum_buf.items.len == enum_buf_top) try p.err(.empty_enum); | ||
| 2439 | try p.expectClosing(l_brace, .r_brace); | ||
| 2440 | done = true; | ||
| 2441 | try p.attributeSpecifier(); | ||
| 2442 | |||
| 2443 | const ty = try Attribute.applyTypeAttributes(p, .{ | ||
| 2444 | .specifier = .@"enum", | ||
| 2445 | .data = .{ .@"enum" = enum_ty }, | ||
| 2446 | }, attr_buf_top, null); | ||
| 2447 | if (!enum_ty.fixed) { | ||
| 2448 | const tag_specifier = try e.getTypeSpecifier(p, ty.enumIsPacked(p.comp), maybe_ident orelse enum_tok); | ||
| 2449 | enum_ty.tag_ty = .{ .specifier = tag_specifier }; | ||
| 2450 | } | ||
| 2451 | |||
| 2452 | const enum_fields = p.enum_buf.items[enum_buf_top..]; | ||
| 2453 | const field_nodes = p.list_buf.items[list_buf_top..]; | ||
| 2454 | |||
| 2455 | if (fixed_ty == null) { | ||
| 2456 | const vals = p.syms.syms.items(.val)[sym_stack_top..]; | ||
| 2457 | const types = p.syms.syms.items(.ty)[sym_stack_top..]; | ||
| 2458 | |||
| 2459 | for (enum_fields, 0..) |*field, i| { | ||
| 2460 | if (field.ty.eql(Type.int, p.comp, false)) continue; | ||
| 2461 | |||
| 2462 | var res = Result{ .node = field.node, .ty = field.ty, .val = vals[i] }; | ||
| 2463 | const dest_ty = if (p.comp.fixedEnumTagSpecifier()) |some| | ||
| 2464 | Type{ .specifier = some } | ||
| 2465 | else if (res.intFitsInType(p, Type.int)) | ||
| 2466 | Type.int | ||
| 2467 | else if (!res.ty.eql(enum_ty.tag_ty, p.comp, false)) | ||
| 2468 | enum_ty.tag_ty | ||
| 2469 | else | ||
| 2470 | continue; | ||
| 2471 | |||
| 2472 | vals[i].intCast(field.ty, dest_ty, p.comp); | ||
| 2473 | types[i] = dest_ty; | ||
| 2474 | p.nodes.items(.ty)[@intFromEnum(field_nodes[i])] = dest_ty; | ||
| 2475 | field.ty = dest_ty; | ||
| 2476 | res.ty = dest_ty; | ||
| 2477 | |||
| 2478 | if (res.node != .none) { | ||
| 2479 | try res.implicitCast(p, .int_cast); | ||
| 2480 | field.node = res.node; | ||
| 2481 | p.nodes.items(.data)[@intFromEnum(field_nodes[i])].decl.node = res.node; | ||
| 2482 | } | ||
| 2483 | } | ||
| 2484 | } | ||
| 2485 | |||
| 2486 | enum_ty.fields = try p.arena.dupe(Type.Enum.Field, enum_fields); | ||
| 2487 | |||
| 2488 | // declare a symbol for the type | ||
| 2489 | if (maybe_ident != null and !defined) { | ||
| 2490 | try p.syms.syms.append(p.gpa, .{ | ||
| 2491 | .kind = .@"enum", | ||
| 2492 | .name = enum_ty.name, | ||
| 2493 | .ty = ty, | ||
| 2494 | .tok = maybe_ident.?, | ||
| 2495 | .val = .{}, | ||
| 2496 | }); | ||
| 2497 | } | ||
| 2498 | |||
| 2499 | // finish by creating a node | ||
| 2500 | var node: Tree.Node = .{ .tag = .enum_decl_two, .ty = ty, .data = .{ | ||
| 2501 | .bin = .{ .lhs = .none, .rhs = .none }, | ||
| 2502 | } }; | ||
| 2503 | switch (field_nodes.len) { | ||
| 2504 | 0 => {}, | ||
| 2505 | 1 => node.data = .{ .bin = .{ .lhs = field_nodes[0], .rhs = .none } }, | ||
| 2506 | 2 => node.data = .{ .bin = .{ .lhs = field_nodes[0], .rhs = field_nodes[1] } }, | ||
| 2507 | else => { | ||
| 2508 | node.tag = .enum_decl; | ||
| 2509 | node.data = .{ .range = try p.addList(field_nodes) }; | ||
| 2510 | }, | ||
| 2511 | } | ||
| 2512 | p.decl_buf.items[decl_buf_top - 1] = try p.addNode(node); | ||
| 2513 | if (p.func.ty == null) { | ||
| 2514 | _ = p.tentative_defs.remove(enum_ty.name); | ||
| 2515 | } | ||
| 2516 | return ty; | ||
| 2517 | } | ||
| 2518 | |||
| 2519 | fn checkEnumFixedTy(p: *Parser, fixed_ty: ?Type, ident_tok: TokenIndex, prev: Symbol) !void { | ||
| 2520 | const enum_ty = prev.ty.get(.@"enum").?.data.@"enum"; | ||
| 2521 | if (fixed_ty) |some| { | ||
| 2522 | if (!enum_ty.fixed) { | ||
| 2523 | try p.errTok(.enum_prev_nonfixed, ident_tok); | ||
| 2524 | try p.errTok(.previous_definition, prev.tok); | ||
| 2525 | return error.ParsingFailed; | ||
| 2526 | } | ||
| 2527 | |||
| 2528 | if (!enum_ty.tag_ty.eql(some, p.comp, false)) { | ||
| 2529 | const str = try p.typePairStrExtra(some, " (was ", enum_ty.tag_ty); | ||
| 2530 | try p.errStr(.enum_different_explicit_ty, ident_tok, str); | ||
| 2531 | try p.errTok(.previous_definition, prev.tok); | ||
| 2532 | return error.ParsingFailed; | ||
| 2533 | } | ||
| 2534 | } else if (enum_ty.fixed) { | ||
| 2535 | try p.errTok(.enum_prev_fixed, ident_tok); | ||
| 2536 | try p.errTok(.previous_definition, prev.tok); | ||
| 2537 | return error.ParsingFailed; | ||
| 2538 | } | ||
| 2539 | } | ||
| 2540 | |||
| 2541 | const Enumerator = struct { | ||
| 2542 | res: Result, | ||
| 2543 | num_positive_bits: usize = 0, | ||
| 2544 | num_negative_bits: usize = 0, | ||
| 2545 | fixed: bool, | ||
| 2546 | |||
| 2547 | fn init(fixed_ty: ?Type) Enumerator { | ||
| 2548 | return .{ | ||
| 2549 | .res = .{ | ||
| 2550 | .ty = fixed_ty orelse .{ .specifier = .int }, | ||
| 2551 | .val = .{ .tag = .unavailable }, | ||
| 2552 | }, | ||
| 2553 | .fixed = fixed_ty != null, | ||
| 2554 | }; | ||
| 2555 | } | ||
| 2556 | |||
| 2557 | /// Increment enumerator value adjusting type if needed. | ||
| 2558 | fn incr(e: *Enumerator, p: *Parser, tok: TokenIndex) !void { | ||
| 2559 | e.res.node = .none; | ||
| 2560 | const old_val = e.res.val; | ||
| 2561 | if (old_val.tag == .unavailable) { | ||
| 2562 | // First enumerator, set to 0 fits in all types. | ||
| 2563 | e.res.val = Value.int(0); | ||
| 2564 | return; | ||
| 2565 | } | ||
| 2566 | if (e.res.val.add(e.res.val, Value.int(1), e.res.ty, p.comp)) { | ||
| 2567 | const byte_size = e.res.ty.sizeof(p.comp).?; | ||
| 2568 | const bit_size: u8 = @intCast(if (e.res.ty.isUnsignedInt(p.comp)) byte_size * 8 else byte_size * 8 - 1); | ||
| 2569 | if (e.fixed) { | ||
| 2570 | try p.errStr(.enum_not_representable_fixed, tok, try p.typeStr(e.res.ty)); | ||
| 2571 | return; | ||
| 2572 | } | ||
| 2573 | const new_ty = if (p.comp.nextLargestIntSameSign(e.res.ty)) |larger| blk: { | ||
| 2574 | try p.errTok(.enumerator_overflow, tok); | ||
| 2575 | break :blk larger; | ||
| 2576 | } else blk: { | ||
| 2577 | try p.errExtra(.enum_not_representable, tok, .{ .pow_2_as_string = bit_size }); | ||
| 2578 | break :blk Type{ .specifier = .ulong_long }; | ||
| 2579 | }; | ||
| 2580 | e.res.ty = new_ty; | ||
| 2581 | _ = e.res.val.add(old_val, Value.int(1), e.res.ty, p.comp); | ||
| 2582 | } | ||
| 2583 | } | ||
| 2584 | |||
| 2585 | /// Set enumerator value to specified value. | ||
| 2586 | fn set(e: *Enumerator, p: *Parser, res: Result, tok: TokenIndex) !void { | ||
| 2587 | if (res.ty.specifier == .invalid) return; | ||
| 2588 | if (e.fixed and !res.ty.eql(e.res.ty, p.comp, false)) { | ||
| 2589 | if (!res.intFitsInType(p, e.res.ty)) { | ||
| 2590 | try p.errStr(.enum_not_representable_fixed, tok, try p.typeStr(e.res.ty)); | ||
| 2591 | return error.ParsingFailed; | ||
| 2592 | } | ||
| 2593 | var copy = res; | ||
| 2594 | copy.ty = e.res.ty; | ||
| 2595 | try copy.implicitCast(p, .int_cast); | ||
| 2596 | e.res = copy; | ||
| 2597 | } else { | ||
| 2598 | e.res = res; | ||
| 2599 | try e.res.intCast(p, e.res.ty.integerPromotion(p.comp), tok); | ||
| 2600 | } | ||
| 2601 | } | ||
| 2602 | |||
| 2603 | fn getTypeSpecifier(e: *const Enumerator, p: *Parser, is_packed: bool, tok: TokenIndex) !Type.Specifier { | ||
| 2604 | if (p.comp.fixedEnumTagSpecifier()) |tag_specifier| return tag_specifier; | ||
| 2605 | |||
| 2606 | const char_width = (Type{ .specifier = .schar }).sizeof(p.comp).? * 8; | ||
| 2607 | const short_width = (Type{ .specifier = .short }).sizeof(p.comp).? * 8; | ||
| 2608 | const int_width = (Type{ .specifier = .int }).sizeof(p.comp).? * 8; | ||
| 2609 | if (e.num_negative_bits > 0) { | ||
| 2610 | if (is_packed and e.num_negative_bits <= char_width and e.num_positive_bits < char_width) { | ||
| 2611 | return .schar; | ||
| 2612 | } else if (is_packed and e.num_negative_bits <= short_width and e.num_positive_bits < short_width) { | ||
| 2613 | return .short; | ||
| 2614 | } else if (e.num_negative_bits <= int_width and e.num_positive_bits < int_width) { | ||
| 2615 | return .int; | ||
| 2616 | } | ||
| 2617 | const long_width = (Type{ .specifier = .long }).sizeof(p.comp).? * 8; | ||
| 2618 | if (e.num_negative_bits <= long_width and e.num_positive_bits < long_width) { | ||
| 2619 | return .long; | ||
| 2620 | } | ||
| 2621 | const long_long_width = (Type{ .specifier = .long_long }).sizeof(p.comp).? * 8; | ||
| 2622 | if (e.num_negative_bits > long_long_width or e.num_positive_bits >= long_long_width) { | ||
| 2623 | try p.errTok(.enum_too_large, tok); | ||
| 2624 | } | ||
| 2625 | return .long_long; | ||
| 2626 | } | ||
| 2627 | if (is_packed and e.num_positive_bits <= char_width) { | ||
| 2628 | return .uchar; | ||
| 2629 | } else if (is_packed and e.num_positive_bits <= short_width) { | ||
| 2630 | return .ushort; | ||
| 2631 | } else if (e.num_positive_bits <= int_width) { | ||
| 2632 | return .uint; | ||
| 2633 | } else if (e.num_positive_bits <= (Type{ .specifier = .long }).sizeof(p.comp).? * 8) { | ||
| 2634 | return .ulong; | ||
| 2635 | } | ||
| 2636 | return .ulong_long; | ||
| 2637 | } | ||
| 2638 | }; | ||
| 2639 | |||
| 2640 | const EnumFieldAndNode = struct { field: Type.Enum.Field, node: NodeIndex }; | ||
| 2641 | |||
| 2642 | /// enumerator : IDENTIFIER ('=' integerConstExpr) | ||
| 2643 | fn enumerator(p: *Parser, e: *Enumerator) Error!?EnumFieldAndNode { | ||
| 2644 | _ = try p.pragma(); | ||
| 2645 | const name_tok = (try p.eatIdentifier()) orelse { | ||
| 2646 | if (p.tok_ids[p.tok_i] == .r_brace) return null; | ||
| 2647 | try p.err(.expected_identifier); | ||
| 2648 | p.skipTo(.r_brace); | ||
| 2649 | return error.ParsingFailed; | ||
| 2650 | }; | ||
| 2651 | const attr_buf_top = p.attr_buf.len; | ||
| 2652 | defer p.attr_buf.len = attr_buf_top; | ||
| 2653 | try p.attributeSpecifier(); | ||
| 2654 | |||
| 2655 | const err_start = p.comp.diag.list.items.len; | ||
| 2656 | if (p.eatToken(.equal)) |_| { | ||
| 2657 | const specified = try p.integerConstExpr(.gnu_folding_extension); | ||
| 2658 | if (specified.val.tag == .unavailable) { | ||
| 2659 | try p.errTok(.enum_val_unavailable, name_tok + 2); | ||
| 2660 | try e.incr(p, name_tok); | ||
| 2661 | } else { | ||
| 2662 | try e.set(p, specified, name_tok); | ||
| 2663 | } | ||
| 2664 | } else { | ||
| 2665 | try e.incr(p, name_tok); | ||
| 2666 | } | ||
| 2667 | |||
| 2668 | var res = e.res; | ||
| 2669 | res.ty = try Attribute.applyEnumeratorAttributes(p, res.ty, attr_buf_top); | ||
| 2670 | |||
| 2671 | if (res.ty.isUnsignedInt(p.comp) or res.val.compare(.gte, Value.int(0), res.ty, p.comp)) { | ||
| 2672 | e.num_positive_bits = @max(e.num_positive_bits, res.val.minUnsignedBits(res.ty, p.comp)); | ||
| 2673 | } else { | ||
| 2674 | e.num_negative_bits = @max(e.num_negative_bits, res.val.minSignedBits(res.ty, p.comp)); | ||
| 2675 | } | ||
| 2676 | |||
| 2677 | if (err_start == p.comp.diag.list.items.len) { | ||
| 2678 | // only do these warnings if we didn't already warn about overflow or non-representable values | ||
| 2679 | if (e.res.val.compare(.lt, Value.int(0), e.res.ty, p.comp)) { | ||
| 2680 | const val = e.res.val.getInt(i64); | ||
| 2681 | if (val < (Type{ .specifier = .int }).minInt(p.comp)) { | ||
| 2682 | try p.errExtra(.enumerator_too_small, name_tok, .{ | ||
| 2683 | .signed = val, | ||
| 2684 | }); | ||
| 2685 | } | ||
| 2686 | } else { | ||
| 2687 | const val = e.res.val.getInt(u64); | ||
| 2688 | if (val > (Type{ .specifier = .int }).maxInt(p.comp)) { | ||
| 2689 | try p.errExtra(.enumerator_too_large, name_tok, .{ | ||
| 2690 | .unsigned = val, | ||
| 2691 | }); | ||
| 2692 | } | ||
| 2693 | } | ||
| 2694 | } | ||
| 2695 | |||
| 2696 | const interned_name = try p.comp.intern(p.tokSlice(name_tok)); | ||
| 2697 | try p.syms.defineEnumeration(p, interned_name, res.ty, name_tok, e.res.val); | ||
| 2698 | const node = try p.addNode(.{ | ||
| 2699 | .tag = .enum_field_decl, | ||
| 2700 | .ty = res.ty, | ||
| 2701 | .data = .{ .decl = .{ | ||
| 2702 | .name = name_tok, | ||
| 2703 | .node = res.node, | ||
| 2704 | } }, | ||
| 2705 | }); | ||
| 2706 | try p.value_map.put(node, e.res.val); | ||
| 2707 | return EnumFieldAndNode{ .field = .{ | ||
| 2708 | .name = interned_name, | ||
| 2709 | .ty = res.ty, | ||
| 2710 | .name_tok = name_tok, | ||
| 2711 | .node = res.node, | ||
| 2712 | }, .node = node }; | ||
| 2713 | } | ||
| 2714 | |||
| 2715 | /// typeQual : keyword_const | keyword_restrict | keyword_volatile | keyword_atomic | ||
| 2716 | fn typeQual(p: *Parser, b: *Type.Qualifiers.Builder) Error!bool { | ||
| 2717 | var any = false; | ||
| 2718 | while (true) { | ||
| 2719 | switch (p.tok_ids[p.tok_i]) { | ||
| 2720 | .keyword_restrict, .keyword_restrict1, .keyword_restrict2 => { | ||
| 2721 | if (b.restrict != null) | ||
| 2722 | try p.errStr(.duplicate_decl_spec, p.tok_i, "restrict") | ||
| 2723 | else | ||
| 2724 | b.restrict = p.tok_i; | ||
| 2725 | }, | ||
| 2726 | .keyword_const, .keyword_const1, .keyword_const2 => { | ||
| 2727 | if (b.@"const" != null) | ||
| 2728 | try p.errStr(.duplicate_decl_spec, p.tok_i, "const") | ||
| 2729 | else | ||
| 2730 | b.@"const" = p.tok_i; | ||
| 2731 | }, | ||
| 2732 | .keyword_volatile, .keyword_volatile1, .keyword_volatile2 => { | ||
| 2733 | if (b.@"volatile" != null) | ||
| 2734 | try p.errStr(.duplicate_decl_spec, p.tok_i, "volatile") | ||
| 2735 | else | ||
| 2736 | b.@"volatile" = p.tok_i; | ||
| 2737 | }, | ||
| 2738 | .keyword_atomic => { | ||
| 2739 | // _Atomic(typeName) instead of just _Atomic | ||
| 2740 | if (p.tok_ids[p.tok_i + 1] == .l_paren) break; | ||
| 2741 | if (b.atomic != null) | ||
| 2742 | try p.errStr(.duplicate_decl_spec, p.tok_i, "atomic") | ||
| 2743 | else | ||
| 2744 | b.atomic = p.tok_i; | ||
| 2745 | }, | ||
| 2746 | else => break, | ||
| 2747 | } | ||
| 2748 | p.tok_i += 1; | ||
| 2749 | any = true; | ||
| 2750 | } | ||
| 2751 | return any; | ||
| 2752 | } | ||
| 2753 | |||
| 2754 | const Declarator = struct { | ||
| 2755 | name: TokenIndex, | ||
| 2756 | ty: Type, | ||
| 2757 | func_declarator: ?TokenIndex = null, | ||
| 2758 | old_style_func: ?TokenIndex = null, | ||
| 2759 | }; | ||
| 2760 | const DeclaratorKind = enum { normal, abstract, param, record }; | ||
| 2761 | |||
| 2762 | /// declarator : pointer? (IDENTIFIER | '(' declarator ')') directDeclarator* | ||
| 2763 | /// abstractDeclarator | ||
| 2764 | /// : pointer? ('(' abstractDeclarator ')')? directAbstractDeclarator* | ||
| 2765 | fn declarator( | ||
| 2766 | p: *Parser, | ||
| 2767 | base_type: Type, | ||
| 2768 | kind: DeclaratorKind, | ||
| 2769 | ) Error!?Declarator { | ||
| 2770 | const start = p.tok_i; | ||
| 2771 | var d = Declarator{ .name = 0, .ty = try p.pointer(base_type) }; | ||
| 2772 | if (base_type.is(.auto_type) and !d.ty.is(.auto_type)) { | ||
| 2773 | try p.errTok(.auto_type_requires_plain_declarator, start); | ||
| 2774 | return error.ParsingFailed; | ||
| 2775 | } | ||
| 2776 | |||
| 2777 | const maybe_ident = p.tok_i; | ||
| 2778 | if (kind != .abstract and (try p.eatIdentifier()) != null) { | ||
| 2779 | d.name = maybe_ident; | ||
| 2780 | const combine_tok = p.tok_i; | ||
| 2781 | d.ty = try p.directDeclarator(d.ty, &d, kind); | ||
| 2782 | try d.ty.validateCombinedType(p, combine_tok); | ||
| 2783 | return d; | ||
| 2784 | } else if (p.eatToken(.l_paren)) |l_paren| blk: { | ||
| 2785 | var res = (try p.declarator(.{ .specifier = .void }, kind)) orelse { | ||
| 2786 | p.tok_i = l_paren; | ||
| 2787 | break :blk; | ||
| 2788 | }; | ||
| 2789 | try p.expectClosing(l_paren, .r_paren); | ||
| 2790 | const suffix_start = p.tok_i; | ||
| 2791 | const outer = try p.directDeclarator(d.ty, &d, kind); | ||
| 2792 | try res.ty.combine(outer); | ||
| 2793 | try res.ty.validateCombinedType(p, suffix_start); | ||
| 2794 | res.old_style_func = d.old_style_func; | ||
| 2795 | return res; | ||
| 2796 | } | ||
| 2797 | |||
| 2798 | const expected_ident = p.tok_i; | ||
| 2799 | |||
| 2800 | d.ty = try p.directDeclarator(d.ty, &d, kind); | ||
| 2801 | |||
| 2802 | if (kind == .normal and !d.ty.isEnumOrRecord()) { | ||
| 2803 | try p.errTok(.expected_ident_or_l_paren, expected_ident); | ||
| 2804 | return error.ParsingFailed; | ||
| 2805 | } | ||
| 2806 | try d.ty.validateCombinedType(p, expected_ident); | ||
| 2807 | if (start == p.tok_i) return null; | ||
| 2808 | return d; | ||
| 2809 | } | ||
| 2810 | |||
| 2811 | /// directDeclarator | ||
| 2812 | /// : '[' typeQual* assignExpr? ']' directDeclarator? | ||
| 2813 | /// | '[' keyword_static typeQual* assignExpr ']' directDeclarator? | ||
| 2814 | /// | '[' typeQual+ keyword_static assignExpr ']' directDeclarator? | ||
| 2815 | /// | '[' typeQual* '*' ']' directDeclarator? | ||
| 2816 | /// | '(' paramDecls ')' directDeclarator? | ||
| 2817 | /// | '(' (IDENTIFIER (',' IDENTIFIER))? ')' directDeclarator? | ||
| 2818 | /// directAbstractDeclarator | ||
| 2819 | /// : '[' typeQual* assignExpr? ']' | ||
| 2820 | /// | '[' keyword_static typeQual* assignExpr ']' | ||
| 2821 | /// | '[' typeQual+ keyword_static assignExpr ']' | ||
| 2822 | /// | '[' '*' ']' | ||
| 2823 | /// | '(' paramDecls? ')' | ||
| 2824 | fn directDeclarator(p: *Parser, base_type: Type, d: *Declarator, kind: DeclaratorKind) Error!Type { | ||
| 2825 | if (p.eatToken(.l_bracket)) |l_bracket| { | ||
| 2826 | if (p.tok_ids[p.tok_i] == .l_bracket) { | ||
| 2827 | switch (kind) { | ||
| 2828 | .normal, .record => if (p.comp.langopts.standard.atLeast(.c2x)) { | ||
| 2829 | p.tok_i -= 1; | ||
| 2830 | return base_type; | ||
| 2831 | }, | ||
| 2832 | .param, .abstract => {}, | ||
| 2833 | } | ||
| 2834 | try p.err(.expected_expr); | ||
| 2835 | return error.ParsingFailed; | ||
| 2836 | } | ||
| 2837 | var res_ty = Type{ | ||
| 2838 | // so that we can get any restrict type that might be present | ||
| 2839 | .specifier = .pointer, | ||
| 2840 | }; | ||
| 2841 | var quals = Type.Qualifiers.Builder{}; | ||
| 2842 | |||
| 2843 | var got_quals = try p.typeQual(&quals); | ||
| 2844 | var static = p.eatToken(.keyword_static); | ||
| 2845 | if (static != null and !got_quals) got_quals = try p.typeQual(&quals); | ||
| 2846 | var star = p.eatToken(.asterisk); | ||
| 2847 | const size_tok = p.tok_i; | ||
| 2848 | |||
| 2849 | const const_decl_folding = p.const_decl_folding; | ||
| 2850 | p.const_decl_folding = .gnu_vla_folding_extension; | ||
| 2851 | const size = if (star) |_| Result{} else try p.assignExpr(); | ||
| 2852 | p.const_decl_folding = const_decl_folding; | ||
| 2853 | |||
| 2854 | try p.expectClosing(l_bracket, .r_bracket); | ||
| 2855 | |||
| 2856 | if (star != null and static != null) { | ||
| 2857 | try p.errTok(.invalid_static_star, static.?); | ||
| 2858 | static = null; | ||
| 2859 | } | ||
| 2860 | if (kind != .param) { | ||
| 2861 | if (static != null) | ||
| 2862 | try p.errTok(.static_non_param, l_bracket) | ||
| 2863 | else if (got_quals) | ||
| 2864 | try p.errTok(.array_qualifiers, l_bracket); | ||
| 2865 | if (star) |some| try p.errTok(.star_non_param, some); | ||
| 2866 | static = null; | ||
| 2867 | quals = .{}; | ||
| 2868 | star = null; | ||
| 2869 | } else { | ||
| 2870 | try quals.finish(p, &res_ty); | ||
| 2871 | } | ||
| 2872 | if (static) |_| try size.expect(p); | ||
| 2873 | |||
| 2874 | if (base_type.is(.auto_type)) { | ||
| 2875 | try p.errStr(.array_of_auto_type, d.name, p.tokSlice(d.name)); | ||
| 2876 | return error.ParsingFailed; | ||
| 2877 | } | ||
| 2878 | const outer = try p.directDeclarator(base_type, d, kind); | ||
| 2879 | var max_bits = p.comp.target.ptrBitWidth(); | ||
| 2880 | if (max_bits > 61) max_bits = 61; | ||
| 2881 | const max_bytes = (@as(u64, 1) << @truncate(max_bits)) - 1; | ||
| 2882 | // `outer` is validated later so it may be invalid here | ||
| 2883 | const outer_size = outer.sizeof(p.comp); | ||
| 2884 | const max_elems = max_bytes / @max(1, outer_size orelse 1); | ||
| 2885 | |||
| 2886 | if (!size.ty.isInt()) { | ||
| 2887 | try p.errStr(.array_size_non_int, size_tok, try p.typeStr(size.ty)); | ||
| 2888 | return error.ParsingFailed; | ||
| 2889 | } | ||
| 2890 | if (size.val.tag == .unavailable) { | ||
| 2891 | if (size.node != .none) { | ||
| 2892 | try p.errTok(.vla, size_tok); | ||
| 2893 | if (p.func.ty == null and kind != .param and p.record.kind == .invalid) { | ||
| 2894 | try p.errTok(.variable_len_array_file_scope, d.name); | ||
| 2895 | } | ||
| 2896 | const expr_ty = try p.arena.create(Type.Expr); | ||
| 2897 | expr_ty.ty = .{ .specifier = .void }; | ||
| 2898 | expr_ty.node = size.node; | ||
| 2899 | res_ty.data = .{ .expr = expr_ty }; | ||
| 2900 | res_ty.specifier = .variable_len_array; | ||
| 2901 | |||
| 2902 | if (static) |some| try p.errTok(.useless_static, some); | ||
| 2903 | } else if (star) |_| { | ||
| 2904 | const elem_ty = try p.arena.create(Type); | ||
| 2905 | elem_ty.* = .{ .specifier = .void }; | ||
| 2906 | res_ty.data = .{ .sub_type = elem_ty }; | ||
| 2907 | res_ty.specifier = .unspecified_variable_len_array; | ||
| 2908 | } else { | ||
| 2909 | const arr_ty = try p.arena.create(Type.Array); | ||
| 2910 | arr_ty.elem = .{ .specifier = .void }; | ||
| 2911 | arr_ty.len = 0; | ||
| 2912 | res_ty.data = .{ .array = arr_ty }; | ||
| 2913 | res_ty.specifier = .incomplete_array; | ||
| 2914 | } | ||
| 2915 | } else { | ||
| 2916 | var size_val = size.val; | ||
| 2917 | const size_t = p.comp.types.size; | ||
| 2918 | if (size_val.isZero()) { | ||
| 2919 | try p.errTok(.zero_length_array, l_bracket); | ||
| 2920 | } else if (size_val.compare(.lt, Value.int(0), size_t, p.comp)) { | ||
| 2921 | try p.errTok(.negative_array_size, l_bracket); | ||
| 2922 | return error.ParsingFailed; | ||
| 2923 | } | ||
| 2924 | const arr_ty = try p.arena.create(Type.Array); | ||
| 2925 | arr_ty.elem = .{ .specifier = .void }; | ||
| 2926 | if (size_val.compare(.gt, Value.int(max_elems), size_t, p.comp)) { | ||
| 2927 | try p.errTok(.array_too_large, l_bracket); | ||
| 2928 | arr_ty.len = max_elems; | ||
| 2929 | } else { | ||
| 2930 | arr_ty.len = size_val.getInt(u64); | ||
| 2931 | } | ||
| 2932 | res_ty.data = .{ .array = arr_ty }; | ||
| 2933 | res_ty.specifier = .array; | ||
| 2934 | } | ||
| 2935 | |||
| 2936 | try res_ty.combine(outer); | ||
| 2937 | return res_ty; | ||
| 2938 | } else if (p.eatToken(.l_paren)) |l_paren| { | ||
| 2939 | d.func_declarator = l_paren; | ||
| 2940 | |||
| 2941 | const func_ty = try p.arena.create(Type.Func); | ||
| 2942 | func_ty.params = &.{}; | ||
| 2943 | func_ty.return_type.specifier = .void; | ||
| 2944 | var specifier: Type.Specifier = .func; | ||
| 2945 | |||
| 2946 | if (p.eatToken(.ellipsis)) |_| { | ||
| 2947 | try p.err(.param_before_var_args); | ||
| 2948 | try p.expectClosing(l_paren, .r_paren); | ||
| 2949 | var res_ty = Type{ .specifier = .func, .data = .{ .func = func_ty } }; | ||
| 2950 | |||
| 2951 | const outer = try p.directDeclarator(base_type, d, kind); | ||
| 2952 | try res_ty.combine(outer); | ||
| 2953 | return res_ty; | ||
| 2954 | } | ||
| 2955 | |||
| 2956 | if (try p.paramDecls()) |params| { | ||
| 2957 | func_ty.params = params; | ||
| 2958 | if (p.eatToken(.ellipsis)) |_| specifier = .var_args_func; | ||
| 2959 | } else if (p.tok_ids[p.tok_i] == .r_paren) { | ||
| 2960 | specifier = .var_args_func; | ||
| 2961 | } else if (p.tok_ids[p.tok_i] == .identifier or p.tok_ids[p.tok_i] == .extended_identifier) { | ||
| 2962 | d.old_style_func = p.tok_i; | ||
| 2963 | const param_buf_top = p.param_buf.items.len; | ||
| 2964 | try p.syms.pushScope(p); | ||
| 2965 | defer { | ||
| 2966 | p.param_buf.items.len = param_buf_top; | ||
| 2967 | p.syms.popScope(); | ||
| 2968 | } | ||
| 2969 | |||
| 2970 | specifier = .old_style_func; | ||
| 2971 | while (true) { | ||
| 2972 | const name_tok = try p.expectIdentifier(); | ||
| 2973 | const interned_name = try p.comp.intern(p.tokSlice(name_tok)); | ||
| 2974 | try p.syms.defineParam(p, interned_name, undefined, name_tok); | ||
| 2975 | try p.param_buf.append(.{ | ||
| 2976 | .name = interned_name, | ||
| 2977 | .name_tok = name_tok, | ||
| 2978 | .ty = .{ .specifier = .int }, | ||
| 2979 | }); | ||
| 2980 | if (p.eatToken(.comma) == null) break; | ||
| 2981 | } | ||
| 2982 | func_ty.params = try p.arena.dupe(Type.Func.Param, p.param_buf.items[param_buf_top..]); | ||
| 2983 | } else { | ||
| 2984 | try p.err(.expected_param_decl); | ||
| 2985 | } | ||
| 2986 | |||
| 2987 | try p.expectClosing(l_paren, .r_paren); | ||
| 2988 | var res_ty = Type{ | ||
| 2989 | .specifier = specifier, | ||
| 2990 | .data = .{ .func = func_ty }, | ||
| 2991 | }; | ||
| 2992 | |||
| 2993 | const outer = try p.directDeclarator(base_type, d, kind); | ||
| 2994 | try res_ty.combine(outer); | ||
| 2995 | return res_ty; | ||
| 2996 | } else return base_type; | ||
| 2997 | } | ||
| 2998 | |||
| 2999 | /// pointer : '*' typeQual* pointer? | ||
| 3000 | fn pointer(p: *Parser, base_ty: Type) Error!Type { | ||
| 3001 | var ty = base_ty; | ||
| 3002 | while (p.eatToken(.asterisk)) |_| { | ||
| 3003 | const elem_ty = try p.arena.create(Type); | ||
| 3004 | elem_ty.* = ty; | ||
| 3005 | ty = Type{ | ||
| 3006 | .specifier = .pointer, | ||
| 3007 | .data = .{ .sub_type = elem_ty }, | ||
| 3008 | }; | ||
| 3009 | var quals = Type.Qualifiers.Builder{}; | ||
| 3010 | _ = try p.typeQual(&quals); | ||
| 3011 | try quals.finish(p, &ty); | ||
| 3012 | } | ||
| 3013 | return ty; | ||
| 3014 | } | ||
| 3015 | |||
| 3016 | /// paramDecls : paramDecl (',' paramDecl)* (',' '...') | ||
| 3017 | /// paramDecl : declSpec (declarator | abstractDeclarator) | ||
| 3018 | fn paramDecls(p: *Parser) Error!?[]Type.Func.Param { | ||
| 3019 | // TODO warn about visibility of types declared here | ||
| 3020 | const param_buf_top = p.param_buf.items.len; | ||
| 3021 | defer p.param_buf.items.len = param_buf_top; | ||
| 3022 | try p.syms.pushScope(p); | ||
| 3023 | defer p.syms.popScope(); | ||
| 3024 | |||
| 3025 | while (true) { | ||
| 3026 | const attr_buf_top = p.attr_buf.len; | ||
| 3027 | defer p.attr_buf.len = attr_buf_top; | ||
| 3028 | const param_decl_spec = if (try p.declSpec()) |some| | ||
| 3029 | some | ||
| 3030 | else if (p.param_buf.items.len == param_buf_top) | ||
| 3031 | return null | ||
| 3032 | else blk: { | ||
| 3033 | var spec: Type.Builder = .{}; | ||
| 3034 | break :blk DeclSpec{ .ty = try spec.finish(p) }; | ||
| 3035 | }; | ||
| 3036 | |||
| 3037 | var name_tok: TokenIndex = 0; | ||
| 3038 | const first_tok = p.tok_i; | ||
| 3039 | var param_ty = param_decl_spec.ty; | ||
| 3040 | if (try p.declarator(param_decl_spec.ty, .param)) |some| { | ||
| 3041 | if (some.old_style_func) |tok_i| try p.errTok(.invalid_old_style_params, tok_i); | ||
| 3042 | try p.attributeSpecifier(); | ||
| 3043 | |||
| 3044 | name_tok = some.name; | ||
| 3045 | param_ty = some.ty; | ||
| 3046 | if (some.name != 0) { | ||
| 3047 | const interned_name = try p.comp.intern(p.tokSlice(name_tok)); | ||
| 3048 | try p.syms.defineParam(p, interned_name, param_ty, name_tok); | ||
| 3049 | } | ||
| 3050 | } | ||
| 3051 | param_ty = try Attribute.applyParameterAttributes(p, param_ty, attr_buf_top, .alignas_on_param); | ||
| 3052 | |||
| 3053 | if (param_ty.isFunc()) { | ||
| 3054 | // params declared as functions are converted to function pointers | ||
| 3055 | const elem_ty = try p.arena.create(Type); | ||
| 3056 | elem_ty.* = param_ty; | ||
| 3057 | param_ty = Type{ | ||
| 3058 | .specifier = .pointer, | ||
| 3059 | .data = .{ .sub_type = elem_ty }, | ||
| 3060 | }; | ||
| 3061 | } else if (param_ty.isArray()) { | ||
| 3062 | // params declared as arrays are converted to pointers | ||
| 3063 | param_ty.decayArray(); | ||
| 3064 | } else if (param_ty.is(.void)) { | ||
| 3065 | // validate void parameters | ||
| 3066 | if (p.param_buf.items.len == param_buf_top) { | ||
| 3067 | if (p.tok_ids[p.tok_i] != .r_paren) { | ||
| 3068 | try p.err(.void_only_param); | ||
| 3069 | if (param_ty.anyQual()) try p.err(.void_param_qualified); | ||
| 3070 | return error.ParsingFailed; | ||
| 3071 | } | ||
| 3072 | return &[0]Type.Func.Param{}; | ||
| 3073 | } | ||
| 3074 | try p.err(.void_must_be_first_param); | ||
| 3075 | return error.ParsingFailed; | ||
| 3076 | } | ||
| 3077 | |||
| 3078 | try param_decl_spec.validateParam(p, &param_ty); | ||
| 3079 | try p.param_buf.append(.{ | ||
| 3080 | .name = if (name_tok == 0) .empty else try p.comp.intern(p.tokSlice(name_tok)), | ||
| 3081 | .name_tok = if (name_tok == 0) first_tok else name_tok, | ||
| 3082 | .ty = param_ty, | ||
| 3083 | }); | ||
| 3084 | |||
| 3085 | if (p.eatToken(.comma) == null) break; | ||
| 3086 | if (p.tok_ids[p.tok_i] == .ellipsis) break; | ||
| 3087 | } | ||
| 3088 | return try p.arena.dupe(Type.Func.Param, p.param_buf.items[param_buf_top..]); | ||
| 3089 | } | ||
| 3090 | |||
| 3091 | /// typeName : specQual abstractDeclarator | ||
| 3092 | fn typeName(p: *Parser) Error!?Type { | ||
| 3093 | const attr_buf_top = p.attr_buf.len; | ||
| 3094 | defer p.attr_buf.len = attr_buf_top; | ||
| 3095 | var ty = (try p.specQual()) orelse return null; | ||
| 3096 | if (try p.declarator(ty, .abstract)) |some| { | ||
| 3097 | if (some.old_style_func) |tok_i| try p.errTok(.invalid_old_style_params, tok_i); | ||
| 3098 | return try Attribute.applyTypeAttributes(p, some.ty, attr_buf_top, .align_ignored); | ||
| 3099 | } | ||
| 3100 | return try Attribute.applyTypeAttributes(p, ty, attr_buf_top, .align_ignored); | ||
| 3101 | } | ||
| 3102 | |||
| 3103 | /// initializer | ||
| 3104 | /// : assignExpr | ||
| 3105 | /// | '{' initializerItems '}' | ||
| 3106 | fn initializer(p: *Parser, init_ty: Type) Error!Result { | ||
| 3107 | // fast path for non-braced initializers | ||
| 3108 | if (p.tok_ids[p.tok_i] != .l_brace) { | ||
| 3109 | const tok = p.tok_i; | ||
| 3110 | var res = try p.assignExpr(); | ||
| 3111 | try res.expect(p); | ||
| 3112 | if (try p.coerceArrayInit(&res, tok, init_ty)) return res; | ||
| 3113 | try p.coerceInit(&res, tok, init_ty); | ||
| 3114 | return res; | ||
| 3115 | } | ||
| 3116 | if (init_ty.is(.auto_type)) { | ||
| 3117 | try p.err(.auto_type_with_init_list); | ||
| 3118 | return error.ParsingFailed; | ||
| 3119 | } | ||
| 3120 | |||
| 3121 | var il: InitList = .{}; | ||
| 3122 | defer il.deinit(p.gpa); | ||
| 3123 | |||
| 3124 | _ = try p.initializerItem(&il, init_ty); | ||
| 3125 | |||
| 3126 | const res = try p.convertInitList(il, init_ty); | ||
| 3127 | var res_ty = p.nodes.items(.ty)[@intFromEnum(res)]; | ||
| 3128 | res_ty.qual = init_ty.qual; | ||
| 3129 | return Result{ .ty = res_ty, .node = res }; | ||
| 3130 | } | ||
| 3131 | |||
| 3132 | /// initializerItems : designation? initializer (',' designation? initializer)* ','? | ||
| 3133 | /// designation : designator+ '=' | ||
| 3134 | /// designator | ||
| 3135 | /// : '[' integerConstExpr ']' | ||
| 3136 | /// | '.' identifier | ||
| 3137 | fn initializerItem(p: *Parser, il: *InitList, init_ty: Type) Error!bool { | ||
| 3138 | const l_brace = p.eatToken(.l_brace) orelse { | ||
| 3139 | const tok = p.tok_i; | ||
| 3140 | var res = try p.assignExpr(); | ||
| 3141 | if (res.empty(p)) return false; | ||
| 3142 | |||
| 3143 | const arr = try p.coerceArrayInit(&res, tok, init_ty); | ||
| 3144 | if (!arr) try p.coerceInit(&res, tok, init_ty); | ||
| 3145 | if (il.tok != 0) { | ||
| 3146 | try p.errTok(.initializer_overrides, tok); | ||
| 3147 | try p.errTok(.previous_initializer, il.tok); | ||
| 3148 | } | ||
| 3149 | il.node = res.node; | ||
| 3150 | il.tok = tok; | ||
| 3151 | return true; | ||
| 3152 | }; | ||
| 3153 | |||
| 3154 | const is_scalar = init_ty.isScalar(); | ||
| 3155 | const is_complex = init_ty.isComplex(); | ||
| 3156 | const scalar_inits_needed: usize = if (is_complex) 2 else 1; | ||
| 3157 | if (p.eatToken(.r_brace)) |_| { | ||
| 3158 | if (is_scalar) try p.errTok(.empty_scalar_init, l_brace); | ||
| 3159 | if (il.tok != 0) { | ||
| 3160 | try p.errTok(.initializer_overrides, l_brace); | ||
| 3161 | try p.errTok(.previous_initializer, il.tok); | ||
| 3162 | } | ||
| 3163 | il.node = .none; | ||
| 3164 | il.tok = l_brace; | ||
| 3165 | return true; | ||
| 3166 | } | ||
| 3167 | |||
| 3168 | var count: u64 = 0; | ||
| 3169 | var warned_excess = false; | ||
| 3170 | var is_str_init = false; | ||
| 3171 | var index_hint: ?u64 = null; | ||
| 3172 | while (true) : (count += 1) { | ||
| 3173 | errdefer p.skipTo(.r_brace); | ||
| 3174 | |||
| 3175 | var first_tok = p.tok_i; | ||
| 3176 | var cur_ty = init_ty; | ||
| 3177 | var cur_il = il; | ||
| 3178 | var designation = false; | ||
| 3179 | var cur_index_hint: ?u64 = null; | ||
| 3180 | while (true) { | ||
| 3181 | if (p.eatToken(.l_bracket)) |l_bracket| { | ||
| 3182 | if (!cur_ty.isArray()) { | ||
| 3183 | try p.errStr(.invalid_array_designator, l_bracket, try p.typeStr(cur_ty)); | ||
| 3184 | return error.ParsingFailed; | ||
| 3185 | } | ||
| 3186 | const expr_tok = p.tok_i; | ||
| 3187 | const index_res = try p.integerConstExpr(.gnu_folding_extension); | ||
| 3188 | try p.expectClosing(l_bracket, .r_bracket); | ||
| 3189 | |||
| 3190 | if (index_res.val.tag == .unavailable) { | ||
| 3191 | try p.errTok(.expected_integer_constant_expr, expr_tok); | ||
| 3192 | return error.ParsingFailed; | ||
| 3193 | } else if (index_res.val.compare(.lt, index_res.val.zero(), index_res.ty, p.comp)) { | ||
| 3194 | try p.errExtra(.negative_array_designator, l_bracket + 1, .{ | ||
| 3195 | .signed = index_res.val.signExtend(index_res.ty, p.comp), | ||
| 3196 | }); | ||
| 3197 | return error.ParsingFailed; | ||
| 3198 | } | ||
| 3199 | |||
| 3200 | const max_len = cur_ty.arrayLen() orelse std.math.maxInt(usize); | ||
| 3201 | if (index_res.val.data.int >= max_len) { | ||
| 3202 | try p.errExtra(.oob_array_designator, l_bracket + 1, .{ .unsigned = index_res.val.data.int }); | ||
| 3203 | return error.ParsingFailed; | ||
| 3204 | } | ||
| 3205 | const checked = index_res.val.getInt(u64); | ||
| 3206 | cur_index_hint = cur_index_hint orelse checked; | ||
| 3207 | |||
| 3208 | cur_il = try cur_il.find(p.gpa, checked); | ||
| 3209 | cur_ty = cur_ty.elemType(); | ||
| 3210 | designation = true; | ||
| 3211 | } else if (p.eatToken(.period)) |period| { | ||
| 3212 | const field_tok = try p.expectIdentifier(); | ||
| 3213 | const field_str = p.tokSlice(field_tok); | ||
| 3214 | const field_name = try p.comp.intern(field_str); | ||
| 3215 | cur_ty = cur_ty.canonicalize(.standard); | ||
| 3216 | if (!cur_ty.isRecord()) { | ||
| 3217 | try p.errStr(.invalid_field_designator, period, try p.typeStr(cur_ty)); | ||
| 3218 | return error.ParsingFailed; | ||
| 3219 | } else if (!cur_ty.hasField(field_name)) { | ||
| 3220 | try p.errStr(.no_such_field_designator, period, field_str); | ||
| 3221 | return error.ParsingFailed; | ||
| 3222 | } | ||
| 3223 | |||
| 3224 | // TODO check if union already has field set | ||
| 3225 | outer: while (true) { | ||
| 3226 | for (cur_ty.data.record.fields, 0..) |f, i| { | ||
| 3227 | if (f.isAnonymousRecord()) { | ||
| 3228 | // Recurse into anonymous field if it has a field by the name. | ||
| 3229 | if (!f.ty.hasField(field_name)) continue; | ||
| 3230 | cur_ty = f.ty.canonicalize(.standard); | ||
| 3231 | cur_il = try il.find(p.gpa, i); | ||
| 3232 | cur_index_hint = cur_index_hint orelse i; | ||
| 3233 | continue :outer; | ||
| 3234 | } | ||
| 3235 | if (field_name == f.name) { | ||
| 3236 | cur_il = try cur_il.find(p.gpa, i); | ||
| 3237 | cur_ty = f.ty; | ||
| 3238 | cur_index_hint = cur_index_hint orelse i; | ||
| 3239 | break :outer; | ||
| 3240 | } | ||
| 3241 | } | ||
| 3242 | unreachable; // we already checked that the starting type has this field | ||
| 3243 | } | ||
| 3244 | designation = true; | ||
| 3245 | } else break; | ||
| 3246 | } | ||
| 3247 | if (designation) index_hint = null; | ||
| 3248 | defer index_hint = cur_index_hint orelse null; | ||
| 3249 | |||
| 3250 | if (designation) _ = try p.expectToken(.equal); | ||
| 3251 | |||
| 3252 | if (!designation and cur_ty.hasAttribute(.designated_init)) { | ||
| 3253 | try p.err(.designated_init_needed); | ||
| 3254 | } | ||
| 3255 | |||
| 3256 | var saw = false; | ||
| 3257 | if (is_str_init and p.isStringInit(init_ty)) { | ||
| 3258 | // discard further strings | ||
| 3259 | var tmp_il = InitList{}; | ||
| 3260 | defer tmp_il.deinit(p.gpa); | ||
| 3261 | saw = try p.initializerItem(&tmp_il, .{ .specifier = .void }); | ||
| 3262 | } else if (count == 0 and p.isStringInit(init_ty)) { | ||
| 3263 | is_str_init = true; | ||
| 3264 | saw = try p.initializerItem(il, init_ty); | ||
| 3265 | } else if (is_scalar and count >= scalar_inits_needed) { | ||
| 3266 | // discard further scalars | ||
| 3267 | var tmp_il = InitList{}; | ||
| 3268 | defer tmp_il.deinit(p.gpa); | ||
| 3269 | saw = try p.initializerItem(&tmp_il, .{ .specifier = .void }); | ||
| 3270 | } else if (p.tok_ids[p.tok_i] == .l_brace) { | ||
| 3271 | if (designation) { | ||
| 3272 | // designation overrides previous value, let existing mechanism handle it | ||
| 3273 | saw = try p.initializerItem(cur_il, cur_ty); | ||
| 3274 | } else if (try p.findAggregateInitializer(&cur_il, &cur_ty, &index_hint)) { | ||
| 3275 | saw = try p.initializerItem(cur_il, cur_ty); | ||
| 3276 | } else { | ||
| 3277 | // discard further values | ||
| 3278 | var tmp_il = InitList{}; | ||
| 3279 | defer tmp_il.deinit(p.gpa); | ||
| 3280 | saw = try p.initializerItem(&tmp_il, .{ .specifier = .void }); | ||
| 3281 | if (!warned_excess) try p.errTok(if (init_ty.isArray()) .excess_array_init else .excess_struct_init, first_tok); | ||
| 3282 | warned_excess = true; | ||
| 3283 | } | ||
| 3284 | } else single_item: { | ||
| 3285 | first_tok = p.tok_i; | ||
| 3286 | var res = try p.assignExpr(); | ||
| 3287 | saw = !res.empty(p); | ||
| 3288 | if (!saw) break :single_item; | ||
| 3289 | |||
| 3290 | excess: { | ||
| 3291 | if (index_hint) |*hint| { | ||
| 3292 | if (try p.findScalarInitializerAt(&cur_il, &cur_ty, res.ty, first_tok, hint)) break :excess; | ||
| 3293 | } else if (try p.findScalarInitializer(&cur_il, &cur_ty, res.ty, first_tok)) break :excess; | ||
| 3294 | |||
| 3295 | if (designation) break :excess; | ||
| 3296 | if (!warned_excess) try p.errTok(if (init_ty.isArray()) .excess_array_init else .excess_struct_init, first_tok); | ||
| 3297 | warned_excess = true; | ||
| 3298 | |||
| 3299 | break :single_item; | ||
| 3300 | } | ||
| 3301 | |||
| 3302 | const arr = try p.coerceArrayInit(&res, first_tok, cur_ty); | ||
| 3303 | if (!arr) try p.coerceInit(&res, first_tok, cur_ty); | ||
| 3304 | if (cur_il.tok != 0) { | ||
| 3305 | try p.errTok(.initializer_overrides, first_tok); | ||
| 3306 | try p.errTok(.previous_initializer, cur_il.tok); | ||
| 3307 | } | ||
| 3308 | cur_il.node = res.node; | ||
| 3309 | cur_il.tok = first_tok; | ||
| 3310 | } | ||
| 3311 | |||
| 3312 | if (!saw) { | ||
| 3313 | if (designation) { | ||
| 3314 | try p.err(.expected_expr); | ||
| 3315 | return error.ParsingFailed; | ||
| 3316 | } | ||
| 3317 | break; | ||
| 3318 | } else if (count == 1) { | ||
| 3319 | if (is_str_init) try p.errTok(.excess_str_init, first_tok); | ||
| 3320 | if (is_scalar and !is_complex) try p.errTok(.excess_scalar_init, first_tok); | ||
| 3321 | } else if (count == 2) { | ||
| 3322 | if (is_scalar and is_complex) try p.errTok(.excess_scalar_init, first_tok); | ||
| 3323 | } | ||
| 3324 | |||
| 3325 | if (p.eatToken(.comma) == null) break; | ||
| 3326 | } | ||
| 3327 | try p.expectClosing(l_brace, .r_brace); | ||
| 3328 | |||
| 3329 | if (is_complex and count == 1) { // count of 1 means we saw exactly 2 items in the initializer list | ||
| 3330 | try p.errTok(.complex_component_init, l_brace); | ||
| 3331 | } | ||
| 3332 | if (is_scalar or is_str_init) return true; | ||
| 3333 | if (il.tok != 0) { | ||
| 3334 | try p.errTok(.initializer_overrides, l_brace); | ||
| 3335 | try p.errTok(.previous_initializer, il.tok); | ||
| 3336 | } | ||
| 3337 | il.node = .none; | ||
| 3338 | il.tok = l_brace; | ||
| 3339 | return true; | ||
| 3340 | } | ||
| 3341 | |||
| 3342 | /// Returns true if the value is unused. | ||
| 3343 | fn findScalarInitializerAt(p: *Parser, il: **InitList, ty: *Type, actual_ty: Type, first_tok: TokenIndex, start_index: *u64) Error!bool { | ||
| 3344 | if (ty.isArray()) { | ||
| 3345 | if (il.*.node != .none) return false; | ||
| 3346 | start_index.* += 1; | ||
| 3347 | |||
| 3348 | const arr_ty = ty.*; | ||
| 3349 | const elem_count = arr_ty.arrayLen() orelse std.math.maxInt(u64); | ||
| 3350 | if (elem_count == 0) { | ||
| 3351 | try p.errTok(.empty_aggregate_init_braces, first_tok); | ||
| 3352 | return error.ParsingFailed; | ||
| 3353 | } | ||
| 3354 | const elem_ty = arr_ty.elemType(); | ||
| 3355 | const arr_il = il.*; | ||
| 3356 | if (start_index.* < elem_count) { | ||
| 3357 | ty.* = elem_ty; | ||
| 3358 | il.* = try arr_il.find(p.gpa, start_index.*); | ||
| 3359 | _ = try p.findScalarInitializer(il, ty, actual_ty, first_tok); | ||
| 3360 | return true; | ||
| 3361 | } | ||
| 3362 | return false; | ||
| 3363 | } else if (ty.get(.@"struct")) |struct_ty| { | ||
| 3364 | if (il.*.node != .none) return false; | ||
| 3365 | start_index.* += 1; | ||
| 3366 | |||
| 3367 | const fields = struct_ty.data.record.fields; | ||
| 3368 | if (fields.len == 0) { | ||
| 3369 | try p.errTok(.empty_aggregate_init_braces, first_tok); | ||
| 3370 | return error.ParsingFailed; | ||
| 3371 | } | ||
| 3372 | const struct_il = il.*; | ||
| 3373 | if (start_index.* < fields.len) { | ||
| 3374 | const field = fields[@intCast(start_index.*)]; | ||
| 3375 | ty.* = field.ty; | ||
| 3376 | il.* = try struct_il.find(p.gpa, start_index.*); | ||
| 3377 | _ = try p.findScalarInitializer(il, ty, actual_ty, first_tok); | ||
| 3378 | return true; | ||
| 3379 | } | ||
| 3380 | return false; | ||
| 3381 | } else if (ty.get(.@"union")) |_| { | ||
| 3382 | return false; | ||
| 3383 | } | ||
| 3384 | return il.*.node == .none; | ||
| 3385 | } | ||
| 3386 | |||
| 3387 | /// Returns true if the value is unused. | ||
| 3388 | fn findScalarInitializer(p: *Parser, il: **InitList, ty: *Type, actual_ty: Type, first_tok: TokenIndex) Error!bool { | ||
| 3389 | if (ty.isArray() or ty.isComplex()) { | ||
| 3390 | if (il.*.node != .none) return false; | ||
| 3391 | const start_index = il.*.list.items.len; | ||
| 3392 | var index = if (start_index != 0) il.*.list.items[start_index - 1].index else start_index; | ||
| 3393 | |||
| 3394 | const arr_ty = ty.*; | ||
| 3395 | const elem_count: u64 = arr_ty.expectedInitListSize() orelse std.math.maxInt(u64); | ||
| 3396 | if (elem_count == 0) { | ||
| 3397 | try p.errTok(.empty_aggregate_init_braces, first_tok); | ||
| 3398 | return error.ParsingFailed; | ||
| 3399 | } | ||
| 3400 | const elem_ty = arr_ty.elemType(); | ||
| 3401 | const arr_il = il.*; | ||
| 3402 | while (index < elem_count) : (index += 1) { | ||
| 3403 | ty.* = elem_ty; | ||
| 3404 | il.* = try arr_il.find(p.gpa, index); | ||
| 3405 | if (il.*.node == .none and actual_ty.eql(elem_ty, p.comp, false)) return true; | ||
| 3406 | if (try p.findScalarInitializer(il, ty, actual_ty, first_tok)) return true; | ||
| 3407 | } | ||
| 3408 | return false; | ||
| 3409 | } else if (ty.get(.@"struct")) |struct_ty| { | ||
| 3410 | if (il.*.node != .none) return false; | ||
| 3411 | if (actual_ty.eql(ty.*, p.comp, false)) return true; | ||
| 3412 | const start_index = il.*.list.items.len; | ||
| 3413 | var index = if (start_index != 0) il.*.list.items[start_index - 1].index + 1 else start_index; | ||
| 3414 | |||
| 3415 | const fields = struct_ty.data.record.fields; | ||
| 3416 | if (fields.len == 0) { | ||
| 3417 | try p.errTok(.empty_aggregate_init_braces, first_tok); | ||
| 3418 | return error.ParsingFailed; | ||
| 3419 | } | ||
| 3420 | const struct_il = il.*; | ||
| 3421 | while (index < fields.len) : (index += 1) { | ||
| 3422 | const field = fields[@intCast(index)]; | ||
| 3423 | ty.* = field.ty; | ||
| 3424 | il.* = try struct_il.find(p.gpa, index); | ||
| 3425 | if (il.*.node == .none and actual_ty.eql(field.ty, p.comp, false)) return true; | ||
| 3426 | if (try p.findScalarInitializer(il, ty, actual_ty, first_tok)) return true; | ||
| 3427 | } | ||
| 3428 | return false; | ||
| 3429 | } else if (ty.get(.@"union")) |union_ty| { | ||
| 3430 | if (il.*.node != .none) return false; | ||
| 3431 | if (actual_ty.eql(ty.*, p.comp, false)) return true; | ||
| 3432 | if (union_ty.data.record.fields.len == 0) { | ||
| 3433 | try p.errTok(.empty_aggregate_init_braces, first_tok); | ||
| 3434 | return error.ParsingFailed; | ||
| 3435 | } | ||
| 3436 | ty.* = union_ty.data.record.fields[0].ty; | ||
| 3437 | il.* = try il.*.find(p.gpa, 0); | ||
| 3438 | // if (il.*.node == .none and actual_ty.eql(ty, p.comp, false)) return true; | ||
| 3439 | if (try p.findScalarInitializer(il, ty, actual_ty, first_tok)) return true; | ||
| 3440 | return false; | ||
| 3441 | } | ||
| 3442 | return il.*.node == .none; | ||
| 3443 | } | ||
| 3444 | |||
| 3445 | fn findAggregateInitializer(p: *Parser, il: **InitList, ty: *Type, start_index: *?u64) Error!bool { | ||
| 3446 | if (ty.isArray()) { | ||
| 3447 | if (il.*.node != .none) return false; | ||
| 3448 | const list_index = il.*.list.items.len; | ||
| 3449 | const index = if (start_index.*) |*some| blk: { | ||
| 3450 | some.* += 1; | ||
| 3451 | break :blk some.*; | ||
| 3452 | } else if (list_index != 0) | ||
| 3453 | il.*.list.items[list_index - 1].index + 1 | ||
| 3454 | else | ||
| 3455 | list_index; | ||
| 3456 | |||
| 3457 | const arr_ty = ty.*; | ||
| 3458 | const elem_count = arr_ty.arrayLen() orelse std.math.maxInt(u64); | ||
| 3459 | const elem_ty = arr_ty.elemType(); | ||
| 3460 | if (index < elem_count) { | ||
| 3461 | ty.* = elem_ty; | ||
| 3462 | il.* = try il.*.find(p.gpa, index); | ||
| 3463 | return true; | ||
| 3464 | } | ||
| 3465 | return false; | ||
| 3466 | } else if (ty.get(.@"struct")) |struct_ty| { | ||
| 3467 | if (il.*.node != .none) return false; | ||
| 3468 | const list_index = il.*.list.items.len; | ||
| 3469 | const index = if (start_index.*) |*some| blk: { | ||
| 3470 | some.* += 1; | ||
| 3471 | break :blk some.*; | ||
| 3472 | } else if (list_index != 0) | ||
| 3473 | il.*.list.items[list_index - 1].index + 1 | ||
| 3474 | else | ||
| 3475 | list_index; | ||
| 3476 | |||
| 3477 | const field_count = struct_ty.data.record.fields.len; | ||
| 3478 | if (index < field_count) { | ||
| 3479 | ty.* = struct_ty.data.record.fields[@intCast(index)].ty; | ||
| 3480 | il.* = try il.*.find(p.gpa, index); | ||
| 3481 | return true; | ||
| 3482 | } | ||
| 3483 | return false; | ||
| 3484 | } else if (ty.get(.@"union")) |union_ty| { | ||
| 3485 | if (il.*.node != .none) return false; | ||
| 3486 | if (start_index.*) |_| return false; // overrides | ||
| 3487 | if (union_ty.data.record.fields.len == 0) return false; | ||
| 3488 | |||
| 3489 | ty.* = union_ty.data.record.fields[0].ty; | ||
| 3490 | il.* = try il.*.find(p.gpa, 0); | ||
| 3491 | return true; | ||
| 3492 | } else { | ||
| 3493 | try p.err(.too_many_scalar_init_braces); | ||
| 3494 | return il.*.node == .none; | ||
| 3495 | } | ||
| 3496 | } | ||
| 3497 | |||
| 3498 | fn coerceArrayInit(p: *Parser, item: *Result, tok: TokenIndex, target: Type) !bool { | ||
| 3499 | if (!target.isArray()) return false; | ||
| 3500 | |||
| 3501 | const is_str_lit = p.nodeIs(item.node, .string_literal_expr); | ||
| 3502 | if (!is_str_lit and !p.nodeIs(item.node, .compound_literal_expr) or !item.ty.isArray()) { | ||
| 3503 | try p.errTok(.array_init_str, tok); | ||
| 3504 | return true; // do not do further coercion | ||
| 3505 | } | ||
| 3506 | |||
| 3507 | const target_spec = target.elemType().canonicalize(.standard).specifier; | ||
| 3508 | const item_spec = item.ty.elemType().canonicalize(.standard).specifier; | ||
| 3509 | |||
| 3510 | const compatible = target.elemType().eql(item.ty.elemType(), p.comp, false) or | ||
| 3511 | (is_str_lit and item_spec == .char and (target_spec == .uchar or target_spec == .schar)) or | ||
| 3512 | (is_str_lit and item_spec == .uchar and (target_spec == .uchar or target_spec == .schar or target_spec == .char)); | ||
| 3513 | if (!compatible) { | ||
| 3514 | const e_msg = " with array of type "; | ||
| 3515 | try p.errStr(.incompatible_array_init, tok, try p.typePairStrExtra(target, e_msg, item.ty)); | ||
| 3516 | return true; // do not do further coercion | ||
| 3517 | } | ||
| 3518 | |||
| 3519 | if (target.get(.array)) |arr_ty| { | ||
| 3520 | assert(item.ty.specifier == .array); | ||
| 3521 | var len = item.ty.arrayLen().?; | ||
| 3522 | const array_len = arr_ty.arrayLen().?; | ||
| 3523 | if (is_str_lit) { | ||
| 3524 | // the null byte of a string can be dropped | ||
| 3525 | if (len - 1 > array_len) | ||
| 3526 | try p.errTok(.str_init_too_long, tok); | ||
| 3527 | } else if (len > array_len) { | ||
| 3528 | try p.errStr( | ||
| 3529 | .arr_init_too_long, | ||
| 3530 | tok, | ||
| 3531 | try p.typePairStrExtra(target, " with array of type ", item.ty), | ||
| 3532 | ); | ||
| 3533 | } | ||
| 3534 | } | ||
| 3535 | return true; | ||
| 3536 | } | ||
| 3537 | |||
| 3538 | fn coerceInit(p: *Parser, item: *Result, tok: TokenIndex, target: Type) !void { | ||
| 3539 | if (target.is(.void)) return; // Do not do type coercion on excess items | ||
| 3540 | |||
| 3541 | const node = item.node; | ||
| 3542 | try item.lvalConversion(p); | ||
| 3543 | if (target.is(.auto_type)) { | ||
| 3544 | if (p.getNode(node, .member_access_expr) orelse p.getNode(node, .member_access_ptr_expr)) |member_node| { | ||
| 3545 | if (Tree.isBitfield(p.nodes.slice(), member_node)) try p.errTok(.auto_type_from_bitfield, tok); | ||
| 3546 | } | ||
| 3547 | return; | ||
| 3548 | } | ||
| 3549 | |||
| 3550 | try item.coerce(p, target, tok, .init); | ||
| 3551 | } | ||
| 3552 | |||
| 3553 | fn isStringInit(p: *Parser, ty: Type) bool { | ||
| 3554 | if (!ty.isArray() or !ty.elemType().isInt()) return false; | ||
| 3555 | var i = p.tok_i; | ||
| 3556 | while (true) : (i += 1) { | ||
| 3557 | switch (p.tok_ids[i]) { | ||
| 3558 | .l_paren => {}, | ||
| 3559 | .string_literal, | ||
| 3560 | .string_literal_utf_16, | ||
| 3561 | .string_literal_utf_8, | ||
| 3562 | .string_literal_utf_32, | ||
| 3563 | .string_literal_wide, | ||
| 3564 | => return true, | ||
| 3565 | else => return false, | ||
| 3566 | } | ||
| 3567 | } | ||
| 3568 | } | ||
| 3569 | |||
| 3570 | /// Convert InitList into an AST | ||
| 3571 | fn convertInitList(p: *Parser, il: InitList, init_ty: Type) Error!NodeIndex { | ||
| 3572 | const is_complex = init_ty.isComplex(); | ||
| 3573 | if (init_ty.isScalar() and !is_complex) { | ||
| 3574 | if (il.node == .none) { | ||
| 3575 | return p.addNode(.{ .tag = .default_init_expr, .ty = init_ty, .data = undefined }); | ||
| 3576 | } | ||
| 3577 | return il.node; | ||
| 3578 | } else if (init_ty.is(.variable_len_array)) { | ||
| 3579 | return error.ParsingFailed; // vla invalid, reported earlier | ||
| 3580 | } else if (init_ty.isArray() or is_complex) { | ||
| 3581 | if (il.node != .none) { | ||
| 3582 | return il.node; | ||
| 3583 | } | ||
| 3584 | const list_buf_top = p.list_buf.items.len; | ||
| 3585 | defer p.list_buf.items.len = list_buf_top; | ||
| 3586 | |||
| 3587 | const elem_ty = init_ty.elemType(); | ||
| 3588 | |||
| 3589 | const max_items: u64 = init_ty.expectedInitListSize() orelse std.math.maxInt(usize); | ||
| 3590 | var start: u64 = 0; | ||
| 3591 | for (il.list.items) |*init| { | ||
| 3592 | if (init.index > start) { | ||
| 3593 | const elem = try p.addNode(.{ | ||
| 3594 | .tag = .array_filler_expr, | ||
| 3595 | .ty = elem_ty, | ||
| 3596 | .data = .{ .int = init.index - start }, | ||
| 3597 | }); | ||
| 3598 | try p.list_buf.append(elem); | ||
| 3599 | } | ||
| 3600 | start = init.index + 1; | ||
| 3601 | |||
| 3602 | const elem = try p.convertInitList(init.list, elem_ty); | ||
| 3603 | try p.list_buf.append(elem); | ||
| 3604 | } | ||
| 3605 | |||
| 3606 | var arr_init_node: Tree.Node = .{ | ||
| 3607 | .tag = .array_init_expr_two, | ||
| 3608 | .ty = init_ty, | ||
| 3609 | .data = .{ .bin = .{ .lhs = .none, .rhs = .none } }, | ||
| 3610 | }; | ||
| 3611 | |||
| 3612 | if (init_ty.specifier == .incomplete_array) { | ||
| 3613 | arr_init_node.ty.specifier = .array; | ||
| 3614 | arr_init_node.ty.data.array.len = start; | ||
| 3615 | } else if (init_ty.is(.incomplete_array)) { | ||
| 3616 | const arr_ty = try p.arena.create(Type.Array); | ||
| 3617 | arr_ty.* = .{ .elem = init_ty.elemType(), .len = start }; | ||
| 3618 | arr_init_node.ty = .{ | ||
| 3619 | .specifier = .array, | ||
| 3620 | .data = .{ .array = arr_ty }, | ||
| 3621 | }; | ||
| 3622 | const attrs = init_ty.getAttributes(); | ||
| 3623 | arr_init_node.ty = try arr_init_node.ty.withAttributes(p.arena, attrs); | ||
| 3624 | } else if (start < max_items) { | ||
| 3625 | const elem = try p.addNode(.{ | ||
| 3626 | .tag = .array_filler_expr, | ||
| 3627 | .ty = elem_ty, | ||
| 3628 | .data = .{ .int = max_items - start }, | ||
| 3629 | }); | ||
| 3630 | try p.list_buf.append(elem); | ||
| 3631 | } | ||
| 3632 | |||
| 3633 | const items = p.list_buf.items[list_buf_top..]; | ||
| 3634 | switch (items.len) { | ||
| 3635 | 0 => {}, | ||
| 3636 | 1 => arr_init_node.data.bin.lhs = items[0], | ||
| 3637 | 2 => arr_init_node.data.bin = .{ .lhs = items[0], .rhs = items[1] }, | ||
| 3638 | else => { | ||
| 3639 | arr_init_node.tag = .array_init_expr; | ||
| 3640 | arr_init_node.data = .{ .range = try p.addList(items) }; | ||
| 3641 | }, | ||
| 3642 | } | ||
| 3643 | return try p.addNode(arr_init_node); | ||
| 3644 | } else if (init_ty.get(.@"struct")) |struct_ty| { | ||
| 3645 | assert(!struct_ty.hasIncompleteSize()); | ||
| 3646 | if (il.node != .none) { | ||
| 3647 | return il.node; | ||
| 3648 | } | ||
| 3649 | |||
| 3650 | const list_buf_top = p.list_buf.items.len; | ||
| 3651 | defer p.list_buf.items.len = list_buf_top; | ||
| 3652 | |||
| 3653 | var init_index: usize = 0; | ||
| 3654 | for (struct_ty.data.record.fields, 0..) |f, i| { | ||
| 3655 | if (init_index < il.list.items.len and il.list.items[init_index].index == i) { | ||
| 3656 | const item = try p.convertInitList(il.list.items[init_index].list, f.ty); | ||
| 3657 | try p.list_buf.append(item); | ||
| 3658 | init_index += 1; | ||
| 3659 | } else { | ||
| 3660 | const item = try p.addNode(.{ .tag = .default_init_expr, .ty = f.ty, .data = undefined }); | ||
| 3661 | try p.list_buf.append(item); | ||
| 3662 | } | ||
| 3663 | } | ||
| 3664 | |||
| 3665 | var struct_init_node: Tree.Node = .{ | ||
| 3666 | .tag = .struct_init_expr_two, | ||
| 3667 | .ty = init_ty, | ||
| 3668 | .data = .{ .bin = .{ .lhs = .none, .rhs = .none } }, | ||
| 3669 | }; | ||
| 3670 | const items = p.list_buf.items[list_buf_top..]; | ||
| 3671 | switch (items.len) { | ||
| 3672 | 0 => {}, | ||
| 3673 | 1 => struct_init_node.data.bin.lhs = items[0], | ||
| 3674 | 2 => struct_init_node.data.bin = .{ .lhs = items[0], .rhs = items[1] }, | ||
| 3675 | else => { | ||
| 3676 | struct_init_node.tag = .struct_init_expr; | ||
| 3677 | struct_init_node.data = .{ .range = try p.addList(items) }; | ||
| 3678 | }, | ||
| 3679 | } | ||
| 3680 | return try p.addNode(struct_init_node); | ||
| 3681 | } else if (init_ty.get(.@"union")) |union_ty| { | ||
| 3682 | if (il.node != .none) { | ||
| 3683 | return il.node; | ||
| 3684 | } | ||
| 3685 | |||
| 3686 | var union_init_node: Tree.Node = .{ | ||
| 3687 | .tag = .union_init_expr, | ||
| 3688 | .ty = init_ty, | ||
| 3689 | .data = .{ .union_init = .{ .field_index = 0, .node = .none } }, | ||
| 3690 | }; | ||
| 3691 | if (union_ty.data.record.fields.len == 0) { | ||
| 3692 | // do nothing for empty unions | ||
| 3693 | } else if (il.list.items.len == 0) { | ||
| 3694 | union_init_node.data.union_init.node = try p.addNode(.{ | ||
| 3695 | .tag = .default_init_expr, | ||
| 3696 | .ty = init_ty, | ||
| 3697 | .data = undefined, | ||
| 3698 | }); | ||
| 3699 | } else { | ||
| 3700 | const init = il.list.items[0]; | ||
| 3701 | const index: u32 = @truncate(init.index); | ||
| 3702 | const field_ty = union_ty.data.record.fields[index].ty; | ||
| 3703 | union_init_node.data.union_init = .{ | ||
| 3704 | .field_index = index, | ||
| 3705 | .node = try p.convertInitList(init.list, field_ty), | ||
| 3706 | }; | ||
| 3707 | } | ||
| 3708 | return try p.addNode(union_init_node); | ||
| 3709 | } else { | ||
| 3710 | return error.ParsingFailed; // initializer target is invalid, reported earlier | ||
| 3711 | } | ||
| 3712 | } | ||
| 3713 | |||
| 3714 | fn msvcAsmStmt(p: *Parser) Error!?NodeIndex { | ||
| 3715 | return p.todo("MSVC assembly statements"); | ||
| 3716 | } | ||
| 3717 | |||
| 3718 | /// asmOperand : ('[' IDENTIFIER ']')? asmStr '(' expr ')' | ||
| 3719 | fn asmOperand(p: *Parser, names: *std.ArrayList(?TokenIndex), constraints: *NodeList, exprs: *NodeList) Error!void { | ||
| 3720 | if (p.eatToken(.l_bracket)) |l_bracket| { | ||
| 3721 | const ident = (try p.eatIdentifier()) orelse { | ||
| 3722 | try p.err(.expected_identifier); | ||
| 3723 | return error.ParsingFailed; | ||
| 3724 | }; | ||
| 3725 | try names.append(ident); | ||
| 3726 | try p.expectClosing(l_bracket, .r_bracket); | ||
| 3727 | } else { | ||
| 3728 | try names.append(null); | ||
| 3729 | } | ||
| 3730 | const constraint = try p.asmStr(); | ||
| 3731 | try constraints.append(constraint.node); | ||
| 3732 | |||
| 3733 | const l_paren = p.eatToken(.l_paren) orelse { | ||
| 3734 | try p.errExtra(.expected_token, p.tok_i, .{ .tok_id = .{ .actual = p.tok_ids[p.tok_i], .expected = .l_paren } }); | ||
| 3735 | return error.ParsingFailed; | ||
| 3736 | }; | ||
| 3737 | const res = try p.expr(); | ||
| 3738 | try p.expectClosing(l_paren, .r_paren); | ||
| 3739 | try res.expect(p); | ||
| 3740 | try exprs.append(res.node); | ||
| 3741 | } | ||
| 3742 | |||
| 3743 | /// gnuAsmStmt | ||
| 3744 | /// : asmStr | ||
| 3745 | /// | asmStr ':' asmOperand* | ||
| 3746 | /// | asmStr ':' asmOperand* ':' asmOperand* | ||
| 3747 | /// | asmStr ':' asmOperand* ':' asmOperand* : asmStr? (',' asmStr)* | ||
| 3748 | /// | asmStr ':' asmOperand* ':' asmOperand* : asmStr? (',' asmStr)* : IDENTIFIER (',' IDENTIFIER)* | ||
| 3749 | fn gnuAsmStmt(p: *Parser, quals: Tree.GNUAssemblyQualifiers, l_paren: TokenIndex) Error!NodeIndex { | ||
| 3750 | const asm_str = try p.asmStr(); | ||
| 3751 | try p.checkAsmStr(asm_str.val, l_paren); | ||
| 3752 | |||
| 3753 | if (p.tok_ids[p.tok_i] == .r_paren) { | ||
| 3754 | return p.addNode(.{ | ||
| 3755 | .tag = .gnu_asm_simple, | ||
| 3756 | .ty = .{ .specifier = .void }, | ||
| 3757 | .data = .{ .un = asm_str.node }, | ||
| 3758 | }); | ||
| 3759 | } | ||
| 3760 | |||
| 3761 | const expected_items = 8; // arbitrarily chosen, most assembly will have fewer than 8 inputs/outputs/constraints/names | ||
| 3762 | const bytes_needed = expected_items * @sizeOf(?TokenIndex) + expected_items * 3 * @sizeOf(NodeIndex); | ||
| 3763 | |||
| 3764 | var stack_fallback = std.heap.stackFallback(bytes_needed, p.gpa); | ||
| 3765 | const allocator = stack_fallback.get(); | ||
| 3766 | |||
| 3767 | // TODO: Consider using a TokenIndex of 0 instead of null if we need to store the names in the tree | ||
| 3768 | var names = std.ArrayList(?TokenIndex).initCapacity(allocator, expected_items) catch unreachable; // stack allocation already succeeded | ||
| 3769 | defer names.deinit(); | ||
| 3770 | var constraints = NodeList.initCapacity(allocator, expected_items) catch unreachable; // stack allocation already succeeded | ||
| 3771 | defer constraints.deinit(); | ||
| 3772 | var exprs = NodeList.initCapacity(allocator, expected_items) catch unreachable; //stack allocation already succeeded | ||
| 3773 | defer exprs.deinit(); | ||
| 3774 | var clobbers = NodeList.initCapacity(allocator, expected_items) catch unreachable; //stack allocation already succeeded | ||
| 3775 | defer clobbers.deinit(); | ||
| 3776 | |||
| 3777 | // Outputs | ||
| 3778 | var ate_extra_colon = false; | ||
| 3779 | if (p.eatToken(.colon) orelse p.eatToken(.colon_colon)) |tok_i| { | ||
| 3780 | ate_extra_colon = p.tok_ids[tok_i] == .colon_colon; | ||
| 3781 | if (!ate_extra_colon) { | ||
| 3782 | if (p.tok_ids[p.tok_i].isStringLiteral() or p.tok_ids[p.tok_i] == .l_bracket) { | ||
| 3783 | while (true) { | ||
| 3784 | try p.asmOperand(&names, &constraints, &exprs); | ||
| 3785 | if (p.eatToken(.comma) == null) break; | ||
| 3786 | } | ||
| 3787 | } | ||
| 3788 | } | ||
| 3789 | } | ||
| 3790 | |||
| 3791 | const num_outputs = names.items.len; | ||
| 3792 | |||
| 3793 | // Inputs | ||
| 3794 | if (ate_extra_colon or p.tok_ids[p.tok_i] == .colon or p.tok_ids[p.tok_i] == .colon_colon) { | ||
| 3795 | if (ate_extra_colon) { | ||
| 3796 | ate_extra_colon = false; | ||
| 3797 | } else { | ||
| 3798 | ate_extra_colon = p.tok_ids[p.tok_i] == .colon_colon; | ||
| 3799 | p.tok_i += 1; | ||
| 3800 | } | ||
| 3801 | if (!ate_extra_colon) { | ||
| 3802 | if (p.tok_ids[p.tok_i].isStringLiteral() or p.tok_ids[p.tok_i] == .l_bracket) { | ||
| 3803 | while (true) { | ||
| 3804 | try p.asmOperand(&names, &constraints, &exprs); | ||
| 3805 | if (p.eatToken(.comma) == null) break; | ||
| 3806 | } | ||
| 3807 | } | ||
| 3808 | } | ||
| 3809 | } | ||
| 3810 | std.debug.assert(names.items.len == constraints.items.len and constraints.items.len == exprs.items.len); | ||
| 3811 | const num_inputs = names.items.len - num_outputs; | ||
| 3812 | _ = num_inputs; | ||
| 3813 | |||
| 3814 | // Clobbers | ||
| 3815 | if (ate_extra_colon or p.tok_ids[p.tok_i] == .colon or p.tok_ids[p.tok_i] == .colon_colon) { | ||
| 3816 | if (ate_extra_colon) { | ||
| 3817 | ate_extra_colon = false; | ||
| 3818 | } else { | ||
| 3819 | ate_extra_colon = p.tok_ids[p.tok_i] == .colon_colon; | ||
| 3820 | p.tok_i += 1; | ||
| 3821 | } | ||
| 3822 | if (!ate_extra_colon and p.tok_ids[p.tok_i].isStringLiteral()) { | ||
| 3823 | while (true) { | ||
| 3824 | const clobber = try p.asmStr(); | ||
| 3825 | try clobbers.append(clobber.node); | ||
| 3826 | if (p.eatToken(.comma) == null) break; | ||
| 3827 | } | ||
| 3828 | } | ||
| 3829 | } | ||
| 3830 | |||
| 3831 | if (!quals.goto and (p.tok_ids[p.tok_i] != .r_paren or ate_extra_colon)) { | ||
| 3832 | try p.errExtra(.expected_token, p.tok_i, .{ .tok_id = .{ .actual = p.tok_ids[p.tok_i], .expected = .r_paren } }); | ||
| 3833 | return error.ParsingFailed; | ||
| 3834 | } | ||
| 3835 | |||
| 3836 | // Goto labels | ||
| 3837 | var num_labels: u32 = 0; | ||
| 3838 | if (ate_extra_colon or p.tok_ids[p.tok_i] == .colon) { | ||
| 3839 | if (!ate_extra_colon) { | ||
| 3840 | p.tok_i += 1; | ||
| 3841 | } | ||
| 3842 | while (true) { | ||
| 3843 | const ident = (try p.eatIdentifier()) orelse { | ||
| 3844 | try p.err(.expected_identifier); | ||
| 3845 | return error.ParsingFailed; | ||
| 3846 | }; | ||
| 3847 | const ident_str = p.tokSlice(ident); | ||
| 3848 | const label = p.findLabel(ident_str) orelse blk: { | ||
| 3849 | try p.labels.append(.{ .unresolved_goto = ident }); | ||
| 3850 | break :blk ident; | ||
| 3851 | }; | ||
| 3852 | try names.append(ident); | ||
| 3853 | |||
| 3854 | const elem_ty = try p.arena.create(Type); | ||
| 3855 | elem_ty.* = .{ .specifier = .void }; | ||
| 3856 | const result_ty = Type{ .specifier = .pointer, .data = .{ .sub_type = elem_ty } }; | ||
| 3857 | |||
| 3858 | const label_addr_node = try p.addNode(.{ | ||
| 3859 | .tag = .addr_of_label, | ||
| 3860 | .data = .{ .decl_ref = label }, | ||
| 3861 | .ty = result_ty, | ||
| 3862 | }); | ||
| 3863 | try exprs.append(label_addr_node); | ||
| 3864 | |||
| 3865 | num_labels += 1; | ||
| 3866 | if (p.eatToken(.comma) == null) break; | ||
| 3867 | } | ||
| 3868 | } else if (quals.goto) { | ||
| 3869 | try p.errExtra(.expected_token, p.tok_i, .{ .tok_id = .{ .actual = p.tok_ids[p.tok_i], .expected = .colon } }); | ||
| 3870 | return error.ParsingFailed; | ||
| 3871 | } | ||
| 3872 | |||
| 3873 | // TODO: validate and insert into AST | ||
| 3874 | return .none; | ||
| 3875 | } | ||
| 3876 | |||
| 3877 | fn checkAsmStr(p: *Parser, asm_str: Value, tok: TokenIndex) !void { | ||
| 3878 | if (!p.comp.langopts.gnu_asm) { | ||
| 3879 | const str = asm_str.data.bytes; | ||
| 3880 | if (str.len() > 1) { | ||
| 3881 | // Empty string (just a NUL byte) is ok because it does not emit any assembly | ||
| 3882 | try p.errTok(.gnu_asm_disabled, tok); | ||
| 3883 | } | ||
| 3884 | } | ||
| 3885 | } | ||
| 3886 | |||
| 3887 | /// assembly | ||
| 3888 | /// : keyword_asm asmQual* '(' asmStr ')' | ||
| 3889 | /// | keyword_asm asmQual* '(' gnuAsmStmt ')' | ||
| 3890 | /// | keyword_asm msvcAsmStmt | ||
| 3891 | fn assembly(p: *Parser, kind: enum { global, decl_label, stmt }) Error!?NodeIndex { | ||
| 3892 | const asm_tok = p.tok_i; | ||
| 3893 | switch (p.tok_ids[p.tok_i]) { | ||
| 3894 | .keyword_asm => { | ||
| 3895 | try p.err(.extension_token_used); | ||
| 3896 | p.tok_i += 1; | ||
| 3897 | }, | ||
| 3898 | .keyword_asm1, .keyword_asm2 => p.tok_i += 1, | ||
| 3899 | else => return null, | ||
| 3900 | } | ||
| 3901 | |||
| 3902 | if (!p.tok_ids[p.tok_i].canOpenGCCAsmStmt()) { | ||
| 3903 | return p.msvcAsmStmt(); | ||
| 3904 | } | ||
| 3905 | |||
| 3906 | var quals: Tree.GNUAssemblyQualifiers = .{}; | ||
| 3907 | while (true) : (p.tok_i += 1) switch (p.tok_ids[p.tok_i]) { | ||
| 3908 | .keyword_volatile, .keyword_volatile1, .keyword_volatile2 => { | ||
| 3909 | if (kind != .stmt) try p.errStr(.meaningless_asm_qual, p.tok_i, "volatile"); | ||
| 3910 | if (quals.@"volatile") try p.errStr(.duplicate_asm_qual, p.tok_i, "volatile"); | ||
| 3911 | quals.@"volatile" = true; | ||
| 3912 | }, | ||
| 3913 | .keyword_inline, .keyword_inline1, .keyword_inline2 => { | ||
| 3914 | if (kind != .stmt) try p.errStr(.meaningless_asm_qual, p.tok_i, "inline"); | ||
| 3915 | if (quals.@"inline") try p.errStr(.duplicate_asm_qual, p.tok_i, "inline"); | ||
| 3916 | quals.@"inline" = true; | ||
| 3917 | }, | ||
| 3918 | .keyword_goto => { | ||
| 3919 | if (kind != .stmt) try p.errStr(.meaningless_asm_qual, p.tok_i, "goto"); | ||
| 3920 | if (quals.goto) try p.errStr(.duplicate_asm_qual, p.tok_i, "goto"); | ||
| 3921 | quals.goto = true; | ||
| 3922 | }, | ||
| 3923 | else => break, | ||
| 3924 | }; | ||
| 3925 | |||
| 3926 | const l_paren = try p.expectToken(.l_paren); | ||
| 3927 | var result_node: NodeIndex = .none; | ||
| 3928 | switch (kind) { | ||
| 3929 | .decl_label => { | ||
| 3930 | const asm_str = try p.asmStr(); | ||
| 3931 | const str = asm_str.val.data.bytes.trim(1); // remove null-terminator | ||
| 3932 | const attr = Attribute{ .tag = .asm_label, .args = .{ .asm_label = .{ .name = str } }, .syntax = .keyword }; | ||
| 3933 | try p.attr_buf.append(p.gpa, .{ .attr = attr, .tok = asm_tok }); | ||
| 3934 | }, | ||
| 3935 | .global => { | ||
| 3936 | const asm_str = try p.asmStr(); | ||
| 3937 | try p.checkAsmStr(asm_str.val, l_paren); | ||
| 3938 | result_node = try p.addNode(.{ | ||
| 3939 | .tag = .file_scope_asm, | ||
| 3940 | .ty = .{ .specifier = .void }, | ||
| 3941 | .data = .{ .decl = .{ .name = asm_tok, .node = asm_str.node } }, | ||
| 3942 | }); | ||
| 3943 | }, | ||
| 3944 | .stmt => result_node = try p.gnuAsmStmt(quals, l_paren), | ||
| 3945 | } | ||
| 3946 | try p.expectClosing(l_paren, .r_paren); | ||
| 3947 | |||
| 3948 | if (kind != .decl_label) _ = try p.expectToken(.semicolon); | ||
| 3949 | return result_node; | ||
| 3950 | } | ||
| 3951 | |||
| 3952 | /// Same as stringLiteral but errors on unicode and wide string literals | ||
| 3953 | fn asmStr(p: *Parser) Error!Result { | ||
| 3954 | var i = p.tok_i; | ||
| 3955 | while (true) : (i += 1) switch (p.tok_ids[i]) { | ||
| 3956 | .string_literal, .unterminated_string_literal => {}, | ||
| 3957 | .string_literal_utf_16, .string_literal_utf_8, .string_literal_utf_32 => { | ||
| 3958 | try p.errStr(.invalid_asm_str, p.tok_i, "unicode"); | ||
| 3959 | return error.ParsingFailed; | ||
| 3960 | }, | ||
| 3961 | .string_literal_wide => { | ||
| 3962 | try p.errStr(.invalid_asm_str, p.tok_i, "wide"); | ||
| 3963 | return error.ParsingFailed; | ||
| 3964 | }, | ||
| 3965 | else => break, | ||
| 3966 | }; | ||
| 3967 | return try p.stringLiteral(); | ||
| 3968 | } | ||
| 3969 | |||
| 3970 | // ====== statements ====== | ||
| 3971 | |||
| 3972 | /// stmt | ||
| 3973 | /// : labeledStmt | ||
| 3974 | /// | compoundStmt | ||
| 3975 | /// | keyword_if '(' expr ')' stmt (keyword_else stmt)? | ||
| 3976 | /// | keyword_switch '(' expr ')' stmt | ||
| 3977 | /// | keyword_while '(' expr ')' stmt | ||
| 3978 | /// | keyword_do stmt while '(' expr ')' ';' | ||
| 3979 | /// | keyword_for '(' (decl | expr? ';') expr? ';' expr? ')' stmt | ||
| 3980 | /// | keyword_goto (IDENTIFIER | ('*' expr)) ';' | ||
| 3981 | /// | keyword_continue ';' | ||
| 3982 | /// | keyword_break ';' | ||
| 3983 | /// | keyword_return expr? ';' | ||
| 3984 | /// | assembly ';' | ||
| 3985 | /// | expr? ';' | ||
| 3986 | fn stmt(p: *Parser) Error!NodeIndex { | ||
| 3987 | if (try p.labeledStmt()) |some| return some; | ||
| 3988 | if (try p.compoundStmt(false, null)) |some| return some; | ||
| 3989 | if (p.eatToken(.keyword_if)) |_| { | ||
| 3990 | const l_paren = try p.expectToken(.l_paren); | ||
| 3991 | const cond_tok = p.tok_i; | ||
| 3992 | var cond = try p.expr(); | ||
| 3993 | try cond.expect(p); | ||
| 3994 | try cond.lvalConversion(p); | ||
| 3995 | try cond.usualUnaryConversion(p, cond_tok); | ||
| 3996 | if (!cond.ty.isScalar()) | ||
| 3997 | try p.errStr(.statement_scalar, l_paren + 1, try p.typeStr(cond.ty)); | ||
| 3998 | try cond.saveValue(p); | ||
| 3999 | try p.expectClosing(l_paren, .r_paren); | ||
| 4000 | |||
| 4001 | const then = try p.stmt(); | ||
| 4002 | const @"else" = if (p.eatToken(.keyword_else)) |_| try p.stmt() else .none; | ||
| 4003 | |||
| 4004 | if (then != .none and @"else" != .none) | ||
| 4005 | return try p.addNode(.{ | ||
| 4006 | .tag = .if_then_else_stmt, | ||
| 4007 | .data = .{ .if3 = .{ .cond = cond.node, .body = (try p.addList(&.{ then, @"else" })).start } }, | ||
| 4008 | }) | ||
| 4009 | else | ||
| 4010 | return try p.addNode(.{ | ||
| 4011 | .tag = .if_then_stmt, | ||
| 4012 | .data = .{ .bin = .{ .lhs = cond.node, .rhs = then } }, | ||
| 4013 | }); | ||
| 4014 | } | ||
| 4015 | if (p.eatToken(.keyword_switch)) |_| { | ||
| 4016 | const l_paren = try p.expectToken(.l_paren); | ||
| 4017 | const cond_tok = p.tok_i; | ||
| 4018 | var cond = try p.expr(); | ||
| 4019 | try cond.expect(p); | ||
| 4020 | try cond.lvalConversion(p); | ||
| 4021 | try cond.usualUnaryConversion(p, cond_tok); | ||
| 4022 | |||
| 4023 | if (!cond.ty.isInt()) | ||
| 4024 | try p.errStr(.statement_int, l_paren + 1, try p.typeStr(cond.ty)); | ||
| 4025 | try cond.saveValue(p); | ||
| 4026 | try p.expectClosing(l_paren, .r_paren); | ||
| 4027 | |||
| 4028 | const old_switch = p.@"switch"; | ||
| 4029 | var @"switch" = Switch{ | ||
| 4030 | .ranges = std.ArrayList(Switch.Range).init(p.gpa), | ||
| 4031 | .ty = cond.ty, | ||
| 4032 | }; | ||
| 4033 | p.@"switch" = &@"switch"; | ||
| 4034 | defer { | ||
| 4035 | @"switch".ranges.deinit(); | ||
| 4036 | p.@"switch" = old_switch; | ||
| 4037 | } | ||
| 4038 | |||
| 4039 | const body = try p.stmt(); | ||
| 4040 | |||
| 4041 | return try p.addNode(.{ | ||
| 4042 | .tag = .switch_stmt, | ||
| 4043 | .data = .{ .bin = .{ .lhs = cond.node, .rhs = body } }, | ||
| 4044 | }); | ||
| 4045 | } | ||
| 4046 | if (p.eatToken(.keyword_while)) |_| { | ||
| 4047 | const l_paren = try p.expectToken(.l_paren); | ||
| 4048 | const cond_tok = p.tok_i; | ||
| 4049 | var cond = try p.expr(); | ||
| 4050 | try cond.expect(p); | ||
| 4051 | try cond.lvalConversion(p); | ||
| 4052 | try cond.usualUnaryConversion(p, cond_tok); | ||
| 4053 | if (!cond.ty.isScalar()) | ||
| 4054 | try p.errStr(.statement_scalar, l_paren + 1, try p.typeStr(cond.ty)); | ||
| 4055 | try cond.saveValue(p); | ||
| 4056 | try p.expectClosing(l_paren, .r_paren); | ||
| 4057 | |||
| 4058 | const body = body: { | ||
| 4059 | const old_loop = p.in_loop; | ||
| 4060 | p.in_loop = true; | ||
| 4061 | defer p.in_loop = old_loop; | ||
| 4062 | break :body try p.stmt(); | ||
| 4063 | }; | ||
| 4064 | |||
| 4065 | return try p.addNode(.{ | ||
| 4066 | .tag = .while_stmt, | ||
| 4067 | .data = .{ .bin = .{ .lhs = cond.node, .rhs = body } }, | ||
| 4068 | }); | ||
| 4069 | } | ||
| 4070 | if (p.eatToken(.keyword_do)) |_| { | ||
| 4071 | const body = body: { | ||
| 4072 | const old_loop = p.in_loop; | ||
| 4073 | p.in_loop = true; | ||
| 4074 | defer p.in_loop = old_loop; | ||
| 4075 | break :body try p.stmt(); | ||
| 4076 | }; | ||
| 4077 | |||
| 4078 | _ = try p.expectToken(.keyword_while); | ||
| 4079 | const l_paren = try p.expectToken(.l_paren); | ||
| 4080 | const cond_tok = p.tok_i; | ||
| 4081 | var cond = try p.expr(); | ||
| 4082 | try cond.expect(p); | ||
| 4083 | try cond.lvalConversion(p); | ||
| 4084 | try cond.usualUnaryConversion(p, cond_tok); | ||
| 4085 | |||
| 4086 | if (!cond.ty.isScalar()) | ||
| 4087 | try p.errStr(.statement_scalar, l_paren + 1, try p.typeStr(cond.ty)); | ||
| 4088 | try cond.saveValue(p); | ||
| 4089 | try p.expectClosing(l_paren, .r_paren); | ||
| 4090 | |||
| 4091 | _ = try p.expectToken(.semicolon); | ||
| 4092 | return try p.addNode(.{ | ||
| 4093 | .tag = .do_while_stmt, | ||
| 4094 | .data = .{ .bin = .{ .lhs = cond.node, .rhs = body } }, | ||
| 4095 | }); | ||
| 4096 | } | ||
| 4097 | if (p.eatToken(.keyword_for)) |_| { | ||
| 4098 | try p.syms.pushScope(p); | ||
| 4099 | defer p.syms.popScope(); | ||
| 4100 | const decl_buf_top = p.decl_buf.items.len; | ||
| 4101 | defer p.decl_buf.items.len = decl_buf_top; | ||
| 4102 | |||
| 4103 | const l_paren = try p.expectToken(.l_paren); | ||
| 4104 | const got_decl = try p.decl(); | ||
| 4105 | |||
| 4106 | // for (init | ||
| 4107 | const init_start = p.tok_i; | ||
| 4108 | var err_start = p.comp.diag.list.items.len; | ||
| 4109 | var init = if (!got_decl) try p.expr() else Result{}; | ||
| 4110 | try init.saveValue(p); | ||
| 4111 | try init.maybeWarnUnused(p, init_start, err_start); | ||
| 4112 | if (!got_decl) _ = try p.expectToken(.semicolon); | ||
| 4113 | |||
| 4114 | // for (init; cond | ||
| 4115 | const cond_tok = p.tok_i; | ||
| 4116 | var cond = try p.expr(); | ||
| 4117 | if (cond.node != .none) { | ||
| 4118 | try cond.lvalConversion(p); | ||
| 4119 | try cond.usualUnaryConversion(p, cond_tok); | ||
| 4120 | if (!cond.ty.isScalar()) | ||
| 4121 | try p.errStr(.statement_scalar, l_paren + 1, try p.typeStr(cond.ty)); | ||
| 4122 | } | ||
| 4123 | try cond.saveValue(p); | ||
| 4124 | _ = try p.expectToken(.semicolon); | ||
| 4125 | |||
| 4126 | // for (init; cond; incr | ||
| 4127 | const incr_start = p.tok_i; | ||
| 4128 | err_start = p.comp.diag.list.items.len; | ||
| 4129 | var incr = try p.expr(); | ||
| 4130 | try incr.maybeWarnUnused(p, incr_start, err_start); | ||
| 4131 | try incr.saveValue(p); | ||
| 4132 | try p.expectClosing(l_paren, .r_paren); | ||
| 4133 | |||
| 4134 | const body = body: { | ||
| 4135 | const old_loop = p.in_loop; | ||
| 4136 | p.in_loop = true; | ||
| 4137 | defer p.in_loop = old_loop; | ||
| 4138 | break :body try p.stmt(); | ||
| 4139 | }; | ||
| 4140 | |||
| 4141 | if (got_decl) { | ||
| 4142 | const start = (try p.addList(p.decl_buf.items[decl_buf_top..])).start; | ||
| 4143 | const end = (try p.addList(&.{ cond.node, incr.node, body })).end; | ||
| 4144 | |||
| 4145 | return try p.addNode(.{ | ||
| 4146 | .tag = .for_decl_stmt, | ||
| 4147 | .data = .{ .range = .{ .start = start, .end = end } }, | ||
| 4148 | }); | ||
| 4149 | } else if (init.node == .none and cond.node == .none and incr.node == .none) { | ||
| 4150 | return try p.addNode(.{ | ||
| 4151 | .tag = .forever_stmt, | ||
| 4152 | .data = .{ .un = body }, | ||
| 4153 | }); | ||
| 4154 | } else return try p.addNode(.{ .tag = .for_stmt, .data = .{ .if3 = .{ | ||
| 4155 | .cond = body, | ||
| 4156 | .body = (try p.addList(&.{ init.node, cond.node, incr.node })).start, | ||
| 4157 | } } }); | ||
| 4158 | } | ||
| 4159 | if (p.eatToken(.keyword_goto)) |goto_tok| { | ||
| 4160 | if (p.eatToken(.asterisk)) |_| { | ||
| 4161 | const expr_tok = p.tok_i; | ||
| 4162 | var e = try p.expr(); | ||
| 4163 | try e.expect(p); | ||
| 4164 | try e.lvalConversion(p); | ||
| 4165 | p.computed_goto_tok = p.computed_goto_tok orelse goto_tok; | ||
| 4166 | if (!e.ty.isPtr()) { | ||
| 4167 | const elem_ty = try p.arena.create(Type); | ||
| 4168 | elem_ty.* = .{ .specifier = .void, .qual = .{ .@"const" = true } }; | ||
| 4169 | const result_ty = Type{ | ||
| 4170 | .specifier = .pointer, | ||
| 4171 | .data = .{ .sub_type = elem_ty }, | ||
| 4172 | }; | ||
| 4173 | if (!e.ty.isInt()) { | ||
| 4174 | try p.errStr(.incompatible_arg, expr_tok, try p.typePairStrExtra(e.ty, " to parameter of incompatible type ", result_ty)); | ||
| 4175 | return error.ParsingFailed; | ||
| 4176 | } | ||
| 4177 | if (e.val.isZero()) { | ||
| 4178 | try e.nullCast(p, result_ty); | ||
| 4179 | } else { | ||
| 4180 | try p.errStr(.implicit_int_to_ptr, expr_tok, try p.typePairStrExtra(e.ty, " to ", result_ty)); | ||
| 4181 | try e.ptrCast(p, result_ty); | ||
| 4182 | } | ||
| 4183 | } | ||
| 4184 | |||
| 4185 | try e.un(p, .computed_goto_stmt); | ||
| 4186 | _ = try p.expectToken(.semicolon); | ||
| 4187 | return e.node; | ||
| 4188 | } | ||
| 4189 | const name_tok = try p.expectIdentifier(); | ||
| 4190 | const str = p.tokSlice(name_tok); | ||
| 4191 | if (p.findLabel(str) == null) { | ||
| 4192 | try p.labels.append(.{ .unresolved_goto = name_tok }); | ||
| 4193 | } | ||
| 4194 | _ = try p.expectToken(.semicolon); | ||
| 4195 | return try p.addNode(.{ | ||
| 4196 | .tag = .goto_stmt, | ||
| 4197 | .data = .{ .decl_ref = name_tok }, | ||
| 4198 | }); | ||
| 4199 | } | ||
| 4200 | if (p.eatToken(.keyword_continue)) |cont| { | ||
| 4201 | if (!p.in_loop) try p.errTok(.continue_not_in_loop, cont); | ||
| 4202 | _ = try p.expectToken(.semicolon); | ||
| 4203 | return try p.addNode(.{ .tag = .continue_stmt, .data = undefined }); | ||
| 4204 | } | ||
| 4205 | if (p.eatToken(.keyword_break)) |br| { | ||
| 4206 | if (!p.in_loop and p.@"switch" == null) try p.errTok(.break_not_in_loop_or_switch, br); | ||
| 4207 | _ = try p.expectToken(.semicolon); | ||
| 4208 | return try p.addNode(.{ .tag = .break_stmt, .data = undefined }); | ||
| 4209 | } | ||
| 4210 | if (try p.returnStmt()) |some| return some; | ||
| 4211 | if (try p.assembly(.stmt)) |some| return some; | ||
| 4212 | |||
| 4213 | const expr_start = p.tok_i; | ||
| 4214 | const err_start = p.comp.diag.list.items.len; | ||
| 4215 | |||
| 4216 | const e = try p.expr(); | ||
| 4217 | if (e.node != .none) { | ||
| 4218 | _ = try p.expectToken(.semicolon); | ||
| 4219 | try e.maybeWarnUnused(p, expr_start, err_start); | ||
| 4220 | return e.node; | ||
| 4221 | } | ||
| 4222 | |||
| 4223 | const attr_buf_top = p.attr_buf.len; | ||
| 4224 | defer p.attr_buf.len = attr_buf_top; | ||
| 4225 | try p.attributeSpecifier(); | ||
| 4226 | |||
| 4227 | if (p.eatToken(.semicolon)) |_| { | ||
| 4228 | var null_node: Tree.Node = .{ .tag = .null_stmt, .data = undefined }; | ||
| 4229 | null_node.ty = try Attribute.applyStatementAttributes(p, null_node.ty, expr_start, attr_buf_top); | ||
| 4230 | return p.addNode(null_node); | ||
| 4231 | } | ||
| 4232 | |||
| 4233 | try p.err(.expected_stmt); | ||
| 4234 | return error.ParsingFailed; | ||
| 4235 | } | ||
| 4236 | |||
| 4237 | /// labeledStmt | ||
| 4238 | /// : IDENTIFIER ':' stmt | ||
| 4239 | /// | keyword_case integerConstExpr ':' stmt | ||
| 4240 | /// | keyword_default ':' stmt | ||
| 4241 | fn labeledStmt(p: *Parser) Error!?NodeIndex { | ||
| 4242 | if ((p.tok_ids[p.tok_i] == .identifier or p.tok_ids[p.tok_i] == .extended_identifier) and p.tok_ids[p.tok_i + 1] == .colon) { | ||
| 4243 | const name_tok = p.expectIdentifier() catch unreachable; | ||
| 4244 | const str = p.tokSlice(name_tok); | ||
| 4245 | if (p.findLabel(str)) |some| { | ||
| 4246 | try p.errStr(.duplicate_label, name_tok, str); | ||
| 4247 | try p.errStr(.previous_label, some, str); | ||
| 4248 | } else { | ||
| 4249 | p.label_count += 1; | ||
| 4250 | try p.labels.append(.{ .label = name_tok }); | ||
| 4251 | var i: usize = 0; | ||
| 4252 | while (i < p.labels.items.len) { | ||
| 4253 | if (p.labels.items[i] == .unresolved_goto and | ||
| 4254 | mem.eql(u8, p.tokSlice(p.labels.items[i].unresolved_goto), str)) | ||
| 4255 | { | ||
| 4256 | _ = p.labels.swapRemove(i); | ||
| 4257 | } else i += 1; | ||
| 4258 | } | ||
| 4259 | } | ||
| 4260 | |||
| 4261 | p.tok_i += 1; | ||
| 4262 | const attr_buf_top = p.attr_buf.len; | ||
| 4263 | defer p.attr_buf.len = attr_buf_top; | ||
| 4264 | try p.attributeSpecifier(); | ||
| 4265 | |||
| 4266 | var labeled_stmt = Tree.Node{ | ||
| 4267 | .tag = .labeled_stmt, | ||
| 4268 | .data = .{ .decl = .{ .name = name_tok, .node = try p.stmt() } }, | ||
| 4269 | }; | ||
| 4270 | labeled_stmt.ty = try Attribute.applyLabelAttributes(p, labeled_stmt.ty, attr_buf_top); | ||
| 4271 | return try p.addNode(labeled_stmt); | ||
| 4272 | } else if (p.eatToken(.keyword_case)) |case| { | ||
| 4273 | const first_item = try p.integerConstExpr(.gnu_folding_extension); | ||
| 4274 | const ellipsis = p.tok_i; | ||
| 4275 | const second_item = if (p.eatToken(.ellipsis) != null) blk: { | ||
| 4276 | try p.errTok(.gnu_switch_range, ellipsis); | ||
| 4277 | break :blk try p.integerConstExpr(.gnu_folding_extension); | ||
| 4278 | } else null; | ||
| 4279 | _ = try p.expectToken(.colon); | ||
| 4280 | |||
| 4281 | if (p.@"switch") |some| check: { | ||
| 4282 | if (some.ty.hasIncompleteSize()) break :check; // error already reported for incomplete size | ||
| 4283 | |||
| 4284 | const first = first_item.val; | ||
| 4285 | const last = if (second_item) |second| second.val else first; | ||
| 4286 | if (first.tag == .unavailable) { | ||
| 4287 | try p.errTok(.case_val_unavailable, case + 1); | ||
| 4288 | break :check; | ||
| 4289 | } else if (last.tag == .unavailable) { | ||
| 4290 | try p.errTok(.case_val_unavailable, ellipsis + 1); | ||
| 4291 | break :check; | ||
| 4292 | } else if (last.compare(.lt, first, some.ty, p.comp)) { | ||
| 4293 | try p.errTok(.empty_case_range, case + 1); | ||
| 4294 | break :check; | ||
| 4295 | } | ||
| 4296 | |||
| 4297 | // TODO cast to target type | ||
| 4298 | const prev = (try some.add(p.comp, first, last, case + 1)) orelse break :check; | ||
| 4299 | |||
| 4300 | // TODO check which value was already handled | ||
| 4301 | if (some.ty.isUnsignedInt(p.comp)) { | ||
| 4302 | try p.errExtra(.duplicate_switch_case_unsigned, case + 1, .{ | ||
| 4303 | .unsigned = first.data.int, | ||
| 4304 | }); | ||
| 4305 | } else { | ||
| 4306 | try p.errExtra(.duplicate_switch_case_signed, case + 1, .{ | ||
| 4307 | .signed = first.signExtend(some.ty, p.comp), | ||
| 4308 | }); | ||
| 4309 | } | ||
| 4310 | try p.errTok(.previous_case, prev.tok); | ||
| 4311 | } else { | ||
| 4312 | try p.errStr(.case_not_in_switch, case, "case"); | ||
| 4313 | } | ||
| 4314 | |||
| 4315 | const s = try p.stmt(); | ||
| 4316 | if (second_item) |some| return try p.addNode(.{ | ||
| 4317 | .tag = .case_range_stmt, | ||
| 4318 | .data = .{ .if3 = .{ .cond = s, .body = (try p.addList(&.{ first_item.node, some.node })).start } }, | ||
| 4319 | }) else return try p.addNode(.{ | ||
| 4320 | .tag = .case_stmt, | ||
| 4321 | .data = .{ .bin = .{ .lhs = first_item.node, .rhs = s } }, | ||
| 4322 | }); | ||
| 4323 | } else if (p.eatToken(.keyword_default)) |default| { | ||
| 4324 | _ = try p.expectToken(.colon); | ||
| 4325 | const s = try p.stmt(); | ||
| 4326 | const node = try p.addNode(.{ | ||
| 4327 | .tag = .default_stmt, | ||
| 4328 | .data = .{ .un = s }, | ||
| 4329 | }); | ||
| 4330 | const @"switch" = p.@"switch" orelse { | ||
| 4331 | try p.errStr(.case_not_in_switch, default, "default"); | ||
| 4332 | return node; | ||
| 4333 | }; | ||
| 4334 | if (@"switch".default) |previous| { | ||
| 4335 | try p.errTok(.multiple_default, default); | ||
| 4336 | try p.errTok(.previous_case, previous); | ||
| 4337 | } else { | ||
| 4338 | @"switch".default = default; | ||
| 4339 | } | ||
| 4340 | return node; | ||
| 4341 | } else return null; | ||
| 4342 | } | ||
| 4343 | |||
| 4344 | const StmtExprState = struct { | ||
| 4345 | last_expr_tok: TokenIndex = 0, | ||
| 4346 | last_expr_res: Result = .{ .ty = .{ .specifier = .void } }, | ||
| 4347 | }; | ||
| 4348 | |||
| 4349 | /// compoundStmt : '{' ( decl | keyword_extension decl | staticAssert | stmt)* '}' | ||
| 4350 | fn compoundStmt(p: *Parser, is_fn_body: bool, stmt_expr_state: ?*StmtExprState) Error!?NodeIndex { | ||
| 4351 | const l_brace = p.eatToken(.l_brace) orelse return null; | ||
| 4352 | |||
| 4353 | const decl_buf_top = p.decl_buf.items.len; | ||
| 4354 | defer p.decl_buf.items.len = decl_buf_top; | ||
| 4355 | |||
| 4356 | // the parameters of a function are in the same scope as the body | ||
| 4357 | if (!is_fn_body) try p.syms.pushScope(p); | ||
| 4358 | defer if (!is_fn_body) p.syms.popScope(); | ||
| 4359 | |||
| 4360 | var noreturn_index: ?TokenIndex = null; | ||
| 4361 | var noreturn_label_count: u32 = 0; | ||
| 4362 | |||
| 4363 | while (p.eatToken(.r_brace) == null) : (_ = try p.pragma()) { | ||
| 4364 | if (stmt_expr_state) |state| state.* = .{}; | ||
| 4365 | if (try p.parseOrNextStmt(staticAssert, l_brace)) continue; | ||
| 4366 | if (try p.parseOrNextStmt(decl, l_brace)) continue; | ||
| 4367 | if (p.eatToken(.keyword_extension)) |ext| { | ||
| 4368 | const saved_extension = p.extension_suppressed; | ||
| 4369 | defer p.extension_suppressed = saved_extension; | ||
| 4370 | p.extension_suppressed = true; | ||
| 4371 | |||
| 4372 | if (try p.parseOrNextStmt(decl, l_brace)) continue; | ||
| 4373 | p.tok_i = ext; | ||
| 4374 | } | ||
| 4375 | const stmt_tok = p.tok_i; | ||
| 4376 | const s = p.stmt() catch |er| switch (er) { | ||
| 4377 | error.ParsingFailed => { | ||
| 4378 | try p.nextStmt(l_brace); | ||
| 4379 | continue; | ||
| 4380 | }, | ||
| 4381 | else => |e| return e, | ||
| 4382 | }; | ||
| 4383 | if (s == .none) continue; | ||
| 4384 | if (stmt_expr_state) |state| { | ||
| 4385 | state.* = .{ | ||
| 4386 | .last_expr_tok = stmt_tok, | ||
| 4387 | .last_expr_res = .{ | ||
| 4388 | .node = s, | ||
| 4389 | .ty = p.nodes.items(.ty)[@intFromEnum(s)], | ||
| 4390 | }, | ||
| 4391 | }; | ||
| 4392 | } | ||
| 4393 | try p.decl_buf.append(s); | ||
| 4394 | |||
| 4395 | if (noreturn_index == null and p.nodeIsNoreturn(s) == .yes) { | ||
| 4396 | noreturn_index = p.tok_i; | ||
| 4397 | noreturn_label_count = p.label_count; | ||
| 4398 | } | ||
| 4399 | switch (p.nodes.items(.tag)[@intFromEnum(s)]) { | ||
| 4400 | .case_stmt, .default_stmt, .labeled_stmt => noreturn_index = null, | ||
| 4401 | else => {}, | ||
| 4402 | } | ||
| 4403 | } | ||
| 4404 | |||
| 4405 | if (noreturn_index) |some| { | ||
| 4406 | // if new labels were defined we cannot be certain that the code is unreachable | ||
| 4407 | if (some != p.tok_i - 1 and noreturn_label_count == p.label_count) try p.errTok(.unreachable_code, some); | ||
| 4408 | } | ||
| 4409 | if (is_fn_body) { | ||
| 4410 | const last_noreturn = if (p.decl_buf.items.len == decl_buf_top) | ||
| 4411 | .no | ||
| 4412 | else | ||
| 4413 | p.nodeIsNoreturn(p.decl_buf.items[p.decl_buf.items.len - 1]); | ||
| 4414 | |||
| 4415 | if (last_noreturn != .yes) { | ||
| 4416 | const ret_ty = p.func.ty.?.returnType(); | ||
| 4417 | var return_zero = false; | ||
| 4418 | if (last_noreturn == .no and !ret_ty.is(.void) and !ret_ty.isFunc() and !ret_ty.isArray()) { | ||
| 4419 | const func_name = p.tokSlice(p.func.name); | ||
| 4420 | const interned_name = try p.comp.intern(func_name); | ||
| 4421 | if (interned_name == p.string_ids.main_id and ret_ty.is(.int)) { | ||
| 4422 | return_zero = true; | ||
| 4423 | } else { | ||
| 4424 | try p.errStr(.func_does_not_return, p.tok_i - 1, func_name); | ||
| 4425 | } | ||
| 4426 | } | ||
| 4427 | try p.decl_buf.append(try p.addNode(.{ .tag = .implicit_return, .ty = p.func.ty.?.returnType(), .data = .{ .return_zero = return_zero } })); | ||
| 4428 | } | ||
| 4429 | if (p.func.ident) |some| try p.decl_buf.insert(decl_buf_top, some.node); | ||
| 4430 | if (p.func.pretty_ident) |some| try p.decl_buf.insert(decl_buf_top, some.node); | ||
| 4431 | } | ||
| 4432 | |||
| 4433 | var node: Tree.Node = .{ | ||
| 4434 | .tag = .compound_stmt_two, | ||
| 4435 | .data = .{ .bin = .{ .lhs = .none, .rhs = .none } }, | ||
| 4436 | }; | ||
| 4437 | const statements = p.decl_buf.items[decl_buf_top..]; | ||
| 4438 | switch (statements.len) { | ||
| 4439 | 0 => {}, | ||
| 4440 | 1 => node.data = .{ .bin = .{ .lhs = statements[0], .rhs = .none } }, | ||
| 4441 | 2 => node.data = .{ .bin = .{ .lhs = statements[0], .rhs = statements[1] } }, | ||
| 4442 | else => { | ||
| 4443 | node.tag = .compound_stmt; | ||
| 4444 | node.data = .{ .range = try p.addList(statements) }; | ||
| 4445 | }, | ||
| 4446 | } | ||
| 4447 | return try p.addNode(node); | ||
| 4448 | } | ||
| 4449 | |||
| 4450 | const NoreturnKind = enum { no, yes, complex }; | ||
| 4451 | |||
| 4452 | fn nodeIsNoreturn(p: *Parser, node: NodeIndex) NoreturnKind { | ||
| 4453 | switch (p.nodes.items(.tag)[@intFromEnum(node)]) { | ||
| 4454 | .break_stmt, .continue_stmt, .return_stmt => return .yes, | ||
| 4455 | .if_then_else_stmt => { | ||
| 4456 | const data = p.data.items[p.nodes.items(.data)[@intFromEnum(node)].if3.body..]; | ||
| 4457 | const then_type = p.nodeIsNoreturn(data[0]); | ||
| 4458 | const else_type = p.nodeIsNoreturn(data[1]); | ||
| 4459 | if (then_type == .complex or else_type == .complex) return .complex; | ||
| 4460 | if (then_type == .yes and else_type == .yes) return .yes; | ||
| 4461 | return .no; | ||
| 4462 | }, | ||
| 4463 | .compound_stmt_two => { | ||
| 4464 | const data = p.nodes.items(.data)[@intFromEnum(node)]; | ||
| 4465 | if (data.bin.rhs != .none) return p.nodeIsNoreturn(data.bin.rhs); | ||
| 4466 | if (data.bin.lhs != .none) return p.nodeIsNoreturn(data.bin.lhs); | ||
| 4467 | return .no; | ||
| 4468 | }, | ||
| 4469 | .compound_stmt => { | ||
| 4470 | const data = p.nodes.items(.data)[@intFromEnum(node)]; | ||
| 4471 | return p.nodeIsNoreturn(p.data.items[data.range.end - 1]); | ||
| 4472 | }, | ||
| 4473 | .labeled_stmt => { | ||
| 4474 | const data = p.nodes.items(.data)[@intFromEnum(node)]; | ||
| 4475 | return p.nodeIsNoreturn(data.decl.node); | ||
| 4476 | }, | ||
| 4477 | .switch_stmt => { | ||
| 4478 | const data = p.nodes.items(.data)[@intFromEnum(node)]; | ||
| 4479 | if (data.bin.rhs == .none) return .complex; | ||
| 4480 | if (p.nodeIsNoreturn(data.bin.rhs) == .yes) return .yes; | ||
| 4481 | return .complex; | ||
| 4482 | }, | ||
| 4483 | else => return .no, | ||
| 4484 | } | ||
| 4485 | } | ||
| 4486 | |||
| 4487 | fn parseOrNextStmt(p: *Parser, comptime func: fn (*Parser) Error!bool, l_brace: TokenIndex) !bool { | ||
| 4488 | return func(p) catch |er| switch (er) { | ||
| 4489 | error.ParsingFailed => { | ||
| 4490 | try p.nextStmt(l_brace); | ||
| 4491 | return true; | ||
| 4492 | }, | ||
| 4493 | else => |e| return e, | ||
| 4494 | }; | ||
| 4495 | } | ||
| 4496 | |||
| 4497 | fn nextStmt(p: *Parser, l_brace: TokenIndex) !void { | ||
| 4498 | var parens: u32 = 0; | ||
| 4499 | while (p.tok_i < p.tok_ids.len) : (p.tok_i += 1) { | ||
| 4500 | switch (p.tok_ids[p.tok_i]) { | ||
| 4501 | .l_paren, .l_brace, .l_bracket => parens += 1, | ||
| 4502 | .r_paren, .r_bracket => if (parens != 0) { | ||
| 4503 | parens -= 1; | ||
| 4504 | }, | ||
| 4505 | .r_brace => if (parens == 0) | ||
| 4506 | return | ||
| 4507 | else { | ||
| 4508 | parens -= 1; | ||
| 4509 | }, | ||
| 4510 | .semicolon, | ||
| 4511 | .keyword_for, | ||
| 4512 | .keyword_while, | ||
| 4513 | .keyword_do, | ||
| 4514 | .keyword_if, | ||
| 4515 | .keyword_goto, | ||
| 4516 | .keyword_switch, | ||
| 4517 | .keyword_case, | ||
| 4518 | .keyword_default, | ||
| 4519 | .keyword_continue, | ||
| 4520 | .keyword_break, | ||
| 4521 | .keyword_return, | ||
| 4522 | .keyword_typedef, | ||
| 4523 | .keyword_extern, | ||
| 4524 | .keyword_static, | ||
| 4525 | .keyword_auto, | ||
| 4526 | .keyword_register, | ||
| 4527 | .keyword_thread_local, | ||
| 4528 | .keyword_c23_thread_local, | ||
| 4529 | .keyword_inline, | ||
| 4530 | .keyword_inline1, | ||
| 4531 | .keyword_inline2, | ||
| 4532 | .keyword_noreturn, | ||
| 4533 | .keyword_void, | ||
| 4534 | .keyword_bool, | ||
| 4535 | .keyword_c23_bool, | ||
| 4536 | .keyword_char, | ||
| 4537 | .keyword_short, | ||
| 4538 | .keyword_int, | ||
| 4539 | .keyword_long, | ||
| 4540 | .keyword_signed, | ||
| 4541 | .keyword_unsigned, | ||
| 4542 | .keyword_float, | ||
| 4543 | .keyword_double, | ||
| 4544 | .keyword_complex, | ||
| 4545 | .keyword_atomic, | ||
| 4546 | .keyword_enum, | ||
| 4547 | .keyword_struct, | ||
| 4548 | .keyword_union, | ||
| 4549 | .keyword_alignas, | ||
| 4550 | .keyword_c23_alignas, | ||
| 4551 | .keyword_typeof, | ||
| 4552 | .keyword_typeof1, | ||
| 4553 | .keyword_typeof2, | ||
| 4554 | .keyword_extension, | ||
| 4555 | => if (parens == 0) return, | ||
| 4556 | .keyword_pragma => p.skipToPragmaSentinel(), | ||
| 4557 | else => {}, | ||
| 4558 | } | ||
| 4559 | } | ||
| 4560 | p.tok_i -= 1; // So we can consume EOF | ||
| 4561 | try p.expectClosing(l_brace, .r_brace); | ||
| 4562 | unreachable; | ||
| 4563 | } | ||
| 4564 | |||
| 4565 | fn returnStmt(p: *Parser) Error!?NodeIndex { | ||
| 4566 | const ret_tok = p.eatToken(.keyword_return) orelse return null; | ||
| 4567 | |||
| 4568 | const e_tok = p.tok_i; | ||
| 4569 | var e = try p.expr(); | ||
| 4570 | _ = try p.expectToken(.semicolon); | ||
| 4571 | const ret_ty = p.func.ty.?.returnType(); | ||
| 4572 | |||
| 4573 | if (p.func.ty.?.hasAttribute(.noreturn)) { | ||
| 4574 | try p.errStr(.invalid_noreturn, e_tok, p.tokSlice(p.func.name)); | ||
| 4575 | } | ||
| 4576 | |||
| 4577 | if (e.node == .none) { | ||
| 4578 | if (!ret_ty.is(.void)) try p.errStr(.func_should_return, ret_tok, p.tokSlice(p.func.name)); | ||
| 4579 | return try p.addNode(.{ .tag = .return_stmt, .data = .{ .un = e.node } }); | ||
| 4580 | } else if (ret_ty.is(.void)) { | ||
| 4581 | try p.errStr(.void_func_returns_value, e_tok, p.tokSlice(p.func.name)); | ||
| 4582 | return try p.addNode(.{ .tag = .return_stmt, .data = .{ .un = e.node } }); | ||
| 4583 | } | ||
| 4584 | |||
| 4585 | try e.lvalConversion(p); | ||
| 4586 | try e.coerce(p, ret_ty, e_tok, .ret); | ||
| 4587 | |||
| 4588 | try e.saveValue(p); | ||
| 4589 | return try p.addNode(.{ .tag = .return_stmt, .data = .{ .un = e.node } }); | ||
| 4590 | } | ||
| 4591 | |||
| 4592 | // ====== expressions ====== | ||
| 4593 | |||
| 4594 | pub fn macroExpr(p: *Parser) Compilation.Error!bool { | ||
| 4595 | const res = p.condExpr() catch |e| switch (e) { | ||
| 4596 | error.OutOfMemory => return error.OutOfMemory, | ||
| 4597 | error.FatalError => return error.FatalError, | ||
| 4598 | error.ParsingFailed => return false, | ||
| 4599 | }; | ||
| 4600 | if (res.val.tag == .unavailable) { | ||
| 4601 | try p.errTok(.expected_expr, p.tok_i); | ||
| 4602 | return false; | ||
| 4603 | } | ||
| 4604 | return res.val.getBool(); | ||
| 4605 | } | ||
| 4606 | |||
| 4607 | const CallExpr = union(enum) { | ||
| 4608 | standard: NodeIndex, | ||
| 4609 | builtin: struct { | ||
| 4610 | node: NodeIndex, | ||
| 4611 | tag: Builtin.Tag, | ||
| 4612 | }, | ||
| 4613 | |||
| 4614 | fn init(p: *Parser, call_node: NodeIndex, func_node: NodeIndex) CallExpr { | ||
| 4615 | if (p.getNode(call_node, .builtin_call_expr_one)) |node| { | ||
| 4616 | const data = p.nodes.items(.data)[@intFromEnum(node)]; | ||
| 4617 | const name = p.tokSlice(data.decl.name); | ||
| 4618 | const builtin_ty = p.comp.builtins.lookup(name); | ||
| 4619 | return .{ .builtin = .{ .node = node, .tag = builtin_ty.builtin.tag } }; | ||
| 4620 | } | ||
| 4621 | return .{ .standard = func_node }; | ||
| 4622 | } | ||
| 4623 | |||
| 4624 | fn shouldPerformLvalConversion(self: CallExpr, arg_idx: u32) bool { | ||
| 4625 | return switch (self) { | ||
| 4626 | .standard => true, | ||
| 4627 | .builtin => |builtin| switch (builtin.tag) { | ||
| 4628 | Builtin.tagFromName("__builtin_va_start").?, | ||
| 4629 | Builtin.tagFromName("__va_start").?, | ||
| 4630 | Builtin.tagFromName("va_start").?, | ||
| 4631 | => arg_idx != 1, | ||
| 4632 | else => true, | ||
| 4633 | }, | ||
| 4634 | }; | ||
| 4635 | } | ||
| 4636 | |||
| 4637 | fn shouldPromoteVarArg(self: CallExpr, arg_idx: u32) bool { | ||
| 4638 | return switch (self) { | ||
| 4639 | .standard => true, | ||
| 4640 | .builtin => |builtin| switch (builtin.tag) { | ||
| 4641 | Builtin.tagFromName("__builtin_va_start").?, | ||
| 4642 | Builtin.tagFromName("__va_start").?, | ||
| 4643 | Builtin.tagFromName("va_start").?, | ||
| 4644 | => arg_idx != 1, | ||
| 4645 | Builtin.tagFromName("__builtin_complex").? => false, | ||
| 4646 | else => true, | ||
| 4647 | }, | ||
| 4648 | }; | ||
| 4649 | } | ||
| 4650 | |||
| 4651 | fn shouldCoerceArg(self: CallExpr, arg_idx: u32) bool { | ||
| 4652 | _ = self; | ||
| 4653 | _ = arg_idx; | ||
| 4654 | return true; | ||
| 4655 | } | ||
| 4656 | |||
| 4657 | fn checkVarArg(self: CallExpr, p: *Parser, first_after: TokenIndex, param_tok: TokenIndex, arg: *Result, arg_idx: u32) !void { | ||
| 4658 | if (self == .standard) return; | ||
| 4659 | |||
| 4660 | const builtin_tok = p.nodes.items(.data)[@intFromEnum(self.builtin.node)].decl.name; | ||
| 4661 | switch (self.builtin.tag) { | ||
| 4662 | Builtin.tagFromName("__builtin_va_start").?, | ||
| 4663 | Builtin.tagFromName("__va_start").?, | ||
| 4664 | Builtin.tagFromName("va_start").?, | ||
| 4665 | => return p.checkVaStartArg(builtin_tok, first_after, param_tok, arg, arg_idx), | ||
| 4666 | Builtin.tagFromName("__builtin_complex").? => return p.checkComplexArg(builtin_tok, first_after, param_tok, arg, arg_idx), | ||
| 4667 | else => {}, | ||
| 4668 | } | ||
| 4669 | } | ||
| 4670 | |||
| 4671 | /// Some functions cannot be expressed as standard C prototypes. For example `__builtin_complex` requires | ||
| 4672 | /// two arguments of the same real floating point type (e.g. two doubles or two floats). These functions are | ||
| 4673 | /// encoded as varargs functions with custom typechecking. Since varargs functions do not have a fixed number | ||
| 4674 | /// of arguments, `paramCountOverride` is used to tell us how many arguments we should actually expect to see for | ||
| 4675 | /// these custom-typechecked functions. | ||
| 4676 | fn paramCountOverride(self: CallExpr) ?u32 { | ||
| 4677 | return switch (self) { | ||
| 4678 | .standard => null, | ||
| 4679 | .builtin => |builtin| switch (builtin.tag) { | ||
| 4680 | Builtin.tagFromName("__builtin_complex").? => 2, | ||
| 4681 | else => null, | ||
| 4682 | }, | ||
| 4683 | }; | ||
| 4684 | } | ||
| 4685 | |||
| 4686 | fn returnType(self: CallExpr, p: *Parser, callable_ty: Type) Type { | ||
| 4687 | return switch (self) { | ||
| 4688 | .standard => callable_ty.returnType(), | ||
| 4689 | .builtin => |builtin| switch (builtin.tag) { | ||
| 4690 | Builtin.tagFromName("__builtin_complex").? => { | ||
| 4691 | const last_param = p.list_buf.items[p.list_buf.items.len - 1]; | ||
| 4692 | return p.nodes.items(.ty)[@intFromEnum(last_param)].makeComplex(); | ||
| 4693 | }, | ||
| 4694 | else => callable_ty.returnType(), | ||
| 4695 | }, | ||
| 4696 | }; | ||
| 4697 | } | ||
| 4698 | |||
| 4699 | fn finish(self: CallExpr, p: *Parser, ty: Type, list_buf_top: usize, arg_count: u32) Error!Result { | ||
| 4700 | const ret_ty = self.returnType(p, ty); | ||
| 4701 | switch (self) { | ||
| 4702 | .standard => |func_node| { | ||
| 4703 | var call_node: Tree.Node = .{ | ||
| 4704 | .tag = .call_expr_one, | ||
| 4705 | .ty = ret_ty, | ||
| 4706 | .data = .{ .bin = .{ .lhs = func_node, .rhs = .none } }, | ||
| 4707 | }; | ||
| 4708 | const args = p.list_buf.items[list_buf_top..]; | ||
| 4709 | switch (arg_count) { | ||
| 4710 | 0 => {}, | ||
| 4711 | 1 => call_node.data.bin.rhs = args[1], // args[0] == func.node | ||
| 4712 | else => { | ||
| 4713 | call_node.tag = .call_expr; | ||
| 4714 | call_node.data = .{ .range = try p.addList(args) }; | ||
| 4715 | }, | ||
| 4716 | } | ||
| 4717 | return Result{ .node = try p.addNode(call_node), .ty = ret_ty }; | ||
| 4718 | }, | ||
| 4719 | .builtin => |builtin| { | ||
| 4720 | const index = @intFromEnum(builtin.node); | ||
| 4721 | var call_node = p.nodes.get(index); | ||
| 4722 | defer p.nodes.set(index, call_node); | ||
| 4723 | call_node.ty = ret_ty; | ||
| 4724 | const args = p.list_buf.items[list_buf_top..]; | ||
| 4725 | switch (arg_count) { | ||
| 4726 | 0 => {}, | ||
| 4727 | 1 => call_node.data.decl.node = args[1], // args[0] == func.node | ||
| 4728 | else => { | ||
| 4729 | call_node.tag = .builtin_call_expr; | ||
| 4730 | args[0] = @enumFromInt(call_node.data.decl.name); | ||
| 4731 | call_node.data = .{ .range = try p.addList(args) }; | ||
| 4732 | }, | ||
| 4733 | } | ||
| 4734 | return Result{ .node = builtin.node, .ty = ret_ty }; | ||
| 4735 | }, | ||
| 4736 | } | ||
| 4737 | } | ||
| 4738 | }; | ||
| 4739 | |||
| 4740 | const Result = struct { | ||
| 4741 | node: NodeIndex = .none, | ||
| 4742 | ty: Type = .{ .specifier = .int }, | ||
| 4743 | val: Value = .{}, | ||
| 4744 | |||
| 4745 | fn expect(res: Result, p: *Parser) Error!void { | ||
| 4746 | if (p.in_macro) { | ||
| 4747 | if (res.val.tag == .unavailable) { | ||
| 4748 | try p.errTok(.expected_expr, p.tok_i); | ||
| 4749 | return error.ParsingFailed; | ||
| 4750 | } | ||
| 4751 | return; | ||
| 4752 | } | ||
| 4753 | if (res.node == .none) { | ||
| 4754 | try p.errTok(.expected_expr, p.tok_i); | ||
| 4755 | return error.ParsingFailed; | ||
| 4756 | } | ||
| 4757 | } | ||
| 4758 | |||
| 4759 | fn empty(res: Result, p: *Parser) bool { | ||
| 4760 | if (p.in_macro) return res.val.tag == .unavailable; | ||
| 4761 | return res.node == .none; | ||
| 4762 | } | ||
| 4763 | |||
| 4764 | fn maybeWarnUnused(res: Result, p: *Parser, expr_start: TokenIndex, err_start: usize) Error!void { | ||
| 4765 | if (res.ty.is(.void) or res.node == .none) return; | ||
| 4766 | // don't warn about unused result if the expression contained errors besides other unused results | ||
| 4767 | for (p.comp.diag.list.items[err_start..]) |err_item| { | ||
| 4768 | if (err_item.tag != .unused_value) return; | ||
| 4769 | } | ||
| 4770 | var cur_node = res.node; | ||
| 4771 | while (true) switch (p.nodes.items(.tag)[@intFromEnum(cur_node)]) { | ||
| 4772 | .invalid, // So that we don't need to check for node == 0 | ||
| 4773 | .assign_expr, | ||
| 4774 | .mul_assign_expr, | ||
| 4775 | .div_assign_expr, | ||
| 4776 | .mod_assign_expr, | ||
| 4777 | .add_assign_expr, | ||
| 4778 | .sub_assign_expr, | ||
| 4779 | .shl_assign_expr, | ||
| 4780 | .shr_assign_expr, | ||
| 4781 | .bit_and_assign_expr, | ||
| 4782 | .bit_xor_assign_expr, | ||
| 4783 | .bit_or_assign_expr, | ||
| 4784 | .pre_inc_expr, | ||
| 4785 | .pre_dec_expr, | ||
| 4786 | .post_inc_expr, | ||
| 4787 | .post_dec_expr, | ||
| 4788 | => return, | ||
| 4789 | .call_expr_one => { | ||
| 4790 | const fn_ptr = p.nodes.items(.data)[@intFromEnum(cur_node)].bin.lhs; | ||
| 4791 | const fn_ty = p.nodes.items(.ty)[@intFromEnum(fn_ptr)].elemType(); | ||
| 4792 | if (fn_ty.hasAttribute(.nodiscard)) try p.errStr(.nodiscard_unused, expr_start, "TODO get name"); | ||
| 4793 | if (fn_ty.hasAttribute(.warn_unused_result)) try p.errStr(.warn_unused_result, expr_start, "TODO get name"); | ||
| 4794 | return; | ||
| 4795 | }, | ||
| 4796 | .call_expr => { | ||
| 4797 | const fn_ptr = p.data.items[p.nodes.items(.data)[@intFromEnum(cur_node)].range.start]; | ||
| 4798 | const fn_ty = p.nodes.items(.ty)[@intFromEnum(fn_ptr)].elemType(); | ||
| 4799 | if (fn_ty.hasAttribute(.nodiscard)) try p.errStr(.nodiscard_unused, expr_start, "TODO get name"); | ||
| 4800 | if (fn_ty.hasAttribute(.warn_unused_result)) try p.errStr(.warn_unused_result, expr_start, "TODO get name"); | ||
| 4801 | return; | ||
| 4802 | }, | ||
| 4803 | .stmt_expr => { | ||
| 4804 | const body = p.nodes.items(.data)[@intFromEnum(cur_node)].un; | ||
| 4805 | switch (p.nodes.items(.tag)[@intFromEnum(body)]) { | ||
| 4806 | .compound_stmt_two => { | ||
| 4807 | const body_stmt = p.nodes.items(.data)[@intFromEnum(body)].bin; | ||
| 4808 | cur_node = if (body_stmt.rhs != .none) body_stmt.rhs else body_stmt.lhs; | ||
| 4809 | }, | ||
| 4810 | .compound_stmt => { | ||
| 4811 | const data = p.nodes.items(.data)[@intFromEnum(body)]; | ||
| 4812 | cur_node = p.data.items[data.range.end - 1]; | ||
| 4813 | }, | ||
| 4814 | else => unreachable, | ||
| 4815 | } | ||
| 4816 | }, | ||
| 4817 | .comma_expr => cur_node = p.nodes.items(.data)[@intFromEnum(cur_node)].bin.rhs, | ||
| 4818 | .paren_expr => cur_node = p.nodes.items(.data)[@intFromEnum(cur_node)].un, | ||
| 4819 | else => break, | ||
| 4820 | }; | ||
| 4821 | try p.errTok(.unused_value, expr_start); | ||
| 4822 | } | ||
| 4823 | |||
| 4824 | fn boolRes(lhs: *Result, p: *Parser, tag: Tree.Tag, rhs: Result) !void { | ||
| 4825 | if (lhs.val.tag == .nullptr_t) { | ||
| 4826 | lhs.val = Value.int(0); | ||
| 4827 | } | ||
| 4828 | if (lhs.ty.specifier != .invalid) { | ||
| 4829 | lhs.ty = Type.int; | ||
| 4830 | } | ||
| 4831 | return lhs.bin(p, tag, rhs); | ||
| 4832 | } | ||
| 4833 | |||
| 4834 | fn bin(lhs: *Result, p: *Parser, tag: Tree.Tag, rhs: Result) !void { | ||
| 4835 | lhs.node = try p.addNode(.{ | ||
| 4836 | .tag = tag, | ||
| 4837 | .ty = lhs.ty, | ||
| 4838 | .data = .{ .bin = .{ .lhs = lhs.node, .rhs = rhs.node } }, | ||
| 4839 | }); | ||
| 4840 | } | ||
| 4841 | |||
| 4842 | fn un(operand: *Result, p: *Parser, tag: Tree.Tag) Error!void { | ||
| 4843 | operand.node = try p.addNode(.{ | ||
| 4844 | .tag = tag, | ||
| 4845 | .ty = operand.ty, | ||
| 4846 | .data = .{ .un = operand.node }, | ||
| 4847 | }); | ||
| 4848 | } | ||
| 4849 | |||
| 4850 | fn implicitCast(operand: *Result, p: *Parser, kind: Tree.CastKind) Error!void { | ||
| 4851 | operand.node = try p.addNode(.{ | ||
| 4852 | .tag = .implicit_cast, | ||
| 4853 | .ty = operand.ty, | ||
| 4854 | .data = .{ .cast = .{ .operand = operand.node, .kind = kind } }, | ||
| 4855 | }); | ||
| 4856 | } | ||
| 4857 | |||
| 4858 | fn adjustCondExprPtrs(a: *Result, tok: TokenIndex, b: *Result, p: *Parser) !bool { | ||
| 4859 | assert(a.ty.isPtr() and b.ty.isPtr()); | ||
| 4860 | |||
| 4861 | const a_elem = a.ty.elemType(); | ||
| 4862 | const b_elem = b.ty.elemType(); | ||
| 4863 | if (a_elem.eql(b_elem, p.comp, true)) return true; | ||
| 4864 | |||
| 4865 | var adjusted_elem_ty = try p.arena.create(Type); | ||
| 4866 | adjusted_elem_ty.* = a_elem; | ||
| 4867 | |||
| 4868 | const has_void_star_branch = a.ty.isVoidStar() or b.ty.isVoidStar(); | ||
| 4869 | const only_quals_differ = a_elem.eql(b_elem, p.comp, false); | ||
| 4870 | const pointers_compatible = only_quals_differ or has_void_star_branch; | ||
| 4871 | |||
| 4872 | if (!pointers_compatible or has_void_star_branch) { | ||
| 4873 | if (!pointers_compatible) { | ||
| 4874 | try p.errStr(.pointer_mismatch, tok, try p.typePairStrExtra(a.ty, " and ", b.ty)); | ||
| 4875 | } | ||
| 4876 | adjusted_elem_ty.* = .{ .specifier = .void }; | ||
| 4877 | } | ||
| 4878 | if (pointers_compatible) { | ||
| 4879 | adjusted_elem_ty.qual = a_elem.qual.mergeCV(b_elem.qual); | ||
| 4880 | } | ||
| 4881 | if (!adjusted_elem_ty.eql(a_elem, p.comp, true)) { | ||
| 4882 | a.ty = .{ | ||
| 4883 | .data = .{ .sub_type = adjusted_elem_ty }, | ||
| 4884 | .specifier = .pointer, | ||
| 4885 | }; | ||
| 4886 | try a.implicitCast(p, .bitcast); | ||
| 4887 | } | ||
| 4888 | if (!adjusted_elem_ty.eql(b_elem, p.comp, true)) { | ||
| 4889 | b.ty = .{ | ||
| 4890 | .data = .{ .sub_type = adjusted_elem_ty }, | ||
| 4891 | .specifier = .pointer, | ||
| 4892 | }; | ||
| 4893 | try b.implicitCast(p, .bitcast); | ||
| 4894 | } | ||
| 4895 | return true; | ||
| 4896 | } | ||
| 4897 | |||
| 4898 | /// Adjust types for binary operation, returns true if the result can and should be evaluated. | ||
| 4899 | fn adjustTypes(a: *Result, tok: TokenIndex, b: *Result, p: *Parser, kind: enum { | ||
| 4900 | integer, | ||
| 4901 | arithmetic, | ||
| 4902 | boolean_logic, | ||
| 4903 | relational, | ||
| 4904 | equality, | ||
| 4905 | conditional, | ||
| 4906 | add, | ||
| 4907 | sub, | ||
| 4908 | }) !bool { | ||
| 4909 | if (b.ty.specifier == .invalid) { | ||
| 4910 | try a.saveValue(p); | ||
| 4911 | a.ty = Type.invalid; | ||
| 4912 | } | ||
| 4913 | if (a.ty.specifier == .invalid) { | ||
| 4914 | return false; | ||
| 4915 | } | ||
| 4916 | try a.lvalConversion(p); | ||
| 4917 | try b.lvalConversion(p); | ||
| 4918 | |||
| 4919 | const a_vec = a.ty.is(.vector); | ||
| 4920 | const b_vec = b.ty.is(.vector); | ||
| 4921 | if (a_vec and b_vec) { | ||
| 4922 | if (a.ty.eql(b.ty, p.comp, false)) { | ||
| 4923 | return a.shouldEval(b, p); | ||
| 4924 | } | ||
| 4925 | return a.invalidBinTy(tok, b, p); | ||
| 4926 | } else if (a_vec) { | ||
| 4927 | if (b.coerceExtra(p, a.ty.elemType(), tok, .test_coerce)) { | ||
| 4928 | try b.saveValue(p); | ||
| 4929 | try b.implicitCast(p, .vector_splat); | ||
| 4930 | return a.shouldEval(b, p); | ||
| 4931 | } else |er| switch (er) { | ||
| 4932 | error.CoercionFailed => return a.invalidBinTy(tok, b, p), | ||
| 4933 | else => |e| return e, | ||
| 4934 | } | ||
| 4935 | } else if (b_vec) { | ||
| 4936 | if (a.coerceExtra(p, b.ty.elemType(), tok, .test_coerce)) { | ||
| 4937 | try a.saveValue(p); | ||
| 4938 | try a.implicitCast(p, .vector_splat); | ||
| 4939 | return a.shouldEval(b, p); | ||
| 4940 | } else |er| switch (er) { | ||
| 4941 | error.CoercionFailed => return a.invalidBinTy(tok, b, p), | ||
| 4942 | else => |e| return e, | ||
| 4943 | } | ||
| 4944 | } | ||
| 4945 | |||
| 4946 | const a_int = a.ty.isInt(); | ||
| 4947 | const b_int = b.ty.isInt(); | ||
| 4948 | if (a_int and b_int) { | ||
| 4949 | try a.usualArithmeticConversion(b, p, tok); | ||
| 4950 | return a.shouldEval(b, p); | ||
| 4951 | } | ||
| 4952 | if (kind == .integer) return a.invalidBinTy(tok, b, p); | ||
| 4953 | |||
| 4954 | const a_float = a.ty.isFloat(); | ||
| 4955 | const b_float = b.ty.isFloat(); | ||
| 4956 | const a_arithmetic = a_int or a_float; | ||
| 4957 | const b_arithmetic = b_int or b_float; | ||
| 4958 | if (a_arithmetic and b_arithmetic) { | ||
| 4959 | // <, <=, >, >= only work on real types | ||
| 4960 | if (kind == .relational and (!a.ty.isReal() or !b.ty.isReal())) | ||
| 4961 | return a.invalidBinTy(tok, b, p); | ||
| 4962 | |||
| 4963 | try a.usualArithmeticConversion(b, p, tok); | ||
| 4964 | return a.shouldEval(b, p); | ||
| 4965 | } | ||
| 4966 | if (kind == .arithmetic) return a.invalidBinTy(tok, b, p); | ||
| 4967 | |||
| 4968 | const a_nullptr = a.ty.is(.nullptr_t); | ||
| 4969 | const b_nullptr = b.ty.is(.nullptr_t); | ||
| 4970 | const a_ptr = a.ty.isPtr(); | ||
| 4971 | const b_ptr = b.ty.isPtr(); | ||
| 4972 | const a_scalar = a_arithmetic or a_ptr; | ||
| 4973 | const b_scalar = b_arithmetic or b_ptr; | ||
| 4974 | switch (kind) { | ||
| 4975 | .boolean_logic => { | ||
| 4976 | if (!(a_scalar or a_nullptr) or !(b_scalar or b_nullptr)) return a.invalidBinTy(tok, b, p); | ||
| 4977 | |||
| 4978 | // Do integer promotions but nothing else | ||
| 4979 | if (a_int) try a.intCast(p, a.ty.integerPromotion(p.comp), tok); | ||
| 4980 | if (b_int) try b.intCast(p, b.ty.integerPromotion(p.comp), tok); | ||
| 4981 | return a.shouldEval(b, p); | ||
| 4982 | }, | ||
| 4983 | .relational, .equality => { | ||
| 4984 | if (kind == .equality and (a_nullptr or b_nullptr)) { | ||
| 4985 | if (a_nullptr and b_nullptr) return a.shouldEval(b, p); | ||
| 4986 | const nullptr_res = if (a_nullptr) a else b; | ||
| 4987 | const other_res = if (a_nullptr) b else a; | ||
| 4988 | if (other_res.ty.isPtr()) { | ||
| 4989 | try nullptr_res.nullCast(p, other_res.ty); | ||
| 4990 | return other_res.shouldEval(nullptr_res, p); | ||
| 4991 | } else if (other_res.val.isZero()) { | ||
| 4992 | other_res.val = .{ .tag = .nullptr_t }; | ||
| 4993 | try other_res.nullCast(p, nullptr_res.ty); | ||
| 4994 | return other_res.shouldEval(nullptr_res, p); | ||
| 4995 | } | ||
| 4996 | return a.invalidBinTy(tok, b, p); | ||
| 4997 | } | ||
| 4998 | // comparisons between floats and pointes not allowed | ||
| 4999 | if (!a_scalar or !b_scalar or (a_float and b_ptr) or (b_float and a_ptr)) | ||
| 5000 | return a.invalidBinTy(tok, b, p); | ||
| 5001 | |||
| 5002 | if ((a_int or b_int) and !(a.val.isZero() or b.val.isZero())) { | ||
| 5003 | try p.errStr(.comparison_ptr_int, tok, try p.typePairStr(a.ty, b.ty)); | ||
| 5004 | } else if (a_ptr and b_ptr) { | ||
| 5005 | if (!a.ty.isVoidStar() and !b.ty.isVoidStar() and !a.ty.eql(b.ty, p.comp, false)) | ||
| 5006 | try p.errStr(.comparison_distinct_ptr, tok, try p.typePairStr(a.ty, b.ty)); | ||
| 5007 | } else if (a_ptr) { | ||
| 5008 | try b.ptrCast(p, a.ty); | ||
| 5009 | } else { | ||
| 5010 | assert(b_ptr); | ||
| 5011 | try a.ptrCast(p, b.ty); | ||
| 5012 | } | ||
| 5013 | |||
| 5014 | return a.shouldEval(b, p); | ||
| 5015 | }, | ||
| 5016 | .conditional => { | ||
| 5017 | // doesn't matter what we return here, as the result is ignored | ||
| 5018 | if (a.ty.is(.void) or b.ty.is(.void)) { | ||
| 5019 | try a.toVoid(p); | ||
| 5020 | try b.toVoid(p); | ||
| 5021 | return true; | ||
| 5022 | } | ||
| 5023 | if (a_nullptr and b_nullptr) return true; | ||
| 5024 | if ((a_ptr and b_int) or (a_int and b_ptr)) { | ||
| 5025 | if (a.val.isZero() or b.val.isZero()) { | ||
| 5026 | try a.nullCast(p, b.ty); | ||
| 5027 | try b.nullCast(p, a.ty); | ||
| 5028 | return true; | ||
| 5029 | } | ||
| 5030 | const int_ty = if (a_int) a else b; | ||
| 5031 | const ptr_ty = if (a_ptr) a else b; | ||
| 5032 | try p.errStr(.implicit_int_to_ptr, tok, try p.typePairStrExtra(int_ty.ty, " to ", ptr_ty.ty)); | ||
| 5033 | try int_ty.ptrCast(p, ptr_ty.ty); | ||
| 5034 | |||
| 5035 | return true; | ||
| 5036 | } | ||
| 5037 | if (a_ptr and b_ptr) return a.adjustCondExprPtrs(tok, b, p); | ||
| 5038 | if ((a_ptr and b_nullptr) or (a_nullptr and b_ptr)) { | ||
| 5039 | const nullptr_res = if (a_nullptr) a else b; | ||
| 5040 | const ptr_res = if (a_nullptr) b else a; | ||
| 5041 | try nullptr_res.nullCast(p, ptr_res.ty); | ||
| 5042 | return true; | ||
| 5043 | } | ||
| 5044 | if (a.ty.isRecord() and b.ty.isRecord() and a.ty.eql(b.ty, p.comp, false)) { | ||
| 5045 | return true; | ||
| 5046 | } | ||
| 5047 | return a.invalidBinTy(tok, b, p); | ||
| 5048 | }, | ||
| 5049 | .add => { | ||
| 5050 | // if both aren't arithmetic one should be pointer and the other an integer | ||
| 5051 | if (a_ptr == b_ptr or a_int == b_int) return a.invalidBinTy(tok, b, p); | ||
| 5052 | |||
| 5053 | // Do integer promotions but nothing else | ||
| 5054 | if (a_int) try a.intCast(p, a.ty.integerPromotion(p.comp), tok); | ||
| 5055 | if (b_int) try b.intCast(p, b.ty.integerPromotion(p.comp), tok); | ||
| 5056 | |||
| 5057 | // The result type is the type of the pointer operand | ||
| 5058 | if (a_int) a.ty = b.ty else b.ty = a.ty; | ||
| 5059 | return a.shouldEval(b, p); | ||
| 5060 | }, | ||
| 5061 | .sub => { | ||
| 5062 | // if both aren't arithmetic then either both should be pointers or just a | ||
| 5063 | if (!a_ptr or !(b_ptr or b_int)) return a.invalidBinTy(tok, b, p); | ||
| 5064 | |||
| 5065 | if (a_ptr and b_ptr) { | ||
| 5066 | if (!a.ty.eql(b.ty, p.comp, false)) try p.errStr(.incompatible_pointers, tok, try p.typePairStr(a.ty, b.ty)); | ||
| 5067 | a.ty = p.comp.types.ptrdiff; | ||
| 5068 | } | ||
| 5069 | |||
| 5070 | // Do integer promotion on b if needed | ||
| 5071 | if (b_int) try b.intCast(p, b.ty.integerPromotion(p.comp), tok); | ||
| 5072 | return a.shouldEval(b, p); | ||
| 5073 | }, | ||
| 5074 | else => return a.invalidBinTy(tok, b, p), | ||
| 5075 | } | ||
| 5076 | } | ||
| 5077 | |||
| 5078 | fn lvalConversion(res: *Result, p: *Parser) Error!void { | ||
| 5079 | if (res.ty.isFunc()) { | ||
| 5080 | var elem_ty = try p.arena.create(Type); | ||
| 5081 | elem_ty.* = res.ty; | ||
| 5082 | res.ty.specifier = .pointer; | ||
| 5083 | res.ty.data = .{ .sub_type = elem_ty }; | ||
| 5084 | try res.implicitCast(p, .function_to_pointer); | ||
| 5085 | } else if (res.ty.isArray()) { | ||
| 5086 | res.val.tag = .unavailable; | ||
| 5087 | res.ty.decayArray(); | ||
| 5088 | try res.implicitCast(p, .array_to_pointer); | ||
| 5089 | } else if (!p.in_macro and Tree.isLval(p.nodes.slice(), p.data.items, p.value_map, res.node)) { | ||
| 5090 | res.ty.qual = .{}; | ||
| 5091 | try res.implicitCast(p, .lval_to_rval); | ||
| 5092 | } | ||
| 5093 | } | ||
| 5094 | |||
| 5095 | fn boolCast(res: *Result, p: *Parser, bool_ty: Type, tok: TokenIndex) Error!void { | ||
| 5096 | if (res.ty.isArray()) { | ||
| 5097 | if (res.val.tag == .bytes) { | ||
| 5098 | try p.errStr(.string_literal_to_bool, tok, try p.typePairStrExtra(res.ty, " to ", bool_ty)); | ||
| 5099 | } else { | ||
| 5100 | try p.errStr(.array_address_to_bool, tok, p.tokSlice(tok)); | ||
| 5101 | } | ||
| 5102 | try res.lvalConversion(p); | ||
| 5103 | res.val = Value.int(1); | ||
| 5104 | res.ty = bool_ty; | ||
| 5105 | try res.implicitCast(p, .pointer_to_bool); | ||
| 5106 | } else if (res.ty.isPtr()) { | ||
| 5107 | res.val.toBool(); | ||
| 5108 | res.ty = bool_ty; | ||
| 5109 | try res.implicitCast(p, .pointer_to_bool); | ||
| 5110 | } else if (res.ty.isInt() and !res.ty.is(.bool)) { | ||
| 5111 | res.val.toBool(); | ||
| 5112 | res.ty = bool_ty; | ||
| 5113 | try res.implicitCast(p, .int_to_bool); | ||
| 5114 | } else if (res.ty.isFloat()) { | ||
| 5115 | const old_value = res.val; | ||
| 5116 | const value_change_kind = res.val.floatToInt(res.ty, bool_ty, p.comp); | ||
| 5117 | try res.floatToIntWarning(p, bool_ty, old_value, value_change_kind, tok); | ||
| 5118 | if (!res.ty.isReal()) { | ||
| 5119 | res.ty = res.ty.makeReal(); | ||
| 5120 | try res.implicitCast(p, .complex_float_to_real); | ||
| 5121 | } | ||
| 5122 | res.ty = bool_ty; | ||
| 5123 | try res.implicitCast(p, .float_to_bool); | ||
| 5124 | } | ||
| 5125 | } | ||
| 5126 | |||
| 5127 | fn intCast(res: *Result, p: *Parser, int_ty: Type, tok: TokenIndex) Error!void { | ||
| 5128 | if (int_ty.hasIncompleteSize()) return error.ParsingFailed; // Diagnostic already issued | ||
| 5129 | if (res.ty.is(.bool)) { | ||
| 5130 | res.ty = int_ty.makeReal(); | ||
| 5131 | try res.implicitCast(p, .bool_to_int); | ||
| 5132 | if (!int_ty.isReal()) { | ||
| 5133 | res.ty = int_ty; | ||
| 5134 | try res.implicitCast(p, .real_to_complex_int); | ||
| 5135 | } | ||
| 5136 | } else if (res.ty.isPtr()) { | ||
| 5137 | res.ty = int_ty.makeReal(); | ||
| 5138 | try res.implicitCast(p, .pointer_to_int); | ||
| 5139 | if (!int_ty.isReal()) { | ||
| 5140 | res.ty = int_ty; | ||
| 5141 | try res.implicitCast(p, .real_to_complex_int); | ||
| 5142 | } | ||
| 5143 | } else if (res.ty.isFloat()) { | ||
| 5144 | const old_value = res.val; | ||
| 5145 | const value_change_kind = res.val.floatToInt(res.ty, int_ty, p.comp); | ||
| 5146 | try res.floatToIntWarning(p, int_ty, old_value, value_change_kind, tok); | ||
| 5147 | const old_real = res.ty.isReal(); | ||
| 5148 | const new_real = int_ty.isReal(); | ||
| 5149 | if (old_real and new_real) { | ||
| 5150 | res.ty = int_ty; | ||
| 5151 | try res.implicitCast(p, .float_to_int); | ||
| 5152 | } else if (old_real) { | ||
| 5153 | res.ty = int_ty.makeReal(); | ||
| 5154 | try res.implicitCast(p, .float_to_int); | ||
| 5155 | res.ty = int_ty; | ||
| 5156 | try res.implicitCast(p, .real_to_complex_int); | ||
| 5157 | } else if (new_real) { | ||
| 5158 | res.ty = res.ty.makeReal(); | ||
| 5159 | try res.implicitCast(p, .complex_float_to_real); | ||
| 5160 | res.ty = int_ty; | ||
| 5161 | try res.implicitCast(p, .float_to_int); | ||
| 5162 | } else { | ||
| 5163 | res.ty = int_ty; | ||
| 5164 | try res.implicitCast(p, .complex_float_to_complex_int); | ||
| 5165 | } | ||
| 5166 | } else if (!res.ty.eql(int_ty, p.comp, true)) { | ||
| 5167 | res.val.intCast(res.ty, int_ty, p.comp); | ||
| 5168 | const old_real = res.ty.isReal(); | ||
| 5169 | const new_real = int_ty.isReal(); | ||
| 5170 | if (old_real and new_real) { | ||
| 5171 | res.ty = int_ty; | ||
| 5172 | try res.implicitCast(p, .int_cast); | ||
| 5173 | } else if (old_real) { | ||
| 5174 | const real_int_ty = int_ty.makeReal(); | ||
| 5175 | if (!res.ty.eql(real_int_ty, p.comp, false)) { | ||
| 5176 | res.ty = real_int_ty; | ||
| 5177 | try res.implicitCast(p, .int_cast); | ||
| 5178 | } | ||
| 5179 | res.ty = int_ty; | ||
| 5180 | try res.implicitCast(p, .real_to_complex_int); | ||
| 5181 | } else if (new_real) { | ||
| 5182 | res.ty = res.ty.makeReal(); | ||
| 5183 | try res.implicitCast(p, .complex_int_to_real); | ||
| 5184 | res.ty = int_ty; | ||
| 5185 | try res.implicitCast(p, .int_cast); | ||
| 5186 | } else { | ||
| 5187 | res.ty = int_ty; | ||
| 5188 | try res.implicitCast(p, .complex_int_cast); | ||
| 5189 | } | ||
| 5190 | } | ||
| 5191 | } | ||
| 5192 | |||
| 5193 | fn floatToIntWarning(res: *Result, p: *Parser, int_ty: Type, old_value: Value, change_kind: Value.FloatToIntChangeKind, tok: TokenIndex) !void { | ||
| 5194 | switch (change_kind) { | ||
| 5195 | .none => return p.errStr(.float_to_int, tok, try p.typePairStrExtra(res.ty, " to ", int_ty)), | ||
| 5196 | .out_of_range => return p.errStr(.float_out_of_range, tok, try p.typePairStrExtra(res.ty, " to ", int_ty)), | ||
| 5197 | .overflow => return p.errStr(.float_overflow_conversion, tok, try p.typePairStrExtra(res.ty, " to ", int_ty)), | ||
| 5198 | .nonzero_to_zero => return p.errStr(.float_zero_conversion, tok, try p.floatValueChangedStr(res, old_value.getFloat(f64), int_ty)), | ||
| 5199 | .value_changed => return p.errStr(.float_value_changed, tok, try p.floatValueChangedStr(res, old_value.getFloat(f64), int_ty)), | ||
| 5200 | } | ||
| 5201 | } | ||
| 5202 | |||
| 5203 | fn floatCast(res: *Result, p: *Parser, float_ty: Type) Error!void { | ||
| 5204 | if (res.ty.is(.bool)) { | ||
| 5205 | res.val.intToFloat(res.ty, float_ty, p.comp); | ||
| 5206 | res.ty = float_ty.makeReal(); | ||
| 5207 | try res.implicitCast(p, .bool_to_float); | ||
| 5208 | if (!float_ty.isReal()) { | ||
| 5209 | res.ty = float_ty; | ||
| 5210 | try res.implicitCast(p, .real_to_complex_float); | ||
| 5211 | } | ||
| 5212 | } else if (res.ty.isInt()) { | ||
| 5213 | res.val.intToFloat(res.ty, float_ty, p.comp); | ||
| 5214 | const old_real = res.ty.isReal(); | ||
| 5215 | const new_real = float_ty.isReal(); | ||
| 5216 | if (old_real and new_real) { | ||
| 5217 | res.ty = float_ty; | ||
| 5218 | try res.implicitCast(p, .int_to_float); | ||
| 5219 | } else if (old_real) { | ||
| 5220 | res.ty = float_ty.makeReal(); | ||
| 5221 | try res.implicitCast(p, .int_to_float); | ||
| 5222 | res.ty = float_ty; | ||
| 5223 | try res.implicitCast(p, .real_to_complex_float); | ||
| 5224 | } else if (new_real) { | ||
| 5225 | res.ty = res.ty.makeReal(); | ||
| 5226 | try res.implicitCast(p, .complex_int_to_real); | ||
| 5227 | res.ty = float_ty; | ||
| 5228 | try res.implicitCast(p, .int_to_float); | ||
| 5229 | } else { | ||
| 5230 | res.ty = float_ty; | ||
| 5231 | try res.implicitCast(p, .complex_int_to_complex_float); | ||
| 5232 | } | ||
| 5233 | } else if (!res.ty.eql(float_ty, p.comp, true)) { | ||
| 5234 | res.val.floatCast(res.ty, float_ty, p.comp); | ||
| 5235 | const old_real = res.ty.isReal(); | ||
| 5236 | const new_real = float_ty.isReal(); | ||
| 5237 | if (old_real and new_real) { | ||
| 5238 | res.ty = float_ty; | ||
| 5239 | try res.implicitCast(p, .float_cast); | ||
| 5240 | } else if (old_real) { | ||
| 5241 | if (res.ty.floatRank() != float_ty.floatRank()) { | ||
| 5242 | res.ty = float_ty.makeReal(); | ||
| 5243 | try res.implicitCast(p, .float_cast); | ||
| 5244 | } | ||
| 5245 | res.ty = float_ty; | ||
| 5246 | try res.implicitCast(p, .real_to_complex_float); | ||
| 5247 | } else if (new_real) { | ||
| 5248 | res.ty = res.ty.makeReal(); | ||
| 5249 | try res.implicitCast(p, .complex_float_to_real); | ||
| 5250 | if (res.ty.floatRank() != float_ty.floatRank()) { | ||
| 5251 | res.ty = float_ty; | ||
| 5252 | try res.implicitCast(p, .float_cast); | ||
| 5253 | } | ||
| 5254 | } else { | ||
| 5255 | res.ty = float_ty; | ||
| 5256 | try res.implicitCast(p, .complex_float_cast); | ||
| 5257 | } | ||
| 5258 | } | ||
| 5259 | } | ||
| 5260 | |||
| 5261 | /// Converts a bool or integer to a pointer | ||
| 5262 | fn ptrCast(res: *Result, p: *Parser, ptr_ty: Type) Error!void { | ||
| 5263 | if (res.ty.is(.bool)) { | ||
| 5264 | res.ty = ptr_ty; | ||
| 5265 | try res.implicitCast(p, .bool_to_pointer); | ||
| 5266 | } else if (res.ty.isInt()) { | ||
| 5267 | res.val.intCast(res.ty, ptr_ty, p.comp); | ||
| 5268 | res.ty = ptr_ty; | ||
| 5269 | try res.implicitCast(p, .int_to_pointer); | ||
| 5270 | } | ||
| 5271 | } | ||
| 5272 | |||
| 5273 | /// Convert pointer to one with a different child type | ||
| 5274 | fn ptrChildTypeCast(res: *Result, p: *Parser, ptr_ty: Type) Error!void { | ||
| 5275 | res.ty = ptr_ty; | ||
| 5276 | return res.implicitCast(p, .bitcast); | ||
| 5277 | } | ||
| 5278 | |||
| 5279 | fn toVoid(res: *Result, p: *Parser) Error!void { | ||
| 5280 | if (!res.ty.is(.void)) { | ||
| 5281 | res.ty = .{ .specifier = .void }; | ||
| 5282 | try res.implicitCast(p, .to_void); | ||
| 5283 | } | ||
| 5284 | } | ||
| 5285 | |||
| 5286 | fn nullCast(res: *Result, p: *Parser, ptr_ty: Type) Error!void { | ||
| 5287 | if (!res.ty.is(.nullptr_t) and !res.val.isZero()) return; | ||
| 5288 | res.ty = ptr_ty; | ||
| 5289 | try res.implicitCast(p, .null_to_pointer); | ||
| 5290 | } | ||
| 5291 | |||
| 5292 | fn usualUnaryConversion(res: *Result, p: *Parser, tok: TokenIndex) Error!void { | ||
| 5293 | if (res.ty.isFloat()) fp_eval: { | ||
| 5294 | const eval_method = p.comp.langopts.fp_eval_method orelse break :fp_eval; | ||
| 5295 | switch (eval_method) { | ||
| 5296 | .source => {}, | ||
| 5297 | .indeterminate => unreachable, | ||
| 5298 | .double => { | ||
| 5299 | if (res.ty.floatRank() < (Type{ .specifier = .double }).floatRank()) { | ||
| 5300 | const spec: Type.Specifier = if (res.ty.isReal()) .double else .complex_double; | ||
| 5301 | return res.floatCast(p, .{ .specifier = spec }); | ||
| 5302 | } | ||
| 5303 | }, | ||
| 5304 | .extended => { | ||
| 5305 | if (res.ty.floatRank() < (Type{ .specifier = .long_double }).floatRank()) { | ||
| 5306 | const spec: Type.Specifier = if (res.ty.isReal()) .long_double else .complex_long_double; | ||
| 5307 | return res.floatCast(p, .{ .specifier = spec }); | ||
| 5308 | } | ||
| 5309 | }, | ||
| 5310 | } | ||
| 5311 | } | ||
| 5312 | |||
| 5313 | if (res.ty.is(.fp16) and !p.comp.langopts.use_native_half_type) { | ||
| 5314 | return res.floatCast(p, .{ .specifier = .float }); | ||
| 5315 | } | ||
| 5316 | if (res.ty.isInt()) { | ||
| 5317 | const slice = p.nodes.slice(); | ||
| 5318 | if (Tree.bitfieldWidth(slice, res.node, true)) |width| { | ||
| 5319 | if (res.ty.bitfieldPromotion(p.comp, width)) |promotion_ty| { | ||
| 5320 | return res.intCast(p, promotion_ty, tok); | ||
| 5321 | } | ||
| 5322 | } | ||
| 5323 | return res.intCast(p, res.ty.integerPromotion(p.comp), tok); | ||
| 5324 | } | ||
| 5325 | } | ||
| 5326 | |||
| 5327 | fn usualArithmeticConversion(a: *Result, b: *Result, p: *Parser, tok: TokenIndex) Error!void { | ||
| 5328 | try a.usualUnaryConversion(p, tok); | ||
| 5329 | try b.usualUnaryConversion(p, tok); | ||
| 5330 | |||
| 5331 | // if either is a float cast to that type | ||
| 5332 | if (a.ty.isFloat() or b.ty.isFloat()) { | ||
| 5333 | const float_types = [7][2]Type.Specifier{ | ||
| 5334 | .{ .complex_long_double, .long_double }, | ||
| 5335 | .{ .complex_float128, .float128 }, | ||
| 5336 | .{ .complex_float80, .float80 }, | ||
| 5337 | .{ .complex_double, .double }, | ||
| 5338 | .{ .complex_float, .float }, | ||
| 5339 | // No `_Complex __fp16` type | ||
| 5340 | .{ .invalid, .fp16 }, | ||
| 5341 | // No `_Complex _Float16` | ||
| 5342 | .{ .invalid, .float16 }, | ||
| 5343 | }; | ||
| 5344 | const a_spec = a.ty.canonicalize(.standard).specifier; | ||
| 5345 | const b_spec = b.ty.canonicalize(.standard).specifier; | ||
| 5346 | if (p.comp.target.c_type_bit_size(.longdouble) == 128) { | ||
| 5347 | if (try a.floatConversion(b, a_spec, b_spec, p, float_types[0])) return; | ||
| 5348 | } | ||
| 5349 | if (try a.floatConversion(b, a_spec, b_spec, p, float_types[1])) return; | ||
| 5350 | if (p.comp.target.c_type_bit_size(.longdouble) == 80) { | ||
| 5351 | if (try a.floatConversion(b, a_spec, b_spec, p, float_types[0])) return; | ||
| 5352 | } | ||
| 5353 | if (try a.floatConversion(b, a_spec, b_spec, p, float_types[2])) return; | ||
| 5354 | if (p.comp.target.c_type_bit_size(.longdouble) == 64) { | ||
| 5355 | if (try a.floatConversion(b, a_spec, b_spec, p, float_types[0])) return; | ||
| 5356 | } | ||
| 5357 | if (try a.floatConversion(b, a_spec, b_spec, p, float_types[3])) return; | ||
| 5358 | if (try a.floatConversion(b, a_spec, b_spec, p, float_types[4])) return; | ||
| 5359 | if (try a.floatConversion(b, a_spec, b_spec, p, float_types[5])) return; | ||
| 5360 | if (try a.floatConversion(b, a_spec, b_spec, p, float_types[6])) return; | ||
| 5361 | } | ||
| 5362 | |||
| 5363 | if (a.ty.eql(b.ty, p.comp, true)) { | ||
| 5364 | // cast to promoted type | ||
| 5365 | try a.intCast(p, a.ty, tok); | ||
| 5366 | try b.intCast(p, b.ty, tok); | ||
| 5367 | return; | ||
| 5368 | } | ||
| 5369 | |||
| 5370 | const target = a.ty.integerConversion(b.ty, p.comp); | ||
| 5371 | if (!target.isReal()) { | ||
| 5372 | try a.saveValue(p); | ||
| 5373 | try b.saveValue(p); | ||
| 5374 | } | ||
| 5375 | try a.intCast(p, target, tok); | ||
| 5376 | try b.intCast(p, target, tok); | ||
| 5377 | } | ||
| 5378 | |||
| 5379 | fn floatConversion(a: *Result, b: *Result, a_spec: Type.Specifier, b_spec: Type.Specifier, p: *Parser, pair: [2]Type.Specifier) !bool { | ||
| 5380 | if (a_spec == pair[0] or a_spec == pair[1] or | ||
| 5381 | b_spec == pair[0] or b_spec == pair[1]) | ||
| 5382 | { | ||
| 5383 | const both_real = a.ty.isReal() and b.ty.isReal(); | ||
| 5384 | const res_spec = pair[@intFromBool(both_real)]; | ||
| 5385 | const ty = Type{ .specifier = res_spec }; | ||
| 5386 | try a.floatCast(p, ty); | ||
| 5387 | try b.floatCast(p, ty); | ||
| 5388 | return true; | ||
| 5389 | } | ||
| 5390 | return false; | ||
| 5391 | } | ||
| 5392 | |||
| 5393 | fn invalidBinTy(a: *Result, tok: TokenIndex, b: *Result, p: *Parser) Error!bool { | ||
| 5394 | try p.errStr(.invalid_bin_types, tok, try p.typePairStr(a.ty, b.ty)); | ||
| 5395 | a.val.tag = .unavailable; | ||
| 5396 | b.val.tag = .unavailable; | ||
| 5397 | a.ty = Type.invalid; | ||
| 5398 | return false; | ||
| 5399 | } | ||
| 5400 | |||
| 5401 | fn shouldEval(a: *Result, b: *Result, p: *Parser) Error!bool { | ||
| 5402 | if (p.no_eval) return false; | ||
| 5403 | if (a.val.tag != .unavailable and b.val.tag != .unavailable) | ||
| 5404 | return true; | ||
| 5405 | |||
| 5406 | try a.saveValue(p); | ||
| 5407 | try b.saveValue(p); | ||
| 5408 | return p.no_eval; | ||
| 5409 | } | ||
| 5410 | |||
| 5411 | /// Saves value and replaces it with `.unavailable`. | ||
| 5412 | fn saveValue(res: *Result, p: *Parser) !void { | ||
| 5413 | assert(!p.in_macro); | ||
| 5414 | if (res.val.tag == .unavailable or res.val.tag == .nullptr_t) return; | ||
| 5415 | if (!p.in_macro) try p.value_map.put(res.node, res.val); | ||
| 5416 | res.val.tag = .unavailable; | ||
| 5417 | } | ||
| 5418 | |||
| 5419 | fn castType(res: *Result, p: *Parser, to: Type, tok: TokenIndex) !void { | ||
| 5420 | var cast_kind: Tree.CastKind = undefined; | ||
| 5421 | |||
| 5422 | if (to.is(.void)) { | ||
| 5423 | // everything can cast to void | ||
| 5424 | cast_kind = .to_void; | ||
| 5425 | res.val.tag = .unavailable; | ||
| 5426 | } else if (to.is(.nullptr_t)) { | ||
| 5427 | if (res.ty.is(.nullptr_t)) { | ||
| 5428 | cast_kind = .no_op; | ||
| 5429 | } else { | ||
| 5430 | try p.errStr(.invalid_object_cast, tok, try p.typePairStrExtra(res.ty, " to ", to)); | ||
| 5431 | return error.ParsingFailed; | ||
| 5432 | } | ||
| 5433 | } else if (res.ty.is(.nullptr_t)) { | ||
| 5434 | if (to.is(.bool)) { | ||
| 5435 | try res.nullCast(p, res.ty); | ||
| 5436 | res.val.toBool(); | ||
| 5437 | res.ty = .{ .specifier = .bool }; | ||
| 5438 | try res.implicitCast(p, .pointer_to_bool); | ||
| 5439 | try res.saveValue(p); | ||
| 5440 | } else if (to.isPtr()) { | ||
| 5441 | try res.nullCast(p, to); | ||
| 5442 | } else { | ||
| 5443 | try p.errStr(.invalid_object_cast, tok, try p.typePairStrExtra(res.ty, " to ", to)); | ||
| 5444 | return error.ParsingFailed; | ||
| 5445 | } | ||
| 5446 | cast_kind = .no_op; | ||
| 5447 | } else if (res.val.isZero() and to.isPtr()) { | ||
| 5448 | cast_kind = .null_to_pointer; | ||
| 5449 | } else if (to.isScalar()) cast: { | ||
| 5450 | const old_float = res.ty.isFloat(); | ||
| 5451 | const new_float = to.isFloat(); | ||
| 5452 | |||
| 5453 | if (new_float and res.ty.isPtr()) { | ||
| 5454 | try p.errStr(.invalid_cast_to_float, tok, try p.typeStr(to)); | ||
| 5455 | return error.ParsingFailed; | ||
| 5456 | } else if (old_float and to.isPtr()) { | ||
| 5457 | try p.errStr(.invalid_cast_to_pointer, tok, try p.typeStr(res.ty)); | ||
| 5458 | return error.ParsingFailed; | ||
| 5459 | } | ||
| 5460 | const old_real = res.ty.isReal(); | ||
| 5461 | const new_real = to.isReal(); | ||
| 5462 | |||
| 5463 | if (to.eql(res.ty, p.comp, false)) { | ||
| 5464 | cast_kind = .no_op; | ||
| 5465 | } else if (to.is(.bool)) { | ||
| 5466 | if (res.ty.isPtr()) { | ||
| 5467 | cast_kind = .pointer_to_bool; | ||
| 5468 | } else if (res.ty.isInt()) { | ||
| 5469 | if (!old_real) { | ||
| 5470 | res.ty = res.ty.makeReal(); | ||
| 5471 | try res.implicitCast(p, .complex_int_to_real); | ||
| 5472 | } | ||
| 5473 | cast_kind = .int_to_bool; | ||
| 5474 | } else if (old_float) { | ||
| 5475 | if (!old_real) { | ||
| 5476 | res.ty = res.ty.makeReal(); | ||
| 5477 | try res.implicitCast(p, .complex_float_to_real); | ||
| 5478 | } | ||
| 5479 | cast_kind = .float_to_bool; | ||
| 5480 | } | ||
| 5481 | } else if (to.isInt()) { | ||
| 5482 | if (res.ty.is(.bool)) { | ||
| 5483 | if (!new_real) { | ||
| 5484 | res.ty = to.makeReal(); | ||
| 5485 | try res.implicitCast(p, .bool_to_int); | ||
| 5486 | cast_kind = .real_to_complex_int; | ||
| 5487 | } else { | ||
| 5488 | cast_kind = .bool_to_int; | ||
| 5489 | } | ||
| 5490 | } else if (res.ty.isInt()) { | ||
| 5491 | if (old_real and new_real) { | ||
| 5492 | cast_kind = .int_cast; | ||
| 5493 | } else if (old_real) { | ||
| 5494 | res.ty = to.makeReal(); | ||
| 5495 | try res.implicitCast(p, .int_cast); | ||
| 5496 | cast_kind = .real_to_complex_int; | ||
| 5497 | } else if (new_real) { | ||
| 5498 | res.ty = res.ty.makeReal(); | ||
| 5499 | try res.implicitCast(p, .complex_int_to_real); | ||
| 5500 | cast_kind = .int_cast; | ||
| 5501 | } else { | ||
| 5502 | cast_kind = .complex_int_cast; | ||
| 5503 | } | ||
| 5504 | } else if (res.ty.isPtr()) { | ||
| 5505 | if (!new_real) { | ||
| 5506 | res.ty = to.makeReal(); | ||
| 5507 | try res.implicitCast(p, .pointer_to_int); | ||
| 5508 | cast_kind = .real_to_complex_int; | ||
| 5509 | } else { | ||
| 5510 | cast_kind = .pointer_to_int; | ||
| 5511 | } | ||
| 5512 | } else if (old_real and new_real) { | ||
| 5513 | cast_kind = .float_to_int; | ||
| 5514 | } else if (old_real) { | ||
| 5515 | res.ty = to.makeReal(); | ||
| 5516 | try res.implicitCast(p, .float_to_int); | ||
| 5517 | cast_kind = .real_to_complex_int; | ||
| 5518 | } else if (new_real) { | ||
| 5519 | res.ty = res.ty.makeReal(); | ||
| 5520 | try res.implicitCast(p, .complex_float_to_real); | ||
| 5521 | cast_kind = .float_to_int; | ||
| 5522 | } else { | ||
| 5523 | cast_kind = .complex_float_to_complex_int; | ||
| 5524 | } | ||
| 5525 | } else if (to.isPtr()) { | ||
| 5526 | if (res.ty.isArray()) | ||
| 5527 | cast_kind = .array_to_pointer | ||
| 5528 | else if (res.ty.isPtr()) | ||
| 5529 | cast_kind = .bitcast | ||
| 5530 | else if (res.ty.isFunc()) | ||
| 5531 | cast_kind = .function_to_pointer | ||
| 5532 | else if (res.ty.is(.bool)) | ||
| 5533 | cast_kind = .bool_to_pointer | ||
| 5534 | else if (res.ty.isInt()) { | ||
| 5535 | if (!old_real) { | ||
| 5536 | res.ty = res.ty.makeReal(); | ||
| 5537 | try res.implicitCast(p, .complex_int_to_real); | ||
| 5538 | } | ||
| 5539 | cast_kind = .int_to_pointer; | ||
| 5540 | } | ||
| 5541 | } else if (new_float) { | ||
| 5542 | if (res.ty.is(.bool)) { | ||
| 5543 | if (!new_real) { | ||
| 5544 | res.ty = to.makeReal(); | ||
| 5545 | try res.implicitCast(p, .bool_to_float); | ||
| 5546 | cast_kind = .real_to_complex_float; | ||
| 5547 | } else { | ||
| 5548 | cast_kind = .bool_to_float; | ||
| 5549 | } | ||
| 5550 | } else if (res.ty.isInt()) { | ||
| 5551 | if (old_real and new_real) { | ||
| 5552 | cast_kind = .int_to_float; | ||
| 5553 | } else if (old_real) { | ||
| 5554 | res.ty = to.makeReal(); | ||
| 5555 | try res.implicitCast(p, .int_to_float); | ||
| 5556 | cast_kind = .real_to_complex_float; | ||
| 5557 | } else if (new_real) { | ||
| 5558 | res.ty = res.ty.makeReal(); | ||
| 5559 | try res.implicitCast(p, .complex_int_to_real); | ||
| 5560 | cast_kind = .int_to_float; | ||
| 5561 | } else { | ||
| 5562 | cast_kind = .complex_int_to_complex_float; | ||
| 5563 | } | ||
| 5564 | } else if (old_real and new_real) { | ||
| 5565 | cast_kind = .float_cast; | ||
| 5566 | } else if (old_real) { | ||
| 5567 | res.ty = to.makeReal(); | ||
| 5568 | try res.implicitCast(p, .float_cast); | ||
| 5569 | cast_kind = .real_to_complex_float; | ||
| 5570 | } else if (new_real) { | ||
| 5571 | res.ty = res.ty.makeReal(); | ||
| 5572 | try res.implicitCast(p, .complex_float_to_real); | ||
| 5573 | cast_kind = .float_cast; | ||
| 5574 | } else { | ||
| 5575 | cast_kind = .complex_float_cast; | ||
| 5576 | } | ||
| 5577 | } | ||
| 5578 | if (res.val.tag == .unavailable) break :cast; | ||
| 5579 | |||
| 5580 | const old_int = res.ty.isInt() or res.ty.isPtr(); | ||
| 5581 | const new_int = to.isInt() or to.isPtr(); | ||
| 5582 | if (to.is(.bool)) { | ||
| 5583 | res.val.toBool(); | ||
| 5584 | } else if (old_float and new_int) { | ||
| 5585 | // Explicit cast, no conversion warning | ||
| 5586 | _ = res.val.floatToInt(res.ty, to, p.comp); | ||
| 5587 | } else if (new_float and old_int) { | ||
| 5588 | res.val.intToFloat(res.ty, to, p.comp); | ||
| 5589 | } else if (new_float and old_float) { | ||
| 5590 | res.val.floatCast(res.ty, to, p.comp); | ||
| 5591 | } else if (old_int and new_int) { | ||
| 5592 | if (to.hasIncompleteSize()) { | ||
| 5593 | try p.errStr(.cast_to_incomplete_type, tok, try p.typeStr(to)); | ||
| 5594 | return error.ParsingFailed; | ||
| 5595 | } | ||
| 5596 | res.val.intCast(res.ty, to, p.comp); | ||
| 5597 | } | ||
| 5598 | } else if (to.get(.@"union")) |union_ty| { | ||
| 5599 | if (union_ty.data.record.hasFieldOfType(res.ty, p.comp)) { | ||
| 5600 | cast_kind = .union_cast; | ||
| 5601 | try p.errTok(.gnu_union_cast, tok); | ||
| 5602 | } else { | ||
| 5603 | if (union_ty.data.record.isIncomplete()) { | ||
| 5604 | try p.errStr(.cast_to_incomplete_type, tok, try p.typeStr(to)); | ||
| 5605 | } else { | ||
| 5606 | try p.errStr(.invalid_union_cast, tok, try p.typeStr(res.ty)); | ||
| 5607 | } | ||
| 5608 | return error.ParsingFailed; | ||
| 5609 | } | ||
| 5610 | } else { | ||
| 5611 | if (to.is(.auto_type)) { | ||
| 5612 | try p.errTok(.invalid_cast_to_auto_type, tok); | ||
| 5613 | } else { | ||
| 5614 | try p.errStr(.invalid_cast_type, tok, try p.typeStr(to)); | ||
| 5615 | } | ||
| 5616 | return error.ParsingFailed; | ||
| 5617 | } | ||
| 5618 | if (to.anyQual()) try p.errStr(.qual_cast, tok, try p.typeStr(to)); | ||
| 5619 | if (to.isInt() and res.ty.isPtr() and to.sizeCompare(res.ty, p.comp) == .lt) { | ||
| 5620 | try p.errStr(.cast_to_smaller_int, tok, try p.typePairStrExtra(to, " from ", res.ty)); | ||
| 5621 | } | ||
| 5622 | res.ty = to; | ||
| 5623 | res.ty.qual = .{}; | ||
| 5624 | res.node = try p.addNode(.{ | ||
| 5625 | .tag = .explicit_cast, | ||
| 5626 | .ty = res.ty, | ||
| 5627 | .data = .{ .cast = .{ .operand = res.node, .kind = cast_kind } }, | ||
| 5628 | }); | ||
| 5629 | } | ||
| 5630 | |||
| 5631 | fn intFitsInType(res: Result, p: *Parser, ty: Type) bool { | ||
| 5632 | const max_int = Value.int(ty.maxInt(p.comp)); | ||
| 5633 | const min_int = Value.int(ty.minInt(p.comp)); | ||
| 5634 | return res.val.compare(.lte, max_int, res.ty, p.comp) and | ||
| 5635 | (res.ty.isUnsignedInt(p.comp) or res.val.compare(.gte, min_int, res.ty, p.comp)); | ||
| 5636 | } | ||
| 5637 | |||
| 5638 | const CoerceContext = union(enum) { | ||
| 5639 | assign, | ||
| 5640 | init, | ||
| 5641 | ret, | ||
| 5642 | arg: TokenIndex, | ||
| 5643 | test_coerce, | ||
| 5644 | |||
| 5645 | fn note(ctx: CoerceContext, p: *Parser) !void { | ||
| 5646 | switch (ctx) { | ||
| 5647 | .arg => |tok| try p.errTok(.parameter_here, tok), | ||
| 5648 | .test_coerce => unreachable, | ||
| 5649 | else => {}, | ||
| 5650 | } | ||
| 5651 | } | ||
| 5652 | |||
| 5653 | fn typePairStr(ctx: CoerceContext, p: *Parser, dest_ty: Type, src_ty: Type) ![]const u8 { | ||
| 5654 | switch (ctx) { | ||
| 5655 | .assign, .init => return p.typePairStrExtra(dest_ty, " from incompatible type ", src_ty), | ||
| 5656 | .ret => return p.typePairStrExtra(src_ty, " from a function with incompatible result type ", dest_ty), | ||
| 5657 | .arg => return p.typePairStrExtra(src_ty, " to parameter of incompatible type ", dest_ty), | ||
| 5658 | .test_coerce => unreachable, | ||
| 5659 | } | ||
| 5660 | } | ||
| 5661 | }; | ||
| 5662 | |||
| 5663 | /// Perform assignment-like coercion to `dest_ty`. | ||
| 5664 | fn coerce(res: *Result, p: *Parser, dest_ty: Type, tok: TokenIndex, ctx: CoerceContext) Error!void { | ||
| 5665 | if (res.ty.specifier == .invalid or dest_ty.specifier == .invalid) { | ||
| 5666 | res.ty = Type.invalid; | ||
| 5667 | return; | ||
| 5668 | } | ||
| 5669 | return res.coerceExtra(p, dest_ty, tok, ctx) catch |er| switch (er) { | ||
| 5670 | error.CoercionFailed => unreachable, | ||
| 5671 | else => |e| return e, | ||
| 5672 | }; | ||
| 5673 | } | ||
| 5674 | |||
| 5675 | const Stage1Limitation = Error || error{CoercionFailed}; | ||
| 5676 | fn coerceExtra(res: *Result, p: *Parser, dest_ty: Type, tok: TokenIndex, ctx: CoerceContext) Stage1Limitation!void { | ||
| 5677 | // Subject of the coercion does not need to be qualified. | ||
| 5678 | var unqual_ty = dest_ty.canonicalize(.standard); | ||
| 5679 | unqual_ty.qual = .{}; | ||
| 5680 | if (unqual_ty.is(.nullptr_t)) { | ||
| 5681 | if (res.ty.is(.nullptr_t)) return; | ||
| 5682 | } else if (unqual_ty.is(.bool)) { | ||
| 5683 | if (res.ty.isScalar() and !res.ty.is(.nullptr_t)) { | ||
| 5684 | // this is ridiculous but it's what clang does | ||
| 5685 | try res.boolCast(p, unqual_ty, tok); | ||
| 5686 | return; | ||
| 5687 | } | ||
| 5688 | } else if (unqual_ty.isInt()) { | ||
| 5689 | if (res.ty.isInt() or res.ty.isFloat()) { | ||
| 5690 | try res.intCast(p, unqual_ty, tok); | ||
| 5691 | return; | ||
| 5692 | } else if (res.ty.isPtr()) { | ||
| 5693 | if (ctx == .test_coerce) return error.CoercionFailed; | ||
| 5694 | try p.errStr(.implicit_ptr_to_int, tok, try p.typePairStrExtra(res.ty, " to ", dest_ty)); | ||
| 5695 | try ctx.note(p); | ||
| 5696 | try res.intCast(p, unqual_ty, tok); | ||
| 5697 | return; | ||
| 5698 | } | ||
| 5699 | } else if (unqual_ty.isFloat()) { | ||
| 5700 | if (res.ty.isInt() or res.ty.isFloat()) { | ||
| 5701 | try res.floatCast(p, unqual_ty); | ||
| 5702 | return; | ||
| 5703 | } | ||
| 5704 | } else if (unqual_ty.isPtr()) { | ||
| 5705 | if (res.ty.is(.nullptr_t) or res.val.isZero()) { | ||
| 5706 | try res.nullCast(p, dest_ty); | ||
| 5707 | return; | ||
| 5708 | } else if (res.ty.isInt() and res.ty.isReal()) { | ||
| 5709 | if (ctx == .test_coerce) return error.CoercionFailed; | ||
| 5710 | try p.errStr(.implicit_int_to_ptr, tok, try p.typePairStrExtra(res.ty, " to ", dest_ty)); | ||
| 5711 | try ctx.note(p); | ||
| 5712 | try res.ptrCast(p, unqual_ty); | ||
| 5713 | return; | ||
| 5714 | } else if (res.ty.isVoidStar() or unqual_ty.eql(res.ty, p.comp, true)) { | ||
| 5715 | return; // ok | ||
| 5716 | } else if (unqual_ty.isVoidStar() and res.ty.isPtr() or (res.ty.isInt() and res.ty.isReal())) { | ||
| 5717 | return; // ok | ||
| 5718 | } else if (unqual_ty.eql(res.ty, p.comp, false)) { | ||
| 5719 | if (!unqual_ty.elemType().qual.hasQuals(res.ty.elemType().qual)) { | ||
| 5720 | try p.errStr(switch (ctx) { | ||
| 5721 | .assign => .ptr_assign_discards_quals, | ||
| 5722 | .init => .ptr_init_discards_quals, | ||
| 5723 | .ret => .ptr_ret_discards_quals, | ||
| 5724 | .arg => .ptr_arg_discards_quals, | ||
| 5725 | .test_coerce => return error.CoercionFailed, | ||
| 5726 | }, tok, try ctx.typePairStr(p, dest_ty, res.ty)); | ||
| 5727 | } | ||
| 5728 | try res.ptrCast(p, unqual_ty); | ||
| 5729 | return; | ||
| 5730 | } else if (res.ty.isPtr()) { | ||
| 5731 | const different_sign_only = unqual_ty.elemType().sameRankDifferentSign(res.ty.elemType(), p.comp); | ||
| 5732 | try p.errStr(switch (ctx) { | ||
| 5733 | .assign => ([2]Diagnostics.Tag{ .incompatible_ptr_assign, .incompatible_ptr_assign_sign })[@intFromBool(different_sign_only)], | ||
| 5734 | .init => ([2]Diagnostics.Tag{ .incompatible_ptr_init, .incompatible_ptr_init_sign })[@intFromBool(different_sign_only)], | ||
| 5735 | .ret => ([2]Diagnostics.Tag{ .incompatible_return, .incompatible_return_sign })[@intFromBool(different_sign_only)], | ||
| 5736 | .arg => ([2]Diagnostics.Tag{ .incompatible_ptr_arg, .incompatible_ptr_arg_sign })[@intFromBool(different_sign_only)], | ||
| 5737 | .test_coerce => return error.CoercionFailed, | ||
| 5738 | }, tok, try ctx.typePairStr(p, dest_ty, res.ty)); | ||
| 5739 | try ctx.note(p); | ||
| 5740 | try res.ptrChildTypeCast(p, unqual_ty); | ||
| 5741 | return; | ||
| 5742 | } | ||
| 5743 | } else if (unqual_ty.isRecord()) { | ||
| 5744 | if (unqual_ty.eql(res.ty, p.comp, false)) { | ||
| 5745 | return; // ok | ||
| 5746 | } | ||
| 5747 | |||
| 5748 | if (ctx == .arg) if (unqual_ty.get(.@"union")) |union_ty| { | ||
| 5749 | if (dest_ty.hasAttribute(.transparent_union)) transparent_union: { | ||
| 5750 | res.coerceExtra(p, union_ty.data.record.fields[0].ty, tok, .test_coerce) catch |er| switch (er) { | ||
| 5751 | error.CoercionFailed => break :transparent_union, | ||
| 5752 | else => |e| return e, | ||
| 5753 | }; | ||
| 5754 | res.node = try p.addNode(.{ | ||
| 5755 | .tag = .union_init_expr, | ||
| 5756 | .ty = dest_ty, | ||
| 5757 | .data = .{ .union_init = .{ .field_index = 0, .node = res.node } }, | ||
| 5758 | }); | ||
| 5759 | res.ty = dest_ty; | ||
| 5760 | return; | ||
| 5761 | } | ||
| 5762 | }; | ||
| 5763 | } else if (unqual_ty.is(.vector)) { | ||
| 5764 | if (unqual_ty.eql(res.ty, p.comp, false)) { | ||
| 5765 | return; // ok | ||
| 5766 | } | ||
| 5767 | } else { | ||
| 5768 | if (ctx == .assign and (unqual_ty.isArray() or unqual_ty.isFunc())) { | ||
| 5769 | try p.errTok(.not_assignable, tok); | ||
| 5770 | return; | ||
| 5771 | } else if (ctx == .test_coerce) { | ||
| 5772 | return error.CoercionFailed; | ||
| 5773 | } | ||
| 5774 | // This case should not be possible and an error should have already been emitted but we | ||
| 5775 | // might still have attempted to parse further so return error.ParsingFailed here to stop. | ||
| 5776 | return error.ParsingFailed; | ||
| 5777 | } | ||
| 5778 | |||
| 5779 | try p.errStr(switch (ctx) { | ||
| 5780 | .assign => .incompatible_assign, | ||
| 5781 | .init => .incompatible_init, | ||
| 5782 | .ret => .incompatible_return, | ||
| 5783 | .arg => .incompatible_arg, | ||
| 5784 | .test_coerce => return error.CoercionFailed, | ||
| 5785 | }, tok, try ctx.typePairStr(p, dest_ty, res.ty)); | ||
| 5786 | try ctx.note(p); | ||
| 5787 | } | ||
| 5788 | }; | ||
| 5789 | |||
| 5790 | /// expr : assignExpr (',' assignExpr)* | ||
| 5791 | fn expr(p: *Parser) Error!Result { | ||
| 5792 | var expr_start = p.tok_i; | ||
| 5793 | var err_start = p.comp.diag.list.items.len; | ||
| 5794 | var lhs = try p.assignExpr(); | ||
| 5795 | if (p.tok_ids[p.tok_i] == .comma) try lhs.expect(p); | ||
| 5796 | while (p.eatToken(.comma)) |_| { | ||
| 5797 | try lhs.maybeWarnUnused(p, expr_start, err_start); | ||
| 5798 | expr_start = p.tok_i; | ||
| 5799 | err_start = p.comp.diag.list.items.len; | ||
| 5800 | |||
| 5801 | var rhs = try p.assignExpr(); | ||
| 5802 | try rhs.expect(p); | ||
| 5803 | try rhs.lvalConversion(p); | ||
| 5804 | lhs.val = rhs.val; | ||
| 5805 | lhs.ty = rhs.ty; | ||
| 5806 | try lhs.bin(p, .comma_expr, rhs); | ||
| 5807 | } | ||
| 5808 | return lhs; | ||
| 5809 | } | ||
| 5810 | |||
| 5811 | fn tokToTag(p: *Parser, tok: TokenIndex) Tree.Tag { | ||
| 5812 | return switch (p.tok_ids[tok]) { | ||
| 5813 | .equal => .assign_expr, | ||
| 5814 | .asterisk_equal => .mul_assign_expr, | ||
| 5815 | .slash_equal => .div_assign_expr, | ||
| 5816 | .percent_equal => .mod_assign_expr, | ||
| 5817 | .plus_equal => .add_assign_expr, | ||
| 5818 | .minus_equal => .sub_assign_expr, | ||
| 5819 | .angle_bracket_angle_bracket_left_equal => .shl_assign_expr, | ||
| 5820 | .angle_bracket_angle_bracket_right_equal => .shr_assign_expr, | ||
| 5821 | .ampersand_equal => .bit_and_assign_expr, | ||
| 5822 | .caret_equal => .bit_xor_assign_expr, | ||
| 5823 | .pipe_equal => .bit_or_assign_expr, | ||
| 5824 | .equal_equal => .equal_expr, | ||
| 5825 | .bang_equal => .not_equal_expr, | ||
| 5826 | .angle_bracket_left => .less_than_expr, | ||
| 5827 | .angle_bracket_left_equal => .less_than_equal_expr, | ||
| 5828 | .angle_bracket_right => .greater_than_expr, | ||
| 5829 | .angle_bracket_right_equal => .greater_than_equal_expr, | ||
| 5830 | .angle_bracket_angle_bracket_left => .shl_expr, | ||
| 5831 | .angle_bracket_angle_bracket_right => .shr_expr, | ||
| 5832 | .plus => .add_expr, | ||
| 5833 | .minus => .sub_expr, | ||
| 5834 | .asterisk => .mul_expr, | ||
| 5835 | .slash => .div_expr, | ||
| 5836 | .percent => .mod_expr, | ||
| 5837 | else => unreachable, | ||
| 5838 | }; | ||
| 5839 | } | ||
| 5840 | |||
| 5841 | /// assignExpr | ||
| 5842 | /// : condExpr | ||
| 5843 | /// | unExpr ('=' | '*=' | '/=' | '%=' | '+=' | '-=' | '<<=' | '>>=' | '&=' | '^=' | '|=') assignExpr | ||
| 5844 | fn assignExpr(p: *Parser) Error!Result { | ||
| 5845 | var lhs = try p.condExpr(); | ||
| 5846 | if (lhs.empty(p)) return lhs; | ||
| 5847 | |||
| 5848 | const tok = p.tok_i; | ||
| 5849 | const eq = p.eatToken(.equal); | ||
| 5850 | const mul = eq orelse p.eatToken(.asterisk_equal); | ||
| 5851 | const div = mul orelse p.eatToken(.slash_equal); | ||
| 5852 | const mod = div orelse p.eatToken(.percent_equal); | ||
| 5853 | const add = mod orelse p.eatToken(.plus_equal); | ||
| 5854 | const sub = add orelse p.eatToken(.minus_equal); | ||
| 5855 | const shl = sub orelse p.eatToken(.angle_bracket_angle_bracket_left_equal); | ||
| 5856 | const shr = shl orelse p.eatToken(.angle_bracket_angle_bracket_right_equal); | ||
| 5857 | const bit_and = shr orelse p.eatToken(.ampersand_equal); | ||
| 5858 | const bit_xor = bit_and orelse p.eatToken(.caret_equal); | ||
| 5859 | const bit_or = bit_xor orelse p.eatToken(.pipe_equal); | ||
| 5860 | |||
| 5861 | const tag = p.tokToTag(bit_or orelse return lhs); | ||
| 5862 | var rhs = try p.assignExpr(); | ||
| 5863 | try rhs.expect(p); | ||
| 5864 | try rhs.lvalConversion(p); | ||
| 5865 | |||
| 5866 | var is_const: bool = undefined; | ||
| 5867 | if (!Tree.isLvalExtra(p.nodes.slice(), p.data.items, p.value_map, lhs.node, &is_const) or is_const) { | ||
| 5868 | try p.errTok(.not_assignable, tok); | ||
| 5869 | return error.ParsingFailed; | ||
| 5870 | } | ||
| 5871 | |||
| 5872 | // adjustTypes will do do lvalue conversion but we do not want that | ||
| 5873 | var lhs_copy = lhs; | ||
| 5874 | switch (tag) { | ||
| 5875 | .assign_expr => {}, // handle plain assignment separately | ||
| 5876 | .mul_assign_expr, | ||
| 5877 | .div_assign_expr, | ||
| 5878 | .mod_assign_expr, | ||
| 5879 | => { | ||
| 5880 | if (rhs.val.isZero() and lhs.ty.isInt() and rhs.ty.isInt()) { | ||
| 5881 | switch (tag) { | ||
| 5882 | .div_assign_expr => try p.errStr(.division_by_zero, div.?, "division"), | ||
| 5883 | .mod_assign_expr => try p.errStr(.division_by_zero, mod.?, "remainder"), | ||
| 5884 | else => {}, | ||
| 5885 | } | ||
| 5886 | } | ||
| 5887 | _ = try lhs_copy.adjustTypes(tok, &rhs, p, if (tag == .mod_assign_expr) .integer else .arithmetic); | ||
| 5888 | try lhs.bin(p, tag, rhs); | ||
| 5889 | return lhs; | ||
| 5890 | }, | ||
| 5891 | .sub_assign_expr, | ||
| 5892 | .add_assign_expr, | ||
| 5893 | => { | ||
| 5894 | if (lhs.ty.isPtr() and rhs.ty.isInt()) { | ||
| 5895 | try rhs.ptrCast(p, lhs.ty); | ||
| 5896 | } else { | ||
| 5897 | _ = try lhs_copy.adjustTypes(tok, &rhs, p, .arithmetic); | ||
| 5898 | } | ||
| 5899 | try lhs.bin(p, tag, rhs); | ||
| 5900 | return lhs; | ||
| 5901 | }, | ||
| 5902 | .shl_assign_expr, | ||
| 5903 | .shr_assign_expr, | ||
| 5904 | .bit_and_assign_expr, | ||
| 5905 | .bit_xor_assign_expr, | ||
| 5906 | .bit_or_assign_expr, | ||
| 5907 | => { | ||
| 5908 | _ = try lhs_copy.adjustTypes(tok, &rhs, p, .integer); | ||
| 5909 | try lhs.bin(p, tag, rhs); | ||
| 5910 | return lhs; | ||
| 5911 | }, | ||
| 5912 | else => unreachable, | ||
| 5913 | } | ||
| 5914 | |||
| 5915 | try rhs.coerce(p, lhs.ty, tok, .assign); | ||
| 5916 | |||
| 5917 | try lhs.bin(p, tag, rhs); | ||
| 5918 | return lhs; | ||
| 5919 | } | ||
| 5920 | |||
| 5921 | /// Returns a parse error if the expression is not an integer constant | ||
| 5922 | /// integerConstExpr : constExpr | ||
| 5923 | fn integerConstExpr(p: *Parser, decl_folding: ConstDeclFoldingMode) Error!Result { | ||
| 5924 | const start = p.tok_i; | ||
| 5925 | const res = try p.constExpr(decl_folding); | ||
| 5926 | if (!res.ty.isInt() and res.ty.specifier != .invalid) { | ||
| 5927 | try p.errTok(.expected_integer_constant_expr, start); | ||
| 5928 | return error.ParsingFailed; | ||
| 5929 | } | ||
| 5930 | return res; | ||
| 5931 | } | ||
| 5932 | |||
| 5933 | /// Caller is responsible for issuing a diagnostic if result is invalid/unavailable | ||
| 5934 | /// constExpr : condExpr | ||
| 5935 | fn constExpr(p: *Parser, decl_folding: ConstDeclFoldingMode) Error!Result { | ||
| 5936 | const const_decl_folding = p.const_decl_folding; | ||
| 5937 | defer p.const_decl_folding = const_decl_folding; | ||
| 5938 | p.const_decl_folding = decl_folding; | ||
| 5939 | |||
| 5940 | const res = try p.condExpr(); | ||
| 5941 | try res.expect(p); | ||
| 5942 | |||
| 5943 | if (res.ty.specifier == .invalid or res.val.tag == .unavailable) return res; | ||
| 5944 | |||
| 5945 | // saveValue sets val to unavailable | ||
| 5946 | var copy = res; | ||
| 5947 | try copy.saveValue(p); | ||
| 5948 | return res; | ||
| 5949 | } | ||
| 5950 | |||
| 5951 | /// condExpr : lorExpr ('?' expression? ':' condExpr)? | ||
| 5952 | fn condExpr(p: *Parser) Error!Result { | ||
| 5953 | const cond_tok = p.tok_i; | ||
| 5954 | var cond = try p.lorExpr(); | ||
| 5955 | if (cond.empty(p) or p.eatToken(.question_mark) == null) return cond; | ||
| 5956 | try cond.lvalConversion(p); | ||
| 5957 | const saved_eval = p.no_eval; | ||
| 5958 | |||
| 5959 | if (!cond.ty.isScalar()) { | ||
| 5960 | try p.errStr(.cond_expr_type, cond_tok, try p.typeStr(cond.ty)); | ||
| 5961 | return error.ParsingFailed; | ||
| 5962 | } | ||
| 5963 | |||
| 5964 | // Prepare for possible binary conditional expression. | ||
| 5965 | var maybe_colon = p.eatToken(.colon); | ||
| 5966 | |||
| 5967 | // Depending on the value of the condition, avoid evaluating unreachable branches. | ||
| 5968 | var then_expr = blk: { | ||
| 5969 | defer p.no_eval = saved_eval; | ||
| 5970 | if (cond.val.tag != .unavailable and !cond.val.getBool()) p.no_eval = true; | ||
| 5971 | break :blk try p.expr(); | ||
| 5972 | }; | ||
| 5973 | try then_expr.expect(p); | ||
| 5974 | |||
| 5975 | // If we saw a colon then this is a binary conditional expression. | ||
| 5976 | if (maybe_colon) |colon| { | ||
| 5977 | var cond_then = cond; | ||
| 5978 | cond_then.node = try p.addNode(.{ .tag = .cond_dummy_expr, .ty = cond.ty, .data = .{ .un = cond.node } }); | ||
| 5979 | _ = try cond_then.adjustTypes(colon, &then_expr, p, .conditional); | ||
| 5980 | cond.ty = then_expr.ty; | ||
| 5981 | cond.node = try p.addNode(.{ | ||
| 5982 | .tag = .binary_cond_expr, | ||
| 5983 | .ty = cond.ty, | ||
| 5984 | .data = .{ .if3 = .{ .cond = cond.node, .body = (try p.addList(&.{ cond_then.node, then_expr.node })).start } }, | ||
| 5985 | }); | ||
| 5986 | return cond; | ||
| 5987 | } | ||
| 5988 | |||
| 5989 | const colon = try p.expectToken(.colon); | ||
| 5990 | var else_expr = blk: { | ||
| 5991 | defer p.no_eval = saved_eval; | ||
| 5992 | if (cond.val.tag != .unavailable and cond.val.getBool()) p.no_eval = true; | ||
| 5993 | break :blk try p.condExpr(); | ||
| 5994 | }; | ||
| 5995 | try else_expr.expect(p); | ||
| 5996 | |||
| 5997 | _ = try then_expr.adjustTypes(colon, &else_expr, p, .conditional); | ||
| 5998 | |||
| 5999 | if (cond.val.tag != .unavailable) { | ||
| 6000 | cond.val = if (cond.val.getBool()) then_expr.val else else_expr.val; | ||
| 6001 | } else { | ||
| 6002 | try then_expr.saveValue(p); | ||
| 6003 | try else_expr.saveValue(p); | ||
| 6004 | } | ||
| 6005 | cond.ty = then_expr.ty; | ||
| 6006 | cond.node = try p.addNode(.{ | ||
| 6007 | .tag = .cond_expr, | ||
| 6008 | .ty = cond.ty, | ||
| 6009 | .data = .{ .if3 = .{ .cond = cond.node, .body = (try p.addList(&.{ then_expr.node, else_expr.node })).start } }, | ||
| 6010 | }); | ||
| 6011 | return cond; | ||
| 6012 | } | ||
| 6013 | |||
| 6014 | /// lorExpr : landExpr ('||' landExpr)* | ||
| 6015 | fn lorExpr(p: *Parser) Error!Result { | ||
| 6016 | var lhs = try p.landExpr(); | ||
| 6017 | if (lhs.empty(p)) return lhs; | ||
| 6018 | const saved_eval = p.no_eval; | ||
| 6019 | defer p.no_eval = saved_eval; | ||
| 6020 | |||
| 6021 | while (p.eatToken(.pipe_pipe)) |tok| { | ||
| 6022 | if (lhs.val.tag != .unavailable and lhs.val.getBool()) p.no_eval = true; | ||
| 6023 | var rhs = try p.landExpr(); | ||
| 6024 | try rhs.expect(p); | ||
| 6025 | |||
| 6026 | if (try lhs.adjustTypes(tok, &rhs, p, .boolean_logic)) { | ||
| 6027 | const res = @intFromBool(lhs.val.getBool() or rhs.val.getBool()); | ||
| 6028 | lhs.val = Value.int(res); | ||
| 6029 | } | ||
| 6030 | try lhs.boolRes(p, .bool_or_expr, rhs); | ||
| 6031 | } | ||
| 6032 | return lhs; | ||
| 6033 | } | ||
| 6034 | |||
| 6035 | /// landExpr : orExpr ('&&' orExpr)* | ||
| 6036 | fn landExpr(p: *Parser) Error!Result { | ||
| 6037 | var lhs = try p.orExpr(); | ||
| 6038 | if (lhs.empty(p)) return lhs; | ||
| 6039 | const saved_eval = p.no_eval; | ||
| 6040 | defer p.no_eval = saved_eval; | ||
| 6041 | |||
| 6042 | while (p.eatToken(.ampersand_ampersand)) |tok| { | ||
| 6043 | if (lhs.val.tag != .unavailable and !lhs.val.getBool()) p.no_eval = true; | ||
| 6044 | var rhs = try p.orExpr(); | ||
| 6045 | try rhs.expect(p); | ||
| 6046 | |||
| 6047 | if (try lhs.adjustTypes(tok, &rhs, p, .boolean_logic)) { | ||
| 6048 | const res = @intFromBool(lhs.val.getBool() and rhs.val.getBool()); | ||
| 6049 | lhs.val = Value.int(res); | ||
| 6050 | } | ||
| 6051 | try lhs.boolRes(p, .bool_and_expr, rhs); | ||
| 6052 | } | ||
| 6053 | return lhs; | ||
| 6054 | } | ||
| 6055 | |||
| 6056 | /// orExpr : xorExpr ('|' xorExpr)* | ||
| 6057 | fn orExpr(p: *Parser) Error!Result { | ||
| 6058 | var lhs = try p.xorExpr(); | ||
| 6059 | if (lhs.empty(p)) return lhs; | ||
| 6060 | while (p.eatToken(.pipe)) |tok| { | ||
| 6061 | var rhs = try p.xorExpr(); | ||
| 6062 | try rhs.expect(p); | ||
| 6063 | |||
| 6064 | if (try lhs.adjustTypes(tok, &rhs, p, .integer)) { | ||
| 6065 | lhs.val = lhs.val.bitOr(rhs.val, lhs.ty, p.comp); | ||
| 6066 | } | ||
| 6067 | try lhs.bin(p, .bit_or_expr, rhs); | ||
| 6068 | } | ||
| 6069 | return lhs; | ||
| 6070 | } | ||
| 6071 | |||
| 6072 | /// xorExpr : andExpr ('^' andExpr)* | ||
| 6073 | fn xorExpr(p: *Parser) Error!Result { | ||
| 6074 | var lhs = try p.andExpr(); | ||
| 6075 | if (lhs.empty(p)) return lhs; | ||
| 6076 | while (p.eatToken(.caret)) |tok| { | ||
| 6077 | var rhs = try p.andExpr(); | ||
| 6078 | try rhs.expect(p); | ||
| 6079 | |||
| 6080 | if (try lhs.adjustTypes(tok, &rhs, p, .integer)) { | ||
| 6081 | lhs.val = lhs.val.bitXor(rhs.val, lhs.ty, p.comp); | ||
| 6082 | } | ||
| 6083 | try lhs.bin(p, .bit_xor_expr, rhs); | ||
| 6084 | } | ||
| 6085 | return lhs; | ||
| 6086 | } | ||
| 6087 | |||
| 6088 | /// andExpr : eqExpr ('&' eqExpr)* | ||
| 6089 | fn andExpr(p: *Parser) Error!Result { | ||
| 6090 | var lhs = try p.eqExpr(); | ||
| 6091 | if (lhs.empty(p)) return lhs; | ||
| 6092 | while (p.eatToken(.ampersand)) |tok| { | ||
| 6093 | var rhs = try p.eqExpr(); | ||
| 6094 | try rhs.expect(p); | ||
| 6095 | |||
| 6096 | if (try lhs.adjustTypes(tok, &rhs, p, .integer)) { | ||
| 6097 | lhs.val = lhs.val.bitAnd(rhs.val, lhs.ty, p.comp); | ||
| 6098 | } | ||
| 6099 | try lhs.bin(p, .bit_and_expr, rhs); | ||
| 6100 | } | ||
| 6101 | return lhs; | ||
| 6102 | } | ||
| 6103 | |||
| 6104 | /// eqExpr : compExpr (('==' | '!=') compExpr)* | ||
| 6105 | fn eqExpr(p: *Parser) Error!Result { | ||
| 6106 | var lhs = try p.compExpr(); | ||
| 6107 | if (lhs.empty(p)) return lhs; | ||
| 6108 | while (true) { | ||
| 6109 | const eq = p.eatToken(.equal_equal); | ||
| 6110 | const ne = eq orelse p.eatToken(.bang_equal); | ||
| 6111 | const tag = p.tokToTag(ne orelse break); | ||
| 6112 | var rhs = try p.compExpr(); | ||
| 6113 | try rhs.expect(p); | ||
| 6114 | |||
| 6115 | if (try lhs.adjustTypes(ne.?, &rhs, p, .equality)) { | ||
| 6116 | const op: std.math.CompareOperator = if (tag == .equal_expr) .eq else .neq; | ||
| 6117 | const res = lhs.val.compare(op, rhs.val, lhs.ty, p.comp); | ||
| 6118 | lhs.val = Value.int(@intFromBool(res)); | ||
| 6119 | } | ||
| 6120 | try lhs.boolRes(p, tag, rhs); | ||
| 6121 | } | ||
| 6122 | return lhs; | ||
| 6123 | } | ||
| 6124 | |||
| 6125 | /// compExpr : shiftExpr (('<' | '<=' | '>' | '>=') shiftExpr)* | ||
| 6126 | fn compExpr(p: *Parser) Error!Result { | ||
| 6127 | var lhs = try p.shiftExpr(); | ||
| 6128 | if (lhs.empty(p)) return lhs; | ||
| 6129 | while (true) { | ||
| 6130 | const lt = p.eatToken(.angle_bracket_left); | ||
| 6131 | const le = lt orelse p.eatToken(.angle_bracket_left_equal); | ||
| 6132 | const gt = le orelse p.eatToken(.angle_bracket_right); | ||
| 6133 | const ge = gt orelse p.eatToken(.angle_bracket_right_equal); | ||
| 6134 | const tag = p.tokToTag(ge orelse break); | ||
| 6135 | var rhs = try p.shiftExpr(); | ||
| 6136 | try rhs.expect(p); | ||
| 6137 | |||
| 6138 | if (try lhs.adjustTypes(ge.?, &rhs, p, .relational)) { | ||
| 6139 | const op: std.math.CompareOperator = switch (tag) { | ||
| 6140 | .less_than_expr => .lt, | ||
| 6141 | .less_than_equal_expr => .lte, | ||
| 6142 | .greater_than_expr => .gt, | ||
| 6143 | .greater_than_equal_expr => .gte, | ||
| 6144 | else => unreachable, | ||
| 6145 | }; | ||
| 6146 | const res = lhs.val.compare(op, rhs.val, lhs.ty, p.comp); | ||
| 6147 | lhs.val = Value.int(@intFromBool(res)); | ||
| 6148 | } | ||
| 6149 | try lhs.boolRes(p, tag, rhs); | ||
| 6150 | } | ||
| 6151 | return lhs; | ||
| 6152 | } | ||
| 6153 | |||
| 6154 | /// shiftExpr : addExpr (('<<' | '>>') addExpr)* | ||
| 6155 | fn shiftExpr(p: *Parser) Error!Result { | ||
| 6156 | var lhs = try p.addExpr(); | ||
| 6157 | if (lhs.empty(p)) return lhs; | ||
| 6158 | while (true) { | ||
| 6159 | const shl = p.eatToken(.angle_bracket_angle_bracket_left); | ||
| 6160 | const shr = shl orelse p.eatToken(.angle_bracket_angle_bracket_right); | ||
| 6161 | const tag = p.tokToTag(shr orelse break); | ||
| 6162 | var rhs = try p.addExpr(); | ||
| 6163 | try rhs.expect(p); | ||
| 6164 | |||
| 6165 | if (try lhs.adjustTypes(shr.?, &rhs, p, .integer)) { | ||
| 6166 | if (shl != null) { | ||
| 6167 | lhs.val = lhs.val.shl(rhs.val, lhs.ty, p.comp); | ||
| 6168 | } else { | ||
| 6169 | lhs.val = lhs.val.shr(rhs.val, lhs.ty, p.comp); | ||
| 6170 | } | ||
| 6171 | } | ||
| 6172 | try lhs.bin(p, tag, rhs); | ||
| 6173 | } | ||
| 6174 | return lhs; | ||
| 6175 | } | ||
| 6176 | |||
| 6177 | /// addExpr : mulExpr (('+' | '-') mulExpr)* | ||
| 6178 | fn addExpr(p: *Parser) Error!Result { | ||
| 6179 | var lhs = try p.mulExpr(); | ||
| 6180 | if (lhs.empty(p)) return lhs; | ||
| 6181 | while (true) { | ||
| 6182 | const plus = p.eatToken(.plus); | ||
| 6183 | const minus = plus orelse p.eatToken(.minus); | ||
| 6184 | const tag = p.tokToTag(minus orelse break); | ||
| 6185 | var rhs = try p.mulExpr(); | ||
| 6186 | try rhs.expect(p); | ||
| 6187 | |||
| 6188 | const lhs_ty = lhs.ty; | ||
| 6189 | if (try lhs.adjustTypes(minus.?, &rhs, p, if (plus != null) .add else .sub)) { | ||
| 6190 | if (plus != null) { | ||
| 6191 | if (lhs.val.add(lhs.val, rhs.val, lhs.ty, p.comp)) try p.errOverflow(plus.?, lhs); | ||
| 6192 | } else { | ||
| 6193 | if (lhs.val.sub(lhs.val, rhs.val, lhs.ty, p.comp)) try p.errOverflow(minus.?, lhs); | ||
| 6194 | } | ||
| 6195 | } | ||
| 6196 | if (lhs.ty.specifier != .invalid and lhs_ty.isPtr() and !lhs_ty.isVoidStar() and lhs_ty.elemType().hasIncompleteSize()) { | ||
| 6197 | try p.errStr(.ptr_arithmetic_incomplete, minus.?, try p.typeStr(lhs_ty.elemType())); | ||
| 6198 | lhs.ty = Type.invalid; | ||
| 6199 | } | ||
| 6200 | try lhs.bin(p, tag, rhs); | ||
| 6201 | } | ||
| 6202 | return lhs; | ||
| 6203 | } | ||
| 6204 | |||
| 6205 | /// mulExpr : castExpr (('*' | '/' | '%') castExpr)*´ | ||
| 6206 | fn mulExpr(p: *Parser) Error!Result { | ||
| 6207 | var lhs = try p.castExpr(); | ||
| 6208 | if (lhs.empty(p)) return lhs; | ||
| 6209 | while (true) { | ||
| 6210 | const mul = p.eatToken(.asterisk); | ||
| 6211 | const div = mul orelse p.eatToken(.slash); | ||
| 6212 | const percent = div orelse p.eatToken(.percent); | ||
| 6213 | const tag = p.tokToTag(percent orelse break); | ||
| 6214 | var rhs = try p.castExpr(); | ||
| 6215 | try rhs.expect(p); | ||
| 6216 | |||
| 6217 | if (rhs.val.isZero() and mul == null and !p.no_eval and lhs.ty.isInt() and rhs.ty.isInt()) { | ||
| 6218 | const err_tag: Diagnostics.Tag = if (p.in_macro) .division_by_zero_macro else .division_by_zero; | ||
| 6219 | lhs.val.tag = .unavailable; | ||
| 6220 | if (div != null) { | ||
| 6221 | try p.errStr(err_tag, div.?, "division"); | ||
| 6222 | } else { | ||
| 6223 | try p.errStr(err_tag, percent.?, "remainder"); | ||
| 6224 | } | ||
| 6225 | if (p.in_macro) return error.ParsingFailed; | ||
| 6226 | } | ||
| 6227 | |||
| 6228 | if (try lhs.adjustTypes(percent.?, &rhs, p, if (tag == .mod_expr) .integer else .arithmetic)) { | ||
| 6229 | if (mul != null) { | ||
| 6230 | if (lhs.val.mul(lhs.val, rhs.val, lhs.ty, p.comp)) try p.errOverflow(mul.?, lhs); | ||
| 6231 | } else if (div != null) { | ||
| 6232 | lhs.val = Value.div(lhs.val, rhs.val, lhs.ty, p.comp); | ||
| 6233 | } else { | ||
| 6234 | var res = Value.rem(lhs.val, rhs.val, lhs.ty, p.comp); | ||
| 6235 | if (res.tag == .unavailable) { | ||
| 6236 | if (p.in_macro) { | ||
| 6237 | // match clang behavior by defining invalid remainder to be zero in macros | ||
| 6238 | res = Value.int(0); | ||
| 6239 | } else { | ||
| 6240 | try lhs.saveValue(p); | ||
| 6241 | try rhs.saveValue(p); | ||
| 6242 | } | ||
| 6243 | } | ||
| 6244 | lhs.val = res; | ||
| 6245 | } | ||
| 6246 | } | ||
| 6247 | |||
| 6248 | try lhs.bin(p, tag, rhs); | ||
| 6249 | } | ||
| 6250 | return lhs; | ||
| 6251 | } | ||
| 6252 | |||
| 6253 | /// This will always be the last message, if present | ||
| 6254 | fn removeUnusedWarningForTok(p: *Parser, last_expr_tok: TokenIndex) void { | ||
| 6255 | if (last_expr_tok == 0) return; | ||
| 6256 | if (p.comp.diag.list.items.len == 0) return; | ||
| 6257 | |||
| 6258 | const last_expr_loc = p.pp.tokens.items(.loc)[last_expr_tok]; | ||
| 6259 | const last_msg = p.comp.diag.list.items[p.comp.diag.list.items.len - 1]; | ||
| 6260 | |||
| 6261 | if (last_msg.tag == .unused_value and last_msg.loc.eql(last_expr_loc)) { | ||
| 6262 | p.comp.diag.list.items.len = p.comp.diag.list.items.len - 1; | ||
| 6263 | } | ||
| 6264 | } | ||
| 6265 | |||
| 6266 | /// castExpr | ||
| 6267 | /// : '(' compoundStmt ')' | ||
| 6268 | /// | '(' typeName ')' castExpr | ||
| 6269 | /// | '(' typeName ')' '{' initializerItems '}' | ||
| 6270 | /// | __builtin_choose_expr '(' integerConstExpr ',' assignExpr ',' assignExpr ')' | ||
| 6271 | /// | __builtin_va_arg '(' assignExpr ',' typeName ')' | ||
| 6272 | /// | __builtin_offsetof '(' typeName ',' offsetofMemberDesignator ')' | ||
| 6273 | /// | __builtin_bitoffsetof '(' typeName ',' offsetofMemberDesignator ')' | ||
| 6274 | /// | unExpr | ||
| 6275 | fn castExpr(p: *Parser) Error!Result { | ||
| 6276 | if (p.eatToken(.l_paren)) |l_paren| cast_expr: { | ||
| 6277 | if (p.tok_ids[p.tok_i] == .l_brace) { | ||
| 6278 | try p.err(.gnu_statement_expression); | ||
| 6279 | if (p.func.ty == null) { | ||
| 6280 | try p.err(.stmt_expr_not_allowed_file_scope); | ||
| 6281 | return error.ParsingFailed; | ||
| 6282 | } | ||
| 6283 | var stmt_expr_state: StmtExprState = .{}; | ||
| 6284 | const body_node = (try p.compoundStmt(false, &stmt_expr_state)).?; // compoundStmt only returns null if .l_brace isn't the first token | ||
| 6285 | p.removeUnusedWarningForTok(stmt_expr_state.last_expr_tok); | ||
| 6286 | |||
| 6287 | var res = Result{ | ||
| 6288 | .node = body_node, | ||
| 6289 | .ty = stmt_expr_state.last_expr_res.ty, | ||
| 6290 | .val = stmt_expr_state.last_expr_res.val, | ||
| 6291 | }; | ||
| 6292 | try p.expectClosing(l_paren, .r_paren); | ||
| 6293 | try res.un(p, .stmt_expr); | ||
| 6294 | return res; | ||
| 6295 | } | ||
| 6296 | const ty = (try p.typeName()) orelse { | ||
| 6297 | p.tok_i -= 1; | ||
| 6298 | break :cast_expr; | ||
| 6299 | }; | ||
| 6300 | try p.expectClosing(l_paren, .r_paren); | ||
| 6301 | |||
| 6302 | if (p.tok_ids[p.tok_i] == .l_brace) { | ||
| 6303 | // Compound literal; handled in unExpr | ||
| 6304 | p.tok_i = l_paren; | ||
| 6305 | break :cast_expr; | ||
| 6306 | } | ||
| 6307 | |||
| 6308 | var operand = try p.castExpr(); | ||
| 6309 | try operand.expect(p); | ||
| 6310 | try operand.lvalConversion(p); | ||
| 6311 | try operand.castType(p, ty, l_paren); | ||
| 6312 | return operand; | ||
| 6313 | } | ||
| 6314 | switch (p.tok_ids[p.tok_i]) { | ||
| 6315 | .builtin_choose_expr => return p.builtinChooseExpr(), | ||
| 6316 | .builtin_va_arg => return p.builtinVaArg(), | ||
| 6317 | .builtin_offsetof => return p.builtinOffsetof(false), | ||
| 6318 | .builtin_bitoffsetof => return p.builtinOffsetof(true), | ||
| 6319 | .builtin_types_compatible_p => return p.typesCompatible(), | ||
| 6320 | // TODO: other special-cased builtins | ||
| 6321 | else => {}, | ||
| 6322 | } | ||
| 6323 | return p.unExpr(); | ||
| 6324 | } | ||
| 6325 | |||
| 6326 | fn typesCompatible(p: *Parser) Error!Result { | ||
| 6327 | p.tok_i += 1; | ||
| 6328 | const l_paren = try p.expectToken(.l_paren); | ||
| 6329 | |||
| 6330 | const first = (try p.typeName()) orelse { | ||
| 6331 | try p.err(.expected_type); | ||
| 6332 | p.skipTo(.r_paren); | ||
| 6333 | return error.ParsingFailed; | ||
| 6334 | }; | ||
| 6335 | const lhs = try p.addNode(.{ .tag = .invalid, .ty = first, .data = undefined }); | ||
| 6336 | _ = try p.expectToken(.comma); | ||
| 6337 | |||
| 6338 | const second = (try p.typeName()) orelse { | ||
| 6339 | try p.err(.expected_type); | ||
| 6340 | p.skipTo(.r_paren); | ||
| 6341 | return error.ParsingFailed; | ||
| 6342 | }; | ||
| 6343 | const rhs = try p.addNode(.{ .tag = .invalid, .ty = second, .data = undefined }); | ||
| 6344 | |||
| 6345 | try p.expectClosing(l_paren, .r_paren); | ||
| 6346 | |||
| 6347 | var first_unqual = first.canonicalize(.standard); | ||
| 6348 | first_unqual.qual.@"const" = false; | ||
| 6349 | first_unqual.qual.@"volatile" = false; | ||
| 6350 | var second_unqual = second.canonicalize(.standard); | ||
| 6351 | second_unqual.qual.@"const" = false; | ||
| 6352 | second_unqual.qual.@"volatile" = false; | ||
| 6353 | |||
| 6354 | const compatible = first_unqual.eql(second_unqual, p.comp, true); | ||
| 6355 | |||
| 6356 | var res = Result{ | ||
| 6357 | .val = Value.int(@intFromBool(compatible)), | ||
| 6358 | .node = try p.addNode(.{ .tag = .builtin_types_compatible_p, .ty = Type.int, .data = .{ .bin = .{ | ||
| 6359 | .lhs = lhs, | ||
| 6360 | .rhs = rhs, | ||
| 6361 | } } }), | ||
| 6362 | }; | ||
| 6363 | try p.value_map.put(res.node, res.val); | ||
| 6364 | return res; | ||
| 6365 | } | ||
| 6366 | |||
| 6367 | fn builtinChooseExpr(p: *Parser) Error!Result { | ||
| 6368 | p.tok_i += 1; | ||
| 6369 | const l_paren = try p.expectToken(.l_paren); | ||
| 6370 | const cond_tok = p.tok_i; | ||
| 6371 | var cond = try p.integerConstExpr(.no_const_decl_folding); | ||
| 6372 | if (cond.val.tag == .unavailable) { | ||
| 6373 | try p.errTok(.builtin_choose_cond, cond_tok); | ||
| 6374 | return error.ParsingFailed; | ||
| 6375 | } | ||
| 6376 | |||
| 6377 | _ = try p.expectToken(.comma); | ||
| 6378 | |||
| 6379 | var then_expr = if (cond.val.getBool()) try p.assignExpr() else try p.parseNoEval(assignExpr); | ||
| 6380 | try then_expr.expect(p); | ||
| 6381 | |||
| 6382 | _ = try p.expectToken(.comma); | ||
| 6383 | |||
| 6384 | var else_expr = if (!cond.val.getBool()) try p.assignExpr() else try p.parseNoEval(assignExpr); | ||
| 6385 | try else_expr.expect(p); | ||
| 6386 | |||
| 6387 | try p.expectClosing(l_paren, .r_paren); | ||
| 6388 | |||
| 6389 | if (cond.val.getBool()) { | ||
| 6390 | cond.val = then_expr.val; | ||
| 6391 | cond.ty = then_expr.ty; | ||
| 6392 | } else { | ||
| 6393 | cond.val = else_expr.val; | ||
| 6394 | cond.ty = else_expr.ty; | ||
| 6395 | } | ||
| 6396 | cond.node = try p.addNode(.{ | ||
| 6397 | .tag = .builtin_choose_expr, | ||
| 6398 | .ty = cond.ty, | ||
| 6399 | .data = .{ .if3 = .{ .cond = cond.node, .body = (try p.addList(&.{ then_expr.node, else_expr.node })).start } }, | ||
| 6400 | }); | ||
| 6401 | return cond; | ||
| 6402 | } | ||
| 6403 | |||
| 6404 | fn builtinVaArg(p: *Parser) Error!Result { | ||
| 6405 | const builtin_tok = p.tok_i; | ||
| 6406 | p.tok_i += 1; | ||
| 6407 | |||
| 6408 | const l_paren = try p.expectToken(.l_paren); | ||
| 6409 | const va_list_tok = p.tok_i; | ||
| 6410 | var va_list = try p.assignExpr(); | ||
| 6411 | try va_list.expect(p); | ||
| 6412 | try va_list.lvalConversion(p); | ||
| 6413 | |||
| 6414 | _ = try p.expectToken(.comma); | ||
| 6415 | |||
| 6416 | const ty = (try p.typeName()) orelse { | ||
| 6417 | try p.err(.expected_type); | ||
| 6418 | return error.ParsingFailed; | ||
| 6419 | }; | ||
| 6420 | try p.expectClosing(l_paren, .r_paren); | ||
| 6421 | |||
| 6422 | if (!va_list.ty.eql(p.comp.types.va_list, p.comp, true)) { | ||
| 6423 | try p.errStr(.incompatible_va_arg, va_list_tok, try p.typeStr(va_list.ty)); | ||
| 6424 | return error.ParsingFailed; | ||
| 6425 | } | ||
| 6426 | |||
| 6427 | return Result{ .ty = ty, .node = try p.addNode(.{ | ||
| 6428 | .tag = .special_builtin_call_one, | ||
| 6429 | .ty = ty, | ||
| 6430 | .data = .{ .decl = .{ .name = builtin_tok, .node = va_list.node } }, | ||
| 6431 | }) }; | ||
| 6432 | } | ||
| 6433 | |||
| 6434 | fn builtinOffsetof(p: *Parser, want_bits: bool) Error!Result { | ||
| 6435 | const builtin_tok = p.tok_i; | ||
| 6436 | p.tok_i += 1; | ||
| 6437 | |||
| 6438 | const l_paren = try p.expectToken(.l_paren); | ||
| 6439 | const ty_tok = p.tok_i; | ||
| 6440 | |||
| 6441 | const ty = (try p.typeName()) orelse { | ||
| 6442 | try p.err(.expected_type); | ||
| 6443 | p.skipTo(.r_paren); | ||
| 6444 | return error.ParsingFailed; | ||
| 6445 | }; | ||
| 6446 | |||
| 6447 | if (!ty.isRecord()) { | ||
| 6448 | try p.errStr(.offsetof_ty, ty_tok, try p.typeStr(ty)); | ||
| 6449 | p.skipTo(.r_paren); | ||
| 6450 | return error.ParsingFailed; | ||
| 6451 | } else if (ty.hasIncompleteSize()) { | ||
| 6452 | try p.errStr(.offsetof_incomplete, ty_tok, try p.typeStr(ty)); | ||
| 6453 | p.skipTo(.r_paren); | ||
| 6454 | return error.ParsingFailed; | ||
| 6455 | } | ||
| 6456 | |||
| 6457 | _ = try p.expectToken(.comma); | ||
| 6458 | |||
| 6459 | const offsetof_expr = try p.offsetofMemberDesignator(ty); | ||
| 6460 | |||
| 6461 | try p.expectClosing(l_paren, .r_paren); | ||
| 6462 | |||
| 6463 | return Result{ | ||
| 6464 | .ty = p.comp.types.size, | ||
| 6465 | .val = if (offsetof_expr.val.tag == .int and !want_bits) | ||
| 6466 | Value.int(offsetof_expr.val.data.int / 8) | ||
| 6467 | else | ||
| 6468 | offsetof_expr.val, | ||
| 6469 | .node = try p.addNode(.{ | ||
| 6470 | .tag = .special_builtin_call_one, | ||
| 6471 | .ty = p.comp.types.size, | ||
| 6472 | .data = .{ .decl = .{ .name = builtin_tok, .node = offsetof_expr.node } }, | ||
| 6473 | }), | ||
| 6474 | }; | ||
| 6475 | } | ||
| 6476 | |||
| 6477 | /// offsetofMemberDesignator: IDENTIFIER ('.' IDENTIFIER | '[' expr ']' )* | ||
| 6478 | fn offsetofMemberDesignator(p: *Parser, base_ty: Type) Error!Result { | ||
| 6479 | errdefer p.skipTo(.r_paren); | ||
| 6480 | const base_field_name_tok = try p.expectIdentifier(); | ||
| 6481 | const base_field_name = try p.comp.intern(p.tokSlice(base_field_name_tok)); | ||
| 6482 | try p.validateFieldAccess(base_ty, base_ty, base_field_name_tok, base_field_name); | ||
| 6483 | const base_node = try p.addNode(.{ .tag = .default_init_expr, .ty = base_ty, .data = undefined }); | ||
| 6484 | |||
| 6485 | var offset_num: u64 = 0; | ||
| 6486 | const base_record_ty = base_ty.canonicalize(.standard); | ||
| 6487 | var lhs = try p.fieldAccessExtra(base_node, base_record_ty, base_field_name, false, &offset_num); | ||
| 6488 | var bit_offset = Value.int(offset_num); | ||
| 6489 | |||
| 6490 | while (true) switch (p.tok_ids[p.tok_i]) { | ||
| 6491 | .period => { | ||
| 6492 | p.tok_i += 1; | ||
| 6493 | const field_name_tok = try p.expectIdentifier(); | ||
| 6494 | const field_name = try p.comp.intern(p.tokSlice(field_name_tok)); | ||
| 6495 | |||
| 6496 | if (!lhs.ty.isRecord()) { | ||
| 6497 | try p.errStr(.offsetof_ty, field_name_tok, try p.typeStr(lhs.ty)); | ||
| 6498 | return error.ParsingFailed; | ||
| 6499 | } | ||
| 6500 | try p.validateFieldAccess(lhs.ty, lhs.ty, field_name_tok, field_name); | ||
| 6501 | const record_ty = lhs.ty.canonicalize(.standard); | ||
| 6502 | lhs = try p.fieldAccessExtra(lhs.node, record_ty, field_name, false, &offset_num); | ||
| 6503 | if (bit_offset.tag != .unavailable) { | ||
| 6504 | bit_offset = Value.int(offset_num + bit_offset.getInt(u64)); | ||
| 6505 | } | ||
| 6506 | }, | ||
| 6507 | .l_bracket => { | ||
| 6508 | const l_bracket_tok = p.tok_i; | ||
| 6509 | p.tok_i += 1; | ||
| 6510 | var index = try p.expr(); | ||
| 6511 | try index.expect(p); | ||
| 6512 | _ = try p.expectClosing(l_bracket_tok, .r_bracket); | ||
| 6513 | |||
| 6514 | if (!lhs.ty.isArray()) { | ||
| 6515 | try p.errStr(.offsetof_array, l_bracket_tok, try p.typeStr(lhs.ty)); | ||
| 6516 | return error.ParsingFailed; | ||
| 6517 | } | ||
| 6518 | var ptr = lhs; | ||
| 6519 | try ptr.lvalConversion(p); | ||
| 6520 | try index.lvalConversion(p); | ||
| 6521 | |||
| 6522 | if (!index.ty.isInt()) try p.errTok(.invalid_index, l_bracket_tok); | ||
| 6523 | try p.checkArrayBounds(index, lhs, l_bracket_tok); | ||
| 6524 | |||
| 6525 | try index.saveValue(p); | ||
| 6526 | try ptr.bin(p, .array_access_expr, index); | ||
| 6527 | lhs = ptr; | ||
| 6528 | }, | ||
| 6529 | else => break, | ||
| 6530 | }; | ||
| 6531 | |||
| 6532 | return Result{ .ty = base_ty, .val = bit_offset, .node = lhs.node }; | ||
| 6533 | } | ||
| 6534 | |||
| 6535 | /// unExpr | ||
| 6536 | /// : (compoundLiteral | primaryExpr) suffixExpr* | ||
| 6537 | /// | '&&' IDENTIFIER | ||
| 6538 | /// | ('&' | '*' | '+' | '-' | '~' | '!' | '++' | '--' | keyword_extension | keyword_imag | keyword_real) castExpr | ||
| 6539 | /// | keyword_sizeof unExpr | ||
| 6540 | /// | keyword_sizeof '(' typeName ')' | ||
| 6541 | /// | keyword_alignof '(' typeName ')' | ||
| 6542 | /// | keyword_c23_alignof '(' typeName ')' | ||
| 6543 | fn unExpr(p: *Parser) Error!Result { | ||
| 6544 | const tok = p.tok_i; | ||
| 6545 | switch (p.tok_ids[tok]) { | ||
| 6546 | .ampersand_ampersand => { | ||
| 6547 | const address_tok = p.tok_i; | ||
| 6548 | p.tok_i += 1; | ||
| 6549 | const name_tok = try p.expectIdentifier(); | ||
| 6550 | try p.errTok(.gnu_label_as_value, address_tok); | ||
| 6551 | p.contains_address_of_label = true; | ||
| 6552 | |||
| 6553 | const str = p.tokSlice(name_tok); | ||
| 6554 | if (p.findLabel(str) == null) { | ||
| 6555 | try p.labels.append(.{ .unresolved_goto = name_tok }); | ||
| 6556 | } | ||
| 6557 | const elem_ty = try p.arena.create(Type); | ||
| 6558 | elem_ty.* = .{ .specifier = .void }; | ||
| 6559 | const result_ty = Type{ .specifier = .pointer, .data = .{ .sub_type = elem_ty } }; | ||
| 6560 | return Result{ | ||
| 6561 | .node = try p.addNode(.{ | ||
| 6562 | .tag = .addr_of_label, | ||
| 6563 | .data = .{ .decl_ref = name_tok }, | ||
| 6564 | .ty = result_ty, | ||
| 6565 | }), | ||
| 6566 | .ty = result_ty, | ||
| 6567 | }; | ||
| 6568 | }, | ||
| 6569 | .ampersand => { | ||
| 6570 | if (p.in_macro) { | ||
| 6571 | try p.err(.invalid_preproc_operator); | ||
| 6572 | return error.ParsingFailed; | ||
| 6573 | } | ||
| 6574 | p.tok_i += 1; | ||
| 6575 | var operand = try p.castExpr(); | ||
| 6576 | try operand.expect(p); | ||
| 6577 | |||
| 6578 | const slice = p.nodes.slice(); | ||
| 6579 | if (p.getNode(operand.node, .member_access_expr) orelse p.getNode(operand.node, .member_access_ptr_expr)) |member_node| { | ||
| 6580 | if (Tree.isBitfield(slice, member_node)) try p.errTok(.addr_of_bitfield, tok); | ||
| 6581 | } | ||
| 6582 | if (!Tree.isLval(slice, p.data.items, p.value_map, operand.node)) { | ||
| 6583 | try p.errTok(.addr_of_rvalue, tok); | ||
| 6584 | } | ||
| 6585 | if (operand.ty.qual.register) try p.errTok(.addr_of_register, tok); | ||
| 6586 | |||
| 6587 | const elem_ty = try p.arena.create(Type); | ||
| 6588 | elem_ty.* = operand.ty; | ||
| 6589 | operand.ty = Type{ | ||
| 6590 | .specifier = .pointer, | ||
| 6591 | .data = .{ .sub_type = elem_ty }, | ||
| 6592 | }; | ||
| 6593 | try operand.saveValue(p); | ||
| 6594 | try operand.un(p, .addr_of_expr); | ||
| 6595 | return operand; | ||
| 6596 | }, | ||
| 6597 | .asterisk => { | ||
| 6598 | const asterisk_loc = p.tok_i; | ||
| 6599 | p.tok_i += 1; | ||
| 6600 | var operand = try p.castExpr(); | ||
| 6601 | try operand.expect(p); | ||
| 6602 | |||
| 6603 | if (operand.ty.isArray() or operand.ty.isPtr() or operand.ty.isFunc()) { | ||
| 6604 | try operand.lvalConversion(p); | ||
| 6605 | operand.ty = operand.ty.elemType(); | ||
| 6606 | } else { | ||
| 6607 | try p.errTok(.indirection_ptr, tok); | ||
| 6608 | } | ||
| 6609 | if (operand.ty.hasIncompleteSize() and !operand.ty.is(.void)) { | ||
| 6610 | try p.errStr(.deref_incomplete_ty_ptr, asterisk_loc, try p.typeStr(operand.ty)); | ||
| 6611 | } | ||
| 6612 | operand.ty.qual = .{}; | ||
| 6613 | try operand.un(p, .deref_expr); | ||
| 6614 | return operand; | ||
| 6615 | }, | ||
| 6616 | .plus => { | ||
| 6617 | p.tok_i += 1; | ||
| 6618 | |||
| 6619 | var operand = try p.castExpr(); | ||
| 6620 | try operand.expect(p); | ||
| 6621 | try operand.lvalConversion(p); | ||
| 6622 | if (!operand.ty.isInt() and !operand.ty.isFloat()) | ||
| 6623 | try p.errStr(.invalid_argument_un, tok, try p.typeStr(operand.ty)); | ||
| 6624 | |||
| 6625 | try operand.usualUnaryConversion(p, tok); | ||
| 6626 | |||
| 6627 | return operand; | ||
| 6628 | }, | ||
| 6629 | .minus => { | ||
| 6630 | p.tok_i += 1; | ||
| 6631 | |||
| 6632 | var operand = try p.castExpr(); | ||
| 6633 | try operand.expect(p); | ||
| 6634 | try operand.lvalConversion(p); | ||
| 6635 | if (!operand.ty.isInt() and !operand.ty.isFloat()) | ||
| 6636 | try p.errStr(.invalid_argument_un, tok, try p.typeStr(operand.ty)); | ||
| 6637 | |||
| 6638 | try operand.usualUnaryConversion(p, tok); | ||
| 6639 | if (operand.val.tag == .int or operand.val.tag == .float) { | ||
| 6640 | _ = operand.val.sub(operand.val.zero(), operand.val, operand.ty, p.comp); | ||
| 6641 | } else { | ||
| 6642 | operand.val.tag = .unavailable; | ||
| 6643 | } | ||
| 6644 | try operand.un(p, .negate_expr); | ||
| 6645 | return operand; | ||
| 6646 | }, | ||
| 6647 | .plus_plus => { | ||
| 6648 | p.tok_i += 1; | ||
| 6649 | |||
| 6650 | var operand = try p.castExpr(); | ||
| 6651 | try operand.expect(p); | ||
| 6652 | if (!operand.ty.isScalar()) | ||
| 6653 | try p.errStr(.invalid_argument_un, tok, try p.typeStr(operand.ty)); | ||
| 6654 | if (operand.ty.isComplex()) | ||
| 6655 | try p.errStr(.complex_prefix_postfix_op, p.tok_i, try p.typeStr(operand.ty)); | ||
| 6656 | |||
| 6657 | if (!Tree.isLval(p.nodes.slice(), p.data.items, p.value_map, operand.node) or operand.ty.isConst()) { | ||
| 6658 | try p.errTok(.not_assignable, tok); | ||
| 6659 | return error.ParsingFailed; | ||
| 6660 | } | ||
| 6661 | try operand.usualUnaryConversion(p, tok); | ||
| 6662 | |||
| 6663 | if (operand.val.tag == .int or operand.val.tag == .float) { | ||
| 6664 | if (operand.val.add(operand.val, operand.val.one(), operand.ty, p.comp)) | ||
| 6665 | try p.errOverflow(tok, operand); | ||
| 6666 | } else { | ||
| 6667 | operand.val.tag = .unavailable; | ||
| 6668 | } | ||
| 6669 | |||
| 6670 | try operand.un(p, .pre_inc_expr); | ||
| 6671 | return operand; | ||
| 6672 | }, | ||
| 6673 | .minus_minus => { | ||
| 6674 | p.tok_i += 1; | ||
| 6675 | |||
| 6676 | var operand = try p.castExpr(); | ||
| 6677 | try operand.expect(p); | ||
| 6678 | if (!operand.ty.isScalar()) | ||
| 6679 | try p.errStr(.invalid_argument_un, tok, try p.typeStr(operand.ty)); | ||
| 6680 | if (operand.ty.isComplex()) | ||
| 6681 | try p.errStr(.complex_prefix_postfix_op, p.tok_i, try p.typeStr(operand.ty)); | ||
| 6682 | |||
| 6683 | if (!Tree.isLval(p.nodes.slice(), p.data.items, p.value_map, operand.node) or operand.ty.isConst()) { | ||
| 6684 | try p.errTok(.not_assignable, tok); | ||
| 6685 | return error.ParsingFailed; | ||
| 6686 | } | ||
| 6687 | try operand.usualUnaryConversion(p, tok); | ||
| 6688 | |||
| 6689 | if (operand.val.tag == .int or operand.val.tag == .float) { | ||
| 6690 | if (operand.val.sub(operand.val, operand.val.one(), operand.ty, p.comp)) | ||
| 6691 | try p.errOverflow(tok, operand); | ||
| 6692 | } else { | ||
| 6693 | operand.val.tag = .unavailable; | ||
| 6694 | } | ||
| 6695 | |||
| 6696 | try operand.un(p, .pre_dec_expr); | ||
| 6697 | return operand; | ||
| 6698 | }, | ||
| 6699 | .tilde => { | ||
| 6700 | p.tok_i += 1; | ||
| 6701 | |||
| 6702 | var operand = try p.castExpr(); | ||
| 6703 | try operand.expect(p); | ||
| 6704 | try operand.lvalConversion(p); | ||
| 6705 | try operand.usualUnaryConversion(p, tok); | ||
| 6706 | if (operand.ty.isInt()) { | ||
| 6707 | if (operand.val.tag == .int) { | ||
| 6708 | operand.val = operand.val.bitNot(operand.ty, p.comp); | ||
| 6709 | } | ||
| 6710 | } else { | ||
| 6711 | try p.errStr(.invalid_argument_un, tok, try p.typeStr(operand.ty)); | ||
| 6712 | operand.val.tag = .unavailable; | ||
| 6713 | } | ||
| 6714 | try operand.un(p, .bit_not_expr); | ||
| 6715 | return operand; | ||
| 6716 | }, | ||
| 6717 | .bang => { | ||
| 6718 | p.tok_i += 1; | ||
| 6719 | |||
| 6720 | var operand = try p.castExpr(); | ||
| 6721 | try operand.expect(p); | ||
| 6722 | try operand.lvalConversion(p); | ||
| 6723 | if (!operand.ty.isScalar()) | ||
| 6724 | try p.errStr(.invalid_argument_un, tok, try p.typeStr(operand.ty)); | ||
| 6725 | |||
| 6726 | try operand.usualUnaryConversion(p, tok); | ||
| 6727 | if (operand.val.tag == .int) { | ||
| 6728 | const res = Value.int(@intFromBool(!operand.val.getBool())); | ||
| 6729 | operand.val = res; | ||
| 6730 | } else if (operand.val.tag == .nullptr_t) { | ||
| 6731 | operand.val = Value.int(1); | ||
| 6732 | } else { | ||
| 6733 | if (operand.ty.isDecayed()) { | ||
| 6734 | operand.val = Value.int(0); | ||
| 6735 | } else { | ||
| 6736 | operand.val.tag = .unavailable; | ||
| 6737 | } | ||
| 6738 | } | ||
| 6739 | operand.ty = .{ .specifier = .int }; | ||
| 6740 | try operand.un(p, .bool_not_expr); | ||
| 6741 | return operand; | ||
| 6742 | }, | ||
| 6743 | .keyword_sizeof => { | ||
| 6744 | p.tok_i += 1; | ||
| 6745 | const expected_paren = p.tok_i; | ||
| 6746 | var res = Result{}; | ||
| 6747 | if (try p.typeName()) |ty| { | ||
| 6748 | res.ty = ty; | ||
| 6749 | try p.errTok(.expected_parens_around_typename, expected_paren); | ||
| 6750 | } else if (p.eatToken(.l_paren)) |l_paren| { | ||
| 6751 | if (try p.typeName()) |ty| { | ||
| 6752 | res.ty = ty; | ||
| 6753 | try p.expectClosing(l_paren, .r_paren); | ||
| 6754 | } else { | ||
| 6755 | p.tok_i = expected_paren; | ||
| 6756 | res = try p.parseNoEval(unExpr); | ||
| 6757 | } | ||
| 6758 | } else { | ||
| 6759 | res = try p.parseNoEval(unExpr); | ||
| 6760 | } | ||
| 6761 | |||
| 6762 | if (res.ty.is(.void)) { | ||
| 6763 | try p.errStr(.pointer_arith_void, tok, "sizeof"); | ||
| 6764 | } else if (res.ty.isDecayed()) { | ||
| 6765 | const array_ty = res.ty.originalTypeOfDecayedArray(); | ||
| 6766 | const err_str = try p.typePairStrExtra(res.ty, " instead of ", array_ty); | ||
| 6767 | try p.errStr(.sizeof_array_arg, tok, err_str); | ||
| 6768 | } | ||
| 6769 | if (res.ty.sizeof(p.comp)) |size| { | ||
| 6770 | if (size == 0) { | ||
| 6771 | try p.errTok(.sizeof_returns_zero, tok); | ||
| 6772 | } | ||
| 6773 | res.val = Value.int(size); | ||
| 6774 | res.ty = p.comp.types.size; | ||
| 6775 | } else { | ||
| 6776 | res.val.tag = .unavailable; | ||
| 6777 | if (res.ty.hasIncompleteSize()) { | ||
| 6778 | try p.errStr(.invalid_sizeof, expected_paren - 1, try p.typeStr(res.ty)); | ||
| 6779 | res.ty = Type.invalid; | ||
| 6780 | } else { | ||
| 6781 | res.ty = p.comp.types.size; | ||
| 6782 | } | ||
| 6783 | } | ||
| 6784 | try res.un(p, .sizeof_expr); | ||
| 6785 | return res; | ||
| 6786 | }, | ||
| 6787 | .keyword_alignof, | ||
| 6788 | .keyword_alignof1, | ||
| 6789 | .keyword_alignof2, | ||
| 6790 | .keyword_c23_alignof, | ||
| 6791 | => { | ||
| 6792 | p.tok_i += 1; | ||
| 6793 | const expected_paren = p.tok_i; | ||
| 6794 | var res = Result{}; | ||
| 6795 | if (try p.typeName()) |ty| { | ||
| 6796 | res.ty = ty; | ||
| 6797 | try p.errTok(.expected_parens_around_typename, expected_paren); | ||
| 6798 | } else if (p.eatToken(.l_paren)) |l_paren| { | ||
| 6799 | if (try p.typeName()) |ty| { | ||
| 6800 | res.ty = ty; | ||
| 6801 | try p.expectClosing(l_paren, .r_paren); | ||
| 6802 | } else { | ||
| 6803 | p.tok_i = expected_paren; | ||
| 6804 | res = try p.parseNoEval(unExpr); | ||
| 6805 | try p.errTok(.alignof_expr, expected_paren); | ||
| 6806 | } | ||
| 6807 | } else { | ||
| 6808 | res = try p.parseNoEval(unExpr); | ||
| 6809 | try p.errTok(.alignof_expr, expected_paren); | ||
| 6810 | } | ||
| 6811 | |||
| 6812 | if (res.ty.is(.void)) { | ||
| 6813 | try p.errStr(.pointer_arith_void, tok, "alignof"); | ||
| 6814 | } | ||
| 6815 | if (res.ty.alignable()) { | ||
| 6816 | res.val = Value.int(res.ty.alignof(p.comp)); | ||
| 6817 | res.ty = p.comp.types.size; | ||
| 6818 | } else { | ||
| 6819 | try p.errStr(.invalid_alignof, expected_paren, try p.typeStr(res.ty)); | ||
| 6820 | res.ty = Type.invalid; | ||
| 6821 | } | ||
| 6822 | try res.un(p, .alignof_expr); | ||
| 6823 | return res; | ||
| 6824 | }, | ||
| 6825 | .keyword_extension => { | ||
| 6826 | p.tok_i += 1; | ||
| 6827 | const saved_extension = p.extension_suppressed; | ||
| 6828 | defer p.extension_suppressed = saved_extension; | ||
| 6829 | p.extension_suppressed = true; | ||
| 6830 | |||
| 6831 | var child = try p.castExpr(); | ||
| 6832 | try child.expect(p); | ||
| 6833 | return child; | ||
| 6834 | }, | ||
| 6835 | .keyword_imag1, .keyword_imag2 => { | ||
| 6836 | const imag_tok = p.tok_i; | ||
| 6837 | p.tok_i += 1; | ||
| 6838 | |||
| 6839 | var operand = try p.castExpr(); | ||
| 6840 | try operand.expect(p); | ||
| 6841 | try operand.lvalConversion(p); | ||
| 6842 | if (!operand.ty.isInt() and !operand.ty.isFloat()) { | ||
| 6843 | try p.errStr(.invalid_imag, imag_tok, try p.typeStr(operand.ty)); | ||
| 6844 | } | ||
| 6845 | if (operand.ty.isReal()) { | ||
| 6846 | switch (p.comp.langopts.emulate) { | ||
| 6847 | .msvc => {}, // Doesn't support `_Complex` or `__imag` in the first place | ||
| 6848 | .gcc => { | ||
| 6849 | if (operand.ty.isInt()) { | ||
| 6850 | operand.val = Value.int(0); | ||
| 6851 | } else if (operand.ty.isFloat()) { | ||
| 6852 | operand.val = Value.float(0); | ||
| 6853 | } | ||
| 6854 | }, | ||
| 6855 | .clang => { | ||
| 6856 | if (operand.val.tag == .int) { | ||
| 6857 | operand.val = Value.int(0); | ||
| 6858 | } else { | ||
| 6859 | operand.val.tag = .unavailable; | ||
| 6860 | } | ||
| 6861 | }, | ||
| 6862 | } | ||
| 6863 | } | ||
| 6864 | // convert _Complex T to T | ||
| 6865 | operand.ty = operand.ty.makeReal(); | ||
| 6866 | try operand.un(p, .imag_expr); | ||
| 6867 | return operand; | ||
| 6868 | }, | ||
| 6869 | .keyword_real1, .keyword_real2 => { | ||
| 6870 | const real_tok = p.tok_i; | ||
| 6871 | p.tok_i += 1; | ||
| 6872 | |||
| 6873 | var operand = try p.castExpr(); | ||
| 6874 | try operand.expect(p); | ||
| 6875 | try operand.lvalConversion(p); | ||
| 6876 | if (!operand.ty.isInt() and !operand.ty.isFloat()) { | ||
| 6877 | try p.errStr(.invalid_real, real_tok, try p.typeStr(operand.ty)); | ||
| 6878 | } | ||
| 6879 | // convert _Complex T to T | ||
| 6880 | operand.ty = operand.ty.makeReal(); | ||
| 6881 | try operand.un(p, .real_expr); | ||
| 6882 | return operand; | ||
| 6883 | }, | ||
| 6884 | else => { | ||
| 6885 | var lhs = try p.compoundLiteral(); | ||
| 6886 | if (lhs.empty(p)) { | ||
| 6887 | lhs = try p.primaryExpr(); | ||
| 6888 | if (lhs.empty(p)) return lhs; | ||
| 6889 | } | ||
| 6890 | while (true) { | ||
| 6891 | const suffix = try p.suffixExpr(lhs); | ||
| 6892 | if (suffix.empty(p)) break; | ||
| 6893 | lhs = suffix; | ||
| 6894 | } | ||
| 6895 | return lhs; | ||
| 6896 | }, | ||
| 6897 | } | ||
| 6898 | } | ||
| 6899 | |||
| 6900 | /// compoundLiteral | ||
| 6901 | /// : '(' type_name ')' '{' initializer_list '}' | ||
| 6902 | /// | '(' type_name ')' '{' initializer_list ',' '}' | ||
| 6903 | fn compoundLiteral(p: *Parser) Error!Result { | ||
| 6904 | const l_paren = p.eatToken(.l_paren) orelse return Result{}; | ||
| 6905 | const ty = (try p.typeName()) orelse { | ||
| 6906 | p.tok_i = l_paren; | ||
| 6907 | return Result{}; | ||
| 6908 | }; | ||
| 6909 | try p.expectClosing(l_paren, .r_paren); | ||
| 6910 | |||
| 6911 | if (ty.isFunc()) { | ||
| 6912 | try p.err(.func_init); | ||
| 6913 | } else if (ty.is(.variable_len_array)) { | ||
| 6914 | try p.err(.vla_init); | ||
| 6915 | } else if (ty.hasIncompleteSize() and !ty.is(.incomplete_array)) { | ||
| 6916 | try p.errStr(.variable_incomplete_ty, p.tok_i, try p.typeStr(ty)); | ||
| 6917 | return error.ParsingFailed; | ||
| 6918 | } | ||
| 6919 | var init_list_expr = try p.initializer(ty); | ||
| 6920 | try init_list_expr.un(p, .compound_literal_expr); | ||
| 6921 | return init_list_expr; | ||
| 6922 | } | ||
| 6923 | |||
| 6924 | /// suffixExpr | ||
| 6925 | /// : '[' expr ']' | ||
| 6926 | /// | '(' argumentExprList? ')' | ||
| 6927 | /// | '.' IDENTIFIER | ||
| 6928 | /// | '->' IDENTIFIER | ||
| 6929 | /// | '++' | ||
| 6930 | /// | '--' | ||
| 6931 | /// argumentExprList : assignExpr (',' assignExpr)* | ||
| 6932 | fn suffixExpr(p: *Parser, lhs: Result) Error!Result { | ||
| 6933 | assert(!lhs.empty(p)); | ||
| 6934 | switch (p.tok_ids[p.tok_i]) { | ||
| 6935 | .l_paren => return p.callExpr(lhs), | ||
| 6936 | .plus_plus => { | ||
| 6937 | defer p.tok_i += 1; | ||
| 6938 | |||
| 6939 | var operand = lhs; | ||
| 6940 | if (!operand.ty.isScalar()) | ||
| 6941 | try p.errStr(.invalid_argument_un, p.tok_i, try p.typeStr(operand.ty)); | ||
| 6942 | if (operand.ty.isComplex()) | ||
| 6943 | try p.errStr(.complex_prefix_postfix_op, p.tok_i, try p.typeStr(operand.ty)); | ||
| 6944 | |||
| 6945 | if (!Tree.isLval(p.nodes.slice(), p.data.items, p.value_map, operand.node) or operand.ty.isConst()) { | ||
| 6946 | try p.err(.not_assignable); | ||
| 6947 | return error.ParsingFailed; | ||
| 6948 | } | ||
| 6949 | try operand.usualUnaryConversion(p, p.tok_i); | ||
| 6950 | |||
| 6951 | try operand.un(p, .post_inc_expr); | ||
| 6952 | return operand; | ||
| 6953 | }, | ||
| 6954 | .minus_minus => { | ||
| 6955 | defer p.tok_i += 1; | ||
| 6956 | |||
| 6957 | var operand = lhs; | ||
| 6958 | if (!operand.ty.isScalar()) | ||
| 6959 | try p.errStr(.invalid_argument_un, p.tok_i, try p.typeStr(operand.ty)); | ||
| 6960 | if (operand.ty.isComplex()) | ||
| 6961 | try p.errStr(.complex_prefix_postfix_op, p.tok_i, try p.typeStr(operand.ty)); | ||
| 6962 | |||
| 6963 | if (!Tree.isLval(p.nodes.slice(), p.data.items, p.value_map, operand.node) or operand.ty.isConst()) { | ||
| 6964 | try p.err(.not_assignable); | ||
| 6965 | return error.ParsingFailed; | ||
| 6966 | } | ||
| 6967 | try operand.usualUnaryConversion(p, p.tok_i); | ||
| 6968 | |||
| 6969 | try operand.un(p, .post_dec_expr); | ||
| 6970 | return operand; | ||
| 6971 | }, | ||
| 6972 | .l_bracket => { | ||
| 6973 | const l_bracket = p.tok_i; | ||
| 6974 | p.tok_i += 1; | ||
| 6975 | var index = try p.expr(); | ||
| 6976 | try index.expect(p); | ||
| 6977 | try p.expectClosing(l_bracket, .r_bracket); | ||
| 6978 | |||
| 6979 | const array_before_conversion = lhs; | ||
| 6980 | const index_before_conversion = index; | ||
| 6981 | var ptr = lhs; | ||
| 6982 | try ptr.lvalConversion(p); | ||
| 6983 | try index.lvalConversion(p); | ||
| 6984 | if (ptr.ty.isPtr()) { | ||
| 6985 | ptr.ty = ptr.ty.elemType(); | ||
| 6986 | if (!index.ty.isInt()) try p.errTok(.invalid_index, l_bracket); | ||
| 6987 | try p.checkArrayBounds(index_before_conversion, array_before_conversion, l_bracket); | ||
| 6988 | } else if (index.ty.isPtr()) { | ||
| 6989 | index.ty = index.ty.elemType(); | ||
| 6990 | if (!ptr.ty.isInt()) try p.errTok(.invalid_index, l_bracket); | ||
| 6991 | try p.checkArrayBounds(array_before_conversion, index_before_conversion, l_bracket); | ||
| 6992 | std.mem.swap(Result, &ptr, &index); | ||
| 6993 | } else { | ||
| 6994 | try p.errTok(.invalid_subscript, l_bracket); | ||
| 6995 | } | ||
| 6996 | |||
| 6997 | try ptr.saveValue(p); | ||
| 6998 | try index.saveValue(p); | ||
| 6999 | try ptr.bin(p, .array_access_expr, index); | ||
| 7000 | return ptr; | ||
| 7001 | }, | ||
| 7002 | .period => { | ||
| 7003 | p.tok_i += 1; | ||
| 7004 | const name = try p.expectIdentifier(); | ||
| 7005 | return p.fieldAccess(lhs, name, false); | ||
| 7006 | }, | ||
| 7007 | .arrow => { | ||
| 7008 | p.tok_i += 1; | ||
| 7009 | const name = try p.expectIdentifier(); | ||
| 7010 | if (lhs.ty.isArray()) { | ||
| 7011 | var copy = lhs; | ||
| 7012 | copy.ty.decayArray(); | ||
| 7013 | try copy.implicitCast(p, .array_to_pointer); | ||
| 7014 | return p.fieldAccess(copy, name, true); | ||
| 7015 | } | ||
| 7016 | return p.fieldAccess(lhs, name, true); | ||
| 7017 | }, | ||
| 7018 | else => return Result{}, | ||
| 7019 | } | ||
| 7020 | } | ||
| 7021 | |||
| 7022 | fn fieldAccess( | ||
| 7023 | p: *Parser, | ||
| 7024 | lhs: Result, | ||
| 7025 | field_name_tok: TokenIndex, | ||
| 7026 | is_arrow: bool, | ||
| 7027 | ) !Result { | ||
| 7028 | const expr_ty = lhs.ty; | ||
| 7029 | const is_ptr = expr_ty.isPtr(); | ||
| 7030 | const expr_base_ty = if (is_ptr) expr_ty.elemType() else expr_ty; | ||
| 7031 | const record_ty = expr_base_ty.canonicalize(.standard); | ||
| 7032 | |||
| 7033 | switch (record_ty.specifier) { | ||
| 7034 | .@"struct", .@"union" => {}, | ||
| 7035 | else => { | ||
| 7036 | try p.errStr(.expected_record_ty, field_name_tok, try p.typeStr(expr_ty)); | ||
| 7037 | return error.ParsingFailed; | ||
| 7038 | }, | ||
| 7039 | } | ||
| 7040 | if (record_ty.hasIncompleteSize()) { | ||
| 7041 | try p.errStr(.deref_incomplete_ty_ptr, field_name_tok - 2, try p.typeStr(expr_base_ty)); | ||
| 7042 | return error.ParsingFailed; | ||
| 7043 | } | ||
| 7044 | if (is_arrow and !is_ptr) try p.errStr(.member_expr_not_ptr, field_name_tok, try p.typeStr(expr_ty)); | ||
| 7045 | if (!is_arrow and is_ptr) try p.errStr(.member_expr_ptr, field_name_tok, try p.typeStr(expr_ty)); | ||
| 7046 | |||
| 7047 | const field_name = try p.comp.intern(p.tokSlice(field_name_tok)); | ||
| 7048 | try p.validateFieldAccess(record_ty, expr_ty, field_name_tok, field_name); | ||
| 7049 | var discard: u64 = 0; | ||
| 7050 | return p.fieldAccessExtra(lhs.node, record_ty, field_name, is_arrow, &discard); | ||
| 7051 | } | ||
| 7052 | |||
| 7053 | fn validateFieldAccess(p: *Parser, record_ty: Type, expr_ty: Type, field_name_tok: TokenIndex, field_name: StringId) Error!void { | ||
| 7054 | if (record_ty.hasField(field_name)) return; | ||
| 7055 | |||
| 7056 | p.strings.items.len = 0; | ||
| 7057 | |||
| 7058 | try p.strings.writer().print("'{s}' in '", .{p.tokSlice(field_name_tok)}); | ||
| 7059 | const mapper = p.comp.string_interner.getSlowTypeMapper(); | ||
| 7060 | try expr_ty.print(mapper, p.comp.langopts, p.strings.writer()); | ||
| 7061 | try p.strings.append('\''); | ||
| 7062 | |||
| 7063 | const duped = try p.comp.diag.arena.allocator().dupe(u8, p.strings.items); | ||
| 7064 | try p.errStr(.no_such_member, field_name_tok, duped); | ||
| 7065 | return error.ParsingFailed; | ||
| 7066 | } | ||
| 7067 | |||
| 7068 | fn fieldAccessExtra(p: *Parser, lhs: NodeIndex, record_ty: Type, field_name: StringId, is_arrow: bool, offset_bits: *u64) Error!Result { | ||
| 7069 | for (record_ty.data.record.fields, 0..) |f, i| { | ||
| 7070 | if (f.isAnonymousRecord()) { | ||
| 7071 | if (!f.ty.hasField(field_name)) continue; | ||
| 7072 | const inner = try p.addNode(.{ | ||
| 7073 | .tag = if (is_arrow) .member_access_ptr_expr else .member_access_expr, | ||
| 7074 | .ty = f.ty, | ||
| 7075 | .data = .{ .member = .{ .lhs = lhs, .index = @intCast(i) } }, | ||
| 7076 | }); | ||
| 7077 | const ret = p.fieldAccessExtra(inner, f.ty, field_name, false, offset_bits); | ||
| 7078 | offset_bits.* += f.layout.offset_bits; | ||
| 7079 | return ret; | ||
| 7080 | } | ||
| 7081 | if (field_name == f.name) { | ||
| 7082 | offset_bits.* = f.layout.offset_bits; | ||
| 7083 | return Result{ | ||
| 7084 | .ty = f.ty, | ||
| 7085 | .node = try p.addNode(.{ | ||
| 7086 | .tag = if (is_arrow) .member_access_ptr_expr else .member_access_expr, | ||
| 7087 | .ty = f.ty, | ||
| 7088 | .data = .{ .member = .{ .lhs = lhs, .index = @intCast(i) } }, | ||
| 7089 | }), | ||
| 7090 | }; | ||
| 7091 | } | ||
| 7092 | } | ||
| 7093 | // We already checked that this container has a field by the name. | ||
| 7094 | unreachable; | ||
| 7095 | } | ||
| 7096 | |||
| 7097 | fn checkVaStartArg(p: *Parser, builtin_tok: TokenIndex, first_after: TokenIndex, param_tok: TokenIndex, arg: *Result, idx: u32) !void { | ||
| 7098 | assert(idx != 0); | ||
| 7099 | if (idx > 1) { | ||
| 7100 | try p.errTok(.closing_paren, first_after); | ||
| 7101 | return error.ParsingFailed; | ||
| 7102 | } | ||
| 7103 | |||
| 7104 | var func_ty = p.func.ty orelse { | ||
| 7105 | try p.errTok(.va_start_not_in_func, builtin_tok); | ||
| 7106 | return; | ||
| 7107 | }; | ||
| 7108 | const func_params = func_ty.params(); | ||
| 7109 | if (func_ty.specifier != .var_args_func or func_params.len == 0) { | ||
| 7110 | return p.errTok(.va_start_fixed_args, builtin_tok); | ||
| 7111 | } | ||
| 7112 | const last_param_name = func_params[func_params.len - 1].name; | ||
| 7113 | const decl_ref = p.getNode(arg.node, .decl_ref_expr); | ||
| 7114 | if (decl_ref == null or last_param_name != try p.comp.intern(p.tokSlice(p.nodes.items(.data)[@intFromEnum(decl_ref.?)].decl_ref))) { | ||
| 7115 | try p.errTok(.va_start_not_last_param, param_tok); | ||
| 7116 | } | ||
| 7117 | } | ||
| 7118 | |||
| 7119 | fn checkComplexArg(p: *Parser, builtin_tok: TokenIndex, first_after: TokenIndex, param_tok: TokenIndex, arg: *Result, idx: u32) !void { | ||
| 7120 | _ = builtin_tok; | ||
| 7121 | _ = first_after; | ||
| 7122 | if (idx <= 1 and !arg.ty.isFloat()) { | ||
| 7123 | try p.errStr(.not_floating_type, param_tok, try p.typeStr(arg.ty)); | ||
| 7124 | } else if (idx == 1) { | ||
| 7125 | const prev_idx = p.list_buf.items[p.list_buf.items.len - 1]; | ||
| 7126 | const prev_ty = p.nodes.items(.ty)[@intFromEnum(prev_idx)]; | ||
| 7127 | if (!prev_ty.eql(arg.ty, p.comp, false)) { | ||
| 7128 | try p.errStr(.argument_types_differ, param_tok, try p.typePairStrExtra(prev_ty, " vs ", arg.ty)); | ||
| 7129 | } | ||
| 7130 | } | ||
| 7131 | } | ||
| 7132 | |||
| 7133 | fn checkVariableBuiltinArgument(p: *Parser, builtin_tok: TokenIndex, first_after: TokenIndex, param_tok: TokenIndex, arg: *Result, arg_idx: u32, tag: Builtin.Tag) !void { | ||
| 7134 | switch (tag) { | ||
| 7135 | .__builtin_va_start, .__va_start, .va_start => return p.checkVaStartArg(builtin_tok, first_after, param_tok, arg, arg_idx), | ||
| 7136 | else => {}, | ||
| 7137 | } | ||
| 7138 | } | ||
| 7139 | |||
| 7140 | fn callExpr(p: *Parser, lhs: Result) Error!Result { | ||
| 7141 | const l_paren = p.tok_i; | ||
| 7142 | p.tok_i += 1; | ||
| 7143 | const ty = lhs.ty.isCallable() orelse { | ||
| 7144 | try p.errStr(.not_callable, l_paren, try p.typeStr(lhs.ty)); | ||
| 7145 | return error.ParsingFailed; | ||
| 7146 | }; | ||
| 7147 | const params = ty.params(); | ||
| 7148 | var func = lhs; | ||
| 7149 | try func.lvalConversion(p); | ||
| 7150 | |||
| 7151 | const list_buf_top = p.list_buf.items.len; | ||
| 7152 | defer p.list_buf.items.len = list_buf_top; | ||
| 7153 | try p.list_buf.append(func.node); | ||
| 7154 | var arg_count: u32 = 0; | ||
| 7155 | var first_after = l_paren; | ||
| 7156 | |||
| 7157 | const call_expr = CallExpr.init(p, lhs.node, func.node); | ||
| 7158 | |||
| 7159 | while (p.eatToken(.r_paren) == null) { | ||
| 7160 | const param_tok = p.tok_i; | ||
| 7161 | if (arg_count == params.len) first_after = p.tok_i; | ||
| 7162 | var arg = try p.assignExpr(); | ||
| 7163 | try arg.expect(p); | ||
| 7164 | |||
| 7165 | if (call_expr.shouldPerformLvalConversion(arg_count)) { | ||
| 7166 | try arg.lvalConversion(p); | ||
| 7167 | } | ||
| 7168 | if (arg.ty.hasIncompleteSize() and !arg.ty.is(.void)) return error.ParsingFailed; | ||
| 7169 | |||
| 7170 | if (arg_count >= params.len) { | ||
| 7171 | if (call_expr.shouldPromoteVarArg(arg_count)) { | ||
| 7172 | if (arg.ty.isInt()) try arg.intCast(p, arg.ty.integerPromotion(p.comp), param_tok); | ||
| 7173 | if (arg.ty.is(.float)) try arg.floatCast(p, .{ .specifier = .double }); | ||
| 7174 | } | ||
| 7175 | try call_expr.checkVarArg(p, first_after, param_tok, &arg, arg_count); | ||
| 7176 | try arg.saveValue(p); | ||
| 7177 | try p.list_buf.append(arg.node); | ||
| 7178 | arg_count += 1; | ||
| 7179 | |||
| 7180 | _ = p.eatToken(.comma) orelse { | ||
| 7181 | try p.expectClosing(l_paren, .r_paren); | ||
| 7182 | break; | ||
| 7183 | }; | ||
| 7184 | continue; | ||
| 7185 | } | ||
| 7186 | const p_ty = params[arg_count].ty; | ||
| 7187 | if (call_expr.shouldCoerceArg(arg_count)) { | ||
| 7188 | try arg.coerce(p, p_ty, param_tok, .{ .arg = params[arg_count].name_tok }); | ||
| 7189 | } | ||
| 7190 | try arg.saveValue(p); | ||
| 7191 | try p.list_buf.append(arg.node); | ||
| 7192 | arg_count += 1; | ||
| 7193 | |||
| 7194 | _ = p.eatToken(.comma) orelse { | ||
| 7195 | try p.expectClosing(l_paren, .r_paren); | ||
| 7196 | break; | ||
| 7197 | }; | ||
| 7198 | } | ||
| 7199 | |||
| 7200 | const actual: u32 = @intCast(arg_count); | ||
| 7201 | const extra = Diagnostics.Message.Extra{ .arguments = .{ | ||
| 7202 | .expected = @intCast(params.len), | ||
| 7203 | .actual = actual, | ||
| 7204 | } }; | ||
| 7205 | if (call_expr.paramCountOverride()) |expected| { | ||
| 7206 | if (expected != actual) { | ||
| 7207 | try p.errExtra(.expected_arguments, first_after, .{ .arguments = .{ .expected = expected, .actual = actual } }); | ||
| 7208 | } | ||
| 7209 | } else if (ty.is(.func) and params.len != arg_count) { | ||
| 7210 | try p.errExtra(.expected_arguments, first_after, extra); | ||
| 7211 | } else if (ty.is(.old_style_func) and params.len != arg_count) { | ||
| 7212 | try p.errExtra(.expected_arguments_old, first_after, extra); | ||
| 7213 | } else if (ty.is(.var_args_func) and arg_count < params.len) { | ||
| 7214 | try p.errExtra(.expected_at_least_arguments, first_after, extra); | ||
| 7215 | } | ||
| 7216 | |||
| 7217 | return call_expr.finish(p, ty, list_buf_top, arg_count); | ||
| 7218 | } | ||
| 7219 | |||
| 7220 | fn checkArrayBounds(p: *Parser, index: Result, array: Result, tok: TokenIndex) !void { | ||
| 7221 | if (index.val.tag == .unavailable) return; | ||
| 7222 | |||
| 7223 | const array_len = array.ty.arrayLen() orelse return; | ||
| 7224 | if (array_len == 0) return; | ||
| 7225 | |||
| 7226 | if (array_len == 1) { | ||
| 7227 | if (p.getNode(array.node, .member_access_expr) orelse p.getNode(array.node, .member_access_ptr_expr)) |node| { | ||
| 7228 | const data = p.nodes.items(.data)[@intFromEnum(node)]; | ||
| 7229 | var lhs = p.nodes.items(.ty)[@intFromEnum(data.member.lhs)]; | ||
| 7230 | if (lhs.get(.pointer)) |ptr| { | ||
| 7231 | lhs = ptr.data.sub_type.*; | ||
| 7232 | } | ||
| 7233 | if (lhs.is(.@"struct")) { | ||
| 7234 | const record = lhs.getRecord().?; | ||
| 7235 | if (data.member.index + 1 == record.fields.len) { | ||
| 7236 | if (!index.val.isZero()) { | ||
| 7237 | try p.errExtra(.old_style_flexible_struct, tok, .{ | ||
| 7238 | .unsigned = index.val.data.int, | ||
| 7239 | }); | ||
| 7240 | } | ||
| 7241 | return; | ||
| 7242 | } | ||
| 7243 | } | ||
| 7244 | } | ||
| 7245 | } | ||
| 7246 | const len = Value.int(array_len); | ||
| 7247 | |||
| 7248 | if (index.ty.isUnsignedInt(p.comp)) { | ||
| 7249 | if (index.val.compare(.gte, len, p.comp.types.size, p.comp)) | ||
| 7250 | try p.errExtra(.array_after, tok, .{ .unsigned = index.val.data.int }); | ||
| 7251 | } else { | ||
| 7252 | if (index.val.compare(.lt, Value.int(0), index.ty, p.comp)) { | ||
| 7253 | try p.errExtra(.array_before, tok, .{ | ||
| 7254 | .signed = index.val.signExtend(index.ty, p.comp), | ||
| 7255 | }); | ||
| 7256 | } else if (index.val.compare(.gte, len, p.comp.types.size, p.comp)) { | ||
| 7257 | try p.errExtra(.array_after, tok, .{ .unsigned = index.val.data.int }); | ||
| 7258 | } | ||
| 7259 | } | ||
| 7260 | } | ||
| 7261 | |||
| 7262 | /// primaryExpr | ||
| 7263 | /// : IDENTIFIER | ||
| 7264 | /// | keyword_true | ||
| 7265 | /// | keyword_false | ||
| 7266 | /// | keyword_nullptr | ||
| 7267 | /// | INTEGER_LITERAL | ||
| 7268 | /// | FLOAT_LITERAL | ||
| 7269 | /// | IMAGINARY_LITERAL | ||
| 7270 | /// | CHAR_LITERAL | ||
| 7271 | /// | STRING_LITERAL | ||
| 7272 | /// | '(' expr ')' | ||
| 7273 | /// | genericSelection | ||
| 7274 | fn primaryExpr(p: *Parser) Error!Result { | ||
| 7275 | if (p.eatToken(.l_paren)) |l_paren| { | ||
| 7276 | var e = try p.expr(); | ||
| 7277 | try e.expect(p); | ||
| 7278 | try p.expectClosing(l_paren, .r_paren); | ||
| 7279 | try e.un(p, .paren_expr); | ||
| 7280 | return e; | ||
| 7281 | } | ||
| 7282 | switch (p.tok_ids[p.tok_i]) { | ||
| 7283 | .identifier, .extended_identifier => { | ||
| 7284 | const name_tok = p.expectIdentifier() catch unreachable; | ||
| 7285 | const name = p.tokSlice(name_tok); | ||
| 7286 | const interned_name = try p.comp.intern(name); | ||
| 7287 | if (p.syms.findSymbol(interned_name)) |sym| { | ||
| 7288 | try p.checkDeprecatedUnavailable(sym.ty, name_tok, sym.tok); | ||
| 7289 | if (sym.kind == .constexpr) { | ||
| 7290 | return Result{ | ||
| 7291 | .val = sym.val, | ||
| 7292 | .ty = sym.ty, | ||
| 7293 | .node = try p.addNode(.{ | ||
| 7294 | .tag = .decl_ref_expr, | ||
| 7295 | .ty = sym.ty, | ||
| 7296 | .data = .{ .decl_ref = name_tok }, | ||
| 7297 | }), | ||
| 7298 | }; | ||
| 7299 | } | ||
| 7300 | if (sym.val.tag == .int) { | ||
| 7301 | switch (p.const_decl_folding) { | ||
| 7302 | .gnu_folding_extension => try p.errTok(.const_decl_folded, name_tok), | ||
| 7303 | .gnu_vla_folding_extension => try p.errTok(.const_decl_folded_vla, name_tok), | ||
| 7304 | else => {}, | ||
| 7305 | } | ||
| 7306 | } | ||
| 7307 | return Result{ | ||
| 7308 | .val = if (p.const_decl_folding == .no_const_decl_folding and sym.kind != .enumeration) Value{} else sym.val, | ||
| 7309 | .ty = sym.ty, | ||
| 7310 | .node = try p.addNode(.{ | ||
| 7311 | .tag = if (sym.kind == .enumeration) .enumeration_ref else .decl_ref_expr, | ||
| 7312 | .ty = sym.ty, | ||
| 7313 | .data = .{ .decl_ref = name_tok }, | ||
| 7314 | }), | ||
| 7315 | }; | ||
| 7316 | } | ||
| 7317 | if (try p.comp.builtins.getOrCreate(p.comp, name, p.arena)) |some| { | ||
| 7318 | for (p.tok_ids[p.tok_i..]) |id| switch (id) { | ||
| 7319 | .r_paren => {}, // closing grouped expr | ||
| 7320 | .l_paren => break, // beginning of a call | ||
| 7321 | else => { | ||
| 7322 | try p.errTok(.builtin_must_be_called, name_tok); | ||
| 7323 | return error.ParsingFailed; | ||
| 7324 | }, | ||
| 7325 | }; | ||
| 7326 | if (some.builtin.properties.header != .none) { | ||
| 7327 | try p.errStr(.implicit_builtin, name_tok, name); | ||
| 7328 | try p.errExtra(.implicit_builtin_header_note, name_tok, .{ .builtin_with_header = .{ | ||
| 7329 | .builtin = some.builtin.tag, | ||
| 7330 | .header = some.builtin.properties.header, | ||
| 7331 | } }); | ||
| 7332 | } | ||
| 7333 | |||
| 7334 | return Result{ | ||
| 7335 | .ty = some.ty, | ||
| 7336 | .node = try p.addNode(.{ | ||
| 7337 | .tag = .builtin_call_expr_one, | ||
| 7338 | .ty = some.ty, | ||
| 7339 | .data = .{ .decl = .{ .name = name_tok, .node = .none } }, | ||
| 7340 | }), | ||
| 7341 | }; | ||
| 7342 | } | ||
| 7343 | if (p.tok_ids[p.tok_i] == .l_paren) { | ||
| 7344 | // allow implicitly declaring functions before C99 like `puts("foo")` | ||
| 7345 | if (mem.startsWith(u8, name, "__builtin_")) | ||
| 7346 | try p.errStr(.unknown_builtin, name_tok, name) | ||
| 7347 | else | ||
| 7348 | try p.errStr(.implicit_func_decl, name_tok, name); | ||
| 7349 | |||
| 7350 | const func_ty = try p.arena.create(Type.Func); | ||
| 7351 | func_ty.* = .{ .return_type = .{ .specifier = .int }, .params = &.{} }; | ||
| 7352 | const ty: Type = .{ .specifier = .old_style_func, .data = .{ .func = func_ty } }; | ||
| 7353 | const node = try p.addNode(.{ | ||
| 7354 | .ty = ty, | ||
| 7355 | .tag = .fn_proto, | ||
| 7356 | .data = .{ .decl = .{ .name = name_tok } }, | ||
| 7357 | }); | ||
| 7358 | |||
| 7359 | try p.decl_buf.append(node); | ||
| 7360 | try p.syms.declareSymbol(p, interned_name, ty, name_tok, node); | ||
| 7361 | |||
| 7362 | return Result{ | ||
| 7363 | .ty = ty, | ||
| 7364 | .node = try p.addNode(.{ | ||
| 7365 | .tag = .decl_ref_expr, | ||
| 7366 | .ty = ty, | ||
| 7367 | .data = .{ .decl_ref = name_tok }, | ||
| 7368 | }), | ||
| 7369 | }; | ||
| 7370 | } | ||
| 7371 | try p.errStr(.undeclared_identifier, name_tok, p.tokSlice(name_tok)); | ||
| 7372 | return error.ParsingFailed; | ||
| 7373 | }, | ||
| 7374 | .keyword_true, .keyword_false => |id| { | ||
| 7375 | p.tok_i += 1; | ||
| 7376 | const numeric_value = @intFromBool(id == .keyword_true); | ||
| 7377 | const res = Result{ | ||
| 7378 | .val = Value.int(numeric_value), | ||
| 7379 | .ty = .{ .specifier = .bool }, | ||
| 7380 | .node = try p.addNode(.{ | ||
| 7381 | .tag = .bool_literal, | ||
| 7382 | .ty = .{ .specifier = .bool }, | ||
| 7383 | .data = .{ .int = numeric_value }, | ||
| 7384 | }), | ||
| 7385 | }; | ||
| 7386 | std.debug.assert(!p.in_macro); // Should have been replaced with .one / .zero | ||
| 7387 | try p.value_map.put(res.node, res.val); | ||
| 7388 | return res; | ||
| 7389 | }, | ||
| 7390 | .keyword_nullptr => { | ||
| 7391 | defer p.tok_i += 1; | ||
| 7392 | try p.errStr(.pre_c2x_compat, p.tok_i, "'nullptr'"); | ||
| 7393 | return Result{ | ||
| 7394 | .val = .{ .tag = .nullptr_t }, | ||
| 7395 | .ty = .{ .specifier = .nullptr_t }, | ||
| 7396 | .node = try p.addNode(.{ | ||
| 7397 | .tag = .nullptr_literal, | ||
| 7398 | .ty = .{ .specifier = .nullptr_t }, | ||
| 7399 | .data = undefined, | ||
| 7400 | }), | ||
| 7401 | }; | ||
| 7402 | }, | ||
| 7403 | .macro_func, .macro_function => { | ||
| 7404 | defer p.tok_i += 1; | ||
| 7405 | var ty: Type = undefined; | ||
| 7406 | var tok = p.tok_i; | ||
| 7407 | if (p.func.ident) |some| { | ||
| 7408 | ty = some.ty; | ||
| 7409 | tok = p.nodes.items(.data)[@intFromEnum(some.node)].decl.name; | ||
| 7410 | } else if (p.func.ty) |_| { | ||
| 7411 | const start: u32 = @intCast(p.retained_strings.items.len); | ||
| 7412 | try p.retained_strings.appendSlice(p.tokSlice(p.func.name)); | ||
| 7413 | try p.retained_strings.append(0); | ||
| 7414 | const predef = try p.makePredefinedIdentifier(start); | ||
| 7415 | ty = predef.ty; | ||
| 7416 | p.func.ident = predef; | ||
| 7417 | } else { | ||
| 7418 | const start: u32 = @intCast(p.retained_strings.items.len); | ||
| 7419 | try p.retained_strings.append(0); | ||
| 7420 | const predef = try p.makePredefinedIdentifier(start); | ||
| 7421 | ty = predef.ty; | ||
| 7422 | p.func.ident = predef; | ||
| 7423 | try p.decl_buf.append(predef.node); | ||
| 7424 | } | ||
| 7425 | if (p.func.ty == null) try p.err(.predefined_top_level); | ||
| 7426 | return Result{ | ||
| 7427 | .ty = ty, | ||
| 7428 | .node = try p.addNode(.{ | ||
| 7429 | .tag = .decl_ref_expr, | ||
| 7430 | .ty = ty, | ||
| 7431 | .data = .{ .decl_ref = tok }, | ||
| 7432 | }), | ||
| 7433 | }; | ||
| 7434 | }, | ||
| 7435 | .macro_pretty_func => { | ||
| 7436 | defer p.tok_i += 1; | ||
| 7437 | var ty: Type = undefined; | ||
| 7438 | if (p.func.pretty_ident) |some| { | ||
| 7439 | ty = some.ty; | ||
| 7440 | } else if (p.func.ty) |func_ty| { | ||
| 7441 | const mapper = p.comp.string_interner.getSlowTypeMapper(); | ||
| 7442 | const start: u32 = @intCast(p.retained_strings.items.len); | ||
| 7443 | try Type.printNamed(func_ty, p.tokSlice(p.func.name), mapper, p.comp.langopts, p.retained_strings.writer()); | ||
| 7444 | try p.retained_strings.append(0); | ||
| 7445 | const predef = try p.makePredefinedIdentifier(start); | ||
| 7446 | ty = predef.ty; | ||
| 7447 | p.func.pretty_ident = predef; | ||
| 7448 | } else { | ||
| 7449 | const start: u32 = @intCast(p.retained_strings.items.len); | ||
| 7450 | try p.retained_strings.appendSlice("top level\x00"); | ||
| 7451 | const predef = try p.makePredefinedIdentifier(start); | ||
| 7452 | ty = predef.ty; | ||
| 7453 | p.func.pretty_ident = predef; | ||
| 7454 | try p.decl_buf.append(predef.node); | ||
| 7455 | } | ||
| 7456 | if (p.func.ty == null) try p.err(.predefined_top_level); | ||
| 7457 | return Result{ | ||
| 7458 | .ty = ty, | ||
| 7459 | .node = try p.addNode(.{ | ||
| 7460 | .tag = .decl_ref_expr, | ||
| 7461 | .ty = ty, | ||
| 7462 | .data = .{ .decl_ref = p.tok_i }, | ||
| 7463 | }), | ||
| 7464 | }; | ||
| 7465 | }, | ||
| 7466 | .string_literal, | ||
| 7467 | .string_literal_utf_16, | ||
| 7468 | .string_literal_utf_8, | ||
| 7469 | .string_literal_utf_32, | ||
| 7470 | .string_literal_wide, | ||
| 7471 | .unterminated_string_literal, | ||
| 7472 | => return p.stringLiteral(), | ||
| 7473 | .char_literal, | ||
| 7474 | .char_literal_utf_8, | ||
| 7475 | .char_literal_utf_16, | ||
| 7476 | .char_literal_utf_32, | ||
| 7477 | .char_literal_wide, | ||
| 7478 | .empty_char_literal, | ||
| 7479 | .unterminated_char_literal, | ||
| 7480 | => return p.charLiteral(), | ||
| 7481 | .zero => { | ||
| 7482 | p.tok_i += 1; | ||
| 7483 | var res: Result = .{ .val = Value.int(0), .ty = if (p.in_macro) p.comp.types.intmax else Type.int }; | ||
| 7484 | res.node = try p.addNode(.{ .tag = .int_literal, .ty = res.ty, .data = undefined }); | ||
| 7485 | if (!p.in_macro) try p.value_map.put(res.node, res.val); | ||
| 7486 | return res; | ||
| 7487 | }, | ||
| 7488 | .one => { | ||
| 7489 | p.tok_i += 1; | ||
| 7490 | var res: Result = .{ .val = Value.int(1), .ty = if (p.in_macro) p.comp.types.intmax else Type.int }; | ||
| 7491 | res.node = try p.addNode(.{ .tag = .int_literal, .ty = res.ty, .data = undefined }); | ||
| 7492 | if (!p.in_macro) try p.value_map.put(res.node, res.val); | ||
| 7493 | return res; | ||
| 7494 | }, | ||
| 7495 | .pp_num => return p.ppNum(), | ||
| 7496 | .embed_byte => { | ||
| 7497 | assert(!p.in_macro); | ||
| 7498 | const loc = p.pp.tokens.items(.loc)[p.tok_i]; | ||
| 7499 | p.tok_i += 1; | ||
| 7500 | const buf = p.comp.getSource(.generated).buf[loc.byte_offset..]; | ||
| 7501 | var byte: u8 = buf[0] - '0'; | ||
| 7502 | for (buf[1..]) |c| { | ||
| 7503 | if (!std.ascii.isDigit(c)) break; | ||
| 7504 | byte *= 10; | ||
| 7505 | byte += c - '0'; | ||
| 7506 | } | ||
| 7507 | var res: Result = .{ .val = Value.int(byte) }; | ||
| 7508 | res.node = try p.addNode(.{ .tag = .int_literal, .ty = res.ty, .data = undefined }); | ||
| 7509 | try p.value_map.put(res.node, res.val); | ||
| 7510 | return res; | ||
| 7511 | }, | ||
| 7512 | .keyword_generic => return p.genericSelection(), | ||
| 7513 | else => return Result{}, | ||
| 7514 | } | ||
| 7515 | } | ||
| 7516 | |||
| 7517 | fn makePredefinedIdentifier(p: *Parser, start: u32) !Result { | ||
| 7518 | const end: u32 = @intCast(p.retained_strings.items.len); | ||
| 7519 | const elem_ty = .{ .specifier = .char, .qual = .{ .@"const" = true } }; | ||
| 7520 | const arr_ty = try p.arena.create(Type.Array); | ||
| 7521 | arr_ty.* = .{ .elem = elem_ty, .len = end - start }; | ||
| 7522 | const ty: Type = .{ .specifier = .array, .data = .{ .array = arr_ty } }; | ||
| 7523 | |||
| 7524 | const val = Value.bytes(start, end); | ||
| 7525 | const str_lit = try p.addNode(.{ .tag = .string_literal_expr, .ty = ty, .data = undefined }); | ||
| 7526 | if (!p.in_macro) try p.value_map.put(str_lit, val); | ||
| 7527 | |||
| 7528 | return Result{ .ty = ty, .node = try p.addNode(.{ | ||
| 7529 | .tag = .implicit_static_var, | ||
| 7530 | .ty = ty, | ||
| 7531 | .data = .{ .decl = .{ .name = p.tok_i, .node = str_lit } }, | ||
| 7532 | }) }; | ||
| 7533 | } | ||
| 7534 | |||
| 7535 | fn stringLiteral(p: *Parser) Error!Result { | ||
| 7536 | var string_end = p.tok_i; | ||
| 7537 | var string_kind: TextLiteral.Kind = .char; | ||
| 7538 | while (TextLiteral.Kind.classify(p.tok_ids[string_end], .string_literal)) |next| : (string_end += 1) { | ||
| 7539 | string_kind = string_kind.concat(next) catch { | ||
| 7540 | try p.errTok(.unsupported_str_cat, string_end); | ||
| 7541 | while (p.tok_ids[p.tok_i].isStringLiteral()) : (p.tok_i += 1) {} | ||
| 7542 | return error.ParsingFailed; | ||
| 7543 | }; | ||
| 7544 | if (string_kind == .unterminated) { | ||
| 7545 | try p.errTok(.unterminated_string_literal_error, string_end); | ||
| 7546 | p.tok_i = string_end + 1; | ||
| 7547 | return error.ParsingFailed; | ||
| 7548 | } | ||
| 7549 | } | ||
| 7550 | assert(string_end > p.tok_i); | ||
| 7551 | |||
| 7552 | const char_width = string_kind.charUnitSize(p.comp); | ||
| 7553 | |||
| 7554 | const retain_start = mem.alignForward(usize, p.retained_strings.items.len, string_kind.internalStorageAlignment(p.comp)); | ||
| 7555 | try p.retained_strings.resize(retain_start); | ||
| 7556 | |||
| 7557 | while (p.tok_i < string_end) : (p.tok_i += 1) { | ||
| 7558 | const this_kind = TextLiteral.Kind.classify(p.tok_ids[p.tok_i], .string_literal).?; | ||
| 7559 | const slice = this_kind.contentSlice(p.tokSlice(p.tok_i)); | ||
| 7560 | var char_literal_parser = TextLiteral.Parser.init(slice, this_kind, 0x10ffff, p.comp); | ||
| 7561 | |||
| 7562 | try p.retained_strings.ensureUnusedCapacity((slice.len + 1) * @intFromEnum(char_width)); // +1 for null terminator | ||
| 7563 | while (char_literal_parser.next()) |item| switch (item) { | ||
| 7564 | .value => |v| { | ||
| 7565 | switch (char_width) { | ||
| 7566 | .@"1" => p.retained_strings.appendAssumeCapacity(@intCast(v)), | ||
| 7567 | .@"2" => { | ||
| 7568 | const word: u16 = @intCast(v); | ||
| 7569 | p.retained_strings.appendSliceAssumeCapacity(mem.asBytes(&word)); | ||
| 7570 | }, | ||
| 7571 | .@"4" => p.retained_strings.appendSliceAssumeCapacity(mem.asBytes(&v)), | ||
| 7572 | } | ||
| 7573 | }, | ||
| 7574 | .codepoint => |c| { | ||
| 7575 | switch (char_width) { | ||
| 7576 | .@"1" => { | ||
| 7577 | var buf: [4]u8 = undefined; | ||
| 7578 | const written = std.unicode.utf8Encode(c, &buf) catch unreachable; | ||
| 7579 | const encoded = buf[0..written]; | ||
| 7580 | p.retained_strings.appendSliceAssumeCapacity(encoded); | ||
| 7581 | }, | ||
| 7582 | .@"2" => { | ||
| 7583 | var utf16_buf: [2]u16 = undefined; | ||
| 7584 | var utf8_buf: [4]u8 = undefined; | ||
| 7585 | const utf8_written = std.unicode.utf8Encode(c, &utf8_buf) catch unreachable; | ||
| 7586 | const utf16_written = std.unicode.utf8ToUtf16Le(&utf16_buf, utf8_buf[0..utf8_written]) catch unreachable; | ||
| 7587 | const bytes = std.mem.sliceAsBytes(utf16_buf[0..utf16_written]); | ||
| 7588 | p.retained_strings.appendSliceAssumeCapacity(bytes); | ||
| 7589 | }, | ||
| 7590 | .@"4" => { | ||
| 7591 | const val: u32 = c; | ||
| 7592 | p.retained_strings.appendSliceAssumeCapacity(mem.asBytes(&val)); | ||
| 7593 | }, | ||
| 7594 | } | ||
| 7595 | }, | ||
| 7596 | .improperly_encoded => |bytes| p.retained_strings.appendSliceAssumeCapacity(bytes), | ||
| 7597 | .utf8_text => |view| { | ||
| 7598 | switch (char_width) { | ||
| 7599 | .@"1" => p.retained_strings.appendSliceAssumeCapacity(view.bytes), | ||
| 7600 | .@"2" => { | ||
| 7601 | var capacity_slice: []align(@alignOf(u16)) u8 = @alignCast(p.retained_strings.unusedCapacitySlice()); | ||
| 7602 | const dest_len = std.mem.alignBackward(usize, capacity_slice.len, 2); | ||
| 7603 | var dest = std.mem.bytesAsSlice(u16, capacity_slice[0..dest_len]); | ||
| 7604 | const words_written = std.unicode.utf8ToUtf16Le(dest, view.bytes) catch unreachable; | ||
| 7605 | p.retained_strings.resize(p.retained_strings.items.len + words_written * 2) catch unreachable; | ||
| 7606 | }, | ||
| 7607 | .@"4" => { | ||
| 7608 | var it = view.iterator(); | ||
| 7609 | while (it.nextCodepoint()) |codepoint| { | ||
| 7610 | const val: u32 = codepoint; | ||
| 7611 | p.retained_strings.appendSliceAssumeCapacity(mem.asBytes(&val)); | ||
| 7612 | } | ||
| 7613 | }, | ||
| 7614 | } | ||
| 7615 | }, | ||
| 7616 | }; | ||
| 7617 | for (char_literal_parser.errors.constSlice()) |item| { | ||
| 7618 | try p.errExtra(item.tag, p.tok_i, item.extra); | ||
| 7619 | } | ||
| 7620 | } | ||
| 7621 | p.retained_strings.appendNTimesAssumeCapacity(0, @intFromEnum(char_width)); | ||
| 7622 | const slice = p.retained_strings.items[retain_start..]; | ||
| 7623 | |||
| 7624 | const arr_ty = try p.arena.create(Type.Array); | ||
| 7625 | arr_ty.* = .{ .elem = string_kind.elementType(p.comp), .len = @divExact(slice.len, @intFromEnum(char_width)) }; | ||
| 7626 | var res: Result = .{ | ||
| 7627 | .ty = .{ | ||
| 7628 | .specifier = .array, | ||
| 7629 | .data = .{ .array = arr_ty }, | ||
| 7630 | }, | ||
| 7631 | .val = Value.bytes(@intCast(retain_start), @intCast(p.retained_strings.items.len)), | ||
| 7632 | }; | ||
| 7633 | res.node = try p.addNode(.{ .tag = .string_literal_expr, .ty = res.ty, .data = undefined }); | ||
| 7634 | if (!p.in_macro) try p.value_map.put(res.node, res.val); | ||
| 7635 | return res; | ||
| 7636 | } | ||
| 7637 | |||
| 7638 | fn charLiteral(p: *Parser) Error!Result { | ||
| 7639 | defer p.tok_i += 1; | ||
| 7640 | const tok_id = p.tok_ids[p.tok_i]; | ||
| 7641 | const char_kind = TextLiteral.Kind.classify(tok_id, .char_literal) orelse { | ||
| 7642 | if (tok_id == .empty_char_literal) { | ||
| 7643 | try p.err(.empty_char_literal_error); | ||
| 7644 | } else if (tok_id == .unterminated_char_literal) { | ||
| 7645 | try p.err(.unterminated_char_literal_error); | ||
| 7646 | } else unreachable; | ||
| 7647 | return .{ | ||
| 7648 | .ty = Type.int, | ||
| 7649 | .val = Value.int(0), | ||
| 7650 | .node = try p.addNode(.{ .tag = .char_literal, .ty = Type.int, .data = undefined }), | ||
| 7651 | }; | ||
| 7652 | }; | ||
| 7653 | var val: u32 = 0; | ||
| 7654 | |||
| 7655 | const slice = char_kind.contentSlice(p.tokSlice(p.tok_i)); | ||
| 7656 | |||
| 7657 | if (slice.len == 1 and std.ascii.isASCII(slice[0])) { | ||
| 7658 | // fast path: single unescaped ASCII char | ||
| 7659 | val = slice[0]; | ||
| 7660 | } else { | ||
| 7661 | const max_codepoint = char_kind.maxCodepoint(p.comp); | ||
| 7662 | var char_literal_parser = TextLiteral.Parser.init(slice, char_kind, max_codepoint, p.comp); | ||
| 7663 | |||
| 7664 | const max_chars_expected = 4; | ||
| 7665 | var stack_fallback = std.heap.stackFallback(max_chars_expected * @sizeOf(u32), p.comp.gpa); | ||
| 7666 | var chars = std.ArrayList(u32).initCapacity(stack_fallback.get(), max_chars_expected) catch unreachable; // stack allocation already succeeded | ||
| 7667 | defer chars.deinit(); | ||
| 7668 | |||
| 7669 | while (char_literal_parser.next()) |item| switch (item) { | ||
| 7670 | .value => |v| try chars.append(v), | ||
| 7671 | .codepoint => |c| try chars.append(c), | ||
| 7672 | .improperly_encoded => |s| { | ||
| 7673 | try chars.ensureUnusedCapacity(s.len); | ||
| 7674 | for (s) |c| chars.appendAssumeCapacity(c); | ||
| 7675 | }, | ||
| 7676 | .utf8_text => |view| { | ||
| 7677 | var it = view.iterator(); | ||
| 7678 | var max_codepoint_seen: u21 = 0; | ||
| 7679 | try chars.ensureUnusedCapacity(view.bytes.len); | ||
| 7680 | while (it.nextCodepoint()) |c| { | ||
| 7681 | max_codepoint_seen = @max(max_codepoint_seen, c); | ||
| 7682 | chars.appendAssumeCapacity(c); | ||
| 7683 | } | ||
| 7684 | if (max_codepoint_seen > max_codepoint) { | ||
| 7685 | char_literal_parser.err(.char_too_large, .{ .none = {} }); | ||
| 7686 | } | ||
| 7687 | }, | ||
| 7688 | }; | ||
| 7689 | |||
| 7690 | const is_multichar = chars.items.len > 1; | ||
| 7691 | if (is_multichar) { | ||
| 7692 | if (char_kind == .char and chars.items.len == 4) { | ||
| 7693 | char_literal_parser.warn(.four_char_char_literal, .{ .none = {} }); | ||
| 7694 | } else if (char_kind == .char) { | ||
| 7695 | char_literal_parser.warn(.multichar_literal_warning, .{ .none = {} }); | ||
| 7696 | } else { | ||
| 7697 | const kind = switch (char_kind) { | ||
| 7698 | .wide => "wide", | ||
| 7699 | .utf_8, .utf_16, .utf_32 => "Unicode", | ||
| 7700 | else => unreachable, | ||
| 7701 | }; | ||
| 7702 | char_literal_parser.err(.invalid_multichar_literal, .{ .str = kind }); | ||
| 7703 | } | ||
| 7704 | } | ||
| 7705 | |||
| 7706 | var multichar_overflow = false; | ||
| 7707 | if (char_kind == .char and is_multichar) { | ||
| 7708 | for (chars.items) |item| { | ||
| 7709 | val, const overflowed = @shlWithOverflow(val, 8); | ||
| 7710 | multichar_overflow = multichar_overflow or overflowed != 0; | ||
| 7711 | val += @as(u8, @truncate(item)); | ||
| 7712 | } | ||
| 7713 | } else if (chars.items.len > 0) { | ||
| 7714 | val = chars.items[chars.items.len - 1]; | ||
| 7715 | } | ||
| 7716 | |||
| 7717 | if (multichar_overflow) { | ||
| 7718 | char_literal_parser.err(.char_lit_too_wide, .{ .none = {} }); | ||
| 7719 | } | ||
| 7720 | |||
| 7721 | for (char_literal_parser.errors.constSlice()) |item| { | ||
| 7722 | try p.errExtra(item.tag, p.tok_i, item.extra); | ||
| 7723 | } | ||
| 7724 | } | ||
| 7725 | |||
| 7726 | const ty = char_kind.charLiteralType(p.comp); | ||
| 7727 | // This is the type the literal will have if we're in a macro; macros always operate on intmax_t/uintmax_t values | ||
| 7728 | const macro_ty = if (ty.isUnsignedInt(p.comp) or (char_kind == .char and p.comp.getCharSignedness() == .unsigned)) | ||
| 7729 | p.comp.types.intmax.makeIntegerUnsigned() | ||
| 7730 | else | ||
| 7731 | p.comp.types.intmax; | ||
| 7732 | |||
| 7733 | var res = Result{ | ||
| 7734 | .ty = if (p.in_macro) macro_ty else ty, | ||
| 7735 | .val = Value.int(val), | ||
| 7736 | .node = try p.addNode(.{ .tag = .char_literal, .ty = ty, .data = undefined }), | ||
| 7737 | }; | ||
| 7738 | if (!p.in_macro) try p.value_map.put(res.node, res.val); | ||
| 7739 | return res; | ||
| 7740 | } | ||
| 7741 | |||
| 7742 | fn parseFloat(p: *Parser, buf: []const u8, suffix: NumberSuffix) !Result { | ||
| 7743 | switch (suffix) { | ||
| 7744 | .L => return p.todo("long double literals"), | ||
| 7745 | .IL => { | ||
| 7746 | try p.err(.gnu_imaginary_constant); | ||
| 7747 | return p.todo("long double imaginary literals"); | ||
| 7748 | }, | ||
| 7749 | .None, .I, .F, .IF, .F16 => { | ||
| 7750 | const ty = Type{ .specifier = switch (suffix) { | ||
| 7751 | .None, .I => .double, | ||
| 7752 | .F, .IF => .float, | ||
| 7753 | .F16 => .float16, | ||
| 7754 | else => unreachable, | ||
| 7755 | } }; | ||
| 7756 | const d_val = std.fmt.parseFloat(f64, buf) catch |er| switch (er) { | ||
| 7757 | error.InvalidCharacter => return p.todo("c2x digit separators in floats"), | ||
| 7758 | else => unreachable, | ||
| 7759 | }; | ||
| 7760 | const tag: Tree.Tag = switch (suffix) { | ||
| 7761 | .None, .I => .double_literal, | ||
| 7762 | .F, .IF => .float_literal, | ||
| 7763 | .F16 => .float16_literal, | ||
| 7764 | else => unreachable, | ||
| 7765 | }; | ||
| 7766 | var res = Result{ | ||
| 7767 | .ty = ty, | ||
| 7768 | .node = try p.addNode(.{ .tag = tag, .ty = ty, .data = undefined }), | ||
| 7769 | .val = Value.float(d_val), | ||
| 7770 | }; | ||
| 7771 | if (suffix.isImaginary()) { | ||
| 7772 | try p.err(.gnu_imaginary_constant); | ||
| 7773 | res.ty = .{ .specifier = switch (suffix) { | ||
| 7774 | .I => .complex_double, | ||
| 7775 | .IF => .complex_float, | ||
| 7776 | else => unreachable, | ||
| 7777 | } }; | ||
| 7778 | res.val.tag = .unavailable; | ||
| 7779 | try res.un(p, .imaginary_literal); | ||
| 7780 | } | ||
| 7781 | return res; | ||
| 7782 | }, | ||
| 7783 | else => unreachable, | ||
| 7784 | } | ||
| 7785 | } | ||
| 7786 | |||
| 7787 | fn getIntegerPart(p: *Parser, buf: []const u8, prefix: NumberPrefix, tok_i: TokenIndex) ![]const u8 { | ||
| 7788 | if (buf[0] == '.') return ""; | ||
| 7789 | |||
| 7790 | if (!prefix.digitAllowed(buf[0])) { | ||
| 7791 | switch (prefix) { | ||
| 7792 | .binary => try p.errExtra(.invalid_binary_digit, tok_i, .{ .ascii = @intCast(buf[0]) }), | ||
| 7793 | .octal => try p.errExtra(.invalid_octal_digit, tok_i, .{ .ascii = @intCast(buf[0]) }), | ||
| 7794 | .hex => try p.errStr(.invalid_int_suffix, tok_i, buf), | ||
| 7795 | .decimal => unreachable, | ||
| 7796 | } | ||
| 7797 | return error.ParsingFailed; | ||
| 7798 | } | ||
| 7799 | |||
| 7800 | for (buf, 0..) |c, idx| { | ||
| 7801 | if (idx == 0) continue; | ||
| 7802 | switch (c) { | ||
| 7803 | '.' => return buf[0..idx], | ||
| 7804 | 'p', 'P' => return if (prefix == .hex) buf[0..idx] else { | ||
| 7805 | try p.errStr(.invalid_int_suffix, tok_i, buf[idx..]); | ||
| 7806 | return error.ParsingFailed; | ||
| 7807 | }, | ||
| 7808 | 'e', 'E' => { | ||
| 7809 | switch (prefix) { | ||
| 7810 | .hex => continue, | ||
| 7811 | .decimal => return buf[0..idx], | ||
| 7812 | .binary => try p.errExtra(.invalid_binary_digit, tok_i, .{ .ascii = @intCast(c) }), | ||
| 7813 | .octal => try p.errExtra(.invalid_octal_digit, tok_i, .{ .ascii = @intCast(c) }), | ||
| 7814 | } | ||
| 7815 | return error.ParsingFailed; | ||
| 7816 | }, | ||
| 7817 | '0'...'9', 'a'...'d', 'A'...'D', 'f', 'F' => { | ||
| 7818 | if (!prefix.digitAllowed(c)) { | ||
| 7819 | switch (prefix) { | ||
| 7820 | .binary => try p.errExtra(.invalid_binary_digit, tok_i, .{ .ascii = @intCast(c) }), | ||
| 7821 | .octal => try p.errExtra(.invalid_octal_digit, tok_i, .{ .ascii = @intCast(c) }), | ||
| 7822 | .decimal, .hex => try p.errStr(.invalid_int_suffix, tok_i, buf[idx..]), | ||
| 7823 | } | ||
| 7824 | return error.ParsingFailed; | ||
| 7825 | } | ||
| 7826 | }, | ||
| 7827 | '\'' => {}, | ||
| 7828 | else => return buf[0..idx], | ||
| 7829 | } | ||
| 7830 | } | ||
| 7831 | return buf; | ||
| 7832 | } | ||
| 7833 | |||
| 7834 | fn fixedSizeInt(p: *Parser, base: u8, buf: []const u8, suffix: NumberSuffix, tok_i: TokenIndex) !Result { | ||
| 7835 | var val: u64 = 0; | ||
| 7836 | var overflow = false; | ||
| 7837 | for (buf) |c| { | ||
| 7838 | const digit: u64 = switch (c) { | ||
| 7839 | '0'...'9' => c - '0', | ||
| 7840 | 'A'...'Z' => c - 'A' + 10, | ||
| 7841 | 'a'...'z' => c - 'a' + 10, | ||
| 7842 | '\'' => continue, | ||
| 7843 | else => unreachable, | ||
| 7844 | }; | ||
| 7845 | |||
| 7846 | if (val != 0) { | ||
| 7847 | const product, const overflowed = @mulWithOverflow(val, base); | ||
| 7848 | if (overflowed != 0) { | ||
| 7849 | overflow = true; | ||
| 7850 | } | ||
| 7851 | val = product; | ||
| 7852 | } | ||
| 7853 | const sum, const overflowed = @addWithOverflow(val, digit); | ||
| 7854 | if (overflowed != 0) overflow = true; | ||
| 7855 | val = sum; | ||
| 7856 | } | ||
| 7857 | if (overflow) { | ||
| 7858 | try p.errTok(.int_literal_too_big, tok_i); | ||
| 7859 | var res: Result = .{ .ty = .{ .specifier = .ulong_long }, .val = Value.int(val) }; | ||
| 7860 | res.node = try p.addNode(.{ .tag = .int_literal, .ty = res.ty, .data = undefined }); | ||
| 7861 | if (!p.in_macro) try p.value_map.put(res.node, res.val); | ||
| 7862 | return res; | ||
| 7863 | } | ||
| 7864 | if (suffix.isSignedInteger()) { | ||
| 7865 | if (val > p.comp.types.intmax.maxInt(p.comp)) { | ||
| 7866 | try p.errTok(.implicitly_unsigned_literal, tok_i); | ||
| 7867 | } | ||
| 7868 | } | ||
| 7869 | return if (base == 10) | ||
| 7870 | switch (suffix) { | ||
| 7871 | .None, .I => p.castInt(val, &.{ .int, .long, .long_long }), | ||
| 7872 | .U, .IU => p.castInt(val, &.{ .uint, .ulong, .ulong_long }), | ||
| 7873 | .L, .IL => p.castInt(val, &.{ .long, .long_long }), | ||
| 7874 | .UL, .IUL => p.castInt(val, &.{ .ulong, .ulong_long }), | ||
| 7875 | .LL, .ILL => p.castInt(val, &.{.long_long}), | ||
| 7876 | .ULL, .IULL => p.castInt(val, &.{.ulong_long}), | ||
| 7877 | else => unreachable, | ||
| 7878 | } | ||
| 7879 | else switch (suffix) { | ||
| 7880 | .None, .I => p.castInt(val, &.{ .int, .uint, .long, .ulong, .long_long, .ulong_long }), | ||
| 7881 | .U, .IU => p.castInt(val, &.{ .uint, .ulong, .ulong_long }), | ||
| 7882 | .L, .IL => p.castInt(val, &.{ .long, .ulong, .long_long, .ulong_long }), | ||
| 7883 | .UL, .IUL => p.castInt(val, &.{ .ulong, .ulong_long }), | ||
| 7884 | .LL, .ILL => p.castInt(val, &.{ .long_long, .ulong_long }), | ||
| 7885 | .ULL, .IULL => p.castInt(val, &.{.ulong_long}), | ||
| 7886 | else => unreachable, | ||
| 7887 | }; | ||
| 7888 | } | ||
| 7889 | |||
| 7890 | fn parseInt(p: *Parser, prefix: NumberPrefix, buf: []const u8, suffix: NumberSuffix, tok_i: TokenIndex) !Result { | ||
| 7891 | if (prefix == .binary) { | ||
| 7892 | try p.errTok(.binary_integer_literal, tok_i); | ||
| 7893 | } | ||
| 7894 | const base = @intFromEnum(prefix); | ||
| 7895 | var res = if (suffix.isBitInt()) | ||
| 7896 | try p.bitInt(base, buf, suffix, tok_i) | ||
| 7897 | else | ||
| 7898 | try p.fixedSizeInt(base, buf, suffix, tok_i); | ||
| 7899 | |||
| 7900 | if (suffix.isImaginary()) { | ||
| 7901 | try p.errTok(.gnu_imaginary_constant, tok_i); | ||
| 7902 | res.ty = res.ty.makeComplex(); | ||
| 7903 | res.val.tag = .unavailable; | ||
| 7904 | try res.un(p, .imaginary_literal); | ||
| 7905 | } | ||
| 7906 | return res; | ||
| 7907 | } | ||
| 7908 | |||
| 7909 | fn bitInt(p: *Parser, base: u8, buf: []const u8, suffix: NumberSuffix, tok_i: TokenIndex) Error!Result { | ||
| 7910 | try p.errStr(.pre_c2x_compat, tok_i, "'_BitInt' suffix for literals"); | ||
| 7911 | try p.errTok(.bitint_suffix, tok_i); | ||
| 7912 | |||
| 7913 | var managed = try big.int.Managed.init(p.gpa); | ||
| 7914 | defer managed.deinit(); | ||
| 7915 | |||
| 7916 | managed.setString(base, buf) catch |e| switch (e) { | ||
| 7917 | error.InvalidBase => unreachable, // `base` is one of 2, 8, 10, 16 | ||
| 7918 | error.InvalidCharacter => unreachable, // digits validated by Tokenizer | ||
| 7919 | else => |er| return er, | ||
| 7920 | }; | ||
| 7921 | const c = managed.toConst(); | ||
| 7922 | const bits_needed: std.math.IntFittingRange(0, Compilation.bit_int_max_bits) = blk: { | ||
| 7923 | // Literal `0` requires at least 1 bit | ||
| 7924 | const count = @max(1, c.bitCountTwosComp()); | ||
| 7925 | // The wb suffix results in a _BitInt that includes space for the sign bit even if the | ||
| 7926 | // value of the constant is positive or was specified in hexadecimal or octal notation. | ||
| 7927 | const sign_bits = @intFromBool(suffix.isSignedInteger()); | ||
| 7928 | const bits_needed = count + sign_bits; | ||
| 7929 | if (bits_needed > Compilation.bit_int_max_bits) { | ||
| 7930 | const specifier: Type.Builder.Specifier = switch (suffix) { | ||
| 7931 | .WB => .{ .bit_int = 0 }, | ||
| 7932 | .UWB => .{ .ubit_int = 0 }, | ||
| 7933 | .IWB => .{ .complex_bit_int = 0 }, | ||
| 7934 | .IUWB => .{ .complex_ubit_int = 0 }, | ||
| 7935 | else => unreachable, | ||
| 7936 | }; | ||
| 7937 | try p.errStr(.bit_int_too_big, tok_i, specifier.str(p.comp.langopts).?); | ||
| 7938 | return error.ParsingFailed; | ||
| 7939 | } | ||
| 7940 | if (bits_needed > 64) { | ||
| 7941 | return p.todo("_BitInt constants > 64 bits"); | ||
| 7942 | } | ||
| 7943 | break :blk @intCast(bits_needed); | ||
| 7944 | }; | ||
| 7945 | |||
| 7946 | const val = c.to(u64) catch |e| switch (e) { | ||
| 7947 | error.NegativeIntoUnsigned => unreachable, // unary minus parsed elsewhere; we only see positive integers | ||
| 7948 | error.TargetTooSmall => unreachable, // Validated above but Todo: handle larger _BitInt | ||
| 7949 | }; | ||
| 7950 | |||
| 7951 | var res: Result = .{ | ||
| 7952 | .val = Value.int(val), | ||
| 7953 | .ty = .{ | ||
| 7954 | .specifier = .bit_int, | ||
| 7955 | .data = .{ .int = .{ .bits = bits_needed, .signedness = suffix.signedness() } }, | ||
| 7956 | }, | ||
| 7957 | }; | ||
| 7958 | res.node = try p.addNode(.{ .tag = .int_literal, .ty = res.ty, .data = .{ .int = val } }); | ||
| 7959 | if (!p.in_macro) try p.value_map.put(res.node, res.val); | ||
| 7960 | return res; | ||
| 7961 | } | ||
| 7962 | |||
| 7963 | fn getFracPart(p: *Parser, buf: []const u8, prefix: NumberPrefix, tok_i: TokenIndex) ![]const u8 { | ||
| 7964 | if (buf.len == 0 or buf[0] != '.') return ""; | ||
| 7965 | assert(prefix != .octal); | ||
| 7966 | if (prefix == .binary) { | ||
| 7967 | try p.errStr(.invalid_int_suffix, tok_i, buf); | ||
| 7968 | return error.ParsingFailed; | ||
| 7969 | } | ||
| 7970 | for (buf, 0..) |c, idx| { | ||
| 7971 | if (idx == 0) continue; | ||
| 7972 | if (c == '\'') continue; | ||
| 7973 | if (!prefix.digitAllowed(c)) return buf[0..idx]; | ||
| 7974 | } | ||
| 7975 | return buf; | ||
| 7976 | } | ||
| 7977 | |||
| 7978 | fn getExponent(p: *Parser, buf: []const u8, prefix: NumberPrefix, tok_i: TokenIndex) ![]const u8 { | ||
| 7979 | if (buf.len == 0) return ""; | ||
| 7980 | |||
| 7981 | switch (buf[0]) { | ||
| 7982 | 'e', 'E' => assert(prefix == .decimal), | ||
| 7983 | 'p', 'P' => if (prefix != .hex) { | ||
| 7984 | try p.errStr(.invalid_float_suffix, tok_i, buf); | ||
| 7985 | return error.ParsingFailed; | ||
| 7986 | }, | ||
| 7987 | else => return "", | ||
| 7988 | } | ||
| 7989 | const end = for (buf, 0..) |c, idx| { | ||
| 7990 | if (idx == 0) continue; | ||
| 7991 | if (idx == 1 and (c == '+' or c == '-')) continue; | ||
| 7992 | switch (c) { | ||
| 7993 | '0'...'9' => {}, | ||
| 7994 | '\'' => continue, | ||
| 7995 | else => break idx, | ||
| 7996 | } | ||
| 7997 | } else buf.len; | ||
| 7998 | const exponent = buf[0..end]; | ||
| 7999 | if (std.mem.indexOfAny(u8, exponent, "0123456789") == null) { | ||
| 8000 | try p.errTok(.exponent_has_no_digits, tok_i); | ||
| 8001 | return error.ParsingFailed; | ||
| 8002 | } | ||
| 8003 | return exponent; | ||
| 8004 | } | ||
| 8005 | |||
| 8006 | /// Using an explicit `tok_i` parameter instead of `p.tok_i` makes it easier | ||
| 8007 | /// to parse numbers in pragma handlers. | ||
| 8008 | pub fn parseNumberToken(p: *Parser, tok_i: TokenIndex) !Result { | ||
| 8009 | const buf = p.tokSlice(tok_i); | ||
| 8010 | const prefix = NumberPrefix.fromString(buf); | ||
| 8011 | const after_prefix = buf[prefix.stringLen()..]; | ||
| 8012 | |||
| 8013 | const int_part = try p.getIntegerPart(after_prefix, prefix, tok_i); | ||
| 8014 | |||
| 8015 | const after_int = after_prefix[int_part.len..]; | ||
| 8016 | |||
| 8017 | const frac = try p.getFracPart(after_int, prefix, tok_i); | ||
| 8018 | const after_frac = after_int[frac.len..]; | ||
| 8019 | |||
| 8020 | const exponent = try p.getExponent(after_frac, prefix, tok_i); | ||
| 8021 | const suffix_str = after_frac[exponent.len..]; | ||
| 8022 | const is_float = (exponent.len > 0 or frac.len > 0); | ||
| 8023 | const suffix = NumberSuffix.fromString(suffix_str, if (is_float) .float else .int) orelse { | ||
| 8024 | if (is_float) { | ||
| 8025 | try p.errStr(.invalid_float_suffix, tok_i, suffix_str); | ||
| 8026 | } else { | ||
| 8027 | try p.errStr(.invalid_int_suffix, tok_i, suffix_str); | ||
| 8028 | } | ||
| 8029 | return error.ParsingFailed; | ||
| 8030 | }; | ||
| 8031 | |||
| 8032 | if (is_float) { | ||
| 8033 | assert(prefix == .hex or prefix == .decimal); | ||
| 8034 | if (prefix == .hex and exponent.len == 0) { | ||
| 8035 | try p.errTok(.hex_floating_constant_requires_exponent, tok_i); | ||
| 8036 | return error.ParsingFailed; | ||
| 8037 | } | ||
| 8038 | const number = buf[0 .. buf.len - suffix_str.len]; | ||
| 8039 | return p.parseFloat(number, suffix); | ||
| 8040 | } else { | ||
| 8041 | return p.parseInt(prefix, int_part, suffix, tok_i); | ||
| 8042 | } | ||
| 8043 | } | ||
| 8044 | |||
| 8045 | fn ppNum(p: *Parser) Error!Result { | ||
| 8046 | defer p.tok_i += 1; | ||
| 8047 | var res = try p.parseNumberToken(p.tok_i); | ||
| 8048 | if (p.in_macro) { | ||
| 8049 | if (res.ty.isFloat() or !res.ty.isReal()) { | ||
| 8050 | try p.errTok(.float_literal_in_pp_expr, p.tok_i); | ||
| 8051 | return error.ParsingFailed; | ||
| 8052 | } | ||
| 8053 | res.ty = if (res.ty.isUnsignedInt(p.comp)) p.comp.types.intmax.makeIntegerUnsigned() else p.comp.types.intmax; | ||
| 8054 | } else { | ||
| 8055 | try p.value_map.put(res.node, res.val); | ||
| 8056 | } | ||
| 8057 | return res; | ||
| 8058 | } | ||
| 8059 | |||
| 8060 | fn castInt(p: *Parser, val: u64, specs: []const Type.Specifier) Error!Result { | ||
| 8061 | var res: Result = .{ .val = Value.int(val) }; | ||
| 8062 | for (specs) |spec| { | ||
| 8063 | const ty = Type{ .specifier = spec }; | ||
| 8064 | const unsigned = ty.isUnsignedInt(p.comp); | ||
| 8065 | const size = ty.sizeof(p.comp).?; | ||
| 8066 | res.ty = ty; | ||
| 8067 | |||
| 8068 | if (unsigned) { | ||
| 8069 | switch (size) { | ||
| 8070 | 2 => if (val <= std.math.maxInt(u16)) break, | ||
| 8071 | 4 => if (val <= std.math.maxInt(u32)) break, | ||
| 8072 | 8 => if (val <= std.math.maxInt(u64)) break, | ||
| 8073 | else => unreachable, | ||
| 8074 | } | ||
| 8075 | } else { | ||
| 8076 | switch (size) { | ||
| 8077 | 2 => if (val <= std.math.maxInt(i16)) break, | ||
| 8078 | 4 => if (val <= std.math.maxInt(i32)) break, | ||
| 8079 | 8 => if (val <= std.math.maxInt(i64)) break, | ||
| 8080 | else => unreachable, | ||
| 8081 | } | ||
| 8082 | } | ||
| 8083 | } else { | ||
| 8084 | res.ty = .{ .specifier = .ulong_long }; | ||
| 8085 | } | ||
| 8086 | res.node = try p.addNode(.{ .tag = .int_literal, .ty = res.ty, .data = .{ .int = val } }); | ||
| 8087 | if (!p.in_macro) try p.value_map.put(res.node, res.val); | ||
| 8088 | return res; | ||
| 8089 | } | ||
| 8090 | |||
| 8091 | /// Run a parser function but do not evaluate the result | ||
| 8092 | fn parseNoEval(p: *Parser, comptime func: fn (*Parser) Error!Result) Error!Result { | ||
| 8093 | const no_eval = p.no_eval; | ||
| 8094 | defer p.no_eval = no_eval; | ||
| 8095 | p.no_eval = true; | ||
| 8096 | const parsed = try func(p); | ||
| 8097 | try parsed.expect(p); | ||
| 8098 | return parsed; | ||
| 8099 | } | ||
| 8100 | |||
| 8101 | /// genericSelection : keyword_generic '(' assignExpr ',' genericAssoc (',' genericAssoc)* ')' | ||
| 8102 | /// genericAssoc | ||
| 8103 | /// : typeName ':' assignExpr | ||
| 8104 | /// | keyword_default ':' assignExpr | ||
| 8105 | fn genericSelection(p: *Parser) Error!Result { | ||
| 8106 | p.tok_i += 1; | ||
| 8107 | const l_paren = try p.expectToken(.l_paren); | ||
| 8108 | const controlling_tok = p.tok_i; | ||
| 8109 | const controlling = try p.parseNoEval(assignExpr); | ||
| 8110 | _ = try p.expectToken(.comma); | ||
| 8111 | var controlling_ty = controlling.ty; | ||
| 8112 | if (controlling_ty.isArray()) controlling_ty.decayArray(); | ||
| 8113 | |||
| 8114 | const list_buf_top = p.list_buf.items.len; | ||
| 8115 | defer p.list_buf.items.len = list_buf_top; | ||
| 8116 | try p.list_buf.append(controlling.node); | ||
| 8117 | |||
| 8118 | // Use decl_buf to store the token indexes of previous cases | ||
| 8119 | const decl_buf_top = p.decl_buf.items.len; | ||
| 8120 | defer p.decl_buf.items.len = decl_buf_top; | ||
| 8121 | |||
| 8122 | var default_tok: ?TokenIndex = null; | ||
| 8123 | var default: Result = undefined; | ||
| 8124 | var chosen_tok: TokenIndex = undefined; | ||
| 8125 | var chosen: Result = .{}; | ||
| 8126 | while (true) { | ||
| 8127 | const start = p.tok_i; | ||
| 8128 | if (try p.typeName()) |ty| blk: { | ||
| 8129 | if (ty.isArray()) { | ||
| 8130 | try p.errTok(.generic_array_type, start); | ||
| 8131 | } else if (ty.isFunc()) { | ||
| 8132 | try p.errTok(.generic_func_type, start); | ||
| 8133 | } else if (ty.anyQual()) { | ||
| 8134 | try p.errTok(.generic_qual_type, start); | ||
| 8135 | } | ||
| 8136 | _ = try p.expectToken(.colon); | ||
| 8137 | const node = try p.assignExpr(); | ||
| 8138 | try node.expect(p); | ||
| 8139 | |||
| 8140 | if (ty.eql(controlling_ty, p.comp, false)) { | ||
| 8141 | if (chosen.node == .none) { | ||
| 8142 | chosen = node; | ||
| 8143 | chosen_tok = start; | ||
| 8144 | break :blk; | ||
| 8145 | } | ||
| 8146 | try p.errStr(.generic_duplicate, start, try p.typeStr(ty)); | ||
| 8147 | try p.errStr(.generic_duplicate_here, chosen_tok, try p.typeStr(ty)); | ||
| 8148 | } | ||
| 8149 | for (p.list_buf.items[list_buf_top + 1 ..], p.decl_buf.items[decl_buf_top..]) |item, prev_tok| { | ||
| 8150 | const prev_ty = p.nodes.items(.ty)[@intFromEnum(item)]; | ||
| 8151 | if (prev_ty.eql(ty, p.comp, true)) { | ||
| 8152 | try p.errStr(.generic_duplicate, start, try p.typeStr(ty)); | ||
| 8153 | try p.errStr(.generic_duplicate_here, @intFromEnum(prev_tok), try p.typeStr(ty)); | ||
| 8154 | } | ||
| 8155 | } | ||
| 8156 | try p.list_buf.append(try p.addNode(.{ | ||
| 8157 | .tag = .generic_association_expr, | ||
| 8158 | .ty = ty, | ||
| 8159 | .data = .{ .un = node.node }, | ||
| 8160 | })); | ||
| 8161 | try p.decl_buf.append(@enumFromInt(start)); | ||
| 8162 | } else if (p.eatToken(.keyword_default)) |tok| { | ||
| 8163 | if (default_tok) |prev| { | ||
| 8164 | try p.errTok(.generic_duplicate_default, tok); | ||
| 8165 | try p.errTok(.previous_case, prev); | ||
| 8166 | } | ||
| 8167 | default_tok = tok; | ||
| 8168 | _ = try p.expectToken(.colon); | ||
| 8169 | default = try p.assignExpr(); | ||
| 8170 | try default.expect(p); | ||
| 8171 | } else { | ||
| 8172 | if (p.list_buf.items.len == list_buf_top + 1) { | ||
| 8173 | try p.err(.expected_type); | ||
| 8174 | return error.ParsingFailed; | ||
| 8175 | } | ||
| 8176 | break; | ||
| 8177 | } | ||
| 8178 | if (p.eatToken(.comma) == null) break; | ||
| 8179 | } | ||
| 8180 | try p.expectClosing(l_paren, .r_paren); | ||
| 8181 | |||
| 8182 | if (chosen.node == .none) { | ||
| 8183 | if (default_tok != null) { | ||
| 8184 | try p.list_buf.insert(list_buf_top + 1, try p.addNode(.{ | ||
| 8185 | .tag = .generic_default_expr, | ||
| 8186 | .data = .{ .un = default.node }, | ||
| 8187 | })); | ||
| 8188 | chosen = default; | ||
| 8189 | } else { | ||
| 8190 | try p.errStr(.generic_no_match, controlling_tok, try p.typeStr(controlling_ty)); | ||
| 8191 | return error.ParsingFailed; | ||
| 8192 | } | ||
| 8193 | } else { | ||
| 8194 | try p.list_buf.insert(list_buf_top + 1, try p.addNode(.{ | ||
| 8195 | .tag = .generic_association_expr, | ||
| 8196 | .data = .{ .un = chosen.node }, | ||
| 8197 | })); | ||
| 8198 | if (default_tok != null) { | ||
| 8199 | try p.list_buf.append(try p.addNode(.{ | ||
| 8200 | .tag = .generic_default_expr, | ||
| 8201 | .data = .{ .un = chosen.node }, | ||
| 8202 | })); | ||
| 8203 | } | ||
| 8204 | } | ||
| 8205 | |||
| 8206 | var generic_node: Tree.Node = .{ | ||
| 8207 | .tag = .generic_expr_one, | ||
| 8208 | .ty = chosen.ty, | ||
| 8209 | .data = .{ .bin = .{ .lhs = controlling.node, .rhs = chosen.node } }, | ||
| 8210 | }; | ||
| 8211 | const associations = p.list_buf.items[list_buf_top..]; | ||
| 8212 | if (associations.len > 2) { // associations[0] == controlling.node | ||
| 8213 | generic_node.tag = .generic_expr; | ||
| 8214 | generic_node.data = .{ .range = try p.addList(associations) }; | ||
| 8215 | } | ||
| 8216 | chosen.node = try p.addNode(generic_node); | ||
| 8217 | return chosen; | ||
| 8218 | } | ||
deps/aro/Pragma.zig deleted-83| ... | @@ -1,83 +0,0 @@ | ||
| 1 | const std = @import("std"); | ||
| 2 | const Compilation = @import("Compilation.zig"); | ||
| 3 | const Preprocessor = @import("Preprocessor.zig"); | ||
| 4 | const Parser = @import("Parser.zig"); | ||
| 5 | const TokenIndex = @import("Tree.zig").TokenIndex; | ||
| 6 | |||
| 7 | const Pragma = @This(); | ||
| 8 | |||
| 9 | pub const Error = Compilation.Error || error{ UnknownPragma, StopPreprocessing }; | ||
| 10 | |||
| 11 | /// Called during Preprocessor.init | ||
| 12 | beforePreprocess: ?*const fn (*Pragma, *Compilation) void = null, | ||
| 13 | |||
| 14 | /// Called at the beginning of Parser.parse | ||
| 15 | beforeParse: ?*const fn (*Pragma, *Compilation) void = null, | ||
| 16 | |||
| 17 | /// Called at the end of Parser.parse if a Tree was successfully parsed | ||
| 18 | afterParse: ?*const fn (*Pragma, *Compilation) void = null, | ||
| 19 | |||
| 20 | /// Called during Compilation.deinit | ||
| 21 | deinit: *const fn (*Pragma, *Compilation) void, | ||
| 22 | |||
| 23 | /// Called whenever the preprocessor encounters this pragma. `start_idx` is the index | ||
| 24 | /// within `pp.tokens` of the pragma name token. The pragma end is indicated by a | ||
| 25 | /// .nl token (which may be generated if the source ends with a pragma with no newline) | ||
| 26 | /// As an example, given the following line: | ||
| 27 | /// #pragma GCC diagnostic error "-Wnewline-eof" \n | ||
| 28 | /// Then pp.tokens.get(start_idx) will return the `GCC` token. | ||
| 29 | /// Return error.UnknownPragma to emit an `unknown_pragma` diagnostic | ||
| 30 | /// Return error.StopPreprocessing to stop preprocessing the current file (see once.zig) | ||
| 31 | preprocessorHandler: ?*const fn (*Pragma, *Preprocessor, start_idx: TokenIndex) Error!void = null, | ||
| 32 | |||
| 33 | /// Called during token pretty-printing (`-E` option). If this returns true, the pragma will | ||
| 34 | /// be printed; otherwise it will be omitted. start_idx is the index of the pragma name token | ||
| 35 | preserveTokens: ?*const fn (*Pragma, *Preprocessor, start_idx: TokenIndex) bool = null, | ||
| 36 | |||
| 37 | /// Same as preprocessorHandler except called during parsing | ||
| 38 | /// The parser's `p.tok_i` field must not be changed | ||
| 39 | parserHandler: ?*const fn (*Pragma, *Parser, start_idx: TokenIndex) Compilation.Error!void = null, | ||
| 40 | |||
| 41 | pub fn pasteTokens(pp: *Preprocessor, start_idx: TokenIndex) ![]const u8 { | ||
| 42 | if (pp.tokens.get(start_idx).id == .nl) return error.ExpectedStringLiteral; | ||
| 43 | |||
| 44 | const char_top = pp.char_buf.items.len; | ||
| 45 | defer pp.char_buf.items.len = char_top; | ||
| 46 | var i: usize = 0; | ||
| 47 | var lparen_count: u32 = 0; | ||
| 48 | var rparen_count: u32 = 0; | ||
| 49 | while (true) : (i += 1) { | ||
| 50 | const tok = pp.tokens.get(start_idx + i); | ||
| 51 | if (tok.id == .nl) break; | ||
| 52 | switch (tok.id) { | ||
| 53 | .l_paren => { | ||
| 54 | if (lparen_count != i) return error.ExpectedStringLiteral; | ||
| 55 | lparen_count += 1; | ||
| 56 | }, | ||
| 57 | .r_paren => rparen_count += 1, | ||
| 58 | .string_literal => { | ||
| 59 | if (rparen_count != 0) return error.ExpectedStringLiteral; | ||
| 60 | const str = pp.expandedSlice(tok); | ||
| 61 | try pp.char_buf.appendSlice(str[1 .. str.len - 1]); | ||
| 62 | }, | ||
| 63 | else => return error.ExpectedStringLiteral, | ||
| 64 | } | ||
| 65 | } | ||
| 66 | if (lparen_count != rparen_count) return error.ExpectedStringLiteral; | ||
| 67 | return pp.char_buf.items[char_top..]; | ||
| 68 | } | ||
| 69 | |||
| 70 | pub fn shouldPreserveTokens(self: *Pragma, pp: *Preprocessor, start_idx: TokenIndex) bool { | ||
| 71 | if (self.preserveTokens) |func| return func(self, pp, start_idx); | ||
| 72 | return false; | ||
| 73 | } | ||
| 74 | |||
| 75 | pub fn preprocessorCB(self: *Pragma, pp: *Preprocessor, start_idx: TokenIndex) Error!void { | ||
| 76 | if (self.preprocessorHandler) |func| return func(self, pp, start_idx); | ||
| 77 | } | ||
| 78 | |||
| 79 | pub fn parserCB(self: *Pragma, p: *Parser, start_idx: TokenIndex) Compilation.Error!void { | ||
| 80 | const tok_index = p.tok_i; | ||
| 81 | defer std.debug.assert(tok_index == p.tok_i); | ||
| 82 | if (self.parserHandler) |func| return func(self, p, start_idx); | ||
| 83 | } | ||
deps/aro/Preprocessor.zig deleted-2932| ... | @@ -1,2932 +0,0 @@ | ||
| 1 | const std = @import("std"); | ||
| 2 | const mem = std.mem; | ||
| 3 | const Allocator = mem.Allocator; | ||
| 4 | const assert = std.debug.assert; | ||
| 5 | const Compilation = @import("Compilation.zig"); | ||
| 6 | const Error = Compilation.Error; | ||
| 7 | const Source = @import("Source.zig"); | ||
| 8 | const Tokenizer = @import("Tokenizer.zig"); | ||
| 9 | const RawToken = Tokenizer.Token; | ||
| 10 | const Parser = @import("Parser.zig"); | ||
| 11 | const Diagnostics = @import("Diagnostics.zig"); | ||
| 12 | const Token = @import("Tree.zig").Token; | ||
| 13 | const Attribute = @import("Attribute.zig"); | ||
| 14 | const features = @import("features.zig"); | ||
| 15 | |||
| 16 | const Preprocessor = @This(); | ||
| 17 | const DefineMap = std.StringHashMap(Macro); | ||
| 18 | const RawTokenList = std.ArrayList(RawToken); | ||
| 19 | const max_include_depth = 200; | ||
| 20 | |||
| 21 | /// Errors that can be returned when expanding a macro. | ||
| 22 | /// error.UnknownPragma can occur within Preprocessor.pragma() but | ||
| 23 | /// it is handled there and doesn't escape that function | ||
| 24 | const MacroError = Error || error{StopPreprocessing}; | ||
| 25 | |||
| 26 | const Macro = struct { | ||
| 27 | /// Parameters of the function type macro | ||
| 28 | params: []const []const u8, | ||
| 29 | |||
| 30 | /// Token constituting the macro body | ||
| 31 | tokens: []const RawToken, | ||
| 32 | |||
| 33 | /// If the function type macro has variable number of arguments | ||
| 34 | var_args: bool, | ||
| 35 | |||
| 36 | /// Is a function type macro | ||
| 37 | is_func: bool, | ||
| 38 | |||
| 39 | /// Is a predefined macro | ||
| 40 | is_builtin: bool = false, | ||
| 41 | |||
| 42 | /// Location of macro in the source | ||
| 43 | /// `byte_offset` and `line` are used to define the range of tokens included | ||
| 44 | /// in the macro. | ||
| 45 | loc: Source.Location, | ||
| 46 | |||
| 47 | fn eql(a: Macro, b: Macro, pp: *Preprocessor) bool { | ||
| 48 | if (a.tokens.len != b.tokens.len) return false; | ||
| 49 | if (a.is_builtin != b.is_builtin) return false; | ||
| 50 | for (a.tokens, b.tokens) |a_tok, b_tok| if (!tokEql(pp, a_tok, b_tok)) return false; | ||
| 51 | |||
| 52 | if (a.is_func and b.is_func) { | ||
| 53 | if (a.var_args != b.var_args) return false; | ||
| 54 | if (a.params.len != b.params.len) return false; | ||
| 55 | for (a.params, b.params) |a_param, b_param| if (!mem.eql(u8, a_param, b_param)) return false; | ||
| 56 | } | ||
| 57 | |||
| 58 | return true; | ||
| 59 | } | ||
| 60 | |||
| 61 | fn tokEql(pp: *Preprocessor, a: RawToken, b: RawToken) bool { | ||
| 62 | return mem.eql(u8, pp.tokSlice(a), pp.tokSlice(b)); | ||
| 63 | } | ||
| 64 | }; | ||
| 65 | |||
| 66 | comp: *Compilation, | ||
| 67 | gpa: mem.Allocator, | ||
| 68 | arena: std.heap.ArenaAllocator, | ||
| 69 | defines: DefineMap, | ||
| 70 | tokens: Token.List = .{}, | ||
| 71 | token_buf: RawTokenList, | ||
| 72 | char_buf: std.ArrayList(u8), | ||
| 73 | /// Counter that is incremented each time preprocess() is called | ||
| 74 | /// Can be used to distinguish multiple preprocessings of the same file | ||
| 75 | preprocess_count: u32 = 0, | ||
| 76 | generated_line: u32 = 1, | ||
| 77 | add_expansion_nl: u32 = 0, | ||
| 78 | include_depth: u8 = 0, | ||
| 79 | counter: u32 = 0, | ||
| 80 | expansion_source_loc: Source.Location = undefined, | ||
| 81 | poisoned_identifiers: std.StringHashMap(void), | ||
| 82 | /// Map from Source.Id to macro name in the `#ifndef` condition which guards the source, if any | ||
| 83 | include_guards: std.AutoHashMapUnmanaged(Source.Id, []const u8) = .{}, | ||
| 84 | |||
| 85 | /// Memory is retained to avoid allocation on every single token. | ||
| 86 | top_expansion_buf: ExpandBuf, | ||
| 87 | |||
| 88 | /// Dump current state to stderr. | ||
| 89 | verbose: bool = false, | ||
| 90 | preserve_whitespace: bool = false, | ||
| 91 | |||
| 92 | /// linemarker tokens. Must be .none unless in -E mode (parser does not handle linemarkers) | ||
| 93 | linemarkers: Linemarkers = .none, | ||
| 94 | |||
| 95 | pub const Linemarkers = enum { | ||
| 96 | /// No linemarker tokens. Required setting if parser will run | ||
| 97 | none, | ||
| 98 | /// #line <num> "filename" | ||
| 99 | line_directives, | ||
| 100 | /// # <num> "filename" flags | ||
| 101 | numeric_directives, | ||
| 102 | }; | ||
| 103 | |||
| 104 | pub fn init(comp: *Compilation) Preprocessor { | ||
| 105 | const pp = Preprocessor{ | ||
| 106 | .comp = comp, | ||
| 107 | .gpa = comp.gpa, | ||
| 108 | .arena = std.heap.ArenaAllocator.init(comp.gpa), | ||
| 109 | .defines = DefineMap.init(comp.gpa), | ||
| 110 | .token_buf = RawTokenList.init(comp.gpa), | ||
| 111 | .char_buf = std.ArrayList(u8).init(comp.gpa), | ||
| 112 | .poisoned_identifiers = std.StringHashMap(void).init(comp.gpa), | ||
| 113 | .top_expansion_buf = ExpandBuf.init(comp.gpa), | ||
| 114 | }; | ||
| 115 | comp.pragmaEvent(.before_preprocess); | ||
| 116 | return pp; | ||
| 117 | } | ||
| 118 | |||
| 119 | const builtin_macros = struct { | ||
| 120 | const args = [1][]const u8{"X"}; | ||
| 121 | |||
| 122 | const has_attribute = [1]RawToken{.{ | ||
| 123 | .id = .macro_param_has_attribute, | ||
| 124 | .source = .generated, | ||
| 125 | }}; | ||
| 126 | const has_declspec_attribute = [1]RawToken{.{ | ||
| 127 | .id = .macro_param_has_declspec_attribute, | ||
| 128 | .source = .generated, | ||
| 129 | }}; | ||
| 130 | const has_warning = [1]RawToken{.{ | ||
| 131 | .id = .macro_param_has_warning, | ||
| 132 | .source = .generated, | ||
| 133 | }}; | ||
| 134 | const has_feature = [1]RawToken{.{ | ||
| 135 | .id = .macro_param_has_feature, | ||
| 136 | .source = .generated, | ||
| 137 | }}; | ||
| 138 | const has_extension = [1]RawToken{.{ | ||
| 139 | .id = .macro_param_has_extension, | ||
| 140 | .source = .generated, | ||
| 141 | }}; | ||
| 142 | const has_builtin = [1]RawToken{.{ | ||
| 143 | .id = .macro_param_has_builtin, | ||
| 144 | .source = .generated, | ||
| 145 | }}; | ||
| 146 | const has_include = [1]RawToken{.{ | ||
| 147 | .id = .macro_param_has_include, | ||
| 148 | .source = .generated, | ||
| 149 | }}; | ||
| 150 | const has_include_next = [1]RawToken{.{ | ||
| 151 | .id = .macro_param_has_include_next, | ||
| 152 | .source = .generated, | ||
| 153 | }}; | ||
| 154 | |||
| 155 | const is_identifier = [1]RawToken{.{ | ||
| 156 | .id = .macro_param_is_identifier, | ||
| 157 | .source = .generated, | ||
| 158 | }}; | ||
| 159 | |||
| 160 | const pragma_operator = [1]RawToken{.{ | ||
| 161 | .id = .macro_param_pragma_operator, | ||
| 162 | .source = .generated, | ||
| 163 | }}; | ||
| 164 | |||
| 165 | const file = [1]RawToken{.{ | ||
| 166 | .id = .macro_file, | ||
| 167 | .source = .generated, | ||
| 168 | }}; | ||
| 169 | const line = [1]RawToken{.{ | ||
| 170 | .id = .macro_line, | ||
| 171 | .source = .generated, | ||
| 172 | }}; | ||
| 173 | const counter = [1]RawToken{.{ | ||
| 174 | .id = .macro_counter, | ||
| 175 | .source = .generated, | ||
| 176 | }}; | ||
| 177 | }; | ||
| 178 | |||
| 179 | fn addBuiltinMacro(pp: *Preprocessor, name: []const u8, is_func: bool, tokens: []const RawToken) !void { | ||
| 180 | try pp.defines.putNoClobber(name, .{ | ||
| 181 | .params = &builtin_macros.args, | ||
| 182 | .tokens = tokens, | ||
| 183 | .var_args = false, | ||
| 184 | .is_func = is_func, | ||
| 185 | .loc = .{ .id = .generated }, | ||
| 186 | .is_builtin = true, | ||
| 187 | }); | ||
| 188 | } | ||
| 189 | |||
| 190 | pub fn addBuiltinMacros(pp: *Preprocessor) !void { | ||
| 191 | try pp.addBuiltinMacro("__has_attribute", true, &builtin_macros.has_attribute); | ||
| 192 | try pp.addBuiltinMacro("__has_declspec_attribute", true, &builtin_macros.has_declspec_attribute); | ||
| 193 | try pp.addBuiltinMacro("__has_warning", true, &builtin_macros.has_warning); | ||
| 194 | try pp.addBuiltinMacro("__has_feature", true, &builtin_macros.has_feature); | ||
| 195 | try pp.addBuiltinMacro("__has_extension", true, &builtin_macros.has_extension); | ||
| 196 | try pp.addBuiltinMacro("__has_builtin", true, &builtin_macros.has_builtin); | ||
| 197 | try pp.addBuiltinMacro("__has_include", true, &builtin_macros.has_include); | ||
| 198 | try pp.addBuiltinMacro("__has_include_next", true, &builtin_macros.has_include_next); | ||
| 199 | try pp.addBuiltinMacro("__is_identifier", true, &builtin_macros.is_identifier); | ||
| 200 | try pp.addBuiltinMacro("_Pragma", true, &builtin_macros.pragma_operator); | ||
| 201 | |||
| 202 | try pp.addBuiltinMacro("__FILE__", false, &builtin_macros.file); | ||
| 203 | try pp.addBuiltinMacro("__LINE__", false, &builtin_macros.line); | ||
| 204 | try pp.addBuiltinMacro("__COUNTER__", false, &builtin_macros.counter); | ||
| 205 | } | ||
| 206 | |||
| 207 | pub fn deinit(pp: *Preprocessor) void { | ||
| 208 | pp.defines.deinit(); | ||
| 209 | for (pp.tokens.items(.expansion_locs)) |loc| Token.free(loc, pp.gpa); | ||
| 210 | pp.tokens.deinit(pp.gpa); | ||
| 211 | pp.arena.deinit(); | ||
| 212 | pp.token_buf.deinit(); | ||
| 213 | pp.char_buf.deinit(); | ||
| 214 | pp.poisoned_identifiers.deinit(); | ||
| 215 | pp.include_guards.deinit(pp.gpa); | ||
| 216 | pp.top_expansion_buf.deinit(); | ||
| 217 | } | ||
| 218 | |||
| 219 | /// Preprocess a source file, returns eof token. | ||
| 220 | pub fn preprocess(pp: *Preprocessor, source: Source) Error!Token { | ||
| 221 | const eof = pp.preprocessExtra(source) catch |er| switch (er) { | ||
| 222 | // This cannot occur in the main file and is handled in `include`. | ||
| 223 | error.StopPreprocessing => unreachable, | ||
| 224 | else => |e| return e, | ||
| 225 | }; | ||
| 226 | try eof.checkMsEof(source, pp.comp); | ||
| 227 | return eof; | ||
| 228 | } | ||
| 229 | |||
| 230 | /// Tokenize a file without any preprocessing, returns eof token. | ||
| 231 | pub fn tokenize(pp: *Preprocessor, source: Source) Error!Token { | ||
| 232 | assert(pp.linemarkers == .none); | ||
| 233 | assert(pp.preserve_whitespace == false); | ||
| 234 | var tokenizer = Tokenizer{ | ||
| 235 | .buf = source.buf, | ||
| 236 | .comp = pp.comp, | ||
| 237 | .source = source.id, | ||
| 238 | }; | ||
| 239 | |||
| 240 | // Estimate how many new tokens this source will contain. | ||
| 241 | const estimated_token_count = source.buf.len / 8; | ||
| 242 | try pp.tokens.ensureTotalCapacity(pp.gpa, pp.tokens.len + estimated_token_count); | ||
| 243 | |||
| 244 | while (true) { | ||
| 245 | var tok = tokenizer.next(); | ||
| 246 | if (tok.id == .eof) return tokFromRaw(tok); | ||
| 247 | try pp.tokens.append(pp.gpa, tokFromRaw(tok)); | ||
| 248 | } | ||
| 249 | } | ||
| 250 | |||
| 251 | pub fn addIncludeStart(pp: *Preprocessor, source: Source) !void { | ||
| 252 | if (pp.linemarkers == .none) return; | ||
| 253 | try pp.tokens.append(pp.gpa, .{ .id = .include_start, .loc = .{ | ||
| 254 | .id = source.id, | ||
| 255 | .byte_offset = std.math.maxInt(u32), | ||
| 256 | .line = 0, | ||
| 257 | } }); | ||
| 258 | } | ||
| 259 | |||
| 260 | pub fn addIncludeResume(pp: *Preprocessor, source: Source.Id, offset: u32, line: u32) !void { | ||
| 261 | if (pp.linemarkers == .none) return; | ||
| 262 | try pp.tokens.append(pp.gpa, .{ .id = .include_resume, .loc = .{ | ||
| 263 | .id = source, | ||
| 264 | .byte_offset = offset, | ||
| 265 | .line = line, | ||
| 266 | } }); | ||
| 267 | } | ||
| 268 | |||
| 269 | fn invalidTokenDiagnostic(tok_id: Token.Id) Diagnostics.Tag { | ||
| 270 | return switch (tok_id) { | ||
| 271 | .unterminated_string_literal => .unterminated_string_literal_warning, | ||
| 272 | .empty_char_literal => .empty_char_literal_warning, | ||
| 273 | .unterminated_char_literal => .unterminated_char_literal_warning, | ||
| 274 | else => unreachable, | ||
| 275 | }; | ||
| 276 | } | ||
| 277 | |||
| 278 | /// Return the name of the #ifndef guard macro that starts a source, if any. | ||
| 279 | fn findIncludeGuard(pp: *Preprocessor, source: Source) ?[]const u8 { | ||
| 280 | var tokenizer = Tokenizer{ | ||
| 281 | .buf = source.buf, | ||
| 282 | .comp = pp.comp, | ||
| 283 | .source = source.id, | ||
| 284 | }; | ||
| 285 | var hash = tokenizer.nextNoWS(); | ||
| 286 | while (hash.id == .nl) hash = tokenizer.nextNoWS(); | ||
| 287 | if (hash.id != .hash) return null; | ||
| 288 | const ifndef = tokenizer.nextNoWS(); | ||
| 289 | if (ifndef.id != .keyword_ifndef) return null; | ||
| 290 | const guard = tokenizer.nextNoWS(); | ||
| 291 | if (guard.id != .identifier) return null; | ||
| 292 | return pp.tokSlice(guard); | ||
| 293 | } | ||
| 294 | |||
| 295 | fn preprocessExtra(pp: *Preprocessor, source: Source) MacroError!Token { | ||
| 296 | var guard_name = pp.findIncludeGuard(source); | ||
| 297 | |||
| 298 | pp.preprocess_count += 1; | ||
| 299 | var tokenizer = Tokenizer{ | ||
| 300 | .buf = source.buf, | ||
| 301 | .comp = pp.comp, | ||
| 302 | .source = source.id, | ||
| 303 | }; | ||
| 304 | |||
| 305 | // Estimate how many new tokens this source will contain. | ||
| 306 | const estimated_token_count = source.buf.len / 8; | ||
| 307 | try pp.tokens.ensureTotalCapacity(pp.gpa, pp.tokens.len + estimated_token_count); | ||
| 308 | |||
| 309 | var if_level: u8 = 0; | ||
| 310 | var if_kind = std.PackedIntArray(u2, 256).init([1]u2{0} ** 256); | ||
| 311 | const until_else = 0; | ||
| 312 | const until_endif = 1; | ||
| 313 | const until_endif_seen_else = 2; | ||
| 314 | |||
| 315 | var start_of_line = true; | ||
| 316 | while (true) { | ||
| 317 | var tok = tokenizer.next(); | ||
| 318 | switch (tok.id) { | ||
| 319 | .hash => if (!start_of_line) try pp.tokens.append(pp.gpa, tokFromRaw(tok)) else { | ||
| 320 | const directive = tokenizer.nextNoWS(); | ||
| 321 | switch (directive.id) { | ||
| 322 | .keyword_error, .keyword_warning => { | ||
| 323 | // #error tokens.. | ||
| 324 | pp.top_expansion_buf.items.len = 0; | ||
| 325 | const char_top = pp.char_buf.items.len; | ||
| 326 | defer pp.char_buf.items.len = char_top; | ||
| 327 | |||
| 328 | while (true) { | ||
| 329 | tok = tokenizer.next(); | ||
| 330 | if (tok.id == .nl or tok.id == .eof) break; | ||
| 331 | if (tok.id == .whitespace) tok.id = .macro_ws; | ||
| 332 | try pp.top_expansion_buf.append(tokFromRaw(tok)); | ||
| 333 | } | ||
| 334 | try pp.stringify(pp.top_expansion_buf.items); | ||
| 335 | const slice = pp.char_buf.items[char_top + 1 .. pp.char_buf.items.len - 2]; | ||
| 336 | const duped = try pp.comp.diag.arena.allocator().dupe(u8, slice); | ||
| 337 | |||
| 338 | try pp.comp.diag.add(.{ | ||
| 339 | .tag = if (directive.id == .keyword_error) .error_directive else .warning_directive, | ||
| 340 | .loc = .{ .id = tok.source, .byte_offset = directive.start, .line = directive.line }, | ||
| 341 | .extra = .{ .str = duped }, | ||
| 342 | }, &.{}); | ||
| 343 | }, | ||
| 344 | .keyword_if => { | ||
| 345 | const sum, const overflowed = @addWithOverflow(if_level, 1); | ||
| 346 | if (overflowed != 0) | ||
| 347 | return pp.fatal(directive, "too many #if nestings", .{}); | ||
| 348 | if_level = sum; | ||
| 349 | |||
| 350 | if (try pp.expr(&tokenizer)) { | ||
| 351 | if_kind.set(if_level, until_endif); | ||
| 352 | if (pp.verbose) { | ||
| 353 | pp.verboseLog(directive, "entering then branch of #if", .{}); | ||
| 354 | } | ||
| 355 | } else { | ||
| 356 | if_kind.set(if_level, until_else); | ||
| 357 | try pp.skip(&tokenizer, .until_else); | ||
| 358 | if (pp.verbose) { | ||
| 359 | pp.verboseLog(directive, "entering else branch of #if", .{}); | ||
| 360 | } | ||
| 361 | } | ||
| 362 | }, | ||
| 363 | .keyword_ifdef => { | ||
| 364 | const sum, const overflowed = @addWithOverflow(if_level, 1); | ||
| 365 | if (overflowed != 0) | ||
| 366 | return pp.fatal(directive, "too many #if nestings", .{}); | ||
| 367 | if_level = sum; | ||
| 368 | |||
| 369 | const macro_name = (try pp.expectMacroName(&tokenizer)) orelse continue; | ||
| 370 | try pp.expectNl(&tokenizer); | ||
| 371 | if (pp.defines.get(macro_name) != null) { | ||
| 372 | if_kind.set(if_level, until_endif); | ||
| 373 | if (pp.verbose) { | ||
| 374 | pp.verboseLog(directive, "entering then branch of #ifdef", .{}); | ||
| 375 | } | ||
| 376 | } else { | ||
| 377 | if_kind.set(if_level, until_else); | ||
| 378 | try pp.skip(&tokenizer, .until_else); | ||
| 379 | if (pp.verbose) { | ||
| 380 | pp.verboseLog(directive, "entering else branch of #ifdef", .{}); | ||
| 381 | } | ||
| 382 | } | ||
| 383 | }, | ||
| 384 | .keyword_ifndef => { | ||
| 385 | const sum, const overflowed = @addWithOverflow(if_level, 1); | ||
| 386 | if (overflowed != 0) | ||
| 387 | return pp.fatal(directive, "too many #if nestings", .{}); | ||
| 388 | if_level = sum; | ||
| 389 | |||
| 390 | const macro_name = (try pp.expectMacroName(&tokenizer)) orelse continue; | ||
| 391 | try pp.expectNl(&tokenizer); | ||
| 392 | if (pp.defines.get(macro_name) == null) { | ||
| 393 | if_kind.set(if_level, until_endif); | ||
| 394 | } else { | ||
| 395 | if_kind.set(if_level, until_else); | ||
| 396 | try pp.skip(&tokenizer, .until_else); | ||
| 397 | } | ||
| 398 | }, | ||
| 399 | .keyword_elif => { | ||
| 400 | if (if_level == 0) { | ||
| 401 | try pp.err(directive, .elif_without_if); | ||
| 402 | if_level += 1; | ||
| 403 | if_kind.set(if_level, until_else); | ||
| 404 | } else if (if_level == 1) { | ||
| 405 | guard_name = null; | ||
| 406 | } | ||
| 407 | switch (if_kind.get(if_level)) { | ||
| 408 | until_else => if (try pp.expr(&tokenizer)) { | ||
| 409 | if_kind.set(if_level, until_endif); | ||
| 410 | if (pp.verbose) { | ||
| 411 | pp.verboseLog(directive, "entering then branch of #elif", .{}); | ||
| 412 | } | ||
| 413 | } else { | ||
| 414 | try pp.skip(&tokenizer, .until_else); | ||
| 415 | if (pp.verbose) { | ||
| 416 | pp.verboseLog(directive, "entering else branch of #elif", .{}); | ||
| 417 | } | ||
| 418 | }, | ||
| 419 | until_endif => try pp.skip(&tokenizer, .until_endif), | ||
| 420 | until_endif_seen_else => { | ||
| 421 | try pp.err(directive, .elif_after_else); | ||
| 422 | skipToNl(&tokenizer); | ||
| 423 | }, | ||
| 424 | else => unreachable, | ||
| 425 | } | ||
| 426 | }, | ||
| 427 | .keyword_elifdef => { | ||
| 428 | if (if_level == 0) { | ||
| 429 | try pp.err(directive, .elifdef_without_if); | ||
| 430 | if_level += 1; | ||
| 431 | if_kind.set(if_level, until_else); | ||
| 432 | } else if (if_level == 1) { | ||
| 433 | guard_name = null; | ||
| 434 | } | ||
| 435 | switch (if_kind.get(if_level)) { | ||
| 436 | until_else => { | ||
| 437 | const macro_name = try pp.expectMacroName(&tokenizer); | ||
| 438 | if (macro_name == null) { | ||
| 439 | if_kind.set(if_level, until_else); | ||
| 440 | try pp.skip(&tokenizer, .until_else); | ||
| 441 | if (pp.verbose) { | ||
| 442 | pp.verboseLog(directive, "entering else branch of #elifdef", .{}); | ||
| 443 | } | ||
| 444 | } else { | ||
| 445 | try pp.expectNl(&tokenizer); | ||
| 446 | if (pp.defines.get(macro_name.?) != null) { | ||
| 447 | if_kind.set(if_level, until_endif); | ||
| 448 | if (pp.verbose) { | ||
| 449 | pp.verboseLog(directive, "entering then branch of #elifdef", .{}); | ||
| 450 | } | ||
| 451 | } else { | ||
| 452 | if_kind.set(if_level, until_else); | ||
| 453 | try pp.skip(&tokenizer, .until_else); | ||
| 454 | if (pp.verbose) { | ||
| 455 | pp.verboseLog(directive, "entering else branch of #elifdef", .{}); | ||
| 456 | } | ||
| 457 | } | ||
| 458 | } | ||
| 459 | }, | ||
| 460 | until_endif => try pp.skip(&tokenizer, .until_endif), | ||
| 461 | until_endif_seen_else => { | ||
| 462 | try pp.err(directive, .elifdef_after_else); | ||
| 463 | skipToNl(&tokenizer); | ||
| 464 | }, | ||
| 465 | else => unreachable, | ||
| 466 | } | ||
| 467 | }, | ||
| 468 | .keyword_elifndef => { | ||
| 469 | if (if_level == 0) { | ||
| 470 | try pp.err(directive, .elifdef_without_if); | ||
| 471 | if_level += 1; | ||
| 472 | if_kind.set(if_level, until_else); | ||
| 473 | } else if (if_level == 1) { | ||
| 474 | guard_name = null; | ||
| 475 | } | ||
| 476 | switch (if_kind.get(if_level)) { | ||
| 477 | until_else => { | ||
| 478 | const macro_name = try pp.expectMacroName(&tokenizer); | ||
| 479 | if (macro_name == null) { | ||
| 480 | if_kind.set(if_level, until_else); | ||
| 481 | try pp.skip(&tokenizer, .until_else); | ||
| 482 | if (pp.verbose) { | ||
| 483 | pp.verboseLog(directive, "entering else branch of #elifndef", .{}); | ||
| 484 | } | ||
| 485 | } else { | ||
| 486 | try pp.expectNl(&tokenizer); | ||
| 487 | if (pp.defines.get(macro_name.?) == null) { | ||
| 488 | if_kind.set(if_level, until_endif); | ||
| 489 | if (pp.verbose) { | ||
| 490 | pp.verboseLog(directive, "entering then branch of #elifndef", .{}); | ||
| 491 | } | ||
| 492 | } else { | ||
| 493 | if_kind.set(if_level, until_else); | ||
| 494 | try pp.skip(&tokenizer, .until_else); | ||
| 495 | if (pp.verbose) { | ||
| 496 | pp.verboseLog(directive, "entering else branch of #elifndef", .{}); | ||
| 497 | } | ||
| 498 | } | ||
| 499 | } | ||
| 500 | }, | ||
| 501 | until_endif => try pp.skip(&tokenizer, .until_endif), | ||
| 502 | until_endif_seen_else => { | ||
| 503 | try pp.err(directive, .elifdef_after_else); | ||
| 504 | skipToNl(&tokenizer); | ||
| 505 | }, | ||
| 506 | else => unreachable, | ||
| 507 | } | ||
| 508 | }, | ||
| 509 | .keyword_else => { | ||
| 510 | try pp.expectNl(&tokenizer); | ||
| 511 | if (if_level == 0) { | ||
| 512 | try pp.err(directive, .else_without_if); | ||
| 513 | continue; | ||
| 514 | } else if (if_level == 1) { | ||
| 515 | guard_name = null; | ||
| 516 | } | ||
| 517 | switch (if_kind.get(if_level)) { | ||
| 518 | until_else => { | ||
| 519 | if_kind.set(if_level, until_endif_seen_else); | ||
| 520 | if (pp.verbose) { | ||
| 521 | pp.verboseLog(directive, "#else branch here", .{}); | ||
| 522 | } | ||
| 523 | }, | ||
| 524 | until_endif => try pp.skip(&tokenizer, .until_endif_seen_else), | ||
| 525 | until_endif_seen_else => { | ||
| 526 | try pp.err(directive, .else_after_else); | ||
| 527 | skipToNl(&tokenizer); | ||
| 528 | }, | ||
| 529 | else => unreachable, | ||
| 530 | } | ||
| 531 | }, | ||
| 532 | .keyword_endif => { | ||
| 533 | try pp.expectNl(&tokenizer); | ||
| 534 | if (if_level == 0) { | ||
| 535 | guard_name = null; | ||
| 536 | try pp.err(directive, .endif_without_if); | ||
| 537 | continue; | ||
| 538 | } else if (if_level == 1) { | ||
| 539 | const saved_tokenizer = tokenizer; | ||
| 540 | defer tokenizer = saved_tokenizer; | ||
| 541 | |||
| 542 | var next = tokenizer.nextNoWS(); | ||
| 543 | while (next.id == .nl) : (next = tokenizer.nextNoWS()) {} | ||
| 544 | if (next.id != .eof) guard_name = null; | ||
| 545 | } | ||
| 546 | if_level -= 1; | ||
| 547 | }, | ||
| 548 | .keyword_define => try pp.define(&tokenizer), | ||
| 549 | .keyword_undef => { | ||
| 550 | const macro_name = (try pp.expectMacroName(&tokenizer)) orelse continue; | ||
| 551 | |||
| 552 | _ = pp.defines.remove(macro_name); | ||
| 553 | try pp.expectNl(&tokenizer); | ||
| 554 | }, | ||
| 555 | .keyword_include => { | ||
| 556 | try pp.include(&tokenizer, .first); | ||
| 557 | continue; | ||
| 558 | }, | ||
| 559 | .keyword_include_next => { | ||
| 560 | try pp.comp.diag.add(.{ | ||
| 561 | .tag = .include_next, | ||
| 562 | .loc = .{ .id = tok.source, .byte_offset = directive.start, .line = directive.line }, | ||
| 563 | }, &.{}); | ||
| 564 | if (pp.include_depth == 0) { | ||
| 565 | try pp.comp.diag.add(.{ | ||
| 566 | .tag = .include_next_outside_header, | ||
| 567 | .loc = .{ .id = tok.source, .byte_offset = directive.start, .line = directive.line }, | ||
| 568 | }, &.{}); | ||
| 569 | try pp.include(&tokenizer, .first); | ||
| 570 | } else { | ||
| 571 | try pp.include(&tokenizer, .next); | ||
| 572 | } | ||
| 573 | }, | ||
| 574 | .keyword_embed => try pp.embed(&tokenizer), | ||
| 575 | .keyword_pragma => { | ||
| 576 | try pp.pragma(&tokenizer, directive, null, &.{}); | ||
| 577 | continue; | ||
| 578 | }, | ||
| 579 | .keyword_line => { | ||
| 580 | // #line number "file" | ||
| 581 | const digits = tokenizer.nextNoWS(); | ||
| 582 | if (digits.id != .pp_num) try pp.err(digits, .line_simple_digit); | ||
| 583 | // TODO: validate that the pp_num token is solely digits | ||
| 584 | |||
| 585 | if (digits.id == .eof or digits.id == .nl) continue; | ||
| 586 | const name = tokenizer.nextNoWS(); | ||
| 587 | if (name.id == .eof or name.id == .nl) continue; | ||
| 588 | if (name.id != .string_literal) try pp.err(name, .line_invalid_filename); | ||
| 589 | try pp.expectNl(&tokenizer); | ||
| 590 | }, | ||
| 591 | .pp_num => { | ||
| 592 | // # number "file" flags | ||
| 593 | // TODO: validate that the pp_num token is solely digits | ||
| 594 | // if not, emit `GNU line marker directive requires a simple digit sequence` | ||
| 595 | const name = tokenizer.nextNoWS(); | ||
| 596 | if (name.id == .eof or name.id == .nl) continue; | ||
| 597 | if (name.id != .string_literal) try pp.err(name, .line_invalid_filename); | ||
| 598 | |||
| 599 | const flag_1 = tokenizer.nextNoWS(); | ||
| 600 | if (flag_1.id == .eof or flag_1.id == .nl) continue; | ||
| 601 | const flag_2 = tokenizer.nextNoWS(); | ||
| 602 | if (flag_2.id == .eof or flag_2.id == .nl) continue; | ||
| 603 | const flag_3 = tokenizer.nextNoWS(); | ||
| 604 | if (flag_3.id == .eof or flag_3.id == .nl) continue; | ||
| 605 | const flag_4 = tokenizer.nextNoWS(); | ||
| 606 | if (flag_4.id == .eof or flag_4.id == .nl) continue; | ||
| 607 | try pp.expectNl(&tokenizer); | ||
| 608 | }, | ||
| 609 | .nl => {}, | ||
| 610 | .eof => { | ||
| 611 | if (if_level != 0) try pp.err(tok, .unterminated_conditional_directive); | ||
| 612 | return tokFromRaw(directive); | ||
| 613 | }, | ||
| 614 | else => { | ||
| 615 | try pp.err(tok, .invalid_preprocessing_directive); | ||
| 616 | skipToNl(&tokenizer); | ||
| 617 | }, | ||
| 618 | } | ||
| 619 | if (pp.preserve_whitespace) { | ||
| 620 | tok.id = .nl; | ||
| 621 | try pp.tokens.append(pp.gpa, tokFromRaw(tok)); | ||
| 622 | } | ||
| 623 | }, | ||
| 624 | .whitespace => if (pp.preserve_whitespace) try pp.tokens.append(pp.gpa, tokFromRaw(tok)), | ||
| 625 | .nl => { | ||
| 626 | start_of_line = true; | ||
| 627 | if (pp.preserve_whitespace) try pp.tokens.append(pp.gpa, tokFromRaw(tok)); | ||
| 628 | }, | ||
| 629 | .eof => { | ||
| 630 | if (if_level != 0) try pp.err(tok, .unterminated_conditional_directive); | ||
| 631 | // The following check needs to occur here and not at the top of the function | ||
| 632 | // because a pragma may change the level during preprocessing | ||
| 633 | if (source.buf.len > 0 and source.buf[source.buf.len - 1] != '\n') { | ||
| 634 | try pp.err(tok, .newline_eof); | ||
| 635 | } | ||
| 636 | if (guard_name) |name| { | ||
| 637 | if (try pp.include_guards.fetchPut(pp.gpa, source.id, name)) |prev| { | ||
| 638 | assert(mem.eql(u8, name, prev.value)); | ||
| 639 | } | ||
| 640 | } | ||
| 641 | return tokFromRaw(tok); | ||
| 642 | }, | ||
| 643 | .unterminated_string_literal, .unterminated_char_literal, .empty_char_literal => |tag| { | ||
| 644 | start_of_line = false; | ||
| 645 | try pp.err(tok, invalidTokenDiagnostic(tag)); | ||
| 646 | try pp.expandMacro(&tokenizer, tok); | ||
| 647 | }, | ||
| 648 | .unterminated_comment => try pp.err(tok, .unterminated_comment), | ||
| 649 | else => { | ||
| 650 | if (tok.id.isMacroIdentifier() and pp.poisoned_identifiers.get(pp.tokSlice(tok)) != null) { | ||
| 651 | try pp.err(tok, .poisoned_identifier); | ||
| 652 | } | ||
| 653 | // Add the token to the buffer doing any necessary expansions. | ||
| 654 | start_of_line = false; | ||
| 655 | try pp.expandMacro(&tokenizer, tok); | ||
| 656 | }, | ||
| 657 | } | ||
| 658 | } | ||
| 659 | } | ||
| 660 | |||
| 661 | /// Get raw token source string. | ||
| 662 | /// Returned slice is invalidated when comp.generated_buf is updated. | ||
| 663 | pub fn tokSlice(pp: *Preprocessor, token: RawToken) []const u8 { | ||
| 664 | if (token.id.lexeme()) |some| return some; | ||
| 665 | const source = pp.comp.getSource(token.source); | ||
| 666 | return source.buf[token.start..token.end]; | ||
| 667 | } | ||
| 668 | |||
| 669 | /// Convert a token from the Tokenizer into a token used by the parser. | ||
| 670 | fn tokFromRaw(raw: RawToken) Token { | ||
| 671 | return .{ | ||
| 672 | .id = raw.id, | ||
| 673 | .loc = .{ | ||
| 674 | .id = raw.source, | ||
| 675 | .byte_offset = raw.start, | ||
| 676 | .line = raw.line, | ||
| 677 | }, | ||
| 678 | }; | ||
| 679 | } | ||
| 680 | |||
| 681 | fn err(pp: *Preprocessor, raw: RawToken, tag: Diagnostics.Tag) !void { | ||
| 682 | try pp.comp.diag.add(.{ | ||
| 683 | .tag = tag, | ||
| 684 | .loc = .{ | ||
| 685 | .id = raw.source, | ||
| 686 | .byte_offset = raw.start, | ||
| 687 | .line = raw.line, | ||
| 688 | }, | ||
| 689 | }, &.{}); | ||
| 690 | } | ||
| 691 | |||
| 692 | fn fatal(pp: *Preprocessor, raw: RawToken, comptime fmt: []const u8, args: anytype) Compilation.Error { | ||
| 693 | const source = pp.comp.getSource(raw.source); | ||
| 694 | const line_col = source.lineCol(.{ .id = raw.source, .line = raw.line, .byte_offset = raw.start }); | ||
| 695 | return pp.comp.diag.fatal(source.path, line_col.line, raw.line, line_col.col, fmt, args); | ||
| 696 | } | ||
| 697 | |||
| 698 | fn verboseLog(pp: *Preprocessor, raw: RawToken, comptime fmt: []const u8, args: anytype) void { | ||
| 699 | const source = pp.comp.getSource(raw.source); | ||
| 700 | const line_col = source.lineCol(.{ .id = raw.source, .line = raw.line, .byte_offset = raw.start }); | ||
| 701 | |||
| 702 | const stderr = std.io.getStdErr().writer(); | ||
| 703 | var buf_writer = std.io.bufferedWriter(stderr); | ||
| 704 | const writer = buf_writer.writer(); | ||
| 705 | defer buf_writer.flush() catch {}; | ||
| 706 | writer.print("{s}:{d}:{d}: ", .{ source.path, line_col.line_no, line_col.col }) catch return; | ||
| 707 | writer.print(fmt, args) catch return; | ||
| 708 | writer.writeByte('\n') catch return; | ||
| 709 | writer.writeAll(line_col.line) catch return; | ||
| 710 | writer.writeByte('\n') catch return; | ||
| 711 | } | ||
| 712 | |||
| 713 | /// Consume next token, error if it is not an identifier. | ||
| 714 | fn expectMacroName(pp: *Preprocessor, tokenizer: *Tokenizer) Error!?[]const u8 { | ||
| 715 | const macro_name = tokenizer.nextNoWS(); | ||
| 716 | if (!macro_name.id.isMacroIdentifier()) { | ||
| 717 | try pp.err(macro_name, .macro_name_missing); | ||
| 718 | skipToNl(tokenizer); | ||
| 719 | return null; | ||
| 720 | } | ||
| 721 | return pp.tokSlice(macro_name); | ||
| 722 | } | ||
| 723 | |||
| 724 | /// Skip until after a newline, error if extra tokens before it. | ||
| 725 | fn expectNl(pp: *Preprocessor, tokenizer: *Tokenizer) Error!void { | ||
| 726 | var sent_err = false; | ||
| 727 | while (true) { | ||
| 728 | const tok = tokenizer.next(); | ||
| 729 | if (tok.id == .nl or tok.id == .eof) return; | ||
| 730 | if (tok.id == .whitespace) continue; | ||
| 731 | if (!sent_err) { | ||
| 732 | sent_err = true; | ||
| 733 | try pp.err(tok, .extra_tokens_directive_end); | ||
| 734 | } | ||
| 735 | } | ||
| 736 | } | ||
| 737 | |||
| 738 | /// Consume all tokens until a newline and parse the result into a boolean. | ||
| 739 | fn expr(pp: *Preprocessor, tokenizer: *Tokenizer) MacroError!bool { | ||
| 740 | const start = pp.tokens.len; | ||
| 741 | defer { | ||
| 742 | for (pp.top_expansion_buf.items) |tok| Token.free(tok.expansion_locs, pp.gpa); | ||
| 743 | pp.tokens.len = start; | ||
| 744 | } | ||
| 745 | |||
| 746 | pp.top_expansion_buf.items.len = 0; | ||
| 747 | const eof = while (true) { | ||
| 748 | var tok = tokenizer.next(); | ||
| 749 | switch (tok.id) { | ||
| 750 | .nl, .eof => break tok, | ||
| 751 | .whitespace => if (pp.top_expansion_buf.items.len == 0) continue, | ||
| 752 | else => {}, | ||
| 753 | } | ||
| 754 | try pp.top_expansion_buf.append(tokFromRaw(tok)); | ||
| 755 | } else unreachable; | ||
| 756 | if (pp.top_expansion_buf.items.len != 0) { | ||
| 757 | pp.expansion_source_loc = pp.top_expansion_buf.items[0].loc; | ||
| 758 | try pp.expandMacroExhaustive(tokenizer, &pp.top_expansion_buf, 0, pp.top_expansion_buf.items.len, false, .expr); | ||
| 759 | } | ||
| 760 | for (pp.top_expansion_buf.items) |tok| { | ||
| 761 | if (tok.id == .macro_ws) continue; | ||
| 762 | if (!tok.id.validPreprocessorExprStart()) { | ||
| 763 | try pp.comp.diag.add(.{ | ||
| 764 | .tag = .invalid_preproc_expr_start, | ||
| 765 | .loc = tok.loc, | ||
| 766 | }, tok.expansionSlice()); | ||
| 767 | return false; | ||
| 768 | } | ||
| 769 | break; | ||
| 770 | } else { | ||
| 771 | try pp.err(eof, .expected_value_in_expr); | ||
| 772 | return false; | ||
| 773 | } | ||
| 774 | |||
| 775 | // validate the tokens in the expression | ||
| 776 | try pp.tokens.ensureUnusedCapacity(pp.gpa, pp.top_expansion_buf.items.len); | ||
| 777 | var i: usize = 0; | ||
| 778 | const items = pp.top_expansion_buf.items; | ||
| 779 | while (i < items.len) : (i += 1) { | ||
| 780 | var tok = items[i]; | ||
| 781 | switch (tok.id) { | ||
| 782 | .string_literal, | ||
| 783 | .string_literal_utf_16, | ||
| 784 | .string_literal_utf_8, | ||
| 785 | .string_literal_utf_32, | ||
| 786 | .string_literal_wide, | ||
| 787 | => { | ||
| 788 | try pp.comp.diag.add(.{ | ||
| 789 | .tag = .string_literal_in_pp_expr, | ||
| 790 | .loc = tok.loc, | ||
| 791 | }, tok.expansionSlice()); | ||
| 792 | return false; | ||
| 793 | }, | ||
| 794 | .plus_plus, | ||
| 795 | .minus_minus, | ||
| 796 | .plus_equal, | ||
| 797 | .minus_equal, | ||
| 798 | .asterisk_equal, | ||
| 799 | .slash_equal, | ||
| 800 | .percent_equal, | ||
| 801 | .angle_bracket_angle_bracket_left_equal, | ||
| 802 | .angle_bracket_angle_bracket_right_equal, | ||
| 803 | .ampersand_equal, | ||
| 804 | .caret_equal, | ||
| 805 | .pipe_equal, | ||
| 806 | .l_bracket, | ||
| 807 | .r_bracket, | ||
| 808 | .l_brace, | ||
| 809 | .r_brace, | ||
| 810 | .ellipsis, | ||
| 811 | .semicolon, | ||
| 812 | .hash, | ||
| 813 | .hash_hash, | ||
| 814 | .equal, | ||
| 815 | .arrow, | ||
| 816 | .period, | ||
| 817 | => { | ||
| 818 | try pp.comp.diag.add(.{ | ||
| 819 | .tag = .invalid_preproc_operator, | ||
| 820 | .loc = tok.loc, | ||
| 821 | }, tok.expansionSlice()); | ||
| 822 | return false; | ||
| 823 | }, | ||
| 824 | .macro_ws, .whitespace => continue, | ||
| 825 | .keyword_false => tok.id = .zero, | ||
| 826 | .keyword_true => tok.id = .one, | ||
| 827 | else => if (tok.id.isMacroIdentifier()) { | ||
| 828 | if (tok.id == .keyword_defined) { | ||
| 829 | const tokens_consumed = try pp.handleKeywordDefined(&tok, items[i + 1 ..], eof); | ||
| 830 | i += tokens_consumed; | ||
| 831 | } else { | ||
| 832 | try pp.comp.diag.add(.{ | ||
| 833 | .tag = .undefined_macro, | ||
| 834 | .loc = tok.loc, | ||
| 835 | .extra = .{ .str = pp.expandedSlice(tok) }, | ||
| 836 | }, tok.expansionSlice()); | ||
| 837 | |||
| 838 | if (i + 1 < pp.top_expansion_buf.items.len and | ||
| 839 | pp.top_expansion_buf.items[i + 1].id == .l_paren) | ||
| 840 | { | ||
| 841 | try pp.comp.diag.add(.{ | ||
| 842 | .tag = .fn_macro_undefined, | ||
| 843 | .loc = tok.loc, | ||
| 844 | .extra = .{ .str = pp.expandedSlice(tok) }, | ||
| 845 | }, tok.expansionSlice()); | ||
| 846 | return false; | ||
| 847 | } | ||
| 848 | |||
| 849 | tok.id = .zero; // undefined macro | ||
| 850 | } | ||
| 851 | }, | ||
| 852 | } | ||
| 853 | pp.tokens.appendAssumeCapacity(tok); | ||
| 854 | } | ||
| 855 | try pp.tokens.append(pp.gpa, .{ | ||
| 856 | .id = .eof, | ||
| 857 | .loc = tokFromRaw(eof).loc, | ||
| 858 | }); | ||
| 859 | |||
| 860 | // Actually parse it. | ||
| 861 | var parser = Parser{ | ||
| 862 | .pp = pp, | ||
| 863 | .comp = pp.comp, | ||
| 864 | .gpa = pp.gpa, | ||
| 865 | .tok_ids = pp.tokens.items(.id), | ||
| 866 | .tok_i = @intCast(start), | ||
| 867 | .arena = pp.arena.allocator(), | ||
| 868 | .in_macro = true, | ||
| 869 | .data = undefined, | ||
| 870 | .strings = undefined, | ||
| 871 | .retained_strings = undefined, | ||
| 872 | .value_map = undefined, | ||
| 873 | .labels = undefined, | ||
| 874 | .decl_buf = undefined, | ||
| 875 | .list_buf = undefined, | ||
| 876 | .param_buf = undefined, | ||
| 877 | .enum_buf = undefined, | ||
| 878 | .record_buf = undefined, | ||
| 879 | .attr_buf = undefined, | ||
| 880 | .field_attr_buf = undefined, | ||
| 881 | .string_ids = undefined, | ||
| 882 | }; | ||
| 883 | return parser.macroExpr(); | ||
| 884 | } | ||
| 885 | |||
| 886 | /// Turns macro_tok from .keyword_defined into .zero or .one depending on whether the argument is defined | ||
| 887 | /// Returns the number of tokens consumed | ||
| 888 | fn handleKeywordDefined(pp: *Preprocessor, macro_tok: *Token, tokens: []const Token, eof: RawToken) !usize { | ||
| 889 | std.debug.assert(macro_tok.id == .keyword_defined); | ||
| 890 | var it = TokenIterator.init(tokens); | ||
| 891 | const first = it.nextNoWS() orelse { | ||
| 892 | try pp.err(eof, .macro_name_missing); | ||
| 893 | return it.i; | ||
| 894 | }; | ||
| 895 | switch (first.id) { | ||
| 896 | .l_paren => {}, | ||
| 897 | else => { | ||
| 898 | if (!first.id.isMacroIdentifier()) { | ||
| 899 | try pp.comp.diag.add(.{ | ||
| 900 | .tag = .macro_name_must_be_identifier, | ||
| 901 | .loc = first.loc, | ||
| 902 | .extra = .{ .str = pp.expandedSlice(first) }, | ||
| 903 | }, first.expansionSlice()); | ||
| 904 | } | ||
| 905 | macro_tok.id = if (pp.defines.contains(pp.expandedSlice(first))) .one else .zero; | ||
| 906 | return it.i; | ||
| 907 | }, | ||
| 908 | } | ||
| 909 | const second = it.nextNoWS() orelse { | ||
| 910 | try pp.err(eof, .macro_name_missing); | ||
| 911 | return it.i; | ||
| 912 | }; | ||
| 913 | if (!second.id.isMacroIdentifier()) { | ||
| 914 | try pp.comp.diag.add(.{ | ||
| 915 | .tag = .macro_name_must_be_identifier, | ||
| 916 | .loc = second.loc, | ||
| 917 | }, second.expansionSlice()); | ||
| 918 | return it.i; | ||
| 919 | } | ||
| 920 | macro_tok.id = if (pp.defines.contains(pp.expandedSlice(second))) .one else .zero; | ||
| 921 | |||
| 922 | const last = it.nextNoWS(); | ||
| 923 | if (last == null or last.?.id != .r_paren) { | ||
| 924 | const tok = last orelse tokFromRaw(eof); | ||
| 925 | try pp.comp.diag.add(.{ | ||
| 926 | .tag = .closing_paren, | ||
| 927 | .loc = tok.loc, | ||
| 928 | }, tok.expansionSlice()); | ||
| 929 | try pp.comp.diag.add(.{ | ||
| 930 | .tag = .to_match_paren, | ||
| 931 | .loc = first.loc, | ||
| 932 | }, first.expansionSlice()); | ||
| 933 | } | ||
| 934 | |||
| 935 | return it.i; | ||
| 936 | } | ||
| 937 | |||
| 938 | /// Skip until #else #elif #endif, return last directive token id. | ||
| 939 | /// Also skips nested #if ... #endifs. | ||
| 940 | fn skip( | ||
| 941 | pp: *Preprocessor, | ||
| 942 | tokenizer: *Tokenizer, | ||
| 943 | cont: enum { until_else, until_endif, until_endif_seen_else }, | ||
| 944 | ) Error!void { | ||
| 945 | var ifs_seen: u32 = 0; | ||
| 946 | var line_start = true; | ||
| 947 | while (tokenizer.index < tokenizer.buf.len) { | ||
| 948 | if (line_start) { | ||
| 949 | const saved_tokenizer = tokenizer.*; | ||
| 950 | const hash = tokenizer.nextNoWS(); | ||
| 951 | if (hash.id == .nl) continue; | ||
| 952 | line_start = false; | ||
| 953 | if (hash.id != .hash) continue; | ||
| 954 | const directive = tokenizer.nextNoWS(); | ||
| 955 | switch (directive.id) { | ||
| 956 | .keyword_else => { | ||
| 957 | if (ifs_seen != 0) continue; | ||
| 958 | if (cont == .until_endif_seen_else) { | ||
| 959 | try pp.err(directive, .else_after_else); | ||
| 960 | continue; | ||
| 961 | } | ||
| 962 | tokenizer.* = saved_tokenizer; | ||
| 963 | return; | ||
| 964 | }, | ||
| 965 | .keyword_elif => { | ||
| 966 | if (ifs_seen != 0 or cont == .until_endif) continue; | ||
| 967 | if (cont == .until_endif_seen_else) { | ||
| 968 | try pp.err(directive, .elif_after_else); | ||
| 969 | continue; | ||
| 970 | } | ||
| 971 | tokenizer.* = saved_tokenizer; | ||
| 972 | return; | ||
| 973 | }, | ||
| 974 | .keyword_elifdef => { | ||
| 975 | if (ifs_seen != 0 or cont == .until_endif) continue; | ||
| 976 | if (cont == .until_endif_seen_else) { | ||
| 977 | try pp.err(directive, .elifdef_after_else); | ||
| 978 | continue; | ||
| 979 | } | ||
| 980 | tokenizer.* = saved_tokenizer; | ||
| 981 | return; | ||
| 982 | }, | ||
| 983 | .keyword_elifndef => { | ||
| 984 | if (ifs_seen != 0 or cont == .until_endif) continue; | ||
| 985 | if (cont == .until_endif_seen_else) { | ||
| 986 | try pp.err(directive, .elifndef_after_else); | ||
| 987 | continue; | ||
| 988 | } | ||
| 989 | tokenizer.* = saved_tokenizer; | ||
| 990 | return; | ||
| 991 | }, | ||
| 992 | .keyword_endif => { | ||
| 993 | if (ifs_seen == 0) { | ||
| 994 | tokenizer.* = saved_tokenizer; | ||
| 995 | return; | ||
| 996 | } | ||
| 997 | ifs_seen -= 1; | ||
| 998 | }, | ||
| 999 | .keyword_if, .keyword_ifdef, .keyword_ifndef => ifs_seen += 1, | ||
| 1000 | else => {}, | ||
| 1001 | } | ||
| 1002 | } else if (tokenizer.buf[tokenizer.index] == '\n') { | ||
| 1003 | line_start = true; | ||
| 1004 | tokenizer.index += 1; | ||
| 1005 | tokenizer.line += 1; | ||
| 1006 | if (pp.preserve_whitespace) { | ||
| 1007 | try pp.tokens.append(pp.gpa, .{ .id = .nl, .loc = .{ | ||
| 1008 | .id = tokenizer.source, | ||
| 1009 | .line = tokenizer.line, | ||
| 1010 | } }); | ||
| 1011 | } | ||
| 1012 | } else { | ||
| 1013 | line_start = false; | ||
| 1014 | tokenizer.index += 1; | ||
| 1015 | } | ||
| 1016 | } else { | ||
| 1017 | const eof = tokenizer.next(); | ||
| 1018 | return pp.err(eof, .unterminated_conditional_directive); | ||
| 1019 | } | ||
| 1020 | } | ||
| 1021 | |||
| 1022 | // Skip until newline, ignore other tokens. | ||
| 1023 | fn skipToNl(tokenizer: *Tokenizer) void { | ||
| 1024 | while (true) { | ||
| 1025 | const tok = tokenizer.next(); | ||
| 1026 | if (tok.id == .nl or tok.id == .eof) return; | ||
| 1027 | } | ||
| 1028 | } | ||
| 1029 | |||
| 1030 | const ExpandBuf = std.ArrayList(Token); | ||
| 1031 | fn removePlacemarkers(buf: *ExpandBuf) void { | ||
| 1032 | var i: usize = buf.items.len -% 1; | ||
| 1033 | while (i < buf.items.len) : (i -%= 1) { | ||
| 1034 | if (buf.items[i].id == .placemarker) { | ||
| 1035 | const placemarker = buf.orderedRemove(i); | ||
| 1036 | Token.free(placemarker.expansion_locs, buf.allocator); | ||
| 1037 | } | ||
| 1038 | } | ||
| 1039 | } | ||
| 1040 | |||
| 1041 | const MacroArguments = std.ArrayList([]const Token); | ||
| 1042 | fn deinitMacroArguments(allocator: Allocator, args: *const MacroArguments) void { | ||
| 1043 | for (args.items) |item| { | ||
| 1044 | for (item) |tok| Token.free(tok.expansion_locs, allocator); | ||
| 1045 | allocator.free(item); | ||
| 1046 | } | ||
| 1047 | args.deinit(); | ||
| 1048 | } | ||
| 1049 | |||
| 1050 | fn expandObjMacro(pp: *Preprocessor, simple_macro: *const Macro) Error!ExpandBuf { | ||
| 1051 | var buf = ExpandBuf.init(pp.gpa); | ||
| 1052 | errdefer buf.deinit(); | ||
| 1053 | try buf.ensureTotalCapacity(simple_macro.tokens.len); | ||
| 1054 | |||
| 1055 | // Add all of the simple_macros tokens to the new buffer handling any concats. | ||
| 1056 | var i: usize = 0; | ||
| 1057 | while (i < simple_macro.tokens.len) : (i += 1) { | ||
| 1058 | const raw = simple_macro.tokens[i]; | ||
| 1059 | const tok = tokFromRaw(raw); | ||
| 1060 | switch (raw.id) { | ||
| 1061 | .hash_hash => { | ||
| 1062 | var rhs = tokFromRaw(simple_macro.tokens[i + 1]); | ||
| 1063 | i += 1; | ||
| 1064 | while (true) { | ||
| 1065 | if (rhs.id == .whitespace) { | ||
| 1066 | rhs = tokFromRaw(simple_macro.tokens[i + 1]); | ||
| 1067 | i += 1; | ||
| 1068 | } else if (rhs.id == .comment and !pp.comp.langopts.preserve_comments_in_macros) { | ||
| 1069 | rhs = tokFromRaw(simple_macro.tokens[i + 1]); | ||
| 1070 | i += 1; | ||
| 1071 | } else break; | ||
| 1072 | } | ||
| 1073 | try pp.pasteTokens(&buf, &.{rhs}); | ||
| 1074 | }, | ||
| 1075 | .whitespace => if (pp.preserve_whitespace) buf.appendAssumeCapacity(tok), | ||
| 1076 | .macro_file => { | ||
| 1077 | const start = pp.comp.generated_buf.items.len; | ||
| 1078 | const source = pp.comp.getSource(pp.expansion_source_loc.id); | ||
| 1079 | try pp.comp.generated_buf.writer().print("\"{s}\"\n", .{source.path}); | ||
| 1080 | |||
| 1081 | buf.appendAssumeCapacity(try pp.makeGeneratedToken(start, .string_literal, tok)); | ||
| 1082 | }, | ||
| 1083 | .macro_line => { | ||
| 1084 | const start = pp.comp.generated_buf.items.len; | ||
| 1085 | const source = pp.comp.getSource(pp.expansion_source_loc.id); | ||
| 1086 | try pp.comp.generated_buf.writer().print("{d}\n", .{source.physicalLine(pp.expansion_source_loc)}); | ||
| 1087 | |||
| 1088 | buf.appendAssumeCapacity(try pp.makeGeneratedToken(start, .pp_num, tok)); | ||
| 1089 | }, | ||
| 1090 | .macro_counter => { | ||
| 1091 | defer pp.counter += 1; | ||
| 1092 | const start = pp.comp.generated_buf.items.len; | ||
| 1093 | try pp.comp.generated_buf.writer().print("{d}\n", .{pp.counter}); | ||
| 1094 | |||
| 1095 | buf.appendAssumeCapacity(try pp.makeGeneratedToken(start, .pp_num, tok)); | ||
| 1096 | }, | ||
| 1097 | else => buf.appendAssumeCapacity(tok), | ||
| 1098 | } | ||
| 1099 | } | ||
| 1100 | |||
| 1101 | return buf; | ||
| 1102 | } | ||
| 1103 | |||
| 1104 | /// Join a possibly-parenthesized series of string literal tokens into a single string without | ||
| 1105 | /// leading or trailing quotes. The returned slice is invalidated if pp.char_buf changes. | ||
| 1106 | /// Returns error.ExpectedStringLiteral if parentheses are not balanced, a non-string-literal | ||
| 1107 | /// is encountered, or if no string literals are encountered | ||
| 1108 | /// TODO: destringize (replace all '\\' with a single `\` and all '\"' with a '"') | ||
| 1109 | fn pasteStringsUnsafe(pp: *Preprocessor, toks: []const Token) ![]const u8 { | ||
| 1110 | const char_top = pp.char_buf.items.len; | ||
| 1111 | defer pp.char_buf.items.len = char_top; | ||
| 1112 | var unwrapped = toks; | ||
| 1113 | if (toks.len >= 2 and toks[0].id == .l_paren and toks[toks.len - 1].id == .r_paren) { | ||
| 1114 | unwrapped = toks[1 .. toks.len - 1]; | ||
| 1115 | } | ||
| 1116 | if (unwrapped.len == 0) return error.ExpectedStringLiteral; | ||
| 1117 | |||
| 1118 | for (unwrapped) |tok| { | ||
| 1119 | if (tok.id == .macro_ws) continue; | ||
| 1120 | if (tok.id != .string_literal) return error.ExpectedStringLiteral; | ||
| 1121 | const str = pp.expandedSlice(tok); | ||
| 1122 | try pp.char_buf.appendSlice(str[1 .. str.len - 1]); | ||
| 1123 | } | ||
| 1124 | return pp.char_buf.items[char_top..]; | ||
| 1125 | } | ||
| 1126 | |||
| 1127 | /// Handle the _Pragma operator (implemented as a builtin macro) | ||
| 1128 | fn pragmaOperator(pp: *Preprocessor, arg_tok: Token, operator_loc: Source.Location) !void { | ||
| 1129 | const arg_slice = pp.expandedSlice(arg_tok); | ||
| 1130 | const content = arg_slice[1 .. arg_slice.len - 1]; | ||
| 1131 | const directive = "#pragma "; | ||
| 1132 | |||
| 1133 | pp.char_buf.clearRetainingCapacity(); | ||
| 1134 | const total_len = directive.len + content.len + 1; // destringify can never grow the string, + 1 for newline | ||
| 1135 | try pp.char_buf.ensureUnusedCapacity(total_len); | ||
| 1136 | pp.char_buf.appendSliceAssumeCapacity(directive); | ||
| 1137 | pp.destringify(content); | ||
| 1138 | pp.char_buf.appendAssumeCapacity('\n'); | ||
| 1139 | |||
| 1140 | const start = pp.comp.generated_buf.items.len; | ||
| 1141 | try pp.comp.generated_buf.appendSlice(pp.char_buf.items); | ||
| 1142 | var tmp_tokenizer = Tokenizer{ | ||
| 1143 | .buf = pp.comp.generated_buf.items, | ||
| 1144 | .comp = pp.comp, | ||
| 1145 | .index = @intCast(start), | ||
| 1146 | .source = .generated, | ||
| 1147 | .line = pp.generated_line, | ||
| 1148 | }; | ||
| 1149 | pp.generated_line += 1; | ||
| 1150 | const hash_tok = tmp_tokenizer.next(); | ||
| 1151 | assert(hash_tok.id == .hash); | ||
| 1152 | const pragma_tok = tmp_tokenizer.next(); | ||
| 1153 | assert(pragma_tok.id == .keyword_pragma); | ||
| 1154 | try pp.pragma(&tmp_tokenizer, pragma_tok, operator_loc, arg_tok.expansionSlice()); | ||
| 1155 | } | ||
| 1156 | |||
| 1157 | /// Inverts the output of the preprocessor stringify (#) operation | ||
| 1158 | /// (except all whitespace is condensed to a single space) | ||
| 1159 | /// writes output to pp.char_buf; assumes capacity is sufficient | ||
| 1160 | /// backslash backslash -> backslash | ||
| 1161 | /// backslash doublequote -> doublequote | ||
| 1162 | /// All other characters remain the same | ||
| 1163 | fn destringify(pp: *Preprocessor, str: []const u8) void { | ||
| 1164 | var state: enum { start, backslash_seen } = .start; | ||
| 1165 | for (str) |c| { | ||
| 1166 | switch (c) { | ||
| 1167 | '\\' => { | ||
| 1168 | if (state == .backslash_seen) pp.char_buf.appendAssumeCapacity(c); | ||
| 1169 | state = if (state == .start) .backslash_seen else .start; | ||
| 1170 | }, | ||
| 1171 | else => { | ||
| 1172 | if (state == .backslash_seen and c != '"') pp.char_buf.appendAssumeCapacity('\\'); | ||
| 1173 | pp.char_buf.appendAssumeCapacity(c); | ||
| 1174 | state = .start; | ||
| 1175 | }, | ||
| 1176 | } | ||
| 1177 | } | ||
| 1178 | } | ||
| 1179 | |||
| 1180 | /// Stringify `tokens` into pp.char_buf. | ||
| 1181 | /// See https://gcc.gnu.org/onlinedocs/gcc-11.2.0/cpp/Stringizing.html#Stringizing | ||
| 1182 | fn stringify(pp: *Preprocessor, tokens: []const Token) !void { | ||
| 1183 | try pp.char_buf.append('"'); | ||
| 1184 | var ws_state: enum { start, need, not_needed } = .start; | ||
| 1185 | for (tokens) |tok| { | ||
| 1186 | if (tok.id == .macro_ws) { | ||
| 1187 | if (ws_state == .start) continue; | ||
| 1188 | ws_state = .need; | ||
| 1189 | continue; | ||
| 1190 | } | ||
| 1191 | if (ws_state == .need) try pp.char_buf.append(' '); | ||
| 1192 | ws_state = .not_needed; | ||
| 1193 | |||
| 1194 | // backslashes not inside strings are not escaped | ||
| 1195 | const is_str = switch (tok.id) { | ||
| 1196 | .string_literal, | ||
| 1197 | .string_literal_utf_16, | ||
| 1198 | .string_literal_utf_8, | ||
| 1199 | .string_literal_utf_32, | ||
| 1200 | .string_literal_wide, | ||
| 1201 | .char_literal, | ||
| 1202 | .char_literal_utf_16, | ||
| 1203 | .char_literal_utf_32, | ||
| 1204 | .char_literal_wide, | ||
| 1205 | => true, | ||
| 1206 | else => false, | ||
| 1207 | }; | ||
| 1208 | |||
| 1209 | for (pp.expandedSlice(tok)) |c| { | ||
| 1210 | if (c == '"') | ||
| 1211 | try pp.char_buf.appendSlice("\\\"") | ||
| 1212 | else if (c == '\\' and is_str) | ||
| 1213 | try pp.char_buf.appendSlice("\\\\") | ||
| 1214 | else | ||
| 1215 | try pp.char_buf.append(c); | ||
| 1216 | } | ||
| 1217 | } | ||
| 1218 | if (pp.char_buf.items[pp.char_buf.items.len - 1] == '\\') { | ||
| 1219 | const tok = tokens[tokens.len - 1]; | ||
| 1220 | try pp.comp.diag.add(.{ | ||
| 1221 | .tag = .invalid_pp_stringify_escape, | ||
| 1222 | .loc = tok.loc, | ||
| 1223 | }, tok.expansionSlice()); | ||
| 1224 | pp.char_buf.items.len -= 1; | ||
| 1225 | } | ||
| 1226 | try pp.char_buf.appendSlice("\"\n"); | ||
| 1227 | } | ||
| 1228 | |||
| 1229 | fn reconstructIncludeString(pp: *Preprocessor, param_toks: []const Token) !?[]const u8 { | ||
| 1230 | const char_top = pp.char_buf.items.len; | ||
| 1231 | defer pp.char_buf.items.len = char_top; | ||
| 1232 | |||
| 1233 | // Trim leading/trailing whitespace | ||
| 1234 | var begin: usize = 0; | ||
| 1235 | var end: usize = param_toks.len; | ||
| 1236 | while (begin < end and param_toks[begin].id == .macro_ws) : (begin += 1) {} | ||
| 1237 | while (end > begin and param_toks[end - 1].id == .macro_ws) : (end -= 1) {} | ||
| 1238 | const params = param_toks[begin..end]; | ||
| 1239 | |||
| 1240 | if (params.len == 0) { | ||
| 1241 | try pp.comp.diag.add(.{ | ||
| 1242 | .tag = .expected_filename, | ||
| 1243 | .loc = param_toks[0].loc, | ||
| 1244 | }, param_toks[0].expansionSlice()); | ||
| 1245 | return null; | ||
| 1246 | } | ||
| 1247 | // no string pasting | ||
| 1248 | if (params[0].id == .string_literal and params.len > 1) { | ||
| 1249 | try pp.comp.diag.add(.{ | ||
| 1250 | .tag = .closing_paren, | ||
| 1251 | .loc = params[1].loc, | ||
| 1252 | }, params[1].expansionSlice()); | ||
| 1253 | return null; | ||
| 1254 | } | ||
| 1255 | |||
| 1256 | for (params) |tok| { | ||
| 1257 | const str = pp.expandedSliceExtra(tok, .preserve_macro_ws); | ||
| 1258 | try pp.char_buf.appendSlice(str); | ||
| 1259 | } | ||
| 1260 | |||
| 1261 | const include_str = pp.char_buf.items[char_top..]; | ||
| 1262 | if (include_str.len < 3) { | ||
| 1263 | try pp.comp.diag.add(.{ | ||
| 1264 | .tag = .empty_filename, | ||
| 1265 | .loc = params[0].loc, | ||
| 1266 | }, params[0].expansionSlice()); | ||
| 1267 | return null; | ||
| 1268 | } | ||
| 1269 | |||
| 1270 | switch (include_str[0]) { | ||
| 1271 | '<' => { | ||
| 1272 | if (include_str[include_str.len - 1] != '>') { | ||
| 1273 | // Ugly hack to find out where the '>' should go, since we don't have the closing ')' location | ||
| 1274 | const start = params[0].loc; | ||
| 1275 | try pp.comp.diag.add(.{ | ||
| 1276 | .tag = .header_str_closing, | ||
| 1277 | .loc = .{ .id = start.id, .byte_offset = start.byte_offset + @as(u32, @intCast(include_str.len)) + 1, .line = start.line }, | ||
| 1278 | }, params[0].expansionSlice()); | ||
| 1279 | try pp.comp.diag.add(.{ | ||
| 1280 | .tag = .header_str_match, | ||
| 1281 | .loc = params[0].loc, | ||
| 1282 | }, params[0].expansionSlice()); | ||
| 1283 | return null; | ||
| 1284 | } | ||
| 1285 | return include_str; | ||
| 1286 | }, | ||
| 1287 | '"' => return include_str, | ||
| 1288 | else => { | ||
| 1289 | try pp.comp.diag.add(.{ | ||
| 1290 | .tag = .expected_filename, | ||
| 1291 | .loc = params[0].loc, | ||
| 1292 | }, params[0].expansionSlice()); | ||
| 1293 | return null; | ||
| 1294 | }, | ||
| 1295 | } | ||
| 1296 | } | ||
| 1297 | |||
| 1298 | fn handleBuiltinMacro(pp: *Preprocessor, builtin: RawToken.Id, param_toks: []const Token, src_loc: Source.Location) Error!bool { | ||
| 1299 | switch (builtin) { | ||
| 1300 | .macro_param_has_attribute, | ||
| 1301 | .macro_param_has_declspec_attribute, | ||
| 1302 | .macro_param_has_feature, | ||
| 1303 | .macro_param_has_extension, | ||
| 1304 | .macro_param_has_builtin, | ||
| 1305 | => { | ||
| 1306 | var invalid: ?Token = null; | ||
| 1307 | var identifier: ?Token = null; | ||
| 1308 | for (param_toks) |tok| { | ||
| 1309 | if (tok.id == .macro_ws) continue; | ||
| 1310 | if (tok.id == .comment) continue; | ||
| 1311 | if (!tok.id.isMacroIdentifier()) { | ||
| 1312 | invalid = tok; | ||
| 1313 | break; | ||
| 1314 | } | ||
| 1315 | if (identifier) |_| invalid = tok else identifier = tok; | ||
| 1316 | } | ||
| 1317 | if (identifier == null and invalid == null) invalid = .{ .id = .eof, .loc = src_loc }; | ||
| 1318 | if (invalid) |some| { | ||
| 1319 | try pp.comp.diag.add( | ||
| 1320 | .{ .tag = .feature_check_requires_identifier, .loc = some.loc }, | ||
| 1321 | some.expansionSlice(), | ||
| 1322 | ); | ||
| 1323 | return false; | ||
| 1324 | } | ||
| 1325 | |||
| 1326 | const ident_str = pp.expandedSlice(identifier.?); | ||
| 1327 | return switch (builtin) { | ||
| 1328 | .macro_param_has_attribute => Attribute.fromString(.gnu, null, ident_str) != null, | ||
| 1329 | .macro_param_has_declspec_attribute => { | ||
| 1330 | return if (pp.comp.langopts.declspec_attrs) | ||
| 1331 | Attribute.fromString(.declspec, null, ident_str) != null | ||
| 1332 | else | ||
| 1333 | false; | ||
| 1334 | }, | ||
| 1335 | .macro_param_has_feature => features.hasFeature(pp.comp, ident_str), | ||
| 1336 | .macro_param_has_extension => features.hasExtension(pp.comp, ident_str), | ||
| 1337 | .macro_param_has_builtin => pp.comp.hasBuiltin(ident_str), | ||
| 1338 | else => unreachable, | ||
| 1339 | }; | ||
| 1340 | }, | ||
| 1341 | .macro_param_has_warning => { | ||
| 1342 | const actual_param = pp.pasteStringsUnsafe(param_toks) catch |er| switch (er) { | ||
| 1343 | error.ExpectedStringLiteral => { | ||
| 1344 | try pp.comp.diag.add(.{ | ||
| 1345 | .tag = .expected_str_literal_in, | ||
| 1346 | .loc = param_toks[0].loc, | ||
| 1347 | .extra = .{ .str = "__has_warning" }, | ||
| 1348 | }, param_toks[0].expansionSlice()); | ||
| 1349 | return false; | ||
| 1350 | }, | ||
| 1351 | else => |e| return e, | ||
| 1352 | }; | ||
| 1353 | if (!mem.startsWith(u8, actual_param, "-W")) { | ||
| 1354 | try pp.comp.diag.add(.{ | ||
| 1355 | .tag = .malformed_warning_check, | ||
| 1356 | .loc = param_toks[0].loc, | ||
| 1357 | .extra = .{ .str = "__has_warning" }, | ||
| 1358 | }, param_toks[0].expansionSlice()); | ||
| 1359 | return false; | ||
| 1360 | } | ||
| 1361 | const warning_name = actual_param[2..]; | ||
| 1362 | return Diagnostics.warningExists(warning_name); | ||
| 1363 | }, | ||
| 1364 | .macro_param_is_identifier => { | ||
| 1365 | var invalid: ?Token = null; | ||
| 1366 | var identifier: ?Token = null; | ||
| 1367 | for (param_toks) |tok| switch (tok.id) { | ||
| 1368 | .macro_ws => continue, | ||
| 1369 | .comment => continue, | ||
| 1370 | else => { | ||
| 1371 | if (identifier) |_| invalid = tok else identifier = tok; | ||
| 1372 | }, | ||
| 1373 | }; | ||
| 1374 | if (identifier == null and invalid == null) invalid = .{ .id = .eof, .loc = src_loc }; | ||
| 1375 | if (invalid) |some| { | ||
| 1376 | try pp.comp.diag.add(.{ | ||
| 1377 | .tag = .missing_tok_builtin, | ||
| 1378 | .loc = some.loc, | ||
| 1379 | .extra = .{ .tok_id_expected = .r_paren }, | ||
| 1380 | }, some.expansionSlice()); | ||
| 1381 | return false; | ||
| 1382 | } | ||
| 1383 | |||
| 1384 | const id = identifier.?.id; | ||
| 1385 | return id == .identifier or id == .extended_identifier; | ||
| 1386 | }, | ||
| 1387 | .macro_param_has_include, .macro_param_has_include_next => { | ||
| 1388 | const include_str = (try pp.reconstructIncludeString(param_toks)) orelse return false; | ||
| 1389 | const include_type: Compilation.IncludeType = switch (include_str[0]) { | ||
| 1390 | '"' => .quotes, | ||
| 1391 | '<' => .angle_brackets, | ||
| 1392 | else => unreachable, | ||
| 1393 | }; | ||
| 1394 | const filename = include_str[1 .. include_str.len - 1]; | ||
| 1395 | if (builtin == .macro_param_has_include or pp.include_depth == 0) { | ||
| 1396 | if (builtin == .macro_param_has_include_next) { | ||
| 1397 | try pp.comp.diag.add(.{ | ||
| 1398 | .tag = .include_next_outside_header, | ||
| 1399 | .loc = src_loc, | ||
| 1400 | }, &.{}); | ||
| 1401 | } | ||
| 1402 | return pp.comp.hasInclude(filename, src_loc.id, include_type, .first); | ||
| 1403 | } | ||
| 1404 | return pp.comp.hasInclude(filename, src_loc.id, include_type, .next); | ||
| 1405 | }, | ||
| 1406 | else => unreachable, | ||
| 1407 | } | ||
| 1408 | } | ||
| 1409 | |||
| 1410 | fn expandFuncMacro( | ||
| 1411 | pp: *Preprocessor, | ||
| 1412 | loc: Source.Location, | ||
| 1413 | func_macro: *const Macro, | ||
| 1414 | args: *const MacroArguments, | ||
| 1415 | expanded_args: *const MacroArguments, | ||
| 1416 | ) MacroError!ExpandBuf { | ||
| 1417 | var buf = ExpandBuf.init(pp.gpa); | ||
| 1418 | try buf.ensureTotalCapacity(func_macro.tokens.len); | ||
| 1419 | errdefer buf.deinit(); | ||
| 1420 | |||
| 1421 | var expanded_variable_arguments = ExpandBuf.init(pp.gpa); | ||
| 1422 | defer expanded_variable_arguments.deinit(); | ||
| 1423 | var variable_arguments = ExpandBuf.init(pp.gpa); | ||
| 1424 | defer variable_arguments.deinit(); | ||
| 1425 | |||
| 1426 | if (func_macro.var_args) { | ||
| 1427 | var i: usize = func_macro.params.len; | ||
| 1428 | while (i < expanded_args.items.len) : (i += 1) { | ||
| 1429 | try variable_arguments.appendSlice(args.items[i]); | ||
| 1430 | try expanded_variable_arguments.appendSlice(expanded_args.items[i]); | ||
| 1431 | if (i != expanded_args.items.len - 1) { | ||
| 1432 | const comma = Token{ .id = .comma, .loc = .{ .id = .generated } }; | ||
| 1433 | try variable_arguments.append(comma); | ||
| 1434 | try expanded_variable_arguments.append(comma); | ||
| 1435 | } | ||
| 1436 | } | ||
| 1437 | } | ||
| 1438 | |||
| 1439 | // token concatenation and expansion phase | ||
| 1440 | var tok_i: usize = 0; | ||
| 1441 | while (tok_i < func_macro.tokens.len) : (tok_i += 1) { | ||
| 1442 | const raw = func_macro.tokens[tok_i]; | ||
| 1443 | switch (raw.id) { | ||
| 1444 | .hash_hash => while (tok_i + 1 < func_macro.tokens.len) { | ||
| 1445 | const raw_next = func_macro.tokens[tok_i + 1]; | ||
| 1446 | tok_i += 1; | ||
| 1447 | |||
| 1448 | const next = switch (raw_next.id) { | ||
| 1449 | .macro_ws => continue, | ||
| 1450 | .hash_hash => continue, | ||
| 1451 | .comment => if (!pp.comp.langopts.preserve_comments_in_macros) | ||
| 1452 | continue | ||
| 1453 | else | ||
| 1454 | &[1]Token{tokFromRaw(raw_next)}, | ||
| 1455 | .macro_param, .macro_param_no_expand => if (args.items[raw_next.end].len > 0) | ||
| 1456 | args.items[raw_next.end] | ||
| 1457 | else | ||
| 1458 | &[1]Token{tokFromRaw(.{ .id = .placemarker, .source = .generated })}, | ||
| 1459 | .keyword_va_args => variable_arguments.items, | ||
| 1460 | else => &[1]Token{tokFromRaw(raw_next)}, | ||
| 1461 | }; | ||
| 1462 | |||
| 1463 | try pp.pasteTokens(&buf, next); | ||
| 1464 | if (next.len != 0) break; | ||
| 1465 | }, | ||
| 1466 | .macro_param_no_expand => { | ||
| 1467 | const slice = if (args.items[raw.end].len > 0) | ||
| 1468 | args.items[raw.end] | ||
| 1469 | else | ||
| 1470 | &[1]Token{tokFromRaw(.{ .id = .placemarker, .source = .generated })}; | ||
| 1471 | const raw_loc = Source.Location{ .id = raw.source, .byte_offset = raw.start, .line = raw.line }; | ||
| 1472 | try bufCopyTokens(&buf, slice, &.{raw_loc}); | ||
| 1473 | }, | ||
| 1474 | .macro_param => { | ||
| 1475 | const arg = expanded_args.items[raw.end]; | ||
| 1476 | const raw_loc = Source.Location{ .id = raw.source, .byte_offset = raw.start, .line = raw.line }; | ||
| 1477 | try bufCopyTokens(&buf, arg, &.{raw_loc}); | ||
| 1478 | }, | ||
| 1479 | .keyword_va_args => { | ||
| 1480 | const raw_loc = Source.Location{ .id = raw.source, .byte_offset = raw.start, .line = raw.line }; | ||
| 1481 | try bufCopyTokens(&buf, expanded_variable_arguments.items, &.{raw_loc}); | ||
| 1482 | }, | ||
| 1483 | .stringify_param, .stringify_va_args => { | ||
| 1484 | const arg = if (raw.id == .stringify_va_args) | ||
| 1485 | variable_arguments.items | ||
| 1486 | else | ||
| 1487 | args.items[raw.end]; | ||
| 1488 | |||
| 1489 | pp.char_buf.clearRetainingCapacity(); | ||
| 1490 | try pp.stringify(arg); | ||
| 1491 | |||
| 1492 | const start = pp.comp.generated_buf.items.len; | ||
| 1493 | try pp.comp.generated_buf.appendSlice(pp.char_buf.items); | ||
| 1494 | |||
| 1495 | try buf.append(try pp.makeGeneratedToken(start, .string_literal, tokFromRaw(raw))); | ||
| 1496 | }, | ||
| 1497 | .macro_param_has_attribute, | ||
| 1498 | .macro_param_has_declspec_attribute, | ||
| 1499 | .macro_param_has_warning, | ||
| 1500 | .macro_param_has_feature, | ||
| 1501 | .macro_param_has_extension, | ||
| 1502 | .macro_param_has_builtin, | ||
| 1503 | .macro_param_has_include, | ||
| 1504 | .macro_param_has_include_next, | ||
| 1505 | .macro_param_is_identifier, | ||
| 1506 | => { | ||
| 1507 | const arg = expanded_args.items[0]; | ||
| 1508 | const result = if (arg.len == 0) blk: { | ||
| 1509 | const extra = Diagnostics.Message.Extra{ .arguments = .{ .expected = 1, .actual = 0 } }; | ||
| 1510 | try pp.comp.diag.add(.{ .tag = .expected_arguments, .loc = loc, .extra = extra }, &.{}); | ||
| 1511 | break :blk false; | ||
| 1512 | } else try pp.handleBuiltinMacro(raw.id, arg, loc); | ||
| 1513 | const start = pp.comp.generated_buf.items.len; | ||
| 1514 | try pp.comp.generated_buf.writer().print("{}\n", .{@intFromBool(result)}); | ||
| 1515 | try buf.append(try pp.makeGeneratedToken(start, .pp_num, tokFromRaw(raw))); | ||
| 1516 | }, | ||
| 1517 | .macro_param_pragma_operator => { | ||
| 1518 | const param_toks = expanded_args.items[0]; | ||
| 1519 | // Clang and GCC require exactly one token (so, no parentheses or string pasting) | ||
| 1520 | // even though their error messages indicate otherwise. Ours is slightly more | ||
| 1521 | // descriptive. | ||
| 1522 | var invalid: ?Token = null; | ||
| 1523 | var string: ?Token = null; | ||
| 1524 | for (param_toks) |tok| switch (tok.id) { | ||
| 1525 | .string_literal => { | ||
| 1526 | if (string) |_| invalid = tok else string = tok; | ||
| 1527 | }, | ||
| 1528 | .macro_ws => continue, | ||
| 1529 | .comment => continue, | ||
| 1530 | else => { | ||
| 1531 | invalid = tok; | ||
| 1532 | break; | ||
| 1533 | }, | ||
| 1534 | }; | ||
| 1535 | if (string == null and invalid == null) invalid = .{ .loc = loc, .id = .eof }; | ||
| 1536 | if (invalid) |some| try pp.comp.diag.add( | ||
| 1537 | .{ .tag = .pragma_operator_string_literal, .loc = some.loc }, | ||
| 1538 | some.expansionSlice(), | ||
| 1539 | ) else try pp.pragmaOperator(string.?, loc); | ||
| 1540 | }, | ||
| 1541 | .comma => { | ||
| 1542 | if (tok_i + 2 < func_macro.tokens.len and func_macro.tokens[tok_i + 1].id == .hash_hash) { | ||
| 1543 | const hash_hash = func_macro.tokens[tok_i + 1]; | ||
| 1544 | var maybe_va_args = func_macro.tokens[tok_i + 2]; | ||
| 1545 | var consumed: usize = 2; | ||
| 1546 | if (maybe_va_args.id == .macro_ws and tok_i + 3 < func_macro.tokens.len) { | ||
| 1547 | consumed = 3; | ||
| 1548 | maybe_va_args = func_macro.tokens[tok_i + 3]; | ||
| 1549 | } | ||
| 1550 | if (maybe_va_args.id == .keyword_va_args) { | ||
| 1551 | // GNU extension: `, ##__VA_ARGS__` deletes the comma if __VA_ARGS__ is empty | ||
| 1552 | tok_i += consumed; | ||
| 1553 | if (func_macro.params.len == expanded_args.items.len) { | ||
| 1554 | // Empty __VA_ARGS__, drop the comma | ||
| 1555 | try pp.err(hash_hash, .comma_deletion_va_args); | ||
| 1556 | } else if (func_macro.params.len == 0 and expanded_args.items.len == 1 and expanded_args.items[0].len == 0) { | ||
| 1557 | // Ambiguous whether this is "empty __VA_ARGS__" or "__VA_ARGS__ omitted" | ||
| 1558 | if (pp.comp.langopts.standard.isGNU()) { | ||
| 1559 | // GNU standard, drop the comma | ||
| 1560 | try pp.err(hash_hash, .comma_deletion_va_args); | ||
| 1561 | } else { | ||
| 1562 | // C standard, retain the comma | ||
| 1563 | try buf.append(tokFromRaw(raw)); | ||
| 1564 | } | ||
| 1565 | } else { | ||
| 1566 | try buf.append(tokFromRaw(raw)); | ||
| 1567 | if (expanded_variable_arguments.items.len > 0 or variable_arguments.items.len == func_macro.params.len) { | ||
| 1568 | try pp.err(hash_hash, .comma_deletion_va_args); | ||
| 1569 | } | ||
| 1570 | const raw_loc = Source.Location{ | ||
| 1571 | .id = maybe_va_args.source, | ||
| 1572 | .byte_offset = maybe_va_args.start, | ||
| 1573 | .line = maybe_va_args.line, | ||
| 1574 | }; | ||
| 1575 | try bufCopyTokens(&buf, expanded_variable_arguments.items, &.{raw_loc}); | ||
| 1576 | } | ||
| 1577 | continue; | ||
| 1578 | } | ||
| 1579 | } | ||
| 1580 | // Regular comma, no token pasting with __VA_ARGS__ | ||
| 1581 | try buf.append(tokFromRaw(raw)); | ||
| 1582 | }, | ||
| 1583 | else => try buf.append(tokFromRaw(raw)), | ||
| 1584 | } | ||
| 1585 | } | ||
| 1586 | removePlacemarkers(&buf); | ||
| 1587 | |||
| 1588 | return buf; | ||
| 1589 | } | ||
| 1590 | |||
| 1591 | fn shouldExpand(tok: Token, macro: *Macro) bool { | ||
| 1592 | // macro.loc.line contains the macros end index | ||
| 1593 | if (tok.loc.id == macro.loc.id and | ||
| 1594 | tok.loc.byte_offset >= macro.loc.byte_offset and | ||
| 1595 | tok.loc.byte_offset <= macro.loc.line) | ||
| 1596 | return false; | ||
| 1597 | for (tok.expansionSlice()) |loc| { | ||
| 1598 | if (loc.id == macro.loc.id and | ||
| 1599 | loc.byte_offset >= macro.loc.byte_offset and | ||
| 1600 | loc.byte_offset <= macro.loc.line) | ||
| 1601 | return false; | ||
| 1602 | } | ||
| 1603 | if (tok.flags.expansion_disabled) return false; | ||
| 1604 | |||
| 1605 | return true; | ||
| 1606 | } | ||
| 1607 | |||
| 1608 | fn bufCopyTokens(buf: *ExpandBuf, tokens: []const Token, src: []const Source.Location) !void { | ||
| 1609 | try buf.ensureUnusedCapacity(tokens.len); | ||
| 1610 | for (tokens) |tok| { | ||
| 1611 | var copy = try tok.dupe(buf.allocator); | ||
| 1612 | errdefer Token.free(copy.expansion_locs, buf.allocator); | ||
| 1613 | try copy.addExpansionLocation(buf.allocator, src); | ||
| 1614 | buf.appendAssumeCapacity(copy); | ||
| 1615 | } | ||
| 1616 | } | ||
| 1617 | |||
| 1618 | fn nextBufToken( | ||
| 1619 | pp: *Preprocessor, | ||
| 1620 | tokenizer: *Tokenizer, | ||
| 1621 | buf: *ExpandBuf, | ||
| 1622 | start_idx: *usize, | ||
| 1623 | end_idx: *usize, | ||
| 1624 | extend_buf: bool, | ||
| 1625 | ) Error!Token { | ||
| 1626 | start_idx.* += 1; | ||
| 1627 | if (start_idx.* == buf.items.len and start_idx.* >= end_idx.*) { | ||
| 1628 | if (extend_buf) { | ||
| 1629 | const raw_tok = tokenizer.next(); | ||
| 1630 | if (raw_tok.id.isMacroIdentifier() and | ||
| 1631 | pp.poisoned_identifiers.get(pp.tokSlice(raw_tok)) != null) | ||
| 1632 | try pp.err(raw_tok, .poisoned_identifier); | ||
| 1633 | |||
| 1634 | if (raw_tok.id == .nl) pp.add_expansion_nl += 1; | ||
| 1635 | |||
| 1636 | const new_tok = tokFromRaw(raw_tok); | ||
| 1637 | end_idx.* += 1; | ||
| 1638 | try buf.append(new_tok); | ||
| 1639 | return new_tok; | ||
| 1640 | } else { | ||
| 1641 | return Token{ .id = .eof, .loc = .{ .id = .generated } }; | ||
| 1642 | } | ||
| 1643 | } else { | ||
| 1644 | return buf.items[start_idx.*]; | ||
| 1645 | } | ||
| 1646 | } | ||
| 1647 | |||
| 1648 | fn collectMacroFuncArguments( | ||
| 1649 | pp: *Preprocessor, | ||
| 1650 | tokenizer: *Tokenizer, | ||
| 1651 | buf: *ExpandBuf, | ||
| 1652 | start_idx: *usize, | ||
| 1653 | end_idx: *usize, | ||
| 1654 | extend_buf: bool, | ||
| 1655 | is_builtin: bool, | ||
| 1656 | ) !MacroArguments { | ||
| 1657 | const name_tok = buf.items[start_idx.*]; | ||
| 1658 | const saved_tokenizer = tokenizer.*; | ||
| 1659 | const old_end = end_idx.*; | ||
| 1660 | |||
| 1661 | while (true) { | ||
| 1662 | const tok = try nextBufToken(pp, tokenizer, buf, start_idx, end_idx, extend_buf); | ||
| 1663 | switch (tok.id) { | ||
| 1664 | .nl, .whitespace, .macro_ws => {}, | ||
| 1665 | .l_paren => break, | ||
| 1666 | else => { | ||
| 1667 | if (is_builtin) { | ||
| 1668 | try pp.comp.diag.add(.{ | ||
| 1669 | .tag = .missing_lparen_after_builtin, | ||
| 1670 | .loc = name_tok.loc, | ||
| 1671 | .extra = .{ .str = pp.expandedSlice(name_tok) }, | ||
| 1672 | }, tok.expansionSlice()); | ||
| 1673 | } | ||
| 1674 | // Not a macro function call, go over normal identifier, rewind | ||
| 1675 | tokenizer.* = saved_tokenizer; | ||
| 1676 | end_idx.* = old_end; | ||
| 1677 | return error.MissingLParen; | ||
| 1678 | }, | ||
| 1679 | } | ||
| 1680 | } | ||
| 1681 | |||
| 1682 | // collect the arguments. | ||
| 1683 | var parens: u32 = 0; | ||
| 1684 | var args = MacroArguments.init(pp.gpa); | ||
| 1685 | errdefer deinitMacroArguments(pp.gpa, &args); | ||
| 1686 | var curArgument = std.ArrayList(Token).init(pp.gpa); | ||
| 1687 | defer curArgument.deinit(); | ||
| 1688 | while (true) { | ||
| 1689 | var tok = try nextBufToken(pp, tokenizer, buf, start_idx, end_idx, extend_buf); | ||
| 1690 | tok.flags.is_macro_arg = true; | ||
| 1691 | switch (tok.id) { | ||
| 1692 | .comma => { | ||
| 1693 | if (parens == 0) { | ||
| 1694 | const owned = try curArgument.toOwnedSlice(); | ||
| 1695 | errdefer pp.gpa.free(owned); | ||
| 1696 | try args.append(owned); | ||
| 1697 | } else { | ||
| 1698 | const duped = try tok.dupe(pp.gpa); | ||
| 1699 | errdefer Token.free(duped.expansion_locs, pp.gpa); | ||
| 1700 | try curArgument.append(duped); | ||
| 1701 | } | ||
| 1702 | }, | ||
| 1703 | .l_paren => { | ||
| 1704 | const duped = try tok.dupe(pp.gpa); | ||
| 1705 | errdefer Token.free(duped.expansion_locs, pp.gpa); | ||
| 1706 | try curArgument.append(duped); | ||
| 1707 | parens += 1; | ||
| 1708 | }, | ||
| 1709 | .r_paren => { | ||
| 1710 | if (parens == 0) { | ||
| 1711 | const owned = try curArgument.toOwnedSlice(); | ||
| 1712 | errdefer pp.gpa.free(owned); | ||
| 1713 | try args.append(owned); | ||
| 1714 | break; | ||
| 1715 | } else { | ||
| 1716 | const duped = try tok.dupe(pp.gpa); | ||
| 1717 | errdefer Token.free(duped.expansion_locs, pp.gpa); | ||
| 1718 | try curArgument.append(duped); | ||
| 1719 | parens -= 1; | ||
| 1720 | } | ||
| 1721 | }, | ||
| 1722 | .eof => { | ||
| 1723 | { | ||
| 1724 | const owned = try curArgument.toOwnedSlice(); | ||
| 1725 | errdefer pp.gpa.free(owned); | ||
| 1726 | try args.append(owned); | ||
| 1727 | } | ||
| 1728 | tokenizer.* = saved_tokenizer; | ||
| 1729 | try pp.comp.diag.add( | ||
| 1730 | .{ .tag = .unterminated_macro_arg_list, .loc = name_tok.loc }, | ||
| 1731 | name_tok.expansionSlice(), | ||
| 1732 | ); | ||
| 1733 | return error.Unterminated; | ||
| 1734 | }, | ||
| 1735 | .nl, .whitespace => { | ||
| 1736 | try curArgument.append(.{ .id = .macro_ws, .loc = tok.loc }); | ||
| 1737 | }, | ||
| 1738 | else => { | ||
| 1739 | const duped = try tok.dupe(pp.gpa); | ||
| 1740 | errdefer Token.free(duped.expansion_locs, pp.gpa); | ||
| 1741 | try curArgument.append(duped); | ||
| 1742 | }, | ||
| 1743 | } | ||
| 1744 | } | ||
| 1745 | |||
| 1746 | return args; | ||
| 1747 | } | ||
| 1748 | |||
| 1749 | fn removeExpandedTokens(pp: *Preprocessor, buf: *ExpandBuf, start: usize, len: usize, moving_end_idx: *usize) !void { | ||
| 1750 | for (buf.items[start .. start + len]) |tok| Token.free(tok.expansion_locs, pp.gpa); | ||
| 1751 | try buf.replaceRange(start, len, &.{}); | ||
| 1752 | moving_end_idx.* -|= len; | ||
| 1753 | } | ||
| 1754 | |||
| 1755 | /// The behavior of `defined` depends on whether we are in a preprocessor | ||
| 1756 | /// expression context (#if or #elif) or not. | ||
| 1757 | /// In a non-expression context it's just an identifier. Within a preprocessor | ||
| 1758 | /// expression it is a unary operator or one-argument function. | ||
| 1759 | const EvalContext = enum { | ||
| 1760 | expr, | ||
| 1761 | non_expr, | ||
| 1762 | }; | ||
| 1763 | |||
| 1764 | /// Helper for safely iterating over a slice of tokens while skipping whitespace | ||
| 1765 | const TokenIterator = struct { | ||
| 1766 | toks: []const Token, | ||
| 1767 | i: usize, | ||
| 1768 | |||
| 1769 | fn init(toks: []const Token) TokenIterator { | ||
| 1770 | return .{ .toks = toks, .i = 0 }; | ||
| 1771 | } | ||
| 1772 | |||
| 1773 | fn nextNoWS(self: *TokenIterator) ?Token { | ||
| 1774 | while (self.i < self.toks.len) : (self.i += 1) { | ||
| 1775 | const tok = self.toks[self.i]; | ||
| 1776 | if (tok.id == .whitespace or tok.id == .macro_ws) continue; | ||
| 1777 | |||
| 1778 | self.i += 1; | ||
| 1779 | return tok; | ||
| 1780 | } | ||
| 1781 | return null; | ||
| 1782 | } | ||
| 1783 | }; | ||
| 1784 | |||
| 1785 | fn expandMacroExhaustive( | ||
| 1786 | pp: *Preprocessor, | ||
| 1787 | tokenizer: *Tokenizer, | ||
| 1788 | buf: *ExpandBuf, | ||
| 1789 | start_idx: usize, | ||
| 1790 | end_idx: usize, | ||
| 1791 | extend_buf: bool, | ||
| 1792 | eval_ctx: EvalContext, | ||
| 1793 | ) MacroError!void { | ||
| 1794 | var moving_end_idx = end_idx; | ||
| 1795 | var advance_index: usize = 0; | ||
| 1796 | // rescan loop | ||
| 1797 | var do_rescan = true; | ||
| 1798 | while (do_rescan) { | ||
| 1799 | do_rescan = false; | ||
| 1800 | // expansion loop | ||
| 1801 | var idx: usize = start_idx + advance_index; | ||
| 1802 | while (idx < moving_end_idx) { | ||
| 1803 | const macro_tok = buf.items[idx]; | ||
| 1804 | if (macro_tok.id == .keyword_defined and eval_ctx == .expr) { | ||
| 1805 | idx += 1; | ||
| 1806 | var it = TokenIterator.init(buf.items[idx..moving_end_idx]); | ||
| 1807 | if (it.nextNoWS()) |tok| { | ||
| 1808 | switch (tok.id) { | ||
| 1809 | .l_paren => { | ||
| 1810 | _ = it.nextNoWS(); // eat (what should be) identifier | ||
| 1811 | _ = it.nextNoWS(); // eat (what should be) r paren | ||
| 1812 | }, | ||
| 1813 | .identifier, .extended_identifier => {}, | ||
| 1814 | else => {}, | ||
| 1815 | } | ||
| 1816 | } | ||
| 1817 | idx += it.i; | ||
| 1818 | continue; | ||
| 1819 | } | ||
| 1820 | const macro_entry = pp.defines.getPtr(pp.expandedSlice(macro_tok)); | ||
| 1821 | if (macro_entry == null or !shouldExpand(buf.items[idx], macro_entry.?)) { | ||
| 1822 | idx += 1; | ||
| 1823 | continue; | ||
| 1824 | } | ||
| 1825 | if (macro_entry) |macro| macro_handler: { | ||
| 1826 | if (macro.is_func) { | ||
| 1827 | var macro_scan_idx = idx; | ||
| 1828 | // to be saved in case this doesn't turn out to be a call | ||
| 1829 | const args = pp.collectMacroFuncArguments( | ||
| 1830 | tokenizer, | ||
| 1831 | buf, | ||
| 1832 | &macro_scan_idx, | ||
| 1833 | &moving_end_idx, | ||
| 1834 | extend_buf, | ||
| 1835 | macro.is_builtin, | ||
| 1836 | ) catch |er| switch (er) { | ||
| 1837 | error.MissingLParen => { | ||
| 1838 | if (!buf.items[idx].flags.is_macro_arg) buf.items[idx].flags.expansion_disabled = true; | ||
| 1839 | idx += 1; | ||
| 1840 | break :macro_handler; | ||
| 1841 | }, | ||
| 1842 | error.Unterminated => { | ||
| 1843 | if (pp.comp.langopts.emulate == .gcc) idx += 1; | ||
| 1844 | try pp.removeExpandedTokens(buf, idx, macro_scan_idx - idx, &moving_end_idx); | ||
| 1845 | break :macro_handler; | ||
| 1846 | }, | ||
| 1847 | else => |e| return e, | ||
| 1848 | }; | ||
| 1849 | defer { | ||
| 1850 | for (args.items) |item| { | ||
| 1851 | pp.gpa.free(item); | ||
| 1852 | } | ||
| 1853 | args.deinit(); | ||
| 1854 | } | ||
| 1855 | |||
| 1856 | var args_count: u32 = @intCast(args.items.len); | ||
| 1857 | // if the macro has zero arguments g() args_count is still 1 | ||
| 1858 | // an empty token list g() and a whitespace-only token list g( ) | ||
| 1859 | // counts as zero arguments for the purposes of argument-count validation | ||
| 1860 | if (args_count == 1 and macro.params.len == 0) { | ||
| 1861 | for (args.items[0]) |tok| { | ||
| 1862 | if (tok.id != .macro_ws) break; | ||
| 1863 | } else { | ||
| 1864 | args_count = 0; | ||
| 1865 | } | ||
| 1866 | } | ||
| 1867 | |||
| 1868 | // Validate argument count. | ||
| 1869 | const extra = Diagnostics.Message.Extra{ | ||
| 1870 | .arguments = .{ .expected = @intCast(macro.params.len), .actual = args_count }, | ||
| 1871 | }; | ||
| 1872 | if (macro.var_args and args_count < macro.params.len) { | ||
| 1873 | try pp.comp.diag.add( | ||
| 1874 | .{ .tag = .expected_at_least_arguments, .loc = buf.items[idx].loc, .extra = extra }, | ||
| 1875 | buf.items[idx].expansionSlice(), | ||
| 1876 | ); | ||
| 1877 | idx += 1; | ||
| 1878 | try pp.removeExpandedTokens(buf, idx, macro_scan_idx - idx + 1, &moving_end_idx); | ||
| 1879 | continue; | ||
| 1880 | } | ||
| 1881 | if (!macro.var_args and args_count != macro.params.len) { | ||
| 1882 | try pp.comp.diag.add( | ||
| 1883 | .{ .tag = .expected_arguments, .loc = buf.items[idx].loc, .extra = extra }, | ||
| 1884 | buf.items[idx].expansionSlice(), | ||
| 1885 | ); | ||
| 1886 | idx += 1; | ||
| 1887 | try pp.removeExpandedTokens(buf, idx, macro_scan_idx - idx + 1, &moving_end_idx); | ||
| 1888 | continue; | ||
| 1889 | } | ||
| 1890 | var expanded_args = MacroArguments.init(pp.gpa); | ||
| 1891 | defer deinitMacroArguments(pp.gpa, &expanded_args); | ||
| 1892 | try expanded_args.ensureTotalCapacity(args.items.len); | ||
| 1893 | for (args.items) |arg| { | ||
| 1894 | var expand_buf = ExpandBuf.init(pp.gpa); | ||
| 1895 | errdefer expand_buf.deinit(); | ||
| 1896 | try expand_buf.appendSlice(arg); | ||
| 1897 | |||
| 1898 | try pp.expandMacroExhaustive(tokenizer, &expand_buf, 0, expand_buf.items.len, false, eval_ctx); | ||
| 1899 | |||
| 1900 | expanded_args.appendAssumeCapacity(try expand_buf.toOwnedSlice()); | ||
| 1901 | } | ||
| 1902 | |||
| 1903 | var res = try pp.expandFuncMacro(macro_tok.loc, macro, &args, &expanded_args); | ||
| 1904 | defer res.deinit(); | ||
| 1905 | const tokens_added = res.items.len; | ||
| 1906 | |||
| 1907 | const macro_expansion_locs = macro_tok.expansionSlice(); | ||
| 1908 | for (res.items) |*tok| { | ||
| 1909 | try tok.addExpansionLocation(pp.gpa, &.{macro_tok.loc}); | ||
| 1910 | try tok.addExpansionLocation(pp.gpa, macro_expansion_locs); | ||
| 1911 | } | ||
| 1912 | |||
| 1913 | const tokens_removed = macro_scan_idx - idx + 1; | ||
| 1914 | for (buf.items[idx .. idx + tokens_removed]) |tok| Token.free(tok.expansion_locs, pp.gpa); | ||
| 1915 | try buf.replaceRange(idx, tokens_removed, res.items); | ||
| 1916 | |||
| 1917 | moving_end_idx += tokens_added; | ||
| 1918 | // Overflow here means that we encountered an unterminated argument list | ||
| 1919 | // while expanding the body of this macro. | ||
| 1920 | moving_end_idx -|= tokens_removed; | ||
| 1921 | idx += tokens_added; | ||
| 1922 | do_rescan = true; | ||
| 1923 | } else { | ||
| 1924 | const res = try pp.expandObjMacro(macro); | ||
| 1925 | defer res.deinit(); | ||
| 1926 | |||
| 1927 | const macro_expansion_locs = macro_tok.expansionSlice(); | ||
| 1928 | var increment_idx_by = res.items.len; | ||
| 1929 | for (res.items, 0..) |*tok, i| { | ||
| 1930 | tok.flags.is_macro_arg = macro_tok.flags.is_macro_arg; | ||
| 1931 | try tok.addExpansionLocation(pp.gpa, &.{macro_tok.loc}); | ||
| 1932 | try tok.addExpansionLocation(pp.gpa, macro_expansion_locs); | ||
| 1933 | if (tok.id == .keyword_defined and eval_ctx == .expr) { | ||
| 1934 | try pp.comp.diag.add(.{ | ||
| 1935 | .tag = .expansion_to_defined, | ||
| 1936 | .loc = tok.loc, | ||
| 1937 | }, tok.expansionSlice()); | ||
| 1938 | } | ||
| 1939 | |||
| 1940 | if (i < increment_idx_by and (tok.id == .keyword_defined or pp.defines.contains(pp.expandedSlice(tok.*)))) { | ||
| 1941 | increment_idx_by = i; | ||
| 1942 | } | ||
| 1943 | } | ||
| 1944 | |||
| 1945 | Token.free(buf.items[idx].expansion_locs, pp.gpa); | ||
| 1946 | try buf.replaceRange(idx, 1, res.items); | ||
| 1947 | idx += increment_idx_by; | ||
| 1948 | moving_end_idx = moving_end_idx + res.items.len - 1; | ||
| 1949 | do_rescan = true; | ||
| 1950 | } | ||
| 1951 | } | ||
| 1952 | if (idx - start_idx == advance_index + 1 and !do_rescan) { | ||
| 1953 | advance_index += 1; | ||
| 1954 | } | ||
| 1955 | } // end of replacement phase | ||
| 1956 | } | ||
| 1957 | // end of scanning phase | ||
| 1958 | |||
| 1959 | // trim excess buffer | ||
| 1960 | for (buf.items[moving_end_idx..]) |item| { | ||
| 1961 | Token.free(item.expansion_locs, pp.gpa); | ||
| 1962 | } | ||
| 1963 | buf.items.len = moving_end_idx; | ||
| 1964 | } | ||
| 1965 | |||
| 1966 | /// Try to expand a macro after a possible candidate has been read from the `tokenizer` | ||
| 1967 | /// into the `raw` token passed as argument | ||
| 1968 | fn expandMacro(pp: *Preprocessor, tokenizer: *Tokenizer, raw: RawToken) MacroError!void { | ||
| 1969 | var source_tok = tokFromRaw(raw); | ||
| 1970 | if (!raw.id.isMacroIdentifier()) { | ||
| 1971 | source_tok.id.simplifyMacroKeyword(); | ||
| 1972 | return pp.tokens.append(pp.gpa, source_tok); | ||
| 1973 | } | ||
| 1974 | pp.top_expansion_buf.items.len = 0; | ||
| 1975 | try pp.top_expansion_buf.append(source_tok); | ||
| 1976 | pp.expansion_source_loc = source_tok.loc; | ||
| 1977 | |||
| 1978 | try pp.expandMacroExhaustive(tokenizer, &pp.top_expansion_buf, 0, 1, true, .non_expr); | ||
| 1979 | try pp.tokens.ensureUnusedCapacity(pp.gpa, pp.top_expansion_buf.items.len); | ||
| 1980 | for (pp.top_expansion_buf.items) |*tok| { | ||
| 1981 | if (tok.id == .macro_ws and !pp.preserve_whitespace) { | ||
| 1982 | Token.free(tok.expansion_locs, pp.gpa); | ||
| 1983 | continue; | ||
| 1984 | } | ||
| 1985 | if (tok.id == .comment and !pp.comp.langopts.preserve_comments_in_macros) { | ||
| 1986 | Token.free(tok.expansion_locs, pp.gpa); | ||
| 1987 | continue; | ||
| 1988 | } | ||
| 1989 | tok.id.simplifyMacroKeywordExtra(true); | ||
| 1990 | pp.tokens.appendAssumeCapacity(tok.*); | ||
| 1991 | } | ||
| 1992 | if (pp.preserve_whitespace) { | ||
| 1993 | try pp.tokens.ensureUnusedCapacity(pp.gpa, pp.add_expansion_nl); | ||
| 1994 | while (pp.add_expansion_nl > 0) : (pp.add_expansion_nl -= 1) { | ||
| 1995 | pp.tokens.appendAssumeCapacity(.{ .id = .nl, .loc = .{ | ||
| 1996 | .id = tokenizer.source, | ||
| 1997 | .line = tokenizer.line, | ||
| 1998 | } }); | ||
| 1999 | } | ||
| 2000 | } | ||
| 2001 | } | ||
| 2002 | |||
| 2003 | fn expandedSliceExtra(pp: *const Preprocessor, tok: Token, macro_ws_handling: enum { single_macro_ws, preserve_macro_ws }) []const u8 { | ||
| 2004 | if (tok.id.lexeme()) |some| { | ||
| 2005 | if (!tok.id.allowsDigraphs(pp.comp) and !(tok.id == .macro_ws and macro_ws_handling == .preserve_macro_ws)) return some; | ||
| 2006 | } | ||
| 2007 | var tmp_tokenizer = Tokenizer{ | ||
| 2008 | .buf = pp.comp.getSource(tok.loc.id).buf, | ||
| 2009 | .comp = pp.comp, | ||
| 2010 | .index = tok.loc.byte_offset, | ||
| 2011 | .source = .generated, | ||
| 2012 | }; | ||
| 2013 | if (tok.id == .macro_string) { | ||
| 2014 | while (true) : (tmp_tokenizer.index += 1) { | ||
| 2015 | if (tmp_tokenizer.buf[tmp_tokenizer.index] == '>') break; | ||
| 2016 | } | ||
| 2017 | return tmp_tokenizer.buf[tok.loc.byte_offset .. tmp_tokenizer.index + 1]; | ||
| 2018 | } | ||
| 2019 | const res = tmp_tokenizer.next(); | ||
| 2020 | return tmp_tokenizer.buf[res.start..res.end]; | ||
| 2021 | } | ||
| 2022 | |||
| 2023 | /// Get expanded token source string. | ||
| 2024 | pub fn expandedSlice(pp: *Preprocessor, tok: Token) []const u8 { | ||
| 2025 | return pp.expandedSliceExtra(tok, .single_macro_ws); | ||
| 2026 | } | ||
| 2027 | |||
| 2028 | /// Concat two tokens and add the result to pp.generated | ||
| 2029 | fn pasteTokens(pp: *Preprocessor, lhs_toks: *ExpandBuf, rhs_toks: []const Token) Error!void { | ||
| 2030 | const lhs = while (lhs_toks.popOrNull()) |lhs| { | ||
| 2031 | if ((pp.comp.langopts.preserve_comments_in_macros and lhs.id == .comment) or | ||
| 2032 | (lhs.id != .macro_ws and lhs.id != .comment)) | ||
| 2033 | break lhs; | ||
| 2034 | |||
| 2035 | Token.free(lhs.expansion_locs, pp.gpa); | ||
| 2036 | } else { | ||
| 2037 | return bufCopyTokens(lhs_toks, rhs_toks, &.{}); | ||
| 2038 | }; | ||
| 2039 | |||
| 2040 | var rhs_rest: u32 = 1; | ||
| 2041 | const rhs = for (rhs_toks) |rhs| { | ||
| 2042 | if ((pp.comp.langopts.preserve_comments_in_macros and rhs.id == .comment) or | ||
| 2043 | (rhs.id != .macro_ws and rhs.id != .comment)) | ||
| 2044 | break rhs; | ||
| 2045 | |||
| 2046 | rhs_rest += 1; | ||
| 2047 | } else { | ||
| 2048 | return lhs_toks.appendAssumeCapacity(lhs); | ||
| 2049 | }; | ||
| 2050 | defer Token.free(lhs.expansion_locs, pp.gpa); | ||
| 2051 | |||
| 2052 | const start = pp.comp.generated_buf.items.len; | ||
| 2053 | const end = start + pp.expandedSlice(lhs).len + pp.expandedSlice(rhs).len; | ||
| 2054 | try pp.comp.generated_buf.ensureTotalCapacity(end + 1); // +1 for a newline | ||
| 2055 | // We cannot use the same slices here since they might be invalidated by `ensureCapacity` | ||
| 2056 | pp.comp.generated_buf.appendSliceAssumeCapacity(pp.expandedSlice(lhs)); | ||
| 2057 | pp.comp.generated_buf.appendSliceAssumeCapacity(pp.expandedSlice(rhs)); | ||
| 2058 | pp.comp.generated_buf.appendAssumeCapacity('\n'); | ||
| 2059 | |||
| 2060 | // Try to tokenize the result. | ||
| 2061 | var tmp_tokenizer = Tokenizer{ | ||
| 2062 | .buf = pp.comp.generated_buf.items, | ||
| 2063 | .comp = pp.comp, | ||
| 2064 | .index = @intCast(start), | ||
| 2065 | .source = .generated, | ||
| 2066 | }; | ||
| 2067 | const pasted_token = tmp_tokenizer.nextNoWSComments(); | ||
| 2068 | const next = tmp_tokenizer.nextNoWSComments(); | ||
| 2069 | const pasted_id = if (lhs.id == .placemarker and rhs.id == .placemarker) | ||
| 2070 | .placemarker | ||
| 2071 | else | ||
| 2072 | pasted_token.id; | ||
| 2073 | try lhs_toks.append(try pp.makeGeneratedToken(start, pasted_id, lhs)); | ||
| 2074 | |||
| 2075 | if (next.id != .nl and next.id != .eof) { | ||
| 2076 | try pp.comp.diag.add(.{ | ||
| 2077 | .tag = .pasting_formed_invalid, | ||
| 2078 | .loc = lhs.loc, | ||
| 2079 | .extra = .{ .str = try pp.comp.diag.arena.allocator().dupe( | ||
| 2080 | u8, | ||
| 2081 | pp.comp.generated_buf.items[start..end], | ||
| 2082 | ) }, | ||
| 2083 | }, lhs.expansionSlice()); | ||
| 2084 | try lhs_toks.append(tokFromRaw(next)); | ||
| 2085 | } | ||
| 2086 | |||
| 2087 | try bufCopyTokens(lhs_toks, rhs_toks[rhs_rest..], &.{}); | ||
| 2088 | } | ||
| 2089 | |||
| 2090 | fn makeGeneratedToken(pp: *Preprocessor, start: usize, id: Token.Id, source: Token) !Token { | ||
| 2091 | var pasted_token = Token{ .id = id, .loc = .{ | ||
| 2092 | .id = .generated, | ||
| 2093 | .byte_offset = @intCast(start), | ||
| 2094 | .line = pp.generated_line, | ||
| 2095 | } }; | ||
| 2096 | pp.generated_line += 1; | ||
| 2097 | try pasted_token.addExpansionLocation(pp.gpa, &.{source.loc}); | ||
| 2098 | try pasted_token.addExpansionLocation(pp.gpa, source.expansionSlice()); | ||
| 2099 | return pasted_token; | ||
| 2100 | } | ||
| 2101 | |||
| 2102 | /// Defines a new macro and warns if it is a duplicate | ||
| 2103 | fn defineMacro(pp: *Preprocessor, name_tok: RawToken, macro: Macro) Error!void { | ||
| 2104 | const name_str = pp.tokSlice(name_tok); | ||
| 2105 | const gop = try pp.defines.getOrPut(name_str); | ||
| 2106 | if (gop.found_existing and !gop.value_ptr.eql(macro, pp)) { | ||
| 2107 | try pp.comp.diag.add(.{ | ||
| 2108 | .tag = if (gop.value_ptr.is_builtin) .builtin_macro_redefined else .macro_redefined, | ||
| 2109 | .loc = .{ .id = name_tok.source, .byte_offset = name_tok.start, .line = name_tok.line }, | ||
| 2110 | .extra = .{ .str = name_str }, | ||
| 2111 | }, &.{}); | ||
| 2112 | // TODO add a previous definition note | ||
| 2113 | } | ||
| 2114 | if (pp.verbose) { | ||
| 2115 | pp.verboseLog(name_tok, "macro {s} defined", .{name_str}); | ||
| 2116 | } | ||
| 2117 | gop.value_ptr.* = macro; | ||
| 2118 | } | ||
| 2119 | |||
| 2120 | /// Handle a #define directive. | ||
| 2121 | fn define(pp: *Preprocessor, tokenizer: *Tokenizer) Error!void { | ||
| 2122 | // Get macro name and validate it. | ||
| 2123 | const macro_name = tokenizer.nextNoWS(); | ||
| 2124 | if (macro_name.id == .keyword_defined) { | ||
| 2125 | try pp.err(macro_name, .defined_as_macro_name); | ||
| 2126 | return skipToNl(tokenizer); | ||
| 2127 | } | ||
| 2128 | if (!macro_name.id.isMacroIdentifier()) { | ||
| 2129 | try pp.err(macro_name, .macro_name_must_be_identifier); | ||
| 2130 | return skipToNl(tokenizer); | ||
| 2131 | } | ||
| 2132 | var macro_name_token_id = macro_name.id; | ||
| 2133 | macro_name_token_id.simplifyMacroKeyword(); | ||
| 2134 | switch (macro_name_token_id) { | ||
| 2135 | .identifier, .extended_identifier => {}, | ||
| 2136 | else => if (macro_name_token_id.isMacroIdentifier()) { | ||
| 2137 | try pp.err(macro_name, .keyword_macro); | ||
| 2138 | }, | ||
| 2139 | } | ||
| 2140 | |||
| 2141 | // Check for function macros and empty defines. | ||
| 2142 | var first = tokenizer.next(); | ||
| 2143 | switch (first.id) { | ||
| 2144 | .nl, .eof => return pp.defineMacro(macro_name, .{ | ||
| 2145 | .params = undefined, | ||
| 2146 | .tokens = undefined, | ||
| 2147 | .var_args = false, | ||
| 2148 | .loc = undefined, | ||
| 2149 | .is_func = false, | ||
| 2150 | }), | ||
| 2151 | .whitespace => first = tokenizer.next(), | ||
| 2152 | .l_paren => return pp.defineFn(tokenizer, macro_name, first), | ||
| 2153 | else => try pp.err(first, .whitespace_after_macro_name), | ||
| 2154 | } | ||
| 2155 | if (first.id == .hash_hash) { | ||
| 2156 | try pp.err(first, .hash_hash_at_start); | ||
| 2157 | return skipToNl(tokenizer); | ||
| 2158 | } | ||
| 2159 | first.id.simplifyMacroKeyword(); | ||
| 2160 | |||
| 2161 | pp.token_buf.items.len = 0; // Safe to use since we can only be in one directive at a time. | ||
| 2162 | |||
| 2163 | var need_ws = false; | ||
| 2164 | // Collect the token body and validate any ## found. | ||
| 2165 | var tok = first; | ||
| 2166 | const end_index = while (true) { | ||
| 2167 | tok.id.simplifyMacroKeyword(); | ||
| 2168 | switch (tok.id) { | ||
| 2169 | .hash_hash => { | ||
| 2170 | const next = tokenizer.nextNoWSComments(); | ||
| 2171 | switch (next.id) { | ||
| 2172 | .nl, .eof => { | ||
| 2173 | try pp.err(tok, .hash_hash_at_end); | ||
| 2174 | return; | ||
| 2175 | }, | ||
| 2176 | .hash_hash => { | ||
| 2177 | try pp.err(next, .hash_hash_at_end); | ||
| 2178 | return; | ||
| 2179 | }, | ||
| 2180 | else => {}, | ||
| 2181 | } | ||
| 2182 | try pp.token_buf.append(tok); | ||
| 2183 | try pp.token_buf.append(next); | ||
| 2184 | }, | ||
| 2185 | .nl, .eof => break tok.start, | ||
| 2186 | .comment => if (pp.comp.langopts.preserve_comments_in_macros) { | ||
| 2187 | if (need_ws) { | ||
| 2188 | need_ws = false; | ||
| 2189 | try pp.token_buf.append(.{ .id = .macro_ws, .source = .generated }); | ||
| 2190 | } | ||
| 2191 | try pp.token_buf.append(tok); | ||
| 2192 | }, | ||
| 2193 | .whitespace => need_ws = true, | ||
| 2194 | .unterminated_string_literal, .unterminated_char_literal, .empty_char_literal => |tag| { | ||
| 2195 | try pp.err(tok, invalidTokenDiagnostic(tag)); | ||
| 2196 | try pp.token_buf.append(tok); | ||
| 2197 | }, | ||
| 2198 | .unterminated_comment => try pp.err(tok, .unterminated_comment), | ||
| 2199 | else => { | ||
| 2200 | if (tok.id != .whitespace and need_ws) { | ||
| 2201 | need_ws = false; | ||
| 2202 | try pp.token_buf.append(.{ .id = .macro_ws, .source = .generated }); | ||
| 2203 | } | ||
| 2204 | try pp.token_buf.append(tok); | ||
| 2205 | }, | ||
| 2206 | } | ||
| 2207 | tok = tokenizer.next(); | ||
| 2208 | } else unreachable; | ||
| 2209 | |||
| 2210 | const list = try pp.arena.allocator().dupe(RawToken, pp.token_buf.items); | ||
| 2211 | try pp.defineMacro(macro_name, .{ | ||
| 2212 | .loc = .{ | ||
| 2213 | .id = macro_name.source, | ||
| 2214 | .byte_offset = first.start, | ||
| 2215 | .line = end_index, | ||
| 2216 | }, | ||
| 2217 | .tokens = list, | ||
| 2218 | .params = undefined, | ||
| 2219 | .is_func = false, | ||
| 2220 | .var_args = false, | ||
| 2221 | }); | ||
| 2222 | } | ||
| 2223 | |||
| 2224 | /// Handle a function like #define directive. | ||
| 2225 | fn defineFn(pp: *Preprocessor, tokenizer: *Tokenizer, macro_name: RawToken, l_paren: RawToken) Error!void { | ||
| 2226 | assert(macro_name.id.isMacroIdentifier()); | ||
| 2227 | var params = std.ArrayList([]const u8).init(pp.gpa); | ||
| 2228 | defer params.deinit(); | ||
| 2229 | |||
| 2230 | // Parse the parameter list. | ||
| 2231 | var gnu_var_args: []const u8 = ""; | ||
| 2232 | var var_args = false; | ||
| 2233 | const start_index = while (true) { | ||
| 2234 | var tok = tokenizer.nextNoWS(); | ||
| 2235 | if (tok.id == .r_paren) break tok.end; | ||
| 2236 | if (tok.id == .eof) return pp.err(tok, .unterminated_macro_param_list); | ||
| 2237 | if (tok.id == .ellipsis) { | ||
| 2238 | var_args = true; | ||
| 2239 | const r_paren = tokenizer.nextNoWS(); | ||
| 2240 | if (r_paren.id != .r_paren) { | ||
| 2241 | try pp.err(r_paren, .missing_paren_param_list); | ||
| 2242 | try pp.err(l_paren, .to_match_paren); | ||
| 2243 | return skipToNl(tokenizer); | ||
| 2244 | } | ||
| 2245 | break r_paren.end; | ||
| 2246 | } | ||
| 2247 | if (!tok.id.isMacroIdentifier()) { | ||
| 2248 | try pp.err(tok, .invalid_token_param_list); | ||
| 2249 | return skipToNl(tokenizer); | ||
| 2250 | } | ||
| 2251 | |||
| 2252 | try params.append(pp.tokSlice(tok)); | ||
| 2253 | |||
| 2254 | tok = tokenizer.nextNoWS(); | ||
| 2255 | if (tok.id == .ellipsis) { | ||
| 2256 | try pp.err(tok, .gnu_va_macro); | ||
| 2257 | gnu_var_args = params.pop(); | ||
| 2258 | const r_paren = tokenizer.nextNoWS(); | ||
| 2259 | if (r_paren.id != .r_paren) { | ||
| 2260 | try pp.err(r_paren, .missing_paren_param_list); | ||
| 2261 | try pp.err(l_paren, .to_match_paren); | ||
| 2262 | return skipToNl(tokenizer); | ||
| 2263 | } | ||
| 2264 | break r_paren.end; | ||
| 2265 | } else if (tok.id == .r_paren) { | ||
| 2266 | break tok.end; | ||
| 2267 | } else if (tok.id != .comma) { | ||
| 2268 | try pp.err(tok, .expected_comma_param_list); | ||
| 2269 | return skipToNl(tokenizer); | ||
| 2270 | } | ||
| 2271 | } else unreachable; | ||
| 2272 | |||
| 2273 | var need_ws = false; | ||
| 2274 | // Collect the body tokens and validate # and ##'s found. | ||
| 2275 | pp.token_buf.items.len = 0; // Safe to use since we can only be in one directive at a time. | ||
| 2276 | const end_index = tok_loop: while (true) { | ||
| 2277 | var tok = tokenizer.next(); | ||
| 2278 | switch (tok.id) { | ||
| 2279 | .nl, .eof => break tok.start, | ||
| 2280 | .whitespace => need_ws = pp.token_buf.items.len != 0, | ||
| 2281 | .comment => if (!pp.comp.langopts.preserve_comments_in_macros) continue else { | ||
| 2282 | if (need_ws) { | ||
| 2283 | need_ws = false; | ||
| 2284 | try pp.token_buf.append(.{ .id = .macro_ws, .source = .generated }); | ||
| 2285 | } | ||
| 2286 | try pp.token_buf.append(tok); | ||
| 2287 | }, | ||
| 2288 | .hash => { | ||
| 2289 | if (tok.id != .whitespace and need_ws) { | ||
| 2290 | need_ws = false; | ||
| 2291 | try pp.token_buf.append(.{ .id = .macro_ws, .source = .generated }); | ||
| 2292 | } | ||
| 2293 | const param = tokenizer.nextNoWS(); | ||
| 2294 | blk: { | ||
| 2295 | if (var_args and param.id == .keyword_va_args) { | ||
| 2296 | tok.id = .stringify_va_args; | ||
| 2297 | try pp.token_buf.append(tok); | ||
| 2298 | continue :tok_loop; | ||
| 2299 | } | ||
| 2300 | if (!param.id.isMacroIdentifier()) break :blk; | ||
| 2301 | const s = pp.tokSlice(param); | ||
| 2302 | if (mem.eql(u8, s, gnu_var_args)) { | ||
| 2303 | tok.id = .stringify_va_args; | ||
| 2304 | try pp.token_buf.append(tok); | ||
| 2305 | continue :tok_loop; | ||
| 2306 | } | ||
| 2307 | for (params.items, 0..) |p, i| { | ||
| 2308 | if (mem.eql(u8, p, s)) { | ||
| 2309 | tok.id = .stringify_param; | ||
| 2310 | tok.end = @intCast(i); | ||
| 2311 | try pp.token_buf.append(tok); | ||
| 2312 | continue :tok_loop; | ||
| 2313 | } | ||
| 2314 | } | ||
| 2315 | } | ||
| 2316 | try pp.err(param, .hash_not_followed_param); | ||
| 2317 | return skipToNl(tokenizer); | ||
| 2318 | }, | ||
| 2319 | .hash_hash => { | ||
| 2320 | need_ws = false; | ||
| 2321 | // if ## appears at the beginning, the token buf is still empty | ||
| 2322 | // in this case, error out | ||
| 2323 | if (pp.token_buf.items.len == 0) { | ||
| 2324 | try pp.err(tok, .hash_hash_at_start); | ||
| 2325 | return skipToNl(tokenizer); | ||
| 2326 | } | ||
| 2327 | const saved_tokenizer = tokenizer.*; | ||
| 2328 | const next = tokenizer.nextNoWSComments(); | ||
| 2329 | if (next.id == .nl or next.id == .eof) { | ||
| 2330 | try pp.err(tok, .hash_hash_at_end); | ||
| 2331 | return; | ||
| 2332 | } | ||
| 2333 | tokenizer.* = saved_tokenizer; | ||
| 2334 | // convert the previous token to .macro_param_no_expand if it was .macro_param | ||
| 2335 | if (pp.token_buf.items[pp.token_buf.items.len - 1].id == .macro_param) { | ||
| 2336 | pp.token_buf.items[pp.token_buf.items.len - 1].id = .macro_param_no_expand; | ||
| 2337 | } | ||
| 2338 | try pp.token_buf.append(tok); | ||
| 2339 | }, | ||
| 2340 | .unterminated_string_literal, .unterminated_char_literal, .empty_char_literal => |tag| { | ||
| 2341 | try pp.err(tok, invalidTokenDiagnostic(tag)); | ||
| 2342 | try pp.token_buf.append(tok); | ||
| 2343 | }, | ||
| 2344 | .unterminated_comment => try pp.err(tok, .unterminated_comment), | ||
| 2345 | else => { | ||
| 2346 | if (tok.id != .whitespace and need_ws) { | ||
| 2347 | need_ws = false; | ||
| 2348 | try pp.token_buf.append(.{ .id = .macro_ws, .source = .generated }); | ||
| 2349 | } | ||
| 2350 | if (var_args and tok.id == .keyword_va_args) { | ||
| 2351 | // do nothing | ||
| 2352 | } else if (tok.id.isMacroIdentifier()) { | ||
| 2353 | tok.id.simplifyMacroKeyword(); | ||
| 2354 | const s = pp.tokSlice(tok); | ||
| 2355 | if (mem.eql(u8, gnu_var_args, s)) { | ||
| 2356 | tok.id = .keyword_va_args; | ||
| 2357 | } else for (params.items, 0..) |param, i| { | ||
| 2358 | if (mem.eql(u8, param, s)) { | ||
| 2359 | // NOTE: it doesn't matter to assign .macro_param_no_expand | ||
| 2360 | // here in case a ## was the previous token, because | ||
| 2361 | // ## processing will eat this token with the same semantics | ||
| 2362 | tok.id = .macro_param; | ||
| 2363 | tok.end = @intCast(i); | ||
| 2364 | break; | ||
| 2365 | } | ||
| 2366 | } | ||
| 2367 | } | ||
| 2368 | try pp.token_buf.append(tok); | ||
| 2369 | }, | ||
| 2370 | } | ||
| 2371 | } else unreachable; | ||
| 2372 | |||
| 2373 | const param_list = try pp.arena.allocator().dupe([]const u8, params.items); | ||
| 2374 | const token_list = try pp.arena.allocator().dupe(RawToken, pp.token_buf.items); | ||
| 2375 | try pp.defineMacro(macro_name, .{ | ||
| 2376 | .is_func = true, | ||
| 2377 | .params = param_list, | ||
| 2378 | .var_args = var_args or gnu_var_args.len != 0, | ||
| 2379 | .tokens = token_list, | ||
| 2380 | .loc = .{ | ||
| 2381 | .id = macro_name.source, | ||
| 2382 | .byte_offset = start_index, | ||
| 2383 | .line = end_index, | ||
| 2384 | }, | ||
| 2385 | }); | ||
| 2386 | } | ||
| 2387 | |||
| 2388 | /// Handle an #embed directive | ||
| 2389 | fn embed(pp: *Preprocessor, tokenizer: *Tokenizer) MacroError!void { | ||
| 2390 | const first = tokenizer.nextNoWS(); | ||
| 2391 | const filename_tok = pp.findIncludeFilenameToken(first, tokenizer, .expect_nl_eof) catch |er| switch (er) { | ||
| 2392 | error.InvalidInclude => return, | ||
| 2393 | else => |e| return e, | ||
| 2394 | }; | ||
| 2395 | |||
| 2396 | // Check for empty filename. | ||
| 2397 | const tok_slice = pp.expandedSliceExtra(filename_tok, .single_macro_ws); | ||
| 2398 | if (tok_slice.len < 3) { | ||
| 2399 | try pp.err(first, .empty_filename); | ||
| 2400 | return; | ||
| 2401 | } | ||
| 2402 | const filename = tok_slice[1 .. tok_slice.len - 1]; | ||
| 2403 | const include_type: Compilation.IncludeType = switch (filename_tok.id) { | ||
| 2404 | .string_literal => .quotes, | ||
| 2405 | .macro_string => .angle_brackets, | ||
| 2406 | else => unreachable, | ||
| 2407 | }; | ||
| 2408 | |||
| 2409 | const embed_bytes = (try pp.comp.findEmbed(filename, first.source, include_type)) orelse return pp.fatal(first, "'{s}' not found", .{filename}); | ||
| 2410 | defer pp.comp.gpa.free(embed_bytes); | ||
| 2411 | |||
| 2412 | if (embed_bytes.len == 0) return; | ||
| 2413 | |||
| 2414 | try pp.tokens.ensureUnusedCapacity(pp.comp.gpa, 2 * embed_bytes.len - 1); // N bytes and N-1 commas | ||
| 2415 | |||
| 2416 | // TODO: We currently only support systems with CHAR_BIT == 8 | ||
| 2417 | // If the target's CHAR_BIT is not 8, we need to write out correctly-sized embed_bytes | ||
| 2418 | // and correctly account for the target's endianness | ||
| 2419 | const writer = pp.comp.generated_buf.writer(); | ||
| 2420 | |||
| 2421 | { | ||
| 2422 | const byte = embed_bytes[0]; | ||
| 2423 | const start = pp.comp.generated_buf.items.len; | ||
| 2424 | try writer.print("{d}", .{byte}); | ||
| 2425 | pp.tokens.appendAssumeCapacity(try pp.makeGeneratedToken(start, .embed_byte, filename_tok)); | ||
| 2426 | } | ||
| 2427 | |||
| 2428 | for (embed_bytes[1..]) |byte| { | ||
| 2429 | const start = pp.comp.generated_buf.items.len; | ||
| 2430 | try writer.print(",{d}", .{byte}); | ||
| 2431 | pp.tokens.appendAssumeCapacity(.{ .id = .comma, .loc = .{ .id = .generated, .byte_offset = @intCast(start) } }); | ||
| 2432 | pp.tokens.appendAssumeCapacity(try pp.makeGeneratedToken(start + 1, .embed_byte, filename_tok)); | ||
| 2433 | } | ||
| 2434 | try pp.comp.generated_buf.append('\n'); | ||
| 2435 | } | ||
| 2436 | |||
| 2437 | // Handle a #include directive. | ||
| 2438 | fn include(pp: *Preprocessor, tokenizer: *Tokenizer, which: Compilation.WhichInclude) MacroError!void { | ||
| 2439 | const first = tokenizer.nextNoWS(); | ||
| 2440 | const new_source = findIncludeSource(pp, tokenizer, first, which) catch |er| switch (er) { | ||
| 2441 | error.InvalidInclude => return, | ||
| 2442 | else => |e| return e, | ||
| 2443 | }; | ||
| 2444 | |||
| 2445 | // Prevent stack overflow | ||
| 2446 | pp.include_depth += 1; | ||
| 2447 | defer pp.include_depth -= 1; | ||
| 2448 | if (pp.include_depth > max_include_depth) { | ||
| 2449 | try pp.comp.diag.add(.{ | ||
| 2450 | .tag = .too_many_includes, | ||
| 2451 | .loc = .{ .id = first.source, .byte_offset = first.start, .line = first.line }, | ||
| 2452 | }, &.{}); | ||
| 2453 | return error.StopPreprocessing; | ||
| 2454 | } | ||
| 2455 | |||
| 2456 | if (pp.include_guards.get(new_source.id)) |guard| { | ||
| 2457 | if (pp.defines.contains(guard)) return; | ||
| 2458 | } | ||
| 2459 | |||
| 2460 | if (pp.verbose) { | ||
| 2461 | pp.verboseLog(first, "include file {s}", .{new_source.path}); | ||
| 2462 | } | ||
| 2463 | |||
| 2464 | const tokens_start = pp.tokens.len; | ||
| 2465 | try pp.addIncludeStart(new_source); | ||
| 2466 | const eof = pp.preprocessExtra(new_source) catch |er| switch (er) { | ||
| 2467 | error.StopPreprocessing => { | ||
| 2468 | for (pp.tokens.items(.expansion_locs)[tokens_start..]) |loc| Token.free(loc, pp.gpa); | ||
| 2469 | pp.tokens.len = tokens_start; | ||
| 2470 | return; | ||
| 2471 | }, | ||
| 2472 | else => |e| return e, | ||
| 2473 | }; | ||
| 2474 | try eof.checkMsEof(new_source, pp.comp); | ||
| 2475 | if (pp.preserve_whitespace and pp.tokens.items(.id)[pp.tokens.len - 1] != .nl) { | ||
| 2476 | try pp.tokens.append(pp.gpa, .{ .id = .nl, .loc = .{ | ||
| 2477 | .id = tokenizer.source, | ||
| 2478 | .line = tokenizer.line, | ||
| 2479 | } }); | ||
| 2480 | } | ||
| 2481 | if (pp.linemarkers == .none) return; | ||
| 2482 | var next = first; | ||
| 2483 | while (true) { | ||
| 2484 | var tmp = tokenizer.*; | ||
| 2485 | next = tmp.nextNoWS(); | ||
| 2486 | if (next.id != .nl) break; | ||
| 2487 | tokenizer.* = tmp; | ||
| 2488 | } | ||
| 2489 | try pp.addIncludeResume(next.source, next.end, next.line); | ||
| 2490 | } | ||
| 2491 | |||
| 2492 | /// tokens that are part of a pragma directive can happen in 3 ways: | ||
| 2493 | /// 1. directly in the text via `#pragma ...` | ||
| 2494 | /// 2. Via a string literal argument to `_Pragma` | ||
| 2495 | /// 3. Via a stringified macro argument which is used as an argument to `_Pragma` | ||
| 2496 | /// operator_loc: Location of `_Pragma`; null if this is from #pragma | ||
| 2497 | /// arg_locs: expansion locations of the argument to _Pragma. empty if #pragma or a raw string literal was used | ||
| 2498 | fn makePragmaToken(pp: *Preprocessor, raw: RawToken, operator_loc: ?Source.Location, arg_locs: []const Source.Location) !Token { | ||
| 2499 | var tok = tokFromRaw(raw); | ||
| 2500 | if (operator_loc) |loc| { | ||
| 2501 | try tok.addExpansionLocation(pp.gpa, &.{loc}); | ||
| 2502 | } | ||
| 2503 | try tok.addExpansionLocation(pp.gpa, arg_locs); | ||
| 2504 | return tok; | ||
| 2505 | } | ||
| 2506 | |||
| 2507 | /// Handle a pragma directive | ||
| 2508 | fn pragma(pp: *Preprocessor, tokenizer: *Tokenizer, pragma_tok: RawToken, operator_loc: ?Source.Location, arg_locs: []const Source.Location) !void { | ||
| 2509 | const name_tok = tokenizer.nextNoWS(); | ||
| 2510 | if (name_tok.id == .nl or name_tok.id == .eof) return; | ||
| 2511 | |||
| 2512 | const name = pp.tokSlice(name_tok); | ||
| 2513 | try pp.tokens.append(pp.gpa, try pp.makePragmaToken(pragma_tok, operator_loc, arg_locs)); | ||
| 2514 | const pragma_start: u32 = @intCast(pp.tokens.len); | ||
| 2515 | |||
| 2516 | const pragma_name_tok = try pp.makePragmaToken(name_tok, operator_loc, arg_locs); | ||
| 2517 | try pp.tokens.append(pp.gpa, pragma_name_tok); | ||
| 2518 | while (true) { | ||
| 2519 | const next_tok = tokenizer.next(); | ||
| 2520 | if (next_tok.id == .whitespace) continue; | ||
| 2521 | if (next_tok.id == .eof) { | ||
| 2522 | try pp.tokens.append(pp.gpa, .{ | ||
| 2523 | .id = .nl, | ||
| 2524 | .loc = .{ .id = .generated }, | ||
| 2525 | }); | ||
| 2526 | break; | ||
| 2527 | } | ||
| 2528 | try pp.tokens.append(pp.gpa, try pp.makePragmaToken(next_tok, operator_loc, arg_locs)); | ||
| 2529 | if (next_tok.id == .nl) break; | ||
| 2530 | } | ||
| 2531 | if (pp.comp.getPragma(name)) |prag| unknown: { | ||
| 2532 | return prag.preprocessorCB(pp, pragma_start) catch |er| switch (er) { | ||
| 2533 | error.UnknownPragma => break :unknown, | ||
| 2534 | else => |e| return e, | ||
| 2535 | }; | ||
| 2536 | } | ||
| 2537 | return pp.comp.diag.add(.{ | ||
| 2538 | .tag = .unknown_pragma, | ||
| 2539 | .loc = pragma_name_tok.loc, | ||
| 2540 | }, pragma_name_tok.expansionSlice()); | ||
| 2541 | } | ||
| 2542 | |||
| 2543 | fn findIncludeFilenameToken( | ||
| 2544 | pp: *Preprocessor, | ||
| 2545 | first_token: RawToken, | ||
| 2546 | tokenizer: *Tokenizer, | ||
| 2547 | trailing_token_behavior: enum { ignore_trailing_tokens, expect_nl_eof }, | ||
| 2548 | ) !Token { | ||
| 2549 | const start = pp.tokens.len; | ||
| 2550 | defer pp.tokens.len = start; | ||
| 2551 | var first = first_token; | ||
| 2552 | |||
| 2553 | if (first.id == .angle_bracket_left) to_end: { | ||
| 2554 | // The tokenizer does not handle <foo> include strings so do it here. | ||
| 2555 | while (tokenizer.index < tokenizer.buf.len) : (tokenizer.index += 1) { | ||
| 2556 | switch (tokenizer.buf[tokenizer.index]) { | ||
| 2557 | '>' => { | ||
| 2558 | tokenizer.index += 1; | ||
| 2559 | first.end = tokenizer.index; | ||
| 2560 | first.id = .macro_string; | ||
| 2561 | break :to_end; | ||
| 2562 | }, | ||
| 2563 | '\n' => break, | ||
| 2564 | else => {}, | ||
| 2565 | } | ||
| 2566 | } | ||
| 2567 | try pp.comp.diag.add(.{ | ||
| 2568 | .tag = .header_str_closing, | ||
| 2569 | .loc = .{ .id = first.source, .byte_offset = tokenizer.index, .line = first.line }, | ||
| 2570 | }, &.{}); | ||
| 2571 | try pp.err(first, .header_str_match); | ||
| 2572 | } | ||
| 2573 | // Try to expand if the argument is a macro. | ||
| 2574 | try pp.expandMacro(tokenizer, first); | ||
| 2575 | |||
| 2576 | // Check that we actually got a string. | ||
| 2577 | const filename_tok = pp.tokens.get(start); | ||
| 2578 | switch (filename_tok.id) { | ||
| 2579 | .string_literal, .macro_string => {}, | ||
| 2580 | else => { | ||
| 2581 | try pp.err(first, .expected_filename); | ||
| 2582 | try pp.expectNl(tokenizer); | ||
| 2583 | return error.InvalidInclude; | ||
| 2584 | }, | ||
| 2585 | } | ||
| 2586 | switch (trailing_token_behavior) { | ||
| 2587 | .expect_nl_eof => { | ||
| 2588 | // Error on extra tokens. | ||
| 2589 | const nl = tokenizer.nextNoWS(); | ||
| 2590 | if ((nl.id != .nl and nl.id != .eof) or pp.tokens.len > start + 1) { | ||
| 2591 | skipToNl(tokenizer); | ||
| 2592 | try pp.err(first, .extra_tokens_directive_end); | ||
| 2593 | } | ||
| 2594 | }, | ||
| 2595 | .ignore_trailing_tokens => {}, | ||
| 2596 | } | ||
| 2597 | return filename_tok; | ||
| 2598 | } | ||
| 2599 | |||
| 2600 | fn findIncludeSource(pp: *Preprocessor, tokenizer: *Tokenizer, first: RawToken, which: Compilation.WhichInclude) !Source { | ||
| 2601 | const filename_tok = try pp.findIncludeFilenameToken(first, tokenizer, .expect_nl_eof); | ||
| 2602 | |||
| 2603 | // Check for empty filename. | ||
| 2604 | const tok_slice = pp.expandedSliceExtra(filename_tok, .single_macro_ws); | ||
| 2605 | if (tok_slice.len < 3) { | ||
| 2606 | try pp.err(first, .empty_filename); | ||
| 2607 | return error.InvalidInclude; | ||
| 2608 | } | ||
| 2609 | |||
| 2610 | // Find the file. | ||
| 2611 | const filename = tok_slice[1 .. tok_slice.len - 1]; | ||
| 2612 | const include_type: Compilation.IncludeType = switch (filename_tok.id) { | ||
| 2613 | .string_literal => .quotes, | ||
| 2614 | .macro_string => .angle_brackets, | ||
| 2615 | else => unreachable, | ||
| 2616 | }; | ||
| 2617 | |||
| 2618 | return (try pp.comp.findInclude(filename, first, include_type, which)) orelse | ||
| 2619 | pp.fatal(first, "'{s}' not found", .{filename}); | ||
| 2620 | } | ||
| 2621 | |||
| 2622 | fn printLinemarker( | ||
| 2623 | pp: *Preprocessor, | ||
| 2624 | w: anytype, | ||
| 2625 | line_no: u32, | ||
| 2626 | source: Source, | ||
| 2627 | start_resume: enum(u8) { start, @"resume", none }, | ||
| 2628 | ) !void { | ||
| 2629 | try w.writeByte('#'); | ||
| 2630 | if (pp.linemarkers == .line_directives) try w.writeAll("line"); | ||
| 2631 | // line_no is 0 indexed | ||
| 2632 | try w.print(" {d} \"{s}\"", .{ line_no + 1, source.path }); | ||
| 2633 | if (pp.linemarkers == .numeric_directives) { | ||
| 2634 | switch (start_resume) { | ||
| 2635 | .none => {}, | ||
| 2636 | .start => try w.writeAll(" 1"), | ||
| 2637 | .@"resume" => try w.writeAll(" 2"), | ||
| 2638 | } | ||
| 2639 | switch (source.kind) { | ||
| 2640 | .user => {}, | ||
| 2641 | .system => try w.writeAll(" 3"), | ||
| 2642 | .extern_c_system => try w.writeAll(" 3 4"), | ||
| 2643 | } | ||
| 2644 | } | ||
| 2645 | try w.writeByte('\n'); | ||
| 2646 | } | ||
| 2647 | |||
| 2648 | // After how many empty lines are needed to replace them with linemarkers. | ||
| 2649 | const collapse_newlines = 8; | ||
| 2650 | |||
| 2651 | /// Pretty print tokens and try to preserve whitespace. | ||
| 2652 | pub fn prettyPrintTokens(pp: *Preprocessor, w: anytype) !void { | ||
| 2653 | const tok_ids = pp.tokens.items(.id); | ||
| 2654 | |||
| 2655 | var i: u32 = 0; | ||
| 2656 | var last_nl = true; | ||
| 2657 | outer: while (true) : (i += 1) { | ||
| 2658 | var cur: Token = pp.tokens.get(i); | ||
| 2659 | switch (cur.id) { | ||
| 2660 | .eof => { | ||
| 2661 | if (!last_nl) try w.writeByte('\n'); | ||
| 2662 | return; | ||
| 2663 | }, | ||
| 2664 | .nl => { | ||
| 2665 | var newlines: u32 = 0; | ||
| 2666 | for (tok_ids[i..], i..) |id, j| { | ||
| 2667 | if (id == .nl) { | ||
| 2668 | newlines += 1; | ||
| 2669 | } else if (id == .eof) { | ||
| 2670 | if (!last_nl) try w.writeByte('\n'); | ||
| 2671 | return; | ||
| 2672 | } else if (id != .whitespace) { | ||
| 2673 | if (pp.linemarkers == .none) { | ||
| 2674 | if (newlines < 2) break; | ||
| 2675 | } else if (newlines < collapse_newlines) { | ||
| 2676 | break; | ||
| 2677 | } | ||
| 2678 | |||
| 2679 | i = @intCast((j - 1) - @intFromBool(tok_ids[j - 1] == .whitespace)); | ||
| 2680 | if (!last_nl) try w.writeAll("\n"); | ||
| 2681 | if (pp.linemarkers != .none) { | ||
| 2682 | const next = pp.tokens.get(i); | ||
| 2683 | const source = pp.comp.getSource(next.loc.id); | ||
| 2684 | const line_col = source.lineCol(next.loc); | ||
| 2685 | try pp.printLinemarker(w, line_col.line_no, source, .none); | ||
| 2686 | last_nl = true; | ||
| 2687 | } | ||
| 2688 | continue :outer; | ||
| 2689 | } | ||
| 2690 | } | ||
| 2691 | last_nl = true; | ||
| 2692 | try w.writeAll("\n"); | ||
| 2693 | }, | ||
| 2694 | .keyword_pragma => { | ||
| 2695 | const pragma_name = pp.expandedSlice(pp.tokens.get(i + 1)); | ||
| 2696 | const end_idx = mem.indexOfScalarPos(Token.Id, tok_ids, i, .nl) orelse i + 1; | ||
| 2697 | const pragma_len = @as(u32, @intCast(end_idx)) - i; | ||
| 2698 | |||
| 2699 | if (pp.comp.getPragma(pragma_name)) |prag| { | ||
| 2700 | if (!prag.shouldPreserveTokens(pp, i + 1)) { | ||
| 2701 | try w.writeByte('\n'); | ||
| 2702 | i += pragma_len; | ||
| 2703 | cur = pp.tokens.get(i); | ||
| 2704 | continue; | ||
| 2705 | } | ||
| 2706 | } | ||
| 2707 | try w.writeAll("#pragma"); | ||
| 2708 | i += 1; | ||
| 2709 | while (true) : (i += 1) { | ||
| 2710 | cur = pp.tokens.get(i); | ||
| 2711 | if (cur.id == .nl) { | ||
| 2712 | try w.writeByte('\n'); | ||
| 2713 | last_nl = true; | ||
| 2714 | break; | ||
| 2715 | } | ||
| 2716 | try w.writeByte(' '); | ||
| 2717 | const slice = pp.expandedSlice(cur); | ||
| 2718 | try w.writeAll(slice); | ||
| 2719 | } | ||
| 2720 | }, | ||
| 2721 | .whitespace => { | ||
| 2722 | var slice = pp.expandedSlice(cur); | ||
| 2723 | while (mem.indexOfScalar(u8, slice, '\n')) |some| { | ||
| 2724 | if (pp.linemarkers != .none) try w.writeByte('\n'); | ||
| 2725 | slice = slice[some + 1 ..]; | ||
| 2726 | } | ||
| 2727 | for (slice) |_| try w.writeByte(' '); | ||
| 2728 | last_nl = false; | ||
| 2729 | }, | ||
| 2730 | .include_start => { | ||
| 2731 | const source = pp.comp.getSource(cur.loc.id); | ||
| 2732 | |||
| 2733 | try pp.printLinemarker(w, 0, source, .start); | ||
| 2734 | last_nl = true; | ||
| 2735 | }, | ||
| 2736 | .include_resume => { | ||
| 2737 | const source = pp.comp.getSource(cur.loc.id); | ||
| 2738 | const line_col = source.lineCol(cur.loc); | ||
| 2739 | if (!last_nl) try w.writeAll("\n"); | ||
| 2740 | |||
| 2741 | try pp.printLinemarker(w, line_col.line_no, source, .@"resume"); | ||
| 2742 | last_nl = true; | ||
| 2743 | }, | ||
| 2744 | else => { | ||
| 2745 | const slice = pp.expandedSlice(cur); | ||
| 2746 | try w.writeAll(slice); | ||
| 2747 | last_nl = false; | ||
| 2748 | }, | ||
| 2749 | } | ||
| 2750 | } | ||
| 2751 | } | ||
| 2752 | |||
| 2753 | test "Preserve pragma tokens sometimes" { | ||
| 2754 | const allocator = std.testing.allocator; | ||
| 2755 | const Test = struct { | ||
| 2756 | fn runPreprocessor(source_text: []const u8) ![]const u8 { | ||
| 2757 | var buf = std.ArrayList(u8).init(allocator); | ||
| 2758 | defer buf.deinit(); | ||
| 2759 | |||
| 2760 | var comp = Compilation.init(allocator); | ||
| 2761 | defer comp.deinit(); | ||
| 2762 | |||
| 2763 | try comp.addDefaultPragmaHandlers(); | ||
| 2764 | |||
| 2765 | var pp = Preprocessor.init(&comp); | ||
| 2766 | defer pp.deinit(); | ||
| 2767 | |||
| 2768 | pp.preserve_whitespace = true; | ||
| 2769 | assert(pp.linemarkers == .none); | ||
| 2770 | |||
| 2771 | const test_runner_macros = try comp.addSourceFromBuffer("<test_runner>", source_text); | ||
| 2772 | const eof = try pp.preprocess(test_runner_macros); | ||
| 2773 | try pp.tokens.append(pp.gpa, eof); | ||
| 2774 | try pp.prettyPrintTokens(buf.writer()); | ||
| 2775 | return allocator.dupe(u8, buf.items); | ||
| 2776 | } | ||
| 2777 | |||
| 2778 | fn check(source_text: []const u8, expected: []const u8) !void { | ||
| 2779 | const output = try runPreprocessor(source_text); | ||
| 2780 | defer allocator.free(output); | ||
| 2781 | |||
| 2782 | try std.testing.expectEqualStrings(expected, output); | ||
| 2783 | } | ||
| 2784 | }; | ||
| 2785 | const preserve_gcc_diagnostic = | ||
| 2786 | \\#pragma GCC diagnostic error "-Wnewline-eof" | ||
| 2787 | \\#pragma GCC warning error "-Wnewline-eof" | ||
| 2788 | \\int x; | ||
| 2789 | \\#pragma GCC ignored error "-Wnewline-eof" | ||
| 2790 | \\ | ||
| 2791 | ; | ||
| 2792 | try Test.check(preserve_gcc_diagnostic, preserve_gcc_diagnostic); | ||
| 2793 | |||
| 2794 | const omit_once = | ||
| 2795 | \\#pragma once | ||
| 2796 | \\int x; | ||
| 2797 | \\#pragma once | ||
| 2798 | \\ | ||
| 2799 | ; | ||
| 2800 | // TODO should only be one newline afterwards when emulating clang | ||
| 2801 | try Test.check(omit_once, "\nint x;\n\n"); | ||
| 2802 | |||
| 2803 | const omit_poison = | ||
| 2804 | \\#pragma GCC poison foobar | ||
| 2805 | \\ | ||
| 2806 | ; | ||
| 2807 | try Test.check(omit_poison, "\n"); | ||
| 2808 | } | ||
| 2809 | |||
| 2810 | test "destringify" { | ||
| 2811 | const allocator = std.testing.allocator; | ||
| 2812 | const Test = struct { | ||
| 2813 | fn testDestringify(pp: *Preprocessor, stringified: []const u8, destringified: []const u8) !void { | ||
| 2814 | pp.char_buf.clearRetainingCapacity(); | ||
| 2815 | try pp.char_buf.ensureUnusedCapacity(stringified.len); | ||
| 2816 | pp.destringify(stringified); | ||
| 2817 | try std.testing.expectEqualStrings(destringified, pp.char_buf.items); | ||
| 2818 | } | ||
| 2819 | }; | ||
| 2820 | var comp = Compilation.init(allocator); | ||
| 2821 | defer comp.deinit(); | ||
| 2822 | var pp = Preprocessor.init(&comp); | ||
| 2823 | defer pp.deinit(); | ||
| 2824 | |||
| 2825 | try Test.testDestringify(&pp, "hello\tworld\n", "hello\tworld\n"); | ||
| 2826 | try Test.testDestringify(&pp, | ||
| 2827 | \\ \"FOO BAR BAZ\" | ||
| 2828 | , | ||
| 2829 | \\ "FOO BAR BAZ" | ||
| 2830 | ); | ||
| 2831 | try Test.testDestringify(&pp, | ||
| 2832 | \\ \\t\\n | ||
| 2833 | \\ | ||
| 2834 | , | ||
| 2835 | \\ \t\n | ||
| 2836 | \\ | ||
| 2837 | ); | ||
| 2838 | } | ||
| 2839 | |||
| 2840 | test "Include guards" { | ||
| 2841 | const Test = struct { | ||
| 2842 | /// This is here so that when #elifdef / #elifndef are added we don't forget | ||
| 2843 | /// to test that they don't accidentally break include guard detection | ||
| 2844 | fn pairsWithIfndef(tok_id: RawToken.Id) bool { | ||
| 2845 | return switch (tok_id) { | ||
| 2846 | .keyword_elif, | ||
| 2847 | .keyword_elifdef, | ||
| 2848 | .keyword_elifndef, | ||
| 2849 | .keyword_else, | ||
| 2850 | => true, | ||
| 2851 | |||
| 2852 | .keyword_include, | ||
| 2853 | .keyword_include_next, | ||
| 2854 | .keyword_embed, | ||
| 2855 | .keyword_define, | ||
| 2856 | .keyword_defined, | ||
| 2857 | .keyword_undef, | ||
| 2858 | .keyword_ifdef, | ||
| 2859 | .keyword_ifndef, | ||
| 2860 | .keyword_error, | ||
| 2861 | .keyword_warning, | ||
| 2862 | .keyword_pragma, | ||
| 2863 | .keyword_line, | ||
| 2864 | .keyword_endif, | ||
| 2865 | => false, | ||
| 2866 | else => unreachable, | ||
| 2867 | }; | ||
| 2868 | } | ||
| 2869 | |||
| 2870 | fn skippable(tok_id: RawToken.Id) bool { | ||
| 2871 | return switch (tok_id) { | ||
| 2872 | .keyword_defined, .keyword_va_args, .keyword_endif => true, | ||
| 2873 | else => false, | ||
| 2874 | }; | ||
| 2875 | } | ||
| 2876 | |||
| 2877 | fn testIncludeGuard(allocator: std.mem.Allocator, comptime template: []const u8, tok_id: RawToken.Id, expected_guards: u32) !void { | ||
| 2878 | var comp = Compilation.init(allocator); | ||
| 2879 | defer comp.deinit(); | ||
| 2880 | var pp = Preprocessor.init(&comp); | ||
| 2881 | defer pp.deinit(); | ||
| 2882 | |||
| 2883 | const path = try std.fs.path.join(allocator, &.{ ".", "bar.h" }); | ||
| 2884 | defer allocator.free(path); | ||
| 2885 | |||
| 2886 | _ = try comp.addSourceFromBuffer(path, "int bar = 5;\n"); | ||
| 2887 | |||
| 2888 | var buf = std.ArrayList(u8).init(allocator); | ||
| 2889 | defer buf.deinit(); | ||
| 2890 | |||
| 2891 | var writer = buf.writer(); | ||
| 2892 | switch (tok_id) { | ||
| 2893 | .keyword_include, .keyword_include_next => try writer.print(template, .{ tok_id.lexeme().?, " \"bar.h\"" }), | ||
| 2894 | .keyword_define, .keyword_undef => try writer.print(template, .{ tok_id.lexeme().?, " BAR" }), | ||
| 2895 | .keyword_ifndef, | ||
| 2896 | .keyword_ifdef, | ||
| 2897 | .keyword_elifdef, | ||
| 2898 | .keyword_elifndef, | ||
| 2899 | => try writer.print(template, .{ tok_id.lexeme().?, " BAR\n#endif" }), | ||
| 2900 | else => try writer.print(template, .{ tok_id.lexeme().?, "" }), | ||
| 2901 | } | ||
| 2902 | const source = try comp.addSourceFromBuffer("test.h", buf.items); | ||
| 2903 | _ = try pp.preprocess(source); | ||
| 2904 | |||
| 2905 | try std.testing.expectEqual(expected_guards, pp.include_guards.count()); | ||
| 2906 | } | ||
| 2907 | }; | ||
| 2908 | const tags = std.meta.tags(RawToken.Id); | ||
| 2909 | for (tags) |tag| { | ||
| 2910 | if (Test.skippable(tag)) continue; | ||
| 2911 | var copy = tag; | ||
| 2912 | copy.simplifyMacroKeyword(); | ||
| 2913 | if (copy != tag or tag == .keyword_else) { | ||
| 2914 | const inside_ifndef_template = | ||
| 2915 | \\//Leading comment (should be ignored) | ||
| 2916 | \\ | ||
| 2917 | \\#ifndef FOO | ||
| 2918 | \\#{s}{s} | ||
| 2919 | \\#endif | ||
| 2920 | ; | ||
| 2921 | const expected_guards: u32 = if (Test.pairsWithIfndef(tag)) 0 else 1; | ||
| 2922 | try Test.testIncludeGuard(std.testing.allocator, inside_ifndef_template, tag, expected_guards); | ||
| 2923 | |||
| 2924 | const outside_ifndef_template = | ||
| 2925 | \\#ifndef FOO | ||
| 2926 | \\#endif | ||
| 2927 | \\#{s}{s} | ||
| 2928 | ; | ||
| 2929 | try Test.testIncludeGuard(std.testing.allocator, outside_ifndef_template, tag, 0); | ||
| 2930 | } | ||
| 2931 | } | ||
| 2932 | } | ||
deps/aro/README.md+3| ... | @@ -1,4 +1,7 @@ | ... | @@ -1,4 +1,7 @@ |
| 1 | <img src="https://aro.vexu.eu/aro-logo.svg" alt="Aro" width="120px"/> | ||
| 2 | |||
| 1 | # Aro | 3 | # Aro |
| 4 | |||
| 2 | A C compiler with the goal of providing fast compilation and low memory usage with good diagnostics. | 5 | A C compiler with the goal of providing fast compilation and low memory usage with good diagnostics. |
| 3 | 6 | ||
| 4 | Aro is included as an alternative C frontend in the [Zig compiler](https://github.com/ziglang/zig) | 7 | Aro is included as an alternative C frontend in the [Zig compiler](https://github.com/ziglang/zig) |
deps/aro/Source.zig deleted-126| ... | @@ -1,126 +0,0 @@ | ||
| 1 | const std = @import("std"); | ||
| 2 | const Source = @This(); | ||
| 3 | |||
| 4 | pub const Id = enum(u32) { | ||
| 5 | unused = 0, | ||
| 6 | generated = 1, | ||
| 7 | _, | ||
| 8 | }; | ||
| 9 | |||
| 10 | /// Classifies the file for line marker output in -E mode | ||
| 11 | pub const Kind = enum { | ||
| 12 | /// regular file | ||
| 13 | user, | ||
| 14 | /// Included from a system include directory | ||
| 15 | system, | ||
| 16 | /// Included from an "implicit extern C" directory | ||
| 17 | extern_c_system, | ||
| 18 | }; | ||
| 19 | |||
| 20 | pub const Location = struct { | ||
| 21 | id: Id = .unused, | ||
| 22 | byte_offset: u32 = 0, | ||
| 23 | line: u32 = 0, | ||
| 24 | |||
| 25 | pub fn eql(a: Location, b: Location) bool { | ||
| 26 | return a.id == b.id and a.byte_offset == b.byte_offset and a.line == b.line; | ||
| 27 | } | ||
| 28 | }; | ||
| 29 | |||
| 30 | path: []const u8, | ||
| 31 | buf: []const u8, | ||
| 32 | id: Id, | ||
| 33 | /// each entry represents a byte position within `buf` where a backslash+newline was deleted | ||
| 34 | /// from the original raw buffer. The same position can appear multiple times if multiple | ||
| 35 | /// consecutive splices happened. Guaranteed to be non-decreasing | ||
| 36 | splice_locs: []const u32, | ||
| 37 | kind: Kind, | ||
| 38 | |||
| 39 | /// Todo: binary search instead of scanning entire `splice_locs`. | ||
| 40 | pub fn numSplicesBefore(source: Source, byte_offset: u32) u32 { | ||
| 41 | for (source.splice_locs, 0..) |splice_offset, i| { | ||
| 42 | if (splice_offset > byte_offset) return @intCast(i); | ||
| 43 | } | ||
| 44 | return @intCast(source.splice_locs.len); | ||
| 45 | } | ||
| 46 | |||
| 47 | /// Returns the actual line number (before newline splicing) of a Location | ||
| 48 | /// This corresponds to what the user would actually see in their text editor | ||
| 49 | pub fn physicalLine(source: Source, loc: Location) u32 { | ||
| 50 | return loc.line + source.numSplicesBefore(loc.byte_offset); | ||
| 51 | } | ||
| 52 | |||
| 53 | const LineCol = struct { line: []const u8, line_no: u32, col: u32, width: u32, end_with_splice: bool }; | ||
| 54 | |||
| 55 | pub fn lineCol(source: Source, loc: Location) LineCol { | ||
| 56 | var start: usize = 0; | ||
| 57 | // find the start of the line which is either a newline or a splice | ||
| 58 | if (std.mem.lastIndexOfScalar(u8, source.buf[0..loc.byte_offset], '\n')) |some| start = some + 1; | ||
| 59 | const splice_index: u32 = for (source.splice_locs, 0..) |splice_offset, i| { | ||
| 60 | if (splice_offset > start) { | ||
| 61 | if (splice_offset < loc.byte_offset) { | ||
| 62 | start = splice_offset; | ||
| 63 | break @as(u32, @intCast(i)) + 1; | ||
| 64 | } | ||
| 65 | break @intCast(i); | ||
| 66 | } | ||
| 67 | } else @intCast(source.splice_locs.len); | ||
| 68 | var i: usize = start; | ||
| 69 | var col: u32 = 1; | ||
| 70 | var width: u32 = 0; | ||
| 71 | |||
| 72 | while (i < loc.byte_offset) : (col += 1) { // TODO this is still incorrect, but better | ||
| 73 | const len = std.unicode.utf8ByteSequenceLength(source.buf[i]) catch { | ||
| 74 | i += 1; | ||
| 75 | continue; | ||
| 76 | }; | ||
| 77 | const cp = std.unicode.utf8Decode(source.buf[i..][0..len]) catch { | ||
| 78 | i += 1; | ||
| 79 | continue; | ||
| 80 | }; | ||
| 81 | width += codepointWidth(cp); | ||
| 82 | i += len; | ||
| 83 | } | ||
| 84 | |||
| 85 | // find the end of the line which is either a newline, EOF or a splice | ||
| 86 | var nl = source.buf.len; | ||
| 87 | var end_with_splice = false; | ||
| 88 | if (std.mem.indexOfScalar(u8, source.buf[start..], '\n')) |some| nl = some + start; | ||
| 89 | if (source.splice_locs.len > splice_index and nl > source.splice_locs[splice_index] and source.splice_locs[splice_index] > start) { | ||
| 90 | end_with_splice = true; | ||
| 91 | nl = source.splice_locs[splice_index]; | ||
| 92 | } | ||
| 93 | return .{ | ||
| 94 | .line = source.buf[start..nl], | ||
| 95 | .line_no = loc.line + splice_index, | ||
| 96 | .col = col, | ||
| 97 | .width = width, | ||
| 98 | .end_with_splice = end_with_splice, | ||
| 99 | }; | ||
| 100 | } | ||
| 101 | |||
| 102 | fn codepointWidth(cp: u32) u32 { | ||
| 103 | return switch (cp) { | ||
| 104 | 0x1100...0x115F, | ||
| 105 | 0x2329, | ||
| 106 | 0x232A, | ||
| 107 | 0x2E80...0x303F, | ||
| 108 | 0x3040...0x3247, | ||
| 109 | 0x3250...0x4DBF, | ||
| 110 | 0x4E00...0xA4C6, | ||
| 111 | 0xA960...0xA97C, | ||
| 112 | 0xAC00...0xD7A3, | ||
| 113 | 0xF900...0xFAFF, | ||
| 114 | 0xFE10...0xFE19, | ||
| 115 | 0xFE30...0xFE6B, | ||
| 116 | 0xFF01...0xFF60, | ||
| 117 | 0xFFE0...0xFFE6, | ||
| 118 | 0x1B000...0x1B001, | ||
| 119 | 0x1F200...0x1F251, | ||
| 120 | 0x20000...0x3FFFD, | ||
| 121 | 0x1F300...0x1F5FF, | ||
| 122 | 0x1F900...0x1F9FF, | ||
| 123 | => 2, | ||
| 124 | else => 1, | ||
| 125 | }; | ||
| 126 | } | ||
deps/aro/StringInterner.zig deleted-78| ... | @@ -1,78 +0,0 @@ | ||
| 1 | const std = @import("std"); | ||
| 2 | const mem = std.mem; | ||
| 3 | |||
| 4 | const StringInterner = @This(); | ||
| 5 | |||
| 6 | const StringToIdMap = std.StringHashMapUnmanaged(StringId); | ||
| 7 | |||
| 8 | pub const StringId = enum(u32) { | ||
| 9 | empty, | ||
| 10 | _, | ||
| 11 | }; | ||
| 12 | |||
| 13 | pub const TypeMapper = struct { | ||
| 14 | const LookupSpeed = enum { | ||
| 15 | fast, | ||
| 16 | slow, | ||
| 17 | }; | ||
| 18 | |||
| 19 | data: union(LookupSpeed) { | ||
| 20 | fast: []const []const u8, | ||
| 21 | slow: *const StringToIdMap, | ||
| 22 | }, | ||
| 23 | |||
| 24 | pub fn lookup(self: TypeMapper, string_id: StringInterner.StringId) []const u8 { | ||
| 25 | if (string_id == .empty) return ""; | ||
| 26 | switch (self.data) { | ||
| 27 | .fast => |arr| return arr[@intFromEnum(string_id)], | ||
| 28 | .slow => |map| { | ||
| 29 | var it = map.iterator(); | ||
| 30 | while (it.next()) |entry| { | ||
| 31 | if (entry.value_ptr.* == string_id) return entry.key_ptr.*; | ||
| 32 | } | ||
| 33 | unreachable; | ||
| 34 | }, | ||
| 35 | } | ||
| 36 | } | ||
| 37 | |||
| 38 | pub fn deinit(self: TypeMapper, allocator: mem.Allocator) void { | ||
| 39 | switch (self.data) { | ||
| 40 | .slow => {}, | ||
| 41 | .fast => |arr| allocator.free(arr), | ||
| 42 | } | ||
| 43 | } | ||
| 44 | }; | ||
| 45 | |||
| 46 | string_table: StringToIdMap = .{}, | ||
| 47 | next_id: StringId = @enumFromInt(@intFromEnum(StringId.empty) + 1), | ||
| 48 | |||
| 49 | pub fn deinit(self: *StringInterner, allocator: mem.Allocator) void { | ||
| 50 | self.string_table.deinit(allocator); | ||
| 51 | } | ||
| 52 | |||
| 53 | pub fn intern(self: *StringInterner, allocator: mem.Allocator, str: []const u8) !StringId { | ||
| 54 | if (str.len == 0) return .empty; | ||
| 55 | |||
| 56 | const gop = try self.string_table.getOrPut(allocator, str); | ||
| 57 | if (gop.found_existing) return gop.value_ptr.*; | ||
| 58 | |||
| 59 | defer self.next_id = @enumFromInt(@intFromEnum(self.next_id) + 1); | ||
| 60 | gop.value_ptr.* = self.next_id; | ||
| 61 | return self.next_id; | ||
| 62 | } | ||
| 63 | |||
| 64 | /// deinit for the returned TypeMapper is a no-op and does not need to be called | ||
| 65 | pub fn getSlowTypeMapper(self: *const StringInterner) TypeMapper { | ||
| 66 | return TypeMapper{ .data = .{ .slow = &self.string_table } }; | ||
| 67 | } | ||
| 68 | |||
| 69 | /// Caller must call `deinit` on the returned TypeMapper | ||
| 70 | pub fn getFastTypeMapper(self: *const StringInterner, allocator: mem.Allocator) !TypeMapper { | ||
| 71 | var strings = try allocator.alloc([]const u8, @intFromEnum(self.next_id)); | ||
| 72 | var it = self.string_table.iterator(); | ||
| 73 | strings[0] = ""; | ||
| 74 | while (it.next()) |entry| { | ||
| 75 | strings[@intFromEnum(entry.value_ptr.*)] = entry.key_ptr.*; | ||
| 76 | } | ||
| 77 | return TypeMapper{ .data = .{ .fast = strings } }; | ||
| 78 | } | ||
deps/aro/SymbolStack.zig deleted-375| ... | @@ -1,375 +0,0 @@ | ||
| 1 | const std = @import("std"); | ||
| 2 | const mem = std.mem; | ||
| 3 | const Allocator = mem.Allocator; | ||
| 4 | const assert = std.debug.assert; | ||
| 5 | const Tree = @import("Tree.zig"); | ||
| 6 | const Token = Tree.Token; | ||
| 7 | const TokenIndex = Tree.TokenIndex; | ||
| 8 | const NodeIndex = Tree.NodeIndex; | ||
| 9 | const Type = @import("Type.zig"); | ||
| 10 | const Parser = @import("Parser.zig"); | ||
| 11 | const Value = @import("Value.zig"); | ||
| 12 | const StringId = @import("StringInterner.zig").StringId; | ||
| 13 | |||
| 14 | const SymbolStack = @This(); | ||
| 15 | |||
| 16 | pub const Symbol = struct { | ||
| 17 | name: StringId, | ||
| 18 | ty: Type, | ||
| 19 | tok: TokenIndex, | ||
| 20 | node: NodeIndex = .none, | ||
| 21 | kind: Kind, | ||
| 22 | val: Value, | ||
| 23 | }; | ||
| 24 | |||
| 25 | pub const Kind = enum { | ||
| 26 | typedef, | ||
| 27 | @"struct", | ||
| 28 | @"union", | ||
| 29 | @"enum", | ||
| 30 | decl, | ||
| 31 | def, | ||
| 32 | enumeration, | ||
| 33 | constexpr, | ||
| 34 | }; | ||
| 35 | |||
| 36 | syms: std.MultiArrayList(Symbol) = .{}, | ||
| 37 | scopes: std.ArrayListUnmanaged(u32) = .{}, | ||
| 38 | |||
| 39 | pub fn deinit(s: *SymbolStack, gpa: Allocator) void { | ||
| 40 | s.syms.deinit(gpa); | ||
| 41 | s.scopes.deinit(gpa); | ||
| 42 | s.* = undefined; | ||
| 43 | } | ||
| 44 | |||
| 45 | pub fn scopeEnd(s: SymbolStack) u32 { | ||
| 46 | if (s.scopes.items.len == 0) return 0; | ||
| 47 | return s.scopes.items[s.scopes.items.len - 1]; | ||
| 48 | } | ||
| 49 | |||
| 50 | pub fn pushScope(s: *SymbolStack, p: *Parser) !void { | ||
| 51 | try s.scopes.append(p.gpa, @intCast(s.syms.len)); | ||
| 52 | } | ||
| 53 | |||
| 54 | pub fn popScope(s: *SymbolStack) void { | ||
| 55 | s.syms.len = s.scopes.pop(); | ||
| 56 | } | ||
| 57 | |||
| 58 | pub fn findTypedef(s: *SymbolStack, p: *Parser, name: StringId, name_tok: TokenIndex, no_type_yet: bool) !?Symbol { | ||
| 59 | const kinds = s.syms.items(.kind); | ||
| 60 | const names = s.syms.items(.name); | ||
| 61 | var i = s.syms.len; | ||
| 62 | while (i > 0) { | ||
| 63 | i -= 1; | ||
| 64 | switch (kinds[i]) { | ||
| 65 | .typedef => if (names[i] == name) return s.syms.get(i), | ||
| 66 | .@"struct" => if (names[i] == name) { | ||
| 67 | if (no_type_yet) return null; | ||
| 68 | try p.errStr(.must_use_struct, name_tok, p.tokSlice(name_tok)); | ||
| 69 | return s.syms.get(i); | ||
| 70 | }, | ||
| 71 | .@"union" => if (names[i] == name) { | ||
| 72 | if (no_type_yet) return null; | ||
| 73 | try p.errStr(.must_use_union, name_tok, p.tokSlice(name_tok)); | ||
| 74 | return s.syms.get(i); | ||
| 75 | }, | ||
| 76 | .@"enum" => if (names[i] == name) { | ||
| 77 | if (no_type_yet) return null; | ||
| 78 | try p.errStr(.must_use_enum, name_tok, p.tokSlice(name_tok)); | ||
| 79 | return s.syms.get(i); | ||
| 80 | }, | ||
| 81 | .def, .decl, .constexpr => if (names[i] == name) return null, | ||
| 82 | else => {}, | ||
| 83 | } | ||
| 84 | } | ||
| 85 | return null; | ||
| 86 | } | ||
| 87 | |||
| 88 | pub fn findSymbol(s: *SymbolStack, name: StringId) ?Symbol { | ||
| 89 | const kinds = s.syms.items(.kind); | ||
| 90 | const names = s.syms.items(.name); | ||
| 91 | var i = s.syms.len; | ||
| 92 | while (i > 0) { | ||
| 93 | i -= 1; | ||
| 94 | switch (kinds[i]) { | ||
| 95 | .def, .decl, .enumeration, .constexpr => if (names[i] == name) return s.syms.get(i), | ||
| 96 | else => {}, | ||
| 97 | } | ||
| 98 | } | ||
| 99 | return null; | ||
| 100 | } | ||
| 101 | |||
| 102 | pub fn findTag( | ||
| 103 | s: *SymbolStack, | ||
| 104 | p: *Parser, | ||
| 105 | name: StringId, | ||
| 106 | kind: Token.Id, | ||
| 107 | name_tok: TokenIndex, | ||
| 108 | next_tok_id: Token.Id, | ||
| 109 | ) !?Symbol { | ||
| 110 | const kinds = s.syms.items(.kind); | ||
| 111 | const names = s.syms.items(.name); | ||
| 112 | // `tag Name;` should always result in a new type if in a new scope. | ||
| 113 | const end = if (next_tok_id == .semicolon) s.scopeEnd() else 0; | ||
| 114 | var i = s.syms.len; | ||
| 115 | while (i > end) { | ||
| 116 | i -= 1; | ||
| 117 | switch (kinds[i]) { | ||
| 118 | .@"enum" => if (names[i] == name) { | ||
| 119 | if (kind == .keyword_enum) return s.syms.get(i); | ||
| 120 | break; | ||
| 121 | }, | ||
| 122 | .@"struct" => if (names[i] == name) { | ||
| 123 | if (kind == .keyword_struct) return s.syms.get(i); | ||
| 124 | break; | ||
| 125 | }, | ||
| 126 | .@"union" => if (names[i] == name) { | ||
| 127 | if (kind == .keyword_union) return s.syms.get(i); | ||
| 128 | break; | ||
| 129 | }, | ||
| 130 | else => {}, | ||
| 131 | } | ||
| 132 | } else return null; | ||
| 133 | |||
| 134 | if (i < s.scopeEnd()) return null; | ||
| 135 | try p.errStr(.wrong_tag, name_tok, p.tokSlice(name_tok)); | ||
| 136 | try p.errTok(.previous_definition, s.syms.items(.tok)[i]); | ||
| 137 | return null; | ||
| 138 | } | ||
| 139 | |||
| 140 | pub fn defineTypedef( | ||
| 141 | s: *SymbolStack, | ||
| 142 | p: *Parser, | ||
| 143 | name: StringId, | ||
| 144 | ty: Type, | ||
| 145 | tok: TokenIndex, | ||
| 146 | node: NodeIndex, | ||
| 147 | ) !void { | ||
| 148 | const kinds = s.syms.items(.kind); | ||
| 149 | const names = s.syms.items(.name); | ||
| 150 | const end = s.scopeEnd(); | ||
| 151 | var i = s.syms.len; | ||
| 152 | while (i > end) { | ||
| 153 | i -= 1; | ||
| 154 | switch (kinds[i]) { | ||
| 155 | .typedef => if (names[i] == name) { | ||
| 156 | const prev_ty = s.syms.items(.ty)[i]; | ||
| 157 | if (ty.eql(prev_ty, p.comp, true)) break; | ||
| 158 | try p.errStr(.redefinition_of_typedef, tok, try p.typePairStrExtra(ty, " vs ", prev_ty)); | ||
| 159 | const previous_tok = s.syms.items(.tok)[i]; | ||
| 160 | if (previous_tok != 0) try p.errTok(.previous_definition, previous_tok); | ||
| 161 | break; | ||
| 162 | }, | ||
| 163 | else => {}, | ||
| 164 | } | ||
| 165 | } | ||
| 166 | try s.syms.append(p.gpa, .{ | ||
| 167 | .kind = .typedef, | ||
| 168 | .name = name, | ||
| 169 | .tok = tok, | ||
| 170 | .ty = ty, | ||
| 171 | .node = node, | ||
| 172 | .val = .{}, | ||
| 173 | }); | ||
| 174 | } | ||
| 175 | |||
| 176 | pub fn defineSymbol( | ||
| 177 | s: *SymbolStack, | ||
| 178 | p: *Parser, | ||
| 179 | name: StringId, | ||
| 180 | ty: Type, | ||
| 181 | tok: TokenIndex, | ||
| 182 | node: NodeIndex, | ||
| 183 | val: Value, | ||
| 184 | constexpr: bool, | ||
| 185 | ) !void { | ||
| 186 | const kinds = s.syms.items(.kind); | ||
| 187 | const names = s.syms.items(.name); | ||
| 188 | const end = s.scopeEnd(); | ||
| 189 | var i = s.syms.len; | ||
| 190 | while (i > end) { | ||
| 191 | i -= 1; | ||
| 192 | switch (kinds[i]) { | ||
| 193 | .enumeration => if (names[i] == name) { | ||
| 194 | try p.errStr(.redefinition_different_sym, tok, p.tokSlice(tok)); | ||
| 195 | try p.errTok(.previous_definition, s.syms.items(.tok)[i]); | ||
| 196 | break; | ||
| 197 | }, | ||
| 198 | .decl => if (names[i] == name) { | ||
| 199 | const prev_ty = s.syms.items(.ty)[i]; | ||
| 200 | if (!ty.eql(prev_ty, p.comp, true)) { | ||
| 201 | try p.errStr(.redefinition_incompatible, tok, p.tokSlice(tok)); | ||
| 202 | try p.errTok(.previous_definition, s.syms.items(.tok)[i]); | ||
| 203 | } | ||
| 204 | break; | ||
| 205 | }, | ||
| 206 | .def, .constexpr => if (names[i] == name) { | ||
| 207 | try p.errStr(.redefinition, tok, p.tokSlice(tok)); | ||
| 208 | try p.errTok(.previous_definition, s.syms.items(.tok)[i]); | ||
| 209 | break; | ||
| 210 | }, | ||
| 211 | else => {}, | ||
| 212 | } | ||
| 213 | } | ||
| 214 | try s.syms.append(p.gpa, .{ | ||
| 215 | .kind = if (constexpr) .constexpr else .def, | ||
| 216 | .name = name, | ||
| 217 | .tok = tok, | ||
| 218 | .ty = ty, | ||
| 219 | .node = node, | ||
| 220 | .val = val, | ||
| 221 | }); | ||
| 222 | } | ||
| 223 | |||
| 224 | pub fn declareSymbol( | ||
| 225 | s: *SymbolStack, | ||
| 226 | p: *Parser, | ||
| 227 | name: StringId, | ||
| 228 | ty: Type, | ||
| 229 | tok: TokenIndex, | ||
| 230 | node: NodeIndex, | ||
| 231 | ) !void { | ||
| 232 | const kinds = s.syms.items(.kind); | ||
| 233 | const names = s.syms.items(.name); | ||
| 234 | const end = s.scopeEnd(); | ||
| 235 | var i = s.syms.len; | ||
| 236 | while (i > end) { | ||
| 237 | i -= 1; | ||
| 238 | switch (kinds[i]) { | ||
| 239 | .enumeration => if (names[i] == name) { | ||
| 240 | try p.errStr(.redefinition_different_sym, tok, p.tokSlice(tok)); | ||
| 241 | try p.errTok(.previous_definition, s.syms.items(.tok)[i]); | ||
| 242 | break; | ||
| 243 | }, | ||
| 244 | .decl => if (names[i] == name) { | ||
| 245 | const prev_ty = s.syms.items(.ty)[i]; | ||
| 246 | if (!ty.eql(prev_ty, p.comp, true)) { | ||
| 247 | try p.errStr(.redefinition_incompatible, tok, p.tokSlice(tok)); | ||
| 248 | try p.errTok(.previous_definition, s.syms.items(.tok)[i]); | ||
| 249 | } | ||
| 250 | break; | ||
| 251 | }, | ||
| 252 | .def, .constexpr => if (names[i] == name) { | ||
| 253 | const prev_ty = s.syms.items(.ty)[i]; | ||
| 254 | if (!ty.eql(prev_ty, p.comp, true)) { | ||
| 255 | try p.errStr(.redefinition_incompatible, tok, p.tokSlice(tok)); | ||
| 256 | try p.errTok(.previous_definition, s.syms.items(.tok)[i]); | ||
| 257 | break; | ||
| 258 | } | ||
| 259 | return; | ||
| 260 | }, | ||
| 261 | else => {}, | ||
| 262 | } | ||
| 263 | } | ||
| 264 | try s.syms.append(p.gpa, .{ | ||
| 265 | .kind = .decl, | ||
| 266 | .name = name, | ||
| 267 | .tok = tok, | ||
| 268 | .ty = ty, | ||
| 269 | .node = node, | ||
| 270 | .val = .{}, | ||
| 271 | }); | ||
| 272 | } | ||
| 273 | |||
| 274 | pub fn defineParam(s: *SymbolStack, p: *Parser, name: StringId, ty: Type, tok: TokenIndex) !void { | ||
| 275 | const kinds = s.syms.items(.kind); | ||
| 276 | const names = s.syms.items(.name); | ||
| 277 | const end = s.scopeEnd(); | ||
| 278 | var i = s.syms.len; | ||
| 279 | while (i > end) { | ||
| 280 | i -= 1; | ||
| 281 | switch (kinds[i]) { | ||
| 282 | .enumeration, .decl, .def, .constexpr => if (names[i] == name) { | ||
| 283 | try p.errStr(.redefinition_of_parameter, tok, p.tokSlice(tok)); | ||
| 284 | try p.errTok(.previous_definition, s.syms.items(.tok)[i]); | ||
| 285 | break; | ||
| 286 | }, | ||
| 287 | else => {}, | ||
| 288 | } | ||
| 289 | } | ||
| 290 | if (ty.is(.fp16) and !p.comp.hasHalfPrecisionFloatABI()) { | ||
| 291 | try p.errStr(.suggest_pointer_for_invalid_fp16, tok, "parameters"); | ||
| 292 | } | ||
| 293 | try s.syms.append(p.gpa, .{ | ||
| 294 | .kind = .def, | ||
| 295 | .name = name, | ||
| 296 | .tok = tok, | ||
| 297 | .ty = ty, | ||
| 298 | .val = .{}, | ||
| 299 | }); | ||
| 300 | } | ||
| 301 | |||
| 302 | pub fn defineTag( | ||
| 303 | s: *SymbolStack, | ||
| 304 | p: *Parser, | ||
| 305 | name: StringId, | ||
| 306 | kind: Token.Id, | ||
| 307 | tok: TokenIndex, | ||
| 308 | ) !?Symbol { | ||
| 309 | const kinds = s.syms.items(.kind); | ||
| 310 | const names = s.syms.items(.name); | ||
| 311 | const end = s.scopeEnd(); | ||
| 312 | var i = s.syms.len; | ||
| 313 | while (i > end) { | ||
| 314 | i -= 1; | ||
| 315 | switch (kinds[i]) { | ||
| 316 | .@"enum" => if (names[i] == name) { | ||
| 317 | if (kind == .keyword_enum) return s.syms.get(i); | ||
| 318 | try p.errStr(.wrong_tag, tok, p.tokSlice(tok)); | ||
| 319 | try p.errTok(.previous_definition, s.syms.items(.tok)[i]); | ||
| 320 | return null; | ||
| 321 | }, | ||
| 322 | .@"struct" => if (names[i] == name) { | ||
| 323 | if (kind == .keyword_struct) return s.syms.get(i); | ||
| 324 | try p.errStr(.wrong_tag, tok, p.tokSlice(tok)); | ||
| 325 | try p.errTok(.previous_definition, s.syms.items(.tok)[i]); | ||
| 326 | return null; | ||
| 327 | }, | ||
| 328 | .@"union" => if (names[i] == name) { | ||
| 329 | if (kind == .keyword_union) return s.syms.get(i); | ||
| 330 | try p.errStr(.wrong_tag, tok, p.tokSlice(tok)); | ||
| 331 | try p.errTok(.previous_definition, s.syms.items(.tok)[i]); | ||
| 332 | return null; | ||
| 333 | }, | ||
| 334 | else => {}, | ||
| 335 | } | ||
| 336 | } | ||
| 337 | return null; | ||
| 338 | } | ||
| 339 | |||
| 340 | pub fn defineEnumeration( | ||
| 341 | s: *SymbolStack, | ||
| 342 | p: *Parser, | ||
| 343 | name: StringId, | ||
| 344 | ty: Type, | ||
| 345 | tok: TokenIndex, | ||
| 346 | val: Value, | ||
| 347 | ) !void { | ||
| 348 | const kinds = s.syms.items(.kind); | ||
| 349 | const names = s.syms.items(.name); | ||
| 350 | const end = s.scopeEnd(); | ||
| 351 | var i = s.syms.len; | ||
| 352 | while (i > end) { | ||
| 353 | i -= 1; | ||
| 354 | switch (kinds[i]) { | ||
| 355 | .enumeration => if (names[i] == name) { | ||
| 356 | try p.errStr(.redefinition, tok, p.tokSlice(tok)); | ||
| 357 | try p.errTok(.previous_definition, s.syms.items(.tok)[i]); | ||
| 358 | return; | ||
| 359 | }, | ||
| 360 | .decl, .def, .constexpr => if (names[i] == name) { | ||
| 361 | try p.errStr(.redefinition_different_sym, tok, p.tokSlice(tok)); | ||
| 362 | try p.errTok(.previous_definition, s.syms.items(.tok)[i]); | ||
| 363 | return; | ||
| 364 | }, | ||
| 365 | else => {}, | ||
| 366 | } | ||
| 367 | } | ||
| 368 | try s.syms.append(p.gpa, .{ | ||
| 369 | .kind = .enumeration, | ||
| 370 | .name = name, | ||
| 371 | .tok = tok, | ||
| 372 | .ty = ty, | ||
| 373 | .val = val, | ||
| 374 | }); | ||
| 375 | } | ||
deps/aro/TextLiteral.zig deleted-371| ... | @@ -1,371 +0,0 @@ | ||
| 1 | //! Parsing and classification of string and character literals | ||
| 2 | |||
| 3 | const std = @import("std"); | ||
| 4 | const Compilation = @import("Compilation.zig"); | ||
| 5 | const Type = @import("Type.zig"); | ||
| 6 | const Diagnostics = @import("Diagnostics.zig"); | ||
| 7 | const Tokenizer = @import("Tokenizer.zig"); | ||
| 8 | const mem = std.mem; | ||
| 9 | |||
| 10 | pub const Item = union(enum) { | ||
| 11 | /// decoded hex or character escape | ||
| 12 | value: u32, | ||
| 13 | /// validated unicode codepoint | ||
| 14 | codepoint: u21, | ||
| 15 | /// Char literal in the source text is not utf8 encoded | ||
| 16 | improperly_encoded: []const u8, | ||
| 17 | /// 1 or more unescaped bytes | ||
| 18 | utf8_text: std.unicode.Utf8View, | ||
| 19 | }; | ||
| 20 | |||
| 21 | const CharDiagnostic = struct { | ||
| 22 | tag: Diagnostics.Tag, | ||
| 23 | extra: Diagnostics.Message.Extra, | ||
| 24 | }; | ||
| 25 | |||
| 26 | pub const Kind = enum { | ||
| 27 | char, | ||
| 28 | wide, | ||
| 29 | utf_8, | ||
| 30 | utf_16, | ||
| 31 | utf_32, | ||
| 32 | /// Error kind that halts parsing | ||
| 33 | unterminated, | ||
| 34 | |||
| 35 | pub fn classify(id: Tokenizer.Token.Id, context: enum { string_literal, char_literal }) ?Kind { | ||
| 36 | return switch (context) { | ||
| 37 | .string_literal => switch (id) { | ||
| 38 | .string_literal => .char, | ||
| 39 | .string_literal_utf_8 => .utf_8, | ||
| 40 | .string_literal_wide => .wide, | ||
| 41 | .string_literal_utf_16 => .utf_16, | ||
| 42 | .string_literal_utf_32 => .utf_32, | ||
| 43 | .unterminated_string_literal => .unterminated, | ||
| 44 | else => null, | ||
| 45 | }, | ||
| 46 | .char_literal => switch (id) { | ||
| 47 | .char_literal => .char, | ||
| 48 | .char_literal_utf_8 => .utf_8, | ||
| 49 | .char_literal_wide => .wide, | ||
| 50 | .char_literal_utf_16 => .utf_16, | ||
| 51 | .char_literal_utf_32 => .utf_32, | ||
| 52 | else => null, | ||
| 53 | }, | ||
| 54 | }; | ||
| 55 | } | ||
| 56 | |||
| 57 | /// Should only be called for string literals. Determines the result kind of two adjacent string | ||
| 58 | /// literals | ||
| 59 | pub fn concat(self: Kind, other: Kind) !Kind { | ||
| 60 | if (self == .unterminated or other == .unterminated) return .unterminated; | ||
| 61 | if (self == other) return self; // can always concat with own kind | ||
| 62 | if (self == .char) return other; // char + X -> X | ||
| 63 | if (other == .char) return self; // X + char -> X | ||
| 64 | return error.CannotConcat; | ||
| 65 | } | ||
| 66 | |||
| 67 | /// Largest unicode codepoint that can be represented by this character kind | ||
| 68 | /// May be smaller than the largest value that can be represented. | ||
| 69 | /// For example u8 char literals may only specify 0-127 via literals or | ||
| 70 | /// character escapes, but may specify up to \xFF via hex escapes. | ||
| 71 | pub fn maxCodepoint(kind: Kind, comp: *const Compilation) u21 { | ||
| 72 | return @intCast(switch (kind) { | ||
| 73 | .char => std.math.maxInt(u7), | ||
| 74 | .wide => @min(0x10FFFF, comp.types.wchar.maxInt(comp)), | ||
| 75 | .utf_8 => std.math.maxInt(u7), | ||
| 76 | .utf_16 => std.math.maxInt(u16), | ||
| 77 | .utf_32 => 0x10FFFF, | ||
| 78 | .unterminated => unreachable, | ||
| 79 | }); | ||
| 80 | } | ||
| 81 | |||
| 82 | /// Largest integer that can be represented by this character kind | ||
| 83 | pub fn maxInt(kind: Kind, comp: *const Compilation) u32 { | ||
| 84 | return @intCast(switch (kind) { | ||
| 85 | .char, .utf_8 => std.math.maxInt(u8), | ||
| 86 | .wide => comp.types.wchar.maxInt(comp), | ||
| 87 | .utf_16 => std.math.maxInt(u16), | ||
| 88 | .utf_32 => std.math.maxInt(u32), | ||
| 89 | .unterminated => unreachable, | ||
| 90 | }); | ||
| 91 | } | ||
| 92 | |||
| 93 | /// The C type of a character literal of this kind | ||
| 94 | pub fn charLiteralType(kind: Kind, comp: *const Compilation) Type { | ||
| 95 | return switch (kind) { | ||
| 96 | .char => Type.int, | ||
| 97 | .wide => comp.types.wchar, | ||
| 98 | .utf_8 => .{ .specifier = .uchar }, | ||
| 99 | .utf_16 => comp.types.uint_least16_t, | ||
| 100 | .utf_32 => comp.types.uint_least32_t, | ||
| 101 | .unterminated => unreachable, | ||
| 102 | }; | ||
| 103 | } | ||
| 104 | |||
| 105 | /// Return the actual contents of the literal with leading / trailing quotes and | ||
| 106 | /// specifiers removed | ||
| 107 | pub fn contentSlice(kind: Kind, delimited: []const u8) []const u8 { | ||
| 108 | const end = delimited.len - 1; // remove trailing quote | ||
| 109 | return switch (kind) { | ||
| 110 | .char => delimited[1..end], | ||
| 111 | .wide => delimited[2..end], | ||
| 112 | .utf_8 => delimited[3..end], | ||
| 113 | .utf_16 => delimited[2..end], | ||
| 114 | .utf_32 => delimited[2..end], | ||
| 115 | .unterminated => unreachable, | ||
| 116 | }; | ||
| 117 | } | ||
| 118 | |||
| 119 | /// The size of a character unit for a string literal of this kind | ||
| 120 | pub fn charUnitSize(kind: Kind, comp: *const Compilation) Compilation.CharUnitSize { | ||
| 121 | return switch (kind) { | ||
| 122 | .char => .@"1", | ||
| 123 | .wide => switch (comp.types.wchar.sizeof(comp).?) { | ||
| 124 | 2 => .@"2", | ||
| 125 | 4 => .@"4", | ||
| 126 | else => unreachable, | ||
| 127 | }, | ||
| 128 | .utf_8 => .@"1", | ||
| 129 | .utf_16 => .@"2", | ||
| 130 | .utf_32 => .@"4", | ||
| 131 | .unterminated => unreachable, | ||
| 132 | }; | ||
| 133 | } | ||
| 134 | |||
| 135 | /// Required alignment within aro (on compiler host) for writing to retained_strings | ||
| 136 | pub fn internalStorageAlignment(kind: Kind, comp: *const Compilation) usize { | ||
| 137 | return switch (kind.charUnitSize(comp)) { | ||
| 138 | inline else => |size| @alignOf(size.Type()), | ||
| 139 | }; | ||
| 140 | } | ||
| 141 | |||
| 142 | /// The C type of an element of a string literal of this kind | ||
| 143 | pub fn elementType(kind: Kind, comp: *const Compilation) Type { | ||
| 144 | return switch (kind) { | ||
| 145 | .unterminated => unreachable, | ||
| 146 | .char => .{ .specifier = .char }, | ||
| 147 | .utf_8 => if (comp.langopts.hasChar8_T()) .{ .specifier = .uchar } else .{ .specifier = .char }, | ||
| 148 | else => kind.charLiteralType(comp), | ||
| 149 | }; | ||
| 150 | } | ||
| 151 | }; | ||
| 152 | |||
| 153 | pub const Parser = struct { | ||
| 154 | literal: []const u8, | ||
| 155 | i: usize = 0, | ||
| 156 | kind: Kind, | ||
| 157 | max_codepoint: u21, | ||
| 158 | /// We only want to issue a max of 1 error per char literal | ||
| 159 | errored: bool = false, | ||
| 160 | errors: std.BoundedArray(CharDiagnostic, 4) = .{}, | ||
| 161 | comp: *const Compilation, | ||
| 162 | |||
| 163 | pub fn init(literal: []const u8, kind: Kind, max_codepoint: u21, comp: *const Compilation) Parser { | ||
| 164 | return .{ | ||
| 165 | .literal = literal, | ||
| 166 | .comp = comp, | ||
| 167 | .kind = kind, | ||
| 168 | .max_codepoint = max_codepoint, | ||
| 169 | }; | ||
| 170 | } | ||
| 171 | |||
| 172 | fn prefixLen(self: *const Parser) usize { | ||
| 173 | return switch (self.kind) { | ||
| 174 | .unterminated => unreachable, | ||
| 175 | .char => 0, | ||
| 176 | .utf_8 => 2, | ||
| 177 | .wide, .utf_16, .utf_32 => 1, | ||
| 178 | }; | ||
| 179 | } | ||
| 180 | |||
| 181 | pub fn err(self: *Parser, tag: Diagnostics.Tag, extra: Diagnostics.Message.Extra) void { | ||
| 182 | if (self.errored) return; | ||
| 183 | self.errored = true; | ||
| 184 | const diagnostic = .{ .tag = tag, .extra = extra }; | ||
| 185 | self.errors.append(diagnostic) catch { | ||
| 186 | _ = self.errors.pop(); | ||
| 187 | self.errors.append(diagnostic) catch unreachable; | ||
| 188 | }; | ||
| 189 | } | ||
| 190 | |||
| 191 | pub fn warn(self: *Parser, tag: Diagnostics.Tag, extra: Diagnostics.Message.Extra) void { | ||
| 192 | if (self.errored) return; | ||
| 193 | self.errors.append(.{ .tag = tag, .extra = extra }) catch {}; | ||
| 194 | } | ||
| 195 | |||
| 196 | pub fn next(self: *Parser) ?Item { | ||
| 197 | if (self.i >= self.literal.len) return null; | ||
| 198 | |||
| 199 | const start = self.i; | ||
| 200 | if (self.literal[start] != '\\') { | ||
| 201 | self.i = mem.indexOfScalarPos(u8, self.literal, start + 1, '\\') orelse self.literal.len; | ||
| 202 | const unescaped_slice = self.literal[start..self.i]; | ||
| 203 | |||
| 204 | const view = std.unicode.Utf8View.init(unescaped_slice) catch { | ||
| 205 | if (self.kind != .char) { | ||
| 206 | self.err(.illegal_char_encoding_error, .{ .none = {} }); | ||
| 207 | return null; | ||
| 208 | } | ||
| 209 | self.warn(.illegal_char_encoding_warning, .{ .none = {} }); | ||
| 210 | return .{ .improperly_encoded = self.literal[start..self.i] }; | ||
| 211 | }; | ||
| 212 | return .{ .utf8_text = view }; | ||
| 213 | } | ||
| 214 | switch (self.literal[start + 1]) { | ||
| 215 | 'u', 'U' => return self.parseUnicodeEscape(), | ||
| 216 | else => return self.parseEscapedChar(), | ||
| 217 | } | ||
| 218 | } | ||
| 219 | |||
| 220 | fn parseUnicodeEscape(self: *Parser) ?Item { | ||
| 221 | const start = self.i; | ||
| 222 | |||
| 223 | std.debug.assert(self.literal[self.i] == '\\'); | ||
| 224 | |||
| 225 | const kind = self.literal[self.i + 1]; | ||
| 226 | std.debug.assert(kind == 'u' or kind == 'U'); | ||
| 227 | |||
| 228 | self.i += 2; | ||
| 229 | if (self.i >= self.literal.len or !std.ascii.isHex(self.literal[self.i])) { | ||
| 230 | self.err(.missing_hex_escape, .{ .ascii = @intCast(kind) }); | ||
| 231 | return null; | ||
| 232 | } | ||
| 233 | const expected_len: usize = if (kind == 'u') 4 else 8; | ||
| 234 | var overflowed = false; | ||
| 235 | var count: usize = 0; | ||
| 236 | var val: u32 = 0; | ||
| 237 | |||
| 238 | for (self.literal[self.i..], 0..) |c, i| { | ||
| 239 | if (i == expected_len) break; | ||
| 240 | |||
| 241 | const char = std.fmt.charToDigit(c, 16) catch { | ||
| 242 | break; | ||
| 243 | }; | ||
| 244 | |||
| 245 | val, const overflow = @shlWithOverflow(val, 4); | ||
| 246 | overflowed = overflowed or overflow != 0; | ||
| 247 | val |= char; | ||
| 248 | count += 1; | ||
| 249 | } | ||
| 250 | self.i += expected_len; | ||
| 251 | |||
| 252 | if (overflowed) { | ||
| 253 | self.err(.escape_sequence_overflow, .{ .unsigned = start + self.prefixLen() }); | ||
| 254 | return null; | ||
| 255 | } | ||
| 256 | |||
| 257 | if (count != expected_len) { | ||
| 258 | self.err(.incomplete_universal_character, .{ .none = {} }); | ||
| 259 | return null; | ||
| 260 | } | ||
| 261 | |||
| 262 | if (val > std.math.maxInt(u21) or !std.unicode.utf8ValidCodepoint(@intCast(val))) { | ||
| 263 | self.err(.invalid_universal_character, .{ .unsigned = start + self.prefixLen() }); | ||
| 264 | return null; | ||
| 265 | } | ||
| 266 | |||
| 267 | if (val > self.max_codepoint) { | ||
| 268 | self.err(.char_too_large, .{ .none = {} }); | ||
| 269 | return null; | ||
| 270 | } | ||
| 271 | |||
| 272 | if (val < 0xA0 and (val != '$' and val != '@' and val != '`')) { | ||
| 273 | const is_error = !self.comp.langopts.standard.atLeast(.c2x); | ||
| 274 | if (val >= 0x20 and val <= 0x7F) { | ||
| 275 | if (is_error) { | ||
| 276 | self.err(.ucn_basic_char_error, .{ .ascii = @intCast(val) }); | ||
| 277 | } else { | ||
| 278 | self.warn(.ucn_basic_char_warning, .{ .ascii = @intCast(val) }); | ||
| 279 | } | ||
| 280 | } else { | ||
| 281 | if (is_error) { | ||
| 282 | self.err(.ucn_control_char_error, .{ .none = {} }); | ||
| 283 | } else { | ||
| 284 | self.warn(.ucn_control_char_warning, .{ .none = {} }); | ||
| 285 | } | ||
| 286 | } | ||
| 287 | } | ||
| 288 | |||
| 289 | self.warn(.c89_ucn_in_literal, .{ .none = {} }); | ||
| 290 | return .{ .codepoint = @intCast(val) }; | ||
| 291 | } | ||
| 292 | |||
| 293 | fn parseEscapedChar(self: *Parser) Item { | ||
| 294 | self.i += 1; | ||
| 295 | const c = self.literal[self.i]; | ||
| 296 | defer if (c != 'x' and (c < '0' or c > '7')) { | ||
| 297 | self.i += 1; | ||
| 298 | }; | ||
| 299 | |||
| 300 | switch (c) { | ||
| 301 | '\n' => unreachable, // removed by line splicing | ||
| 302 | '\r' => unreachable, // removed by line splicing | ||
| 303 | '\'', '\"', '\\', '?' => return .{ .value = c }, | ||
| 304 | 'n' => return .{ .value = '\n' }, | ||
| 305 | 'r' => return .{ .value = '\r' }, | ||
| 306 | 't' => return .{ .value = '\t' }, | ||
| 307 | 'a' => return .{ .value = 0x07 }, | ||
| 308 | 'b' => return .{ .value = 0x08 }, | ||
| 309 | 'e', 'E' => { | ||
| 310 | self.warn(.non_standard_escape_char, .{ .invalid_escape = .{ .char = c, .offset = @intCast(self.i) } }); | ||
| 311 | return .{ .value = 0x1B }; | ||
| 312 | }, | ||
| 313 | '(', '{', '[', '%' => { | ||
| 314 | self.warn(.non_standard_escape_char, .{ .invalid_escape = .{ .char = c, .offset = @intCast(self.i) } }); | ||
| 315 | return .{ .value = c }; | ||
| 316 | }, | ||
| 317 | 'f' => return .{ .value = 0x0C }, | ||
| 318 | 'v' => return .{ .value = 0x0B }, | ||
| 319 | 'x' => return .{ .value = self.parseNumberEscape(.hex) }, | ||
| 320 | '0'...'7' => return .{ .value = self.parseNumberEscape(.octal) }, | ||
| 321 | 'u', 'U' => unreachable, // handled by parseUnicodeEscape | ||
| 322 | else => { | ||
| 323 | self.warn(.unknown_escape_sequence, .{ .invalid_escape = .{ .char = c, .offset = @intCast(self.i) } }); | ||
| 324 | return .{ .value = c }; | ||
| 325 | }, | ||
| 326 | } | ||
| 327 | } | ||
| 328 | |||
| 329 | fn parseNumberEscape(self: *Parser, base: EscapeBase) u32 { | ||
| 330 | var val: u32 = 0; | ||
| 331 | var count: usize = 0; | ||
| 332 | var overflowed = false; | ||
| 333 | const start = self.i; | ||
| 334 | defer self.i += count; | ||
| 335 | const slice = switch (base) { | ||
| 336 | .octal => self.literal[self.i..@min(self.literal.len, self.i + 3)], // max 3 chars | ||
| 337 | .hex => blk: { | ||
| 338 | self.i += 1; | ||
| 339 | break :blk self.literal[self.i..]; // skip over 'x'; could have an arbitrary number of chars | ||
| 340 | }, | ||
| 341 | }; | ||
| 342 | for (slice) |c| { | ||
| 343 | const char = std.fmt.charToDigit(c, @intFromEnum(base)) catch break; | ||
| 344 | val, const overflow = @shlWithOverflow(val, base.log2()); | ||
| 345 | if (overflow != 0) overflowed = true; | ||
| 346 | val += char; | ||
| 347 | count += 1; | ||
| 348 | } | ||
| 349 | if (overflowed or val > self.kind.maxInt(self.comp)) { | ||
| 350 | self.err(.escape_sequence_overflow, .{ .unsigned = start + self.prefixLen() }); | ||
| 351 | return 0; | ||
| 352 | } | ||
| 353 | if (count == 0) { | ||
| 354 | std.debug.assert(base == .hex); | ||
| 355 | self.err(.missing_hex_escape, .{ .ascii = 'x' }); | ||
| 356 | } | ||
| 357 | return val; | ||
| 358 | } | ||
| 359 | }; | ||
| 360 | |||
| 361 | const EscapeBase = enum(u8) { | ||
| 362 | octal = 8, | ||
| 363 | hex = 16, | ||
| 364 | |||
| 365 | fn log2(base: EscapeBase) u4 { | ||
| 366 | return switch (base) { | ||
| 367 | .octal => 3, | ||
| 368 | .hex => 4, | ||
| 369 | }; | ||
| 370 | } | ||
| 371 | }; | ||
deps/aro/Tokenizer.zig deleted-2135| ... | @@ -1,2135 +0,0 @@ | ||
| 1 | const std = @import("std"); | ||
| 2 | const assert = std.debug.assert; | ||
| 3 | const Compilation = @import("Compilation.zig"); | ||
| 4 | const Source = @import("Source.zig"); | ||
| 5 | const LangOpts = @import("LangOpts.zig"); | ||
| 6 | |||
| 7 | const Tokenizer = @This(); | ||
| 8 | |||
| 9 | pub const Token = struct { | ||
| 10 | id: Id, | ||
| 11 | source: Source.Id, | ||
| 12 | start: u32 = 0, | ||
| 13 | end: u32 = 0, | ||
| 14 | line: u32 = 0, | ||
| 15 | |||
| 16 | pub const Id = enum(u8) { | ||
| 17 | invalid, | ||
| 18 | nl, | ||
| 19 | whitespace, | ||
| 20 | eof, | ||
| 21 | /// identifier containing solely basic character set characters | ||
| 22 | identifier, | ||
| 23 | /// identifier with at least one extended character | ||
| 24 | extended_identifier, | ||
| 25 | |||
| 26 | // string literals with prefixes | ||
| 27 | string_literal, | ||
| 28 | string_literal_utf_16, | ||
| 29 | string_literal_utf_8, | ||
| 30 | string_literal_utf_32, | ||
| 31 | string_literal_wide, | ||
| 32 | |||
| 33 | /// Any string literal with an embedded newline or EOF | ||
| 34 | /// Always a parser error; by default just a warning from preprocessor | ||
| 35 | unterminated_string_literal, | ||
| 36 | |||
| 37 | // <foobar> only generated by preprocessor | ||
| 38 | macro_string, | ||
| 39 | |||
| 40 | // char literals with prefixes | ||
| 41 | char_literal, | ||
| 42 | char_literal_utf_8, | ||
| 43 | char_literal_utf_16, | ||
| 44 | char_literal_utf_32, | ||
| 45 | char_literal_wide, | ||
| 46 | |||
| 47 | /// Any character literal with nothing inside the quotes | ||
| 48 | /// Always a parser error; by default just a warning from preprocessor | ||
| 49 | empty_char_literal, | ||
| 50 | |||
| 51 | /// Any character literal with an embedded newline or EOF | ||
| 52 | /// Always a parser error; by default just a warning from preprocessor | ||
| 53 | unterminated_char_literal, | ||
| 54 | |||
| 55 | /// `/* */` style comment without a closing `*/` before EOF | ||
| 56 | unterminated_comment, | ||
| 57 | |||
| 58 | /// Integer literal tokens generated by preprocessor. | ||
| 59 | one, | ||
| 60 | zero, | ||
| 61 | |||
| 62 | bang, | ||
| 63 | bang_equal, | ||
| 64 | pipe, | ||
| 65 | pipe_pipe, | ||
| 66 | pipe_equal, | ||
| 67 | equal, | ||
| 68 | equal_equal, | ||
| 69 | l_paren, | ||
| 70 | r_paren, | ||
| 71 | l_brace, | ||
| 72 | r_brace, | ||
| 73 | l_bracket, | ||
| 74 | r_bracket, | ||
| 75 | period, | ||
| 76 | ellipsis, | ||
| 77 | caret, | ||
| 78 | caret_equal, | ||
| 79 | plus, | ||
| 80 | plus_plus, | ||
| 81 | plus_equal, | ||
| 82 | minus, | ||
| 83 | minus_minus, | ||
| 84 | minus_equal, | ||
| 85 | asterisk, | ||
| 86 | asterisk_equal, | ||
| 87 | percent, | ||
| 88 | percent_equal, | ||
| 89 | arrow, | ||
| 90 | colon, | ||
| 91 | colon_colon, | ||
| 92 | semicolon, | ||
| 93 | slash, | ||
| 94 | slash_equal, | ||
| 95 | comma, | ||
| 96 | ampersand, | ||
| 97 | ampersand_ampersand, | ||
| 98 | ampersand_equal, | ||
| 99 | question_mark, | ||
| 100 | angle_bracket_left, | ||
| 101 | angle_bracket_left_equal, | ||
| 102 | angle_bracket_angle_bracket_left, | ||
| 103 | angle_bracket_angle_bracket_left_equal, | ||
| 104 | angle_bracket_right, | ||
| 105 | angle_bracket_right_equal, | ||
| 106 | angle_bracket_angle_bracket_right, | ||
| 107 | angle_bracket_angle_bracket_right_equal, | ||
| 108 | tilde, | ||
| 109 | hash, | ||
| 110 | hash_hash, | ||
| 111 | |||
| 112 | /// Special token to speed up preprocessing, `loc.end` will be an index to the param list. | ||
| 113 | macro_param, | ||
| 114 | /// Special token to signal that the argument must be replaced without expansion (e.g. in concatenation) | ||
| 115 | macro_param_no_expand, | ||
| 116 | /// Special token to speed up preprocessing, `loc.end` will be an index to the param list. | ||
| 117 | stringify_param, | ||
| 118 | /// Same as stringify_param, but for var args | ||
| 119 | stringify_va_args, | ||
| 120 | /// Special macro whitespace, always equal to a single space | ||
| 121 | macro_ws, | ||
| 122 | /// Special token for implementing __has_attribute | ||
| 123 | macro_param_has_attribute, | ||
| 124 | /// Special token for implementing __has_declspec_attribute | ||
| 125 | macro_param_has_declspec_attribute, | ||
| 126 | /// Special token for implementing __has_warning | ||
| 127 | macro_param_has_warning, | ||
| 128 | /// Special token for implementing __has_feature | ||
| 129 | macro_param_has_feature, | ||
| 130 | /// Special token for implementing __has_extension | ||
| 131 | macro_param_has_extension, | ||
| 132 | /// Special token for implementing __has_builtin | ||
| 133 | macro_param_has_builtin, | ||
| 134 | /// Special token for implementing __has_include | ||
| 135 | macro_param_has_include, | ||
| 136 | /// Special token for implementing __has_include_next | ||
| 137 | macro_param_has_include_next, | ||
| 138 | /// Special token for implementing __is_identifier | ||
| 139 | macro_param_is_identifier, | ||
| 140 | /// Special token for implementing __FILE__ | ||
| 141 | macro_file, | ||
| 142 | /// Special token for implementing __LINE__ | ||
| 143 | macro_line, | ||
| 144 | /// Special token for implementing __COUNTER__ | ||
| 145 | macro_counter, | ||
| 146 | /// Special token for implementing _Pragma | ||
| 147 | macro_param_pragma_operator, | ||
| 148 | |||
| 149 | /// Special identifier for implementing __func__ | ||
| 150 | macro_func, | ||
| 151 | /// Special identifier for implementing __FUNCTION__ | ||
| 152 | macro_function, | ||
| 153 | /// Special identifier for implementing __PRETTY_FUNCTION__ | ||
| 154 | macro_pretty_func, | ||
| 155 | |||
| 156 | keyword_auto, | ||
| 157 | keyword_auto_type, | ||
| 158 | keyword_break, | ||
| 159 | keyword_case, | ||
| 160 | keyword_char, | ||
| 161 | keyword_const, | ||
| 162 | keyword_continue, | ||
| 163 | keyword_default, | ||
| 164 | keyword_do, | ||
| 165 | keyword_double, | ||
| 166 | keyword_else, | ||
| 167 | keyword_enum, | ||
| 168 | keyword_extern, | ||
| 169 | keyword_float, | ||
| 170 | keyword_for, | ||
| 171 | keyword_goto, | ||
| 172 | keyword_if, | ||
| 173 | keyword_int, | ||
| 174 | keyword_long, | ||
| 175 | keyword_register, | ||
| 176 | keyword_return, | ||
| 177 | keyword_short, | ||
| 178 | keyword_signed, | ||
| 179 | keyword_sizeof, | ||
| 180 | keyword_static, | ||
| 181 | keyword_struct, | ||
| 182 | keyword_switch, | ||
| 183 | keyword_typedef, | ||
| 184 | keyword_typeof1, | ||
| 185 | keyword_typeof2, | ||
| 186 | keyword_union, | ||
| 187 | keyword_unsigned, | ||
| 188 | keyword_void, | ||
| 189 | keyword_volatile, | ||
| 190 | keyword_while, | ||
| 191 | |||
| 192 | // ISO C99 | ||
| 193 | keyword_bool, | ||
| 194 | keyword_complex, | ||
| 195 | keyword_imaginary, | ||
| 196 | keyword_inline, | ||
| 197 | keyword_restrict, | ||
| 198 | |||
| 199 | // ISO C11 | ||
| 200 | keyword_alignas, | ||
| 201 | keyword_alignof, | ||
| 202 | keyword_atomic, | ||
| 203 | keyword_generic, | ||
| 204 | keyword_noreturn, | ||
| 205 | keyword_static_assert, | ||
| 206 | keyword_thread_local, | ||
| 207 | |||
| 208 | // ISO C23 | ||
| 209 | keyword_bit_int, | ||
| 210 | keyword_c23_alignas, | ||
| 211 | keyword_c23_alignof, | ||
| 212 | keyword_c23_bool, | ||
| 213 | keyword_c23_static_assert, | ||
| 214 | keyword_c23_thread_local, | ||
| 215 | keyword_constexpr, | ||
| 216 | keyword_true, | ||
| 217 | keyword_false, | ||
| 218 | keyword_nullptr, | ||
| 219 | |||
| 220 | // Preprocessor directives | ||
| 221 | keyword_include, | ||
| 222 | keyword_include_next, | ||
| 223 | keyword_embed, | ||
| 224 | keyword_define, | ||
| 225 | keyword_defined, | ||
| 226 | keyword_undef, | ||
| 227 | keyword_ifdef, | ||
| 228 | keyword_ifndef, | ||
| 229 | keyword_elif, | ||
| 230 | keyword_elifdef, | ||
| 231 | keyword_elifndef, | ||
| 232 | keyword_endif, | ||
| 233 | keyword_error, | ||
| 234 | keyword_warning, | ||
| 235 | keyword_pragma, | ||
| 236 | keyword_line, | ||
| 237 | keyword_va_args, | ||
| 238 | |||
| 239 | // gcc keywords | ||
| 240 | keyword_const1, | ||
| 241 | keyword_const2, | ||
| 242 | keyword_inline1, | ||
| 243 | keyword_inline2, | ||
| 244 | keyword_volatile1, | ||
| 245 | keyword_volatile2, | ||
| 246 | keyword_restrict1, | ||
| 247 | keyword_restrict2, | ||
| 248 | keyword_alignof1, | ||
| 249 | keyword_alignof2, | ||
| 250 | keyword_typeof, | ||
| 251 | keyword_attribute1, | ||
| 252 | keyword_attribute2, | ||
| 253 | keyword_extension, | ||
| 254 | keyword_asm, | ||
| 255 | keyword_asm1, | ||
| 256 | keyword_asm2, | ||
| 257 | keyword_float80, | ||
| 258 | keyword_float128, | ||
| 259 | keyword_int128, | ||
| 260 | keyword_imag1, | ||
| 261 | keyword_imag2, | ||
| 262 | keyword_real1, | ||
| 263 | keyword_real2, | ||
| 264 | keyword_float16, | ||
| 265 | |||
| 266 | // clang keywords | ||
| 267 | keyword_fp16, | ||
| 268 | |||
| 269 | // ms keywords | ||
| 270 | keyword_declspec, | ||
| 271 | keyword_int64, | ||
| 272 | keyword_int64_2, | ||
| 273 | keyword_int32, | ||
| 274 | keyword_int32_2, | ||
| 275 | keyword_int16, | ||
| 276 | keyword_int16_2, | ||
| 277 | keyword_int8, | ||
| 278 | keyword_int8_2, | ||
| 279 | keyword_stdcall, | ||
| 280 | keyword_stdcall2, | ||
| 281 | keyword_thiscall, | ||
| 282 | keyword_thiscall2, | ||
| 283 | keyword_vectorcall, | ||
| 284 | keyword_vectorcall2, | ||
| 285 | |||
| 286 | // builtins that require special parsing | ||
| 287 | builtin_choose_expr, | ||
| 288 | builtin_va_arg, | ||
| 289 | builtin_offsetof, | ||
| 290 | builtin_bitoffsetof, | ||
| 291 | builtin_types_compatible_p, | ||
| 292 | |||
| 293 | /// Generated by #embed directive | ||
| 294 | /// Decimal value with no prefix or suffix | ||
| 295 | embed_byte, | ||
| 296 | |||
| 297 | /// preprocessor number | ||
| 298 | /// An optional period, followed by a digit 0-9, followed by any number of letters | ||
| 299 | /// digits, underscores, periods, and exponents (e+, e-, E+, E-, p+, p-, P+, P-) | ||
| 300 | pp_num, | ||
| 301 | |||
| 302 | /// preprocessor placemarker token | ||
| 303 | /// generated if `##` is used with a zero-token argument | ||
| 304 | /// removed after substitution, so the parser should never see this | ||
| 305 | /// See C99 6.10.3.3.2 | ||
| 306 | placemarker, | ||
| 307 | |||
| 308 | /// Virtual linemarker token output from preprocessor to indicate start of a new include | ||
| 309 | include_start, | ||
| 310 | |||
| 311 | /// Virtual linemarker token output from preprocessor to indicate resuming a file after | ||
| 312 | /// completion of the preceding #include | ||
| 313 | include_resume, | ||
| 314 | |||
| 315 | /// A comment token if asked to preserve comments. | ||
| 316 | comment, | ||
| 317 | |||
| 318 | /// Return true if token is identifier or keyword. | ||
| 319 | pub fn isMacroIdentifier(id: Id) bool { | ||
| 320 | switch (id) { | ||
| 321 | .keyword_include, | ||
| 322 | .keyword_include_next, | ||
| 323 | .keyword_embed, | ||
| 324 | .keyword_define, | ||
| 325 | .keyword_defined, | ||
| 326 | .keyword_undef, | ||
| 327 | .keyword_ifdef, | ||
| 328 | .keyword_ifndef, | ||
| 329 | .keyword_elif, | ||
| 330 | .keyword_elifdef, | ||
| 331 | .keyword_elifndef, | ||
| 332 | .keyword_endif, | ||
| 333 | .keyword_error, | ||
| 334 | .keyword_warning, | ||
| 335 | .keyword_pragma, | ||
| 336 | .keyword_line, | ||
| 337 | .keyword_va_args, | ||
| 338 | .macro_func, | ||
| 339 | .macro_function, | ||
| 340 | .macro_pretty_func, | ||
| 341 | .keyword_auto, | ||
| 342 | .keyword_auto_type, | ||
| 343 | .keyword_break, | ||
| 344 | .keyword_case, | ||
| 345 | .keyword_char, | ||
| 346 | .keyword_const, | ||
| 347 | .keyword_continue, | ||
| 348 | .keyword_default, | ||
| 349 | .keyword_do, | ||
| 350 | .keyword_double, | ||
| 351 | .keyword_else, | ||
| 352 | .keyword_enum, | ||
| 353 | .keyword_extern, | ||
| 354 | .keyword_float, | ||
| 355 | .keyword_for, | ||
| 356 | .keyword_goto, | ||
| 357 | .keyword_if, | ||
| 358 | .keyword_int, | ||
| 359 | .keyword_long, | ||
| 360 | .keyword_register, | ||
| 361 | .keyword_return, | ||
| 362 | .keyword_short, | ||
| 363 | .keyword_signed, | ||
| 364 | .keyword_sizeof, | ||
| 365 | .keyword_static, | ||
| 366 | .keyword_struct, | ||
| 367 | .keyword_switch, | ||
| 368 | .keyword_typedef, | ||
| 369 | .keyword_union, | ||
| 370 | .keyword_unsigned, | ||
| 371 | .keyword_void, | ||
| 372 | .keyword_volatile, | ||
| 373 | .keyword_while, | ||
| 374 | .keyword_bool, | ||
| 375 | .keyword_complex, | ||
| 376 | .keyword_imaginary, | ||
| 377 | .keyword_inline, | ||
| 378 | .keyword_restrict, | ||
| 379 | .keyword_alignas, | ||
| 380 | .keyword_alignof, | ||
| 381 | .keyword_atomic, | ||
| 382 | .keyword_generic, | ||
| 383 | .keyword_noreturn, | ||
| 384 | .keyword_static_assert, | ||
| 385 | .keyword_thread_local, | ||
| 386 | .identifier, | ||
| 387 | .extended_identifier, | ||
| 388 | .keyword_typeof, | ||
| 389 | .keyword_typeof1, | ||
| 390 | .keyword_typeof2, | ||
| 391 | .keyword_const1, | ||
| 392 | .keyword_const2, | ||
| 393 | .keyword_inline1, | ||
| 394 | .keyword_inline2, | ||
| 395 | .keyword_volatile1, | ||
| 396 | .keyword_volatile2, | ||
| 397 | .keyword_restrict1, | ||
| 398 | .keyword_restrict2, | ||
| 399 | .keyword_alignof1, | ||
| 400 | .keyword_alignof2, | ||
| 401 | .builtin_choose_expr, | ||
| 402 | .builtin_va_arg, | ||
| 403 | .builtin_offsetof, | ||
| 404 | .builtin_bitoffsetof, | ||
| 405 | .builtin_types_compatible_p, | ||
| 406 | .keyword_attribute1, | ||
| 407 | .keyword_attribute2, | ||
| 408 | .keyword_extension, | ||
| 409 | .keyword_asm, | ||
| 410 | .keyword_asm1, | ||
| 411 | .keyword_asm2, | ||
| 412 | .keyword_float80, | ||
| 413 | .keyword_float128, | ||
| 414 | .keyword_int128, | ||
| 415 | .keyword_imag1, | ||
| 416 | .keyword_imag2, | ||
| 417 | .keyword_real1, | ||
| 418 | .keyword_real2, | ||
| 419 | .keyword_float16, | ||
| 420 | .keyword_fp16, | ||
| 421 | .keyword_declspec, | ||
| 422 | .keyword_int64, | ||
| 423 | .keyword_int64_2, | ||
| 424 | .keyword_int32, | ||
| 425 | .keyword_int32_2, | ||
| 426 | .keyword_int16, | ||
| 427 | .keyword_int16_2, | ||
| 428 | .keyword_int8, | ||
| 429 | .keyword_int8_2, | ||
| 430 | .keyword_stdcall, | ||
| 431 | .keyword_stdcall2, | ||
| 432 | .keyword_thiscall, | ||
| 433 | .keyword_thiscall2, | ||
| 434 | .keyword_vectorcall, | ||
| 435 | .keyword_vectorcall2, | ||
| 436 | .keyword_bit_int, | ||
| 437 | .keyword_c23_alignas, | ||
| 438 | .keyword_c23_alignof, | ||
| 439 | .keyword_c23_bool, | ||
| 440 | .keyword_c23_static_assert, | ||
| 441 | .keyword_c23_thread_local, | ||
| 442 | .keyword_constexpr, | ||
| 443 | .keyword_true, | ||
| 444 | .keyword_false, | ||
| 445 | .keyword_nullptr, | ||
| 446 | => return true, | ||
| 447 | else => return false, | ||
| 448 | } | ||
| 449 | } | ||
| 450 | |||
| 451 | /// Turn macro keywords into identifiers. | ||
| 452 | /// `keyword_defined` is special since it should only turn into an identifier if | ||
| 453 | /// we are *not* in an #if or #elif expression | ||
| 454 | pub fn simplifyMacroKeywordExtra(id: *Id, defined_to_identifier: bool) void { | ||
| 455 | switch (id.*) { | ||
| 456 | .keyword_include, | ||
| 457 | .keyword_include_next, | ||
| 458 | .keyword_embed, | ||
| 459 | .keyword_define, | ||
| 460 | .keyword_undef, | ||
| 461 | .keyword_ifdef, | ||
| 462 | .keyword_ifndef, | ||
| 463 | .keyword_elif, | ||
| 464 | .keyword_elifdef, | ||
| 465 | .keyword_elifndef, | ||
| 466 | .keyword_endif, | ||
| 467 | .keyword_error, | ||
| 468 | .keyword_warning, | ||
| 469 | .keyword_pragma, | ||
| 470 | .keyword_line, | ||
| 471 | .keyword_va_args, | ||
| 472 | => id.* = .identifier, | ||
| 473 | .keyword_defined => if (defined_to_identifier) { | ||
| 474 | id.* = .identifier; | ||
| 475 | }, | ||
| 476 | else => {}, | ||
| 477 | } | ||
| 478 | } | ||
| 479 | |||
| 480 | pub fn simplifyMacroKeyword(id: *Id) void { | ||
| 481 | simplifyMacroKeywordExtra(id, false); | ||
| 482 | } | ||
| 483 | |||
| 484 | pub fn lexeme(id: Id) ?[]const u8 { | ||
| 485 | return switch (id) { | ||
| 486 | .include_start, | ||
| 487 | .include_resume, | ||
| 488 | .unterminated_comment, // Fatal error; parsing should not be attempted | ||
| 489 | => unreachable, | ||
| 490 | |||
| 491 | .invalid, | ||
| 492 | .identifier, | ||
| 493 | .extended_identifier, | ||
| 494 | .string_literal, | ||
| 495 | .string_literal_utf_16, | ||
| 496 | .string_literal_utf_8, | ||
| 497 | .string_literal_utf_32, | ||
| 498 | .string_literal_wide, | ||
| 499 | .unterminated_string_literal, | ||
| 500 | .unterminated_char_literal, | ||
| 501 | .empty_char_literal, | ||
| 502 | .char_literal, | ||
| 503 | .char_literal_utf_8, | ||
| 504 | .char_literal_utf_16, | ||
| 505 | .char_literal_utf_32, | ||
| 506 | .char_literal_wide, | ||
| 507 | .macro_string, | ||
| 508 | .whitespace, | ||
| 509 | .pp_num, | ||
| 510 | .embed_byte, | ||
| 511 | .comment, | ||
| 512 | => null, | ||
| 513 | |||
| 514 | .zero => "0", | ||
| 515 | .one => "1", | ||
| 516 | |||
| 517 | .nl, | ||
| 518 | .eof, | ||
| 519 | .macro_param, | ||
| 520 | .macro_param_no_expand, | ||
| 521 | .stringify_param, | ||
| 522 | .stringify_va_args, | ||
| 523 | .macro_param_has_attribute, | ||
| 524 | .macro_param_has_declspec_attribute, | ||
| 525 | .macro_param_has_warning, | ||
| 526 | .macro_param_has_feature, | ||
| 527 | .macro_param_has_extension, | ||
| 528 | .macro_param_has_builtin, | ||
| 529 | .macro_param_has_include, | ||
| 530 | .macro_param_has_include_next, | ||
| 531 | .macro_param_is_identifier, | ||
| 532 | .macro_file, | ||
| 533 | .macro_line, | ||
| 534 | .macro_counter, | ||
| 535 | .macro_param_pragma_operator, | ||
| 536 | .placemarker, | ||
| 537 | => "", | ||
| 538 | .macro_ws => " ", | ||
| 539 | |||
| 540 | .macro_func => "__func__", | ||
| 541 | .macro_function => "__FUNCTION__", | ||
| 542 | .macro_pretty_func => "__PRETTY_FUNCTION__", | ||
| 543 | |||
| 544 | .bang => "!", | ||
| 545 | .bang_equal => "!=", | ||
| 546 | .pipe => "|", | ||
| 547 | .pipe_pipe => "||", | ||
| 548 | .pipe_equal => "|=", | ||
| 549 | .equal => "=", | ||
| 550 | .equal_equal => "==", | ||
| 551 | .l_paren => "(", | ||
| 552 | .r_paren => ")", | ||
| 553 | .l_brace => "{", | ||
| 554 | .r_brace => "}", | ||
| 555 | .l_bracket => "[", | ||
| 556 | .r_bracket => "]", | ||
| 557 | .period => ".", | ||
| 558 | .ellipsis => "...", | ||
| 559 | .caret => "^", | ||
| 560 | .caret_equal => "^=", | ||
| 561 | .plus => "+", | ||
| 562 | .plus_plus => "++", | ||
| 563 | .plus_equal => "+=", | ||
| 564 | .minus => "-", | ||
| 565 | .minus_minus => "--", | ||
| 566 | .minus_equal => "-=", | ||
| 567 | .asterisk => "*", | ||
| 568 | .asterisk_equal => "*=", | ||
| 569 | .percent => "%", | ||
| 570 | .percent_equal => "%=", | ||
| 571 | .arrow => "->", | ||
| 572 | .colon => ":", | ||
| 573 | .colon_colon => "::", | ||
| 574 | .semicolon => ";", | ||
| 575 | .slash => "/", | ||
| 576 | .slash_equal => "/=", | ||
| 577 | .comma => ",", | ||
| 578 | .ampersand => "&", | ||
| 579 | .ampersand_ampersand => "&&", | ||
| 580 | .ampersand_equal => "&=", | ||
| 581 | .question_mark => "?", | ||
| 582 | .angle_bracket_left => "<", | ||
| 583 | .angle_bracket_left_equal => "<=", | ||
| 584 | .angle_bracket_angle_bracket_left => "<<", | ||
| 585 | .angle_bracket_angle_bracket_left_equal => "<<=", | ||
| 586 | .angle_bracket_right => ">", | ||
| 587 | .angle_bracket_right_equal => ">=", | ||
| 588 | .angle_bracket_angle_bracket_right => ">>", | ||
| 589 | .angle_bracket_angle_bracket_right_equal => ">>=", | ||
| 590 | .tilde => "~", | ||
| 591 | .hash => "#", | ||
| 592 | .hash_hash => "##", | ||
| 593 | |||
| 594 | .keyword_auto => "auto", | ||
| 595 | .keyword_auto_type => "__auto_type", | ||
| 596 | .keyword_break => "break", | ||
| 597 | .keyword_case => "case", | ||
| 598 | .keyword_char => "char", | ||
| 599 | .keyword_const => "const", | ||
| 600 | .keyword_continue => "continue", | ||
| 601 | .keyword_default => "default", | ||
| 602 | .keyword_do => "do", | ||
| 603 | .keyword_double => "double", | ||
| 604 | .keyword_else => "else", | ||
| 605 | .keyword_enum => "enum", | ||
| 606 | .keyword_extern => "extern", | ||
| 607 | .keyword_float => "float", | ||
| 608 | .keyword_for => "for", | ||
| 609 | .keyword_goto => "goto", | ||
| 610 | .keyword_if => "if", | ||
| 611 | .keyword_int => "int", | ||
| 612 | .keyword_long => "long", | ||
| 613 | .keyword_register => "register", | ||
| 614 | .keyword_return => "return", | ||
| 615 | .keyword_short => "short", | ||
| 616 | .keyword_signed => "signed", | ||
| 617 | .keyword_sizeof => "sizeof", | ||
| 618 | .keyword_static => "static", | ||
| 619 | .keyword_struct => "struct", | ||
| 620 | .keyword_switch => "switch", | ||
| 621 | .keyword_typedef => "typedef", | ||
| 622 | .keyword_typeof => "typeof", | ||
| 623 | .keyword_union => "union", | ||
| 624 | .keyword_unsigned => "unsigned", | ||
| 625 | .keyword_void => "void", | ||
| 626 | .keyword_volatile => "volatile", | ||
| 627 | .keyword_while => "while", | ||
| 628 | .keyword_bool => "_Bool", | ||
| 629 | .keyword_complex => "_Complex", | ||
| 630 | .keyword_imaginary => "_Imaginary", | ||
| 631 | .keyword_inline => "inline", | ||
| 632 | .keyword_restrict => "restrict", | ||
| 633 | .keyword_alignas => "_Alignas", | ||
| 634 | .keyword_alignof => "_Alignof", | ||
| 635 | .keyword_atomic => "_Atomic", | ||
| 636 | .keyword_generic => "_Generic", | ||
| 637 | .keyword_noreturn => "_Noreturn", | ||
| 638 | .keyword_static_assert => "_Static_assert", | ||
| 639 | .keyword_thread_local => "_Thread_local", | ||
| 640 | .keyword_bit_int => "_BitInt", | ||
| 641 | .keyword_c23_alignas => "alignas", | ||
| 642 | .keyword_c23_alignof => "alignof", | ||
| 643 | .keyword_c23_bool => "bool", | ||
| 644 | .keyword_c23_static_assert => "static_assert", | ||
| 645 | .keyword_c23_thread_local => "thread_local", | ||
| 646 | .keyword_constexpr => "constexpr", | ||
| 647 | .keyword_true => "true", | ||
| 648 | .keyword_false => "false", | ||
| 649 | .keyword_nullptr => "nullptr", | ||
| 650 | .keyword_include => "include", | ||
| 651 | .keyword_include_next => "include_next", | ||
| 652 | .keyword_embed => "embed", | ||
| 653 | .keyword_define => "define", | ||
| 654 | .keyword_defined => "defined", | ||
| 655 | .keyword_undef => "undef", | ||
| 656 | .keyword_ifdef => "ifdef", | ||
| 657 | .keyword_ifndef => "ifndef", | ||
| 658 | .keyword_elif => "elif", | ||
| 659 | .keyword_elifdef => "elifdef", | ||
| 660 | .keyword_elifndef => "elifndef", | ||
| 661 | .keyword_endif => "endif", | ||
| 662 | .keyword_error => "error", | ||
| 663 | .keyword_warning => "warning", | ||
| 664 | .keyword_pragma => "pragma", | ||
| 665 | .keyword_line => "line", | ||
| 666 | .keyword_va_args => "__VA_ARGS__", | ||
| 667 | .keyword_const1 => "__const", | ||
| 668 | .keyword_const2 => "__const__", | ||
| 669 | .keyword_inline1 => "__inline", | ||
| 670 | .keyword_inline2 => "__inline__", | ||
| 671 | .keyword_volatile1 => "__volatile", | ||
| 672 | .keyword_volatile2 => "__volatile__", | ||
| 673 | .keyword_restrict1 => "__restrict", | ||
| 674 | .keyword_restrict2 => "__restrict__", | ||
| 675 | .keyword_alignof1 => "__alignof", | ||
| 676 | .keyword_alignof2 => "__alignof__", | ||
| 677 | .keyword_typeof1 => "__typeof", | ||
| 678 | .keyword_typeof2 => "__typeof__", | ||
| 679 | .builtin_choose_expr => "__builtin_choose_expr", | ||
| 680 | .builtin_va_arg => "__builtin_va_arg", | ||
| 681 | .builtin_offsetof => "__builtin_offsetof", | ||
| 682 | .builtin_bitoffsetof => "__builtin_bitoffsetof", | ||
| 683 | .builtin_types_compatible_p => "__builtin_types_compatible_p", | ||
| 684 | .keyword_attribute1 => "__attribute", | ||
| 685 | .keyword_attribute2 => "__attribute__", | ||
| 686 | .keyword_extension => "__extension__", | ||
| 687 | .keyword_asm => "asm", | ||
| 688 | .keyword_asm1 => "__asm", | ||
| 689 | .keyword_asm2 => "__asm__", | ||
| 690 | .keyword_float80 => "__float80", | ||
| 691 | .keyword_float128 => "__float18", | ||
| 692 | .keyword_int128 => "__int128", | ||
| 693 | .keyword_imag1 => "__imag", | ||
| 694 | .keyword_imag2 => "__imag__", | ||
| 695 | .keyword_real1 => "__real", | ||
| 696 | .keyword_real2 => "__real__", | ||
| 697 | .keyword_float16 => "_Float16", | ||
| 698 | .keyword_fp16 => "__fp16", | ||
| 699 | .keyword_declspec => "__declspec", | ||
| 700 | .keyword_int64 => "__int64", | ||
| 701 | .keyword_int64_2 => "_int64", | ||
| 702 | .keyword_int32 => "__int32", | ||
| 703 | .keyword_int32_2 => "_int32", | ||
| 704 | .keyword_int16 => "__int16", | ||
| 705 | .keyword_int16_2 => "_int16", | ||
| 706 | .keyword_int8 => "__int8", | ||
| 707 | .keyword_int8_2 => "_int8", | ||
| 708 | .keyword_stdcall => "__stdcall", | ||
| 709 | .keyword_stdcall2 => "_stdcall", | ||
| 710 | .keyword_thiscall => "__thiscall", | ||
| 711 | .keyword_thiscall2 => "_thiscall", | ||
| 712 | .keyword_vectorcall => "__vectorcall", | ||
| 713 | .keyword_vectorcall2 => "_vectorcall", | ||
| 714 | }; | ||
| 715 | } | ||
| 716 | |||
| 717 | pub fn symbol(id: Id) []const u8 { | ||
| 718 | return switch (id) { | ||
| 719 | .macro_string, .invalid => unreachable, | ||
| 720 | .identifier, | ||
| 721 | .extended_identifier, | ||
| 722 | .macro_func, | ||
| 723 | .macro_function, | ||
| 724 | .macro_pretty_func, | ||
| 725 | .builtin_choose_expr, | ||
| 726 | .builtin_va_arg, | ||
| 727 | .builtin_offsetof, | ||
| 728 | .builtin_bitoffsetof, | ||
| 729 | .builtin_types_compatible_p, | ||
| 730 | => "an identifier", | ||
| 731 | .string_literal, | ||
| 732 | .string_literal_utf_16, | ||
| 733 | .string_literal_utf_8, | ||
| 734 | .string_literal_utf_32, | ||
| 735 | .string_literal_wide, | ||
| 736 | => "a string literal", | ||
| 737 | .char_literal, | ||
| 738 | .char_literal_utf_8, | ||
| 739 | .char_literal_utf_16, | ||
| 740 | .char_literal_utf_32, | ||
| 741 | .char_literal_wide, | ||
| 742 | => "a character literal", | ||
| 743 | .pp_num, .embed_byte => "A number", | ||
| 744 | else => id.lexeme().?, | ||
| 745 | }; | ||
| 746 | } | ||
| 747 | |||
| 748 | /// tokens that can start an expression parsed by Preprocessor.expr | ||
| 749 | /// Note that eof, r_paren, and string literals cannot actually start a | ||
| 750 | /// preprocessor expression, but we include them here so that a nicer | ||
| 751 | /// error message can be generated by the parser. | ||
| 752 | pub fn validPreprocessorExprStart(id: Id) bool { | ||
| 753 | return switch (id) { | ||
| 754 | .eof, | ||
| 755 | .r_paren, | ||
| 756 | .string_literal, | ||
| 757 | .string_literal_utf_16, | ||
| 758 | .string_literal_utf_8, | ||
| 759 | .string_literal_utf_32, | ||
| 760 | .string_literal_wide, | ||
| 761 | |||
| 762 | .char_literal, | ||
| 763 | .char_literal_utf_8, | ||
| 764 | .char_literal_utf_16, | ||
| 765 | .char_literal_utf_32, | ||
| 766 | .char_literal_wide, | ||
| 767 | .l_paren, | ||
| 768 | .plus, | ||
| 769 | .minus, | ||
| 770 | .tilde, | ||
| 771 | .bang, | ||
| 772 | .identifier, | ||
| 773 | .extended_identifier, | ||
| 774 | .keyword_defined, | ||
| 775 | .one, | ||
| 776 | .zero, | ||
| 777 | .pp_num, | ||
| 778 | .keyword_true, | ||
| 779 | .keyword_false, | ||
| 780 | => true, | ||
| 781 | else => false, | ||
| 782 | }; | ||
| 783 | } | ||
| 784 | |||
| 785 | pub fn allowsDigraphs(id: Id, comp: *const Compilation) bool { | ||
| 786 | return switch (id) { | ||
| 787 | .l_bracket, | ||
| 788 | .r_bracket, | ||
| 789 | .l_brace, | ||
| 790 | .r_brace, | ||
| 791 | .hash, | ||
| 792 | .hash_hash, | ||
| 793 | => comp.langopts.hasDigraphs(), | ||
| 794 | else => false, | ||
| 795 | }; | ||
| 796 | } | ||
| 797 | |||
| 798 | pub fn canOpenGCCAsmStmt(id: Id) bool { | ||
| 799 | return switch (id) { | ||
| 800 | .keyword_volatile, .keyword_volatile1, .keyword_volatile2, .keyword_inline, .keyword_inline1, .keyword_inline2, .keyword_goto, .l_paren => true, | ||
| 801 | else => false, | ||
| 802 | }; | ||
| 803 | } | ||
| 804 | |||
| 805 | pub fn isStringLiteral(id: Id) bool { | ||
| 806 | return switch (id) { | ||
| 807 | .string_literal, .string_literal_utf_16, .string_literal_utf_8, .string_literal_utf_32, .string_literal_wide => true, | ||
| 808 | else => false, | ||
| 809 | }; | ||
| 810 | } | ||
| 811 | }; | ||
| 812 | |||
| 813 | /// double underscore and underscore + capital letter identifiers | ||
| 814 | /// belong to the implementation namespace, so we always convert them | ||
| 815 | /// to keywords. | ||
| 816 | pub fn getTokenId(comp: *const Compilation, str: []const u8) Token.Id { | ||
| 817 | const kw = all_kws.get(str) orelse return .identifier; | ||
| 818 | const standard = comp.langopts.standard; | ||
| 819 | return switch (kw) { | ||
| 820 | .keyword_inline => if (standard.isGNU() or standard.atLeast(.c99)) kw else .identifier, | ||
| 821 | .keyword_restrict => if (standard.atLeast(.c99)) kw else .identifier, | ||
| 822 | .keyword_typeof => if (standard.isGNU() or standard.atLeast(.c2x)) kw else .identifier, | ||
| 823 | .keyword_asm => if (standard.isGNU()) kw else .identifier, | ||
| 824 | .keyword_declspec => if (comp.langopts.declspec_attrs) kw else .identifier, | ||
| 825 | |||
| 826 | .keyword_c23_alignas, | ||
| 827 | .keyword_c23_alignof, | ||
| 828 | .keyword_c23_bool, | ||
| 829 | .keyword_c23_static_assert, | ||
| 830 | .keyword_c23_thread_local, | ||
| 831 | .keyword_constexpr, | ||
| 832 | .keyword_true, | ||
| 833 | .keyword_false, | ||
| 834 | .keyword_nullptr, | ||
| 835 | .keyword_elifdef, | ||
| 836 | .keyword_elifndef, | ||
| 837 | => if (standard.atLeast(.c2x)) kw else .identifier, | ||
| 838 | |||
| 839 | .keyword_int64, | ||
| 840 | .keyword_int64_2, | ||
| 841 | .keyword_int32, | ||
| 842 | .keyword_int32_2, | ||
| 843 | .keyword_int16, | ||
| 844 | .keyword_int16_2, | ||
| 845 | .keyword_int8, | ||
| 846 | .keyword_int8_2, | ||
| 847 | .keyword_stdcall2, | ||
| 848 | .keyword_thiscall2, | ||
| 849 | .keyword_vectorcall2, | ||
| 850 | => if (comp.langopts.ms_extensions) kw else .identifier, | ||
| 851 | else => kw, | ||
| 852 | }; | ||
| 853 | } | ||
| 854 | |||
| 855 | const all_kws = std.ComptimeStringMap(Id, .{ | ||
| 856 | .{ "auto", auto: { | ||
| 857 | @setEvalBranchQuota(3000); | ||
| 858 | break :auto .keyword_auto; | ||
| 859 | } }, | ||
| 860 | .{ "break", .keyword_break }, | ||
| 861 | .{ "case", .keyword_case }, | ||
| 862 | .{ "char", .keyword_char }, | ||
| 863 | .{ "const", .keyword_const }, | ||
| 864 | .{ "continue", .keyword_continue }, | ||
| 865 | .{ "default", .keyword_default }, | ||
| 866 | .{ "do", .keyword_do }, | ||
| 867 | .{ "double", .keyword_double }, | ||
| 868 | .{ "else", .keyword_else }, | ||
| 869 | .{ "enum", .keyword_enum }, | ||
| 870 | .{ "extern", .keyword_extern }, | ||
| 871 | .{ "float", .keyword_float }, | ||
| 872 | .{ "for", .keyword_for }, | ||
| 873 | .{ "goto", .keyword_goto }, | ||
| 874 | .{ "if", .keyword_if }, | ||
| 875 | .{ "int", .keyword_int }, | ||
| 876 | .{ "long", .keyword_long }, | ||
| 877 | .{ "register", .keyword_register }, | ||
| 878 | .{ "return", .keyword_return }, | ||
| 879 | .{ "short", .keyword_short }, | ||
| 880 | .{ "signed", .keyword_signed }, | ||
| 881 | .{ "sizeof", .keyword_sizeof }, | ||
| 882 | .{ "static", .keyword_static }, | ||
| 883 | .{ "struct", .keyword_struct }, | ||
| 884 | .{ "switch", .keyword_switch }, | ||
| 885 | .{ "typedef", .keyword_typedef }, | ||
| 886 | .{ "union", .keyword_union }, | ||
| 887 | .{ "unsigned", .keyword_unsigned }, | ||
| 888 | .{ "void", .keyword_void }, | ||
| 889 | .{ "volatile", .keyword_volatile }, | ||
| 890 | .{ "while", .keyword_while }, | ||
| 891 | .{ "__typeof__", .keyword_typeof2 }, | ||
| 892 | .{ "__typeof", .keyword_typeof1 }, | ||
| 893 | |||
| 894 | // ISO C99 | ||
| 895 | .{ "_Bool", .keyword_bool }, | ||
| 896 | .{ "_Complex", .keyword_complex }, | ||
| 897 | .{ "_Imaginary", .keyword_imaginary }, | ||
| 898 | .{ "inline", .keyword_inline }, | ||
| 899 | .{ "restrict", .keyword_restrict }, | ||
| 900 | |||
| 901 | // ISO C11 | ||
| 902 | .{ "_Alignas", .keyword_alignas }, | ||
| 903 | .{ "_Alignof", .keyword_alignof }, | ||
| 904 | .{ "_Atomic", .keyword_atomic }, | ||
| 905 | .{ "_Generic", .keyword_generic }, | ||
| 906 | .{ "_Noreturn", .keyword_noreturn }, | ||
| 907 | .{ "_Static_assert", .keyword_static_assert }, | ||
| 908 | .{ "_Thread_local", .keyword_thread_local }, | ||
| 909 | |||
| 910 | // ISO C23 | ||
| 911 | .{ "_BitInt", .keyword_bit_int }, | ||
| 912 | .{ "alignas", .keyword_c23_alignas }, | ||
| 913 | .{ "alignof", .keyword_c23_alignof }, | ||
| 914 | .{ "bool", .keyword_c23_bool }, | ||
| 915 | .{ "static_assert", .keyword_c23_static_assert }, | ||
| 916 | .{ "thread_local", .keyword_c23_thread_local }, | ||
| 917 | .{ "constexpr", .keyword_constexpr }, | ||
| 918 | .{ "true", .keyword_true }, | ||
| 919 | .{ "false", .keyword_false }, | ||
| 920 | .{ "nullptr", .keyword_nullptr }, | ||
| 921 | |||
| 922 | // Preprocessor directives | ||
| 923 | .{ "include", .keyword_include }, | ||
| 924 | .{ "include_next", .keyword_include_next }, | ||
| 925 | .{ "embed", .keyword_embed }, | ||
| 926 | .{ "define", .keyword_define }, | ||
| 927 | .{ "defined", .keyword_defined }, | ||
| 928 | .{ "undef", .keyword_undef }, | ||
| 929 | .{ "ifdef", .keyword_ifdef }, | ||
| 930 | .{ "ifndef", .keyword_ifndef }, | ||
| 931 | .{ "elif", .keyword_elif }, | ||
| 932 | .{ "elifdef", .keyword_elifdef }, | ||
| 933 | .{ "elifndef", .keyword_elifndef }, | ||
| 934 | .{ "endif", .keyword_endif }, | ||
| 935 | .{ "error", .keyword_error }, | ||
| 936 | .{ "warning", .keyword_warning }, | ||
| 937 | .{ "pragma", .keyword_pragma }, | ||
| 938 | .{ "line", .keyword_line }, | ||
| 939 | .{ "__VA_ARGS__", .keyword_va_args }, | ||
| 940 | .{ "__func__", .macro_func }, | ||
| 941 | .{ "__FUNCTION__", .macro_function }, | ||
| 942 | .{ "__PRETTY_FUNCTION__", .macro_pretty_func }, | ||
| 943 | |||
| 944 | // gcc keywords | ||
| 945 | .{ "__auto_type", .keyword_auto_type }, | ||
| 946 | .{ "__const", .keyword_const1 }, | ||
| 947 | .{ "__const__", .keyword_const2 }, | ||
| 948 | .{ "__inline", .keyword_inline1 }, | ||
| 949 | .{ "__inline__", .keyword_inline2 }, | ||
| 950 | .{ "__volatile", .keyword_volatile1 }, | ||
| 951 | .{ "__volatile__", .keyword_volatile2 }, | ||
| 952 | .{ "__restrict", .keyword_restrict1 }, | ||
| 953 | .{ "__restrict__", .keyword_restrict2 }, | ||
| 954 | .{ "__alignof", .keyword_alignof1 }, | ||
| 955 | .{ "__alignof__", .keyword_alignof2 }, | ||
| 956 | .{ "typeof", .keyword_typeof }, | ||
| 957 | .{ "__attribute", .keyword_attribute1 }, | ||
| 958 | .{ "__attribute__", .keyword_attribute2 }, | ||
| 959 | .{ "__extension__", .keyword_extension }, | ||
| 960 | .{ "asm", .keyword_asm }, | ||
| 961 | .{ "__asm", .keyword_asm1 }, | ||
| 962 | .{ "__asm__", .keyword_asm2 }, | ||
| 963 | .{ "__float80", .keyword_float80 }, | ||
| 964 | .{ "__float128", .keyword_float128 }, | ||
| 965 | .{ "__int128", .keyword_int128 }, | ||
| 966 | .{ "__imag", .keyword_imag1 }, | ||
| 967 | .{ "__imag__", .keyword_imag2 }, | ||
| 968 | .{ "__real", .keyword_real1 }, | ||
| 969 | .{ "__real__", .keyword_real2 }, | ||
| 970 | .{ "_Float16", .keyword_float16 }, | ||
| 971 | |||
| 972 | // clang keywords | ||
| 973 | .{ "__fp16", .keyword_fp16 }, | ||
| 974 | |||
| 975 | // ms keywords | ||
| 976 | .{ "__declspec", .keyword_declspec }, | ||
| 977 | .{ "__int64", .keyword_int64 }, | ||
| 978 | .{ "_int64", .keyword_int64_2 }, | ||
| 979 | .{ "__int32", .keyword_int32 }, | ||
| 980 | .{ "_int32", .keyword_int32_2 }, | ||
| 981 | .{ "__int16", .keyword_int16 }, | ||
| 982 | .{ "_int16", .keyword_int16_2 }, | ||
| 983 | .{ "__int8", .keyword_int8 }, | ||
| 984 | .{ "_int8", .keyword_int8_2 }, | ||
| 985 | .{ "__stdcall", .keyword_stdcall }, | ||
| 986 | .{ "_stdcall", .keyword_stdcall2 }, | ||
| 987 | .{ "__thiscall", .keyword_thiscall }, | ||
| 988 | .{ "_thiscall", .keyword_thiscall2 }, | ||
| 989 | .{ "__vectorcall", .keyword_vectorcall }, | ||
| 990 | .{ "_vectorcall", .keyword_vectorcall2 }, | ||
| 991 | |||
| 992 | // builtins that require special parsing | ||
| 993 | .{ "__builtin_choose_expr", .builtin_choose_expr }, | ||
| 994 | .{ "__builtin_va_arg", .builtin_va_arg }, | ||
| 995 | .{ "__builtin_offsetof", .builtin_offsetof }, | ||
| 996 | .{ "__builtin_bitoffsetof", .builtin_bitoffsetof }, | ||
| 997 | .{ "__builtin_types_compatible_p", .builtin_types_compatible_p }, | ||
| 998 | }); | ||
| 999 | }; | ||
| 1000 | |||
| 1001 | buf: []const u8, | ||
| 1002 | index: u32 = 0, | ||
| 1003 | source: Source.Id, | ||
| 1004 | comp: *const Compilation, | ||
| 1005 | line: u32 = 1, | ||
| 1006 | |||
| 1007 | pub fn next(self: *Tokenizer) Token { | ||
| 1008 | var state: enum { | ||
| 1009 | start, | ||
| 1010 | whitespace, | ||
| 1011 | u, | ||
| 1012 | u8, | ||
| 1013 | U, | ||
| 1014 | L, | ||
| 1015 | string_literal, | ||
| 1016 | char_literal_start, | ||
| 1017 | char_literal, | ||
| 1018 | char_escape_sequence, | ||
| 1019 | string_escape_sequence, | ||
| 1020 | identifier, | ||
| 1021 | extended_identifier, | ||
| 1022 | equal, | ||
| 1023 | bang, | ||
| 1024 | pipe, | ||
| 1025 | colon, | ||
| 1026 | percent, | ||
| 1027 | asterisk, | ||
| 1028 | plus, | ||
| 1029 | angle_bracket_left, | ||
| 1030 | angle_bracket_angle_bracket_left, | ||
| 1031 | angle_bracket_right, | ||
| 1032 | angle_bracket_angle_bracket_right, | ||
| 1033 | caret, | ||
| 1034 | period, | ||
| 1035 | period2, | ||
| 1036 | minus, | ||
| 1037 | slash, | ||
| 1038 | ampersand, | ||
| 1039 | hash, | ||
| 1040 | hash_digraph, | ||
| 1041 | hash_hash_digraph_partial, | ||
| 1042 | line_comment, | ||
| 1043 | multi_line_comment, | ||
| 1044 | multi_line_comment_asterisk, | ||
| 1045 | multi_line_comment_done, | ||
| 1046 | pp_num, | ||
| 1047 | pp_num_exponent, | ||
| 1048 | pp_num_digit_separator, | ||
| 1049 | } = .start; | ||
| 1050 | |||
| 1051 | var start = self.index; | ||
| 1052 | var id: Token.Id = .eof; | ||
| 1053 | |||
| 1054 | while (self.index < self.buf.len) : (self.index += 1) { | ||
| 1055 | const c = self.buf[self.index]; | ||
| 1056 | switch (state) { | ||
| 1057 | .start => switch (c) { | ||
| 1058 | '\n' => { | ||
| 1059 | id = .nl; | ||
| 1060 | self.index += 1; | ||
| 1061 | self.line += 1; | ||
| 1062 | break; | ||
| 1063 | }, | ||
| 1064 | '"' => { | ||
| 1065 | id = .string_literal; | ||
| 1066 | state = .string_literal; | ||
| 1067 | }, | ||
| 1068 | '\'' => { | ||
| 1069 | id = .char_literal; | ||
| 1070 | state = .char_literal_start; | ||
| 1071 | }, | ||
| 1072 | 'u' => state = .u, | ||
| 1073 | 'U' => state = .U, | ||
| 1074 | 'L' => state = .L, | ||
| 1075 | 'a'...'t', 'v'...'z', 'A'...'K', 'M'...'T', 'V'...'Z', '_' => state = .identifier, | ||
| 1076 | '=' => state = .equal, | ||
| 1077 | '!' => state = .bang, | ||
| 1078 | '|' => state = .pipe, | ||
| 1079 | '(' => { | ||
| 1080 | id = .l_paren; | ||
| 1081 | self.index += 1; | ||
| 1082 | break; | ||
| 1083 | }, | ||
| 1084 | ')' => { | ||
| 1085 | id = .r_paren; | ||
| 1086 | self.index += 1; | ||
| 1087 | break; | ||
| 1088 | }, | ||
| 1089 | '[' => { | ||
| 1090 | id = .l_bracket; | ||
| 1091 | self.index += 1; | ||
| 1092 | break; | ||
| 1093 | }, | ||
| 1094 | ']' => { | ||
| 1095 | id = .r_bracket; | ||
| 1096 | self.index += 1; | ||
| 1097 | break; | ||
| 1098 | }, | ||
| 1099 | ';' => { | ||
| 1100 | id = .semicolon; | ||
| 1101 | self.index += 1; | ||
| 1102 | break; | ||
| 1103 | }, | ||
| 1104 | ',' => { | ||
| 1105 | id = .comma; | ||
| 1106 | self.index += 1; | ||
| 1107 | break; | ||
| 1108 | }, | ||
| 1109 | '?' => { | ||
| 1110 | id = .question_mark; | ||
| 1111 | self.index += 1; | ||
| 1112 | break; | ||
| 1113 | }, | ||
| 1114 | ':' => state = .colon, | ||
| 1115 | '%' => state = .percent, | ||
| 1116 | '*' => state = .asterisk, | ||
| 1117 | '+' => state = .plus, | ||
| 1118 | '<' => state = .angle_bracket_left, | ||
| 1119 | '>' => state = .angle_bracket_right, | ||
| 1120 | '^' => state = .caret, | ||
| 1121 | '{' => { | ||
| 1122 | id = .l_brace; | ||
| 1123 | self.index += 1; | ||
| 1124 | break; | ||
| 1125 | }, | ||
| 1126 | '}' => { | ||
| 1127 | id = .r_brace; | ||
| 1128 | self.index += 1; | ||
| 1129 | break; | ||
| 1130 | }, | ||
| 1131 | '~' => { | ||
| 1132 | id = .tilde; | ||
| 1133 | self.index += 1; | ||
| 1134 | break; | ||
| 1135 | }, | ||
| 1136 | '.' => state = .period, | ||
| 1137 | '-' => state = .minus, | ||
| 1138 | '/' => state = .slash, | ||
| 1139 | '&' => state = .ampersand, | ||
| 1140 | '#' => state = .hash, | ||
| 1141 | '0'...'9' => state = .pp_num, | ||
| 1142 | '\t', '\x0B', '\x0C', ' ' => state = .whitespace, | ||
| 1143 | '$' => if (self.comp.langopts.dollars_in_identifiers) { | ||
| 1144 | state = .extended_identifier; | ||
| 1145 | } else { | ||
| 1146 | id = .invalid; | ||
| 1147 | self.index += 1; | ||
| 1148 | break; | ||
| 1149 | }, | ||
| 1150 | 0x1A => if (self.comp.langopts.ms_extensions) { | ||
| 1151 | id = .eof; | ||
| 1152 | break; | ||
| 1153 | } else { | ||
| 1154 | id = .invalid; | ||
| 1155 | self.index += 1; | ||
| 1156 | break; | ||
| 1157 | }, | ||
| 1158 | 0x80...0xFF => state = .extended_identifier, | ||
| 1159 | else => { | ||
| 1160 | id = .invalid; | ||
| 1161 | self.index += 1; | ||
| 1162 | break; | ||
| 1163 | }, | ||
| 1164 | }, | ||
| 1165 | .whitespace => switch (c) { | ||
| 1166 | '\t', '\x0B', '\x0C', ' ' => {}, | ||
| 1167 | else => { | ||
| 1168 | id = .whitespace; | ||
| 1169 | break; | ||
| 1170 | }, | ||
| 1171 | }, | ||
| 1172 | .u => switch (c) { | ||
| 1173 | '8' => { | ||
| 1174 | state = .u8; | ||
| 1175 | }, | ||
| 1176 | '\'' => { | ||
| 1177 | id = .char_literal_utf_16; | ||
| 1178 | state = .char_literal_start; | ||
| 1179 | }, | ||
| 1180 | '\"' => { | ||
| 1181 | id = .string_literal_utf_16; | ||
| 1182 | state = .string_literal; | ||
| 1183 | }, | ||
| 1184 | else => { | ||
| 1185 | self.index -= 1; | ||
| 1186 | state = .identifier; | ||
| 1187 | }, | ||
| 1188 | }, | ||
| 1189 | .u8 => switch (c) { | ||
| 1190 | '\"' => { | ||
| 1191 | id = .string_literal_utf_8; | ||
| 1192 | state = .string_literal; | ||
| 1193 | }, | ||
| 1194 | '\'' => { | ||
| 1195 | id = .char_literal_utf_8; | ||
| 1196 | state = .char_literal_start; | ||
| 1197 | }, | ||
| 1198 | else => { | ||
| 1199 | self.index -= 1; | ||
| 1200 | state = .identifier; | ||
| 1201 | }, | ||
| 1202 | }, | ||
| 1203 | .U => switch (c) { | ||
| 1204 | '\'' => { | ||
| 1205 | id = .char_literal_utf_32; | ||
| 1206 | state = .char_literal_start; | ||
| 1207 | }, | ||
| 1208 | '\"' => { | ||
| 1209 | id = .string_literal_utf_32; | ||
| 1210 | state = .string_literal; | ||
| 1211 | }, | ||
| 1212 | else => { | ||
| 1213 | self.index -= 1; | ||
| 1214 | state = .identifier; | ||
| 1215 | }, | ||
| 1216 | }, | ||
| 1217 | .L => switch (c) { | ||
| 1218 | '\'' => { | ||
| 1219 | id = .char_literal_wide; | ||
| 1220 | state = .char_literal_start; | ||
| 1221 | }, | ||
| 1222 | '\"' => { | ||
| 1223 | id = .string_literal_wide; | ||
| 1224 | state = .string_literal; | ||
| 1225 | }, | ||
| 1226 | else => { | ||
| 1227 | self.index -= 1; | ||
| 1228 | state = .identifier; | ||
| 1229 | }, | ||
| 1230 | }, | ||
| 1231 | .string_literal => switch (c) { | ||
| 1232 | '\\' => { | ||
| 1233 | state = .string_escape_sequence; | ||
| 1234 | }, | ||
| 1235 | '"' => { | ||
| 1236 | self.index += 1; | ||
| 1237 | break; | ||
| 1238 | }, | ||
| 1239 | '\n' => { | ||
| 1240 | id = .unterminated_string_literal; | ||
| 1241 | break; | ||
| 1242 | }, | ||
| 1243 | '\r' => unreachable, | ||
| 1244 | else => {}, | ||
| 1245 | }, | ||
| 1246 | .char_literal_start => switch (c) { | ||
| 1247 | '\\' => { | ||
| 1248 | state = .char_escape_sequence; | ||
| 1249 | }, | ||
| 1250 | '\'' => { | ||
| 1251 | id = .empty_char_literal; | ||
| 1252 | self.index += 1; | ||
| 1253 | break; | ||
| 1254 | }, | ||
| 1255 | '\n' => { | ||
| 1256 | id = .unterminated_char_literal; | ||
| 1257 | break; | ||
| 1258 | }, | ||
| 1259 | else => { | ||
| 1260 | state = .char_literal; | ||
| 1261 | }, | ||
| 1262 | }, | ||
| 1263 | .char_literal => switch (c) { | ||
| 1264 | '\\' => { | ||
| 1265 | state = .char_escape_sequence; | ||
| 1266 | }, | ||
| 1267 | '\'' => { | ||
| 1268 | self.index += 1; | ||
| 1269 | break; | ||
| 1270 | }, | ||
| 1271 | '\n' => { | ||
| 1272 | id = .unterminated_char_literal; | ||
| 1273 | break; | ||
| 1274 | }, | ||
| 1275 | else => {}, | ||
| 1276 | }, | ||
| 1277 | .char_escape_sequence => switch (c) { | ||
| 1278 | '\r', '\n' => unreachable, // removed by line splicing | ||
| 1279 | else => state = .char_literal, | ||
| 1280 | }, | ||
| 1281 | .string_escape_sequence => switch (c) { | ||
| 1282 | '\r', '\n' => unreachable, // removed by line splicing | ||
| 1283 | else => state = .string_literal, | ||
| 1284 | }, | ||
| 1285 | .identifier, .extended_identifier => switch (c) { | ||
| 1286 | 'a'...'z', 'A'...'Z', '_', '0'...'9' => {}, | ||
| 1287 | '$' => if (self.comp.langopts.dollars_in_identifiers) { | ||
| 1288 | state = .extended_identifier; | ||
| 1289 | } else { | ||
| 1290 | id = if (state == .identifier) Token.getTokenId(self.comp, self.buf[start..self.index]) else .extended_identifier; | ||
| 1291 | break; | ||
| 1292 | }, | ||
| 1293 | 0x80...0xFF => state = .extended_identifier, | ||
| 1294 | else => { | ||
| 1295 | id = if (state == .identifier) Token.getTokenId(self.comp, self.buf[start..self.index]) else .extended_identifier; | ||
| 1296 | break; | ||
| 1297 | }, | ||
| 1298 | }, | ||
| 1299 | .equal => switch (c) { | ||
| 1300 | '=' => { | ||
| 1301 | id = .equal_equal; | ||
| 1302 | self.index += 1; | ||
| 1303 | break; | ||
| 1304 | }, | ||
| 1305 | else => { | ||
| 1306 | id = .equal; | ||
| 1307 | break; | ||
| 1308 | }, | ||
| 1309 | }, | ||
| 1310 | .bang => switch (c) { | ||
| 1311 | '=' => { | ||
| 1312 | id = .bang_equal; | ||
| 1313 | self.index += 1; | ||
| 1314 | break; | ||
| 1315 | }, | ||
| 1316 | else => { | ||
| 1317 | id = .bang; | ||
| 1318 | break; | ||
| 1319 | }, | ||
| 1320 | }, | ||
| 1321 | .pipe => switch (c) { | ||
| 1322 | '=' => { | ||
| 1323 | id = .pipe_equal; | ||
| 1324 | self.index += 1; | ||
| 1325 | break; | ||
| 1326 | }, | ||
| 1327 | '|' => { | ||
| 1328 | id = .pipe_pipe; | ||
| 1329 | self.index += 1; | ||
| 1330 | break; | ||
| 1331 | }, | ||
| 1332 | else => { | ||
| 1333 | id = .pipe; | ||
| 1334 | break; | ||
| 1335 | }, | ||
| 1336 | }, | ||
| 1337 | .colon => switch (c) { | ||
| 1338 | '>' => { | ||
| 1339 | if (self.comp.langopts.hasDigraphs()) { | ||
| 1340 | id = .r_bracket; | ||
| 1341 | self.index += 1; | ||
| 1342 | } else { | ||
| 1343 | id = .colon; | ||
| 1344 | } | ||
| 1345 | break; | ||
| 1346 | }, | ||
| 1347 | ':' => { | ||
| 1348 | if (self.comp.langopts.standard.atLeast(.c2x)) { | ||
| 1349 | id = .colon_colon; | ||
| 1350 | self.index += 1; | ||
| 1351 | break; | ||
| 1352 | } else { | ||
| 1353 | id = .colon; | ||
| 1354 | break; | ||
| 1355 | } | ||
| 1356 | }, | ||
| 1357 | else => { | ||
| 1358 | id = .colon; | ||
| 1359 | break; | ||
| 1360 | }, | ||
| 1361 | }, | ||
| 1362 | .percent => switch (c) { | ||
| 1363 | '=' => { | ||
| 1364 | id = .percent_equal; | ||
| 1365 | self.index += 1; | ||
| 1366 | break; | ||
| 1367 | }, | ||
| 1368 | '>' => { | ||
| 1369 | if (self.comp.langopts.hasDigraphs()) { | ||
| 1370 | id = .r_brace; | ||
| 1371 | self.index += 1; | ||
| 1372 | } else { | ||
| 1373 | id = .percent; | ||
| 1374 | } | ||
| 1375 | break; | ||
| 1376 | }, | ||
| 1377 | ':' => { | ||
| 1378 | if (self.comp.langopts.hasDigraphs()) { | ||
| 1379 | state = .hash_digraph; | ||
| 1380 | } else { | ||
| 1381 | id = .percent; | ||
| 1382 | break; | ||
| 1383 | } | ||
| 1384 | }, | ||
| 1385 | else => { | ||
| 1386 | id = .percent; | ||
| 1387 | break; | ||
| 1388 | }, | ||
| 1389 | }, | ||
| 1390 | .asterisk => switch (c) { | ||
| 1391 | '=' => { | ||
| 1392 | id = .asterisk_equal; | ||
| 1393 | self.index += 1; | ||
| 1394 | break; | ||
| 1395 | }, | ||
| 1396 | else => { | ||
| 1397 | id = .asterisk; | ||
| 1398 | break; | ||
| 1399 | }, | ||
| 1400 | }, | ||
| 1401 | .plus => switch (c) { | ||
| 1402 | '=' => { | ||
| 1403 | id = .plus_equal; | ||
| 1404 | self.index += 1; | ||
| 1405 | break; | ||
| 1406 | }, | ||
| 1407 | '+' => { | ||
| 1408 | id = .plus_plus; | ||
| 1409 | self.index += 1; | ||
| 1410 | break; | ||
| 1411 | }, | ||
| 1412 | else => { | ||
| 1413 | id = .plus; | ||
| 1414 | break; | ||
| 1415 | }, | ||
| 1416 | }, | ||
| 1417 | .angle_bracket_left => switch (c) { | ||
| 1418 | '<' => state = .angle_bracket_angle_bracket_left, | ||
| 1419 | '=' => { | ||
| 1420 | id = .angle_bracket_left_equal; | ||
| 1421 | self.index += 1; | ||
| 1422 | break; | ||
| 1423 | }, | ||
| 1424 | ':' => { | ||
| 1425 | if (self.comp.langopts.hasDigraphs()) { | ||
| 1426 | id = .l_bracket; | ||
| 1427 | self.index += 1; | ||
| 1428 | } else { | ||
| 1429 | id = .angle_bracket_left; | ||
| 1430 | } | ||
| 1431 | break; | ||
| 1432 | }, | ||
| 1433 | '%' => { | ||
| 1434 | if (self.comp.langopts.hasDigraphs()) { | ||
| 1435 | id = .l_brace; | ||
| 1436 | self.index += 1; | ||
| 1437 | } else { | ||
| 1438 | id = .angle_bracket_left; | ||
| 1439 | } | ||
| 1440 | break; | ||
| 1441 | }, | ||
| 1442 | else => { | ||
| 1443 | id = .angle_bracket_left; | ||
| 1444 | break; | ||
| 1445 | }, | ||
| 1446 | }, | ||
| 1447 | .angle_bracket_angle_bracket_left => switch (c) { | ||
| 1448 | '=' => { | ||
| 1449 | id = .angle_bracket_angle_bracket_left_equal; | ||
| 1450 | self.index += 1; | ||
| 1451 | break; | ||
| 1452 | }, | ||
| 1453 | else => { | ||
| 1454 | id = .angle_bracket_angle_bracket_left; | ||
| 1455 | break; | ||
| 1456 | }, | ||
| 1457 | }, | ||
| 1458 | .angle_bracket_right => switch (c) { | ||
| 1459 | '>' => state = .angle_bracket_angle_bracket_right, | ||
| 1460 | '=' => { | ||
| 1461 | id = .angle_bracket_right_equal; | ||
| 1462 | self.index += 1; | ||
| 1463 | break; | ||
| 1464 | }, | ||
| 1465 | else => { | ||
| 1466 | id = .angle_bracket_right; | ||
| 1467 | break; | ||
| 1468 | }, | ||
| 1469 | }, | ||
| 1470 | .angle_bracket_angle_bracket_right => switch (c) { | ||
| 1471 | '=' => { | ||
| 1472 | id = .angle_bracket_angle_bracket_right_equal; | ||
| 1473 | self.index += 1; | ||
| 1474 | break; | ||
| 1475 | }, | ||
| 1476 | else => { | ||
| 1477 | id = .angle_bracket_angle_bracket_right; | ||
| 1478 | break; | ||
| 1479 | }, | ||
| 1480 | }, | ||
| 1481 | .caret => switch (c) { | ||
| 1482 | '=' => { | ||
| 1483 | id = .caret_equal; | ||
| 1484 | self.index += 1; | ||
| 1485 | break; | ||
| 1486 | }, | ||
| 1487 | else => { | ||
| 1488 | id = .caret; | ||
| 1489 | break; | ||
| 1490 | }, | ||
| 1491 | }, | ||
| 1492 | .period => switch (c) { | ||
| 1493 | '.' => state = .period2, | ||
| 1494 | '0'...'9' => state = .pp_num, | ||
| 1495 | else => { | ||
| 1496 | id = .period; | ||
| 1497 | break; | ||
| 1498 | }, | ||
| 1499 | }, | ||
| 1500 | .period2 => switch (c) { | ||
| 1501 | '.' => { | ||
| 1502 | id = .ellipsis; | ||
| 1503 | self.index += 1; | ||
| 1504 | break; | ||
| 1505 | }, | ||
| 1506 | else => { | ||
| 1507 | id = .period; | ||
| 1508 | self.index -= 1; | ||
| 1509 | break; | ||
| 1510 | }, | ||
| 1511 | }, | ||
| 1512 | .minus => switch (c) { | ||
| 1513 | '>' => { | ||
| 1514 | id = .arrow; | ||
| 1515 | self.index += 1; | ||
| 1516 | break; | ||
| 1517 | }, | ||
| 1518 | '=' => { | ||
| 1519 | id = .minus_equal; | ||
| 1520 | self.index += 1; | ||
| 1521 | break; | ||
| 1522 | }, | ||
| 1523 | '-' => { | ||
| 1524 | id = .minus_minus; | ||
| 1525 | self.index += 1; | ||
| 1526 | break; | ||
| 1527 | }, | ||
| 1528 | else => { | ||
| 1529 | id = .minus; | ||
| 1530 | break; | ||
| 1531 | }, | ||
| 1532 | }, | ||
| 1533 | .ampersand => switch (c) { | ||
| 1534 | '&' => { | ||
| 1535 | id = .ampersand_ampersand; | ||
| 1536 | self.index += 1; | ||
| 1537 | break; | ||
| 1538 | }, | ||
| 1539 | '=' => { | ||
| 1540 | id = .ampersand_equal; | ||
| 1541 | self.index += 1; | ||
| 1542 | break; | ||
| 1543 | }, | ||
| 1544 | else => { | ||
| 1545 | id = .ampersand; | ||
| 1546 | break; | ||
| 1547 | }, | ||
| 1548 | }, | ||
| 1549 | .hash => switch (c) { | ||
| 1550 | '#' => { | ||
| 1551 | id = .hash_hash; | ||
| 1552 | self.index += 1; | ||
| 1553 | break; | ||
| 1554 | }, | ||
| 1555 | else => { | ||
| 1556 | id = .hash; | ||
| 1557 | break; | ||
| 1558 | }, | ||
| 1559 | }, | ||
| 1560 | .hash_digraph => switch (c) { | ||
| 1561 | '%' => state = .hash_hash_digraph_partial, | ||
| 1562 | else => { | ||
| 1563 | id = .hash; | ||
| 1564 | break; | ||
| 1565 | }, | ||
| 1566 | }, | ||
| 1567 | .hash_hash_digraph_partial => switch (c) { | ||
| 1568 | ':' => { | ||
| 1569 | id = .hash_hash; | ||
| 1570 | self.index += 1; | ||
| 1571 | break; | ||
| 1572 | }, | ||
| 1573 | else => { | ||
| 1574 | id = .hash; | ||
| 1575 | self.index -= 1; // re-tokenize the percent | ||
| 1576 | break; | ||
| 1577 | }, | ||
| 1578 | }, | ||
| 1579 | .slash => switch (c) { | ||
| 1580 | '/' => state = .line_comment, | ||
| 1581 | '*' => state = .multi_line_comment, | ||
| 1582 | '=' => { | ||
| 1583 | id = .slash_equal; | ||
| 1584 | self.index += 1; | ||
| 1585 | break; | ||
| 1586 | }, | ||
| 1587 | else => { | ||
| 1588 | id = .slash; | ||
| 1589 | break; | ||
| 1590 | }, | ||
| 1591 | }, | ||
| 1592 | .line_comment => switch (c) { | ||
| 1593 | '\n' => { | ||
| 1594 | if (self.comp.langopts.preserve_comments) { | ||
| 1595 | id = .comment; | ||
| 1596 | break; | ||
| 1597 | } | ||
| 1598 | self.index -= 1; | ||
| 1599 | state = .start; | ||
| 1600 | }, | ||
| 1601 | else => {}, | ||
| 1602 | }, | ||
| 1603 | .multi_line_comment => switch (c) { | ||
| 1604 | '*' => state = .multi_line_comment_asterisk, | ||
| 1605 | '\n' => self.line += 1, | ||
| 1606 | else => {}, | ||
| 1607 | }, | ||
| 1608 | .multi_line_comment_asterisk => switch (c) { | ||
| 1609 | '/' => { | ||
| 1610 | if (self.comp.langopts.preserve_comments) { | ||
| 1611 | self.index += 1; | ||
| 1612 | id = .comment; | ||
| 1613 | break; | ||
| 1614 | } | ||
| 1615 | state = .multi_line_comment_done; | ||
| 1616 | }, | ||
| 1617 | '\n' => { | ||
| 1618 | self.line += 1; | ||
| 1619 | state = .multi_line_comment; | ||
| 1620 | }, | ||
| 1621 | '*' => {}, | ||
| 1622 | else => state = .multi_line_comment, | ||
| 1623 | }, | ||
| 1624 | .multi_line_comment_done => switch (c) { | ||
| 1625 | '\n' => { | ||
| 1626 | start = self.index; | ||
| 1627 | id = .nl; | ||
| 1628 | self.index += 1; | ||
| 1629 | self.line += 1; | ||
| 1630 | break; | ||
| 1631 | }, | ||
| 1632 | '\r' => unreachable, | ||
| 1633 | '\t', '\x0B', '\x0C', ' ' => { | ||
| 1634 | start = self.index; | ||
| 1635 | state = .whitespace; | ||
| 1636 | }, | ||
| 1637 | else => { | ||
| 1638 | id = .whitespace; | ||
| 1639 | break; | ||
| 1640 | }, | ||
| 1641 | }, | ||
| 1642 | .pp_num => switch (c) { | ||
| 1643 | 'a'...'d', | ||
| 1644 | 'A'...'D', | ||
| 1645 | 'f'...'o', | ||
| 1646 | 'F'...'O', | ||
| 1647 | 'q'...'z', | ||
| 1648 | 'Q'...'Z', | ||
| 1649 | '0'...'9', | ||
| 1650 | '_', | ||
| 1651 | '.', | ||
| 1652 | => {}, | ||
| 1653 | 'e', 'E', 'p', 'P' => state = .pp_num_exponent, | ||
| 1654 | '\'' => if (self.comp.langopts.standard.atLeast(.c2x)) { | ||
| 1655 | state = .pp_num_digit_separator; | ||
| 1656 | } else { | ||
| 1657 | id = .pp_num; | ||
| 1658 | break; | ||
| 1659 | }, | ||
| 1660 | else => { | ||
| 1661 | id = .pp_num; | ||
| 1662 | break; | ||
| 1663 | }, | ||
| 1664 | }, | ||
| 1665 | .pp_num_digit_separator => switch (c) { | ||
| 1666 | 'a'...'d', | ||
| 1667 | 'A'...'D', | ||
| 1668 | 'f'...'o', | ||
| 1669 | 'F'...'O', | ||
| 1670 | 'q'...'z', | ||
| 1671 | 'Q'...'Z', | ||
| 1672 | '0'...'9', | ||
| 1673 | '_', | ||
| 1674 | => state = .pp_num, | ||
| 1675 | else => { | ||
| 1676 | self.index -= 1; | ||
| 1677 | id = .pp_num; | ||
| 1678 | break; | ||
| 1679 | }, | ||
| 1680 | }, | ||
| 1681 | .pp_num_exponent => switch (c) { | ||
| 1682 | 'a'...'z', | ||
| 1683 | 'A'...'Z', | ||
| 1684 | '0'...'9', | ||
| 1685 | '_', | ||
| 1686 | '.', | ||
| 1687 | '+', | ||
| 1688 | '-', | ||
| 1689 | => state = .pp_num, | ||
| 1690 | else => { | ||
| 1691 | id = .pp_num; | ||
| 1692 | break; | ||
| 1693 | }, | ||
| 1694 | }, | ||
| 1695 | } | ||
| 1696 | } else if (self.index == self.buf.len) { | ||
| 1697 | switch (state) { | ||
| 1698 | .start, .line_comment => {}, | ||
| 1699 | .u, .u8, .U, .L, .identifier => id = Token.getTokenId(self.comp, self.buf[start..self.index]), | ||
| 1700 | .extended_identifier => id = .extended_identifier, | ||
| 1701 | |||
| 1702 | .period2 => { | ||
| 1703 | self.index -= 1; | ||
| 1704 | id = .period; | ||
| 1705 | }, | ||
| 1706 | |||
| 1707 | .multi_line_comment, | ||
| 1708 | .multi_line_comment_asterisk, | ||
| 1709 | => id = .unterminated_comment, | ||
| 1710 | |||
| 1711 | .char_escape_sequence, .char_literal, .char_literal_start => id = .unterminated_char_literal, | ||
| 1712 | .string_escape_sequence, .string_literal => id = .unterminated_string_literal, | ||
| 1713 | |||
| 1714 | .whitespace => id = .whitespace, | ||
| 1715 | .multi_line_comment_done => id = .whitespace, | ||
| 1716 | |||
| 1717 | .equal => id = .equal, | ||
| 1718 | .bang => id = .bang, | ||
| 1719 | .minus => id = .minus, | ||
| 1720 | .slash => id = .slash, | ||
| 1721 | .ampersand => id = .ampersand, | ||
| 1722 | .hash => id = .hash, | ||
| 1723 | .period => id = .period, | ||
| 1724 | .pipe => id = .pipe, | ||
| 1725 | .angle_bracket_angle_bracket_right => id = .angle_bracket_angle_bracket_right, | ||
| 1726 | .angle_bracket_right => id = .angle_bracket_right, | ||
| 1727 | .angle_bracket_angle_bracket_left => id = .angle_bracket_angle_bracket_left, | ||
| 1728 | .angle_bracket_left => id = .angle_bracket_left, | ||
| 1729 | .plus => id = .plus, | ||
| 1730 | .colon => id = .colon, | ||
| 1731 | .percent => id = .percent, | ||
| 1732 | .caret => id = .caret, | ||
| 1733 | .asterisk => id = .asterisk, | ||
| 1734 | .hash_digraph => id = .hash, | ||
| 1735 | .hash_hash_digraph_partial => { | ||
| 1736 | id = .hash; | ||
| 1737 | self.index -= 1; // re-tokenize the percent | ||
| 1738 | }, | ||
| 1739 | .pp_num, .pp_num_exponent, .pp_num_digit_separator => id = .pp_num, | ||
| 1740 | } | ||
| 1741 | } | ||
| 1742 | |||
| 1743 | return .{ | ||
| 1744 | .id = id, | ||
| 1745 | .start = start, | ||
| 1746 | .end = self.index, | ||
| 1747 | .line = self.line, | ||
| 1748 | .source = self.source, | ||
| 1749 | }; | ||
| 1750 | } | ||
| 1751 | |||
| 1752 | pub fn nextNoWS(self: *Tokenizer) Token { | ||
| 1753 | var tok = self.next(); | ||
| 1754 | while (tok.id == .whitespace or tok.id == .comment) tok = self.next(); | ||
| 1755 | return tok; | ||
| 1756 | } | ||
| 1757 | |||
| 1758 | pub fn nextNoWSComments(self: *Tokenizer) Token { | ||
| 1759 | var tok = self.next(); | ||
| 1760 | while (tok.id == .whitespace) tok = self.next(); | ||
| 1761 | return tok; | ||
| 1762 | } | ||
| 1763 | |||
| 1764 | test "operators" { | ||
| 1765 | try expectTokens( | ||
| 1766 | \\ ! != | || |= = == | ||
| 1767 | \\ ( ) { } [ ] . .. ... | ||
| 1768 | \\ ^ ^= + ++ += - -- -= | ||
| 1769 | \\ * *= % %= -> : ; / /= | ||
| 1770 | \\ , & && &= ? < <= << | ||
| 1771 | \\ <<= > >= >> >>= ~ # ## | ||
| 1772 | \\ | ||
| 1773 | , &.{ | ||
| 1774 | .bang, | ||
| 1775 | .bang_equal, | ||
| 1776 | .pipe, | ||
| 1777 | .pipe_pipe, | ||
| 1778 | .pipe_equal, | ||
| 1779 | .equal, | ||
| 1780 | .equal_equal, | ||
| 1781 | .nl, | ||
| 1782 | .l_paren, | ||
| 1783 | .r_paren, | ||
| 1784 | .l_brace, | ||
| 1785 | .r_brace, | ||
| 1786 | .l_bracket, | ||
| 1787 | .r_bracket, | ||
| 1788 | .period, | ||
| 1789 | .period, | ||
| 1790 | .period, | ||
| 1791 | .ellipsis, | ||
| 1792 | .nl, | ||
| 1793 | .caret, | ||
| 1794 | .caret_equal, | ||
| 1795 | .plus, | ||
| 1796 | .plus_plus, | ||
| 1797 | .plus_equal, | ||
| 1798 | .minus, | ||
| 1799 | .minus_minus, | ||
| 1800 | .minus_equal, | ||
| 1801 | .nl, | ||
| 1802 | .asterisk, | ||
| 1803 | .asterisk_equal, | ||
| 1804 | .percent, | ||
| 1805 | .percent_equal, | ||
| 1806 | .arrow, | ||
| 1807 | .colon, | ||
| 1808 | .semicolon, | ||
| 1809 | .slash, | ||
| 1810 | .slash_equal, | ||
| 1811 | .nl, | ||
| 1812 | .comma, | ||
| 1813 | .ampersand, | ||
| 1814 | .ampersand_ampersand, | ||
| 1815 | .ampersand_equal, | ||
| 1816 | .question_mark, | ||
| 1817 | .angle_bracket_left, | ||
| 1818 | .angle_bracket_left_equal, | ||
| 1819 | .angle_bracket_angle_bracket_left, | ||
| 1820 | .nl, | ||
| 1821 | .angle_bracket_angle_bracket_left_equal, | ||
| 1822 | .angle_bracket_right, | ||
| 1823 | .angle_bracket_right_equal, | ||
| 1824 | .angle_bracket_angle_bracket_right, | ||
| 1825 | .angle_bracket_angle_bracket_right_equal, | ||
| 1826 | .tilde, | ||
| 1827 | .hash, | ||
| 1828 | .hash_hash, | ||
| 1829 | .nl, | ||
| 1830 | }); | ||
| 1831 | } | ||
| 1832 | |||
| 1833 | test "keywords" { | ||
| 1834 | try expectTokens( | ||
| 1835 | \\auto __auto_type break case char const continue default do | ||
| 1836 | \\double else enum extern float for goto if int | ||
| 1837 | \\long register return short signed sizeof static | ||
| 1838 | \\struct switch typedef union unsigned void volatile | ||
| 1839 | \\while _Bool _Complex _Imaginary inline restrict _Alignas | ||
| 1840 | \\_Alignof _Atomic _Generic _Noreturn _Static_assert _Thread_local | ||
| 1841 | \\__attribute __attribute__ | ||
| 1842 | \\ | ||
| 1843 | , &.{ | ||
| 1844 | .keyword_auto, | ||
| 1845 | .keyword_auto_type, | ||
| 1846 | .keyword_break, | ||
| 1847 | .keyword_case, | ||
| 1848 | .keyword_char, | ||
| 1849 | .keyword_const, | ||
| 1850 | .keyword_continue, | ||
| 1851 | .keyword_default, | ||
| 1852 | .keyword_do, | ||
| 1853 | .nl, | ||
| 1854 | .keyword_double, | ||
| 1855 | .keyword_else, | ||
| 1856 | .keyword_enum, | ||
| 1857 | .keyword_extern, | ||
| 1858 | .keyword_float, | ||
| 1859 | .keyword_for, | ||
| 1860 | .keyword_goto, | ||
| 1861 | .keyword_if, | ||
| 1862 | .keyword_int, | ||
| 1863 | .nl, | ||
| 1864 | .keyword_long, | ||
| 1865 | .keyword_register, | ||
| 1866 | .keyword_return, | ||
| 1867 | .keyword_short, | ||
| 1868 | .keyword_signed, | ||
| 1869 | .keyword_sizeof, | ||
| 1870 | .keyword_static, | ||
| 1871 | .nl, | ||
| 1872 | .keyword_struct, | ||
| 1873 | .keyword_switch, | ||
| 1874 | .keyword_typedef, | ||
| 1875 | .keyword_union, | ||
| 1876 | .keyword_unsigned, | ||
| 1877 | .keyword_void, | ||
| 1878 | .keyword_volatile, | ||
| 1879 | .nl, | ||
| 1880 | .keyword_while, | ||
| 1881 | .keyword_bool, | ||
| 1882 | .keyword_complex, | ||
| 1883 | .keyword_imaginary, | ||
| 1884 | .keyword_inline, | ||
| 1885 | .keyword_restrict, | ||
| 1886 | .keyword_alignas, | ||
| 1887 | .nl, | ||
| 1888 | .keyword_alignof, | ||
| 1889 | .keyword_atomic, | ||
| 1890 | .keyword_generic, | ||
| 1891 | .keyword_noreturn, | ||
| 1892 | .keyword_static_assert, | ||
| 1893 | .keyword_thread_local, | ||
| 1894 | .nl, | ||
| 1895 | .keyword_attribute1, | ||
| 1896 | .keyword_attribute2, | ||
| 1897 | .nl, | ||
| 1898 | }); | ||
| 1899 | } | ||
| 1900 | |||
| 1901 | test "preprocessor keywords" { | ||
| 1902 | try expectTokens( | ||
| 1903 | \\#include | ||
| 1904 | \\#include_next | ||
| 1905 | \\#embed | ||
| 1906 | \\#define | ||
| 1907 | \\#ifdef | ||
| 1908 | \\#ifndef | ||
| 1909 | \\#error | ||
| 1910 | \\#pragma | ||
| 1911 | \\ | ||
| 1912 | , &.{ | ||
| 1913 | .hash, | ||
| 1914 | .keyword_include, | ||
| 1915 | .nl, | ||
| 1916 | .hash, | ||
| 1917 | .keyword_include_next, | ||
| 1918 | .nl, | ||
| 1919 | .hash, | ||
| 1920 | .keyword_embed, | ||
| 1921 | .nl, | ||
| 1922 | .hash, | ||
| 1923 | .keyword_define, | ||
| 1924 | .nl, | ||
| 1925 | .hash, | ||
| 1926 | .keyword_ifdef, | ||
| 1927 | .nl, | ||
| 1928 | .hash, | ||
| 1929 | .keyword_ifndef, | ||
| 1930 | .nl, | ||
| 1931 | .hash, | ||
| 1932 | .keyword_error, | ||
| 1933 | .nl, | ||
| 1934 | .hash, | ||
| 1935 | .keyword_pragma, | ||
| 1936 | .nl, | ||
| 1937 | }); | ||
| 1938 | } | ||
| 1939 | |||
| 1940 | test "line continuation" { | ||
| 1941 | try expectTokens( | ||
| 1942 | \\#define foo \ | ||
| 1943 | \\ bar | ||
| 1944 | \\"foo\ | ||
| 1945 | \\ bar" | ||
| 1946 | \\#define "foo" | ||
| 1947 | \\ "bar" | ||
| 1948 | \\#define "foo" \ | ||
| 1949 | \\ "bar" | ||
| 1950 | , &.{ | ||
| 1951 | .hash, | ||
| 1952 | .keyword_define, | ||
| 1953 | .identifier, | ||
| 1954 | .identifier, | ||
| 1955 | .nl, | ||
| 1956 | .string_literal, | ||
| 1957 | .nl, | ||
| 1958 | .hash, | ||
| 1959 | .keyword_define, | ||
| 1960 | .string_literal, | ||
| 1961 | .nl, | ||
| 1962 | .string_literal, | ||
| 1963 | .nl, | ||
| 1964 | .hash, | ||
| 1965 | .keyword_define, | ||
| 1966 | .string_literal, | ||
| 1967 | .string_literal, | ||
| 1968 | }); | ||
| 1969 | } | ||
| 1970 | |||
| 1971 | test "string prefix" { | ||
| 1972 | try expectTokens( | ||
| 1973 | \\"foo" | ||
| 1974 | \\u"foo" | ||
| 1975 | \\u8"foo" | ||
| 1976 | \\U"foo" | ||
| 1977 | \\L"foo" | ||
| 1978 | \\'foo' | ||
| 1979 | \\u8'A' | ||
| 1980 | \\u'foo' | ||
| 1981 | \\U'foo' | ||
| 1982 | \\L'foo' | ||
| 1983 | \\ | ||
| 1984 | , &.{ | ||
| 1985 | .string_literal, | ||
| 1986 | .nl, | ||
| 1987 | .string_literal_utf_16, | ||
| 1988 | .nl, | ||
| 1989 | .string_literal_utf_8, | ||
| 1990 | .nl, | ||
| 1991 | .string_literal_utf_32, | ||
| 1992 | .nl, | ||
| 1993 | .string_literal_wide, | ||
| 1994 | .nl, | ||
| 1995 | .char_literal, | ||
| 1996 | .nl, | ||
| 1997 | .char_literal_utf_8, | ||
| 1998 | .nl, | ||
| 1999 | .char_literal_utf_16, | ||
| 2000 | .nl, | ||
| 2001 | .char_literal_utf_32, | ||
| 2002 | .nl, | ||
| 2003 | .char_literal_wide, | ||
| 2004 | .nl, | ||
| 2005 | }); | ||
| 2006 | } | ||
| 2007 | |||
| 2008 | test "num suffixes" { | ||
| 2009 | try expectTokens( | ||
| 2010 | \\ 1.0f 1.0L 1.0 .0 1. 0x1p0f 0X1p0 | ||
| 2011 | \\ 0l 0lu 0ll 0llu 0 | ||
| 2012 | \\ 1u 1ul 1ull 1 | ||
| 2013 | \\ 1.0i 1.0I | ||
| 2014 | \\ 1.0if 1.0If 1.0fi 1.0fI | ||
| 2015 | \\ 1.0il 1.0Il 1.0li 1.0lI | ||
| 2016 | \\ | ||
| 2017 | , &.{ | ||
| 2018 | .pp_num, | ||
| 2019 | .pp_num, | ||
| 2020 | .pp_num, | ||
| 2021 | .pp_num, | ||
| 2022 | .pp_num, | ||
| 2023 | .pp_num, | ||
| 2024 | .pp_num, | ||
| 2025 | .nl, | ||
| 2026 | .pp_num, | ||
| 2027 | .pp_num, | ||
| 2028 | .pp_num, | ||
| 2029 | .pp_num, | ||
| 2030 | .pp_num, | ||
| 2031 | .nl, | ||
| 2032 | .pp_num, | ||
| 2033 | .pp_num, | ||
| 2034 | .pp_num, | ||
| 2035 | .pp_num, | ||
| 2036 | .nl, | ||
| 2037 | .pp_num, | ||
| 2038 | .pp_num, | ||
| 2039 | .nl, | ||
| 2040 | .pp_num, | ||
| 2041 | .pp_num, | ||
| 2042 | .pp_num, | ||
| 2043 | .pp_num, | ||
| 2044 | .nl, | ||
| 2045 | .pp_num, | ||
| 2046 | .pp_num, | ||
| 2047 | .pp_num, | ||
| 2048 | .pp_num, | ||
| 2049 | .nl, | ||
| 2050 | }); | ||
| 2051 | } | ||
| 2052 | |||
| 2053 | test "comments" { | ||
| 2054 | try expectTokens( | ||
| 2055 | \\//foo | ||
| 2056 | \\#foo | ||
| 2057 | , &.{ | ||
| 2058 | .nl, | ||
| 2059 | .hash, | ||
| 2060 | .identifier, | ||
| 2061 | }); | ||
| 2062 | } | ||
| 2063 | |||
| 2064 | test "extended identifiers" { | ||
| 2065 | try expectTokens("𝓪𝓻𝓸𝓬𝓬", &.{.extended_identifier}); | ||
| 2066 | try expectTokens("u𝓪𝓻𝓸𝓬𝓬", &.{.extended_identifier}); | ||
| 2067 | try expectTokens("u8𝓪𝓻𝓸𝓬𝓬", &.{.extended_identifier}); | ||
| 2068 | try expectTokens("U𝓪𝓻𝓸𝓬𝓬", &.{.extended_identifier}); | ||
| 2069 | try expectTokens("L𝓪𝓻𝓸𝓬𝓬", &.{.extended_identifier}); | ||
| 2070 | try expectTokens("1™", &.{ .pp_num, .extended_identifier }); | ||
| 2071 | try expectTokens("1.™", &.{ .pp_num, .extended_identifier }); | ||
| 2072 | try expectTokens("..™", &.{ .period, .period, .extended_identifier }); | ||
| 2073 | try expectTokens("0™", &.{ .pp_num, .extended_identifier }); | ||
| 2074 | try expectTokens("0b\u{E0000}", &.{ .pp_num, .extended_identifier }); | ||
| 2075 | try expectTokens("0b0\u{E0000}", &.{ .pp_num, .extended_identifier }); | ||
| 2076 | try expectTokens("01\u{E0000}", &.{ .pp_num, .extended_identifier }); | ||
| 2077 | try expectTokens("010\u{E0000}", &.{ .pp_num, .extended_identifier }); | ||
| 2078 | try expectTokens("0x\u{E0000}", &.{ .pp_num, .extended_identifier }); | ||
| 2079 | try expectTokens("0x0\u{E0000}", &.{ .pp_num, .extended_identifier }); | ||
| 2080 | try expectTokens("\"\\0\u{E0000}\"", &.{.string_literal}); | ||
| 2081 | try expectTokens("\"\\x\u{E0000}\"", &.{.string_literal}); | ||
| 2082 | try expectTokens("\"\\u\u{E0000}\"", &.{.string_literal}); | ||
| 2083 | try expectTokens("1e\u{E0000}", &.{ .pp_num, .extended_identifier }); | ||
| 2084 | try expectTokens("1e1\u{E0000}", &.{ .pp_num, .extended_identifier }); | ||
| 2085 | } | ||
| 2086 | |||
| 2087 | test "digraphs" { | ||
| 2088 | try expectTokens("%:<::><%%>%:%:", &.{ .hash, .l_bracket, .r_bracket, .l_brace, .r_brace, .hash_hash }); | ||
| 2089 | try expectTokens("\"%:<::><%%>%:%:\"", &.{.string_literal}); | ||
| 2090 | try expectTokens("%:%42 %:%", &.{ .hash, .percent, .pp_num, .hash, .percent }); | ||
| 2091 | } | ||
| 2092 | |||
| 2093 | test "C23 keywords" { | ||
| 2094 | try expectTokensExtra("true false alignas alignof bool static_assert thread_local nullptr", &.{ | ||
| 2095 | .keyword_true, | ||
| 2096 | .keyword_false, | ||
| 2097 | .keyword_c23_alignas, | ||
| 2098 | .keyword_c23_alignof, | ||
| 2099 | .keyword_c23_bool, | ||
| 2100 | .keyword_c23_static_assert, | ||
| 2101 | .keyword_c23_thread_local, | ||
| 2102 | .keyword_nullptr, | ||
| 2103 | }, .c2x); | ||
| 2104 | } | ||
| 2105 | |||
| 2106 | fn expectTokensExtra(contents: []const u8, expected_tokens: []const Token.Id, standard: ?LangOpts.Standard) !void { | ||
| 2107 | var comp = Compilation.init(std.testing.allocator); | ||
| 2108 | defer comp.deinit(); | ||
| 2109 | if (standard) |provided| { | ||
| 2110 | comp.langopts.standard = provided; | ||
| 2111 | } | ||
| 2112 | const source = try comp.addSourceFromBuffer("path", contents); | ||
| 2113 | var tokenizer = Tokenizer{ | ||
| 2114 | .buf = source.buf, | ||
| 2115 | .source = source.id, | ||
| 2116 | .comp = &comp, | ||
| 2117 | }; | ||
| 2118 | var i: usize = 0; | ||
| 2119 | while (i < expected_tokens.len) { | ||
| 2120 | const token = tokenizer.next(); | ||
| 2121 | if (token.id == .whitespace) continue; | ||
| 2122 | const expected_token_id = expected_tokens[i]; | ||
| 2123 | i += 1; | ||
| 2124 | if (!std.meta.eql(token.id, expected_token_id)) { | ||
| 2125 | std.debug.print("expected {s}, found {s}\n", .{ @tagName(expected_token_id), @tagName(token.id) }); | ||
| 2126 | return error.TokensDoNotEqual; | ||
| 2127 | } | ||
| 2128 | } | ||
| 2129 | const last_token = tokenizer.next(); | ||
| 2130 | try std.testing.expect(last_token.id == .eof); | ||
| 2131 | } | ||
| 2132 | |||
| 2133 | fn expectTokens(contents: []const u8, expected_tokens: []const Token.Id) !void { | ||
| 2134 | return expectTokensExtra(contents, expected_tokens, null); | ||
| 2135 | } | ||
deps/aro/Toolchain.zig deleted-493| ... | @@ -1,493 +0,0 @@ | ||
| 1 | const std = @import("std"); | ||
| 2 | const Driver = @import("Driver.zig"); | ||
| 3 | const Compilation = @import("Compilation.zig"); | ||
| 4 | const util = @import("util.zig"); | ||
| 5 | const mem = std.mem; | ||
| 6 | const system_defaults = @import("system_defaults"); | ||
| 7 | const target_util = @import("target.zig"); | ||
| 8 | const Linux = @import("toolchains/Linux.zig"); | ||
| 9 | const Multilib = @import("Driver/Multilib.zig"); | ||
| 10 | const Filesystem = @import("Driver/Filesystem.zig").Filesystem; | ||
| 11 | |||
| 12 | const Toolchain = @This(); | ||
| 13 | |||
| 14 | pub const PathList = std.ArrayListUnmanaged([]const u8); | ||
| 15 | |||
| 16 | pub const RuntimeLibKind = enum { | ||
| 17 | compiler_rt, | ||
| 18 | libgcc, | ||
| 19 | }; | ||
| 20 | |||
| 21 | pub const FileKind = enum { | ||
| 22 | object, | ||
| 23 | static, | ||
| 24 | shared, | ||
| 25 | }; | ||
| 26 | |||
| 27 | pub const LibGCCKind = enum { | ||
| 28 | unspecified, | ||
| 29 | static, | ||
| 30 | shared, | ||
| 31 | }; | ||
| 32 | |||
| 33 | pub const UnwindLibKind = enum { | ||
| 34 | none, | ||
| 35 | compiler_rt, | ||
| 36 | libgcc, | ||
| 37 | }; | ||
| 38 | |||
| 39 | const Inner = union(enum) { | ||
| 40 | uninitialized, | ||
| 41 | linux: Linux, | ||
| 42 | unknown: void, | ||
| 43 | |||
| 44 | fn deinit(self: *Inner, allocator: mem.Allocator) void { | ||
| 45 | switch (self.*) { | ||
| 46 | .linux => |*linux| linux.deinit(allocator), | ||
| 47 | .uninitialized, .unknown => {}, | ||
| 48 | } | ||
| 49 | } | ||
| 50 | }; | ||
| 51 | |||
| 52 | filesystem: Filesystem = .{ .real = {} }, | ||
| 53 | driver: *Driver, | ||
| 54 | arena: mem.Allocator, | ||
| 55 | |||
| 56 | /// The list of toolchain specific path prefixes to search for libraries. | ||
| 57 | library_paths: PathList = .{}, | ||
| 58 | |||
| 59 | /// The list of toolchain specific path prefixes to search for files. | ||
| 60 | file_paths: PathList = .{}, | ||
| 61 | |||
| 62 | /// The list of toolchain specific path prefixes to search for programs. | ||
| 63 | program_paths: PathList = .{}, | ||
| 64 | |||
| 65 | selected_multilib: Multilib = .{}, | ||
| 66 | |||
| 67 | inner: Inner = .{ .uninitialized = {} }, | ||
| 68 | |||
| 69 | pub fn getTarget(tc: *const Toolchain) std.Target { | ||
| 70 | return tc.driver.comp.target; | ||
| 71 | } | ||
| 72 | |||
| 73 | fn getDefaultLinker(tc: *const Toolchain) []const u8 { | ||
| 74 | return switch (tc.inner) { | ||
| 75 | .uninitialized => unreachable, | ||
| 76 | .linux => |linux| linux.getDefaultLinker(tc.getTarget()), | ||
| 77 | .unknown => "ld", | ||
| 78 | }; | ||
| 79 | } | ||
| 80 | |||
| 81 | /// Call this after driver has finished parsing command line arguments to find the toolchain | ||
| 82 | pub fn discover(tc: *Toolchain) !void { | ||
| 83 | if (tc.inner != .uninitialized) return; | ||
| 84 | |||
| 85 | const target = tc.getTarget(); | ||
| 86 | tc.inner = switch (target.os.tag) { | ||
| 87 | .elfiamcu, | ||
| 88 | .linux, | ||
| 89 | => if (target.cpu.arch == .hexagon) | ||
| 90 | .{ .unknown = {} } // TODO | ||
| 91 | else if (target.cpu.arch.isMIPS()) | ||
| 92 | .{ .unknown = {} } // TODO | ||
| 93 | else if (target.cpu.arch.isPPC()) | ||
| 94 | .{ .unknown = {} } // TODO | ||
| 95 | else if (target.cpu.arch == .ve) | ||
| 96 | .{ .unknown = {} } // TODO | ||
| 97 | else | ||
| 98 | .{ .linux = .{} }, | ||
| 99 | else => .{ .unknown = {} }, // TODO | ||
| 100 | }; | ||
| 101 | return switch (tc.inner) { | ||
| 102 | .uninitialized => unreachable, | ||
| 103 | .linux => |*linux| linux.discover(tc), | ||
| 104 | .unknown => {}, | ||
| 105 | }; | ||
| 106 | } | ||
| 107 | |||
| 108 | pub fn deinit(tc: *Toolchain) void { | ||
| 109 | const gpa = tc.driver.comp.gpa; | ||
| 110 | tc.inner.deinit(gpa); | ||
| 111 | |||
| 112 | tc.library_paths.deinit(gpa); | ||
| 113 | tc.file_paths.deinit(gpa); | ||
| 114 | tc.program_paths.deinit(gpa); | ||
| 115 | } | ||
| 116 | |||
| 117 | /// Write linker path to `buf` and return a slice of it | ||
| 118 | pub fn getLinkerPath(tc: *const Toolchain, buf: []u8) ![]const u8 { | ||
| 119 | // --ld-path= takes precedence over -fuse-ld= and specifies the executable | ||
| 120 | // name. -B, COMPILER_PATH and PATH are consulted if the value does not | ||
| 121 | // contain a path component separator. | ||
| 122 | // -fuse-ld=lld can be used with --ld-path= to indicate that the binary | ||
| 123 | // that --ld-path= points to is lld. | ||
| 124 | const use_linker = tc.driver.use_linker orelse system_defaults.linker; | ||
| 125 | |||
| 126 | if (tc.driver.linker_path) |ld_path| { | ||
| 127 | var path = ld_path; | ||
| 128 | if (path.len > 0) { | ||
| 129 | if (std.fs.path.dirname(path) == null) { | ||
| 130 | path = tc.getProgramPath(path, buf); | ||
| 131 | } | ||
| 132 | if (tc.filesystem.canExecute(path)) { | ||
| 133 | return path; | ||
| 134 | } | ||
| 135 | } | ||
| 136 | return tc.driver.fatal( | ||
| 137 | "invalid linker name in argument '--ld-path={s}'", | ||
| 138 | .{path}, | ||
| 139 | ); | ||
| 140 | } | ||
| 141 | |||
| 142 | // If we're passed -fuse-ld= with no argument, or with the argument ld, | ||
| 143 | // then use whatever the default system linker is. | ||
| 144 | if (use_linker.len == 0 or mem.eql(u8, use_linker, "ld")) { | ||
| 145 | const default = tc.getDefaultLinker(); | ||
| 146 | if (std.fs.path.isAbsolute(default)) return default; | ||
| 147 | return tc.getProgramPath(default, buf); | ||
| 148 | } | ||
| 149 | |||
| 150 | // Extending -fuse-ld= to an absolute or relative path is unexpected. Checking | ||
| 151 | // for the linker flavor is brittle. In addition, prepending "ld." or "ld64." | ||
| 152 | // to a relative path is surprising. This is more complex due to priorities | ||
| 153 | // among -B, COMPILER_PATH and PATH. --ld-path= should be used instead. | ||
| 154 | if (mem.indexOfScalar(u8, use_linker, '/') != null) { | ||
| 155 | try tc.driver.comp.diag.add(.{ .tag = .fuse_ld_path }, &.{}); | ||
| 156 | } | ||
| 157 | |||
| 158 | if (std.fs.path.isAbsolute(use_linker)) { | ||
| 159 | if (tc.filesystem.canExecute(use_linker)) { | ||
| 160 | return use_linker; | ||
| 161 | } | ||
| 162 | } else { | ||
| 163 | var linker_name = try std.ArrayList(u8).initCapacity(tc.driver.comp.gpa, 5 + use_linker.len); // "ld64." ++ use_linker | ||
| 164 | defer linker_name.deinit(); | ||
| 165 | if (tc.getTarget().isDarwin()) { | ||
| 166 | linker_name.appendSliceAssumeCapacity("ld64."); | ||
| 167 | } else { | ||
| 168 | linker_name.appendSliceAssumeCapacity("ld."); | ||
| 169 | } | ||
| 170 | linker_name.appendSliceAssumeCapacity(use_linker); | ||
| 171 | const linker_path = tc.getProgramPath(linker_name.items, buf); | ||
| 172 | if (tc.filesystem.canExecute(linker_path)) { | ||
| 173 | return linker_path; | ||
| 174 | } | ||
| 175 | } | ||
| 176 | |||
| 177 | if (tc.driver.use_linker) |linker| { | ||
| 178 | return tc.driver.fatal( | ||
| 179 | "invalid linker name in argument '-fuse-ld={s}'", | ||
| 180 | .{linker}, | ||
| 181 | ); | ||
| 182 | } | ||
| 183 | const default_linker = tc.getDefaultLinker(); | ||
| 184 | return tc.getProgramPath(default_linker, buf); | ||
| 185 | } | ||
| 186 | |||
| 187 | const TargetSpecificToolName = std.BoundedArray(u8, 64); | ||
| 188 | |||
| 189 | /// If an explicit target is provided, also check the prefixed tool-specific name | ||
| 190 | /// TODO: this isn't exactly right since our target names don't necessarily match up | ||
| 191 | /// with GCC's. | ||
| 192 | /// For example the Zig target `arm-freestanding-eabi` would need the `arm-none-eabi` tools | ||
| 193 | fn possibleProgramNames(raw_triple: ?[]const u8, name: []const u8, target_specific: *TargetSpecificToolName) std.BoundedArray([]const u8, 2) { | ||
| 194 | var possible_names: std.BoundedArray([]const u8, 2) = .{}; | ||
| 195 | if (raw_triple) |triple| { | ||
| 196 | const w = target_specific.writer(); | ||
| 197 | if (w.print("{s}-{s}", .{ triple, name })) { | ||
| 198 | possible_names.appendAssumeCapacity(target_specific.constSlice()); | ||
| 199 | } else |_| {} | ||
| 200 | } | ||
| 201 | possible_names.appendAssumeCapacity(name); | ||
| 202 | |||
| 203 | return possible_names; | ||
| 204 | } | ||
| 205 | |||
| 206 | /// Add toolchain `file_paths` to argv as `-L` arguments | ||
| 207 | pub fn addFilePathLibArgs(tc: *const Toolchain, argv: *std.ArrayList([]const u8)) !void { | ||
| 208 | try argv.ensureUnusedCapacity(tc.file_paths.items.len); | ||
| 209 | |||
| 210 | var bytes_needed: usize = 0; | ||
| 211 | for (tc.file_paths.items) |path| { | ||
| 212 | bytes_needed += path.len + 2; // +2 for `-L` | ||
| 213 | } | ||
| 214 | var bytes = try tc.arena.alloc(u8, bytes_needed); | ||
| 215 | var index: usize = 0; | ||
| 216 | for (tc.file_paths.items) |path| { | ||
| 217 | @memcpy(bytes[index..][0..2], "-L"); | ||
| 218 | @memcpy(bytes[index + 2 ..][0..path.len], path); | ||
| 219 | argv.appendAssumeCapacity(bytes[index..][0 .. path.len + 2]); | ||
| 220 | index += path.len + 2; | ||
| 221 | } | ||
| 222 | } | ||
| 223 | |||
| 224 | /// Search for an executable called `name` or `{triple}-{name} in program_paths and the $PATH environment variable | ||
| 225 | /// If not found there, just use `name` | ||
| 226 | /// Writes the result to `buf` and returns a slice of it | ||
| 227 | fn getProgramPath(tc: *const Toolchain, name: []const u8, buf: []u8) []const u8 { | ||
| 228 | var path_buf: [std.fs.MAX_PATH_BYTES]u8 = undefined; | ||
| 229 | var fib = std.heap.FixedBufferAllocator.init(&path_buf); | ||
| 230 | |||
| 231 | var tool_specific_name: TargetSpecificToolName = .{}; | ||
| 232 | const possible_names = possibleProgramNames(tc.driver.raw_target_triple, name, &tool_specific_name); | ||
| 233 | |||
| 234 | for (possible_names.constSlice()) |tool_name| { | ||
| 235 | for (tc.program_paths.items) |program_path| { | ||
| 236 | defer fib.reset(); | ||
| 237 | |||
| 238 | const candidate = std.fs.path.join(fib.allocator(), &.{ program_path, tool_name }) catch continue; | ||
| 239 | |||
| 240 | if (tc.filesystem.canExecute(candidate) and candidate.len <= buf.len) { | ||
| 241 | @memcpy(buf[0..candidate.len], candidate); | ||
| 242 | return buf[0..candidate.len]; | ||
| 243 | } | ||
| 244 | } | ||
| 245 | return tc.filesystem.findProgramByName(tc.driver.comp.gpa, name, tc.driver.comp.environment.path, buf) orelse continue; | ||
| 246 | } | ||
| 247 | @memcpy(buf[0..name.len], name); | ||
| 248 | return buf[0..name.len]; | ||
| 249 | } | ||
| 250 | |||
| 251 | pub fn getSysroot(tc: *const Toolchain) []const u8 { | ||
| 252 | return tc.driver.sysroot orelse system_defaults.sysroot; | ||
| 253 | } | ||
| 254 | |||
| 255 | /// Search for `name` in a variety of places | ||
| 256 | /// TODO: cache results based on `name` so we're not repeatedly allocating the same strings? | ||
| 257 | pub fn getFilePath(tc: *const Toolchain, name: []const u8) ![]const u8 { | ||
| 258 | var path_buf: [std.fs.MAX_PATH_BYTES]u8 = undefined; | ||
| 259 | var fib = std.heap.FixedBufferAllocator.init(&path_buf); | ||
| 260 | const allocator = fib.allocator(); | ||
| 261 | |||
| 262 | const sysroot = tc.getSysroot(); | ||
| 263 | |||
| 264 | // todo check resource dir | ||
| 265 | // todo check compiler RT path | ||
| 266 | const aro_dir = std.fs.path.dirname(tc.driver.aro_name) orelse ""; | ||
| 267 | const candidate = try std.fs.path.join(allocator, &.{ aro_dir, "..", name }); | ||
| 268 | if (tc.filesystem.exists(candidate)) { | ||
| 269 | return tc.arena.dupe(u8, candidate); | ||
| 270 | } | ||
| 271 | |||
| 272 | if (tc.searchPaths(&fib, sysroot, tc.library_paths.items, name)) |path| { | ||
| 273 | return tc.arena.dupe(u8, path); | ||
| 274 | } | ||
| 275 | |||
| 276 | if (tc.searchPaths(&fib, sysroot, tc.file_paths.items, name)) |path| { | ||
| 277 | return try tc.arena.dupe(u8, path); | ||
| 278 | } | ||
| 279 | |||
| 280 | return name; | ||
| 281 | } | ||
| 282 | |||
| 283 | /// Search a list of `path_prefixes` for the existence `name` | ||
| 284 | /// Assumes that `fba` is a fixed-buffer allocator, so does not free joined path candidates | ||
| 285 | fn searchPaths(tc: *const Toolchain, fib: *std.heap.FixedBufferAllocator, sysroot: []const u8, path_prefixes: []const []const u8, name: []const u8) ?[]const u8 { | ||
| 286 | for (path_prefixes) |path| { | ||
| 287 | fib.reset(); | ||
| 288 | if (path.len == 0) continue; | ||
| 289 | |||
| 290 | const candidate = if (path[0] == '=') | ||
| 291 | std.fs.path.join(fib.allocator(), &.{ sysroot, path[1..], name }) catch continue | ||
| 292 | else | ||
| 293 | std.fs.path.join(fib.allocator(), &.{ path, name }) catch continue; | ||
| 294 | |||
| 295 | if (tc.filesystem.exists(candidate)) { | ||
| 296 | return candidate; | ||
| 297 | } | ||
| 298 | } | ||
| 299 | return null; | ||
| 300 | } | ||
| 301 | |||
| 302 | const PathKind = enum { | ||
| 303 | library, | ||
| 304 | file, | ||
| 305 | program, | ||
| 306 | }; | ||
| 307 | |||
| 308 | /// Join `components` into a path. If the path exists, dupe it into the toolchain arena and | ||
| 309 | /// add it to the specified path list. | ||
| 310 | pub fn addPathIfExists(tc: *Toolchain, components: []const []const u8, dest_kind: PathKind) !void { | ||
| 311 | var path_buf: [std.fs.MAX_PATH_BYTES]u8 = undefined; | ||
| 312 | var fib = std.heap.FixedBufferAllocator.init(&path_buf); | ||
| 313 | |||
| 314 | const candidate = try std.fs.path.join(fib.allocator(), components); | ||
| 315 | |||
| 316 | if (tc.filesystem.exists(candidate)) { | ||
| 317 | const duped = try tc.arena.dupe(u8, candidate); | ||
| 318 | const dest = switch (dest_kind) { | ||
| 319 | .library => &tc.library_paths, | ||
| 320 | .file => &tc.file_paths, | ||
| 321 | .program => &tc.program_paths, | ||
| 322 | }; | ||
| 323 | try dest.append(tc.driver.comp.gpa, duped); | ||
| 324 | } | ||
| 325 | } | ||
| 326 | |||
| 327 | /// Join `components` using the toolchain arena and add the resulting path to `dest_kind`. Does not check | ||
| 328 | /// whether the path actually exists | ||
| 329 | pub fn addPathFromComponents(tc: *Toolchain, components: []const []const u8, dest_kind: PathKind) !void { | ||
| 330 | const full_path = try std.fs.path.join(tc.arena, components); | ||
| 331 | const dest = switch (dest_kind) { | ||
| 332 | .library => &tc.library_paths, | ||
| 333 | .file => &tc.file_paths, | ||
| 334 | .program => &tc.program_paths, | ||
| 335 | }; | ||
| 336 | try dest.append(tc.driver.comp.gpa, full_path); | ||
| 337 | } | ||
| 338 | |||
| 339 | /// Add linker args to `argv`. Does not add path to linker executable as first item; that must be handled separately | ||
| 340 | /// Items added to `argv` will be string literals or owned by `tc.arena` so they must not be individually freed | ||
| 341 | pub fn buildLinkerArgs(tc: *Toolchain, argv: *std.ArrayList([]const u8)) !void { | ||
| 342 | return switch (tc.inner) { | ||
| 343 | .uninitialized => unreachable, | ||
| 344 | .linux => |*linux| linux.buildLinkerArgs(tc, argv), | ||
| 345 | .unknown => @panic("This toolchain does not support linking yet"), | ||
| 346 | }; | ||
| 347 | } | ||
| 348 | |||
| 349 | fn getDefaultRuntimeLibKind(tc: *const Toolchain) RuntimeLibKind { | ||
| 350 | if (tc.getTarget().isAndroid()) { | ||
| 351 | return .compiler_rt; | ||
| 352 | } | ||
| 353 | return .libgcc; | ||
| 354 | } | ||
| 355 | |||
| 356 | pub fn getRuntimeLibKind(tc: *const Toolchain) RuntimeLibKind { | ||
| 357 | const libname = tc.driver.rtlib orelse system_defaults.rtlib; | ||
| 358 | if (mem.eql(u8, libname, "compiler-rt")) | ||
| 359 | return .compiler_rt | ||
| 360 | else if (mem.eql(u8, libname, "libgcc")) | ||
| 361 | return .libgcc | ||
| 362 | else | ||
| 363 | return tc.getDefaultRuntimeLibKind(); | ||
| 364 | } | ||
| 365 | |||
| 366 | /// TODO | ||
| 367 | pub fn getCompilerRt(tc: *const Toolchain, component: []const u8, file_kind: FileKind) ![]const u8 { | ||
| 368 | _ = file_kind; | ||
| 369 | _ = component; | ||
| 370 | _ = tc; | ||
| 371 | return ""; | ||
| 372 | } | ||
| 373 | |||
| 374 | fn getLibGCCKind(tc: *const Toolchain) LibGCCKind { | ||
| 375 | const target = tc.getTarget(); | ||
| 376 | if (tc.driver.static_libgcc or tc.driver.static or tc.driver.static_pie or target.isAndroid()) { | ||
| 377 | return .static; | ||
| 378 | } | ||
| 379 | if (tc.driver.shared_libgcc) { | ||
| 380 | return .shared; | ||
| 381 | } | ||
| 382 | return .unspecified; | ||
| 383 | } | ||
| 384 | |||
| 385 | fn getUnwindLibKind(tc: *const Toolchain) !UnwindLibKind { | ||
| 386 | const libname = tc.driver.unwindlib orelse system_defaults.unwindlib; | ||
| 387 | if (libname.len == 0 or mem.eql(u8, libname, "platform")) { | ||
| 388 | switch (tc.getRuntimeLibKind()) { | ||
| 389 | .compiler_rt => { | ||
| 390 | const target = tc.getTarget(); | ||
| 391 | if (target.isAndroid() or target.os.tag == .aix) { | ||
| 392 | return .compiler_rt; | ||
| 393 | } else { | ||
| 394 | return .none; | ||
| 395 | } | ||
| 396 | }, | ||
| 397 | .libgcc => return .libgcc, | ||
| 398 | } | ||
| 399 | } else if (mem.eql(u8, libname, "none")) { | ||
| 400 | return .none; | ||
| 401 | } else if (mem.eql(u8, libname, "libgcc")) { | ||
| 402 | return .libgcc; | ||
| 403 | } else if (mem.eql(u8, libname, "libunwind")) { | ||
| 404 | if (tc.getRuntimeLibKind() == .libgcc) { | ||
| 405 | try tc.driver.comp.diag.add(.{ .tag = .incompatible_unwindlib }, &.{}); | ||
| 406 | } | ||
| 407 | return .compiler_rt; | ||
| 408 | } else { | ||
| 409 | unreachable; | ||
| 410 | } | ||
| 411 | } | ||
| 412 | |||
| 413 | fn getAsNeededOption(is_solaris: bool, needed: bool) []const u8 { | ||
| 414 | if (is_solaris) { | ||
| 415 | return if (needed) "-zignore" else "-zrecord"; | ||
| 416 | } else { | ||
| 417 | return if (needed) "--as-needed" else "--no-as-needed"; | ||
| 418 | } | ||
| 419 | } | ||
| 420 | |||
| 421 | fn addUnwindLibrary(tc: *const Toolchain, argv: *std.ArrayList([]const u8)) !void { | ||
| 422 | const unw = try tc.getUnwindLibKind(); | ||
| 423 | const target = tc.getTarget(); | ||
| 424 | if ((target.isAndroid() and unw == .libgcc) or | ||
| 425 | target.os.tag == .elfiamcu or | ||
| 426 | target.ofmt == .wasm or | ||
| 427 | target_util.isWindowsMSVCEnvironment(target) or | ||
| 428 | unw == .none) return; | ||
| 429 | |||
| 430 | const lgk = tc.getLibGCCKind(); | ||
| 431 | const as_needed = lgk == .unspecified and !target.isAndroid() and !target_util.isCygwinMinGW(target) and target.os.tag != .aix; | ||
| 432 | if (as_needed) { | ||
| 433 | try argv.append(getAsNeededOption(target.os.tag == .solaris, true)); | ||
| 434 | } | ||
| 435 | switch (unw) { | ||
| 436 | .none => return, | ||
| 437 | .libgcc => if (lgk == .static) try argv.append("-lgcc_eh") else try argv.append("-lgcc_s"), | ||
| 438 | .compiler_rt => if (target.os.tag == .aix) { | ||
| 439 | if (lgk != .static) { | ||
| 440 | try argv.append("-lunwind"); | ||
| 441 | } | ||
| 442 | } else if (lgk == .static) { | ||
| 443 | try argv.append("-l:libunwind.a"); | ||
| 444 | } else if (lgk == .shared) { | ||
| 445 | if (target_util.isCygwinMinGW(target)) { | ||
| 446 | try argv.append("-l:libunwind.dll.a"); | ||
| 447 | } else { | ||
| 448 | try argv.append("-l:libunwind.so"); | ||
| 449 | } | ||
| 450 | } else { | ||
| 451 | try argv.append("-lunwind"); | ||
| 452 | }, | ||
| 453 | } | ||
| 454 | |||
| 455 | if (as_needed) { | ||
| 456 | try argv.append(getAsNeededOption(target.os.tag == .solaris, false)); | ||
| 457 | } | ||
| 458 | } | ||
| 459 | |||
| 460 | fn addLibGCC(tc: *const Toolchain, argv: *std.ArrayList([]const u8)) !void { | ||
| 461 | const libgcc_kind = tc.getLibGCCKind(); | ||
| 462 | if (libgcc_kind == .static or libgcc_kind == .unspecified) { | ||
| 463 | try argv.append("-lgcc"); | ||
| 464 | } | ||
| 465 | try tc.addUnwindLibrary(argv); | ||
| 466 | if (libgcc_kind == .shared) { | ||
| 467 | try argv.append("-lgcc"); | ||
| 468 | } | ||
| 469 | } | ||
| 470 | |||
| 471 | pub fn addRuntimeLibs(tc: *const Toolchain, argv: *std.ArrayList([]const u8)) !void { | ||
| 472 | const target = tc.getTarget(); | ||
| 473 | const rlt = tc.getRuntimeLibKind(); | ||
| 474 | switch (rlt) { | ||
| 475 | .compiler_rt => { | ||
| 476 | // TODO | ||
| 477 | }, | ||
| 478 | .libgcc => { | ||
| 479 | if (target_util.isKnownWindowsMSVCEnvironment(target)) { | ||
| 480 | const rtlib_str = tc.driver.rtlib orelse system_defaults.rtlib; | ||
| 481 | if (!mem.eql(u8, rtlib_str, "platform")) { | ||
| 482 | try tc.driver.comp.diag.add(.{ .tag = .unsupported_rtlib_gcc, .extra = .{ .str = "MSVC" } }, &.{}); | ||
| 483 | } | ||
| 484 | } else { | ||
| 485 | try tc.addLibGCC(argv); | ||
| 486 | } | ||
| 487 | }, | ||
| 488 | } | ||
| 489 | |||
| 490 | if (target.isAndroid() and !tc.driver.static and !tc.driver.static_pie) { | ||
| 491 | try argv.append("-ldl"); | ||
| 492 | } | ||
| 493 | } | ||
deps/aro/Tree.zig deleted-1315| ... | @@ -1,1315 +0,0 @@ | ||
| 1 | const std = @import("std"); | ||
| 2 | const Type = @import("Type.zig"); | ||
| 3 | const Tokenizer = @import("Tokenizer.zig"); | ||
| 4 | const Compilation = @import("Compilation.zig"); | ||
| 5 | const Source = @import("Source.zig"); | ||
| 6 | const Attribute = @import("Attribute.zig"); | ||
| 7 | const Value = @import("Value.zig"); | ||
| 8 | const StringInterner = @import("StringInterner.zig"); | ||
| 9 | |||
| 10 | const Tree = @This(); | ||
| 11 | |||
| 12 | pub const Token = struct { | ||
| 13 | id: Id, | ||
| 14 | flags: packed struct { | ||
| 15 | expansion_disabled: bool = false, | ||
| 16 | is_macro_arg: bool = false, | ||
| 17 | } = .{}, | ||
| 18 | /// This location contains the actual token slice which might be generated. | ||
| 19 | /// If it is generated then there is guaranteed to be at least one | ||
| 20 | /// expansion location. | ||
| 21 | loc: Source.Location, | ||
| 22 | expansion_locs: ?[*]Source.Location = null, | ||
| 23 | |||
| 24 | pub fn expansionSlice(tok: Token) []const Source.Location { | ||
| 25 | const locs = tok.expansion_locs orelse return &[0]Source.Location{}; | ||
| 26 | var i: usize = 0; | ||
| 27 | while (locs[i].id != .unused) : (i += 1) {} | ||
| 28 | return locs[0..i]; | ||
| 29 | } | ||
| 30 | |||
| 31 | pub fn addExpansionLocation(tok: *Token, gpa: std.mem.Allocator, new: []const Source.Location) !void { | ||
| 32 | if (new.len == 0 or tok.id == .whitespace) return; | ||
| 33 | var list = std.ArrayList(Source.Location).init(gpa); | ||
| 34 | defer { | ||
| 35 | @memset(list.items.ptr[list.items.len..list.capacity], .{}); | ||
| 36 | // Add a sentinel to indicate the end of the list since | ||
| 37 | // the ArrayList's capacity isn't guaranteed to be exactly | ||
| 38 | // what we ask for. | ||
| 39 | if (list.capacity > 0) { | ||
| 40 | list.items.ptr[list.capacity - 1].byte_offset = 1; | ||
| 41 | } | ||
| 42 | tok.expansion_locs = list.items.ptr; | ||
| 43 | } | ||
| 44 | |||
| 45 | if (tok.expansion_locs) |locs| { | ||
| 46 | var i: usize = 0; | ||
| 47 | while (locs[i].id != .unused) : (i += 1) {} | ||
| 48 | list.items = locs[0..i]; | ||
| 49 | while (locs[i].byte_offset != 1) : (i += 1) {} | ||
| 50 | list.capacity = i + 1; | ||
| 51 | } | ||
| 52 | |||
| 53 | const min_len = @max(list.items.len + new.len + 1, 4); | ||
| 54 | const wanted_len = std.math.ceilPowerOfTwo(usize, min_len) catch | ||
| 55 | return error.OutOfMemory; | ||
| 56 | try list.ensureTotalCapacity(wanted_len); | ||
| 57 | |||
| 58 | for (new) |new_loc| { | ||
| 59 | if (new_loc.id == .generated) continue; | ||
| 60 | list.appendAssumeCapacity(new_loc); | ||
| 61 | } | ||
| 62 | } | ||
| 63 | |||
| 64 | pub fn free(expansion_locs: ?[*]Source.Location, gpa: std.mem.Allocator) void { | ||
| 65 | const locs = expansion_locs orelse return; | ||
| 66 | var i: usize = 0; | ||
| 67 | while (locs[i].id != .unused) : (i += 1) {} | ||
| 68 | while (locs[i].byte_offset != 1) : (i += 1) {} | ||
| 69 | gpa.free(locs[0 .. i + 1]); | ||
| 70 | } | ||
| 71 | |||
| 72 | pub fn dupe(tok: Token, gpa: std.mem.Allocator) !Token { | ||
| 73 | var copy = tok; | ||
| 74 | copy.expansion_locs = null; | ||
| 75 | try copy.addExpansionLocation(gpa, tok.expansionSlice()); | ||
| 76 | return copy; | ||
| 77 | } | ||
| 78 | |||
| 79 | pub fn checkMsEof(tok: Token, source: Source, comp: *Compilation) !void { | ||
| 80 | std.debug.assert(tok.id == .eof); | ||
| 81 | if (source.buf.len > tok.loc.byte_offset and source.buf[tok.loc.byte_offset] == 0x1A) { | ||
| 82 | try comp.diag.add(.{ | ||
| 83 | .tag = .ctrl_z_eof, | ||
| 84 | .loc = .{ | ||
| 85 | .id = source.id, | ||
| 86 | .byte_offset = tok.loc.byte_offset, | ||
| 87 | .line = tok.loc.line, | ||
| 88 | }, | ||
| 89 | }, &.{}); | ||
| 90 | } | ||
| 91 | } | ||
| 92 | |||
| 93 | pub const List = std.MultiArrayList(Token); | ||
| 94 | pub const Id = Tokenizer.Token.Id; | ||
| 95 | }; | ||
| 96 | |||
| 97 | pub const TokenIndex = u32; | ||
| 98 | pub const NodeIndex = enum(u32) { none, _ }; | ||
| 99 | pub const ValueMap = std.AutoHashMap(NodeIndex, Value); | ||
| 100 | |||
| 101 | comp: *Compilation, | ||
| 102 | arena: std.heap.ArenaAllocator, | ||
| 103 | generated: []const u8, | ||
| 104 | tokens: Token.List.Slice, | ||
| 105 | nodes: Node.List.Slice, | ||
| 106 | data: []const NodeIndex, | ||
| 107 | root_decls: []const NodeIndex, | ||
| 108 | strings: []const u8, | ||
| 109 | value_map: ValueMap, | ||
| 110 | |||
| 111 | pub fn deinit(tree: *Tree) void { | ||
| 112 | tree.comp.gpa.free(tree.root_decls); | ||
| 113 | tree.comp.gpa.free(tree.data); | ||
| 114 | tree.comp.gpa.free(tree.strings); | ||
| 115 | tree.nodes.deinit(tree.comp.gpa); | ||
| 116 | tree.arena.deinit(); | ||
| 117 | tree.value_map.deinit(); | ||
| 118 | } | ||
| 119 | |||
| 120 | pub const GNUAssemblyQualifiers = struct { | ||
| 121 | @"volatile": bool = false, | ||
| 122 | @"inline": bool = false, | ||
| 123 | goto: bool = false, | ||
| 124 | }; | ||
| 125 | |||
| 126 | pub const Node = struct { | ||
| 127 | tag: Tag, | ||
| 128 | ty: Type = .{ .specifier = .void }, | ||
| 129 | data: Data, | ||
| 130 | |||
| 131 | pub const Range = struct { start: u32, end: u32 }; | ||
| 132 | |||
| 133 | pub const Data = union { | ||
| 134 | decl: struct { | ||
| 135 | name: TokenIndex, | ||
| 136 | node: NodeIndex = .none, | ||
| 137 | }, | ||
| 138 | decl_ref: TokenIndex, | ||
| 139 | range: Range, | ||
| 140 | if3: struct { | ||
| 141 | cond: NodeIndex, | ||
| 142 | body: u32, | ||
| 143 | }, | ||
| 144 | un: NodeIndex, | ||
| 145 | bin: struct { | ||
| 146 | lhs: NodeIndex, | ||
| 147 | rhs: NodeIndex, | ||
| 148 | }, | ||
| 149 | member: struct { | ||
| 150 | lhs: NodeIndex, | ||
| 151 | index: u32, | ||
| 152 | }, | ||
| 153 | union_init: struct { | ||
| 154 | field_index: u32, | ||
| 155 | node: NodeIndex, | ||
| 156 | }, | ||
| 157 | cast: struct { | ||
| 158 | operand: NodeIndex, | ||
| 159 | kind: CastKind, | ||
| 160 | }, | ||
| 161 | int: u64, | ||
| 162 | return_zero: bool, | ||
| 163 | |||
| 164 | pub fn forDecl(data: Data, tree: Tree) struct { | ||
| 165 | decls: []const NodeIndex, | ||
| 166 | cond: NodeIndex, | ||
| 167 | incr: NodeIndex, | ||
| 168 | body: NodeIndex, | ||
| 169 | } { | ||
| 170 | const items = tree.data[data.range.start..data.range.end]; | ||
| 171 | const decls = items[0 .. items.len - 3]; | ||
| 172 | |||
| 173 | return .{ | ||
| 174 | .decls = decls, | ||
| 175 | .cond = items[items.len - 3], | ||
| 176 | .incr = items[items.len - 2], | ||
| 177 | .body = items[items.len - 1], | ||
| 178 | }; | ||
| 179 | } | ||
| 180 | |||
| 181 | pub fn forStmt(data: Data, tree: Tree) struct { | ||
| 182 | init: NodeIndex, | ||
| 183 | cond: NodeIndex, | ||
| 184 | incr: NodeIndex, | ||
| 185 | body: NodeIndex, | ||
| 186 | } { | ||
| 187 | const items = tree.data[data.if3.body..]; | ||
| 188 | |||
| 189 | return .{ | ||
| 190 | .init = items[0], | ||
| 191 | .cond = items[1], | ||
| 192 | .incr = items[2], | ||
| 193 | .body = data.if3.cond, | ||
| 194 | }; | ||
| 195 | } | ||
| 196 | }; | ||
| 197 | |||
| 198 | pub const List = std.MultiArrayList(Node); | ||
| 199 | }; | ||
| 200 | |||
| 201 | pub const CastKind = enum(u8) { | ||
| 202 | /// Does nothing except possibly add qualifiers | ||
| 203 | no_op, | ||
| 204 | /// Interpret one bit pattern as another. Used for operands which have the same | ||
| 205 | /// size and unrelated types, e.g. casting one pointer type to another | ||
| 206 | bitcast, | ||
| 207 | /// Convert T[] to T * | ||
| 208 | array_to_pointer, | ||
| 209 | /// Converts an lvalue to an rvalue | ||
| 210 | lval_to_rval, | ||
| 211 | /// Convert a function type to a pointer to a function | ||
| 212 | function_to_pointer, | ||
| 213 | /// Convert a pointer type to a _Bool | ||
| 214 | pointer_to_bool, | ||
| 215 | /// Convert a pointer type to an integer type | ||
| 216 | pointer_to_int, | ||
| 217 | /// Convert _Bool to an integer type | ||
| 218 | bool_to_int, | ||
| 219 | /// Convert _Bool to a floating type | ||
| 220 | bool_to_float, | ||
| 221 | /// Convert a _Bool to a pointer; will cause a warning | ||
| 222 | bool_to_pointer, | ||
| 223 | /// Convert an integer type to _Bool | ||
| 224 | int_to_bool, | ||
| 225 | /// Convert an integer to a floating type | ||
| 226 | int_to_float, | ||
| 227 | /// Convert a complex integer to a complex floating type | ||
| 228 | complex_int_to_complex_float, | ||
| 229 | /// Convert an integer type to a pointer type | ||
| 230 | int_to_pointer, | ||
| 231 | /// Convert a floating type to a _Bool | ||
| 232 | float_to_bool, | ||
| 233 | /// Convert a floating type to an integer | ||
| 234 | float_to_int, | ||
| 235 | /// Convert a complex floating type to a complex integer | ||
| 236 | complex_float_to_complex_int, | ||
| 237 | /// Convert one integer type to another | ||
| 238 | int_cast, | ||
| 239 | /// Convert one complex integer type to another | ||
| 240 | complex_int_cast, | ||
| 241 | /// Convert real part of complex integer to a integer | ||
| 242 | complex_int_to_real, | ||
| 243 | /// Create a complex integer type using operand as the real part | ||
| 244 | real_to_complex_int, | ||
| 245 | /// Convert one floating type to another | ||
| 246 | float_cast, | ||
| 247 | /// Convert one complex floating type to another | ||
| 248 | complex_float_cast, | ||
| 249 | /// Convert real part of complex float to a float | ||
| 250 | complex_float_to_real, | ||
| 251 | /// Create a complex floating type using operand as the real part | ||
| 252 | real_to_complex_float, | ||
| 253 | /// Convert type to void | ||
| 254 | to_void, | ||
| 255 | /// Convert a literal 0 to a null pointer | ||
| 256 | null_to_pointer, | ||
| 257 | /// GNU cast-to-union extension | ||
| 258 | union_cast, | ||
| 259 | /// Create vector where each value is same as the input scalar. | ||
| 260 | vector_splat, | ||
| 261 | }; | ||
| 262 | |||
| 263 | pub const Tag = enum(u8) { | ||
| 264 | /// Must appear at index 0. Also used as the tag for __builtin_types_compatible_p arguments, since the arguments are types | ||
| 265 | /// Reaching it is always the result of a bug. | ||
| 266 | invalid, | ||
| 267 | |||
| 268 | // ====== Decl ====== | ||
| 269 | |||
| 270 | // _Static_assert | ||
| 271 | static_assert, | ||
| 272 | |||
| 273 | // function prototype | ||
| 274 | fn_proto, | ||
| 275 | static_fn_proto, | ||
| 276 | inline_fn_proto, | ||
| 277 | inline_static_fn_proto, | ||
| 278 | |||
| 279 | // function definition | ||
| 280 | fn_def, | ||
| 281 | static_fn_def, | ||
| 282 | inline_fn_def, | ||
| 283 | inline_static_fn_def, | ||
| 284 | |||
| 285 | // variable declaration | ||
| 286 | @"var", | ||
| 287 | extern_var, | ||
| 288 | static_var, | ||
| 289 | // same as static_var, used for __func__, __FUNCTION__ and __PRETTY_FUNCTION__ | ||
| 290 | implicit_static_var, | ||
| 291 | threadlocal_var, | ||
| 292 | threadlocal_extern_var, | ||
| 293 | threadlocal_static_var, | ||
| 294 | |||
| 295 | /// __asm__("...") at file scope | ||
| 296 | file_scope_asm, | ||
| 297 | |||
| 298 | // typedef declaration | ||
| 299 | typedef, | ||
| 300 | |||
| 301 | // container declarations | ||
| 302 | /// { lhs; rhs; } | ||
| 303 | struct_decl_two, | ||
| 304 | /// { lhs; rhs; } | ||
| 305 | union_decl_two, | ||
| 306 | /// { lhs, rhs, } | ||
| 307 | enum_decl_two, | ||
| 308 | /// { range } | ||
| 309 | struct_decl, | ||
| 310 | /// { range } | ||
| 311 | union_decl, | ||
| 312 | /// { range } | ||
| 313 | enum_decl, | ||
| 314 | /// struct decl_ref; | ||
| 315 | struct_forward_decl, | ||
| 316 | /// union decl_ref; | ||
| 317 | union_forward_decl, | ||
| 318 | /// enum decl_ref; | ||
| 319 | enum_forward_decl, | ||
| 320 | |||
| 321 | /// name = node | ||
| 322 | enum_field_decl, | ||
| 323 | /// ty name : node | ||
| 324 | /// name == 0 means unnamed | ||
| 325 | record_field_decl, | ||
| 326 | /// Used when a record has an unnamed record as a field | ||
| 327 | indirect_record_field_decl, | ||
| 328 | |||
| 329 | // ====== Stmt ====== | ||
| 330 | |||
| 331 | labeled_stmt, | ||
| 332 | /// { first; second; } first and second may be null | ||
| 333 | compound_stmt_two, | ||
| 334 | /// { data } | ||
| 335 | compound_stmt, | ||
| 336 | /// if (first) data[second] else data[second+1]; | ||
| 337 | if_then_else_stmt, | ||
| 338 | /// if (first) second; second may be null | ||
| 339 | if_then_stmt, | ||
| 340 | /// switch (first) second | ||
| 341 | switch_stmt, | ||
| 342 | /// case first: second | ||
| 343 | case_stmt, | ||
| 344 | /// case data[body]...data[body+1]: cond | ||
| 345 | case_range_stmt, | ||
| 346 | /// default: first | ||
| 347 | default_stmt, | ||
| 348 | /// while (first) second | ||
| 349 | while_stmt, | ||
| 350 | /// do second while(first); | ||
| 351 | do_while_stmt, | ||
| 352 | /// for (data[..]; data[len-3]; data[len-2]) data[len-1] | ||
| 353 | for_decl_stmt, | ||
| 354 | /// for (;;;) first | ||
| 355 | forever_stmt, | ||
| 356 | /// for (data[first]; data[first+1]; data[first+2]) second | ||
| 357 | for_stmt, | ||
| 358 | /// goto first; | ||
| 359 | goto_stmt, | ||
| 360 | /// goto *un; | ||
| 361 | computed_goto_stmt, | ||
| 362 | // continue; first and second unused | ||
| 363 | continue_stmt, | ||
| 364 | // break; first and second unused | ||
| 365 | break_stmt, | ||
| 366 | // null statement (just a semicolon); first and second unused | ||
| 367 | null_stmt, | ||
| 368 | /// return first; first may be null | ||
| 369 | return_stmt, | ||
| 370 | /// Assembly statement of the form __asm__("string literal") | ||
| 371 | gnu_asm_simple, | ||
| 372 | |||
| 373 | // ====== Expr ====== | ||
| 374 | |||
| 375 | /// lhs , rhs | ||
| 376 | comma_expr, | ||
| 377 | /// lhs ? data[0] : data[1] | ||
| 378 | binary_cond_expr, | ||
| 379 | /// Used as the base for casts of the lhs in `binary_cond_expr`. | ||
| 380 | cond_dummy_expr, | ||
| 381 | /// lhs ? data[0] : data[1] | ||
| 382 | cond_expr, | ||
| 383 | /// lhs = rhs | ||
| 384 | assign_expr, | ||
| 385 | /// lhs *= rhs | ||
| 386 | mul_assign_expr, | ||
| 387 | /// lhs /= rhs | ||
| 388 | div_assign_expr, | ||
| 389 | /// lhs %= rhs | ||
| 390 | mod_assign_expr, | ||
| 391 | /// lhs += rhs | ||
| 392 | add_assign_expr, | ||
| 393 | /// lhs -= rhs | ||
| 394 | sub_assign_expr, | ||
| 395 | /// lhs <<= rhs | ||
| 396 | shl_assign_expr, | ||
| 397 | /// lhs >>= rhs | ||
| 398 | shr_assign_expr, | ||
| 399 | /// lhs &= rhs | ||
| 400 | bit_and_assign_expr, | ||
| 401 | /// lhs ^= rhs | ||
| 402 | bit_xor_assign_expr, | ||
| 403 | /// lhs |= rhs | ||
| 404 | bit_or_assign_expr, | ||
| 405 | /// lhs || rhs | ||
| 406 | bool_or_expr, | ||
| 407 | /// lhs && rhs | ||
| 408 | bool_and_expr, | ||
| 409 | /// lhs | rhs | ||
| 410 | bit_or_expr, | ||
| 411 | /// lhs ^ rhs | ||
| 412 | bit_xor_expr, | ||
| 413 | /// lhs & rhs | ||
| 414 | bit_and_expr, | ||
| 415 | /// lhs == rhs | ||
| 416 | equal_expr, | ||
| 417 | /// lhs != rhs | ||
| 418 | not_equal_expr, | ||
| 419 | /// lhs < rhs | ||
| 420 | less_than_expr, | ||
| 421 | /// lhs <= rhs | ||
| 422 | less_than_equal_expr, | ||
| 423 | /// lhs > rhs | ||
| 424 | greater_than_expr, | ||
| 425 | /// lhs >= rhs | ||
| 426 | greater_than_equal_expr, | ||
| 427 | /// lhs << rhs | ||
| 428 | shl_expr, | ||
| 429 | /// lhs >> rhs | ||
| 430 | shr_expr, | ||
| 431 | /// lhs + rhs | ||
| 432 | add_expr, | ||
| 433 | /// lhs - rhs | ||
| 434 | sub_expr, | ||
| 435 | /// lhs * rhs | ||
| 436 | mul_expr, | ||
| 437 | /// lhs / rhs | ||
| 438 | div_expr, | ||
| 439 | /// lhs % rhs | ||
| 440 | mod_expr, | ||
| 441 | /// Explicit: (type) cast | ||
| 442 | explicit_cast, | ||
| 443 | /// Implicit: cast | ||
| 444 | implicit_cast, | ||
| 445 | /// &un | ||
| 446 | addr_of_expr, | ||
| 447 | /// &&decl_ref | ||
| 448 | addr_of_label, | ||
| 449 | /// *un | ||
| 450 | deref_expr, | ||
| 451 | /// +un | ||
| 452 | plus_expr, | ||
| 453 | /// -un | ||
| 454 | negate_expr, | ||
| 455 | /// ~un | ||
| 456 | bit_not_expr, | ||
| 457 | /// !un | ||
| 458 | bool_not_expr, | ||
| 459 | /// ++un | ||
| 460 | pre_inc_expr, | ||
| 461 | /// --un | ||
| 462 | pre_dec_expr, | ||
| 463 | /// __imag un | ||
| 464 | imag_expr, | ||
| 465 | /// __real un | ||
| 466 | real_expr, | ||
| 467 | /// lhs[rhs] lhs is pointer/array type, rhs is integer type | ||
| 468 | array_access_expr, | ||
| 469 | /// first(second) second may be 0 | ||
| 470 | call_expr_one, | ||
| 471 | /// data[0](data[1..]) | ||
| 472 | call_expr, | ||
| 473 | /// decl | ||
| 474 | builtin_call_expr_one, | ||
| 475 | builtin_call_expr, | ||
| 476 | /// lhs.member | ||
| 477 | member_access_expr, | ||
| 478 | /// lhs->member | ||
| 479 | member_access_ptr_expr, | ||
| 480 | /// un++ | ||
| 481 | post_inc_expr, | ||
| 482 | /// un-- | ||
| 483 | post_dec_expr, | ||
| 484 | /// (un) | ||
| 485 | paren_expr, | ||
| 486 | /// decl_ref | ||
| 487 | decl_ref_expr, | ||
| 488 | /// decl_ref | ||
| 489 | enumeration_ref, | ||
| 490 | /// C23 bool literal `true` / `false` | ||
| 491 | bool_literal, | ||
| 492 | /// C23 nullptr literal | ||
| 493 | nullptr_literal, | ||
| 494 | /// integer literal, always unsigned | ||
| 495 | int_literal, | ||
| 496 | /// Same as int_literal, but originates from a char literal | ||
| 497 | char_literal, | ||
| 498 | /// _Float16 literal | ||
| 499 | float16_literal, | ||
| 500 | /// f32 literal | ||
| 501 | float_literal, | ||
| 502 | /// f64 literal | ||
| 503 | double_literal, | ||
| 504 | /// wraps a float or double literal: un | ||
| 505 | imaginary_literal, | ||
| 506 | /// tree.str[index..][0..len] | ||
| 507 | string_literal_expr, | ||
| 508 | /// sizeof(un?) | ||
| 509 | sizeof_expr, | ||
| 510 | /// _Alignof(un?) | ||
| 511 | alignof_expr, | ||
| 512 | /// _Generic(controlling lhs, chosen rhs) | ||
| 513 | generic_expr_one, | ||
| 514 | /// _Generic(controlling range[0], chosen range[1], rest range[2..]) | ||
| 515 | generic_expr, | ||
| 516 | /// ty: un | ||
| 517 | generic_association_expr, | ||
| 518 | // default: un | ||
| 519 | generic_default_expr, | ||
| 520 | /// __builtin_choose_expr(lhs, data[0], data[1]) | ||
| 521 | builtin_choose_expr, | ||
| 522 | /// __builtin_types_compatible_p(lhs, rhs) | ||
| 523 | builtin_types_compatible_p, | ||
| 524 | /// decl - special builtins require custom parsing | ||
| 525 | special_builtin_call_one, | ||
| 526 | /// ({ un }) | ||
| 527 | stmt_expr, | ||
| 528 | |||
| 529 | // ====== Initializer expressions ====== | ||
| 530 | |||
| 531 | /// { lhs, rhs } | ||
| 532 | array_init_expr_two, | ||
| 533 | /// { range } | ||
| 534 | array_init_expr, | ||
| 535 | /// { lhs, rhs } | ||
| 536 | struct_init_expr_two, | ||
| 537 | /// { range } | ||
| 538 | struct_init_expr, | ||
| 539 | /// { union_init } | ||
| 540 | union_init_expr, | ||
| 541 | /// (ty){ un } | ||
| 542 | compound_literal_expr, | ||
| 543 | |||
| 544 | /// Inserted at the end of a function body if no return stmt is found. | ||
| 545 | /// ty is the functions return type | ||
| 546 | /// data is return_zero which is true if the function is called "main" and ty is compatible with int | ||
| 547 | implicit_return, | ||
| 548 | |||
| 549 | /// Inserted in array_init_expr to represent unspecified elements. | ||
| 550 | /// data.int contains the amount of elements. | ||
| 551 | array_filler_expr, | ||
| 552 | /// Inserted in record and scalar initializers for unspecified elements. | ||
| 553 | default_init_expr, | ||
| 554 | |||
| 555 | pub fn isImplicit(tag: Tag) bool { | ||
| 556 | return switch (tag) { | ||
| 557 | .implicit_cast, | ||
| 558 | .implicit_return, | ||
| 559 | .array_filler_expr, | ||
| 560 | .default_init_expr, | ||
| 561 | .implicit_static_var, | ||
| 562 | .cond_dummy_expr, | ||
| 563 | => true, | ||
| 564 | else => false, | ||
| 565 | }; | ||
| 566 | } | ||
| 567 | }; | ||
| 568 | |||
| 569 | pub fn isBitfield(nodes: Node.List.Slice, node: NodeIndex) bool { | ||
| 570 | return bitfieldWidth(nodes, node, false) != null; | ||
| 571 | } | ||
| 572 | |||
| 573 | /// Returns null if node is not a bitfield. If inspect_lval is true, this function will | ||
| 574 | /// recurse into implicit lval_to_rval casts (useful for arithmetic conversions) | ||
| 575 | pub fn bitfieldWidth(nodes: Node.List.Slice, node: NodeIndex, inspect_lval: bool) ?u32 { | ||
| 576 | if (node == .none) return null; | ||
| 577 | switch (nodes.items(.tag)[@intFromEnum(node)]) { | ||
| 578 | .member_access_expr, .member_access_ptr_expr => { | ||
| 579 | const member = nodes.items(.data)[@intFromEnum(node)].member; | ||
| 580 | var ty = nodes.items(.ty)[@intFromEnum(member.lhs)]; | ||
| 581 | if (ty.isPtr()) ty = ty.elemType(); | ||
| 582 | const record_ty = ty.get(.@"struct") orelse ty.get(.@"union") orelse return null; | ||
| 583 | const field = record_ty.data.record.fields[member.index]; | ||
| 584 | return field.bit_width; | ||
| 585 | }, | ||
| 586 | .implicit_cast => { | ||
| 587 | if (!inspect_lval) return null; | ||
| 588 | |||
| 589 | const data = nodes.items(.data)[@intFromEnum(node)]; | ||
| 590 | return switch (data.cast.kind) { | ||
| 591 | .lval_to_rval => bitfieldWidth(nodes, data.cast.operand, false), | ||
| 592 | else => null, | ||
| 593 | }; | ||
| 594 | }, | ||
| 595 | else => return null, | ||
| 596 | } | ||
| 597 | } | ||
| 598 | |||
| 599 | pub fn isLval(nodes: Node.List.Slice, extra: []const NodeIndex, value_map: ValueMap, node: NodeIndex) bool { | ||
| 600 | var is_const: bool = undefined; | ||
| 601 | return isLvalExtra(nodes, extra, value_map, node, &is_const); | ||
| 602 | } | ||
| 603 | |||
| 604 | pub fn isLvalExtra(nodes: Node.List.Slice, extra: []const NodeIndex, value_map: ValueMap, node: NodeIndex, is_const: *bool) bool { | ||
| 605 | is_const.* = false; | ||
| 606 | switch (nodes.items(.tag)[@intFromEnum(node)]) { | ||
| 607 | .compound_literal_expr => { | ||
| 608 | is_const.* = nodes.items(.ty)[@intFromEnum(node)].isConst(); | ||
| 609 | return true; | ||
| 610 | }, | ||
| 611 | .string_literal_expr => return true, | ||
| 612 | .member_access_ptr_expr => { | ||
| 613 | const lhs_expr = nodes.items(.data)[@intFromEnum(node)].member.lhs; | ||
| 614 | const ptr_ty = nodes.items(.ty)[@intFromEnum(lhs_expr)]; | ||
| 615 | if (ptr_ty.isPtr()) is_const.* = ptr_ty.elemType().isConst(); | ||
| 616 | return true; | ||
| 617 | }, | ||
| 618 | .array_access_expr => { | ||
| 619 | const lhs_expr = nodes.items(.data)[@intFromEnum(node)].bin.lhs; | ||
| 620 | if (lhs_expr != .none) { | ||
| 621 | const array_ty = nodes.items(.ty)[@intFromEnum(lhs_expr)]; | ||
| 622 | if (array_ty.isPtr() or array_ty.isArray()) is_const.* = array_ty.elemType().isConst(); | ||
| 623 | } | ||
| 624 | return true; | ||
| 625 | }, | ||
| 626 | .decl_ref_expr => { | ||
| 627 | const decl_ty = nodes.items(.ty)[@intFromEnum(node)]; | ||
| 628 | is_const.* = decl_ty.isConst(); | ||
| 629 | return true; | ||
| 630 | }, | ||
| 631 | .deref_expr => { | ||
| 632 | const data = nodes.items(.data)[@intFromEnum(node)]; | ||
| 633 | const operand_ty = nodes.items(.ty)[@intFromEnum(data.un)]; | ||
| 634 | if (operand_ty.isFunc()) return false; | ||
| 635 | if (operand_ty.isPtr() or operand_ty.isArray()) is_const.* = operand_ty.elemType().isConst(); | ||
| 636 | return true; | ||
| 637 | }, | ||
| 638 | .member_access_expr => { | ||
| 639 | const data = nodes.items(.data)[@intFromEnum(node)]; | ||
| 640 | return isLvalExtra(nodes, extra, value_map, data.member.lhs, is_const); | ||
| 641 | }, | ||
| 642 | .paren_expr => { | ||
| 643 | const data = nodes.items(.data)[@intFromEnum(node)]; | ||
| 644 | return isLvalExtra(nodes, extra, value_map, data.un, is_const); | ||
| 645 | }, | ||
| 646 | .builtin_choose_expr => { | ||
| 647 | const data = nodes.items(.data)[@intFromEnum(node)]; | ||
| 648 | |||
| 649 | if (value_map.get(data.if3.cond)) |val| { | ||
| 650 | const offset = @intFromBool(val.isZero()); | ||
| 651 | return isLvalExtra(nodes, extra, value_map, extra[data.if3.body + offset], is_const); | ||
| 652 | } | ||
| 653 | return false; | ||
| 654 | }, | ||
| 655 | else => return false, | ||
| 656 | } | ||
| 657 | } | ||
| 658 | |||
| 659 | pub fn tokSlice(tree: Tree, tok_i: TokenIndex) []const u8 { | ||
| 660 | if (tree.tokens.items(.id)[tok_i].lexeme()) |some| return some; | ||
| 661 | const loc = tree.tokens.items(.loc)[tok_i]; | ||
| 662 | var tmp_tokenizer = Tokenizer{ | ||
| 663 | .buf = tree.comp.getSource(loc.id).buf, | ||
| 664 | .comp = tree.comp, | ||
| 665 | .index = loc.byte_offset, | ||
| 666 | .source = .generated, | ||
| 667 | }; | ||
| 668 | const tok = tmp_tokenizer.next(); | ||
| 669 | return tmp_tokenizer.buf[tok.start..tok.end]; | ||
| 670 | } | ||
| 671 | |||
| 672 | pub fn dump(tree: Tree, color: bool, writer: anytype) @TypeOf(writer).Error!void { | ||
| 673 | const mapper = tree.comp.string_interner.getFastTypeMapper(tree.comp.gpa) catch tree.comp.string_interner.getSlowTypeMapper(); | ||
| 674 | defer mapper.deinit(tree.comp.gpa); | ||
| 675 | |||
| 676 | for (tree.root_decls) |i| { | ||
| 677 | try tree.dumpNode(i, 0, mapper, color, writer); | ||
| 678 | try writer.writeByte('\n'); | ||
| 679 | } | ||
| 680 | } | ||
| 681 | |||
| 682 | fn dumpFieldAttributes(attributes: []const Attribute, level: u32, strings: []const u8, writer: anytype) !void { | ||
| 683 | for (attributes) |attr| { | ||
| 684 | try writer.writeByteNTimes(' ', level); | ||
| 685 | try writer.print("field attr: {s}", .{@tagName(attr.tag)}); | ||
| 686 | try dumpAttribute(attr, strings, writer); | ||
| 687 | } | ||
| 688 | } | ||
| 689 | |||
| 690 | fn dumpAttribute(attr: Attribute, strings: []const u8, writer: anytype) !void { | ||
| 691 | switch (attr.tag) { | ||
| 692 | inline else => |tag| { | ||
| 693 | const args = @field(attr.args, @tagName(tag)); | ||
| 694 | const fields = @typeInfo(@TypeOf(args)).Struct.fields; | ||
| 695 | if (fields.len == 0) { | ||
| 696 | try writer.writeByte('\n'); | ||
| 697 | return; | ||
| 698 | } | ||
| 699 | try writer.writeByte(' '); | ||
| 700 | inline for (fields, 0..) |f, i| { | ||
| 701 | if (comptime std.mem.eql(u8, f.name, "__name_tok")) continue; | ||
| 702 | if (i != 0) { | ||
| 703 | try writer.writeAll(", "); | ||
| 704 | } | ||
| 705 | try writer.writeAll(f.name); | ||
| 706 | try writer.writeAll(": "); | ||
| 707 | switch (f.type) { | ||
| 708 | Value.ByteRange => try writer.print("\"{s}\"", .{@field(args, f.name).slice(strings, .@"1")}), | ||
| 709 | ?Value.ByteRange => try writer.print("\"{?s}\"", .{if (@field(args, f.name)) |range| range.slice(strings, .@"1") else null}), | ||
| 710 | else => switch (@typeInfo(f.type)) { | ||
| 711 | .Enum => try writer.writeAll(@tagName(@field(args, f.name))), | ||
| 712 | else => try writer.print("{any}", .{@field(args, f.name)}), | ||
| 713 | }, | ||
| 714 | } | ||
| 715 | } | ||
| 716 | try writer.writeByte('\n'); | ||
| 717 | return; | ||
| 718 | }, | ||
| 719 | } | ||
| 720 | } | ||
| 721 | |||
| 722 | fn dumpNode(tree: Tree, node: NodeIndex, level: u32, mapper: StringInterner.TypeMapper, color: bool, w: anytype) @TypeOf(w).Error!void { | ||
| 723 | const delta = 2; | ||
| 724 | const half = delta / 2; | ||
| 725 | const util = @import("util.zig"); | ||
| 726 | const TYPE = util.Color.purple; | ||
| 727 | const TAG = util.Color.cyan; | ||
| 728 | const IMPLICIT = util.Color.blue; | ||
| 729 | const NAME = util.Color.red; | ||
| 730 | const LITERAL = util.Color.green; | ||
| 731 | const ATTRIBUTE = util.Color.yellow; | ||
| 732 | std.debug.assert(node != .none); | ||
| 733 | |||
| 734 | const tag = tree.nodes.items(.tag)[@intFromEnum(node)]; | ||
| 735 | const data = tree.nodes.items(.data)[@intFromEnum(node)]; | ||
| 736 | const ty = tree.nodes.items(.ty)[@intFromEnum(node)]; | ||
| 737 | try w.writeByteNTimes(' ', level); | ||
| 738 | |||
| 739 | if (color) util.setColor(if (tag.isImplicit()) IMPLICIT else TAG, w); | ||
| 740 | try w.print("{s}: ", .{@tagName(tag)}); | ||
| 741 | if (tag == .implicit_cast or tag == .explicit_cast) { | ||
| 742 | if (color) util.setColor(.white, w); | ||
| 743 | try w.print("({s}) ", .{@tagName(data.cast.kind)}); | ||
| 744 | } | ||
| 745 | if (color) util.setColor(TYPE, w); | ||
| 746 | try w.writeByte('\''); | ||
| 747 | try ty.dump(mapper, tree.comp.langopts, w); | ||
| 748 | try w.writeByte('\''); | ||
| 749 | |||
| 750 | if (isLval(tree.nodes, tree.data, tree.value_map, node)) { | ||
| 751 | if (color) util.setColor(ATTRIBUTE, w); | ||
| 752 | try w.writeAll(" lvalue"); | ||
| 753 | } | ||
| 754 | if (isBitfield(tree.nodes, node)) { | ||
| 755 | if (color) util.setColor(ATTRIBUTE, w); | ||
| 756 | try w.writeAll(" bitfield"); | ||
| 757 | } | ||
| 758 | if (tree.value_map.get(node)) |val| { | ||
| 759 | if (color) util.setColor(LITERAL, w); | ||
| 760 | try w.writeAll(" (value: "); | ||
| 761 | try val.dump(ty, tree.comp, tree.strings, w); | ||
| 762 | try w.writeByte(')'); | ||
| 763 | } | ||
| 764 | if (tag == .implicit_return and data.return_zero) { | ||
| 765 | if (color) util.setColor(IMPLICIT, w); | ||
| 766 | try w.writeAll(" (value: 0)"); | ||
| 767 | if (color) util.setColor(.reset, w); | ||
| 768 | } | ||
| 769 | |||
| 770 | try w.writeAll("\n"); | ||
| 771 | if (color) util.setColor(.reset, w); | ||
| 772 | |||
| 773 | if (ty.specifier == .attributed) { | ||
| 774 | if (color) util.setColor(ATTRIBUTE, w); | ||
| 775 | for (ty.data.attributed.attributes) |attr| { | ||
| 776 | try w.writeByteNTimes(' ', level + half); | ||
| 777 | try w.print("attr: {s}", .{@tagName(attr.tag)}); | ||
| 778 | try dumpAttribute(attr, tree.strings, w); | ||
| 779 | } | ||
| 780 | if (color) util.setColor(.reset, w); | ||
| 781 | } | ||
| 782 | |||
| 783 | switch (tag) { | ||
| 784 | .invalid => unreachable, | ||
| 785 | .file_scope_asm => { | ||
| 786 | try w.writeByteNTimes(' ', level + 1); | ||
| 787 | try tree.dumpNode(data.decl.node, level + delta, mapper, color, w); | ||
| 788 | }, | ||
| 789 | .gnu_asm_simple => { | ||
| 790 | try w.writeByteNTimes(' ', level); | ||
| 791 | try tree.dumpNode(data.un, level, mapper, color, w); | ||
| 792 | }, | ||
| 793 | .static_assert => { | ||
| 794 | try w.writeByteNTimes(' ', level + 1); | ||
| 795 | try w.writeAll("condition:\n"); | ||
| 796 | try tree.dumpNode(data.bin.lhs, level + delta, mapper, color, w); | ||
| 797 | if (data.bin.rhs != .none) { | ||
| 798 | try w.writeByteNTimes(' ', level + 1); | ||
| 799 | try w.writeAll("diagnostic:\n"); | ||
| 800 | try tree.dumpNode(data.bin.rhs, level + delta, mapper, color, w); | ||
| 801 | } | ||
| 802 | }, | ||
| 803 | .fn_proto, | ||
| 804 | .static_fn_proto, | ||
| 805 | .inline_fn_proto, | ||
| 806 | .inline_static_fn_proto, | ||
| 807 | => { | ||
| 808 | try w.writeByteNTimes(' ', level + half); | ||
| 809 | try w.writeAll("name: "); | ||
| 810 | if (color) util.setColor(NAME, w); | ||
| 811 | try w.print("{s}\n", .{tree.tokSlice(data.decl.name)}); | ||
| 812 | if (color) util.setColor(.reset, w); | ||
| 813 | }, | ||
| 814 | .fn_def, | ||
| 815 | .static_fn_def, | ||
| 816 | .inline_fn_def, | ||
| 817 | .inline_static_fn_def, | ||
| 818 | => { | ||
| 819 | try w.writeByteNTimes(' ', level + half); | ||
| 820 | try w.writeAll("name: "); | ||
| 821 | if (color) util.setColor(NAME, w); | ||
| 822 | try w.print("{s}\n", .{tree.tokSlice(data.decl.name)}); | ||
| 823 | if (color) util.setColor(.reset, w); | ||
| 824 | try w.writeByteNTimes(' ', level + half); | ||
| 825 | try w.writeAll("body:\n"); | ||
| 826 | try tree.dumpNode(data.decl.node, level + delta, mapper, color, w); | ||
| 827 | }, | ||
| 828 | .typedef, | ||
| 829 | .@"var", | ||
| 830 | .extern_var, | ||
| 831 | .static_var, | ||
| 832 | .implicit_static_var, | ||
| 833 | .threadlocal_var, | ||
| 834 | .threadlocal_extern_var, | ||
| 835 | .threadlocal_static_var, | ||
| 836 | => { | ||
| 837 | try w.writeByteNTimes(' ', level + half); | ||
| 838 | try w.writeAll("name: "); | ||
| 839 | if (color) util.setColor(NAME, w); | ||
| 840 | try w.print("{s}\n", .{tree.tokSlice(data.decl.name)}); | ||
| 841 | if (color) util.setColor(.reset, w); | ||
| 842 | if (data.decl.node != .none) { | ||
| 843 | try w.writeByteNTimes(' ', level + half); | ||
| 844 | try w.writeAll("init:\n"); | ||
| 845 | try tree.dumpNode(data.decl.node, level + delta, mapper, color, w); | ||
| 846 | } | ||
| 847 | }, | ||
| 848 | .enum_field_decl => { | ||
| 849 | try w.writeByteNTimes(' ', level + half); | ||
| 850 | try w.writeAll("name: "); | ||
| 851 | if (color) util.setColor(NAME, w); | ||
| 852 | try w.print("{s}\n", .{tree.tokSlice(data.decl.name)}); | ||
| 853 | if (color) util.setColor(.reset, w); | ||
| 854 | if (data.decl.node != .none) { | ||
| 855 | try w.writeByteNTimes(' ', level + half); | ||
| 856 | try w.writeAll("value:\n"); | ||
| 857 | try tree.dumpNode(data.decl.node, level + delta, mapper, color, w); | ||
| 858 | } | ||
| 859 | }, | ||
| 860 | .record_field_decl => { | ||
| 861 | if (data.decl.name != 0) { | ||
| 862 | try w.writeByteNTimes(' ', level + half); | ||
| 863 | try w.writeAll("name: "); | ||
| 864 | if (color) util.setColor(NAME, w); | ||
| 865 | try w.print("{s}\n", .{tree.tokSlice(data.decl.name)}); | ||
| 866 | if (color) util.setColor(.reset, w); | ||
| 867 | } | ||
| 868 | if (data.decl.node != .none) { | ||
| 869 | try w.writeByteNTimes(' ', level + half); | ||
| 870 | try w.writeAll("bits:\n"); | ||
| 871 | try tree.dumpNode(data.decl.node, level + delta, mapper, color, w); | ||
| 872 | } | ||
| 873 | }, | ||
| 874 | .indirect_record_field_decl => {}, | ||
| 875 | .compound_stmt, | ||
| 876 | .array_init_expr, | ||
| 877 | .struct_init_expr, | ||
| 878 | .enum_decl, | ||
| 879 | .struct_decl, | ||
| 880 | .union_decl, | ||
| 881 | => { | ||
| 882 | const maybe_field_attributes = if (ty.getRecord()) |record| record.field_attributes else null; | ||
| 883 | for (tree.data[data.range.start..data.range.end], 0..) |stmt, i| { | ||
| 884 | if (i != 0) try w.writeByte('\n'); | ||
| 885 | try tree.dumpNode(stmt, level + delta, mapper, color, w); | ||
| 886 | if (maybe_field_attributes) |field_attributes| { | ||
| 887 | if (field_attributes[i].len == 0) continue; | ||
| 888 | |||
| 889 | if (color) util.setColor(ATTRIBUTE, w); | ||
| 890 | try dumpFieldAttributes(field_attributes[i], level + delta + half, tree.strings, w); | ||
| 891 | if (color) util.setColor(.reset, w); | ||
| 892 | } | ||
| 893 | } | ||
| 894 | }, | ||
| 895 | .compound_stmt_two, | ||
| 896 | .array_init_expr_two, | ||
| 897 | .struct_init_expr_two, | ||
| 898 | .enum_decl_two, | ||
| 899 | .struct_decl_two, | ||
| 900 | .union_decl_two, | ||
| 901 | => { | ||
| 902 | var attr_array = [2][]const Attribute{ &.{}, &.{} }; | ||
| 903 | const empty: [][]const Attribute = &attr_array; | ||
| 904 | const field_attributes = if (ty.getRecord()) |record| (record.field_attributes orelse empty.ptr) else empty.ptr; | ||
| 905 | if (data.bin.lhs != .none) { | ||
| 906 | try tree.dumpNode(data.bin.lhs, level + delta, mapper, color, w); | ||
| 907 | if (field_attributes[0].len > 0) { | ||
| 908 | if (color) util.setColor(ATTRIBUTE, w); | ||
| 909 | try dumpFieldAttributes(field_attributes[0], level + delta + half, tree.strings, w); | ||
| 910 | if (color) util.setColor(.reset, w); | ||
| 911 | } | ||
| 912 | } | ||
| 913 | if (data.bin.rhs != .none) { | ||
| 914 | try tree.dumpNode(data.bin.rhs, level + delta, mapper, color, w); | ||
| 915 | if (field_attributes[1].len > 0) { | ||
| 916 | if (color) util.setColor(ATTRIBUTE, w); | ||
| 917 | try dumpFieldAttributes(field_attributes[1], level + delta + half, tree.strings, w); | ||
| 918 | if (color) util.setColor(.reset, w); | ||
| 919 | } | ||
| 920 | } | ||
| 921 | }, | ||
| 922 | .union_init_expr => { | ||
| 923 | try w.writeByteNTimes(' ', level + half); | ||
| 924 | try w.writeAll("field index: "); | ||
| 925 | if (color) util.setColor(LITERAL, w); | ||
| 926 | try w.print("{d}\n", .{data.union_init.field_index}); | ||
| 927 | if (color) util.setColor(.reset, w); | ||
| 928 | if (data.union_init.node != .none) { | ||
| 929 | try tree.dumpNode(data.union_init.node, level + delta, mapper, color, w); | ||
| 930 | } | ||
| 931 | }, | ||
| 932 | .compound_literal_expr => { | ||
| 933 | try tree.dumpNode(data.un, level + half, mapper, color, w); | ||
| 934 | }, | ||
| 935 | .labeled_stmt => { | ||
| 936 | try w.writeByteNTimes(' ', level + half); | ||
| 937 | try w.writeAll("label: "); | ||
| 938 | if (color) util.setColor(LITERAL, w); | ||
| 939 | try w.print("{s}\n", .{tree.tokSlice(data.decl.name)}); | ||
| 940 | if (color) util.setColor(.reset, w); | ||
| 941 | if (data.decl.node != .none) { | ||
| 942 | try w.writeByteNTimes(' ', level + half); | ||
| 943 | try w.writeAll("stmt:\n"); | ||
| 944 | try tree.dumpNode(data.decl.node, level + delta, mapper, color, w); | ||
| 945 | } | ||
| 946 | }, | ||
| 947 | .case_stmt => { | ||
| 948 | try w.writeByteNTimes(' ', level + half); | ||
| 949 | try w.writeAll("value:\n"); | ||
| 950 | try tree.dumpNode(data.bin.lhs, level + delta, mapper, color, w); | ||
| 951 | if (data.bin.rhs != .none) { | ||
| 952 | try w.writeByteNTimes(' ', level + half); | ||
| 953 | try w.writeAll("stmt:\n"); | ||
| 954 | try tree.dumpNode(data.bin.rhs, level + delta, mapper, color, w); | ||
| 955 | } | ||
| 956 | }, | ||
| 957 | .case_range_stmt => { | ||
| 958 | try w.writeByteNTimes(' ', level + half); | ||
| 959 | try w.writeAll("range start:\n"); | ||
| 960 | try tree.dumpNode(tree.data[data.if3.body], level + delta, mapper, color, w); | ||
| 961 | |||
| 962 | try w.writeByteNTimes(' ', level + half); | ||
| 963 | try w.writeAll("range end:\n"); | ||
| 964 | try tree.dumpNode(tree.data[data.if3.body + 1], level + delta, mapper, color, w); | ||
| 965 | |||
| 966 | if (data.if3.cond != .none) { | ||
| 967 | try w.writeByteNTimes(' ', level + half); | ||
| 968 | try w.writeAll("stmt:\n"); | ||
| 969 | try tree.dumpNode(data.if3.cond, level + delta, mapper, color, w); | ||
| 970 | } | ||
| 971 | }, | ||
| 972 | .default_stmt => { | ||
| 973 | if (data.un != .none) { | ||
| 974 | try w.writeByteNTimes(' ', level + half); | ||
| 975 | try w.writeAll("stmt:\n"); | ||
| 976 | try tree.dumpNode(data.un, level + delta, mapper, color, w); | ||
| 977 | } | ||
| 978 | }, | ||
| 979 | .binary_cond_expr, .cond_expr, .if_then_else_stmt, .builtin_choose_expr => { | ||
| 980 | try w.writeByteNTimes(' ', level + half); | ||
| 981 | try w.writeAll("cond:\n"); | ||
| 982 | try tree.dumpNode(data.if3.cond, level + delta, mapper, color, w); | ||
| 983 | |||
| 984 | try w.writeByteNTimes(' ', level + half); | ||
| 985 | try w.writeAll("then:\n"); | ||
| 986 | try tree.dumpNode(tree.data[data.if3.body], level + delta, mapper, color, w); | ||
| 987 | |||
| 988 | try w.writeByteNTimes(' ', level + half); | ||
| 989 | try w.writeAll("else:\n"); | ||
| 990 | try tree.dumpNode(tree.data[data.if3.body + 1], level + delta, mapper, color, w); | ||
| 991 | }, | ||
| 992 | .builtin_types_compatible_p => { | ||
| 993 | std.debug.assert(tree.nodes.items(.tag)[@intFromEnum(data.bin.lhs)] == .invalid); | ||
| 994 | std.debug.assert(tree.nodes.items(.tag)[@intFromEnum(data.bin.rhs)] == .invalid); | ||
| 995 | |||
| 996 | try w.writeByteNTimes(' ', level + half); | ||
| 997 | try w.writeAll("lhs: "); | ||
| 998 | |||
| 999 | const lhs_ty = tree.nodes.items(.ty)[@intFromEnum(data.bin.lhs)]; | ||
| 1000 | if (color) util.setColor(TYPE, w); | ||
| 1001 | try lhs_ty.dump(mapper, tree.comp.langopts, w); | ||
| 1002 | if (color) util.setColor(.reset, w); | ||
| 1003 | try w.writeByte('\n'); | ||
| 1004 | |||
| 1005 | try w.writeByteNTimes(' ', level + half); | ||
| 1006 | try w.writeAll("rhs: "); | ||
| 1007 | |||
| 1008 | const rhs_ty = tree.nodes.items(.ty)[@intFromEnum(data.bin.rhs)]; | ||
| 1009 | if (color) util.setColor(TYPE, w); | ||
| 1010 | try rhs_ty.dump(mapper, tree.comp.langopts, w); | ||
| 1011 | if (color) util.setColor(.reset, w); | ||
| 1012 | try w.writeByte('\n'); | ||
| 1013 | }, | ||
| 1014 | .if_then_stmt => { | ||
| 1015 | try w.writeByteNTimes(' ', level + half); | ||
| 1016 | try w.writeAll("cond:\n"); | ||
| 1017 | try tree.dumpNode(data.bin.lhs, level + delta, mapper, color, w); | ||
| 1018 | |||
| 1019 | if (data.bin.rhs != .none) { | ||
| 1020 | try w.writeByteNTimes(' ', level + half); | ||
| 1021 | try w.writeAll("then:\n"); | ||
| 1022 | try tree.dumpNode(data.bin.rhs, level + delta, mapper, color, w); | ||
| 1023 | } | ||
| 1024 | }, | ||
| 1025 | .switch_stmt, .while_stmt, .do_while_stmt => { | ||
| 1026 | try w.writeByteNTimes(' ', level + half); | ||
| 1027 | try w.writeAll("cond:\n"); | ||
| 1028 | try tree.dumpNode(data.bin.lhs, level + delta, mapper, color, w); | ||
| 1029 | |||
| 1030 | if (data.bin.rhs != .none) { | ||
| 1031 | try w.writeByteNTimes(' ', level + half); | ||
| 1032 | try w.writeAll("body:\n"); | ||
| 1033 | try tree.dumpNode(data.bin.rhs, level + delta, mapper, color, w); | ||
| 1034 | } | ||
| 1035 | }, | ||
| 1036 | .for_decl_stmt => { | ||
| 1037 | const for_decl = data.forDecl(tree); | ||
| 1038 | |||
| 1039 | try w.writeByteNTimes(' ', level + half); | ||
| 1040 | try w.writeAll("decl:\n"); | ||
| 1041 | for (for_decl.decls) |decl| { | ||
| 1042 | try tree.dumpNode(decl, level + delta, mapper, color, w); | ||
| 1043 | try w.writeByte('\n'); | ||
| 1044 | } | ||
| 1045 | if (for_decl.cond != .none) { | ||
| 1046 | try w.writeByteNTimes(' ', level + half); | ||
| 1047 | try w.writeAll("cond:\n"); | ||
| 1048 | try tree.dumpNode(for_decl.cond, level + delta, mapper, color, w); | ||
| 1049 | } | ||
| 1050 | if (for_decl.incr != .none) { | ||
| 1051 | try w.writeByteNTimes(' ', level + half); | ||
| 1052 | try w.writeAll("incr:\n"); | ||
| 1053 | try tree.dumpNode(for_decl.incr, level + delta, mapper, color, w); | ||
| 1054 | } | ||
| 1055 | if (for_decl.body != .none) { | ||
| 1056 | try w.writeByteNTimes(' ', level + half); | ||
| 1057 | try w.writeAll("body:\n"); | ||
| 1058 | try tree.dumpNode(for_decl.body, level + delta, mapper, color, w); | ||
| 1059 | } | ||
| 1060 | }, | ||
| 1061 | .forever_stmt => { | ||
| 1062 | if (data.un != .none) { | ||
| 1063 | try w.writeByteNTimes(' ', level + half); | ||
| 1064 | try w.writeAll("body:\n"); | ||
| 1065 | try tree.dumpNode(data.un, level + delta, mapper, color, w); | ||
| 1066 | } | ||
| 1067 | }, | ||
| 1068 | .for_stmt => { | ||
| 1069 | const for_stmt = data.forStmt(tree); | ||
| 1070 | |||
| 1071 | if (for_stmt.init != .none) { | ||
| 1072 | try w.writeByteNTimes(' ', level + half); | ||
| 1073 | try w.writeAll("init:\n"); | ||
| 1074 | try tree.dumpNode(for_stmt.init, level + delta, mapper, color, w); | ||
| 1075 | } | ||
| 1076 | if (for_stmt.cond != .none) { | ||
| 1077 | try w.writeByteNTimes(' ', level + half); | ||
| 1078 | try w.writeAll("cond:\n"); | ||
| 1079 | try tree.dumpNode(for_stmt.cond, level + delta, mapper, color, w); | ||
| 1080 | } | ||
| 1081 | if (for_stmt.incr != .none) { | ||
| 1082 | try w.writeByteNTimes(' ', level + half); | ||
| 1083 | try w.writeAll("incr:\n"); | ||
| 1084 | try tree.dumpNode(for_stmt.incr, level + delta, mapper, color, w); | ||
| 1085 | } | ||
| 1086 | if (for_stmt.body != .none) { | ||
| 1087 | try w.writeByteNTimes(' ', level + half); | ||
| 1088 | try w.writeAll("body:\n"); | ||
| 1089 | try tree.dumpNode(for_stmt.body, level + delta, mapper, color, w); | ||
| 1090 | } | ||
| 1091 | }, | ||
| 1092 | .goto_stmt, .addr_of_label => { | ||
| 1093 | try w.writeByteNTimes(' ', level + half); | ||
| 1094 | try w.writeAll("label: "); | ||
| 1095 | if (color) util.setColor(LITERAL, w); | ||
| 1096 | try w.print("{s}\n", .{tree.tokSlice(data.decl_ref)}); | ||
| 1097 | if (color) util.setColor(.reset, w); | ||
| 1098 | }, | ||
| 1099 | .continue_stmt, .break_stmt, .implicit_return, .null_stmt => {}, | ||
| 1100 | .return_stmt => { | ||
| 1101 | if (data.un != .none) { | ||
| 1102 | try w.writeByteNTimes(' ', level + half); | ||
| 1103 | try w.writeAll("expr:\n"); | ||
| 1104 | try tree.dumpNode(data.un, level + delta, mapper, color, w); | ||
| 1105 | } | ||
| 1106 | }, | ||
| 1107 | .call_expr => { | ||
| 1108 | try w.writeByteNTimes(' ', level + half); | ||
| 1109 | try w.writeAll("lhs:\n"); | ||
| 1110 | try tree.dumpNode(tree.data[data.range.start], level + delta, mapper, color, w); | ||
| 1111 | |||
| 1112 | try w.writeByteNTimes(' ', level + half); | ||
| 1113 | try w.writeAll("args:\n"); | ||
| 1114 | for (tree.data[data.range.start + 1 .. data.range.end]) |arg| try tree.dumpNode(arg, level + delta, mapper, color, w); | ||
| 1115 | }, | ||
| 1116 | .call_expr_one => { | ||
| 1117 | try w.writeByteNTimes(' ', level + half); | ||
| 1118 | try w.writeAll("lhs:\n"); | ||
| 1119 | try tree.dumpNode(data.bin.lhs, level + delta, mapper, color, w); | ||
| 1120 | if (data.bin.rhs != .none) { | ||
| 1121 | try w.writeByteNTimes(' ', level + half); | ||
| 1122 | try w.writeAll("arg:\n"); | ||
| 1123 | try tree.dumpNode(data.bin.rhs, level + delta, mapper, color, w); | ||
| 1124 | } | ||
| 1125 | }, | ||
| 1126 | .builtin_call_expr => { | ||
| 1127 | try w.writeByteNTimes(' ', level + half); | ||
| 1128 | try w.writeAll("name: "); | ||
| 1129 | if (color) util.setColor(NAME, w); | ||
| 1130 | try w.print("{s}\n", .{tree.tokSlice(@intFromEnum(tree.data[data.range.start]))}); | ||
| 1131 | if (color) util.setColor(.reset, w); | ||
| 1132 | |||
| 1133 | try w.writeByteNTimes(' ', level + half); | ||
| 1134 | try w.writeAll("args:\n"); | ||
| 1135 | for (tree.data[data.range.start + 1 .. data.range.end]) |arg| try tree.dumpNode(arg, level + delta, mapper, color, w); | ||
| 1136 | }, | ||
| 1137 | .builtin_call_expr_one => { | ||
| 1138 | try w.writeByteNTimes(' ', level + half); | ||
| 1139 | try w.writeAll("name: "); | ||
| 1140 | if (color) util.setColor(NAME, w); | ||
| 1141 | try w.print("{s}\n", .{tree.tokSlice(data.decl.name)}); | ||
| 1142 | if (color) util.setColor(.reset, w); | ||
| 1143 | if (data.decl.node != .none) { | ||
| 1144 | try w.writeByteNTimes(' ', level + half); | ||
| 1145 | try w.writeAll("arg:\n"); | ||
| 1146 | try tree.dumpNode(data.decl.node, level + delta, mapper, color, w); | ||
| 1147 | } | ||
| 1148 | }, | ||
| 1149 | .special_builtin_call_one => { | ||
| 1150 | try w.writeByteNTimes(' ', level + half); | ||
| 1151 | try w.writeAll("name: "); | ||
| 1152 | if (color) util.setColor(NAME, w); | ||
| 1153 | try w.print("{s}\n", .{tree.tokSlice(data.decl.name)}); | ||
| 1154 | if (color) util.setColor(.reset, w); | ||
| 1155 | if (data.decl.node != .none) { | ||
| 1156 | try w.writeByteNTimes(' ', level + half); | ||
| 1157 | try w.writeAll("arg:\n"); | ||
| 1158 | try tree.dumpNode(data.decl.node, level + delta, mapper, color, w); | ||
| 1159 | } | ||
| 1160 | }, | ||
| 1161 | .comma_expr, | ||
| 1162 | .assign_expr, | ||
| 1163 | .mul_assign_expr, | ||
| 1164 | .div_assign_expr, | ||
| 1165 | .mod_assign_expr, | ||
| 1166 | .add_assign_expr, | ||
| 1167 | .sub_assign_expr, | ||
| 1168 | .shl_assign_expr, | ||
| 1169 | .shr_assign_expr, | ||
| 1170 | .bit_and_assign_expr, | ||
| 1171 | .bit_xor_assign_expr, | ||
| 1172 | .bit_or_assign_expr, | ||
| 1173 | .bool_or_expr, | ||
| 1174 | .bool_and_expr, | ||
| 1175 | .bit_or_expr, | ||
| 1176 | .bit_xor_expr, | ||
| 1177 | .bit_and_expr, | ||
| 1178 | .equal_expr, | ||
| 1179 | .not_equal_expr, | ||
| 1180 | .less_than_expr, | ||
| 1181 | .less_than_equal_expr, | ||
| 1182 | .greater_than_expr, | ||
| 1183 | .greater_than_equal_expr, | ||
| 1184 | .shl_expr, | ||
| 1185 | .shr_expr, | ||
| 1186 | .add_expr, | ||
| 1187 | .sub_expr, | ||
| 1188 | .mul_expr, | ||
| 1189 | .div_expr, | ||
| 1190 | .mod_expr, | ||
| 1191 | => { | ||
| 1192 | try w.writeByteNTimes(' ', level + 1); | ||
| 1193 | try w.writeAll("lhs:\n"); | ||
| 1194 | try tree.dumpNode(data.bin.lhs, level + delta, mapper, color, w); | ||
| 1195 | try w.writeByteNTimes(' ', level + 1); | ||
| 1196 | try w.writeAll("rhs:\n"); | ||
| 1197 | try tree.dumpNode(data.bin.rhs, level + delta, mapper, color, w); | ||
| 1198 | }, | ||
| 1199 | .explicit_cast, .implicit_cast => try tree.dumpNode(data.cast.operand, level + delta, mapper, color, w), | ||
| 1200 | .addr_of_expr, | ||
| 1201 | .computed_goto_stmt, | ||
| 1202 | .deref_expr, | ||
| 1203 | .plus_expr, | ||
| 1204 | .negate_expr, | ||
| 1205 | .bit_not_expr, | ||
| 1206 | .bool_not_expr, | ||
| 1207 | .pre_inc_expr, | ||
| 1208 | .pre_dec_expr, | ||
| 1209 | .imag_expr, | ||
| 1210 | .real_expr, | ||
| 1211 | .post_inc_expr, | ||
| 1212 | .post_dec_expr, | ||
| 1213 | .paren_expr, | ||
| 1214 | => { | ||
| 1215 | try w.writeByteNTimes(' ', level + 1); | ||
| 1216 | try w.writeAll("operand:\n"); | ||
| 1217 | try tree.dumpNode(data.un, level + delta, mapper, color, w); | ||
| 1218 | }, | ||
| 1219 | .decl_ref_expr => { | ||
| 1220 | try w.writeByteNTimes(' ', level + 1); | ||
| 1221 | try w.writeAll("name: "); | ||
| 1222 | if (color) util.setColor(NAME, w); | ||
| 1223 | try w.print("{s}\n", .{tree.tokSlice(data.decl_ref)}); | ||
| 1224 | if (color) util.setColor(.reset, w); | ||
| 1225 | }, | ||
| 1226 | .enumeration_ref => { | ||
| 1227 | try w.writeByteNTimes(' ', level + 1); | ||
| 1228 | try w.writeAll("name: "); | ||
| 1229 | if (color) util.setColor(NAME, w); | ||
| 1230 | try w.print("{s}\n", .{tree.tokSlice(data.decl_ref)}); | ||
| 1231 | if (color) util.setColor(.reset, w); | ||
| 1232 | }, | ||
| 1233 | .bool_literal, | ||
| 1234 | .nullptr_literal, | ||
| 1235 | .int_literal, | ||
| 1236 | .char_literal, | ||
| 1237 | .float16_literal, | ||
| 1238 | .float_literal, | ||
| 1239 | .double_literal, | ||
| 1240 | .string_literal_expr, | ||
| 1241 | => {}, | ||
| 1242 | .member_access_expr, .member_access_ptr_expr => { | ||
| 1243 | try w.writeByteNTimes(' ', level + 1); | ||
| 1244 | try w.writeAll("lhs:\n"); | ||
| 1245 | try tree.dumpNode(data.member.lhs, level + delta, mapper, color, w); | ||
| 1246 | |||
| 1247 | var lhs_ty = tree.nodes.items(.ty)[@intFromEnum(data.member.lhs)]; | ||
| 1248 | if (lhs_ty.isPtr()) lhs_ty = lhs_ty.elemType(); | ||
| 1249 | lhs_ty = lhs_ty.canonicalize(.standard); | ||
| 1250 | |||
| 1251 | try w.writeByteNTimes(' ', level + 1); | ||
| 1252 | try w.writeAll("name: "); | ||
| 1253 | if (color) util.setColor(NAME, w); | ||
| 1254 | try w.print("{s}\n", .{mapper.lookup(lhs_ty.data.record.fields[data.member.index].name)}); | ||
| 1255 | if (color) util.setColor(.reset, w); | ||
| 1256 | }, | ||
| 1257 | .array_access_expr => { | ||
| 1258 | if (data.bin.lhs != .none) { | ||
| 1259 | try w.writeByteNTimes(' ', level + 1); | ||
| 1260 | try w.writeAll("lhs:\n"); | ||
| 1261 | try tree.dumpNode(data.bin.lhs, level + delta, mapper, color, w); | ||
| 1262 | } | ||
| 1263 | try w.writeByteNTimes(' ', level + 1); | ||
| 1264 | try w.writeAll("index:\n"); | ||
| 1265 | try tree.dumpNode(data.bin.rhs, level + delta, mapper, color, w); | ||
| 1266 | }, | ||
| 1267 | .sizeof_expr, .alignof_expr => { | ||
| 1268 | if (data.un != .none) { | ||
| 1269 | try w.writeByteNTimes(' ', level + 1); | ||
| 1270 | try w.writeAll("expr:\n"); | ||
| 1271 | try tree.dumpNode(data.un, level + delta, mapper, color, w); | ||
| 1272 | } | ||
| 1273 | }, | ||
| 1274 | .generic_expr_one => { | ||
| 1275 | try w.writeByteNTimes(' ', level + 1); | ||
| 1276 | try w.writeAll("controlling:\n"); | ||
| 1277 | try tree.dumpNode(data.bin.lhs, level + delta, mapper, color, w); | ||
| 1278 | try w.writeByteNTimes(' ', level + 1); | ||
| 1279 | if (data.bin.rhs != .none) { | ||
| 1280 | try w.writeAll("chosen:\n"); | ||
| 1281 | try tree.dumpNode(data.bin.rhs, level + delta, mapper, color, w); | ||
| 1282 | } | ||
| 1283 | }, | ||
| 1284 | .generic_expr => { | ||
| 1285 | const nodes = tree.data[data.range.start..data.range.end]; | ||
| 1286 | try w.writeByteNTimes(' ', level + 1); | ||
| 1287 | try w.writeAll("controlling:\n"); | ||
| 1288 | try tree.dumpNode(nodes[0], level + delta, mapper, color, w); | ||
| 1289 | try w.writeByteNTimes(' ', level + 1); | ||
| 1290 | try w.writeAll("chosen:\n"); | ||
| 1291 | try tree.dumpNode(nodes[1], level + delta, mapper, color, w); | ||
| 1292 | try w.writeByteNTimes(' ', level + 1); | ||
| 1293 | try w.writeAll("rest:\n"); | ||
| 1294 | for (nodes[2..]) |expr| { | ||
| 1295 | try tree.dumpNode(expr, level + delta, mapper, color, w); | ||
| 1296 | } | ||
| 1297 | }, | ||
| 1298 | .generic_association_expr, .generic_default_expr, .stmt_expr, .imaginary_literal => { | ||
| 1299 | try tree.dumpNode(data.un, level + delta, mapper, color, w); | ||
| 1300 | }, | ||
| 1301 | .array_filler_expr => { | ||
| 1302 | try w.writeByteNTimes(' ', level + 1); | ||
| 1303 | try w.writeAll("count: "); | ||
| 1304 | if (color) util.setColor(LITERAL, w); | ||
| 1305 | try w.print("{d}\n", .{data.int}); | ||
| 1306 | if (color) util.setColor(.reset, w); | ||
| 1307 | }, | ||
| 1308 | .struct_forward_decl, | ||
| 1309 | .union_forward_decl, | ||
| 1310 | .enum_forward_decl, | ||
| 1311 | .default_init_expr, | ||
| 1312 | .cond_dummy_expr, | ||
| 1313 | => {}, | ||
| 1314 | } | ||
| 1315 | } | ||
deps/aro/Type.zig deleted-2707| ... | @@ -1,2707 +0,0 @@ | ||
| 1 | const std = @import("std"); | ||
| 2 | const Tree = @import("Tree.zig"); | ||
| 3 | const TokenIndex = Tree.TokenIndex; | ||
| 4 | const NodeIndex = Tree.NodeIndex; | ||
| 5 | const Parser = @import("Parser.zig"); | ||
| 6 | const Compilation = @import("Compilation.zig"); | ||
| 7 | const Attribute = @import("Attribute.zig"); | ||
| 8 | const StringInterner = @import("StringInterner.zig"); | ||
| 9 | const StringId = StringInterner.StringId; | ||
| 10 | const target_util = @import("target.zig"); | ||
| 11 | const LangOpts = @import("LangOpts.zig"); | ||
| 12 | |||
| 13 | const Type = @This(); | ||
| 14 | |||
| 15 | pub const Qualifiers = packed struct { | ||
| 16 | @"const": bool = false, | ||
| 17 | atomic: bool = false, | ||
| 18 | @"volatile": bool = false, | ||
| 19 | restrict: bool = false, | ||
| 20 | |||
| 21 | // for function parameters only, stored here since it fits in the padding | ||
| 22 | register: bool = false, | ||
| 23 | |||
| 24 | pub fn any(quals: Qualifiers) bool { | ||
| 25 | return quals.@"const" or quals.restrict or quals.@"volatile" or quals.atomic; | ||
| 26 | } | ||
| 27 | |||
| 28 | pub fn dump(quals: Qualifiers, w: anytype) !void { | ||
| 29 | if (quals.@"const") try w.writeAll("const "); | ||
| 30 | if (quals.atomic) try w.writeAll("_Atomic "); | ||
| 31 | if (quals.@"volatile") try w.writeAll("volatile "); | ||
| 32 | if (quals.restrict) try w.writeAll("restrict "); | ||
| 33 | if (quals.register) try w.writeAll("register "); | ||
| 34 | } | ||
| 35 | |||
| 36 | /// Merge the const/volatile qualifiers, used by type resolution | ||
| 37 | /// of the conditional operator | ||
| 38 | pub fn mergeCV(a: Qualifiers, b: Qualifiers) Qualifiers { | ||
| 39 | return .{ | ||
| 40 | .@"const" = a.@"const" or b.@"const", | ||
| 41 | .@"volatile" = a.@"volatile" or b.@"volatile", | ||
| 42 | }; | ||
| 43 | } | ||
| 44 | |||
| 45 | /// Merge all qualifiers, used by typeof() | ||
| 46 | fn mergeAll(a: Qualifiers, b: Qualifiers) Qualifiers { | ||
| 47 | return .{ | ||
| 48 | .@"const" = a.@"const" or b.@"const", | ||
| 49 | .atomic = a.atomic or b.atomic, | ||
| 50 | .@"volatile" = a.@"volatile" or b.@"volatile", | ||
| 51 | .restrict = a.restrict or b.restrict, | ||
| 52 | .register = a.register or b.register, | ||
| 53 | }; | ||
| 54 | } | ||
| 55 | |||
| 56 | /// Checks if a has all the qualifiers of b | ||
| 57 | pub fn hasQuals(a: Qualifiers, b: Qualifiers) bool { | ||
| 58 | if (b.@"const" and !a.@"const") return false; | ||
| 59 | if (b.@"volatile" and !a.@"volatile") return false; | ||
| 60 | if (b.atomic and !a.atomic) return false; | ||
| 61 | return true; | ||
| 62 | } | ||
| 63 | |||
| 64 | /// register is a storage class and not actually a qualifier | ||
| 65 | /// so it is not preserved by typeof() | ||
| 66 | pub fn inheritFromTypeof(quals: Qualifiers) Qualifiers { | ||
| 67 | var res = quals; | ||
| 68 | res.register = false; | ||
| 69 | return res; | ||
| 70 | } | ||
| 71 | |||
| 72 | pub const Builder = struct { | ||
| 73 | @"const": ?TokenIndex = null, | ||
| 74 | atomic: ?TokenIndex = null, | ||
| 75 | @"volatile": ?TokenIndex = null, | ||
| 76 | restrict: ?TokenIndex = null, | ||
| 77 | |||
| 78 | pub fn finish(b: Qualifiers.Builder, p: *Parser, ty: *Type) !void { | ||
| 79 | if (ty.specifier != .pointer and b.restrict != null) { | ||
| 80 | try p.errStr(.restrict_non_pointer, b.restrict.?, try p.typeStr(ty.*)); | ||
| 81 | } | ||
| 82 | if (b.atomic) |some| { | ||
| 83 | if (ty.isArray()) try p.errStr(.atomic_array, some, try p.typeStr(ty.*)); | ||
| 84 | if (ty.isFunc()) try p.errStr(.atomic_func, some, try p.typeStr(ty.*)); | ||
| 85 | if (ty.hasIncompleteSize()) try p.errStr(.atomic_incomplete, some, try p.typeStr(ty.*)); | ||
| 86 | } | ||
| 87 | |||
| 88 | if (b.@"const" != null) ty.qual.@"const" = true; | ||
| 89 | if (b.atomic != null) ty.qual.atomic = true; | ||
| 90 | if (b.@"volatile" != null) ty.qual.@"volatile" = true; | ||
| 91 | if (b.restrict != null) ty.qual.restrict = true; | ||
| 92 | } | ||
| 93 | }; | ||
| 94 | }; | ||
| 95 | |||
| 96 | // TODO improve memory usage | ||
| 97 | pub const Func = struct { | ||
| 98 | return_type: Type, | ||
| 99 | params: []Param, | ||
| 100 | |||
| 101 | pub const Param = struct { | ||
| 102 | ty: Type, | ||
| 103 | name: StringId, | ||
| 104 | name_tok: TokenIndex, | ||
| 105 | }; | ||
| 106 | |||
| 107 | fn eql(a: *const Func, b: *const Func, a_var_args: bool, b_var_args: bool, comp: *const Compilation) bool { | ||
| 108 | // return type cannot have qualifiers | ||
| 109 | if (!a.return_type.eql(b.return_type, comp, false)) return false; | ||
| 110 | |||
| 111 | if (a.params.len != b.params.len) { | ||
| 112 | const a_no_proto = a_var_args and a.params.len == 0 and !comp.langopts.standard.atLeast(.c2x); | ||
| 113 | const b_no_proto = b_var_args and b.params.len == 0 and !comp.langopts.standard.atLeast(.c2x); | ||
| 114 | if (a_no_proto or b_no_proto) { | ||
| 115 | const maybe_has_params = if (a_no_proto) b else a; | ||
| 116 | for (maybe_has_params.params) |param| { | ||
| 117 | if (param.ty.undergoesDefaultArgPromotion(comp)) return false; | ||
| 118 | } | ||
| 119 | return true; | ||
| 120 | } | ||
| 121 | } | ||
| 122 | if (a_var_args != b_var_args) return false; | ||
| 123 | // TODO validate this | ||
| 124 | for (a.params, b.params) |param, b_qual| { | ||
| 125 | var a_unqual = param.ty; | ||
| 126 | a_unqual.qual.@"const" = false; | ||
| 127 | a_unqual.qual.@"volatile" = false; | ||
| 128 | var b_unqual = b_qual.ty; | ||
| 129 | b_unqual.qual.@"const" = false; | ||
| 130 | b_unqual.qual.@"volatile" = false; | ||
| 131 | if (!a_unqual.eql(b_unqual, comp, true)) return false; | ||
| 132 | } | ||
| 133 | return true; | ||
| 134 | } | ||
| 135 | }; | ||
| 136 | |||
| 137 | pub const Array = struct { | ||
| 138 | len: u64, | ||
| 139 | elem: Type, | ||
| 140 | }; | ||
| 141 | |||
| 142 | pub const Expr = struct { | ||
| 143 | node: NodeIndex, | ||
| 144 | ty: Type, | ||
| 145 | }; | ||
| 146 | |||
| 147 | pub const Attributed = struct { | ||
| 148 | attributes: []Attribute, | ||
| 149 | base: Type, | ||
| 150 | |||
| 151 | pub fn create(allocator: std.mem.Allocator, base: Type, existing_attributes: []const Attribute, attributes: []const Attribute) !*Attributed { | ||
| 152 | var attributed_type = try allocator.create(Attributed); | ||
| 153 | errdefer allocator.destroy(attributed_type); | ||
| 154 | |||
| 155 | var all_attrs = try allocator.alloc(Attribute, existing_attributes.len + attributes.len); | ||
| 156 | std.mem.copy(Attribute, all_attrs, existing_attributes); | ||
| 157 | std.mem.copy(Attribute, all_attrs[existing_attributes.len..], attributes); | ||
| 158 | |||
| 159 | attributed_type.* = .{ | ||
| 160 | .attributes = all_attrs, | ||
| 161 | .base = base, | ||
| 162 | }; | ||
| 163 | return attributed_type; | ||
| 164 | } | ||
| 165 | }; | ||
| 166 | |||
| 167 | // TODO improve memory usage | ||
| 168 | pub const Enum = struct { | ||
| 169 | fields: []Field, | ||
| 170 | tag_ty: Type, | ||
| 171 | name: StringId, | ||
| 172 | fixed: bool, | ||
| 173 | |||
| 174 | pub const Field = struct { | ||
| 175 | ty: Type, | ||
| 176 | name: StringId, | ||
| 177 | name_tok: TokenIndex, | ||
| 178 | node: NodeIndex, | ||
| 179 | }; | ||
| 180 | |||
| 181 | pub fn isIncomplete(e: Enum) bool { | ||
| 182 | return e.fields.len == std.math.maxInt(usize); | ||
| 183 | } | ||
| 184 | |||
| 185 | pub fn create(allocator: std.mem.Allocator, name: StringId, fixed_ty: ?Type) !*Enum { | ||
| 186 | var e = try allocator.create(Enum); | ||
| 187 | e.name = name; | ||
| 188 | e.fields.len = std.math.maxInt(usize); | ||
| 189 | if (fixed_ty) |some| e.tag_ty = some; | ||
| 190 | e.fixed = fixed_ty != null; | ||
| 191 | return e; | ||
| 192 | } | ||
| 193 | }; | ||
| 194 | |||
| 195 | // might not need all 4 of these when finished, | ||
| 196 | // but currently it helps having all 4 when diff-ing | ||
| 197 | // the rust code. | ||
| 198 | pub const TypeLayout = struct { | ||
| 199 | /// The size of the type in bits. | ||
| 200 | /// | ||
| 201 | /// This is the value returned by `sizeof` and C and `std::mem::size_of` in Rust | ||
| 202 | /// (but in bits instead of bytes). This is a multiple of `pointer_alignment_bits`. | ||
| 203 | size_bits: u64, | ||
| 204 | /// The alignment of the type, in bits, when used as a field in a record. | ||
| 205 | /// | ||
| 206 | /// This is usually the value returned by `_Alignof` in C, but there are some edge | ||
| 207 | /// cases in GCC where `_Alignof` returns a smaller value. | ||
| 208 | field_alignment_bits: u32, | ||
| 209 | /// The alignment, in bits, of valid pointers to this type. | ||
| 210 | /// | ||
| 211 | /// This is the value returned by `std::mem::align_of` in Rust | ||
| 212 | /// (but in bits instead of bytes). `size_bits` is a multiple of this value. | ||
| 213 | pointer_alignment_bits: u32, | ||
| 214 | /// The required alignment of the type in bits. | ||
| 215 | /// | ||
| 216 | /// This value is only used by MSVC targets. It is 8 on all other | ||
| 217 | /// targets. On MSVC targets, this value restricts the effects of `#pragma pack` except | ||
| 218 | /// in some cases involving bit-fields. | ||
| 219 | required_alignment_bits: u32, | ||
| 220 | }; | ||
| 221 | |||
| 222 | pub const FieldLayout = struct { | ||
| 223 | /// `offset_bits` and `size_bits` should both be INVALID if and only if the field | ||
| 224 | /// is an unnamed bitfield. There is no way to reference an unnamed bitfield in C, so | ||
| 225 | /// there should be no way to observe these values. If it is used, this value will | ||
| 226 | /// maximize the chance that a safety-checked overflow will occur. | ||
| 227 | const INVALID = std.math.maxInt(u64); | ||
| 228 | |||
| 229 | /// The offset of the field, in bits, from the start of the struct. | ||
| 230 | offset_bits: u64 = INVALID, | ||
| 231 | /// The size, in bits, of the field. | ||
| 232 | /// | ||
| 233 | /// For bit-fields, this is the width of the field. | ||
| 234 | size_bits: u64 = INVALID, | ||
| 235 | |||
| 236 | pub fn isUnnamed(self: FieldLayout) bool { | ||
| 237 | return self.offset_bits == INVALID and self.size_bits == INVALID; | ||
| 238 | } | ||
| 239 | }; | ||
| 240 | |||
| 241 | // TODO improve memory usage | ||
| 242 | pub const Record = struct { | ||
| 243 | fields: []Field, | ||
| 244 | type_layout: TypeLayout, | ||
| 245 | /// If this is null, none of the fields have attributes | ||
| 246 | /// Otherwise, it's a pointer to N items (where N == number of fields) | ||
| 247 | /// and the item at index i is the attributes for the field at index i | ||
| 248 | field_attributes: ?[*][]const Attribute, | ||
| 249 | name: StringId, | ||
| 250 | |||
| 251 | pub const Field = struct { | ||
| 252 | ty: Type, | ||
| 253 | name: StringId, | ||
| 254 | /// zero for anonymous fields | ||
| 255 | name_tok: TokenIndex = 0, | ||
| 256 | bit_width: ?u32 = null, | ||
| 257 | layout: FieldLayout = .{ | ||
| 258 | .offset_bits = 0, | ||
| 259 | .size_bits = 0, | ||
| 260 | }, | ||
| 261 | |||
| 262 | pub fn isNamed(f: *const Field) bool { | ||
| 263 | return f.name_tok != 0; | ||
| 264 | } | ||
| 265 | |||
| 266 | pub fn isAnonymousRecord(f: Field) bool { | ||
| 267 | return !f.isNamed() and f.ty.isRecord(); | ||
| 268 | } | ||
| 269 | |||
| 270 | /// false for bitfields | ||
| 271 | pub fn isRegularField(f: *const Field) bool { | ||
| 272 | return f.bit_width == null; | ||
| 273 | } | ||
| 274 | |||
| 275 | /// bit width as specified in the C source. Asserts that `f` is a bitfield. | ||
| 276 | pub fn specifiedBitWidth(f: *const Field) u32 { | ||
| 277 | return f.bit_width.?; | ||
| 278 | } | ||
| 279 | }; | ||
| 280 | |||
| 281 | pub fn isIncomplete(r: Record) bool { | ||
| 282 | return r.fields.len == std.math.maxInt(usize); | ||
| 283 | } | ||
| 284 | |||
| 285 | pub fn create(allocator: std.mem.Allocator, name: StringId) !*Record { | ||
| 286 | var r = try allocator.create(Record); | ||
| 287 | r.name = name; | ||
| 288 | r.fields.len = std.math.maxInt(usize); | ||
| 289 | r.field_attributes = null; | ||
| 290 | r.type_layout = .{ | ||
| 291 | .size_bits = 8, | ||
| 292 | .field_alignment_bits = 8, | ||
| 293 | .pointer_alignment_bits = 8, | ||
| 294 | .required_alignment_bits = 8, | ||
| 295 | }; | ||
| 296 | return r; | ||
| 297 | } | ||
| 298 | |||
| 299 | pub fn hasFieldOfType(self: *const Record, ty: Type, comp: *const Compilation) bool { | ||
| 300 | if (self.isIncomplete()) return false; | ||
| 301 | for (self.fields) |f| { | ||
| 302 | if (ty.eql(f.ty, comp, false)) return true; | ||
| 303 | } | ||
| 304 | return false; | ||
| 305 | } | ||
| 306 | }; | ||
| 307 | |||
| 308 | pub const Specifier = enum { | ||
| 309 | /// A NaN-like poison value | ||
| 310 | invalid, | ||
| 311 | |||
| 312 | /// GNU auto type | ||
| 313 | /// This is a placeholder specifier - it must be replaced by the actual type specifier (determined by the initializer) | ||
| 314 | auto_type, | ||
| 315 | |||
| 316 | void, | ||
| 317 | bool, | ||
| 318 | |||
| 319 | // integers | ||
| 320 | char, | ||
| 321 | schar, | ||
| 322 | uchar, | ||
| 323 | short, | ||
| 324 | ushort, | ||
| 325 | int, | ||
| 326 | uint, | ||
| 327 | long, | ||
| 328 | ulong, | ||
| 329 | long_long, | ||
| 330 | ulong_long, | ||
| 331 | int128, | ||
| 332 | uint128, | ||
| 333 | complex_char, | ||
| 334 | complex_schar, | ||
| 335 | complex_uchar, | ||
| 336 | complex_short, | ||
| 337 | complex_ushort, | ||
| 338 | complex_int, | ||
| 339 | complex_uint, | ||
| 340 | complex_long, | ||
| 341 | complex_ulong, | ||
| 342 | complex_long_long, | ||
| 343 | complex_ulong_long, | ||
| 344 | complex_int128, | ||
| 345 | complex_uint128, | ||
| 346 | |||
| 347 | // data.int | ||
| 348 | bit_int, | ||
| 349 | complex_bit_int, | ||
| 350 | |||
| 351 | // floating point numbers | ||
| 352 | fp16, | ||
| 353 | float16, | ||
| 354 | float, | ||
| 355 | double, | ||
| 356 | long_double, | ||
| 357 | float80, | ||
| 358 | float128, | ||
| 359 | complex_float, | ||
| 360 | complex_double, | ||
| 361 | complex_long_double, | ||
| 362 | complex_float80, | ||
| 363 | complex_float128, | ||
| 364 | |||
| 365 | // data.sub_type | ||
| 366 | pointer, | ||
| 367 | unspecified_variable_len_array, | ||
| 368 | decayed_unspecified_variable_len_array, | ||
| 369 | // data.func | ||
| 370 | /// int foo(int bar, char baz) and int (void) | ||
| 371 | func, | ||
| 372 | /// int foo(int bar, char baz, ...) | ||
| 373 | var_args_func, | ||
| 374 | /// int foo(bar, baz) and int foo() | ||
| 375 | /// is also var args, but we can give warnings about incorrect amounts of parameters | ||
| 376 | old_style_func, | ||
| 377 | |||
| 378 | // data.array | ||
| 379 | array, | ||
| 380 | decayed_array, | ||
| 381 | static_array, | ||
| 382 | decayed_static_array, | ||
| 383 | incomplete_array, | ||
| 384 | decayed_incomplete_array, | ||
| 385 | vector, | ||
| 386 | // data.expr | ||
| 387 | variable_len_array, | ||
| 388 | decayed_variable_len_array, | ||
| 389 | |||
| 390 | // data.record | ||
| 391 | @"struct", | ||
| 392 | @"union", | ||
| 393 | |||
| 394 | // data.enum | ||
| 395 | @"enum", | ||
| 396 | |||
| 397 | /// typeof(type-name) | ||
| 398 | typeof_type, | ||
| 399 | /// decayed array created with typeof(type-name) | ||
| 400 | decayed_typeof_type, | ||
| 401 | |||
| 402 | /// typeof(expression) | ||
| 403 | typeof_expr, | ||
| 404 | /// decayed array created with typeof(expression) | ||
| 405 | decayed_typeof_expr, | ||
| 406 | |||
| 407 | /// data.attributed | ||
| 408 | attributed, | ||
| 409 | |||
| 410 | /// C23 nullptr_t | ||
| 411 | nullptr_t, | ||
| 412 | }; | ||
| 413 | |||
| 414 | /// All fields of Type except data may be mutated | ||
| 415 | data: union { | ||
| 416 | sub_type: *Type, | ||
| 417 | func: *Func, | ||
| 418 | array: *Array, | ||
| 419 | expr: *Expr, | ||
| 420 | @"enum": *Enum, | ||
| 421 | record: *Record, | ||
| 422 | attributed: *Attributed, | ||
| 423 | none: void, | ||
| 424 | int: struct { | ||
| 425 | bits: u8, | ||
| 426 | signedness: std.builtin.Signedness, | ||
| 427 | }, | ||
| 428 | } = .{ .none = {} }, | ||
| 429 | specifier: Specifier, | ||
| 430 | qual: Qualifiers = .{}, | ||
| 431 | |||
| 432 | pub const int = Type{ .specifier = .int }; | ||
| 433 | pub const invalid = Type{ .specifier = .invalid }; | ||
| 434 | |||
| 435 | /// Determine if type matches the given specifier, recursing into typeof | ||
| 436 | /// types if necessary. | ||
| 437 | pub fn is(ty: Type, specifier: Specifier) bool { | ||
| 438 | std.debug.assert(specifier != .typeof_type and specifier != .typeof_expr); | ||
| 439 | return ty.get(specifier) != null; | ||
| 440 | } | ||
| 441 | |||
| 442 | pub fn withAttributes(self: Type, allocator: std.mem.Allocator, attributes: []const Attribute) !Type { | ||
| 443 | if (attributes.len == 0) return self; | ||
| 444 | const attributed_type = try Type.Attributed.create(allocator, self, self.getAttributes(), attributes); | ||
| 445 | return Type{ .specifier = .attributed, .data = .{ .attributed = attributed_type } }; | ||
| 446 | } | ||
| 447 | |||
| 448 | pub fn isCallable(ty: Type) ?Type { | ||
| 449 | return switch (ty.specifier) { | ||
| 450 | .func, .var_args_func, .old_style_func => ty, | ||
| 451 | .pointer => if (ty.data.sub_type.isFunc()) ty.data.sub_type.* else null, | ||
| 452 | .typeof_type => ty.data.sub_type.isCallable(), | ||
| 453 | .typeof_expr => ty.data.expr.ty.isCallable(), | ||
| 454 | .attributed => ty.data.attributed.base.isCallable(), | ||
| 455 | else => null, | ||
| 456 | }; | ||
| 457 | } | ||
| 458 | |||
| 459 | pub fn isFunc(ty: Type) bool { | ||
| 460 | return switch (ty.specifier) { | ||
| 461 | .func, .var_args_func, .old_style_func => true, | ||
| 462 | .typeof_type => ty.data.sub_type.isFunc(), | ||
| 463 | .typeof_expr => ty.data.expr.ty.isFunc(), | ||
| 464 | .attributed => ty.data.attributed.base.isFunc(), | ||
| 465 | else => false, | ||
| 466 | }; | ||
| 467 | } | ||
| 468 | |||
| 469 | pub fn isArray(ty: Type) bool { | ||
| 470 | return switch (ty.specifier) { | ||
| 471 | .array, .static_array, .incomplete_array, .variable_len_array, .unspecified_variable_len_array => true, | ||
| 472 | .typeof_type => ty.data.sub_type.isArray(), | ||
| 473 | .typeof_expr => ty.data.expr.ty.isArray(), | ||
| 474 | .attributed => ty.data.attributed.base.isArray(), | ||
| 475 | else => false, | ||
| 476 | }; | ||
| 477 | } | ||
| 478 | |||
| 479 | /// Whether the type is promoted if used as a variadic argument or as an argument to a function with no prototype | ||
| 480 | fn undergoesDefaultArgPromotion(ty: Type, comp: *const Compilation) bool { | ||
| 481 | return switch (ty.specifier) { | ||
| 482 | .bool => true, | ||
| 483 | .char, .uchar, .schar => true, | ||
| 484 | .short, .ushort => true, | ||
| 485 | .@"enum" => if (comp.langopts.emulate == .clang) ty.data.@"enum".isIncomplete() else false, | ||
| 486 | .float => true, | ||
| 487 | |||
| 488 | .typeof_type => ty.data.sub_type.undergoesDefaultArgPromotion(comp), | ||
| 489 | .typeof_expr => ty.data.expr.ty.undergoesDefaultArgPromotion(comp), | ||
| 490 | .attributed => ty.data.attributed.base.undergoesDefaultArgPromotion(comp), | ||
| 491 | else => false, | ||
| 492 | }; | ||
| 493 | } | ||
| 494 | |||
| 495 | pub fn isScalar(ty: Type) bool { | ||
| 496 | return ty.isInt() or ty.isScalarNonInt(); | ||
| 497 | } | ||
| 498 | |||
| 499 | /// To avoid calling isInt() twice for allowable loop/if controlling expressions | ||
| 500 | pub fn isScalarNonInt(ty: Type) bool { | ||
| 501 | return ty.isFloat() or ty.isPtr() or ty.is(.nullptr_t); | ||
| 502 | } | ||
| 503 | |||
| 504 | pub fn isDecayed(ty: Type) bool { | ||
| 505 | const decayed = switch (ty.specifier) { | ||
| 506 | .decayed_array, | ||
| 507 | .decayed_static_array, | ||
| 508 | .decayed_incomplete_array, | ||
| 509 | .decayed_variable_len_array, | ||
| 510 | .decayed_unspecified_variable_len_array, | ||
| 511 | .decayed_typeof_type, | ||
| 512 | .decayed_typeof_expr, | ||
| 513 | => true, | ||
| 514 | else => false, | ||
| 515 | }; | ||
| 516 | std.debug.assert(decayed or !std.mem.startsWith(u8, @tagName(ty.specifier), "decayed")); | ||
| 517 | return decayed; | ||
| 518 | } | ||
| 519 | |||
| 520 | pub fn isPtr(ty: Type) bool { | ||
| 521 | return switch (ty.specifier) { | ||
| 522 | .pointer, | ||
| 523 | .decayed_array, | ||
| 524 | .decayed_static_array, | ||
| 525 | .decayed_incomplete_array, | ||
| 526 | .decayed_variable_len_array, | ||
| 527 | .decayed_unspecified_variable_len_array, | ||
| 528 | .decayed_typeof_type, | ||
| 529 | .decayed_typeof_expr, | ||
| 530 | => true, | ||
| 531 | .typeof_type => ty.data.sub_type.isPtr(), | ||
| 532 | .typeof_expr => ty.data.expr.ty.isPtr(), | ||
| 533 | .attributed => ty.data.attributed.base.isPtr(), | ||
| 534 | else => false, | ||
| 535 | }; | ||
| 536 | } | ||
| 537 | |||
| 538 | pub fn isInt(ty: Type) bool { | ||
| 539 | return switch (ty.specifier) { | ||
| 540 | // zig fmt: off | ||
| 541 | .@"enum", .bool, .char, .schar, .uchar, .short, .ushort, .int, .uint, .long, .ulong, | ||
| 542 | .long_long, .ulong_long, .int128, .uint128, .complex_char, .complex_schar, .complex_uchar, | ||
| 543 | .complex_short, .complex_ushort, .complex_int, .complex_uint, .complex_long, .complex_ulong, | ||
| 544 | .complex_long_long, .complex_ulong_long, .complex_int128, .complex_uint128, | ||
| 545 | .bit_int, .complex_bit_int => true, | ||
| 546 | // zig fmt: on | ||
| 547 | .typeof_type => ty.data.sub_type.isInt(), | ||
| 548 | .typeof_expr => ty.data.expr.ty.isInt(), | ||
| 549 | .attributed => ty.data.attributed.base.isInt(), | ||
| 550 | else => false, | ||
| 551 | }; | ||
| 552 | } | ||
| 553 | |||
| 554 | pub fn isFloat(ty: Type) bool { | ||
| 555 | return switch (ty.specifier) { | ||
| 556 | // zig fmt: off | ||
| 557 | .float, .double, .long_double, .complex_float, .complex_double, .complex_long_double, | ||
| 558 | .fp16, .float16, .float80, .float128, .complex_float80, .complex_float128 => true, | ||
| 559 | // zig fmt: on | ||
| 560 | .typeof_type => ty.data.sub_type.isFloat(), | ||
| 561 | .typeof_expr => ty.data.expr.ty.isFloat(), | ||
| 562 | .attributed => ty.data.attributed.base.isFloat(), | ||
| 563 | else => false, | ||
| 564 | }; | ||
| 565 | } | ||
| 566 | |||
| 567 | pub fn isReal(ty: Type) bool { | ||
| 568 | return switch (ty.specifier) { | ||
| 569 | // zig fmt: off | ||
| 570 | .complex_float, .complex_double, .complex_long_double, .complex_float80, | ||
| 571 | .complex_float128, .complex_char, .complex_schar, .complex_uchar, .complex_short, | ||
| 572 | .complex_ushort, .complex_int, .complex_uint, .complex_long, .complex_ulong, | ||
| 573 | .complex_long_long, .complex_ulong_long, .complex_int128, .complex_uint128, | ||
| 574 | .complex_bit_int => false, | ||
| 575 | // zig fmt: on | ||
| 576 | .typeof_type => ty.data.sub_type.isReal(), | ||
| 577 | .typeof_expr => ty.data.expr.ty.isReal(), | ||
| 578 | .attributed => ty.data.attributed.base.isReal(), | ||
| 579 | else => true, | ||
| 580 | }; | ||
| 581 | } | ||
| 582 | |||
| 583 | pub fn isComplex(ty: Type) bool { | ||
| 584 | return switch (ty.specifier) { | ||
| 585 | // zig fmt: off | ||
| 586 | .complex_float, .complex_double, .complex_long_double, .complex_float80, | ||
| 587 | .complex_float128, .complex_char, .complex_schar, .complex_uchar, .complex_short, | ||
| 588 | .complex_ushort, .complex_int, .complex_uint, .complex_long, .complex_ulong, | ||
| 589 | .complex_long_long, .complex_ulong_long, .complex_int128, .complex_uint128, | ||
| 590 | .complex_bit_int => true, | ||
| 591 | // zig fmt: on | ||
| 592 | .typeof_type => ty.data.sub_type.isComplex(), | ||
| 593 | .typeof_expr => ty.data.expr.ty.isComplex(), | ||
| 594 | .attributed => ty.data.attributed.base.isComplex(), | ||
| 595 | else => false, | ||
| 596 | }; | ||
| 597 | } | ||
| 598 | |||
| 599 | pub fn isVoidStar(ty: Type) bool { | ||
| 600 | return switch (ty.specifier) { | ||
| 601 | .pointer => ty.data.sub_type.specifier == .void, | ||
| 602 | .typeof_type => ty.data.sub_type.isVoidStar(), | ||
| 603 | .typeof_expr => ty.data.expr.ty.isVoidStar(), | ||
| 604 | .attributed => ty.data.attributed.base.isVoidStar(), | ||
| 605 | else => false, | ||
| 606 | }; | ||
| 607 | } | ||
| 608 | |||
| 609 | pub fn isTypeof(ty: Type) bool { | ||
| 610 | return switch (ty.specifier) { | ||
| 611 | .typeof_type, .typeof_expr, .decayed_typeof_type, .decayed_typeof_expr => true, | ||
| 612 | else => false, | ||
| 613 | }; | ||
| 614 | } | ||
| 615 | |||
| 616 | pub fn isConst(ty: Type) bool { | ||
| 617 | return switch (ty.specifier) { | ||
| 618 | .typeof_type, .decayed_typeof_type => ty.qual.@"const" or ty.data.sub_type.isConst(), | ||
| 619 | .typeof_expr, .decayed_typeof_expr => ty.qual.@"const" or ty.data.expr.ty.isConst(), | ||
| 620 | .attributed => ty.data.attributed.base.isConst(), | ||
| 621 | else => ty.qual.@"const", | ||
| 622 | }; | ||
| 623 | } | ||
| 624 | |||
| 625 | pub fn isUnsignedInt(ty: Type, comp: *const Compilation) bool { | ||
| 626 | return switch (ty.specifier) { | ||
| 627 | // zig fmt: off | ||
| 628 | .char, .complex_char => return comp.getCharSignedness() == .unsigned, | ||
| 629 | .uchar, .ushort, .uint, .ulong, .ulong_long, .bool, .complex_uchar, .complex_ushort, | ||
| 630 | .complex_uint, .complex_ulong, .complex_ulong_long, .complex_uint128 => true, | ||
| 631 | // zig fmt: on | ||
| 632 | .bit_int, .complex_bit_int => return ty.data.int.signedness == .unsigned, | ||
| 633 | .typeof_type => ty.data.sub_type.isUnsignedInt(comp), | ||
| 634 | .typeof_expr => ty.data.expr.ty.isUnsignedInt(comp), | ||
| 635 | .attributed => ty.data.attributed.base.isUnsignedInt(comp), | ||
| 636 | else => false, | ||
| 637 | }; | ||
| 638 | } | ||
| 639 | |||
| 640 | pub fn isEnumOrRecord(ty: Type) bool { | ||
| 641 | return switch (ty.specifier) { | ||
| 642 | .@"enum", .@"struct", .@"union" => true, | ||
| 643 | .typeof_type => ty.data.sub_type.isEnumOrRecord(), | ||
| 644 | .typeof_expr => ty.data.expr.ty.isEnumOrRecord(), | ||
| 645 | .attributed => ty.data.attributed.base.isEnumOrRecord(), | ||
| 646 | else => false, | ||
| 647 | }; | ||
| 648 | } | ||
| 649 | |||
| 650 | pub fn isRecord(ty: Type) bool { | ||
| 651 | return switch (ty.specifier) { | ||
| 652 | .@"struct", .@"union" => true, | ||
| 653 | .typeof_type => ty.data.sub_type.isRecord(), | ||
| 654 | .typeof_expr => ty.data.expr.ty.isRecord(), | ||
| 655 | .attributed => ty.data.attributed.base.isRecord(), | ||
| 656 | else => false, | ||
| 657 | }; | ||
| 658 | } | ||
| 659 | |||
| 660 | pub fn isAnonymousRecord(ty: Type, comp: *const Compilation) bool { | ||
| 661 | return switch (ty.specifier) { | ||
| 662 | // anonymous records can be recognized by their names which are in | ||
| 663 | // the format "(anonymous TAG at path:line:col)". | ||
| 664 | .@"struct", .@"union" => { | ||
| 665 | const mapper = comp.string_interner.getSlowTypeMapper(); | ||
| 666 | return mapper.lookup(ty.data.record.name)[0] == '('; | ||
| 667 | }, | ||
| 668 | .typeof_type => ty.data.sub_type.isAnonymousRecord(comp), | ||
| 669 | .typeof_expr => ty.data.expr.ty.isAnonymousRecord(comp), | ||
| 670 | .attributed => ty.data.attributed.base.isAnonymousRecord(comp), | ||
| 671 | else => false, | ||
| 672 | }; | ||
| 673 | } | ||
| 674 | |||
| 675 | pub fn elemType(ty: Type) Type { | ||
| 676 | return switch (ty.specifier) { | ||
| 677 | .pointer, .unspecified_variable_len_array, .decayed_unspecified_variable_len_array => ty.data.sub_type.*, | ||
| 678 | .array, .static_array, .incomplete_array, .decayed_array, .decayed_static_array, .decayed_incomplete_array, .vector => ty.data.array.elem, | ||
| 679 | .variable_len_array, .decayed_variable_len_array => ty.data.expr.ty, | ||
| 680 | .typeof_type, .decayed_typeof_type, .typeof_expr, .decayed_typeof_expr => { | ||
| 681 | const unwrapped = ty.canonicalize(.preserve_quals); | ||
| 682 | var elem = unwrapped.elemType(); | ||
| 683 | elem.qual = elem.qual.mergeAll(unwrapped.qual); | ||
| 684 | return elem; | ||
| 685 | }, | ||
| 686 | .attributed => ty.data.attributed.base, | ||
| 687 | .invalid => Type.invalid, | ||
| 688 | // zig fmt: off | ||
| 689 | .complex_float, .complex_double, .complex_long_double, .complex_float80, | ||
| 690 | .complex_float128, .complex_char, .complex_schar, .complex_uchar, .complex_short, | ||
| 691 | .complex_ushort, .complex_int, .complex_uint, .complex_long, .complex_ulong, | ||
| 692 | .complex_long_long, .complex_ulong_long, .complex_int128, .complex_uint128, | ||
| 693 | .complex_bit_int => ty.makeReal(), | ||
| 694 | // zig fmt: on | ||
| 695 | else => unreachable, | ||
| 696 | }; | ||
| 697 | } | ||
| 698 | |||
| 699 | pub fn returnType(ty: Type) Type { | ||
| 700 | return switch (ty.specifier) { | ||
| 701 | .func, .var_args_func, .old_style_func => ty.data.func.return_type, | ||
| 702 | .typeof_type, .decayed_typeof_type => ty.data.sub_type.returnType(), | ||
| 703 | .typeof_expr, .decayed_typeof_expr => ty.data.expr.ty.returnType(), | ||
| 704 | .attributed => ty.data.attributed.base.returnType(), | ||
| 705 | .invalid => Type.invalid, | ||
| 706 | else => unreachable, | ||
| 707 | }; | ||
| 708 | } | ||
| 709 | |||
| 710 | pub fn params(ty: Type) []Func.Param { | ||
| 711 | return switch (ty.specifier) { | ||
| 712 | .func, .var_args_func, .old_style_func => ty.data.func.params, | ||
| 713 | .typeof_type, .decayed_typeof_type => ty.data.sub_type.params(), | ||
| 714 | .typeof_expr, .decayed_typeof_expr => ty.data.expr.ty.params(), | ||
| 715 | .attributed => ty.data.attributed.base.params(), | ||
| 716 | .invalid => &.{}, | ||
| 717 | else => unreachable, | ||
| 718 | }; | ||
| 719 | } | ||
| 720 | |||
| 721 | pub fn arrayLen(ty: Type) ?u64 { | ||
| 722 | return switch (ty.specifier) { | ||
| 723 | .array, .static_array, .decayed_array, .decayed_static_array => ty.data.array.len, | ||
| 724 | .typeof_type, .decayed_typeof_type => ty.data.sub_type.arrayLen(), | ||
| 725 | .typeof_expr, .decayed_typeof_expr => ty.data.expr.ty.arrayLen(), | ||
| 726 | .attributed => ty.data.attributed.base.arrayLen(), | ||
| 727 | else => null, | ||
| 728 | }; | ||
| 729 | } | ||
| 730 | |||
| 731 | /// Complex numbers are scalars but they can be initialized with a 2-element initList | ||
| 732 | pub fn expectedInitListSize(ty: Type) ?u64 { | ||
| 733 | return if (ty.isComplex()) 2 else ty.arrayLen(); | ||
| 734 | } | ||
| 735 | |||
| 736 | pub fn anyQual(ty: Type) bool { | ||
| 737 | return switch (ty.specifier) { | ||
| 738 | .typeof_type => ty.qual.any() or ty.data.sub_type.anyQual(), | ||
| 739 | .typeof_expr => ty.qual.any() or ty.data.expr.ty.anyQual(), | ||
| 740 | else => ty.qual.any(), | ||
| 741 | }; | ||
| 742 | } | ||
| 743 | |||
| 744 | pub fn getAttributes(ty: Type) []const Attribute { | ||
| 745 | return switch (ty.specifier) { | ||
| 746 | .attributed => ty.data.attributed.attributes, | ||
| 747 | .typeof_type, .decayed_typeof_type => ty.data.sub_type.getAttributes(), | ||
| 748 | .typeof_expr, .decayed_typeof_expr => ty.data.expr.ty.getAttributes(), | ||
| 749 | else => &.{}, | ||
| 750 | }; | ||
| 751 | } | ||
| 752 | |||
| 753 | pub fn getRecord(ty: Type) ?*const Type.Record { | ||
| 754 | return switch (ty.specifier) { | ||
| 755 | .attributed => ty.data.attributed.base.getRecord(), | ||
| 756 | .typeof_type, .decayed_typeof_type => ty.data.sub_type.getRecord(), | ||
| 757 | .typeof_expr, .decayed_typeof_expr => ty.data.expr.ty.getRecord(), | ||
| 758 | .@"struct", .@"union" => ty.data.record, | ||
| 759 | else => null, | ||
| 760 | }; | ||
| 761 | } | ||
| 762 | |||
| 763 | fn compareIntegerRanks(a: Type, b: Type, comp: *const Compilation) std.math.Order { | ||
| 764 | std.debug.assert(a.isInt() and b.isInt()); | ||
| 765 | if (a.eql(b, comp, false)) return .eq; | ||
| 766 | |||
| 767 | const a_unsigned = a.isUnsignedInt(comp); | ||
| 768 | const b_unsigned = b.isUnsignedInt(comp); | ||
| 769 | |||
| 770 | const a_rank = a.integerRank(comp); | ||
| 771 | const b_rank = b.integerRank(comp); | ||
| 772 | if (a_unsigned == b_unsigned) { | ||
| 773 | return std.math.order(a_rank, b_rank); | ||
| 774 | } | ||
| 775 | if (a_unsigned) { | ||
| 776 | if (a_rank >= b_rank) return .gt; | ||
| 777 | return .lt; | ||
| 778 | } | ||
| 779 | std.debug.assert(b_unsigned); | ||
| 780 | if (b_rank >= a_rank) return .lt; | ||
| 781 | return .gt; | ||
| 782 | } | ||
| 783 | |||
| 784 | fn realIntegerConversion(a: Type, b: Type, comp: *const Compilation) Type { | ||
| 785 | std.debug.assert(a.isReal() and b.isReal()); | ||
| 786 | const type_order = a.compareIntegerRanks(b, comp); | ||
| 787 | const a_signed = !a.isUnsignedInt(comp); | ||
| 788 | const b_signed = !b.isUnsignedInt(comp); | ||
| 789 | if (a_signed == b_signed) { | ||
| 790 | // If both have the same sign, use higher-rank type. | ||
| 791 | return switch (type_order) { | ||
| 792 | .lt => b, | ||
| 793 | .eq, .gt => a, | ||
| 794 | }; | ||
| 795 | } else if (type_order != if (a_signed) std.math.Order.gt else std.math.Order.lt) { | ||
| 796 | // Only one is signed; and the unsigned type has rank >= the signed type | ||
| 797 | // Use the unsigned type | ||
| 798 | return if (b_signed) a else b; | ||
| 799 | } else if (a.bitSizeof(comp).? != b.bitSizeof(comp).?) { | ||
| 800 | // Signed type is higher rank and sizes are not equal | ||
| 801 | // Use the signed type | ||
| 802 | return if (a_signed) a else b; | ||
| 803 | } else { | ||
| 804 | // Signed type is higher rank but same size as unsigned type | ||
| 805 | // e.g. `long` and `unsigned` on x86-linux-gnu | ||
| 806 | // Use unsigned version of the signed type | ||
| 807 | return if (a_signed) a.makeIntegerUnsigned() else b.makeIntegerUnsigned(); | ||
| 808 | } | ||
| 809 | } | ||
| 810 | |||
| 811 | pub fn makeIntegerUnsigned(ty: Type) Type { | ||
| 812 | // TODO discards attributed/typeof | ||
| 813 | var base = ty.canonicalize(.standard); | ||
| 814 | switch (base.specifier) { | ||
| 815 | // zig fmt: off | ||
| 816 | .uchar, .ushort, .uint, .ulong, .ulong_long, .uint128, | ||
| 817 | .complex_uchar, .complex_ushort, .complex_uint, .complex_ulong, .complex_ulong_long, .complex_uint128, | ||
| 818 | => return ty, | ||
| 819 | // zig fmt: on | ||
| 820 | |||
| 821 | .char, .complex_char => { | ||
| 822 | base.specifier = @enumFromInt(@intFromEnum(base.specifier) + 2); | ||
| 823 | return base; | ||
| 824 | }, | ||
| 825 | |||
| 826 | // zig fmt: off | ||
| 827 | .schar, .short, .int, .long, .long_long, .int128, | ||
| 828 | .complex_schar, .complex_short, .complex_int, .complex_long, .complex_long_long, .complex_int128 => { | ||
| 829 | base.specifier = @enumFromInt(@intFromEnum(base.specifier) + 1); | ||
| 830 | return base; | ||
| 831 | }, | ||
| 832 | // zig fmt: on | ||
| 833 | |||
| 834 | .bit_int, .complex_bit_int => { | ||
| 835 | base.data.int.signedness = .unsigned; | ||
| 836 | return base; | ||
| 837 | }, | ||
| 838 | else => unreachable, | ||
| 839 | } | ||
| 840 | } | ||
| 841 | |||
| 842 | /// Find the common type of a and b for binary operations | ||
| 843 | pub fn integerConversion(a: Type, b: Type, comp: *const Compilation) Type { | ||
| 844 | const a_real = a.isReal(); | ||
| 845 | const b_real = b.isReal(); | ||
| 846 | const target_ty = a.makeReal().realIntegerConversion(b.makeReal(), comp); | ||
| 847 | return if (a_real and b_real) target_ty else target_ty.makeComplex(); | ||
| 848 | } | ||
| 849 | |||
| 850 | pub fn integerPromotion(ty: Type, comp: *Compilation) Type { | ||
| 851 | var specifier = ty.specifier; | ||
| 852 | switch (specifier) { | ||
| 853 | .@"enum" => { | ||
| 854 | if (ty.hasIncompleteSize()) return .{ .specifier = .int }; | ||
| 855 | specifier = ty.data.@"enum".tag_ty.specifier; | ||
| 856 | }, | ||
| 857 | .bit_int, .complex_bit_int => return .{ .specifier = specifier, .data = ty.data }, | ||
| 858 | else => {}, | ||
| 859 | } | ||
| 860 | return switch (specifier) { | ||
| 861 | else => .{ | ||
| 862 | .specifier = switch (specifier) { | ||
| 863 | // zig fmt: off | ||
| 864 | .bool, .char, .schar, .uchar, .short => .int, | ||
| 865 | .ushort => if (ty.sizeof(comp).? == sizeof(.{ .specifier = .int }, comp)) Specifier.uint else .int, | ||
| 866 | .int, .uint, .long, .ulong, .long_long, .ulong_long, .int128, .uint128, .complex_char, | ||
| 867 | .complex_schar, .complex_uchar, .complex_short, .complex_ushort, .complex_int, | ||
| 868 | .complex_uint, .complex_long, .complex_ulong, .complex_long_long, .complex_ulong_long, | ||
| 869 | .complex_int128, .complex_uint128 => specifier, | ||
| 870 | // zig fmt: on | ||
| 871 | .typeof_type => return ty.data.sub_type.integerPromotion(comp), | ||
| 872 | .typeof_expr => return ty.data.expr.ty.integerPromotion(comp), | ||
| 873 | .attributed => return ty.data.attributed.base.integerPromotion(comp), | ||
| 874 | .invalid => .invalid, | ||
| 875 | else => unreachable, // _BitInt, or not an integer type | ||
| 876 | }, | ||
| 877 | }, | ||
| 878 | }; | ||
| 879 | } | ||
| 880 | |||
| 881 | /// Promote a bitfield. If `int` can hold all the values of the underlying field, | ||
| 882 | /// promote to int. Otherwise, promote to unsigned int | ||
| 883 | /// Returns null if no promotion is necessary | ||
| 884 | pub fn bitfieldPromotion(ty: Type, comp: *Compilation, width: u32) ?Type { | ||
| 885 | const type_size_bits = ty.bitSizeof(comp).?; | ||
| 886 | |||
| 887 | // Note: GCC and clang will promote `long: 3` to int even though the C standard does not allow this | ||
| 888 | if (width < type_size_bits) { | ||
| 889 | return int; | ||
| 890 | } | ||
| 891 | |||
| 892 | if (width == type_size_bits) { | ||
| 893 | return if (ty.isUnsignedInt(comp)) .{ .specifier = .uint } else int; | ||
| 894 | } | ||
| 895 | |||
| 896 | return null; | ||
| 897 | } | ||
| 898 | |||
| 899 | pub fn hasIncompleteSize(ty: Type) bool { | ||
| 900 | return switch (ty.specifier) { | ||
| 901 | .void, .incomplete_array, .invalid => true, | ||
| 902 | .@"enum" => ty.data.@"enum".isIncomplete() and !ty.data.@"enum".fixed, | ||
| 903 | .@"struct", .@"union" => ty.data.record.isIncomplete(), | ||
| 904 | .array, .static_array => ty.data.array.elem.hasIncompleteSize(), | ||
| 905 | .typeof_type => ty.data.sub_type.hasIncompleteSize(), | ||
| 906 | .typeof_expr => ty.data.expr.ty.hasIncompleteSize(), | ||
| 907 | .attributed => ty.data.attributed.base.hasIncompleteSize(), | ||
| 908 | else => false, | ||
| 909 | }; | ||
| 910 | } | ||
| 911 | |||
| 912 | pub fn hasUnboundVLA(ty: Type) bool { | ||
| 913 | var cur = ty; | ||
| 914 | while (true) { | ||
| 915 | switch (cur.specifier) { | ||
| 916 | .unspecified_variable_len_array, | ||
| 917 | .decayed_unspecified_variable_len_array, | ||
| 918 | => return true, | ||
| 919 | .array, | ||
| 920 | .static_array, | ||
| 921 | .incomplete_array, | ||
| 922 | .variable_len_array, | ||
| 923 | .decayed_array, | ||
| 924 | .decayed_static_array, | ||
| 925 | .decayed_incomplete_array, | ||
| 926 | .decayed_variable_len_array, | ||
| 927 | => cur = cur.elemType(), | ||
| 928 | .typeof_type, .decayed_typeof_type => cur = cur.data.sub_type.*, | ||
| 929 | .typeof_expr, .decayed_typeof_expr => cur = cur.data.expr.ty, | ||
| 930 | .attributed => cur = cur.data.attributed.base, | ||
| 931 | else => return false, | ||
| 932 | } | ||
| 933 | } | ||
| 934 | } | ||
| 935 | |||
| 936 | pub fn hasField(ty: Type, name: StringId) bool { | ||
| 937 | switch (ty.specifier) { | ||
| 938 | .@"struct" => { | ||
| 939 | std.debug.assert(!ty.data.record.isIncomplete()); | ||
| 940 | for (ty.data.record.fields) |f| { | ||
| 941 | if (f.isAnonymousRecord() and f.ty.hasField(name)) return true; | ||
| 942 | if (name == f.name) return true; | ||
| 943 | } | ||
| 944 | }, | ||
| 945 | .@"union" => { | ||
| 946 | std.debug.assert(!ty.data.record.isIncomplete()); | ||
| 947 | for (ty.data.record.fields) |f| { | ||
| 948 | if (f.isAnonymousRecord() and f.ty.hasField(name)) return true; | ||
| 949 | if (name == f.name) return true; | ||
| 950 | } | ||
| 951 | }, | ||
| 952 | .typeof_type => return ty.data.sub_type.hasField(name), | ||
| 953 | .typeof_expr => return ty.data.expr.ty.hasField(name), | ||
| 954 | .attributed => return ty.data.attributed.base.hasField(name), | ||
| 955 | .invalid => return false, | ||
| 956 | else => unreachable, | ||
| 957 | } | ||
| 958 | return false; | ||
| 959 | } | ||
| 960 | |||
| 961 | pub fn minInt(ty: Type, comp: *const Compilation) i64 { | ||
| 962 | std.debug.assert(ty.isInt()); | ||
| 963 | if (ty.isUnsignedInt(comp)) return 0; | ||
| 964 | return switch (ty.sizeof(comp).?) { | ||
| 965 | 1 => std.math.minInt(i8), | ||
| 966 | 2 => std.math.minInt(i16), | ||
| 967 | 4 => std.math.minInt(i32), | ||
| 968 | 8 => std.math.minInt(i64), | ||
| 969 | else => unreachable, | ||
| 970 | }; | ||
| 971 | } | ||
| 972 | |||
| 973 | pub fn maxInt(ty: Type, comp: *const Compilation) u64 { | ||
| 974 | std.debug.assert(ty.isInt()); | ||
| 975 | return switch (ty.sizeof(comp).?) { | ||
| 976 | 1 => if (ty.isUnsignedInt(comp)) @as(u64, std.math.maxInt(u8)) else std.math.maxInt(i8), | ||
| 977 | 2 => if (ty.isUnsignedInt(comp)) @as(u64, std.math.maxInt(u16)) else std.math.maxInt(i16), | ||
| 978 | 4 => if (ty.isUnsignedInt(comp)) @as(u64, std.math.maxInt(u32)) else std.math.maxInt(i32), | ||
| 979 | 8 => if (ty.isUnsignedInt(comp)) @as(u64, std.math.maxInt(u64)) else std.math.maxInt(i64), | ||
| 980 | else => unreachable, | ||
| 981 | }; | ||
| 982 | } | ||
| 983 | |||
| 984 | const TypeSizeOrder = enum { | ||
| 985 | lt, | ||
| 986 | gt, | ||
| 987 | eq, | ||
| 988 | indeterminate, | ||
| 989 | }; | ||
| 990 | |||
| 991 | pub fn sizeCompare(a: Type, b: Type, comp: *Compilation) TypeSizeOrder { | ||
| 992 | const a_size = a.sizeof(comp) orelse return .indeterminate; | ||
| 993 | const b_size = b.sizeof(comp) orelse return .indeterminate; | ||
| 994 | return switch (std.math.order(a_size, b_size)) { | ||
| 995 | .lt => .lt, | ||
| 996 | .gt => .gt, | ||
| 997 | .eq => .eq, | ||
| 998 | }; | ||
| 999 | } | ||
| 1000 | |||
| 1001 | /// Size of type as reported by sizeof | ||
| 1002 | pub fn sizeof(ty: Type, comp: *const Compilation) ?u64 { | ||
| 1003 | return switch (ty.specifier) { | ||
| 1004 | .auto_type => unreachable, | ||
| 1005 | .variable_len_array, .unspecified_variable_len_array => return null, | ||
| 1006 | .incomplete_array => return if (comp.langopts.emulate == .msvc) @as(?u64, 0) else null, | ||
| 1007 | .func, .var_args_func, .old_style_func, .void, .bool => 1, | ||
| 1008 | .char, .schar, .uchar => 1, | ||
| 1009 | .short => comp.target.c_type_byte_size(.short), | ||
| 1010 | .ushort => comp.target.c_type_byte_size(.ushort), | ||
| 1011 | .int => comp.target.c_type_byte_size(.int), | ||
| 1012 | .uint => comp.target.c_type_byte_size(.uint), | ||
| 1013 | .long => comp.target.c_type_byte_size(.long), | ||
| 1014 | .ulong => comp.target.c_type_byte_size(.ulong), | ||
| 1015 | .long_long => comp.target.c_type_byte_size(.longlong), | ||
| 1016 | .ulong_long => comp.target.c_type_byte_size(.ulonglong), | ||
| 1017 | .long_double => comp.target.c_type_byte_size(.longdouble), | ||
| 1018 | .int128, .uint128 => 16, | ||
| 1019 | .fp16, .float16 => 2, | ||
| 1020 | .float => comp.target.c_type_byte_size(.float), | ||
| 1021 | .double => comp.target.c_type_byte_size(.double), | ||
| 1022 | .float80 => 16, | ||
| 1023 | .float128 => 16, | ||
| 1024 | .bit_int => { | ||
| 1025 | return std.mem.alignForward(u64, (ty.data.int.bits + 7) / 8, ty.alignof(comp)); | ||
| 1026 | }, | ||
| 1027 | // zig fmt: off | ||
| 1028 | .complex_char, .complex_schar, .complex_uchar, .complex_short, .complex_ushort, .complex_int, | ||
| 1029 | .complex_uint, .complex_long, .complex_ulong, .complex_long_long, .complex_ulong_long, | ||
| 1030 | .complex_int128, .complex_uint128, .complex_float, .complex_double, | ||
| 1031 | .complex_long_double, .complex_float80, .complex_float128, .complex_bit_int, | ||
| 1032 | => return 2 * ty.makeReal().sizeof(comp).?, | ||
| 1033 | // zig fmt: on | ||
| 1034 | .pointer, | ||
| 1035 | .decayed_array, | ||
| 1036 | .decayed_static_array, | ||
| 1037 | .decayed_incomplete_array, | ||
| 1038 | .decayed_variable_len_array, | ||
| 1039 | .decayed_unspecified_variable_len_array, | ||
| 1040 | .decayed_typeof_type, | ||
| 1041 | .decayed_typeof_expr, | ||
| 1042 | .static_array, | ||
| 1043 | .nullptr_t, | ||
| 1044 | => comp.target.ptrBitWidth() / 8, | ||
| 1045 | .array, .vector => { | ||
| 1046 | const size = ty.data.array.elem.sizeof(comp) orelse return null; | ||
| 1047 | const arr_size = size * ty.data.array.len; | ||
| 1048 | if (comp.langopts.emulate == .msvc) { | ||
| 1049 | // msvc ignores array type alignment. | ||
| 1050 | // Since the size might not be a multiple of the field | ||
| 1051 | // alignment, the address of the second element might not be properly aligned | ||
| 1052 | // for the field alignment. A flexible array has size 0. See test case 0018. | ||
| 1053 | return arr_size; | ||
| 1054 | } else { | ||
| 1055 | return std.mem.alignForward(u64, arr_size, ty.alignof(comp)); | ||
| 1056 | } | ||
| 1057 | }, | ||
| 1058 | .@"struct", .@"union" => if (ty.data.record.isIncomplete()) null else @as(u64, ty.data.record.type_layout.size_bits / 8), | ||
| 1059 | .@"enum" => if (ty.data.@"enum".isIncomplete() and !ty.data.@"enum".fixed) null else ty.data.@"enum".tag_ty.sizeof(comp), | ||
| 1060 | .typeof_type => ty.data.sub_type.sizeof(comp), | ||
| 1061 | .typeof_expr => ty.data.expr.ty.sizeof(comp), | ||
| 1062 | .attributed => ty.data.attributed.base.sizeof(comp), | ||
| 1063 | .invalid => return null, | ||
| 1064 | }; | ||
| 1065 | } | ||
| 1066 | |||
| 1067 | pub fn bitSizeof(ty: Type, comp: *const Compilation) ?u64 { | ||
| 1068 | return switch (ty.specifier) { | ||
| 1069 | .bool => if (comp.langopts.emulate == .msvc) @as(u64, 8) else 1, | ||
| 1070 | .typeof_type, .decayed_typeof_type => ty.data.sub_type.bitSizeof(comp), | ||
| 1071 | .typeof_expr, .decayed_typeof_expr => ty.data.expr.ty.bitSizeof(comp), | ||
| 1072 | .attributed => ty.data.attributed.base.bitSizeof(comp), | ||
| 1073 | .bit_int => return ty.data.int.bits, | ||
| 1074 | .long_double => comp.target.c_type_bit_size(.longdouble), | ||
| 1075 | .float80 => return 80, | ||
| 1076 | else => 8 * (ty.sizeof(comp) orelse return null), | ||
| 1077 | }; | ||
| 1078 | } | ||
| 1079 | |||
| 1080 | pub fn alignable(ty: Type) bool { | ||
| 1081 | return ty.isArray() or !ty.hasIncompleteSize() or ty.is(.void); | ||
| 1082 | } | ||
| 1083 | |||
| 1084 | /// Get the alignment of a type | ||
| 1085 | pub fn alignof(ty: Type, comp: *const Compilation) u29 { | ||
| 1086 | // don't return the attribute for records | ||
| 1087 | // layout has already accounted for requested alignment | ||
| 1088 | if (ty.requestedAlignment(comp)) |requested| { | ||
| 1089 | // gcc does not respect alignment on enums | ||
| 1090 | if (ty.get(.@"enum")) |ty_enum| { | ||
| 1091 | if (comp.langopts.emulate == .gcc) { | ||
| 1092 | return ty_enum.alignof(comp); | ||
| 1093 | } | ||
| 1094 | } else if (ty.getRecord()) |rec| { | ||
| 1095 | if (ty.hasIncompleteSize()) return 0; | ||
| 1096 | const computed: u29 = @intCast(@divExact(rec.type_layout.field_alignment_bits, 8)); | ||
| 1097 | return @max(requested, computed); | ||
| 1098 | } else if (comp.langopts.emulate == .msvc) { | ||
| 1099 | const type_align = ty.data.attributed.base.alignof(comp); | ||
| 1100 | return @max(requested, type_align); | ||
| 1101 | } | ||
| 1102 | return requested; | ||
| 1103 | } | ||
| 1104 | |||
| 1105 | return switch (ty.specifier) { | ||
| 1106 | .invalid => unreachable, | ||
| 1107 | .auto_type => unreachable, | ||
| 1108 | |||
| 1109 | .variable_len_array, | ||
| 1110 | .incomplete_array, | ||
| 1111 | .unspecified_variable_len_array, | ||
| 1112 | .array, | ||
| 1113 | .vector, | ||
| 1114 | => ty.elemType().alignof(comp), | ||
| 1115 | .func, .var_args_func, .old_style_func => target_util.defaultFunctionAlignment(comp.target), | ||
| 1116 | .char, .schar, .uchar, .void, .bool => 1, | ||
| 1117 | |||
| 1118 | // zig fmt: off | ||
| 1119 | .complex_char, .complex_schar, .complex_uchar, .complex_short, .complex_ushort, .complex_int, | ||
| 1120 | .complex_uint, .complex_long, .complex_ulong, .complex_long_long, .complex_ulong_long, | ||
| 1121 | .complex_int128, .complex_uint128, .complex_float, .complex_double, | ||
| 1122 | .complex_long_double, .complex_float80, .complex_float128, .complex_bit_int, | ||
| 1123 | => return ty.makeReal().alignof(comp), | ||
| 1124 | // zig fmt: on | ||
| 1125 | |||
| 1126 | .short => comp.target.c_type_alignment(.short), | ||
| 1127 | .ushort => comp.target.c_type_alignment(.ushort), | ||
| 1128 | .int => comp.target.c_type_alignment(.int), | ||
| 1129 | .uint => comp.target.c_type_alignment(.uint), | ||
| 1130 | |||
| 1131 | .long => comp.target.c_type_alignment(.long), | ||
| 1132 | .ulong => comp.target.c_type_alignment(.ulong), | ||
| 1133 | .long_long => comp.target.c_type_alignment(.longlong), | ||
| 1134 | .ulong_long => comp.target.c_type_alignment(.ulonglong), | ||
| 1135 | |||
| 1136 | .bit_int => @min( | ||
| 1137 | std.math.ceilPowerOfTwoPromote(u16, (ty.data.int.bits + 7) / 8), | ||
| 1138 | comp.target.maxIntAlignment(), | ||
| 1139 | ), | ||
| 1140 | |||
| 1141 | .float => comp.target.c_type_alignment(.float), | ||
| 1142 | .double => comp.target.c_type_alignment(.double), | ||
| 1143 | .long_double => comp.target.c_type_alignment(.longdouble), | ||
| 1144 | |||
| 1145 | .int128, .uint128 => if (comp.target.cpu.arch == .s390x and comp.target.os.tag == .linux and comp.target.isGnu()) 8 else 16, | ||
| 1146 | .fp16, .float16 => 2, | ||
| 1147 | |||
| 1148 | .float80, .float128 => 16, | ||
| 1149 | .pointer, | ||
| 1150 | .decayed_array, | ||
| 1151 | .decayed_static_array, | ||
| 1152 | .decayed_incomplete_array, | ||
| 1153 | .decayed_variable_len_array, | ||
| 1154 | .decayed_unspecified_variable_len_array, | ||
| 1155 | .static_array, | ||
| 1156 | .nullptr_t, | ||
| 1157 | => switch (comp.target.cpu.arch) { | ||
| 1158 | .avr => 1, | ||
| 1159 | else => comp.target.ptrBitWidth() / 8, | ||
| 1160 | }, | ||
| 1161 | .@"struct", .@"union" => if (ty.data.record.isIncomplete()) 0 else @intCast(ty.data.record.type_layout.field_alignment_bits / 8), | ||
| 1162 | .@"enum" => if (ty.data.@"enum".isIncomplete() and !ty.data.@"enum".fixed) 0 else ty.data.@"enum".tag_ty.alignof(comp), | ||
| 1163 | .typeof_type, .decayed_typeof_type => ty.data.sub_type.alignof(comp), | ||
| 1164 | .typeof_expr, .decayed_typeof_expr => ty.data.expr.ty.alignof(comp), | ||
| 1165 | .attributed => ty.data.attributed.base.alignof(comp), | ||
| 1166 | }; | ||
| 1167 | } | ||
| 1168 | |||
| 1169 | /// Canonicalize a possibly-typeof() type. If the type is not a typeof() type, simply | ||
| 1170 | /// return it. Otherwise, determine the actual qualified type. | ||
| 1171 | /// The `qual_handling` parameter can be used to return the full set of qualifiers | ||
| 1172 | /// added by typeof() operations, which is useful when determining the elemType of | ||
| 1173 | /// arrays and pointers. | ||
| 1174 | pub fn canonicalize(ty: Type, qual_handling: enum { standard, preserve_quals }) Type { | ||
| 1175 | var cur = ty; | ||
| 1176 | if (cur.specifier == .attributed) cur = cur.data.attributed.base; | ||
| 1177 | if (!cur.isTypeof()) return cur; | ||
| 1178 | |||
| 1179 | var qual = cur.qual; | ||
| 1180 | while (true) { | ||
| 1181 | switch (cur.specifier) { | ||
| 1182 | .typeof_type => cur = cur.data.sub_type.*, | ||
| 1183 | .typeof_expr => cur = cur.data.expr.ty, | ||
| 1184 | .decayed_typeof_type => { | ||
| 1185 | cur = cur.data.sub_type.*; | ||
| 1186 | cur.decayArray(); | ||
| 1187 | }, | ||
| 1188 | .decayed_typeof_expr => { | ||
| 1189 | cur = cur.data.expr.ty; | ||
| 1190 | cur.decayArray(); | ||
| 1191 | }, | ||
| 1192 | else => break, | ||
| 1193 | } | ||
| 1194 | qual = qual.mergeAll(cur.qual); | ||
| 1195 | } | ||
| 1196 | if ((cur.isArray() or cur.isPtr()) and qual_handling == .standard) { | ||
| 1197 | cur.qual = .{}; | ||
| 1198 | } else { | ||
| 1199 | cur.qual = qual; | ||
| 1200 | } | ||
| 1201 | return cur; | ||
| 1202 | } | ||
| 1203 | |||
| 1204 | pub fn get(ty: *const Type, specifier: Specifier) ?*const Type { | ||
| 1205 | std.debug.assert(specifier != .typeof_type and specifier != .typeof_expr); | ||
| 1206 | return switch (ty.specifier) { | ||
| 1207 | .typeof_type => ty.data.sub_type.get(specifier), | ||
| 1208 | .typeof_expr => ty.data.expr.ty.get(specifier), | ||
| 1209 | .attributed => ty.data.attributed.base.get(specifier), | ||
| 1210 | else => if (ty.specifier == specifier) ty else null, | ||
| 1211 | }; | ||
| 1212 | } | ||
| 1213 | |||
| 1214 | pub fn requestedAlignment(ty: Type, comp: *const Compilation) ?u29 { | ||
| 1215 | return switch (ty.specifier) { | ||
| 1216 | .typeof_type, .decayed_typeof_type => ty.data.sub_type.requestedAlignment(comp), | ||
| 1217 | .typeof_expr, .decayed_typeof_expr => ty.data.expr.ty.requestedAlignment(comp), | ||
| 1218 | .attributed => annotationAlignment(comp, ty.data.attributed.attributes), | ||
| 1219 | else => null, | ||
| 1220 | }; | ||
| 1221 | } | ||
| 1222 | |||
| 1223 | pub fn enumIsPacked(ty: Type, comp: *const Compilation) bool { | ||
| 1224 | std.debug.assert(ty.is(.@"enum")); | ||
| 1225 | return comp.langopts.short_enums or target_util.packAllEnums(comp.target) or ty.hasAttribute(.@"packed"); | ||
| 1226 | } | ||
| 1227 | |||
| 1228 | pub fn annotationAlignment(comp: *const Compilation, attrs: ?[]const Attribute) ?u29 { | ||
| 1229 | const a = attrs orelse return null; | ||
| 1230 | |||
| 1231 | var max_requested: ?u29 = null; | ||
| 1232 | for (a) |attribute| { | ||
| 1233 | if (attribute.tag != .aligned) continue; | ||
| 1234 | const requested = if (attribute.args.aligned.alignment) |alignment| alignment.requested else target_util.defaultAlignment(comp.target); | ||
| 1235 | if (max_requested == null or max_requested.? < requested) { | ||
| 1236 | max_requested = requested; | ||
| 1237 | } | ||
| 1238 | } | ||
| 1239 | return max_requested; | ||
| 1240 | } | ||
| 1241 | |||
| 1242 | pub fn eql(a_param: Type, b_param: Type, comp: *const Compilation, check_qualifiers: bool) bool { | ||
| 1243 | const a = a_param.canonicalize(.standard); | ||
| 1244 | const b = b_param.canonicalize(.standard); | ||
| 1245 | |||
| 1246 | if (a.specifier == .invalid or b.specifier == .invalid) return false; | ||
| 1247 | if (a.alignof(comp) != b.alignof(comp)) return false; | ||
| 1248 | if (a.isPtr()) { | ||
| 1249 | if (!b.isPtr()) return false; | ||
| 1250 | } else if (a.isFunc()) { | ||
| 1251 | if (!b.isFunc()) return false; | ||
| 1252 | } else if (a.isArray()) { | ||
| 1253 | if (!b.isArray()) return false; | ||
| 1254 | } else if (a.specifier != b.specifier) return false; | ||
| 1255 | |||
| 1256 | if (a.qual.atomic != b.qual.atomic) return false; | ||
| 1257 | if (check_qualifiers) { | ||
| 1258 | if (a.qual.@"const" != b.qual.@"const") return false; | ||
| 1259 | if (a.qual.@"volatile" != b.qual.@"volatile") return false; | ||
| 1260 | } | ||
| 1261 | |||
| 1262 | switch (a.specifier) { | ||
| 1263 | .pointer, | ||
| 1264 | .decayed_array, | ||
| 1265 | .decayed_static_array, | ||
| 1266 | .decayed_incomplete_array, | ||
| 1267 | .decayed_variable_len_array, | ||
| 1268 | .decayed_unspecified_variable_len_array, | ||
| 1269 | => if (!a_param.elemType().eql(b_param.elemType(), comp, check_qualifiers)) return false, | ||
| 1270 | |||
| 1271 | .func, | ||
| 1272 | .var_args_func, | ||
| 1273 | .old_style_func, | ||
| 1274 | => if (!a.data.func.eql(b.data.func, a.specifier == .var_args_func, b.specifier == .var_args_func, comp)) return false, | ||
| 1275 | |||
| 1276 | .array, | ||
| 1277 | .static_array, | ||
| 1278 | .incomplete_array, | ||
| 1279 | .vector, | ||
| 1280 | => { | ||
| 1281 | const a_len = a.arrayLen(); | ||
| 1282 | const b_len = b.arrayLen(); | ||
| 1283 | if (a_len == null or b_len == null) { | ||
| 1284 | // At least one array is incomplete; only check child type for equality | ||
| 1285 | } else if (a_len.? != b_len.?) { | ||
| 1286 | return false; | ||
| 1287 | } | ||
| 1288 | if (!a.elemType().eql(b.elemType(), comp, false)) return false; | ||
| 1289 | }, | ||
| 1290 | .variable_len_array => if (!a.elemType().eql(b.elemType(), comp, check_qualifiers)) return false, | ||
| 1291 | |||
| 1292 | .@"struct", .@"union" => if (a.data.record != b.data.record) return false, | ||
| 1293 | .@"enum" => if (a.data.@"enum" != b.data.@"enum") return false, | ||
| 1294 | .bit_int, .complex_bit_int => return a.data.int.bits == b.data.int.bits and a.data.int.signedness == b.data.int.signedness, | ||
| 1295 | |||
| 1296 | else => {}, | ||
| 1297 | } | ||
| 1298 | return true; | ||
| 1299 | } | ||
| 1300 | |||
| 1301 | /// Decays an array to a pointer | ||
| 1302 | pub fn decayArray(ty: *Type) void { | ||
| 1303 | // the decayed array type is the current specifier +1 | ||
| 1304 | ty.specifier = @enumFromInt(@intFromEnum(ty.specifier) + 1); | ||
| 1305 | } | ||
| 1306 | |||
| 1307 | pub fn originalTypeOfDecayedArray(ty: Type) Type { | ||
| 1308 | std.debug.assert(ty.isDecayed()); | ||
| 1309 | var copy = ty; | ||
| 1310 | copy.specifier = @enumFromInt(@intFromEnum(ty.specifier) - 1); | ||
| 1311 | return copy; | ||
| 1312 | } | ||
| 1313 | |||
| 1314 | /// Rank for floating point conversions, ignoring domain (complex vs real) | ||
| 1315 | /// Asserts that ty is a floating point type | ||
| 1316 | pub fn floatRank(ty: Type) usize { | ||
| 1317 | const real = ty.makeReal(); | ||
| 1318 | return switch (real.specifier) { | ||
| 1319 | // TODO: bfloat16 => 0 | ||
| 1320 | .float16 => 1, | ||
| 1321 | .fp16 => 2, | ||
| 1322 | .float => 3, | ||
| 1323 | .double => 4, | ||
| 1324 | .long_double => 5, | ||
| 1325 | .float128 => 6, | ||
| 1326 | // TODO: ibm128 => 7 | ||
| 1327 | else => unreachable, | ||
| 1328 | }; | ||
| 1329 | } | ||
| 1330 | |||
| 1331 | /// Rank for integer conversions, ignoring domain (complex vs real) | ||
| 1332 | /// Asserts that ty is an integer type | ||
| 1333 | pub fn integerRank(ty: Type, comp: *const Compilation) usize { | ||
| 1334 | const real = ty.makeReal(); | ||
| 1335 | return @intCast(switch (real.specifier) { | ||
| 1336 | .bit_int => @as(u64, real.data.int.bits) << 3, | ||
| 1337 | |||
| 1338 | .bool => 1 + (ty.bitSizeof(comp).? << 3), | ||
| 1339 | .char, .schar, .uchar => 2 + (ty.bitSizeof(comp).? << 3), | ||
| 1340 | .short, .ushort => 3 + (ty.bitSizeof(comp).? << 3), | ||
| 1341 | .int, .uint => 4 + (ty.bitSizeof(comp).? << 3), | ||
| 1342 | .long, .ulong => 5 + (ty.bitSizeof(comp).? << 3), | ||
| 1343 | .long_long, .ulong_long => 6 + (ty.bitSizeof(comp).? << 3), | ||
| 1344 | .int128, .uint128 => 7 + (ty.bitSizeof(comp).? << 3), | ||
| 1345 | |||
| 1346 | else => unreachable, | ||
| 1347 | }); | ||
| 1348 | } | ||
| 1349 | |||
| 1350 | /// Returns true if `a` and `b` are integer types that differ only in sign | ||
| 1351 | pub fn sameRankDifferentSign(a: Type, b: Type, comp: *const Compilation) bool { | ||
| 1352 | if (!a.isInt() or !b.isInt()) return false; | ||
| 1353 | if (a.integerRank(comp) != b.integerRank(comp)) return false; | ||
| 1354 | return a.isUnsignedInt(comp) != b.isUnsignedInt(comp); | ||
| 1355 | } | ||
| 1356 | |||
| 1357 | pub fn makeReal(ty: Type) Type { | ||
| 1358 | // TODO discards attributed/typeof | ||
| 1359 | var base = ty.canonicalize(.standard); | ||
| 1360 | switch (base.specifier) { | ||
| 1361 | .complex_float, .complex_double, .complex_long_double, .complex_float80, .complex_float128 => { | ||
| 1362 | base.specifier = @enumFromInt(@intFromEnum(base.specifier) - 5); | ||
| 1363 | return base; | ||
| 1364 | }, | ||
| 1365 | .complex_char, .complex_schar, .complex_uchar, .complex_short, .complex_ushort, .complex_int, .complex_uint, .complex_long, .complex_ulong, .complex_long_long, .complex_ulong_long, .complex_int128, .complex_uint128 => { | ||
| 1366 | base.specifier = @enumFromInt(@intFromEnum(base.specifier) - 13); | ||
| 1367 | return base; | ||
| 1368 | }, | ||
| 1369 | .complex_bit_int => { | ||
| 1370 | base.specifier = .bit_int; | ||
| 1371 | return base; | ||
| 1372 | }, | ||
| 1373 | else => return ty, | ||
| 1374 | } | ||
| 1375 | } | ||
| 1376 | |||
| 1377 | pub fn makeComplex(ty: Type) Type { | ||
| 1378 | // TODO discards attributed/typeof | ||
| 1379 | var base = ty.canonicalize(.standard); | ||
| 1380 | switch (base.specifier) { | ||
| 1381 | .float, .double, .long_double, .float80, .float128 => { | ||
| 1382 | base.specifier = @enumFromInt(@intFromEnum(base.specifier) + 5); | ||
| 1383 | return base; | ||
| 1384 | }, | ||
| 1385 | .char, .schar, .uchar, .short, .ushort, .int, .uint, .long, .ulong, .long_long, .ulong_long, .int128, .uint128 => { | ||
| 1386 | base.specifier = @enumFromInt(@intFromEnum(base.specifier) + 13); | ||
| 1387 | return base; | ||
| 1388 | }, | ||
| 1389 | .bit_int => { | ||
| 1390 | base.specifier = .complex_bit_int; | ||
| 1391 | return base; | ||
| 1392 | }, | ||
| 1393 | else => return ty, | ||
| 1394 | } | ||
| 1395 | } | ||
| 1396 | |||
| 1397 | /// Combines types recursively in the order they were parsed, uses `.void` specifier as a sentinel value. | ||
| 1398 | pub fn combine(inner: *Type, outer: Type) Parser.Error!void { | ||
| 1399 | switch (inner.specifier) { | ||
| 1400 | .pointer => return inner.data.sub_type.combine(outer), | ||
| 1401 | .unspecified_variable_len_array => { | ||
| 1402 | try inner.data.sub_type.combine(outer); | ||
| 1403 | }, | ||
| 1404 | .variable_len_array => { | ||
| 1405 | try inner.data.expr.ty.combine(outer); | ||
| 1406 | }, | ||
| 1407 | .array, .static_array, .incomplete_array => { | ||
| 1408 | try inner.data.array.elem.combine(outer); | ||
| 1409 | }, | ||
| 1410 | .func, .var_args_func, .old_style_func => { | ||
| 1411 | try inner.data.func.return_type.combine(outer); | ||
| 1412 | }, | ||
| 1413 | .decayed_array, | ||
| 1414 | .decayed_static_array, | ||
| 1415 | .decayed_incomplete_array, | ||
| 1416 | .decayed_variable_len_array, | ||
| 1417 | .decayed_unspecified_variable_len_array, | ||
| 1418 | .decayed_typeof_type, | ||
| 1419 | .decayed_typeof_expr, | ||
| 1420 | => unreachable, // type should not be able to decay before being combined | ||
| 1421 | .void => inner.* = outer, | ||
| 1422 | else => unreachable, | ||
| 1423 | } | ||
| 1424 | } | ||
| 1425 | |||
| 1426 | pub fn validateCombinedType(ty: Type, p: *Parser, source_tok: TokenIndex) Parser.Error!void { | ||
| 1427 | switch (ty.specifier) { | ||
| 1428 | .pointer => return ty.data.sub_type.validateCombinedType(p, source_tok), | ||
| 1429 | .unspecified_variable_len_array, | ||
| 1430 | .variable_len_array, | ||
| 1431 | .array, | ||
| 1432 | .static_array, | ||
| 1433 | .incomplete_array, | ||
| 1434 | => { | ||
| 1435 | const elem_ty = ty.elemType(); | ||
| 1436 | if (elem_ty.hasIncompleteSize()) { | ||
| 1437 | try p.errStr(.array_incomplete_elem, source_tok, try p.typeStr(elem_ty)); | ||
| 1438 | return error.ParsingFailed; | ||
| 1439 | } | ||
| 1440 | if (elem_ty.isFunc()) { | ||
| 1441 | try p.errTok(.array_func_elem, source_tok); | ||
| 1442 | return error.ParsingFailed; | ||
| 1443 | } | ||
| 1444 | if (elem_ty.specifier == .static_array and elem_ty.isArray()) { | ||
| 1445 | try p.errTok(.static_non_outermost_array, source_tok); | ||
| 1446 | } | ||
| 1447 | if (elem_ty.anyQual() and elem_ty.isArray()) { | ||
| 1448 | try p.errTok(.qualifier_non_outermost_array, source_tok); | ||
| 1449 | } | ||
| 1450 | }, | ||
| 1451 | .func, .var_args_func, .old_style_func => { | ||
| 1452 | const ret_ty = &ty.data.func.return_type; | ||
| 1453 | if (ret_ty.isArray()) try p.errTok(.func_cannot_return_array, source_tok); | ||
| 1454 | if (ret_ty.isFunc()) try p.errTok(.func_cannot_return_func, source_tok); | ||
| 1455 | if (ret_ty.qual.@"const") { | ||
| 1456 | try p.errStr(.qual_on_ret_type, source_tok, "const"); | ||
| 1457 | ret_ty.qual.@"const" = false; | ||
| 1458 | } | ||
| 1459 | if (ret_ty.qual.@"volatile") { | ||
| 1460 | try p.errStr(.qual_on_ret_type, source_tok, "volatile"); | ||
| 1461 | ret_ty.qual.@"volatile" = false; | ||
| 1462 | } | ||
| 1463 | if (ret_ty.qual.atomic) { | ||
| 1464 | try p.errStr(.qual_on_ret_type, source_tok, "atomic"); | ||
| 1465 | ret_ty.qual.atomic = false; | ||
| 1466 | } | ||
| 1467 | if (ret_ty.is(.fp16) and !p.comp.hasHalfPrecisionFloatABI()) { | ||
| 1468 | try p.errStr(.suggest_pointer_for_invalid_fp16, source_tok, "function return value"); | ||
| 1469 | } | ||
| 1470 | }, | ||
| 1471 | .typeof_type, .decayed_typeof_type => return ty.data.sub_type.validateCombinedType(p, source_tok), | ||
| 1472 | .typeof_expr, .decayed_typeof_expr => return ty.data.expr.ty.validateCombinedType(p, source_tok), | ||
| 1473 | .attributed => return ty.data.attributed.base.validateCombinedType(p, source_tok), | ||
| 1474 | else => {}, | ||
| 1475 | } | ||
| 1476 | } | ||
| 1477 | |||
| 1478 | /// An unfinished Type | ||
| 1479 | pub const Builder = struct { | ||
| 1480 | complex_tok: ?TokenIndex = null, | ||
| 1481 | bit_int_tok: ?TokenIndex = null, | ||
| 1482 | auto_type_tok: ?TokenIndex = null, | ||
| 1483 | typedef: ?struct { | ||
| 1484 | tok: TokenIndex, | ||
| 1485 | ty: Type, | ||
| 1486 | } = null, | ||
| 1487 | specifier: Builder.Specifier = .none, | ||
| 1488 | qual: Qualifiers.Builder = .{}, | ||
| 1489 | typeof: ?Type = null, | ||
| 1490 | /// When true an error is returned instead of adding a diagnostic message. | ||
| 1491 | /// Used for trying to combine typedef types. | ||
| 1492 | error_on_invalid: bool = false, | ||
| 1493 | |||
| 1494 | pub const Specifier = union(enum) { | ||
| 1495 | none, | ||
| 1496 | void, | ||
| 1497 | /// GNU __auto_type extension | ||
| 1498 | auto_type, | ||
| 1499 | nullptr_t, | ||
| 1500 | bool, | ||
| 1501 | char, | ||
| 1502 | schar, | ||
| 1503 | uchar, | ||
| 1504 | complex_char, | ||
| 1505 | complex_schar, | ||
| 1506 | complex_uchar, | ||
| 1507 | |||
| 1508 | unsigned, | ||
| 1509 | signed, | ||
| 1510 | short, | ||
| 1511 | sshort, | ||
| 1512 | ushort, | ||
| 1513 | short_int, | ||
| 1514 | sshort_int, | ||
| 1515 | ushort_int, | ||
| 1516 | int, | ||
| 1517 | sint, | ||
| 1518 | uint, | ||
| 1519 | long, | ||
| 1520 | slong, | ||
| 1521 | ulong, | ||
| 1522 | long_int, | ||
| 1523 | slong_int, | ||
| 1524 | ulong_int, | ||
| 1525 | long_long, | ||
| 1526 | slong_long, | ||
| 1527 | ulong_long, | ||
| 1528 | long_long_int, | ||
| 1529 | slong_long_int, | ||
| 1530 | ulong_long_int, | ||
| 1531 | int128, | ||
| 1532 | sint128, | ||
| 1533 | uint128, | ||
| 1534 | complex_unsigned, | ||
| 1535 | complex_signed, | ||
| 1536 | complex_short, | ||
| 1537 | complex_sshort, | ||
| 1538 | complex_ushort, | ||
| 1539 | complex_short_int, | ||
| 1540 | complex_sshort_int, | ||
| 1541 | complex_ushort_int, | ||
| 1542 | complex_int, | ||
| 1543 | complex_sint, | ||
| 1544 | complex_uint, | ||
| 1545 | complex_long, | ||
| 1546 | complex_slong, | ||
| 1547 | complex_ulong, | ||
| 1548 | complex_long_int, | ||
| 1549 | complex_slong_int, | ||
| 1550 | complex_ulong_int, | ||
| 1551 | complex_long_long, | ||
| 1552 | complex_slong_long, | ||
| 1553 | complex_ulong_long, | ||
| 1554 | complex_long_long_int, | ||
| 1555 | complex_slong_long_int, | ||
| 1556 | complex_ulong_long_int, | ||
| 1557 | complex_int128, | ||
| 1558 | complex_sint128, | ||
| 1559 | complex_uint128, | ||
| 1560 | bit_int: i16, | ||
| 1561 | sbit_int: i16, | ||
| 1562 | ubit_int: i16, | ||
| 1563 | complex_bit_int: i16, | ||
| 1564 | complex_sbit_int: i16, | ||
| 1565 | complex_ubit_int: i16, | ||
| 1566 | |||
| 1567 | fp16, | ||
| 1568 | float16, | ||
| 1569 | float, | ||
| 1570 | double, | ||
| 1571 | long_double, | ||
| 1572 | float80, | ||
| 1573 | float128, | ||
| 1574 | complex, | ||
| 1575 | complex_float, | ||
| 1576 | complex_double, | ||
| 1577 | complex_long_double, | ||
| 1578 | complex_float80, | ||
| 1579 | complex_float128, | ||
| 1580 | |||
| 1581 | pointer: *Type, | ||
| 1582 | unspecified_variable_len_array: *Type, | ||
| 1583 | decayed_unspecified_variable_len_array: *Type, | ||
| 1584 | func: *Func, | ||
| 1585 | var_args_func: *Func, | ||
| 1586 | old_style_func: *Func, | ||
| 1587 | array: *Array, | ||
| 1588 | decayed_array: *Array, | ||
| 1589 | static_array: *Array, | ||
| 1590 | decayed_static_array: *Array, | ||
| 1591 | incomplete_array: *Array, | ||
| 1592 | decayed_incomplete_array: *Array, | ||
| 1593 | vector: *Array, | ||
| 1594 | variable_len_array: *Expr, | ||
| 1595 | decayed_variable_len_array: *Expr, | ||
| 1596 | @"struct": *Record, | ||
| 1597 | @"union": *Record, | ||
| 1598 | @"enum": *Enum, | ||
| 1599 | typeof_type: *Type, | ||
| 1600 | decayed_typeof_type: *Type, | ||
| 1601 | typeof_expr: *Expr, | ||
| 1602 | decayed_typeof_expr: *Expr, | ||
| 1603 | |||
| 1604 | attributed: *Attributed, | ||
| 1605 | |||
| 1606 | pub fn str(spec: Builder.Specifier, langopts: LangOpts) ?[]const u8 { | ||
| 1607 | return switch (spec) { | ||
| 1608 | .none => unreachable, | ||
| 1609 | .void => "void", | ||
| 1610 | .auto_type => "__auto_type", | ||
| 1611 | .nullptr_t => "nullptr_t", | ||
| 1612 | .bool => if (langopts.standard.atLeast(.c2x)) "bool" else "_Bool", | ||
| 1613 | .char => "char", | ||
| 1614 | .schar => "signed char", | ||
| 1615 | .uchar => "unsigned char", | ||
| 1616 | .unsigned => "unsigned", | ||
| 1617 | .signed => "signed", | ||
| 1618 | .short => "short", | ||
| 1619 | .ushort => "unsigned short", | ||
| 1620 | .sshort => "signed short", | ||
| 1621 | .short_int => "short int", | ||
| 1622 | .sshort_int => "signed short int", | ||
| 1623 | .ushort_int => "unsigned short int", | ||
| 1624 | .int => "int", | ||
| 1625 | .sint => "signed int", | ||
| 1626 | .uint => "unsigned int", | ||
| 1627 | .long => "long", | ||
| 1628 | .slong => "signed long", | ||
| 1629 | .ulong => "unsigned long", | ||
| 1630 | .long_int => "long int", | ||
| 1631 | .slong_int => "signed long int", | ||
| 1632 | .ulong_int => "unsigned long int", | ||
| 1633 | .long_long => "long long", | ||
| 1634 | .slong_long => "signed long long", | ||
| 1635 | .ulong_long => "unsigned long long", | ||
| 1636 | .long_long_int => "long long int", | ||
| 1637 | .slong_long_int => "signed long long int", | ||
| 1638 | .ulong_long_int => "unsigned long long int", | ||
| 1639 | .int128 => "__int128", | ||
| 1640 | .sint128 => "signed __int128", | ||
| 1641 | .uint128 => "unsigned __int128", | ||
| 1642 | .bit_int => "_BitInt", | ||
| 1643 | .sbit_int => "signed _BitInt", | ||
| 1644 | .ubit_int => "unsigned _BitInt", | ||
| 1645 | .complex_char => "_Complex char", | ||
| 1646 | .complex_schar => "_Complex signed char", | ||
| 1647 | .complex_uchar => "_Complex unsigned char", | ||
| 1648 | .complex_unsigned => "_Complex unsigned", | ||
| 1649 | .complex_signed => "_Complex signed", | ||
| 1650 | .complex_short => "_Complex short", | ||
| 1651 | .complex_ushort => "_Complex unsigned short", | ||
| 1652 | .complex_sshort => "_Complex signed short", | ||
| 1653 | .complex_short_int => "_Complex short int", | ||
| 1654 | .complex_sshort_int => "_Complex signed short int", | ||
| 1655 | .complex_ushort_int => "_Complex unsigned short int", | ||
| 1656 | .complex_int => "_Complex int", | ||
| 1657 | .complex_sint => "_Complex signed int", | ||
| 1658 | .complex_uint => "_Complex unsigned int", | ||
| 1659 | .complex_long => "_Complex long", | ||
| 1660 | .complex_slong => "_Complex signed long", | ||
| 1661 | .complex_ulong => "_Complex unsigned long", | ||
| 1662 | .complex_long_int => "_Complex long int", | ||
| 1663 | .complex_slong_int => "_Complex signed long int", | ||
| 1664 | .complex_ulong_int => "_Complex unsigned long int", | ||
| 1665 | .complex_long_long => "_Complex long long", | ||
| 1666 | .complex_slong_long => "_Complex signed long long", | ||
| 1667 | .complex_ulong_long => "_Complex unsigned long long", | ||
| 1668 | .complex_long_long_int => "_Complex long long int", | ||
| 1669 | .complex_slong_long_int => "_Complex signed long long int", | ||
| 1670 | .complex_ulong_long_int => "_Complex unsigned long long int", | ||
| 1671 | .complex_int128 => "_Complex __int128", | ||
| 1672 | .complex_sint128 => "_Complex signed __int128", | ||
| 1673 | .complex_uint128 => "_Complex unsigned __int128", | ||
| 1674 | .complex_bit_int => "_Complex _BitInt", | ||
| 1675 | .complex_sbit_int => "_Complex signed _BitInt", | ||
| 1676 | .complex_ubit_int => "_Complex unsigned _BitInt", | ||
| 1677 | |||
| 1678 | .fp16 => "__fp16", | ||
| 1679 | .float16 => "_Float16", | ||
| 1680 | .float => "float", | ||
| 1681 | .double => "double", | ||
| 1682 | .long_double => "long double", | ||
| 1683 | .float80 => "__float80", | ||
| 1684 | .float128 => "__float128", | ||
| 1685 | .complex => "_Complex", | ||
| 1686 | .complex_float => "_Complex float", | ||
| 1687 | .complex_double => "_Complex double", | ||
| 1688 | .complex_long_double => "_Complex long double", | ||
| 1689 | .complex_float80 => "_Complex __float80", | ||
| 1690 | .complex_float128 => "_Complex __float128", | ||
| 1691 | |||
| 1692 | .attributed => |attributed| Builder.fromType(attributed.base).str(langopts), | ||
| 1693 | |||
| 1694 | else => null, | ||
| 1695 | }; | ||
| 1696 | } | ||
| 1697 | }; | ||
| 1698 | |||
| 1699 | pub fn finish(b: Builder, p: *Parser) Parser.Error!Type { | ||
| 1700 | var ty: Type = .{ .specifier = undefined }; | ||
| 1701 | if (b.typedef) |typedef| { | ||
| 1702 | ty = typedef.ty; | ||
| 1703 | if (ty.isArray()) { | ||
| 1704 | var elem = ty.elemType(); | ||
| 1705 | try b.qual.finish(p, &elem); | ||
| 1706 | // TODO this really should be easier | ||
| 1707 | switch (ty.specifier) { | ||
| 1708 | .array, .static_array, .incomplete_array => { | ||
| 1709 | var old = ty.data.array; | ||
| 1710 | ty.data.array = try p.arena.create(Array); | ||
| 1711 | ty.data.array.* = .{ | ||
| 1712 | .len = old.len, | ||
| 1713 | .elem = elem, | ||
| 1714 | }; | ||
| 1715 | }, | ||
| 1716 | .variable_len_array, .unspecified_variable_len_array => { | ||
| 1717 | var old = ty.data.expr; | ||
| 1718 | ty.data.expr = try p.arena.create(Expr); | ||
| 1719 | ty.data.expr.* = .{ | ||
| 1720 | .node = old.node, | ||
| 1721 | .ty = elem, | ||
| 1722 | }; | ||
| 1723 | }, | ||
| 1724 | .typeof_type => {}, // TODO handle | ||
| 1725 | .typeof_expr => {}, // TODO handle | ||
| 1726 | .attributed => {}, // TODO handle | ||
| 1727 | else => unreachable, | ||
| 1728 | } | ||
| 1729 | |||
| 1730 | return ty; | ||
| 1731 | } | ||
| 1732 | try b.qual.finish(p, &ty); | ||
| 1733 | return ty; | ||
| 1734 | } | ||
| 1735 | switch (b.specifier) { | ||
| 1736 | .none => { | ||
| 1737 | if (b.typeof) |typeof| { | ||
| 1738 | ty = typeof; | ||
| 1739 | } else { | ||
| 1740 | ty.specifier = .int; | ||
| 1741 | if (p.comp.langopts.standard.atLeast(.c2x)) { | ||
| 1742 | try p.err(.missing_type_specifier_c2x); | ||
| 1743 | } else { | ||
| 1744 | try p.err(.missing_type_specifier); | ||
| 1745 | } | ||
| 1746 | } | ||
| 1747 | }, | ||
| 1748 | .void => ty.specifier = .void, | ||
| 1749 | .auto_type => ty.specifier = .auto_type, | ||
| 1750 | .nullptr_t => unreachable, // nullptr_t can only be accessed via typeof(nullptr) | ||
| 1751 | .bool => ty.specifier = .bool, | ||
| 1752 | .char => ty.specifier = .char, | ||
| 1753 | .schar => ty.specifier = .schar, | ||
| 1754 | .uchar => ty.specifier = .uchar, | ||
| 1755 | .complex_char => ty.specifier = .complex_char, | ||
| 1756 | .complex_schar => ty.specifier = .complex_schar, | ||
| 1757 | .complex_uchar => ty.specifier = .complex_uchar, | ||
| 1758 | |||
| 1759 | .unsigned => ty.specifier = .uint, | ||
| 1760 | .signed => ty.specifier = .int, | ||
| 1761 | .short_int, .sshort_int, .short, .sshort => ty.specifier = .short, | ||
| 1762 | .ushort, .ushort_int => ty.specifier = .ushort, | ||
| 1763 | .int, .sint => ty.specifier = .int, | ||
| 1764 | .uint => ty.specifier = .uint, | ||
| 1765 | .long, .slong, .long_int, .slong_int => ty.specifier = .long, | ||
| 1766 | .ulong, .ulong_int => ty.specifier = .ulong, | ||
| 1767 | .long_long, .slong_long, .long_long_int, .slong_long_int => ty.specifier = .long_long, | ||
| 1768 | .ulong_long, .ulong_long_int => ty.specifier = .ulong_long, | ||
| 1769 | .int128, .sint128 => ty.specifier = .int128, | ||
| 1770 | .uint128 => ty.specifier = .uint128, | ||
| 1771 | .complex_unsigned => ty.specifier = .complex_uint, | ||
| 1772 | .complex_signed => ty.specifier = .complex_int, | ||
| 1773 | .complex_short_int, .complex_sshort_int, .complex_short, .complex_sshort => ty.specifier = .complex_short, | ||
| 1774 | .complex_ushort, .complex_ushort_int => ty.specifier = .complex_ushort, | ||
| 1775 | .complex_int, .complex_sint => ty.specifier = .complex_int, | ||
| 1776 | .complex_uint => ty.specifier = .complex_uint, | ||
| 1777 | .complex_long, .complex_slong, .complex_long_int, .complex_slong_int => ty.specifier = .complex_long, | ||
| 1778 | .complex_ulong, .complex_ulong_int => ty.specifier = .complex_ulong, | ||
| 1779 | .complex_long_long, .complex_slong_long, .complex_long_long_int, .complex_slong_long_int => ty.specifier = .complex_long_long, | ||
| 1780 | .complex_ulong_long, .complex_ulong_long_int => ty.specifier = .complex_ulong_long, | ||
| 1781 | .complex_int128, .complex_sint128 => ty.specifier = .complex_int128, | ||
| 1782 | .complex_uint128 => ty.specifier = .complex_uint128, | ||
| 1783 | .bit_int, .sbit_int, .ubit_int, .complex_bit_int, .complex_ubit_int, .complex_sbit_int => |bits| { | ||
| 1784 | const unsigned = b.specifier == .ubit_int or b.specifier == .complex_ubit_int; | ||
| 1785 | if (unsigned) { | ||
| 1786 | if (bits < 1) { | ||
| 1787 | try p.errStr(.unsigned_bit_int_too_small, b.bit_int_tok.?, b.specifier.str(p.comp.langopts).?); | ||
| 1788 | return error.ParsingFailed; | ||
| 1789 | } | ||
| 1790 | } else { | ||
| 1791 | if (bits < 2) { | ||
| 1792 | try p.errStr(.signed_bit_int_too_small, b.bit_int_tok.?, b.specifier.str(p.comp.langopts).?); | ||
| 1793 | return error.ParsingFailed; | ||
| 1794 | } | ||
| 1795 | } | ||
| 1796 | if (bits > Compilation.bit_int_max_bits) { | ||
| 1797 | try p.errStr(.bit_int_too_big, b.bit_int_tok.?, b.specifier.str(p.comp.langopts).?); | ||
| 1798 | return error.ParsingFailed; | ||
| 1799 | } | ||
| 1800 | ty.specifier = if (b.complex_tok != null) .complex_bit_int else .bit_int; | ||
| 1801 | ty.data = .{ .int = .{ | ||
| 1802 | .signedness = if (unsigned) .unsigned else .signed, | ||
| 1803 | .bits = @intCast(bits), | ||
| 1804 | } }; | ||
| 1805 | }, | ||
| 1806 | |||
| 1807 | .fp16 => ty.specifier = .fp16, | ||
| 1808 | .float16 => ty.specifier = .float16, | ||
| 1809 | .float => ty.specifier = .float, | ||
| 1810 | .double => ty.specifier = .double, | ||
| 1811 | .long_double => ty.specifier = .long_double, | ||
| 1812 | .float80 => ty.specifier = .float80, | ||
| 1813 | .float128 => ty.specifier = .float128, | ||
| 1814 | .complex_float => ty.specifier = .complex_float, | ||
| 1815 | .complex_double => ty.specifier = .complex_double, | ||
| 1816 | .complex_long_double => ty.specifier = .complex_long_double, | ||
| 1817 | .complex_float80 => ty.specifier = .complex_float80, | ||
| 1818 | .complex_float128 => ty.specifier = .complex_float128, | ||
| 1819 | .complex => { | ||
| 1820 | try p.errTok(.plain_complex, p.tok_i - 1); | ||
| 1821 | ty.specifier = .complex_double; | ||
| 1822 | }, | ||
| 1823 | |||
| 1824 | .pointer => |data| { | ||
| 1825 | ty.specifier = .pointer; | ||
| 1826 | ty.data = .{ .sub_type = data }; | ||
| 1827 | }, | ||
| 1828 | .unspecified_variable_len_array => |data| { | ||
| 1829 | ty.specifier = .unspecified_variable_len_array; | ||
| 1830 | ty.data = .{ .sub_type = data }; | ||
| 1831 | }, | ||
| 1832 | .decayed_unspecified_variable_len_array => |data| { | ||
| 1833 | ty.specifier = .decayed_unspecified_variable_len_array; | ||
| 1834 | ty.data = .{ .sub_type = data }; | ||
| 1835 | }, | ||
| 1836 | .func => |data| { | ||
| 1837 | ty.specifier = .func; | ||
| 1838 | ty.data = .{ .func = data }; | ||
| 1839 | }, | ||
| 1840 | .var_args_func => |data| { | ||
| 1841 | ty.specifier = .var_args_func; | ||
| 1842 | ty.data = .{ .func = data }; | ||
| 1843 | }, | ||
| 1844 | .old_style_func => |data| { | ||
| 1845 | ty.specifier = .old_style_func; | ||
| 1846 | ty.data = .{ .func = data }; | ||
| 1847 | }, | ||
| 1848 | .array => |data| { | ||
| 1849 | ty.specifier = .array; | ||
| 1850 | ty.data = .{ .array = data }; | ||
| 1851 | }, | ||
| 1852 | .decayed_array => |data| { | ||
| 1853 | ty.specifier = .decayed_array; | ||
| 1854 | ty.data = .{ .array = data }; | ||
| 1855 | }, | ||
| 1856 | .static_array => |data| { | ||
| 1857 | ty.specifier = .static_array; | ||
| 1858 | ty.data = .{ .array = data }; | ||
| 1859 | }, | ||
| 1860 | .decayed_static_array => |data| { | ||
| 1861 | ty.specifier = .decayed_static_array; | ||
| 1862 | ty.data = .{ .array = data }; | ||
| 1863 | }, | ||
| 1864 | .incomplete_array => |data| { | ||
| 1865 | ty.specifier = .incomplete_array; | ||
| 1866 | ty.data = .{ .array = data }; | ||
| 1867 | }, | ||
| 1868 | .decayed_incomplete_array => |data| { | ||
| 1869 | ty.specifier = .decayed_incomplete_array; | ||
| 1870 | ty.data = .{ .array = data }; | ||
| 1871 | }, | ||
| 1872 | .vector => |data| { | ||
| 1873 | ty.specifier = .vector; | ||
| 1874 | ty.data = .{ .array = data }; | ||
| 1875 | }, | ||
| 1876 | .variable_len_array => |data| { | ||
| 1877 | ty.specifier = .variable_len_array; | ||
| 1878 | ty.data = .{ .expr = data }; | ||
| 1879 | }, | ||
| 1880 | .decayed_variable_len_array => |data| { | ||
| 1881 | ty.specifier = .decayed_variable_len_array; | ||
| 1882 | ty.data = .{ .expr = data }; | ||
| 1883 | }, | ||
| 1884 | .@"struct" => |data| { | ||
| 1885 | ty.specifier = .@"struct"; | ||
| 1886 | ty.data = .{ .record = data }; | ||
| 1887 | }, | ||
| 1888 | .@"union" => |data| { | ||
| 1889 | ty.specifier = .@"union"; | ||
| 1890 | ty.data = .{ .record = data }; | ||
| 1891 | }, | ||
| 1892 | .@"enum" => |data| { | ||
| 1893 | ty.specifier = .@"enum"; | ||
| 1894 | ty.data = .{ .@"enum" = data }; | ||
| 1895 | }, | ||
| 1896 | .typeof_type => |data| { | ||
| 1897 | ty.specifier = .typeof_type; | ||
| 1898 | ty.data = .{ .sub_type = data }; | ||
| 1899 | }, | ||
| 1900 | .decayed_typeof_type => |data| { | ||
| 1901 | ty.specifier = .decayed_typeof_type; | ||
| 1902 | ty.data = .{ .sub_type = data }; | ||
| 1903 | }, | ||
| 1904 | .typeof_expr => |data| { | ||
| 1905 | ty.specifier = .typeof_expr; | ||
| 1906 | ty.data = .{ .expr = data }; | ||
| 1907 | }, | ||
| 1908 | .decayed_typeof_expr => |data| { | ||
| 1909 | ty.specifier = .decayed_typeof_expr; | ||
| 1910 | ty.data = .{ .expr = data }; | ||
| 1911 | }, | ||
| 1912 | .attributed => |data| { | ||
| 1913 | ty.specifier = .attributed; | ||
| 1914 | ty.data = .{ .attributed = data }; | ||
| 1915 | }, | ||
| 1916 | } | ||
| 1917 | if (!ty.isReal() and ty.isInt()) { | ||
| 1918 | if (b.complex_tok) |tok| try p.errTok(.complex_int, tok); | ||
| 1919 | } | ||
| 1920 | try b.qual.finish(p, &ty); | ||
| 1921 | return ty; | ||
| 1922 | } | ||
| 1923 | |||
| 1924 | fn cannotCombine(b: Builder, p: *Parser, source_tok: TokenIndex) !void { | ||
| 1925 | if (b.error_on_invalid) return error.CannotCombine; | ||
| 1926 | const ty_str = b.specifier.str(p.comp.langopts) orelse try p.typeStr(try b.finish(p)); | ||
| 1927 | try p.errExtra(.cannot_combine_spec, source_tok, .{ .str = ty_str }); | ||
| 1928 | if (b.typedef) |some| try p.errStr(.spec_from_typedef, some.tok, try p.typeStr(some.ty)); | ||
| 1929 | } | ||
| 1930 | |||
| 1931 | fn duplicateSpec(b: *Builder, p: *Parser, source_tok: TokenIndex, spec: []const u8) !void { | ||
| 1932 | if (b.error_on_invalid) return error.CannotCombine; | ||
| 1933 | if (p.comp.langopts.emulate != .clang) return b.cannotCombine(p, source_tok); | ||
| 1934 | try p.errStr(.duplicate_decl_spec, p.tok_i, spec); | ||
| 1935 | } | ||
| 1936 | |||
| 1937 | pub fn combineFromTypeof(b: *Builder, p: *Parser, new: Type, source_tok: TokenIndex) Compilation.Error!void { | ||
| 1938 | if (b.typeof != null) return p.errStr(.cannot_combine_spec, source_tok, "typeof"); | ||
| 1939 | if (b.specifier != .none) return p.errStr(.invalid_typeof, source_tok, @tagName(b.specifier)); | ||
| 1940 | const inner = switch (new.specifier) { | ||
| 1941 | .typeof_type => new.data.sub_type.*, | ||
| 1942 | .typeof_expr => new.data.expr.ty, | ||
| 1943 | .nullptr_t => new, // typeof(nullptr) is special-cased to be an unwrapped typeof-expr | ||
| 1944 | else => unreachable, | ||
| 1945 | }; | ||
| 1946 | |||
| 1947 | b.typeof = switch (inner.specifier) { | ||
| 1948 | .attributed => inner.data.attributed.base, | ||
| 1949 | else => new, | ||
| 1950 | }; | ||
| 1951 | } | ||
| 1952 | |||
| 1953 | /// Try to combine type from typedef, returns true if successful. | ||
| 1954 | pub fn combineTypedef(b: *Builder, p: *Parser, typedef_ty: Type, name_tok: TokenIndex) bool { | ||
| 1955 | b.error_on_invalid = true; | ||
| 1956 | defer b.error_on_invalid = false; | ||
| 1957 | |||
| 1958 | const new_spec = fromType(typedef_ty); | ||
| 1959 | b.combineExtra(p, new_spec, 0) catch |err| switch (err) { | ||
| 1960 | error.FatalError => unreachable, // we do not add any diagnostics | ||
| 1961 | error.OutOfMemory => unreachable, // we do not add any diagnostics | ||
| 1962 | error.ParsingFailed => unreachable, // we do not add any diagnostics | ||
| 1963 | error.CannotCombine => return false, | ||
| 1964 | }; | ||
| 1965 | b.typedef = .{ .tok = name_tok, .ty = typedef_ty }; | ||
| 1966 | return true; | ||
| 1967 | } | ||
| 1968 | |||
| 1969 | pub fn combine(b: *Builder, p: *Parser, new: Builder.Specifier, source_tok: TokenIndex) !void { | ||
| 1970 | b.combineExtra(p, new, source_tok) catch |err| switch (err) { | ||
| 1971 | error.CannotCombine => unreachable, | ||
| 1972 | else => |e| return e, | ||
| 1973 | }; | ||
| 1974 | } | ||
| 1975 | |||
| 1976 | fn combineExtra(b: *Builder, p: *Parser, new: Builder.Specifier, source_tok: TokenIndex) !void { | ||
| 1977 | if (b.typeof != null) { | ||
| 1978 | if (b.error_on_invalid) return error.CannotCombine; | ||
| 1979 | try p.errStr(.invalid_typeof, source_tok, @tagName(new)); | ||
| 1980 | } | ||
| 1981 | |||
| 1982 | switch (new) { | ||
| 1983 | .complex => b.complex_tok = source_tok, | ||
| 1984 | .bit_int => b.bit_int_tok = source_tok, | ||
| 1985 | .auto_type => b.auto_type_tok = source_tok, | ||
| 1986 | else => {}, | ||
| 1987 | } | ||
| 1988 | |||
| 1989 | if (new == .int128 and !target_util.hasInt128(p.comp.target)) { | ||
| 1990 | try p.errStr(.type_not_supported_on_target, source_tok, "__int128"); | ||
| 1991 | } | ||
| 1992 | |||
| 1993 | switch (new) { | ||
| 1994 | else => switch (b.specifier) { | ||
| 1995 | .none => b.specifier = new, | ||
| 1996 | else => return b.cannotCombine(p, source_tok), | ||
| 1997 | }, | ||
| 1998 | .signed => b.specifier = switch (b.specifier) { | ||
| 1999 | .none => .signed, | ||
| 2000 | .char => .schar, | ||
| 2001 | .short => .sshort, | ||
| 2002 | .short_int => .sshort_int, | ||
| 2003 | .int => .sint, | ||
| 2004 | .long => .slong, | ||
| 2005 | .long_int => .slong_int, | ||
| 2006 | .long_long => .slong_long, | ||
| 2007 | .long_long_int => .slong_long_int, | ||
| 2008 | .int128 => .sint128, | ||
| 2009 | .bit_int => |bits| .{ .sbit_int = bits }, | ||
| 2010 | .complex => .complex_signed, | ||
| 2011 | .complex_char => .complex_schar, | ||
| 2012 | .complex_short => .complex_sshort, | ||
| 2013 | .complex_short_int => .complex_sshort_int, | ||
| 2014 | .complex_int => .complex_sint, | ||
| 2015 | .complex_long => .complex_slong, | ||
| 2016 | .complex_long_int => .complex_slong_int, | ||
| 2017 | .complex_long_long => .complex_slong_long, | ||
| 2018 | .complex_long_long_int => .complex_slong_long_int, | ||
| 2019 | .complex_int128 => .complex_sint128, | ||
| 2020 | .complex_bit_int => |bits| .{ .complex_sbit_int = bits }, | ||
| 2021 | .signed, | ||
| 2022 | .sshort, | ||
| 2023 | .sshort_int, | ||
| 2024 | .sint, | ||
| 2025 | .slong, | ||
| 2026 | .slong_int, | ||
| 2027 | .slong_long, | ||
| 2028 | .slong_long_int, | ||
| 2029 | .sint128, | ||
| 2030 | .sbit_int, | ||
| 2031 | .complex_schar, | ||
| 2032 | .complex_signed, | ||
| 2033 | .complex_sshort, | ||
| 2034 | .complex_sshort_int, | ||
| 2035 | .complex_sint, | ||
| 2036 | .complex_slong, | ||
| 2037 | .complex_slong_int, | ||
| 2038 | .complex_slong_long, | ||
| 2039 | .complex_slong_long_int, | ||
| 2040 | .complex_sint128, | ||
| 2041 | .complex_sbit_int, | ||
| 2042 | => return b.duplicateSpec(p, source_tok, "signed"), | ||
| 2043 | else => return b.cannotCombine(p, source_tok), | ||
| 2044 | }, | ||
| 2045 | .unsigned => b.specifier = switch (b.specifier) { | ||
| 2046 | .none => .unsigned, | ||
| 2047 | .char => .uchar, | ||
| 2048 | .short => .ushort, | ||
| 2049 | .short_int => .ushort_int, | ||
| 2050 | .int => .uint, | ||
| 2051 | .long => .ulong, | ||
| 2052 | .long_int => .ulong_int, | ||
| 2053 | .long_long => .ulong_long, | ||
| 2054 | .long_long_int => .ulong_long_int, | ||
| 2055 | .int128 => .uint128, | ||
| 2056 | .bit_int => |bits| .{ .ubit_int = bits }, | ||
| 2057 | .complex => .complex_unsigned, | ||
| 2058 | .complex_char => .complex_uchar, | ||
| 2059 | .complex_short => .complex_ushort, | ||
| 2060 | .complex_short_int => .complex_ushort_int, | ||
| 2061 | .complex_int => .complex_uint, | ||
| 2062 | .complex_long => .complex_ulong, | ||
| 2063 | .complex_long_int => .complex_ulong_int, | ||
| 2064 | .complex_long_long => .complex_ulong_long, | ||
| 2065 | .complex_long_long_int => .complex_ulong_long_int, | ||
| 2066 | .complex_int128 => .complex_uint128, | ||
| 2067 | .complex_bit_int => |bits| .{ .complex_ubit_int = bits }, | ||
| 2068 | .unsigned, | ||
| 2069 | .ushort, | ||
| 2070 | .ushort_int, | ||
| 2071 | .uint, | ||
| 2072 | .ulong, | ||
| 2073 | .ulong_int, | ||
| 2074 | .ulong_long, | ||
| 2075 | .ulong_long_int, | ||
| 2076 | .uint128, | ||
| 2077 | .ubit_int, | ||
| 2078 | .complex_uchar, | ||
| 2079 | .complex_unsigned, | ||
| 2080 | .complex_ushort, | ||
| 2081 | .complex_ushort_int, | ||
| 2082 | .complex_uint, | ||
| 2083 | .complex_ulong, | ||
| 2084 | .complex_ulong_int, | ||
| 2085 | .complex_ulong_long, | ||
| 2086 | .complex_ulong_long_int, | ||
| 2087 | .complex_uint128, | ||
| 2088 | .complex_ubit_int, | ||
| 2089 | => return b.duplicateSpec(p, source_tok, "unsigned"), | ||
| 2090 | else => return b.cannotCombine(p, source_tok), | ||
| 2091 | }, | ||
| 2092 | .char => b.specifier = switch (b.specifier) { | ||
| 2093 | .none => .char, | ||
| 2094 | .unsigned => .uchar, | ||
| 2095 | .signed => .schar, | ||
| 2096 | .complex => .complex_char, | ||
| 2097 | .complex_signed => .complex_schar, | ||
| 2098 | .complex_unsigned => .complex_uchar, | ||
| 2099 | else => return b.cannotCombine(p, source_tok), | ||
| 2100 | }, | ||
| 2101 | .short => b.specifier = switch (b.specifier) { | ||
| 2102 | .none => .short, | ||
| 2103 | .unsigned => .ushort, | ||
| 2104 | .signed => .sshort, | ||
| 2105 | .int => .short_int, | ||
| 2106 | .sint => .sshort_int, | ||
| 2107 | .uint => .ushort_int, | ||
| 2108 | .complex => .complex_short, | ||
| 2109 | .complex_signed => .complex_sshort, | ||
| 2110 | .complex_unsigned => .complex_ushort, | ||
| 2111 | else => return b.cannotCombine(p, source_tok), | ||
| 2112 | }, | ||
| 2113 | .int => b.specifier = switch (b.specifier) { | ||
| 2114 | .none => .int, | ||
| 2115 | .signed => .sint, | ||
| 2116 | .unsigned => .uint, | ||
| 2117 | .short => .short_int, | ||
| 2118 | .sshort => .sshort_int, | ||
| 2119 | .ushort => .ushort_int, | ||
| 2120 | .long => .long_int, | ||
| 2121 | .slong => .slong_int, | ||
| 2122 | .ulong => .ulong_int, | ||
| 2123 | .long_long => .long_long_int, | ||
| 2124 | .slong_long => .slong_long_int, | ||
| 2125 | .ulong_long => .ulong_long_int, | ||
| 2126 | .complex => .complex_int, | ||
| 2127 | .complex_signed => .complex_sint, | ||
| 2128 | .complex_unsigned => .complex_uint, | ||
| 2129 | .complex_short => .complex_short_int, | ||
| 2130 | .complex_sshort => .complex_sshort_int, | ||
| 2131 | .complex_ushort => .complex_ushort_int, | ||
| 2132 | .complex_long => .complex_long_int, | ||
| 2133 | .complex_slong => .complex_slong_int, | ||
| 2134 | .complex_ulong => .complex_ulong_int, | ||
| 2135 | .complex_long_long => .complex_long_long_int, | ||
| 2136 | .complex_slong_long => .complex_slong_long_int, | ||
| 2137 | .complex_ulong_long => .complex_ulong_long_int, | ||
| 2138 | else => return b.cannotCombine(p, source_tok), | ||
| 2139 | }, | ||
| 2140 | .long => b.specifier = switch (b.specifier) { | ||
| 2141 | .none => .long, | ||
| 2142 | .long => .long_long, | ||
| 2143 | .unsigned => .ulong, | ||
| 2144 | .signed => .long, | ||
| 2145 | .int => .long_int, | ||
| 2146 | .sint => .slong_int, | ||
| 2147 | .ulong => .ulong_long, | ||
| 2148 | .complex => .complex_long, | ||
| 2149 | .complex_signed => .complex_slong, | ||
| 2150 | .complex_unsigned => .complex_ulong, | ||
| 2151 | .complex_long => .complex_long_long, | ||
| 2152 | .complex_slong => .complex_slong_long, | ||
| 2153 | .complex_ulong => .complex_ulong_long, | ||
| 2154 | else => return b.cannotCombine(p, source_tok), | ||
| 2155 | }, | ||
| 2156 | .int128 => b.specifier = switch (b.specifier) { | ||
| 2157 | .none => .int128, | ||
| 2158 | .unsigned => .uint128, | ||
| 2159 | .signed => .sint128, | ||
| 2160 | .complex => .complex_int128, | ||
| 2161 | .complex_signed => .complex_sint128, | ||
| 2162 | .complex_unsigned => .complex_uint128, | ||
| 2163 | else => return b.cannotCombine(p, source_tok), | ||
| 2164 | }, | ||
| 2165 | .bit_int => b.specifier = switch (b.specifier) { | ||
| 2166 | .none => .{ .bit_int = new.bit_int }, | ||
| 2167 | .unsigned => .{ .ubit_int = new.bit_int }, | ||
| 2168 | .signed => .{ .sbit_int = new.bit_int }, | ||
| 2169 | .complex => .{ .complex_bit_int = new.bit_int }, | ||
| 2170 | .complex_signed => .{ .complex_sbit_int = new.bit_int }, | ||
| 2171 | .complex_unsigned => .{ .complex_ubit_int = new.bit_int }, | ||
| 2172 | else => return b.cannotCombine(p, source_tok), | ||
| 2173 | }, | ||
| 2174 | .auto_type => b.specifier = switch (b.specifier) { | ||
| 2175 | .none => .auto_type, | ||
| 2176 | else => return b.cannotCombine(p, source_tok), | ||
| 2177 | }, | ||
| 2178 | .fp16 => b.specifier = switch (b.specifier) { | ||
| 2179 | .none => .fp16, | ||
| 2180 | else => return b.cannotCombine(p, source_tok), | ||
| 2181 | }, | ||
| 2182 | .float16 => b.specifier = switch (b.specifier) { | ||
| 2183 | .none => .float16, | ||
| 2184 | else => return b.cannotCombine(p, source_tok), | ||
| 2185 | }, | ||
| 2186 | .float => b.specifier = switch (b.specifier) { | ||
| 2187 | .none => .float, | ||
| 2188 | .complex => .complex_float, | ||
| 2189 | else => return b.cannotCombine(p, source_tok), | ||
| 2190 | }, | ||
| 2191 | .double => b.specifier = switch (b.specifier) { | ||
| 2192 | .none => .double, | ||
| 2193 | .long => .long_double, | ||
| 2194 | .complex_long => .complex_long_double, | ||
| 2195 | .complex => .complex_double, | ||
| 2196 | else => return b.cannotCombine(p, source_tok), | ||
| 2197 | }, | ||
| 2198 | .float80 => b.specifier = switch (b.specifier) { | ||
| 2199 | .none => .float80, | ||
| 2200 | .complex => .complex_float80, | ||
| 2201 | else => return b.cannotCombine(p, source_tok), | ||
| 2202 | }, | ||
| 2203 | .float128 => b.specifier = switch (b.specifier) { | ||
| 2204 | .none => .float128, | ||
| 2205 | .complex => .complex_float128, | ||
| 2206 | else => return b.cannotCombine(p, source_tok), | ||
| 2207 | }, | ||
| 2208 | .complex => b.specifier = switch (b.specifier) { | ||
| 2209 | .none => .complex, | ||
| 2210 | .float => .complex_float, | ||
| 2211 | .double => .complex_double, | ||
| 2212 | .long_double => .complex_long_double, | ||
| 2213 | .float80 => .complex_float80, | ||
| 2214 | .float128 => .complex_float128, | ||
| 2215 | .char => .complex_char, | ||
| 2216 | .schar => .complex_schar, | ||
| 2217 | .uchar => .complex_uchar, | ||
| 2218 | .unsigned => .complex_unsigned, | ||
| 2219 | .signed => .complex_signed, | ||
| 2220 | .short => .complex_short, | ||
| 2221 | .sshort => .complex_sshort, | ||
| 2222 | .ushort => .complex_ushort, | ||
| 2223 | .short_int => .complex_short_int, | ||
| 2224 | .sshort_int => .complex_sshort_int, | ||
| 2225 | .ushort_int => .complex_ushort_int, | ||
| 2226 | .int => .complex_int, | ||
| 2227 | .sint => .complex_sint, | ||
| 2228 | .uint => .complex_uint, | ||
| 2229 | .long => .complex_long, | ||
| 2230 | .slong => .complex_slong, | ||
| 2231 | .ulong => .complex_ulong, | ||
| 2232 | .long_int => .complex_long_int, | ||
| 2233 | .slong_int => .complex_slong_int, | ||
| 2234 | .ulong_int => .complex_ulong_int, | ||
| 2235 | .long_long => .complex_long_long, | ||
| 2236 | .slong_long => .complex_slong_long, | ||
| 2237 | .ulong_long => .complex_ulong_long, | ||
| 2238 | .long_long_int => .complex_long_long_int, | ||
| 2239 | .slong_long_int => .complex_slong_long_int, | ||
| 2240 | .ulong_long_int => .complex_ulong_long_int, | ||
| 2241 | .int128 => .complex_int128, | ||
| 2242 | .sint128 => .complex_sint128, | ||
| 2243 | .uint128 => .complex_uint128, | ||
| 2244 | .bit_int => |bits| .{ .complex_bit_int = bits }, | ||
| 2245 | .sbit_int => |bits| .{ .complex_sbit_int = bits }, | ||
| 2246 | .ubit_int => |bits| .{ .complex_ubit_int = bits }, | ||
| 2247 | .complex, | ||
| 2248 | .complex_float, | ||
| 2249 | .complex_double, | ||
| 2250 | .complex_long_double, | ||
| 2251 | .complex_float80, | ||
| 2252 | .complex_float128, | ||
| 2253 | .complex_char, | ||
| 2254 | .complex_schar, | ||
| 2255 | .complex_uchar, | ||
| 2256 | .complex_unsigned, | ||
| 2257 | .complex_signed, | ||
| 2258 | .complex_short, | ||
| 2259 | .complex_sshort, | ||
| 2260 | .complex_ushort, | ||
| 2261 | .complex_short_int, | ||
| 2262 | .complex_sshort_int, | ||
| 2263 | .complex_ushort_int, | ||
| 2264 | .complex_int, | ||
| 2265 | .complex_sint, | ||
| 2266 | .complex_uint, | ||
| 2267 | .complex_long, | ||
| 2268 | .complex_slong, | ||
| 2269 | .complex_ulong, | ||
| 2270 | .complex_long_int, | ||
| 2271 | .complex_slong_int, | ||
| 2272 | .complex_ulong_int, | ||
| 2273 | .complex_long_long, | ||
| 2274 | .complex_slong_long, | ||
| 2275 | .complex_ulong_long, | ||
| 2276 | .complex_long_long_int, | ||
| 2277 | .complex_slong_long_int, | ||
| 2278 | .complex_ulong_long_int, | ||
| 2279 | .complex_int128, | ||
| 2280 | .complex_sint128, | ||
| 2281 | .complex_uint128, | ||
| 2282 | .complex_bit_int, | ||
| 2283 | .complex_sbit_int, | ||
| 2284 | .complex_ubit_int, | ||
| 2285 | => return b.duplicateSpec(p, source_tok, "_Complex"), | ||
| 2286 | else => return b.cannotCombine(p, source_tok), | ||
| 2287 | }, | ||
| 2288 | } | ||
| 2289 | } | ||
| 2290 | |||
| 2291 | pub fn fromType(ty: Type) Builder.Specifier { | ||
| 2292 | return switch (ty.specifier) { | ||
| 2293 | .void => .void, | ||
| 2294 | .auto_type => .auto_type, | ||
| 2295 | .nullptr_t => .nullptr_t, | ||
| 2296 | .bool => .bool, | ||
| 2297 | .char => .char, | ||
| 2298 | .schar => .schar, | ||
| 2299 | .uchar => .uchar, | ||
| 2300 | .short => .short, | ||
| 2301 | .ushort => .ushort, | ||
| 2302 | .int => .int, | ||
| 2303 | .uint => .uint, | ||
| 2304 | .long => .long, | ||
| 2305 | .ulong => .ulong, | ||
| 2306 | .long_long => .long_long, | ||
| 2307 | .ulong_long => .ulong_long, | ||
| 2308 | .int128 => .int128, | ||
| 2309 | .uint128 => .uint128, | ||
| 2310 | .bit_int => if (ty.data.int.signedness == .unsigned) { | ||
| 2311 | return .{ .ubit_int = ty.data.int.bits }; | ||
| 2312 | } else { | ||
| 2313 | return .{ .bit_int = ty.data.int.bits }; | ||
| 2314 | }, | ||
| 2315 | .complex_char => .complex_char, | ||
| 2316 | .complex_schar => .complex_schar, | ||
| 2317 | .complex_uchar => .complex_uchar, | ||
| 2318 | .complex_short => .complex_short, | ||
| 2319 | .complex_ushort => .complex_ushort, | ||
| 2320 | .complex_int => .complex_int, | ||
| 2321 | .complex_uint => .complex_uint, | ||
| 2322 | .complex_long => .complex_long, | ||
| 2323 | .complex_ulong => .complex_ulong, | ||
| 2324 | .complex_long_long => .complex_long_long, | ||
| 2325 | .complex_ulong_long => .complex_ulong_long, | ||
| 2326 | .complex_int128 => .complex_int128, | ||
| 2327 | .complex_uint128 => .complex_uint128, | ||
| 2328 | .complex_bit_int => if (ty.data.int.signedness == .unsigned) { | ||
| 2329 | return .{ .complex_ubit_int = ty.data.int.bits }; | ||
| 2330 | } else { | ||
| 2331 | return .{ .complex_bit_int = ty.data.int.bits }; | ||
| 2332 | }, | ||
| 2333 | .fp16 => .fp16, | ||
| 2334 | .float16 => .float16, | ||
| 2335 | .float => .float, | ||
| 2336 | .double => .double, | ||
| 2337 | .float80 => .float80, | ||
| 2338 | .float128 => .float128, | ||
| 2339 | .long_double => .long_double, | ||
| 2340 | .complex_float => .complex_float, | ||
| 2341 | .complex_double => .complex_double, | ||
| 2342 | .complex_long_double => .complex_long_double, | ||
| 2343 | .complex_float80 => .complex_float80, | ||
| 2344 | .complex_float128 => .complex_float128, | ||
| 2345 | |||
| 2346 | .pointer => .{ .pointer = ty.data.sub_type }, | ||
| 2347 | .unspecified_variable_len_array => .{ .unspecified_variable_len_array = ty.data.sub_type }, | ||
| 2348 | .decayed_unspecified_variable_len_array => .{ .decayed_unspecified_variable_len_array = ty.data.sub_type }, | ||
| 2349 | .func => .{ .func = ty.data.func }, | ||
| 2350 | .var_args_func => .{ .var_args_func = ty.data.func }, | ||
| 2351 | .old_style_func => .{ .old_style_func = ty.data.func }, | ||
| 2352 | .array => .{ .array = ty.data.array }, | ||
| 2353 | .decayed_array => .{ .decayed_array = ty.data.array }, | ||
| 2354 | .static_array => .{ .static_array = ty.data.array }, | ||
| 2355 | .decayed_static_array => .{ .decayed_static_array = ty.data.array }, | ||
| 2356 | .incomplete_array => .{ .incomplete_array = ty.data.array }, | ||
| 2357 | .decayed_incomplete_array => .{ .decayed_incomplete_array = ty.data.array }, | ||
| 2358 | .vector => .{ .vector = ty.data.array }, | ||
| 2359 | .variable_len_array => .{ .variable_len_array = ty.data.expr }, | ||
| 2360 | .decayed_variable_len_array => .{ .decayed_variable_len_array = ty.data.expr }, | ||
| 2361 | .@"struct" => .{ .@"struct" = ty.data.record }, | ||
| 2362 | .@"union" => .{ .@"union" = ty.data.record }, | ||
| 2363 | .@"enum" => .{ .@"enum" = ty.data.@"enum" }, | ||
| 2364 | |||
| 2365 | .typeof_type => .{ .typeof_type = ty.data.sub_type }, | ||
| 2366 | .decayed_typeof_type => .{ .decayed_typeof_type = ty.data.sub_type }, | ||
| 2367 | .typeof_expr => .{ .typeof_expr = ty.data.expr }, | ||
| 2368 | .decayed_typeof_expr => .{ .decayed_typeof_expr = ty.data.expr }, | ||
| 2369 | |||
| 2370 | .attributed => .{ .attributed = ty.data.attributed }, | ||
| 2371 | else => unreachable, | ||
| 2372 | }; | ||
| 2373 | } | ||
| 2374 | }; | ||
| 2375 | |||
| 2376 | pub fn getAttribute(ty: Type, comptime tag: Attribute.Tag) ?Attribute.ArgumentsForTag(tag) { | ||
| 2377 | switch (ty.specifier) { | ||
| 2378 | .typeof_type => return ty.data.sub_type.getAttribute(tag), | ||
| 2379 | .typeof_expr => return ty.data.expr.ty.getAttribute(tag), | ||
| 2380 | .attributed => { | ||
| 2381 | for (ty.data.attributed.attributes) |attribute| { | ||
| 2382 | if (attribute.tag == tag) return @field(attribute.args, @tagName(tag)); | ||
| 2383 | } | ||
| 2384 | return null; | ||
| 2385 | }, | ||
| 2386 | else => return null, | ||
| 2387 | } | ||
| 2388 | } | ||
| 2389 | |||
| 2390 | pub fn hasAttribute(ty: Type, tag: Attribute.Tag) bool { | ||
| 2391 | for (ty.getAttributes()) |attr| { | ||
| 2392 | if (attr.tag == tag) return true; | ||
| 2393 | } | ||
| 2394 | return false; | ||
| 2395 | } | ||
| 2396 | |||
| 2397 | /// printf format modifier | ||
| 2398 | pub fn formatModifier(ty: Type) []const u8 { | ||
| 2399 | return switch (ty.specifier) { | ||
| 2400 | .schar, .uchar => "hh", | ||
| 2401 | .short, .ushort => "h", | ||
| 2402 | .int, .uint => "", | ||
| 2403 | .long, .ulong => "l", | ||
| 2404 | .long_long, .ulong_long => "ll", | ||
| 2405 | else => unreachable, | ||
| 2406 | }; | ||
| 2407 | } | ||
| 2408 | |||
| 2409 | /// Suffix for integer values of this type | ||
| 2410 | pub fn intValueSuffix(ty: Type, comp: *const Compilation) []const u8 { | ||
| 2411 | return switch (ty.specifier) { | ||
| 2412 | .schar, .short, .int => "", | ||
| 2413 | .long => "L", | ||
| 2414 | .long_long => "LL", | ||
| 2415 | .uchar, .char => { | ||
| 2416 | if (ty.specifier == .char and comp.getCharSignedness() == .signed) return ""; | ||
| 2417 | // Only 8-bit char supported currently; | ||
| 2418 | // TODO: handle platforms with 16-bit int + 16-bit char | ||
| 2419 | std.debug.assert(ty.sizeof(comp).? == 1); | ||
| 2420 | return ""; | ||
| 2421 | }, | ||
| 2422 | .ushort => { | ||
| 2423 | if (ty.sizeof(comp).? < int.sizeof(comp).?) { | ||
| 2424 | return ""; | ||
| 2425 | } | ||
| 2426 | return "U"; | ||
| 2427 | }, | ||
| 2428 | .uint => "U", | ||
| 2429 | .ulong => "UL", | ||
| 2430 | .ulong_long => "ULL", | ||
| 2431 | else => unreachable, // not integer | ||
| 2432 | }; | ||
| 2433 | } | ||
| 2434 | |||
| 2435 | /// Print type in C style | ||
| 2436 | pub fn print(ty: Type, mapper: StringInterner.TypeMapper, langopts: LangOpts, w: anytype) @TypeOf(w).Error!void { | ||
| 2437 | _ = try ty.printPrologue(mapper, langopts, w); | ||
| 2438 | try ty.printEpilogue(mapper, langopts, w); | ||
| 2439 | } | ||
| 2440 | |||
| 2441 | pub fn printNamed(ty: Type, name: []const u8, mapper: StringInterner.TypeMapper, langopts: LangOpts, w: anytype) @TypeOf(w).Error!void { | ||
| 2442 | const simple = try ty.printPrologue(mapper, langopts, w); | ||
| 2443 | if (simple) try w.writeByte(' '); | ||
| 2444 | try w.writeAll(name); | ||
| 2445 | try ty.printEpilogue(mapper, langopts, w); | ||
| 2446 | } | ||
| 2447 | |||
| 2448 | const StringGetter = fn (TokenIndex) []const u8; | ||
| 2449 | |||
| 2450 | /// return true if `ty` is simple | ||
| 2451 | fn printPrologue(ty: Type, mapper: StringInterner.TypeMapper, langopts: LangOpts, w: anytype) @TypeOf(w).Error!bool { | ||
| 2452 | if (ty.qual.atomic) { | ||
| 2453 | var non_atomic_ty = ty; | ||
| 2454 | non_atomic_ty.qual.atomic = false; | ||
| 2455 | try w.writeAll("_Atomic("); | ||
| 2456 | try non_atomic_ty.print(mapper, langopts, w); | ||
| 2457 | try w.writeAll(")"); | ||
| 2458 | return true; | ||
| 2459 | } | ||
| 2460 | switch (ty.specifier) { | ||
| 2461 | .pointer, | ||
| 2462 | .decayed_array, | ||
| 2463 | .decayed_static_array, | ||
| 2464 | .decayed_incomplete_array, | ||
| 2465 | .decayed_variable_len_array, | ||
| 2466 | .decayed_unspecified_variable_len_array, | ||
| 2467 | .decayed_typeof_type, | ||
| 2468 | .decayed_typeof_expr, | ||
| 2469 | => { | ||
| 2470 | const elem_ty = ty.elemType(); | ||
| 2471 | const simple = try elem_ty.printPrologue(mapper, langopts, w); | ||
| 2472 | if (simple) try w.writeByte(' '); | ||
| 2473 | if (elem_ty.isFunc() or elem_ty.isArray()) try w.writeByte('('); | ||
| 2474 | try w.writeByte('*'); | ||
| 2475 | try ty.qual.dump(w); | ||
| 2476 | return false; | ||
| 2477 | }, | ||
| 2478 | .func, .var_args_func, .old_style_func => { | ||
| 2479 | const ret_ty = ty.data.func.return_type; | ||
| 2480 | const simple = try ret_ty.printPrologue(mapper, langopts, w); | ||
| 2481 | if (simple) try w.writeByte(' '); | ||
| 2482 | return false; | ||
| 2483 | }, | ||
| 2484 | .array, .static_array, .incomplete_array, .unspecified_variable_len_array, .variable_len_array => { | ||
| 2485 | const elem_ty = ty.elemType(); | ||
| 2486 | const simple = try elem_ty.printPrologue(mapper, langopts, w); | ||
| 2487 | if (simple) try w.writeByte(' '); | ||
| 2488 | return false; | ||
| 2489 | }, | ||
| 2490 | .typeof_type, .typeof_expr => { | ||
| 2491 | const actual = ty.canonicalize(.standard); | ||
| 2492 | return actual.printPrologue(mapper, langopts, w); | ||
| 2493 | }, | ||
| 2494 | .attributed => { | ||
| 2495 | const actual = ty.canonicalize(.standard); | ||
| 2496 | return actual.printPrologue(mapper, langopts, w); | ||
| 2497 | }, | ||
| 2498 | else => {}, | ||
| 2499 | } | ||
| 2500 | try ty.qual.dump(w); | ||
| 2501 | |||
| 2502 | switch (ty.specifier) { | ||
| 2503 | .@"enum" => if (ty.data.@"enum".fixed) { | ||
| 2504 | try w.print("enum {s}: ", .{mapper.lookup(ty.data.@"enum".name)}); | ||
| 2505 | try ty.data.@"enum".tag_ty.dump(mapper, langopts, w); | ||
| 2506 | } else { | ||
| 2507 | try w.print("enum {s}", .{mapper.lookup(ty.data.@"enum".name)}); | ||
| 2508 | }, | ||
| 2509 | .@"struct" => try w.print("struct {s}", .{mapper.lookup(ty.data.record.name)}), | ||
| 2510 | .@"union" => try w.print("union {s}", .{mapper.lookup(ty.data.record.name)}), | ||
| 2511 | .vector => { | ||
| 2512 | const len = ty.data.array.len; | ||
| 2513 | const elem_ty = ty.data.array.elem; | ||
| 2514 | try w.print("__attribute__((__vector_size__({d} * sizeof(", .{len}); | ||
| 2515 | _ = try elem_ty.printPrologue(mapper, langopts, w); | ||
| 2516 | try w.writeAll(")))) "); | ||
| 2517 | _ = try elem_ty.printPrologue(mapper, langopts, w); | ||
| 2518 | try w.print(" (vector of {d} '", .{len}); | ||
| 2519 | _ = try elem_ty.printPrologue(mapper, langopts, w); | ||
| 2520 | try w.writeAll("' values)"); | ||
| 2521 | }, | ||
| 2522 | else => try w.writeAll(Builder.fromType(ty).str(langopts).?), | ||
| 2523 | } | ||
| 2524 | return true; | ||
| 2525 | } | ||
| 2526 | |||
| 2527 | fn printEpilogue(ty: Type, mapper: StringInterner.TypeMapper, langopts: LangOpts, w: anytype) @TypeOf(w).Error!void { | ||
| 2528 | if (ty.qual.atomic) return; | ||
| 2529 | switch (ty.specifier) { | ||
| 2530 | .pointer, | ||
| 2531 | .decayed_array, | ||
| 2532 | .decayed_static_array, | ||
| 2533 | .decayed_incomplete_array, | ||
| 2534 | .decayed_variable_len_array, | ||
| 2535 | .decayed_unspecified_variable_len_array, | ||
| 2536 | .decayed_typeof_type, | ||
| 2537 | .decayed_typeof_expr, | ||
| 2538 | => { | ||
| 2539 | const elem_ty = ty.elemType(); | ||
| 2540 | if (elem_ty.isFunc() or elem_ty.isArray()) try w.writeByte(')'); | ||
| 2541 | try elem_ty.printEpilogue(mapper, langopts, w); | ||
| 2542 | }, | ||
| 2543 | .func, .var_args_func, .old_style_func => { | ||
| 2544 | try w.writeByte('('); | ||
| 2545 | for (ty.data.func.params, 0..) |param, i| { | ||
| 2546 | if (i != 0) try w.writeAll(", "); | ||
| 2547 | _ = try param.ty.printPrologue(mapper, langopts, w); | ||
| 2548 | try param.ty.printEpilogue(mapper, langopts, w); | ||
| 2549 | } | ||
| 2550 | if (ty.specifier != .func) { | ||
| 2551 | if (ty.data.func.params.len != 0) try w.writeAll(", "); | ||
| 2552 | try w.writeAll("..."); | ||
| 2553 | } else if (ty.data.func.params.len == 0) { | ||
| 2554 | try w.writeAll("void"); | ||
| 2555 | } | ||
| 2556 | try w.writeByte(')'); | ||
| 2557 | try ty.data.func.return_type.printEpilogue(mapper, langopts, w); | ||
| 2558 | }, | ||
| 2559 | .array, .static_array => { | ||
| 2560 | try w.writeByte('['); | ||
| 2561 | if (ty.specifier == .static_array) try w.writeAll("static "); | ||
| 2562 | try ty.qual.dump(w); | ||
| 2563 | try w.print("{d}]", .{ty.data.array.len}); | ||
| 2564 | try ty.data.array.elem.printEpilogue(mapper, langopts, w); | ||
| 2565 | }, | ||
| 2566 | .incomplete_array => { | ||
| 2567 | try w.writeByte('['); | ||
| 2568 | try ty.qual.dump(w); | ||
| 2569 | try w.writeByte(']'); | ||
| 2570 | try ty.data.array.elem.printEpilogue(mapper, langopts, w); | ||
| 2571 | }, | ||
| 2572 | .unspecified_variable_len_array => { | ||
| 2573 | try w.writeByte('['); | ||
| 2574 | try ty.qual.dump(w); | ||
| 2575 | try w.writeAll("*]"); | ||
| 2576 | try ty.data.sub_type.printEpilogue(mapper, langopts, w); | ||
| 2577 | }, | ||
| 2578 | .variable_len_array => { | ||
| 2579 | try w.writeByte('['); | ||
| 2580 | try ty.qual.dump(w); | ||
| 2581 | try w.writeAll("<expr>]"); | ||
| 2582 | try ty.data.expr.ty.printEpilogue(mapper, langopts, w); | ||
| 2583 | }, | ||
| 2584 | .typeof_type, .typeof_expr => { | ||
| 2585 | const actual = ty.canonicalize(.standard); | ||
| 2586 | try actual.printEpilogue(mapper, langopts, w); | ||
| 2587 | }, | ||
| 2588 | .attributed => { | ||
| 2589 | const actual = ty.canonicalize(.standard); | ||
| 2590 | try actual.printEpilogue(mapper, langopts, w); | ||
| 2591 | }, | ||
| 2592 | else => {}, | ||
| 2593 | } | ||
| 2594 | } | ||
| 2595 | |||
| 2596 | /// Useful for debugging, too noisy to be enabled by default. | ||
| 2597 | const dump_detailed_containers = false; | ||
| 2598 | |||
| 2599 | // Print as Zig types since those are actually readable | ||
| 2600 | pub fn dump(ty: Type, mapper: StringInterner.TypeMapper, langopts: LangOpts, w: anytype) @TypeOf(w).Error!void { | ||
| 2601 | try ty.qual.dump(w); | ||
| 2602 | switch (ty.specifier) { | ||
| 2603 | .invalid => try w.writeAll("invalid"), | ||
| 2604 | .pointer => { | ||
| 2605 | try w.writeAll("*"); | ||
| 2606 | try ty.data.sub_type.dump(mapper, langopts, w); | ||
| 2607 | }, | ||
| 2608 | .func, .var_args_func, .old_style_func => { | ||
| 2609 | try w.writeAll("fn ("); | ||
| 2610 | for (ty.data.func.params, 0..) |param, i| { | ||
| 2611 | if (i != 0) try w.writeAll(", "); | ||
| 2612 | if (param.name != .empty) try w.print("{s}: ", .{mapper.lookup(param.name)}); | ||
| 2613 | try param.ty.dump(mapper, langopts, w); | ||
| 2614 | } | ||
| 2615 | if (ty.specifier != .func) { | ||
| 2616 | if (ty.data.func.params.len != 0) try w.writeAll(", "); | ||
| 2617 | try w.writeAll("..."); | ||
| 2618 | } | ||
| 2619 | try w.writeAll(") "); | ||
| 2620 | try ty.data.func.return_type.dump(mapper, langopts, w); | ||
| 2621 | }, | ||
| 2622 | .array, .static_array, .decayed_array, .decayed_static_array => { | ||
| 2623 | if (ty.specifier == .decayed_array or ty.specifier == .decayed_static_array) try w.writeByte('d'); | ||
| 2624 | try w.writeByte('['); | ||
| 2625 | if (ty.specifier == .static_array or ty.specifier == .decayed_static_array) try w.writeAll("static "); | ||
| 2626 | try w.print("{d}]", .{ty.data.array.len}); | ||
| 2627 | try ty.data.array.elem.dump(mapper, langopts, w); | ||
| 2628 | }, | ||
| 2629 | .vector => { | ||
| 2630 | try w.print("vector({d}, ", .{ty.data.array.len}); | ||
| 2631 | try ty.data.array.elem.dump(mapper, langopts, w); | ||
| 2632 | try w.writeAll(")"); | ||
| 2633 | }, | ||
| 2634 | .incomplete_array, .decayed_incomplete_array => { | ||
| 2635 | if (ty.specifier == .decayed_incomplete_array) try w.writeByte('d'); | ||
| 2636 | try w.writeAll("[]"); | ||
| 2637 | try ty.data.array.elem.dump(mapper, langopts, w); | ||
| 2638 | }, | ||
| 2639 | .@"enum" => { | ||
| 2640 | const enum_ty = ty.data.@"enum"; | ||
| 2641 | if (enum_ty.isIncomplete() and !enum_ty.fixed) { | ||
| 2642 | try w.print("enum {s}", .{mapper.lookup(enum_ty.name)}); | ||
| 2643 | } else { | ||
| 2644 | try w.print("enum {s}: ", .{mapper.lookup(enum_ty.name)}); | ||
| 2645 | try enum_ty.tag_ty.dump(mapper, langopts, w); | ||
| 2646 | } | ||
| 2647 | if (dump_detailed_containers) try dumpEnum(enum_ty, mapper, w); | ||
| 2648 | }, | ||
| 2649 | .@"struct" => { | ||
| 2650 | try w.print("struct {s}", .{mapper.lookup(ty.data.record.name)}); | ||
| 2651 | if (dump_detailed_containers) try dumpRecord(ty.data.record, mapper, langopts, w); | ||
| 2652 | }, | ||
| 2653 | .@"union" => { | ||
| 2654 | try w.print("union {s}", .{mapper.lookup(ty.data.record.name)}); | ||
| 2655 | if (dump_detailed_containers) try dumpRecord(ty.data.record, mapper, langopts, w); | ||
| 2656 | }, | ||
| 2657 | .unspecified_variable_len_array, .decayed_unspecified_variable_len_array => { | ||
| 2658 | if (ty.specifier == .decayed_unspecified_variable_len_array) try w.writeByte('d'); | ||
| 2659 | try w.writeAll("[*]"); | ||
| 2660 | try ty.data.sub_type.dump(mapper, langopts, w); | ||
| 2661 | }, | ||
| 2662 | .variable_len_array, .decayed_variable_len_array => { | ||
| 2663 | if (ty.specifier == .decayed_variable_len_array) try w.writeByte('d'); | ||
| 2664 | try w.writeAll("[<expr>]"); | ||
| 2665 | try ty.data.expr.ty.dump(mapper, langopts, w); | ||
| 2666 | }, | ||
| 2667 | .typeof_type, .decayed_typeof_type => { | ||
| 2668 | try w.writeAll("typeof("); | ||
| 2669 | try ty.data.sub_type.dump(mapper, langopts, w); | ||
| 2670 | try w.writeAll(")"); | ||
| 2671 | }, | ||
| 2672 | .typeof_expr, .decayed_typeof_expr => { | ||
| 2673 | try w.writeAll("typeof(<expr>: "); | ||
| 2674 | try ty.data.expr.ty.dump(mapper, langopts, w); | ||
| 2675 | try w.writeAll(")"); | ||
| 2676 | }, | ||
| 2677 | .attributed => { | ||
| 2678 | try w.writeAll("attributed("); | ||
| 2679 | try ty.data.attributed.base.dump(mapper, langopts, w); | ||
| 2680 | try w.writeAll(")"); | ||
| 2681 | }, | ||
| 2682 | else => { | ||
| 2683 | try w.writeAll(Builder.fromType(ty).str(langopts).?); | ||
| 2684 | if (ty.specifier == .bit_int or ty.specifier == .complex_bit_int) { | ||
| 2685 | try w.print("({d})", .{ty.data.int.bits}); | ||
| 2686 | } | ||
| 2687 | }, | ||
| 2688 | } | ||
| 2689 | } | ||
| 2690 | |||
| 2691 | fn dumpEnum(@"enum": *Enum, mapper: StringInterner.TypeMapper, w: anytype) @TypeOf(w).Error!void { | ||
| 2692 | try w.writeAll(" {"); | ||
| 2693 | for (@"enum".fields) |field| { | ||
| 2694 | try w.print(" {s} = {d},", .{ mapper.lookup(field.name), field.value }); | ||
| 2695 | } | ||
| 2696 | try w.writeAll(" }"); | ||
| 2697 | } | ||
| 2698 | |||
| 2699 | fn dumpRecord(record: *Record, mapper: StringInterner.TypeMapper, langopts: LangOpts, w: anytype) @TypeOf(w).Error!void { | ||
| 2700 | try w.writeAll(" {"); | ||
| 2701 | for (record.fields) |field| { | ||
| 2702 | try w.writeByte(' '); | ||
| 2703 | try field.ty.dump(mapper, langopts, w); | ||
| 2704 | try w.print(" {s}: {d};", .{ mapper.lookup(field.name), field.bit_width }); | ||
| 2705 | } | ||
| 2706 | try w.writeAll(" }"); | ||
| 2707 | } | ||
deps/aro/Value.zig deleted-633| ... | @@ -1,633 +0,0 @@ | ||
| 1 | const std = @import("std"); | ||
| 2 | const assert = std.debug.assert; | ||
| 3 | const Compilation = @import("Compilation.zig"); | ||
| 4 | const Type = @import("Type.zig"); | ||
| 5 | |||
| 6 | const Value = @This(); | ||
| 7 | |||
| 8 | pub const ByteRange = struct { | ||
| 9 | start: u32, | ||
| 10 | end: u32, | ||
| 11 | |||
| 12 | pub fn len(self: ByteRange) u32 { | ||
| 13 | return self.end - self.start; | ||
| 14 | } | ||
| 15 | |||
| 16 | pub fn trim(self: ByteRange, amount: u32) ByteRange { | ||
| 17 | std.debug.assert(self.start <= self.end - amount); | ||
| 18 | return .{ .start = self.start, .end = self.end - amount }; | ||
| 19 | } | ||
| 20 | |||
| 21 | pub fn slice(self: ByteRange, all_bytes: []const u8, comptime size: Compilation.CharUnitSize) []const size.Type() { | ||
| 22 | switch (size) { | ||
| 23 | inline else => |sz| { | ||
| 24 | const aligned: []align(@alignOf(sz.Type())) const u8 = @alignCast(all_bytes[self.start..self.end]); | ||
| 25 | return std.mem.bytesAsSlice(sz.Type(), aligned); | ||
| 26 | }, | ||
| 27 | } | ||
| 28 | } | ||
| 29 | |||
| 30 | pub fn dumpString(range: ByteRange, ty: Type, comp: *const Compilation, strings: []const u8, w: anytype) !void { | ||
| 31 | const size: Compilation.CharUnitSize = @enumFromInt(ty.elemType().sizeof(comp).?); | ||
| 32 | const without_null = range.trim(@intFromEnum(size)); | ||
| 33 | switch (size) { | ||
| 34 | inline .@"1", .@"2" => |sz| { | ||
| 35 | const data_slice = without_null.slice(strings, sz); | ||
| 36 | const formatter = if (sz == .@"1") std.zig.fmtEscapes(data_slice) else std.unicode.fmtUtf16le(data_slice); | ||
| 37 | try w.print("\"{}\"", .{formatter}); | ||
| 38 | }, | ||
| 39 | .@"4" => { | ||
| 40 | try w.writeByte('"'); | ||
| 41 | const data_slice = without_null.slice(strings, .@"4"); | ||
| 42 | var buf: [4]u8 = undefined; | ||
| 43 | for (data_slice) |item| { | ||
| 44 | if (item <= std.math.maxInt(u21) and std.unicode.utf8ValidCodepoint(@intCast(item))) { | ||
| 45 | const codepoint: u21 = @intCast(item); | ||
| 46 | const written = std.unicode.utf8Encode(codepoint, &buf) catch unreachable; | ||
| 47 | try w.print("{s}", .{buf[0..written]}); | ||
| 48 | } else { | ||
| 49 | try w.print("\\x{x}", .{item}); | ||
| 50 | } | ||
| 51 | } | ||
| 52 | try w.writeByte('"'); | ||
| 53 | }, | ||
| 54 | } | ||
| 55 | } | ||
| 56 | }; | ||
| 57 | |||
| 58 | tag: Tag = .unavailable, | ||
| 59 | data: union { | ||
| 60 | none: void, | ||
| 61 | int: u64, | ||
| 62 | float: f64, | ||
| 63 | bytes: ByteRange, | ||
| 64 | } = .{ .none = {} }, | ||
| 65 | |||
| 66 | const Tag = enum { | ||
| 67 | unavailable, | ||
| 68 | nullptr_t, | ||
| 69 | /// int is used to store integer, boolean and pointer values | ||
| 70 | int, | ||
| 71 | float, | ||
| 72 | bytes, | ||
| 73 | }; | ||
| 74 | |||
| 75 | pub fn zero(v: Value) Value { | ||
| 76 | return switch (v.tag) { | ||
| 77 | .int => int(0), | ||
| 78 | .float => float(0), | ||
| 79 | else => unreachable, | ||
| 80 | }; | ||
| 81 | } | ||
| 82 | |||
| 83 | pub fn one(v: Value) Value { | ||
| 84 | return switch (v.tag) { | ||
| 85 | .int => int(1), | ||
| 86 | .float => float(1), | ||
| 87 | else => unreachable, | ||
| 88 | }; | ||
| 89 | } | ||
| 90 | |||
| 91 | pub fn int(v: anytype) Value { | ||
| 92 | if (@TypeOf(v) == comptime_int or @typeInfo(@TypeOf(v)).Int.signedness == .unsigned) | ||
| 93 | return .{ .tag = .int, .data = .{ .int = v } } | ||
| 94 | else | ||
| 95 | return .{ .tag = .int, .data = .{ .int = @bitCast(@as(i64, v)) } }; | ||
| 96 | } | ||
| 97 | |||
| 98 | pub fn float(v: anytype) Value { | ||
| 99 | return .{ .tag = .float, .data = .{ .float = v } }; | ||
| 100 | } | ||
| 101 | |||
| 102 | pub fn bytes(start: u32, end: u32) Value { | ||
| 103 | return .{ .tag = .bytes, .data = .{ .bytes = .{ .start = start, .end = end } } }; | ||
| 104 | } | ||
| 105 | |||
| 106 | pub fn signExtend(v: Value, old_ty: Type, comp: *Compilation) i64 { | ||
| 107 | const size = old_ty.sizeof(comp).?; | ||
| 108 | return switch (size) { | ||
| 109 | 1 => v.getInt(i8), | ||
| 110 | 2 => v.getInt(i16), | ||
| 111 | 4 => v.getInt(i32), | ||
| 112 | 8 => v.getInt(i64), | ||
| 113 | else => unreachable, | ||
| 114 | }; | ||
| 115 | } | ||
| 116 | |||
| 117 | /// Number of bits needed to hold `v` which is of type `ty`. | ||
| 118 | /// Asserts that `v` is not negative | ||
| 119 | pub fn minUnsignedBits(v: Value, ty: Type, comp: *const Compilation) usize { | ||
| 120 | assert(v.compare(.gte, Value.int(0), ty, comp)); | ||
| 121 | return switch (ty.sizeof(comp).?) { | ||
| 122 | 1 => 8 - @clz(v.getInt(u8)), | ||
| 123 | 2 => 16 - @clz(v.getInt(u16)), | ||
| 124 | 4 => 32 - @clz(v.getInt(u32)), | ||
| 125 | 8 => 64 - @clz(v.getInt(u64)), | ||
| 126 | else => unreachable, | ||
| 127 | }; | ||
| 128 | } | ||
| 129 | |||
| 130 | test "minUnsignedBits" { | ||
| 131 | const Test = struct { | ||
| 132 | fn checkIntBits(comp: *const Compilation, specifier: Type.Specifier, v: u64, expected: usize) !void { | ||
| 133 | const val = Value.int(v); | ||
| 134 | try std.testing.expectEqual(expected, val.minUnsignedBits(.{ .specifier = specifier }, comp)); | ||
| 135 | } | ||
| 136 | }; | ||
| 137 | |||
| 138 | var comp = Compilation.init(std.testing.allocator); | ||
| 139 | defer comp.deinit(); | ||
| 140 | comp.target = (try std.zig.CrossTarget.parse(.{ .arch_os_abi = "x86_64-linux-gnu" })).toTarget(); | ||
| 141 | |||
| 142 | try Test.checkIntBits(&comp, .int, 0, 0); | ||
| 143 | try Test.checkIntBits(&comp, .int, 1, 1); | ||
| 144 | try Test.checkIntBits(&comp, .int, 2, 2); | ||
| 145 | try Test.checkIntBits(&comp, .int, std.math.maxInt(i8), 7); | ||
| 146 | try Test.checkIntBits(&comp, .int, std.math.maxInt(u8), 8); | ||
| 147 | try Test.checkIntBits(&comp, .int, std.math.maxInt(i16), 15); | ||
| 148 | try Test.checkIntBits(&comp, .int, std.math.maxInt(u16), 16); | ||
| 149 | try Test.checkIntBits(&comp, .int, std.math.maxInt(i32), 31); | ||
| 150 | try Test.checkIntBits(&comp, .uint, std.math.maxInt(u32), 32); | ||
| 151 | try Test.checkIntBits(&comp, .long, std.math.maxInt(i64), 63); | ||
| 152 | try Test.checkIntBits(&comp, .ulong, std.math.maxInt(u64), 64); | ||
| 153 | try Test.checkIntBits(&comp, .long_long, std.math.maxInt(i64), 63); | ||
| 154 | try Test.checkIntBits(&comp, .ulong_long, std.math.maxInt(u64), 64); | ||
| 155 | } | ||
| 156 | |||
| 157 | /// Minimum number of bits needed to represent `v` in 2's complement notation | ||
| 158 | /// Asserts that `v` is negative. | ||
| 159 | pub fn minSignedBits(v: Value, ty: Type, comp: *const Compilation) usize { | ||
| 160 | assert(v.compare(.lt, Value.int(0), ty, comp)); | ||
| 161 | return switch (ty.sizeof(comp).?) { | ||
| 162 | 1 => 8 - @clz(~v.getInt(u8)) + 1, | ||
| 163 | 2 => 16 - @clz(~v.getInt(u16)) + 1, | ||
| 164 | 4 => 32 - @clz(~v.getInt(u32)) + 1, | ||
| 165 | 8 => 64 - @clz(~v.getInt(u64)) + 1, | ||
| 166 | else => unreachable, | ||
| 167 | }; | ||
| 168 | } | ||
| 169 | |||
| 170 | test "minSignedBits" { | ||
| 171 | const Test = struct { | ||
| 172 | fn checkIntBits(comp: *const Compilation, specifier: Type.Specifier, v: i64, expected: usize) !void { | ||
| 173 | const val = Value.int(v); | ||
| 174 | try std.testing.expectEqual(expected, val.minSignedBits(.{ .specifier = specifier }, comp)); | ||
| 175 | } | ||
| 176 | }; | ||
| 177 | |||
| 178 | var comp = Compilation.init(std.testing.allocator); | ||
| 179 | defer comp.deinit(); | ||
| 180 | comp.target = (try std.zig.CrossTarget.parse(.{ .arch_os_abi = "x86_64-linux-gnu" })).toTarget(); | ||
| 181 | |||
| 182 | for ([_]Type.Specifier{ .int, .long, .long_long }) |specifier| { | ||
| 183 | try Test.checkIntBits(&comp, specifier, -1, 1); | ||
| 184 | try Test.checkIntBits(&comp, specifier, -2, 2); | ||
| 185 | try Test.checkIntBits(&comp, specifier, -10, 5); | ||
| 186 | try Test.checkIntBits(&comp, specifier, -101, 8); | ||
| 187 | |||
| 188 | try Test.checkIntBits(&comp, specifier, std.math.minInt(i8), 8); | ||
| 189 | try Test.checkIntBits(&comp, specifier, std.math.minInt(i16), 16); | ||
| 190 | try Test.checkIntBits(&comp, specifier, std.math.minInt(i32), 32); | ||
| 191 | } | ||
| 192 | |||
| 193 | try Test.checkIntBits(&comp, .long, std.math.minInt(i64), 64); | ||
| 194 | try Test.checkIntBits(&comp, .long_long, std.math.minInt(i64), 64); | ||
| 195 | } | ||
| 196 | |||
| 197 | pub const FloatToIntChangeKind = enum { | ||
| 198 | /// value did not change | ||
| 199 | none, | ||
| 200 | /// floating point number too small or large for destination integer type | ||
| 201 | out_of_range, | ||
| 202 | /// tried to convert a NaN or Infinity | ||
| 203 | overflow, | ||
| 204 | /// fractional value was converted to zero | ||
| 205 | nonzero_to_zero, | ||
| 206 | /// fractional part truncated | ||
| 207 | value_changed, | ||
| 208 | }; | ||
| 209 | |||
| 210 | fn floatToIntExtra(comptime FloatTy: type, int_ty_signedness: std.builtin.Signedness, int_ty_size: u16, v: *Value) FloatToIntChangeKind { | ||
| 211 | const float_val = v.getFloat(FloatTy); | ||
| 212 | const was_zero = float_val == 0; | ||
| 213 | const had_fraction = std.math.modf(float_val).fpart != 0; | ||
| 214 | |||
| 215 | switch (int_ty_signedness) { | ||
| 216 | inline else => |signedness| switch (int_ty_size) { | ||
| 217 | inline 1, 2, 4, 8 => |bytecount| { | ||
| 218 | const IntTy = std.meta.Int(signedness, bytecount * 8); | ||
| 219 | |||
| 220 | const intVal = std.math.lossyCast(IntTy, float_val); | ||
| 221 | v.* = int(intVal); | ||
| 222 | if (!was_zero and v.isZero()) return .nonzero_to_zero; | ||
| 223 | if (float_val <= std.math.minInt(IntTy) or float_val >= std.math.maxInt(IntTy)) return .out_of_range; | ||
| 224 | if (had_fraction) return .value_changed; | ||
| 225 | return .none; | ||
| 226 | }, | ||
| 227 | else => unreachable, | ||
| 228 | }, | ||
| 229 | } | ||
| 230 | } | ||
| 231 | |||
| 232 | /// Converts the stored value from a float to an integer. | ||
| 233 | /// `.unavailable` value remains unchanged. | ||
| 234 | pub fn floatToInt(v: *Value, old_ty: Type, new_ty: Type, comp: *Compilation) FloatToIntChangeKind { | ||
| 235 | assert(old_ty.isFloat()); | ||
| 236 | if (v.tag == .unavailable) return .none; | ||
| 237 | if (new_ty.is(.bool)) { | ||
| 238 | const was_zero = v.isZero(); | ||
| 239 | const was_one = v.getFloat(f64) == 1.0; | ||
| 240 | v.toBool(); | ||
| 241 | if (was_zero or was_one) return .none; | ||
| 242 | return .value_changed; | ||
| 243 | } else if (new_ty.isUnsignedInt(comp) and v.data.float < 0) { | ||
| 244 | v.* = int(0); | ||
| 245 | return .out_of_range; | ||
| 246 | } else if (!std.math.isFinite(v.data.float)) { | ||
| 247 | v.tag = .unavailable; | ||
| 248 | return .overflow; | ||
| 249 | } | ||
| 250 | const old_size = old_ty.sizeof(comp).?; | ||
| 251 | const new_size: u16 = @intCast(new_ty.sizeof(comp).?); | ||
| 252 | if (new_ty.isUnsignedInt(comp)) switch (old_size) { | ||
| 253 | 1 => unreachable, // promoted to int | ||
| 254 | 2 => unreachable, // promoted to int | ||
| 255 | 4 => return floatToIntExtra(f32, .unsigned, new_size, v), | ||
| 256 | 8 => return floatToIntExtra(f64, .unsigned, new_size, v), | ||
| 257 | else => unreachable, | ||
| 258 | } else switch (old_size) { | ||
| 259 | 1 => unreachable, // promoted to int | ||
| 260 | 2 => unreachable, // promoted to int | ||
| 261 | 4 => return floatToIntExtra(f32, .signed, new_size, v), | ||
| 262 | 8 => return floatToIntExtra(f64, .signed, new_size, v), | ||
| 263 | else => unreachable, | ||
| 264 | } | ||
| 265 | } | ||
| 266 | |||
| 267 | /// Converts the stored value from an integer to a float. | ||
| 268 | /// `.unavailable` value remains unchanged. | ||
| 269 | pub fn intToFloat(v: *Value, old_ty: Type, new_ty: Type, comp: *Compilation) void { | ||
| 270 | assert(old_ty.isInt()); | ||
| 271 | if (v.tag == .unavailable) return; | ||
| 272 | if (!new_ty.isReal() or new_ty.sizeof(comp).? > 8) { | ||
| 273 | v.tag = .unavailable; | ||
| 274 | } else if (old_ty.isUnsignedInt(comp)) { | ||
| 275 | v.* = float(@as(f64, @floatFromInt(v.data.int))); | ||
| 276 | } else { | ||
| 277 | v.* = float(@as(f64, @floatFromInt(@as(i64, @bitCast(v.data.int))))); | ||
| 278 | } | ||
| 279 | } | ||
| 280 | |||
| 281 | /// Truncates or extends bits based on type. | ||
| 282 | /// old_ty is only used for size. | ||
| 283 | pub fn intCast(v: *Value, old_ty: Type, new_ty: Type, comp: *Compilation) void { | ||
| 284 | // assert(old_ty.isInt() and new_ty.isInt()); | ||
| 285 | if (v.tag == .unavailable) return; | ||
| 286 | if (new_ty.is(.bool)) return v.toBool(); | ||
| 287 | if (!old_ty.isUnsignedInt(comp)) { | ||
| 288 | const size = new_ty.sizeof(comp).?; | ||
| 289 | switch (size) { | ||
| 290 | 1 => v.* = int(@as(u8, @truncate(@as(u64, @bitCast(v.signExtend(old_ty, comp)))))), | ||
| 291 | 2 => v.* = int(@as(u16, @truncate(@as(u64, @bitCast(v.signExtend(old_ty, comp)))))), | ||
| 292 | 4 => v.* = int(@as(u32, @truncate(@as(u64, @bitCast(v.signExtend(old_ty, comp)))))), | ||
| 293 | 8 => return, | ||
| 294 | else => unreachable, | ||
| 295 | } | ||
| 296 | } | ||
| 297 | } | ||
| 298 | |||
| 299 | /// Converts the stored value from an integer to a float. | ||
| 300 | /// `.unavailable` value remains unchanged. | ||
| 301 | pub fn floatCast(v: *Value, old_ty: Type, new_ty: Type, comp: *Compilation) void { | ||
| 302 | assert(old_ty.isFloat() and new_ty.isFloat()); | ||
| 303 | if (v.tag == .unavailable) return; | ||
| 304 | const size = new_ty.sizeof(comp).?; | ||
| 305 | if (!new_ty.isReal() or size > 8) { | ||
| 306 | v.tag = .unavailable; | ||
| 307 | } else if (size == 32) { | ||
| 308 | v.* = float(@as(f32, @floatCast(v.data.float))); | ||
| 309 | } | ||
| 310 | } | ||
| 311 | |||
| 312 | /// Truncates data.int to one bit | ||
| 313 | pub fn toBool(v: *Value) void { | ||
| 314 | if (v.tag == .unavailable) return; | ||
| 315 | const res = v.getBool(); | ||
| 316 | v.* = int(@intFromBool(res)); | ||
| 317 | } | ||
| 318 | |||
| 319 | pub fn isZero(v: Value) bool { | ||
| 320 | return switch (v.tag) { | ||
| 321 | .unavailable => false, | ||
| 322 | .nullptr_t => false, | ||
| 323 | .int => v.data.int == 0, | ||
| 324 | .float => v.data.float == 0, | ||
| 325 | .bytes => false, | ||
| 326 | }; | ||
| 327 | } | ||
| 328 | |||
| 329 | pub fn getBool(v: Value) bool { | ||
| 330 | return switch (v.tag) { | ||
| 331 | .unavailable => unreachable, | ||
| 332 | .nullptr_t => false, | ||
| 333 | .int => v.data.int != 0, | ||
| 334 | .float => v.data.float != 0, | ||
| 335 | .bytes => true, | ||
| 336 | }; | ||
| 337 | } | ||
| 338 | |||
| 339 | pub fn getInt(v: Value, comptime T: type) T { | ||
| 340 | if (T == u64) return v.data.int; | ||
| 341 | return if (@typeInfo(T).Int.signedness == .unsigned) | ||
| 342 | @truncate(v.data.int) | ||
| 343 | else | ||
| 344 | @truncate(@as(i64, @bitCast(v.data.int))); | ||
| 345 | } | ||
| 346 | |||
| 347 | pub fn getFloat(v: Value, comptime T: type) T { | ||
| 348 | if (T == f64) return v.data.float; | ||
| 349 | return @floatCast(v.data.float); | ||
| 350 | } | ||
| 351 | |||
| 352 | const bin_overflow = struct { | ||
| 353 | inline fn addInt(comptime T: type, out: *Value, a: Value, b: Value) bool { | ||
| 354 | const a_val = a.getInt(T); | ||
| 355 | const b_val = b.getInt(T); | ||
| 356 | const sum, const overflowed = @addWithOverflow(a_val, b_val); | ||
| 357 | out.* = int(sum); | ||
| 358 | return overflowed != 0; | ||
| 359 | } | ||
| 360 | inline fn addFloat(comptime T: type, aa: Value, bb: Value) Value { | ||
| 361 | const a_val = aa.getFloat(T); | ||
| 362 | const b_val = bb.getFloat(T); | ||
| 363 | return float(a_val + b_val); | ||
| 364 | } | ||
| 365 | |||
| 366 | inline fn subInt(comptime T: type, out: *Value, a: Value, b: Value) bool { | ||
| 367 | const a_val = a.getInt(T); | ||
| 368 | const b_val = b.getInt(T); | ||
| 369 | const difference, const overflowed = @subWithOverflow(a_val, b_val); | ||
| 370 | out.* = int(difference); | ||
| 371 | return overflowed != 0; | ||
| 372 | } | ||
| 373 | inline fn subFloat(comptime T: type, aa: Value, bb: Value) Value { | ||
| 374 | const a_val = aa.getFloat(T); | ||
| 375 | const b_val = bb.getFloat(T); | ||
| 376 | return float(a_val - b_val); | ||
| 377 | } | ||
| 378 | |||
| 379 | inline fn mulInt(comptime T: type, out: *Value, a: Value, b: Value) bool { | ||
| 380 | const a_val = a.getInt(T); | ||
| 381 | const b_val = b.getInt(T); | ||
| 382 | const product, const overflowed = @mulWithOverflow(a_val, b_val); | ||
| 383 | out.* = int(product); | ||
| 384 | return overflowed != 0; | ||
| 385 | } | ||
| 386 | inline fn mulFloat(comptime T: type, aa: Value, bb: Value) Value { | ||
| 387 | const a_val = aa.getFloat(T); | ||
| 388 | const b_val = bb.getFloat(T); | ||
| 389 | return float(a_val * b_val); | ||
| 390 | } | ||
| 391 | |||
| 392 | const FT = fn (*Value, Value, Value, Type, *Compilation) bool; | ||
| 393 | fn getOp(comptime intFunc: anytype, comptime floatFunc: anytype) FT { | ||
| 394 | return struct { | ||
| 395 | fn op(res: *Value, a: Value, b: Value, ty: Type, comp: *Compilation) bool { | ||
| 396 | const size = ty.sizeof(comp).?; | ||
| 397 | if (@TypeOf(floatFunc) != @TypeOf(null) and ty.isFloat()) { | ||
| 398 | res.* = switch (size) { | ||
| 399 | 4 => floatFunc(f32, a, b), | ||
| 400 | 8 => floatFunc(f64, a, b), | ||
| 401 | else => unreachable, | ||
| 402 | }; | ||
| 403 | return false; | ||
| 404 | } | ||
| 405 | |||
| 406 | if (ty.isUnsignedInt(comp)) switch (size) { | ||
| 407 | 1 => return intFunc(u8, res, a, b), | ||
| 408 | 2 => return intFunc(u16, res, a, b), | ||
| 409 | 4 => return intFunc(u32, res, a, b), | ||
| 410 | 8 => return intFunc(u64, res, a, b), | ||
| 411 | else => unreachable, | ||
| 412 | } else switch (size) { | ||
| 413 | 1 => return intFunc(u8, res, a, b), | ||
| 414 | 2 => return intFunc(u16, res, a, b), | ||
| 415 | 4 => return intFunc(i32, res, a, b), | ||
| 416 | 8 => return intFunc(i64, res, a, b), | ||
| 417 | else => unreachable, | ||
| 418 | } | ||
| 419 | } | ||
| 420 | }.op; | ||
| 421 | } | ||
| 422 | }; | ||
| 423 | |||
| 424 | pub const add = bin_overflow.getOp(bin_overflow.addInt, bin_overflow.addFloat); | ||
| 425 | pub const sub = bin_overflow.getOp(bin_overflow.subInt, bin_overflow.subFloat); | ||
| 426 | pub const mul = bin_overflow.getOp(bin_overflow.mulInt, bin_overflow.mulFloat); | ||
| 427 | |||
| 428 | const bin_ops = struct { | ||
| 429 | inline fn divInt(comptime T: type, aa: Value, bb: Value) Value { | ||
| 430 | const a_val = aa.getInt(T); | ||
| 431 | const b_val = bb.getInt(T); | ||
| 432 | return int(@divTrunc(a_val, b_val)); | ||
| 433 | } | ||
| 434 | inline fn divFloat(comptime T: type, aa: Value, bb: Value) Value { | ||
| 435 | const a_val = aa.getFloat(T); | ||
| 436 | const b_val = bb.getFloat(T); | ||
| 437 | return float(a_val / b_val); | ||
| 438 | } | ||
| 439 | |||
| 440 | inline fn remInt(comptime T: type, a: Value, b: Value) Value { | ||
| 441 | const a_val = a.getInt(T); | ||
| 442 | const b_val = b.getInt(T); | ||
| 443 | |||
| 444 | if (@typeInfo(T).Int.signedness == .signed) { | ||
| 445 | if (a_val == std.math.minInt(T) and b_val == -1) { | ||
| 446 | return Value{ .tag = .unavailable, .data = .{ .none = {} } }; | ||
| 447 | } else { | ||
| 448 | if (b_val > 0) return int(@rem(a_val, b_val)); | ||
| 449 | return int(a_val - @divTrunc(a_val, b_val) * b_val); | ||
| 450 | } | ||
| 451 | } else { | ||
| 452 | return int(a_val % b_val); | ||
| 453 | } | ||
| 454 | } | ||
| 455 | |||
| 456 | inline fn orInt(comptime T: type, a: Value, b: Value) Value { | ||
| 457 | const a_val = a.getInt(T); | ||
| 458 | const b_val = b.getInt(T); | ||
| 459 | return int(a_val | b_val); | ||
| 460 | } | ||
| 461 | inline fn xorInt(comptime T: type, a: Value, b: Value) Value { | ||
| 462 | const a_val = a.getInt(T); | ||
| 463 | const b_val = b.getInt(T); | ||
| 464 | return int(a_val ^ b_val); | ||
| 465 | } | ||
| 466 | inline fn andInt(comptime T: type, a: Value, b: Value) Value { | ||
| 467 | const a_val = a.getInt(T); | ||
| 468 | const b_val = b.getInt(T); | ||
| 469 | return int(a_val & b_val); | ||
| 470 | } | ||
| 471 | |||
| 472 | inline fn shl(comptime T: type, a: Value, b: Value) Value { | ||
| 473 | const ShiftT = std.math.Log2Int(T); | ||
| 474 | const info = @typeInfo(T).Int; | ||
| 475 | const UT = std.meta.Int(.unsigned, info.bits); | ||
| 476 | const b_val = b.getInt(T); | ||
| 477 | |||
| 478 | if (b_val > std.math.maxInt(ShiftT)) { | ||
| 479 | return if (info.signedness == .unsigned) | ||
| 480 | int(@as(UT, std.math.maxInt(UT))) | ||
| 481 | else | ||
| 482 | int(@as(T, std.math.minInt(T))); | ||
| 483 | } | ||
| 484 | const amt: ShiftT = @truncate(@as(UT, @bitCast(b_val))); | ||
| 485 | const a_val = a.getInt(T); | ||
| 486 | return int(a_val << amt); | ||
| 487 | } | ||
| 488 | inline fn shr(comptime T: type, a: Value, b: Value) Value { | ||
| 489 | const ShiftT = std.math.Log2Int(T); | ||
| 490 | const UT = std.meta.Int(.unsigned, @typeInfo(T).Int.bits); | ||
| 491 | |||
| 492 | const b_val = b.getInt(T); | ||
| 493 | if (b_val > std.math.maxInt(ShiftT)) return Value.int(0); | ||
| 494 | |||
| 495 | const amt: ShiftT = @truncate(@as(UT, @intCast(b_val))); | ||
| 496 | const a_val = a.getInt(T); | ||
| 497 | return int(a_val >> amt); | ||
| 498 | } | ||
| 499 | |||
| 500 | const FT = fn (Value, Value, Type, *Compilation) Value; | ||
| 501 | fn getOp(comptime intFunc: anytype, comptime floatFunc: anytype) FT { | ||
| 502 | return struct { | ||
| 503 | fn op(a: Value, b: Value, ty: Type, comp: *Compilation) Value { | ||
| 504 | const size = ty.sizeof(comp).?; | ||
| 505 | if (@TypeOf(floatFunc) != @TypeOf(null) and ty.isFloat()) { | ||
| 506 | switch (size) { | ||
| 507 | 4 => return floatFunc(f32, a, b), | ||
| 508 | 8 => return floatFunc(f64, a, b), | ||
| 509 | else => unreachable, | ||
| 510 | } | ||
| 511 | } | ||
| 512 | |||
| 513 | if (ty.isUnsignedInt(comp)) switch (size) { | ||
| 514 | 1 => unreachable, // promoted to int | ||
| 515 | 2 => unreachable, // promoted to int | ||
| 516 | 4 => return intFunc(u32, a, b), | ||
| 517 | 8 => return intFunc(u64, a, b), | ||
| 518 | else => unreachable, | ||
| 519 | } else switch (size) { | ||
| 520 | 1 => unreachable, // promoted to int | ||
| 521 | 2 => unreachable, // promoted to int | ||
| 522 | 4 => return intFunc(i32, a, b), | ||
| 523 | 8 => return intFunc(i64, a, b), | ||
| 524 | else => unreachable, | ||
| 525 | } | ||
| 526 | } | ||
| 527 | }.op; | ||
| 528 | } | ||
| 529 | }; | ||
| 530 | |||
| 531 | /// caller guarantees rhs != 0 | ||
| 532 | pub const div = bin_ops.getOp(bin_ops.divInt, bin_ops.divFloat); | ||
| 533 | /// caller guarantees rhs != 0 | ||
| 534 | /// caller guarantees lhs != std.math.minInt(T) OR rhs != -1 | ||
| 535 | pub const rem = bin_ops.getOp(bin_ops.remInt, null); | ||
| 536 | |||
| 537 | pub const bitOr = bin_ops.getOp(bin_ops.orInt, null); | ||
| 538 | pub const bitXor = bin_ops.getOp(bin_ops.xorInt, null); | ||
| 539 | pub const bitAnd = bin_ops.getOp(bin_ops.andInt, null); | ||
| 540 | |||
| 541 | pub const shl = bin_ops.getOp(bin_ops.shl, null); | ||
| 542 | pub const shr = bin_ops.getOp(bin_ops.shr, null); | ||
| 543 | |||
| 544 | pub fn bitNot(v: Value, ty: Type, comp: *Compilation) Value { | ||
| 545 | const size = ty.sizeof(comp).?; | ||
| 546 | var out: Value = undefined; | ||
| 547 | if (ty.isUnsignedInt(comp)) switch (size) { | ||
| 548 | 1 => unreachable, // promoted to int | ||
| 549 | 2 => unreachable, // promoted to int | ||
| 550 | 4 => out = int(~v.getInt(u32)), | ||
| 551 | 8 => out = int(~v.getInt(u64)), | ||
| 552 | else => unreachable, | ||
| 553 | } else switch (size) { | ||
| 554 | 1 => unreachable, // promoted to int | ||
| 555 | 2 => unreachable, // promoted to int | ||
| 556 | 4 => out = int(~v.getInt(i32)), | ||
| 557 | 8 => out = int(~v.getInt(i64)), | ||
| 558 | else => unreachable, | ||
| 559 | } | ||
| 560 | return out; | ||
| 561 | } | ||
| 562 | |||
| 563 | pub fn compare(a: Value, op: std.math.CompareOperator, b: Value, ty: Type, comp: *const Compilation) bool { | ||
| 564 | assert(a.tag == b.tag); | ||
| 565 | if (a.tag == .nullptr_t) { | ||
| 566 | return switch (op) { | ||
| 567 | .eq => true, | ||
| 568 | .neq => false, | ||
| 569 | else => unreachable, | ||
| 570 | }; | ||
| 571 | } | ||
| 572 | const S = struct { | ||
| 573 | inline fn doICompare(comptime T: type, aa: Value, opp: std.math.CompareOperator, bb: Value) bool { | ||
| 574 | const a_val = aa.getInt(T); | ||
| 575 | const b_val = bb.getInt(T); | ||
| 576 | return std.math.compare(a_val, opp, b_val); | ||
| 577 | } | ||
| 578 | inline fn doFCompare(comptime T: type, aa: Value, opp: std.math.CompareOperator, bb: Value) bool { | ||
| 579 | const a_val = aa.getFloat(T); | ||
| 580 | const b_val = bb.getFloat(T); | ||
| 581 | return std.math.compare(a_val, opp, b_val); | ||
| 582 | } | ||
| 583 | }; | ||
| 584 | const size = ty.sizeof(comp).?; | ||
| 585 | switch (a.tag) { | ||
| 586 | .unavailable => return true, | ||
| 587 | .int => if (ty.isUnsignedInt(comp)) switch (size) { | ||
| 588 | 1 => return S.doICompare(u8, a, op, b), | ||
| 589 | 2 => return S.doICompare(u16, a, op, b), | ||
| 590 | 4 => return S.doICompare(u32, a, op, b), | ||
| 591 | 8 => return S.doICompare(u64, a, op, b), | ||
| 592 | else => unreachable, | ||
| 593 | } else switch (size) { | ||
| 594 | 1 => return S.doICompare(i8, a, op, b), | ||
| 595 | 2 => return S.doICompare(i16, a, op, b), | ||
| 596 | 4 => return S.doICompare(i32, a, op, b), | ||
| 597 | 8 => return S.doICompare(i64, a, op, b), | ||
| 598 | else => unreachable, | ||
| 599 | }, | ||
| 600 | .float => switch (size) { | ||
| 601 | 4 => return S.doFCompare(f32, a, op, b), | ||
| 602 | 8 => return S.doFCompare(f64, a, op, b), | ||
| 603 | else => unreachable, | ||
| 604 | }, | ||
| 605 | else => @panic("TODO"), | ||
| 606 | } | ||
| 607 | return false; | ||
| 608 | } | ||
| 609 | |||
| 610 | pub fn hash(v: Value) u64 { | ||
| 611 | switch (v.tag) { | ||
| 612 | .unavailable => unreachable, | ||
| 613 | .int => return std.hash.Wyhash.hash(0, std.mem.asBytes(&v.data.int)), | ||
| 614 | else => @panic("TODO"), | ||
| 615 | } | ||
| 616 | } | ||
| 617 | |||
| 618 | pub fn dump(v: Value, ty: Type, comp: *Compilation, strings: []const u8, w: anytype) !void { | ||
| 619 | switch (v.tag) { | ||
| 620 | .unavailable => try w.writeAll("unavailable"), | ||
| 621 | .int => if (ty.is(.bool) and comp.langopts.standard.atLeast(.c2x)) { | ||
| 622 | try w.print("{s}", .{if (v.isZero()) "false" else "true"}); | ||
| 623 | } else if (ty.isUnsignedInt(comp)) { | ||
| 624 | try w.print("{d}", .{v.data.int}); | ||
| 625 | } else { | ||
| 626 | try w.print("{d}", .{v.signExtend(ty, comp)}); | ||
| 627 | }, | ||
| 628 | .bytes => try v.data.bytes.dumpString(ty, comp, strings, w), | ||
| 629 | // std.fmt does @as instead of @floatCast | ||
| 630 | .float => try w.print("{d}", .{@as(f64, @floatCast(v.data.float))}), | ||
| 631 | else => try w.print("({s})", .{@tagName(v.tag)}), | ||
| 632 | } | ||
| 633 | } | ||
deps/aro/aro.zig created+38| ... | @@ -0,0 +1,38 @@ | ||
| 1 | pub const CodeGen = @import("aro/CodeGen.zig"); | ||
| 2 | pub const Compilation = @import("aro/Compilation.zig"); | ||
| 3 | pub const Diagnostics = @import("aro/Diagnostics.zig"); | ||
| 4 | pub const Driver = @import("aro/Driver.zig"); | ||
| 5 | pub const Parser = @import("aro/Parser.zig"); | ||
| 6 | pub const Preprocessor = @import("aro/Preprocessor.zig"); | ||
| 7 | pub const Source = @import("aro/Source.zig"); | ||
| 8 | pub const Tokenizer = @import("aro/Tokenizer.zig"); | ||
| 9 | pub const Toolchain = @import("aro/Toolchain.zig"); | ||
| 10 | pub const Tree = @import("aro/Tree.zig"); | ||
| 11 | pub const Type = @import("aro/Type.zig"); | ||
| 12 | pub const TypeMapper = @import("aro/StringInterner.zig").TypeMapper; | ||
| 13 | pub const target_util = @import("aro/target.zig"); | ||
| 14 | pub const Value = @import("aro/Value.zig"); | ||
| 15 | |||
| 16 | const backend = @import("backend"); | ||
| 17 | pub const Interner = backend.Interner; | ||
| 18 | pub const Ir = backend.Ir; | ||
| 19 | pub const Object = backend.Object; | ||
| 20 | pub const CallingConvention = backend.CallingConvention; | ||
| 21 | |||
| 22 | pub const version_str = backend.version_str; | ||
| 23 | pub const version = backend.version; | ||
| 24 | |||
| 25 | test { | ||
| 26 | _ = @import("aro/Builtins.zig"); | ||
| 27 | _ = @import("aro/char_info.zig"); | ||
| 28 | _ = @import("aro/Compilation.zig"); | ||
| 29 | _ = @import("aro/Driver/Distro.zig"); | ||
| 30 | _ = @import("aro/Driver/Filesystem.zig"); | ||
| 31 | _ = @import("aro/Driver/GCCVersion.zig"); | ||
| 32 | _ = @import("aro/InitList.zig"); | ||
| 33 | _ = @import("aro/Preprocessor.zig"); | ||
| 34 | _ = @import("aro/target.zig"); | ||
| 35 | _ = @import("aro/Tokenizer.zig"); | ||
| 36 | _ = @import("aro/toolchains/Linux.zig"); | ||
| 37 | _ = @import("aro/Value.zig"); | ||
| 38 | } | ||
deps/aro/aro/Attribute.zig created+1070| ... | @@ -0,0 +1,1070 @@ | ||
| 1 | const std = @import("std"); | ||
| 2 | const mem = std.mem; | ||
| 3 | const ZigType = std.builtin.Type; | ||
| 4 | const CallingConvention = @import("backend").CallingConvention; | ||
| 5 | const Compilation = @import("Compilation.zig"); | ||
| 6 | const Diagnostics = @import("Diagnostics.zig"); | ||
| 7 | const Parser = @import("Parser.zig"); | ||
| 8 | const Tree = @import("Tree.zig"); | ||
| 9 | const NodeIndex = Tree.NodeIndex; | ||
| 10 | const TokenIndex = Tree.TokenIndex; | ||
| 11 | const Type = @import("Type.zig"); | ||
| 12 | const Value = @import("Value.zig"); | ||
| 13 | |||
| 14 | const Attribute = @This(); | ||
| 15 | |||
| 16 | tag: Tag, | ||
| 17 | syntax: Syntax, | ||
| 18 | args: Arguments, | ||
| 19 | |||
| 20 | pub const Syntax = enum { | ||
| 21 | c23, | ||
| 22 | declspec, | ||
| 23 | gnu, | ||
| 24 | keyword, | ||
| 25 | }; | ||
| 26 | |||
| 27 | pub const Kind = enum { | ||
| 28 | c23, | ||
| 29 | declspec, | ||
| 30 | gnu, | ||
| 31 | |||
| 32 | pub fn toSyntax(kind: Kind) Syntax { | ||
| 33 | return switch (kind) { | ||
| 34 | .c23 => .c23, | ||
| 35 | .declspec => .declspec, | ||
| 36 | .gnu => .gnu, | ||
| 37 | }; | ||
| 38 | } | ||
| 39 | }; | ||
| 40 | |||
| 41 | pub const ArgumentType = enum { | ||
| 42 | string, | ||
| 43 | identifier, | ||
| 44 | int, | ||
| 45 | alignment, | ||
| 46 | float, | ||
| 47 | expression, | ||
| 48 | nullptr_t, | ||
| 49 | |||
| 50 | pub fn toString(self: ArgumentType) []const u8 { | ||
| 51 | return switch (self) { | ||
| 52 | .string => "a string", | ||
| 53 | .identifier => "an identifier", | ||
| 54 | .int, .alignment => "an integer constant", | ||
| 55 | .nullptr_t => "nullptr", | ||
| 56 | .float => "a floating point number", | ||
| 57 | .expression => "an expression", | ||
| 58 | }; | ||
| 59 | } | ||
| 60 | }; | ||
| 61 | |||
| 62 | /// number of required arguments | ||
| 63 | pub fn requiredArgCount(attr: Tag) u32 { | ||
| 64 | switch (attr) { | ||
| 65 | inline else => |tag| { | ||
| 66 | comptime var needed = 0; | ||
| 67 | comptime { | ||
| 68 | const fields = std.meta.fields(@field(attributes, @tagName(tag))); | ||
| 69 | for (fields) |arg_field| { | ||
| 70 | if (!mem.eql(u8, arg_field.name, "__name_tok") and @typeInfo(arg_field.type) != .Optional) needed += 1; | ||
| 71 | } | ||
| 72 | } | ||
| 73 | return needed; | ||
| 74 | }, | ||
| 75 | } | ||
| 76 | } | ||
| 77 | |||
| 78 | /// maximum number of args that can be passed | ||
| 79 | pub fn maxArgCount(attr: Tag) u32 { | ||
| 80 | switch (attr) { | ||
| 81 | inline else => |tag| { | ||
| 82 | comptime var max = 0; | ||
| 83 | comptime { | ||
| 84 | const fields = std.meta.fields(@field(attributes, @tagName(tag))); | ||
| 85 | for (fields) |arg_field| { | ||
| 86 | if (!mem.eql(u8, arg_field.name, "__name_tok")) max += 1; | ||
| 87 | } | ||
| 88 | } | ||
| 89 | return max; | ||
| 90 | }, | ||
| 91 | } | ||
| 92 | } | ||
| 93 | |||
| 94 | fn UnwrapOptional(comptime T: type) type { | ||
| 95 | return switch (@typeInfo(T)) { | ||
| 96 | .Optional => |optional| optional.child, | ||
| 97 | else => T, | ||
| 98 | }; | ||
| 99 | } | ||
| 100 | |||
| 101 | pub const Formatting = struct { | ||
| 102 | /// The quote char (single or double) to use when printing identifiers/strings corresponding | ||
| 103 | /// to the enum in the first field of the `attr`. Identifier enums use single quotes, string enums | ||
| 104 | /// use double quotes | ||
| 105 | fn quoteChar(attr: Tag) []const u8 { | ||
| 106 | switch (attr) { | ||
| 107 | .calling_convention => unreachable, | ||
| 108 | inline else => |tag| { | ||
| 109 | const fields = std.meta.fields(@field(attributes, @tagName(tag))); | ||
| 110 | |||
| 111 | if (fields.len == 0) unreachable; | ||
| 112 | const Unwrapped = UnwrapOptional(fields[0].type); | ||
| 113 | if (@typeInfo(Unwrapped) != .Enum) unreachable; | ||
| 114 | |||
| 115 | return if (Unwrapped.opts.enum_kind == .identifier) "'" else "\""; | ||
| 116 | }, | ||
| 117 | } | ||
| 118 | } | ||
| 119 | |||
| 120 | /// returns a comma-separated string of quoted enum values, representing the valid | ||
| 121 | /// choices for the string or identifier enum of the first field of the `attr`. | ||
| 122 | pub fn choices(attr: Tag) []const u8 { | ||
| 123 | switch (attr) { | ||
| 124 | .calling_convention => unreachable, | ||
| 125 | inline else => |tag| { | ||
| 126 | const fields = std.meta.fields(@field(attributes, @tagName(tag))); | ||
| 127 | |||
| 128 | if (fields.len == 0) unreachable; | ||
| 129 | const Unwrapped = UnwrapOptional(fields[0].type); | ||
| 130 | if (@typeInfo(Unwrapped) != .Enum) unreachable; | ||
| 131 | |||
| 132 | const enum_fields = @typeInfo(Unwrapped).Enum.fields; | ||
| 133 | @setEvalBranchQuota(3000); | ||
| 134 | const quote = comptime quoteChar(@enumFromInt(@intFromEnum(tag))); | ||
| 135 | comptime var values: []const u8 = quote ++ enum_fields[0].name ++ quote; | ||
| 136 | inline for (enum_fields[1..]) |enum_field| { | ||
| 137 | values = values ++ ", "; | ||
| 138 | values = values ++ quote ++ enum_field.name ++ quote; | ||
| 139 | } | ||
| 140 | return values; | ||
| 141 | }, | ||
| 142 | } | ||
| 143 | } | ||
| 144 | }; | ||
| 145 | |||
| 146 | /// Checks if the first argument (if it exists) is an identifier enum | ||
| 147 | pub fn wantsIdentEnum(attr: Tag) bool { | ||
| 148 | switch (attr) { | ||
| 149 | .calling_convention => return false, | ||
| 150 | inline else => |tag| { | ||
| 151 | const fields = std.meta.fields(@field(attributes, @tagName(tag))); | ||
| 152 | |||
| 153 | if (fields.len == 0) return false; | ||
| 154 | const Unwrapped = UnwrapOptional(fields[0].type); | ||
| 155 | if (@typeInfo(Unwrapped) != .Enum) return false; | ||
| 156 | |||
| 157 | return Unwrapped.opts.enum_kind == .identifier; | ||
| 158 | }, | ||
| 159 | } | ||
| 160 | } | ||
| 161 | |||
| 162 | pub fn diagnoseIdent(attr: Tag, arguments: *Arguments, ident: []const u8) ?Diagnostics.Message { | ||
| 163 | switch (attr) { | ||
| 164 | inline else => |tag| { | ||
| 165 | const fields = std.meta.fields(@field(attributes, @tagName(tag))); | ||
| 166 | if (fields.len == 0) unreachable; | ||
| 167 | const Unwrapped = UnwrapOptional(fields[0].type); | ||
| 168 | if (@typeInfo(Unwrapped) != .Enum) unreachable; | ||
| 169 | if (std.meta.stringToEnum(Unwrapped, normalize(ident))) |enum_val| { | ||
| 170 | @field(@field(arguments, @tagName(tag)), fields[0].name) = enum_val; | ||
| 171 | return null; | ||
| 172 | } | ||
| 173 | return Diagnostics.Message{ | ||
| 174 | .tag = .unknown_attr_enum, | ||
| 175 | .extra = .{ .attr_enum = .{ .tag = attr } }, | ||
| 176 | }; | ||
| 177 | }, | ||
| 178 | } | ||
| 179 | } | ||
| 180 | |||
| 181 | pub fn wantsAlignment(attr: Tag, idx: usize) bool { | ||
| 182 | switch (attr) { | ||
| 183 | inline else => |tag| { | ||
| 184 | const fields = std.meta.fields(@field(attributes, @tagName(tag))); | ||
| 185 | if (fields.len == 0) return false; | ||
| 186 | |||
| 187 | return switch (idx) { | ||
| 188 | inline 0...fields.len - 1 => |i| UnwrapOptional(fields[i].type) == Alignment, | ||
| 189 | else => false, | ||
| 190 | }; | ||
| 191 | }, | ||
| 192 | } | ||
| 193 | } | ||
| 194 | |||
| 195 | pub fn diagnoseAlignment(attr: Tag, arguments: *Arguments, arg_idx: u32, res: Parser.Result, p: *Parser) !?Diagnostics.Message { | ||
| 196 | switch (attr) { | ||
| 197 | inline else => |tag| { | ||
| 198 | const arg_fields = std.meta.fields(@field(attributes, @tagName(tag))); | ||
| 199 | if (arg_fields.len == 0) unreachable; | ||
| 200 | |||
| 201 | switch (arg_idx) { | ||
| 202 | inline 0...arg_fields.len - 1 => |arg_i| { | ||
| 203 | if (UnwrapOptional(arg_fields[arg_i].type) != Alignment) unreachable; | ||
| 204 | |||
| 205 | if (!res.val.is(.int, p.comp)) return Diagnostics.Message{ .tag = .alignas_unavailable }; | ||
| 206 | if (res.val.compare(.lt, Value.zero, p.comp)) { | ||
| 207 | return Diagnostics.Message{ .tag = .negative_alignment, .extra = .{ .str = try res.str(p) } }; | ||
| 208 | } | ||
| 209 | const requested = res.val.toInt(u29, p.comp) orelse { | ||
| 210 | return Diagnostics.Message{ .tag = .maximum_alignment, .extra = .{ .str = try res.str(p) } }; | ||
| 211 | }; | ||
| 212 | if (!std.mem.isValidAlign(requested)) return Diagnostics.Message{ .tag = .non_pow2_align }; | ||
| 213 | |||
| 214 | @field(@field(arguments, @tagName(tag)), arg_fields[arg_i].name) = Alignment{ .requested = requested }; | ||
| 215 | return null; | ||
| 216 | }, | ||
| 217 | else => unreachable, | ||
| 218 | } | ||
| 219 | }, | ||
| 220 | } | ||
| 221 | } | ||
| 222 | |||
| 223 | fn diagnoseField( | ||
| 224 | comptime decl: ZigType.Declaration, | ||
| 225 | comptime field: ZigType.StructField, | ||
| 226 | comptime Wanted: type, | ||
| 227 | arguments: *Arguments, | ||
| 228 | res: Parser.Result, | ||
| 229 | node: Tree.Node, | ||
| 230 | p: *Parser, | ||
| 231 | ) !?Diagnostics.Message { | ||
| 232 | if (res.val.opt_ref == .none) { | ||
| 233 | if (Wanted == Identifier and node.tag == .decl_ref_expr) { | ||
| 234 | @field(@field(arguments, decl.name), field.name) = Identifier{ .tok = node.data.decl_ref }; | ||
| 235 | return null; | ||
| 236 | } | ||
| 237 | return invalidArgMsg(Wanted, .expression); | ||
| 238 | } | ||
| 239 | const key = p.comp.interner.get(res.val.ref()); | ||
| 240 | switch (key) { | ||
| 241 | .int => { | ||
| 242 | if (@typeInfo(Wanted) == .Int) { | ||
| 243 | @field(@field(arguments, decl.name), field.name) = res.val.toInt(Wanted, p.comp) orelse return .{ | ||
| 244 | .tag = .attribute_int_out_of_range, | ||
| 245 | .extra = .{ .str = try res.str(p) }, | ||
| 246 | }; | ||
| 247 | return null; | ||
| 248 | } | ||
| 249 | }, | ||
| 250 | .bytes => |bytes| { | ||
| 251 | if (Wanted == Value) { | ||
| 252 | std.debug.assert(node.tag == .string_literal_expr); | ||
| 253 | if (!node.ty.elemType().is(.char) and !node.ty.elemType().is(.uchar)) { | ||
| 254 | return .{ | ||
| 255 | .tag = .attribute_requires_string, | ||
| 256 | .extra = .{ .str = decl.name }, | ||
| 257 | }; | ||
| 258 | } | ||
| 259 | @field(@field(arguments, decl.name), field.name) = try p.removeNull(res.val); | ||
| 260 | return null; | ||
| 261 | } else if (@typeInfo(Wanted) == .Enum and @hasDecl(Wanted, "opts") and Wanted.opts.enum_kind == .string) { | ||
| 262 | const str = bytes[0 .. bytes.len - 1]; | ||
| 263 | if (std.meta.stringToEnum(Wanted, str)) |enum_val| { | ||
| 264 | @field(@field(arguments, decl.name), field.name) = enum_val; | ||
| 265 | return null; | ||
| 266 | } else { | ||
| 267 | @setEvalBranchQuota(3000); | ||
| 268 | return .{ | ||
| 269 | .tag = .unknown_attr_enum, | ||
| 270 | .extra = .{ .attr_enum = .{ .tag = std.meta.stringToEnum(Tag, decl.name).? } }, | ||
| 271 | }; | ||
| 272 | } | ||
| 273 | } | ||
| 274 | }, | ||
| 275 | else => {}, | ||
| 276 | } | ||
| 277 | return invalidArgMsg(Wanted, switch (key) { | ||
| 278 | .int => .int, | ||
| 279 | .bytes => .string, | ||
| 280 | .float => .float, | ||
| 281 | .null => .nullptr_t, | ||
| 282 | else => unreachable, | ||
| 283 | }); | ||
| 284 | } | ||
| 285 | |||
| 286 | fn invalidArgMsg(comptime Expected: type, actual: ArgumentType) Diagnostics.Message { | ||
| 287 | return .{ | ||
| 288 | .tag = .attribute_arg_invalid, | ||
| 289 | .extra = .{ .attr_arg_type = .{ .expected = switch (Expected) { | ||
| 290 | Value => .string, | ||
| 291 | Identifier => .identifier, | ||
| 292 | u32 => .int, | ||
| 293 | Alignment => .alignment, | ||
| 294 | CallingConvention => .identifier, | ||
| 295 | else => switch (@typeInfo(Expected)) { | ||
| 296 | .Enum => if (Expected.opts.enum_kind == .string) .string else .identifier, | ||
| 297 | else => unreachable, | ||
| 298 | }, | ||
| 299 | }, .actual = actual } }, | ||
| 300 | }; | ||
| 301 | } | ||
| 302 | |||
| 303 | pub fn diagnose(attr: Tag, arguments: *Arguments, arg_idx: u32, res: Parser.Result, node: Tree.Node, p: *Parser) !?Diagnostics.Message { | ||
| 304 | switch (attr) { | ||
| 305 | inline else => |tag| { | ||
| 306 | const decl = @typeInfo(attributes).Struct.decls[@intFromEnum(tag)]; | ||
| 307 | const max_arg_count = comptime maxArgCount(tag); | ||
| 308 | if (arg_idx >= max_arg_count) return Diagnostics.Message{ | ||
| 309 | .tag = .attribute_too_many_args, | ||
| 310 | .extra = .{ .attr_arg_count = .{ .attribute = attr, .expected = max_arg_count } }, | ||
| 311 | }; | ||
| 312 | const arg_fields = std.meta.fields(@field(attributes, decl.name)); | ||
| 313 | switch (arg_idx) { | ||
| 314 | inline 0...arg_fields.len - 1 => |arg_i| { | ||
| 315 | return diagnoseField(decl, arg_fields[arg_i], UnwrapOptional(arg_fields[arg_i].type), arguments, res, node, p); | ||
| 316 | }, | ||
| 317 | else => unreachable, | ||
| 318 | } | ||
| 319 | }, | ||
| 320 | } | ||
| 321 | } | ||
| 322 | |||
| 323 | const EnumTypes = enum { | ||
| 324 | string, | ||
| 325 | identifier, | ||
| 326 | }; | ||
| 327 | pub const Alignment = struct { | ||
| 328 | node: NodeIndex = .none, | ||
| 329 | requested: u29, | ||
| 330 | }; | ||
| 331 | pub const Identifier = struct { | ||
| 332 | tok: TokenIndex = 0, | ||
| 333 | }; | ||
| 334 | |||
| 335 | const attributes = struct { | ||
| 336 | pub const access = struct { | ||
| 337 | access_mode: enum { | ||
| 338 | read_only, | ||
| 339 | read_write, | ||
| 340 | write_only, | ||
| 341 | none, | ||
| 342 | |||
| 343 | const opts = struct { | ||
| 344 | const enum_kind = .identifier; | ||
| 345 | }; | ||
| 346 | }, | ||
| 347 | ref_index: u32, | ||
| 348 | size_index: ?u32 = null, | ||
| 349 | }; | ||
| 350 | pub const alias = struct { | ||
| 351 | alias: Value, | ||
| 352 | }; | ||
| 353 | pub const aligned = struct { | ||
| 354 | alignment: ?Alignment = null, | ||
| 355 | __name_tok: TokenIndex, | ||
| 356 | }; | ||
| 357 | pub const alloc_align = struct { | ||
| 358 | position: u32, | ||
| 359 | }; | ||
| 360 | pub const alloc_size = struct { | ||
| 361 | position_1: u32, | ||
| 362 | position_2: ?u32 = null, | ||
| 363 | }; | ||
| 364 | pub const allocate = struct { | ||
| 365 | segname: Value, | ||
| 366 | }; | ||
| 367 | pub const allocator = struct {}; | ||
| 368 | pub const always_inline = struct {}; | ||
| 369 | pub const appdomain = struct {}; | ||
| 370 | pub const artificial = struct {}; | ||
| 371 | pub const assume_aligned = struct { | ||
| 372 | alignment: Alignment, | ||
| 373 | offset: ?u32 = null, | ||
| 374 | }; | ||
| 375 | pub const cleanup = struct { | ||
| 376 | function: Identifier, | ||
| 377 | }; | ||
| 378 | pub const code_seg = struct { | ||
| 379 | segname: Value, | ||
| 380 | }; | ||
| 381 | pub const cold = struct {}; | ||
| 382 | pub const common = struct {}; | ||
| 383 | pub const @"const" = struct {}; | ||
| 384 | pub const constructor = struct { | ||
| 385 | priority: ?u32 = null, | ||
| 386 | }; | ||
| 387 | pub const copy = struct { | ||
| 388 | function: Identifier, | ||
| 389 | }; | ||
| 390 | pub const deprecated = struct { | ||
| 391 | msg: ?Value = null, | ||
| 392 | __name_tok: TokenIndex, | ||
| 393 | }; | ||
| 394 | pub const designated_init = struct {}; | ||
| 395 | pub const destructor = struct { | ||
| 396 | priority: ?u32 = null, | ||
| 397 | }; | ||
| 398 | pub const dllexport = struct {}; | ||
| 399 | pub const dllimport = struct {}; | ||
| 400 | pub const @"error" = struct { | ||
| 401 | msg: Value, | ||
| 402 | __name_tok: TokenIndex, | ||
| 403 | }; | ||
| 404 | pub const externally_visible = struct {}; | ||
| 405 | pub const fallthrough = struct {}; | ||
| 406 | pub const flatten = struct {}; | ||
| 407 | pub const format = struct { | ||
| 408 | archetype: enum { | ||
| 409 | printf, | ||
| 410 | scanf, | ||
| 411 | strftime, | ||
| 412 | strfmon, | ||
| 413 | |||
| 414 | const opts = struct { | ||
| 415 | const enum_kind = .identifier; | ||
| 416 | }; | ||
| 417 | }, | ||
| 418 | string_index: u32, | ||
| 419 | first_to_check: u32, | ||
| 420 | }; | ||
| 421 | pub const format_arg = struct { | ||
| 422 | string_index: u32, | ||
| 423 | }; | ||
| 424 | pub const gnu_inline = struct {}; | ||
| 425 | pub const hot = struct {}; | ||
| 426 | pub const ifunc = struct { | ||
| 427 | resolver: Value, | ||
| 428 | }; | ||
| 429 | pub const interrupt = struct {}; | ||
| 430 | pub const interrupt_handler = struct {}; | ||
| 431 | pub const jitintrinsic = struct {}; | ||
| 432 | pub const leaf = struct {}; | ||
| 433 | pub const malloc = struct {}; | ||
| 434 | pub const may_alias = struct {}; | ||
| 435 | pub const mode = struct { | ||
| 436 | mode: enum { | ||
| 437 | // zig fmt: off | ||
| 438 | byte, word, pointer, | ||
| 439 | BI, QI, HI, | ||
| 440 | PSI, SI, PDI, | ||
| 441 | DI, TI, OI, | ||
| 442 | XI, QF, HF, | ||
| 443 | TQF, SF, DF, | ||
| 444 | XF, SD, DD, | ||
| 445 | TD, TF, QQ, | ||
| 446 | HQ, SQ, DQ, | ||
| 447 | TQ, UQQ, UHQ, | ||
| 448 | USQ, UDQ, UTQ, | ||
| 449 | HA, SA, DA, | ||
| 450 | TA, UHA, USA, | ||
| 451 | UDA, UTA, CC, | ||
| 452 | BLK, VOID, QC, | ||
| 453 | HC, SC, DC, | ||
| 454 | XC, TC, CQI, | ||
| 455 | CHI, CSI, CDI, | ||
| 456 | CTI, COI, CPSI, | ||
| 457 | BND32, BND64, | ||
| 458 | // zig fmt: on | ||
| 459 | |||
| 460 | const opts = struct { | ||
| 461 | const enum_kind = .identifier; | ||
| 462 | }; | ||
| 463 | }, | ||
| 464 | }; | ||
| 465 | pub const naked = struct {}; | ||
| 466 | pub const no_address_safety_analysis = struct {}; | ||
| 467 | pub const no_icf = struct {}; | ||
| 468 | pub const no_instrument_function = struct {}; | ||
| 469 | pub const no_profile_instrument_function = struct {}; | ||
| 470 | pub const no_reorder = struct {}; | ||
| 471 | pub const no_sanitize = struct { | ||
| 472 | /// Todo: represent args as union? | ||
| 473 | alignment: Value, | ||
| 474 | object_size: ?Value = null, | ||
| 475 | }; | ||
| 476 | pub const no_sanitize_address = struct {}; | ||
| 477 | pub const no_sanitize_coverage = struct {}; | ||
| 478 | pub const no_sanitize_thread = struct {}; | ||
| 479 | pub const no_sanitize_undefined = struct {}; | ||
| 480 | pub const no_split_stack = struct {}; | ||
| 481 | pub const no_stack_limit = struct {}; | ||
| 482 | pub const no_stack_protector = struct {}; | ||
| 483 | pub const @"noalias" = struct {}; | ||
| 484 | pub const noclone = struct {}; | ||
| 485 | pub const nocommon = struct {}; | ||
| 486 | pub const nodiscard = struct {}; | ||
| 487 | pub const noinit = struct {}; | ||
| 488 | pub const @"noinline" = struct {}; | ||
| 489 | pub const noipa = struct {}; | ||
| 490 | // TODO: arbitrary number of arguments | ||
| 491 | // const nonnull = struct { | ||
| 492 | // // arg_index: []const u32, | ||
| 493 | // }; | ||
| 494 | // }; | ||
| 495 | pub const nonstring = struct {}; | ||
| 496 | pub const noplt = struct {}; | ||
| 497 | pub const @"noreturn" = struct {}; | ||
| 498 | // TODO: union args ? | ||
| 499 | // const optimize = struct { | ||
| 500 | // // optimize, // u32 | []const u8 -- optimize? | ||
| 501 | // }; | ||
| 502 | // }; | ||
| 503 | pub const @"packed" = struct {}; | ||
| 504 | pub const patchable_function_entry = struct {}; | ||
| 505 | pub const persistent = struct {}; | ||
| 506 | pub const process = struct {}; | ||
| 507 | pub const pure = struct {}; | ||
| 508 | pub const reproducible = struct {}; | ||
| 509 | pub const restrict = struct {}; | ||
| 510 | pub const retain = struct {}; | ||
| 511 | pub const returns_nonnull = struct {}; | ||
| 512 | pub const returns_twice = struct {}; | ||
| 513 | pub const safebuffers = struct {}; | ||
| 514 | pub const scalar_storage_order = struct { | ||
| 515 | order: enum { | ||
| 516 | @"little-endian", | ||
| 517 | @"big-endian", | ||
| 518 | |||
| 519 | const opts = struct { | ||
| 520 | const enum_kind = .string; | ||
| 521 | }; | ||
| 522 | }, | ||
| 523 | }; | ||
| 524 | pub const section = struct { | ||
| 525 | name: Value, | ||
| 526 | }; | ||
| 527 | pub const selectany = struct {}; | ||
| 528 | pub const sentinel = struct { | ||
| 529 | position: ?u32 = null, | ||
| 530 | }; | ||
| 531 | pub const simd = struct { | ||
| 532 | mask: ?enum { | ||
| 533 | notinbranch, | ||
| 534 | inbranch, | ||
| 535 | |||
| 536 | const opts = struct { | ||
| 537 | const enum_kind = .string; | ||
| 538 | }; | ||
| 539 | } = null, | ||
| 540 | }; | ||
| 541 | pub const spectre = struct { | ||
| 542 | arg: enum { | ||
| 543 | nomitigation, | ||
| 544 | |||
| 545 | const opts = struct { | ||
| 546 | const enum_kind = .identifier; | ||
| 547 | }; | ||
| 548 | }, | ||
| 549 | }; | ||
| 550 | pub const stack_protect = struct {}; | ||
| 551 | pub const symver = struct { | ||
| 552 | version: Value, // TODO: validate format "name2@nodename" | ||
| 553 | |||
| 554 | }; | ||
| 555 | pub const target = struct { | ||
| 556 | options: Value, // TODO: multiple arguments | ||
| 557 | |||
| 558 | }; | ||
| 559 | pub const target_clones = struct { | ||
| 560 | options: Value, // TODO: multiple arguments | ||
| 561 | |||
| 562 | }; | ||
| 563 | pub const thread = struct {}; | ||
| 564 | pub const tls_model = struct { | ||
| 565 | model: enum { | ||
| 566 | @"global-dynamic", | ||
| 567 | @"local-dynamic", | ||
| 568 | @"initial-exec", | ||
| 569 | @"local-exec", | ||
| 570 | |||
| 571 | const opts = struct { | ||
| 572 | const enum_kind = .string; | ||
| 573 | }; | ||
| 574 | }, | ||
| 575 | }; | ||
| 576 | pub const transparent_union = struct {}; | ||
| 577 | pub const unavailable = struct { | ||
| 578 | msg: ?Value = null, | ||
| 579 | __name_tok: TokenIndex, | ||
| 580 | }; | ||
| 581 | pub const uninitialized = struct {}; | ||
| 582 | pub const unsequenced = struct {}; | ||
| 583 | pub const unused = struct {}; | ||
| 584 | pub const used = struct {}; | ||
| 585 | pub const uuid = struct { | ||
| 586 | uuid: Value, | ||
| 587 | }; | ||
| 588 | pub const vector_size = struct { | ||
| 589 | bytes: u32, // TODO: validate "The bytes argument must be a positive power-of-two multiple of the base type size" | ||
| 590 | |||
| 591 | }; | ||
| 592 | pub const visibility = struct { | ||
| 593 | visibility_type: enum { | ||
| 594 | default, | ||
| 595 | hidden, | ||
| 596 | internal, | ||
| 597 | protected, | ||
| 598 | |||
| 599 | const opts = struct { | ||
| 600 | const enum_kind = .string; | ||
| 601 | }; | ||
| 602 | }, | ||
| 603 | }; | ||
| 604 | pub const warn_if_not_aligned = struct { | ||
| 605 | alignment: Alignment, | ||
| 606 | }; | ||
| 607 | pub const warn_unused_result = struct {}; | ||
| 608 | pub const warning = struct { | ||
| 609 | msg: Value, | ||
| 610 | __name_tok: TokenIndex, | ||
| 611 | }; | ||
| 612 | pub const weak = struct {}; | ||
| 613 | pub const weakref = struct { | ||
| 614 | target: ?Value = null, | ||
| 615 | }; | ||
| 616 | pub const zero_call_used_regs = struct { | ||
| 617 | choice: enum { | ||
| 618 | skip, | ||
| 619 | used, | ||
| 620 | @"used-gpr", | ||
| 621 | @"used-arg", | ||
| 622 | @"used-gpr-arg", | ||
| 623 | all, | ||
| 624 | @"all-gpr", | ||
| 625 | @"all-arg", | ||
| 626 | @"all-gpr-arg", | ||
| 627 | |||
| 628 | const opts = struct { | ||
| 629 | const enum_kind = .string; | ||
| 630 | }; | ||
| 631 | }, | ||
| 632 | }; | ||
| 633 | pub const asm_label = struct { | ||
| 634 | name: Value, | ||
| 635 | }; | ||
| 636 | pub const calling_convention = struct { | ||
| 637 | cc: CallingConvention, | ||
| 638 | }; | ||
| 639 | }; | ||
| 640 | |||
| 641 | pub const Tag = std.meta.DeclEnum(attributes); | ||
| 642 | |||
| 643 | pub const Arguments = blk: { | ||
| 644 | const decls = @typeInfo(attributes).Struct.decls; | ||
| 645 | var union_fields: [decls.len]ZigType.UnionField = undefined; | ||
| 646 | inline for (decls, &union_fields) |decl, *field| { | ||
| 647 | field.* = .{ | ||
| 648 | .name = decl.name, | ||
| 649 | .type = @field(attributes, decl.name), | ||
| 650 | .alignment = 0, | ||
| 651 | }; | ||
| 652 | } | ||
| 653 | |||
| 654 | break :blk @Type(.{ | ||
| 655 | .Union = .{ | ||
| 656 | .layout = .Auto, | ||
| 657 | .tag_type = null, | ||
| 658 | .fields = &union_fields, | ||
| 659 | .decls = &.{}, | ||
| 660 | }, | ||
| 661 | }); | ||
| 662 | }; | ||
| 663 | |||
| 664 | pub fn ArgumentsForTag(comptime tag: Tag) type { | ||
| 665 | const decl = @typeInfo(attributes).Struct.decls[@intFromEnum(tag)]; | ||
| 666 | return @field(attributes, decl.name); | ||
| 667 | } | ||
| 668 | |||
| 669 | pub fn initArguments(tag: Tag, name_tok: TokenIndex) Arguments { | ||
| 670 | switch (tag) { | ||
| 671 | inline else => |arg_tag| { | ||
| 672 | const union_element = @field(attributes, @tagName(arg_tag)); | ||
| 673 | const init = std.mem.zeroInit(union_element, .{}); | ||
| 674 | var args = @unionInit(Arguments, @tagName(arg_tag), init); | ||
| 675 | if (@hasField(@field(attributes, @tagName(arg_tag)), "__name_tok")) { | ||
| 676 | @field(args, @tagName(arg_tag)).__name_tok = name_tok; | ||
| 677 | } | ||
| 678 | return args; | ||
| 679 | }, | ||
| 680 | } | ||
| 681 | } | ||
| 682 | |||
| 683 | pub fn fromString(kind: Kind, namespace: ?[]const u8, name: []const u8) ?Tag { | ||
| 684 | const Properties = struct { | ||
| 685 | tag: Tag, | ||
| 686 | gnu: bool = false, | ||
| 687 | declspec: bool = false, | ||
| 688 | c23: bool = false, | ||
| 689 | }; | ||
| 690 | const attribute_names = @import("Attribute/names.def").with(Properties); | ||
| 691 | |||
| 692 | const normalized = normalize(name); | ||
| 693 | const actual_kind: Kind = if (namespace) |ns| blk: { | ||
| 694 | const normalized_ns = normalize(ns); | ||
| 695 | if (mem.eql(u8, normalized_ns, "gnu")) { | ||
| 696 | break :blk .gnu; | ||
| 697 | } | ||
| 698 | return null; | ||
| 699 | } else kind; | ||
| 700 | |||
| 701 | const tag_and_opts = attribute_names.fromName(normalized) orelse return null; | ||
| 702 | switch (actual_kind) { | ||
| 703 | inline else => |tag| { | ||
| 704 | if (@field(tag_and_opts.properties, @tagName(tag))) | ||
| 705 | return tag_and_opts.properties.tag; | ||
| 706 | }, | ||
| 707 | } | ||
| 708 | return null; | ||
| 709 | } | ||
| 710 | |||
| 711 | pub fn normalize(name: []const u8) []const u8 { | ||
| 712 | if (name.len >= 4 and mem.startsWith(u8, name, "__") and mem.endsWith(u8, name, "__")) { | ||
| 713 | return name[2 .. name.len - 2]; | ||
| 714 | } | ||
| 715 | return name; | ||
| 716 | } | ||
| 717 | |||
| 718 | fn ignoredAttrErr(p: *Parser, tok: TokenIndex, attr: Attribute.Tag, context: []const u8) !void { | ||
| 719 | const strings_top = p.strings.items.len; | ||
| 720 | defer p.strings.items.len = strings_top; | ||
| 721 | |||
| 722 | try p.strings.writer().print("attribute '{s}' ignored on {s}", .{ @tagName(attr), context }); | ||
| 723 | const str = try p.comp.diagnostics.arena.allocator().dupe(u8, p.strings.items[strings_top..]); | ||
| 724 | try p.errStr(.ignored_attribute, tok, str); | ||
| 725 | } | ||
| 726 | |||
| 727 | pub const applyParameterAttributes = applyVariableAttributes; | ||
| 728 | pub fn applyVariableAttributes(p: *Parser, ty: Type, attr_buf_start: usize, tag: ?Diagnostics.Tag) !Type { | ||
| 729 | const attrs = p.attr_buf.items(.attr)[attr_buf_start..]; | ||
| 730 | const toks = p.attr_buf.items(.tok)[attr_buf_start..]; | ||
| 731 | p.attr_application_buf.items.len = 0; | ||
| 732 | var base_ty = ty; | ||
| 733 | if (base_ty.specifier == .attributed) base_ty = base_ty.data.attributed.base; | ||
| 734 | var common = false; | ||
| 735 | var nocommon = false; | ||
| 736 | for (attrs, toks) |attr, tok| switch (attr.tag) { | ||
| 737 | // zig fmt: off | ||
| 738 | .alias, .may_alias, .deprecated, .unavailable, .unused, .warn_if_not_aligned, .weak, .used, | ||
| 739 | .noinit, .retain, .persistent, .section, .mode, .asm_label, | ||
| 740 | => try p.attr_application_buf.append(p.gpa, attr), | ||
| 741 | // zig fmt: on | ||
| 742 | .common => if (nocommon) { | ||
| 743 | try p.errTok(.ignore_common, tok); | ||
| 744 | } else { | ||
| 745 | try p.attr_application_buf.append(p.gpa, attr); | ||
| 746 | common = true; | ||
| 747 | }, | ||
| 748 | .nocommon => if (common) { | ||
| 749 | try p.errTok(.ignore_nocommon, tok); | ||
| 750 | } else { | ||
| 751 | try p.attr_application_buf.append(p.gpa, attr); | ||
| 752 | nocommon = true; | ||
| 753 | }, | ||
| 754 | .vector_size => try attr.applyVectorSize(p, tok, &base_ty), | ||
| 755 | .aligned => try attr.applyAligned(p, base_ty, tag), | ||
| 756 | .nonstring => if (!base_ty.isArray() or !(base_ty.is(.char) or base_ty.is(.uchar) or base_ty.is(.schar))) { | ||
| 757 | try p.errStr(.non_string_ignored, tok, try p.typeStr(ty)); | ||
| 758 | } else { | ||
| 759 | try p.attr_application_buf.append(p.gpa, attr); | ||
| 760 | }, | ||
| 761 | .uninitialized => if (p.func.ty == null) { | ||
| 762 | try p.errStr(.local_variable_attribute, tok, "uninitialized"); | ||
| 763 | } else { | ||
| 764 | try p.attr_application_buf.append(p.gpa, attr); | ||
| 765 | }, | ||
| 766 | .cleanup => if (p.func.ty == null) { | ||
| 767 | try p.errStr(.local_variable_attribute, tok, "cleanup"); | ||
| 768 | } else { | ||
| 769 | try p.attr_application_buf.append(p.gpa, attr); | ||
| 770 | }, | ||
| 771 | .alloc_size, | ||
| 772 | .copy, | ||
| 773 | .tls_model, | ||
| 774 | .visibility, | ||
| 775 | => std.debug.panic("apply variable attribute {s}", .{@tagName(attr.tag)}), | ||
| 776 | else => try ignoredAttrErr(p, tok, attr.tag, "variables"), | ||
| 777 | }; | ||
| 778 | const existing = ty.getAttributes(); | ||
| 779 | if (existing.len == 0 and p.attr_application_buf.items.len == 0) return base_ty; | ||
| 780 | if (existing.len == 0) return base_ty.withAttributes(p.arena, p.attr_application_buf.items); | ||
| 781 | |||
| 782 | const attributed_type = try Type.Attributed.create(p.arena, base_ty, existing, p.attr_application_buf.items); | ||
| 783 | return Type{ .specifier = .attributed, .data = .{ .attributed = attributed_type } }; | ||
| 784 | } | ||
| 785 | |||
| 786 | pub fn applyFieldAttributes(p: *Parser, field_ty: *Type, attr_buf_start: usize) ![]const Attribute { | ||
| 787 | const attrs = p.attr_buf.items(.attr)[attr_buf_start..]; | ||
| 788 | const toks = p.attr_buf.items(.tok)[attr_buf_start..]; | ||
| 789 | p.attr_application_buf.items.len = 0; | ||
| 790 | for (attrs, toks) |attr, tok| switch (attr.tag) { | ||
| 791 | // zig fmt: off | ||
| 792 | .@"packed", .may_alias, .deprecated, .unavailable, .unused, .warn_if_not_aligned, .mode, | ||
| 793 | => try p.attr_application_buf.append(p.gpa, attr), | ||
| 794 | // zig fmt: on | ||
| 795 | .vector_size => try attr.applyVectorSize(p, tok, field_ty), | ||
| 796 | .aligned => try attr.applyAligned(p, field_ty.*, null), | ||
| 797 | else => try ignoredAttrErr(p, tok, attr.tag, "fields"), | ||
| 798 | }; | ||
| 799 | if (p.attr_application_buf.items.len == 0) return &[0]Attribute{}; | ||
| 800 | return p.arena.dupe(Attribute, p.attr_application_buf.items); | ||
| 801 | } | ||
| 802 | |||
| 803 | pub fn applyTypeAttributes(p: *Parser, ty: Type, attr_buf_start: usize, tag: ?Diagnostics.Tag) !Type { | ||
| 804 | const attrs = p.attr_buf.items(.attr)[attr_buf_start..]; | ||
| 805 | const toks = p.attr_buf.items(.tok)[attr_buf_start..]; | ||
| 806 | p.attr_application_buf.items.len = 0; | ||
| 807 | var base_ty = ty; | ||
| 808 | if (base_ty.specifier == .attributed) base_ty = base_ty.data.attributed.base; | ||
| 809 | for (attrs, toks) |attr, tok| switch (attr.tag) { | ||
| 810 | // zig fmt: off | ||
| 811 | .@"packed", .may_alias, .deprecated, .unavailable, .unused, .warn_if_not_aligned, .mode, | ||
| 812 | => try p.attr_application_buf.append(p.gpa, attr), | ||
| 813 | // zig fmt: on | ||
| 814 | .transparent_union => try attr.applyTransparentUnion(p, tok, base_ty), | ||
| 815 | .vector_size => try attr.applyVectorSize(p, tok, &base_ty), | ||
| 816 | .aligned => try attr.applyAligned(p, base_ty, tag), | ||
| 817 | .designated_init => if (base_ty.is(.@"struct")) { | ||
| 818 | try p.attr_application_buf.append(p.gpa, attr); | ||
| 819 | } else { | ||
| 820 | try p.errTok(.designated_init_invalid, tok); | ||
| 821 | }, | ||
| 822 | .alloc_size, | ||
| 823 | .copy, | ||
| 824 | .scalar_storage_order, | ||
| 825 | .nonstring, | ||
| 826 | => std.debug.panic("apply type attribute {s}", .{@tagName(attr.tag)}), | ||
| 827 | else => try ignoredAttrErr(p, tok, attr.tag, "types"), | ||
| 828 | }; | ||
| 829 | |||
| 830 | const existing = ty.getAttributes(); | ||
| 831 | // TODO: the alignment annotation on a type should override | ||
| 832 | // the decl it refers to. This might not be true for others. Maybe bug. | ||
| 833 | |||
| 834 | // if there are annotations on this type def use those. | ||
| 835 | if (p.attr_application_buf.items.len > 0) { | ||
| 836 | return try base_ty.withAttributes(p.arena, p.attr_application_buf.items); | ||
| 837 | } else if (existing.len > 0) { | ||
| 838 | // else use the ones on the typedef decl we were refering to. | ||
| 839 | return try base_ty.withAttributes(p.arena, existing); | ||
| 840 | } | ||
| 841 | return base_ty; | ||
| 842 | } | ||
| 843 | |||
| 844 | pub fn applyFunctionAttributes(p: *Parser, ty: Type, attr_buf_start: usize) !Type { | ||
| 845 | const attrs = p.attr_buf.items(.attr)[attr_buf_start..]; | ||
| 846 | const toks = p.attr_buf.items(.tok)[attr_buf_start..]; | ||
| 847 | p.attr_application_buf.items.len = 0; | ||
| 848 | var base_ty = ty; | ||
| 849 | if (base_ty.specifier == .attributed) base_ty = base_ty.data.attributed.base; | ||
| 850 | var hot = false; | ||
| 851 | var cold = false; | ||
| 852 | var @"noinline" = false; | ||
| 853 | var always_inline = false; | ||
| 854 | for (attrs, toks) |attr, tok| switch (attr.tag) { | ||
| 855 | // zig fmt: off | ||
| 856 | .noreturn, .unused, .used, .warning, .deprecated, .unavailable, .weak, .pure, .leaf, | ||
| 857 | .@"const", .warn_unused_result, .section, .returns_nonnull, .returns_twice, .@"error", | ||
| 858 | .externally_visible, .retain, .flatten, .gnu_inline, .alias, .asm_label, .nodiscard, | ||
| 859 | .reproducible, .unsequenced, | ||
| 860 | => try p.attr_application_buf.append(p.gpa, attr), | ||
| 861 | // zig fmt: on | ||
| 862 | .hot => if (cold) { | ||
| 863 | try p.errTok(.ignore_hot, tok); | ||
| 864 | } else { | ||
| 865 | try p.attr_application_buf.append(p.gpa, attr); | ||
| 866 | hot = true; | ||
| 867 | }, | ||
| 868 | .cold => if (hot) { | ||
| 869 | try p.errTok(.ignore_cold, tok); | ||
| 870 | } else { | ||
| 871 | try p.attr_application_buf.append(p.gpa, attr); | ||
| 872 | cold = true; | ||
| 873 | }, | ||
| 874 | .always_inline => if (@"noinline") { | ||
| 875 | try p.errTok(.ignore_always_inline, tok); | ||
| 876 | } else { | ||
| 877 | try p.attr_application_buf.append(p.gpa, attr); | ||
| 878 | always_inline = true; | ||
| 879 | }, | ||
| 880 | .@"noinline" => if (always_inline) { | ||
| 881 | try p.errTok(.ignore_noinline, tok); | ||
| 882 | } else { | ||
| 883 | try p.attr_application_buf.append(p.gpa, attr); | ||
| 884 | @"noinline" = true; | ||
| 885 | }, | ||
| 886 | .aligned => try attr.applyAligned(p, base_ty, null), | ||
| 887 | .format => try attr.applyFormat(p, base_ty), | ||
| 888 | .calling_convention => switch (attr.args.calling_convention.cc) { | ||
| 889 | .C => continue, | ||
| 890 | .stdcall, .thiscall => switch (p.comp.target.cpu.arch) { | ||
| 891 | .x86 => try p.attr_application_buf.append(p.gpa, attr), | ||
| 892 | else => try p.errStr(.callconv_not_supported, tok, p.tok_ids[tok].lexeme().?), | ||
| 893 | }, | ||
| 894 | .vectorcall => switch (p.comp.target.cpu.arch) { | ||
| 895 | .x86, .aarch64, .aarch64_be, .aarch64_32 => try p.attr_application_buf.append(p.gpa, attr), | ||
| 896 | else => try p.errStr(.callconv_not_supported, tok, p.tok_ids[tok].lexeme().?), | ||
| 897 | }, | ||
| 898 | }, | ||
| 899 | .access, | ||
| 900 | .alloc_align, | ||
| 901 | .alloc_size, | ||
| 902 | .artificial, | ||
| 903 | .assume_aligned, | ||
| 904 | .constructor, | ||
| 905 | .copy, | ||
| 906 | .destructor, | ||
| 907 | .format_arg, | ||
| 908 | .ifunc, | ||
| 909 | .interrupt, | ||
| 910 | .interrupt_handler, | ||
| 911 | .malloc, | ||
| 912 | .no_address_safety_analysis, | ||
| 913 | .no_icf, | ||
| 914 | .no_instrument_function, | ||
| 915 | .no_profile_instrument_function, | ||
| 916 | .no_reorder, | ||
| 917 | .no_sanitize, | ||
| 918 | .no_sanitize_address, | ||
| 919 | .no_sanitize_coverage, | ||
| 920 | .no_sanitize_thread, | ||
| 921 | .no_sanitize_undefined, | ||
| 922 | .no_split_stack, | ||
| 923 | .no_stack_limit, | ||
| 924 | .no_stack_protector, | ||
| 925 | .noclone, | ||
| 926 | .noipa, | ||
| 927 | // .nonnull, | ||
| 928 | .noplt, | ||
| 929 | // .optimize, | ||
| 930 | .patchable_function_entry, | ||
| 931 | .sentinel, | ||
| 932 | .simd, | ||
| 933 | .stack_protect, | ||
| 934 | .symver, | ||
| 935 | .target, | ||
| 936 | .target_clones, | ||
| 937 | .visibility, | ||
| 938 | .weakref, | ||
| 939 | .zero_call_used_regs, | ||
| 940 | => std.debug.panic("apply type attribute {s}", .{@tagName(attr.tag)}), | ||
| 941 | else => try ignoredAttrErr(p, tok, attr.tag, "functions"), | ||
| 942 | }; | ||
| 943 | return ty.withAttributes(p.arena, p.attr_application_buf.items); | ||
| 944 | } | ||
| 945 | |||
| 946 | pub fn applyLabelAttributes(p: *Parser, ty: Type, attr_buf_start: usize) !Type { | ||
| 947 | const attrs = p.attr_buf.items(.attr)[attr_buf_start..]; | ||
| 948 | const toks = p.attr_buf.items(.tok)[attr_buf_start..]; | ||
| 949 | p.attr_application_buf.items.len = 0; | ||
| 950 | var hot = false; | ||
| 951 | var cold = false; | ||
| 952 | for (attrs, toks) |attr, tok| switch (attr.tag) { | ||
| 953 | .unused => try p.attr_application_buf.append(p.gpa, attr), | ||
| 954 | .hot => if (cold) { | ||
| 955 | try p.errTok(.ignore_hot, tok); | ||
| 956 | } else { | ||
| 957 | try p.attr_application_buf.append(p.gpa, attr); | ||
| 958 | hot = true; | ||
| 959 | }, | ||
| 960 | .cold => if (hot) { | ||
| 961 | try p.errTok(.ignore_cold, tok); | ||
| 962 | } else { | ||
| 963 | try p.attr_application_buf.append(p.gpa, attr); | ||
| 964 | cold = true; | ||
| 965 | }, | ||
| 966 | else => try ignoredAttrErr(p, tok, attr.tag, "labels"), | ||
| 967 | }; | ||
| 968 | return ty.withAttributes(p.arena, p.attr_application_buf.items); | ||
| 969 | } | ||
| 970 | |||
| 971 | pub fn applyStatementAttributes(p: *Parser, ty: Type, expr_start: TokenIndex, attr_buf_start: usize) !Type { | ||
| 972 | const attrs = p.attr_buf.items(.attr)[attr_buf_start..]; | ||
| 973 | const toks = p.attr_buf.items(.tok)[attr_buf_start..]; | ||
| 974 | p.attr_application_buf.items.len = 0; | ||
| 975 | for (attrs, toks) |attr, tok| switch (attr.tag) { | ||
| 976 | .fallthrough => if (p.tok_ids[p.tok_i] != .keyword_case and p.tok_ids[p.tok_i] != .keyword_default) { | ||
| 977 | // TODO: this condition is not completely correct; the last statement of a compound | ||
| 978 | // statement is also valid if it precedes a switch label (so intervening '}' are ok, | ||
| 979 | // but only if they close a compound statement) | ||
| 980 | try p.errTok(.invalid_fallthrough, expr_start); | ||
| 981 | } else { | ||
| 982 | try p.attr_application_buf.append(p.gpa, attr); | ||
| 983 | }, | ||
| 984 | else => try p.errStr(.cannot_apply_attribute_to_statement, tok, @tagName(attr.tag)), | ||
| 985 | }; | ||
| 986 | return ty.withAttributes(p.arena, p.attr_application_buf.items); | ||
| 987 | } | ||
| 988 | |||
| 989 | pub fn applyEnumeratorAttributes(p: *Parser, ty: Type, attr_buf_start: usize) !Type { | ||
| 990 | const attrs = p.attr_buf.items(.attr)[attr_buf_start..]; | ||
| 991 | const toks = p.attr_buf.items(.tok)[attr_buf_start..]; | ||
| 992 | p.attr_application_buf.items.len = 0; | ||
| 993 | for (attrs, toks) |attr, tok| switch (attr.tag) { | ||
| 994 | .deprecated, .unavailable => try p.attr_application_buf.append(p.gpa, attr), | ||
| 995 | else => try ignoredAttrErr(p, tok, attr.tag, "enums"), | ||
| 996 | }; | ||
| 997 | return ty.withAttributes(p.arena, p.attr_application_buf.items); | ||
| 998 | } | ||
| 999 | |||
| 1000 | fn applyAligned(attr: Attribute, p: *Parser, ty: Type, tag: ?Diagnostics.Tag) !void { | ||
| 1001 | const base = ty.canonicalize(.standard); | ||
| 1002 | if (attr.args.aligned.alignment) |alignment| alignas: { | ||
| 1003 | if (attr.syntax != .keyword) break :alignas; | ||
| 1004 | |||
| 1005 | const align_tok = attr.args.aligned.__name_tok; | ||
| 1006 | if (tag) |t| try p.errTok(t, align_tok); | ||
| 1007 | |||
| 1008 | const default_align = base.alignof(p.comp); | ||
| 1009 | if (ty.isFunc()) { | ||
| 1010 | try p.errTok(.alignas_on_func, align_tok); | ||
| 1011 | } else if (alignment.requested < default_align) { | ||
| 1012 | try p.errExtra(.minimum_alignment, align_tok, .{ .unsigned = default_align }); | ||
| 1013 | } | ||
| 1014 | } | ||
| 1015 | try p.attr_application_buf.append(p.gpa, attr); | ||
| 1016 | } | ||
| 1017 | |||
| 1018 | fn applyTransparentUnion(attr: Attribute, p: *Parser, tok: TokenIndex, ty: Type) !void { | ||
| 1019 | const union_ty = ty.get(.@"union") orelse { | ||
| 1020 | return p.errTok(.transparent_union_wrong_type, tok); | ||
| 1021 | }; | ||
| 1022 | // TODO validate union defined at end | ||
| 1023 | if (union_ty.data.record.isIncomplete()) return; | ||
| 1024 | const fields = union_ty.data.record.fields; | ||
| 1025 | if (fields.len == 0) { | ||
| 1026 | return p.errTok(.transparent_union_one_field, tok); | ||
| 1027 | } | ||
| 1028 | const first_field_size = fields[0].ty.bitSizeof(p.comp).?; | ||
| 1029 | for (fields[1..]) |field| { | ||
| 1030 | const field_size = field.ty.bitSizeof(p.comp).?; | ||
| 1031 | if (field_size == first_field_size) continue; | ||
| 1032 | const mapper = p.comp.string_interner.getSlowTypeMapper(); | ||
| 1033 | const str = try std.fmt.allocPrint( | ||
| 1034 | p.comp.diagnostics.arena.allocator(), | ||
| 1035 | "'{s}' ({d}", | ||
| 1036 | .{ mapper.lookup(field.name), field_size }, | ||
| 1037 | ); | ||
| 1038 | try p.errStr(.transparent_union_size, field.name_tok, str); | ||
| 1039 | return p.errExtra(.transparent_union_size_note, fields[0].name_tok, .{ .unsigned = first_field_size }); | ||
| 1040 | } | ||
| 1041 | |||
| 1042 | try p.attr_application_buf.append(p.gpa, attr); | ||
| 1043 | } | ||
| 1044 | |||
| 1045 | fn applyVectorSize(attr: Attribute, p: *Parser, tok: TokenIndex, ty: *Type) !void { | ||
| 1046 | if (!(ty.isInt() or ty.isFloat()) or !ty.isReal()) { | ||
| 1047 | const orig_ty = try p.typeStr(ty.*); | ||
| 1048 | ty.* = Type.invalid; | ||
| 1049 | return p.errStr(.invalid_vec_elem_ty, tok, orig_ty); | ||
| 1050 | } | ||
| 1051 | const vec_bytes = attr.args.vector_size.bytes; | ||
| 1052 | const ty_size = ty.sizeof(p.comp).?; | ||
| 1053 | if (vec_bytes % ty_size != 0) { | ||
| 1054 | return p.errTok(.vec_size_not_multiple, tok); | ||
| 1055 | } | ||
| 1056 | const vec_size = vec_bytes / ty_size; | ||
| 1057 | |||
| 1058 | const arr_ty = try p.arena.create(Type.Array); | ||
| 1059 | arr_ty.* = .{ .elem = ty.*, .len = vec_size }; | ||
| 1060 | ty.* = Type{ | ||
| 1061 | .specifier = .vector, | ||
| 1062 | .data = .{ .array = arr_ty }, | ||
| 1063 | }; | ||
| 1064 | } | ||
| 1065 | |||
| 1066 | fn applyFormat(attr: Attribute, p: *Parser, ty: Type) !void { | ||
| 1067 | // TODO validate | ||
| 1068 | _ = ty; | ||
| 1069 | try p.attr_application_buf.append(p.gpa, attr); | ||
| 1070 | } | ||
deps/aro/aro/Attribute/names.def created+431| ... | @@ -0,0 +1,431 @@ | ||
| 1 | # multiple | ||
| 2 | deprecated | ||
| 3 | .tag = .deprecated | ||
| 4 | .c23 = true | ||
| 5 | .gnu = true | ||
| 6 | .declspec = true | ||
| 7 | |||
| 8 | fallthrough | ||
| 9 | .tag = .fallthrough | ||
| 10 | .c23 = true | ||
| 11 | .gnu = true | ||
| 12 | |||
| 13 | noreturn | ||
| 14 | .tag = .@"noreturn" | ||
| 15 | .c23 = true | ||
| 16 | .gnu = true | ||
| 17 | .declspec = true | ||
| 18 | |||
| 19 | no_sanitize_address | ||
| 20 | .tag = .no_sanitize_address | ||
| 21 | .gnu = true | ||
| 22 | .declspec = true | ||
| 23 | |||
| 24 | noinline | ||
| 25 | .tag = .@"noinline" | ||
| 26 | .gnu = true | ||
| 27 | .declspec = true | ||
| 28 | |||
| 29 | # c23 only | ||
| 30 | nodiscard | ||
| 31 | .tag = .nodiscard | ||
| 32 | .c23 = true | ||
| 33 | |||
| 34 | reproducible | ||
| 35 | .tag = .reproducible | ||
| 36 | .c23 = true | ||
| 37 | |||
| 38 | unsequenced | ||
| 39 | .tag = .unsequenced | ||
| 40 | .c23 = true | ||
| 41 | |||
| 42 | maybe_unused | ||
| 43 | .tag = .unused | ||
| 44 | .c23 = true | ||
| 45 | |||
| 46 | # gnu only | ||
| 47 | access | ||
| 48 | .tag = .access | ||
| 49 | .gnu = true | ||
| 50 | |||
| 51 | alias | ||
| 52 | .tag = .alias | ||
| 53 | .gnu = true | ||
| 54 | |||
| 55 | aligned | ||
| 56 | .tag = .aligned | ||
| 57 | .gnu = true | ||
| 58 | |||
| 59 | alloc_align | ||
| 60 | .tag = .alloc_align | ||
| 61 | .gnu = true | ||
| 62 | |||
| 63 | alloc_size | ||
| 64 | .tag = .alloc_size | ||
| 65 | .gnu = true | ||
| 66 | |||
| 67 | always_inline | ||
| 68 | .tag = .always_inline | ||
| 69 | .gnu = true | ||
| 70 | |||
| 71 | artificial | ||
| 72 | .tag = .artificial | ||
| 73 | .gnu = true | ||
| 74 | |||
| 75 | assume_aligned | ||
| 76 | .tag = .assume_aligned | ||
| 77 | .gnu = true | ||
| 78 | |||
| 79 | cleanup | ||
| 80 | .tag = .cleanup | ||
| 81 | .gnu = true | ||
| 82 | |||
| 83 | cold | ||
| 84 | .tag = .cold | ||
| 85 | .gnu = true | ||
| 86 | |||
| 87 | common | ||
| 88 | .tag = .common | ||
| 89 | .gnu = true | ||
| 90 | |||
| 91 | const | ||
| 92 | .tag = .@"const" | ||
| 93 | .gnu = true | ||
| 94 | |||
| 95 | constructor | ||
| 96 | .tag = .constructor | ||
| 97 | .gnu = true | ||
| 98 | |||
| 99 | copy | ||
| 100 | .tag = .copy | ||
| 101 | .gnu = true | ||
| 102 | |||
| 103 | designated_init | ||
| 104 | .tag = .designated_init | ||
| 105 | .gnu = true | ||
| 106 | |||
| 107 | destructor | ||
| 108 | .tag = .destructor | ||
| 109 | .gnu = true | ||
| 110 | |||
| 111 | error | ||
| 112 | .tag = .@"error" | ||
| 113 | .gnu = true | ||
| 114 | |||
| 115 | externally_visible | ||
| 116 | .tag = .externally_visible | ||
| 117 | .gnu = true | ||
| 118 | |||
| 119 | flatten | ||
| 120 | .tag = .flatten | ||
| 121 | .gnu = true | ||
| 122 | |||
| 123 | format | ||
| 124 | .tag = .format | ||
| 125 | .gnu = true | ||
| 126 | |||
| 127 | format_arg | ||
| 128 | .tag = .format_arg | ||
| 129 | .gnu = true | ||
| 130 | |||
| 131 | gnu_inline | ||
| 132 | .tag = .gnu_inline | ||
| 133 | .gnu = true | ||
| 134 | |||
| 135 | hot | ||
| 136 | .tag = .hot | ||
| 137 | .gnu = true | ||
| 138 | |||
| 139 | ifunc | ||
| 140 | .tag = .ifunc | ||
| 141 | .gnu = true | ||
| 142 | |||
| 143 | interrupt | ||
| 144 | .tag = .interrupt | ||
| 145 | .gnu = true | ||
| 146 | |||
| 147 | interrupt_handler | ||
| 148 | .tag = .interrupt_handler | ||
| 149 | .gnu = true | ||
| 150 | |||
| 151 | leaf | ||
| 152 | .tag = .leaf | ||
| 153 | .gnu = true | ||
| 154 | |||
| 155 | malloc | ||
| 156 | .tag = .malloc | ||
| 157 | .gnu = true | ||
| 158 | |||
| 159 | may_alias | ||
| 160 | .tag = .may_alias | ||
| 161 | .gnu = true | ||
| 162 | |||
| 163 | mode | ||
| 164 | .tag = .mode | ||
| 165 | .gnu = true | ||
| 166 | |||
| 167 | no_address_safety_analysis | ||
| 168 | .tag = .no_address_safety_analysis | ||
| 169 | .gnu = true | ||
| 170 | |||
| 171 | no_icf | ||
| 172 | .tag = .no_icf | ||
| 173 | .gnu = true | ||
| 174 | |||
| 175 | no_instrument_function | ||
| 176 | .tag = .no_instrument_function | ||
| 177 | .gnu = true | ||
| 178 | |||
| 179 | no_profile_instrument_function | ||
| 180 | .tag = .no_profile_instrument_function | ||
| 181 | .gnu = true | ||
| 182 | |||
| 183 | no_reorder | ||
| 184 | .tag = .no_reorder | ||
| 185 | .gnu = true | ||
| 186 | |||
| 187 | no_sanitize | ||
| 188 | .tag = .no_sanitize | ||
| 189 | .gnu = true | ||
| 190 | |||
| 191 | no_sanitize_coverage | ||
| 192 | .tag = .no_sanitize_coverage | ||
| 193 | .gnu = true | ||
| 194 | |||
| 195 | no_sanitize_thread | ||
| 196 | .tag = .no_sanitize_thread | ||
| 197 | .gnu = true | ||
| 198 | |||
| 199 | no_sanitize_undefined | ||
| 200 | .tag = .no_sanitize_undefined | ||
| 201 | .gnu = true | ||
| 202 | |||
| 203 | no_split_stack | ||
| 204 | .tag = .no_split_stack | ||
| 205 | .gnu = true | ||
| 206 | |||
| 207 | no_stack_limit | ||
| 208 | .tag = .no_stack_limit | ||
| 209 | .gnu = true | ||
| 210 | |||
| 211 | no_stack_protector | ||
| 212 | .tag = .no_stack_protector | ||
| 213 | .gnu = true | ||
| 214 | |||
| 215 | noclone | ||
| 216 | .tag = .noclone | ||
| 217 | .gnu = true | ||
| 218 | |||
| 219 | nocommon | ||
| 220 | .tag = .nocommon | ||
| 221 | .gnu = true | ||
| 222 | |||
| 223 | noinit | ||
| 224 | .tag = .noinit | ||
| 225 | .gnu = true | ||
| 226 | |||
| 227 | noipa | ||
| 228 | .tag = .noipa | ||
| 229 | .gnu = true | ||
| 230 | |||
| 231 | # nonnull | ||
| 232 | # .tag = .nonnull | ||
| 233 | # .gnu = true | ||
| 234 | |||
| 235 | nonstring | ||
| 236 | .tag = .nonstring | ||
| 237 | .gnu = true | ||
| 238 | |||
| 239 | noplt | ||
| 240 | .tag = .noplt | ||
| 241 | .gnu = true | ||
| 242 | |||
| 243 | # optimize | ||
| 244 | # .tag = .optimize | ||
| 245 | # .gnu = true | ||
| 246 | |||
| 247 | packed | ||
| 248 | .tag = .@"packed" | ||
| 249 | .gnu = true | ||
| 250 | |||
| 251 | patchable_function_entry | ||
| 252 | .tag = .patchable_function_entry | ||
| 253 | .gnu = true | ||
| 254 | |||
| 255 | persistent | ||
| 256 | .tag = .persistent | ||
| 257 | .gnu = true | ||
| 258 | |||
| 259 | pure | ||
| 260 | .tag = .pure | ||
| 261 | .gnu = true | ||
| 262 | |||
| 263 | retain | ||
| 264 | .tag = .retain | ||
| 265 | .gnu = true | ||
| 266 | |||
| 267 | returns_nonnull | ||
| 268 | .tag = .returns_nonnull | ||
| 269 | .gnu = true | ||
| 270 | |||
| 271 | returns_twice | ||
| 272 | .tag = .returns_twice | ||
| 273 | .gnu = true | ||
| 274 | |||
| 275 | scalar_storage_order | ||
| 276 | .tag = .scalar_storage_order | ||
| 277 | .gnu = true | ||
| 278 | |||
| 279 | section | ||
| 280 | .tag = .section | ||
| 281 | .gnu = true | ||
| 282 | |||
| 283 | sentinel | ||
| 284 | .tag = .sentinel | ||
| 285 | .gnu = true | ||
| 286 | |||
| 287 | simd | ||
| 288 | .tag = .simd | ||
| 289 | .gnu = true | ||
| 290 | |||
| 291 | stack_protect | ||
| 292 | .tag = .stack_protect | ||
| 293 | .gnu = true | ||
| 294 | |||
| 295 | symver | ||
| 296 | .tag = .symver | ||
| 297 | .gnu = true | ||
| 298 | |||
| 299 | target | ||
| 300 | .tag = .target | ||
| 301 | .gnu = true | ||
| 302 | |||
| 303 | target_clones | ||
| 304 | .tag = .target_clones | ||
| 305 | .gnu = true | ||
| 306 | |||
| 307 | tls_model | ||
| 308 | .tag = .tls_model | ||
| 309 | .gnu = true | ||
| 310 | |||
| 311 | transparent_union | ||
| 312 | .tag = .transparent_union | ||
| 313 | .gnu = true | ||
| 314 | |||
| 315 | unavailable | ||
| 316 | .tag = .unavailable | ||
| 317 | .gnu = true | ||
| 318 | |||
| 319 | uninitialized | ||
| 320 | .tag = .uninitialized | ||
| 321 | .gnu = true | ||
| 322 | |||
| 323 | unused | ||
| 324 | .tag = .unused | ||
| 325 | .gnu = true | ||
| 326 | |||
| 327 | used | ||
| 328 | .tag = .used | ||
| 329 | .gnu = true | ||
| 330 | |||
| 331 | vector_size | ||
| 332 | .tag = .vector_size | ||
| 333 | .gnu = true | ||
| 334 | |||
| 335 | visibility | ||
| 336 | .tag = .visibility | ||
| 337 | .gnu = true | ||
| 338 | |||
| 339 | warn_if_not_aligned | ||
| 340 | .tag = .warn_if_not_aligned | ||
| 341 | .gnu = true | ||
| 342 | |||
| 343 | warn_unused_result | ||
| 344 | .tag = .warn_unused_result | ||
| 345 | .gnu = true | ||
| 346 | |||
| 347 | warning | ||
| 348 | .tag = .warning | ||
| 349 | .gnu = true | ||
| 350 | |||
| 351 | weak | ||
| 352 | .tag = .weak | ||
| 353 | .gnu = true | ||
| 354 | |||
| 355 | weakref | ||
| 356 | .tag = .weakref | ||
| 357 | .gnu = true | ||
| 358 | |||
| 359 | zero_call_used_regs | ||
| 360 | .tag = .zero_call_used_regs | ||
| 361 | .gnu = true | ||
| 362 | |||
| 363 | # declspec only | ||
| 364 | align | ||
| 365 | .tag = .aligned | ||
| 366 | .declspec = true | ||
| 367 | |||
| 368 | allocate | ||
| 369 | .tag = .allocate | ||
| 370 | .declspec = true | ||
| 371 | |||
| 372 | allocator | ||
| 373 | .tag = .allocator | ||
| 374 | .declspec = true | ||
| 375 | |||
| 376 | appdomain | ||
| 377 | .tag = .appdomain | ||
| 378 | .declspec = true | ||
| 379 | |||
| 380 | code_seg | ||
| 381 | .tag = .code_seg | ||
| 382 | .declspec = true | ||
| 383 | |||
| 384 | dllexport | ||
| 385 | .tag = .dllexport | ||
| 386 | .declspec = true | ||
| 387 | |||
| 388 | dllimport | ||
| 389 | .tag = .dllimport | ||
| 390 | .declspec = true | ||
| 391 | |||
| 392 | jitintrinsic | ||
| 393 | .tag = .jitintrinsic | ||
| 394 | .declspec = true | ||
| 395 | |||
| 396 | naked | ||
| 397 | .tag = .naked | ||
| 398 | .declspec = true | ||
| 399 | |||
| 400 | noalias | ||
| 401 | .tag = .@"noalias" | ||
| 402 | .declspec = true | ||
| 403 | |||
| 404 | process | ||
| 405 | .tag = .process | ||
| 406 | .declspec = true | ||
| 407 | |||
| 408 | restrict | ||
| 409 | .tag = .restrict | ||
| 410 | .declspec = true | ||
| 411 | |||
| 412 | safebuffers | ||
| 413 | .tag = .safebuffers | ||
| 414 | .declspec = true | ||
| 415 | |||
| 416 | selectany | ||
| 417 | .tag = .selectany | ||
| 418 | .declspec = true | ||
| 419 | |||
| 420 | spectre | ||
| 421 | .tag = .spectre | ||
| 422 | .declspec = true | ||
| 423 | |||
| 424 | thread | ||
| 425 | .tag = .thread | ||
| 426 | .declspec = true | ||
| 427 | |||
| 428 | uuid | ||
| 429 | .tag = .uuid | ||
| 430 | .declspec = true | ||
| 431 | |||
deps/aro/aro/Builtins.zig created+397| ... | @@ -0,0 +1,397 @@ | ||
| 1 | const std = @import("std"); | ||
| 2 | const Compilation = @import("Compilation.zig"); | ||
| 3 | const Type = @import("Type.zig"); | ||
| 4 | const TypeDescription = @import("Builtins/TypeDescription.zig"); | ||
| 5 | const target_util = @import("target.zig"); | ||
| 6 | const StringId = @import("StringInterner.zig").StringId; | ||
| 7 | const LangOpts = @import("LangOpts.zig"); | ||
| 8 | const Parser = @import("Parser.zig"); | ||
| 9 | |||
| 10 | const Properties = @import("Builtins/Properties.zig"); | ||
| 11 | pub const Builtin = @import("Builtins/Builtin.def").with(Properties); | ||
| 12 | |||
| 13 | const Expanded = struct { | ||
| 14 | ty: Type, | ||
| 15 | builtin: Builtin, | ||
| 16 | }; | ||
| 17 | |||
| 18 | const NameToTypeMap = std.StringHashMapUnmanaged(Type); | ||
| 19 | |||
| 20 | const Builtins = @This(); | ||
| 21 | |||
| 22 | _name_to_type_map: NameToTypeMap = .{}, | ||
| 23 | |||
| 24 | pub fn deinit(b: *Builtins, gpa: std.mem.Allocator) void { | ||
| 25 | b._name_to_type_map.deinit(gpa); | ||
| 26 | } | ||
| 27 | |||
| 28 | fn specForSize(comp: *const Compilation, size_bits: u32) Type.Builder.Specifier { | ||
| 29 | var ty = Type{ .specifier = .short }; | ||
| 30 | if (ty.sizeof(comp).? * 8 == size_bits) return .short; | ||
| 31 | |||
| 32 | ty.specifier = .int; | ||
| 33 | if (ty.sizeof(comp).? * 8 == size_bits) return .int; | ||
| 34 | |||
| 35 | ty.specifier = .long; | ||
| 36 | if (ty.sizeof(comp).? * 8 == size_bits) return .long; | ||
| 37 | |||
| 38 | ty.specifier = .long_long; | ||
| 39 | if (ty.sizeof(comp).? * 8 == size_bits) return .long_long; | ||
| 40 | |||
| 41 | unreachable; | ||
| 42 | } | ||
| 43 | |||
| 44 | fn createType(desc: TypeDescription, it: *TypeDescription.TypeIterator, comp: *const Compilation, allocator: std.mem.Allocator) !Type { | ||
| 45 | var builder: Type.Builder = .{ .error_on_invalid = true }; | ||
| 46 | var require_native_int32 = false; | ||
| 47 | var require_native_int64 = false; | ||
| 48 | for (desc.prefix) |prefix| { | ||
| 49 | switch (prefix) { | ||
| 50 | .L => builder.combine(undefined, .long, 0) catch unreachable, | ||
| 51 | .LL => { | ||
| 52 | builder.combine(undefined, .long, 0) catch unreachable; | ||
| 53 | builder.combine(undefined, .long, 0) catch unreachable; | ||
| 54 | }, | ||
| 55 | .LLL => { | ||
| 56 | switch (builder.specifier) { | ||
| 57 | .none => builder.specifier = .int128, | ||
| 58 | .signed => builder.specifier = .sint128, | ||
| 59 | .unsigned => builder.specifier = .uint128, | ||
| 60 | else => unreachable, | ||
| 61 | } | ||
| 62 | }, | ||
| 63 | .Z => require_native_int32 = true, | ||
| 64 | .W => require_native_int64 = true, | ||
| 65 | .N => { | ||
| 66 | std.debug.assert(desc.spec == .i); | ||
| 67 | if (!target_util.isLP64(comp.target)) { | ||
| 68 | builder.combine(undefined, .long, 0) catch unreachable; | ||
| 69 | } | ||
| 70 | }, | ||
| 71 | .O => { | ||
| 72 | builder.combine(undefined, .long, 0) catch unreachable; | ||
| 73 | if (comp.target.os.tag != .opencl) { | ||
| 74 | builder.combine(undefined, .long, 0) catch unreachable; | ||
| 75 | } | ||
| 76 | }, | ||
| 77 | .S => builder.combine(undefined, .signed, 0) catch unreachable, | ||
| 78 | .U => builder.combine(undefined, .unsigned, 0) catch unreachable, | ||
| 79 | .I => { | ||
| 80 | // Todo: compile-time constant integer | ||
| 81 | }, | ||
| 82 | } | ||
| 83 | } | ||
| 84 | switch (desc.spec) { | ||
| 85 | .v => builder.combine(undefined, .void, 0) catch unreachable, | ||
| 86 | .b => builder.combine(undefined, .bool, 0) catch unreachable, | ||
| 87 | .c => builder.combine(undefined, .char, 0) catch unreachable, | ||
| 88 | .s => builder.combine(undefined, .short, 0) catch unreachable, | ||
| 89 | .i => { | ||
| 90 | if (require_native_int32) { | ||
| 91 | builder.specifier = specForSize(comp, 32); | ||
| 92 | } else if (require_native_int64) { | ||
| 93 | builder.specifier = specForSize(comp, 64); | ||
| 94 | } else { | ||
| 95 | switch (builder.specifier) { | ||
| 96 | .int128, .sint128, .uint128 => {}, | ||
| 97 | else => builder.combine(undefined, .int, 0) catch unreachable, | ||
| 98 | } | ||
| 99 | } | ||
| 100 | }, | ||
| 101 | .h => builder.combine(undefined, .fp16, 0) catch unreachable, | ||
| 102 | .x => { | ||
| 103 | // Todo: _Float16 | ||
| 104 | return .{ .specifier = .invalid }; | ||
| 105 | }, | ||
| 106 | .y => { | ||
| 107 | // Todo: __bf16 | ||
| 108 | return .{ .specifier = .invalid }; | ||
| 109 | }, | ||
| 110 | .f => builder.combine(undefined, .float, 0) catch unreachable, | ||
| 111 | .d => { | ||
| 112 | if (builder.specifier == .long_long) { | ||
| 113 | builder.specifier = .float128; | ||
| 114 | } else { | ||
| 115 | builder.combine(undefined, .double, 0) catch unreachable; | ||
| 116 | } | ||
| 117 | }, | ||
| 118 | .z => { | ||
| 119 | std.debug.assert(builder.specifier == .none); | ||
| 120 | builder.specifier = Type.Builder.fromType(comp.types.size); | ||
| 121 | }, | ||
| 122 | .w => { | ||
| 123 | std.debug.assert(builder.specifier == .none); | ||
| 124 | builder.specifier = Type.Builder.fromType(comp.types.wchar); | ||
| 125 | }, | ||
| 126 | .F => { | ||
| 127 | std.debug.assert(builder.specifier == .none); | ||
| 128 | builder.specifier = Type.Builder.fromType(comp.types.ns_constant_string.ty); | ||
| 129 | }, | ||
| 130 | .G => { | ||
| 131 | // Todo: id | ||
| 132 | return .{ .specifier = .invalid }; | ||
| 133 | }, | ||
| 134 | .H => { | ||
| 135 | // Todo: SEL | ||
| 136 | return .{ .specifier = .invalid }; | ||
| 137 | }, | ||
| 138 | .M => { | ||
| 139 | // Todo: struct objc_super | ||
| 140 | return .{ .specifier = .invalid }; | ||
| 141 | }, | ||
| 142 | .a => { | ||
| 143 | std.debug.assert(builder.specifier == .none); | ||
| 144 | std.debug.assert(desc.suffix.len == 0); | ||
| 145 | builder.specifier = Type.Builder.fromType(comp.types.va_list); | ||
| 146 | }, | ||
| 147 | .A => { | ||
| 148 | std.debug.assert(builder.specifier == .none); | ||
| 149 | std.debug.assert(desc.suffix.len == 0); | ||
| 150 | var va_list = comp.types.va_list; | ||
| 151 | if (va_list.isArray()) va_list.decayArray(); | ||
| 152 | builder.specifier = Type.Builder.fromType(va_list); | ||
| 153 | }, | ||
| 154 | .V => |element_count| { | ||
| 155 | std.debug.assert(desc.suffix.len == 0); | ||
| 156 | const child_desc = it.next().?; | ||
| 157 | const child_ty = try createType(child_desc, undefined, comp, allocator); | ||
| 158 | const arr_ty = try allocator.create(Type.Array); | ||
| 159 | arr_ty.* = .{ | ||
| 160 | .len = element_count, | ||
| 161 | .elem = child_ty, | ||
| 162 | }; | ||
| 163 | const vector_ty = .{ .specifier = .vector, .data = .{ .array = arr_ty } }; | ||
| 164 | builder.specifier = Type.Builder.fromType(vector_ty); | ||
| 165 | }, | ||
| 166 | .q => { | ||
| 167 | // Todo: scalable vector | ||
| 168 | return .{ .specifier = .invalid }; | ||
| 169 | }, | ||
| 170 | .E => { | ||
| 171 | // Todo: ext_vector (OpenCL vector) | ||
| 172 | return .{ .specifier = .invalid }; | ||
| 173 | }, | ||
| 174 | .X => |child| { | ||
| 175 | builder.combine(undefined, .complex, 0) catch unreachable; | ||
| 176 | switch (child) { | ||
| 177 | .float => builder.combine(undefined, .float, 0) catch unreachable, | ||
| 178 | .double => builder.combine(undefined, .double, 0) catch unreachable, | ||
| 179 | .longdouble => { | ||
| 180 | builder.combine(undefined, .long, 0) catch unreachable; | ||
| 181 | builder.combine(undefined, .double, 0) catch unreachable; | ||
| 182 | }, | ||
| 183 | } | ||
| 184 | }, | ||
| 185 | .Y => { | ||
| 186 | std.debug.assert(builder.specifier == .none); | ||
| 187 | std.debug.assert(desc.suffix.len == 0); | ||
| 188 | builder.specifier = Type.Builder.fromType(comp.types.ptrdiff); | ||
| 189 | }, | ||
| 190 | .P => { | ||
| 191 | std.debug.assert(builder.specifier == .none); | ||
| 192 | if (comp.types.file.specifier == .invalid) { | ||
| 193 | return comp.types.file; | ||
| 194 | } | ||
| 195 | builder.specifier = Type.Builder.fromType(comp.types.file); | ||
| 196 | }, | ||
| 197 | .J => { | ||
| 198 | std.debug.assert(builder.specifier == .none); | ||
| 199 | std.debug.assert(desc.suffix.len == 0); | ||
| 200 | if (comp.types.jmp_buf.specifier == .invalid) { | ||
| 201 | return comp.types.jmp_buf; | ||
| 202 | } | ||
| 203 | builder.specifier = Type.Builder.fromType(comp.types.jmp_buf); | ||
| 204 | }, | ||
| 205 | .SJ => { | ||
| 206 | std.debug.assert(builder.specifier == .none); | ||
| 207 | std.debug.assert(desc.suffix.len == 0); | ||
| 208 | if (comp.types.sigjmp_buf.specifier == .invalid) { | ||
| 209 | return comp.types.sigjmp_buf; | ||
| 210 | } | ||
| 211 | builder.specifier = Type.Builder.fromType(comp.types.sigjmp_buf); | ||
| 212 | }, | ||
| 213 | .K => { | ||
| 214 | std.debug.assert(builder.specifier == .none); | ||
| 215 | if (comp.types.ucontext_t.specifier == .invalid) { | ||
| 216 | return comp.types.ucontext_t; | ||
| 217 | } | ||
| 218 | builder.specifier = Type.Builder.fromType(comp.types.ucontext_t); | ||
| 219 | }, | ||
| 220 | .p => { | ||
| 221 | std.debug.assert(builder.specifier == .none); | ||
| 222 | std.debug.assert(desc.suffix.len == 0); | ||
| 223 | builder.specifier = Type.Builder.fromType(comp.types.pid_t); | ||
| 224 | }, | ||
| 225 | .@"!" => return .{ .specifier = .invalid }, | ||
| 226 | } | ||
| 227 | for (desc.suffix) |suffix| { | ||
| 228 | switch (suffix) { | ||
| 229 | .@"*" => |address_space| { | ||
| 230 | _ = address_space; // TODO: handle address space | ||
| 231 | const elem_ty = try allocator.create(Type); | ||
| 232 | elem_ty.* = builder.finish(undefined) catch unreachable; | ||
| 233 | const ty = Type{ | ||
| 234 | .specifier = .pointer, | ||
| 235 | .data = .{ .sub_type = elem_ty }, | ||
| 236 | }; | ||
| 237 | builder.qual = .{}; | ||
| 238 | builder.specifier = Type.Builder.fromType(ty); | ||
| 239 | }, | ||
| 240 | .C => builder.qual.@"const" = 0, | ||
| 241 | .D => builder.qual.@"volatile" = 0, | ||
| 242 | .R => builder.qual.restrict = 0, | ||
| 243 | } | ||
| 244 | } | ||
| 245 | return builder.finish(undefined) catch unreachable; | ||
| 246 | } | ||
| 247 | |||
| 248 | fn createBuiltin(comp: *const Compilation, builtin: Builtin, type_arena: std.mem.Allocator) !Type { | ||
| 249 | var it = TypeDescription.TypeIterator.init(builtin.properties.param_str); | ||
| 250 | |||
| 251 | const ret_ty_desc = it.next().?; | ||
| 252 | if (ret_ty_desc.spec == .@"!") { | ||
| 253 | // Todo: handle target-dependent definition | ||
| 254 | } | ||
| 255 | const ret_ty = try createType(ret_ty_desc, &it, comp, type_arena); | ||
| 256 | var param_count: usize = 0; | ||
| 257 | var params: [Builtin.max_param_count]Type.Func.Param = undefined; | ||
| 258 | while (it.next()) |desc| : (param_count += 1) { | ||
| 259 | params[param_count] = .{ .name_tok = 0, .ty = try createType(desc, &it, comp, type_arena), .name = .empty }; | ||
| 260 | } | ||
| 261 | |||
| 262 | const duped_params = try type_arena.dupe(Type.Func.Param, params[0..param_count]); | ||
| 263 | const func = try type_arena.create(Type.Func); | ||
| 264 | |||
| 265 | func.* = .{ | ||
| 266 | .return_type = ret_ty, | ||
| 267 | .params = duped_params, | ||
| 268 | }; | ||
| 269 | return .{ | ||
| 270 | .specifier = if (builtin.properties.isVarArgs()) .var_args_func else .func, | ||
| 271 | .data = .{ .func = func }, | ||
| 272 | }; | ||
| 273 | } | ||
| 274 | |||
| 275 | /// Asserts that the builtin has already been created | ||
| 276 | pub fn lookup(b: *const Builtins, name: []const u8) Expanded { | ||
| 277 | const builtin = Builtin.fromName(name).?; | ||
| 278 | const ty = b._name_to_type_map.get(name).?; | ||
| 279 | return .{ | ||
| 280 | .builtin = builtin, | ||
| 281 | .ty = ty, | ||
| 282 | }; | ||
| 283 | } | ||
| 284 | |||
| 285 | pub fn getOrCreate(b: *Builtins, comp: *Compilation, name: []const u8, type_arena: std.mem.Allocator) !?Expanded { | ||
| 286 | const ty = b._name_to_type_map.get(name) orelse { | ||
| 287 | const builtin = Builtin.fromName(name) orelse return null; | ||
| 288 | if (!comp.hasBuiltinFunction(builtin)) return null; | ||
| 289 | |||
| 290 | try b._name_to_type_map.ensureUnusedCapacity(comp.gpa, 1); | ||
| 291 | const ty = try createBuiltin(comp, builtin, type_arena); | ||
| 292 | b._name_to_type_map.putAssumeCapacity(name, ty); | ||
| 293 | |||
| 294 | return .{ | ||
| 295 | .builtin = builtin, | ||
| 296 | .ty = ty, | ||
| 297 | }; | ||
| 298 | }; | ||
| 299 | const builtin = Builtin.fromName(name).?; | ||
| 300 | return .{ | ||
| 301 | .builtin = builtin, | ||
| 302 | .ty = ty, | ||
| 303 | }; | ||
| 304 | } | ||
| 305 | |||
| 306 | pub const Iterator = struct { | ||
| 307 | index: u16 = 1, | ||
| 308 | name_buf: [Builtin.longest_name]u8 = undefined, | ||
| 309 | |||
| 310 | pub const Entry = struct { | ||
| 311 | /// Memory of this slice is overwritten on every call to `next` | ||
| 312 | name: []const u8, | ||
| 313 | builtin: Builtin, | ||
| 314 | }; | ||
| 315 | |||
| 316 | pub fn next(self: *Iterator) ?Entry { | ||
| 317 | if (self.index > Builtin.data.len) return null; | ||
| 318 | const index = self.index; | ||
| 319 | const data_index = index - 1; | ||
| 320 | self.index += 1; | ||
| 321 | return .{ | ||
| 322 | .name = Builtin.nameFromUniqueIndex(index, &self.name_buf), | ||
| 323 | .builtin = Builtin.data[data_index], | ||
| 324 | }; | ||
| 325 | } | ||
| 326 | }; | ||
| 327 | |||
| 328 | test Iterator { | ||
| 329 | var it = Iterator{}; | ||
| 330 | |||
| 331 | var seen = std.StringHashMap(Builtin).init(std.testing.allocator); | ||
| 332 | defer seen.deinit(); | ||
| 333 | |||
| 334 | var arena_state = std.heap.ArenaAllocator.init(std.testing.allocator); | ||
| 335 | defer arena_state.deinit(); | ||
| 336 | const arena = arena_state.allocator(); | ||
| 337 | |||
| 338 | while (it.next()) |entry| { | ||
| 339 | const index = Builtin.uniqueIndex(entry.name).?; | ||
| 340 | var buf: [Builtin.longest_name]u8 = undefined; | ||
| 341 | const name_from_index = Builtin.nameFromUniqueIndex(index, &buf); | ||
| 342 | try std.testing.expectEqualStrings(entry.name, name_from_index); | ||
| 343 | |||
| 344 | if (seen.contains(entry.name)) { | ||
| 345 | std.debug.print("iterated over {s} twice\n", .{entry.name}); | ||
| 346 | std.debug.print("current data: {}\n", .{entry.builtin}); | ||
| 347 | std.debug.print("previous data: {}\n", .{seen.get(entry.name).?}); | ||
| 348 | return error.TestExpectedUniqueEntries; | ||
| 349 | } | ||
| 350 | try seen.put(try arena.dupe(u8, entry.name), entry.builtin); | ||
| 351 | } | ||
| 352 | try std.testing.expectEqual(@as(usize, Builtin.data.len), seen.count()); | ||
| 353 | } | ||
| 354 | |||
| 355 | test "All builtins" { | ||
| 356 | var comp = Compilation.init(std.testing.allocator); | ||
| 357 | defer comp.deinit(); | ||
| 358 | _ = try comp.generateBuiltinMacros(.include_system_defines); | ||
| 359 | var arena = std.heap.ArenaAllocator.init(std.testing.allocator); | ||
| 360 | defer arena.deinit(); | ||
| 361 | |||
| 362 | const type_arena = arena.allocator(); | ||
| 363 | |||
| 364 | var builtin_it = Iterator{}; | ||
| 365 | while (builtin_it.next()) |entry| { | ||
| 366 | const name = try type_arena.dupe(u8, entry.name); | ||
| 367 | if (try comp.builtins.getOrCreate(&comp, name, type_arena)) |func_ty| { | ||
| 368 | const get_again = (try comp.builtins.getOrCreate(&comp, name, std.testing.failing_allocator)).?; | ||
| 369 | const found_by_lookup = comp.builtins.lookup(name); | ||
| 370 | try std.testing.expectEqual(func_ty.builtin.tag, get_again.builtin.tag); | ||
| 371 | try std.testing.expectEqual(func_ty.builtin.tag, found_by_lookup.builtin.tag); | ||
| 372 | } | ||
| 373 | } | ||
| 374 | } | ||
| 375 | |||
| 376 | test "Allocation failures" { | ||
| 377 | const Test = struct { | ||
| 378 | fn testOne(allocator: std.mem.Allocator) !void { | ||
| 379 | var comp = Compilation.init(allocator); | ||
| 380 | defer comp.deinit(); | ||
| 381 | _ = try comp.generateBuiltinMacros(.include_system_defines); | ||
| 382 | var arena = std.heap.ArenaAllocator.init(comp.gpa); | ||
| 383 | defer arena.deinit(); | ||
| 384 | |||
| 385 | const type_arena = arena.allocator(); | ||
| 386 | |||
| 387 | const num_builtins = 40; | ||
| 388 | var builtin_it = Iterator{}; | ||
| 389 | for (0..num_builtins) |_| { | ||
| 390 | const entry = builtin_it.next().?; | ||
| 391 | _ = try comp.builtins.getOrCreate(&comp, entry.name, type_arena); | ||
| 392 | } | ||
| 393 | } | ||
| 394 | }; | ||
| 395 | |||
| 396 | try std.testing.checkAllAllocationFailures(std.testing.allocator, Test.testOne, .{}); | ||
| 397 | } | ||
deps/aro/aro/Builtins/Builtin.def created+17010| ... | @@ -0,0 +1,17010 @@ | ||
| 1 | const TargetSet = Properties.TargetSet; | ||
| 2 | |||
| 3 | # TODO this file is generated from LLVM sources and | ||
| 4 | # needs cleanup to be considered source. | ||
| 5 | |||
| 6 | pub const max_param_count = 12; | ||
| 7 | |||
| 8 | _Block_object_assign | ||
| 9 | .param_str = "vv*vC*iC" | ||
| 10 | .header = .blocks | ||
| 11 | .attributes = .{ .lib_function_without_prefix = true } | ||
| 12 | |||
| 13 | _Block_object_dispose | ||
| 14 | .param_str = "vvC*iC" | ||
| 15 | .header = .blocks | ||
| 16 | .attributes = .{ .lib_function_without_prefix = true } | ||
| 17 | |||
| 18 | _Exit | ||
| 19 | .param_str = "vi" | ||
| 20 | .header = .stdlib | ||
| 21 | .attributes = .{ .noreturn = true, .lib_function_without_prefix = true } | ||
| 22 | |||
| 23 | _InterlockedAnd | ||
| 24 | .param_str = "NiNiD*Ni" | ||
| 25 | .language = .all_ms_languages | ||
| 26 | |||
| 27 | _InterlockedAnd16 | ||
| 28 | .param_str = "ssD*s" | ||
| 29 | .language = .all_ms_languages | ||
| 30 | |||
| 31 | _InterlockedAnd8 | ||
| 32 | .param_str = "ccD*c" | ||
| 33 | .language = .all_ms_languages | ||
| 34 | |||
| 35 | _InterlockedCompareExchange | ||
| 36 | .param_str = "NiNiD*NiNi" | ||
| 37 | .language = .all_ms_languages | ||
| 38 | |||
| 39 | _InterlockedCompareExchange16 | ||
| 40 | .param_str = "ssD*ss" | ||
| 41 | .language = .all_ms_languages | ||
| 42 | |||
| 43 | _InterlockedCompareExchange64 | ||
| 44 | .param_str = "LLiLLiD*LLiLLi" | ||
| 45 | .language = .all_ms_languages | ||
| 46 | |||
| 47 | _InterlockedCompareExchange8 | ||
| 48 | .param_str = "ccD*cc" | ||
| 49 | .language = .all_ms_languages | ||
| 50 | |||
| 51 | _InterlockedCompareExchangePointer | ||
| 52 | .param_str = "v*v*D*v*v*" | ||
| 53 | .language = .all_ms_languages | ||
| 54 | |||
| 55 | _InterlockedCompareExchangePointer_nf | ||
| 56 | .param_str = "v*v*D*v*v*" | ||
| 57 | .language = .all_ms_languages | ||
| 58 | |||
| 59 | _InterlockedDecrement | ||
| 60 | .param_str = "NiNiD*" | ||
| 61 | .language = .all_ms_languages | ||
| 62 | |||
| 63 | _InterlockedDecrement16 | ||
| 64 | .param_str = "ssD*" | ||
| 65 | .language = .all_ms_languages | ||
| 66 | |||
| 67 | _InterlockedExchange | ||
| 68 | .param_str = "NiNiD*Ni" | ||
| 69 | .language = .all_ms_languages | ||
| 70 | |||
| 71 | _InterlockedExchange16 | ||
| 72 | .param_str = "ssD*s" | ||
| 73 | .language = .all_ms_languages | ||
| 74 | |||
| 75 | _InterlockedExchange8 | ||
| 76 | .param_str = "ccD*c" | ||
| 77 | .language = .all_ms_languages | ||
| 78 | |||
| 79 | _InterlockedExchangeAdd | ||
| 80 | .param_str = "NiNiD*Ni" | ||
| 81 | .language = .all_ms_languages | ||
| 82 | |||
| 83 | _InterlockedExchangeAdd16 | ||
| 84 | .param_str = "ssD*s" | ||
| 85 | .language = .all_ms_languages | ||
| 86 | |||
| 87 | _InterlockedExchangeAdd8 | ||
| 88 | .param_str = "ccD*c" | ||
| 89 | .language = .all_ms_languages | ||
| 90 | |||
| 91 | _InterlockedExchangePointer | ||
| 92 | .param_str = "v*v*D*v*" | ||
| 93 | .language = .all_ms_languages | ||
| 94 | |||
| 95 | _InterlockedExchangeSub | ||
| 96 | .param_str = "NiNiD*Ni" | ||
| 97 | .language = .all_ms_languages | ||
| 98 | |||
| 99 | _InterlockedExchangeSub16 | ||
| 100 | .param_str = "ssD*s" | ||
| 101 | .language = .all_ms_languages | ||
| 102 | |||
| 103 | _InterlockedExchangeSub8 | ||
| 104 | .param_str = "ccD*c" | ||
| 105 | .language = .all_ms_languages | ||
| 106 | |||
| 107 | _InterlockedIncrement | ||
| 108 | .param_str = "NiNiD*" | ||
| 109 | .language = .all_ms_languages | ||
| 110 | |||
| 111 | _InterlockedIncrement16 | ||
| 112 | .param_str = "ssD*" | ||
| 113 | .language = .all_ms_languages | ||
| 114 | |||
| 115 | _InterlockedOr | ||
| 116 | .param_str = "NiNiD*Ni" | ||
| 117 | .language = .all_ms_languages | ||
| 118 | |||
| 119 | _InterlockedOr16 | ||
| 120 | .param_str = "ssD*s" | ||
| 121 | .language = .all_ms_languages | ||
| 122 | |||
| 123 | _InterlockedOr8 | ||
| 124 | .param_str = "ccD*c" | ||
| 125 | .language = .all_ms_languages | ||
| 126 | |||
| 127 | _InterlockedXor | ||
| 128 | .param_str = "NiNiD*Ni" | ||
| 129 | .language = .all_ms_languages | ||
| 130 | |||
| 131 | _InterlockedXor16 | ||
| 132 | .param_str = "ssD*s" | ||
| 133 | .language = .all_ms_languages | ||
| 134 | |||
| 135 | _InterlockedXor8 | ||
| 136 | .param_str = "ccD*c" | ||
| 137 | .language = .all_ms_languages | ||
| 138 | |||
| 139 | _MoveFromCoprocessor | ||
| 140 | .param_str = "UiIUiIUiIUiIUiIUi" | ||
| 141 | .language = .all_ms_languages | ||
| 142 | .target_set = TargetSet.initOne(.arm) | ||
| 143 | |||
| 144 | _MoveFromCoprocessor2 | ||
| 145 | .param_str = "UiIUiIUiIUiIUiIUi" | ||
| 146 | .language = .all_ms_languages | ||
| 147 | .target_set = TargetSet.initOne(.arm) | ||
| 148 | |||
| 149 | _MoveToCoprocessor | ||
| 150 | .param_str = "vUiIUiIUiIUiIUiIUi" | ||
| 151 | .language = .all_ms_languages | ||
| 152 | .target_set = TargetSet.initOne(.arm) | ||
| 153 | |||
| 154 | _MoveToCoprocessor2 | ||
| 155 | .param_str = "vUiIUiIUiIUiIUiIUi" | ||
| 156 | .language = .all_ms_languages | ||
| 157 | .target_set = TargetSet.initOne(.arm) | ||
| 158 | |||
| 159 | _ReturnAddress | ||
| 160 | .param_str = "v*" | ||
| 161 | .language = .all_ms_languages | ||
| 162 | |||
| 163 | __GetExceptionInfo | ||
| 164 | .param_str = "v*." | ||
| 165 | .language = .all_ms_languages | ||
| 166 | .attributes = .{ .custom_typecheck = true, .eval_args = false } | ||
| 167 | |||
| 168 | __abnormal_termination | ||
| 169 | .param_str = "i" | ||
| 170 | .language = .all_ms_languages | ||
| 171 | |||
| 172 | __annotation | ||
| 173 | .param_str = "wC*." | ||
| 174 | .language = .all_ms_languages | ||
| 175 | |||
| 176 | __arithmetic_fence | ||
| 177 | .param_str = "v." | ||
| 178 | .attributes = .{ .custom_typecheck = true, .const_evaluable = true } | ||
| 179 | |||
| 180 | __assume | ||
| 181 | .param_str = "vb" | ||
| 182 | .language = .all_ms_languages | ||
| 183 | .attributes = .{ .const_evaluable = true } | ||
| 184 | |||
| 185 | __atomic_always_lock_free | ||
| 186 | .param_str = "bzvCD*" | ||
| 187 | .attributes = .{ .const_evaluable = true } | ||
| 188 | |||
| 189 | __atomic_clear | ||
| 190 | .param_str = "vvD*i" | ||
| 191 | |||
| 192 | __atomic_is_lock_free | ||
| 193 | .param_str = "bzvCD*" | ||
| 194 | .attributes = .{ .const_evaluable = true } | ||
| 195 | |||
| 196 | __atomic_signal_fence | ||
| 197 | .param_str = "vi" | ||
| 198 | |||
| 199 | __atomic_test_and_set | ||
| 200 | .param_str = "bvD*i" | ||
| 201 | |||
| 202 | __atomic_thread_fence | ||
| 203 | .param_str = "vi" | ||
| 204 | |||
| 205 | __builtin___CFStringMakeConstantString | ||
| 206 | .param_str = "FC*cC*" | ||
| 207 | .attributes = .{ .@"const" = true, .const_evaluable = true } | ||
| 208 | |||
| 209 | __builtin___NSStringMakeConstantString | ||
| 210 | .param_str = "FC*cC*" | ||
| 211 | .attributes = .{ .@"const" = true, .const_evaluable = true } | ||
| 212 | |||
| 213 | __builtin___clear_cache | ||
| 214 | .param_str = "vc*c*" | ||
| 215 | |||
| 216 | __builtin___fprintf_chk | ||
| 217 | .param_str = "iP*RicC*R." | ||
| 218 | .attributes = .{ .lib_function_with_builtin_prefix = true, .format_kind = .printf, .format_string_position = 2 } | ||
| 219 | |||
| 220 | __builtin___get_unsafe_stack_bottom | ||
| 221 | .param_str = "v*" | ||
| 222 | .attributes = .{ .lib_function_with_builtin_prefix = true } | ||
| 223 | |||
| 224 | __builtin___get_unsafe_stack_ptr | ||
| 225 | .param_str = "v*" | ||
| 226 | .attributes = .{ .lib_function_with_builtin_prefix = true } | ||
| 227 | |||
| 228 | __builtin___get_unsafe_stack_start | ||
| 229 | .param_str = "v*" | ||
| 230 | .attributes = .{ .lib_function_with_builtin_prefix = true } | ||
| 231 | |||
| 232 | __builtin___get_unsafe_stack_top | ||
| 233 | .param_str = "v*" | ||
| 234 | .attributes = .{ .lib_function_with_builtin_prefix = true } | ||
| 235 | |||
| 236 | __builtin___memccpy_chk | ||
| 237 | .param_str = "v*v*vC*izz" | ||
| 238 | .attributes = .{ .lib_function_with_builtin_prefix = true } | ||
| 239 | |||
| 240 | __builtin___memcpy_chk | ||
| 241 | .param_str = "v*v*vC*zz" | ||
| 242 | .attributes = .{ .lib_function_with_builtin_prefix = true } | ||
| 243 | |||
| 244 | __builtin___memmove_chk | ||
| 245 | .param_str = "v*v*vC*zz" | ||
| 246 | .attributes = .{ .lib_function_with_builtin_prefix = true } | ||
| 247 | |||
| 248 | __builtin___mempcpy_chk | ||
| 249 | .param_str = "v*v*vC*zz" | ||
| 250 | .attributes = .{ .lib_function_with_builtin_prefix = true } | ||
| 251 | |||
| 252 | __builtin___memset_chk | ||
| 253 | .param_str = "v*v*izz" | ||
| 254 | .attributes = .{ .lib_function_with_builtin_prefix = true } | ||
| 255 | |||
| 256 | __builtin___printf_chk | ||
| 257 | .param_str = "iicC*R." | ||
| 258 | .attributes = .{ .lib_function_with_builtin_prefix = true, .format_kind = .printf, .format_string_position = 1 } | ||
| 259 | |||
| 260 | __builtin___snprintf_chk | ||
| 261 | .param_str = "ic*RzizcC*R." | ||
| 262 | .attributes = .{ .lib_function_with_builtin_prefix = true, .format_kind = .printf, .format_string_position = 4 } | ||
| 263 | |||
| 264 | __builtin___sprintf_chk | ||
| 265 | .param_str = "ic*RizcC*R." | ||
| 266 | .attributes = .{ .lib_function_with_builtin_prefix = true, .format_kind = .printf, .format_string_position = 3 } | ||
| 267 | |||
| 268 | __builtin___stpcpy_chk | ||
| 269 | .param_str = "c*c*cC*z" | ||
| 270 | .attributes = .{ .lib_function_with_builtin_prefix = true } | ||
| 271 | |||
| 272 | __builtin___stpncpy_chk | ||
| 273 | .param_str = "c*c*cC*zz" | ||
| 274 | .attributes = .{ .lib_function_with_builtin_prefix = true } | ||
| 275 | |||
| 276 | __builtin___strcat_chk | ||
| 277 | .param_str = "c*c*cC*z" | ||
| 278 | .attributes = .{ .lib_function_with_builtin_prefix = true } | ||
| 279 | |||
| 280 | __builtin___strcpy_chk | ||
| 281 | .param_str = "c*c*cC*z" | ||
| 282 | .attributes = .{ .lib_function_with_builtin_prefix = true } | ||
| 283 | |||
| 284 | __builtin___strlcat_chk | ||
| 285 | .param_str = "zc*cC*zz" | ||
| 286 | .attributes = .{ .lib_function_with_builtin_prefix = true } | ||
| 287 | |||
| 288 | __builtin___strlcpy_chk | ||
| 289 | .param_str = "zc*cC*zz" | ||
| 290 | .attributes = .{ .lib_function_with_builtin_prefix = true } | ||
| 291 | |||
| 292 | __builtin___strncat_chk | ||
| 293 | .param_str = "c*c*cC*zz" | ||
| 294 | .attributes = .{ .lib_function_with_builtin_prefix = true } | ||
| 295 | |||
| 296 | __builtin___strncpy_chk | ||
| 297 | .param_str = "c*c*cC*zz" | ||
| 298 | .attributes = .{ .lib_function_with_builtin_prefix = true } | ||
| 299 | |||
| 300 | __builtin___vfprintf_chk | ||
| 301 | .param_str = "iP*RicC*Ra" | ||
| 302 | .attributes = .{ .lib_function_with_builtin_prefix = true, .format_kind = .vprintf, .format_string_position = 2 } | ||
| 303 | |||
| 304 | __builtin___vprintf_chk | ||
| 305 | .param_str = "iicC*Ra" | ||
| 306 | .attributes = .{ .lib_function_with_builtin_prefix = true, .format_kind = .vprintf, .format_string_position = 1 } | ||
| 307 | |||
| 308 | __builtin___vsnprintf_chk | ||
| 309 | .param_str = "ic*RzizcC*Ra" | ||
| 310 | .attributes = .{ .lib_function_with_builtin_prefix = true, .format_kind = .vprintf, .format_string_position = 4 } | ||
| 311 | |||
| 312 | __builtin___vsprintf_chk | ||
| 313 | .param_str = "ic*RizcC*Ra" | ||
| 314 | .attributes = .{ .lib_function_with_builtin_prefix = true, .format_kind = .vprintf, .format_string_position = 3 } | ||
| 315 | |||
| 316 | __builtin_abort | ||
| 317 | .param_str = "v" | ||
| 318 | .attributes = .{ .noreturn = true, .lib_function_with_builtin_prefix = true } | ||
| 319 | |||
| 320 | __builtin_abs | ||
| 321 | .param_str = "ii" | ||
| 322 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } | ||
| 323 | |||
| 324 | __builtin_acos | ||
| 325 | .param_str = "dd" | ||
| 326 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 327 | |||
| 328 | __builtin_acosf | ||
| 329 | .param_str = "ff" | ||
| 330 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 331 | |||
| 332 | __builtin_acosf128 | ||
| 333 | .param_str = "LLdLLd" | ||
| 334 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 335 | |||
| 336 | __builtin_acosh | ||
| 337 | .param_str = "dd" | ||
| 338 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 339 | |||
| 340 | __builtin_acoshf | ||
| 341 | .param_str = "ff" | ||
| 342 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 343 | |||
| 344 | __builtin_acoshf128 | ||
| 345 | .param_str = "LLdLLd" | ||
| 346 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 347 | |||
| 348 | __builtin_acoshl | ||
| 349 | .param_str = "LdLd" | ||
| 350 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 351 | |||
| 352 | __builtin_acosl | ||
| 353 | .param_str = "LdLd" | ||
| 354 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 355 | |||
| 356 | __builtin_add_overflow | ||
| 357 | .param_str = "b." | ||
| 358 | .attributes = .{ .custom_typecheck = true, .const_evaluable = true } | ||
| 359 | |||
| 360 | __builtin_addc | ||
| 361 | .param_str = "UiUiCUiCUiCUi*" | ||
| 362 | |||
| 363 | __builtin_addcb | ||
| 364 | .param_str = "UcUcCUcCUcCUc*" | ||
| 365 | |||
| 366 | __builtin_addcl | ||
| 367 | .param_str = "ULiULiCULiCULiCULi*" | ||
| 368 | |||
| 369 | __builtin_addcll | ||
| 370 | .param_str = "ULLiULLiCULLiCULLiCULLi*" | ||
| 371 | |||
| 372 | __builtin_addcs | ||
| 373 | .param_str = "UsUsCUsCUsCUs*" | ||
| 374 | |||
| 375 | __builtin_align_down | ||
| 376 | .param_str = "v*vC*z" | ||
| 377 | .attributes = .{ .@"const" = true, .custom_typecheck = true, .const_evaluable = true } | ||
| 378 | |||
| 379 | __builtin_align_up | ||
| 380 | .param_str = "v*vC*z" | ||
| 381 | .attributes = .{ .@"const" = true, .custom_typecheck = true, .const_evaluable = true } | ||
| 382 | |||
| 383 | __builtin_alloca | ||
| 384 | .param_str = "v*z" | ||
| 385 | .attributes = .{ .lib_function_with_builtin_prefix = true } | ||
| 386 | |||
| 387 | __builtin_alloca_uninitialized | ||
| 388 | .param_str = "v*z" | ||
| 389 | .attributes = .{ .lib_function_with_builtin_prefix = true } | ||
| 390 | |||
| 391 | __builtin_alloca_with_align | ||
| 392 | .param_str = "v*zIz" | ||
| 393 | .attributes = .{ .lib_function_with_builtin_prefix = true } | ||
| 394 | |||
| 395 | __builtin_alloca_with_align_uninitialized | ||
| 396 | .param_str = "v*zIz" | ||
| 397 | .attributes = .{ .lib_function_with_builtin_prefix = true } | ||
| 398 | |||
| 399 | __builtin_amdgcn_alignbit | ||
| 400 | .param_str = "UiUiUiUi" | ||
| 401 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 402 | .attributes = .{ .@"const" = true } | ||
| 403 | |||
| 404 | __builtin_amdgcn_alignbyte | ||
| 405 | .param_str = "UiUiUiUi" | ||
| 406 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 407 | .attributes = .{ .@"const" = true } | ||
| 408 | |||
| 409 | __builtin_amdgcn_atomic_dec32 | ||
| 410 | .param_str = "UZiUZiD*UZiUicC*" | ||
| 411 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 412 | |||
| 413 | __builtin_amdgcn_atomic_dec64 | ||
| 414 | .param_str = "UWiUWiD*UWiUicC*" | ||
| 415 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 416 | |||
| 417 | __builtin_amdgcn_atomic_inc32 | ||
| 418 | .param_str = "UZiUZiD*UZiUicC*" | ||
| 419 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 420 | |||
| 421 | __builtin_amdgcn_atomic_inc64 | ||
| 422 | .param_str = "UWiUWiD*UWiUicC*" | ||
| 423 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 424 | |||
| 425 | __builtin_amdgcn_buffer_wbinvl1 | ||
| 426 | .param_str = "v" | ||
| 427 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 428 | |||
| 429 | __builtin_amdgcn_class | ||
| 430 | .param_str = "bdi" | ||
| 431 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 432 | .attributes = .{ .@"const" = true } | ||
| 433 | |||
| 434 | __builtin_amdgcn_classf | ||
| 435 | .param_str = "bfi" | ||
| 436 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 437 | .attributes = .{ .@"const" = true } | ||
| 438 | |||
| 439 | __builtin_amdgcn_cosf | ||
| 440 | .param_str = "ff" | ||
| 441 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 442 | .attributes = .{ .@"const" = true } | ||
| 443 | |||
| 444 | __builtin_amdgcn_cubeid | ||
| 445 | .param_str = "ffff" | ||
| 446 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 447 | .attributes = .{ .@"const" = true } | ||
| 448 | |||
| 449 | __builtin_amdgcn_cubema | ||
| 450 | .param_str = "ffff" | ||
| 451 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 452 | .attributes = .{ .@"const" = true } | ||
| 453 | |||
| 454 | __builtin_amdgcn_cubesc | ||
| 455 | .param_str = "ffff" | ||
| 456 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 457 | .attributes = .{ .@"const" = true } | ||
| 458 | |||
| 459 | __builtin_amdgcn_cubetc | ||
| 460 | .param_str = "ffff" | ||
| 461 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 462 | .attributes = .{ .@"const" = true } | ||
| 463 | |||
| 464 | __builtin_amdgcn_cvt_pk_i16 | ||
| 465 | .param_str = "E2sii" | ||
| 466 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 467 | .attributes = .{ .@"const" = true } | ||
| 468 | |||
| 469 | __builtin_amdgcn_cvt_pk_u16 | ||
| 470 | .param_str = "E2UsUiUi" | ||
| 471 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 472 | .attributes = .{ .@"const" = true } | ||
| 473 | |||
| 474 | __builtin_amdgcn_cvt_pk_u8_f32 | ||
| 475 | .param_str = "UifUiUi" | ||
| 476 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 477 | .attributes = .{ .@"const" = true } | ||
| 478 | |||
| 479 | __builtin_amdgcn_cvt_pknorm_i16 | ||
| 480 | .param_str = "E2sff" | ||
| 481 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 482 | .attributes = .{ .@"const" = true } | ||
| 483 | |||
| 484 | __builtin_amdgcn_cvt_pknorm_u16 | ||
| 485 | .param_str = "E2Usff" | ||
| 486 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 487 | .attributes = .{ .@"const" = true } | ||
| 488 | |||
| 489 | __builtin_amdgcn_cvt_pkrtz | ||
| 490 | .param_str = "E2hff" | ||
| 491 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 492 | .attributes = .{ .@"const" = true } | ||
| 493 | |||
| 494 | __builtin_amdgcn_dispatch_ptr | ||
| 495 | .param_str = "v*4" | ||
| 496 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 497 | .attributes = .{ .@"const" = true } | ||
| 498 | |||
| 499 | __builtin_amdgcn_div_fixup | ||
| 500 | .param_str = "dddd" | ||
| 501 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 502 | .attributes = .{ .@"const" = true } | ||
| 503 | |||
| 504 | __builtin_amdgcn_div_fixupf | ||
| 505 | .param_str = "ffff" | ||
| 506 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 507 | .attributes = .{ .@"const" = true } | ||
| 508 | |||
| 509 | __builtin_amdgcn_div_fmas | ||
| 510 | .param_str = "ddddb" | ||
| 511 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 512 | .attributes = .{ .@"const" = true } | ||
| 513 | |||
| 514 | __builtin_amdgcn_div_fmasf | ||
| 515 | .param_str = "ffffb" | ||
| 516 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 517 | .attributes = .{ .@"const" = true } | ||
| 518 | |||
| 519 | __builtin_amdgcn_div_scale | ||
| 520 | .param_str = "dddbb*" | ||
| 521 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 522 | |||
| 523 | __builtin_amdgcn_div_scalef | ||
| 524 | .param_str = "fffbb*" | ||
| 525 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 526 | |||
| 527 | __builtin_amdgcn_ds_append | ||
| 528 | .param_str = "ii*3" | ||
| 529 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 530 | |||
| 531 | __builtin_amdgcn_ds_bpermute | ||
| 532 | .param_str = "iii" | ||
| 533 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 534 | .attributes = .{ .@"const" = true } | ||
| 535 | |||
| 536 | __builtin_amdgcn_ds_consume | ||
| 537 | .param_str = "ii*3" | ||
| 538 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 539 | |||
| 540 | __builtin_amdgcn_ds_faddf | ||
| 541 | .param_str = "ff*3fIiIiIb" | ||
| 542 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 543 | |||
| 544 | __builtin_amdgcn_ds_fmaxf | ||
| 545 | .param_str = "ff*3fIiIiIb" | ||
| 546 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 547 | |||
| 548 | __builtin_amdgcn_ds_fminf | ||
| 549 | .param_str = "ff*3fIiIiIb" | ||
| 550 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 551 | |||
| 552 | __builtin_amdgcn_ds_permute | ||
| 553 | .param_str = "iii" | ||
| 554 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 555 | .attributes = .{ .@"const" = true } | ||
| 556 | |||
| 557 | __builtin_amdgcn_ds_swizzle | ||
| 558 | .param_str = "iiIi" | ||
| 559 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 560 | .attributes = .{ .@"const" = true } | ||
| 561 | |||
| 562 | __builtin_amdgcn_endpgm | ||
| 563 | .param_str = "v" | ||
| 564 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 565 | .attributes = .{ .noreturn = true } | ||
| 566 | |||
| 567 | __builtin_amdgcn_exp2f | ||
| 568 | .param_str = "ff" | ||
| 569 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 570 | .attributes = .{ .@"const" = true } | ||
| 571 | |||
| 572 | __builtin_amdgcn_fcmp | ||
| 573 | .param_str = "WUiddIi" | ||
| 574 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 575 | .attributes = .{ .@"const" = true } | ||
| 576 | |||
| 577 | __builtin_amdgcn_fcmpf | ||
| 578 | .param_str = "WUiffIi" | ||
| 579 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 580 | .attributes = .{ .@"const" = true } | ||
| 581 | |||
| 582 | __builtin_amdgcn_fence | ||
| 583 | .param_str = "vUicC*" | ||
| 584 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 585 | |||
| 586 | __builtin_amdgcn_fmed3f | ||
| 587 | .param_str = "ffff" | ||
| 588 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 589 | .attributes = .{ .@"const" = true } | ||
| 590 | |||
| 591 | __builtin_amdgcn_fract | ||
| 592 | .param_str = "dd" | ||
| 593 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 594 | .attributes = .{ .@"const" = true } | ||
| 595 | |||
| 596 | __builtin_amdgcn_fractf | ||
| 597 | .param_str = "ff" | ||
| 598 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 599 | .attributes = .{ .@"const" = true } | ||
| 600 | |||
| 601 | __builtin_amdgcn_frexp_exp | ||
| 602 | .param_str = "id" | ||
| 603 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 604 | .attributes = .{ .@"const" = true } | ||
| 605 | |||
| 606 | __builtin_amdgcn_frexp_expf | ||
| 607 | .param_str = "if" | ||
| 608 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 609 | .attributes = .{ .@"const" = true } | ||
| 610 | |||
| 611 | __builtin_amdgcn_frexp_mant | ||
| 612 | .param_str = "dd" | ||
| 613 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 614 | .attributes = .{ .@"const" = true } | ||
| 615 | |||
| 616 | __builtin_amdgcn_frexp_mantf | ||
| 617 | .param_str = "ff" | ||
| 618 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 619 | .attributes = .{ .@"const" = true } | ||
| 620 | |||
| 621 | __builtin_amdgcn_grid_size_x | ||
| 622 | .param_str = "Ui" | ||
| 623 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 624 | .attributes = .{ .@"const" = true } | ||
| 625 | |||
| 626 | __builtin_amdgcn_grid_size_y | ||
| 627 | .param_str = "Ui" | ||
| 628 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 629 | .attributes = .{ .@"const" = true } | ||
| 630 | |||
| 631 | __builtin_amdgcn_grid_size_z | ||
| 632 | .param_str = "Ui" | ||
| 633 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 634 | .attributes = .{ .@"const" = true } | ||
| 635 | |||
| 636 | __builtin_amdgcn_groupstaticsize | ||
| 637 | .param_str = "Ui" | ||
| 638 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 639 | |||
| 640 | __builtin_amdgcn_iglp_opt | ||
| 641 | .param_str = "vIi" | ||
| 642 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 643 | |||
| 644 | __builtin_amdgcn_implicitarg_ptr | ||
| 645 | .param_str = "v*4" | ||
| 646 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 647 | .attributes = .{ .@"const" = true } | ||
| 648 | |||
| 649 | __builtin_amdgcn_interp_mov | ||
| 650 | .param_str = "fUiUiUiUi" | ||
| 651 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 652 | .attributes = .{ .@"const" = true } | ||
| 653 | |||
| 654 | __builtin_amdgcn_interp_p1 | ||
| 655 | .param_str = "ffUiUiUi" | ||
| 656 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 657 | .attributes = .{ .@"const" = true } | ||
| 658 | |||
| 659 | __builtin_amdgcn_interp_p1_f16 | ||
| 660 | .param_str = "ffUiUibUi" | ||
| 661 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 662 | .attributes = .{ .@"const" = true } | ||
| 663 | |||
| 664 | __builtin_amdgcn_interp_p2 | ||
| 665 | .param_str = "fffUiUiUi" | ||
| 666 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 667 | .attributes = .{ .@"const" = true } | ||
| 668 | |||
| 669 | __builtin_amdgcn_interp_p2_f16 | ||
| 670 | .param_str = "hffUiUibUi" | ||
| 671 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 672 | .attributes = .{ .@"const" = true } | ||
| 673 | |||
| 674 | __builtin_amdgcn_is_private | ||
| 675 | .param_str = "bvC*0" | ||
| 676 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 677 | .attributes = .{ .@"const" = true } | ||
| 678 | |||
| 679 | __builtin_amdgcn_is_shared | ||
| 680 | .param_str = "bvC*0" | ||
| 681 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 682 | .attributes = .{ .@"const" = true } | ||
| 683 | |||
| 684 | __builtin_amdgcn_kernarg_segment_ptr | ||
| 685 | .param_str = "v*4" | ||
| 686 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 687 | .attributes = .{ .@"const" = true } | ||
| 688 | |||
| 689 | __builtin_amdgcn_ldexp | ||
| 690 | .param_str = "ddi" | ||
| 691 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 692 | .attributes = .{ .@"const" = true } | ||
| 693 | |||
| 694 | __builtin_amdgcn_ldexpf | ||
| 695 | .param_str = "ffi" | ||
| 696 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 697 | .attributes = .{ .@"const" = true } | ||
| 698 | |||
| 699 | __builtin_amdgcn_lerp | ||
| 700 | .param_str = "UiUiUiUi" | ||
| 701 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 702 | .attributes = .{ .@"const" = true } | ||
| 703 | |||
| 704 | __builtin_amdgcn_log_clampf | ||
| 705 | .param_str = "ff" | ||
| 706 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 707 | .attributes = .{ .@"const" = true } | ||
| 708 | |||
| 709 | __builtin_amdgcn_logf | ||
| 710 | .param_str = "ff" | ||
| 711 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 712 | .attributes = .{ .@"const" = true } | ||
| 713 | |||
| 714 | __builtin_amdgcn_mbcnt_hi | ||
| 715 | .param_str = "UiUiUi" | ||
| 716 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 717 | .attributes = .{ .@"const" = true } | ||
| 718 | |||
| 719 | __builtin_amdgcn_mbcnt_lo | ||
| 720 | .param_str = "UiUiUi" | ||
| 721 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 722 | .attributes = .{ .@"const" = true } | ||
| 723 | |||
| 724 | __builtin_amdgcn_mqsad_pk_u16_u8 | ||
| 725 | .param_str = "WUiWUiUiWUi" | ||
| 726 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 727 | .attributes = .{ .@"const" = true } | ||
| 728 | |||
| 729 | __builtin_amdgcn_mqsad_u32_u8 | ||
| 730 | .param_str = "V4UiWUiUiV4Ui" | ||
| 731 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 732 | .attributes = .{ .@"const" = true } | ||
| 733 | |||
| 734 | __builtin_amdgcn_msad_u8 | ||
| 735 | .param_str = "UiUiUiUi" | ||
| 736 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 737 | .attributes = .{ .@"const" = true } | ||
| 738 | |||
| 739 | __builtin_amdgcn_qsad_pk_u16_u8 | ||
| 740 | .param_str = "WUiWUiUiWUi" | ||
| 741 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 742 | .attributes = .{ .@"const" = true } | ||
| 743 | |||
| 744 | __builtin_amdgcn_queue_ptr | ||
| 745 | .param_str = "v*4" | ||
| 746 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 747 | .attributes = .{ .@"const" = true } | ||
| 748 | |||
| 749 | __builtin_amdgcn_rcp | ||
| 750 | .param_str = "dd" | ||
| 751 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 752 | .attributes = .{ .@"const" = true } | ||
| 753 | |||
| 754 | __builtin_amdgcn_rcpf | ||
| 755 | .param_str = "ff" | ||
| 756 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 757 | .attributes = .{ .@"const" = true } | ||
| 758 | |||
| 759 | __builtin_amdgcn_read_exec | ||
| 760 | .param_str = "WUi" | ||
| 761 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 762 | .attributes = .{ .@"const" = true } | ||
| 763 | |||
| 764 | __builtin_amdgcn_read_exec_hi | ||
| 765 | .param_str = "Ui" | ||
| 766 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 767 | .attributes = .{ .@"const" = true } | ||
| 768 | |||
| 769 | __builtin_amdgcn_read_exec_lo | ||
| 770 | .param_str = "Ui" | ||
| 771 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 772 | .attributes = .{ .@"const" = true } | ||
| 773 | |||
| 774 | __builtin_amdgcn_readfirstlane | ||
| 775 | .param_str = "ii" | ||
| 776 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 777 | .attributes = .{ .@"const" = true } | ||
| 778 | |||
| 779 | __builtin_amdgcn_readlane | ||
| 780 | .param_str = "iii" | ||
| 781 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 782 | .attributes = .{ .@"const" = true } | ||
| 783 | |||
| 784 | __builtin_amdgcn_rsq | ||
| 785 | .param_str = "dd" | ||
| 786 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 787 | .attributes = .{ .@"const" = true } | ||
| 788 | |||
| 789 | __builtin_amdgcn_rsq_clamp | ||
| 790 | .param_str = "dd" | ||
| 791 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 792 | .attributes = .{ .@"const" = true } | ||
| 793 | |||
| 794 | __builtin_amdgcn_rsq_clampf | ||
| 795 | .param_str = "ff" | ||
| 796 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 797 | .attributes = .{ .@"const" = true } | ||
| 798 | |||
| 799 | __builtin_amdgcn_rsqf | ||
| 800 | .param_str = "ff" | ||
| 801 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 802 | .attributes = .{ .@"const" = true } | ||
| 803 | |||
| 804 | __builtin_amdgcn_s_barrier | ||
| 805 | .param_str = "v" | ||
| 806 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 807 | |||
| 808 | __builtin_amdgcn_s_dcache_inv | ||
| 809 | .param_str = "v" | ||
| 810 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 811 | |||
| 812 | __builtin_amdgcn_s_decperflevel | ||
| 813 | .param_str = "vIi" | ||
| 814 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 815 | |||
| 816 | __builtin_amdgcn_s_getpc | ||
| 817 | .param_str = "WUi" | ||
| 818 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 819 | |||
| 820 | __builtin_amdgcn_s_getreg | ||
| 821 | .param_str = "UiIi" | ||
| 822 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 823 | |||
| 824 | __builtin_amdgcn_s_incperflevel | ||
| 825 | .param_str = "vIi" | ||
| 826 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 827 | |||
| 828 | __builtin_amdgcn_s_sendmsg | ||
| 829 | .param_str = "vIiUi" | ||
| 830 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 831 | |||
| 832 | __builtin_amdgcn_s_sendmsghalt | ||
| 833 | .param_str = "vIiUi" | ||
| 834 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 835 | |||
| 836 | __builtin_amdgcn_s_setprio | ||
| 837 | .param_str = "vIs" | ||
| 838 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 839 | |||
| 840 | __builtin_amdgcn_s_setreg | ||
| 841 | .param_str = "vIiUi" | ||
| 842 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 843 | |||
| 844 | __builtin_amdgcn_s_sleep | ||
| 845 | .param_str = "vIi" | ||
| 846 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 847 | |||
| 848 | __builtin_amdgcn_s_waitcnt | ||
| 849 | .param_str = "vIi" | ||
| 850 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 851 | |||
| 852 | __builtin_amdgcn_sad_hi_u8 | ||
| 853 | .param_str = "UiUiUiUi" | ||
| 854 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 855 | .attributes = .{ .@"const" = true } | ||
| 856 | |||
| 857 | __builtin_amdgcn_sad_u16 | ||
| 858 | .param_str = "UiUiUiUi" | ||
| 859 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 860 | .attributes = .{ .@"const" = true } | ||
| 861 | |||
| 862 | __builtin_amdgcn_sad_u8 | ||
| 863 | .param_str = "UiUiUiUi" | ||
| 864 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 865 | .attributes = .{ .@"const" = true } | ||
| 866 | |||
| 867 | __builtin_amdgcn_sbfe | ||
| 868 | .param_str = "UiUiUiUi" | ||
| 869 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 870 | .attributes = .{ .@"const" = true } | ||
| 871 | |||
| 872 | __builtin_amdgcn_sched_barrier | ||
| 873 | .param_str = "vIi" | ||
| 874 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 875 | |||
| 876 | __builtin_amdgcn_sched_group_barrier | ||
| 877 | .param_str = "vIiIiIi" | ||
| 878 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 879 | |||
| 880 | __builtin_amdgcn_sicmp | ||
| 881 | .param_str = "WUiiiIi" | ||
| 882 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 883 | .attributes = .{ .@"const" = true } | ||
| 884 | |||
| 885 | __builtin_amdgcn_sicmpl | ||
| 886 | .param_str = "WUiWiWiIi" | ||
| 887 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 888 | .attributes = .{ .@"const" = true } | ||
| 889 | |||
| 890 | __builtin_amdgcn_sinf | ||
| 891 | .param_str = "ff" | ||
| 892 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 893 | .attributes = .{ .@"const" = true } | ||
| 894 | |||
| 895 | __builtin_amdgcn_sqrt | ||
| 896 | .param_str = "dd" | ||
| 897 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 898 | .attributes = .{ .@"const" = true } | ||
| 899 | |||
| 900 | __builtin_amdgcn_sqrtf | ||
| 901 | .param_str = "ff" | ||
| 902 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 903 | .attributes = .{ .@"const" = true } | ||
| 904 | |||
| 905 | __builtin_amdgcn_trig_preop | ||
| 906 | .param_str = "ddi" | ||
| 907 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 908 | .attributes = .{ .@"const" = true } | ||
| 909 | |||
| 910 | __builtin_amdgcn_trig_preopf | ||
| 911 | .param_str = "ffi" | ||
| 912 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 913 | .attributes = .{ .@"const" = true } | ||
| 914 | |||
| 915 | __builtin_amdgcn_ubfe | ||
| 916 | .param_str = "UiUiUiUi" | ||
| 917 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 918 | .attributes = .{ .@"const" = true } | ||
| 919 | |||
| 920 | __builtin_amdgcn_uicmp | ||
| 921 | .param_str = "WUiUiUiIi" | ||
| 922 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 923 | .attributes = .{ .@"const" = true } | ||
| 924 | |||
| 925 | __builtin_amdgcn_uicmpl | ||
| 926 | .param_str = "WUiWUiWUiIi" | ||
| 927 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 928 | .attributes = .{ .@"const" = true } | ||
| 929 | |||
| 930 | __builtin_amdgcn_wave_barrier | ||
| 931 | .param_str = "v" | ||
| 932 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 933 | |||
| 934 | __builtin_amdgcn_workgroup_id_x | ||
| 935 | .param_str = "Ui" | ||
| 936 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 937 | .attributes = .{ .@"const" = true } | ||
| 938 | |||
| 939 | __builtin_amdgcn_workgroup_id_y | ||
| 940 | .param_str = "Ui" | ||
| 941 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 942 | .attributes = .{ .@"const" = true } | ||
| 943 | |||
| 944 | __builtin_amdgcn_workgroup_id_z | ||
| 945 | .param_str = "Ui" | ||
| 946 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 947 | .attributes = .{ .@"const" = true } | ||
| 948 | |||
| 949 | __builtin_amdgcn_workgroup_size_x | ||
| 950 | .param_str = "Us" | ||
| 951 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 952 | .attributes = .{ .@"const" = true } | ||
| 953 | |||
| 954 | __builtin_amdgcn_workgroup_size_y | ||
| 955 | .param_str = "Us" | ||
| 956 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 957 | .attributes = .{ .@"const" = true } | ||
| 958 | |||
| 959 | __builtin_amdgcn_workgroup_size_z | ||
| 960 | .param_str = "Us" | ||
| 961 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 962 | .attributes = .{ .@"const" = true } | ||
| 963 | |||
| 964 | __builtin_amdgcn_workitem_id_x | ||
| 965 | .param_str = "Ui" | ||
| 966 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 967 | .attributes = .{ .@"const" = true } | ||
| 968 | |||
| 969 | __builtin_amdgcn_workitem_id_y | ||
| 970 | .param_str = "Ui" | ||
| 971 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 972 | .attributes = .{ .@"const" = true } | ||
| 973 | |||
| 974 | __builtin_amdgcn_workitem_id_z | ||
| 975 | .param_str = "Ui" | ||
| 976 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 977 | .attributes = .{ .@"const" = true } | ||
| 978 | |||
| 979 | __builtin_annotation | ||
| 980 | .param_str = "v." | ||
| 981 | .attributes = .{ .custom_typecheck = true } | ||
| 982 | |||
| 983 | __builtin_arm_cdp | ||
| 984 | .param_str = "vUIiUIiUIiUIiUIiUIi" | ||
| 985 | .target_set = TargetSet.initOne(.arm) | ||
| 986 | |||
| 987 | __builtin_arm_cdp2 | ||
| 988 | .param_str = "vUIiUIiUIiUIiUIiUIi" | ||
| 989 | .target_set = TargetSet.initOne(.arm) | ||
| 990 | |||
| 991 | __builtin_arm_clrex | ||
| 992 | .param_str = "v" | ||
| 993 | .target_set = TargetSet.initMany(&.{ .aarch64, .arm }) | ||
| 994 | |||
| 995 | __builtin_arm_cls | ||
| 996 | .param_str = "UiZUi" | ||
| 997 | .target_set = TargetSet.initMany(&.{ .aarch64, .arm }) | ||
| 998 | .attributes = .{ .@"const" = true } | ||
| 999 | |||
| 1000 | __builtin_arm_cls64 | ||
| 1001 | .param_str = "UiWUi" | ||
| 1002 | .target_set = TargetSet.initMany(&.{ .aarch64, .arm }) | ||
| 1003 | .attributes = .{ .@"const" = true } | ||
| 1004 | |||
| 1005 | __builtin_arm_clz | ||
| 1006 | .param_str = "UiZUi" | ||
| 1007 | .target_set = TargetSet.initMany(&.{ .aarch64, .arm }) | ||
| 1008 | .attributes = .{ .@"const" = true } | ||
| 1009 | |||
| 1010 | __builtin_arm_clz64 | ||
| 1011 | .param_str = "UiWUi" | ||
| 1012 | .target_set = TargetSet.initMany(&.{ .aarch64, .arm }) | ||
| 1013 | .attributes = .{ .@"const" = true } | ||
| 1014 | |||
| 1015 | __builtin_arm_cmse_TT | ||
| 1016 | .param_str = "Uiv*" | ||
| 1017 | .target_set = TargetSet.initOne(.arm) | ||
| 1018 | |||
| 1019 | __builtin_arm_cmse_TTA | ||
| 1020 | .param_str = "Uiv*" | ||
| 1021 | .target_set = TargetSet.initOne(.arm) | ||
| 1022 | |||
| 1023 | __builtin_arm_cmse_TTAT | ||
| 1024 | .param_str = "Uiv*" | ||
| 1025 | .target_set = TargetSet.initOne(.arm) | ||
| 1026 | |||
| 1027 | __builtin_arm_cmse_TTT | ||
| 1028 | .param_str = "Uiv*" | ||
| 1029 | .target_set = TargetSet.initOne(.arm) | ||
| 1030 | |||
| 1031 | __builtin_arm_dbg | ||
| 1032 | .param_str = "vUi" | ||
| 1033 | .target_set = TargetSet.initOne(.arm) | ||
| 1034 | |||
| 1035 | __builtin_arm_dmb | ||
| 1036 | .param_str = "vUi" | ||
| 1037 | .target_set = TargetSet.initMany(&.{ .aarch64, .arm }) | ||
| 1038 | .attributes = .{ .@"const" = true } | ||
| 1039 | |||
| 1040 | __builtin_arm_dsb | ||
| 1041 | .param_str = "vUi" | ||
| 1042 | .target_set = TargetSet.initMany(&.{ .aarch64, .arm }) | ||
| 1043 | .attributes = .{ .@"const" = true } | ||
| 1044 | |||
| 1045 | __builtin_arm_get_fpscr | ||
| 1046 | .param_str = "Ui" | ||
| 1047 | .target_set = TargetSet.initOne(.arm) | ||
| 1048 | .attributes = .{ .@"const" = true } | ||
| 1049 | |||
| 1050 | __builtin_arm_isb | ||
| 1051 | .param_str = "vUi" | ||
| 1052 | .target_set = TargetSet.initMany(&.{ .aarch64, .arm }) | ||
| 1053 | .attributes = .{ .@"const" = true } | ||
| 1054 | |||
| 1055 | __builtin_arm_ldaex | ||
| 1056 | .param_str = "v." | ||
| 1057 | .target_set = TargetSet.initMany(&.{ .aarch64, .arm }) | ||
| 1058 | .attributes = .{ .custom_typecheck = true } | ||
| 1059 | |||
| 1060 | __builtin_arm_ldc | ||
| 1061 | .param_str = "vUIiUIivC*" | ||
| 1062 | .target_set = TargetSet.initOne(.arm) | ||
| 1063 | |||
| 1064 | __builtin_arm_ldc2 | ||
| 1065 | .param_str = "vUIiUIivC*" | ||
| 1066 | .target_set = TargetSet.initOne(.arm) | ||
| 1067 | |||
| 1068 | __builtin_arm_ldc2l | ||
| 1069 | .param_str = "vUIiUIivC*" | ||
| 1070 | .target_set = TargetSet.initOne(.arm) | ||
| 1071 | |||
| 1072 | __builtin_arm_ldcl | ||
| 1073 | .param_str = "vUIiUIivC*" | ||
| 1074 | .target_set = TargetSet.initOne(.arm) | ||
| 1075 | |||
| 1076 | __builtin_arm_ldrex | ||
| 1077 | .param_str = "v." | ||
| 1078 | .target_set = TargetSet.initMany(&.{ .aarch64, .arm }) | ||
| 1079 | .attributes = .{ .custom_typecheck = true } | ||
| 1080 | |||
| 1081 | __builtin_arm_ldrexd | ||
| 1082 | .param_str = "LLUiv*" | ||
| 1083 | .target_set = TargetSet.initOne(.arm) | ||
| 1084 | |||
| 1085 | __builtin_arm_mcr | ||
| 1086 | .param_str = "vUIiUIiUiUIiUIiUIi" | ||
| 1087 | .target_set = TargetSet.initOne(.arm) | ||
| 1088 | |||
| 1089 | __builtin_arm_mcr2 | ||
| 1090 | .param_str = "vUIiUIiUiUIiUIiUIi" | ||
| 1091 | .target_set = TargetSet.initOne(.arm) | ||
| 1092 | |||
| 1093 | __builtin_arm_mcrr | ||
| 1094 | .param_str = "vUIiUIiLLUiUIi" | ||
| 1095 | .target_set = TargetSet.initOne(.arm) | ||
| 1096 | |||
| 1097 | __builtin_arm_mcrr2 | ||
| 1098 | .param_str = "vUIiUIiLLUiUIi" | ||
| 1099 | .target_set = TargetSet.initOne(.arm) | ||
| 1100 | |||
| 1101 | __builtin_arm_mrc | ||
| 1102 | .param_str = "UiUIiUIiUIiUIiUIi" | ||
| 1103 | .target_set = TargetSet.initOne(.arm) | ||
| 1104 | |||
| 1105 | __builtin_arm_mrc2 | ||
| 1106 | .param_str = "UiUIiUIiUIiUIiUIi" | ||
| 1107 | .target_set = TargetSet.initOne(.arm) | ||
| 1108 | |||
| 1109 | __builtin_arm_mrrc | ||
| 1110 | .param_str = "LLUiUIiUIiUIi" | ||
| 1111 | .target_set = TargetSet.initOne(.arm) | ||
| 1112 | |||
| 1113 | __builtin_arm_mrrc2 | ||
| 1114 | .param_str = "LLUiUIiUIiUIi" | ||
| 1115 | .target_set = TargetSet.initOne(.arm) | ||
| 1116 | |||
| 1117 | __builtin_arm_nop | ||
| 1118 | .param_str = "v" | ||
| 1119 | .target_set = TargetSet.initMany(&.{ .aarch64, .arm }) | ||
| 1120 | |||
| 1121 | __builtin_arm_prefetch | ||
| 1122 | .param_str = "!" | ||
| 1123 | .target_set = TargetSet.initMany(&.{ .aarch64, .arm }) | ||
| 1124 | .attributes = .{ .@"const" = true } | ||
| 1125 | |||
| 1126 | __builtin_arm_qadd | ||
| 1127 | .param_str = "iii" | ||
| 1128 | .target_set = TargetSet.initOne(.arm) | ||
| 1129 | .attributes = .{ .@"const" = true } | ||
| 1130 | |||
| 1131 | __builtin_arm_qadd16 | ||
| 1132 | .param_str = "iii" | ||
| 1133 | .target_set = TargetSet.initOne(.arm) | ||
| 1134 | .attributes = .{ .@"const" = true } | ||
| 1135 | |||
| 1136 | __builtin_arm_qadd8 | ||
| 1137 | .param_str = "iii" | ||
| 1138 | .target_set = TargetSet.initOne(.arm) | ||
| 1139 | .attributes = .{ .@"const" = true } | ||
| 1140 | |||
| 1141 | __builtin_arm_qasx | ||
| 1142 | .param_str = "iii" | ||
| 1143 | .target_set = TargetSet.initOne(.arm) | ||
| 1144 | .attributes = .{ .@"const" = true } | ||
| 1145 | |||
| 1146 | __builtin_arm_qdbl | ||
| 1147 | .param_str = "ii" | ||
| 1148 | .target_set = TargetSet.initOne(.arm) | ||
| 1149 | .attributes = .{ .@"const" = true } | ||
| 1150 | |||
| 1151 | __builtin_arm_qsax | ||
| 1152 | .param_str = "iii" | ||
| 1153 | .target_set = TargetSet.initOne(.arm) | ||
| 1154 | .attributes = .{ .@"const" = true } | ||
| 1155 | |||
| 1156 | __builtin_arm_qsub | ||
| 1157 | .param_str = "iii" | ||
| 1158 | .target_set = TargetSet.initOne(.arm) | ||
| 1159 | .attributes = .{ .@"const" = true } | ||
| 1160 | |||
| 1161 | __builtin_arm_qsub16 | ||
| 1162 | .param_str = "iii" | ||
| 1163 | .target_set = TargetSet.initOne(.arm) | ||
| 1164 | .attributes = .{ .@"const" = true } | ||
| 1165 | |||
| 1166 | __builtin_arm_qsub8 | ||
| 1167 | .param_str = "iii" | ||
| 1168 | .target_set = TargetSet.initOne(.arm) | ||
| 1169 | .attributes = .{ .@"const" = true } | ||
| 1170 | |||
| 1171 | __builtin_arm_rbit | ||
| 1172 | .param_str = "UiUi" | ||
| 1173 | .target_set = TargetSet.initMany(&.{ .aarch64, .arm }) | ||
| 1174 | .attributes = .{ .@"const" = true } | ||
| 1175 | |||
| 1176 | __builtin_arm_rbit64 | ||
| 1177 | .param_str = "WUiWUi" | ||
| 1178 | .target_set = TargetSet.initOne(.aarch64) | ||
| 1179 | .attributes = .{ .@"const" = true } | ||
| 1180 | |||
| 1181 | __builtin_arm_rsr | ||
| 1182 | .param_str = "UicC*" | ||
| 1183 | .target_set = TargetSet.initMany(&.{ .aarch64, .arm }) | ||
| 1184 | .attributes = .{ .@"const" = true } | ||
| 1185 | |||
| 1186 | __builtin_arm_rsr64 | ||
| 1187 | .param_str = "!" | ||
| 1188 | .target_set = TargetSet.initMany(&.{ .aarch64, .arm }) | ||
| 1189 | .attributes = .{ .@"const" = true } | ||
| 1190 | |||
| 1191 | __builtin_arm_rsrp | ||
| 1192 | .param_str = "v*cC*" | ||
| 1193 | .target_set = TargetSet.initMany(&.{ .aarch64, .arm }) | ||
| 1194 | .attributes = .{ .@"const" = true } | ||
| 1195 | |||
| 1196 | __builtin_arm_sadd16 | ||
| 1197 | .param_str = "iii" | ||
| 1198 | .target_set = TargetSet.initOne(.arm) | ||
| 1199 | .attributes = .{ .@"const" = true } | ||
| 1200 | |||
| 1201 | __builtin_arm_sadd8 | ||
| 1202 | .param_str = "iii" | ||
| 1203 | .target_set = TargetSet.initOne(.arm) | ||
| 1204 | .attributes = .{ .@"const" = true } | ||
| 1205 | |||
| 1206 | __builtin_arm_sasx | ||
| 1207 | .param_str = "iii" | ||
| 1208 | .target_set = TargetSet.initOne(.arm) | ||
| 1209 | .attributes = .{ .@"const" = true } | ||
| 1210 | |||
| 1211 | __builtin_arm_sel | ||
| 1212 | .param_str = "iii" | ||
| 1213 | .target_set = TargetSet.initOne(.arm) | ||
| 1214 | .attributes = .{ .@"const" = true } | ||
| 1215 | |||
| 1216 | __builtin_arm_set_fpscr | ||
| 1217 | .param_str = "vUi" | ||
| 1218 | .target_set = TargetSet.initOne(.arm) | ||
| 1219 | .attributes = .{ .@"const" = true } | ||
| 1220 | |||
| 1221 | __builtin_arm_sev | ||
| 1222 | .param_str = "v" | ||
| 1223 | .target_set = TargetSet.initMany(&.{ .aarch64, .arm }) | ||
| 1224 | |||
| 1225 | __builtin_arm_sevl | ||
| 1226 | .param_str = "v" | ||
| 1227 | .target_set = TargetSet.initMany(&.{ .aarch64, .arm }) | ||
| 1228 | |||
| 1229 | __builtin_arm_shadd16 | ||
| 1230 | .param_str = "iii" | ||
| 1231 | .target_set = TargetSet.initOne(.arm) | ||
| 1232 | .attributes = .{ .@"const" = true } | ||
| 1233 | |||
| 1234 | __builtin_arm_shadd8 | ||
| 1235 | .param_str = "iii" | ||
| 1236 | .target_set = TargetSet.initOne(.arm) | ||
| 1237 | .attributes = .{ .@"const" = true } | ||
| 1238 | |||
| 1239 | __builtin_arm_shasx | ||
| 1240 | .param_str = "iii" | ||
| 1241 | .target_set = TargetSet.initOne(.arm) | ||
| 1242 | .attributes = .{ .@"const" = true } | ||
| 1243 | |||
| 1244 | __builtin_arm_shsax | ||
| 1245 | .param_str = "iii" | ||
| 1246 | .target_set = TargetSet.initOne(.arm) | ||
| 1247 | .attributes = .{ .@"const" = true } | ||
| 1248 | |||
| 1249 | __builtin_arm_shsub16 | ||
| 1250 | .param_str = "iii" | ||
| 1251 | .target_set = TargetSet.initOne(.arm) | ||
| 1252 | .attributes = .{ .@"const" = true } | ||
| 1253 | |||
| 1254 | __builtin_arm_shsub8 | ||
| 1255 | .param_str = "iii" | ||
| 1256 | .target_set = TargetSet.initOne(.arm) | ||
| 1257 | .attributes = .{ .@"const" = true } | ||
| 1258 | |||
| 1259 | __builtin_arm_smlabb | ||
| 1260 | .param_str = "iiii" | ||
| 1261 | .target_set = TargetSet.initOne(.arm) | ||
| 1262 | .attributes = .{ .@"const" = true } | ||
| 1263 | |||
| 1264 | __builtin_arm_smlabt | ||
| 1265 | .param_str = "iiii" | ||
| 1266 | .target_set = TargetSet.initOne(.arm) | ||
| 1267 | .attributes = .{ .@"const" = true } | ||
| 1268 | |||
| 1269 | __builtin_arm_smlad | ||
| 1270 | .param_str = "iiii" | ||
| 1271 | .target_set = TargetSet.initOne(.arm) | ||
| 1272 | .attributes = .{ .@"const" = true } | ||
| 1273 | |||
| 1274 | __builtin_arm_smladx | ||
| 1275 | .param_str = "iiii" | ||
| 1276 | .target_set = TargetSet.initOne(.arm) | ||
| 1277 | .attributes = .{ .@"const" = true } | ||
| 1278 | |||
| 1279 | __builtin_arm_smlald | ||
| 1280 | .param_str = "LLiiiLLi" | ||
| 1281 | .target_set = TargetSet.initOne(.arm) | ||
| 1282 | .attributes = .{ .@"const" = true } | ||
| 1283 | |||
| 1284 | __builtin_arm_smlaldx | ||
| 1285 | .param_str = "LLiiiLLi" | ||
| 1286 | .target_set = TargetSet.initOne(.arm) | ||
| 1287 | .attributes = .{ .@"const" = true } | ||
| 1288 | |||
| 1289 | __builtin_arm_smlatb | ||
| 1290 | .param_str = "iiii" | ||
| 1291 | .target_set = TargetSet.initOne(.arm) | ||
| 1292 | .attributes = .{ .@"const" = true } | ||
| 1293 | |||
| 1294 | __builtin_arm_smlatt | ||
| 1295 | .param_str = "iiii" | ||
| 1296 | .target_set = TargetSet.initOne(.arm) | ||
| 1297 | .attributes = .{ .@"const" = true } | ||
| 1298 | |||
| 1299 | __builtin_arm_smlawb | ||
| 1300 | .param_str = "iiii" | ||
| 1301 | .target_set = TargetSet.initOne(.arm) | ||
| 1302 | .attributes = .{ .@"const" = true } | ||
| 1303 | |||
| 1304 | __builtin_arm_smlawt | ||
| 1305 | .param_str = "iiii" | ||
| 1306 | .target_set = TargetSet.initOne(.arm) | ||
| 1307 | .attributes = .{ .@"const" = true } | ||
| 1308 | |||
| 1309 | __builtin_arm_smlsd | ||
| 1310 | .param_str = "iiii" | ||
| 1311 | .target_set = TargetSet.initOne(.arm) | ||
| 1312 | .attributes = .{ .@"const" = true } | ||
| 1313 | |||
| 1314 | __builtin_arm_smlsdx | ||
| 1315 | .param_str = "iiii" | ||
| 1316 | .target_set = TargetSet.initOne(.arm) | ||
| 1317 | .attributes = .{ .@"const" = true } | ||
| 1318 | |||
| 1319 | __builtin_arm_smlsld | ||
| 1320 | .param_str = "LLiiiLLi" | ||
| 1321 | .target_set = TargetSet.initOne(.arm) | ||
| 1322 | .attributes = .{ .@"const" = true } | ||
| 1323 | |||
| 1324 | __builtin_arm_smlsldx | ||
| 1325 | .param_str = "LLiiiLLi" | ||
| 1326 | .target_set = TargetSet.initOne(.arm) | ||
| 1327 | .attributes = .{ .@"const" = true } | ||
| 1328 | |||
| 1329 | __builtin_arm_smuad | ||
| 1330 | .param_str = "iii" | ||
| 1331 | .target_set = TargetSet.initOne(.arm) | ||
| 1332 | .attributes = .{ .@"const" = true } | ||
| 1333 | |||
| 1334 | __builtin_arm_smuadx | ||
| 1335 | .param_str = "iii" | ||
| 1336 | .target_set = TargetSet.initOne(.arm) | ||
| 1337 | .attributes = .{ .@"const" = true } | ||
| 1338 | |||
| 1339 | __builtin_arm_smulbb | ||
| 1340 | .param_str = "iii" | ||
| 1341 | .target_set = TargetSet.initOne(.arm) | ||
| 1342 | .attributes = .{ .@"const" = true } | ||
| 1343 | |||
| 1344 | __builtin_arm_smulbt | ||
| 1345 | .param_str = "iii" | ||
| 1346 | .target_set = TargetSet.initOne(.arm) | ||
| 1347 | .attributes = .{ .@"const" = true } | ||
| 1348 | |||
| 1349 | __builtin_arm_smultb | ||
| 1350 | .param_str = "iii" | ||
| 1351 | .target_set = TargetSet.initOne(.arm) | ||
| 1352 | .attributes = .{ .@"const" = true } | ||
| 1353 | |||
| 1354 | __builtin_arm_smultt | ||
| 1355 | .param_str = "iii" | ||
| 1356 | .target_set = TargetSet.initOne(.arm) | ||
| 1357 | .attributes = .{ .@"const" = true } | ||
| 1358 | |||
| 1359 | __builtin_arm_smulwb | ||
| 1360 | .param_str = "iii" | ||
| 1361 | .target_set = TargetSet.initOne(.arm) | ||
| 1362 | .attributes = .{ .@"const" = true } | ||
| 1363 | |||
| 1364 | __builtin_arm_smulwt | ||
| 1365 | .param_str = "iii" | ||
| 1366 | .target_set = TargetSet.initOne(.arm) | ||
| 1367 | .attributes = .{ .@"const" = true } | ||
| 1368 | |||
| 1369 | __builtin_arm_smusd | ||
| 1370 | .param_str = "iii" | ||
| 1371 | .target_set = TargetSet.initOne(.arm) | ||
| 1372 | .attributes = .{ .@"const" = true } | ||
| 1373 | |||
| 1374 | __builtin_arm_smusdx | ||
| 1375 | .param_str = "iii" | ||
| 1376 | .target_set = TargetSet.initOne(.arm) | ||
| 1377 | .attributes = .{ .@"const" = true } | ||
| 1378 | |||
| 1379 | __builtin_arm_ssat | ||
| 1380 | .param_str = "iiUi" | ||
| 1381 | .target_set = TargetSet.initOne(.arm) | ||
| 1382 | .attributes = .{ .@"const" = true } | ||
| 1383 | |||
| 1384 | __builtin_arm_ssat16 | ||
| 1385 | .param_str = "iii" | ||
| 1386 | .target_set = TargetSet.initOne(.arm) | ||
| 1387 | .attributes = .{ .@"const" = true } | ||
| 1388 | |||
| 1389 | __builtin_arm_ssax | ||
| 1390 | .param_str = "iii" | ||
| 1391 | .target_set = TargetSet.initOne(.arm) | ||
| 1392 | .attributes = .{ .@"const" = true } | ||
| 1393 | |||
| 1394 | __builtin_arm_ssub16 | ||
| 1395 | .param_str = "iii" | ||
| 1396 | .target_set = TargetSet.initOne(.arm) | ||
| 1397 | .attributes = .{ .@"const" = true } | ||
| 1398 | |||
| 1399 | __builtin_arm_ssub8 | ||
| 1400 | .param_str = "iii" | ||
| 1401 | .target_set = TargetSet.initOne(.arm) | ||
| 1402 | .attributes = .{ .@"const" = true } | ||
| 1403 | |||
| 1404 | __builtin_arm_stc | ||
| 1405 | .param_str = "vUIiUIiv*" | ||
| 1406 | .target_set = TargetSet.initOne(.arm) | ||
| 1407 | |||
| 1408 | __builtin_arm_stc2 | ||
| 1409 | .param_str = "vUIiUIiv*" | ||
| 1410 | .target_set = TargetSet.initOne(.arm) | ||
| 1411 | |||
| 1412 | __builtin_arm_stc2l | ||
| 1413 | .param_str = "vUIiUIiv*" | ||
| 1414 | .target_set = TargetSet.initOne(.arm) | ||
| 1415 | |||
| 1416 | __builtin_arm_stcl | ||
| 1417 | .param_str = "vUIiUIiv*" | ||
| 1418 | .target_set = TargetSet.initOne(.arm) | ||
| 1419 | |||
| 1420 | __builtin_arm_stlex | ||
| 1421 | .param_str = "i." | ||
| 1422 | .target_set = TargetSet.initMany(&.{ .aarch64, .arm }) | ||
| 1423 | .attributes = .{ .custom_typecheck = true } | ||
| 1424 | |||
| 1425 | __builtin_arm_strex | ||
| 1426 | .param_str = "i." | ||
| 1427 | .target_set = TargetSet.initMany(&.{ .aarch64, .arm }) | ||
| 1428 | .attributes = .{ .custom_typecheck = true } | ||
| 1429 | |||
| 1430 | __builtin_arm_strexd | ||
| 1431 | .param_str = "iLLUiv*" | ||
| 1432 | .target_set = TargetSet.initOne(.arm) | ||
| 1433 | |||
| 1434 | __builtin_arm_sxtab16 | ||
| 1435 | .param_str = "iii" | ||
| 1436 | .target_set = TargetSet.initOne(.arm) | ||
| 1437 | .attributes = .{ .@"const" = true } | ||
| 1438 | |||
| 1439 | __builtin_arm_sxtb16 | ||
| 1440 | .param_str = "ii" | ||
| 1441 | .target_set = TargetSet.initOne(.arm) | ||
| 1442 | .attributes = .{ .@"const" = true } | ||
| 1443 | |||
| 1444 | __builtin_arm_tcancel | ||
| 1445 | .param_str = "vWUIi" | ||
| 1446 | .target_set = TargetSet.initOne(.aarch64) | ||
| 1447 | |||
| 1448 | __builtin_arm_tcommit | ||
| 1449 | .param_str = "v" | ||
| 1450 | .target_set = TargetSet.initOne(.aarch64) | ||
| 1451 | |||
| 1452 | __builtin_arm_tstart | ||
| 1453 | .param_str = "WUi" | ||
| 1454 | .target_set = TargetSet.initOne(.aarch64) | ||
| 1455 | .attributes = .{ .returns_twice = true } | ||
| 1456 | |||
| 1457 | __builtin_arm_ttest | ||
| 1458 | .param_str = "WUi" | ||
| 1459 | .target_set = TargetSet.initOne(.aarch64) | ||
| 1460 | .attributes = .{ .@"const" = true } | ||
| 1461 | |||
| 1462 | __builtin_arm_uadd16 | ||
| 1463 | .param_str = "UiUiUi" | ||
| 1464 | .target_set = TargetSet.initOne(.arm) | ||
| 1465 | .attributes = .{ .@"const" = true } | ||
| 1466 | |||
| 1467 | __builtin_arm_uadd8 | ||
| 1468 | .param_str = "UiUiUi" | ||
| 1469 | .target_set = TargetSet.initOne(.arm) | ||
| 1470 | .attributes = .{ .@"const" = true } | ||
| 1471 | |||
| 1472 | __builtin_arm_uasx | ||
| 1473 | .param_str = "UiUiUi" | ||
| 1474 | .target_set = TargetSet.initOne(.arm) | ||
| 1475 | .attributes = .{ .@"const" = true } | ||
| 1476 | |||
| 1477 | __builtin_arm_uhadd16 | ||
| 1478 | .param_str = "UiUiUi" | ||
| 1479 | .target_set = TargetSet.initOne(.arm) | ||
| 1480 | .attributes = .{ .@"const" = true } | ||
| 1481 | |||
| 1482 | __builtin_arm_uhadd8 | ||
| 1483 | .param_str = "UiUiUi" | ||
| 1484 | .target_set = TargetSet.initOne(.arm) | ||
| 1485 | .attributes = .{ .@"const" = true } | ||
| 1486 | |||
| 1487 | __builtin_arm_uhasx | ||
| 1488 | .param_str = "UiUiUi" | ||
| 1489 | .target_set = TargetSet.initOne(.arm) | ||
| 1490 | .attributes = .{ .@"const" = true } | ||
| 1491 | |||
| 1492 | __builtin_arm_uhsax | ||
| 1493 | .param_str = "UiUiUi" | ||
| 1494 | .target_set = TargetSet.initOne(.arm) | ||
| 1495 | .attributes = .{ .@"const" = true } | ||
| 1496 | |||
| 1497 | __builtin_arm_uhsub16 | ||
| 1498 | .param_str = "UiUiUi" | ||
| 1499 | .target_set = TargetSet.initOne(.arm) | ||
| 1500 | .attributes = .{ .@"const" = true } | ||
| 1501 | |||
| 1502 | __builtin_arm_uhsub8 | ||
| 1503 | .param_str = "UiUiUi" | ||
| 1504 | .target_set = TargetSet.initOne(.arm) | ||
| 1505 | .attributes = .{ .@"const" = true } | ||
| 1506 | |||
| 1507 | __builtin_arm_uqadd16 | ||
| 1508 | .param_str = "UiUiUi" | ||
| 1509 | .target_set = TargetSet.initOne(.arm) | ||
| 1510 | .attributes = .{ .@"const" = true } | ||
| 1511 | |||
| 1512 | __builtin_arm_uqadd8 | ||
| 1513 | .param_str = "UiUiUi" | ||
| 1514 | .target_set = TargetSet.initOne(.arm) | ||
| 1515 | .attributes = .{ .@"const" = true } | ||
| 1516 | |||
| 1517 | __builtin_arm_uqasx | ||
| 1518 | .param_str = "UiUiUi" | ||
| 1519 | .target_set = TargetSet.initOne(.arm) | ||
| 1520 | .attributes = .{ .@"const" = true } | ||
| 1521 | |||
| 1522 | __builtin_arm_uqsax | ||
| 1523 | .param_str = "UiUiUi" | ||
| 1524 | .target_set = TargetSet.initOne(.arm) | ||
| 1525 | .attributes = .{ .@"const" = true } | ||
| 1526 | |||
| 1527 | __builtin_arm_uqsub16 | ||
| 1528 | .param_str = "UiUiUi" | ||
| 1529 | .target_set = TargetSet.initOne(.arm) | ||
| 1530 | .attributes = .{ .@"const" = true } | ||
| 1531 | |||
| 1532 | __builtin_arm_uqsub8 | ||
| 1533 | .param_str = "UiUiUi" | ||
| 1534 | .target_set = TargetSet.initOne(.arm) | ||
| 1535 | .attributes = .{ .@"const" = true } | ||
| 1536 | |||
| 1537 | __builtin_arm_usad8 | ||
| 1538 | .param_str = "UiUiUi" | ||
| 1539 | .target_set = TargetSet.initOne(.arm) | ||
| 1540 | .attributes = .{ .@"const" = true } | ||
| 1541 | |||
| 1542 | __builtin_arm_usada8 | ||
| 1543 | .param_str = "UiUiUiUi" | ||
| 1544 | .target_set = TargetSet.initOne(.arm) | ||
| 1545 | .attributes = .{ .@"const" = true } | ||
| 1546 | |||
| 1547 | __builtin_arm_usat | ||
| 1548 | .param_str = "UiiUi" | ||
| 1549 | .target_set = TargetSet.initOne(.arm) | ||
| 1550 | .attributes = .{ .@"const" = true } | ||
| 1551 | |||
| 1552 | __builtin_arm_usat16 | ||
| 1553 | .param_str = "iii" | ||
| 1554 | .target_set = TargetSet.initOne(.arm) | ||
| 1555 | .attributes = .{ .@"const" = true } | ||
| 1556 | |||
| 1557 | __builtin_arm_usax | ||
| 1558 | .param_str = "UiUiUi" | ||
| 1559 | .target_set = TargetSet.initOne(.arm) | ||
| 1560 | .attributes = .{ .@"const" = true } | ||
| 1561 | |||
| 1562 | __builtin_arm_usub16 | ||
| 1563 | .param_str = "UiUiUi" | ||
| 1564 | .target_set = TargetSet.initOne(.arm) | ||
| 1565 | .attributes = .{ .@"const" = true } | ||
| 1566 | |||
| 1567 | __builtin_arm_usub8 | ||
| 1568 | .param_str = "UiUiUi" | ||
| 1569 | .target_set = TargetSet.initOne(.arm) | ||
| 1570 | .attributes = .{ .@"const" = true } | ||
| 1571 | |||
| 1572 | __builtin_arm_uxtab16 | ||
| 1573 | .param_str = "iii" | ||
| 1574 | .target_set = TargetSet.initOne(.arm) | ||
| 1575 | .attributes = .{ .@"const" = true } | ||
| 1576 | |||
| 1577 | __builtin_arm_uxtb16 | ||
| 1578 | .param_str = "ii" | ||
| 1579 | .target_set = TargetSet.initOne(.arm) | ||
| 1580 | .attributes = .{ .@"const" = true } | ||
| 1581 | |||
| 1582 | __builtin_arm_vcvtr_d | ||
| 1583 | .param_str = "fdi" | ||
| 1584 | .target_set = TargetSet.initOne(.arm) | ||
| 1585 | .attributes = .{ .@"const" = true } | ||
| 1586 | |||
| 1587 | __builtin_arm_vcvtr_f | ||
| 1588 | .param_str = "ffi" | ||
| 1589 | .target_set = TargetSet.initOne(.arm) | ||
| 1590 | .attributes = .{ .@"const" = true } | ||
| 1591 | |||
| 1592 | __builtin_arm_wfe | ||
| 1593 | .param_str = "v" | ||
| 1594 | .target_set = TargetSet.initMany(&.{ .aarch64, .arm }) | ||
| 1595 | |||
| 1596 | __builtin_arm_wfi | ||
| 1597 | .param_str = "v" | ||
| 1598 | .target_set = TargetSet.initMany(&.{ .aarch64, .arm }) | ||
| 1599 | |||
| 1600 | __builtin_arm_wsr | ||
| 1601 | .param_str = "vcC*Ui" | ||
| 1602 | .target_set = TargetSet.initMany(&.{ .aarch64, .arm }) | ||
| 1603 | .attributes = .{ .@"const" = true } | ||
| 1604 | |||
| 1605 | __builtin_arm_wsr64 | ||
| 1606 | .param_str = "!" | ||
| 1607 | .target_set = TargetSet.initMany(&.{ .aarch64, .arm }) | ||
| 1608 | .attributes = .{ .@"const" = true } | ||
| 1609 | |||
| 1610 | __builtin_arm_wsrp | ||
| 1611 | .param_str = "vcC*vC*" | ||
| 1612 | .target_set = TargetSet.initMany(&.{ .aarch64, .arm }) | ||
| 1613 | .attributes = .{ .@"const" = true } | ||
| 1614 | |||
| 1615 | __builtin_arm_yield | ||
| 1616 | .param_str = "v" | ||
| 1617 | .target_set = TargetSet.initMany(&.{ .aarch64, .arm }) | ||
| 1618 | |||
| 1619 | __builtin_asin | ||
| 1620 | .param_str = "dd" | ||
| 1621 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 1622 | |||
| 1623 | __builtin_asinf | ||
| 1624 | .param_str = "ff" | ||
| 1625 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 1626 | |||
| 1627 | __builtin_asinf128 | ||
| 1628 | .param_str = "LLdLLd" | ||
| 1629 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 1630 | |||
| 1631 | __builtin_asinh | ||
| 1632 | .param_str = "dd" | ||
| 1633 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 1634 | |||
| 1635 | __builtin_asinhf | ||
| 1636 | .param_str = "ff" | ||
| 1637 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 1638 | |||
| 1639 | __builtin_asinhf128 | ||
| 1640 | .param_str = "LLdLLd" | ||
| 1641 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 1642 | |||
| 1643 | __builtin_asinhl | ||
| 1644 | .param_str = "LdLd" | ||
| 1645 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 1646 | |||
| 1647 | __builtin_asinl | ||
| 1648 | .param_str = "LdLd" | ||
| 1649 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 1650 | |||
| 1651 | __builtin_assume | ||
| 1652 | .param_str = "vb" | ||
| 1653 | .attributes = .{ .const_evaluable = true } | ||
| 1654 | |||
| 1655 | __builtin_assume_aligned | ||
| 1656 | .param_str = "v*vC*z." | ||
| 1657 | .attributes = .{ .@"const" = true, .custom_typecheck = true, .const_evaluable = true } | ||
| 1658 | |||
| 1659 | __builtin_assume_separate_storage | ||
| 1660 | .param_str = "vvCD*vCD*" | ||
| 1661 | .attributes = .{ .const_evaluable = true } | ||
| 1662 | |||
| 1663 | __builtin_atan | ||
| 1664 | .param_str = "dd" | ||
| 1665 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 1666 | |||
| 1667 | __builtin_atan2 | ||
| 1668 | .param_str = "ddd" | ||
| 1669 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 1670 | |||
| 1671 | __builtin_atan2f | ||
| 1672 | .param_str = "fff" | ||
| 1673 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 1674 | |||
| 1675 | __builtin_atan2f128 | ||
| 1676 | .param_str = "LLdLLdLLd" | ||
| 1677 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 1678 | |||
| 1679 | __builtin_atan2l | ||
| 1680 | .param_str = "LdLdLd" | ||
| 1681 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 1682 | |||
| 1683 | __builtin_atanf | ||
| 1684 | .param_str = "ff" | ||
| 1685 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 1686 | |||
| 1687 | __builtin_atanf128 | ||
| 1688 | .param_str = "LLdLLd" | ||
| 1689 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 1690 | |||
| 1691 | __builtin_atanh | ||
| 1692 | .param_str = "dd" | ||
| 1693 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 1694 | |||
| 1695 | __builtin_atanhf | ||
| 1696 | .param_str = "ff" | ||
| 1697 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 1698 | |||
| 1699 | __builtin_atanhf128 | ||
| 1700 | .param_str = "LLdLLd" | ||
| 1701 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 1702 | |||
| 1703 | __builtin_atanhl | ||
| 1704 | .param_str = "LdLd" | ||
| 1705 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 1706 | |||
| 1707 | __builtin_atanl | ||
| 1708 | .param_str = "LdLd" | ||
| 1709 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 1710 | |||
| 1711 | __builtin_bcmp | ||
| 1712 | .param_str = "ivC*vC*z" | ||
| 1713 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_evaluable = true } | ||
| 1714 | |||
| 1715 | __builtin_bcopy | ||
| 1716 | .param_str = "vvC*v*z" | ||
| 1717 | .attributes = .{ .lib_function_with_builtin_prefix = true } | ||
| 1718 | |||
| 1719 | __builtin_bitrev | ||
| 1720 | .param_str = "UiUi" | ||
| 1721 | .target_set = TargetSet.initOne(.xcore) | ||
| 1722 | .attributes = .{ .@"const" = true } | ||
| 1723 | |||
| 1724 | __builtin_bitreverse16 | ||
| 1725 | .param_str = "UsUs" | ||
| 1726 | .attributes = .{ .@"const" = true, .const_evaluable = true } | ||
| 1727 | |||
| 1728 | __builtin_bitreverse32 | ||
| 1729 | .param_str = "UZiUZi" | ||
| 1730 | .attributes = .{ .@"const" = true, .const_evaluable = true } | ||
| 1731 | |||
| 1732 | __builtin_bitreverse64 | ||
| 1733 | .param_str = "UWiUWi" | ||
| 1734 | .attributes = .{ .@"const" = true, .const_evaluable = true } | ||
| 1735 | |||
| 1736 | __builtin_bitreverse8 | ||
| 1737 | .param_str = "UcUc" | ||
| 1738 | .attributes = .{ .@"const" = true, .const_evaluable = true } | ||
| 1739 | |||
| 1740 | __builtin_bswap16 | ||
| 1741 | .param_str = "UsUs" | ||
| 1742 | .attributes = .{ .@"const" = true, .const_evaluable = true } | ||
| 1743 | |||
| 1744 | __builtin_bswap32 | ||
| 1745 | .param_str = "UZiUZi" | ||
| 1746 | .attributes = .{ .@"const" = true, .const_evaluable = true } | ||
| 1747 | |||
| 1748 | __builtin_bswap64 | ||
| 1749 | .param_str = "UWiUWi" | ||
| 1750 | .attributes = .{ .@"const" = true, .const_evaluable = true } | ||
| 1751 | |||
| 1752 | __builtin_bzero | ||
| 1753 | .param_str = "vv*z" | ||
| 1754 | .attributes = .{ .lib_function_with_builtin_prefix = true } | ||
| 1755 | |||
| 1756 | __builtin_cabs | ||
| 1757 | .param_str = "dXd" | ||
| 1758 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 1759 | |||
| 1760 | __builtin_cabsf | ||
| 1761 | .param_str = "fXf" | ||
| 1762 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 1763 | |||
| 1764 | __builtin_cabsl | ||
| 1765 | .param_str = "LdXLd" | ||
| 1766 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 1767 | |||
| 1768 | __builtin_cacos | ||
| 1769 | .param_str = "XdXd" | ||
| 1770 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 1771 | |||
| 1772 | __builtin_cacosf | ||
| 1773 | .param_str = "XfXf" | ||
| 1774 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 1775 | |||
| 1776 | __builtin_cacosh | ||
| 1777 | .param_str = "XdXd" | ||
| 1778 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 1779 | |||
| 1780 | __builtin_cacoshf | ||
| 1781 | .param_str = "XfXf" | ||
| 1782 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 1783 | |||
| 1784 | __builtin_cacoshl | ||
| 1785 | .param_str = "XLdXLd" | ||
| 1786 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 1787 | |||
| 1788 | __builtin_cacosl | ||
| 1789 | .param_str = "XLdXLd" | ||
| 1790 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 1791 | |||
| 1792 | __builtin_call_with_static_chain | ||
| 1793 | .param_str = "v." | ||
| 1794 | .attributes = .{ .custom_typecheck = true } | ||
| 1795 | |||
| 1796 | __builtin_calloc | ||
| 1797 | .param_str = "v*zz" | ||
| 1798 | .attributes = .{ .lib_function_with_builtin_prefix = true } | ||
| 1799 | |||
| 1800 | __builtin_canonicalize | ||
| 1801 | .param_str = "dd" | ||
| 1802 | .attributes = .{ .@"const" = true } | ||
| 1803 | |||
| 1804 | __builtin_canonicalizef | ||
| 1805 | .param_str = "ff" | ||
| 1806 | .attributes = .{ .@"const" = true } | ||
| 1807 | |||
| 1808 | __builtin_canonicalizef16 | ||
| 1809 | .param_str = "hh" | ||
| 1810 | .attributes = .{ .@"const" = true } | ||
| 1811 | |||
| 1812 | __builtin_canonicalizel | ||
| 1813 | .param_str = "LdLd" | ||
| 1814 | .attributes = .{ .@"const" = true } | ||
| 1815 | |||
| 1816 | __builtin_carg | ||
| 1817 | .param_str = "dXd" | ||
| 1818 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 1819 | |||
| 1820 | __builtin_cargf | ||
| 1821 | .param_str = "fXf" | ||
| 1822 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 1823 | |||
| 1824 | __builtin_cargl | ||
| 1825 | .param_str = "LdXLd" | ||
| 1826 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 1827 | |||
| 1828 | __builtin_casin | ||
| 1829 | .param_str = "XdXd" | ||
| 1830 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 1831 | |||
| 1832 | __builtin_casinf | ||
| 1833 | .param_str = "XfXf" | ||
| 1834 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 1835 | |||
| 1836 | __builtin_casinh | ||
| 1837 | .param_str = "XdXd" | ||
| 1838 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 1839 | |||
| 1840 | __builtin_casinhf | ||
| 1841 | .param_str = "XfXf" | ||
| 1842 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 1843 | |||
| 1844 | __builtin_casinhl | ||
| 1845 | .param_str = "XLdXLd" | ||
| 1846 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 1847 | |||
| 1848 | __builtin_casinl | ||
| 1849 | .param_str = "XLdXLd" | ||
| 1850 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 1851 | |||
| 1852 | __builtin_catan | ||
| 1853 | .param_str = "XdXd" | ||
| 1854 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 1855 | |||
| 1856 | __builtin_catanf | ||
| 1857 | .param_str = "XfXf" | ||
| 1858 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 1859 | |||
| 1860 | __builtin_catanh | ||
| 1861 | .param_str = "XdXd" | ||
| 1862 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 1863 | |||
| 1864 | __builtin_catanhf | ||
| 1865 | .param_str = "XfXf" | ||
| 1866 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 1867 | |||
| 1868 | __builtin_catanhl | ||
| 1869 | .param_str = "XLdXLd" | ||
| 1870 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 1871 | |||
| 1872 | __builtin_catanl | ||
| 1873 | .param_str = "XLdXLd" | ||
| 1874 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 1875 | |||
| 1876 | __builtin_cbrt | ||
| 1877 | .param_str = "dd" | ||
| 1878 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } | ||
| 1879 | |||
| 1880 | __builtin_cbrtf | ||
| 1881 | .param_str = "ff" | ||
| 1882 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } | ||
| 1883 | |||
| 1884 | __builtin_cbrtf128 | ||
| 1885 | .param_str = "LLdLLd" | ||
| 1886 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } | ||
| 1887 | |||
| 1888 | __builtin_cbrtl | ||
| 1889 | .param_str = "LdLd" | ||
| 1890 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } | ||
| 1891 | |||
| 1892 | __builtin_ccos | ||
| 1893 | .param_str = "XdXd" | ||
| 1894 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 1895 | |||
| 1896 | __builtin_ccosf | ||
| 1897 | .param_str = "XfXf" | ||
| 1898 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 1899 | |||
| 1900 | __builtin_ccosh | ||
| 1901 | .param_str = "XdXd" | ||
| 1902 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 1903 | |||
| 1904 | __builtin_ccoshf | ||
| 1905 | .param_str = "XfXf" | ||
| 1906 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 1907 | |||
| 1908 | __builtin_ccoshl | ||
| 1909 | .param_str = "XLdXLd" | ||
| 1910 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 1911 | |||
| 1912 | __builtin_ccosl | ||
| 1913 | .param_str = "XLdXLd" | ||
| 1914 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 1915 | |||
| 1916 | __builtin_ceil | ||
| 1917 | .param_str = "dd" | ||
| 1918 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } | ||
| 1919 | |||
| 1920 | __builtin_ceilf | ||
| 1921 | .param_str = "ff" | ||
| 1922 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } | ||
| 1923 | |||
| 1924 | __builtin_ceilf128 | ||
| 1925 | .param_str = "LLdLLd" | ||
| 1926 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } | ||
| 1927 | |||
| 1928 | __builtin_ceilf16 | ||
| 1929 | .param_str = "hh" | ||
| 1930 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } | ||
| 1931 | |||
| 1932 | __builtin_ceill | ||
| 1933 | .param_str = "LdLd" | ||
| 1934 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } | ||
| 1935 | |||
| 1936 | __builtin_cexp | ||
| 1937 | .param_str = "XdXd" | ||
| 1938 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 1939 | |||
| 1940 | __builtin_cexpf | ||
| 1941 | .param_str = "XfXf" | ||
| 1942 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 1943 | |||
| 1944 | __builtin_cexpl | ||
| 1945 | .param_str = "XLdXLd" | ||
| 1946 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 1947 | |||
| 1948 | __builtin_char_memchr | ||
| 1949 | .param_str = "c*cC*iz" | ||
| 1950 | .attributes = .{ .const_evaluable = true } | ||
| 1951 | |||
| 1952 | __builtin_cimag | ||
| 1953 | .param_str = "dXd" | ||
| 1954 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } | ||
| 1955 | |||
| 1956 | __builtin_cimagf | ||
| 1957 | .param_str = "fXf" | ||
| 1958 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } | ||
| 1959 | |||
| 1960 | __builtin_cimagl | ||
| 1961 | .param_str = "LdXLd" | ||
| 1962 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } | ||
| 1963 | |||
| 1964 | __builtin_classify_type | ||
| 1965 | .param_str = "i." | ||
| 1966 | .attributes = .{ .@"const" = true, .custom_typecheck = true, .eval_args = false, .const_evaluable = true } | ||
| 1967 | |||
| 1968 | __builtin_clog | ||
| 1969 | .param_str = "XdXd" | ||
| 1970 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 1971 | |||
| 1972 | __builtin_clogf | ||
| 1973 | .param_str = "XfXf" | ||
| 1974 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 1975 | |||
| 1976 | __builtin_clogl | ||
| 1977 | .param_str = "XLdXLd" | ||
| 1978 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 1979 | |||
| 1980 | __builtin_clrsb | ||
| 1981 | .param_str = "ii" | ||
| 1982 | .attributes = .{ .@"const" = true, .const_evaluable = true } | ||
| 1983 | |||
| 1984 | __builtin_clrsbl | ||
| 1985 | .param_str = "iLi" | ||
| 1986 | .attributes = .{ .@"const" = true, .const_evaluable = true } | ||
| 1987 | |||
| 1988 | __builtin_clrsbll | ||
| 1989 | .param_str = "iLLi" | ||
| 1990 | .attributes = .{ .@"const" = true, .const_evaluable = true } | ||
| 1991 | |||
| 1992 | __builtin_clz | ||
| 1993 | .param_str = "iUi" | ||
| 1994 | .attributes = .{ .@"const" = true, .const_evaluable = true } | ||
| 1995 | |||
| 1996 | __builtin_clzl | ||
| 1997 | .param_str = "iULi" | ||
| 1998 | .attributes = .{ .@"const" = true, .const_evaluable = true } | ||
| 1999 | |||
| 2000 | __builtin_clzll | ||
| 2001 | .param_str = "iULLi" | ||
| 2002 | .attributes = .{ .@"const" = true, .const_evaluable = true } | ||
| 2003 | |||
| 2004 | __builtin_clzs | ||
| 2005 | .param_str = "iUs" | ||
| 2006 | .attributes = .{ .@"const" = true, .const_evaluable = true } | ||
| 2007 | |||
| 2008 | __builtin_complex | ||
| 2009 | .param_str = "v." | ||
| 2010 | .attributes = .{ .@"const" = true, .custom_typecheck = true, .const_evaluable = true } | ||
| 2011 | |||
| 2012 | __builtin_conj | ||
| 2013 | .param_str = "XdXd" | ||
| 2014 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } | ||
| 2015 | |||
| 2016 | __builtin_conjf | ||
| 2017 | .param_str = "XfXf" | ||
| 2018 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } | ||
| 2019 | |||
| 2020 | __builtin_conjl | ||
| 2021 | .param_str = "XLdXLd" | ||
| 2022 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } | ||
| 2023 | |||
| 2024 | __builtin_constant_p | ||
| 2025 | .param_str = "i." | ||
| 2026 | .attributes = .{ .@"const" = true, .custom_typecheck = true, .eval_args = false, .const_evaluable = true } | ||
| 2027 | |||
| 2028 | __builtin_convertvector | ||
| 2029 | .param_str = "v." | ||
| 2030 | .attributes = .{ .@"const" = true, .custom_typecheck = true } | ||
| 2031 | |||
| 2032 | __builtin_copysign | ||
| 2033 | .param_str = "ddd" | ||
| 2034 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } | ||
| 2035 | |||
| 2036 | __builtin_copysignf | ||
| 2037 | .param_str = "fff" | ||
| 2038 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } | ||
| 2039 | |||
| 2040 | __builtin_copysignf128 | ||
| 2041 | .param_str = "LLdLLdLLd" | ||
| 2042 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } | ||
| 2043 | |||
| 2044 | __builtin_copysignf16 | ||
| 2045 | .param_str = "hhh" | ||
| 2046 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } | ||
| 2047 | |||
| 2048 | __builtin_copysignl | ||
| 2049 | .param_str = "LdLdLd" | ||
| 2050 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } | ||
| 2051 | |||
| 2052 | __builtin_cos | ||
| 2053 | .param_str = "dd" | ||
| 2054 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2055 | |||
| 2056 | __builtin_cosf | ||
| 2057 | .param_str = "ff" | ||
| 2058 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2059 | |||
| 2060 | __builtin_cosf128 | ||
| 2061 | .param_str = "LLdLLd" | ||
| 2062 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2063 | |||
| 2064 | __builtin_cosf16 | ||
| 2065 | .param_str = "hh" | ||
| 2066 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2067 | |||
| 2068 | __builtin_cosh | ||
| 2069 | .param_str = "dd" | ||
| 2070 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2071 | |||
| 2072 | __builtin_coshf | ||
| 2073 | .param_str = "ff" | ||
| 2074 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2075 | |||
| 2076 | __builtin_coshf128 | ||
| 2077 | .param_str = "LLdLLd" | ||
| 2078 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2079 | |||
| 2080 | __builtin_coshl | ||
| 2081 | .param_str = "LdLd" | ||
| 2082 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2083 | |||
| 2084 | __builtin_cosl | ||
| 2085 | .param_str = "LdLd" | ||
| 2086 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2087 | |||
| 2088 | __builtin_cpow | ||
| 2089 | .param_str = "XdXdXd" | ||
| 2090 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2091 | |||
| 2092 | __builtin_cpowf | ||
| 2093 | .param_str = "XfXfXf" | ||
| 2094 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2095 | |||
| 2096 | __builtin_cpowl | ||
| 2097 | .param_str = "XLdXLdXLd" | ||
| 2098 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2099 | |||
| 2100 | __builtin_cproj | ||
| 2101 | .param_str = "XdXd" | ||
| 2102 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } | ||
| 2103 | |||
| 2104 | __builtin_cprojf | ||
| 2105 | .param_str = "XfXf" | ||
| 2106 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } | ||
| 2107 | |||
| 2108 | __builtin_cprojl | ||
| 2109 | .param_str = "XLdXLd" | ||
| 2110 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } | ||
| 2111 | |||
| 2112 | __builtin_cpu_init | ||
| 2113 | .param_str = "v" | ||
| 2114 | .target_set = TargetSet.initOne(.x86) | ||
| 2115 | |||
| 2116 | __builtin_cpu_is | ||
| 2117 | .param_str = "bcC*" | ||
| 2118 | .target_set = TargetSet.initOne(.x86) | ||
| 2119 | .attributes = .{ .@"const" = true } | ||
| 2120 | |||
| 2121 | __builtin_cpu_supports | ||
| 2122 | .param_str = "bcC*" | ||
| 2123 | .target_set = TargetSet.initOne(.x86) | ||
| 2124 | .attributes = .{ .@"const" = true } | ||
| 2125 | |||
| 2126 | __builtin_creal | ||
| 2127 | .param_str = "dXd" | ||
| 2128 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } | ||
| 2129 | |||
| 2130 | __builtin_crealf | ||
| 2131 | .param_str = "fXf" | ||
| 2132 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } | ||
| 2133 | |||
| 2134 | __builtin_creall | ||
| 2135 | .param_str = "LdXLd" | ||
| 2136 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } | ||
| 2137 | |||
| 2138 | __builtin_csin | ||
| 2139 | .param_str = "XdXd" | ||
| 2140 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2141 | |||
| 2142 | __builtin_csinf | ||
| 2143 | .param_str = "XfXf" | ||
| 2144 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2145 | |||
| 2146 | __builtin_csinh | ||
| 2147 | .param_str = "XdXd" | ||
| 2148 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2149 | |||
| 2150 | __builtin_csinhf | ||
| 2151 | .param_str = "XfXf" | ||
| 2152 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2153 | |||
| 2154 | __builtin_csinhl | ||
| 2155 | .param_str = "XLdXLd" | ||
| 2156 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2157 | |||
| 2158 | __builtin_csinl | ||
| 2159 | .param_str = "XLdXLd" | ||
| 2160 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2161 | |||
| 2162 | __builtin_csqrt | ||
| 2163 | .param_str = "XdXd" | ||
| 2164 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2165 | |||
| 2166 | __builtin_csqrtf | ||
| 2167 | .param_str = "XfXf" | ||
| 2168 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2169 | |||
| 2170 | __builtin_csqrtl | ||
| 2171 | .param_str = "XLdXLd" | ||
| 2172 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2173 | |||
| 2174 | __builtin_ctan | ||
| 2175 | .param_str = "XdXd" | ||
| 2176 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2177 | |||
| 2178 | __builtin_ctanf | ||
| 2179 | .param_str = "XfXf" | ||
| 2180 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2181 | |||
| 2182 | __builtin_ctanh | ||
| 2183 | .param_str = "XdXd" | ||
| 2184 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2185 | |||
| 2186 | __builtin_ctanhf | ||
| 2187 | .param_str = "XfXf" | ||
| 2188 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2189 | |||
| 2190 | __builtin_ctanhl | ||
| 2191 | .param_str = "XLdXLd" | ||
| 2192 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2193 | |||
| 2194 | __builtin_ctanl | ||
| 2195 | .param_str = "XLdXLd" | ||
| 2196 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2197 | |||
| 2198 | __builtin_ctz | ||
| 2199 | .param_str = "iUi" | ||
| 2200 | .attributes = .{ .@"const" = true, .const_evaluable = true } | ||
| 2201 | |||
| 2202 | __builtin_ctzl | ||
| 2203 | .param_str = "iULi" | ||
| 2204 | .attributes = .{ .@"const" = true, .const_evaluable = true } | ||
| 2205 | |||
| 2206 | __builtin_ctzll | ||
| 2207 | .param_str = "iULLi" | ||
| 2208 | .attributes = .{ .@"const" = true, .const_evaluable = true } | ||
| 2209 | |||
| 2210 | __builtin_ctzs | ||
| 2211 | .param_str = "iUs" | ||
| 2212 | .attributes = .{ .@"const" = true, .const_evaluable = true } | ||
| 2213 | |||
| 2214 | __builtin_dcbf | ||
| 2215 | .param_str = "vvC*" | ||
| 2216 | .target_set = TargetSet.initOne(.ppc) | ||
| 2217 | |||
| 2218 | __builtin_debugtrap | ||
| 2219 | .param_str = "v" | ||
| 2220 | |||
| 2221 | __builtin_dump_struct | ||
| 2222 | .param_str = "v." | ||
| 2223 | .attributes = .{ .custom_typecheck = true } | ||
| 2224 | |||
| 2225 | __builtin_dwarf_cfa | ||
| 2226 | .param_str = "v*" | ||
| 2227 | |||
| 2228 | __builtin_dwarf_sp_column | ||
| 2229 | .param_str = "Ui" | ||
| 2230 | |||
| 2231 | __builtin_dynamic_object_size | ||
| 2232 | .param_str = "zvC*i" | ||
| 2233 | .attributes = .{ .eval_args = false, .const_evaluable = true } | ||
| 2234 | |||
| 2235 | __builtin_eh_return | ||
| 2236 | .param_str = "vzv*" | ||
| 2237 | .attributes = .{ .noreturn = true } | ||
| 2238 | |||
| 2239 | __builtin_eh_return_data_regno | ||
| 2240 | .param_str = "iIi" | ||
| 2241 | .attributes = .{ .@"const" = true, .const_evaluable = true } | ||
| 2242 | |||
| 2243 | __builtin_elementwise_abs | ||
| 2244 | .param_str = "v." | ||
| 2245 | .attributes = .{ .@"const" = true, .custom_typecheck = true } | ||
| 2246 | |||
| 2247 | __builtin_elementwise_add_sat | ||
| 2248 | .param_str = "v." | ||
| 2249 | .attributes = .{ .@"const" = true, .custom_typecheck = true } | ||
| 2250 | |||
| 2251 | __builtin_elementwise_bitreverse | ||
| 2252 | .param_str = "v." | ||
| 2253 | .attributes = .{ .@"const" = true, .custom_typecheck = true } | ||
| 2254 | |||
| 2255 | __builtin_elementwise_canonicalize | ||
| 2256 | .param_str = "v." | ||
| 2257 | .attributes = .{ .@"const" = true, .custom_typecheck = true } | ||
| 2258 | |||
| 2259 | __builtin_elementwise_ceil | ||
| 2260 | .param_str = "v." | ||
| 2261 | .attributes = .{ .@"const" = true, .custom_typecheck = true } | ||
| 2262 | |||
| 2263 | __builtin_elementwise_copysign | ||
| 2264 | .param_str = "v." | ||
| 2265 | .attributes = .{ .@"const" = true, .custom_typecheck = true } | ||
| 2266 | |||
| 2267 | __builtin_elementwise_cos | ||
| 2268 | .param_str = "v." | ||
| 2269 | .attributes = .{ .@"const" = true, .custom_typecheck = true } | ||
| 2270 | |||
| 2271 | __builtin_elementwise_exp | ||
| 2272 | .param_str = "v." | ||
| 2273 | .attributes = .{ .@"const" = true, .custom_typecheck = true } | ||
| 2274 | |||
| 2275 | __builtin_elementwise_exp2 | ||
| 2276 | .param_str = "v." | ||
| 2277 | .attributes = .{ .@"const" = true, .custom_typecheck = true } | ||
| 2278 | |||
| 2279 | __builtin_elementwise_floor | ||
| 2280 | .param_str = "v." | ||
| 2281 | .attributes = .{ .@"const" = true, .custom_typecheck = true } | ||
| 2282 | |||
| 2283 | __builtin_elementwise_fma | ||
| 2284 | .param_str = "v." | ||
| 2285 | .attributes = .{ .@"const" = true, .custom_typecheck = true } | ||
| 2286 | |||
| 2287 | __builtin_elementwise_log | ||
| 2288 | .param_str = "v." | ||
| 2289 | .attributes = .{ .@"const" = true, .custom_typecheck = true } | ||
| 2290 | |||
| 2291 | __builtin_elementwise_log10 | ||
| 2292 | .param_str = "v." | ||
| 2293 | .attributes = .{ .@"const" = true, .custom_typecheck = true } | ||
| 2294 | |||
| 2295 | __builtin_elementwise_log2 | ||
| 2296 | .param_str = "v." | ||
| 2297 | .attributes = .{ .@"const" = true, .custom_typecheck = true } | ||
| 2298 | |||
| 2299 | __builtin_elementwise_max | ||
| 2300 | .param_str = "v." | ||
| 2301 | .attributes = .{ .@"const" = true, .custom_typecheck = true } | ||
| 2302 | |||
| 2303 | __builtin_elementwise_min | ||
| 2304 | .param_str = "v." | ||
| 2305 | .attributes = .{ .@"const" = true, .custom_typecheck = true } | ||
| 2306 | |||
| 2307 | __builtin_elementwise_nearbyint | ||
| 2308 | .param_str = "v." | ||
| 2309 | .attributes = .{ .@"const" = true, .custom_typecheck = true } | ||
| 2310 | |||
| 2311 | __builtin_elementwise_pow | ||
| 2312 | .param_str = "v." | ||
| 2313 | .attributes = .{ .@"const" = true, .custom_typecheck = true } | ||
| 2314 | |||
| 2315 | __builtin_elementwise_rint | ||
| 2316 | .param_str = "v." | ||
| 2317 | .attributes = .{ .@"const" = true, .custom_typecheck = true } | ||
| 2318 | |||
| 2319 | __builtin_elementwise_round | ||
| 2320 | .param_str = "v." | ||
| 2321 | .attributes = .{ .@"const" = true, .custom_typecheck = true } | ||
| 2322 | |||
| 2323 | __builtin_elementwise_roundeven | ||
| 2324 | .param_str = "v." | ||
| 2325 | .attributes = .{ .@"const" = true, .custom_typecheck = true } | ||
| 2326 | |||
| 2327 | __builtin_elementwise_sin | ||
| 2328 | .param_str = "v." | ||
| 2329 | .attributes = .{ .@"const" = true, .custom_typecheck = true } | ||
| 2330 | |||
| 2331 | __builtin_elementwise_sqrt | ||
| 2332 | .param_str = "v." | ||
| 2333 | .attributes = .{ .@"const" = true, .custom_typecheck = true } | ||
| 2334 | |||
| 2335 | __builtin_elementwise_sub_sat | ||
| 2336 | .param_str = "v." | ||
| 2337 | .attributes = .{ .@"const" = true, .custom_typecheck = true } | ||
| 2338 | |||
| 2339 | __builtin_elementwise_trunc | ||
| 2340 | .param_str = "v." | ||
| 2341 | .attributes = .{ .@"const" = true, .custom_typecheck = true } | ||
| 2342 | |||
| 2343 | __builtin_erf | ||
| 2344 | .param_str = "dd" | ||
| 2345 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2346 | |||
| 2347 | __builtin_erfc | ||
| 2348 | .param_str = "dd" | ||
| 2349 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2350 | |||
| 2351 | __builtin_erfcf | ||
| 2352 | .param_str = "ff" | ||
| 2353 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2354 | |||
| 2355 | __builtin_erfcf128 | ||
| 2356 | .param_str = "LLdLLd" | ||
| 2357 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2358 | |||
| 2359 | __builtin_erfcl | ||
| 2360 | .param_str = "LdLd" | ||
| 2361 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2362 | |||
| 2363 | __builtin_erff | ||
| 2364 | .param_str = "ff" | ||
| 2365 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2366 | |||
| 2367 | __builtin_erff128 | ||
| 2368 | .param_str = "LLdLLd" | ||
| 2369 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2370 | |||
| 2371 | __builtin_erfl | ||
| 2372 | .param_str = "LdLd" | ||
| 2373 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2374 | |||
| 2375 | __builtin_exp | ||
| 2376 | .param_str = "dd" | ||
| 2377 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2378 | |||
| 2379 | __builtin_exp10 | ||
| 2380 | .param_str = "dd" | ||
| 2381 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2382 | |||
| 2383 | __builtin_exp10f | ||
| 2384 | .param_str = "ff" | ||
| 2385 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2386 | |||
| 2387 | __builtin_exp10f128 | ||
| 2388 | .param_str = "LLdLLd" | ||
| 2389 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2390 | |||
| 2391 | __builtin_exp10f16 | ||
| 2392 | .param_str = "hh" | ||
| 2393 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2394 | |||
| 2395 | __builtin_exp10l | ||
| 2396 | .param_str = "LdLd" | ||
| 2397 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2398 | |||
| 2399 | __builtin_exp2 | ||
| 2400 | .param_str = "dd" | ||
| 2401 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2402 | |||
| 2403 | __builtin_exp2f | ||
| 2404 | .param_str = "ff" | ||
| 2405 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2406 | |||
| 2407 | __builtin_exp2f128 | ||
| 2408 | .param_str = "LLdLLd" | ||
| 2409 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2410 | |||
| 2411 | __builtin_exp2f16 | ||
| 2412 | .param_str = "hh" | ||
| 2413 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2414 | |||
| 2415 | __builtin_exp2l | ||
| 2416 | .param_str = "LdLd" | ||
| 2417 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2418 | |||
| 2419 | __builtin_expect | ||
| 2420 | .param_str = "LiLiLi" | ||
| 2421 | .attributes = .{ .@"const" = true, .const_evaluable = true } | ||
| 2422 | |||
| 2423 | __builtin_expect_with_probability | ||
| 2424 | .param_str = "LiLiLid" | ||
| 2425 | .attributes = .{ .@"const" = true, .const_evaluable = true } | ||
| 2426 | |||
| 2427 | __builtin_expf | ||
| 2428 | .param_str = "ff" | ||
| 2429 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2430 | |||
| 2431 | __builtin_expf128 | ||
| 2432 | .param_str = "LLdLLd" | ||
| 2433 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2434 | |||
| 2435 | __builtin_expf16 | ||
| 2436 | .param_str = "hh" | ||
| 2437 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2438 | |||
| 2439 | __builtin_expl | ||
| 2440 | .param_str = "LdLd" | ||
| 2441 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2442 | |||
| 2443 | __builtin_expm1 | ||
| 2444 | .param_str = "dd" | ||
| 2445 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2446 | |||
| 2447 | __builtin_expm1f | ||
| 2448 | .param_str = "ff" | ||
| 2449 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2450 | |||
| 2451 | __builtin_expm1f128 | ||
| 2452 | .param_str = "LLdLLd" | ||
| 2453 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2454 | |||
| 2455 | __builtin_expm1l | ||
| 2456 | .param_str = "LdLd" | ||
| 2457 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2458 | |||
| 2459 | __builtin_extend_pointer | ||
| 2460 | .param_str = "ULLiv*" | ||
| 2461 | |||
| 2462 | __builtin_extract_return_addr | ||
| 2463 | .param_str = "v*v*" | ||
| 2464 | |||
| 2465 | __builtin_fabs | ||
| 2466 | .param_str = "dd" | ||
| 2467 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } | ||
| 2468 | |||
| 2469 | __builtin_fabsf | ||
| 2470 | .param_str = "ff" | ||
| 2471 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } | ||
| 2472 | |||
| 2473 | __builtin_fabsf128 | ||
| 2474 | .param_str = "LLdLLd" | ||
| 2475 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } | ||
| 2476 | |||
| 2477 | __builtin_fabsf16 | ||
| 2478 | .param_str = "hh" | ||
| 2479 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } | ||
| 2480 | |||
| 2481 | __builtin_fabsl | ||
| 2482 | .param_str = "LdLd" | ||
| 2483 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } | ||
| 2484 | |||
| 2485 | __builtin_fdim | ||
| 2486 | .param_str = "ddd" | ||
| 2487 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2488 | |||
| 2489 | __builtin_fdimf | ||
| 2490 | .param_str = "fff" | ||
| 2491 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2492 | |||
| 2493 | __builtin_fdimf128 | ||
| 2494 | .param_str = "LLdLLdLLd" | ||
| 2495 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2496 | |||
| 2497 | __builtin_fdiml | ||
| 2498 | .param_str = "LdLdLd" | ||
| 2499 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2500 | |||
| 2501 | __builtin_ffs | ||
| 2502 | .param_str = "ii" | ||
| 2503 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } | ||
| 2504 | |||
| 2505 | __builtin_ffsl | ||
| 2506 | .param_str = "iLi" | ||
| 2507 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } | ||
| 2508 | |||
| 2509 | __builtin_ffsll | ||
| 2510 | .param_str = "iLLi" | ||
| 2511 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } | ||
| 2512 | |||
| 2513 | __builtin_floor | ||
| 2514 | .param_str = "dd" | ||
| 2515 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } | ||
| 2516 | |||
| 2517 | __builtin_floorf | ||
| 2518 | .param_str = "ff" | ||
| 2519 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } | ||
| 2520 | |||
| 2521 | __builtin_floorf128 | ||
| 2522 | .param_str = "LLdLLd" | ||
| 2523 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } | ||
| 2524 | |||
| 2525 | __builtin_floorf16 | ||
| 2526 | .param_str = "hh" | ||
| 2527 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } | ||
| 2528 | |||
| 2529 | __builtin_floorl | ||
| 2530 | .param_str = "LdLd" | ||
| 2531 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } | ||
| 2532 | |||
| 2533 | __builtin_flt_rounds | ||
| 2534 | .param_str = "i" | ||
| 2535 | |||
| 2536 | __builtin_fma | ||
| 2537 | .param_str = "dddd" | ||
| 2538 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2539 | |||
| 2540 | __builtin_fmaf | ||
| 2541 | .param_str = "ffff" | ||
| 2542 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2543 | |||
| 2544 | __builtin_fmaf128 | ||
| 2545 | .param_str = "LLdLLdLLdLLd" | ||
| 2546 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2547 | |||
| 2548 | __builtin_fmaf16 | ||
| 2549 | .param_str = "hhhh" | ||
| 2550 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2551 | |||
| 2552 | __builtin_fmal | ||
| 2553 | .param_str = "LdLdLdLd" | ||
| 2554 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2555 | |||
| 2556 | __builtin_fmax | ||
| 2557 | .param_str = "ddd" | ||
| 2558 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } | ||
| 2559 | |||
| 2560 | __builtin_fmaxf | ||
| 2561 | .param_str = "fff" | ||
| 2562 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } | ||
| 2563 | |||
| 2564 | __builtin_fmaxf128 | ||
| 2565 | .param_str = "LLdLLdLLd" | ||
| 2566 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } | ||
| 2567 | |||
| 2568 | __builtin_fmaxf16 | ||
| 2569 | .param_str = "hhh" | ||
| 2570 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } | ||
| 2571 | |||
| 2572 | __builtin_fmaxl | ||
| 2573 | .param_str = "LdLdLd" | ||
| 2574 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } | ||
| 2575 | |||
| 2576 | __builtin_fmin | ||
| 2577 | .param_str = "ddd" | ||
| 2578 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } | ||
| 2579 | |||
| 2580 | __builtin_fminf | ||
| 2581 | .param_str = "fff" | ||
| 2582 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } | ||
| 2583 | |||
| 2584 | __builtin_fminf128 | ||
| 2585 | .param_str = "LLdLLdLLd" | ||
| 2586 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } | ||
| 2587 | |||
| 2588 | __builtin_fminf16 | ||
| 2589 | .param_str = "hhh" | ||
| 2590 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } | ||
| 2591 | |||
| 2592 | __builtin_fminl | ||
| 2593 | .param_str = "LdLdLd" | ||
| 2594 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } | ||
| 2595 | |||
| 2596 | __builtin_fmod | ||
| 2597 | .param_str = "ddd" | ||
| 2598 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2599 | |||
| 2600 | __builtin_fmodf | ||
| 2601 | .param_str = "fff" | ||
| 2602 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2603 | |||
| 2604 | __builtin_fmodf128 | ||
| 2605 | .param_str = "LLdLLdLLd" | ||
| 2606 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2607 | |||
| 2608 | __builtin_fmodf16 | ||
| 2609 | .param_str = "hhh" | ||
| 2610 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2611 | |||
| 2612 | __builtin_fmodl | ||
| 2613 | .param_str = "LdLdLd" | ||
| 2614 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2615 | |||
| 2616 | __builtin_fpclassify | ||
| 2617 | .param_str = "iiiiii." | ||
| 2618 | .attributes = .{ .@"const" = true, .custom_typecheck = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } | ||
| 2619 | |||
| 2620 | __builtin_fprintf | ||
| 2621 | .param_str = "iP*RcC*R." | ||
| 2622 | .attributes = .{ .lib_function_with_builtin_prefix = true, .format_kind = .printf, .format_string_position = 1 } | ||
| 2623 | |||
| 2624 | __builtin_frame_address | ||
| 2625 | .param_str = "v*IUi" | ||
| 2626 | |||
| 2627 | __builtin_free | ||
| 2628 | .param_str = "vv*" | ||
| 2629 | .attributes = .{ .lib_function_with_builtin_prefix = true } | ||
| 2630 | |||
| 2631 | __builtin_frexp | ||
| 2632 | .param_str = "ddi*" | ||
| 2633 | .attributes = .{ .lib_function_with_builtin_prefix = true } | ||
| 2634 | |||
| 2635 | __builtin_frexpf | ||
| 2636 | .param_str = "ffi*" | ||
| 2637 | .attributes = .{ .lib_function_with_builtin_prefix = true } | ||
| 2638 | |||
| 2639 | __builtin_frexpf128 | ||
| 2640 | .param_str = "LLdLLdi*" | ||
| 2641 | .attributes = .{ .lib_function_with_builtin_prefix = true } | ||
| 2642 | |||
| 2643 | __builtin_frexpf16 | ||
| 2644 | .param_str = "hhi*" | ||
| 2645 | .attributes = .{ .lib_function_with_builtin_prefix = true } | ||
| 2646 | |||
| 2647 | __builtin_frexpl | ||
| 2648 | .param_str = "LdLdi*" | ||
| 2649 | .attributes = .{ .lib_function_with_builtin_prefix = true } | ||
| 2650 | |||
| 2651 | __builtin_frob_return_addr | ||
| 2652 | .param_str = "v*v*" | ||
| 2653 | |||
| 2654 | __builtin_fscanf | ||
| 2655 | .param_str = "iP*RcC*R." | ||
| 2656 | .attributes = .{ .lib_function_with_builtin_prefix = true, .format_kind = .scanf, .format_string_position = 1 } | ||
| 2657 | |||
| 2658 | __builtin_getid | ||
| 2659 | .param_str = "Si" | ||
| 2660 | .target_set = TargetSet.initOne(.xcore) | ||
| 2661 | .attributes = .{ .@"const" = true } | ||
| 2662 | |||
| 2663 | __builtin_getps | ||
| 2664 | .param_str = "UiUi" | ||
| 2665 | .target_set = TargetSet.initOne(.xcore) | ||
| 2666 | |||
| 2667 | __builtin_huge_val | ||
| 2668 | .param_str = "d" | ||
| 2669 | .attributes = .{ .@"const" = true, .const_evaluable = true } | ||
| 2670 | |||
| 2671 | __builtin_huge_valf | ||
| 2672 | .param_str = "f" | ||
| 2673 | .attributes = .{ .@"const" = true, .const_evaluable = true } | ||
| 2674 | |||
| 2675 | __builtin_huge_valf128 | ||
| 2676 | .param_str = "LLd" | ||
| 2677 | .attributes = .{ .@"const" = true, .const_evaluable = true } | ||
| 2678 | |||
| 2679 | __builtin_huge_valf16 | ||
| 2680 | .param_str = "x" | ||
| 2681 | .attributes = .{ .@"const" = true, .const_evaluable = true } | ||
| 2682 | |||
| 2683 | __builtin_huge_vall | ||
| 2684 | .param_str = "Ld" | ||
| 2685 | .attributes = .{ .@"const" = true, .const_evaluable = true } | ||
| 2686 | |||
| 2687 | __builtin_hypot | ||
| 2688 | .param_str = "ddd" | ||
| 2689 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2690 | |||
| 2691 | __builtin_hypotf | ||
| 2692 | .param_str = "fff" | ||
| 2693 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2694 | |||
| 2695 | __builtin_hypotf128 | ||
| 2696 | .param_str = "LLdLLdLLd" | ||
| 2697 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2698 | |||
| 2699 | __builtin_hypotl | ||
| 2700 | .param_str = "LdLdLd" | ||
| 2701 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2702 | |||
| 2703 | __builtin_ia32_rdpmc | ||
| 2704 | .param_str = "UOii" | ||
| 2705 | .target_set = TargetSet.initOne(.x86) | ||
| 2706 | |||
| 2707 | __builtin_ia32_rdtsc | ||
| 2708 | .param_str = "UOi" | ||
| 2709 | .target_set = TargetSet.initOne(.x86) | ||
| 2710 | |||
| 2711 | __builtin_ia32_rdtscp | ||
| 2712 | .param_str = "UOiUi*" | ||
| 2713 | .target_set = TargetSet.initOne(.x86) | ||
| 2714 | |||
| 2715 | __builtin_ilogb | ||
| 2716 | .param_str = "id" | ||
| 2717 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2718 | |||
| 2719 | __builtin_ilogbf | ||
| 2720 | .param_str = "if" | ||
| 2721 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2722 | |||
| 2723 | __builtin_ilogbf128 | ||
| 2724 | .param_str = "iLLd" | ||
| 2725 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2726 | |||
| 2727 | __builtin_ilogbl | ||
| 2728 | .param_str = "iLd" | ||
| 2729 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2730 | |||
| 2731 | __builtin_index | ||
| 2732 | .param_str = "c*cC*i" | ||
| 2733 | .attributes = .{ .lib_function_with_builtin_prefix = true } | ||
| 2734 | |||
| 2735 | __builtin_inf | ||
| 2736 | .param_str = "d" | ||
| 2737 | .attributes = .{ .@"const" = true, .const_evaluable = true } | ||
| 2738 | |||
| 2739 | __builtin_inff | ||
| 2740 | .param_str = "f" | ||
| 2741 | .attributes = .{ .@"const" = true, .const_evaluable = true } | ||
| 2742 | |||
| 2743 | __builtin_inff128 | ||
| 2744 | .param_str = "LLd" | ||
| 2745 | .attributes = .{ .@"const" = true, .const_evaluable = true } | ||
| 2746 | |||
| 2747 | __builtin_inff16 | ||
| 2748 | .param_str = "x" | ||
| 2749 | .attributes = .{ .@"const" = true, .const_evaluable = true } | ||
| 2750 | |||
| 2751 | __builtin_infl | ||
| 2752 | .param_str = "Ld" | ||
| 2753 | .attributes = .{ .@"const" = true, .const_evaluable = true } | ||
| 2754 | |||
| 2755 | __builtin_init_dwarf_reg_size_table | ||
| 2756 | .param_str = "vv*" | ||
| 2757 | |||
| 2758 | __builtin_is_aligned | ||
| 2759 | .param_str = "bvC*z" | ||
| 2760 | .attributes = .{ .@"const" = true, .custom_typecheck = true, .const_evaluable = true } | ||
| 2761 | |||
| 2762 | __builtin_isfinite | ||
| 2763 | .param_str = "i." | ||
| 2764 | .attributes = .{ .@"const" = true, .custom_typecheck = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } | ||
| 2765 | |||
| 2766 | __builtin_isfpclass | ||
| 2767 | .param_str = "i." | ||
| 2768 | .attributes = .{ .@"const" = true, .custom_typecheck = true, .const_evaluable = true } | ||
| 2769 | |||
| 2770 | __builtin_isgreater | ||
| 2771 | .param_str = "i." | ||
| 2772 | .attributes = .{ .@"const" = true, .custom_typecheck = true, .lib_function_with_builtin_prefix = true } | ||
| 2773 | |||
| 2774 | __builtin_isgreaterequal | ||
| 2775 | .param_str = "i." | ||
| 2776 | .attributes = .{ .@"const" = true, .custom_typecheck = true, .lib_function_with_builtin_prefix = true } | ||
| 2777 | |||
| 2778 | __builtin_isinf | ||
| 2779 | .param_str = "i." | ||
| 2780 | .attributes = .{ .@"const" = true, .custom_typecheck = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } | ||
| 2781 | |||
| 2782 | __builtin_isinf_sign | ||
| 2783 | .param_str = "i." | ||
| 2784 | .attributes = .{ .@"const" = true, .custom_typecheck = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } | ||
| 2785 | |||
| 2786 | __builtin_isless | ||
| 2787 | .param_str = "i." | ||
| 2788 | .attributes = .{ .@"const" = true, .custom_typecheck = true, .lib_function_with_builtin_prefix = true } | ||
| 2789 | |||
| 2790 | __builtin_islessequal | ||
| 2791 | .param_str = "i." | ||
| 2792 | .attributes = .{ .@"const" = true, .custom_typecheck = true, .lib_function_with_builtin_prefix = true } | ||
| 2793 | |||
| 2794 | __builtin_islessgreater | ||
| 2795 | .param_str = "i." | ||
| 2796 | .attributes = .{ .@"const" = true, .custom_typecheck = true, .lib_function_with_builtin_prefix = true } | ||
| 2797 | |||
| 2798 | __builtin_isnan | ||
| 2799 | .param_str = "i." | ||
| 2800 | .attributes = .{ .@"const" = true, .custom_typecheck = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } | ||
| 2801 | |||
| 2802 | __builtin_isnormal | ||
| 2803 | .param_str = "i." | ||
| 2804 | .attributes = .{ .@"const" = true, .custom_typecheck = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } | ||
| 2805 | |||
| 2806 | __builtin_isunordered | ||
| 2807 | .param_str = "i." | ||
| 2808 | .attributes = .{ .@"const" = true, .custom_typecheck = true, .lib_function_with_builtin_prefix = true } | ||
| 2809 | |||
| 2810 | __builtin_labs | ||
| 2811 | .param_str = "LiLi" | ||
| 2812 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } | ||
| 2813 | |||
| 2814 | __builtin_launder | ||
| 2815 | .param_str = "v*v*" | ||
| 2816 | .attributes = .{ .custom_typecheck = true, .const_evaluable = true } | ||
| 2817 | |||
| 2818 | __builtin_ldexp | ||
| 2819 | .param_str = "ddi" | ||
| 2820 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2821 | |||
| 2822 | __builtin_ldexpf | ||
| 2823 | .param_str = "ffi" | ||
| 2824 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2825 | |||
| 2826 | __builtin_ldexpf128 | ||
| 2827 | .param_str = "LLdLLdi" | ||
| 2828 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2829 | |||
| 2830 | __builtin_ldexpf16 | ||
| 2831 | .param_str = "hhi" | ||
| 2832 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2833 | |||
| 2834 | __builtin_ldexpl | ||
| 2835 | .param_str = "LdLdi" | ||
| 2836 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2837 | |||
| 2838 | __builtin_lgamma | ||
| 2839 | .param_str = "dd" | ||
| 2840 | .attributes = .{ .lib_function_with_builtin_prefix = true } | ||
| 2841 | |||
| 2842 | __builtin_lgammaf | ||
| 2843 | .param_str = "ff" | ||
| 2844 | .attributes = .{ .lib_function_with_builtin_prefix = true } | ||
| 2845 | |||
| 2846 | __builtin_lgammaf128 | ||
| 2847 | .param_str = "LLdLLd" | ||
| 2848 | .attributes = .{ .lib_function_with_builtin_prefix = true } | ||
| 2849 | |||
| 2850 | __builtin_lgammal | ||
| 2851 | .param_str = "LdLd" | ||
| 2852 | .attributes = .{ .lib_function_with_builtin_prefix = true } | ||
| 2853 | |||
| 2854 | __builtin_llabs | ||
| 2855 | .param_str = "LLiLLi" | ||
| 2856 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } | ||
| 2857 | |||
| 2858 | __builtin_llrint | ||
| 2859 | .param_str = "LLid" | ||
| 2860 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2861 | |||
| 2862 | __builtin_llrintf | ||
| 2863 | .param_str = "LLif" | ||
| 2864 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2865 | |||
| 2866 | __builtin_llrintf128 | ||
| 2867 | .param_str = "LLiLLd" | ||
| 2868 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2869 | |||
| 2870 | __builtin_llrintl | ||
| 2871 | .param_str = "LLiLd" | ||
| 2872 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2873 | |||
| 2874 | __builtin_llround | ||
| 2875 | .param_str = "LLid" | ||
| 2876 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2877 | |||
| 2878 | __builtin_llroundf | ||
| 2879 | .param_str = "LLif" | ||
| 2880 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2881 | |||
| 2882 | __builtin_llroundf128 | ||
| 2883 | .param_str = "LLiLLd" | ||
| 2884 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2885 | |||
| 2886 | __builtin_llroundl | ||
| 2887 | .param_str = "LLiLd" | ||
| 2888 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2889 | |||
| 2890 | __builtin_log | ||
| 2891 | .param_str = "dd" | ||
| 2892 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2893 | |||
| 2894 | __builtin_log10 | ||
| 2895 | .param_str = "dd" | ||
| 2896 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2897 | |||
| 2898 | __builtin_log10f | ||
| 2899 | .param_str = "ff" | ||
| 2900 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2901 | |||
| 2902 | __builtin_log10f128 | ||
| 2903 | .param_str = "LLdLLd" | ||
| 2904 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2905 | |||
| 2906 | __builtin_log10f16 | ||
| 2907 | .param_str = "hh" | ||
| 2908 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2909 | |||
| 2910 | __builtin_log10l | ||
| 2911 | .param_str = "LdLd" | ||
| 2912 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2913 | |||
| 2914 | __builtin_log1p | ||
| 2915 | .param_str = "dd" | ||
| 2916 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2917 | |||
| 2918 | __builtin_log1pf | ||
| 2919 | .param_str = "ff" | ||
| 2920 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2921 | |||
| 2922 | __builtin_log1pf128 | ||
| 2923 | .param_str = "LLdLLd" | ||
| 2924 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2925 | |||
| 2926 | __builtin_log1pl | ||
| 2927 | .param_str = "LdLd" | ||
| 2928 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2929 | |||
| 2930 | __builtin_log2 | ||
| 2931 | .param_str = "dd" | ||
| 2932 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2933 | |||
| 2934 | __builtin_log2f | ||
| 2935 | .param_str = "ff" | ||
| 2936 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2937 | |||
| 2938 | __builtin_log2f128 | ||
| 2939 | .param_str = "LLdLLd" | ||
| 2940 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2941 | |||
| 2942 | __builtin_log2f16 | ||
| 2943 | .param_str = "hh" | ||
| 2944 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2945 | |||
| 2946 | __builtin_log2l | ||
| 2947 | .param_str = "LdLd" | ||
| 2948 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2949 | |||
| 2950 | __builtin_logb | ||
| 2951 | .param_str = "dd" | ||
| 2952 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2953 | |||
| 2954 | __builtin_logbf | ||
| 2955 | .param_str = "ff" | ||
| 2956 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2957 | |||
| 2958 | __builtin_logbf128 | ||
| 2959 | .param_str = "LLdLLd" | ||
| 2960 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2961 | |||
| 2962 | __builtin_logbl | ||
| 2963 | .param_str = "LdLd" | ||
| 2964 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2965 | |||
| 2966 | __builtin_logf | ||
| 2967 | .param_str = "ff" | ||
| 2968 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2969 | |||
| 2970 | __builtin_logf128 | ||
| 2971 | .param_str = "LLdLLd" | ||
| 2972 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2973 | |||
| 2974 | __builtin_logf16 | ||
| 2975 | .param_str = "hh" | ||
| 2976 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2977 | |||
| 2978 | __builtin_logl | ||
| 2979 | .param_str = "LdLd" | ||
| 2980 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2981 | |||
| 2982 | __builtin_longjmp | ||
| 2983 | .param_str = "vv**i" | ||
| 2984 | .attributes = .{ .noreturn = true } | ||
| 2985 | |||
| 2986 | __builtin_lrint | ||
| 2987 | .param_str = "Lid" | ||
| 2988 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2989 | |||
| 2990 | __builtin_lrintf | ||
| 2991 | .param_str = "Lif" | ||
| 2992 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2993 | |||
| 2994 | __builtin_lrintf128 | ||
| 2995 | .param_str = "LiLLd" | ||
| 2996 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 2997 | |||
| 2998 | __builtin_lrintl | ||
| 2999 | .param_str = "LiLd" | ||
| 3000 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 3001 | |||
| 3002 | __builtin_lround | ||
| 3003 | .param_str = "Lid" | ||
| 3004 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 3005 | |||
| 3006 | __builtin_lroundf | ||
| 3007 | .param_str = "Lif" | ||
| 3008 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 3009 | |||
| 3010 | __builtin_lroundf128 | ||
| 3011 | .param_str = "LiLLd" | ||
| 3012 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 3013 | |||
| 3014 | __builtin_lroundl | ||
| 3015 | .param_str = "LiLd" | ||
| 3016 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 3017 | |||
| 3018 | __builtin_malloc | ||
| 3019 | .param_str = "v*z" | ||
| 3020 | .attributes = .{ .lib_function_with_builtin_prefix = true } | ||
| 3021 | |||
| 3022 | __builtin_matrix_column_major_load | ||
| 3023 | .param_str = "v." | ||
| 3024 | .attributes = .{ .custom_typecheck = true, .lib_function_with_builtin_prefix = true } | ||
| 3025 | |||
| 3026 | __builtin_matrix_column_major_store | ||
| 3027 | .param_str = "v." | ||
| 3028 | .attributes = .{ .custom_typecheck = true, .lib_function_with_builtin_prefix = true } | ||
| 3029 | |||
| 3030 | __builtin_matrix_transpose | ||
| 3031 | .param_str = "v." | ||
| 3032 | .attributes = .{ .custom_typecheck = true, .lib_function_with_builtin_prefix = true } | ||
| 3033 | |||
| 3034 | __builtin_memchr | ||
| 3035 | .param_str = "v*vC*iz" | ||
| 3036 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_evaluable = true } | ||
| 3037 | |||
| 3038 | __builtin_memcmp | ||
| 3039 | .param_str = "ivC*vC*z" | ||
| 3040 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_evaluable = true } | ||
| 3041 | |||
| 3042 | __builtin_memcpy | ||
| 3043 | .param_str = "v*v*vC*z" | ||
| 3044 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_evaluable = true } | ||
| 3045 | |||
| 3046 | __builtin_memcpy_inline | ||
| 3047 | .param_str = "vv*vC*Iz" | ||
| 3048 | |||
| 3049 | __builtin_memmove | ||
| 3050 | .param_str = "v*v*vC*z" | ||
| 3051 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_evaluable = true } | ||
| 3052 | |||
| 3053 | __builtin_mempcpy | ||
| 3054 | .param_str = "v*v*vC*z" | ||
| 3055 | .attributes = .{ .lib_function_with_builtin_prefix = true } | ||
| 3056 | |||
| 3057 | __builtin_memset | ||
| 3058 | .param_str = "v*v*iz" | ||
| 3059 | .attributes = .{ .lib_function_with_builtin_prefix = true } | ||
| 3060 | |||
| 3061 | __builtin_memset_inline | ||
| 3062 | .param_str = "vv*iIz" | ||
| 3063 | |||
| 3064 | __builtin_mips_absq_s_ph | ||
| 3065 | .param_str = "V2sV2s" | ||
| 3066 | .target_set = TargetSet.initOne(.mips) | ||
| 3067 | |||
| 3068 | __builtin_mips_absq_s_qb | ||
| 3069 | .param_str = "V4ScV4Sc" | ||
| 3070 | .target_set = TargetSet.initOne(.mips) | ||
| 3071 | |||
| 3072 | __builtin_mips_absq_s_w | ||
| 3073 | .param_str = "ii" | ||
| 3074 | .target_set = TargetSet.initOne(.mips) | ||
| 3075 | |||
| 3076 | __builtin_mips_addq_ph | ||
| 3077 | .param_str = "V2sV2sV2s" | ||
| 3078 | .target_set = TargetSet.initOne(.mips) | ||
| 3079 | |||
| 3080 | __builtin_mips_addq_s_ph | ||
| 3081 | .param_str = "V2sV2sV2s" | ||
| 3082 | .target_set = TargetSet.initOne(.mips) | ||
| 3083 | |||
| 3084 | __builtin_mips_addq_s_w | ||
| 3085 | .param_str = "iii" | ||
| 3086 | .target_set = TargetSet.initOne(.mips) | ||
| 3087 | |||
| 3088 | __builtin_mips_addqh_ph | ||
| 3089 | .param_str = "V2sV2sV2s" | ||
| 3090 | .target_set = TargetSet.initOne(.mips) | ||
| 3091 | .attributes = .{ .@"const" = true } | ||
| 3092 | |||
| 3093 | __builtin_mips_addqh_r_ph | ||
| 3094 | .param_str = "V2sV2sV2s" | ||
| 3095 | .target_set = TargetSet.initOne(.mips) | ||
| 3096 | .attributes = .{ .@"const" = true } | ||
| 3097 | |||
| 3098 | __builtin_mips_addqh_r_w | ||
| 3099 | .param_str = "iii" | ||
| 3100 | .target_set = TargetSet.initOne(.mips) | ||
| 3101 | .attributes = .{ .@"const" = true } | ||
| 3102 | |||
| 3103 | __builtin_mips_addqh_w | ||
| 3104 | .param_str = "iii" | ||
| 3105 | .target_set = TargetSet.initOne(.mips) | ||
| 3106 | .attributes = .{ .@"const" = true } | ||
| 3107 | |||
| 3108 | __builtin_mips_addsc | ||
| 3109 | .param_str = "iii" | ||
| 3110 | .target_set = TargetSet.initOne(.mips) | ||
| 3111 | |||
| 3112 | __builtin_mips_addu_ph | ||
| 3113 | .param_str = "V2sV2sV2s" | ||
| 3114 | .target_set = TargetSet.initOne(.mips) | ||
| 3115 | |||
| 3116 | __builtin_mips_addu_qb | ||
| 3117 | .param_str = "V4ScV4ScV4Sc" | ||
| 3118 | .target_set = TargetSet.initOne(.mips) | ||
| 3119 | |||
| 3120 | __builtin_mips_addu_s_ph | ||
| 3121 | .param_str = "V2sV2sV2s" | ||
| 3122 | .target_set = TargetSet.initOne(.mips) | ||
| 3123 | |||
| 3124 | __builtin_mips_addu_s_qb | ||
| 3125 | .param_str = "V4ScV4ScV4Sc" | ||
| 3126 | .target_set = TargetSet.initOne(.mips) | ||
| 3127 | |||
| 3128 | __builtin_mips_adduh_qb | ||
| 3129 | .param_str = "V4ScV4ScV4Sc" | ||
| 3130 | .target_set = TargetSet.initOne(.mips) | ||
| 3131 | .attributes = .{ .@"const" = true } | ||
| 3132 | |||
| 3133 | __builtin_mips_adduh_r_qb | ||
| 3134 | .param_str = "V4ScV4ScV4Sc" | ||
| 3135 | .target_set = TargetSet.initOne(.mips) | ||
| 3136 | .attributes = .{ .@"const" = true } | ||
| 3137 | |||
| 3138 | __builtin_mips_addwc | ||
| 3139 | .param_str = "iii" | ||
| 3140 | .target_set = TargetSet.initOne(.mips) | ||
| 3141 | |||
| 3142 | __builtin_mips_append | ||
| 3143 | .param_str = "iiiIi" | ||
| 3144 | .target_set = TargetSet.initOne(.mips) | ||
| 3145 | .attributes = .{ .@"const" = true } | ||
| 3146 | |||
| 3147 | __builtin_mips_balign | ||
| 3148 | .param_str = "iiiIi" | ||
| 3149 | .target_set = TargetSet.initOne(.mips) | ||
| 3150 | .attributes = .{ .@"const" = true } | ||
| 3151 | |||
| 3152 | __builtin_mips_bitrev | ||
| 3153 | .param_str = "ii" | ||
| 3154 | .target_set = TargetSet.initOne(.mips) | ||
| 3155 | .attributes = .{ .@"const" = true } | ||
| 3156 | |||
| 3157 | __builtin_mips_bposge32 | ||
| 3158 | .param_str = "i" | ||
| 3159 | .target_set = TargetSet.initOne(.mips) | ||
| 3160 | |||
| 3161 | __builtin_mips_cmp_eq_ph | ||
| 3162 | .param_str = "vV2sV2s" | ||
| 3163 | .target_set = TargetSet.initOne(.mips) | ||
| 3164 | |||
| 3165 | __builtin_mips_cmp_le_ph | ||
| 3166 | .param_str = "vV2sV2s" | ||
| 3167 | .target_set = TargetSet.initOne(.mips) | ||
| 3168 | |||
| 3169 | __builtin_mips_cmp_lt_ph | ||
| 3170 | .param_str = "vV2sV2s" | ||
| 3171 | .target_set = TargetSet.initOne(.mips) | ||
| 3172 | |||
| 3173 | __builtin_mips_cmpgdu_eq_qb | ||
| 3174 | .param_str = "iV4ScV4Sc" | ||
| 3175 | .target_set = TargetSet.initOne(.mips) | ||
| 3176 | |||
| 3177 | __builtin_mips_cmpgdu_le_qb | ||
| 3178 | .param_str = "iV4ScV4Sc" | ||
| 3179 | .target_set = TargetSet.initOne(.mips) | ||
| 3180 | |||
| 3181 | __builtin_mips_cmpgdu_lt_qb | ||
| 3182 | .param_str = "iV4ScV4Sc" | ||
| 3183 | .target_set = TargetSet.initOne(.mips) | ||
| 3184 | |||
| 3185 | __builtin_mips_cmpgu_eq_qb | ||
| 3186 | .param_str = "iV4ScV4Sc" | ||
| 3187 | .target_set = TargetSet.initOne(.mips) | ||
| 3188 | |||
| 3189 | __builtin_mips_cmpgu_le_qb | ||
| 3190 | .param_str = "iV4ScV4Sc" | ||
| 3191 | .target_set = TargetSet.initOne(.mips) | ||
| 3192 | |||
| 3193 | __builtin_mips_cmpgu_lt_qb | ||
| 3194 | .param_str = "iV4ScV4Sc" | ||
| 3195 | .target_set = TargetSet.initOne(.mips) | ||
| 3196 | |||
| 3197 | __builtin_mips_cmpu_eq_qb | ||
| 3198 | .param_str = "vV4ScV4Sc" | ||
| 3199 | .target_set = TargetSet.initOne(.mips) | ||
| 3200 | |||
| 3201 | __builtin_mips_cmpu_le_qb | ||
| 3202 | .param_str = "vV4ScV4Sc" | ||
| 3203 | .target_set = TargetSet.initOne(.mips) | ||
| 3204 | |||
| 3205 | __builtin_mips_cmpu_lt_qb | ||
| 3206 | .param_str = "vV4ScV4Sc" | ||
| 3207 | .target_set = TargetSet.initOne(.mips) | ||
| 3208 | |||
| 3209 | __builtin_mips_dpa_w_ph | ||
| 3210 | .param_str = "LLiLLiV2sV2s" | ||
| 3211 | .target_set = TargetSet.initOne(.mips) | ||
| 3212 | .attributes = .{ .@"const" = true } | ||
| 3213 | |||
| 3214 | __builtin_mips_dpaq_s_w_ph | ||
| 3215 | .param_str = "LLiLLiV2sV2s" | ||
| 3216 | .target_set = TargetSet.initOne(.mips) | ||
| 3217 | |||
| 3218 | __builtin_mips_dpaq_sa_l_w | ||
| 3219 | .param_str = "LLiLLiii" | ||
| 3220 | .target_set = TargetSet.initOne(.mips) | ||
| 3221 | |||
| 3222 | __builtin_mips_dpaqx_s_w_ph | ||
| 3223 | .param_str = "LLiLLiV2sV2s" | ||
| 3224 | .target_set = TargetSet.initOne(.mips) | ||
| 3225 | |||
| 3226 | __builtin_mips_dpaqx_sa_w_ph | ||
| 3227 | .param_str = "LLiLLiV2sV2s" | ||
| 3228 | .target_set = TargetSet.initOne(.mips) | ||
| 3229 | |||
| 3230 | __builtin_mips_dpau_h_qbl | ||
| 3231 | .param_str = "LLiLLiV4ScV4Sc" | ||
| 3232 | .target_set = TargetSet.initOne(.mips) | ||
| 3233 | .attributes = .{ .@"const" = true } | ||
| 3234 | |||
| 3235 | __builtin_mips_dpau_h_qbr | ||
| 3236 | .param_str = "LLiLLiV4ScV4Sc" | ||
| 3237 | .target_set = TargetSet.initOne(.mips) | ||
| 3238 | .attributes = .{ .@"const" = true } | ||
| 3239 | |||
| 3240 | __builtin_mips_dpax_w_ph | ||
| 3241 | .param_str = "LLiLLiV2sV2s" | ||
| 3242 | .target_set = TargetSet.initOne(.mips) | ||
| 3243 | .attributes = .{ .@"const" = true } | ||
| 3244 | |||
| 3245 | __builtin_mips_dps_w_ph | ||
| 3246 | .param_str = "LLiLLiV2sV2s" | ||
| 3247 | .target_set = TargetSet.initOne(.mips) | ||
| 3248 | .attributes = .{ .@"const" = true } | ||
| 3249 | |||
| 3250 | __builtin_mips_dpsq_s_w_ph | ||
| 3251 | .param_str = "LLiLLiV2sV2s" | ||
| 3252 | .target_set = TargetSet.initOne(.mips) | ||
| 3253 | |||
| 3254 | __builtin_mips_dpsq_sa_l_w | ||
| 3255 | .param_str = "LLiLLiii" | ||
| 3256 | .target_set = TargetSet.initOne(.mips) | ||
| 3257 | |||
| 3258 | __builtin_mips_dpsqx_s_w_ph | ||
| 3259 | .param_str = "LLiLLiV2sV2s" | ||
| 3260 | .target_set = TargetSet.initOne(.mips) | ||
| 3261 | |||
| 3262 | __builtin_mips_dpsqx_sa_w_ph | ||
| 3263 | .param_str = "LLiLLiV2sV2s" | ||
| 3264 | .target_set = TargetSet.initOne(.mips) | ||
| 3265 | |||
| 3266 | __builtin_mips_dpsu_h_qbl | ||
| 3267 | .param_str = "LLiLLiV4ScV4Sc" | ||
| 3268 | .target_set = TargetSet.initOne(.mips) | ||
| 3269 | .attributes = .{ .@"const" = true } | ||
| 3270 | |||
| 3271 | __builtin_mips_dpsu_h_qbr | ||
| 3272 | .param_str = "LLiLLiV4ScV4Sc" | ||
| 3273 | .target_set = TargetSet.initOne(.mips) | ||
| 3274 | .attributes = .{ .@"const" = true } | ||
| 3275 | |||
| 3276 | __builtin_mips_dpsx_w_ph | ||
| 3277 | .param_str = "LLiLLiV2sV2s" | ||
| 3278 | .target_set = TargetSet.initOne(.mips) | ||
| 3279 | .attributes = .{ .@"const" = true } | ||
| 3280 | |||
| 3281 | __builtin_mips_extp | ||
| 3282 | .param_str = "iLLii" | ||
| 3283 | .target_set = TargetSet.initOne(.mips) | ||
| 3284 | |||
| 3285 | __builtin_mips_extpdp | ||
| 3286 | .param_str = "iLLii" | ||
| 3287 | .target_set = TargetSet.initOne(.mips) | ||
| 3288 | |||
| 3289 | __builtin_mips_extr_r_w | ||
| 3290 | .param_str = "iLLii" | ||
| 3291 | .target_set = TargetSet.initOne(.mips) | ||
| 3292 | |||
| 3293 | __builtin_mips_extr_rs_w | ||
| 3294 | .param_str = "iLLii" | ||
| 3295 | .target_set = TargetSet.initOne(.mips) | ||
| 3296 | |||
| 3297 | __builtin_mips_extr_s_h | ||
| 3298 | .param_str = "iLLii" | ||
| 3299 | .target_set = TargetSet.initOne(.mips) | ||
| 3300 | |||
| 3301 | __builtin_mips_extr_w | ||
| 3302 | .param_str = "iLLii" | ||
| 3303 | .target_set = TargetSet.initOne(.mips) | ||
| 3304 | |||
| 3305 | __builtin_mips_insv | ||
| 3306 | .param_str = "iii" | ||
| 3307 | .target_set = TargetSet.initOne(.mips) | ||
| 3308 | |||
| 3309 | __builtin_mips_lbux | ||
| 3310 | .param_str = "iv*i" | ||
| 3311 | .target_set = TargetSet.initOne(.mips) | ||
| 3312 | |||
| 3313 | __builtin_mips_lhx | ||
| 3314 | .param_str = "iv*i" | ||
| 3315 | .target_set = TargetSet.initOne(.mips) | ||
| 3316 | |||
| 3317 | __builtin_mips_lwx | ||
| 3318 | .param_str = "iv*i" | ||
| 3319 | .target_set = TargetSet.initOne(.mips) | ||
| 3320 | |||
| 3321 | __builtin_mips_madd | ||
| 3322 | .param_str = "LLiLLiii" | ||
| 3323 | .target_set = TargetSet.initOne(.mips) | ||
| 3324 | .attributes = .{ .@"const" = true } | ||
| 3325 | |||
| 3326 | __builtin_mips_maddu | ||
| 3327 | .param_str = "LLiLLiUiUi" | ||
| 3328 | .target_set = TargetSet.initOne(.mips) | ||
| 3329 | .attributes = .{ .@"const" = true } | ||
| 3330 | |||
| 3331 | __builtin_mips_maq_s_w_phl | ||
| 3332 | .param_str = "LLiLLiV2sV2s" | ||
| 3333 | .target_set = TargetSet.initOne(.mips) | ||
| 3334 | |||
| 3335 | __builtin_mips_maq_s_w_phr | ||
| 3336 | .param_str = "LLiLLiV2sV2s" | ||
| 3337 | .target_set = TargetSet.initOne(.mips) | ||
| 3338 | |||
| 3339 | __builtin_mips_maq_sa_w_phl | ||
| 3340 | .param_str = "LLiLLiV2sV2s" | ||
| 3341 | .target_set = TargetSet.initOne(.mips) | ||
| 3342 | |||
| 3343 | __builtin_mips_maq_sa_w_phr | ||
| 3344 | .param_str = "LLiLLiV2sV2s" | ||
| 3345 | .target_set = TargetSet.initOne(.mips) | ||
| 3346 | |||
| 3347 | __builtin_mips_modsub | ||
| 3348 | .param_str = "iii" | ||
| 3349 | .target_set = TargetSet.initOne(.mips) | ||
| 3350 | .attributes = .{ .@"const" = true } | ||
| 3351 | |||
| 3352 | __builtin_mips_msub | ||
| 3353 | .param_str = "LLiLLiii" | ||
| 3354 | .target_set = TargetSet.initOne(.mips) | ||
| 3355 | .attributes = .{ .@"const" = true } | ||
| 3356 | |||
| 3357 | __builtin_mips_msubu | ||
| 3358 | .param_str = "LLiLLiUiUi" | ||
| 3359 | .target_set = TargetSet.initOne(.mips) | ||
| 3360 | .attributes = .{ .@"const" = true } | ||
| 3361 | |||
| 3362 | __builtin_mips_mthlip | ||
| 3363 | .param_str = "LLiLLii" | ||
| 3364 | .target_set = TargetSet.initOne(.mips) | ||
| 3365 | |||
| 3366 | __builtin_mips_mul_ph | ||
| 3367 | .param_str = "V2sV2sV2s" | ||
| 3368 | .target_set = TargetSet.initOne(.mips) | ||
| 3369 | |||
| 3370 | __builtin_mips_mul_s_ph | ||
| 3371 | .param_str = "V2sV2sV2s" | ||
| 3372 | .target_set = TargetSet.initOne(.mips) | ||
| 3373 | |||
| 3374 | __builtin_mips_muleq_s_w_phl | ||
| 3375 | .param_str = "iV2sV2s" | ||
| 3376 | .target_set = TargetSet.initOne(.mips) | ||
| 3377 | |||
| 3378 | __builtin_mips_muleq_s_w_phr | ||
| 3379 | .param_str = "iV2sV2s" | ||
| 3380 | .target_set = TargetSet.initOne(.mips) | ||
| 3381 | |||
| 3382 | __builtin_mips_muleu_s_ph_qbl | ||
| 3383 | .param_str = "V2sV4ScV2s" | ||
| 3384 | .target_set = TargetSet.initOne(.mips) | ||
| 3385 | |||
| 3386 | __builtin_mips_muleu_s_ph_qbr | ||
| 3387 | .param_str = "V2sV4ScV2s" | ||
| 3388 | .target_set = TargetSet.initOne(.mips) | ||
| 3389 | |||
| 3390 | __builtin_mips_mulq_rs_ph | ||
| 3391 | .param_str = "V2sV2sV2s" | ||
| 3392 | .target_set = TargetSet.initOne(.mips) | ||
| 3393 | |||
| 3394 | __builtin_mips_mulq_rs_w | ||
| 3395 | .param_str = "iii" | ||
| 3396 | .target_set = TargetSet.initOne(.mips) | ||
| 3397 | |||
| 3398 | __builtin_mips_mulq_s_ph | ||
| 3399 | .param_str = "V2sV2sV2s" | ||
| 3400 | .target_set = TargetSet.initOne(.mips) | ||
| 3401 | |||
| 3402 | __builtin_mips_mulq_s_w | ||
| 3403 | .param_str = "iii" | ||
| 3404 | .target_set = TargetSet.initOne(.mips) | ||
| 3405 | |||
| 3406 | __builtin_mips_mulsa_w_ph | ||
| 3407 | .param_str = "LLiLLiV2sV2s" | ||
| 3408 | .target_set = TargetSet.initOne(.mips) | ||
| 3409 | .attributes = .{ .@"const" = true } | ||
| 3410 | |||
| 3411 | __builtin_mips_mulsaq_s_w_ph | ||
| 3412 | .param_str = "LLiLLiV2sV2s" | ||
| 3413 | .target_set = TargetSet.initOne(.mips) | ||
| 3414 | |||
| 3415 | __builtin_mips_mult | ||
| 3416 | .param_str = "LLiii" | ||
| 3417 | .target_set = TargetSet.initOne(.mips) | ||
| 3418 | .attributes = .{ .@"const" = true } | ||
| 3419 | |||
| 3420 | __builtin_mips_multu | ||
| 3421 | .param_str = "LLiUiUi" | ||
| 3422 | .target_set = TargetSet.initOne(.mips) | ||
| 3423 | .attributes = .{ .@"const" = true } | ||
| 3424 | |||
| 3425 | __builtin_mips_packrl_ph | ||
| 3426 | .param_str = "V2sV2sV2s" | ||
| 3427 | .target_set = TargetSet.initOne(.mips) | ||
| 3428 | .attributes = .{ .@"const" = true } | ||
| 3429 | |||
| 3430 | __builtin_mips_pick_ph | ||
| 3431 | .param_str = "V2sV2sV2s" | ||
| 3432 | .target_set = TargetSet.initOne(.mips) | ||
| 3433 | |||
| 3434 | __builtin_mips_pick_qb | ||
| 3435 | .param_str = "V4ScV4ScV4Sc" | ||
| 3436 | .target_set = TargetSet.initOne(.mips) | ||
| 3437 | |||
| 3438 | __builtin_mips_preceq_w_phl | ||
| 3439 | .param_str = "iV2s" | ||
| 3440 | .target_set = TargetSet.initOne(.mips) | ||
| 3441 | .attributes = .{ .@"const" = true } | ||
| 3442 | |||
| 3443 | __builtin_mips_preceq_w_phr | ||
| 3444 | .param_str = "iV2s" | ||
| 3445 | .target_set = TargetSet.initOne(.mips) | ||
| 3446 | .attributes = .{ .@"const" = true } | ||
| 3447 | |||
| 3448 | __builtin_mips_precequ_ph_qbl | ||
| 3449 | .param_str = "V2sV4Sc" | ||
| 3450 | .target_set = TargetSet.initOne(.mips) | ||
| 3451 | .attributes = .{ .@"const" = true } | ||
| 3452 | |||
| 3453 | __builtin_mips_precequ_ph_qbla | ||
| 3454 | .param_str = "V2sV4Sc" | ||
| 3455 | .target_set = TargetSet.initOne(.mips) | ||
| 3456 | .attributes = .{ .@"const" = true } | ||
| 3457 | |||
| 3458 | __builtin_mips_precequ_ph_qbr | ||
| 3459 | .param_str = "V2sV4Sc" | ||
| 3460 | .target_set = TargetSet.initOne(.mips) | ||
| 3461 | .attributes = .{ .@"const" = true } | ||
| 3462 | |||
| 3463 | __builtin_mips_precequ_ph_qbra | ||
| 3464 | .param_str = "V2sV4Sc" | ||
| 3465 | .target_set = TargetSet.initOne(.mips) | ||
| 3466 | .attributes = .{ .@"const" = true } | ||
| 3467 | |||
| 3468 | __builtin_mips_preceu_ph_qbl | ||
| 3469 | .param_str = "V2sV4Sc" | ||
| 3470 | .target_set = TargetSet.initOne(.mips) | ||
| 3471 | .attributes = .{ .@"const" = true } | ||
| 3472 | |||
| 3473 | __builtin_mips_preceu_ph_qbla | ||
| 3474 | .param_str = "V2sV4Sc" | ||
| 3475 | .target_set = TargetSet.initOne(.mips) | ||
| 3476 | .attributes = .{ .@"const" = true } | ||
| 3477 | |||
| 3478 | __builtin_mips_preceu_ph_qbr | ||
| 3479 | .param_str = "V2sV4Sc" | ||
| 3480 | .target_set = TargetSet.initOne(.mips) | ||
| 3481 | .attributes = .{ .@"const" = true } | ||
| 3482 | |||
| 3483 | __builtin_mips_preceu_ph_qbra | ||
| 3484 | .param_str = "V2sV4Sc" | ||
| 3485 | .target_set = TargetSet.initOne(.mips) | ||
| 3486 | .attributes = .{ .@"const" = true } | ||
| 3487 | |||
| 3488 | __builtin_mips_precr_qb_ph | ||
| 3489 | .param_str = "V4ScV2sV2s" | ||
| 3490 | .target_set = TargetSet.initOne(.mips) | ||
| 3491 | |||
| 3492 | __builtin_mips_precr_sra_ph_w | ||
| 3493 | .param_str = "V2siiIi" | ||
| 3494 | .target_set = TargetSet.initOne(.mips) | ||
| 3495 | .attributes = .{ .@"const" = true } | ||
| 3496 | |||
| 3497 | __builtin_mips_precr_sra_r_ph_w | ||
| 3498 | .param_str = "V2siiIi" | ||
| 3499 | .target_set = TargetSet.initOne(.mips) | ||
| 3500 | .attributes = .{ .@"const" = true } | ||
| 3501 | |||
| 3502 | __builtin_mips_precrq_ph_w | ||
| 3503 | .param_str = "V2sii" | ||
| 3504 | .target_set = TargetSet.initOne(.mips) | ||
| 3505 | .attributes = .{ .@"const" = true } | ||
| 3506 | |||
| 3507 | __builtin_mips_precrq_qb_ph | ||
| 3508 | .param_str = "V4ScV2sV2s" | ||
| 3509 | .target_set = TargetSet.initOne(.mips) | ||
| 3510 | .attributes = .{ .@"const" = true } | ||
| 3511 | |||
| 3512 | __builtin_mips_precrq_rs_ph_w | ||
| 3513 | .param_str = "V2sii" | ||
| 3514 | .target_set = TargetSet.initOne(.mips) | ||
| 3515 | |||
| 3516 | __builtin_mips_precrqu_s_qb_ph | ||
| 3517 | .param_str = "V4ScV2sV2s" | ||
| 3518 | .target_set = TargetSet.initOne(.mips) | ||
| 3519 | |||
| 3520 | __builtin_mips_prepend | ||
| 3521 | .param_str = "iiiIi" | ||
| 3522 | .target_set = TargetSet.initOne(.mips) | ||
| 3523 | .attributes = .{ .@"const" = true } | ||
| 3524 | |||
| 3525 | __builtin_mips_raddu_w_qb | ||
| 3526 | .param_str = "iV4Sc" | ||
| 3527 | .target_set = TargetSet.initOne(.mips) | ||
| 3528 | .attributes = .{ .@"const" = true } | ||
| 3529 | |||
| 3530 | __builtin_mips_rddsp | ||
| 3531 | .param_str = "iIi" | ||
| 3532 | .target_set = TargetSet.initOne(.mips) | ||
| 3533 | |||
| 3534 | __builtin_mips_repl_ph | ||
| 3535 | .param_str = "V2si" | ||
| 3536 | .target_set = TargetSet.initOne(.mips) | ||
| 3537 | .attributes = .{ .@"const" = true } | ||
| 3538 | |||
| 3539 | __builtin_mips_repl_qb | ||
| 3540 | .param_str = "V4Sci" | ||
| 3541 | .target_set = TargetSet.initOne(.mips) | ||
| 3542 | .attributes = .{ .@"const" = true } | ||
| 3543 | |||
| 3544 | __builtin_mips_shilo | ||
| 3545 | .param_str = "LLiLLii" | ||
| 3546 | .target_set = TargetSet.initOne(.mips) | ||
| 3547 | .attributes = .{ .@"const" = true } | ||
| 3548 | |||
| 3549 | __builtin_mips_shll_ph | ||
| 3550 | .param_str = "V2sV2si" | ||
| 3551 | .target_set = TargetSet.initOne(.mips) | ||
| 3552 | |||
| 3553 | __builtin_mips_shll_qb | ||
| 3554 | .param_str = "V4ScV4Sci" | ||
| 3555 | .target_set = TargetSet.initOne(.mips) | ||
| 3556 | |||
| 3557 | __builtin_mips_shll_s_ph | ||
| 3558 | .param_str = "V2sV2si" | ||
| 3559 | .target_set = TargetSet.initOne(.mips) | ||
| 3560 | |||
| 3561 | __builtin_mips_shll_s_w | ||
| 3562 | .param_str = "iii" | ||
| 3563 | .target_set = TargetSet.initOne(.mips) | ||
| 3564 | |||
| 3565 | __builtin_mips_shra_ph | ||
| 3566 | .param_str = "V2sV2si" | ||
| 3567 | .target_set = TargetSet.initOne(.mips) | ||
| 3568 | .attributes = .{ .@"const" = true } | ||
| 3569 | |||
| 3570 | __builtin_mips_shra_qb | ||
| 3571 | .param_str = "V4ScV4Sci" | ||
| 3572 | .target_set = TargetSet.initOne(.mips) | ||
| 3573 | .attributes = .{ .@"const" = true } | ||
| 3574 | |||
| 3575 | __builtin_mips_shra_r_ph | ||
| 3576 | .param_str = "V2sV2si" | ||
| 3577 | .target_set = TargetSet.initOne(.mips) | ||
| 3578 | .attributes = .{ .@"const" = true } | ||
| 3579 | |||
| 3580 | __builtin_mips_shra_r_qb | ||
| 3581 | .param_str = "V4ScV4Sci" | ||
| 3582 | .target_set = TargetSet.initOne(.mips) | ||
| 3583 | .attributes = .{ .@"const" = true } | ||
| 3584 | |||
| 3585 | __builtin_mips_shra_r_w | ||
| 3586 | .param_str = "iii" | ||
| 3587 | .target_set = TargetSet.initOne(.mips) | ||
| 3588 | .attributes = .{ .@"const" = true } | ||
| 3589 | |||
| 3590 | __builtin_mips_shrl_ph | ||
| 3591 | .param_str = "V2sV2si" | ||
| 3592 | .target_set = TargetSet.initOne(.mips) | ||
| 3593 | .attributes = .{ .@"const" = true } | ||
| 3594 | |||
| 3595 | __builtin_mips_shrl_qb | ||
| 3596 | .param_str = "V4ScV4Sci" | ||
| 3597 | .target_set = TargetSet.initOne(.mips) | ||
| 3598 | .attributes = .{ .@"const" = true } | ||
| 3599 | |||
| 3600 | __builtin_mips_subq_ph | ||
| 3601 | .param_str = "V2sV2sV2s" | ||
| 3602 | .target_set = TargetSet.initOne(.mips) | ||
| 3603 | |||
| 3604 | __builtin_mips_subq_s_ph | ||
| 3605 | .param_str = "V2sV2sV2s" | ||
| 3606 | .target_set = TargetSet.initOne(.mips) | ||
| 3607 | |||
| 3608 | __builtin_mips_subq_s_w | ||
| 3609 | .param_str = "iii" | ||
| 3610 | .target_set = TargetSet.initOne(.mips) | ||
| 3611 | |||
| 3612 | __builtin_mips_subqh_ph | ||
| 3613 | .param_str = "V2sV2sV2s" | ||
| 3614 | .target_set = TargetSet.initOne(.mips) | ||
| 3615 | .attributes = .{ .@"const" = true } | ||
| 3616 | |||
| 3617 | __builtin_mips_subqh_r_ph | ||
| 3618 | .param_str = "V2sV2sV2s" | ||
| 3619 | .target_set = TargetSet.initOne(.mips) | ||
| 3620 | .attributes = .{ .@"const" = true } | ||
| 3621 | |||
| 3622 | __builtin_mips_subqh_r_w | ||
| 3623 | .param_str = "iii" | ||
| 3624 | .target_set = TargetSet.initOne(.mips) | ||
| 3625 | .attributes = .{ .@"const" = true } | ||
| 3626 | |||
| 3627 | __builtin_mips_subqh_w | ||
| 3628 | .param_str = "iii" | ||
| 3629 | .target_set = TargetSet.initOne(.mips) | ||
| 3630 | .attributes = .{ .@"const" = true } | ||
| 3631 | |||
| 3632 | __builtin_mips_subu_ph | ||
| 3633 | .param_str = "V2sV2sV2s" | ||
| 3634 | .target_set = TargetSet.initOne(.mips) | ||
| 3635 | |||
| 3636 | __builtin_mips_subu_qb | ||
| 3637 | .param_str = "V4ScV4ScV4Sc" | ||
| 3638 | .target_set = TargetSet.initOne(.mips) | ||
| 3639 | |||
| 3640 | __builtin_mips_subu_s_ph | ||
| 3641 | .param_str = "V2sV2sV2s" | ||
| 3642 | .target_set = TargetSet.initOne(.mips) | ||
| 3643 | |||
| 3644 | __builtin_mips_subu_s_qb | ||
| 3645 | .param_str = "V4ScV4ScV4Sc" | ||
| 3646 | .target_set = TargetSet.initOne(.mips) | ||
| 3647 | |||
| 3648 | __builtin_mips_subuh_qb | ||
| 3649 | .param_str = "V4ScV4ScV4Sc" | ||
| 3650 | .target_set = TargetSet.initOne(.mips) | ||
| 3651 | .attributes = .{ .@"const" = true } | ||
| 3652 | |||
| 3653 | __builtin_mips_subuh_r_qb | ||
| 3654 | .param_str = "V4ScV4ScV4Sc" | ||
| 3655 | .target_set = TargetSet.initOne(.mips) | ||
| 3656 | .attributes = .{ .@"const" = true } | ||
| 3657 | |||
| 3658 | __builtin_mips_wrdsp | ||
| 3659 | .param_str = "viIi" | ||
| 3660 | .target_set = TargetSet.initOne(.mips) | ||
| 3661 | |||
| 3662 | __builtin_modf | ||
| 3663 | .param_str = "ddd*" | ||
| 3664 | .attributes = .{ .lib_function_with_builtin_prefix = true } | ||
| 3665 | |||
| 3666 | __builtin_modff | ||
| 3667 | .param_str = "fff*" | ||
| 3668 | .attributes = .{ .lib_function_with_builtin_prefix = true } | ||
| 3669 | |||
| 3670 | __builtin_modff128 | ||
| 3671 | .param_str = "LLdLLdLLd*" | ||
| 3672 | .attributes = .{ .lib_function_with_builtin_prefix = true } | ||
| 3673 | |||
| 3674 | __builtin_modfl | ||
| 3675 | .param_str = "LdLdLd*" | ||
| 3676 | .attributes = .{ .lib_function_with_builtin_prefix = true } | ||
| 3677 | |||
| 3678 | __builtin_msa_add_a_b | ||
| 3679 | .param_str = "V16ScV16ScV16Sc" | ||
| 3680 | .target_set = TargetSet.initOne(.mips) | ||
| 3681 | .attributes = .{ .@"const" = true } | ||
| 3682 | |||
| 3683 | __builtin_msa_add_a_d | ||
| 3684 | .param_str = "V2SLLiV2SLLiV2SLLi" | ||
| 3685 | .target_set = TargetSet.initOne(.mips) | ||
| 3686 | .attributes = .{ .@"const" = true } | ||
| 3687 | |||
| 3688 | __builtin_msa_add_a_h | ||
| 3689 | .param_str = "V8SsV8SsV8Ss" | ||
| 3690 | .target_set = TargetSet.initOne(.mips) | ||
| 3691 | .attributes = .{ .@"const" = true } | ||
| 3692 | |||
| 3693 | __builtin_msa_add_a_w | ||
| 3694 | .param_str = "V4SiV4SiV4Si" | ||
| 3695 | .target_set = TargetSet.initOne(.mips) | ||
| 3696 | .attributes = .{ .@"const" = true } | ||
| 3697 | |||
| 3698 | __builtin_msa_adds_a_b | ||
| 3699 | .param_str = "V16ScV16ScV16Sc" | ||
| 3700 | .target_set = TargetSet.initOne(.mips) | ||
| 3701 | .attributes = .{ .@"const" = true } | ||
| 3702 | |||
| 3703 | __builtin_msa_adds_a_d | ||
| 3704 | .param_str = "V2SLLiV2SLLiV2SLLi" | ||
| 3705 | .target_set = TargetSet.initOne(.mips) | ||
| 3706 | .attributes = .{ .@"const" = true } | ||
| 3707 | |||
| 3708 | __builtin_msa_adds_a_h | ||
| 3709 | .param_str = "V8SsV8SsV8Ss" | ||
| 3710 | .target_set = TargetSet.initOne(.mips) | ||
| 3711 | .attributes = .{ .@"const" = true } | ||
| 3712 | |||
| 3713 | __builtin_msa_adds_a_w | ||
| 3714 | .param_str = "V4SiV4SiV4Si" | ||
| 3715 | .target_set = TargetSet.initOne(.mips) | ||
| 3716 | .attributes = .{ .@"const" = true } | ||
| 3717 | |||
| 3718 | __builtin_msa_adds_s_b | ||
| 3719 | .param_str = "V16ScV16ScV16Sc" | ||
| 3720 | .target_set = TargetSet.initOne(.mips) | ||
| 3721 | .attributes = .{ .@"const" = true } | ||
| 3722 | |||
| 3723 | __builtin_msa_adds_s_d | ||
| 3724 | .param_str = "V2SLLiV2SLLiV2SLLi" | ||
| 3725 | .target_set = TargetSet.initOne(.mips) | ||
| 3726 | .attributes = .{ .@"const" = true } | ||
| 3727 | |||
| 3728 | __builtin_msa_adds_s_h | ||
| 3729 | .param_str = "V8SsV8SsV8Ss" | ||
| 3730 | .target_set = TargetSet.initOne(.mips) | ||
| 3731 | .attributes = .{ .@"const" = true } | ||
| 3732 | |||
| 3733 | __builtin_msa_adds_s_w | ||
| 3734 | .param_str = "V4SiV4SiV4Si" | ||
| 3735 | .target_set = TargetSet.initOne(.mips) | ||
| 3736 | .attributes = .{ .@"const" = true } | ||
| 3737 | |||
| 3738 | __builtin_msa_adds_u_b | ||
| 3739 | .param_str = "V16UcV16UcV16Uc" | ||
| 3740 | .target_set = TargetSet.initOne(.mips) | ||
| 3741 | .attributes = .{ .@"const" = true } | ||
| 3742 | |||
| 3743 | __builtin_msa_adds_u_d | ||
| 3744 | .param_str = "V2ULLiV2ULLiV2ULLi" | ||
| 3745 | .target_set = TargetSet.initOne(.mips) | ||
| 3746 | .attributes = .{ .@"const" = true } | ||
| 3747 | |||
| 3748 | __builtin_msa_adds_u_h | ||
| 3749 | .param_str = "V8UsV8UsV8Us" | ||
| 3750 | .target_set = TargetSet.initOne(.mips) | ||
| 3751 | .attributes = .{ .@"const" = true } | ||
| 3752 | |||
| 3753 | __builtin_msa_adds_u_w | ||
| 3754 | .param_str = "V4UiV4UiV4Ui" | ||
| 3755 | .target_set = TargetSet.initOne(.mips) | ||
| 3756 | .attributes = .{ .@"const" = true } | ||
| 3757 | |||
| 3758 | __builtin_msa_addv_b | ||
| 3759 | .param_str = "V16cV16cV16c" | ||
| 3760 | .target_set = TargetSet.initOne(.mips) | ||
| 3761 | .attributes = .{ .@"const" = true } | ||
| 3762 | |||
| 3763 | __builtin_msa_addv_d | ||
| 3764 | .param_str = "V2LLiV2LLiV2LLi" | ||
| 3765 | .target_set = TargetSet.initOne(.mips) | ||
| 3766 | .attributes = .{ .@"const" = true } | ||
| 3767 | |||
| 3768 | __builtin_msa_addv_h | ||
| 3769 | .param_str = "V8sV8sV8s" | ||
| 3770 | .target_set = TargetSet.initOne(.mips) | ||
| 3771 | .attributes = .{ .@"const" = true } | ||
| 3772 | |||
| 3773 | __builtin_msa_addv_w | ||
| 3774 | .param_str = "V4iV4iV4i" | ||
| 3775 | .target_set = TargetSet.initOne(.mips) | ||
| 3776 | .attributes = .{ .@"const" = true } | ||
| 3777 | |||
| 3778 | __builtin_msa_addvi_b | ||
| 3779 | .param_str = "V16cV16cIUi" | ||
| 3780 | .target_set = TargetSet.initOne(.mips) | ||
| 3781 | .attributes = .{ .@"const" = true } | ||
| 3782 | |||
| 3783 | __builtin_msa_addvi_d | ||
| 3784 | .param_str = "V2LLiV2LLiIUi" | ||
| 3785 | .target_set = TargetSet.initOne(.mips) | ||
| 3786 | .attributes = .{ .@"const" = true } | ||
| 3787 | |||
| 3788 | __builtin_msa_addvi_h | ||
| 3789 | .param_str = "V8sV8sIUi" | ||
| 3790 | .target_set = TargetSet.initOne(.mips) | ||
| 3791 | .attributes = .{ .@"const" = true } | ||
| 3792 | |||
| 3793 | __builtin_msa_addvi_w | ||
| 3794 | .param_str = "V4iV4iIUi" | ||
| 3795 | .target_set = TargetSet.initOne(.mips) | ||
| 3796 | .attributes = .{ .@"const" = true } | ||
| 3797 | |||
| 3798 | __builtin_msa_and_v | ||
| 3799 | .param_str = "V16UcV16UcV16Uc" | ||
| 3800 | .target_set = TargetSet.initOne(.mips) | ||
| 3801 | .attributes = .{ .@"const" = true } | ||
| 3802 | |||
| 3803 | __builtin_msa_andi_b | ||
| 3804 | .param_str = "V16UcV16UcIUi" | ||
| 3805 | .target_set = TargetSet.initOne(.mips) | ||
| 3806 | .attributes = .{ .@"const" = true } | ||
| 3807 | |||
| 3808 | __builtin_msa_asub_s_b | ||
| 3809 | .param_str = "V16ScV16ScV16Sc" | ||
| 3810 | .target_set = TargetSet.initOne(.mips) | ||
| 3811 | .attributes = .{ .@"const" = true } | ||
| 3812 | |||
| 3813 | __builtin_msa_asub_s_d | ||
| 3814 | .param_str = "V2SLLiV2SLLiV2SLLi" | ||
| 3815 | .target_set = TargetSet.initOne(.mips) | ||
| 3816 | .attributes = .{ .@"const" = true } | ||
| 3817 | |||
| 3818 | __builtin_msa_asub_s_h | ||
| 3819 | .param_str = "V8SsV8SsV8Ss" | ||
| 3820 | .target_set = TargetSet.initOne(.mips) | ||
| 3821 | .attributes = .{ .@"const" = true } | ||
| 3822 | |||
| 3823 | __builtin_msa_asub_s_w | ||
| 3824 | .param_str = "V4SiV4SiV4Si" | ||
| 3825 | .target_set = TargetSet.initOne(.mips) | ||
| 3826 | .attributes = .{ .@"const" = true } | ||
| 3827 | |||
| 3828 | __builtin_msa_asub_u_b | ||
| 3829 | .param_str = "V16UcV16UcV16Uc" | ||
| 3830 | .target_set = TargetSet.initOne(.mips) | ||
| 3831 | .attributes = .{ .@"const" = true } | ||
| 3832 | |||
| 3833 | __builtin_msa_asub_u_d | ||
| 3834 | .param_str = "V2ULLiV2ULLiV2ULLi" | ||
| 3835 | .target_set = TargetSet.initOne(.mips) | ||
| 3836 | .attributes = .{ .@"const" = true } | ||
| 3837 | |||
| 3838 | __builtin_msa_asub_u_h | ||
| 3839 | .param_str = "V8UsV8UsV8Us" | ||
| 3840 | .target_set = TargetSet.initOne(.mips) | ||
| 3841 | .attributes = .{ .@"const" = true } | ||
| 3842 | |||
| 3843 | __builtin_msa_asub_u_w | ||
| 3844 | .param_str = "V4UiV4UiV4Ui" | ||
| 3845 | .target_set = TargetSet.initOne(.mips) | ||
| 3846 | .attributes = .{ .@"const" = true } | ||
| 3847 | |||
| 3848 | __builtin_msa_ave_s_b | ||
| 3849 | .param_str = "V16ScV16ScV16Sc" | ||
| 3850 | .target_set = TargetSet.initOne(.mips) | ||
| 3851 | .attributes = .{ .@"const" = true } | ||
| 3852 | |||
| 3853 | __builtin_msa_ave_s_d | ||
| 3854 | .param_str = "V2SLLiV2SLLiV2SLLi" | ||
| 3855 | .target_set = TargetSet.initOne(.mips) | ||
| 3856 | .attributes = .{ .@"const" = true } | ||
| 3857 | |||
| 3858 | __builtin_msa_ave_s_h | ||
| 3859 | .param_str = "V8SsV8SsV8Ss" | ||
| 3860 | .target_set = TargetSet.initOne(.mips) | ||
| 3861 | .attributes = .{ .@"const" = true } | ||
| 3862 | |||
| 3863 | __builtin_msa_ave_s_w | ||
| 3864 | .param_str = "V4SiV4SiV4Si" | ||
| 3865 | .target_set = TargetSet.initOne(.mips) | ||
| 3866 | .attributes = .{ .@"const" = true } | ||
| 3867 | |||
| 3868 | __builtin_msa_ave_u_b | ||
| 3869 | .param_str = "V16UcV16UcV16Uc" | ||
| 3870 | .target_set = TargetSet.initOne(.mips) | ||
| 3871 | .attributes = .{ .@"const" = true } | ||
| 3872 | |||
| 3873 | __builtin_msa_ave_u_d | ||
| 3874 | .param_str = "V2ULLiV2ULLiV2ULLi" | ||
| 3875 | .target_set = TargetSet.initOne(.mips) | ||
| 3876 | .attributes = .{ .@"const" = true } | ||
| 3877 | |||
| 3878 | __builtin_msa_ave_u_h | ||
| 3879 | .param_str = "V8UsV8UsV8Us" | ||
| 3880 | .target_set = TargetSet.initOne(.mips) | ||
| 3881 | .attributes = .{ .@"const" = true } | ||
| 3882 | |||
| 3883 | __builtin_msa_ave_u_w | ||
| 3884 | .param_str = "V4UiV4UiV4Ui" | ||
| 3885 | .target_set = TargetSet.initOne(.mips) | ||
| 3886 | .attributes = .{ .@"const" = true } | ||
| 3887 | |||
| 3888 | __builtin_msa_aver_s_b | ||
| 3889 | .param_str = "V16ScV16ScV16Sc" | ||
| 3890 | .target_set = TargetSet.initOne(.mips) | ||
| 3891 | .attributes = .{ .@"const" = true } | ||
| 3892 | |||
| 3893 | __builtin_msa_aver_s_d | ||
| 3894 | .param_str = "V2SLLiV2SLLiV2SLLi" | ||
| 3895 | .target_set = TargetSet.initOne(.mips) | ||
| 3896 | .attributes = .{ .@"const" = true } | ||
| 3897 | |||
| 3898 | __builtin_msa_aver_s_h | ||
| 3899 | .param_str = "V8SsV8SsV8Ss" | ||
| 3900 | .target_set = TargetSet.initOne(.mips) | ||
| 3901 | .attributes = .{ .@"const" = true } | ||
| 3902 | |||
| 3903 | __builtin_msa_aver_s_w | ||
| 3904 | .param_str = "V4SiV4SiV4Si" | ||
| 3905 | .target_set = TargetSet.initOne(.mips) | ||
| 3906 | .attributes = .{ .@"const" = true } | ||
| 3907 | |||
| 3908 | __builtin_msa_aver_u_b | ||
| 3909 | .param_str = "V16UcV16UcV16Uc" | ||
| 3910 | .target_set = TargetSet.initOne(.mips) | ||
| 3911 | .attributes = .{ .@"const" = true } | ||
| 3912 | |||
| 3913 | __builtin_msa_aver_u_d | ||
| 3914 | .param_str = "V2ULLiV2ULLiV2ULLi" | ||
| 3915 | .target_set = TargetSet.initOne(.mips) | ||
| 3916 | .attributes = .{ .@"const" = true } | ||
| 3917 | |||
| 3918 | __builtin_msa_aver_u_h | ||
| 3919 | .param_str = "V8UsV8UsV8Us" | ||
| 3920 | .target_set = TargetSet.initOne(.mips) | ||
| 3921 | .attributes = .{ .@"const" = true } | ||
| 3922 | |||
| 3923 | __builtin_msa_aver_u_w | ||
| 3924 | .param_str = "V4UiV4UiV4Ui" | ||
| 3925 | .target_set = TargetSet.initOne(.mips) | ||
| 3926 | .attributes = .{ .@"const" = true } | ||
| 3927 | |||
| 3928 | __builtin_msa_bclr_b | ||
| 3929 | .param_str = "V16UcV16UcV16Uc" | ||
| 3930 | .target_set = TargetSet.initOne(.mips) | ||
| 3931 | .attributes = .{ .@"const" = true } | ||
| 3932 | |||
| 3933 | __builtin_msa_bclr_d | ||
| 3934 | .param_str = "V2ULLiV2ULLiV2ULLi" | ||
| 3935 | .target_set = TargetSet.initOne(.mips) | ||
| 3936 | .attributes = .{ .@"const" = true } | ||
| 3937 | |||
| 3938 | __builtin_msa_bclr_h | ||
| 3939 | .param_str = "V8UsV8UsV8Us" | ||
| 3940 | .target_set = TargetSet.initOne(.mips) | ||
| 3941 | .attributes = .{ .@"const" = true } | ||
| 3942 | |||
| 3943 | __builtin_msa_bclr_w | ||
| 3944 | .param_str = "V4UiV4UiV4Ui" | ||
| 3945 | .target_set = TargetSet.initOne(.mips) | ||
| 3946 | .attributes = .{ .@"const" = true } | ||
| 3947 | |||
| 3948 | __builtin_msa_bclri_b | ||
| 3949 | .param_str = "V16UcV16UcIUi" | ||
| 3950 | .target_set = TargetSet.initOne(.mips) | ||
| 3951 | .attributes = .{ .@"const" = true } | ||
| 3952 | |||
| 3953 | __builtin_msa_bclri_d | ||
| 3954 | .param_str = "V2ULLiV2ULLiIUi" | ||
| 3955 | .target_set = TargetSet.initOne(.mips) | ||
| 3956 | .attributes = .{ .@"const" = true } | ||
| 3957 | |||
| 3958 | __builtin_msa_bclri_h | ||
| 3959 | .param_str = "V8UsV8UsIUi" | ||
| 3960 | .target_set = TargetSet.initOne(.mips) | ||
| 3961 | .attributes = .{ .@"const" = true } | ||
| 3962 | |||
| 3963 | __builtin_msa_bclri_w | ||
| 3964 | .param_str = "V4UiV4UiIUi" | ||
| 3965 | .target_set = TargetSet.initOne(.mips) | ||
| 3966 | .attributes = .{ .@"const" = true } | ||
| 3967 | |||
| 3968 | __builtin_msa_binsl_b | ||
| 3969 | .param_str = "V16UcV16UcV16UcV16Uc" | ||
| 3970 | .target_set = TargetSet.initOne(.mips) | ||
| 3971 | .attributes = .{ .@"const" = true } | ||
| 3972 | |||
| 3973 | __builtin_msa_binsl_d | ||
| 3974 | .param_str = "V2ULLiV2ULLiV2ULLiV2ULLi" | ||
| 3975 | .target_set = TargetSet.initOne(.mips) | ||
| 3976 | .attributes = .{ .@"const" = true } | ||
| 3977 | |||
| 3978 | __builtin_msa_binsl_h | ||
| 3979 | .param_str = "V8UsV8UsV8UsV8Us" | ||
| 3980 | .target_set = TargetSet.initOne(.mips) | ||
| 3981 | .attributes = .{ .@"const" = true } | ||
| 3982 | |||
| 3983 | __builtin_msa_binsl_w | ||
| 3984 | .param_str = "V4UiV4UiV4UiV4Ui" | ||
| 3985 | .target_set = TargetSet.initOne(.mips) | ||
| 3986 | .attributes = .{ .@"const" = true } | ||
| 3987 | |||
| 3988 | __builtin_msa_binsli_b | ||
| 3989 | .param_str = "V16UcV16UcV16UcIUi" | ||
| 3990 | .target_set = TargetSet.initOne(.mips) | ||
| 3991 | .attributes = .{ .@"const" = true } | ||
| 3992 | |||
| 3993 | __builtin_msa_binsli_d | ||
| 3994 | .param_str = "V2ULLiV2ULLiV2ULLiIUi" | ||
| 3995 | .target_set = TargetSet.initOne(.mips) | ||
| 3996 | .attributes = .{ .@"const" = true } | ||
| 3997 | |||
| 3998 | __builtin_msa_binsli_h | ||
| 3999 | .param_str = "V8UsV8UsV8UsIUi" | ||
| 4000 | .target_set = TargetSet.initOne(.mips) | ||
| 4001 | .attributes = .{ .@"const" = true } | ||
| 4002 | |||
| 4003 | __builtin_msa_binsli_w | ||
| 4004 | .param_str = "V4UiV4UiV4UiIUi" | ||
| 4005 | .target_set = TargetSet.initOne(.mips) | ||
| 4006 | .attributes = .{ .@"const" = true } | ||
| 4007 | |||
| 4008 | __builtin_msa_binsr_b | ||
| 4009 | .param_str = "V16UcV16UcV16UcV16Uc" | ||
| 4010 | .target_set = TargetSet.initOne(.mips) | ||
| 4011 | .attributes = .{ .@"const" = true } | ||
| 4012 | |||
| 4013 | __builtin_msa_binsr_d | ||
| 4014 | .param_str = "V2ULLiV2ULLiV2ULLiV2ULLi" | ||
| 4015 | .target_set = TargetSet.initOne(.mips) | ||
| 4016 | .attributes = .{ .@"const" = true } | ||
| 4017 | |||
| 4018 | __builtin_msa_binsr_h | ||
| 4019 | .param_str = "V8UsV8UsV8UsV8Us" | ||
| 4020 | .target_set = TargetSet.initOne(.mips) | ||
| 4021 | .attributes = .{ .@"const" = true } | ||
| 4022 | |||
| 4023 | __builtin_msa_binsr_w | ||
| 4024 | .param_str = "V4UiV4UiV4UiV4Ui" | ||
| 4025 | .target_set = TargetSet.initOne(.mips) | ||
| 4026 | .attributes = .{ .@"const" = true } | ||
| 4027 | |||
| 4028 | __builtin_msa_binsri_b | ||
| 4029 | .param_str = "V16UcV16UcV16UcIUi" | ||
| 4030 | .target_set = TargetSet.initOne(.mips) | ||
| 4031 | .attributes = .{ .@"const" = true } | ||
| 4032 | |||
| 4033 | __builtin_msa_binsri_d | ||
| 4034 | .param_str = "V2ULLiV2ULLiV2ULLiIUi" | ||
| 4035 | .target_set = TargetSet.initOne(.mips) | ||
| 4036 | .attributes = .{ .@"const" = true } | ||
| 4037 | |||
| 4038 | __builtin_msa_binsri_h | ||
| 4039 | .param_str = "V8UsV8UsV8UsIUi" | ||
| 4040 | .target_set = TargetSet.initOne(.mips) | ||
| 4041 | .attributes = .{ .@"const" = true } | ||
| 4042 | |||
| 4043 | __builtin_msa_binsri_w | ||
| 4044 | .param_str = "V4UiV4UiV4UiIUi" | ||
| 4045 | .target_set = TargetSet.initOne(.mips) | ||
| 4046 | .attributes = .{ .@"const" = true } | ||
| 4047 | |||
| 4048 | __builtin_msa_bmnz_v | ||
| 4049 | .param_str = "V16UcV16UcV16UcV16Uc" | ||
| 4050 | .target_set = TargetSet.initOne(.mips) | ||
| 4051 | .attributes = .{ .@"const" = true } | ||
| 4052 | |||
| 4053 | __builtin_msa_bmnzi_b | ||
| 4054 | .param_str = "V16UcV16UcV16UcIUi" | ||
| 4055 | .target_set = TargetSet.initOne(.mips) | ||
| 4056 | .attributes = .{ .@"const" = true } | ||
| 4057 | |||
| 4058 | __builtin_msa_bmz_v | ||
| 4059 | .param_str = "V16UcV16UcV16UcV16Uc" | ||
| 4060 | .target_set = TargetSet.initOne(.mips) | ||
| 4061 | .attributes = .{ .@"const" = true } | ||
| 4062 | |||
| 4063 | __builtin_msa_bmzi_b | ||
| 4064 | .param_str = "V16UcV16UcV16UcIUi" | ||
| 4065 | .target_set = TargetSet.initOne(.mips) | ||
| 4066 | .attributes = .{ .@"const" = true } | ||
| 4067 | |||
| 4068 | __builtin_msa_bneg_b | ||
| 4069 | .param_str = "V16UcV16UcV16Uc" | ||
| 4070 | .target_set = TargetSet.initOne(.mips) | ||
| 4071 | .attributes = .{ .@"const" = true } | ||
| 4072 | |||
| 4073 | __builtin_msa_bneg_d | ||
| 4074 | .param_str = "V2ULLiV2ULLiV2ULLi" | ||
| 4075 | .target_set = TargetSet.initOne(.mips) | ||
| 4076 | .attributes = .{ .@"const" = true } | ||
| 4077 | |||
| 4078 | __builtin_msa_bneg_h | ||
| 4079 | .param_str = "V8UsV8UsV8Us" | ||
| 4080 | .target_set = TargetSet.initOne(.mips) | ||
| 4081 | .attributes = .{ .@"const" = true } | ||
| 4082 | |||
| 4083 | __builtin_msa_bneg_w | ||
| 4084 | .param_str = "V4UiV4UiV4Ui" | ||
| 4085 | .target_set = TargetSet.initOne(.mips) | ||
| 4086 | .attributes = .{ .@"const" = true } | ||
| 4087 | |||
| 4088 | __builtin_msa_bnegi_b | ||
| 4089 | .param_str = "V16UcV16UcIUi" | ||
| 4090 | .target_set = TargetSet.initOne(.mips) | ||
| 4091 | .attributes = .{ .@"const" = true } | ||
| 4092 | |||
| 4093 | __builtin_msa_bnegi_d | ||
| 4094 | .param_str = "V2ULLiV2ULLiIUi" | ||
| 4095 | .target_set = TargetSet.initOne(.mips) | ||
| 4096 | .attributes = .{ .@"const" = true } | ||
| 4097 | |||
| 4098 | __builtin_msa_bnegi_h | ||
| 4099 | .param_str = "V8UsV8UsIUi" | ||
| 4100 | .target_set = TargetSet.initOne(.mips) | ||
| 4101 | .attributes = .{ .@"const" = true } | ||
| 4102 | |||
| 4103 | __builtin_msa_bnegi_w | ||
| 4104 | .param_str = "V4UiV4UiIUi" | ||
| 4105 | .target_set = TargetSet.initOne(.mips) | ||
| 4106 | .attributes = .{ .@"const" = true } | ||
| 4107 | |||
| 4108 | __builtin_msa_bnz_b | ||
| 4109 | .param_str = "iV16Uc" | ||
| 4110 | .target_set = TargetSet.initOne(.mips) | ||
| 4111 | .attributes = .{ .@"const" = true } | ||
| 4112 | |||
| 4113 | __builtin_msa_bnz_d | ||
| 4114 | .param_str = "iV2ULLi" | ||
| 4115 | .target_set = TargetSet.initOne(.mips) | ||
| 4116 | .attributes = .{ .@"const" = true } | ||
| 4117 | |||
| 4118 | __builtin_msa_bnz_h | ||
| 4119 | .param_str = "iV8Us" | ||
| 4120 | .target_set = TargetSet.initOne(.mips) | ||
| 4121 | .attributes = .{ .@"const" = true } | ||
| 4122 | |||
| 4123 | __builtin_msa_bnz_v | ||
| 4124 | .param_str = "iV16Uc" | ||
| 4125 | .target_set = TargetSet.initOne(.mips) | ||
| 4126 | .attributes = .{ .@"const" = true } | ||
| 4127 | |||
| 4128 | __builtin_msa_bnz_w | ||
| 4129 | .param_str = "iV4Ui" | ||
| 4130 | .target_set = TargetSet.initOne(.mips) | ||
| 4131 | .attributes = .{ .@"const" = true } | ||
| 4132 | |||
| 4133 | __builtin_msa_bsel_v | ||
| 4134 | .param_str = "V16UcV16UcV16UcV16Uc" | ||
| 4135 | .target_set = TargetSet.initOne(.mips) | ||
| 4136 | .attributes = .{ .@"const" = true } | ||
| 4137 | |||
| 4138 | __builtin_msa_bseli_b | ||
| 4139 | .param_str = "V16UcV16UcV16UcIUi" | ||
| 4140 | .target_set = TargetSet.initOne(.mips) | ||
| 4141 | .attributes = .{ .@"const" = true } | ||
| 4142 | |||
| 4143 | __builtin_msa_bset_b | ||
| 4144 | .param_str = "V16UcV16UcV16Uc" | ||
| 4145 | .target_set = TargetSet.initOne(.mips) | ||
| 4146 | .attributes = .{ .@"const" = true } | ||
| 4147 | |||
| 4148 | __builtin_msa_bset_d | ||
| 4149 | .param_str = "V2ULLiV2ULLiV2ULLi" | ||
| 4150 | .target_set = TargetSet.initOne(.mips) | ||
| 4151 | .attributes = .{ .@"const" = true } | ||
| 4152 | |||
| 4153 | __builtin_msa_bset_h | ||
| 4154 | .param_str = "V8UsV8UsV8Us" | ||
| 4155 | .target_set = TargetSet.initOne(.mips) | ||
| 4156 | .attributes = .{ .@"const" = true } | ||
| 4157 | |||
| 4158 | __builtin_msa_bset_w | ||
| 4159 | .param_str = "V4UiV4UiV4Ui" | ||
| 4160 | .target_set = TargetSet.initOne(.mips) | ||
| 4161 | .attributes = .{ .@"const" = true } | ||
| 4162 | |||
| 4163 | __builtin_msa_bseti_b | ||
| 4164 | .param_str = "V16UcV16UcIUi" | ||
| 4165 | .target_set = TargetSet.initOne(.mips) | ||
| 4166 | .attributes = .{ .@"const" = true } | ||
| 4167 | |||
| 4168 | __builtin_msa_bseti_d | ||
| 4169 | .param_str = "V2ULLiV2ULLiIUi" | ||
| 4170 | .target_set = TargetSet.initOne(.mips) | ||
| 4171 | .attributes = .{ .@"const" = true } | ||
| 4172 | |||
| 4173 | __builtin_msa_bseti_h | ||
| 4174 | .param_str = "V8UsV8UsIUi" | ||
| 4175 | .target_set = TargetSet.initOne(.mips) | ||
| 4176 | .attributes = .{ .@"const" = true } | ||
| 4177 | |||
| 4178 | __builtin_msa_bseti_w | ||
| 4179 | .param_str = "V4UiV4UiIUi" | ||
| 4180 | .target_set = TargetSet.initOne(.mips) | ||
| 4181 | .attributes = .{ .@"const" = true } | ||
| 4182 | |||
| 4183 | __builtin_msa_bz_b | ||
| 4184 | .param_str = "iV16Uc" | ||
| 4185 | .target_set = TargetSet.initOne(.mips) | ||
| 4186 | .attributes = .{ .@"const" = true } | ||
| 4187 | |||
| 4188 | __builtin_msa_bz_d | ||
| 4189 | .param_str = "iV2ULLi" | ||
| 4190 | .target_set = TargetSet.initOne(.mips) | ||
| 4191 | .attributes = .{ .@"const" = true } | ||
| 4192 | |||
| 4193 | __builtin_msa_bz_h | ||
| 4194 | .param_str = "iV8Us" | ||
| 4195 | .target_set = TargetSet.initOne(.mips) | ||
| 4196 | .attributes = .{ .@"const" = true } | ||
| 4197 | |||
| 4198 | __builtin_msa_bz_v | ||
| 4199 | .param_str = "iV16Uc" | ||
| 4200 | .target_set = TargetSet.initOne(.mips) | ||
| 4201 | .attributes = .{ .@"const" = true } | ||
| 4202 | |||
| 4203 | __builtin_msa_bz_w | ||
| 4204 | .param_str = "iV4Ui" | ||
| 4205 | .target_set = TargetSet.initOne(.mips) | ||
| 4206 | .attributes = .{ .@"const" = true } | ||
| 4207 | |||
| 4208 | __builtin_msa_ceq_b | ||
| 4209 | .param_str = "V16ScV16ScV16Sc" | ||
| 4210 | .target_set = TargetSet.initOne(.mips) | ||
| 4211 | .attributes = .{ .@"const" = true } | ||
| 4212 | |||
| 4213 | __builtin_msa_ceq_d | ||
| 4214 | .param_str = "V2SLLiV2SLLiV2SLLi" | ||
| 4215 | .target_set = TargetSet.initOne(.mips) | ||
| 4216 | .attributes = .{ .@"const" = true } | ||
| 4217 | |||
| 4218 | __builtin_msa_ceq_h | ||
| 4219 | .param_str = "V8SsV8SsV8Ss" | ||
| 4220 | .target_set = TargetSet.initOne(.mips) | ||
| 4221 | .attributes = .{ .@"const" = true } | ||
| 4222 | |||
| 4223 | __builtin_msa_ceq_w | ||
| 4224 | .param_str = "V4SiV4SiV4Si" | ||
| 4225 | .target_set = TargetSet.initOne(.mips) | ||
| 4226 | .attributes = .{ .@"const" = true } | ||
| 4227 | |||
| 4228 | __builtin_msa_ceqi_b | ||
| 4229 | .param_str = "V16ScV16ScISi" | ||
| 4230 | .target_set = TargetSet.initOne(.mips) | ||
| 4231 | .attributes = .{ .@"const" = true } | ||
| 4232 | |||
| 4233 | __builtin_msa_ceqi_d | ||
| 4234 | .param_str = "V2SLLiV2SLLiISi" | ||
| 4235 | .target_set = TargetSet.initOne(.mips) | ||
| 4236 | .attributes = .{ .@"const" = true } | ||
| 4237 | |||
| 4238 | __builtin_msa_ceqi_h | ||
| 4239 | .param_str = "V8SsV8SsISi" | ||
| 4240 | .target_set = TargetSet.initOne(.mips) | ||
| 4241 | .attributes = .{ .@"const" = true } | ||
| 4242 | |||
| 4243 | __builtin_msa_ceqi_w | ||
| 4244 | .param_str = "V4SiV4SiISi" | ||
| 4245 | .target_set = TargetSet.initOne(.mips) | ||
| 4246 | .attributes = .{ .@"const" = true } | ||
| 4247 | |||
| 4248 | __builtin_msa_cfcmsa | ||
| 4249 | .param_str = "iIi" | ||
| 4250 | .target_set = TargetSet.initOne(.mips) | ||
| 4251 | |||
| 4252 | __builtin_msa_cle_s_b | ||
| 4253 | .param_str = "V16ScV16ScV16Sc" | ||
| 4254 | .target_set = TargetSet.initOne(.mips) | ||
| 4255 | .attributes = .{ .@"const" = true } | ||
| 4256 | |||
| 4257 | __builtin_msa_cle_s_d | ||
| 4258 | .param_str = "V2SLLiV2SLLiV2SLLi" | ||
| 4259 | .target_set = TargetSet.initOne(.mips) | ||
| 4260 | .attributes = .{ .@"const" = true } | ||
| 4261 | |||
| 4262 | __builtin_msa_cle_s_h | ||
| 4263 | .param_str = "V8SsV8SsV8Ss" | ||
| 4264 | .target_set = TargetSet.initOne(.mips) | ||
| 4265 | .attributes = .{ .@"const" = true } | ||
| 4266 | |||
| 4267 | __builtin_msa_cle_s_w | ||
| 4268 | .param_str = "V4SiV4SiV4Si" | ||
| 4269 | .target_set = TargetSet.initOne(.mips) | ||
| 4270 | .attributes = .{ .@"const" = true } | ||
| 4271 | |||
| 4272 | __builtin_msa_cle_u_b | ||
| 4273 | .param_str = "V16ScV16UcV16Uc" | ||
| 4274 | .target_set = TargetSet.initOne(.mips) | ||
| 4275 | .attributes = .{ .@"const" = true } | ||
| 4276 | |||
| 4277 | __builtin_msa_cle_u_d | ||
| 4278 | .param_str = "V2SLLiV2ULLiV2ULLi" | ||
| 4279 | .target_set = TargetSet.initOne(.mips) | ||
| 4280 | .attributes = .{ .@"const" = true } | ||
| 4281 | |||
| 4282 | __builtin_msa_cle_u_h | ||
| 4283 | .param_str = "V8SsV8UsV8Us" | ||
| 4284 | .target_set = TargetSet.initOne(.mips) | ||
| 4285 | .attributes = .{ .@"const" = true } | ||
| 4286 | |||
| 4287 | __builtin_msa_cle_u_w | ||
| 4288 | .param_str = "V4SiV4UiV4Ui" | ||
| 4289 | .target_set = TargetSet.initOne(.mips) | ||
| 4290 | .attributes = .{ .@"const" = true } | ||
| 4291 | |||
| 4292 | __builtin_msa_clei_s_b | ||
| 4293 | .param_str = "V16ScV16ScISi" | ||
| 4294 | .target_set = TargetSet.initOne(.mips) | ||
| 4295 | .attributes = .{ .@"const" = true } | ||
| 4296 | |||
| 4297 | __builtin_msa_clei_s_d | ||
| 4298 | .param_str = "V2SLLiV2SLLiISi" | ||
| 4299 | .target_set = TargetSet.initOne(.mips) | ||
| 4300 | .attributes = .{ .@"const" = true } | ||
| 4301 | |||
| 4302 | __builtin_msa_clei_s_h | ||
| 4303 | .param_str = "V8SsV8SsISi" | ||
| 4304 | .target_set = TargetSet.initOne(.mips) | ||
| 4305 | .attributes = .{ .@"const" = true } | ||
| 4306 | |||
| 4307 | __builtin_msa_clei_s_w | ||
| 4308 | .param_str = "V4SiV4SiISi" | ||
| 4309 | .target_set = TargetSet.initOne(.mips) | ||
| 4310 | .attributes = .{ .@"const" = true } | ||
| 4311 | |||
| 4312 | __builtin_msa_clei_u_b | ||
| 4313 | .param_str = "V16ScV16UcIUi" | ||
| 4314 | .target_set = TargetSet.initOne(.mips) | ||
| 4315 | .attributes = .{ .@"const" = true } | ||
| 4316 | |||
| 4317 | __builtin_msa_clei_u_d | ||
| 4318 | .param_str = "V2SLLiV2ULLiIUi" | ||
| 4319 | .target_set = TargetSet.initOne(.mips) | ||
| 4320 | .attributes = .{ .@"const" = true } | ||
| 4321 | |||
| 4322 | __builtin_msa_clei_u_h | ||
| 4323 | .param_str = "V8SsV8UsIUi" | ||
| 4324 | .target_set = TargetSet.initOne(.mips) | ||
| 4325 | .attributes = .{ .@"const" = true } | ||
| 4326 | |||
| 4327 | __builtin_msa_clei_u_w | ||
| 4328 | .param_str = "V4SiV4UiIUi" | ||
| 4329 | .target_set = TargetSet.initOne(.mips) | ||
| 4330 | .attributes = .{ .@"const" = true } | ||
| 4331 | |||
| 4332 | __builtin_msa_clt_s_b | ||
| 4333 | .param_str = "V16ScV16ScV16Sc" | ||
| 4334 | .target_set = TargetSet.initOne(.mips) | ||
| 4335 | .attributes = .{ .@"const" = true } | ||
| 4336 | |||
| 4337 | __builtin_msa_clt_s_d | ||
| 4338 | .param_str = "V2SLLiV2SLLiV2SLLi" | ||
| 4339 | .target_set = TargetSet.initOne(.mips) | ||
| 4340 | .attributes = .{ .@"const" = true } | ||
| 4341 | |||
| 4342 | __builtin_msa_clt_s_h | ||
| 4343 | .param_str = "V8SsV8SsV8Ss" | ||
| 4344 | .target_set = TargetSet.initOne(.mips) | ||
| 4345 | .attributes = .{ .@"const" = true } | ||
| 4346 | |||
| 4347 | __builtin_msa_clt_s_w | ||
| 4348 | .param_str = "V4SiV4SiV4Si" | ||
| 4349 | .target_set = TargetSet.initOne(.mips) | ||
| 4350 | .attributes = .{ .@"const" = true } | ||
| 4351 | |||
| 4352 | __builtin_msa_clt_u_b | ||
| 4353 | .param_str = "V16ScV16UcV16Uc" | ||
| 4354 | .target_set = TargetSet.initOne(.mips) | ||
| 4355 | .attributes = .{ .@"const" = true } | ||
| 4356 | |||
| 4357 | __builtin_msa_clt_u_d | ||
| 4358 | .param_str = "V2SLLiV2ULLiV2ULLi" | ||
| 4359 | .target_set = TargetSet.initOne(.mips) | ||
| 4360 | .attributes = .{ .@"const" = true } | ||
| 4361 | |||
| 4362 | __builtin_msa_clt_u_h | ||
| 4363 | .param_str = "V8SsV8UsV8Us" | ||
| 4364 | .target_set = TargetSet.initOne(.mips) | ||
| 4365 | .attributes = .{ .@"const" = true } | ||
| 4366 | |||
| 4367 | __builtin_msa_clt_u_w | ||
| 4368 | .param_str = "V4SiV4UiV4Ui" | ||
| 4369 | .target_set = TargetSet.initOne(.mips) | ||
| 4370 | .attributes = .{ .@"const" = true } | ||
| 4371 | |||
| 4372 | __builtin_msa_clti_s_b | ||
| 4373 | .param_str = "V16ScV16ScISi" | ||
| 4374 | .target_set = TargetSet.initOne(.mips) | ||
| 4375 | .attributes = .{ .@"const" = true } | ||
| 4376 | |||
| 4377 | __builtin_msa_clti_s_d | ||
| 4378 | .param_str = "V2SLLiV2SLLiISi" | ||
| 4379 | .target_set = TargetSet.initOne(.mips) | ||
| 4380 | .attributes = .{ .@"const" = true } | ||
| 4381 | |||
| 4382 | __builtin_msa_clti_s_h | ||
| 4383 | .param_str = "V8SsV8SsISi" | ||
| 4384 | .target_set = TargetSet.initOne(.mips) | ||
| 4385 | .attributes = .{ .@"const" = true } | ||
| 4386 | |||
| 4387 | __builtin_msa_clti_s_w | ||
| 4388 | .param_str = "V4SiV4SiISi" | ||
| 4389 | .target_set = TargetSet.initOne(.mips) | ||
| 4390 | .attributes = .{ .@"const" = true } | ||
| 4391 | |||
| 4392 | __builtin_msa_clti_u_b | ||
| 4393 | .param_str = "V16ScV16UcIUi" | ||
| 4394 | .target_set = TargetSet.initOne(.mips) | ||
| 4395 | .attributes = .{ .@"const" = true } | ||
| 4396 | |||
| 4397 | __builtin_msa_clti_u_d | ||
| 4398 | .param_str = "V2SLLiV2ULLiIUi" | ||
| 4399 | .target_set = TargetSet.initOne(.mips) | ||
| 4400 | .attributes = .{ .@"const" = true } | ||
| 4401 | |||
| 4402 | __builtin_msa_clti_u_h | ||
| 4403 | .param_str = "V8SsV8UsIUi" | ||
| 4404 | .target_set = TargetSet.initOne(.mips) | ||
| 4405 | .attributes = .{ .@"const" = true } | ||
| 4406 | |||
| 4407 | __builtin_msa_clti_u_w | ||
| 4408 | .param_str = "V4SiV4UiIUi" | ||
| 4409 | .target_set = TargetSet.initOne(.mips) | ||
| 4410 | .attributes = .{ .@"const" = true } | ||
| 4411 | |||
| 4412 | __builtin_msa_copy_s_b | ||
| 4413 | .param_str = "iV16ScIUi" | ||
| 4414 | .target_set = TargetSet.initOne(.mips) | ||
| 4415 | .attributes = .{ .@"const" = true } | ||
| 4416 | |||
| 4417 | __builtin_msa_copy_s_d | ||
| 4418 | .param_str = "LLiV2SLLiIUi" | ||
| 4419 | .target_set = TargetSet.initOne(.mips) | ||
| 4420 | .attributes = .{ .@"const" = true } | ||
| 4421 | |||
| 4422 | __builtin_msa_copy_s_h | ||
| 4423 | .param_str = "iV8SsIUi" | ||
| 4424 | .target_set = TargetSet.initOne(.mips) | ||
| 4425 | .attributes = .{ .@"const" = true } | ||
| 4426 | |||
| 4427 | __builtin_msa_copy_s_w | ||
| 4428 | .param_str = "iV4SiIUi" | ||
| 4429 | .target_set = TargetSet.initOne(.mips) | ||
| 4430 | .attributes = .{ .@"const" = true } | ||
| 4431 | |||
| 4432 | __builtin_msa_copy_u_b | ||
| 4433 | .param_str = "iV16UcIUi" | ||
| 4434 | .target_set = TargetSet.initOne(.mips) | ||
| 4435 | .attributes = .{ .@"const" = true } | ||
| 4436 | |||
| 4437 | __builtin_msa_copy_u_d | ||
| 4438 | .param_str = "LLiV2ULLiIUi" | ||
| 4439 | .target_set = TargetSet.initOne(.mips) | ||
| 4440 | .attributes = .{ .@"const" = true } | ||
| 4441 | |||
| 4442 | __builtin_msa_copy_u_h | ||
| 4443 | .param_str = "iV8UsIUi" | ||
| 4444 | .target_set = TargetSet.initOne(.mips) | ||
| 4445 | .attributes = .{ .@"const" = true } | ||
| 4446 | |||
| 4447 | __builtin_msa_copy_u_w | ||
| 4448 | .param_str = "iV4UiIUi" | ||
| 4449 | .target_set = TargetSet.initOne(.mips) | ||
| 4450 | .attributes = .{ .@"const" = true } | ||
| 4451 | |||
| 4452 | __builtin_msa_ctcmsa | ||
| 4453 | .param_str = "vIii" | ||
| 4454 | .target_set = TargetSet.initOne(.mips) | ||
| 4455 | |||
| 4456 | __builtin_msa_div_s_b | ||
| 4457 | .param_str = "V16ScV16ScV16Sc" | ||
| 4458 | .target_set = TargetSet.initOne(.mips) | ||
| 4459 | .attributes = .{ .@"const" = true } | ||
| 4460 | |||
| 4461 | __builtin_msa_div_s_d | ||
| 4462 | .param_str = "V2SLLiV2SLLiV2SLLi" | ||
| 4463 | .target_set = TargetSet.initOne(.mips) | ||
| 4464 | .attributes = .{ .@"const" = true } | ||
| 4465 | |||
| 4466 | __builtin_msa_div_s_h | ||
| 4467 | .param_str = "V8SsV8SsV8Ss" | ||
| 4468 | .target_set = TargetSet.initOne(.mips) | ||
| 4469 | .attributes = .{ .@"const" = true } | ||
| 4470 | |||
| 4471 | __builtin_msa_div_s_w | ||
| 4472 | .param_str = "V4SiV4SiV4Si" | ||
| 4473 | .target_set = TargetSet.initOne(.mips) | ||
| 4474 | .attributes = .{ .@"const" = true } | ||
| 4475 | |||
| 4476 | __builtin_msa_div_u_b | ||
| 4477 | .param_str = "V16UcV16UcV16Uc" | ||
| 4478 | .target_set = TargetSet.initOne(.mips) | ||
| 4479 | .attributes = .{ .@"const" = true } | ||
| 4480 | |||
| 4481 | __builtin_msa_div_u_d | ||
| 4482 | .param_str = "V2ULLiV2ULLiV2ULLi" | ||
| 4483 | .target_set = TargetSet.initOne(.mips) | ||
| 4484 | .attributes = .{ .@"const" = true } | ||
| 4485 | |||
| 4486 | __builtin_msa_div_u_h | ||
| 4487 | .param_str = "V8UsV8UsV8Us" | ||
| 4488 | .target_set = TargetSet.initOne(.mips) | ||
| 4489 | .attributes = .{ .@"const" = true } | ||
| 4490 | |||
| 4491 | __builtin_msa_div_u_w | ||
| 4492 | .param_str = "V4UiV4UiV4Ui" | ||
| 4493 | .target_set = TargetSet.initOne(.mips) | ||
| 4494 | .attributes = .{ .@"const" = true } | ||
| 4495 | |||
| 4496 | __builtin_msa_dotp_s_d | ||
| 4497 | .param_str = "V2SLLiV4SiV4Si" | ||
| 4498 | .target_set = TargetSet.initOne(.mips) | ||
| 4499 | .attributes = .{ .@"const" = true } | ||
| 4500 | |||
| 4501 | __builtin_msa_dotp_s_h | ||
| 4502 | .param_str = "V8SsV16ScV16Sc" | ||
| 4503 | .target_set = TargetSet.initOne(.mips) | ||
| 4504 | .attributes = .{ .@"const" = true } | ||
| 4505 | |||
| 4506 | __builtin_msa_dotp_s_w | ||
| 4507 | .param_str = "V4SiV8SsV8Ss" | ||
| 4508 | .target_set = TargetSet.initOne(.mips) | ||
| 4509 | .attributes = .{ .@"const" = true } | ||
| 4510 | |||
| 4511 | __builtin_msa_dotp_u_d | ||
| 4512 | .param_str = "V2ULLiV4UiV4Ui" | ||
| 4513 | .target_set = TargetSet.initOne(.mips) | ||
| 4514 | .attributes = .{ .@"const" = true } | ||
| 4515 | |||
| 4516 | __builtin_msa_dotp_u_h | ||
| 4517 | .param_str = "V8UsV16UcV16Uc" | ||
| 4518 | .target_set = TargetSet.initOne(.mips) | ||
| 4519 | .attributes = .{ .@"const" = true } | ||
| 4520 | |||
| 4521 | __builtin_msa_dotp_u_w | ||
| 4522 | .param_str = "V4UiV8UsV8Us" | ||
| 4523 | .target_set = TargetSet.initOne(.mips) | ||
| 4524 | .attributes = .{ .@"const" = true } | ||
| 4525 | |||
| 4526 | __builtin_msa_dpadd_s_d | ||
| 4527 | .param_str = "V2SLLiV2SLLiV4SiV4Si" | ||
| 4528 | .target_set = TargetSet.initOne(.mips) | ||
| 4529 | .attributes = .{ .@"const" = true } | ||
| 4530 | |||
| 4531 | __builtin_msa_dpadd_s_h | ||
| 4532 | .param_str = "V8SsV8SsV16ScV16Sc" | ||
| 4533 | .target_set = TargetSet.initOne(.mips) | ||
| 4534 | .attributes = .{ .@"const" = true } | ||
| 4535 | |||
| 4536 | __builtin_msa_dpadd_s_w | ||
| 4537 | .param_str = "V4SiV4SiV8SsV8Ss" | ||
| 4538 | .target_set = TargetSet.initOne(.mips) | ||
| 4539 | .attributes = .{ .@"const" = true } | ||
| 4540 | |||
| 4541 | __builtin_msa_dpadd_u_d | ||
| 4542 | .param_str = "V2ULLiV2ULLiV4UiV4Ui" | ||
| 4543 | .target_set = TargetSet.initOne(.mips) | ||
| 4544 | .attributes = .{ .@"const" = true } | ||
| 4545 | |||
| 4546 | __builtin_msa_dpadd_u_h | ||
| 4547 | .param_str = "V8UsV8UsV16UcV16Uc" | ||
| 4548 | .target_set = TargetSet.initOne(.mips) | ||
| 4549 | .attributes = .{ .@"const" = true } | ||
| 4550 | |||
| 4551 | __builtin_msa_dpadd_u_w | ||
| 4552 | .param_str = "V4UiV4UiV8UsV8Us" | ||
| 4553 | .target_set = TargetSet.initOne(.mips) | ||
| 4554 | .attributes = .{ .@"const" = true } | ||
| 4555 | |||
| 4556 | __builtin_msa_dpsub_s_d | ||
| 4557 | .param_str = "V2SLLiV2SLLiV4SiV4Si" | ||
| 4558 | .target_set = TargetSet.initOne(.mips) | ||
| 4559 | .attributes = .{ .@"const" = true } | ||
| 4560 | |||
| 4561 | __builtin_msa_dpsub_s_h | ||
| 4562 | .param_str = "V8SsV8SsV16ScV16Sc" | ||
| 4563 | .target_set = TargetSet.initOne(.mips) | ||
| 4564 | .attributes = .{ .@"const" = true } | ||
| 4565 | |||
| 4566 | __builtin_msa_dpsub_s_w | ||
| 4567 | .param_str = "V4SiV4SiV8SsV8Ss" | ||
| 4568 | .target_set = TargetSet.initOne(.mips) | ||
| 4569 | .attributes = .{ .@"const" = true } | ||
| 4570 | |||
| 4571 | __builtin_msa_dpsub_u_d | ||
| 4572 | .param_str = "V2ULLiV2ULLiV4UiV4Ui" | ||
| 4573 | .target_set = TargetSet.initOne(.mips) | ||
| 4574 | .attributes = .{ .@"const" = true } | ||
| 4575 | |||
| 4576 | __builtin_msa_dpsub_u_h | ||
| 4577 | .param_str = "V8UsV8UsV16UcV16Uc" | ||
| 4578 | .target_set = TargetSet.initOne(.mips) | ||
| 4579 | .attributes = .{ .@"const" = true } | ||
| 4580 | |||
| 4581 | __builtin_msa_dpsub_u_w | ||
| 4582 | .param_str = "V4UiV4UiV8UsV8Us" | ||
| 4583 | .target_set = TargetSet.initOne(.mips) | ||
| 4584 | .attributes = .{ .@"const" = true } | ||
| 4585 | |||
| 4586 | __builtin_msa_fadd_d | ||
| 4587 | .param_str = "V2dV2dV2d" | ||
| 4588 | .target_set = TargetSet.initOne(.mips) | ||
| 4589 | .attributes = .{ .@"const" = true } | ||
| 4590 | |||
| 4591 | __builtin_msa_fadd_w | ||
| 4592 | .param_str = "V4fV4fV4f" | ||
| 4593 | .target_set = TargetSet.initOne(.mips) | ||
| 4594 | .attributes = .{ .@"const" = true } | ||
| 4595 | |||
| 4596 | __builtin_msa_fcaf_d | ||
| 4597 | .param_str = "V2LLiV2dV2d" | ||
| 4598 | .target_set = TargetSet.initOne(.mips) | ||
| 4599 | .attributes = .{ .@"const" = true } | ||
| 4600 | |||
| 4601 | __builtin_msa_fcaf_w | ||
| 4602 | .param_str = "V4iV4fV4f" | ||
| 4603 | .target_set = TargetSet.initOne(.mips) | ||
| 4604 | .attributes = .{ .@"const" = true } | ||
| 4605 | |||
| 4606 | __builtin_msa_fceq_d | ||
| 4607 | .param_str = "V2LLiV2dV2d" | ||
| 4608 | .target_set = TargetSet.initOne(.mips) | ||
| 4609 | .attributes = .{ .@"const" = true } | ||
| 4610 | |||
| 4611 | __builtin_msa_fceq_w | ||
| 4612 | .param_str = "V4iV4fV4f" | ||
| 4613 | .target_set = TargetSet.initOne(.mips) | ||
| 4614 | .attributes = .{ .@"const" = true } | ||
| 4615 | |||
| 4616 | __builtin_msa_fclass_d | ||
| 4617 | .param_str = "V2LLiV2d" | ||
| 4618 | .target_set = TargetSet.initOne(.mips) | ||
| 4619 | .attributes = .{ .@"const" = true } | ||
| 4620 | |||
| 4621 | __builtin_msa_fclass_w | ||
| 4622 | .param_str = "V4iV4f" | ||
| 4623 | .target_set = TargetSet.initOne(.mips) | ||
| 4624 | .attributes = .{ .@"const" = true } | ||
| 4625 | |||
| 4626 | __builtin_msa_fcle_d | ||
| 4627 | .param_str = "V2LLiV2dV2d" | ||
| 4628 | .target_set = TargetSet.initOne(.mips) | ||
| 4629 | .attributes = .{ .@"const" = true } | ||
| 4630 | |||
| 4631 | __builtin_msa_fcle_w | ||
| 4632 | .param_str = "V4iV4fV4f" | ||
| 4633 | .target_set = TargetSet.initOne(.mips) | ||
| 4634 | .attributes = .{ .@"const" = true } | ||
| 4635 | |||
| 4636 | __builtin_msa_fclt_d | ||
| 4637 | .param_str = "V2LLiV2dV2d" | ||
| 4638 | .target_set = TargetSet.initOne(.mips) | ||
| 4639 | .attributes = .{ .@"const" = true } | ||
| 4640 | |||
| 4641 | __builtin_msa_fclt_w | ||
| 4642 | .param_str = "V4iV4fV4f" | ||
| 4643 | .target_set = TargetSet.initOne(.mips) | ||
| 4644 | .attributes = .{ .@"const" = true } | ||
| 4645 | |||
| 4646 | __builtin_msa_fcne_d | ||
| 4647 | .param_str = "V2LLiV2dV2d" | ||
| 4648 | .target_set = TargetSet.initOne(.mips) | ||
| 4649 | .attributes = .{ .@"const" = true } | ||
| 4650 | |||
| 4651 | __builtin_msa_fcne_w | ||
| 4652 | .param_str = "V4iV4fV4f" | ||
| 4653 | .target_set = TargetSet.initOne(.mips) | ||
| 4654 | .attributes = .{ .@"const" = true } | ||
| 4655 | |||
| 4656 | __builtin_msa_fcor_d | ||
| 4657 | .param_str = "V2LLiV2dV2d" | ||
| 4658 | .target_set = TargetSet.initOne(.mips) | ||
| 4659 | .attributes = .{ .@"const" = true } | ||
| 4660 | |||
| 4661 | __builtin_msa_fcor_w | ||
| 4662 | .param_str = "V4iV4fV4f" | ||
| 4663 | .target_set = TargetSet.initOne(.mips) | ||
| 4664 | .attributes = .{ .@"const" = true } | ||
| 4665 | |||
| 4666 | __builtin_msa_fcueq_d | ||
| 4667 | .param_str = "V2LLiV2dV2d" | ||
| 4668 | .target_set = TargetSet.initOne(.mips) | ||
| 4669 | .attributes = .{ .@"const" = true } | ||
| 4670 | |||
| 4671 | __builtin_msa_fcueq_w | ||
| 4672 | .param_str = "V4iV4fV4f" | ||
| 4673 | .target_set = TargetSet.initOne(.mips) | ||
| 4674 | .attributes = .{ .@"const" = true } | ||
| 4675 | |||
| 4676 | __builtin_msa_fcule_d | ||
| 4677 | .param_str = "V2LLiV2dV2d" | ||
| 4678 | .target_set = TargetSet.initOne(.mips) | ||
| 4679 | .attributes = .{ .@"const" = true } | ||
| 4680 | |||
| 4681 | __builtin_msa_fcule_w | ||
| 4682 | .param_str = "V4iV4fV4f" | ||
| 4683 | .target_set = TargetSet.initOne(.mips) | ||
| 4684 | .attributes = .{ .@"const" = true } | ||
| 4685 | |||
| 4686 | __builtin_msa_fcult_d | ||
| 4687 | .param_str = "V2LLiV2dV2d" | ||
| 4688 | .target_set = TargetSet.initOne(.mips) | ||
| 4689 | .attributes = .{ .@"const" = true } | ||
| 4690 | |||
| 4691 | __builtin_msa_fcult_w | ||
| 4692 | .param_str = "V4iV4fV4f" | ||
| 4693 | .target_set = TargetSet.initOne(.mips) | ||
| 4694 | .attributes = .{ .@"const" = true } | ||
| 4695 | |||
| 4696 | __builtin_msa_fcun_d | ||
| 4697 | .param_str = "V2LLiV2dV2d" | ||
| 4698 | .target_set = TargetSet.initOne(.mips) | ||
| 4699 | .attributes = .{ .@"const" = true } | ||
| 4700 | |||
| 4701 | __builtin_msa_fcun_w | ||
| 4702 | .param_str = "V4iV4fV4f" | ||
| 4703 | .target_set = TargetSet.initOne(.mips) | ||
| 4704 | .attributes = .{ .@"const" = true } | ||
| 4705 | |||
| 4706 | __builtin_msa_fcune_d | ||
| 4707 | .param_str = "V2LLiV2dV2d" | ||
| 4708 | .target_set = TargetSet.initOne(.mips) | ||
| 4709 | .attributes = .{ .@"const" = true } | ||
| 4710 | |||
| 4711 | __builtin_msa_fcune_w | ||
| 4712 | .param_str = "V4iV4fV4f" | ||
| 4713 | .target_set = TargetSet.initOne(.mips) | ||
| 4714 | .attributes = .{ .@"const" = true } | ||
| 4715 | |||
| 4716 | __builtin_msa_fdiv_d | ||
| 4717 | .param_str = "V2dV2dV2d" | ||
| 4718 | .target_set = TargetSet.initOne(.mips) | ||
| 4719 | .attributes = .{ .@"const" = true } | ||
| 4720 | |||
| 4721 | __builtin_msa_fdiv_w | ||
| 4722 | .param_str = "V4fV4fV4f" | ||
| 4723 | .target_set = TargetSet.initOne(.mips) | ||
| 4724 | .attributes = .{ .@"const" = true } | ||
| 4725 | |||
| 4726 | __builtin_msa_fexdo_h | ||
| 4727 | .param_str = "V8hV4fV4f" | ||
| 4728 | .target_set = TargetSet.initOne(.mips) | ||
| 4729 | .attributes = .{ .@"const" = true } | ||
| 4730 | |||
| 4731 | __builtin_msa_fexdo_w | ||
| 4732 | .param_str = "V4fV2dV2d" | ||
| 4733 | .target_set = TargetSet.initOne(.mips) | ||
| 4734 | .attributes = .{ .@"const" = true } | ||
| 4735 | |||
| 4736 | __builtin_msa_fexp2_d | ||
| 4737 | .param_str = "V2dV2dV2LLi" | ||
| 4738 | .target_set = TargetSet.initOne(.mips) | ||
| 4739 | .attributes = .{ .@"const" = true } | ||
| 4740 | |||
| 4741 | __builtin_msa_fexp2_w | ||
| 4742 | .param_str = "V4fV4fV4i" | ||
| 4743 | .target_set = TargetSet.initOne(.mips) | ||
| 4744 | .attributes = .{ .@"const" = true } | ||
| 4745 | |||
| 4746 | __builtin_msa_fexupl_d | ||
| 4747 | .param_str = "V2dV4f" | ||
| 4748 | .target_set = TargetSet.initOne(.mips) | ||
| 4749 | .attributes = .{ .@"const" = true } | ||
| 4750 | |||
| 4751 | __builtin_msa_fexupl_w | ||
| 4752 | .param_str = "V4fV8h" | ||
| 4753 | .target_set = TargetSet.initOne(.mips) | ||
| 4754 | .attributes = .{ .@"const" = true } | ||
| 4755 | |||
| 4756 | __builtin_msa_fexupr_d | ||
| 4757 | .param_str = "V2dV4f" | ||
| 4758 | .target_set = TargetSet.initOne(.mips) | ||
| 4759 | .attributes = .{ .@"const" = true } | ||
| 4760 | |||
| 4761 | __builtin_msa_fexupr_w | ||
| 4762 | .param_str = "V4fV8h" | ||
| 4763 | .target_set = TargetSet.initOne(.mips) | ||
| 4764 | .attributes = .{ .@"const" = true } | ||
| 4765 | |||
| 4766 | __builtin_msa_ffint_s_d | ||
| 4767 | .param_str = "V2dV2SLLi" | ||
| 4768 | .target_set = TargetSet.initOne(.mips) | ||
| 4769 | .attributes = .{ .@"const" = true } | ||
| 4770 | |||
| 4771 | __builtin_msa_ffint_s_w | ||
| 4772 | .param_str = "V4fV4Si" | ||
| 4773 | .target_set = TargetSet.initOne(.mips) | ||
| 4774 | .attributes = .{ .@"const" = true } | ||
| 4775 | |||
| 4776 | __builtin_msa_ffint_u_d | ||
| 4777 | .param_str = "V2dV2ULLi" | ||
| 4778 | .target_set = TargetSet.initOne(.mips) | ||
| 4779 | .attributes = .{ .@"const" = true } | ||
| 4780 | |||
| 4781 | __builtin_msa_ffint_u_w | ||
| 4782 | .param_str = "V4fV4Ui" | ||
| 4783 | .target_set = TargetSet.initOne(.mips) | ||
| 4784 | .attributes = .{ .@"const" = true } | ||
| 4785 | |||
| 4786 | __builtin_msa_ffql_d | ||
| 4787 | .param_str = "V2dV4Si" | ||
| 4788 | .target_set = TargetSet.initOne(.mips) | ||
| 4789 | .attributes = .{ .@"const" = true } | ||
| 4790 | |||
| 4791 | __builtin_msa_ffql_w | ||
| 4792 | .param_str = "V4fV8Ss" | ||
| 4793 | .target_set = TargetSet.initOne(.mips) | ||
| 4794 | .attributes = .{ .@"const" = true } | ||
| 4795 | |||
| 4796 | __builtin_msa_ffqr_d | ||
| 4797 | .param_str = "V2dV4Si" | ||
| 4798 | .target_set = TargetSet.initOne(.mips) | ||
| 4799 | .attributes = .{ .@"const" = true } | ||
| 4800 | |||
| 4801 | __builtin_msa_ffqr_w | ||
| 4802 | .param_str = "V4fV8Ss" | ||
| 4803 | .target_set = TargetSet.initOne(.mips) | ||
| 4804 | .attributes = .{ .@"const" = true } | ||
| 4805 | |||
| 4806 | __builtin_msa_fill_b | ||
| 4807 | .param_str = "V16Sci" | ||
| 4808 | .target_set = TargetSet.initOne(.mips) | ||
| 4809 | .attributes = .{ .@"const" = true } | ||
| 4810 | |||
| 4811 | __builtin_msa_fill_d | ||
| 4812 | .param_str = "V2SLLiLLi" | ||
| 4813 | .target_set = TargetSet.initOne(.mips) | ||
| 4814 | .attributes = .{ .@"const" = true } | ||
| 4815 | |||
| 4816 | __builtin_msa_fill_h | ||
| 4817 | .param_str = "V8Ssi" | ||
| 4818 | .target_set = TargetSet.initOne(.mips) | ||
| 4819 | .attributes = .{ .@"const" = true } | ||
| 4820 | |||
| 4821 | __builtin_msa_fill_w | ||
| 4822 | .param_str = "V4Sii" | ||
| 4823 | .target_set = TargetSet.initOne(.mips) | ||
| 4824 | .attributes = .{ .@"const" = true } | ||
| 4825 | |||
| 4826 | __builtin_msa_flog2_d | ||
| 4827 | .param_str = "V2dV2d" | ||
| 4828 | .target_set = TargetSet.initOne(.mips) | ||
| 4829 | .attributes = .{ .@"const" = true } | ||
| 4830 | |||
| 4831 | __builtin_msa_flog2_w | ||
| 4832 | .param_str = "V4fV4f" | ||
| 4833 | .target_set = TargetSet.initOne(.mips) | ||
| 4834 | .attributes = .{ .@"const" = true } | ||
| 4835 | |||
| 4836 | __builtin_msa_fmadd_d | ||
| 4837 | .param_str = "V2dV2dV2dV2d" | ||
| 4838 | .target_set = TargetSet.initOne(.mips) | ||
| 4839 | .attributes = .{ .@"const" = true } | ||
| 4840 | |||
| 4841 | __builtin_msa_fmadd_w | ||
| 4842 | .param_str = "V4fV4fV4fV4f" | ||
| 4843 | .target_set = TargetSet.initOne(.mips) | ||
| 4844 | .attributes = .{ .@"const" = true } | ||
| 4845 | |||
| 4846 | __builtin_msa_fmax_a_d | ||
| 4847 | .param_str = "V2dV2dV2d" | ||
| 4848 | .target_set = TargetSet.initOne(.mips) | ||
| 4849 | .attributes = .{ .@"const" = true } | ||
| 4850 | |||
| 4851 | __builtin_msa_fmax_a_w | ||
| 4852 | .param_str = "V4fV4fV4f" | ||
| 4853 | .target_set = TargetSet.initOne(.mips) | ||
| 4854 | .attributes = .{ .@"const" = true } | ||
| 4855 | |||
| 4856 | __builtin_msa_fmax_d | ||
| 4857 | .param_str = "V2dV2dV2d" | ||
| 4858 | .target_set = TargetSet.initOne(.mips) | ||
| 4859 | .attributes = .{ .@"const" = true } | ||
| 4860 | |||
| 4861 | __builtin_msa_fmax_w | ||
| 4862 | .param_str = "V4fV4fV4f" | ||
| 4863 | .target_set = TargetSet.initOne(.mips) | ||
| 4864 | .attributes = .{ .@"const" = true } | ||
| 4865 | |||
| 4866 | __builtin_msa_fmin_a_d | ||
| 4867 | .param_str = "V2dV2dV2d" | ||
| 4868 | .target_set = TargetSet.initOne(.mips) | ||
| 4869 | .attributes = .{ .@"const" = true } | ||
| 4870 | |||
| 4871 | __builtin_msa_fmin_a_w | ||
| 4872 | .param_str = "V4fV4fV4f" | ||
| 4873 | .target_set = TargetSet.initOne(.mips) | ||
| 4874 | .attributes = .{ .@"const" = true } | ||
| 4875 | |||
| 4876 | __builtin_msa_fmin_d | ||
| 4877 | .param_str = "V2dV2dV2d" | ||
| 4878 | .target_set = TargetSet.initOne(.mips) | ||
| 4879 | .attributes = .{ .@"const" = true } | ||
| 4880 | |||
| 4881 | __builtin_msa_fmin_w | ||
| 4882 | .param_str = "V4fV4fV4f" | ||
| 4883 | .target_set = TargetSet.initOne(.mips) | ||
| 4884 | .attributes = .{ .@"const" = true } | ||
| 4885 | |||
| 4886 | __builtin_msa_fmsub_d | ||
| 4887 | .param_str = "V2dV2dV2dV2d" | ||
| 4888 | .target_set = TargetSet.initOne(.mips) | ||
| 4889 | .attributes = .{ .@"const" = true } | ||
| 4890 | |||
| 4891 | __builtin_msa_fmsub_w | ||
| 4892 | .param_str = "V4fV4fV4fV4f" | ||
| 4893 | .target_set = TargetSet.initOne(.mips) | ||
| 4894 | .attributes = .{ .@"const" = true } | ||
| 4895 | |||
| 4896 | __builtin_msa_fmul_d | ||
| 4897 | .param_str = "V2dV2dV2d" | ||
| 4898 | .target_set = TargetSet.initOne(.mips) | ||
| 4899 | .attributes = .{ .@"const" = true } | ||
| 4900 | |||
| 4901 | __builtin_msa_fmul_w | ||
| 4902 | .param_str = "V4fV4fV4f" | ||
| 4903 | .target_set = TargetSet.initOne(.mips) | ||
| 4904 | .attributes = .{ .@"const" = true } | ||
| 4905 | |||
| 4906 | __builtin_msa_frcp_d | ||
| 4907 | .param_str = "V2dV2d" | ||
| 4908 | .target_set = TargetSet.initOne(.mips) | ||
| 4909 | .attributes = .{ .@"const" = true } | ||
| 4910 | |||
| 4911 | __builtin_msa_frcp_w | ||
| 4912 | .param_str = "V4fV4f" | ||
| 4913 | .target_set = TargetSet.initOne(.mips) | ||
| 4914 | .attributes = .{ .@"const" = true } | ||
| 4915 | |||
| 4916 | __builtin_msa_frint_d | ||
| 4917 | .param_str = "V2dV2d" | ||
| 4918 | .target_set = TargetSet.initOne(.mips) | ||
| 4919 | .attributes = .{ .@"const" = true } | ||
| 4920 | |||
| 4921 | __builtin_msa_frint_w | ||
| 4922 | .param_str = "V4fV4f" | ||
| 4923 | .target_set = TargetSet.initOne(.mips) | ||
| 4924 | .attributes = .{ .@"const" = true } | ||
| 4925 | |||
| 4926 | __builtin_msa_frsqrt_d | ||
| 4927 | .param_str = "V2dV2d" | ||
| 4928 | .target_set = TargetSet.initOne(.mips) | ||
| 4929 | .attributes = .{ .@"const" = true } | ||
| 4930 | |||
| 4931 | __builtin_msa_frsqrt_w | ||
| 4932 | .param_str = "V4fV4f" | ||
| 4933 | .target_set = TargetSet.initOne(.mips) | ||
| 4934 | .attributes = .{ .@"const" = true } | ||
| 4935 | |||
| 4936 | __builtin_msa_fsaf_d | ||
| 4937 | .param_str = "V2LLiV2dV2d" | ||
| 4938 | .target_set = TargetSet.initOne(.mips) | ||
| 4939 | .attributes = .{ .@"const" = true } | ||
| 4940 | |||
| 4941 | __builtin_msa_fsaf_w | ||
| 4942 | .param_str = "V4iV4fV4f" | ||
| 4943 | .target_set = TargetSet.initOne(.mips) | ||
| 4944 | .attributes = .{ .@"const" = true } | ||
| 4945 | |||
| 4946 | __builtin_msa_fseq_d | ||
| 4947 | .param_str = "V2LLiV2dV2d" | ||
| 4948 | .target_set = TargetSet.initOne(.mips) | ||
| 4949 | .attributes = .{ .@"const" = true } | ||
| 4950 | |||
| 4951 | __builtin_msa_fseq_w | ||
| 4952 | .param_str = "V4iV4fV4f" | ||
| 4953 | .target_set = TargetSet.initOne(.mips) | ||
| 4954 | .attributes = .{ .@"const" = true } | ||
| 4955 | |||
| 4956 | __builtin_msa_fsle_d | ||
| 4957 | .param_str = "V2LLiV2dV2d" | ||
| 4958 | .target_set = TargetSet.initOne(.mips) | ||
| 4959 | .attributes = .{ .@"const" = true } | ||
| 4960 | |||
| 4961 | __builtin_msa_fsle_w | ||
| 4962 | .param_str = "V4iV4fV4f" | ||
| 4963 | .target_set = TargetSet.initOne(.mips) | ||
| 4964 | .attributes = .{ .@"const" = true } | ||
| 4965 | |||
| 4966 | __builtin_msa_fslt_d | ||
| 4967 | .param_str = "V2LLiV2dV2d" | ||
| 4968 | .target_set = TargetSet.initOne(.mips) | ||
| 4969 | .attributes = .{ .@"const" = true } | ||
| 4970 | |||
| 4971 | __builtin_msa_fslt_w | ||
| 4972 | .param_str = "V4iV4fV4f" | ||
| 4973 | .target_set = TargetSet.initOne(.mips) | ||
| 4974 | .attributes = .{ .@"const" = true } | ||
| 4975 | |||
| 4976 | __builtin_msa_fsne_d | ||
| 4977 | .param_str = "V2LLiV2dV2d" | ||
| 4978 | .target_set = TargetSet.initOne(.mips) | ||
| 4979 | .attributes = .{ .@"const" = true } | ||
| 4980 | |||
| 4981 | __builtin_msa_fsne_w | ||
| 4982 | .param_str = "V4iV4fV4f" | ||
| 4983 | .target_set = TargetSet.initOne(.mips) | ||
| 4984 | .attributes = .{ .@"const" = true } | ||
| 4985 | |||
| 4986 | __builtin_msa_fsor_d | ||
| 4987 | .param_str = "V2LLiV2dV2d" | ||
| 4988 | .target_set = TargetSet.initOne(.mips) | ||
| 4989 | .attributes = .{ .@"const" = true } | ||
| 4990 | |||
| 4991 | __builtin_msa_fsor_w | ||
| 4992 | .param_str = "V4iV4fV4f" | ||
| 4993 | .target_set = TargetSet.initOne(.mips) | ||
| 4994 | .attributes = .{ .@"const" = true } | ||
| 4995 | |||
| 4996 | __builtin_msa_fsqrt_d | ||
| 4997 | .param_str = "V2dV2d" | ||
| 4998 | .target_set = TargetSet.initOne(.mips) | ||
| 4999 | .attributes = .{ .@"const" = true } | ||
| 5000 | |||
| 5001 | __builtin_msa_fsqrt_w | ||
| 5002 | .param_str = "V4fV4f" | ||
| 5003 | .target_set = TargetSet.initOne(.mips) | ||
| 5004 | .attributes = .{ .@"const" = true } | ||
| 5005 | |||
| 5006 | __builtin_msa_fsub_d | ||
| 5007 | .param_str = "V2dV2dV2d" | ||
| 5008 | .target_set = TargetSet.initOne(.mips) | ||
| 5009 | .attributes = .{ .@"const" = true } | ||
| 5010 | |||
| 5011 | __builtin_msa_fsub_w | ||
| 5012 | .param_str = "V4fV4fV4f" | ||
| 5013 | .target_set = TargetSet.initOne(.mips) | ||
| 5014 | .attributes = .{ .@"const" = true } | ||
| 5015 | |||
| 5016 | __builtin_msa_fsueq_d | ||
| 5017 | .param_str = "V2LLiV2dV2d" | ||
| 5018 | .target_set = TargetSet.initOne(.mips) | ||
| 5019 | .attributes = .{ .@"const" = true } | ||
| 5020 | |||
| 5021 | __builtin_msa_fsueq_w | ||
| 5022 | .param_str = "V4iV4fV4f" | ||
| 5023 | .target_set = TargetSet.initOne(.mips) | ||
| 5024 | .attributes = .{ .@"const" = true } | ||
| 5025 | |||
| 5026 | __builtin_msa_fsule_d | ||
| 5027 | .param_str = "V2LLiV2dV2d" | ||
| 5028 | .target_set = TargetSet.initOne(.mips) | ||
| 5029 | .attributes = .{ .@"const" = true } | ||
| 5030 | |||
| 5031 | __builtin_msa_fsule_w | ||
| 5032 | .param_str = "V4iV4fV4f" | ||
| 5033 | .target_set = TargetSet.initOne(.mips) | ||
| 5034 | .attributes = .{ .@"const" = true } | ||
| 5035 | |||
| 5036 | __builtin_msa_fsult_d | ||
| 5037 | .param_str = "V2LLiV2dV2d" | ||
| 5038 | .target_set = TargetSet.initOne(.mips) | ||
| 5039 | .attributes = .{ .@"const" = true } | ||
| 5040 | |||
| 5041 | __builtin_msa_fsult_w | ||
| 5042 | .param_str = "V4iV4fV4f" | ||
| 5043 | .target_set = TargetSet.initOne(.mips) | ||
| 5044 | .attributes = .{ .@"const" = true } | ||
| 5045 | |||
| 5046 | __builtin_msa_fsun_d | ||
| 5047 | .param_str = "V2LLiV2dV2d" | ||
| 5048 | .target_set = TargetSet.initOne(.mips) | ||
| 5049 | .attributes = .{ .@"const" = true } | ||
| 5050 | |||
| 5051 | __builtin_msa_fsun_w | ||
| 5052 | .param_str = "V4iV4fV4f" | ||
| 5053 | .target_set = TargetSet.initOne(.mips) | ||
| 5054 | .attributes = .{ .@"const" = true } | ||
| 5055 | |||
| 5056 | __builtin_msa_fsune_d | ||
| 5057 | .param_str = "V2LLiV2dV2d" | ||
| 5058 | .target_set = TargetSet.initOne(.mips) | ||
| 5059 | .attributes = .{ .@"const" = true } | ||
| 5060 | |||
| 5061 | __builtin_msa_fsune_w | ||
| 5062 | .param_str = "V4iV4fV4f" | ||
| 5063 | .target_set = TargetSet.initOne(.mips) | ||
| 5064 | .attributes = .{ .@"const" = true } | ||
| 5065 | |||
| 5066 | __builtin_msa_ftint_s_d | ||
| 5067 | .param_str = "V2SLLiV2d" | ||
| 5068 | .target_set = TargetSet.initOne(.mips) | ||
| 5069 | .attributes = .{ .@"const" = true } | ||
| 5070 | |||
| 5071 | __builtin_msa_ftint_s_w | ||
| 5072 | .param_str = "V4SiV4f" | ||
| 5073 | .target_set = TargetSet.initOne(.mips) | ||
| 5074 | .attributes = .{ .@"const" = true } | ||
| 5075 | |||
| 5076 | __builtin_msa_ftint_u_d | ||
| 5077 | .param_str = "V2ULLiV2d" | ||
| 5078 | .target_set = TargetSet.initOne(.mips) | ||
| 5079 | .attributes = .{ .@"const" = true } | ||
| 5080 | |||
| 5081 | __builtin_msa_ftint_u_w | ||
| 5082 | .param_str = "V4UiV4f" | ||
| 5083 | .target_set = TargetSet.initOne(.mips) | ||
| 5084 | .attributes = .{ .@"const" = true } | ||
| 5085 | |||
| 5086 | __builtin_msa_ftq_h | ||
| 5087 | .param_str = "V4UiV4fV4f" | ||
| 5088 | .target_set = TargetSet.initOne(.mips) | ||
| 5089 | .attributes = .{ .@"const" = true } | ||
| 5090 | |||
| 5091 | __builtin_msa_ftq_w | ||
| 5092 | .param_str = "V2ULLiV2dV2d" | ||
| 5093 | .target_set = TargetSet.initOne(.mips) | ||
| 5094 | .attributes = .{ .@"const" = true } | ||
| 5095 | |||
| 5096 | __builtin_msa_ftrunc_s_d | ||
| 5097 | .param_str = "V2SLLiV2d" | ||
| 5098 | .target_set = TargetSet.initOne(.mips) | ||
| 5099 | .attributes = .{ .@"const" = true } | ||
| 5100 | |||
| 5101 | __builtin_msa_ftrunc_s_w | ||
| 5102 | .param_str = "V4SiV4f" | ||
| 5103 | .target_set = TargetSet.initOne(.mips) | ||
| 5104 | .attributes = .{ .@"const" = true } | ||
| 5105 | |||
| 5106 | __builtin_msa_ftrunc_u_d | ||
| 5107 | .param_str = "V2ULLiV2d" | ||
| 5108 | .target_set = TargetSet.initOne(.mips) | ||
| 5109 | .attributes = .{ .@"const" = true } | ||
| 5110 | |||
| 5111 | __builtin_msa_ftrunc_u_w | ||
| 5112 | .param_str = "V4UiV4f" | ||
| 5113 | .target_set = TargetSet.initOne(.mips) | ||
| 5114 | .attributes = .{ .@"const" = true } | ||
| 5115 | |||
| 5116 | __builtin_msa_hadd_s_d | ||
| 5117 | .param_str = "V2SLLiV4SiV4Si" | ||
| 5118 | .target_set = TargetSet.initOne(.mips) | ||
| 5119 | .attributes = .{ .@"const" = true } | ||
| 5120 | |||
| 5121 | __builtin_msa_hadd_s_h | ||
| 5122 | .param_str = "V8SsV16ScV16Sc" | ||
| 5123 | .target_set = TargetSet.initOne(.mips) | ||
| 5124 | .attributes = .{ .@"const" = true } | ||
| 5125 | |||
| 5126 | __builtin_msa_hadd_s_w | ||
| 5127 | .param_str = "V4SiV8SsV8Ss" | ||
| 5128 | .target_set = TargetSet.initOne(.mips) | ||
| 5129 | .attributes = .{ .@"const" = true } | ||
| 5130 | |||
| 5131 | __builtin_msa_hadd_u_d | ||
| 5132 | .param_str = "V2ULLiV4UiV4Ui" | ||
| 5133 | .target_set = TargetSet.initOne(.mips) | ||
| 5134 | .attributes = .{ .@"const" = true } | ||
| 5135 | |||
| 5136 | __builtin_msa_hadd_u_h | ||
| 5137 | .param_str = "V8UsV16UcV16Uc" | ||
| 5138 | .target_set = TargetSet.initOne(.mips) | ||
| 5139 | .attributes = .{ .@"const" = true } | ||
| 5140 | |||
| 5141 | __builtin_msa_hadd_u_w | ||
| 5142 | .param_str = "V4UiV8UsV8Us" | ||
| 5143 | .target_set = TargetSet.initOne(.mips) | ||
| 5144 | .attributes = .{ .@"const" = true } | ||
| 5145 | |||
| 5146 | __builtin_msa_hsub_s_d | ||
| 5147 | .param_str = "V2SLLiV4SiV4Si" | ||
| 5148 | .target_set = TargetSet.initOne(.mips) | ||
| 5149 | .attributes = .{ .@"const" = true } | ||
| 5150 | |||
| 5151 | __builtin_msa_hsub_s_h | ||
| 5152 | .param_str = "V8SsV16ScV16Sc" | ||
| 5153 | .target_set = TargetSet.initOne(.mips) | ||
| 5154 | .attributes = .{ .@"const" = true } | ||
| 5155 | |||
| 5156 | __builtin_msa_hsub_s_w | ||
| 5157 | .param_str = "V4SiV8SsV8Ss" | ||
| 5158 | .target_set = TargetSet.initOne(.mips) | ||
| 5159 | .attributes = .{ .@"const" = true } | ||
| 5160 | |||
| 5161 | __builtin_msa_hsub_u_d | ||
| 5162 | .param_str = "V2ULLiV4UiV4Ui" | ||
| 5163 | .target_set = TargetSet.initOne(.mips) | ||
| 5164 | .attributes = .{ .@"const" = true } | ||
| 5165 | |||
| 5166 | __builtin_msa_hsub_u_h | ||
| 5167 | .param_str = "V8UsV16UcV16Uc" | ||
| 5168 | .target_set = TargetSet.initOne(.mips) | ||
| 5169 | .attributes = .{ .@"const" = true } | ||
| 5170 | |||
| 5171 | __builtin_msa_hsub_u_w | ||
| 5172 | .param_str = "V4UiV8UsV8Us" | ||
| 5173 | .target_set = TargetSet.initOne(.mips) | ||
| 5174 | .attributes = .{ .@"const" = true } | ||
| 5175 | |||
| 5176 | __builtin_msa_ilvev_b | ||
| 5177 | .param_str = "V16cV16cV16c" | ||
| 5178 | .target_set = TargetSet.initOne(.mips) | ||
| 5179 | .attributes = .{ .@"const" = true } | ||
| 5180 | |||
| 5181 | __builtin_msa_ilvev_d | ||
| 5182 | .param_str = "V2LLiV2LLiV2LLi" | ||
| 5183 | .target_set = TargetSet.initOne(.mips) | ||
| 5184 | .attributes = .{ .@"const" = true } | ||
| 5185 | |||
| 5186 | __builtin_msa_ilvev_h | ||
| 5187 | .param_str = "V8sV8sV8s" | ||
| 5188 | .target_set = TargetSet.initOne(.mips) | ||
| 5189 | .attributes = .{ .@"const" = true } | ||
| 5190 | |||
| 5191 | __builtin_msa_ilvev_w | ||
| 5192 | .param_str = "V4iV4iV4i" | ||
| 5193 | .target_set = TargetSet.initOne(.mips) | ||
| 5194 | .attributes = .{ .@"const" = true } | ||
| 5195 | |||
| 5196 | __builtin_msa_ilvl_b | ||
| 5197 | .param_str = "V16cV16cV16c" | ||
| 5198 | .target_set = TargetSet.initOne(.mips) | ||
| 5199 | .attributes = .{ .@"const" = true } | ||
| 5200 | |||
| 5201 | __builtin_msa_ilvl_d | ||
| 5202 | .param_str = "V2LLiV2LLiV2LLi" | ||
| 5203 | .target_set = TargetSet.initOne(.mips) | ||
| 5204 | .attributes = .{ .@"const" = true } | ||
| 5205 | |||
| 5206 | __builtin_msa_ilvl_h | ||
| 5207 | .param_str = "V8sV8sV8s" | ||
| 5208 | .target_set = TargetSet.initOne(.mips) | ||
| 5209 | .attributes = .{ .@"const" = true } | ||
| 5210 | |||
| 5211 | __builtin_msa_ilvl_w | ||
| 5212 | .param_str = "V4iV4iV4i" | ||
| 5213 | .target_set = TargetSet.initOne(.mips) | ||
| 5214 | .attributes = .{ .@"const" = true } | ||
| 5215 | |||
| 5216 | __builtin_msa_ilvod_b | ||
| 5217 | .param_str = "V16cV16cV16c" | ||
| 5218 | .target_set = TargetSet.initOne(.mips) | ||
| 5219 | .attributes = .{ .@"const" = true } | ||
| 5220 | |||
| 5221 | __builtin_msa_ilvod_d | ||
| 5222 | .param_str = "V2LLiV2LLiV2LLi" | ||
| 5223 | .target_set = TargetSet.initOne(.mips) | ||
| 5224 | .attributes = .{ .@"const" = true } | ||
| 5225 | |||
| 5226 | __builtin_msa_ilvod_h | ||
| 5227 | .param_str = "V8sV8sV8s" | ||
| 5228 | .target_set = TargetSet.initOne(.mips) | ||
| 5229 | .attributes = .{ .@"const" = true } | ||
| 5230 | |||
| 5231 | __builtin_msa_ilvod_w | ||
| 5232 | .param_str = "V4iV4iV4i" | ||
| 5233 | .target_set = TargetSet.initOne(.mips) | ||
| 5234 | .attributes = .{ .@"const" = true } | ||
| 5235 | |||
| 5236 | __builtin_msa_ilvr_b | ||
| 5237 | .param_str = "V16cV16cV16c" | ||
| 5238 | .target_set = TargetSet.initOne(.mips) | ||
| 5239 | .attributes = .{ .@"const" = true } | ||
| 5240 | |||
| 5241 | __builtin_msa_ilvr_d | ||
| 5242 | .param_str = "V2LLiV2LLiV2LLi" | ||
| 5243 | .target_set = TargetSet.initOne(.mips) | ||
| 5244 | .attributes = .{ .@"const" = true } | ||
| 5245 | |||
| 5246 | __builtin_msa_ilvr_h | ||
| 5247 | .param_str = "V8sV8sV8s" | ||
| 5248 | .target_set = TargetSet.initOne(.mips) | ||
| 5249 | .attributes = .{ .@"const" = true } | ||
| 5250 | |||
| 5251 | __builtin_msa_ilvr_w | ||
| 5252 | .param_str = "V4iV4iV4i" | ||
| 5253 | .target_set = TargetSet.initOne(.mips) | ||
| 5254 | .attributes = .{ .@"const" = true } | ||
| 5255 | |||
| 5256 | __builtin_msa_insert_b | ||
| 5257 | .param_str = "V16ScV16ScIUii" | ||
| 5258 | .target_set = TargetSet.initOne(.mips) | ||
| 5259 | .attributes = .{ .@"const" = true } | ||
| 5260 | |||
| 5261 | __builtin_msa_insert_d | ||
| 5262 | .param_str = "V2SLLiV2SLLiIUiLLi" | ||
| 5263 | .target_set = TargetSet.initOne(.mips) | ||
| 5264 | .attributes = .{ .@"const" = true } | ||
| 5265 | |||
| 5266 | __builtin_msa_insert_h | ||
| 5267 | .param_str = "V8SsV8SsIUii" | ||
| 5268 | .target_set = TargetSet.initOne(.mips) | ||
| 5269 | .attributes = .{ .@"const" = true } | ||
| 5270 | |||
| 5271 | __builtin_msa_insert_w | ||
| 5272 | .param_str = "V4SiV4SiIUii" | ||
| 5273 | .target_set = TargetSet.initOne(.mips) | ||
| 5274 | .attributes = .{ .@"const" = true } | ||
| 5275 | |||
| 5276 | __builtin_msa_insve_b | ||
| 5277 | .param_str = "V16ScV16ScIUiV16Sc" | ||
| 5278 | .target_set = TargetSet.initOne(.mips) | ||
| 5279 | .attributes = .{ .@"const" = true } | ||
| 5280 | |||
| 5281 | __builtin_msa_insve_d | ||
| 5282 | .param_str = "V2SLLiV2SLLiIUiV2SLLi" | ||
| 5283 | .target_set = TargetSet.initOne(.mips) | ||
| 5284 | .attributes = .{ .@"const" = true } | ||
| 5285 | |||
| 5286 | __builtin_msa_insve_h | ||
| 5287 | .param_str = "V8SsV8SsIUiV8Ss" | ||
| 5288 | .target_set = TargetSet.initOne(.mips) | ||
| 5289 | .attributes = .{ .@"const" = true } | ||
| 5290 | |||
| 5291 | __builtin_msa_insve_w | ||
| 5292 | .param_str = "V4SiV4SiIUiV4Si" | ||
| 5293 | .target_set = TargetSet.initOne(.mips) | ||
| 5294 | .attributes = .{ .@"const" = true } | ||
| 5295 | |||
| 5296 | __builtin_msa_ld_b | ||
| 5297 | .param_str = "V16Scv*Ii" | ||
| 5298 | .target_set = TargetSet.initOne(.mips) | ||
| 5299 | .attributes = .{ .@"const" = true } | ||
| 5300 | |||
| 5301 | __builtin_msa_ld_d | ||
| 5302 | .param_str = "V2SLLiv*Ii" | ||
| 5303 | .target_set = TargetSet.initOne(.mips) | ||
| 5304 | .attributes = .{ .@"const" = true } | ||
| 5305 | |||
| 5306 | __builtin_msa_ld_h | ||
| 5307 | .param_str = "V8Ssv*Ii" | ||
| 5308 | .target_set = TargetSet.initOne(.mips) | ||
| 5309 | .attributes = .{ .@"const" = true } | ||
| 5310 | |||
| 5311 | __builtin_msa_ld_w | ||
| 5312 | .param_str = "V4Siv*Ii" | ||
| 5313 | .target_set = TargetSet.initOne(.mips) | ||
| 5314 | .attributes = .{ .@"const" = true } | ||
| 5315 | |||
| 5316 | __builtin_msa_ldi_b | ||
| 5317 | .param_str = "V16cIi" | ||
| 5318 | .target_set = TargetSet.initOne(.mips) | ||
| 5319 | .attributes = .{ .@"const" = true } | ||
| 5320 | |||
| 5321 | __builtin_msa_ldi_d | ||
| 5322 | .param_str = "V2LLiIi" | ||
| 5323 | .target_set = TargetSet.initOne(.mips) | ||
| 5324 | .attributes = .{ .@"const" = true } | ||
| 5325 | |||
| 5326 | __builtin_msa_ldi_h | ||
| 5327 | .param_str = "V8sIi" | ||
| 5328 | .target_set = TargetSet.initOne(.mips) | ||
| 5329 | .attributes = .{ .@"const" = true } | ||
| 5330 | |||
| 5331 | __builtin_msa_ldi_w | ||
| 5332 | .param_str = "V4iIi" | ||
| 5333 | .target_set = TargetSet.initOne(.mips) | ||
| 5334 | .attributes = .{ .@"const" = true } | ||
| 5335 | |||
| 5336 | __builtin_msa_ldr_d | ||
| 5337 | .param_str = "V2SLLiv*Ii" | ||
| 5338 | .target_set = TargetSet.initOne(.mips) | ||
| 5339 | .attributes = .{ .@"const" = true } | ||
| 5340 | |||
| 5341 | __builtin_msa_ldr_w | ||
| 5342 | .param_str = "V4Siv*Ii" | ||
| 5343 | .target_set = TargetSet.initOne(.mips) | ||
| 5344 | .attributes = .{ .@"const" = true } | ||
| 5345 | |||
| 5346 | __builtin_msa_madd_q_h | ||
| 5347 | .param_str = "V8SsV8SsV8SsV8Ss" | ||
| 5348 | .target_set = TargetSet.initOne(.mips) | ||
| 5349 | .attributes = .{ .@"const" = true } | ||
| 5350 | |||
| 5351 | __builtin_msa_madd_q_w | ||
| 5352 | .param_str = "V4SiV4SiV4SiV4Si" | ||
| 5353 | .target_set = TargetSet.initOne(.mips) | ||
| 5354 | .attributes = .{ .@"const" = true } | ||
| 5355 | |||
| 5356 | __builtin_msa_maddr_q_h | ||
| 5357 | .param_str = "V8SsV8SsV8SsV8Ss" | ||
| 5358 | .target_set = TargetSet.initOne(.mips) | ||
| 5359 | .attributes = .{ .@"const" = true } | ||
| 5360 | |||
| 5361 | __builtin_msa_maddr_q_w | ||
| 5362 | .param_str = "V4SiV4SiV4SiV4Si" | ||
| 5363 | .target_set = TargetSet.initOne(.mips) | ||
| 5364 | .attributes = .{ .@"const" = true } | ||
| 5365 | |||
| 5366 | __builtin_msa_maddv_b | ||
| 5367 | .param_str = "V16ScV16ScV16ScV16Sc" | ||
| 5368 | .target_set = TargetSet.initOne(.mips) | ||
| 5369 | .attributes = .{ .@"const" = true } | ||
| 5370 | |||
| 5371 | __builtin_msa_maddv_d | ||
| 5372 | .param_str = "V2SLLiV2SLLiV2SLLiV2SLLi" | ||
| 5373 | .target_set = TargetSet.initOne(.mips) | ||
| 5374 | .attributes = .{ .@"const" = true } | ||
| 5375 | |||
| 5376 | __builtin_msa_maddv_h | ||
| 5377 | .param_str = "V8SsV8SsV8SsV8Ss" | ||
| 5378 | .target_set = TargetSet.initOne(.mips) | ||
| 5379 | .attributes = .{ .@"const" = true } | ||
| 5380 | |||
| 5381 | __builtin_msa_maddv_w | ||
| 5382 | .param_str = "V4SiV4SiV4SiV4Si" | ||
| 5383 | .target_set = TargetSet.initOne(.mips) | ||
| 5384 | .attributes = .{ .@"const" = true } | ||
| 5385 | |||
| 5386 | __builtin_msa_max_a_b | ||
| 5387 | .param_str = "V16ScV16ScV16Sc" | ||
| 5388 | .target_set = TargetSet.initOne(.mips) | ||
| 5389 | .attributes = .{ .@"const" = true } | ||
| 5390 | |||
| 5391 | __builtin_msa_max_a_d | ||
| 5392 | .param_str = "V2SLLiV2SLLiV2SLLi" | ||
| 5393 | .target_set = TargetSet.initOne(.mips) | ||
| 5394 | .attributes = .{ .@"const" = true } | ||
| 5395 | |||
| 5396 | __builtin_msa_max_a_h | ||
| 5397 | .param_str = "V8SsV8SsV8Ss" | ||
| 5398 | .target_set = TargetSet.initOne(.mips) | ||
| 5399 | .attributes = .{ .@"const" = true } | ||
| 5400 | |||
| 5401 | __builtin_msa_max_a_w | ||
| 5402 | .param_str = "V4SiV4SiV4Si" | ||
| 5403 | .target_set = TargetSet.initOne(.mips) | ||
| 5404 | .attributes = .{ .@"const" = true } | ||
| 5405 | |||
| 5406 | __builtin_msa_max_s_b | ||
| 5407 | .param_str = "V16ScV16ScV16Sc" | ||
| 5408 | .target_set = TargetSet.initOne(.mips) | ||
| 5409 | .attributes = .{ .@"const" = true } | ||
| 5410 | |||
| 5411 | __builtin_msa_max_s_d | ||
| 5412 | .param_str = "V2SLLiV2SLLiV2SLLi" | ||
| 5413 | .target_set = TargetSet.initOne(.mips) | ||
| 5414 | .attributes = .{ .@"const" = true } | ||
| 5415 | |||
| 5416 | __builtin_msa_max_s_h | ||
| 5417 | .param_str = "V8SsV8SsV8Ss" | ||
| 5418 | .target_set = TargetSet.initOne(.mips) | ||
| 5419 | .attributes = .{ .@"const" = true } | ||
| 5420 | |||
| 5421 | __builtin_msa_max_s_w | ||
| 5422 | .param_str = "V4SiV4SiV4Si" | ||
| 5423 | .target_set = TargetSet.initOne(.mips) | ||
| 5424 | .attributes = .{ .@"const" = true } | ||
| 5425 | |||
| 5426 | __builtin_msa_max_u_b | ||
| 5427 | .param_str = "V16UcV16UcV16Uc" | ||
| 5428 | .target_set = TargetSet.initOne(.mips) | ||
| 5429 | .attributes = .{ .@"const" = true } | ||
| 5430 | |||
| 5431 | __builtin_msa_max_u_d | ||
| 5432 | .param_str = "V2ULLiV2ULLiV2ULLi" | ||
| 5433 | .target_set = TargetSet.initOne(.mips) | ||
| 5434 | .attributes = .{ .@"const" = true } | ||
| 5435 | |||
| 5436 | __builtin_msa_max_u_h | ||
| 5437 | .param_str = "V8UsV8UsV8Us" | ||
| 5438 | .target_set = TargetSet.initOne(.mips) | ||
| 5439 | .attributes = .{ .@"const" = true } | ||
| 5440 | |||
| 5441 | __builtin_msa_max_u_w | ||
| 5442 | .param_str = "V4UiV4UiV4Ui" | ||
| 5443 | .target_set = TargetSet.initOne(.mips) | ||
| 5444 | .attributes = .{ .@"const" = true } | ||
| 5445 | |||
| 5446 | __builtin_msa_maxi_s_b | ||
| 5447 | .param_str = "V16ScV16ScIi" | ||
| 5448 | .target_set = TargetSet.initOne(.mips) | ||
| 5449 | .attributes = .{ .@"const" = true } | ||
| 5450 | |||
| 5451 | __builtin_msa_maxi_s_d | ||
| 5452 | .param_str = "V2SLLiV2SLLiIi" | ||
| 5453 | .target_set = TargetSet.initOne(.mips) | ||
| 5454 | .attributes = .{ .@"const" = true } | ||
| 5455 | |||
| 5456 | __builtin_msa_maxi_s_h | ||
| 5457 | .param_str = "V8SsV8SsIi" | ||
| 5458 | .target_set = TargetSet.initOne(.mips) | ||
| 5459 | .attributes = .{ .@"const" = true } | ||
| 5460 | |||
| 5461 | __builtin_msa_maxi_s_w | ||
| 5462 | .param_str = "V4SiV4SiIi" | ||
| 5463 | .target_set = TargetSet.initOne(.mips) | ||
| 5464 | .attributes = .{ .@"const" = true } | ||
| 5465 | |||
| 5466 | __builtin_msa_maxi_u_b | ||
| 5467 | .param_str = "V16UcV16UcIi" | ||
| 5468 | .target_set = TargetSet.initOne(.mips) | ||
| 5469 | .attributes = .{ .@"const" = true } | ||
| 5470 | |||
| 5471 | __builtin_msa_maxi_u_d | ||
| 5472 | .param_str = "V2ULLiV2ULLiIi" | ||
| 5473 | .target_set = TargetSet.initOne(.mips) | ||
| 5474 | .attributes = .{ .@"const" = true } | ||
| 5475 | |||
| 5476 | __builtin_msa_maxi_u_h | ||
| 5477 | .param_str = "V8UsV8UsIi" | ||
| 5478 | .target_set = TargetSet.initOne(.mips) | ||
| 5479 | .attributes = .{ .@"const" = true } | ||
| 5480 | |||
| 5481 | __builtin_msa_maxi_u_w | ||
| 5482 | .param_str = "V4UiV4UiIi" | ||
| 5483 | .target_set = TargetSet.initOne(.mips) | ||
| 5484 | .attributes = .{ .@"const" = true } | ||
| 5485 | |||
| 5486 | __builtin_msa_min_a_b | ||
| 5487 | .param_str = "V16ScV16ScV16Sc" | ||
| 5488 | .target_set = TargetSet.initOne(.mips) | ||
| 5489 | .attributes = .{ .@"const" = true } | ||
| 5490 | |||
| 5491 | __builtin_msa_min_a_d | ||
| 5492 | .param_str = "V2SLLiV2SLLiV2SLLi" | ||
| 5493 | .target_set = TargetSet.initOne(.mips) | ||
| 5494 | .attributes = .{ .@"const" = true } | ||
| 5495 | |||
| 5496 | __builtin_msa_min_a_h | ||
| 5497 | .param_str = "V8SsV8SsV8Ss" | ||
| 5498 | .target_set = TargetSet.initOne(.mips) | ||
| 5499 | .attributes = .{ .@"const" = true } | ||
| 5500 | |||
| 5501 | __builtin_msa_min_a_w | ||
| 5502 | .param_str = "V4SiV4SiV4Si" | ||
| 5503 | .target_set = TargetSet.initOne(.mips) | ||
| 5504 | .attributes = .{ .@"const" = true } | ||
| 5505 | |||
| 5506 | __builtin_msa_min_s_b | ||
| 5507 | .param_str = "V16ScV16ScV16Sc" | ||
| 5508 | .target_set = TargetSet.initOne(.mips) | ||
| 5509 | .attributes = .{ .@"const" = true } | ||
| 5510 | |||
| 5511 | __builtin_msa_min_s_d | ||
| 5512 | .param_str = "V2SLLiV2SLLiV2SLLi" | ||
| 5513 | .target_set = TargetSet.initOne(.mips) | ||
| 5514 | .attributes = .{ .@"const" = true } | ||
| 5515 | |||
| 5516 | __builtin_msa_min_s_h | ||
| 5517 | .param_str = "V8SsV8SsV8Ss" | ||
| 5518 | .target_set = TargetSet.initOne(.mips) | ||
| 5519 | .attributes = .{ .@"const" = true } | ||
| 5520 | |||
| 5521 | __builtin_msa_min_s_w | ||
| 5522 | .param_str = "V4SiV4SiV4Si" | ||
| 5523 | .target_set = TargetSet.initOne(.mips) | ||
| 5524 | .attributes = .{ .@"const" = true } | ||
| 5525 | |||
| 5526 | __builtin_msa_min_u_b | ||
| 5527 | .param_str = "V16UcV16UcV16Uc" | ||
| 5528 | .target_set = TargetSet.initOne(.mips) | ||
| 5529 | .attributes = .{ .@"const" = true } | ||
| 5530 | |||
| 5531 | __builtin_msa_min_u_d | ||
| 5532 | .param_str = "V2ULLiV2ULLiV2ULLi" | ||
| 5533 | .target_set = TargetSet.initOne(.mips) | ||
| 5534 | .attributes = .{ .@"const" = true } | ||
| 5535 | |||
| 5536 | __builtin_msa_min_u_h | ||
| 5537 | .param_str = "V8UsV8UsV8Us" | ||
| 5538 | .target_set = TargetSet.initOne(.mips) | ||
| 5539 | .attributes = .{ .@"const" = true } | ||
| 5540 | |||
| 5541 | __builtin_msa_min_u_w | ||
| 5542 | .param_str = "V4UiV4UiV4Ui" | ||
| 5543 | .target_set = TargetSet.initOne(.mips) | ||
| 5544 | .attributes = .{ .@"const" = true } | ||
| 5545 | |||
| 5546 | __builtin_msa_mini_s_b | ||
| 5547 | .param_str = "V16ScV16ScIi" | ||
| 5548 | .target_set = TargetSet.initOne(.mips) | ||
| 5549 | .attributes = .{ .@"const" = true } | ||
| 5550 | |||
| 5551 | __builtin_msa_mini_s_d | ||
| 5552 | .param_str = "V2SLLiV2SLLiIi" | ||
| 5553 | .target_set = TargetSet.initOne(.mips) | ||
| 5554 | .attributes = .{ .@"const" = true } | ||
| 5555 | |||
| 5556 | __builtin_msa_mini_s_h | ||
| 5557 | .param_str = "V8SsV8SsIi" | ||
| 5558 | .target_set = TargetSet.initOne(.mips) | ||
| 5559 | .attributes = .{ .@"const" = true } | ||
| 5560 | |||
| 5561 | __builtin_msa_mini_s_w | ||
| 5562 | .param_str = "V4SiV4SiIi" | ||
| 5563 | .target_set = TargetSet.initOne(.mips) | ||
| 5564 | .attributes = .{ .@"const" = true } | ||
| 5565 | |||
| 5566 | __builtin_msa_mini_u_b | ||
| 5567 | .param_str = "V16UcV16UcIi" | ||
| 5568 | .target_set = TargetSet.initOne(.mips) | ||
| 5569 | .attributes = .{ .@"const" = true } | ||
| 5570 | |||
| 5571 | __builtin_msa_mini_u_d | ||
| 5572 | .param_str = "V2ULLiV2ULLiIi" | ||
| 5573 | .target_set = TargetSet.initOne(.mips) | ||
| 5574 | .attributes = .{ .@"const" = true } | ||
| 5575 | |||
| 5576 | __builtin_msa_mini_u_h | ||
| 5577 | .param_str = "V8UsV8UsIi" | ||
| 5578 | .target_set = TargetSet.initOne(.mips) | ||
| 5579 | .attributes = .{ .@"const" = true } | ||
| 5580 | |||
| 5581 | __builtin_msa_mini_u_w | ||
| 5582 | .param_str = "V4UiV4UiIi" | ||
| 5583 | .target_set = TargetSet.initOne(.mips) | ||
| 5584 | .attributes = .{ .@"const" = true } | ||
| 5585 | |||
| 5586 | __builtin_msa_mod_s_b | ||
| 5587 | .param_str = "V16ScV16ScV16Sc" | ||
| 5588 | .target_set = TargetSet.initOne(.mips) | ||
| 5589 | .attributes = .{ .@"const" = true } | ||
| 5590 | |||
| 5591 | __builtin_msa_mod_s_d | ||
| 5592 | .param_str = "V2SLLiV2SLLiV2SLLi" | ||
| 5593 | .target_set = TargetSet.initOne(.mips) | ||
| 5594 | .attributes = .{ .@"const" = true } | ||
| 5595 | |||
| 5596 | __builtin_msa_mod_s_h | ||
| 5597 | .param_str = "V8SsV8SsV8Ss" | ||
| 5598 | .target_set = TargetSet.initOne(.mips) | ||
| 5599 | .attributes = .{ .@"const" = true } | ||
| 5600 | |||
| 5601 | __builtin_msa_mod_s_w | ||
| 5602 | .param_str = "V4SiV4SiV4Si" | ||
| 5603 | .target_set = TargetSet.initOne(.mips) | ||
| 5604 | .attributes = .{ .@"const" = true } | ||
| 5605 | |||
| 5606 | __builtin_msa_mod_u_b | ||
| 5607 | .param_str = "V16UcV16UcV16Uc" | ||
| 5608 | .target_set = TargetSet.initOne(.mips) | ||
| 5609 | .attributes = .{ .@"const" = true } | ||
| 5610 | |||
| 5611 | __builtin_msa_mod_u_d | ||
| 5612 | .param_str = "V2ULLiV2ULLiV2ULLi" | ||
| 5613 | .target_set = TargetSet.initOne(.mips) | ||
| 5614 | .attributes = .{ .@"const" = true } | ||
| 5615 | |||
| 5616 | __builtin_msa_mod_u_h | ||
| 5617 | .param_str = "V8UsV8UsV8Us" | ||
| 5618 | .target_set = TargetSet.initOne(.mips) | ||
| 5619 | .attributes = .{ .@"const" = true } | ||
| 5620 | |||
| 5621 | __builtin_msa_mod_u_w | ||
| 5622 | .param_str = "V4UiV4UiV4Ui" | ||
| 5623 | .target_set = TargetSet.initOne(.mips) | ||
| 5624 | .attributes = .{ .@"const" = true } | ||
| 5625 | |||
| 5626 | __builtin_msa_move_v | ||
| 5627 | .param_str = "V16ScV16Sc" | ||
| 5628 | .target_set = TargetSet.initOne(.mips) | ||
| 5629 | .attributes = .{ .@"const" = true } | ||
| 5630 | |||
| 5631 | __builtin_msa_msub_q_h | ||
| 5632 | .param_str = "V8SsV8SsV8SsV8Ss" | ||
| 5633 | .target_set = TargetSet.initOne(.mips) | ||
| 5634 | .attributes = .{ .@"const" = true } | ||
| 5635 | |||
| 5636 | __builtin_msa_msub_q_w | ||
| 5637 | .param_str = "V4SiV4SiV4SiV4Si" | ||
| 5638 | .target_set = TargetSet.initOne(.mips) | ||
| 5639 | .attributes = .{ .@"const" = true } | ||
| 5640 | |||
| 5641 | __builtin_msa_msubr_q_h | ||
| 5642 | .param_str = "V8SsV8SsV8SsV8Ss" | ||
| 5643 | .target_set = TargetSet.initOne(.mips) | ||
| 5644 | .attributes = .{ .@"const" = true } | ||
| 5645 | |||
| 5646 | __builtin_msa_msubr_q_w | ||
| 5647 | .param_str = "V4SiV4SiV4SiV4Si" | ||
| 5648 | .target_set = TargetSet.initOne(.mips) | ||
| 5649 | .attributes = .{ .@"const" = true } | ||
| 5650 | |||
| 5651 | __builtin_msa_msubv_b | ||
| 5652 | .param_str = "V16ScV16ScV16ScV16Sc" | ||
| 5653 | .target_set = TargetSet.initOne(.mips) | ||
| 5654 | .attributes = .{ .@"const" = true } | ||
| 5655 | |||
| 5656 | __builtin_msa_msubv_d | ||
| 5657 | .param_str = "V2SLLiV2SLLiV2SLLiV2SLLi" | ||
| 5658 | .target_set = TargetSet.initOne(.mips) | ||
| 5659 | .attributes = .{ .@"const" = true } | ||
| 5660 | |||
| 5661 | __builtin_msa_msubv_h | ||
| 5662 | .param_str = "V8SsV8SsV8SsV8Ss" | ||
| 5663 | .target_set = TargetSet.initOne(.mips) | ||
| 5664 | .attributes = .{ .@"const" = true } | ||
| 5665 | |||
| 5666 | __builtin_msa_msubv_w | ||
| 5667 | .param_str = "V4SiV4SiV4SiV4Si" | ||
| 5668 | .target_set = TargetSet.initOne(.mips) | ||
| 5669 | .attributes = .{ .@"const" = true } | ||
| 5670 | |||
| 5671 | __builtin_msa_mul_q_h | ||
| 5672 | .param_str = "V8SsV8SsV8Ss" | ||
| 5673 | .target_set = TargetSet.initOne(.mips) | ||
| 5674 | .attributes = .{ .@"const" = true } | ||
| 5675 | |||
| 5676 | __builtin_msa_mul_q_w | ||
| 5677 | .param_str = "V4SiV4SiV4Si" | ||
| 5678 | .target_set = TargetSet.initOne(.mips) | ||
| 5679 | .attributes = .{ .@"const" = true } | ||
| 5680 | |||
| 5681 | __builtin_msa_mulr_q_h | ||
| 5682 | .param_str = "V8SsV8SsV8Ss" | ||
| 5683 | .target_set = TargetSet.initOne(.mips) | ||
| 5684 | .attributes = .{ .@"const" = true } | ||
| 5685 | |||
| 5686 | __builtin_msa_mulr_q_w | ||
| 5687 | .param_str = "V4SiV4SiV4Si" | ||
| 5688 | .target_set = TargetSet.initOne(.mips) | ||
| 5689 | .attributes = .{ .@"const" = true } | ||
| 5690 | |||
| 5691 | __builtin_msa_mulv_b | ||
| 5692 | .param_str = "V16ScV16ScV16Sc" | ||
| 5693 | .target_set = TargetSet.initOne(.mips) | ||
| 5694 | .attributes = .{ .@"const" = true } | ||
| 5695 | |||
| 5696 | __builtin_msa_mulv_d | ||
| 5697 | .param_str = "V2SLLiV2SLLiV2SLLi" | ||
| 5698 | .target_set = TargetSet.initOne(.mips) | ||
| 5699 | .attributes = .{ .@"const" = true } | ||
| 5700 | |||
| 5701 | __builtin_msa_mulv_h | ||
| 5702 | .param_str = "V8SsV8SsV8Ss" | ||
| 5703 | .target_set = TargetSet.initOne(.mips) | ||
| 5704 | .attributes = .{ .@"const" = true } | ||
| 5705 | |||
| 5706 | __builtin_msa_mulv_w | ||
| 5707 | .param_str = "V4SiV4SiV4Si" | ||
| 5708 | .target_set = TargetSet.initOne(.mips) | ||
| 5709 | .attributes = .{ .@"const" = true } | ||
| 5710 | |||
| 5711 | __builtin_msa_nloc_b | ||
| 5712 | .param_str = "V16ScV16Sc" | ||
| 5713 | .target_set = TargetSet.initOne(.mips) | ||
| 5714 | .attributes = .{ .@"const" = true } | ||
| 5715 | |||
| 5716 | __builtin_msa_nloc_d | ||
| 5717 | .param_str = "V2SLLiV2SLLi" | ||
| 5718 | .target_set = TargetSet.initOne(.mips) | ||
| 5719 | .attributes = .{ .@"const" = true } | ||
| 5720 | |||
| 5721 | __builtin_msa_nloc_h | ||
| 5722 | .param_str = "V8SsV8Ss" | ||
| 5723 | .target_set = TargetSet.initOne(.mips) | ||
| 5724 | .attributes = .{ .@"const" = true } | ||
| 5725 | |||
| 5726 | __builtin_msa_nloc_w | ||
| 5727 | .param_str = "V4SiV4Si" | ||
| 5728 | .target_set = TargetSet.initOne(.mips) | ||
| 5729 | .attributes = .{ .@"const" = true } | ||
| 5730 | |||
| 5731 | __builtin_msa_nlzc_b | ||
| 5732 | .param_str = "V16ScV16Sc" | ||
| 5733 | .target_set = TargetSet.initOne(.mips) | ||
| 5734 | .attributes = .{ .@"const" = true } | ||
| 5735 | |||
| 5736 | __builtin_msa_nlzc_d | ||
| 5737 | .param_str = "V2SLLiV2SLLi" | ||
| 5738 | .target_set = TargetSet.initOne(.mips) | ||
| 5739 | .attributes = .{ .@"const" = true } | ||
| 5740 | |||
| 5741 | __builtin_msa_nlzc_h | ||
| 5742 | .param_str = "V8SsV8Ss" | ||
| 5743 | .target_set = TargetSet.initOne(.mips) | ||
| 5744 | .attributes = .{ .@"const" = true } | ||
| 5745 | |||
| 5746 | __builtin_msa_nlzc_w | ||
| 5747 | .param_str = "V4SiV4Si" | ||
| 5748 | .target_set = TargetSet.initOne(.mips) | ||
| 5749 | .attributes = .{ .@"const" = true } | ||
| 5750 | |||
| 5751 | __builtin_msa_nor_v | ||
| 5752 | .param_str = "V16UcV16UcV16Uc" | ||
| 5753 | .target_set = TargetSet.initOne(.mips) | ||
| 5754 | .attributes = .{ .@"const" = true } | ||
| 5755 | |||
| 5756 | __builtin_msa_nori_b | ||
| 5757 | .param_str = "V16UcV16cIUi" | ||
| 5758 | .target_set = TargetSet.initOne(.mips) | ||
| 5759 | .attributes = .{ .@"const" = true } | ||
| 5760 | |||
| 5761 | __builtin_msa_or_v | ||
| 5762 | .param_str = "V16UcV16UcV16Uc" | ||
| 5763 | .target_set = TargetSet.initOne(.mips) | ||
| 5764 | .attributes = .{ .@"const" = true } | ||
| 5765 | |||
| 5766 | __builtin_msa_ori_b | ||
| 5767 | .param_str = "V16UcV16UcIUi" | ||
| 5768 | .target_set = TargetSet.initOne(.mips) | ||
| 5769 | .attributes = .{ .@"const" = true } | ||
| 5770 | |||
| 5771 | __builtin_msa_pckev_b | ||
| 5772 | .param_str = "V16cV16cV16c" | ||
| 5773 | .target_set = TargetSet.initOne(.mips) | ||
| 5774 | .attributes = .{ .@"const" = true } | ||
| 5775 | |||
| 5776 | __builtin_msa_pckev_d | ||
| 5777 | .param_str = "V2LLiV2LLiV2LLi" | ||
| 5778 | .target_set = TargetSet.initOne(.mips) | ||
| 5779 | .attributes = .{ .@"const" = true } | ||
| 5780 | |||
| 5781 | __builtin_msa_pckev_h | ||
| 5782 | .param_str = "V8sV8sV8s" | ||
| 5783 | .target_set = TargetSet.initOne(.mips) | ||
| 5784 | .attributes = .{ .@"const" = true } | ||
| 5785 | |||
| 5786 | __builtin_msa_pckev_w | ||
| 5787 | .param_str = "V4iV4iV4i" | ||
| 5788 | .target_set = TargetSet.initOne(.mips) | ||
| 5789 | .attributes = .{ .@"const" = true } | ||
| 5790 | |||
| 5791 | __builtin_msa_pckod_b | ||
| 5792 | .param_str = "V16cV16cV16c" | ||
| 5793 | .target_set = TargetSet.initOne(.mips) | ||
| 5794 | .attributes = .{ .@"const" = true } | ||
| 5795 | |||
| 5796 | __builtin_msa_pckod_d | ||
| 5797 | .param_str = "V2LLiV2LLiV2LLi" | ||
| 5798 | .target_set = TargetSet.initOne(.mips) | ||
| 5799 | .attributes = .{ .@"const" = true } | ||
| 5800 | |||
| 5801 | __builtin_msa_pckod_h | ||
| 5802 | .param_str = "V8sV8sV8s" | ||
| 5803 | .target_set = TargetSet.initOne(.mips) | ||
| 5804 | .attributes = .{ .@"const" = true } | ||
| 5805 | |||
| 5806 | __builtin_msa_pckod_w | ||
| 5807 | .param_str = "V4iV4iV4i" | ||
| 5808 | .target_set = TargetSet.initOne(.mips) | ||
| 5809 | .attributes = .{ .@"const" = true } | ||
| 5810 | |||
| 5811 | __builtin_msa_pcnt_b | ||
| 5812 | .param_str = "V16ScV16Sc" | ||
| 5813 | .target_set = TargetSet.initOne(.mips) | ||
| 5814 | .attributes = .{ .@"const" = true } | ||
| 5815 | |||
| 5816 | __builtin_msa_pcnt_d | ||
| 5817 | .param_str = "V2SLLiV2SLLi" | ||
| 5818 | .target_set = TargetSet.initOne(.mips) | ||
| 5819 | .attributes = .{ .@"const" = true } | ||
| 5820 | |||
| 5821 | __builtin_msa_pcnt_h | ||
| 5822 | .param_str = "V8SsV8Ss" | ||
| 5823 | .target_set = TargetSet.initOne(.mips) | ||
| 5824 | .attributes = .{ .@"const" = true } | ||
| 5825 | |||
| 5826 | __builtin_msa_pcnt_w | ||
| 5827 | .param_str = "V4SiV4Si" | ||
| 5828 | .target_set = TargetSet.initOne(.mips) | ||
| 5829 | .attributes = .{ .@"const" = true } | ||
| 5830 | |||
| 5831 | __builtin_msa_sat_s_b | ||
| 5832 | .param_str = "V16ScV16ScIUi" | ||
| 5833 | .target_set = TargetSet.initOne(.mips) | ||
| 5834 | .attributes = .{ .@"const" = true } | ||
| 5835 | |||
| 5836 | __builtin_msa_sat_s_d | ||
| 5837 | .param_str = "V2SLLiV2SLLiIUi" | ||
| 5838 | .target_set = TargetSet.initOne(.mips) | ||
| 5839 | .attributes = .{ .@"const" = true } | ||
| 5840 | |||
| 5841 | __builtin_msa_sat_s_h | ||
| 5842 | .param_str = "V8SsV8SsIUi" | ||
| 5843 | .target_set = TargetSet.initOne(.mips) | ||
| 5844 | .attributes = .{ .@"const" = true } | ||
| 5845 | |||
| 5846 | __builtin_msa_sat_s_w | ||
| 5847 | .param_str = "V4SiV4SiIUi" | ||
| 5848 | .target_set = TargetSet.initOne(.mips) | ||
| 5849 | .attributes = .{ .@"const" = true } | ||
| 5850 | |||
| 5851 | __builtin_msa_sat_u_b | ||
| 5852 | .param_str = "V16UcV16UcIUi" | ||
| 5853 | .target_set = TargetSet.initOne(.mips) | ||
| 5854 | .attributes = .{ .@"const" = true } | ||
| 5855 | |||
| 5856 | __builtin_msa_sat_u_d | ||
| 5857 | .param_str = "V2ULLiV2ULLiIUi" | ||
| 5858 | .target_set = TargetSet.initOne(.mips) | ||
| 5859 | .attributes = .{ .@"const" = true } | ||
| 5860 | |||
| 5861 | __builtin_msa_sat_u_h | ||
| 5862 | .param_str = "V8UsV8UsIUi" | ||
| 5863 | .target_set = TargetSet.initOne(.mips) | ||
| 5864 | .attributes = .{ .@"const" = true } | ||
| 5865 | |||
| 5866 | __builtin_msa_sat_u_w | ||
| 5867 | .param_str = "V4UiV4UiIUi" | ||
| 5868 | .target_set = TargetSet.initOne(.mips) | ||
| 5869 | .attributes = .{ .@"const" = true } | ||
| 5870 | |||
| 5871 | __builtin_msa_shf_b | ||
| 5872 | .param_str = "V16cV16cIUi" | ||
| 5873 | .target_set = TargetSet.initOne(.mips) | ||
| 5874 | .attributes = .{ .@"const" = true } | ||
| 5875 | |||
| 5876 | __builtin_msa_shf_h | ||
| 5877 | .param_str = "V8sV8sIUi" | ||
| 5878 | .target_set = TargetSet.initOne(.mips) | ||
| 5879 | .attributes = .{ .@"const" = true } | ||
| 5880 | |||
| 5881 | __builtin_msa_shf_w | ||
| 5882 | .param_str = "V4iV4iIUi" | ||
| 5883 | .target_set = TargetSet.initOne(.mips) | ||
| 5884 | .attributes = .{ .@"const" = true } | ||
| 5885 | |||
| 5886 | __builtin_msa_sld_b | ||
| 5887 | .param_str = "V16cV16cV16cUi" | ||
| 5888 | .target_set = TargetSet.initOne(.mips) | ||
| 5889 | .attributes = .{ .@"const" = true } | ||
| 5890 | |||
| 5891 | __builtin_msa_sld_d | ||
| 5892 | .param_str = "V2LLiV2LLiV2LLiUi" | ||
| 5893 | .target_set = TargetSet.initOne(.mips) | ||
| 5894 | .attributes = .{ .@"const" = true } | ||
| 5895 | |||
| 5896 | __builtin_msa_sld_h | ||
| 5897 | .param_str = "V8sV8sV8sUi" | ||
| 5898 | .target_set = TargetSet.initOne(.mips) | ||
| 5899 | .attributes = .{ .@"const" = true } | ||
| 5900 | |||
| 5901 | __builtin_msa_sld_w | ||
| 5902 | .param_str = "V4iV4iV4iUi" | ||
| 5903 | .target_set = TargetSet.initOne(.mips) | ||
| 5904 | .attributes = .{ .@"const" = true } | ||
| 5905 | |||
| 5906 | __builtin_msa_sldi_b | ||
| 5907 | .param_str = "V16cV16cV16cIUi" | ||
| 5908 | .target_set = TargetSet.initOne(.mips) | ||
| 5909 | .attributes = .{ .@"const" = true } | ||
| 5910 | |||
| 5911 | __builtin_msa_sldi_d | ||
| 5912 | .param_str = "V2LLiV2LLiV2LLiIUi" | ||
| 5913 | .target_set = TargetSet.initOne(.mips) | ||
| 5914 | .attributes = .{ .@"const" = true } | ||
| 5915 | |||
| 5916 | __builtin_msa_sldi_h | ||
| 5917 | .param_str = "V8sV8sV8sIUi" | ||
| 5918 | .target_set = TargetSet.initOne(.mips) | ||
| 5919 | .attributes = .{ .@"const" = true } | ||
| 5920 | |||
| 5921 | __builtin_msa_sldi_w | ||
| 5922 | .param_str = "V4iV4iV4iIUi" | ||
| 5923 | .target_set = TargetSet.initOne(.mips) | ||
| 5924 | .attributes = .{ .@"const" = true } | ||
| 5925 | |||
| 5926 | __builtin_msa_sll_b | ||
| 5927 | .param_str = "V16cV16cV16c" | ||
| 5928 | .target_set = TargetSet.initOne(.mips) | ||
| 5929 | .attributes = .{ .@"const" = true } | ||
| 5930 | |||
| 5931 | __builtin_msa_sll_d | ||
| 5932 | .param_str = "V2LLiV2LLiV2LLi" | ||
| 5933 | .target_set = TargetSet.initOne(.mips) | ||
| 5934 | .attributes = .{ .@"const" = true } | ||
| 5935 | |||
| 5936 | __builtin_msa_sll_h | ||
| 5937 | .param_str = "V8sV8sV8s" | ||
| 5938 | .target_set = TargetSet.initOne(.mips) | ||
| 5939 | .attributes = .{ .@"const" = true } | ||
| 5940 | |||
| 5941 | __builtin_msa_sll_w | ||
| 5942 | .param_str = "V4iV4iV4i" | ||
| 5943 | .target_set = TargetSet.initOne(.mips) | ||
| 5944 | .attributes = .{ .@"const" = true } | ||
| 5945 | |||
| 5946 | __builtin_msa_slli_b | ||
| 5947 | .param_str = "V16cV16cIUi" | ||
| 5948 | .target_set = TargetSet.initOne(.mips) | ||
| 5949 | .attributes = .{ .@"const" = true } | ||
| 5950 | |||
| 5951 | __builtin_msa_slli_d | ||
| 5952 | .param_str = "V2LLiV2LLiIUi" | ||
| 5953 | .target_set = TargetSet.initOne(.mips) | ||
| 5954 | .attributes = .{ .@"const" = true } | ||
| 5955 | |||
| 5956 | __builtin_msa_slli_h | ||
| 5957 | .param_str = "V8sV8sIUi" | ||
| 5958 | .target_set = TargetSet.initOne(.mips) | ||
| 5959 | .attributes = .{ .@"const" = true } | ||
| 5960 | |||
| 5961 | __builtin_msa_slli_w | ||
| 5962 | .param_str = "V4iV4iIUi" | ||
| 5963 | .target_set = TargetSet.initOne(.mips) | ||
| 5964 | .attributes = .{ .@"const" = true } | ||
| 5965 | |||
| 5966 | __builtin_msa_splat_b | ||
| 5967 | .param_str = "V16cV16cUi" | ||
| 5968 | .target_set = TargetSet.initOne(.mips) | ||
| 5969 | .attributes = .{ .@"const" = true } | ||
| 5970 | |||
| 5971 | __builtin_msa_splat_d | ||
| 5972 | .param_str = "V2LLiV2LLiUi" | ||
| 5973 | .target_set = TargetSet.initOne(.mips) | ||
| 5974 | .attributes = .{ .@"const" = true } | ||
| 5975 | |||
| 5976 | __builtin_msa_splat_h | ||
| 5977 | .param_str = "V8sV8sUi" | ||
| 5978 | .target_set = TargetSet.initOne(.mips) | ||
| 5979 | .attributes = .{ .@"const" = true } | ||
| 5980 | |||
| 5981 | __builtin_msa_splat_w | ||
| 5982 | .param_str = "V4iV4iUi" | ||
| 5983 | .target_set = TargetSet.initOne(.mips) | ||
| 5984 | .attributes = .{ .@"const" = true } | ||
| 5985 | |||
| 5986 | __builtin_msa_splati_b | ||
| 5987 | .param_str = "V16cV16cIUi" | ||
| 5988 | .target_set = TargetSet.initOne(.mips) | ||
| 5989 | .attributes = .{ .@"const" = true } | ||
| 5990 | |||
| 5991 | __builtin_msa_splati_d | ||
| 5992 | .param_str = "V2LLiV2LLiIUi" | ||
| 5993 | .target_set = TargetSet.initOne(.mips) | ||
| 5994 | .attributes = .{ .@"const" = true } | ||
| 5995 | |||
| 5996 | __builtin_msa_splati_h | ||
| 5997 | .param_str = "V8sV8sIUi" | ||
| 5998 | .target_set = TargetSet.initOne(.mips) | ||
| 5999 | .attributes = .{ .@"const" = true } | ||
| 6000 | |||
| 6001 | __builtin_msa_splati_w | ||
| 6002 | .param_str = "V4iV4iIUi" | ||
| 6003 | .target_set = TargetSet.initOne(.mips) | ||
| 6004 | .attributes = .{ .@"const" = true } | ||
| 6005 | |||
| 6006 | __builtin_msa_sra_b | ||
| 6007 | .param_str = "V16cV16cV16c" | ||
| 6008 | .target_set = TargetSet.initOne(.mips) | ||
| 6009 | .attributes = .{ .@"const" = true } | ||
| 6010 | |||
| 6011 | __builtin_msa_sra_d | ||
| 6012 | .param_str = "V2LLiV2LLiV2LLi" | ||
| 6013 | .target_set = TargetSet.initOne(.mips) | ||
| 6014 | .attributes = .{ .@"const" = true } | ||
| 6015 | |||
| 6016 | __builtin_msa_sra_h | ||
| 6017 | .param_str = "V8sV8sV8s" | ||
| 6018 | .target_set = TargetSet.initOne(.mips) | ||
| 6019 | .attributes = .{ .@"const" = true } | ||
| 6020 | |||
| 6021 | __builtin_msa_sra_w | ||
| 6022 | .param_str = "V4iV4iV4i" | ||
| 6023 | .target_set = TargetSet.initOne(.mips) | ||
| 6024 | .attributes = .{ .@"const" = true } | ||
| 6025 | |||
| 6026 | __builtin_msa_srai_b | ||
| 6027 | .param_str = "V16cV16cIUi" | ||
| 6028 | .target_set = TargetSet.initOne(.mips) | ||
| 6029 | .attributes = .{ .@"const" = true } | ||
| 6030 | |||
| 6031 | __builtin_msa_srai_d | ||
| 6032 | .param_str = "V2LLiV2LLiIUi" | ||
| 6033 | .target_set = TargetSet.initOne(.mips) | ||
| 6034 | .attributes = .{ .@"const" = true } | ||
| 6035 | |||
| 6036 | __builtin_msa_srai_h | ||
| 6037 | .param_str = "V8sV8sIUi" | ||
| 6038 | .target_set = TargetSet.initOne(.mips) | ||
| 6039 | .attributes = .{ .@"const" = true } | ||
| 6040 | |||
| 6041 | __builtin_msa_srai_w | ||
| 6042 | .param_str = "V4iV4iIUi" | ||
| 6043 | .target_set = TargetSet.initOne(.mips) | ||
| 6044 | .attributes = .{ .@"const" = true } | ||
| 6045 | |||
| 6046 | __builtin_msa_srar_b | ||
| 6047 | .param_str = "V16cV16cV16c" | ||
| 6048 | .target_set = TargetSet.initOne(.mips) | ||
| 6049 | .attributes = .{ .@"const" = true } | ||
| 6050 | |||
| 6051 | __builtin_msa_srar_d | ||
| 6052 | .param_str = "V2LLiV2LLiV2LLi" | ||
| 6053 | .target_set = TargetSet.initOne(.mips) | ||
| 6054 | .attributes = .{ .@"const" = true } | ||
| 6055 | |||
| 6056 | __builtin_msa_srar_h | ||
| 6057 | .param_str = "V8sV8sV8s" | ||
| 6058 | .target_set = TargetSet.initOne(.mips) | ||
| 6059 | .attributes = .{ .@"const" = true } | ||
| 6060 | |||
| 6061 | __builtin_msa_srar_w | ||
| 6062 | .param_str = "V4iV4iV4i" | ||
| 6063 | .target_set = TargetSet.initOne(.mips) | ||
| 6064 | .attributes = .{ .@"const" = true } | ||
| 6065 | |||
| 6066 | __builtin_msa_srari_b | ||
| 6067 | .param_str = "V16cV16cIUi" | ||
| 6068 | .target_set = TargetSet.initOne(.mips) | ||
| 6069 | .attributes = .{ .@"const" = true } | ||
| 6070 | |||
| 6071 | __builtin_msa_srari_d | ||
| 6072 | .param_str = "V2LLiV2LLiIUi" | ||
| 6073 | .target_set = TargetSet.initOne(.mips) | ||
| 6074 | .attributes = .{ .@"const" = true } | ||
| 6075 | |||
| 6076 | __builtin_msa_srari_h | ||
| 6077 | .param_str = "V8sV8sIUi" | ||
| 6078 | .target_set = TargetSet.initOne(.mips) | ||
| 6079 | .attributes = .{ .@"const" = true } | ||
| 6080 | |||
| 6081 | __builtin_msa_srari_w | ||
| 6082 | .param_str = "V4iV4iIUi" | ||
| 6083 | .target_set = TargetSet.initOne(.mips) | ||
| 6084 | .attributes = .{ .@"const" = true } | ||
| 6085 | |||
| 6086 | __builtin_msa_srl_b | ||
| 6087 | .param_str = "V16cV16cV16c" | ||
| 6088 | .target_set = TargetSet.initOne(.mips) | ||
| 6089 | .attributes = .{ .@"const" = true } | ||
| 6090 | |||
| 6091 | __builtin_msa_srl_d | ||
| 6092 | .param_str = "V2LLiV2LLiV2LLi" | ||
| 6093 | .target_set = TargetSet.initOne(.mips) | ||
| 6094 | .attributes = .{ .@"const" = true } | ||
| 6095 | |||
| 6096 | __builtin_msa_srl_h | ||
| 6097 | .param_str = "V8sV8sV8s" | ||
| 6098 | .target_set = TargetSet.initOne(.mips) | ||
| 6099 | .attributes = .{ .@"const" = true } | ||
| 6100 | |||
| 6101 | __builtin_msa_srl_w | ||
| 6102 | .param_str = "V4iV4iV4i" | ||
| 6103 | .target_set = TargetSet.initOne(.mips) | ||
| 6104 | .attributes = .{ .@"const" = true } | ||
| 6105 | |||
| 6106 | __builtin_msa_srli_b | ||
| 6107 | .param_str = "V16cV16cIUi" | ||
| 6108 | .target_set = TargetSet.initOne(.mips) | ||
| 6109 | .attributes = .{ .@"const" = true } | ||
| 6110 | |||
| 6111 | __builtin_msa_srli_d | ||
| 6112 | .param_str = "V2LLiV2LLiIUi" | ||
| 6113 | .target_set = TargetSet.initOne(.mips) | ||
| 6114 | .attributes = .{ .@"const" = true } | ||
| 6115 | |||
| 6116 | __builtin_msa_srli_h | ||
| 6117 | .param_str = "V8sV8sIUi" | ||
| 6118 | .target_set = TargetSet.initOne(.mips) | ||
| 6119 | .attributes = .{ .@"const" = true } | ||
| 6120 | |||
| 6121 | __builtin_msa_srli_w | ||
| 6122 | .param_str = "V4iV4iIUi" | ||
| 6123 | .target_set = TargetSet.initOne(.mips) | ||
| 6124 | .attributes = .{ .@"const" = true } | ||
| 6125 | |||
| 6126 | __builtin_msa_srlr_b | ||
| 6127 | .param_str = "V16cV16cV16c" | ||
| 6128 | .target_set = TargetSet.initOne(.mips) | ||
| 6129 | .attributes = .{ .@"const" = true } | ||
| 6130 | |||
| 6131 | __builtin_msa_srlr_d | ||
| 6132 | .param_str = "V2LLiV2LLiV2LLi" | ||
| 6133 | .target_set = TargetSet.initOne(.mips) | ||
| 6134 | .attributes = .{ .@"const" = true } | ||
| 6135 | |||
| 6136 | __builtin_msa_srlr_h | ||
| 6137 | .param_str = "V8sV8sV8s" | ||
| 6138 | .target_set = TargetSet.initOne(.mips) | ||
| 6139 | .attributes = .{ .@"const" = true } | ||
| 6140 | |||
| 6141 | __builtin_msa_srlr_w | ||
| 6142 | .param_str = "V4iV4iV4i" | ||
| 6143 | .target_set = TargetSet.initOne(.mips) | ||
| 6144 | .attributes = .{ .@"const" = true } | ||
| 6145 | |||
| 6146 | __builtin_msa_srlri_b | ||
| 6147 | .param_str = "V16cV16cIUi" | ||
| 6148 | .target_set = TargetSet.initOne(.mips) | ||
| 6149 | .attributes = .{ .@"const" = true } | ||
| 6150 | |||
| 6151 | __builtin_msa_srlri_d | ||
| 6152 | .param_str = "V2LLiV2LLiIUi" | ||
| 6153 | .target_set = TargetSet.initOne(.mips) | ||
| 6154 | .attributes = .{ .@"const" = true } | ||
| 6155 | |||
| 6156 | __builtin_msa_srlri_h | ||
| 6157 | .param_str = "V8sV8sIUi" | ||
| 6158 | .target_set = TargetSet.initOne(.mips) | ||
| 6159 | .attributes = .{ .@"const" = true } | ||
| 6160 | |||
| 6161 | __builtin_msa_srlri_w | ||
| 6162 | .param_str = "V4iV4iIUi" | ||
| 6163 | .target_set = TargetSet.initOne(.mips) | ||
| 6164 | .attributes = .{ .@"const" = true } | ||
| 6165 | |||
| 6166 | __builtin_msa_st_b | ||
| 6167 | .param_str = "vV16Scv*Ii" | ||
| 6168 | .target_set = TargetSet.initOne(.mips) | ||
| 6169 | .attributes = .{ .@"const" = true } | ||
| 6170 | |||
| 6171 | __builtin_msa_st_d | ||
| 6172 | .param_str = "vV2SLLiv*Ii" | ||
| 6173 | .target_set = TargetSet.initOne(.mips) | ||
| 6174 | .attributes = .{ .@"const" = true } | ||
| 6175 | |||
| 6176 | __builtin_msa_st_h | ||
| 6177 | .param_str = "vV8Ssv*Ii" | ||
| 6178 | .target_set = TargetSet.initOne(.mips) | ||
| 6179 | .attributes = .{ .@"const" = true } | ||
| 6180 | |||
| 6181 | __builtin_msa_st_w | ||
| 6182 | .param_str = "vV4Siv*Ii" | ||
| 6183 | .target_set = TargetSet.initOne(.mips) | ||
| 6184 | .attributes = .{ .@"const" = true } | ||
| 6185 | |||
| 6186 | __builtin_msa_str_d | ||
| 6187 | .param_str = "vV2SLLiv*Ii" | ||
| 6188 | .target_set = TargetSet.initOne(.mips) | ||
| 6189 | .attributes = .{ .@"const" = true } | ||
| 6190 | |||
| 6191 | __builtin_msa_str_w | ||
| 6192 | .param_str = "vV4Siv*Ii" | ||
| 6193 | .target_set = TargetSet.initOne(.mips) | ||
| 6194 | .attributes = .{ .@"const" = true } | ||
| 6195 | |||
| 6196 | __builtin_msa_subs_s_b | ||
| 6197 | .param_str = "V16ScV16ScV16Sc" | ||
| 6198 | .target_set = TargetSet.initOne(.mips) | ||
| 6199 | .attributes = .{ .@"const" = true } | ||
| 6200 | |||
| 6201 | __builtin_msa_subs_s_d | ||
| 6202 | .param_str = "V2SLLiV2SLLiV2SLLi" | ||
| 6203 | .target_set = TargetSet.initOne(.mips) | ||
| 6204 | .attributes = .{ .@"const" = true } | ||
| 6205 | |||
| 6206 | __builtin_msa_subs_s_h | ||
| 6207 | .param_str = "V8SsV8SsV8Ss" | ||
| 6208 | .target_set = TargetSet.initOne(.mips) | ||
| 6209 | .attributes = .{ .@"const" = true } | ||
| 6210 | |||
| 6211 | __builtin_msa_subs_s_w | ||
| 6212 | .param_str = "V4SiV4SiV4Si" | ||
| 6213 | .target_set = TargetSet.initOne(.mips) | ||
| 6214 | .attributes = .{ .@"const" = true } | ||
| 6215 | |||
| 6216 | __builtin_msa_subs_u_b | ||
| 6217 | .param_str = "V16UcV16UcV16Uc" | ||
| 6218 | .target_set = TargetSet.initOne(.mips) | ||
| 6219 | .attributes = .{ .@"const" = true } | ||
| 6220 | |||
| 6221 | __builtin_msa_subs_u_d | ||
| 6222 | .param_str = "V2ULLiV2ULLiV2ULLi" | ||
| 6223 | .target_set = TargetSet.initOne(.mips) | ||
| 6224 | .attributes = .{ .@"const" = true } | ||
| 6225 | |||
| 6226 | __builtin_msa_subs_u_h | ||
| 6227 | .param_str = "V8UsV8UsV8Us" | ||
| 6228 | .target_set = TargetSet.initOne(.mips) | ||
| 6229 | .attributes = .{ .@"const" = true } | ||
| 6230 | |||
| 6231 | __builtin_msa_subs_u_w | ||
| 6232 | .param_str = "V4UiV4UiV4Ui" | ||
| 6233 | .target_set = TargetSet.initOne(.mips) | ||
| 6234 | .attributes = .{ .@"const" = true } | ||
| 6235 | |||
| 6236 | __builtin_msa_subsus_u_b | ||
| 6237 | .param_str = "V16UcV16UcV16Sc" | ||
| 6238 | .target_set = TargetSet.initOne(.mips) | ||
| 6239 | .attributes = .{ .@"const" = true } | ||
| 6240 | |||
| 6241 | __builtin_msa_subsus_u_d | ||
| 6242 | .param_str = "V2ULLiV2ULLiV2SLLi" | ||
| 6243 | .target_set = TargetSet.initOne(.mips) | ||
| 6244 | .attributes = .{ .@"const" = true } | ||
| 6245 | |||
| 6246 | __builtin_msa_subsus_u_h | ||
| 6247 | .param_str = "V8UsV8UsV8Ss" | ||
| 6248 | .target_set = TargetSet.initOne(.mips) | ||
| 6249 | .attributes = .{ .@"const" = true } | ||
| 6250 | |||
| 6251 | __builtin_msa_subsus_u_w | ||
| 6252 | .param_str = "V4UiV4UiV4Si" | ||
| 6253 | .target_set = TargetSet.initOne(.mips) | ||
| 6254 | .attributes = .{ .@"const" = true } | ||
| 6255 | |||
| 6256 | __builtin_msa_subsuu_s_b | ||
| 6257 | .param_str = "V16ScV16UcV16Uc" | ||
| 6258 | .target_set = TargetSet.initOne(.mips) | ||
| 6259 | .attributes = .{ .@"const" = true } | ||
| 6260 | |||
| 6261 | __builtin_msa_subsuu_s_d | ||
| 6262 | .param_str = "V2SLLiV2ULLiV2ULLi" | ||
| 6263 | .target_set = TargetSet.initOne(.mips) | ||
| 6264 | .attributes = .{ .@"const" = true } | ||
| 6265 | |||
| 6266 | __builtin_msa_subsuu_s_h | ||
| 6267 | .param_str = "V8SsV8UsV8Us" | ||
| 6268 | .target_set = TargetSet.initOne(.mips) | ||
| 6269 | .attributes = .{ .@"const" = true } | ||
| 6270 | |||
| 6271 | __builtin_msa_subsuu_s_w | ||
| 6272 | .param_str = "V4SiV4UiV4Ui" | ||
| 6273 | .target_set = TargetSet.initOne(.mips) | ||
| 6274 | .attributes = .{ .@"const" = true } | ||
| 6275 | |||
| 6276 | __builtin_msa_subv_b | ||
| 6277 | .param_str = "V16cV16cV16c" | ||
| 6278 | .target_set = TargetSet.initOne(.mips) | ||
| 6279 | .attributes = .{ .@"const" = true } | ||
| 6280 | |||
| 6281 | __builtin_msa_subv_d | ||
| 6282 | .param_str = "V2LLiV2LLiV2LLi" | ||
| 6283 | .target_set = TargetSet.initOne(.mips) | ||
| 6284 | .attributes = .{ .@"const" = true } | ||
| 6285 | |||
| 6286 | __builtin_msa_subv_h | ||
| 6287 | .param_str = "V8sV8sV8s" | ||
| 6288 | .target_set = TargetSet.initOne(.mips) | ||
| 6289 | .attributes = .{ .@"const" = true } | ||
| 6290 | |||
| 6291 | __builtin_msa_subv_w | ||
| 6292 | .param_str = "V4iV4iV4i" | ||
| 6293 | .target_set = TargetSet.initOne(.mips) | ||
| 6294 | .attributes = .{ .@"const" = true } | ||
| 6295 | |||
| 6296 | __builtin_msa_subvi_b | ||
| 6297 | .param_str = "V16cV16cIUi" | ||
| 6298 | .target_set = TargetSet.initOne(.mips) | ||
| 6299 | .attributes = .{ .@"const" = true } | ||
| 6300 | |||
| 6301 | __builtin_msa_subvi_d | ||
| 6302 | .param_str = "V2LLiV2LLiIUi" | ||
| 6303 | .target_set = TargetSet.initOne(.mips) | ||
| 6304 | .attributes = .{ .@"const" = true } | ||
| 6305 | |||
| 6306 | __builtin_msa_subvi_h | ||
| 6307 | .param_str = "V8sV8sIUi" | ||
| 6308 | .target_set = TargetSet.initOne(.mips) | ||
| 6309 | .attributes = .{ .@"const" = true } | ||
| 6310 | |||
| 6311 | __builtin_msa_subvi_w | ||
| 6312 | .param_str = "V4iV4iIUi" | ||
| 6313 | .target_set = TargetSet.initOne(.mips) | ||
| 6314 | .attributes = .{ .@"const" = true } | ||
| 6315 | |||
| 6316 | __builtin_msa_vshf_b | ||
| 6317 | .param_str = "V16cV16cV16cV16c" | ||
| 6318 | .target_set = TargetSet.initOne(.mips) | ||
| 6319 | .attributes = .{ .@"const" = true } | ||
| 6320 | |||
| 6321 | __builtin_msa_vshf_d | ||
| 6322 | .param_str = "V2LLiV2LLiV2LLiV2LLi" | ||
| 6323 | .target_set = TargetSet.initOne(.mips) | ||
| 6324 | .attributes = .{ .@"const" = true } | ||
| 6325 | |||
| 6326 | __builtin_msa_vshf_h | ||
| 6327 | .param_str = "V8sV8sV8sV8s" | ||
| 6328 | .target_set = TargetSet.initOne(.mips) | ||
| 6329 | .attributes = .{ .@"const" = true } | ||
| 6330 | |||
| 6331 | __builtin_msa_vshf_w | ||
| 6332 | .param_str = "V4iV4iV4iV4i" | ||
| 6333 | .target_set = TargetSet.initOne(.mips) | ||
| 6334 | .attributes = .{ .@"const" = true } | ||
| 6335 | |||
| 6336 | __builtin_msa_xor_v | ||
| 6337 | .param_str = "V16cV16cV16c" | ||
| 6338 | .target_set = TargetSet.initOne(.mips) | ||
| 6339 | .attributes = .{ .@"const" = true } | ||
| 6340 | |||
| 6341 | __builtin_msa_xori_b | ||
| 6342 | .param_str = "V16cV16cIUi" | ||
| 6343 | .target_set = TargetSet.initOne(.mips) | ||
| 6344 | .attributes = .{ .@"const" = true } | ||
| 6345 | |||
| 6346 | __builtin_mul_overflow | ||
| 6347 | .param_str = "b." | ||
| 6348 | .attributes = .{ .custom_typecheck = true, .const_evaluable = true } | ||
| 6349 | |||
| 6350 | __builtin_nan | ||
| 6351 | .param_str = "dcC*" | ||
| 6352 | .attributes = .{ .pure = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } | ||
| 6353 | |||
| 6354 | __builtin_nanf | ||
| 6355 | .param_str = "fcC*" | ||
| 6356 | .attributes = .{ .pure = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } | ||
| 6357 | |||
| 6358 | __builtin_nanf128 | ||
| 6359 | .param_str = "LLdcC*" | ||
| 6360 | .attributes = .{ .pure = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } | ||
| 6361 | |||
| 6362 | __builtin_nanf16 | ||
| 6363 | .param_str = "xcC*" | ||
| 6364 | .attributes = .{ .pure = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } | ||
| 6365 | |||
| 6366 | __builtin_nanl | ||
| 6367 | .param_str = "LdcC*" | ||
| 6368 | .attributes = .{ .pure = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } | ||
| 6369 | |||
| 6370 | __builtin_nans | ||
| 6371 | .param_str = "dcC*" | ||
| 6372 | .attributes = .{ .pure = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } | ||
| 6373 | |||
| 6374 | __builtin_nansf | ||
| 6375 | .param_str = "fcC*" | ||
| 6376 | .attributes = .{ .pure = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } | ||
| 6377 | |||
| 6378 | __builtin_nansf128 | ||
| 6379 | .param_str = "LLdcC*" | ||
| 6380 | .attributes = .{ .pure = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } | ||
| 6381 | |||
| 6382 | __builtin_nansf16 | ||
| 6383 | .param_str = "xcC*" | ||
| 6384 | .attributes = .{ .pure = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } | ||
| 6385 | |||
| 6386 | __builtin_nansl | ||
| 6387 | .param_str = "LdcC*" | ||
| 6388 | .attributes = .{ .pure = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } | ||
| 6389 | |||
| 6390 | __builtin_nearbyint | ||
| 6391 | .param_str = "dd" | ||
| 6392 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } | ||
| 6393 | |||
| 6394 | __builtin_nearbyintf | ||
| 6395 | .param_str = "ff" | ||
| 6396 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } | ||
| 6397 | |||
| 6398 | __builtin_nearbyintf128 | ||
| 6399 | .param_str = "LLdLLd" | ||
| 6400 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } | ||
| 6401 | |||
| 6402 | __builtin_nearbyintl | ||
| 6403 | .param_str = "LdLd" | ||
| 6404 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } | ||
| 6405 | |||
| 6406 | __builtin_nextafter | ||
| 6407 | .param_str = "ddd" | ||
| 6408 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 6409 | |||
| 6410 | __builtin_nextafterf | ||
| 6411 | .param_str = "fff" | ||
| 6412 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 6413 | |||
| 6414 | __builtin_nextafterf128 | ||
| 6415 | .param_str = "LLdLLdLLd" | ||
| 6416 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 6417 | |||
| 6418 | __builtin_nextafterl | ||
| 6419 | .param_str = "LdLdLd" | ||
| 6420 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 6421 | |||
| 6422 | __builtin_nexttoward | ||
| 6423 | .param_str = "ddLd" | ||
| 6424 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 6425 | |||
| 6426 | __builtin_nexttowardf | ||
| 6427 | .param_str = "ffLd" | ||
| 6428 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 6429 | |||
| 6430 | __builtin_nexttowardf128 | ||
| 6431 | .param_str = "LLdLLdLLd" | ||
| 6432 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 6433 | |||
| 6434 | __builtin_nexttowardl | ||
| 6435 | .param_str = "LdLdLd" | ||
| 6436 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 6437 | |||
| 6438 | __builtin_nondeterministic_value | ||
| 6439 | .param_str = "v." | ||
| 6440 | .attributes = .{ .custom_typecheck = true } | ||
| 6441 | |||
| 6442 | __builtin_nontemporal_load | ||
| 6443 | .param_str = "v." | ||
| 6444 | .attributes = .{ .custom_typecheck = true } | ||
| 6445 | |||
| 6446 | __builtin_nontemporal_store | ||
| 6447 | .param_str = "v." | ||
| 6448 | .attributes = .{ .custom_typecheck = true } | ||
| 6449 | |||
| 6450 | __builtin_objc_memmove_collectable | ||
| 6451 | .param_str = "v*v*vC*z" | ||
| 6452 | .attributes = .{ .lib_function_with_builtin_prefix = true } | ||
| 6453 | |||
| 6454 | __builtin_object_size | ||
| 6455 | .param_str = "zvC*i" | ||
| 6456 | .attributes = .{ .eval_args = false, .const_evaluable = true } | ||
| 6457 | |||
| 6458 | __builtin_operator_delete | ||
| 6459 | .param_str = "vv*" | ||
| 6460 | .attributes = .{ .custom_typecheck = true, .const_evaluable = true } | ||
| 6461 | |||
| 6462 | __builtin_operator_new | ||
| 6463 | .param_str = "v*z" | ||
| 6464 | .attributes = .{ .@"const" = true, .custom_typecheck = true, .const_evaluable = true } | ||
| 6465 | |||
| 6466 | __builtin_os_log_format | ||
| 6467 | .param_str = "v*v*cC*." | ||
| 6468 | .attributes = .{ .custom_typecheck = true, .format_kind = .printf } | ||
| 6469 | |||
| 6470 | __builtin_os_log_format_buffer_size | ||
| 6471 | .param_str = "zcC*." | ||
| 6472 | .attributes = .{ .custom_typecheck = true, .format_kind = .printf, .eval_args = false, .const_evaluable = true } | ||
| 6473 | |||
| 6474 | __builtin_pack_longdouble | ||
| 6475 | .param_str = "Lddd" | ||
| 6476 | .target_set = TargetSet.initOne(.ppc) | ||
| 6477 | |||
| 6478 | __builtin_parity | ||
| 6479 | .param_str = "iUi" | ||
| 6480 | .attributes = .{ .@"const" = true, .const_evaluable = true } | ||
| 6481 | |||
| 6482 | __builtin_parityl | ||
| 6483 | .param_str = "iULi" | ||
| 6484 | .attributes = .{ .@"const" = true, .const_evaluable = true } | ||
| 6485 | |||
| 6486 | __builtin_parityll | ||
| 6487 | .param_str = "iULLi" | ||
| 6488 | .attributes = .{ .@"const" = true, .const_evaluable = true } | ||
| 6489 | |||
| 6490 | __builtin_popcount | ||
| 6491 | .param_str = "iUi" | ||
| 6492 | .attributes = .{ .@"const" = true, .const_evaluable = true } | ||
| 6493 | |||
| 6494 | __builtin_popcountl | ||
| 6495 | .param_str = "iULi" | ||
| 6496 | .attributes = .{ .@"const" = true, .const_evaluable = true } | ||
| 6497 | |||
| 6498 | __builtin_popcountll | ||
| 6499 | .param_str = "iULLi" | ||
| 6500 | .attributes = .{ .@"const" = true, .const_evaluable = true } | ||
| 6501 | |||
| 6502 | __builtin_pow | ||
| 6503 | .param_str = "ddd" | ||
| 6504 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 6505 | |||
| 6506 | __builtin_powf | ||
| 6507 | .param_str = "fff" | ||
| 6508 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 6509 | |||
| 6510 | __builtin_powf128 | ||
| 6511 | .param_str = "LLdLLdLLd" | ||
| 6512 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 6513 | |||
| 6514 | __builtin_powf16 | ||
| 6515 | .param_str = "hhh" | ||
| 6516 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 6517 | |||
| 6518 | __builtin_powi | ||
| 6519 | .param_str = "ddi" | ||
| 6520 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } | ||
| 6521 | |||
| 6522 | __builtin_powif | ||
| 6523 | .param_str = "ffi" | ||
| 6524 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } | ||
| 6525 | |||
| 6526 | __builtin_powil | ||
| 6527 | .param_str = "LdLdi" | ||
| 6528 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } | ||
| 6529 | |||
| 6530 | __builtin_powl | ||
| 6531 | .param_str = "LdLdLd" | ||
| 6532 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 6533 | |||
| 6534 | __builtin_ppc_alignx | ||
| 6535 | .param_str = "vIivC*" | ||
| 6536 | .target_set = TargetSet.initOne(.ppc) | ||
| 6537 | .attributes = .{ .@"const" = true } | ||
| 6538 | |||
| 6539 | __builtin_ppc_cmpb | ||
| 6540 | .param_str = "LLiLLiLLi" | ||
| 6541 | .target_set = TargetSet.initOne(.ppc) | ||
| 6542 | |||
| 6543 | __builtin_ppc_compare_and_swap | ||
| 6544 | .param_str = "iiD*i*i" | ||
| 6545 | .target_set = TargetSet.initOne(.ppc) | ||
| 6546 | |||
| 6547 | __builtin_ppc_compare_and_swaplp | ||
| 6548 | .param_str = "iLiD*Li*Li" | ||
| 6549 | .target_set = TargetSet.initOne(.ppc) | ||
| 6550 | |||
| 6551 | __builtin_ppc_dcbfl | ||
| 6552 | .param_str = "vvC*" | ||
| 6553 | .target_set = TargetSet.initOne(.ppc) | ||
| 6554 | |||
| 6555 | __builtin_ppc_dcbflp | ||
| 6556 | .param_str = "vvC*" | ||
| 6557 | .target_set = TargetSet.initOne(.ppc) | ||
| 6558 | |||
| 6559 | __builtin_ppc_dcbst | ||
| 6560 | .param_str = "vvC*" | ||
| 6561 | .target_set = TargetSet.initOne(.ppc) | ||
| 6562 | |||
| 6563 | __builtin_ppc_dcbt | ||
| 6564 | .param_str = "vv*" | ||
| 6565 | .target_set = TargetSet.initOne(.ppc) | ||
| 6566 | |||
| 6567 | __builtin_ppc_dcbtst | ||
| 6568 | .param_str = "vv*" | ||
| 6569 | .target_set = TargetSet.initOne(.ppc) | ||
| 6570 | |||
| 6571 | __builtin_ppc_dcbtstt | ||
| 6572 | .param_str = "vv*" | ||
| 6573 | .target_set = TargetSet.initOne(.ppc) | ||
| 6574 | |||
| 6575 | __builtin_ppc_dcbtt | ||
| 6576 | .param_str = "vv*" | ||
| 6577 | .target_set = TargetSet.initOne(.ppc) | ||
| 6578 | |||
| 6579 | __builtin_ppc_dcbz | ||
| 6580 | .param_str = "vv*" | ||
| 6581 | .target_set = TargetSet.initOne(.ppc) | ||
| 6582 | |||
| 6583 | __builtin_ppc_eieio | ||
| 6584 | .param_str = "v" | ||
| 6585 | .target_set = TargetSet.initOne(.ppc) | ||
| 6586 | |||
| 6587 | __builtin_ppc_fcfid | ||
| 6588 | .param_str = "dd" | ||
| 6589 | .target_set = TargetSet.initOne(.ppc) | ||
| 6590 | |||
| 6591 | __builtin_ppc_fcfud | ||
| 6592 | .param_str = "dd" | ||
| 6593 | .target_set = TargetSet.initOne(.ppc) | ||
| 6594 | |||
| 6595 | __builtin_ppc_fctid | ||
| 6596 | .param_str = "dd" | ||
| 6597 | .target_set = TargetSet.initOne(.ppc) | ||
| 6598 | |||
| 6599 | __builtin_ppc_fctidz | ||
| 6600 | .param_str = "dd" | ||
| 6601 | .target_set = TargetSet.initOne(.ppc) | ||
| 6602 | |||
| 6603 | __builtin_ppc_fctiw | ||
| 6604 | .param_str = "dd" | ||
| 6605 | .target_set = TargetSet.initOne(.ppc) | ||
| 6606 | |||
| 6607 | __builtin_ppc_fctiwz | ||
| 6608 | .param_str = "dd" | ||
| 6609 | .target_set = TargetSet.initOne(.ppc) | ||
| 6610 | |||
| 6611 | __builtin_ppc_fctudz | ||
| 6612 | .param_str = "dd" | ||
| 6613 | .target_set = TargetSet.initOne(.ppc) | ||
| 6614 | |||
| 6615 | __builtin_ppc_fctuwz | ||
| 6616 | .param_str = "dd" | ||
| 6617 | .target_set = TargetSet.initOne(.ppc) | ||
| 6618 | |||
| 6619 | __builtin_ppc_fetch_and_add | ||
| 6620 | .param_str = "iiD*i" | ||
| 6621 | .target_set = TargetSet.initOne(.ppc) | ||
| 6622 | |||
| 6623 | __builtin_ppc_fetch_and_addlp | ||
| 6624 | .param_str = "LiLiD*Li" | ||
| 6625 | .target_set = TargetSet.initOne(.ppc) | ||
| 6626 | |||
| 6627 | __builtin_ppc_fetch_and_and | ||
| 6628 | .param_str = "UiUiD*Ui" | ||
| 6629 | .target_set = TargetSet.initOne(.ppc) | ||
| 6630 | |||
| 6631 | __builtin_ppc_fetch_and_andlp | ||
| 6632 | .param_str = "ULiULiD*ULi" | ||
| 6633 | .target_set = TargetSet.initOne(.ppc) | ||
| 6634 | |||
| 6635 | __builtin_ppc_fetch_and_or | ||
| 6636 | .param_str = "UiUiD*Ui" | ||
| 6637 | .target_set = TargetSet.initOne(.ppc) | ||
| 6638 | |||
| 6639 | __builtin_ppc_fetch_and_orlp | ||
| 6640 | .param_str = "ULiULiD*ULi" | ||
| 6641 | .target_set = TargetSet.initOne(.ppc) | ||
| 6642 | |||
| 6643 | __builtin_ppc_fetch_and_swap | ||
| 6644 | .param_str = "UiUiD*Ui" | ||
| 6645 | .target_set = TargetSet.initOne(.ppc) | ||
| 6646 | |||
| 6647 | __builtin_ppc_fetch_and_swaplp | ||
| 6648 | .param_str = "ULiULiD*ULi" | ||
| 6649 | .target_set = TargetSet.initOne(.ppc) | ||
| 6650 | |||
| 6651 | __builtin_ppc_fmsub | ||
| 6652 | .param_str = "dddd" | ||
| 6653 | .target_set = TargetSet.initOne(.ppc) | ||
| 6654 | |||
| 6655 | __builtin_ppc_fmsubs | ||
| 6656 | .param_str = "ffff" | ||
| 6657 | .target_set = TargetSet.initOne(.ppc) | ||
| 6658 | |||
| 6659 | __builtin_ppc_fnabs | ||
| 6660 | .param_str = "dd" | ||
| 6661 | .target_set = TargetSet.initOne(.ppc) | ||
| 6662 | |||
| 6663 | __builtin_ppc_fnabss | ||
| 6664 | .param_str = "ff" | ||
| 6665 | .target_set = TargetSet.initOne(.ppc) | ||
| 6666 | |||
| 6667 | __builtin_ppc_fnmadd | ||
| 6668 | .param_str = "dddd" | ||
| 6669 | .target_set = TargetSet.initOne(.ppc) | ||
| 6670 | |||
| 6671 | __builtin_ppc_fnmadds | ||
| 6672 | .param_str = "ffff" | ||
| 6673 | .target_set = TargetSet.initOne(.ppc) | ||
| 6674 | |||
| 6675 | __builtin_ppc_fnmsub | ||
| 6676 | .param_str = "dddd" | ||
| 6677 | .target_set = TargetSet.initOne(.ppc) | ||
| 6678 | |||
| 6679 | __builtin_ppc_fnmsubs | ||
| 6680 | .param_str = "ffff" | ||
| 6681 | .target_set = TargetSet.initOne(.ppc) | ||
| 6682 | |||
| 6683 | __builtin_ppc_fre | ||
| 6684 | .param_str = "dd" | ||
| 6685 | .target_set = TargetSet.initOne(.ppc) | ||
| 6686 | |||
| 6687 | __builtin_ppc_fres | ||
| 6688 | .param_str = "ff" | ||
| 6689 | .target_set = TargetSet.initOne(.ppc) | ||
| 6690 | |||
| 6691 | __builtin_ppc_fric | ||
| 6692 | .param_str = "dd" | ||
| 6693 | .target_set = TargetSet.initOne(.ppc) | ||
| 6694 | |||
| 6695 | __builtin_ppc_frim | ||
| 6696 | .param_str = "dd" | ||
| 6697 | .target_set = TargetSet.initOne(.ppc) | ||
| 6698 | |||
| 6699 | __builtin_ppc_frims | ||
| 6700 | .param_str = "ff" | ||
| 6701 | .target_set = TargetSet.initOne(.ppc) | ||
| 6702 | |||
| 6703 | __builtin_ppc_frin | ||
| 6704 | .param_str = "dd" | ||
| 6705 | .target_set = TargetSet.initOne(.ppc) | ||
| 6706 | |||
| 6707 | __builtin_ppc_frins | ||
| 6708 | .param_str = "ff" | ||
| 6709 | .target_set = TargetSet.initOne(.ppc) | ||
| 6710 | |||
| 6711 | __builtin_ppc_frip | ||
| 6712 | .param_str = "dd" | ||
| 6713 | .target_set = TargetSet.initOne(.ppc) | ||
| 6714 | |||
| 6715 | __builtin_ppc_frips | ||
| 6716 | .param_str = "ff" | ||
| 6717 | .target_set = TargetSet.initOne(.ppc) | ||
| 6718 | |||
| 6719 | __builtin_ppc_friz | ||
| 6720 | .param_str = "dd" | ||
| 6721 | .target_set = TargetSet.initOne(.ppc) | ||
| 6722 | |||
| 6723 | __builtin_ppc_frizs | ||
| 6724 | .param_str = "ff" | ||
| 6725 | .target_set = TargetSet.initOne(.ppc) | ||
| 6726 | |||
| 6727 | __builtin_ppc_frsqrte | ||
| 6728 | .param_str = "dd" | ||
| 6729 | .target_set = TargetSet.initOne(.ppc) | ||
| 6730 | |||
| 6731 | __builtin_ppc_frsqrtes | ||
| 6732 | .param_str = "ff" | ||
| 6733 | .target_set = TargetSet.initOne(.ppc) | ||
| 6734 | |||
| 6735 | __builtin_ppc_fsel | ||
| 6736 | .param_str = "dddd" | ||
| 6737 | .target_set = TargetSet.initOne(.ppc) | ||
| 6738 | |||
| 6739 | __builtin_ppc_fsels | ||
| 6740 | .param_str = "ffff" | ||
| 6741 | .target_set = TargetSet.initOne(.ppc) | ||
| 6742 | |||
| 6743 | __builtin_ppc_fsqrt | ||
| 6744 | .param_str = "dd" | ||
| 6745 | .target_set = TargetSet.initOne(.ppc) | ||
| 6746 | |||
| 6747 | __builtin_ppc_fsqrts | ||
| 6748 | .param_str = "ff" | ||
| 6749 | .target_set = TargetSet.initOne(.ppc) | ||
| 6750 | |||
| 6751 | __builtin_ppc_get_timebase | ||
| 6752 | .param_str = "ULLi" | ||
| 6753 | .target_set = TargetSet.initOne(.ppc) | ||
| 6754 | |||
| 6755 | __builtin_ppc_iospace_eieio | ||
| 6756 | .param_str = "v" | ||
| 6757 | .target_set = TargetSet.initOne(.ppc) | ||
| 6758 | |||
| 6759 | __builtin_ppc_iospace_lwsync | ||
| 6760 | .param_str = "v" | ||
| 6761 | .target_set = TargetSet.initOne(.ppc) | ||
| 6762 | |||
| 6763 | __builtin_ppc_iospace_sync | ||
| 6764 | .param_str = "v" | ||
| 6765 | .target_set = TargetSet.initOne(.ppc) | ||
| 6766 | |||
| 6767 | __builtin_ppc_isync | ||
| 6768 | .param_str = "v" | ||
| 6769 | .target_set = TargetSet.initOne(.ppc) | ||
| 6770 | |||
| 6771 | __builtin_ppc_ldarx | ||
| 6772 | .param_str = "LiLiD*" | ||
| 6773 | .target_set = TargetSet.initOne(.ppc) | ||
| 6774 | |||
| 6775 | __builtin_ppc_load2r | ||
| 6776 | .param_str = "UsUs*" | ||
| 6777 | .target_set = TargetSet.initOne(.ppc) | ||
| 6778 | |||
| 6779 | __builtin_ppc_load4r | ||
| 6780 | .param_str = "UiUi*" | ||
| 6781 | .target_set = TargetSet.initOne(.ppc) | ||
| 6782 | |||
| 6783 | __builtin_ppc_lwarx | ||
| 6784 | .param_str = "iiD*" | ||
| 6785 | .target_set = TargetSet.initOne(.ppc) | ||
| 6786 | |||
| 6787 | __builtin_ppc_lwsync | ||
| 6788 | .param_str = "v" | ||
| 6789 | .target_set = TargetSet.initOne(.ppc) | ||
| 6790 | |||
| 6791 | __builtin_ppc_maxfe | ||
| 6792 | .param_str = "LdLdLdLd." | ||
| 6793 | .target_set = TargetSet.initOne(.ppc) | ||
| 6794 | .attributes = .{ .custom_typecheck = true } | ||
| 6795 | |||
| 6796 | __builtin_ppc_maxfl | ||
| 6797 | .param_str = "dddd." | ||
| 6798 | .target_set = TargetSet.initOne(.ppc) | ||
| 6799 | .attributes = .{ .custom_typecheck = true } | ||
| 6800 | |||
| 6801 | __builtin_ppc_maxfs | ||
| 6802 | .param_str = "ffff." | ||
| 6803 | .target_set = TargetSet.initOne(.ppc) | ||
| 6804 | .attributes = .{ .custom_typecheck = true } | ||
| 6805 | |||
| 6806 | __builtin_ppc_mfmsr | ||
| 6807 | .param_str = "Ui" | ||
| 6808 | .target_set = TargetSet.initOne(.ppc) | ||
| 6809 | |||
| 6810 | __builtin_ppc_mfspr | ||
| 6811 | .param_str = "ULiIi" | ||
| 6812 | .target_set = TargetSet.initOne(.ppc) | ||
| 6813 | |||
| 6814 | __builtin_ppc_mftbu | ||
| 6815 | .param_str = "Ui" | ||
| 6816 | .target_set = TargetSet.initOne(.ppc) | ||
| 6817 | |||
| 6818 | __builtin_ppc_minfe | ||
| 6819 | .param_str = "LdLdLdLd." | ||
| 6820 | .target_set = TargetSet.initOne(.ppc) | ||
| 6821 | .attributes = .{ .custom_typecheck = true } | ||
| 6822 | |||
| 6823 | __builtin_ppc_minfl | ||
| 6824 | .param_str = "dddd." | ||
| 6825 | .target_set = TargetSet.initOne(.ppc) | ||
| 6826 | .attributes = .{ .custom_typecheck = true } | ||
| 6827 | |||
| 6828 | __builtin_ppc_minfs | ||
| 6829 | .param_str = "ffff." | ||
| 6830 | .target_set = TargetSet.initOne(.ppc) | ||
| 6831 | .attributes = .{ .custom_typecheck = true } | ||
| 6832 | |||
| 6833 | __builtin_ppc_mtfsb0 | ||
| 6834 | .param_str = "vUIi" | ||
| 6835 | .target_set = TargetSet.initOne(.ppc) | ||
| 6836 | |||
| 6837 | __builtin_ppc_mtfsb1 | ||
| 6838 | .param_str = "vUIi" | ||
| 6839 | .target_set = TargetSet.initOne(.ppc) | ||
| 6840 | |||
| 6841 | __builtin_ppc_mtfsf | ||
| 6842 | .param_str = "vUIiUi" | ||
| 6843 | .target_set = TargetSet.initOne(.ppc) | ||
| 6844 | |||
| 6845 | __builtin_ppc_mtfsfi | ||
| 6846 | .param_str = "vUIiUIi" | ||
| 6847 | .target_set = TargetSet.initOne(.ppc) | ||
| 6848 | |||
| 6849 | __builtin_ppc_mtmsr | ||
| 6850 | .param_str = "vUi" | ||
| 6851 | .target_set = TargetSet.initOne(.ppc) | ||
| 6852 | |||
| 6853 | __builtin_ppc_mtspr | ||
| 6854 | .param_str = "vIiULi" | ||
| 6855 | .target_set = TargetSet.initOne(.ppc) | ||
| 6856 | |||
| 6857 | __builtin_ppc_mulhd | ||
| 6858 | .param_str = "LLiLiLi" | ||
| 6859 | .target_set = TargetSet.initOne(.ppc) | ||
| 6860 | |||
| 6861 | __builtin_ppc_mulhdu | ||
| 6862 | .param_str = "ULLiULiULi" | ||
| 6863 | .target_set = TargetSet.initOne(.ppc) | ||
| 6864 | |||
| 6865 | __builtin_ppc_mulhw | ||
| 6866 | .param_str = "iii" | ||
| 6867 | .target_set = TargetSet.initOne(.ppc) | ||
| 6868 | |||
| 6869 | __builtin_ppc_mulhwu | ||
| 6870 | .param_str = "UiUiUi" | ||
| 6871 | .target_set = TargetSet.initOne(.ppc) | ||
| 6872 | |||
| 6873 | __builtin_ppc_popcntb | ||
| 6874 | .param_str = "ULiULi" | ||
| 6875 | .target_set = TargetSet.initOne(.ppc) | ||
| 6876 | |||
| 6877 | __builtin_ppc_poppar4 | ||
| 6878 | .param_str = "iUi" | ||
| 6879 | .target_set = TargetSet.initOne(.ppc) | ||
| 6880 | |||
| 6881 | __builtin_ppc_poppar8 | ||
| 6882 | .param_str = "iULLi" | ||
| 6883 | .target_set = TargetSet.initOne(.ppc) | ||
| 6884 | |||
| 6885 | __builtin_ppc_rdlam | ||
| 6886 | .param_str = "UWiUWiUWiUWIi" | ||
| 6887 | .target_set = TargetSet.initOne(.ppc) | ||
| 6888 | .attributes = .{ .@"const" = true } | ||
| 6889 | |||
| 6890 | __builtin_ppc_recipdivd | ||
| 6891 | .param_str = "V2dV2dV2d" | ||
| 6892 | .target_set = TargetSet.initOne(.ppc) | ||
| 6893 | |||
| 6894 | __builtin_ppc_recipdivf | ||
| 6895 | .param_str = "V4fV4fV4f" | ||
| 6896 | .target_set = TargetSet.initOne(.ppc) | ||
| 6897 | |||
| 6898 | __builtin_ppc_rldimi | ||
| 6899 | .param_str = "ULLiULLiULLiIUiIULLi" | ||
| 6900 | .target_set = TargetSet.initOne(.ppc) | ||
| 6901 | |||
| 6902 | __builtin_ppc_rlwimi | ||
| 6903 | .param_str = "UiUiUiIUiIUi" | ||
| 6904 | .target_set = TargetSet.initOne(.ppc) | ||
| 6905 | |||
| 6906 | __builtin_ppc_rlwnm | ||
| 6907 | .param_str = "UiUiUiIUi" | ||
| 6908 | .target_set = TargetSet.initOne(.ppc) | ||
| 6909 | |||
| 6910 | __builtin_ppc_rsqrtd | ||
| 6911 | .param_str = "V2dV2d" | ||
| 6912 | .target_set = TargetSet.initOne(.ppc) | ||
| 6913 | |||
| 6914 | __builtin_ppc_rsqrtf | ||
| 6915 | .param_str = "V4fV4f" | ||
| 6916 | .target_set = TargetSet.initOne(.ppc) | ||
| 6917 | |||
| 6918 | __builtin_ppc_stdcx | ||
| 6919 | .param_str = "iLiD*Li" | ||
| 6920 | .target_set = TargetSet.initOne(.ppc) | ||
| 6921 | |||
| 6922 | __builtin_ppc_stfiw | ||
| 6923 | .param_str = "viC*d" | ||
| 6924 | .target_set = TargetSet.initOne(.ppc) | ||
| 6925 | |||
| 6926 | __builtin_ppc_store2r | ||
| 6927 | .param_str = "vUiUs*" | ||
| 6928 | .target_set = TargetSet.initOne(.ppc) | ||
| 6929 | |||
| 6930 | __builtin_ppc_store4r | ||
| 6931 | .param_str = "vUiUi*" | ||
| 6932 | .target_set = TargetSet.initOne(.ppc) | ||
| 6933 | |||
| 6934 | __builtin_ppc_stwcx | ||
| 6935 | .param_str = "iiD*i" | ||
| 6936 | .target_set = TargetSet.initOne(.ppc) | ||
| 6937 | |||
| 6938 | __builtin_ppc_swdiv | ||
| 6939 | .param_str = "ddd" | ||
| 6940 | .target_set = TargetSet.initOne(.ppc) | ||
| 6941 | |||
| 6942 | __builtin_ppc_swdiv_nochk | ||
| 6943 | .param_str = "ddd" | ||
| 6944 | .target_set = TargetSet.initOne(.ppc) | ||
| 6945 | |||
| 6946 | __builtin_ppc_swdivs | ||
| 6947 | .param_str = "fff" | ||
| 6948 | .target_set = TargetSet.initOne(.ppc) | ||
| 6949 | |||
| 6950 | __builtin_ppc_swdivs_nochk | ||
| 6951 | .param_str = "fff" | ||
| 6952 | .target_set = TargetSet.initOne(.ppc) | ||
| 6953 | |||
| 6954 | __builtin_ppc_sync | ||
| 6955 | .param_str = "v" | ||
| 6956 | .target_set = TargetSet.initOne(.ppc) | ||
| 6957 | |||
| 6958 | __builtin_ppc_tdw | ||
| 6959 | .param_str = "vLLiLLiIUi" | ||
| 6960 | .target_set = TargetSet.initOne(.ppc) | ||
| 6961 | |||
| 6962 | __builtin_ppc_trap | ||
| 6963 | .param_str = "vi" | ||
| 6964 | .target_set = TargetSet.initOne(.ppc) | ||
| 6965 | |||
| 6966 | __builtin_ppc_trapd | ||
| 6967 | .param_str = "vLi" | ||
| 6968 | .target_set = TargetSet.initOne(.ppc) | ||
| 6969 | |||
| 6970 | __builtin_ppc_tw | ||
| 6971 | .param_str = "viiIUi" | ||
| 6972 | .target_set = TargetSet.initOne(.ppc) | ||
| 6973 | |||
| 6974 | __builtin_prefetch | ||
| 6975 | .param_str = "vvC*." | ||
| 6976 | .attributes = .{ .@"const" = true } | ||
| 6977 | |||
| 6978 | __builtin_preserve_access_index | ||
| 6979 | .param_str = "v." | ||
| 6980 | .attributes = .{ .custom_typecheck = true } | ||
| 6981 | |||
| 6982 | __builtin_printf | ||
| 6983 | .param_str = "icC*R." | ||
| 6984 | .attributes = .{ .lib_function_with_builtin_prefix = true, .format_kind = .printf } | ||
| 6985 | |||
| 6986 | __builtin_ptx_get_image_channel_data_typei_ | ||
| 6987 | .param_str = "ii" | ||
| 6988 | .target_set = TargetSet.initOne(.nvptx) | ||
| 6989 | |||
| 6990 | __builtin_ptx_get_image_channel_orderi_ | ||
| 6991 | .param_str = "ii" | ||
| 6992 | .target_set = TargetSet.initOne(.nvptx) | ||
| 6993 | |||
| 6994 | __builtin_ptx_get_image_depthi_ | ||
| 6995 | .param_str = "ii" | ||
| 6996 | .target_set = TargetSet.initOne(.nvptx) | ||
| 6997 | |||
| 6998 | __builtin_ptx_get_image_heighti_ | ||
| 6999 | .param_str = "ii" | ||
| 7000 | .target_set = TargetSet.initOne(.nvptx) | ||
| 7001 | |||
| 7002 | __builtin_ptx_get_image_widthi_ | ||
| 7003 | .param_str = "ii" | ||
| 7004 | .target_set = TargetSet.initOne(.nvptx) | ||
| 7005 | |||
| 7006 | __builtin_ptx_read_image2Dff_ | ||
| 7007 | .param_str = "V4fiiff" | ||
| 7008 | .target_set = TargetSet.initOne(.nvptx) | ||
| 7009 | |||
| 7010 | __builtin_ptx_read_image2Dfi_ | ||
| 7011 | .param_str = "V4fiiii" | ||
| 7012 | .target_set = TargetSet.initOne(.nvptx) | ||
| 7013 | |||
| 7014 | __builtin_ptx_read_image2Dif_ | ||
| 7015 | .param_str = "V4iiiff" | ||
| 7016 | .target_set = TargetSet.initOne(.nvptx) | ||
| 7017 | |||
| 7018 | __builtin_ptx_read_image2Dii_ | ||
| 7019 | .param_str = "V4iiiii" | ||
| 7020 | .target_set = TargetSet.initOne(.nvptx) | ||
| 7021 | |||
| 7022 | __builtin_ptx_read_image3Dff_ | ||
| 7023 | .param_str = "V4fiiffff" | ||
| 7024 | .target_set = TargetSet.initOne(.nvptx) | ||
| 7025 | |||
| 7026 | __builtin_ptx_read_image3Dfi_ | ||
| 7027 | .param_str = "V4fiiiiii" | ||
| 7028 | .target_set = TargetSet.initOne(.nvptx) | ||
| 7029 | |||
| 7030 | __builtin_ptx_read_image3Dif_ | ||
| 7031 | .param_str = "V4iiiffff" | ||
| 7032 | .target_set = TargetSet.initOne(.nvptx) | ||
| 7033 | |||
| 7034 | __builtin_ptx_read_image3Dii_ | ||
| 7035 | .param_str = "V4iiiiiii" | ||
| 7036 | .target_set = TargetSet.initOne(.nvptx) | ||
| 7037 | |||
| 7038 | __builtin_ptx_write_image2Df_ | ||
| 7039 | .param_str = "viiiffff" | ||
| 7040 | .target_set = TargetSet.initOne(.nvptx) | ||
| 7041 | |||
| 7042 | __builtin_ptx_write_image2Di_ | ||
| 7043 | .param_str = "viiiiiii" | ||
| 7044 | .target_set = TargetSet.initOne(.nvptx) | ||
| 7045 | |||
| 7046 | __builtin_ptx_write_image2Dui_ | ||
| 7047 | .param_str = "viiiUiUiUiUi" | ||
| 7048 | .target_set = TargetSet.initOne(.nvptx) | ||
| 7049 | |||
| 7050 | __builtin_r600_implicitarg_ptr | ||
| 7051 | .param_str = "Uc*7" | ||
| 7052 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 7053 | .attributes = .{ .@"const" = true } | ||
| 7054 | |||
| 7055 | __builtin_r600_read_tgid_x | ||
| 7056 | .param_str = "Ui" | ||
| 7057 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 7058 | .attributes = .{ .@"const" = true } | ||
| 7059 | |||
| 7060 | __builtin_r600_read_tgid_y | ||
| 7061 | .param_str = "Ui" | ||
| 7062 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 7063 | .attributes = .{ .@"const" = true } | ||
| 7064 | |||
| 7065 | __builtin_r600_read_tgid_z | ||
| 7066 | .param_str = "Ui" | ||
| 7067 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 7068 | .attributes = .{ .@"const" = true } | ||
| 7069 | |||
| 7070 | __builtin_r600_read_tidig_x | ||
| 7071 | .param_str = "Ui" | ||
| 7072 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 7073 | .attributes = .{ .@"const" = true } | ||
| 7074 | |||
| 7075 | __builtin_r600_read_tidig_y | ||
| 7076 | .param_str = "Ui" | ||
| 7077 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 7078 | .attributes = .{ .@"const" = true } | ||
| 7079 | |||
| 7080 | __builtin_r600_read_tidig_z | ||
| 7081 | .param_str = "Ui" | ||
| 7082 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 7083 | .attributes = .{ .@"const" = true } | ||
| 7084 | |||
| 7085 | __builtin_r600_recipsqrt_ieee | ||
| 7086 | .param_str = "dd" | ||
| 7087 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 7088 | .attributes = .{ .@"const" = true } | ||
| 7089 | |||
| 7090 | __builtin_r600_recipsqrt_ieeef | ||
| 7091 | .param_str = "ff" | ||
| 7092 | .target_set = TargetSet.initOne(.amdgpu) | ||
| 7093 | .attributes = .{ .@"const" = true } | ||
| 7094 | |||
| 7095 | __builtin_readcyclecounter | ||
| 7096 | .param_str = "ULLi" | ||
| 7097 | |||
| 7098 | __builtin_readflm | ||
| 7099 | .param_str = "d" | ||
| 7100 | .target_set = TargetSet.initOne(.ppc) | ||
| 7101 | |||
| 7102 | __builtin_realloc | ||
| 7103 | .param_str = "v*v*z" | ||
| 7104 | .attributes = .{ .lib_function_with_builtin_prefix = true } | ||
| 7105 | |||
| 7106 | __builtin_reduce_add | ||
| 7107 | .param_str = "v." | ||
| 7108 | .attributes = .{ .@"const" = true, .custom_typecheck = true } | ||
| 7109 | |||
| 7110 | __builtin_reduce_and | ||
| 7111 | .param_str = "v." | ||
| 7112 | .attributes = .{ .@"const" = true, .custom_typecheck = true } | ||
| 7113 | |||
| 7114 | __builtin_reduce_max | ||
| 7115 | .param_str = "v." | ||
| 7116 | .attributes = .{ .@"const" = true, .custom_typecheck = true } | ||
| 7117 | |||
| 7118 | __builtin_reduce_min | ||
| 7119 | .param_str = "v." | ||
| 7120 | .attributes = .{ .@"const" = true, .custom_typecheck = true } | ||
| 7121 | |||
| 7122 | __builtin_reduce_mul | ||
| 7123 | .param_str = "v." | ||
| 7124 | .attributes = .{ .@"const" = true, .custom_typecheck = true } | ||
| 7125 | |||
| 7126 | __builtin_reduce_or | ||
| 7127 | .param_str = "v." | ||
| 7128 | .attributes = .{ .@"const" = true, .custom_typecheck = true } | ||
| 7129 | |||
| 7130 | __builtin_reduce_xor | ||
| 7131 | .param_str = "v." | ||
| 7132 | .attributes = .{ .@"const" = true, .custom_typecheck = true } | ||
| 7133 | |||
| 7134 | __builtin_remainder | ||
| 7135 | .param_str = "ddd" | ||
| 7136 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 7137 | |||
| 7138 | __builtin_remainderf | ||
| 7139 | .param_str = "fff" | ||
| 7140 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 7141 | |||
| 7142 | __builtin_remainderf128 | ||
| 7143 | .param_str = "LLdLLdLLd" | ||
| 7144 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 7145 | |||
| 7146 | __builtin_remainderl | ||
| 7147 | .param_str = "LdLdLd" | ||
| 7148 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 7149 | |||
| 7150 | __builtin_remquo | ||
| 7151 | .param_str = "dddi*" | ||
| 7152 | .attributes = .{ .lib_function_with_builtin_prefix = true } | ||
| 7153 | |||
| 7154 | __builtin_remquof | ||
| 7155 | .param_str = "fffi*" | ||
| 7156 | .attributes = .{ .lib_function_with_builtin_prefix = true } | ||
| 7157 | |||
| 7158 | __builtin_remquof128 | ||
| 7159 | .param_str = "LLdLLdLLdi*" | ||
| 7160 | .attributes = .{ .lib_function_with_builtin_prefix = true } | ||
| 7161 | |||
| 7162 | __builtin_remquol | ||
| 7163 | .param_str = "LdLdLdi*" | ||
| 7164 | .attributes = .{ .lib_function_with_builtin_prefix = true } | ||
| 7165 | |||
| 7166 | __builtin_return_address | ||
| 7167 | .param_str = "v*IUi" | ||
| 7168 | |||
| 7169 | __builtin_rindex | ||
| 7170 | .param_str = "c*cC*i" | ||
| 7171 | .attributes = .{ .lib_function_with_builtin_prefix = true } | ||
| 7172 | |||
| 7173 | __builtin_rint | ||
| 7174 | .param_str = "dd" | ||
| 7175 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } | ||
| 7176 | |||
| 7177 | __builtin_rintf | ||
| 7178 | .param_str = "ff" | ||
| 7179 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } | ||
| 7180 | |||
| 7181 | __builtin_rintf128 | ||
| 7182 | .param_str = "LLdLLd" | ||
| 7183 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } | ||
| 7184 | |||
| 7185 | __builtin_rintf16 | ||
| 7186 | .param_str = "hh" | ||
| 7187 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } | ||
| 7188 | |||
| 7189 | __builtin_rintl | ||
| 7190 | .param_str = "LdLd" | ||
| 7191 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } | ||
| 7192 | |||
| 7193 | __builtin_rotateleft16 | ||
| 7194 | .param_str = "UsUsUs" | ||
| 7195 | .attributes = .{ .@"const" = true, .const_evaluable = true } | ||
| 7196 | |||
| 7197 | __builtin_rotateleft32 | ||
| 7198 | .param_str = "UZiUZiUZi" | ||
| 7199 | .attributes = .{ .@"const" = true, .const_evaluable = true } | ||
| 7200 | |||
| 7201 | __builtin_rotateleft64 | ||
| 7202 | .param_str = "UWiUWiUWi" | ||
| 7203 | .attributes = .{ .@"const" = true, .const_evaluable = true } | ||
| 7204 | |||
| 7205 | __builtin_rotateleft8 | ||
| 7206 | .param_str = "UcUcUc" | ||
| 7207 | .attributes = .{ .@"const" = true, .const_evaluable = true } | ||
| 7208 | |||
| 7209 | __builtin_rotateright16 | ||
| 7210 | .param_str = "UsUsUs" | ||
| 7211 | .attributes = .{ .@"const" = true, .const_evaluable = true } | ||
| 7212 | |||
| 7213 | __builtin_rotateright32 | ||
| 7214 | .param_str = "UZiUZiUZi" | ||
| 7215 | .attributes = .{ .@"const" = true, .const_evaluable = true } | ||
| 7216 | |||
| 7217 | __builtin_rotateright64 | ||
| 7218 | .param_str = "UWiUWiUWi" | ||
| 7219 | .attributes = .{ .@"const" = true, .const_evaluable = true } | ||
| 7220 | |||
| 7221 | __builtin_rotateright8 | ||
| 7222 | .param_str = "UcUcUc" | ||
| 7223 | .attributes = .{ .@"const" = true, .const_evaluable = true } | ||
| 7224 | |||
| 7225 | __builtin_round | ||
| 7226 | .param_str = "dd" | ||
| 7227 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } | ||
| 7228 | |||
| 7229 | __builtin_roundeven | ||
| 7230 | .param_str = "dd" | ||
| 7231 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } | ||
| 7232 | |||
| 7233 | __builtin_roundevenf | ||
| 7234 | .param_str = "ff" | ||
| 7235 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } | ||
| 7236 | |||
| 7237 | __builtin_roundevenf128 | ||
| 7238 | .param_str = "LLdLLd" | ||
| 7239 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } | ||
| 7240 | |||
| 7241 | __builtin_roundevenf16 | ||
| 7242 | .param_str = "hh" | ||
| 7243 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } | ||
| 7244 | |||
| 7245 | __builtin_roundevenl | ||
| 7246 | .param_str = "LdLd" | ||
| 7247 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } | ||
| 7248 | |||
| 7249 | __builtin_roundf | ||
| 7250 | .param_str = "ff" | ||
| 7251 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } | ||
| 7252 | |||
| 7253 | __builtin_roundf128 | ||
| 7254 | .param_str = "LLdLLd" | ||
| 7255 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } | ||
| 7256 | |||
| 7257 | __builtin_roundf16 | ||
| 7258 | .param_str = "hh" | ||
| 7259 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } | ||
| 7260 | |||
| 7261 | __builtin_roundl | ||
| 7262 | .param_str = "LdLd" | ||
| 7263 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } | ||
| 7264 | |||
| 7265 | __builtin_sadd_overflow | ||
| 7266 | .param_str = "bSiCSiCSi*" | ||
| 7267 | .attributes = .{ .const_evaluable = true } | ||
| 7268 | |||
| 7269 | __builtin_saddl_overflow | ||
| 7270 | .param_str = "bSLiCSLiCSLi*" | ||
| 7271 | .attributes = .{ .const_evaluable = true } | ||
| 7272 | |||
| 7273 | __builtin_saddll_overflow | ||
| 7274 | .param_str = "bSLLiCSLLiCSLLi*" | ||
| 7275 | .attributes = .{ .const_evaluable = true } | ||
| 7276 | |||
| 7277 | __builtin_scalbln | ||
| 7278 | .param_str = "ddLi" | ||
| 7279 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 7280 | |||
| 7281 | __builtin_scalblnf | ||
| 7282 | .param_str = "ffLi" | ||
| 7283 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 7284 | |||
| 7285 | __builtin_scalblnf128 | ||
| 7286 | .param_str = "LLdLLdLi" | ||
| 7287 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 7288 | |||
| 7289 | __builtin_scalblnl | ||
| 7290 | .param_str = "LdLdLi" | ||
| 7291 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 7292 | |||
| 7293 | __builtin_scalbn | ||
| 7294 | .param_str = "ddi" | ||
| 7295 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 7296 | |||
| 7297 | __builtin_scalbnf | ||
| 7298 | .param_str = "ffi" | ||
| 7299 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 7300 | |||
| 7301 | __builtin_scalbnf128 | ||
| 7302 | .param_str = "LLdLLdi" | ||
| 7303 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 7304 | |||
| 7305 | __builtin_scalbnl | ||
| 7306 | .param_str = "LdLdi" | ||
| 7307 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 7308 | |||
| 7309 | __builtin_scanf | ||
| 7310 | .param_str = "icC*R." | ||
| 7311 | .attributes = .{ .lib_function_with_builtin_prefix = true, .format_kind = .scanf } | ||
| 7312 | |||
| 7313 | __builtin_set_flt_rounds | ||
| 7314 | .param_str = "vi" | ||
| 7315 | |||
| 7316 | __builtin_setflm | ||
| 7317 | .param_str = "dd" | ||
| 7318 | .target_set = TargetSet.initOne(.ppc) | ||
| 7319 | |||
| 7320 | __builtin_setjmp | ||
| 7321 | .param_str = "iv**" | ||
| 7322 | .attributes = .{ .returns_twice = true } | ||
| 7323 | |||
| 7324 | __builtin_setps | ||
| 7325 | .param_str = "vUiUi" | ||
| 7326 | .target_set = TargetSet.initOne(.xcore) | ||
| 7327 | |||
| 7328 | __builtin_setrnd | ||
| 7329 | .param_str = "di" | ||
| 7330 | .target_set = TargetSet.initOne(.ppc) | ||
| 7331 | |||
| 7332 | __builtin_shufflevector | ||
| 7333 | .param_str = "v." | ||
| 7334 | .attributes = .{ .@"const" = true, .custom_typecheck = true } | ||
| 7335 | |||
| 7336 | __builtin_signbit | ||
| 7337 | .param_str = "i." | ||
| 7338 | .attributes = .{ .@"const" = true, .custom_typecheck = true, .lib_function_with_builtin_prefix = true } | ||
| 7339 | |||
| 7340 | __builtin_signbitf | ||
| 7341 | .param_str = "if" | ||
| 7342 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } | ||
| 7343 | |||
| 7344 | __builtin_signbitl | ||
| 7345 | .param_str = "iLd" | ||
| 7346 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } | ||
| 7347 | |||
| 7348 | __builtin_sin | ||
| 7349 | .param_str = "dd" | ||
| 7350 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 7351 | |||
| 7352 | __builtin_sinf | ||
| 7353 | .param_str = "ff" | ||
| 7354 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 7355 | |||
| 7356 | __builtin_sinf128 | ||
| 7357 | .param_str = "LLdLLd" | ||
| 7358 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 7359 | |||
| 7360 | __builtin_sinf16 | ||
| 7361 | .param_str = "hh" | ||
| 7362 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 7363 | |||
| 7364 | __builtin_sinh | ||
| 7365 | .param_str = "dd" | ||
| 7366 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 7367 | |||
| 7368 | __builtin_sinhf | ||
| 7369 | .param_str = "ff" | ||
| 7370 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 7371 | |||
| 7372 | __builtin_sinhf128 | ||
| 7373 | .param_str = "LLdLLd" | ||
| 7374 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 7375 | |||
| 7376 | __builtin_sinhl | ||
| 7377 | .param_str = "LdLd" | ||
| 7378 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 7379 | |||
| 7380 | __builtin_sinl | ||
| 7381 | .param_str = "LdLd" | ||
| 7382 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 7383 | |||
| 7384 | __builtin_smul_overflow | ||
| 7385 | .param_str = "bSiCSiCSi*" | ||
| 7386 | .attributes = .{ .const_evaluable = true } | ||
| 7387 | |||
| 7388 | __builtin_smull_overflow | ||
| 7389 | .param_str = "bSLiCSLiCSLi*" | ||
| 7390 | .attributes = .{ .const_evaluable = true } | ||
| 7391 | |||
| 7392 | __builtin_smulll_overflow | ||
| 7393 | .param_str = "bSLLiCSLLiCSLLi*" | ||
| 7394 | .attributes = .{ .const_evaluable = true } | ||
| 7395 | |||
| 7396 | __builtin_snprintf | ||
| 7397 | .param_str = "ic*RzcC*R." | ||
| 7398 | .attributes = .{ .lib_function_with_builtin_prefix = true, .format_kind = .printf, .format_string_position = 2 } | ||
| 7399 | |||
| 7400 | __builtin_sponentry | ||
| 7401 | .param_str = "v*" | ||
| 7402 | .target_set = TargetSet.initMany(&.{ .aarch64, .arm }) | ||
| 7403 | .attributes = .{ .@"const" = true } | ||
| 7404 | |||
| 7405 | __builtin_sprintf | ||
| 7406 | .param_str = "ic*RcC*R." | ||
| 7407 | .attributes = .{ .lib_function_with_builtin_prefix = true, .format_kind = .printf, .format_string_position = 1 } | ||
| 7408 | |||
| 7409 | __builtin_sqrt | ||
| 7410 | .param_str = "dd" | ||
| 7411 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 7412 | |||
| 7413 | __builtin_sqrtf | ||
| 7414 | .param_str = "ff" | ||
| 7415 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 7416 | |||
| 7417 | __builtin_sqrtf128 | ||
| 7418 | .param_str = "LLdLLd" | ||
| 7419 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 7420 | |||
| 7421 | __builtin_sqrtf16 | ||
| 7422 | .param_str = "hh" | ||
| 7423 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 7424 | |||
| 7425 | __builtin_sqrtl | ||
| 7426 | .param_str = "LdLd" | ||
| 7427 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 7428 | |||
| 7429 | __builtin_sscanf | ||
| 7430 | .param_str = "icC*RcC*R." | ||
| 7431 | .attributes = .{ .lib_function_with_builtin_prefix = true, .format_kind = .scanf, .format_string_position = 1 } | ||
| 7432 | |||
| 7433 | __builtin_ssub_overflow | ||
| 7434 | .param_str = "bSiCSiCSi*" | ||
| 7435 | .attributes = .{ .const_evaluable = true } | ||
| 7436 | |||
| 7437 | __builtin_ssubl_overflow | ||
| 7438 | .param_str = "bSLiCSLiCSLi*" | ||
| 7439 | .attributes = .{ .const_evaluable = true } | ||
| 7440 | |||
| 7441 | __builtin_ssubll_overflow | ||
| 7442 | .param_str = "bSLLiCSLLiCSLLi*" | ||
| 7443 | .attributes = .{ .const_evaluable = true } | ||
| 7444 | |||
| 7445 | __builtin_stdarg_start | ||
| 7446 | .param_str = "vA." | ||
| 7447 | .attributes = .{ .custom_typecheck = true } | ||
| 7448 | |||
| 7449 | __builtin_stpcpy | ||
| 7450 | .param_str = "c*c*cC*" | ||
| 7451 | .attributes = .{ .lib_function_with_builtin_prefix = true } | ||
| 7452 | |||
| 7453 | __builtin_stpncpy | ||
| 7454 | .param_str = "c*c*cC*z" | ||
| 7455 | .attributes = .{ .lib_function_with_builtin_prefix = true } | ||
| 7456 | |||
| 7457 | __builtin_strcasecmp | ||
| 7458 | .param_str = "icC*cC*" | ||
| 7459 | .attributes = .{ .lib_function_with_builtin_prefix = true } | ||
| 7460 | |||
| 7461 | __builtin_strcat | ||
| 7462 | .param_str = "c*c*cC*" | ||
| 7463 | .attributes = .{ .lib_function_with_builtin_prefix = true } | ||
| 7464 | |||
| 7465 | __builtin_strchr | ||
| 7466 | .param_str = "c*cC*i" | ||
| 7467 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_evaluable = true } | ||
| 7468 | |||
| 7469 | __builtin_strcmp | ||
| 7470 | .param_str = "icC*cC*" | ||
| 7471 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_evaluable = true } | ||
| 7472 | |||
| 7473 | __builtin_strcpy | ||
| 7474 | .param_str = "c*c*cC*" | ||
| 7475 | .attributes = .{ .lib_function_with_builtin_prefix = true } | ||
| 7476 | |||
| 7477 | __builtin_strcspn | ||
| 7478 | .param_str = "zcC*cC*" | ||
| 7479 | .attributes = .{ .lib_function_with_builtin_prefix = true } | ||
| 7480 | |||
| 7481 | __builtin_strdup | ||
| 7482 | .param_str = "c*cC*" | ||
| 7483 | .attributes = .{ .lib_function_with_builtin_prefix = true } | ||
| 7484 | |||
| 7485 | __builtin_strlen | ||
| 7486 | .param_str = "zcC*" | ||
| 7487 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_evaluable = true } | ||
| 7488 | |||
| 7489 | __builtin_strncasecmp | ||
| 7490 | .param_str = "icC*cC*z" | ||
| 7491 | .attributes = .{ .lib_function_with_builtin_prefix = true } | ||
| 7492 | |||
| 7493 | __builtin_strncat | ||
| 7494 | .param_str = "c*c*cC*z" | ||
| 7495 | .attributes = .{ .lib_function_with_builtin_prefix = true } | ||
| 7496 | |||
| 7497 | __builtin_strncmp | ||
| 7498 | .param_str = "icC*cC*z" | ||
| 7499 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_evaluable = true } | ||
| 7500 | |||
| 7501 | __builtin_strncpy | ||
| 7502 | .param_str = "c*c*cC*z" | ||
| 7503 | .attributes = .{ .lib_function_with_builtin_prefix = true } | ||
| 7504 | |||
| 7505 | __builtin_strndup | ||
| 7506 | .param_str = "c*cC*z" | ||
| 7507 | .attributes = .{ .lib_function_with_builtin_prefix = true } | ||
| 7508 | |||
| 7509 | __builtin_strpbrk | ||
| 7510 | .param_str = "c*cC*cC*" | ||
| 7511 | .attributes = .{ .lib_function_with_builtin_prefix = true } | ||
| 7512 | |||
| 7513 | __builtin_strrchr | ||
| 7514 | .param_str = "c*cC*i" | ||
| 7515 | .attributes = .{ .lib_function_with_builtin_prefix = true } | ||
| 7516 | |||
| 7517 | __builtin_strspn | ||
| 7518 | .param_str = "zcC*cC*" | ||
| 7519 | .attributes = .{ .lib_function_with_builtin_prefix = true } | ||
| 7520 | |||
| 7521 | __builtin_strstr | ||
| 7522 | .param_str = "c*cC*cC*" | ||
| 7523 | .attributes = .{ .lib_function_with_builtin_prefix = true } | ||
| 7524 | |||
| 7525 | __builtin_sub_overflow | ||
| 7526 | .param_str = "b." | ||
| 7527 | .attributes = .{ .custom_typecheck = true, .const_evaluable = true } | ||
| 7528 | |||
| 7529 | __builtin_subc | ||
| 7530 | .param_str = "UiUiCUiCUiCUi*" | ||
| 7531 | |||
| 7532 | __builtin_subcb | ||
| 7533 | .param_str = "UcUcCUcCUcCUc*" | ||
| 7534 | |||
| 7535 | __builtin_subcl | ||
| 7536 | .param_str = "ULiULiCULiCULiCULi*" | ||
| 7537 | |||
| 7538 | __builtin_subcll | ||
| 7539 | .param_str = "ULLiULLiCULLiCULLiCULLi*" | ||
| 7540 | |||
| 7541 | __builtin_subcs | ||
| 7542 | .param_str = "UsUsCUsCUsCUs*" | ||
| 7543 | |||
| 7544 | __builtin_tan | ||
| 7545 | .param_str = "dd" | ||
| 7546 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 7547 | |||
| 7548 | __builtin_tanf | ||
| 7549 | .param_str = "ff" | ||
| 7550 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 7551 | |||
| 7552 | __builtin_tanf128 | ||
| 7553 | .param_str = "LLdLLd" | ||
| 7554 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 7555 | |||
| 7556 | __builtin_tanh | ||
| 7557 | .param_str = "dd" | ||
| 7558 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 7559 | |||
| 7560 | __builtin_tanhf | ||
| 7561 | .param_str = "ff" | ||
| 7562 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 7563 | |||
| 7564 | __builtin_tanhf128 | ||
| 7565 | .param_str = "LLdLLd" | ||
| 7566 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 7567 | |||
| 7568 | __builtin_tanhl | ||
| 7569 | .param_str = "LdLd" | ||
| 7570 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 7571 | |||
| 7572 | __builtin_tanl | ||
| 7573 | .param_str = "LdLd" | ||
| 7574 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 7575 | |||
| 7576 | __builtin_tgamma | ||
| 7577 | .param_str = "dd" | ||
| 7578 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 7579 | |||
| 7580 | __builtin_tgammaf | ||
| 7581 | .param_str = "ff" | ||
| 7582 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 7583 | |||
| 7584 | __builtin_tgammaf128 | ||
| 7585 | .param_str = "LLdLLd" | ||
| 7586 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 7587 | |||
| 7588 | __builtin_tgammal | ||
| 7589 | .param_str = "LdLd" | ||
| 7590 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 7591 | |||
| 7592 | __builtin_thread_pointer | ||
| 7593 | .param_str = "v*" | ||
| 7594 | .attributes = .{ .@"const" = true } | ||
| 7595 | |||
| 7596 | __builtin_trap | ||
| 7597 | .param_str = "v" | ||
| 7598 | .attributes = .{ .noreturn = true } | ||
| 7599 | |||
| 7600 | __builtin_trunc | ||
| 7601 | .param_str = "dd" | ||
| 7602 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } | ||
| 7603 | |||
| 7604 | __builtin_truncf | ||
| 7605 | .param_str = "ff" | ||
| 7606 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } | ||
| 7607 | |||
| 7608 | __builtin_truncf128 | ||
| 7609 | .param_str = "LLdLLd" | ||
| 7610 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } | ||
| 7611 | |||
| 7612 | __builtin_truncf16 | ||
| 7613 | .param_str = "hh" | ||
| 7614 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } | ||
| 7615 | |||
| 7616 | __builtin_truncl | ||
| 7617 | .param_str = "LdLd" | ||
| 7618 | .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } | ||
| 7619 | |||
| 7620 | __builtin_uadd_overflow | ||
| 7621 | .param_str = "bUiCUiCUi*" | ||
| 7622 | .attributes = .{ .const_evaluable = true } | ||
| 7623 | |||
| 7624 | __builtin_uaddl_overflow | ||
| 7625 | .param_str = "bULiCULiCULi*" | ||
| 7626 | .attributes = .{ .const_evaluable = true } | ||
| 7627 | |||
| 7628 | __builtin_uaddll_overflow | ||
| 7629 | .param_str = "bULLiCULLiCULLi*" | ||
| 7630 | .attributes = .{ .const_evaluable = true } | ||
| 7631 | |||
| 7632 | __builtin_umul_overflow | ||
| 7633 | .param_str = "bUiCUiCUi*" | ||
| 7634 | .attributes = .{ .const_evaluable = true } | ||
| 7635 | |||
| 7636 | __builtin_umull_overflow | ||
| 7637 | .param_str = "bULiCULiCULi*" | ||
| 7638 | .attributes = .{ .const_evaluable = true } | ||
| 7639 | |||
| 7640 | __builtin_umulll_overflow | ||
| 7641 | .param_str = "bULLiCULLiCULLi*" | ||
| 7642 | .attributes = .{ .const_evaluable = true } | ||
| 7643 | |||
| 7644 | __builtin_unpack_longdouble | ||
| 7645 | .param_str = "dLdIi" | ||
| 7646 | .target_set = TargetSet.initOne(.ppc) | ||
| 7647 | |||
| 7648 | __builtin_unpredictable | ||
| 7649 | .param_str = "LiLi" | ||
| 7650 | .attributes = .{ .@"const" = true } | ||
| 7651 | |||
| 7652 | __builtin_unreachable | ||
| 7653 | .param_str = "v" | ||
| 7654 | .attributes = .{ .noreturn = true } | ||
| 7655 | |||
| 7656 | __builtin_unwind_init | ||
| 7657 | .param_str = "v" | ||
| 7658 | |||
| 7659 | __builtin_usub_overflow | ||
| 7660 | .param_str = "bUiCUiCUi*" | ||
| 7661 | .attributes = .{ .const_evaluable = true } | ||
| 7662 | |||
| 7663 | __builtin_usubl_overflow | ||
| 7664 | .param_str = "bULiCULiCULi*" | ||
| 7665 | .attributes = .{ .const_evaluable = true } | ||
| 7666 | |||
| 7667 | __builtin_usubll_overflow | ||
| 7668 | .param_str = "bULLiCULLiCULLi*" | ||
| 7669 | .attributes = .{ .const_evaluable = true } | ||
| 7670 | |||
| 7671 | __builtin_va_copy | ||
| 7672 | .param_str = "vAA" | ||
| 7673 | |||
| 7674 | __builtin_va_end | ||
| 7675 | .param_str = "vA" | ||
| 7676 | |||
| 7677 | __builtin_va_start | ||
| 7678 | .param_str = "vA." | ||
| 7679 | .attributes = .{ .custom_typecheck = true } | ||
| 7680 | |||
| 7681 | __builtin_ve_vl_andm_MMM | ||
| 7682 | .param_str = "V512bV512bV512b" | ||
| 7683 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7684 | |||
| 7685 | __builtin_ve_vl_andm_mmm | ||
| 7686 | .param_str = "V256bV256bV256b" | ||
| 7687 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7688 | |||
| 7689 | __builtin_ve_vl_eqvm_MMM | ||
| 7690 | .param_str = "V512bV512bV512b" | ||
| 7691 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7692 | |||
| 7693 | __builtin_ve_vl_eqvm_mmm | ||
| 7694 | .param_str = "V256bV256bV256b" | ||
| 7695 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7696 | |||
| 7697 | __builtin_ve_vl_extract_vm512l | ||
| 7698 | .param_str = "V256bV512b" | ||
| 7699 | .target_set = TargetSet.initOne(.ve) | ||
| 7700 | |||
| 7701 | __builtin_ve_vl_extract_vm512u | ||
| 7702 | .param_str = "V256bV512b" | ||
| 7703 | .target_set = TargetSet.initOne(.ve) | ||
| 7704 | |||
| 7705 | __builtin_ve_vl_fencec_s | ||
| 7706 | .param_str = "vUi" | ||
| 7707 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7708 | |||
| 7709 | __builtin_ve_vl_fencei | ||
| 7710 | .param_str = "v" | ||
| 7711 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7712 | |||
| 7713 | __builtin_ve_vl_fencem_s | ||
| 7714 | .param_str = "vUi" | ||
| 7715 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7716 | |||
| 7717 | __builtin_ve_vl_fidcr_sss | ||
| 7718 | .param_str = "LUiLUiUi" | ||
| 7719 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7720 | |||
| 7721 | __builtin_ve_vl_insert_vm512l | ||
| 7722 | .param_str = "V512bV512bV256b" | ||
| 7723 | .target_set = TargetSet.initOne(.ve) | ||
| 7724 | |||
| 7725 | __builtin_ve_vl_insert_vm512u | ||
| 7726 | .param_str = "V512bV512bV256b" | ||
| 7727 | .target_set = TargetSet.initOne(.ve) | ||
| 7728 | |||
| 7729 | __builtin_ve_vl_lcr_sss | ||
| 7730 | .param_str = "LUiLUiLUi" | ||
| 7731 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7732 | |||
| 7733 | __builtin_ve_vl_lsv_vvss | ||
| 7734 | .param_str = "V256dV256dUiLUi" | ||
| 7735 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7736 | |||
| 7737 | __builtin_ve_vl_lvm_MMss | ||
| 7738 | .param_str = "V512bV512bLUiLUi" | ||
| 7739 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7740 | |||
| 7741 | __builtin_ve_vl_lvm_mmss | ||
| 7742 | .param_str = "V256bV256bLUiLUi" | ||
| 7743 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7744 | |||
| 7745 | __builtin_ve_vl_lvsd_svs | ||
| 7746 | .param_str = "dV256dUi" | ||
| 7747 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7748 | |||
| 7749 | __builtin_ve_vl_lvsl_svs | ||
| 7750 | .param_str = "LUiV256dUi" | ||
| 7751 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7752 | |||
| 7753 | __builtin_ve_vl_lvss_svs | ||
| 7754 | .param_str = "fV256dUi" | ||
| 7755 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7756 | |||
| 7757 | __builtin_ve_vl_lzvm_sml | ||
| 7758 | .param_str = "LUiV256bUi" | ||
| 7759 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7760 | |||
| 7761 | __builtin_ve_vl_negm_MM | ||
| 7762 | .param_str = "V512bV512b" | ||
| 7763 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7764 | |||
| 7765 | __builtin_ve_vl_negm_mm | ||
| 7766 | .param_str = "V256bV256b" | ||
| 7767 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7768 | |||
| 7769 | __builtin_ve_vl_nndm_MMM | ||
| 7770 | .param_str = "V512bV512bV512b" | ||
| 7771 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7772 | |||
| 7773 | __builtin_ve_vl_nndm_mmm | ||
| 7774 | .param_str = "V256bV256bV256b" | ||
| 7775 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7776 | |||
| 7777 | __builtin_ve_vl_orm_MMM | ||
| 7778 | .param_str = "V512bV512bV512b" | ||
| 7779 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7780 | |||
| 7781 | __builtin_ve_vl_orm_mmm | ||
| 7782 | .param_str = "V256bV256bV256b" | ||
| 7783 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7784 | |||
| 7785 | __builtin_ve_vl_pack_f32a | ||
| 7786 | .param_str = "ULifC*" | ||
| 7787 | .target_set = TargetSet.initOne(.ve) | ||
| 7788 | |||
| 7789 | __builtin_ve_vl_pack_f32p | ||
| 7790 | .param_str = "ULifC*fC*" | ||
| 7791 | .target_set = TargetSet.initOne(.ve) | ||
| 7792 | |||
| 7793 | __builtin_ve_vl_pcvm_sml | ||
| 7794 | .param_str = "LUiV256bUi" | ||
| 7795 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7796 | |||
| 7797 | __builtin_ve_vl_pfchv_ssl | ||
| 7798 | .param_str = "vLivC*Ui" | ||
| 7799 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7800 | |||
| 7801 | __builtin_ve_vl_pfchvnc_ssl | ||
| 7802 | .param_str = "vLivC*Ui" | ||
| 7803 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7804 | |||
| 7805 | __builtin_ve_vl_pvadds_vsvMvl | ||
| 7806 | .param_str = "V256dLUiV256dV512bV256dUi" | ||
| 7807 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7808 | |||
| 7809 | __builtin_ve_vl_pvadds_vsvl | ||
| 7810 | .param_str = "V256dLUiV256dUi" | ||
| 7811 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7812 | |||
| 7813 | __builtin_ve_vl_pvadds_vsvvl | ||
| 7814 | .param_str = "V256dLUiV256dV256dUi" | ||
| 7815 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7816 | |||
| 7817 | __builtin_ve_vl_pvadds_vvvMvl | ||
| 7818 | .param_str = "V256dV256dV256dV512bV256dUi" | ||
| 7819 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7820 | |||
| 7821 | __builtin_ve_vl_pvadds_vvvl | ||
| 7822 | .param_str = "V256dV256dV256dUi" | ||
| 7823 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7824 | |||
| 7825 | __builtin_ve_vl_pvadds_vvvvl | ||
| 7826 | .param_str = "V256dV256dV256dV256dUi" | ||
| 7827 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7828 | |||
| 7829 | __builtin_ve_vl_pvaddu_vsvMvl | ||
| 7830 | .param_str = "V256dLUiV256dV512bV256dUi" | ||
| 7831 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7832 | |||
| 7833 | __builtin_ve_vl_pvaddu_vsvl | ||
| 7834 | .param_str = "V256dLUiV256dUi" | ||
| 7835 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7836 | |||
| 7837 | __builtin_ve_vl_pvaddu_vsvvl | ||
| 7838 | .param_str = "V256dLUiV256dV256dUi" | ||
| 7839 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7840 | |||
| 7841 | __builtin_ve_vl_pvaddu_vvvMvl | ||
| 7842 | .param_str = "V256dV256dV256dV512bV256dUi" | ||
| 7843 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7844 | |||
| 7845 | __builtin_ve_vl_pvaddu_vvvl | ||
| 7846 | .param_str = "V256dV256dV256dUi" | ||
| 7847 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7848 | |||
| 7849 | __builtin_ve_vl_pvaddu_vvvvl | ||
| 7850 | .param_str = "V256dV256dV256dV256dUi" | ||
| 7851 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7852 | |||
| 7853 | __builtin_ve_vl_pvand_vsvMvl | ||
| 7854 | .param_str = "V256dLUiV256dV512bV256dUi" | ||
| 7855 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7856 | |||
| 7857 | __builtin_ve_vl_pvand_vsvl | ||
| 7858 | .param_str = "V256dLUiV256dUi" | ||
| 7859 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7860 | |||
| 7861 | __builtin_ve_vl_pvand_vsvvl | ||
| 7862 | .param_str = "V256dLUiV256dV256dUi" | ||
| 7863 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7864 | |||
| 7865 | __builtin_ve_vl_pvand_vvvMvl | ||
| 7866 | .param_str = "V256dV256dV256dV512bV256dUi" | ||
| 7867 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7868 | |||
| 7869 | __builtin_ve_vl_pvand_vvvl | ||
| 7870 | .param_str = "V256dV256dV256dUi" | ||
| 7871 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7872 | |||
| 7873 | __builtin_ve_vl_pvand_vvvvl | ||
| 7874 | .param_str = "V256dV256dV256dV256dUi" | ||
| 7875 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7876 | |||
| 7877 | __builtin_ve_vl_pvbrd_vsMvl | ||
| 7878 | .param_str = "V256dLUiV512bV256dUi" | ||
| 7879 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7880 | |||
| 7881 | __builtin_ve_vl_pvbrd_vsl | ||
| 7882 | .param_str = "V256dLUiUi" | ||
| 7883 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7884 | |||
| 7885 | __builtin_ve_vl_pvbrd_vsvl | ||
| 7886 | .param_str = "V256dLUiV256dUi" | ||
| 7887 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7888 | |||
| 7889 | __builtin_ve_vl_pvbrv_vvMvl | ||
| 7890 | .param_str = "V256dV256dV512bV256dUi" | ||
| 7891 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7892 | |||
| 7893 | __builtin_ve_vl_pvbrv_vvl | ||
| 7894 | .param_str = "V256dV256dUi" | ||
| 7895 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7896 | |||
| 7897 | __builtin_ve_vl_pvbrv_vvvl | ||
| 7898 | .param_str = "V256dV256dV256dUi" | ||
| 7899 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7900 | |||
| 7901 | __builtin_ve_vl_pvbrvlo_vvl | ||
| 7902 | .param_str = "V256dV256dUi" | ||
| 7903 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7904 | |||
| 7905 | __builtin_ve_vl_pvbrvlo_vvmvl | ||
| 7906 | .param_str = "V256dV256dV256bV256dUi" | ||
| 7907 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7908 | |||
| 7909 | __builtin_ve_vl_pvbrvlo_vvvl | ||
| 7910 | .param_str = "V256dV256dV256dUi" | ||
| 7911 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7912 | |||
| 7913 | __builtin_ve_vl_pvbrvup_vvl | ||
| 7914 | .param_str = "V256dV256dUi" | ||
| 7915 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7916 | |||
| 7917 | __builtin_ve_vl_pvbrvup_vvmvl | ||
| 7918 | .param_str = "V256dV256dV256bV256dUi" | ||
| 7919 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7920 | |||
| 7921 | __builtin_ve_vl_pvbrvup_vvvl | ||
| 7922 | .param_str = "V256dV256dV256dUi" | ||
| 7923 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7924 | |||
| 7925 | __builtin_ve_vl_pvcmps_vsvMvl | ||
| 7926 | .param_str = "V256dLUiV256dV512bV256dUi" | ||
| 7927 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7928 | |||
| 7929 | __builtin_ve_vl_pvcmps_vsvl | ||
| 7930 | .param_str = "V256dLUiV256dUi" | ||
| 7931 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7932 | |||
| 7933 | __builtin_ve_vl_pvcmps_vsvvl | ||
| 7934 | .param_str = "V256dLUiV256dV256dUi" | ||
| 7935 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7936 | |||
| 7937 | __builtin_ve_vl_pvcmps_vvvMvl | ||
| 7938 | .param_str = "V256dV256dV256dV512bV256dUi" | ||
| 7939 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7940 | |||
| 7941 | __builtin_ve_vl_pvcmps_vvvl | ||
| 7942 | .param_str = "V256dV256dV256dUi" | ||
| 7943 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7944 | |||
| 7945 | __builtin_ve_vl_pvcmps_vvvvl | ||
| 7946 | .param_str = "V256dV256dV256dV256dUi" | ||
| 7947 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7948 | |||
| 7949 | __builtin_ve_vl_pvcmpu_vsvMvl | ||
| 7950 | .param_str = "V256dLUiV256dV512bV256dUi" | ||
| 7951 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7952 | |||
| 7953 | __builtin_ve_vl_pvcmpu_vsvl | ||
| 7954 | .param_str = "V256dLUiV256dUi" | ||
| 7955 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7956 | |||
| 7957 | __builtin_ve_vl_pvcmpu_vsvvl | ||
| 7958 | .param_str = "V256dLUiV256dV256dUi" | ||
| 7959 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7960 | |||
| 7961 | __builtin_ve_vl_pvcmpu_vvvMvl | ||
| 7962 | .param_str = "V256dV256dV256dV512bV256dUi" | ||
| 7963 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7964 | |||
| 7965 | __builtin_ve_vl_pvcmpu_vvvl | ||
| 7966 | .param_str = "V256dV256dV256dUi" | ||
| 7967 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7968 | |||
| 7969 | __builtin_ve_vl_pvcmpu_vvvvl | ||
| 7970 | .param_str = "V256dV256dV256dV256dUi" | ||
| 7971 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7972 | |||
| 7973 | __builtin_ve_vl_pvcvtsw_vvl | ||
| 7974 | .param_str = "V256dV256dUi" | ||
| 7975 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7976 | |||
| 7977 | __builtin_ve_vl_pvcvtsw_vvvl | ||
| 7978 | .param_str = "V256dV256dV256dUi" | ||
| 7979 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7980 | |||
| 7981 | __builtin_ve_vl_pvcvtws_vvMvl | ||
| 7982 | .param_str = "V256dV256dV512bV256dUi" | ||
| 7983 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7984 | |||
| 7985 | __builtin_ve_vl_pvcvtws_vvl | ||
| 7986 | .param_str = "V256dV256dUi" | ||
| 7987 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7988 | |||
| 7989 | __builtin_ve_vl_pvcvtws_vvvl | ||
| 7990 | .param_str = "V256dV256dV256dUi" | ||
| 7991 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7992 | |||
| 7993 | __builtin_ve_vl_pvcvtwsrz_vvMvl | ||
| 7994 | .param_str = "V256dV256dV512bV256dUi" | ||
| 7995 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 7996 | |||
| 7997 | __builtin_ve_vl_pvcvtwsrz_vvl | ||
| 7998 | .param_str = "V256dV256dUi" | ||
| 7999 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8000 | |||
| 8001 | __builtin_ve_vl_pvcvtwsrz_vvvl | ||
| 8002 | .param_str = "V256dV256dV256dUi" | ||
| 8003 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8004 | |||
| 8005 | __builtin_ve_vl_pveqv_vsvMvl | ||
| 8006 | .param_str = "V256dLUiV256dV512bV256dUi" | ||
| 8007 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8008 | |||
| 8009 | __builtin_ve_vl_pveqv_vsvl | ||
| 8010 | .param_str = "V256dLUiV256dUi" | ||
| 8011 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8012 | |||
| 8013 | __builtin_ve_vl_pveqv_vsvvl | ||
| 8014 | .param_str = "V256dLUiV256dV256dUi" | ||
| 8015 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8016 | |||
| 8017 | __builtin_ve_vl_pveqv_vvvMvl | ||
| 8018 | .param_str = "V256dV256dV256dV512bV256dUi" | ||
| 8019 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8020 | |||
| 8021 | __builtin_ve_vl_pveqv_vvvl | ||
| 8022 | .param_str = "V256dV256dV256dUi" | ||
| 8023 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8024 | |||
| 8025 | __builtin_ve_vl_pveqv_vvvvl | ||
| 8026 | .param_str = "V256dV256dV256dV256dUi" | ||
| 8027 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8028 | |||
| 8029 | __builtin_ve_vl_pvfadd_vsvMvl | ||
| 8030 | .param_str = "V256dLUiV256dV512bV256dUi" | ||
| 8031 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8032 | |||
| 8033 | __builtin_ve_vl_pvfadd_vsvl | ||
| 8034 | .param_str = "V256dLUiV256dUi" | ||
| 8035 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8036 | |||
| 8037 | __builtin_ve_vl_pvfadd_vsvvl | ||
| 8038 | .param_str = "V256dLUiV256dV256dUi" | ||
| 8039 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8040 | |||
| 8041 | __builtin_ve_vl_pvfadd_vvvMvl | ||
| 8042 | .param_str = "V256dV256dV256dV512bV256dUi" | ||
| 8043 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8044 | |||
| 8045 | __builtin_ve_vl_pvfadd_vvvl | ||
| 8046 | .param_str = "V256dV256dV256dUi" | ||
| 8047 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8048 | |||
| 8049 | __builtin_ve_vl_pvfadd_vvvvl | ||
| 8050 | .param_str = "V256dV256dV256dV256dUi" | ||
| 8051 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8052 | |||
| 8053 | __builtin_ve_vl_pvfcmp_vsvMvl | ||
| 8054 | .param_str = "V256dLUiV256dV512bV256dUi" | ||
| 8055 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8056 | |||
| 8057 | __builtin_ve_vl_pvfcmp_vsvl | ||
| 8058 | .param_str = "V256dLUiV256dUi" | ||
| 8059 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8060 | |||
| 8061 | __builtin_ve_vl_pvfcmp_vsvvl | ||
| 8062 | .param_str = "V256dLUiV256dV256dUi" | ||
| 8063 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8064 | |||
| 8065 | __builtin_ve_vl_pvfcmp_vvvMvl | ||
| 8066 | .param_str = "V256dV256dV256dV512bV256dUi" | ||
| 8067 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8068 | |||
| 8069 | __builtin_ve_vl_pvfcmp_vvvl | ||
| 8070 | .param_str = "V256dV256dV256dUi" | ||
| 8071 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8072 | |||
| 8073 | __builtin_ve_vl_pvfcmp_vvvvl | ||
| 8074 | .param_str = "V256dV256dV256dV256dUi" | ||
| 8075 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8076 | |||
| 8077 | __builtin_ve_vl_pvfmad_vsvvMvl | ||
| 8078 | .param_str = "V256dLUiV256dV256dV512bV256dUi" | ||
| 8079 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8080 | |||
| 8081 | __builtin_ve_vl_pvfmad_vsvvl | ||
| 8082 | .param_str = "V256dLUiV256dV256dUi" | ||
| 8083 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8084 | |||
| 8085 | __builtin_ve_vl_pvfmad_vsvvvl | ||
| 8086 | .param_str = "V256dLUiV256dV256dV256dUi" | ||
| 8087 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8088 | |||
| 8089 | __builtin_ve_vl_pvfmad_vvsvMvl | ||
| 8090 | .param_str = "V256dV256dLUiV256dV512bV256dUi" | ||
| 8091 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8092 | |||
| 8093 | __builtin_ve_vl_pvfmad_vvsvl | ||
| 8094 | .param_str = "V256dV256dLUiV256dUi" | ||
| 8095 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8096 | |||
| 8097 | __builtin_ve_vl_pvfmad_vvsvvl | ||
| 8098 | .param_str = "V256dV256dLUiV256dV256dUi" | ||
| 8099 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8100 | |||
| 8101 | __builtin_ve_vl_pvfmad_vvvvMvl | ||
| 8102 | .param_str = "V256dV256dV256dV256dV512bV256dUi" | ||
| 8103 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8104 | |||
| 8105 | __builtin_ve_vl_pvfmad_vvvvl | ||
| 8106 | .param_str = "V256dV256dV256dV256dUi" | ||
| 8107 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8108 | |||
| 8109 | __builtin_ve_vl_pvfmad_vvvvvl | ||
| 8110 | .param_str = "V256dV256dV256dV256dV256dUi" | ||
| 8111 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8112 | |||
| 8113 | __builtin_ve_vl_pvfmax_vsvMvl | ||
| 8114 | .param_str = "V256dLUiV256dV512bV256dUi" | ||
| 8115 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8116 | |||
| 8117 | __builtin_ve_vl_pvfmax_vsvl | ||
| 8118 | .param_str = "V256dLUiV256dUi" | ||
| 8119 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8120 | |||
| 8121 | __builtin_ve_vl_pvfmax_vsvvl | ||
| 8122 | .param_str = "V256dLUiV256dV256dUi" | ||
| 8123 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8124 | |||
| 8125 | __builtin_ve_vl_pvfmax_vvvMvl | ||
| 8126 | .param_str = "V256dV256dV256dV512bV256dUi" | ||
| 8127 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8128 | |||
| 8129 | __builtin_ve_vl_pvfmax_vvvl | ||
| 8130 | .param_str = "V256dV256dV256dUi" | ||
| 8131 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8132 | |||
| 8133 | __builtin_ve_vl_pvfmax_vvvvl | ||
| 8134 | .param_str = "V256dV256dV256dV256dUi" | ||
| 8135 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8136 | |||
| 8137 | __builtin_ve_vl_pvfmin_vsvMvl | ||
| 8138 | .param_str = "V256dLUiV256dV512bV256dUi" | ||
| 8139 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8140 | |||
| 8141 | __builtin_ve_vl_pvfmin_vsvl | ||
| 8142 | .param_str = "V256dLUiV256dUi" | ||
| 8143 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8144 | |||
| 8145 | __builtin_ve_vl_pvfmin_vsvvl | ||
| 8146 | .param_str = "V256dLUiV256dV256dUi" | ||
| 8147 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8148 | |||
| 8149 | __builtin_ve_vl_pvfmin_vvvMvl | ||
| 8150 | .param_str = "V256dV256dV256dV512bV256dUi" | ||
| 8151 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8152 | |||
| 8153 | __builtin_ve_vl_pvfmin_vvvl | ||
| 8154 | .param_str = "V256dV256dV256dUi" | ||
| 8155 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8156 | |||
| 8157 | __builtin_ve_vl_pvfmin_vvvvl | ||
| 8158 | .param_str = "V256dV256dV256dV256dUi" | ||
| 8159 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8160 | |||
| 8161 | __builtin_ve_vl_pvfmkaf_Ml | ||
| 8162 | .param_str = "V512bUi" | ||
| 8163 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8164 | |||
| 8165 | __builtin_ve_vl_pvfmkat_Ml | ||
| 8166 | .param_str = "V512bUi" | ||
| 8167 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8168 | |||
| 8169 | __builtin_ve_vl_pvfmkseq_MvMl | ||
| 8170 | .param_str = "V512bV256dV512bUi" | ||
| 8171 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8172 | |||
| 8173 | __builtin_ve_vl_pvfmkseq_Mvl | ||
| 8174 | .param_str = "V512bV256dUi" | ||
| 8175 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8176 | |||
| 8177 | __builtin_ve_vl_pvfmkseqnan_MvMl | ||
| 8178 | .param_str = "V512bV256dV512bUi" | ||
| 8179 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8180 | |||
| 8181 | __builtin_ve_vl_pvfmkseqnan_Mvl | ||
| 8182 | .param_str = "V512bV256dUi" | ||
| 8183 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8184 | |||
| 8185 | __builtin_ve_vl_pvfmksge_MvMl | ||
| 8186 | .param_str = "V512bV256dV512bUi" | ||
| 8187 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8188 | |||
| 8189 | __builtin_ve_vl_pvfmksge_Mvl | ||
| 8190 | .param_str = "V512bV256dUi" | ||
| 8191 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8192 | |||
| 8193 | __builtin_ve_vl_pvfmksgenan_MvMl | ||
| 8194 | .param_str = "V512bV256dV512bUi" | ||
| 8195 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8196 | |||
| 8197 | __builtin_ve_vl_pvfmksgenan_Mvl | ||
| 8198 | .param_str = "V512bV256dUi" | ||
| 8199 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8200 | |||
| 8201 | __builtin_ve_vl_pvfmksgt_MvMl | ||
| 8202 | .param_str = "V512bV256dV512bUi" | ||
| 8203 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8204 | |||
| 8205 | __builtin_ve_vl_pvfmksgt_Mvl | ||
| 8206 | .param_str = "V512bV256dUi" | ||
| 8207 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8208 | |||
| 8209 | __builtin_ve_vl_pvfmksgtnan_MvMl | ||
| 8210 | .param_str = "V512bV256dV512bUi" | ||
| 8211 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8212 | |||
| 8213 | __builtin_ve_vl_pvfmksgtnan_Mvl | ||
| 8214 | .param_str = "V512bV256dUi" | ||
| 8215 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8216 | |||
| 8217 | __builtin_ve_vl_pvfmksle_MvMl | ||
| 8218 | .param_str = "V512bV256dV512bUi" | ||
| 8219 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8220 | |||
| 8221 | __builtin_ve_vl_pvfmksle_Mvl | ||
| 8222 | .param_str = "V512bV256dUi" | ||
| 8223 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8224 | |||
| 8225 | __builtin_ve_vl_pvfmkslenan_MvMl | ||
| 8226 | .param_str = "V512bV256dV512bUi" | ||
| 8227 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8228 | |||
| 8229 | __builtin_ve_vl_pvfmkslenan_Mvl | ||
| 8230 | .param_str = "V512bV256dUi" | ||
| 8231 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8232 | |||
| 8233 | __builtin_ve_vl_pvfmksloeq_mvl | ||
| 8234 | .param_str = "V256bV256dUi" | ||
| 8235 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8236 | |||
| 8237 | __builtin_ve_vl_pvfmksloeq_mvml | ||
| 8238 | .param_str = "V256bV256dV256bUi" | ||
| 8239 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8240 | |||
| 8241 | __builtin_ve_vl_pvfmksloeqnan_mvl | ||
| 8242 | .param_str = "V256bV256dUi" | ||
| 8243 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8244 | |||
| 8245 | __builtin_ve_vl_pvfmksloeqnan_mvml | ||
| 8246 | .param_str = "V256bV256dV256bUi" | ||
| 8247 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8248 | |||
| 8249 | __builtin_ve_vl_pvfmksloge_mvl | ||
| 8250 | .param_str = "V256bV256dUi" | ||
| 8251 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8252 | |||
| 8253 | __builtin_ve_vl_pvfmksloge_mvml | ||
| 8254 | .param_str = "V256bV256dV256bUi" | ||
| 8255 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8256 | |||
| 8257 | __builtin_ve_vl_pvfmkslogenan_mvl | ||
| 8258 | .param_str = "V256bV256dUi" | ||
| 8259 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8260 | |||
| 8261 | __builtin_ve_vl_pvfmkslogenan_mvml | ||
| 8262 | .param_str = "V256bV256dV256bUi" | ||
| 8263 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8264 | |||
| 8265 | __builtin_ve_vl_pvfmkslogt_mvl | ||
| 8266 | .param_str = "V256bV256dUi" | ||
| 8267 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8268 | |||
| 8269 | __builtin_ve_vl_pvfmkslogt_mvml | ||
| 8270 | .param_str = "V256bV256dV256bUi" | ||
| 8271 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8272 | |||
| 8273 | __builtin_ve_vl_pvfmkslogtnan_mvl | ||
| 8274 | .param_str = "V256bV256dUi" | ||
| 8275 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8276 | |||
| 8277 | __builtin_ve_vl_pvfmkslogtnan_mvml | ||
| 8278 | .param_str = "V256bV256dV256bUi" | ||
| 8279 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8280 | |||
| 8281 | __builtin_ve_vl_pvfmkslole_mvl | ||
| 8282 | .param_str = "V256bV256dUi" | ||
| 8283 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8284 | |||
| 8285 | __builtin_ve_vl_pvfmkslole_mvml | ||
| 8286 | .param_str = "V256bV256dV256bUi" | ||
| 8287 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8288 | |||
| 8289 | __builtin_ve_vl_pvfmkslolenan_mvl | ||
| 8290 | .param_str = "V256bV256dUi" | ||
| 8291 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8292 | |||
| 8293 | __builtin_ve_vl_pvfmkslolenan_mvml | ||
| 8294 | .param_str = "V256bV256dV256bUi" | ||
| 8295 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8296 | |||
| 8297 | __builtin_ve_vl_pvfmkslolt_mvl | ||
| 8298 | .param_str = "V256bV256dUi" | ||
| 8299 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8300 | |||
| 8301 | __builtin_ve_vl_pvfmkslolt_mvml | ||
| 8302 | .param_str = "V256bV256dV256bUi" | ||
| 8303 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8304 | |||
| 8305 | __builtin_ve_vl_pvfmksloltnan_mvl | ||
| 8306 | .param_str = "V256bV256dUi" | ||
| 8307 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8308 | |||
| 8309 | __builtin_ve_vl_pvfmksloltnan_mvml | ||
| 8310 | .param_str = "V256bV256dV256bUi" | ||
| 8311 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8312 | |||
| 8313 | __builtin_ve_vl_pvfmkslonan_mvl | ||
| 8314 | .param_str = "V256bV256dUi" | ||
| 8315 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8316 | |||
| 8317 | __builtin_ve_vl_pvfmkslonan_mvml | ||
| 8318 | .param_str = "V256bV256dV256bUi" | ||
| 8319 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8320 | |||
| 8321 | __builtin_ve_vl_pvfmkslone_mvl | ||
| 8322 | .param_str = "V256bV256dUi" | ||
| 8323 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8324 | |||
| 8325 | __builtin_ve_vl_pvfmkslone_mvml | ||
| 8326 | .param_str = "V256bV256dV256bUi" | ||
| 8327 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8328 | |||
| 8329 | __builtin_ve_vl_pvfmkslonenan_mvl | ||
| 8330 | .param_str = "V256bV256dUi" | ||
| 8331 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8332 | |||
| 8333 | __builtin_ve_vl_pvfmkslonenan_mvml | ||
| 8334 | .param_str = "V256bV256dV256bUi" | ||
| 8335 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8336 | |||
| 8337 | __builtin_ve_vl_pvfmkslonum_mvl | ||
| 8338 | .param_str = "V256bV256dUi" | ||
| 8339 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8340 | |||
| 8341 | __builtin_ve_vl_pvfmkslonum_mvml | ||
| 8342 | .param_str = "V256bV256dV256bUi" | ||
| 8343 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8344 | |||
| 8345 | __builtin_ve_vl_pvfmkslt_MvMl | ||
| 8346 | .param_str = "V512bV256dV512bUi" | ||
| 8347 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8348 | |||
| 8349 | __builtin_ve_vl_pvfmkslt_Mvl | ||
| 8350 | .param_str = "V512bV256dUi" | ||
| 8351 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8352 | |||
| 8353 | __builtin_ve_vl_pvfmksltnan_MvMl | ||
| 8354 | .param_str = "V512bV256dV512bUi" | ||
| 8355 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8356 | |||
| 8357 | __builtin_ve_vl_pvfmksltnan_Mvl | ||
| 8358 | .param_str = "V512bV256dUi" | ||
| 8359 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8360 | |||
| 8361 | __builtin_ve_vl_pvfmksnan_MvMl | ||
| 8362 | .param_str = "V512bV256dV512bUi" | ||
| 8363 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8364 | |||
| 8365 | __builtin_ve_vl_pvfmksnan_Mvl | ||
| 8366 | .param_str = "V512bV256dUi" | ||
| 8367 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8368 | |||
| 8369 | __builtin_ve_vl_pvfmksne_MvMl | ||
| 8370 | .param_str = "V512bV256dV512bUi" | ||
| 8371 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8372 | |||
| 8373 | __builtin_ve_vl_pvfmksne_Mvl | ||
| 8374 | .param_str = "V512bV256dUi" | ||
| 8375 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8376 | |||
| 8377 | __builtin_ve_vl_pvfmksnenan_MvMl | ||
| 8378 | .param_str = "V512bV256dV512bUi" | ||
| 8379 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8380 | |||
| 8381 | __builtin_ve_vl_pvfmksnenan_Mvl | ||
| 8382 | .param_str = "V512bV256dUi" | ||
| 8383 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8384 | |||
| 8385 | __builtin_ve_vl_pvfmksnum_MvMl | ||
| 8386 | .param_str = "V512bV256dV512bUi" | ||
| 8387 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8388 | |||
| 8389 | __builtin_ve_vl_pvfmksnum_Mvl | ||
| 8390 | .param_str = "V512bV256dUi" | ||
| 8391 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8392 | |||
| 8393 | __builtin_ve_vl_pvfmksupeq_mvl | ||
| 8394 | .param_str = "V256bV256dUi" | ||
| 8395 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8396 | |||
| 8397 | __builtin_ve_vl_pvfmksupeq_mvml | ||
| 8398 | .param_str = "V256bV256dV256bUi" | ||
| 8399 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8400 | |||
| 8401 | __builtin_ve_vl_pvfmksupeqnan_mvl | ||
| 8402 | .param_str = "V256bV256dUi" | ||
| 8403 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8404 | |||
| 8405 | __builtin_ve_vl_pvfmksupeqnan_mvml | ||
| 8406 | .param_str = "V256bV256dV256bUi" | ||
| 8407 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8408 | |||
| 8409 | __builtin_ve_vl_pvfmksupge_mvl | ||
| 8410 | .param_str = "V256bV256dUi" | ||
| 8411 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8412 | |||
| 8413 | __builtin_ve_vl_pvfmksupge_mvml | ||
| 8414 | .param_str = "V256bV256dV256bUi" | ||
| 8415 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8416 | |||
| 8417 | __builtin_ve_vl_pvfmksupgenan_mvl | ||
| 8418 | .param_str = "V256bV256dUi" | ||
| 8419 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8420 | |||
| 8421 | __builtin_ve_vl_pvfmksupgenan_mvml | ||
| 8422 | .param_str = "V256bV256dV256bUi" | ||
| 8423 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8424 | |||
| 8425 | __builtin_ve_vl_pvfmksupgt_mvl | ||
| 8426 | .param_str = "V256bV256dUi" | ||
| 8427 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8428 | |||
| 8429 | __builtin_ve_vl_pvfmksupgt_mvml | ||
| 8430 | .param_str = "V256bV256dV256bUi" | ||
| 8431 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8432 | |||
| 8433 | __builtin_ve_vl_pvfmksupgtnan_mvl | ||
| 8434 | .param_str = "V256bV256dUi" | ||
| 8435 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8436 | |||
| 8437 | __builtin_ve_vl_pvfmksupgtnan_mvml | ||
| 8438 | .param_str = "V256bV256dV256bUi" | ||
| 8439 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8440 | |||
| 8441 | __builtin_ve_vl_pvfmksuple_mvl | ||
| 8442 | .param_str = "V256bV256dUi" | ||
| 8443 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8444 | |||
| 8445 | __builtin_ve_vl_pvfmksuple_mvml | ||
| 8446 | .param_str = "V256bV256dV256bUi" | ||
| 8447 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8448 | |||
| 8449 | __builtin_ve_vl_pvfmksuplenan_mvl | ||
| 8450 | .param_str = "V256bV256dUi" | ||
| 8451 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8452 | |||
| 8453 | __builtin_ve_vl_pvfmksuplenan_mvml | ||
| 8454 | .param_str = "V256bV256dV256bUi" | ||
| 8455 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8456 | |||
| 8457 | __builtin_ve_vl_pvfmksuplt_mvl | ||
| 8458 | .param_str = "V256bV256dUi" | ||
| 8459 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8460 | |||
| 8461 | __builtin_ve_vl_pvfmksuplt_mvml | ||
| 8462 | .param_str = "V256bV256dV256bUi" | ||
| 8463 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8464 | |||
| 8465 | __builtin_ve_vl_pvfmksupltnan_mvl | ||
| 8466 | .param_str = "V256bV256dUi" | ||
| 8467 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8468 | |||
| 8469 | __builtin_ve_vl_pvfmksupltnan_mvml | ||
| 8470 | .param_str = "V256bV256dV256bUi" | ||
| 8471 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8472 | |||
| 8473 | __builtin_ve_vl_pvfmksupnan_mvl | ||
| 8474 | .param_str = "V256bV256dUi" | ||
| 8475 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8476 | |||
| 8477 | __builtin_ve_vl_pvfmksupnan_mvml | ||
| 8478 | .param_str = "V256bV256dV256bUi" | ||
| 8479 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8480 | |||
| 8481 | __builtin_ve_vl_pvfmksupne_mvl | ||
| 8482 | .param_str = "V256bV256dUi" | ||
| 8483 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8484 | |||
| 8485 | __builtin_ve_vl_pvfmksupne_mvml | ||
| 8486 | .param_str = "V256bV256dV256bUi" | ||
| 8487 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8488 | |||
| 8489 | __builtin_ve_vl_pvfmksupnenan_mvl | ||
| 8490 | .param_str = "V256bV256dUi" | ||
| 8491 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8492 | |||
| 8493 | __builtin_ve_vl_pvfmksupnenan_mvml | ||
| 8494 | .param_str = "V256bV256dV256bUi" | ||
| 8495 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8496 | |||
| 8497 | __builtin_ve_vl_pvfmksupnum_mvl | ||
| 8498 | .param_str = "V256bV256dUi" | ||
| 8499 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8500 | |||
| 8501 | __builtin_ve_vl_pvfmksupnum_mvml | ||
| 8502 | .param_str = "V256bV256dV256bUi" | ||
| 8503 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8504 | |||
| 8505 | __builtin_ve_vl_pvfmkweq_MvMl | ||
| 8506 | .param_str = "V512bV256dV512bUi" | ||
| 8507 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8508 | |||
| 8509 | __builtin_ve_vl_pvfmkweq_Mvl | ||
| 8510 | .param_str = "V512bV256dUi" | ||
| 8511 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8512 | |||
| 8513 | __builtin_ve_vl_pvfmkweqnan_MvMl | ||
| 8514 | .param_str = "V512bV256dV512bUi" | ||
| 8515 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8516 | |||
| 8517 | __builtin_ve_vl_pvfmkweqnan_Mvl | ||
| 8518 | .param_str = "V512bV256dUi" | ||
| 8519 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8520 | |||
| 8521 | __builtin_ve_vl_pvfmkwge_MvMl | ||
| 8522 | .param_str = "V512bV256dV512bUi" | ||
| 8523 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8524 | |||
| 8525 | __builtin_ve_vl_pvfmkwge_Mvl | ||
| 8526 | .param_str = "V512bV256dUi" | ||
| 8527 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8528 | |||
| 8529 | __builtin_ve_vl_pvfmkwgenan_MvMl | ||
| 8530 | .param_str = "V512bV256dV512bUi" | ||
| 8531 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8532 | |||
| 8533 | __builtin_ve_vl_pvfmkwgenan_Mvl | ||
| 8534 | .param_str = "V512bV256dUi" | ||
| 8535 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8536 | |||
| 8537 | __builtin_ve_vl_pvfmkwgt_MvMl | ||
| 8538 | .param_str = "V512bV256dV512bUi" | ||
| 8539 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8540 | |||
| 8541 | __builtin_ve_vl_pvfmkwgt_Mvl | ||
| 8542 | .param_str = "V512bV256dUi" | ||
| 8543 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8544 | |||
| 8545 | __builtin_ve_vl_pvfmkwgtnan_MvMl | ||
| 8546 | .param_str = "V512bV256dV512bUi" | ||
| 8547 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8548 | |||
| 8549 | __builtin_ve_vl_pvfmkwgtnan_Mvl | ||
| 8550 | .param_str = "V512bV256dUi" | ||
| 8551 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8552 | |||
| 8553 | __builtin_ve_vl_pvfmkwle_MvMl | ||
| 8554 | .param_str = "V512bV256dV512bUi" | ||
| 8555 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8556 | |||
| 8557 | __builtin_ve_vl_pvfmkwle_Mvl | ||
| 8558 | .param_str = "V512bV256dUi" | ||
| 8559 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8560 | |||
| 8561 | __builtin_ve_vl_pvfmkwlenan_MvMl | ||
| 8562 | .param_str = "V512bV256dV512bUi" | ||
| 8563 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8564 | |||
| 8565 | __builtin_ve_vl_pvfmkwlenan_Mvl | ||
| 8566 | .param_str = "V512bV256dUi" | ||
| 8567 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8568 | |||
| 8569 | __builtin_ve_vl_pvfmkwloeq_mvl | ||
| 8570 | .param_str = "V256bV256dUi" | ||
| 8571 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8572 | |||
| 8573 | __builtin_ve_vl_pvfmkwloeq_mvml | ||
| 8574 | .param_str = "V256bV256dV256bUi" | ||
| 8575 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8576 | |||
| 8577 | __builtin_ve_vl_pvfmkwloeqnan_mvl | ||
| 8578 | .param_str = "V256bV256dUi" | ||
| 8579 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8580 | |||
| 8581 | __builtin_ve_vl_pvfmkwloeqnan_mvml | ||
| 8582 | .param_str = "V256bV256dV256bUi" | ||
| 8583 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8584 | |||
| 8585 | __builtin_ve_vl_pvfmkwloge_mvl | ||
| 8586 | .param_str = "V256bV256dUi" | ||
| 8587 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8588 | |||
| 8589 | __builtin_ve_vl_pvfmkwloge_mvml | ||
| 8590 | .param_str = "V256bV256dV256bUi" | ||
| 8591 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8592 | |||
| 8593 | __builtin_ve_vl_pvfmkwlogenan_mvl | ||
| 8594 | .param_str = "V256bV256dUi" | ||
| 8595 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8596 | |||
| 8597 | __builtin_ve_vl_pvfmkwlogenan_mvml | ||
| 8598 | .param_str = "V256bV256dV256bUi" | ||
| 8599 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8600 | |||
| 8601 | __builtin_ve_vl_pvfmkwlogt_mvl | ||
| 8602 | .param_str = "V256bV256dUi" | ||
| 8603 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8604 | |||
| 8605 | __builtin_ve_vl_pvfmkwlogt_mvml | ||
| 8606 | .param_str = "V256bV256dV256bUi" | ||
| 8607 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8608 | |||
| 8609 | __builtin_ve_vl_pvfmkwlogtnan_mvl | ||
| 8610 | .param_str = "V256bV256dUi" | ||
| 8611 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8612 | |||
| 8613 | __builtin_ve_vl_pvfmkwlogtnan_mvml | ||
| 8614 | .param_str = "V256bV256dV256bUi" | ||
| 8615 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8616 | |||
| 8617 | __builtin_ve_vl_pvfmkwlole_mvl | ||
| 8618 | .param_str = "V256bV256dUi" | ||
| 8619 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8620 | |||
| 8621 | __builtin_ve_vl_pvfmkwlole_mvml | ||
| 8622 | .param_str = "V256bV256dV256bUi" | ||
| 8623 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8624 | |||
| 8625 | __builtin_ve_vl_pvfmkwlolenan_mvl | ||
| 8626 | .param_str = "V256bV256dUi" | ||
| 8627 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8628 | |||
| 8629 | __builtin_ve_vl_pvfmkwlolenan_mvml | ||
| 8630 | .param_str = "V256bV256dV256bUi" | ||
| 8631 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8632 | |||
| 8633 | __builtin_ve_vl_pvfmkwlolt_mvl | ||
| 8634 | .param_str = "V256bV256dUi" | ||
| 8635 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8636 | |||
| 8637 | __builtin_ve_vl_pvfmkwlolt_mvml | ||
| 8638 | .param_str = "V256bV256dV256bUi" | ||
| 8639 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8640 | |||
| 8641 | __builtin_ve_vl_pvfmkwloltnan_mvl | ||
| 8642 | .param_str = "V256bV256dUi" | ||
| 8643 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8644 | |||
| 8645 | __builtin_ve_vl_pvfmkwloltnan_mvml | ||
| 8646 | .param_str = "V256bV256dV256bUi" | ||
| 8647 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8648 | |||
| 8649 | __builtin_ve_vl_pvfmkwlonan_mvl | ||
| 8650 | .param_str = "V256bV256dUi" | ||
| 8651 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8652 | |||
| 8653 | __builtin_ve_vl_pvfmkwlonan_mvml | ||
| 8654 | .param_str = "V256bV256dV256bUi" | ||
| 8655 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8656 | |||
| 8657 | __builtin_ve_vl_pvfmkwlone_mvl | ||
| 8658 | .param_str = "V256bV256dUi" | ||
| 8659 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8660 | |||
| 8661 | __builtin_ve_vl_pvfmkwlone_mvml | ||
| 8662 | .param_str = "V256bV256dV256bUi" | ||
| 8663 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8664 | |||
| 8665 | __builtin_ve_vl_pvfmkwlonenan_mvl | ||
| 8666 | .param_str = "V256bV256dUi" | ||
| 8667 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8668 | |||
| 8669 | __builtin_ve_vl_pvfmkwlonenan_mvml | ||
| 8670 | .param_str = "V256bV256dV256bUi" | ||
| 8671 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8672 | |||
| 8673 | __builtin_ve_vl_pvfmkwlonum_mvl | ||
| 8674 | .param_str = "V256bV256dUi" | ||
| 8675 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8676 | |||
| 8677 | __builtin_ve_vl_pvfmkwlonum_mvml | ||
| 8678 | .param_str = "V256bV256dV256bUi" | ||
| 8679 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8680 | |||
| 8681 | __builtin_ve_vl_pvfmkwlt_MvMl | ||
| 8682 | .param_str = "V512bV256dV512bUi" | ||
| 8683 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8684 | |||
| 8685 | __builtin_ve_vl_pvfmkwlt_Mvl | ||
| 8686 | .param_str = "V512bV256dUi" | ||
| 8687 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8688 | |||
| 8689 | __builtin_ve_vl_pvfmkwltnan_MvMl | ||
| 8690 | .param_str = "V512bV256dV512bUi" | ||
| 8691 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8692 | |||
| 8693 | __builtin_ve_vl_pvfmkwltnan_Mvl | ||
| 8694 | .param_str = "V512bV256dUi" | ||
| 8695 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8696 | |||
| 8697 | __builtin_ve_vl_pvfmkwnan_MvMl | ||
| 8698 | .param_str = "V512bV256dV512bUi" | ||
| 8699 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8700 | |||
| 8701 | __builtin_ve_vl_pvfmkwnan_Mvl | ||
| 8702 | .param_str = "V512bV256dUi" | ||
| 8703 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8704 | |||
| 8705 | __builtin_ve_vl_pvfmkwne_MvMl | ||
| 8706 | .param_str = "V512bV256dV512bUi" | ||
| 8707 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8708 | |||
| 8709 | __builtin_ve_vl_pvfmkwne_Mvl | ||
| 8710 | .param_str = "V512bV256dUi" | ||
| 8711 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8712 | |||
| 8713 | __builtin_ve_vl_pvfmkwnenan_MvMl | ||
| 8714 | .param_str = "V512bV256dV512bUi" | ||
| 8715 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8716 | |||
| 8717 | __builtin_ve_vl_pvfmkwnenan_Mvl | ||
| 8718 | .param_str = "V512bV256dUi" | ||
| 8719 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8720 | |||
| 8721 | __builtin_ve_vl_pvfmkwnum_MvMl | ||
| 8722 | .param_str = "V512bV256dV512bUi" | ||
| 8723 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8724 | |||
| 8725 | __builtin_ve_vl_pvfmkwnum_Mvl | ||
| 8726 | .param_str = "V512bV256dUi" | ||
| 8727 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8728 | |||
| 8729 | __builtin_ve_vl_pvfmkwupeq_mvl | ||
| 8730 | .param_str = "V256bV256dUi" | ||
| 8731 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8732 | |||
| 8733 | __builtin_ve_vl_pvfmkwupeq_mvml | ||
| 8734 | .param_str = "V256bV256dV256bUi" | ||
| 8735 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8736 | |||
| 8737 | __builtin_ve_vl_pvfmkwupeqnan_mvl | ||
| 8738 | .param_str = "V256bV256dUi" | ||
| 8739 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8740 | |||
| 8741 | __builtin_ve_vl_pvfmkwupeqnan_mvml | ||
| 8742 | .param_str = "V256bV256dV256bUi" | ||
| 8743 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8744 | |||
| 8745 | __builtin_ve_vl_pvfmkwupge_mvl | ||
| 8746 | .param_str = "V256bV256dUi" | ||
| 8747 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8748 | |||
| 8749 | __builtin_ve_vl_pvfmkwupge_mvml | ||
| 8750 | .param_str = "V256bV256dV256bUi" | ||
| 8751 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8752 | |||
| 8753 | __builtin_ve_vl_pvfmkwupgenan_mvl | ||
| 8754 | .param_str = "V256bV256dUi" | ||
| 8755 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8756 | |||
| 8757 | __builtin_ve_vl_pvfmkwupgenan_mvml | ||
| 8758 | .param_str = "V256bV256dV256bUi" | ||
| 8759 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8760 | |||
| 8761 | __builtin_ve_vl_pvfmkwupgt_mvl | ||
| 8762 | .param_str = "V256bV256dUi" | ||
| 8763 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8764 | |||
| 8765 | __builtin_ve_vl_pvfmkwupgt_mvml | ||
| 8766 | .param_str = "V256bV256dV256bUi" | ||
| 8767 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8768 | |||
| 8769 | __builtin_ve_vl_pvfmkwupgtnan_mvl | ||
| 8770 | .param_str = "V256bV256dUi" | ||
| 8771 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8772 | |||
| 8773 | __builtin_ve_vl_pvfmkwupgtnan_mvml | ||
| 8774 | .param_str = "V256bV256dV256bUi" | ||
| 8775 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8776 | |||
| 8777 | __builtin_ve_vl_pvfmkwuple_mvl | ||
| 8778 | .param_str = "V256bV256dUi" | ||
| 8779 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8780 | |||
| 8781 | __builtin_ve_vl_pvfmkwuple_mvml | ||
| 8782 | .param_str = "V256bV256dV256bUi" | ||
| 8783 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8784 | |||
| 8785 | __builtin_ve_vl_pvfmkwuplenan_mvl | ||
| 8786 | .param_str = "V256bV256dUi" | ||
| 8787 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8788 | |||
| 8789 | __builtin_ve_vl_pvfmkwuplenan_mvml | ||
| 8790 | .param_str = "V256bV256dV256bUi" | ||
| 8791 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8792 | |||
| 8793 | __builtin_ve_vl_pvfmkwuplt_mvl | ||
| 8794 | .param_str = "V256bV256dUi" | ||
| 8795 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8796 | |||
| 8797 | __builtin_ve_vl_pvfmkwuplt_mvml | ||
| 8798 | .param_str = "V256bV256dV256bUi" | ||
| 8799 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8800 | |||
| 8801 | __builtin_ve_vl_pvfmkwupltnan_mvl | ||
| 8802 | .param_str = "V256bV256dUi" | ||
| 8803 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8804 | |||
| 8805 | __builtin_ve_vl_pvfmkwupltnan_mvml | ||
| 8806 | .param_str = "V256bV256dV256bUi" | ||
| 8807 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8808 | |||
| 8809 | __builtin_ve_vl_pvfmkwupnan_mvl | ||
| 8810 | .param_str = "V256bV256dUi" | ||
| 8811 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8812 | |||
| 8813 | __builtin_ve_vl_pvfmkwupnan_mvml | ||
| 8814 | .param_str = "V256bV256dV256bUi" | ||
| 8815 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8816 | |||
| 8817 | __builtin_ve_vl_pvfmkwupne_mvl | ||
| 8818 | .param_str = "V256bV256dUi" | ||
| 8819 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8820 | |||
| 8821 | __builtin_ve_vl_pvfmkwupne_mvml | ||
| 8822 | .param_str = "V256bV256dV256bUi" | ||
| 8823 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8824 | |||
| 8825 | __builtin_ve_vl_pvfmkwupnenan_mvl | ||
| 8826 | .param_str = "V256bV256dUi" | ||
| 8827 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8828 | |||
| 8829 | __builtin_ve_vl_pvfmkwupnenan_mvml | ||
| 8830 | .param_str = "V256bV256dV256bUi" | ||
| 8831 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8832 | |||
| 8833 | __builtin_ve_vl_pvfmkwupnum_mvl | ||
| 8834 | .param_str = "V256bV256dUi" | ||
| 8835 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8836 | |||
| 8837 | __builtin_ve_vl_pvfmkwupnum_mvml | ||
| 8838 | .param_str = "V256bV256dV256bUi" | ||
| 8839 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8840 | |||
| 8841 | __builtin_ve_vl_pvfmsb_vsvvMvl | ||
| 8842 | .param_str = "V256dLUiV256dV256dV512bV256dUi" | ||
| 8843 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8844 | |||
| 8845 | __builtin_ve_vl_pvfmsb_vsvvl | ||
| 8846 | .param_str = "V256dLUiV256dV256dUi" | ||
| 8847 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8848 | |||
| 8849 | __builtin_ve_vl_pvfmsb_vsvvvl | ||
| 8850 | .param_str = "V256dLUiV256dV256dV256dUi" | ||
| 8851 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8852 | |||
| 8853 | __builtin_ve_vl_pvfmsb_vvsvMvl | ||
| 8854 | .param_str = "V256dV256dLUiV256dV512bV256dUi" | ||
| 8855 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8856 | |||
| 8857 | __builtin_ve_vl_pvfmsb_vvsvl | ||
| 8858 | .param_str = "V256dV256dLUiV256dUi" | ||
| 8859 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8860 | |||
| 8861 | __builtin_ve_vl_pvfmsb_vvsvvl | ||
| 8862 | .param_str = "V256dV256dLUiV256dV256dUi" | ||
| 8863 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8864 | |||
| 8865 | __builtin_ve_vl_pvfmsb_vvvvMvl | ||
| 8866 | .param_str = "V256dV256dV256dV256dV512bV256dUi" | ||
| 8867 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8868 | |||
| 8869 | __builtin_ve_vl_pvfmsb_vvvvl | ||
| 8870 | .param_str = "V256dV256dV256dV256dUi" | ||
| 8871 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8872 | |||
| 8873 | __builtin_ve_vl_pvfmsb_vvvvvl | ||
| 8874 | .param_str = "V256dV256dV256dV256dV256dUi" | ||
| 8875 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8876 | |||
| 8877 | __builtin_ve_vl_pvfmul_vsvMvl | ||
| 8878 | .param_str = "V256dLUiV256dV512bV256dUi" | ||
| 8879 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8880 | |||
| 8881 | __builtin_ve_vl_pvfmul_vsvl | ||
| 8882 | .param_str = "V256dLUiV256dUi" | ||
| 8883 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8884 | |||
| 8885 | __builtin_ve_vl_pvfmul_vsvvl | ||
| 8886 | .param_str = "V256dLUiV256dV256dUi" | ||
| 8887 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8888 | |||
| 8889 | __builtin_ve_vl_pvfmul_vvvMvl | ||
| 8890 | .param_str = "V256dV256dV256dV512bV256dUi" | ||
| 8891 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8892 | |||
| 8893 | __builtin_ve_vl_pvfmul_vvvl | ||
| 8894 | .param_str = "V256dV256dV256dUi" | ||
| 8895 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8896 | |||
| 8897 | __builtin_ve_vl_pvfmul_vvvvl | ||
| 8898 | .param_str = "V256dV256dV256dV256dUi" | ||
| 8899 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8900 | |||
| 8901 | __builtin_ve_vl_pvfnmad_vsvvMvl | ||
| 8902 | .param_str = "V256dLUiV256dV256dV512bV256dUi" | ||
| 8903 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8904 | |||
| 8905 | __builtin_ve_vl_pvfnmad_vsvvl | ||
| 8906 | .param_str = "V256dLUiV256dV256dUi" | ||
| 8907 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8908 | |||
| 8909 | __builtin_ve_vl_pvfnmad_vsvvvl | ||
| 8910 | .param_str = "V256dLUiV256dV256dV256dUi" | ||
| 8911 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8912 | |||
| 8913 | __builtin_ve_vl_pvfnmad_vvsvMvl | ||
| 8914 | .param_str = "V256dV256dLUiV256dV512bV256dUi" | ||
| 8915 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8916 | |||
| 8917 | __builtin_ve_vl_pvfnmad_vvsvl | ||
| 8918 | .param_str = "V256dV256dLUiV256dUi" | ||
| 8919 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8920 | |||
| 8921 | __builtin_ve_vl_pvfnmad_vvsvvl | ||
| 8922 | .param_str = "V256dV256dLUiV256dV256dUi" | ||
| 8923 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8924 | |||
| 8925 | __builtin_ve_vl_pvfnmad_vvvvMvl | ||
| 8926 | .param_str = "V256dV256dV256dV256dV512bV256dUi" | ||
| 8927 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8928 | |||
| 8929 | __builtin_ve_vl_pvfnmad_vvvvl | ||
| 8930 | .param_str = "V256dV256dV256dV256dUi" | ||
| 8931 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8932 | |||
| 8933 | __builtin_ve_vl_pvfnmad_vvvvvl | ||
| 8934 | .param_str = "V256dV256dV256dV256dV256dUi" | ||
| 8935 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8936 | |||
| 8937 | __builtin_ve_vl_pvfnmsb_vsvvMvl | ||
| 8938 | .param_str = "V256dLUiV256dV256dV512bV256dUi" | ||
| 8939 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8940 | |||
| 8941 | __builtin_ve_vl_pvfnmsb_vsvvl | ||
| 8942 | .param_str = "V256dLUiV256dV256dUi" | ||
| 8943 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8944 | |||
| 8945 | __builtin_ve_vl_pvfnmsb_vsvvvl | ||
| 8946 | .param_str = "V256dLUiV256dV256dV256dUi" | ||
| 8947 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8948 | |||
| 8949 | __builtin_ve_vl_pvfnmsb_vvsvMvl | ||
| 8950 | .param_str = "V256dV256dLUiV256dV512bV256dUi" | ||
| 8951 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8952 | |||
| 8953 | __builtin_ve_vl_pvfnmsb_vvsvl | ||
| 8954 | .param_str = "V256dV256dLUiV256dUi" | ||
| 8955 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8956 | |||
| 8957 | __builtin_ve_vl_pvfnmsb_vvsvvl | ||
| 8958 | .param_str = "V256dV256dLUiV256dV256dUi" | ||
| 8959 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8960 | |||
| 8961 | __builtin_ve_vl_pvfnmsb_vvvvMvl | ||
| 8962 | .param_str = "V256dV256dV256dV256dV512bV256dUi" | ||
| 8963 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8964 | |||
| 8965 | __builtin_ve_vl_pvfnmsb_vvvvl | ||
| 8966 | .param_str = "V256dV256dV256dV256dUi" | ||
| 8967 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8968 | |||
| 8969 | __builtin_ve_vl_pvfnmsb_vvvvvl | ||
| 8970 | .param_str = "V256dV256dV256dV256dV256dUi" | ||
| 8971 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8972 | |||
| 8973 | __builtin_ve_vl_pvfsub_vsvMvl | ||
| 8974 | .param_str = "V256dLUiV256dV512bV256dUi" | ||
| 8975 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8976 | |||
| 8977 | __builtin_ve_vl_pvfsub_vsvl | ||
| 8978 | .param_str = "V256dLUiV256dUi" | ||
| 8979 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8980 | |||
| 8981 | __builtin_ve_vl_pvfsub_vsvvl | ||
| 8982 | .param_str = "V256dLUiV256dV256dUi" | ||
| 8983 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8984 | |||
| 8985 | __builtin_ve_vl_pvfsub_vvvMvl | ||
| 8986 | .param_str = "V256dV256dV256dV512bV256dUi" | ||
| 8987 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8988 | |||
| 8989 | __builtin_ve_vl_pvfsub_vvvl | ||
| 8990 | .param_str = "V256dV256dV256dUi" | ||
| 8991 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8992 | |||
| 8993 | __builtin_ve_vl_pvfsub_vvvvl | ||
| 8994 | .param_str = "V256dV256dV256dV256dUi" | ||
| 8995 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 8996 | |||
| 8997 | __builtin_ve_vl_pvldz_vvMvl | ||
| 8998 | .param_str = "V256dV256dV512bV256dUi" | ||
| 8999 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9000 | |||
| 9001 | __builtin_ve_vl_pvldz_vvl | ||
| 9002 | .param_str = "V256dV256dUi" | ||
| 9003 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9004 | |||
| 9005 | __builtin_ve_vl_pvldz_vvvl | ||
| 9006 | .param_str = "V256dV256dV256dUi" | ||
| 9007 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9008 | |||
| 9009 | __builtin_ve_vl_pvldzlo_vvl | ||
| 9010 | .param_str = "V256dV256dUi" | ||
| 9011 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9012 | |||
| 9013 | __builtin_ve_vl_pvldzlo_vvmvl | ||
| 9014 | .param_str = "V256dV256dV256bV256dUi" | ||
| 9015 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9016 | |||
| 9017 | __builtin_ve_vl_pvldzlo_vvvl | ||
| 9018 | .param_str = "V256dV256dV256dUi" | ||
| 9019 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9020 | |||
| 9021 | __builtin_ve_vl_pvldzup_vvl | ||
| 9022 | .param_str = "V256dV256dUi" | ||
| 9023 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9024 | |||
| 9025 | __builtin_ve_vl_pvldzup_vvmvl | ||
| 9026 | .param_str = "V256dV256dV256bV256dUi" | ||
| 9027 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9028 | |||
| 9029 | __builtin_ve_vl_pvldzup_vvvl | ||
| 9030 | .param_str = "V256dV256dV256dUi" | ||
| 9031 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9032 | |||
| 9033 | __builtin_ve_vl_pvmaxs_vsvMvl | ||
| 9034 | .param_str = "V256dLUiV256dV512bV256dUi" | ||
| 9035 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9036 | |||
| 9037 | __builtin_ve_vl_pvmaxs_vsvl | ||
| 9038 | .param_str = "V256dLUiV256dUi" | ||
| 9039 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9040 | |||
| 9041 | __builtin_ve_vl_pvmaxs_vsvvl | ||
| 9042 | .param_str = "V256dLUiV256dV256dUi" | ||
| 9043 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9044 | |||
| 9045 | __builtin_ve_vl_pvmaxs_vvvMvl | ||
| 9046 | .param_str = "V256dV256dV256dV512bV256dUi" | ||
| 9047 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9048 | |||
| 9049 | __builtin_ve_vl_pvmaxs_vvvl | ||
| 9050 | .param_str = "V256dV256dV256dUi" | ||
| 9051 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9052 | |||
| 9053 | __builtin_ve_vl_pvmaxs_vvvvl | ||
| 9054 | .param_str = "V256dV256dV256dV256dUi" | ||
| 9055 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9056 | |||
| 9057 | __builtin_ve_vl_pvmins_vsvMvl | ||
| 9058 | .param_str = "V256dLUiV256dV512bV256dUi" | ||
| 9059 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9060 | |||
| 9061 | __builtin_ve_vl_pvmins_vsvl | ||
| 9062 | .param_str = "V256dLUiV256dUi" | ||
| 9063 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9064 | |||
| 9065 | __builtin_ve_vl_pvmins_vsvvl | ||
| 9066 | .param_str = "V256dLUiV256dV256dUi" | ||
| 9067 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9068 | |||
| 9069 | __builtin_ve_vl_pvmins_vvvMvl | ||
| 9070 | .param_str = "V256dV256dV256dV512bV256dUi" | ||
| 9071 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9072 | |||
| 9073 | __builtin_ve_vl_pvmins_vvvl | ||
| 9074 | .param_str = "V256dV256dV256dUi" | ||
| 9075 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9076 | |||
| 9077 | __builtin_ve_vl_pvmins_vvvvl | ||
| 9078 | .param_str = "V256dV256dV256dV256dUi" | ||
| 9079 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9080 | |||
| 9081 | __builtin_ve_vl_pvor_vsvMvl | ||
| 9082 | .param_str = "V256dLUiV256dV512bV256dUi" | ||
| 9083 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9084 | |||
| 9085 | __builtin_ve_vl_pvor_vsvl | ||
| 9086 | .param_str = "V256dLUiV256dUi" | ||
| 9087 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9088 | |||
| 9089 | __builtin_ve_vl_pvor_vsvvl | ||
| 9090 | .param_str = "V256dLUiV256dV256dUi" | ||
| 9091 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9092 | |||
| 9093 | __builtin_ve_vl_pvor_vvvMvl | ||
| 9094 | .param_str = "V256dV256dV256dV512bV256dUi" | ||
| 9095 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9096 | |||
| 9097 | __builtin_ve_vl_pvor_vvvl | ||
| 9098 | .param_str = "V256dV256dV256dUi" | ||
| 9099 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9100 | |||
| 9101 | __builtin_ve_vl_pvor_vvvvl | ||
| 9102 | .param_str = "V256dV256dV256dV256dUi" | ||
| 9103 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9104 | |||
| 9105 | __builtin_ve_vl_pvpcnt_vvMvl | ||
| 9106 | .param_str = "V256dV256dV512bV256dUi" | ||
| 9107 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9108 | |||
| 9109 | __builtin_ve_vl_pvpcnt_vvl | ||
| 9110 | .param_str = "V256dV256dUi" | ||
| 9111 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9112 | |||
| 9113 | __builtin_ve_vl_pvpcnt_vvvl | ||
| 9114 | .param_str = "V256dV256dV256dUi" | ||
| 9115 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9116 | |||
| 9117 | __builtin_ve_vl_pvpcntlo_vvl | ||
| 9118 | .param_str = "V256dV256dUi" | ||
| 9119 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9120 | |||
| 9121 | __builtin_ve_vl_pvpcntlo_vvmvl | ||
| 9122 | .param_str = "V256dV256dV256bV256dUi" | ||
| 9123 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9124 | |||
| 9125 | __builtin_ve_vl_pvpcntlo_vvvl | ||
| 9126 | .param_str = "V256dV256dV256dUi" | ||
| 9127 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9128 | |||
| 9129 | __builtin_ve_vl_pvpcntup_vvl | ||
| 9130 | .param_str = "V256dV256dUi" | ||
| 9131 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9132 | |||
| 9133 | __builtin_ve_vl_pvpcntup_vvmvl | ||
| 9134 | .param_str = "V256dV256dV256bV256dUi" | ||
| 9135 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9136 | |||
| 9137 | __builtin_ve_vl_pvpcntup_vvvl | ||
| 9138 | .param_str = "V256dV256dV256dUi" | ||
| 9139 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9140 | |||
| 9141 | __builtin_ve_vl_pvrcp_vvl | ||
| 9142 | .param_str = "V256dV256dUi" | ||
| 9143 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9144 | |||
| 9145 | __builtin_ve_vl_pvrcp_vvvl | ||
| 9146 | .param_str = "V256dV256dV256dUi" | ||
| 9147 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9148 | |||
| 9149 | __builtin_ve_vl_pvrsqrt_vvl | ||
| 9150 | .param_str = "V256dV256dUi" | ||
| 9151 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9152 | |||
| 9153 | __builtin_ve_vl_pvrsqrt_vvvl | ||
| 9154 | .param_str = "V256dV256dV256dUi" | ||
| 9155 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9156 | |||
| 9157 | __builtin_ve_vl_pvrsqrtnex_vvl | ||
| 9158 | .param_str = "V256dV256dUi" | ||
| 9159 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9160 | |||
| 9161 | __builtin_ve_vl_pvrsqrtnex_vvvl | ||
| 9162 | .param_str = "V256dV256dV256dUi" | ||
| 9163 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9164 | |||
| 9165 | __builtin_ve_vl_pvseq_vl | ||
| 9166 | .param_str = "V256dUi" | ||
| 9167 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9168 | |||
| 9169 | __builtin_ve_vl_pvseq_vvl | ||
| 9170 | .param_str = "V256dV256dUi" | ||
| 9171 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9172 | |||
| 9173 | __builtin_ve_vl_pvseqlo_vl | ||
| 9174 | .param_str = "V256dUi" | ||
| 9175 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9176 | |||
| 9177 | __builtin_ve_vl_pvseqlo_vvl | ||
| 9178 | .param_str = "V256dV256dUi" | ||
| 9179 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9180 | |||
| 9181 | __builtin_ve_vl_pvsequp_vl | ||
| 9182 | .param_str = "V256dUi" | ||
| 9183 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9184 | |||
| 9185 | __builtin_ve_vl_pvsequp_vvl | ||
| 9186 | .param_str = "V256dV256dUi" | ||
| 9187 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9188 | |||
| 9189 | __builtin_ve_vl_pvsla_vvsMvl | ||
| 9190 | .param_str = "V256dV256dLUiV512bV256dUi" | ||
| 9191 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9192 | |||
| 9193 | __builtin_ve_vl_pvsla_vvsl | ||
| 9194 | .param_str = "V256dV256dLUiUi" | ||
| 9195 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9196 | |||
| 9197 | __builtin_ve_vl_pvsla_vvsvl | ||
| 9198 | .param_str = "V256dV256dLUiV256dUi" | ||
| 9199 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9200 | |||
| 9201 | __builtin_ve_vl_pvsla_vvvMvl | ||
| 9202 | .param_str = "V256dV256dV256dV512bV256dUi" | ||
| 9203 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9204 | |||
| 9205 | __builtin_ve_vl_pvsla_vvvl | ||
| 9206 | .param_str = "V256dV256dV256dUi" | ||
| 9207 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9208 | |||
| 9209 | __builtin_ve_vl_pvsla_vvvvl | ||
| 9210 | .param_str = "V256dV256dV256dV256dUi" | ||
| 9211 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9212 | |||
| 9213 | __builtin_ve_vl_pvsll_vvsMvl | ||
| 9214 | .param_str = "V256dV256dLUiV512bV256dUi" | ||
| 9215 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9216 | |||
| 9217 | __builtin_ve_vl_pvsll_vvsl | ||
| 9218 | .param_str = "V256dV256dLUiUi" | ||
| 9219 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9220 | |||
| 9221 | __builtin_ve_vl_pvsll_vvsvl | ||
| 9222 | .param_str = "V256dV256dLUiV256dUi" | ||
| 9223 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9224 | |||
| 9225 | __builtin_ve_vl_pvsll_vvvMvl | ||
| 9226 | .param_str = "V256dV256dV256dV512bV256dUi" | ||
| 9227 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9228 | |||
| 9229 | __builtin_ve_vl_pvsll_vvvl | ||
| 9230 | .param_str = "V256dV256dV256dUi" | ||
| 9231 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9232 | |||
| 9233 | __builtin_ve_vl_pvsll_vvvvl | ||
| 9234 | .param_str = "V256dV256dV256dV256dUi" | ||
| 9235 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9236 | |||
| 9237 | __builtin_ve_vl_pvsra_vvsMvl | ||
| 9238 | .param_str = "V256dV256dLUiV512bV256dUi" | ||
| 9239 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9240 | |||
| 9241 | __builtin_ve_vl_pvsra_vvsl | ||
| 9242 | .param_str = "V256dV256dLUiUi" | ||
| 9243 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9244 | |||
| 9245 | __builtin_ve_vl_pvsra_vvsvl | ||
| 9246 | .param_str = "V256dV256dLUiV256dUi" | ||
| 9247 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9248 | |||
| 9249 | __builtin_ve_vl_pvsra_vvvMvl | ||
| 9250 | .param_str = "V256dV256dV256dV512bV256dUi" | ||
| 9251 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9252 | |||
| 9253 | __builtin_ve_vl_pvsra_vvvl | ||
| 9254 | .param_str = "V256dV256dV256dUi" | ||
| 9255 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9256 | |||
| 9257 | __builtin_ve_vl_pvsra_vvvvl | ||
| 9258 | .param_str = "V256dV256dV256dV256dUi" | ||
| 9259 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9260 | |||
| 9261 | __builtin_ve_vl_pvsrl_vvsMvl | ||
| 9262 | .param_str = "V256dV256dLUiV512bV256dUi" | ||
| 9263 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9264 | |||
| 9265 | __builtin_ve_vl_pvsrl_vvsl | ||
| 9266 | .param_str = "V256dV256dLUiUi" | ||
| 9267 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9268 | |||
| 9269 | __builtin_ve_vl_pvsrl_vvsvl | ||
| 9270 | .param_str = "V256dV256dLUiV256dUi" | ||
| 9271 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9272 | |||
| 9273 | __builtin_ve_vl_pvsrl_vvvMvl | ||
| 9274 | .param_str = "V256dV256dV256dV512bV256dUi" | ||
| 9275 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9276 | |||
| 9277 | __builtin_ve_vl_pvsrl_vvvl | ||
| 9278 | .param_str = "V256dV256dV256dUi" | ||
| 9279 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9280 | |||
| 9281 | __builtin_ve_vl_pvsrl_vvvvl | ||
| 9282 | .param_str = "V256dV256dV256dV256dUi" | ||
| 9283 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9284 | |||
| 9285 | __builtin_ve_vl_pvsubs_vsvMvl | ||
| 9286 | .param_str = "V256dLUiV256dV512bV256dUi" | ||
| 9287 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9288 | |||
| 9289 | __builtin_ve_vl_pvsubs_vsvl | ||
| 9290 | .param_str = "V256dLUiV256dUi" | ||
| 9291 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9292 | |||
| 9293 | __builtin_ve_vl_pvsubs_vsvvl | ||
| 9294 | .param_str = "V256dLUiV256dV256dUi" | ||
| 9295 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9296 | |||
| 9297 | __builtin_ve_vl_pvsubs_vvvMvl | ||
| 9298 | .param_str = "V256dV256dV256dV512bV256dUi" | ||
| 9299 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9300 | |||
| 9301 | __builtin_ve_vl_pvsubs_vvvl | ||
| 9302 | .param_str = "V256dV256dV256dUi" | ||
| 9303 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9304 | |||
| 9305 | __builtin_ve_vl_pvsubs_vvvvl | ||
| 9306 | .param_str = "V256dV256dV256dV256dUi" | ||
| 9307 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9308 | |||
| 9309 | __builtin_ve_vl_pvsubu_vsvMvl | ||
| 9310 | .param_str = "V256dLUiV256dV512bV256dUi" | ||
| 9311 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9312 | |||
| 9313 | __builtin_ve_vl_pvsubu_vsvl | ||
| 9314 | .param_str = "V256dLUiV256dUi" | ||
| 9315 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9316 | |||
| 9317 | __builtin_ve_vl_pvsubu_vsvvl | ||
| 9318 | .param_str = "V256dLUiV256dV256dUi" | ||
| 9319 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9320 | |||
| 9321 | __builtin_ve_vl_pvsubu_vvvMvl | ||
| 9322 | .param_str = "V256dV256dV256dV512bV256dUi" | ||
| 9323 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9324 | |||
| 9325 | __builtin_ve_vl_pvsubu_vvvl | ||
| 9326 | .param_str = "V256dV256dV256dUi" | ||
| 9327 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9328 | |||
| 9329 | __builtin_ve_vl_pvsubu_vvvvl | ||
| 9330 | .param_str = "V256dV256dV256dV256dUi" | ||
| 9331 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9332 | |||
| 9333 | __builtin_ve_vl_pvxor_vsvMvl | ||
| 9334 | .param_str = "V256dLUiV256dV512bV256dUi" | ||
| 9335 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9336 | |||
| 9337 | __builtin_ve_vl_pvxor_vsvl | ||
| 9338 | .param_str = "V256dLUiV256dUi" | ||
| 9339 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9340 | |||
| 9341 | __builtin_ve_vl_pvxor_vsvvl | ||
| 9342 | .param_str = "V256dLUiV256dV256dUi" | ||
| 9343 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9344 | |||
| 9345 | __builtin_ve_vl_pvxor_vvvMvl | ||
| 9346 | .param_str = "V256dV256dV256dV512bV256dUi" | ||
| 9347 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9348 | |||
| 9349 | __builtin_ve_vl_pvxor_vvvl | ||
| 9350 | .param_str = "V256dV256dV256dUi" | ||
| 9351 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9352 | |||
| 9353 | __builtin_ve_vl_pvxor_vvvvl | ||
| 9354 | .param_str = "V256dV256dV256dV256dUi" | ||
| 9355 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9356 | |||
| 9357 | __builtin_ve_vl_scr_sss | ||
| 9358 | .param_str = "vLUiLUiLUi" | ||
| 9359 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9360 | |||
| 9361 | __builtin_ve_vl_svm_sMs | ||
| 9362 | .param_str = "LUiV512bLUi" | ||
| 9363 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9364 | |||
| 9365 | __builtin_ve_vl_svm_sms | ||
| 9366 | .param_str = "LUiV256bLUi" | ||
| 9367 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9368 | |||
| 9369 | __builtin_ve_vl_svob | ||
| 9370 | .param_str = "v" | ||
| 9371 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9372 | |||
| 9373 | __builtin_ve_vl_tovm_sml | ||
| 9374 | .param_str = "LUiV256bUi" | ||
| 9375 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9376 | |||
| 9377 | __builtin_ve_vl_tscr_ssss | ||
| 9378 | .param_str = "LUiLUiLUiLUi" | ||
| 9379 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9380 | |||
| 9381 | __builtin_ve_vl_vaddsl_vsvl | ||
| 9382 | .param_str = "V256dLiV256dUi" | ||
| 9383 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9384 | |||
| 9385 | __builtin_ve_vl_vaddsl_vsvmvl | ||
| 9386 | .param_str = "V256dLiV256dV256bV256dUi" | ||
| 9387 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9388 | |||
| 9389 | __builtin_ve_vl_vaddsl_vsvvl | ||
| 9390 | .param_str = "V256dLiV256dV256dUi" | ||
| 9391 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9392 | |||
| 9393 | __builtin_ve_vl_vaddsl_vvvl | ||
| 9394 | .param_str = "V256dV256dV256dUi" | ||
| 9395 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9396 | |||
| 9397 | __builtin_ve_vl_vaddsl_vvvmvl | ||
| 9398 | .param_str = "V256dV256dV256dV256bV256dUi" | ||
| 9399 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9400 | |||
| 9401 | __builtin_ve_vl_vaddsl_vvvvl | ||
| 9402 | .param_str = "V256dV256dV256dV256dUi" | ||
| 9403 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9404 | |||
| 9405 | __builtin_ve_vl_vaddswsx_vsvl | ||
| 9406 | .param_str = "V256diV256dUi" | ||
| 9407 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9408 | |||
| 9409 | __builtin_ve_vl_vaddswsx_vsvmvl | ||
| 9410 | .param_str = "V256diV256dV256bV256dUi" | ||
| 9411 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9412 | |||
| 9413 | __builtin_ve_vl_vaddswsx_vsvvl | ||
| 9414 | .param_str = "V256diV256dV256dUi" | ||
| 9415 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9416 | |||
| 9417 | __builtin_ve_vl_vaddswsx_vvvl | ||
| 9418 | .param_str = "V256dV256dV256dUi" | ||
| 9419 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9420 | |||
| 9421 | __builtin_ve_vl_vaddswsx_vvvmvl | ||
| 9422 | .param_str = "V256dV256dV256dV256bV256dUi" | ||
| 9423 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9424 | |||
| 9425 | __builtin_ve_vl_vaddswsx_vvvvl | ||
| 9426 | .param_str = "V256dV256dV256dV256dUi" | ||
| 9427 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9428 | |||
| 9429 | __builtin_ve_vl_vaddswzx_vsvl | ||
| 9430 | .param_str = "V256diV256dUi" | ||
| 9431 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9432 | |||
| 9433 | __builtin_ve_vl_vaddswzx_vsvmvl | ||
| 9434 | .param_str = "V256diV256dV256bV256dUi" | ||
| 9435 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9436 | |||
| 9437 | __builtin_ve_vl_vaddswzx_vsvvl | ||
| 9438 | .param_str = "V256diV256dV256dUi" | ||
| 9439 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9440 | |||
| 9441 | __builtin_ve_vl_vaddswzx_vvvl | ||
| 9442 | .param_str = "V256dV256dV256dUi" | ||
| 9443 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9444 | |||
| 9445 | __builtin_ve_vl_vaddswzx_vvvmvl | ||
| 9446 | .param_str = "V256dV256dV256dV256bV256dUi" | ||
| 9447 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9448 | |||
| 9449 | __builtin_ve_vl_vaddswzx_vvvvl | ||
| 9450 | .param_str = "V256dV256dV256dV256dUi" | ||
| 9451 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9452 | |||
| 9453 | __builtin_ve_vl_vaddul_vsvl | ||
| 9454 | .param_str = "V256dLUiV256dUi" | ||
| 9455 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9456 | |||
| 9457 | __builtin_ve_vl_vaddul_vsvmvl | ||
| 9458 | .param_str = "V256dLUiV256dV256bV256dUi" | ||
| 9459 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9460 | |||
| 9461 | __builtin_ve_vl_vaddul_vsvvl | ||
| 9462 | .param_str = "V256dLUiV256dV256dUi" | ||
| 9463 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9464 | |||
| 9465 | __builtin_ve_vl_vaddul_vvvl | ||
| 9466 | .param_str = "V256dV256dV256dUi" | ||
| 9467 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9468 | |||
| 9469 | __builtin_ve_vl_vaddul_vvvmvl | ||
| 9470 | .param_str = "V256dV256dV256dV256bV256dUi" | ||
| 9471 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9472 | |||
| 9473 | __builtin_ve_vl_vaddul_vvvvl | ||
| 9474 | .param_str = "V256dV256dV256dV256dUi" | ||
| 9475 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9476 | |||
| 9477 | __builtin_ve_vl_vadduw_vsvl | ||
| 9478 | .param_str = "V256dUiV256dUi" | ||
| 9479 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9480 | |||
| 9481 | __builtin_ve_vl_vadduw_vsvmvl | ||
| 9482 | .param_str = "V256dUiV256dV256bV256dUi" | ||
| 9483 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9484 | |||
| 9485 | __builtin_ve_vl_vadduw_vsvvl | ||
| 9486 | .param_str = "V256dUiV256dV256dUi" | ||
| 9487 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9488 | |||
| 9489 | __builtin_ve_vl_vadduw_vvvl | ||
| 9490 | .param_str = "V256dV256dV256dUi" | ||
| 9491 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9492 | |||
| 9493 | __builtin_ve_vl_vadduw_vvvmvl | ||
| 9494 | .param_str = "V256dV256dV256dV256bV256dUi" | ||
| 9495 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9496 | |||
| 9497 | __builtin_ve_vl_vadduw_vvvvl | ||
| 9498 | .param_str = "V256dV256dV256dV256dUi" | ||
| 9499 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9500 | |||
| 9501 | __builtin_ve_vl_vand_vsvl | ||
| 9502 | .param_str = "V256dLUiV256dUi" | ||
| 9503 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9504 | |||
| 9505 | __builtin_ve_vl_vand_vsvmvl | ||
| 9506 | .param_str = "V256dLUiV256dV256bV256dUi" | ||
| 9507 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9508 | |||
| 9509 | __builtin_ve_vl_vand_vsvvl | ||
| 9510 | .param_str = "V256dLUiV256dV256dUi" | ||
| 9511 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9512 | |||
| 9513 | __builtin_ve_vl_vand_vvvl | ||
| 9514 | .param_str = "V256dV256dV256dUi" | ||
| 9515 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9516 | |||
| 9517 | __builtin_ve_vl_vand_vvvmvl | ||
| 9518 | .param_str = "V256dV256dV256dV256bV256dUi" | ||
| 9519 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9520 | |||
| 9521 | __builtin_ve_vl_vand_vvvvl | ||
| 9522 | .param_str = "V256dV256dV256dV256dUi" | ||
| 9523 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9524 | |||
| 9525 | __builtin_ve_vl_vbrdd_vsl | ||
| 9526 | .param_str = "V256ddUi" | ||
| 9527 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9528 | |||
| 9529 | __builtin_ve_vl_vbrdd_vsmvl | ||
| 9530 | .param_str = "V256ddV256bV256dUi" | ||
| 9531 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9532 | |||
| 9533 | __builtin_ve_vl_vbrdd_vsvl | ||
| 9534 | .param_str = "V256ddV256dUi" | ||
| 9535 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9536 | |||
| 9537 | __builtin_ve_vl_vbrdl_vsl | ||
| 9538 | .param_str = "V256dLiUi" | ||
| 9539 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9540 | |||
| 9541 | __builtin_ve_vl_vbrdl_vsmvl | ||
| 9542 | .param_str = "V256dLiV256bV256dUi" | ||
| 9543 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9544 | |||
| 9545 | __builtin_ve_vl_vbrdl_vsvl | ||
| 9546 | .param_str = "V256dLiV256dUi" | ||
| 9547 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9548 | |||
| 9549 | __builtin_ve_vl_vbrds_vsl | ||
| 9550 | .param_str = "V256dfUi" | ||
| 9551 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9552 | |||
| 9553 | __builtin_ve_vl_vbrds_vsmvl | ||
| 9554 | .param_str = "V256dfV256bV256dUi" | ||
| 9555 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9556 | |||
| 9557 | __builtin_ve_vl_vbrds_vsvl | ||
| 9558 | .param_str = "V256dfV256dUi" | ||
| 9559 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9560 | |||
| 9561 | __builtin_ve_vl_vbrdw_vsl | ||
| 9562 | .param_str = "V256diUi" | ||
| 9563 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9564 | |||
| 9565 | __builtin_ve_vl_vbrdw_vsmvl | ||
| 9566 | .param_str = "V256diV256bV256dUi" | ||
| 9567 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9568 | |||
| 9569 | __builtin_ve_vl_vbrdw_vsvl | ||
| 9570 | .param_str = "V256diV256dUi" | ||
| 9571 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9572 | |||
| 9573 | __builtin_ve_vl_vbrv_vvl | ||
| 9574 | .param_str = "V256dV256dUi" | ||
| 9575 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9576 | |||
| 9577 | __builtin_ve_vl_vbrv_vvmvl | ||
| 9578 | .param_str = "V256dV256dV256bV256dUi" | ||
| 9579 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9580 | |||
| 9581 | __builtin_ve_vl_vbrv_vvvl | ||
| 9582 | .param_str = "V256dV256dV256dUi" | ||
| 9583 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9584 | |||
| 9585 | __builtin_ve_vl_vcmpsl_vsvl | ||
| 9586 | .param_str = "V256dLiV256dUi" | ||
| 9587 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9588 | |||
| 9589 | __builtin_ve_vl_vcmpsl_vsvmvl | ||
| 9590 | .param_str = "V256dLiV256dV256bV256dUi" | ||
| 9591 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9592 | |||
| 9593 | __builtin_ve_vl_vcmpsl_vsvvl | ||
| 9594 | .param_str = "V256dLiV256dV256dUi" | ||
| 9595 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9596 | |||
| 9597 | __builtin_ve_vl_vcmpsl_vvvl | ||
| 9598 | .param_str = "V256dV256dV256dUi" | ||
| 9599 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9600 | |||
| 9601 | __builtin_ve_vl_vcmpsl_vvvmvl | ||
| 9602 | .param_str = "V256dV256dV256dV256bV256dUi" | ||
| 9603 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9604 | |||
| 9605 | __builtin_ve_vl_vcmpsl_vvvvl | ||
| 9606 | .param_str = "V256dV256dV256dV256dUi" | ||
| 9607 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9608 | |||
| 9609 | __builtin_ve_vl_vcmpswsx_vsvl | ||
| 9610 | .param_str = "V256diV256dUi" | ||
| 9611 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9612 | |||
| 9613 | __builtin_ve_vl_vcmpswsx_vsvmvl | ||
| 9614 | .param_str = "V256diV256dV256bV256dUi" | ||
| 9615 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9616 | |||
| 9617 | __builtin_ve_vl_vcmpswsx_vsvvl | ||
| 9618 | .param_str = "V256diV256dV256dUi" | ||
| 9619 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9620 | |||
| 9621 | __builtin_ve_vl_vcmpswsx_vvvl | ||
| 9622 | .param_str = "V256dV256dV256dUi" | ||
| 9623 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9624 | |||
| 9625 | __builtin_ve_vl_vcmpswsx_vvvmvl | ||
| 9626 | .param_str = "V256dV256dV256dV256bV256dUi" | ||
| 9627 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9628 | |||
| 9629 | __builtin_ve_vl_vcmpswsx_vvvvl | ||
| 9630 | .param_str = "V256dV256dV256dV256dUi" | ||
| 9631 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9632 | |||
| 9633 | __builtin_ve_vl_vcmpswzx_vsvl | ||
| 9634 | .param_str = "V256diV256dUi" | ||
| 9635 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9636 | |||
| 9637 | __builtin_ve_vl_vcmpswzx_vsvmvl | ||
| 9638 | .param_str = "V256diV256dV256bV256dUi" | ||
| 9639 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9640 | |||
| 9641 | __builtin_ve_vl_vcmpswzx_vsvvl | ||
| 9642 | .param_str = "V256diV256dV256dUi" | ||
| 9643 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9644 | |||
| 9645 | __builtin_ve_vl_vcmpswzx_vvvl | ||
| 9646 | .param_str = "V256dV256dV256dUi" | ||
| 9647 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9648 | |||
| 9649 | __builtin_ve_vl_vcmpswzx_vvvmvl | ||
| 9650 | .param_str = "V256dV256dV256dV256bV256dUi" | ||
| 9651 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9652 | |||
| 9653 | __builtin_ve_vl_vcmpswzx_vvvvl | ||
| 9654 | .param_str = "V256dV256dV256dV256dUi" | ||
| 9655 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9656 | |||
| 9657 | __builtin_ve_vl_vcmpul_vsvl | ||
| 9658 | .param_str = "V256dLUiV256dUi" | ||
| 9659 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9660 | |||
| 9661 | __builtin_ve_vl_vcmpul_vsvmvl | ||
| 9662 | .param_str = "V256dLUiV256dV256bV256dUi" | ||
| 9663 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9664 | |||
| 9665 | __builtin_ve_vl_vcmpul_vsvvl | ||
| 9666 | .param_str = "V256dLUiV256dV256dUi" | ||
| 9667 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9668 | |||
| 9669 | __builtin_ve_vl_vcmpul_vvvl | ||
| 9670 | .param_str = "V256dV256dV256dUi" | ||
| 9671 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9672 | |||
| 9673 | __builtin_ve_vl_vcmpul_vvvmvl | ||
| 9674 | .param_str = "V256dV256dV256dV256bV256dUi" | ||
| 9675 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9676 | |||
| 9677 | __builtin_ve_vl_vcmpul_vvvvl | ||
| 9678 | .param_str = "V256dV256dV256dV256dUi" | ||
| 9679 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9680 | |||
| 9681 | __builtin_ve_vl_vcmpuw_vsvl | ||
| 9682 | .param_str = "V256dUiV256dUi" | ||
| 9683 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9684 | |||
| 9685 | __builtin_ve_vl_vcmpuw_vsvmvl | ||
| 9686 | .param_str = "V256dUiV256dV256bV256dUi" | ||
| 9687 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9688 | |||
| 9689 | __builtin_ve_vl_vcmpuw_vsvvl | ||
| 9690 | .param_str = "V256dUiV256dV256dUi" | ||
| 9691 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9692 | |||
| 9693 | __builtin_ve_vl_vcmpuw_vvvl | ||
| 9694 | .param_str = "V256dV256dV256dUi" | ||
| 9695 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9696 | |||
| 9697 | __builtin_ve_vl_vcmpuw_vvvmvl | ||
| 9698 | .param_str = "V256dV256dV256dV256bV256dUi" | ||
| 9699 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9700 | |||
| 9701 | __builtin_ve_vl_vcmpuw_vvvvl | ||
| 9702 | .param_str = "V256dV256dV256dV256dUi" | ||
| 9703 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9704 | |||
| 9705 | __builtin_ve_vl_vcp_vvmvl | ||
| 9706 | .param_str = "V256dV256dV256bV256dUi" | ||
| 9707 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9708 | |||
| 9709 | __builtin_ve_vl_vcvtdl_vvl | ||
| 9710 | .param_str = "V256dV256dUi" | ||
| 9711 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9712 | |||
| 9713 | __builtin_ve_vl_vcvtdl_vvvl | ||
| 9714 | .param_str = "V256dV256dV256dUi" | ||
| 9715 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9716 | |||
| 9717 | __builtin_ve_vl_vcvtds_vvl | ||
| 9718 | .param_str = "V256dV256dUi" | ||
| 9719 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9720 | |||
| 9721 | __builtin_ve_vl_vcvtds_vvvl | ||
| 9722 | .param_str = "V256dV256dV256dUi" | ||
| 9723 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9724 | |||
| 9725 | __builtin_ve_vl_vcvtdw_vvl | ||
| 9726 | .param_str = "V256dV256dUi" | ||
| 9727 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9728 | |||
| 9729 | __builtin_ve_vl_vcvtdw_vvvl | ||
| 9730 | .param_str = "V256dV256dV256dUi" | ||
| 9731 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9732 | |||
| 9733 | __builtin_ve_vl_vcvtld_vvl | ||
| 9734 | .param_str = "V256dV256dUi" | ||
| 9735 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9736 | |||
| 9737 | __builtin_ve_vl_vcvtld_vvmvl | ||
| 9738 | .param_str = "V256dV256dV256bV256dUi" | ||
| 9739 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9740 | |||
| 9741 | __builtin_ve_vl_vcvtld_vvvl | ||
| 9742 | .param_str = "V256dV256dV256dUi" | ||
| 9743 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9744 | |||
| 9745 | __builtin_ve_vl_vcvtldrz_vvl | ||
| 9746 | .param_str = "V256dV256dUi" | ||
| 9747 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9748 | |||
| 9749 | __builtin_ve_vl_vcvtldrz_vvmvl | ||
| 9750 | .param_str = "V256dV256dV256bV256dUi" | ||
| 9751 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9752 | |||
| 9753 | __builtin_ve_vl_vcvtldrz_vvvl | ||
| 9754 | .param_str = "V256dV256dV256dUi" | ||
| 9755 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9756 | |||
| 9757 | __builtin_ve_vl_vcvtsd_vvl | ||
| 9758 | .param_str = "V256dV256dUi" | ||
| 9759 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9760 | |||
| 9761 | __builtin_ve_vl_vcvtsd_vvvl | ||
| 9762 | .param_str = "V256dV256dV256dUi" | ||
| 9763 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9764 | |||
| 9765 | __builtin_ve_vl_vcvtsw_vvl | ||
| 9766 | .param_str = "V256dV256dUi" | ||
| 9767 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9768 | |||
| 9769 | __builtin_ve_vl_vcvtsw_vvvl | ||
| 9770 | .param_str = "V256dV256dV256dUi" | ||
| 9771 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9772 | |||
| 9773 | __builtin_ve_vl_vcvtwdsx_vvl | ||
| 9774 | .param_str = "V256dV256dUi" | ||
| 9775 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9776 | |||
| 9777 | __builtin_ve_vl_vcvtwdsx_vvmvl | ||
| 9778 | .param_str = "V256dV256dV256bV256dUi" | ||
| 9779 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9780 | |||
| 9781 | __builtin_ve_vl_vcvtwdsx_vvvl | ||
| 9782 | .param_str = "V256dV256dV256dUi" | ||
| 9783 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9784 | |||
| 9785 | __builtin_ve_vl_vcvtwdsxrz_vvl | ||
| 9786 | .param_str = "V256dV256dUi" | ||
| 9787 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9788 | |||
| 9789 | __builtin_ve_vl_vcvtwdsxrz_vvmvl | ||
| 9790 | .param_str = "V256dV256dV256bV256dUi" | ||
| 9791 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9792 | |||
| 9793 | __builtin_ve_vl_vcvtwdsxrz_vvvl | ||
| 9794 | .param_str = "V256dV256dV256dUi" | ||
| 9795 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9796 | |||
| 9797 | __builtin_ve_vl_vcvtwdzx_vvl | ||
| 9798 | .param_str = "V256dV256dUi" | ||
| 9799 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9800 | |||
| 9801 | __builtin_ve_vl_vcvtwdzx_vvmvl | ||
| 9802 | .param_str = "V256dV256dV256bV256dUi" | ||
| 9803 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9804 | |||
| 9805 | __builtin_ve_vl_vcvtwdzx_vvvl | ||
| 9806 | .param_str = "V256dV256dV256dUi" | ||
| 9807 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9808 | |||
| 9809 | __builtin_ve_vl_vcvtwdzxrz_vvl | ||
| 9810 | .param_str = "V256dV256dUi" | ||
| 9811 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9812 | |||
| 9813 | __builtin_ve_vl_vcvtwdzxrz_vvmvl | ||
| 9814 | .param_str = "V256dV256dV256bV256dUi" | ||
| 9815 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9816 | |||
| 9817 | __builtin_ve_vl_vcvtwdzxrz_vvvl | ||
| 9818 | .param_str = "V256dV256dV256dUi" | ||
| 9819 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9820 | |||
| 9821 | __builtin_ve_vl_vcvtwssx_vvl | ||
| 9822 | .param_str = "V256dV256dUi" | ||
| 9823 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9824 | |||
| 9825 | __builtin_ve_vl_vcvtwssx_vvmvl | ||
| 9826 | .param_str = "V256dV256dV256bV256dUi" | ||
| 9827 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9828 | |||
| 9829 | __builtin_ve_vl_vcvtwssx_vvvl | ||
| 9830 | .param_str = "V256dV256dV256dUi" | ||
| 9831 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9832 | |||
| 9833 | __builtin_ve_vl_vcvtwssxrz_vvl | ||
| 9834 | .param_str = "V256dV256dUi" | ||
| 9835 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9836 | |||
| 9837 | __builtin_ve_vl_vcvtwssxrz_vvmvl | ||
| 9838 | .param_str = "V256dV256dV256bV256dUi" | ||
| 9839 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9840 | |||
| 9841 | __builtin_ve_vl_vcvtwssxrz_vvvl | ||
| 9842 | .param_str = "V256dV256dV256dUi" | ||
| 9843 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9844 | |||
| 9845 | __builtin_ve_vl_vcvtwszx_vvl | ||
| 9846 | .param_str = "V256dV256dUi" | ||
| 9847 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9848 | |||
| 9849 | __builtin_ve_vl_vcvtwszx_vvmvl | ||
| 9850 | .param_str = "V256dV256dV256bV256dUi" | ||
| 9851 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9852 | |||
| 9853 | __builtin_ve_vl_vcvtwszx_vvvl | ||
| 9854 | .param_str = "V256dV256dV256dUi" | ||
| 9855 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9856 | |||
| 9857 | __builtin_ve_vl_vcvtwszxrz_vvl | ||
| 9858 | .param_str = "V256dV256dUi" | ||
| 9859 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9860 | |||
| 9861 | __builtin_ve_vl_vcvtwszxrz_vvmvl | ||
| 9862 | .param_str = "V256dV256dV256bV256dUi" | ||
| 9863 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9864 | |||
| 9865 | __builtin_ve_vl_vcvtwszxrz_vvvl | ||
| 9866 | .param_str = "V256dV256dV256dUi" | ||
| 9867 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9868 | |||
| 9869 | __builtin_ve_vl_vdivsl_vsvl | ||
| 9870 | .param_str = "V256dLiV256dUi" | ||
| 9871 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9872 | |||
| 9873 | __builtin_ve_vl_vdivsl_vsvmvl | ||
| 9874 | .param_str = "V256dLiV256dV256bV256dUi" | ||
| 9875 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9876 | |||
| 9877 | __builtin_ve_vl_vdivsl_vsvvl | ||
| 9878 | .param_str = "V256dLiV256dV256dUi" | ||
| 9879 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9880 | |||
| 9881 | __builtin_ve_vl_vdivsl_vvsl | ||
| 9882 | .param_str = "V256dV256dLiUi" | ||
| 9883 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9884 | |||
| 9885 | __builtin_ve_vl_vdivsl_vvsmvl | ||
| 9886 | .param_str = "V256dV256dLiV256bV256dUi" | ||
| 9887 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9888 | |||
| 9889 | __builtin_ve_vl_vdivsl_vvsvl | ||
| 9890 | .param_str = "V256dV256dLiV256dUi" | ||
| 9891 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9892 | |||
| 9893 | __builtin_ve_vl_vdivsl_vvvl | ||
| 9894 | .param_str = "V256dV256dV256dUi" | ||
| 9895 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9896 | |||
| 9897 | __builtin_ve_vl_vdivsl_vvvmvl | ||
| 9898 | .param_str = "V256dV256dV256dV256bV256dUi" | ||
| 9899 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9900 | |||
| 9901 | __builtin_ve_vl_vdivsl_vvvvl | ||
| 9902 | .param_str = "V256dV256dV256dV256dUi" | ||
| 9903 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9904 | |||
| 9905 | __builtin_ve_vl_vdivswsx_vsvl | ||
| 9906 | .param_str = "V256diV256dUi" | ||
| 9907 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9908 | |||
| 9909 | __builtin_ve_vl_vdivswsx_vsvmvl | ||
| 9910 | .param_str = "V256diV256dV256bV256dUi" | ||
| 9911 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9912 | |||
| 9913 | __builtin_ve_vl_vdivswsx_vsvvl | ||
| 9914 | .param_str = "V256diV256dV256dUi" | ||
| 9915 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9916 | |||
| 9917 | __builtin_ve_vl_vdivswsx_vvsl | ||
| 9918 | .param_str = "V256dV256diUi" | ||
| 9919 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9920 | |||
| 9921 | __builtin_ve_vl_vdivswsx_vvsmvl | ||
| 9922 | .param_str = "V256dV256diV256bV256dUi" | ||
| 9923 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9924 | |||
| 9925 | __builtin_ve_vl_vdivswsx_vvsvl | ||
| 9926 | .param_str = "V256dV256diV256dUi" | ||
| 9927 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9928 | |||
| 9929 | __builtin_ve_vl_vdivswsx_vvvl | ||
| 9930 | .param_str = "V256dV256dV256dUi" | ||
| 9931 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9932 | |||
| 9933 | __builtin_ve_vl_vdivswsx_vvvmvl | ||
| 9934 | .param_str = "V256dV256dV256dV256bV256dUi" | ||
| 9935 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9936 | |||
| 9937 | __builtin_ve_vl_vdivswsx_vvvvl | ||
| 9938 | .param_str = "V256dV256dV256dV256dUi" | ||
| 9939 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9940 | |||
| 9941 | __builtin_ve_vl_vdivswzx_vsvl | ||
| 9942 | .param_str = "V256diV256dUi" | ||
| 9943 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9944 | |||
| 9945 | __builtin_ve_vl_vdivswzx_vsvmvl | ||
| 9946 | .param_str = "V256diV256dV256bV256dUi" | ||
| 9947 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9948 | |||
| 9949 | __builtin_ve_vl_vdivswzx_vsvvl | ||
| 9950 | .param_str = "V256diV256dV256dUi" | ||
| 9951 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9952 | |||
| 9953 | __builtin_ve_vl_vdivswzx_vvsl | ||
| 9954 | .param_str = "V256dV256diUi" | ||
| 9955 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9956 | |||
| 9957 | __builtin_ve_vl_vdivswzx_vvsmvl | ||
| 9958 | .param_str = "V256dV256diV256bV256dUi" | ||
| 9959 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9960 | |||
| 9961 | __builtin_ve_vl_vdivswzx_vvsvl | ||
| 9962 | .param_str = "V256dV256diV256dUi" | ||
| 9963 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9964 | |||
| 9965 | __builtin_ve_vl_vdivswzx_vvvl | ||
| 9966 | .param_str = "V256dV256dV256dUi" | ||
| 9967 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9968 | |||
| 9969 | __builtin_ve_vl_vdivswzx_vvvmvl | ||
| 9970 | .param_str = "V256dV256dV256dV256bV256dUi" | ||
| 9971 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9972 | |||
| 9973 | __builtin_ve_vl_vdivswzx_vvvvl | ||
| 9974 | .param_str = "V256dV256dV256dV256dUi" | ||
| 9975 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9976 | |||
| 9977 | __builtin_ve_vl_vdivul_vsvl | ||
| 9978 | .param_str = "V256dLUiV256dUi" | ||
| 9979 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9980 | |||
| 9981 | __builtin_ve_vl_vdivul_vsvmvl | ||
| 9982 | .param_str = "V256dLUiV256dV256bV256dUi" | ||
| 9983 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9984 | |||
| 9985 | __builtin_ve_vl_vdivul_vsvvl | ||
| 9986 | .param_str = "V256dLUiV256dV256dUi" | ||
| 9987 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9988 | |||
| 9989 | __builtin_ve_vl_vdivul_vvsl | ||
| 9990 | .param_str = "V256dV256dLUiUi" | ||
| 9991 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9992 | |||
| 9993 | __builtin_ve_vl_vdivul_vvsmvl | ||
| 9994 | .param_str = "V256dV256dLUiV256bV256dUi" | ||
| 9995 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 9996 | |||
| 9997 | __builtin_ve_vl_vdivul_vvsvl | ||
| 9998 | .param_str = "V256dV256dLUiV256dUi" | ||
| 9999 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10000 | |||
| 10001 | __builtin_ve_vl_vdivul_vvvl | ||
| 10002 | .param_str = "V256dV256dV256dUi" | ||
| 10003 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10004 | |||
| 10005 | __builtin_ve_vl_vdivul_vvvmvl | ||
| 10006 | .param_str = "V256dV256dV256dV256bV256dUi" | ||
| 10007 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10008 | |||
| 10009 | __builtin_ve_vl_vdivul_vvvvl | ||
| 10010 | .param_str = "V256dV256dV256dV256dUi" | ||
| 10011 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10012 | |||
| 10013 | __builtin_ve_vl_vdivuw_vsvl | ||
| 10014 | .param_str = "V256dUiV256dUi" | ||
| 10015 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10016 | |||
| 10017 | __builtin_ve_vl_vdivuw_vsvmvl | ||
| 10018 | .param_str = "V256dUiV256dV256bV256dUi" | ||
| 10019 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10020 | |||
| 10021 | __builtin_ve_vl_vdivuw_vsvvl | ||
| 10022 | .param_str = "V256dUiV256dV256dUi" | ||
| 10023 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10024 | |||
| 10025 | __builtin_ve_vl_vdivuw_vvsl | ||
| 10026 | .param_str = "V256dV256dUiUi" | ||
| 10027 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10028 | |||
| 10029 | __builtin_ve_vl_vdivuw_vvsmvl | ||
| 10030 | .param_str = "V256dV256dUiV256bV256dUi" | ||
| 10031 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10032 | |||
| 10033 | __builtin_ve_vl_vdivuw_vvsvl | ||
| 10034 | .param_str = "V256dV256dUiV256dUi" | ||
| 10035 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10036 | |||
| 10037 | __builtin_ve_vl_vdivuw_vvvl | ||
| 10038 | .param_str = "V256dV256dV256dUi" | ||
| 10039 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10040 | |||
| 10041 | __builtin_ve_vl_vdivuw_vvvmvl | ||
| 10042 | .param_str = "V256dV256dV256dV256bV256dUi" | ||
| 10043 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10044 | |||
| 10045 | __builtin_ve_vl_vdivuw_vvvvl | ||
| 10046 | .param_str = "V256dV256dV256dV256dUi" | ||
| 10047 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10048 | |||
| 10049 | __builtin_ve_vl_veqv_vsvl | ||
| 10050 | .param_str = "V256dLUiV256dUi" | ||
| 10051 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10052 | |||
| 10053 | __builtin_ve_vl_veqv_vsvmvl | ||
| 10054 | .param_str = "V256dLUiV256dV256bV256dUi" | ||
| 10055 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10056 | |||
| 10057 | __builtin_ve_vl_veqv_vsvvl | ||
| 10058 | .param_str = "V256dLUiV256dV256dUi" | ||
| 10059 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10060 | |||
| 10061 | __builtin_ve_vl_veqv_vvvl | ||
| 10062 | .param_str = "V256dV256dV256dUi" | ||
| 10063 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10064 | |||
| 10065 | __builtin_ve_vl_veqv_vvvmvl | ||
| 10066 | .param_str = "V256dV256dV256dV256bV256dUi" | ||
| 10067 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10068 | |||
| 10069 | __builtin_ve_vl_veqv_vvvvl | ||
| 10070 | .param_str = "V256dV256dV256dV256dUi" | ||
| 10071 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10072 | |||
| 10073 | __builtin_ve_vl_vex_vvmvl | ||
| 10074 | .param_str = "V256dV256dV256bV256dUi" | ||
| 10075 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10076 | |||
| 10077 | __builtin_ve_vl_vfaddd_vsvl | ||
| 10078 | .param_str = "V256ddV256dUi" | ||
| 10079 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10080 | |||
| 10081 | __builtin_ve_vl_vfaddd_vsvmvl | ||
| 10082 | .param_str = "V256ddV256dV256bV256dUi" | ||
| 10083 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10084 | |||
| 10085 | __builtin_ve_vl_vfaddd_vsvvl | ||
| 10086 | .param_str = "V256ddV256dV256dUi" | ||
| 10087 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10088 | |||
| 10089 | __builtin_ve_vl_vfaddd_vvvl | ||
| 10090 | .param_str = "V256dV256dV256dUi" | ||
| 10091 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10092 | |||
| 10093 | __builtin_ve_vl_vfaddd_vvvmvl | ||
| 10094 | .param_str = "V256dV256dV256dV256bV256dUi" | ||
| 10095 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10096 | |||
| 10097 | __builtin_ve_vl_vfaddd_vvvvl | ||
| 10098 | .param_str = "V256dV256dV256dV256dUi" | ||
| 10099 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10100 | |||
| 10101 | __builtin_ve_vl_vfadds_vsvl | ||
| 10102 | .param_str = "V256dfV256dUi" | ||
| 10103 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10104 | |||
| 10105 | __builtin_ve_vl_vfadds_vsvmvl | ||
| 10106 | .param_str = "V256dfV256dV256bV256dUi" | ||
| 10107 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10108 | |||
| 10109 | __builtin_ve_vl_vfadds_vsvvl | ||
| 10110 | .param_str = "V256dfV256dV256dUi" | ||
| 10111 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10112 | |||
| 10113 | __builtin_ve_vl_vfadds_vvvl | ||
| 10114 | .param_str = "V256dV256dV256dUi" | ||
| 10115 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10116 | |||
| 10117 | __builtin_ve_vl_vfadds_vvvmvl | ||
| 10118 | .param_str = "V256dV256dV256dV256bV256dUi" | ||
| 10119 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10120 | |||
| 10121 | __builtin_ve_vl_vfadds_vvvvl | ||
| 10122 | .param_str = "V256dV256dV256dV256dUi" | ||
| 10123 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10124 | |||
| 10125 | __builtin_ve_vl_vfcmpd_vsvl | ||
| 10126 | .param_str = "V256ddV256dUi" | ||
| 10127 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10128 | |||
| 10129 | __builtin_ve_vl_vfcmpd_vsvmvl | ||
| 10130 | .param_str = "V256ddV256dV256bV256dUi" | ||
| 10131 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10132 | |||
| 10133 | __builtin_ve_vl_vfcmpd_vsvvl | ||
| 10134 | .param_str = "V256ddV256dV256dUi" | ||
| 10135 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10136 | |||
| 10137 | __builtin_ve_vl_vfcmpd_vvvl | ||
| 10138 | .param_str = "V256dV256dV256dUi" | ||
| 10139 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10140 | |||
| 10141 | __builtin_ve_vl_vfcmpd_vvvmvl | ||
| 10142 | .param_str = "V256dV256dV256dV256bV256dUi" | ||
| 10143 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10144 | |||
| 10145 | __builtin_ve_vl_vfcmpd_vvvvl | ||
| 10146 | .param_str = "V256dV256dV256dV256dUi" | ||
| 10147 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10148 | |||
| 10149 | __builtin_ve_vl_vfcmps_vsvl | ||
| 10150 | .param_str = "V256dfV256dUi" | ||
| 10151 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10152 | |||
| 10153 | __builtin_ve_vl_vfcmps_vsvmvl | ||
| 10154 | .param_str = "V256dfV256dV256bV256dUi" | ||
| 10155 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10156 | |||
| 10157 | __builtin_ve_vl_vfcmps_vsvvl | ||
| 10158 | .param_str = "V256dfV256dV256dUi" | ||
| 10159 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10160 | |||
| 10161 | __builtin_ve_vl_vfcmps_vvvl | ||
| 10162 | .param_str = "V256dV256dV256dUi" | ||
| 10163 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10164 | |||
| 10165 | __builtin_ve_vl_vfcmps_vvvmvl | ||
| 10166 | .param_str = "V256dV256dV256dV256bV256dUi" | ||
| 10167 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10168 | |||
| 10169 | __builtin_ve_vl_vfcmps_vvvvl | ||
| 10170 | .param_str = "V256dV256dV256dV256dUi" | ||
| 10171 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10172 | |||
| 10173 | __builtin_ve_vl_vfdivd_vsvl | ||
| 10174 | .param_str = "V256ddV256dUi" | ||
| 10175 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10176 | |||
| 10177 | __builtin_ve_vl_vfdivd_vsvmvl | ||
| 10178 | .param_str = "V256ddV256dV256bV256dUi" | ||
| 10179 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10180 | |||
| 10181 | __builtin_ve_vl_vfdivd_vsvvl | ||
| 10182 | .param_str = "V256ddV256dV256dUi" | ||
| 10183 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10184 | |||
| 10185 | __builtin_ve_vl_vfdivd_vvvl | ||
| 10186 | .param_str = "V256dV256dV256dUi" | ||
| 10187 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10188 | |||
| 10189 | __builtin_ve_vl_vfdivd_vvvmvl | ||
| 10190 | .param_str = "V256dV256dV256dV256bV256dUi" | ||
| 10191 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10192 | |||
| 10193 | __builtin_ve_vl_vfdivd_vvvvl | ||
| 10194 | .param_str = "V256dV256dV256dV256dUi" | ||
| 10195 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10196 | |||
| 10197 | __builtin_ve_vl_vfdivs_vsvl | ||
| 10198 | .param_str = "V256dfV256dUi" | ||
| 10199 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10200 | |||
| 10201 | __builtin_ve_vl_vfdivs_vsvmvl | ||
| 10202 | .param_str = "V256dfV256dV256bV256dUi" | ||
| 10203 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10204 | |||
| 10205 | __builtin_ve_vl_vfdivs_vsvvl | ||
| 10206 | .param_str = "V256dfV256dV256dUi" | ||
| 10207 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10208 | |||
| 10209 | __builtin_ve_vl_vfdivs_vvvl | ||
| 10210 | .param_str = "V256dV256dV256dUi" | ||
| 10211 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10212 | |||
| 10213 | __builtin_ve_vl_vfdivs_vvvmvl | ||
| 10214 | .param_str = "V256dV256dV256dV256bV256dUi" | ||
| 10215 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10216 | |||
| 10217 | __builtin_ve_vl_vfdivs_vvvvl | ||
| 10218 | .param_str = "V256dV256dV256dV256dUi" | ||
| 10219 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10220 | |||
| 10221 | __builtin_ve_vl_vfmadd_vsvvl | ||
| 10222 | .param_str = "V256ddV256dV256dUi" | ||
| 10223 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10224 | |||
| 10225 | __builtin_ve_vl_vfmadd_vsvvmvl | ||
| 10226 | .param_str = "V256ddV256dV256dV256bV256dUi" | ||
| 10227 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10228 | |||
| 10229 | __builtin_ve_vl_vfmadd_vsvvvl | ||
| 10230 | .param_str = "V256ddV256dV256dV256dUi" | ||
| 10231 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10232 | |||
| 10233 | __builtin_ve_vl_vfmadd_vvsvl | ||
| 10234 | .param_str = "V256dV256ddV256dUi" | ||
| 10235 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10236 | |||
| 10237 | __builtin_ve_vl_vfmadd_vvsvmvl | ||
| 10238 | .param_str = "V256dV256ddV256dV256bV256dUi" | ||
| 10239 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10240 | |||
| 10241 | __builtin_ve_vl_vfmadd_vvsvvl | ||
| 10242 | .param_str = "V256dV256ddV256dV256dUi" | ||
| 10243 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10244 | |||
| 10245 | __builtin_ve_vl_vfmadd_vvvvl | ||
| 10246 | .param_str = "V256dV256dV256dV256dUi" | ||
| 10247 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10248 | |||
| 10249 | __builtin_ve_vl_vfmadd_vvvvmvl | ||
| 10250 | .param_str = "V256dV256dV256dV256dV256bV256dUi" | ||
| 10251 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10252 | |||
| 10253 | __builtin_ve_vl_vfmadd_vvvvvl | ||
| 10254 | .param_str = "V256dV256dV256dV256dV256dUi" | ||
| 10255 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10256 | |||
| 10257 | __builtin_ve_vl_vfmads_vsvvl | ||
| 10258 | .param_str = "V256dfV256dV256dUi" | ||
| 10259 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10260 | |||
| 10261 | __builtin_ve_vl_vfmads_vsvvmvl | ||
| 10262 | .param_str = "V256dfV256dV256dV256bV256dUi" | ||
| 10263 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10264 | |||
| 10265 | __builtin_ve_vl_vfmads_vsvvvl | ||
| 10266 | .param_str = "V256dfV256dV256dV256dUi" | ||
| 10267 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10268 | |||
| 10269 | __builtin_ve_vl_vfmads_vvsvl | ||
| 10270 | .param_str = "V256dV256dfV256dUi" | ||
| 10271 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10272 | |||
| 10273 | __builtin_ve_vl_vfmads_vvsvmvl | ||
| 10274 | .param_str = "V256dV256dfV256dV256bV256dUi" | ||
| 10275 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10276 | |||
| 10277 | __builtin_ve_vl_vfmads_vvsvvl | ||
| 10278 | .param_str = "V256dV256dfV256dV256dUi" | ||
| 10279 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10280 | |||
| 10281 | __builtin_ve_vl_vfmads_vvvvl | ||
| 10282 | .param_str = "V256dV256dV256dV256dUi" | ||
| 10283 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10284 | |||
| 10285 | __builtin_ve_vl_vfmads_vvvvmvl | ||
| 10286 | .param_str = "V256dV256dV256dV256dV256bV256dUi" | ||
| 10287 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10288 | |||
| 10289 | __builtin_ve_vl_vfmads_vvvvvl | ||
| 10290 | .param_str = "V256dV256dV256dV256dV256dUi" | ||
| 10291 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10292 | |||
| 10293 | __builtin_ve_vl_vfmaxd_vsvl | ||
| 10294 | .param_str = "V256ddV256dUi" | ||
| 10295 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10296 | |||
| 10297 | __builtin_ve_vl_vfmaxd_vsvmvl | ||
| 10298 | .param_str = "V256ddV256dV256bV256dUi" | ||
| 10299 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10300 | |||
| 10301 | __builtin_ve_vl_vfmaxd_vsvvl | ||
| 10302 | .param_str = "V256ddV256dV256dUi" | ||
| 10303 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10304 | |||
| 10305 | __builtin_ve_vl_vfmaxd_vvvl | ||
| 10306 | .param_str = "V256dV256dV256dUi" | ||
| 10307 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10308 | |||
| 10309 | __builtin_ve_vl_vfmaxd_vvvmvl | ||
| 10310 | .param_str = "V256dV256dV256dV256bV256dUi" | ||
| 10311 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10312 | |||
| 10313 | __builtin_ve_vl_vfmaxd_vvvvl | ||
| 10314 | .param_str = "V256dV256dV256dV256dUi" | ||
| 10315 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10316 | |||
| 10317 | __builtin_ve_vl_vfmaxs_vsvl | ||
| 10318 | .param_str = "V256dfV256dUi" | ||
| 10319 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10320 | |||
| 10321 | __builtin_ve_vl_vfmaxs_vsvmvl | ||
| 10322 | .param_str = "V256dfV256dV256bV256dUi" | ||
| 10323 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10324 | |||
| 10325 | __builtin_ve_vl_vfmaxs_vsvvl | ||
| 10326 | .param_str = "V256dfV256dV256dUi" | ||
| 10327 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10328 | |||
| 10329 | __builtin_ve_vl_vfmaxs_vvvl | ||
| 10330 | .param_str = "V256dV256dV256dUi" | ||
| 10331 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10332 | |||
| 10333 | __builtin_ve_vl_vfmaxs_vvvmvl | ||
| 10334 | .param_str = "V256dV256dV256dV256bV256dUi" | ||
| 10335 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10336 | |||
| 10337 | __builtin_ve_vl_vfmaxs_vvvvl | ||
| 10338 | .param_str = "V256dV256dV256dV256dUi" | ||
| 10339 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10340 | |||
| 10341 | __builtin_ve_vl_vfmind_vsvl | ||
| 10342 | .param_str = "V256ddV256dUi" | ||
| 10343 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10344 | |||
| 10345 | __builtin_ve_vl_vfmind_vsvmvl | ||
| 10346 | .param_str = "V256ddV256dV256bV256dUi" | ||
| 10347 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10348 | |||
| 10349 | __builtin_ve_vl_vfmind_vsvvl | ||
| 10350 | .param_str = "V256ddV256dV256dUi" | ||
| 10351 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10352 | |||
| 10353 | __builtin_ve_vl_vfmind_vvvl | ||
| 10354 | .param_str = "V256dV256dV256dUi" | ||
| 10355 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10356 | |||
| 10357 | __builtin_ve_vl_vfmind_vvvmvl | ||
| 10358 | .param_str = "V256dV256dV256dV256bV256dUi" | ||
| 10359 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10360 | |||
| 10361 | __builtin_ve_vl_vfmind_vvvvl | ||
| 10362 | .param_str = "V256dV256dV256dV256dUi" | ||
| 10363 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10364 | |||
| 10365 | __builtin_ve_vl_vfmins_vsvl | ||
| 10366 | .param_str = "V256dfV256dUi" | ||
| 10367 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10368 | |||
| 10369 | __builtin_ve_vl_vfmins_vsvmvl | ||
| 10370 | .param_str = "V256dfV256dV256bV256dUi" | ||
| 10371 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10372 | |||
| 10373 | __builtin_ve_vl_vfmins_vsvvl | ||
| 10374 | .param_str = "V256dfV256dV256dUi" | ||
| 10375 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10376 | |||
| 10377 | __builtin_ve_vl_vfmins_vvvl | ||
| 10378 | .param_str = "V256dV256dV256dUi" | ||
| 10379 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10380 | |||
| 10381 | __builtin_ve_vl_vfmins_vvvmvl | ||
| 10382 | .param_str = "V256dV256dV256dV256bV256dUi" | ||
| 10383 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10384 | |||
| 10385 | __builtin_ve_vl_vfmins_vvvvl | ||
| 10386 | .param_str = "V256dV256dV256dV256dUi" | ||
| 10387 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10388 | |||
| 10389 | __builtin_ve_vl_vfmkdeq_mvl | ||
| 10390 | .param_str = "V256bV256dUi" | ||
| 10391 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10392 | |||
| 10393 | __builtin_ve_vl_vfmkdeq_mvml | ||
| 10394 | .param_str = "V256bV256dV256bUi" | ||
| 10395 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10396 | |||
| 10397 | __builtin_ve_vl_vfmkdeqnan_mvl | ||
| 10398 | .param_str = "V256bV256dUi" | ||
| 10399 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10400 | |||
| 10401 | __builtin_ve_vl_vfmkdeqnan_mvml | ||
| 10402 | .param_str = "V256bV256dV256bUi" | ||
| 10403 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10404 | |||
| 10405 | __builtin_ve_vl_vfmkdge_mvl | ||
| 10406 | .param_str = "V256bV256dUi" | ||
| 10407 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10408 | |||
| 10409 | __builtin_ve_vl_vfmkdge_mvml | ||
| 10410 | .param_str = "V256bV256dV256bUi" | ||
| 10411 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10412 | |||
| 10413 | __builtin_ve_vl_vfmkdgenan_mvl | ||
| 10414 | .param_str = "V256bV256dUi" | ||
| 10415 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10416 | |||
| 10417 | __builtin_ve_vl_vfmkdgenan_mvml | ||
| 10418 | .param_str = "V256bV256dV256bUi" | ||
| 10419 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10420 | |||
| 10421 | __builtin_ve_vl_vfmkdgt_mvl | ||
| 10422 | .param_str = "V256bV256dUi" | ||
| 10423 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10424 | |||
| 10425 | __builtin_ve_vl_vfmkdgt_mvml | ||
| 10426 | .param_str = "V256bV256dV256bUi" | ||
| 10427 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10428 | |||
| 10429 | __builtin_ve_vl_vfmkdgtnan_mvl | ||
| 10430 | .param_str = "V256bV256dUi" | ||
| 10431 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10432 | |||
| 10433 | __builtin_ve_vl_vfmkdgtnan_mvml | ||
| 10434 | .param_str = "V256bV256dV256bUi" | ||
| 10435 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10436 | |||
| 10437 | __builtin_ve_vl_vfmkdle_mvl | ||
| 10438 | .param_str = "V256bV256dUi" | ||
| 10439 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10440 | |||
| 10441 | __builtin_ve_vl_vfmkdle_mvml | ||
| 10442 | .param_str = "V256bV256dV256bUi" | ||
| 10443 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10444 | |||
| 10445 | __builtin_ve_vl_vfmkdlenan_mvl | ||
| 10446 | .param_str = "V256bV256dUi" | ||
| 10447 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10448 | |||
| 10449 | __builtin_ve_vl_vfmkdlenan_mvml | ||
| 10450 | .param_str = "V256bV256dV256bUi" | ||
| 10451 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10452 | |||
| 10453 | __builtin_ve_vl_vfmkdlt_mvl | ||
| 10454 | .param_str = "V256bV256dUi" | ||
| 10455 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10456 | |||
| 10457 | __builtin_ve_vl_vfmkdlt_mvml | ||
| 10458 | .param_str = "V256bV256dV256bUi" | ||
| 10459 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10460 | |||
| 10461 | __builtin_ve_vl_vfmkdltnan_mvl | ||
| 10462 | .param_str = "V256bV256dUi" | ||
| 10463 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10464 | |||
| 10465 | __builtin_ve_vl_vfmkdltnan_mvml | ||
| 10466 | .param_str = "V256bV256dV256bUi" | ||
| 10467 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10468 | |||
| 10469 | __builtin_ve_vl_vfmkdnan_mvl | ||
| 10470 | .param_str = "V256bV256dUi" | ||
| 10471 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10472 | |||
| 10473 | __builtin_ve_vl_vfmkdnan_mvml | ||
| 10474 | .param_str = "V256bV256dV256bUi" | ||
| 10475 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10476 | |||
| 10477 | __builtin_ve_vl_vfmkdne_mvl | ||
| 10478 | .param_str = "V256bV256dUi" | ||
| 10479 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10480 | |||
| 10481 | __builtin_ve_vl_vfmkdne_mvml | ||
| 10482 | .param_str = "V256bV256dV256bUi" | ||
| 10483 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10484 | |||
| 10485 | __builtin_ve_vl_vfmkdnenan_mvl | ||
| 10486 | .param_str = "V256bV256dUi" | ||
| 10487 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10488 | |||
| 10489 | __builtin_ve_vl_vfmkdnenan_mvml | ||
| 10490 | .param_str = "V256bV256dV256bUi" | ||
| 10491 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10492 | |||
| 10493 | __builtin_ve_vl_vfmkdnum_mvl | ||
| 10494 | .param_str = "V256bV256dUi" | ||
| 10495 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10496 | |||
| 10497 | __builtin_ve_vl_vfmkdnum_mvml | ||
| 10498 | .param_str = "V256bV256dV256bUi" | ||
| 10499 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10500 | |||
| 10501 | __builtin_ve_vl_vfmklaf_ml | ||
| 10502 | .param_str = "V256bUi" | ||
| 10503 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10504 | |||
| 10505 | __builtin_ve_vl_vfmklat_ml | ||
| 10506 | .param_str = "V256bUi" | ||
| 10507 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10508 | |||
| 10509 | __builtin_ve_vl_vfmkleq_mvl | ||
| 10510 | .param_str = "V256bV256dUi" | ||
| 10511 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10512 | |||
| 10513 | __builtin_ve_vl_vfmkleq_mvml | ||
| 10514 | .param_str = "V256bV256dV256bUi" | ||
| 10515 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10516 | |||
| 10517 | __builtin_ve_vl_vfmkleqnan_mvl | ||
| 10518 | .param_str = "V256bV256dUi" | ||
| 10519 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10520 | |||
| 10521 | __builtin_ve_vl_vfmkleqnan_mvml | ||
| 10522 | .param_str = "V256bV256dV256bUi" | ||
| 10523 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10524 | |||
| 10525 | __builtin_ve_vl_vfmklge_mvl | ||
| 10526 | .param_str = "V256bV256dUi" | ||
| 10527 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10528 | |||
| 10529 | __builtin_ve_vl_vfmklge_mvml | ||
| 10530 | .param_str = "V256bV256dV256bUi" | ||
| 10531 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10532 | |||
| 10533 | __builtin_ve_vl_vfmklgenan_mvl | ||
| 10534 | .param_str = "V256bV256dUi" | ||
| 10535 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10536 | |||
| 10537 | __builtin_ve_vl_vfmklgenan_mvml | ||
| 10538 | .param_str = "V256bV256dV256bUi" | ||
| 10539 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10540 | |||
| 10541 | __builtin_ve_vl_vfmklgt_mvl | ||
| 10542 | .param_str = "V256bV256dUi" | ||
| 10543 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10544 | |||
| 10545 | __builtin_ve_vl_vfmklgt_mvml | ||
| 10546 | .param_str = "V256bV256dV256bUi" | ||
| 10547 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10548 | |||
| 10549 | __builtin_ve_vl_vfmklgtnan_mvl | ||
| 10550 | .param_str = "V256bV256dUi" | ||
| 10551 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10552 | |||
| 10553 | __builtin_ve_vl_vfmklgtnan_mvml | ||
| 10554 | .param_str = "V256bV256dV256bUi" | ||
| 10555 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10556 | |||
| 10557 | __builtin_ve_vl_vfmklle_mvl | ||
| 10558 | .param_str = "V256bV256dUi" | ||
| 10559 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10560 | |||
| 10561 | __builtin_ve_vl_vfmklle_mvml | ||
| 10562 | .param_str = "V256bV256dV256bUi" | ||
| 10563 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10564 | |||
| 10565 | __builtin_ve_vl_vfmkllenan_mvl | ||
| 10566 | .param_str = "V256bV256dUi" | ||
| 10567 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10568 | |||
| 10569 | __builtin_ve_vl_vfmkllenan_mvml | ||
| 10570 | .param_str = "V256bV256dV256bUi" | ||
| 10571 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10572 | |||
| 10573 | __builtin_ve_vl_vfmkllt_mvl | ||
| 10574 | .param_str = "V256bV256dUi" | ||
| 10575 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10576 | |||
| 10577 | __builtin_ve_vl_vfmkllt_mvml | ||
| 10578 | .param_str = "V256bV256dV256bUi" | ||
| 10579 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10580 | |||
| 10581 | __builtin_ve_vl_vfmklltnan_mvl | ||
| 10582 | .param_str = "V256bV256dUi" | ||
| 10583 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10584 | |||
| 10585 | __builtin_ve_vl_vfmklltnan_mvml | ||
| 10586 | .param_str = "V256bV256dV256bUi" | ||
| 10587 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10588 | |||
| 10589 | __builtin_ve_vl_vfmklnan_mvl | ||
| 10590 | .param_str = "V256bV256dUi" | ||
| 10591 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10592 | |||
| 10593 | __builtin_ve_vl_vfmklnan_mvml | ||
| 10594 | .param_str = "V256bV256dV256bUi" | ||
| 10595 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10596 | |||
| 10597 | __builtin_ve_vl_vfmklne_mvl | ||
| 10598 | .param_str = "V256bV256dUi" | ||
| 10599 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10600 | |||
| 10601 | __builtin_ve_vl_vfmklne_mvml | ||
| 10602 | .param_str = "V256bV256dV256bUi" | ||
| 10603 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10604 | |||
| 10605 | __builtin_ve_vl_vfmklnenan_mvl | ||
| 10606 | .param_str = "V256bV256dUi" | ||
| 10607 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10608 | |||
| 10609 | __builtin_ve_vl_vfmklnenan_mvml | ||
| 10610 | .param_str = "V256bV256dV256bUi" | ||
| 10611 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10612 | |||
| 10613 | __builtin_ve_vl_vfmklnum_mvl | ||
| 10614 | .param_str = "V256bV256dUi" | ||
| 10615 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10616 | |||
| 10617 | __builtin_ve_vl_vfmklnum_mvml | ||
| 10618 | .param_str = "V256bV256dV256bUi" | ||
| 10619 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10620 | |||
| 10621 | __builtin_ve_vl_vfmkseq_mvl | ||
| 10622 | .param_str = "V256bV256dUi" | ||
| 10623 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10624 | |||
| 10625 | __builtin_ve_vl_vfmkseq_mvml | ||
| 10626 | .param_str = "V256bV256dV256bUi" | ||
| 10627 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10628 | |||
| 10629 | __builtin_ve_vl_vfmkseqnan_mvl | ||
| 10630 | .param_str = "V256bV256dUi" | ||
| 10631 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10632 | |||
| 10633 | __builtin_ve_vl_vfmkseqnan_mvml | ||
| 10634 | .param_str = "V256bV256dV256bUi" | ||
| 10635 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10636 | |||
| 10637 | __builtin_ve_vl_vfmksge_mvl | ||
| 10638 | .param_str = "V256bV256dUi" | ||
| 10639 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10640 | |||
| 10641 | __builtin_ve_vl_vfmksge_mvml | ||
| 10642 | .param_str = "V256bV256dV256bUi" | ||
| 10643 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10644 | |||
| 10645 | __builtin_ve_vl_vfmksgenan_mvl | ||
| 10646 | .param_str = "V256bV256dUi" | ||
| 10647 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10648 | |||
| 10649 | __builtin_ve_vl_vfmksgenan_mvml | ||
| 10650 | .param_str = "V256bV256dV256bUi" | ||
| 10651 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10652 | |||
| 10653 | __builtin_ve_vl_vfmksgt_mvl | ||
| 10654 | .param_str = "V256bV256dUi" | ||
| 10655 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10656 | |||
| 10657 | __builtin_ve_vl_vfmksgt_mvml | ||
| 10658 | .param_str = "V256bV256dV256bUi" | ||
| 10659 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10660 | |||
| 10661 | __builtin_ve_vl_vfmksgtnan_mvl | ||
| 10662 | .param_str = "V256bV256dUi" | ||
| 10663 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10664 | |||
| 10665 | __builtin_ve_vl_vfmksgtnan_mvml | ||
| 10666 | .param_str = "V256bV256dV256bUi" | ||
| 10667 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10668 | |||
| 10669 | __builtin_ve_vl_vfmksle_mvl | ||
| 10670 | .param_str = "V256bV256dUi" | ||
| 10671 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10672 | |||
| 10673 | __builtin_ve_vl_vfmksle_mvml | ||
| 10674 | .param_str = "V256bV256dV256bUi" | ||
| 10675 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10676 | |||
| 10677 | __builtin_ve_vl_vfmkslenan_mvl | ||
| 10678 | .param_str = "V256bV256dUi" | ||
| 10679 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10680 | |||
| 10681 | __builtin_ve_vl_vfmkslenan_mvml | ||
| 10682 | .param_str = "V256bV256dV256bUi" | ||
| 10683 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10684 | |||
| 10685 | __builtin_ve_vl_vfmkslt_mvl | ||
| 10686 | .param_str = "V256bV256dUi" | ||
| 10687 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10688 | |||
| 10689 | __builtin_ve_vl_vfmkslt_mvml | ||
| 10690 | .param_str = "V256bV256dV256bUi" | ||
| 10691 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10692 | |||
| 10693 | __builtin_ve_vl_vfmksltnan_mvl | ||
| 10694 | .param_str = "V256bV256dUi" | ||
| 10695 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10696 | |||
| 10697 | __builtin_ve_vl_vfmksltnan_mvml | ||
| 10698 | .param_str = "V256bV256dV256bUi" | ||
| 10699 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10700 | |||
| 10701 | __builtin_ve_vl_vfmksnan_mvl | ||
| 10702 | .param_str = "V256bV256dUi" | ||
| 10703 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10704 | |||
| 10705 | __builtin_ve_vl_vfmksnan_mvml | ||
| 10706 | .param_str = "V256bV256dV256bUi" | ||
| 10707 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10708 | |||
| 10709 | __builtin_ve_vl_vfmksne_mvl | ||
| 10710 | .param_str = "V256bV256dUi" | ||
| 10711 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10712 | |||
| 10713 | __builtin_ve_vl_vfmksne_mvml | ||
| 10714 | .param_str = "V256bV256dV256bUi" | ||
| 10715 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10716 | |||
| 10717 | __builtin_ve_vl_vfmksnenan_mvl | ||
| 10718 | .param_str = "V256bV256dUi" | ||
| 10719 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10720 | |||
| 10721 | __builtin_ve_vl_vfmksnenan_mvml | ||
| 10722 | .param_str = "V256bV256dV256bUi" | ||
| 10723 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10724 | |||
| 10725 | __builtin_ve_vl_vfmksnum_mvl | ||
| 10726 | .param_str = "V256bV256dUi" | ||
| 10727 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10728 | |||
| 10729 | __builtin_ve_vl_vfmksnum_mvml | ||
| 10730 | .param_str = "V256bV256dV256bUi" | ||
| 10731 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10732 | |||
| 10733 | __builtin_ve_vl_vfmkweq_mvl | ||
| 10734 | .param_str = "V256bV256dUi" | ||
| 10735 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10736 | |||
| 10737 | __builtin_ve_vl_vfmkweq_mvml | ||
| 10738 | .param_str = "V256bV256dV256bUi" | ||
| 10739 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10740 | |||
| 10741 | __builtin_ve_vl_vfmkweqnan_mvl | ||
| 10742 | .param_str = "V256bV256dUi" | ||
| 10743 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10744 | |||
| 10745 | __builtin_ve_vl_vfmkweqnan_mvml | ||
| 10746 | .param_str = "V256bV256dV256bUi" | ||
| 10747 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10748 | |||
| 10749 | __builtin_ve_vl_vfmkwge_mvl | ||
| 10750 | .param_str = "V256bV256dUi" | ||
| 10751 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10752 | |||
| 10753 | __builtin_ve_vl_vfmkwge_mvml | ||
| 10754 | .param_str = "V256bV256dV256bUi" | ||
| 10755 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10756 | |||
| 10757 | __builtin_ve_vl_vfmkwgenan_mvl | ||
| 10758 | .param_str = "V256bV256dUi" | ||
| 10759 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10760 | |||
| 10761 | __builtin_ve_vl_vfmkwgenan_mvml | ||
| 10762 | .param_str = "V256bV256dV256bUi" | ||
| 10763 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10764 | |||
| 10765 | __builtin_ve_vl_vfmkwgt_mvl | ||
| 10766 | .param_str = "V256bV256dUi" | ||
| 10767 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10768 | |||
| 10769 | __builtin_ve_vl_vfmkwgt_mvml | ||
| 10770 | .param_str = "V256bV256dV256bUi" | ||
| 10771 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10772 | |||
| 10773 | __builtin_ve_vl_vfmkwgtnan_mvl | ||
| 10774 | .param_str = "V256bV256dUi" | ||
| 10775 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10776 | |||
| 10777 | __builtin_ve_vl_vfmkwgtnan_mvml | ||
| 10778 | .param_str = "V256bV256dV256bUi" | ||
| 10779 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10780 | |||
| 10781 | __builtin_ve_vl_vfmkwle_mvl | ||
| 10782 | .param_str = "V256bV256dUi" | ||
| 10783 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10784 | |||
| 10785 | __builtin_ve_vl_vfmkwle_mvml | ||
| 10786 | .param_str = "V256bV256dV256bUi" | ||
| 10787 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10788 | |||
| 10789 | __builtin_ve_vl_vfmkwlenan_mvl | ||
| 10790 | .param_str = "V256bV256dUi" | ||
| 10791 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10792 | |||
| 10793 | __builtin_ve_vl_vfmkwlenan_mvml | ||
| 10794 | .param_str = "V256bV256dV256bUi" | ||
| 10795 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10796 | |||
| 10797 | __builtin_ve_vl_vfmkwlt_mvl | ||
| 10798 | .param_str = "V256bV256dUi" | ||
| 10799 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10800 | |||
| 10801 | __builtin_ve_vl_vfmkwlt_mvml | ||
| 10802 | .param_str = "V256bV256dV256bUi" | ||
| 10803 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10804 | |||
| 10805 | __builtin_ve_vl_vfmkwltnan_mvl | ||
| 10806 | .param_str = "V256bV256dUi" | ||
| 10807 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10808 | |||
| 10809 | __builtin_ve_vl_vfmkwltnan_mvml | ||
| 10810 | .param_str = "V256bV256dV256bUi" | ||
| 10811 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10812 | |||
| 10813 | __builtin_ve_vl_vfmkwnan_mvl | ||
| 10814 | .param_str = "V256bV256dUi" | ||
| 10815 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10816 | |||
| 10817 | __builtin_ve_vl_vfmkwnan_mvml | ||
| 10818 | .param_str = "V256bV256dV256bUi" | ||
| 10819 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10820 | |||
| 10821 | __builtin_ve_vl_vfmkwne_mvl | ||
| 10822 | .param_str = "V256bV256dUi" | ||
| 10823 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10824 | |||
| 10825 | __builtin_ve_vl_vfmkwne_mvml | ||
| 10826 | .param_str = "V256bV256dV256bUi" | ||
| 10827 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10828 | |||
| 10829 | __builtin_ve_vl_vfmkwnenan_mvl | ||
| 10830 | .param_str = "V256bV256dUi" | ||
| 10831 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10832 | |||
| 10833 | __builtin_ve_vl_vfmkwnenan_mvml | ||
| 10834 | .param_str = "V256bV256dV256bUi" | ||
| 10835 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10836 | |||
| 10837 | __builtin_ve_vl_vfmkwnum_mvl | ||
| 10838 | .param_str = "V256bV256dUi" | ||
| 10839 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10840 | |||
| 10841 | __builtin_ve_vl_vfmkwnum_mvml | ||
| 10842 | .param_str = "V256bV256dV256bUi" | ||
| 10843 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10844 | |||
| 10845 | __builtin_ve_vl_vfmsbd_vsvvl | ||
| 10846 | .param_str = "V256ddV256dV256dUi" | ||
| 10847 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10848 | |||
| 10849 | __builtin_ve_vl_vfmsbd_vsvvmvl | ||
| 10850 | .param_str = "V256ddV256dV256dV256bV256dUi" | ||
| 10851 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10852 | |||
| 10853 | __builtin_ve_vl_vfmsbd_vsvvvl | ||
| 10854 | .param_str = "V256ddV256dV256dV256dUi" | ||
| 10855 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10856 | |||
| 10857 | __builtin_ve_vl_vfmsbd_vvsvl | ||
| 10858 | .param_str = "V256dV256ddV256dUi" | ||
| 10859 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10860 | |||
| 10861 | __builtin_ve_vl_vfmsbd_vvsvmvl | ||
| 10862 | .param_str = "V256dV256ddV256dV256bV256dUi" | ||
| 10863 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10864 | |||
| 10865 | __builtin_ve_vl_vfmsbd_vvsvvl | ||
| 10866 | .param_str = "V256dV256ddV256dV256dUi" | ||
| 10867 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10868 | |||
| 10869 | __builtin_ve_vl_vfmsbd_vvvvl | ||
| 10870 | .param_str = "V256dV256dV256dV256dUi" | ||
| 10871 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10872 | |||
| 10873 | __builtin_ve_vl_vfmsbd_vvvvmvl | ||
| 10874 | .param_str = "V256dV256dV256dV256dV256bV256dUi" | ||
| 10875 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10876 | |||
| 10877 | __builtin_ve_vl_vfmsbd_vvvvvl | ||
| 10878 | .param_str = "V256dV256dV256dV256dV256dUi" | ||
| 10879 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10880 | |||
| 10881 | __builtin_ve_vl_vfmsbs_vsvvl | ||
| 10882 | .param_str = "V256dfV256dV256dUi" | ||
| 10883 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10884 | |||
| 10885 | __builtin_ve_vl_vfmsbs_vsvvmvl | ||
| 10886 | .param_str = "V256dfV256dV256dV256bV256dUi" | ||
| 10887 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10888 | |||
| 10889 | __builtin_ve_vl_vfmsbs_vsvvvl | ||
| 10890 | .param_str = "V256dfV256dV256dV256dUi" | ||
| 10891 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10892 | |||
| 10893 | __builtin_ve_vl_vfmsbs_vvsvl | ||
| 10894 | .param_str = "V256dV256dfV256dUi" | ||
| 10895 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10896 | |||
| 10897 | __builtin_ve_vl_vfmsbs_vvsvmvl | ||
| 10898 | .param_str = "V256dV256dfV256dV256bV256dUi" | ||
| 10899 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10900 | |||
| 10901 | __builtin_ve_vl_vfmsbs_vvsvvl | ||
| 10902 | .param_str = "V256dV256dfV256dV256dUi" | ||
| 10903 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10904 | |||
| 10905 | __builtin_ve_vl_vfmsbs_vvvvl | ||
| 10906 | .param_str = "V256dV256dV256dV256dUi" | ||
| 10907 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10908 | |||
| 10909 | __builtin_ve_vl_vfmsbs_vvvvmvl | ||
| 10910 | .param_str = "V256dV256dV256dV256dV256bV256dUi" | ||
| 10911 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10912 | |||
| 10913 | __builtin_ve_vl_vfmsbs_vvvvvl | ||
| 10914 | .param_str = "V256dV256dV256dV256dV256dUi" | ||
| 10915 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10916 | |||
| 10917 | __builtin_ve_vl_vfmuld_vsvl | ||
| 10918 | .param_str = "V256ddV256dUi" | ||
| 10919 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10920 | |||
| 10921 | __builtin_ve_vl_vfmuld_vsvmvl | ||
| 10922 | .param_str = "V256ddV256dV256bV256dUi" | ||
| 10923 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10924 | |||
| 10925 | __builtin_ve_vl_vfmuld_vsvvl | ||
| 10926 | .param_str = "V256ddV256dV256dUi" | ||
| 10927 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10928 | |||
| 10929 | __builtin_ve_vl_vfmuld_vvvl | ||
| 10930 | .param_str = "V256dV256dV256dUi" | ||
| 10931 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10932 | |||
| 10933 | __builtin_ve_vl_vfmuld_vvvmvl | ||
| 10934 | .param_str = "V256dV256dV256dV256bV256dUi" | ||
| 10935 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10936 | |||
| 10937 | __builtin_ve_vl_vfmuld_vvvvl | ||
| 10938 | .param_str = "V256dV256dV256dV256dUi" | ||
| 10939 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10940 | |||
| 10941 | __builtin_ve_vl_vfmuls_vsvl | ||
| 10942 | .param_str = "V256dfV256dUi" | ||
| 10943 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10944 | |||
| 10945 | __builtin_ve_vl_vfmuls_vsvmvl | ||
| 10946 | .param_str = "V256dfV256dV256bV256dUi" | ||
| 10947 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10948 | |||
| 10949 | __builtin_ve_vl_vfmuls_vsvvl | ||
| 10950 | .param_str = "V256dfV256dV256dUi" | ||
| 10951 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10952 | |||
| 10953 | __builtin_ve_vl_vfmuls_vvvl | ||
| 10954 | .param_str = "V256dV256dV256dUi" | ||
| 10955 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10956 | |||
| 10957 | __builtin_ve_vl_vfmuls_vvvmvl | ||
| 10958 | .param_str = "V256dV256dV256dV256bV256dUi" | ||
| 10959 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10960 | |||
| 10961 | __builtin_ve_vl_vfmuls_vvvvl | ||
| 10962 | .param_str = "V256dV256dV256dV256dUi" | ||
| 10963 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10964 | |||
| 10965 | __builtin_ve_vl_vfnmadd_vsvvl | ||
| 10966 | .param_str = "V256ddV256dV256dUi" | ||
| 10967 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10968 | |||
| 10969 | __builtin_ve_vl_vfnmadd_vsvvmvl | ||
| 10970 | .param_str = "V256ddV256dV256dV256bV256dUi" | ||
| 10971 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10972 | |||
| 10973 | __builtin_ve_vl_vfnmadd_vsvvvl | ||
| 10974 | .param_str = "V256ddV256dV256dV256dUi" | ||
| 10975 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10976 | |||
| 10977 | __builtin_ve_vl_vfnmadd_vvsvl | ||
| 10978 | .param_str = "V256dV256ddV256dUi" | ||
| 10979 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10980 | |||
| 10981 | __builtin_ve_vl_vfnmadd_vvsvmvl | ||
| 10982 | .param_str = "V256dV256ddV256dV256bV256dUi" | ||
| 10983 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10984 | |||
| 10985 | __builtin_ve_vl_vfnmadd_vvsvvl | ||
| 10986 | .param_str = "V256dV256ddV256dV256dUi" | ||
| 10987 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10988 | |||
| 10989 | __builtin_ve_vl_vfnmadd_vvvvl | ||
| 10990 | .param_str = "V256dV256dV256dV256dUi" | ||
| 10991 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10992 | |||
| 10993 | __builtin_ve_vl_vfnmadd_vvvvmvl | ||
| 10994 | .param_str = "V256dV256dV256dV256dV256bV256dUi" | ||
| 10995 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 10996 | |||
| 10997 | __builtin_ve_vl_vfnmadd_vvvvvl | ||
| 10998 | .param_str = "V256dV256dV256dV256dV256dUi" | ||
| 10999 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11000 | |||
| 11001 | __builtin_ve_vl_vfnmads_vsvvl | ||
| 11002 | .param_str = "V256dfV256dV256dUi" | ||
| 11003 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11004 | |||
| 11005 | __builtin_ve_vl_vfnmads_vsvvmvl | ||
| 11006 | .param_str = "V256dfV256dV256dV256bV256dUi" | ||
| 11007 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11008 | |||
| 11009 | __builtin_ve_vl_vfnmads_vsvvvl | ||
| 11010 | .param_str = "V256dfV256dV256dV256dUi" | ||
| 11011 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11012 | |||
| 11013 | __builtin_ve_vl_vfnmads_vvsvl | ||
| 11014 | .param_str = "V256dV256dfV256dUi" | ||
| 11015 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11016 | |||
| 11017 | __builtin_ve_vl_vfnmads_vvsvmvl | ||
| 11018 | .param_str = "V256dV256dfV256dV256bV256dUi" | ||
| 11019 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11020 | |||
| 11021 | __builtin_ve_vl_vfnmads_vvsvvl | ||
| 11022 | .param_str = "V256dV256dfV256dV256dUi" | ||
| 11023 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11024 | |||
| 11025 | __builtin_ve_vl_vfnmads_vvvvl | ||
| 11026 | .param_str = "V256dV256dV256dV256dUi" | ||
| 11027 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11028 | |||
| 11029 | __builtin_ve_vl_vfnmads_vvvvmvl | ||
| 11030 | .param_str = "V256dV256dV256dV256dV256bV256dUi" | ||
| 11031 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11032 | |||
| 11033 | __builtin_ve_vl_vfnmads_vvvvvl | ||
| 11034 | .param_str = "V256dV256dV256dV256dV256dUi" | ||
| 11035 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11036 | |||
| 11037 | __builtin_ve_vl_vfnmsbd_vsvvl | ||
| 11038 | .param_str = "V256ddV256dV256dUi" | ||
| 11039 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11040 | |||
| 11041 | __builtin_ve_vl_vfnmsbd_vsvvmvl | ||
| 11042 | .param_str = "V256ddV256dV256dV256bV256dUi" | ||
| 11043 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11044 | |||
| 11045 | __builtin_ve_vl_vfnmsbd_vsvvvl | ||
| 11046 | .param_str = "V256ddV256dV256dV256dUi" | ||
| 11047 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11048 | |||
| 11049 | __builtin_ve_vl_vfnmsbd_vvsvl | ||
| 11050 | .param_str = "V256dV256ddV256dUi" | ||
| 11051 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11052 | |||
| 11053 | __builtin_ve_vl_vfnmsbd_vvsvmvl | ||
| 11054 | .param_str = "V256dV256ddV256dV256bV256dUi" | ||
| 11055 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11056 | |||
| 11057 | __builtin_ve_vl_vfnmsbd_vvsvvl | ||
| 11058 | .param_str = "V256dV256ddV256dV256dUi" | ||
| 11059 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11060 | |||
| 11061 | __builtin_ve_vl_vfnmsbd_vvvvl | ||
| 11062 | .param_str = "V256dV256dV256dV256dUi" | ||
| 11063 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11064 | |||
| 11065 | __builtin_ve_vl_vfnmsbd_vvvvmvl | ||
| 11066 | .param_str = "V256dV256dV256dV256dV256bV256dUi" | ||
| 11067 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11068 | |||
| 11069 | __builtin_ve_vl_vfnmsbd_vvvvvl | ||
| 11070 | .param_str = "V256dV256dV256dV256dV256dUi" | ||
| 11071 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11072 | |||
| 11073 | __builtin_ve_vl_vfnmsbs_vsvvl | ||
| 11074 | .param_str = "V256dfV256dV256dUi" | ||
| 11075 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11076 | |||
| 11077 | __builtin_ve_vl_vfnmsbs_vsvvmvl | ||
| 11078 | .param_str = "V256dfV256dV256dV256bV256dUi" | ||
| 11079 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11080 | |||
| 11081 | __builtin_ve_vl_vfnmsbs_vsvvvl | ||
| 11082 | .param_str = "V256dfV256dV256dV256dUi" | ||
| 11083 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11084 | |||
| 11085 | __builtin_ve_vl_vfnmsbs_vvsvl | ||
| 11086 | .param_str = "V256dV256dfV256dUi" | ||
| 11087 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11088 | |||
| 11089 | __builtin_ve_vl_vfnmsbs_vvsvmvl | ||
| 11090 | .param_str = "V256dV256dfV256dV256bV256dUi" | ||
| 11091 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11092 | |||
| 11093 | __builtin_ve_vl_vfnmsbs_vvsvvl | ||
| 11094 | .param_str = "V256dV256dfV256dV256dUi" | ||
| 11095 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11096 | |||
| 11097 | __builtin_ve_vl_vfnmsbs_vvvvl | ||
| 11098 | .param_str = "V256dV256dV256dV256dUi" | ||
| 11099 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11100 | |||
| 11101 | __builtin_ve_vl_vfnmsbs_vvvvmvl | ||
| 11102 | .param_str = "V256dV256dV256dV256dV256bV256dUi" | ||
| 11103 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11104 | |||
| 11105 | __builtin_ve_vl_vfnmsbs_vvvvvl | ||
| 11106 | .param_str = "V256dV256dV256dV256dV256dUi" | ||
| 11107 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11108 | |||
| 11109 | __builtin_ve_vl_vfrmaxdfst_vvl | ||
| 11110 | .param_str = "V256dV256dUi" | ||
| 11111 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11112 | |||
| 11113 | __builtin_ve_vl_vfrmaxdfst_vvvl | ||
| 11114 | .param_str = "V256dV256dV256dUi" | ||
| 11115 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11116 | |||
| 11117 | __builtin_ve_vl_vfrmaxdlst_vvl | ||
| 11118 | .param_str = "V256dV256dUi" | ||
| 11119 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11120 | |||
| 11121 | __builtin_ve_vl_vfrmaxdlst_vvvl | ||
| 11122 | .param_str = "V256dV256dV256dUi" | ||
| 11123 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11124 | |||
| 11125 | __builtin_ve_vl_vfrmaxsfst_vvl | ||
| 11126 | .param_str = "V256dV256dUi" | ||
| 11127 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11128 | |||
| 11129 | __builtin_ve_vl_vfrmaxsfst_vvvl | ||
| 11130 | .param_str = "V256dV256dV256dUi" | ||
| 11131 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11132 | |||
| 11133 | __builtin_ve_vl_vfrmaxslst_vvl | ||
| 11134 | .param_str = "V256dV256dUi" | ||
| 11135 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11136 | |||
| 11137 | __builtin_ve_vl_vfrmaxslst_vvvl | ||
| 11138 | .param_str = "V256dV256dV256dUi" | ||
| 11139 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11140 | |||
| 11141 | __builtin_ve_vl_vfrmindfst_vvl | ||
| 11142 | .param_str = "V256dV256dUi" | ||
| 11143 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11144 | |||
| 11145 | __builtin_ve_vl_vfrmindfst_vvvl | ||
| 11146 | .param_str = "V256dV256dV256dUi" | ||
| 11147 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11148 | |||
| 11149 | __builtin_ve_vl_vfrmindlst_vvl | ||
| 11150 | .param_str = "V256dV256dUi" | ||
| 11151 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11152 | |||
| 11153 | __builtin_ve_vl_vfrmindlst_vvvl | ||
| 11154 | .param_str = "V256dV256dV256dUi" | ||
| 11155 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11156 | |||
| 11157 | __builtin_ve_vl_vfrminsfst_vvl | ||
| 11158 | .param_str = "V256dV256dUi" | ||
| 11159 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11160 | |||
| 11161 | __builtin_ve_vl_vfrminsfst_vvvl | ||
| 11162 | .param_str = "V256dV256dV256dUi" | ||
| 11163 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11164 | |||
| 11165 | __builtin_ve_vl_vfrminslst_vvl | ||
| 11166 | .param_str = "V256dV256dUi" | ||
| 11167 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11168 | |||
| 11169 | __builtin_ve_vl_vfrminslst_vvvl | ||
| 11170 | .param_str = "V256dV256dV256dUi" | ||
| 11171 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11172 | |||
| 11173 | __builtin_ve_vl_vfsqrtd_vvl | ||
| 11174 | .param_str = "V256dV256dUi" | ||
| 11175 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11176 | |||
| 11177 | __builtin_ve_vl_vfsqrtd_vvvl | ||
| 11178 | .param_str = "V256dV256dV256dUi" | ||
| 11179 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11180 | |||
| 11181 | __builtin_ve_vl_vfsqrts_vvl | ||
| 11182 | .param_str = "V256dV256dUi" | ||
| 11183 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11184 | |||
| 11185 | __builtin_ve_vl_vfsqrts_vvvl | ||
| 11186 | .param_str = "V256dV256dV256dUi" | ||
| 11187 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11188 | |||
| 11189 | __builtin_ve_vl_vfsubd_vsvl | ||
| 11190 | .param_str = "V256ddV256dUi" | ||
| 11191 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11192 | |||
| 11193 | __builtin_ve_vl_vfsubd_vsvmvl | ||
| 11194 | .param_str = "V256ddV256dV256bV256dUi" | ||
| 11195 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11196 | |||
| 11197 | __builtin_ve_vl_vfsubd_vsvvl | ||
| 11198 | .param_str = "V256ddV256dV256dUi" | ||
| 11199 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11200 | |||
| 11201 | __builtin_ve_vl_vfsubd_vvvl | ||
| 11202 | .param_str = "V256dV256dV256dUi" | ||
| 11203 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11204 | |||
| 11205 | __builtin_ve_vl_vfsubd_vvvmvl | ||
| 11206 | .param_str = "V256dV256dV256dV256bV256dUi" | ||
| 11207 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11208 | |||
| 11209 | __builtin_ve_vl_vfsubd_vvvvl | ||
| 11210 | .param_str = "V256dV256dV256dV256dUi" | ||
| 11211 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11212 | |||
| 11213 | __builtin_ve_vl_vfsubs_vsvl | ||
| 11214 | .param_str = "V256dfV256dUi" | ||
| 11215 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11216 | |||
| 11217 | __builtin_ve_vl_vfsubs_vsvmvl | ||
| 11218 | .param_str = "V256dfV256dV256bV256dUi" | ||
| 11219 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11220 | |||
| 11221 | __builtin_ve_vl_vfsubs_vsvvl | ||
| 11222 | .param_str = "V256dfV256dV256dUi" | ||
| 11223 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11224 | |||
| 11225 | __builtin_ve_vl_vfsubs_vvvl | ||
| 11226 | .param_str = "V256dV256dV256dUi" | ||
| 11227 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11228 | |||
| 11229 | __builtin_ve_vl_vfsubs_vvvmvl | ||
| 11230 | .param_str = "V256dV256dV256dV256bV256dUi" | ||
| 11231 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11232 | |||
| 11233 | __builtin_ve_vl_vfsubs_vvvvl | ||
| 11234 | .param_str = "V256dV256dV256dV256dUi" | ||
| 11235 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11236 | |||
| 11237 | __builtin_ve_vl_vfsumd_vvl | ||
| 11238 | .param_str = "V256dV256dUi" | ||
| 11239 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11240 | |||
| 11241 | __builtin_ve_vl_vfsumd_vvml | ||
| 11242 | .param_str = "V256dV256dV256bUi" | ||
| 11243 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11244 | |||
| 11245 | __builtin_ve_vl_vfsums_vvl | ||
| 11246 | .param_str = "V256dV256dUi" | ||
| 11247 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11248 | |||
| 11249 | __builtin_ve_vl_vfsums_vvml | ||
| 11250 | .param_str = "V256dV256dV256bUi" | ||
| 11251 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11252 | |||
| 11253 | __builtin_ve_vl_vgt_vvssl | ||
| 11254 | .param_str = "V256dV256dLUiLUiUi" | ||
| 11255 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11256 | |||
| 11257 | __builtin_ve_vl_vgt_vvssml | ||
| 11258 | .param_str = "V256dV256dLUiLUiV256bUi" | ||
| 11259 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11260 | |||
| 11261 | __builtin_ve_vl_vgt_vvssmvl | ||
| 11262 | .param_str = "V256dV256dLUiLUiV256bV256dUi" | ||
| 11263 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11264 | |||
| 11265 | __builtin_ve_vl_vgt_vvssvl | ||
| 11266 | .param_str = "V256dV256dLUiLUiV256dUi" | ||
| 11267 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11268 | |||
| 11269 | __builtin_ve_vl_vgtlsx_vvssl | ||
| 11270 | .param_str = "V256dV256dLUiLUiUi" | ||
| 11271 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11272 | |||
| 11273 | __builtin_ve_vl_vgtlsx_vvssml | ||
| 11274 | .param_str = "V256dV256dLUiLUiV256bUi" | ||
| 11275 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11276 | |||
| 11277 | __builtin_ve_vl_vgtlsx_vvssmvl | ||
| 11278 | .param_str = "V256dV256dLUiLUiV256bV256dUi" | ||
| 11279 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11280 | |||
| 11281 | __builtin_ve_vl_vgtlsx_vvssvl | ||
| 11282 | .param_str = "V256dV256dLUiLUiV256dUi" | ||
| 11283 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11284 | |||
| 11285 | __builtin_ve_vl_vgtlsxnc_vvssl | ||
| 11286 | .param_str = "V256dV256dLUiLUiUi" | ||
| 11287 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11288 | |||
| 11289 | __builtin_ve_vl_vgtlsxnc_vvssml | ||
| 11290 | .param_str = "V256dV256dLUiLUiV256bUi" | ||
| 11291 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11292 | |||
| 11293 | __builtin_ve_vl_vgtlsxnc_vvssmvl | ||
| 11294 | .param_str = "V256dV256dLUiLUiV256bV256dUi" | ||
| 11295 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11296 | |||
| 11297 | __builtin_ve_vl_vgtlsxnc_vvssvl | ||
| 11298 | .param_str = "V256dV256dLUiLUiV256dUi" | ||
| 11299 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11300 | |||
| 11301 | __builtin_ve_vl_vgtlzx_vvssl | ||
| 11302 | .param_str = "V256dV256dLUiLUiUi" | ||
| 11303 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11304 | |||
| 11305 | __builtin_ve_vl_vgtlzx_vvssml | ||
| 11306 | .param_str = "V256dV256dLUiLUiV256bUi" | ||
| 11307 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11308 | |||
| 11309 | __builtin_ve_vl_vgtlzx_vvssmvl | ||
| 11310 | .param_str = "V256dV256dLUiLUiV256bV256dUi" | ||
| 11311 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11312 | |||
| 11313 | __builtin_ve_vl_vgtlzx_vvssvl | ||
| 11314 | .param_str = "V256dV256dLUiLUiV256dUi" | ||
| 11315 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11316 | |||
| 11317 | __builtin_ve_vl_vgtlzxnc_vvssl | ||
| 11318 | .param_str = "V256dV256dLUiLUiUi" | ||
| 11319 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11320 | |||
| 11321 | __builtin_ve_vl_vgtlzxnc_vvssml | ||
| 11322 | .param_str = "V256dV256dLUiLUiV256bUi" | ||
| 11323 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11324 | |||
| 11325 | __builtin_ve_vl_vgtlzxnc_vvssmvl | ||
| 11326 | .param_str = "V256dV256dLUiLUiV256bV256dUi" | ||
| 11327 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11328 | |||
| 11329 | __builtin_ve_vl_vgtlzxnc_vvssvl | ||
| 11330 | .param_str = "V256dV256dLUiLUiV256dUi" | ||
| 11331 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11332 | |||
| 11333 | __builtin_ve_vl_vgtnc_vvssl | ||
| 11334 | .param_str = "V256dV256dLUiLUiUi" | ||
| 11335 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11336 | |||
| 11337 | __builtin_ve_vl_vgtnc_vvssml | ||
| 11338 | .param_str = "V256dV256dLUiLUiV256bUi" | ||
| 11339 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11340 | |||
| 11341 | __builtin_ve_vl_vgtnc_vvssmvl | ||
| 11342 | .param_str = "V256dV256dLUiLUiV256bV256dUi" | ||
| 11343 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11344 | |||
| 11345 | __builtin_ve_vl_vgtnc_vvssvl | ||
| 11346 | .param_str = "V256dV256dLUiLUiV256dUi" | ||
| 11347 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11348 | |||
| 11349 | __builtin_ve_vl_vgtu_vvssl | ||
| 11350 | .param_str = "V256dV256dLUiLUiUi" | ||
| 11351 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11352 | |||
| 11353 | __builtin_ve_vl_vgtu_vvssml | ||
| 11354 | .param_str = "V256dV256dLUiLUiV256bUi" | ||
| 11355 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11356 | |||
| 11357 | __builtin_ve_vl_vgtu_vvssmvl | ||
| 11358 | .param_str = "V256dV256dLUiLUiV256bV256dUi" | ||
| 11359 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11360 | |||
| 11361 | __builtin_ve_vl_vgtu_vvssvl | ||
| 11362 | .param_str = "V256dV256dLUiLUiV256dUi" | ||
| 11363 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11364 | |||
| 11365 | __builtin_ve_vl_vgtunc_vvssl | ||
| 11366 | .param_str = "V256dV256dLUiLUiUi" | ||
| 11367 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11368 | |||
| 11369 | __builtin_ve_vl_vgtunc_vvssml | ||
| 11370 | .param_str = "V256dV256dLUiLUiV256bUi" | ||
| 11371 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11372 | |||
| 11373 | __builtin_ve_vl_vgtunc_vvssmvl | ||
| 11374 | .param_str = "V256dV256dLUiLUiV256bV256dUi" | ||
| 11375 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11376 | |||
| 11377 | __builtin_ve_vl_vgtunc_vvssvl | ||
| 11378 | .param_str = "V256dV256dLUiLUiV256dUi" | ||
| 11379 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11380 | |||
| 11381 | __builtin_ve_vl_vld2d_vssl | ||
| 11382 | .param_str = "V256dLUivC*Ui" | ||
| 11383 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11384 | |||
| 11385 | __builtin_ve_vl_vld2d_vssvl | ||
| 11386 | .param_str = "V256dLUivC*V256dUi" | ||
| 11387 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11388 | |||
| 11389 | __builtin_ve_vl_vld2dnc_vssl | ||
| 11390 | .param_str = "V256dLUivC*Ui" | ||
| 11391 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11392 | |||
| 11393 | __builtin_ve_vl_vld2dnc_vssvl | ||
| 11394 | .param_str = "V256dLUivC*V256dUi" | ||
| 11395 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11396 | |||
| 11397 | __builtin_ve_vl_vld_vssl | ||
| 11398 | .param_str = "V256dLUivC*Ui" | ||
| 11399 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11400 | |||
| 11401 | __builtin_ve_vl_vld_vssvl | ||
| 11402 | .param_str = "V256dLUivC*V256dUi" | ||
| 11403 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11404 | |||
| 11405 | __builtin_ve_vl_vldl2dsx_vssl | ||
| 11406 | .param_str = "V256dLUivC*Ui" | ||
| 11407 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11408 | |||
| 11409 | __builtin_ve_vl_vldl2dsx_vssvl | ||
| 11410 | .param_str = "V256dLUivC*V256dUi" | ||
| 11411 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11412 | |||
| 11413 | __builtin_ve_vl_vldl2dsxnc_vssl | ||
| 11414 | .param_str = "V256dLUivC*Ui" | ||
| 11415 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11416 | |||
| 11417 | __builtin_ve_vl_vldl2dsxnc_vssvl | ||
| 11418 | .param_str = "V256dLUivC*V256dUi" | ||
| 11419 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11420 | |||
| 11421 | __builtin_ve_vl_vldl2dzx_vssl | ||
| 11422 | .param_str = "V256dLUivC*Ui" | ||
| 11423 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11424 | |||
| 11425 | __builtin_ve_vl_vldl2dzx_vssvl | ||
| 11426 | .param_str = "V256dLUivC*V256dUi" | ||
| 11427 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11428 | |||
| 11429 | __builtin_ve_vl_vldl2dzxnc_vssl | ||
| 11430 | .param_str = "V256dLUivC*Ui" | ||
| 11431 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11432 | |||
| 11433 | __builtin_ve_vl_vldl2dzxnc_vssvl | ||
| 11434 | .param_str = "V256dLUivC*V256dUi" | ||
| 11435 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11436 | |||
| 11437 | __builtin_ve_vl_vldlsx_vssl | ||
| 11438 | .param_str = "V256dLUivC*Ui" | ||
| 11439 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11440 | |||
| 11441 | __builtin_ve_vl_vldlsx_vssvl | ||
| 11442 | .param_str = "V256dLUivC*V256dUi" | ||
| 11443 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11444 | |||
| 11445 | __builtin_ve_vl_vldlsxnc_vssl | ||
| 11446 | .param_str = "V256dLUivC*Ui" | ||
| 11447 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11448 | |||
| 11449 | __builtin_ve_vl_vldlsxnc_vssvl | ||
| 11450 | .param_str = "V256dLUivC*V256dUi" | ||
| 11451 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11452 | |||
| 11453 | __builtin_ve_vl_vldlzx_vssl | ||
| 11454 | .param_str = "V256dLUivC*Ui" | ||
| 11455 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11456 | |||
| 11457 | __builtin_ve_vl_vldlzx_vssvl | ||
| 11458 | .param_str = "V256dLUivC*V256dUi" | ||
| 11459 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11460 | |||
| 11461 | __builtin_ve_vl_vldlzxnc_vssl | ||
| 11462 | .param_str = "V256dLUivC*Ui" | ||
| 11463 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11464 | |||
| 11465 | __builtin_ve_vl_vldlzxnc_vssvl | ||
| 11466 | .param_str = "V256dLUivC*V256dUi" | ||
| 11467 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11468 | |||
| 11469 | __builtin_ve_vl_vldnc_vssl | ||
| 11470 | .param_str = "V256dLUivC*Ui" | ||
| 11471 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11472 | |||
| 11473 | __builtin_ve_vl_vldnc_vssvl | ||
| 11474 | .param_str = "V256dLUivC*V256dUi" | ||
| 11475 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11476 | |||
| 11477 | __builtin_ve_vl_vldu2d_vssl | ||
| 11478 | .param_str = "V256dLUivC*Ui" | ||
| 11479 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11480 | |||
| 11481 | __builtin_ve_vl_vldu2d_vssvl | ||
| 11482 | .param_str = "V256dLUivC*V256dUi" | ||
| 11483 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11484 | |||
| 11485 | __builtin_ve_vl_vldu2dnc_vssl | ||
| 11486 | .param_str = "V256dLUivC*Ui" | ||
| 11487 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11488 | |||
| 11489 | __builtin_ve_vl_vldu2dnc_vssvl | ||
| 11490 | .param_str = "V256dLUivC*V256dUi" | ||
| 11491 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11492 | |||
| 11493 | __builtin_ve_vl_vldu_vssl | ||
| 11494 | .param_str = "V256dLUivC*Ui" | ||
| 11495 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11496 | |||
| 11497 | __builtin_ve_vl_vldu_vssvl | ||
| 11498 | .param_str = "V256dLUivC*V256dUi" | ||
| 11499 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11500 | |||
| 11501 | __builtin_ve_vl_vldunc_vssl | ||
| 11502 | .param_str = "V256dLUivC*Ui" | ||
| 11503 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11504 | |||
| 11505 | __builtin_ve_vl_vldunc_vssvl | ||
| 11506 | .param_str = "V256dLUivC*V256dUi" | ||
| 11507 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11508 | |||
| 11509 | __builtin_ve_vl_vldz_vvl | ||
| 11510 | .param_str = "V256dV256dUi" | ||
| 11511 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11512 | |||
| 11513 | __builtin_ve_vl_vldz_vvmvl | ||
| 11514 | .param_str = "V256dV256dV256bV256dUi" | ||
| 11515 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11516 | |||
| 11517 | __builtin_ve_vl_vldz_vvvl | ||
| 11518 | .param_str = "V256dV256dV256dUi" | ||
| 11519 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11520 | |||
| 11521 | __builtin_ve_vl_vmaxsl_vsvl | ||
| 11522 | .param_str = "V256dLiV256dUi" | ||
| 11523 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11524 | |||
| 11525 | __builtin_ve_vl_vmaxsl_vsvmvl | ||
| 11526 | .param_str = "V256dLiV256dV256bV256dUi" | ||
| 11527 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11528 | |||
| 11529 | __builtin_ve_vl_vmaxsl_vsvvl | ||
| 11530 | .param_str = "V256dLiV256dV256dUi" | ||
| 11531 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11532 | |||
| 11533 | __builtin_ve_vl_vmaxsl_vvvl | ||
| 11534 | .param_str = "V256dV256dV256dUi" | ||
| 11535 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11536 | |||
| 11537 | __builtin_ve_vl_vmaxsl_vvvmvl | ||
| 11538 | .param_str = "V256dV256dV256dV256bV256dUi" | ||
| 11539 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11540 | |||
| 11541 | __builtin_ve_vl_vmaxsl_vvvvl | ||
| 11542 | .param_str = "V256dV256dV256dV256dUi" | ||
| 11543 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11544 | |||
| 11545 | __builtin_ve_vl_vmaxswsx_vsvl | ||
| 11546 | .param_str = "V256diV256dUi" | ||
| 11547 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11548 | |||
| 11549 | __builtin_ve_vl_vmaxswsx_vsvmvl | ||
| 11550 | .param_str = "V256diV256dV256bV256dUi" | ||
| 11551 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11552 | |||
| 11553 | __builtin_ve_vl_vmaxswsx_vsvvl | ||
| 11554 | .param_str = "V256diV256dV256dUi" | ||
| 11555 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11556 | |||
| 11557 | __builtin_ve_vl_vmaxswsx_vvvl | ||
| 11558 | .param_str = "V256dV256dV256dUi" | ||
| 11559 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11560 | |||
| 11561 | __builtin_ve_vl_vmaxswsx_vvvmvl | ||
| 11562 | .param_str = "V256dV256dV256dV256bV256dUi" | ||
| 11563 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11564 | |||
| 11565 | __builtin_ve_vl_vmaxswsx_vvvvl | ||
| 11566 | .param_str = "V256dV256dV256dV256dUi" | ||
| 11567 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11568 | |||
| 11569 | __builtin_ve_vl_vmaxswzx_vsvl | ||
| 11570 | .param_str = "V256diV256dUi" | ||
| 11571 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11572 | |||
| 11573 | __builtin_ve_vl_vmaxswzx_vsvmvl | ||
| 11574 | .param_str = "V256diV256dV256bV256dUi" | ||
| 11575 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11576 | |||
| 11577 | __builtin_ve_vl_vmaxswzx_vsvvl | ||
| 11578 | .param_str = "V256diV256dV256dUi" | ||
| 11579 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11580 | |||
| 11581 | __builtin_ve_vl_vmaxswzx_vvvl | ||
| 11582 | .param_str = "V256dV256dV256dUi" | ||
| 11583 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11584 | |||
| 11585 | __builtin_ve_vl_vmaxswzx_vvvmvl | ||
| 11586 | .param_str = "V256dV256dV256dV256bV256dUi" | ||
| 11587 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11588 | |||
| 11589 | __builtin_ve_vl_vmaxswzx_vvvvl | ||
| 11590 | .param_str = "V256dV256dV256dV256dUi" | ||
| 11591 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11592 | |||
| 11593 | __builtin_ve_vl_vminsl_vsvl | ||
| 11594 | .param_str = "V256dLiV256dUi" | ||
| 11595 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11596 | |||
| 11597 | __builtin_ve_vl_vminsl_vsvmvl | ||
| 11598 | .param_str = "V256dLiV256dV256bV256dUi" | ||
| 11599 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11600 | |||
| 11601 | __builtin_ve_vl_vminsl_vsvvl | ||
| 11602 | .param_str = "V256dLiV256dV256dUi" | ||
| 11603 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11604 | |||
| 11605 | __builtin_ve_vl_vminsl_vvvl | ||
| 11606 | .param_str = "V256dV256dV256dUi" | ||
| 11607 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11608 | |||
| 11609 | __builtin_ve_vl_vminsl_vvvmvl | ||
| 11610 | .param_str = "V256dV256dV256dV256bV256dUi" | ||
| 11611 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11612 | |||
| 11613 | __builtin_ve_vl_vminsl_vvvvl | ||
| 11614 | .param_str = "V256dV256dV256dV256dUi" | ||
| 11615 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11616 | |||
| 11617 | __builtin_ve_vl_vminswsx_vsvl | ||
| 11618 | .param_str = "V256diV256dUi" | ||
| 11619 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11620 | |||
| 11621 | __builtin_ve_vl_vminswsx_vsvmvl | ||
| 11622 | .param_str = "V256diV256dV256bV256dUi" | ||
| 11623 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11624 | |||
| 11625 | __builtin_ve_vl_vminswsx_vsvvl | ||
| 11626 | .param_str = "V256diV256dV256dUi" | ||
| 11627 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11628 | |||
| 11629 | __builtin_ve_vl_vminswsx_vvvl | ||
| 11630 | .param_str = "V256dV256dV256dUi" | ||
| 11631 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11632 | |||
| 11633 | __builtin_ve_vl_vminswsx_vvvmvl | ||
| 11634 | .param_str = "V256dV256dV256dV256bV256dUi" | ||
| 11635 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11636 | |||
| 11637 | __builtin_ve_vl_vminswsx_vvvvl | ||
| 11638 | .param_str = "V256dV256dV256dV256dUi" | ||
| 11639 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11640 | |||
| 11641 | __builtin_ve_vl_vminswzx_vsvl | ||
| 11642 | .param_str = "V256diV256dUi" | ||
| 11643 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11644 | |||
| 11645 | __builtin_ve_vl_vminswzx_vsvmvl | ||
| 11646 | .param_str = "V256diV256dV256bV256dUi" | ||
| 11647 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11648 | |||
| 11649 | __builtin_ve_vl_vminswzx_vsvvl | ||
| 11650 | .param_str = "V256diV256dV256dUi" | ||
| 11651 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11652 | |||
| 11653 | __builtin_ve_vl_vminswzx_vvvl | ||
| 11654 | .param_str = "V256dV256dV256dUi" | ||
| 11655 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11656 | |||
| 11657 | __builtin_ve_vl_vminswzx_vvvmvl | ||
| 11658 | .param_str = "V256dV256dV256dV256bV256dUi" | ||
| 11659 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11660 | |||
| 11661 | __builtin_ve_vl_vminswzx_vvvvl | ||
| 11662 | .param_str = "V256dV256dV256dV256dUi" | ||
| 11663 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11664 | |||
| 11665 | __builtin_ve_vl_vmrg_vsvml | ||
| 11666 | .param_str = "V256dLUiV256dV256bUi" | ||
| 11667 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11668 | |||
| 11669 | __builtin_ve_vl_vmrg_vsvmvl | ||
| 11670 | .param_str = "V256dLUiV256dV256bV256dUi" | ||
| 11671 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11672 | |||
| 11673 | __builtin_ve_vl_vmrg_vvvml | ||
| 11674 | .param_str = "V256dV256dV256dV256bUi" | ||
| 11675 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11676 | |||
| 11677 | __builtin_ve_vl_vmrg_vvvmvl | ||
| 11678 | .param_str = "V256dV256dV256dV256bV256dUi" | ||
| 11679 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11680 | |||
| 11681 | __builtin_ve_vl_vmrgw_vsvMl | ||
| 11682 | .param_str = "V256dUiV256dV512bUi" | ||
| 11683 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11684 | |||
| 11685 | __builtin_ve_vl_vmrgw_vsvMvl | ||
| 11686 | .param_str = "V256dUiV256dV512bV256dUi" | ||
| 11687 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11688 | |||
| 11689 | __builtin_ve_vl_vmrgw_vvvMl | ||
| 11690 | .param_str = "V256dV256dV256dV512bUi" | ||
| 11691 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11692 | |||
| 11693 | __builtin_ve_vl_vmrgw_vvvMvl | ||
| 11694 | .param_str = "V256dV256dV256dV512bV256dUi" | ||
| 11695 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11696 | |||
| 11697 | __builtin_ve_vl_vmulsl_vsvl | ||
| 11698 | .param_str = "V256dLiV256dUi" | ||
| 11699 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11700 | |||
| 11701 | __builtin_ve_vl_vmulsl_vsvmvl | ||
| 11702 | .param_str = "V256dLiV256dV256bV256dUi" | ||
| 11703 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11704 | |||
| 11705 | __builtin_ve_vl_vmulsl_vsvvl | ||
| 11706 | .param_str = "V256dLiV256dV256dUi" | ||
| 11707 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11708 | |||
| 11709 | __builtin_ve_vl_vmulsl_vvvl | ||
| 11710 | .param_str = "V256dV256dV256dUi" | ||
| 11711 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11712 | |||
| 11713 | __builtin_ve_vl_vmulsl_vvvmvl | ||
| 11714 | .param_str = "V256dV256dV256dV256bV256dUi" | ||
| 11715 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11716 | |||
| 11717 | __builtin_ve_vl_vmulsl_vvvvl | ||
| 11718 | .param_str = "V256dV256dV256dV256dUi" | ||
| 11719 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11720 | |||
| 11721 | __builtin_ve_vl_vmulslw_vsvl | ||
| 11722 | .param_str = "V256diV256dUi" | ||
| 11723 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11724 | |||
| 11725 | __builtin_ve_vl_vmulslw_vsvvl | ||
| 11726 | .param_str = "V256diV256dV256dUi" | ||
| 11727 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11728 | |||
| 11729 | __builtin_ve_vl_vmulslw_vvvl | ||
| 11730 | .param_str = "V256dV256dV256dUi" | ||
| 11731 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11732 | |||
| 11733 | __builtin_ve_vl_vmulslw_vvvvl | ||
| 11734 | .param_str = "V256dV256dV256dV256dUi" | ||
| 11735 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11736 | |||
| 11737 | __builtin_ve_vl_vmulswsx_vsvl | ||
| 11738 | .param_str = "V256diV256dUi" | ||
| 11739 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11740 | |||
| 11741 | __builtin_ve_vl_vmulswsx_vsvmvl | ||
| 11742 | .param_str = "V256diV256dV256bV256dUi" | ||
| 11743 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11744 | |||
| 11745 | __builtin_ve_vl_vmulswsx_vsvvl | ||
| 11746 | .param_str = "V256diV256dV256dUi" | ||
| 11747 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11748 | |||
| 11749 | __builtin_ve_vl_vmulswsx_vvvl | ||
| 11750 | .param_str = "V256dV256dV256dUi" | ||
| 11751 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11752 | |||
| 11753 | __builtin_ve_vl_vmulswsx_vvvmvl | ||
| 11754 | .param_str = "V256dV256dV256dV256bV256dUi" | ||
| 11755 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11756 | |||
| 11757 | __builtin_ve_vl_vmulswsx_vvvvl | ||
| 11758 | .param_str = "V256dV256dV256dV256dUi" | ||
| 11759 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11760 | |||
| 11761 | __builtin_ve_vl_vmulswzx_vsvl | ||
| 11762 | .param_str = "V256diV256dUi" | ||
| 11763 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11764 | |||
| 11765 | __builtin_ve_vl_vmulswzx_vsvmvl | ||
| 11766 | .param_str = "V256diV256dV256bV256dUi" | ||
| 11767 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11768 | |||
| 11769 | __builtin_ve_vl_vmulswzx_vsvvl | ||
| 11770 | .param_str = "V256diV256dV256dUi" | ||
| 11771 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11772 | |||
| 11773 | __builtin_ve_vl_vmulswzx_vvvl | ||
| 11774 | .param_str = "V256dV256dV256dUi" | ||
| 11775 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11776 | |||
| 11777 | __builtin_ve_vl_vmulswzx_vvvmvl | ||
| 11778 | .param_str = "V256dV256dV256dV256bV256dUi" | ||
| 11779 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11780 | |||
| 11781 | __builtin_ve_vl_vmulswzx_vvvvl | ||
| 11782 | .param_str = "V256dV256dV256dV256dUi" | ||
| 11783 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11784 | |||
| 11785 | __builtin_ve_vl_vmulul_vsvl | ||
| 11786 | .param_str = "V256dLUiV256dUi" | ||
| 11787 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11788 | |||
| 11789 | __builtin_ve_vl_vmulul_vsvmvl | ||
| 11790 | .param_str = "V256dLUiV256dV256bV256dUi" | ||
| 11791 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11792 | |||
| 11793 | __builtin_ve_vl_vmulul_vsvvl | ||
| 11794 | .param_str = "V256dLUiV256dV256dUi" | ||
| 11795 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11796 | |||
| 11797 | __builtin_ve_vl_vmulul_vvvl | ||
| 11798 | .param_str = "V256dV256dV256dUi" | ||
| 11799 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11800 | |||
| 11801 | __builtin_ve_vl_vmulul_vvvmvl | ||
| 11802 | .param_str = "V256dV256dV256dV256bV256dUi" | ||
| 11803 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11804 | |||
| 11805 | __builtin_ve_vl_vmulul_vvvvl | ||
| 11806 | .param_str = "V256dV256dV256dV256dUi" | ||
| 11807 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11808 | |||
| 11809 | __builtin_ve_vl_vmuluw_vsvl | ||
| 11810 | .param_str = "V256dUiV256dUi" | ||
| 11811 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11812 | |||
| 11813 | __builtin_ve_vl_vmuluw_vsvmvl | ||
| 11814 | .param_str = "V256dUiV256dV256bV256dUi" | ||
| 11815 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11816 | |||
| 11817 | __builtin_ve_vl_vmuluw_vsvvl | ||
| 11818 | .param_str = "V256dUiV256dV256dUi" | ||
| 11819 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11820 | |||
| 11821 | __builtin_ve_vl_vmuluw_vvvl | ||
| 11822 | .param_str = "V256dV256dV256dUi" | ||
| 11823 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11824 | |||
| 11825 | __builtin_ve_vl_vmuluw_vvvmvl | ||
| 11826 | .param_str = "V256dV256dV256dV256bV256dUi" | ||
| 11827 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11828 | |||
| 11829 | __builtin_ve_vl_vmuluw_vvvvl | ||
| 11830 | .param_str = "V256dV256dV256dV256dUi" | ||
| 11831 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11832 | |||
| 11833 | __builtin_ve_vl_vmv_vsvl | ||
| 11834 | .param_str = "V256dUiV256dUi" | ||
| 11835 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11836 | |||
| 11837 | __builtin_ve_vl_vmv_vsvmvl | ||
| 11838 | .param_str = "V256dUiV256dV256bV256dUi" | ||
| 11839 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11840 | |||
| 11841 | __builtin_ve_vl_vmv_vsvvl | ||
| 11842 | .param_str = "V256dUiV256dV256dUi" | ||
| 11843 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11844 | |||
| 11845 | __builtin_ve_vl_vor_vsvl | ||
| 11846 | .param_str = "V256dLUiV256dUi" | ||
| 11847 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11848 | |||
| 11849 | __builtin_ve_vl_vor_vsvmvl | ||
| 11850 | .param_str = "V256dLUiV256dV256bV256dUi" | ||
| 11851 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11852 | |||
| 11853 | __builtin_ve_vl_vor_vsvvl | ||
| 11854 | .param_str = "V256dLUiV256dV256dUi" | ||
| 11855 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11856 | |||
| 11857 | __builtin_ve_vl_vor_vvvl | ||
| 11858 | .param_str = "V256dV256dV256dUi" | ||
| 11859 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11860 | |||
| 11861 | __builtin_ve_vl_vor_vvvmvl | ||
| 11862 | .param_str = "V256dV256dV256dV256bV256dUi" | ||
| 11863 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11864 | |||
| 11865 | __builtin_ve_vl_vor_vvvvl | ||
| 11866 | .param_str = "V256dV256dV256dV256dUi" | ||
| 11867 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11868 | |||
| 11869 | __builtin_ve_vl_vpcnt_vvl | ||
| 11870 | .param_str = "V256dV256dUi" | ||
| 11871 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11872 | |||
| 11873 | __builtin_ve_vl_vpcnt_vvmvl | ||
| 11874 | .param_str = "V256dV256dV256bV256dUi" | ||
| 11875 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11876 | |||
| 11877 | __builtin_ve_vl_vpcnt_vvvl | ||
| 11878 | .param_str = "V256dV256dV256dUi" | ||
| 11879 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11880 | |||
| 11881 | __builtin_ve_vl_vrand_vvl | ||
| 11882 | .param_str = "V256dV256dUi" | ||
| 11883 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11884 | |||
| 11885 | __builtin_ve_vl_vrand_vvml | ||
| 11886 | .param_str = "V256dV256dV256bUi" | ||
| 11887 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11888 | |||
| 11889 | __builtin_ve_vl_vrcpd_vvl | ||
| 11890 | .param_str = "V256dV256dUi" | ||
| 11891 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11892 | |||
| 11893 | __builtin_ve_vl_vrcpd_vvvl | ||
| 11894 | .param_str = "V256dV256dV256dUi" | ||
| 11895 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11896 | |||
| 11897 | __builtin_ve_vl_vrcps_vvl | ||
| 11898 | .param_str = "V256dV256dUi" | ||
| 11899 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11900 | |||
| 11901 | __builtin_ve_vl_vrcps_vvvl | ||
| 11902 | .param_str = "V256dV256dV256dUi" | ||
| 11903 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11904 | |||
| 11905 | __builtin_ve_vl_vrmaxslfst_vvl | ||
| 11906 | .param_str = "V256dV256dUi" | ||
| 11907 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11908 | |||
| 11909 | __builtin_ve_vl_vrmaxslfst_vvvl | ||
| 11910 | .param_str = "V256dV256dV256dUi" | ||
| 11911 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11912 | |||
| 11913 | __builtin_ve_vl_vrmaxsllst_vvl | ||
| 11914 | .param_str = "V256dV256dUi" | ||
| 11915 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11916 | |||
| 11917 | __builtin_ve_vl_vrmaxsllst_vvvl | ||
| 11918 | .param_str = "V256dV256dV256dUi" | ||
| 11919 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11920 | |||
| 11921 | __builtin_ve_vl_vrmaxswfstsx_vvl | ||
| 11922 | .param_str = "V256dV256dUi" | ||
| 11923 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11924 | |||
| 11925 | __builtin_ve_vl_vrmaxswfstsx_vvvl | ||
| 11926 | .param_str = "V256dV256dV256dUi" | ||
| 11927 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11928 | |||
| 11929 | __builtin_ve_vl_vrmaxswfstzx_vvl | ||
| 11930 | .param_str = "V256dV256dUi" | ||
| 11931 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11932 | |||
| 11933 | __builtin_ve_vl_vrmaxswfstzx_vvvl | ||
| 11934 | .param_str = "V256dV256dV256dUi" | ||
| 11935 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11936 | |||
| 11937 | __builtin_ve_vl_vrmaxswlstsx_vvl | ||
| 11938 | .param_str = "V256dV256dUi" | ||
| 11939 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11940 | |||
| 11941 | __builtin_ve_vl_vrmaxswlstsx_vvvl | ||
| 11942 | .param_str = "V256dV256dV256dUi" | ||
| 11943 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11944 | |||
| 11945 | __builtin_ve_vl_vrmaxswlstzx_vvl | ||
| 11946 | .param_str = "V256dV256dUi" | ||
| 11947 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11948 | |||
| 11949 | __builtin_ve_vl_vrmaxswlstzx_vvvl | ||
| 11950 | .param_str = "V256dV256dV256dUi" | ||
| 11951 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11952 | |||
| 11953 | __builtin_ve_vl_vrminslfst_vvl | ||
| 11954 | .param_str = "V256dV256dUi" | ||
| 11955 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11956 | |||
| 11957 | __builtin_ve_vl_vrminslfst_vvvl | ||
| 11958 | .param_str = "V256dV256dV256dUi" | ||
| 11959 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11960 | |||
| 11961 | __builtin_ve_vl_vrminsllst_vvl | ||
| 11962 | .param_str = "V256dV256dUi" | ||
| 11963 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11964 | |||
| 11965 | __builtin_ve_vl_vrminsllst_vvvl | ||
| 11966 | .param_str = "V256dV256dV256dUi" | ||
| 11967 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11968 | |||
| 11969 | __builtin_ve_vl_vrminswfstsx_vvl | ||
| 11970 | .param_str = "V256dV256dUi" | ||
| 11971 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11972 | |||
| 11973 | __builtin_ve_vl_vrminswfstsx_vvvl | ||
| 11974 | .param_str = "V256dV256dV256dUi" | ||
| 11975 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11976 | |||
| 11977 | __builtin_ve_vl_vrminswfstzx_vvl | ||
| 11978 | .param_str = "V256dV256dUi" | ||
| 11979 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11980 | |||
| 11981 | __builtin_ve_vl_vrminswfstzx_vvvl | ||
| 11982 | .param_str = "V256dV256dV256dUi" | ||
| 11983 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11984 | |||
| 11985 | __builtin_ve_vl_vrminswlstsx_vvl | ||
| 11986 | .param_str = "V256dV256dUi" | ||
| 11987 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11988 | |||
| 11989 | __builtin_ve_vl_vrminswlstsx_vvvl | ||
| 11990 | .param_str = "V256dV256dV256dUi" | ||
| 11991 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11992 | |||
| 11993 | __builtin_ve_vl_vrminswlstzx_vvl | ||
| 11994 | .param_str = "V256dV256dUi" | ||
| 11995 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 11996 | |||
| 11997 | __builtin_ve_vl_vrminswlstzx_vvvl | ||
| 11998 | .param_str = "V256dV256dV256dUi" | ||
| 11999 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12000 | |||
| 12001 | __builtin_ve_vl_vror_vvl | ||
| 12002 | .param_str = "V256dV256dUi" | ||
| 12003 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12004 | |||
| 12005 | __builtin_ve_vl_vror_vvml | ||
| 12006 | .param_str = "V256dV256dV256bUi" | ||
| 12007 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12008 | |||
| 12009 | __builtin_ve_vl_vrsqrtd_vvl | ||
| 12010 | .param_str = "V256dV256dUi" | ||
| 12011 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12012 | |||
| 12013 | __builtin_ve_vl_vrsqrtd_vvvl | ||
| 12014 | .param_str = "V256dV256dV256dUi" | ||
| 12015 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12016 | |||
| 12017 | __builtin_ve_vl_vrsqrtdnex_vvl | ||
| 12018 | .param_str = "V256dV256dUi" | ||
| 12019 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12020 | |||
| 12021 | __builtin_ve_vl_vrsqrtdnex_vvvl | ||
| 12022 | .param_str = "V256dV256dV256dUi" | ||
| 12023 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12024 | |||
| 12025 | __builtin_ve_vl_vrsqrts_vvl | ||
| 12026 | .param_str = "V256dV256dUi" | ||
| 12027 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12028 | |||
| 12029 | __builtin_ve_vl_vrsqrts_vvvl | ||
| 12030 | .param_str = "V256dV256dV256dUi" | ||
| 12031 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12032 | |||
| 12033 | __builtin_ve_vl_vrsqrtsnex_vvl | ||
| 12034 | .param_str = "V256dV256dUi" | ||
| 12035 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12036 | |||
| 12037 | __builtin_ve_vl_vrsqrtsnex_vvvl | ||
| 12038 | .param_str = "V256dV256dV256dUi" | ||
| 12039 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12040 | |||
| 12041 | __builtin_ve_vl_vrxor_vvl | ||
| 12042 | .param_str = "V256dV256dUi" | ||
| 12043 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12044 | |||
| 12045 | __builtin_ve_vl_vrxor_vvml | ||
| 12046 | .param_str = "V256dV256dV256bUi" | ||
| 12047 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12048 | |||
| 12049 | __builtin_ve_vl_vsc_vvssl | ||
| 12050 | .param_str = "vV256dV256dLUiLUiUi" | ||
| 12051 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12052 | |||
| 12053 | __builtin_ve_vl_vsc_vvssml | ||
| 12054 | .param_str = "vV256dV256dLUiLUiV256bUi" | ||
| 12055 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12056 | |||
| 12057 | __builtin_ve_vl_vscl_vvssl | ||
| 12058 | .param_str = "vV256dV256dLUiLUiUi" | ||
| 12059 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12060 | |||
| 12061 | __builtin_ve_vl_vscl_vvssml | ||
| 12062 | .param_str = "vV256dV256dLUiLUiV256bUi" | ||
| 12063 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12064 | |||
| 12065 | __builtin_ve_vl_vsclnc_vvssl | ||
| 12066 | .param_str = "vV256dV256dLUiLUiUi" | ||
| 12067 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12068 | |||
| 12069 | __builtin_ve_vl_vsclnc_vvssml | ||
| 12070 | .param_str = "vV256dV256dLUiLUiV256bUi" | ||
| 12071 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12072 | |||
| 12073 | __builtin_ve_vl_vsclncot_vvssl | ||
| 12074 | .param_str = "vV256dV256dLUiLUiUi" | ||
| 12075 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12076 | |||
| 12077 | __builtin_ve_vl_vsclncot_vvssml | ||
| 12078 | .param_str = "vV256dV256dLUiLUiV256bUi" | ||
| 12079 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12080 | |||
| 12081 | __builtin_ve_vl_vsclot_vvssl | ||
| 12082 | .param_str = "vV256dV256dLUiLUiUi" | ||
| 12083 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12084 | |||
| 12085 | __builtin_ve_vl_vsclot_vvssml | ||
| 12086 | .param_str = "vV256dV256dLUiLUiV256bUi" | ||
| 12087 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12088 | |||
| 12089 | __builtin_ve_vl_vscnc_vvssl | ||
| 12090 | .param_str = "vV256dV256dLUiLUiUi" | ||
| 12091 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12092 | |||
| 12093 | __builtin_ve_vl_vscnc_vvssml | ||
| 12094 | .param_str = "vV256dV256dLUiLUiV256bUi" | ||
| 12095 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12096 | |||
| 12097 | __builtin_ve_vl_vscncot_vvssl | ||
| 12098 | .param_str = "vV256dV256dLUiLUiUi" | ||
| 12099 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12100 | |||
| 12101 | __builtin_ve_vl_vscncot_vvssml | ||
| 12102 | .param_str = "vV256dV256dLUiLUiV256bUi" | ||
| 12103 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12104 | |||
| 12105 | __builtin_ve_vl_vscot_vvssl | ||
| 12106 | .param_str = "vV256dV256dLUiLUiUi" | ||
| 12107 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12108 | |||
| 12109 | __builtin_ve_vl_vscot_vvssml | ||
| 12110 | .param_str = "vV256dV256dLUiLUiV256bUi" | ||
| 12111 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12112 | |||
| 12113 | __builtin_ve_vl_vscu_vvssl | ||
| 12114 | .param_str = "vV256dV256dLUiLUiUi" | ||
| 12115 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12116 | |||
| 12117 | __builtin_ve_vl_vscu_vvssml | ||
| 12118 | .param_str = "vV256dV256dLUiLUiV256bUi" | ||
| 12119 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12120 | |||
| 12121 | __builtin_ve_vl_vscunc_vvssl | ||
| 12122 | .param_str = "vV256dV256dLUiLUiUi" | ||
| 12123 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12124 | |||
| 12125 | __builtin_ve_vl_vscunc_vvssml | ||
| 12126 | .param_str = "vV256dV256dLUiLUiV256bUi" | ||
| 12127 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12128 | |||
| 12129 | __builtin_ve_vl_vscuncot_vvssl | ||
| 12130 | .param_str = "vV256dV256dLUiLUiUi" | ||
| 12131 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12132 | |||
| 12133 | __builtin_ve_vl_vscuncot_vvssml | ||
| 12134 | .param_str = "vV256dV256dLUiLUiV256bUi" | ||
| 12135 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12136 | |||
| 12137 | __builtin_ve_vl_vscuot_vvssl | ||
| 12138 | .param_str = "vV256dV256dLUiLUiUi" | ||
| 12139 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12140 | |||
| 12141 | __builtin_ve_vl_vscuot_vvssml | ||
| 12142 | .param_str = "vV256dV256dLUiLUiV256bUi" | ||
| 12143 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12144 | |||
| 12145 | __builtin_ve_vl_vseq_vl | ||
| 12146 | .param_str = "V256dUi" | ||
| 12147 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12148 | |||
| 12149 | __builtin_ve_vl_vseq_vvl | ||
| 12150 | .param_str = "V256dV256dUi" | ||
| 12151 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12152 | |||
| 12153 | __builtin_ve_vl_vsfa_vvssl | ||
| 12154 | .param_str = "V256dV256dLUiLUiUi" | ||
| 12155 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12156 | |||
| 12157 | __builtin_ve_vl_vsfa_vvssmvl | ||
| 12158 | .param_str = "V256dV256dLUiLUiV256bV256dUi" | ||
| 12159 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12160 | |||
| 12161 | __builtin_ve_vl_vsfa_vvssvl | ||
| 12162 | .param_str = "V256dV256dLUiLUiV256dUi" | ||
| 12163 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12164 | |||
| 12165 | __builtin_ve_vl_vshf_vvvsl | ||
| 12166 | .param_str = "V256dV256dV256dLUiUi" | ||
| 12167 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12168 | |||
| 12169 | __builtin_ve_vl_vshf_vvvsvl | ||
| 12170 | .param_str = "V256dV256dV256dLUiV256dUi" | ||
| 12171 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12172 | |||
| 12173 | __builtin_ve_vl_vslal_vvsl | ||
| 12174 | .param_str = "V256dV256dLiUi" | ||
| 12175 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12176 | |||
| 12177 | __builtin_ve_vl_vslal_vvsmvl | ||
| 12178 | .param_str = "V256dV256dLiV256bV256dUi" | ||
| 12179 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12180 | |||
| 12181 | __builtin_ve_vl_vslal_vvsvl | ||
| 12182 | .param_str = "V256dV256dLiV256dUi" | ||
| 12183 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12184 | |||
| 12185 | __builtin_ve_vl_vslal_vvvl | ||
| 12186 | .param_str = "V256dV256dV256dUi" | ||
| 12187 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12188 | |||
| 12189 | __builtin_ve_vl_vslal_vvvmvl | ||
| 12190 | .param_str = "V256dV256dV256dV256bV256dUi" | ||
| 12191 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12192 | |||
| 12193 | __builtin_ve_vl_vslal_vvvvl | ||
| 12194 | .param_str = "V256dV256dV256dV256dUi" | ||
| 12195 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12196 | |||
| 12197 | __builtin_ve_vl_vslawsx_vvsl | ||
| 12198 | .param_str = "V256dV256diUi" | ||
| 12199 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12200 | |||
| 12201 | __builtin_ve_vl_vslawsx_vvsmvl | ||
| 12202 | .param_str = "V256dV256diV256bV256dUi" | ||
| 12203 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12204 | |||
| 12205 | __builtin_ve_vl_vslawsx_vvsvl | ||
| 12206 | .param_str = "V256dV256diV256dUi" | ||
| 12207 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12208 | |||
| 12209 | __builtin_ve_vl_vslawsx_vvvl | ||
| 12210 | .param_str = "V256dV256dV256dUi" | ||
| 12211 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12212 | |||
| 12213 | __builtin_ve_vl_vslawsx_vvvmvl | ||
| 12214 | .param_str = "V256dV256dV256dV256bV256dUi" | ||
| 12215 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12216 | |||
| 12217 | __builtin_ve_vl_vslawsx_vvvvl | ||
| 12218 | .param_str = "V256dV256dV256dV256dUi" | ||
| 12219 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12220 | |||
| 12221 | __builtin_ve_vl_vslawzx_vvsl | ||
| 12222 | .param_str = "V256dV256diUi" | ||
| 12223 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12224 | |||
| 12225 | __builtin_ve_vl_vslawzx_vvsmvl | ||
| 12226 | .param_str = "V256dV256diV256bV256dUi" | ||
| 12227 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12228 | |||
| 12229 | __builtin_ve_vl_vslawzx_vvsvl | ||
| 12230 | .param_str = "V256dV256diV256dUi" | ||
| 12231 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12232 | |||
| 12233 | __builtin_ve_vl_vslawzx_vvvl | ||
| 12234 | .param_str = "V256dV256dV256dUi" | ||
| 12235 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12236 | |||
| 12237 | __builtin_ve_vl_vslawzx_vvvmvl | ||
| 12238 | .param_str = "V256dV256dV256dV256bV256dUi" | ||
| 12239 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12240 | |||
| 12241 | __builtin_ve_vl_vslawzx_vvvvl | ||
| 12242 | .param_str = "V256dV256dV256dV256dUi" | ||
| 12243 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12244 | |||
| 12245 | __builtin_ve_vl_vsll_vvsl | ||
| 12246 | .param_str = "V256dV256dLUiUi" | ||
| 12247 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12248 | |||
| 12249 | __builtin_ve_vl_vsll_vvsmvl | ||
| 12250 | .param_str = "V256dV256dLUiV256bV256dUi" | ||
| 12251 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12252 | |||
| 12253 | __builtin_ve_vl_vsll_vvsvl | ||
| 12254 | .param_str = "V256dV256dLUiV256dUi" | ||
| 12255 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12256 | |||
| 12257 | __builtin_ve_vl_vsll_vvvl | ||
| 12258 | .param_str = "V256dV256dV256dUi" | ||
| 12259 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12260 | |||
| 12261 | __builtin_ve_vl_vsll_vvvmvl | ||
| 12262 | .param_str = "V256dV256dV256dV256bV256dUi" | ||
| 12263 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12264 | |||
| 12265 | __builtin_ve_vl_vsll_vvvvl | ||
| 12266 | .param_str = "V256dV256dV256dV256dUi" | ||
| 12267 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12268 | |||
| 12269 | __builtin_ve_vl_vsral_vvsl | ||
| 12270 | .param_str = "V256dV256dLiUi" | ||
| 12271 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12272 | |||
| 12273 | __builtin_ve_vl_vsral_vvsmvl | ||
| 12274 | .param_str = "V256dV256dLiV256bV256dUi" | ||
| 12275 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12276 | |||
| 12277 | __builtin_ve_vl_vsral_vvsvl | ||
| 12278 | .param_str = "V256dV256dLiV256dUi" | ||
| 12279 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12280 | |||
| 12281 | __builtin_ve_vl_vsral_vvvl | ||
| 12282 | .param_str = "V256dV256dV256dUi" | ||
| 12283 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12284 | |||
| 12285 | __builtin_ve_vl_vsral_vvvmvl | ||
| 12286 | .param_str = "V256dV256dV256dV256bV256dUi" | ||
| 12287 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12288 | |||
| 12289 | __builtin_ve_vl_vsral_vvvvl | ||
| 12290 | .param_str = "V256dV256dV256dV256dUi" | ||
| 12291 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12292 | |||
| 12293 | __builtin_ve_vl_vsrawsx_vvsl | ||
| 12294 | .param_str = "V256dV256diUi" | ||
| 12295 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12296 | |||
| 12297 | __builtin_ve_vl_vsrawsx_vvsmvl | ||
| 12298 | .param_str = "V256dV256diV256bV256dUi" | ||
| 12299 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12300 | |||
| 12301 | __builtin_ve_vl_vsrawsx_vvsvl | ||
| 12302 | .param_str = "V256dV256diV256dUi" | ||
| 12303 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12304 | |||
| 12305 | __builtin_ve_vl_vsrawsx_vvvl | ||
| 12306 | .param_str = "V256dV256dV256dUi" | ||
| 12307 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12308 | |||
| 12309 | __builtin_ve_vl_vsrawsx_vvvmvl | ||
| 12310 | .param_str = "V256dV256dV256dV256bV256dUi" | ||
| 12311 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12312 | |||
| 12313 | __builtin_ve_vl_vsrawsx_vvvvl | ||
| 12314 | .param_str = "V256dV256dV256dV256dUi" | ||
| 12315 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12316 | |||
| 12317 | __builtin_ve_vl_vsrawzx_vvsl | ||
| 12318 | .param_str = "V256dV256diUi" | ||
| 12319 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12320 | |||
| 12321 | __builtin_ve_vl_vsrawzx_vvsmvl | ||
| 12322 | .param_str = "V256dV256diV256bV256dUi" | ||
| 12323 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12324 | |||
| 12325 | __builtin_ve_vl_vsrawzx_vvsvl | ||
| 12326 | .param_str = "V256dV256diV256dUi" | ||
| 12327 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12328 | |||
| 12329 | __builtin_ve_vl_vsrawzx_vvvl | ||
| 12330 | .param_str = "V256dV256dV256dUi" | ||
| 12331 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12332 | |||
| 12333 | __builtin_ve_vl_vsrawzx_vvvmvl | ||
| 12334 | .param_str = "V256dV256dV256dV256bV256dUi" | ||
| 12335 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12336 | |||
| 12337 | __builtin_ve_vl_vsrawzx_vvvvl | ||
| 12338 | .param_str = "V256dV256dV256dV256dUi" | ||
| 12339 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12340 | |||
| 12341 | __builtin_ve_vl_vsrl_vvsl | ||
| 12342 | .param_str = "V256dV256dLUiUi" | ||
| 12343 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12344 | |||
| 12345 | __builtin_ve_vl_vsrl_vvsmvl | ||
| 12346 | .param_str = "V256dV256dLUiV256bV256dUi" | ||
| 12347 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12348 | |||
| 12349 | __builtin_ve_vl_vsrl_vvsvl | ||
| 12350 | .param_str = "V256dV256dLUiV256dUi" | ||
| 12351 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12352 | |||
| 12353 | __builtin_ve_vl_vsrl_vvvl | ||
| 12354 | .param_str = "V256dV256dV256dUi" | ||
| 12355 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12356 | |||
| 12357 | __builtin_ve_vl_vsrl_vvvmvl | ||
| 12358 | .param_str = "V256dV256dV256dV256bV256dUi" | ||
| 12359 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12360 | |||
| 12361 | __builtin_ve_vl_vsrl_vvvvl | ||
| 12362 | .param_str = "V256dV256dV256dV256dUi" | ||
| 12363 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12364 | |||
| 12365 | __builtin_ve_vl_vst2d_vssl | ||
| 12366 | .param_str = "vV256dLUiv*Ui" | ||
| 12367 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12368 | |||
| 12369 | __builtin_ve_vl_vst2d_vssml | ||
| 12370 | .param_str = "vV256dLUiv*V256bUi" | ||
| 12371 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12372 | |||
| 12373 | __builtin_ve_vl_vst2dnc_vssl | ||
| 12374 | .param_str = "vV256dLUiv*Ui" | ||
| 12375 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12376 | |||
| 12377 | __builtin_ve_vl_vst2dnc_vssml | ||
| 12378 | .param_str = "vV256dLUiv*V256bUi" | ||
| 12379 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12380 | |||
| 12381 | __builtin_ve_vl_vst2dncot_vssl | ||
| 12382 | .param_str = "vV256dLUiv*Ui" | ||
| 12383 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12384 | |||
| 12385 | __builtin_ve_vl_vst2dncot_vssml | ||
| 12386 | .param_str = "vV256dLUiv*V256bUi" | ||
| 12387 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12388 | |||
| 12389 | __builtin_ve_vl_vst2dot_vssl | ||
| 12390 | .param_str = "vV256dLUiv*Ui" | ||
| 12391 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12392 | |||
| 12393 | __builtin_ve_vl_vst2dot_vssml | ||
| 12394 | .param_str = "vV256dLUiv*V256bUi" | ||
| 12395 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12396 | |||
| 12397 | __builtin_ve_vl_vst_vssl | ||
| 12398 | .param_str = "vV256dLUiv*Ui" | ||
| 12399 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12400 | |||
| 12401 | __builtin_ve_vl_vst_vssml | ||
| 12402 | .param_str = "vV256dLUiv*V256bUi" | ||
| 12403 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12404 | |||
| 12405 | __builtin_ve_vl_vstl2d_vssl | ||
| 12406 | .param_str = "vV256dLUiv*Ui" | ||
| 12407 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12408 | |||
| 12409 | __builtin_ve_vl_vstl2d_vssml | ||
| 12410 | .param_str = "vV256dLUiv*V256bUi" | ||
| 12411 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12412 | |||
| 12413 | __builtin_ve_vl_vstl2dnc_vssl | ||
| 12414 | .param_str = "vV256dLUiv*Ui" | ||
| 12415 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12416 | |||
| 12417 | __builtin_ve_vl_vstl2dnc_vssml | ||
| 12418 | .param_str = "vV256dLUiv*V256bUi" | ||
| 12419 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12420 | |||
| 12421 | __builtin_ve_vl_vstl2dncot_vssl | ||
| 12422 | .param_str = "vV256dLUiv*Ui" | ||
| 12423 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12424 | |||
| 12425 | __builtin_ve_vl_vstl2dncot_vssml | ||
| 12426 | .param_str = "vV256dLUiv*V256bUi" | ||
| 12427 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12428 | |||
| 12429 | __builtin_ve_vl_vstl2dot_vssl | ||
| 12430 | .param_str = "vV256dLUiv*Ui" | ||
| 12431 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12432 | |||
| 12433 | __builtin_ve_vl_vstl2dot_vssml | ||
| 12434 | .param_str = "vV256dLUiv*V256bUi" | ||
| 12435 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12436 | |||
| 12437 | __builtin_ve_vl_vstl_vssl | ||
| 12438 | .param_str = "vV256dLUiv*Ui" | ||
| 12439 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12440 | |||
| 12441 | __builtin_ve_vl_vstl_vssml | ||
| 12442 | .param_str = "vV256dLUiv*V256bUi" | ||
| 12443 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12444 | |||
| 12445 | __builtin_ve_vl_vstlnc_vssl | ||
| 12446 | .param_str = "vV256dLUiv*Ui" | ||
| 12447 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12448 | |||
| 12449 | __builtin_ve_vl_vstlnc_vssml | ||
| 12450 | .param_str = "vV256dLUiv*V256bUi" | ||
| 12451 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12452 | |||
| 12453 | __builtin_ve_vl_vstlncot_vssl | ||
| 12454 | .param_str = "vV256dLUiv*Ui" | ||
| 12455 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12456 | |||
| 12457 | __builtin_ve_vl_vstlncot_vssml | ||
| 12458 | .param_str = "vV256dLUiv*V256bUi" | ||
| 12459 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12460 | |||
| 12461 | __builtin_ve_vl_vstlot_vssl | ||
| 12462 | .param_str = "vV256dLUiv*Ui" | ||
| 12463 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12464 | |||
| 12465 | __builtin_ve_vl_vstlot_vssml | ||
| 12466 | .param_str = "vV256dLUiv*V256bUi" | ||
| 12467 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12468 | |||
| 12469 | __builtin_ve_vl_vstnc_vssl | ||
| 12470 | .param_str = "vV256dLUiv*Ui" | ||
| 12471 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12472 | |||
| 12473 | __builtin_ve_vl_vstnc_vssml | ||
| 12474 | .param_str = "vV256dLUiv*V256bUi" | ||
| 12475 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12476 | |||
| 12477 | __builtin_ve_vl_vstncot_vssl | ||
| 12478 | .param_str = "vV256dLUiv*Ui" | ||
| 12479 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12480 | |||
| 12481 | __builtin_ve_vl_vstncot_vssml | ||
| 12482 | .param_str = "vV256dLUiv*V256bUi" | ||
| 12483 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12484 | |||
| 12485 | __builtin_ve_vl_vstot_vssl | ||
| 12486 | .param_str = "vV256dLUiv*Ui" | ||
| 12487 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12488 | |||
| 12489 | __builtin_ve_vl_vstot_vssml | ||
| 12490 | .param_str = "vV256dLUiv*V256bUi" | ||
| 12491 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12492 | |||
| 12493 | __builtin_ve_vl_vstu2d_vssl | ||
| 12494 | .param_str = "vV256dLUiv*Ui" | ||
| 12495 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12496 | |||
| 12497 | __builtin_ve_vl_vstu2d_vssml | ||
| 12498 | .param_str = "vV256dLUiv*V256bUi" | ||
| 12499 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12500 | |||
| 12501 | __builtin_ve_vl_vstu2dnc_vssl | ||
| 12502 | .param_str = "vV256dLUiv*Ui" | ||
| 12503 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12504 | |||
| 12505 | __builtin_ve_vl_vstu2dnc_vssml | ||
| 12506 | .param_str = "vV256dLUiv*V256bUi" | ||
| 12507 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12508 | |||
| 12509 | __builtin_ve_vl_vstu2dncot_vssl | ||
| 12510 | .param_str = "vV256dLUiv*Ui" | ||
| 12511 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12512 | |||
| 12513 | __builtin_ve_vl_vstu2dncot_vssml | ||
| 12514 | .param_str = "vV256dLUiv*V256bUi" | ||
| 12515 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12516 | |||
| 12517 | __builtin_ve_vl_vstu2dot_vssl | ||
| 12518 | .param_str = "vV256dLUiv*Ui" | ||
| 12519 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12520 | |||
| 12521 | __builtin_ve_vl_vstu2dot_vssml | ||
| 12522 | .param_str = "vV256dLUiv*V256bUi" | ||
| 12523 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12524 | |||
| 12525 | __builtin_ve_vl_vstu_vssl | ||
| 12526 | .param_str = "vV256dLUiv*Ui" | ||
| 12527 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12528 | |||
| 12529 | __builtin_ve_vl_vstu_vssml | ||
| 12530 | .param_str = "vV256dLUiv*V256bUi" | ||
| 12531 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12532 | |||
| 12533 | __builtin_ve_vl_vstunc_vssl | ||
| 12534 | .param_str = "vV256dLUiv*Ui" | ||
| 12535 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12536 | |||
| 12537 | __builtin_ve_vl_vstunc_vssml | ||
| 12538 | .param_str = "vV256dLUiv*V256bUi" | ||
| 12539 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12540 | |||
| 12541 | __builtin_ve_vl_vstuncot_vssl | ||
| 12542 | .param_str = "vV256dLUiv*Ui" | ||
| 12543 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12544 | |||
| 12545 | __builtin_ve_vl_vstuncot_vssml | ||
| 12546 | .param_str = "vV256dLUiv*V256bUi" | ||
| 12547 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12548 | |||
| 12549 | __builtin_ve_vl_vstuot_vssl | ||
| 12550 | .param_str = "vV256dLUiv*Ui" | ||
| 12551 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12552 | |||
| 12553 | __builtin_ve_vl_vstuot_vssml | ||
| 12554 | .param_str = "vV256dLUiv*V256bUi" | ||
| 12555 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12556 | |||
| 12557 | __builtin_ve_vl_vsubsl_vsvl | ||
| 12558 | .param_str = "V256dLiV256dUi" | ||
| 12559 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12560 | |||
| 12561 | __builtin_ve_vl_vsubsl_vsvmvl | ||
| 12562 | .param_str = "V256dLiV256dV256bV256dUi" | ||
| 12563 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12564 | |||
| 12565 | __builtin_ve_vl_vsubsl_vsvvl | ||
| 12566 | .param_str = "V256dLiV256dV256dUi" | ||
| 12567 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12568 | |||
| 12569 | __builtin_ve_vl_vsubsl_vvvl | ||
| 12570 | .param_str = "V256dV256dV256dUi" | ||
| 12571 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12572 | |||
| 12573 | __builtin_ve_vl_vsubsl_vvvmvl | ||
| 12574 | .param_str = "V256dV256dV256dV256bV256dUi" | ||
| 12575 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12576 | |||
| 12577 | __builtin_ve_vl_vsubsl_vvvvl | ||
| 12578 | .param_str = "V256dV256dV256dV256dUi" | ||
| 12579 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12580 | |||
| 12581 | __builtin_ve_vl_vsubswsx_vsvl | ||
| 12582 | .param_str = "V256diV256dUi" | ||
| 12583 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12584 | |||
| 12585 | __builtin_ve_vl_vsubswsx_vsvmvl | ||
| 12586 | .param_str = "V256diV256dV256bV256dUi" | ||
| 12587 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12588 | |||
| 12589 | __builtin_ve_vl_vsubswsx_vsvvl | ||
| 12590 | .param_str = "V256diV256dV256dUi" | ||
| 12591 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12592 | |||
| 12593 | __builtin_ve_vl_vsubswsx_vvvl | ||
| 12594 | .param_str = "V256dV256dV256dUi" | ||
| 12595 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12596 | |||
| 12597 | __builtin_ve_vl_vsubswsx_vvvmvl | ||
| 12598 | .param_str = "V256dV256dV256dV256bV256dUi" | ||
| 12599 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12600 | |||
| 12601 | __builtin_ve_vl_vsubswsx_vvvvl | ||
| 12602 | .param_str = "V256dV256dV256dV256dUi" | ||
| 12603 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12604 | |||
| 12605 | __builtin_ve_vl_vsubswzx_vsvl | ||
| 12606 | .param_str = "V256diV256dUi" | ||
| 12607 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12608 | |||
| 12609 | __builtin_ve_vl_vsubswzx_vsvmvl | ||
| 12610 | .param_str = "V256diV256dV256bV256dUi" | ||
| 12611 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12612 | |||
| 12613 | __builtin_ve_vl_vsubswzx_vsvvl | ||
| 12614 | .param_str = "V256diV256dV256dUi" | ||
| 12615 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12616 | |||
| 12617 | __builtin_ve_vl_vsubswzx_vvvl | ||
| 12618 | .param_str = "V256dV256dV256dUi" | ||
| 12619 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12620 | |||
| 12621 | __builtin_ve_vl_vsubswzx_vvvmvl | ||
| 12622 | .param_str = "V256dV256dV256dV256bV256dUi" | ||
| 12623 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12624 | |||
| 12625 | __builtin_ve_vl_vsubswzx_vvvvl | ||
| 12626 | .param_str = "V256dV256dV256dV256dUi" | ||
| 12627 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12628 | |||
| 12629 | __builtin_ve_vl_vsubul_vsvl | ||
| 12630 | .param_str = "V256dLUiV256dUi" | ||
| 12631 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12632 | |||
| 12633 | __builtin_ve_vl_vsubul_vsvmvl | ||
| 12634 | .param_str = "V256dLUiV256dV256bV256dUi" | ||
| 12635 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12636 | |||
| 12637 | __builtin_ve_vl_vsubul_vsvvl | ||
| 12638 | .param_str = "V256dLUiV256dV256dUi" | ||
| 12639 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12640 | |||
| 12641 | __builtin_ve_vl_vsubul_vvvl | ||
| 12642 | .param_str = "V256dV256dV256dUi" | ||
| 12643 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12644 | |||
| 12645 | __builtin_ve_vl_vsubul_vvvmvl | ||
| 12646 | .param_str = "V256dV256dV256dV256bV256dUi" | ||
| 12647 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12648 | |||
| 12649 | __builtin_ve_vl_vsubul_vvvvl | ||
| 12650 | .param_str = "V256dV256dV256dV256dUi" | ||
| 12651 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12652 | |||
| 12653 | __builtin_ve_vl_vsubuw_vsvl | ||
| 12654 | .param_str = "V256dUiV256dUi" | ||
| 12655 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12656 | |||
| 12657 | __builtin_ve_vl_vsubuw_vsvmvl | ||
| 12658 | .param_str = "V256dUiV256dV256bV256dUi" | ||
| 12659 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12660 | |||
| 12661 | __builtin_ve_vl_vsubuw_vsvvl | ||
| 12662 | .param_str = "V256dUiV256dV256dUi" | ||
| 12663 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12664 | |||
| 12665 | __builtin_ve_vl_vsubuw_vvvl | ||
| 12666 | .param_str = "V256dV256dV256dUi" | ||
| 12667 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12668 | |||
| 12669 | __builtin_ve_vl_vsubuw_vvvmvl | ||
| 12670 | .param_str = "V256dV256dV256dV256bV256dUi" | ||
| 12671 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12672 | |||
| 12673 | __builtin_ve_vl_vsubuw_vvvvl | ||
| 12674 | .param_str = "V256dV256dV256dV256dUi" | ||
| 12675 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12676 | |||
| 12677 | __builtin_ve_vl_vsuml_vvl | ||
| 12678 | .param_str = "V256dV256dUi" | ||
| 12679 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12680 | |||
| 12681 | __builtin_ve_vl_vsuml_vvml | ||
| 12682 | .param_str = "V256dV256dV256bUi" | ||
| 12683 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12684 | |||
| 12685 | __builtin_ve_vl_vsumwsx_vvl | ||
| 12686 | .param_str = "V256dV256dUi" | ||
| 12687 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12688 | |||
| 12689 | __builtin_ve_vl_vsumwsx_vvml | ||
| 12690 | .param_str = "V256dV256dV256bUi" | ||
| 12691 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12692 | |||
| 12693 | __builtin_ve_vl_vsumwzx_vvl | ||
| 12694 | .param_str = "V256dV256dUi" | ||
| 12695 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12696 | |||
| 12697 | __builtin_ve_vl_vsumwzx_vvml | ||
| 12698 | .param_str = "V256dV256dV256bUi" | ||
| 12699 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12700 | |||
| 12701 | __builtin_ve_vl_vxor_vsvl | ||
| 12702 | .param_str = "V256dLUiV256dUi" | ||
| 12703 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12704 | |||
| 12705 | __builtin_ve_vl_vxor_vsvmvl | ||
| 12706 | .param_str = "V256dLUiV256dV256bV256dUi" | ||
| 12707 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12708 | |||
| 12709 | __builtin_ve_vl_vxor_vsvvl | ||
| 12710 | .param_str = "V256dLUiV256dV256dUi" | ||
| 12711 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12712 | |||
| 12713 | __builtin_ve_vl_vxor_vvvl | ||
| 12714 | .param_str = "V256dV256dV256dUi" | ||
| 12715 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12716 | |||
| 12717 | __builtin_ve_vl_vxor_vvvmvl | ||
| 12718 | .param_str = "V256dV256dV256dV256bV256dUi" | ||
| 12719 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12720 | |||
| 12721 | __builtin_ve_vl_vxor_vvvvl | ||
| 12722 | .param_str = "V256dV256dV256dV256dUi" | ||
| 12723 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12724 | |||
| 12725 | __builtin_ve_vl_xorm_MMM | ||
| 12726 | .param_str = "V512bV512bV512b" | ||
| 12727 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12728 | |||
| 12729 | __builtin_ve_vl_xorm_mmm | ||
| 12730 | .param_str = "V256bV256bV256b" | ||
| 12731 | .target_set = TargetSet.initOne(.vevl_gen) | ||
| 12732 | |||
| 12733 | __builtin_vfprintf | ||
| 12734 | .param_str = "iP*RcC*Ra" | ||
| 12735 | .attributes = .{ .lib_function_with_builtin_prefix = true, .format_kind = .vprintf, .format_string_position = 1 } | ||
| 12736 | |||
| 12737 | __builtin_vfscanf | ||
| 12738 | .param_str = "iP*RcC*Ra" | ||
| 12739 | .attributes = .{ .lib_function_with_builtin_prefix = true, .format_kind = .vscanf, .format_string_position = 1 } | ||
| 12740 | |||
| 12741 | __builtin_vprintf | ||
| 12742 | .param_str = "icC*Ra" | ||
| 12743 | .attributes = .{ .lib_function_with_builtin_prefix = true, .format_kind = .vprintf } | ||
| 12744 | |||
| 12745 | __builtin_vscanf | ||
| 12746 | .param_str = "icC*Ra" | ||
| 12747 | .attributes = .{ .lib_function_with_builtin_prefix = true, .format_kind = .vscanf } | ||
| 12748 | |||
| 12749 | __builtin_vsnprintf | ||
| 12750 | .param_str = "ic*RzcC*Ra" | ||
| 12751 | .attributes = .{ .lib_function_with_builtin_prefix = true, .format_kind = .vprintf, .format_string_position = 2 } | ||
| 12752 | |||
| 12753 | __builtin_vsprintf | ||
| 12754 | .param_str = "ic*RcC*Ra" | ||
| 12755 | .attributes = .{ .lib_function_with_builtin_prefix = true, .format_kind = .vprintf, .format_string_position = 1 } | ||
| 12756 | |||
| 12757 | __builtin_vsscanf | ||
| 12758 | .param_str = "icC*RcC*Ra" | ||
| 12759 | .attributes = .{ .lib_function_with_builtin_prefix = true, .format_kind = .vscanf, .format_string_position = 1 } | ||
| 12760 | |||
| 12761 | __builtin_wasm_max_f32 | ||
| 12762 | .param_str = "fff" | ||
| 12763 | .target_set = TargetSet.initOne(.webassembly) | ||
| 12764 | .attributes = .{ .@"const" = true } | ||
| 12765 | |||
| 12766 | __builtin_wasm_max_f64 | ||
| 12767 | .param_str = "ddd" | ||
| 12768 | .target_set = TargetSet.initOne(.webassembly) | ||
| 12769 | .attributes = .{ .@"const" = true } | ||
| 12770 | |||
| 12771 | __builtin_wasm_memory_grow | ||
| 12772 | .param_str = "zIiz" | ||
| 12773 | .target_set = TargetSet.initOne(.webassembly) | ||
| 12774 | |||
| 12775 | __builtin_wasm_memory_size | ||
| 12776 | .param_str = "zIi" | ||
| 12777 | .target_set = TargetSet.initOne(.webassembly) | ||
| 12778 | |||
| 12779 | __builtin_wasm_min_f32 | ||
| 12780 | .param_str = "fff" | ||
| 12781 | .target_set = TargetSet.initOne(.webassembly) | ||
| 12782 | .attributes = .{ .@"const" = true } | ||
| 12783 | |||
| 12784 | __builtin_wasm_min_f64 | ||
| 12785 | .param_str = "ddd" | ||
| 12786 | .target_set = TargetSet.initOne(.webassembly) | ||
| 12787 | .attributes = .{ .@"const" = true } | ||
| 12788 | |||
| 12789 | __builtin_wasm_trunc_s_i32_f32 | ||
| 12790 | .param_str = "if" | ||
| 12791 | .target_set = TargetSet.initOne(.webassembly) | ||
| 12792 | .attributes = .{ .@"const" = true } | ||
| 12793 | |||
| 12794 | __builtin_wasm_trunc_s_i32_f64 | ||
| 12795 | .param_str = "id" | ||
| 12796 | .target_set = TargetSet.initOne(.webassembly) | ||
| 12797 | .attributes = .{ .@"const" = true } | ||
| 12798 | |||
| 12799 | __builtin_wasm_trunc_s_i64_f32 | ||
| 12800 | .param_str = "LLif" | ||
| 12801 | .target_set = TargetSet.initOne(.webassembly) | ||
| 12802 | .attributes = .{ .@"const" = true } | ||
| 12803 | |||
| 12804 | __builtin_wasm_trunc_s_i64_f64 | ||
| 12805 | .param_str = "LLid" | ||
| 12806 | .target_set = TargetSet.initOne(.webassembly) | ||
| 12807 | .attributes = .{ .@"const" = true } | ||
| 12808 | |||
| 12809 | __builtin_wasm_trunc_u_i32_f32 | ||
| 12810 | .param_str = "if" | ||
| 12811 | .target_set = TargetSet.initOne(.webassembly) | ||
| 12812 | .attributes = .{ .@"const" = true } | ||
| 12813 | |||
| 12814 | __builtin_wasm_trunc_u_i32_f64 | ||
| 12815 | .param_str = "id" | ||
| 12816 | .target_set = TargetSet.initOne(.webassembly) | ||
| 12817 | .attributes = .{ .@"const" = true } | ||
| 12818 | |||
| 12819 | __builtin_wasm_trunc_u_i64_f32 | ||
| 12820 | .param_str = "LLif" | ||
| 12821 | .target_set = TargetSet.initOne(.webassembly) | ||
| 12822 | .attributes = .{ .@"const" = true } | ||
| 12823 | |||
| 12824 | __builtin_wasm_trunc_u_i64_f64 | ||
| 12825 | .param_str = "LLid" | ||
| 12826 | .target_set = TargetSet.initOne(.webassembly) | ||
| 12827 | .attributes = .{ .@"const" = true } | ||
| 12828 | |||
| 12829 | __builtin_wcschr | ||
| 12830 | .param_str = "w*wC*w" | ||
| 12831 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_evaluable = true } | ||
| 12832 | |||
| 12833 | __builtin_wcscmp | ||
| 12834 | .param_str = "iwC*wC*" | ||
| 12835 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_evaluable = true } | ||
| 12836 | |||
| 12837 | __builtin_wcslen | ||
| 12838 | .param_str = "zwC*" | ||
| 12839 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_evaluable = true } | ||
| 12840 | |||
| 12841 | __builtin_wcsncmp | ||
| 12842 | .param_str = "iwC*wC*z" | ||
| 12843 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_evaluable = true } | ||
| 12844 | |||
| 12845 | __builtin_wmemchr | ||
| 12846 | .param_str = "w*wC*wz" | ||
| 12847 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_evaluable = true } | ||
| 12848 | |||
| 12849 | __builtin_wmemcmp | ||
| 12850 | .param_str = "iwC*wC*z" | ||
| 12851 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_evaluable = true } | ||
| 12852 | |||
| 12853 | __builtin_wmemcpy | ||
| 12854 | .param_str = "w*w*wC*z" | ||
| 12855 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_evaluable = true } | ||
| 12856 | |||
| 12857 | __builtin_wmemmove | ||
| 12858 | .param_str = "w*w*wC*z" | ||
| 12859 | .attributes = .{ .lib_function_with_builtin_prefix = true, .const_evaluable = true } | ||
| 12860 | |||
| 12861 | __c11_atomic_is_lock_free | ||
| 12862 | .param_str = "bz" | ||
| 12863 | .attributes = .{ .const_evaluable = true } | ||
| 12864 | |||
| 12865 | __c11_atomic_signal_fence | ||
| 12866 | .param_str = "vi" | ||
| 12867 | |||
| 12868 | __c11_atomic_thread_fence | ||
| 12869 | .param_str = "vi" | ||
| 12870 | |||
| 12871 | __clear_cache | ||
| 12872 | .param_str = "vv*v*" | ||
| 12873 | .target_set = TargetSet.initMany(&.{ .aarch64, .arm }) | ||
| 12874 | |||
| 12875 | __cospi | ||
| 12876 | .param_str = "dd" | ||
| 12877 | .header = .math | ||
| 12878 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 12879 | |||
| 12880 | __cospif | ||
| 12881 | .param_str = "ff" | ||
| 12882 | .header = .math | ||
| 12883 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 12884 | |||
| 12885 | __debugbreak | ||
| 12886 | .param_str = "v" | ||
| 12887 | .language = .all_ms_languages | ||
| 12888 | |||
| 12889 | __dmb | ||
| 12890 | .param_str = "vUi" | ||
| 12891 | .language = .all_ms_languages | ||
| 12892 | .target_set = TargetSet.initMany(&.{ .aarch64, .arm }) | ||
| 12893 | .attributes = .{ .@"const" = true } | ||
| 12894 | |||
| 12895 | __dsb | ||
| 12896 | .param_str = "vUi" | ||
| 12897 | .language = .all_ms_languages | ||
| 12898 | .target_set = TargetSet.initMany(&.{ .aarch64, .arm }) | ||
| 12899 | .attributes = .{ .@"const" = true } | ||
| 12900 | |||
| 12901 | __emit | ||
| 12902 | .param_str = "vIUiC" | ||
| 12903 | .language = .all_ms_languages | ||
| 12904 | .target_set = TargetSet.initOne(.arm) | ||
| 12905 | |||
| 12906 | __exception_code | ||
| 12907 | .param_str = "UNi" | ||
| 12908 | .language = .all_ms_languages | ||
| 12909 | |||
| 12910 | __exception_info | ||
| 12911 | .param_str = "v*" | ||
| 12912 | .language = .all_ms_languages | ||
| 12913 | |||
| 12914 | __exp10 | ||
| 12915 | .param_str = "dd" | ||
| 12916 | .header = .math | ||
| 12917 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 12918 | |||
| 12919 | __exp10f | ||
| 12920 | .param_str = "ff" | ||
| 12921 | .header = .math | ||
| 12922 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 12923 | |||
| 12924 | __fastfail | ||
| 12925 | .param_str = "vUi" | ||
| 12926 | .language = .all_ms_languages | ||
| 12927 | .attributes = .{ .noreturn = true } | ||
| 12928 | |||
| 12929 | __finite | ||
| 12930 | .param_str = "id" | ||
| 12931 | .header = .math | ||
| 12932 | .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } | ||
| 12933 | |||
| 12934 | __finitef | ||
| 12935 | .param_str = "if" | ||
| 12936 | .header = .math | ||
| 12937 | .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } | ||
| 12938 | |||
| 12939 | __finitel | ||
| 12940 | .param_str = "iLd" | ||
| 12941 | .header = .math | ||
| 12942 | .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } | ||
| 12943 | |||
| 12944 | __isb | ||
| 12945 | .param_str = "vUi" | ||
| 12946 | .language = .all_ms_languages | ||
| 12947 | .target_set = TargetSet.initMany(&.{ .aarch64, .arm }) | ||
| 12948 | .attributes = .{ .@"const" = true } | ||
| 12949 | |||
| 12950 | __iso_volatile_load16 | ||
| 12951 | .param_str = "ssCD*" | ||
| 12952 | .language = .all_ms_languages | ||
| 12953 | |||
| 12954 | __iso_volatile_load32 | ||
| 12955 | .param_str = "iiCD*" | ||
| 12956 | .language = .all_ms_languages | ||
| 12957 | |||
| 12958 | __iso_volatile_load64 | ||
| 12959 | .param_str = "LLiLLiCD*" | ||
| 12960 | .language = .all_ms_languages | ||
| 12961 | |||
| 12962 | __iso_volatile_load8 | ||
| 12963 | .param_str = "ccCD*" | ||
| 12964 | .language = .all_ms_languages | ||
| 12965 | |||
| 12966 | __iso_volatile_store16 | ||
| 12967 | .param_str = "vsD*s" | ||
| 12968 | .language = .all_ms_languages | ||
| 12969 | |||
| 12970 | __iso_volatile_store32 | ||
| 12971 | .param_str = "viD*i" | ||
| 12972 | .language = .all_ms_languages | ||
| 12973 | |||
| 12974 | __iso_volatile_store64 | ||
| 12975 | .param_str = "vLLiD*LLi" | ||
| 12976 | .language = .all_ms_languages | ||
| 12977 | |||
| 12978 | __iso_volatile_store8 | ||
| 12979 | .param_str = "vcD*c" | ||
| 12980 | .language = .all_ms_languages | ||
| 12981 | |||
| 12982 | __ldrexd | ||
| 12983 | .param_str = "WiWiCD*" | ||
| 12984 | .language = .all_ms_languages | ||
| 12985 | .target_set = TargetSet.initOne(.arm) | ||
| 12986 | |||
| 12987 | __lzcnt | ||
| 12988 | .param_str = "UiUi" | ||
| 12989 | .language = .all_ms_languages | ||
| 12990 | .attributes = .{ .@"const" = true, .const_evaluable = true } | ||
| 12991 | |||
| 12992 | __lzcnt16 | ||
| 12993 | .param_str = "UsUs" | ||
| 12994 | .language = .all_ms_languages | ||
| 12995 | .attributes = .{ .@"const" = true, .const_evaluable = true } | ||
| 12996 | |||
| 12997 | __lzcnt64 | ||
| 12998 | .param_str = "UWiUWi" | ||
| 12999 | .language = .all_ms_languages | ||
| 13000 | .attributes = .{ .@"const" = true, .const_evaluable = true } | ||
| 13001 | |||
| 13002 | __noop | ||
| 13003 | .param_str = "i." | ||
| 13004 | .language = .all_ms_languages | ||
| 13005 | |||
| 13006 | __nvvm_add_rm_d | ||
| 13007 | .param_str = "ddd" | ||
| 13008 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13009 | |||
| 13010 | __nvvm_add_rm_f | ||
| 13011 | .param_str = "fff" | ||
| 13012 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13013 | |||
| 13014 | __nvvm_add_rm_ftz_f | ||
| 13015 | .param_str = "fff" | ||
| 13016 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13017 | |||
| 13018 | __nvvm_add_rn_d | ||
| 13019 | .param_str = "ddd" | ||
| 13020 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13021 | |||
| 13022 | __nvvm_add_rn_f | ||
| 13023 | .param_str = "fff" | ||
| 13024 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13025 | |||
| 13026 | __nvvm_add_rn_ftz_f | ||
| 13027 | .param_str = "fff" | ||
| 13028 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13029 | |||
| 13030 | __nvvm_add_rp_d | ||
| 13031 | .param_str = "ddd" | ||
| 13032 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13033 | |||
| 13034 | __nvvm_add_rp_f | ||
| 13035 | .param_str = "fff" | ||
| 13036 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13037 | |||
| 13038 | __nvvm_add_rp_ftz_f | ||
| 13039 | .param_str = "fff" | ||
| 13040 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13041 | |||
| 13042 | __nvvm_add_rz_d | ||
| 13043 | .param_str = "ddd" | ||
| 13044 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13045 | |||
| 13046 | __nvvm_add_rz_f | ||
| 13047 | .param_str = "fff" | ||
| 13048 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13049 | |||
| 13050 | __nvvm_add_rz_ftz_f | ||
| 13051 | .param_str = "fff" | ||
| 13052 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13053 | |||
| 13054 | __nvvm_atom_add_gen_f | ||
| 13055 | .param_str = "ffD*f" | ||
| 13056 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13057 | |||
| 13058 | __nvvm_atom_add_gen_i | ||
| 13059 | .param_str = "iiD*i" | ||
| 13060 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13061 | |||
| 13062 | __nvvm_atom_add_gen_l | ||
| 13063 | .param_str = "LiLiD*Li" | ||
| 13064 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13065 | |||
| 13066 | __nvvm_atom_add_gen_ll | ||
| 13067 | .param_str = "LLiLLiD*LLi" | ||
| 13068 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13069 | |||
| 13070 | __nvvm_atom_and_gen_i | ||
| 13071 | .param_str = "iiD*i" | ||
| 13072 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13073 | |||
| 13074 | __nvvm_atom_and_gen_l | ||
| 13075 | .param_str = "LiLiD*Li" | ||
| 13076 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13077 | |||
| 13078 | __nvvm_atom_and_gen_ll | ||
| 13079 | .param_str = "LLiLLiD*LLi" | ||
| 13080 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13081 | |||
| 13082 | __nvvm_atom_cas_gen_i | ||
| 13083 | .param_str = "iiD*ii" | ||
| 13084 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13085 | |||
| 13086 | __nvvm_atom_cas_gen_l | ||
| 13087 | .param_str = "LiLiD*LiLi" | ||
| 13088 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13089 | |||
| 13090 | __nvvm_atom_cas_gen_ll | ||
| 13091 | .param_str = "LLiLLiD*LLiLLi" | ||
| 13092 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13093 | |||
| 13094 | __nvvm_atom_dec_gen_ui | ||
| 13095 | .param_str = "UiUiD*Ui" | ||
| 13096 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13097 | |||
| 13098 | __nvvm_atom_inc_gen_ui | ||
| 13099 | .param_str = "UiUiD*Ui" | ||
| 13100 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13101 | |||
| 13102 | __nvvm_atom_max_gen_i | ||
| 13103 | .param_str = "iiD*i" | ||
| 13104 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13105 | |||
| 13106 | __nvvm_atom_max_gen_l | ||
| 13107 | .param_str = "LiLiD*Li" | ||
| 13108 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13109 | |||
| 13110 | __nvvm_atom_max_gen_ll | ||
| 13111 | .param_str = "LLiLLiD*LLi" | ||
| 13112 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13113 | |||
| 13114 | __nvvm_atom_max_gen_ui | ||
| 13115 | .param_str = "UiUiD*Ui" | ||
| 13116 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13117 | |||
| 13118 | __nvvm_atom_max_gen_ul | ||
| 13119 | .param_str = "ULiULiD*ULi" | ||
| 13120 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13121 | |||
| 13122 | __nvvm_atom_max_gen_ull | ||
| 13123 | .param_str = "ULLiULLiD*ULLi" | ||
| 13124 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13125 | |||
| 13126 | __nvvm_atom_min_gen_i | ||
| 13127 | .param_str = "iiD*i" | ||
| 13128 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13129 | |||
| 13130 | __nvvm_atom_min_gen_l | ||
| 13131 | .param_str = "LiLiD*Li" | ||
| 13132 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13133 | |||
| 13134 | __nvvm_atom_min_gen_ll | ||
| 13135 | .param_str = "LLiLLiD*LLi" | ||
| 13136 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13137 | |||
| 13138 | __nvvm_atom_min_gen_ui | ||
| 13139 | .param_str = "UiUiD*Ui" | ||
| 13140 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13141 | |||
| 13142 | __nvvm_atom_min_gen_ul | ||
| 13143 | .param_str = "ULiULiD*ULi" | ||
| 13144 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13145 | |||
| 13146 | __nvvm_atom_min_gen_ull | ||
| 13147 | .param_str = "ULLiULLiD*ULLi" | ||
| 13148 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13149 | |||
| 13150 | __nvvm_atom_or_gen_i | ||
| 13151 | .param_str = "iiD*i" | ||
| 13152 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13153 | |||
| 13154 | __nvvm_atom_or_gen_l | ||
| 13155 | .param_str = "LiLiD*Li" | ||
| 13156 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13157 | |||
| 13158 | __nvvm_atom_or_gen_ll | ||
| 13159 | .param_str = "LLiLLiD*LLi" | ||
| 13160 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13161 | |||
| 13162 | __nvvm_atom_sub_gen_i | ||
| 13163 | .param_str = "iiD*i" | ||
| 13164 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13165 | |||
| 13166 | __nvvm_atom_sub_gen_l | ||
| 13167 | .param_str = "LiLiD*Li" | ||
| 13168 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13169 | |||
| 13170 | __nvvm_atom_sub_gen_ll | ||
| 13171 | .param_str = "LLiLLiD*LLi" | ||
| 13172 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13173 | |||
| 13174 | __nvvm_atom_xchg_gen_i | ||
| 13175 | .param_str = "iiD*i" | ||
| 13176 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13177 | |||
| 13178 | __nvvm_atom_xchg_gen_l | ||
| 13179 | .param_str = "LiLiD*Li" | ||
| 13180 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13181 | |||
| 13182 | __nvvm_atom_xchg_gen_ll | ||
| 13183 | .param_str = "LLiLLiD*LLi" | ||
| 13184 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13185 | |||
| 13186 | __nvvm_atom_xor_gen_i | ||
| 13187 | .param_str = "iiD*i" | ||
| 13188 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13189 | |||
| 13190 | __nvvm_atom_xor_gen_l | ||
| 13191 | .param_str = "LiLiD*Li" | ||
| 13192 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13193 | |||
| 13194 | __nvvm_atom_xor_gen_ll | ||
| 13195 | .param_str = "LLiLLiD*LLi" | ||
| 13196 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13197 | |||
| 13198 | __nvvm_bar0_and | ||
| 13199 | .param_str = "ii" | ||
| 13200 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13201 | |||
| 13202 | __nvvm_bar0_or | ||
| 13203 | .param_str = "ii" | ||
| 13204 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13205 | |||
| 13206 | __nvvm_bar0_popc | ||
| 13207 | .param_str = "ii" | ||
| 13208 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13209 | |||
| 13210 | __nvvm_bar_sync | ||
| 13211 | .param_str = "vi" | ||
| 13212 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13213 | |||
| 13214 | __nvvm_bitcast_d2ll | ||
| 13215 | .param_str = "LLid" | ||
| 13216 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13217 | |||
| 13218 | __nvvm_bitcast_f2i | ||
| 13219 | .param_str = "if" | ||
| 13220 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13221 | |||
| 13222 | __nvvm_bitcast_i2f | ||
| 13223 | .param_str = "fi" | ||
| 13224 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13225 | |||
| 13226 | __nvvm_bitcast_ll2d | ||
| 13227 | .param_str = "dLLi" | ||
| 13228 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13229 | |||
| 13230 | __nvvm_ceil_d | ||
| 13231 | .param_str = "dd" | ||
| 13232 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13233 | |||
| 13234 | __nvvm_ceil_f | ||
| 13235 | .param_str = "ff" | ||
| 13236 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13237 | |||
| 13238 | __nvvm_ceil_ftz_f | ||
| 13239 | .param_str = "ff" | ||
| 13240 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13241 | |||
| 13242 | __nvvm_compiler_error | ||
| 13243 | .param_str = "vcC*4" | ||
| 13244 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13245 | |||
| 13246 | __nvvm_compiler_warn | ||
| 13247 | .param_str = "vcC*4" | ||
| 13248 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13249 | |||
| 13250 | __nvvm_cos_approx_f | ||
| 13251 | .param_str = "ff" | ||
| 13252 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13253 | |||
| 13254 | __nvvm_cos_approx_ftz_f | ||
| 13255 | .param_str = "ff" | ||
| 13256 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13257 | |||
| 13258 | __nvvm_d2f_rm | ||
| 13259 | .param_str = "fd" | ||
| 13260 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13261 | |||
| 13262 | __nvvm_d2f_rm_ftz | ||
| 13263 | .param_str = "fd" | ||
| 13264 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13265 | |||
| 13266 | __nvvm_d2f_rn | ||
| 13267 | .param_str = "fd" | ||
| 13268 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13269 | |||
| 13270 | __nvvm_d2f_rn_ftz | ||
| 13271 | .param_str = "fd" | ||
| 13272 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13273 | |||
| 13274 | __nvvm_d2f_rp | ||
| 13275 | .param_str = "fd" | ||
| 13276 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13277 | |||
| 13278 | __nvvm_d2f_rp_ftz | ||
| 13279 | .param_str = "fd" | ||
| 13280 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13281 | |||
| 13282 | __nvvm_d2f_rz | ||
| 13283 | .param_str = "fd" | ||
| 13284 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13285 | |||
| 13286 | __nvvm_d2f_rz_ftz | ||
| 13287 | .param_str = "fd" | ||
| 13288 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13289 | |||
| 13290 | __nvvm_d2i_hi | ||
| 13291 | .param_str = "id" | ||
| 13292 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13293 | |||
| 13294 | __nvvm_d2i_lo | ||
| 13295 | .param_str = "id" | ||
| 13296 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13297 | |||
| 13298 | __nvvm_d2i_rm | ||
| 13299 | .param_str = "id" | ||
| 13300 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13301 | |||
| 13302 | __nvvm_d2i_rn | ||
| 13303 | .param_str = "id" | ||
| 13304 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13305 | |||
| 13306 | __nvvm_d2i_rp | ||
| 13307 | .param_str = "id" | ||
| 13308 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13309 | |||
| 13310 | __nvvm_d2i_rz | ||
| 13311 | .param_str = "id" | ||
| 13312 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13313 | |||
| 13314 | __nvvm_d2ll_rm | ||
| 13315 | .param_str = "LLid" | ||
| 13316 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13317 | |||
| 13318 | __nvvm_d2ll_rn | ||
| 13319 | .param_str = "LLid" | ||
| 13320 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13321 | |||
| 13322 | __nvvm_d2ll_rp | ||
| 13323 | .param_str = "LLid" | ||
| 13324 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13325 | |||
| 13326 | __nvvm_d2ll_rz | ||
| 13327 | .param_str = "LLid" | ||
| 13328 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13329 | |||
| 13330 | __nvvm_d2ui_rm | ||
| 13331 | .param_str = "Uid" | ||
| 13332 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13333 | |||
| 13334 | __nvvm_d2ui_rn | ||
| 13335 | .param_str = "Uid" | ||
| 13336 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13337 | |||
| 13338 | __nvvm_d2ui_rp | ||
| 13339 | .param_str = "Uid" | ||
| 13340 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13341 | |||
| 13342 | __nvvm_d2ui_rz | ||
| 13343 | .param_str = "Uid" | ||
| 13344 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13345 | |||
| 13346 | __nvvm_d2ull_rm | ||
| 13347 | .param_str = "ULLid" | ||
| 13348 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13349 | |||
| 13350 | __nvvm_d2ull_rn | ||
| 13351 | .param_str = "ULLid" | ||
| 13352 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13353 | |||
| 13354 | __nvvm_d2ull_rp | ||
| 13355 | .param_str = "ULLid" | ||
| 13356 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13357 | |||
| 13358 | __nvvm_d2ull_rz | ||
| 13359 | .param_str = "ULLid" | ||
| 13360 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13361 | |||
| 13362 | __nvvm_div_approx_f | ||
| 13363 | .param_str = "fff" | ||
| 13364 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13365 | |||
| 13366 | __nvvm_div_approx_ftz_f | ||
| 13367 | .param_str = "fff" | ||
| 13368 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13369 | |||
| 13370 | __nvvm_div_rm_d | ||
| 13371 | .param_str = "ddd" | ||
| 13372 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13373 | |||
| 13374 | __nvvm_div_rm_f | ||
| 13375 | .param_str = "fff" | ||
| 13376 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13377 | |||
| 13378 | __nvvm_div_rm_ftz_f | ||
| 13379 | .param_str = "fff" | ||
| 13380 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13381 | |||
| 13382 | __nvvm_div_rn_d | ||
| 13383 | .param_str = "ddd" | ||
| 13384 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13385 | |||
| 13386 | __nvvm_div_rn_f | ||
| 13387 | .param_str = "fff" | ||
| 13388 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13389 | |||
| 13390 | __nvvm_div_rn_ftz_f | ||
| 13391 | .param_str = "fff" | ||
| 13392 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13393 | |||
| 13394 | __nvvm_div_rp_d | ||
| 13395 | .param_str = "ddd" | ||
| 13396 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13397 | |||
| 13398 | __nvvm_div_rp_f | ||
| 13399 | .param_str = "fff" | ||
| 13400 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13401 | |||
| 13402 | __nvvm_div_rp_ftz_f | ||
| 13403 | .param_str = "fff" | ||
| 13404 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13405 | |||
| 13406 | __nvvm_div_rz_d | ||
| 13407 | .param_str = "ddd" | ||
| 13408 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13409 | |||
| 13410 | __nvvm_div_rz_f | ||
| 13411 | .param_str = "fff" | ||
| 13412 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13413 | |||
| 13414 | __nvvm_div_rz_ftz_f | ||
| 13415 | .param_str = "fff" | ||
| 13416 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13417 | |||
| 13418 | __nvvm_ex2_approx_d | ||
| 13419 | .param_str = "dd" | ||
| 13420 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13421 | |||
| 13422 | __nvvm_ex2_approx_f | ||
| 13423 | .param_str = "ff" | ||
| 13424 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13425 | |||
| 13426 | __nvvm_ex2_approx_ftz_f | ||
| 13427 | .param_str = "ff" | ||
| 13428 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13429 | |||
| 13430 | __nvvm_f2h_rn | ||
| 13431 | .param_str = "Usf" | ||
| 13432 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13433 | |||
| 13434 | __nvvm_f2h_rn_ftz | ||
| 13435 | .param_str = "Usf" | ||
| 13436 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13437 | |||
| 13438 | __nvvm_f2i_rm | ||
| 13439 | .param_str = "if" | ||
| 13440 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13441 | |||
| 13442 | __nvvm_f2i_rm_ftz | ||
| 13443 | .param_str = "if" | ||
| 13444 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13445 | |||
| 13446 | __nvvm_f2i_rn | ||
| 13447 | .param_str = "if" | ||
| 13448 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13449 | |||
| 13450 | __nvvm_f2i_rn_ftz | ||
| 13451 | .param_str = "if" | ||
| 13452 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13453 | |||
| 13454 | __nvvm_f2i_rp | ||
| 13455 | .param_str = "if" | ||
| 13456 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13457 | |||
| 13458 | __nvvm_f2i_rp_ftz | ||
| 13459 | .param_str = "if" | ||
| 13460 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13461 | |||
| 13462 | __nvvm_f2i_rz | ||
| 13463 | .param_str = "if" | ||
| 13464 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13465 | |||
| 13466 | __nvvm_f2i_rz_ftz | ||
| 13467 | .param_str = "if" | ||
| 13468 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13469 | |||
| 13470 | __nvvm_f2ll_rm | ||
| 13471 | .param_str = "LLif" | ||
| 13472 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13473 | |||
| 13474 | __nvvm_f2ll_rm_ftz | ||
| 13475 | .param_str = "LLif" | ||
| 13476 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13477 | |||
| 13478 | __nvvm_f2ll_rn | ||
| 13479 | .param_str = "LLif" | ||
| 13480 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13481 | |||
| 13482 | __nvvm_f2ll_rn_ftz | ||
| 13483 | .param_str = "LLif" | ||
| 13484 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13485 | |||
| 13486 | __nvvm_f2ll_rp | ||
| 13487 | .param_str = "LLif" | ||
| 13488 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13489 | |||
| 13490 | __nvvm_f2ll_rp_ftz | ||
| 13491 | .param_str = "LLif" | ||
| 13492 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13493 | |||
| 13494 | __nvvm_f2ll_rz | ||
| 13495 | .param_str = "LLif" | ||
| 13496 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13497 | |||
| 13498 | __nvvm_f2ll_rz_ftz | ||
| 13499 | .param_str = "LLif" | ||
| 13500 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13501 | |||
| 13502 | __nvvm_f2ui_rm | ||
| 13503 | .param_str = "Uif" | ||
| 13504 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13505 | |||
| 13506 | __nvvm_f2ui_rm_ftz | ||
| 13507 | .param_str = "Uif" | ||
| 13508 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13509 | |||
| 13510 | __nvvm_f2ui_rn | ||
| 13511 | .param_str = "Uif" | ||
| 13512 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13513 | |||
| 13514 | __nvvm_f2ui_rn_ftz | ||
| 13515 | .param_str = "Uif" | ||
| 13516 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13517 | |||
| 13518 | __nvvm_f2ui_rp | ||
| 13519 | .param_str = "Uif" | ||
| 13520 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13521 | |||
| 13522 | __nvvm_f2ui_rp_ftz | ||
| 13523 | .param_str = "Uif" | ||
| 13524 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13525 | |||
| 13526 | __nvvm_f2ui_rz | ||
| 13527 | .param_str = "Uif" | ||
| 13528 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13529 | |||
| 13530 | __nvvm_f2ui_rz_ftz | ||
| 13531 | .param_str = "Uif" | ||
| 13532 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13533 | |||
| 13534 | __nvvm_f2ull_rm | ||
| 13535 | .param_str = "ULLif" | ||
| 13536 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13537 | |||
| 13538 | __nvvm_f2ull_rm_ftz | ||
| 13539 | .param_str = "ULLif" | ||
| 13540 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13541 | |||
| 13542 | __nvvm_f2ull_rn | ||
| 13543 | .param_str = "ULLif" | ||
| 13544 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13545 | |||
| 13546 | __nvvm_f2ull_rn_ftz | ||
| 13547 | .param_str = "ULLif" | ||
| 13548 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13549 | |||
| 13550 | __nvvm_f2ull_rp | ||
| 13551 | .param_str = "ULLif" | ||
| 13552 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13553 | |||
| 13554 | __nvvm_f2ull_rp_ftz | ||
| 13555 | .param_str = "ULLif" | ||
| 13556 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13557 | |||
| 13558 | __nvvm_f2ull_rz | ||
| 13559 | .param_str = "ULLif" | ||
| 13560 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13561 | |||
| 13562 | __nvvm_f2ull_rz_ftz | ||
| 13563 | .param_str = "ULLif" | ||
| 13564 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13565 | |||
| 13566 | __nvvm_fabs_d | ||
| 13567 | .param_str = "dd" | ||
| 13568 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13569 | |||
| 13570 | __nvvm_fabs_f | ||
| 13571 | .param_str = "ff" | ||
| 13572 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13573 | |||
| 13574 | __nvvm_fabs_ftz_f | ||
| 13575 | .param_str = "ff" | ||
| 13576 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13577 | |||
| 13578 | __nvvm_floor_d | ||
| 13579 | .param_str = "dd" | ||
| 13580 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13581 | |||
| 13582 | __nvvm_floor_f | ||
| 13583 | .param_str = "ff" | ||
| 13584 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13585 | |||
| 13586 | __nvvm_floor_ftz_f | ||
| 13587 | .param_str = "ff" | ||
| 13588 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13589 | |||
| 13590 | __nvvm_fma_rm_d | ||
| 13591 | .param_str = "dddd" | ||
| 13592 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13593 | |||
| 13594 | __nvvm_fma_rm_f | ||
| 13595 | .param_str = "ffff" | ||
| 13596 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13597 | |||
| 13598 | __nvvm_fma_rm_ftz_f | ||
| 13599 | .param_str = "ffff" | ||
| 13600 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13601 | |||
| 13602 | __nvvm_fma_rn_d | ||
| 13603 | .param_str = "dddd" | ||
| 13604 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13605 | |||
| 13606 | __nvvm_fma_rn_f | ||
| 13607 | .param_str = "ffff" | ||
| 13608 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13609 | |||
| 13610 | __nvvm_fma_rn_ftz_f | ||
| 13611 | .param_str = "ffff" | ||
| 13612 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13613 | |||
| 13614 | __nvvm_fma_rp_d | ||
| 13615 | .param_str = "dddd" | ||
| 13616 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13617 | |||
| 13618 | __nvvm_fma_rp_f | ||
| 13619 | .param_str = "ffff" | ||
| 13620 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13621 | |||
| 13622 | __nvvm_fma_rp_ftz_f | ||
| 13623 | .param_str = "ffff" | ||
| 13624 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13625 | |||
| 13626 | __nvvm_fma_rz_d | ||
| 13627 | .param_str = "dddd" | ||
| 13628 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13629 | |||
| 13630 | __nvvm_fma_rz_f | ||
| 13631 | .param_str = "ffff" | ||
| 13632 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13633 | |||
| 13634 | __nvvm_fma_rz_ftz_f | ||
| 13635 | .param_str = "ffff" | ||
| 13636 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13637 | |||
| 13638 | __nvvm_fmax_d | ||
| 13639 | .param_str = "ddd" | ||
| 13640 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13641 | |||
| 13642 | __nvvm_fmax_f | ||
| 13643 | .param_str = "fff" | ||
| 13644 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13645 | |||
| 13646 | __nvvm_fmax_ftz_f | ||
| 13647 | .param_str = "fff" | ||
| 13648 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13649 | |||
| 13650 | __nvvm_fmin_d | ||
| 13651 | .param_str = "ddd" | ||
| 13652 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13653 | |||
| 13654 | __nvvm_fmin_f | ||
| 13655 | .param_str = "fff" | ||
| 13656 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13657 | |||
| 13658 | __nvvm_fmin_ftz_f | ||
| 13659 | .param_str = "fff" | ||
| 13660 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13661 | |||
| 13662 | __nvvm_i2d_rm | ||
| 13663 | .param_str = "di" | ||
| 13664 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13665 | |||
| 13666 | __nvvm_i2d_rn | ||
| 13667 | .param_str = "di" | ||
| 13668 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13669 | |||
| 13670 | __nvvm_i2d_rp | ||
| 13671 | .param_str = "di" | ||
| 13672 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13673 | |||
| 13674 | __nvvm_i2d_rz | ||
| 13675 | .param_str = "di" | ||
| 13676 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13677 | |||
| 13678 | __nvvm_i2f_rm | ||
| 13679 | .param_str = "fi" | ||
| 13680 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13681 | |||
| 13682 | __nvvm_i2f_rn | ||
| 13683 | .param_str = "fi" | ||
| 13684 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13685 | |||
| 13686 | __nvvm_i2f_rp | ||
| 13687 | .param_str = "fi" | ||
| 13688 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13689 | |||
| 13690 | __nvvm_i2f_rz | ||
| 13691 | .param_str = "fi" | ||
| 13692 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13693 | |||
| 13694 | __nvvm_isspacep_const | ||
| 13695 | .param_str = "bvC*" | ||
| 13696 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13697 | .attributes = .{ .@"const" = true } | ||
| 13698 | |||
| 13699 | __nvvm_isspacep_global | ||
| 13700 | .param_str = "bvC*" | ||
| 13701 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13702 | .attributes = .{ .@"const" = true } | ||
| 13703 | |||
| 13704 | __nvvm_isspacep_local | ||
| 13705 | .param_str = "bvC*" | ||
| 13706 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13707 | .attributes = .{ .@"const" = true } | ||
| 13708 | |||
| 13709 | __nvvm_isspacep_shared | ||
| 13710 | .param_str = "bvC*" | ||
| 13711 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13712 | .attributes = .{ .@"const" = true } | ||
| 13713 | |||
| 13714 | __nvvm_ldg_c | ||
| 13715 | .param_str = "ccC*" | ||
| 13716 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13717 | |||
| 13718 | __nvvm_ldg_c2 | ||
| 13719 | .param_str = "E2cE2cC*" | ||
| 13720 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13721 | |||
| 13722 | __nvvm_ldg_c4 | ||
| 13723 | .param_str = "E4cE4cC*" | ||
| 13724 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13725 | |||
| 13726 | __nvvm_ldg_d | ||
| 13727 | .param_str = "ddC*" | ||
| 13728 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13729 | |||
| 13730 | __nvvm_ldg_d2 | ||
| 13731 | .param_str = "E2dE2dC*" | ||
| 13732 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13733 | |||
| 13734 | __nvvm_ldg_f | ||
| 13735 | .param_str = "ffC*" | ||
| 13736 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13737 | |||
| 13738 | __nvvm_ldg_f2 | ||
| 13739 | .param_str = "E2fE2fC*" | ||
| 13740 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13741 | |||
| 13742 | __nvvm_ldg_f4 | ||
| 13743 | .param_str = "E4fE4fC*" | ||
| 13744 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13745 | |||
| 13746 | __nvvm_ldg_h | ||
| 13747 | .param_str = "hhC*" | ||
| 13748 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13749 | |||
| 13750 | __nvvm_ldg_h2 | ||
| 13751 | .param_str = "E2hE2hC*" | ||
| 13752 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13753 | |||
| 13754 | __nvvm_ldg_i | ||
| 13755 | .param_str = "iiC*" | ||
| 13756 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13757 | |||
| 13758 | __nvvm_ldg_i2 | ||
| 13759 | .param_str = "E2iE2iC*" | ||
| 13760 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13761 | |||
| 13762 | __nvvm_ldg_i4 | ||
| 13763 | .param_str = "E4iE4iC*" | ||
| 13764 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13765 | |||
| 13766 | __nvvm_ldg_l | ||
| 13767 | .param_str = "LiLiC*" | ||
| 13768 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13769 | |||
| 13770 | __nvvm_ldg_l2 | ||
| 13771 | .param_str = "E2LiE2LiC*" | ||
| 13772 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13773 | |||
| 13774 | __nvvm_ldg_ll | ||
| 13775 | .param_str = "LLiLLiC*" | ||
| 13776 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13777 | |||
| 13778 | __nvvm_ldg_ll2 | ||
| 13779 | .param_str = "E2LLiE2LLiC*" | ||
| 13780 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13781 | |||
| 13782 | __nvvm_ldg_s | ||
| 13783 | .param_str = "ssC*" | ||
| 13784 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13785 | |||
| 13786 | __nvvm_ldg_s2 | ||
| 13787 | .param_str = "E2sE2sC*" | ||
| 13788 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13789 | |||
| 13790 | __nvvm_ldg_s4 | ||
| 13791 | .param_str = "E4sE4sC*" | ||
| 13792 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13793 | |||
| 13794 | __nvvm_ldg_sc | ||
| 13795 | .param_str = "ScScC*" | ||
| 13796 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13797 | |||
| 13798 | __nvvm_ldg_sc2 | ||
| 13799 | .param_str = "E2ScE2ScC*" | ||
| 13800 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13801 | |||
| 13802 | __nvvm_ldg_sc4 | ||
| 13803 | .param_str = "E4ScE4ScC*" | ||
| 13804 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13805 | |||
| 13806 | __nvvm_ldg_uc | ||
| 13807 | .param_str = "UcUcC*" | ||
| 13808 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13809 | |||
| 13810 | __nvvm_ldg_uc2 | ||
| 13811 | .param_str = "E2UcE2UcC*" | ||
| 13812 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13813 | |||
| 13814 | __nvvm_ldg_uc4 | ||
| 13815 | .param_str = "E4UcE4UcC*" | ||
| 13816 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13817 | |||
| 13818 | __nvvm_ldg_ui | ||
| 13819 | .param_str = "UiUiC*" | ||
| 13820 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13821 | |||
| 13822 | __nvvm_ldg_ui2 | ||
| 13823 | .param_str = "E2UiE2UiC*" | ||
| 13824 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13825 | |||
| 13826 | __nvvm_ldg_ui4 | ||
| 13827 | .param_str = "E4UiE4UiC*" | ||
| 13828 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13829 | |||
| 13830 | __nvvm_ldg_ul | ||
| 13831 | .param_str = "ULiULiC*" | ||
| 13832 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13833 | |||
| 13834 | __nvvm_ldg_ul2 | ||
| 13835 | .param_str = "E2ULiE2ULiC*" | ||
| 13836 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13837 | |||
| 13838 | __nvvm_ldg_ull | ||
| 13839 | .param_str = "ULLiULLiC*" | ||
| 13840 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13841 | |||
| 13842 | __nvvm_ldg_ull2 | ||
| 13843 | .param_str = "E2ULLiE2ULLiC*" | ||
| 13844 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13845 | |||
| 13846 | __nvvm_ldg_us | ||
| 13847 | .param_str = "UsUsC*" | ||
| 13848 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13849 | |||
| 13850 | __nvvm_ldg_us2 | ||
| 13851 | .param_str = "E2UsE2UsC*" | ||
| 13852 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13853 | |||
| 13854 | __nvvm_ldg_us4 | ||
| 13855 | .param_str = "E4UsE4UsC*" | ||
| 13856 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13857 | |||
| 13858 | __nvvm_ldu_c | ||
| 13859 | .param_str = "ccC*" | ||
| 13860 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13861 | |||
| 13862 | __nvvm_ldu_c2 | ||
| 13863 | .param_str = "E2cE2cC*" | ||
| 13864 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13865 | |||
| 13866 | __nvvm_ldu_c4 | ||
| 13867 | .param_str = "E4cE4cC*" | ||
| 13868 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13869 | |||
| 13870 | __nvvm_ldu_d | ||
| 13871 | .param_str = "ddC*" | ||
| 13872 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13873 | |||
| 13874 | __nvvm_ldu_d2 | ||
| 13875 | .param_str = "E2dE2dC*" | ||
| 13876 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13877 | |||
| 13878 | __nvvm_ldu_f | ||
| 13879 | .param_str = "ffC*" | ||
| 13880 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13881 | |||
| 13882 | __nvvm_ldu_f2 | ||
| 13883 | .param_str = "E2fE2fC*" | ||
| 13884 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13885 | |||
| 13886 | __nvvm_ldu_f4 | ||
| 13887 | .param_str = "E4fE4fC*" | ||
| 13888 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13889 | |||
| 13890 | __nvvm_ldu_h | ||
| 13891 | .param_str = "hhC*" | ||
| 13892 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13893 | |||
| 13894 | __nvvm_ldu_h2 | ||
| 13895 | .param_str = "E2hE2hC*" | ||
| 13896 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13897 | |||
| 13898 | __nvvm_ldu_i | ||
| 13899 | .param_str = "iiC*" | ||
| 13900 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13901 | |||
| 13902 | __nvvm_ldu_i2 | ||
| 13903 | .param_str = "E2iE2iC*" | ||
| 13904 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13905 | |||
| 13906 | __nvvm_ldu_i4 | ||
| 13907 | .param_str = "E4iE4iC*" | ||
| 13908 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13909 | |||
| 13910 | __nvvm_ldu_l | ||
| 13911 | .param_str = "LiLiC*" | ||
| 13912 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13913 | |||
| 13914 | __nvvm_ldu_l2 | ||
| 13915 | .param_str = "E2LiE2LiC*" | ||
| 13916 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13917 | |||
| 13918 | __nvvm_ldu_ll | ||
| 13919 | .param_str = "LLiLLiC*" | ||
| 13920 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13921 | |||
| 13922 | __nvvm_ldu_ll2 | ||
| 13923 | .param_str = "E2LLiE2LLiC*" | ||
| 13924 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13925 | |||
| 13926 | __nvvm_ldu_s | ||
| 13927 | .param_str = "ssC*" | ||
| 13928 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13929 | |||
| 13930 | __nvvm_ldu_s2 | ||
| 13931 | .param_str = "E2sE2sC*" | ||
| 13932 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13933 | |||
| 13934 | __nvvm_ldu_s4 | ||
| 13935 | .param_str = "E4sE4sC*" | ||
| 13936 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13937 | |||
| 13938 | __nvvm_ldu_sc | ||
| 13939 | .param_str = "ScScC*" | ||
| 13940 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13941 | |||
| 13942 | __nvvm_ldu_sc2 | ||
| 13943 | .param_str = "E2ScE2ScC*" | ||
| 13944 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13945 | |||
| 13946 | __nvvm_ldu_sc4 | ||
| 13947 | .param_str = "E4ScE4ScC*" | ||
| 13948 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13949 | |||
| 13950 | __nvvm_ldu_uc | ||
| 13951 | .param_str = "UcUcC*" | ||
| 13952 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13953 | |||
| 13954 | __nvvm_ldu_uc2 | ||
| 13955 | .param_str = "E2UcE2UcC*" | ||
| 13956 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13957 | |||
| 13958 | __nvvm_ldu_uc4 | ||
| 13959 | .param_str = "E4UcE4UcC*" | ||
| 13960 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13961 | |||
| 13962 | __nvvm_ldu_ui | ||
| 13963 | .param_str = "UiUiC*" | ||
| 13964 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13965 | |||
| 13966 | __nvvm_ldu_ui2 | ||
| 13967 | .param_str = "E2UiE2UiC*" | ||
| 13968 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13969 | |||
| 13970 | __nvvm_ldu_ui4 | ||
| 13971 | .param_str = "E4UiE4UiC*" | ||
| 13972 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13973 | |||
| 13974 | __nvvm_ldu_ul | ||
| 13975 | .param_str = "ULiULiC*" | ||
| 13976 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13977 | |||
| 13978 | __nvvm_ldu_ul2 | ||
| 13979 | .param_str = "E2ULiE2ULiC*" | ||
| 13980 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13981 | |||
| 13982 | __nvvm_ldu_ull | ||
| 13983 | .param_str = "ULLiULLiC*" | ||
| 13984 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13985 | |||
| 13986 | __nvvm_ldu_ull2 | ||
| 13987 | .param_str = "E2ULLiE2ULLiC*" | ||
| 13988 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13989 | |||
| 13990 | __nvvm_ldu_us | ||
| 13991 | .param_str = "UsUsC*" | ||
| 13992 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13993 | |||
| 13994 | __nvvm_ldu_us2 | ||
| 13995 | .param_str = "E2UsE2UsC*" | ||
| 13996 | .target_set = TargetSet.initOne(.nvptx) | ||
| 13997 | |||
| 13998 | __nvvm_ldu_us4 | ||
| 13999 | .param_str = "E4UsE4UsC*" | ||
| 14000 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14001 | |||
| 14002 | __nvvm_lg2_approx_d | ||
| 14003 | .param_str = "dd" | ||
| 14004 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14005 | |||
| 14006 | __nvvm_lg2_approx_f | ||
| 14007 | .param_str = "ff" | ||
| 14008 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14009 | |||
| 14010 | __nvvm_lg2_approx_ftz_f | ||
| 14011 | .param_str = "ff" | ||
| 14012 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14013 | |||
| 14014 | __nvvm_ll2d_rm | ||
| 14015 | .param_str = "dLLi" | ||
| 14016 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14017 | |||
| 14018 | __nvvm_ll2d_rn | ||
| 14019 | .param_str = "dLLi" | ||
| 14020 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14021 | |||
| 14022 | __nvvm_ll2d_rp | ||
| 14023 | .param_str = "dLLi" | ||
| 14024 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14025 | |||
| 14026 | __nvvm_ll2d_rz | ||
| 14027 | .param_str = "dLLi" | ||
| 14028 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14029 | |||
| 14030 | __nvvm_ll2f_rm | ||
| 14031 | .param_str = "fLLi" | ||
| 14032 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14033 | |||
| 14034 | __nvvm_ll2f_rn | ||
| 14035 | .param_str = "fLLi" | ||
| 14036 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14037 | |||
| 14038 | __nvvm_ll2f_rp | ||
| 14039 | .param_str = "fLLi" | ||
| 14040 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14041 | |||
| 14042 | __nvvm_ll2f_rz | ||
| 14043 | .param_str = "fLLi" | ||
| 14044 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14045 | |||
| 14046 | __nvvm_lohi_i2d | ||
| 14047 | .param_str = "dii" | ||
| 14048 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14049 | |||
| 14050 | __nvvm_membar_cta | ||
| 14051 | .param_str = "v" | ||
| 14052 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14053 | |||
| 14054 | __nvvm_membar_gl | ||
| 14055 | .param_str = "v" | ||
| 14056 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14057 | |||
| 14058 | __nvvm_membar_sys | ||
| 14059 | .param_str = "v" | ||
| 14060 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14061 | |||
| 14062 | __nvvm_memcpy | ||
| 14063 | .param_str = "vUc*Uc*zi" | ||
| 14064 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14065 | |||
| 14066 | __nvvm_memset | ||
| 14067 | .param_str = "vUc*Uczi" | ||
| 14068 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14069 | |||
| 14070 | __nvvm_mul24_i | ||
| 14071 | .param_str = "iii" | ||
| 14072 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14073 | |||
| 14074 | __nvvm_mul24_ui | ||
| 14075 | .param_str = "UiUiUi" | ||
| 14076 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14077 | |||
| 14078 | __nvvm_mul_rm_d | ||
| 14079 | .param_str = "ddd" | ||
| 14080 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14081 | |||
| 14082 | __nvvm_mul_rm_f | ||
| 14083 | .param_str = "fff" | ||
| 14084 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14085 | |||
| 14086 | __nvvm_mul_rm_ftz_f | ||
| 14087 | .param_str = "fff" | ||
| 14088 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14089 | |||
| 14090 | __nvvm_mul_rn_d | ||
| 14091 | .param_str = "ddd" | ||
| 14092 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14093 | |||
| 14094 | __nvvm_mul_rn_f | ||
| 14095 | .param_str = "fff" | ||
| 14096 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14097 | |||
| 14098 | __nvvm_mul_rn_ftz_f | ||
| 14099 | .param_str = "fff" | ||
| 14100 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14101 | |||
| 14102 | __nvvm_mul_rp_d | ||
| 14103 | .param_str = "ddd" | ||
| 14104 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14105 | |||
| 14106 | __nvvm_mul_rp_f | ||
| 14107 | .param_str = "fff" | ||
| 14108 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14109 | |||
| 14110 | __nvvm_mul_rp_ftz_f | ||
| 14111 | .param_str = "fff" | ||
| 14112 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14113 | |||
| 14114 | __nvvm_mul_rz_d | ||
| 14115 | .param_str = "ddd" | ||
| 14116 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14117 | |||
| 14118 | __nvvm_mul_rz_f | ||
| 14119 | .param_str = "fff" | ||
| 14120 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14121 | |||
| 14122 | __nvvm_mul_rz_ftz_f | ||
| 14123 | .param_str = "fff" | ||
| 14124 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14125 | |||
| 14126 | __nvvm_mulhi_i | ||
| 14127 | .param_str = "iii" | ||
| 14128 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14129 | |||
| 14130 | __nvvm_mulhi_ll | ||
| 14131 | .param_str = "LLiLLiLLi" | ||
| 14132 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14133 | |||
| 14134 | __nvvm_mulhi_ui | ||
| 14135 | .param_str = "UiUiUi" | ||
| 14136 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14137 | |||
| 14138 | __nvvm_mulhi_ull | ||
| 14139 | .param_str = "ULLiULLiULLi" | ||
| 14140 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14141 | |||
| 14142 | __nvvm_prmt | ||
| 14143 | .param_str = "UiUiUiUi" | ||
| 14144 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14145 | |||
| 14146 | __nvvm_rcp_approx_ftz_d | ||
| 14147 | .param_str = "dd" | ||
| 14148 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14149 | |||
| 14150 | __nvvm_rcp_approx_ftz_f | ||
| 14151 | .param_str = "ff" | ||
| 14152 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14153 | |||
| 14154 | __nvvm_rcp_rm_d | ||
| 14155 | .param_str = "dd" | ||
| 14156 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14157 | |||
| 14158 | __nvvm_rcp_rm_f | ||
| 14159 | .param_str = "ff" | ||
| 14160 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14161 | |||
| 14162 | __nvvm_rcp_rm_ftz_f | ||
| 14163 | .param_str = "ff" | ||
| 14164 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14165 | |||
| 14166 | __nvvm_rcp_rn_d | ||
| 14167 | .param_str = "dd" | ||
| 14168 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14169 | |||
| 14170 | __nvvm_rcp_rn_f | ||
| 14171 | .param_str = "ff" | ||
| 14172 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14173 | |||
| 14174 | __nvvm_rcp_rn_ftz_f | ||
| 14175 | .param_str = "ff" | ||
| 14176 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14177 | |||
| 14178 | __nvvm_rcp_rp_d | ||
| 14179 | .param_str = "dd" | ||
| 14180 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14181 | |||
| 14182 | __nvvm_rcp_rp_f | ||
| 14183 | .param_str = "ff" | ||
| 14184 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14185 | |||
| 14186 | __nvvm_rcp_rp_ftz_f | ||
| 14187 | .param_str = "ff" | ||
| 14188 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14189 | |||
| 14190 | __nvvm_rcp_rz_d | ||
| 14191 | .param_str = "dd" | ||
| 14192 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14193 | |||
| 14194 | __nvvm_rcp_rz_f | ||
| 14195 | .param_str = "ff" | ||
| 14196 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14197 | |||
| 14198 | __nvvm_rcp_rz_ftz_f | ||
| 14199 | .param_str = "ff" | ||
| 14200 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14201 | |||
| 14202 | __nvvm_read_ptx_sreg_clock | ||
| 14203 | .param_str = "i" | ||
| 14204 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14205 | |||
| 14206 | __nvvm_read_ptx_sreg_clock64 | ||
| 14207 | .param_str = "LLi" | ||
| 14208 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14209 | |||
| 14210 | __nvvm_read_ptx_sreg_ctaid_w | ||
| 14211 | .param_str = "i" | ||
| 14212 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14213 | .attributes = .{ .@"const" = true } | ||
| 14214 | |||
| 14215 | __nvvm_read_ptx_sreg_ctaid_x | ||
| 14216 | .param_str = "i" | ||
| 14217 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14218 | .attributes = .{ .@"const" = true } | ||
| 14219 | |||
| 14220 | __nvvm_read_ptx_sreg_ctaid_y | ||
| 14221 | .param_str = "i" | ||
| 14222 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14223 | .attributes = .{ .@"const" = true } | ||
| 14224 | |||
| 14225 | __nvvm_read_ptx_sreg_ctaid_z | ||
| 14226 | .param_str = "i" | ||
| 14227 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14228 | .attributes = .{ .@"const" = true } | ||
| 14229 | |||
| 14230 | __nvvm_read_ptx_sreg_gridid | ||
| 14231 | .param_str = "i" | ||
| 14232 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14233 | .attributes = .{ .@"const" = true } | ||
| 14234 | |||
| 14235 | __nvvm_read_ptx_sreg_laneid | ||
| 14236 | .param_str = "i" | ||
| 14237 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14238 | .attributes = .{ .@"const" = true } | ||
| 14239 | |||
| 14240 | __nvvm_read_ptx_sreg_lanemask_eq | ||
| 14241 | .param_str = "i" | ||
| 14242 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14243 | .attributes = .{ .@"const" = true } | ||
| 14244 | |||
| 14245 | __nvvm_read_ptx_sreg_lanemask_ge | ||
| 14246 | .param_str = "i" | ||
| 14247 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14248 | .attributes = .{ .@"const" = true } | ||
| 14249 | |||
| 14250 | __nvvm_read_ptx_sreg_lanemask_gt | ||
| 14251 | .param_str = "i" | ||
| 14252 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14253 | .attributes = .{ .@"const" = true } | ||
| 14254 | |||
| 14255 | __nvvm_read_ptx_sreg_lanemask_le | ||
| 14256 | .param_str = "i" | ||
| 14257 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14258 | .attributes = .{ .@"const" = true } | ||
| 14259 | |||
| 14260 | __nvvm_read_ptx_sreg_lanemask_lt | ||
| 14261 | .param_str = "i" | ||
| 14262 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14263 | .attributes = .{ .@"const" = true } | ||
| 14264 | |||
| 14265 | __nvvm_read_ptx_sreg_nctaid_w | ||
| 14266 | .param_str = "i" | ||
| 14267 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14268 | .attributes = .{ .@"const" = true } | ||
| 14269 | |||
| 14270 | __nvvm_read_ptx_sreg_nctaid_x | ||
| 14271 | .param_str = "i" | ||
| 14272 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14273 | .attributes = .{ .@"const" = true } | ||
| 14274 | |||
| 14275 | __nvvm_read_ptx_sreg_nctaid_y | ||
| 14276 | .param_str = "i" | ||
| 14277 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14278 | .attributes = .{ .@"const" = true } | ||
| 14279 | |||
| 14280 | __nvvm_read_ptx_sreg_nctaid_z | ||
| 14281 | .param_str = "i" | ||
| 14282 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14283 | .attributes = .{ .@"const" = true } | ||
| 14284 | |||
| 14285 | __nvvm_read_ptx_sreg_nsmid | ||
| 14286 | .param_str = "i" | ||
| 14287 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14288 | .attributes = .{ .@"const" = true } | ||
| 14289 | |||
| 14290 | __nvvm_read_ptx_sreg_ntid_w | ||
| 14291 | .param_str = "i" | ||
| 14292 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14293 | .attributes = .{ .@"const" = true } | ||
| 14294 | |||
| 14295 | __nvvm_read_ptx_sreg_ntid_x | ||
| 14296 | .param_str = "i" | ||
| 14297 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14298 | .attributes = .{ .@"const" = true } | ||
| 14299 | |||
| 14300 | __nvvm_read_ptx_sreg_ntid_y | ||
| 14301 | .param_str = "i" | ||
| 14302 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14303 | .attributes = .{ .@"const" = true } | ||
| 14304 | |||
| 14305 | __nvvm_read_ptx_sreg_ntid_z | ||
| 14306 | .param_str = "i" | ||
| 14307 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14308 | .attributes = .{ .@"const" = true } | ||
| 14309 | |||
| 14310 | __nvvm_read_ptx_sreg_nwarpid | ||
| 14311 | .param_str = "i" | ||
| 14312 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14313 | .attributes = .{ .@"const" = true } | ||
| 14314 | |||
| 14315 | __nvvm_read_ptx_sreg_pm0 | ||
| 14316 | .param_str = "i" | ||
| 14317 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14318 | |||
| 14319 | __nvvm_read_ptx_sreg_pm1 | ||
| 14320 | .param_str = "i" | ||
| 14321 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14322 | |||
| 14323 | __nvvm_read_ptx_sreg_pm2 | ||
| 14324 | .param_str = "i" | ||
| 14325 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14326 | |||
| 14327 | __nvvm_read_ptx_sreg_pm3 | ||
| 14328 | .param_str = "i" | ||
| 14329 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14330 | |||
| 14331 | __nvvm_read_ptx_sreg_smid | ||
| 14332 | .param_str = "i" | ||
| 14333 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14334 | .attributes = .{ .@"const" = true } | ||
| 14335 | |||
| 14336 | __nvvm_read_ptx_sreg_tid_w | ||
| 14337 | .param_str = "i" | ||
| 14338 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14339 | .attributes = .{ .@"const" = true } | ||
| 14340 | |||
| 14341 | __nvvm_read_ptx_sreg_tid_x | ||
| 14342 | .param_str = "i" | ||
| 14343 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14344 | .attributes = .{ .@"const" = true } | ||
| 14345 | |||
| 14346 | __nvvm_read_ptx_sreg_tid_y | ||
| 14347 | .param_str = "i" | ||
| 14348 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14349 | .attributes = .{ .@"const" = true } | ||
| 14350 | |||
| 14351 | __nvvm_read_ptx_sreg_tid_z | ||
| 14352 | .param_str = "i" | ||
| 14353 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14354 | .attributes = .{ .@"const" = true } | ||
| 14355 | |||
| 14356 | __nvvm_read_ptx_sreg_warpid | ||
| 14357 | .param_str = "i" | ||
| 14358 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14359 | .attributes = .{ .@"const" = true } | ||
| 14360 | |||
| 14361 | __nvvm_round_d | ||
| 14362 | .param_str = "dd" | ||
| 14363 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14364 | |||
| 14365 | __nvvm_round_f | ||
| 14366 | .param_str = "ff" | ||
| 14367 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14368 | |||
| 14369 | __nvvm_round_ftz_f | ||
| 14370 | .param_str = "ff" | ||
| 14371 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14372 | |||
| 14373 | __nvvm_rsqrt_approx_d | ||
| 14374 | .param_str = "dd" | ||
| 14375 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14376 | |||
| 14377 | __nvvm_rsqrt_approx_f | ||
| 14378 | .param_str = "ff" | ||
| 14379 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14380 | |||
| 14381 | __nvvm_rsqrt_approx_ftz_f | ||
| 14382 | .param_str = "ff" | ||
| 14383 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14384 | |||
| 14385 | __nvvm_sad_i | ||
| 14386 | .param_str = "iiii" | ||
| 14387 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14388 | |||
| 14389 | __nvvm_sad_ui | ||
| 14390 | .param_str = "UiUiUiUi" | ||
| 14391 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14392 | |||
| 14393 | __nvvm_saturate_d | ||
| 14394 | .param_str = "dd" | ||
| 14395 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14396 | |||
| 14397 | __nvvm_saturate_f | ||
| 14398 | .param_str = "ff" | ||
| 14399 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14400 | |||
| 14401 | __nvvm_saturate_ftz_f | ||
| 14402 | .param_str = "ff" | ||
| 14403 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14404 | |||
| 14405 | __nvvm_shfl_bfly_f32 | ||
| 14406 | .param_str = "ffii" | ||
| 14407 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14408 | |||
| 14409 | __nvvm_shfl_bfly_i32 | ||
| 14410 | .param_str = "iiii" | ||
| 14411 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14412 | |||
| 14413 | __nvvm_shfl_down_f32 | ||
| 14414 | .param_str = "ffii" | ||
| 14415 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14416 | |||
| 14417 | __nvvm_shfl_down_i32 | ||
| 14418 | .param_str = "iiii" | ||
| 14419 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14420 | |||
| 14421 | __nvvm_shfl_idx_f32 | ||
| 14422 | .param_str = "ffii" | ||
| 14423 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14424 | |||
| 14425 | __nvvm_shfl_idx_i32 | ||
| 14426 | .param_str = "iiii" | ||
| 14427 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14428 | |||
| 14429 | __nvvm_shfl_up_f32 | ||
| 14430 | .param_str = "ffii" | ||
| 14431 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14432 | |||
| 14433 | __nvvm_shfl_up_i32 | ||
| 14434 | .param_str = "iiii" | ||
| 14435 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14436 | |||
| 14437 | __nvvm_sin_approx_f | ||
| 14438 | .param_str = "ff" | ||
| 14439 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14440 | |||
| 14441 | __nvvm_sin_approx_ftz_f | ||
| 14442 | .param_str = "ff" | ||
| 14443 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14444 | |||
| 14445 | __nvvm_sqrt_approx_f | ||
| 14446 | .param_str = "ff" | ||
| 14447 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14448 | |||
| 14449 | __nvvm_sqrt_approx_ftz_f | ||
| 14450 | .param_str = "ff" | ||
| 14451 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14452 | |||
| 14453 | __nvvm_sqrt_rm_d | ||
| 14454 | .param_str = "dd" | ||
| 14455 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14456 | |||
| 14457 | __nvvm_sqrt_rm_f | ||
| 14458 | .param_str = "ff" | ||
| 14459 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14460 | |||
| 14461 | __nvvm_sqrt_rm_ftz_f | ||
| 14462 | .param_str = "ff" | ||
| 14463 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14464 | |||
| 14465 | __nvvm_sqrt_rn_d | ||
| 14466 | .param_str = "dd" | ||
| 14467 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14468 | |||
| 14469 | __nvvm_sqrt_rn_f | ||
| 14470 | .param_str = "ff" | ||
| 14471 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14472 | |||
| 14473 | __nvvm_sqrt_rn_ftz_f | ||
| 14474 | .param_str = "ff" | ||
| 14475 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14476 | |||
| 14477 | __nvvm_sqrt_rp_d | ||
| 14478 | .param_str = "dd" | ||
| 14479 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14480 | |||
| 14481 | __nvvm_sqrt_rp_f | ||
| 14482 | .param_str = "ff" | ||
| 14483 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14484 | |||
| 14485 | __nvvm_sqrt_rp_ftz_f | ||
| 14486 | .param_str = "ff" | ||
| 14487 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14488 | |||
| 14489 | __nvvm_sqrt_rz_d | ||
| 14490 | .param_str = "dd" | ||
| 14491 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14492 | |||
| 14493 | __nvvm_sqrt_rz_f | ||
| 14494 | .param_str = "ff" | ||
| 14495 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14496 | |||
| 14497 | __nvvm_sqrt_rz_ftz_f | ||
| 14498 | .param_str = "ff" | ||
| 14499 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14500 | |||
| 14501 | __nvvm_trunc_d | ||
| 14502 | .param_str = "dd" | ||
| 14503 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14504 | |||
| 14505 | __nvvm_trunc_f | ||
| 14506 | .param_str = "ff" | ||
| 14507 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14508 | |||
| 14509 | __nvvm_trunc_ftz_f | ||
| 14510 | .param_str = "ff" | ||
| 14511 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14512 | |||
| 14513 | __nvvm_ui2d_rm | ||
| 14514 | .param_str = "dUi" | ||
| 14515 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14516 | |||
| 14517 | __nvvm_ui2d_rn | ||
| 14518 | .param_str = "dUi" | ||
| 14519 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14520 | |||
| 14521 | __nvvm_ui2d_rp | ||
| 14522 | .param_str = "dUi" | ||
| 14523 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14524 | |||
| 14525 | __nvvm_ui2d_rz | ||
| 14526 | .param_str = "dUi" | ||
| 14527 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14528 | |||
| 14529 | __nvvm_ui2f_rm | ||
| 14530 | .param_str = "fUi" | ||
| 14531 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14532 | |||
| 14533 | __nvvm_ui2f_rn | ||
| 14534 | .param_str = "fUi" | ||
| 14535 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14536 | |||
| 14537 | __nvvm_ui2f_rp | ||
| 14538 | .param_str = "fUi" | ||
| 14539 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14540 | |||
| 14541 | __nvvm_ui2f_rz | ||
| 14542 | .param_str = "fUi" | ||
| 14543 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14544 | |||
| 14545 | __nvvm_ull2d_rm | ||
| 14546 | .param_str = "dULLi" | ||
| 14547 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14548 | |||
| 14549 | __nvvm_ull2d_rn | ||
| 14550 | .param_str = "dULLi" | ||
| 14551 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14552 | |||
| 14553 | __nvvm_ull2d_rp | ||
| 14554 | .param_str = "dULLi" | ||
| 14555 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14556 | |||
| 14557 | __nvvm_ull2d_rz | ||
| 14558 | .param_str = "dULLi" | ||
| 14559 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14560 | |||
| 14561 | __nvvm_ull2f_rm | ||
| 14562 | .param_str = "fULLi" | ||
| 14563 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14564 | |||
| 14565 | __nvvm_ull2f_rn | ||
| 14566 | .param_str = "fULLi" | ||
| 14567 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14568 | |||
| 14569 | __nvvm_ull2f_rp | ||
| 14570 | .param_str = "fULLi" | ||
| 14571 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14572 | |||
| 14573 | __nvvm_ull2f_rz | ||
| 14574 | .param_str = "fULLi" | ||
| 14575 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14576 | |||
| 14577 | __nvvm_vote_all | ||
| 14578 | .param_str = "bb" | ||
| 14579 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14580 | |||
| 14581 | __nvvm_vote_any | ||
| 14582 | .param_str = "bb" | ||
| 14583 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14584 | |||
| 14585 | __nvvm_vote_ballot | ||
| 14586 | .param_str = "Uib" | ||
| 14587 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14588 | |||
| 14589 | __nvvm_vote_uni | ||
| 14590 | .param_str = "bb" | ||
| 14591 | .target_set = TargetSet.initOne(.nvptx) | ||
| 14592 | |||
| 14593 | __popcnt | ||
| 14594 | .param_str = "UiUi" | ||
| 14595 | .language = .all_ms_languages | ||
| 14596 | .attributes = .{ .@"const" = true, .const_evaluable = true } | ||
| 14597 | |||
| 14598 | __popcnt16 | ||
| 14599 | .param_str = "UsUs" | ||
| 14600 | .language = .all_ms_languages | ||
| 14601 | .attributes = .{ .@"const" = true, .const_evaluable = true } | ||
| 14602 | |||
| 14603 | __popcnt64 | ||
| 14604 | .param_str = "UWiUWi" | ||
| 14605 | .language = .all_ms_languages | ||
| 14606 | .attributes = .{ .@"const" = true, .const_evaluable = true } | ||
| 14607 | |||
| 14608 | __rdtsc | ||
| 14609 | .param_str = "UOi" | ||
| 14610 | .target_set = TargetSet.initOne(.x86) | ||
| 14611 | |||
| 14612 | __sev | ||
| 14613 | .param_str = "v" | ||
| 14614 | .language = .all_ms_languages | ||
| 14615 | .target_set = TargetSet.initMany(&.{ .aarch64, .arm }) | ||
| 14616 | |||
| 14617 | __sevl | ||
| 14618 | .param_str = "v" | ||
| 14619 | .language = .all_ms_languages | ||
| 14620 | .target_set = TargetSet.initMany(&.{ .aarch64, .arm }) | ||
| 14621 | |||
| 14622 | __sigsetjmp | ||
| 14623 | .param_str = "iSJi" | ||
| 14624 | .header = .setjmp | ||
| 14625 | .attributes = .{ .allow_type_mismatch = true, .lib_function_without_prefix = true, .returns_twice = true } | ||
| 14626 | |||
| 14627 | __sinpi | ||
| 14628 | .param_str = "dd" | ||
| 14629 | .header = .math | ||
| 14630 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 14631 | |||
| 14632 | __sinpif | ||
| 14633 | .param_str = "ff" | ||
| 14634 | .header = .math | ||
| 14635 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 14636 | |||
| 14637 | __sync_add_and_fetch | ||
| 14638 | .param_str = "v." | ||
| 14639 | .attributes = .{ .custom_typecheck = true } | ||
| 14640 | |||
| 14641 | __sync_add_and_fetch_1 | ||
| 14642 | .param_str = "ccD*c." | ||
| 14643 | .attributes = .{ .custom_typecheck = true } | ||
| 14644 | |||
| 14645 | __sync_add_and_fetch_16 | ||
| 14646 | .param_str = "LLLiLLLiD*LLLi." | ||
| 14647 | .attributes = .{ .custom_typecheck = true } | ||
| 14648 | |||
| 14649 | __sync_add_and_fetch_2 | ||
| 14650 | .param_str = "ssD*s." | ||
| 14651 | .attributes = .{ .custom_typecheck = true } | ||
| 14652 | |||
| 14653 | __sync_add_and_fetch_4 | ||
| 14654 | .param_str = "iiD*i." | ||
| 14655 | .attributes = .{ .custom_typecheck = true } | ||
| 14656 | |||
| 14657 | __sync_add_and_fetch_8 | ||
| 14658 | .param_str = "LLiLLiD*LLi." | ||
| 14659 | .attributes = .{ .custom_typecheck = true } | ||
| 14660 | |||
| 14661 | __sync_and_and_fetch | ||
| 14662 | .param_str = "v." | ||
| 14663 | .attributes = .{ .custom_typecheck = true } | ||
| 14664 | |||
| 14665 | __sync_and_and_fetch_1 | ||
| 14666 | .param_str = "ccD*c." | ||
| 14667 | .attributes = .{ .custom_typecheck = true } | ||
| 14668 | |||
| 14669 | __sync_and_and_fetch_16 | ||
| 14670 | .param_str = "LLLiLLLiD*LLLi." | ||
| 14671 | .attributes = .{ .custom_typecheck = true } | ||
| 14672 | |||
| 14673 | __sync_and_and_fetch_2 | ||
| 14674 | .param_str = "ssD*s." | ||
| 14675 | .attributes = .{ .custom_typecheck = true } | ||
| 14676 | |||
| 14677 | __sync_and_and_fetch_4 | ||
| 14678 | .param_str = "iiD*i." | ||
| 14679 | .attributes = .{ .custom_typecheck = true } | ||
| 14680 | |||
| 14681 | __sync_and_and_fetch_8 | ||
| 14682 | .param_str = "LLiLLiD*LLi." | ||
| 14683 | .attributes = .{ .custom_typecheck = true } | ||
| 14684 | |||
| 14685 | __sync_bool_compare_and_swap | ||
| 14686 | .param_str = "v." | ||
| 14687 | .attributes = .{ .custom_typecheck = true } | ||
| 14688 | |||
| 14689 | __sync_bool_compare_and_swap_1 | ||
| 14690 | .param_str = "bcD*cc." | ||
| 14691 | .attributes = .{ .custom_typecheck = true } | ||
| 14692 | |||
| 14693 | __sync_bool_compare_and_swap_16 | ||
| 14694 | .param_str = "bLLLiD*LLLiLLLi." | ||
| 14695 | .attributes = .{ .custom_typecheck = true } | ||
| 14696 | |||
| 14697 | __sync_bool_compare_and_swap_2 | ||
| 14698 | .param_str = "bsD*ss." | ||
| 14699 | .attributes = .{ .custom_typecheck = true } | ||
| 14700 | |||
| 14701 | __sync_bool_compare_and_swap_4 | ||
| 14702 | .param_str = "biD*ii." | ||
| 14703 | .attributes = .{ .custom_typecheck = true } | ||
| 14704 | |||
| 14705 | __sync_bool_compare_and_swap_8 | ||
| 14706 | .param_str = "bLLiD*LLiLLi." | ||
| 14707 | .attributes = .{ .custom_typecheck = true } | ||
| 14708 | |||
| 14709 | __sync_fetch_and_add | ||
| 14710 | .param_str = "v." | ||
| 14711 | .attributes = .{ .custom_typecheck = true } | ||
| 14712 | |||
| 14713 | __sync_fetch_and_add_1 | ||
| 14714 | .param_str = "ccD*c." | ||
| 14715 | .attributes = .{ .custom_typecheck = true } | ||
| 14716 | |||
| 14717 | __sync_fetch_and_add_16 | ||
| 14718 | .param_str = "LLLiLLLiD*LLLi." | ||
| 14719 | .attributes = .{ .custom_typecheck = true } | ||
| 14720 | |||
| 14721 | __sync_fetch_and_add_2 | ||
| 14722 | .param_str = "ssD*s." | ||
| 14723 | .attributes = .{ .custom_typecheck = true } | ||
| 14724 | |||
| 14725 | __sync_fetch_and_add_4 | ||
| 14726 | .param_str = "iiD*i." | ||
| 14727 | .attributes = .{ .custom_typecheck = true } | ||
| 14728 | |||
| 14729 | __sync_fetch_and_add_8 | ||
| 14730 | .param_str = "LLiLLiD*LLi." | ||
| 14731 | .attributes = .{ .custom_typecheck = true } | ||
| 14732 | |||
| 14733 | __sync_fetch_and_and | ||
| 14734 | .param_str = "v." | ||
| 14735 | .attributes = .{ .custom_typecheck = true } | ||
| 14736 | |||
| 14737 | __sync_fetch_and_and_1 | ||
| 14738 | .param_str = "ccD*c." | ||
| 14739 | .attributes = .{ .custom_typecheck = true } | ||
| 14740 | |||
| 14741 | __sync_fetch_and_and_16 | ||
| 14742 | .param_str = "LLLiLLLiD*LLLi." | ||
| 14743 | .attributes = .{ .custom_typecheck = true } | ||
| 14744 | |||
| 14745 | __sync_fetch_and_and_2 | ||
| 14746 | .param_str = "ssD*s." | ||
| 14747 | .attributes = .{ .custom_typecheck = true } | ||
| 14748 | |||
| 14749 | __sync_fetch_and_and_4 | ||
| 14750 | .param_str = "iiD*i." | ||
| 14751 | .attributes = .{ .custom_typecheck = true } | ||
| 14752 | |||
| 14753 | __sync_fetch_and_and_8 | ||
| 14754 | .param_str = "LLiLLiD*LLi." | ||
| 14755 | .attributes = .{ .custom_typecheck = true } | ||
| 14756 | |||
| 14757 | __sync_fetch_and_max | ||
| 14758 | .param_str = "iiD*i" | ||
| 14759 | |||
| 14760 | __sync_fetch_and_min | ||
| 14761 | .param_str = "iiD*i" | ||
| 14762 | |||
| 14763 | __sync_fetch_and_nand | ||
| 14764 | .param_str = "v." | ||
| 14765 | .attributes = .{ .custom_typecheck = true } | ||
| 14766 | |||
| 14767 | __sync_fetch_and_nand_1 | ||
| 14768 | .param_str = "ccD*c." | ||
| 14769 | .attributes = .{ .custom_typecheck = true } | ||
| 14770 | |||
| 14771 | __sync_fetch_and_nand_16 | ||
| 14772 | .param_str = "LLLiLLLiD*LLLi." | ||
| 14773 | .attributes = .{ .custom_typecheck = true } | ||
| 14774 | |||
| 14775 | __sync_fetch_and_nand_2 | ||
| 14776 | .param_str = "ssD*s." | ||
| 14777 | .attributes = .{ .custom_typecheck = true } | ||
| 14778 | |||
| 14779 | __sync_fetch_and_nand_4 | ||
| 14780 | .param_str = "iiD*i." | ||
| 14781 | .attributes = .{ .custom_typecheck = true } | ||
| 14782 | |||
| 14783 | __sync_fetch_and_nand_8 | ||
| 14784 | .param_str = "LLiLLiD*LLi." | ||
| 14785 | .attributes = .{ .custom_typecheck = true } | ||
| 14786 | |||
| 14787 | __sync_fetch_and_or | ||
| 14788 | .param_str = "v." | ||
| 14789 | .attributes = .{ .custom_typecheck = true } | ||
| 14790 | |||
| 14791 | __sync_fetch_and_or_1 | ||
| 14792 | .param_str = "ccD*c." | ||
| 14793 | .attributes = .{ .custom_typecheck = true } | ||
| 14794 | |||
| 14795 | __sync_fetch_and_or_16 | ||
| 14796 | .param_str = "LLLiLLLiD*LLLi." | ||
| 14797 | .attributes = .{ .custom_typecheck = true } | ||
| 14798 | |||
| 14799 | __sync_fetch_and_or_2 | ||
| 14800 | .param_str = "ssD*s." | ||
| 14801 | .attributes = .{ .custom_typecheck = true } | ||
| 14802 | |||
| 14803 | __sync_fetch_and_or_4 | ||
| 14804 | .param_str = "iiD*i." | ||
| 14805 | .attributes = .{ .custom_typecheck = true } | ||
| 14806 | |||
| 14807 | __sync_fetch_and_or_8 | ||
| 14808 | .param_str = "LLiLLiD*LLi." | ||
| 14809 | .attributes = .{ .custom_typecheck = true } | ||
| 14810 | |||
| 14811 | __sync_fetch_and_sub | ||
| 14812 | .param_str = "v." | ||
| 14813 | .attributes = .{ .custom_typecheck = true } | ||
| 14814 | |||
| 14815 | __sync_fetch_and_sub_1 | ||
| 14816 | .param_str = "ccD*c." | ||
| 14817 | .attributes = .{ .custom_typecheck = true } | ||
| 14818 | |||
| 14819 | __sync_fetch_and_sub_16 | ||
| 14820 | .param_str = "LLLiLLLiD*LLLi." | ||
| 14821 | .attributes = .{ .custom_typecheck = true } | ||
| 14822 | |||
| 14823 | __sync_fetch_and_sub_2 | ||
| 14824 | .param_str = "ssD*s." | ||
| 14825 | .attributes = .{ .custom_typecheck = true } | ||
| 14826 | |||
| 14827 | __sync_fetch_and_sub_4 | ||
| 14828 | .param_str = "iiD*i." | ||
| 14829 | .attributes = .{ .custom_typecheck = true } | ||
| 14830 | |||
| 14831 | __sync_fetch_and_sub_8 | ||
| 14832 | .param_str = "LLiLLiD*LLi." | ||
| 14833 | .attributes = .{ .custom_typecheck = true } | ||
| 14834 | |||
| 14835 | __sync_fetch_and_umax | ||
| 14836 | .param_str = "UiUiD*Ui" | ||
| 14837 | |||
| 14838 | __sync_fetch_and_umin | ||
| 14839 | .param_str = "UiUiD*Ui" | ||
| 14840 | |||
| 14841 | __sync_fetch_and_xor | ||
| 14842 | .param_str = "v." | ||
| 14843 | .attributes = .{ .custom_typecheck = true } | ||
| 14844 | |||
| 14845 | __sync_fetch_and_xor_1 | ||
| 14846 | .param_str = "ccD*c." | ||
| 14847 | .attributes = .{ .custom_typecheck = true } | ||
| 14848 | |||
| 14849 | __sync_fetch_and_xor_16 | ||
| 14850 | .param_str = "LLLiLLLiD*LLLi." | ||
| 14851 | .attributes = .{ .custom_typecheck = true } | ||
| 14852 | |||
| 14853 | __sync_fetch_and_xor_2 | ||
| 14854 | .param_str = "ssD*s." | ||
| 14855 | .attributes = .{ .custom_typecheck = true } | ||
| 14856 | |||
| 14857 | __sync_fetch_and_xor_4 | ||
| 14858 | .param_str = "iiD*i." | ||
| 14859 | .attributes = .{ .custom_typecheck = true } | ||
| 14860 | |||
| 14861 | __sync_fetch_and_xor_8 | ||
| 14862 | .param_str = "LLiLLiD*LLi." | ||
| 14863 | .attributes = .{ .custom_typecheck = true } | ||
| 14864 | |||
| 14865 | __sync_lock_release | ||
| 14866 | .param_str = "v." | ||
| 14867 | .attributes = .{ .custom_typecheck = true } | ||
| 14868 | |||
| 14869 | __sync_lock_release_1 | ||
| 14870 | .param_str = "vcD*." | ||
| 14871 | .attributes = .{ .custom_typecheck = true } | ||
| 14872 | |||
| 14873 | __sync_lock_release_16 | ||
| 14874 | .param_str = "vLLLiD*." | ||
| 14875 | .attributes = .{ .custom_typecheck = true } | ||
| 14876 | |||
| 14877 | __sync_lock_release_2 | ||
| 14878 | .param_str = "vsD*." | ||
| 14879 | .attributes = .{ .custom_typecheck = true } | ||
| 14880 | |||
| 14881 | __sync_lock_release_4 | ||
| 14882 | .param_str = "viD*." | ||
| 14883 | .attributes = .{ .custom_typecheck = true } | ||
| 14884 | |||
| 14885 | __sync_lock_release_8 | ||
| 14886 | .param_str = "vLLiD*." | ||
| 14887 | .attributes = .{ .custom_typecheck = true } | ||
| 14888 | |||
| 14889 | __sync_lock_test_and_set | ||
| 14890 | .param_str = "v." | ||
| 14891 | .attributes = .{ .custom_typecheck = true } | ||
| 14892 | |||
| 14893 | __sync_lock_test_and_set_1 | ||
| 14894 | .param_str = "ccD*c." | ||
| 14895 | .attributes = .{ .custom_typecheck = true } | ||
| 14896 | |||
| 14897 | __sync_lock_test_and_set_16 | ||
| 14898 | .param_str = "LLLiLLLiD*LLLi." | ||
| 14899 | .attributes = .{ .custom_typecheck = true } | ||
| 14900 | |||
| 14901 | __sync_lock_test_and_set_2 | ||
| 14902 | .param_str = "ssD*s." | ||
| 14903 | .attributes = .{ .custom_typecheck = true } | ||
| 14904 | |||
| 14905 | __sync_lock_test_and_set_4 | ||
| 14906 | .param_str = "iiD*i." | ||
| 14907 | .attributes = .{ .custom_typecheck = true } | ||
| 14908 | |||
| 14909 | __sync_lock_test_and_set_8 | ||
| 14910 | .param_str = "LLiLLiD*LLi." | ||
| 14911 | .attributes = .{ .custom_typecheck = true } | ||
| 14912 | |||
| 14913 | __sync_nand_and_fetch | ||
| 14914 | .param_str = "v." | ||
| 14915 | .attributes = .{ .custom_typecheck = true } | ||
| 14916 | |||
| 14917 | __sync_nand_and_fetch_1 | ||
| 14918 | .param_str = "ccD*c." | ||
| 14919 | .attributes = .{ .custom_typecheck = true } | ||
| 14920 | |||
| 14921 | __sync_nand_and_fetch_16 | ||
| 14922 | .param_str = "LLLiLLLiD*LLLi." | ||
| 14923 | .attributes = .{ .custom_typecheck = true } | ||
| 14924 | |||
| 14925 | __sync_nand_and_fetch_2 | ||
| 14926 | .param_str = "ssD*s." | ||
| 14927 | .attributes = .{ .custom_typecheck = true } | ||
| 14928 | |||
| 14929 | __sync_nand_and_fetch_4 | ||
| 14930 | .param_str = "iiD*i." | ||
| 14931 | .attributes = .{ .custom_typecheck = true } | ||
| 14932 | |||
| 14933 | __sync_nand_and_fetch_8 | ||
| 14934 | .param_str = "LLiLLiD*LLi." | ||
| 14935 | .attributes = .{ .custom_typecheck = true } | ||
| 14936 | |||
| 14937 | __sync_or_and_fetch | ||
| 14938 | .param_str = "v." | ||
| 14939 | .attributes = .{ .custom_typecheck = true } | ||
| 14940 | |||
| 14941 | __sync_or_and_fetch_1 | ||
| 14942 | .param_str = "ccD*c." | ||
| 14943 | .attributes = .{ .custom_typecheck = true } | ||
| 14944 | |||
| 14945 | __sync_or_and_fetch_16 | ||
| 14946 | .param_str = "LLLiLLLiD*LLLi." | ||
| 14947 | .attributes = .{ .custom_typecheck = true } | ||
| 14948 | |||
| 14949 | __sync_or_and_fetch_2 | ||
| 14950 | .param_str = "ssD*s." | ||
| 14951 | .attributes = .{ .custom_typecheck = true } | ||
| 14952 | |||
| 14953 | __sync_or_and_fetch_4 | ||
| 14954 | .param_str = "iiD*i." | ||
| 14955 | .attributes = .{ .custom_typecheck = true } | ||
| 14956 | |||
| 14957 | __sync_or_and_fetch_8 | ||
| 14958 | .param_str = "LLiLLiD*LLi." | ||
| 14959 | .attributes = .{ .custom_typecheck = true } | ||
| 14960 | |||
| 14961 | __sync_sub_and_fetch | ||
| 14962 | .param_str = "v." | ||
| 14963 | .attributes = .{ .custom_typecheck = true } | ||
| 14964 | |||
| 14965 | __sync_sub_and_fetch_1 | ||
| 14966 | .param_str = "ccD*c." | ||
| 14967 | .attributes = .{ .custom_typecheck = true } | ||
| 14968 | |||
| 14969 | __sync_sub_and_fetch_16 | ||
| 14970 | .param_str = "LLLiLLLiD*LLLi." | ||
| 14971 | .attributes = .{ .custom_typecheck = true } | ||
| 14972 | |||
| 14973 | __sync_sub_and_fetch_2 | ||
| 14974 | .param_str = "ssD*s." | ||
| 14975 | .attributes = .{ .custom_typecheck = true } | ||
| 14976 | |||
| 14977 | __sync_sub_and_fetch_4 | ||
| 14978 | .param_str = "iiD*i." | ||
| 14979 | .attributes = .{ .custom_typecheck = true } | ||
| 14980 | |||
| 14981 | __sync_sub_and_fetch_8 | ||
| 14982 | .param_str = "LLiLLiD*LLi." | ||
| 14983 | .attributes = .{ .custom_typecheck = true } | ||
| 14984 | |||
| 14985 | __sync_swap | ||
| 14986 | .param_str = "v." | ||
| 14987 | .attributes = .{ .custom_typecheck = true } | ||
| 14988 | |||
| 14989 | __sync_swap_1 | ||
| 14990 | .param_str = "ccD*c." | ||
| 14991 | .attributes = .{ .custom_typecheck = true } | ||
| 14992 | |||
| 14993 | __sync_swap_16 | ||
| 14994 | .param_str = "LLLiLLLiD*LLLi." | ||
| 14995 | .attributes = .{ .custom_typecheck = true } | ||
| 14996 | |||
| 14997 | __sync_swap_2 | ||
| 14998 | .param_str = "ssD*s." | ||
| 14999 | .attributes = .{ .custom_typecheck = true } | ||
| 15000 | |||
| 15001 | __sync_swap_4 | ||
| 15002 | .param_str = "iiD*i." | ||
| 15003 | .attributes = .{ .custom_typecheck = true } | ||
| 15004 | |||
| 15005 | __sync_swap_8 | ||
| 15006 | .param_str = "LLiLLiD*LLi." | ||
| 15007 | .attributes = .{ .custom_typecheck = true } | ||
| 15008 | |||
| 15009 | __sync_synchronize | ||
| 15010 | .param_str = "v" | ||
| 15011 | |||
| 15012 | __sync_val_compare_and_swap | ||
| 15013 | .param_str = "v." | ||
| 15014 | .attributes = .{ .custom_typecheck = true } | ||
| 15015 | |||
| 15016 | __sync_val_compare_and_swap_1 | ||
| 15017 | .param_str = "ccD*cc." | ||
| 15018 | .attributes = .{ .custom_typecheck = true } | ||
| 15019 | |||
| 15020 | __sync_val_compare_and_swap_16 | ||
| 15021 | .param_str = "LLLiLLLiD*LLLiLLLi." | ||
| 15022 | .attributes = .{ .custom_typecheck = true } | ||
| 15023 | |||
| 15024 | __sync_val_compare_and_swap_2 | ||
| 15025 | .param_str = "ssD*ss." | ||
| 15026 | .attributes = .{ .custom_typecheck = true } | ||
| 15027 | |||
| 15028 | __sync_val_compare_and_swap_4 | ||
| 15029 | .param_str = "iiD*ii." | ||
| 15030 | .attributes = .{ .custom_typecheck = true } | ||
| 15031 | |||
| 15032 | __sync_val_compare_and_swap_8 | ||
| 15033 | .param_str = "LLiLLiD*LLiLLi." | ||
| 15034 | .attributes = .{ .custom_typecheck = true } | ||
| 15035 | |||
| 15036 | __sync_xor_and_fetch | ||
| 15037 | .param_str = "v." | ||
| 15038 | .attributes = .{ .custom_typecheck = true } | ||
| 15039 | |||
| 15040 | __sync_xor_and_fetch_1 | ||
| 15041 | .param_str = "ccD*c." | ||
| 15042 | .attributes = .{ .custom_typecheck = true } | ||
| 15043 | |||
| 15044 | __sync_xor_and_fetch_16 | ||
| 15045 | .param_str = "LLLiLLLiD*LLLi." | ||
| 15046 | .attributes = .{ .custom_typecheck = true } | ||
| 15047 | |||
| 15048 | __sync_xor_and_fetch_2 | ||
| 15049 | .param_str = "ssD*s." | ||
| 15050 | .attributes = .{ .custom_typecheck = true } | ||
| 15051 | |||
| 15052 | __sync_xor_and_fetch_4 | ||
| 15053 | .param_str = "iiD*i." | ||
| 15054 | .attributes = .{ .custom_typecheck = true } | ||
| 15055 | |||
| 15056 | __sync_xor_and_fetch_8 | ||
| 15057 | .param_str = "LLiLLiD*LLi." | ||
| 15058 | .attributes = .{ .custom_typecheck = true } | ||
| 15059 | |||
| 15060 | __syncthreads | ||
| 15061 | .param_str = "v" | ||
| 15062 | .target_set = TargetSet.initOne(.nvptx) | ||
| 15063 | |||
| 15064 | __tanpi | ||
| 15065 | .param_str = "dd" | ||
| 15066 | .header = .math | ||
| 15067 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15068 | |||
| 15069 | __tanpif | ||
| 15070 | .param_str = "ff" | ||
| 15071 | .header = .math | ||
| 15072 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15073 | |||
| 15074 | __va_start | ||
| 15075 | .param_str = "vc**." | ||
| 15076 | .language = .all_ms_languages | ||
| 15077 | .attributes = .{ .custom_typecheck = true } | ||
| 15078 | |||
| 15079 | __warn_memset_zero_len | ||
| 15080 | .param_str = "v" | ||
| 15081 | .attributes = .{ .pure = true } | ||
| 15082 | |||
| 15083 | __wfe | ||
| 15084 | .param_str = "v" | ||
| 15085 | .language = .all_ms_languages | ||
| 15086 | .target_set = TargetSet.initMany(&.{ .aarch64, .arm }) | ||
| 15087 | |||
| 15088 | __wfi | ||
| 15089 | .param_str = "v" | ||
| 15090 | .language = .all_ms_languages | ||
| 15091 | .target_set = TargetSet.initMany(&.{ .aarch64, .arm }) | ||
| 15092 | |||
| 15093 | __xray_customevent | ||
| 15094 | .param_str = "vcC*z" | ||
| 15095 | |||
| 15096 | __xray_typedevent | ||
| 15097 | .param_str = "vzcC*z" | ||
| 15098 | |||
| 15099 | __yield | ||
| 15100 | .param_str = "v" | ||
| 15101 | .language = .all_ms_languages | ||
| 15102 | .target_set = TargetSet.initMany(&.{ .aarch64, .arm }) | ||
| 15103 | |||
| 15104 | _abnormal_termination | ||
| 15105 | .param_str = "i" | ||
| 15106 | .language = .all_ms_languages | ||
| 15107 | |||
| 15108 | _alloca | ||
| 15109 | .param_str = "v*z" | ||
| 15110 | .language = .all_ms_languages | ||
| 15111 | |||
| 15112 | _bittest | ||
| 15113 | .param_str = "UcNiC*Ni" | ||
| 15114 | .language = .all_ms_languages | ||
| 15115 | |||
| 15116 | _bittest64 | ||
| 15117 | .param_str = "UcWiC*Wi" | ||
| 15118 | .language = .all_ms_languages | ||
| 15119 | |||
| 15120 | _bittestandcomplement | ||
| 15121 | .param_str = "UcNi*Ni" | ||
| 15122 | .language = .all_ms_languages | ||
| 15123 | |||
| 15124 | _bittestandcomplement64 | ||
| 15125 | .param_str = "UcWi*Wi" | ||
| 15126 | .language = .all_ms_languages | ||
| 15127 | |||
| 15128 | _bittestandreset | ||
| 15129 | .param_str = "UcNi*Ni" | ||
| 15130 | .language = .all_ms_languages | ||
| 15131 | |||
| 15132 | _bittestandreset64 | ||
| 15133 | .param_str = "UcWi*Wi" | ||
| 15134 | .language = .all_ms_languages | ||
| 15135 | |||
| 15136 | _bittestandset | ||
| 15137 | .param_str = "UcNi*Ni" | ||
| 15138 | .language = .all_ms_languages | ||
| 15139 | |||
| 15140 | _bittestandset64 | ||
| 15141 | .param_str = "UcWi*Wi" | ||
| 15142 | .language = .all_ms_languages | ||
| 15143 | |||
| 15144 | _byteswap_uint64 | ||
| 15145 | .param_str = "ULLiULLi" | ||
| 15146 | .header = .stdlib, .language = .all_ms_languages | ||
| 15147 | .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } | ||
| 15148 | |||
| 15149 | _byteswap_ulong | ||
| 15150 | .param_str = "UNiUNi" | ||
| 15151 | .header = .stdlib, .language = .all_ms_languages | ||
| 15152 | .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } | ||
| 15153 | |||
| 15154 | _byteswap_ushort | ||
| 15155 | .param_str = "UsUs" | ||
| 15156 | .header = .stdlib, .language = .all_ms_languages | ||
| 15157 | .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } | ||
| 15158 | |||
| 15159 | _exception_code | ||
| 15160 | .param_str = "UNi" | ||
| 15161 | .language = .all_ms_languages | ||
| 15162 | |||
| 15163 | _exception_info | ||
| 15164 | .param_str = "v*" | ||
| 15165 | .language = .all_ms_languages | ||
| 15166 | |||
| 15167 | _exit | ||
| 15168 | .param_str = "vi" | ||
| 15169 | .header = .unistd, .language = .all_gnu_languages | ||
| 15170 | .attributes = .{ .noreturn = true, .lib_function_without_prefix = true } | ||
| 15171 | |||
| 15172 | _interlockedbittestandreset | ||
| 15173 | .param_str = "UcNiD*Ni" | ||
| 15174 | .language = .all_ms_languages | ||
| 15175 | |||
| 15176 | _interlockedbittestandreset64 | ||
| 15177 | .param_str = "UcWiD*Wi" | ||
| 15178 | .language = .all_ms_languages | ||
| 15179 | |||
| 15180 | _interlockedbittestandreset_acq | ||
| 15181 | .param_str = "UcNiD*Ni" | ||
| 15182 | .language = .all_ms_languages | ||
| 15183 | |||
| 15184 | _interlockedbittestandreset_nf | ||
| 15185 | .param_str = "UcNiD*Ni" | ||
| 15186 | .language = .all_ms_languages | ||
| 15187 | |||
| 15188 | _interlockedbittestandreset_rel | ||
| 15189 | .param_str = "UcNiD*Ni" | ||
| 15190 | .language = .all_ms_languages | ||
| 15191 | |||
| 15192 | _interlockedbittestandset | ||
| 15193 | .param_str = "UcNiD*Ni" | ||
| 15194 | .language = .all_ms_languages | ||
| 15195 | |||
| 15196 | _interlockedbittestandset64 | ||
| 15197 | .param_str = "UcWiD*Wi" | ||
| 15198 | .language = .all_ms_languages | ||
| 15199 | |||
| 15200 | _interlockedbittestandset_acq | ||
| 15201 | .param_str = "UcNiD*Ni" | ||
| 15202 | .language = .all_ms_languages | ||
| 15203 | |||
| 15204 | _interlockedbittestandset_nf | ||
| 15205 | .param_str = "UcNiD*Ni" | ||
| 15206 | .language = .all_ms_languages | ||
| 15207 | |||
| 15208 | _interlockedbittestandset_rel | ||
| 15209 | .param_str = "UcNiD*Ni" | ||
| 15210 | .language = .all_ms_languages | ||
| 15211 | |||
| 15212 | _longjmp | ||
| 15213 | .param_str = "vJi" | ||
| 15214 | .header = .setjmp, .language = .all_gnu_languages | ||
| 15215 | .attributes = .{ .noreturn = true, .allow_type_mismatch = true, .lib_function_without_prefix = true } | ||
| 15216 | |||
| 15217 | _lrotl | ||
| 15218 | .param_str = "ULiULii" | ||
| 15219 | .language = .all_ms_languages | ||
| 15220 | .attributes = .{ .const_evaluable = true } | ||
| 15221 | |||
| 15222 | _lrotr | ||
| 15223 | .param_str = "ULiULii" | ||
| 15224 | .language = .all_ms_languages | ||
| 15225 | .attributes = .{ .const_evaluable = true } | ||
| 15226 | |||
| 15227 | _rotl | ||
| 15228 | .param_str = "UiUii" | ||
| 15229 | .language = .all_ms_languages | ||
| 15230 | .attributes = .{ .const_evaluable = true } | ||
| 15231 | |||
| 15232 | _rotl16 | ||
| 15233 | .param_str = "UsUsUc" | ||
| 15234 | .language = .all_ms_languages | ||
| 15235 | .attributes = .{ .const_evaluable = true } | ||
| 15236 | |||
| 15237 | _rotl64 | ||
| 15238 | .param_str = "UWiUWii" | ||
| 15239 | .language = .all_ms_languages | ||
| 15240 | .attributes = .{ .const_evaluable = true } | ||
| 15241 | |||
| 15242 | _rotl8 | ||
| 15243 | .param_str = "UcUcUc" | ||
| 15244 | .language = .all_ms_languages | ||
| 15245 | .attributes = .{ .const_evaluable = true } | ||
| 15246 | |||
| 15247 | _rotr | ||
| 15248 | .param_str = "UiUii" | ||
| 15249 | .language = .all_ms_languages | ||
| 15250 | .attributes = .{ .const_evaluable = true } | ||
| 15251 | |||
| 15252 | _rotr16 | ||
| 15253 | .param_str = "UsUsUc" | ||
| 15254 | .language = .all_ms_languages | ||
| 15255 | .attributes = .{ .const_evaluable = true } | ||
| 15256 | |||
| 15257 | _rotr64 | ||
| 15258 | .param_str = "UWiUWii" | ||
| 15259 | .language = .all_ms_languages | ||
| 15260 | .attributes = .{ .const_evaluable = true } | ||
| 15261 | |||
| 15262 | _rotr8 | ||
| 15263 | .param_str = "UcUcUc" | ||
| 15264 | .language = .all_ms_languages | ||
| 15265 | .attributes = .{ .const_evaluable = true } | ||
| 15266 | |||
| 15267 | _setjmp | ||
| 15268 | .param_str = "iJ" | ||
| 15269 | .header = .setjmp | ||
| 15270 | .attributes = .{ .allow_type_mismatch = true, .lib_function_without_prefix = true, .returns_twice = true } | ||
| 15271 | |||
| 15272 | _setjmpex | ||
| 15273 | .param_str = "iJ" | ||
| 15274 | .header = .setjmpex, .language = .all_ms_languages | ||
| 15275 | .attributes = .{ .allow_type_mismatch = true, .lib_function_without_prefix = true, .returns_twice = true } | ||
| 15276 | |||
| 15277 | abort | ||
| 15278 | .param_str = "v" | ||
| 15279 | .header = .stdlib | ||
| 15280 | .attributes = .{ .noreturn = true, .lib_function_without_prefix = true } | ||
| 15281 | |||
| 15282 | abs | ||
| 15283 | .param_str = "ii" | ||
| 15284 | .header = .stdlib | ||
| 15285 | .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } | ||
| 15286 | |||
| 15287 | acos | ||
| 15288 | .param_str = "dd" | ||
| 15289 | .header = .math | ||
| 15290 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15291 | |||
| 15292 | acosf | ||
| 15293 | .param_str = "ff" | ||
| 15294 | .header = .math | ||
| 15295 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15296 | |||
| 15297 | acosh | ||
| 15298 | .param_str = "dd" | ||
| 15299 | .header = .math | ||
| 15300 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15301 | |||
| 15302 | acoshf | ||
| 15303 | .param_str = "ff" | ||
| 15304 | .header = .math | ||
| 15305 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15306 | |||
| 15307 | acoshl | ||
| 15308 | .param_str = "LdLd" | ||
| 15309 | .header = .math | ||
| 15310 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15311 | |||
| 15312 | acosl | ||
| 15313 | .param_str = "LdLd" | ||
| 15314 | .header = .math | ||
| 15315 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15316 | |||
| 15317 | aligned_alloc | ||
| 15318 | .param_str = "v*zz" | ||
| 15319 | .header = .stdlib | ||
| 15320 | .attributes = .{ .lib_function_without_prefix = true } | ||
| 15321 | |||
| 15322 | alloca | ||
| 15323 | .param_str = "v*z" | ||
| 15324 | .header = .stdlib, .language = .all_gnu_languages | ||
| 15325 | .attributes = .{ .lib_function_without_prefix = true } | ||
| 15326 | |||
| 15327 | asin | ||
| 15328 | .param_str = "dd" | ||
| 15329 | .header = .math | ||
| 15330 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15331 | |||
| 15332 | asinf | ||
| 15333 | .param_str = "ff" | ||
| 15334 | .header = .math | ||
| 15335 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15336 | |||
| 15337 | asinh | ||
| 15338 | .param_str = "dd" | ||
| 15339 | .header = .math | ||
| 15340 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15341 | |||
| 15342 | asinhf | ||
| 15343 | .param_str = "ff" | ||
| 15344 | .header = .math | ||
| 15345 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15346 | |||
| 15347 | asinhl | ||
| 15348 | .param_str = "LdLd" | ||
| 15349 | .header = .math | ||
| 15350 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15351 | |||
| 15352 | asinl | ||
| 15353 | .param_str = "LdLd" | ||
| 15354 | .header = .math | ||
| 15355 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15356 | |||
| 15357 | atan | ||
| 15358 | .param_str = "dd" | ||
| 15359 | .header = .math | ||
| 15360 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15361 | |||
| 15362 | atan2 | ||
| 15363 | .param_str = "ddd" | ||
| 15364 | .header = .math | ||
| 15365 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15366 | |||
| 15367 | atan2f | ||
| 15368 | .param_str = "fff" | ||
| 15369 | .header = .math | ||
| 15370 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15371 | |||
| 15372 | atan2l | ||
| 15373 | .param_str = "LdLdLd" | ||
| 15374 | .header = .math | ||
| 15375 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15376 | |||
| 15377 | atanf | ||
| 15378 | .param_str = "ff" | ||
| 15379 | .header = .math | ||
| 15380 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15381 | |||
| 15382 | atanh | ||
| 15383 | .param_str = "dd" | ||
| 15384 | .header = .math | ||
| 15385 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15386 | |||
| 15387 | atanhf | ||
| 15388 | .param_str = "ff" | ||
| 15389 | .header = .math | ||
| 15390 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15391 | |||
| 15392 | atanhl | ||
| 15393 | .param_str = "LdLd" | ||
| 15394 | .header = .math | ||
| 15395 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15396 | |||
| 15397 | atanl | ||
| 15398 | .param_str = "LdLd" | ||
| 15399 | .header = .math | ||
| 15400 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15401 | |||
| 15402 | bcmp | ||
| 15403 | .param_str = "ivC*vC*z" | ||
| 15404 | .header = .strings, .language = .all_gnu_languages | ||
| 15405 | .attributes = .{ .lib_function_without_prefix = true, .const_evaluable = true } | ||
| 15406 | |||
| 15407 | bcopy | ||
| 15408 | .param_str = "vvC*v*z" | ||
| 15409 | .header = .strings, .language = .all_gnu_languages | ||
| 15410 | .attributes = .{ .lib_function_without_prefix = true } | ||
| 15411 | |||
| 15412 | bzero | ||
| 15413 | .param_str = "vv*z" | ||
| 15414 | .header = .strings, .language = .all_gnu_languages | ||
| 15415 | .attributes = .{ .lib_function_without_prefix = true } | ||
| 15416 | |||
| 15417 | cabs | ||
| 15418 | .param_str = "dXd" | ||
| 15419 | .header = .complex | ||
| 15420 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15421 | |||
| 15422 | cabsf | ||
| 15423 | .param_str = "fXf" | ||
| 15424 | .header = .complex | ||
| 15425 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15426 | |||
| 15427 | cabsl | ||
| 15428 | .param_str = "LdXLd" | ||
| 15429 | .header = .complex | ||
| 15430 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15431 | |||
| 15432 | cacos | ||
| 15433 | .param_str = "XdXd" | ||
| 15434 | .header = .complex | ||
| 15435 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15436 | |||
| 15437 | cacosf | ||
| 15438 | .param_str = "XfXf" | ||
| 15439 | .header = .complex | ||
| 15440 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15441 | |||
| 15442 | cacosh | ||
| 15443 | .param_str = "XdXd" | ||
| 15444 | .header = .complex | ||
| 15445 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15446 | |||
| 15447 | cacoshf | ||
| 15448 | .param_str = "XfXf" | ||
| 15449 | .header = .complex | ||
| 15450 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15451 | |||
| 15452 | cacoshl | ||
| 15453 | .param_str = "XLdXLd" | ||
| 15454 | .header = .complex | ||
| 15455 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15456 | |||
| 15457 | cacosl | ||
| 15458 | .param_str = "XLdXLd" | ||
| 15459 | .header = .complex | ||
| 15460 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15461 | |||
| 15462 | calloc | ||
| 15463 | .param_str = "v*zz" | ||
| 15464 | .header = .stdlib | ||
| 15465 | .attributes = .{ .lib_function_without_prefix = true } | ||
| 15466 | |||
| 15467 | carg | ||
| 15468 | .param_str = "dXd" | ||
| 15469 | .header = .complex | ||
| 15470 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15471 | |||
| 15472 | cargf | ||
| 15473 | .param_str = "fXf" | ||
| 15474 | .header = .complex | ||
| 15475 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15476 | |||
| 15477 | cargl | ||
| 15478 | .param_str = "LdXLd" | ||
| 15479 | .header = .complex | ||
| 15480 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15481 | |||
| 15482 | casin | ||
| 15483 | .param_str = "XdXd" | ||
| 15484 | .header = .complex | ||
| 15485 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15486 | |||
| 15487 | casinf | ||
| 15488 | .param_str = "XfXf" | ||
| 15489 | .header = .complex | ||
| 15490 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15491 | |||
| 15492 | casinh | ||
| 15493 | .param_str = "XdXd" | ||
| 15494 | .header = .complex | ||
| 15495 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15496 | |||
| 15497 | casinhf | ||
| 15498 | .param_str = "XfXf" | ||
| 15499 | .header = .complex | ||
| 15500 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15501 | |||
| 15502 | casinhl | ||
| 15503 | .param_str = "XLdXLd" | ||
| 15504 | .header = .complex | ||
| 15505 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15506 | |||
| 15507 | casinl | ||
| 15508 | .param_str = "XLdXLd" | ||
| 15509 | .header = .complex | ||
| 15510 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15511 | |||
| 15512 | catan | ||
| 15513 | .param_str = "XdXd" | ||
| 15514 | .header = .complex | ||
| 15515 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15516 | |||
| 15517 | catanf | ||
| 15518 | .param_str = "XfXf" | ||
| 15519 | .header = .complex | ||
| 15520 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15521 | |||
| 15522 | catanh | ||
| 15523 | .param_str = "XdXd" | ||
| 15524 | .header = .complex | ||
| 15525 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15526 | |||
| 15527 | catanhf | ||
| 15528 | .param_str = "XfXf" | ||
| 15529 | .header = .complex | ||
| 15530 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15531 | |||
| 15532 | catanhl | ||
| 15533 | .param_str = "XLdXLd" | ||
| 15534 | .header = .complex | ||
| 15535 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15536 | |||
| 15537 | catanl | ||
| 15538 | .param_str = "XLdXLd" | ||
| 15539 | .header = .complex | ||
| 15540 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15541 | |||
| 15542 | cbrt | ||
| 15543 | .param_str = "dd" | ||
| 15544 | .header = .math | ||
| 15545 | .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } | ||
| 15546 | |||
| 15547 | cbrtf | ||
| 15548 | .param_str = "ff" | ||
| 15549 | .header = .math | ||
| 15550 | .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } | ||
| 15551 | |||
| 15552 | cbrtl | ||
| 15553 | .param_str = "LdLd" | ||
| 15554 | .header = .math | ||
| 15555 | .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } | ||
| 15556 | |||
| 15557 | ccos | ||
| 15558 | .param_str = "XdXd" | ||
| 15559 | .header = .complex | ||
| 15560 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15561 | |||
| 15562 | ccosf | ||
| 15563 | .param_str = "XfXf" | ||
| 15564 | .header = .complex | ||
| 15565 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15566 | |||
| 15567 | ccosh | ||
| 15568 | .param_str = "XdXd" | ||
| 15569 | .header = .complex | ||
| 15570 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15571 | |||
| 15572 | ccoshf | ||
| 15573 | .param_str = "XfXf" | ||
| 15574 | .header = .complex | ||
| 15575 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15576 | |||
| 15577 | ccoshl | ||
| 15578 | .param_str = "XLdXLd" | ||
| 15579 | .header = .complex | ||
| 15580 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15581 | |||
| 15582 | ccosl | ||
| 15583 | .param_str = "XLdXLd" | ||
| 15584 | .header = .complex | ||
| 15585 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15586 | |||
| 15587 | ceil | ||
| 15588 | .param_str = "dd" | ||
| 15589 | .header = .math | ||
| 15590 | .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } | ||
| 15591 | |||
| 15592 | ceilf | ||
| 15593 | .param_str = "ff" | ||
| 15594 | .header = .math | ||
| 15595 | .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } | ||
| 15596 | |||
| 15597 | ceill | ||
| 15598 | .param_str = "LdLd" | ||
| 15599 | .header = .math | ||
| 15600 | .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } | ||
| 15601 | |||
| 15602 | cexp | ||
| 15603 | .param_str = "XdXd" | ||
| 15604 | .header = .complex | ||
| 15605 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15606 | |||
| 15607 | cexpf | ||
| 15608 | .param_str = "XfXf" | ||
| 15609 | .header = .complex | ||
| 15610 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15611 | |||
| 15612 | cexpl | ||
| 15613 | .param_str = "XLdXLd" | ||
| 15614 | .header = .complex | ||
| 15615 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15616 | |||
| 15617 | cimag | ||
| 15618 | .param_str = "dXd" | ||
| 15619 | .header = .complex | ||
| 15620 | .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } | ||
| 15621 | |||
| 15622 | cimagf | ||
| 15623 | .param_str = "fXf" | ||
| 15624 | .header = .complex | ||
| 15625 | .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } | ||
| 15626 | |||
| 15627 | cimagl | ||
| 15628 | .param_str = "LdXLd" | ||
| 15629 | .header = .complex | ||
| 15630 | .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } | ||
| 15631 | |||
| 15632 | clog | ||
| 15633 | .param_str = "XdXd" | ||
| 15634 | .header = .complex | ||
| 15635 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15636 | |||
| 15637 | clogf | ||
| 15638 | .param_str = "XfXf" | ||
| 15639 | .header = .complex | ||
| 15640 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15641 | |||
| 15642 | clogl | ||
| 15643 | .param_str = "XLdXLd" | ||
| 15644 | .header = .complex | ||
| 15645 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15646 | |||
| 15647 | conj | ||
| 15648 | .param_str = "XdXd" | ||
| 15649 | .header = .complex | ||
| 15650 | .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } | ||
| 15651 | |||
| 15652 | conjf | ||
| 15653 | .param_str = "XfXf" | ||
| 15654 | .header = .complex | ||
| 15655 | .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } | ||
| 15656 | |||
| 15657 | conjl | ||
| 15658 | .param_str = "XLdXLd" | ||
| 15659 | .header = .complex | ||
| 15660 | .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } | ||
| 15661 | |||
| 15662 | copysign | ||
| 15663 | .param_str = "ddd" | ||
| 15664 | .header = .math | ||
| 15665 | .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } | ||
| 15666 | |||
| 15667 | copysignf | ||
| 15668 | .param_str = "fff" | ||
| 15669 | .header = .math | ||
| 15670 | .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } | ||
| 15671 | |||
| 15672 | copysignl | ||
| 15673 | .param_str = "LdLdLd" | ||
| 15674 | .header = .math | ||
| 15675 | .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } | ||
| 15676 | |||
| 15677 | cos | ||
| 15678 | .param_str = "dd" | ||
| 15679 | .header = .math | ||
| 15680 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15681 | |||
| 15682 | cosf | ||
| 15683 | .param_str = "ff" | ||
| 15684 | .header = .math | ||
| 15685 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15686 | |||
| 15687 | cosh | ||
| 15688 | .param_str = "dd" | ||
| 15689 | .header = .math | ||
| 15690 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15691 | |||
| 15692 | coshf | ||
| 15693 | .param_str = "ff" | ||
| 15694 | .header = .math | ||
| 15695 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15696 | |||
| 15697 | coshl | ||
| 15698 | .param_str = "LdLd" | ||
| 15699 | .header = .math | ||
| 15700 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15701 | |||
| 15702 | cosl | ||
| 15703 | .param_str = "LdLd" | ||
| 15704 | .header = .math | ||
| 15705 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15706 | |||
| 15707 | cpow | ||
| 15708 | .param_str = "XdXdXd" | ||
| 15709 | .header = .complex | ||
| 15710 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15711 | |||
| 15712 | cpowf | ||
| 15713 | .param_str = "XfXfXf" | ||
| 15714 | .header = .complex | ||
| 15715 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15716 | |||
| 15717 | cpowl | ||
| 15718 | .param_str = "XLdXLdXLd" | ||
| 15719 | .header = .complex | ||
| 15720 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15721 | |||
| 15722 | cproj | ||
| 15723 | .param_str = "XdXd" | ||
| 15724 | .header = .complex | ||
| 15725 | .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } | ||
| 15726 | |||
| 15727 | cprojf | ||
| 15728 | .param_str = "XfXf" | ||
| 15729 | .header = .complex | ||
| 15730 | .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } | ||
| 15731 | |||
| 15732 | cprojl | ||
| 15733 | .param_str = "XLdXLd" | ||
| 15734 | .header = .complex | ||
| 15735 | .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } | ||
| 15736 | |||
| 15737 | creal | ||
| 15738 | .param_str = "dXd" | ||
| 15739 | .header = .complex | ||
| 15740 | .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } | ||
| 15741 | |||
| 15742 | crealf | ||
| 15743 | .param_str = "fXf" | ||
| 15744 | .header = .complex | ||
| 15745 | .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } | ||
| 15746 | |||
| 15747 | creall | ||
| 15748 | .param_str = "LdXLd" | ||
| 15749 | .header = .complex | ||
| 15750 | .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } | ||
| 15751 | |||
| 15752 | csin | ||
| 15753 | .param_str = "XdXd" | ||
| 15754 | .header = .complex | ||
| 15755 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15756 | |||
| 15757 | csinf | ||
| 15758 | .param_str = "XfXf" | ||
| 15759 | .header = .complex | ||
| 15760 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15761 | |||
| 15762 | csinh | ||
| 15763 | .param_str = "XdXd" | ||
| 15764 | .header = .complex | ||
| 15765 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15766 | |||
| 15767 | csinhf | ||
| 15768 | .param_str = "XfXf" | ||
| 15769 | .header = .complex | ||
| 15770 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15771 | |||
| 15772 | csinhl | ||
| 15773 | .param_str = "XLdXLd" | ||
| 15774 | .header = .complex | ||
| 15775 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15776 | |||
| 15777 | csinl | ||
| 15778 | .param_str = "XLdXLd" | ||
| 15779 | .header = .complex | ||
| 15780 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15781 | |||
| 15782 | csqrt | ||
| 15783 | .param_str = "XdXd" | ||
| 15784 | .header = .complex | ||
| 15785 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15786 | |||
| 15787 | csqrtf | ||
| 15788 | .param_str = "XfXf" | ||
| 15789 | .header = .complex | ||
| 15790 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15791 | |||
| 15792 | csqrtl | ||
| 15793 | .param_str = "XLdXLd" | ||
| 15794 | .header = .complex | ||
| 15795 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15796 | |||
| 15797 | ctan | ||
| 15798 | .param_str = "XdXd" | ||
| 15799 | .header = .complex | ||
| 15800 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15801 | |||
| 15802 | ctanf | ||
| 15803 | .param_str = "XfXf" | ||
| 15804 | .header = .complex | ||
| 15805 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15806 | |||
| 15807 | ctanh | ||
| 15808 | .param_str = "XdXd" | ||
| 15809 | .header = .complex | ||
| 15810 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15811 | |||
| 15812 | ctanhf | ||
| 15813 | .param_str = "XfXf" | ||
| 15814 | .header = .complex | ||
| 15815 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15816 | |||
| 15817 | ctanhl | ||
| 15818 | .param_str = "XLdXLd" | ||
| 15819 | .header = .complex | ||
| 15820 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15821 | |||
| 15822 | ctanl | ||
| 15823 | .param_str = "XLdXLd" | ||
| 15824 | .header = .complex | ||
| 15825 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15826 | |||
| 15827 | erf | ||
| 15828 | .param_str = "dd" | ||
| 15829 | .header = .math | ||
| 15830 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15831 | |||
| 15832 | erfc | ||
| 15833 | .param_str = "dd" | ||
| 15834 | .header = .math | ||
| 15835 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15836 | |||
| 15837 | erfcf | ||
| 15838 | .param_str = "ff" | ||
| 15839 | .header = .math | ||
| 15840 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15841 | |||
| 15842 | erfcl | ||
| 15843 | .param_str = "LdLd" | ||
| 15844 | .header = .math | ||
| 15845 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15846 | |||
| 15847 | erff | ||
| 15848 | .param_str = "ff" | ||
| 15849 | .header = .math | ||
| 15850 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15851 | |||
| 15852 | erfl | ||
| 15853 | .param_str = "LdLd" | ||
| 15854 | .header = .math | ||
| 15855 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15856 | |||
| 15857 | exit | ||
| 15858 | .param_str = "vi" | ||
| 15859 | .header = .stdlib | ||
| 15860 | .attributes = .{ .noreturn = true, .lib_function_without_prefix = true } | ||
| 15861 | |||
| 15862 | exp | ||
| 15863 | .param_str = "dd" | ||
| 15864 | .header = .math | ||
| 15865 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15866 | |||
| 15867 | exp2 | ||
| 15868 | .param_str = "dd" | ||
| 15869 | .header = .math | ||
| 15870 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15871 | |||
| 15872 | exp2f | ||
| 15873 | .param_str = "ff" | ||
| 15874 | .header = .math | ||
| 15875 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15876 | |||
| 15877 | exp2l | ||
| 15878 | .param_str = "LdLd" | ||
| 15879 | .header = .math | ||
| 15880 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15881 | |||
| 15882 | expf | ||
| 15883 | .param_str = "ff" | ||
| 15884 | .header = .math | ||
| 15885 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15886 | |||
| 15887 | expl | ||
| 15888 | .param_str = "LdLd" | ||
| 15889 | .header = .math | ||
| 15890 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15891 | |||
| 15892 | expm1 | ||
| 15893 | .param_str = "dd" | ||
| 15894 | .header = .math | ||
| 15895 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15896 | |||
| 15897 | expm1f | ||
| 15898 | .param_str = "ff" | ||
| 15899 | .header = .math | ||
| 15900 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15901 | |||
| 15902 | expm1l | ||
| 15903 | .param_str = "LdLd" | ||
| 15904 | .header = .math | ||
| 15905 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15906 | |||
| 15907 | fabs | ||
| 15908 | .param_str = "dd" | ||
| 15909 | .header = .math | ||
| 15910 | .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } | ||
| 15911 | |||
| 15912 | fabsf | ||
| 15913 | .param_str = "ff" | ||
| 15914 | .header = .math | ||
| 15915 | .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } | ||
| 15916 | |||
| 15917 | fabsl | ||
| 15918 | .param_str = "LdLd" | ||
| 15919 | .header = .math | ||
| 15920 | .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } | ||
| 15921 | |||
| 15922 | fdim | ||
| 15923 | .param_str = "ddd" | ||
| 15924 | .header = .math | ||
| 15925 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15926 | |||
| 15927 | fdimf | ||
| 15928 | .param_str = "fff" | ||
| 15929 | .header = .math | ||
| 15930 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15931 | |||
| 15932 | fdiml | ||
| 15933 | .param_str = "LdLdLd" | ||
| 15934 | .header = .math | ||
| 15935 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15936 | |||
| 15937 | finite | ||
| 15938 | .param_str = "id" | ||
| 15939 | .header = .math, .language = .gnu_lang | ||
| 15940 | .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } | ||
| 15941 | |||
| 15942 | finitef | ||
| 15943 | .param_str = "if" | ||
| 15944 | .header = .math, .language = .gnu_lang | ||
| 15945 | .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } | ||
| 15946 | |||
| 15947 | finitel | ||
| 15948 | .param_str = "iLd" | ||
| 15949 | .header = .math, .language = .gnu_lang | ||
| 15950 | .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } | ||
| 15951 | |||
| 15952 | floor | ||
| 15953 | .param_str = "dd" | ||
| 15954 | .header = .math | ||
| 15955 | .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } | ||
| 15956 | |||
| 15957 | floorf | ||
| 15958 | .param_str = "ff" | ||
| 15959 | .header = .math | ||
| 15960 | .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } | ||
| 15961 | |||
| 15962 | floorl | ||
| 15963 | .param_str = "LdLd" | ||
| 15964 | .header = .math | ||
| 15965 | .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } | ||
| 15966 | |||
| 15967 | fma | ||
| 15968 | .param_str = "dddd" | ||
| 15969 | .header = .math | ||
| 15970 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15971 | |||
| 15972 | fmaf | ||
| 15973 | .param_str = "ffff" | ||
| 15974 | .header = .math | ||
| 15975 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15976 | |||
| 15977 | fmal | ||
| 15978 | .param_str = "LdLdLdLd" | ||
| 15979 | .header = .math | ||
| 15980 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 15981 | |||
| 15982 | fmax | ||
| 15983 | .param_str = "ddd" | ||
| 15984 | .header = .math | ||
| 15985 | .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } | ||
| 15986 | |||
| 15987 | fmaxf | ||
| 15988 | .param_str = "fff" | ||
| 15989 | .header = .math | ||
| 15990 | .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } | ||
| 15991 | |||
| 15992 | fmaxl | ||
| 15993 | .param_str = "LdLdLd" | ||
| 15994 | .header = .math | ||
| 15995 | .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } | ||
| 15996 | |||
| 15997 | fmin | ||
| 15998 | .param_str = "ddd" | ||
| 15999 | .header = .math | ||
| 16000 | .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } | ||
| 16001 | |||
| 16002 | fminf | ||
| 16003 | .param_str = "fff" | ||
| 16004 | .header = .math | ||
| 16005 | .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } | ||
| 16006 | |||
| 16007 | fminl | ||
| 16008 | .param_str = "LdLdLd" | ||
| 16009 | .header = .math | ||
| 16010 | .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } | ||
| 16011 | |||
| 16012 | fmod | ||
| 16013 | .param_str = "ddd" | ||
| 16014 | .header = .math | ||
| 16015 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16016 | |||
| 16017 | fmodf | ||
| 16018 | .param_str = "fff" | ||
| 16019 | .header = .math | ||
| 16020 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16021 | |||
| 16022 | fmodl | ||
| 16023 | .param_str = "LdLdLd" | ||
| 16024 | .header = .math | ||
| 16025 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16026 | |||
| 16027 | fopen | ||
| 16028 | .param_str = "P*cC*cC*" | ||
| 16029 | .header = .stdio | ||
| 16030 | .attributes = .{ .lib_function_without_prefix = true } | ||
| 16031 | |||
| 16032 | fprintf | ||
| 16033 | .param_str = "iP*cC*." | ||
| 16034 | .header = .stdio | ||
| 16035 | .attributes = .{ .lib_function_without_prefix = true, .format_kind = .printf, .format_string_position = 1 } | ||
| 16036 | |||
| 16037 | fread | ||
| 16038 | .param_str = "zv*zzP*" | ||
| 16039 | .header = .stdio | ||
| 16040 | .attributes = .{ .lib_function_without_prefix = true } | ||
| 16041 | |||
| 16042 | free | ||
| 16043 | .param_str = "vv*" | ||
| 16044 | .header = .stdlib | ||
| 16045 | .attributes = .{ .lib_function_without_prefix = true } | ||
| 16046 | |||
| 16047 | frexp | ||
| 16048 | .param_str = "ddi*" | ||
| 16049 | .header = .math | ||
| 16050 | .attributes = .{ .lib_function_without_prefix = true } | ||
| 16051 | |||
| 16052 | frexpf | ||
| 16053 | .param_str = "ffi*" | ||
| 16054 | .header = .math | ||
| 16055 | .attributes = .{ .lib_function_without_prefix = true } | ||
| 16056 | |||
| 16057 | frexpl | ||
| 16058 | .param_str = "LdLdi*" | ||
| 16059 | .header = .math | ||
| 16060 | .attributes = .{ .lib_function_without_prefix = true } | ||
| 16061 | |||
| 16062 | fscanf | ||
| 16063 | .param_str = "iP*RcC*R." | ||
| 16064 | .header = .stdio | ||
| 16065 | .attributes = .{ .lib_function_without_prefix = true, .format_kind = .scanf, .format_string_position = 1 } | ||
| 16066 | |||
| 16067 | fwrite | ||
| 16068 | .param_str = "zvC*zzP*" | ||
| 16069 | .header = .stdio | ||
| 16070 | .attributes = .{ .lib_function_without_prefix = true } | ||
| 16071 | |||
| 16072 | getcontext | ||
| 16073 | .param_str = "iK*" | ||
| 16074 | .header = .setjmp | ||
| 16075 | .attributes = .{ .allow_type_mismatch = true, .lib_function_without_prefix = true, .returns_twice = true } | ||
| 16076 | |||
| 16077 | hypot | ||
| 16078 | .param_str = "ddd" | ||
| 16079 | .header = .math | ||
| 16080 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16081 | |||
| 16082 | hypotf | ||
| 16083 | .param_str = "fff" | ||
| 16084 | .header = .math | ||
| 16085 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16086 | |||
| 16087 | hypotl | ||
| 16088 | .param_str = "LdLdLd" | ||
| 16089 | .header = .math | ||
| 16090 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16091 | |||
| 16092 | ilogb | ||
| 16093 | .param_str = "id" | ||
| 16094 | .header = .math | ||
| 16095 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16096 | |||
| 16097 | ilogbf | ||
| 16098 | .param_str = "if" | ||
| 16099 | .header = .math | ||
| 16100 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16101 | |||
| 16102 | ilogbl | ||
| 16103 | .param_str = "iLd" | ||
| 16104 | .header = .math | ||
| 16105 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16106 | |||
| 16107 | index | ||
| 16108 | .param_str = "c*cC*i" | ||
| 16109 | .header = .strings, .language = .all_gnu_languages | ||
| 16110 | .attributes = .{ .lib_function_without_prefix = true } | ||
| 16111 | |||
| 16112 | isalnum | ||
| 16113 | .param_str = "ii" | ||
| 16114 | .header = .ctype | ||
| 16115 | .attributes = .{ .pure = true, .lib_function_without_prefix = true } | ||
| 16116 | |||
| 16117 | isalpha | ||
| 16118 | .param_str = "ii" | ||
| 16119 | .header = .ctype | ||
| 16120 | .attributes = .{ .pure = true, .lib_function_without_prefix = true } | ||
| 16121 | |||
| 16122 | isblank | ||
| 16123 | .param_str = "ii" | ||
| 16124 | .header = .ctype | ||
| 16125 | .attributes = .{ .pure = true, .lib_function_without_prefix = true } | ||
| 16126 | |||
| 16127 | iscntrl | ||
| 16128 | .param_str = "ii" | ||
| 16129 | .header = .ctype | ||
| 16130 | .attributes = .{ .pure = true, .lib_function_without_prefix = true } | ||
| 16131 | |||
| 16132 | isdigit | ||
| 16133 | .param_str = "ii" | ||
| 16134 | .header = .ctype | ||
| 16135 | .attributes = .{ .pure = true, .lib_function_without_prefix = true } | ||
| 16136 | |||
| 16137 | isgraph | ||
| 16138 | .param_str = "ii" | ||
| 16139 | .header = .ctype | ||
| 16140 | .attributes = .{ .pure = true, .lib_function_without_prefix = true } | ||
| 16141 | |||
| 16142 | islower | ||
| 16143 | .param_str = "ii" | ||
| 16144 | .header = .ctype | ||
| 16145 | .attributes = .{ .pure = true, .lib_function_without_prefix = true } | ||
| 16146 | |||
| 16147 | isprint | ||
| 16148 | .param_str = "ii" | ||
| 16149 | .header = .ctype | ||
| 16150 | .attributes = .{ .pure = true, .lib_function_without_prefix = true } | ||
| 16151 | |||
| 16152 | ispunct | ||
| 16153 | .param_str = "ii" | ||
| 16154 | .header = .ctype | ||
| 16155 | .attributes = .{ .pure = true, .lib_function_without_prefix = true } | ||
| 16156 | |||
| 16157 | isspace | ||
| 16158 | .param_str = "ii" | ||
| 16159 | .header = .ctype | ||
| 16160 | .attributes = .{ .pure = true, .lib_function_without_prefix = true } | ||
| 16161 | |||
| 16162 | isupper | ||
| 16163 | .param_str = "ii" | ||
| 16164 | .header = .ctype | ||
| 16165 | .attributes = .{ .pure = true, .lib_function_without_prefix = true } | ||
| 16166 | |||
| 16167 | isxdigit | ||
| 16168 | .param_str = "ii" | ||
| 16169 | .header = .ctype | ||
| 16170 | .attributes = .{ .pure = true, .lib_function_without_prefix = true } | ||
| 16171 | |||
| 16172 | labs | ||
| 16173 | .param_str = "LiLi" | ||
| 16174 | .header = .stdlib | ||
| 16175 | .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } | ||
| 16176 | |||
| 16177 | ldexp | ||
| 16178 | .param_str = "ddi" | ||
| 16179 | .header = .math | ||
| 16180 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16181 | |||
| 16182 | ldexpf | ||
| 16183 | .param_str = "ffi" | ||
| 16184 | .header = .math | ||
| 16185 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16186 | |||
| 16187 | ldexpl | ||
| 16188 | .param_str = "LdLdi" | ||
| 16189 | .header = .math | ||
| 16190 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16191 | |||
| 16192 | lgamma | ||
| 16193 | .param_str = "dd" | ||
| 16194 | .header = .math | ||
| 16195 | .attributes = .{ .lib_function_without_prefix = true } | ||
| 16196 | |||
| 16197 | lgammaf | ||
| 16198 | .param_str = "ff" | ||
| 16199 | .header = .math | ||
| 16200 | .attributes = .{ .lib_function_without_prefix = true } | ||
| 16201 | |||
| 16202 | lgammal | ||
| 16203 | .param_str = "LdLd" | ||
| 16204 | .header = .math | ||
| 16205 | .attributes = .{ .lib_function_without_prefix = true } | ||
| 16206 | |||
| 16207 | llabs | ||
| 16208 | .param_str = "LLiLLi" | ||
| 16209 | .header = .stdlib | ||
| 16210 | .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } | ||
| 16211 | |||
| 16212 | llrint | ||
| 16213 | .param_str = "LLid" | ||
| 16214 | .header = .math | ||
| 16215 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16216 | |||
| 16217 | llrintf | ||
| 16218 | .param_str = "LLif" | ||
| 16219 | .header = .math | ||
| 16220 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16221 | |||
| 16222 | llrintl | ||
| 16223 | .param_str = "LLiLd" | ||
| 16224 | .header = .math | ||
| 16225 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16226 | |||
| 16227 | llround | ||
| 16228 | .param_str = "LLid" | ||
| 16229 | .header = .math | ||
| 16230 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16231 | |||
| 16232 | llroundf | ||
| 16233 | .param_str = "LLif" | ||
| 16234 | .header = .math | ||
| 16235 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16236 | |||
| 16237 | llroundl | ||
| 16238 | .param_str = "LLiLd" | ||
| 16239 | .header = .math | ||
| 16240 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16241 | |||
| 16242 | log | ||
| 16243 | .param_str = "dd" | ||
| 16244 | .header = .math | ||
| 16245 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16246 | |||
| 16247 | log10 | ||
| 16248 | .param_str = "dd" | ||
| 16249 | .header = .math | ||
| 16250 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16251 | |||
| 16252 | log10f | ||
| 16253 | .param_str = "ff" | ||
| 16254 | .header = .math | ||
| 16255 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16256 | |||
| 16257 | log10l | ||
| 16258 | .param_str = "LdLd" | ||
| 16259 | .header = .math | ||
| 16260 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16261 | |||
| 16262 | log1p | ||
| 16263 | .param_str = "dd" | ||
| 16264 | .header = .math | ||
| 16265 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16266 | |||
| 16267 | log1pf | ||
| 16268 | .param_str = "ff" | ||
| 16269 | .header = .math | ||
| 16270 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16271 | |||
| 16272 | log1pl | ||
| 16273 | .param_str = "LdLd" | ||
| 16274 | .header = .math | ||
| 16275 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16276 | |||
| 16277 | log2 | ||
| 16278 | .param_str = "dd" | ||
| 16279 | .header = .math | ||
| 16280 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16281 | |||
| 16282 | log2f | ||
| 16283 | .param_str = "ff" | ||
| 16284 | .header = .math | ||
| 16285 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16286 | |||
| 16287 | log2l | ||
| 16288 | .param_str = "LdLd" | ||
| 16289 | .header = .math | ||
| 16290 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16291 | |||
| 16292 | logb | ||
| 16293 | .param_str = "dd" | ||
| 16294 | .header = .math | ||
| 16295 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16296 | |||
| 16297 | logbf | ||
| 16298 | .param_str = "ff" | ||
| 16299 | .header = .math | ||
| 16300 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16301 | |||
| 16302 | logbl | ||
| 16303 | .param_str = "LdLd" | ||
| 16304 | .header = .math | ||
| 16305 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16306 | |||
| 16307 | logf | ||
| 16308 | .param_str = "ff" | ||
| 16309 | .header = .math | ||
| 16310 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16311 | |||
| 16312 | logl | ||
| 16313 | .param_str = "LdLd" | ||
| 16314 | .header = .math | ||
| 16315 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16316 | |||
| 16317 | longjmp | ||
| 16318 | .param_str = "vJi" | ||
| 16319 | .header = .setjmp | ||
| 16320 | .attributes = .{ .noreturn = true, .allow_type_mismatch = true, .lib_function_without_prefix = true } | ||
| 16321 | |||
| 16322 | lrint | ||
| 16323 | .param_str = "Lid" | ||
| 16324 | .header = .math | ||
| 16325 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16326 | |||
| 16327 | lrintf | ||
| 16328 | .param_str = "Lif" | ||
| 16329 | .header = .math | ||
| 16330 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16331 | |||
| 16332 | lrintl | ||
| 16333 | .param_str = "LiLd" | ||
| 16334 | .header = .math | ||
| 16335 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16336 | |||
| 16337 | lround | ||
| 16338 | .param_str = "Lid" | ||
| 16339 | .header = .math | ||
| 16340 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16341 | |||
| 16342 | lroundf | ||
| 16343 | .param_str = "Lif" | ||
| 16344 | .header = .math | ||
| 16345 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16346 | |||
| 16347 | lroundl | ||
| 16348 | .param_str = "LiLd" | ||
| 16349 | .header = .math | ||
| 16350 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16351 | |||
| 16352 | malloc | ||
| 16353 | .param_str = "v*z" | ||
| 16354 | .header = .stdlib | ||
| 16355 | .attributes = .{ .lib_function_without_prefix = true } | ||
| 16356 | |||
| 16357 | memalign | ||
| 16358 | .param_str = "v*zz" | ||
| 16359 | .header = .malloc, .language = .all_gnu_languages | ||
| 16360 | .attributes = .{ .lib_function_without_prefix = true } | ||
| 16361 | |||
| 16362 | memccpy | ||
| 16363 | .param_str = "v*v*vC*iz" | ||
| 16364 | .header = .string, .language = .all_gnu_languages | ||
| 16365 | .attributes = .{ .lib_function_without_prefix = true } | ||
| 16366 | |||
| 16367 | memchr | ||
| 16368 | .param_str = "v*vC*iz" | ||
| 16369 | .header = .string | ||
| 16370 | .attributes = .{ .lib_function_without_prefix = true, .const_evaluable = true } | ||
| 16371 | |||
| 16372 | memcmp | ||
| 16373 | .param_str = "ivC*vC*z" | ||
| 16374 | .header = .string | ||
| 16375 | .attributes = .{ .lib_function_without_prefix = true, .const_evaluable = true } | ||
| 16376 | |||
| 16377 | memcpy | ||
| 16378 | .param_str = "v*v*vC*z" | ||
| 16379 | .header = .string | ||
| 16380 | .attributes = .{ .lib_function_without_prefix = true, .const_evaluable = true } | ||
| 16381 | |||
| 16382 | memmove | ||
| 16383 | .param_str = "v*v*vC*z" | ||
| 16384 | .header = .string | ||
| 16385 | .attributes = .{ .lib_function_without_prefix = true, .const_evaluable = true } | ||
| 16386 | |||
| 16387 | mempcpy | ||
| 16388 | .param_str = "v*v*vC*z" | ||
| 16389 | .header = .string, .language = .all_gnu_languages | ||
| 16390 | .attributes = .{ .lib_function_without_prefix = true } | ||
| 16391 | |||
| 16392 | memset | ||
| 16393 | .param_str = "v*v*iz" | ||
| 16394 | .header = .string | ||
| 16395 | .attributes = .{ .lib_function_without_prefix = true } | ||
| 16396 | |||
| 16397 | modf | ||
| 16398 | .param_str = "ddd*" | ||
| 16399 | .header = .math | ||
| 16400 | .attributes = .{ .lib_function_without_prefix = true } | ||
| 16401 | |||
| 16402 | modff | ||
| 16403 | .param_str = "fff*" | ||
| 16404 | .header = .math | ||
| 16405 | .attributes = .{ .lib_function_without_prefix = true } | ||
| 16406 | |||
| 16407 | modfl | ||
| 16408 | .param_str = "LdLdLd*" | ||
| 16409 | .header = .math | ||
| 16410 | .attributes = .{ .lib_function_without_prefix = true } | ||
| 16411 | |||
| 16412 | nan | ||
| 16413 | .param_str = "dcC*" | ||
| 16414 | .header = .math | ||
| 16415 | .attributes = .{ .pure = true, .lib_function_without_prefix = true } | ||
| 16416 | |||
| 16417 | nanf | ||
| 16418 | .param_str = "fcC*" | ||
| 16419 | .header = .math | ||
| 16420 | .attributes = .{ .pure = true, .lib_function_without_prefix = true } | ||
| 16421 | |||
| 16422 | nanl | ||
| 16423 | .param_str = "LdcC*" | ||
| 16424 | .header = .math | ||
| 16425 | .attributes = .{ .pure = true, .lib_function_without_prefix = true } | ||
| 16426 | |||
| 16427 | nearbyint | ||
| 16428 | .param_str = "dd" | ||
| 16429 | .header = .math | ||
| 16430 | .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } | ||
| 16431 | |||
| 16432 | nearbyintf | ||
| 16433 | .param_str = "ff" | ||
| 16434 | .header = .math | ||
| 16435 | .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } | ||
| 16436 | |||
| 16437 | nearbyintl | ||
| 16438 | .param_str = "LdLd" | ||
| 16439 | .header = .math | ||
| 16440 | .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } | ||
| 16441 | |||
| 16442 | nextafter | ||
| 16443 | .param_str = "ddd" | ||
| 16444 | .header = .math | ||
| 16445 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16446 | |||
| 16447 | nextafterf | ||
| 16448 | .param_str = "fff" | ||
| 16449 | .header = .math | ||
| 16450 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16451 | |||
| 16452 | nextafterl | ||
| 16453 | .param_str = "LdLdLd" | ||
| 16454 | .header = .math | ||
| 16455 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16456 | |||
| 16457 | nexttoward | ||
| 16458 | .param_str = "ddLd" | ||
| 16459 | .header = .math | ||
| 16460 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16461 | |||
| 16462 | nexttowardf | ||
| 16463 | .param_str = "ffLd" | ||
| 16464 | .header = .math | ||
| 16465 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16466 | |||
| 16467 | nexttowardl | ||
| 16468 | .param_str = "LdLdLd" | ||
| 16469 | .header = .math | ||
| 16470 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16471 | |||
| 16472 | pow | ||
| 16473 | .param_str = "ddd" | ||
| 16474 | .header = .math | ||
| 16475 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16476 | |||
| 16477 | powf | ||
| 16478 | .param_str = "fff" | ||
| 16479 | .header = .math | ||
| 16480 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16481 | |||
| 16482 | powl | ||
| 16483 | .param_str = "LdLdLd" | ||
| 16484 | .header = .math | ||
| 16485 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16486 | |||
| 16487 | printf | ||
| 16488 | .param_str = "icC*." | ||
| 16489 | .header = .stdio | ||
| 16490 | .attributes = .{ .lib_function_without_prefix = true, .format_kind = .printf } | ||
| 16491 | |||
| 16492 | realloc | ||
| 16493 | .param_str = "v*v*z" | ||
| 16494 | .header = .stdlib | ||
| 16495 | .attributes = .{ .lib_function_without_prefix = true } | ||
| 16496 | |||
| 16497 | remainder | ||
| 16498 | .param_str = "ddd" | ||
| 16499 | .header = .math | ||
| 16500 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16501 | |||
| 16502 | remainderf | ||
| 16503 | .param_str = "fff" | ||
| 16504 | .header = .math | ||
| 16505 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16506 | |||
| 16507 | remainderl | ||
| 16508 | .param_str = "LdLdLd" | ||
| 16509 | .header = .math | ||
| 16510 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16511 | |||
| 16512 | remquo | ||
| 16513 | .param_str = "dddi*" | ||
| 16514 | .header = .math | ||
| 16515 | .attributes = .{ .lib_function_without_prefix = true } | ||
| 16516 | |||
| 16517 | remquof | ||
| 16518 | .param_str = "fffi*" | ||
| 16519 | .header = .math | ||
| 16520 | .attributes = .{ .lib_function_without_prefix = true } | ||
| 16521 | |||
| 16522 | remquol | ||
| 16523 | .param_str = "LdLdLdi*" | ||
| 16524 | .header = .math | ||
| 16525 | .attributes = .{ .lib_function_without_prefix = true } | ||
| 16526 | |||
| 16527 | rindex | ||
| 16528 | .param_str = "c*cC*i" | ||
| 16529 | .header = .strings, .language = .all_gnu_languages | ||
| 16530 | .attributes = .{ .lib_function_without_prefix = true } | ||
| 16531 | |||
| 16532 | rint | ||
| 16533 | .param_str = "dd" | ||
| 16534 | .header = .math | ||
| 16535 | .attributes = .{ .lib_function_without_prefix = true, .const_without_fp_exceptions = true } | ||
| 16536 | |||
| 16537 | rintf | ||
| 16538 | .param_str = "ff" | ||
| 16539 | .header = .math | ||
| 16540 | .attributes = .{ .lib_function_without_prefix = true, .const_without_fp_exceptions = true } | ||
| 16541 | |||
| 16542 | rintl | ||
| 16543 | .param_str = "LdLd" | ||
| 16544 | .header = .math | ||
| 16545 | .attributes = .{ .lib_function_without_prefix = true, .const_without_fp_exceptions = true } | ||
| 16546 | |||
| 16547 | round | ||
| 16548 | .param_str = "dd" | ||
| 16549 | .header = .math | ||
| 16550 | .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } | ||
| 16551 | |||
| 16552 | roundeven | ||
| 16553 | .param_str = "dd" | ||
| 16554 | .header = .math | ||
| 16555 | .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } | ||
| 16556 | |||
| 16557 | roundevenf | ||
| 16558 | .param_str = "ff" | ||
| 16559 | .header = .math | ||
| 16560 | .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } | ||
| 16561 | |||
| 16562 | roundevenl | ||
| 16563 | .param_str = "LdLd" | ||
| 16564 | .header = .math | ||
| 16565 | .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } | ||
| 16566 | |||
| 16567 | roundf | ||
| 16568 | .param_str = "ff" | ||
| 16569 | .header = .math | ||
| 16570 | .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } | ||
| 16571 | |||
| 16572 | roundl | ||
| 16573 | .param_str = "LdLd" | ||
| 16574 | .header = .math | ||
| 16575 | .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } | ||
| 16576 | |||
| 16577 | savectx | ||
| 16578 | .param_str = "iJ" | ||
| 16579 | .header = .setjmp | ||
| 16580 | .attributes = .{ .allow_type_mismatch = true, .lib_function_without_prefix = true, .returns_twice = true } | ||
| 16581 | |||
| 16582 | scalbln | ||
| 16583 | .param_str = "ddLi" | ||
| 16584 | .header = .math | ||
| 16585 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16586 | |||
| 16587 | scalblnf | ||
| 16588 | .param_str = "ffLi" | ||
| 16589 | .header = .math | ||
| 16590 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16591 | |||
| 16592 | scalblnl | ||
| 16593 | .param_str = "LdLdLi" | ||
| 16594 | .header = .math | ||
| 16595 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16596 | |||
| 16597 | scalbn | ||
| 16598 | .param_str = "ddi" | ||
| 16599 | .header = .math | ||
| 16600 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16601 | |||
| 16602 | scalbnf | ||
| 16603 | .param_str = "ffi" | ||
| 16604 | .header = .math | ||
| 16605 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16606 | |||
| 16607 | scalbnl | ||
| 16608 | .param_str = "LdLdi" | ||
| 16609 | .header = .math | ||
| 16610 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16611 | |||
| 16612 | scanf | ||
| 16613 | .param_str = "icC*R." | ||
| 16614 | .header = .stdio | ||
| 16615 | .attributes = .{ .lib_function_without_prefix = true, .format_kind = .scanf } | ||
| 16616 | |||
| 16617 | setjmp | ||
| 16618 | .param_str = "iJ" | ||
| 16619 | .header = .setjmp | ||
| 16620 | .attributes = .{ .allow_type_mismatch = true, .lib_function_without_prefix = true, .returns_twice = true } | ||
| 16621 | |||
| 16622 | siglongjmp | ||
| 16623 | .param_str = "vSJi" | ||
| 16624 | .header = .setjmp, .language = .all_gnu_languages | ||
| 16625 | .attributes = .{ .noreturn = true, .allow_type_mismatch = true, .lib_function_without_prefix = true } | ||
| 16626 | |||
| 16627 | sigsetjmp | ||
| 16628 | .param_str = "iSJi" | ||
| 16629 | .header = .setjmp | ||
| 16630 | .attributes = .{ .allow_type_mismatch = true, .lib_function_without_prefix = true, .returns_twice = true } | ||
| 16631 | |||
| 16632 | sin | ||
| 16633 | .param_str = "dd" | ||
| 16634 | .header = .math | ||
| 16635 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16636 | |||
| 16637 | sinf | ||
| 16638 | .param_str = "ff" | ||
| 16639 | .header = .math | ||
| 16640 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16641 | |||
| 16642 | sinh | ||
| 16643 | .param_str = "dd" | ||
| 16644 | .header = .math | ||
| 16645 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16646 | |||
| 16647 | sinhf | ||
| 16648 | .param_str = "ff" | ||
| 16649 | .header = .math | ||
| 16650 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16651 | |||
| 16652 | sinhl | ||
| 16653 | .param_str = "LdLd" | ||
| 16654 | .header = .math | ||
| 16655 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16656 | |||
| 16657 | sinl | ||
| 16658 | .param_str = "LdLd" | ||
| 16659 | .header = .math | ||
| 16660 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16661 | |||
| 16662 | snprintf | ||
| 16663 | .param_str = "ic*zcC*." | ||
| 16664 | .header = .stdio | ||
| 16665 | .attributes = .{ .lib_function_without_prefix = true, .format_kind = .printf, .format_string_position = 2 } | ||
| 16666 | |||
| 16667 | sprintf | ||
| 16668 | .param_str = "ic*cC*." | ||
| 16669 | .header = .stdio | ||
| 16670 | .attributes = .{ .lib_function_without_prefix = true, .format_kind = .printf, .format_string_position = 1 } | ||
| 16671 | |||
| 16672 | sqrt | ||
| 16673 | .param_str = "dd" | ||
| 16674 | .header = .math | ||
| 16675 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16676 | |||
| 16677 | sqrtf | ||
| 16678 | .param_str = "ff" | ||
| 16679 | .header = .math | ||
| 16680 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16681 | |||
| 16682 | sqrtl | ||
| 16683 | .param_str = "LdLd" | ||
| 16684 | .header = .math | ||
| 16685 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16686 | |||
| 16687 | sscanf | ||
| 16688 | .param_str = "icC*RcC*R." | ||
| 16689 | .header = .stdio | ||
| 16690 | .attributes = .{ .lib_function_without_prefix = true, .format_kind = .scanf, .format_string_position = 1 } | ||
| 16691 | |||
| 16692 | stpcpy | ||
| 16693 | .param_str = "c*c*cC*" | ||
| 16694 | .header = .string, .language = .all_gnu_languages | ||
| 16695 | .attributes = .{ .lib_function_without_prefix = true } | ||
| 16696 | |||
| 16697 | stpncpy | ||
| 16698 | .param_str = "c*c*cC*z" | ||
| 16699 | .header = .string, .language = .all_gnu_languages | ||
| 16700 | .attributes = .{ .lib_function_without_prefix = true } | ||
| 16701 | |||
| 16702 | strcasecmp | ||
| 16703 | .param_str = "icC*cC*" | ||
| 16704 | .header = .strings, .language = .all_gnu_languages | ||
| 16705 | .attributes = .{ .lib_function_without_prefix = true } | ||
| 16706 | |||
| 16707 | strcat | ||
| 16708 | .param_str = "c*c*cC*" | ||
| 16709 | .header = .string | ||
| 16710 | .attributes = .{ .lib_function_without_prefix = true } | ||
| 16711 | |||
| 16712 | strchr | ||
| 16713 | .param_str = "c*cC*i" | ||
| 16714 | .header = .string | ||
| 16715 | .attributes = .{ .lib_function_without_prefix = true, .const_evaluable = true } | ||
| 16716 | |||
| 16717 | strcmp | ||
| 16718 | .param_str = "icC*cC*" | ||
| 16719 | .header = .string | ||
| 16720 | .attributes = .{ .lib_function_without_prefix = true, .const_evaluable = true } | ||
| 16721 | |||
| 16722 | strcpy | ||
| 16723 | .param_str = "c*c*cC*" | ||
| 16724 | .header = .string | ||
| 16725 | .attributes = .{ .lib_function_without_prefix = true } | ||
| 16726 | |||
| 16727 | strcspn | ||
| 16728 | .param_str = "zcC*cC*" | ||
| 16729 | .header = .string | ||
| 16730 | .attributes = .{ .lib_function_without_prefix = true } | ||
| 16731 | |||
| 16732 | strdup | ||
| 16733 | .param_str = "c*cC*" | ||
| 16734 | .header = .string, .language = .all_gnu_languages | ||
| 16735 | .attributes = .{ .lib_function_without_prefix = true } | ||
| 16736 | |||
| 16737 | strerror | ||
| 16738 | .param_str = "c*i" | ||
| 16739 | .header = .string | ||
| 16740 | .attributes = .{ .lib_function_without_prefix = true } | ||
| 16741 | |||
| 16742 | strlcat | ||
| 16743 | .param_str = "zc*cC*z" | ||
| 16744 | .header = .string, .language = .all_gnu_languages | ||
| 16745 | .attributes = .{ .lib_function_without_prefix = true } | ||
| 16746 | |||
| 16747 | strlcpy | ||
| 16748 | .param_str = "zc*cC*z" | ||
| 16749 | .header = .string, .language = .all_gnu_languages | ||
| 16750 | .attributes = .{ .lib_function_without_prefix = true } | ||
| 16751 | |||
| 16752 | strlen | ||
| 16753 | .param_str = "zcC*" | ||
| 16754 | .header = .string | ||
| 16755 | .attributes = .{ .lib_function_without_prefix = true, .const_evaluable = true } | ||
| 16756 | |||
| 16757 | strncasecmp | ||
| 16758 | .param_str = "icC*cC*z" | ||
| 16759 | .header = .strings, .language = .all_gnu_languages | ||
| 16760 | .attributes = .{ .lib_function_without_prefix = true } | ||
| 16761 | |||
| 16762 | strncat | ||
| 16763 | .param_str = "c*c*cC*z" | ||
| 16764 | .header = .string | ||
| 16765 | .attributes = .{ .lib_function_without_prefix = true } | ||
| 16766 | |||
| 16767 | strncmp | ||
| 16768 | .param_str = "icC*cC*z" | ||
| 16769 | .header = .string | ||
| 16770 | .attributes = .{ .lib_function_without_prefix = true, .const_evaluable = true } | ||
| 16771 | |||
| 16772 | strncpy | ||
| 16773 | .param_str = "c*c*cC*z" | ||
| 16774 | .header = .string | ||
| 16775 | .attributes = .{ .lib_function_without_prefix = true } | ||
| 16776 | |||
| 16777 | strndup | ||
| 16778 | .param_str = "c*cC*z" | ||
| 16779 | .header = .string, .language = .all_gnu_languages | ||
| 16780 | .attributes = .{ .lib_function_without_prefix = true } | ||
| 16781 | |||
| 16782 | strpbrk | ||
| 16783 | .param_str = "c*cC*cC*" | ||
| 16784 | .header = .string | ||
| 16785 | .attributes = .{ .lib_function_without_prefix = true } | ||
| 16786 | |||
| 16787 | strrchr | ||
| 16788 | .param_str = "c*cC*i" | ||
| 16789 | .header = .string | ||
| 16790 | .attributes = .{ .lib_function_without_prefix = true } | ||
| 16791 | |||
| 16792 | strspn | ||
| 16793 | .param_str = "zcC*cC*" | ||
| 16794 | .header = .string | ||
| 16795 | .attributes = .{ .lib_function_without_prefix = true } | ||
| 16796 | |||
| 16797 | strstr | ||
| 16798 | .param_str = "c*cC*cC*" | ||
| 16799 | .header = .string | ||
| 16800 | .attributes = .{ .lib_function_without_prefix = true } | ||
| 16801 | |||
| 16802 | strtod | ||
| 16803 | .param_str = "dcC*c**" | ||
| 16804 | .header = .stdlib | ||
| 16805 | .attributes = .{ .lib_function_without_prefix = true } | ||
| 16806 | |||
| 16807 | strtof | ||
| 16808 | .param_str = "fcC*c**" | ||
| 16809 | .header = .stdlib | ||
| 16810 | .attributes = .{ .lib_function_without_prefix = true } | ||
| 16811 | |||
| 16812 | strtok | ||
| 16813 | .param_str = "c*c*cC*" | ||
| 16814 | .header = .string | ||
| 16815 | .attributes = .{ .lib_function_without_prefix = true } | ||
| 16816 | |||
| 16817 | strtol | ||
| 16818 | .param_str = "LicC*c**i" | ||
| 16819 | .header = .stdlib | ||
| 16820 | .attributes = .{ .lib_function_without_prefix = true } | ||
| 16821 | |||
| 16822 | strtold | ||
| 16823 | .param_str = "LdcC*c**" | ||
| 16824 | .header = .stdlib | ||
| 16825 | .attributes = .{ .lib_function_without_prefix = true } | ||
| 16826 | |||
| 16827 | strtoll | ||
| 16828 | .param_str = "LLicC*c**i" | ||
| 16829 | .header = .stdlib | ||
| 16830 | .attributes = .{ .lib_function_without_prefix = true } | ||
| 16831 | |||
| 16832 | strtoul | ||
| 16833 | .param_str = "ULicC*c**i" | ||
| 16834 | .header = .stdlib | ||
| 16835 | .attributes = .{ .lib_function_without_prefix = true } | ||
| 16836 | |||
| 16837 | strtoull | ||
| 16838 | .param_str = "ULLicC*c**i" | ||
| 16839 | .header = .stdlib | ||
| 16840 | .attributes = .{ .lib_function_without_prefix = true } | ||
| 16841 | |||
| 16842 | strxfrm | ||
| 16843 | .param_str = "zc*cC*z" | ||
| 16844 | .header = .string | ||
| 16845 | .attributes = .{ .lib_function_without_prefix = true } | ||
| 16846 | |||
| 16847 | tan | ||
| 16848 | .param_str = "dd" | ||
| 16849 | .header = .math | ||
| 16850 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16851 | |||
| 16852 | tanf | ||
| 16853 | .param_str = "ff" | ||
| 16854 | .header = .math | ||
| 16855 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16856 | |||
| 16857 | tanh | ||
| 16858 | .param_str = "dd" | ||
| 16859 | .header = .math | ||
| 16860 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16861 | |||
| 16862 | tanhf | ||
| 16863 | .param_str = "ff" | ||
| 16864 | .header = .math | ||
| 16865 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16866 | |||
| 16867 | tanhl | ||
| 16868 | .param_str = "LdLd" | ||
| 16869 | .header = .math | ||
| 16870 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16871 | |||
| 16872 | tanl | ||
| 16873 | .param_str = "LdLd" | ||
| 16874 | .header = .math | ||
| 16875 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16876 | |||
| 16877 | tgamma | ||
| 16878 | .param_str = "dd" | ||
| 16879 | .header = .math | ||
| 16880 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16881 | |||
| 16882 | tgammaf | ||
| 16883 | .param_str = "ff" | ||
| 16884 | .header = .math | ||
| 16885 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16886 | |||
| 16887 | tgammal | ||
| 16888 | .param_str = "LdLd" | ||
| 16889 | .header = .math | ||
| 16890 | .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } | ||
| 16891 | |||
| 16892 | tolower | ||
| 16893 | .param_str = "ii" | ||
| 16894 | .header = .ctype | ||
| 16895 | .attributes = .{ .pure = true, .lib_function_without_prefix = true } | ||
| 16896 | |||
| 16897 | toupper | ||
| 16898 | .param_str = "ii" | ||
| 16899 | .header = .ctype | ||
| 16900 | .attributes = .{ .pure = true, .lib_function_without_prefix = true } | ||
| 16901 | |||
| 16902 | trunc | ||
| 16903 | .param_str = "dd" | ||
| 16904 | .header = .math | ||
| 16905 | .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } | ||
| 16906 | |||
| 16907 | truncf | ||
| 16908 | .param_str = "ff" | ||
| 16909 | .header = .math | ||
| 16910 | .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } | ||
| 16911 | |||
| 16912 | truncl | ||
| 16913 | .param_str = "LdLd" | ||
| 16914 | .header = .math | ||
| 16915 | .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } | ||
| 16916 | |||
| 16917 | va_copy | ||
| 16918 | .param_str = "vAA" | ||
| 16919 | .header = .stdarg | ||
| 16920 | .attributes = .{ .lib_function_without_prefix = true } | ||
| 16921 | |||
| 16922 | va_end | ||
| 16923 | .param_str = "vA" | ||
| 16924 | .header = .stdarg | ||
| 16925 | .attributes = .{ .lib_function_without_prefix = true } | ||
| 16926 | |||
| 16927 | va_start | ||
| 16928 | .param_str = "vA." | ||
| 16929 | .header = .stdarg | ||
| 16930 | .attributes = .{ .lib_function_without_prefix = true } | ||
| 16931 | |||
| 16932 | vfork | ||
| 16933 | .param_str = "p" | ||
| 16934 | .header = .unistd | ||
| 16935 | .attributes = .{ .allow_type_mismatch = true, .lib_function_without_prefix = true, .returns_twice = true } | ||
| 16936 | |||
| 16937 | vfprintf | ||
| 16938 | .param_str = "iP*cC*a" | ||
| 16939 | .header = .stdio | ||
| 16940 | .attributes = .{ .lib_function_without_prefix = true, .format_kind = .vprintf, .format_string_position = 1 } | ||
| 16941 | |||
| 16942 | vfscanf | ||
| 16943 | .param_str = "iP*RcC*Ra" | ||
| 16944 | .header = .stdio | ||
| 16945 | .attributes = .{ .lib_function_without_prefix = true, .format_kind = .vscanf, .format_string_position = 1 } | ||
| 16946 | |||
| 16947 | vprintf | ||
| 16948 | .param_str = "icC*a" | ||
| 16949 | .header = .stdio | ||
| 16950 | .attributes = .{ .lib_function_without_prefix = true, .format_kind = .vprintf } | ||
| 16951 | |||
| 16952 | vscanf | ||
| 16953 | .param_str = "icC*Ra" | ||
| 16954 | .header = .stdio | ||
| 16955 | .attributes = .{ .lib_function_without_prefix = true, .format_kind = .vscanf } | ||
| 16956 | |||
| 16957 | vsnprintf | ||
| 16958 | .param_str = "ic*zcC*a" | ||
| 16959 | .header = .stdio | ||
| 16960 | .attributes = .{ .lib_function_without_prefix = true, .format_kind = .vprintf, .format_string_position = 2 } | ||
| 16961 | |||
| 16962 | vsprintf | ||
| 16963 | .param_str = "ic*cC*a" | ||
| 16964 | .header = .stdio | ||
| 16965 | .attributes = .{ .lib_function_without_prefix = true, .format_kind = .vprintf, .format_string_position = 1 } | ||
| 16966 | |||
| 16967 | vsscanf | ||
| 16968 | .param_str = "icC*RcC*Ra" | ||
| 16969 | .header = .stdio | ||
| 16970 | .attributes = .{ .lib_function_without_prefix = true, .format_kind = .vscanf, .format_string_position = 1 } | ||
| 16971 | |||
| 16972 | wcschr | ||
| 16973 | .param_str = "w*wC*w" | ||
| 16974 | .header = .wchar | ||
| 16975 | .attributes = .{ .lib_function_without_prefix = true, .const_evaluable = true } | ||
| 16976 | |||
| 16977 | wcscmp | ||
| 16978 | .param_str = "iwC*wC*" | ||
| 16979 | .header = .wchar | ||
| 16980 | .attributes = .{ .lib_function_without_prefix = true, .const_evaluable = true } | ||
| 16981 | |||
| 16982 | wcslen | ||
| 16983 | .param_str = "zwC*" | ||
| 16984 | .header = .wchar | ||
| 16985 | .attributes = .{ .lib_function_without_prefix = true, .const_evaluable = true } | ||
| 16986 | |||
| 16987 | wcsncmp | ||
| 16988 | .param_str = "iwC*wC*z" | ||
| 16989 | .header = .wchar | ||
| 16990 | .attributes = .{ .lib_function_without_prefix = true, .const_evaluable = true } | ||
| 16991 | |||
| 16992 | wmemchr | ||
| 16993 | .param_str = "w*wC*wz" | ||
| 16994 | .header = .wchar | ||
| 16995 | .attributes = .{ .lib_function_without_prefix = true, .const_evaluable = true } | ||
| 16996 | |||
| 16997 | wmemcmp | ||
| 16998 | .param_str = "iwC*wC*z" | ||
| 16999 | .header = .wchar | ||
| 17000 | .attributes = .{ .lib_function_without_prefix = true, .const_evaluable = true } | ||
| 17001 | |||
| 17002 | wmemcpy | ||
| 17003 | .param_str = "w*w*wC*z" | ||
| 17004 | .header = .wchar | ||
| 17005 | .attributes = .{ .lib_function_without_prefix = true, .const_evaluable = true } | ||
| 17006 | |||
| 17007 | wmemmove | ||
| 17008 | .param_str = "w*w*wC*z" | ||
| 17009 | .header = .wchar | ||
| 17010 | .attributes = .{ .lib_function_without_prefix = true, .const_evaluable = true } | ||
deps/aro/aro/Builtins/Properties.zig created+143| ... | @@ -0,0 +1,143 @@ | ||
| 1 | const std = @import("std"); | ||
| 2 | |||
| 3 | const Properties = @This(); | ||
| 4 | |||
| 5 | param_str: []const u8, | ||
| 6 | language: Language = .all_languages, | ||
| 7 | attributes: Attributes = Attributes{}, | ||
| 8 | header: Header = .none, | ||
| 9 | target_set: TargetSet = TargetSet.initOne(.basic), | ||
| 10 | |||
| 11 | /// Header which must be included for a builtin to be available | ||
| 12 | pub const Header = enum { | ||
| 13 | none, | ||
| 14 | /// stdio.h | ||
| 15 | stdio, | ||
| 16 | /// stdlib.h | ||
| 17 | stdlib, | ||
| 18 | /// setjmpex.h | ||
| 19 | setjmpex, | ||
| 20 | /// stdarg.h | ||
| 21 | stdarg, | ||
| 22 | /// string.h | ||
| 23 | string, | ||
| 24 | /// ctype.h | ||
| 25 | ctype, | ||
| 26 | /// wchar.h | ||
| 27 | wchar, | ||
| 28 | /// setjmp.h | ||
| 29 | setjmp, | ||
| 30 | /// malloc.h | ||
| 31 | malloc, | ||
| 32 | /// strings.h | ||
| 33 | strings, | ||
| 34 | /// unistd.h | ||
| 35 | unistd, | ||
| 36 | /// pthread.h | ||
| 37 | pthread, | ||
| 38 | /// math.h | ||
| 39 | math, | ||
| 40 | /// complex.h | ||
| 41 | complex, | ||
| 42 | /// Blocks.h | ||
| 43 | blocks, | ||
| 44 | }; | ||
| 45 | |||
| 46 | /// Languages in which a builtin is available | ||
| 47 | pub const Language = enum { | ||
| 48 | all_languages, | ||
| 49 | all_ms_languages, | ||
| 50 | all_gnu_languages, | ||
| 51 | gnu_lang, | ||
| 52 | }; | ||
| 53 | |||
| 54 | pub const Attributes = packed struct { | ||
| 55 | /// Function does not return | ||
| 56 | noreturn: bool = false, | ||
| 57 | |||
| 58 | /// Function has no side effects | ||
| 59 | pure: bool = false, | ||
| 60 | |||
| 61 | /// Function has no side effects and does not read memory | ||
| 62 | @"const": bool = false, | ||
| 63 | |||
| 64 | /// Signature is meaningless; use custom typecheck | ||
| 65 | custom_typecheck: bool = false, | ||
| 66 | |||
| 67 | /// A declaration of this builtin should be recognized even if the type doesn't match the specified signature. | ||
| 68 | allow_type_mismatch: bool = false, | ||
| 69 | |||
| 70 | /// this is a libc/libm function with a '__builtin_' prefix added. | ||
| 71 | lib_function_with_builtin_prefix: bool = false, | ||
| 72 | |||
| 73 | /// this is a libc/libm function without a '__builtin_' prefix. This builtin is disableable by '-fno-builtin-foo' | ||
| 74 | lib_function_without_prefix: bool = false, | ||
| 75 | |||
| 76 | /// Function returns twice (e.g. setjmp) | ||
| 77 | returns_twice: bool = false, | ||
| 78 | |||
| 79 | /// Nature of the format string passed to this function | ||
| 80 | format_kind: enum(u3) { | ||
| 81 | /// Does not take a format string | ||
| 82 | none, | ||
| 83 | /// this is a printf-like function whose Nth argument is the format string | ||
| 84 | printf, | ||
| 85 | /// function is like vprintf in that it accepts its arguments as a va_list rather than through an ellipsis | ||
| 86 | vprintf, | ||
| 87 | /// this is a scanf-like function whose Nth argument is the format string | ||
| 88 | scanf, | ||
| 89 | /// the function is like vscanf in that it accepts its arguments as a va_list rather than through an ellipsis | ||
| 90 | vscanf, | ||
| 91 | } = .none, | ||
| 92 | |||
| 93 | /// Position of format string argument. Only meaningful if format_kind is not .none | ||
| 94 | format_string_position: u5 = 0, | ||
| 95 | |||
| 96 | /// if false, arguments are not evaluated | ||
| 97 | eval_args: bool = true, | ||
| 98 | |||
| 99 | /// no side effects and does not read memory, but only when -fno-math-errno and FP exceptions are ignored | ||
| 100 | const_without_errno_and_fp_exceptions: bool = false, | ||
| 101 | |||
| 102 | /// no side effects and does not read memory, but only when FP exceptions are ignored | ||
| 103 | const_without_fp_exceptions: bool = false, | ||
| 104 | |||
| 105 | /// this function can be constant evaluated by the frontend | ||
| 106 | const_evaluable: bool = false, | ||
| 107 | }; | ||
| 108 | |||
| 109 | pub const Target = enum { | ||
| 110 | /// Supported on all targets | ||
| 111 | basic, | ||
| 112 | aarch64, | ||
| 113 | aarch64_neon_sve_bridge, | ||
| 114 | aarch64_neon_sve_bridge_cg, | ||
| 115 | amdgpu, | ||
| 116 | arm, | ||
| 117 | bpf, | ||
| 118 | hexagon, | ||
| 119 | hexagon_dep, | ||
| 120 | hexagon_map_custom_dep, | ||
| 121 | loong_arch, | ||
| 122 | mips, | ||
| 123 | neon, | ||
| 124 | nvptx, | ||
| 125 | ppc, | ||
| 126 | riscv, | ||
| 127 | riscv_vector, | ||
| 128 | sve, | ||
| 129 | systemz, | ||
| 130 | ve, | ||
| 131 | vevl_gen, | ||
| 132 | webassembly, | ||
| 133 | x86, | ||
| 134 | x86_64, | ||
| 135 | xcore, | ||
| 136 | }; | ||
| 137 | |||
| 138 | /// Targets for which a builtin is enabled | ||
| 139 | pub const TargetSet = std.enums.EnumSet(Target); | ||
| 140 | |||
| 141 | pub fn isVarArgs(properties: Properties) bool { | ||
| 142 | return properties.param_str[properties.param_str.len - 1] == '.'; | ||
| 143 | } | ||
deps/aro/aro/Builtins/TypeDescription.zig created+286| ... | @@ -0,0 +1,286 @@ | ||
| 1 | const std = @import("std"); | ||
| 2 | |||
| 3 | const TypeDescription = @This(); | ||
| 4 | |||
| 5 | prefix: []const Prefix, | ||
| 6 | spec: Spec, | ||
| 7 | suffix: []const Suffix, | ||
| 8 | |||
| 9 | pub const Component = union(enum) { | ||
| 10 | prefix: Prefix, | ||
| 11 | spec: Spec, | ||
| 12 | suffix: Suffix, | ||
| 13 | }; | ||
| 14 | |||
| 15 | pub const ComponentIterator = struct { | ||
| 16 | str: []const u8, | ||
| 17 | idx: usize, | ||
| 18 | |||
| 19 | pub fn init(str: []const u8) ComponentIterator { | ||
| 20 | return .{ | ||
| 21 | .str = str, | ||
| 22 | .idx = 0, | ||
| 23 | }; | ||
| 24 | } | ||
| 25 | |||
| 26 | pub fn peek(self: *ComponentIterator) ?Component { | ||
| 27 | const idx = self.idx; | ||
| 28 | defer self.idx = idx; | ||
| 29 | return self.next(); | ||
| 30 | } | ||
| 31 | |||
| 32 | pub fn next(self: *ComponentIterator) ?Component { | ||
| 33 | if (self.idx == self.str.len) return null; | ||
| 34 | const c = self.str[self.idx]; | ||
| 35 | self.idx += 1; | ||
| 36 | switch (c) { | ||
| 37 | 'L' => { | ||
| 38 | if (self.str[self.idx] != 'L') return .{ .prefix = .L }; | ||
| 39 | self.idx += 1; | ||
| 40 | if (self.str[self.idx] != 'L') return .{ .prefix = .LL }; | ||
| 41 | self.idx += 1; | ||
| 42 | return .{ .prefix = .LLL }; | ||
| 43 | }, | ||
| 44 | 'Z' => return .{ .prefix = .Z }, | ||
| 45 | 'W' => return .{ .prefix = .W }, | ||
| 46 | 'N' => return .{ .prefix = .N }, | ||
| 47 | 'O' => return .{ .prefix = .O }, | ||
| 48 | 'S' => { | ||
| 49 | if (self.str[self.idx] == 'J') { | ||
| 50 | self.idx += 1; | ||
| 51 | return .{ .spec = .SJ }; | ||
| 52 | } | ||
| 53 | return .{ .prefix = .S }; | ||
| 54 | }, | ||
| 55 | 'U' => return .{ .prefix = .U }, | ||
| 56 | 'I' => return .{ .prefix = .I }, | ||
| 57 | |||
| 58 | 'v' => return .{ .spec = .v }, | ||
| 59 | 'b' => return .{ .spec = .b }, | ||
| 60 | 'c' => return .{ .spec = .c }, | ||
| 61 | 's' => return .{ .spec = .s }, | ||
| 62 | 'i' => return .{ .spec = .i }, | ||
| 63 | 'h' => return .{ .spec = .h }, | ||
| 64 | 'x' => return .{ .spec = .x }, | ||
| 65 | 'y' => return .{ .spec = .y }, | ||
| 66 | 'f' => return .{ .spec = .f }, | ||
| 67 | 'd' => return .{ .spec = .d }, | ||
| 68 | 'z' => return .{ .spec = .z }, | ||
| 69 | 'w' => return .{ .spec = .w }, | ||
| 70 | 'F' => return .{ .spec = .F }, | ||
| 71 | 'G' => return .{ .spec = .G }, | ||
| 72 | 'H' => return .{ .spec = .H }, | ||
| 73 | 'M' => return .{ .spec = .M }, | ||
| 74 | 'a' => return .{ .spec = .a }, | ||
| 75 | 'A' => return .{ .spec = .A }, | ||
| 76 | 'V', 'q', 'E' => { | ||
| 77 | const start = self.idx; | ||
| 78 | while (std.ascii.isDigit(self.str[self.idx])) : (self.idx += 1) {} | ||
| 79 | const count = std.fmt.parseUnsigned(u32, self.str[start..self.idx], 10) catch unreachable; | ||
| 80 | return switch (c) { | ||
| 81 | 'V' => .{ .spec = .{ .V = count } }, | ||
| 82 | 'q' => .{ .spec = .{ .q = count } }, | ||
| 83 | 'E' => .{ .spec = .{ .E = count } }, | ||
| 84 | else => unreachable, | ||
| 85 | }; | ||
| 86 | }, | ||
| 87 | 'X' => { | ||
| 88 | defer self.idx += 1; | ||
| 89 | switch (self.str[self.idx]) { | ||
| 90 | 'f' => return .{ .spec = .{ .X = .float } }, | ||
| 91 | 'd' => return .{ .spec = .{ .X = .double } }, | ||
| 92 | 'L' => { | ||
| 93 | self.idx += 1; | ||
| 94 | return .{ .spec = .{ .X = .longdouble } }; | ||
| 95 | }, | ||
| 96 | else => unreachable, | ||
| 97 | } | ||
| 98 | }, | ||
| 99 | 'Y' => return .{ .spec = .Y }, | ||
| 100 | 'P' => return .{ .spec = .P }, | ||
| 101 | 'J' => return .{ .spec = .J }, | ||
| 102 | 'K' => return .{ .spec = .K }, | ||
| 103 | 'p' => return .{ .spec = .p }, | ||
| 104 | '.' => { | ||
| 105 | // can only appear at end of param string; indicates varargs function | ||
| 106 | std.debug.assert(self.idx == self.str.len); | ||
| 107 | return null; | ||
| 108 | }, | ||
| 109 | '!' => { | ||
| 110 | std.debug.assert(self.str.len == 1); | ||
| 111 | return .{ .spec = .@"!" }; | ||
| 112 | }, | ||
| 113 | |||
| 114 | '*' => { | ||
| 115 | if (self.idx < self.str.len and std.ascii.isDigit(self.str[self.idx])) { | ||
| 116 | defer self.idx += 1; | ||
| 117 | const addr_space = self.str[self.idx] - '0'; | ||
| 118 | return .{ .suffix = .{ .@"*" = addr_space } }; | ||
| 119 | } else { | ||
| 120 | return .{ .suffix = .{ .@"*" = null } }; | ||
| 121 | } | ||
| 122 | }, | ||
| 123 | 'C' => return .{ .suffix = .C }, | ||
| 124 | 'D' => return .{ .suffix = .D }, | ||
| 125 | 'R' => return .{ .suffix = .R }, | ||
| 126 | else => unreachable, | ||
| 127 | } | ||
| 128 | return null; | ||
| 129 | } | ||
| 130 | }; | ||
| 131 | |||
| 132 | pub const TypeIterator = struct { | ||
| 133 | param_str: []const u8, | ||
| 134 | prefix: [4]Prefix, | ||
| 135 | spec: Spec, | ||
| 136 | suffix: [4]Suffix, | ||
| 137 | idx: usize, | ||
| 138 | |||
| 139 | pub fn init(param_str: []const u8) TypeIterator { | ||
| 140 | return .{ | ||
| 141 | .param_str = param_str, | ||
| 142 | .prefix = undefined, | ||
| 143 | .spec = undefined, | ||
| 144 | .suffix = undefined, | ||
| 145 | .idx = 0, | ||
| 146 | }; | ||
| 147 | } | ||
| 148 | |||
| 149 | /// Returned `TypeDescription` contains fields which are slices into the underlying `TypeIterator` | ||
| 150 | /// The returned value is invalidated when `.next()` is called again or the TypeIterator goes out | ||
| 151 | // of scope. | ||
| 152 | pub fn next(self: *TypeIterator) ?TypeDescription { | ||
| 153 | var it = ComponentIterator.init(self.param_str[self.idx..]); | ||
| 154 | defer self.idx += it.idx; | ||
| 155 | |||
| 156 | var prefix_count: usize = 0; | ||
| 157 | var maybe_spec: ?Spec = null; | ||
| 158 | var suffix_count: usize = 0; | ||
| 159 | while (it.peek()) |component| { | ||
| 160 | switch (component) { | ||
| 161 | .prefix => |prefix| { | ||
| 162 | if (maybe_spec != null) break; | ||
| 163 | self.prefix[prefix_count] = prefix; | ||
| 164 | prefix_count += 1; | ||
| 165 | }, | ||
| 166 | .spec => |spec| { | ||
| 167 | if (maybe_spec != null) break; | ||
| 168 | maybe_spec = spec; | ||
| 169 | }, | ||
| 170 | .suffix => |suffix| { | ||
| 171 | std.debug.assert(maybe_spec != null); | ||
| 172 | self.suffix[suffix_count] = suffix; | ||
| 173 | suffix_count += 1; | ||
| 174 | }, | ||
| 175 | } | ||
| 176 | _ = it.next(); | ||
| 177 | } | ||
| 178 | if (maybe_spec) |spec| { | ||
| 179 | return TypeDescription{ | ||
| 180 | .prefix = self.prefix[0..prefix_count], | ||
| 181 | .spec = spec, | ||
| 182 | .suffix = self.suffix[0..suffix_count], | ||
| 183 | }; | ||
| 184 | } | ||
| 185 | return null; | ||
| 186 | } | ||
| 187 | }; | ||
| 188 | |||
| 189 | const Prefix = enum { | ||
| 190 | /// long (e.g. Li for 'long int', Ld for 'long double') | ||
| 191 | L, | ||
| 192 | /// long long (e.g. LLi for 'long long int', LLd for __float128) | ||
| 193 | LL, | ||
| 194 | /// __int128_t (e.g. LLLi) | ||
| 195 | LLL, | ||
| 196 | /// int32_t (require a native 32-bit integer type on the target) | ||
| 197 | Z, | ||
| 198 | /// int64_t (require a native 64-bit integer type on the target) | ||
| 199 | W, | ||
| 200 | /// 'int' size if target is LP64, 'L' otherwise. | ||
| 201 | N, | ||
| 202 | /// long for OpenCL targets, long long otherwise. | ||
| 203 | O, | ||
| 204 | /// signed | ||
| 205 | S, | ||
| 206 | /// unsigned | ||
| 207 | U, | ||
| 208 | /// Required to constant fold to an integer constant expression. | ||
| 209 | I, | ||
| 210 | }; | ||
| 211 | |||
| 212 | const Spec = union(enum) { | ||
| 213 | /// void | ||
| 214 | v, | ||
| 215 | /// boolean | ||
| 216 | b, | ||
| 217 | /// char | ||
| 218 | c, | ||
| 219 | /// short | ||
| 220 | s, | ||
| 221 | /// int | ||
| 222 | i, | ||
| 223 | /// half (__fp16, OpenCL) | ||
| 224 | h, | ||
| 225 | /// half (_Float16) | ||
| 226 | x, | ||
| 227 | /// half (__bf16) | ||
| 228 | y, | ||
| 229 | /// float | ||
| 230 | f, | ||
| 231 | /// double | ||
| 232 | d, | ||
| 233 | /// size_t | ||
| 234 | z, | ||
| 235 | /// wchar_t | ||
| 236 | w, | ||
| 237 | /// constant CFString | ||
| 238 | F, | ||
| 239 | /// id | ||
| 240 | G, | ||
| 241 | /// SEL | ||
| 242 | H, | ||
| 243 | /// struct objc_super | ||
| 244 | M, | ||
| 245 | /// __builtin_va_list | ||
| 246 | a, | ||
| 247 | /// "reference" to __builtin_va_list | ||
| 248 | A, | ||
| 249 | /// Vector, followed by the number of elements and the base type. | ||
| 250 | V: u32, | ||
| 251 | /// Scalable vector, followed by the number of elements and the base type. | ||
| 252 | q: u32, | ||
| 253 | /// ext_vector, followed by the number of elements and the base type. | ||
| 254 | E: u32, | ||
| 255 | /// _Complex, followed by the base type. | ||
| 256 | X: enum { | ||
| 257 | float, | ||
| 258 | double, | ||
| 259 | longdouble, | ||
| 260 | }, | ||
| 261 | /// ptrdiff_t | ||
| 262 | Y, | ||
| 263 | /// FILE | ||
| 264 | P, | ||
| 265 | /// jmp_buf | ||
| 266 | J, | ||
| 267 | /// sigjmp_buf | ||
| 268 | SJ, | ||
| 269 | /// ucontext_t | ||
| 270 | K, | ||
| 271 | /// pid_t | ||
| 272 | p, | ||
| 273 | /// Used to indicate a builtin with target-dependent param types. Must appear by itself | ||
| 274 | @"!", | ||
| 275 | }; | ||
| 276 | |||
| 277 | const Suffix = union(enum) { | ||
| 278 | /// pointer (optionally followed by an address space number,if no address space is specified than any address space will be accepted) | ||
| 279 | @"*": ?u8, | ||
| 280 | /// const | ||
| 281 | C, | ||
| 282 | /// volatile | ||
| 283 | D, | ||
| 284 | /// restrict | ||
| 285 | R, | ||
| 286 | }; | ||
deps/aro/aro/CodeGen.zig created+1295| ... | @@ -0,0 +1,1295 @@ | ||
| 1 | const std = @import("std"); | ||
| 2 | const Allocator = std.mem.Allocator; | ||
| 3 | const assert = std.debug.assert; | ||
| 4 | const backend = @import("backend"); | ||
| 5 | const Interner = backend.Interner; | ||
| 6 | const Ir = backend.Ir; | ||
| 7 | const Builtins = @import("Builtins.zig"); | ||
| 8 | const Builtin = Builtins.Builtin; | ||
| 9 | const Compilation = @import("Compilation.zig"); | ||
| 10 | const Builder = Ir.Builder; | ||
| 11 | const StrInt = @import("StringInterner.zig"); | ||
| 12 | const StringId = StrInt.StringId; | ||
| 13 | const Tree = @import("Tree.zig"); | ||
| 14 | const NodeIndex = Tree.NodeIndex; | ||
| 15 | const Type = @import("Type.zig"); | ||
| 16 | const Value = @import("Value.zig"); | ||
| 17 | |||
| 18 | const WipSwitch = struct { | ||
| 19 | cases: Cases = .{}, | ||
| 20 | default: ?Ir.Ref = null, | ||
| 21 | size: u64, | ||
| 22 | |||
| 23 | const Cases = std.MultiArrayList(struct { | ||
| 24 | val: Interner.Ref, | ||
| 25 | label: Ir.Ref, | ||
| 26 | }); | ||
| 27 | }; | ||
| 28 | |||
| 29 | const Symbol = struct { | ||
| 30 | name: StringId, | ||
| 31 | val: Ir.Ref, | ||
| 32 | }; | ||
| 33 | |||
| 34 | const Error = Compilation.Error; | ||
| 35 | |||
| 36 | const CodeGen = @This(); | ||
| 37 | |||
| 38 | tree: Tree, | ||
| 39 | comp: *Compilation, | ||
| 40 | builder: Builder, | ||
| 41 | node_tag: []const Tree.Tag, | ||
| 42 | node_data: []const Tree.Node.Data, | ||
| 43 | node_ty: []const Type, | ||
| 44 | wip_switch: *WipSwitch = undefined, | ||
| 45 | symbols: std.ArrayListUnmanaged(Symbol) = .{}, | ||
| 46 | ret_nodes: std.ArrayListUnmanaged(Ir.Inst.Phi.Input) = .{}, | ||
| 47 | phi_nodes: std.ArrayListUnmanaged(Ir.Inst.Phi.Input) = .{}, | ||
| 48 | record_elem_buf: std.ArrayListUnmanaged(Interner.Ref) = .{}, | ||
| 49 | record_cache: std.AutoHashMapUnmanaged(*Type.Record, Interner.Ref) = .{}, | ||
| 50 | cond_dummy_ty: ?Interner.Ref = null, | ||
| 51 | bool_invert: bool = false, | ||
| 52 | bool_end_label: Ir.Ref = .none, | ||
| 53 | cond_dummy_ref: Ir.Ref = undefined, | ||
| 54 | continue_label: Ir.Ref = undefined, | ||
| 55 | break_label: Ir.Ref = undefined, | ||
| 56 | return_label: Ir.Ref = undefined, | ||
| 57 | |||
| 58 | fn fail(c: *CodeGen, comptime fmt: []const u8, args: anytype) error{ FatalError, OutOfMemory } { | ||
| 59 | try c.comp.diagnostics.list.append(c.comp.gpa, .{ | ||
| 60 | .tag = .cli_error, | ||
| 61 | .kind = .@"fatal error", | ||
| 62 | .extra = .{ .str = try std.fmt.allocPrint(c.comp.diagnostics.arena.allocator(), fmt, args) }, | ||
| 63 | }); | ||
| 64 | return error.FatalError; | ||
| 65 | } | ||
| 66 | |||
| 67 | pub fn genIr(tree: Tree) Compilation.Error!Ir { | ||
| 68 | const gpa = tree.comp.gpa; | ||
| 69 | var c = CodeGen{ | ||
| 70 | .builder = .{ | ||
| 71 | .gpa = tree.comp.gpa, | ||
| 72 | .interner = &tree.comp.interner, | ||
| 73 | .arena = std.heap.ArenaAllocator.init(gpa), | ||
| 74 | }, | ||
| 75 | .tree = tree, | ||
| 76 | .comp = tree.comp, | ||
| 77 | .node_tag = tree.nodes.items(.tag), | ||
| 78 | .node_data = tree.nodes.items(.data), | ||
| 79 | .node_ty = tree.nodes.items(.ty), | ||
| 80 | }; | ||
| 81 | defer c.symbols.deinit(gpa); | ||
| 82 | defer c.ret_nodes.deinit(gpa); | ||
| 83 | defer c.phi_nodes.deinit(gpa); | ||
| 84 | defer c.record_elem_buf.deinit(gpa); | ||
| 85 | defer c.record_cache.deinit(gpa); | ||
| 86 | defer c.builder.deinit(); | ||
| 87 | |||
| 88 | const node_tags = tree.nodes.items(.tag); | ||
| 89 | for (tree.root_decls) |decl| { | ||
| 90 | c.builder.arena.deinit(); | ||
| 91 | c.builder.arena = std.heap.ArenaAllocator.init(gpa); | ||
| 92 | |||
| 93 | switch (node_tags[@intFromEnum(decl)]) { | ||
| 94 | .static_assert, | ||
| 95 | .typedef, | ||
| 96 | .struct_decl_two, | ||
| 97 | .union_decl_two, | ||
| 98 | .enum_decl_two, | ||
| 99 | .struct_decl, | ||
| 100 | .union_decl, | ||
| 101 | .enum_decl, | ||
| 102 | => {}, | ||
| 103 | |||
| 104 | .fn_proto, | ||
| 105 | .static_fn_proto, | ||
| 106 | .inline_fn_proto, | ||
| 107 | .inline_static_fn_proto, | ||
| 108 | .extern_var, | ||
| 109 | .threadlocal_extern_var, | ||
| 110 | => {}, | ||
| 111 | |||
| 112 | .fn_def, | ||
| 113 | .static_fn_def, | ||
| 114 | .inline_fn_def, | ||
| 115 | .inline_static_fn_def, | ||
| 116 | => c.genFn(decl) catch |err| switch (err) { | ||
| 117 | error.FatalError => return error.FatalError, | ||
| 118 | error.OutOfMemory => return error.OutOfMemory, | ||
| 119 | }, | ||
| 120 | |||
| 121 | .@"var", | ||
| 122 | .static_var, | ||
| 123 | .threadlocal_var, | ||
| 124 | .threadlocal_static_var, | ||
| 125 | => c.genVar(decl) catch |err| switch (err) { | ||
| 126 | error.FatalError => return error.FatalError, | ||
| 127 | error.OutOfMemory => return error.OutOfMemory, | ||
| 128 | }, | ||
| 129 | else => unreachable, | ||
| 130 | } | ||
| 131 | } | ||
| 132 | return c.builder.finish(); | ||
| 133 | } | ||
| 134 | |||
| 135 | fn genType(c: *CodeGen, base_ty: Type) !Interner.Ref { | ||
| 136 | var key: Interner.Key = undefined; | ||
| 137 | const ty = base_ty.canonicalize(.standard); | ||
| 138 | switch (ty.specifier) { | ||
| 139 | .void => return .void, | ||
| 140 | .bool => return .i1, | ||
| 141 | .@"struct" => { | ||
| 142 | if (c.record_cache.get(ty.data.record)) |some| return some; | ||
| 143 | |||
| 144 | const elem_buf_top = c.record_elem_buf.items.len; | ||
| 145 | defer c.record_elem_buf.items.len = elem_buf_top; | ||
| 146 | |||
| 147 | for (ty.data.record.fields) |field| { | ||
| 148 | if (!field.isRegularField()) { | ||
| 149 | return c.fail("TODO lower struct bitfields", .{}); | ||
| 150 | } | ||
| 151 | // TODO handle padding bits | ||
| 152 | const field_ref = try c.genType(field.ty); | ||
| 153 | try c.record_elem_buf.append(c.builder.gpa, field_ref); | ||
| 154 | } | ||
| 155 | |||
| 156 | return c.builder.interner.put(c.builder.gpa, .{ | ||
| 157 | .record_ty = c.record_elem_buf.items[elem_buf_top..], | ||
| 158 | }); | ||
| 159 | }, | ||
| 160 | .@"union" => { | ||
| 161 | return c.fail("TODO lower union types", .{}); | ||
| 162 | }, | ||
| 163 | else => {}, | ||
| 164 | } | ||
| 165 | if (ty.isPtr()) return .ptr; | ||
| 166 | if (ty.isFunc()) return .func; | ||
| 167 | if (!ty.isReal()) return c.fail("TODO lower complex types", .{}); | ||
| 168 | if (ty.isInt()) { | ||
| 169 | const bits = ty.bitSizeof(c.comp).?; | ||
| 170 | key = .{ .int_ty = @intCast(bits) }; | ||
| 171 | } else if (ty.isFloat()) { | ||
| 172 | const bits = ty.bitSizeof(c.comp).?; | ||
| 173 | key = .{ .float_ty = @intCast(bits) }; | ||
| 174 | } else if (ty.isArray()) { | ||
| 175 | const elem = try c.genType(ty.elemType()); | ||
| 176 | key = .{ .array_ty = .{ .child = elem, .len = ty.arrayLen().? } }; | ||
| 177 | } else if (ty.specifier == .vector) { | ||
| 178 | const elem = try c.genType(ty.elemType()); | ||
| 179 | key = .{ .vector_ty = .{ .child = elem, .len = @intCast(ty.data.array.len) } }; | ||
| 180 | } else if (ty.is(.nullptr_t)) { | ||
| 181 | return c.fail("TODO lower nullptr_t", .{}); | ||
| 182 | } | ||
| 183 | return c.builder.interner.put(c.builder.gpa, key); | ||
| 184 | } | ||
| 185 | |||
| 186 | fn genFn(c: *CodeGen, decl: NodeIndex) Error!void { | ||
| 187 | const name = c.tree.tokSlice(c.node_data[@intFromEnum(decl)].decl.name); | ||
| 188 | const func_ty = c.node_ty[@intFromEnum(decl)].canonicalize(.standard); | ||
| 189 | c.ret_nodes.items.len = 0; | ||
| 190 | |||
| 191 | try c.builder.startFn(); | ||
| 192 | |||
| 193 | for (func_ty.data.func.params) |param| { | ||
| 194 | // TODO handle calling convention here | ||
| 195 | const arg = try c.builder.addArg(try c.genType(param.ty)); | ||
| 196 | |||
| 197 | const size: u32 = @intCast(param.ty.sizeof(c.comp).?); // TODO add error in parser | ||
| 198 | const @"align" = param.ty.alignof(c.comp); | ||
| 199 | const alloc = try c.builder.addAlloc(size, @"align"); | ||
| 200 | try c.builder.addStore(alloc, arg); | ||
| 201 | try c.symbols.append(c.comp.gpa, .{ .name = param.name, .val = alloc }); | ||
| 202 | } | ||
| 203 | |||
| 204 | // Generate body | ||
| 205 | c.return_label = try c.builder.makeLabel("return"); | ||
| 206 | try c.genStmt(c.node_data[@intFromEnum(decl)].decl.node); | ||
| 207 | |||
| 208 | // Relocate returns | ||
| 209 | if (c.ret_nodes.items.len == 0) { | ||
| 210 | _ = try c.builder.addInst(.ret, .{ .un = .none }, .noreturn); | ||
| 211 | } else if (c.ret_nodes.items.len == 1) { | ||
| 212 | c.builder.body.items.len -= 1; | ||
| 213 | _ = try c.builder.addInst(.ret, .{ .un = c.ret_nodes.items[0].value }, .noreturn); | ||
| 214 | } else { | ||
| 215 | try c.builder.startBlock(c.return_label); | ||
| 216 | const phi = try c.builder.addPhi(c.ret_nodes.items, try c.genType(func_ty.returnType())); | ||
| 217 | _ = try c.builder.addInst(.ret, .{ .un = phi }, .noreturn); | ||
| 218 | } | ||
| 219 | |||
| 220 | try c.builder.finishFn(name); | ||
| 221 | } | ||
| 222 | |||
| 223 | fn addUn(c: *CodeGen, tag: Ir.Inst.Tag, operand: Ir.Ref, ty: Type) !Ir.Ref { | ||
| 224 | return c.builder.addInst(tag, .{ .un = operand }, try c.genType(ty)); | ||
| 225 | } | ||
| 226 | |||
| 227 | fn addBin(c: *CodeGen, tag: Ir.Inst.Tag, lhs: Ir.Ref, rhs: Ir.Ref, ty: Type) !Ir.Ref { | ||
| 228 | return c.builder.addInst(tag, .{ .bin = .{ .lhs = lhs, .rhs = rhs } }, try c.genType(ty)); | ||
| 229 | } | ||
| 230 | |||
| 231 | fn addBranch(c: *CodeGen, cond: Ir.Ref, true_label: Ir.Ref, false_label: Ir.Ref) !void { | ||
| 232 | if (true_label == c.bool_end_label) { | ||
| 233 | if (false_label == c.bool_end_label) { | ||
| 234 | try c.phi_nodes.append(c.comp.gpa, .{ .label = c.builder.current_label, .value = cond }); | ||
| 235 | return; | ||
| 236 | } | ||
| 237 | try c.addBoolPhi(!c.bool_invert); | ||
| 238 | } | ||
| 239 | if (false_label == c.bool_end_label) { | ||
| 240 | try c.addBoolPhi(c.bool_invert); | ||
| 241 | } | ||
| 242 | return c.builder.addBranch(cond, true_label, false_label); | ||
| 243 | } | ||
| 244 | |||
| 245 | fn addBoolPhi(c: *CodeGen, value: bool) !void { | ||
| 246 | const val = try c.builder.addConstant((try Value.int(@intFromBool(value), c.comp)).ref(), .i1); | ||
| 247 | try c.phi_nodes.append(c.comp.gpa, .{ .label = c.builder.current_label, .value = val }); | ||
| 248 | } | ||
| 249 | |||
| 250 | fn genStmt(c: *CodeGen, node: NodeIndex) Error!void { | ||
| 251 | _ = try c.genExpr(node); | ||
| 252 | } | ||
| 253 | |||
| 254 | fn genExpr(c: *CodeGen, node: NodeIndex) Error!Ir.Ref { | ||
| 255 | std.debug.assert(node != .none); | ||
| 256 | const ty = c.node_ty[@intFromEnum(node)]; | ||
| 257 | if (c.tree.value_map.get(node)) |val| { | ||
| 258 | return c.builder.addConstant(val.ref(), try c.genType(ty)); | ||
| 259 | } | ||
| 260 | const data = c.node_data[@intFromEnum(node)]; | ||
| 261 | switch (c.node_tag[@intFromEnum(node)]) { | ||
| 262 | .enumeration_ref, | ||
| 263 | .bool_literal, | ||
| 264 | .int_literal, | ||
| 265 | .char_literal, | ||
| 266 | .float_literal, | ||
| 267 | .imaginary_literal, | ||
| 268 | .string_literal_expr, | ||
| 269 | .alignof_expr, | ||
| 270 | => unreachable, // These should have an entry in value_map. | ||
| 271 | .fn_def, | ||
| 272 | .static_fn_def, | ||
| 273 | .inline_fn_def, | ||
| 274 | .inline_static_fn_def, | ||
| 275 | .invalid, | ||
| 276 | .threadlocal_var, | ||
| 277 | => unreachable, | ||
| 278 | .static_assert, | ||
| 279 | .fn_proto, | ||
| 280 | .static_fn_proto, | ||
| 281 | .inline_fn_proto, | ||
| 282 | .inline_static_fn_proto, | ||
| 283 | .extern_var, | ||
| 284 | .threadlocal_extern_var, | ||
| 285 | .typedef, | ||
| 286 | .struct_decl_two, | ||
| 287 | .union_decl_two, | ||
| 288 | .enum_decl_two, | ||
| 289 | .struct_decl, | ||
| 290 | .union_decl, | ||
| 291 | .enum_decl, | ||
| 292 | .enum_field_decl, | ||
| 293 | .record_field_decl, | ||
| 294 | .indirect_record_field_decl, | ||
| 295 | .struct_forward_decl, | ||
| 296 | .union_forward_decl, | ||
| 297 | .enum_forward_decl, | ||
| 298 | .null_stmt, | ||
| 299 | => {}, | ||
| 300 | .static_var, | ||
| 301 | .implicit_static_var, | ||
| 302 | .threadlocal_static_var, | ||
| 303 | => try c.genVar(node), // TODO | ||
| 304 | .@"var" => { | ||
| 305 | const size: u32 = @intCast(ty.sizeof(c.comp).?); // TODO add error in parser | ||
| 306 | const @"align" = ty.alignof(c.comp); | ||
| 307 | const alloc = try c.builder.addAlloc(size, @"align"); | ||
| 308 | const name = try StrInt.intern(c.comp, c.tree.tokSlice(data.decl.name)); | ||
| 309 | try c.symbols.append(c.comp.gpa, .{ .name = name, .val = alloc }); | ||
| 310 | if (data.decl.node != .none) { | ||
| 311 | try c.genInitializer(alloc, ty, data.decl.node); | ||
| 312 | } | ||
| 313 | }, | ||
| 314 | .labeled_stmt => { | ||
| 315 | const label = try c.builder.makeLabel("label"); | ||
| 316 | try c.builder.startBlock(label); | ||
| 317 | try c.genStmt(data.decl.node); | ||
| 318 | }, | ||
| 319 | .compound_stmt_two => { | ||
| 320 | const old_sym_len = c.symbols.items.len; | ||
| 321 | c.symbols.items.len = old_sym_len; | ||
| 322 | |||
| 323 | if (data.bin.lhs != .none) try c.genStmt(data.bin.lhs); | ||
| 324 | if (data.bin.rhs != .none) try c.genStmt(data.bin.rhs); | ||
| 325 | }, | ||
| 326 | .compound_stmt => { | ||
| 327 | const old_sym_len = c.symbols.items.len; | ||
| 328 | c.symbols.items.len = old_sym_len; | ||
| 329 | |||
| 330 | for (c.tree.data[data.range.start..data.range.end]) |stmt| try c.genStmt(stmt); | ||
| 331 | }, | ||
| 332 | .if_then_else_stmt => { | ||
| 333 | const then_label = try c.builder.makeLabel("if.then"); | ||
| 334 | const else_label = try c.builder.makeLabel("if.else"); | ||
| 335 | const end_label = try c.builder.makeLabel("if.end"); | ||
| 336 | |||
| 337 | try c.genBoolExpr(data.if3.cond, then_label, else_label); | ||
| 338 | |||
| 339 | try c.builder.startBlock(then_label); | ||
| 340 | try c.genStmt(c.tree.data[data.if3.body]); // then | ||
| 341 | try c.builder.addJump(end_label); | ||
| 342 | |||
| 343 | try c.builder.startBlock(else_label); | ||
| 344 | try c.genStmt(c.tree.data[data.if3.body + 1]); // else | ||
| 345 | |||
| 346 | try c.builder.startBlock(end_label); | ||
| 347 | }, | ||
| 348 | .if_then_stmt => { | ||
| 349 | const then_label = try c.builder.makeLabel("if.then"); | ||
| 350 | const end_label = try c.builder.makeLabel("if.end"); | ||
| 351 | |||
| 352 | try c.genBoolExpr(data.bin.lhs, then_label, end_label); | ||
| 353 | |||
| 354 | try c.builder.startBlock(then_label); | ||
| 355 | try c.genStmt(data.bin.rhs); // then | ||
| 356 | try c.builder.startBlock(end_label); | ||
| 357 | }, | ||
| 358 | .switch_stmt => { | ||
| 359 | var wip_switch = WipSwitch{ | ||
| 360 | .size = c.node_ty[@intFromEnum(data.bin.lhs)].sizeof(c.comp).?, | ||
| 361 | }; | ||
| 362 | defer wip_switch.cases.deinit(c.builder.gpa); | ||
| 363 | |||
| 364 | const old_wip_switch = c.wip_switch; | ||
| 365 | defer c.wip_switch = old_wip_switch; | ||
| 366 | c.wip_switch = &wip_switch; | ||
| 367 | |||
| 368 | const old_break_label = c.break_label; | ||
| 369 | defer c.break_label = old_break_label; | ||
| 370 | const end_ref = try c.builder.makeLabel("switch.end"); | ||
| 371 | c.break_label = end_ref; | ||
| 372 | |||
| 373 | const cond = try c.genExpr(data.bin.lhs); | ||
| 374 | const switch_index = c.builder.instructions.len; | ||
| 375 | _ = try c.builder.addInst(.@"switch", undefined, .noreturn); | ||
| 376 | |||
| 377 | try c.genStmt(data.bin.rhs); // body | ||
| 378 | |||
| 379 | const default_ref = wip_switch.default orelse end_ref; | ||
| 380 | try c.builder.startBlock(end_ref); | ||
| 381 | |||
| 382 | const a = c.builder.arena.allocator(); | ||
| 383 | const switch_data = try a.create(Ir.Inst.Switch); | ||
| 384 | switch_data.* = .{ | ||
| 385 | .target = cond, | ||
| 386 | .cases_len = @intCast(wip_switch.cases.len), | ||
| 387 | .case_vals = (try a.dupe(Interner.Ref, wip_switch.cases.items(.val))).ptr, | ||
| 388 | .case_labels = (try a.dupe(Ir.Ref, wip_switch.cases.items(.label))).ptr, | ||
| 389 | .default = default_ref, | ||
| 390 | }; | ||
| 391 | c.builder.instructions.items(.data)[switch_index] = .{ .@"switch" = switch_data }; | ||
| 392 | }, | ||
| 393 | .case_stmt => { | ||
| 394 | const val = c.tree.value_map.get(data.bin.lhs).?; | ||
| 395 | const label = try c.builder.makeLabel("case"); | ||
| 396 | try c.builder.startBlock(label); | ||
| 397 | try c.wip_switch.cases.append(c.builder.gpa, .{ | ||
| 398 | .val = val.ref(), | ||
| 399 | .label = label, | ||
| 400 | }); | ||
| 401 | try c.genStmt(data.bin.rhs); | ||
| 402 | }, | ||
| 403 | .default_stmt => { | ||
| 404 | const default = try c.builder.makeLabel("default"); | ||
| 405 | try c.builder.startBlock(default); | ||
| 406 | c.wip_switch.default = default; | ||
| 407 | try c.genStmt(data.un); | ||
| 408 | }, | ||
| 409 | .while_stmt => { | ||
| 410 | const old_break_label = c.break_label; | ||
| 411 | defer c.break_label = old_break_label; | ||
| 412 | |||
| 413 | const old_continue_label = c.continue_label; | ||
| 414 | defer c.continue_label = old_continue_label; | ||
| 415 | |||
| 416 | const cond_label = try c.builder.makeLabel("while.cond"); | ||
| 417 | const then_label = try c.builder.makeLabel("while.then"); | ||
| 418 | const end_label = try c.builder.makeLabel("while.end"); | ||
| 419 | |||
| 420 | c.continue_label = cond_label; | ||
| 421 | c.break_label = end_label; | ||
| 422 | |||
| 423 | try c.builder.startBlock(cond_label); | ||
| 424 | try c.genBoolExpr(data.bin.lhs, then_label, end_label); | ||
| 425 | |||
| 426 | try c.builder.startBlock(then_label); | ||
| 427 | try c.genStmt(data.bin.rhs); | ||
| 428 | try c.builder.addJump(cond_label); | ||
| 429 | try c.builder.startBlock(end_label); | ||
| 430 | }, | ||
| 431 | .do_while_stmt => { | ||
| 432 | const old_break_label = c.break_label; | ||
| 433 | defer c.break_label = old_break_label; | ||
| 434 | |||
| 435 | const old_continue_label = c.continue_label; | ||
| 436 | defer c.continue_label = old_continue_label; | ||
| 437 | |||
| 438 | const then_label = try c.builder.makeLabel("do.then"); | ||
| 439 | const cond_label = try c.builder.makeLabel("do.cond"); | ||
| 440 | const end_label = try c.builder.makeLabel("do.end"); | ||
| 441 | |||
| 442 | c.continue_label = cond_label; | ||
| 443 | c.break_label = end_label; | ||
| 444 | |||
| 445 | try c.builder.startBlock(then_label); | ||
| 446 | try c.genStmt(data.bin.rhs); | ||
| 447 | |||
| 448 | try c.builder.startBlock(cond_label); | ||
| 449 | try c.genBoolExpr(data.bin.lhs, then_label, end_label); | ||
| 450 | |||
| 451 | try c.builder.startBlock(end_label); | ||
| 452 | }, | ||
| 453 | .for_decl_stmt => { | ||
| 454 | const old_break_label = c.break_label; | ||
| 455 | defer c.break_label = old_break_label; | ||
| 456 | |||
| 457 | const old_continue_label = c.continue_label; | ||
| 458 | defer c.continue_label = old_continue_label; | ||
| 459 | |||
| 460 | const for_decl = data.forDecl(&c.tree); | ||
| 461 | for (for_decl.decls) |decl| try c.genStmt(decl); | ||
| 462 | |||
| 463 | const then_label = try c.builder.makeLabel("for.then"); | ||
| 464 | var cond_label = then_label; | ||
| 465 | const cont_label = try c.builder.makeLabel("for.cont"); | ||
| 466 | const end_label = try c.builder.makeLabel("for.end"); | ||
| 467 | |||
| 468 | c.continue_label = cont_label; | ||
| 469 | c.break_label = end_label; | ||
| 470 | |||
| 471 | if (for_decl.cond != .none) { | ||
| 472 | cond_label = try c.builder.makeLabel("for.cond"); | ||
| 473 | try c.builder.startBlock(cond_label); | ||
| 474 | try c.genBoolExpr(for_decl.cond, then_label, end_label); | ||
| 475 | } | ||
| 476 | try c.builder.startBlock(then_label); | ||
| 477 | try c.genStmt(for_decl.body); | ||
| 478 | if (for_decl.incr != .none) { | ||
| 479 | _ = try c.genExpr(for_decl.incr); | ||
| 480 | } | ||
| 481 | try c.builder.addJump(cond_label); | ||
| 482 | try c.builder.startBlock(end_label); | ||
| 483 | }, | ||
| 484 | .forever_stmt => { | ||
| 485 | const old_break_label = c.break_label; | ||
| 486 | defer c.break_label = old_break_label; | ||
| 487 | |||
| 488 | const old_continue_label = c.continue_label; | ||
| 489 | defer c.continue_label = old_continue_label; | ||
| 490 | |||
| 491 | const then_label = try c.builder.makeLabel("for.then"); | ||
| 492 | const end_label = try c.builder.makeLabel("for.end"); | ||
| 493 | |||
| 494 | c.continue_label = then_label; | ||
| 495 | c.break_label = end_label; | ||
| 496 | |||
| 497 | try c.builder.startBlock(then_label); | ||
| 498 | try c.genStmt(data.un); | ||
| 499 | try c.builder.startBlock(end_label); | ||
| 500 | }, | ||
| 501 | .for_stmt => { | ||
| 502 | const old_break_label = c.break_label; | ||
| 503 | defer c.break_label = old_break_label; | ||
| 504 | |||
| 505 | const old_continue_label = c.continue_label; | ||
| 506 | defer c.continue_label = old_continue_label; | ||
| 507 | |||
| 508 | const for_stmt = data.forStmt(&c.tree); | ||
| 509 | if (for_stmt.init != .none) _ = try c.genExpr(for_stmt.init); | ||
| 510 | |||
| 511 | const then_label = try c.builder.makeLabel("for.then"); | ||
| 512 | var cond_label = then_label; | ||
| 513 | const cont_label = try c.builder.makeLabel("for.cont"); | ||
| 514 | const end_label = try c.builder.makeLabel("for.end"); | ||
| 515 | |||
| 516 | c.continue_label = cont_label; | ||
| 517 | c.break_label = end_label; | ||
| 518 | |||
| 519 | if (for_stmt.cond != .none) { | ||
| 520 | cond_label = try c.builder.makeLabel("for.cond"); | ||
| 521 | try c.builder.startBlock(cond_label); | ||
| 522 | try c.genBoolExpr(for_stmt.cond, then_label, end_label); | ||
| 523 | } | ||
| 524 | try c.builder.startBlock(then_label); | ||
| 525 | try c.genStmt(for_stmt.body); | ||
| 526 | if (for_stmt.incr != .none) { | ||
| 527 | _ = try c.genExpr(for_stmt.incr); | ||
| 528 | } | ||
| 529 | try c.builder.addJump(cond_label); | ||
| 530 | try c.builder.startBlock(end_label); | ||
| 531 | }, | ||
| 532 | .continue_stmt => try c.builder.addJump(c.continue_label), | ||
| 533 | .break_stmt => try c.builder.addJump(c.break_label), | ||
| 534 | .return_stmt => { | ||
| 535 | if (data.un != .none) { | ||
| 536 | const operand = try c.genExpr(data.un); | ||
| 537 | try c.ret_nodes.append(c.comp.gpa, .{ .value = operand, .label = c.builder.current_label }); | ||
| 538 | } | ||
| 539 | try c.builder.addJump(c.return_label); | ||
| 540 | }, | ||
| 541 | .implicit_return => { | ||
| 542 | if (data.return_zero) { | ||
| 543 | const operand = try c.builder.addConstant(.zero, try c.genType(ty)); | ||
| 544 | try c.ret_nodes.append(c.comp.gpa, .{ .value = operand, .label = c.builder.current_label }); | ||
| 545 | } | ||
| 546 | // No need to emit a jump since implicit_return is always the last instruction. | ||
| 547 | }, | ||
| 548 | .case_range_stmt, | ||
| 549 | .goto_stmt, | ||
| 550 | .computed_goto_stmt, | ||
| 551 | .nullptr_literal, | ||
| 552 | => return c.fail("TODO CodeGen.genStmt {}\n", .{c.node_tag[@intFromEnum(node)]}), | ||
| 553 | .comma_expr => { | ||
| 554 | _ = try c.genExpr(data.bin.lhs); | ||
| 555 | return c.genExpr(data.bin.rhs); | ||
| 556 | }, | ||
| 557 | .assign_expr => { | ||
| 558 | const rhs = try c.genExpr(data.bin.rhs); | ||
| 559 | const lhs = try c.genLval(data.bin.lhs); | ||
| 560 | try c.builder.addStore(lhs, rhs); | ||
| 561 | return rhs; | ||
| 562 | }, | ||
| 563 | .mul_assign_expr => return c.genCompoundAssign(node, .mul), | ||
| 564 | .div_assign_expr => return c.genCompoundAssign(node, .div), | ||
| 565 | .mod_assign_expr => return c.genCompoundAssign(node, .mod), | ||
| 566 | .add_assign_expr => return c.genCompoundAssign(node, .add), | ||
| 567 | .sub_assign_expr => return c.genCompoundAssign(node, .sub), | ||
| 568 | .shl_assign_expr => return c.genCompoundAssign(node, .bit_shl), | ||
| 569 | .shr_assign_expr => return c.genCompoundAssign(node, .bit_shr), | ||
| 570 | .bit_and_assign_expr => return c.genCompoundAssign(node, .bit_and), | ||
| 571 | .bit_xor_assign_expr => return c.genCompoundAssign(node, .bit_xor), | ||
| 572 | .bit_or_assign_expr => return c.genCompoundAssign(node, .bit_or), | ||
| 573 | .bit_or_expr => return c.genBinOp(node, .bit_or), | ||
| 574 | .bit_xor_expr => return c.genBinOp(node, .bit_xor), | ||
| 575 | .bit_and_expr => return c.genBinOp(node, .bit_and), | ||
| 576 | .equal_expr => { | ||
| 577 | const cmp = try c.genComparison(node, .cmp_eq); | ||
| 578 | return c.addUn(.zext, cmp, ty); | ||
| 579 | }, | ||
| 580 | .not_equal_expr => { | ||
| 581 | const cmp = try c.genComparison(node, .cmp_ne); | ||
| 582 | return c.addUn(.zext, cmp, ty); | ||
| 583 | }, | ||
| 584 | .less_than_expr => { | ||
| 585 | const cmp = try c.genComparison(node, .cmp_lt); | ||
| 586 | return c.addUn(.zext, cmp, ty); | ||
| 587 | }, | ||
| 588 | .less_than_equal_expr => { | ||
| 589 | const cmp = try c.genComparison(node, .cmp_lte); | ||
| 590 | return c.addUn(.zext, cmp, ty); | ||
| 591 | }, | ||
| 592 | .greater_than_expr => { | ||
| 593 | const cmp = try c.genComparison(node, .cmp_gt); | ||
| 594 | return c.addUn(.zext, cmp, ty); | ||
| 595 | }, | ||
| 596 | .greater_than_equal_expr => { | ||
| 597 | const cmp = try c.genComparison(node, .cmp_gte); | ||
| 598 | return c.addUn(.zext, cmp, ty); | ||
| 599 | }, | ||
| 600 | .shl_expr => return c.genBinOp(node, .bit_shl), | ||
| 601 | .shr_expr => return c.genBinOp(node, .bit_shr), | ||
| 602 | .add_expr => { | ||
| 603 | if (ty.isPtr()) { | ||
| 604 | const lhs_ty = c.node_ty[@intFromEnum(data.bin.lhs)]; | ||
| 605 | if (lhs_ty.isPtr()) { | ||
| 606 | const ptr = try c.genExpr(data.bin.lhs); | ||
| 607 | const offset = try c.genExpr(data.bin.rhs); | ||
| 608 | const offset_ty = c.node_ty[@intFromEnum(data.bin.rhs)]; | ||
| 609 | return c.genPtrArithmetic(ptr, offset, offset_ty, ty); | ||
| 610 | } else { | ||
| 611 | const offset = try c.genExpr(data.bin.lhs); | ||
| 612 | const ptr = try c.genExpr(data.bin.rhs); | ||
| 613 | const offset_ty = lhs_ty; | ||
| 614 | return c.genPtrArithmetic(ptr, offset, offset_ty, ty); | ||
| 615 | } | ||
| 616 | } | ||
| 617 | return c.genBinOp(node, .add); | ||
| 618 | }, | ||
| 619 | .sub_expr => { | ||
| 620 | if (ty.isPtr()) { | ||
| 621 | const ptr = try c.genExpr(data.bin.lhs); | ||
| 622 | const offset = try c.genExpr(data.bin.rhs); | ||
| 623 | const offset_ty = c.node_ty[@intFromEnum(data.bin.rhs)]; | ||
| 624 | return c.genPtrArithmetic(ptr, offset, offset_ty, ty); | ||
| 625 | } | ||
| 626 | return c.genBinOp(node, .sub); | ||
| 627 | }, | ||
| 628 | .mul_expr => return c.genBinOp(node, .mul), | ||
| 629 | .div_expr => return c.genBinOp(node, .div), | ||
| 630 | .mod_expr => return c.genBinOp(node, .mod), | ||
| 631 | .addr_of_expr => return try c.genLval(data.un), | ||
| 632 | .deref_expr => { | ||
| 633 | const un_data = c.node_data[@intFromEnum(data.un)]; | ||
| 634 | if (c.node_tag[@intFromEnum(data.un)] == .implicit_cast and un_data.cast.kind == .function_to_pointer) { | ||
| 635 | return c.genExpr(data.un); | ||
| 636 | } | ||
| 637 | const operand = try c.genLval(data.un); | ||
| 638 | return c.addUn(.load, operand, ty); | ||
| 639 | }, | ||
| 640 | .plus_expr => return c.genExpr(data.un), | ||
| 641 | .negate_expr => { | ||
| 642 | const zero = try c.builder.addConstant(.zero, try c.genType(ty)); | ||
| 643 | const operand = try c.genExpr(data.un); | ||
| 644 | return c.addBin(.sub, zero, operand, ty); | ||
| 645 | }, | ||
| 646 | .bit_not_expr => { | ||
| 647 | const operand = try c.genExpr(data.un); | ||
| 648 | return c.addUn(.bit_not, operand, ty); | ||
| 649 | }, | ||
| 650 | .bool_not_expr => { | ||
| 651 | const zero = try c.builder.addConstant(.zero, try c.genType(ty)); | ||
| 652 | const operand = try c.genExpr(data.un); | ||
| 653 | return c.addBin(.cmp_ne, zero, operand, ty); | ||
| 654 | }, | ||
| 655 | .pre_inc_expr => { | ||
| 656 | const operand = try c.genLval(data.un); | ||
| 657 | const val = try c.addUn(.load, operand, ty); | ||
| 658 | const one = try c.builder.addConstant(.one, try c.genType(ty)); | ||
| 659 | const plus_one = try c.addBin(.add, val, one, ty); | ||
| 660 | try c.builder.addStore(operand, plus_one); | ||
| 661 | return plus_one; | ||
| 662 | }, | ||
| 663 | .pre_dec_expr => { | ||
| 664 | const operand = try c.genLval(data.un); | ||
| 665 | const val = try c.addUn(.load, operand, ty); | ||
| 666 | const one = try c.builder.addConstant(.one, try c.genType(ty)); | ||
| 667 | const plus_one = try c.addBin(.sub, val, one, ty); | ||
| 668 | try c.builder.addStore(operand, plus_one); | ||
| 669 | return plus_one; | ||
| 670 | }, | ||
| 671 | .post_inc_expr => { | ||
| 672 | const operand = try c.genLval(data.un); | ||
| 673 | const val = try c.addUn(.load, operand, ty); | ||
| 674 | const one = try c.builder.addConstant(.one, try c.genType(ty)); | ||
| 675 | const plus_one = try c.addBin(.add, val, one, ty); | ||
| 676 | try c.builder.addStore(operand, plus_one); | ||
| 677 | return val; | ||
| 678 | }, | ||
| 679 | .post_dec_expr => { | ||
| 680 | const operand = try c.genLval(data.un); | ||
| 681 | const val = try c.addUn(.load, operand, ty); | ||
| 682 | const one = try c.builder.addConstant(.one, try c.genType(ty)); | ||
| 683 | const plus_one = try c.addBin(.sub, val, one, ty); | ||
| 684 | try c.builder.addStore(operand, plus_one); | ||
| 685 | return val; | ||
| 686 | }, | ||
| 687 | .paren_expr => return c.genExpr(data.un), | ||
| 688 | .decl_ref_expr => unreachable, // Lval expression. | ||
| 689 | .explicit_cast, .implicit_cast => switch (data.cast.kind) { | ||
| 690 | .no_op => return c.genExpr(data.cast.operand), | ||
| 691 | .to_void => { | ||
| 692 | _ = try c.genExpr(data.cast.operand); | ||
| 693 | return .none; | ||
| 694 | }, | ||
| 695 | .lval_to_rval => { | ||
| 696 | const operand = try c.genLval(data.cast.operand); | ||
| 697 | return c.addUn(.load, operand, ty); | ||
| 698 | }, | ||
| 699 | .function_to_pointer, .array_to_pointer => { | ||
| 700 | return c.genLval(data.cast.operand); | ||
| 701 | }, | ||
| 702 | .int_cast => { | ||
| 703 | const operand = try c.genExpr(data.cast.operand); | ||
| 704 | const src_ty = c.node_ty[@intFromEnum(data.cast.operand)]; | ||
| 705 | const src_bits = src_ty.bitSizeof(c.comp).?; | ||
| 706 | const dest_bits = ty.bitSizeof(c.comp).?; | ||
| 707 | if (src_bits == dest_bits) { | ||
| 708 | return operand; | ||
| 709 | } else if (src_bits < dest_bits) { | ||
| 710 | if (src_ty.isUnsignedInt(c.comp)) | ||
| 711 | return c.addUn(.zext, operand, ty) | ||
| 712 | else | ||
| 713 | return c.addUn(.sext, operand, ty); | ||
| 714 | } else { | ||
| 715 | return c.addUn(.trunc, operand, ty); | ||
| 716 | } | ||
| 717 | }, | ||
| 718 | .bool_to_int => { | ||
| 719 | const operand = try c.genExpr(data.cast.operand); | ||
| 720 | return c.addUn(.zext, operand, ty); | ||
| 721 | }, | ||
| 722 | .pointer_to_bool, .int_to_bool, .float_to_bool => { | ||
| 723 | const lhs = try c.genExpr(data.cast.operand); | ||
| 724 | const rhs = try c.builder.addConstant(.zero, try c.genType(c.node_ty[@intFromEnum(node)])); | ||
| 725 | return c.builder.addInst(.cmp_ne, .{ .bin = .{ .lhs = lhs, .rhs = rhs } }, .i1); | ||
| 726 | }, | ||
| 727 | .bitcast, | ||
| 728 | .pointer_to_int, | ||
| 729 | .bool_to_float, | ||
| 730 | .bool_to_pointer, | ||
| 731 | .int_to_float, | ||
| 732 | .complex_int_to_complex_float, | ||
| 733 | .int_to_pointer, | ||
| 734 | .float_to_int, | ||
| 735 | .complex_float_to_complex_int, | ||
| 736 | .complex_int_cast, | ||
| 737 | .complex_int_to_real, | ||
| 738 | .real_to_complex_int, | ||
| 739 | .float_cast, | ||
| 740 | .complex_float_cast, | ||
| 741 | .complex_float_to_real, | ||
| 742 | .real_to_complex_float, | ||
| 743 | .null_to_pointer, | ||
| 744 | .union_cast, | ||
| 745 | .vector_splat, | ||
| 746 | => return c.fail("TODO CodeGen gen CastKind {}\n", .{data.cast.kind}), | ||
| 747 | }, | ||
| 748 | .binary_cond_expr => { | ||
| 749 | if (c.tree.value_map.get(data.if3.cond)) |cond| { | ||
| 750 | if (cond.toBool(c.comp)) { | ||
| 751 | c.cond_dummy_ref = try c.genExpr(data.if3.cond); | ||
| 752 | return c.genExpr(c.tree.data[data.if3.body]); // then | ||
| 753 | } else { | ||
| 754 | return c.genExpr(c.tree.data[data.if3.body + 1]); // else | ||
| 755 | } | ||
| 756 | } | ||
| 757 | |||
| 758 | const then_label = try c.builder.makeLabel("ternary.then"); | ||
| 759 | const else_label = try c.builder.makeLabel("ternary.else"); | ||
| 760 | const end_label = try c.builder.makeLabel("ternary.end"); | ||
| 761 | const cond_ty = c.node_ty[@intFromEnum(data.if3.cond)]; | ||
| 762 | { | ||
| 763 | const old_cond_dummy_ty = c.cond_dummy_ty; | ||
| 764 | defer c.cond_dummy_ty = old_cond_dummy_ty; | ||
| 765 | c.cond_dummy_ty = try c.genType(cond_ty); | ||
| 766 | |||
| 767 | try c.genBoolExpr(data.if3.cond, then_label, else_label); | ||
| 768 | } | ||
| 769 | |||
| 770 | try c.builder.startBlock(then_label); | ||
| 771 | if (c.builder.instructions.items(.ty)[@intFromEnum(c.cond_dummy_ref)] == .i1) { | ||
| 772 | c.cond_dummy_ref = try c.addUn(.zext, c.cond_dummy_ref, cond_ty); | ||
| 773 | } | ||
| 774 | const then_val = try c.genExpr(c.tree.data[data.if3.body]); // then | ||
| 775 | try c.builder.addJump(end_label); | ||
| 776 | const then_exit = c.builder.current_label; | ||
| 777 | |||
| 778 | try c.builder.startBlock(else_label); | ||
| 779 | const else_val = try c.genExpr(c.tree.data[data.if3.body + 1]); // else | ||
| 780 | const else_exit = c.builder.current_label; | ||
| 781 | |||
| 782 | try c.builder.startBlock(end_label); | ||
| 783 | |||
| 784 | var phi_buf: [2]Ir.Inst.Phi.Input = .{ | ||
| 785 | .{ .value = then_val, .label = then_exit }, | ||
| 786 | .{ .value = else_val, .label = else_exit }, | ||
| 787 | }; | ||
| 788 | return c.builder.addPhi(&phi_buf, try c.genType(ty)); | ||
| 789 | }, | ||
| 790 | .cond_dummy_expr => return c.cond_dummy_ref, | ||
| 791 | .cond_expr => { | ||
| 792 | if (c.tree.value_map.get(data.if3.cond)) |cond| { | ||
| 793 | if (cond.toBool(c.comp)) { | ||
| 794 | return c.genExpr(c.tree.data[data.if3.body]); // then | ||
| 795 | } else { | ||
| 796 | return c.genExpr(c.tree.data[data.if3.body + 1]); // else | ||
| 797 | } | ||
| 798 | } | ||
| 799 | |||
| 800 | const then_label = try c.builder.makeLabel("ternary.then"); | ||
| 801 | const else_label = try c.builder.makeLabel("ternary.else"); | ||
| 802 | const end_label = try c.builder.makeLabel("ternary.end"); | ||
| 803 | |||
| 804 | try c.genBoolExpr(data.if3.cond, then_label, else_label); | ||
| 805 | |||
| 806 | try c.builder.startBlock(then_label); | ||
| 807 | const then_val = try c.genExpr(c.tree.data[data.if3.body]); // then | ||
| 808 | try c.builder.addJump(end_label); | ||
| 809 | const then_exit = c.builder.current_label; | ||
| 810 | |||
| 811 | try c.builder.startBlock(else_label); | ||
| 812 | const else_val = try c.genExpr(c.tree.data[data.if3.body + 1]); // else | ||
| 813 | const else_exit = c.builder.current_label; | ||
| 814 | |||
| 815 | try c.builder.startBlock(end_label); | ||
| 816 | |||
| 817 | var phi_buf: [2]Ir.Inst.Phi.Input = .{ | ||
| 818 | .{ .value = then_val, .label = then_exit }, | ||
| 819 | .{ .value = else_val, .label = else_exit }, | ||
| 820 | }; | ||
| 821 | return c.builder.addPhi(&phi_buf, try c.genType(ty)); | ||
| 822 | }, | ||
| 823 | .call_expr_one => if (data.bin.rhs == .none) { | ||
| 824 | return c.genCall(data.bin.lhs, &.{}, ty); | ||
| 825 | } else { | ||
| 826 | return c.genCall(data.bin.lhs, &.{data.bin.rhs}, ty); | ||
| 827 | }, | ||
| 828 | .call_expr => { | ||
| 829 | return c.genCall(c.tree.data[data.range.start], c.tree.data[data.range.start + 1 .. data.range.end], ty); | ||
| 830 | }, | ||
| 831 | .bool_or_expr => { | ||
| 832 | if (c.tree.value_map.get(data.bin.lhs)) |lhs| { | ||
| 833 | if (!lhs.toBool(c.comp)) { | ||
| 834 | return c.builder.addConstant(.one, try c.genType(ty)); | ||
| 835 | } | ||
| 836 | return c.genExpr(data.bin.rhs); | ||
| 837 | } | ||
| 838 | |||
| 839 | const false_label = try c.builder.makeLabel("bool_false"); | ||
| 840 | const exit_label = try c.builder.makeLabel("bool_exit"); | ||
| 841 | |||
| 842 | const old_bool_end_label = c.bool_end_label; | ||
| 843 | defer c.bool_end_label = old_bool_end_label; | ||
| 844 | c.bool_end_label = exit_label; | ||
| 845 | |||
| 846 | const phi_nodes_top = c.phi_nodes.items.len; | ||
| 847 | defer c.phi_nodes.items.len = phi_nodes_top; | ||
| 848 | |||
| 849 | try c.genBoolExpr(data.bin.lhs, exit_label, false_label); | ||
| 850 | |||
| 851 | try c.builder.startBlock(false_label); | ||
| 852 | try c.genBoolExpr(data.bin.rhs, exit_label, exit_label); | ||
| 853 | |||
| 854 | try c.builder.startBlock(exit_label); | ||
| 855 | |||
| 856 | const phi = try c.builder.addPhi(c.phi_nodes.items[phi_nodes_top..], .i1); | ||
| 857 | return c.addUn(.zext, phi, ty); | ||
| 858 | }, | ||
| 859 | .bool_and_expr => { | ||
| 860 | if (c.tree.value_map.get(data.bin.lhs)) |lhs| { | ||
| 861 | if (!lhs.toBool(c.comp)) { | ||
| 862 | return c.builder.addConstant(.zero, try c.genType(ty)); | ||
| 863 | } | ||
| 864 | return c.genExpr(data.bin.rhs); | ||
| 865 | } | ||
| 866 | |||
| 867 | const true_label = try c.builder.makeLabel("bool_true"); | ||
| 868 | const exit_label = try c.builder.makeLabel("bool_exit"); | ||
| 869 | |||
| 870 | const old_bool_end_label = c.bool_end_label; | ||
| 871 | defer c.bool_end_label = old_bool_end_label; | ||
| 872 | c.bool_end_label = exit_label; | ||
| 873 | |||
| 874 | const phi_nodes_top = c.phi_nodes.items.len; | ||
| 875 | defer c.phi_nodes.items.len = phi_nodes_top; | ||
| 876 | |||
| 877 | try c.genBoolExpr(data.bin.lhs, true_label, exit_label); | ||
| 878 | |||
| 879 | try c.builder.startBlock(true_label); | ||
| 880 | try c.genBoolExpr(data.bin.rhs, exit_label, exit_label); | ||
| 881 | |||
| 882 | try c.builder.startBlock(exit_label); | ||
| 883 | |||
| 884 | const phi = try c.builder.addPhi(c.phi_nodes.items[phi_nodes_top..], .i1); | ||
| 885 | return c.addUn(.zext, phi, ty); | ||
| 886 | }, | ||
| 887 | .builtin_choose_expr => { | ||
| 888 | const cond = c.tree.value_map.get(data.if3.cond).?; | ||
| 889 | if (cond.toBool(c.comp)) { | ||
| 890 | return c.genExpr(c.tree.data[data.if3.body]); | ||
| 891 | } else { | ||
| 892 | return c.genExpr(c.tree.data[data.if3.body + 1]); | ||
| 893 | } | ||
| 894 | }, | ||
| 895 | .generic_expr_one => { | ||
| 896 | const index = @intFromEnum(data.bin.rhs); | ||
| 897 | switch (c.node_tag[index]) { | ||
| 898 | .generic_association_expr, .generic_default_expr => { | ||
| 899 | return c.genExpr(c.node_data[index].un); | ||
| 900 | }, | ||
| 901 | else => unreachable, | ||
| 902 | } | ||
| 903 | }, | ||
| 904 | .generic_expr => { | ||
| 905 | const index = @intFromEnum(c.tree.data[data.range.start + 1]); | ||
| 906 | switch (c.node_tag[index]) { | ||
| 907 | .generic_association_expr, .generic_default_expr => { | ||
| 908 | return c.genExpr(c.node_data[index].un); | ||
| 909 | }, | ||
| 910 | else => unreachable, | ||
| 911 | } | ||
| 912 | }, | ||
| 913 | .generic_association_expr, .generic_default_expr => unreachable, | ||
| 914 | .stmt_expr => switch (c.node_tag[@intFromEnum(data.un)]) { | ||
| 915 | .compound_stmt_two => { | ||
| 916 | const old_sym_len = c.symbols.items.len; | ||
| 917 | c.symbols.items.len = old_sym_len; | ||
| 918 | |||
| 919 | const stmt_data = c.node_data[@intFromEnum(data.un)]; | ||
| 920 | if (stmt_data.bin.rhs == .none) return c.genExpr(stmt_data.bin.lhs); | ||
| 921 | try c.genStmt(stmt_data.bin.lhs); | ||
| 922 | return c.genExpr(stmt_data.bin.rhs); | ||
| 923 | }, | ||
| 924 | .compound_stmt => { | ||
| 925 | const old_sym_len = c.symbols.items.len; | ||
| 926 | c.symbols.items.len = old_sym_len; | ||
| 927 | |||
| 928 | const stmt_data = c.node_data[@intFromEnum(data.un)]; | ||
| 929 | for (c.tree.data[stmt_data.range.start .. stmt_data.range.end - 1]) |stmt| try c.genStmt(stmt); | ||
| 930 | return c.genExpr(c.tree.data[stmt_data.range.end]); | ||
| 931 | }, | ||
| 932 | else => unreachable, | ||
| 933 | }, | ||
| 934 | .builtin_call_expr_one => { | ||
| 935 | const name = c.tree.tokSlice(data.decl.name); | ||
| 936 | const builtin = c.comp.builtins.lookup(name).builtin; | ||
| 937 | if (data.decl.node == .none) { | ||
| 938 | return c.genBuiltinCall(builtin, &.{}, ty); | ||
| 939 | } else { | ||
| 940 | return c.genBuiltinCall(builtin, &.{data.decl.node}, ty); | ||
| 941 | } | ||
| 942 | }, | ||
| 943 | .builtin_call_expr => { | ||
| 944 | const name_node_idx = c.tree.data[data.range.start]; | ||
| 945 | const name = c.tree.tokSlice(@intFromEnum(name_node_idx)); | ||
| 946 | const builtin = c.comp.builtins.lookup(name).builtin; | ||
| 947 | return c.genBuiltinCall(builtin, c.tree.data[data.range.start + 1 .. data.range.end], ty); | ||
| 948 | }, | ||
| 949 | .addr_of_label, | ||
| 950 | .imag_expr, | ||
| 951 | .real_expr, | ||
| 952 | .sizeof_expr, | ||
| 953 | .special_builtin_call_one, | ||
| 954 | => return c.fail("TODO CodeGen.genExpr {}\n", .{c.node_tag[@intFromEnum(node)]}), | ||
| 955 | else => unreachable, // Not an expression. | ||
| 956 | } | ||
| 957 | return .none; | ||
| 958 | } | ||
| 959 | |||
| 960 | fn genLval(c: *CodeGen, node: NodeIndex) Error!Ir.Ref { | ||
| 961 | std.debug.assert(node != .none); | ||
| 962 | assert(c.tree.isLval(node)); | ||
| 963 | const data = c.node_data[@intFromEnum(node)]; | ||
| 964 | switch (c.node_tag[@intFromEnum(node)]) { | ||
| 965 | .string_literal_expr => { | ||
| 966 | const val = c.tree.value_map.get(node).?; | ||
| 967 | return c.builder.addConstant(val.ref(), .ptr); | ||
| 968 | }, | ||
| 969 | .paren_expr => return c.genLval(data.un), | ||
| 970 | .decl_ref_expr => { | ||
| 971 | const slice = c.tree.tokSlice(data.decl_ref); | ||
| 972 | const name = try StrInt.intern(c.comp, slice); | ||
| 973 | var i = c.symbols.items.len; | ||
| 974 | while (i > 0) { | ||
| 975 | i -= 1; | ||
| 976 | if (c.symbols.items[i].name == name) { | ||
| 977 | return c.symbols.items[i].val; | ||
| 978 | } | ||
| 979 | } | ||
| 980 | |||
| 981 | const duped_name = try c.builder.arena.allocator().dupeZ(u8, slice); | ||
| 982 | const ref: Ir.Ref = @enumFromInt(c.builder.instructions.len); | ||
| 983 | try c.builder.instructions.append(c.builder.gpa, .{ .tag = .symbol, .data = .{ .label = duped_name }, .ty = .ptr }); | ||
| 984 | return ref; | ||
| 985 | }, | ||
| 986 | .deref_expr => return c.genExpr(data.un), | ||
| 987 | .compound_literal_expr => { | ||
| 988 | const ty = c.node_ty[@intFromEnum(node)]; | ||
| 989 | const size: u32 = @intCast(ty.sizeof(c.comp).?); // TODO add error in parser | ||
| 990 | const @"align" = ty.alignof(c.comp); | ||
| 991 | const alloc = try c.builder.addAlloc(size, @"align"); | ||
| 992 | try c.genInitializer(alloc, ty, data.un); | ||
| 993 | return alloc; | ||
| 994 | }, | ||
| 995 | .builtin_choose_expr => { | ||
| 996 | const cond = c.tree.value_map.get(data.if3.cond).?; | ||
| 997 | if (cond.toBool(c.comp)) { | ||
| 998 | return c.genLval(c.tree.data[data.if3.body]); | ||
| 999 | } else { | ||
| 1000 | return c.genLval(c.tree.data[data.if3.body + 1]); | ||
| 1001 | } | ||
| 1002 | }, | ||
| 1003 | .member_access_expr, | ||
| 1004 | .member_access_ptr_expr, | ||
| 1005 | .array_access_expr, | ||
| 1006 | .static_compound_literal_expr, | ||
| 1007 | .thread_local_compound_literal_expr, | ||
| 1008 | .static_thread_local_compound_literal_expr, | ||
| 1009 | => return c.fail("TODO CodeGen.genLval {}\n", .{c.node_tag[@intFromEnum(node)]}), | ||
| 1010 | else => unreachable, // Not an lval expression. | ||
| 1011 | } | ||
| 1012 | } | ||
| 1013 | |||
| 1014 | fn genBoolExpr(c: *CodeGen, base: NodeIndex, true_label: Ir.Ref, false_label: Ir.Ref) Error!void { | ||
| 1015 | var node = base; | ||
| 1016 | while (true) switch (c.node_tag[@intFromEnum(node)]) { | ||
| 1017 | .paren_expr => { | ||
| 1018 | node = c.node_data[@intFromEnum(node)].un; | ||
| 1019 | }, | ||
| 1020 | else => break, | ||
| 1021 | }; | ||
| 1022 | |||
| 1023 | const data = c.node_data[@intFromEnum(node)]; | ||
| 1024 | switch (c.node_tag[@intFromEnum(node)]) { | ||
| 1025 | .bool_or_expr => { | ||
| 1026 | if (c.tree.value_map.get(data.bin.lhs)) |lhs| { | ||
| 1027 | if (lhs.toBool(c.comp)) { | ||
| 1028 | if (true_label == c.bool_end_label) { | ||
| 1029 | return c.addBoolPhi(!c.bool_invert); | ||
| 1030 | } | ||
| 1031 | return c.builder.addJump(true_label); | ||
| 1032 | } | ||
| 1033 | return c.genBoolExpr(data.bin.rhs, true_label, false_label); | ||
| 1034 | } | ||
| 1035 | |||
| 1036 | const new_false_label = try c.builder.makeLabel("bool_false"); | ||
| 1037 | try c.genBoolExpr(data.bin.lhs, true_label, new_false_label); | ||
| 1038 | try c.builder.startBlock(new_false_label); | ||
| 1039 | |||
| 1040 | if (c.cond_dummy_ty) |ty| c.cond_dummy_ref = try c.builder.addConstant(.one, ty); | ||
| 1041 | return c.genBoolExpr(data.bin.rhs, true_label, false_label); | ||
| 1042 | }, | ||
| 1043 | .bool_and_expr => { | ||
| 1044 | if (c.tree.value_map.get(data.bin.lhs)) |lhs| { | ||
| 1045 | if (!lhs.toBool(c.comp)) { | ||
| 1046 | if (false_label == c.bool_end_label) { | ||
| 1047 | return c.addBoolPhi(c.bool_invert); | ||
| 1048 | } | ||
| 1049 | return c.builder.addJump(false_label); | ||
| 1050 | } | ||
| 1051 | return c.genBoolExpr(data.bin.rhs, true_label, false_label); | ||
| 1052 | } | ||
| 1053 | |||
| 1054 | const new_true_label = try c.builder.makeLabel("bool_true"); | ||
| 1055 | try c.genBoolExpr(data.bin.lhs, new_true_label, false_label); | ||
| 1056 | try c.builder.startBlock(new_true_label); | ||
| 1057 | |||
| 1058 | if (c.cond_dummy_ty) |ty| c.cond_dummy_ref = try c.builder.addConstant(.one, ty); | ||
| 1059 | return c.genBoolExpr(data.bin.rhs, true_label, false_label); | ||
| 1060 | }, | ||
| 1061 | .bool_not_expr => { | ||
| 1062 | c.bool_invert = !c.bool_invert; | ||
| 1063 | defer c.bool_invert = !c.bool_invert; | ||
| 1064 | |||
| 1065 | if (c.cond_dummy_ty) |ty| c.cond_dummy_ref = try c.builder.addConstant(.zero, ty); | ||
| 1066 | return c.genBoolExpr(data.un, false_label, true_label); | ||
| 1067 | }, | ||
| 1068 | .equal_expr => { | ||
| 1069 | const cmp = try c.genComparison(node, .cmp_eq); | ||
| 1070 | if (c.cond_dummy_ty != null) c.cond_dummy_ref = cmp; | ||
| 1071 | return c.addBranch(cmp, true_label, false_label); | ||
| 1072 | }, | ||
| 1073 | .not_equal_expr => { | ||
| 1074 | const cmp = try c.genComparison(node, .cmp_ne); | ||
| 1075 | if (c.cond_dummy_ty != null) c.cond_dummy_ref = cmp; | ||
| 1076 | return c.addBranch(cmp, true_label, false_label); | ||
| 1077 | }, | ||
| 1078 | .less_than_expr => { | ||
| 1079 | const cmp = try c.genComparison(node, .cmp_lt); | ||
| 1080 | if (c.cond_dummy_ty != null) c.cond_dummy_ref = cmp; | ||
| 1081 | return c.addBranch(cmp, true_label, false_label); | ||
| 1082 | }, | ||
| 1083 | .less_than_equal_expr => { | ||
| 1084 | const cmp = try c.genComparison(node, .cmp_lte); | ||
| 1085 | if (c.cond_dummy_ty != null) c.cond_dummy_ref = cmp; | ||
| 1086 | return c.addBranch(cmp, true_label, false_label); | ||
| 1087 | }, | ||
| 1088 | .greater_than_expr => { | ||
| 1089 | const cmp = try c.genComparison(node, .cmp_gt); | ||
| 1090 | if (c.cond_dummy_ty != null) c.cond_dummy_ref = cmp; | ||
| 1091 | return c.addBranch(cmp, true_label, false_label); | ||
| 1092 | }, | ||
| 1093 | .greater_than_equal_expr => { | ||
| 1094 | const cmp = try c.genComparison(node, .cmp_gte); | ||
| 1095 | if (c.cond_dummy_ty != null) c.cond_dummy_ref = cmp; | ||
| 1096 | return c.addBranch(cmp, true_label, false_label); | ||
| 1097 | }, | ||
| 1098 | .explicit_cast, .implicit_cast => switch (data.cast.kind) { | ||
| 1099 | .bool_to_int => { | ||
| 1100 | const operand = try c.genExpr(data.cast.operand); | ||
| 1101 | if (c.cond_dummy_ty != null) c.cond_dummy_ref = operand; | ||
| 1102 | return c.addBranch(operand, true_label, false_label); | ||
| 1103 | }, | ||
| 1104 | else => {}, | ||
| 1105 | }, | ||
| 1106 | .binary_cond_expr => { | ||
| 1107 | if (c.tree.value_map.get(data.if3.cond)) |cond| { | ||
| 1108 | if (cond.toBool(c.comp)) { | ||
| 1109 | return c.genBoolExpr(c.tree.data[data.if3.body], true_label, false_label); // then | ||
| 1110 | } else { | ||
| 1111 | return c.genBoolExpr(c.tree.data[data.if3.body + 1], true_label, false_label); // else | ||
| 1112 | } | ||
| 1113 | } | ||
| 1114 | |||
| 1115 | const new_false_label = try c.builder.makeLabel("ternary.else"); | ||
| 1116 | try c.genBoolExpr(data.if3.cond, true_label, new_false_label); | ||
| 1117 | |||
| 1118 | try c.builder.startBlock(new_false_label); | ||
| 1119 | if (c.cond_dummy_ty) |ty| c.cond_dummy_ref = try c.builder.addConstant(.one, ty); | ||
| 1120 | return c.genBoolExpr(c.tree.data[data.if3.body + 1], true_label, false_label); // else | ||
| 1121 | }, | ||
| 1122 | .cond_expr => { | ||
| 1123 | if (c.tree.value_map.get(data.if3.cond)) |cond| { | ||
| 1124 | if (cond.toBool(c.comp)) { | ||
| 1125 | return c.genBoolExpr(c.tree.data[data.if3.body], true_label, false_label); // then | ||
| 1126 | } else { | ||
| 1127 | return c.genBoolExpr(c.tree.data[data.if3.body + 1], true_label, false_label); // else | ||
| 1128 | } | ||
| 1129 | } | ||
| 1130 | |||
| 1131 | const new_true_label = try c.builder.makeLabel("ternary.then"); | ||
| 1132 | const new_false_label = try c.builder.makeLabel("ternary.else"); | ||
| 1133 | try c.genBoolExpr(data.if3.cond, new_true_label, new_false_label); | ||
| 1134 | |||
| 1135 | try c.builder.startBlock(new_true_label); | ||
| 1136 | try c.genBoolExpr(c.tree.data[data.if3.body], true_label, false_label); // then | ||
| 1137 | try c.builder.startBlock(new_false_label); | ||
| 1138 | if (c.cond_dummy_ty) |ty| c.cond_dummy_ref = try c.builder.addConstant(.one, ty); | ||
| 1139 | return c.genBoolExpr(c.tree.data[data.if3.body + 1], true_label, false_label); // else | ||
| 1140 | }, | ||
| 1141 | else => {}, | ||
| 1142 | } | ||
| 1143 | |||
| 1144 | if (c.tree.value_map.get(node)) |value| { | ||
| 1145 | if (value.toBool(c.comp)) { | ||
| 1146 | if (true_label == c.bool_end_label) { | ||
| 1147 | return c.addBoolPhi(!c.bool_invert); | ||
| 1148 | } | ||
| 1149 | return c.builder.addJump(true_label); | ||
| 1150 | } else { | ||
| 1151 | if (false_label == c.bool_end_label) { | ||
| 1152 | return c.addBoolPhi(c.bool_invert); | ||
| 1153 | } | ||
| 1154 | return c.builder.addJump(false_label); | ||
| 1155 | } | ||
| 1156 | } | ||
| 1157 | |||
| 1158 | // Assume int operand. | ||
| 1159 | const lhs = try c.genExpr(node); | ||
| 1160 | const rhs = try c.builder.addConstant(.zero, try c.genType(c.node_ty[@intFromEnum(node)])); | ||
| 1161 | const cmp = try c.builder.addInst(.cmp_ne, .{ .bin = .{ .lhs = lhs, .rhs = rhs } }, .i1); | ||
| 1162 | if (c.cond_dummy_ty != null) c.cond_dummy_ref = cmp; | ||
| 1163 | try c.addBranch(cmp, true_label, false_label); | ||
| 1164 | } | ||
| 1165 | |||
| 1166 | fn genBuiltinCall(c: *CodeGen, builtin: Builtin, arg_nodes: []const NodeIndex, ty: Type) Error!Ir.Ref { | ||
| 1167 | _ = arg_nodes; | ||
| 1168 | _ = ty; | ||
| 1169 | return c.fail("TODO CodeGen.genBuiltinCall {s}\n", .{Builtin.nameFromTag(builtin.tag).span()}); | ||
| 1170 | } | ||
| 1171 | |||
| 1172 | fn genCall(c: *CodeGen, fn_node: NodeIndex, arg_nodes: []const NodeIndex, ty: Type) Error!Ir.Ref { | ||
| 1173 | // Detect direct calls. | ||
| 1174 | const fn_ref = blk: { | ||
| 1175 | const data = c.node_data[@intFromEnum(fn_node)]; | ||
| 1176 | if (c.node_tag[@intFromEnum(fn_node)] != .implicit_cast or data.cast.kind != .function_to_pointer) { | ||
| 1177 | break :blk try c.genExpr(fn_node); | ||
| 1178 | } | ||
| 1179 | |||
| 1180 | var cur = @intFromEnum(data.cast.operand); | ||
| 1181 | while (true) switch (c.node_tag[cur]) { | ||
| 1182 | .paren_expr, .addr_of_expr, .deref_expr => { | ||
| 1183 | cur = @intFromEnum(c.node_data[cur].un); | ||
| 1184 | }, | ||
| 1185 | .implicit_cast => { | ||
| 1186 | const cast = c.node_data[cur].cast; | ||
| 1187 | if (cast.kind != .function_to_pointer) { | ||
| 1188 | break :blk try c.genExpr(fn_node); | ||
| 1189 | } | ||
| 1190 | cur = @intFromEnum(cast.operand); | ||
| 1191 | }, | ||
| 1192 | .decl_ref_expr => { | ||
| 1193 | const slice = c.tree.tokSlice(c.node_data[cur].decl_ref); | ||
| 1194 | const name = try StrInt.intern(c.comp, slice); | ||
| 1195 | var i = c.symbols.items.len; | ||
| 1196 | while (i > 0) { | ||
| 1197 | i -= 1; | ||
| 1198 | if (c.symbols.items[i].name == name) { | ||
| 1199 | break :blk try c.genExpr(fn_node); | ||
| 1200 | } | ||
| 1201 | } | ||
| 1202 | |||
| 1203 | const duped_name = try c.builder.arena.allocator().dupeZ(u8, slice); | ||
| 1204 | const ref: Ir.Ref = @enumFromInt(c.builder.instructions.len); | ||
| 1205 | try c.builder.instructions.append(c.builder.gpa, .{ .tag = .symbol, .data = .{ .label = duped_name }, .ty = .ptr }); | ||
| 1206 | break :blk ref; | ||
| 1207 | }, | ||
| 1208 | else => break :blk try c.genExpr(fn_node), | ||
| 1209 | }; | ||
| 1210 | }; | ||
| 1211 | |||
| 1212 | const args = try c.builder.arena.allocator().alloc(Ir.Ref, arg_nodes.len); | ||
| 1213 | for (arg_nodes, args) |node, *arg| { | ||
| 1214 | // TODO handle calling convention here | ||
| 1215 | arg.* = try c.genExpr(node); | ||
| 1216 | } | ||
| 1217 | // TODO handle variadic call | ||
| 1218 | const call = try c.builder.arena.allocator().create(Ir.Inst.Call); | ||
| 1219 | call.* = .{ | ||
| 1220 | .func = fn_ref, | ||
| 1221 | .args_len = @intCast(args.len), | ||
| 1222 | .args_ptr = args.ptr, | ||
| 1223 | }; | ||
| 1224 | return c.builder.addInst(.call, .{ .call = call }, try c.genType(ty)); | ||
| 1225 | } | ||
| 1226 | |||
| 1227 | fn genCompoundAssign(c: *CodeGen, node: NodeIndex, tag: Ir.Inst.Tag) Error!Ir.Ref { | ||
| 1228 | const bin = c.node_data[@intFromEnum(node)].bin; | ||
| 1229 | const ty = c.node_ty[@intFromEnum(node)]; | ||
| 1230 | const rhs = try c.genExpr(bin.rhs); | ||
| 1231 | const lhs = try c.genLval(bin.lhs); | ||
| 1232 | const res = try c.addBin(tag, lhs, rhs, ty); | ||
| 1233 | try c.builder.addStore(lhs, res); | ||
| 1234 | return res; | ||
| 1235 | } | ||
| 1236 | |||
| 1237 | fn genBinOp(c: *CodeGen, node: NodeIndex, tag: Ir.Inst.Tag) Error!Ir.Ref { | ||
| 1238 | const bin = c.node_data[@intFromEnum(node)].bin; | ||
| 1239 | const ty = c.node_ty[@intFromEnum(node)]; | ||
| 1240 | const lhs = try c.genExpr(bin.lhs); | ||
| 1241 | const rhs = try c.genExpr(bin.rhs); | ||
| 1242 | return c.addBin(tag, lhs, rhs, ty); | ||
| 1243 | } | ||
| 1244 | |||
| 1245 | fn genComparison(c: *CodeGen, node: NodeIndex, tag: Ir.Inst.Tag) Error!Ir.Ref { | ||
| 1246 | const bin = c.node_data[@intFromEnum(node)].bin; | ||
| 1247 | const lhs = try c.genExpr(bin.lhs); | ||
| 1248 | const rhs = try c.genExpr(bin.rhs); | ||
| 1249 | |||
| 1250 | return c.builder.addInst(tag, .{ .bin = .{ .lhs = lhs, .rhs = rhs } }, .i1); | ||
| 1251 | } | ||
| 1252 | |||
| 1253 | fn genPtrArithmetic(c: *CodeGen, ptr: Ir.Ref, offset: Ir.Ref, offset_ty: Type, ty: Type) Error!Ir.Ref { | ||
| 1254 | // TODO consider adding a getelemptr instruction | ||
| 1255 | const size = ty.elemType().sizeof(c.comp).?; | ||
| 1256 | if (size == 1) { | ||
| 1257 | return c.builder.addInst(.add, .{ .bin = .{ .lhs = ptr, .rhs = offset } }, try c.genType(ty)); | ||
| 1258 | } | ||
| 1259 | |||
| 1260 | const size_inst = try c.builder.addConstant((try Value.int(size, c.comp)).ref(), try c.genType(offset_ty)); | ||
| 1261 | const offset_inst = try c.addBin(.mul, offset, size_inst, offset_ty); | ||
| 1262 | return c.addBin(.add, ptr, offset_inst, offset_ty); | ||
| 1263 | } | ||
| 1264 | |||
| 1265 | fn genInitializer(c: *CodeGen, ptr: Ir.Ref, dest_ty: Type, initializer: NodeIndex) Error!void { | ||
| 1266 | std.debug.assert(initializer != .none); | ||
| 1267 | switch (c.node_tag[@intFromEnum(initializer)]) { | ||
| 1268 | .array_init_expr_two, | ||
| 1269 | .array_init_expr, | ||
| 1270 | .struct_init_expr_two, | ||
| 1271 | .struct_init_expr, | ||
| 1272 | .union_init_expr, | ||
| 1273 | .array_filler_expr, | ||
| 1274 | .default_init_expr, | ||
| 1275 | => return c.fail("TODO CodeGen.genInitializer {}\n", .{c.node_tag[@intFromEnum(initializer)]}), | ||
| 1276 | .string_literal_expr => { | ||
| 1277 | const val = c.tree.value_map.get(initializer).?; | ||
| 1278 | const str_ptr = try c.builder.addConstant(val.ref(), .ptr); | ||
| 1279 | if (dest_ty.isArray()) { | ||
| 1280 | return c.fail("TODO memcpy\n", .{}); | ||
| 1281 | } else { | ||
| 1282 | try c.builder.addStore(ptr, str_ptr); | ||
| 1283 | } | ||
| 1284 | }, | ||
| 1285 | else => { | ||
| 1286 | const res = try c.genExpr(initializer); | ||
| 1287 | try c.builder.addStore(ptr, res); | ||
| 1288 | }, | ||
| 1289 | } | ||
| 1290 | } | ||
| 1291 | |||
| 1292 | fn genVar(c: *CodeGen, decl: NodeIndex) Error!void { | ||
| 1293 | _ = decl; | ||
| 1294 | return c.fail("TODO CodeGen.genVar\n", .{}); | ||
| 1295 | } | ||
deps/aro/aro/Compilation.zig created+1602| ... | @@ -0,0 +1,1602 @@ | ||
| 1 | const std = @import("std"); | ||
| 2 | const Allocator = mem.Allocator; | ||
| 3 | const assert = std.debug.assert; | ||
| 4 | const EpochSeconds = std.time.epoch.EpochSeconds; | ||
| 5 | const mem = std.mem; | ||
| 6 | const Interner = @import("backend").Interner; | ||
| 7 | const Builtins = @import("Builtins.zig"); | ||
| 8 | const Builtin = Builtins.Builtin; | ||
| 9 | const Diagnostics = @import("Diagnostics.zig"); | ||
| 10 | const LangOpts = @import("LangOpts.zig"); | ||
| 11 | const Source = @import("Source.zig"); | ||
| 12 | const Tokenizer = @import("Tokenizer.zig"); | ||
| 13 | const Token = Tokenizer.Token; | ||
| 14 | const Type = @import("Type.zig"); | ||
| 15 | const Pragma = @import("Pragma.zig"); | ||
| 16 | const StrInt = @import("StringInterner.zig"); | ||
| 17 | const record_layout = @import("record_layout.zig"); | ||
| 18 | const target_util = @import("target.zig"); | ||
| 19 | |||
| 20 | pub const Error = error{ | ||
| 21 | /// A fatal error has ocurred and compilation has stopped. | ||
| 22 | FatalError, | ||
| 23 | } || Allocator.Error; | ||
| 24 | |||
| 25 | pub const bit_int_max_bits = std.math.maxInt(u16); | ||
| 26 | const path_buf_stack_limit = 1024; | ||
| 27 | |||
| 28 | /// Environment variables used during compilation / linking. | ||
| 29 | pub const Environment = struct { | ||
| 30 | /// Directory to use for temporary files | ||
| 31 | /// TODO: not implemented yet | ||
| 32 | tmpdir: ?[]const u8 = null, | ||
| 33 | |||
| 34 | /// PATH environment variable used to search for programs | ||
| 35 | path: ?[]const u8 = null, | ||
| 36 | |||
| 37 | /// Directories to try when searching for subprograms. | ||
| 38 | /// TODO: not implemented yet | ||
| 39 | compiler_path: ?[]const u8 = null, | ||
| 40 | |||
| 41 | /// Directories to try when searching for special linker files, if compiling for the native target | ||
| 42 | /// TODO: not implemented yet | ||
| 43 | library_path: ?[]const u8 = null, | ||
| 44 | |||
| 45 | /// List of directories to be searched as if specified with -I, but after any paths given with -I options on the command line | ||
| 46 | /// Used regardless of the language being compiled | ||
| 47 | /// TODO: not implemented yet | ||
| 48 | cpath: ?[]const u8 = null, | ||
| 49 | |||
| 50 | /// List of directories to be searched as if specified with -I, but after any paths given with -I options on the command line | ||
| 51 | /// Used if the language being compiled is C | ||
| 52 | /// TODO: not implemented yet | ||
| 53 | c_include_path: ?[]const u8 = null, | ||
| 54 | |||
| 55 | /// UNIX timestamp to be used instead of the current date and time in the __DATE__ and __TIME__ macros | ||
| 56 | source_date_epoch: ?[]const u8 = null, | ||
| 57 | |||
| 58 | /// Load all of the environment variables using the std.process API. Do not use if using Aro as a shared library on Linux without libc | ||
| 59 | /// See https://github.com/ziglang/zig/issues/4524 | ||
| 60 | pub fn loadAll(allocator: std.mem.Allocator) !Environment { | ||
| 61 | var env: Environment = .{}; | ||
| 62 | errdefer env.deinit(allocator); | ||
| 63 | |||
| 64 | inline for (@typeInfo(@TypeOf(env)).Struct.fields) |field| { | ||
| 65 | std.debug.assert(@field(env, field.name) == null); | ||
| 66 | |||
| 67 | var env_var_buf: [field.name.len]u8 = undefined; | ||
| 68 | const env_var_name = std.ascii.upperString(&env_var_buf, field.name); | ||
| 69 | const val: ?[]const u8 = std.process.getEnvVarOwned(allocator, env_var_name) catch |err| switch (err) { | ||
| 70 | error.OutOfMemory => |e| return e, | ||
| 71 | error.EnvironmentVariableNotFound => null, | ||
| 72 | error.InvalidUtf8 => null, | ||
| 73 | }; | ||
| 74 | @field(env, field.name) = val; | ||
| 75 | } | ||
| 76 | return env; | ||
| 77 | } | ||
| 78 | |||
| 79 | /// Use this only if environment slices were allocated with `allocator` (such as via `loadAll`) | ||
| 80 | pub fn deinit(self: *Environment, allocator: std.mem.Allocator) void { | ||
| 81 | inline for (@typeInfo(@TypeOf(self.*)).Struct.fields) |field| { | ||
| 82 | if (@field(self, field.name)) |slice| { | ||
| 83 | allocator.free(slice); | ||
| 84 | } | ||
| 85 | } | ||
| 86 | self.* = undefined; | ||
| 87 | } | ||
| 88 | }; | ||
| 89 | |||
| 90 | const Compilation = @This(); | ||
| 91 | |||
| 92 | gpa: Allocator, | ||
| 93 | diagnostics: Diagnostics, | ||
| 94 | |||
| 95 | environment: Environment = .{}, | ||
| 96 | sources: std.StringArrayHashMapUnmanaged(Source) = .{}, | ||
| 97 | include_dirs: std.ArrayListUnmanaged([]const u8) = .{}, | ||
| 98 | system_include_dirs: std.ArrayListUnmanaged([]const u8) = .{}, | ||
| 99 | target: std.Target = @import("builtin").target, | ||
| 100 | pragma_handlers: std.StringArrayHashMapUnmanaged(*Pragma) = .{}, | ||
| 101 | langopts: LangOpts = .{}, | ||
| 102 | generated_buf: std.ArrayListUnmanaged(u8) = .{}, | ||
| 103 | builtins: Builtins = .{}, | ||
| 104 | types: struct { | ||
| 105 | wchar: Type = undefined, | ||
| 106 | uint_least16_t: Type = undefined, | ||
| 107 | uint_least32_t: Type = undefined, | ||
| 108 | ptrdiff: Type = undefined, | ||
| 109 | size: Type = undefined, | ||
| 110 | va_list: Type = undefined, | ||
| 111 | pid_t: Type = undefined, | ||
| 112 | ns_constant_string: struct { | ||
| 113 | ty: Type = undefined, | ||
| 114 | record: Type.Record = undefined, | ||
| 115 | fields: [4]Type.Record.Field = undefined, | ||
| 116 | int_ty: Type = .{ .specifier = .int, .qual = .{ .@"const" = true } }, | ||
| 117 | char_ty: Type = .{ .specifier = .char, .qual = .{ .@"const" = true } }, | ||
| 118 | } = .{}, | ||
| 119 | file: Type = .{ .specifier = .invalid }, | ||
| 120 | jmp_buf: Type = .{ .specifier = .invalid }, | ||
| 121 | sigjmp_buf: Type = .{ .specifier = .invalid }, | ||
| 122 | ucontext_t: Type = .{ .specifier = .invalid }, | ||
| 123 | intmax: Type = .{ .specifier = .invalid }, | ||
| 124 | intptr: Type = .{ .specifier = .invalid }, | ||
| 125 | int16: Type = .{ .specifier = .invalid }, | ||
| 126 | int64: Type = .{ .specifier = .invalid }, | ||
| 127 | } = .{}, | ||
| 128 | string_interner: StrInt = .{}, | ||
| 129 | interner: Interner = .{}, | ||
| 130 | ms_cwd_source_id: ?Source.Id = null, | ||
| 131 | |||
| 132 | pub fn init(gpa: Allocator) Compilation { | ||
| 133 | return .{ | ||
| 134 | .gpa = gpa, | ||
| 135 | .diagnostics = Diagnostics.init(gpa), | ||
| 136 | }; | ||
| 137 | } | ||
| 138 | |||
| 139 | /// Initialize Compilation with default environment, | ||
| 140 | /// pragma handlers and emulation mode set to target. | ||
| 141 | pub fn initDefault(gpa: Allocator) !Compilation { | ||
| 142 | var comp: Compilation = .{ | ||
| 143 | .gpa = gpa, | ||
| 144 | .environment = try Environment.loadAll(gpa), | ||
| 145 | .diagnostics = Diagnostics.init(gpa), | ||
| 146 | }; | ||
| 147 | errdefer comp.deinit(); | ||
| 148 | try comp.addDefaultPragmaHandlers(); | ||
| 149 | comp.langopts.setEmulatedCompiler(target_util.systemCompiler(comp.target)); | ||
| 150 | return comp; | ||
| 151 | } | ||
| 152 | |||
| 153 | pub fn deinit(comp: *Compilation) void { | ||
| 154 | for (comp.pragma_handlers.values()) |pragma| { | ||
| 155 | pragma.deinit(pragma, comp); | ||
| 156 | } | ||
| 157 | for (comp.sources.values()) |source| { | ||
| 158 | comp.gpa.free(source.path); | ||
| 159 | comp.gpa.free(source.buf); | ||
| 160 | comp.gpa.free(source.splice_locs); | ||
| 161 | } | ||
| 162 | comp.sources.deinit(comp.gpa); | ||
| 163 | comp.diagnostics.deinit(); | ||
| 164 | comp.include_dirs.deinit(comp.gpa); | ||
| 165 | for (comp.system_include_dirs.items) |path| comp.gpa.free(path); | ||
| 166 | comp.system_include_dirs.deinit(comp.gpa); | ||
| 167 | comp.pragma_handlers.deinit(comp.gpa); | ||
| 168 | comp.generated_buf.deinit(comp.gpa); | ||
| 169 | comp.builtins.deinit(comp.gpa); | ||
| 170 | comp.string_interner.deinit(comp.gpa); | ||
| 171 | comp.interner.deinit(comp.gpa); | ||
| 172 | comp.environment.deinit(comp.gpa); | ||
| 173 | } | ||
| 174 | |||
| 175 | pub fn getSourceEpoch(self: *const Compilation, max: i64) !?i64 { | ||
| 176 | const provided = self.environment.source_date_epoch orelse return null; | ||
| 177 | const parsed = std.fmt.parseInt(i64, provided, 10) catch return error.InvalidEpoch; | ||
| 178 | if (parsed < 0 or parsed > max) return error.InvalidEpoch; | ||
| 179 | return parsed; | ||
| 180 | } | ||
| 181 | |||
| 182 | /// Dec 31 9999 23:59:59 | ||
| 183 | const max_timestamp = 253402300799; | ||
| 184 | |||
| 185 | fn getTimestamp(comp: *Compilation) !u47 { | ||
| 186 | const provided: ?i64 = comp.getSourceEpoch(max_timestamp) catch blk: { | ||
| 187 | try comp.addDiagnostic(.{ | ||
| 188 | .tag = .invalid_source_epoch, | ||
| 189 | .loc = .{ .id = .unused, .byte_offset = 0, .line = 0 }, | ||
| 190 | }, &.{}); | ||
| 191 | break :blk null; | ||
| 192 | }; | ||
| 193 | const timestamp = provided orelse std.time.timestamp(); | ||
| 194 | return @intCast(std.math.clamp(timestamp, 0, max_timestamp)); | ||
| 195 | } | ||
| 196 | |||
| 197 | fn generateDateAndTime(w: anytype, timestamp: u47) !void { | ||
| 198 | const epoch_seconds = EpochSeconds{ .secs = timestamp }; | ||
| 199 | const epoch_day = epoch_seconds.getEpochDay(); | ||
| 200 | const day_seconds = epoch_seconds.getDaySeconds(); | ||
| 201 | const year_day = epoch_day.calculateYearDay(); | ||
| 202 | const month_day = year_day.calculateMonthDay(); | ||
| 203 | |||
| 204 | const month_names = [_][]const u8{ "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" }; | ||
| 205 | std.debug.assert(std.time.epoch.Month.jan.numeric() == 1); | ||
| 206 | |||
| 207 | const month_name = month_names[month_day.month.numeric() - 1]; | ||
| 208 | try w.print("#define __DATE__ \"{s} {d: >2} {d}\"\n", .{ | ||
| 209 | month_name, | ||
| 210 | month_day.day_index + 1, | ||
| 211 | year_day.year, | ||
| 212 | }); | ||
| 213 | try w.print("#define __TIME__ \"{d:0>2}:{d:0>2}:{d:0>2}\"\n", .{ | ||
| 214 | day_seconds.getHoursIntoDay(), | ||
| 215 | day_seconds.getMinutesIntoHour(), | ||
| 216 | day_seconds.getSecondsIntoMinute(), | ||
| 217 | }); | ||
| 218 | |||
| 219 | const day_names = [_][]const u8{ "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun" }; | ||
| 220 | // days since Thu Oct 1 1970 | ||
| 221 | const day_name = day_names[@intCast((epoch_day.day + 3) % 7)]; | ||
| 222 | try w.print("#define __TIMESTAMP__ \"{s} {s} {d: >2} {d:0>2}:{d:0>2}:{d:0>2} {d}\"\n", .{ | ||
| 223 | day_name, | ||
| 224 | month_name, | ||
| 225 | month_day.day_index + 1, | ||
| 226 | day_seconds.getHoursIntoDay(), | ||
| 227 | day_seconds.getMinutesIntoHour(), | ||
| 228 | day_seconds.getSecondsIntoMinute(), | ||
| 229 | year_day.year, | ||
| 230 | }); | ||
| 231 | } | ||
| 232 | |||
| 233 | /// Which set of system defines to generate via generateBuiltinMacros | ||
| 234 | pub const SystemDefinesMode = enum { | ||
| 235 | /// Only define macros required by the C standard (date/time macros and those beginning with `__STDC`) | ||
| 236 | no_system_defines, | ||
| 237 | /// Define the standard set of system macros | ||
| 238 | include_system_defines, | ||
| 239 | }; | ||
| 240 | |||
| 241 | fn generateSystemDefines(comp: *Compilation, w: anytype) !void { | ||
| 242 | const ptr_width = comp.target.ptrBitWidth(); | ||
| 243 | |||
| 244 | // os macros | ||
| 245 | switch (comp.target.os.tag) { | ||
| 246 | .linux => try w.writeAll( | ||
| 247 | \\#define linux 1 | ||
| 248 | \\#define __linux 1 | ||
| 249 | \\#define __linux__ 1 | ||
| 250 | \\ | ||
| 251 | ), | ||
| 252 | .windows => if (ptr_width == 32) try w.writeAll( | ||
| 253 | \\#define WIN32 1 | ||
| 254 | \\#define _WIN32 1 | ||
| 255 | \\#define __WIN32 1 | ||
| 256 | \\#define __WIN32__ 1 | ||
| 257 | \\ | ||
| 258 | ) else try w.writeAll( | ||
| 259 | \\#define WIN32 1 | ||
| 260 | \\#define WIN64 1 | ||
| 261 | \\#define _WIN32 1 | ||
| 262 | \\#define _WIN64 1 | ||
| 263 | \\#define __WIN32 1 | ||
| 264 | \\#define __WIN64 1 | ||
| 265 | \\#define __WIN32__ 1 | ||
| 266 | \\#define __WIN64__ 1 | ||
| 267 | \\ | ||
| 268 | ), | ||
| 269 | .freebsd => try w.print("#define __FreeBSD__ {d}\n", .{comp.target.os.version_range.semver.min.major}), | ||
| 270 | .netbsd => try w.writeAll("#define __NetBSD__ 1\n"), | ||
| 271 | .openbsd => try w.writeAll("#define __OpenBSD__ 1\n"), | ||
| 272 | .dragonfly => try w.writeAll("#define __DragonFly__ 1\n"), | ||
| 273 | .solaris => try w.writeAll( | ||
| 274 | \\#define sun 1 | ||
| 275 | \\#define __sun 1 | ||
| 276 | \\ | ||
| 277 | ), | ||
| 278 | .macos => try w.writeAll( | ||
| 279 | \\#define __APPLE__ 1 | ||
| 280 | \\#define __MACH__ 1 | ||
| 281 | \\ | ||
| 282 | ), | ||
| 283 | else => {}, | ||
| 284 | } | ||
| 285 | |||
| 286 | // unix and other additional os macros | ||
| 287 | switch (comp.target.os.tag) { | ||
| 288 | .freebsd, | ||
| 289 | .netbsd, | ||
| 290 | .openbsd, | ||
| 291 | .dragonfly, | ||
| 292 | .linux, | ||
| 293 | => try w.writeAll( | ||
| 294 | \\#define unix 1 | ||
| 295 | \\#define __unix 1 | ||
| 296 | \\#define __unix__ 1 | ||
| 297 | \\ | ||
| 298 | ), | ||
| 299 | else => {}, | ||
| 300 | } | ||
| 301 | if (comp.target.abi == .android) { | ||
| 302 | try w.writeAll("#define __ANDROID__ 1\n"); | ||
| 303 | } | ||
| 304 | |||
| 305 | // architecture macros | ||
| 306 | switch (comp.target.cpu.arch) { | ||
| 307 | .x86_64 => try w.writeAll( | ||
| 308 | \\#define __amd64__ 1 | ||
| 309 | \\#define __amd64 1 | ||
| 310 | \\#define __x86_64 1 | ||
| 311 | \\#define __x86_64__ 1 | ||
| 312 | \\ | ||
| 313 | ), | ||
| 314 | .x86 => try w.writeAll( | ||
| 315 | \\#define i386 1 | ||
| 316 | \\#define __i386 1 | ||
| 317 | \\#define __i386__ 1 | ||
| 318 | \\ | ||
| 319 | ), | ||
| 320 | .mips, | ||
| 321 | .mipsel, | ||
| 322 | .mips64, | ||
| 323 | .mips64el, | ||
| 324 | => try w.writeAll( | ||
| 325 | \\#define __mips__ 1 | ||
| 326 | \\#define mips 1 | ||
| 327 | \\ | ||
| 328 | ), | ||
| 329 | .powerpc, | ||
| 330 | .powerpcle, | ||
| 331 | => try w.writeAll( | ||
| 332 | \\#define __powerpc__ 1 | ||
| 333 | \\#define __POWERPC__ 1 | ||
| 334 | \\#define __ppc__ 1 | ||
| 335 | \\#define __PPC__ 1 | ||
| 336 | \\#define _ARCH_PPC 1 | ||
| 337 | \\ | ||
| 338 | ), | ||
| 339 | .powerpc64, | ||
| 340 | .powerpc64le, | ||
| 341 | => try w.writeAll( | ||
| 342 | \\#define __powerpc 1 | ||
| 343 | \\#define __powerpc__ 1 | ||
| 344 | \\#define __powerpc64__ 1 | ||
| 345 | \\#define __POWERPC__ 1 | ||
| 346 | \\#define __ppc__ 1 | ||
| 347 | \\#define __ppc64__ 1 | ||
| 348 | \\#define __PPC__ 1 | ||
| 349 | \\#define __PPC64__ 1 | ||
| 350 | \\#define _ARCH_PPC 1 | ||
| 351 | \\#define _ARCH_PPC64 1 | ||
| 352 | \\ | ||
| 353 | ), | ||
| 354 | .sparc64 => try w.writeAll( | ||
| 355 | \\#define __sparc__ 1 | ||
| 356 | \\#define __sparc 1 | ||
| 357 | \\#define __sparc_v9__ 1 | ||
| 358 | \\ | ||
| 359 | ), | ||
| 360 | .sparc, .sparcel => try w.writeAll( | ||
| 361 | \\#define __sparc__ 1 | ||
| 362 | \\#define __sparc 1 | ||
| 363 | \\ | ||
| 364 | ), | ||
| 365 | .arm, .armeb => try w.writeAll( | ||
| 366 | \\#define __arm__ 1 | ||
| 367 | \\#define __arm 1 | ||
| 368 | \\ | ||
| 369 | ), | ||
| 370 | .thumb, .thumbeb => try w.writeAll( | ||
| 371 | \\#define __arm__ 1 | ||
| 372 | \\#define __arm 1 | ||
| 373 | \\#define __thumb__ 1 | ||
| 374 | \\ | ||
| 375 | ), | ||
| 376 | .aarch64, .aarch64_be => try w.writeAll("#define __aarch64__ 1\n"), | ||
| 377 | .msp430 => try w.writeAll( | ||
| 378 | \\#define MSP430 1 | ||
| 379 | \\#define __MSP430__ 1 | ||
| 380 | \\ | ||
| 381 | ), | ||
| 382 | else => {}, | ||
| 383 | } | ||
| 384 | |||
| 385 | if (comp.target.os.tag != .windows) switch (ptr_width) { | ||
| 386 | 64 => try w.writeAll( | ||
| 387 | \\#define _LP64 1 | ||
| 388 | \\#define __LP64__ 1 | ||
| 389 | \\ | ||
| 390 | ), | ||
| 391 | 32 => try w.writeAll("#define _ILP32 1\n"), | ||
| 392 | else => {}, | ||
| 393 | }; | ||
| 394 | |||
| 395 | try w.writeAll( | ||
| 396 | \\#define __ORDER_LITTLE_ENDIAN__ 1234 | ||
| 397 | \\#define __ORDER_BIG_ENDIAN__ 4321 | ||
| 398 | \\#define __ORDER_PDP_ENDIAN__ 3412 | ||
| 399 | \\ | ||
| 400 | ); | ||
| 401 | if (comp.target.cpu.arch.endian() == .little) try w.writeAll( | ||
| 402 | \\#define __BYTE_ORDER__ __ORDER_LITTLE_ENDIAN__ | ||
| 403 | \\#define __LITTLE_ENDIAN__ 1 | ||
| 404 | \\ | ||
| 405 | ) else try w.writeAll( | ||
| 406 | \\#define __BYTE_ORDER__ __ORDER_BIG_ENDIAN__ | ||
| 407 | \\#define __BIG_ENDIAN__ 1 | ||
| 408 | \\ | ||
| 409 | ); | ||
| 410 | |||
| 411 | // types | ||
| 412 | if (comp.getCharSignedness() == .unsigned) try w.writeAll("#define __CHAR_UNSIGNED__ 1\n"); | ||
| 413 | try w.writeAll("#define __CHAR_BIT__ 8\n"); | ||
| 414 | |||
| 415 | // int maxs | ||
| 416 | try comp.generateIntWidth(w, "BOOL", .{ .specifier = .bool }); | ||
| 417 | try comp.generateIntMaxAndWidth(w, "SCHAR", .{ .specifier = .schar }); | ||
| 418 | try comp.generateIntMaxAndWidth(w, "SHRT", .{ .specifier = .short }); | ||
| 419 | try comp.generateIntMaxAndWidth(w, "INT", .{ .specifier = .int }); | ||
| 420 | try comp.generateIntMaxAndWidth(w, "LONG", .{ .specifier = .long }); | ||
| 421 | try comp.generateIntMaxAndWidth(w, "LONG_LONG", .{ .specifier = .long_long }); | ||
| 422 | try comp.generateIntMaxAndWidth(w, "WCHAR", comp.types.wchar); | ||
| 423 | // try comp.generateIntMax(w, "WINT", comp.types.wchar); | ||
| 424 | try comp.generateIntMaxAndWidth(w, "INTMAX", comp.types.intmax); | ||
| 425 | try comp.generateIntMaxAndWidth(w, "SIZE", comp.types.size); | ||
| 426 | try comp.generateIntMaxAndWidth(w, "UINTMAX", comp.types.intmax.makeIntegerUnsigned()); | ||
| 427 | try comp.generateIntMaxAndWidth(w, "PTRDIFF", comp.types.ptrdiff); | ||
| 428 | try comp.generateIntMaxAndWidth(w, "INTPTR", comp.types.intptr); | ||
| 429 | try comp.generateIntMaxAndWidth(w, "UINTPTR", comp.types.intptr.makeIntegerUnsigned()); | ||
| 430 | |||
| 431 | // int widths | ||
| 432 | try w.print("#define __BITINT_MAXWIDTH__ {d}\n", .{bit_int_max_bits}); | ||
| 433 | |||
| 434 | // sizeof types | ||
| 435 | try comp.generateSizeofType(w, "__SIZEOF_FLOAT__", .{ .specifier = .float }); | ||
| 436 | try comp.generateSizeofType(w, "__SIZEOF_DOUBLE__", .{ .specifier = .double }); | ||
| 437 | try comp.generateSizeofType(w, "__SIZEOF_LONG_DOUBLE__", .{ .specifier = .long_double }); | ||
| 438 | try comp.generateSizeofType(w, "__SIZEOF_SHORT__", .{ .specifier = .short }); | ||
| 439 | try comp.generateSizeofType(w, "__SIZEOF_INT__", .{ .specifier = .int }); | ||
| 440 | try comp.generateSizeofType(w, "__SIZEOF_LONG__", .{ .specifier = .long }); | ||
| 441 | try comp.generateSizeofType(w, "__SIZEOF_LONG_LONG__", .{ .specifier = .long_long }); | ||
| 442 | try comp.generateSizeofType(w, "__SIZEOF_POINTER__", .{ .specifier = .pointer }); | ||
| 443 | try comp.generateSizeofType(w, "__SIZEOF_PTRDIFF_T__", comp.types.ptrdiff); | ||
| 444 | try comp.generateSizeofType(w, "__SIZEOF_SIZE_T__", comp.types.size); | ||
| 445 | try comp.generateSizeofType(w, "__SIZEOF_WCHAR_T__", comp.types.wchar); | ||
| 446 | // try comp.generateSizeofType(w, "__SIZEOF_WINT_T__", .{ .specifier = .pointer }); | ||
| 447 | |||
| 448 | // various int types | ||
| 449 | const mapper = comp.string_interner.getSlowTypeMapper(); | ||
| 450 | try generateTypeMacro(w, mapper, "__INTPTR_TYPE__", comp.types.intptr, comp.langopts); | ||
| 451 | try generateTypeMacro(w, mapper, "__UINTPTR_TYPE__", comp.types.intptr.makeIntegerUnsigned(), comp.langopts); | ||
| 452 | |||
| 453 | try generateTypeMacro(w, mapper, "__INTMAX_TYPE__", comp.types.intmax, comp.langopts); | ||
| 454 | try comp.generateSuffixMacro("__INTMAX", w, comp.types.intptr); | ||
| 455 | |||
| 456 | try generateTypeMacro(w, mapper, "__UINTMAX_TYPE__", comp.types.intmax.makeIntegerUnsigned(), comp.langopts); | ||
| 457 | try comp.generateSuffixMacro("__UINTMAX", w, comp.types.intptr.makeIntegerUnsigned()); | ||
| 458 | |||
| 459 | try generateTypeMacro(w, mapper, "__PTRDIFF_TYPE__", comp.types.ptrdiff, comp.langopts); | ||
| 460 | try generateTypeMacro(w, mapper, "__SIZE_TYPE__", comp.types.size, comp.langopts); | ||
| 461 | try generateTypeMacro(w, mapper, "__WCHAR_TYPE__", comp.types.wchar, comp.langopts); | ||
| 462 | |||
| 463 | try comp.generateExactWidthTypes(w, mapper); | ||
| 464 | |||
| 465 | if (target_util.FPSemantics.halfPrecisionType(comp.target)) |half| { | ||
| 466 | try generateFloatMacros(w, "FLT16", half, "F16"); | ||
| 467 | } | ||
| 468 | try generateFloatMacros(w, "FLT", target_util.FPSemantics.forType(.float, comp.target), "F"); | ||
| 469 | try generateFloatMacros(w, "DBL", target_util.FPSemantics.forType(.double, comp.target), ""); | ||
| 470 | try generateFloatMacros(w, "LDBL", target_util.FPSemantics.forType(.longdouble, comp.target), "L"); | ||
| 471 | |||
| 472 | // TODO: clang treats __FLT_EVAL_METHOD__ as a special-cased macro because evaluating it within a scope | ||
| 473 | // where `#pragma clang fp eval_method(X)` has been called produces an error diagnostic. | ||
| 474 | const flt_eval_method = comp.langopts.fp_eval_method orelse target_util.defaultFpEvalMethod(comp.target); | ||
| 475 | try w.print("#define __FLT_EVAL_METHOD__ {d}\n", .{@intFromEnum(flt_eval_method)}); | ||
| 476 | |||
| 477 | try w.writeAll( | ||
| 478 | \\#define __FLT_RADIX__ 2 | ||
| 479 | \\#define __DECIMAL_DIG__ __LDBL_DECIMAL_DIG__ | ||
| 480 | \\ | ||
| 481 | ); | ||
| 482 | } | ||
| 483 | |||
| 484 | /// Generate builtin macros that will be available to each source file. | ||
| 485 | pub fn generateBuiltinMacros(comp: *Compilation, system_defines_mode: SystemDefinesMode) !Source { | ||
| 486 | try comp.generateBuiltinTypes(); | ||
| 487 | |||
| 488 | var buf = std.ArrayList(u8).init(comp.gpa); | ||
| 489 | defer buf.deinit(); | ||
| 490 | |||
| 491 | if (system_defines_mode == .include_system_defines) { | ||
| 492 | try buf.appendSlice( | ||
| 493 | \\#define __VERSION__ "Aro | ||
| 494 | ++ @import("backend").version_str ++ "\"\n" ++ | ||
| 495 | \\#define __Aro__ | ||
| 496 | \\ | ||
| 497 | ); | ||
| 498 | } | ||
| 499 | |||
| 500 | // standard macros | ||
| 501 | try buf.appendSlice( | ||
| 502 | \\#define __STDC__ 1 | ||
| 503 | \\#define __STDC_HOSTED__ 1 | ||
| 504 | \\#define __STDC_NO_ATOMICS__ 1 | ||
| 505 | \\#define __STDC_NO_COMPLEX__ 1 | ||
| 506 | \\#define __STDC_NO_THREADS__ 1 | ||
| 507 | \\#define __STDC_NO_VLA__ 1 | ||
| 508 | \\#define __STDC_UTF_16__ 1 | ||
| 509 | \\#define __STDC_UTF_32__ 1 | ||
| 510 | \\ | ||
| 511 | ); | ||
| 512 | if (comp.langopts.standard.StdCVersionMacro()) |stdc_version| { | ||
| 513 | try buf.appendSlice("#define __STDC_VERSION__ "); | ||
| 514 | try buf.appendSlice(stdc_version); | ||
| 515 | try buf.append('\n'); | ||
| 516 | } | ||
| 517 | |||
| 518 | // timestamps | ||
| 519 | const timestamp = try comp.getTimestamp(); | ||
| 520 | try generateDateAndTime(buf.writer(), timestamp); | ||
| 521 | |||
| 522 | if (system_defines_mode == .include_system_defines) { | ||
| 523 | try comp.generateSystemDefines(buf.writer()); | ||
| 524 | } | ||
| 525 | |||
| 526 | return comp.addSourceFromBuffer("<builtin>", buf.items); | ||
| 527 | } | ||
| 528 | |||
| 529 | fn generateFloatMacros(w: anytype, prefix: []const u8, semantics: target_util.FPSemantics, ext: []const u8) !void { | ||
| 530 | const denormMin = semantics.chooseValue( | ||
| 531 | []const u8, | ||
| 532 | .{ | ||
| 533 | "5.9604644775390625e-8", | ||
| 534 | "1.40129846e-45", | ||
| 535 | "4.9406564584124654e-324", | ||
| 536 | "3.64519953188247460253e-4951", | ||
| 537 | "4.94065645841246544176568792868221e-324", | ||
| 538 | "6.47517511943802511092443895822764655e-4966", | ||
| 539 | }, | ||
| 540 | ); | ||
| 541 | const digits = semantics.chooseValue(i32, .{ 3, 6, 15, 18, 31, 33 }); | ||
| 542 | const decimalDigits = semantics.chooseValue(i32, .{ 5, 9, 17, 21, 33, 36 }); | ||
| 543 | const epsilon = semantics.chooseValue( | ||
| 544 | []const u8, | ||
| 545 | .{ | ||
| 546 | "9.765625e-4", | ||
| 547 | "1.19209290e-7", | ||
| 548 | "2.2204460492503131e-16", | ||
| 549 | "1.08420217248550443401e-19", | ||
| 550 | "4.94065645841246544176568792868221e-324", | ||
| 551 | "1.92592994438723585305597794258492732e-34", | ||
| 552 | }, | ||
| 553 | ); | ||
| 554 | const mantissaDigits = semantics.chooseValue(i32, .{ 11, 24, 53, 64, 106, 113 }); | ||
| 555 | |||
| 556 | const min10Exp = semantics.chooseValue(i32, .{ -4, -37, -307, -4931, -291, -4931 }); | ||
| 557 | const max10Exp = semantics.chooseValue(i32, .{ 4, 38, 308, 4932, 308, 4932 }); | ||
| 558 | |||
| 559 | const minExp = semantics.chooseValue(i32, .{ -13, -125, -1021, -16381, -968, -16381 }); | ||
| 560 | const maxExp = semantics.chooseValue(i32, .{ 16, 128, 1024, 16384, 1024, 16384 }); | ||
| 561 | |||
| 562 | const min = semantics.chooseValue( | ||
| 563 | []const u8, | ||
| 564 | .{ | ||
| 565 | "6.103515625e-5", | ||
| 566 | "1.17549435e-38", | ||
| 567 | "2.2250738585072014e-308", | ||
| 568 | "3.36210314311209350626e-4932", | ||
| 569 | "2.00416836000897277799610805135016e-292", | ||
| 570 | "3.36210314311209350626267781732175260e-4932", | ||
| 571 | }, | ||
| 572 | ); | ||
| 573 | const max = semantics.chooseValue( | ||
| 574 | []const u8, | ||
| 575 | .{ | ||
| 576 | "6.5504e+4", | ||
| 577 | "3.40282347e+38", | ||
| 578 | "1.7976931348623157e+308", | ||
| 579 | "1.18973149535723176502e+4932", | ||
| 580 | "1.79769313486231580793728971405301e+308", | ||
| 581 | "1.18973149535723176508575932662800702e+4932", | ||
| 582 | }, | ||
| 583 | ); | ||
| 584 | |||
| 585 | var defPrefix = std.BoundedArray(u8, 32).init(0) catch unreachable; | ||
| 586 | defPrefix.writer().print("__{s}_", .{prefix}) catch return error.OutOfMemory; | ||
| 587 | |||
| 588 | const prefix_slice = defPrefix.constSlice(); | ||
| 589 | |||
| 590 | try w.print("#define {s}DENORM_MIN__ {s}{s}\n", .{ prefix_slice, denormMin, ext }); | ||
| 591 | try w.print("#define {s}HAS_DENORM__\n", .{prefix_slice}); | ||
| 592 | try w.print("#define {s}DIG__ {d}\n", .{ prefix_slice, digits }); | ||
| 593 | try w.print("#define {s}DECIMAL_DIG__ {d}\n", .{ prefix_slice, decimalDigits }); | ||
| 594 | |||
| 595 | try w.print("#define {s}EPSILON__ {s}{s}\n", .{ prefix_slice, epsilon, ext }); | ||
| 596 | try w.print("#define {s}HAS_INFINITY__\n", .{prefix_slice}); | ||
| 597 | try w.print("#define {s}HAS_QUIET_NAN__\n", .{prefix_slice}); | ||
| 598 | try w.print("#define {s}MANT_DIG__ {d}\n", .{ prefix_slice, mantissaDigits }); | ||
| 599 | |||
| 600 | try w.print("#define {s}MAX_10_EXP__ {d}\n", .{ prefix_slice, max10Exp }); | ||
| 601 | try w.print("#define {s}MAX_EXP__ {d}\n", .{ prefix_slice, maxExp }); | ||
| 602 | try w.print("#define {s}MAX__ {s}{s}\n", .{ prefix_slice, max, ext }); | ||
| 603 | |||
| 604 | try w.print("#define {s}MIN_10_EXP__ ({d})\n", .{ prefix_slice, min10Exp }); | ||
| 605 | try w.print("#define {s}MIN_EXP__ ({d})\n", .{ prefix_slice, minExp }); | ||
| 606 | try w.print("#define {s}MIN__ {s}{s}\n", .{ prefix_slice, min, ext }); | ||
| 607 | } | ||
| 608 | |||
| 609 | fn generateTypeMacro(w: anytype, mapper: StrInt.TypeMapper, name: []const u8, ty: Type, langopts: LangOpts) !void { | ||
| 610 | try w.print("#define {s} ", .{name}); | ||
| 611 | try ty.print(mapper, langopts, w); | ||
| 612 | try w.writeByte('\n'); | ||
| 613 | } | ||
| 614 | |||
| 615 | fn generateBuiltinTypes(comp: *Compilation) !void { | ||
| 616 | const os = comp.target.os.tag; | ||
| 617 | const wchar: Type = switch (comp.target.cpu.arch) { | ||
| 618 | .xcore => .{ .specifier = .uchar }, | ||
| 619 | .ve, .msp430 => .{ .specifier = .uint }, | ||
| 620 | .arm, .armeb, .thumb, .thumbeb => .{ | ||
| 621 | .specifier = if (os != .windows and os != .netbsd and os != .openbsd) .uint else .int, | ||
| 622 | }, | ||
| 623 | .aarch64, .aarch64_be, .aarch64_32 => .{ | ||
| 624 | .specifier = if (!os.isDarwin() and os != .netbsd) .uint else .int, | ||
| 625 | }, | ||
| 626 | .x86_64, .x86 => .{ .specifier = if (os == .windows) .ushort else .int }, | ||
| 627 | else => .{ .specifier = .int }, | ||
| 628 | }; | ||
| 629 | |||
| 630 | const ptr_width = comp.target.ptrBitWidth(); | ||
| 631 | const ptrdiff = if (os == .windows and ptr_width == 64) | ||
| 632 | Type{ .specifier = .long_long } | ||
| 633 | else switch (ptr_width) { | ||
| 634 | 16 => Type{ .specifier = .int }, | ||
| 635 | 32 => Type{ .specifier = .int }, | ||
| 636 | 64 => Type{ .specifier = .long }, | ||
| 637 | else => unreachable, | ||
| 638 | }; | ||
| 639 | |||
| 640 | const size = if (os == .windows and ptr_width == 64) | ||
| 641 | Type{ .specifier = .ulong_long } | ||
| 642 | else switch (ptr_width) { | ||
| 643 | 16 => Type{ .specifier = .uint }, | ||
| 644 | 32 => Type{ .specifier = .uint }, | ||
| 645 | 64 => Type{ .specifier = .ulong }, | ||
| 646 | else => unreachable, | ||
| 647 | }; | ||
| 648 | |||
| 649 | const va_list = try comp.generateVaListType(); | ||
| 650 | |||
| 651 | const pid_t: Type = switch (os) { | ||
| 652 | .haiku => .{ .specifier = .long }, | ||
| 653 | // Todo: pid_t is required to "a signed integer type"; are there any systems | ||
| 654 | // on which it is `short int`? | ||
| 655 | else => .{ .specifier = .int }, | ||
| 656 | }; | ||
| 657 | |||
| 658 | const intmax = target_util.intMaxType(comp.target); | ||
| 659 | const intptr = target_util.intPtrType(comp.target); | ||
| 660 | const int16 = target_util.int16Type(comp.target); | ||
| 661 | const int64 = target_util.int64Type(comp.target); | ||
| 662 | |||
| 663 | comp.types = .{ | ||
| 664 | .wchar = wchar, | ||
| 665 | .ptrdiff = ptrdiff, | ||
| 666 | .size = size, | ||
| 667 | .va_list = va_list, | ||
| 668 | .pid_t = pid_t, | ||
| 669 | .intmax = intmax, | ||
| 670 | .intptr = intptr, | ||
| 671 | .int16 = int16, | ||
| 672 | .int64 = int64, | ||
| 673 | .uint_least16_t = comp.intLeastN(16, .unsigned), | ||
| 674 | .uint_least32_t = comp.intLeastN(32, .unsigned), | ||
| 675 | }; | ||
| 676 | |||
| 677 | try comp.generateNsConstantStringType(); | ||
| 678 | } | ||
| 679 | |||
| 680 | /// Smallest integer type with at least N bits | ||
| 681 | fn intLeastN(comp: *const Compilation, bits: usize, signedness: std.builtin.Signedness) Type { | ||
| 682 | const candidates = switch (signedness) { | ||
| 683 | .signed => &[_]Type.Specifier{ .schar, .short, .int, .long, .long_long }, | ||
| 684 | .unsigned => &[_]Type.Specifier{ .uchar, .ushort, .uint, .ulong, .ulong_long }, | ||
| 685 | }; | ||
| 686 | for (candidates) |specifier| { | ||
| 687 | const ty: Type = .{ .specifier = specifier }; | ||
| 688 | if (ty.sizeof(comp).? * 8 >= bits) return ty; | ||
| 689 | } else unreachable; | ||
| 690 | } | ||
| 691 | |||
| 692 | fn intSize(comp: *const Compilation, specifier: Type.Specifier) u64 { | ||
| 693 | const ty = Type{ .specifier = specifier }; | ||
| 694 | return ty.sizeof(comp).?; | ||
| 695 | } | ||
| 696 | |||
| 697 | fn generateExactWidthTypes(comp: *const Compilation, w: anytype, mapper: StrInt.TypeMapper) !void { | ||
| 698 | try comp.generateExactWidthType(w, mapper, .schar); | ||
| 699 | |||
| 700 | if (comp.intSize(.short) > comp.intSize(.char)) { | ||
| 701 | try comp.generateExactWidthType(w, mapper, .short); | ||
| 702 | } | ||
| 703 | |||
| 704 | if (comp.intSize(.int) > comp.intSize(.short)) { | ||
| 705 | try comp.generateExactWidthType(w, mapper, .int); | ||
| 706 | } | ||
| 707 | |||
| 708 | if (comp.intSize(.long) > comp.intSize(.int)) { | ||
| 709 | try comp.generateExactWidthType(w, mapper, .long); | ||
| 710 | } | ||
| 711 | |||
| 712 | if (comp.intSize(.long_long) > comp.intSize(.long)) { | ||
| 713 | try comp.generateExactWidthType(w, mapper, .long_long); | ||
| 714 | } | ||
| 715 | |||
| 716 | try comp.generateExactWidthType(w, mapper, .uchar); | ||
| 717 | try comp.generateExactWidthIntMax(w, .uchar); | ||
| 718 | try comp.generateExactWidthIntMax(w, .schar); | ||
| 719 | |||
| 720 | if (comp.intSize(.short) > comp.intSize(.char)) { | ||
| 721 | try comp.generateExactWidthType(w, mapper, .ushort); | ||
| 722 | try comp.generateExactWidthIntMax(w, .ushort); | ||
| 723 | try comp.generateExactWidthIntMax(w, .short); | ||
| 724 | } | ||
| 725 | |||
| 726 | if (comp.intSize(.int) > comp.intSize(.short)) { | ||
| 727 | try comp.generateExactWidthType(w, mapper, .uint); | ||
| 728 | try comp.generateExactWidthIntMax(w, .uint); | ||
| 729 | try comp.generateExactWidthIntMax(w, .int); | ||
| 730 | } | ||
| 731 | |||
| 732 | if (comp.intSize(.long) > comp.intSize(.int)) { | ||
| 733 | try comp.generateExactWidthType(w, mapper, .ulong); | ||
| 734 | try comp.generateExactWidthIntMax(w, .ulong); | ||
| 735 | try comp.generateExactWidthIntMax(w, .long); | ||
| 736 | } | ||
| 737 | |||
| 738 | if (comp.intSize(.long_long) > comp.intSize(.long)) { | ||
| 739 | try comp.generateExactWidthType(w, mapper, .ulong_long); | ||
| 740 | try comp.generateExactWidthIntMax(w, .ulong_long); | ||
| 741 | try comp.generateExactWidthIntMax(w, .long_long); | ||
| 742 | } | ||
| 743 | } | ||
| 744 | |||
| 745 | fn generateFmt(comp: *const Compilation, prefix: []const u8, w: anytype, ty: Type) !void { | ||
| 746 | const unsigned = ty.isUnsignedInt(comp); | ||
| 747 | const modifier = ty.formatModifier(); | ||
| 748 | const formats = if (unsigned) "ouxX" else "di"; | ||
| 749 | for (formats) |c| { | ||
| 750 | try w.print("#define {s}_FMT{c}__ \"{s}{c}\"\n", .{ prefix, c, modifier, c }); | ||
| 751 | } | ||
| 752 | } | ||
| 753 | |||
| 754 | fn generateSuffixMacro(comp: *const Compilation, prefix: []const u8, w: anytype, ty: Type) !void { | ||
| 755 | return w.print("#define {s}_C_SUFFIX__ {s}\n", .{ prefix, ty.intValueSuffix(comp) }); | ||
| 756 | } | ||
| 757 | |||
| 758 | /// Generate the following for ty: | ||
| 759 | /// Name macro (e.g. #define __UINT32_TYPE__ unsigned int) | ||
| 760 | /// Format strings (e.g. #define __UINT32_FMTu__ "u") | ||
| 761 | /// Suffix macro (e.g. #define __UINT32_C_SUFFIX__ U) | ||
| 762 | fn generateExactWidthType(comp: *const Compilation, w: anytype, mapper: StrInt.TypeMapper, specifier: Type.Specifier) !void { | ||
| 763 | var ty = Type{ .specifier = specifier }; | ||
| 764 | const width = 8 * ty.sizeof(comp).?; | ||
| 765 | const unsigned = ty.isUnsignedInt(comp); | ||
| 766 | |||
| 767 | if (width == 16) { | ||
| 768 | ty = if (unsigned) comp.types.int16.makeIntegerUnsigned() else comp.types.int16; | ||
| 769 | } else if (width == 64) { | ||
| 770 | ty = if (unsigned) comp.types.int64.makeIntegerUnsigned() else comp.types.int64; | ||
| 771 | } | ||
| 772 | |||
| 773 | var prefix = std.BoundedArray(u8, 16).init(0) catch unreachable; | ||
| 774 | prefix.writer().print("{s}{d}", .{ if (unsigned) "__UINT" else "__INT", width }) catch return error.OutOfMemory; | ||
| 775 | |||
| 776 | { | ||
| 777 | const len = prefix.len; | ||
| 778 | defer prefix.resize(len) catch unreachable; // restoring previous size | ||
| 779 | prefix.appendSliceAssumeCapacity("_TYPE__"); | ||
| 780 | try generateTypeMacro(w, mapper, prefix.constSlice(), ty, comp.langopts); | ||
| 781 | } | ||
| 782 | |||
| 783 | try comp.generateFmt(prefix.constSlice(), w, ty); | ||
| 784 | try comp.generateSuffixMacro(prefix.constSlice(), w, ty); | ||
| 785 | } | ||
| 786 | |||
| 787 | pub fn hasFloat128(comp: *const Compilation) bool { | ||
| 788 | return target_util.hasFloat128(comp.target); | ||
| 789 | } | ||
| 790 | |||
| 791 | pub fn hasHalfPrecisionFloatABI(comp: *const Compilation) bool { | ||
| 792 | return comp.langopts.allow_half_args_and_returns or target_util.hasHalfPrecisionFloatABI(comp.target); | ||
| 793 | } | ||
| 794 | |||
| 795 | fn generateNsConstantStringType(comp: *Compilation) !void { | ||
| 796 | comp.types.ns_constant_string.record = .{ | ||
| 797 | .name = try StrInt.intern(comp, "__NSConstantString_tag"), | ||
| 798 | .fields = &comp.types.ns_constant_string.fields, | ||
| 799 | .field_attributes = null, | ||
| 800 | .type_layout = undefined, | ||
| 801 | }; | ||
| 802 | const const_int_ptr = Type{ .specifier = .pointer, .data = .{ .sub_type = &comp.types.ns_constant_string.int_ty } }; | ||
| 803 | const const_char_ptr = Type{ .specifier = .pointer, .data = .{ .sub_type = &comp.types.ns_constant_string.char_ty } }; | ||
| 804 | |||
| 805 | comp.types.ns_constant_string.fields[0] = .{ .name = try StrInt.intern(comp, "isa"), .ty = const_int_ptr }; | ||
| 806 | comp.types.ns_constant_string.fields[1] = .{ .name = try StrInt.intern(comp, "flags"), .ty = .{ .specifier = .int } }; | ||
| 807 | comp.types.ns_constant_string.fields[2] = .{ .name = try StrInt.intern(comp, "str"), .ty = const_char_ptr }; | ||
| 808 | comp.types.ns_constant_string.fields[3] = .{ .name = try StrInt.intern(comp, "length"), .ty = .{ .specifier = .long } }; | ||
| 809 | comp.types.ns_constant_string.ty = .{ .specifier = .@"struct", .data = .{ .record = &comp.types.ns_constant_string.record } }; | ||
| 810 | record_layout.compute(&comp.types.ns_constant_string.record, comp.types.ns_constant_string.ty, comp, null); | ||
| 811 | } | ||
| 812 | |||
| 813 | fn generateVaListType(comp: *Compilation) !Type { | ||
| 814 | const Kind = enum { char_ptr, void_ptr, aarch64_va_list, x86_64_va_list }; | ||
| 815 | const kind: Kind = switch (comp.target.cpu.arch) { | ||
| 816 | .aarch64 => switch (comp.target.os.tag) { | ||
| 817 | .windows => @as(Kind, .char_ptr), | ||
| 818 | .ios, .macos, .tvos, .watchos => .char_ptr, | ||
| 819 | else => .aarch64_va_list, | ||
| 820 | }, | ||
| 821 | .sparc, .wasm32, .wasm64, .bpfel, .bpfeb, .riscv32, .riscv64, .avr, .spirv32, .spirv64 => .void_ptr, | ||
| 822 | .powerpc => switch (comp.target.os.tag) { | ||
| 823 | .ios, .macos, .tvos, .watchos, .aix => @as(Kind, .char_ptr), | ||
| 824 | else => return Type{ .specifier = .void }, // unknown | ||
| 825 | }, | ||
| 826 | .x86, .msp430 => .char_ptr, | ||
| 827 | .x86_64 => switch (comp.target.os.tag) { | ||
| 828 | .windows => @as(Kind, .char_ptr), | ||
| 829 | else => .x86_64_va_list, | ||
| 830 | }, | ||
| 831 | else => return Type{ .specifier = .void }, // unknown | ||
| 832 | }; | ||
| 833 | |||
| 834 | // TODO this might be bad? | ||
| 835 | const arena = comp.diagnostics.arena.allocator(); | ||
| 836 | |||
| 837 | var ty: Type = undefined; | ||
| 838 | switch (kind) { | ||
| 839 | .char_ptr => ty = .{ .specifier = .char }, | ||
| 840 | .void_ptr => ty = .{ .specifier = .void }, | ||
| 841 | .aarch64_va_list => { | ||
| 842 | const record_ty = try arena.create(Type.Record); | ||
| 843 | record_ty.* = .{ | ||
| 844 | .name = try StrInt.intern(comp, "__va_list_tag"), | ||
| 845 | .fields = try arena.alloc(Type.Record.Field, 5), | ||
| 846 | .field_attributes = null, | ||
| 847 | .type_layout = undefined, // computed below | ||
| 848 | }; | ||
| 849 | const void_ty = try arena.create(Type); | ||
| 850 | void_ty.* = .{ .specifier = .void }; | ||
| 851 | const void_ptr = Type{ .specifier = .pointer, .data = .{ .sub_type = void_ty } }; | ||
| 852 | record_ty.fields[0] = .{ .name = try StrInt.intern(comp, "__stack"), .ty = void_ptr }; | ||
| 853 | record_ty.fields[1] = .{ .name = try StrInt.intern(comp, "__gr_top"), .ty = void_ptr }; | ||
| 854 | record_ty.fields[2] = .{ .name = try StrInt.intern(comp, "__vr_top"), .ty = void_ptr }; | ||
| 855 | record_ty.fields[3] = .{ .name = try StrInt.intern(comp, "__gr_offs"), .ty = .{ .specifier = .int } }; | ||
| 856 | record_ty.fields[4] = .{ .name = try StrInt.intern(comp, "__vr_offs"), .ty = .{ .specifier = .int } }; | ||
| 857 | ty = .{ .specifier = .@"struct", .data = .{ .record = record_ty } }; | ||
| 858 | record_layout.compute(record_ty, ty, comp, null); | ||
| 859 | }, | ||
| 860 | .x86_64_va_list => { | ||
| 861 | const record_ty = try arena.create(Type.Record); | ||
| 862 | record_ty.* = .{ | ||
| 863 | .name = try StrInt.intern(comp, "__va_list_tag"), | ||
| 864 | .fields = try arena.alloc(Type.Record.Field, 4), | ||
| 865 | .field_attributes = null, | ||
| 866 | .type_layout = undefined, // computed below | ||
| 867 | }; | ||
| 868 | const void_ty = try arena.create(Type); | ||
| 869 | void_ty.* = .{ .specifier = .void }; | ||
| 870 | const void_ptr = Type{ .specifier = .pointer, .data = .{ .sub_type = void_ty } }; | ||
| 871 | record_ty.fields[0] = .{ .name = try StrInt.intern(comp, "gp_offset"), .ty = .{ .specifier = .uint } }; | ||
| 872 | record_ty.fields[1] = .{ .name = try StrInt.intern(comp, "fp_offset"), .ty = .{ .specifier = .uint } }; | ||
| 873 | record_ty.fields[2] = .{ .name = try StrInt.intern(comp, "overflow_arg_area"), .ty = void_ptr }; | ||
| 874 | record_ty.fields[3] = .{ .name = try StrInt.intern(comp, "reg_save_area"), .ty = void_ptr }; | ||
| 875 | ty = .{ .specifier = .@"struct", .data = .{ .record = record_ty } }; | ||
| 876 | record_layout.compute(record_ty, ty, comp, null); | ||
| 877 | }, | ||
| 878 | } | ||
| 879 | if (kind == .char_ptr or kind == .void_ptr) { | ||
| 880 | const elem_ty = try arena.create(Type); | ||
| 881 | elem_ty.* = ty; | ||
| 882 | ty = Type{ .specifier = .pointer, .data = .{ .sub_type = elem_ty } }; | ||
| 883 | } else { | ||
| 884 | const arr_ty = try arena.create(Type.Array); | ||
| 885 | arr_ty.* = .{ .len = 1, .elem = ty }; | ||
| 886 | ty = Type{ .specifier = .array, .data = .{ .array = arr_ty } }; | ||
| 887 | } | ||
| 888 | |||
| 889 | return ty; | ||
| 890 | } | ||
| 891 | |||
| 892 | fn generateIntMax(comp: *const Compilation, w: anytype, name: []const u8, ty: Type) !void { | ||
| 893 | const bit_count: u8 = @intCast(ty.sizeof(comp).? * 8); | ||
| 894 | const unsigned = ty.isUnsignedInt(comp); | ||
| 895 | const max = if (bit_count == 128) | ||
| 896 | @as(u128, if (unsigned) std.math.maxInt(u128) else std.math.maxInt(u128)) | ||
| 897 | else | ||
| 898 | ty.maxInt(comp); | ||
| 899 | try w.print("#define __{s}_MAX__ {d}{s}\n", .{ name, max, ty.intValueSuffix(comp) }); | ||
| 900 | } | ||
| 901 | |||
| 902 | fn generateExactWidthIntMax(comp: *const Compilation, w: anytype, specifier: Type.Specifier) !void { | ||
| 903 | var ty = Type{ .specifier = specifier }; | ||
| 904 | const bit_count: u8 = @intCast(ty.sizeof(comp).? * 8); | ||
| 905 | const unsigned = ty.isUnsignedInt(comp); | ||
| 906 | |||
| 907 | if (bit_count == 64) { | ||
| 908 | ty = if (unsigned) comp.types.int64.makeIntegerUnsigned() else comp.types.int64; | ||
| 909 | } | ||
| 910 | |||
| 911 | var name = std.BoundedArray(u8, 6).init(0) catch unreachable; | ||
| 912 | name.writer().print("{s}{d}", .{ if (unsigned) "UINT" else "INT", bit_count }) catch return error.OutOfMemory; | ||
| 913 | |||
| 914 | return comp.generateIntMax(w, name.constSlice(), ty); | ||
| 915 | } | ||
| 916 | |||
| 917 | fn generateIntWidth(comp: *Compilation, w: anytype, name: []const u8, ty: Type) !void { | ||
| 918 | try w.print("#define __{s}_WIDTH__ {d}\n", .{ name, 8 * ty.sizeof(comp).? }); | ||
| 919 | } | ||
| 920 | |||
| 921 | fn generateIntMaxAndWidth(comp: *Compilation, w: anytype, name: []const u8, ty: Type) !void { | ||
| 922 | try comp.generateIntMax(w, name, ty); | ||
| 923 | try comp.generateIntWidth(w, name, ty); | ||
| 924 | } | ||
| 925 | |||
| 926 | fn generateSizeofType(comp: *Compilation, w: anytype, name: []const u8, ty: Type) !void { | ||
| 927 | try w.print("#define {s} {d}\n", .{ name, ty.sizeof(comp).? }); | ||
| 928 | } | ||
| 929 | |||
| 930 | pub fn nextLargestIntSameSign(comp: *const Compilation, ty: Type) ?Type { | ||
| 931 | assert(ty.isInt()); | ||
| 932 | const specifiers = if (ty.isUnsignedInt(comp)) | ||
| 933 | [_]Type.Specifier{ .short, .int, .long, .long_long } | ||
| 934 | else | ||
| 935 | [_]Type.Specifier{ .ushort, .uint, .ulong, .ulong_long }; | ||
| 936 | const size = ty.sizeof(comp).?; | ||
| 937 | for (specifiers) |specifier| { | ||
| 938 | const candidate = Type{ .specifier = specifier }; | ||
| 939 | if (candidate.sizeof(comp).? > size) return candidate; | ||
| 940 | } | ||
| 941 | return null; | ||
| 942 | } | ||
| 943 | |||
| 944 | /// If `enum E { ... }` syntax has a fixed underlying integer type regardless of the presence of | ||
| 945 | /// __attribute__((packed)) or the range of values of the corresponding enumerator constants, | ||
| 946 | /// specify it here. | ||
| 947 | /// TODO: likely incomplete | ||
| 948 | pub fn fixedEnumTagSpecifier(comp: *const Compilation) ?Type.Specifier { | ||
| 949 | switch (comp.langopts.emulate) { | ||
| 950 | .msvc => return .int, | ||
| 951 | .clang => if (comp.target.os.tag == .windows) return .int, | ||
| 952 | .gcc => {}, | ||
| 953 | } | ||
| 954 | return null; | ||
| 955 | } | ||
| 956 | |||
| 957 | pub fn getCharSignedness(comp: *const Compilation) std.builtin.Signedness { | ||
| 958 | return comp.langopts.char_signedness_override orelse comp.target.charSignedness(); | ||
| 959 | } | ||
| 960 | |||
| 961 | pub fn defineSystemIncludes(comp: *Compilation, aro_dir: []const u8) !void { | ||
| 962 | var stack_fallback = std.heap.stackFallback(path_buf_stack_limit, comp.gpa); | ||
| 963 | const allocator = stack_fallback.get(); | ||
| 964 | var search_path = aro_dir; | ||
| 965 | while (std.fs.path.dirname(search_path)) |dirname| : (search_path = dirname) { | ||
| 966 | var base_dir = std.fs.cwd().openDir(dirname, .{}) catch continue; | ||
| 967 | defer base_dir.close(); | ||
| 968 | |||
| 969 | base_dir.access("include/stddef.h", .{}) catch continue; | ||
| 970 | const path = try std.fs.path.join(comp.gpa, &.{ dirname, "include" }); | ||
| 971 | errdefer comp.gpa.free(path); | ||
| 972 | try comp.system_include_dirs.append(comp.gpa, path); | ||
| 973 | break; | ||
| 974 | } else return error.AroIncludeNotFound; | ||
| 975 | |||
| 976 | if (comp.target.os.tag == .linux) { | ||
| 977 | const triple_str = try comp.target.linuxTriple(allocator); | ||
| 978 | defer allocator.free(triple_str); | ||
| 979 | |||
| 980 | const multiarch_path = try std.fs.path.join(allocator, &.{ "/usr/include", triple_str }); | ||
| 981 | defer allocator.free(multiarch_path); | ||
| 982 | |||
| 983 | if (!std.meta.isError(std.fs.accessAbsolute(multiarch_path, .{}))) { | ||
| 984 | const duped = try comp.gpa.dupe(u8, multiarch_path); | ||
| 985 | errdefer comp.gpa.free(duped); | ||
| 986 | try comp.system_include_dirs.append(comp.gpa, duped); | ||
| 987 | } | ||
| 988 | } | ||
| 989 | const usr_include = try comp.gpa.dupe(u8, "/usr/include"); | ||
| 990 | errdefer comp.gpa.free(usr_include); | ||
| 991 | try comp.system_include_dirs.append(comp.gpa, usr_include); | ||
| 992 | } | ||
| 993 | |||
| 994 | pub fn getSource(comp: *const Compilation, id: Source.Id) Source { | ||
| 995 | if (id == .generated) return .{ | ||
| 996 | .path = "<scratch space>", | ||
| 997 | .buf = comp.generated_buf.items, | ||
| 998 | .id = .generated, | ||
| 999 | .splice_locs = &.{}, | ||
| 1000 | .kind = .user, | ||
| 1001 | }; | ||
| 1002 | return comp.sources.values()[@intFromEnum(id) - 2]; | ||
| 1003 | } | ||
| 1004 | |||
| 1005 | /// Creates a Source from the contents of `reader` and adds it to the Compilation | ||
| 1006 | pub fn addSourceFromReader(comp: *Compilation, reader: anytype, path: []const u8, kind: Source.Kind) !Source { | ||
| 1007 | const contents = try reader.readAllAlloc(comp.gpa, std.math.maxInt(u32)); | ||
| 1008 | errdefer comp.gpa.free(contents); | ||
| 1009 | return comp.addSourceFromOwnedBuffer(contents, path, kind); | ||
| 1010 | } | ||
| 1011 | |||
| 1012 | /// Creates a Source from `buf` and adds it to the Compilation | ||
| 1013 | /// Performs newline splicing and line-ending normalization to '\n' | ||
| 1014 | /// `buf` will be modified and the allocation will be resized if newline splicing | ||
| 1015 | /// or line-ending changes happen. | ||
| 1016 | /// caller retains ownership of `path` | ||
| 1017 | /// To add the contents of an arbitrary reader as a Source, see addSourceFromReader | ||
| 1018 | /// To add a file's contents given its path, see addSourceFromPath | ||
| 1019 | pub fn addSourceFromOwnedBuffer(comp: *Compilation, buf: []u8, path: []const u8, kind: Source.Kind) !Source { | ||
| 1020 | try comp.sources.ensureUnusedCapacity(comp.gpa, 1); | ||
| 1021 | |||
| 1022 | var contents = buf; | ||
| 1023 | const duped_path = try comp.gpa.dupe(u8, path); | ||
| 1024 | errdefer comp.gpa.free(duped_path); | ||
| 1025 | |||
| 1026 | var splice_list = std.ArrayList(u32).init(comp.gpa); | ||
| 1027 | defer splice_list.deinit(); | ||
| 1028 | |||
| 1029 | const source_id: Source.Id = @enumFromInt(comp.sources.count() + 2); | ||
| 1030 | |||
| 1031 | var i: u32 = 0; | ||
| 1032 | var backslash_loc: u32 = undefined; | ||
| 1033 | var state: enum { | ||
| 1034 | beginning_of_file, | ||
| 1035 | bom1, | ||
| 1036 | bom2, | ||
| 1037 | start, | ||
| 1038 | back_slash, | ||
| 1039 | cr, | ||
| 1040 | back_slash_cr, | ||
| 1041 | trailing_ws, | ||
| 1042 | } = .beginning_of_file; | ||
| 1043 | var line: u32 = 1; | ||
| 1044 | |||
| 1045 | for (contents) |byte| { | ||
| 1046 | contents[i] = byte; | ||
| 1047 | |||
| 1048 | switch (byte) { | ||
| 1049 | '\r' => { | ||
| 1050 | switch (state) { | ||
| 1051 | .start, .cr, .beginning_of_file => { | ||
| 1052 | state = .start; | ||
| 1053 | line += 1; | ||
| 1054 | state = .cr; | ||
| 1055 | contents[i] = '\n'; | ||
| 1056 | i += 1; | ||
| 1057 | }, | ||
| 1058 | .back_slash, .trailing_ws, .back_slash_cr => { | ||
| 1059 | i = backslash_loc; | ||
| 1060 | try splice_list.append(i); | ||
| 1061 | if (state == .trailing_ws) { | ||
| 1062 | try comp.addDiagnostic(.{ | ||
| 1063 | .tag = .backslash_newline_escape, | ||
| 1064 | .loc = .{ .id = source_id, .byte_offset = i, .line = line }, | ||
| 1065 | }, &.{}); | ||
| 1066 | } | ||
| 1067 | state = if (state == .back_slash_cr) .cr else .back_slash_cr; | ||
| 1068 | }, | ||
| 1069 | .bom1, .bom2 => break, // invalid utf-8 | ||
| 1070 | } | ||
| 1071 | }, | ||
| 1072 | '\n' => { | ||
| 1073 | switch (state) { | ||
| 1074 | .start, .beginning_of_file => { | ||
| 1075 | state = .start; | ||
| 1076 | line += 1; | ||
| 1077 | i += 1; | ||
| 1078 | }, | ||
| 1079 | .cr, .back_slash_cr => {}, | ||
| 1080 | .back_slash, .trailing_ws => { | ||
| 1081 | i = backslash_loc; | ||
| 1082 | if (state == .back_slash or state == .trailing_ws) { | ||
| 1083 | try splice_list.append(i); | ||
| 1084 | } | ||
| 1085 | if (state == .trailing_ws) { | ||
| 1086 | try comp.addDiagnostic(.{ | ||
| 1087 | .tag = .backslash_newline_escape, | ||
| 1088 | .loc = .{ .id = source_id, .byte_offset = i, .line = line }, | ||
| 1089 | }, &.{}); | ||
| 1090 | } | ||
| 1091 | }, | ||
| 1092 | .bom1, .bom2 => break, | ||
| 1093 | } | ||
| 1094 | state = .start; | ||
| 1095 | }, | ||
| 1096 | '\\' => { | ||
| 1097 | backslash_loc = i; | ||
| 1098 | state = .back_slash; | ||
| 1099 | i += 1; | ||
| 1100 | }, | ||
| 1101 | '\t', '\x0B', '\x0C', ' ' => { | ||
| 1102 | switch (state) { | ||
| 1103 | .start, .trailing_ws => {}, | ||
| 1104 | .beginning_of_file => state = .start, | ||
| 1105 | .cr, .back_slash_cr => state = .start, | ||
| 1106 | .back_slash => state = .trailing_ws, | ||
| 1107 | .bom1, .bom2 => break, | ||
| 1108 | } | ||
| 1109 | i += 1; | ||
| 1110 | }, | ||
| 1111 | '\xEF' => { | ||
| 1112 | i += 1; | ||
| 1113 | state = switch (state) { | ||
| 1114 | .beginning_of_file => .bom1, | ||
| 1115 | else => .start, | ||
| 1116 | }; | ||
| 1117 | }, | ||
| 1118 | '\xBB' => { | ||
| 1119 | i += 1; | ||
| 1120 | state = switch (state) { | ||
| 1121 | .bom1 => .bom2, | ||
| 1122 | else => .start, | ||
| 1123 | }; | ||
| 1124 | }, | ||
| 1125 | '\xBF' => { | ||
| 1126 | switch (state) { | ||
| 1127 | .bom2 => i = 0, // rewind and overwrite the BOM | ||
| 1128 | else => i += 1, | ||
| 1129 | } | ||
| 1130 | state = .start; | ||
| 1131 | }, | ||
| 1132 | else => { | ||
| 1133 | i += 1; | ||
| 1134 | state = .start; | ||
| 1135 | }, | ||
| 1136 | } | ||
| 1137 | } | ||
| 1138 | |||
| 1139 | const splice_locs = try splice_list.toOwnedSlice(); | ||
| 1140 | errdefer comp.gpa.free(splice_locs); | ||
| 1141 | |||
| 1142 | if (i != contents.len) contents = try comp.gpa.realloc(contents, i); | ||
| 1143 | errdefer @compileError("errdefers in callers would possibly free the realloced slice using the original len"); | ||
| 1144 | |||
| 1145 | const source = Source{ | ||
| 1146 | .id = source_id, | ||
| 1147 | .path = duped_path, | ||
| 1148 | .buf = contents, | ||
| 1149 | .splice_locs = splice_locs, | ||
| 1150 | .kind = kind, | ||
| 1151 | }; | ||
| 1152 | |||
| 1153 | comp.sources.putAssumeCapacityNoClobber(duped_path, source); | ||
| 1154 | return source; | ||
| 1155 | } | ||
| 1156 | |||
| 1157 | /// Caller retains ownership of `path` and `buf`. | ||
| 1158 | /// Dupes the source buffer; if it is acceptable to modify the source buffer and possibly resize | ||
| 1159 | /// the allocation, please use `addSourceFromOwnedBuffer` | ||
| 1160 | pub fn addSourceFromBuffer(comp: *Compilation, path: []const u8, buf: []const u8) !Source { | ||
| 1161 | if (comp.sources.get(path)) |some| return some; | ||
| 1162 | if (@as(u64, buf.len) > std.math.maxInt(u32)) return error.StreamTooLong; | ||
| 1163 | |||
| 1164 | const contents = try comp.gpa.dupe(u8, buf); | ||
| 1165 | errdefer comp.gpa.free(contents); | ||
| 1166 | |||
| 1167 | return comp.addSourceFromOwnedBuffer(contents, path, .user); | ||
| 1168 | } | ||
| 1169 | |||
| 1170 | /// Caller retains ownership of `path`. | ||
| 1171 | pub fn addSourceFromPath(comp: *Compilation, path: []const u8) !Source { | ||
| 1172 | return comp.addSourceFromPathExtra(path, .user); | ||
| 1173 | } | ||
| 1174 | |||
| 1175 | /// Caller retains ownership of `path`. | ||
| 1176 | fn addSourceFromPathExtra(comp: *Compilation, path: []const u8, kind: Source.Kind) !Source { | ||
| 1177 | if (comp.sources.get(path)) |some| return some; | ||
| 1178 | |||
| 1179 | if (mem.indexOfScalar(u8, path, 0) != null) { | ||
| 1180 | return error.FileNotFound; | ||
| 1181 | } | ||
| 1182 | |||
| 1183 | const file = try std.fs.cwd().openFile(path, .{}); | ||
| 1184 | defer file.close(); | ||
| 1185 | |||
| 1186 | const contents = file.readToEndAlloc(comp.gpa, std.math.maxInt(u32)) catch |err| switch (err) { | ||
| 1187 | error.FileTooBig => return error.StreamTooLong, | ||
| 1188 | else => |e| return e, | ||
| 1189 | }; | ||
| 1190 | errdefer comp.gpa.free(contents); | ||
| 1191 | |||
| 1192 | return comp.addSourceFromOwnedBuffer(contents, path, kind); | ||
| 1193 | } | ||
| 1194 | |||
| 1195 | pub const IncludeDirIterator = struct { | ||
| 1196 | comp: *const Compilation, | ||
| 1197 | cwd_source_id: ?Source.Id, | ||
| 1198 | include_dirs_idx: usize = 0, | ||
| 1199 | sys_include_dirs_idx: usize = 0, | ||
| 1200 | tried_ms_cwd: bool = false, | ||
| 1201 | |||
| 1202 | const FoundSource = struct { | ||
| 1203 | path: []const u8, | ||
| 1204 | kind: Source.Kind, | ||
| 1205 | }; | ||
| 1206 | |||
| 1207 | fn next(self: *IncludeDirIterator) ?FoundSource { | ||
| 1208 | if (self.cwd_source_id) |source_id| { | ||
| 1209 | self.cwd_source_id = null; | ||
| 1210 | const path = self.comp.getSource(source_id).path; | ||
| 1211 | return .{ .path = std.fs.path.dirname(path) orelse ".", .kind = .user }; | ||
| 1212 | } | ||
| 1213 | if (self.include_dirs_idx < self.comp.include_dirs.items.len) { | ||
| 1214 | defer self.include_dirs_idx += 1; | ||
| 1215 | return .{ .path = self.comp.include_dirs.items[self.include_dirs_idx], .kind = .user }; | ||
| 1216 | } | ||
| 1217 | if (self.sys_include_dirs_idx < self.comp.system_include_dirs.items.len) { | ||
| 1218 | defer self.sys_include_dirs_idx += 1; | ||
| 1219 | return .{ .path = self.comp.system_include_dirs.items[self.sys_include_dirs_idx], .kind = .system }; | ||
| 1220 | } | ||
| 1221 | if (self.comp.ms_cwd_source_id) |source_id| { | ||
| 1222 | if (self.tried_ms_cwd) return null; | ||
| 1223 | self.tried_ms_cwd = true; | ||
| 1224 | const path = self.comp.getSource(source_id).path; | ||
| 1225 | return .{ .path = std.fs.path.dirname(path) orelse ".", .kind = .user }; | ||
| 1226 | } | ||
| 1227 | return null; | ||
| 1228 | } | ||
| 1229 | |||
| 1230 | /// Returned value's path field must be freed by allocator | ||
| 1231 | fn nextWithFile(self: *IncludeDirIterator, filename: []const u8, allocator: Allocator) !?FoundSource { | ||
| 1232 | while (self.next()) |found| { | ||
| 1233 | const path = try std.fs.path.join(allocator, &.{ found.path, filename }); | ||
| 1234 | if (self.comp.langopts.ms_extensions) { | ||
| 1235 | std.mem.replaceScalar(u8, path, '\\', '/'); | ||
| 1236 | } | ||
| 1237 | return .{ .path = path, .kind = found.kind }; | ||
| 1238 | } | ||
| 1239 | return null; | ||
| 1240 | } | ||
| 1241 | |||
| 1242 | /// Advance the iterator until it finds an include directory that matches | ||
| 1243 | /// the directory which contains `source`. | ||
| 1244 | fn skipUntilDirMatch(self: *IncludeDirIterator, source: Source.Id) void { | ||
| 1245 | const path = self.comp.getSource(source).path; | ||
| 1246 | const includer_path = std.fs.path.dirname(path) orelse "."; | ||
| 1247 | while (self.next()) |found| { | ||
| 1248 | if (mem.eql(u8, includer_path, found.path)) break; | ||
| 1249 | } | ||
| 1250 | } | ||
| 1251 | }; | ||
| 1252 | |||
| 1253 | pub fn hasInclude( | ||
| 1254 | comp: *const Compilation, | ||
| 1255 | filename: []const u8, | ||
| 1256 | includer_token_source: Source.Id, | ||
| 1257 | /// angle bracket vs quotes | ||
| 1258 | include_type: IncludeType, | ||
| 1259 | /// __has_include vs __has_include_next | ||
| 1260 | which: WhichInclude, | ||
| 1261 | ) !bool { | ||
| 1262 | const cwd = std.fs.cwd(); | ||
| 1263 | if (std.fs.path.isAbsolute(filename)) { | ||
| 1264 | if (which == .next) return false; | ||
| 1265 | return !std.meta.isError(cwd.access(filename, .{})); | ||
| 1266 | } | ||
| 1267 | |||
| 1268 | const cwd_source_id = switch (include_type) { | ||
| 1269 | .quotes => switch (which) { | ||
| 1270 | .first => includer_token_source, | ||
| 1271 | .next => null, | ||
| 1272 | }, | ||
| 1273 | .angle_brackets => null, | ||
| 1274 | }; | ||
| 1275 | var it = IncludeDirIterator{ .comp = comp, .cwd_source_id = cwd_source_id }; | ||
| 1276 | if (which == .next) { | ||
| 1277 | it.skipUntilDirMatch(includer_token_source); | ||
| 1278 | } | ||
| 1279 | |||
| 1280 | var stack_fallback = std.heap.stackFallback(path_buf_stack_limit, comp.gpa); | ||
| 1281 | |||
| 1282 | while (try it.nextWithFile(filename, stack_fallback.get())) |found| { | ||
| 1283 | defer stack_fallback.get().free(found.path); | ||
| 1284 | if (!std.meta.isError(cwd.access(found.path, .{}))) return true; | ||
| 1285 | } | ||
| 1286 | return false; | ||
| 1287 | } | ||
| 1288 | |||
| 1289 | pub const WhichInclude = enum { | ||
| 1290 | first, | ||
| 1291 | next, | ||
| 1292 | }; | ||
| 1293 | |||
| 1294 | pub const IncludeType = enum { | ||
| 1295 | quotes, | ||
| 1296 | angle_brackets, | ||
| 1297 | }; | ||
| 1298 | |||
| 1299 | fn getFileContents(comp: *Compilation, path: []const u8, limit: ?u32) ![]const u8 { | ||
| 1300 | if (mem.indexOfScalar(u8, path, 0) != null) { | ||
| 1301 | return error.FileNotFound; | ||
| 1302 | } | ||
| 1303 | |||
| 1304 | const file = try std.fs.cwd().openFile(path, .{}); | ||
| 1305 | defer file.close(); | ||
| 1306 | |||
| 1307 | var buf = std.ArrayList(u8).init(comp.gpa); | ||
| 1308 | defer buf.deinit(); | ||
| 1309 | |||
| 1310 | const max = limit orelse std.math.maxInt(u32); | ||
| 1311 | file.reader().readAllArrayList(&buf, max) catch |e| switch (e) { | ||
| 1312 | error.StreamTooLong => if (limit == null) return e, | ||
| 1313 | else => return e, | ||
| 1314 | }; | ||
| 1315 | |||
| 1316 | return buf.toOwnedSlice(); | ||
| 1317 | } | ||
| 1318 | |||
| 1319 | pub fn findEmbed( | ||
| 1320 | comp: *Compilation, | ||
| 1321 | filename: []const u8, | ||
| 1322 | includer_token_source: Source.Id, | ||
| 1323 | /// angle bracket vs quotes | ||
| 1324 | include_type: IncludeType, | ||
| 1325 | limit: ?u32, | ||
| 1326 | ) !?[]const u8 { | ||
| 1327 | if (std.fs.path.isAbsolute(filename)) { | ||
| 1328 | return if (comp.getFileContents(filename, limit)) |some| | ||
| 1329 | some | ||
| 1330 | else |err| switch (err) { | ||
| 1331 | error.OutOfMemory => |e| return e, | ||
| 1332 | else => null, | ||
| 1333 | }; | ||
| 1334 | } | ||
| 1335 | |||
| 1336 | const cwd_source_id = switch (include_type) { | ||
| 1337 | .quotes => includer_token_source, | ||
| 1338 | .angle_brackets => null, | ||
| 1339 | }; | ||
| 1340 | var it = IncludeDirIterator{ .comp = comp, .cwd_source_id = cwd_source_id }; | ||
| 1341 | var stack_fallback = std.heap.stackFallback(path_buf_stack_limit, comp.gpa); | ||
| 1342 | |||
| 1343 | while (try it.nextWithFile(filename, stack_fallback.get())) |found| { | ||
| 1344 | defer stack_fallback.get().free(found.path); | ||
| 1345 | if (comp.getFileContents(found.path, limit)) |some| | ||
| 1346 | return some | ||
| 1347 | else |err| switch (err) { | ||
| 1348 | error.OutOfMemory => return error.OutOfMemory, | ||
| 1349 | else => {}, | ||
| 1350 | } | ||
| 1351 | } | ||
| 1352 | return null; | ||
| 1353 | } | ||
| 1354 | |||
| 1355 | pub fn findInclude( | ||
| 1356 | comp: *Compilation, | ||
| 1357 | filename: []const u8, | ||
| 1358 | includer_token: Token, | ||
| 1359 | /// angle bracket vs quotes | ||
| 1360 | include_type: IncludeType, | ||
| 1361 | /// include vs include_next | ||
| 1362 | which: WhichInclude, | ||
| 1363 | ) !?Source { | ||
| 1364 | if (std.fs.path.isAbsolute(filename)) { | ||
| 1365 | if (which == .next) return null; | ||
| 1366 | // TODO: classify absolute file as belonging to system includes or not? | ||
| 1367 | return if (comp.addSourceFromPath(filename)) |some| | ||
| 1368 | some | ||
| 1369 | else |err| switch (err) { | ||
| 1370 | error.OutOfMemory => |e| return e, | ||
| 1371 | else => null, | ||
| 1372 | }; | ||
| 1373 | } | ||
| 1374 | const cwd_source_id = switch (include_type) { | ||
| 1375 | .quotes => switch (which) { | ||
| 1376 | .first => includer_token.source, | ||
| 1377 | .next => null, | ||
| 1378 | }, | ||
| 1379 | .angle_brackets => null, | ||
| 1380 | }; | ||
| 1381 | var it = IncludeDirIterator{ .comp = comp, .cwd_source_id = cwd_source_id }; | ||
| 1382 | |||
| 1383 | if (which == .next) { | ||
| 1384 | it.skipUntilDirMatch(includer_token.source); | ||
| 1385 | } | ||
| 1386 | |||
| 1387 | var stack_fallback = std.heap.stackFallback(path_buf_stack_limit, comp.gpa); | ||
| 1388 | while (try it.nextWithFile(filename, stack_fallback.get())) |found| { | ||
| 1389 | defer stack_fallback.get().free(found.path); | ||
| 1390 | if (comp.addSourceFromPathExtra(found.path, found.kind)) |some| { | ||
| 1391 | if (it.tried_ms_cwd) { | ||
| 1392 | try comp.addDiagnostic(.{ | ||
| 1393 | .tag = .ms_search_rule, | ||
| 1394 | .extra = .{ .str = some.path }, | ||
| 1395 | .loc = .{ | ||
| 1396 | .id = includer_token.source, | ||
| 1397 | .byte_offset = includer_token.start, | ||
| 1398 | .line = includer_token.line, | ||
| 1399 | }, | ||
| 1400 | }, &.{}); | ||
| 1401 | } | ||
| 1402 | return some; | ||
| 1403 | } else |err| switch (err) { | ||
| 1404 | error.OutOfMemory => return error.OutOfMemory, | ||
| 1405 | else => {}, | ||
| 1406 | } | ||
| 1407 | } | ||
| 1408 | return null; | ||
| 1409 | } | ||
| 1410 | |||
| 1411 | pub fn addPragmaHandler(comp: *Compilation, name: []const u8, handler: *Pragma) Allocator.Error!void { | ||
| 1412 | try comp.pragma_handlers.putNoClobber(comp.gpa, name, handler); | ||
| 1413 | } | ||
| 1414 | |||
| 1415 | pub fn addDefaultPragmaHandlers(comp: *Compilation) Allocator.Error!void { | ||
| 1416 | const GCC = @import("pragmas/gcc.zig"); | ||
| 1417 | var gcc = try GCC.init(comp.gpa); | ||
| 1418 | errdefer gcc.deinit(gcc, comp); | ||
| 1419 | |||
| 1420 | const Once = @import("pragmas/once.zig"); | ||
| 1421 | var once = try Once.init(comp.gpa); | ||
| 1422 | errdefer once.deinit(once, comp); | ||
| 1423 | |||
| 1424 | const Message = @import("pragmas/message.zig"); | ||
| 1425 | var message = try Message.init(comp.gpa); | ||
| 1426 | errdefer message.deinit(message, comp); | ||
| 1427 | |||
| 1428 | const Pack = @import("pragmas/pack.zig"); | ||
| 1429 | var pack = try Pack.init(comp.gpa); | ||
| 1430 | errdefer pack.deinit(pack, comp); | ||
| 1431 | |||
| 1432 | try comp.addPragmaHandler("GCC", gcc); | ||
| 1433 | try comp.addPragmaHandler("once", once); | ||
| 1434 | try comp.addPragmaHandler("message", message); | ||
| 1435 | try comp.addPragmaHandler("pack", pack); | ||
| 1436 | } | ||
| 1437 | |||
| 1438 | pub fn getPragma(comp: *Compilation, name: []const u8) ?*Pragma { | ||
| 1439 | return comp.pragma_handlers.get(name); | ||
| 1440 | } | ||
| 1441 | |||
| 1442 | const PragmaEvent = enum { | ||
| 1443 | before_preprocess, | ||
| 1444 | before_parse, | ||
| 1445 | after_parse, | ||
| 1446 | }; | ||
| 1447 | |||
| 1448 | pub fn pragmaEvent(comp: *Compilation, event: PragmaEvent) void { | ||
| 1449 | for (comp.pragma_handlers.values()) |pragma| { | ||
| 1450 | const maybe_func = switch (event) { | ||
| 1451 | .before_preprocess => pragma.beforePreprocess, | ||
| 1452 | .before_parse => pragma.beforeParse, | ||
| 1453 | .after_parse => pragma.afterParse, | ||
| 1454 | }; | ||
| 1455 | if (maybe_func) |func| func(pragma, comp); | ||
| 1456 | } | ||
| 1457 | } | ||
| 1458 | |||
| 1459 | pub fn hasBuiltin(comp: *const Compilation, name: []const u8) bool { | ||
| 1460 | if (std.mem.eql(u8, name, "__builtin_va_arg") or | ||
| 1461 | std.mem.eql(u8, name, "__builtin_choose_expr") or | ||
| 1462 | std.mem.eql(u8, name, "__builtin_bitoffsetof") or | ||
| 1463 | std.mem.eql(u8, name, "__builtin_offsetof") or | ||
| 1464 | std.mem.eql(u8, name, "__builtin_types_compatible_p")) return true; | ||
| 1465 | |||
| 1466 | const builtin = Builtin.fromName(name) orelse return false; | ||
| 1467 | return comp.hasBuiltinFunction(builtin); | ||
| 1468 | } | ||
| 1469 | |||
| 1470 | pub fn hasBuiltinFunction(comp: *const Compilation, builtin: Builtin) bool { | ||
| 1471 | if (!target_util.builtinEnabled(comp.target, builtin.properties.target_set)) return false; | ||
| 1472 | |||
| 1473 | switch (builtin.properties.language) { | ||
| 1474 | .all_languages => return true, | ||
| 1475 | .all_ms_languages => return comp.langopts.emulate == .msvc, | ||
| 1476 | .gnu_lang, .all_gnu_languages => return comp.langopts.standard.isGNU(), | ||
| 1477 | } | ||
| 1478 | } | ||
| 1479 | |||
| 1480 | pub const CharUnitSize = enum(u32) { | ||
| 1481 | @"1" = 1, | ||
| 1482 | @"2" = 2, | ||
| 1483 | @"4" = 4, | ||
| 1484 | |||
| 1485 | pub fn Type(comptime self: CharUnitSize) type { | ||
| 1486 | return switch (self) { | ||
| 1487 | .@"1" => u8, | ||
| 1488 | .@"2" => u16, | ||
| 1489 | .@"4" => u32, | ||
| 1490 | }; | ||
| 1491 | } | ||
| 1492 | }; | ||
| 1493 | |||
| 1494 | pub const addDiagnostic = Diagnostics.add; | ||
| 1495 | |||
| 1496 | test "addSourceFromReader" { | ||
| 1497 | const Test = struct { | ||
| 1498 | fn addSourceFromReader(str: []const u8, expected: []const u8, warning_count: u32, splices: []const u32) !void { | ||
| 1499 | var comp = Compilation.init(std.testing.allocator); | ||
| 1500 | defer comp.deinit(); | ||
| 1501 | |||
| 1502 | var buf_reader = std.io.fixedBufferStream(str); | ||
| 1503 | const source = try comp.addSourceFromReader(buf_reader.reader(), "path", .user); | ||
| 1504 | |||
| 1505 | try std.testing.expectEqualStrings(expected, source.buf); | ||
| 1506 | try std.testing.expectEqual(warning_count, @as(u32, @intCast(comp.diagnostics.list.items.len))); | ||
| 1507 | try std.testing.expectEqualSlices(u32, splices, source.splice_locs); | ||
| 1508 | } | ||
| 1509 | |||
| 1510 | fn withAllocationFailures(allocator: std.mem.Allocator) !void { | ||
| 1511 | var comp = Compilation.init(allocator); | ||
| 1512 | defer comp.deinit(); | ||
| 1513 | |||
| 1514 | _ = try comp.addSourceFromBuffer("path", "spliced\\\nbuffer\n"); | ||
| 1515 | _ = try comp.addSourceFromBuffer("path", "non-spliced buffer\n"); | ||
| 1516 | } | ||
| 1517 | }; | ||
| 1518 | try Test.addSourceFromReader("ab\\\nc", "abc", 0, &.{2}); | ||
| 1519 | try Test.addSourceFromReader("ab\\\rc", "abc", 0, &.{2}); | ||
| 1520 | try Test.addSourceFromReader("ab\\\r\nc", "abc", 0, &.{2}); | ||
| 1521 | try Test.addSourceFromReader("ab\\ \nc", "abc", 1, &.{2}); | ||
| 1522 | try Test.addSourceFromReader("ab\\\t\nc", "abc", 1, &.{2}); | ||
| 1523 | try Test.addSourceFromReader("ab\\ \t\nc", "abc", 1, &.{2}); | ||
| 1524 | try Test.addSourceFromReader("ab\\\r \nc", "ab \nc", 0, &.{2}); | ||
| 1525 | try Test.addSourceFromReader("ab\\\\\nc", "ab\\c", 0, &.{3}); | ||
| 1526 | try Test.addSourceFromReader("ab\\ \r\nc", "abc", 1, &.{2}); | ||
| 1527 | try Test.addSourceFromReader("ab\\ \\\nc", "ab\\ c", 0, &.{4}); | ||
| 1528 | try Test.addSourceFromReader("ab\\\r\\\nc", "abc", 0, &.{ 2, 2 }); | ||
| 1529 | try Test.addSourceFromReader("ab\\ \rc", "abc", 1, &.{2}); | ||
| 1530 | try Test.addSourceFromReader("ab\\", "ab\\", 0, &.{}); | ||
| 1531 | try Test.addSourceFromReader("ab\\\\", "ab\\\\", 0, &.{}); | ||
| 1532 | try Test.addSourceFromReader("ab\\ ", "ab\\ ", 0, &.{}); | ||
| 1533 | try Test.addSourceFromReader("ab\\\n", "ab", 0, &.{2}); | ||
| 1534 | try Test.addSourceFromReader("ab\\\r\n", "ab", 0, &.{2}); | ||
| 1535 | try Test.addSourceFromReader("ab\\\r", "ab", 0, &.{2}); | ||
| 1536 | |||
| 1537 | // carriage return normalization | ||
| 1538 | try Test.addSourceFromReader("ab\r", "ab\n", 0, &.{}); | ||
| 1539 | try Test.addSourceFromReader("ab\r\r", "ab\n\n", 0, &.{}); | ||
| 1540 | try Test.addSourceFromReader("ab\r\r\n", "ab\n\n", 0, &.{}); | ||
| 1541 | try Test.addSourceFromReader("ab\r\r\n\r", "ab\n\n\n", 0, &.{}); | ||
| 1542 | try Test.addSourceFromReader("\r\\", "\n\\", 0, &.{}); | ||
| 1543 | try Test.addSourceFromReader("\\\r\\", "\\", 0, &.{0}); | ||
| 1544 | |||
| 1545 | try std.testing.checkAllAllocationFailures(std.testing.allocator, Test.withAllocationFailures, .{}); | ||
| 1546 | } | ||
| 1547 | |||
| 1548 | test "addSourceFromReader - exhaustive check for carriage return elimination" { | ||
| 1549 | const alphabet = [_]u8{ '\r', '\n', ' ', '\\', 'a' }; | ||
| 1550 | const alen = alphabet.len; | ||
| 1551 | var buf: [alphabet.len]u8 = [1]u8{alphabet[0]} ** alen; | ||
| 1552 | |||
| 1553 | var comp = Compilation.init(std.testing.allocator); | ||
| 1554 | defer comp.deinit(); | ||
| 1555 | |||
| 1556 | var source_count: u32 = 0; | ||
| 1557 | |||
| 1558 | while (true) { | ||
| 1559 | const source = try comp.addSourceFromBuffer(&buf, &buf); | ||
| 1560 | source_count += 1; | ||
| 1561 | try std.testing.expect(std.mem.indexOfScalar(u8, source.buf, '\r') == null); | ||
| 1562 | |||
| 1563 | if (std.mem.allEqual(u8, &buf, alphabet[alen - 1])) break; | ||
| 1564 | |||
| 1565 | var idx = std.mem.indexOfScalar(u8, &alphabet, buf[buf.len - 1]).?; | ||
| 1566 | buf[buf.len - 1] = alphabet[(idx + 1) % alen]; | ||
| 1567 | var j = buf.len - 1; | ||
| 1568 | while (j > 0) : (j -= 1) { | ||
| 1569 | idx = std.mem.indexOfScalar(u8, &alphabet, buf[j - 1]).?; | ||
| 1570 | if (buf[j] == alphabet[0]) buf[j - 1] = alphabet[(idx + 1) % alen] else break; | ||
| 1571 | } | ||
| 1572 | } | ||
| 1573 | try std.testing.expect(source_count == std.math.powi(usize, alen, alen) catch unreachable); | ||
| 1574 | } | ||
| 1575 | |||
| 1576 | test "ignore BOM at beginning of file" { | ||
| 1577 | const BOM = "\xEF\xBB\xBF"; | ||
| 1578 | |||
| 1579 | const Test = struct { | ||
| 1580 | fn run(buf: []const u8) !void { | ||
| 1581 | var comp = Compilation.init(std.testing.allocator); | ||
| 1582 | defer comp.deinit(); | ||
| 1583 | |||
| 1584 | var buf_reader = std.io.fixedBufferStream(buf); | ||
| 1585 | const source = try comp.addSourceFromReader(buf_reader.reader(), "file.c", .user); | ||
| 1586 | const expected_output = if (mem.startsWith(u8, buf, BOM)) buf[BOM.len..] else buf; | ||
| 1587 | try std.testing.expectEqualStrings(expected_output, source.buf); | ||
| 1588 | } | ||
| 1589 | }; | ||
| 1590 | |||
| 1591 | try Test.run(BOM); | ||
| 1592 | try Test.run(BOM ++ "x"); | ||
| 1593 | try Test.run("x" ++ BOM); | ||
| 1594 | try Test.run(BOM ++ " "); | ||
| 1595 | try Test.run(BOM ++ "\n"); | ||
| 1596 | try Test.run(BOM ++ "\\"); | ||
| 1597 | |||
| 1598 | try Test.run(BOM[0..1] ++ "x"); | ||
| 1599 | try Test.run(BOM[0..2] ++ "x"); | ||
| 1600 | try Test.run(BOM[1..] ++ "x"); | ||
| 1601 | try Test.run(BOM[2..] ++ "x"); | ||
| 1602 | } | ||
deps/aro/aro/Diagnostics.zig created+588| ... | @@ -0,0 +1,588 @@ | ||
| 1 | const std = @import("std"); | ||
| 2 | const Allocator = mem.Allocator; | ||
| 3 | const mem = std.mem; | ||
| 4 | const Source = @import("Source.zig"); | ||
| 5 | const Compilation = @import("Compilation.zig"); | ||
| 6 | const Attribute = @import("Attribute.zig"); | ||
| 7 | const Builtins = @import("Builtins.zig"); | ||
| 8 | const Builtin = Builtins.Builtin; | ||
| 9 | const Header = @import("Builtins/Properties.zig").Header; | ||
| 10 | const Tree = @import("Tree.zig"); | ||
| 11 | const is_windows = @import("builtin").os.tag == .windows; | ||
| 12 | const LangOpts = @import("LangOpts.zig"); | ||
| 13 | |||
| 14 | pub const Message = struct { | ||
| 15 | tag: Tag, | ||
| 16 | kind: Kind = undefined, | ||
| 17 | loc: Source.Location = .{}, | ||
| 18 | extra: Extra = .{ .none = {} }, | ||
| 19 | |||
| 20 | pub const Extra = union { | ||
| 21 | str: []const u8, | ||
| 22 | tok_id: struct { | ||
| 23 | expected: Tree.Token.Id, | ||
| 24 | actual: Tree.Token.Id, | ||
| 25 | }, | ||
| 26 | tok_id_expected: Tree.Token.Id, | ||
| 27 | arguments: struct { | ||
| 28 | expected: u32, | ||
| 29 | actual: u32, | ||
| 30 | }, | ||
| 31 | codepoints: struct { | ||
| 32 | actual: u21, | ||
| 33 | resembles: u21, | ||
| 34 | }, | ||
| 35 | attr_arg_count: struct { | ||
| 36 | attribute: Attribute.Tag, | ||
| 37 | expected: u32, | ||
| 38 | }, | ||
| 39 | attr_arg_type: struct { | ||
| 40 | expected: Attribute.ArgumentType, | ||
| 41 | actual: Attribute.ArgumentType, | ||
| 42 | }, | ||
| 43 | attr_enum: struct { | ||
| 44 | tag: Attribute.Tag, | ||
| 45 | }, | ||
| 46 | ignored_record_attr: struct { | ||
| 47 | tag: Attribute.Tag, | ||
| 48 | specifier: enum { @"struct", @"union", @"enum" }, | ||
| 49 | }, | ||
| 50 | builtin_with_header: struct { | ||
| 51 | builtin: Builtin.Tag, | ||
| 52 | header: Header, | ||
| 53 | }, | ||
| 54 | invalid_escape: struct { | ||
| 55 | offset: u32, | ||
| 56 | char: u8, | ||
| 57 | }, | ||
| 58 | actual_codepoint: u21, | ||
| 59 | ascii: u7, | ||
| 60 | unsigned: u64, | ||
| 61 | offset: u64, | ||
| 62 | pow_2_as_string: u8, | ||
| 63 | signed: i64, | ||
| 64 | normalized: []const u8, | ||
| 65 | none: void, | ||
| 66 | }; | ||
| 67 | }; | ||
| 68 | |||
| 69 | const Properties = struct { | ||
| 70 | msg: []const u8, | ||
| 71 | kind: Kind, | ||
| 72 | extra: std.meta.FieldEnum(Message.Extra) = .none, | ||
| 73 | opt: ?u8 = null, | ||
| 74 | all: bool = false, | ||
| 75 | w_extra: bool = false, | ||
| 76 | pedantic: bool = false, | ||
| 77 | suppress_version: ?LangOpts.Standard = null, | ||
| 78 | suppress_unless_version: ?LangOpts.Standard = null, | ||
| 79 | suppress_gnu: bool = false, | ||
| 80 | suppress_gcc: bool = false, | ||
| 81 | suppress_clang: bool = false, | ||
| 82 | suppress_msvc: bool = false, | ||
| 83 | |||
| 84 | pub fn makeOpt(comptime str: []const u8) u16 { | ||
| 85 | return @offsetOf(Options, str); | ||
| 86 | } | ||
| 87 | pub fn getKind(prop: Properties, options: *Options) Kind { | ||
| 88 | const opt = @as([*]Kind, @ptrCast(options))[prop.opt orelse return prop.kind]; | ||
| 89 | if (opt == .default) return prop.kind; | ||
| 90 | return opt; | ||
| 91 | } | ||
| 92 | pub const max_bits = Compilation.bit_int_max_bits; | ||
| 93 | }; | ||
| 94 | |||
| 95 | pub const Tag = @import("Diagnostics/messages.def").with(Properties).Tag; | ||
| 96 | |||
| 97 | pub const Kind = enum { @"fatal error", @"error", note, warning, off, default }; | ||
| 98 | |||
| 99 | pub const Options = struct { | ||
| 100 | // do not directly use these, instead add `const NAME = true;` | ||
| 101 | all: Kind = .default, | ||
| 102 | extra: Kind = .default, | ||
| 103 | pedantic: Kind = .default, | ||
| 104 | |||
| 105 | @"unsupported-pragma": Kind = .default, | ||
| 106 | @"c99-extensions": Kind = .default, | ||
| 107 | @"implicit-int": Kind = .default, | ||
| 108 | @"duplicate-decl-specifier": Kind = .default, | ||
| 109 | @"missing-declaration": Kind = .default, | ||
| 110 | @"extern-initializer": Kind = .default, | ||
| 111 | @"implicit-function-declaration": Kind = .default, | ||
| 112 | @"unused-value": Kind = .default, | ||
| 113 | @"unreachable-code": Kind = .default, | ||
| 114 | @"unknown-warning-option": Kind = .default, | ||
| 115 | @"gnu-empty-struct": Kind = .default, | ||
| 116 | @"gnu-alignof-expression": Kind = .default, | ||
| 117 | @"macro-redefined": Kind = .default, | ||
| 118 | @"generic-qual-type": Kind = .default, | ||
| 119 | multichar: Kind = .default, | ||
| 120 | @"pointer-integer-compare": Kind = .default, | ||
| 121 | @"compare-distinct-pointer-types": Kind = .default, | ||
| 122 | @"literal-conversion": Kind = .default, | ||
| 123 | @"cast-qualifiers": Kind = .default, | ||
| 124 | @"array-bounds": Kind = .default, | ||
| 125 | @"int-conversion": Kind = .default, | ||
| 126 | @"pointer-type-mismatch": Kind = .default, | ||
| 127 | @"c23-extensions": Kind = .default, | ||
| 128 | @"incompatible-pointer-types": Kind = .default, | ||
| 129 | @"excess-initializers": Kind = .default, | ||
| 130 | @"division-by-zero": Kind = .default, | ||
| 131 | @"initializer-overrides": Kind = .default, | ||
| 132 | @"incompatible-pointer-types-discards-qualifiers": Kind = .default, | ||
| 133 | @"unknown-attributes": Kind = .default, | ||
| 134 | @"ignored-attributes": Kind = .default, | ||
| 135 | @"builtin-macro-redefined": Kind = .default, | ||
| 136 | @"gnu-label-as-value": Kind = .default, | ||
| 137 | @"malformed-warning-check": Kind = .default, | ||
| 138 | @"#pragma-messages": Kind = .default, | ||
| 139 | @"newline-eof": Kind = .default, | ||
| 140 | @"empty-translation-unit": Kind = .default, | ||
| 141 | @"implicitly-unsigned-literal": Kind = .default, | ||
| 142 | @"c99-compat": Kind = .default, | ||
| 143 | @"unicode-zero-width": Kind = .default, | ||
| 144 | @"unicode-homoglyph": Kind = .default, | ||
| 145 | unicode: Kind = .default, | ||
| 146 | @"return-type": Kind = .default, | ||
| 147 | @"dollar-in-identifier-extension": Kind = .default, | ||
| 148 | @"unknown-pragmas": Kind = .default, | ||
| 149 | @"predefined-identifier-outside-function": Kind = .default, | ||
| 150 | @"many-braces-around-scalar-init": Kind = .default, | ||
| 151 | uninitialized: Kind = .default, | ||
| 152 | @"gnu-statement-expression": Kind = .default, | ||
| 153 | @"gnu-imaginary-constant": Kind = .default, | ||
| 154 | @"gnu-complex-integer": Kind = .default, | ||
| 155 | @"ignored-qualifiers": Kind = .default, | ||
| 156 | @"integer-overflow": Kind = .default, | ||
| 157 | @"extra-semi": Kind = .default, | ||
| 158 | @"gnu-binary-literal": Kind = .default, | ||
| 159 | @"variadic-macros": Kind = .default, | ||
| 160 | varargs: Kind = .default, | ||
| 161 | @"#warnings": Kind = .default, | ||
| 162 | @"deprecated-declarations": Kind = .default, | ||
| 163 | @"backslash-newline-escape": Kind = .default, | ||
| 164 | @"pointer-to-int-cast": Kind = .default, | ||
| 165 | @"gnu-case-range": Kind = .default, | ||
| 166 | @"c++-compat": Kind = .default, | ||
| 167 | vla: Kind = .default, | ||
| 168 | @"float-overflow-conversion": Kind = .default, | ||
| 169 | @"float-zero-conversion": Kind = .default, | ||
| 170 | @"float-conversion": Kind = .default, | ||
| 171 | @"gnu-folding-constant": Kind = .default, | ||
| 172 | undef: Kind = .default, | ||
| 173 | @"ignored-pragmas": Kind = .default, | ||
| 174 | @"gnu-include-next": Kind = .default, | ||
| 175 | @"include-next-outside-header": Kind = .default, | ||
| 176 | @"include-next-absolute-path": Kind = .default, | ||
| 177 | @"enum-too-large": Kind = .default, | ||
| 178 | @"fixed-enum-extension": Kind = .default, | ||
| 179 | @"designated-init": Kind = .default, | ||
| 180 | @"attribute-warning": Kind = .default, | ||
| 181 | @"invalid-noreturn": Kind = .default, | ||
| 182 | @"zero-length-array": Kind = .default, | ||
| 183 | @"old-style-flexible-struct": Kind = .default, | ||
| 184 | @"gnu-zero-variadic-macro-arguments": Kind = .default, | ||
| 185 | @"main-return-type": Kind = .default, | ||
| 186 | @"expansion-to-defined": Kind = .default, | ||
| 187 | @"bit-int-extension": Kind = .default, | ||
| 188 | @"keyword-macro": Kind = .default, | ||
| 189 | @"pointer-arith": Kind = .default, | ||
| 190 | @"sizeof-array-argument": Kind = .default, | ||
| 191 | @"pre-c23-compat": Kind = .default, | ||
| 192 | @"pointer-bool-conversion": Kind = .default, | ||
| 193 | @"string-conversion": Kind = .default, | ||
| 194 | @"gnu-auto-type": Kind = .default, | ||
| 195 | @"gnu-union-cast": Kind = .default, | ||
| 196 | @"pointer-sign": Kind = .default, | ||
| 197 | @"fuse-ld-path": Kind = .default, | ||
| 198 | @"language-extension-token": Kind = .default, | ||
| 199 | @"complex-component-init": Kind = .default, | ||
| 200 | @"microsoft-include": Kind = .default, | ||
| 201 | @"microsoft-end-of-file": Kind = .default, | ||
| 202 | @"invalid-source-encoding": Kind = .default, | ||
| 203 | @"four-char-constants": Kind = .default, | ||
| 204 | @"unknown-escape-sequence": Kind = .default, | ||
| 205 | @"invalid-pp-token": Kind = .default, | ||
| 206 | @"deprecated-non-prototype": Kind = .default, | ||
| 207 | @"duplicate-embed-param": Kind = .default, | ||
| 208 | @"unsupported-embed-param": Kind = .default, | ||
| 209 | @"unused-result": Kind = .default, | ||
| 210 | normalized: Kind = .default, | ||
| 211 | }; | ||
| 212 | |||
| 213 | const Diagnostics = @This(); | ||
| 214 | |||
| 215 | list: std.ArrayListUnmanaged(Message) = .{}, | ||
| 216 | arena: std.heap.ArenaAllocator, | ||
| 217 | fatal_errors: bool = false, | ||
| 218 | options: Options = .{}, | ||
| 219 | errors: u32 = 0, | ||
| 220 | macro_backtrace_limit: u32 = 6, | ||
| 221 | |||
| 222 | pub fn warningExists(name: []const u8) bool { | ||
| 223 | inline for (std.meta.fields(Options)) |f| { | ||
| 224 | if (mem.eql(u8, f.name, name)) return true; | ||
| 225 | } | ||
| 226 | return false; | ||
| 227 | } | ||
| 228 | |||
| 229 | pub fn set(d: *Diagnostics, name: []const u8, to: Kind) !void { | ||
| 230 | inline for (std.meta.fields(Options)) |f| { | ||
| 231 | if (mem.eql(u8, f.name, name)) { | ||
| 232 | @field(d.options, f.name) = to; | ||
| 233 | return; | ||
| 234 | } | ||
| 235 | } | ||
| 236 | try d.addExtra(.{}, .{ | ||
| 237 | .tag = .unknown_warning, | ||
| 238 | .extra = .{ .str = name }, | ||
| 239 | }, &.{}); | ||
| 240 | } | ||
| 241 | |||
| 242 | pub fn init(gpa: Allocator) Diagnostics { | ||
| 243 | return .{ | ||
| 244 | .arena = std.heap.ArenaAllocator.init(gpa), | ||
| 245 | }; | ||
| 246 | } | ||
| 247 | |||
| 248 | pub fn deinit(d: *Diagnostics) void { | ||
| 249 | d.list.deinit(d.arena.child_allocator); | ||
| 250 | d.arena.deinit(); | ||
| 251 | } | ||
| 252 | |||
| 253 | pub fn add(comp: *Compilation, msg: Message, expansion_locs: []const Source.Location) Compilation.Error!void { | ||
| 254 | return comp.diagnostics.addExtra(comp.langopts, msg, expansion_locs); | ||
| 255 | } | ||
| 256 | |||
| 257 | pub fn addExtra( | ||
| 258 | d: *Diagnostics, | ||
| 259 | langopts: LangOpts, | ||
| 260 | msg: Message, | ||
| 261 | expansion_locs: []const Source.Location, | ||
| 262 | ) Compilation.Error!void { | ||
| 263 | const kind = d.tagKind(msg.tag, langopts); | ||
| 264 | if (kind == .off) return; | ||
| 265 | var copy = msg; | ||
| 266 | copy.kind = kind; | ||
| 267 | |||
| 268 | if (expansion_locs.len != 0) copy.loc = expansion_locs[expansion_locs.len - 1]; | ||
| 269 | try d.list.append(d.arena.child_allocator, copy); | ||
| 270 | if (expansion_locs.len != 0) { | ||
| 271 | // Add macro backtrace notes in reverse order omitting from the middle if needed. | ||
| 272 | var i = expansion_locs.len - 1; | ||
| 273 | const half = d.macro_backtrace_limit / 2; | ||
| 274 | const limit = if (i < d.macro_backtrace_limit) 0 else i - half; | ||
| 275 | try d.list.ensureUnusedCapacity( | ||
| 276 | d.arena.child_allocator, | ||
| 277 | if (limit == 0) expansion_locs.len else d.macro_backtrace_limit + 1, | ||
| 278 | ); | ||
| 279 | while (i > limit) { | ||
| 280 | i -= 1; | ||
| 281 | d.list.appendAssumeCapacity(.{ | ||
| 282 | .tag = .expanded_from_here, | ||
| 283 | .kind = .note, | ||
| 284 | .loc = expansion_locs[i], | ||
| 285 | }); | ||
| 286 | } | ||
| 287 | if (limit != 0) { | ||
| 288 | d.list.appendAssumeCapacity(.{ | ||
| 289 | .tag = .skipping_macro_backtrace, | ||
| 290 | .kind = .note, | ||
| 291 | .extra = .{ .unsigned = expansion_locs.len - d.macro_backtrace_limit }, | ||
| 292 | }); | ||
| 293 | i = half - 1; | ||
| 294 | while (i > 0) { | ||
| 295 | i -= 1; | ||
| 296 | d.list.appendAssumeCapacity(.{ | ||
| 297 | .tag = .expanded_from_here, | ||
| 298 | .kind = .note, | ||
| 299 | .loc = expansion_locs[i], | ||
| 300 | }); | ||
| 301 | } | ||
| 302 | } | ||
| 303 | |||
| 304 | d.list.appendAssumeCapacity(.{ | ||
| 305 | .tag = .expanded_from_here, | ||
| 306 | .kind = .note, | ||
| 307 | .loc = msg.loc, | ||
| 308 | }); | ||
| 309 | } | ||
| 310 | if (kind == .@"fatal error" or (kind == .@"error" and d.fatal_errors)) | ||
| 311 | return error.FatalError; | ||
| 312 | } | ||
| 313 | |||
| 314 | pub fn render(comp: *Compilation, config: std.io.tty.Config) void { | ||
| 315 | if (comp.diagnostics.list.items.len == 0) return; | ||
| 316 | var m = defaultMsgWriter(config); | ||
| 317 | defer m.deinit(); | ||
| 318 | renderMessages(comp, &m); | ||
| 319 | } | ||
| 320 | pub fn defaultMsgWriter(config: std.io.tty.Config) MsgWriter { | ||
| 321 | return MsgWriter.init(config); | ||
| 322 | } | ||
| 323 | |||
| 324 | pub fn renderMessages(comp: *Compilation, m: anytype) void { | ||
| 325 | var errors: u32 = 0; | ||
| 326 | var warnings: u32 = 0; | ||
| 327 | for (comp.diagnostics.list.items) |msg| { | ||
| 328 | switch (msg.kind) { | ||
| 329 | .@"fatal error", .@"error" => errors += 1, | ||
| 330 | .warning => warnings += 1, | ||
| 331 | .note => {}, | ||
| 332 | .off => continue, // happens if an error is added before it is disabled | ||
| 333 | .default => unreachable, | ||
| 334 | } | ||
| 335 | renderMessage(comp, m, msg); | ||
| 336 | } | ||
| 337 | const w_s: []const u8 = if (warnings == 1) "" else "s"; | ||
| 338 | const e_s: []const u8 = if (errors == 1) "" else "s"; | ||
| 339 | if (errors != 0 and warnings != 0) { | ||
| 340 | m.print("{d} warning{s} and {d} error{s} generated.\n", .{ warnings, w_s, errors, e_s }); | ||
| 341 | } else if (warnings != 0) { | ||
| 342 | m.print("{d} warning{s} generated.\n", .{ warnings, w_s }); | ||
| 343 | } else if (errors != 0) { | ||
| 344 | m.print("{d} error{s} generated.\n", .{ errors, e_s }); | ||
| 345 | } | ||
| 346 | |||
| 347 | comp.diagnostics.list.items.len = 0; | ||
| 348 | comp.diagnostics.errors += errors; | ||
| 349 | } | ||
| 350 | |||
| 351 | pub fn renderMessage(comp: *Compilation, m: anytype, msg: Message) void { | ||
| 352 | var line: ?[]const u8 = null; | ||
| 353 | var end_with_splice = false; | ||
| 354 | const width = if (msg.loc.id != .unused) blk: { | ||
| 355 | var loc = msg.loc; | ||
| 356 | switch (msg.tag) { | ||
| 357 | .escape_sequence_overflow, | ||
| 358 | .invalid_universal_character, | ||
| 359 | => loc.byte_offset += @truncate(msg.extra.offset), | ||
| 360 | .non_standard_escape_char, | ||
| 361 | .unknown_escape_sequence, | ||
| 362 | => loc.byte_offset += msg.extra.invalid_escape.offset, | ||
| 363 | else => {}, | ||
| 364 | } | ||
| 365 | const source = comp.getSource(loc.id); | ||
| 366 | var line_col = source.lineCol(loc); | ||
| 367 | line = line_col.line; | ||
| 368 | end_with_splice = line_col.end_with_splice; | ||
| 369 | if (msg.tag == .backslash_newline_escape) { | ||
| 370 | line = line_col.line[0 .. line_col.col - 1]; | ||
| 371 | line_col.col += 1; | ||
| 372 | line_col.width += 1; | ||
| 373 | } | ||
| 374 | m.location(source.path, line_col.line_no, line_col.col); | ||
| 375 | break :blk line_col.width; | ||
| 376 | } else 0; | ||
| 377 | |||
| 378 | m.start(msg.kind); | ||
| 379 | const prop = msg.tag.property(); | ||
| 380 | switch (prop.extra) { | ||
| 381 | .str => printRt(m, prop.msg, .{"{s}"}, .{msg.extra.str}), | ||
| 382 | .tok_id => printRt(m, prop.msg, .{ "{s}", "{s}" }, .{ | ||
| 383 | msg.extra.tok_id.expected.symbol(), | ||
| 384 | msg.extra.tok_id.actual.symbol(), | ||
| 385 | }), | ||
| 386 | .tok_id_expected => printRt(m, prop.msg, .{"{s}"}, .{msg.extra.tok_id_expected.symbol()}), | ||
| 387 | .arguments => printRt(m, prop.msg, .{ "{d}", "{d}" }, .{ | ||
| 388 | msg.extra.arguments.expected, | ||
| 389 | msg.extra.arguments.actual, | ||
| 390 | }), | ||
| 391 | .codepoints => printRt(m, prop.msg, .{ "{X:0>4}", "{u}" }, .{ | ||
| 392 | msg.extra.codepoints.actual, | ||
| 393 | msg.extra.codepoints.resembles, | ||
| 394 | }), | ||
| 395 | .attr_arg_count => printRt(m, prop.msg, .{ "{s}", "{d}" }, .{ | ||
| 396 | @tagName(msg.extra.attr_arg_count.attribute), | ||
| 397 | msg.extra.attr_arg_count.expected, | ||
| 398 | }), | ||
| 399 | .attr_arg_type => printRt(m, prop.msg, .{ "{s}", "{s}" }, .{ | ||
| 400 | msg.extra.attr_arg_type.expected.toString(), | ||
| 401 | msg.extra.attr_arg_type.actual.toString(), | ||
| 402 | }), | ||
| 403 | .actual_codepoint => printRt(m, prop.msg, .{"{X:0>4}"}, .{msg.extra.actual_codepoint}), | ||
| 404 | .ascii => printRt(m, prop.msg, .{"{c}"}, .{msg.extra.ascii}), | ||
| 405 | .unsigned => printRt(m, prop.msg, .{"{d}"}, .{msg.extra.unsigned}), | ||
| 406 | .pow_2_as_string => printRt(m, prop.msg, .{"{s}"}, .{switch (msg.extra.pow_2_as_string) { | ||
| 407 | 63 => "9223372036854775808", | ||
| 408 | 64 => "18446744073709551616", | ||
| 409 | 127 => "170141183460469231731687303715884105728", | ||
| 410 | 128 => "340282366920938463463374607431768211456", | ||
| 411 | else => unreachable, | ||
| 412 | }}), | ||
| 413 | .signed => printRt(m, prop.msg, .{"{d}"}, .{msg.extra.signed}), | ||
| 414 | .attr_enum => printRt(m, prop.msg, .{ "{s}", "{s}" }, .{ | ||
| 415 | @tagName(msg.extra.attr_enum.tag), | ||
| 416 | Attribute.Formatting.choices(msg.extra.attr_enum.tag), | ||
| 417 | }), | ||
| 418 | .ignored_record_attr => printRt(m, prop.msg, .{ "{s}", "{s}" }, .{ | ||
| 419 | @tagName(msg.extra.ignored_record_attr.tag), | ||
| 420 | @tagName(msg.extra.ignored_record_attr.specifier), | ||
| 421 | }), | ||
| 422 | .builtin_with_header => printRt(m, prop.msg, .{ "{s}", "{s}" }, .{ | ||
| 423 | @tagName(msg.extra.builtin_with_header.header), | ||
| 424 | Builtin.nameFromTag(msg.extra.builtin_with_header.builtin).span(), | ||
| 425 | }), | ||
| 426 | .invalid_escape => { | ||
| 427 | if (std.ascii.isPrint(msg.extra.invalid_escape.char)) { | ||
| 428 | const str: [1]u8 = .{msg.extra.invalid_escape.char}; | ||
| 429 | printRt(m, prop.msg, .{"{s}"}, .{&str}); | ||
| 430 | } else { | ||
| 431 | var buf: [3]u8 = undefined; | ||
| 432 | const str = std.fmt.bufPrint(&buf, "x{x}", .{std.fmt.fmtSliceHexLower(&.{msg.extra.invalid_escape.char})}) catch unreachable; | ||
| 433 | printRt(m, prop.msg, .{"{s}"}, .{str}); | ||
| 434 | } | ||
| 435 | }, | ||
| 436 | .normalized => { | ||
| 437 | const f = struct { | ||
| 438 | pub fn f( | ||
| 439 | bytes: []const u8, | ||
| 440 | comptime _: []const u8, | ||
| 441 | _: std.fmt.FormatOptions, | ||
| 442 | writer: anytype, | ||
| 443 | ) !void { | ||
| 444 | var it: std.unicode.Utf8Iterator = .{ | ||
| 445 | .bytes = bytes, | ||
| 446 | .i = 0, | ||
| 447 | }; | ||
| 448 | while (it.nextCodepoint()) |codepoint| { | ||
| 449 | if (codepoint < 0x7F) { | ||
| 450 | try writer.writeByte(@intCast(codepoint)); | ||
| 451 | } else if (codepoint < 0xFFFF) { | ||
| 452 | try writer.writeAll("\\u"); | ||
| 453 | try std.fmt.formatInt(codepoint, 16, .upper, .{ | ||
| 454 | .fill = '0', | ||
| 455 | .width = 4, | ||
| 456 | }, writer); | ||
| 457 | } else { | ||
| 458 | try writer.writeAll("\\U"); | ||
| 459 | try std.fmt.formatInt(codepoint, 16, .upper, .{ | ||
| 460 | .fill = '0', | ||
| 461 | .width = 8, | ||
| 462 | }, writer); | ||
| 463 | } | ||
| 464 | } | ||
| 465 | } | ||
| 466 | }.f; | ||
| 467 | printRt(m, prop.msg, .{"{s}"}, .{ | ||
| 468 | std.fmt.Formatter(f){ .data = msg.extra.normalized }, | ||
| 469 | }); | ||
| 470 | }, | ||
| 471 | .none, .offset => m.write(prop.msg), | ||
| 472 | } | ||
| 473 | |||
| 474 | if (prop.opt) |some| { | ||
| 475 | if (msg.kind == .@"error" and prop.kind != .@"error") { | ||
| 476 | m.print(" [-Werror,-W{s}]", .{optName(some)}); | ||
| 477 | } else if (msg.kind != .note) { | ||
| 478 | m.print(" [-W{s}]", .{optName(some)}); | ||
| 479 | } | ||
| 480 | } | ||
| 481 | |||
| 482 | m.end(line, width, end_with_splice); | ||
| 483 | } | ||
| 484 | |||
| 485 | fn printRt(m: anytype, str: []const u8, comptime fmts: anytype, args: anytype) void { | ||
| 486 | var i: usize = 0; | ||
| 487 | inline for (fmts, args) |fmt, arg| { | ||
| 488 | const new = std.mem.indexOfPos(u8, str, i, fmt).?; | ||
| 489 | m.write(str[i..new]); | ||
| 490 | i = new + fmt.len; | ||
| 491 | m.print(fmt, .{arg}); | ||
| 492 | } | ||
| 493 | m.write(str[i..]); | ||
| 494 | } | ||
| 495 | |||
| 496 | fn optName(offset: u16) []const u8 { | ||
| 497 | return std.meta.fieldNames(Options)[offset / @sizeOf(Kind)]; | ||
| 498 | } | ||
| 499 | |||
| 500 | fn tagKind(d: *Diagnostics, tag: Tag, langopts: LangOpts) Kind { | ||
| 501 | const prop = tag.property(); | ||
| 502 | var kind = prop.getKind(&d.options); | ||
| 503 | |||
| 504 | if (prop.all) { | ||
| 505 | if (d.options.all != .default) kind = d.options.all; | ||
| 506 | } | ||
| 507 | if (prop.w_extra) { | ||
| 508 | if (d.options.extra != .default) kind = d.options.extra; | ||
| 509 | } | ||
| 510 | if (prop.pedantic) { | ||
| 511 | if (d.options.pedantic != .default) kind = d.options.pedantic; | ||
| 512 | } | ||
| 513 | if (prop.suppress_version) |some| if (langopts.standard.atLeast(some)) return .off; | ||
| 514 | if (prop.suppress_unless_version) |some| if (!langopts.standard.atLeast(some)) return .off; | ||
| 515 | if (prop.suppress_gnu and langopts.standard.isExplicitGNU()) return .off; | ||
| 516 | if (prop.suppress_gcc and langopts.emulate == .gcc) return .off; | ||
| 517 | if (prop.suppress_clang and langopts.emulate == .clang) return .off; | ||
| 518 | if (prop.suppress_msvc and langopts.emulate == .msvc) return .off; | ||
| 519 | if (kind == .@"error" and d.fatal_errors) kind = .@"fatal error"; | ||
| 520 | return kind; | ||
| 521 | } | ||
| 522 | |||
| 523 | const MsgWriter = struct { | ||
| 524 | w: std.io.BufferedWriter(4096, std.fs.File.Writer), | ||
| 525 | config: std.io.tty.Config, | ||
| 526 | |||
| 527 | fn init(config: std.io.tty.Config) MsgWriter { | ||
| 528 | std.debug.getStderrMutex().lock(); | ||
| 529 | return .{ | ||
| 530 | .w = std.io.bufferedWriter(std.io.getStdErr().writer()), | ||
| 531 | .config = config, | ||
| 532 | }; | ||
| 533 | } | ||
| 534 | |||
| 535 | pub fn deinit(m: *MsgWriter) void { | ||
| 536 | m.w.flush() catch {}; | ||
| 537 | std.debug.getStderrMutex().unlock(); | ||
| 538 | } | ||
| 539 | |||
| 540 | pub fn print(m: *MsgWriter, comptime fmt: []const u8, args: anytype) void { | ||
| 541 | m.w.writer().print(fmt, args) catch {}; | ||
| 542 | } | ||
| 543 | |||
| 544 | fn write(m: *MsgWriter, msg: []const u8) void { | ||
| 545 | m.w.writer().writeAll(msg) catch {}; | ||
| 546 | } | ||
| 547 | |||
| 548 | fn setColor(m: *MsgWriter, color: std.io.tty.Color) void { | ||
| 549 | m.config.setColor(m.w.writer(), color) catch {}; | ||
| 550 | } | ||
| 551 | |||
| 552 | fn location(m: *MsgWriter, path: []const u8, line: u32, col: u32) void { | ||
| 553 | m.setColor(.bold); | ||
| 554 | m.print("{s}:{d}:{d}: ", .{ path, line, col }); | ||
| 555 | } | ||
| 556 | |||
| 557 | fn start(m: *MsgWriter, kind: Kind) void { | ||
| 558 | switch (kind) { | ||
| 559 | .@"fatal error", .@"error" => m.setColor(.bright_red), | ||
| 560 | .note => m.setColor(.bright_cyan), | ||
| 561 | .warning => m.setColor(.bright_magenta), | ||
| 562 | .off, .default => unreachable, | ||
| 563 | } | ||
| 564 | m.write(switch (kind) { | ||
| 565 | .@"fatal error" => "fatal error: ", | ||
| 566 | .@"error" => "error: ", | ||
| 567 | .note => "note: ", | ||
| 568 | .warning => "warning: ", | ||
| 569 | .off, .default => unreachable, | ||
| 570 | }); | ||
| 571 | m.setColor(.white); | ||
| 572 | } | ||
| 573 | |||
| 574 | fn end(m: *MsgWriter, maybe_line: ?[]const u8, col: u32, end_with_splice: bool) void { | ||
| 575 | const line = maybe_line orelse { | ||
| 576 | m.write("\n"); | ||
| 577 | m.setColor(.reset); | ||
| 578 | return; | ||
| 579 | }; | ||
| 580 | const trailer = if (end_with_splice) "\\ " else ""; | ||
| 581 | m.setColor(.reset); | ||
| 582 | m.print("\n{s}{s}\n{s: >[3]}", .{ line, trailer, "", col }); | ||
| 583 | m.setColor(.bold); | ||
| 584 | m.setColor(.bright_green); | ||
| 585 | m.write("^\n"); | ||
| 586 | m.setColor(.reset); | ||
| 587 | } | ||
| 588 | }; | ||
deps/aro/aro/Diagnostics/messages.def created+2446| ... | @@ -0,0 +1,2446 @@ | ||
| 1 | const W = Properties.makeOpt; | ||
| 2 | |||
| 3 | const pointer_sign_message = " converts between pointers to integer types with different sign"; | ||
| 4 | |||
| 5 | # Maybe someday this will no longer be needed. | ||
| 6 | todo | ||
| 7 | .msg = "TODO: {s}" | ||
| 8 | .extra = .str | ||
| 9 | .kind = .@"error" | ||
| 10 | |||
| 11 | error_directive | ||
| 12 | .msg = "{s}" | ||
| 13 | .extra = .str | ||
| 14 | .kind = .@"error" | ||
| 15 | |||
| 16 | warning_directive | ||
| 17 | .msg = "{s}" | ||
| 18 | .opt = W("#warnings") | ||
| 19 | .extra = .str | ||
| 20 | .kind = .warning | ||
| 21 | |||
| 22 | elif_without_if | ||
| 23 | .msg = "#elif without #if" | ||
| 24 | .kind = .@"error" | ||
| 25 | |||
| 26 | elif_after_else | ||
| 27 | .msg = "#elif after #else" | ||
| 28 | .kind = .@"error" | ||
| 29 | |||
| 30 | elifdef_without_if | ||
| 31 | .msg = "#elifdef without #if" | ||
| 32 | .kind = .@"error" | ||
| 33 | |||
| 34 | elifdef_after_else | ||
| 35 | .msg = "#elifdef after #else" | ||
| 36 | .kind = .@"error" | ||
| 37 | |||
| 38 | elifndef_without_if | ||
| 39 | .msg = "#elifndef without #if" | ||
| 40 | .kind = .@"error" | ||
| 41 | |||
| 42 | elifndef_after_else | ||
| 43 | .msg = "#elifndef after #else" | ||
| 44 | .kind = .@"error" | ||
| 45 | |||
| 46 | else_without_if | ||
| 47 | .msg = "#else without #if" | ||
| 48 | .kind = .@"error" | ||
| 49 | |||
| 50 | else_after_else | ||
| 51 | .msg = "#else after #else" | ||
| 52 | .kind = .@"error" | ||
| 53 | |||
| 54 | endif_without_if | ||
| 55 | .msg = "#endif without #if" | ||
| 56 | .kind = .@"error" | ||
| 57 | |||
| 58 | unknown_pragma | ||
| 59 | .msg = "unknown pragma ignored" | ||
| 60 | .opt = W("unknown-pragmas") | ||
| 61 | .kind = .off | ||
| 62 | .all = true | ||
| 63 | |||
| 64 | line_simple_digit | ||
| 65 | .msg = "#line directive requires a simple digit sequence" | ||
| 66 | .kind = .@"error" | ||
| 67 | |||
| 68 | line_invalid_filename | ||
| 69 | .msg = "invalid filename for #line directive" | ||
| 70 | .kind = .@"error" | ||
| 71 | |||
| 72 | unterminated_conditional_directive | ||
| 73 | .msg = "unterminated conditional directive" | ||
| 74 | .kind = .@"error" | ||
| 75 | |||
| 76 | invalid_preprocessing_directive | ||
| 77 | .msg = "invalid preprocessing directive" | ||
| 78 | .kind = .@"error" | ||
| 79 | |||
| 80 | macro_name_missing | ||
| 81 | .msg = "macro name missing" | ||
| 82 | .kind = .@"error" | ||
| 83 | |||
| 84 | extra_tokens_directive_end | ||
| 85 | .msg = "extra tokens at end of macro directive" | ||
| 86 | .kind = .@"error" | ||
| 87 | |||
| 88 | expected_value_in_expr | ||
| 89 | .msg = "expected value in expression" | ||
| 90 | .kind = .@"error" | ||
| 91 | |||
| 92 | closing_paren | ||
| 93 | .msg = "expected closing ')'" | ||
| 94 | .kind = .@"error" | ||
| 95 | |||
| 96 | to_match_paren | ||
| 97 | .msg = "to match this '('" | ||
| 98 | .kind = .note | ||
| 99 | |||
| 100 | to_match_brace | ||
| 101 | .msg = "to match this '{'" | ||
| 102 | .kind = .note | ||
| 103 | |||
| 104 | to_match_bracket | ||
| 105 | .msg = "to match this '['" | ||
| 106 | .kind = .note | ||
| 107 | |||
| 108 | header_str_closing | ||
| 109 | .msg = "expected closing '>'" | ||
| 110 | .kind = .@"error" | ||
| 111 | |||
| 112 | header_str_match | ||
| 113 | .msg = "to match this '<'" | ||
| 114 | .kind = .note | ||
| 115 | |||
| 116 | string_literal_in_pp_expr | ||
| 117 | .msg = "string literal in preprocessor expression" | ||
| 118 | .kind = .@"error" | ||
| 119 | |||
| 120 | float_literal_in_pp_expr | ||
| 121 | .msg = "floating point literal in preprocessor expression" | ||
| 122 | .kind = .@"error" | ||
| 123 | |||
| 124 | defined_as_macro_name | ||
| 125 | .msg = "'defined' cannot be used as a macro name" | ||
| 126 | .kind = .@"error" | ||
| 127 | |||
| 128 | macro_name_must_be_identifier | ||
| 129 | .msg = "macro name must be an identifier" | ||
| 130 | .kind = .@"error" | ||
| 131 | |||
| 132 | whitespace_after_macro_name | ||
| 133 | .msg = "ISO C99 requires whitespace after the macro name" | ||
| 134 | .opt = W("c99-extensions") | ||
| 135 | .kind = .warning | ||
| 136 | |||
| 137 | hash_hash_at_start | ||
| 138 | .msg = "'##' cannot appear at the start of a macro expansion" | ||
| 139 | .kind = .@"error" | ||
| 140 | |||
| 141 | hash_hash_at_end | ||
| 142 | .msg = "'##' cannot appear at the end of a macro expansion" | ||
| 143 | .kind = .@"error" | ||
| 144 | |||
| 145 | pasting_formed_invalid | ||
| 146 | .msg = "pasting formed '{s}', an invalid preprocessing token" | ||
| 147 | .extra = .str | ||
| 148 | .kind = .@"error" | ||
| 149 | |||
| 150 | missing_paren_param_list | ||
| 151 | .msg = "missing ')' in macro parameter list" | ||
| 152 | .kind = .@"error" | ||
| 153 | |||
| 154 | unterminated_macro_param_list | ||
| 155 | .msg = "unterminated macro param list" | ||
| 156 | .kind = .@"error" | ||
| 157 | |||
| 158 | invalid_token_param_list | ||
| 159 | .msg = "invalid token in macro parameter list" | ||
| 160 | .kind = .@"error" | ||
| 161 | |||
| 162 | expected_comma_param_list | ||
| 163 | .msg = "expected comma in macro parameter list" | ||
| 164 | .kind = .@"error" | ||
| 165 | |||
| 166 | hash_not_followed_param | ||
| 167 | .msg = "'#' is not followed by a macro parameter" | ||
| 168 | .kind = .@"error" | ||
| 169 | |||
| 170 | expected_filename | ||
| 171 | .msg = "expected \"FILENAME\" or <FILENAME>" | ||
| 172 | .kind = .@"error" | ||
| 173 | |||
| 174 | empty_filename | ||
| 175 | .msg = "empty filename" | ||
| 176 | .kind = .@"error" | ||
| 177 | |||
| 178 | expected_invalid | ||
| 179 | .msg = "expected '{s}', found invalid bytes" | ||
| 180 | .extra = .tok_id_expected | ||
| 181 | .kind = .@"error" | ||
| 182 | |||
| 183 | expected_eof | ||
| 184 | .msg = "expected '{s}' before end of file" | ||
| 185 | .extra = .tok_id_expected | ||
| 186 | .kind = .@"error" | ||
| 187 | |||
| 188 | expected_token | ||
| 189 | .msg = "expected '{s}', found '{s}'" | ||
| 190 | .extra = .tok_id | ||
| 191 | .kind = .@"error" | ||
| 192 | |||
| 193 | expected_expr | ||
| 194 | .msg = "expected expression" | ||
| 195 | .kind = .@"error" | ||
| 196 | |||
| 197 | expected_integer_constant_expr | ||
| 198 | .msg = "expression is not an integer constant expression" | ||
| 199 | .kind = .@"error" | ||
| 200 | |||
| 201 | missing_type_specifier | ||
| 202 | .msg = "type specifier missing, defaults to 'int'" | ||
| 203 | .opt = W("implicit-int") | ||
| 204 | .kind = .warning | ||
| 205 | .all = true | ||
| 206 | |||
| 207 | missing_type_specifier_c23 | ||
| 208 | .msg = "a type specifier is required for all declarations" | ||
| 209 | .kind = .@"error" | ||
| 210 | |||
| 211 | multiple_storage_class | ||
| 212 | .msg = "cannot combine with previous '{s}' declaration specifier" | ||
| 213 | .extra = .str | ||
| 214 | .kind = .@"error" | ||
| 215 | |||
| 216 | static_assert_failure | ||
| 217 | .msg = "static assertion failed" | ||
| 218 | .kind = .@"error" | ||
| 219 | |||
| 220 | static_assert_failure_message | ||
| 221 | .msg = "static assertion failed {s}" | ||
| 222 | .extra = .str | ||
| 223 | .kind = .@"error" | ||
| 224 | |||
| 225 | expected_type | ||
| 226 | .msg = "expected a type" | ||
| 227 | .kind = .@"error" | ||
| 228 | |||
| 229 | cannot_combine_spec | ||
| 230 | .msg = "cannot combine with previous '{s}' specifier" | ||
| 231 | .extra = .str | ||
| 232 | .kind = .@"error" | ||
| 233 | |||
| 234 | duplicate_decl_spec | ||
| 235 | .msg = "duplicate '{s}' declaration specifier" | ||
| 236 | .extra = .str | ||
| 237 | .opt = W("duplicate-decl-specifier") | ||
| 238 | .kind = .warning | ||
| 239 | .all = true | ||
| 240 | |||
| 241 | restrict_non_pointer | ||
| 242 | .msg = "restrict requires a pointer or reference ('{s}' is invalid)" | ||
| 243 | .extra = .str | ||
| 244 | .kind = .@"error" | ||
| 245 | |||
| 246 | expected_external_decl | ||
| 247 | .msg = "expected external declaration" | ||
| 248 | .kind = .@"error" | ||
| 249 | |||
| 250 | expected_ident_or_l_paren | ||
| 251 | .msg = "expected identifier or '('" | ||
| 252 | .kind = .@"error" | ||
| 253 | |||
| 254 | missing_declaration | ||
| 255 | .msg = "declaration does not declare anything" | ||
| 256 | .opt = W("missing-declaration") | ||
| 257 | .kind = .warning | ||
| 258 | |||
| 259 | func_not_in_root | ||
| 260 | .msg = "function definition is not allowed here" | ||
| 261 | .kind = .@"error" | ||
| 262 | |||
| 263 | illegal_initializer | ||
| 264 | .msg = "illegal initializer (only variables can be initialized)" | ||
| 265 | .kind = .@"error" | ||
| 266 | |||
| 267 | extern_initializer | ||
| 268 | .msg = "extern variable has initializer" | ||
| 269 | .opt = W("extern-initializer") | ||
| 270 | .kind = .warning | ||
| 271 | |||
| 272 | spec_from_typedef | ||
| 273 | .msg = "'{s}' came from typedef" | ||
| 274 | .extra = .str | ||
| 275 | .kind = .note | ||
| 276 | |||
| 277 | param_before_var_args | ||
| 278 | .msg = "ISO C requires a named parameter before '...'" | ||
| 279 | .kind = .@"error" | ||
| 280 | .suppress_version = .c23 | ||
| 281 | |||
| 282 | void_only_param | ||
| 283 | .msg = "'void' must be the only parameter if specified" | ||
| 284 | .kind = .@"error" | ||
| 285 | |||
| 286 | void_param_qualified | ||
| 287 | .msg = "'void' parameter cannot be qualified" | ||
| 288 | .kind = .@"error" | ||
| 289 | |||
| 290 | void_must_be_first_param | ||
| 291 | .msg = "'void' must be the first parameter if specified" | ||
| 292 | .kind = .@"error" | ||
| 293 | |||
| 294 | invalid_storage_on_param | ||
| 295 | .msg = "invalid storage class on function parameter" | ||
| 296 | .kind = .@"error" | ||
| 297 | |||
| 298 | threadlocal_non_var | ||
| 299 | .msg = "_Thread_local only allowed on variables" | ||
| 300 | .kind = .@"error" | ||
| 301 | |||
| 302 | func_spec_non_func | ||
| 303 | .msg = "'{s}' can only appear on functions" | ||
| 304 | .extra = .str | ||
| 305 | .kind = .@"error" | ||
| 306 | |||
| 307 | illegal_storage_on_func | ||
| 308 | .msg = "illegal storage class on function" | ||
| 309 | .kind = .@"error" | ||
| 310 | |||
| 311 | illegal_storage_on_global | ||
| 312 | .msg = "illegal storage class on global variable" | ||
| 313 | .kind = .@"error" | ||
| 314 | |||
| 315 | expected_stmt | ||
| 316 | .msg = "expected statement" | ||
| 317 | .kind = .@"error" | ||
| 318 | |||
| 319 | func_cannot_return_func | ||
| 320 | .msg = "function cannot return a function" | ||
| 321 | .kind = .@"error" | ||
| 322 | |||
| 323 | func_cannot_return_array | ||
| 324 | .msg = "function cannot return an array" | ||
| 325 | .kind = .@"error" | ||
| 326 | |||
| 327 | undeclared_identifier | ||
| 328 | .msg = "use of undeclared identifier '{s}'" | ||
| 329 | .extra = .str | ||
| 330 | .kind = .@"error" | ||
| 331 | |||
| 332 | not_callable | ||
| 333 | .msg = "cannot call non function type '{s}'" | ||
| 334 | .extra = .str | ||
| 335 | .kind = .@"error" | ||
| 336 | |||
| 337 | unsupported_str_cat | ||
| 338 | .msg = "unsupported string literal concatenation" | ||
| 339 | .kind = .@"error" | ||
| 340 | |||
| 341 | static_func_not_global | ||
| 342 | .msg = "static functions must be global" | ||
| 343 | .kind = .@"error" | ||
| 344 | |||
| 345 | implicit_func_decl | ||
| 346 | .msg = "call to undeclared function '{s}'; ISO C99 and later do not support implicit function declarations" | ||
| 347 | .extra = .str | ||
| 348 | .opt = W("implicit-function-declaration") | ||
| 349 | .kind = .@"error" | ||
| 350 | .all = true | ||
| 351 | |||
| 352 | unknown_builtin | ||
| 353 | .msg = "use of unknown builtin '{s}'" | ||
| 354 | .extra = .str | ||
| 355 | .opt = W("implicit-function-declaration") | ||
| 356 | .kind = .@"error" | ||
| 357 | .all = true | ||
| 358 | |||
| 359 | implicit_builtin | ||
| 360 | .msg = "implicitly declaring library function '{s}'" | ||
| 361 | .extra = .str | ||
| 362 | .opt = W("implicit-function-declaration") | ||
| 363 | .kind = .@"error" | ||
| 364 | .all = true | ||
| 365 | |||
| 366 | implicit_builtin_header_note | ||
| 367 | .msg = "include the header <{s}.h> or explicitly provide a declaration for '{s}'" | ||
| 368 | .extra = .builtin_with_header | ||
| 369 | .opt = W("implicit-function-declaration") | ||
| 370 | .kind = .note | ||
| 371 | .all = true | ||
| 372 | |||
| 373 | expected_param_decl | ||
| 374 | .msg = "expected parameter declaration" | ||
| 375 | .kind = .@"error" | ||
| 376 | |||
| 377 | invalid_old_style_params | ||
| 378 | .msg = "identifier parameter lists are only allowed in function definitions" | ||
| 379 | .kind = .@"error" | ||
| 380 | |||
| 381 | expected_fn_body | ||
| 382 | .msg = "expected function body after function declaration" | ||
| 383 | .kind = .@"error" | ||
| 384 | |||
| 385 | invalid_void_param | ||
| 386 | .msg = "parameter cannot have void type" | ||
| 387 | .kind = .@"error" | ||
| 388 | |||
| 389 | unused_value | ||
| 390 | .msg = "expression result unused" | ||
| 391 | .opt = W("unused-value") | ||
| 392 | .kind = .warning | ||
| 393 | .all = true | ||
| 394 | |||
| 395 | continue_not_in_loop | ||
| 396 | .msg = "'continue' statement not in a loop" | ||
| 397 | .kind = .@"error" | ||
| 398 | |||
| 399 | break_not_in_loop_or_switch | ||
| 400 | .msg = "'break' statement not in a loop or a switch" | ||
| 401 | .kind = .@"error" | ||
| 402 | |||
| 403 | unreachable_code | ||
| 404 | .msg = "unreachable code" | ||
| 405 | .opt = W("unreachable-code") | ||
| 406 | .kind = .warning | ||
| 407 | .all = true | ||
| 408 | |||
| 409 | duplicate_label | ||
| 410 | .msg = "duplicate label '{s}'" | ||
| 411 | .extra = .str | ||
| 412 | .kind = .@"error" | ||
| 413 | |||
| 414 | previous_label | ||
| 415 | .msg = "previous definition of label '{s}' was here" | ||
| 416 | .extra = .str | ||
| 417 | .kind = .note | ||
| 418 | |||
| 419 | undeclared_label | ||
| 420 | .msg = "use of undeclared label '{s}'" | ||
| 421 | .extra = .str | ||
| 422 | .kind = .@"error" | ||
| 423 | |||
| 424 | case_not_in_switch | ||
| 425 | .msg = "'{s}' statement not in a switch statement" | ||
| 426 | .extra = .str | ||
| 427 | .kind = .@"error" | ||
| 428 | |||
| 429 | duplicate_switch_case | ||
| 430 | .msg = "duplicate case value '{s}'" | ||
| 431 | .extra = .str | ||
| 432 | .kind = .@"error" | ||
| 433 | |||
| 434 | multiple_default | ||
| 435 | .msg = "multiple default cases in the same switch" | ||
| 436 | .kind = .@"error" | ||
| 437 | |||
| 438 | previous_case | ||
| 439 | .msg = "previous case defined here" | ||
| 440 | .kind = .note | ||
| 441 | |||
| 442 | const expected_arguments = "expected {d} argument(s) got {d}"; | ||
| 443 | |||
| 444 | expected_arguments | ||
| 445 | .msg = expected_arguments | ||
| 446 | .extra = .arguments | ||
| 447 | .kind = .@"error" | ||
| 448 | |||
| 449 | expected_arguments_old | ||
| 450 | .msg = expected_arguments | ||
| 451 | .extra = .arguments | ||
| 452 | .kind = .warning | ||
| 453 | |||
| 454 | expected_at_least_arguments | ||
| 455 | .msg = "expected at least {d} argument(s) got {d}" | ||
| 456 | .extra = .arguments | ||
| 457 | .kind = .warning | ||
| 458 | |||
| 459 | invalid_static_star | ||
| 460 | .msg = "'static' may not be used with an unspecified variable length array size" | ||
| 461 | .kind = .@"error" | ||
| 462 | |||
| 463 | static_non_param | ||
| 464 | .msg = "'static' used outside of function parameters" | ||
| 465 | .kind = .@"error" | ||
| 466 | |||
| 467 | array_qualifiers | ||
| 468 | .msg = "type qualifier in non parameter array type" | ||
| 469 | .kind = .@"error" | ||
| 470 | |||
| 471 | star_non_param | ||
| 472 | .msg = "star modifier used outside of function parameters" | ||
| 473 | .kind = .@"error" | ||
| 474 | |||
| 475 | variable_len_array_file_scope | ||
| 476 | .msg = "variable length arrays not allowed at file scope" | ||
| 477 | .kind = .@"error" | ||
| 478 | |||
| 479 | useless_static | ||
| 480 | .msg = "'static' useless without a constant size" | ||
| 481 | .kind = .warning | ||
| 482 | .w_extra = true | ||
| 483 | |||
| 484 | negative_array_size | ||
| 485 | .msg = "array size must be 0 or greater" | ||
| 486 | .kind = .@"error" | ||
| 487 | |||
| 488 | array_incomplete_elem | ||
| 489 | .msg = "array has incomplete element type '{s}'" | ||
| 490 | .extra = .str | ||
| 491 | .kind = .@"error" | ||
| 492 | |||
| 493 | array_func_elem | ||
| 494 | .msg = "arrays cannot have functions as their element type" | ||
| 495 | .kind = .@"error" | ||
| 496 | |||
| 497 | static_non_outermost_array | ||
| 498 | .msg = "'static' used in non-outermost array type" | ||
| 499 | .kind = .@"error" | ||
| 500 | |||
| 501 | qualifier_non_outermost_array | ||
| 502 | .msg = "type qualifier used in non-outermost array type" | ||
| 503 | .kind = .@"error" | ||
| 504 | |||
| 505 | unterminated_macro_arg_list | ||
| 506 | .msg = "unterminated function macro argument list" | ||
| 507 | .kind = .@"error" | ||
| 508 | |||
| 509 | unknown_warning | ||
| 510 | .msg = "unknown warning '{s}'" | ||
| 511 | .extra = .str | ||
| 512 | .opt = W("unknown-warning-option") | ||
| 513 | .kind = .warning | ||
| 514 | |||
| 515 | overflow | ||
| 516 | .msg = "overflow in expression; result is '{s}'" | ||
| 517 | .extra = .str | ||
| 518 | .opt = W("integer-overflow") | ||
| 519 | .kind = .warning | ||
| 520 | |||
| 521 | int_literal_too_big | ||
| 522 | .msg = "integer literal is too large to be represented in any integer type" | ||
| 523 | .kind = .@"error" | ||
| 524 | |||
| 525 | indirection_ptr | ||
| 526 | .msg = "indirection requires pointer operand" | ||
| 527 | .kind = .@"error" | ||
| 528 | |||
| 529 | addr_of_rvalue | ||
| 530 | .msg = "cannot take the address of an rvalue" | ||
| 531 | .kind = .@"error" | ||
| 532 | |||
| 533 | addr_of_bitfield | ||
| 534 | .msg = "address of bit-field requested" | ||
| 535 | .kind = .@"error" | ||
| 536 | |||
| 537 | not_assignable | ||
| 538 | .msg = "expression is not assignable" | ||
| 539 | .kind = .@"error" | ||
| 540 | |||
| 541 | ident_or_l_brace | ||
| 542 | .msg = "expected identifier or '{'" | ||
| 543 | .kind = .@"error" | ||
| 544 | |||
| 545 | empty_enum | ||
| 546 | .msg = "empty enum is invalid" | ||
| 547 | .kind = .@"error" | ||
| 548 | |||
| 549 | redefinition | ||
| 550 | .msg = "redefinition of '{s}'" | ||
| 551 | .extra = .str | ||
| 552 | .kind = .@"error" | ||
| 553 | |||
| 554 | previous_definition | ||
| 555 | .msg = "previous definition is here" | ||
| 556 | .kind = .note | ||
| 557 | |||
| 558 | expected_identifier | ||
| 559 | .msg = "expected identifier" | ||
| 560 | .kind = .@"error" | ||
| 561 | |||
| 562 | expected_str_literal | ||
| 563 | .msg = "expected string literal for diagnostic message in static_assert" | ||
| 564 | .kind = .@"error" | ||
| 565 | |||
| 566 | expected_str_literal_in | ||
| 567 | .msg = "expected string literal in '{s}'" | ||
| 568 | .extra = .str | ||
| 569 | .kind = .@"error" | ||
| 570 | |||
| 571 | parameter_missing | ||
| 572 | .msg = "parameter named '{s}' is missing" | ||
| 573 | .extra = .str | ||
| 574 | .kind = .@"error" | ||
| 575 | |||
| 576 | empty_record | ||
| 577 | .msg = "empty {s} is a GNU extension" | ||
| 578 | .extra = .str | ||
| 579 | .opt = W("gnu-empty-struct") | ||
| 580 | .kind = .off | ||
| 581 | .pedantic = true | ||
| 582 | |||
| 583 | empty_record_size | ||
| 584 | .msg = "empty {s} has size 0 in C, size 1 in C++" | ||
| 585 | .extra = .str | ||
| 586 | .opt = W("c++-compat") | ||
| 587 | .kind = .off | ||
| 588 | |||
| 589 | wrong_tag | ||
| 590 | .msg = "use of '{s}' with tag type that does not match previous definition" | ||
| 591 | .extra = .str | ||
| 592 | .kind = .@"error" | ||
| 593 | |||
| 594 | expected_parens_around_typename | ||
| 595 | .msg = "expected parentheses around type name" | ||
| 596 | .kind = .@"error" | ||
| 597 | |||
| 598 | alignof_expr | ||
| 599 | .msg = "'_Alignof' applied to an expression is a GNU extension" | ||
| 600 | .opt = W("gnu-alignof-expression") | ||
| 601 | .kind = .warning | ||
| 602 | .suppress_gnu = true | ||
| 603 | |||
| 604 | invalid_alignof | ||
| 605 | .msg = "invalid application of 'alignof' to an incomplete type '{s}'" | ||
| 606 | .extra = .str | ||
| 607 | .kind = .@"error" | ||
| 608 | |||
| 609 | invalid_sizeof | ||
| 610 | .msg = "invalid application of 'sizeof' to an incomplete type '{s}'" | ||
| 611 | .extra = .str | ||
| 612 | .kind = .@"error" | ||
| 613 | |||
| 614 | macro_redefined | ||
| 615 | .msg = "'{s}' macro redefined" | ||
| 616 | .extra = .str | ||
| 617 | .opt = W("macro-redefined") | ||
| 618 | .kind = .warning | ||
| 619 | |||
| 620 | generic_qual_type | ||
| 621 | .msg = "generic association with qualifiers cannot be matched with" | ||
| 622 | .opt = W("generic-qual-type") | ||
| 623 | .kind = .warning | ||
| 624 | |||
| 625 | generic_array_type | ||
| 626 | .msg = "generic association array type cannot be matched with" | ||
| 627 | .opt = W("generic-qual-type") | ||
| 628 | .kind = .warning | ||
| 629 | |||
| 630 | generic_func_type | ||
| 631 | .msg = "generic association function type cannot be matched with" | ||
| 632 | .opt = W("generic-qual-type") | ||
| 633 | .kind = .warning | ||
| 634 | |||
| 635 | generic_duplicate | ||
| 636 | .msg = "type '{s}' in generic association compatible with previously specified type" | ||
| 637 | .extra = .str | ||
| 638 | .kind = .@"error" | ||
| 639 | |||
| 640 | generic_duplicate_here | ||
| 641 | .msg = "compatible type '{s}' specified here" | ||
| 642 | .extra = .str | ||
| 643 | .kind = .note | ||
| 644 | |||
| 645 | generic_duplicate_default | ||
| 646 | .msg = "duplicate default generic association" | ||
| 647 | .kind = .@"error" | ||
| 648 | |||
| 649 | generic_no_match | ||
| 650 | .msg = "controlling expression type '{s}' not compatible with any generic association type" | ||
| 651 | .extra = .str | ||
| 652 | .kind = .@"error" | ||
| 653 | |||
| 654 | escape_sequence_overflow | ||
| 655 | .msg = "escape sequence out of range" | ||
| 656 | .kind = .@"error" | ||
| 657 | |||
| 658 | invalid_universal_character | ||
| 659 | .msg = "invalid universal character" | ||
| 660 | .kind = .@"error" | ||
| 661 | |||
| 662 | incomplete_universal_character | ||
| 663 | .msg = "incomplete universal character name" | ||
| 664 | .kind = .@"error" | ||
| 665 | |||
| 666 | multichar_literal_warning | ||
| 667 | .msg = "multi-character character constant" | ||
| 668 | .opt = W("multichar") | ||
| 669 | .kind = .warning | ||
| 670 | .all = true | ||
| 671 | |||
| 672 | invalid_multichar_literal | ||
| 673 | .msg = "{s} character literals may not contain multiple characters" | ||
| 674 | .kind = .@"error" | ||
| 675 | .extra = .str | ||
| 676 | |||
| 677 | wide_multichar_literal | ||
| 678 | .msg = "extraneous characters in character constant ignored" | ||
| 679 | .kind = .warning | ||
| 680 | |||
| 681 | char_lit_too_wide | ||
| 682 | .msg = "character constant too long for its type" | ||
| 683 | .kind = .warning | ||
| 684 | .all = true | ||
| 685 | |||
| 686 | char_too_large | ||
| 687 | .msg = "character too large for enclosing character literal type" | ||
| 688 | .kind = .@"error" | ||
| 689 | |||
| 690 | must_use_struct | ||
| 691 | .msg = "must use 'struct' tag to refer to type '{s}'" | ||
| 692 | .extra = .str | ||
| 693 | .kind = .@"error" | ||
| 694 | |||
| 695 | must_use_union | ||
| 696 | .msg = "must use 'union' tag to refer to type '{s}'" | ||
| 697 | .extra = .str | ||
| 698 | .kind = .@"error" | ||
| 699 | |||
| 700 | must_use_enum | ||
| 701 | .msg = "must use 'enum' tag to refer to type '{s}'" | ||
| 702 | .extra = .str | ||
| 703 | .kind = .@"error" | ||
| 704 | |||
| 705 | redefinition_different_sym | ||
| 706 | .msg = "redefinition of '{s}' as different kind of symbol" | ||
| 707 | .extra = .str | ||
| 708 | .kind = .@"error" | ||
| 709 | |||
| 710 | redefinition_incompatible | ||
| 711 | .msg = "redefinition of '{s}' with a different type" | ||
| 712 | .extra = .str | ||
| 713 | .kind = .@"error" | ||
| 714 | |||
| 715 | redefinition_of_parameter | ||
| 716 | .msg = "redefinition of parameter '{s}'" | ||
| 717 | .extra = .str | ||
| 718 | .kind = .@"error" | ||
| 719 | |||
| 720 | invalid_bin_types | ||
| 721 | .msg = "invalid operands to binary expression ({s})" | ||
| 722 | .extra = .str | ||
| 723 | .kind = .@"error" | ||
| 724 | |||
| 725 | comparison_ptr_int | ||
| 726 | .msg = "comparison between pointer and integer ({s})" | ||
| 727 | .extra = .str | ||
| 728 | .opt = W("pointer-integer-compare") | ||
| 729 | .kind = .warning | ||
| 730 | |||
| 731 | comparison_distinct_ptr | ||
| 732 | .msg = "comparison of distinct pointer types ({s})" | ||
| 733 | .extra = .str | ||
| 734 | .opt = W("compare-distinct-pointer-types") | ||
| 735 | .kind = .warning | ||
| 736 | |||
| 737 | incompatible_pointers | ||
| 738 | .msg = "incompatible pointer types ({s})" | ||
| 739 | .extra = .str | ||
| 740 | .kind = .@"error" | ||
| 741 | |||
| 742 | invalid_argument_un | ||
| 743 | .msg = "invalid argument type '{s}' to unary expression" | ||
| 744 | .extra = .str | ||
| 745 | .kind = .@"error" | ||
| 746 | |||
| 747 | incompatible_assign | ||
| 748 | .msg = "assignment to {s}" | ||
| 749 | .extra = .str | ||
| 750 | .kind = .@"error" | ||
| 751 | |||
| 752 | implicit_ptr_to_int | ||
| 753 | .msg = "implicit pointer to integer conversion from {s}" | ||
| 754 | .extra = .str | ||
| 755 | .opt = W("int-conversion") | ||
| 756 | .kind = .warning | ||
| 757 | |||
| 758 | invalid_cast_to_float | ||
| 759 | .msg = "pointer cannot be cast to type '{s}'" | ||
| 760 | .extra = .str | ||
| 761 | .kind = .@"error" | ||
| 762 | |||
| 763 | invalid_cast_to_pointer | ||
| 764 | .msg = "operand of type '{s}' cannot be cast to a pointer type" | ||
| 765 | .extra = .str | ||
| 766 | .kind = .@"error" | ||
| 767 | |||
| 768 | invalid_cast_type | ||
| 769 | .msg = "cannot cast to non arithmetic or pointer type '{s}'" | ||
| 770 | .extra = .str | ||
| 771 | .kind = .@"error" | ||
| 772 | |||
| 773 | qual_cast | ||
| 774 | .msg = "cast to type '{s}' will not preserve qualifiers" | ||
| 775 | .extra = .str | ||
| 776 | .opt = W("cast-qualifiers") | ||
| 777 | .kind = .warning | ||
| 778 | |||
| 779 | invalid_index | ||
| 780 | .msg = "array subscript is not an integer" | ||
| 781 | .kind = .@"error" | ||
| 782 | |||
| 783 | invalid_subscript | ||
| 784 | .msg = "subscripted value is not an array or pointer" | ||
| 785 | .kind = .@"error" | ||
| 786 | |||
| 787 | array_after | ||
| 788 | .msg = "array index {s} is past the end of the array" | ||
| 789 | .extra = .str | ||
| 790 | .opt = W("array-bounds") | ||
| 791 | .kind = .warning | ||
| 792 | |||
| 793 | array_before | ||
| 794 | .msg = "array index {s} is before the beginning of the array" | ||
| 795 | .extra = .str | ||
| 796 | .opt = W("array-bounds") | ||
| 797 | .kind = .warning | ||
| 798 | |||
| 799 | statement_int | ||
| 800 | .msg = "statement requires expression with integer type ('{s}' invalid)" | ||
| 801 | .extra = .str | ||
| 802 | .kind = .@"error" | ||
| 803 | |||
| 804 | statement_scalar | ||
| 805 | .msg = "statement requires expression with scalar type ('{s}' invalid)" | ||
| 806 | .extra = .str | ||
| 807 | .kind = .@"error" | ||
| 808 | |||
| 809 | func_should_return | ||
| 810 | .msg = "non-void function '{s}' should return a value" | ||
| 811 | .extra = .str | ||
| 812 | .opt = W("return-type") | ||
| 813 | .kind = .@"error" | ||
| 814 | .all = true | ||
| 815 | |||
| 816 | incompatible_return | ||
| 817 | .msg = "returning {s}" | ||
| 818 | .extra = .str | ||
| 819 | .kind = .@"error" | ||
| 820 | |||
| 821 | incompatible_return_sign | ||
| 822 | .msg = "returning {s}" ++ pointer_sign_message | ||
| 823 | .extra = .str | ||
| 824 | .kind = .warning | ||
| 825 | .opt = W("pointer-sign") | ||
| 826 | |||
| 827 | implicit_int_to_ptr | ||
| 828 | .msg = "implicit integer to pointer conversion from {s}" | ||
| 829 | .extra = .str | ||
| 830 | .opt = W("int-conversion") | ||
| 831 | .kind = .warning | ||
| 832 | |||
| 833 | func_does_not_return | ||
| 834 | .msg = "non-void function '{s}' does not return a value" | ||
| 835 | .extra = .str | ||
| 836 | .opt = W("return-type") | ||
| 837 | .kind = .warning | ||
| 838 | .all = true | ||
| 839 | |||
| 840 | void_func_returns_value | ||
| 841 | .msg = "void function '{s}' should not return a value" | ||
| 842 | .extra = .str | ||
| 843 | .opt = W("return-type") | ||
| 844 | .kind = .@"error" | ||
| 845 | .all = true | ||
| 846 | |||
| 847 | incompatible_arg | ||
| 848 | .msg = "passing {s}" | ||
| 849 | .extra = .str | ||
| 850 | .kind = .@"error" | ||
| 851 | |||
| 852 | incompatible_ptr_arg | ||
| 853 | .msg = "passing {s}" | ||
| 854 | .extra = .str | ||
| 855 | .kind = .warning | ||
| 856 | .opt = W("incompatible-pointer-types") | ||
| 857 | |||
| 858 | incompatible_ptr_arg_sign | ||
| 859 | .msg = "passing {s}" ++ pointer_sign_message | ||
| 860 | .extra = .str | ||
| 861 | .kind = .warning | ||
| 862 | .opt = W("pointer-sign") | ||
| 863 | |||
| 864 | parameter_here | ||
| 865 | .msg = "passing argument to parameter here" | ||
| 866 | .kind = .note | ||
| 867 | |||
| 868 | atomic_array | ||
| 869 | .msg = "atomic cannot be applied to array type '{s}'" | ||
| 870 | .extra = .str | ||
| 871 | .kind = .@"error" | ||
| 872 | |||
| 873 | atomic_func | ||
| 874 | .msg = "atomic cannot be applied to function type '{s}'" | ||
| 875 | .extra = .str | ||
| 876 | .kind = .@"error" | ||
| 877 | |||
| 878 | atomic_incomplete | ||
| 879 | .msg = "atomic cannot be applied to incomplete type '{s}'" | ||
| 880 | .extra = .str | ||
| 881 | .kind = .@"error" | ||
| 882 | |||
| 883 | addr_of_register | ||
| 884 | .msg = "address of register variable requested" | ||
| 885 | .kind = .@"error" | ||
| 886 | |||
| 887 | variable_incomplete_ty | ||
| 888 | .msg = "variable has incomplete type '{s}'" | ||
| 889 | .extra = .str | ||
| 890 | .kind = .@"error" | ||
| 891 | |||
| 892 | parameter_incomplete_ty | ||
| 893 | .msg = "parameter has incomplete type '{s}'" | ||
| 894 | .extra = .str | ||
| 895 | .kind = .@"error" | ||
| 896 | |||
| 897 | tentative_array | ||
| 898 | .msg = "tentative array definition assumed to have one element" | ||
| 899 | .kind = .warning | ||
| 900 | |||
| 901 | deref_incomplete_ty_ptr | ||
| 902 | .msg = "dereferencing pointer to incomplete type '{s}'" | ||
| 903 | .extra = .str | ||
| 904 | .kind = .@"error" | ||
| 905 | |||
| 906 | alignas_on_func | ||
| 907 | .msg = "'_Alignas' attribute only applies to variables and fields" | ||
| 908 | .kind = .@"error" | ||
| 909 | |||
| 910 | alignas_on_param | ||
| 911 | .msg = "'_Alignas' attribute cannot be applied to a function parameter" | ||
| 912 | .kind = .@"error" | ||
| 913 | |||
| 914 | minimum_alignment | ||
| 915 | .msg = "requested alignment is less than minimum alignment of {d}" | ||
| 916 | .extra = .unsigned | ||
| 917 | .kind = .@"error" | ||
| 918 | |||
| 919 | maximum_alignment | ||
| 920 | .msg = "requested alignment of {s} is too large" | ||
| 921 | .extra = .str | ||
| 922 | .kind = .@"error" | ||
| 923 | |||
| 924 | negative_alignment | ||
| 925 | .msg = "requested negative alignment of {s} is invalid" | ||
| 926 | .extra = .str | ||
| 927 | .kind = .@"error" | ||
| 928 | |||
| 929 | align_ignored | ||
| 930 | .msg = "'_Alignas' attribute is ignored here" | ||
| 931 | .kind = .warning | ||
| 932 | |||
| 933 | zero_align_ignored | ||
| 934 | .msg = "requested alignment of zero is ignored" | ||
| 935 | .kind = .warning | ||
| 936 | |||
| 937 | non_pow2_align | ||
| 938 | .msg = "requested alignment is not a power of 2" | ||
| 939 | .kind = .@"error" | ||
| 940 | |||
| 941 | pointer_mismatch | ||
| 942 | .msg = "pointer type mismatch ({s})" | ||
| 943 | .extra = .str | ||
| 944 | .opt = W("pointer-type-mismatch") | ||
| 945 | .kind = .warning | ||
| 946 | |||
| 947 | static_assert_not_constant | ||
| 948 | .msg = "static_assert expression is not an integral constant expression" | ||
| 949 | .kind = .@"error" | ||
| 950 | |||
| 951 | static_assert_missing_message | ||
| 952 | .msg = "static_assert with no message is a C23 extension" | ||
| 953 | .opt = W("c23-extensions") | ||
| 954 | .kind = .warning | ||
| 955 | .suppress_version = .c23 | ||
| 956 | |||
| 957 | pre_c23_compat | ||
| 958 | .msg = "{s} is incompatible with C standards before C23" | ||
| 959 | .extra = .str | ||
| 960 | .kind = .off | ||
| 961 | .suppress_unless_version = .c23 | ||
| 962 | .opt = W("pre-c23-compat") | ||
| 963 | |||
| 964 | unbound_vla | ||
| 965 | .msg = "variable length array must be bound in function definition" | ||
| 966 | .kind = .@"error" | ||
| 967 | |||
| 968 | array_too_large | ||
| 969 | .msg = "array is too large" | ||
| 970 | .kind = .@"error" | ||
| 971 | |||
| 972 | incompatible_ptr_init | ||
| 973 | .msg = "incompatible pointer types initializing {s}" | ||
| 974 | .extra = .str | ||
| 975 | .opt = W("incompatible-pointer-types") | ||
| 976 | .kind = .warning | ||
| 977 | |||
| 978 | incompatible_ptr_init_sign | ||
| 979 | .msg = "incompatible pointer types initializing {s}" ++ pointer_sign_message | ||
| 980 | .extra = .str | ||
| 981 | .opt = W("pointer-sign") | ||
| 982 | .kind = .warning | ||
| 983 | |||
| 984 | incompatible_ptr_assign | ||
| 985 | .msg = "incompatible pointer types assigning to {s}" | ||
| 986 | .extra = .str | ||
| 987 | .opt = W("incompatible-pointer-types") | ||
| 988 | .kind = .warning | ||
| 989 | |||
| 990 | incompatible_ptr_assign_sign | ||
| 991 | .msg = "incompatible pointer types assigning to {s} " ++ pointer_sign_message | ||
| 992 | .extra = .str | ||
| 993 | .opt = W("pointer-sign") | ||
| 994 | .kind = .warning | ||
| 995 | |||
| 996 | vla_init | ||
| 997 | .msg = "variable-sized object may not be initialized" | ||
| 998 | .kind = .@"error" | ||
| 999 | |||
| 1000 | func_init | ||
| 1001 | .msg = "illegal initializer type" | ||
| 1002 | .kind = .@"error" | ||
| 1003 | |||
| 1004 | incompatible_init | ||
| 1005 | .msg = "initializing {s}" | ||
| 1006 | .extra = .str | ||
| 1007 | .kind = .@"error" | ||
| 1008 | |||
| 1009 | empty_scalar_init | ||
| 1010 | .msg = "scalar initializer cannot be empty" | ||
| 1011 | .kind = .@"error" | ||
| 1012 | |||
| 1013 | excess_scalar_init | ||
| 1014 | .msg = "excess elements in scalar initializer" | ||
| 1015 | .opt = W("excess-initializers") | ||
| 1016 | .kind = .warning | ||
| 1017 | |||
| 1018 | excess_str_init | ||
| 1019 | .msg = "excess elements in string initializer" | ||
| 1020 | .opt = W("excess-initializers") | ||
| 1021 | .kind = .warning | ||
| 1022 | |||
| 1023 | excess_struct_init | ||
| 1024 | .msg = "excess elements in struct initializer" | ||
| 1025 | .opt = W("excess-initializers") | ||
| 1026 | .kind = .warning | ||
| 1027 | |||
| 1028 | excess_array_init | ||
| 1029 | .msg = "excess elements in array initializer" | ||
| 1030 | .opt = W("excess-initializers") | ||
| 1031 | .kind = .warning | ||
| 1032 | |||
| 1033 | str_init_too_long | ||
| 1034 | .msg = "initializer-string for char array is too long" | ||
| 1035 | .opt = W("excess-initializers") | ||
| 1036 | .kind = .warning | ||
| 1037 | |||
| 1038 | arr_init_too_long | ||
| 1039 | .msg = "cannot initialize type ({s})" | ||
| 1040 | .extra = .str | ||
| 1041 | .kind = .@"error" | ||
| 1042 | |||
| 1043 | invalid_typeof | ||
| 1044 | .msg = "'{s} typeof' is invalid" | ||
| 1045 | .extra = .str | ||
| 1046 | .kind = .@"error" | ||
| 1047 | |||
| 1048 | division_by_zero | ||
| 1049 | .msg = "{s} by zero is undefined" | ||
| 1050 | .extra = .str | ||
| 1051 | .opt = W("division-by-zero") | ||
| 1052 | .kind = .warning | ||
| 1053 | |||
| 1054 | division_by_zero_macro | ||
| 1055 | .msg = "{s} by zero in preprocessor expression" | ||
| 1056 | .extra = .str | ||
| 1057 | .kind = .@"error" | ||
| 1058 | |||
| 1059 | builtin_choose_cond | ||
| 1060 | .msg = "'__builtin_choose_expr' requires a constant expression" | ||
| 1061 | .kind = .@"error" | ||
| 1062 | |||
| 1063 | alignas_unavailable | ||
| 1064 | .msg = "'_Alignas' attribute requires integer constant expression" | ||
| 1065 | .kind = .@"error" | ||
| 1066 | |||
| 1067 | case_val_unavailable | ||
| 1068 | .msg = "case value must be an integer constant expression" | ||
| 1069 | .kind = .@"error" | ||
| 1070 | |||
| 1071 | enum_val_unavailable | ||
| 1072 | .msg = "enum value must be an integer constant expression" | ||
| 1073 | .kind = .@"error" | ||
| 1074 | |||
| 1075 | incompatible_array_init | ||
| 1076 | .msg = "cannot initialize array of type {s}" | ||
| 1077 | .extra = .str | ||
| 1078 | .kind = .@"error" | ||
| 1079 | |||
| 1080 | array_init_str | ||
| 1081 | .msg = "array initializer must be an initializer list or wide string literal" | ||
| 1082 | .kind = .@"error" | ||
| 1083 | |||
| 1084 | initializer_overrides | ||
| 1085 | .msg = "initializer overrides previous initialization" | ||
| 1086 | .opt = W("initializer-overrides") | ||
| 1087 | .kind = .warning | ||
| 1088 | .w_extra = true | ||
| 1089 | |||
| 1090 | previous_initializer | ||
| 1091 | .msg = "previous initialization" | ||
| 1092 | .kind = .note | ||
| 1093 | |||
| 1094 | invalid_array_designator | ||
| 1095 | .msg = "array designator used for non-array type '{s}'" | ||
| 1096 | .extra = .str | ||
| 1097 | .kind = .@"error" | ||
| 1098 | |||
| 1099 | negative_array_designator | ||
| 1100 | .msg = "array designator value {s} is negative" | ||
| 1101 | .extra = .str | ||
| 1102 | .kind = .@"error" | ||
| 1103 | |||
| 1104 | oob_array_designator | ||
| 1105 | .msg = "array designator index {s} exceeds array bounds" | ||
| 1106 | .extra = .str | ||
| 1107 | .kind = .@"error" | ||
| 1108 | |||
| 1109 | invalid_field_designator | ||
| 1110 | .msg = "field designator used for non-record type '{s}'" | ||
| 1111 | .extra = .str | ||
| 1112 | .kind = .@"error" | ||
| 1113 | |||
| 1114 | no_such_field_designator | ||
| 1115 | .msg = "record type has no field named '{s}'" | ||
| 1116 | .extra = .str | ||
| 1117 | .kind = .@"error" | ||
| 1118 | |||
| 1119 | empty_aggregate_init_braces | ||
| 1120 | .msg = "initializer for aggregate with no elements requires explicit braces" | ||
| 1121 | .kind = .@"error" | ||
| 1122 | |||
| 1123 | ptr_init_discards_quals | ||
| 1124 | .msg = "initializing {s} discards qualifiers" | ||
| 1125 | .extra = .str | ||
| 1126 | .opt = W("incompatible-pointer-types-discards-qualifiers") | ||
| 1127 | .kind = .warning | ||
| 1128 | |||
| 1129 | ptr_assign_discards_quals | ||
| 1130 | .msg = "assigning to {s} discards qualifiers" | ||
| 1131 | .extra = .str | ||
| 1132 | .opt = W("incompatible-pointer-types-discards-qualifiers") | ||
| 1133 | .kind = .warning | ||
| 1134 | |||
| 1135 | ptr_ret_discards_quals | ||
| 1136 | .msg = "returning {s} discards qualifiers" | ||
| 1137 | .extra = .str | ||
| 1138 | .opt = W("incompatible-pointer-types-discards-qualifiers") | ||
| 1139 | .kind = .warning | ||
| 1140 | |||
| 1141 | ptr_arg_discards_quals | ||
| 1142 | .msg = "passing {s} discards qualifiers" | ||
| 1143 | .extra = .str | ||
| 1144 | .opt = W("incompatible-pointer-types-discards-qualifiers") | ||
| 1145 | .kind = .warning | ||
| 1146 | |||
| 1147 | unknown_attribute | ||
| 1148 | .msg = "unknown attribute '{s}' ignored" | ||
| 1149 | .extra = .str | ||
| 1150 | .opt = W("unknown-attributes") | ||
| 1151 | .kind = .warning | ||
| 1152 | |||
| 1153 | ignored_attribute | ||
| 1154 | .msg = "{s}" | ||
| 1155 | .extra = .str | ||
| 1156 | .opt = W("ignored-attributes") | ||
| 1157 | .kind = .warning | ||
| 1158 | |||
| 1159 | invalid_fallthrough | ||
| 1160 | .msg = "fallthrough annotation does not directly precede switch label" | ||
| 1161 | .kind = .@"error" | ||
| 1162 | |||
| 1163 | cannot_apply_attribute_to_statement | ||
| 1164 | .msg = "'{s}' attribute cannot be applied to a statement" | ||
| 1165 | .extra = .str | ||
| 1166 | .kind = .@"error" | ||
| 1167 | |||
| 1168 | builtin_macro_redefined | ||
| 1169 | .msg = "redefining builtin macro" | ||
| 1170 | .opt = W("builtin-macro-redefined") | ||
| 1171 | .kind = .warning | ||
| 1172 | |||
| 1173 | feature_check_requires_identifier | ||
| 1174 | .msg = "builtin feature check macro requires a parenthesized identifier" | ||
| 1175 | .kind = .@"error" | ||
| 1176 | |||
| 1177 | missing_tok_builtin | ||
| 1178 | .msg = "missing '{s}', after builtin feature-check macro" | ||
| 1179 | .extra = .tok_id_expected | ||
| 1180 | .kind = .@"error" | ||
| 1181 | |||
| 1182 | gnu_label_as_value | ||
| 1183 | .msg = "use of GNU address-of-label extension" | ||
| 1184 | .opt = W("gnu-label-as-value") | ||
| 1185 | .kind = .off | ||
| 1186 | .pedantic = true | ||
| 1187 | |||
| 1188 | expected_record_ty | ||
| 1189 | .msg = "member reference base type '{s}' is not a structure or union" | ||
| 1190 | .extra = .str | ||
| 1191 | .kind = .@"error" | ||
| 1192 | |||
| 1193 | member_expr_not_ptr | ||
| 1194 | .msg = "member reference type '{s}' is not a pointer; did you mean to use '.'?" | ||
| 1195 | .extra = .str | ||
| 1196 | .kind = .@"error" | ||
| 1197 | |||
| 1198 | member_expr_ptr | ||
| 1199 | .msg = "member reference type '{s}' is a pointer; did you mean to use '->'?" | ||
| 1200 | .extra = .str | ||
| 1201 | .kind = .@"error" | ||
| 1202 | |||
| 1203 | no_such_member | ||
| 1204 | .msg = "no member named {s}" | ||
| 1205 | .extra = .str | ||
| 1206 | .kind = .@"error" | ||
| 1207 | |||
| 1208 | malformed_warning_check | ||
| 1209 | .msg = "{s} expected option name (e.g. \"-Wundef\")" | ||
| 1210 | .extra = .str | ||
| 1211 | .opt = W("malformed-warning-check") | ||
| 1212 | .kind = .warning | ||
| 1213 | .all = true | ||
| 1214 | |||
| 1215 | invalid_computed_goto | ||
| 1216 | .msg = "computed goto in function with no address-of-label expressions" | ||
| 1217 | .kind = .@"error" | ||
| 1218 | |||
| 1219 | pragma_warning_message | ||
| 1220 | .msg = "{s}" | ||
| 1221 | .extra = .str | ||
| 1222 | .opt = W("#pragma-messages") | ||
| 1223 | .kind = .warning | ||
| 1224 | |||
| 1225 | pragma_error_message | ||
| 1226 | .msg = "{s}" | ||
| 1227 | .extra = .str | ||
| 1228 | .kind = .@"error" | ||
| 1229 | |||
| 1230 | pragma_message | ||
| 1231 | .msg = "#pragma message: {s}" | ||
| 1232 | .extra = .str | ||
| 1233 | .kind = .note | ||
| 1234 | |||
| 1235 | pragma_requires_string_literal | ||
| 1236 | .msg = "pragma {s} requires string literal" | ||
| 1237 | .extra = .str | ||
| 1238 | .kind = .@"error" | ||
| 1239 | |||
| 1240 | poisoned_identifier | ||
| 1241 | .msg = "attempt to use a poisoned identifier" | ||
| 1242 | .kind = .@"error" | ||
| 1243 | |||
| 1244 | pragma_poison_identifier | ||
| 1245 | .msg = "can only poison identifier tokens" | ||
| 1246 | .kind = .@"error" | ||
| 1247 | |||
| 1248 | pragma_poison_macro | ||
| 1249 | .msg = "poisoning existing macro" | ||
| 1250 | .kind = .warning | ||
| 1251 | |||
| 1252 | newline_eof | ||
| 1253 | .msg = "no newline at end of file" | ||
| 1254 | .opt = W("newline-eof") | ||
| 1255 | .kind = .off | ||
| 1256 | .pedantic = true | ||
| 1257 | |||
| 1258 | empty_translation_unit | ||
| 1259 | .msg = "ISO C requires a translation unit to contain at least one declaration" | ||
| 1260 | .opt = W("empty-translation-unit") | ||
| 1261 | .kind = .off | ||
| 1262 | .pedantic = true | ||
| 1263 | |||
| 1264 | omitting_parameter_name | ||
| 1265 | .msg = "omitting the parameter name in a function definition is a C23 extension" | ||
| 1266 | .opt = W("c23-extensions") | ||
| 1267 | .kind = .warning | ||
| 1268 | .suppress_version = .c23 | ||
| 1269 | |||
| 1270 | non_int_bitfield | ||
| 1271 | .msg = "bit-field has non-integer type '{s}'" | ||
| 1272 | .extra = .str | ||
| 1273 | .kind = .@"error" | ||
| 1274 | |||
| 1275 | negative_bitwidth | ||
| 1276 | .msg = "bit-field has negative width ({s})" | ||
| 1277 | .extra = .str | ||
| 1278 | .kind = .@"error" | ||
| 1279 | |||
| 1280 | zero_width_named_field | ||
| 1281 | .msg = "named bit-field has zero width" | ||
| 1282 | .kind = .@"error" | ||
| 1283 | |||
| 1284 | bitfield_too_big | ||
| 1285 | .msg = "width of bit-field exceeds width of its type" | ||
| 1286 | .kind = .@"error" | ||
| 1287 | |||
| 1288 | invalid_utf8 | ||
| 1289 | .msg = "source file is not valid UTF-8" | ||
| 1290 | .kind = .@"error" | ||
| 1291 | |||
| 1292 | implicitly_unsigned_literal | ||
| 1293 | .msg = "integer literal is too large to be represented in a signed integer type, interpreting as unsigned" | ||
| 1294 | .opt = W("implicitly-unsigned-literal") | ||
| 1295 | .kind = .warning | ||
| 1296 | |||
| 1297 | invalid_preproc_operator | ||
| 1298 | .msg = "token is not a valid binary operator in a preprocessor subexpression" | ||
| 1299 | .kind = .@"error" | ||
| 1300 | |||
| 1301 | invalid_preproc_expr_start | ||
| 1302 | .msg = "invalid token at start of a preprocessor expression" | ||
| 1303 | .kind = .@"error" | ||
| 1304 | |||
| 1305 | c99_compat | ||
| 1306 | .msg = "using this character in an identifier is incompatible with C99" | ||
| 1307 | .opt = W("c99-compat") | ||
| 1308 | .kind = .off | ||
| 1309 | |||
| 1310 | unexpected_character | ||
| 1311 | .msg = "unexpected character <U+{X:0>4}>" | ||
| 1312 | .extra = .actual_codepoint | ||
| 1313 | .kind = .@"error" | ||
| 1314 | |||
| 1315 | invalid_identifier_start_char | ||
| 1316 | .msg = "character <U+{X:0>4}> not allowed at the start of an identifier" | ||
| 1317 | .extra = .actual_codepoint | ||
| 1318 | .kind = .@"error" | ||
| 1319 | |||
| 1320 | unicode_zero_width | ||
| 1321 | .msg = "identifier contains Unicode character <U+{X:0>4}> that is invisible in some environments" | ||
| 1322 | .opt = W("unicode-homoglyph") | ||
| 1323 | .extra = .actual_codepoint | ||
| 1324 | .kind = .warning | ||
| 1325 | |||
| 1326 | unicode_homoglyph | ||
| 1327 | .msg = "treating Unicode character <U+{X:0>4}> as identifier character rather than as '{u}' symbol" | ||
| 1328 | .extra = .codepoints | ||
| 1329 | .opt = W("unicode-homoglyph") | ||
| 1330 | .kind = .warning | ||
| 1331 | |||
| 1332 | meaningless_asm_qual | ||
| 1333 | .msg = "meaningless '{s}' on assembly outside function" | ||
| 1334 | .extra = .str | ||
| 1335 | .kind = .@"error" | ||
| 1336 | |||
| 1337 | duplicate_asm_qual | ||
| 1338 | .msg = "duplicate asm qualifier '{s}'" | ||
| 1339 | .extra = .str | ||
| 1340 | .kind = .@"error" | ||
| 1341 | |||
| 1342 | invalid_asm_str | ||
| 1343 | .msg = "cannot use {s} string literal in assembly" | ||
| 1344 | .extra = .str | ||
| 1345 | .kind = .@"error" | ||
| 1346 | |||
| 1347 | dollar_in_identifier_extension | ||
| 1348 | .msg = "'$' in identifier" | ||
| 1349 | .opt = W("dollar-in-identifier-extension") | ||
| 1350 | .kind = .off | ||
| 1351 | .pedantic = true | ||
| 1352 | |||
| 1353 | dollars_in_identifiers | ||
| 1354 | .msg = "illegal character '$' in identifier" | ||
| 1355 | .kind = .@"error" | ||
| 1356 | |||
| 1357 | expanded_from_here | ||
| 1358 | .msg = "expanded from here" | ||
| 1359 | .kind = .note | ||
| 1360 | |||
| 1361 | skipping_macro_backtrace | ||
| 1362 | .msg = "(skipping {d} expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)" | ||
| 1363 | .extra = .unsigned | ||
| 1364 | .kind = .note | ||
| 1365 | |||
| 1366 | pragma_operator_string_literal | ||
| 1367 | .msg = "_Pragma requires exactly one string literal token" | ||
| 1368 | .kind = .@"error" | ||
| 1369 | |||
| 1370 | unknown_gcc_pragma | ||
| 1371 | .msg = "pragma GCC expected 'error', 'warning', 'diagnostic', 'poison'" | ||
| 1372 | .opt = W("unknown-pragmas") | ||
| 1373 | .kind = .off | ||
| 1374 | .all = true | ||
| 1375 | |||
| 1376 | unknown_gcc_pragma_directive | ||
| 1377 | .msg = "pragma GCC diagnostic expected 'error', 'warning', 'ignored', 'fatal', 'push', or 'pop'" | ||
| 1378 | .opt = W("unknown-pragmas") | ||
| 1379 | .kind = .warning | ||
| 1380 | .all = true | ||
| 1381 | |||
| 1382 | predefined_top_level | ||
| 1383 | .msg = "predefined identifier is only valid inside function" | ||
| 1384 | .opt = W("predefined-identifier-outside-function") | ||
| 1385 | .kind = .warning | ||
| 1386 | |||
| 1387 | incompatible_va_arg | ||
| 1388 | .msg = "first argument to va_arg, is of type '{s}' and not 'va_list'" | ||
| 1389 | .extra = .str | ||
| 1390 | .kind = .@"error" | ||
| 1391 | |||
| 1392 | too_many_scalar_init_braces | ||
| 1393 | .msg = "too many braces around scalar initializer" | ||
| 1394 | .opt = W("many-braces-around-scalar-init") | ||
| 1395 | .kind = .warning | ||
| 1396 | |||
| 1397 | uninitialized_in_own_init | ||
| 1398 | .msg = "variable '{s}' is uninitialized when used within its own initialization" | ||
| 1399 | .extra = .str | ||
| 1400 | .opt = W("uninitialized") | ||
| 1401 | .kind = .off | ||
| 1402 | .all = true | ||
| 1403 | |||
| 1404 | gnu_statement_expression | ||
| 1405 | .msg = "use of GNU statement expression extension" | ||
| 1406 | .opt = W("gnu-statement-expression") | ||
| 1407 | .kind = .off | ||
| 1408 | .suppress_gnu = true | ||
| 1409 | .pedantic = true | ||
| 1410 | |||
| 1411 | stmt_expr_not_allowed_file_scope | ||
| 1412 | .msg = "statement expression not allowed at file scope" | ||
| 1413 | .kind = .@"error" | ||
| 1414 | |||
| 1415 | gnu_imaginary_constant | ||
| 1416 | .msg = "imaginary constants are a GNU extension" | ||
| 1417 | .opt = W("gnu-imaginary-constant") | ||
| 1418 | .kind = .off | ||
| 1419 | .suppress_gnu = true | ||
| 1420 | .pedantic = true | ||
| 1421 | |||
| 1422 | plain_complex | ||
| 1423 | .msg = "plain '_Complex' requires a type specifier; assuming '_Complex double'" | ||
| 1424 | .kind = .warning | ||
| 1425 | |||
| 1426 | complex_int | ||
| 1427 | .msg = "complex integer types are a GNU extension" | ||
| 1428 | .opt = W("gnu-complex-integer") | ||
| 1429 | .suppress_gnu = true | ||
| 1430 | .kind = .off | ||
| 1431 | |||
| 1432 | qual_on_ret_type | ||
| 1433 | .msg = "'{s}' type qualifier on return type has no effect" | ||
| 1434 | .opt = W("ignored-qualifiers") | ||
| 1435 | .extra = .str | ||
| 1436 | .kind = .off | ||
| 1437 | .all = true | ||
| 1438 | |||
| 1439 | cli_invalid_standard | ||
| 1440 | .msg = "invalid standard '{s}'" | ||
| 1441 | .extra = .str | ||
| 1442 | .kind = .@"error" | ||
| 1443 | |||
| 1444 | cli_invalid_target | ||
| 1445 | .msg = "invalid target '{s}'" | ||
| 1446 | .extra = .str | ||
| 1447 | .kind = .@"error" | ||
| 1448 | |||
| 1449 | cli_invalid_emulate | ||
| 1450 | .msg = "invalid compiler '{s}'" | ||
| 1451 | .extra = .str | ||
| 1452 | .kind = .@"error" | ||
| 1453 | |||
| 1454 | cli_unknown_arg | ||
| 1455 | .msg = "unknown argument '{s}'" | ||
| 1456 | .extra = .str | ||
| 1457 | .kind = .@"error" | ||
| 1458 | |||
| 1459 | cli_error | ||
| 1460 | .msg = "{s}" | ||
| 1461 | .extra = .str | ||
| 1462 | .kind = .@"error" | ||
| 1463 | |||
| 1464 | cli_unused_link_object | ||
| 1465 | .msg = "{s}: linker input file unused because linking not done" | ||
| 1466 | .extra = .str | ||
| 1467 | .kind = .warning | ||
| 1468 | |||
| 1469 | cli_unknown_linker | ||
| 1470 | .msg = "unrecognized linker '{s}'" | ||
| 1471 | .extra = .str | ||
| 1472 | .kind = .@"error" | ||
| 1473 | |||
| 1474 | extra_semi | ||
| 1475 | .msg = "extra ';' outside of a function" | ||
| 1476 | .opt = W("extra-semi") | ||
| 1477 | .kind = .off | ||
| 1478 | .pedantic = true | ||
| 1479 | |||
| 1480 | func_field | ||
| 1481 | .msg = "field declared as a function" | ||
| 1482 | .kind = .@"error" | ||
| 1483 | |||
| 1484 | vla_field | ||
| 1485 | .msg = "variable length array fields extension is not supported" | ||
| 1486 | .kind = .@"error" | ||
| 1487 | |||
| 1488 | field_incomplete_ty | ||
| 1489 | .msg = "field has incomplete type '{s}'" | ||
| 1490 | .extra = .str | ||
| 1491 | .kind = .@"error" | ||
| 1492 | |||
| 1493 | flexible_in_union | ||
| 1494 | .msg = "flexible array member in union is not allowed" | ||
| 1495 | .kind = .@"error" | ||
| 1496 | .suppress_msvc = true | ||
| 1497 | |||
| 1498 | flexible_non_final | ||
| 1499 | .msg = "flexible array member is not at the end of struct" | ||
| 1500 | .kind = .@"error" | ||
| 1501 | |||
| 1502 | flexible_in_empty | ||
| 1503 | .msg = "flexible array member in otherwise empty struct" | ||
| 1504 | .kind = .@"error" | ||
| 1505 | .suppress_msvc = true | ||
| 1506 | |||
| 1507 | duplicate_member | ||
| 1508 | .msg = "duplicate member '{s}'" | ||
| 1509 | .extra = .str | ||
| 1510 | .kind = .@"error" | ||
| 1511 | |||
| 1512 | binary_integer_literal | ||
| 1513 | .msg = "binary integer literals are a GNU extension" | ||
| 1514 | .kind = .off | ||
| 1515 | .opt = W("gnu-binary-literal") | ||
| 1516 | .pedantic = true | ||
| 1517 | |||
| 1518 | gnu_va_macro | ||
| 1519 | .msg = "named variadic macros are a GNU extension" | ||
| 1520 | .opt = W("variadic-macros") | ||
| 1521 | .kind = .off | ||
| 1522 | .pedantic = true | ||
| 1523 | |||
| 1524 | builtin_must_be_called | ||
| 1525 | .msg = "builtin function must be directly called" | ||
| 1526 | .kind = .@"error" | ||
| 1527 | |||
| 1528 | va_start_not_in_func | ||
| 1529 | .msg = "'va_start' cannot be used outside a function" | ||
| 1530 | .kind = .@"error" | ||
| 1531 | |||
| 1532 | va_start_fixed_args | ||
| 1533 | .msg = "'va_start' used in a function with fixed args" | ||
| 1534 | .kind = .@"error" | ||
| 1535 | |||
| 1536 | va_start_not_last_param | ||
| 1537 | .msg = "second argument to 'va_start' is not the last named parameter" | ||
| 1538 | .opt = W("varargs") | ||
| 1539 | .kind = .warning | ||
| 1540 | |||
| 1541 | attribute_not_enough_args | ||
| 1542 | .msg = "'{s}' attribute takes at least {d} argument(s)" | ||
| 1543 | .kind = .@"error" | ||
| 1544 | .extra = .attr_arg_count | ||
| 1545 | |||
| 1546 | attribute_too_many_args | ||
| 1547 | .msg = "'{s}' attribute takes at most {d} argument(s)" | ||
| 1548 | .kind = .@"error" | ||
| 1549 | .extra = .attr_arg_count | ||
| 1550 | |||
| 1551 | attribute_arg_invalid | ||
| 1552 | .msg = "Attribute argument is invalid, expected {s} but got {s}" | ||
| 1553 | .kind = .@"error" | ||
| 1554 | .extra = .attr_arg_type | ||
| 1555 | |||
| 1556 | unknown_attr_enum | ||
| 1557 | .msg = "Unknown `{s}` argument. Possible values are: {s}" | ||
| 1558 | .kind = .@"error" | ||
| 1559 | .extra = .attr_enum | ||
| 1560 | |||
| 1561 | attribute_requires_identifier | ||
| 1562 | .msg = "'{s}' attribute requires an identifier" | ||
| 1563 | .kind = .@"error" | ||
| 1564 | .extra = .str | ||
| 1565 | |||
| 1566 | declspec_not_enabled | ||
| 1567 | .msg = "'__declspec' attributes are not enabled; use '-fdeclspec' or '-fms-extensions' to enable support for __declspec attributes" | ||
| 1568 | .kind = .@"error" | ||
| 1569 | |||
| 1570 | declspec_attr_not_supported | ||
| 1571 | .msg = "__declspec attribute '{s}' is not supported" | ||
| 1572 | .extra = .str | ||
| 1573 | .opt = W("ignored-attributes") | ||
| 1574 | .kind = .warning | ||
| 1575 | |||
| 1576 | deprecated_declarations | ||
| 1577 | .msg = "{s}" | ||
| 1578 | .extra = .str | ||
| 1579 | .opt = W("deprecated-declarations") | ||
| 1580 | .kind = .warning | ||
| 1581 | |||
| 1582 | deprecated_note | ||
| 1583 | .msg = "'{s}' has been explicitly marked deprecated here" | ||
| 1584 | .extra = .str | ||
| 1585 | .opt = W("deprecated-declarations") | ||
| 1586 | .kind = .note | ||
| 1587 | |||
| 1588 | unavailable | ||
| 1589 | .msg = "{s}" | ||
| 1590 | .extra = .str | ||
| 1591 | .kind = .@"error" | ||
| 1592 | |||
| 1593 | unavailable_note | ||
| 1594 | .msg = "'{s}' has been explicitly marked unavailable here" | ||
| 1595 | .extra = .str | ||
| 1596 | .kind = .note | ||
| 1597 | |||
| 1598 | warning_attribute | ||
| 1599 | .msg = "{s}" | ||
| 1600 | .extra = .str | ||
| 1601 | .kind = .warning | ||
| 1602 | .opt = W("attribute-warning") | ||
| 1603 | |||
| 1604 | error_attribute | ||
| 1605 | .msg = "{s}" | ||
| 1606 | .extra = .str | ||
| 1607 | .kind = .@"error" | ||
| 1608 | |||
| 1609 | ignored_record_attr | ||
| 1610 | .msg = "attribute '{s}' is ignored, place it after \"{s}\" to apply attribute to type declaration" | ||
| 1611 | .extra = .ignored_record_attr | ||
| 1612 | .kind = .warning | ||
| 1613 | .opt = W("ignored-attributes") | ||
| 1614 | |||
| 1615 | backslash_newline_escape | ||
| 1616 | .msg = "backslash and newline separated by space" | ||
| 1617 | .kind = .warning | ||
| 1618 | .opt = W("backslash-newline-escape") | ||
| 1619 | |||
| 1620 | array_size_non_int | ||
| 1621 | .msg = "size of array has non-integer type '{s}'" | ||
| 1622 | .extra = .str | ||
| 1623 | .kind = .@"error" | ||
| 1624 | |||
| 1625 | cast_to_smaller_int | ||
| 1626 | .msg = "cast to smaller integer type {s}" | ||
| 1627 | .extra = .str | ||
| 1628 | .kind = .warning | ||
| 1629 | .opt = W("pointer-to-int-cast") | ||
| 1630 | |||
| 1631 | gnu_switch_range | ||
| 1632 | .msg = "use of GNU case range extension" | ||
| 1633 | .opt = W("gnu-case-range") | ||
| 1634 | .kind = .off | ||
| 1635 | .pedantic = true | ||
| 1636 | |||
| 1637 | empty_case_range | ||
| 1638 | .msg = "empty case range specified" | ||
| 1639 | .kind = .warning | ||
| 1640 | |||
| 1641 | non_standard_escape_char | ||
| 1642 | .msg = "use of non-standard escape character '\\{s}'" | ||
| 1643 | .kind = .off | ||
| 1644 | .opt = W("pedantic") | ||
| 1645 | .extra = .invalid_escape | ||
| 1646 | |||
| 1647 | invalid_pp_stringify_escape | ||
| 1648 | .msg = "invalid string literal, ignoring final '\\'" | ||
| 1649 | .kind = .warning | ||
| 1650 | |||
| 1651 | vla | ||
| 1652 | .msg = "variable length array used" | ||
| 1653 | .kind = .off | ||
| 1654 | .opt = W("vla") | ||
| 1655 | |||
| 1656 | float_overflow_conversion | ||
| 1657 | .msg = "implicit conversion of non-finite value from {s} is undefined" | ||
| 1658 | .extra = .str | ||
| 1659 | .kind = .off | ||
| 1660 | .opt = W("float-overflow-conversion") | ||
| 1661 | |||
| 1662 | float_out_of_range | ||
| 1663 | .msg = "implicit conversion of out of range value from {s} is undefined" | ||
| 1664 | .extra = .str | ||
| 1665 | .kind = .warning | ||
| 1666 | .opt = W("literal-conversion") | ||
| 1667 | |||
| 1668 | float_zero_conversion | ||
| 1669 | .msg = "implicit conversion from {s}" | ||
| 1670 | .extra = .str | ||
| 1671 | .kind = .off | ||
| 1672 | .opt = W("float-zero-conversion") | ||
| 1673 | |||
| 1674 | float_value_changed | ||
| 1675 | .msg = "implicit conversion from {s}" | ||
| 1676 | .extra = .str | ||
| 1677 | .kind = .warning | ||
| 1678 | .opt = W("float-conversion") | ||
| 1679 | |||
| 1680 | float_to_int | ||
| 1681 | .msg = "implicit conversion turns floating-point number into integer: {s}" | ||
| 1682 | .extra = .str | ||
| 1683 | .kind = .off | ||
| 1684 | .opt = W("literal-conversion") | ||
| 1685 | |||
| 1686 | const_decl_folded | ||
| 1687 | .msg = "expression is not an integer constant expression; folding it to a constant is a GNU extension" | ||
| 1688 | .kind = .off | ||
| 1689 | .opt = W("gnu-folding-constant") | ||
| 1690 | .pedantic = true | ||
| 1691 | |||
| 1692 | const_decl_folded_vla | ||
| 1693 | .msg = "variable length array folded to constant array as an extension" | ||
| 1694 | .kind = .off | ||
| 1695 | .opt = W("gnu-folding-constant") | ||
| 1696 | .pedantic = true | ||
| 1697 | |||
| 1698 | redefinition_of_typedef | ||
| 1699 | .msg = "typedef redefinition with different types ({s})" | ||
| 1700 | .extra = .str | ||
| 1701 | .kind = .@"error" | ||
| 1702 | |||
| 1703 | undefined_macro | ||
| 1704 | .msg = "'{s}' is not defined, evaluates to 0" | ||
| 1705 | .extra = .str | ||
| 1706 | .kind = .off | ||
| 1707 | .opt = W("undef") | ||
| 1708 | |||
| 1709 | fn_macro_undefined | ||
| 1710 | .msg = "function-like macro '{s}' is not defined" | ||
| 1711 | .extra = .str | ||
| 1712 | .kind = .@"error" | ||
| 1713 | |||
| 1714 | preprocessing_directive_only | ||
| 1715 | .msg = "'{s}' must be used within a preprocessing directive" | ||
| 1716 | .extra = .tok_id_expected | ||
| 1717 | .kind = .@"error" | ||
| 1718 | |||
| 1719 | missing_lparen_after_builtin | ||
| 1720 | .msg = "Missing '(' after built-in macro '{s}'" | ||
| 1721 | .extra = .str | ||
| 1722 | .kind = .@"error" | ||
| 1723 | |||
| 1724 | offsetof_ty | ||
| 1725 | .msg = "offsetof requires struct or union type, '{s}' invalid" | ||
| 1726 | .extra = .str | ||
| 1727 | .kind = .@"error" | ||
| 1728 | |||
| 1729 | offsetof_incomplete | ||
| 1730 | .msg = "offsetof of incomplete type '{s}'" | ||
| 1731 | .extra = .str | ||
| 1732 | .kind = .@"error" | ||
| 1733 | |||
| 1734 | offsetof_array | ||
| 1735 | .msg = "offsetof requires array type, '{s}' invalid" | ||
| 1736 | .extra = .str | ||
| 1737 | .kind = .@"error" | ||
| 1738 | |||
| 1739 | pragma_pack_lparen | ||
| 1740 | .msg = "missing '(' after '#pragma pack' - ignoring" | ||
| 1741 | .kind = .warning | ||
| 1742 | .opt = W("ignored-pragmas") | ||
| 1743 | |||
| 1744 | pragma_pack_rparen | ||
| 1745 | .msg = "missing ')' after '#pragma pack' - ignoring" | ||
| 1746 | .kind = .warning | ||
| 1747 | .opt = W("ignored-pragmas") | ||
| 1748 | |||
| 1749 | pragma_pack_unknown_action | ||
| 1750 | .msg = "unknown action for '#pragma pack' - ignoring" | ||
| 1751 | .opt = W("ignored-pragmas") | ||
| 1752 | .kind = .warning | ||
| 1753 | |||
| 1754 | pragma_pack_show | ||
| 1755 | .msg = "value of #pragma pack(show) == {d}" | ||
| 1756 | .extra = .unsigned | ||
| 1757 | .kind = .warning | ||
| 1758 | |||
| 1759 | pragma_pack_int | ||
| 1760 | .msg = "expected #pragma pack parameter to be '1', '2', '4', '8', or '16'" | ||
| 1761 | .opt = W("ignored-pragmas") | ||
| 1762 | .kind = .warning | ||
| 1763 | |||
| 1764 | pragma_pack_int_ident | ||
| 1765 | .msg = "expected integer or identifier in '#pragma pack' - ignored" | ||
| 1766 | .opt = W("ignored-pragmas") | ||
| 1767 | .kind = .warning | ||
| 1768 | |||
| 1769 | pragma_pack_undefined_pop | ||
| 1770 | .msg = "specifying both a name and alignment to 'pop' is undefined" | ||
| 1771 | .kind = .warning | ||
| 1772 | |||
| 1773 | pragma_pack_empty_stack | ||
| 1774 | .msg = "#pragma pack(pop, ...) failed: stack empty" | ||
| 1775 | .opt = W("ignored-pragmas") | ||
| 1776 | .kind = .warning | ||
| 1777 | |||
| 1778 | cond_expr_type | ||
| 1779 | .msg = "used type '{s}' where arithmetic or pointer type is required" | ||
| 1780 | .extra = .str | ||
| 1781 | .kind = .@"error" | ||
| 1782 | |||
| 1783 | too_many_includes | ||
| 1784 | .msg = "#include nested too deeply" | ||
| 1785 | .kind = .@"error" | ||
| 1786 | |||
| 1787 | enumerator_too_small | ||
| 1788 | .msg = "ISO C restricts enumerator values to range of 'int' ({s} is too small)" | ||
| 1789 | .extra = .str | ||
| 1790 | .kind = .off | ||
| 1791 | .opt = W("pedantic") | ||
| 1792 | |||
| 1793 | enumerator_too_large | ||
| 1794 | .msg = "ISO C restricts enumerator values to range of 'int' ({s} is too large)" | ||
| 1795 | .extra = .str | ||
| 1796 | .kind = .off | ||
| 1797 | .opt = W("pedantic") | ||
| 1798 | |||
| 1799 | include_next | ||
| 1800 | .msg = "#include_next is a language extension" | ||
| 1801 | .kind = .off | ||
| 1802 | .pedantic = true | ||
| 1803 | .opt = W("gnu-include-next") | ||
| 1804 | |||
| 1805 | include_next_outside_header | ||
| 1806 | .msg = "#include_next in primary source file; will search from start of include path" | ||
| 1807 | .kind = .warning | ||
| 1808 | .opt = W("include-next-outside-header") | ||
| 1809 | |||
| 1810 | enumerator_overflow | ||
| 1811 | .msg = "overflow in enumeration value" | ||
| 1812 | .kind = .warning | ||
| 1813 | |||
| 1814 | enum_not_representable | ||
| 1815 | .msg = "incremented enumerator value {s} is not representable in the largest integer type" | ||
| 1816 | .kind = .warning | ||
| 1817 | .opt = W("enum-too-large") | ||
| 1818 | .extra = .pow_2_as_string | ||
| 1819 | |||
| 1820 | enum_too_large | ||
| 1821 | .msg = "enumeration values exceed range of largest integer" | ||
| 1822 | .kind = .warning | ||
| 1823 | .opt = W("enum-too-large") | ||
| 1824 | |||
| 1825 | enum_fixed | ||
| 1826 | .msg = "enumeration types with a fixed underlying type are a Clang extension" | ||
| 1827 | .kind = .off | ||
| 1828 | .pedantic = true | ||
| 1829 | .opt = W("fixed-enum-extension") | ||
| 1830 | |||
| 1831 | enum_prev_nonfixed | ||
| 1832 | .msg = "enumeration previously declared with nonfixed underlying type" | ||
| 1833 | .kind = .@"error" | ||
| 1834 | |||
| 1835 | enum_prev_fixed | ||
| 1836 | .msg = "enumeration previously declared with fixed underlying type" | ||
| 1837 | .kind = .@"error" | ||
| 1838 | |||
| 1839 | enum_different_explicit_ty | ||
| 1840 | # str will be like 'new' (was 'old' | ||
| 1841 | .msg = "enumeration redeclared with different underlying type {s})" | ||
| 1842 | .extra = .str | ||
| 1843 | .kind = .@"error" | ||
| 1844 | |||
| 1845 | enum_not_representable_fixed | ||
| 1846 | .msg = "enumerator value is not representable in the underlying type '{s}'" | ||
| 1847 | .extra = .str | ||
| 1848 | .kind = .@"error" | ||
| 1849 | |||
| 1850 | transparent_union_wrong_type | ||
| 1851 | .msg = "'transparent_union' attribute only applies to unions" | ||
| 1852 | .opt = W("ignored-attributes") | ||
| 1853 | .kind = .warning | ||
| 1854 | |||
| 1855 | transparent_union_one_field | ||
| 1856 | .msg = "transparent union definition must contain at least one field; transparent_union attribute ignored" | ||
| 1857 | .opt = W("ignored-attributes") | ||
| 1858 | .kind = .warning | ||
| 1859 | |||
| 1860 | transparent_union_size | ||
| 1861 | .msg = "size of field {s} bits) does not match the size of the first field in transparent union; transparent_union attribute ignored" | ||
| 1862 | .extra = .str | ||
| 1863 | .opt = W("ignored-attributes") | ||
| 1864 | .kind = .warning | ||
| 1865 | |||
| 1866 | transparent_union_size_note | ||
| 1867 | .msg = "size of first field is {d}" | ||
| 1868 | .extra = .unsigned | ||
| 1869 | .kind = .note | ||
| 1870 | |||
| 1871 | designated_init_invalid | ||
| 1872 | .msg = "'designated_init' attribute is only valid on 'struct' type'" | ||
| 1873 | .kind = .@"error" | ||
| 1874 | |||
| 1875 | designated_init_needed | ||
| 1876 | .msg = "positional initialization of field in 'struct' declared with 'designated_init' attribute" | ||
| 1877 | .opt = W("designated-init") | ||
| 1878 | .kind = .warning | ||
| 1879 | |||
| 1880 | ignore_common | ||
| 1881 | .msg = "ignoring attribute 'common' because it conflicts with attribute 'nocommon'" | ||
| 1882 | .opt = W("ignored-attributes") | ||
| 1883 | .kind = .warning | ||
| 1884 | |||
| 1885 | ignore_nocommon | ||
| 1886 | .msg = "ignoring attribute 'nocommon' because it conflicts with attribute 'common'" | ||
| 1887 | .opt = W("ignored-attributes") | ||
| 1888 | .kind = .warning | ||
| 1889 | |||
| 1890 | non_string_ignored | ||
| 1891 | .msg = "'nonstring' attribute ignored on objects of type '{s}'" | ||
| 1892 | .opt = W("ignored-attributes") | ||
| 1893 | .kind = .warning | ||
| 1894 | |||
| 1895 | local_variable_attribute | ||
| 1896 | .msg = "'{s}' attribute only applies to local variables" | ||
| 1897 | .extra = .str | ||
| 1898 | .opt = W("ignored-attributes") | ||
| 1899 | .kind = .warning | ||
| 1900 | |||
| 1901 | ignore_cold | ||
| 1902 | .msg = "ignoring attribute 'cold' because it conflicts with attribute 'hot'" | ||
| 1903 | .opt = W("ignored-attributes") | ||
| 1904 | .kind = .warning | ||
| 1905 | |||
| 1906 | ignore_hot | ||
| 1907 | .msg = "ignoring attribute 'hot' because it conflicts with attribute 'cold'" | ||
| 1908 | .opt = W("ignored-attributes") | ||
| 1909 | .kind = .warning | ||
| 1910 | |||
| 1911 | ignore_noinline | ||
| 1912 | .msg = "ignoring attribute 'noinline' because it conflicts with attribute 'always_inline'" | ||
| 1913 | .opt = W("ignored-attributes") | ||
| 1914 | .kind = .warning | ||
| 1915 | |||
| 1916 | ignore_always_inline | ||
| 1917 | .msg = "ignoring attribute 'always_inline' because it conflicts with attribute 'noinline'" | ||
| 1918 | .opt = W("ignored-attributes") | ||
| 1919 | .kind = .warning | ||
| 1920 | |||
| 1921 | invalid_noreturn | ||
| 1922 | .msg = "function '{s}' declared 'noreturn' should not return" | ||
| 1923 | .extra = .str | ||
| 1924 | .kind = .warning | ||
| 1925 | .opt = W("invalid-noreturn") | ||
| 1926 | |||
| 1927 | nodiscard_unused | ||
| 1928 | .msg = "ignoring return value of '{s}', declared with 'nodiscard' attribute" | ||
| 1929 | .extra = .str | ||
| 1930 | .kind = .warning | ||
| 1931 | .opt = W("unused-result") | ||
| 1932 | |||
| 1933 | warn_unused_result | ||
| 1934 | .msg = "ignoring return value of '{s}', declared with 'warn_unused_result' attribute" | ||
| 1935 | .extra = .str | ||
| 1936 | .kind = .warning | ||
| 1937 | .opt = W("unused-result") | ||
| 1938 | |||
| 1939 | invalid_vec_elem_ty | ||
| 1940 | .msg = "invalid vector element type '{s}'" | ||
| 1941 | .extra = .str | ||
| 1942 | .kind = .@"error" | ||
| 1943 | |||
| 1944 | vec_size_not_multiple | ||
| 1945 | .msg = "vector size not an integral multiple of component size" | ||
| 1946 | .kind = .@"error" | ||
| 1947 | |||
| 1948 | invalid_imag | ||
| 1949 | .msg = "invalid type '{s}' to __imag operator" | ||
| 1950 | .extra = .str | ||
| 1951 | .kind = .@"error" | ||
| 1952 | |||
| 1953 | invalid_real | ||
| 1954 | .msg = "invalid type '{s}' to __real operator" | ||
| 1955 | .extra = .str | ||
| 1956 | .kind = .@"error" | ||
| 1957 | |||
| 1958 | zero_length_array | ||
| 1959 | .msg = "zero size arrays are an extension" | ||
| 1960 | .kind = .off | ||
| 1961 | .pedantic = true | ||
| 1962 | .opt = W("zero-length-array") | ||
| 1963 | |||
| 1964 | old_style_flexible_struct | ||
| 1965 | .msg = "array index {s} is past the end of the array" | ||
| 1966 | .extra = .str | ||
| 1967 | .kind = .off | ||
| 1968 | .pedantic = true | ||
| 1969 | .opt = W("old-style-flexible-struct") | ||
| 1970 | |||
| 1971 | comma_deletion_va_args | ||
| 1972 | .msg = "token pasting of ',' and __VA_ARGS__ is a GNU extension" | ||
| 1973 | .kind = .off | ||
| 1974 | .pedantic = true | ||
| 1975 | .opt = W("gnu-zero-variadic-macro-arguments") | ||
| 1976 | .suppress_gcc = true | ||
| 1977 | |||
| 1978 | main_return_type | ||
| 1979 | .msg = "return type of 'main' is not 'int'" | ||
| 1980 | .kind = .warning | ||
| 1981 | .opt = W("main-return-type") | ||
| 1982 | |||
| 1983 | expansion_to_defined | ||
| 1984 | .msg = "macro expansion producing 'defined' has undefined behavior" | ||
| 1985 | .kind = .off | ||
| 1986 | .pedantic = true | ||
| 1987 | .opt = W("expansion-to-defined") | ||
| 1988 | |||
| 1989 | invalid_int_suffix | ||
| 1990 | .msg = "invalid suffix '{s}' on integer constant" | ||
| 1991 | .extra = .str | ||
| 1992 | .kind = .@"error" | ||
| 1993 | |||
| 1994 | invalid_float_suffix | ||
| 1995 | .msg = "invalid suffix '{s}' on floating constant" | ||
| 1996 | .extra = .str | ||
| 1997 | .kind = .@"error" | ||
| 1998 | |||
| 1999 | invalid_octal_digit | ||
| 2000 | .msg = "invalid digit '{c}' in octal constant" | ||
| 2001 | .extra = .ascii | ||
| 2002 | .kind = .@"error" | ||
| 2003 | |||
| 2004 | invalid_binary_digit | ||
| 2005 | .msg = "invalid digit '{c}' in binary constant" | ||
| 2006 | .extra = .ascii | ||
| 2007 | .kind = .@"error" | ||
| 2008 | |||
| 2009 | exponent_has_no_digits | ||
| 2010 | .msg = "exponent has no digits" | ||
| 2011 | .kind = .@"error" | ||
| 2012 | |||
| 2013 | hex_floating_constant_requires_exponent | ||
| 2014 | .msg = "hexadecimal floating constant requires an exponent" | ||
| 2015 | .kind = .@"error" | ||
| 2016 | |||
| 2017 | sizeof_returns_zero | ||
| 2018 | .msg = "sizeof returns 0" | ||
| 2019 | .kind = .warning | ||
| 2020 | .suppress_gcc = true | ||
| 2021 | .suppress_clang = true | ||
| 2022 | |||
| 2023 | declspec_not_allowed_after_declarator | ||
| 2024 | .msg = "'declspec' attribute not allowed after declarator" | ||
| 2025 | .kind = .@"error" | ||
| 2026 | |||
| 2027 | declarator_name_tok | ||
| 2028 | .msg = "this declarator" | ||
| 2029 | .kind = .note | ||
| 2030 | |||
| 2031 | type_not_supported_on_target | ||
| 2032 | .msg = "{s} is not supported on this target" | ||
| 2033 | .extra = .str | ||
| 2034 | .kind = .@"error" | ||
| 2035 | |||
| 2036 | bit_int | ||
| 2037 | .msg = "'_BitInt' in C17 and earlier is a Clang extension'" | ||
| 2038 | .kind = .off | ||
| 2039 | .pedantic = true | ||
| 2040 | .opt = W("bit-int-extension") | ||
| 2041 | .suppress_version = .c23 | ||
| 2042 | |||
| 2043 | unsigned_bit_int_too_small | ||
| 2044 | .msg = "{s} must have a bit size of at least 1" | ||
| 2045 | .extra = .str | ||
| 2046 | .kind = .@"error" | ||
| 2047 | |||
| 2048 | signed_bit_int_too_small | ||
| 2049 | .msg = "{s} must have a bit size of at least 2" | ||
| 2050 | .extra = .str | ||
| 2051 | .kind = .@"error" | ||
| 2052 | |||
| 2053 | bit_int_too_big | ||
| 2054 | .msg = "{s} of bit sizes greater than " ++ std.fmt.comptimePrint("{d}", .{Properties.max_bits}) ++ " not supported" | ||
| 2055 | .extra = .str | ||
| 2056 | .kind = .@"error" | ||
| 2057 | |||
| 2058 | keyword_macro | ||
| 2059 | .msg = "keyword is hidden by macro definition" | ||
| 2060 | .kind = .off | ||
| 2061 | .pedantic = true | ||
| 2062 | .opt = W("keyword-macro") | ||
| 2063 | |||
| 2064 | ptr_arithmetic_incomplete | ||
| 2065 | .msg = "arithmetic on a pointer to an incomplete type '{s}'" | ||
| 2066 | .extra = .str | ||
| 2067 | .kind = .@"error" | ||
| 2068 | |||
| 2069 | callconv_not_supported | ||
| 2070 | .msg = "'{s}' calling convention is not supported for this target" | ||
| 2071 | .extra = .str | ||
| 2072 | .opt = W("ignored-attributes") | ||
| 2073 | .kind = .warning | ||
| 2074 | |||
| 2075 | pointer_arith_void | ||
| 2076 | .msg = "invalid application of '{s}' to a void type" | ||
| 2077 | .extra = .str | ||
| 2078 | .kind = .off | ||
| 2079 | .pedantic = true | ||
| 2080 | .opt = W("pointer-arith") | ||
| 2081 | |||
| 2082 | sizeof_array_arg | ||
| 2083 | .msg = "sizeof on array function parameter will return size of {s}" | ||
| 2084 | .extra = .str | ||
| 2085 | .kind = .warning | ||
| 2086 | .opt = W("sizeof-array-argument") | ||
| 2087 | |||
| 2088 | array_address_to_bool | ||
| 2089 | .msg = "address of array '{s}' will always evaluate to 'true'" | ||
| 2090 | .extra = .str | ||
| 2091 | .kind = .warning | ||
| 2092 | .opt = W("pointer-bool-conversion") | ||
| 2093 | |||
| 2094 | string_literal_to_bool | ||
| 2095 | .msg = "implicit conversion turns string literal into bool: {s}" | ||
| 2096 | .extra = .str | ||
| 2097 | .kind = .off | ||
| 2098 | .opt = W("string-conversion") | ||
| 2099 | |||
| 2100 | constant_expression_conversion_not_allowed | ||
| 2101 | .msg = "this conversion is not allowed in a constant expression" | ||
| 2102 | .kind = .note | ||
| 2103 | |||
| 2104 | invalid_object_cast | ||
| 2105 | .msg = "cannot cast an object of type {s}" | ||
| 2106 | .extra = .str | ||
| 2107 | .kind = .@"error" | ||
| 2108 | |||
| 2109 | cli_invalid_fp_eval_method | ||
| 2110 | .msg = "unsupported argument '{s}' to option '-ffp-eval-method='; expected 'source', 'double', or 'extended'" | ||
| 2111 | .extra = .str | ||
| 2112 | .kind = .@"error" | ||
| 2113 | |||
| 2114 | suggest_pointer_for_invalid_fp16 | ||
| 2115 | .msg = "{s} cannot have __fp16 type; did you forget * ?" | ||
| 2116 | .extra = .str | ||
| 2117 | .kind = .@"error" | ||
| 2118 | |||
| 2119 | bitint_suffix | ||
| 2120 | .msg = "'_BitInt' suffix for literals is a C23 extension" | ||
| 2121 | .opt = W("c23-extensions") | ||
| 2122 | .kind = .warning | ||
| 2123 | .suppress_version = .c23 | ||
| 2124 | |||
| 2125 | auto_type_extension | ||
| 2126 | .msg = "'__auto_type' is a GNU extension" | ||
| 2127 | .opt = W("gnu-auto-type") | ||
| 2128 | .kind = .off | ||
| 2129 | .pedantic = true | ||
| 2130 | |||
| 2131 | auto_type_not_allowed | ||
| 2132 | .msg = "'__auto_type' not allowed in {s}" | ||
| 2133 | .kind = .@"error" | ||
| 2134 | .extra = .str | ||
| 2135 | |||
| 2136 | auto_type_requires_initializer | ||
| 2137 | .msg = "declaration of variable '{s}' with deduced type requires an initializer" | ||
| 2138 | .kind = .@"error" | ||
| 2139 | .extra = .str | ||
| 2140 | |||
| 2141 | auto_type_requires_single_declarator | ||
| 2142 | .msg = "'__auto_type' may only be used with a single declarator" | ||
| 2143 | .kind = .@"error" | ||
| 2144 | |||
| 2145 | auto_type_requires_plain_declarator | ||
| 2146 | .msg = "'__auto_type' requires a plain identifier as declarator" | ||
| 2147 | .kind = .@"error" | ||
| 2148 | |||
| 2149 | invalid_cast_to_auto_type | ||
| 2150 | .msg = "invalid cast to '__auto_type'" | ||
| 2151 | .kind = .@"error" | ||
| 2152 | |||
| 2153 | auto_type_from_bitfield | ||
| 2154 | .msg = "cannot use bit-field as '__auto_type' initializer" | ||
| 2155 | .kind = .@"error" | ||
| 2156 | |||
| 2157 | array_of_auto_type | ||
| 2158 | .msg = "'{s}' declared as array of '__auto_type'" | ||
| 2159 | .kind = .@"error" | ||
| 2160 | .extra = .str | ||
| 2161 | |||
| 2162 | auto_type_with_init_list | ||
| 2163 | .msg = "cannot use '__auto_type' with initializer list" | ||
| 2164 | .kind = .@"error" | ||
| 2165 | |||
| 2166 | missing_semicolon | ||
| 2167 | .msg = "expected ';' at end of declaration list" | ||
| 2168 | .kind = .warning | ||
| 2169 | |||
| 2170 | tentative_definition_incomplete | ||
| 2171 | .msg = "tentative definition has type '{s}' that is never completed" | ||
| 2172 | .kind = .@"error" | ||
| 2173 | .extra = .str | ||
| 2174 | |||
| 2175 | forward_declaration_here | ||
| 2176 | .msg = "forward declaration of '{s}'" | ||
| 2177 | .kind = .note | ||
| 2178 | .extra = .str | ||
| 2179 | |||
| 2180 | gnu_union_cast | ||
| 2181 | .msg = "cast to union type is a GNU extension" | ||
| 2182 | .opt = W("gnu-union-cast") | ||
| 2183 | .kind = .off | ||
| 2184 | .pedantic = true | ||
| 2185 | |||
| 2186 | invalid_union_cast | ||
| 2187 | .msg = "cast to union type from type '{s}' not present in union" | ||
| 2188 | .kind = .@"error" | ||
| 2189 | .extra = .str | ||
| 2190 | |||
| 2191 | cast_to_incomplete_type | ||
| 2192 | .msg = "cast to incomplete type '{s}'" | ||
| 2193 | .kind = .@"error" | ||
| 2194 | .extra = .str | ||
| 2195 | |||
| 2196 | invalid_source_epoch | ||
| 2197 | .msg = "environment variable SOURCE_DATE_EPOCH must expand to a non-negative integer less than or equal to 253402300799" | ||
| 2198 | .kind = .@"error" | ||
| 2199 | |||
| 2200 | fuse_ld_path | ||
| 2201 | .msg = "'-fuse-ld=' taking a path is deprecated; use '--ld-path=' instead" | ||
| 2202 | .kind = .off | ||
| 2203 | .opt = W("fuse-ld-path") | ||
| 2204 | |||
| 2205 | invalid_rtlib | ||
| 2206 | .msg = "invalid runtime library name '{s}'" | ||
| 2207 | .kind = .@"error" | ||
| 2208 | .extra = .str | ||
| 2209 | |||
| 2210 | unsupported_rtlib_gcc | ||
| 2211 | .msg = "unsupported runtime library 'libgcc' for platform '{s}'" | ||
| 2212 | .kind = .@"error" | ||
| 2213 | .extra = .str | ||
| 2214 | |||
| 2215 | invalid_unwindlib | ||
| 2216 | .msg = "invalid unwind library name '{s}'" | ||
| 2217 | .kind = .@"error" | ||
| 2218 | .extra = .str | ||
| 2219 | |||
| 2220 | incompatible_unwindlib | ||
| 2221 | .msg = "--rtlib=libgcc requires --unwindlib=libgcc" | ||
| 2222 | .kind = .@"error" | ||
| 2223 | |||
| 2224 | gnu_asm_disabled | ||
| 2225 | .msg = "GNU-style inline assembly is disabled" | ||
| 2226 | .kind = .@"error" | ||
| 2227 | |||
| 2228 | extension_token_used | ||
| 2229 | .msg = "extension used" | ||
| 2230 | .kind = .off | ||
| 2231 | .pedantic = true | ||
| 2232 | .opt = W("language-extension-token") | ||
| 2233 | |||
| 2234 | complex_component_init | ||
| 2235 | .msg = "complex initialization specifying real and imaginary components is an extension" | ||
| 2236 | .opt = W("complex-component-init") | ||
| 2237 | .kind = .off | ||
| 2238 | .pedantic = true | ||
| 2239 | |||
| 2240 | complex_prefix_postfix_op | ||
| 2241 | .msg = "ISO C does not support '++'/'--' on complex type '{s}'" | ||
| 2242 | .opt = W("pedantic") | ||
| 2243 | .extra = .str | ||
| 2244 | .kind = .off | ||
| 2245 | |||
| 2246 | not_floating_type | ||
| 2247 | .msg = "argument type '{s}' is not a real floating point type" | ||
| 2248 | .extra = .str | ||
| 2249 | .kind = .@"error" | ||
| 2250 | |||
| 2251 | argument_types_differ | ||
| 2252 | .msg = "arguments are of different types ({s})" | ||
| 2253 | .extra = .str | ||
| 2254 | .kind = .@"error" | ||
| 2255 | |||
| 2256 | ms_search_rule | ||
| 2257 | .msg = "#include resolved using non-portable Microsoft search rules as: {s}" | ||
| 2258 | .extra = .str | ||
| 2259 | .opt = W("microsoft-include") | ||
| 2260 | .kind = .warning | ||
| 2261 | |||
| 2262 | ctrl_z_eof | ||
| 2263 | .msg = "treating Ctrl-Z as end-of-file is a Microsoft extension" | ||
| 2264 | .opt = W("microsoft-end-of-file") | ||
| 2265 | .kind = .off | ||
| 2266 | .pedantic = true | ||
| 2267 | |||
| 2268 | illegal_char_encoding_warning | ||
| 2269 | .msg = "illegal character encoding in character literal" | ||
| 2270 | .opt = W("invalid-source-encoding") | ||
| 2271 | .kind = .warning | ||
| 2272 | |||
| 2273 | illegal_char_encoding_error | ||
| 2274 | .msg = "illegal character encoding in character literal" | ||
| 2275 | .kind = .@"error" | ||
| 2276 | |||
| 2277 | ucn_basic_char_error | ||
| 2278 | .msg = "character '{c}' cannot be specified by a universal character name" | ||
| 2279 | .kind = .@"error" | ||
| 2280 | .extra = .ascii | ||
| 2281 | |||
| 2282 | ucn_basic_char_warning | ||
| 2283 | .msg = "specifying character '{c}' with a universal character name is incompatible with C standards before C23" | ||
| 2284 | .kind = .off | ||
| 2285 | .extra = .ascii | ||
| 2286 | .suppress_unless_version = .c23 | ||
| 2287 | .opt = W("pre-c23-compat") | ||
| 2288 | |||
| 2289 | ucn_control_char_error | ||
| 2290 | .msg = "universal character name refers to a control character" | ||
| 2291 | .kind = .@"error" | ||
| 2292 | |||
| 2293 | ucn_control_char_warning | ||
| 2294 | .msg = "universal character name referring to a control character is incompatible with C standards before C23" | ||
| 2295 | .kind = .off | ||
| 2296 | .suppress_unless_version = .c23 | ||
| 2297 | .opt = W("pre-c23-compat") | ||
| 2298 | |||
| 2299 | c89_ucn_in_literal | ||
| 2300 | .msg = "universal character names are only valid in C99 or later" | ||
| 2301 | .suppress_version = .c99 | ||
| 2302 | .kind = .warning | ||
| 2303 | .opt = W("unicode") | ||
| 2304 | |||
| 2305 | four_char_char_literal | ||
| 2306 | .msg = "multi-character character constant" | ||
| 2307 | .opt = W("four-char-constants") | ||
| 2308 | .kind = .off | ||
| 2309 | |||
| 2310 | multi_char_char_literal | ||
| 2311 | .msg = "multi-character character constant" | ||
| 2312 | .kind = .off | ||
| 2313 | |||
| 2314 | missing_hex_escape | ||
| 2315 | .msg = "\\{c} used with no following hex digits" | ||
| 2316 | .kind = .@"error" | ||
| 2317 | .extra = .ascii | ||
| 2318 | |||
| 2319 | unknown_escape_sequence | ||
| 2320 | .msg = "unknown escape sequence '\\{s}'" | ||
| 2321 | .kind = .warning | ||
| 2322 | .opt = W("unknown-escape-sequence") | ||
| 2323 | .extra = .invalid_escape | ||
| 2324 | |||
| 2325 | attribute_requires_string | ||
| 2326 | .msg = "attribute '{s}' requires an ordinary string" | ||
| 2327 | .kind = .@"error" | ||
| 2328 | .extra = .str | ||
| 2329 | |||
| 2330 | unterminated_string_literal_warning | ||
| 2331 | .msg = "missing terminating '\"' character" | ||
| 2332 | .kind = .warning | ||
| 2333 | .opt = W("invalid-pp-token") | ||
| 2334 | |||
| 2335 | unterminated_string_literal_error | ||
| 2336 | .msg = "missing terminating '\"' character" | ||
| 2337 | .kind = .@"error" | ||
| 2338 | |||
| 2339 | empty_char_literal_warning | ||
| 2340 | .msg = "empty character constant" | ||
| 2341 | .kind = .warning | ||
| 2342 | .opt = W("invalid-pp-token") | ||
| 2343 | |||
| 2344 | empty_char_literal_error | ||
| 2345 | .msg = "empty character constant" | ||
| 2346 | .kind = .@"error" | ||
| 2347 | |||
| 2348 | unterminated_char_literal_warning | ||
| 2349 | .msg = "missing terminating ' character" | ||
| 2350 | .kind = .warning | ||
| 2351 | .opt = W("invalid-pp-token") | ||
| 2352 | |||
| 2353 | unterminated_char_literal_error | ||
| 2354 | .msg = "missing terminating ' character" | ||
| 2355 | .kind = .@"error" | ||
| 2356 | |||
| 2357 | unterminated_comment | ||
| 2358 | .msg = "unterminated comment" | ||
| 2359 | .kind = .@"error" | ||
| 2360 | |||
| 2361 | def_no_proto_deprecated | ||
| 2362 | .msg = "a function definition without a prototype is deprecated in all versions of C and is not supported in C23" | ||
| 2363 | .kind = .warning | ||
| 2364 | .opt = W("deprecated-non-prototype") | ||
| 2365 | |||
| 2366 | passing_args_to_kr | ||
| 2367 | .msg = "passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C23" | ||
| 2368 | .kind = .warning | ||
| 2369 | .opt = W("deprecated-non-prototype") | ||
| 2370 | |||
| 2371 | unknown_type_name | ||
| 2372 | .msg = "unknown type name '{s}'" | ||
| 2373 | .kind = .@"error" | ||
| 2374 | .extra = .str | ||
| 2375 | |||
| 2376 | label_compound_end | ||
| 2377 | .msg = "label at end of compound statement is a C23 extension" | ||
| 2378 | .opt = W("c23-extensions") | ||
| 2379 | .kind = .warning | ||
| 2380 | .suppress_version = .c23 | ||
| 2381 | |||
| 2382 | u8_char_lit | ||
| 2383 | .msg = "UTF-8 character literal is a C23 extension" | ||
| 2384 | .opt = W("c23-extensions") | ||
| 2385 | .kind = .warning | ||
| 2386 | .suppress_version = .c23 | ||
| 2387 | |||
| 2388 | malformed_embed_param | ||
| 2389 | .msg = "unexpected token in embed parameter" | ||
| 2390 | .kind = .@"error" | ||
| 2391 | |||
| 2392 | malformed_embed_limit | ||
| 2393 | .msg = "the limit parameter expects one non-negative integer as a parameter" | ||
| 2394 | .kind = .@"error" | ||
| 2395 | |||
| 2396 | duplicate_embed_param | ||
| 2397 | .msg = "duplicate embed parameter '{s}'" | ||
| 2398 | .kind = .warning | ||
| 2399 | .extra = .str | ||
| 2400 | .opt = W("duplicate-embed-param") | ||
| 2401 | |||
| 2402 | unsupported_embed_param | ||
| 2403 | .msg = "unsupported embed parameter '{s}' embed parameter" | ||
| 2404 | .kind = .warning | ||
| 2405 | .extra = .str | ||
| 2406 | .opt = W("unsupported-embed-param") | ||
| 2407 | |||
| 2408 | invalid_compound_literal_storage_class | ||
| 2409 | .msg = "compound literal cannot have {s} storage class" | ||
| 2410 | .kind = .@"error" | ||
| 2411 | .extra = .str | ||
| 2412 | |||
| 2413 | va_opt_lparen | ||
| 2414 | .msg = "missing '(' following __VA_OPT__" | ||
| 2415 | .kind = .@"error" | ||
| 2416 | |||
| 2417 | va_opt_rparen | ||
| 2418 | .msg = "unterminated __VA_OPT__ argument list" | ||
| 2419 | .kind = .@"error" | ||
| 2420 | |||
| 2421 | attribute_int_out_of_range | ||
| 2422 | .msg = "attribute value '{s}' out of range" | ||
| 2423 | .kind = .@"error" | ||
| 2424 | .extra = .str | ||
| 2425 | |||
| 2426 | identifier_not_normalized | ||
| 2427 | .msg = "'{s}' is not in NFC" | ||
| 2428 | .kind = .warning | ||
| 2429 | .extra = .normalized | ||
| 2430 | .opt = W("normalized") | ||
| 2431 | |||
| 2432 | c23_auto_plain_declarator | ||
| 2433 | .msg = "'auto' requires a plain identifier declarator" | ||
| 2434 | .kind = .@"error" | ||
| 2435 | |||
| 2436 | c23_auto_single_declarator | ||
| 2437 | .msg = "'auto' can only be used with a single declarator" | ||
| 2438 | .kind = .@"error" | ||
| 2439 | |||
| 2440 | c32_auto_requires_initializer | ||
| 2441 | .msg = "'auto' requires an initializer" | ||
| 2442 | .kind = .@"error" | ||
| 2443 | |||
| 2444 | c23_auto_scalar_init | ||
| 2445 | .msg = "'auto' requires a scalar initializer" | ||
| 2446 | .kind = .@"error" | ||
deps/aro/aro/Driver.zig created+791| ... | @@ -0,0 +1,791 @@ | ||
| 1 | const std = @import("std"); | ||
| 2 | const mem = std.mem; | ||
| 3 | const Allocator = mem.Allocator; | ||
| 4 | const process = std.process; | ||
| 5 | const backend = @import("backend"); | ||
| 6 | const Ir = backend.Ir; | ||
| 7 | const Object = backend.Object; | ||
| 8 | const Compilation = @import("Compilation.zig"); | ||
| 9 | const Diagnostics = @import("Diagnostics.zig"); | ||
| 10 | const LangOpts = @import("LangOpts.zig"); | ||
| 11 | const Preprocessor = @import("Preprocessor.zig"); | ||
| 12 | const Source = @import("Source.zig"); | ||
| 13 | const Toolchain = @import("Toolchain.zig"); | ||
| 14 | const target_util = @import("target.zig"); | ||
| 15 | |||
| 16 | pub const Linker = enum { | ||
| 17 | ld, | ||
| 18 | bfd, | ||
| 19 | gold, | ||
| 20 | lld, | ||
| 21 | mold, | ||
| 22 | }; | ||
| 23 | |||
| 24 | const Driver = @This(); | ||
| 25 | |||
| 26 | comp: *Compilation, | ||
| 27 | inputs: std.ArrayListUnmanaged(Source) = .{}, | ||
| 28 | link_objects: std.ArrayListUnmanaged([]const u8) = .{}, | ||
| 29 | output_name: ?[]const u8 = null, | ||
| 30 | sysroot: ?[]const u8 = null, | ||
| 31 | system_defines: Compilation.SystemDefinesMode = .include_system_defines, | ||
| 32 | temp_file_count: u32 = 0, | ||
| 33 | /// If false, do not emit line directives in -E mode | ||
| 34 | line_commands: bool = true, | ||
| 35 | /// If true, use `#line <num>` instead of `# <num>` for line directives | ||
| 36 | use_line_directives: bool = false, | ||
| 37 | only_preprocess: bool = false, | ||
| 38 | only_syntax: bool = false, | ||
| 39 | only_compile: bool = false, | ||
| 40 | only_preprocess_and_compile: bool = false, | ||
| 41 | verbose_ast: bool = false, | ||
| 42 | verbose_pp: bool = false, | ||
| 43 | verbose_ir: bool = false, | ||
| 44 | verbose_linker_args: bool = false, | ||
| 45 | color: ?bool = null, | ||
| 46 | |||
| 47 | /// Full path to the aro executable | ||
| 48 | aro_name: []const u8 = "", | ||
| 49 | |||
| 50 | /// Value of --triple= passed via CLI | ||
| 51 | raw_target_triple: ?[]const u8 = null, | ||
| 52 | |||
| 53 | // linker options | ||
| 54 | use_linker: ?[]const u8 = null, | ||
| 55 | linker_path: ?[]const u8 = null, | ||
| 56 | nodefaultlibs: bool = false, | ||
| 57 | nolibc: bool = false, | ||
| 58 | nostartfiles: bool = false, | ||
| 59 | nostdlib: bool = false, | ||
| 60 | pie: ?bool = null, | ||
| 61 | rdynamic: bool = false, | ||
| 62 | relocatable: bool = false, | ||
| 63 | rtlib: ?[]const u8 = null, | ||
| 64 | shared: bool = false, | ||
| 65 | shared_libgcc: bool = false, | ||
| 66 | static: bool = false, | ||
| 67 | static_libgcc: bool = false, | ||
| 68 | static_pie: bool = false, | ||
| 69 | strip: bool = false, | ||
| 70 | unwindlib: ?[]const u8 = null, | ||
| 71 | |||
| 72 | pub fn deinit(d: *Driver) void { | ||
| 73 | for (d.link_objects.items[d.link_objects.items.len - d.temp_file_count ..]) |obj| { | ||
| 74 | std.fs.deleteFileAbsolute(obj) catch {}; | ||
| 75 | d.comp.gpa.free(obj); | ||
| 76 | } | ||
| 77 | d.inputs.deinit(d.comp.gpa); | ||
| 78 | d.link_objects.deinit(d.comp.gpa); | ||
| 79 | d.* = undefined; | ||
| 80 | } | ||
| 81 | |||
| 82 | pub const usage = | ||
| 83 | \\Usage {s}: [options] file.. | ||
| 84 | \\ | ||
| 85 | \\General options: | ||
| 86 | \\ -h, --help Print this message. | ||
| 87 | \\ -v, --version Print aro version. | ||
| 88 | \\ | ||
| 89 | \\Compile options: | ||
| 90 | \\ -c, --compile Only run preprocess, compile, and assemble steps | ||
| 91 | \\ -D <macro>=<value> Define <macro> to <value> (defaults to 1) | ||
| 92 | \\ -E Only run the preprocessor | ||
| 93 | \\ -fchar8_t Enable char8_t (enabled by default in C23 and later) | ||
| 94 | \\ -fno-char8_t Disable char8_t (disabled by default for pre-C23) | ||
| 95 | \\ -fcolor-diagnostics Enable colors in diagnostics | ||
| 96 | \\ -fno-color-diagnostics Disable colors in diagnostics | ||
| 97 | \\ -fdeclspec Enable support for __declspec attributes | ||
| 98 | \\ -fno-declspec Disable support for __declspec attributes | ||
| 99 | \\ -ffp-eval-method=[source|double|extended] | ||
| 100 | \\ Evaluation method to use for floating-point arithmetic | ||
| 101 | \\ -fgnu-inline-asm Enable GNU style inline asm (default: enabled) | ||
| 102 | \\ -fno-gnu-inline-asm Disable GNU style inline asm | ||
| 103 | \\ -fms-extensions Enable support for Microsoft extensions | ||
| 104 | \\ -fno-ms-extensions Disable support for Microsoft extensions | ||
| 105 | \\ -fdollars-in-identifiers | ||
| 106 | \\ Allow '$' in identifiers | ||
| 107 | \\ -fno-dollars-in-identifiers | ||
| 108 | \\ Disallow '$' in identifiers | ||
| 109 | \\ -fmacro-backtrace-limit=<limit> | ||
| 110 | \\ Set limit on how many macro expansion traces are shown in errors (default 6) | ||
| 111 | \\ -fnative-half-type Use the native half type for __fp16 instead of promoting to float | ||
| 112 | \\ -fnative-half-arguments-and-returns | ||
| 113 | \\ Allow half-precision function arguments and return values | ||
| 114 | \\ -fshort-enums Use the narrowest possible integer type for enums | ||
| 115 | \\ -fno-short-enums Use "int" as the tag type for enums | ||
| 116 | \\ -fsigned-char "char" is signed | ||
| 117 | \\ -fno-signed-char "char" is unsigned | ||
| 118 | \\ -fsyntax-only Only run the preprocessor, parser, and semantic analysis stages | ||
| 119 | \\ -funsigned-char "char" is unsigned | ||
| 120 | \\ -fno-unsigned-char "char" is signed | ||
| 121 | \\ -fuse-line-directives Use `#line <num>` linemarkers in preprocessed output | ||
| 122 | \\ -fno-use-line-directives | ||
| 123 | \\ Use `# <num>` linemarkers in preprocessed output | ||
| 124 | \\ -I <dir> Add directory to include search path | ||
| 125 | \\ -isystem Add directory to SYSTEM include search path | ||
| 126 | \\ --emulate=[clang|gcc|msvc] | ||
| 127 | \\ Select which C compiler to emulate (default clang) | ||
| 128 | \\ -o <file> Write output to <file> | ||
| 129 | \\ -P, --no-line-commands Disable linemarker output in -E mode | ||
| 130 | \\ -pedantic Warn on language extensions | ||
| 131 | \\ --rtlib=<arg> Compiler runtime library to use (libgcc or compiler-rt) | ||
| 132 | \\ -std=<standard> Specify language standard | ||
| 133 | \\ -S, --assemble Only run preprocess and compilation steps | ||
| 134 | \\ --sysroot=<dir> Use dir as the logical root directory for headers and libraries (not fully implemented) | ||
| 135 | \\ --target=<value> Generate code for the given target | ||
| 136 | \\ -U <macro> Undefine <macro> | ||
| 137 | \\ -undef Do not predefine any system-specific macros. Standard predefined macros remain defined. | ||
| 138 | \\ -Werror Treat all warnings as errors | ||
| 139 | \\ -Werror=<warning> Treat warning as error | ||
| 140 | \\ -W<warning> Enable the specified warning | ||
| 141 | \\ -Wno-<warning> Disable the specified warning | ||
| 142 | \\ | ||
| 143 | \\Link options: | ||
| 144 | \\ -fuse-ld=[bfd|gold|lld|mold] | ||
| 145 | \\ Use specific linker | ||
| 146 | \\ -nodefaultlibs Do not use the standard system libraries when linking. | ||
| 147 | \\ -nolibc Do not use the C library or system libraries tightly coupled with it when linking. | ||
| 148 | \\ -nostdlib Do not use the standard system startup files or libraries when linking | ||
| 149 | \\ -nostartfiles Do not use the standard system startup files when linking. | ||
| 150 | \\ -pie Produce a dynamically linked position independent executable on targets that support it. | ||
| 151 | \\ --ld-path=<path> Use linker specified by <path> | ||
| 152 | \\ -r Produce a relocatable object as output. | ||
| 153 | \\ -rdynamic Pass the flag -export-dynamic to the ELF linker, on targets that support it. | ||
| 154 | \\ -s Remove all symbol table and relocation information from the executable. | ||
| 155 | \\ -shared Produce a shared object which can then be linked with other objects to form an executable. | ||
| 156 | \\ -shared-libgcc On systems that provide libgcc as a shared library, force the use of the shared version | ||
| 157 | \\ -static On systems that support dynamic linking, this overrides -pie and prevents linking with the shared libraries. | ||
| 158 | \\ -static-libgcc On systems that provide libgcc as a shared library, force the use of the static version | ||
| 159 | \\ -static-pie Produce a static position independent executable on targets that support it. | ||
| 160 | \\ --unwindlib=<arg> Unwind library to use ("none", "libgcc", or "libunwind") If not specified, will match runtime library | ||
| 161 | \\ | ||
| 162 | \\Debug options: | ||
| 163 | \\ --verbose-ast Dump produced AST to stdout | ||
| 164 | \\ --verbose-pp Dump preprocessor state | ||
| 165 | \\ --verbose-ir Dump ir to stdout | ||
| 166 | \\ --verbose-linker-args Dump linker args to stdout | ||
| 167 | \\ | ||
| 168 | \\ | ||
| 169 | ; | ||
| 170 | |||
| 171 | /// Process command line arguments, returns true if something was written to std_out. | ||
| 172 | pub fn parseArgs( | ||
| 173 | d: *Driver, | ||
| 174 | std_out: anytype, | ||
| 175 | macro_buf: anytype, | ||
| 176 | args: []const []const u8, | ||
| 177 | ) !bool { | ||
| 178 | var i: usize = 1; | ||
| 179 | var comment_arg: []const u8 = ""; | ||
| 180 | while (i < args.len) : (i += 1) { | ||
| 181 | const arg = args[i]; | ||
| 182 | if (mem.startsWith(u8, arg, "-") and arg.len > 1) { | ||
| 183 | if (mem.eql(u8, arg, "-h") or mem.eql(u8, arg, "--help")) { | ||
| 184 | std_out.print(usage, .{args[0]}) catch |er| { | ||
| 185 | return d.fatal("unable to print usage: {s}", .{errorDescription(er)}); | ||
| 186 | }; | ||
| 187 | return true; | ||
| 188 | } else if (mem.eql(u8, arg, "-v") or mem.eql(u8, arg, "--version")) { | ||
| 189 | std_out.writeAll(@import("backend").version_str ++ "\n") catch |er| { | ||
| 190 | return d.fatal("unable to print version: {s}", .{errorDescription(er)}); | ||
| 191 | }; | ||
| 192 | return true; | ||
| 193 | } else if (mem.startsWith(u8, arg, "-D")) { | ||
| 194 | var macro = arg["-D".len..]; | ||
| 195 | if (macro.len == 0) { | ||
| 196 | i += 1; | ||
| 197 | if (i >= args.len) { | ||
| 198 | try d.err("expected argument after -I"); | ||
| 199 | continue; | ||
| 200 | } | ||
| 201 | macro = args[i]; | ||
| 202 | } | ||
| 203 | var value: []const u8 = "1"; | ||
| 204 | if (mem.indexOfScalar(u8, macro, '=')) |some| { | ||
| 205 | value = macro[some + 1 ..]; | ||
| 206 | macro = macro[0..some]; | ||
| 207 | } | ||
| 208 | try macro_buf.print("#define {s} {s}\n", .{ macro, value }); | ||
| 209 | } else if (mem.startsWith(u8, arg, "-U")) { | ||
| 210 | var macro = arg["-U".len..]; | ||
| 211 | if (macro.len == 0) { | ||
| 212 | i += 1; | ||
| 213 | if (i >= args.len) { | ||
| 214 | try d.err("expected argument after -I"); | ||
| 215 | continue; | ||
| 216 | } | ||
| 217 | macro = args[i]; | ||
| 218 | } | ||
| 219 | try macro_buf.print("#undef {s}\n", .{macro}); | ||
| 220 | } else if (mem.eql(u8, arg, "-undef")) { | ||
| 221 | d.system_defines = .no_system_defines; | ||
| 222 | } else if (mem.eql(u8, arg, "-c") or mem.eql(u8, arg, "--compile")) { | ||
| 223 | d.only_compile = true; | ||
| 224 | } else if (mem.eql(u8, arg, "-E")) { | ||
| 225 | d.only_preprocess = true; | ||
| 226 | } else if (mem.eql(u8, arg, "-P") or mem.eql(u8, arg, "--no-line-commands")) { | ||
| 227 | d.line_commands = false; | ||
| 228 | } else if (mem.eql(u8, arg, "-fuse-line-directives")) { | ||
| 229 | d.use_line_directives = true; | ||
| 230 | } else if (mem.eql(u8, arg, "-fno-use-line-directives")) { | ||
| 231 | d.use_line_directives = false; | ||
| 232 | } else if (mem.eql(u8, arg, "-fchar8_t")) { | ||
| 233 | d.comp.langopts.has_char8_t_override = true; | ||
| 234 | } else if (mem.eql(u8, arg, "-fno-char8_t")) { | ||
| 235 | d.comp.langopts.has_char8_t_override = false; | ||
| 236 | } else if (mem.eql(u8, arg, "-fcolor-diagnostics")) { | ||
| 237 | d.color = true; | ||
| 238 | } else if (mem.eql(u8, arg, "-fno-color-diagnostics")) { | ||
| 239 | d.color = false; | ||
| 240 | } else if (mem.eql(u8, arg, "-fdollars-in-identifiers")) { | ||
| 241 | d.comp.langopts.dollars_in_identifiers = true; | ||
| 242 | } else if (mem.eql(u8, arg, "-fno-dollars-in-identifiers")) { | ||
| 243 | d.comp.langopts.dollars_in_identifiers = false; | ||
| 244 | } else if (mem.eql(u8, arg, "-fdigraphs")) { | ||
| 245 | d.comp.langopts.digraphs = true; | ||
| 246 | } else if (mem.eql(u8, arg, "-fgnu-inline-asm")) { | ||
| 247 | d.comp.langopts.gnu_asm = true; | ||
| 248 | } else if (mem.eql(u8, arg, "-fno-gnu-inline-asm")) { | ||
| 249 | d.comp.langopts.gnu_asm = false; | ||
| 250 | } else if (mem.eql(u8, arg, "-fno-digraphs")) { | ||
| 251 | d.comp.langopts.digraphs = false; | ||
| 252 | } else if (option(arg, "-fmacro-backtrace-limit=")) |limit_str| { | ||
| 253 | var limit = std.fmt.parseInt(u32, limit_str, 10) catch { | ||
| 254 | try d.err("-fmacro-backtrace-limit takes a number argument"); | ||
| 255 | continue; | ||
| 256 | }; | ||
| 257 | |||
| 258 | if (limit == 0) limit = std.math.maxInt(u32); | ||
| 259 | d.comp.diagnostics.macro_backtrace_limit = limit; | ||
| 260 | } else if (mem.eql(u8, arg, "-fnative-half-type")) { | ||
| 261 | d.comp.langopts.use_native_half_type = true; | ||
| 262 | } else if (mem.eql(u8, arg, "-fnative-half-arguments-and-returns")) { | ||
| 263 | d.comp.langopts.allow_half_args_and_returns = true; | ||
| 264 | } else if (mem.eql(u8, arg, "-fshort-enums")) { | ||
| 265 | d.comp.langopts.short_enums = true; | ||
| 266 | } else if (mem.eql(u8, arg, "-fno-short-enums")) { | ||
| 267 | d.comp.langopts.short_enums = false; | ||
| 268 | } else if (mem.eql(u8, arg, "-fsigned-char")) { | ||
| 269 | d.comp.langopts.setCharSignedness(.signed); | ||
| 270 | } else if (mem.eql(u8, arg, "-fno-signed-char")) { | ||
| 271 | d.comp.langopts.setCharSignedness(.unsigned); | ||
| 272 | } else if (mem.eql(u8, arg, "-funsigned-char")) { | ||
| 273 | d.comp.langopts.setCharSignedness(.unsigned); | ||
| 274 | } else if (mem.eql(u8, arg, "-fno-unsigned-char")) { | ||
| 275 | d.comp.langopts.setCharSignedness(.signed); | ||
| 276 | } else if (mem.eql(u8, arg, "-fdeclspec")) { | ||
| 277 | d.comp.langopts.declspec_attrs = true; | ||
| 278 | } else if (mem.eql(u8, arg, "-fno-declspec")) { | ||
| 279 | d.comp.langopts.declspec_attrs = false; | ||
| 280 | } else if (mem.eql(u8, arg, "-fms-extensions")) { | ||
| 281 | d.comp.langopts.enableMSExtensions(); | ||
| 282 | } else if (mem.eql(u8, arg, "-fno-ms-extensions")) { | ||
| 283 | d.comp.langopts.disableMSExtensions(); | ||
| 284 | } else if (mem.startsWith(u8, arg, "-I")) { | ||
| 285 | var path = arg["-I".len..]; | ||
| 286 | if (path.len == 0) { | ||
| 287 | i += 1; | ||
| 288 | if (i >= args.len) { | ||
| 289 | try d.err("expected argument after -I"); | ||
| 290 | continue; | ||
| 291 | } | ||
| 292 | path = args[i]; | ||
| 293 | } | ||
| 294 | try d.comp.include_dirs.append(d.comp.gpa, path); | ||
| 295 | } else if (mem.startsWith(u8, arg, "-fsyntax-only")) { | ||
| 296 | d.only_syntax = true; | ||
| 297 | } else if (mem.startsWith(u8, arg, "-fno-syntax-only")) { | ||
| 298 | d.only_syntax = false; | ||
| 299 | } else if (mem.startsWith(u8, arg, "-isystem")) { | ||
| 300 | var path = arg["-isystem".len..]; | ||
| 301 | if (path.len == 0) { | ||
| 302 | i += 1; | ||
| 303 | if (i >= args.len) { | ||
| 304 | try d.err("expected argument after -isystem"); | ||
| 305 | continue; | ||
| 306 | } | ||
| 307 | path = args[i]; | ||
| 308 | } | ||
| 309 | const duped = try d.comp.gpa.dupe(u8, path); | ||
| 310 | errdefer d.comp.gpa.free(duped); | ||
| 311 | try d.comp.system_include_dirs.append(d.comp.gpa, duped); | ||
| 312 | } else if (option(arg, "--emulate=")) |compiler_str| { | ||
| 313 | const compiler = std.meta.stringToEnum(LangOpts.Compiler, compiler_str) orelse { | ||
| 314 | try d.comp.addDiagnostic(.{ .tag = .cli_invalid_emulate, .extra = .{ .str = arg } }, &.{}); | ||
| 315 | continue; | ||
| 316 | }; | ||
| 317 | d.comp.langopts.setEmulatedCompiler(compiler); | ||
| 318 | } else if (option(arg, "-ffp-eval-method=")) |fp_method_str| { | ||
| 319 | const fp_eval_method = std.meta.stringToEnum(LangOpts.FPEvalMethod, fp_method_str) orelse .indeterminate; | ||
| 320 | if (fp_eval_method == .indeterminate) { | ||
| 321 | try d.comp.addDiagnostic(.{ .tag = .cli_invalid_fp_eval_method, .extra = .{ .str = fp_method_str } }, &.{}); | ||
| 322 | continue; | ||
| 323 | } | ||
| 324 | d.comp.langopts.setFpEvalMethod(fp_eval_method); | ||
| 325 | } else if (mem.startsWith(u8, arg, "-o")) { | ||
| 326 | var file = arg["-o".len..]; | ||
| 327 | if (file.len == 0) { | ||
| 328 | i += 1; | ||
| 329 | if (i >= args.len) { | ||
| 330 | try d.err("expected argument after -o"); | ||
| 331 | continue; | ||
| 332 | } | ||
| 333 | file = args[i]; | ||
| 334 | } | ||
| 335 | d.output_name = file; | ||
| 336 | } else if (option(arg, "--sysroot=")) |sysroot| { | ||
| 337 | d.sysroot = sysroot; | ||
| 338 | } else if (mem.eql(u8, arg, "-pedantic")) { | ||
| 339 | d.comp.diagnostics.options.pedantic = .warning; | ||
| 340 | } else if (option(arg, "--rtlib=")) |rtlib| { | ||
| 341 | if (mem.eql(u8, rtlib, "compiler-rt") or mem.eql(u8, rtlib, "libgcc") or mem.eql(u8, rtlib, "platform")) { | ||
| 342 | d.rtlib = rtlib; | ||
| 343 | } else { | ||
| 344 | try d.comp.addDiagnostic(.{ .tag = .invalid_rtlib, .extra = .{ .str = rtlib } }, &.{}); | ||
| 345 | } | ||
| 346 | } else if (option(arg, "-Werror=")) |err_name| { | ||
| 347 | try d.comp.diagnostics.set(err_name, .@"error"); | ||
| 348 | } else if (mem.eql(u8, arg, "-Wno-fatal-errors")) { | ||
| 349 | d.comp.diagnostics.fatal_errors = false; | ||
| 350 | } else if (option(arg, "-Wno-")) |err_name| { | ||
| 351 | try d.comp.diagnostics.set(err_name, .off); | ||
| 352 | } else if (mem.eql(u8, arg, "-Wfatal-errors")) { | ||
| 353 | d.comp.diagnostics.fatal_errors = true; | ||
| 354 | } else if (option(arg, "-W")) |err_name| { | ||
| 355 | try d.comp.diagnostics.set(err_name, .warning); | ||
| 356 | } else if (option(arg, "-std=")) |standard| { | ||
| 357 | d.comp.langopts.setStandard(standard) catch | ||
| 358 | try d.comp.addDiagnostic(.{ .tag = .cli_invalid_standard, .extra = .{ .str = arg } }, &.{}); | ||
| 359 | } else if (mem.eql(u8, arg, "-S") or mem.eql(u8, arg, "--assemble")) { | ||
| 360 | d.only_preprocess_and_compile = true; | ||
| 361 | } else if (option(arg, "--target=")) |triple| { | ||
| 362 | const cross = std.zig.CrossTarget.parse(.{ .arch_os_abi = triple }) catch { | ||
| 363 | try d.comp.addDiagnostic(.{ .tag = .cli_invalid_target, .extra = .{ .str = arg } }, &.{}); | ||
| 364 | continue; | ||
| 365 | }; | ||
| 366 | d.comp.target = cross.toTarget(); // TODO deprecated | ||
| 367 | d.comp.langopts.setEmulatedCompiler(target_util.systemCompiler(d.comp.target)); | ||
| 368 | d.raw_target_triple = triple; | ||
| 369 | } else if (mem.eql(u8, arg, "--verbose-ast")) { | ||
| 370 | d.verbose_ast = true; | ||
| 371 | } else if (mem.eql(u8, arg, "--verbose-pp")) { | ||
| 372 | d.verbose_pp = true; | ||
| 373 | } else if (mem.eql(u8, arg, "--verbose-ir")) { | ||
| 374 | d.verbose_ir = true; | ||
| 375 | } else if (mem.eql(u8, arg, "--verbose-linker-args")) { | ||
| 376 | d.verbose_linker_args = true; | ||
| 377 | } else if (mem.eql(u8, arg, "-C") or mem.eql(u8, arg, "--comments")) { | ||
| 378 | d.comp.langopts.preserve_comments = true; | ||
| 379 | comment_arg = arg; | ||
| 380 | } else if (mem.eql(u8, arg, "-CC") or mem.eql(u8, arg, "--comments-in-macros")) { | ||
| 381 | d.comp.langopts.preserve_comments = true; | ||
| 382 | d.comp.langopts.preserve_comments_in_macros = true; | ||
| 383 | comment_arg = arg; | ||
| 384 | } else if (option(arg, "-fuse-ld=")) |linker_name| { | ||
| 385 | d.use_linker = linker_name; | ||
| 386 | } else if (mem.eql(u8, arg, "-fuse-ld=")) { | ||
| 387 | d.use_linker = null; | ||
| 388 | } else if (option(arg, "--ld-path=")) |linker_path| { | ||
| 389 | d.linker_path = linker_path; | ||
| 390 | } else if (mem.eql(u8, arg, "-r")) { | ||
| 391 | d.relocatable = true; | ||
| 392 | } else if (mem.eql(u8, arg, "-shared")) { | ||
| 393 | d.shared = true; | ||
| 394 | } else if (mem.eql(u8, arg, "-shared-libgcc")) { | ||
| 395 | d.shared_libgcc = true; | ||
| 396 | } else if (mem.eql(u8, arg, "-static")) { | ||
| 397 | d.static = true; | ||
| 398 | } else if (mem.eql(u8, arg, "-static-libgcc")) { | ||
| 399 | d.static_libgcc = true; | ||
| 400 | } else if (mem.eql(u8, arg, "-static-pie")) { | ||
| 401 | d.static_pie = true; | ||
| 402 | } else if (mem.eql(u8, arg, "-pie")) { | ||
| 403 | d.pie = true; | ||
| 404 | } else if (mem.eql(u8, arg, "-no-pie") or mem.eql(u8, arg, "-nopie")) { | ||
| 405 | d.pie = false; | ||
| 406 | } else if (mem.eql(u8, arg, "-rdynamic")) { | ||
| 407 | d.rdynamic = true; | ||
| 408 | } else if (mem.eql(u8, arg, "-s")) { | ||
| 409 | d.strip = true; | ||
| 410 | } else if (mem.eql(u8, arg, "-nodefaultlibs")) { | ||
| 411 | d.nodefaultlibs = true; | ||
| 412 | } else if (mem.eql(u8, arg, "-nolibc")) { | ||
| 413 | d.nolibc = true; | ||
| 414 | } else if (mem.eql(u8, arg, "-nostdlib")) { | ||
| 415 | d.nostdlib = true; | ||
| 416 | } else if (mem.eql(u8, arg, "-nostartfiles")) { | ||
| 417 | d.nostartfiles = true; | ||
| 418 | } else if (option(arg, "--unwindlib=")) |unwindlib| { | ||
| 419 | const valid_unwindlibs: [5][]const u8 = .{ "", "none", "platform", "libunwind", "libgcc" }; | ||
| 420 | for (valid_unwindlibs) |name| { | ||
| 421 | if (mem.eql(u8, name, unwindlib)) { | ||
| 422 | d.unwindlib = unwindlib; | ||
| 423 | break; | ||
| 424 | } | ||
| 425 | } else { | ||
| 426 | try d.comp.addDiagnostic(.{ .tag = .invalid_unwindlib, .extra = .{ .str = unwindlib } }, &.{}); | ||
| 427 | } | ||
| 428 | } else { | ||
| 429 | try d.comp.addDiagnostic(.{ .tag = .cli_unknown_arg, .extra = .{ .str = arg } }, &.{}); | ||
| 430 | } | ||
| 431 | } else if (std.mem.endsWith(u8, arg, ".o") or std.mem.endsWith(u8, arg, ".obj")) { | ||
| 432 | try d.link_objects.append(d.comp.gpa, arg); | ||
| 433 | } else { | ||
| 434 | const source = d.addSource(arg) catch |er| { | ||
| 435 | return d.fatal("unable to add source file '{s}': {s}", .{ arg, errorDescription(er) }); | ||
| 436 | }; | ||
| 437 | try d.inputs.append(d.comp.gpa, source); | ||
| 438 | } | ||
| 439 | } | ||
| 440 | if (d.comp.langopts.preserve_comments and !d.only_preprocess) { | ||
| 441 | return d.fatal("invalid argument '{s}' only allowed with '-E'", .{comment_arg}); | ||
| 442 | } | ||
| 443 | return false; | ||
| 444 | } | ||
| 445 | |||
| 446 | fn option(arg: []const u8, name: []const u8) ?[]const u8 { | ||
| 447 | if (std.mem.startsWith(u8, arg, name) and arg.len > name.len) { | ||
| 448 | return arg[name.len..]; | ||
| 449 | } | ||
| 450 | return null; | ||
| 451 | } | ||
| 452 | |||
| 453 | fn addSource(d: *Driver, path: []const u8) !Source { | ||
| 454 | if (mem.eql(u8, "-", path)) { | ||
| 455 | const stdin = std.io.getStdIn().reader(); | ||
| 456 | const input = try stdin.readAllAlloc(d.comp.gpa, std.math.maxInt(u32)); | ||
| 457 | defer d.comp.gpa.free(input); | ||
| 458 | return d.comp.addSourceFromBuffer("<stdin>", input); | ||
| 459 | } | ||
| 460 | return d.comp.addSourceFromPath(path); | ||
| 461 | } | ||
| 462 | |||
| 463 | pub fn err(d: *Driver, msg: []const u8) !void { | ||
| 464 | try d.comp.addDiagnostic(.{ .tag = .cli_error, .extra = .{ .str = msg } }, &.{}); | ||
| 465 | } | ||
| 466 | |||
| 467 | pub fn fatal(d: *Driver, comptime fmt: []const u8, args: anytype) error{ FatalError, OutOfMemory } { | ||
| 468 | try d.comp.diagnostics.list.append(d.comp.gpa, .{ | ||
| 469 | .tag = .cli_error, | ||
| 470 | .kind = .@"fatal error", | ||
| 471 | .extra = .{ .str = try std.fmt.allocPrint(d.comp.diagnostics.arena.allocator(), fmt, args) }, | ||
| 472 | }); | ||
| 473 | return error.FatalError; | ||
| 474 | } | ||
| 475 | |||
| 476 | pub fn renderErrors(d: *Driver) void { | ||
| 477 | Diagnostics.render(d.comp, d.detectConfig(std.io.getStdErr())); | ||
| 478 | } | ||
| 479 | |||
| 480 | pub fn detectConfig(d: *Driver, file: std.fs.File) std.io.tty.Config { | ||
| 481 | if (d.color == true) return .escape_codes; | ||
| 482 | if (d.color == false) return .no_color; | ||
| 483 | |||
| 484 | if (file.supportsAnsiEscapeCodes()) return .escape_codes; | ||
| 485 | if (@import("builtin").os.tag == .windows and file.isTty()) { | ||
| 486 | var info: std.os.windows.CONSOLE_SCREEN_BUFFER_INFO = undefined; | ||
| 487 | if (std.os.windows.kernel32.GetConsoleScreenBufferInfo(file.handle, &info) != std.os.windows.TRUE) { | ||
| 488 | return .no_color; | ||
| 489 | } | ||
| 490 | return .{ .windows_api = .{ | ||
| 491 | .handle = file.handle, | ||
| 492 | .reset_attributes = info.wAttributes, | ||
| 493 | } }; | ||
| 494 | } | ||
| 495 | |||
| 496 | return .no_color; | ||
| 497 | } | ||
| 498 | |||
| 499 | pub fn errorDescription(e: anyerror) []const u8 { | ||
| 500 | return switch (e) { | ||
| 501 | error.OutOfMemory => "ran out of memory", | ||
| 502 | error.FileNotFound => "file not found", | ||
| 503 | error.IsDir => "is a directory", | ||
| 504 | error.NotDir => "is not a directory", | ||
| 505 | error.NotOpenForReading => "file is not open for reading", | ||
| 506 | error.NotOpenForWriting => "file is not open for writing", | ||
| 507 | error.InvalidUtf8 => "input is not valid UTF-8", | ||
| 508 | error.FileBusy => "file is busy", | ||
| 509 | error.NameTooLong => "file name is too long", | ||
| 510 | error.AccessDenied => "access denied", | ||
| 511 | error.FileTooBig => "file is too big", | ||
| 512 | error.ProcessFdQuotaExceeded, error.SystemFdQuotaExceeded => "ran out of file descriptors", | ||
| 513 | error.SystemResources => "ran out of system resources", | ||
| 514 | error.FatalError => "a fatal error occurred", | ||
| 515 | error.Unexpected => "an unexpected error occurred", | ||
| 516 | else => @errorName(e), | ||
| 517 | }; | ||
| 518 | } | ||
| 519 | |||
| 520 | /// The entry point of the Aro compiler. | ||
| 521 | /// **MAY call `exit` if `fast_exit` is set.** | ||
| 522 | pub fn main(d: *Driver, tc: *Toolchain, args: []const []const u8, comptime fast_exit: bool) !void { | ||
| 523 | var macro_buf = std.ArrayList(u8).init(d.comp.gpa); | ||
| 524 | defer macro_buf.deinit(); | ||
| 525 | |||
| 526 | const std_out = std.io.getStdOut().writer(); | ||
| 527 | if (try parseArgs(d, std_out, macro_buf.writer(), args)) return; | ||
| 528 | |||
| 529 | const linking = !(d.only_preprocess or d.only_syntax or d.only_compile or d.only_preprocess_and_compile); | ||
| 530 | |||
| 531 | if (d.inputs.items.len == 0) { | ||
| 532 | return d.fatal("no input files", .{}); | ||
| 533 | } else if (d.inputs.items.len != 1 and d.output_name != null and !linking) { | ||
| 534 | return d.fatal("cannot specify -o when generating multiple output files", .{}); | ||
| 535 | } | ||
| 536 | |||
| 537 | if (!linking) for (d.link_objects.items) |obj| { | ||
| 538 | try d.comp.addDiagnostic(.{ .tag = .cli_unused_link_object, .extra = .{ .str = obj } }, &.{}); | ||
| 539 | }; | ||
| 540 | |||
| 541 | d.comp.defineSystemIncludes(d.aro_name) catch |er| switch (er) { | ||
| 542 | error.OutOfMemory => return error.OutOfMemory, | ||
| 543 | error.AroIncludeNotFound => return d.fatal("unable to find Aro builtin headers", .{}), | ||
| 544 | }; | ||
| 545 | |||
| 546 | const builtin = try d.comp.generateBuiltinMacros(d.system_defines); | ||
| 547 | const user_macros = try d.comp.addSourceFromBuffer("<command line>", macro_buf.items); | ||
| 548 | |||
| 549 | if (fast_exit and d.inputs.items.len == 1) { | ||
| 550 | d.processSource(tc, d.inputs.items[0], builtin, user_macros, fast_exit) catch |e| switch (e) { | ||
| 551 | error.FatalError => { | ||
| 552 | d.renderErrors(); | ||
| 553 | d.exitWithCleanup(1); | ||
| 554 | }, | ||
| 555 | else => |er| return er, | ||
| 556 | }; | ||
| 557 | unreachable; | ||
| 558 | } | ||
| 559 | |||
| 560 | for (d.inputs.items) |source| { | ||
| 561 | d.processSource(tc, source, builtin, user_macros, fast_exit) catch |e| switch (e) { | ||
| 562 | error.FatalError => { | ||
| 563 | d.renderErrors(); | ||
| 564 | }, | ||
| 565 | else => |er| return er, | ||
| 566 | }; | ||
| 567 | } | ||
| 568 | if (d.comp.diagnostics.errors != 0) { | ||
| 569 | if (fast_exit) d.exitWithCleanup(1); | ||
| 570 | return; | ||
| 571 | } | ||
| 572 | if (linking) { | ||
| 573 | try d.invokeLinker(tc, fast_exit); | ||
| 574 | } | ||
| 575 | if (fast_exit) std.process.exit(0); | ||
| 576 | } | ||
| 577 | |||
| 578 | fn processSource( | ||
| 579 | d: *Driver, | ||
| 580 | tc: *Toolchain, | ||
| 581 | source: Source, | ||
| 582 | builtin: Source, | ||
| 583 | user_macros: Source, | ||
| 584 | comptime fast_exit: bool, | ||
| 585 | ) !void { | ||
| 586 | d.comp.generated_buf.items.len = 0; | ||
| 587 | var pp = try Preprocessor.initDefault(d.comp); | ||
| 588 | defer pp.deinit(); | ||
| 589 | |||
| 590 | if (d.comp.langopts.ms_extensions) { | ||
| 591 | d.comp.ms_cwd_source_id = source.id; | ||
| 592 | } | ||
| 593 | |||
| 594 | if (d.verbose_pp) pp.verbose = true; | ||
| 595 | if (d.only_preprocess) { | ||
| 596 | pp.preserve_whitespace = true; | ||
| 597 | if (d.line_commands) { | ||
| 598 | pp.linemarkers = if (d.use_line_directives) .line_directives else .numeric_directives; | ||
| 599 | } | ||
| 600 | } | ||
| 601 | |||
| 602 | try pp.preprocessSources(&.{ source, builtin, user_macros }); | ||
| 603 | |||
| 604 | if (d.only_preprocess) { | ||
| 605 | d.renderErrors(); | ||
| 606 | |||
| 607 | if (d.comp.diagnostics.errors != 0) { | ||
| 608 | if (fast_exit) std.process.exit(1); // Not linking, no need for cleanup. | ||
| 609 | return; | ||
| 610 | } | ||
| 611 | |||
| 612 | const file = if (d.output_name) |some| | ||
| 613 | std.fs.cwd().createFile(some, .{}) catch |er| | ||
| 614 | return d.fatal("unable to create output file '{s}': {s}", .{ some, errorDescription(er) }) | ||
| 615 | else | ||
| 616 | std.io.getStdOut(); | ||
| 617 | defer if (d.output_name != null) file.close(); | ||
| 618 | |||
| 619 | var buf_w = std.io.bufferedWriter(file.writer()); | ||
| 620 | pp.prettyPrintTokens(buf_w.writer()) catch |er| | ||
| 621 | return d.fatal("unable to write result: {s}", .{errorDescription(er)}); | ||
| 622 | |||
| 623 | buf_w.flush() catch |er| | ||
| 624 | return d.fatal("unable to write result: {s}", .{errorDescription(er)}); | ||
| 625 | if (fast_exit) std.process.exit(0); // Not linking, no need for cleanup. | ||
| 626 | return; | ||
| 627 | } | ||
| 628 | |||
| 629 | var tree = try pp.parse(); | ||
| 630 | defer tree.deinit(); | ||
| 631 | |||
| 632 | if (d.verbose_ast) { | ||
| 633 | const stdout = std.io.getStdOut(); | ||
| 634 | var buf_writer = std.io.bufferedWriter(stdout.writer()); | ||
| 635 | tree.dump(d.detectConfig(stdout), buf_writer.writer()) catch {}; | ||
| 636 | buf_writer.flush() catch {}; | ||
| 637 | } | ||
| 638 | |||
| 639 | const prev_errors = d.comp.diagnostics.errors; | ||
| 640 | d.renderErrors(); | ||
| 641 | |||
| 642 | if (d.comp.diagnostics.errors != prev_errors) { | ||
| 643 | if (fast_exit) d.exitWithCleanup(1); | ||
| 644 | return; // do not compile if there were errors | ||
| 645 | } | ||
| 646 | |||
| 647 | if (d.only_syntax) { | ||
| 648 | if (fast_exit) std.process.exit(0); // Not linking, no need for cleanup. | ||
| 649 | return; | ||
| 650 | } | ||
| 651 | |||
| 652 | if (d.comp.target.ofmt != .elf or d.comp.target.cpu.arch != .x86_64) { | ||
| 653 | return d.fatal( | ||
| 654 | "unsupported target {s}-{s}-{s}, currently only x86-64 elf is supported", | ||
| 655 | .{ @tagName(d.comp.target.cpu.arch), @tagName(d.comp.target.os.tag), @tagName(d.comp.target.abi) }, | ||
| 656 | ); | ||
| 657 | } | ||
| 658 | |||
| 659 | var ir = try tree.genIr(); | ||
| 660 | defer ir.deinit(d.comp.gpa); | ||
| 661 | |||
| 662 | if (d.verbose_ir) { | ||
| 663 | const stdout = std.io.getStdOut(); | ||
| 664 | var buf_writer = std.io.bufferedWriter(stdout.writer()); | ||
| 665 | ir.dump(d.comp.gpa, d.detectConfig(stdout), buf_writer.writer()) catch {}; | ||
| 666 | buf_writer.flush() catch {}; | ||
| 667 | } | ||
| 668 | |||
| 669 | var render_errors: Ir.Renderer.ErrorList = .{}; | ||
| 670 | defer { | ||
| 671 | for (render_errors.values()) |msg| d.comp.gpa.free(msg); | ||
| 672 | render_errors.deinit(d.comp.gpa); | ||
| 673 | } | ||
| 674 | |||
| 675 | var obj = ir.render(d.comp.gpa, d.comp.target, &render_errors) catch |e| switch (e) { | ||
| 676 | error.OutOfMemory => return error.OutOfMemory, | ||
| 677 | error.LowerFail => { | ||
| 678 | return d.fatal( | ||
| 679 | "unable to render Ir to machine code: {s}", | ||
| 680 | .{render_errors.values()[0]}, | ||
| 681 | ); | ||
| 682 | }, | ||
| 683 | }; | ||
| 684 | defer obj.deinit(); | ||
| 685 | |||
| 686 | // If it's used, name_buf will either hold a filename or `/tmp/<12 random bytes with base-64 encoding>.<extension>` | ||
| 687 | // both of which should fit into MAX_NAME_BYTES for all systems | ||
| 688 | var name_buf: [std.fs.MAX_NAME_BYTES]u8 = undefined; | ||
| 689 | |||
| 690 | const out_file_name = if (d.only_compile) blk: { | ||
| 691 | const fmt_template = "{s}{s}"; | ||
| 692 | const fmt_args = .{ | ||
| 693 | std.fs.path.stem(source.path), | ||
| 694 | d.comp.target.ofmt.fileExt(d.comp.target.cpu.arch), | ||
| 695 | }; | ||
| 696 | break :blk d.output_name orelse | ||
| 697 | std.fmt.bufPrint(&name_buf, fmt_template, fmt_args) catch return d.fatal("Filename too long for filesystem: " ++ fmt_template, fmt_args); | ||
| 698 | } else blk: { | ||
| 699 | const random_bytes_count = 12; | ||
| 700 | const sub_path_len = comptime std.fs.base64_encoder.calcSize(random_bytes_count); | ||
| 701 | |||
| 702 | var random_bytes: [random_bytes_count]u8 = undefined; | ||
| 703 | std.crypto.random.bytes(&random_bytes); | ||
| 704 | var random_name: [sub_path_len]u8 = undefined; | ||
| 705 | _ = std.fs.base64_encoder.encode(&random_name, &random_bytes); | ||
| 706 | |||
| 707 | const fmt_template = "/tmp/{s}{s}"; | ||
| 708 | const fmt_args = .{ | ||
| 709 | random_name, | ||
| 710 | d.comp.target.ofmt.fileExt(d.comp.target.cpu.arch), | ||
| 711 | }; | ||
| 712 | break :blk std.fmt.bufPrint(&name_buf, fmt_template, fmt_args) catch return d.fatal("Filename too long for filesystem: " ++ fmt_template, fmt_args); | ||
| 713 | }; | ||
| 714 | |||
| 715 | const out_file = std.fs.cwd().createFile(out_file_name, .{}) catch |er| | ||
| 716 | return d.fatal("unable to create output file '{s}': {s}", .{ out_file_name, errorDescription(er) }); | ||
| 717 | defer out_file.close(); | ||
| 718 | |||
| 719 | obj.finish(out_file) catch |er| | ||
| 720 | return d.fatal("could not output to object file '{s}': {s}", .{ out_file_name, errorDescription(er) }); | ||
| 721 | |||
| 722 | if (d.only_compile) { | ||
| 723 | if (fast_exit) std.process.exit(0); // Not linking, no need for cleanup. | ||
| 724 | return; | ||
| 725 | } | ||
| 726 | try d.link_objects.ensureUnusedCapacity(d.comp.gpa, 1); | ||
| 727 | d.link_objects.appendAssumeCapacity(try d.comp.gpa.dupe(u8, out_file_name)); | ||
| 728 | d.temp_file_count += 1; | ||
| 729 | if (fast_exit) { | ||
| 730 | try d.invokeLinker(tc, fast_exit); | ||
| 731 | } | ||
| 732 | } | ||
| 733 | |||
| 734 | fn dumpLinkerArgs(items: []const []const u8) !void { | ||
| 735 | const stdout = std.io.getStdOut().writer(); | ||
| 736 | for (items, 0..) |item, i| { | ||
| 737 | if (i > 0) try stdout.writeByte(' '); | ||
| 738 | try stdout.print("\"{}\"", .{std.zig.fmtEscapes(item)}); | ||
| 739 | } | ||
| 740 | try stdout.writeByte('\n'); | ||
| 741 | } | ||
| 742 | |||
| 743 | /// The entry point of the Aro compiler. | ||
| 744 | /// **MAY call `exit` if `fast_exit` is set.** | ||
| 745 | pub fn invokeLinker(d: *Driver, tc: *Toolchain, comptime fast_exit: bool) !void { | ||
| 746 | try tc.discover(); | ||
| 747 | |||
| 748 | var argv = std.ArrayList([]const u8).init(d.comp.gpa); | ||
| 749 | defer argv.deinit(); | ||
| 750 | |||
| 751 | var linker_path_buf: [std.fs.MAX_PATH_BYTES]u8 = undefined; | ||
| 752 | const linker_path = try tc.getLinkerPath(&linker_path_buf); | ||
| 753 | try argv.append(linker_path); | ||
| 754 | |||
| 755 | try tc.buildLinkerArgs(&argv); | ||
| 756 | |||
| 757 | if (d.verbose_linker_args) { | ||
| 758 | dumpLinkerArgs(argv.items) catch |er| { | ||
| 759 | return d.fatal("unable to dump linker args: {s}", .{errorDescription(er)}); | ||
| 760 | }; | ||
| 761 | } | ||
| 762 | var child = std.ChildProcess.init(argv.items, d.comp.gpa); | ||
| 763 | // TODO handle better | ||
| 764 | child.stdin_behavior = .Inherit; | ||
| 765 | child.stdout_behavior = .Inherit; | ||
| 766 | child.stderr_behavior = .Inherit; | ||
| 767 | |||
| 768 | const term = child.spawnAndWait() catch |er| { | ||
| 769 | return d.fatal("unable to spawn linker: {s}", .{errorDescription(er)}); | ||
| 770 | }; | ||
| 771 | switch (term) { | ||
| 772 | .Exited => |code| if (code != 0) { | ||
| 773 | const e = d.fatal("linker exited with an error code", .{}); | ||
| 774 | if (fast_exit) d.exitWithCleanup(code); | ||
| 775 | return e; | ||
| 776 | }, | ||
| 777 | else => { | ||
| 778 | const e = d.fatal("linker crashed", .{}); | ||
| 779 | if (fast_exit) d.exitWithCleanup(1); | ||
| 780 | return e; | ||
| 781 | }, | ||
| 782 | } | ||
| 783 | if (fast_exit) d.exitWithCleanup(0); | ||
| 784 | } | ||
| 785 | |||
| 786 | fn exitWithCleanup(d: *Driver, code: u8) noreturn { | ||
| 787 | for (d.link_objects.items[d.link_objects.items.len - d.temp_file_count ..]) |obj| { | ||
| 788 | std.fs.deleteFileAbsolute(obj) catch {}; | ||
| 789 | } | ||
| 790 | std.process.exit(code); | ||
| 791 | } | ||
deps/aro/aro/Driver/Distro.zig created+328| ... | @@ -0,0 +1,328 @@ | ||
| 1 | //! Tools for figuring out what Linux distro we're running on | ||
| 2 | |||
| 3 | const std = @import("std"); | ||
| 4 | const mem = std.mem; | ||
| 5 | const Filesystem = @import("Filesystem.zig").Filesystem; | ||
| 6 | |||
| 7 | const MAX_BYTES = 1024; // TODO: Can we assume 1024 bytes enough for the info we need? | ||
| 8 | |||
| 9 | /// Value for linker `--hash-style=` argument | ||
| 10 | pub const HashStyle = enum { | ||
| 11 | both, | ||
| 12 | gnu, | ||
| 13 | }; | ||
| 14 | |||
| 15 | pub const Tag = enum { | ||
| 16 | alpine, | ||
| 17 | arch, | ||
| 18 | debian_lenny, | ||
| 19 | debian_squeeze, | ||
| 20 | debian_wheezy, | ||
| 21 | debian_jessie, | ||
| 22 | debian_stretch, | ||
| 23 | debian_buster, | ||
| 24 | debian_bullseye, | ||
| 25 | debian_bookworm, | ||
| 26 | debian_trixie, | ||
| 27 | exherbo, | ||
| 28 | rhel5, | ||
| 29 | rhel6, | ||
| 30 | rhel7, | ||
| 31 | fedora, | ||
| 32 | gentoo, | ||
| 33 | open_suse, | ||
| 34 | ubuntu_hardy, | ||
| 35 | ubuntu_intrepid, | ||
| 36 | ubuntu_jaunty, | ||
| 37 | ubuntu_karmic, | ||
| 38 | ubuntu_lucid, | ||
| 39 | ubuntu_maverick, | ||
| 40 | ubuntu_natty, | ||
| 41 | ubuntu_oneiric, | ||
| 42 | ubuntu_precise, | ||
| 43 | ubuntu_quantal, | ||
| 44 | ubuntu_raring, | ||
| 45 | ubuntu_saucy, | ||
| 46 | ubuntu_trusty, | ||
| 47 | ubuntu_utopic, | ||
| 48 | ubuntu_vivid, | ||
| 49 | ubuntu_wily, | ||
| 50 | ubuntu_xenial, | ||
| 51 | ubuntu_yakkety, | ||
| 52 | ubuntu_zesty, | ||
| 53 | ubuntu_artful, | ||
| 54 | ubuntu_bionic, | ||
| 55 | ubuntu_cosmic, | ||
| 56 | ubuntu_disco, | ||
| 57 | ubuntu_eoan, | ||
| 58 | ubuntu_focal, | ||
| 59 | ubuntu_groovy, | ||
| 60 | ubuntu_hirsute, | ||
| 61 | ubuntu_impish, | ||
| 62 | ubuntu_jammy, | ||
| 63 | ubuntu_kinetic, | ||
| 64 | ubuntu_lunar, | ||
| 65 | unknown, | ||
| 66 | |||
| 67 | pub fn getHashStyle(self: Tag) HashStyle { | ||
| 68 | if (self.isOpenSUSE()) return .both; | ||
| 69 | return switch (self) { | ||
| 70 | .ubuntu_lucid, | ||
| 71 | .ubuntu_jaunty, | ||
| 72 | .ubuntu_karmic, | ||
| 73 | => .both, | ||
| 74 | else => .gnu, | ||
| 75 | }; | ||
| 76 | } | ||
| 77 | |||
| 78 | pub fn isRedhat(self: Tag) bool { | ||
| 79 | return switch (self) { | ||
| 80 | .fedora, | ||
| 81 | .rhel5, | ||
| 82 | .rhel6, | ||
| 83 | .rhel7, | ||
| 84 | => true, | ||
| 85 | else => false, | ||
| 86 | }; | ||
| 87 | } | ||
| 88 | |||
| 89 | pub fn isOpenSUSE(self: Tag) bool { | ||
| 90 | return self == .open_suse; | ||
| 91 | } | ||
| 92 | |||
| 93 | pub fn isDebian(self: Tag) bool { | ||
| 94 | return switch (self) { | ||
| 95 | .debian_lenny, | ||
| 96 | .debian_squeeze, | ||
| 97 | .debian_wheezy, | ||
| 98 | .debian_jessie, | ||
| 99 | .debian_stretch, | ||
| 100 | .debian_buster, | ||
| 101 | .debian_bullseye, | ||
| 102 | .debian_bookworm, | ||
| 103 | .debian_trixie, | ||
| 104 | => true, | ||
| 105 | else => false, | ||
| 106 | }; | ||
| 107 | } | ||
| 108 | pub fn isUbuntu(self: Tag) bool { | ||
| 109 | return switch (self) { | ||
| 110 | .ubuntu_hardy, | ||
| 111 | .ubuntu_intrepid, | ||
| 112 | .ubuntu_jaunty, | ||
| 113 | .ubuntu_karmic, | ||
| 114 | .ubuntu_lucid, | ||
| 115 | .ubuntu_maverick, | ||
| 116 | .ubuntu_natty, | ||
| 117 | .ubuntu_oneiric, | ||
| 118 | .ubuntu_precise, | ||
| 119 | .ubuntu_quantal, | ||
| 120 | .ubuntu_raring, | ||
| 121 | .ubuntu_saucy, | ||
| 122 | .ubuntu_trusty, | ||
| 123 | .ubuntu_utopic, | ||
| 124 | .ubuntu_vivid, | ||
| 125 | .ubuntu_wily, | ||
| 126 | .ubuntu_xenial, | ||
| 127 | .ubuntu_yakkety, | ||
| 128 | .ubuntu_zesty, | ||
| 129 | .ubuntu_artful, | ||
| 130 | .ubuntu_bionic, | ||
| 131 | .ubuntu_cosmic, | ||
| 132 | .ubuntu_disco, | ||
| 133 | .ubuntu_eoan, | ||
| 134 | .ubuntu_focal, | ||
| 135 | .ubuntu_groovy, | ||
| 136 | .ubuntu_hirsute, | ||
| 137 | .ubuntu_impish, | ||
| 138 | .ubuntu_jammy, | ||
| 139 | .ubuntu_kinetic, | ||
| 140 | .ubuntu_lunar, | ||
| 141 | => true, | ||
| 142 | |||
| 143 | else => false, | ||
| 144 | }; | ||
| 145 | } | ||
| 146 | pub fn isAlpine(self: Tag) bool { | ||
| 147 | return self == .alpine; | ||
| 148 | } | ||
| 149 | pub fn isGentoo(self: Tag) bool { | ||
| 150 | return self == .gentoo; | ||
| 151 | } | ||
| 152 | }; | ||
| 153 | |||
| 154 | fn scanForOsRelease(buf: []const u8) ?Tag { | ||
| 155 | var it = mem.splitScalar(u8, buf, '\n'); | ||
| 156 | while (it.next()) |line| { | ||
| 157 | if (mem.startsWith(u8, line, "ID=")) { | ||
| 158 | const rest = line["ID=".len..]; | ||
| 159 | if (mem.eql(u8, rest, "alpine")) return .alpine; | ||
| 160 | if (mem.eql(u8, rest, "fedora")) return .fedora; | ||
| 161 | if (mem.eql(u8, rest, "gentoo")) return .gentoo; | ||
| 162 | if (mem.eql(u8, rest, "arch")) return .arch; | ||
| 163 | if (mem.eql(u8, rest, "sles")) return .open_suse; | ||
| 164 | if (mem.eql(u8, rest, "opensuse")) return .open_suse; | ||
| 165 | if (mem.eql(u8, rest, "exherbo")) return .exherbo; | ||
| 166 | } | ||
| 167 | } | ||
| 168 | return null; | ||
| 169 | } | ||
| 170 | |||
| 171 | fn detectOsRelease(fs: Filesystem) ?Tag { | ||
| 172 | var buf: [MAX_BYTES]u8 = undefined; | ||
| 173 | const data = fs.readFile("/etc/os-release", &buf) orelse fs.readFile("/usr/lib/os-release", &buf) orelse return null; | ||
| 174 | return scanForOsRelease(data); | ||
| 175 | } | ||
| 176 | |||
| 177 | fn scanForLSBRelease(buf: []const u8) ?Tag { | ||
| 178 | var it = mem.splitScalar(u8, buf, '\n'); | ||
| 179 | while (it.next()) |line| { | ||
| 180 | if (mem.startsWith(u8, line, "DISTRIB_CODENAME=")) { | ||
| 181 | const rest = line["DISTRIB_CODENAME=".len..]; | ||
| 182 | if (mem.eql(u8, rest, "hardy")) return .ubuntu_hardy; | ||
| 183 | if (mem.eql(u8, rest, "intrepid")) return .ubuntu_intrepid; | ||
| 184 | if (mem.eql(u8, rest, "jaunty")) return .ubuntu_jaunty; | ||
| 185 | if (mem.eql(u8, rest, "karmic")) return .ubuntu_karmic; | ||
| 186 | if (mem.eql(u8, rest, "lucid")) return .ubuntu_lucid; | ||
| 187 | if (mem.eql(u8, rest, "maverick")) return .ubuntu_maverick; | ||
| 188 | if (mem.eql(u8, rest, "natty")) return .ubuntu_natty; | ||
| 189 | if (mem.eql(u8, rest, "oneiric")) return .ubuntu_oneiric; | ||
| 190 | if (mem.eql(u8, rest, "precise")) return .ubuntu_precise; | ||
| 191 | if (mem.eql(u8, rest, "quantal")) return .ubuntu_quantal; | ||
| 192 | if (mem.eql(u8, rest, "raring")) return .ubuntu_raring; | ||
| 193 | if (mem.eql(u8, rest, "saucy")) return .ubuntu_saucy; | ||
| 194 | if (mem.eql(u8, rest, "trusty")) return .ubuntu_trusty; | ||
| 195 | if (mem.eql(u8, rest, "utopic")) return .ubuntu_utopic; | ||
| 196 | if (mem.eql(u8, rest, "vivid")) return .ubuntu_vivid; | ||
| 197 | if (mem.eql(u8, rest, "wily")) return .ubuntu_wily; | ||
| 198 | if (mem.eql(u8, rest, "xenial")) return .ubuntu_xenial; | ||
| 199 | if (mem.eql(u8, rest, "yakkety")) return .ubuntu_yakkety; | ||
| 200 | if (mem.eql(u8, rest, "zesty")) return .ubuntu_zesty; | ||
| 201 | if (mem.eql(u8, rest, "artful")) return .ubuntu_artful; | ||
| 202 | if (mem.eql(u8, rest, "bionic")) return .ubuntu_bionic; | ||
| 203 | if (mem.eql(u8, rest, "cosmic")) return .ubuntu_cosmic; | ||
| 204 | if (mem.eql(u8, rest, "disco")) return .ubuntu_disco; | ||
| 205 | if (mem.eql(u8, rest, "eoan")) return .ubuntu_eoan; | ||
| 206 | if (mem.eql(u8, rest, "focal")) return .ubuntu_focal; | ||
| 207 | if (mem.eql(u8, rest, "groovy")) return .ubuntu_groovy; | ||
| 208 | if (mem.eql(u8, rest, "hirsute")) return .ubuntu_hirsute; | ||
| 209 | if (mem.eql(u8, rest, "impish")) return .ubuntu_impish; | ||
| 210 | if (mem.eql(u8, rest, "jammy")) return .ubuntu_jammy; | ||
| 211 | if (mem.eql(u8, rest, "kinetic")) return .ubuntu_kinetic; | ||
| 212 | if (mem.eql(u8, rest, "lunar")) return .ubuntu_lunar; | ||
| 213 | } | ||
| 214 | } | ||
| 215 | return null; | ||
| 216 | } | ||
| 217 | |||
| 218 | fn detectLSBRelease(fs: Filesystem) ?Tag { | ||
| 219 | var buf: [MAX_BYTES]u8 = undefined; | ||
| 220 | const data = fs.readFile("/etc/lsb-release", &buf) orelse return null; | ||
| 221 | |||
| 222 | return scanForLSBRelease(data); | ||
| 223 | } | ||
| 224 | |||
| 225 | fn scanForRedHat(buf: []const u8) Tag { | ||
| 226 | if (mem.startsWith(u8, buf, "Fedora release")) return .fedora; | ||
| 227 | if (mem.startsWith(u8, buf, "Red Hat Enterprise Linux") or mem.startsWith(u8, buf, "CentOS") or mem.startsWith(u8, buf, "Scientific Linux")) { | ||
| 228 | if (mem.indexOfPos(u8, buf, 0, "release 7") != null) return .rhel7; | ||
| 229 | if (mem.indexOfPos(u8, buf, 0, "release 6") != null) return .rhel6; | ||
| 230 | if (mem.indexOfPos(u8, buf, 0, "release 5") != null) return .rhel5; | ||
| 231 | } | ||
| 232 | |||
| 233 | return .unknown; | ||
| 234 | } | ||
| 235 | |||
| 236 | fn detectRedhat(fs: Filesystem) ?Tag { | ||
| 237 | var buf: [MAX_BYTES]u8 = undefined; | ||
| 238 | const data = fs.readFile("/etc/redhat-release", &buf) orelse return null; | ||
| 239 | return scanForRedHat(data); | ||
| 240 | } | ||
| 241 | |||
| 242 | fn scanForDebian(buf: []const u8) Tag { | ||
| 243 | var it = mem.splitScalar(u8, buf, '.'); | ||
| 244 | if (std.fmt.parseInt(u8, it.next().?, 10)) |major| { | ||
| 245 | return switch (major) { | ||
| 246 | 5 => .debian_lenny, | ||
| 247 | 6 => .debian_squeeze, | ||
| 248 | 7 => .debian_wheezy, | ||
| 249 | 8 => .debian_jessie, | ||
| 250 | 9 => .debian_stretch, | ||
| 251 | 10 => .debian_buster, | ||
| 252 | 11 => .debian_bullseye, | ||
| 253 | 12 => .debian_bookworm, | ||
| 254 | 13 => .debian_trixie, | ||
| 255 | else => .unknown, | ||
| 256 | }; | ||
| 257 | } else |_| {} | ||
| 258 | |||
| 259 | it = mem.splitScalar(u8, buf, '\n'); | ||
| 260 | const name = it.next().?; | ||
| 261 | if (mem.eql(u8, name, "squeeze/sid")) return .debian_squeeze; | ||
| 262 | if (mem.eql(u8, name, "wheezy/sid")) return .debian_wheezy; | ||
| 263 | if (mem.eql(u8, name, "jessie/sid")) return .debian_jessie; | ||
| 264 | if (mem.eql(u8, name, "stretch/sid")) return .debian_stretch; | ||
| 265 | if (mem.eql(u8, name, "buster/sid")) return .debian_buster; | ||
| 266 | if (mem.eql(u8, name, "bullseye/sid")) return .debian_bullseye; | ||
| 267 | if (mem.eql(u8, name, "bookworm/sid")) return .debian_bookworm; | ||
| 268 | |||
| 269 | return .unknown; | ||
| 270 | } | ||
| 271 | |||
| 272 | fn detectDebian(fs: Filesystem) ?Tag { | ||
| 273 | var buf: [MAX_BYTES]u8 = undefined; | ||
| 274 | const data = fs.readFile("/etc/debian_version", &buf) orelse return null; | ||
| 275 | return scanForDebian(data); | ||
| 276 | } | ||
| 277 | |||
| 278 | pub fn detect(target: std.Target, fs: Filesystem) Tag { | ||
| 279 | if (target.os.tag != .linux) return .unknown; | ||
| 280 | |||
| 281 | if (detectOsRelease(fs)) |tag| return tag; | ||
| 282 | if (detectLSBRelease(fs)) |tag| return tag; | ||
| 283 | if (detectRedhat(fs)) |tag| return tag; | ||
| 284 | if (detectDebian(fs)) |tag| return tag; | ||
| 285 | |||
| 286 | if (fs.exists("/etc/gentoo-release")) return .gentoo; | ||
| 287 | |||
| 288 | return .unknown; | ||
| 289 | } | ||
| 290 | |||
| 291 | test scanForDebian { | ||
| 292 | try std.testing.expectEqual(Tag.debian_squeeze, scanForDebian("squeeze/sid")); | ||
| 293 | try std.testing.expectEqual(Tag.debian_bullseye, scanForDebian("11.1.2")); | ||
| 294 | try std.testing.expectEqual(Tag.unknown, scanForDebian("None")); | ||
| 295 | try std.testing.expectEqual(Tag.unknown, scanForDebian("")); | ||
| 296 | } | ||
| 297 | |||
| 298 | test scanForRedHat { | ||
| 299 | try std.testing.expectEqual(Tag.fedora, scanForRedHat("Fedora release 7")); | ||
| 300 | try std.testing.expectEqual(Tag.rhel7, scanForRedHat("Red Hat Enterprise Linux release 7")); | ||
| 301 | try std.testing.expectEqual(Tag.rhel5, scanForRedHat("CentOS release 5")); | ||
| 302 | try std.testing.expectEqual(Tag.unknown, scanForRedHat("CentOS release 4")); | ||
| 303 | try std.testing.expectEqual(Tag.unknown, scanForRedHat("")); | ||
| 304 | } | ||
| 305 | |||
| 306 | test scanForLSBRelease { | ||
| 307 | const text = | ||
| 308 | \\DISTRIB_ID=Ubuntu | ||
| 309 | \\DISTRIB_RELEASE=20.04 | ||
| 310 | \\DISTRIB_CODENAME=focal | ||
| 311 | \\DISTRIB_DESCRIPTION="Ubuntu 20.04.6 LTS" | ||
| 312 | \\ | ||
| 313 | ; | ||
| 314 | try std.testing.expectEqual(Tag.ubuntu_focal, scanForLSBRelease(text).?); | ||
| 315 | } | ||
| 316 | |||
| 317 | test scanForOsRelease { | ||
| 318 | const text = | ||
| 319 | \\NAME="Alpine Linux" | ||
| 320 | \\ID=alpine | ||
| 321 | \\VERSION_ID=3.18.2 | ||
| 322 | \\PRETTY_NAME="Alpine Linux v3.18" | ||
| 323 | \\HOME_URL="https://alpinelinux.org/" | ||
| 324 | \\BUG_REPORT_URL="https://gitlab.alpinelinux.org/alpine/aports/-/issues" | ||
| 325 | \\ | ||
| 326 | ; | ||
| 327 | try std.testing.expectEqual(Tag.alpine, scanForOsRelease(text).?); | ||
| 328 | } | ||
deps/aro/aro/Driver/Filesystem.zig created+239| ... | @@ -0,0 +1,239 @@ | ||
| 1 | const std = @import("std"); | ||
| 2 | const mem = std.mem; | ||
| 3 | const builtin = @import("builtin"); | ||
| 4 | const is_windows = builtin.os.tag == .windows; | ||
| 5 | |||
| 6 | fn readFileFake(entries: []const Filesystem.Entry, path: []const u8, buf: []u8) ?[]const u8 { | ||
| 7 | @setCold(true); | ||
| 8 | for (entries) |entry| { | ||
| 9 | if (mem.eql(u8, entry.path, path)) { | ||
| 10 | const len = @min(entry.contents.len, buf.len); | ||
| 11 | @memcpy(buf[0..len], entry.contents[0..len]); | ||
| 12 | return buf[0..len]; | ||
| 13 | } | ||
| 14 | } | ||
| 15 | return null; | ||
| 16 | } | ||
| 17 | |||
| 18 | fn findProgramByNameFake(entries: []const Filesystem.Entry, name: []const u8, path: ?[]const u8, buf: []u8) ?[]const u8 { | ||
| 19 | @setCold(true); | ||
| 20 | if (mem.indexOfScalar(u8, name, '/') != null) { | ||
| 21 | @memcpy(buf[0..name.len], name); | ||
| 22 | return buf[0..name.len]; | ||
| 23 | } | ||
| 24 | const path_env = path orelse return null; | ||
| 25 | var fib = std.heap.FixedBufferAllocator.init(buf); | ||
| 26 | |||
| 27 | var it = mem.tokenizeScalar(u8, path_env, std.fs.path.delimiter); | ||
| 28 | while (it.next()) |path_dir| { | ||
| 29 | defer fib.reset(); | ||
| 30 | const full_path = std.fs.path.join(fib.allocator(), &.{ path_dir, name }) catch continue; | ||
| 31 | if (canExecuteFake(entries, full_path)) return full_path; | ||
| 32 | } | ||
| 33 | |||
| 34 | return null; | ||
| 35 | } | ||
| 36 | |||
| 37 | fn canExecuteFake(entries: []const Filesystem.Entry, path: []const u8) bool { | ||
| 38 | @setCold(true); | ||
| 39 | for (entries) |entry| { | ||
| 40 | if (mem.eql(u8, entry.path, path)) { | ||
| 41 | return entry.executable; | ||
| 42 | } | ||
| 43 | } | ||
| 44 | return false; | ||
| 45 | } | ||
| 46 | |||
| 47 | fn existsFake(entries: []const Filesystem.Entry, path: []const u8) bool { | ||
| 48 | @setCold(true); | ||
| 49 | var buf: [std.fs.MAX_PATH_BYTES]u8 = undefined; | ||
| 50 | var fib = std.heap.FixedBufferAllocator.init(&buf); | ||
| 51 | const resolved = std.fs.path.resolvePosix(fib.allocator(), &.{path}) catch return false; | ||
| 52 | for (entries) |entry| { | ||
| 53 | if (mem.eql(u8, entry.path, resolved)) return true; | ||
| 54 | } | ||
| 55 | return false; | ||
| 56 | } | ||
| 57 | |||
| 58 | fn canExecutePosix(path: []const u8) bool { | ||
| 59 | std.os.access(path, std.os.X_OK) catch return false; | ||
| 60 | // Todo: ensure path is not a directory | ||
| 61 | return true; | ||
| 62 | } | ||
| 63 | |||
| 64 | /// TODO | ||
| 65 | fn canExecuteWindows(path: []const u8) bool { | ||
| 66 | _ = path; | ||
| 67 | return true; | ||
| 68 | } | ||
| 69 | |||
| 70 | /// TODO | ||
| 71 | fn findProgramByNameWindows(allocator: std.mem.Allocator, name: []const u8, path: ?[]const u8, buf: []u8) ?[]const u8 { | ||
| 72 | _ = path; | ||
| 73 | _ = buf; | ||
| 74 | _ = name; | ||
| 75 | _ = allocator; | ||
| 76 | return null; | ||
| 77 | } | ||
| 78 | |||
| 79 | /// TODO: does WASI need special handling? | ||
| 80 | fn findProgramByNamePosix(name: []const u8, path: ?[]const u8, buf: []u8) ?[]const u8 { | ||
| 81 | if (mem.indexOfScalar(u8, name, '/') != null) { | ||
| 82 | @memcpy(buf[0..name.len], name); | ||
| 83 | return buf[0..name.len]; | ||
| 84 | } | ||
| 85 | const path_env = path orelse return null; | ||
| 86 | var fib = std.heap.FixedBufferAllocator.init(buf); | ||
| 87 | |||
| 88 | var it = mem.tokenizeScalar(u8, path_env, std.fs.path.delimiter); | ||
| 89 | while (it.next()) |path_dir| { | ||
| 90 | defer fib.reset(); | ||
| 91 | const full_path = std.fs.path.join(fib.allocator(), &.{ path_dir, name }) catch continue; | ||
| 92 | if (canExecutePosix(full_path)) return full_path; | ||
| 93 | } | ||
| 94 | |||
| 95 | return null; | ||
| 96 | } | ||
| 97 | |||
| 98 | pub const Filesystem = union(enum) { | ||
| 99 | real: void, | ||
| 100 | fake: []const Entry, | ||
| 101 | |||
| 102 | const Entry = struct { | ||
| 103 | path: []const u8, | ||
| 104 | contents: []const u8 = "", | ||
| 105 | executable: bool = false, | ||
| 106 | }; | ||
| 107 | |||
| 108 | const FakeDir = struct { | ||
| 109 | entries: []const Entry, | ||
| 110 | path: []const u8, | ||
| 111 | |||
| 112 | fn iterate(self: FakeDir) FakeDir.Iterator { | ||
| 113 | return .{ | ||
| 114 | .entries = self.entries, | ||
| 115 | .base = self.path, | ||
| 116 | }; | ||
| 117 | } | ||
| 118 | |||
| 119 | const Iterator = struct { | ||
| 120 | entries: []const Entry, | ||
| 121 | base: []const u8, | ||
| 122 | i: usize = 0, | ||
| 123 | |||
| 124 | fn next(self: *@This()) !?std.fs.IterableDir.Entry { | ||
| 125 | while (self.i < self.entries.len) { | ||
| 126 | const entry = self.entries[self.i]; | ||
| 127 | self.i += 1; | ||
| 128 | if (entry.path.len == self.base.len) continue; | ||
| 129 | if (std.mem.startsWith(u8, entry.path, self.base)) { | ||
| 130 | const remaining = entry.path[self.base.len + 1 ..]; | ||
| 131 | if (std.mem.indexOfScalar(u8, remaining, std.fs.path.sep) != null) continue; | ||
| 132 | const extension = std.fs.path.extension(remaining); | ||
| 133 | const kind: std.fs.IterableDir.Entry.Kind = if (extension.len == 0) .directory else .file; | ||
| 134 | return .{ .name = remaining, .kind = kind }; | ||
| 135 | } | ||
| 136 | } | ||
| 137 | return null; | ||
| 138 | } | ||
| 139 | }; | ||
| 140 | }; | ||
| 141 | |||
| 142 | const IterableDir = union(enum) { | ||
| 143 | dir: std.fs.IterableDir, | ||
| 144 | fake: FakeDir, | ||
| 145 | |||
| 146 | pub fn iterate(self: IterableDir) Iterator { | ||
| 147 | return switch (self) { | ||
| 148 | .dir => |dir| .{ .iterator = dir.iterate() }, | ||
| 149 | .fake => |fake| .{ .fake = fake.iterate() }, | ||
| 150 | }; | ||
| 151 | } | ||
| 152 | |||
| 153 | pub fn close(self: *IterableDir) void { | ||
| 154 | switch (self.*) { | ||
| 155 | .dir => |*d| d.close(), | ||
| 156 | .fake => {}, | ||
| 157 | } | ||
| 158 | } | ||
| 159 | }; | ||
| 160 | |||
| 161 | const Iterator = union(enum) { | ||
| 162 | iterator: std.fs.IterableDir.Iterator, | ||
| 163 | fake: FakeDir.Iterator, | ||
| 164 | |||
| 165 | pub fn next(self: *Iterator) std.fs.IterableDir.Iterator.Error!?std.fs.IterableDir.Entry { | ||
| 166 | return switch (self.*) { | ||
| 167 | .iterator => |*it| it.next(), | ||
| 168 | .fake => |*it| it.next(), | ||
| 169 | }; | ||
| 170 | } | ||
| 171 | }; | ||
| 172 | |||
| 173 | pub fn exists(fs: Filesystem, path: []const u8) bool { | ||
| 174 | switch (fs) { | ||
| 175 | .real => { | ||
| 176 | std.os.access(path, std.os.F_OK) catch return false; | ||
| 177 | return true; | ||
| 178 | }, | ||
| 179 | .fake => |paths| return existsFake(paths, path), | ||
| 180 | } | ||
| 181 | } | ||
| 182 | |||
| 183 | pub fn joinedExists(fs: Filesystem, parts: []const []const u8) bool { | ||
| 184 | var buf: [std.fs.MAX_PATH_BYTES]u8 = undefined; | ||
| 185 | var fib = std.heap.FixedBufferAllocator.init(&buf); | ||
| 186 | const joined = std.fs.path.join(fib.allocator(), parts) catch return false; | ||
| 187 | return fs.exists(joined); | ||
| 188 | } | ||
| 189 | |||
| 190 | pub fn canExecute(fs: Filesystem, path: []const u8) bool { | ||
| 191 | return switch (fs) { | ||
| 192 | .real => if (is_windows) canExecuteWindows(path) else canExecutePosix(path), | ||
| 193 | .fake => |entries| canExecuteFake(entries, path), | ||
| 194 | }; | ||
| 195 | } | ||
| 196 | |||
| 197 | /// Search for an executable named `name` using platform-specific logic | ||
| 198 | /// If it's found, write the full path to `buf` and return a slice of it | ||
| 199 | /// Otherwise retun null | ||
| 200 | pub fn findProgramByName(fs: Filesystem, allocator: std.mem.Allocator, name: []const u8, path: ?[]const u8, buf: []u8) ?[]const u8 { | ||
| 201 | std.debug.assert(name.len > 0); | ||
| 202 | return switch (fs) { | ||
| 203 | .real => if (is_windows) findProgramByNameWindows(allocator, name, path, buf) else findProgramByNamePosix(name, path, buf), | ||
| 204 | .fake => |entries| findProgramByNameFake(entries, name, path, buf), | ||
| 205 | }; | ||
| 206 | } | ||
| 207 | |||
| 208 | /// Read the file at `path` into `buf`. | ||
| 209 | /// Returns null if any errors are encountered | ||
| 210 | /// Otherwise returns a slice of `buf`. If the file is larger than `buf` partial contents are returned | ||
| 211 | pub fn readFile(fs: Filesystem, path: []const u8, buf: []u8) ?[]const u8 { | ||
| 212 | return switch (fs) { | ||
| 213 | .real => { | ||
| 214 | const file = std.fs.cwd().openFile(path, .{}) catch return null; | ||
| 215 | defer file.close(); | ||
| 216 | |||
| 217 | const bytes_read = file.readAll(buf) catch return null; | ||
| 218 | return buf[0..bytes_read]; | ||
| 219 | }, | ||
| 220 | .fake => |entries| readFileFake(entries, path, buf), | ||
| 221 | }; | ||
| 222 | } | ||
| 223 | |||
| 224 | pub fn openIterableDir(fs: Filesystem, dir_name: []const u8) std.fs.Dir.OpenError!IterableDir { | ||
| 225 | return switch (fs) { | ||
| 226 | .real => .{ .dir = try std.fs.cwd().openIterableDir(dir_name, .{ .access_sub_paths = false }) }, | ||
| 227 | .fake => |entries| .{ .fake = .{ .entries = entries, .path = dir_name } }, | ||
| 228 | }; | ||
| 229 | } | ||
| 230 | }; | ||
| 231 | |||
| 232 | test "Fake filesystem" { | ||
| 233 | const fs: Filesystem = .{ .fake = &.{ | ||
| 234 | .{ .path = "/usr/bin" }, | ||
| 235 | } }; | ||
| 236 | try std.testing.expect(fs.exists("/usr/bin")); | ||
| 237 | try std.testing.expect(fs.exists("/usr/bin/foo/..")); | ||
| 238 | try std.testing.expect(!fs.exists("/usr/bin/bar")); | ||
| 239 | } | ||
deps/aro/aro/Driver/GCCDetector.zig created+631| ... | @@ -0,0 +1,631 @@ | ||
| 1 | const std = @import("std"); | ||
| 2 | const Toolchain = @import("../Toolchain.zig"); | ||
| 3 | const target_util = @import("../target.zig"); | ||
| 4 | const system_defaults = @import("system_defaults"); | ||
| 5 | const GCCVersion = @import("GCCVersion.zig"); | ||
| 6 | const Multilib = @import("Multilib.zig"); | ||
| 7 | |||
| 8 | const GCCDetector = @This(); | ||
| 9 | |||
| 10 | is_valid: bool = false, | ||
| 11 | install_path: []const u8 = "", | ||
| 12 | parent_lib_path: []const u8 = "", | ||
| 13 | version: GCCVersion = .{}, | ||
| 14 | gcc_triple: []const u8 = "", | ||
| 15 | selected: Multilib = .{}, | ||
| 16 | biarch_sibling: ?Multilib = null, | ||
| 17 | |||
| 18 | pub fn deinit(self: *GCCDetector) void { | ||
| 19 | if (!self.is_valid) return; | ||
| 20 | } | ||
| 21 | |||
| 22 | pub fn appendToolPath(self: *const GCCDetector, tc: *Toolchain) !void { | ||
| 23 | if (!self.is_valid) return; | ||
| 24 | return tc.addPathFromComponents(&.{ | ||
| 25 | self.parent_lib_path, | ||
| 26 | "..", | ||
| 27 | self.gcc_triple, | ||
| 28 | "bin", | ||
| 29 | }, .program); | ||
| 30 | } | ||
| 31 | |||
| 32 | fn addDefaultGCCPrefixes(prefixes: *PathPrefixes, tc: *const Toolchain) !void { | ||
| 33 | const sysroot = tc.getSysroot(); | ||
| 34 | const target = tc.getTarget(); | ||
| 35 | if (sysroot.len == 0 and target.os.tag == .linux and tc.filesystem.exists("/opt/rh")) { | ||
| 36 | prefixes.appendAssumeCapacity("/opt/rh/gcc-toolset-12/root/usr"); | ||
| 37 | prefixes.appendAssumeCapacity("/opt/rh/gcc-toolset-11/root/usr"); | ||
| 38 | prefixes.appendAssumeCapacity("/opt/rh/gcc-toolset-10/root/usr"); | ||
| 39 | prefixes.appendAssumeCapacity("/opt/rh/devtoolset-12/root/usr"); | ||
| 40 | prefixes.appendAssumeCapacity("/opt/rh/devtoolset-11/root/usr"); | ||
| 41 | prefixes.appendAssumeCapacity("/opt/rh/devtoolset-10/root/usr"); | ||
| 42 | prefixes.appendAssumeCapacity("/opt/rh/devtoolset-9/root/usr"); | ||
| 43 | prefixes.appendAssumeCapacity("/opt/rh/devtoolset-8/root/usr"); | ||
| 44 | prefixes.appendAssumeCapacity("/opt/rh/devtoolset-7/root/usr"); | ||
| 45 | prefixes.appendAssumeCapacity("/opt/rh/devtoolset-6/root/usr"); | ||
| 46 | prefixes.appendAssumeCapacity("/opt/rh/devtoolset-4/root/usr"); | ||
| 47 | prefixes.appendAssumeCapacity("/opt/rh/devtoolset-3/root/usr"); | ||
| 48 | prefixes.appendAssumeCapacity("/opt/rh/devtoolset-2/root/usr"); | ||
| 49 | } | ||
| 50 | if (sysroot.len == 0) { | ||
| 51 | prefixes.appendAssumeCapacity("/usr"); | ||
| 52 | } else { | ||
| 53 | var usr_path = try tc.arena.alloc(u8, 4 + sysroot.len); | ||
| 54 | @memcpy(usr_path[0..4], "/usr"); | ||
| 55 | @memcpy(usr_path[4..], sysroot); | ||
| 56 | prefixes.appendAssumeCapacity(usr_path); | ||
| 57 | } | ||
| 58 | } | ||
| 59 | |||
| 60 | const PathPrefixes = std.BoundedArray([]const u8, 16); | ||
| 61 | |||
| 62 | fn collectLibDirsAndTriples( | ||
| 63 | tc: *Toolchain, | ||
| 64 | lib_dirs: *PathPrefixes, | ||
| 65 | triple_aliases: *PathPrefixes, | ||
| 66 | biarch_libdirs: *PathPrefixes, | ||
| 67 | biarch_triple_aliases: *PathPrefixes, | ||
| 68 | ) !void { | ||
| 69 | const AArch64LibDirs: [2][]const u8 = .{ "/lib64", "/lib" }; | ||
| 70 | const AArch64Triples: [4][]const u8 = .{ "aarch64-none-linux-gnu", "aarch64-linux-gnu", "aarch64-redhat-linux", "aarch64-suse-linux" }; | ||
| 71 | const AArch64beLibDirs: [1][]const u8 = .{"/lib"}; | ||
| 72 | const AArch64beTriples: [2][]const u8 = .{ "aarch64_be-none-linux-gnu", "aarch64_be-linux-gnu" }; | ||
| 73 | |||
| 74 | const ARMLibDirs: [1][]const u8 = .{"/lib"}; | ||
| 75 | const ARMTriples: [1][]const u8 = .{"arm-linux-gnueabi"}; | ||
| 76 | const ARMHFTriples: [4][]const u8 = .{ "arm-linux-gnueabihf", "armv7hl-redhat-linux-gnueabi", "armv6hl-suse-linux-gnueabi", "armv7hl-suse-linux-gnueabi" }; | ||
| 77 | |||
| 78 | const ARMebLibDirs: [1][]const u8 = .{"/lib"}; | ||
| 79 | const ARMebTriples: [1][]const u8 = .{"armeb-linux-gnueabi"}; | ||
| 80 | const ARMebHFTriples: [2][]const u8 = .{ "armeb-linux-gnueabihf", "armebv7hl-redhat-linux-gnueabi" }; | ||
| 81 | |||
| 82 | const AVRLibDirs: [1][]const u8 = .{"/lib"}; | ||
| 83 | const AVRTriples: [1][]const u8 = .{"avr"}; | ||
| 84 | |||
| 85 | const CSKYLibDirs: [1][]const u8 = .{"/lib"}; | ||
| 86 | const CSKYTriples: [3][]const u8 = .{ "csky-linux-gnuabiv2", "csky-linux-uclibcabiv2", "csky-elf-noneabiv2" }; | ||
| 87 | |||
| 88 | const X86_64LibDirs: [2][]const u8 = .{ "/lib64", "/lib" }; | ||
| 89 | const X86_64Triples: [11][]const u8 = .{ | ||
| 90 | "x86_64-linux-gnu", "x86_64-unknown-linux-gnu", | ||
| 91 | "x86_64-pc-linux-gnu", "x86_64-redhat-linux6E", | ||
| 92 | "x86_64-redhat-linux", "x86_64-suse-linux", | ||
| 93 | "x86_64-manbo-linux-gnu", "x86_64-linux-gnu", | ||
| 94 | "x86_64-slackware-linux", "x86_64-unknown-linux", | ||
| 95 | "x86_64-amazon-linux", | ||
| 96 | }; | ||
| 97 | const X32Triples: [2][]const u8 = .{ "x86_64-linux-gnux32", "x86_64-pc-linux-gnux32" }; | ||
| 98 | const X32LibDirs: [2][]const u8 = .{ "/libx32", "/lib" }; | ||
| 99 | const X86LibDirs: [2][]const u8 = .{ "/lib32", "/lib" }; | ||
| 100 | const X86Triples: [9][]const u8 = .{ | ||
| 101 | "i586-linux-gnu", "i686-linux-gnu", "i686-pc-linux-gnu", | ||
| 102 | "i386-redhat-linux6E", "i686-redhat-linux", "i386-redhat-linux", | ||
| 103 | "i586-suse-linux", "i686-montavista-linux", "i686-gnu", | ||
| 104 | }; | ||
| 105 | |||
| 106 | const LoongArch64LibDirs: [2][]const u8 = .{ "/lib64", "/lib" }; | ||
| 107 | const LoongArch64Triples: [2][]const u8 = .{ "loongarch64-linux-gnu", "loongarch64-unknown-linux-gnu" }; | ||
| 108 | |||
| 109 | const M68kLibDirs: [1][]const u8 = .{"/lib"}; | ||
| 110 | const M68kTriples: [3][]const u8 = .{ "m68k-linux-gnu", "m68k-unknown-linux-gnu", "m68k-suse-linux" }; | ||
| 111 | |||
| 112 | const MIPSLibDirs: [2][]const u8 = .{ "/libo32", "/lib" }; | ||
| 113 | const MIPSTriples: [5][]const u8 = .{ | ||
| 114 | "mips-linux-gnu", "mips-mti-linux", | ||
| 115 | "mips-mti-linux-gnu", "mips-img-linux-gnu", | ||
| 116 | "mipsisa32r6-linux-gnu", | ||
| 117 | }; | ||
| 118 | const MIPSELLibDirs: [2][]const u8 = .{ "/libo32", "/lib" }; | ||
| 119 | const MIPSELTriples: [3][]const u8 = .{ "mipsel-linux-gnu", "mips-img-linux-gnu", "mipsisa32r6el-linux-gnu" }; | ||
| 120 | |||
| 121 | const MIPS64LibDirs: [2][]const u8 = .{ "/lib64", "/lib" }; | ||
| 122 | const MIPS64Triples: [6][]const u8 = .{ | ||
| 123 | "mips64-linux-gnu", "mips-mti-linux-gnu", | ||
| 124 | "mips-img-linux-gnu", "mips64-linux-gnuabi64", | ||
| 125 | "mipsisa64r6-linux-gnu", "mipsisa64r6-linux-gnuabi64", | ||
| 126 | }; | ||
| 127 | const MIPS64ELLibDirs: [2][]const u8 = .{ "/lib64", "/lib" }; | ||
| 128 | const MIPS64ELTriples: [6][]const u8 = .{ | ||
| 129 | "mips64el-linux-gnu", "mips-mti-linux-gnu", | ||
| 130 | "mips-img-linux-gnu", "mips64el-linux-gnuabi64", | ||
| 131 | "mipsisa64r6el-linux-gnu", "mipsisa64r6el-linux-gnuabi64", | ||
| 132 | }; | ||
| 133 | |||
| 134 | const MIPSN32LibDirs: [1][]const u8 = .{"/lib32"}; | ||
| 135 | const MIPSN32Triples: [2][]const u8 = .{ "mips64-linux-gnuabin32", "mipsisa64r6-linux-gnuabin32" }; | ||
| 136 | const MIPSN32ELLibDirs: [1][]const u8 = .{"/lib32"}; | ||
| 137 | const MIPSN32ELTriples: [2][]const u8 = .{ "mips64el-linux-gnuabin32", "mipsisa64r6el-linux-gnuabin32" }; | ||
| 138 | |||
| 139 | const MSP430LibDirs: [1][]const u8 = .{"/lib"}; | ||
| 140 | const MSP430Triples: [1][]const u8 = .{"msp430-elf"}; | ||
| 141 | |||
| 142 | const PPCLibDirs: [2][]const u8 = .{ "/lib32", "/lib" }; | ||
| 143 | const PPCTriples: [5][]const u8 = .{ | ||
| 144 | "powerpc-linux-gnu", "powerpc-unknown-linux-gnu", "powerpc-linux-gnuspe", | ||
| 145 | // On 32-bit PowerPC systems running SUSE Linux, gcc is configured as a | ||
| 146 | // 64-bit compiler which defaults to "-m32", hence "powerpc64-suse-linux". | ||
| 147 | "powerpc64-suse-linux", "powerpc-montavista-linuxspe", | ||
| 148 | }; | ||
| 149 | const PPCLELibDirs: [2][]const u8 = .{ "/lib32", "/lib" }; | ||
| 150 | const PPCLETriples: [3][]const u8 = .{ "powerpcle-linux-gnu", "powerpcle-unknown-linux-gnu", "powerpcle-linux-musl" }; | ||
| 151 | |||
| 152 | const PPC64LibDirs: [2][]const u8 = .{ "/lib64", "/lib" }; | ||
| 153 | const PPC64Triples: [4][]const u8 = .{ | ||
| 154 | "powerpc64-linux-gnu", "powerpc64-unknown-linux-gnu", | ||
| 155 | "powerpc64-suse-linux", "ppc64-redhat-linux", | ||
| 156 | }; | ||
| 157 | const PPC64LELibDirs: [2][]const u8 = .{ "/lib64", "/lib" }; | ||
| 158 | const PPC64LETriples: [5][]const u8 = .{ | ||
| 159 | "powerpc64le-linux-gnu", "powerpc64le-unknown-linux-gnu", | ||
| 160 | "powerpc64le-none-linux-gnu", "powerpc64le-suse-linux", | ||
| 161 | "ppc64le-redhat-linux", | ||
| 162 | }; | ||
| 163 | |||
| 164 | const RISCV32LibDirs: [2][]const u8 = .{ "/lib32", "/lib" }; | ||
| 165 | const RISCV32Triples: [3][]const u8 = .{ "riscv32-unknown-linux-gnu", "riscv32-linux-gnu", "riscv32-unknown-elf" }; | ||
| 166 | const RISCV64LibDirs: [2][]const u8 = .{ "/lib64", "/lib" }; | ||
| 167 | const RISCV64Triples: [3][]const u8 = .{ | ||
| 168 | "riscv64-unknown-linux-gnu", | ||
| 169 | "riscv64-linux-gnu", | ||
| 170 | "riscv64-unknown-elf", | ||
| 171 | }; | ||
| 172 | |||
| 173 | const SPARCv8LibDirs: [2][]const u8 = .{ "/lib32", "/lib" }; | ||
| 174 | const SPARCv8Triples: [2][]const u8 = .{ "sparc-linux-gnu", "sparcv8-linux-gnu" }; | ||
| 175 | const SPARCv9LibDirs: [2][]const u8 = .{ "/lib64", "/lib" }; | ||
| 176 | const SPARCv9Triples: [2][]const u8 = .{ "sparc64-linux-gnu", "sparcv9-linux-gnu" }; | ||
| 177 | |||
| 178 | const SystemZLibDirs: [2][]const u8 = .{ "/lib64", "/lib" }; | ||
| 179 | const SystemZTriples: [5][]const u8 = .{ | ||
| 180 | "s390x-linux-gnu", "s390x-unknown-linux-gnu", "s390x-ibm-linux-gnu", | ||
| 181 | "s390x-suse-linux", "s390x-redhat-linux", | ||
| 182 | }; | ||
| 183 | const target = tc.getTarget(); | ||
| 184 | if (target.os.tag == .solaris) { | ||
| 185 | // TODO | ||
| 186 | return; | ||
| 187 | } | ||
| 188 | if (target.isAndroid()) { | ||
| 189 | const AArch64AndroidTriples: [1][]const u8 = .{"aarch64-linux-android"}; | ||
| 190 | const ARMAndroidTriples: [1][]const u8 = .{"arm-linux-androideabi"}; | ||
| 191 | const MIPSELAndroidTriples: [1][]const u8 = .{"mipsel-linux-android"}; | ||
| 192 | const MIPS64ELAndroidTriples: [1][]const u8 = .{"mips64el-linux-android"}; | ||
| 193 | const X86AndroidTriples: [1][]const u8 = .{"i686-linux-android"}; | ||
| 194 | const X86_64AndroidTriples: [1][]const u8 = .{"x86_64-linux-android"}; | ||
| 195 | |||
| 196 | switch (target.cpu.arch) { | ||
| 197 | .aarch64 => { | ||
| 198 | lib_dirs.appendSliceAssumeCapacity(&AArch64LibDirs); | ||
| 199 | triple_aliases.appendSliceAssumeCapacity(&AArch64AndroidTriples); | ||
| 200 | }, | ||
| 201 | .arm, | ||
| 202 | .thumb, | ||
| 203 | => { | ||
| 204 | lib_dirs.appendSliceAssumeCapacity(&ARMLibDirs); | ||
| 205 | triple_aliases.appendSliceAssumeCapacity(&ARMAndroidTriples); | ||
| 206 | }, | ||
| 207 | .mipsel => { | ||
| 208 | lib_dirs.appendSliceAssumeCapacity(&MIPSELLibDirs); | ||
| 209 | triple_aliases.appendSliceAssumeCapacity(&MIPSELAndroidTriples); | ||
| 210 | biarch_libdirs.appendSliceAssumeCapacity(&MIPS64ELLibDirs); | ||
| 211 | biarch_triple_aliases.appendSliceAssumeCapacity(&MIPS64ELAndroidTriples); | ||
| 212 | }, | ||
| 213 | .mips64el => { | ||
| 214 | lib_dirs.appendSliceAssumeCapacity(&MIPS64ELLibDirs); | ||
| 215 | triple_aliases.appendSliceAssumeCapacity(&MIPS64ELAndroidTriples); | ||
| 216 | biarch_libdirs.appendSliceAssumeCapacity(&MIPSELLibDirs); | ||
| 217 | biarch_triple_aliases.appendSliceAssumeCapacity(&MIPSELAndroidTriples); | ||
| 218 | }, | ||
| 219 | .x86_64 => { | ||
| 220 | lib_dirs.appendSliceAssumeCapacity(&X86_64LibDirs); | ||
| 221 | triple_aliases.appendSliceAssumeCapacity(&X86_64AndroidTriples); | ||
| 222 | biarch_libdirs.appendSliceAssumeCapacity(&X86LibDirs); | ||
| 223 | biarch_triple_aliases.appendSliceAssumeCapacity(&X86AndroidTriples); | ||
| 224 | }, | ||
| 225 | .x86 => { | ||
| 226 | lib_dirs.appendSliceAssumeCapacity(&X86LibDirs); | ||
| 227 | triple_aliases.appendSliceAssumeCapacity(&X86AndroidTriples); | ||
| 228 | biarch_libdirs.appendSliceAssumeCapacity(&X86_64LibDirs); | ||
| 229 | biarch_triple_aliases.appendSliceAssumeCapacity(&X86_64AndroidTriples); | ||
| 230 | }, | ||
| 231 | else => {}, | ||
| 232 | } | ||
| 233 | return; | ||
| 234 | } | ||
| 235 | switch (target.cpu.arch) { | ||
| 236 | .aarch64 => { | ||
| 237 | lib_dirs.appendSliceAssumeCapacity(&AArch64LibDirs); | ||
| 238 | triple_aliases.appendSliceAssumeCapacity(&AArch64Triples); | ||
| 239 | biarch_libdirs.appendSliceAssumeCapacity(&AArch64LibDirs); | ||
| 240 | biarch_triple_aliases.appendSliceAssumeCapacity(&AArch64Triples); | ||
| 241 | }, | ||
| 242 | .aarch64_be => { | ||
| 243 | lib_dirs.appendSliceAssumeCapacity(&AArch64beLibDirs); | ||
| 244 | triple_aliases.appendSliceAssumeCapacity(&AArch64beTriples); | ||
| 245 | biarch_libdirs.appendSliceAssumeCapacity(&AArch64beLibDirs); | ||
| 246 | biarch_triple_aliases.appendSliceAssumeCapacity(&AArch64beTriples); | ||
| 247 | }, | ||
| 248 | .arm, .thumb => { | ||
| 249 | lib_dirs.appendSliceAssumeCapacity(&ARMLibDirs); | ||
| 250 | if (target.abi == .gnueabihf) { | ||
| 251 | triple_aliases.appendSliceAssumeCapacity(&ARMHFTriples); | ||
| 252 | } else { | ||
| 253 | triple_aliases.appendSliceAssumeCapacity(&ARMTriples); | ||
| 254 | } | ||
| 255 | }, | ||
| 256 | .armeb, .thumbeb => { | ||
| 257 | lib_dirs.appendSliceAssumeCapacity(&ARMebLibDirs); | ||
| 258 | if (target.abi == .gnueabihf) { | ||
| 259 | triple_aliases.appendSliceAssumeCapacity(&ARMebHFTriples); | ||
| 260 | } else { | ||
| 261 | triple_aliases.appendSliceAssumeCapacity(&ARMebTriples); | ||
| 262 | } | ||
| 263 | }, | ||
| 264 | .avr => { | ||
| 265 | lib_dirs.appendSliceAssumeCapacity(&AVRLibDirs); | ||
| 266 | triple_aliases.appendSliceAssumeCapacity(&AVRTriples); | ||
| 267 | }, | ||
| 268 | .csky => { | ||
| 269 | lib_dirs.appendSliceAssumeCapacity(&CSKYLibDirs); | ||
| 270 | triple_aliases.appendSliceAssumeCapacity(&CSKYTriples); | ||
| 271 | }, | ||
| 272 | .x86_64 => { | ||
| 273 | if (target.abi == .gnux32 or target.abi == .muslx32) { | ||
| 274 | lib_dirs.appendSliceAssumeCapacity(&X32LibDirs); | ||
| 275 | triple_aliases.appendSliceAssumeCapacity(&X32Triples); | ||
| 276 | biarch_libdirs.appendSliceAssumeCapacity(&X86_64LibDirs); | ||
| 277 | biarch_triple_aliases.appendSliceAssumeCapacity(&X86_64Triples); | ||
| 278 | } else { | ||
| 279 | lib_dirs.appendSliceAssumeCapacity(&X86_64LibDirs); | ||
| 280 | triple_aliases.appendSliceAssumeCapacity(&X86_64Triples); | ||
| 281 | biarch_libdirs.appendSliceAssumeCapacity(&X32LibDirs); | ||
| 282 | biarch_triple_aliases.appendSliceAssumeCapacity(&X32Triples); | ||
| 283 | } | ||
| 284 | biarch_libdirs.appendSliceAssumeCapacity(&X86LibDirs); | ||
| 285 | biarch_triple_aliases.appendSliceAssumeCapacity(&X86Triples); | ||
| 286 | }, | ||
| 287 | .x86 => { | ||
| 288 | lib_dirs.appendSliceAssumeCapacity(&X86LibDirs); | ||
| 289 | // MCU toolchain is 32 bit only and its triple alias is TargetTriple | ||
| 290 | // itself, which will be appended below. | ||
| 291 | if (target.os.tag != .elfiamcu) { | ||
| 292 | triple_aliases.appendSliceAssumeCapacity(&X86Triples); | ||
| 293 | biarch_libdirs.appendSliceAssumeCapacity(&X86_64LibDirs); | ||
| 294 | biarch_triple_aliases.appendSliceAssumeCapacity(&X86_64Triples); | ||
| 295 | biarch_libdirs.appendSliceAssumeCapacity(&X32LibDirs); | ||
| 296 | biarch_triple_aliases.appendSliceAssumeCapacity(&X32Triples); | ||
| 297 | } | ||
| 298 | }, | ||
| 299 | .loongarch64 => { | ||
| 300 | lib_dirs.appendSliceAssumeCapacity(&LoongArch64LibDirs); | ||
| 301 | triple_aliases.appendSliceAssumeCapacity(&LoongArch64Triples); | ||
| 302 | }, | ||
| 303 | .m68k => { | ||
| 304 | lib_dirs.appendSliceAssumeCapacity(&M68kLibDirs); | ||
| 305 | triple_aliases.appendSliceAssumeCapacity(&M68kTriples); | ||
| 306 | }, | ||
| 307 | .mips => { | ||
| 308 | lib_dirs.appendSliceAssumeCapacity(&MIPSLibDirs); | ||
| 309 | triple_aliases.appendSliceAssumeCapacity(&MIPSTriples); | ||
| 310 | biarch_libdirs.appendSliceAssumeCapacity(&MIPS64LibDirs); | ||
| 311 | biarch_triple_aliases.appendSliceAssumeCapacity(&MIPS64Triples); | ||
| 312 | biarch_libdirs.appendSliceAssumeCapacity(&MIPSN32LibDirs); | ||
| 313 | biarch_triple_aliases.appendSliceAssumeCapacity(&MIPSN32Triples); | ||
| 314 | }, | ||
| 315 | .mipsel => { | ||
| 316 | lib_dirs.appendSliceAssumeCapacity(&MIPSELLibDirs); | ||
| 317 | triple_aliases.appendSliceAssumeCapacity(&MIPSELTriples); | ||
| 318 | triple_aliases.appendSliceAssumeCapacity(&MIPSTriples); | ||
| 319 | biarch_libdirs.appendSliceAssumeCapacity(&MIPS64ELLibDirs); | ||
| 320 | biarch_triple_aliases.appendSliceAssumeCapacity(&MIPS64ELTriples); | ||
| 321 | biarch_libdirs.appendSliceAssumeCapacity(&MIPSN32ELLibDirs); | ||
| 322 | biarch_triple_aliases.appendSliceAssumeCapacity(&MIPSN32ELTriples); | ||
| 323 | }, | ||
| 324 | .mips64 => { | ||
| 325 | lib_dirs.appendSliceAssumeCapacity(&MIPS64LibDirs); | ||
| 326 | triple_aliases.appendSliceAssumeCapacity(&MIPS64Triples); | ||
| 327 | biarch_libdirs.appendSliceAssumeCapacity(&MIPSLibDirs); | ||
| 328 | biarch_triple_aliases.appendSliceAssumeCapacity(&MIPSTriples); | ||
| 329 | biarch_libdirs.appendSliceAssumeCapacity(&MIPSN32LibDirs); | ||
| 330 | biarch_triple_aliases.appendSliceAssumeCapacity(&MIPSN32Triples); | ||
| 331 | }, | ||
| 332 | .mips64el => { | ||
| 333 | lib_dirs.appendSliceAssumeCapacity(&MIPS64ELLibDirs); | ||
| 334 | triple_aliases.appendSliceAssumeCapacity(&MIPS64ELTriples); | ||
| 335 | biarch_libdirs.appendSliceAssumeCapacity(&MIPSELLibDirs); | ||
| 336 | biarch_triple_aliases.appendSliceAssumeCapacity(&MIPSELTriples); | ||
| 337 | biarch_libdirs.appendSliceAssumeCapacity(&MIPSN32ELLibDirs); | ||
| 338 | biarch_triple_aliases.appendSliceAssumeCapacity(&MIPSN32ELTriples); | ||
| 339 | biarch_triple_aliases.appendSliceAssumeCapacity(&MIPSTriples); | ||
| 340 | }, | ||
| 341 | .msp430 => { | ||
| 342 | lib_dirs.appendSliceAssumeCapacity(&MSP430LibDirs); | ||
| 343 | triple_aliases.appendSliceAssumeCapacity(&MSP430Triples); | ||
| 344 | }, | ||
| 345 | .powerpc => { | ||
| 346 | lib_dirs.appendSliceAssumeCapacity(&PPCLibDirs); | ||
| 347 | triple_aliases.appendSliceAssumeCapacity(&PPCTriples); | ||
| 348 | biarch_libdirs.appendSliceAssumeCapacity(&PPC64LibDirs); | ||
| 349 | biarch_triple_aliases.appendSliceAssumeCapacity(&PPC64Triples); | ||
| 350 | }, | ||
| 351 | .powerpcle => { | ||
| 352 | lib_dirs.appendSliceAssumeCapacity(&PPCLELibDirs); | ||
| 353 | triple_aliases.appendSliceAssumeCapacity(&PPCLETriples); | ||
| 354 | biarch_libdirs.appendSliceAssumeCapacity(&PPC64LELibDirs); | ||
| 355 | biarch_triple_aliases.appendSliceAssumeCapacity(&PPC64LETriples); | ||
| 356 | }, | ||
| 357 | .powerpc64 => { | ||
| 358 | lib_dirs.appendSliceAssumeCapacity(&PPC64LibDirs); | ||
| 359 | triple_aliases.appendSliceAssumeCapacity(&PPC64Triples); | ||
| 360 | biarch_libdirs.appendSliceAssumeCapacity(&PPCLibDirs); | ||
| 361 | biarch_triple_aliases.appendSliceAssumeCapacity(&PPCTriples); | ||
| 362 | }, | ||
| 363 | .powerpc64le => { | ||
| 364 | lib_dirs.appendSliceAssumeCapacity(&PPC64LELibDirs); | ||
| 365 | triple_aliases.appendSliceAssumeCapacity(&PPC64LETriples); | ||
| 366 | biarch_libdirs.appendSliceAssumeCapacity(&PPCLELibDirs); | ||
| 367 | biarch_triple_aliases.appendSliceAssumeCapacity(&PPCLETriples); | ||
| 368 | }, | ||
| 369 | .riscv32 => { | ||
| 370 | lib_dirs.appendSliceAssumeCapacity(&RISCV32LibDirs); | ||
| 371 | triple_aliases.appendSliceAssumeCapacity(&RISCV32Triples); | ||
| 372 | biarch_libdirs.appendSliceAssumeCapacity(&RISCV64LibDirs); | ||
| 373 | biarch_triple_aliases.appendSliceAssumeCapacity(&RISCV64Triples); | ||
| 374 | }, | ||
| 375 | .riscv64 => { | ||
| 376 | lib_dirs.appendSliceAssumeCapacity(&RISCV64LibDirs); | ||
| 377 | triple_aliases.appendSliceAssumeCapacity(&RISCV64Triples); | ||
| 378 | biarch_libdirs.appendSliceAssumeCapacity(&RISCV32LibDirs); | ||
| 379 | biarch_triple_aliases.appendSliceAssumeCapacity(&RISCV32Triples); | ||
| 380 | }, | ||
| 381 | .sparc, .sparcel => { | ||
| 382 | lib_dirs.appendSliceAssumeCapacity(&SPARCv8LibDirs); | ||
| 383 | triple_aliases.appendSliceAssumeCapacity(&SPARCv8Triples); | ||
| 384 | biarch_libdirs.appendSliceAssumeCapacity(&SPARCv9LibDirs); | ||
| 385 | biarch_triple_aliases.appendSliceAssumeCapacity(&SPARCv9Triples); | ||
| 386 | }, | ||
| 387 | .sparc64 => { | ||
| 388 | lib_dirs.appendSliceAssumeCapacity(&SPARCv9LibDirs); | ||
| 389 | triple_aliases.appendSliceAssumeCapacity(&SPARCv9Triples); | ||
| 390 | biarch_libdirs.appendSliceAssumeCapacity(&SPARCv8LibDirs); | ||
| 391 | biarch_triple_aliases.appendSliceAssumeCapacity(&SPARCv8Triples); | ||
| 392 | }, | ||
| 393 | .s390x => { | ||
| 394 | lib_dirs.appendSliceAssumeCapacity(&SystemZLibDirs); | ||
| 395 | triple_aliases.appendSliceAssumeCapacity(&SystemZTriples); | ||
| 396 | }, | ||
| 397 | else => {}, | ||
| 398 | } | ||
| 399 | } | ||
| 400 | |||
| 401 | pub fn discover(self: *GCCDetector, tc: *Toolchain) !void { | ||
| 402 | var path_buf: [std.fs.MAX_PATH_BYTES]u8 = undefined; | ||
| 403 | var fib = std.heap.FixedBufferAllocator.init(&path_buf); | ||
| 404 | |||
| 405 | const target = tc.getTarget(); | ||
| 406 | const biarch_variant_target = if (target.ptrBitWidth() == 32) | ||
| 407 | target_util.get64BitArchVariant(target) | ||
| 408 | else | ||
| 409 | target_util.get32BitArchVariant(target); | ||
| 410 | |||
| 411 | var candidate_lib_dirs: PathPrefixes = .{}; | ||
| 412 | var candidate_triple_aliases: PathPrefixes = .{}; | ||
| 413 | var candidate_biarch_lib_dirs: PathPrefixes = .{}; | ||
| 414 | var candidate_biarch_triple_aliases: PathPrefixes = .{}; | ||
| 415 | try collectLibDirsAndTriples( | ||
| 416 | tc, | ||
| 417 | &candidate_lib_dirs, | ||
| 418 | &candidate_triple_aliases, | ||
| 419 | &candidate_biarch_lib_dirs, | ||
| 420 | &candidate_biarch_triple_aliases, | ||
| 421 | ); | ||
| 422 | |||
| 423 | var target_buf: [64]u8 = undefined; | ||
| 424 | const triple_str = target_util.toLLVMTriple(target, &target_buf); | ||
| 425 | candidate_triple_aliases.appendAssumeCapacity(triple_str); | ||
| 426 | |||
| 427 | // Also include the multiarch variant if it's different. | ||
| 428 | var biarch_buf: [64]u8 = undefined; | ||
| 429 | if (biarch_variant_target) |biarch_target| { | ||
| 430 | const biarch_triple_str = target_util.toLLVMTriple(biarch_target, &biarch_buf); | ||
| 431 | if (!std.mem.eql(u8, biarch_triple_str, triple_str)) { | ||
| 432 | candidate_triple_aliases.appendAssumeCapacity(biarch_triple_str); | ||
| 433 | } | ||
| 434 | } | ||
| 435 | |||
| 436 | var prefixes: PathPrefixes = .{}; | ||
| 437 | const gcc_toolchain_dir = gccToolchainDir(tc); | ||
| 438 | if (gcc_toolchain_dir.len != 0) { | ||
| 439 | const adjusted = if (gcc_toolchain_dir[gcc_toolchain_dir.len - 1] == '/') | ||
| 440 | gcc_toolchain_dir[0 .. gcc_toolchain_dir.len - 1] | ||
| 441 | else | ||
| 442 | gcc_toolchain_dir; | ||
| 443 | prefixes.appendAssumeCapacity(adjusted); | ||
| 444 | } else { | ||
| 445 | const sysroot = tc.getSysroot(); | ||
| 446 | if (sysroot.len > 0) { | ||
| 447 | prefixes.appendAssumeCapacity(sysroot); | ||
| 448 | try addDefaultGCCPrefixes(&prefixes, tc); | ||
| 449 | } | ||
| 450 | |||
| 451 | if (sysroot.len == 0) { | ||
| 452 | try addDefaultGCCPrefixes(&prefixes, tc); | ||
| 453 | } | ||
| 454 | // TODO: Special-case handling for Gentoo | ||
| 455 | } | ||
| 456 | |||
| 457 | const v0 = GCCVersion.parse("0.0.0"); | ||
| 458 | for (prefixes.constSlice()) |prefix| { | ||
| 459 | if (!tc.filesystem.exists(prefix)) continue; | ||
| 460 | |||
| 461 | for (candidate_lib_dirs.constSlice()) |suffix| { | ||
| 462 | defer fib.reset(); | ||
| 463 | const lib_dir = std.fs.path.join(fib.allocator(), &.{ prefix, suffix }) catch continue; | ||
| 464 | if (!tc.filesystem.exists(lib_dir)) continue; | ||
| 465 | |||
| 466 | const gcc_dir_exists = tc.filesystem.joinedExists(&.{ lib_dir, "/gcc" }); | ||
| 467 | const gcc_cross_dir_exists = tc.filesystem.joinedExists(&.{ lib_dir, "/gcc-cross" }); | ||
| 468 | |||
| 469 | try self.scanLibDirForGCCTriple(tc, target, lib_dir, triple_str, false, gcc_dir_exists, gcc_cross_dir_exists); | ||
| 470 | for (candidate_triple_aliases.constSlice()) |candidate| { | ||
| 471 | try self.scanLibDirForGCCTriple(tc, target, lib_dir, candidate, false, gcc_dir_exists, gcc_cross_dir_exists); | ||
| 472 | } | ||
| 473 | } | ||
| 474 | for (candidate_biarch_lib_dirs.constSlice()) |suffix| { | ||
| 475 | const lib_dir = std.fs.path.join(fib.allocator(), &.{ prefix, suffix }) catch continue; | ||
| 476 | if (!tc.filesystem.exists(lib_dir)) continue; | ||
| 477 | |||
| 478 | const gcc_dir_exists = tc.filesystem.joinedExists(&.{ lib_dir, "/gcc" }); | ||
| 479 | const gcc_cross_dir_exists = tc.filesystem.joinedExists(&.{ lib_dir, "/gcc-cross" }); | ||
| 480 | for (candidate_biarch_triple_aliases.constSlice()) |candidate| { | ||
| 481 | try self.scanLibDirForGCCTriple(tc, target, lib_dir, candidate, true, gcc_dir_exists, gcc_cross_dir_exists); | ||
| 482 | } | ||
| 483 | } | ||
| 484 | if (self.version.order(v0) == .gt) break; | ||
| 485 | } | ||
| 486 | } | ||
| 487 | |||
| 488 | fn findBiarchMultilibs( | ||
| 489 | tc: *const Toolchain, | ||
| 490 | result: *Multilib.Detected, | ||
| 491 | target: std.Target, | ||
| 492 | path: [2][]const u8, | ||
| 493 | needs_biarch_suffix: bool, | ||
| 494 | ) !bool { | ||
| 495 | const suff64 = if (target.os.tag == .solaris) switch (target.cpu.arch) { | ||
| 496 | .x86, .x86_64 => "/amd64", | ||
| 497 | .sparc => "/sparcv9", | ||
| 498 | else => "/64", | ||
| 499 | } else "/64"; | ||
| 500 | |||
| 501 | const alt_64 = Multilib.init(suff64, suff64, &.{ "-m32", "+m64", "-mx32" }); | ||
| 502 | const alt_32 = Multilib.init("/32", "/32", &.{ "+m32", "-m64", "-mx32" }); | ||
| 503 | const alt_x32 = Multilib.init("/x32", "/x32", &.{ "-m32", "-m64", "+mx32" }); | ||
| 504 | |||
| 505 | const multilib_filter = Multilib.Filter{ | ||
| 506 | .base = path, | ||
| 507 | .file = if (target.os.tag == .elfiamcu) "libgcc.a" else "crtbegin.o", | ||
| 508 | }; | ||
| 509 | |||
| 510 | const Want = enum { | ||
| 511 | want32, | ||
| 512 | want64, | ||
| 513 | wantx32, | ||
| 514 | }; | ||
| 515 | const is_x32 = target.abi == .gnux32 or target.abi == .muslx32; | ||
| 516 | const target_ptr_width = target.ptrBitWidth(); | ||
| 517 | const want: Want = if (target_ptr_width == 32 and multilib_filter.exists(alt_32, tc.filesystem)) | ||
| 518 | .want64 | ||
| 519 | else if (target_ptr_width == 64 and is_x32 and multilib_filter.exists(alt_x32, tc.filesystem)) | ||
| 520 | .want64 | ||
| 521 | else if (target_ptr_width == 64 and !is_x32 and multilib_filter.exists(alt_64, tc.filesystem)) | ||
| 522 | .want32 | ||
| 523 | else if (target_ptr_width == 32) | ||
| 524 | if (needs_biarch_suffix) .want64 else .want32 | ||
| 525 | else if (is_x32) | ||
| 526 | if (needs_biarch_suffix) .want64 else .wantx32 | ||
| 527 | else if (needs_biarch_suffix) .want32 else .want64; | ||
| 528 | |||
| 529 | const default = switch (want) { | ||
| 530 | .want32 => Multilib.init("", "", &.{ "+m32", "-m64", "-mx32" }), | ||
| 531 | .want64 => Multilib.init("", "", &.{ "-m32", "+m64", "-mx32" }), | ||
| 532 | .wantx32 => Multilib.init("", "", &.{ "-m32", "-m64", "+mx32" }), | ||
| 533 | }; | ||
| 534 | result.multilibs.appendSliceAssumeCapacity(&.{ | ||
| 535 | default, | ||
| 536 | alt_64, | ||
| 537 | alt_32, | ||
| 538 | alt_x32, | ||
| 539 | }); | ||
| 540 | result.filter(multilib_filter, tc.filesystem); | ||
| 541 | var flags: Multilib.Flags = .{}; | ||
| 542 | flags.appendAssumeCapacity(if (target_ptr_width == 64 and !is_x32) "+m64" else "-m64"); | ||
| 543 | flags.appendAssumeCapacity(if (target_ptr_width == 32) "+m32" else "-m32"); | ||
| 544 | flags.appendAssumeCapacity(if (target_ptr_width == 64 and is_x32) "+mx32" else "-mx32"); | ||
| 545 | |||
| 546 | return result.select(flags); | ||
| 547 | } | ||
| 548 | |||
| 549 | fn scanGCCForMultilibs( | ||
| 550 | self: *GCCDetector, | ||
| 551 | tc: *const Toolchain, | ||
| 552 | target: std.Target, | ||
| 553 | path: [2][]const u8, | ||
| 554 | needs_biarch_suffix: bool, | ||
| 555 | ) !bool { | ||
| 556 | var detected: Multilib.Detected = .{}; | ||
| 557 | if (target.cpu.arch == .csky) { | ||
| 558 | // TODO | ||
| 559 | } else if (target.cpu.arch.isMIPS()) { | ||
| 560 | // TODO | ||
| 561 | } else if (target.cpu.arch.isRISCV()) { | ||
| 562 | // TODO | ||
| 563 | } else if (target.cpu.arch == .msp430) { | ||
| 564 | // TODO | ||
| 565 | } else if (target.cpu.arch == .avr) { | ||
| 566 | // No multilibs | ||
| 567 | } else if (!try findBiarchMultilibs(tc, &detected, target, path, needs_biarch_suffix)) { | ||
| 568 | return false; | ||
| 569 | } | ||
| 570 | self.selected = detected.selected; | ||
| 571 | self.biarch_sibling = detected.biarch_sibling; | ||
| 572 | return true; | ||
| 573 | } | ||
| 574 | |||
| 575 | fn scanLibDirForGCCTriple( | ||
| 576 | self: *GCCDetector, | ||
| 577 | tc: *const Toolchain, | ||
| 578 | target: std.Target, | ||
| 579 | lib_dir: []const u8, | ||
| 580 | candidate_triple: []const u8, | ||
| 581 | needs_biarch_suffix: bool, | ||
| 582 | gcc_dir_exists: bool, | ||
| 583 | gcc_cross_dir_exists: bool, | ||
| 584 | ) !void { | ||
| 585 | var path_buf: [std.fs.MAX_PATH_BYTES]u8 = undefined; | ||
| 586 | var fib = std.heap.FixedBufferAllocator.init(&path_buf); | ||
| 587 | for (0..2) |i| { | ||
| 588 | if (i == 0 and !gcc_dir_exists) continue; | ||
| 589 | if (i == 1 and !gcc_cross_dir_exists) continue; | ||
| 590 | defer fib.reset(); | ||
| 591 | |||
| 592 | const base: []const u8 = if (i == 0) "gcc" else "gcc-cross"; | ||
| 593 | var lib_suffix_buf: [64]u8 = undefined; | ||
| 594 | var suffix_buf_fib = std.heap.FixedBufferAllocator.init(&lib_suffix_buf); | ||
| 595 | const lib_suffix = std.fs.path.join(suffix_buf_fib.allocator(), &.{ base, candidate_triple }) catch continue; | ||
| 596 | |||
| 597 | const dir_name = std.fs.path.join(fib.allocator(), &.{ lib_dir, lib_suffix }) catch continue; | ||
| 598 | var parent_dir = tc.filesystem.openIterableDir(dir_name) catch continue; | ||
| 599 | defer parent_dir.close(); | ||
| 600 | |||
| 601 | var it = parent_dir.iterate(); | ||
| 602 | while (it.next() catch continue) |entry| { | ||
| 603 | if (entry.kind != .directory) continue; | ||
| 604 | |||
| 605 | const version_text = entry.name; | ||
| 606 | const candidate_version = GCCVersion.parse(version_text); | ||
| 607 | if (candidate_version.major != -1) { | ||
| 608 | // TODO: cache path so we're not repeatedly scanning | ||
| 609 | } | ||
| 610 | if (candidate_version.isLessThan(4, 1, 1, "")) continue; | ||
| 611 | switch (candidate_version.order(self.version)) { | ||
| 612 | .lt, .eq => continue, | ||
| 613 | .gt => {}, | ||
| 614 | } | ||
| 615 | |||
| 616 | if (!try self.scanGCCForMultilibs(tc, target, .{ dir_name, version_text }, needs_biarch_suffix)) continue; | ||
| 617 | |||
| 618 | self.version = candidate_version; | ||
| 619 | self.gcc_triple = try tc.arena.dupe(u8, candidate_triple); | ||
| 620 | self.install_path = try std.fs.path.join(tc.arena, &.{ lib_dir, lib_suffix, version_text }); | ||
| 621 | self.parent_lib_path = try std.fs.path.join(tc.arena, &.{ self.install_path, "..", "..", ".." }); | ||
| 622 | self.is_valid = true; | ||
| 623 | } | ||
| 624 | } | ||
| 625 | } | ||
| 626 | |||
| 627 | fn gccToolchainDir(tc: *const Toolchain) []const u8 { | ||
| 628 | const sysroot = tc.getSysroot(); | ||
| 629 | if (sysroot.len != 0) return ""; | ||
| 630 | return system_defaults.gcc_install_prefix; | ||
| 631 | } | ||
deps/aro/aro/Driver/GCCVersion.zig created+122| ... | @@ -0,0 +1,122 @@ | ||
| 1 | const std = @import("std"); | ||
| 2 | const mem = std.mem; | ||
| 3 | const Order = std.math.Order; | ||
| 4 | |||
| 5 | const GCCVersion = @This(); | ||
| 6 | |||
| 7 | /// Raw version number text | ||
| 8 | raw: []const u8 = "", | ||
| 9 | |||
| 10 | /// -1 indicates not present | ||
| 11 | major: i32 = -1, | ||
| 12 | /// -1 indicates not present | ||
| 13 | minor: i32 = -1, | ||
| 14 | /// -1 indicates not present | ||
| 15 | patch: i32 = -1, | ||
| 16 | |||
| 17 | /// Text of parsed major version number | ||
| 18 | major_str: []const u8 = "", | ||
| 19 | /// Text of parsed major + minor version number | ||
| 20 | minor_str: []const u8 = "", | ||
| 21 | |||
| 22 | /// Patch number suffix | ||
| 23 | suffix: []const u8 = "", | ||
| 24 | |||
| 25 | /// This orders versions according to the preferred usage order, not a notion of release-time ordering | ||
| 26 | /// Higher version numbers are preferred, but nonexistent minor/patch/suffix is preferred to one that does exist | ||
| 27 | /// e.g. `4.1` is preferred over `4.0` but `4` is preferred over both `4.0` and `4.1` | ||
| 28 | pub fn isLessThan(self: GCCVersion, rhs_major: i32, rhs_minor: i32, rhs_patch: i32, rhs_suffix: []const u8) bool { | ||
| 29 | if (self.major != rhs_major) { | ||
| 30 | return self.major < rhs_major; | ||
| 31 | } | ||
| 32 | if (self.minor != rhs_minor) { | ||
| 33 | if (rhs_minor == -1) return true; | ||
| 34 | if (self.minor == -1) return false; | ||
| 35 | return self.minor < rhs_minor; | ||
| 36 | } | ||
| 37 | if (self.patch != rhs_patch) { | ||
| 38 | if (rhs_patch == -1) return true; | ||
| 39 | if (self.patch == -1) return false; | ||
| 40 | return self.patch < rhs_patch; | ||
| 41 | } | ||
| 42 | if (!mem.eql(u8, self.suffix, rhs_suffix)) { | ||
| 43 | if (rhs_suffix.len == 0) return true; | ||
| 44 | if (self.suffix.len == 0) return false; | ||
| 45 | return switch (std.mem.order(u8, self.suffix, rhs_suffix)) { | ||
| 46 | .lt => true, | ||
| 47 | .eq => unreachable, | ||
| 48 | .gt => false, | ||
| 49 | }; | ||
| 50 | } | ||
| 51 | return false; | ||
| 52 | } | ||
| 53 | |||
| 54 | /// Strings in the returned GCCVersion struct have the same lifetime as `text` | ||
| 55 | pub fn parse(text: []const u8) GCCVersion { | ||
| 56 | const bad = GCCVersion{ .major = -1 }; | ||
| 57 | var good = bad; | ||
| 58 | |||
| 59 | var it = mem.splitScalar(u8, text, '.'); | ||
| 60 | const first = it.next().?; | ||
| 61 | const second = it.next() orelse ""; | ||
| 62 | const rest = it.next() orelse ""; | ||
| 63 | |||
| 64 | good.major = std.fmt.parseInt(i32, first, 10) catch return bad; | ||
| 65 | if (good.major < 0) return bad; | ||
| 66 | good.major_str = first; | ||
| 67 | |||
| 68 | if (second.len == 0) return good; | ||
| 69 | var minor_str = second; | ||
| 70 | |||
| 71 | if (rest.len == 0) { | ||
| 72 | const end = mem.indexOfNone(u8, minor_str, "0123456789") orelse minor_str.len; | ||
| 73 | if (end > 0) { | ||
| 74 | good.suffix = minor_str[end..]; | ||
| 75 | minor_str = minor_str[0..end]; | ||
| 76 | } | ||
| 77 | } | ||
| 78 | good.minor = std.fmt.parseInt(i32, minor_str, 10) catch return bad; | ||
| 79 | if (good.minor < 0) return bad; | ||
| 80 | good.minor_str = minor_str; | ||
| 81 | |||
| 82 | if (rest.len > 0) { | ||
| 83 | const end = mem.indexOfNone(u8, rest, "0123456789") orelse rest.len; | ||
| 84 | if (end > 0) { | ||
| 85 | const patch_num_text = rest[0..end]; | ||
| 86 | good.patch = std.fmt.parseInt(i32, patch_num_text, 10) catch return bad; | ||
| 87 | if (good.patch < 0) return bad; | ||
| 88 | good.suffix = rest[end..]; | ||
| 89 | } | ||
| 90 | } | ||
| 91 | |||
| 92 | return good; | ||
| 93 | } | ||
| 94 | |||
| 95 | pub fn order(a: GCCVersion, b: GCCVersion) Order { | ||
| 96 | if (a.isLessThan(b.major, b.minor, b.patch, b.suffix)) return .lt; | ||
| 97 | if (b.isLessThan(a.major, a.minor, a.patch, a.suffix)) return .gt; | ||
| 98 | return .eq; | ||
| 99 | } | ||
| 100 | |||
| 101 | test parse { | ||
| 102 | const versions = [10]GCCVersion{ | ||
| 103 | parse("5"), | ||
| 104 | parse("4"), | ||
| 105 | parse("4.2"), | ||
| 106 | parse("4.0"), | ||
| 107 | parse("4.0-patched"), | ||
| 108 | parse("4.0.2"), | ||
| 109 | parse("4.0.1"), | ||
| 110 | parse("4.0.1-patched"), | ||
| 111 | parse("4.0.0"), | ||
| 112 | parse("4.0.0-patched"), | ||
| 113 | }; | ||
| 114 | |||
| 115 | for (versions[0 .. versions.len - 1], versions[1..versions.len]) |first, second| { | ||
| 116 | try std.testing.expectEqual(Order.eq, first.order(first)); | ||
| 117 | try std.testing.expectEqual(Order.gt, first.order(second)); | ||
| 118 | try std.testing.expectEqual(Order.lt, second.order(first)); | ||
| 119 | } | ||
| 120 | const last = versions[versions.len - 1]; | ||
| 121 | try std.testing.expectEqual(Order.eq, last.order(last)); | ||
| 122 | } | ||
deps/aro/aro/Driver/Multilib.zig created+71| ... | @@ -0,0 +1,71 @@ | ||
| 1 | const std = @import("std"); | ||
| 2 | const Filesystem = @import("Filesystem.zig").Filesystem; | ||
| 3 | |||
| 4 | pub const Flags = std.BoundedArray([]const u8, 6); | ||
| 5 | |||
| 6 | /// Large enough for GCCDetector for Linux; may need to be increased to support other toolchains. | ||
| 7 | const max_multilibs = 4; | ||
| 8 | |||
| 9 | const MultilibArray = std.BoundedArray(Multilib, max_multilibs); | ||
| 10 | |||
| 11 | pub const Detected = struct { | ||
| 12 | multilibs: MultilibArray = .{}, | ||
| 13 | selected: Multilib = .{}, | ||
| 14 | biarch_sibling: ?Multilib = null, | ||
| 15 | |||
| 16 | pub fn filter(self: *Detected, multilib_filter: Filter, fs: Filesystem) void { | ||
| 17 | var found_count: usize = 0; | ||
| 18 | for (self.multilibs.constSlice()) |multilib| { | ||
| 19 | if (multilib_filter.exists(multilib, fs)) { | ||
| 20 | self.multilibs.set(found_count, multilib); | ||
| 21 | found_count += 1; | ||
| 22 | } | ||
| 23 | } | ||
| 24 | self.multilibs.resize(found_count) catch unreachable; | ||
| 25 | } | ||
| 26 | |||
| 27 | pub fn select(self: *Detected, flags: Flags) !bool { | ||
| 28 | var filtered: MultilibArray = .{}; | ||
| 29 | for (self.multilibs.constSlice()) |multilib| { | ||
| 30 | for (multilib.flags.constSlice()) |multilib_flag| { | ||
| 31 | const matched = for (flags.constSlice()) |arg_flag| { | ||
| 32 | if (std.mem.eql(u8, arg_flag[1..], multilib_flag[1..])) break arg_flag; | ||
| 33 | } else multilib_flag; | ||
| 34 | if (matched[0] != multilib_flag[0]) break; | ||
| 35 | } else { | ||
| 36 | filtered.appendAssumeCapacity(multilib); | ||
| 37 | } | ||
| 38 | } | ||
| 39 | if (filtered.len == 0) return false; | ||
| 40 | if (filtered.len == 1) { | ||
| 41 | self.selected = filtered.get(0); | ||
| 42 | return true; | ||
| 43 | } | ||
| 44 | return error.TooManyMultilibs; | ||
| 45 | } | ||
| 46 | }; | ||
| 47 | |||
| 48 | pub const Filter = struct { | ||
| 49 | base: [2][]const u8, | ||
| 50 | file: []const u8, | ||
| 51 | pub fn exists(self: Filter, m: Multilib, fs: Filesystem) bool { | ||
| 52 | return fs.joinedExists(&.{ self.base[0], self.base[1], m.gcc_suffix, self.file }); | ||
| 53 | } | ||
| 54 | }; | ||
| 55 | |||
| 56 | const Multilib = @This(); | ||
| 57 | |||
| 58 | gcc_suffix: []const u8 = "", | ||
| 59 | os_suffix: []const u8 = "", | ||
| 60 | include_suffix: []const u8 = "", | ||
| 61 | flags: Flags = .{}, | ||
| 62 | priority: u32 = 0, | ||
| 63 | |||
| 64 | pub fn init(gcc_suffix: []const u8, os_suffix: []const u8, flags: []const []const u8) Multilib { | ||
| 65 | var self: Multilib = .{ | ||
| 66 | .gcc_suffix = gcc_suffix, | ||
| 67 | .os_suffix = os_suffix, | ||
| 68 | }; | ||
| 69 | self.flags.appendSliceAssumeCapacity(flags); | ||
| 70 | return self; | ||
| 71 | } | ||
deps/aro/aro/InitList.zig created+153| ... | @@ -0,0 +1,153 @@ | ||
| 1 | //! Sparsely populated list of used indexes. | ||
| 2 | //! Used for detecting duplicate initializers. | ||
| 3 | const std = @import("std"); | ||
| 4 | const Allocator = std.mem.Allocator; | ||
| 5 | const testing = std.testing; | ||
| 6 | const Tree = @import("Tree.zig"); | ||
| 7 | const Token = Tree.Token; | ||
| 8 | const TokenIndex = Tree.TokenIndex; | ||
| 9 | const NodeIndex = Tree.NodeIndex; | ||
| 10 | const Type = @import("Type.zig"); | ||
| 11 | const Diagnostics = @import("Diagnostics.zig"); | ||
| 12 | const NodeList = std.ArrayList(NodeIndex); | ||
| 13 | const Parser = @import("Parser.zig"); | ||
| 14 | |||
| 15 | const Item = struct { | ||
| 16 | list: InitList = .{}, | ||
| 17 | index: u64, | ||
| 18 | |||
| 19 | fn order(_: void, a: Item, b: Item) std.math.Order { | ||
| 20 | return std.math.order(a.index, b.index); | ||
| 21 | } | ||
| 22 | }; | ||
| 23 | |||
| 24 | const InitList = @This(); | ||
| 25 | |||
| 26 | list: std.ArrayListUnmanaged(Item) = .{}, | ||
| 27 | node: NodeIndex = .none, | ||
| 28 | tok: TokenIndex = 0, | ||
| 29 | |||
| 30 | /// Deinitialize freeing all memory. | ||
| 31 | pub fn deinit(il: *InitList, gpa: Allocator) void { | ||
| 32 | for (il.list.items) |*item| item.list.deinit(gpa); | ||
| 33 | il.list.deinit(gpa); | ||
| 34 | il.* = undefined; | ||
| 35 | } | ||
| 36 | |||
| 37 | /// Insert initializer at index, returning previous entry if one exists. | ||
| 38 | pub fn put(il: *InitList, gpa: Allocator, index: usize, node: NodeIndex, tok: TokenIndex) !?TokenIndex { | ||
| 39 | const items = il.list.items; | ||
| 40 | var left: usize = 0; | ||
| 41 | var right: usize = items.len; | ||
| 42 | |||
| 43 | // Append new value to empty list | ||
| 44 | if (left == right) { | ||
| 45 | const item = try il.list.addOne(gpa); | ||
| 46 | item.* = .{ | ||
| 47 | .list = .{ .node = node, .tok = tok }, | ||
| 48 | .index = index, | ||
| 49 | }; | ||
| 50 | return null; | ||
| 51 | } | ||
| 52 | |||
| 53 | while (left < right) { | ||
| 54 | // Avoid overflowing in the midpoint calculation | ||
| 55 | const mid = left + (right - left) / 2; | ||
| 56 | // Compare the key with the midpoint element | ||
| 57 | switch (std.math.order(index, items[mid].index)) { | ||
| 58 | .eq => { | ||
| 59 | // Replace previous entry. | ||
| 60 | const prev = items[mid].list.tok; | ||
| 61 | items[mid].list.deinit(gpa); | ||
| 62 | items[mid] = .{ | ||
| 63 | .list = .{ .node = node, .tok = tok }, | ||
| 64 | .index = index, | ||
| 65 | }; | ||
| 66 | return prev; | ||
| 67 | }, | ||
| 68 | .gt => left = mid + 1, | ||
| 69 | .lt => right = mid, | ||
| 70 | } | ||
| 71 | } | ||
| 72 | |||
| 73 | // Insert a new value into a sorted position. | ||
| 74 | try il.list.insert(gpa, left, .{ | ||
| 75 | .list = .{ .node = node, .tok = tok }, | ||
| 76 | .index = index, | ||
| 77 | }); | ||
| 78 | return null; | ||
| 79 | } | ||
| 80 | |||
| 81 | /// Find item at index, create new if one does not exist. | ||
| 82 | pub fn find(il: *InitList, gpa: Allocator, index: u64) !*InitList { | ||
| 83 | const items = il.list.items; | ||
| 84 | var left: usize = 0; | ||
| 85 | var right: usize = items.len; | ||
| 86 | |||
| 87 | // Append new value to empty list | ||
| 88 | if (left == right) { | ||
| 89 | const item = try il.list.addOne(gpa); | ||
| 90 | item.* = .{ | ||
| 91 | .list = .{ .node = .none, .tok = 0 }, | ||
| 92 | .index = index, | ||
| 93 | }; | ||
| 94 | return &item.list; | ||
| 95 | } | ||
| 96 | |||
| 97 | while (left < right) { | ||
| 98 | // Avoid overflowing in the midpoint calculation | ||
| 99 | const mid = left + (right - left) / 2; | ||
| 100 | // Compare the key with the midpoint element | ||
| 101 | switch (std.math.order(index, items[mid].index)) { | ||
| 102 | .eq => return &items[mid].list, | ||
| 103 | .gt => left = mid + 1, | ||
| 104 | .lt => right = mid, | ||
| 105 | } | ||
| 106 | } | ||
| 107 | |||
| 108 | // Insert a new value into a sorted position. | ||
| 109 | try il.list.insert(gpa, left, .{ | ||
| 110 | .list = .{ .node = .none, .tok = 0 }, | ||
| 111 | .index = index, | ||
| 112 | }); | ||
| 113 | return &il.list.items[left].list; | ||
| 114 | } | ||
| 115 | |||
| 116 | test "basic usage" { | ||
| 117 | const gpa = testing.allocator; | ||
| 118 | var il: InitList = .{}; | ||
| 119 | defer il.deinit(gpa); | ||
| 120 | |||
| 121 | { | ||
| 122 | var i: usize = 0; | ||
| 123 | while (i < 5) : (i += 1) { | ||
| 124 | const prev = try il.put(gpa, i, .none, 0); | ||
| 125 | try testing.expect(prev == null); | ||
| 126 | } | ||
| 127 | } | ||
| 128 | |||
| 129 | { | ||
| 130 | const failing = testing.failing_allocator; | ||
| 131 | var i: usize = 0; | ||
| 132 | while (i < 5) : (i += 1) { | ||
| 133 | _ = try il.find(failing, i); | ||
| 134 | } | ||
| 135 | } | ||
| 136 | |||
| 137 | { | ||
| 138 | var item = try il.find(gpa, 0); | ||
| 139 | var i: usize = 1; | ||
| 140 | while (i < 5) : (i += 1) { | ||
| 141 | item = try item.find(gpa, i); | ||
| 142 | } | ||
| 143 | } | ||
| 144 | |||
| 145 | { | ||
| 146 | const failing = testing.failing_allocator; | ||
| 147 | var item = try il.find(failing, 0); | ||
| 148 | var i: usize = 1; | ||
| 149 | while (i < 5) : (i += 1) { | ||
| 150 | item = try item.find(failing, i); | ||
| 151 | } | ||
| 152 | } | ||
| 153 | } | ||
deps/aro/aro/LangOpts.zig created+171| ... | @@ -0,0 +1,171 @@ | ||
| 1 | const std = @import("std"); | ||
| 2 | const DiagnosticTag = @import("Diagnostics.zig").Tag; | ||
| 3 | const char_info = @import("char_info.zig"); | ||
| 4 | |||
| 5 | pub const Compiler = enum { | ||
| 6 | clang, | ||
| 7 | gcc, | ||
| 8 | msvc, | ||
| 9 | }; | ||
| 10 | |||
| 11 | /// The floating-point evaluation method for intermediate results within a single expression | ||
| 12 | pub const FPEvalMethod = enum(i8) { | ||
| 13 | /// The evaluation method cannot be determined or is inconsistent for this target. | ||
| 14 | indeterminate = -1, | ||
| 15 | /// Use the type declared in the source | ||
| 16 | source = 0, | ||
| 17 | /// Use double as the floating-point evaluation method for all float expressions narrower than double. | ||
| 18 | double = 1, | ||
| 19 | /// Use long double as the floating-point evaluation method for all float expressions narrower than long double. | ||
| 20 | extended = 2, | ||
| 21 | }; | ||
| 22 | |||
| 23 | pub const Standard = enum { | ||
| 24 | /// ISO C 1990 | ||
| 25 | c89, | ||
| 26 | /// ISO C 1990 with amendment 1 | ||
| 27 | iso9899, | ||
| 28 | /// ISO C 1990 with GNU extensions | ||
| 29 | gnu89, | ||
| 30 | /// ISO C 1999 | ||
| 31 | c99, | ||
| 32 | /// ISO C 1999 with GNU extensions | ||
| 33 | gnu99, | ||
| 34 | /// ISO C 2011 | ||
| 35 | c11, | ||
| 36 | /// ISO C 2011 with GNU extensions | ||
| 37 | gnu11, | ||
| 38 | /// ISO C 2017 | ||
| 39 | c17, | ||
| 40 | /// Default value if nothing specified; adds the GNU keywords to | ||
| 41 | /// C17 but does not suppress warnings about using GNU extensions | ||
| 42 | default, | ||
| 43 | /// ISO C 2017 with GNU extensions | ||
| 44 | gnu17, | ||
| 45 | /// Working Draft for ISO C23 | ||
| 46 | c23, | ||
| 47 | /// Working Draft for ISO C23 with GNU extensions | ||
| 48 | gnu23, | ||
| 49 | |||
| 50 | const NameMap = std.ComptimeStringMap(Standard, .{ | ||
| 51 | .{ "c89", .c89 }, .{ "c90", .c89 }, .{ "iso9899:1990", .c89 }, | ||
| 52 | .{ "iso9899:199409", .iso9899 }, .{ "gnu89", .gnu89 }, .{ "gnu90", .gnu89 }, | ||
| 53 | .{ "c99", .c99 }, .{ "iso9899:1999", .c99 }, .{ "c9x", .c99 }, | ||
| 54 | .{ "iso9899:199x", .c99 }, .{ "gnu99", .gnu99 }, .{ "gnu9x", .gnu99 }, | ||
| 55 | .{ "c11", .c11 }, .{ "iso9899:2011", .c11 }, .{ "c1x", .c11 }, | ||
| 56 | .{ "iso9899:201x", .c11 }, .{ "gnu11", .gnu11 }, .{ "c17", .c17 }, | ||
| 57 | .{ "iso9899:2017", .c17 }, .{ "c18", .c17 }, .{ "iso9899:2018", .c17 }, | ||
| 58 | .{ "gnu17", .gnu17 }, .{ "gnu18", .gnu17 }, .{ "c23", .c23 }, | ||
| 59 | .{ "gnu23", .gnu23 }, .{ "c2x", .c23 }, .{ "gnu2x", .gnu23 }, | ||
| 60 | }); | ||
| 61 | |||
| 62 | pub fn atLeast(self: Standard, other: Standard) bool { | ||
| 63 | return @intFromEnum(self) >= @intFromEnum(other); | ||
| 64 | } | ||
| 65 | |||
| 66 | pub fn isGNU(standard: Standard) bool { | ||
| 67 | return switch (standard) { | ||
| 68 | .gnu89, .gnu99, .gnu11, .default, .gnu17, .gnu23 => true, | ||
| 69 | else => false, | ||
| 70 | }; | ||
| 71 | } | ||
| 72 | |||
| 73 | pub fn isExplicitGNU(standard: Standard) bool { | ||
| 74 | return standard.isGNU() and standard != .default; | ||
| 75 | } | ||
| 76 | |||
| 77 | /// Value reported by __STDC_VERSION__ macro | ||
| 78 | pub fn StdCVersionMacro(standard: Standard) ?[]const u8 { | ||
| 79 | return switch (standard) { | ||
| 80 | .c89, .gnu89 => null, | ||
| 81 | .iso9899 => "199409L", | ||
| 82 | .c99, .gnu99 => "199901L", | ||
| 83 | .c11, .gnu11 => "201112L", | ||
| 84 | .default, .c17, .gnu17 => "201710L", | ||
| 85 | .c23, .gnu23 => "202311L", | ||
| 86 | }; | ||
| 87 | } | ||
| 88 | |||
| 89 | pub fn codepointAllowedInIdentifier(standard: Standard, codepoint: u21, is_start: bool) bool { | ||
| 90 | if (is_start) { | ||
| 91 | return if (standard.atLeast(.c23)) | ||
| 92 | char_info.isXidStart(codepoint) | ||
| 93 | else if (standard.atLeast(.c11)) | ||
| 94 | char_info.isC11IdChar(codepoint) and !char_info.isC11DisallowedInitialIdChar(codepoint) | ||
| 95 | else | ||
| 96 | char_info.isC99IdChar(codepoint) and !char_info.isC99DisallowedInitialIDChar(codepoint); | ||
| 97 | } else { | ||
| 98 | return if (standard.atLeast(.c23)) | ||
| 99 | char_info.isXidContinue(codepoint) | ||
| 100 | else if (standard.atLeast(.c11)) | ||
| 101 | char_info.isC11IdChar(codepoint) | ||
| 102 | else | ||
| 103 | char_info.isC99IdChar(codepoint); | ||
| 104 | } | ||
| 105 | } | ||
| 106 | }; | ||
| 107 | |||
| 108 | const LangOpts = @This(); | ||
| 109 | |||
| 110 | emulate: Compiler = .clang, | ||
| 111 | standard: Standard = .default, | ||
| 112 | /// -fshort-enums option, makes enums only take up as much space as they need to hold all the values. | ||
| 113 | short_enums: bool = false, | ||
| 114 | dollars_in_identifiers: bool = true, | ||
| 115 | declspec_attrs: bool = false, | ||
| 116 | ms_extensions: bool = false, | ||
| 117 | /// true or false if digraph support explicitly enabled/disabled with -fdigraphs/-fno-digraphs | ||
| 118 | digraphs: ?bool = null, | ||
| 119 | /// If set, use the native half type instead of promoting to float | ||
| 120 | use_native_half_type: bool = false, | ||
| 121 | /// If set, function arguments and return values may be of type __fp16 even if there is no standard ABI for it | ||
| 122 | allow_half_args_and_returns: bool = false, | ||
| 123 | /// null indicates that the user did not select a value, use target to determine default | ||
| 124 | fp_eval_method: ?FPEvalMethod = null, | ||
| 125 | /// If set, use specified signedness for `char` instead of the target's default char signedness | ||
| 126 | char_signedness_override: ?std.builtin.Signedness = null, | ||
| 127 | /// If set, override the default availability of char8_t (by default, enabled in C23 and later; disabled otherwise) | ||
| 128 | has_char8_t_override: ?bool = null, | ||
| 129 | |||
| 130 | /// Whether to allow GNU-style inline assembly | ||
| 131 | gnu_asm: bool = true, | ||
| 132 | |||
| 133 | /// Preserve comments when preprocessing | ||
| 134 | preserve_comments: bool = false, | ||
| 135 | /// Preserve comments in macros when preprocessing | ||
| 136 | preserve_comments_in_macros: bool = false, | ||
| 137 | |||
| 138 | pub fn setStandard(self: *LangOpts, name: []const u8) error{InvalidStandard}!void { | ||
| 139 | self.standard = Standard.NameMap.get(name) orelse return error.InvalidStandard; | ||
| 140 | } | ||
| 141 | |||
| 142 | pub fn enableMSExtensions(self: *LangOpts) void { | ||
| 143 | self.declspec_attrs = true; | ||
| 144 | self.ms_extensions = true; | ||
| 145 | } | ||
| 146 | |||
| 147 | pub fn disableMSExtensions(self: *LangOpts) void { | ||
| 148 | self.declspec_attrs = false; | ||
| 149 | self.ms_extensions = true; | ||
| 150 | } | ||
| 151 | |||
| 152 | pub fn hasChar8_T(self: *const LangOpts) bool { | ||
| 153 | return self.has_char8_t_override orelse self.standard.atLeast(.c23); | ||
| 154 | } | ||
| 155 | |||
| 156 | pub fn hasDigraphs(self: *const LangOpts) bool { | ||
| 157 | return self.digraphs orelse self.standard.atLeast(.gnu89); | ||
| 158 | } | ||
| 159 | |||
| 160 | pub fn setEmulatedCompiler(self: *LangOpts, compiler: Compiler) void { | ||
| 161 | self.emulate = compiler; | ||
| 162 | if (compiler == .msvc) self.enableMSExtensions(); | ||
| 163 | } | ||
| 164 | |||
| 165 | pub fn setFpEvalMethod(self: *LangOpts, fp_eval_method: FPEvalMethod) void { | ||
| 166 | self.fp_eval_method = fp_eval_method; | ||
| 167 | } | ||
| 168 | |||
| 169 | pub fn setCharSignedness(self: *LangOpts, signedness: std.builtin.Signedness) void { | ||
| 170 | self.char_signedness_override = signedness; | ||
| 171 | } | ||
deps/aro/aro/Parser.zig created+8390| ... | @@ -0,0 +1,8390 @@ | ||
| 1 | const std = @import("std"); | ||
| 2 | const mem = std.mem; | ||
| 3 | const Allocator = mem.Allocator; | ||
| 4 | const assert = std.debug.assert; | ||
| 5 | const big = std.math.big; | ||
| 6 | const Compilation = @import("Compilation.zig"); | ||
| 7 | const Source = @import("Source.zig"); | ||
| 8 | const Tokenizer = @import("Tokenizer.zig"); | ||
| 9 | const Preprocessor = @import("Preprocessor.zig"); | ||
| 10 | const Tree = @import("Tree.zig"); | ||
| 11 | const Token = Tree.Token; | ||
| 12 | const TokenIndex = Tree.TokenIndex; | ||
| 13 | const NodeIndex = Tree.NodeIndex; | ||
| 14 | const Type = @import("Type.zig"); | ||
| 15 | const Diagnostics = @import("Diagnostics.zig"); | ||
| 16 | const NodeList = std.ArrayList(NodeIndex); | ||
| 17 | const InitList = @import("InitList.zig"); | ||
| 18 | const Attribute = @import("Attribute.zig"); | ||
| 19 | const char_info = @import("char_info.zig"); | ||
| 20 | const text_literal = @import("text_literal.zig"); | ||
| 21 | const Value = @import("Value.zig"); | ||
| 22 | const SymbolStack = @import("SymbolStack.zig"); | ||
| 23 | const Symbol = SymbolStack.Symbol; | ||
| 24 | const record_layout = @import("record_layout.zig"); | ||
| 25 | const StrInt = @import("StringInterner.zig"); | ||
| 26 | const StringId = StrInt.StringId; | ||
| 27 | const number_affixes = @import("number_affixes.zig"); | ||
| 28 | const NumberPrefix = number_affixes.Prefix; | ||
| 29 | const NumberSuffix = number_affixes.Suffix; | ||
| 30 | const Builtins = @import("Builtins.zig"); | ||
| 31 | const Builtin = Builtins.Builtin; | ||
| 32 | const target_util = @import("target.zig"); | ||
| 33 | |||
| 34 | const Switch = struct { | ||
| 35 | default: ?TokenIndex = null, | ||
| 36 | ranges: std.ArrayList(Range), | ||
| 37 | ty: Type, | ||
| 38 | comp: *Compilation, | ||
| 39 | |||
| 40 | const Range = struct { | ||
| 41 | first: Value, | ||
| 42 | last: Value, | ||
| 43 | tok: TokenIndex, | ||
| 44 | }; | ||
| 45 | |||
| 46 | fn add(self: *Switch, first: Value, last: Value, tok: TokenIndex) !?Range { | ||
| 47 | for (self.ranges.items) |range| { | ||
| 48 | if (last.compare(.gte, range.first, self.comp) and first.compare(.lte, range.last, self.comp)) { | ||
| 49 | return range; // They overlap. | ||
| 50 | } | ||
| 51 | } | ||
| 52 | try self.ranges.append(.{ | ||
| 53 | .first = first, | ||
| 54 | .last = last, | ||
| 55 | .tok = tok, | ||
| 56 | }); | ||
| 57 | return null; | ||
| 58 | } | ||
| 59 | }; | ||
| 60 | |||
| 61 | const Label = union(enum) { | ||
| 62 | unresolved_goto: TokenIndex, | ||
| 63 | label: TokenIndex, | ||
| 64 | }; | ||
| 65 | |||
| 66 | pub const Error = Compilation.Error || error{ParsingFailed}; | ||
| 67 | |||
| 68 | /// An attribute that has been parsed but not yet validated in its context | ||
| 69 | const TentativeAttribute = struct { | ||
| 70 | attr: Attribute, | ||
| 71 | tok: TokenIndex, | ||
| 72 | }; | ||
| 73 | |||
| 74 | /// How the parser handles const int decl references when it is expecting an integer | ||
| 75 | /// constant expression. | ||
| 76 | const ConstDeclFoldingMode = enum { | ||
| 77 | /// fold const decls as if they were literals | ||
| 78 | fold_const_decls, | ||
| 79 | /// fold const decls as if they were literals and issue GNU extension diagnostic | ||
| 80 | gnu_folding_extension, | ||
| 81 | /// fold const decls as if they were literals and issue VLA diagnostic | ||
| 82 | gnu_vla_folding_extension, | ||
| 83 | /// folding const decls is prohibited; return an unavailable value | ||
| 84 | no_const_decl_folding, | ||
| 85 | }; | ||
| 86 | |||
| 87 | const Parser = @This(); | ||
| 88 | |||
| 89 | // values from preprocessor | ||
| 90 | pp: *Preprocessor, | ||
| 91 | comp: *Compilation, | ||
| 92 | gpa: mem.Allocator, | ||
| 93 | tok_ids: []const Token.Id, | ||
| 94 | tok_i: TokenIndex = 0, | ||
| 95 | |||
| 96 | // values of the incomplete Tree | ||
| 97 | arena: Allocator, | ||
| 98 | nodes: Tree.Node.List = .{}, | ||
| 99 | data: NodeList, | ||
| 100 | value_map: Tree.ValueMap, | ||
| 101 | |||
| 102 | // buffers used during compilation | ||
| 103 | syms: SymbolStack = .{}, | ||
| 104 | strings: std.ArrayList(u8), | ||
| 105 | labels: std.ArrayList(Label), | ||
| 106 | list_buf: NodeList, | ||
| 107 | decl_buf: NodeList, | ||
| 108 | param_buf: std.ArrayList(Type.Func.Param), | ||
| 109 | enum_buf: std.ArrayList(Type.Enum.Field), | ||
| 110 | record_buf: std.ArrayList(Type.Record.Field), | ||
| 111 | attr_buf: std.MultiArrayList(TentativeAttribute) = .{}, | ||
| 112 | attr_application_buf: std.ArrayListUnmanaged(Attribute) = .{}, | ||
| 113 | field_attr_buf: std.ArrayList([]const Attribute), | ||
| 114 | /// type name -> variable name location for tentative definitions (top-level defs with thus-far-incomplete types) | ||
| 115 | /// e.g. `struct Foo bar;` where `struct Foo` is not defined yet. | ||
| 116 | /// The key is the StringId of `Foo` and the value is the TokenIndex of `bar` | ||
| 117 | /// Items are removed if the type is subsequently completed with a definition. | ||
| 118 | /// We only store the first tentative definition that uses a given type because this map is only used | ||
| 119 | /// for issuing an error message, and correcting the first error for a type will fix all of them for that type. | ||
| 120 | tentative_defs: std.AutoHashMapUnmanaged(StringId, TokenIndex) = .{}, | ||
| 121 | |||
| 122 | // configuration and miscellaneous info | ||
| 123 | no_eval: bool = false, | ||
| 124 | in_macro: bool = false, | ||
| 125 | extension_suppressed: bool = false, | ||
| 126 | contains_address_of_label: bool = false, | ||
| 127 | label_count: u32 = 0, | ||
| 128 | const_decl_folding: ConstDeclFoldingMode = .fold_const_decls, | ||
| 129 | /// location of first computed goto in function currently being parsed | ||
| 130 | /// if a computed goto is used, the function must contain an | ||
| 131 | /// address-of-label expression (tracked with contains_address_of_label) | ||
| 132 | computed_goto_tok: ?TokenIndex = null, | ||
| 133 | |||
| 134 | /// Various variables that are different for each function. | ||
| 135 | func: struct { | ||
| 136 | /// null if not in function, will always be plain func, var_args_func or old_style_func | ||
| 137 | ty: ?Type = null, | ||
| 138 | name: TokenIndex = 0, | ||
| 139 | ident: ?Result = null, | ||
| 140 | pretty_ident: ?Result = null, | ||
| 141 | } = .{}, | ||
| 142 | /// Various variables that are different for each record. | ||
| 143 | record: struct { | ||
| 144 | // invalid means we're not parsing a record | ||
| 145 | kind: Token.Id = .invalid, | ||
| 146 | flexible_field: ?TokenIndex = null, | ||
| 147 | start: usize = 0, | ||
| 148 | field_attr_start: usize = 0, | ||
| 149 | |||
| 150 | fn addField(r: @This(), p: *Parser, name: StringId, tok: TokenIndex) Error!void { | ||
| 151 | var i = p.record_members.items.len; | ||
| 152 | while (i > r.start) { | ||
| 153 | i -= 1; | ||
| 154 | if (p.record_members.items[i].name == name) { | ||
| 155 | try p.errStr(.duplicate_member, tok, p.tokSlice(tok)); | ||
| 156 | try p.errTok(.previous_definition, p.record_members.items[i].tok); | ||
| 157 | break; | ||
| 158 | } | ||
| 159 | } | ||
| 160 | try p.record_members.append(p.gpa, .{ .name = name, .tok = tok }); | ||
| 161 | } | ||
| 162 | |||
| 163 | fn addFieldsFromAnonymous(r: @This(), p: *Parser, ty: Type) Error!void { | ||
| 164 | for (ty.data.record.fields) |f| { | ||
| 165 | if (f.isAnonymousRecord()) { | ||
| 166 | try r.addFieldsFromAnonymous(p, f.ty.canonicalize(.standard)); | ||
| 167 | } else if (f.name_tok != 0) { | ||
| 168 | try r.addField(p, f.name, f.name_tok); | ||
| 169 | } | ||
| 170 | } | ||
| 171 | } | ||
| 172 | } = .{}, | ||
| 173 | record_members: std.ArrayListUnmanaged(struct { tok: TokenIndex, name: StringId }) = .{}, | ||
| 174 | @"switch": ?*Switch = null, | ||
| 175 | in_loop: bool = false, | ||
| 176 | pragma_pack: ?u8 = null, | ||
| 177 | string_ids: struct { | ||
| 178 | declspec_id: StringId, | ||
| 179 | main_id: StringId, | ||
| 180 | file: StringId, | ||
| 181 | jmp_buf: StringId, | ||
| 182 | sigjmp_buf: StringId, | ||
| 183 | ucontext_t: StringId, | ||
| 184 | }, | ||
| 185 | |||
| 186 | /// Checks codepoint for various pedantic warnings | ||
| 187 | /// Returns true if diagnostic issued | ||
| 188 | fn checkIdentifierCodepointWarnings(comp: *Compilation, codepoint: u21, loc: Source.Location) Compilation.Error!bool { | ||
| 189 | assert(codepoint >= 0x80); | ||
| 190 | |||
| 191 | const err_start = comp.diagnostics.list.items.len; | ||
| 192 | |||
| 193 | if (!char_info.isC99IdChar(codepoint)) { | ||
| 194 | try comp.addDiagnostic(.{ | ||
| 195 | .tag = .c99_compat, | ||
| 196 | .loc = loc, | ||
| 197 | }, &.{}); | ||
| 198 | } | ||
| 199 | if (char_info.isInvisible(codepoint)) { | ||
| 200 | try comp.addDiagnostic(.{ | ||
| 201 | .tag = .unicode_zero_width, | ||
| 202 | .loc = loc, | ||
| 203 | .extra = .{ .actual_codepoint = codepoint }, | ||
| 204 | }, &.{}); | ||
| 205 | } | ||
| 206 | if (char_info.homoglyph(codepoint)) |resembles| { | ||
| 207 | try comp.addDiagnostic(.{ | ||
| 208 | .tag = .unicode_homoglyph, | ||
| 209 | .loc = loc, | ||
| 210 | .extra = .{ .codepoints = .{ .actual = codepoint, .resembles = resembles } }, | ||
| 211 | }, &.{}); | ||
| 212 | } | ||
| 213 | return comp.diagnostics.list.items.len != err_start; | ||
| 214 | } | ||
| 215 | |||
| 216 | /// Issues diagnostics for the current extended identifier token | ||
| 217 | /// Return value indicates whether the token should be considered an identifier | ||
| 218 | /// true means consider the token to actually be an identifier | ||
| 219 | /// false means it is not | ||
| 220 | fn validateExtendedIdentifier(p: *Parser) !bool { | ||
| 221 | assert(p.tok_ids[p.tok_i] == .extended_identifier); | ||
| 222 | |||
| 223 | const slice = p.tokSlice(p.tok_i); | ||
| 224 | const view = std.unicode.Utf8View.init(slice) catch { | ||
| 225 | try p.errTok(.invalid_utf8, p.tok_i); | ||
| 226 | return error.FatalError; | ||
| 227 | }; | ||
| 228 | var it = view.iterator(); | ||
| 229 | |||
| 230 | var valid_identifier = true; | ||
| 231 | var warned = false; | ||
| 232 | var len: usize = 0; | ||
| 233 | var invalid_char: u21 = undefined; | ||
| 234 | var loc = p.pp.tokens.items(.loc)[p.tok_i]; | ||
| 235 | |||
| 236 | var normalized = true; | ||
| 237 | var last_canonical_class: char_info.CanonicalCombiningClass = .not_reordered; | ||
| 238 | const standard = p.comp.langopts.standard; | ||
| 239 | while (it.nextCodepoint()) |codepoint| { | ||
| 240 | defer { | ||
| 241 | len += 1; | ||
| 242 | loc.byte_offset += std.unicode.utf8CodepointSequenceLength(codepoint) catch unreachable; | ||
| 243 | } | ||
| 244 | if (codepoint == '$') { | ||
| 245 | warned = true; | ||
| 246 | if (p.comp.langopts.dollars_in_identifiers) try p.comp.addDiagnostic(.{ | ||
| 247 | .tag = .dollar_in_identifier_extension, | ||
| 248 | .loc = loc, | ||
| 249 | }, &.{}); | ||
| 250 | } | ||
| 251 | |||
| 252 | if (codepoint <= 0x7F) continue; | ||
| 253 | if (!valid_identifier) continue; | ||
| 254 | |||
| 255 | const allowed = standard.codepointAllowedInIdentifier(codepoint, len == 0); | ||
| 256 | if (!allowed) { | ||
| 257 | invalid_char = codepoint; | ||
| 258 | valid_identifier = false; | ||
| 259 | continue; | ||
| 260 | } | ||
| 261 | |||
| 262 | if (!warned) { | ||
| 263 | warned = try checkIdentifierCodepointWarnings(p.comp, codepoint, loc); | ||
| 264 | } | ||
| 265 | |||
| 266 | // Check NFC normalization. | ||
| 267 | if (!normalized) continue; | ||
| 268 | const canonical_class = char_info.getCanonicalClass(codepoint); | ||
| 269 | if (@intFromEnum(last_canonical_class) > @intFromEnum(canonical_class) and | ||
| 270 | canonical_class != .not_reordered) | ||
| 271 | { | ||
| 272 | normalized = false; | ||
| 273 | try p.errStr(.identifier_not_normalized, p.tok_i, slice); | ||
| 274 | continue; | ||
| 275 | } | ||
| 276 | if (char_info.isNormalized(codepoint) != .yes) { | ||
| 277 | normalized = false; | ||
| 278 | try p.errExtra(.identifier_not_normalized, p.tok_i, .{ .normalized = slice }); | ||
| 279 | } | ||
| 280 | last_canonical_class = canonical_class; | ||
| 281 | } | ||
| 282 | |||
| 283 | if (!valid_identifier) { | ||
| 284 | if (len == 1) { | ||
| 285 | try p.errExtra(.unexpected_character, p.tok_i, .{ .actual_codepoint = invalid_char }); | ||
| 286 | return false; | ||
| 287 | } else { | ||
| 288 | try p.errExtra(.invalid_identifier_start_char, p.tok_i, .{ .actual_codepoint = invalid_char }); | ||
| 289 | } | ||
| 290 | } | ||
| 291 | |||
| 292 | return true; | ||
| 293 | } | ||
| 294 | |||
| 295 | fn eatIdentifier(p: *Parser) !?TokenIndex { | ||
| 296 | switch (p.tok_ids[p.tok_i]) { | ||
| 297 | .identifier => {}, | ||
| 298 | .extended_identifier => { | ||
| 299 | if (!try p.validateExtendedIdentifier()) { | ||
| 300 | p.tok_i += 1; | ||
| 301 | return null; | ||
| 302 | } | ||
| 303 | }, | ||
| 304 | else => return null, | ||
| 305 | } | ||
| 306 | p.tok_i += 1; | ||
| 307 | |||
| 308 | // Handle illegal '$' characters in identifiers | ||
| 309 | if (!p.comp.langopts.dollars_in_identifiers) { | ||
| 310 | if (p.tok_ids[p.tok_i] == .invalid and p.tokSlice(p.tok_i)[0] == '$') { | ||
| 311 | try p.err(.dollars_in_identifiers); | ||
| 312 | p.tok_i += 1; | ||
| 313 | return error.ParsingFailed; | ||
| 314 | } | ||
| 315 | } | ||
| 316 | |||
| 317 | return p.tok_i - 1; | ||
| 318 | } | ||
| 319 | |||
| 320 | fn expectIdentifier(p: *Parser) Error!TokenIndex { | ||
| 321 | const actual = p.tok_ids[p.tok_i]; | ||
| 322 | if (actual != .identifier and actual != .extended_identifier) { | ||
| 323 | return p.errExpectedToken(.identifier, actual); | ||
| 324 | } | ||
| 325 | |||
| 326 | return (try p.eatIdentifier()) orelse unreachable; | ||
| 327 | } | ||
| 328 | |||
| 329 | fn eatToken(p: *Parser, id: Token.Id) ?TokenIndex { | ||
| 330 | assert(id != .identifier and id != .extended_identifier); // use eatIdentifier | ||
| 331 | if (p.tok_ids[p.tok_i] == id) { | ||
| 332 | defer p.tok_i += 1; | ||
| 333 | return p.tok_i; | ||
| 334 | } else return null; | ||
| 335 | } | ||
| 336 | |||
| 337 | fn expectToken(p: *Parser, expected: Token.Id) Error!TokenIndex { | ||
| 338 | assert(expected != .identifier and expected != .extended_identifier); // use expectIdentifier | ||
| 339 | const actual = p.tok_ids[p.tok_i]; | ||
| 340 | if (actual != expected) return p.errExpectedToken(expected, actual); | ||
| 341 | defer p.tok_i += 1; | ||
| 342 | return p.tok_i; | ||
| 343 | } | ||
| 344 | |||
| 345 | pub fn tokSlice(p: *Parser, tok: TokenIndex) []const u8 { | ||
| 346 | if (p.tok_ids[tok].lexeme()) |some| return some; | ||
| 347 | const loc = p.pp.tokens.items(.loc)[tok]; | ||
| 348 | var tmp_tokenizer = Tokenizer{ | ||
| 349 | .buf = p.comp.getSource(loc.id).buf, | ||
| 350 | .comp = p.comp, | ||
| 351 | .index = loc.byte_offset, | ||
| 352 | .source = .generated, | ||
| 353 | }; | ||
| 354 | const res = tmp_tokenizer.next(); | ||
| 355 | return tmp_tokenizer.buf[res.start..res.end]; | ||
| 356 | } | ||
| 357 | |||
| 358 | fn expectClosing(p: *Parser, opening: TokenIndex, id: Token.Id) Error!void { | ||
| 359 | _ = p.expectToken(id) catch |e| { | ||
| 360 | if (e == error.ParsingFailed) { | ||
| 361 | try p.errTok(switch (id) { | ||
| 362 | .r_paren => .to_match_paren, | ||
| 363 | .r_brace => .to_match_brace, | ||
| 364 | .r_bracket => .to_match_brace, | ||
| 365 | else => unreachable, | ||
| 366 | }, opening); | ||
| 367 | } | ||
| 368 | return e; | ||
| 369 | }; | ||
| 370 | } | ||
| 371 | |||
| 372 | fn errOverflow(p: *Parser, op_tok: TokenIndex, res: Result) !void { | ||
| 373 | try p.errStr(.overflow, op_tok, try res.str(p)); | ||
| 374 | } | ||
| 375 | |||
| 376 | fn errExpectedToken(p: *Parser, expected: Token.Id, actual: Token.Id) Error { | ||
| 377 | switch (actual) { | ||
| 378 | .invalid => try p.errExtra(.expected_invalid, p.tok_i, .{ .tok_id_expected = expected }), | ||
| 379 | .eof => try p.errExtra(.expected_eof, p.tok_i, .{ .tok_id_expected = expected }), | ||
| 380 | else => try p.errExtra(.expected_token, p.tok_i, .{ .tok_id = .{ | ||
| 381 | .expected = expected, | ||
| 382 | .actual = actual, | ||
| 383 | } }), | ||
| 384 | } | ||
| 385 | return error.ParsingFailed; | ||
| 386 | } | ||
| 387 | |||
| 388 | pub fn errStr(p: *Parser, tag: Diagnostics.Tag, tok_i: TokenIndex, str: []const u8) Compilation.Error!void { | ||
| 389 | @setCold(true); | ||
| 390 | return p.errExtra(tag, tok_i, .{ .str = str }); | ||
| 391 | } | ||
| 392 | |||
| 393 | pub fn errExtra(p: *Parser, tag: Diagnostics.Tag, tok_i: TokenIndex, extra: Diagnostics.Message.Extra) Compilation.Error!void { | ||
| 394 | @setCold(true); | ||
| 395 | const tok = p.pp.tokens.get(tok_i); | ||
| 396 | var loc = tok.loc; | ||
| 397 | if (tok_i != 0 and tok.id == .eof) { | ||
| 398 | // if the token is EOF, point at the end of the previous token instead | ||
| 399 | const prev = p.pp.tokens.get(tok_i - 1); | ||
| 400 | loc = prev.loc; | ||
| 401 | loc.byte_offset += @intCast(p.tokSlice(tok_i - 1).len); | ||
| 402 | } | ||
| 403 | try p.comp.addDiagnostic(.{ | ||
| 404 | .tag = tag, | ||
| 405 | .loc = loc, | ||
| 406 | .extra = extra, | ||
| 407 | }, tok.expansionSlice()); | ||
| 408 | } | ||
| 409 | |||
| 410 | pub fn errTok(p: *Parser, tag: Diagnostics.Tag, tok_i: TokenIndex) Compilation.Error!void { | ||
| 411 | @setCold(true); | ||
| 412 | return p.errExtra(tag, tok_i, .{ .none = {} }); | ||
| 413 | } | ||
| 414 | |||
| 415 | pub fn err(p: *Parser, tag: Diagnostics.Tag) Compilation.Error!void { | ||
| 416 | @setCold(true); | ||
| 417 | return p.errExtra(tag, p.tok_i, .{ .none = {} }); | ||
| 418 | } | ||
| 419 | |||
| 420 | pub fn todo(p: *Parser, msg: []const u8) Error { | ||
| 421 | try p.errStr(.todo, p.tok_i, msg); | ||
| 422 | return error.ParsingFailed; | ||
| 423 | } | ||
| 424 | |||
| 425 | pub fn removeNull(p: *Parser, str: Value) !Value { | ||
| 426 | const strings_top = p.strings.items.len; | ||
| 427 | defer p.strings.items.len = strings_top; | ||
| 428 | { | ||
| 429 | const bytes = p.comp.interner.get(str.ref()).bytes; | ||
| 430 | try p.strings.appendSlice(bytes[0 .. bytes.len - 1]); | ||
| 431 | } | ||
| 432 | return Value.intern(p.comp, .{ .bytes = p.strings.items[strings_top..] }); | ||
| 433 | } | ||
| 434 | |||
| 435 | pub fn typeStr(p: *Parser, ty: Type) ![]const u8 { | ||
| 436 | if (Type.Builder.fromType(ty).str(p.comp.langopts)) |str| return str; | ||
| 437 | const strings_top = p.strings.items.len; | ||
| 438 | defer p.strings.items.len = strings_top; | ||
| 439 | |||
| 440 | const mapper = p.comp.string_interner.getSlowTypeMapper(); | ||
| 441 | try ty.print(mapper, p.comp.langopts, p.strings.writer()); | ||
| 442 | return try p.comp.diagnostics.arena.allocator().dupe(u8, p.strings.items[strings_top..]); | ||
| 443 | } | ||
| 444 | |||
| 445 | pub fn typePairStr(p: *Parser, a: Type, b: Type) ![]const u8 { | ||
| 446 | return p.typePairStrExtra(a, " and ", b); | ||
| 447 | } | ||
| 448 | |||
| 449 | pub fn typePairStrExtra(p: *Parser, a: Type, msg: []const u8, b: Type) ![]const u8 { | ||
| 450 | const strings_top = p.strings.items.len; | ||
| 451 | defer p.strings.items.len = strings_top; | ||
| 452 | |||
| 453 | try p.strings.append('\''); | ||
| 454 | const mapper = p.comp.string_interner.getSlowTypeMapper(); | ||
| 455 | try a.print(mapper, p.comp.langopts, p.strings.writer()); | ||
| 456 | try p.strings.append('\''); | ||
| 457 | try p.strings.appendSlice(msg); | ||
| 458 | try p.strings.append('\''); | ||
| 459 | try b.print(mapper, p.comp.langopts, p.strings.writer()); | ||
| 460 | try p.strings.append('\''); | ||
| 461 | return try p.comp.diagnostics.arena.allocator().dupe(u8, p.strings.items[strings_top..]); | ||
| 462 | } | ||
| 463 | |||
| 464 | pub fn floatValueChangedStr(p: *Parser, res: *Result, old_value: Value, int_ty: Type) ![]const u8 { | ||
| 465 | const strings_top = p.strings.items.len; | ||
| 466 | defer p.strings.items.len = strings_top; | ||
| 467 | |||
| 468 | var w = p.strings.writer(); | ||
| 469 | const type_pair_str = try p.typePairStrExtra(res.ty, " to ", int_ty); | ||
| 470 | try w.writeAll(type_pair_str); | ||
| 471 | |||
| 472 | try w.writeAll(" changes "); | ||
| 473 | if (res.val.isZero(p.comp)) try w.writeAll("non-zero "); | ||
| 474 | try w.writeAll("value from "); | ||
| 475 | try old_value.print(res.ty, p.comp, w); | ||
| 476 | try w.writeAll(" to "); | ||
| 477 | try res.val.print(int_ty, p.comp, w); | ||
| 478 | |||
| 479 | return try p.comp.diagnostics.arena.allocator().dupe(u8, p.strings.items[strings_top..]); | ||
| 480 | } | ||
| 481 | |||
| 482 | fn checkDeprecatedUnavailable(p: *Parser, ty: Type, usage_tok: TokenIndex, decl_tok: TokenIndex) !void { | ||
| 483 | if (ty.getAttribute(.@"error")) |@"error"| { | ||
| 484 | const strings_top = p.strings.items.len; | ||
| 485 | defer p.strings.items.len = strings_top; | ||
| 486 | |||
| 487 | const w = p.strings.writer(); | ||
| 488 | const msg_str = p.comp.interner.get(@"error".msg.ref()).bytes; | ||
| 489 | try w.print("call to '{s}' declared with attribute error: {}", .{ | ||
| 490 | p.tokSlice(@"error".__name_tok), std.zig.fmtEscapes(msg_str), | ||
| 491 | }); | ||
| 492 | const str = try p.comp.diagnostics.arena.allocator().dupe(u8, p.strings.items[strings_top..]); | ||
| 493 | try p.errStr(.error_attribute, usage_tok, str); | ||
| 494 | } | ||
| 495 | if (ty.getAttribute(.warning)) |warning| { | ||
| 496 | const strings_top = p.strings.items.len; | ||
| 497 | defer p.strings.items.len = strings_top; | ||
| 498 | |||
| 499 | const w = p.strings.writer(); | ||
| 500 | const msg_str = p.comp.interner.get(warning.msg.ref()).bytes; | ||
| 501 | try w.print("call to '{s}' declared with attribute warning: {}", .{ | ||
| 502 | p.tokSlice(warning.__name_tok), std.zig.fmtEscapes(msg_str), | ||
| 503 | }); | ||
| 504 | const str = try p.comp.diagnostics.arena.allocator().dupe(u8, p.strings.items[strings_top..]); | ||
| 505 | try p.errStr(.warning_attribute, usage_tok, str); | ||
| 506 | } | ||
| 507 | if (ty.getAttribute(.unavailable)) |unavailable| { | ||
| 508 | try p.errDeprecated(.unavailable, usage_tok, unavailable.msg); | ||
| 509 | try p.errStr(.unavailable_note, unavailable.__name_tok, p.tokSlice(decl_tok)); | ||
| 510 | return error.ParsingFailed; | ||
| 511 | } else if (ty.getAttribute(.deprecated)) |deprecated| { | ||
| 512 | try p.errDeprecated(.deprecated_declarations, usage_tok, deprecated.msg); | ||
| 513 | try p.errStr(.deprecated_note, deprecated.__name_tok, p.tokSlice(decl_tok)); | ||
| 514 | } | ||
| 515 | } | ||
| 516 | |||
| 517 | fn errDeprecated(p: *Parser, tag: Diagnostics.Tag, tok_i: TokenIndex, msg: ?Value) Compilation.Error!void { | ||
| 518 | const strings_top = p.strings.items.len; | ||
| 519 | defer p.strings.items.len = strings_top; | ||
| 520 | |||
| 521 | const w = p.strings.writer(); | ||
| 522 | try w.print("'{s}' is ", .{p.tokSlice(tok_i)}); | ||
| 523 | const reason: []const u8 = switch (tag) { | ||
| 524 | .unavailable => "unavailable", | ||
| 525 | .deprecated_declarations => "deprecated", | ||
| 526 | else => unreachable, | ||
| 527 | }; | ||
| 528 | try w.writeAll(reason); | ||
| 529 | if (msg) |m| { | ||
| 530 | const str = p.comp.interner.get(m.ref()).bytes; | ||
| 531 | try w.print(": {}", .{std.zig.fmtEscapes(str)}); | ||
| 532 | } | ||
| 533 | const str = try p.comp.diagnostics.arena.allocator().dupe(u8, p.strings.items[strings_top..]); | ||
| 534 | return p.errStr(tag, tok_i, str); | ||
| 535 | } | ||
| 536 | |||
| 537 | fn addNode(p: *Parser, node: Tree.Node) Allocator.Error!NodeIndex { | ||
| 538 | if (p.in_macro) return .none; | ||
| 539 | const res = p.nodes.len; | ||
| 540 | try p.nodes.append(p.gpa, node); | ||
| 541 | return @enumFromInt(res); | ||
| 542 | } | ||
| 543 | |||
| 544 | fn addList(p: *Parser, nodes: []const NodeIndex) Allocator.Error!Tree.Node.Range { | ||
| 545 | if (p.in_macro) return Tree.Node.Range{ .start = 0, .end = 0 }; | ||
| 546 | const start: u32 = @intCast(p.data.items.len); | ||
| 547 | try p.data.appendSlice(nodes); | ||
| 548 | const end: u32 = @intCast(p.data.items.len); | ||
| 549 | return Tree.Node.Range{ .start = start, .end = end }; | ||
| 550 | } | ||
| 551 | |||
| 552 | fn findLabel(p: *Parser, name: []const u8) ?TokenIndex { | ||
| 553 | for (p.labels.items) |item| { | ||
| 554 | switch (item) { | ||
| 555 | .label => |l| if (mem.eql(u8, p.tokSlice(l), name)) return l, | ||
| 556 | .unresolved_goto => {}, | ||
| 557 | } | ||
| 558 | } | ||
| 559 | return null; | ||
| 560 | } | ||
| 561 | |||
| 562 | fn nodeIs(p: *Parser, node: NodeIndex, tag: Tree.Tag) bool { | ||
| 563 | return p.getNode(node, tag) != null; | ||
| 564 | } | ||
| 565 | |||
| 566 | fn getNode(p: *Parser, node: NodeIndex, tag: Tree.Tag) ?NodeIndex { | ||
| 567 | var cur = node; | ||
| 568 | const tags = p.nodes.items(.tag); | ||
| 569 | const data = p.nodes.items(.data); | ||
| 570 | while (true) { | ||
| 571 | const cur_tag = tags[@intFromEnum(cur)]; | ||
| 572 | if (cur_tag == .paren_expr) { | ||
| 573 | cur = data[@intFromEnum(cur)].un; | ||
| 574 | } else if (cur_tag == tag) { | ||
| 575 | return cur; | ||
| 576 | } else { | ||
| 577 | return null; | ||
| 578 | } | ||
| 579 | } | ||
| 580 | } | ||
| 581 | |||
| 582 | fn nodeIsCompoundLiteral(p: *Parser, node: NodeIndex) bool { | ||
| 583 | var cur = node; | ||
| 584 | const tags = p.nodes.items(.tag); | ||
| 585 | const data = p.nodes.items(.data); | ||
| 586 | while (true) { | ||
| 587 | switch (tags[@intFromEnum(cur)]) { | ||
| 588 | .paren_expr => cur = data[@intFromEnum(cur)].un, | ||
| 589 | .compound_literal_expr, | ||
| 590 | .static_compound_literal_expr, | ||
| 591 | .thread_local_compound_literal_expr, | ||
| 592 | .static_thread_local_compound_literal_expr, | ||
| 593 | => return true, | ||
| 594 | else => return false, | ||
| 595 | } | ||
| 596 | } | ||
| 597 | } | ||
| 598 | |||
| 599 | fn tmpTree(p: *Parser) Tree { | ||
| 600 | return .{ | ||
| 601 | .nodes = p.nodes.slice(), | ||
| 602 | .data = p.data.items, | ||
| 603 | .value_map = p.value_map, | ||
| 604 | .comp = p.comp, | ||
| 605 | .arena = undefined, | ||
| 606 | .generated = undefined, | ||
| 607 | .tokens = undefined, | ||
| 608 | .root_decls = undefined, | ||
| 609 | }; | ||
| 610 | } | ||
| 611 | |||
| 612 | fn pragma(p: *Parser) Compilation.Error!bool { | ||
| 613 | var found_pragma = false; | ||
| 614 | while (p.eatToken(.keyword_pragma)) |_| { | ||
| 615 | found_pragma = true; | ||
| 616 | |||
| 617 | const name_tok = p.tok_i; | ||
| 618 | const name = p.tokSlice(name_tok); | ||
| 619 | |||
| 620 | const end_idx = mem.indexOfScalarPos(Token.Id, p.tok_ids, p.tok_i, .nl).?; | ||
| 621 | const pragma_len = @as(TokenIndex, @intCast(end_idx)) - p.tok_i; | ||
| 622 | defer p.tok_i += pragma_len + 1; // skip past .nl as well | ||
| 623 | if (p.comp.getPragma(name)) |prag| { | ||
| 624 | try prag.parserCB(p, p.tok_i); | ||
| 625 | } | ||
| 626 | } | ||
| 627 | return found_pragma; | ||
| 628 | } | ||
| 629 | |||
| 630 | /// Issue errors for top-level definitions whose type was never completed. | ||
| 631 | fn diagnoseIncompleteDefinitions(p: *Parser) !void { | ||
| 632 | @setCold(true); | ||
| 633 | |||
| 634 | const node_slices = p.nodes.slice(); | ||
| 635 | const tags = node_slices.items(.tag); | ||
| 636 | const tys = node_slices.items(.ty); | ||
| 637 | const data = node_slices.items(.data); | ||
| 638 | |||
| 639 | const err_start = p.comp.diagnostics.list.items.len; | ||
| 640 | for (p.decl_buf.items) |decl_node| { | ||
| 641 | const idx = @intFromEnum(decl_node); | ||
| 642 | switch (tags[idx]) { | ||
| 643 | .struct_forward_decl, .union_forward_decl, .enum_forward_decl => {}, | ||
| 644 | else => continue, | ||
| 645 | } | ||
| 646 | |||
| 647 | const ty = tys[idx]; | ||
| 648 | const decl_type_name = if (ty.getRecord()) |rec| | ||
| 649 | rec.name | ||
| 650 | else if (ty.get(.@"enum")) |en| | ||
| 651 | en.data.@"enum".name | ||
| 652 | else | ||
| 653 | unreachable; | ||
| 654 | |||
| 655 | const tentative_def_tok = p.tentative_defs.get(decl_type_name) orelse continue; | ||
| 656 | const type_str = try p.typeStr(ty); | ||
| 657 | try p.errStr(.tentative_definition_incomplete, tentative_def_tok, type_str); | ||
| 658 | try p.errStr(.forward_declaration_here, data[idx].decl_ref, type_str); | ||
| 659 | } | ||
| 660 | const errors_added = p.comp.diagnostics.list.items.len - err_start; | ||
| 661 | assert(errors_added == 2 * p.tentative_defs.count()); // Each tentative def should add an error + note | ||
| 662 | } | ||
| 663 | |||
| 664 | /// root : (decl | assembly ';' | staticAssert)* | ||
| 665 | pub fn parse(pp: *Preprocessor) Compilation.Error!Tree { | ||
| 666 | assert(pp.linemarkers == .none); | ||
| 667 | pp.comp.pragmaEvent(.before_parse); | ||
| 668 | |||
| 669 | var arena = std.heap.ArenaAllocator.init(pp.comp.gpa); | ||
| 670 | errdefer arena.deinit(); | ||
| 671 | var p = Parser{ | ||
| 672 | .pp = pp, | ||
| 673 | .comp = pp.comp, | ||
| 674 | .gpa = pp.comp.gpa, | ||
| 675 | .arena = arena.allocator(), | ||
| 676 | .tok_ids = pp.tokens.items(.id), | ||
| 677 | .strings = std.ArrayList(u8).init(pp.comp.gpa), | ||
| 678 | .value_map = Tree.ValueMap.init(pp.comp.gpa), | ||
| 679 | .data = NodeList.init(pp.comp.gpa), | ||
| 680 | .labels = std.ArrayList(Label).init(pp.comp.gpa), | ||
| 681 | .list_buf = NodeList.init(pp.comp.gpa), | ||
| 682 | .decl_buf = NodeList.init(pp.comp.gpa), | ||
| 683 | .param_buf = std.ArrayList(Type.Func.Param).init(pp.comp.gpa), | ||
| 684 | .enum_buf = std.ArrayList(Type.Enum.Field).init(pp.comp.gpa), | ||
| 685 | .record_buf = std.ArrayList(Type.Record.Field).init(pp.comp.gpa), | ||
| 686 | .field_attr_buf = std.ArrayList([]const Attribute).init(pp.comp.gpa), | ||
| 687 | .string_ids = .{ | ||
| 688 | .declspec_id = try StrInt.intern(pp.comp, "__declspec"), | ||
| 689 | .main_id = try StrInt.intern(pp.comp, "main"), | ||
| 690 | .file = try StrInt.intern(pp.comp, "FILE"), | ||
| 691 | .jmp_buf = try StrInt.intern(pp.comp, "jmp_buf"), | ||
| 692 | .sigjmp_buf = try StrInt.intern(pp.comp, "sigjmp_buf"), | ||
| 693 | .ucontext_t = try StrInt.intern(pp.comp, "ucontext_t"), | ||
| 694 | }, | ||
| 695 | }; | ||
| 696 | errdefer { | ||
| 697 | p.nodes.deinit(pp.comp.gpa); | ||
| 698 | p.value_map.deinit(); | ||
| 699 | } | ||
| 700 | defer { | ||
| 701 | p.data.deinit(); | ||
| 702 | p.labels.deinit(); | ||
| 703 | p.strings.deinit(); | ||
| 704 | p.syms.deinit(pp.comp.gpa); | ||
| 705 | p.list_buf.deinit(); | ||
| 706 | p.decl_buf.deinit(); | ||
| 707 | p.param_buf.deinit(); | ||
| 708 | p.enum_buf.deinit(); | ||
| 709 | p.record_buf.deinit(); | ||
| 710 | p.record_members.deinit(pp.comp.gpa); | ||
| 711 | p.attr_buf.deinit(pp.comp.gpa); | ||
| 712 | p.attr_application_buf.deinit(pp.comp.gpa); | ||
| 713 | p.tentative_defs.deinit(pp.comp.gpa); | ||
| 714 | assert(p.field_attr_buf.items.len == 0); | ||
| 715 | p.field_attr_buf.deinit(); | ||
| 716 | } | ||
| 717 | |||
| 718 | // NodeIndex 0 must be invalid | ||
| 719 | _ = try p.addNode(.{ .tag = .invalid, .ty = undefined, .data = undefined }); | ||
| 720 | |||
| 721 | { | ||
| 722 | if (p.comp.langopts.hasChar8_T()) { | ||
| 723 | try p.syms.defineTypedef(&p, try StrInt.intern(p.comp, "char8_t"), .{ .specifier = .uchar }, 0, .none); | ||
| 724 | } | ||
| 725 | try p.syms.defineTypedef(&p, try StrInt.intern(p.comp, "__int128_t"), .{ .specifier = .int128 }, 0, .none); | ||
| 726 | try p.syms.defineTypedef(&p, try StrInt.intern(p.comp, "__uint128_t"), .{ .specifier = .uint128 }, 0, .none); | ||
| 727 | |||
| 728 | const elem_ty = try p.arena.create(Type); | ||
| 729 | elem_ty.* = .{ .specifier = .char }; | ||
| 730 | try p.syms.defineTypedef(&p, try StrInt.intern(p.comp, "__builtin_ms_va_list"), .{ | ||
| 731 | .specifier = .pointer, | ||
| 732 | .data = .{ .sub_type = elem_ty }, | ||
| 733 | }, 0, .none); | ||
| 734 | |||
| 735 | const ty = &pp.comp.types.va_list; | ||
| 736 | try p.syms.defineTypedef(&p, try StrInt.intern(p.comp, "__builtin_va_list"), ty.*, 0, .none); | ||
| 737 | |||
| 738 | if (ty.isArray()) ty.decayArray(); | ||
| 739 | |||
| 740 | try p.syms.defineTypedef(&p, try StrInt.intern(p.comp, "__NSConstantString"), pp.comp.types.ns_constant_string.ty, 0, .none); | ||
| 741 | } | ||
| 742 | |||
| 743 | while (p.eatToken(.eof) == null) { | ||
| 744 | if (try p.pragma()) continue; | ||
| 745 | if (try p.parseOrNextDecl(staticAssert)) continue; | ||
| 746 | if (try p.parseOrNextDecl(decl)) continue; | ||
| 747 | if (p.eatToken(.keyword_extension)) |_| { | ||
| 748 | const saved_extension = p.extension_suppressed; | ||
| 749 | defer p.extension_suppressed = saved_extension; | ||
| 750 | p.extension_suppressed = true; | ||
| 751 | |||
| 752 | if (try p.parseOrNextDecl(decl)) continue; | ||
| 753 | switch (p.tok_ids[p.tok_i]) { | ||
| 754 | .semicolon => p.tok_i += 1, | ||
| 755 | .keyword_static_assert, | ||
| 756 | .keyword_c23_static_assert, | ||
| 757 | .keyword_pragma, | ||
| 758 | .keyword_extension, | ||
| 759 | .keyword_asm, | ||
| 760 | .keyword_asm1, | ||
| 761 | .keyword_asm2, | ||
| 762 | => {}, | ||
| 763 | else => try p.err(.expected_external_decl), | ||
| 764 | } | ||
| 765 | continue; | ||
| 766 | } | ||
| 767 | if (p.assembly(.global) catch |er| switch (er) { | ||
| 768 | error.ParsingFailed => { | ||
| 769 | p.nextExternDecl(); | ||
| 770 | continue; | ||
| 771 | }, | ||
| 772 | else => |e| return e, | ||
| 773 | }) |node| { | ||
| 774 | try p.decl_buf.append(node); | ||
| 775 | continue; | ||
| 776 | } | ||
| 777 | if (p.eatToken(.semicolon)) |tok| { | ||
| 778 | try p.errTok(.extra_semi, tok); | ||
| 779 | continue; | ||
| 780 | } | ||
| 781 | try p.err(.expected_external_decl); | ||
| 782 | p.tok_i += 1; | ||
| 783 | } | ||
| 784 | if (p.tentative_defs.count() > 0) { | ||
| 785 | try p.diagnoseIncompleteDefinitions(); | ||
| 786 | } | ||
| 787 | |||
| 788 | const root_decls = try p.decl_buf.toOwnedSlice(); | ||
| 789 | errdefer pp.comp.gpa.free(root_decls); | ||
| 790 | if (root_decls.len == 0) { | ||
| 791 | try p.errTok(.empty_translation_unit, p.tok_i - 1); | ||
| 792 | } | ||
| 793 | pp.comp.pragmaEvent(.after_parse); | ||
| 794 | |||
| 795 | const data = try p.data.toOwnedSlice(); | ||
| 796 | errdefer pp.comp.gpa.free(data); | ||
| 797 | return Tree{ | ||
| 798 | .comp = pp.comp, | ||
| 799 | .tokens = pp.tokens.slice(), | ||
| 800 | .arena = arena, | ||
| 801 | .generated = pp.comp.generated_buf.items, | ||
| 802 | .nodes = p.nodes.toOwnedSlice(), | ||
| 803 | .data = data, | ||
| 804 | .root_decls = root_decls, | ||
| 805 | .value_map = p.value_map, | ||
| 806 | }; | ||
| 807 | } | ||
| 808 | |||
| 809 | fn skipToPragmaSentinel(p: *Parser) void { | ||
| 810 | while (true) : (p.tok_i += 1) { | ||
| 811 | if (p.tok_ids[p.tok_i] == .nl) return; | ||
| 812 | if (p.tok_ids[p.tok_i] == .eof) { | ||
| 813 | p.tok_i -= 1; | ||
| 814 | return; | ||
| 815 | } | ||
| 816 | } | ||
| 817 | } | ||
| 818 | |||
| 819 | fn parseOrNextDecl(p: *Parser, comptime func: fn (*Parser) Error!bool) Compilation.Error!bool { | ||
| 820 | return func(p) catch |er| switch (er) { | ||
| 821 | error.ParsingFailed => { | ||
| 822 | p.nextExternDecl(); | ||
| 823 | return true; | ||
| 824 | }, | ||
| 825 | else => |e| return e, | ||
| 826 | }; | ||
| 827 | } | ||
| 828 | |||
| 829 | fn nextExternDecl(p: *Parser) void { | ||
| 830 | var parens: u32 = 0; | ||
| 831 | while (true) : (p.tok_i += 1) { | ||
| 832 | switch (p.tok_ids[p.tok_i]) { | ||
| 833 | .l_paren, .l_brace, .l_bracket => parens += 1, | ||
| 834 | .r_paren, .r_brace, .r_bracket => if (parens != 0) { | ||
| 835 | parens -= 1; | ||
| 836 | }, | ||
| 837 | .keyword_typedef, | ||
| 838 | .keyword_extern, | ||
| 839 | .keyword_static, | ||
| 840 | .keyword_auto, | ||
| 841 | .keyword_register, | ||
| 842 | .keyword_thread_local, | ||
| 843 | .keyword_c23_thread_local, | ||
| 844 | .keyword_inline, | ||
| 845 | .keyword_inline1, | ||
| 846 | .keyword_inline2, | ||
| 847 | .keyword_noreturn, | ||
| 848 | .keyword_void, | ||
| 849 | .keyword_bool, | ||
| 850 | .keyword_c23_bool, | ||
| 851 | .keyword_char, | ||
| 852 | .keyword_short, | ||
| 853 | .keyword_int, | ||
| 854 | .keyword_long, | ||
| 855 | .keyword_signed, | ||
| 856 | .keyword_unsigned, | ||
| 857 | .keyword_float, | ||
| 858 | .keyword_double, | ||
| 859 | .keyword_complex, | ||
| 860 | .keyword_atomic, | ||
| 861 | .keyword_enum, | ||
| 862 | .keyword_struct, | ||
| 863 | .keyword_union, | ||
| 864 | .keyword_alignas, | ||
| 865 | .keyword_c23_alignas, | ||
| 866 | .identifier, | ||
| 867 | .extended_identifier, | ||
| 868 | .keyword_typeof, | ||
| 869 | .keyword_typeof1, | ||
| 870 | .keyword_typeof2, | ||
| 871 | .keyword_typeof_unqual, | ||
| 872 | .keyword_extension, | ||
| 873 | .keyword_bit_int, | ||
| 874 | => if (parens == 0) return, | ||
| 875 | .keyword_pragma => p.skipToPragmaSentinel(), | ||
| 876 | .eof => return, | ||
| 877 | .semicolon => if (parens == 0) { | ||
| 878 | p.tok_i += 1; | ||
| 879 | return; | ||
| 880 | }, | ||
| 881 | else => {}, | ||
| 882 | } | ||
| 883 | } | ||
| 884 | } | ||
| 885 | |||
| 886 | fn skipTo(p: *Parser, id: Token.Id) void { | ||
| 887 | var parens: u32 = 0; | ||
| 888 | while (true) : (p.tok_i += 1) { | ||
| 889 | if (p.tok_ids[p.tok_i] == id and parens == 0) { | ||
| 890 | p.tok_i += 1; | ||
| 891 | return; | ||
| 892 | } | ||
| 893 | switch (p.tok_ids[p.tok_i]) { | ||
| 894 | .l_paren, .l_brace, .l_bracket => parens += 1, | ||
| 895 | .r_paren, .r_brace, .r_bracket => if (parens != 0) { | ||
| 896 | parens -= 1; | ||
| 897 | }, | ||
| 898 | .keyword_pragma => p.skipToPragmaSentinel(), | ||
| 899 | .eof => return, | ||
| 900 | else => {}, | ||
| 901 | } | ||
| 902 | } | ||
| 903 | } | ||
| 904 | |||
| 905 | /// Called after a typedef is defined | ||
| 906 | fn typedefDefined(p: *Parser, name: StringId, ty: Type) void { | ||
| 907 | if (name == p.string_ids.file) { | ||
| 908 | p.comp.types.file = ty; | ||
| 909 | } else if (name == p.string_ids.jmp_buf) { | ||
| 910 | p.comp.types.jmp_buf = ty; | ||
| 911 | } else if (name == p.string_ids.sigjmp_buf) { | ||
| 912 | p.comp.types.sigjmp_buf = ty; | ||
| 913 | } else if (name == p.string_ids.ucontext_t) { | ||
| 914 | p.comp.types.ucontext_t = ty; | ||
| 915 | } | ||
| 916 | } | ||
| 917 | |||
| 918 | // ====== declarations ====== | ||
| 919 | |||
| 920 | /// decl | ||
| 921 | /// : declSpec (initDeclarator ( ',' initDeclarator)*)? ';' | ||
| 922 | /// | declSpec declarator decl* compoundStmt | ||
| 923 | fn decl(p: *Parser) Error!bool { | ||
| 924 | _ = try p.pragma(); | ||
| 925 | const first_tok = p.tok_i; | ||
| 926 | const attr_buf_top = p.attr_buf.len; | ||
| 927 | defer p.attr_buf.len = attr_buf_top; | ||
| 928 | |||
| 929 | try p.attributeSpecifier(); | ||
| 930 | |||
| 931 | var decl_spec = if (try p.declSpec()) |some| some else blk: { | ||
| 932 | if (p.func.ty != null) { | ||
| 933 | p.tok_i = first_tok; | ||
| 934 | return false; | ||
| 935 | } | ||
| 936 | switch (p.tok_ids[first_tok]) { | ||
| 937 | .asterisk, .l_paren, .identifier, .extended_identifier => {}, | ||
| 938 | else => if (p.tok_i != first_tok) { | ||
| 939 | try p.err(.expected_ident_or_l_paren); | ||
| 940 | return error.ParsingFailed; | ||
| 941 | } else return false, | ||
| 942 | } | ||
| 943 | var spec: Type.Builder = .{}; | ||
| 944 | break :blk DeclSpec{ .ty = try spec.finish(p) }; | ||
| 945 | }; | ||
| 946 | if (decl_spec.noreturn) |tok| { | ||
| 947 | const attr = Attribute{ .tag = .noreturn, .args = .{ .noreturn = .{} }, .syntax = .keyword }; | ||
| 948 | try p.attr_buf.append(p.gpa, .{ .attr = attr, .tok = tok }); | ||
| 949 | } | ||
| 950 | var init_d = (try p.initDeclarator(&decl_spec, attr_buf_top)) orelse { | ||
| 951 | _ = try p.expectToken(.semicolon); | ||
| 952 | if (decl_spec.ty.is(.@"enum") or | ||
| 953 | (decl_spec.ty.isRecord() and !decl_spec.ty.isAnonymousRecord(p.comp) and | ||
| 954 | !decl_spec.ty.isTypeof())) // we follow GCC and clang's behavior here | ||
| 955 | { | ||
| 956 | const specifier = decl_spec.ty.canonicalize(.standard).specifier; | ||
| 957 | const attrs = p.attr_buf.items(.attr)[attr_buf_top..]; | ||
| 958 | const toks = p.attr_buf.items(.tok)[attr_buf_top..]; | ||
| 959 | for (attrs, toks) |attr, tok| { | ||
| 960 | try p.errExtra(.ignored_record_attr, tok, .{ | ||
| 961 | .ignored_record_attr = .{ .tag = attr.tag, .specifier = switch (specifier) { | ||
| 962 | .@"enum" => .@"enum", | ||
| 963 | .@"struct" => .@"struct", | ||
| 964 | .@"union" => .@"union", | ||
| 965 | else => unreachable, | ||
| 966 | } }, | ||
| 967 | }); | ||
| 968 | } | ||
| 969 | return true; | ||
| 970 | } | ||
| 971 | |||
| 972 | try p.errTok(.missing_declaration, first_tok); | ||
| 973 | return true; | ||
| 974 | }; | ||
| 975 | |||
| 976 | // Check for function definition. | ||
| 977 | if (init_d.d.func_declarator != null and init_d.initializer.node == .none and init_d.d.ty.isFunc()) fn_def: { | ||
| 978 | if (decl_spec.auto_type) |tok_i| { | ||
| 979 | try p.errStr(.auto_type_not_allowed, tok_i, "function return type"); | ||
| 980 | return error.ParsingFailed; | ||
| 981 | } | ||
| 982 | |||
| 983 | switch (p.tok_ids[p.tok_i]) { | ||
| 984 | .comma, .semicolon => break :fn_def, | ||
| 985 | .l_brace => {}, | ||
| 986 | else => if (init_d.d.old_style_func == null) { | ||
| 987 | try p.err(.expected_fn_body); | ||
| 988 | return true; | ||
| 989 | }, | ||
| 990 | } | ||
| 991 | if (p.func.ty != null) try p.err(.func_not_in_root); | ||
| 992 | |||
| 993 | const node = try p.addNode(undefined); // reserve space | ||
| 994 | const interned_declarator_name = try StrInt.intern(p.comp, p.tokSlice(init_d.d.name)); | ||
| 995 | try p.syms.defineSymbol(p, interned_declarator_name, init_d.d.ty, init_d.d.name, node, .{}, false); | ||
| 996 | |||
| 997 | const func = p.func; | ||
| 998 | p.func = .{ | ||
| 999 | .ty = init_d.d.ty, | ||
| 1000 | .name = init_d.d.name, | ||
| 1001 | }; | ||
| 1002 | if (interned_declarator_name == p.string_ids.main_id and !init_d.d.ty.returnType().is(.int)) { | ||
| 1003 | try p.errTok(.main_return_type, init_d.d.name); | ||
| 1004 | } | ||
| 1005 | defer p.func = func; | ||
| 1006 | |||
| 1007 | try p.syms.pushScope(p); | ||
| 1008 | defer p.syms.popScope(); | ||
| 1009 | |||
| 1010 | // Collect old style parameter declarations. | ||
| 1011 | if (init_d.d.old_style_func != null) { | ||
| 1012 | const attrs = init_d.d.ty.getAttributes(); | ||
| 1013 | var base_ty = if (init_d.d.ty.specifier == .attributed) init_d.d.ty.elemType() else init_d.d.ty; | ||
| 1014 | base_ty.specifier = .func; | ||
| 1015 | init_d.d.ty = try base_ty.withAttributes(p.arena, attrs); | ||
| 1016 | |||
| 1017 | const param_buf_top = p.param_buf.items.len; | ||
| 1018 | defer p.param_buf.items.len = param_buf_top; | ||
| 1019 | |||
| 1020 | param_loop: while (true) { | ||
| 1021 | const param_decl_spec = (try p.declSpec()) orelse break; | ||
| 1022 | if (p.eatToken(.semicolon)) |semi| { | ||
| 1023 | try p.errTok(.missing_declaration, semi); | ||
| 1024 | continue :param_loop; | ||
| 1025 | } | ||
| 1026 | |||
| 1027 | while (true) { | ||
| 1028 | const attr_buf_top_declarator = p.attr_buf.len; | ||
| 1029 | defer p.attr_buf.len = attr_buf_top_declarator; | ||
| 1030 | |||
| 1031 | var d = (try p.declarator(param_decl_spec.ty, .param)) orelse { | ||
| 1032 | try p.errTok(.missing_declaration, first_tok); | ||
| 1033 | _ = try p.expectToken(.semicolon); | ||
| 1034 | continue :param_loop; | ||
| 1035 | }; | ||
| 1036 | try p.attributeSpecifier(); | ||
| 1037 | |||
| 1038 | if (d.ty.hasIncompleteSize() and !d.ty.is(.void)) try p.errStr(.parameter_incomplete_ty, d.name, try p.typeStr(d.ty)); | ||
| 1039 | if (d.ty.isFunc()) { | ||
| 1040 | // Params declared as functions are converted to function pointers. | ||
| 1041 | const elem_ty = try p.arena.create(Type); | ||
| 1042 | elem_ty.* = d.ty; | ||
| 1043 | d.ty = Type{ | ||
| 1044 | .specifier = .pointer, | ||
| 1045 | .data = .{ .sub_type = elem_ty }, | ||
| 1046 | }; | ||
| 1047 | } else if (d.ty.isArray()) { | ||
| 1048 | // params declared as arrays are converted to pointers | ||
| 1049 | d.ty.decayArray(); | ||
| 1050 | } else if (d.ty.is(.void)) { | ||
| 1051 | try p.errTok(.invalid_void_param, d.name); | ||
| 1052 | } | ||
| 1053 | |||
| 1054 | // find and correct parameter types | ||
| 1055 | // TODO check for missing declarations and redefinitions | ||
| 1056 | const name_str = p.tokSlice(d.name); | ||
| 1057 | const interned_name = try StrInt.intern(p.comp, name_str); | ||
| 1058 | for (init_d.d.ty.params()) |*param| { | ||
| 1059 | if (param.name == interned_name) { | ||
| 1060 | param.ty = d.ty; | ||
| 1061 | break; | ||
| 1062 | } | ||
| 1063 | } else { | ||
| 1064 | try p.errStr(.parameter_missing, d.name, name_str); | ||
| 1065 | } | ||
| 1066 | d.ty = try Attribute.applyParameterAttributes(p, d.ty, attr_buf_top_declarator, .alignas_on_param); | ||
| 1067 | |||
| 1068 | // bypass redefinition check to avoid duplicate errors | ||
| 1069 | try p.syms.syms.append(p.gpa, .{ | ||
| 1070 | .kind = .def, | ||
| 1071 | .name = interned_name, | ||
| 1072 | .tok = d.name, | ||
| 1073 | .ty = d.ty, | ||
| 1074 | .val = .{}, | ||
| 1075 | }); | ||
| 1076 | if (p.eatToken(.comma) == null) break; | ||
| 1077 | } | ||
| 1078 | _ = try p.expectToken(.semicolon); | ||
| 1079 | } | ||
| 1080 | } else { | ||
| 1081 | for (init_d.d.ty.params()) |param| { | ||
| 1082 | if (param.ty.hasUnboundVLA()) try p.errTok(.unbound_vla, param.name_tok); | ||
| 1083 | if (param.ty.hasIncompleteSize() and !param.ty.is(.void) and param.ty.specifier != .invalid) try p.errStr(.parameter_incomplete_ty, param.name_tok, try p.typeStr(param.ty)); | ||
| 1084 | |||
| 1085 | if (param.name == .empty) { | ||
| 1086 | try p.errTok(.omitting_parameter_name, param.name_tok); | ||
| 1087 | continue; | ||
| 1088 | } | ||
| 1089 | |||
| 1090 | // bypass redefinition check to avoid duplicate errors | ||
| 1091 | try p.syms.syms.append(p.gpa, .{ | ||
| 1092 | .kind = .def, | ||
| 1093 | .name = param.name, | ||
| 1094 | .tok = param.name_tok, | ||
| 1095 | .ty = param.ty, | ||
| 1096 | .val = .{}, | ||
| 1097 | }); | ||
| 1098 | } | ||
| 1099 | } | ||
| 1100 | |||
| 1101 | const body = (try p.compoundStmt(true, null)) orelse { | ||
| 1102 | assert(init_d.d.old_style_func != null); | ||
| 1103 | try p.err(.expected_fn_body); | ||
| 1104 | return true; | ||
| 1105 | }; | ||
| 1106 | p.nodes.set(@intFromEnum(node), .{ | ||
| 1107 | .ty = init_d.d.ty, | ||
| 1108 | .tag = try decl_spec.validateFnDef(p), | ||
| 1109 | .data = .{ .decl = .{ .name = init_d.d.name, .node = body } }, | ||
| 1110 | }); | ||
| 1111 | try p.decl_buf.append(node); | ||
| 1112 | |||
| 1113 | // check gotos | ||
| 1114 | if (func.ty == null) { | ||
| 1115 | for (p.labels.items) |item| { | ||
| 1116 | if (item == .unresolved_goto) | ||
| 1117 | try p.errStr(.undeclared_label, item.unresolved_goto, p.tokSlice(item.unresolved_goto)); | ||
| 1118 | } | ||
| 1119 | if (p.computed_goto_tok) |goto_tok| { | ||
| 1120 | if (!p.contains_address_of_label) try p.errTok(.invalid_computed_goto, goto_tok); | ||
| 1121 | } | ||
| 1122 | p.labels.items.len = 0; | ||
| 1123 | p.label_count = 0; | ||
| 1124 | p.contains_address_of_label = false; | ||
| 1125 | p.computed_goto_tok = null; | ||
| 1126 | } | ||
| 1127 | return true; | ||
| 1128 | } | ||
| 1129 | |||
| 1130 | // Declare all variable/typedef declarators. | ||
| 1131 | var warned_auto = false; | ||
| 1132 | while (true) { | ||
| 1133 | if (init_d.d.old_style_func) |tok_i| try p.errTok(.invalid_old_style_params, tok_i); | ||
| 1134 | const tag = try decl_spec.validate(p, &init_d.d.ty, init_d.initializer.node != .none); | ||
| 1135 | |||
| 1136 | const node = try p.addNode(.{ .ty = init_d.d.ty, .tag = tag, .data = .{ | ||
| 1137 | .decl = .{ .name = init_d.d.name, .node = init_d.initializer.node }, | ||
| 1138 | } }); | ||
| 1139 | try p.decl_buf.append(node); | ||
| 1140 | |||
| 1141 | const interned_name = try StrInt.intern(p.comp, p.tokSlice(init_d.d.name)); | ||
| 1142 | if (decl_spec.storage_class == .typedef) { | ||
| 1143 | try p.syms.defineTypedef(p, interned_name, init_d.d.ty, init_d.d.name, node); | ||
| 1144 | p.typedefDefined(interned_name, init_d.d.ty); | ||
| 1145 | } else if (init_d.initializer.node != .none or | ||
| 1146 | (p.func.ty != null and decl_spec.storage_class != .@"extern")) | ||
| 1147 | { | ||
| 1148 | // TODO validate global variable/constexpr initializer comptime known | ||
| 1149 | try p.syms.defineSymbol( | ||
| 1150 | p, | ||
| 1151 | interned_name, | ||
| 1152 | init_d.d.ty, | ||
| 1153 | init_d.d.name, | ||
| 1154 | node, | ||
| 1155 | if (init_d.d.ty.isConst() or decl_spec.constexpr != null) init_d.initializer.val else .{}, | ||
| 1156 | decl_spec.constexpr != null, | ||
| 1157 | ); | ||
| 1158 | } else { | ||
| 1159 | try p.syms.declareSymbol(p, interned_name, init_d.d.ty, init_d.d.name, node); | ||
| 1160 | } | ||
| 1161 | |||
| 1162 | if (p.eatToken(.comma) == null) break; | ||
| 1163 | |||
| 1164 | if (!warned_auto) { | ||
| 1165 | if (decl_spec.auto_type) |tok_i| { | ||
| 1166 | try p.errTok(.auto_type_requires_single_declarator, tok_i); | ||
| 1167 | warned_auto = true; | ||
| 1168 | } | ||
| 1169 | if (p.comp.langopts.standard.atLeast(.c23) and decl_spec.storage_class == .auto) { | ||
| 1170 | try p.errTok(.c23_auto_single_declarator, decl_spec.storage_class.auto); | ||
| 1171 | warned_auto = true; | ||
| 1172 | } | ||
| 1173 | } | ||
| 1174 | |||
| 1175 | init_d = (try p.initDeclarator(&decl_spec, attr_buf_top)) orelse { | ||
| 1176 | try p.err(.expected_ident_or_l_paren); | ||
| 1177 | continue; | ||
| 1178 | }; | ||
| 1179 | } | ||
| 1180 | |||
| 1181 | _ = try p.expectToken(.semicolon); | ||
| 1182 | return true; | ||
| 1183 | } | ||
| 1184 | |||
| 1185 | fn staticAssertMessage(p: *Parser, cond_node: NodeIndex, message: Result) !?[]const u8 { | ||
| 1186 | const cond_tag = p.nodes.items(.tag)[@intFromEnum(cond_node)]; | ||
| 1187 | if (cond_tag != .builtin_types_compatible_p and message.node == .none) return null; | ||
| 1188 | |||
| 1189 | var buf = std.ArrayList(u8).init(p.gpa); | ||
| 1190 | defer buf.deinit(); | ||
| 1191 | |||
| 1192 | if (cond_tag == .builtin_types_compatible_p) { | ||
| 1193 | const mapper = p.comp.string_interner.getSlowTypeMapper(); | ||
| 1194 | const data = p.nodes.items(.data)[@intFromEnum(cond_node)].bin; | ||
| 1195 | |||
| 1196 | try buf.appendSlice("'__builtin_types_compatible_p("); | ||
| 1197 | |||
| 1198 | const lhs_ty = p.nodes.items(.ty)[@intFromEnum(data.lhs)]; | ||
| 1199 | try lhs_ty.print(mapper, p.comp.langopts, buf.writer()); | ||
| 1200 | try buf.appendSlice(", "); | ||
| 1201 | |||
| 1202 | const rhs_ty = p.nodes.items(.ty)[@intFromEnum(data.rhs)]; | ||
| 1203 | try rhs_ty.print(mapper, p.comp.langopts, buf.writer()); | ||
| 1204 | |||
| 1205 | try buf.appendSlice(")'"); | ||
| 1206 | } | ||
| 1207 | if (message.node != .none) { | ||
| 1208 | assert(p.nodes.items(.tag)[@intFromEnum(message.node)] == .string_literal_expr); | ||
| 1209 | if (buf.items.len > 0) { | ||
| 1210 | try buf.append(' '); | ||
| 1211 | } | ||
| 1212 | const bytes = p.comp.interner.get(message.val.ref()).bytes; | ||
| 1213 | try buf.ensureUnusedCapacity(bytes.len); | ||
| 1214 | try Value.printString(bytes, message.ty, p.comp, buf.writer()); | ||
| 1215 | } | ||
| 1216 | return try p.comp.diagnostics.arena.allocator().dupe(u8, buf.items); | ||
| 1217 | } | ||
| 1218 | |||
| 1219 | /// staticAssert | ||
| 1220 | /// : keyword_static_assert '(' integerConstExpr (',' STRING_LITERAL)? ')' ';' | ||
| 1221 | /// | keyword_c23_static_assert '(' integerConstExpr (',' STRING_LITERAL)? ')' ';' | ||
| 1222 | fn staticAssert(p: *Parser) Error!bool { | ||
| 1223 | const static_assert = p.eatToken(.keyword_static_assert) orelse p.eatToken(.keyword_c23_static_assert) orelse return false; | ||
| 1224 | const l_paren = try p.expectToken(.l_paren); | ||
| 1225 | const res_token = p.tok_i; | ||
| 1226 | var res = try p.constExpr(.gnu_folding_extension); | ||
| 1227 | const res_node = res.node; | ||
| 1228 | const str = if (p.eatToken(.comma) != null) | ||
| 1229 | switch (p.tok_ids[p.tok_i]) { | ||
| 1230 | .string_literal, | ||
| 1231 | .string_literal_utf_16, | ||
| 1232 | .string_literal_utf_8, | ||
| 1233 | .string_literal_utf_32, | ||
| 1234 | .string_literal_wide, | ||
| 1235 | .unterminated_string_literal, | ||
| 1236 | => try p.stringLiteral(), | ||
| 1237 | else => { | ||
| 1238 | try p.err(.expected_str_literal); | ||
| 1239 | return error.ParsingFailed; | ||
| 1240 | }, | ||
| 1241 | } | ||
| 1242 | else | ||
| 1243 | Result{}; | ||
| 1244 | try p.expectClosing(l_paren, .r_paren); | ||
| 1245 | _ = try p.expectToken(.semicolon); | ||
| 1246 | if (str.node == .none) { | ||
| 1247 | try p.errTok(.static_assert_missing_message, static_assert); | ||
| 1248 | try p.errStr(.pre_c23_compat, static_assert, "'_Static_assert' with no message"); | ||
| 1249 | } | ||
| 1250 | |||
| 1251 | // Array will never be zero; a value of zero for a pointer is a null pointer constant | ||
| 1252 | if ((res.ty.isArray() or res.ty.isPtr()) and !res.val.isZero(p.comp)) { | ||
| 1253 | const err_start = p.comp.diagnostics.list.items.len; | ||
| 1254 | try p.errTok(.const_decl_folded, res_token); | ||
| 1255 | if (res.ty.isPtr() and err_start != p.comp.diagnostics.list.items.len) { | ||
| 1256 | // Don't show the note if the .const_decl_folded diagnostic was not added | ||
| 1257 | try p.errTok(.constant_expression_conversion_not_allowed, res_token); | ||
| 1258 | } | ||
| 1259 | } | ||
| 1260 | try res.boolCast(p, .{ .specifier = .bool }, res_token); | ||
| 1261 | if (res.val.opt_ref == .none) { | ||
| 1262 | if (res.ty.specifier != .invalid) { | ||
| 1263 | try p.errTok(.static_assert_not_constant, res_token); | ||
| 1264 | } | ||
| 1265 | } else { | ||
| 1266 | if (!res.val.toBool(p.comp)) { | ||
| 1267 | if (try p.staticAssertMessage(res_node, str)) |message| { | ||
| 1268 | try p.errStr(.static_assert_failure_message, static_assert, message); | ||
| 1269 | } else { | ||
| 1270 | try p.errTok(.static_assert_failure, static_assert); | ||
| 1271 | } | ||
| 1272 | } | ||
| 1273 | } | ||
| 1274 | |||
| 1275 | const node = try p.addNode(.{ | ||
| 1276 | .tag = .static_assert, | ||
| 1277 | .data = .{ .bin = .{ | ||
| 1278 | .lhs = res.node, | ||
| 1279 | .rhs = str.node, | ||
| 1280 | } }, | ||
| 1281 | }); | ||
| 1282 | try p.decl_buf.append(node); | ||
| 1283 | return true; | ||
| 1284 | } | ||
| 1285 | |||
| 1286 | pub const DeclSpec = struct { | ||
| 1287 | storage_class: union(enum) { | ||
| 1288 | auto: TokenIndex, | ||
| 1289 | @"extern": TokenIndex, | ||
| 1290 | register: TokenIndex, | ||
| 1291 | static: TokenIndex, | ||
| 1292 | typedef: TokenIndex, | ||
| 1293 | none, | ||
| 1294 | } = .none, | ||
| 1295 | thread_local: ?TokenIndex = null, | ||
| 1296 | constexpr: ?TokenIndex = null, | ||
| 1297 | @"inline": ?TokenIndex = null, | ||
| 1298 | noreturn: ?TokenIndex = null, | ||
| 1299 | auto_type: ?TokenIndex = null, | ||
| 1300 | ty: Type, | ||
| 1301 | |||
| 1302 | fn validateParam(d: DeclSpec, p: *Parser, ty: *Type) Error!void { | ||
| 1303 | switch (d.storage_class) { | ||
| 1304 | .none => {}, | ||
| 1305 | .register => ty.qual.register = true, | ||
| 1306 | .auto, .@"extern", .static, .typedef => |tok_i| try p.errTok(.invalid_storage_on_param, tok_i), | ||
| 1307 | } | ||
| 1308 | if (d.thread_local) |tok_i| try p.errTok(.threadlocal_non_var, tok_i); | ||
| 1309 | if (d.@"inline") |tok_i| try p.errStr(.func_spec_non_func, tok_i, "inline"); | ||
| 1310 | if (d.noreturn) |tok_i| try p.errStr(.func_spec_non_func, tok_i, "_Noreturn"); | ||
| 1311 | if (d.constexpr) |tok_i| try p.errTok(.invalid_storage_on_param, tok_i); | ||
| 1312 | if (d.auto_type) |tok_i| { | ||
| 1313 | try p.errStr(.auto_type_not_allowed, tok_i, "function prototype"); | ||
| 1314 | ty.* = Type.invalid; | ||
| 1315 | } | ||
| 1316 | } | ||
| 1317 | |||
| 1318 | fn validateFnDef(d: DeclSpec, p: *Parser) Error!Tree.Tag { | ||
| 1319 | switch (d.storage_class) { | ||
| 1320 | .none, .@"extern", .static => {}, | ||
| 1321 | .auto, .register, .typedef => |tok_i| try p.errTok(.illegal_storage_on_func, tok_i), | ||
| 1322 | } | ||
| 1323 | if (d.thread_local) |tok_i| try p.errTok(.threadlocal_non_var, tok_i); | ||
| 1324 | if (d.constexpr) |tok_i| try p.errTok(.illegal_storage_on_func, tok_i); | ||
| 1325 | |||
| 1326 | const is_static = d.storage_class == .static; | ||
| 1327 | const is_inline = d.@"inline" != null; | ||
| 1328 | if (is_static) { | ||
| 1329 | if (is_inline) return .inline_static_fn_def; | ||
| 1330 | return .static_fn_def; | ||
| 1331 | } else { | ||
| 1332 | if (is_inline) return .inline_fn_def; | ||
| 1333 | return .fn_def; | ||
| 1334 | } | ||
| 1335 | } | ||
| 1336 | |||
| 1337 | fn validate(d: DeclSpec, p: *Parser, ty: *Type, has_init: bool) Error!Tree.Tag { | ||
| 1338 | const is_static = d.storage_class == .static; | ||
| 1339 | if (ty.isFunc() and d.storage_class != .typedef) { | ||
| 1340 | switch (d.storage_class) { | ||
| 1341 | .none, .@"extern" => {}, | ||
| 1342 | .static => |tok_i| if (p.func.ty != null) try p.errTok(.static_func_not_global, tok_i), | ||
| 1343 | .typedef => unreachable, | ||
| 1344 | .auto, .register => |tok_i| try p.errTok(.illegal_storage_on_func, tok_i), | ||
| 1345 | } | ||
| 1346 | if (d.thread_local) |tok_i| try p.errTok(.threadlocal_non_var, tok_i); | ||
| 1347 | if (d.constexpr) |tok_i| try p.errTok(.illegal_storage_on_func, tok_i); | ||
| 1348 | |||
| 1349 | const is_inline = d.@"inline" != null; | ||
| 1350 | if (is_static) { | ||
| 1351 | if (is_inline) return .inline_static_fn_proto; | ||
| 1352 | return .static_fn_proto; | ||
| 1353 | } else { | ||
| 1354 | if (is_inline) return .inline_fn_proto; | ||
| 1355 | return .fn_proto; | ||
| 1356 | } | ||
| 1357 | } else { | ||
| 1358 | if (d.@"inline") |tok_i| try p.errStr(.func_spec_non_func, tok_i, "inline"); | ||
| 1359 | // TODO move to attribute validation | ||
| 1360 | if (d.noreturn) |tok_i| try p.errStr(.func_spec_non_func, tok_i, "_Noreturn"); | ||
| 1361 | switch (d.storage_class) { | ||
| 1362 | .auto => if (p.func.ty == null and !p.comp.langopts.standard.atLeast(.c23)) { | ||
| 1363 | try p.err(.illegal_storage_on_global); | ||
| 1364 | }, | ||
| 1365 | .register => if (p.func.ty == null) try p.err(.illegal_storage_on_global), | ||
| 1366 | .typedef => return .typedef, | ||
| 1367 | else => {}, | ||
| 1368 | } | ||
| 1369 | ty.qual.register = d.storage_class == .register; | ||
| 1370 | |||
| 1371 | const is_extern = d.storage_class == .@"extern" and !has_init; | ||
| 1372 | if (d.thread_local != null) { | ||
| 1373 | if (is_static) return .threadlocal_static_var; | ||
| 1374 | if (is_extern) return .threadlocal_extern_var; | ||
| 1375 | return .threadlocal_var; | ||
| 1376 | } else { | ||
| 1377 | if (is_static) return .static_var; | ||
| 1378 | if (is_extern) return .extern_var; | ||
| 1379 | return .@"var"; | ||
| 1380 | } | ||
| 1381 | } | ||
| 1382 | } | ||
| 1383 | }; | ||
| 1384 | |||
| 1385 | /// typeof | ||
| 1386 | /// : keyword_typeof '(' typeName ')' | ||
| 1387 | /// | keyword_typeof '(' expr ')' | ||
| 1388 | fn typeof(p: *Parser) Error!?Type { | ||
| 1389 | var unqual = false; | ||
| 1390 | switch (p.tok_ids[p.tok_i]) { | ||
| 1391 | .keyword_typeof, .keyword_typeof1, .keyword_typeof2 => p.tok_i += 1, | ||
| 1392 | .keyword_typeof_unqual => { | ||
| 1393 | p.tok_i += 1; | ||
| 1394 | unqual = true; | ||
| 1395 | }, | ||
| 1396 | else => return null, | ||
| 1397 | } | ||
| 1398 | const l_paren = try p.expectToken(.l_paren); | ||
| 1399 | if (try p.typeName()) |ty| { | ||
| 1400 | try p.expectClosing(l_paren, .r_paren); | ||
| 1401 | const typeof_ty = try p.arena.create(Type); | ||
| 1402 | typeof_ty.* = .{ | ||
| 1403 | .data = ty.data, | ||
| 1404 | .qual = if (unqual) .{} else ty.qual.inheritFromTypeof(), | ||
| 1405 | .specifier = ty.specifier, | ||
| 1406 | }; | ||
| 1407 | |||
| 1408 | return Type{ | ||
| 1409 | .data = .{ .sub_type = typeof_ty }, | ||
| 1410 | .specifier = .typeof_type, | ||
| 1411 | }; | ||
| 1412 | } | ||
| 1413 | const typeof_expr = try p.parseNoEval(expr); | ||
| 1414 | try typeof_expr.expect(p); | ||
| 1415 | try p.expectClosing(l_paren, .r_paren); | ||
| 1416 | // Special case nullptr_t since it's defined as typeof(nullptr) | ||
| 1417 | if (typeof_expr.ty.is(.nullptr_t)) { | ||
| 1418 | return Type{ | ||
| 1419 | .specifier = .nullptr_t, | ||
| 1420 | .qual = if (unqual) .{} else typeof_expr.ty.qual.inheritFromTypeof(), | ||
| 1421 | }; | ||
| 1422 | } | ||
| 1423 | |||
| 1424 | const inner = try p.arena.create(Type.Expr); | ||
| 1425 | inner.* = .{ | ||
| 1426 | .node = typeof_expr.node, | ||
| 1427 | .ty = .{ | ||
| 1428 | .data = typeof_expr.ty.data, | ||
| 1429 | .qual = if (unqual) .{} else typeof_expr.ty.qual.inheritFromTypeof(), | ||
| 1430 | .specifier = typeof_expr.ty.specifier, | ||
| 1431 | }, | ||
| 1432 | }; | ||
| 1433 | |||
| 1434 | return Type{ | ||
| 1435 | .data = .{ .expr = inner }, | ||
| 1436 | .specifier = .typeof_expr, | ||
| 1437 | }; | ||
| 1438 | } | ||
| 1439 | |||
| 1440 | /// declSpec: (storageClassSpec | typeSpec | typeQual | funcSpec | alignSpec)+ | ||
| 1441 | /// funcSpec : keyword_inline | keyword_noreturn | ||
| 1442 | fn declSpec(p: *Parser) Error!?DeclSpec { | ||
| 1443 | var d: DeclSpec = .{ .ty = .{ .specifier = undefined } }; | ||
| 1444 | var spec: Type.Builder = .{}; | ||
| 1445 | |||
| 1446 | var combined_auto = !p.comp.langopts.standard.atLeast(.c23); | ||
| 1447 | const start = p.tok_i; | ||
| 1448 | while (true) { | ||
| 1449 | if (!combined_auto and d.storage_class == .auto) { | ||
| 1450 | try spec.combine(p, .c23_auto, d.storage_class.auto); | ||
| 1451 | combined_auto = true; | ||
| 1452 | } | ||
| 1453 | if (try p.storageClassSpec(&d)) continue; | ||
| 1454 | if (try p.typeSpec(&spec)) continue; | ||
| 1455 | const id = p.tok_ids[p.tok_i]; | ||
| 1456 | switch (id) { | ||
| 1457 | .keyword_inline, .keyword_inline1, .keyword_inline2 => { | ||
| 1458 | if (d.@"inline" != null) { | ||
| 1459 | try p.errStr(.duplicate_decl_spec, p.tok_i, "inline"); | ||
| 1460 | } | ||
| 1461 | d.@"inline" = p.tok_i; | ||
| 1462 | }, | ||
| 1463 | .keyword_noreturn => { | ||
| 1464 | if (d.noreturn != null) { | ||
| 1465 | try p.errStr(.duplicate_decl_spec, p.tok_i, "_Noreturn"); | ||
| 1466 | } | ||
| 1467 | d.noreturn = p.tok_i; | ||
| 1468 | }, | ||
| 1469 | else => break, | ||
| 1470 | } | ||
| 1471 | p.tok_i += 1; | ||
| 1472 | } | ||
| 1473 | |||
| 1474 | if (p.tok_i == start) return null; | ||
| 1475 | |||
| 1476 | d.ty = try spec.finish(p); | ||
| 1477 | d.auto_type = spec.auto_type_tok; | ||
| 1478 | return d; | ||
| 1479 | } | ||
| 1480 | |||
| 1481 | /// storageClassSpec: | ||
| 1482 | /// : keyword_typedef | ||
| 1483 | /// | keyword_extern | ||
| 1484 | /// | keyword_static | ||
| 1485 | /// | keyword_threadlocal | ||
| 1486 | /// | keyword_auto | ||
| 1487 | /// | keyword_register | ||
| 1488 | fn storageClassSpec(p: *Parser, d: *DeclSpec) Error!bool { | ||
| 1489 | const start = p.tok_i; | ||
| 1490 | while (true) { | ||
| 1491 | const id = p.tok_ids[p.tok_i]; | ||
| 1492 | switch (id) { | ||
| 1493 | .keyword_typedef, | ||
| 1494 | .keyword_extern, | ||
| 1495 | .keyword_static, | ||
| 1496 | .keyword_auto, | ||
| 1497 | .keyword_register, | ||
| 1498 | => { | ||
| 1499 | if (d.storage_class != .none) { | ||
| 1500 | try p.errStr(.multiple_storage_class, p.tok_i, @tagName(d.storage_class)); | ||
| 1501 | return error.ParsingFailed; | ||
| 1502 | } | ||
| 1503 | if (d.thread_local != null) { | ||
| 1504 | switch (id) { | ||
| 1505 | .keyword_extern, .keyword_static => {}, | ||
| 1506 | else => try p.errStr(.cannot_combine_spec, p.tok_i, id.lexeme().?), | ||
| 1507 | } | ||
| 1508 | if (d.constexpr) |tok| try p.errStr(.cannot_combine_spec, p.tok_i, p.tok_ids[tok].lexeme().?); | ||
| 1509 | } | ||
| 1510 | if (d.constexpr != null) { | ||
| 1511 | switch (id) { | ||
| 1512 | .keyword_auto, .keyword_register, .keyword_static => {}, | ||
| 1513 | else => try p.errStr(.cannot_combine_spec, p.tok_i, id.lexeme().?), | ||
| 1514 | } | ||
| 1515 | if (d.thread_local) |tok| try p.errStr(.cannot_combine_spec, p.tok_i, p.tok_ids[tok].lexeme().?); | ||
| 1516 | } | ||
| 1517 | switch (id) { | ||
| 1518 | .keyword_typedef => d.storage_class = .{ .typedef = p.tok_i }, | ||
| 1519 | .keyword_extern => d.storage_class = .{ .@"extern" = p.tok_i }, | ||
| 1520 | .keyword_static => d.storage_class = .{ .static = p.tok_i }, | ||
| 1521 | .keyword_auto => d.storage_class = .{ .auto = p.tok_i }, | ||
| 1522 | .keyword_register => d.storage_class = .{ .register = p.tok_i }, | ||
| 1523 | else => unreachable, | ||
| 1524 | } | ||
| 1525 | }, | ||
| 1526 | .keyword_thread_local, | ||
| 1527 | .keyword_c23_thread_local, | ||
| 1528 | => { | ||
| 1529 | if (d.thread_local != null) { | ||
| 1530 | try p.errStr(.duplicate_decl_spec, p.tok_i, id.lexeme().?); | ||
| 1531 | } | ||
| 1532 | if (d.constexpr) |tok| try p.errStr(.cannot_combine_spec, p.tok_i, p.tok_ids[tok].lexeme().?); | ||
| 1533 | switch (d.storage_class) { | ||
| 1534 | .@"extern", .none, .static => {}, | ||
| 1535 | else => try p.errStr(.cannot_combine_spec, p.tok_i, @tagName(d.storage_class)), | ||
| 1536 | } | ||
| 1537 | d.thread_local = p.tok_i; | ||
| 1538 | }, | ||
| 1539 | .keyword_constexpr => { | ||
| 1540 | if (d.constexpr != null) { | ||
| 1541 | try p.errStr(.duplicate_decl_spec, p.tok_i, id.lexeme().?); | ||
| 1542 | } | ||
| 1543 | if (d.thread_local) |tok| try p.errStr(.cannot_combine_spec, p.tok_i, p.tok_ids[tok].lexeme().?); | ||
| 1544 | switch (d.storage_class) { | ||
| 1545 | .auto, .register, .none, .static => {}, | ||
| 1546 | else => try p.errStr(.cannot_combine_spec, p.tok_i, @tagName(d.storage_class)), | ||
| 1547 | } | ||
| 1548 | d.constexpr = p.tok_i; | ||
| 1549 | }, | ||
| 1550 | else => break, | ||
| 1551 | } | ||
| 1552 | p.tok_i += 1; | ||
| 1553 | } | ||
| 1554 | return p.tok_i != start; | ||
| 1555 | } | ||
| 1556 | |||
| 1557 | const InitDeclarator = struct { d: Declarator, initializer: Result = .{} }; | ||
| 1558 | |||
| 1559 | /// attribute | ||
| 1560 | /// : attrIdentifier | ||
| 1561 | /// | attrIdentifier '(' identifier ')' | ||
| 1562 | /// | attrIdentifier '(' identifier (',' expr)+ ')' | ||
| 1563 | /// | attrIdentifier '(' (expr (',' expr)*)? ')' | ||
| 1564 | fn attribute(p: *Parser, kind: Attribute.Kind, namespace: ?[]const u8) Error!?TentativeAttribute { | ||
| 1565 | const name_tok = p.tok_i; | ||
| 1566 | switch (p.tok_ids[p.tok_i]) { | ||
| 1567 | .keyword_const, .keyword_const1, .keyword_const2 => p.tok_i += 1, | ||
| 1568 | else => _ = try p.expectIdentifier(), | ||
| 1569 | } | ||
| 1570 | const name = p.tokSlice(name_tok); | ||
| 1571 | |||
| 1572 | const attr = Attribute.fromString(kind, namespace, name) orelse { | ||
| 1573 | const tag: Diagnostics.Tag = if (kind == .declspec) .declspec_attr_not_supported else .unknown_attribute; | ||
| 1574 | try p.errStr(tag, name_tok, name); | ||
| 1575 | if (p.eatToken(.l_paren)) |_| p.skipTo(.r_paren); | ||
| 1576 | return null; | ||
| 1577 | }; | ||
| 1578 | |||
| 1579 | const required_count = Attribute.requiredArgCount(attr); | ||
| 1580 | var arguments = Attribute.initArguments(attr, name_tok); | ||
| 1581 | var arg_idx: u32 = 0; | ||
| 1582 | |||
| 1583 | switch (p.tok_ids[p.tok_i]) { | ||
| 1584 | .comma, .r_paren => {}, // will be consumed in attributeList | ||
| 1585 | .l_paren => blk: { | ||
| 1586 | p.tok_i += 1; | ||
| 1587 | if (p.eatToken(.r_paren)) |_| break :blk; | ||
| 1588 | |||
| 1589 | if (Attribute.wantsIdentEnum(attr)) { | ||
| 1590 | if (try p.eatIdentifier()) |ident| { | ||
| 1591 | if (Attribute.diagnoseIdent(attr, &arguments, p.tokSlice(ident))) |msg| { | ||
| 1592 | try p.errExtra(msg.tag, ident, msg.extra); | ||
| 1593 | p.skipTo(.r_paren); | ||
| 1594 | return error.ParsingFailed; | ||
| 1595 | } | ||
| 1596 | } else { | ||
| 1597 | try p.errExtra(.attribute_requires_identifier, name_tok, .{ .str = name }); | ||
| 1598 | return error.ParsingFailed; | ||
| 1599 | } | ||
| 1600 | } else { | ||
| 1601 | const arg_start = p.tok_i; | ||
| 1602 | var first_expr = try p.assignExpr(); | ||
| 1603 | try first_expr.expect(p); | ||
| 1604 | if (try p.diagnose(attr, &arguments, arg_idx, first_expr)) |msg| { | ||
| 1605 | try p.errExtra(msg.tag, arg_start, msg.extra); | ||
| 1606 | p.skipTo(.r_paren); | ||
| 1607 | return error.ParsingFailed; | ||
| 1608 | } | ||
| 1609 | } | ||
| 1610 | arg_idx += 1; | ||
| 1611 | while (p.eatToken(.r_paren) == null) : (arg_idx += 1) { | ||
| 1612 | _ = try p.expectToken(.comma); | ||
| 1613 | |||
| 1614 | const arg_start = p.tok_i; | ||
| 1615 | var arg_expr = try p.assignExpr(); | ||
| 1616 | try arg_expr.expect(p); | ||
| 1617 | if (try p.diagnose(attr, &arguments, arg_idx, arg_expr)) |msg| { | ||
| 1618 | try p.errExtra(msg.tag, arg_start, msg.extra); | ||
| 1619 | p.skipTo(.r_paren); | ||
| 1620 | return error.ParsingFailed; | ||
| 1621 | } | ||
| 1622 | } | ||
| 1623 | }, | ||
| 1624 | else => {}, | ||
| 1625 | } | ||
| 1626 | if (arg_idx < required_count) { | ||
| 1627 | try p.errExtra(.attribute_not_enough_args, name_tok, .{ .attr_arg_count = .{ .attribute = attr, .expected = required_count } }); | ||
| 1628 | return error.ParsingFailed; | ||
| 1629 | } | ||
| 1630 | return TentativeAttribute{ .attr = .{ .tag = attr, .args = arguments, .syntax = kind.toSyntax() }, .tok = name_tok }; | ||
| 1631 | } | ||
| 1632 | |||
| 1633 | fn diagnose(p: *Parser, attr: Attribute.Tag, arguments: *Attribute.Arguments, arg_idx: u32, res: Result) !?Diagnostics.Message { | ||
| 1634 | if (Attribute.wantsAlignment(attr, arg_idx)) { | ||
| 1635 | return Attribute.diagnoseAlignment(attr, arguments, arg_idx, res, p); | ||
| 1636 | } | ||
| 1637 | const node = p.nodes.get(@intFromEnum(res.node)); | ||
| 1638 | return Attribute.diagnose(attr, arguments, arg_idx, res, node, p); | ||
| 1639 | } | ||
| 1640 | |||
| 1641 | /// attributeList : (attribute (',' attribute)*)? | ||
| 1642 | fn gnuAttributeList(p: *Parser) Error!void { | ||
| 1643 | if (p.tok_ids[p.tok_i] == .r_paren) return; | ||
| 1644 | |||
| 1645 | if (try p.attribute(.gnu, null)) |attr| try p.attr_buf.append(p.gpa, attr); | ||
| 1646 | while (p.tok_ids[p.tok_i] != .r_paren) { | ||
| 1647 | _ = try p.expectToken(.comma); | ||
| 1648 | if (try p.attribute(.gnu, null)) |attr| try p.attr_buf.append(p.gpa, attr); | ||
| 1649 | } | ||
| 1650 | } | ||
| 1651 | |||
| 1652 | fn c23AttributeList(p: *Parser) Error!void { | ||
| 1653 | while (p.tok_ids[p.tok_i] != .r_bracket) { | ||
| 1654 | const namespace_tok = try p.expectIdentifier(); | ||
| 1655 | var namespace: ?[]const u8 = null; | ||
| 1656 | if (p.eatToken(.colon_colon)) |_| { | ||
| 1657 | namespace = p.tokSlice(namespace_tok); | ||
| 1658 | } else { | ||
| 1659 | p.tok_i -= 1; | ||
| 1660 | } | ||
| 1661 | if (try p.attribute(.c23, namespace)) |attr| try p.attr_buf.append(p.gpa, attr); | ||
| 1662 | _ = p.eatToken(.comma); | ||
| 1663 | } | ||
| 1664 | } | ||
| 1665 | |||
| 1666 | fn msvcAttributeList(p: *Parser) Error!void { | ||
| 1667 | while (p.tok_ids[p.tok_i] != .r_paren) { | ||
| 1668 | if (try p.attribute(.declspec, null)) |attr| try p.attr_buf.append(p.gpa, attr); | ||
| 1669 | _ = p.eatToken(.comma); | ||
| 1670 | } | ||
| 1671 | } | ||
| 1672 | |||
| 1673 | fn c23Attribute(p: *Parser) !bool { | ||
| 1674 | if (!p.comp.langopts.standard.atLeast(.c23)) return false; | ||
| 1675 | const bracket1 = p.eatToken(.l_bracket) orelse return false; | ||
| 1676 | const bracket2 = p.eatToken(.l_bracket) orelse { | ||
| 1677 | p.tok_i -= 1; | ||
| 1678 | return false; | ||
| 1679 | }; | ||
| 1680 | |||
| 1681 | try p.c23AttributeList(); | ||
| 1682 | |||
| 1683 | _ = try p.expectClosing(bracket2, .r_bracket); | ||
| 1684 | _ = try p.expectClosing(bracket1, .r_bracket); | ||
| 1685 | |||
| 1686 | return true; | ||
| 1687 | } | ||
| 1688 | |||
| 1689 | fn msvcAttribute(p: *Parser) !bool { | ||
| 1690 | _ = p.eatToken(.keyword_declspec) orelse return false; | ||
| 1691 | const l_paren = try p.expectToken(.l_paren); | ||
| 1692 | try p.msvcAttributeList(); | ||
| 1693 | _ = try p.expectClosing(l_paren, .r_paren); | ||
| 1694 | |||
| 1695 | return true; | ||
| 1696 | } | ||
| 1697 | |||
| 1698 | fn gnuAttribute(p: *Parser) !bool { | ||
| 1699 | switch (p.tok_ids[p.tok_i]) { | ||
| 1700 | .keyword_attribute1, .keyword_attribute2 => p.tok_i += 1, | ||
| 1701 | else => return false, | ||
| 1702 | } | ||
| 1703 | const paren1 = try p.expectToken(.l_paren); | ||
| 1704 | const paren2 = try p.expectToken(.l_paren); | ||
| 1705 | |||
| 1706 | try p.gnuAttributeList(); | ||
| 1707 | |||
| 1708 | _ = try p.expectClosing(paren2, .r_paren); | ||
| 1709 | _ = try p.expectClosing(paren1, .r_paren); | ||
| 1710 | return true; | ||
| 1711 | } | ||
| 1712 | |||
| 1713 | fn attributeSpecifier(p: *Parser) Error!void { | ||
| 1714 | return attributeSpecifierExtra(p, null); | ||
| 1715 | } | ||
| 1716 | |||
| 1717 | /// attributeSpecifier : (keyword_attribute '( '(' attributeList ')' ')')* | ||
| 1718 | fn attributeSpecifierExtra(p: *Parser, declarator_name: ?TokenIndex) Error!void { | ||
| 1719 | while (true) { | ||
| 1720 | if (try p.gnuAttribute()) continue; | ||
| 1721 | if (try p.c23Attribute()) continue; | ||
| 1722 | const maybe_declspec_tok = p.tok_i; | ||
| 1723 | const attr_buf_top = p.attr_buf.len; | ||
| 1724 | if (try p.msvcAttribute()) { | ||
| 1725 | if (declarator_name) |name_tok| { | ||
| 1726 | try p.errTok(.declspec_not_allowed_after_declarator, maybe_declspec_tok); | ||
| 1727 | try p.errTok(.declarator_name_tok, name_tok); | ||
| 1728 | p.attr_buf.len = attr_buf_top; | ||
| 1729 | } | ||
| 1730 | continue; | ||
| 1731 | } | ||
| 1732 | break; | ||
| 1733 | } | ||
| 1734 | } | ||
| 1735 | |||
| 1736 | /// initDeclarator : declarator assembly? attributeSpecifier? ('=' initializer)? | ||
| 1737 | fn initDeclarator(p: *Parser, decl_spec: *DeclSpec, attr_buf_top: usize) Error!?InitDeclarator { | ||
| 1738 | const this_attr_buf_top = p.attr_buf.len; | ||
| 1739 | defer p.attr_buf.len = this_attr_buf_top; | ||
| 1740 | |||
| 1741 | var init_d = InitDeclarator{ | ||
| 1742 | .d = (try p.declarator(decl_spec.ty, .normal)) orelse return null, | ||
| 1743 | }; | ||
| 1744 | |||
| 1745 | if (decl_spec.ty.is(.c23_auto) and !init_d.d.ty.is(.c23_auto)) { | ||
| 1746 | try p.errTok(.c23_auto_plain_declarator, decl_spec.storage_class.auto); | ||
| 1747 | return error.ParsingFailed; | ||
| 1748 | } | ||
| 1749 | |||
| 1750 | try p.attributeSpecifierExtra(init_d.d.name); | ||
| 1751 | _ = try p.assembly(.decl_label); | ||
| 1752 | try p.attributeSpecifierExtra(init_d.d.name); | ||
| 1753 | |||
| 1754 | var apply_var_attributes = false; | ||
| 1755 | if (decl_spec.storage_class == .typedef) { | ||
| 1756 | if (decl_spec.auto_type) |tok_i| { | ||
| 1757 | try p.errStr(.auto_type_not_allowed, tok_i, "typedef"); | ||
| 1758 | return error.ParsingFailed; | ||
| 1759 | } | ||
| 1760 | init_d.d.ty = try Attribute.applyTypeAttributes(p, init_d.d.ty, attr_buf_top, null); | ||
| 1761 | } else if (init_d.d.ty.isFunc()) { | ||
| 1762 | init_d.d.ty = try Attribute.applyFunctionAttributes(p, init_d.d.ty, attr_buf_top); | ||
| 1763 | } else { | ||
| 1764 | apply_var_attributes = true; | ||
| 1765 | } | ||
| 1766 | |||
| 1767 | if (p.eatToken(.equal)) |eq| init: { | ||
| 1768 | if (decl_spec.storage_class == .typedef or | ||
| 1769 | (init_d.d.func_declarator != null and init_d.d.ty.isFunc())) | ||
| 1770 | { | ||
| 1771 | try p.errTok(.illegal_initializer, eq); | ||
| 1772 | } else if (init_d.d.ty.is(.variable_len_array)) { | ||
| 1773 | try p.errTok(.vla_init, eq); | ||
| 1774 | } else if (decl_spec.storage_class == .@"extern") { | ||
| 1775 | try p.err(.extern_initializer); | ||
| 1776 | decl_spec.storage_class = .none; | ||
| 1777 | } | ||
| 1778 | |||
| 1779 | if (init_d.d.ty.hasIncompleteSize() and !init_d.d.ty.is(.incomplete_array)) { | ||
| 1780 | try p.errStr(.variable_incomplete_ty, init_d.d.name, try p.typeStr(init_d.d.ty)); | ||
| 1781 | return error.ParsingFailed; | ||
| 1782 | } | ||
| 1783 | if (p.tok_ids[p.tok_i] == .l_brace and init_d.d.ty.is(.c23_auto)) { | ||
| 1784 | try p.errTok(.c23_auto_scalar_init, decl_spec.storage_class.auto); | ||
| 1785 | return error.ParsingFailed; | ||
| 1786 | } | ||
| 1787 | |||
| 1788 | try p.syms.pushScope(p); | ||
| 1789 | defer p.syms.popScope(); | ||
| 1790 | |||
| 1791 | const interned_name = try StrInt.intern(p.comp, p.tokSlice(init_d.d.name)); | ||
| 1792 | try p.syms.declareSymbol(p, interned_name, init_d.d.ty, init_d.d.name, .none); | ||
| 1793 | var init_list_expr = try p.initializer(init_d.d.ty); | ||
| 1794 | init_d.initializer = init_list_expr; | ||
| 1795 | if (!init_list_expr.ty.isArray()) break :init; | ||
| 1796 | if (init_d.d.ty.specifier == .incomplete_array) { | ||
| 1797 | // Modifying .data is exceptionally allowed for .incomplete_array. | ||
| 1798 | init_d.d.ty.data.array.len = init_list_expr.ty.arrayLen() orelse break :init; | ||
| 1799 | init_d.d.ty.specifier = .array; | ||
| 1800 | } | ||
| 1801 | } | ||
| 1802 | |||
| 1803 | const name = init_d.d.name; | ||
| 1804 | const c23_auto = init_d.d.ty.is(.c23_auto); | ||
| 1805 | if (init_d.d.ty.is(.auto_type) or c23_auto) { | ||
| 1806 | if (init_d.initializer.node == .none) { | ||
| 1807 | init_d.d.ty = Type.invalid; | ||
| 1808 | if (c23_auto) { | ||
| 1809 | try p.errStr(.c32_auto_requires_initializer, decl_spec.storage_class.auto, p.tokSlice(name)); | ||
| 1810 | } else { | ||
| 1811 | try p.errStr(.auto_type_requires_initializer, name, p.tokSlice(name)); | ||
| 1812 | } | ||
| 1813 | return init_d; | ||
| 1814 | } else { | ||
| 1815 | init_d.d.ty.specifier = init_d.initializer.ty.specifier; | ||
| 1816 | init_d.d.ty.data = init_d.initializer.ty.data; | ||
| 1817 | } | ||
| 1818 | } | ||
| 1819 | if (apply_var_attributes) { | ||
| 1820 | init_d.d.ty = try Attribute.applyVariableAttributes(p, init_d.d.ty, attr_buf_top, null); | ||
| 1821 | } | ||
| 1822 | if (decl_spec.storage_class != .typedef and init_d.d.ty.hasIncompleteSize()) incomplete: { | ||
| 1823 | const specifier = init_d.d.ty.canonicalize(.standard).specifier; | ||
| 1824 | if (decl_spec.storage_class == .@"extern") switch (specifier) { | ||
| 1825 | .@"struct", .@"union", .@"enum" => break :incomplete, | ||
| 1826 | .incomplete_array => { | ||
| 1827 | init_d.d.ty.decayArray(); | ||
| 1828 | break :incomplete; | ||
| 1829 | }, | ||
| 1830 | else => {}, | ||
| 1831 | }; | ||
| 1832 | // if there was an initializer expression it must have contained an error | ||
| 1833 | if (init_d.initializer.node != .none) break :incomplete; | ||
| 1834 | |||
| 1835 | if (p.func.ty == null) { | ||
| 1836 | if (specifier == .incomplete_array) { | ||
| 1837 | // TODO properly check this after finishing parsing | ||
| 1838 | try p.errStr(.tentative_array, name, try p.typeStr(init_d.d.ty)); | ||
| 1839 | break :incomplete; | ||
| 1840 | } else if (init_d.d.ty.getRecord()) |record| { | ||
| 1841 | _ = try p.tentative_defs.getOrPutValue(p.gpa, record.name, init_d.d.name); | ||
| 1842 | break :incomplete; | ||
| 1843 | } else if (init_d.d.ty.get(.@"enum")) |en| { | ||
| 1844 | _ = try p.tentative_defs.getOrPutValue(p.gpa, en.data.@"enum".name, init_d.d.name); | ||
| 1845 | break :incomplete; | ||
| 1846 | } | ||
| 1847 | } | ||
| 1848 | try p.errStr(.variable_incomplete_ty, name, try p.typeStr(init_d.d.ty)); | ||
| 1849 | } | ||
| 1850 | return init_d; | ||
| 1851 | } | ||
| 1852 | |||
| 1853 | /// typeSpec | ||
| 1854 | /// : keyword_void | ||
| 1855 | /// | keyword_auto_type | ||
| 1856 | /// | keyword_char | ||
| 1857 | /// | keyword_short | ||
| 1858 | /// | keyword_int | ||
| 1859 | /// | keyword_long | ||
| 1860 | /// | keyword_float | ||
| 1861 | /// | keyword_double | ||
| 1862 | /// | keyword_signed | ||
| 1863 | /// | keyword_unsigned | ||
| 1864 | /// | keyword_bool | ||
| 1865 | /// | keyword_c23_bool | ||
| 1866 | /// | keyword_complex | ||
| 1867 | /// | atomicTypeSpec | ||
| 1868 | /// | recordSpec | ||
| 1869 | /// | enumSpec | ||
| 1870 | /// | typedef // IDENTIFIER | ||
| 1871 | /// | typeof | ||
| 1872 | /// | keyword_bit_int '(' integerConstExpr ')' | ||
| 1873 | /// atomicTypeSpec : keyword_atomic '(' typeName ')' | ||
| 1874 | /// alignSpec | ||
| 1875 | /// : keyword_alignas '(' typeName ')' | ||
| 1876 | /// | keyword_alignas '(' integerConstExpr ')' | ||
| 1877 | /// | keyword_c23_alignas '(' typeName ')' | ||
| 1878 | /// | keyword_c23_alignas '(' integerConstExpr ')' | ||
| 1879 | fn typeSpec(p: *Parser, ty: *Type.Builder) Error!bool { | ||
| 1880 | const start = p.tok_i; | ||
| 1881 | while (true) { | ||
| 1882 | try p.attributeSpecifier(); | ||
| 1883 | |||
| 1884 | if (try p.typeof()) |inner_ty| { | ||
| 1885 | try ty.combineFromTypeof(p, inner_ty, start); | ||
| 1886 | continue; | ||
| 1887 | } | ||
| 1888 | if (try p.typeQual(&ty.qual)) continue; | ||
| 1889 | switch (p.tok_ids[p.tok_i]) { | ||
| 1890 | .keyword_void => try ty.combine(p, .void, p.tok_i), | ||
| 1891 | .keyword_auto_type => { | ||
| 1892 | try p.errTok(.auto_type_extension, p.tok_i); | ||
| 1893 | try ty.combine(p, .auto_type, p.tok_i); | ||
| 1894 | }, | ||
| 1895 | .keyword_bool, .keyword_c23_bool => try ty.combine(p, .bool, p.tok_i), | ||
| 1896 | .keyword_int8, .keyword_int8_2, .keyword_char => try ty.combine(p, .char, p.tok_i), | ||
| 1897 | .keyword_int16, .keyword_int16_2, .keyword_short => try ty.combine(p, .short, p.tok_i), | ||
| 1898 | .keyword_int32, .keyword_int32_2, .keyword_int => try ty.combine(p, .int, p.tok_i), | ||
| 1899 | .keyword_long => try ty.combine(p, .long, p.tok_i), | ||
| 1900 | .keyword_int64, .keyword_int64_2 => try ty.combine(p, .long_long, p.tok_i), | ||
| 1901 | .keyword_int128 => try ty.combine(p, .int128, p.tok_i), | ||
| 1902 | .keyword_signed => try ty.combine(p, .signed, p.tok_i), | ||
| 1903 | .keyword_unsigned => try ty.combine(p, .unsigned, p.tok_i), | ||
| 1904 | .keyword_fp16 => try ty.combine(p, .fp16, p.tok_i), | ||
| 1905 | .keyword_float16 => try ty.combine(p, .float16, p.tok_i), | ||
| 1906 | .keyword_float => try ty.combine(p, .float, p.tok_i), | ||
| 1907 | .keyword_double => try ty.combine(p, .double, p.tok_i), | ||
| 1908 | .keyword_complex => try ty.combine(p, .complex, p.tok_i), | ||
| 1909 | .keyword_float80 => try ty.combine(p, .float80, p.tok_i), | ||
| 1910 | .keyword_float128_1, .keyword_float128_2 => { | ||
| 1911 | if (!p.comp.hasFloat128()) { | ||
| 1912 | try p.errStr(.type_not_supported_on_target, p.tok_i, p.tok_ids[p.tok_i].lexeme().?); | ||
| 1913 | } | ||
| 1914 | try ty.combine(p, .float128, p.tok_i); | ||
| 1915 | }, | ||
| 1916 | .keyword_atomic => { | ||
| 1917 | const atomic_tok = p.tok_i; | ||
| 1918 | p.tok_i += 1; | ||
| 1919 | const l_paren = p.eatToken(.l_paren) orelse { | ||
| 1920 | // _Atomic qualifier not _Atomic(typeName) | ||
| 1921 | p.tok_i = atomic_tok; | ||
| 1922 | break; | ||
| 1923 | }; | ||
| 1924 | const inner_ty = (try p.typeName()) orelse { | ||
| 1925 | try p.err(.expected_type); | ||
| 1926 | return error.ParsingFailed; | ||
| 1927 | }; | ||
| 1928 | try p.expectClosing(l_paren, .r_paren); | ||
| 1929 | |||
| 1930 | const new_spec = Type.Builder.fromType(inner_ty); | ||
| 1931 | try ty.combine(p, new_spec, atomic_tok); | ||
| 1932 | |||
| 1933 | if (ty.qual.atomic != null) | ||
| 1934 | try p.errStr(.duplicate_decl_spec, atomic_tok, "atomic") | ||
| 1935 | else | ||
| 1936 | ty.qual.atomic = atomic_tok; | ||
| 1937 | continue; | ||
| 1938 | }, | ||
| 1939 | .keyword_alignas, | ||
| 1940 | .keyword_c23_alignas, | ||
| 1941 | => { | ||
| 1942 | const align_tok = p.tok_i; | ||
| 1943 | p.tok_i += 1; | ||
| 1944 | const l_paren = try p.expectToken(.l_paren); | ||
| 1945 | const typename_start = p.tok_i; | ||
| 1946 | if (try p.typeName()) |inner_ty| { | ||
| 1947 | if (!inner_ty.alignable()) { | ||
| 1948 | try p.errStr(.invalid_alignof, typename_start, try p.typeStr(inner_ty)); | ||
| 1949 | } | ||
| 1950 | const alignment = Attribute.Alignment{ .requested = inner_ty.alignof(p.comp) }; | ||
| 1951 | try p.attr_buf.append(p.gpa, .{ | ||
| 1952 | .attr = .{ .tag = .aligned, .args = .{ | ||
| 1953 | .aligned = .{ .alignment = alignment, .__name_tok = align_tok }, | ||
| 1954 | }, .syntax = .keyword }, | ||
| 1955 | .tok = align_tok, | ||
| 1956 | }); | ||
| 1957 | } else { | ||
| 1958 | const arg_start = p.tok_i; | ||
| 1959 | const res = try p.integerConstExpr(.no_const_decl_folding); | ||
| 1960 | if (!res.val.isZero(p.comp)) { | ||
| 1961 | var args = Attribute.initArguments(.aligned, align_tok); | ||
| 1962 | if (try p.diagnose(.aligned, &args, 0, res)) |msg| { | ||
| 1963 | try p.errExtra(msg.tag, arg_start, msg.extra); | ||
| 1964 | p.skipTo(.r_paren); | ||
| 1965 | return error.ParsingFailed; | ||
| 1966 | } | ||
| 1967 | args.aligned.alignment.?.node = res.node; | ||
| 1968 | try p.attr_buf.append(p.gpa, .{ | ||
| 1969 | .attr = .{ .tag = .aligned, .args = args, .syntax = .keyword }, | ||
| 1970 | .tok = align_tok, | ||
| 1971 | }); | ||
| 1972 | } | ||
| 1973 | } | ||
| 1974 | try p.expectClosing(l_paren, .r_paren); | ||
| 1975 | continue; | ||
| 1976 | }, | ||
| 1977 | .keyword_stdcall, | ||
| 1978 | .keyword_stdcall2, | ||
| 1979 | .keyword_thiscall, | ||
| 1980 | .keyword_thiscall2, | ||
| 1981 | .keyword_vectorcall, | ||
| 1982 | .keyword_vectorcall2, | ||
| 1983 | => try p.attr_buf.append(p.gpa, .{ | ||
| 1984 | .attr = .{ .tag = .calling_convention, .args = .{ | ||
| 1985 | .calling_convention = .{ .cc = switch (p.tok_ids[p.tok_i]) { | ||
| 1986 | .keyword_stdcall, | ||
| 1987 | .keyword_stdcall2, | ||
| 1988 | => .stdcall, | ||
| 1989 | .keyword_thiscall, | ||
| 1990 | .keyword_thiscall2, | ||
| 1991 | => .thiscall, | ||
| 1992 | .keyword_vectorcall, | ||
| 1993 | .keyword_vectorcall2, | ||
| 1994 | => .vectorcall, | ||
| 1995 | else => unreachable, | ||
| 1996 | } }, | ||
| 1997 | }, .syntax = .keyword }, | ||
| 1998 | .tok = p.tok_i, | ||
| 1999 | }), | ||
| 2000 | .keyword_struct, .keyword_union => { | ||
| 2001 | const tag_tok = p.tok_i; | ||
| 2002 | const record_ty = try p.recordSpec(); | ||
| 2003 | try ty.combine(p, Type.Builder.fromType(record_ty), tag_tok); | ||
| 2004 | continue; | ||
| 2005 | }, | ||
| 2006 | .keyword_enum => { | ||
| 2007 | const tag_tok = p.tok_i; | ||
| 2008 | const enum_ty = try p.enumSpec(); | ||
| 2009 | try ty.combine(p, Type.Builder.fromType(enum_ty), tag_tok); | ||
| 2010 | continue; | ||
| 2011 | }, | ||
| 2012 | .identifier, .extended_identifier => { | ||
| 2013 | var interned_name = try StrInt.intern(p.comp, p.tokSlice(p.tok_i)); | ||
| 2014 | var declspec_found = false; | ||
| 2015 | |||
| 2016 | if (interned_name == p.string_ids.declspec_id) { | ||
| 2017 | try p.errTok(.declspec_not_enabled, p.tok_i); | ||
| 2018 | p.tok_i += 1; | ||
| 2019 | if (p.eatToken(.l_paren)) |_| { | ||
| 2020 | p.skipTo(.r_paren); | ||
| 2021 | continue; | ||
| 2022 | } | ||
| 2023 | declspec_found = true; | ||
| 2024 | } | ||
| 2025 | if (ty.typedef != null) break; | ||
| 2026 | if (declspec_found) { | ||
| 2027 | interned_name = try StrInt.intern(p.comp, p.tokSlice(p.tok_i)); | ||
| 2028 | } | ||
| 2029 | const typedef = (try p.syms.findTypedef(p, interned_name, p.tok_i, ty.specifier != .none)) orelse break; | ||
| 2030 | if (!ty.combineTypedef(p, typedef.ty, typedef.tok)) break; | ||
| 2031 | }, | ||
| 2032 | .keyword_bit_int => { | ||
| 2033 | try p.err(.bit_int); | ||
| 2034 | const bit_int_tok = p.tok_i; | ||
| 2035 | p.tok_i += 1; | ||
| 2036 | const l_paren = try p.expectToken(.l_paren); | ||
| 2037 | const res = try p.integerConstExpr(.gnu_folding_extension); | ||
| 2038 | try p.expectClosing(l_paren, .r_paren); | ||
| 2039 | |||
| 2040 | var bits: u64 = undefined; | ||
| 2041 | if (res.val.opt_ref == .none) { | ||
| 2042 | try p.errTok(.expected_integer_constant_expr, bit_int_tok); | ||
| 2043 | return error.ParsingFailed; | ||
| 2044 | } else if (res.val.compare(.lte, Value.zero, p.comp)) { | ||
| 2045 | bits = 0; | ||
| 2046 | } else { | ||
| 2047 | bits = res.val.toInt(u64, p.comp) orelse std.math.maxInt(u64); | ||
| 2048 | } | ||
| 2049 | |||
| 2050 | try ty.combine(p, .{ .bit_int = bits }, bit_int_tok); | ||
| 2051 | continue; | ||
| 2052 | }, | ||
| 2053 | else => break, | ||
| 2054 | } | ||
| 2055 | // consume single token specifiers here | ||
| 2056 | p.tok_i += 1; | ||
| 2057 | } | ||
| 2058 | return p.tok_i != start; | ||
| 2059 | } | ||
| 2060 | |||
| 2061 | fn getAnonymousName(p: *Parser, kind_tok: TokenIndex) !StringId { | ||
| 2062 | const loc = p.pp.tokens.items(.loc)[kind_tok]; | ||
| 2063 | const source = p.comp.getSource(loc.id); | ||
| 2064 | const line_col = source.lineCol(loc); | ||
| 2065 | |||
| 2066 | const kind_str = switch (p.tok_ids[kind_tok]) { | ||
| 2067 | .keyword_struct, .keyword_union, .keyword_enum => p.tokSlice(kind_tok), | ||
| 2068 | else => "record field", | ||
| 2069 | }; | ||
| 2070 | |||
| 2071 | const str = try std.fmt.allocPrint( | ||
| 2072 | p.arena, | ||
| 2073 | "(anonymous {s} at {s}:{d}:{d})", | ||
| 2074 | .{ kind_str, source.path, line_col.line_no, line_col.col }, | ||
| 2075 | ); | ||
| 2076 | return StrInt.intern(p.comp, str); | ||
| 2077 | } | ||
| 2078 | |||
| 2079 | /// recordSpec | ||
| 2080 | /// : (keyword_struct | keyword_union) IDENTIFIER? { recordDecl* } | ||
| 2081 | /// | (keyword_struct | keyword_union) IDENTIFIER | ||
| 2082 | fn recordSpec(p: *Parser) Error!Type { | ||
| 2083 | const starting_pragma_pack = p.pragma_pack; | ||
| 2084 | const kind_tok = p.tok_i; | ||
| 2085 | const is_struct = p.tok_ids[kind_tok] == .keyword_struct; | ||
| 2086 | p.tok_i += 1; | ||
| 2087 | const attr_buf_top = p.attr_buf.len; | ||
| 2088 | defer p.attr_buf.len = attr_buf_top; | ||
| 2089 | try p.attributeSpecifier(); | ||
| 2090 | |||
| 2091 | const maybe_ident = try p.eatIdentifier(); | ||
| 2092 | const l_brace = p.eatToken(.l_brace) orelse { | ||
| 2093 | const ident = maybe_ident orelse { | ||
| 2094 | try p.err(.ident_or_l_brace); | ||
| 2095 | return error.ParsingFailed; | ||
| 2096 | }; | ||
| 2097 | // check if this is a reference to a previous type | ||
| 2098 | const interned_name = try StrInt.intern(p.comp, p.tokSlice(ident)); | ||
| 2099 | if (try p.syms.findTag(p, interned_name, p.tok_ids[kind_tok], ident, p.tok_ids[p.tok_i])) |prev| { | ||
| 2100 | return prev.ty; | ||
| 2101 | } else { | ||
| 2102 | // this is a forward declaration, create a new record Type. | ||
| 2103 | const record_ty = try Type.Record.create(p.arena, interned_name); | ||
| 2104 | const ty = try Attribute.applyTypeAttributes(p, .{ | ||
| 2105 | .specifier = if (is_struct) .@"struct" else .@"union", | ||
| 2106 | .data = .{ .record = record_ty }, | ||
| 2107 | }, attr_buf_top, null); | ||
| 2108 | try p.syms.syms.append(p.gpa, .{ | ||
| 2109 | .kind = if (is_struct) .@"struct" else .@"union", | ||
| 2110 | .name = interned_name, | ||
| 2111 | .tok = ident, | ||
| 2112 | .ty = ty, | ||
| 2113 | .val = .{}, | ||
| 2114 | }); | ||
| 2115 | try p.decl_buf.append(try p.addNode(.{ | ||
| 2116 | .tag = if (is_struct) .struct_forward_decl else .union_forward_decl, | ||
| 2117 | .ty = ty, | ||
| 2118 | .data = .{ .decl_ref = ident }, | ||
| 2119 | })); | ||
| 2120 | return ty; | ||
| 2121 | } | ||
| 2122 | }; | ||
| 2123 | |||
| 2124 | var done = false; | ||
| 2125 | errdefer if (!done) p.skipTo(.r_brace); | ||
| 2126 | |||
| 2127 | // Get forward declared type or create a new one | ||
| 2128 | var defined = false; | ||
| 2129 | const record_ty: *Type.Record = if (maybe_ident) |ident| record_ty: { | ||
| 2130 | const ident_str = p.tokSlice(ident); | ||
| 2131 | const interned_name = try StrInt.intern(p.comp, ident_str); | ||
| 2132 | if (try p.syms.defineTag(p, interned_name, p.tok_ids[kind_tok], ident)) |prev| { | ||
| 2133 | if (!prev.ty.hasIncompleteSize()) { | ||
| 2134 | // if the record isn't incomplete, this is a redefinition | ||
| 2135 | try p.errStr(.redefinition, ident, ident_str); | ||
| 2136 | try p.errTok(.previous_definition, prev.tok); | ||
| 2137 | } else { | ||
| 2138 | defined = true; | ||
| 2139 | break :record_ty prev.ty.get(if (is_struct) .@"struct" else .@"union").?.data.record; | ||
| 2140 | } | ||
| 2141 | } | ||
| 2142 | break :record_ty try Type.Record.create(p.arena, interned_name); | ||
| 2143 | } else try Type.Record.create(p.arena, try p.getAnonymousName(kind_tok)); | ||
| 2144 | |||
| 2145 | // Initially create ty as a regular non-attributed type, since attributes for a record | ||
| 2146 | // can be specified after the closing rbrace, which we haven't encountered yet. | ||
| 2147 | var ty = Type{ | ||
| 2148 | .specifier = if (is_struct) .@"struct" else .@"union", | ||
| 2149 | .data = .{ .record = record_ty }, | ||
| 2150 | }; | ||
| 2151 | |||
| 2152 | // declare a symbol for the type | ||
| 2153 | // We need to replace the symbol's type if it has attributes | ||
| 2154 | var symbol_index: ?usize = null; | ||
| 2155 | if (maybe_ident != null and !defined) { | ||
| 2156 | symbol_index = p.syms.syms.len; | ||
| 2157 | try p.syms.syms.append(p.gpa, .{ | ||
| 2158 | .kind = if (is_struct) .@"struct" else .@"union", | ||
| 2159 | .name = record_ty.name, | ||
| 2160 | .tok = maybe_ident.?, | ||
| 2161 | .ty = ty, | ||
| 2162 | .val = .{}, | ||
| 2163 | }); | ||
| 2164 | } | ||
| 2165 | |||
| 2166 | // reserve space for this record | ||
| 2167 | try p.decl_buf.append(.none); | ||
| 2168 | const decl_buf_top = p.decl_buf.items.len; | ||
| 2169 | const record_buf_top = p.record_buf.items.len; | ||
| 2170 | errdefer p.decl_buf.items.len = decl_buf_top - 1; | ||
| 2171 | defer { | ||
| 2172 | p.decl_buf.items.len = decl_buf_top; | ||
| 2173 | p.record_buf.items.len = record_buf_top; | ||
| 2174 | } | ||
| 2175 | |||
| 2176 | const old_record = p.record; | ||
| 2177 | const old_members = p.record_members.items.len; | ||
| 2178 | const old_field_attr_start = p.field_attr_buf.items.len; | ||
| 2179 | p.record = .{ | ||
| 2180 | .kind = p.tok_ids[kind_tok], | ||
| 2181 | .start = p.record_members.items.len, | ||
| 2182 | .field_attr_start = p.field_attr_buf.items.len, | ||
| 2183 | }; | ||
| 2184 | defer p.record = old_record; | ||
| 2185 | defer p.record_members.items.len = old_members; | ||
| 2186 | defer p.field_attr_buf.items.len = old_field_attr_start; | ||
| 2187 | |||
| 2188 | try p.recordDecls(); | ||
| 2189 | |||
| 2190 | if (p.record.flexible_field) |some| { | ||
| 2191 | if (p.record_buf.items[record_buf_top..].len == 1 and is_struct) { | ||
| 2192 | try p.errTok(.flexible_in_empty, some); | ||
| 2193 | } | ||
| 2194 | } | ||
| 2195 | |||
| 2196 | for (p.record_buf.items[record_buf_top..]) |field| { | ||
| 2197 | if (field.ty.hasIncompleteSize() and !field.ty.is(.incomplete_array)) break; | ||
| 2198 | } else { | ||
| 2199 | record_ty.fields = try p.arena.dupe(Type.Record.Field, p.record_buf.items[record_buf_top..]); | ||
| 2200 | } | ||
| 2201 | if (old_field_attr_start < p.field_attr_buf.items.len) { | ||
| 2202 | const field_attr_slice = p.field_attr_buf.items[old_field_attr_start..]; | ||
| 2203 | const duped = try p.arena.dupe([]const Attribute, field_attr_slice); | ||
| 2204 | record_ty.field_attributes = duped.ptr; | ||
| 2205 | } | ||
| 2206 | |||
| 2207 | if (p.record_buf.items.len == record_buf_top) { | ||
| 2208 | try p.errStr(.empty_record, kind_tok, p.tokSlice(kind_tok)); | ||
| 2209 | try p.errStr(.empty_record_size, kind_tok, p.tokSlice(kind_tok)); | ||
| 2210 | } | ||
| 2211 | try p.expectClosing(l_brace, .r_brace); | ||
| 2212 | done = true; | ||
| 2213 | try p.attributeSpecifier(); | ||
| 2214 | |||
| 2215 | ty = try Attribute.applyTypeAttributes(p, .{ | ||
| 2216 | .specifier = if (is_struct) .@"struct" else .@"union", | ||
| 2217 | .data = .{ .record = record_ty }, | ||
| 2218 | }, attr_buf_top, null); | ||
| 2219 | if (ty.specifier == .attributed and symbol_index != null) { | ||
| 2220 | p.syms.syms.items(.ty)[symbol_index.?] = ty; | ||
| 2221 | } | ||
| 2222 | |||
| 2223 | if (!ty.hasIncompleteSize()) { | ||
| 2224 | const pragma_pack_value = switch (p.comp.langopts.emulate) { | ||
| 2225 | .clang => starting_pragma_pack, | ||
| 2226 | .gcc => p.pragma_pack, | ||
| 2227 | // TODO: msvc considers `#pragma pack` on a per-field basis | ||
| 2228 | .msvc => p.pragma_pack, | ||
| 2229 | }; | ||
| 2230 | record_layout.compute(record_ty, ty, p.comp, pragma_pack_value); | ||
| 2231 | } | ||
| 2232 | |||
| 2233 | // finish by creating a node | ||
| 2234 | var node: Tree.Node = .{ | ||
| 2235 | .tag = if (is_struct) .struct_decl_two else .union_decl_two, | ||
| 2236 | .ty = ty, | ||
| 2237 | .data = .{ .bin = .{ .lhs = .none, .rhs = .none } }, | ||
| 2238 | }; | ||
| 2239 | const record_decls = p.decl_buf.items[decl_buf_top..]; | ||
| 2240 | switch (record_decls.len) { | ||
| 2241 | 0 => {}, | ||
| 2242 | 1 => node.data = .{ .bin = .{ .lhs = record_decls[0], .rhs = .none } }, | ||
| 2243 | 2 => node.data = .{ .bin = .{ .lhs = record_decls[0], .rhs = record_decls[1] } }, | ||
| 2244 | else => { | ||
| 2245 | node.tag = if (is_struct) .struct_decl else .union_decl; | ||
| 2246 | node.data = .{ .range = try p.addList(record_decls) }; | ||
| 2247 | }, | ||
| 2248 | } | ||
| 2249 | p.decl_buf.items[decl_buf_top - 1] = try p.addNode(node); | ||
| 2250 | if (p.func.ty == null) { | ||
| 2251 | _ = p.tentative_defs.remove(record_ty.name); | ||
| 2252 | } | ||
| 2253 | return ty; | ||
| 2254 | } | ||
| 2255 | |||
| 2256 | /// recordDecl | ||
| 2257 | /// : specQual (recordDeclarator (',' recordDeclarator)*)? ; | ||
| 2258 | /// | staticAssert | ||
| 2259 | fn recordDecls(p: *Parser) Error!void { | ||
| 2260 | while (true) { | ||
| 2261 | if (try p.pragma()) continue; | ||
| 2262 | if (try p.parseOrNextDecl(staticAssert)) continue; | ||
| 2263 | if (p.eatToken(.keyword_extension)) |_| { | ||
| 2264 | const saved_extension = p.extension_suppressed; | ||
| 2265 | defer p.extension_suppressed = saved_extension; | ||
| 2266 | p.extension_suppressed = true; | ||
| 2267 | |||
| 2268 | if (try p.parseOrNextDecl(recordDeclarator)) continue; | ||
| 2269 | try p.err(.expected_type); | ||
| 2270 | p.nextExternDecl(); | ||
| 2271 | continue; | ||
| 2272 | } | ||
| 2273 | if (try p.parseOrNextDecl(recordDeclarator)) continue; | ||
| 2274 | break; | ||
| 2275 | } | ||
| 2276 | } | ||
| 2277 | |||
| 2278 | /// recordDeclarator : keyword_extension? declarator (':' integerConstExpr)? | ||
| 2279 | fn recordDeclarator(p: *Parser) Error!bool { | ||
| 2280 | const attr_buf_top = p.attr_buf.len; | ||
| 2281 | defer p.attr_buf.len = attr_buf_top; | ||
| 2282 | const base_ty = (try p.specQual()) orelse return false; | ||
| 2283 | |||
| 2284 | try p.attributeSpecifier(); // .record | ||
| 2285 | while (true) { | ||
| 2286 | const this_decl_top = p.attr_buf.len; | ||
| 2287 | defer p.attr_buf.len = this_decl_top; | ||
| 2288 | |||
| 2289 | try p.attributeSpecifier(); | ||
| 2290 | |||
| 2291 | // 0 means unnamed | ||
| 2292 | var name_tok: TokenIndex = 0; | ||
| 2293 | var ty = base_ty; | ||
| 2294 | if (ty.is(.auto_type)) { | ||
| 2295 | try p.errStr(.auto_type_not_allowed, p.tok_i, if (p.record.kind == .keyword_struct) "struct member" else "union member"); | ||
| 2296 | ty = Type.invalid; | ||
| 2297 | } | ||
| 2298 | var bits_node: NodeIndex = .none; | ||
| 2299 | var bits: ?u32 = null; | ||
| 2300 | const first_tok = p.tok_i; | ||
| 2301 | if (try p.declarator(ty, .record)) |d| { | ||
| 2302 | name_tok = d.name; | ||
| 2303 | ty = d.ty; | ||
| 2304 | } | ||
| 2305 | |||
| 2306 | if (p.eatToken(.colon)) |_| bits: { | ||
| 2307 | const bits_tok = p.tok_i; | ||
| 2308 | const res = try p.integerConstExpr(.gnu_folding_extension); | ||
| 2309 | if (!ty.isInt()) { | ||
| 2310 | try p.errStr(.non_int_bitfield, first_tok, try p.typeStr(ty)); | ||
| 2311 | break :bits; | ||
| 2312 | } | ||
| 2313 | |||
| 2314 | if (res.val.opt_ref == .none) { | ||
| 2315 | try p.errTok(.expected_integer_constant_expr, bits_tok); | ||
| 2316 | break :bits; | ||
| 2317 | } else if (res.val.compare(.lt, Value.zero, p.comp)) { | ||
| 2318 | try p.errStr(.negative_bitwidth, first_tok, try res.str(p)); | ||
| 2319 | break :bits; | ||
| 2320 | } | ||
| 2321 | |||
| 2322 | // incomplete size error is reported later | ||
| 2323 | const bit_size = ty.bitSizeof(p.comp) orelse break :bits; | ||
| 2324 | const bits_unchecked = res.val.toInt(u32, p.comp) orelse std.math.maxInt(u32); | ||
| 2325 | if (bits_unchecked > bit_size) { | ||
| 2326 | try p.errTok(.bitfield_too_big, name_tok); | ||
| 2327 | break :bits; | ||
| 2328 | } else if (bits_unchecked == 0 and name_tok != 0) { | ||
| 2329 | try p.errTok(.zero_width_named_field, name_tok); | ||
| 2330 | break :bits; | ||
| 2331 | } | ||
| 2332 | |||
| 2333 | bits = bits_unchecked; | ||
| 2334 | bits_node = res.node; | ||
| 2335 | } | ||
| 2336 | |||
| 2337 | try p.attributeSpecifier(); // .record | ||
| 2338 | const to_append = try Attribute.applyFieldAttributes(p, &ty, attr_buf_top); | ||
| 2339 | |||
| 2340 | const any_fields_have_attrs = p.field_attr_buf.items.len > p.record.field_attr_start; | ||
| 2341 | |||
| 2342 | if (any_fields_have_attrs) { | ||
| 2343 | try p.field_attr_buf.append(to_append); | ||
| 2344 | } else { | ||
| 2345 | if (to_append.len > 0) { | ||
| 2346 | const preceding = p.record_members.items.len - p.record.start; | ||
| 2347 | if (preceding > 0) { | ||
| 2348 | try p.field_attr_buf.appendNTimes(&.{}, preceding); | ||
| 2349 | } | ||
| 2350 | try p.field_attr_buf.append(to_append); | ||
| 2351 | } | ||
| 2352 | } | ||
| 2353 | |||
| 2354 | if (name_tok == 0 and bits_node == .none) unnamed: { | ||
| 2355 | if (ty.is(.@"enum") or ty.hasIncompleteSize()) break :unnamed; | ||
| 2356 | if (ty.isAnonymousRecord(p.comp)) { | ||
| 2357 | // An anonymous record appears as indirect fields on the parent | ||
| 2358 | try p.record_buf.append(.{ | ||
| 2359 | .name = try p.getAnonymousName(first_tok), | ||
| 2360 | .ty = ty, | ||
| 2361 | }); | ||
| 2362 | const node = try p.addNode(.{ | ||
| 2363 | .tag = .indirect_record_field_decl, | ||
| 2364 | .ty = ty, | ||
| 2365 | .data = undefined, | ||
| 2366 | }); | ||
| 2367 | try p.decl_buf.append(node); | ||
| 2368 | try p.record.addFieldsFromAnonymous(p, ty); | ||
| 2369 | break; // must be followed by a semicolon | ||
| 2370 | } | ||
| 2371 | try p.err(.missing_declaration); | ||
| 2372 | } else { | ||
| 2373 | const interned_name = if (name_tok != 0) try StrInt.intern(p.comp, p.tokSlice(name_tok)) else try p.getAnonymousName(first_tok); | ||
| 2374 | try p.record_buf.append(.{ | ||
| 2375 | .name = interned_name, | ||
| 2376 | .ty = ty, | ||
| 2377 | .name_tok = name_tok, | ||
| 2378 | .bit_width = bits, | ||
| 2379 | }); | ||
| 2380 | if (name_tok != 0) try p.record.addField(p, interned_name, name_tok); | ||
| 2381 | const node = try p.addNode(.{ | ||
| 2382 | .tag = .record_field_decl, | ||
| 2383 | .ty = ty, | ||
| 2384 | .data = .{ .decl = .{ .name = name_tok, .node = bits_node } }, | ||
| 2385 | }); | ||
| 2386 | try p.decl_buf.append(node); | ||
| 2387 | } | ||
| 2388 | |||
| 2389 | if (ty.isFunc()) { | ||
| 2390 | try p.errTok(.func_field, first_tok); | ||
| 2391 | } else if (ty.is(.variable_len_array)) { | ||
| 2392 | try p.errTok(.vla_field, first_tok); | ||
| 2393 | } else if (ty.is(.incomplete_array)) { | ||
| 2394 | if (p.record.kind == .keyword_union) { | ||
| 2395 | try p.errTok(.flexible_in_union, first_tok); | ||
| 2396 | } | ||
| 2397 | if (p.record.flexible_field) |some| { | ||
| 2398 | if (p.record.kind == .keyword_struct) { | ||
| 2399 | try p.errTok(.flexible_non_final, some); | ||
| 2400 | } | ||
| 2401 | } | ||
| 2402 | p.record.flexible_field = first_tok; | ||
| 2403 | } else if (ty.specifier != .invalid and ty.hasIncompleteSize()) { | ||
| 2404 | try p.errStr(.field_incomplete_ty, first_tok, try p.typeStr(ty)); | ||
| 2405 | } else if (p.record.flexible_field) |some| { | ||
| 2406 | if (some != first_tok and p.record.kind == .keyword_struct) try p.errTok(.flexible_non_final, some); | ||
| 2407 | } | ||
| 2408 | if (p.eatToken(.comma) == null) break; | ||
| 2409 | } | ||
| 2410 | |||
| 2411 | if (p.eatToken(.semicolon) == null) { | ||
| 2412 | const tok_id = p.tok_ids[p.tok_i]; | ||
| 2413 | if (tok_id == .r_brace) { | ||
| 2414 | try p.err(.missing_semicolon); | ||
| 2415 | } else { | ||
| 2416 | return p.errExpectedToken(.semicolon, tok_id); | ||
| 2417 | } | ||
| 2418 | } | ||
| 2419 | |||
| 2420 | return true; | ||
| 2421 | } | ||
| 2422 | |||
| 2423 | /// specQual : (typeSpec | typeQual | alignSpec)+ | ||
| 2424 | fn specQual(p: *Parser) Error!?Type { | ||
| 2425 | var spec: Type.Builder = .{}; | ||
| 2426 | if (try p.typeSpec(&spec)) { | ||
| 2427 | return try spec.finish(p); | ||
| 2428 | } | ||
| 2429 | return null; | ||
| 2430 | } | ||
| 2431 | |||
| 2432 | /// enumSpec | ||
| 2433 | /// : keyword_enum IDENTIFIER? (: typeName)? { enumerator (',' enumerator)? ',') } | ||
| 2434 | /// | keyword_enum IDENTIFIER (: typeName)? | ||
| 2435 | fn enumSpec(p: *Parser) Error!Type { | ||
| 2436 | const enum_tok = p.tok_i; | ||
| 2437 | p.tok_i += 1; | ||
| 2438 | const attr_buf_top = p.attr_buf.len; | ||
| 2439 | defer p.attr_buf.len = attr_buf_top; | ||
| 2440 | try p.attributeSpecifier(); | ||
| 2441 | |||
| 2442 | const maybe_ident = try p.eatIdentifier(); | ||
| 2443 | const fixed_ty = if (p.eatToken(.colon)) |colon| fixed: { | ||
| 2444 | const fixed = (try p.typeName()) orelse { | ||
| 2445 | if (p.record.kind != .invalid) { | ||
| 2446 | // This is a bit field. | ||
| 2447 | p.tok_i -= 1; | ||
| 2448 | break :fixed null; | ||
| 2449 | } | ||
| 2450 | try p.err(.expected_type); | ||
| 2451 | try p.errTok(.enum_fixed, colon); | ||
| 2452 | break :fixed null; | ||
| 2453 | }; | ||
| 2454 | try p.errTok(.enum_fixed, colon); | ||
| 2455 | break :fixed fixed; | ||
| 2456 | } else null; | ||
| 2457 | |||
| 2458 | const l_brace = p.eatToken(.l_brace) orelse { | ||
| 2459 | const ident = maybe_ident orelse { | ||
| 2460 | try p.err(.ident_or_l_brace); | ||
| 2461 | return error.ParsingFailed; | ||
| 2462 | }; | ||
| 2463 | // check if this is a reference to a previous type | ||
| 2464 | const interned_name = try StrInt.intern(p.comp, p.tokSlice(ident)); | ||
| 2465 | if (try p.syms.findTag(p, interned_name, .keyword_enum, ident, p.tok_ids[p.tok_i])) |prev| { | ||
| 2466 | // only check fixed underlying type in forward declarations and not in references. | ||
| 2467 | if (p.tok_ids[p.tok_i] == .semicolon) | ||
| 2468 | try p.checkEnumFixedTy(fixed_ty, ident, prev); | ||
| 2469 | return prev.ty; | ||
| 2470 | } else { | ||
| 2471 | // this is a forward declaration, create a new enum Type. | ||
| 2472 | const enum_ty = try Type.Enum.create(p.arena, interned_name, fixed_ty); | ||
| 2473 | const ty = try Attribute.applyTypeAttributes(p, .{ | ||
| 2474 | .specifier = .@"enum", | ||
| 2475 | .data = .{ .@"enum" = enum_ty }, | ||
| 2476 | }, attr_buf_top, null); | ||
| 2477 | try p.syms.syms.append(p.gpa, .{ | ||
| 2478 | .kind = .@"enum", | ||
| 2479 | .name = interned_name, | ||
| 2480 | .tok = ident, | ||
| 2481 | .ty = ty, | ||
| 2482 | .val = .{}, | ||
| 2483 | }); | ||
| 2484 | try p.decl_buf.append(try p.addNode(.{ | ||
| 2485 | .tag = .enum_forward_decl, | ||
| 2486 | .ty = ty, | ||
| 2487 | .data = .{ .decl_ref = ident }, | ||
| 2488 | })); | ||
| 2489 | return ty; | ||
| 2490 | } | ||
| 2491 | }; | ||
| 2492 | |||
| 2493 | var done = false; | ||
| 2494 | errdefer if (!done) p.skipTo(.r_brace); | ||
| 2495 | |||
| 2496 | // Get forward declared type or create a new one | ||
| 2497 | var defined = false; | ||
| 2498 | const enum_ty: *Type.Enum = if (maybe_ident) |ident| enum_ty: { | ||
| 2499 | const ident_str = p.tokSlice(ident); | ||
| 2500 | const interned_name = try StrInt.intern(p.comp, ident_str); | ||
| 2501 | if (try p.syms.defineTag(p, interned_name, .keyword_enum, ident)) |prev| { | ||
| 2502 | const enum_ty = prev.ty.get(.@"enum").?.data.@"enum"; | ||
| 2503 | if (!enum_ty.isIncomplete() and !enum_ty.fixed) { | ||
| 2504 | // if the enum isn't incomplete, this is a redefinition | ||
| 2505 | try p.errStr(.redefinition, ident, ident_str); | ||
| 2506 | try p.errTok(.previous_definition, prev.tok); | ||
| 2507 | } else { | ||
| 2508 | try p.checkEnumFixedTy(fixed_ty, ident, prev); | ||
| 2509 | defined = true; | ||
| 2510 | break :enum_ty enum_ty; | ||
| 2511 | } | ||
| 2512 | } | ||
| 2513 | break :enum_ty try Type.Enum.create(p.arena, interned_name, fixed_ty); | ||
| 2514 | } else try Type.Enum.create(p.arena, try p.getAnonymousName(enum_tok), fixed_ty); | ||
| 2515 | |||
| 2516 | // reserve space for this enum | ||
| 2517 | try p.decl_buf.append(.none); | ||
| 2518 | const decl_buf_top = p.decl_buf.items.len; | ||
| 2519 | const list_buf_top = p.list_buf.items.len; | ||
| 2520 | const enum_buf_top = p.enum_buf.items.len; | ||
| 2521 | errdefer p.decl_buf.items.len = decl_buf_top - 1; | ||
| 2522 | defer { | ||
| 2523 | p.decl_buf.items.len = decl_buf_top; | ||
| 2524 | p.list_buf.items.len = list_buf_top; | ||
| 2525 | p.enum_buf.items.len = enum_buf_top; | ||
| 2526 | } | ||
| 2527 | |||
| 2528 | const sym_stack_top = p.syms.syms.len; | ||
| 2529 | var e = Enumerator.init(fixed_ty); | ||
| 2530 | while (try p.enumerator(&e)) |field_and_node| { | ||
| 2531 | try p.enum_buf.append(field_and_node.field); | ||
| 2532 | try p.list_buf.append(field_and_node.node); | ||
| 2533 | if (p.eatToken(.comma) == null) break; | ||
| 2534 | } | ||
| 2535 | |||
| 2536 | if (p.enum_buf.items.len == enum_buf_top) try p.err(.empty_enum); | ||
| 2537 | try p.expectClosing(l_brace, .r_brace); | ||
| 2538 | done = true; | ||
| 2539 | try p.attributeSpecifier(); | ||
| 2540 | |||
| 2541 | const ty = try Attribute.applyTypeAttributes(p, .{ | ||
| 2542 | .specifier = .@"enum", | ||
| 2543 | .data = .{ .@"enum" = enum_ty }, | ||
| 2544 | }, attr_buf_top, null); | ||
| 2545 | if (!enum_ty.fixed) { | ||
| 2546 | const tag_specifier = try e.getTypeSpecifier(p, ty.enumIsPacked(p.comp), maybe_ident orelse enum_tok); | ||
| 2547 | enum_ty.tag_ty = .{ .specifier = tag_specifier }; | ||
| 2548 | } | ||
| 2549 | |||
| 2550 | const enum_fields = p.enum_buf.items[enum_buf_top..]; | ||
| 2551 | const field_nodes = p.list_buf.items[list_buf_top..]; | ||
| 2552 | |||
| 2553 | if (fixed_ty == null) { | ||
| 2554 | const vals = p.syms.syms.items(.val)[sym_stack_top..]; | ||
| 2555 | const types = p.syms.syms.items(.ty)[sym_stack_top..]; | ||
| 2556 | |||
| 2557 | for (enum_fields, 0..) |*field, i| { | ||
| 2558 | if (field.ty.eql(Type.int, p.comp, false)) continue; | ||
| 2559 | |||
| 2560 | var res = Result{ .node = field.node, .ty = field.ty, .val = vals[i] }; | ||
| 2561 | const dest_ty = if (p.comp.fixedEnumTagSpecifier()) |some| | ||
| 2562 | Type{ .specifier = some } | ||
| 2563 | else if (try res.intFitsInType(p, Type.int)) | ||
| 2564 | Type.int | ||
| 2565 | else if (!res.ty.eql(enum_ty.tag_ty, p.comp, false)) | ||
| 2566 | enum_ty.tag_ty | ||
| 2567 | else | ||
| 2568 | continue; | ||
| 2569 | |||
| 2570 | try vals[i].intCast(dest_ty, p.comp); | ||
| 2571 | types[i] = dest_ty; | ||
| 2572 | p.nodes.items(.ty)[@intFromEnum(field_nodes[i])] = dest_ty; | ||
| 2573 | field.ty = dest_ty; | ||
| 2574 | res.ty = dest_ty; | ||
| 2575 | |||
| 2576 | if (res.node != .none) { | ||
| 2577 | try res.implicitCast(p, .int_cast); | ||
| 2578 | field.node = res.node; | ||
| 2579 | p.nodes.items(.data)[@intFromEnum(field_nodes[i])].decl.node = res.node; | ||
| 2580 | } | ||
| 2581 | } | ||
| 2582 | } | ||
| 2583 | |||
| 2584 | enum_ty.fields = try p.arena.dupe(Type.Enum.Field, enum_fields); | ||
| 2585 | |||
| 2586 | // declare a symbol for the type | ||
| 2587 | if (maybe_ident != null and !defined) { | ||
| 2588 | try p.syms.syms.append(p.gpa, .{ | ||
| 2589 | .kind = .@"enum", | ||
| 2590 | .name = enum_ty.name, | ||
| 2591 | .ty = ty, | ||
| 2592 | .tok = maybe_ident.?, | ||
| 2593 | .val = .{}, | ||
| 2594 | }); | ||
| 2595 | } | ||
| 2596 | |||
| 2597 | // finish by creating a node | ||
| 2598 | var node: Tree.Node = .{ .tag = .enum_decl_two, .ty = ty, .data = .{ | ||
| 2599 | .bin = .{ .lhs = .none, .rhs = .none }, | ||
| 2600 | } }; | ||
| 2601 | switch (field_nodes.len) { | ||
| 2602 | 0 => {}, | ||
| 2603 | 1 => node.data = .{ .bin = .{ .lhs = field_nodes[0], .rhs = .none } }, | ||
| 2604 | 2 => node.data = .{ .bin = .{ .lhs = field_nodes[0], .rhs = field_nodes[1] } }, | ||
| 2605 | else => { | ||
| 2606 | node.tag = .enum_decl; | ||
| 2607 | node.data = .{ .range = try p.addList(field_nodes) }; | ||
| 2608 | }, | ||
| 2609 | } | ||
| 2610 | p.decl_buf.items[decl_buf_top - 1] = try p.addNode(node); | ||
| 2611 | if (p.func.ty == null) { | ||
| 2612 | _ = p.tentative_defs.remove(enum_ty.name); | ||
| 2613 | } | ||
| 2614 | return ty; | ||
| 2615 | } | ||
| 2616 | |||
| 2617 | fn checkEnumFixedTy(p: *Parser, fixed_ty: ?Type, ident_tok: TokenIndex, prev: Symbol) !void { | ||
| 2618 | const enum_ty = prev.ty.get(.@"enum").?.data.@"enum"; | ||
| 2619 | if (fixed_ty) |some| { | ||
| 2620 | if (!enum_ty.fixed) { | ||
| 2621 | try p.errTok(.enum_prev_nonfixed, ident_tok); | ||
| 2622 | try p.errTok(.previous_definition, prev.tok); | ||
| 2623 | return error.ParsingFailed; | ||
| 2624 | } | ||
| 2625 | |||
| 2626 | if (!enum_ty.tag_ty.eql(some, p.comp, false)) { | ||
| 2627 | const str = try p.typePairStrExtra(some, " (was ", enum_ty.tag_ty); | ||
| 2628 | try p.errStr(.enum_different_explicit_ty, ident_tok, str); | ||
| 2629 | try p.errTok(.previous_definition, prev.tok); | ||
| 2630 | return error.ParsingFailed; | ||
| 2631 | } | ||
| 2632 | } else if (enum_ty.fixed) { | ||
| 2633 | try p.errTok(.enum_prev_fixed, ident_tok); | ||
| 2634 | try p.errTok(.previous_definition, prev.tok); | ||
| 2635 | return error.ParsingFailed; | ||
| 2636 | } | ||
| 2637 | } | ||
| 2638 | |||
| 2639 | const Enumerator = struct { | ||
| 2640 | res: Result, | ||
| 2641 | num_positive_bits: usize = 0, | ||
| 2642 | num_negative_bits: usize = 0, | ||
| 2643 | fixed: bool, | ||
| 2644 | |||
| 2645 | fn init(fixed_ty: ?Type) Enumerator { | ||
| 2646 | return .{ | ||
| 2647 | .res = .{ .ty = fixed_ty orelse .{ .specifier = .int } }, | ||
| 2648 | .fixed = fixed_ty != null, | ||
| 2649 | }; | ||
| 2650 | } | ||
| 2651 | |||
| 2652 | /// Increment enumerator value adjusting type if needed. | ||
| 2653 | fn incr(e: *Enumerator, p: *Parser, tok: TokenIndex) !void { | ||
| 2654 | e.res.node = .none; | ||
| 2655 | const old_val = e.res.val; | ||
| 2656 | if (old_val.opt_ref == .none) { | ||
| 2657 | // First enumerator, set to 0 fits in all types. | ||
| 2658 | e.res.val = Value.zero; | ||
| 2659 | return; | ||
| 2660 | } | ||
| 2661 | if (try e.res.val.add(e.res.val, Value.one, e.res.ty, p.comp)) { | ||
| 2662 | const byte_size = e.res.ty.sizeof(p.comp).?; | ||
| 2663 | const bit_size: u8 = @intCast(if (e.res.ty.isUnsignedInt(p.comp)) byte_size * 8 else byte_size * 8 - 1); | ||
| 2664 | if (e.fixed) { | ||
| 2665 | try p.errStr(.enum_not_representable_fixed, tok, try p.typeStr(e.res.ty)); | ||
| 2666 | return; | ||
| 2667 | } | ||
| 2668 | const new_ty = if (p.comp.nextLargestIntSameSign(e.res.ty)) |larger| blk: { | ||
| 2669 | try p.errTok(.enumerator_overflow, tok); | ||
| 2670 | break :blk larger; | ||
| 2671 | } else blk: { | ||
| 2672 | try p.errExtra(.enum_not_representable, tok, .{ .pow_2_as_string = bit_size }); | ||
| 2673 | break :blk Type{ .specifier = .ulong_long }; | ||
| 2674 | }; | ||
| 2675 | e.res.ty = new_ty; | ||
| 2676 | _ = try e.res.val.add(old_val, Value.one, e.res.ty, p.comp); | ||
| 2677 | } | ||
| 2678 | } | ||
| 2679 | |||
| 2680 | /// Set enumerator value to specified value. | ||
| 2681 | fn set(e: *Enumerator, p: *Parser, res: Result, tok: TokenIndex) !void { | ||
| 2682 | if (res.ty.specifier == .invalid) return; | ||
| 2683 | if (e.fixed and !res.ty.eql(e.res.ty, p.comp, false)) { | ||
| 2684 | if (!try res.intFitsInType(p, e.res.ty)) { | ||
| 2685 | try p.errStr(.enum_not_representable_fixed, tok, try p.typeStr(e.res.ty)); | ||
| 2686 | return error.ParsingFailed; | ||
| 2687 | } | ||
| 2688 | var copy = res; | ||
| 2689 | copy.ty = e.res.ty; | ||
| 2690 | try copy.implicitCast(p, .int_cast); | ||
| 2691 | e.res = copy; | ||
| 2692 | } else { | ||
| 2693 | e.res = res; | ||
| 2694 | try e.res.intCast(p, e.res.ty.integerPromotion(p.comp), tok); | ||
| 2695 | } | ||
| 2696 | } | ||
| 2697 | |||
| 2698 | fn getTypeSpecifier(e: *const Enumerator, p: *Parser, is_packed: bool, tok: TokenIndex) !Type.Specifier { | ||
| 2699 | if (p.comp.fixedEnumTagSpecifier()) |tag_specifier| return tag_specifier; | ||
| 2700 | |||
| 2701 | const char_width = (Type{ .specifier = .schar }).sizeof(p.comp).? * 8; | ||
| 2702 | const short_width = (Type{ .specifier = .short }).sizeof(p.comp).? * 8; | ||
| 2703 | const int_width = (Type{ .specifier = .int }).sizeof(p.comp).? * 8; | ||
| 2704 | if (e.num_negative_bits > 0) { | ||
| 2705 | if (is_packed and e.num_negative_bits <= char_width and e.num_positive_bits < char_width) { | ||
| 2706 | return .schar; | ||
| 2707 | } else if (is_packed and e.num_negative_bits <= short_width and e.num_positive_bits < short_width) { | ||
| 2708 | return .short; | ||
| 2709 | } else if (e.num_negative_bits <= int_width and e.num_positive_bits < int_width) { | ||
| 2710 | return .int; | ||
| 2711 | } | ||
| 2712 | const long_width = (Type{ .specifier = .long }).sizeof(p.comp).? * 8; | ||
| 2713 | if (e.num_negative_bits <= long_width and e.num_positive_bits < long_width) { | ||
| 2714 | return .long; | ||
| 2715 | } | ||
| 2716 | const long_long_width = (Type{ .specifier = .long_long }).sizeof(p.comp).? * 8; | ||
| 2717 | if (e.num_negative_bits > long_long_width or e.num_positive_bits >= long_long_width) { | ||
| 2718 | try p.errTok(.enum_too_large, tok); | ||
| 2719 | } | ||
| 2720 | return .long_long; | ||
| 2721 | } | ||
| 2722 | if (is_packed and e.num_positive_bits <= char_width) { | ||
| 2723 | return .uchar; | ||
| 2724 | } else if (is_packed and e.num_positive_bits <= short_width) { | ||
| 2725 | return .ushort; | ||
| 2726 | } else if (e.num_positive_bits <= int_width) { | ||
| 2727 | return .uint; | ||
| 2728 | } else if (e.num_positive_bits <= (Type{ .specifier = .long }).sizeof(p.comp).? * 8) { | ||
| 2729 | return .ulong; | ||
| 2730 | } | ||
| 2731 | return .ulong_long; | ||
| 2732 | } | ||
| 2733 | }; | ||
| 2734 | |||
| 2735 | const EnumFieldAndNode = struct { field: Type.Enum.Field, node: NodeIndex }; | ||
| 2736 | |||
| 2737 | /// enumerator : IDENTIFIER ('=' integerConstExpr) | ||
| 2738 | fn enumerator(p: *Parser, e: *Enumerator) Error!?EnumFieldAndNode { | ||
| 2739 | _ = try p.pragma(); | ||
| 2740 | const name_tok = (try p.eatIdentifier()) orelse { | ||
| 2741 | if (p.tok_ids[p.tok_i] == .r_brace) return null; | ||
| 2742 | try p.err(.expected_identifier); | ||
| 2743 | p.skipTo(.r_brace); | ||
| 2744 | return error.ParsingFailed; | ||
| 2745 | }; | ||
| 2746 | const attr_buf_top = p.attr_buf.len; | ||
| 2747 | defer p.attr_buf.len = attr_buf_top; | ||
| 2748 | try p.attributeSpecifier(); | ||
| 2749 | |||
| 2750 | const err_start = p.comp.diagnostics.list.items.len; | ||
| 2751 | if (p.eatToken(.equal)) |_| { | ||
| 2752 | const specified = try p.integerConstExpr(.gnu_folding_extension); | ||
| 2753 | if (specified.val.opt_ref == .none) { | ||
| 2754 | try p.errTok(.enum_val_unavailable, name_tok + 2); | ||
| 2755 | try e.incr(p, name_tok); | ||
| 2756 | } else { | ||
| 2757 | try e.set(p, specified, name_tok); | ||
| 2758 | } | ||
| 2759 | } else { | ||
| 2760 | try e.incr(p, name_tok); | ||
| 2761 | } | ||
| 2762 | |||
| 2763 | var res = e.res; | ||
| 2764 | res.ty = try Attribute.applyEnumeratorAttributes(p, res.ty, attr_buf_top); | ||
| 2765 | |||
| 2766 | if (res.ty.isUnsignedInt(p.comp) or res.val.compare(.gte, Value.zero, p.comp)) { | ||
| 2767 | e.num_positive_bits = @max(e.num_positive_bits, res.val.minUnsignedBits(p.comp)); | ||
| 2768 | } else { | ||
| 2769 | e.num_negative_bits = @max(e.num_negative_bits, res.val.minSignedBits(p.comp)); | ||
| 2770 | } | ||
| 2771 | |||
| 2772 | if (err_start == p.comp.diagnostics.list.items.len) { | ||
| 2773 | // only do these warnings if we didn't already warn about overflow or non-representable values | ||
| 2774 | if (e.res.val.compare(.lt, Value.zero, p.comp)) { | ||
| 2775 | const min_int = (Type{ .specifier = .int }).minInt(p.comp); | ||
| 2776 | const min_val = try Value.int(min_int, p.comp); | ||
| 2777 | if (e.res.val.compare(.lt, min_val, p.comp)) { | ||
| 2778 | try p.errStr(.enumerator_too_small, name_tok, try e.res.str(p)); | ||
| 2779 | } | ||
| 2780 | } else { | ||
| 2781 | const max_int = (Type{ .specifier = .int }).maxInt(p.comp); | ||
| 2782 | const max_val = try Value.int(max_int, p.comp); | ||
| 2783 | if (e.res.val.compare(.gt, max_val, p.comp)) { | ||
| 2784 | try p.errStr(.enumerator_too_large, name_tok, try e.res.str(p)); | ||
| 2785 | } | ||
| 2786 | } | ||
| 2787 | } | ||
| 2788 | |||
| 2789 | const interned_name = try StrInt.intern(p.comp, p.tokSlice(name_tok)); | ||
| 2790 | try p.syms.defineEnumeration(p, interned_name, res.ty, name_tok, e.res.val); | ||
| 2791 | const node = try p.addNode(.{ | ||
| 2792 | .tag = .enum_field_decl, | ||
| 2793 | .ty = res.ty, | ||
| 2794 | .data = .{ .decl = .{ | ||
| 2795 | .name = name_tok, | ||
| 2796 | .node = res.node, | ||
| 2797 | } }, | ||
| 2798 | }); | ||
| 2799 | try p.value_map.put(node, e.res.val); | ||
| 2800 | return EnumFieldAndNode{ .field = .{ | ||
| 2801 | .name = interned_name, | ||
| 2802 | .ty = res.ty, | ||
| 2803 | .name_tok = name_tok, | ||
| 2804 | .node = res.node, | ||
| 2805 | }, .node = node }; | ||
| 2806 | } | ||
| 2807 | |||
| 2808 | /// typeQual : keyword_const | keyword_restrict | keyword_volatile | keyword_atomic | ||
| 2809 | fn typeQual(p: *Parser, b: *Type.Qualifiers.Builder) Error!bool { | ||
| 2810 | var any = false; | ||
| 2811 | while (true) { | ||
| 2812 | switch (p.tok_ids[p.tok_i]) { | ||
| 2813 | .keyword_restrict, .keyword_restrict1, .keyword_restrict2 => { | ||
| 2814 | if (b.restrict != null) | ||
| 2815 | try p.errStr(.duplicate_decl_spec, p.tok_i, "restrict") | ||
| 2816 | else | ||
| 2817 | b.restrict = p.tok_i; | ||
| 2818 | }, | ||
| 2819 | .keyword_const, .keyword_const1, .keyword_const2 => { | ||
| 2820 | if (b.@"const" != null) | ||
| 2821 | try p.errStr(.duplicate_decl_spec, p.tok_i, "const") | ||
| 2822 | else | ||
| 2823 | b.@"const" = p.tok_i; | ||
| 2824 | }, | ||
| 2825 | .keyword_volatile, .keyword_volatile1, .keyword_volatile2 => { | ||
| 2826 | if (b.@"volatile" != null) | ||
| 2827 | try p.errStr(.duplicate_decl_spec, p.tok_i, "volatile") | ||
| 2828 | else | ||
| 2829 | b.@"volatile" = p.tok_i; | ||
| 2830 | }, | ||
| 2831 | .keyword_atomic => { | ||
| 2832 | // _Atomic(typeName) instead of just _Atomic | ||
| 2833 | if (p.tok_ids[p.tok_i + 1] == .l_paren) break; | ||
| 2834 | if (b.atomic != null) | ||
| 2835 | try p.errStr(.duplicate_decl_spec, p.tok_i, "atomic") | ||
| 2836 | else | ||
| 2837 | b.atomic = p.tok_i; | ||
| 2838 | }, | ||
| 2839 | else => break, | ||
| 2840 | } | ||
| 2841 | p.tok_i += 1; | ||
| 2842 | any = true; | ||
| 2843 | } | ||
| 2844 | return any; | ||
| 2845 | } | ||
| 2846 | |||
| 2847 | const Declarator = struct { | ||
| 2848 | name: TokenIndex, | ||
| 2849 | ty: Type, | ||
| 2850 | func_declarator: ?TokenIndex = null, | ||
| 2851 | old_style_func: ?TokenIndex = null, | ||
| 2852 | }; | ||
| 2853 | const DeclaratorKind = enum { normal, abstract, param, record }; | ||
| 2854 | |||
| 2855 | /// declarator : pointer? (IDENTIFIER | '(' declarator ')') directDeclarator* | ||
| 2856 | /// abstractDeclarator | ||
| 2857 | /// : pointer? ('(' abstractDeclarator ')')? directAbstractDeclarator* | ||
| 2858 | fn declarator( | ||
| 2859 | p: *Parser, | ||
| 2860 | base_type: Type, | ||
| 2861 | kind: DeclaratorKind, | ||
| 2862 | ) Error!?Declarator { | ||
| 2863 | const start = p.tok_i; | ||
| 2864 | var d = Declarator{ .name = 0, .ty = try p.pointer(base_type) }; | ||
| 2865 | if (base_type.is(.auto_type) and !d.ty.is(.auto_type)) { | ||
| 2866 | try p.errTok(.auto_type_requires_plain_declarator, start); | ||
| 2867 | return error.ParsingFailed; | ||
| 2868 | } | ||
| 2869 | |||
| 2870 | const maybe_ident = p.tok_i; | ||
| 2871 | if (kind != .abstract and (try p.eatIdentifier()) != null) { | ||
| 2872 | d.name = maybe_ident; | ||
| 2873 | const combine_tok = p.tok_i; | ||
| 2874 | d.ty = try p.directDeclarator(d.ty, &d, kind); | ||
| 2875 | try d.ty.validateCombinedType(p, combine_tok); | ||
| 2876 | return d; | ||
| 2877 | } else if (p.eatToken(.l_paren)) |l_paren| blk: { | ||
| 2878 | var res = (try p.declarator(.{ .specifier = .void }, kind)) orelse { | ||
| 2879 | p.tok_i = l_paren; | ||
| 2880 | break :blk; | ||
| 2881 | }; | ||
| 2882 | try p.expectClosing(l_paren, .r_paren); | ||
| 2883 | const suffix_start = p.tok_i; | ||
| 2884 | const outer = try p.directDeclarator(d.ty, &d, kind); | ||
| 2885 | try res.ty.combine(outer); | ||
| 2886 | try res.ty.validateCombinedType(p, suffix_start); | ||
| 2887 | res.old_style_func = d.old_style_func; | ||
| 2888 | res.func_declarator = d.func_declarator; | ||
| 2889 | return res; | ||
| 2890 | } | ||
| 2891 | |||
| 2892 | const expected_ident = p.tok_i; | ||
| 2893 | |||
| 2894 | d.ty = try p.directDeclarator(d.ty, &d, kind); | ||
| 2895 | |||
| 2896 | if (kind == .normal and !d.ty.isEnumOrRecord()) { | ||
| 2897 | try p.errTok(.expected_ident_or_l_paren, expected_ident); | ||
| 2898 | return error.ParsingFailed; | ||
| 2899 | } | ||
| 2900 | try d.ty.validateCombinedType(p, expected_ident); | ||
| 2901 | if (start == p.tok_i) return null; | ||
| 2902 | return d; | ||
| 2903 | } | ||
| 2904 | |||
| 2905 | /// directDeclarator | ||
| 2906 | /// : '[' typeQual* assignExpr? ']' directDeclarator? | ||
| 2907 | /// | '[' keyword_static typeQual* assignExpr ']' directDeclarator? | ||
| 2908 | /// | '[' typeQual+ keyword_static assignExpr ']' directDeclarator? | ||
| 2909 | /// | '[' typeQual* '*' ']' directDeclarator? | ||
| 2910 | /// | '(' paramDecls ')' directDeclarator? | ||
| 2911 | /// | '(' (IDENTIFIER (',' IDENTIFIER))? ')' directDeclarator? | ||
| 2912 | /// directAbstractDeclarator | ||
| 2913 | /// : '[' typeQual* assignExpr? ']' | ||
| 2914 | /// | '[' keyword_static typeQual* assignExpr ']' | ||
| 2915 | /// | '[' typeQual+ keyword_static assignExpr ']' | ||
| 2916 | /// | '[' '*' ']' | ||
| 2917 | /// | '(' paramDecls? ')' | ||
| 2918 | fn directDeclarator(p: *Parser, base_type: Type, d: *Declarator, kind: DeclaratorKind) Error!Type { | ||
| 2919 | if (p.eatToken(.l_bracket)) |l_bracket| { | ||
| 2920 | if (p.tok_ids[p.tok_i] == .l_bracket) { | ||
| 2921 | switch (kind) { | ||
| 2922 | .normal, .record => if (p.comp.langopts.standard.atLeast(.c23)) { | ||
| 2923 | p.tok_i -= 1; | ||
| 2924 | return base_type; | ||
| 2925 | }, | ||
| 2926 | .param, .abstract => {}, | ||
| 2927 | } | ||
| 2928 | try p.err(.expected_expr); | ||
| 2929 | return error.ParsingFailed; | ||
| 2930 | } | ||
| 2931 | var res_ty = Type{ | ||
| 2932 | // so that we can get any restrict type that might be present | ||
| 2933 | .specifier = .pointer, | ||
| 2934 | }; | ||
| 2935 | var quals = Type.Qualifiers.Builder{}; | ||
| 2936 | |||
| 2937 | var got_quals = try p.typeQual(&quals); | ||
| 2938 | var static = p.eatToken(.keyword_static); | ||
| 2939 | if (static != null and !got_quals) got_quals = try p.typeQual(&quals); | ||
| 2940 | var star = p.eatToken(.asterisk); | ||
| 2941 | const size_tok = p.tok_i; | ||
| 2942 | |||
| 2943 | const const_decl_folding = p.const_decl_folding; | ||
| 2944 | p.const_decl_folding = .gnu_vla_folding_extension; | ||
| 2945 | const size = if (star) |_| Result{} else try p.assignExpr(); | ||
| 2946 | p.const_decl_folding = const_decl_folding; | ||
| 2947 | |||
| 2948 | try p.expectClosing(l_bracket, .r_bracket); | ||
| 2949 | |||
| 2950 | if (star != null and static != null) { | ||
| 2951 | try p.errTok(.invalid_static_star, static.?); | ||
| 2952 | static = null; | ||
| 2953 | } | ||
| 2954 | if (kind != .param) { | ||
| 2955 | if (static != null) | ||
| 2956 | try p.errTok(.static_non_param, l_bracket) | ||
| 2957 | else if (got_quals) | ||
| 2958 | try p.errTok(.array_qualifiers, l_bracket); | ||
| 2959 | if (star) |some| try p.errTok(.star_non_param, some); | ||
| 2960 | static = null; | ||
| 2961 | quals = .{}; | ||
| 2962 | star = null; | ||
| 2963 | } else { | ||
| 2964 | try quals.finish(p, &res_ty); | ||
| 2965 | } | ||
| 2966 | if (static) |_| try size.expect(p); | ||
| 2967 | |||
| 2968 | if (base_type.is(.auto_type)) { | ||
| 2969 | try p.errStr(.array_of_auto_type, d.name, p.tokSlice(d.name)); | ||
| 2970 | return error.ParsingFailed; | ||
| 2971 | } | ||
| 2972 | |||
| 2973 | const outer = try p.directDeclarator(base_type, d, kind); | ||
| 2974 | var max_bits = p.comp.target.ptrBitWidth(); | ||
| 2975 | if (max_bits > 61) max_bits = 61; | ||
| 2976 | const max_bytes = (@as(u64, 1) << @truncate(max_bits)) - 1; | ||
| 2977 | |||
| 2978 | if (!size.ty.isInt()) { | ||
| 2979 | try p.errStr(.array_size_non_int, size_tok, try p.typeStr(size.ty)); | ||
| 2980 | return error.ParsingFailed; | ||
| 2981 | } | ||
| 2982 | if (base_type.is(.c23_auto)) { | ||
| 2983 | // issue error later | ||
| 2984 | return Type.invalid; | ||
| 2985 | } else if (size.val.opt_ref == .none) { | ||
| 2986 | if (size.node != .none) { | ||
| 2987 | try p.errTok(.vla, size_tok); | ||
| 2988 | if (p.func.ty == null and kind != .param and p.record.kind == .invalid) { | ||
| 2989 | try p.errTok(.variable_len_array_file_scope, d.name); | ||
| 2990 | } | ||
| 2991 | const expr_ty = try p.arena.create(Type.Expr); | ||
| 2992 | expr_ty.ty = .{ .specifier = .void }; | ||
| 2993 | expr_ty.node = size.node; | ||
| 2994 | res_ty.data = .{ .expr = expr_ty }; | ||
| 2995 | res_ty.specifier = .variable_len_array; | ||
| 2996 | |||
| 2997 | if (static) |some| try p.errTok(.useless_static, some); | ||
| 2998 | } else if (star) |_| { | ||
| 2999 | const elem_ty = try p.arena.create(Type); | ||
| 3000 | elem_ty.* = .{ .specifier = .void }; | ||
| 3001 | res_ty.data = .{ .sub_type = elem_ty }; | ||
| 3002 | res_ty.specifier = .unspecified_variable_len_array; | ||
| 3003 | } else { | ||
| 3004 | const arr_ty = try p.arena.create(Type.Array); | ||
| 3005 | arr_ty.elem = .{ .specifier = .void }; | ||
| 3006 | arr_ty.len = 0; | ||
| 3007 | res_ty.data = .{ .array = arr_ty }; | ||
| 3008 | res_ty.specifier = .incomplete_array; | ||
| 3009 | } | ||
| 3010 | } else { | ||
| 3011 | // `outer` is validated later so it may be invalid here | ||
| 3012 | const outer_size = outer.sizeof(p.comp); | ||
| 3013 | const max_elems = max_bytes / @max(1, outer_size orelse 1); | ||
| 3014 | |||
| 3015 | var size_val = size.val; | ||
| 3016 | if (size_val.isZero(p.comp)) { | ||
| 3017 | try p.errTok(.zero_length_array, l_bracket); | ||
| 3018 | } else if (size_val.compare(.lt, Value.zero, p.comp)) { | ||
| 3019 | try p.errTok(.negative_array_size, l_bracket); | ||
| 3020 | return error.ParsingFailed; | ||
| 3021 | } | ||
| 3022 | const arr_ty = try p.arena.create(Type.Array); | ||
| 3023 | arr_ty.elem = .{ .specifier = .void }; | ||
| 3024 | arr_ty.len = size_val.toInt(u64, p.comp) orelse std.math.maxInt(u64); | ||
| 3025 | if (arr_ty.len > max_elems) { | ||
| 3026 | try p.errTok(.array_too_large, l_bracket); | ||
| 3027 | arr_ty.len = max_elems; | ||
| 3028 | } | ||
| 3029 | res_ty.data = .{ .array = arr_ty }; | ||
| 3030 | res_ty.specifier = .array; | ||
| 3031 | } | ||
| 3032 | |||
| 3033 | try res_ty.combine(outer); | ||
| 3034 | return res_ty; | ||
| 3035 | } else if (p.eatToken(.l_paren)) |l_paren| { | ||
| 3036 | d.func_declarator = l_paren; | ||
| 3037 | |||
| 3038 | const func_ty = try p.arena.create(Type.Func); | ||
| 3039 | func_ty.params = &.{}; | ||
| 3040 | func_ty.return_type.specifier = .void; | ||
| 3041 | var specifier: Type.Specifier = .func; | ||
| 3042 | |||
| 3043 | if (p.eatToken(.ellipsis)) |_| { | ||
| 3044 | try p.err(.param_before_var_args); | ||
| 3045 | try p.expectClosing(l_paren, .r_paren); | ||
| 3046 | var res_ty = Type{ .specifier = .func, .data = .{ .func = func_ty } }; | ||
| 3047 | |||
| 3048 | const outer = try p.directDeclarator(base_type, d, kind); | ||
| 3049 | try res_ty.combine(outer); | ||
| 3050 | return res_ty; | ||
| 3051 | } | ||
| 3052 | |||
| 3053 | if (try p.paramDecls(d)) |params| { | ||
| 3054 | func_ty.params = params; | ||
| 3055 | if (p.eatToken(.ellipsis)) |_| specifier = .var_args_func; | ||
| 3056 | } else if (p.tok_ids[p.tok_i] == .r_paren) { | ||
| 3057 | specifier = if (p.comp.langopts.standard.atLeast(.c23)) | ||
| 3058 | .func | ||
| 3059 | else | ||
| 3060 | .old_style_func; | ||
| 3061 | } else if (p.tok_ids[p.tok_i] == .identifier or p.tok_ids[p.tok_i] == .extended_identifier) { | ||
| 3062 | d.old_style_func = p.tok_i; | ||
| 3063 | const param_buf_top = p.param_buf.items.len; | ||
| 3064 | try p.syms.pushScope(p); | ||
| 3065 | defer { | ||
| 3066 | p.param_buf.items.len = param_buf_top; | ||
| 3067 | p.syms.popScope(); | ||
| 3068 | } | ||
| 3069 | |||
| 3070 | specifier = .old_style_func; | ||
| 3071 | while (true) { | ||
| 3072 | const name_tok = try p.expectIdentifier(); | ||
| 3073 | const interned_name = try StrInt.intern(p.comp, p.tokSlice(name_tok)); | ||
| 3074 | try p.syms.defineParam(p, interned_name, undefined, name_tok); | ||
| 3075 | try p.param_buf.append(.{ | ||
| 3076 | .name = interned_name, | ||
| 3077 | .name_tok = name_tok, | ||
| 3078 | .ty = .{ .specifier = .int }, | ||
| 3079 | }); | ||
| 3080 | if (p.eatToken(.comma) == null) break; | ||
| 3081 | } | ||
| 3082 | func_ty.params = try p.arena.dupe(Type.Func.Param, p.param_buf.items[param_buf_top..]); | ||
| 3083 | } else { | ||
| 3084 | try p.err(.expected_param_decl); | ||
| 3085 | } | ||
| 3086 | |||
| 3087 | try p.expectClosing(l_paren, .r_paren); | ||
| 3088 | var res_ty = Type{ | ||
| 3089 | .specifier = specifier, | ||
| 3090 | .data = .{ .func = func_ty }, | ||
| 3091 | }; | ||
| 3092 | |||
| 3093 | const outer = try p.directDeclarator(base_type, d, kind); | ||
| 3094 | try res_ty.combine(outer); | ||
| 3095 | return res_ty; | ||
| 3096 | } else return base_type; | ||
| 3097 | } | ||
| 3098 | |||
| 3099 | /// pointer : '*' typeQual* pointer? | ||
| 3100 | fn pointer(p: *Parser, base_ty: Type) Error!Type { | ||
| 3101 | var ty = base_ty; | ||
| 3102 | while (p.eatToken(.asterisk)) |_| { | ||
| 3103 | const elem_ty = try p.arena.create(Type); | ||
| 3104 | elem_ty.* = ty; | ||
| 3105 | ty = Type{ | ||
| 3106 | .specifier = .pointer, | ||
| 3107 | .data = .{ .sub_type = elem_ty }, | ||
| 3108 | }; | ||
| 3109 | var quals = Type.Qualifiers.Builder{}; | ||
| 3110 | _ = try p.typeQual(&quals); | ||
| 3111 | try quals.finish(p, &ty); | ||
| 3112 | } | ||
| 3113 | return ty; | ||
| 3114 | } | ||
| 3115 | |||
| 3116 | /// paramDecls : paramDecl (',' paramDecl)* (',' '...') | ||
| 3117 | /// paramDecl : declSpec (declarator | abstractDeclarator) | ||
| 3118 | fn paramDecls(p: *Parser, d: *Declarator) Error!?[]Type.Func.Param { | ||
| 3119 | // TODO warn about visibility of types declared here | ||
| 3120 | const param_buf_top = p.param_buf.items.len; | ||
| 3121 | defer p.param_buf.items.len = param_buf_top; | ||
| 3122 | try p.syms.pushScope(p); | ||
| 3123 | defer p.syms.popScope(); | ||
| 3124 | |||
| 3125 | while (true) { | ||
| 3126 | const attr_buf_top = p.attr_buf.len; | ||
| 3127 | defer p.attr_buf.len = attr_buf_top; | ||
| 3128 | const param_decl_spec = if (try p.declSpec()) |some| | ||
| 3129 | some | ||
| 3130 | else if (p.comp.langopts.standard.atLeast(.c23) and | ||
| 3131 | (p.tok_ids[p.tok_i] == .identifier or p.tok_ids[p.tok_i] == .extended_identifier)) | ||
| 3132 | { | ||
| 3133 | // handle deprecated K&R style parameters | ||
| 3134 | const identifier = try p.expectIdentifier(); | ||
| 3135 | try p.errStr(.unknown_type_name, identifier, p.tokSlice(identifier)); | ||
| 3136 | if (d.old_style_func == null) d.old_style_func = identifier; | ||
| 3137 | |||
| 3138 | try p.param_buf.append(.{ | ||
| 3139 | .name = try StrInt.intern(p.comp, p.tokSlice(identifier)), | ||
| 3140 | .name_tok = identifier, | ||
| 3141 | .ty = .{ .specifier = .int }, | ||
| 3142 | }); | ||
| 3143 | |||
| 3144 | if (p.eatToken(.comma) == null) break; | ||
| 3145 | if (p.tok_ids[p.tok_i] == .ellipsis) break; | ||
| 3146 | continue; | ||
| 3147 | } else if (p.param_buf.items.len == param_buf_top) { | ||
| 3148 | return null; | ||
| 3149 | } else blk: { | ||
| 3150 | var spec: Type.Builder = .{}; | ||
| 3151 | break :blk DeclSpec{ .ty = try spec.finish(p) }; | ||
| 3152 | }; | ||
| 3153 | |||
| 3154 | var name_tok: TokenIndex = 0; | ||
| 3155 | const first_tok = p.tok_i; | ||
| 3156 | var param_ty = param_decl_spec.ty; | ||
| 3157 | if (try p.declarator(param_decl_spec.ty, .param)) |some| { | ||
| 3158 | if (some.old_style_func) |tok_i| try p.errTok(.invalid_old_style_params, tok_i); | ||
| 3159 | try p.attributeSpecifier(); | ||
| 3160 | |||
| 3161 | name_tok = some.name; | ||
| 3162 | param_ty = some.ty; | ||
| 3163 | if (some.name != 0) { | ||
| 3164 | const interned_name = try StrInt.intern(p.comp, p.tokSlice(name_tok)); | ||
| 3165 | try p.syms.defineParam(p, interned_name, param_ty, name_tok); | ||
| 3166 | } | ||
| 3167 | } | ||
| 3168 | param_ty = try Attribute.applyParameterAttributes(p, param_ty, attr_buf_top, .alignas_on_param); | ||
| 3169 | |||
| 3170 | if (param_ty.isFunc()) { | ||
| 3171 | // params declared as functions are converted to function pointers | ||
| 3172 | const elem_ty = try p.arena.create(Type); | ||
| 3173 | elem_ty.* = param_ty; | ||
| 3174 | param_ty = Type{ | ||
| 3175 | .specifier = .pointer, | ||
| 3176 | .data = .{ .sub_type = elem_ty }, | ||
| 3177 | }; | ||
| 3178 | } else if (param_ty.isArray()) { | ||
| 3179 | // params declared as arrays are converted to pointers | ||
| 3180 | param_ty.decayArray(); | ||
| 3181 | } else if (param_ty.is(.void)) { | ||
| 3182 | // validate void parameters | ||
| 3183 | if (p.param_buf.items.len == param_buf_top) { | ||
| 3184 | if (p.tok_ids[p.tok_i] != .r_paren) { | ||
| 3185 | try p.err(.void_only_param); | ||
| 3186 | if (param_ty.anyQual()) try p.err(.void_param_qualified); | ||
| 3187 | return error.ParsingFailed; | ||
| 3188 | } | ||
| 3189 | return &[0]Type.Func.Param{}; | ||
| 3190 | } | ||
| 3191 | try p.err(.void_must_be_first_param); | ||
| 3192 | return error.ParsingFailed; | ||
| 3193 | } | ||
| 3194 | |||
| 3195 | try param_decl_spec.validateParam(p, &param_ty); | ||
| 3196 | try p.param_buf.append(.{ | ||
| 3197 | .name = if (name_tok == 0) .empty else try StrInt.intern(p.comp, p.tokSlice(name_tok)), | ||
| 3198 | .name_tok = if (name_tok == 0) first_tok else name_tok, | ||
| 3199 | .ty = param_ty, | ||
| 3200 | }); | ||
| 3201 | |||
| 3202 | if (p.eatToken(.comma) == null) break; | ||
| 3203 | if (p.tok_ids[p.tok_i] == .ellipsis) break; | ||
| 3204 | } | ||
| 3205 | return try p.arena.dupe(Type.Func.Param, p.param_buf.items[param_buf_top..]); | ||
| 3206 | } | ||
| 3207 | |||
| 3208 | /// typeName : specQual abstractDeclarator | ||
| 3209 | fn typeName(p: *Parser) Error!?Type { | ||
| 3210 | const attr_buf_top = p.attr_buf.len; | ||
| 3211 | defer p.attr_buf.len = attr_buf_top; | ||
| 3212 | const ty = (try p.specQual()) orelse return null; | ||
| 3213 | if (try p.declarator(ty, .abstract)) |some| { | ||
| 3214 | if (some.old_style_func) |tok_i| try p.errTok(.invalid_old_style_params, tok_i); | ||
| 3215 | return try Attribute.applyTypeAttributes(p, some.ty, attr_buf_top, .align_ignored); | ||
| 3216 | } | ||
| 3217 | return try Attribute.applyTypeAttributes(p, ty, attr_buf_top, .align_ignored); | ||
| 3218 | } | ||
| 3219 | |||
| 3220 | /// initializer | ||
| 3221 | /// : assignExpr | ||
| 3222 | /// | '{' initializerItems '}' | ||
| 3223 | fn initializer(p: *Parser, init_ty: Type) Error!Result { | ||
| 3224 | // fast path for non-braced initializers | ||
| 3225 | if (p.tok_ids[p.tok_i] != .l_brace) { | ||
| 3226 | const tok = p.tok_i; | ||
| 3227 | var res = try p.assignExpr(); | ||
| 3228 | try res.expect(p); | ||
| 3229 | if (try p.coerceArrayInit(&res, tok, init_ty)) return res; | ||
| 3230 | try p.coerceInit(&res, tok, init_ty); | ||
| 3231 | return res; | ||
| 3232 | } | ||
| 3233 | if (init_ty.is(.auto_type)) { | ||
| 3234 | try p.err(.auto_type_with_init_list); | ||
| 3235 | return error.ParsingFailed; | ||
| 3236 | } | ||
| 3237 | |||
| 3238 | var il: InitList = .{}; | ||
| 3239 | defer il.deinit(p.gpa); | ||
| 3240 | |||
| 3241 | _ = try p.initializerItem(&il, init_ty); | ||
| 3242 | |||
| 3243 | const res = try p.convertInitList(il, init_ty); | ||
| 3244 | var res_ty = p.nodes.items(.ty)[@intFromEnum(res)]; | ||
| 3245 | res_ty.qual = init_ty.qual; | ||
| 3246 | return Result{ .ty = res_ty, .node = res }; | ||
| 3247 | } | ||
| 3248 | |||
| 3249 | /// initializerItems : designation? initializer (',' designation? initializer)* ','? | ||
| 3250 | /// designation : designator+ '=' | ||
| 3251 | /// designator | ||
| 3252 | /// : '[' integerConstExpr ']' | ||
| 3253 | /// | '.' identifier | ||
| 3254 | fn initializerItem(p: *Parser, il: *InitList, init_ty: Type) Error!bool { | ||
| 3255 | const l_brace = p.eatToken(.l_brace) orelse { | ||
| 3256 | const tok = p.tok_i; | ||
| 3257 | var res = try p.assignExpr(); | ||
| 3258 | if (res.empty(p)) return false; | ||
| 3259 | |||
| 3260 | const arr = try p.coerceArrayInit(&res, tok, init_ty); | ||
| 3261 | if (!arr) try p.coerceInit(&res, tok, init_ty); | ||
| 3262 | if (il.tok != 0) { | ||
| 3263 | try p.errTok(.initializer_overrides, tok); | ||
| 3264 | try p.errTok(.previous_initializer, il.tok); | ||
| 3265 | } | ||
| 3266 | il.node = res.node; | ||
| 3267 | il.tok = tok; | ||
| 3268 | return true; | ||
| 3269 | }; | ||
| 3270 | |||
| 3271 | const is_scalar = init_ty.isScalar(); | ||
| 3272 | const is_complex = init_ty.isComplex(); | ||
| 3273 | const scalar_inits_needed: usize = if (is_complex) 2 else 1; | ||
| 3274 | if (p.eatToken(.r_brace)) |_| { | ||
| 3275 | if (is_scalar) try p.errTok(.empty_scalar_init, l_brace); | ||
| 3276 | if (il.tok != 0) { | ||
| 3277 | try p.errTok(.initializer_overrides, l_brace); | ||
| 3278 | try p.errTok(.previous_initializer, il.tok); | ||
| 3279 | } | ||
| 3280 | il.node = .none; | ||
| 3281 | il.tok = l_brace; | ||
| 3282 | return true; | ||
| 3283 | } | ||
| 3284 | |||
| 3285 | var count: u64 = 0; | ||
| 3286 | var warned_excess = false; | ||
| 3287 | var is_str_init = false; | ||
| 3288 | var index_hint: ?u64 = null; | ||
| 3289 | while (true) : (count += 1) { | ||
| 3290 | errdefer p.skipTo(.r_brace); | ||
| 3291 | |||
| 3292 | var first_tok = p.tok_i; | ||
| 3293 | var cur_ty = init_ty; | ||
| 3294 | var cur_il = il; | ||
| 3295 | var designation = false; | ||
| 3296 | var cur_index_hint: ?u64 = null; | ||
| 3297 | while (true) { | ||
| 3298 | if (p.eatToken(.l_bracket)) |l_bracket| { | ||
| 3299 | if (!cur_ty.isArray()) { | ||
| 3300 | try p.errStr(.invalid_array_designator, l_bracket, try p.typeStr(cur_ty)); | ||
| 3301 | return error.ParsingFailed; | ||
| 3302 | } | ||
| 3303 | const expr_tok = p.tok_i; | ||
| 3304 | const index_res = try p.integerConstExpr(.gnu_folding_extension); | ||
| 3305 | try p.expectClosing(l_bracket, .r_bracket); | ||
| 3306 | |||
| 3307 | if (index_res.val.opt_ref == .none) { | ||
| 3308 | try p.errTok(.expected_integer_constant_expr, expr_tok); | ||
| 3309 | return error.ParsingFailed; | ||
| 3310 | } else if (index_res.val.compare(.lt, Value.zero, p.comp)) { | ||
| 3311 | try p.errStr(.negative_array_designator, l_bracket + 1, try index_res.str(p)); | ||
| 3312 | return error.ParsingFailed; | ||
| 3313 | } | ||
| 3314 | |||
| 3315 | const max_len = cur_ty.arrayLen() orelse std.math.maxInt(usize); | ||
| 3316 | const index_int = index_res.val.toInt(u64, p.comp) orelse std.math.maxInt(u64); | ||
| 3317 | if (index_int >= max_len) { | ||
| 3318 | try p.errStr(.oob_array_designator, l_bracket + 1, try index_res.str(p)); | ||
| 3319 | return error.ParsingFailed; | ||
| 3320 | } | ||
| 3321 | cur_index_hint = cur_index_hint orelse index_int; | ||
| 3322 | |||
| 3323 | cur_il = try cur_il.find(p.gpa, index_int); | ||
| 3324 | cur_ty = cur_ty.elemType(); | ||
| 3325 | designation = true; | ||
| 3326 | } else if (p.eatToken(.period)) |period| { | ||
| 3327 | const field_tok = try p.expectIdentifier(); | ||
| 3328 | const field_str = p.tokSlice(field_tok); | ||
| 3329 | const field_name = try StrInt.intern(p.comp, field_str); | ||
| 3330 | cur_ty = cur_ty.canonicalize(.standard); | ||
| 3331 | if (!cur_ty.isRecord()) { | ||
| 3332 | try p.errStr(.invalid_field_designator, period, try p.typeStr(cur_ty)); | ||
| 3333 | return error.ParsingFailed; | ||
| 3334 | } else if (!cur_ty.hasField(field_name)) { | ||
| 3335 | try p.errStr(.no_such_field_designator, period, field_str); | ||
| 3336 | return error.ParsingFailed; | ||
| 3337 | } | ||
| 3338 | |||
| 3339 | // TODO check if union already has field set | ||
| 3340 | outer: while (true) { | ||
| 3341 | for (cur_ty.data.record.fields, 0..) |f, i| { | ||
| 3342 | if (f.isAnonymousRecord()) { | ||
| 3343 | // Recurse into anonymous field if it has a field by the name. | ||
| 3344 | if (!f.ty.hasField(field_name)) continue; | ||
| 3345 | cur_ty = f.ty.canonicalize(.standard); | ||
| 3346 | cur_il = try il.find(p.gpa, i); | ||
| 3347 | cur_index_hint = cur_index_hint orelse i; | ||
| 3348 | continue :outer; | ||
| 3349 | } | ||
| 3350 | if (field_name == f.name) { | ||
| 3351 | cur_il = try cur_il.find(p.gpa, i); | ||
| 3352 | cur_ty = f.ty; | ||
| 3353 | cur_index_hint = cur_index_hint orelse i; | ||
| 3354 | break :outer; | ||
| 3355 | } | ||
| 3356 | } | ||
| 3357 | unreachable; // we already checked that the starting type has this field | ||
| 3358 | } | ||
| 3359 | designation = true; | ||
| 3360 | } else break; | ||
| 3361 | } | ||
| 3362 | if (designation) index_hint = null; | ||
| 3363 | defer index_hint = cur_index_hint orelse null; | ||
| 3364 | |||
| 3365 | if (designation) _ = try p.expectToken(.equal); | ||
| 3366 | |||
| 3367 | if (!designation and cur_ty.hasAttribute(.designated_init)) { | ||
| 3368 | try p.err(.designated_init_needed); | ||
| 3369 | } | ||
| 3370 | |||
| 3371 | var saw = false; | ||
| 3372 | if (is_str_init and p.isStringInit(init_ty)) { | ||
| 3373 | // discard further strings | ||
| 3374 | var tmp_il = InitList{}; | ||
| 3375 | defer tmp_il.deinit(p.gpa); | ||
| 3376 | saw = try p.initializerItem(&tmp_il, .{ .specifier = .void }); | ||
| 3377 | } else if (count == 0 and p.isStringInit(init_ty)) { | ||
| 3378 | is_str_init = true; | ||
| 3379 | saw = try p.initializerItem(il, init_ty); | ||
| 3380 | } else if (is_scalar and count >= scalar_inits_needed) { | ||
| 3381 | // discard further scalars | ||
| 3382 | var tmp_il = InitList{}; | ||
| 3383 | defer tmp_il.deinit(p.gpa); | ||
| 3384 | saw = try p.initializerItem(&tmp_il, .{ .specifier = .void }); | ||
| 3385 | } else if (p.tok_ids[p.tok_i] == .l_brace) { | ||
| 3386 | if (designation) { | ||
| 3387 | // designation overrides previous value, let existing mechanism handle it | ||
| 3388 | saw = try p.initializerItem(cur_il, cur_ty); | ||
| 3389 | } else if (try p.findAggregateInitializer(&cur_il, &cur_ty, &index_hint)) { | ||
| 3390 | saw = try p.initializerItem(cur_il, cur_ty); | ||
| 3391 | } else { | ||
| 3392 | // discard further values | ||
| 3393 | var tmp_il = InitList{}; | ||
| 3394 | defer tmp_il.deinit(p.gpa); | ||
| 3395 | saw = try p.initializerItem(&tmp_il, .{ .specifier = .void }); | ||
| 3396 | if (!warned_excess) try p.errTok(if (init_ty.isArray()) .excess_array_init else .excess_struct_init, first_tok); | ||
| 3397 | warned_excess = true; | ||
| 3398 | } | ||
| 3399 | } else single_item: { | ||
| 3400 | first_tok = p.tok_i; | ||
| 3401 | var res = try p.assignExpr(); | ||
| 3402 | saw = !res.empty(p); | ||
| 3403 | if (!saw) break :single_item; | ||
| 3404 | |||
| 3405 | excess: { | ||
| 3406 | if (index_hint) |*hint| { | ||
| 3407 | if (try p.findScalarInitializerAt(&cur_il, &cur_ty, &res, first_tok, hint)) break :excess; | ||
| 3408 | } else if (try p.findScalarInitializer(&cur_il, &cur_ty, &res, first_tok)) break :excess; | ||
| 3409 | |||
| 3410 | if (designation) break :excess; | ||
| 3411 | if (!warned_excess) try p.errTok(if (init_ty.isArray()) .excess_array_init else .excess_struct_init, first_tok); | ||
| 3412 | warned_excess = true; | ||
| 3413 | |||
| 3414 | break :single_item; | ||
| 3415 | } | ||
| 3416 | |||
| 3417 | const arr = try p.coerceArrayInit(&res, first_tok, cur_ty); | ||
| 3418 | if (!arr) try p.coerceInit(&res, first_tok, cur_ty); | ||
| 3419 | if (cur_il.tok != 0) { | ||
| 3420 | try p.errTok(.initializer_overrides, first_tok); | ||
| 3421 | try p.errTok(.previous_initializer, cur_il.tok); | ||
| 3422 | } | ||
| 3423 | cur_il.node = res.node; | ||
| 3424 | cur_il.tok = first_tok; | ||
| 3425 | } | ||
| 3426 | |||
| 3427 | if (!saw) { | ||
| 3428 | if (designation) { | ||
| 3429 | try p.err(.expected_expr); | ||
| 3430 | return error.ParsingFailed; | ||
| 3431 | } | ||
| 3432 | break; | ||
| 3433 | } else if (count == 1) { | ||
| 3434 | if (is_str_init) try p.errTok(.excess_str_init, first_tok); | ||
| 3435 | if (is_scalar and !is_complex) try p.errTok(.excess_scalar_init, first_tok); | ||
| 3436 | } else if (count == 2) { | ||
| 3437 | if (is_scalar and is_complex) try p.errTok(.excess_scalar_init, first_tok); | ||
| 3438 | } | ||
| 3439 | |||
| 3440 | if (p.eatToken(.comma) == null) break; | ||
| 3441 | } | ||
| 3442 | try p.expectClosing(l_brace, .r_brace); | ||
| 3443 | |||
| 3444 | if (is_complex and count == 1) { // count of 1 means we saw exactly 2 items in the initializer list | ||
| 3445 | try p.errTok(.complex_component_init, l_brace); | ||
| 3446 | } | ||
| 3447 | if (is_scalar or is_str_init) return true; | ||
| 3448 | if (il.tok != 0) { | ||
| 3449 | try p.errTok(.initializer_overrides, l_brace); | ||
| 3450 | try p.errTok(.previous_initializer, il.tok); | ||
| 3451 | } | ||
| 3452 | il.node = .none; | ||
| 3453 | il.tok = l_brace; | ||
| 3454 | return true; | ||
| 3455 | } | ||
| 3456 | |||
| 3457 | /// Returns true if the value is unused. | ||
| 3458 | fn findScalarInitializerAt(p: *Parser, il: **InitList, ty: *Type, res: *Result, first_tok: TokenIndex, start_index: *u64) Error!bool { | ||
| 3459 | if (ty.isArray()) { | ||
| 3460 | if (il.*.node != .none) return false; | ||
| 3461 | start_index.* += 1; | ||
| 3462 | |||
| 3463 | const arr_ty = ty.*; | ||
| 3464 | const elem_count = arr_ty.arrayLen() orelse std.math.maxInt(u64); | ||
| 3465 | if (elem_count == 0) { | ||
| 3466 | try p.errTok(.empty_aggregate_init_braces, first_tok); | ||
| 3467 | return error.ParsingFailed; | ||
| 3468 | } | ||
| 3469 | const elem_ty = arr_ty.elemType(); | ||
| 3470 | const arr_il = il.*; | ||
| 3471 | if (start_index.* < elem_count) { | ||
| 3472 | ty.* = elem_ty; | ||
| 3473 | il.* = try arr_il.find(p.gpa, start_index.*); | ||
| 3474 | _ = try p.findScalarInitializer(il, ty, res, first_tok); | ||
| 3475 | return true; | ||
| 3476 | } | ||
| 3477 | return false; | ||
| 3478 | } else if (ty.get(.@"struct")) |struct_ty| { | ||
| 3479 | if (il.*.node != .none) return false; | ||
| 3480 | start_index.* += 1; | ||
| 3481 | |||
| 3482 | const fields = struct_ty.data.record.fields; | ||
| 3483 | if (fields.len == 0) { | ||
| 3484 | try p.errTok(.empty_aggregate_init_braces, first_tok); | ||
| 3485 | return error.ParsingFailed; | ||
| 3486 | } | ||
| 3487 | const struct_il = il.*; | ||
| 3488 | if (start_index.* < fields.len) { | ||
| 3489 | const field = fields[@intCast(start_index.*)]; | ||
| 3490 | ty.* = field.ty; | ||
| 3491 | il.* = try struct_il.find(p.gpa, start_index.*); | ||
| 3492 | _ = try p.findScalarInitializer(il, ty, res, first_tok); | ||
| 3493 | return true; | ||
| 3494 | } | ||
| 3495 | return false; | ||
| 3496 | } else if (ty.get(.@"union")) |_| { | ||
| 3497 | return false; | ||
| 3498 | } | ||
| 3499 | return il.*.node == .none; | ||
| 3500 | } | ||
| 3501 | |||
| 3502 | /// Returns true if the value is unused. | ||
| 3503 | fn findScalarInitializer(p: *Parser, il: **InitList, ty: *Type, res: *Result, first_tok: TokenIndex) Error!bool { | ||
| 3504 | const actual_ty = res.ty; | ||
| 3505 | if (ty.isArray() or ty.isComplex()) { | ||
| 3506 | if (il.*.node != .none) return false; | ||
| 3507 | if (try p.coerceArrayInitExtra(res, first_tok, ty.*, false)) return true; | ||
| 3508 | const start_index = il.*.list.items.len; | ||
| 3509 | var index = if (start_index != 0) il.*.list.items[start_index - 1].index else start_index; | ||
| 3510 | |||
| 3511 | const arr_ty = ty.*; | ||
| 3512 | const elem_count: u64 = arr_ty.expectedInitListSize() orelse std.math.maxInt(u64); | ||
| 3513 | if (elem_count == 0) { | ||
| 3514 | try p.errTok(.empty_aggregate_init_braces, first_tok); | ||
| 3515 | return error.ParsingFailed; | ||
| 3516 | } | ||
| 3517 | const elem_ty = arr_ty.elemType(); | ||
| 3518 | const arr_il = il.*; | ||
| 3519 | while (index < elem_count) : (index += 1) { | ||
| 3520 | ty.* = elem_ty; | ||
| 3521 | il.* = try arr_il.find(p.gpa, index); | ||
| 3522 | if (il.*.node == .none and actual_ty.eql(elem_ty, p.comp, false)) return true; | ||
| 3523 | if (try p.findScalarInitializer(il, ty, res, first_tok)) return true; | ||
| 3524 | } | ||
| 3525 | return false; | ||
| 3526 | } else if (ty.get(.@"struct")) |struct_ty| { | ||
| 3527 | if (il.*.node != .none) return false; | ||
| 3528 | if (actual_ty.eql(ty.*, p.comp, false)) return true; | ||
| 3529 | const start_index = il.*.list.items.len; | ||
| 3530 | var index = if (start_index != 0) il.*.list.items[start_index - 1].index + 1 else start_index; | ||
| 3531 | |||
| 3532 | const fields = struct_ty.data.record.fields; | ||
| 3533 | if (fields.len == 0) { | ||
| 3534 | try p.errTok(.empty_aggregate_init_braces, first_tok); | ||
| 3535 | return error.ParsingFailed; | ||
| 3536 | } | ||
| 3537 | const struct_il = il.*; | ||
| 3538 | while (index < fields.len) : (index += 1) { | ||
| 3539 | const field = fields[@intCast(index)]; | ||
| 3540 | ty.* = field.ty; | ||
| 3541 | il.* = try struct_il.find(p.gpa, index); | ||
| 3542 | if (il.*.node == .none and actual_ty.eql(field.ty, p.comp, false)) return true; | ||
| 3543 | if (il.*.node == .none and try p.coerceArrayInitExtra(res, first_tok, ty.*, false)) return true; | ||
| 3544 | if (try p.findScalarInitializer(il, ty, res, first_tok)) return true; | ||
| 3545 | } | ||
| 3546 | return false; | ||
| 3547 | } else if (ty.get(.@"union")) |union_ty| { | ||
| 3548 | if (il.*.node != .none) return false; | ||
| 3549 | if (actual_ty.eql(ty.*, p.comp, false)) return true; | ||
| 3550 | if (union_ty.data.record.fields.len == 0) { | ||
| 3551 | try p.errTok(.empty_aggregate_init_braces, first_tok); | ||
| 3552 | return error.ParsingFailed; | ||
| 3553 | } | ||
| 3554 | ty.* = union_ty.data.record.fields[0].ty; | ||
| 3555 | il.* = try il.*.find(p.gpa, 0); | ||
| 3556 | // if (il.*.node == .none and actual_ty.eql(ty, p.comp, false)) return true; | ||
| 3557 | if (try p.coerceArrayInitExtra(res, first_tok, ty.*, false)) return true; | ||
| 3558 | if (try p.findScalarInitializer(il, ty, res, first_tok)) return true; | ||
| 3559 | return false; | ||
| 3560 | } | ||
| 3561 | return il.*.node == .none; | ||
| 3562 | } | ||
| 3563 | |||
| 3564 | fn findAggregateInitializer(p: *Parser, il: **InitList, ty: *Type, start_index: *?u64) Error!bool { | ||
| 3565 | if (ty.isArray()) { | ||
| 3566 | if (il.*.node != .none) return false; | ||
| 3567 | const list_index = il.*.list.items.len; | ||
| 3568 | const index = if (start_index.*) |*some| blk: { | ||
| 3569 | some.* += 1; | ||
| 3570 | break :blk some.*; | ||
| 3571 | } else if (list_index != 0) | ||
| 3572 | il.*.list.items[list_index - 1].index + 1 | ||
| 3573 | else | ||
| 3574 | list_index; | ||
| 3575 | |||
| 3576 | const arr_ty = ty.*; | ||
| 3577 | const elem_count = arr_ty.arrayLen() orelse std.math.maxInt(u64); | ||
| 3578 | const elem_ty = arr_ty.elemType(); | ||
| 3579 | if (index < elem_count) { | ||
| 3580 | ty.* = elem_ty; | ||
| 3581 | il.* = try il.*.find(p.gpa, index); | ||
| 3582 | return true; | ||
| 3583 | } | ||
| 3584 | return false; | ||
| 3585 | } else if (ty.get(.@"struct")) |struct_ty| { | ||
| 3586 | if (il.*.node != .none) return false; | ||
| 3587 | const list_index = il.*.list.items.len; | ||
| 3588 | const index = if (start_index.*) |*some| blk: { | ||
| 3589 | some.* += 1; | ||
| 3590 | break :blk some.*; | ||
| 3591 | } else if (list_index != 0) | ||
| 3592 | il.*.list.items[list_index - 1].index + 1 | ||
| 3593 | else | ||
| 3594 | list_index; | ||
| 3595 | |||
| 3596 | const field_count = struct_ty.data.record.fields.len; | ||
| 3597 | if (index < field_count) { | ||
| 3598 | ty.* = struct_ty.data.record.fields[@intCast(index)].ty; | ||
| 3599 | il.* = try il.*.find(p.gpa, index); | ||
| 3600 | return true; | ||
| 3601 | } | ||
| 3602 | return false; | ||
| 3603 | } else if (ty.get(.@"union")) |union_ty| { | ||
| 3604 | if (il.*.node != .none) return false; | ||
| 3605 | if (start_index.*) |_| return false; // overrides | ||
| 3606 | if (union_ty.data.record.fields.len == 0) return false; | ||
| 3607 | |||
| 3608 | ty.* = union_ty.data.record.fields[0].ty; | ||
| 3609 | il.* = try il.*.find(p.gpa, 0); | ||
| 3610 | return true; | ||
| 3611 | } else { | ||
| 3612 | try p.err(.too_many_scalar_init_braces); | ||
| 3613 | return il.*.node == .none; | ||
| 3614 | } | ||
| 3615 | } | ||
| 3616 | |||
| 3617 | fn coerceArrayInit(p: *Parser, item: *Result, tok: TokenIndex, target: Type) !bool { | ||
| 3618 | return p.coerceArrayInitExtra(item, tok, target, true); | ||
| 3619 | } | ||
| 3620 | |||
| 3621 | fn coerceArrayInitExtra(p: *Parser, item: *Result, tok: TokenIndex, target: Type, report_err: bool) !bool { | ||
| 3622 | if (!target.isArray()) return false; | ||
| 3623 | |||
| 3624 | const is_str_lit = p.nodeIs(item.node, .string_literal_expr); | ||
| 3625 | if (!is_str_lit and !p.nodeIsCompoundLiteral(item.node) or !item.ty.isArray()) { | ||
| 3626 | if (!report_err) return false; | ||
| 3627 | try p.errTok(.array_init_str, tok); | ||
| 3628 | return true; // do not do further coercion | ||
| 3629 | } | ||
| 3630 | |||
| 3631 | const target_spec = target.elemType().canonicalize(.standard).specifier; | ||
| 3632 | const item_spec = item.ty.elemType().canonicalize(.standard).specifier; | ||
| 3633 | |||
| 3634 | const compatible = target.elemType().eql(item.ty.elemType(), p.comp, false) or | ||
| 3635 | (is_str_lit and item_spec == .char and (target_spec == .uchar or target_spec == .schar)) or | ||
| 3636 | (is_str_lit and item_spec == .uchar and (target_spec == .uchar or target_spec == .schar or target_spec == .char)); | ||
| 3637 | if (!compatible) { | ||
| 3638 | if (!report_err) return false; | ||
| 3639 | const e_msg = " with array of type "; | ||
| 3640 | try p.errStr(.incompatible_array_init, tok, try p.typePairStrExtra(target, e_msg, item.ty)); | ||
| 3641 | return true; // do not do further coercion | ||
| 3642 | } | ||
| 3643 | |||
| 3644 | if (target.get(.array)) |arr_ty| { | ||
| 3645 | assert(item.ty.specifier == .array); | ||
| 3646 | const len = item.ty.arrayLen().?; | ||
| 3647 | const array_len = arr_ty.arrayLen().?; | ||
| 3648 | if (is_str_lit) { | ||
| 3649 | // the null byte of a string can be dropped | ||
| 3650 | if (len - 1 > array_len and report_err) { | ||
| 3651 | try p.errTok(.str_init_too_long, tok); | ||
| 3652 | } | ||
| 3653 | } else if (len > array_len and report_err) { | ||
| 3654 | try p.errStr( | ||
| 3655 | .arr_init_too_long, | ||
| 3656 | tok, | ||
| 3657 | try p.typePairStrExtra(target, " with array of type ", item.ty), | ||
| 3658 | ); | ||
| 3659 | } | ||
| 3660 | } | ||
| 3661 | return true; | ||
| 3662 | } | ||
| 3663 | |||
| 3664 | fn coerceInit(p: *Parser, item: *Result, tok: TokenIndex, target: Type) !void { | ||
| 3665 | if (target.is(.void)) return; // Do not do type coercion on excess items | ||
| 3666 | |||
| 3667 | const node = item.node; | ||
| 3668 | try item.lvalConversion(p); | ||
| 3669 | if (target.is(.auto_type)) { | ||
| 3670 | if (p.getNode(node, .member_access_expr) orelse p.getNode(node, .member_access_ptr_expr)) |member_node| { | ||
| 3671 | if (p.tmpTree().isBitfield(member_node)) try p.errTok(.auto_type_from_bitfield, tok); | ||
| 3672 | } | ||
| 3673 | return; | ||
| 3674 | } else if (target.is(.c23_auto)) { | ||
| 3675 | return; | ||
| 3676 | } | ||
| 3677 | |||
| 3678 | try item.coerce(p, target, tok, .init); | ||
| 3679 | } | ||
| 3680 | |||
| 3681 | fn isStringInit(p: *Parser, ty: Type) bool { | ||
| 3682 | if (!ty.isArray() or !ty.elemType().isInt()) return false; | ||
| 3683 | var i = p.tok_i; | ||
| 3684 | while (true) : (i += 1) { | ||
| 3685 | switch (p.tok_ids[i]) { | ||
| 3686 | .l_paren => {}, | ||
| 3687 | .string_literal, | ||
| 3688 | .string_literal_utf_16, | ||
| 3689 | .string_literal_utf_8, | ||
| 3690 | .string_literal_utf_32, | ||
| 3691 | .string_literal_wide, | ||
| 3692 | => return true, | ||
| 3693 | else => return false, | ||
| 3694 | } | ||
| 3695 | } | ||
| 3696 | } | ||
| 3697 | |||
| 3698 | /// Convert InitList into an AST | ||
| 3699 | fn convertInitList(p: *Parser, il: InitList, init_ty: Type) Error!NodeIndex { | ||
| 3700 | const is_complex = init_ty.isComplex(); | ||
| 3701 | if (init_ty.isScalar() and !is_complex) { | ||
| 3702 | if (il.node == .none) { | ||
| 3703 | return p.addNode(.{ .tag = .default_init_expr, .ty = init_ty, .data = undefined }); | ||
| 3704 | } | ||
| 3705 | return il.node; | ||
| 3706 | } else if (init_ty.is(.variable_len_array)) { | ||
| 3707 | return error.ParsingFailed; // vla invalid, reported earlier | ||
| 3708 | } else if (init_ty.isArray() or is_complex) { | ||
| 3709 | if (il.node != .none) { | ||
| 3710 | return il.node; | ||
| 3711 | } | ||
| 3712 | const list_buf_top = p.list_buf.items.len; | ||
| 3713 | defer p.list_buf.items.len = list_buf_top; | ||
| 3714 | |||
| 3715 | const elem_ty = init_ty.elemType(); | ||
| 3716 | |||
| 3717 | const max_items: u64 = init_ty.expectedInitListSize() orelse std.math.maxInt(usize); | ||
| 3718 | var start: u64 = 0; | ||
| 3719 | for (il.list.items) |*init| { | ||
| 3720 | if (init.index > start) { | ||
| 3721 | const elem = try p.addNode(.{ | ||
| 3722 | .tag = .array_filler_expr, | ||
| 3723 | .ty = elem_ty, | ||
| 3724 | .data = .{ .int = init.index - start }, | ||
| 3725 | }); | ||
| 3726 | try p.list_buf.append(elem); | ||
| 3727 | } | ||
| 3728 | start = init.index + 1; | ||
| 3729 | |||
| 3730 | const elem = try p.convertInitList(init.list, elem_ty); | ||
| 3731 | try p.list_buf.append(elem); | ||
| 3732 | } | ||
| 3733 | |||
| 3734 | var arr_init_node: Tree.Node = .{ | ||
| 3735 | .tag = .array_init_expr_two, | ||
| 3736 | .ty = init_ty, | ||
| 3737 | .data = .{ .bin = .{ .lhs = .none, .rhs = .none } }, | ||
| 3738 | }; | ||
| 3739 | |||
| 3740 | if (init_ty.specifier == .incomplete_array) { | ||
| 3741 | arr_init_node.ty.specifier = .array; | ||
| 3742 | arr_init_node.ty.data.array.len = start; | ||
| 3743 | } else if (init_ty.is(.incomplete_array)) { | ||
| 3744 | const arr_ty = try p.arena.create(Type.Array); | ||
| 3745 | arr_ty.* = .{ .elem = init_ty.elemType(), .len = start }; | ||
| 3746 | arr_init_node.ty = .{ | ||
| 3747 | .specifier = .array, | ||
| 3748 | .data = .{ .array = arr_ty }, | ||
| 3749 | }; | ||
| 3750 | const attrs = init_ty.getAttributes(); | ||
| 3751 | arr_init_node.ty = try arr_init_node.ty.withAttributes(p.arena, attrs); | ||
| 3752 | } else if (start < max_items) { | ||
| 3753 | const elem = try p.addNode(.{ | ||
| 3754 | .tag = .array_filler_expr, | ||
| 3755 | .ty = elem_ty, | ||
| 3756 | .data = .{ .int = max_items - start }, | ||
| 3757 | }); | ||
| 3758 | try p.list_buf.append(elem); | ||
| 3759 | } | ||
| 3760 | |||
| 3761 | const items = p.list_buf.items[list_buf_top..]; | ||
| 3762 | switch (items.len) { | ||
| 3763 | 0 => {}, | ||
| 3764 | 1 => arr_init_node.data.bin.lhs = items[0], | ||
| 3765 | 2 => arr_init_node.data.bin = .{ .lhs = items[0], .rhs = items[1] }, | ||
| 3766 | else => { | ||
| 3767 | arr_init_node.tag = .array_init_expr; | ||
| 3768 | arr_init_node.data = .{ .range = try p.addList(items) }; | ||
| 3769 | }, | ||
| 3770 | } | ||
| 3771 | return try p.addNode(arr_init_node); | ||
| 3772 | } else if (init_ty.get(.@"struct")) |struct_ty| { | ||
| 3773 | assert(!struct_ty.hasIncompleteSize()); | ||
| 3774 | if (il.node != .none) { | ||
| 3775 | return il.node; | ||
| 3776 | } | ||
| 3777 | |||
| 3778 | const list_buf_top = p.list_buf.items.len; | ||
| 3779 | defer p.list_buf.items.len = list_buf_top; | ||
| 3780 | |||
| 3781 | var init_index: usize = 0; | ||
| 3782 | for (struct_ty.data.record.fields, 0..) |f, i| { | ||
| 3783 | if (init_index < il.list.items.len and il.list.items[init_index].index == i) { | ||
| 3784 | const item = try p.convertInitList(il.list.items[init_index].list, f.ty); | ||
| 3785 | try p.list_buf.append(item); | ||
| 3786 | init_index += 1; | ||
| 3787 | } else { | ||
| 3788 | const item = try p.addNode(.{ .tag = .default_init_expr, .ty = f.ty, .data = undefined }); | ||
| 3789 | try p.list_buf.append(item); | ||
| 3790 | } | ||
| 3791 | } | ||
| 3792 | |||
| 3793 | var struct_init_node: Tree.Node = .{ | ||
| 3794 | .tag = .struct_init_expr_two, | ||
| 3795 | .ty = init_ty, | ||
| 3796 | .data = .{ .bin = .{ .lhs = .none, .rhs = .none } }, | ||
| 3797 | }; | ||
| 3798 | const items = p.list_buf.items[list_buf_top..]; | ||
| 3799 | switch (items.len) { | ||
| 3800 | 0 => {}, | ||
| 3801 | 1 => struct_init_node.data.bin.lhs = items[0], | ||
| 3802 | 2 => struct_init_node.data.bin = .{ .lhs = items[0], .rhs = items[1] }, | ||
| 3803 | else => { | ||
| 3804 | struct_init_node.tag = .struct_init_expr; | ||
| 3805 | struct_init_node.data = .{ .range = try p.addList(items) }; | ||
| 3806 | }, | ||
| 3807 | } | ||
| 3808 | return try p.addNode(struct_init_node); | ||
| 3809 | } else if (init_ty.get(.@"union")) |union_ty| { | ||
| 3810 | if (il.node != .none) { | ||
| 3811 | return il.node; | ||
| 3812 | } | ||
| 3813 | |||
| 3814 | var union_init_node: Tree.Node = .{ | ||
| 3815 | .tag = .union_init_expr, | ||
| 3816 | .ty = init_ty, | ||
| 3817 | .data = .{ .union_init = .{ .field_index = 0, .node = .none } }, | ||
| 3818 | }; | ||
| 3819 | if (union_ty.data.record.fields.len == 0) { | ||
| 3820 | // do nothing for empty unions | ||
| 3821 | } else if (il.list.items.len == 0) { | ||
| 3822 | union_init_node.data.union_init.node = try p.addNode(.{ | ||
| 3823 | .tag = .default_init_expr, | ||
| 3824 | .ty = init_ty, | ||
| 3825 | .data = undefined, | ||
| 3826 | }); | ||
| 3827 | } else { | ||
| 3828 | const init = il.list.items[0]; | ||
| 3829 | const index: u32 = @truncate(init.index); | ||
| 3830 | const field_ty = union_ty.data.record.fields[index].ty; | ||
| 3831 | union_init_node.data.union_init = .{ | ||
| 3832 | .field_index = index, | ||
| 3833 | .node = try p.convertInitList(init.list, field_ty), | ||
| 3834 | }; | ||
| 3835 | } | ||
| 3836 | return try p.addNode(union_init_node); | ||
| 3837 | } else { | ||
| 3838 | return error.ParsingFailed; // initializer target is invalid, reported earlier | ||
| 3839 | } | ||
| 3840 | } | ||
| 3841 | |||
| 3842 | fn msvcAsmStmt(p: *Parser) Error!?NodeIndex { | ||
| 3843 | return p.todo("MSVC assembly statements"); | ||
| 3844 | } | ||
| 3845 | |||
| 3846 | /// asmOperand : ('[' IDENTIFIER ']')? asmStr '(' expr ')' | ||
| 3847 | fn asmOperand(p: *Parser, names: *std.ArrayList(?TokenIndex), constraints: *NodeList, exprs: *NodeList) Error!void { | ||
| 3848 | if (p.eatToken(.l_bracket)) |l_bracket| { | ||
| 3849 | const ident = (try p.eatIdentifier()) orelse { | ||
| 3850 | try p.err(.expected_identifier); | ||
| 3851 | return error.ParsingFailed; | ||
| 3852 | }; | ||
| 3853 | try names.append(ident); | ||
| 3854 | try p.expectClosing(l_bracket, .r_bracket); | ||
| 3855 | } else { | ||
| 3856 | try names.append(null); | ||
| 3857 | } | ||
| 3858 | const constraint = try p.asmStr(); | ||
| 3859 | try constraints.append(constraint.node); | ||
| 3860 | |||
| 3861 | const l_paren = p.eatToken(.l_paren) orelse { | ||
| 3862 | try p.errExtra(.expected_token, p.tok_i, .{ .tok_id = .{ .actual = p.tok_ids[p.tok_i], .expected = .l_paren } }); | ||
| 3863 | return error.ParsingFailed; | ||
| 3864 | }; | ||
| 3865 | const res = try p.expr(); | ||
| 3866 | try p.expectClosing(l_paren, .r_paren); | ||
| 3867 | try res.expect(p); | ||
| 3868 | try exprs.append(res.node); | ||
| 3869 | } | ||
| 3870 | |||
| 3871 | /// gnuAsmStmt | ||
| 3872 | /// : asmStr | ||
| 3873 | /// | asmStr ':' asmOperand* | ||
| 3874 | /// | asmStr ':' asmOperand* ':' asmOperand* | ||
| 3875 | /// | asmStr ':' asmOperand* ':' asmOperand* : asmStr? (',' asmStr)* | ||
| 3876 | /// | asmStr ':' asmOperand* ':' asmOperand* : asmStr? (',' asmStr)* : IDENTIFIER (',' IDENTIFIER)* | ||
| 3877 | fn gnuAsmStmt(p: *Parser, quals: Tree.GNUAssemblyQualifiers, l_paren: TokenIndex) Error!NodeIndex { | ||
| 3878 | const asm_str = try p.asmStr(); | ||
| 3879 | try p.checkAsmStr(asm_str.val, l_paren); | ||
| 3880 | |||
| 3881 | if (p.tok_ids[p.tok_i] == .r_paren) { | ||
| 3882 | return p.addNode(.{ | ||
| 3883 | .tag = .gnu_asm_simple, | ||
| 3884 | .ty = .{ .specifier = .void }, | ||
| 3885 | .data = .{ .un = asm_str.node }, | ||
| 3886 | }); | ||
| 3887 | } | ||
| 3888 | |||
| 3889 | const expected_items = 8; // arbitrarily chosen, most assembly will have fewer than 8 inputs/outputs/constraints/names | ||
| 3890 | const bytes_needed = expected_items * @sizeOf(?TokenIndex) + expected_items * 3 * @sizeOf(NodeIndex); | ||
| 3891 | |||
| 3892 | var stack_fallback = std.heap.stackFallback(bytes_needed, p.gpa); | ||
| 3893 | const allocator = stack_fallback.get(); | ||
| 3894 | |||
| 3895 | // TODO: Consider using a TokenIndex of 0 instead of null if we need to store the names in the tree | ||
| 3896 | var names = std.ArrayList(?TokenIndex).initCapacity(allocator, expected_items) catch unreachable; // stack allocation already succeeded | ||
| 3897 | defer names.deinit(); | ||
| 3898 | var constraints = NodeList.initCapacity(allocator, expected_items) catch unreachable; // stack allocation already succeeded | ||
| 3899 | defer constraints.deinit(); | ||
| 3900 | var exprs = NodeList.initCapacity(allocator, expected_items) catch unreachable; //stack allocation already succeeded | ||
| 3901 | defer exprs.deinit(); | ||
| 3902 | var clobbers = NodeList.initCapacity(allocator, expected_items) catch unreachable; //stack allocation already succeeded | ||
| 3903 | defer clobbers.deinit(); | ||
| 3904 | |||
| 3905 | // Outputs | ||
| 3906 | var ate_extra_colon = false; | ||
| 3907 | if (p.eatToken(.colon) orelse p.eatToken(.colon_colon)) |tok_i| { | ||
| 3908 | ate_extra_colon = p.tok_ids[tok_i] == .colon_colon; | ||
| 3909 | if (!ate_extra_colon) { | ||
| 3910 | if (p.tok_ids[p.tok_i].isStringLiteral() or p.tok_ids[p.tok_i] == .l_bracket) { | ||
| 3911 | while (true) { | ||
| 3912 | try p.asmOperand(&names, &constraints, &exprs); | ||
| 3913 | if (p.eatToken(.comma) == null) break; | ||
| 3914 | } | ||
| 3915 | } | ||
| 3916 | } | ||
| 3917 | } | ||
| 3918 | |||
| 3919 | const num_outputs = names.items.len; | ||
| 3920 | |||
| 3921 | // Inputs | ||
| 3922 | if (ate_extra_colon or p.tok_ids[p.tok_i] == .colon or p.tok_ids[p.tok_i] == .colon_colon) { | ||
| 3923 | if (ate_extra_colon) { | ||
| 3924 | ate_extra_colon = false; | ||
| 3925 | } else { | ||
| 3926 | ate_extra_colon = p.tok_ids[p.tok_i] == .colon_colon; | ||
| 3927 | p.tok_i += 1; | ||
| 3928 | } | ||
| 3929 | if (!ate_extra_colon) { | ||
| 3930 | if (p.tok_ids[p.tok_i].isStringLiteral() or p.tok_ids[p.tok_i] == .l_bracket) { | ||
| 3931 | while (true) { | ||
| 3932 | try p.asmOperand(&names, &constraints, &exprs); | ||
| 3933 | if (p.eatToken(.comma) == null) break; | ||
| 3934 | } | ||
| 3935 | } | ||
| 3936 | } | ||
| 3937 | } | ||
| 3938 | std.debug.assert(names.items.len == constraints.items.len and constraints.items.len == exprs.items.len); | ||
| 3939 | const num_inputs = names.items.len - num_outputs; | ||
| 3940 | _ = num_inputs; | ||
| 3941 | |||
| 3942 | // Clobbers | ||
| 3943 | if (ate_extra_colon or p.tok_ids[p.tok_i] == .colon or p.tok_ids[p.tok_i] == .colon_colon) { | ||
| 3944 | if (ate_extra_colon) { | ||
| 3945 | ate_extra_colon = false; | ||
| 3946 | } else { | ||
| 3947 | ate_extra_colon = p.tok_ids[p.tok_i] == .colon_colon; | ||
| 3948 | p.tok_i += 1; | ||
| 3949 | } | ||
| 3950 | if (!ate_extra_colon and p.tok_ids[p.tok_i].isStringLiteral()) { | ||
| 3951 | while (true) { | ||
| 3952 | const clobber = try p.asmStr(); | ||
| 3953 | try clobbers.append(clobber.node); | ||
| 3954 | if (p.eatToken(.comma) == null) break; | ||
| 3955 | } | ||
| 3956 | } | ||
| 3957 | } | ||
| 3958 | |||
| 3959 | if (!quals.goto and (p.tok_ids[p.tok_i] != .r_paren or ate_extra_colon)) { | ||
| 3960 | try p.errExtra(.expected_token, p.tok_i, .{ .tok_id = .{ .actual = p.tok_ids[p.tok_i], .expected = .r_paren } }); | ||
| 3961 | return error.ParsingFailed; | ||
| 3962 | } | ||
| 3963 | |||
| 3964 | // Goto labels | ||
| 3965 | var num_labels: u32 = 0; | ||
| 3966 | if (ate_extra_colon or p.tok_ids[p.tok_i] == .colon) { | ||
| 3967 | if (!ate_extra_colon) { | ||
| 3968 | p.tok_i += 1; | ||
| 3969 | } | ||
| 3970 | while (true) { | ||
| 3971 | const ident = (try p.eatIdentifier()) orelse { | ||
| 3972 | try p.err(.expected_identifier); | ||
| 3973 | return error.ParsingFailed; | ||
| 3974 | }; | ||
| 3975 | const ident_str = p.tokSlice(ident); | ||
| 3976 | const label = p.findLabel(ident_str) orelse blk: { | ||
| 3977 | try p.labels.append(.{ .unresolved_goto = ident }); | ||
| 3978 | break :blk ident; | ||
| 3979 | }; | ||
| 3980 | try names.append(ident); | ||
| 3981 | |||
| 3982 | const elem_ty = try p.arena.create(Type); | ||
| 3983 | elem_ty.* = .{ .specifier = .void }; | ||
| 3984 | const result_ty = Type{ .specifier = .pointer, .data = .{ .sub_type = elem_ty } }; | ||
| 3985 | |||
| 3986 | const label_addr_node = try p.addNode(.{ | ||
| 3987 | .tag = .addr_of_label, | ||
| 3988 | .data = .{ .decl_ref = label }, | ||
| 3989 | .ty = result_ty, | ||
| 3990 | }); | ||
| 3991 | try exprs.append(label_addr_node); | ||
| 3992 | |||
| 3993 | num_labels += 1; | ||
| 3994 | if (p.eatToken(.comma) == null) break; | ||
| 3995 | } | ||
| 3996 | } else if (quals.goto) { | ||
| 3997 | try p.errExtra(.expected_token, p.tok_i, .{ .tok_id = .{ .actual = p.tok_ids[p.tok_i], .expected = .colon } }); | ||
| 3998 | return error.ParsingFailed; | ||
| 3999 | } | ||
| 4000 | |||
| 4001 | // TODO: validate and insert into AST | ||
| 4002 | return .none; | ||
| 4003 | } | ||
| 4004 | |||
| 4005 | fn checkAsmStr(p: *Parser, asm_str: Value, tok: TokenIndex) !void { | ||
| 4006 | if (!p.comp.langopts.gnu_asm) { | ||
| 4007 | const str = p.comp.interner.get(asm_str.ref()).bytes; | ||
| 4008 | if (str.len > 1) { | ||
| 4009 | // Empty string (just a NUL byte) is ok because it does not emit any assembly | ||
| 4010 | try p.errTok(.gnu_asm_disabled, tok); | ||
| 4011 | } | ||
| 4012 | } | ||
| 4013 | } | ||
| 4014 | |||
| 4015 | /// assembly | ||
| 4016 | /// : keyword_asm asmQual* '(' asmStr ')' | ||
| 4017 | /// | keyword_asm asmQual* '(' gnuAsmStmt ')' | ||
| 4018 | /// | keyword_asm msvcAsmStmt | ||
| 4019 | fn assembly(p: *Parser, kind: enum { global, decl_label, stmt }) Error!?NodeIndex { | ||
| 4020 | const asm_tok = p.tok_i; | ||
| 4021 | switch (p.tok_ids[p.tok_i]) { | ||
| 4022 | .keyword_asm => { | ||
| 4023 | try p.err(.extension_token_used); | ||
| 4024 | p.tok_i += 1; | ||
| 4025 | }, | ||
| 4026 | .keyword_asm1, .keyword_asm2 => p.tok_i += 1, | ||
| 4027 | else => return null, | ||
| 4028 | } | ||
| 4029 | |||
| 4030 | if (!p.tok_ids[p.tok_i].canOpenGCCAsmStmt()) { | ||
| 4031 | return p.msvcAsmStmt(); | ||
| 4032 | } | ||
| 4033 | |||
| 4034 | var quals: Tree.GNUAssemblyQualifiers = .{}; | ||
| 4035 | while (true) : (p.tok_i += 1) switch (p.tok_ids[p.tok_i]) { | ||
| 4036 | .keyword_volatile, .keyword_volatile1, .keyword_volatile2 => { | ||
| 4037 | if (kind != .stmt) try p.errStr(.meaningless_asm_qual, p.tok_i, "volatile"); | ||
| 4038 | if (quals.@"volatile") try p.errStr(.duplicate_asm_qual, p.tok_i, "volatile"); | ||
| 4039 | quals.@"volatile" = true; | ||
| 4040 | }, | ||
| 4041 | .keyword_inline, .keyword_inline1, .keyword_inline2 => { | ||
| 4042 | if (kind != .stmt) try p.errStr(.meaningless_asm_qual, p.tok_i, "inline"); | ||
| 4043 | if (quals.@"inline") try p.errStr(.duplicate_asm_qual, p.tok_i, "inline"); | ||
| 4044 | quals.@"inline" = true; | ||
| 4045 | }, | ||
| 4046 | .keyword_goto => { | ||
| 4047 | if (kind != .stmt) try p.errStr(.meaningless_asm_qual, p.tok_i, "goto"); | ||
| 4048 | if (quals.goto) try p.errStr(.duplicate_asm_qual, p.tok_i, "goto"); | ||
| 4049 | quals.goto = true; | ||
| 4050 | }, | ||
| 4051 | else => break, | ||
| 4052 | }; | ||
| 4053 | |||
| 4054 | const l_paren = try p.expectToken(.l_paren); | ||
| 4055 | var result_node: NodeIndex = .none; | ||
| 4056 | switch (kind) { | ||
| 4057 | .decl_label => { | ||
| 4058 | const asm_str = try p.asmStr(); | ||
| 4059 | const str = try p.removeNull(asm_str.val); | ||
| 4060 | |||
| 4061 | const attr = Attribute{ .tag = .asm_label, .args = .{ .asm_label = .{ .name = str } }, .syntax = .keyword }; | ||
| 4062 | try p.attr_buf.append(p.gpa, .{ .attr = attr, .tok = asm_tok }); | ||
| 4063 | }, | ||
| 4064 | .global => { | ||
| 4065 | const asm_str = try p.asmStr(); | ||
| 4066 | try p.checkAsmStr(asm_str.val, l_paren); | ||
| 4067 | result_node = try p.addNode(.{ | ||
| 4068 | .tag = .file_scope_asm, | ||
| 4069 | .ty = .{ .specifier = .void }, | ||
| 4070 | .data = .{ .decl = .{ .name = asm_tok, .node = asm_str.node } }, | ||
| 4071 | }); | ||
| 4072 | }, | ||
| 4073 | .stmt => result_node = try p.gnuAsmStmt(quals, l_paren), | ||
| 4074 | } | ||
| 4075 | try p.expectClosing(l_paren, .r_paren); | ||
| 4076 | |||
| 4077 | if (kind != .decl_label) _ = try p.expectToken(.semicolon); | ||
| 4078 | return result_node; | ||
| 4079 | } | ||
| 4080 | |||
| 4081 | /// Same as stringLiteral but errors on unicode and wide string literals | ||
| 4082 | fn asmStr(p: *Parser) Error!Result { | ||
| 4083 | var i = p.tok_i; | ||
| 4084 | while (true) : (i += 1) switch (p.tok_ids[i]) { | ||
| 4085 | .string_literal, .unterminated_string_literal => {}, | ||
| 4086 | .string_literal_utf_16, .string_literal_utf_8, .string_literal_utf_32 => { | ||
| 4087 | try p.errStr(.invalid_asm_str, p.tok_i, "unicode"); | ||
| 4088 | return error.ParsingFailed; | ||
| 4089 | }, | ||
| 4090 | .string_literal_wide => { | ||
| 4091 | try p.errStr(.invalid_asm_str, p.tok_i, "wide"); | ||
| 4092 | return error.ParsingFailed; | ||
| 4093 | }, | ||
| 4094 | else => { | ||
| 4095 | if (i == p.tok_i) { | ||
| 4096 | try p.errStr(.expected_str_literal_in, p.tok_i, "asm"); | ||
| 4097 | return error.ParsingFailed; | ||
| 4098 | } | ||
| 4099 | break; | ||
| 4100 | }, | ||
| 4101 | }; | ||
| 4102 | return try p.stringLiteral(); | ||
| 4103 | } | ||
| 4104 | |||
| 4105 | // ====== statements ====== | ||
| 4106 | |||
| 4107 | /// stmt | ||
| 4108 | /// : labeledStmt | ||
| 4109 | /// | compoundStmt | ||
| 4110 | /// | keyword_if '(' expr ')' stmt (keyword_else stmt)? | ||
| 4111 | /// | keyword_switch '(' expr ')' stmt | ||
| 4112 | /// | keyword_while '(' expr ')' stmt | ||
| 4113 | /// | keyword_do stmt while '(' expr ')' ';' | ||
| 4114 | /// | keyword_for '(' (decl | expr? ';') expr? ';' expr? ')' stmt | ||
| 4115 | /// | keyword_goto (IDENTIFIER | ('*' expr)) ';' | ||
| 4116 | /// | keyword_continue ';' | ||
| 4117 | /// | keyword_break ';' | ||
| 4118 | /// | keyword_return expr? ';' | ||
| 4119 | /// | assembly ';' | ||
| 4120 | /// | expr? ';' | ||
| 4121 | fn stmt(p: *Parser) Error!NodeIndex { | ||
| 4122 | if (try p.labeledStmt()) |some| return some; | ||
| 4123 | if (try p.compoundStmt(false, null)) |some| return some; | ||
| 4124 | if (p.eatToken(.keyword_if)) |_| { | ||
| 4125 | const l_paren = try p.expectToken(.l_paren); | ||
| 4126 | const cond_tok = p.tok_i; | ||
| 4127 | var cond = try p.expr(); | ||
| 4128 | try cond.expect(p); | ||
| 4129 | try cond.lvalConversion(p); | ||
| 4130 | try cond.usualUnaryConversion(p, cond_tok); | ||
| 4131 | if (!cond.ty.isScalar()) | ||
| 4132 | try p.errStr(.statement_scalar, l_paren + 1, try p.typeStr(cond.ty)); | ||
| 4133 | try cond.saveValue(p); | ||
| 4134 | try p.expectClosing(l_paren, .r_paren); | ||
| 4135 | |||
| 4136 | const then = try p.stmt(); | ||
| 4137 | const @"else" = if (p.eatToken(.keyword_else)) |_| try p.stmt() else .none; | ||
| 4138 | |||
| 4139 | if (then != .none and @"else" != .none) | ||
| 4140 | return try p.addNode(.{ | ||
| 4141 | .tag = .if_then_else_stmt, | ||
| 4142 | .data = .{ .if3 = .{ .cond = cond.node, .body = (try p.addList(&.{ then, @"else" })).start } }, | ||
| 4143 | }) | ||
| 4144 | else | ||
| 4145 | return try p.addNode(.{ | ||
| 4146 | .tag = .if_then_stmt, | ||
| 4147 | .data = .{ .bin = .{ .lhs = cond.node, .rhs = then } }, | ||
| 4148 | }); | ||
| 4149 | } | ||
| 4150 | if (p.eatToken(.keyword_switch)) |_| { | ||
| 4151 | const l_paren = try p.expectToken(.l_paren); | ||
| 4152 | const cond_tok = p.tok_i; | ||
| 4153 | var cond = try p.expr(); | ||
| 4154 | try cond.expect(p); | ||
| 4155 | try cond.lvalConversion(p); | ||
| 4156 | try cond.usualUnaryConversion(p, cond_tok); | ||
| 4157 | |||
| 4158 | if (!cond.ty.isInt()) | ||
| 4159 | try p.errStr(.statement_int, l_paren + 1, try p.typeStr(cond.ty)); | ||
| 4160 | try cond.saveValue(p); | ||
| 4161 | try p.expectClosing(l_paren, .r_paren); | ||
| 4162 | |||
| 4163 | const old_switch = p.@"switch"; | ||
| 4164 | var @"switch" = Switch{ | ||
| 4165 | .ranges = std.ArrayList(Switch.Range).init(p.gpa), | ||
| 4166 | .ty = cond.ty, | ||
| 4167 | .comp = p.comp, | ||
| 4168 | }; | ||
| 4169 | p.@"switch" = &@"switch"; | ||
| 4170 | defer { | ||
| 4171 | @"switch".ranges.deinit(); | ||
| 4172 | p.@"switch" = old_switch; | ||
| 4173 | } | ||
| 4174 | |||
| 4175 | const body = try p.stmt(); | ||
| 4176 | |||
| 4177 | return try p.addNode(.{ | ||
| 4178 | .tag = .switch_stmt, | ||
| 4179 | .data = .{ .bin = .{ .lhs = cond.node, .rhs = body } }, | ||
| 4180 | }); | ||
| 4181 | } | ||
| 4182 | if (p.eatToken(.keyword_while)) |_| { | ||
| 4183 | const l_paren = try p.expectToken(.l_paren); | ||
| 4184 | const cond_tok = p.tok_i; | ||
| 4185 | var cond = try p.expr(); | ||
| 4186 | try cond.expect(p); | ||
| 4187 | try cond.lvalConversion(p); | ||
| 4188 | try cond.usualUnaryConversion(p, cond_tok); | ||
| 4189 | if (!cond.ty.isScalar()) | ||
| 4190 | try p.errStr(.statement_scalar, l_paren + 1, try p.typeStr(cond.ty)); | ||
| 4191 | try cond.saveValue(p); | ||
| 4192 | try p.expectClosing(l_paren, .r_paren); | ||
| 4193 | |||
| 4194 | const body = body: { | ||
| 4195 | const old_loop = p.in_loop; | ||
| 4196 | p.in_loop = true; | ||
| 4197 | defer p.in_loop = old_loop; | ||
| 4198 | break :body try p.stmt(); | ||
| 4199 | }; | ||
| 4200 | |||
| 4201 | return try p.addNode(.{ | ||
| 4202 | .tag = .while_stmt, | ||
| 4203 | .data = .{ .bin = .{ .lhs = cond.node, .rhs = body } }, | ||
| 4204 | }); | ||
| 4205 | } | ||
| 4206 | if (p.eatToken(.keyword_do)) |_| { | ||
| 4207 | const body = body: { | ||
| 4208 | const old_loop = p.in_loop; | ||
| 4209 | p.in_loop = true; | ||
| 4210 | defer p.in_loop = old_loop; | ||
| 4211 | break :body try p.stmt(); | ||
| 4212 | }; | ||
| 4213 | |||
| 4214 | _ = try p.expectToken(.keyword_while); | ||
| 4215 | const l_paren = try p.expectToken(.l_paren); | ||
| 4216 | const cond_tok = p.tok_i; | ||
| 4217 | var cond = try p.expr(); | ||
| 4218 | try cond.expect(p); | ||
| 4219 | try cond.lvalConversion(p); | ||
| 4220 | try cond.usualUnaryConversion(p, cond_tok); | ||
| 4221 | |||
| 4222 | if (!cond.ty.isScalar()) | ||
| 4223 | try p.errStr(.statement_scalar, l_paren + 1, try p.typeStr(cond.ty)); | ||
| 4224 | try cond.saveValue(p); | ||
| 4225 | try p.expectClosing(l_paren, .r_paren); | ||
| 4226 | |||
| 4227 | _ = try p.expectToken(.semicolon); | ||
| 4228 | return try p.addNode(.{ | ||
| 4229 | .tag = .do_while_stmt, | ||
| 4230 | .data = .{ .bin = .{ .lhs = cond.node, .rhs = body } }, | ||
| 4231 | }); | ||
| 4232 | } | ||
| 4233 | if (p.eatToken(.keyword_for)) |_| { | ||
| 4234 | try p.syms.pushScope(p); | ||
| 4235 | defer p.syms.popScope(); | ||
| 4236 | const decl_buf_top = p.decl_buf.items.len; | ||
| 4237 | defer p.decl_buf.items.len = decl_buf_top; | ||
| 4238 | |||
| 4239 | const l_paren = try p.expectToken(.l_paren); | ||
| 4240 | const got_decl = try p.decl(); | ||
| 4241 | |||
| 4242 | // for (init | ||
| 4243 | const init_start = p.tok_i; | ||
| 4244 | var err_start = p.comp.diagnostics.list.items.len; | ||
| 4245 | var init = if (!got_decl) try p.expr() else Result{}; | ||
| 4246 | try init.saveValue(p); | ||
| 4247 | try init.maybeWarnUnused(p, init_start, err_start); | ||
| 4248 | if (!got_decl) _ = try p.expectToken(.semicolon); | ||
| 4249 | |||
| 4250 | // for (init; cond | ||
| 4251 | const cond_tok = p.tok_i; | ||
| 4252 | var cond = try p.expr(); | ||
| 4253 | if (cond.node != .none) { | ||
| 4254 | try cond.lvalConversion(p); | ||
| 4255 | try cond.usualUnaryConversion(p, cond_tok); | ||
| 4256 | if (!cond.ty.isScalar()) | ||
| 4257 | try p.errStr(.statement_scalar, l_paren + 1, try p.typeStr(cond.ty)); | ||
| 4258 | } | ||
| 4259 | try cond.saveValue(p); | ||
| 4260 | _ = try p.expectToken(.semicolon); | ||
| 4261 | |||
| 4262 | // for (init; cond; incr | ||
| 4263 | const incr_start = p.tok_i; | ||
| 4264 | err_start = p.comp.diagnostics.list.items.len; | ||
| 4265 | var incr = try p.expr(); | ||
| 4266 | try incr.maybeWarnUnused(p, incr_start, err_start); | ||
| 4267 | try incr.saveValue(p); | ||
| 4268 | try p.expectClosing(l_paren, .r_paren); | ||
| 4269 | |||
| 4270 | const body = body: { | ||
| 4271 | const old_loop = p.in_loop; | ||
| 4272 | p.in_loop = true; | ||
| 4273 | defer p.in_loop = old_loop; | ||
| 4274 | break :body try p.stmt(); | ||
| 4275 | }; | ||
| 4276 | |||
| 4277 | if (got_decl) { | ||
| 4278 | const start = (try p.addList(p.decl_buf.items[decl_buf_top..])).start; | ||
| 4279 | const end = (try p.addList(&.{ cond.node, incr.node, body })).end; | ||
| 4280 | |||
| 4281 | return try p.addNode(.{ | ||
| 4282 | .tag = .for_decl_stmt, | ||
| 4283 | .data = .{ .range = .{ .start = start, .end = end } }, | ||
| 4284 | }); | ||
| 4285 | } else if (init.node == .none and cond.node == .none and incr.node == .none) { | ||
| 4286 | return try p.addNode(.{ | ||
| 4287 | .tag = .forever_stmt, | ||
| 4288 | .data = .{ .un = body }, | ||
| 4289 | }); | ||
| 4290 | } else return try p.addNode(.{ .tag = .for_stmt, .data = .{ .if3 = .{ | ||
| 4291 | .cond = body, | ||
| 4292 | .body = (try p.addList(&.{ init.node, cond.node, incr.node })).start, | ||
| 4293 | } } }); | ||
| 4294 | } | ||
| 4295 | if (p.eatToken(.keyword_goto)) |goto_tok| { | ||
| 4296 | if (p.eatToken(.asterisk)) |_| { | ||
| 4297 | const expr_tok = p.tok_i; | ||
| 4298 | var e = try p.expr(); | ||
| 4299 | try e.expect(p); | ||
| 4300 | try e.lvalConversion(p); | ||
| 4301 | p.computed_goto_tok = p.computed_goto_tok orelse goto_tok; | ||
| 4302 | if (!e.ty.isPtr()) { | ||
| 4303 | const elem_ty = try p.arena.create(Type); | ||
| 4304 | elem_ty.* = .{ .specifier = .void, .qual = .{ .@"const" = true } }; | ||
| 4305 | const result_ty = Type{ | ||
| 4306 | .specifier = .pointer, | ||
| 4307 | .data = .{ .sub_type = elem_ty }, | ||
| 4308 | }; | ||
| 4309 | if (!e.ty.isInt()) { | ||
| 4310 | try p.errStr(.incompatible_arg, expr_tok, try p.typePairStrExtra(e.ty, " to parameter of incompatible type ", result_ty)); | ||
| 4311 | return error.ParsingFailed; | ||
| 4312 | } | ||
| 4313 | if (e.val.isZero(p.comp)) { | ||
| 4314 | try e.nullCast(p, result_ty); | ||
| 4315 | } else { | ||
| 4316 | try p.errStr(.implicit_int_to_ptr, expr_tok, try p.typePairStrExtra(e.ty, " to ", result_ty)); | ||
| 4317 | try e.ptrCast(p, result_ty); | ||
| 4318 | } | ||
| 4319 | } | ||
| 4320 | |||
| 4321 | try e.un(p, .computed_goto_stmt); | ||
| 4322 | _ = try p.expectToken(.semicolon); | ||
| 4323 | return e.node; | ||
| 4324 | } | ||
| 4325 | const name_tok = try p.expectIdentifier(); | ||
| 4326 | const str = p.tokSlice(name_tok); | ||
| 4327 | if (p.findLabel(str) == null) { | ||
| 4328 | try p.labels.append(.{ .unresolved_goto = name_tok }); | ||
| 4329 | } | ||
| 4330 | _ = try p.expectToken(.semicolon); | ||
| 4331 | return try p.addNode(.{ | ||
| 4332 | .tag = .goto_stmt, | ||
| 4333 | .data = .{ .decl_ref = name_tok }, | ||
| 4334 | }); | ||
| 4335 | } | ||
| 4336 | if (p.eatToken(.keyword_continue)) |cont| { | ||
| 4337 | if (!p.in_loop) try p.errTok(.continue_not_in_loop, cont); | ||
| 4338 | _ = try p.expectToken(.semicolon); | ||
| 4339 | return try p.addNode(.{ .tag = .continue_stmt, .data = undefined }); | ||
| 4340 | } | ||
| 4341 | if (p.eatToken(.keyword_break)) |br| { | ||
| 4342 | if (!p.in_loop and p.@"switch" == null) try p.errTok(.break_not_in_loop_or_switch, br); | ||
| 4343 | _ = try p.expectToken(.semicolon); | ||
| 4344 | return try p.addNode(.{ .tag = .break_stmt, .data = undefined }); | ||
| 4345 | } | ||
| 4346 | if (try p.returnStmt()) |some| return some; | ||
| 4347 | if (try p.assembly(.stmt)) |some| return some; | ||
| 4348 | |||
| 4349 | const expr_start = p.tok_i; | ||
| 4350 | const err_start = p.comp.diagnostics.list.items.len; | ||
| 4351 | |||
| 4352 | const e = try p.expr(); | ||
| 4353 | if (e.node != .none) { | ||
| 4354 | _ = try p.expectToken(.semicolon); | ||
| 4355 | try e.maybeWarnUnused(p, expr_start, err_start); | ||
| 4356 | return e.node; | ||
| 4357 | } | ||
| 4358 | |||
| 4359 | const attr_buf_top = p.attr_buf.len; | ||
| 4360 | defer p.attr_buf.len = attr_buf_top; | ||
| 4361 | try p.attributeSpecifier(); | ||
| 4362 | |||
| 4363 | if (p.eatToken(.semicolon)) |_| { | ||
| 4364 | var null_node: Tree.Node = .{ .tag = .null_stmt, .data = undefined }; | ||
| 4365 | null_node.ty = try Attribute.applyStatementAttributes(p, null_node.ty, expr_start, attr_buf_top); | ||
| 4366 | return p.addNode(null_node); | ||
| 4367 | } | ||
| 4368 | |||
| 4369 | try p.err(.expected_stmt); | ||
| 4370 | return error.ParsingFailed; | ||
| 4371 | } | ||
| 4372 | |||
| 4373 | /// labeledStmt | ||
| 4374 | /// : IDENTIFIER ':' stmt | ||
| 4375 | /// | keyword_case integerConstExpr ':' stmt | ||
| 4376 | /// | keyword_default ':' stmt | ||
| 4377 | fn labeledStmt(p: *Parser) Error!?NodeIndex { | ||
| 4378 | if ((p.tok_ids[p.tok_i] == .identifier or p.tok_ids[p.tok_i] == .extended_identifier) and p.tok_ids[p.tok_i + 1] == .colon) { | ||
| 4379 | const name_tok = p.expectIdentifier() catch unreachable; | ||
| 4380 | const str = p.tokSlice(name_tok); | ||
| 4381 | if (p.findLabel(str)) |some| { | ||
| 4382 | try p.errStr(.duplicate_label, name_tok, str); | ||
| 4383 | try p.errStr(.previous_label, some, str); | ||
| 4384 | } else { | ||
| 4385 | p.label_count += 1; | ||
| 4386 | try p.labels.append(.{ .label = name_tok }); | ||
| 4387 | var i: usize = 0; | ||
| 4388 | while (i < p.labels.items.len) { | ||
| 4389 | if (p.labels.items[i] == .unresolved_goto and | ||
| 4390 | mem.eql(u8, p.tokSlice(p.labels.items[i].unresolved_goto), str)) | ||
| 4391 | { | ||
| 4392 | _ = p.labels.swapRemove(i); | ||
| 4393 | } else i += 1; | ||
| 4394 | } | ||
| 4395 | } | ||
| 4396 | |||
| 4397 | p.tok_i += 1; | ||
| 4398 | const attr_buf_top = p.attr_buf.len; | ||
| 4399 | defer p.attr_buf.len = attr_buf_top; | ||
| 4400 | try p.attributeSpecifier(); | ||
| 4401 | |||
| 4402 | var labeled_stmt = Tree.Node{ | ||
| 4403 | .tag = .labeled_stmt, | ||
| 4404 | .data = .{ .decl = .{ .name = name_tok, .node = try p.labelableStmt() } }, | ||
| 4405 | }; | ||
| 4406 | labeled_stmt.ty = try Attribute.applyLabelAttributes(p, labeled_stmt.ty, attr_buf_top); | ||
| 4407 | return try p.addNode(labeled_stmt); | ||
| 4408 | } else if (p.eatToken(.keyword_case)) |case| { | ||
| 4409 | const first_item = try p.integerConstExpr(.gnu_folding_extension); | ||
| 4410 | const ellipsis = p.tok_i; | ||
| 4411 | const second_item = if (p.eatToken(.ellipsis) != null) blk: { | ||
| 4412 | try p.errTok(.gnu_switch_range, ellipsis); | ||
| 4413 | break :blk try p.integerConstExpr(.gnu_folding_extension); | ||
| 4414 | } else null; | ||
| 4415 | _ = try p.expectToken(.colon); | ||
| 4416 | |||
| 4417 | if (p.@"switch") |some| check: { | ||
| 4418 | if (some.ty.hasIncompleteSize()) break :check; // error already reported for incomplete size | ||
| 4419 | |||
| 4420 | const first = first_item.val; | ||
| 4421 | const last = if (second_item) |second| second.val else first; | ||
| 4422 | if (first.opt_ref == .none) { | ||
| 4423 | try p.errTok(.case_val_unavailable, case + 1); | ||
| 4424 | break :check; | ||
| 4425 | } else if (last.opt_ref == .none) { | ||
| 4426 | try p.errTok(.case_val_unavailable, ellipsis + 1); | ||
| 4427 | break :check; | ||
| 4428 | } else if (last.compare(.lt, first, p.comp)) { | ||
| 4429 | try p.errTok(.empty_case_range, case + 1); | ||
| 4430 | break :check; | ||
| 4431 | } | ||
| 4432 | |||
| 4433 | // TODO cast to target type | ||
| 4434 | const prev = (try some.add(first, last, case + 1)) orelse break :check; | ||
| 4435 | |||
| 4436 | // TODO check which value was already handled | ||
| 4437 | try p.errStr(.duplicate_switch_case, case + 1, try first_item.str(p)); | ||
| 4438 | try p.errTok(.previous_case, prev.tok); | ||
| 4439 | } else { | ||
| 4440 | try p.errStr(.case_not_in_switch, case, "case"); | ||
| 4441 | } | ||
| 4442 | |||
| 4443 | const s = try p.labelableStmt(); | ||
| 4444 | if (second_item) |some| return try p.addNode(.{ | ||
| 4445 | .tag = .case_range_stmt, | ||
| 4446 | .data = .{ .if3 = .{ .cond = s, .body = (try p.addList(&.{ first_item.node, some.node })).start } }, | ||
| 4447 | }) else return try p.addNode(.{ | ||
| 4448 | .tag = .case_stmt, | ||
| 4449 | .data = .{ .bin = .{ .lhs = first_item.node, .rhs = s } }, | ||
| 4450 | }); | ||
| 4451 | } else if (p.eatToken(.keyword_default)) |default| { | ||
| 4452 | _ = try p.expectToken(.colon); | ||
| 4453 | const s = try p.labelableStmt(); | ||
| 4454 | const node = try p.addNode(.{ | ||
| 4455 | .tag = .default_stmt, | ||
| 4456 | .data = .{ .un = s }, | ||
| 4457 | }); | ||
| 4458 | const @"switch" = p.@"switch" orelse { | ||
| 4459 | try p.errStr(.case_not_in_switch, default, "default"); | ||
| 4460 | return node; | ||
| 4461 | }; | ||
| 4462 | if (@"switch".default) |previous| { | ||
| 4463 | try p.errTok(.multiple_default, default); | ||
| 4464 | try p.errTok(.previous_case, previous); | ||
| 4465 | } else { | ||
| 4466 | @"switch".default = default; | ||
| 4467 | } | ||
| 4468 | return node; | ||
| 4469 | } else return null; | ||
| 4470 | } | ||
| 4471 | |||
| 4472 | fn labelableStmt(p: *Parser) Error!NodeIndex { | ||
| 4473 | if (p.tok_ids[p.tok_i] == .r_brace) { | ||
| 4474 | try p.err(.label_compound_end); | ||
| 4475 | return p.addNode(.{ .tag = .null_stmt, .data = undefined }); | ||
| 4476 | } | ||
| 4477 | return p.stmt(); | ||
| 4478 | } | ||
| 4479 | |||
| 4480 | const StmtExprState = struct { | ||
| 4481 | last_expr_tok: TokenIndex = 0, | ||
| 4482 | last_expr_res: Result = .{ .ty = .{ .specifier = .void } }, | ||
| 4483 | }; | ||
| 4484 | |||
| 4485 | /// compoundStmt : '{' ( decl | keyword_extension decl | staticAssert | stmt)* '}' | ||
| 4486 | fn compoundStmt(p: *Parser, is_fn_body: bool, stmt_expr_state: ?*StmtExprState) Error!?NodeIndex { | ||
| 4487 | const l_brace = p.eatToken(.l_brace) orelse return null; | ||
| 4488 | |||
| 4489 | const decl_buf_top = p.decl_buf.items.len; | ||
| 4490 | defer p.decl_buf.items.len = decl_buf_top; | ||
| 4491 | |||
| 4492 | // the parameters of a function are in the same scope as the body | ||
| 4493 | if (!is_fn_body) try p.syms.pushScope(p); | ||
| 4494 | defer if (!is_fn_body) p.syms.popScope(); | ||
| 4495 | |||
| 4496 | var noreturn_index: ?TokenIndex = null; | ||
| 4497 | var noreturn_label_count: u32 = 0; | ||
| 4498 | |||
| 4499 | while (p.eatToken(.r_brace) == null) : (_ = try p.pragma()) { | ||
| 4500 | if (stmt_expr_state) |state| state.* = .{}; | ||
| 4501 | if (try p.parseOrNextStmt(staticAssert, l_brace)) continue; | ||
| 4502 | if (try p.parseOrNextStmt(decl, l_brace)) continue; | ||
| 4503 | if (p.eatToken(.keyword_extension)) |ext| { | ||
| 4504 | const saved_extension = p.extension_suppressed; | ||
| 4505 | defer p.extension_suppressed = saved_extension; | ||
| 4506 | p.extension_suppressed = true; | ||
| 4507 | |||
| 4508 | if (try p.parseOrNextStmt(decl, l_brace)) continue; | ||
| 4509 | p.tok_i = ext; | ||
| 4510 | } | ||
| 4511 | const stmt_tok = p.tok_i; | ||
| 4512 | const s = p.stmt() catch |er| switch (er) { | ||
| 4513 | error.ParsingFailed => { | ||
| 4514 | try p.nextStmt(l_brace); | ||
| 4515 | continue; | ||
| 4516 | }, | ||
| 4517 | else => |e| return e, | ||
| 4518 | }; | ||
| 4519 | if (s == .none) continue; | ||
| 4520 | if (stmt_expr_state) |state| { | ||
| 4521 | state.* = .{ | ||
| 4522 | .last_expr_tok = stmt_tok, | ||
| 4523 | .last_expr_res = .{ | ||
| 4524 | .node = s, | ||
| 4525 | .ty = p.nodes.items(.ty)[@intFromEnum(s)], | ||
| 4526 | }, | ||
| 4527 | }; | ||
| 4528 | } | ||
| 4529 | try p.decl_buf.append(s); | ||
| 4530 | |||
| 4531 | if (noreturn_index == null and p.nodeIsNoreturn(s) == .yes) { | ||
| 4532 | noreturn_index = p.tok_i; | ||
| 4533 | noreturn_label_count = p.label_count; | ||
| 4534 | } | ||
| 4535 | switch (p.nodes.items(.tag)[@intFromEnum(s)]) { | ||
| 4536 | .case_stmt, .default_stmt, .labeled_stmt => noreturn_index = null, | ||
| 4537 | else => {}, | ||
| 4538 | } | ||
| 4539 | } | ||
| 4540 | |||
| 4541 | if (noreturn_index) |some| { | ||
| 4542 | // if new labels were defined we cannot be certain that the code is unreachable | ||
| 4543 | if (some != p.tok_i - 1 and noreturn_label_count == p.label_count) try p.errTok(.unreachable_code, some); | ||
| 4544 | } | ||
| 4545 | if (is_fn_body) { | ||
| 4546 | const last_noreturn = if (p.decl_buf.items.len == decl_buf_top) | ||
| 4547 | .no | ||
| 4548 | else | ||
| 4549 | p.nodeIsNoreturn(p.decl_buf.items[p.decl_buf.items.len - 1]); | ||
| 4550 | |||
| 4551 | if (last_noreturn != .yes) { | ||
| 4552 | const ret_ty = p.func.ty.?.returnType(); | ||
| 4553 | var return_zero = false; | ||
| 4554 | if (last_noreturn == .no and !ret_ty.is(.void) and !ret_ty.isFunc() and !ret_ty.isArray()) { | ||
| 4555 | const func_name = p.tokSlice(p.func.name); | ||
| 4556 | const interned_name = try StrInt.intern(p.comp, func_name); | ||
| 4557 | if (interned_name == p.string_ids.main_id and ret_ty.is(.int)) { | ||
| 4558 | return_zero = true; | ||
| 4559 | } else { | ||
| 4560 | try p.errStr(.func_does_not_return, p.tok_i - 1, func_name); | ||
| 4561 | } | ||
| 4562 | } | ||
| 4563 | try p.decl_buf.append(try p.addNode(.{ .tag = .implicit_return, .ty = p.func.ty.?.returnType(), .data = .{ .return_zero = return_zero } })); | ||
| 4564 | } | ||
| 4565 | if (p.func.ident) |some| try p.decl_buf.insert(decl_buf_top, some.node); | ||
| 4566 | if (p.func.pretty_ident) |some| try p.decl_buf.insert(decl_buf_top, some.node); | ||
| 4567 | } | ||
| 4568 | |||
| 4569 | var node: Tree.Node = .{ | ||
| 4570 | .tag = .compound_stmt_two, | ||
| 4571 | .data = .{ .bin = .{ .lhs = .none, .rhs = .none } }, | ||
| 4572 | }; | ||
| 4573 | const statements = p.decl_buf.items[decl_buf_top..]; | ||
| 4574 | switch (statements.len) { | ||
| 4575 | 0 => {}, | ||
| 4576 | 1 => node.data = .{ .bin = .{ .lhs = statements[0], .rhs = .none } }, | ||
| 4577 | 2 => node.data = .{ .bin = .{ .lhs = statements[0], .rhs = statements[1] } }, | ||
| 4578 | else => { | ||
| 4579 | node.tag = .compound_stmt; | ||
| 4580 | node.data = .{ .range = try p.addList(statements) }; | ||
| 4581 | }, | ||
| 4582 | } | ||
| 4583 | return try p.addNode(node); | ||
| 4584 | } | ||
| 4585 | |||
| 4586 | const NoreturnKind = enum { no, yes, complex }; | ||
| 4587 | |||
| 4588 | fn nodeIsNoreturn(p: *Parser, node: NodeIndex) NoreturnKind { | ||
| 4589 | switch (p.nodes.items(.tag)[@intFromEnum(node)]) { | ||
| 4590 | .break_stmt, .continue_stmt, .return_stmt => return .yes, | ||
| 4591 | .if_then_else_stmt => { | ||
| 4592 | const data = p.data.items[p.nodes.items(.data)[@intFromEnum(node)].if3.body..]; | ||
| 4593 | const then_type = p.nodeIsNoreturn(data[0]); | ||
| 4594 | const else_type = p.nodeIsNoreturn(data[1]); | ||
| 4595 | if (then_type == .complex or else_type == .complex) return .complex; | ||
| 4596 | if (then_type == .yes and else_type == .yes) return .yes; | ||
| 4597 | return .no; | ||
| 4598 | }, | ||
| 4599 | .compound_stmt_two => { | ||
| 4600 | const data = p.nodes.items(.data)[@intFromEnum(node)]; | ||
| 4601 | if (data.bin.rhs != .none) return p.nodeIsNoreturn(data.bin.rhs); | ||
| 4602 | if (data.bin.lhs != .none) return p.nodeIsNoreturn(data.bin.lhs); | ||
| 4603 | return .no; | ||
| 4604 | }, | ||
| 4605 | .compound_stmt => { | ||
| 4606 | const data = p.nodes.items(.data)[@intFromEnum(node)]; | ||
| 4607 | return p.nodeIsNoreturn(p.data.items[data.range.end - 1]); | ||
| 4608 | }, | ||
| 4609 | .labeled_stmt => { | ||
| 4610 | const data = p.nodes.items(.data)[@intFromEnum(node)]; | ||
| 4611 | return p.nodeIsNoreturn(data.decl.node); | ||
| 4612 | }, | ||
| 4613 | .switch_stmt => { | ||
| 4614 | const data = p.nodes.items(.data)[@intFromEnum(node)]; | ||
| 4615 | if (data.bin.rhs == .none) return .complex; | ||
| 4616 | if (p.nodeIsNoreturn(data.bin.rhs) == .yes) return .yes; | ||
| 4617 | return .complex; | ||
| 4618 | }, | ||
| 4619 | else => return .no, | ||
| 4620 | } | ||
| 4621 | } | ||
| 4622 | |||
| 4623 | fn parseOrNextStmt(p: *Parser, comptime func: fn (*Parser) Error!bool, l_brace: TokenIndex) !bool { | ||
| 4624 | return func(p) catch |er| switch (er) { | ||
| 4625 | error.ParsingFailed => { | ||
| 4626 | try p.nextStmt(l_brace); | ||
| 4627 | return true; | ||
| 4628 | }, | ||
| 4629 | else => |e| return e, | ||
| 4630 | }; | ||
| 4631 | } | ||
| 4632 | |||
| 4633 | fn nextStmt(p: *Parser, l_brace: TokenIndex) !void { | ||
| 4634 | var parens: u32 = 0; | ||
| 4635 | while (p.tok_i < p.tok_ids.len) : (p.tok_i += 1) { | ||
| 4636 | switch (p.tok_ids[p.tok_i]) { | ||
| 4637 | .l_paren, .l_brace, .l_bracket => parens += 1, | ||
| 4638 | .r_paren, .r_bracket => if (parens != 0) { | ||
| 4639 | parens -= 1; | ||
| 4640 | }, | ||
| 4641 | .r_brace => if (parens == 0) | ||
| 4642 | return | ||
| 4643 | else { | ||
| 4644 | parens -= 1; | ||
| 4645 | }, | ||
| 4646 | .semicolon => if (parens == 0) { | ||
| 4647 | p.tok_i += 1; | ||
| 4648 | return; | ||
| 4649 | }, | ||
| 4650 | .keyword_for, | ||
| 4651 | .keyword_while, | ||
| 4652 | .keyword_do, | ||
| 4653 | .keyword_if, | ||
| 4654 | .keyword_goto, | ||
| 4655 | .keyword_switch, | ||
| 4656 | .keyword_case, | ||
| 4657 | .keyword_default, | ||
| 4658 | .keyword_continue, | ||
| 4659 | .keyword_break, | ||
| 4660 | .keyword_return, | ||
| 4661 | .keyword_typedef, | ||
| 4662 | .keyword_extern, | ||
| 4663 | .keyword_static, | ||
| 4664 | .keyword_auto, | ||
| 4665 | .keyword_register, | ||
| 4666 | .keyword_thread_local, | ||
| 4667 | .keyword_c23_thread_local, | ||
| 4668 | .keyword_inline, | ||
| 4669 | .keyword_inline1, | ||
| 4670 | .keyword_inline2, | ||
| 4671 | .keyword_noreturn, | ||
| 4672 | .keyword_void, | ||
| 4673 | .keyword_bool, | ||
| 4674 | .keyword_c23_bool, | ||
| 4675 | .keyword_char, | ||
| 4676 | .keyword_short, | ||
| 4677 | .keyword_int, | ||
| 4678 | .keyword_long, | ||
| 4679 | .keyword_signed, | ||
| 4680 | .keyword_unsigned, | ||
| 4681 | .keyword_float, | ||
| 4682 | .keyword_double, | ||
| 4683 | .keyword_complex, | ||
| 4684 | .keyword_atomic, | ||
| 4685 | .keyword_enum, | ||
| 4686 | .keyword_struct, | ||
| 4687 | .keyword_union, | ||
| 4688 | .keyword_alignas, | ||
| 4689 | .keyword_c23_alignas, | ||
| 4690 | .keyword_typeof, | ||
| 4691 | .keyword_typeof1, | ||
| 4692 | .keyword_typeof2, | ||
| 4693 | .keyword_typeof_unqual, | ||
| 4694 | .keyword_extension, | ||
| 4695 | => if (parens == 0) return, | ||
| 4696 | .keyword_pragma => p.skipToPragmaSentinel(), | ||
| 4697 | else => {}, | ||
| 4698 | } | ||
| 4699 | } | ||
| 4700 | p.tok_i -= 1; // So we can consume EOF | ||
| 4701 | try p.expectClosing(l_brace, .r_brace); | ||
| 4702 | unreachable; | ||
| 4703 | } | ||
| 4704 | |||
| 4705 | fn returnStmt(p: *Parser) Error!?NodeIndex { | ||
| 4706 | const ret_tok = p.eatToken(.keyword_return) orelse return null; | ||
| 4707 | |||
| 4708 | const e_tok = p.tok_i; | ||
| 4709 | var e = try p.expr(); | ||
| 4710 | _ = try p.expectToken(.semicolon); | ||
| 4711 | const ret_ty = p.func.ty.?.returnType(); | ||
| 4712 | |||
| 4713 | if (p.func.ty.?.hasAttribute(.noreturn)) { | ||
| 4714 | try p.errStr(.invalid_noreturn, e_tok, p.tokSlice(p.func.name)); | ||
| 4715 | } | ||
| 4716 | |||
| 4717 | if (e.node == .none) { | ||
| 4718 | if (!ret_ty.is(.void)) try p.errStr(.func_should_return, ret_tok, p.tokSlice(p.func.name)); | ||
| 4719 | return try p.addNode(.{ .tag = .return_stmt, .data = .{ .un = e.node } }); | ||
| 4720 | } else if (ret_ty.is(.void)) { | ||
| 4721 | try p.errStr(.void_func_returns_value, e_tok, p.tokSlice(p.func.name)); | ||
| 4722 | return try p.addNode(.{ .tag = .return_stmt, .data = .{ .un = e.node } }); | ||
| 4723 | } | ||
| 4724 | |||
| 4725 | try e.lvalConversion(p); | ||
| 4726 | try e.coerce(p, ret_ty, e_tok, .ret); | ||
| 4727 | |||
| 4728 | try e.saveValue(p); | ||
| 4729 | return try p.addNode(.{ .tag = .return_stmt, .data = .{ .un = e.node } }); | ||
| 4730 | } | ||
| 4731 | |||
| 4732 | // ====== expressions ====== | ||
| 4733 | |||
| 4734 | pub fn macroExpr(p: *Parser) Compilation.Error!bool { | ||
| 4735 | const res = p.condExpr() catch |e| switch (e) { | ||
| 4736 | error.OutOfMemory => return error.OutOfMemory, | ||
| 4737 | error.FatalError => return error.FatalError, | ||
| 4738 | error.ParsingFailed => return false, | ||
| 4739 | }; | ||
| 4740 | if (res.val.opt_ref == .none) { | ||
| 4741 | try p.errTok(.expected_expr, p.tok_i); | ||
| 4742 | return false; | ||
| 4743 | } | ||
| 4744 | return res.val.toBool(p.comp); | ||
| 4745 | } | ||
| 4746 | |||
| 4747 | const CallExpr = union(enum) { | ||
| 4748 | standard: NodeIndex, | ||
| 4749 | builtin: struct { | ||
| 4750 | node: NodeIndex, | ||
| 4751 | tag: Builtin.Tag, | ||
| 4752 | }, | ||
| 4753 | |||
| 4754 | fn init(p: *Parser, call_node: NodeIndex, func_node: NodeIndex) CallExpr { | ||
| 4755 | if (p.getNode(call_node, .builtin_call_expr_one)) |node| { | ||
| 4756 | const data = p.nodes.items(.data)[@intFromEnum(node)]; | ||
| 4757 | const name = p.tokSlice(data.decl.name); | ||
| 4758 | const builtin_ty = p.comp.builtins.lookup(name); | ||
| 4759 | return .{ .builtin = .{ .node = node, .tag = builtin_ty.builtin.tag } }; | ||
| 4760 | } | ||
| 4761 | return .{ .standard = func_node }; | ||
| 4762 | } | ||
| 4763 | |||
| 4764 | fn shouldPerformLvalConversion(self: CallExpr, arg_idx: u32) bool { | ||
| 4765 | return switch (self) { | ||
| 4766 | .standard => true, | ||
| 4767 | .builtin => |builtin| switch (builtin.tag) { | ||
| 4768 | Builtin.tagFromName("__builtin_va_start").?, | ||
| 4769 | Builtin.tagFromName("__va_start").?, | ||
| 4770 | Builtin.tagFromName("va_start").?, | ||
| 4771 | => arg_idx != 1, | ||
| 4772 | else => true, | ||
| 4773 | }, | ||
| 4774 | }; | ||
| 4775 | } | ||
| 4776 | |||
| 4777 | fn shouldPromoteVarArg(self: CallExpr, arg_idx: u32) bool { | ||
| 4778 | return switch (self) { | ||
| 4779 | .standard => true, | ||
| 4780 | .builtin => |builtin| switch (builtin.tag) { | ||
| 4781 | Builtin.tagFromName("__builtin_va_start").?, | ||
| 4782 | Builtin.tagFromName("__va_start").?, | ||
| 4783 | Builtin.tagFromName("va_start").?, | ||
| 4784 | => arg_idx != 1, | ||
| 4785 | Builtin.tagFromName("__builtin_complex").? => false, | ||
| 4786 | else => true, | ||
| 4787 | }, | ||
| 4788 | }; | ||
| 4789 | } | ||
| 4790 | |||
| 4791 | fn shouldCoerceArg(self: CallExpr, arg_idx: u32) bool { | ||
| 4792 | _ = self; | ||
| 4793 | _ = arg_idx; | ||
| 4794 | return true; | ||
| 4795 | } | ||
| 4796 | |||
| 4797 | fn checkVarArg(self: CallExpr, p: *Parser, first_after: TokenIndex, param_tok: TokenIndex, arg: *Result, arg_idx: u32) !void { | ||
| 4798 | if (self == .standard) return; | ||
| 4799 | |||
| 4800 | const builtin_tok = p.nodes.items(.data)[@intFromEnum(self.builtin.node)].decl.name; | ||
| 4801 | switch (self.builtin.tag) { | ||
| 4802 | Builtin.tagFromName("__builtin_va_start").?, | ||
| 4803 | Builtin.tagFromName("__va_start").?, | ||
| 4804 | Builtin.tagFromName("va_start").?, | ||
| 4805 | => return p.checkVaStartArg(builtin_tok, first_after, param_tok, arg, arg_idx), | ||
| 4806 | Builtin.tagFromName("__builtin_complex").? => return p.checkComplexArg(builtin_tok, first_after, param_tok, arg, arg_idx), | ||
| 4807 | else => {}, | ||
| 4808 | } | ||
| 4809 | } | ||
| 4810 | |||
| 4811 | /// Some functions cannot be expressed as standard C prototypes. For example `__builtin_complex` requires | ||
| 4812 | /// two arguments of the same real floating point type (e.g. two doubles or two floats). These functions are | ||
| 4813 | /// encoded as varargs functions with custom typechecking. Since varargs functions do not have a fixed number | ||
| 4814 | /// of arguments, `paramCountOverride` is used to tell us how many arguments we should actually expect to see for | ||
| 4815 | /// these custom-typechecked functions. | ||
| 4816 | fn paramCountOverride(self: CallExpr) ?u32 { | ||
| 4817 | return switch (self) { | ||
| 4818 | .standard => null, | ||
| 4819 | .builtin => |builtin| switch (builtin.tag) { | ||
| 4820 | Builtin.tagFromName("__builtin_complex").? => 2, | ||
| 4821 | else => null, | ||
| 4822 | }, | ||
| 4823 | }; | ||
| 4824 | } | ||
| 4825 | |||
| 4826 | fn returnType(self: CallExpr, p: *Parser, callable_ty: Type) Type { | ||
| 4827 | return switch (self) { | ||
| 4828 | .standard => callable_ty.returnType(), | ||
| 4829 | .builtin => |builtin| switch (builtin.tag) { | ||
| 4830 | Builtin.tagFromName("__builtin_complex").? => { | ||
| 4831 | const last_param = p.list_buf.items[p.list_buf.items.len - 1]; | ||
| 4832 | return p.nodes.items(.ty)[@intFromEnum(last_param)].makeComplex(); | ||
| 4833 | }, | ||
| 4834 | else => callable_ty.returnType(), | ||
| 4835 | }, | ||
| 4836 | }; | ||
| 4837 | } | ||
| 4838 | |||
| 4839 | fn finish(self: CallExpr, p: *Parser, ty: Type, list_buf_top: usize, arg_count: u32) Error!Result { | ||
| 4840 | const ret_ty = self.returnType(p, ty); | ||
| 4841 | switch (self) { | ||
| 4842 | .standard => |func_node| { | ||
| 4843 | var call_node: Tree.Node = .{ | ||
| 4844 | .tag = .call_expr_one, | ||
| 4845 | .ty = ret_ty, | ||
| 4846 | .data = .{ .bin = .{ .lhs = func_node, .rhs = .none } }, | ||
| 4847 | }; | ||
| 4848 | const args = p.list_buf.items[list_buf_top..]; | ||
| 4849 | switch (arg_count) { | ||
| 4850 | 0 => {}, | ||
| 4851 | 1 => call_node.data.bin.rhs = args[1], // args[0] == func.node | ||
| 4852 | else => { | ||
| 4853 | call_node.tag = .call_expr; | ||
| 4854 | call_node.data = .{ .range = try p.addList(args) }; | ||
| 4855 | }, | ||
| 4856 | } | ||
| 4857 | return Result{ .node = try p.addNode(call_node), .ty = ret_ty }; | ||
| 4858 | }, | ||
| 4859 | .builtin => |builtin| { | ||
| 4860 | const index = @intFromEnum(builtin.node); | ||
| 4861 | var call_node = p.nodes.get(index); | ||
| 4862 | defer p.nodes.set(index, call_node); | ||
| 4863 | call_node.ty = ret_ty; | ||
| 4864 | const args = p.list_buf.items[list_buf_top..]; | ||
| 4865 | switch (arg_count) { | ||
| 4866 | 0 => {}, | ||
| 4867 | 1 => call_node.data.decl.node = args[1], // args[0] == func.node | ||
| 4868 | else => { | ||
| 4869 | call_node.tag = .builtin_call_expr; | ||
| 4870 | args[0] = @enumFromInt(call_node.data.decl.name); | ||
| 4871 | call_node.data = .{ .range = try p.addList(args) }; | ||
| 4872 | }, | ||
| 4873 | } | ||
| 4874 | return Result{ .node = builtin.node, .ty = ret_ty }; | ||
| 4875 | }, | ||
| 4876 | } | ||
| 4877 | } | ||
| 4878 | }; | ||
| 4879 | |||
| 4880 | pub const Result = struct { | ||
| 4881 | node: NodeIndex = .none, | ||
| 4882 | ty: Type = .{ .specifier = .int }, | ||
| 4883 | val: Value = .{}, | ||
| 4884 | |||
| 4885 | pub fn str(res: Result, p: *Parser) ![]const u8 { | ||
| 4886 | switch (res.val.opt_ref) { | ||
| 4887 | .none => return "(none)", | ||
| 4888 | .null => return "nullptr_t", | ||
| 4889 | else => {}, | ||
| 4890 | } | ||
| 4891 | const strings_top = p.strings.items.len; | ||
| 4892 | defer p.strings.items.len = strings_top; | ||
| 4893 | |||
| 4894 | try res.val.print(res.ty, p.comp, p.strings.writer()); | ||
| 4895 | return try p.comp.diagnostics.arena.allocator().dupe(u8, p.strings.items[strings_top..]); | ||
| 4896 | } | ||
| 4897 | |||
| 4898 | fn expect(res: Result, p: *Parser) Error!void { | ||
| 4899 | if (p.in_macro) { | ||
| 4900 | if (res.val.opt_ref == .none) { | ||
| 4901 | try p.errTok(.expected_expr, p.tok_i); | ||
| 4902 | return error.ParsingFailed; | ||
| 4903 | } | ||
| 4904 | return; | ||
| 4905 | } | ||
| 4906 | if (res.node == .none) { | ||
| 4907 | try p.errTok(.expected_expr, p.tok_i); | ||
| 4908 | return error.ParsingFailed; | ||
| 4909 | } | ||
| 4910 | } | ||
| 4911 | |||
| 4912 | fn empty(res: Result, p: *Parser) bool { | ||
| 4913 | if (p.in_macro) return res.val.opt_ref == .none; | ||
| 4914 | return res.node == .none; | ||
| 4915 | } | ||
| 4916 | |||
| 4917 | fn maybeWarnUnused(res: Result, p: *Parser, expr_start: TokenIndex, err_start: usize) Error!void { | ||
| 4918 | if (res.ty.is(.void) or res.node == .none) return; | ||
| 4919 | // don't warn about unused result if the expression contained errors besides other unused results | ||
| 4920 | for (p.comp.diagnostics.list.items[err_start..]) |err_item| { | ||
| 4921 | if (err_item.tag != .unused_value) return; | ||
| 4922 | } | ||
| 4923 | var cur_node = res.node; | ||
| 4924 | while (true) switch (p.nodes.items(.tag)[@intFromEnum(cur_node)]) { | ||
| 4925 | .invalid, // So that we don't need to check for node == 0 | ||
| 4926 | .assign_expr, | ||
| 4927 | .mul_assign_expr, | ||
| 4928 | .div_assign_expr, | ||
| 4929 | .mod_assign_expr, | ||
| 4930 | .add_assign_expr, | ||
| 4931 | .sub_assign_expr, | ||
| 4932 | .shl_assign_expr, | ||
| 4933 | .shr_assign_expr, | ||
| 4934 | .bit_and_assign_expr, | ||
| 4935 | .bit_xor_assign_expr, | ||
| 4936 | .bit_or_assign_expr, | ||
| 4937 | .pre_inc_expr, | ||
| 4938 | .pre_dec_expr, | ||
| 4939 | .post_inc_expr, | ||
| 4940 | .post_dec_expr, | ||
| 4941 | => return, | ||
| 4942 | .call_expr_one => { | ||
| 4943 | const fn_ptr = p.nodes.items(.data)[@intFromEnum(cur_node)].bin.lhs; | ||
| 4944 | const fn_ty = p.nodes.items(.ty)[@intFromEnum(fn_ptr)].elemType(); | ||
| 4945 | if (fn_ty.hasAttribute(.nodiscard)) try p.errStr(.nodiscard_unused, expr_start, "TODO get name"); | ||
| 4946 | if (fn_ty.hasAttribute(.warn_unused_result)) try p.errStr(.warn_unused_result, expr_start, "TODO get name"); | ||
| 4947 | return; | ||
| 4948 | }, | ||
| 4949 | .call_expr => { | ||
| 4950 | const fn_ptr = p.data.items[p.nodes.items(.data)[@intFromEnum(cur_node)].range.start]; | ||
| 4951 | const fn_ty = p.nodes.items(.ty)[@intFromEnum(fn_ptr)].elemType(); | ||
| 4952 | if (fn_ty.hasAttribute(.nodiscard)) try p.errStr(.nodiscard_unused, expr_start, "TODO get name"); | ||
| 4953 | if (fn_ty.hasAttribute(.warn_unused_result)) try p.errStr(.warn_unused_result, expr_start, "TODO get name"); | ||
| 4954 | return; | ||
| 4955 | }, | ||
| 4956 | .stmt_expr => { | ||
| 4957 | const body = p.nodes.items(.data)[@intFromEnum(cur_node)].un; | ||
| 4958 | switch (p.nodes.items(.tag)[@intFromEnum(body)]) { | ||
| 4959 | .compound_stmt_two => { | ||
| 4960 | const body_stmt = p.nodes.items(.data)[@intFromEnum(body)].bin; | ||
| 4961 | cur_node = if (body_stmt.rhs != .none) body_stmt.rhs else body_stmt.lhs; | ||
| 4962 | }, | ||
| 4963 | .compound_stmt => { | ||
| 4964 | const data = p.nodes.items(.data)[@intFromEnum(body)]; | ||
| 4965 | cur_node = p.data.items[data.range.end - 1]; | ||
| 4966 | }, | ||
| 4967 | else => unreachable, | ||
| 4968 | } | ||
| 4969 | }, | ||
| 4970 | .comma_expr => cur_node = p.nodes.items(.data)[@intFromEnum(cur_node)].bin.rhs, | ||
| 4971 | .paren_expr => cur_node = p.nodes.items(.data)[@intFromEnum(cur_node)].un, | ||
| 4972 | else => break, | ||
| 4973 | }; | ||
| 4974 | try p.errTok(.unused_value, expr_start); | ||
| 4975 | } | ||
| 4976 | |||
| 4977 | fn boolRes(lhs: *Result, p: *Parser, tag: Tree.Tag, rhs: Result) !void { | ||
| 4978 | if (lhs.val.opt_ref == .null) { | ||
| 4979 | lhs.val = Value.zero; | ||
| 4980 | } | ||
| 4981 | if (lhs.ty.specifier != .invalid) { | ||
| 4982 | lhs.ty = Type.int; | ||
| 4983 | } | ||
| 4984 | return lhs.bin(p, tag, rhs); | ||
| 4985 | } | ||
| 4986 | |||
| 4987 | fn bin(lhs: *Result, p: *Parser, tag: Tree.Tag, rhs: Result) !void { | ||
| 4988 | lhs.node = try p.addNode(.{ | ||
| 4989 | .tag = tag, | ||
| 4990 | .ty = lhs.ty, | ||
| 4991 | .data = .{ .bin = .{ .lhs = lhs.node, .rhs = rhs.node } }, | ||
| 4992 | }); | ||
| 4993 | } | ||
| 4994 | |||
| 4995 | fn un(operand: *Result, p: *Parser, tag: Tree.Tag) Error!void { | ||
| 4996 | operand.node = try p.addNode(.{ | ||
| 4997 | .tag = tag, | ||
| 4998 | .ty = operand.ty, | ||
| 4999 | .data = .{ .un = operand.node }, | ||
| 5000 | }); | ||
| 5001 | } | ||
| 5002 | |||
| 5003 | fn implicitCast(operand: *Result, p: *Parser, kind: Tree.CastKind) Error!void { | ||
| 5004 | operand.node = try p.addNode(.{ | ||
| 5005 | .tag = .implicit_cast, | ||
| 5006 | .ty = operand.ty, | ||
| 5007 | .data = .{ .cast = .{ .operand = operand.node, .kind = kind } }, | ||
| 5008 | }); | ||
| 5009 | } | ||
| 5010 | |||
| 5011 | fn adjustCondExprPtrs(a: *Result, tok: TokenIndex, b: *Result, p: *Parser) !bool { | ||
| 5012 | assert(a.ty.isPtr() and b.ty.isPtr()); | ||
| 5013 | |||
| 5014 | const a_elem = a.ty.elemType(); | ||
| 5015 | const b_elem = b.ty.elemType(); | ||
| 5016 | if (a_elem.eql(b_elem, p.comp, true)) return true; | ||
| 5017 | |||
| 5018 | var adjusted_elem_ty = try p.arena.create(Type); | ||
| 5019 | adjusted_elem_ty.* = a_elem; | ||
| 5020 | |||
| 5021 | const has_void_star_branch = a.ty.isVoidStar() or b.ty.isVoidStar(); | ||
| 5022 | const only_quals_differ = a_elem.eql(b_elem, p.comp, false); | ||
| 5023 | const pointers_compatible = only_quals_differ or has_void_star_branch; | ||
| 5024 | |||
| 5025 | if (!pointers_compatible or has_void_star_branch) { | ||
| 5026 | if (!pointers_compatible) { | ||
| 5027 | try p.errStr(.pointer_mismatch, tok, try p.typePairStrExtra(a.ty, " and ", b.ty)); | ||
| 5028 | } | ||
| 5029 | adjusted_elem_ty.* = .{ .specifier = .void }; | ||
| 5030 | } | ||
| 5031 | if (pointers_compatible) { | ||
| 5032 | adjusted_elem_ty.qual = a_elem.qual.mergeCV(b_elem.qual); | ||
| 5033 | } | ||
| 5034 | if (!adjusted_elem_ty.eql(a_elem, p.comp, true)) { | ||
| 5035 | a.ty = .{ | ||
| 5036 | .data = .{ .sub_type = adjusted_elem_ty }, | ||
| 5037 | .specifier = .pointer, | ||
| 5038 | }; | ||
| 5039 | try a.implicitCast(p, .bitcast); | ||
| 5040 | } | ||
| 5041 | if (!adjusted_elem_ty.eql(b_elem, p.comp, true)) { | ||
| 5042 | b.ty = .{ | ||
| 5043 | .data = .{ .sub_type = adjusted_elem_ty }, | ||
| 5044 | .specifier = .pointer, | ||
| 5045 | }; | ||
| 5046 | try b.implicitCast(p, .bitcast); | ||
| 5047 | } | ||
| 5048 | return true; | ||
| 5049 | } | ||
| 5050 | |||
| 5051 | /// Adjust types for binary operation, returns true if the result can and should be evaluated. | ||
| 5052 | fn adjustTypes(a: *Result, tok: TokenIndex, b: *Result, p: *Parser, kind: enum { | ||
| 5053 | integer, | ||
| 5054 | arithmetic, | ||
| 5055 | boolean_logic, | ||
| 5056 | relational, | ||
| 5057 | equality, | ||
| 5058 | conditional, | ||
| 5059 | add, | ||
| 5060 | sub, | ||
| 5061 | }) !bool { | ||
| 5062 | if (b.ty.specifier == .invalid) { | ||
| 5063 | try a.saveValue(p); | ||
| 5064 | a.ty = Type.invalid; | ||
| 5065 | } | ||
| 5066 | if (a.ty.specifier == .invalid) { | ||
| 5067 | return false; | ||
| 5068 | } | ||
| 5069 | try a.lvalConversion(p); | ||
| 5070 | try b.lvalConversion(p); | ||
| 5071 | |||
| 5072 | const a_vec = a.ty.is(.vector); | ||
| 5073 | const b_vec = b.ty.is(.vector); | ||
| 5074 | if (a_vec and b_vec) { | ||
| 5075 | if (a.ty.eql(b.ty, p.comp, false)) { | ||
| 5076 | return a.shouldEval(b, p); | ||
| 5077 | } | ||
| 5078 | return a.invalidBinTy(tok, b, p); | ||
| 5079 | } else if (a_vec) { | ||
| 5080 | if (b.coerceExtra(p, a.ty.elemType(), tok, .test_coerce)) { | ||
| 5081 | try b.saveValue(p); | ||
| 5082 | try b.implicitCast(p, .vector_splat); | ||
| 5083 | return a.shouldEval(b, p); | ||
| 5084 | } else |er| switch (er) { | ||
| 5085 | error.CoercionFailed => return a.invalidBinTy(tok, b, p), | ||
| 5086 | else => |e| return e, | ||
| 5087 | } | ||
| 5088 | } else if (b_vec) { | ||
| 5089 | if (a.coerceExtra(p, b.ty.elemType(), tok, .test_coerce)) { | ||
| 5090 | try a.saveValue(p); | ||
| 5091 | try a.implicitCast(p, .vector_splat); | ||
| 5092 | return a.shouldEval(b, p); | ||
| 5093 | } else |er| switch (er) { | ||
| 5094 | error.CoercionFailed => return a.invalidBinTy(tok, b, p), | ||
| 5095 | else => |e| return e, | ||
| 5096 | } | ||
| 5097 | } | ||
| 5098 | |||
| 5099 | const a_int = a.ty.isInt(); | ||
| 5100 | const b_int = b.ty.isInt(); | ||
| 5101 | if (a_int and b_int) { | ||
| 5102 | try a.usualArithmeticConversion(b, p, tok); | ||
| 5103 | return a.shouldEval(b, p); | ||
| 5104 | } | ||
| 5105 | if (kind == .integer) return a.invalidBinTy(tok, b, p); | ||
| 5106 | |||
| 5107 | const a_float = a.ty.isFloat(); | ||
| 5108 | const b_float = b.ty.isFloat(); | ||
| 5109 | const a_arithmetic = a_int or a_float; | ||
| 5110 | const b_arithmetic = b_int or b_float; | ||
| 5111 | if (a_arithmetic and b_arithmetic) { | ||
| 5112 | // <, <=, >, >= only work on real types | ||
| 5113 | if (kind == .relational and (!a.ty.isReal() or !b.ty.isReal())) | ||
| 5114 | return a.invalidBinTy(tok, b, p); | ||
| 5115 | |||
| 5116 | try a.usualArithmeticConversion(b, p, tok); | ||
| 5117 | return a.shouldEval(b, p); | ||
| 5118 | } | ||
| 5119 | if (kind == .arithmetic) return a.invalidBinTy(tok, b, p); | ||
| 5120 | |||
| 5121 | const a_nullptr = a.ty.is(.nullptr_t); | ||
| 5122 | const b_nullptr = b.ty.is(.nullptr_t); | ||
| 5123 | const a_ptr = a.ty.isPtr(); | ||
| 5124 | const b_ptr = b.ty.isPtr(); | ||
| 5125 | const a_scalar = a_arithmetic or a_ptr; | ||
| 5126 | const b_scalar = b_arithmetic or b_ptr; | ||
| 5127 | switch (kind) { | ||
| 5128 | .boolean_logic => { | ||
| 5129 | if (!(a_scalar or a_nullptr) or !(b_scalar or b_nullptr)) return a.invalidBinTy(tok, b, p); | ||
| 5130 | |||
| 5131 | // Do integer promotions but nothing else | ||
| 5132 | if (a_int) try a.intCast(p, a.ty.integerPromotion(p.comp), tok); | ||
| 5133 | if (b_int) try b.intCast(p, b.ty.integerPromotion(p.comp), tok); | ||
| 5134 | return a.shouldEval(b, p); | ||
| 5135 | }, | ||
| 5136 | .relational, .equality => { | ||
| 5137 | if (kind == .equality and (a_nullptr or b_nullptr)) { | ||
| 5138 | if (a_nullptr and b_nullptr) return a.shouldEval(b, p); | ||
| 5139 | const nullptr_res = if (a_nullptr) a else b; | ||
| 5140 | const other_res = if (a_nullptr) b else a; | ||
| 5141 | if (other_res.ty.isPtr()) { | ||
| 5142 | try nullptr_res.nullCast(p, other_res.ty); | ||
| 5143 | return other_res.shouldEval(nullptr_res, p); | ||
| 5144 | } else if (other_res.val.isZero(p.comp)) { | ||
| 5145 | other_res.val = Value.null; | ||
| 5146 | try other_res.nullCast(p, nullptr_res.ty); | ||
| 5147 | return other_res.shouldEval(nullptr_res, p); | ||
| 5148 | } | ||
| 5149 | return a.invalidBinTy(tok, b, p); | ||
| 5150 | } | ||
| 5151 | // comparisons between floats and pointes not allowed | ||
| 5152 | if (!a_scalar or !b_scalar or (a_float and b_ptr) or (b_float and a_ptr)) | ||
| 5153 | return a.invalidBinTy(tok, b, p); | ||
| 5154 | |||
| 5155 | if ((a_int or b_int) and !(a.val.isZero(p.comp) or b.val.isZero(p.comp))) { | ||
| 5156 | try p.errStr(.comparison_ptr_int, tok, try p.typePairStr(a.ty, b.ty)); | ||
| 5157 | } else if (a_ptr and b_ptr) { | ||
| 5158 | if (!a.ty.isVoidStar() and !b.ty.isVoidStar() and !a.ty.eql(b.ty, p.comp, false)) | ||
| 5159 | try p.errStr(.comparison_distinct_ptr, tok, try p.typePairStr(a.ty, b.ty)); | ||
| 5160 | } else if (a_ptr) { | ||
| 5161 | try b.ptrCast(p, a.ty); | ||
| 5162 | } else { | ||
| 5163 | assert(b_ptr); | ||
| 5164 | try a.ptrCast(p, b.ty); | ||
| 5165 | } | ||
| 5166 | |||
| 5167 | return a.shouldEval(b, p); | ||
| 5168 | }, | ||
| 5169 | .conditional => { | ||
| 5170 | // doesn't matter what we return here, as the result is ignored | ||
| 5171 | if (a.ty.is(.void) or b.ty.is(.void)) { | ||
| 5172 | try a.toVoid(p); | ||
| 5173 | try b.toVoid(p); | ||
| 5174 | return true; | ||
| 5175 | } | ||
| 5176 | if (a_nullptr and b_nullptr) return true; | ||
| 5177 | if ((a_ptr and b_int) or (a_int and b_ptr)) { | ||
| 5178 | if (a.val.isZero(p.comp) or b.val.isZero(p.comp)) { | ||
| 5179 | try a.nullCast(p, b.ty); | ||
| 5180 | try b.nullCast(p, a.ty); | ||
| 5181 | return true; | ||
| 5182 | } | ||
| 5183 | const int_ty = if (a_int) a else b; | ||
| 5184 | const ptr_ty = if (a_ptr) a else b; | ||
| 5185 | try p.errStr(.implicit_int_to_ptr, tok, try p.typePairStrExtra(int_ty.ty, " to ", ptr_ty.ty)); | ||
| 5186 | try int_ty.ptrCast(p, ptr_ty.ty); | ||
| 5187 | |||
| 5188 | return true; | ||
| 5189 | } | ||
| 5190 | if (a_ptr and b_ptr) return a.adjustCondExprPtrs(tok, b, p); | ||
| 5191 | if ((a_ptr and b_nullptr) or (a_nullptr and b_ptr)) { | ||
| 5192 | const nullptr_res = if (a_nullptr) a else b; | ||
| 5193 | const ptr_res = if (a_nullptr) b else a; | ||
| 5194 | try nullptr_res.nullCast(p, ptr_res.ty); | ||
| 5195 | return true; | ||
| 5196 | } | ||
| 5197 | if (a.ty.isRecord() and b.ty.isRecord() and a.ty.eql(b.ty, p.comp, false)) { | ||
| 5198 | return true; | ||
| 5199 | } | ||
| 5200 | return a.invalidBinTy(tok, b, p); | ||
| 5201 | }, | ||
| 5202 | .add => { | ||
| 5203 | // if both aren't arithmetic one should be pointer and the other an integer | ||
| 5204 | if (a_ptr == b_ptr or a_int == b_int) return a.invalidBinTy(tok, b, p); | ||
| 5205 | |||
| 5206 | // Do integer promotions but nothing else | ||
| 5207 | if (a_int) try a.intCast(p, a.ty.integerPromotion(p.comp), tok); | ||
| 5208 | if (b_int) try b.intCast(p, b.ty.integerPromotion(p.comp), tok); | ||
| 5209 | |||
| 5210 | // The result type is the type of the pointer operand | ||
| 5211 | if (a_int) a.ty = b.ty else b.ty = a.ty; | ||
| 5212 | return a.shouldEval(b, p); | ||
| 5213 | }, | ||
| 5214 | .sub => { | ||
| 5215 | // if both aren't arithmetic then either both should be pointers or just a | ||
| 5216 | if (!a_ptr or !(b_ptr or b_int)) return a.invalidBinTy(tok, b, p); | ||
| 5217 | |||
| 5218 | if (a_ptr and b_ptr) { | ||
| 5219 | if (!a.ty.eql(b.ty, p.comp, false)) try p.errStr(.incompatible_pointers, tok, try p.typePairStr(a.ty, b.ty)); | ||
| 5220 | a.ty = p.comp.types.ptrdiff; | ||
| 5221 | } | ||
| 5222 | |||
| 5223 | // Do integer promotion on b if needed | ||
| 5224 | if (b_int) try b.intCast(p, b.ty.integerPromotion(p.comp), tok); | ||
| 5225 | return a.shouldEval(b, p); | ||
| 5226 | }, | ||
| 5227 | else => return a.invalidBinTy(tok, b, p), | ||
| 5228 | } | ||
| 5229 | } | ||
| 5230 | |||
| 5231 | fn lvalConversion(res: *Result, p: *Parser) Error!void { | ||
| 5232 | if (res.ty.isFunc()) { | ||
| 5233 | const elem_ty = try p.arena.create(Type); | ||
| 5234 | elem_ty.* = res.ty; | ||
| 5235 | res.ty.specifier = .pointer; | ||
| 5236 | res.ty.data = .{ .sub_type = elem_ty }; | ||
| 5237 | try res.implicitCast(p, .function_to_pointer); | ||
| 5238 | } else if (res.ty.isArray()) { | ||
| 5239 | res.val = .{}; | ||
| 5240 | res.ty.decayArray(); | ||
| 5241 | try res.implicitCast(p, .array_to_pointer); | ||
| 5242 | } else if (!p.in_macro and p.tmpTree().isLval(res.node)) { | ||
| 5243 | res.ty.qual = .{}; | ||
| 5244 | try res.implicitCast(p, .lval_to_rval); | ||
| 5245 | } | ||
| 5246 | } | ||
| 5247 | |||
| 5248 | fn boolCast(res: *Result, p: *Parser, bool_ty: Type, tok: TokenIndex) Error!void { | ||
| 5249 | if (res.ty.isArray()) { | ||
| 5250 | if (res.val.is(.bytes, p.comp)) { | ||
| 5251 | try p.errStr(.string_literal_to_bool, tok, try p.typePairStrExtra(res.ty, " to ", bool_ty)); | ||
| 5252 | } else { | ||
| 5253 | try p.errStr(.array_address_to_bool, tok, p.tokSlice(tok)); | ||
| 5254 | } | ||
| 5255 | try res.lvalConversion(p); | ||
| 5256 | res.val = Value.one; | ||
| 5257 | res.ty = bool_ty; | ||
| 5258 | try res.implicitCast(p, .pointer_to_bool); | ||
| 5259 | } else if (res.ty.isPtr()) { | ||
| 5260 | res.val.boolCast(p.comp); | ||
| 5261 | res.ty = bool_ty; | ||
| 5262 | try res.implicitCast(p, .pointer_to_bool); | ||
| 5263 | } else if (res.ty.isInt() and !res.ty.is(.bool)) { | ||
| 5264 | res.val.boolCast(p.comp); | ||
| 5265 | res.ty = bool_ty; | ||
| 5266 | try res.implicitCast(p, .int_to_bool); | ||
| 5267 | } else if (res.ty.isFloat()) { | ||
| 5268 | const old_value = res.val; | ||
| 5269 | const value_change_kind = try res.val.floatToInt(bool_ty, p.comp); | ||
| 5270 | try res.floatToIntWarning(p, bool_ty, old_value, value_change_kind, tok); | ||
| 5271 | if (!res.ty.isReal()) { | ||
| 5272 | res.ty = res.ty.makeReal(); | ||
| 5273 | try res.implicitCast(p, .complex_float_to_real); | ||
| 5274 | } | ||
| 5275 | res.ty = bool_ty; | ||
| 5276 | try res.implicitCast(p, .float_to_bool); | ||
| 5277 | } | ||
| 5278 | } | ||
| 5279 | |||
| 5280 | fn intCast(res: *Result, p: *Parser, int_ty: Type, tok: TokenIndex) Error!void { | ||
| 5281 | if (int_ty.hasIncompleteSize()) return error.ParsingFailed; // Diagnostic already issued | ||
| 5282 | if (res.ty.is(.bool)) { | ||
| 5283 | res.ty = int_ty.makeReal(); | ||
| 5284 | try res.implicitCast(p, .bool_to_int); | ||
| 5285 | if (!int_ty.isReal()) { | ||
| 5286 | res.ty = int_ty; | ||
| 5287 | try res.implicitCast(p, .real_to_complex_int); | ||
| 5288 | } | ||
| 5289 | } else if (res.ty.isPtr()) { | ||
| 5290 | res.ty = int_ty.makeReal(); | ||
| 5291 | try res.implicitCast(p, .pointer_to_int); | ||
| 5292 | if (!int_ty.isReal()) { | ||
| 5293 | res.ty = int_ty; | ||
| 5294 | try res.implicitCast(p, .real_to_complex_int); | ||
| 5295 | } | ||
| 5296 | } else if (res.ty.isFloat()) { | ||
| 5297 | const old_value = res.val; | ||
| 5298 | const value_change_kind = try res.val.floatToInt(int_ty, p.comp); | ||
| 5299 | try res.floatToIntWarning(p, int_ty, old_value, value_change_kind, tok); | ||
| 5300 | const old_real = res.ty.isReal(); | ||
| 5301 | const new_real = int_ty.isReal(); | ||
| 5302 | if (old_real and new_real) { | ||
| 5303 | res.ty = int_ty; | ||
| 5304 | try res.implicitCast(p, .float_to_int); | ||
| 5305 | } else if (old_real) { | ||
| 5306 | res.ty = int_ty.makeReal(); | ||
| 5307 | try res.implicitCast(p, .float_to_int); | ||
| 5308 | res.ty = int_ty; | ||
| 5309 | try res.implicitCast(p, .real_to_complex_int); | ||
| 5310 | } else if (new_real) { | ||
| 5311 | res.ty = res.ty.makeReal(); | ||
| 5312 | try res.implicitCast(p, .complex_float_to_real); | ||
| 5313 | res.ty = int_ty; | ||
| 5314 | try res.implicitCast(p, .float_to_int); | ||
| 5315 | } else { | ||
| 5316 | res.ty = int_ty; | ||
| 5317 | try res.implicitCast(p, .complex_float_to_complex_int); | ||
| 5318 | } | ||
| 5319 | } else if (!res.ty.eql(int_ty, p.comp, true)) { | ||
| 5320 | try res.val.intCast(int_ty, p.comp); | ||
| 5321 | const old_real = res.ty.isReal(); | ||
| 5322 | const new_real = int_ty.isReal(); | ||
| 5323 | if (old_real and new_real) { | ||
| 5324 | res.ty = int_ty; | ||
| 5325 | try res.implicitCast(p, .int_cast); | ||
| 5326 | } else if (old_real) { | ||
| 5327 | const real_int_ty = int_ty.makeReal(); | ||
| 5328 | if (!res.ty.eql(real_int_ty, p.comp, false)) { | ||
| 5329 | res.ty = real_int_ty; | ||
| 5330 | try res.implicitCast(p, .int_cast); | ||
| 5331 | } | ||
| 5332 | res.ty = int_ty; | ||
| 5333 | try res.implicitCast(p, .real_to_complex_int); | ||
| 5334 | } else if (new_real) { | ||
| 5335 | res.ty = res.ty.makeReal(); | ||
| 5336 | try res.implicitCast(p, .complex_int_to_real); | ||
| 5337 | res.ty = int_ty; | ||
| 5338 | try res.implicitCast(p, .int_cast); | ||
| 5339 | } else { | ||
| 5340 | res.ty = int_ty; | ||
| 5341 | try res.implicitCast(p, .complex_int_cast); | ||
| 5342 | } | ||
| 5343 | } | ||
| 5344 | } | ||
| 5345 | |||
| 5346 | fn floatToIntWarning(res: *Result, p: *Parser, int_ty: Type, old_value: Value, change_kind: Value.FloatToIntChangeKind, tok: TokenIndex) !void { | ||
| 5347 | switch (change_kind) { | ||
| 5348 | .none => return p.errStr(.float_to_int, tok, try p.typePairStrExtra(res.ty, " to ", int_ty)), | ||
| 5349 | .out_of_range => return p.errStr(.float_out_of_range, tok, try p.typePairStrExtra(res.ty, " to ", int_ty)), | ||
| 5350 | .overflow => return p.errStr(.float_overflow_conversion, tok, try p.typePairStrExtra(res.ty, " to ", int_ty)), | ||
| 5351 | .nonzero_to_zero => return p.errStr(.float_zero_conversion, tok, try p.floatValueChangedStr(res, old_value, int_ty)), | ||
| 5352 | .value_changed => return p.errStr(.float_value_changed, tok, try p.floatValueChangedStr(res, old_value, int_ty)), | ||
| 5353 | } | ||
| 5354 | } | ||
| 5355 | |||
| 5356 | fn floatCast(res: *Result, p: *Parser, float_ty: Type) Error!void { | ||
| 5357 | if (res.ty.is(.bool)) { | ||
| 5358 | try res.val.intToFloat(float_ty, p.comp); | ||
| 5359 | res.ty = float_ty.makeReal(); | ||
| 5360 | try res.implicitCast(p, .bool_to_float); | ||
| 5361 | if (!float_ty.isReal()) { | ||
| 5362 | res.ty = float_ty; | ||
| 5363 | try res.implicitCast(p, .real_to_complex_float); | ||
| 5364 | } | ||
| 5365 | } else if (res.ty.isInt()) { | ||
| 5366 | try res.val.intToFloat(float_ty, p.comp); | ||
| 5367 | const old_real = res.ty.isReal(); | ||
| 5368 | const new_real = float_ty.isReal(); | ||
| 5369 | if (old_real and new_real) { | ||
| 5370 | res.ty = float_ty; | ||
| 5371 | try res.implicitCast(p, .int_to_float); | ||
| 5372 | } else if (old_real) { | ||
| 5373 | res.ty = float_ty.makeReal(); | ||
| 5374 | try res.implicitCast(p, .int_to_float); | ||
| 5375 | res.ty = float_ty; | ||
| 5376 | try res.implicitCast(p, .real_to_complex_float); | ||
| 5377 | } else if (new_real) { | ||
| 5378 | res.ty = res.ty.makeReal(); | ||
| 5379 | try res.implicitCast(p, .complex_int_to_real); | ||
| 5380 | res.ty = float_ty; | ||
| 5381 | try res.implicitCast(p, .int_to_float); | ||
| 5382 | } else { | ||
| 5383 | res.ty = float_ty; | ||
| 5384 | try res.implicitCast(p, .complex_int_to_complex_float); | ||
| 5385 | } | ||
| 5386 | } else if (!res.ty.eql(float_ty, p.comp, true)) { | ||
| 5387 | try res.val.floatCast(float_ty, p.comp); | ||
| 5388 | const old_real = res.ty.isReal(); | ||
| 5389 | const new_real = float_ty.isReal(); | ||
| 5390 | if (old_real and new_real) { | ||
| 5391 | res.ty = float_ty; | ||
| 5392 | try res.implicitCast(p, .float_cast); | ||
| 5393 | } else if (old_real) { | ||
| 5394 | if (res.ty.floatRank() != float_ty.floatRank()) { | ||
| 5395 | res.ty = float_ty.makeReal(); | ||
| 5396 | try res.implicitCast(p, .float_cast); | ||
| 5397 | } | ||
| 5398 | res.ty = float_ty; | ||
| 5399 | try res.implicitCast(p, .real_to_complex_float); | ||
| 5400 | } else if (new_real) { | ||
| 5401 | res.ty = res.ty.makeReal(); | ||
| 5402 | try res.implicitCast(p, .complex_float_to_real); | ||
| 5403 | if (res.ty.floatRank() != float_ty.floatRank()) { | ||
| 5404 | res.ty = float_ty; | ||
| 5405 | try res.implicitCast(p, .float_cast); | ||
| 5406 | } | ||
| 5407 | } else { | ||
| 5408 | res.ty = float_ty; | ||
| 5409 | try res.implicitCast(p, .complex_float_cast); | ||
| 5410 | } | ||
| 5411 | } | ||
| 5412 | } | ||
| 5413 | |||
| 5414 | /// Converts a bool or integer to a pointer | ||
| 5415 | fn ptrCast(res: *Result, p: *Parser, ptr_ty: Type) Error!void { | ||
| 5416 | if (res.ty.is(.bool)) { | ||
| 5417 | res.ty = ptr_ty; | ||
| 5418 | try res.implicitCast(p, .bool_to_pointer); | ||
| 5419 | } else if (res.ty.isInt()) { | ||
| 5420 | try res.val.intCast(ptr_ty, p.comp); | ||
| 5421 | res.ty = ptr_ty; | ||
| 5422 | try res.implicitCast(p, .int_to_pointer); | ||
| 5423 | } | ||
| 5424 | } | ||
| 5425 | |||
| 5426 | /// Convert pointer to one with a different child type | ||
| 5427 | fn ptrChildTypeCast(res: *Result, p: *Parser, ptr_ty: Type) Error!void { | ||
| 5428 | res.ty = ptr_ty; | ||
| 5429 | return res.implicitCast(p, .bitcast); | ||
| 5430 | } | ||
| 5431 | |||
| 5432 | fn toVoid(res: *Result, p: *Parser) Error!void { | ||
| 5433 | if (!res.ty.is(.void)) { | ||
| 5434 | res.ty = .{ .specifier = .void }; | ||
| 5435 | try res.implicitCast(p, .to_void); | ||
| 5436 | } | ||
| 5437 | } | ||
| 5438 | |||
| 5439 | fn nullCast(res: *Result, p: *Parser, ptr_ty: Type) Error!void { | ||
| 5440 | if (!res.ty.is(.nullptr_t) and !res.val.isZero(p.comp)) return; | ||
| 5441 | res.ty = ptr_ty; | ||
| 5442 | try res.implicitCast(p, .null_to_pointer); | ||
| 5443 | } | ||
| 5444 | |||
| 5445 | fn usualUnaryConversion(res: *Result, p: *Parser, tok: TokenIndex) Error!void { | ||
| 5446 | if (res.ty.isFloat()) fp_eval: { | ||
| 5447 | const eval_method = p.comp.langopts.fp_eval_method orelse break :fp_eval; | ||
| 5448 | switch (eval_method) { | ||
| 5449 | .source => {}, | ||
| 5450 | .indeterminate => unreachable, | ||
| 5451 | .double => { | ||
| 5452 | if (res.ty.floatRank() < (Type{ .specifier = .double }).floatRank()) { | ||
| 5453 | const spec: Type.Specifier = if (res.ty.isReal()) .double else .complex_double; | ||
| 5454 | return res.floatCast(p, .{ .specifier = spec }); | ||
| 5455 | } | ||
| 5456 | }, | ||
| 5457 | .extended => { | ||
| 5458 | if (res.ty.floatRank() < (Type{ .specifier = .long_double }).floatRank()) { | ||
| 5459 | const spec: Type.Specifier = if (res.ty.isReal()) .long_double else .complex_long_double; | ||
| 5460 | return res.floatCast(p, .{ .specifier = spec }); | ||
| 5461 | } | ||
| 5462 | }, | ||
| 5463 | } | ||
| 5464 | } | ||
| 5465 | |||
| 5466 | if (res.ty.is(.fp16) and !p.comp.langopts.use_native_half_type) { | ||
| 5467 | return res.floatCast(p, .{ .specifier = .float }); | ||
| 5468 | } | ||
| 5469 | if (res.ty.isInt()) { | ||
| 5470 | if (p.tmpTree().bitfieldWidth(res.node, true)) |width| { | ||
| 5471 | if (res.ty.bitfieldPromotion(p.comp, width)) |promotion_ty| { | ||
| 5472 | return res.intCast(p, promotion_ty, tok); | ||
| 5473 | } | ||
| 5474 | } | ||
| 5475 | return res.intCast(p, res.ty.integerPromotion(p.comp), tok); | ||
| 5476 | } | ||
| 5477 | } | ||
| 5478 | |||
| 5479 | fn usualArithmeticConversion(a: *Result, b: *Result, p: *Parser, tok: TokenIndex) Error!void { | ||
| 5480 | try a.usualUnaryConversion(p, tok); | ||
| 5481 | try b.usualUnaryConversion(p, tok); | ||
| 5482 | |||
| 5483 | // if either is a float cast to that type | ||
| 5484 | if (a.ty.isFloat() or b.ty.isFloat()) { | ||
| 5485 | const float_types = [7][2]Type.Specifier{ | ||
| 5486 | .{ .complex_long_double, .long_double }, | ||
| 5487 | .{ .complex_float128, .float128 }, | ||
| 5488 | .{ .complex_float80, .float80 }, | ||
| 5489 | .{ .complex_double, .double }, | ||
| 5490 | .{ .complex_float, .float }, | ||
| 5491 | // No `_Complex __fp16` type | ||
| 5492 | .{ .invalid, .fp16 }, | ||
| 5493 | // No `_Complex _Float16` | ||
| 5494 | .{ .invalid, .float16 }, | ||
| 5495 | }; | ||
| 5496 | const a_spec = a.ty.canonicalize(.standard).specifier; | ||
| 5497 | const b_spec = b.ty.canonicalize(.standard).specifier; | ||
| 5498 | if (p.comp.target.c_type_bit_size(.longdouble) == 128) { | ||
| 5499 | if (try a.floatConversion(b, a_spec, b_spec, p, float_types[0])) return; | ||
| 5500 | } | ||
| 5501 | if (try a.floatConversion(b, a_spec, b_spec, p, float_types[1])) return; | ||
| 5502 | if (p.comp.target.c_type_bit_size(.longdouble) == 80) { | ||
| 5503 | if (try a.floatConversion(b, a_spec, b_spec, p, float_types[0])) return; | ||
| 5504 | } | ||
| 5505 | if (try a.floatConversion(b, a_spec, b_spec, p, float_types[2])) return; | ||
| 5506 | if (p.comp.target.c_type_bit_size(.longdouble) == 64) { | ||
| 5507 | if (try a.floatConversion(b, a_spec, b_spec, p, float_types[0])) return; | ||
| 5508 | } | ||
| 5509 | if (try a.floatConversion(b, a_spec, b_spec, p, float_types[3])) return; | ||
| 5510 | if (try a.floatConversion(b, a_spec, b_spec, p, float_types[4])) return; | ||
| 5511 | if (try a.floatConversion(b, a_spec, b_spec, p, float_types[5])) return; | ||
| 5512 | if (try a.floatConversion(b, a_spec, b_spec, p, float_types[6])) return; | ||
| 5513 | } | ||
| 5514 | |||
| 5515 | if (a.ty.eql(b.ty, p.comp, true)) { | ||
| 5516 | // cast to promoted type | ||
| 5517 | try a.intCast(p, a.ty, tok); | ||
| 5518 | try b.intCast(p, b.ty, tok); | ||
| 5519 | return; | ||
| 5520 | } | ||
| 5521 | |||
| 5522 | const target = a.ty.integerConversion(b.ty, p.comp); | ||
| 5523 | if (!target.isReal()) { | ||
| 5524 | try a.saveValue(p); | ||
| 5525 | try b.saveValue(p); | ||
| 5526 | } | ||
| 5527 | try a.intCast(p, target, tok); | ||
| 5528 | try b.intCast(p, target, tok); | ||
| 5529 | } | ||
| 5530 | |||
| 5531 | fn floatConversion(a: *Result, b: *Result, a_spec: Type.Specifier, b_spec: Type.Specifier, p: *Parser, pair: [2]Type.Specifier) !bool { | ||
| 5532 | if (a_spec == pair[0] or a_spec == pair[1] or | ||
| 5533 | b_spec == pair[0] or b_spec == pair[1]) | ||
| 5534 | { | ||
| 5535 | const both_real = a.ty.isReal() and b.ty.isReal(); | ||
| 5536 | const res_spec = pair[@intFromBool(both_real)]; | ||
| 5537 | const ty = Type{ .specifier = res_spec }; | ||
| 5538 | try a.floatCast(p, ty); | ||
| 5539 | try b.floatCast(p, ty); | ||
| 5540 | return true; | ||
| 5541 | } | ||
| 5542 | return false; | ||
| 5543 | } | ||
| 5544 | |||
| 5545 | fn invalidBinTy(a: *Result, tok: TokenIndex, b: *Result, p: *Parser) Error!bool { | ||
| 5546 | try p.errStr(.invalid_bin_types, tok, try p.typePairStr(a.ty, b.ty)); | ||
| 5547 | a.val = .{}; | ||
| 5548 | b.val = .{}; | ||
| 5549 | a.ty = Type.invalid; | ||
| 5550 | return false; | ||
| 5551 | } | ||
| 5552 | |||
| 5553 | fn shouldEval(a: *Result, b: *Result, p: *Parser) Error!bool { | ||
| 5554 | if (p.no_eval) return false; | ||
| 5555 | if (a.val.opt_ref != .none and b.val.opt_ref != .none) | ||
| 5556 | return true; | ||
| 5557 | |||
| 5558 | try a.saveValue(p); | ||
| 5559 | try b.saveValue(p); | ||
| 5560 | return p.no_eval; | ||
| 5561 | } | ||
| 5562 | |||
| 5563 | /// Saves value and replaces it with `.unavailable`. | ||
| 5564 | fn saveValue(res: *Result, p: *Parser) !void { | ||
| 5565 | assert(!p.in_macro); | ||
| 5566 | if (res.val.opt_ref == .none or res.val.opt_ref == .null) return; | ||
| 5567 | if (!p.in_macro) try p.value_map.put(res.node, res.val); | ||
| 5568 | res.val = .{}; | ||
| 5569 | } | ||
| 5570 | |||
| 5571 | fn castType(res: *Result, p: *Parser, to: Type, operand_tok: TokenIndex, l_paren: TokenIndex) !void { | ||
| 5572 | var cast_kind: Tree.CastKind = undefined; | ||
| 5573 | |||
| 5574 | if (to.is(.void)) { | ||
| 5575 | // everything can cast to void | ||
| 5576 | cast_kind = .to_void; | ||
| 5577 | res.val = .{}; | ||
| 5578 | } else if (to.is(.nullptr_t)) { | ||
| 5579 | if (res.ty.is(.nullptr_t)) { | ||
| 5580 | cast_kind = .no_op; | ||
| 5581 | } else { | ||
| 5582 | try p.errStr(.invalid_object_cast, l_paren, try p.typePairStrExtra(res.ty, " to ", to)); | ||
| 5583 | return error.ParsingFailed; | ||
| 5584 | } | ||
| 5585 | } else if (res.ty.is(.nullptr_t)) { | ||
| 5586 | if (to.is(.bool)) { | ||
| 5587 | try res.nullCast(p, res.ty); | ||
| 5588 | res.val.boolCast(p.comp); | ||
| 5589 | res.ty = .{ .specifier = .bool }; | ||
| 5590 | try res.implicitCast(p, .pointer_to_bool); | ||
| 5591 | try res.saveValue(p); | ||
| 5592 | } else if (to.isPtr()) { | ||
| 5593 | try res.nullCast(p, to); | ||
| 5594 | } else { | ||
| 5595 | try p.errStr(.invalid_object_cast, l_paren, try p.typePairStrExtra(res.ty, " to ", to)); | ||
| 5596 | return error.ParsingFailed; | ||
| 5597 | } | ||
| 5598 | cast_kind = .no_op; | ||
| 5599 | } else if (res.val.isZero(p.comp) and to.isPtr()) { | ||
| 5600 | cast_kind = .null_to_pointer; | ||
| 5601 | } else if (to.isScalar()) cast: { | ||
| 5602 | const old_float = res.ty.isFloat(); | ||
| 5603 | const new_float = to.isFloat(); | ||
| 5604 | |||
| 5605 | if (new_float and res.ty.isPtr()) { | ||
| 5606 | try p.errStr(.invalid_cast_to_float, l_paren, try p.typeStr(to)); | ||
| 5607 | return error.ParsingFailed; | ||
| 5608 | } else if (old_float and to.isPtr()) { | ||
| 5609 | try p.errStr(.invalid_cast_to_pointer, l_paren, try p.typeStr(res.ty)); | ||
| 5610 | return error.ParsingFailed; | ||
| 5611 | } | ||
| 5612 | const old_real = res.ty.isReal(); | ||
| 5613 | const new_real = to.isReal(); | ||
| 5614 | |||
| 5615 | if (to.eql(res.ty, p.comp, false)) { | ||
| 5616 | cast_kind = .no_op; | ||
| 5617 | } else if (to.is(.bool)) { | ||
| 5618 | if (res.ty.isPtr()) { | ||
| 5619 | cast_kind = .pointer_to_bool; | ||
| 5620 | } else if (res.ty.isInt()) { | ||
| 5621 | if (!old_real) { | ||
| 5622 | res.ty = res.ty.makeReal(); | ||
| 5623 | try res.implicitCast(p, .complex_int_to_real); | ||
| 5624 | } | ||
| 5625 | cast_kind = .int_to_bool; | ||
| 5626 | } else if (old_float) { | ||
| 5627 | if (!old_real) { | ||
| 5628 | res.ty = res.ty.makeReal(); | ||
| 5629 | try res.implicitCast(p, .complex_float_to_real); | ||
| 5630 | } | ||
| 5631 | cast_kind = .float_to_bool; | ||
| 5632 | } | ||
| 5633 | } else if (to.isInt()) { | ||
| 5634 | if (res.ty.is(.bool)) { | ||
| 5635 | if (!new_real) { | ||
| 5636 | res.ty = to.makeReal(); | ||
| 5637 | try res.implicitCast(p, .bool_to_int); | ||
| 5638 | cast_kind = .real_to_complex_int; | ||
| 5639 | } else { | ||
| 5640 | cast_kind = .bool_to_int; | ||
| 5641 | } | ||
| 5642 | } else if (res.ty.isInt()) { | ||
| 5643 | if (old_real and new_real) { | ||
| 5644 | cast_kind = .int_cast; | ||
| 5645 | } else if (old_real) { | ||
| 5646 | res.ty = to.makeReal(); | ||
| 5647 | try res.implicitCast(p, .int_cast); | ||
| 5648 | cast_kind = .real_to_complex_int; | ||
| 5649 | } else if (new_real) { | ||
| 5650 | res.ty = res.ty.makeReal(); | ||
| 5651 | try res.implicitCast(p, .complex_int_to_real); | ||
| 5652 | cast_kind = .int_cast; | ||
| 5653 | } else { | ||
| 5654 | cast_kind = .complex_int_cast; | ||
| 5655 | } | ||
| 5656 | } else if (res.ty.isPtr()) { | ||
| 5657 | if (!new_real) { | ||
| 5658 | res.ty = to.makeReal(); | ||
| 5659 | try res.implicitCast(p, .pointer_to_int); | ||
| 5660 | cast_kind = .real_to_complex_int; | ||
| 5661 | } else { | ||
| 5662 | cast_kind = .pointer_to_int; | ||
| 5663 | } | ||
| 5664 | } else if (old_real and new_real) { | ||
| 5665 | cast_kind = .float_to_int; | ||
| 5666 | } else if (old_real) { | ||
| 5667 | res.ty = to.makeReal(); | ||
| 5668 | try res.implicitCast(p, .float_to_int); | ||
| 5669 | cast_kind = .real_to_complex_int; | ||
| 5670 | } else if (new_real) { | ||
| 5671 | res.ty = res.ty.makeReal(); | ||
| 5672 | try res.implicitCast(p, .complex_float_to_real); | ||
| 5673 | cast_kind = .float_to_int; | ||
| 5674 | } else { | ||
| 5675 | cast_kind = .complex_float_to_complex_int; | ||
| 5676 | } | ||
| 5677 | } else if (to.isPtr()) { | ||
| 5678 | if (res.ty.isArray()) | ||
| 5679 | cast_kind = .array_to_pointer | ||
| 5680 | else if (res.ty.isPtr()) | ||
| 5681 | cast_kind = .bitcast | ||
| 5682 | else if (res.ty.isFunc()) | ||
| 5683 | cast_kind = .function_to_pointer | ||
| 5684 | else if (res.ty.is(.bool)) | ||
| 5685 | cast_kind = .bool_to_pointer | ||
| 5686 | else if (res.ty.isInt()) { | ||
| 5687 | if (!old_real) { | ||
| 5688 | res.ty = res.ty.makeReal(); | ||
| 5689 | try res.implicitCast(p, .complex_int_to_real); | ||
| 5690 | } | ||
| 5691 | cast_kind = .int_to_pointer; | ||
| 5692 | } else { | ||
| 5693 | try p.errStr(.cond_expr_type, operand_tok, try p.typeStr(res.ty)); | ||
| 5694 | return error.ParsingFailed; | ||
| 5695 | } | ||
| 5696 | } else if (new_float) { | ||
| 5697 | if (res.ty.is(.bool)) { | ||
| 5698 | if (!new_real) { | ||
| 5699 | res.ty = to.makeReal(); | ||
| 5700 | try res.implicitCast(p, .bool_to_float); | ||
| 5701 | cast_kind = .real_to_complex_float; | ||
| 5702 | } else { | ||
| 5703 | cast_kind = .bool_to_float; | ||
| 5704 | } | ||
| 5705 | } else if (res.ty.isInt()) { | ||
| 5706 | if (old_real and new_real) { | ||
| 5707 | cast_kind = .int_to_float; | ||
| 5708 | } else if (old_real) { | ||
| 5709 | res.ty = to.makeReal(); | ||
| 5710 | try res.implicitCast(p, .int_to_float); | ||
| 5711 | cast_kind = .real_to_complex_float; | ||
| 5712 | } else if (new_real) { | ||
| 5713 | res.ty = res.ty.makeReal(); | ||
| 5714 | try res.implicitCast(p, .complex_int_to_real); | ||
| 5715 | cast_kind = .int_to_float; | ||
| 5716 | } else { | ||
| 5717 | cast_kind = .complex_int_to_complex_float; | ||
| 5718 | } | ||
| 5719 | } else if (old_real and new_real) { | ||
| 5720 | cast_kind = .float_cast; | ||
| 5721 | } else if (old_real) { | ||
| 5722 | res.ty = to.makeReal(); | ||
| 5723 | try res.implicitCast(p, .float_cast); | ||
| 5724 | cast_kind = .real_to_complex_float; | ||
| 5725 | } else if (new_real) { | ||
| 5726 | res.ty = res.ty.makeReal(); | ||
| 5727 | try res.implicitCast(p, .complex_float_to_real); | ||
| 5728 | cast_kind = .float_cast; | ||
| 5729 | } else { | ||
| 5730 | cast_kind = .complex_float_cast; | ||
| 5731 | } | ||
| 5732 | } | ||
| 5733 | if (res.val.opt_ref == .none) break :cast; | ||
| 5734 | |||
| 5735 | const old_int = res.ty.isInt() or res.ty.isPtr(); | ||
| 5736 | const new_int = to.isInt() or to.isPtr(); | ||
| 5737 | if (to.is(.bool)) { | ||
| 5738 | res.val.boolCast(p.comp); | ||
| 5739 | } else if (old_float and new_int) { | ||
| 5740 | // Explicit cast, no conversion warning | ||
| 5741 | _ = try res.val.floatToInt(to, p.comp); | ||
| 5742 | } else if (new_float and old_int) { | ||
| 5743 | try res.val.intToFloat(to, p.comp); | ||
| 5744 | } else if (new_float and old_float) { | ||
| 5745 | try res.val.floatCast(to, p.comp); | ||
| 5746 | } else if (old_int and new_int) { | ||
| 5747 | if (to.hasIncompleteSize()) { | ||
| 5748 | try p.errStr(.cast_to_incomplete_type, l_paren, try p.typeStr(to)); | ||
| 5749 | return error.ParsingFailed; | ||
| 5750 | } | ||
| 5751 | try res.val.intCast(to, p.comp); | ||
| 5752 | } | ||
| 5753 | } else if (to.get(.@"union")) |union_ty| { | ||
| 5754 | if (union_ty.data.record.hasFieldOfType(res.ty, p.comp)) { | ||
| 5755 | cast_kind = .union_cast; | ||
| 5756 | try p.errTok(.gnu_union_cast, l_paren); | ||
| 5757 | } else { | ||
| 5758 | if (union_ty.data.record.isIncomplete()) { | ||
| 5759 | try p.errStr(.cast_to_incomplete_type, l_paren, try p.typeStr(to)); | ||
| 5760 | } else { | ||
| 5761 | try p.errStr(.invalid_union_cast, l_paren, try p.typeStr(res.ty)); | ||
| 5762 | } | ||
| 5763 | return error.ParsingFailed; | ||
| 5764 | } | ||
| 5765 | } else { | ||
| 5766 | if (to.is(.auto_type)) { | ||
| 5767 | try p.errTok(.invalid_cast_to_auto_type, l_paren); | ||
| 5768 | } else { | ||
| 5769 | try p.errStr(.invalid_cast_type, l_paren, try p.typeStr(to)); | ||
| 5770 | } | ||
| 5771 | return error.ParsingFailed; | ||
| 5772 | } | ||
| 5773 | if (to.anyQual()) try p.errStr(.qual_cast, l_paren, try p.typeStr(to)); | ||
| 5774 | if (to.isInt() and res.ty.isPtr() and to.sizeCompare(res.ty, p.comp) == .lt) { | ||
| 5775 | try p.errStr(.cast_to_smaller_int, l_paren, try p.typePairStrExtra(to, " from ", res.ty)); | ||
| 5776 | } | ||
| 5777 | res.ty = to; | ||
| 5778 | res.ty.qual = .{}; | ||
| 5779 | res.node = try p.addNode(.{ | ||
| 5780 | .tag = .explicit_cast, | ||
| 5781 | .ty = res.ty, | ||
| 5782 | .data = .{ .cast = .{ .operand = res.node, .kind = cast_kind } }, | ||
| 5783 | }); | ||
| 5784 | } | ||
| 5785 | |||
| 5786 | fn intFitsInType(res: Result, p: *Parser, ty: Type) !bool { | ||
| 5787 | const max_int = try Value.int(ty.maxInt(p.comp), p.comp); | ||
| 5788 | const min_int = try Value.int(ty.minInt(p.comp), p.comp); | ||
| 5789 | return res.val.compare(.lte, max_int, p.comp) and | ||
| 5790 | (res.ty.isUnsignedInt(p.comp) or res.val.compare(.gte, min_int, p.comp)); | ||
| 5791 | } | ||
| 5792 | |||
| 5793 | const CoerceContext = union(enum) { | ||
| 5794 | assign, | ||
| 5795 | init, | ||
| 5796 | ret, | ||
| 5797 | arg: TokenIndex, | ||
| 5798 | test_coerce, | ||
| 5799 | |||
| 5800 | fn note(c: CoerceContext, p: *Parser) !void { | ||
| 5801 | switch (c) { | ||
| 5802 | .arg => |tok| try p.errTok(.parameter_here, tok), | ||
| 5803 | .test_coerce => unreachable, | ||
| 5804 | else => {}, | ||
| 5805 | } | ||
| 5806 | } | ||
| 5807 | |||
| 5808 | fn typePairStr(c: CoerceContext, p: *Parser, dest_ty: Type, src_ty: Type) ![]const u8 { | ||
| 5809 | switch (c) { | ||
| 5810 | .assign, .init => return p.typePairStrExtra(dest_ty, " from incompatible type ", src_ty), | ||
| 5811 | .ret => return p.typePairStrExtra(src_ty, " from a function with incompatible result type ", dest_ty), | ||
| 5812 | .arg => return p.typePairStrExtra(src_ty, " to parameter of incompatible type ", dest_ty), | ||
| 5813 | .test_coerce => unreachable, | ||
| 5814 | } | ||
| 5815 | } | ||
| 5816 | }; | ||
| 5817 | |||
| 5818 | /// Perform assignment-like coercion to `dest_ty`. | ||
| 5819 | fn coerce(res: *Result, p: *Parser, dest_ty: Type, tok: TokenIndex, c: CoerceContext) Error!void { | ||
| 5820 | if (res.ty.specifier == .invalid or dest_ty.specifier == .invalid) { | ||
| 5821 | res.ty = Type.invalid; | ||
| 5822 | return; | ||
| 5823 | } | ||
| 5824 | return res.coerceExtra(p, dest_ty, tok, c) catch |er| switch (er) { | ||
| 5825 | error.CoercionFailed => unreachable, | ||
| 5826 | else => |e| return e, | ||
| 5827 | }; | ||
| 5828 | } | ||
| 5829 | |||
| 5830 | fn coerceExtra( | ||
| 5831 | res: *Result, | ||
| 5832 | p: *Parser, | ||
| 5833 | dest_ty: Type, | ||
| 5834 | tok: TokenIndex, | ||
| 5835 | c: CoerceContext, | ||
| 5836 | ) (Error || error{CoercionFailed})!void { | ||
| 5837 | // Subject of the coercion does not need to be qualified. | ||
| 5838 | var unqual_ty = dest_ty.canonicalize(.standard); | ||
| 5839 | unqual_ty.qual = .{}; | ||
| 5840 | if (unqual_ty.is(.nullptr_t)) { | ||
| 5841 | if (res.ty.is(.nullptr_t)) return; | ||
| 5842 | } else if (unqual_ty.is(.bool)) { | ||
| 5843 | if (res.ty.isScalar() and !res.ty.is(.nullptr_t)) { | ||
| 5844 | // this is ridiculous but it's what clang does | ||
| 5845 | try res.boolCast(p, unqual_ty, tok); | ||
| 5846 | return; | ||
| 5847 | } | ||
| 5848 | } else if (unqual_ty.isInt()) { | ||
| 5849 | if (res.ty.isInt() or res.ty.isFloat()) { | ||
| 5850 | try res.intCast(p, unqual_ty, tok); | ||
| 5851 | return; | ||
| 5852 | } else if (res.ty.isPtr()) { | ||
| 5853 | if (c == .test_coerce) return error.CoercionFailed; | ||
| 5854 | try p.errStr(.implicit_ptr_to_int, tok, try p.typePairStrExtra(res.ty, " to ", dest_ty)); | ||
| 5855 | try c.note(p); | ||
| 5856 | try res.intCast(p, unqual_ty, tok); | ||
| 5857 | return; | ||
| 5858 | } | ||
| 5859 | } else if (unqual_ty.isFloat()) { | ||
| 5860 | if (res.ty.isInt() or res.ty.isFloat()) { | ||
| 5861 | try res.floatCast(p, unqual_ty); | ||
| 5862 | return; | ||
| 5863 | } | ||
| 5864 | } else if (unqual_ty.isPtr()) { | ||
| 5865 | if (res.ty.is(.nullptr_t) or res.val.isZero(p.comp)) { | ||
| 5866 | try res.nullCast(p, dest_ty); | ||
| 5867 | return; | ||
| 5868 | } else if (res.ty.isInt() and res.ty.isReal()) { | ||
| 5869 | if (c == .test_coerce) return error.CoercionFailed; | ||
| 5870 | try p.errStr(.implicit_int_to_ptr, tok, try p.typePairStrExtra(res.ty, " to ", dest_ty)); | ||
| 5871 | try c.note(p); | ||
| 5872 | try res.ptrCast(p, unqual_ty); | ||
| 5873 | return; | ||
| 5874 | } else if (res.ty.isVoidStar() or unqual_ty.eql(res.ty, p.comp, true)) { | ||
| 5875 | return; // ok | ||
| 5876 | } else if (unqual_ty.isVoidStar() and res.ty.isPtr() or (res.ty.isInt() and res.ty.isReal())) { | ||
| 5877 | return; // ok | ||
| 5878 | } else if (unqual_ty.eql(res.ty, p.comp, false)) { | ||
| 5879 | if (!unqual_ty.elemType().qual.hasQuals(res.ty.elemType().qual)) { | ||
| 5880 | try p.errStr(switch (c) { | ||
| 5881 | .assign => .ptr_assign_discards_quals, | ||
| 5882 | .init => .ptr_init_discards_quals, | ||
| 5883 | .ret => .ptr_ret_discards_quals, | ||
| 5884 | .arg => .ptr_arg_discards_quals, | ||
| 5885 | .test_coerce => return error.CoercionFailed, | ||
| 5886 | }, tok, try c.typePairStr(p, dest_ty, res.ty)); | ||
| 5887 | } | ||
| 5888 | try res.ptrCast(p, unqual_ty); | ||
| 5889 | return; | ||
| 5890 | } else if (res.ty.isPtr()) { | ||
| 5891 | const different_sign_only = unqual_ty.elemType().sameRankDifferentSign(res.ty.elemType(), p.comp); | ||
| 5892 | try p.errStr(switch (c) { | ||
| 5893 | .assign => ([2]Diagnostics.Tag{ .incompatible_ptr_assign, .incompatible_ptr_assign_sign })[@intFromBool(different_sign_only)], | ||
| 5894 | .init => ([2]Diagnostics.Tag{ .incompatible_ptr_init, .incompatible_ptr_init_sign })[@intFromBool(different_sign_only)], | ||
| 5895 | .ret => ([2]Diagnostics.Tag{ .incompatible_return, .incompatible_return_sign })[@intFromBool(different_sign_only)], | ||
| 5896 | .arg => ([2]Diagnostics.Tag{ .incompatible_ptr_arg, .incompatible_ptr_arg_sign })[@intFromBool(different_sign_only)], | ||
| 5897 | .test_coerce => return error.CoercionFailed, | ||
| 5898 | }, tok, try c.typePairStr(p, dest_ty, res.ty)); | ||
| 5899 | try c.note(p); | ||
| 5900 | try res.ptrChildTypeCast(p, unqual_ty); | ||
| 5901 | return; | ||
| 5902 | } | ||
| 5903 | } else if (unqual_ty.isRecord()) { | ||
| 5904 | if (unqual_ty.eql(res.ty, p.comp, false)) { | ||
| 5905 | return; // ok | ||
| 5906 | } | ||
| 5907 | |||
| 5908 | if (c == .arg) if (unqual_ty.get(.@"union")) |union_ty| { | ||
| 5909 | if (dest_ty.hasAttribute(.transparent_union)) transparent_union: { | ||
| 5910 | res.coerceExtra(p, union_ty.data.record.fields[0].ty, tok, .test_coerce) catch |er| switch (er) { | ||
| 5911 | error.CoercionFailed => break :transparent_union, | ||
| 5912 | else => |e| return e, | ||
| 5913 | }; | ||
| 5914 | res.node = try p.addNode(.{ | ||
| 5915 | .tag = .union_init_expr, | ||
| 5916 | .ty = dest_ty, | ||
| 5917 | .data = .{ .union_init = .{ .field_index = 0, .node = res.node } }, | ||
| 5918 | }); | ||
| 5919 | res.ty = dest_ty; | ||
| 5920 | return; | ||
| 5921 | } | ||
| 5922 | }; | ||
| 5923 | } else if (unqual_ty.is(.vector)) { | ||
| 5924 | if (unqual_ty.eql(res.ty, p.comp, false)) { | ||
| 5925 | return; // ok | ||
| 5926 | } | ||
| 5927 | } else { | ||
| 5928 | if (c == .assign and (unqual_ty.isArray() or unqual_ty.isFunc())) { | ||
| 5929 | try p.errTok(.not_assignable, tok); | ||
| 5930 | return; | ||
| 5931 | } else if (c == .test_coerce) { | ||
| 5932 | return error.CoercionFailed; | ||
| 5933 | } | ||
| 5934 | // This case should not be possible and an error should have already been emitted but we | ||
| 5935 | // might still have attempted to parse further so return error.ParsingFailed here to stop. | ||
| 5936 | return error.ParsingFailed; | ||
| 5937 | } | ||
| 5938 | |||
| 5939 | try p.errStr(switch (c) { | ||
| 5940 | .assign => .incompatible_assign, | ||
| 5941 | .init => .incompatible_init, | ||
| 5942 | .ret => .incompatible_return, | ||
| 5943 | .arg => .incompatible_arg, | ||
| 5944 | .test_coerce => return error.CoercionFailed, | ||
| 5945 | }, tok, try c.typePairStr(p, dest_ty, res.ty)); | ||
| 5946 | try c.note(p); | ||
| 5947 | } | ||
| 5948 | }; | ||
| 5949 | |||
| 5950 | /// expr : assignExpr (',' assignExpr)* | ||
| 5951 | fn expr(p: *Parser) Error!Result { | ||
| 5952 | var expr_start = p.tok_i; | ||
| 5953 | var err_start = p.comp.diagnostics.list.items.len; | ||
| 5954 | var lhs = try p.assignExpr(); | ||
| 5955 | if (p.tok_ids[p.tok_i] == .comma) try lhs.expect(p); | ||
| 5956 | while (p.eatToken(.comma)) |_| { | ||
| 5957 | try lhs.maybeWarnUnused(p, expr_start, err_start); | ||
| 5958 | expr_start = p.tok_i; | ||
| 5959 | err_start = p.comp.diagnostics.list.items.len; | ||
| 5960 | |||
| 5961 | var rhs = try p.assignExpr(); | ||
| 5962 | try rhs.expect(p); | ||
| 5963 | try rhs.lvalConversion(p); | ||
| 5964 | lhs.val = rhs.val; | ||
| 5965 | lhs.ty = rhs.ty; | ||
| 5966 | try lhs.bin(p, .comma_expr, rhs); | ||
| 5967 | } | ||
| 5968 | return lhs; | ||
| 5969 | } | ||
| 5970 | |||
| 5971 | fn tokToTag(p: *Parser, tok: TokenIndex) Tree.Tag { | ||
| 5972 | return switch (p.tok_ids[tok]) { | ||
| 5973 | .equal => .assign_expr, | ||
| 5974 | .asterisk_equal => .mul_assign_expr, | ||
| 5975 | .slash_equal => .div_assign_expr, | ||
| 5976 | .percent_equal => .mod_assign_expr, | ||
| 5977 | .plus_equal => .add_assign_expr, | ||
| 5978 | .minus_equal => .sub_assign_expr, | ||
| 5979 | .angle_bracket_angle_bracket_left_equal => .shl_assign_expr, | ||
| 5980 | .angle_bracket_angle_bracket_right_equal => .shr_assign_expr, | ||
| 5981 | .ampersand_equal => .bit_and_assign_expr, | ||
| 5982 | .caret_equal => .bit_xor_assign_expr, | ||
| 5983 | .pipe_equal => .bit_or_assign_expr, | ||
| 5984 | .equal_equal => .equal_expr, | ||
| 5985 | .bang_equal => .not_equal_expr, | ||
| 5986 | .angle_bracket_left => .less_than_expr, | ||
| 5987 | .angle_bracket_left_equal => .less_than_equal_expr, | ||
| 5988 | .angle_bracket_right => .greater_than_expr, | ||
| 5989 | .angle_bracket_right_equal => .greater_than_equal_expr, | ||
| 5990 | .angle_bracket_angle_bracket_left => .shl_expr, | ||
| 5991 | .angle_bracket_angle_bracket_right => .shr_expr, | ||
| 5992 | .plus => .add_expr, | ||
| 5993 | .minus => .sub_expr, | ||
| 5994 | .asterisk => .mul_expr, | ||
| 5995 | .slash => .div_expr, | ||
| 5996 | .percent => .mod_expr, | ||
| 5997 | else => unreachable, | ||
| 5998 | }; | ||
| 5999 | } | ||
| 6000 | |||
| 6001 | /// assignExpr | ||
| 6002 | /// : condExpr | ||
| 6003 | /// | unExpr ('=' | '*=' | '/=' | '%=' | '+=' | '-=' | '<<=' | '>>=' | '&=' | '^=' | '|=') assignExpr | ||
| 6004 | fn assignExpr(p: *Parser) Error!Result { | ||
| 6005 | var lhs = try p.condExpr(); | ||
| 6006 | if (lhs.empty(p)) return lhs; | ||
| 6007 | |||
| 6008 | const tok = p.tok_i; | ||
| 6009 | const eq = p.eatToken(.equal); | ||
| 6010 | const mul = eq orelse p.eatToken(.asterisk_equal); | ||
| 6011 | const div = mul orelse p.eatToken(.slash_equal); | ||
| 6012 | const mod = div orelse p.eatToken(.percent_equal); | ||
| 6013 | const add = mod orelse p.eatToken(.plus_equal); | ||
| 6014 | const sub = add orelse p.eatToken(.minus_equal); | ||
| 6015 | const shl = sub orelse p.eatToken(.angle_bracket_angle_bracket_left_equal); | ||
| 6016 | const shr = shl orelse p.eatToken(.angle_bracket_angle_bracket_right_equal); | ||
| 6017 | const bit_and = shr orelse p.eatToken(.ampersand_equal); | ||
| 6018 | const bit_xor = bit_and orelse p.eatToken(.caret_equal); | ||
| 6019 | const bit_or = bit_xor orelse p.eatToken(.pipe_equal); | ||
| 6020 | |||
| 6021 | const tag = p.tokToTag(bit_or orelse return lhs); | ||
| 6022 | var rhs = try p.assignExpr(); | ||
| 6023 | try rhs.expect(p); | ||
| 6024 | try rhs.lvalConversion(p); | ||
| 6025 | |||
| 6026 | var is_const: bool = undefined; | ||
| 6027 | if (!p.tmpTree().isLvalExtra(lhs.node, &is_const) or is_const) { | ||
| 6028 | try p.errTok(.not_assignable, tok); | ||
| 6029 | return error.ParsingFailed; | ||
| 6030 | } | ||
| 6031 | |||
| 6032 | // adjustTypes will do do lvalue conversion but we do not want that | ||
| 6033 | var lhs_copy = lhs; | ||
| 6034 | switch (tag) { | ||
| 6035 | .assign_expr => {}, // handle plain assignment separately | ||
| 6036 | .mul_assign_expr, | ||
| 6037 | .div_assign_expr, | ||
| 6038 | .mod_assign_expr, | ||
| 6039 | => { | ||
| 6040 | if (rhs.val.isZero(p.comp) and lhs.ty.isInt() and rhs.ty.isInt()) { | ||
| 6041 | switch (tag) { | ||
| 6042 | .div_assign_expr => try p.errStr(.division_by_zero, div.?, "division"), | ||
| 6043 | .mod_assign_expr => try p.errStr(.division_by_zero, mod.?, "remainder"), | ||
| 6044 | else => {}, | ||
| 6045 | } | ||
| 6046 | } | ||
| 6047 | _ = try lhs_copy.adjustTypes(tok, &rhs, p, if (tag == .mod_assign_expr) .integer else .arithmetic); | ||
| 6048 | try lhs.bin(p, tag, rhs); | ||
| 6049 | return lhs; | ||
| 6050 | }, | ||
| 6051 | .sub_assign_expr, | ||
| 6052 | .add_assign_expr, | ||
| 6053 | => { | ||
| 6054 | if (lhs.ty.isPtr() and rhs.ty.isInt()) { | ||
| 6055 | try rhs.ptrCast(p, lhs.ty); | ||
| 6056 | } else { | ||
| 6057 | _ = try lhs_copy.adjustTypes(tok, &rhs, p, .arithmetic); | ||
| 6058 | } | ||
| 6059 | try lhs.bin(p, tag, rhs); | ||
| 6060 | return lhs; | ||
| 6061 | }, | ||
| 6062 | .shl_assign_expr, | ||
| 6063 | .shr_assign_expr, | ||
| 6064 | .bit_and_assign_expr, | ||
| 6065 | .bit_xor_assign_expr, | ||
| 6066 | .bit_or_assign_expr, | ||
| 6067 | => { | ||
| 6068 | _ = try lhs_copy.adjustTypes(tok, &rhs, p, .integer); | ||
| 6069 | try lhs.bin(p, tag, rhs); | ||
| 6070 | return lhs; | ||
| 6071 | }, | ||
| 6072 | else => unreachable, | ||
| 6073 | } | ||
| 6074 | |||
| 6075 | try rhs.coerce(p, lhs.ty, tok, .assign); | ||
| 6076 | |||
| 6077 | try lhs.bin(p, tag, rhs); | ||
| 6078 | return lhs; | ||
| 6079 | } | ||
| 6080 | |||
| 6081 | /// Returns a parse error if the expression is not an integer constant | ||
| 6082 | /// integerConstExpr : constExpr | ||
| 6083 | fn integerConstExpr(p: *Parser, decl_folding: ConstDeclFoldingMode) Error!Result { | ||
| 6084 | const start = p.tok_i; | ||
| 6085 | const res = try p.constExpr(decl_folding); | ||
| 6086 | if (!res.ty.isInt() and res.ty.specifier != .invalid) { | ||
| 6087 | try p.errTok(.expected_integer_constant_expr, start); | ||
| 6088 | return error.ParsingFailed; | ||
| 6089 | } | ||
| 6090 | return res; | ||
| 6091 | } | ||
| 6092 | |||
| 6093 | /// Caller is responsible for issuing a diagnostic if result is invalid/unavailable | ||
| 6094 | /// constExpr : condExpr | ||
| 6095 | fn constExpr(p: *Parser, decl_folding: ConstDeclFoldingMode) Error!Result { | ||
| 6096 | const const_decl_folding = p.const_decl_folding; | ||
| 6097 | defer p.const_decl_folding = const_decl_folding; | ||
| 6098 | p.const_decl_folding = decl_folding; | ||
| 6099 | |||
| 6100 | const res = try p.condExpr(); | ||
| 6101 | try res.expect(p); | ||
| 6102 | |||
| 6103 | if (res.ty.specifier == .invalid or res.val.opt_ref == .none) return res; | ||
| 6104 | |||
| 6105 | // saveValue sets val to unavailable | ||
| 6106 | var copy = res; | ||
| 6107 | try copy.saveValue(p); | ||
| 6108 | return res; | ||
| 6109 | } | ||
| 6110 | |||
| 6111 | /// condExpr : lorExpr ('?' expression? ':' condExpr)? | ||
| 6112 | fn condExpr(p: *Parser) Error!Result { | ||
| 6113 | const cond_tok = p.tok_i; | ||
| 6114 | var cond = try p.lorExpr(); | ||
| 6115 | if (cond.empty(p) or p.eatToken(.question_mark) == null) return cond; | ||
| 6116 | try cond.lvalConversion(p); | ||
| 6117 | const saved_eval = p.no_eval; | ||
| 6118 | |||
| 6119 | if (!cond.ty.isScalar()) { | ||
| 6120 | try p.errStr(.cond_expr_type, cond_tok, try p.typeStr(cond.ty)); | ||
| 6121 | return error.ParsingFailed; | ||
| 6122 | } | ||
| 6123 | |||
| 6124 | // Prepare for possible binary conditional expression. | ||
| 6125 | const maybe_colon = p.eatToken(.colon); | ||
| 6126 | |||
| 6127 | // Depending on the value of the condition, avoid evaluating unreachable branches. | ||
| 6128 | var then_expr = blk: { | ||
| 6129 | defer p.no_eval = saved_eval; | ||
| 6130 | if (cond.val.opt_ref != .none and !cond.val.toBool(p.comp)) p.no_eval = true; | ||
| 6131 | break :blk try p.expr(); | ||
| 6132 | }; | ||
| 6133 | try then_expr.expect(p); | ||
| 6134 | |||
| 6135 | // If we saw a colon then this is a binary conditional expression. | ||
| 6136 | if (maybe_colon) |colon| { | ||
| 6137 | var cond_then = cond; | ||
| 6138 | cond_then.node = try p.addNode(.{ .tag = .cond_dummy_expr, .ty = cond.ty, .data = .{ .un = cond.node } }); | ||
| 6139 | _ = try cond_then.adjustTypes(colon, &then_expr, p, .conditional); | ||
| 6140 | cond.ty = then_expr.ty; | ||
| 6141 | cond.node = try p.addNode(.{ | ||
| 6142 | .tag = .binary_cond_expr, | ||
| 6143 | .ty = cond.ty, | ||
| 6144 | .data = .{ .if3 = .{ .cond = cond.node, .body = (try p.addList(&.{ cond_then.node, then_expr.node })).start } }, | ||
| 6145 | }); | ||
| 6146 | return cond; | ||
| 6147 | } | ||
| 6148 | |||
| 6149 | const colon = try p.expectToken(.colon); | ||
| 6150 | var else_expr = blk: { | ||
| 6151 | defer p.no_eval = saved_eval; | ||
| 6152 | if (cond.val.opt_ref != .none and cond.val.toBool(p.comp)) p.no_eval = true; | ||
| 6153 | break :blk try p.condExpr(); | ||
| 6154 | }; | ||
| 6155 | try else_expr.expect(p); | ||
| 6156 | |||
| 6157 | _ = try then_expr.adjustTypes(colon, &else_expr, p, .conditional); | ||
| 6158 | |||
| 6159 | if (cond.val.opt_ref != .none) { | ||
| 6160 | cond.val = if (cond.val.toBool(p.comp)) then_expr.val else else_expr.val; | ||
| 6161 | } else { | ||
| 6162 | try then_expr.saveValue(p); | ||
| 6163 | try else_expr.saveValue(p); | ||
| 6164 | } | ||
| 6165 | cond.ty = then_expr.ty; | ||
| 6166 | cond.node = try p.addNode(.{ | ||
| 6167 | .tag = .cond_expr, | ||
| 6168 | .ty = cond.ty, | ||
| 6169 | .data = .{ .if3 = .{ .cond = cond.node, .body = (try p.addList(&.{ then_expr.node, else_expr.node })).start } }, | ||
| 6170 | }); | ||
| 6171 | return cond; | ||
| 6172 | } | ||
| 6173 | |||
| 6174 | /// lorExpr : landExpr ('||' landExpr)* | ||
| 6175 | fn lorExpr(p: *Parser) Error!Result { | ||
| 6176 | var lhs = try p.landExpr(); | ||
| 6177 | if (lhs.empty(p)) return lhs; | ||
| 6178 | const saved_eval = p.no_eval; | ||
| 6179 | defer p.no_eval = saved_eval; | ||
| 6180 | |||
| 6181 | while (p.eatToken(.pipe_pipe)) |tok| { | ||
| 6182 | if (lhs.val.opt_ref != .none and lhs.val.toBool(p.comp)) p.no_eval = true; | ||
| 6183 | var rhs = try p.landExpr(); | ||
| 6184 | try rhs.expect(p); | ||
| 6185 | |||
| 6186 | if (try lhs.adjustTypes(tok, &rhs, p, .boolean_logic)) { | ||
| 6187 | const res = lhs.val.toBool(p.comp) or rhs.val.toBool(p.comp); | ||
| 6188 | lhs.val = Value.fromBool(res); | ||
| 6189 | } | ||
| 6190 | try lhs.boolRes(p, .bool_or_expr, rhs); | ||
| 6191 | } | ||
| 6192 | return lhs; | ||
| 6193 | } | ||
| 6194 | |||
| 6195 | /// landExpr : orExpr ('&&' orExpr)* | ||
| 6196 | fn landExpr(p: *Parser) Error!Result { | ||
| 6197 | var lhs = try p.orExpr(); | ||
| 6198 | if (lhs.empty(p)) return lhs; | ||
| 6199 | const saved_eval = p.no_eval; | ||
| 6200 | defer p.no_eval = saved_eval; | ||
| 6201 | |||
| 6202 | while (p.eatToken(.ampersand_ampersand)) |tok| { | ||
| 6203 | if (lhs.val.opt_ref != .none and !lhs.val.toBool(p.comp)) p.no_eval = true; | ||
| 6204 | var rhs = try p.orExpr(); | ||
| 6205 | try rhs.expect(p); | ||
| 6206 | |||
| 6207 | if (try lhs.adjustTypes(tok, &rhs, p, .boolean_logic)) { | ||
| 6208 | const res = lhs.val.toBool(p.comp) and rhs.val.toBool(p.comp); | ||
| 6209 | lhs.val = Value.fromBool(res); | ||
| 6210 | } | ||
| 6211 | try lhs.boolRes(p, .bool_and_expr, rhs); | ||
| 6212 | } | ||
| 6213 | return lhs; | ||
| 6214 | } | ||
| 6215 | |||
| 6216 | /// orExpr : xorExpr ('|' xorExpr)* | ||
| 6217 | fn orExpr(p: *Parser) Error!Result { | ||
| 6218 | var lhs = try p.xorExpr(); | ||
| 6219 | if (lhs.empty(p)) return lhs; | ||
| 6220 | while (p.eatToken(.pipe)) |tok| { | ||
| 6221 | var rhs = try p.xorExpr(); | ||
| 6222 | try rhs.expect(p); | ||
| 6223 | |||
| 6224 | if (try lhs.adjustTypes(tok, &rhs, p, .integer)) { | ||
| 6225 | lhs.val = try lhs.val.bitOr(rhs.val, p.comp); | ||
| 6226 | } | ||
| 6227 | try lhs.bin(p, .bit_or_expr, rhs); | ||
| 6228 | } | ||
| 6229 | return lhs; | ||
| 6230 | } | ||
| 6231 | |||
| 6232 | /// xorExpr : andExpr ('^' andExpr)* | ||
| 6233 | fn xorExpr(p: *Parser) Error!Result { | ||
| 6234 | var lhs = try p.andExpr(); | ||
| 6235 | if (lhs.empty(p)) return lhs; | ||
| 6236 | while (p.eatToken(.caret)) |tok| { | ||
| 6237 | var rhs = try p.andExpr(); | ||
| 6238 | try rhs.expect(p); | ||
| 6239 | |||
| 6240 | if (try lhs.adjustTypes(tok, &rhs, p, .integer)) { | ||
| 6241 | lhs.val = try lhs.val.bitXor(rhs.val, p.comp); | ||
| 6242 | } | ||
| 6243 | try lhs.bin(p, .bit_xor_expr, rhs); | ||
| 6244 | } | ||
| 6245 | return lhs; | ||
| 6246 | } | ||
| 6247 | |||
| 6248 | /// andExpr : eqExpr ('&' eqExpr)* | ||
| 6249 | fn andExpr(p: *Parser) Error!Result { | ||
| 6250 | var lhs = try p.eqExpr(); | ||
| 6251 | if (lhs.empty(p)) return lhs; | ||
| 6252 | while (p.eatToken(.ampersand)) |tok| { | ||
| 6253 | var rhs = try p.eqExpr(); | ||
| 6254 | try rhs.expect(p); | ||
| 6255 | |||
| 6256 | if (try lhs.adjustTypes(tok, &rhs, p, .integer)) { | ||
| 6257 | lhs.val = try lhs.val.bitAnd(rhs.val, p.comp); | ||
| 6258 | } | ||
| 6259 | try lhs.bin(p, .bit_and_expr, rhs); | ||
| 6260 | } | ||
| 6261 | return lhs; | ||
| 6262 | } | ||
| 6263 | |||
| 6264 | /// eqExpr : compExpr (('==' | '!=') compExpr)* | ||
| 6265 | fn eqExpr(p: *Parser) Error!Result { | ||
| 6266 | var lhs = try p.compExpr(); | ||
| 6267 | if (lhs.empty(p)) return lhs; | ||
| 6268 | while (true) { | ||
| 6269 | const eq = p.eatToken(.equal_equal); | ||
| 6270 | const ne = eq orelse p.eatToken(.bang_equal); | ||
| 6271 | const tag = p.tokToTag(ne orelse break); | ||
| 6272 | var rhs = try p.compExpr(); | ||
| 6273 | try rhs.expect(p); | ||
| 6274 | |||
| 6275 | if (try lhs.adjustTypes(ne.?, &rhs, p, .equality)) { | ||
| 6276 | const op: std.math.CompareOperator = if (tag == .equal_expr) .eq else .neq; | ||
| 6277 | const res = lhs.val.compare(op, rhs.val, p.comp); | ||
| 6278 | lhs.val = Value.fromBool(res); | ||
| 6279 | } | ||
| 6280 | try lhs.boolRes(p, tag, rhs); | ||
| 6281 | } | ||
| 6282 | return lhs; | ||
| 6283 | } | ||
| 6284 | |||
| 6285 | /// compExpr : shiftExpr (('<' | '<=' | '>' | '>=') shiftExpr)* | ||
| 6286 | fn compExpr(p: *Parser) Error!Result { | ||
| 6287 | var lhs = try p.shiftExpr(); | ||
| 6288 | if (lhs.empty(p)) return lhs; | ||
| 6289 | while (true) { | ||
| 6290 | const lt = p.eatToken(.angle_bracket_left); | ||
| 6291 | const le = lt orelse p.eatToken(.angle_bracket_left_equal); | ||
| 6292 | const gt = le orelse p.eatToken(.angle_bracket_right); | ||
| 6293 | const ge = gt orelse p.eatToken(.angle_bracket_right_equal); | ||
| 6294 | const tag = p.tokToTag(ge orelse break); | ||
| 6295 | var rhs = try p.shiftExpr(); | ||
| 6296 | try rhs.expect(p); | ||
| 6297 | |||
| 6298 | if (try lhs.adjustTypes(ge.?, &rhs, p, .relational)) { | ||
| 6299 | const op: std.math.CompareOperator = switch (tag) { | ||
| 6300 | .less_than_expr => .lt, | ||
| 6301 | .less_than_equal_expr => .lte, | ||
| 6302 | .greater_than_expr => .gt, | ||
| 6303 | .greater_than_equal_expr => .gte, | ||
| 6304 | else => unreachable, | ||
| 6305 | }; | ||
| 6306 | const res = lhs.val.compare(op, rhs.val, p.comp); | ||
| 6307 | lhs.val = Value.fromBool(res); | ||
| 6308 | } | ||
| 6309 | try lhs.boolRes(p, tag, rhs); | ||
| 6310 | } | ||
| 6311 | return lhs; | ||
| 6312 | } | ||
| 6313 | |||
| 6314 | /// shiftExpr : addExpr (('<<' | '>>') addExpr)* | ||
| 6315 | fn shiftExpr(p: *Parser) Error!Result { | ||
| 6316 | var lhs = try p.addExpr(); | ||
| 6317 | if (lhs.empty(p)) return lhs; | ||
| 6318 | while (true) { | ||
| 6319 | const shl = p.eatToken(.angle_bracket_angle_bracket_left); | ||
| 6320 | const shr = shl orelse p.eatToken(.angle_bracket_angle_bracket_right); | ||
| 6321 | const tag = p.tokToTag(shr orelse break); | ||
| 6322 | var rhs = try p.addExpr(); | ||
| 6323 | try rhs.expect(p); | ||
| 6324 | |||
| 6325 | if (try lhs.adjustTypes(shr.?, &rhs, p, .integer)) { | ||
| 6326 | if (shl != null) { | ||
| 6327 | if (try lhs.val.shl(lhs.val, rhs.val, lhs.ty, p.comp)) try p.errOverflow(shl.?, lhs); | ||
| 6328 | } else { | ||
| 6329 | lhs.val = try lhs.val.shr(rhs.val, lhs.ty, p.comp); | ||
| 6330 | } | ||
| 6331 | } | ||
| 6332 | try lhs.bin(p, tag, rhs); | ||
| 6333 | } | ||
| 6334 | return lhs; | ||
| 6335 | } | ||
| 6336 | |||
| 6337 | /// addExpr : mulExpr (('+' | '-') mulExpr)* | ||
| 6338 | fn addExpr(p: *Parser) Error!Result { | ||
| 6339 | var lhs = try p.mulExpr(); | ||
| 6340 | if (lhs.empty(p)) return lhs; | ||
| 6341 | while (true) { | ||
| 6342 | const plus = p.eatToken(.plus); | ||
| 6343 | const minus = plus orelse p.eatToken(.minus); | ||
| 6344 | const tag = p.tokToTag(minus orelse break); | ||
| 6345 | var rhs = try p.mulExpr(); | ||
| 6346 | try rhs.expect(p); | ||
| 6347 | |||
| 6348 | const lhs_ty = lhs.ty; | ||
| 6349 | if (try lhs.adjustTypes(minus.?, &rhs, p, if (plus != null) .add else .sub)) { | ||
| 6350 | if (plus != null) { | ||
| 6351 | if (try lhs.val.add(lhs.val, rhs.val, lhs.ty, p.comp)) try p.errOverflow(plus.?, lhs); | ||
| 6352 | } else { | ||
| 6353 | if (try lhs.val.sub(lhs.val, rhs.val, lhs.ty, p.comp)) try p.errOverflow(minus.?, lhs); | ||
| 6354 | } | ||
| 6355 | } | ||
| 6356 | if (lhs.ty.specifier != .invalid and lhs_ty.isPtr() and !lhs_ty.isVoidStar() and lhs_ty.elemType().hasIncompleteSize()) { | ||
| 6357 | try p.errStr(.ptr_arithmetic_incomplete, minus.?, try p.typeStr(lhs_ty.elemType())); | ||
| 6358 | lhs.ty = Type.invalid; | ||
| 6359 | } | ||
| 6360 | try lhs.bin(p, tag, rhs); | ||
| 6361 | } | ||
| 6362 | return lhs; | ||
| 6363 | } | ||
| 6364 | |||
| 6365 | /// mulExpr : castExpr (('*' | '/' | '%') castExpr)*´ | ||
| 6366 | fn mulExpr(p: *Parser) Error!Result { | ||
| 6367 | var lhs = try p.castExpr(); | ||
| 6368 | if (lhs.empty(p)) return lhs; | ||
| 6369 | while (true) { | ||
| 6370 | const mul = p.eatToken(.asterisk); | ||
| 6371 | const div = mul orelse p.eatToken(.slash); | ||
| 6372 | const percent = div orelse p.eatToken(.percent); | ||
| 6373 | const tag = p.tokToTag(percent orelse break); | ||
| 6374 | var rhs = try p.castExpr(); | ||
| 6375 | try rhs.expect(p); | ||
| 6376 | |||
| 6377 | if (rhs.val.isZero(p.comp) and mul == null and !p.no_eval and lhs.ty.isInt() and rhs.ty.isInt()) { | ||
| 6378 | const err_tag: Diagnostics.Tag = if (p.in_macro) .division_by_zero_macro else .division_by_zero; | ||
| 6379 | lhs.val = .{}; | ||
| 6380 | if (div != null) { | ||
| 6381 | try p.errStr(err_tag, div.?, "division"); | ||
| 6382 | } else { | ||
| 6383 | try p.errStr(err_tag, percent.?, "remainder"); | ||
| 6384 | } | ||
| 6385 | if (p.in_macro) return error.ParsingFailed; | ||
| 6386 | } | ||
| 6387 | |||
| 6388 | if (try lhs.adjustTypes(percent.?, &rhs, p, if (tag == .mod_expr) .integer else .arithmetic)) { | ||
| 6389 | if (mul != null) { | ||
| 6390 | if (try lhs.val.mul(lhs.val, rhs.val, lhs.ty, p.comp)) try p.errOverflow(mul.?, lhs); | ||
| 6391 | } else if (div != null) { | ||
| 6392 | if (try lhs.val.div(lhs.val, rhs.val, lhs.ty, p.comp)) try p.errOverflow(mul.?, lhs); | ||
| 6393 | } else { | ||
| 6394 | var res = try Value.rem(lhs.val, rhs.val, lhs.ty, p.comp); | ||
| 6395 | if (res.opt_ref == .none) { | ||
| 6396 | if (p.in_macro) { | ||
| 6397 | // match clang behavior by defining invalid remainder to be zero in macros | ||
| 6398 | res = Value.zero; | ||
| 6399 | } else { | ||
| 6400 | try lhs.saveValue(p); | ||
| 6401 | try rhs.saveValue(p); | ||
| 6402 | } | ||
| 6403 | } | ||
| 6404 | lhs.val = res; | ||
| 6405 | } | ||
| 6406 | } | ||
| 6407 | |||
| 6408 | try lhs.bin(p, tag, rhs); | ||
| 6409 | } | ||
| 6410 | return lhs; | ||
| 6411 | } | ||
| 6412 | |||
| 6413 | /// This will always be the last message, if present | ||
| 6414 | fn removeUnusedWarningForTok(p: *Parser, last_expr_tok: TokenIndex) void { | ||
| 6415 | if (last_expr_tok == 0) return; | ||
| 6416 | if (p.comp.diagnostics.list.items.len == 0) return; | ||
| 6417 | |||
| 6418 | const last_expr_loc = p.pp.tokens.items(.loc)[last_expr_tok]; | ||
| 6419 | const last_msg = p.comp.diagnostics.list.items[p.comp.diagnostics.list.items.len - 1]; | ||
| 6420 | |||
| 6421 | if (last_msg.tag == .unused_value and last_msg.loc.eql(last_expr_loc)) { | ||
| 6422 | p.comp.diagnostics.list.items.len = p.comp.diagnostics.list.items.len - 1; | ||
| 6423 | } | ||
| 6424 | } | ||
| 6425 | |||
| 6426 | /// castExpr | ||
| 6427 | /// : '(' compoundStmt ')' | ||
| 6428 | /// | '(' typeName ')' castExpr | ||
| 6429 | /// | '(' typeName ')' '{' initializerItems '}' | ||
| 6430 | /// | __builtin_choose_expr '(' integerConstExpr ',' assignExpr ',' assignExpr ')' | ||
| 6431 | /// | __builtin_va_arg '(' assignExpr ',' typeName ')' | ||
| 6432 | /// | __builtin_offsetof '(' typeName ',' offsetofMemberDesignator ')' | ||
| 6433 | /// | __builtin_bitoffsetof '(' typeName ',' offsetofMemberDesignator ')' | ||
| 6434 | /// | unExpr | ||
| 6435 | fn castExpr(p: *Parser) Error!Result { | ||
| 6436 | if (p.eatToken(.l_paren)) |l_paren| cast_expr: { | ||
| 6437 | if (p.tok_ids[p.tok_i] == .l_brace) { | ||
| 6438 | try p.err(.gnu_statement_expression); | ||
| 6439 | if (p.func.ty == null) { | ||
| 6440 | try p.err(.stmt_expr_not_allowed_file_scope); | ||
| 6441 | return error.ParsingFailed; | ||
| 6442 | } | ||
| 6443 | var stmt_expr_state: StmtExprState = .{}; | ||
| 6444 | const body_node = (try p.compoundStmt(false, &stmt_expr_state)).?; // compoundStmt only returns null if .l_brace isn't the first token | ||
| 6445 | p.removeUnusedWarningForTok(stmt_expr_state.last_expr_tok); | ||
| 6446 | |||
| 6447 | var res = Result{ | ||
| 6448 | .node = body_node, | ||
| 6449 | .ty = stmt_expr_state.last_expr_res.ty, | ||
| 6450 | .val = stmt_expr_state.last_expr_res.val, | ||
| 6451 | }; | ||
| 6452 | try p.expectClosing(l_paren, .r_paren); | ||
| 6453 | try res.un(p, .stmt_expr); | ||
| 6454 | return res; | ||
| 6455 | } | ||
| 6456 | const ty = (try p.typeName()) orelse { | ||
| 6457 | p.tok_i -= 1; | ||
| 6458 | break :cast_expr; | ||
| 6459 | }; | ||
| 6460 | try p.expectClosing(l_paren, .r_paren); | ||
| 6461 | |||
| 6462 | if (p.tok_ids[p.tok_i] == .l_brace) { | ||
| 6463 | // Compound literal; handled in unExpr | ||
| 6464 | p.tok_i = l_paren; | ||
| 6465 | break :cast_expr; | ||
| 6466 | } | ||
| 6467 | |||
| 6468 | const operand_tok = p.tok_i; | ||
| 6469 | var operand = try p.castExpr(); | ||
| 6470 | try operand.expect(p); | ||
| 6471 | try operand.lvalConversion(p); | ||
| 6472 | try operand.castType(p, ty, operand_tok, l_paren); | ||
| 6473 | return operand; | ||
| 6474 | } | ||
| 6475 | switch (p.tok_ids[p.tok_i]) { | ||
| 6476 | .builtin_choose_expr => return p.builtinChooseExpr(), | ||
| 6477 | .builtin_va_arg => return p.builtinVaArg(), | ||
| 6478 | .builtin_offsetof => return p.builtinOffsetof(false), | ||
| 6479 | .builtin_bitoffsetof => return p.builtinOffsetof(true), | ||
| 6480 | .builtin_types_compatible_p => return p.typesCompatible(), | ||
| 6481 | // TODO: other special-cased builtins | ||
| 6482 | else => {}, | ||
| 6483 | } | ||
| 6484 | return p.unExpr(); | ||
| 6485 | } | ||
| 6486 | |||
| 6487 | fn typesCompatible(p: *Parser) Error!Result { | ||
| 6488 | p.tok_i += 1; | ||
| 6489 | const l_paren = try p.expectToken(.l_paren); | ||
| 6490 | |||
| 6491 | const first = (try p.typeName()) orelse { | ||
| 6492 | try p.err(.expected_type); | ||
| 6493 | p.skipTo(.r_paren); | ||
| 6494 | return error.ParsingFailed; | ||
| 6495 | }; | ||
| 6496 | const lhs = try p.addNode(.{ .tag = .invalid, .ty = first, .data = undefined }); | ||
| 6497 | _ = try p.expectToken(.comma); | ||
| 6498 | |||
| 6499 | const second = (try p.typeName()) orelse { | ||
| 6500 | try p.err(.expected_type); | ||
| 6501 | p.skipTo(.r_paren); | ||
| 6502 | return error.ParsingFailed; | ||
| 6503 | }; | ||
| 6504 | const rhs = try p.addNode(.{ .tag = .invalid, .ty = second, .data = undefined }); | ||
| 6505 | |||
| 6506 | try p.expectClosing(l_paren, .r_paren); | ||
| 6507 | |||
| 6508 | var first_unqual = first.canonicalize(.standard); | ||
| 6509 | first_unqual.qual.@"const" = false; | ||
| 6510 | first_unqual.qual.@"volatile" = false; | ||
| 6511 | var second_unqual = second.canonicalize(.standard); | ||
| 6512 | second_unqual.qual.@"const" = false; | ||
| 6513 | second_unqual.qual.@"volatile" = false; | ||
| 6514 | |||
| 6515 | const compatible = first_unqual.eql(second_unqual, p.comp, true); | ||
| 6516 | |||
| 6517 | const res = Result{ | ||
| 6518 | .val = Value.fromBool(compatible), | ||
| 6519 | .node = try p.addNode(.{ .tag = .builtin_types_compatible_p, .ty = Type.int, .data = .{ .bin = .{ | ||
| 6520 | .lhs = lhs, | ||
| 6521 | .rhs = rhs, | ||
| 6522 | } } }), | ||
| 6523 | }; | ||
| 6524 | try p.value_map.put(res.node, res.val); | ||
| 6525 | return res; | ||
| 6526 | } | ||
| 6527 | |||
| 6528 | fn builtinChooseExpr(p: *Parser) Error!Result { | ||
| 6529 | p.tok_i += 1; | ||
| 6530 | const l_paren = try p.expectToken(.l_paren); | ||
| 6531 | const cond_tok = p.tok_i; | ||
| 6532 | var cond = try p.integerConstExpr(.no_const_decl_folding); | ||
| 6533 | if (cond.val.opt_ref == .none) { | ||
| 6534 | try p.errTok(.builtin_choose_cond, cond_tok); | ||
| 6535 | return error.ParsingFailed; | ||
| 6536 | } | ||
| 6537 | |||
| 6538 | _ = try p.expectToken(.comma); | ||
| 6539 | |||
| 6540 | var then_expr = if (cond.val.toBool(p.comp)) try p.assignExpr() else try p.parseNoEval(assignExpr); | ||
| 6541 | try then_expr.expect(p); | ||
| 6542 | |||
| 6543 | _ = try p.expectToken(.comma); | ||
| 6544 | |||
| 6545 | var else_expr = if (!cond.val.toBool(p.comp)) try p.assignExpr() else try p.parseNoEval(assignExpr); | ||
| 6546 | try else_expr.expect(p); | ||
| 6547 | |||
| 6548 | try p.expectClosing(l_paren, .r_paren); | ||
| 6549 | |||
| 6550 | if (cond.val.toBool(p.comp)) { | ||
| 6551 | cond.val = then_expr.val; | ||
| 6552 | cond.ty = then_expr.ty; | ||
| 6553 | } else { | ||
| 6554 | cond.val = else_expr.val; | ||
| 6555 | cond.ty = else_expr.ty; | ||
| 6556 | } | ||
| 6557 | cond.node = try p.addNode(.{ | ||
| 6558 | .tag = .builtin_choose_expr, | ||
| 6559 | .ty = cond.ty, | ||
| 6560 | .data = .{ .if3 = .{ .cond = cond.node, .body = (try p.addList(&.{ then_expr.node, else_expr.node })).start } }, | ||
| 6561 | }); | ||
| 6562 | return cond; | ||
| 6563 | } | ||
| 6564 | |||
| 6565 | fn builtinVaArg(p: *Parser) Error!Result { | ||
| 6566 | const builtin_tok = p.tok_i; | ||
| 6567 | p.tok_i += 1; | ||
| 6568 | |||
| 6569 | const l_paren = try p.expectToken(.l_paren); | ||
| 6570 | const va_list_tok = p.tok_i; | ||
| 6571 | var va_list = try p.assignExpr(); | ||
| 6572 | try va_list.expect(p); | ||
| 6573 | try va_list.lvalConversion(p); | ||
| 6574 | |||
| 6575 | _ = try p.expectToken(.comma); | ||
| 6576 | |||
| 6577 | const ty = (try p.typeName()) orelse { | ||
| 6578 | try p.err(.expected_type); | ||
| 6579 | return error.ParsingFailed; | ||
| 6580 | }; | ||
| 6581 | try p.expectClosing(l_paren, .r_paren); | ||
| 6582 | |||
| 6583 | if (!va_list.ty.eql(p.comp.types.va_list, p.comp, true)) { | ||
| 6584 | try p.errStr(.incompatible_va_arg, va_list_tok, try p.typeStr(va_list.ty)); | ||
| 6585 | return error.ParsingFailed; | ||
| 6586 | } | ||
| 6587 | |||
| 6588 | return Result{ .ty = ty, .node = try p.addNode(.{ | ||
| 6589 | .tag = .special_builtin_call_one, | ||
| 6590 | .ty = ty, | ||
| 6591 | .data = .{ .decl = .{ .name = builtin_tok, .node = va_list.node } }, | ||
| 6592 | }) }; | ||
| 6593 | } | ||
| 6594 | |||
| 6595 | fn builtinOffsetof(p: *Parser, want_bits: bool) Error!Result { | ||
| 6596 | const builtin_tok = p.tok_i; | ||
| 6597 | p.tok_i += 1; | ||
| 6598 | |||
| 6599 | const l_paren = try p.expectToken(.l_paren); | ||
| 6600 | const ty_tok = p.tok_i; | ||
| 6601 | |||
| 6602 | const ty = (try p.typeName()) orelse { | ||
| 6603 | try p.err(.expected_type); | ||
| 6604 | p.skipTo(.r_paren); | ||
| 6605 | return error.ParsingFailed; | ||
| 6606 | }; | ||
| 6607 | |||
| 6608 | if (!ty.isRecord()) { | ||
| 6609 | try p.errStr(.offsetof_ty, ty_tok, try p.typeStr(ty)); | ||
| 6610 | p.skipTo(.r_paren); | ||
| 6611 | return error.ParsingFailed; | ||
| 6612 | } else if (ty.hasIncompleteSize()) { | ||
| 6613 | try p.errStr(.offsetof_incomplete, ty_tok, try p.typeStr(ty)); | ||
| 6614 | p.skipTo(.r_paren); | ||
| 6615 | return error.ParsingFailed; | ||
| 6616 | } | ||
| 6617 | |||
| 6618 | _ = try p.expectToken(.comma); | ||
| 6619 | |||
| 6620 | const offsetof_expr = try p.offsetofMemberDesignator(ty, want_bits); | ||
| 6621 | |||
| 6622 | try p.expectClosing(l_paren, .r_paren); | ||
| 6623 | |||
| 6624 | return Result{ | ||
| 6625 | .ty = p.comp.types.size, | ||
| 6626 | .val = offsetof_expr.val, | ||
| 6627 | .node = try p.addNode(.{ | ||
| 6628 | .tag = .special_builtin_call_one, | ||
| 6629 | .ty = p.comp.types.size, | ||
| 6630 | .data = .{ .decl = .{ .name = builtin_tok, .node = offsetof_expr.node } }, | ||
| 6631 | }), | ||
| 6632 | }; | ||
| 6633 | } | ||
| 6634 | |||
| 6635 | /// offsetofMemberDesignator: IDENTIFIER ('.' IDENTIFIER | '[' expr ']' )* | ||
| 6636 | fn offsetofMemberDesignator(p: *Parser, base_ty: Type, want_bits: bool) Error!Result { | ||
| 6637 | errdefer p.skipTo(.r_paren); | ||
| 6638 | const base_field_name_tok = try p.expectIdentifier(); | ||
| 6639 | const base_field_name = try StrInt.intern(p.comp, p.tokSlice(base_field_name_tok)); | ||
| 6640 | try p.validateFieldAccess(base_ty, base_ty, base_field_name_tok, base_field_name); | ||
| 6641 | const base_node = try p.addNode(.{ .tag = .default_init_expr, .ty = base_ty, .data = undefined }); | ||
| 6642 | |||
| 6643 | var cur_offset: u64 = 0; | ||
| 6644 | const base_record_ty = base_ty.canonicalize(.standard); | ||
| 6645 | var lhs = try p.fieldAccessExtra(base_node, base_record_ty, base_field_name, false, &cur_offset); | ||
| 6646 | |||
| 6647 | var total_offset = cur_offset; | ||
| 6648 | while (true) switch (p.tok_ids[p.tok_i]) { | ||
| 6649 | .period => { | ||
| 6650 | p.tok_i += 1; | ||
| 6651 | const field_name_tok = try p.expectIdentifier(); | ||
| 6652 | const field_name = try StrInt.intern(p.comp, p.tokSlice(field_name_tok)); | ||
| 6653 | |||
| 6654 | if (!lhs.ty.isRecord()) { | ||
| 6655 | try p.errStr(.offsetof_ty, field_name_tok, try p.typeStr(lhs.ty)); | ||
| 6656 | return error.ParsingFailed; | ||
| 6657 | } | ||
| 6658 | try p.validateFieldAccess(lhs.ty, lhs.ty, field_name_tok, field_name); | ||
| 6659 | const record_ty = lhs.ty.canonicalize(.standard); | ||
| 6660 | lhs = try p.fieldAccessExtra(lhs.node, record_ty, field_name, false, &cur_offset); | ||
| 6661 | total_offset += cur_offset; | ||
| 6662 | }, | ||
| 6663 | .l_bracket => { | ||
| 6664 | const l_bracket_tok = p.tok_i; | ||
| 6665 | p.tok_i += 1; | ||
| 6666 | var index = try p.expr(); | ||
| 6667 | try index.expect(p); | ||
| 6668 | _ = try p.expectClosing(l_bracket_tok, .r_bracket); | ||
| 6669 | |||
| 6670 | if (!lhs.ty.isArray()) { | ||
| 6671 | try p.errStr(.offsetof_array, l_bracket_tok, try p.typeStr(lhs.ty)); | ||
| 6672 | return error.ParsingFailed; | ||
| 6673 | } | ||
| 6674 | var ptr = lhs; | ||
| 6675 | try ptr.lvalConversion(p); | ||
| 6676 | try index.lvalConversion(p); | ||
| 6677 | |||
| 6678 | if (!index.ty.isInt()) try p.errTok(.invalid_index, l_bracket_tok); | ||
| 6679 | try p.checkArrayBounds(index, lhs, l_bracket_tok); | ||
| 6680 | |||
| 6681 | try index.saveValue(p); | ||
| 6682 | try ptr.bin(p, .array_access_expr, index); | ||
| 6683 | lhs = ptr; | ||
| 6684 | }, | ||
| 6685 | else => break, | ||
| 6686 | }; | ||
| 6687 | const val = try Value.int(if (want_bits) total_offset else total_offset / 8, p.comp); | ||
| 6688 | return Result{ .ty = base_ty, .val = val, .node = lhs.node }; | ||
| 6689 | } | ||
| 6690 | |||
| 6691 | /// unExpr | ||
| 6692 | /// : (compoundLiteral | primaryExpr) suffixExpr* | ||
| 6693 | /// | '&&' IDENTIFIER | ||
| 6694 | /// | ('&' | '*' | '+' | '-' | '~' | '!' | '++' | '--' | keyword_extension | keyword_imag | keyword_real) castExpr | ||
| 6695 | /// | keyword_sizeof unExpr | ||
| 6696 | /// | keyword_sizeof '(' typeName ')' | ||
| 6697 | /// | keyword_alignof '(' typeName ')' | ||
| 6698 | /// | keyword_c23_alignof '(' typeName ')' | ||
| 6699 | fn unExpr(p: *Parser) Error!Result { | ||
| 6700 | const tok = p.tok_i; | ||
| 6701 | switch (p.tok_ids[tok]) { | ||
| 6702 | .ampersand_ampersand => { | ||
| 6703 | const address_tok = p.tok_i; | ||
| 6704 | p.tok_i += 1; | ||
| 6705 | const name_tok = try p.expectIdentifier(); | ||
| 6706 | try p.errTok(.gnu_label_as_value, address_tok); | ||
| 6707 | p.contains_address_of_label = true; | ||
| 6708 | |||
| 6709 | const str = p.tokSlice(name_tok); | ||
| 6710 | if (p.findLabel(str) == null) { | ||
| 6711 | try p.labels.append(.{ .unresolved_goto = name_tok }); | ||
| 6712 | } | ||
| 6713 | const elem_ty = try p.arena.create(Type); | ||
| 6714 | elem_ty.* = .{ .specifier = .void }; | ||
| 6715 | const result_ty = Type{ .specifier = .pointer, .data = .{ .sub_type = elem_ty } }; | ||
| 6716 | return Result{ | ||
| 6717 | .node = try p.addNode(.{ | ||
| 6718 | .tag = .addr_of_label, | ||
| 6719 | .data = .{ .decl_ref = name_tok }, | ||
| 6720 | .ty = result_ty, | ||
| 6721 | }), | ||
| 6722 | .ty = result_ty, | ||
| 6723 | }; | ||
| 6724 | }, | ||
| 6725 | .ampersand => { | ||
| 6726 | if (p.in_macro) { | ||
| 6727 | try p.err(.invalid_preproc_operator); | ||
| 6728 | return error.ParsingFailed; | ||
| 6729 | } | ||
| 6730 | p.tok_i += 1; | ||
| 6731 | var operand = try p.castExpr(); | ||
| 6732 | try operand.expect(p); | ||
| 6733 | |||
| 6734 | const tree = p.tmpTree(); | ||
| 6735 | if (p.getNode(operand.node, .member_access_expr) orelse | ||
| 6736 | p.getNode(operand.node, .member_access_ptr_expr)) |member_node| | ||
| 6737 | { | ||
| 6738 | if (tree.isBitfield(member_node)) try p.errTok(.addr_of_bitfield, tok); | ||
| 6739 | } | ||
| 6740 | if (!tree.isLval(operand.node)) { | ||
| 6741 | try p.errTok(.addr_of_rvalue, tok); | ||
| 6742 | } | ||
| 6743 | if (operand.ty.qual.register) try p.errTok(.addr_of_register, tok); | ||
| 6744 | |||
| 6745 | const elem_ty = try p.arena.create(Type); | ||
| 6746 | elem_ty.* = operand.ty; | ||
| 6747 | operand.ty = Type{ | ||
| 6748 | .specifier = .pointer, | ||
| 6749 | .data = .{ .sub_type = elem_ty }, | ||
| 6750 | }; | ||
| 6751 | try operand.saveValue(p); | ||
| 6752 | try operand.un(p, .addr_of_expr); | ||
| 6753 | return operand; | ||
| 6754 | }, | ||
| 6755 | .asterisk => { | ||
| 6756 | const asterisk_loc = p.tok_i; | ||
| 6757 | p.tok_i += 1; | ||
| 6758 | var operand = try p.castExpr(); | ||
| 6759 | try operand.expect(p); | ||
| 6760 | |||
| 6761 | if (operand.ty.isArray() or operand.ty.isPtr() or operand.ty.isFunc()) { | ||
| 6762 | try operand.lvalConversion(p); | ||
| 6763 | operand.ty = operand.ty.elemType(); | ||
| 6764 | } else { | ||
| 6765 | try p.errTok(.indirection_ptr, tok); | ||
| 6766 | } | ||
| 6767 | if (operand.ty.hasIncompleteSize() and !operand.ty.is(.void)) { | ||
| 6768 | try p.errStr(.deref_incomplete_ty_ptr, asterisk_loc, try p.typeStr(operand.ty)); | ||
| 6769 | } | ||
| 6770 | operand.ty.qual = .{}; | ||
| 6771 | try operand.un(p, .deref_expr); | ||
| 6772 | return operand; | ||
| 6773 | }, | ||
| 6774 | .plus => { | ||
| 6775 | p.tok_i += 1; | ||
| 6776 | |||
| 6777 | var operand = try p.castExpr(); | ||
| 6778 | try operand.expect(p); | ||
| 6779 | try operand.lvalConversion(p); | ||
| 6780 | if (!operand.ty.isInt() and !operand.ty.isFloat()) | ||
| 6781 | try p.errStr(.invalid_argument_un, tok, try p.typeStr(operand.ty)); | ||
| 6782 | |||
| 6783 | try operand.usualUnaryConversion(p, tok); | ||
| 6784 | |||
| 6785 | return operand; | ||
| 6786 | }, | ||
| 6787 | .minus => { | ||
| 6788 | p.tok_i += 1; | ||
| 6789 | |||
| 6790 | var operand = try p.castExpr(); | ||
| 6791 | try operand.expect(p); | ||
| 6792 | try operand.lvalConversion(p); | ||
| 6793 | if (!operand.ty.isInt() and !operand.ty.isFloat()) | ||
| 6794 | try p.errStr(.invalid_argument_un, tok, try p.typeStr(operand.ty)); | ||
| 6795 | |||
| 6796 | try operand.usualUnaryConversion(p, tok); | ||
| 6797 | if (operand.val.is(.int, p.comp)) { | ||
| 6798 | _ = try operand.val.sub(Value.zero, operand.val, operand.ty, p.comp); | ||
| 6799 | } else { | ||
| 6800 | operand.val = .{}; | ||
| 6801 | } | ||
| 6802 | try operand.un(p, .negate_expr); | ||
| 6803 | return operand; | ||
| 6804 | }, | ||
| 6805 | .plus_plus => { | ||
| 6806 | p.tok_i += 1; | ||
| 6807 | |||
| 6808 | var operand = try p.castExpr(); | ||
| 6809 | try operand.expect(p); | ||
| 6810 | if (!operand.ty.isScalar()) | ||
| 6811 | try p.errStr(.invalid_argument_un, tok, try p.typeStr(operand.ty)); | ||
| 6812 | if (operand.ty.isComplex()) | ||
| 6813 | try p.errStr(.complex_prefix_postfix_op, p.tok_i, try p.typeStr(operand.ty)); | ||
| 6814 | |||
| 6815 | if (!p.tmpTree().isLval(operand.node) or operand.ty.isConst()) { | ||
| 6816 | try p.errTok(.not_assignable, tok); | ||
| 6817 | return error.ParsingFailed; | ||
| 6818 | } | ||
| 6819 | try operand.usualUnaryConversion(p, tok); | ||
| 6820 | |||
| 6821 | if (operand.val.is(.int, p.comp) or operand.val.is(.int, p.comp)) { | ||
| 6822 | if (try operand.val.add(operand.val, Value.one, operand.ty, p.comp)) | ||
| 6823 | try p.errOverflow(tok, operand); | ||
| 6824 | } else { | ||
| 6825 | operand.val = .{}; | ||
| 6826 | } | ||
| 6827 | |||
| 6828 | try operand.un(p, .pre_inc_expr); | ||
| 6829 | return operand; | ||
| 6830 | }, | ||
| 6831 | .minus_minus => { | ||
| 6832 | p.tok_i += 1; | ||
| 6833 | |||
| 6834 | var operand = try p.castExpr(); | ||
| 6835 | try operand.expect(p); | ||
| 6836 | if (!operand.ty.isScalar()) | ||
| 6837 | try p.errStr(.invalid_argument_un, tok, try p.typeStr(operand.ty)); | ||
| 6838 | if (operand.ty.isComplex()) | ||
| 6839 | try p.errStr(.complex_prefix_postfix_op, p.tok_i, try p.typeStr(operand.ty)); | ||
| 6840 | |||
| 6841 | if (!p.tmpTree().isLval(operand.node) or operand.ty.isConst()) { | ||
| 6842 | try p.errTok(.not_assignable, tok); | ||
| 6843 | return error.ParsingFailed; | ||
| 6844 | } | ||
| 6845 | try operand.usualUnaryConversion(p, tok); | ||
| 6846 | |||
| 6847 | if (operand.val.is(.int, p.comp) or operand.val.is(.int, p.comp)) { | ||
| 6848 | if (try operand.val.sub(operand.val, Value.one, operand.ty, p.comp)) | ||
| 6849 | try p.errOverflow(tok, operand); | ||
| 6850 | } else { | ||
| 6851 | operand.val = .{}; | ||
| 6852 | } | ||
| 6853 | |||
| 6854 | try operand.un(p, .pre_dec_expr); | ||
| 6855 | return operand; | ||
| 6856 | }, | ||
| 6857 | .tilde => { | ||
| 6858 | p.tok_i += 1; | ||
| 6859 | |||
| 6860 | var operand = try p.castExpr(); | ||
| 6861 | try operand.expect(p); | ||
| 6862 | try operand.lvalConversion(p); | ||
| 6863 | try operand.usualUnaryConversion(p, tok); | ||
| 6864 | if (operand.ty.isInt()) { | ||
| 6865 | if (operand.val.is(.int, p.comp)) { | ||
| 6866 | operand.val = try operand.val.bitNot(operand.ty, p.comp); | ||
| 6867 | } | ||
| 6868 | } else { | ||
| 6869 | try p.errStr(.invalid_argument_un, tok, try p.typeStr(operand.ty)); | ||
| 6870 | operand.val = .{}; | ||
| 6871 | } | ||
| 6872 | try operand.un(p, .bit_not_expr); | ||
| 6873 | return operand; | ||
| 6874 | }, | ||
| 6875 | .bang => { | ||
| 6876 | p.tok_i += 1; | ||
| 6877 | |||
| 6878 | var operand = try p.castExpr(); | ||
| 6879 | try operand.expect(p); | ||
| 6880 | try operand.lvalConversion(p); | ||
| 6881 | if (!operand.ty.isScalar()) | ||
| 6882 | try p.errStr(.invalid_argument_un, tok, try p.typeStr(operand.ty)); | ||
| 6883 | |||
| 6884 | try operand.usualUnaryConversion(p, tok); | ||
| 6885 | if (operand.val.is(.int, p.comp)) { | ||
| 6886 | operand.val = Value.fromBool(!operand.val.toBool(p.comp)); | ||
| 6887 | } else if (operand.val.opt_ref == .null) { | ||
| 6888 | operand.val = Value.one; | ||
| 6889 | } else { | ||
| 6890 | if (operand.ty.isDecayed()) { | ||
| 6891 | operand.val = Value.zero; | ||
| 6892 | } else { | ||
| 6893 | operand.val = .{}; | ||
| 6894 | } | ||
| 6895 | } | ||
| 6896 | operand.ty = .{ .specifier = .int }; | ||
| 6897 | try operand.un(p, .bool_not_expr); | ||
| 6898 | return operand; | ||
| 6899 | }, | ||
| 6900 | .keyword_sizeof => { | ||
| 6901 | p.tok_i += 1; | ||
| 6902 | const expected_paren = p.tok_i; | ||
| 6903 | var res = Result{}; | ||
| 6904 | if (try p.typeName()) |ty| { | ||
| 6905 | res.ty = ty; | ||
| 6906 | try p.errTok(.expected_parens_around_typename, expected_paren); | ||
| 6907 | } else if (p.eatToken(.l_paren)) |l_paren| { | ||
| 6908 | if (try p.typeName()) |ty| { | ||
| 6909 | res.ty = ty; | ||
| 6910 | try p.expectClosing(l_paren, .r_paren); | ||
| 6911 | } else { | ||
| 6912 | p.tok_i = expected_paren; | ||
| 6913 | res = try p.parseNoEval(unExpr); | ||
| 6914 | } | ||
| 6915 | } else { | ||
| 6916 | res = try p.parseNoEval(unExpr); | ||
| 6917 | } | ||
| 6918 | |||
| 6919 | if (res.ty.is(.void)) { | ||
| 6920 | try p.errStr(.pointer_arith_void, tok, "sizeof"); | ||
| 6921 | } else if (res.ty.isDecayed()) { | ||
| 6922 | const array_ty = res.ty.originalTypeOfDecayedArray(); | ||
| 6923 | const err_str = try p.typePairStrExtra(res.ty, " instead of ", array_ty); | ||
| 6924 | try p.errStr(.sizeof_array_arg, tok, err_str); | ||
| 6925 | } | ||
| 6926 | if (res.ty.sizeof(p.comp)) |size| { | ||
| 6927 | if (size == 0) { | ||
| 6928 | try p.errTok(.sizeof_returns_zero, tok); | ||
| 6929 | } | ||
| 6930 | res.val = try Value.int(size, p.comp); | ||
| 6931 | res.ty = p.comp.types.size; | ||
| 6932 | } else { | ||
| 6933 | res.val = .{}; | ||
| 6934 | if (res.ty.hasIncompleteSize()) { | ||
| 6935 | try p.errStr(.invalid_sizeof, expected_paren - 1, try p.typeStr(res.ty)); | ||
| 6936 | res.ty = Type.invalid; | ||
| 6937 | } else { | ||
| 6938 | res.ty = p.comp.types.size; | ||
| 6939 | } | ||
| 6940 | } | ||
| 6941 | try res.un(p, .sizeof_expr); | ||
| 6942 | return res; | ||
| 6943 | }, | ||
| 6944 | .keyword_alignof, | ||
| 6945 | .keyword_alignof1, | ||
| 6946 | .keyword_alignof2, | ||
| 6947 | .keyword_c23_alignof, | ||
| 6948 | => { | ||
| 6949 | p.tok_i += 1; | ||
| 6950 | const expected_paren = p.tok_i; | ||
| 6951 | var res = Result{}; | ||
| 6952 | if (try p.typeName()) |ty| { | ||
| 6953 | res.ty = ty; | ||
| 6954 | try p.errTok(.expected_parens_around_typename, expected_paren); | ||
| 6955 | } else if (p.eatToken(.l_paren)) |l_paren| { | ||
| 6956 | if (try p.typeName()) |ty| { | ||
| 6957 | res.ty = ty; | ||
| 6958 | try p.expectClosing(l_paren, .r_paren); | ||
| 6959 | } else { | ||
| 6960 | p.tok_i = expected_paren; | ||
| 6961 | res = try p.parseNoEval(unExpr); | ||
| 6962 | try p.errTok(.alignof_expr, expected_paren); | ||
| 6963 | } | ||
| 6964 | } else { | ||
| 6965 | res = try p.parseNoEval(unExpr); | ||
| 6966 | try p.errTok(.alignof_expr, expected_paren); | ||
| 6967 | } | ||
| 6968 | |||
| 6969 | if (res.ty.is(.void)) { | ||
| 6970 | try p.errStr(.pointer_arith_void, tok, "alignof"); | ||
| 6971 | } | ||
| 6972 | if (res.ty.alignable()) { | ||
| 6973 | res.val = try Value.int(res.ty.alignof(p.comp), p.comp); | ||
| 6974 | res.ty = p.comp.types.size; | ||
| 6975 | } else { | ||
| 6976 | try p.errStr(.invalid_alignof, expected_paren, try p.typeStr(res.ty)); | ||
| 6977 | res.ty = Type.invalid; | ||
| 6978 | } | ||
| 6979 | try res.un(p, .alignof_expr); | ||
| 6980 | return res; | ||
| 6981 | }, | ||
| 6982 | .keyword_extension => { | ||
| 6983 | p.tok_i += 1; | ||
| 6984 | const saved_extension = p.extension_suppressed; | ||
| 6985 | defer p.extension_suppressed = saved_extension; | ||
| 6986 | p.extension_suppressed = true; | ||
| 6987 | |||
| 6988 | var child = try p.castExpr(); | ||
| 6989 | try child.expect(p); | ||
| 6990 | return child; | ||
| 6991 | }, | ||
| 6992 | .keyword_imag1, .keyword_imag2 => { | ||
| 6993 | const imag_tok = p.tok_i; | ||
| 6994 | p.tok_i += 1; | ||
| 6995 | |||
| 6996 | var operand = try p.castExpr(); | ||
| 6997 | try operand.expect(p); | ||
| 6998 | try operand.lvalConversion(p); | ||
| 6999 | if (!operand.ty.isInt() and !operand.ty.isFloat()) { | ||
| 7000 | try p.errStr(.invalid_imag, imag_tok, try p.typeStr(operand.ty)); | ||
| 7001 | } | ||
| 7002 | if (operand.ty.isReal()) { | ||
| 7003 | switch (p.comp.langopts.emulate) { | ||
| 7004 | .msvc => {}, // Doesn't support `_Complex` or `__imag` in the first place | ||
| 7005 | .gcc => operand.val = Value.zero, | ||
| 7006 | .clang => { | ||
| 7007 | if (operand.val.is(.int, p.comp)) { | ||
| 7008 | operand.val = Value.zero; | ||
| 7009 | } else { | ||
| 7010 | operand.val = .{}; | ||
| 7011 | } | ||
| 7012 | }, | ||
| 7013 | } | ||
| 7014 | } | ||
| 7015 | // convert _Complex T to T | ||
| 7016 | operand.ty = operand.ty.makeReal(); | ||
| 7017 | try operand.un(p, .imag_expr); | ||
| 7018 | return operand; | ||
| 7019 | }, | ||
| 7020 | .keyword_real1, .keyword_real2 => { | ||
| 7021 | const real_tok = p.tok_i; | ||
| 7022 | p.tok_i += 1; | ||
| 7023 | |||
| 7024 | var operand = try p.castExpr(); | ||
| 7025 | try operand.expect(p); | ||
| 7026 | try operand.lvalConversion(p); | ||
| 7027 | if (!operand.ty.isInt() and !operand.ty.isFloat()) { | ||
| 7028 | try p.errStr(.invalid_real, real_tok, try p.typeStr(operand.ty)); | ||
| 7029 | } | ||
| 7030 | // convert _Complex T to T | ||
| 7031 | operand.ty = operand.ty.makeReal(); | ||
| 7032 | try operand.un(p, .real_expr); | ||
| 7033 | return operand; | ||
| 7034 | }, | ||
| 7035 | else => { | ||
| 7036 | var lhs = try p.compoundLiteral(); | ||
| 7037 | if (lhs.empty(p)) { | ||
| 7038 | lhs = try p.primaryExpr(); | ||
| 7039 | if (lhs.empty(p)) return lhs; | ||
| 7040 | } | ||
| 7041 | while (true) { | ||
| 7042 | const suffix = try p.suffixExpr(lhs); | ||
| 7043 | if (suffix.empty(p)) break; | ||
| 7044 | lhs = suffix; | ||
| 7045 | } | ||
| 7046 | return lhs; | ||
| 7047 | }, | ||
| 7048 | } | ||
| 7049 | } | ||
| 7050 | |||
| 7051 | /// compoundLiteral | ||
| 7052 | /// : '(' storageClassSpec* type_name ')' '{' initializer_list '}' | ||
| 7053 | /// | '(' storageClassSpec* type_name ')' '{' initializer_list ',' '}' | ||
| 7054 | fn compoundLiteral(p: *Parser) Error!Result { | ||
| 7055 | const l_paren = p.eatToken(.l_paren) orelse return Result{}; | ||
| 7056 | |||
| 7057 | var d: DeclSpec = .{ .ty = .{ .specifier = undefined } }; | ||
| 7058 | const any = if (p.comp.langopts.standard.atLeast(.c23)) | ||
| 7059 | try p.storageClassSpec(&d) | ||
| 7060 | else | ||
| 7061 | false; | ||
| 7062 | |||
| 7063 | const tag: Tree.Tag = switch (d.storage_class) { | ||
| 7064 | .static => if (d.thread_local != null) | ||
| 7065 | .static_thread_local_compound_literal_expr | ||
| 7066 | else | ||
| 7067 | .static_compound_literal_expr, | ||
| 7068 | .register, .none => if (d.thread_local != null) | ||
| 7069 | .thread_local_compound_literal_expr | ||
| 7070 | else | ||
| 7071 | .compound_literal_expr, | ||
| 7072 | .auto, .@"extern", .typedef => |tok| blk: { | ||
| 7073 | try p.errStr(.invalid_compound_literal_storage_class, tok, @tagName(d.storage_class)); | ||
| 7074 | d.storage_class = .none; | ||
| 7075 | break :blk if (d.thread_local != null) | ||
| 7076 | .thread_local_compound_literal_expr | ||
| 7077 | else | ||
| 7078 | .compound_literal_expr; | ||
| 7079 | }, | ||
| 7080 | }; | ||
| 7081 | |||
| 7082 | var ty = (try p.typeName()) orelse { | ||
| 7083 | p.tok_i = l_paren; | ||
| 7084 | if (any) { | ||
| 7085 | try p.err(.expected_type); | ||
| 7086 | return error.ParsingFailed; | ||
| 7087 | } | ||
| 7088 | return Result{}; | ||
| 7089 | }; | ||
| 7090 | if (d.storage_class == .register) ty.qual.register = true; | ||
| 7091 | try p.expectClosing(l_paren, .r_paren); | ||
| 7092 | |||
| 7093 | if (ty.isFunc()) { | ||
| 7094 | try p.err(.func_init); | ||
| 7095 | } else if (ty.is(.variable_len_array)) { | ||
| 7096 | try p.err(.vla_init); | ||
| 7097 | } else if (ty.hasIncompleteSize() and !ty.is(.incomplete_array)) { | ||
| 7098 | try p.errStr(.variable_incomplete_ty, p.tok_i, try p.typeStr(ty)); | ||
| 7099 | return error.ParsingFailed; | ||
| 7100 | } | ||
| 7101 | var init_list_expr = try p.initializer(ty); | ||
| 7102 | if (d.constexpr) |_| { | ||
| 7103 | // TODO error if not constexpr | ||
| 7104 | } | ||
| 7105 | try init_list_expr.un(p, tag); | ||
| 7106 | return init_list_expr; | ||
| 7107 | } | ||
| 7108 | |||
| 7109 | /// suffixExpr | ||
| 7110 | /// : '[' expr ']' | ||
| 7111 | /// | '(' argumentExprList? ')' | ||
| 7112 | /// | '.' IDENTIFIER | ||
| 7113 | /// | '->' IDENTIFIER | ||
| 7114 | /// | '++' | ||
| 7115 | /// | '--' | ||
| 7116 | /// argumentExprList : assignExpr (',' assignExpr)* | ||
| 7117 | fn suffixExpr(p: *Parser, lhs: Result) Error!Result { | ||
| 7118 | assert(!lhs.empty(p)); | ||
| 7119 | switch (p.tok_ids[p.tok_i]) { | ||
| 7120 | .l_paren => return p.callExpr(lhs), | ||
| 7121 | .plus_plus => { | ||
| 7122 | defer p.tok_i += 1; | ||
| 7123 | |||
| 7124 | var operand = lhs; | ||
| 7125 | if (!operand.ty.isScalar()) | ||
| 7126 | try p.errStr(.invalid_argument_un, p.tok_i, try p.typeStr(operand.ty)); | ||
| 7127 | if (operand.ty.isComplex()) | ||
| 7128 | try p.errStr(.complex_prefix_postfix_op, p.tok_i, try p.typeStr(operand.ty)); | ||
| 7129 | |||
| 7130 | if (!p.tmpTree().isLval(operand.node) or operand.ty.isConst()) { | ||
| 7131 | try p.err(.not_assignable); | ||
| 7132 | return error.ParsingFailed; | ||
| 7133 | } | ||
| 7134 | try operand.usualUnaryConversion(p, p.tok_i); | ||
| 7135 | |||
| 7136 | try operand.un(p, .post_inc_expr); | ||
| 7137 | return operand; | ||
| 7138 | }, | ||
| 7139 | .minus_minus => { | ||
| 7140 | defer p.tok_i += 1; | ||
| 7141 | |||
| 7142 | var operand = lhs; | ||
| 7143 | if (!operand.ty.isScalar()) | ||
| 7144 | try p.errStr(.invalid_argument_un, p.tok_i, try p.typeStr(operand.ty)); | ||
| 7145 | if (operand.ty.isComplex()) | ||
| 7146 | try p.errStr(.complex_prefix_postfix_op, p.tok_i, try p.typeStr(operand.ty)); | ||
| 7147 | |||
| 7148 | if (!p.tmpTree().isLval(operand.node) or operand.ty.isConst()) { | ||
| 7149 | try p.err(.not_assignable); | ||
| 7150 | return error.ParsingFailed; | ||
| 7151 | } | ||
| 7152 | try operand.usualUnaryConversion(p, p.tok_i); | ||
| 7153 | |||
| 7154 | try operand.un(p, .post_dec_expr); | ||
| 7155 | return operand; | ||
| 7156 | }, | ||
| 7157 | .l_bracket => { | ||
| 7158 | const l_bracket = p.tok_i; | ||
| 7159 | p.tok_i += 1; | ||
| 7160 | var index = try p.expr(); | ||
| 7161 | try index.expect(p); | ||
| 7162 | try p.expectClosing(l_bracket, .r_bracket); | ||
| 7163 | |||
| 7164 | const array_before_conversion = lhs; | ||
| 7165 | const index_before_conversion = index; | ||
| 7166 | var ptr = lhs; | ||
| 7167 | try ptr.lvalConversion(p); | ||
| 7168 | try index.lvalConversion(p); | ||
| 7169 | if (ptr.ty.isPtr()) { | ||
| 7170 | ptr.ty = ptr.ty.elemType(); | ||
| 7171 | if (!index.ty.isInt()) try p.errTok(.invalid_index, l_bracket); | ||
| 7172 | try p.checkArrayBounds(index_before_conversion, array_before_conversion, l_bracket); | ||
| 7173 | } else if (index.ty.isPtr()) { | ||
| 7174 | index.ty = index.ty.elemType(); | ||
| 7175 | if (!ptr.ty.isInt()) try p.errTok(.invalid_index, l_bracket); | ||
| 7176 | try p.checkArrayBounds(array_before_conversion, index_before_conversion, l_bracket); | ||
| 7177 | std.mem.swap(Result, &ptr, &index); | ||
| 7178 | } else { | ||
| 7179 | try p.errTok(.invalid_subscript, l_bracket); | ||
| 7180 | } | ||
| 7181 | |||
| 7182 | try ptr.saveValue(p); | ||
| 7183 | try index.saveValue(p); | ||
| 7184 | try ptr.bin(p, .array_access_expr, index); | ||
| 7185 | return ptr; | ||
| 7186 | }, | ||
| 7187 | .period => { | ||
| 7188 | p.tok_i += 1; | ||
| 7189 | const name = try p.expectIdentifier(); | ||
| 7190 | return p.fieldAccess(lhs, name, false); | ||
| 7191 | }, | ||
| 7192 | .arrow => { | ||
| 7193 | p.tok_i += 1; | ||
| 7194 | const name = try p.expectIdentifier(); | ||
| 7195 | if (lhs.ty.isArray()) { | ||
| 7196 | var copy = lhs; | ||
| 7197 | copy.ty.decayArray(); | ||
| 7198 | try copy.implicitCast(p, .array_to_pointer); | ||
| 7199 | return p.fieldAccess(copy, name, true); | ||
| 7200 | } | ||
| 7201 | return p.fieldAccess(lhs, name, true); | ||
| 7202 | }, | ||
| 7203 | else => return Result{}, | ||
| 7204 | } | ||
| 7205 | } | ||
| 7206 | |||
| 7207 | fn fieldAccess( | ||
| 7208 | p: *Parser, | ||
| 7209 | lhs: Result, | ||
| 7210 | field_name_tok: TokenIndex, | ||
| 7211 | is_arrow: bool, | ||
| 7212 | ) !Result { | ||
| 7213 | const expr_ty = lhs.ty; | ||
| 7214 | const is_ptr = expr_ty.isPtr(); | ||
| 7215 | const expr_base_ty = if (is_ptr) expr_ty.elemType() else expr_ty; | ||
| 7216 | const record_ty = expr_base_ty.canonicalize(.standard); | ||
| 7217 | |||
| 7218 | switch (record_ty.specifier) { | ||
| 7219 | .@"struct", .@"union" => {}, | ||
| 7220 | else => { | ||
| 7221 | try p.errStr(.expected_record_ty, field_name_tok, try p.typeStr(expr_ty)); | ||
| 7222 | return error.ParsingFailed; | ||
| 7223 | }, | ||
| 7224 | } | ||
| 7225 | if (record_ty.hasIncompleteSize()) { | ||
| 7226 | try p.errStr(.deref_incomplete_ty_ptr, field_name_tok - 2, try p.typeStr(expr_base_ty)); | ||
| 7227 | return error.ParsingFailed; | ||
| 7228 | } | ||
| 7229 | if (is_arrow and !is_ptr) try p.errStr(.member_expr_not_ptr, field_name_tok, try p.typeStr(expr_ty)); | ||
| 7230 | if (!is_arrow and is_ptr) try p.errStr(.member_expr_ptr, field_name_tok, try p.typeStr(expr_ty)); | ||
| 7231 | |||
| 7232 | const field_name = try StrInt.intern(p.comp, p.tokSlice(field_name_tok)); | ||
| 7233 | try p.validateFieldAccess(record_ty, expr_ty, field_name_tok, field_name); | ||
| 7234 | var discard: u64 = 0; | ||
| 7235 | return p.fieldAccessExtra(lhs.node, record_ty, field_name, is_arrow, &discard); | ||
| 7236 | } | ||
| 7237 | |||
| 7238 | fn validateFieldAccess(p: *Parser, record_ty: Type, expr_ty: Type, field_name_tok: TokenIndex, field_name: StringId) Error!void { | ||
| 7239 | if (record_ty.hasField(field_name)) return; | ||
| 7240 | |||
| 7241 | p.strings.items.len = 0; | ||
| 7242 | |||
| 7243 | try p.strings.writer().print("'{s}' in '", .{p.tokSlice(field_name_tok)}); | ||
| 7244 | const mapper = p.comp.string_interner.getSlowTypeMapper(); | ||
| 7245 | try expr_ty.print(mapper, p.comp.langopts, p.strings.writer()); | ||
| 7246 | try p.strings.append('\''); | ||
| 7247 | |||
| 7248 | const duped = try p.comp.diagnostics.arena.allocator().dupe(u8, p.strings.items); | ||
| 7249 | try p.errStr(.no_such_member, field_name_tok, duped); | ||
| 7250 | return error.ParsingFailed; | ||
| 7251 | } | ||
| 7252 | |||
| 7253 | fn fieldAccessExtra(p: *Parser, lhs: NodeIndex, record_ty: Type, field_name: StringId, is_arrow: bool, offset_bits: *u64) Error!Result { | ||
| 7254 | for (record_ty.data.record.fields, 0..) |f, i| { | ||
| 7255 | if (f.isAnonymousRecord()) { | ||
| 7256 | if (!f.ty.hasField(field_name)) continue; | ||
| 7257 | const inner = try p.addNode(.{ | ||
| 7258 | .tag = if (is_arrow) .member_access_ptr_expr else .member_access_expr, | ||
| 7259 | .ty = f.ty, | ||
| 7260 | .data = .{ .member = .{ .lhs = lhs, .index = @intCast(i) } }, | ||
| 7261 | }); | ||
| 7262 | const ret = p.fieldAccessExtra(inner, f.ty, field_name, false, offset_bits); | ||
| 7263 | offset_bits.* = f.layout.offset_bits; | ||
| 7264 | return ret; | ||
| 7265 | } | ||
| 7266 | if (field_name == f.name) { | ||
| 7267 | offset_bits.* = f.layout.offset_bits; | ||
| 7268 | return Result{ | ||
| 7269 | .ty = f.ty, | ||
| 7270 | .node = try p.addNode(.{ | ||
| 7271 | .tag = if (is_arrow) .member_access_ptr_expr else .member_access_expr, | ||
| 7272 | .ty = f.ty, | ||
| 7273 | .data = .{ .member = .{ .lhs = lhs, .index = @intCast(i) } }, | ||
| 7274 | }), | ||
| 7275 | }; | ||
| 7276 | } | ||
| 7277 | } | ||
| 7278 | // We already checked that this container has a field by the name. | ||
| 7279 | unreachable; | ||
| 7280 | } | ||
| 7281 | |||
| 7282 | fn checkVaStartArg(p: *Parser, builtin_tok: TokenIndex, first_after: TokenIndex, param_tok: TokenIndex, arg: *Result, idx: u32) !void { | ||
| 7283 | assert(idx != 0); | ||
| 7284 | if (idx > 1) { | ||
| 7285 | try p.errTok(.closing_paren, first_after); | ||
| 7286 | return error.ParsingFailed; | ||
| 7287 | } | ||
| 7288 | |||
| 7289 | var func_ty = p.func.ty orelse { | ||
| 7290 | try p.errTok(.va_start_not_in_func, builtin_tok); | ||
| 7291 | return; | ||
| 7292 | }; | ||
| 7293 | const func_params = func_ty.params(); | ||
| 7294 | if (func_ty.specifier != .var_args_func or func_params.len == 0) { | ||
| 7295 | return p.errTok(.va_start_fixed_args, builtin_tok); | ||
| 7296 | } | ||
| 7297 | const last_param_name = func_params[func_params.len - 1].name; | ||
| 7298 | const decl_ref = p.getNode(arg.node, .decl_ref_expr); | ||
| 7299 | if (decl_ref == null or last_param_name != try StrInt.intern(p.comp, p.tokSlice(p.nodes.items(.data)[@intFromEnum(decl_ref.?)].decl_ref))) { | ||
| 7300 | try p.errTok(.va_start_not_last_param, param_tok); | ||
| 7301 | } | ||
| 7302 | } | ||
| 7303 | |||
| 7304 | fn checkComplexArg(p: *Parser, builtin_tok: TokenIndex, first_after: TokenIndex, param_tok: TokenIndex, arg: *Result, idx: u32) !void { | ||
| 7305 | _ = builtin_tok; | ||
| 7306 | _ = first_after; | ||
| 7307 | if (idx <= 1 and !arg.ty.isFloat()) { | ||
| 7308 | try p.errStr(.not_floating_type, param_tok, try p.typeStr(arg.ty)); | ||
| 7309 | } else if (idx == 1) { | ||
| 7310 | const prev_idx = p.list_buf.items[p.list_buf.items.len - 1]; | ||
| 7311 | const prev_ty = p.nodes.items(.ty)[@intFromEnum(prev_idx)]; | ||
| 7312 | if (!prev_ty.eql(arg.ty, p.comp, false)) { | ||
| 7313 | try p.errStr(.argument_types_differ, param_tok, try p.typePairStrExtra(prev_ty, " vs ", arg.ty)); | ||
| 7314 | } | ||
| 7315 | } | ||
| 7316 | } | ||
| 7317 | |||
| 7318 | fn callExpr(p: *Parser, lhs: Result) Error!Result { | ||
| 7319 | const l_paren = p.tok_i; | ||
| 7320 | p.tok_i += 1; | ||
| 7321 | const ty = lhs.ty.isCallable() orelse { | ||
| 7322 | try p.errStr(.not_callable, l_paren, try p.typeStr(lhs.ty)); | ||
| 7323 | return error.ParsingFailed; | ||
| 7324 | }; | ||
| 7325 | const params = ty.params(); | ||
| 7326 | var func = lhs; | ||
| 7327 | try func.lvalConversion(p); | ||
| 7328 | |||
| 7329 | const list_buf_top = p.list_buf.items.len; | ||
| 7330 | defer p.list_buf.items.len = list_buf_top; | ||
| 7331 | try p.list_buf.append(func.node); | ||
| 7332 | var arg_count: u32 = 0; | ||
| 7333 | var first_after = l_paren; | ||
| 7334 | |||
| 7335 | const call_expr = CallExpr.init(p, lhs.node, func.node); | ||
| 7336 | |||
| 7337 | while (p.eatToken(.r_paren) == null) { | ||
| 7338 | const param_tok = p.tok_i; | ||
| 7339 | if (arg_count == params.len) first_after = p.tok_i; | ||
| 7340 | var arg = try p.assignExpr(); | ||
| 7341 | try arg.expect(p); | ||
| 7342 | |||
| 7343 | if (call_expr.shouldPerformLvalConversion(arg_count)) { | ||
| 7344 | try arg.lvalConversion(p); | ||
| 7345 | } | ||
| 7346 | if (arg.ty.hasIncompleteSize() and !arg.ty.is(.void)) return error.ParsingFailed; | ||
| 7347 | |||
| 7348 | if (arg_count >= params.len) { | ||
| 7349 | if (call_expr.shouldPromoteVarArg(arg_count)) { | ||
| 7350 | if (arg.ty.isInt()) try arg.intCast(p, arg.ty.integerPromotion(p.comp), param_tok); | ||
| 7351 | if (arg.ty.is(.float)) try arg.floatCast(p, .{ .specifier = .double }); | ||
| 7352 | } | ||
| 7353 | try call_expr.checkVarArg(p, first_after, param_tok, &arg, arg_count); | ||
| 7354 | try arg.saveValue(p); | ||
| 7355 | try p.list_buf.append(arg.node); | ||
| 7356 | arg_count += 1; | ||
| 7357 | |||
| 7358 | _ = p.eatToken(.comma) orelse { | ||
| 7359 | try p.expectClosing(l_paren, .r_paren); | ||
| 7360 | break; | ||
| 7361 | }; | ||
| 7362 | continue; | ||
| 7363 | } | ||
| 7364 | const p_ty = params[arg_count].ty; | ||
| 7365 | if (call_expr.shouldCoerceArg(arg_count)) { | ||
| 7366 | try arg.coerce(p, p_ty, param_tok, .{ .arg = params[arg_count].name_tok }); | ||
| 7367 | } | ||
| 7368 | try arg.saveValue(p); | ||
| 7369 | try p.list_buf.append(arg.node); | ||
| 7370 | arg_count += 1; | ||
| 7371 | |||
| 7372 | _ = p.eatToken(.comma) orelse { | ||
| 7373 | try p.expectClosing(l_paren, .r_paren); | ||
| 7374 | break; | ||
| 7375 | }; | ||
| 7376 | } | ||
| 7377 | |||
| 7378 | const actual: u32 = @intCast(arg_count); | ||
| 7379 | const extra = Diagnostics.Message.Extra{ .arguments = .{ | ||
| 7380 | .expected = @intCast(params.len), | ||
| 7381 | .actual = actual, | ||
| 7382 | } }; | ||
| 7383 | if (call_expr.paramCountOverride()) |expected| { | ||
| 7384 | if (expected != actual) { | ||
| 7385 | try p.errExtra(.expected_arguments, first_after, .{ .arguments = .{ .expected = expected, .actual = actual } }); | ||
| 7386 | } | ||
| 7387 | } else if (ty.is(.func) and params.len != arg_count) { | ||
| 7388 | try p.errExtra(.expected_arguments, first_after, extra); | ||
| 7389 | } else if (ty.is(.old_style_func) and params.len != arg_count) { | ||
| 7390 | if (params.len == 0) | ||
| 7391 | try p.errTok(.passing_args_to_kr, first_after) | ||
| 7392 | else | ||
| 7393 | try p.errExtra(.expected_arguments_old, first_after, extra); | ||
| 7394 | } else if (ty.is(.var_args_func) and arg_count < params.len) { | ||
| 7395 | try p.errExtra(.expected_at_least_arguments, first_after, extra); | ||
| 7396 | } | ||
| 7397 | |||
| 7398 | return call_expr.finish(p, ty, list_buf_top, arg_count); | ||
| 7399 | } | ||
| 7400 | |||
| 7401 | fn checkArrayBounds(p: *Parser, index: Result, array: Result, tok: TokenIndex) !void { | ||
| 7402 | if (index.val.opt_ref == .none) return; | ||
| 7403 | |||
| 7404 | const array_len = array.ty.arrayLen() orelse return; | ||
| 7405 | if (array_len == 0) return; | ||
| 7406 | |||
| 7407 | if (array_len == 1) { | ||
| 7408 | if (p.getNode(array.node, .member_access_expr) orelse p.getNode(array.node, .member_access_ptr_expr)) |node| { | ||
| 7409 | const data = p.nodes.items(.data)[@intFromEnum(node)]; | ||
| 7410 | var lhs = p.nodes.items(.ty)[@intFromEnum(data.member.lhs)]; | ||
| 7411 | if (lhs.get(.pointer)) |ptr| { | ||
| 7412 | lhs = ptr.data.sub_type.*; | ||
| 7413 | } | ||
| 7414 | if (lhs.is(.@"struct")) { | ||
| 7415 | const record = lhs.getRecord().?; | ||
| 7416 | if (data.member.index + 1 == record.fields.len) { | ||
| 7417 | if (!index.val.isZero(p.comp)) { | ||
| 7418 | try p.errStr(.old_style_flexible_struct, tok, try index.str(p)); | ||
| 7419 | } | ||
| 7420 | return; | ||
| 7421 | } | ||
| 7422 | } | ||
| 7423 | } | ||
| 7424 | } | ||
| 7425 | const index_int = index.val.toInt(u64, p.comp) orelse std.math.maxInt(u64); | ||
| 7426 | if (index.ty.isUnsignedInt(p.comp)) { | ||
| 7427 | if (index_int >= array_len) { | ||
| 7428 | try p.errStr(.array_after, tok, try index.str(p)); | ||
| 7429 | } | ||
| 7430 | } else { | ||
| 7431 | if (index.val.compare(.lt, Value.zero, p.comp)) { | ||
| 7432 | try p.errStr(.array_before, tok, try index.str(p)); | ||
| 7433 | } else if (index_int >= array_len) { | ||
| 7434 | try p.errStr(.array_after, tok, try index.str(p)); | ||
| 7435 | } | ||
| 7436 | } | ||
| 7437 | } | ||
| 7438 | |||
| 7439 | /// primaryExpr | ||
| 7440 | /// : IDENTIFIER | ||
| 7441 | /// | keyword_true | ||
| 7442 | /// | keyword_false | ||
| 7443 | /// | keyword_nullptr | ||
| 7444 | /// | INTEGER_LITERAL | ||
| 7445 | /// | FLOAT_LITERAL | ||
| 7446 | /// | IMAGINARY_LITERAL | ||
| 7447 | /// | CHAR_LITERAL | ||
| 7448 | /// | STRING_LITERAL | ||
| 7449 | /// | '(' expr ')' | ||
| 7450 | /// | genericSelection | ||
| 7451 | fn primaryExpr(p: *Parser) Error!Result { | ||
| 7452 | if (p.eatToken(.l_paren)) |l_paren| { | ||
| 7453 | var e = try p.expr(); | ||
| 7454 | try e.expect(p); | ||
| 7455 | try p.expectClosing(l_paren, .r_paren); | ||
| 7456 | try e.un(p, .paren_expr); | ||
| 7457 | return e; | ||
| 7458 | } | ||
| 7459 | switch (p.tok_ids[p.tok_i]) { | ||
| 7460 | .identifier, .extended_identifier => { | ||
| 7461 | const name_tok = p.expectIdentifier() catch unreachable; | ||
| 7462 | const name = p.tokSlice(name_tok); | ||
| 7463 | const interned_name = try StrInt.intern(p.comp, name); | ||
| 7464 | if (p.syms.findSymbol(interned_name)) |sym| { | ||
| 7465 | try p.checkDeprecatedUnavailable(sym.ty, name_tok, sym.tok); | ||
| 7466 | if (sym.kind == .constexpr) { | ||
| 7467 | return Result{ | ||
| 7468 | .val = sym.val, | ||
| 7469 | .ty = sym.ty, | ||
| 7470 | .node = try p.addNode(.{ | ||
| 7471 | .tag = .decl_ref_expr, | ||
| 7472 | .ty = sym.ty, | ||
| 7473 | .data = .{ .decl_ref = name_tok }, | ||
| 7474 | }), | ||
| 7475 | }; | ||
| 7476 | } | ||
| 7477 | if (sym.val.is(.int, p.comp)) { | ||
| 7478 | switch (p.const_decl_folding) { | ||
| 7479 | .gnu_folding_extension => try p.errTok(.const_decl_folded, name_tok), | ||
| 7480 | .gnu_vla_folding_extension => try p.errTok(.const_decl_folded_vla, name_tok), | ||
| 7481 | else => {}, | ||
| 7482 | } | ||
| 7483 | } | ||
| 7484 | return Result{ | ||
| 7485 | .val = if (p.const_decl_folding == .no_const_decl_folding and sym.kind != .enumeration) Value{} else sym.val, | ||
| 7486 | .ty = sym.ty, | ||
| 7487 | .node = try p.addNode(.{ | ||
| 7488 | .tag = if (sym.kind == .enumeration) .enumeration_ref else .decl_ref_expr, | ||
| 7489 | .ty = sym.ty, | ||
| 7490 | .data = .{ .decl_ref = name_tok }, | ||
| 7491 | }), | ||
| 7492 | }; | ||
| 7493 | } | ||
| 7494 | if (try p.comp.builtins.getOrCreate(p.comp, name, p.arena)) |some| { | ||
| 7495 | for (p.tok_ids[p.tok_i..]) |id| switch (id) { | ||
| 7496 | .r_paren => {}, // closing grouped expr | ||
| 7497 | .l_paren => break, // beginning of a call | ||
| 7498 | else => { | ||
| 7499 | try p.errTok(.builtin_must_be_called, name_tok); | ||
| 7500 | return error.ParsingFailed; | ||
| 7501 | }, | ||
| 7502 | }; | ||
| 7503 | if (some.builtin.properties.header != .none) { | ||
| 7504 | try p.errStr(.implicit_builtin, name_tok, name); | ||
| 7505 | try p.errExtra(.implicit_builtin_header_note, name_tok, .{ .builtin_with_header = .{ | ||
| 7506 | .builtin = some.builtin.tag, | ||
| 7507 | .header = some.builtin.properties.header, | ||
| 7508 | } }); | ||
| 7509 | } | ||
| 7510 | |||
| 7511 | return Result{ | ||
| 7512 | .ty = some.ty, | ||
| 7513 | .node = try p.addNode(.{ | ||
| 7514 | .tag = .builtin_call_expr_one, | ||
| 7515 | .ty = some.ty, | ||
| 7516 | .data = .{ .decl = .{ .name = name_tok, .node = .none } }, | ||
| 7517 | }), | ||
| 7518 | }; | ||
| 7519 | } | ||
| 7520 | if (p.tok_ids[p.tok_i] == .l_paren and !p.comp.langopts.standard.atLeast(.c23)) { | ||
| 7521 | // allow implicitly declaring functions before C99 like `puts("foo")` | ||
| 7522 | if (mem.startsWith(u8, name, "__builtin_")) | ||
| 7523 | try p.errStr(.unknown_builtin, name_tok, name) | ||
| 7524 | else | ||
| 7525 | try p.errStr(.implicit_func_decl, name_tok, name); | ||
| 7526 | |||
| 7527 | const func_ty = try p.arena.create(Type.Func); | ||
| 7528 | func_ty.* = .{ .return_type = .{ .specifier = .int }, .params = &.{} }; | ||
| 7529 | const ty: Type = .{ .specifier = .old_style_func, .data = .{ .func = func_ty } }; | ||
| 7530 | const node = try p.addNode(.{ | ||
| 7531 | .ty = ty, | ||
| 7532 | .tag = .fn_proto, | ||
| 7533 | .data = .{ .decl = .{ .name = name_tok } }, | ||
| 7534 | }); | ||
| 7535 | |||
| 7536 | try p.decl_buf.append(node); | ||
| 7537 | try p.syms.declareSymbol(p, interned_name, ty, name_tok, node); | ||
| 7538 | |||
| 7539 | return Result{ | ||
| 7540 | .ty = ty, | ||
| 7541 | .node = try p.addNode(.{ | ||
| 7542 | .tag = .decl_ref_expr, | ||
| 7543 | .ty = ty, | ||
| 7544 | .data = .{ .decl_ref = name_tok }, | ||
| 7545 | }), | ||
| 7546 | }; | ||
| 7547 | } | ||
| 7548 | try p.errStr(.undeclared_identifier, name_tok, p.tokSlice(name_tok)); | ||
| 7549 | return error.ParsingFailed; | ||
| 7550 | }, | ||
| 7551 | .keyword_true, .keyword_false => |id| { | ||
| 7552 | p.tok_i += 1; | ||
| 7553 | const res = Result{ | ||
| 7554 | .val = Value.fromBool(id == .keyword_true), | ||
| 7555 | .ty = .{ .specifier = .bool }, | ||
| 7556 | .node = try p.addNode(.{ .tag = .bool_literal, .ty = .{ .specifier = .bool }, .data = undefined }), | ||
| 7557 | }; | ||
| 7558 | std.debug.assert(!p.in_macro); // Should have been replaced with .one / .zero | ||
| 7559 | try p.value_map.put(res.node, res.val); | ||
| 7560 | return res; | ||
| 7561 | }, | ||
| 7562 | .keyword_nullptr => { | ||
| 7563 | defer p.tok_i += 1; | ||
| 7564 | try p.errStr(.pre_c23_compat, p.tok_i, "'nullptr'"); | ||
| 7565 | return Result{ | ||
| 7566 | .val = Value.null, | ||
| 7567 | .ty = .{ .specifier = .nullptr_t }, | ||
| 7568 | .node = try p.addNode(.{ | ||
| 7569 | .tag = .nullptr_literal, | ||
| 7570 | .ty = .{ .specifier = .nullptr_t }, | ||
| 7571 | .data = undefined, | ||
| 7572 | }), | ||
| 7573 | }; | ||
| 7574 | }, | ||
| 7575 | .macro_func, .macro_function => { | ||
| 7576 | defer p.tok_i += 1; | ||
| 7577 | var ty: Type = undefined; | ||
| 7578 | var tok = p.tok_i; | ||
| 7579 | if (p.func.ident) |some| { | ||
| 7580 | ty = some.ty; | ||
| 7581 | tok = p.nodes.items(.data)[@intFromEnum(some.node)].decl.name; | ||
| 7582 | } else if (p.func.ty) |_| { | ||
| 7583 | const strings_top = p.strings.items.len; | ||
| 7584 | defer p.strings.items.len = strings_top; | ||
| 7585 | |||
| 7586 | try p.strings.appendSlice(p.tokSlice(p.func.name)); | ||
| 7587 | try p.strings.append(0); | ||
| 7588 | const predef = try p.makePredefinedIdentifier(strings_top); | ||
| 7589 | ty = predef.ty; | ||
| 7590 | p.func.ident = predef; | ||
| 7591 | } else { | ||
| 7592 | const strings_top = p.strings.items.len; | ||
| 7593 | defer p.strings.items.len = strings_top; | ||
| 7594 | |||
| 7595 | try p.strings.append(0); | ||
| 7596 | const predef = try p.makePredefinedIdentifier(strings_top); | ||
| 7597 | ty = predef.ty; | ||
| 7598 | p.func.ident = predef; | ||
| 7599 | try p.decl_buf.append(predef.node); | ||
| 7600 | } | ||
| 7601 | if (p.func.ty == null) try p.err(.predefined_top_level); | ||
| 7602 | return Result{ | ||
| 7603 | .ty = ty, | ||
| 7604 | .node = try p.addNode(.{ | ||
| 7605 | .tag = .decl_ref_expr, | ||
| 7606 | .ty = ty, | ||
| 7607 | .data = .{ .decl_ref = tok }, | ||
| 7608 | }), | ||
| 7609 | }; | ||
| 7610 | }, | ||
| 7611 | .macro_pretty_func => { | ||
| 7612 | defer p.tok_i += 1; | ||
| 7613 | var ty: Type = undefined; | ||
| 7614 | if (p.func.pretty_ident) |some| { | ||
| 7615 | ty = some.ty; | ||
| 7616 | } else if (p.func.ty) |func_ty| { | ||
| 7617 | const strings_top = p.strings.items.len; | ||
| 7618 | defer p.strings.items.len = strings_top; | ||
| 7619 | |||
| 7620 | const mapper = p.comp.string_interner.getSlowTypeMapper(); | ||
| 7621 | try Type.printNamed(func_ty, p.tokSlice(p.func.name), mapper, p.comp.langopts, p.strings.writer()); | ||
| 7622 | try p.strings.append(0); | ||
| 7623 | const predef = try p.makePredefinedIdentifier(strings_top); | ||
| 7624 | ty = predef.ty; | ||
| 7625 | p.func.pretty_ident = predef; | ||
| 7626 | } else { | ||
| 7627 | const strings_top = p.strings.items.len; | ||
| 7628 | defer p.strings.items.len = strings_top; | ||
| 7629 | |||
| 7630 | try p.strings.appendSlice("top level\x00"); | ||
| 7631 | const predef = try p.makePredefinedIdentifier(strings_top); | ||
| 7632 | ty = predef.ty; | ||
| 7633 | p.func.pretty_ident = predef; | ||
| 7634 | try p.decl_buf.append(predef.node); | ||
| 7635 | } | ||
| 7636 | if (p.func.ty == null) try p.err(.predefined_top_level); | ||
| 7637 | return Result{ | ||
| 7638 | .ty = ty, | ||
| 7639 | .node = try p.addNode(.{ | ||
| 7640 | .tag = .decl_ref_expr, | ||
| 7641 | .ty = ty, | ||
| 7642 | .data = .{ .decl_ref = p.tok_i }, | ||
| 7643 | }), | ||
| 7644 | }; | ||
| 7645 | }, | ||
| 7646 | .string_literal, | ||
| 7647 | .string_literal_utf_16, | ||
| 7648 | .string_literal_utf_8, | ||
| 7649 | .string_literal_utf_32, | ||
| 7650 | .string_literal_wide, | ||
| 7651 | .unterminated_string_literal, | ||
| 7652 | => return p.stringLiteral(), | ||
| 7653 | .char_literal, | ||
| 7654 | .char_literal_utf_8, | ||
| 7655 | .char_literal_utf_16, | ||
| 7656 | .char_literal_utf_32, | ||
| 7657 | .char_literal_wide, | ||
| 7658 | .empty_char_literal, | ||
| 7659 | .unterminated_char_literal, | ||
| 7660 | => return p.charLiteral(), | ||
| 7661 | .zero => { | ||
| 7662 | p.tok_i += 1; | ||
| 7663 | var res: Result = .{ .val = Value.zero, .ty = if (p.in_macro) p.comp.types.intmax else Type.int }; | ||
| 7664 | res.node = try p.addNode(.{ .tag = .int_literal, .ty = res.ty, .data = undefined }); | ||
| 7665 | if (!p.in_macro) try p.value_map.put(res.node, res.val); | ||
| 7666 | return res; | ||
| 7667 | }, | ||
| 7668 | .one => { | ||
| 7669 | p.tok_i += 1; | ||
| 7670 | var res: Result = .{ .val = Value.one, .ty = if (p.in_macro) p.comp.types.intmax else Type.int }; | ||
| 7671 | res.node = try p.addNode(.{ .tag = .int_literal, .ty = res.ty, .data = undefined }); | ||
| 7672 | if (!p.in_macro) try p.value_map.put(res.node, res.val); | ||
| 7673 | return res; | ||
| 7674 | }, | ||
| 7675 | .pp_num => return p.ppNum(), | ||
| 7676 | .embed_byte => { | ||
| 7677 | assert(!p.in_macro); | ||
| 7678 | const loc = p.pp.tokens.items(.loc)[p.tok_i]; | ||
| 7679 | p.tok_i += 1; | ||
| 7680 | const buf = p.comp.getSource(.generated).buf[loc.byte_offset..]; | ||
| 7681 | var byte: u8 = buf[0] - '0'; | ||
| 7682 | for (buf[1..]) |c| { | ||
| 7683 | if (!std.ascii.isDigit(c)) break; | ||
| 7684 | byte *= 10; | ||
| 7685 | byte += c - '0'; | ||
| 7686 | } | ||
| 7687 | var res: Result = .{ .val = try Value.int(byte, p.comp) }; | ||
| 7688 | res.node = try p.addNode(.{ .tag = .int_literal, .ty = res.ty, .data = undefined }); | ||
| 7689 | try p.value_map.put(res.node, res.val); | ||
| 7690 | return res; | ||
| 7691 | }, | ||
| 7692 | .keyword_generic => return p.genericSelection(), | ||
| 7693 | else => return Result{}, | ||
| 7694 | } | ||
| 7695 | } | ||
| 7696 | |||
| 7697 | fn makePredefinedIdentifier(p: *Parser, strings_top: usize) !Result { | ||
| 7698 | const end: u32 = @intCast(p.strings.items.len); | ||
| 7699 | const elem_ty = .{ .specifier = .char, .qual = .{ .@"const" = true } }; | ||
| 7700 | const arr_ty = try p.arena.create(Type.Array); | ||
| 7701 | arr_ty.* = .{ .elem = elem_ty, .len = end - strings_top }; | ||
| 7702 | const ty: Type = .{ .specifier = .array, .data = .{ .array = arr_ty } }; | ||
| 7703 | |||
| 7704 | const slice = p.strings.items[strings_top..]; | ||
| 7705 | const val = try Value.intern(p.comp, .{ .bytes = slice }); | ||
| 7706 | |||
| 7707 | const str_lit = try p.addNode(.{ .tag = .string_literal_expr, .ty = ty, .data = undefined }); | ||
| 7708 | if (!p.in_macro) try p.value_map.put(str_lit, val); | ||
| 7709 | |||
| 7710 | return Result{ .ty = ty, .node = try p.addNode(.{ | ||
| 7711 | .tag = .implicit_static_var, | ||
| 7712 | .ty = ty, | ||
| 7713 | .data = .{ .decl = .{ .name = p.tok_i, .node = str_lit } }, | ||
| 7714 | }) }; | ||
| 7715 | } | ||
| 7716 | |||
| 7717 | fn stringLiteral(p: *Parser) Error!Result { | ||
| 7718 | var string_end = p.tok_i; | ||
| 7719 | var string_kind: text_literal.Kind = .char; | ||
| 7720 | while (text_literal.Kind.classify(p.tok_ids[string_end], .string_literal)) |next| : (string_end += 1) { | ||
| 7721 | string_kind = string_kind.concat(next) catch { | ||
| 7722 | try p.errTok(.unsupported_str_cat, string_end); | ||
| 7723 | while (p.tok_ids[p.tok_i].isStringLiteral()) : (p.tok_i += 1) {} | ||
| 7724 | return error.ParsingFailed; | ||
| 7725 | }; | ||
| 7726 | if (string_kind == .unterminated) { | ||
| 7727 | try p.errTok(.unterminated_string_literal_error, string_end); | ||
| 7728 | p.tok_i = string_end + 1; | ||
| 7729 | return error.ParsingFailed; | ||
| 7730 | } | ||
| 7731 | } | ||
| 7732 | assert(string_end > p.tok_i); | ||
| 7733 | |||
| 7734 | const char_width = string_kind.charUnitSize(p.comp); | ||
| 7735 | |||
| 7736 | const strings_top = p.strings.items.len; | ||
| 7737 | defer p.strings.items.len = strings_top; | ||
| 7738 | |||
| 7739 | while (p.tok_i < string_end) : (p.tok_i += 1) { | ||
| 7740 | const this_kind = text_literal.Kind.classify(p.tok_ids[p.tok_i], .string_literal).?; | ||
| 7741 | const slice = this_kind.contentSlice(p.tokSlice(p.tok_i)); | ||
| 7742 | var char_literal_parser = text_literal.Parser.init(slice, this_kind, 0x10ffff, p.comp); | ||
| 7743 | |||
| 7744 | try p.strings.ensureUnusedCapacity((slice.len + 1) * @intFromEnum(char_width)); // +1 for null terminator | ||
| 7745 | while (char_literal_parser.next()) |item| switch (item) { | ||
| 7746 | .value => |v| { | ||
| 7747 | switch (char_width) { | ||
| 7748 | .@"1" => p.strings.appendAssumeCapacity(@intCast(v)), | ||
| 7749 | .@"2" => { | ||
| 7750 | const word: u16 = @intCast(v); | ||
| 7751 | p.strings.appendSliceAssumeCapacity(mem.asBytes(&word)); | ||
| 7752 | }, | ||
| 7753 | .@"4" => p.strings.appendSliceAssumeCapacity(mem.asBytes(&v)), | ||
| 7754 | } | ||
| 7755 | }, | ||
| 7756 | .codepoint => |c| { | ||
| 7757 | switch (char_width) { | ||
| 7758 | .@"1" => { | ||
| 7759 | var buf: [4]u8 = undefined; | ||
| 7760 | const written = std.unicode.utf8Encode(c, &buf) catch unreachable; | ||
| 7761 | const encoded = buf[0..written]; | ||
| 7762 | p.strings.appendSliceAssumeCapacity(encoded); | ||
| 7763 | }, | ||
| 7764 | .@"2" => { | ||
| 7765 | var utf16_buf: [2]u16 = undefined; | ||
| 7766 | var utf8_buf: [4]u8 = undefined; | ||
| 7767 | const utf8_written = std.unicode.utf8Encode(c, &utf8_buf) catch unreachable; | ||
| 7768 | const utf16_written = std.unicode.utf8ToUtf16Le(&utf16_buf, utf8_buf[0..utf8_written]) catch unreachable; | ||
| 7769 | const bytes = std.mem.sliceAsBytes(utf16_buf[0..utf16_written]); | ||
| 7770 | p.strings.appendSliceAssumeCapacity(bytes); | ||
| 7771 | }, | ||
| 7772 | .@"4" => { | ||
| 7773 | const val: u32 = c; | ||
| 7774 | p.strings.appendSliceAssumeCapacity(mem.asBytes(&val)); | ||
| 7775 | }, | ||
| 7776 | } | ||
| 7777 | }, | ||
| 7778 | .improperly_encoded => |bytes| p.strings.appendSliceAssumeCapacity(bytes), | ||
| 7779 | .utf8_text => |view| { | ||
| 7780 | switch (char_width) { | ||
| 7781 | .@"1" => p.strings.appendSliceAssumeCapacity(view.bytes), | ||
| 7782 | .@"2" => { | ||
| 7783 | const capacity_slice: []align(@alignOf(u16)) u8 = @alignCast(p.strings.unusedCapacitySlice()); | ||
| 7784 | const dest_len = std.mem.alignBackward(usize, capacity_slice.len, 2); | ||
| 7785 | const dest = std.mem.bytesAsSlice(u16, capacity_slice[0..dest_len]); | ||
| 7786 | const words_written = std.unicode.utf8ToUtf16Le(dest, view.bytes) catch unreachable; | ||
| 7787 | p.strings.resize(p.strings.items.len + words_written * 2) catch unreachable; | ||
| 7788 | }, | ||
| 7789 | .@"4" => { | ||
| 7790 | var it = view.iterator(); | ||
| 7791 | while (it.nextCodepoint()) |codepoint| { | ||
| 7792 | const val: u32 = codepoint; | ||
| 7793 | p.strings.appendSliceAssumeCapacity(mem.asBytes(&val)); | ||
| 7794 | } | ||
| 7795 | }, | ||
| 7796 | } | ||
| 7797 | }, | ||
| 7798 | }; | ||
| 7799 | for (char_literal_parser.errors.constSlice()) |item| { | ||
| 7800 | try p.errExtra(item.tag, p.tok_i, item.extra); | ||
| 7801 | } | ||
| 7802 | } | ||
| 7803 | p.strings.appendNTimesAssumeCapacity(0, @intFromEnum(char_width)); | ||
| 7804 | const slice = p.strings.items[strings_top..]; | ||
| 7805 | |||
| 7806 | // TODO this won't do anything if there is a cache hit | ||
| 7807 | const interned_align = mem.alignForward( | ||
| 7808 | usize, | ||
| 7809 | p.comp.interner.strings.items.len, | ||
| 7810 | string_kind.internalStorageAlignment(p.comp), | ||
| 7811 | ); | ||
| 7812 | try p.comp.interner.strings.resize(p.gpa, interned_align); | ||
| 7813 | |||
| 7814 | const val = try Value.intern(p.comp, .{ .bytes = slice }); | ||
| 7815 | |||
| 7816 | const arr_ty = try p.arena.create(Type.Array); | ||
| 7817 | arr_ty.* = .{ .elem = string_kind.elementType(p.comp), .len = @divExact(slice.len, @intFromEnum(char_width)) }; | ||
| 7818 | var res: Result = .{ | ||
| 7819 | .ty = .{ | ||
| 7820 | .specifier = .array, | ||
| 7821 | .data = .{ .array = arr_ty }, | ||
| 7822 | }, | ||
| 7823 | .val = val, | ||
| 7824 | }; | ||
| 7825 | res.node = try p.addNode(.{ .tag = .string_literal_expr, .ty = res.ty, .data = undefined }); | ||
| 7826 | if (!p.in_macro) try p.value_map.put(res.node, res.val); | ||
| 7827 | return res; | ||
| 7828 | } | ||
| 7829 | |||
| 7830 | fn charLiteral(p: *Parser) Error!Result { | ||
| 7831 | defer p.tok_i += 1; | ||
| 7832 | const tok_id = p.tok_ids[p.tok_i]; | ||
| 7833 | const char_kind = text_literal.Kind.classify(tok_id, .char_literal) orelse { | ||
| 7834 | if (tok_id == .empty_char_literal) { | ||
| 7835 | try p.err(.empty_char_literal_error); | ||
| 7836 | } else if (tok_id == .unterminated_char_literal) { | ||
| 7837 | try p.err(.unterminated_char_literal_error); | ||
| 7838 | } else unreachable; | ||
| 7839 | return .{ | ||
| 7840 | .ty = Type.int, | ||
| 7841 | .val = Value.zero, | ||
| 7842 | .node = try p.addNode(.{ .tag = .char_literal, .ty = Type.int, .data = undefined }), | ||
| 7843 | }; | ||
| 7844 | }; | ||
| 7845 | if (char_kind == .utf_8) try p.err(.u8_char_lit); | ||
| 7846 | var val: u32 = 0; | ||
| 7847 | |||
| 7848 | const slice = char_kind.contentSlice(p.tokSlice(p.tok_i)); | ||
| 7849 | |||
| 7850 | if (slice.len == 1 and std.ascii.isASCII(slice[0])) { | ||
| 7851 | // fast path: single unescaped ASCII char | ||
| 7852 | val = slice[0]; | ||
| 7853 | } else { | ||
| 7854 | const max_codepoint = char_kind.maxCodepoint(p.comp); | ||
| 7855 | var char_literal_parser = text_literal.Parser.init(slice, char_kind, max_codepoint, p.comp); | ||
| 7856 | |||
| 7857 | const max_chars_expected = 4; | ||
| 7858 | var stack_fallback = std.heap.stackFallback(max_chars_expected * @sizeOf(u32), p.comp.gpa); | ||
| 7859 | var chars = std.ArrayList(u32).initCapacity(stack_fallback.get(), max_chars_expected) catch unreachable; // stack allocation already succeeded | ||
| 7860 | defer chars.deinit(); | ||
| 7861 | |||
| 7862 | while (char_literal_parser.next()) |item| switch (item) { | ||
| 7863 | .value => |v| try chars.append(v), | ||
| 7864 | .codepoint => |c| try chars.append(c), | ||
| 7865 | .improperly_encoded => |s| { | ||
| 7866 | try chars.ensureUnusedCapacity(s.len); | ||
| 7867 | for (s) |c| chars.appendAssumeCapacity(c); | ||
| 7868 | }, | ||
| 7869 | .utf8_text => |view| { | ||
| 7870 | var it = view.iterator(); | ||
| 7871 | var max_codepoint_seen: u21 = 0; | ||
| 7872 | try chars.ensureUnusedCapacity(view.bytes.len); | ||
| 7873 | while (it.nextCodepoint()) |c| { | ||
| 7874 | max_codepoint_seen = @max(max_codepoint_seen, c); | ||
| 7875 | chars.appendAssumeCapacity(c); | ||
| 7876 | } | ||
| 7877 | if (max_codepoint_seen > max_codepoint) { | ||
| 7878 | char_literal_parser.err(.char_too_large, .{ .none = {} }); | ||
| 7879 | } | ||
| 7880 | }, | ||
| 7881 | }; | ||
| 7882 | |||
| 7883 | const is_multichar = chars.items.len > 1; | ||
| 7884 | if (is_multichar) { | ||
| 7885 | if (char_kind == .char and chars.items.len == 4) { | ||
| 7886 | char_literal_parser.warn(.four_char_char_literal, .{ .none = {} }); | ||
| 7887 | } else if (char_kind == .char) { | ||
| 7888 | char_literal_parser.warn(.multichar_literal_warning, .{ .none = {} }); | ||
| 7889 | } else { | ||
| 7890 | const kind = switch (char_kind) { | ||
| 7891 | .wide => "wide", | ||
| 7892 | .utf_8, .utf_16, .utf_32 => "Unicode", | ||
| 7893 | else => unreachable, | ||
| 7894 | }; | ||
| 7895 | char_literal_parser.err(.invalid_multichar_literal, .{ .str = kind }); | ||
| 7896 | } | ||
| 7897 | } | ||
| 7898 | |||
| 7899 | var multichar_overflow = false; | ||
| 7900 | if (char_kind == .char and is_multichar) { | ||
| 7901 | for (chars.items) |item| { | ||
| 7902 | val, const overflowed = @shlWithOverflow(val, 8); | ||
| 7903 | multichar_overflow = multichar_overflow or overflowed != 0; | ||
| 7904 | val += @as(u8, @truncate(item)); | ||
| 7905 | } | ||
| 7906 | } else if (chars.items.len > 0) { | ||
| 7907 | val = chars.items[chars.items.len - 1]; | ||
| 7908 | } | ||
| 7909 | |||
| 7910 | if (multichar_overflow) { | ||
| 7911 | char_literal_parser.err(.char_lit_too_wide, .{ .none = {} }); | ||
| 7912 | } | ||
| 7913 | |||
| 7914 | for (char_literal_parser.errors.constSlice()) |item| { | ||
| 7915 | try p.errExtra(item.tag, p.tok_i, item.extra); | ||
| 7916 | } | ||
| 7917 | } | ||
| 7918 | |||
| 7919 | const ty = char_kind.charLiteralType(p.comp); | ||
| 7920 | // This is the type the literal will have if we're in a macro; macros always operate on intmax_t/uintmax_t values | ||
| 7921 | const macro_ty = if (ty.isUnsignedInt(p.comp) or (char_kind == .char and p.comp.getCharSignedness() == .unsigned)) | ||
| 7922 | p.comp.types.intmax.makeIntegerUnsigned() | ||
| 7923 | else | ||
| 7924 | p.comp.types.intmax; | ||
| 7925 | |||
| 7926 | const res = Result{ | ||
| 7927 | .ty = if (p.in_macro) macro_ty else ty, | ||
| 7928 | .val = try Value.int(val, p.comp), | ||
| 7929 | .node = try p.addNode(.{ .tag = .char_literal, .ty = ty, .data = undefined }), | ||
| 7930 | }; | ||
| 7931 | if (!p.in_macro) try p.value_map.put(res.node, res.val); | ||
| 7932 | return res; | ||
| 7933 | } | ||
| 7934 | |||
| 7935 | fn parseFloat(p: *Parser, buf: []const u8, suffix: NumberSuffix) !Result { | ||
| 7936 | const ty = Type{ .specifier = switch (suffix) { | ||
| 7937 | .None, .I => .double, | ||
| 7938 | .F, .IF => .float, | ||
| 7939 | .F16 => .float16, | ||
| 7940 | .L, .IL => .long_double, | ||
| 7941 | else => unreachable, | ||
| 7942 | } }; | ||
| 7943 | const val = try Value.intern(p.comp, key: { | ||
| 7944 | try p.strings.ensureUnusedCapacity(buf.len); | ||
| 7945 | |||
| 7946 | const strings_top = p.strings.items.len; | ||
| 7947 | defer p.strings.items.len = strings_top; | ||
| 7948 | for (buf) |c| { | ||
| 7949 | if (c != '_') p.strings.appendAssumeCapacity(c); | ||
| 7950 | } | ||
| 7951 | |||
| 7952 | const float = std.fmt.parseFloat(f128, p.strings.items[strings_top..]) catch unreachable; | ||
| 7953 | const bits = ty.bitSizeof(p.comp).?; | ||
| 7954 | break :key switch (bits) { | ||
| 7955 | 16 => .{ .float = .{ .f16 = @floatCast(float) } }, | ||
| 7956 | 32 => .{ .float = .{ .f32 = @floatCast(float) } }, | ||
| 7957 | 64 => .{ .float = .{ .f64 = @floatCast(float) } }, | ||
| 7958 | 80 => .{ .float = .{ .f80 = @floatCast(float) } }, | ||
| 7959 | 128 => .{ .float = .{ .f128 = @floatCast(float) } }, | ||
| 7960 | else => unreachable, | ||
| 7961 | }; | ||
| 7962 | }); | ||
| 7963 | var res = Result{ | ||
| 7964 | .ty = ty, | ||
| 7965 | .node = try p.addNode(.{ .tag = .float_literal, .ty = ty, .data = undefined }), | ||
| 7966 | .val = val, | ||
| 7967 | }; | ||
| 7968 | if (suffix.isImaginary()) { | ||
| 7969 | try p.err(.gnu_imaginary_constant); | ||
| 7970 | res.ty = .{ .specifier = switch (suffix) { | ||
| 7971 | .I => .complex_double, | ||
| 7972 | .IF => .complex_float, | ||
| 7973 | .IL => .complex_long_double, | ||
| 7974 | else => unreachable, | ||
| 7975 | } }; | ||
| 7976 | res.val = .{}; // TODO add complex values | ||
| 7977 | try res.un(p, .imaginary_literal); | ||
| 7978 | } | ||
| 7979 | return res; | ||
| 7980 | } | ||
| 7981 | |||
| 7982 | fn getIntegerPart(p: *Parser, buf: []const u8, prefix: NumberPrefix, tok_i: TokenIndex) ![]const u8 { | ||
| 7983 | if (buf[0] == '.') return ""; | ||
| 7984 | |||
| 7985 | if (!prefix.digitAllowed(buf[0])) { | ||
| 7986 | switch (prefix) { | ||
| 7987 | .binary => try p.errExtra(.invalid_binary_digit, tok_i, .{ .ascii = @intCast(buf[0]) }), | ||
| 7988 | .octal => try p.errExtra(.invalid_octal_digit, tok_i, .{ .ascii = @intCast(buf[0]) }), | ||
| 7989 | .hex => try p.errStr(.invalid_int_suffix, tok_i, buf), | ||
| 7990 | .decimal => unreachable, | ||
| 7991 | } | ||
| 7992 | return error.ParsingFailed; | ||
| 7993 | } | ||
| 7994 | |||
| 7995 | for (buf, 0..) |c, idx| { | ||
| 7996 | if (idx == 0) continue; | ||
| 7997 | switch (c) { | ||
| 7998 | '.' => return buf[0..idx], | ||
| 7999 | 'p', 'P' => return if (prefix == .hex) buf[0..idx] else { | ||
| 8000 | try p.errStr(.invalid_int_suffix, tok_i, buf[idx..]); | ||
| 8001 | return error.ParsingFailed; | ||
| 8002 | }, | ||
| 8003 | 'e', 'E' => { | ||
| 8004 | switch (prefix) { | ||
| 8005 | .hex => continue, | ||
| 8006 | .decimal => return buf[0..idx], | ||
| 8007 | .binary => try p.errExtra(.invalid_binary_digit, tok_i, .{ .ascii = @intCast(c) }), | ||
| 8008 | .octal => try p.errExtra(.invalid_octal_digit, tok_i, .{ .ascii = @intCast(c) }), | ||
| 8009 | } | ||
| 8010 | return error.ParsingFailed; | ||
| 8011 | }, | ||
| 8012 | '0'...'9', 'a'...'d', 'A'...'D', 'f', 'F' => { | ||
| 8013 | if (!prefix.digitAllowed(c)) { | ||
| 8014 | switch (prefix) { | ||
| 8015 | .binary => try p.errExtra(.invalid_binary_digit, tok_i, .{ .ascii = @intCast(c) }), | ||
| 8016 | .octal => try p.errExtra(.invalid_octal_digit, tok_i, .{ .ascii = @intCast(c) }), | ||
| 8017 | .decimal, .hex => try p.errStr(.invalid_int_suffix, tok_i, buf[idx..]), | ||
| 8018 | } | ||
| 8019 | return error.ParsingFailed; | ||
| 8020 | } | ||
| 8021 | }, | ||
| 8022 | '\'' => {}, | ||
| 8023 | else => return buf[0..idx], | ||
| 8024 | } | ||
| 8025 | } | ||
| 8026 | return buf; | ||
| 8027 | } | ||
| 8028 | |||
| 8029 | fn fixedSizeInt(p: *Parser, base: u8, buf: []const u8, suffix: NumberSuffix, tok_i: TokenIndex) !Result { | ||
| 8030 | var val: u64 = 0; | ||
| 8031 | var overflow = false; | ||
| 8032 | for (buf) |c| { | ||
| 8033 | const digit: u64 = switch (c) { | ||
| 8034 | '0'...'9' => c - '0', | ||
| 8035 | 'A'...'Z' => c - 'A' + 10, | ||
| 8036 | 'a'...'z' => c - 'a' + 10, | ||
| 8037 | '\'' => continue, | ||
| 8038 | else => unreachable, | ||
| 8039 | }; | ||
| 8040 | |||
| 8041 | if (val != 0) { | ||
| 8042 | const product, const overflowed = @mulWithOverflow(val, base); | ||
| 8043 | if (overflowed != 0) { | ||
| 8044 | overflow = true; | ||
| 8045 | } | ||
| 8046 | val = product; | ||
| 8047 | } | ||
| 8048 | const sum, const overflowed = @addWithOverflow(val, digit); | ||
| 8049 | if (overflowed != 0) overflow = true; | ||
| 8050 | val = sum; | ||
| 8051 | } | ||
| 8052 | var res: Result = .{ .val = try Value.int(val, p.comp) }; | ||
| 8053 | if (overflow) { | ||
| 8054 | try p.errTok(.int_literal_too_big, tok_i); | ||
| 8055 | res.ty = .{ .specifier = .ulong_long }; | ||
| 8056 | res.node = try p.addNode(.{ .tag = .int_literal, .ty = res.ty, .data = undefined }); | ||
| 8057 | if (!p.in_macro) try p.value_map.put(res.node, res.val); | ||
| 8058 | return res; | ||
| 8059 | } | ||
| 8060 | if (suffix.isSignedInteger()) { | ||
| 8061 | if (val > p.comp.types.intmax.maxInt(p.comp)) { | ||
| 8062 | try p.errTok(.implicitly_unsigned_literal, tok_i); | ||
| 8063 | } | ||
| 8064 | } | ||
| 8065 | |||
| 8066 | const signed_specs = .{ .int, .long, .long_long }; | ||
| 8067 | const unsigned_specs = .{ .uint, .ulong, .ulong_long }; | ||
| 8068 | const signed_oct_hex_specs = .{ .int, .uint, .long, .ulong, .long_long, .ulong_long }; | ||
| 8069 | const specs: []const Type.Specifier = if (suffix.signedness() == .unsigned) | ||
| 8070 | &unsigned_specs | ||
| 8071 | else if (base == 10) | ||
| 8072 | &signed_specs | ||
| 8073 | else | ||
| 8074 | &signed_oct_hex_specs; | ||
| 8075 | |||
| 8076 | const suffix_ty: Type = .{ .specifier = switch (suffix) { | ||
| 8077 | .None, .I => .int, | ||
| 8078 | .U, .IU => .uint, | ||
| 8079 | .UL, .IUL => .ulong, | ||
| 8080 | .ULL, .IULL => .ulong_long, | ||
| 8081 | .L, .IL => .long, | ||
| 8082 | .LL, .ILL => .long_long, | ||
| 8083 | else => unreachable, | ||
| 8084 | } }; | ||
| 8085 | |||
| 8086 | for (specs) |spec| { | ||
| 8087 | res.ty = Type{ .specifier = spec }; | ||
| 8088 | if (res.ty.compareIntegerRanks(suffix_ty, p.comp).compare(.lt)) continue; | ||
| 8089 | const max_int = res.ty.maxInt(p.comp); | ||
| 8090 | if (val <= max_int) break; | ||
| 8091 | } else { | ||
| 8092 | res.ty = .{ .specifier = .ulong_long }; | ||
| 8093 | } | ||
| 8094 | |||
| 8095 | res.node = try p.addNode(.{ .tag = .int_literal, .ty = res.ty, .data = undefined }); | ||
| 8096 | if (!p.in_macro) try p.value_map.put(res.node, res.val); | ||
| 8097 | return res; | ||
| 8098 | } | ||
| 8099 | |||
| 8100 | fn parseInt(p: *Parser, prefix: NumberPrefix, buf: []const u8, suffix: NumberSuffix, tok_i: TokenIndex) !Result { | ||
| 8101 | if (prefix == .binary) { | ||
| 8102 | try p.errTok(.binary_integer_literal, tok_i); | ||
| 8103 | } | ||
| 8104 | const base = @intFromEnum(prefix); | ||
| 8105 | var res = if (suffix.isBitInt()) | ||
| 8106 | try p.bitInt(base, buf, suffix, tok_i) | ||
| 8107 | else | ||
| 8108 | try p.fixedSizeInt(base, buf, suffix, tok_i); | ||
| 8109 | |||
| 8110 | if (suffix.isImaginary()) { | ||
| 8111 | try p.errTok(.gnu_imaginary_constant, tok_i); | ||
| 8112 | res.ty = res.ty.makeComplex(); | ||
| 8113 | res.val = .{}; | ||
| 8114 | try res.un(p, .imaginary_literal); | ||
| 8115 | } | ||
| 8116 | return res; | ||
| 8117 | } | ||
| 8118 | |||
| 8119 | fn bitInt(p: *Parser, base: u8, buf: []const u8, suffix: NumberSuffix, tok_i: TokenIndex) Error!Result { | ||
| 8120 | try p.errStr(.pre_c23_compat, tok_i, "'_BitInt' suffix for literals"); | ||
| 8121 | try p.errTok(.bitint_suffix, tok_i); | ||
| 8122 | |||
| 8123 | var managed = try big.int.Managed.init(p.gpa); | ||
| 8124 | defer managed.deinit(); | ||
| 8125 | |||
| 8126 | managed.setString(base, buf) catch |e| switch (e) { | ||
| 8127 | error.InvalidBase => unreachable, // `base` is one of 2, 8, 10, 16 | ||
| 8128 | error.InvalidCharacter => unreachable, // digits validated by Tokenizer | ||
| 8129 | else => |er| return er, | ||
| 8130 | }; | ||
| 8131 | const c = managed.toConst(); | ||
| 8132 | const bits_needed: std.math.IntFittingRange(0, Compilation.bit_int_max_bits) = blk: { | ||
| 8133 | // Literal `0` requires at least 1 bit | ||
| 8134 | const count = @max(1, c.bitCountTwosComp()); | ||
| 8135 | // The wb suffix results in a _BitInt that includes space for the sign bit even if the | ||
| 8136 | // value of the constant is positive or was specified in hexadecimal or octal notation. | ||
| 8137 | const sign_bits = @intFromBool(suffix.isSignedInteger()); | ||
| 8138 | const bits_needed = count + sign_bits; | ||
| 8139 | if (bits_needed > Compilation.bit_int_max_bits) { | ||
| 8140 | const specifier: Type.Builder.Specifier = switch (suffix) { | ||
| 8141 | .WB => .{ .bit_int = 0 }, | ||
| 8142 | .UWB => .{ .ubit_int = 0 }, | ||
| 8143 | .IWB => .{ .complex_bit_int = 0 }, | ||
| 8144 | .IUWB => .{ .complex_ubit_int = 0 }, | ||
| 8145 | else => unreachable, | ||
| 8146 | }; | ||
| 8147 | try p.errStr(.bit_int_too_big, tok_i, specifier.str(p.comp.langopts).?); | ||
| 8148 | return error.ParsingFailed; | ||
| 8149 | } | ||
| 8150 | break :blk @intCast(bits_needed); | ||
| 8151 | }; | ||
| 8152 | |||
| 8153 | var res: Result = .{ | ||
| 8154 | .val = try Value.intern(p.comp, .{ .int = .{ .big_int = c } }), | ||
| 8155 | .ty = .{ | ||
| 8156 | .specifier = .bit_int, | ||
| 8157 | .data = .{ .int = .{ .bits = bits_needed, .signedness = suffix.signedness() } }, | ||
| 8158 | }, | ||
| 8159 | }; | ||
| 8160 | res.node = try p.addNode(.{ .tag = .int_literal, .ty = res.ty, .data = undefined }); | ||
| 8161 | if (!p.in_macro) try p.value_map.put(res.node, res.val); | ||
| 8162 | return res; | ||
| 8163 | } | ||
| 8164 | |||
| 8165 | fn getFracPart(p: *Parser, buf: []const u8, prefix: NumberPrefix, tok_i: TokenIndex) ![]const u8 { | ||
| 8166 | if (buf.len == 0 or buf[0] != '.') return ""; | ||
| 8167 | assert(prefix != .octal); | ||
| 8168 | if (prefix == .binary) { | ||
| 8169 | try p.errStr(.invalid_int_suffix, tok_i, buf); | ||
| 8170 | return error.ParsingFailed; | ||
| 8171 | } | ||
| 8172 | for (buf, 0..) |c, idx| { | ||
| 8173 | if (idx == 0) continue; | ||
| 8174 | if (c == '\'') continue; | ||
| 8175 | if (!prefix.digitAllowed(c)) return buf[0..idx]; | ||
| 8176 | } | ||
| 8177 | return buf; | ||
| 8178 | } | ||
| 8179 | |||
| 8180 | fn getExponent(p: *Parser, buf: []const u8, prefix: NumberPrefix, tok_i: TokenIndex) ![]const u8 { | ||
| 8181 | if (buf.len == 0) return ""; | ||
| 8182 | |||
| 8183 | switch (buf[0]) { | ||
| 8184 | 'e', 'E' => assert(prefix == .decimal), | ||
| 8185 | 'p', 'P' => if (prefix != .hex) { | ||
| 8186 | try p.errStr(.invalid_float_suffix, tok_i, buf); | ||
| 8187 | return error.ParsingFailed; | ||
| 8188 | }, | ||
| 8189 | else => return "", | ||
| 8190 | } | ||
| 8191 | const end = for (buf, 0..) |c, idx| { | ||
| 8192 | if (idx == 0) continue; | ||
| 8193 | if (idx == 1 and (c == '+' or c == '-')) continue; | ||
| 8194 | switch (c) { | ||
| 8195 | '0'...'9' => {}, | ||
| 8196 | '\'' => continue, | ||
| 8197 | else => break idx, | ||
| 8198 | } | ||
| 8199 | } else buf.len; | ||
| 8200 | const exponent = buf[0..end]; | ||
| 8201 | if (std.mem.indexOfAny(u8, exponent, "0123456789") == null) { | ||
| 8202 | try p.errTok(.exponent_has_no_digits, tok_i); | ||
| 8203 | return error.ParsingFailed; | ||
| 8204 | } | ||
| 8205 | return exponent; | ||
| 8206 | } | ||
| 8207 | |||
| 8208 | /// Using an explicit `tok_i` parameter instead of `p.tok_i` makes it easier | ||
| 8209 | /// to parse numbers in pragma handlers. | ||
| 8210 | pub fn parseNumberToken(p: *Parser, tok_i: TokenIndex) !Result { | ||
| 8211 | const buf = p.tokSlice(tok_i); | ||
| 8212 | const prefix = NumberPrefix.fromString(buf); | ||
| 8213 | const after_prefix = buf[prefix.stringLen()..]; | ||
| 8214 | |||
| 8215 | const int_part = try p.getIntegerPart(after_prefix, prefix, tok_i); | ||
| 8216 | |||
| 8217 | const after_int = after_prefix[int_part.len..]; | ||
| 8218 | |||
| 8219 | const frac = try p.getFracPart(after_int, prefix, tok_i); | ||
| 8220 | const after_frac = after_int[frac.len..]; | ||
| 8221 | |||
| 8222 | const exponent = try p.getExponent(after_frac, prefix, tok_i); | ||
| 8223 | const suffix_str = after_frac[exponent.len..]; | ||
| 8224 | const is_float = (exponent.len > 0 or frac.len > 0); | ||
| 8225 | const suffix = NumberSuffix.fromString(suffix_str, if (is_float) .float else .int) orelse { | ||
| 8226 | if (is_float) { | ||
| 8227 | try p.errStr(.invalid_float_suffix, tok_i, suffix_str); | ||
| 8228 | } else { | ||
| 8229 | try p.errStr(.invalid_int_suffix, tok_i, suffix_str); | ||
| 8230 | } | ||
| 8231 | return error.ParsingFailed; | ||
| 8232 | }; | ||
| 8233 | |||
| 8234 | if (is_float) { | ||
| 8235 | assert(prefix == .hex or prefix == .decimal); | ||
| 8236 | if (prefix == .hex and exponent.len == 0) { | ||
| 8237 | try p.errTok(.hex_floating_constant_requires_exponent, tok_i); | ||
| 8238 | return error.ParsingFailed; | ||
| 8239 | } | ||
| 8240 | const number = buf[0 .. buf.len - suffix_str.len]; | ||
| 8241 | return p.parseFloat(number, suffix); | ||
| 8242 | } else { | ||
| 8243 | return p.parseInt(prefix, int_part, suffix, tok_i); | ||
| 8244 | } | ||
| 8245 | } | ||
| 8246 | |||
| 8247 | fn ppNum(p: *Parser) Error!Result { | ||
| 8248 | defer p.tok_i += 1; | ||
| 8249 | var res = try p.parseNumberToken(p.tok_i); | ||
| 8250 | if (p.in_macro) { | ||
| 8251 | if (res.ty.isFloat() or !res.ty.isReal()) { | ||
| 8252 | try p.errTok(.float_literal_in_pp_expr, p.tok_i); | ||
| 8253 | return error.ParsingFailed; | ||
| 8254 | } | ||
| 8255 | res.ty = if (res.ty.isUnsignedInt(p.comp)) p.comp.types.intmax.makeIntegerUnsigned() else p.comp.types.intmax; | ||
| 8256 | } else if (res.val.opt_ref != .none) { | ||
| 8257 | // TODO add complex values | ||
| 8258 | try p.value_map.put(res.node, res.val); | ||
| 8259 | } | ||
| 8260 | return res; | ||
| 8261 | } | ||
| 8262 | |||
| 8263 | /// Run a parser function but do not evaluate the result | ||
| 8264 | fn parseNoEval(p: *Parser, comptime func: fn (*Parser) Error!Result) Error!Result { | ||
| 8265 | const no_eval = p.no_eval; | ||
| 8266 | defer p.no_eval = no_eval; | ||
| 8267 | p.no_eval = true; | ||
| 8268 | const parsed = try func(p); | ||
| 8269 | try parsed.expect(p); | ||
| 8270 | return parsed; | ||
| 8271 | } | ||
| 8272 | |||
| 8273 | /// genericSelection : keyword_generic '(' assignExpr ',' genericAssoc (',' genericAssoc)* ')' | ||
| 8274 | /// genericAssoc | ||
| 8275 | /// : typeName ':' assignExpr | ||
| 8276 | /// | keyword_default ':' assignExpr | ||
| 8277 | fn genericSelection(p: *Parser) Error!Result { | ||
| 8278 | p.tok_i += 1; | ||
| 8279 | const l_paren = try p.expectToken(.l_paren); | ||
| 8280 | const controlling_tok = p.tok_i; | ||
| 8281 | const controlling = try p.parseNoEval(assignExpr); | ||
| 8282 | _ = try p.expectToken(.comma); | ||
| 8283 | var controlling_ty = controlling.ty; | ||
| 8284 | if (controlling_ty.isArray()) controlling_ty.decayArray(); | ||
| 8285 | |||
| 8286 | const list_buf_top = p.list_buf.items.len; | ||
| 8287 | defer p.list_buf.items.len = list_buf_top; | ||
| 8288 | try p.list_buf.append(controlling.node); | ||
| 8289 | |||
| 8290 | // Use decl_buf to store the token indexes of previous cases | ||
| 8291 | const decl_buf_top = p.decl_buf.items.len; | ||
| 8292 | defer p.decl_buf.items.len = decl_buf_top; | ||
| 8293 | |||
| 8294 | var default_tok: ?TokenIndex = null; | ||
| 8295 | var default: Result = undefined; | ||
| 8296 | var chosen_tok: TokenIndex = undefined; | ||
| 8297 | var chosen: Result = .{}; | ||
| 8298 | while (true) { | ||
| 8299 | const start = p.tok_i; | ||
| 8300 | if (try p.typeName()) |ty| blk: { | ||
| 8301 | if (ty.isArray()) { | ||
| 8302 | try p.errTok(.generic_array_type, start); | ||
| 8303 | } else if (ty.isFunc()) { | ||
| 8304 | try p.errTok(.generic_func_type, start); | ||
| 8305 | } else if (ty.anyQual()) { | ||
| 8306 | try p.errTok(.generic_qual_type, start); | ||
| 8307 | } | ||
| 8308 | _ = try p.expectToken(.colon); | ||
| 8309 | const node = try p.assignExpr(); | ||
| 8310 | try node.expect(p); | ||
| 8311 | |||
| 8312 | if (ty.eql(controlling_ty, p.comp, false)) { | ||
| 8313 | if (chosen.node == .none) { | ||
| 8314 | chosen = node; | ||
| 8315 | chosen_tok = start; | ||
| 8316 | break :blk; | ||
| 8317 | } | ||
| 8318 | try p.errStr(.generic_duplicate, start, try p.typeStr(ty)); | ||
| 8319 | try p.errStr(.generic_duplicate_here, chosen_tok, try p.typeStr(ty)); | ||
| 8320 | } | ||
| 8321 | for (p.list_buf.items[list_buf_top + 1 ..], p.decl_buf.items[decl_buf_top..]) |item, prev_tok| { | ||
| 8322 | const prev_ty = p.nodes.items(.ty)[@intFromEnum(item)]; | ||
| 8323 | if (prev_ty.eql(ty, p.comp, true)) { | ||
| 8324 | try p.errStr(.generic_duplicate, start, try p.typeStr(ty)); | ||
| 8325 | try p.errStr(.generic_duplicate_here, @intFromEnum(prev_tok), try p.typeStr(ty)); | ||
| 8326 | } | ||
| 8327 | } | ||
| 8328 | try p.list_buf.append(try p.addNode(.{ | ||
| 8329 | .tag = .generic_association_expr, | ||
| 8330 | .ty = ty, | ||
| 8331 | .data = .{ .un = node.node }, | ||
| 8332 | })); | ||
| 8333 | try p.decl_buf.append(@enumFromInt(start)); | ||
| 8334 | } else if (p.eatToken(.keyword_default)) |tok| { | ||
| 8335 | if (default_tok) |prev| { | ||
| 8336 | try p.errTok(.generic_duplicate_default, tok); | ||
| 8337 | try p.errTok(.previous_case, prev); | ||
| 8338 | } | ||
| 8339 | default_tok = tok; | ||
| 8340 | _ = try p.expectToken(.colon); | ||
| 8341 | default = try p.assignExpr(); | ||
| 8342 | try default.expect(p); | ||
| 8343 | } else { | ||
| 8344 | if (p.list_buf.items.len == list_buf_top + 1) { | ||
| 8345 | try p.err(.expected_type); | ||
| 8346 | return error.ParsingFailed; | ||
| 8347 | } | ||
| 8348 | break; | ||
| 8349 | } | ||
| 8350 | if (p.eatToken(.comma) == null) break; | ||
| 8351 | } | ||
| 8352 | try p.expectClosing(l_paren, .r_paren); | ||
| 8353 | |||
| 8354 | if (chosen.node == .none) { | ||
| 8355 | if (default_tok != null) { | ||
| 8356 | try p.list_buf.insert(list_buf_top + 1, try p.addNode(.{ | ||
| 8357 | .tag = .generic_default_expr, | ||
| 8358 | .data = .{ .un = default.node }, | ||
| 8359 | })); | ||
| 8360 | chosen = default; | ||
| 8361 | } else { | ||
| 8362 | try p.errStr(.generic_no_match, controlling_tok, try p.typeStr(controlling_ty)); | ||
| 8363 | return error.ParsingFailed; | ||
| 8364 | } | ||
| 8365 | } else { | ||
| 8366 | try p.list_buf.insert(list_buf_top + 1, try p.addNode(.{ | ||
| 8367 | .tag = .generic_association_expr, | ||
| 8368 | .data = .{ .un = chosen.node }, | ||
| 8369 | })); | ||
| 8370 | if (default_tok != null) { | ||
| 8371 | try p.list_buf.append(try p.addNode(.{ | ||
| 8372 | .tag = .generic_default_expr, | ||
| 8373 | .data = .{ .un = chosen.node }, | ||
| 8374 | })); | ||
| 8375 | } | ||
| 8376 | } | ||
| 8377 | |||
| 8378 | var generic_node: Tree.Node = .{ | ||
| 8379 | .tag = .generic_expr_one, | ||
| 8380 | .ty = chosen.ty, | ||
| 8381 | .data = .{ .bin = .{ .lhs = controlling.node, .rhs = chosen.node } }, | ||
| 8382 | }; | ||
| 8383 | const associations = p.list_buf.items[list_buf_top..]; | ||
| 8384 | if (associations.len > 2) { // associations[0] == controlling.node | ||
| 8385 | generic_node.tag = .generic_expr; | ||
| 8386 | generic_node.data = .{ .range = try p.addList(associations) }; | ||
| 8387 | } | ||
| 8388 | chosen.node = try p.addNode(generic_node); | ||
| 8389 | return chosen; | ||
| 8390 | } | ||
deps/aro/aro/Pragma.zig created+83| ... | @@ -0,0 +1,83 @@ | ||
| 1 | const std = @import("std"); | ||
| 2 | const Compilation = @import("Compilation.zig"); | ||
| 3 | const Preprocessor = @import("Preprocessor.zig"); | ||
| 4 | const Parser = @import("Parser.zig"); | ||
| 5 | const TokenIndex = @import("Tree.zig").TokenIndex; | ||
| 6 | |||
| 7 | pub const Error = Compilation.Error || error{ UnknownPragma, StopPreprocessing }; | ||
| 8 | |||
| 9 | const Pragma = @This(); | ||
| 10 | |||
| 11 | /// Called during Preprocessor.init | ||
| 12 | beforePreprocess: ?*const fn (*Pragma, *Compilation) void = null, | ||
| 13 | |||
| 14 | /// Called at the beginning of Parser.parse | ||
| 15 | beforeParse: ?*const fn (*Pragma, *Compilation) void = null, | ||
| 16 | |||
| 17 | /// Called at the end of Parser.parse if a Tree was successfully parsed | ||
| 18 | afterParse: ?*const fn (*Pragma, *Compilation) void = null, | ||
| 19 | |||
| 20 | /// Called during Compilation.deinit | ||
| 21 | deinit: *const fn (*Pragma, *Compilation) void, | ||
| 22 | |||
| 23 | /// Called whenever the preprocessor encounters this pragma. `start_idx` is the index | ||
| 24 | /// within `pp.tokens` of the pragma name token. The pragma end is indicated by a | ||
| 25 | /// .nl token (which may be generated if the source ends with a pragma with no newline) | ||
| 26 | /// As an example, given the following line: | ||
| 27 | /// #pragma GCC diagnostic error "-Wnewline-eof" \n | ||
| 28 | /// Then pp.tokens.get(start_idx) will return the `GCC` token. | ||
| 29 | /// Return error.UnknownPragma to emit an `unknown_pragma` diagnostic | ||
| 30 | /// Return error.StopPreprocessing to stop preprocessing the current file (see once.zig) | ||
| 31 | preprocessorHandler: ?*const fn (*Pragma, *Preprocessor, start_idx: TokenIndex) Error!void = null, | ||
| 32 | |||
| 33 | /// Called during token pretty-printing (`-E` option). If this returns true, the pragma will | ||
| 34 | /// be printed; otherwise it will be omitted. start_idx is the index of the pragma name token | ||
| 35 | preserveTokens: ?*const fn (*Pragma, *Preprocessor, start_idx: TokenIndex) bool = null, | ||
| 36 | |||
| 37 | /// Same as preprocessorHandler except called during parsing | ||
| 38 | /// The parser's `p.tok_i` field must not be changed | ||
| 39 | parserHandler: ?*const fn (*Pragma, *Parser, start_idx: TokenIndex) Compilation.Error!void = null, | ||
| 40 | |||
| 41 | pub fn pasteTokens(pp: *Preprocessor, start_idx: TokenIndex) ![]const u8 { | ||
| 42 | if (pp.tokens.get(start_idx).id == .nl) return error.ExpectedStringLiteral; | ||
| 43 | |||
| 44 | const char_top = pp.char_buf.items.len; | ||
| 45 | defer pp.char_buf.items.len = char_top; | ||
| 46 | var i: usize = 0; | ||
| 47 | var lparen_count: u32 = 0; | ||
| 48 | var rparen_count: u32 = 0; | ||
| 49 | while (true) : (i += 1) { | ||
| 50 | const tok = pp.tokens.get(start_idx + i); | ||
| 51 | if (tok.id == .nl) break; | ||
| 52 | switch (tok.id) { | ||
| 53 | .l_paren => { | ||
| 54 | if (lparen_count != i) return error.ExpectedStringLiteral; | ||
| 55 | lparen_count += 1; | ||
| 56 | }, | ||
| 57 | .r_paren => rparen_count += 1, | ||
| 58 | .string_literal => { | ||
| 59 | if (rparen_count != 0) return error.ExpectedStringLiteral; | ||
| 60 | const str = pp.expandedSlice(tok); | ||
| 61 | try pp.char_buf.appendSlice(str[1 .. str.len - 1]); | ||
| 62 | }, | ||
| 63 | else => return error.ExpectedStringLiteral, | ||
| 64 | } | ||
| 65 | } | ||
| 66 | if (lparen_count != rparen_count) return error.ExpectedStringLiteral; | ||
| 67 | return pp.char_buf.items[char_top..]; | ||
| 68 | } | ||
| 69 | |||
| 70 | pub fn shouldPreserveTokens(self: *Pragma, pp: *Preprocessor, start_idx: TokenIndex) bool { | ||
| 71 | if (self.preserveTokens) |func| return func(self, pp, start_idx); | ||
| 72 | return false; | ||
| 73 | } | ||
| 74 | |||
| 75 | pub fn preprocessorCB(self: *Pragma, pp: *Preprocessor, start_idx: TokenIndex) Error!void { | ||
| 76 | if (self.preprocessorHandler) |func| return func(self, pp, start_idx); | ||
| 77 | } | ||
| 78 | |||
| 79 | pub fn parserCB(self: *Pragma, p: *Parser, start_idx: TokenIndex) Compilation.Error!void { | ||
| 80 | const tok_index = p.tok_i; | ||
| 81 | defer std.debug.assert(tok_index == p.tok_i); | ||
| 82 | if (self.parserHandler) |func| return func(self, p, start_idx); | ||
| 83 | } | ||
deps/aro/aro/Preprocessor.zig created+3386| ... | @@ -0,0 +1,3386 @@ | ||
| 1 | const std = @import("std"); | ||
| 2 | const mem = std.mem; | ||
| 3 | const Allocator = mem.Allocator; | ||
| 4 | const assert = std.debug.assert; | ||
| 5 | const Compilation = @import("Compilation.zig"); | ||
| 6 | const Error = Compilation.Error; | ||
| 7 | const Source = @import("Source.zig"); | ||
| 8 | const Tokenizer = @import("Tokenizer.zig"); | ||
| 9 | const RawToken = Tokenizer.Token; | ||
| 10 | const Parser = @import("Parser.zig"); | ||
| 11 | const Diagnostics = @import("Diagnostics.zig"); | ||
| 12 | const Token = @import("Tree.zig").Token; | ||
| 13 | const Attribute = @import("Attribute.zig"); | ||
| 14 | const features = @import("features.zig"); | ||
| 15 | |||
| 16 | const DefineMap = std.StringHashMapUnmanaged(Macro); | ||
| 17 | const RawTokenList = std.ArrayList(RawToken); | ||
| 18 | const max_include_depth = 200; | ||
| 19 | |||
| 20 | /// Errors that can be returned when expanding a macro. | ||
| 21 | /// error.UnknownPragma can occur within Preprocessor.pragma() but | ||
| 22 | /// it is handled there and doesn't escape that function | ||
| 23 | const MacroError = Error || error{StopPreprocessing}; | ||
| 24 | |||
| 25 | const Macro = struct { | ||
| 26 | /// Parameters of the function type macro | ||
| 27 | params: []const []const u8, | ||
| 28 | |||
| 29 | /// Token constituting the macro body | ||
| 30 | tokens: []const RawToken, | ||
| 31 | |||
| 32 | /// If the function type macro has variable number of arguments | ||
| 33 | var_args: bool, | ||
| 34 | |||
| 35 | /// Is a function type macro | ||
| 36 | is_func: bool, | ||
| 37 | |||
| 38 | /// Is a predefined macro | ||
| 39 | is_builtin: bool = false, | ||
| 40 | |||
| 41 | /// Location of macro in the source | ||
| 42 | loc: Source.Location, | ||
| 43 | start: u32, | ||
| 44 | end: u32, | ||
| 45 | |||
| 46 | fn eql(a: Macro, b: Macro, pp: *Preprocessor) bool { | ||
| 47 | if (a.tokens.len != b.tokens.len) return false; | ||
| 48 | if (a.is_builtin != b.is_builtin) return false; | ||
| 49 | for (a.tokens, b.tokens) |a_tok, b_tok| if (!tokEql(pp, a_tok, b_tok)) return false; | ||
| 50 | |||
| 51 | if (a.is_func and b.is_func) { | ||
| 52 | if (a.var_args != b.var_args) return false; | ||
| 53 | if (a.params.len != b.params.len) return false; | ||
| 54 | for (a.params, b.params) |a_param, b_param| if (!mem.eql(u8, a_param, b_param)) return false; | ||
| 55 | } | ||
| 56 | |||
| 57 | return true; | ||
| 58 | } | ||
| 59 | |||
| 60 | fn tokEql(pp: *Preprocessor, a: RawToken, b: RawToken) bool { | ||
| 61 | return mem.eql(u8, pp.tokSlice(a), pp.tokSlice(b)); | ||
| 62 | } | ||
| 63 | }; | ||
| 64 | |||
| 65 | const Preprocessor = @This(); | ||
| 66 | |||
| 67 | comp: *Compilation, | ||
| 68 | gpa: mem.Allocator, | ||
| 69 | arena: std.heap.ArenaAllocator, | ||
| 70 | defines: DefineMap = .{}, | ||
| 71 | tokens: Token.List = .{}, | ||
| 72 | token_buf: RawTokenList, | ||
| 73 | char_buf: std.ArrayList(u8), | ||
| 74 | /// Counter that is incremented each time preprocess() is called | ||
| 75 | /// Can be used to distinguish multiple preprocessings of the same file | ||
| 76 | preprocess_count: u32 = 0, | ||
| 77 | generated_line: u32 = 1, | ||
| 78 | add_expansion_nl: u32 = 0, | ||
| 79 | include_depth: u8 = 0, | ||
| 80 | counter: u32 = 0, | ||
| 81 | expansion_source_loc: Source.Location = undefined, | ||
| 82 | poisoned_identifiers: std.StringHashMap(void), | ||
| 83 | /// Map from Source.Id to macro name in the `#ifndef` condition which guards the source, if any | ||
| 84 | include_guards: std.AutoHashMapUnmanaged(Source.Id, []const u8) = .{}, | ||
| 85 | |||
| 86 | /// Memory is retained to avoid allocation on every single token. | ||
| 87 | top_expansion_buf: ExpandBuf, | ||
| 88 | |||
| 89 | /// Dump current state to stderr. | ||
| 90 | verbose: bool = false, | ||
| 91 | preserve_whitespace: bool = false, | ||
| 92 | |||
| 93 | /// linemarker tokens. Must be .none unless in -E mode (parser does not handle linemarkers) | ||
| 94 | linemarkers: Linemarkers = .none, | ||
| 95 | |||
| 96 | pub const parse = Parser.parse; | ||
| 97 | |||
| 98 | pub const Linemarkers = enum { | ||
| 99 | /// No linemarker tokens. Required setting if parser will run | ||
| 100 | none, | ||
| 101 | /// #line <num> "filename" | ||
| 102 | line_directives, | ||
| 103 | /// # <num> "filename" flags | ||
| 104 | numeric_directives, | ||
| 105 | }; | ||
| 106 | |||
| 107 | pub fn init(comp: *Compilation) Preprocessor { | ||
| 108 | const pp = Preprocessor{ | ||
| 109 | .comp = comp, | ||
| 110 | .gpa = comp.gpa, | ||
| 111 | .arena = std.heap.ArenaAllocator.init(comp.gpa), | ||
| 112 | .token_buf = RawTokenList.init(comp.gpa), | ||
| 113 | .char_buf = std.ArrayList(u8).init(comp.gpa), | ||
| 114 | .poisoned_identifiers = std.StringHashMap(void).init(comp.gpa), | ||
| 115 | .top_expansion_buf = ExpandBuf.init(comp.gpa), | ||
| 116 | }; | ||
| 117 | comp.pragmaEvent(.before_preprocess); | ||
| 118 | return pp; | ||
| 119 | } | ||
| 120 | |||
| 121 | /// Initialize Preprocessor with builtin macros. | ||
| 122 | pub fn initDefault(comp: *Compilation) !Preprocessor { | ||
| 123 | var pp = init(comp); | ||
| 124 | errdefer pp.deinit(); | ||
| 125 | try pp.addBuiltinMacros(); | ||
| 126 | return pp; | ||
| 127 | } | ||
| 128 | |||
| 129 | const builtin_macros = struct { | ||
| 130 | const args = [1][]const u8{"X"}; | ||
| 131 | |||
| 132 | const has_attribute = [1]RawToken{.{ | ||
| 133 | .id = .macro_param_has_attribute, | ||
| 134 | .source = .generated, | ||
| 135 | }}; | ||
| 136 | const has_c_attribute = [1]RawToken{.{ | ||
| 137 | .id = .macro_param_has_c_attribute, | ||
| 138 | .source = .generated, | ||
| 139 | }}; | ||
| 140 | const has_declspec_attribute = [1]RawToken{.{ | ||
| 141 | .id = .macro_param_has_declspec_attribute, | ||
| 142 | .source = .generated, | ||
| 143 | }}; | ||
| 144 | const has_warning = [1]RawToken{.{ | ||
| 145 | .id = .macro_param_has_warning, | ||
| 146 | .source = .generated, | ||
| 147 | }}; | ||
| 148 | const has_feature = [1]RawToken{.{ | ||
| 149 | .id = .macro_param_has_feature, | ||
| 150 | .source = .generated, | ||
| 151 | }}; | ||
| 152 | const has_extension = [1]RawToken{.{ | ||
| 153 | .id = .macro_param_has_extension, | ||
| 154 | .source = .generated, | ||
| 155 | }}; | ||
| 156 | const has_builtin = [1]RawToken{.{ | ||
| 157 | .id = .macro_param_has_builtin, | ||
| 158 | .source = .generated, | ||
| 159 | }}; | ||
| 160 | const has_include = [1]RawToken{.{ | ||
| 161 | .id = .macro_param_has_include, | ||
| 162 | .source = .generated, | ||
| 163 | }}; | ||
| 164 | const has_include_next = [1]RawToken{.{ | ||
| 165 | .id = .macro_param_has_include_next, | ||
| 166 | .source = .generated, | ||
| 167 | }}; | ||
| 168 | const has_embed = [1]RawToken{.{ | ||
| 169 | .id = .macro_param_has_embed, | ||
| 170 | .source = .generated, | ||
| 171 | }}; | ||
| 172 | |||
| 173 | const is_identifier = [1]RawToken{.{ | ||
| 174 | .id = .macro_param_is_identifier, | ||
| 175 | .source = .generated, | ||
| 176 | }}; | ||
| 177 | |||
| 178 | const pragma_operator = [1]RawToken{.{ | ||
| 179 | .id = .macro_param_pragma_operator, | ||
| 180 | .source = .generated, | ||
| 181 | }}; | ||
| 182 | |||
| 183 | const file = [1]RawToken{.{ | ||
| 184 | .id = .macro_file, | ||
| 185 | .source = .generated, | ||
| 186 | }}; | ||
| 187 | const line = [1]RawToken{.{ | ||
| 188 | .id = .macro_line, | ||
| 189 | .source = .generated, | ||
| 190 | }}; | ||
| 191 | const counter = [1]RawToken{.{ | ||
| 192 | .id = .macro_counter, | ||
| 193 | .source = .generated, | ||
| 194 | }}; | ||
| 195 | }; | ||
| 196 | |||
| 197 | fn addBuiltinMacro(pp: *Preprocessor, name: []const u8, is_func: bool, tokens: []const RawToken) !void { | ||
| 198 | try pp.defines.putNoClobber(pp.gpa, name, .{ | ||
| 199 | .params = &builtin_macros.args, | ||
| 200 | .tokens = tokens, | ||
| 201 | .var_args = false, | ||
| 202 | .is_func = is_func, | ||
| 203 | .loc = .{ .id = .generated }, | ||
| 204 | .start = 0, | ||
| 205 | .end = 0, | ||
| 206 | .is_builtin = true, | ||
| 207 | }); | ||
| 208 | } | ||
| 209 | |||
| 210 | pub fn addBuiltinMacros(pp: *Preprocessor) !void { | ||
| 211 | try pp.addBuiltinMacro("__has_attribute", true, &builtin_macros.has_attribute); | ||
| 212 | try pp.addBuiltinMacro("__has_c_attribute", true, &builtin_macros.has_c_attribute); | ||
| 213 | try pp.addBuiltinMacro("__has_declspec_attribute", true, &builtin_macros.has_declspec_attribute); | ||
| 214 | try pp.addBuiltinMacro("__has_warning", true, &builtin_macros.has_warning); | ||
| 215 | try pp.addBuiltinMacro("__has_feature", true, &builtin_macros.has_feature); | ||
| 216 | try pp.addBuiltinMacro("__has_extension", true, &builtin_macros.has_extension); | ||
| 217 | try pp.addBuiltinMacro("__has_builtin", true, &builtin_macros.has_builtin); | ||
| 218 | try pp.addBuiltinMacro("__has_include", true, &builtin_macros.has_include); | ||
| 219 | try pp.addBuiltinMacro("__has_include_next", true, &builtin_macros.has_include_next); | ||
| 220 | try pp.addBuiltinMacro("__has_embed", true, &builtin_macros.has_embed); | ||
| 221 | try pp.addBuiltinMacro("__is_identifier", true, &builtin_macros.is_identifier); | ||
| 222 | try pp.addBuiltinMacro("_Pragma", true, &builtin_macros.pragma_operator); | ||
| 223 | |||
| 224 | try pp.addBuiltinMacro("__FILE__", false, &builtin_macros.file); | ||
| 225 | try pp.addBuiltinMacro("__LINE__", false, &builtin_macros.line); | ||
| 226 | try pp.addBuiltinMacro("__COUNTER__", false, &builtin_macros.counter); | ||
| 227 | } | ||
| 228 | |||
| 229 | pub fn deinit(pp: *Preprocessor) void { | ||
| 230 | pp.defines.deinit(pp.gpa); | ||
| 231 | for (pp.tokens.items(.expansion_locs)) |loc| Token.free(loc, pp.gpa); | ||
| 232 | pp.tokens.deinit(pp.gpa); | ||
| 233 | pp.arena.deinit(); | ||
| 234 | pp.token_buf.deinit(); | ||
| 235 | pp.char_buf.deinit(); | ||
| 236 | pp.poisoned_identifiers.deinit(); | ||
| 237 | pp.include_guards.deinit(pp.gpa); | ||
| 238 | pp.top_expansion_buf.deinit(); | ||
| 239 | } | ||
| 240 | |||
| 241 | /// Preprocess a compilation unit of sources into a parsable list of tokens. | ||
| 242 | pub fn preprocessSources(pp: *Preprocessor, sources: []const Source) Error!void { | ||
| 243 | assert(sources.len > 1); | ||
| 244 | const first = sources[0]; | ||
| 245 | try pp.addIncludeStart(first); | ||
| 246 | for (sources[1..]) |header| { | ||
| 247 | try pp.addIncludeStart(header); | ||
| 248 | _ = try pp.preprocess(header); | ||
| 249 | } | ||
| 250 | try pp.addIncludeResume(first.id, 0, 0); | ||
| 251 | const eof = try pp.preprocess(first); | ||
| 252 | try pp.tokens.append(pp.comp.gpa, eof); | ||
| 253 | } | ||
| 254 | |||
| 255 | /// Preprocess a source file, returns eof token. | ||
| 256 | pub fn preprocess(pp: *Preprocessor, source: Source) Error!Token { | ||
| 257 | const eof = pp.preprocessExtra(source) catch |er| switch (er) { | ||
| 258 | // This cannot occur in the main file and is handled in `include`. | ||
| 259 | error.StopPreprocessing => unreachable, | ||
| 260 | else => |e| return e, | ||
| 261 | }; | ||
| 262 | try eof.checkMsEof(source, pp.comp); | ||
| 263 | return eof; | ||
| 264 | } | ||
| 265 | |||
| 266 | /// Tokenize a file without any preprocessing, returns eof token. | ||
| 267 | pub fn tokenize(pp: *Preprocessor, source: Source) Error!Token { | ||
| 268 | assert(pp.linemarkers == .none); | ||
| 269 | assert(pp.preserve_whitespace == false); | ||
| 270 | var tokenizer = Tokenizer{ | ||
| 271 | .buf = source.buf, | ||
| 272 | .comp = pp.comp, | ||
| 273 | .source = source.id, | ||
| 274 | }; | ||
| 275 | |||
| 276 | // Estimate how many new tokens this source will contain. | ||
| 277 | const estimated_token_count = source.buf.len / 8; | ||
| 278 | try pp.tokens.ensureTotalCapacity(pp.gpa, pp.tokens.len + estimated_token_count); | ||
| 279 | |||
| 280 | while (true) { | ||
| 281 | const tok = tokenizer.next(); | ||
| 282 | if (tok.id == .eof) return tokFromRaw(tok); | ||
| 283 | try pp.tokens.append(pp.gpa, tokFromRaw(tok)); | ||
| 284 | } | ||
| 285 | } | ||
| 286 | |||
| 287 | pub fn addIncludeStart(pp: *Preprocessor, source: Source) !void { | ||
| 288 | if (pp.linemarkers == .none) return; | ||
| 289 | try pp.tokens.append(pp.gpa, .{ .id = .include_start, .loc = .{ | ||
| 290 | .id = source.id, | ||
| 291 | .byte_offset = std.math.maxInt(u32), | ||
| 292 | .line = 0, | ||
| 293 | } }); | ||
| 294 | } | ||
| 295 | |||
| 296 | pub fn addIncludeResume(pp: *Preprocessor, source: Source.Id, offset: u32, line: u32) !void { | ||
| 297 | if (pp.linemarkers == .none) return; | ||
| 298 | try pp.tokens.append(pp.gpa, .{ .id = .include_resume, .loc = .{ | ||
| 299 | .id = source, | ||
| 300 | .byte_offset = offset, | ||
| 301 | .line = line, | ||
| 302 | } }); | ||
| 303 | } | ||
| 304 | |||
| 305 | fn invalidTokenDiagnostic(tok_id: Token.Id) Diagnostics.Tag { | ||
| 306 | return switch (tok_id) { | ||
| 307 | .unterminated_string_literal => .unterminated_string_literal_warning, | ||
| 308 | .empty_char_literal => .empty_char_literal_warning, | ||
| 309 | .unterminated_char_literal => .unterminated_char_literal_warning, | ||
| 310 | else => unreachable, | ||
| 311 | }; | ||
| 312 | } | ||
| 313 | |||
| 314 | /// Return the name of the #ifndef guard macro that starts a source, if any. | ||
| 315 | fn findIncludeGuard(pp: *Preprocessor, source: Source) ?[]const u8 { | ||
| 316 | var tokenizer = Tokenizer{ | ||
| 317 | .buf = source.buf, | ||
| 318 | .comp = pp.comp, | ||
| 319 | .source = source.id, | ||
| 320 | }; | ||
| 321 | var hash = tokenizer.nextNoWS(); | ||
| 322 | while (hash.id == .nl) hash = tokenizer.nextNoWS(); | ||
| 323 | if (hash.id != .hash) return null; | ||
| 324 | const ifndef = tokenizer.nextNoWS(); | ||
| 325 | if (ifndef.id != .keyword_ifndef) return null; | ||
| 326 | const guard = tokenizer.nextNoWS(); | ||
| 327 | if (guard.id != .identifier) return null; | ||
| 328 | return pp.tokSlice(guard); | ||
| 329 | } | ||
| 330 | |||
| 331 | fn preprocessExtra(pp: *Preprocessor, source: Source) MacroError!Token { | ||
| 332 | var guard_name = pp.findIncludeGuard(source); | ||
| 333 | |||
| 334 | pp.preprocess_count += 1; | ||
| 335 | var tokenizer = Tokenizer{ | ||
| 336 | .buf = source.buf, | ||
| 337 | .comp = pp.comp, | ||
| 338 | .source = source.id, | ||
| 339 | }; | ||
| 340 | |||
| 341 | // Estimate how many new tokens this source will contain. | ||
| 342 | const estimated_token_count = source.buf.len / 8; | ||
| 343 | try pp.tokens.ensureTotalCapacity(pp.gpa, pp.tokens.len + estimated_token_count); | ||
| 344 | |||
| 345 | var if_level: u8 = 0; | ||
| 346 | var if_kind = std.PackedIntArray(u2, 256).init([1]u2{0} ** 256); | ||
| 347 | const until_else = 0; | ||
| 348 | const until_endif = 1; | ||
| 349 | const until_endif_seen_else = 2; | ||
| 350 | |||
| 351 | var start_of_line = true; | ||
| 352 | while (true) { | ||
| 353 | var tok = tokenizer.next(); | ||
| 354 | switch (tok.id) { | ||
| 355 | .hash => if (!start_of_line) try pp.tokens.append(pp.gpa, tokFromRaw(tok)) else { | ||
| 356 | const directive = tokenizer.nextNoWS(); | ||
| 357 | switch (directive.id) { | ||
| 358 | .keyword_error, .keyword_warning => { | ||
| 359 | // #error tokens.. | ||
| 360 | pp.top_expansion_buf.items.len = 0; | ||
| 361 | const char_top = pp.char_buf.items.len; | ||
| 362 | defer pp.char_buf.items.len = char_top; | ||
| 363 | |||
| 364 | while (true) { | ||
| 365 | tok = tokenizer.next(); | ||
| 366 | if (tok.id == .nl or tok.id == .eof) break; | ||
| 367 | if (tok.id == .whitespace) tok.id = .macro_ws; | ||
| 368 | try pp.top_expansion_buf.append(tokFromRaw(tok)); | ||
| 369 | } | ||
| 370 | try pp.stringify(pp.top_expansion_buf.items); | ||
| 371 | const slice = pp.char_buf.items[char_top + 1 .. pp.char_buf.items.len - 2]; | ||
| 372 | const duped = try pp.comp.diagnostics.arena.allocator().dupe(u8, slice); | ||
| 373 | |||
| 374 | try pp.comp.addDiagnostic(.{ | ||
| 375 | .tag = if (directive.id == .keyword_error) .error_directive else .warning_directive, | ||
| 376 | .loc = .{ .id = tok.source, .byte_offset = directive.start, .line = directive.line }, | ||
| 377 | .extra = .{ .str = duped }, | ||
| 378 | }, &.{}); | ||
| 379 | }, | ||
| 380 | .keyword_if => { | ||
| 381 | const sum, const overflowed = @addWithOverflow(if_level, 1); | ||
| 382 | if (overflowed != 0) | ||
| 383 | return pp.fatal(directive, "too many #if nestings", .{}); | ||
| 384 | if_level = sum; | ||
| 385 | |||
| 386 | if (try pp.expr(&tokenizer)) { | ||
| 387 | if_kind.set(if_level, until_endif); | ||
| 388 | if (pp.verbose) { | ||
| 389 | pp.verboseLog(directive, "entering then branch of #if", .{}); | ||
| 390 | } | ||
| 391 | } else { | ||
| 392 | if_kind.set(if_level, until_else); | ||
| 393 | try pp.skip(&tokenizer, .until_else); | ||
| 394 | if (pp.verbose) { | ||
| 395 | pp.verboseLog(directive, "entering else branch of #if", .{}); | ||
| 396 | } | ||
| 397 | } | ||
| 398 | }, | ||
| 399 | .keyword_ifdef => { | ||
| 400 | const sum, const overflowed = @addWithOverflow(if_level, 1); | ||
| 401 | if (overflowed != 0) | ||
| 402 | return pp.fatal(directive, "too many #if nestings", .{}); | ||
| 403 | if_level = sum; | ||
| 404 | |||
| 405 | const macro_name = (try pp.expectMacroName(&tokenizer)) orelse continue; | ||
| 406 | try pp.expectNl(&tokenizer); | ||
| 407 | if (pp.defines.get(macro_name) != null) { | ||
| 408 | if_kind.set(if_level, until_endif); | ||
| 409 | if (pp.verbose) { | ||
| 410 | pp.verboseLog(directive, "entering then branch of #ifdef", .{}); | ||
| 411 | } | ||
| 412 | } else { | ||
| 413 | if_kind.set(if_level, until_else); | ||
| 414 | try pp.skip(&tokenizer, .until_else); | ||
| 415 | if (pp.verbose) { | ||
| 416 | pp.verboseLog(directive, "entering else branch of #ifdef", .{}); | ||
| 417 | } | ||
| 418 | } | ||
| 419 | }, | ||
| 420 | .keyword_ifndef => { | ||
| 421 | const sum, const overflowed = @addWithOverflow(if_level, 1); | ||
| 422 | if (overflowed != 0) | ||
| 423 | return pp.fatal(directive, "too many #if nestings", .{}); | ||
| 424 | if_level = sum; | ||
| 425 | |||
| 426 | const macro_name = (try pp.expectMacroName(&tokenizer)) orelse continue; | ||
| 427 | try pp.expectNl(&tokenizer); | ||
| 428 | if (pp.defines.get(macro_name) == null) { | ||
| 429 | if_kind.set(if_level, until_endif); | ||
| 430 | } else { | ||
| 431 | if_kind.set(if_level, until_else); | ||
| 432 | try pp.skip(&tokenizer, .until_else); | ||
| 433 | } | ||
| 434 | }, | ||
| 435 | .keyword_elif => { | ||
| 436 | if (if_level == 0) { | ||
| 437 | try pp.err(directive, .elif_without_if); | ||
| 438 | if_level += 1; | ||
| 439 | if_kind.set(if_level, until_else); | ||
| 440 | } else if (if_level == 1) { | ||
| 441 | guard_name = null; | ||
| 442 | } | ||
| 443 | switch (if_kind.get(if_level)) { | ||
| 444 | until_else => if (try pp.expr(&tokenizer)) { | ||
| 445 | if_kind.set(if_level, until_endif); | ||
| 446 | if (pp.verbose) { | ||
| 447 | pp.verboseLog(directive, "entering then branch of #elif", .{}); | ||
| 448 | } | ||
| 449 | } else { | ||
| 450 | try pp.skip(&tokenizer, .until_else); | ||
| 451 | if (pp.verbose) { | ||
| 452 | pp.verboseLog(directive, "entering else branch of #elif", .{}); | ||
| 453 | } | ||
| 454 | }, | ||
| 455 | until_endif => try pp.skip(&tokenizer, .until_endif), | ||
| 456 | until_endif_seen_else => { | ||
| 457 | try pp.err(directive, .elif_after_else); | ||
| 458 | skipToNl(&tokenizer); | ||
| 459 | }, | ||
| 460 | else => unreachable, | ||
| 461 | } | ||
| 462 | }, | ||
| 463 | .keyword_elifdef => { | ||
| 464 | if (if_level == 0) { | ||
| 465 | try pp.err(directive, .elifdef_without_if); | ||
| 466 | if_level += 1; | ||
| 467 | if_kind.set(if_level, until_else); | ||
| 468 | } else if (if_level == 1) { | ||
| 469 | guard_name = null; | ||
| 470 | } | ||
| 471 | switch (if_kind.get(if_level)) { | ||
| 472 | until_else => { | ||
| 473 | const macro_name = try pp.expectMacroName(&tokenizer); | ||
| 474 | if (macro_name == null) { | ||
| 475 | if_kind.set(if_level, until_else); | ||
| 476 | try pp.skip(&tokenizer, .until_else); | ||
| 477 | if (pp.verbose) { | ||
| 478 | pp.verboseLog(directive, "entering else branch of #elifdef", .{}); | ||
| 479 | } | ||
| 480 | } else { | ||
| 481 | try pp.expectNl(&tokenizer); | ||
| 482 | if (pp.defines.get(macro_name.?) != null) { | ||
| 483 | if_kind.set(if_level, until_endif); | ||
| 484 | if (pp.verbose) { | ||
| 485 | pp.verboseLog(directive, "entering then branch of #elifdef", .{}); | ||
| 486 | } | ||
| 487 | } else { | ||
| 488 | if_kind.set(if_level, until_else); | ||
| 489 | try pp.skip(&tokenizer, .until_else); | ||
| 490 | if (pp.verbose) { | ||
| 491 | pp.verboseLog(directive, "entering else branch of #elifdef", .{}); | ||
| 492 | } | ||
| 493 | } | ||
| 494 | } | ||
| 495 | }, | ||
| 496 | until_endif => try pp.skip(&tokenizer, .until_endif), | ||
| 497 | until_endif_seen_else => { | ||
| 498 | try pp.err(directive, .elifdef_after_else); | ||
| 499 | skipToNl(&tokenizer); | ||
| 500 | }, | ||
| 501 | else => unreachable, | ||
| 502 | } | ||
| 503 | }, | ||
| 504 | .keyword_elifndef => { | ||
| 505 | if (if_level == 0) { | ||
| 506 | try pp.err(directive, .elifdef_without_if); | ||
| 507 | if_level += 1; | ||
| 508 | if_kind.set(if_level, until_else); | ||
| 509 | } else if (if_level == 1) { | ||
| 510 | guard_name = null; | ||
| 511 | } | ||
| 512 | switch (if_kind.get(if_level)) { | ||
| 513 | until_else => { | ||
| 514 | const macro_name = try pp.expectMacroName(&tokenizer); | ||
| 515 | if (macro_name == null) { | ||
| 516 | if_kind.set(if_level, until_else); | ||
| 517 | try pp.skip(&tokenizer, .until_else); | ||
| 518 | if (pp.verbose) { | ||
| 519 | pp.verboseLog(directive, "entering else branch of #elifndef", .{}); | ||
| 520 | } | ||
| 521 | } else { | ||
| 522 | try pp.expectNl(&tokenizer); | ||
| 523 | if (pp.defines.get(macro_name.?) == null) { | ||
| 524 | if_kind.set(if_level, until_endif); | ||
| 525 | if (pp.verbose) { | ||
| 526 | pp.verboseLog(directive, "entering then branch of #elifndef", .{}); | ||
| 527 | } | ||
| 528 | } else { | ||
| 529 | if_kind.set(if_level, until_else); | ||
| 530 | try pp.skip(&tokenizer, .until_else); | ||
| 531 | if (pp.verbose) { | ||
| 532 | pp.verboseLog(directive, "entering else branch of #elifndef", .{}); | ||
| 533 | } | ||
| 534 | } | ||
| 535 | } | ||
| 536 | }, | ||
| 537 | until_endif => try pp.skip(&tokenizer, .until_endif), | ||
| 538 | until_endif_seen_else => { | ||
| 539 | try pp.err(directive, .elifdef_after_else); | ||
| 540 | skipToNl(&tokenizer); | ||
| 541 | }, | ||
| 542 | else => unreachable, | ||
| 543 | } | ||
| 544 | }, | ||
| 545 | .keyword_else => { | ||
| 546 | try pp.expectNl(&tokenizer); | ||
| 547 | if (if_level == 0) { | ||
| 548 | try pp.err(directive, .else_without_if); | ||
| 549 | continue; | ||
| 550 | } else if (if_level == 1) { | ||
| 551 | guard_name = null; | ||
| 552 | } | ||
| 553 | switch (if_kind.get(if_level)) { | ||
| 554 | until_else => { | ||
| 555 | if_kind.set(if_level, until_endif_seen_else); | ||
| 556 | if (pp.verbose) { | ||
| 557 | pp.verboseLog(directive, "#else branch here", .{}); | ||
| 558 | } | ||
| 559 | }, | ||
| 560 | until_endif => try pp.skip(&tokenizer, .until_endif_seen_else), | ||
| 561 | until_endif_seen_else => { | ||
| 562 | try pp.err(directive, .else_after_else); | ||
| 563 | skipToNl(&tokenizer); | ||
| 564 | }, | ||
| 565 | else => unreachable, | ||
| 566 | } | ||
| 567 | }, | ||
| 568 | .keyword_endif => { | ||
| 569 | try pp.expectNl(&tokenizer); | ||
| 570 | if (if_level == 0) { | ||
| 571 | guard_name = null; | ||
| 572 | try pp.err(directive, .endif_without_if); | ||
| 573 | continue; | ||
| 574 | } else if (if_level == 1) { | ||
| 575 | const saved_tokenizer = tokenizer; | ||
| 576 | defer tokenizer = saved_tokenizer; | ||
| 577 | |||
| 578 | var next = tokenizer.nextNoWS(); | ||
| 579 | while (next.id == .nl) : (next = tokenizer.nextNoWS()) {} | ||
| 580 | if (next.id != .eof) guard_name = null; | ||
| 581 | } | ||
| 582 | if_level -= 1; | ||
| 583 | }, | ||
| 584 | .keyword_define => try pp.define(&tokenizer), | ||
| 585 | .keyword_undef => { | ||
| 586 | const macro_name = (try pp.expectMacroName(&tokenizer)) orelse continue; | ||
| 587 | |||
| 588 | _ = pp.defines.remove(macro_name); | ||
| 589 | try pp.expectNl(&tokenizer); | ||
| 590 | }, | ||
| 591 | .keyword_include => { | ||
| 592 | try pp.include(&tokenizer, .first); | ||
| 593 | continue; | ||
| 594 | }, | ||
| 595 | .keyword_include_next => { | ||
| 596 | try pp.comp.addDiagnostic(.{ | ||
| 597 | .tag = .include_next, | ||
| 598 | .loc = .{ .id = tok.source, .byte_offset = directive.start, .line = directive.line }, | ||
| 599 | }, &.{}); | ||
| 600 | if (pp.include_depth == 0) { | ||
| 601 | try pp.comp.addDiagnostic(.{ | ||
| 602 | .tag = .include_next_outside_header, | ||
| 603 | .loc = .{ .id = tok.source, .byte_offset = directive.start, .line = directive.line }, | ||
| 604 | }, &.{}); | ||
| 605 | try pp.include(&tokenizer, .first); | ||
| 606 | } else { | ||
| 607 | try pp.include(&tokenizer, .next); | ||
| 608 | } | ||
| 609 | }, | ||
| 610 | .keyword_embed => try pp.embed(&tokenizer), | ||
| 611 | .keyword_pragma => { | ||
| 612 | try pp.pragma(&tokenizer, directive, null, &.{}); | ||
| 613 | continue; | ||
| 614 | }, | ||
| 615 | .keyword_line => { | ||
| 616 | // #line number "file" | ||
| 617 | const digits = tokenizer.nextNoWS(); | ||
| 618 | if (digits.id != .pp_num) try pp.err(digits, .line_simple_digit); | ||
| 619 | // TODO: validate that the pp_num token is solely digits | ||
| 620 | |||
| 621 | if (digits.id == .eof or digits.id == .nl) continue; | ||
| 622 | const name = tokenizer.nextNoWS(); | ||
| 623 | if (name.id == .eof or name.id == .nl) continue; | ||
| 624 | if (name.id != .string_literal) try pp.err(name, .line_invalid_filename); | ||
| 625 | try pp.expectNl(&tokenizer); | ||
| 626 | }, | ||
| 627 | .pp_num => { | ||
| 628 | // # number "file" flags | ||
| 629 | // TODO: validate that the pp_num token is solely digits | ||
| 630 | // if not, emit `GNU line marker directive requires a simple digit sequence` | ||
| 631 | const name = tokenizer.nextNoWS(); | ||
| 632 | if (name.id == .eof or name.id == .nl) continue; | ||
| 633 | if (name.id != .string_literal) try pp.err(name, .line_invalid_filename); | ||
| 634 | |||
| 635 | const flag_1 = tokenizer.nextNoWS(); | ||
| 636 | if (flag_1.id == .eof or flag_1.id == .nl) continue; | ||
| 637 | const flag_2 = tokenizer.nextNoWS(); | ||
| 638 | if (flag_2.id == .eof or flag_2.id == .nl) continue; | ||
| 639 | const flag_3 = tokenizer.nextNoWS(); | ||
| 640 | if (flag_3.id == .eof or flag_3.id == .nl) continue; | ||
| 641 | const flag_4 = tokenizer.nextNoWS(); | ||
| 642 | if (flag_4.id == .eof or flag_4.id == .nl) continue; | ||
| 643 | try pp.expectNl(&tokenizer); | ||
| 644 | }, | ||
| 645 | .nl => {}, | ||
| 646 | .eof => { | ||
| 647 | if (if_level != 0) try pp.err(tok, .unterminated_conditional_directive); | ||
| 648 | return tokFromRaw(directive); | ||
| 649 | }, | ||
| 650 | else => { | ||
| 651 | try pp.err(tok, .invalid_preprocessing_directive); | ||
| 652 | skipToNl(&tokenizer); | ||
| 653 | }, | ||
| 654 | } | ||
| 655 | if (pp.preserve_whitespace) { | ||
| 656 | tok.id = .nl; | ||
| 657 | try pp.tokens.append(pp.gpa, tokFromRaw(tok)); | ||
| 658 | } | ||
| 659 | }, | ||
| 660 | .whitespace => if (pp.preserve_whitespace) try pp.tokens.append(pp.gpa, tokFromRaw(tok)), | ||
| 661 | .nl => { | ||
| 662 | start_of_line = true; | ||
| 663 | if (pp.preserve_whitespace) try pp.tokens.append(pp.gpa, tokFromRaw(tok)); | ||
| 664 | }, | ||
| 665 | .eof => { | ||
| 666 | if (if_level != 0) try pp.err(tok, .unterminated_conditional_directive); | ||
| 667 | // The following check needs to occur here and not at the top of the function | ||
| 668 | // because a pragma may change the level during preprocessing | ||
| 669 | if (source.buf.len > 0 and source.buf[source.buf.len - 1] != '\n') { | ||
| 670 | try pp.err(tok, .newline_eof); | ||
| 671 | } | ||
| 672 | if (guard_name) |name| { | ||
| 673 | if (try pp.include_guards.fetchPut(pp.gpa, source.id, name)) |prev| { | ||
| 674 | assert(mem.eql(u8, name, prev.value)); | ||
| 675 | } | ||
| 676 | } | ||
| 677 | return tokFromRaw(tok); | ||
| 678 | }, | ||
| 679 | .unterminated_string_literal, .unterminated_char_literal, .empty_char_literal => |tag| { | ||
| 680 | start_of_line = false; | ||
| 681 | try pp.err(tok, invalidTokenDiagnostic(tag)); | ||
| 682 | try pp.expandMacro(&tokenizer, tok); | ||
| 683 | }, | ||
| 684 | .unterminated_comment => try pp.err(tok, .unterminated_comment), | ||
| 685 | else => { | ||
| 686 | if (tok.id.isMacroIdentifier() and pp.poisoned_identifiers.get(pp.tokSlice(tok)) != null) { | ||
| 687 | try pp.err(tok, .poisoned_identifier); | ||
| 688 | } | ||
| 689 | // Add the token to the buffer doing any necessary expansions. | ||
| 690 | start_of_line = false; | ||
| 691 | try pp.expandMacro(&tokenizer, tok); | ||
| 692 | }, | ||
| 693 | } | ||
| 694 | } | ||
| 695 | } | ||
| 696 | |||
| 697 | /// Get raw token source string. | ||
| 698 | /// Returned slice is invalidated when comp.generated_buf is updated. | ||
| 699 | pub fn tokSlice(pp: *Preprocessor, token: RawToken) []const u8 { | ||
| 700 | if (token.id.lexeme()) |some| return some; | ||
| 701 | const source = pp.comp.getSource(token.source); | ||
| 702 | return source.buf[token.start..token.end]; | ||
| 703 | } | ||
| 704 | |||
| 705 | /// Convert a token from the Tokenizer into a token used by the parser. | ||
| 706 | fn tokFromRaw(raw: RawToken) Token { | ||
| 707 | return .{ | ||
| 708 | .id = raw.id, | ||
| 709 | .loc = .{ | ||
| 710 | .id = raw.source, | ||
| 711 | .byte_offset = raw.start, | ||
| 712 | .line = raw.line, | ||
| 713 | }, | ||
| 714 | }; | ||
| 715 | } | ||
| 716 | |||
| 717 | fn err(pp: *Preprocessor, raw: RawToken, tag: Diagnostics.Tag) !void { | ||
| 718 | try pp.comp.addDiagnostic(.{ | ||
| 719 | .tag = tag, | ||
| 720 | .loc = .{ | ||
| 721 | .id = raw.source, | ||
| 722 | .byte_offset = raw.start, | ||
| 723 | .line = raw.line, | ||
| 724 | }, | ||
| 725 | }, &.{}); | ||
| 726 | } | ||
| 727 | |||
| 728 | fn errStr(pp: *Preprocessor, tok: Token, tag: Diagnostics.Tag, str: []const u8) !void { | ||
| 729 | try pp.comp.addDiagnostic(.{ | ||
| 730 | .tag = tag, | ||
| 731 | .loc = tok.loc, | ||
| 732 | .extra = .{ .str = str }, | ||
| 733 | }, tok.expansionSlice()); | ||
| 734 | } | ||
| 735 | |||
| 736 | fn fatal(pp: *Preprocessor, raw: RawToken, comptime fmt: []const u8, args: anytype) Compilation.Error { | ||
| 737 | try pp.comp.diagnostics.list.append(pp.gpa, .{ | ||
| 738 | .tag = .cli_error, | ||
| 739 | .kind = .@"fatal error", | ||
| 740 | .extra = .{ .str = try std.fmt.allocPrint(pp.comp.diagnostics.arena.allocator(), fmt, args) }, | ||
| 741 | .loc = .{ | ||
| 742 | .id = raw.source, | ||
| 743 | .byte_offset = raw.start, | ||
| 744 | .line = raw.line, | ||
| 745 | }, | ||
| 746 | }); | ||
| 747 | return error.FatalError; | ||
| 748 | } | ||
| 749 | |||
| 750 | fn verboseLog(pp: *Preprocessor, raw: RawToken, comptime fmt: []const u8, args: anytype) void { | ||
| 751 | const source = pp.comp.getSource(raw.source); | ||
| 752 | const line_col = source.lineCol(.{ .id = raw.source, .line = raw.line, .byte_offset = raw.start }); | ||
| 753 | |||
| 754 | const stderr = std.io.getStdErr().writer(); | ||
| 755 | var buf_writer = std.io.bufferedWriter(stderr); | ||
| 756 | const writer = buf_writer.writer(); | ||
| 757 | defer buf_writer.flush() catch {}; | ||
| 758 | writer.print("{s}:{d}:{d}: ", .{ source.path, line_col.line_no, line_col.col }) catch return; | ||
| 759 | writer.print(fmt, args) catch return; | ||
| 760 | writer.writeByte('\n') catch return; | ||
| 761 | writer.writeAll(line_col.line) catch return; | ||
| 762 | writer.writeByte('\n') catch return; | ||
| 763 | } | ||
| 764 | |||
| 765 | /// Consume next token, error if it is not an identifier. | ||
| 766 | fn expectMacroName(pp: *Preprocessor, tokenizer: *Tokenizer) Error!?[]const u8 { | ||
| 767 | const macro_name = tokenizer.nextNoWS(); | ||
| 768 | if (!macro_name.id.isMacroIdentifier()) { | ||
| 769 | try pp.err(macro_name, .macro_name_missing); | ||
| 770 | skipToNl(tokenizer); | ||
| 771 | return null; | ||
| 772 | } | ||
| 773 | return pp.tokSlice(macro_name); | ||
| 774 | } | ||
| 775 | |||
| 776 | /// Skip until after a newline, error if extra tokens before it. | ||
| 777 | fn expectNl(pp: *Preprocessor, tokenizer: *Tokenizer) Error!void { | ||
| 778 | var sent_err = false; | ||
| 779 | while (true) { | ||
| 780 | const tok = tokenizer.next(); | ||
| 781 | if (tok.id == .nl or tok.id == .eof) return; | ||
| 782 | if (tok.id == .whitespace) continue; | ||
| 783 | if (!sent_err) { | ||
| 784 | sent_err = true; | ||
| 785 | try pp.err(tok, .extra_tokens_directive_end); | ||
| 786 | } | ||
| 787 | } | ||
| 788 | } | ||
| 789 | |||
| 790 | /// Consume all tokens until a newline and parse the result into a boolean. | ||
| 791 | fn expr(pp: *Preprocessor, tokenizer: *Tokenizer) MacroError!bool { | ||
| 792 | const start = pp.tokens.len; | ||
| 793 | defer { | ||
| 794 | for (pp.top_expansion_buf.items) |tok| Token.free(tok.expansion_locs, pp.gpa); | ||
| 795 | pp.tokens.len = start; | ||
| 796 | } | ||
| 797 | |||
| 798 | pp.top_expansion_buf.items.len = 0; | ||
| 799 | const eof = while (true) { | ||
| 800 | const tok = tokenizer.next(); | ||
| 801 | switch (tok.id) { | ||
| 802 | .nl, .eof => break tok, | ||
| 803 | .whitespace => if (pp.top_expansion_buf.items.len == 0) continue, | ||
| 804 | else => {}, | ||
| 805 | } | ||
| 806 | try pp.top_expansion_buf.append(tokFromRaw(tok)); | ||
| 807 | } else unreachable; | ||
| 808 | if (pp.top_expansion_buf.items.len != 0) { | ||
| 809 | pp.expansion_source_loc = pp.top_expansion_buf.items[0].loc; | ||
| 810 | try pp.expandMacroExhaustive(tokenizer, &pp.top_expansion_buf, 0, pp.top_expansion_buf.items.len, false, .expr); | ||
| 811 | } | ||
| 812 | for (pp.top_expansion_buf.items) |tok| { | ||
| 813 | if (tok.id == .macro_ws) continue; | ||
| 814 | if (!tok.id.validPreprocessorExprStart()) { | ||
| 815 | try pp.comp.addDiagnostic(.{ | ||
| 816 | .tag = .invalid_preproc_expr_start, | ||
| 817 | .loc = tok.loc, | ||
| 818 | }, tok.expansionSlice()); | ||
| 819 | return false; | ||
| 820 | } | ||
| 821 | break; | ||
| 822 | } else { | ||
| 823 | try pp.err(eof, .expected_value_in_expr); | ||
| 824 | return false; | ||
| 825 | } | ||
| 826 | |||
| 827 | // validate the tokens in the expression | ||
| 828 | try pp.tokens.ensureUnusedCapacity(pp.gpa, pp.top_expansion_buf.items.len); | ||
| 829 | var i: usize = 0; | ||
| 830 | const items = pp.top_expansion_buf.items; | ||
| 831 | while (i < items.len) : (i += 1) { | ||
| 832 | var tok = items[i]; | ||
| 833 | switch (tok.id) { | ||
| 834 | .string_literal, | ||
| 835 | .string_literal_utf_16, | ||
| 836 | .string_literal_utf_8, | ||
| 837 | .string_literal_utf_32, | ||
| 838 | .string_literal_wide, | ||
| 839 | => { | ||
| 840 | try pp.comp.addDiagnostic(.{ | ||
| 841 | .tag = .string_literal_in_pp_expr, | ||
| 842 | .loc = tok.loc, | ||
| 843 | }, tok.expansionSlice()); | ||
| 844 | return false; | ||
| 845 | }, | ||
| 846 | .plus_plus, | ||
| 847 | .minus_minus, | ||
| 848 | .plus_equal, | ||
| 849 | .minus_equal, | ||
| 850 | .asterisk_equal, | ||
| 851 | .slash_equal, | ||
| 852 | .percent_equal, | ||
| 853 | .angle_bracket_angle_bracket_left_equal, | ||
| 854 | .angle_bracket_angle_bracket_right_equal, | ||
| 855 | .ampersand_equal, | ||
| 856 | .caret_equal, | ||
| 857 | .pipe_equal, | ||
| 858 | .l_bracket, | ||
| 859 | .r_bracket, | ||
| 860 | .l_brace, | ||
| 861 | .r_brace, | ||
| 862 | .ellipsis, | ||
| 863 | .semicolon, | ||
| 864 | .hash, | ||
| 865 | .hash_hash, | ||
| 866 | .equal, | ||
| 867 | .arrow, | ||
| 868 | .period, | ||
| 869 | => { | ||
| 870 | try pp.comp.addDiagnostic(.{ | ||
| 871 | .tag = .invalid_preproc_operator, | ||
| 872 | .loc = tok.loc, | ||
| 873 | }, tok.expansionSlice()); | ||
| 874 | return false; | ||
| 875 | }, | ||
| 876 | .macro_ws, .whitespace => continue, | ||
| 877 | .keyword_false => tok.id = .zero, | ||
| 878 | .keyword_true => tok.id = .one, | ||
| 879 | else => if (tok.id.isMacroIdentifier()) { | ||
| 880 | if (tok.id == .keyword_defined) { | ||
| 881 | const tokens_consumed = try pp.handleKeywordDefined(&tok, items[i + 1 ..], eof); | ||
| 882 | i += tokens_consumed; | ||
| 883 | } else { | ||
| 884 | try pp.errStr(tok, .undefined_macro, pp.expandedSlice(tok)); | ||
| 885 | |||
| 886 | if (i + 1 < pp.top_expansion_buf.items.len and | ||
| 887 | pp.top_expansion_buf.items[i + 1].id == .l_paren) | ||
| 888 | { | ||
| 889 | try pp.errStr(tok, .fn_macro_undefined, pp.expandedSlice(tok)); | ||
| 890 | return false; | ||
| 891 | } | ||
| 892 | |||
| 893 | tok.id = .zero; // undefined macro | ||
| 894 | } | ||
| 895 | }, | ||
| 896 | } | ||
| 897 | pp.tokens.appendAssumeCapacity(tok); | ||
| 898 | } | ||
| 899 | try pp.tokens.append(pp.gpa, .{ | ||
| 900 | .id = .eof, | ||
| 901 | .loc = tokFromRaw(eof).loc, | ||
| 902 | }); | ||
| 903 | |||
| 904 | // Actually parse it. | ||
| 905 | var parser = Parser{ | ||
| 906 | .pp = pp, | ||
| 907 | .comp = pp.comp, | ||
| 908 | .gpa = pp.gpa, | ||
| 909 | .tok_ids = pp.tokens.items(.id), | ||
| 910 | .tok_i = @intCast(start), | ||
| 911 | .arena = pp.arena.allocator(), | ||
| 912 | .in_macro = true, | ||
| 913 | .strings = std.ArrayList(u8).init(pp.comp.gpa), | ||
| 914 | |||
| 915 | .data = undefined, | ||
| 916 | .value_map = undefined, | ||
| 917 | .labels = undefined, | ||
| 918 | .decl_buf = undefined, | ||
| 919 | .list_buf = undefined, | ||
| 920 | .param_buf = undefined, | ||
| 921 | .enum_buf = undefined, | ||
| 922 | .record_buf = undefined, | ||
| 923 | .attr_buf = undefined, | ||
| 924 | .field_attr_buf = undefined, | ||
| 925 | .string_ids = undefined, | ||
| 926 | }; | ||
| 927 | defer parser.strings.deinit(); | ||
| 928 | return parser.macroExpr(); | ||
| 929 | } | ||
| 930 | |||
| 931 | /// Turns macro_tok from .keyword_defined into .zero or .one depending on whether the argument is defined | ||
| 932 | /// Returns the number of tokens consumed | ||
| 933 | fn handleKeywordDefined(pp: *Preprocessor, macro_tok: *Token, tokens: []const Token, eof: RawToken) !usize { | ||
| 934 | std.debug.assert(macro_tok.id == .keyword_defined); | ||
| 935 | var it = TokenIterator.init(tokens); | ||
| 936 | const first = it.nextNoWS() orelse { | ||
| 937 | try pp.err(eof, .macro_name_missing); | ||
| 938 | return it.i; | ||
| 939 | }; | ||
| 940 | switch (first.id) { | ||
| 941 | .l_paren => {}, | ||
| 942 | else => { | ||
| 943 | if (!first.id.isMacroIdentifier()) { | ||
| 944 | try pp.errStr(first, .macro_name_must_be_identifier, pp.expandedSlice(first)); | ||
| 945 | } | ||
| 946 | macro_tok.id = if (pp.defines.contains(pp.expandedSlice(first))) .one else .zero; | ||
| 947 | return it.i; | ||
| 948 | }, | ||
| 949 | } | ||
| 950 | const second = it.nextNoWS() orelse { | ||
| 951 | try pp.err(eof, .macro_name_missing); | ||
| 952 | return it.i; | ||
| 953 | }; | ||
| 954 | if (!second.id.isMacroIdentifier()) { | ||
| 955 | try pp.comp.addDiagnostic(.{ | ||
| 956 | .tag = .macro_name_must_be_identifier, | ||
| 957 | .loc = second.loc, | ||
| 958 | }, second.expansionSlice()); | ||
| 959 | return it.i; | ||
| 960 | } | ||
| 961 | macro_tok.id = if (pp.defines.contains(pp.expandedSlice(second))) .one else .zero; | ||
| 962 | |||
| 963 | const last = it.nextNoWS(); | ||
| 964 | if (last == null or last.?.id != .r_paren) { | ||
| 965 | const tok = last orelse tokFromRaw(eof); | ||
| 966 | try pp.comp.addDiagnostic(.{ | ||
| 967 | .tag = .closing_paren, | ||
| 968 | .loc = tok.loc, | ||
| 969 | }, tok.expansionSlice()); | ||
| 970 | try pp.comp.addDiagnostic(.{ | ||
| 971 | .tag = .to_match_paren, | ||
| 972 | .loc = first.loc, | ||
| 973 | }, first.expansionSlice()); | ||
| 974 | } | ||
| 975 | |||
| 976 | return it.i; | ||
| 977 | } | ||
| 978 | |||
| 979 | /// Skip until #else #elif #endif, return last directive token id. | ||
| 980 | /// Also skips nested #if ... #endifs. | ||
| 981 | fn skip( | ||
| 982 | pp: *Preprocessor, | ||
| 983 | tokenizer: *Tokenizer, | ||
| 984 | cont: enum { until_else, until_endif, until_endif_seen_else }, | ||
| 985 | ) Error!void { | ||
| 986 | var ifs_seen: u32 = 0; | ||
| 987 | var line_start = true; | ||
| 988 | while (tokenizer.index < tokenizer.buf.len) { | ||
| 989 | if (line_start) { | ||
| 990 | const saved_tokenizer = tokenizer.*; | ||
| 991 | const hash = tokenizer.nextNoWS(); | ||
| 992 | if (hash.id == .nl) continue; | ||
| 993 | line_start = false; | ||
| 994 | if (hash.id != .hash) continue; | ||
| 995 | const directive = tokenizer.nextNoWS(); | ||
| 996 | switch (directive.id) { | ||
| 997 | .keyword_else => { | ||
| 998 | if (ifs_seen != 0) continue; | ||
| 999 | if (cont == .until_endif_seen_else) { | ||
| 1000 | try pp.err(directive, .else_after_else); | ||
| 1001 | continue; | ||
| 1002 | } | ||
| 1003 | tokenizer.* = saved_tokenizer; | ||
| 1004 | return; | ||
| 1005 | }, | ||
| 1006 | .keyword_elif => { | ||
| 1007 | if (ifs_seen != 0 or cont == .until_endif) continue; | ||
| 1008 | if (cont == .until_endif_seen_else) { | ||
| 1009 | try pp.err(directive, .elif_after_else); | ||
| 1010 | continue; | ||
| 1011 | } | ||
| 1012 | tokenizer.* = saved_tokenizer; | ||
| 1013 | return; | ||
| 1014 | }, | ||
| 1015 | .keyword_elifdef => { | ||
| 1016 | if (ifs_seen != 0 or cont == .until_endif) continue; | ||
| 1017 | if (cont == .until_endif_seen_else) { | ||
| 1018 | try pp.err(directive, .elifdef_after_else); | ||
| 1019 | continue; | ||
| 1020 | } | ||
| 1021 | tokenizer.* = saved_tokenizer; | ||
| 1022 | return; | ||
| 1023 | }, | ||
| 1024 | .keyword_elifndef => { | ||
| 1025 | if (ifs_seen != 0 or cont == .until_endif) continue; | ||
| 1026 | if (cont == .until_endif_seen_else) { | ||
| 1027 | try pp.err(directive, .elifndef_after_else); | ||
| 1028 | continue; | ||
| 1029 | } | ||
| 1030 | tokenizer.* = saved_tokenizer; | ||
| 1031 | return; | ||
| 1032 | }, | ||
| 1033 | .keyword_endif => { | ||
| 1034 | if (ifs_seen == 0) { | ||
| 1035 | tokenizer.* = saved_tokenizer; | ||
| 1036 | return; | ||
| 1037 | } | ||
| 1038 | ifs_seen -= 1; | ||
| 1039 | }, | ||
| 1040 | .keyword_if, .keyword_ifdef, .keyword_ifndef => ifs_seen += 1, | ||
| 1041 | else => {}, | ||
| 1042 | } | ||
| 1043 | } else if (tokenizer.buf[tokenizer.index] == '\n') { | ||
| 1044 | line_start = true; | ||
| 1045 | tokenizer.index += 1; | ||
| 1046 | tokenizer.line += 1; | ||
| 1047 | if (pp.preserve_whitespace) { | ||
| 1048 | try pp.tokens.append(pp.gpa, .{ .id = .nl, .loc = .{ | ||
| 1049 | .id = tokenizer.source, | ||
| 1050 | .line = tokenizer.line, | ||
| 1051 | } }); | ||
| 1052 | } | ||
| 1053 | } else { | ||
| 1054 | line_start = false; | ||
| 1055 | tokenizer.index += 1; | ||
| 1056 | } | ||
| 1057 | } else { | ||
| 1058 | const eof = tokenizer.next(); | ||
| 1059 | return pp.err(eof, .unterminated_conditional_directive); | ||
| 1060 | } | ||
| 1061 | } | ||
| 1062 | |||
| 1063 | // Skip until newline, ignore other tokens. | ||
| 1064 | fn skipToNl(tokenizer: *Tokenizer) void { | ||
| 1065 | while (true) { | ||
| 1066 | const tok = tokenizer.next(); | ||
| 1067 | if (tok.id == .nl or tok.id == .eof) return; | ||
| 1068 | } | ||
| 1069 | } | ||
| 1070 | |||
| 1071 | const ExpandBuf = std.ArrayList(Token); | ||
| 1072 | fn removePlacemarkers(buf: *ExpandBuf) void { | ||
| 1073 | var i: usize = buf.items.len -% 1; | ||
| 1074 | while (i < buf.items.len) : (i -%= 1) { | ||
| 1075 | if (buf.items[i].id == .placemarker) { | ||
| 1076 | const placemarker = buf.orderedRemove(i); | ||
| 1077 | Token.free(placemarker.expansion_locs, buf.allocator); | ||
| 1078 | } | ||
| 1079 | } | ||
| 1080 | } | ||
| 1081 | |||
| 1082 | const MacroArguments = std.ArrayList([]const Token); | ||
| 1083 | fn deinitMacroArguments(allocator: Allocator, args: *const MacroArguments) void { | ||
| 1084 | for (args.items) |item| { | ||
| 1085 | for (item) |tok| Token.free(tok.expansion_locs, allocator); | ||
| 1086 | allocator.free(item); | ||
| 1087 | } | ||
| 1088 | args.deinit(); | ||
| 1089 | } | ||
| 1090 | |||
| 1091 | fn expandObjMacro(pp: *Preprocessor, simple_macro: *const Macro) Error!ExpandBuf { | ||
| 1092 | var buf = ExpandBuf.init(pp.gpa); | ||
| 1093 | errdefer buf.deinit(); | ||
| 1094 | try buf.ensureTotalCapacity(simple_macro.tokens.len); | ||
| 1095 | |||
| 1096 | // Add all of the simple_macros tokens to the new buffer handling any concats. | ||
| 1097 | var i: usize = 0; | ||
| 1098 | while (i < simple_macro.tokens.len) : (i += 1) { | ||
| 1099 | const raw = simple_macro.tokens[i]; | ||
| 1100 | const tok = tokFromRaw(raw); | ||
| 1101 | switch (raw.id) { | ||
| 1102 | .hash_hash => { | ||
| 1103 | var rhs = tokFromRaw(simple_macro.tokens[i + 1]); | ||
| 1104 | i += 1; | ||
| 1105 | while (true) { | ||
| 1106 | if (rhs.id == .whitespace) { | ||
| 1107 | rhs = tokFromRaw(simple_macro.tokens[i + 1]); | ||
| 1108 | i += 1; | ||
| 1109 | } else if (rhs.id == .comment and !pp.comp.langopts.preserve_comments_in_macros) { | ||
| 1110 | rhs = tokFromRaw(simple_macro.tokens[i + 1]); | ||
| 1111 | i += 1; | ||
| 1112 | } else break; | ||
| 1113 | } | ||
| 1114 | try pp.pasteTokens(&buf, &.{rhs}); | ||
| 1115 | }, | ||
| 1116 | .whitespace => if (pp.preserve_whitespace) buf.appendAssumeCapacity(tok), | ||
| 1117 | .macro_file => { | ||
| 1118 | const start = pp.comp.generated_buf.items.len; | ||
| 1119 | const source = pp.comp.getSource(pp.expansion_source_loc.id); | ||
| 1120 | const w = pp.comp.generated_buf.writer(pp.gpa); | ||
| 1121 | try w.print("\"{s}\"\n", .{source.path}); | ||
| 1122 | |||
| 1123 | buf.appendAssumeCapacity(try pp.makeGeneratedToken(start, .string_literal, tok)); | ||
| 1124 | }, | ||
| 1125 | .macro_line => { | ||
| 1126 | const start = pp.comp.generated_buf.items.len; | ||
| 1127 | const source = pp.comp.getSource(pp.expansion_source_loc.id); | ||
| 1128 | const w = pp.comp.generated_buf.writer(pp.gpa); | ||
| 1129 | try w.print("{d}\n", .{source.physicalLine(pp.expansion_source_loc)}); | ||
| 1130 | |||
| 1131 | buf.appendAssumeCapacity(try pp.makeGeneratedToken(start, .pp_num, tok)); | ||
| 1132 | }, | ||
| 1133 | .macro_counter => { | ||
| 1134 | defer pp.counter += 1; | ||
| 1135 | const start = pp.comp.generated_buf.items.len; | ||
| 1136 | const w = pp.comp.generated_buf.writer(pp.gpa); | ||
| 1137 | try w.print("{d}\n", .{pp.counter}); | ||
| 1138 | |||
| 1139 | buf.appendAssumeCapacity(try pp.makeGeneratedToken(start, .pp_num, tok)); | ||
| 1140 | }, | ||
| 1141 | else => buf.appendAssumeCapacity(tok), | ||
| 1142 | } | ||
| 1143 | } | ||
| 1144 | |||
| 1145 | return buf; | ||
| 1146 | } | ||
| 1147 | |||
| 1148 | /// Join a possibly-parenthesized series of string literal tokens into a single string without | ||
| 1149 | /// leading or trailing quotes. The returned slice is invalidated if pp.char_buf changes. | ||
| 1150 | /// Returns error.ExpectedStringLiteral if parentheses are not balanced, a non-string-literal | ||
| 1151 | /// is encountered, or if no string literals are encountered | ||
| 1152 | /// TODO: destringize (replace all '\\' with a single `\` and all '\"' with a '"') | ||
| 1153 | fn pasteStringsUnsafe(pp: *Preprocessor, toks: []const Token) ![]const u8 { | ||
| 1154 | const char_top = pp.char_buf.items.len; | ||
| 1155 | defer pp.char_buf.items.len = char_top; | ||
| 1156 | var unwrapped = toks; | ||
| 1157 | if (toks.len >= 2 and toks[0].id == .l_paren and toks[toks.len - 1].id == .r_paren) { | ||
| 1158 | unwrapped = toks[1 .. toks.len - 1]; | ||
| 1159 | } | ||
| 1160 | if (unwrapped.len == 0) return error.ExpectedStringLiteral; | ||
| 1161 | |||
| 1162 | for (unwrapped) |tok| { | ||
| 1163 | if (tok.id == .macro_ws) continue; | ||
| 1164 | if (tok.id != .string_literal) return error.ExpectedStringLiteral; | ||
| 1165 | const str = pp.expandedSlice(tok); | ||
| 1166 | try pp.char_buf.appendSlice(str[1 .. str.len - 1]); | ||
| 1167 | } | ||
| 1168 | return pp.char_buf.items[char_top..]; | ||
| 1169 | } | ||
| 1170 | |||
| 1171 | /// Handle the _Pragma operator (implemented as a builtin macro) | ||
| 1172 | fn pragmaOperator(pp: *Preprocessor, arg_tok: Token, operator_loc: Source.Location) !void { | ||
| 1173 | const arg_slice = pp.expandedSlice(arg_tok); | ||
| 1174 | const content = arg_slice[1 .. arg_slice.len - 1]; | ||
| 1175 | const directive = "#pragma "; | ||
| 1176 | |||
| 1177 | pp.char_buf.clearRetainingCapacity(); | ||
| 1178 | const total_len = directive.len + content.len + 1; // destringify can never grow the string, + 1 for newline | ||
| 1179 | try pp.char_buf.ensureUnusedCapacity(total_len); | ||
| 1180 | pp.char_buf.appendSliceAssumeCapacity(directive); | ||
| 1181 | pp.destringify(content); | ||
| 1182 | pp.char_buf.appendAssumeCapacity('\n'); | ||
| 1183 | |||
| 1184 | const start = pp.comp.generated_buf.items.len; | ||
| 1185 | try pp.comp.generated_buf.appendSlice(pp.gpa, pp.char_buf.items); | ||
| 1186 | var tmp_tokenizer = Tokenizer{ | ||
| 1187 | .buf = pp.comp.generated_buf.items, | ||
| 1188 | .comp = pp.comp, | ||
| 1189 | .index = @intCast(start), | ||
| 1190 | .source = .generated, | ||
| 1191 | .line = pp.generated_line, | ||
| 1192 | }; | ||
| 1193 | pp.generated_line += 1; | ||
| 1194 | const hash_tok = tmp_tokenizer.next(); | ||
| 1195 | assert(hash_tok.id == .hash); | ||
| 1196 | const pragma_tok = tmp_tokenizer.next(); | ||
| 1197 | assert(pragma_tok.id == .keyword_pragma); | ||
| 1198 | try pp.pragma(&tmp_tokenizer, pragma_tok, operator_loc, arg_tok.expansionSlice()); | ||
| 1199 | } | ||
| 1200 | |||
| 1201 | /// Inverts the output of the preprocessor stringify (#) operation | ||
| 1202 | /// (except all whitespace is condensed to a single space) | ||
| 1203 | /// writes output to pp.char_buf; assumes capacity is sufficient | ||
| 1204 | /// backslash backslash -> backslash | ||
| 1205 | /// backslash doublequote -> doublequote | ||
| 1206 | /// All other characters remain the same | ||
| 1207 | fn destringify(pp: *Preprocessor, str: []const u8) void { | ||
| 1208 | var state: enum { start, backslash_seen } = .start; | ||
| 1209 | for (str) |c| { | ||
| 1210 | switch (c) { | ||
| 1211 | '\\' => { | ||
| 1212 | if (state == .backslash_seen) pp.char_buf.appendAssumeCapacity(c); | ||
| 1213 | state = if (state == .start) .backslash_seen else .start; | ||
| 1214 | }, | ||
| 1215 | else => { | ||
| 1216 | if (state == .backslash_seen and c != '"') pp.char_buf.appendAssumeCapacity('\\'); | ||
| 1217 | pp.char_buf.appendAssumeCapacity(c); | ||
| 1218 | state = .start; | ||
| 1219 | }, | ||
| 1220 | } | ||
| 1221 | } | ||
| 1222 | } | ||
| 1223 | |||
| 1224 | /// Stringify `tokens` into pp.char_buf. | ||
| 1225 | /// See https://gcc.gnu.org/onlinedocs/gcc-11.2.0/cpp/Stringizing.html#Stringizing | ||
| 1226 | fn stringify(pp: *Preprocessor, tokens: []const Token) !void { | ||
| 1227 | try pp.char_buf.append('"'); | ||
| 1228 | var ws_state: enum { start, need, not_needed } = .start; | ||
| 1229 | for (tokens) |tok| { | ||
| 1230 | if (tok.id == .macro_ws) { | ||
| 1231 | if (ws_state == .start) continue; | ||
| 1232 | ws_state = .need; | ||
| 1233 | continue; | ||
| 1234 | } | ||
| 1235 | if (ws_state == .need) try pp.char_buf.append(' '); | ||
| 1236 | ws_state = .not_needed; | ||
| 1237 | |||
| 1238 | // backslashes not inside strings are not escaped | ||
| 1239 | const is_str = switch (tok.id) { | ||
| 1240 | .string_literal, | ||
| 1241 | .string_literal_utf_16, | ||
| 1242 | .string_literal_utf_8, | ||
| 1243 | .string_literal_utf_32, | ||
| 1244 | .string_literal_wide, | ||
| 1245 | .char_literal, | ||
| 1246 | .char_literal_utf_16, | ||
| 1247 | .char_literal_utf_32, | ||
| 1248 | .char_literal_wide, | ||
| 1249 | => true, | ||
| 1250 | else => false, | ||
| 1251 | }; | ||
| 1252 | |||
| 1253 | for (pp.expandedSlice(tok)) |c| { | ||
| 1254 | if (c == '"') | ||
| 1255 | try pp.char_buf.appendSlice("\\\"") | ||
| 1256 | else if (c == '\\' and is_str) | ||
| 1257 | try pp.char_buf.appendSlice("\\\\") | ||
| 1258 | else | ||
| 1259 | try pp.char_buf.append(c); | ||
| 1260 | } | ||
| 1261 | } | ||
| 1262 | if (pp.char_buf.items[pp.char_buf.items.len - 1] == '\\') { | ||
| 1263 | const tok = tokens[tokens.len - 1]; | ||
| 1264 | try pp.comp.addDiagnostic(.{ | ||
| 1265 | .tag = .invalid_pp_stringify_escape, | ||
| 1266 | .loc = tok.loc, | ||
| 1267 | }, tok.expansionSlice()); | ||
| 1268 | pp.char_buf.items.len -= 1; | ||
| 1269 | } | ||
| 1270 | try pp.char_buf.appendSlice("\"\n"); | ||
| 1271 | } | ||
| 1272 | |||
| 1273 | fn reconstructIncludeString(pp: *Preprocessor, param_toks: []const Token, embed_args: ?*[]const Token) !?[]const u8 { | ||
| 1274 | const char_top = pp.char_buf.items.len; | ||
| 1275 | defer pp.char_buf.items.len = char_top; | ||
| 1276 | |||
| 1277 | // Trim leading/trailing whitespace | ||
| 1278 | var begin: usize = 0; | ||
| 1279 | var end: usize = param_toks.len; | ||
| 1280 | while (begin < end and param_toks[begin].id == .macro_ws) : (begin += 1) {} | ||
| 1281 | while (end > begin and param_toks[end - 1].id == .macro_ws) : (end -= 1) {} | ||
| 1282 | const params = param_toks[begin..end]; | ||
| 1283 | |||
| 1284 | if (params.len == 0) { | ||
| 1285 | try pp.comp.addDiagnostic(.{ | ||
| 1286 | .tag = .expected_filename, | ||
| 1287 | .loc = param_toks[0].loc, | ||
| 1288 | }, param_toks[0].expansionSlice()); | ||
| 1289 | return null; | ||
| 1290 | } | ||
| 1291 | // no string pasting | ||
| 1292 | if (embed_args == null and params[0].id == .string_literal and params.len > 1) { | ||
| 1293 | try pp.comp.addDiagnostic(.{ | ||
| 1294 | .tag = .closing_paren, | ||
| 1295 | .loc = params[1].loc, | ||
| 1296 | }, params[1].expansionSlice()); | ||
| 1297 | return null; | ||
| 1298 | } | ||
| 1299 | |||
| 1300 | for (params, 0..) |tok, i| { | ||
| 1301 | const str = pp.expandedSliceExtra(tok, .preserve_macro_ws); | ||
| 1302 | try pp.char_buf.appendSlice(str); | ||
| 1303 | if (embed_args) |some| { | ||
| 1304 | if ((i == 0 and tok.id == .string_literal) or tok.id == .angle_bracket_right) { | ||
| 1305 | some.* = params[i + 1 ..]; | ||
| 1306 | break; | ||
| 1307 | } | ||
| 1308 | } | ||
| 1309 | } | ||
| 1310 | |||
| 1311 | const include_str = pp.char_buf.items[char_top..]; | ||
| 1312 | if (include_str.len < 3) { | ||
| 1313 | try pp.comp.addDiagnostic(.{ | ||
| 1314 | .tag = .empty_filename, | ||
| 1315 | .loc = params[0].loc, | ||
| 1316 | }, params[0].expansionSlice()); | ||
| 1317 | return null; | ||
| 1318 | } | ||
| 1319 | |||
| 1320 | switch (include_str[0]) { | ||
| 1321 | '<' => { | ||
| 1322 | if (include_str[include_str.len - 1] != '>') { | ||
| 1323 | // Ugly hack to find out where the '>' should go, since we don't have the closing ')' location | ||
| 1324 | const start = params[0].loc; | ||
| 1325 | try pp.comp.addDiagnostic(.{ | ||
| 1326 | .tag = .header_str_closing, | ||
| 1327 | .loc = .{ .id = start.id, .byte_offset = start.byte_offset + @as(u32, @intCast(include_str.len)) + 1, .line = start.line }, | ||
| 1328 | }, params[0].expansionSlice()); | ||
| 1329 | try pp.comp.addDiagnostic(.{ | ||
| 1330 | .tag = .header_str_match, | ||
| 1331 | .loc = params[0].loc, | ||
| 1332 | }, params[0].expansionSlice()); | ||
| 1333 | return null; | ||
| 1334 | } | ||
| 1335 | return include_str; | ||
| 1336 | }, | ||
| 1337 | '"' => return include_str, | ||
| 1338 | else => { | ||
| 1339 | try pp.comp.addDiagnostic(.{ | ||
| 1340 | .tag = .expected_filename, | ||
| 1341 | .loc = params[0].loc, | ||
| 1342 | }, params[0].expansionSlice()); | ||
| 1343 | return null; | ||
| 1344 | }, | ||
| 1345 | } | ||
| 1346 | } | ||
| 1347 | |||
| 1348 | fn handleBuiltinMacro(pp: *Preprocessor, builtin: RawToken.Id, param_toks: []const Token, src_loc: Source.Location) Error!bool { | ||
| 1349 | switch (builtin) { | ||
| 1350 | .macro_param_has_attribute, | ||
| 1351 | .macro_param_has_declspec_attribute, | ||
| 1352 | .macro_param_has_feature, | ||
| 1353 | .macro_param_has_extension, | ||
| 1354 | .macro_param_has_builtin, | ||
| 1355 | => { | ||
| 1356 | var invalid: ?Token = null; | ||
| 1357 | var identifier: ?Token = null; | ||
| 1358 | for (param_toks) |tok| { | ||
| 1359 | if (tok.id == .macro_ws) continue; | ||
| 1360 | if (tok.id == .comment) continue; | ||
| 1361 | if (!tok.id.isMacroIdentifier()) { | ||
| 1362 | invalid = tok; | ||
| 1363 | break; | ||
| 1364 | } | ||
| 1365 | if (identifier) |_| invalid = tok else identifier = tok; | ||
| 1366 | } | ||
| 1367 | if (identifier == null and invalid == null) invalid = .{ .id = .eof, .loc = src_loc }; | ||
| 1368 | if (invalid) |some| { | ||
| 1369 | try pp.comp.addDiagnostic( | ||
| 1370 | .{ .tag = .feature_check_requires_identifier, .loc = some.loc }, | ||
| 1371 | some.expansionSlice(), | ||
| 1372 | ); | ||
| 1373 | return false; | ||
| 1374 | } | ||
| 1375 | |||
| 1376 | const ident_str = pp.expandedSlice(identifier.?); | ||
| 1377 | return switch (builtin) { | ||
| 1378 | .macro_param_has_attribute => Attribute.fromString(.gnu, null, ident_str) != null, | ||
| 1379 | .macro_param_has_declspec_attribute => { | ||
| 1380 | return if (pp.comp.langopts.declspec_attrs) | ||
| 1381 | Attribute.fromString(.declspec, null, ident_str) != null | ||
| 1382 | else | ||
| 1383 | false; | ||
| 1384 | }, | ||
| 1385 | .macro_param_has_feature => features.hasFeature(pp.comp, ident_str), | ||
| 1386 | .macro_param_has_extension => features.hasExtension(pp.comp, ident_str), | ||
| 1387 | .macro_param_has_builtin => pp.comp.hasBuiltin(ident_str), | ||
| 1388 | else => unreachable, | ||
| 1389 | }; | ||
| 1390 | }, | ||
| 1391 | .macro_param_has_warning => { | ||
| 1392 | const actual_param = pp.pasteStringsUnsafe(param_toks) catch |er| switch (er) { | ||
| 1393 | error.ExpectedStringLiteral => { | ||
| 1394 | try pp.errStr(param_toks[0], .expected_str_literal_in, "__has_warning"); | ||
| 1395 | return false; | ||
| 1396 | }, | ||
| 1397 | else => |e| return e, | ||
| 1398 | }; | ||
| 1399 | if (!mem.startsWith(u8, actual_param, "-W")) { | ||
| 1400 | try pp.errStr(param_toks[0], .malformed_warning_check, "__has_warning"); | ||
| 1401 | return false; | ||
| 1402 | } | ||
| 1403 | const warning_name = actual_param[2..]; | ||
| 1404 | return Diagnostics.warningExists(warning_name); | ||
| 1405 | }, | ||
| 1406 | .macro_param_is_identifier => { | ||
| 1407 | var invalid: ?Token = null; | ||
| 1408 | var identifier: ?Token = null; | ||
| 1409 | for (param_toks) |tok| switch (tok.id) { | ||
| 1410 | .macro_ws => continue, | ||
| 1411 | .comment => continue, | ||
| 1412 | else => { | ||
| 1413 | if (identifier) |_| invalid = tok else identifier = tok; | ||
| 1414 | }, | ||
| 1415 | }; | ||
| 1416 | if (identifier == null and invalid == null) invalid = .{ .id = .eof, .loc = src_loc }; | ||
| 1417 | if (invalid) |some| { | ||
| 1418 | try pp.comp.addDiagnostic(.{ | ||
| 1419 | .tag = .missing_tok_builtin, | ||
| 1420 | .loc = some.loc, | ||
| 1421 | .extra = .{ .tok_id_expected = .r_paren }, | ||
| 1422 | }, some.expansionSlice()); | ||
| 1423 | return false; | ||
| 1424 | } | ||
| 1425 | |||
| 1426 | const id = identifier.?.id; | ||
| 1427 | return id == .identifier or id == .extended_identifier; | ||
| 1428 | }, | ||
| 1429 | .macro_param_has_include, .macro_param_has_include_next => { | ||
| 1430 | const include_str = (try pp.reconstructIncludeString(param_toks, null)) orelse return false; | ||
| 1431 | const include_type: Compilation.IncludeType = switch (include_str[0]) { | ||
| 1432 | '"' => .quotes, | ||
| 1433 | '<' => .angle_brackets, | ||
| 1434 | else => unreachable, | ||
| 1435 | }; | ||
| 1436 | const filename = include_str[1 .. include_str.len - 1]; | ||
| 1437 | if (builtin == .macro_param_has_include or pp.include_depth == 0) { | ||
| 1438 | if (builtin == .macro_param_has_include_next) { | ||
| 1439 | try pp.comp.addDiagnostic(.{ | ||
| 1440 | .tag = .include_next_outside_header, | ||
| 1441 | .loc = src_loc, | ||
| 1442 | }, &.{}); | ||
| 1443 | } | ||
| 1444 | return pp.comp.hasInclude(filename, src_loc.id, include_type, .first); | ||
| 1445 | } | ||
| 1446 | return pp.comp.hasInclude(filename, src_loc.id, include_type, .next); | ||
| 1447 | }, | ||
| 1448 | else => unreachable, | ||
| 1449 | } | ||
| 1450 | } | ||
| 1451 | |||
| 1452 | fn expandFuncMacro( | ||
| 1453 | pp: *Preprocessor, | ||
| 1454 | loc: Source.Location, | ||
| 1455 | func_macro: *const Macro, | ||
| 1456 | args: *const MacroArguments, | ||
| 1457 | expanded_args: *const MacroArguments, | ||
| 1458 | ) MacroError!ExpandBuf { | ||
| 1459 | var buf = ExpandBuf.init(pp.gpa); | ||
| 1460 | try buf.ensureTotalCapacity(func_macro.tokens.len); | ||
| 1461 | errdefer buf.deinit(); | ||
| 1462 | |||
| 1463 | var expanded_variable_arguments = ExpandBuf.init(pp.gpa); | ||
| 1464 | defer expanded_variable_arguments.deinit(); | ||
| 1465 | var variable_arguments = ExpandBuf.init(pp.gpa); | ||
| 1466 | defer variable_arguments.deinit(); | ||
| 1467 | |||
| 1468 | if (func_macro.var_args) { | ||
| 1469 | var i: usize = func_macro.params.len; | ||
| 1470 | while (i < expanded_args.items.len) : (i += 1) { | ||
| 1471 | try variable_arguments.appendSlice(args.items[i]); | ||
| 1472 | try expanded_variable_arguments.appendSlice(expanded_args.items[i]); | ||
| 1473 | if (i != expanded_args.items.len - 1) { | ||
| 1474 | const comma = Token{ .id = .comma, .loc = .{ .id = .generated } }; | ||
| 1475 | try variable_arguments.append(comma); | ||
| 1476 | try expanded_variable_arguments.append(comma); | ||
| 1477 | } | ||
| 1478 | } | ||
| 1479 | } | ||
| 1480 | |||
| 1481 | // token concatenation and expansion phase | ||
| 1482 | var tok_i: usize = 0; | ||
| 1483 | while (tok_i < func_macro.tokens.len) : (tok_i += 1) { | ||
| 1484 | const raw = func_macro.tokens[tok_i]; | ||
| 1485 | switch (raw.id) { | ||
| 1486 | .hash_hash => while (tok_i + 1 < func_macro.tokens.len) { | ||
| 1487 | const raw_next = func_macro.tokens[tok_i + 1]; | ||
| 1488 | tok_i += 1; | ||
| 1489 | |||
| 1490 | var va_opt_buf = ExpandBuf.init(pp.gpa); | ||
| 1491 | defer va_opt_buf.deinit(); | ||
| 1492 | |||
| 1493 | const next = switch (raw_next.id) { | ||
| 1494 | .macro_ws => continue, | ||
| 1495 | .hash_hash => continue, | ||
| 1496 | .comment => if (!pp.comp.langopts.preserve_comments_in_macros) | ||
| 1497 | continue | ||
| 1498 | else | ||
| 1499 | &[1]Token{tokFromRaw(raw_next)}, | ||
| 1500 | .macro_param, .macro_param_no_expand => if (args.items[raw_next.end].len > 0) | ||
| 1501 | args.items[raw_next.end] | ||
| 1502 | else | ||
| 1503 | &[1]Token{tokFromRaw(.{ .id = .placemarker, .source = .generated })}, | ||
| 1504 | .keyword_va_args => variable_arguments.items, | ||
| 1505 | .keyword_va_opt => blk: { | ||
| 1506 | try pp.expandVaOpt(&va_opt_buf, raw_next, variable_arguments.items.len != 0); | ||
| 1507 | if (va_opt_buf.items.len == 0) break; | ||
| 1508 | break :blk va_opt_buf.items; | ||
| 1509 | }, | ||
| 1510 | else => &[1]Token{tokFromRaw(raw_next)}, | ||
| 1511 | }; | ||
| 1512 | |||
| 1513 | try pp.pasteTokens(&buf, next); | ||
| 1514 | if (next.len != 0) break; | ||
| 1515 | }, | ||
| 1516 | .macro_param_no_expand => { | ||
| 1517 | const slice = if (args.items[raw.end].len > 0) | ||
| 1518 | args.items[raw.end] | ||
| 1519 | else | ||
| 1520 | &[1]Token{tokFromRaw(.{ .id = .placemarker, .source = .generated })}; | ||
| 1521 | const raw_loc = Source.Location{ .id = raw.source, .byte_offset = raw.start, .line = raw.line }; | ||
| 1522 | try bufCopyTokens(&buf, slice, &.{raw_loc}); | ||
| 1523 | }, | ||
| 1524 | .macro_param => { | ||
| 1525 | const arg = expanded_args.items[raw.end]; | ||
| 1526 | const raw_loc = Source.Location{ .id = raw.source, .byte_offset = raw.start, .line = raw.line }; | ||
| 1527 | try bufCopyTokens(&buf, arg, &.{raw_loc}); | ||
| 1528 | }, | ||
| 1529 | .keyword_va_args => { | ||
| 1530 | const raw_loc = Source.Location{ .id = raw.source, .byte_offset = raw.start, .line = raw.line }; | ||
| 1531 | try bufCopyTokens(&buf, expanded_variable_arguments.items, &.{raw_loc}); | ||
| 1532 | }, | ||
| 1533 | .keyword_va_opt => { | ||
| 1534 | try pp.expandVaOpt(&buf, raw, variable_arguments.items.len != 0); | ||
| 1535 | }, | ||
| 1536 | .stringify_param, .stringify_va_args => { | ||
| 1537 | const arg = if (raw.id == .stringify_va_args) | ||
| 1538 | variable_arguments.items | ||
| 1539 | else | ||
| 1540 | args.items[raw.end]; | ||
| 1541 | |||
| 1542 | pp.char_buf.clearRetainingCapacity(); | ||
| 1543 | try pp.stringify(arg); | ||
| 1544 | |||
| 1545 | const start = pp.comp.generated_buf.items.len; | ||
| 1546 | try pp.comp.generated_buf.appendSlice(pp.gpa, pp.char_buf.items); | ||
| 1547 | |||
| 1548 | try buf.append(try pp.makeGeneratedToken(start, .string_literal, tokFromRaw(raw))); | ||
| 1549 | }, | ||
| 1550 | .macro_param_has_attribute, | ||
| 1551 | .macro_param_has_declspec_attribute, | ||
| 1552 | .macro_param_has_warning, | ||
| 1553 | .macro_param_has_feature, | ||
| 1554 | .macro_param_has_extension, | ||
| 1555 | .macro_param_has_builtin, | ||
| 1556 | .macro_param_has_include, | ||
| 1557 | .macro_param_has_include_next, | ||
| 1558 | .macro_param_is_identifier, | ||
| 1559 | => { | ||
| 1560 | const arg = expanded_args.items[0]; | ||
| 1561 | const result = if (arg.len == 0) blk: { | ||
| 1562 | const extra = Diagnostics.Message.Extra{ .arguments = .{ .expected = 1, .actual = 0 } }; | ||
| 1563 | try pp.comp.addDiagnostic(.{ .tag = .expected_arguments, .loc = loc, .extra = extra }, &.{}); | ||
| 1564 | break :blk false; | ||
| 1565 | } else try pp.handleBuiltinMacro(raw.id, arg, loc); | ||
| 1566 | const start = pp.comp.generated_buf.items.len; | ||
| 1567 | const w = pp.comp.generated_buf.writer(pp.gpa); | ||
| 1568 | try w.print("{}\n", .{@intFromBool(result)}); | ||
| 1569 | try buf.append(try pp.makeGeneratedToken(start, .pp_num, tokFromRaw(raw))); | ||
| 1570 | }, | ||
| 1571 | .macro_param_has_c_attribute => { | ||
| 1572 | const arg = expanded_args.items[0]; | ||
| 1573 | const not_found = "0\n"; | ||
| 1574 | const result = if (arg.len == 0) blk: { | ||
| 1575 | const extra = Diagnostics.Message.Extra{ .arguments = .{ .expected = 1, .actual = 0 } }; | ||
| 1576 | try pp.comp.addDiagnostic(.{ .tag = .expected_arguments, .loc = loc, .extra = extra }, &.{}); | ||
| 1577 | break :blk not_found; | ||
| 1578 | } else res: { | ||
| 1579 | var invalid: ?Token = null; | ||
| 1580 | var vendor_ident: ?Token = null; | ||
| 1581 | var colon_colon: ?Token = null; | ||
| 1582 | var attr_ident: ?Token = null; | ||
| 1583 | for (arg) |tok| { | ||
| 1584 | if (tok.id == .macro_ws) continue; | ||
| 1585 | if (tok.id == .comment) continue; | ||
| 1586 | if (tok.id == .colon_colon) { | ||
| 1587 | if (colon_colon != null or attr_ident == null) { | ||
| 1588 | invalid = tok; | ||
| 1589 | break; | ||
| 1590 | } | ||
| 1591 | vendor_ident = attr_ident; | ||
| 1592 | attr_ident = null; | ||
| 1593 | colon_colon = tok; | ||
| 1594 | continue; | ||
| 1595 | } | ||
| 1596 | if (!tok.id.isMacroIdentifier()) { | ||
| 1597 | invalid = tok; | ||
| 1598 | break; | ||
| 1599 | } | ||
| 1600 | if (attr_ident) |_| { | ||
| 1601 | invalid = tok; | ||
| 1602 | break; | ||
| 1603 | } else attr_ident = tok; | ||
| 1604 | } | ||
| 1605 | if (vendor_ident != null and attr_ident == null) { | ||
| 1606 | invalid = vendor_ident; | ||
| 1607 | } else if (attr_ident == null and invalid == null) { | ||
| 1608 | invalid = .{ .id = .eof, .loc = loc }; | ||
| 1609 | } | ||
| 1610 | if (invalid) |some| { | ||
| 1611 | try pp.comp.addDiagnostic( | ||
| 1612 | .{ .tag = .feature_check_requires_identifier, .loc = some.loc }, | ||
| 1613 | some.expansionSlice(), | ||
| 1614 | ); | ||
| 1615 | break :res not_found; | ||
| 1616 | } | ||
| 1617 | if (vendor_ident) |some| { | ||
| 1618 | const vendor_str = pp.expandedSlice(some); | ||
| 1619 | const attr_str = pp.expandedSlice(attr_ident.?); | ||
| 1620 | const exists = Attribute.fromString(.gnu, vendor_str, attr_str) != null; | ||
| 1621 | |||
| 1622 | const start = pp.comp.generated_buf.items.len; | ||
| 1623 | try pp.comp.generated_buf.appendSlice(pp.gpa, if (exists) "1\n" else "0\n"); | ||
| 1624 | try buf.append(try pp.makeGeneratedToken(start, .pp_num, tokFromRaw(raw))); | ||
| 1625 | continue; | ||
| 1626 | } | ||
| 1627 | if (!pp.comp.langopts.standard.atLeast(.c23)) break :res not_found; | ||
| 1628 | |||
| 1629 | const attrs = std.ComptimeStringMap([]const u8, .{ | ||
| 1630 | .{ "deprecated", "201904L\n" }, | ||
| 1631 | .{ "fallthrough", "201904L\n" }, | ||
| 1632 | .{ "maybe_unused", "201904L\n" }, | ||
| 1633 | .{ "nodiscard", "202003L\n" }, | ||
| 1634 | .{ "noreturn", "202202L\n" }, | ||
| 1635 | .{ "_Noreturn", "202202L\n" }, | ||
| 1636 | .{ "unsequenced", "202207L\n" }, | ||
| 1637 | .{ "reproducible", "202207L\n" }, | ||
| 1638 | }); | ||
| 1639 | |||
| 1640 | const attr_str = Attribute.normalize(pp.expandedSlice(attr_ident.?)); | ||
| 1641 | break :res attrs.get(attr_str) orelse not_found; | ||
| 1642 | }; | ||
| 1643 | const start = pp.comp.generated_buf.items.len; | ||
| 1644 | try pp.comp.generated_buf.appendSlice(pp.gpa, result); | ||
| 1645 | try buf.append(try pp.makeGeneratedToken(start, .pp_num, tokFromRaw(raw))); | ||
| 1646 | }, | ||
| 1647 | .macro_param_has_embed => { | ||
| 1648 | const arg = expanded_args.items[0]; | ||
| 1649 | const not_found = "0\n"; | ||
| 1650 | const result = if (arg.len == 0) blk: { | ||
| 1651 | const extra = Diagnostics.Message.Extra{ .arguments = .{ .expected = 1, .actual = 0 } }; | ||
| 1652 | try pp.comp.addDiagnostic(.{ .tag = .expected_arguments, .loc = loc, .extra = extra }, &.{}); | ||
| 1653 | break :blk not_found; | ||
| 1654 | } else res: { | ||
| 1655 | var embed_args: []const Token = &.{}; | ||
| 1656 | const include_str = (try pp.reconstructIncludeString(arg, &embed_args)) orelse | ||
| 1657 | break :res not_found; | ||
| 1658 | |||
| 1659 | var prev = tokFromRaw(raw); | ||
| 1660 | prev.id = .eof; | ||
| 1661 | var it: struct { | ||
| 1662 | i: u32 = 0, | ||
| 1663 | slice: []const Token, | ||
| 1664 | prev: Token, | ||
| 1665 | fn next(it: *@This()) Token { | ||
| 1666 | while (it.i < it.slice.len) switch (it.slice[it.i].id) { | ||
| 1667 | .macro_ws, .whitespace => it.i += 1, | ||
| 1668 | else => break, | ||
| 1669 | } else return it.prev; | ||
| 1670 | defer it.i += 1; | ||
| 1671 | it.prev = it.slice[it.i]; | ||
| 1672 | it.prev.id = .eof; | ||
| 1673 | return it.slice[it.i]; | ||
| 1674 | } | ||
| 1675 | } = .{ .slice = embed_args, .prev = prev }; | ||
| 1676 | |||
| 1677 | while (true) { | ||
| 1678 | const param_first = it.next(); | ||
| 1679 | if (param_first.id == .eof) break; | ||
| 1680 | if (param_first.id != .identifier) { | ||
| 1681 | try pp.comp.addDiagnostic( | ||
| 1682 | .{ .tag = .malformed_embed_param, .loc = param_first.loc }, | ||
| 1683 | param_first.expansionSlice(), | ||
| 1684 | ); | ||
| 1685 | continue; | ||
| 1686 | } | ||
| 1687 | |||
| 1688 | const char_top = pp.char_buf.items.len; | ||
| 1689 | defer pp.char_buf.items.len = char_top; | ||
| 1690 | |||
| 1691 | const maybe_colon = it.next(); | ||
| 1692 | const param = switch (maybe_colon.id) { | ||
| 1693 | .colon_colon => blk: { | ||
| 1694 | // vendor::param | ||
| 1695 | const param = it.next(); | ||
| 1696 | if (param.id != .identifier) { | ||
| 1697 | try pp.comp.addDiagnostic( | ||
| 1698 | .{ .tag = .malformed_embed_param, .loc = param.loc }, | ||
| 1699 | param.expansionSlice(), | ||
| 1700 | ); | ||
| 1701 | continue; | ||
| 1702 | } | ||
| 1703 | const l_paren = it.next(); | ||
| 1704 | if (l_paren.id != .l_paren) { | ||
| 1705 | try pp.comp.addDiagnostic( | ||
| 1706 | .{ .tag = .malformed_embed_param, .loc = l_paren.loc }, | ||
| 1707 | l_paren.expansionSlice(), | ||
| 1708 | ); | ||
| 1709 | continue; | ||
| 1710 | } | ||
| 1711 | break :blk "doesn't exist"; | ||
| 1712 | }, | ||
| 1713 | .l_paren => Attribute.normalize(pp.expandedSlice(param_first)), | ||
| 1714 | else => { | ||
| 1715 | try pp.comp.addDiagnostic( | ||
| 1716 | .{ .tag = .malformed_embed_param, .loc = maybe_colon.loc }, | ||
| 1717 | maybe_colon.expansionSlice(), | ||
| 1718 | ); | ||
| 1719 | continue; | ||
| 1720 | }, | ||
| 1721 | }; | ||
| 1722 | |||
| 1723 | var arg_count: u32 = 0; | ||
| 1724 | var first_arg: Token = undefined; | ||
| 1725 | while (true) { | ||
| 1726 | const next = it.next(); | ||
| 1727 | if (next.id == .eof) { | ||
| 1728 | try pp.comp.addDiagnostic( | ||
| 1729 | .{ .tag = .malformed_embed_limit, .loc = param_first.loc }, | ||
| 1730 | param_first.expansionSlice(), | ||
| 1731 | ); | ||
| 1732 | break; | ||
| 1733 | } | ||
| 1734 | if (next.id == .r_paren) break; | ||
| 1735 | arg_count += 1; | ||
| 1736 | if (arg_count == 1) first_arg = next; | ||
| 1737 | } | ||
| 1738 | |||
| 1739 | if (std.mem.eql(u8, param, "limit")) { | ||
| 1740 | if (arg_count != 1) { | ||
| 1741 | try pp.comp.addDiagnostic( | ||
| 1742 | .{ .tag = .malformed_embed_limit, .loc = param_first.loc }, | ||
| 1743 | param_first.expansionSlice(), | ||
| 1744 | ); | ||
| 1745 | continue; | ||
| 1746 | } | ||
| 1747 | if (first_arg.id != .pp_num) { | ||
| 1748 | try pp.comp.addDiagnostic( | ||
| 1749 | .{ .tag = .malformed_embed_limit, .loc = param_first.loc }, | ||
| 1750 | param_first.expansionSlice(), | ||
| 1751 | ); | ||
| 1752 | continue; | ||
| 1753 | } | ||
| 1754 | _ = std.fmt.parseInt(u32, pp.expandedSlice(first_arg), 10) catch { | ||
| 1755 | break :res not_found; | ||
| 1756 | }; | ||
| 1757 | } else if (!std.mem.eql(u8, param, "prefix") and !std.mem.eql(u8, param, "suffix") and | ||
| 1758 | !std.mem.eql(u8, param, "if_empty")) | ||
| 1759 | { | ||
| 1760 | break :res not_found; | ||
| 1761 | } | ||
| 1762 | } | ||
| 1763 | |||
| 1764 | const include_type: Compilation.IncludeType = switch (include_str[0]) { | ||
| 1765 | '"' => .quotes, | ||
| 1766 | '<' => .angle_brackets, | ||
| 1767 | else => unreachable, | ||
| 1768 | }; | ||
| 1769 | const filename = include_str[1 .. include_str.len - 1]; | ||
| 1770 | const contents = (try pp.comp.findEmbed(filename, arg[0].loc.id, include_type, 1)) orelse | ||
| 1771 | break :res not_found; | ||
| 1772 | |||
| 1773 | defer pp.comp.gpa.free(contents); | ||
| 1774 | break :res if (contents.len != 0) "1\n" else "2\n"; | ||
| 1775 | }; | ||
| 1776 | const start = pp.comp.generated_buf.items.len; | ||
| 1777 | try pp.comp.generated_buf.appendSlice(pp.comp.gpa, result); | ||
| 1778 | try buf.append(try pp.makeGeneratedToken(start, .pp_num, tokFromRaw(raw))); | ||
| 1779 | }, | ||
| 1780 | .macro_param_pragma_operator => { | ||
| 1781 | const param_toks = expanded_args.items[0]; | ||
| 1782 | // Clang and GCC require exactly one token (so, no parentheses or string pasting) | ||
| 1783 | // even though their error messages indicate otherwise. Ours is slightly more | ||
| 1784 | // descriptive. | ||
| 1785 | var invalid: ?Token = null; | ||
| 1786 | var string: ?Token = null; | ||
| 1787 | for (param_toks) |tok| switch (tok.id) { | ||
| 1788 | .string_literal => { | ||
| 1789 | if (string) |_| invalid = tok else string = tok; | ||
| 1790 | }, | ||
| 1791 | .macro_ws => continue, | ||
| 1792 | .comment => continue, | ||
| 1793 | else => { | ||
| 1794 | invalid = tok; | ||
| 1795 | break; | ||
| 1796 | }, | ||
| 1797 | }; | ||
| 1798 | if (string == null and invalid == null) invalid = .{ .loc = loc, .id = .eof }; | ||
| 1799 | if (invalid) |some| try pp.comp.addDiagnostic( | ||
| 1800 | .{ .tag = .pragma_operator_string_literal, .loc = some.loc }, | ||
| 1801 | some.expansionSlice(), | ||
| 1802 | ) else try pp.pragmaOperator(string.?, loc); | ||
| 1803 | }, | ||
| 1804 | .comma => { | ||
| 1805 | if (tok_i + 2 < func_macro.tokens.len and func_macro.tokens[tok_i + 1].id == .hash_hash) { | ||
| 1806 | const hash_hash = func_macro.tokens[tok_i + 1]; | ||
| 1807 | var maybe_va_args = func_macro.tokens[tok_i + 2]; | ||
| 1808 | var consumed: usize = 2; | ||
| 1809 | if (maybe_va_args.id == .macro_ws and tok_i + 3 < func_macro.tokens.len) { | ||
| 1810 | consumed = 3; | ||
| 1811 | maybe_va_args = func_macro.tokens[tok_i + 3]; | ||
| 1812 | } | ||
| 1813 | if (maybe_va_args.id == .keyword_va_args) { | ||
| 1814 | // GNU extension: `, ##__VA_ARGS__` deletes the comma if __VA_ARGS__ is empty | ||
| 1815 | tok_i += consumed; | ||
| 1816 | if (func_macro.params.len == expanded_args.items.len) { | ||
| 1817 | // Empty __VA_ARGS__, drop the comma | ||
| 1818 | try pp.err(hash_hash, .comma_deletion_va_args); | ||
| 1819 | } else if (func_macro.params.len == 0 and expanded_args.items.len == 1 and expanded_args.items[0].len == 0) { | ||
| 1820 | // Ambiguous whether this is "empty __VA_ARGS__" or "__VA_ARGS__ omitted" | ||
| 1821 | if (pp.comp.langopts.standard.isGNU()) { | ||
| 1822 | // GNU standard, drop the comma | ||
| 1823 | try pp.err(hash_hash, .comma_deletion_va_args); | ||
| 1824 | } else { | ||
| 1825 | // C standard, retain the comma | ||
| 1826 | try buf.append(tokFromRaw(raw)); | ||
| 1827 | } | ||
| 1828 | } else { | ||
| 1829 | try buf.append(tokFromRaw(raw)); | ||
| 1830 | if (expanded_variable_arguments.items.len > 0 or variable_arguments.items.len == func_macro.params.len) { | ||
| 1831 | try pp.err(hash_hash, .comma_deletion_va_args); | ||
| 1832 | } | ||
| 1833 | const raw_loc = Source.Location{ | ||
| 1834 | .id = maybe_va_args.source, | ||
| 1835 | .byte_offset = maybe_va_args.start, | ||
| 1836 | .line = maybe_va_args.line, | ||
| 1837 | }; | ||
| 1838 | try bufCopyTokens(&buf, expanded_variable_arguments.items, &.{raw_loc}); | ||
| 1839 | } | ||
| 1840 | continue; | ||
| 1841 | } | ||
| 1842 | } | ||
| 1843 | // Regular comma, no token pasting with __VA_ARGS__ | ||
| 1844 | try buf.append(tokFromRaw(raw)); | ||
| 1845 | }, | ||
| 1846 | else => try buf.append(tokFromRaw(raw)), | ||
| 1847 | } | ||
| 1848 | } | ||
| 1849 | removePlacemarkers(&buf); | ||
| 1850 | |||
| 1851 | return buf; | ||
| 1852 | } | ||
| 1853 | |||
| 1854 | fn expandVaOpt( | ||
| 1855 | pp: *Preprocessor, | ||
| 1856 | buf: *ExpandBuf, | ||
| 1857 | raw: RawToken, | ||
| 1858 | should_expand: bool, | ||
| 1859 | ) !void { | ||
| 1860 | if (!should_expand) return; | ||
| 1861 | |||
| 1862 | const source = pp.comp.getSource(raw.source); | ||
| 1863 | var tokenizer: Tokenizer = .{ | ||
| 1864 | .buf = source.buf, | ||
| 1865 | .index = raw.start, | ||
| 1866 | .source = raw.source, | ||
| 1867 | .comp = pp.comp, | ||
| 1868 | .line = raw.line, | ||
| 1869 | }; | ||
| 1870 | while (tokenizer.index < raw.end) { | ||
| 1871 | const tok = tokenizer.next(); | ||
| 1872 | try buf.append(tokFromRaw(tok)); | ||
| 1873 | } | ||
| 1874 | } | ||
| 1875 | |||
| 1876 | fn shouldExpand(tok: Token, macro: *Macro) bool { | ||
| 1877 | if (tok.loc.id == macro.loc.id and | ||
| 1878 | tok.loc.byte_offset >= macro.start and | ||
| 1879 | tok.loc.byte_offset <= macro.end) | ||
| 1880 | return false; | ||
| 1881 | for (tok.expansionSlice()) |loc| { | ||
| 1882 | if (loc.id == macro.loc.id and | ||
| 1883 | loc.byte_offset >= macro.start and | ||
| 1884 | loc.byte_offset <= macro.end) | ||
| 1885 | return false; | ||
| 1886 | } | ||
| 1887 | if (tok.flags.expansion_disabled) return false; | ||
| 1888 | |||
| 1889 | return true; | ||
| 1890 | } | ||
| 1891 | |||
| 1892 | fn bufCopyTokens(buf: *ExpandBuf, tokens: []const Token, src: []const Source.Location) !void { | ||
| 1893 | try buf.ensureUnusedCapacity(tokens.len); | ||
| 1894 | for (tokens) |tok| { | ||
| 1895 | var copy = try tok.dupe(buf.allocator); | ||
| 1896 | errdefer Token.free(copy.expansion_locs, buf.allocator); | ||
| 1897 | try copy.addExpansionLocation(buf.allocator, src); | ||
| 1898 | buf.appendAssumeCapacity(copy); | ||
| 1899 | } | ||
| 1900 | } | ||
| 1901 | |||
| 1902 | fn nextBufToken( | ||
| 1903 | pp: *Preprocessor, | ||
| 1904 | tokenizer: *Tokenizer, | ||
| 1905 | buf: *ExpandBuf, | ||
| 1906 | start_idx: *usize, | ||
| 1907 | end_idx: *usize, | ||
| 1908 | extend_buf: bool, | ||
| 1909 | ) Error!Token { | ||
| 1910 | start_idx.* += 1; | ||
| 1911 | if (start_idx.* == buf.items.len and start_idx.* >= end_idx.*) { | ||
| 1912 | if (extend_buf) { | ||
| 1913 | const raw_tok = tokenizer.next(); | ||
| 1914 | if (raw_tok.id.isMacroIdentifier() and | ||
| 1915 | pp.poisoned_identifiers.get(pp.tokSlice(raw_tok)) != null) | ||
| 1916 | try pp.err(raw_tok, .poisoned_identifier); | ||
| 1917 | |||
| 1918 | if (raw_tok.id == .nl) pp.add_expansion_nl += 1; | ||
| 1919 | |||
| 1920 | const new_tok = tokFromRaw(raw_tok); | ||
| 1921 | end_idx.* += 1; | ||
| 1922 | try buf.append(new_tok); | ||
| 1923 | return new_tok; | ||
| 1924 | } else { | ||
| 1925 | return Token{ .id = .eof, .loc = .{ .id = .generated } }; | ||
| 1926 | } | ||
| 1927 | } else { | ||
| 1928 | return buf.items[start_idx.*]; | ||
| 1929 | } | ||
| 1930 | } | ||
| 1931 | |||
| 1932 | fn collectMacroFuncArguments( | ||
| 1933 | pp: *Preprocessor, | ||
| 1934 | tokenizer: *Tokenizer, | ||
| 1935 | buf: *ExpandBuf, | ||
| 1936 | start_idx: *usize, | ||
| 1937 | end_idx: *usize, | ||
| 1938 | extend_buf: bool, | ||
| 1939 | is_builtin: bool, | ||
| 1940 | ) !MacroArguments { | ||
| 1941 | const name_tok = buf.items[start_idx.*]; | ||
| 1942 | const saved_tokenizer = tokenizer.*; | ||
| 1943 | const old_end = end_idx.*; | ||
| 1944 | |||
| 1945 | while (true) { | ||
| 1946 | const tok = try nextBufToken(pp, tokenizer, buf, start_idx, end_idx, extend_buf); | ||
| 1947 | switch (tok.id) { | ||
| 1948 | .nl, .whitespace, .macro_ws => {}, | ||
| 1949 | .l_paren => break, | ||
| 1950 | else => { | ||
| 1951 | if (is_builtin) { | ||
| 1952 | try pp.errStr(name_tok, .missing_lparen_after_builtin, pp.expandedSlice(name_tok)); | ||
| 1953 | } | ||
| 1954 | // Not a macro function call, go over normal identifier, rewind | ||
| 1955 | tokenizer.* = saved_tokenizer; | ||
| 1956 | end_idx.* = old_end; | ||
| 1957 | return error.MissingLParen; | ||
| 1958 | }, | ||
| 1959 | } | ||
| 1960 | } | ||
| 1961 | |||
| 1962 | // collect the arguments. | ||
| 1963 | var parens: u32 = 0; | ||
| 1964 | var args = MacroArguments.init(pp.gpa); | ||
| 1965 | errdefer deinitMacroArguments(pp.gpa, &args); | ||
| 1966 | var curArgument = std.ArrayList(Token).init(pp.gpa); | ||
| 1967 | defer curArgument.deinit(); | ||
| 1968 | while (true) { | ||
| 1969 | var tok = try nextBufToken(pp, tokenizer, buf, start_idx, end_idx, extend_buf); | ||
| 1970 | tok.flags.is_macro_arg = true; | ||
| 1971 | switch (tok.id) { | ||
| 1972 | .comma => { | ||
| 1973 | if (parens == 0) { | ||
| 1974 | const owned = try curArgument.toOwnedSlice(); | ||
| 1975 | errdefer pp.gpa.free(owned); | ||
| 1976 | try args.append(owned); | ||
| 1977 | } else { | ||
| 1978 | const duped = try tok.dupe(pp.gpa); | ||
| 1979 | errdefer Token.free(duped.expansion_locs, pp.gpa); | ||
| 1980 | try curArgument.append(duped); | ||
| 1981 | } | ||
| 1982 | }, | ||
| 1983 | .l_paren => { | ||
| 1984 | const duped = try tok.dupe(pp.gpa); | ||
| 1985 | errdefer Token.free(duped.expansion_locs, pp.gpa); | ||
| 1986 | try curArgument.append(duped); | ||
| 1987 | parens += 1; | ||
| 1988 | }, | ||
| 1989 | .r_paren => { | ||
| 1990 | if (parens == 0) { | ||
| 1991 | const owned = try curArgument.toOwnedSlice(); | ||
| 1992 | errdefer pp.gpa.free(owned); | ||
| 1993 | try args.append(owned); | ||
| 1994 | break; | ||
| 1995 | } else { | ||
| 1996 | const duped = try tok.dupe(pp.gpa); | ||
| 1997 | errdefer Token.free(duped.expansion_locs, pp.gpa); | ||
| 1998 | try curArgument.append(duped); | ||
| 1999 | parens -= 1; | ||
| 2000 | } | ||
| 2001 | }, | ||
| 2002 | .eof => { | ||
| 2003 | { | ||
| 2004 | const owned = try curArgument.toOwnedSlice(); | ||
| 2005 | errdefer pp.gpa.free(owned); | ||
| 2006 | try args.append(owned); | ||
| 2007 | } | ||
| 2008 | tokenizer.* = saved_tokenizer; | ||
| 2009 | try pp.comp.addDiagnostic( | ||
| 2010 | .{ .tag = .unterminated_macro_arg_list, .loc = name_tok.loc }, | ||
| 2011 | name_tok.expansionSlice(), | ||
| 2012 | ); | ||
| 2013 | return error.Unterminated; | ||
| 2014 | }, | ||
| 2015 | .nl, .whitespace => { | ||
| 2016 | try curArgument.append(.{ .id = .macro_ws, .loc = tok.loc }); | ||
| 2017 | }, | ||
| 2018 | else => { | ||
| 2019 | const duped = try tok.dupe(pp.gpa); | ||
| 2020 | errdefer Token.free(duped.expansion_locs, pp.gpa); | ||
| 2021 | try curArgument.append(duped); | ||
| 2022 | }, | ||
| 2023 | } | ||
| 2024 | } | ||
| 2025 | |||
| 2026 | return args; | ||
| 2027 | } | ||
| 2028 | |||
| 2029 | fn removeExpandedTokens(pp: *Preprocessor, buf: *ExpandBuf, start: usize, len: usize, moving_end_idx: *usize) !void { | ||
| 2030 | for (buf.items[start .. start + len]) |tok| Token.free(tok.expansion_locs, pp.gpa); | ||
| 2031 | try buf.replaceRange(start, len, &.{}); | ||
| 2032 | moving_end_idx.* -|= len; | ||
| 2033 | } | ||
| 2034 | |||
| 2035 | /// The behavior of `defined` depends on whether we are in a preprocessor | ||
| 2036 | /// expression context (#if or #elif) or not. | ||
| 2037 | /// In a non-expression context it's just an identifier. Within a preprocessor | ||
| 2038 | /// expression it is a unary operator or one-argument function. | ||
| 2039 | const EvalContext = enum { | ||
| 2040 | expr, | ||
| 2041 | non_expr, | ||
| 2042 | }; | ||
| 2043 | |||
| 2044 | /// Helper for safely iterating over a slice of tokens while skipping whitespace | ||
| 2045 | const TokenIterator = struct { | ||
| 2046 | toks: []const Token, | ||
| 2047 | i: usize, | ||
| 2048 | |||
| 2049 | fn init(toks: []const Token) TokenIterator { | ||
| 2050 | return .{ .toks = toks, .i = 0 }; | ||
| 2051 | } | ||
| 2052 | |||
| 2053 | fn nextNoWS(self: *TokenIterator) ?Token { | ||
| 2054 | while (self.i < self.toks.len) : (self.i += 1) { | ||
| 2055 | const tok = self.toks[self.i]; | ||
| 2056 | if (tok.id == .whitespace or tok.id == .macro_ws) continue; | ||
| 2057 | |||
| 2058 | self.i += 1; | ||
| 2059 | return tok; | ||
| 2060 | } | ||
| 2061 | return null; | ||
| 2062 | } | ||
| 2063 | }; | ||
| 2064 | |||
| 2065 | fn expandMacroExhaustive( | ||
| 2066 | pp: *Preprocessor, | ||
| 2067 | tokenizer: *Tokenizer, | ||
| 2068 | buf: *ExpandBuf, | ||
| 2069 | start_idx: usize, | ||
| 2070 | end_idx: usize, | ||
| 2071 | extend_buf: bool, | ||
| 2072 | eval_ctx: EvalContext, | ||
| 2073 | ) MacroError!void { | ||
| 2074 | var moving_end_idx = end_idx; | ||
| 2075 | var advance_index: usize = 0; | ||
| 2076 | // rescan loop | ||
| 2077 | var do_rescan = true; | ||
| 2078 | while (do_rescan) { | ||
| 2079 | do_rescan = false; | ||
| 2080 | // expansion loop | ||
| 2081 | var idx: usize = start_idx + advance_index; | ||
| 2082 | while (idx < moving_end_idx) { | ||
| 2083 | const macro_tok = buf.items[idx]; | ||
| 2084 | if (macro_tok.id == .keyword_defined and eval_ctx == .expr) { | ||
| 2085 | idx += 1; | ||
| 2086 | var it = TokenIterator.init(buf.items[idx..moving_end_idx]); | ||
| 2087 | if (it.nextNoWS()) |tok| { | ||
| 2088 | switch (tok.id) { | ||
| 2089 | .l_paren => { | ||
| 2090 | _ = it.nextNoWS(); // eat (what should be) identifier | ||
| 2091 | _ = it.nextNoWS(); // eat (what should be) r paren | ||
| 2092 | }, | ||
| 2093 | .identifier, .extended_identifier => {}, | ||
| 2094 | else => {}, | ||
| 2095 | } | ||
| 2096 | } | ||
| 2097 | idx += it.i; | ||
| 2098 | continue; | ||
| 2099 | } | ||
| 2100 | const macro_entry = pp.defines.getPtr(pp.expandedSlice(macro_tok)); | ||
| 2101 | if (macro_entry == null or !shouldExpand(buf.items[idx], macro_entry.?)) { | ||
| 2102 | idx += 1; | ||
| 2103 | continue; | ||
| 2104 | } | ||
| 2105 | if (macro_entry) |macro| macro_handler: { | ||
| 2106 | if (macro.is_func) { | ||
| 2107 | var macro_scan_idx = idx; | ||
| 2108 | // to be saved in case this doesn't turn out to be a call | ||
| 2109 | const args = pp.collectMacroFuncArguments( | ||
| 2110 | tokenizer, | ||
| 2111 | buf, | ||
| 2112 | &macro_scan_idx, | ||
| 2113 | &moving_end_idx, | ||
| 2114 | extend_buf, | ||
| 2115 | macro.is_builtin, | ||
| 2116 | ) catch |er| switch (er) { | ||
| 2117 | error.MissingLParen => { | ||
| 2118 | if (!buf.items[idx].flags.is_macro_arg) buf.items[idx].flags.expansion_disabled = true; | ||
| 2119 | idx += 1; | ||
| 2120 | break :macro_handler; | ||
| 2121 | }, | ||
| 2122 | error.Unterminated => { | ||
| 2123 | if (pp.comp.langopts.emulate == .gcc) idx += 1; | ||
| 2124 | try pp.removeExpandedTokens(buf, idx, macro_scan_idx - idx, &moving_end_idx); | ||
| 2125 | break :macro_handler; | ||
| 2126 | }, | ||
| 2127 | else => |e| return e, | ||
| 2128 | }; | ||
| 2129 | defer { | ||
| 2130 | for (args.items) |item| { | ||
| 2131 | pp.gpa.free(item); | ||
| 2132 | } | ||
| 2133 | args.deinit(); | ||
| 2134 | } | ||
| 2135 | |||
| 2136 | var args_count: u32 = @intCast(args.items.len); | ||
| 2137 | // if the macro has zero arguments g() args_count is still 1 | ||
| 2138 | // an empty token list g() and a whitespace-only token list g( ) | ||
| 2139 | // counts as zero arguments for the purposes of argument-count validation | ||
| 2140 | if (args_count == 1 and macro.params.len == 0) { | ||
| 2141 | for (args.items[0]) |tok| { | ||
| 2142 | if (tok.id != .macro_ws) break; | ||
| 2143 | } else { | ||
| 2144 | args_count = 0; | ||
| 2145 | } | ||
| 2146 | } | ||
| 2147 | |||
| 2148 | // Validate argument count. | ||
| 2149 | const extra = Diagnostics.Message.Extra{ | ||
| 2150 | .arguments = .{ .expected = @intCast(macro.params.len), .actual = args_count }, | ||
| 2151 | }; | ||
| 2152 | if (macro.var_args and args_count < macro.params.len) { | ||
| 2153 | try pp.comp.addDiagnostic( | ||
| 2154 | .{ .tag = .expected_at_least_arguments, .loc = buf.items[idx].loc, .extra = extra }, | ||
| 2155 | buf.items[idx].expansionSlice(), | ||
| 2156 | ); | ||
| 2157 | idx += 1; | ||
| 2158 | try pp.removeExpandedTokens(buf, idx, macro_scan_idx - idx + 1, &moving_end_idx); | ||
| 2159 | continue; | ||
| 2160 | } | ||
| 2161 | if (!macro.var_args and args_count != macro.params.len) { | ||
| 2162 | try pp.comp.addDiagnostic( | ||
| 2163 | .{ .tag = .expected_arguments, .loc = buf.items[idx].loc, .extra = extra }, | ||
| 2164 | buf.items[idx].expansionSlice(), | ||
| 2165 | ); | ||
| 2166 | idx += 1; | ||
| 2167 | try pp.removeExpandedTokens(buf, idx, macro_scan_idx - idx + 1, &moving_end_idx); | ||
| 2168 | continue; | ||
| 2169 | } | ||
| 2170 | var expanded_args = MacroArguments.init(pp.gpa); | ||
| 2171 | defer deinitMacroArguments(pp.gpa, &expanded_args); | ||
| 2172 | try expanded_args.ensureTotalCapacity(args.items.len); | ||
| 2173 | for (args.items) |arg| { | ||
| 2174 | var expand_buf = ExpandBuf.init(pp.gpa); | ||
| 2175 | errdefer expand_buf.deinit(); | ||
| 2176 | try expand_buf.appendSlice(arg); | ||
| 2177 | |||
| 2178 | try pp.expandMacroExhaustive(tokenizer, &expand_buf, 0, expand_buf.items.len, false, eval_ctx); | ||
| 2179 | |||
| 2180 | expanded_args.appendAssumeCapacity(try expand_buf.toOwnedSlice()); | ||
| 2181 | } | ||
| 2182 | |||
| 2183 | var res = try pp.expandFuncMacro(macro_tok.loc, macro, &args, &expanded_args); | ||
| 2184 | defer res.deinit(); | ||
| 2185 | const tokens_added = res.items.len; | ||
| 2186 | |||
| 2187 | const macro_expansion_locs = macro_tok.expansionSlice(); | ||
| 2188 | for (res.items) |*tok| { | ||
| 2189 | try tok.addExpansionLocation(pp.gpa, &.{macro_tok.loc}); | ||
| 2190 | try tok.addExpansionLocation(pp.gpa, macro_expansion_locs); | ||
| 2191 | } | ||
| 2192 | |||
| 2193 | const tokens_removed = macro_scan_idx - idx + 1; | ||
| 2194 | for (buf.items[idx .. idx + tokens_removed]) |tok| Token.free(tok.expansion_locs, pp.gpa); | ||
| 2195 | try buf.replaceRange(idx, tokens_removed, res.items); | ||
| 2196 | |||
| 2197 | moving_end_idx += tokens_added; | ||
| 2198 | // Overflow here means that we encountered an unterminated argument list | ||
| 2199 | // while expanding the body of this macro. | ||
| 2200 | moving_end_idx -|= tokens_removed; | ||
| 2201 | idx += tokens_added; | ||
| 2202 | do_rescan = true; | ||
| 2203 | } else { | ||
| 2204 | const res = try pp.expandObjMacro(macro); | ||
| 2205 | defer res.deinit(); | ||
| 2206 | |||
| 2207 | const macro_expansion_locs = macro_tok.expansionSlice(); | ||
| 2208 | var increment_idx_by = res.items.len; | ||
| 2209 | for (res.items, 0..) |*tok, i| { | ||
| 2210 | tok.flags.is_macro_arg = macro_tok.flags.is_macro_arg; | ||
| 2211 | try tok.addExpansionLocation(pp.gpa, &.{macro_tok.loc}); | ||
| 2212 | try tok.addExpansionLocation(pp.gpa, macro_expansion_locs); | ||
| 2213 | if (tok.id == .keyword_defined and eval_ctx == .expr) { | ||
| 2214 | try pp.comp.addDiagnostic(.{ | ||
| 2215 | .tag = .expansion_to_defined, | ||
| 2216 | .loc = tok.loc, | ||
| 2217 | }, tok.expansionSlice()); | ||
| 2218 | } | ||
| 2219 | |||
| 2220 | if (i < increment_idx_by and (tok.id == .keyword_defined or pp.defines.contains(pp.expandedSlice(tok.*)))) { | ||
| 2221 | increment_idx_by = i; | ||
| 2222 | } | ||
| 2223 | } | ||
| 2224 | |||
| 2225 | Token.free(buf.items[idx].expansion_locs, pp.gpa); | ||
| 2226 | try buf.replaceRange(idx, 1, res.items); | ||
| 2227 | idx += increment_idx_by; | ||
| 2228 | moving_end_idx = moving_end_idx + res.items.len - 1; | ||
| 2229 | do_rescan = true; | ||
| 2230 | } | ||
| 2231 | } | ||
| 2232 | if (idx - start_idx == advance_index + 1 and !do_rescan) { | ||
| 2233 | advance_index += 1; | ||
| 2234 | } | ||
| 2235 | } // end of replacement phase | ||
| 2236 | } | ||
| 2237 | // end of scanning phase | ||
| 2238 | |||
| 2239 | // trim excess buffer | ||
| 2240 | for (buf.items[moving_end_idx..]) |item| { | ||
| 2241 | Token.free(item.expansion_locs, pp.gpa); | ||
| 2242 | } | ||
| 2243 | buf.items.len = moving_end_idx; | ||
| 2244 | } | ||
| 2245 | |||
| 2246 | /// Try to expand a macro after a possible candidate has been read from the `tokenizer` | ||
| 2247 | /// into the `raw` token passed as argument | ||
| 2248 | fn expandMacro(pp: *Preprocessor, tokenizer: *Tokenizer, raw: RawToken) MacroError!void { | ||
| 2249 | var source_tok = tokFromRaw(raw); | ||
| 2250 | if (!raw.id.isMacroIdentifier()) { | ||
| 2251 | source_tok.id.simplifyMacroKeyword(); | ||
| 2252 | return pp.tokens.append(pp.gpa, source_tok); | ||
| 2253 | } | ||
| 2254 | pp.top_expansion_buf.items.len = 0; | ||
| 2255 | try pp.top_expansion_buf.append(source_tok); | ||
| 2256 | pp.expansion_source_loc = source_tok.loc; | ||
| 2257 | |||
| 2258 | try pp.expandMacroExhaustive(tokenizer, &pp.top_expansion_buf, 0, 1, true, .non_expr); | ||
| 2259 | try pp.tokens.ensureUnusedCapacity(pp.gpa, pp.top_expansion_buf.items.len); | ||
| 2260 | for (pp.top_expansion_buf.items) |*tok| { | ||
| 2261 | if (tok.id == .macro_ws and !pp.preserve_whitespace) { | ||
| 2262 | Token.free(tok.expansion_locs, pp.gpa); | ||
| 2263 | continue; | ||
| 2264 | } | ||
| 2265 | if (tok.id == .comment and !pp.comp.langopts.preserve_comments_in_macros) { | ||
| 2266 | Token.free(tok.expansion_locs, pp.gpa); | ||
| 2267 | continue; | ||
| 2268 | } | ||
| 2269 | tok.id.simplifyMacroKeywordExtra(true); | ||
| 2270 | pp.tokens.appendAssumeCapacity(tok.*); | ||
| 2271 | } | ||
| 2272 | if (pp.preserve_whitespace) { | ||
| 2273 | try pp.tokens.ensureUnusedCapacity(pp.gpa, pp.add_expansion_nl); | ||
| 2274 | while (pp.add_expansion_nl > 0) : (pp.add_expansion_nl -= 1) { | ||
| 2275 | pp.tokens.appendAssumeCapacity(.{ .id = .nl, .loc = .{ | ||
| 2276 | .id = tokenizer.source, | ||
| 2277 | .line = tokenizer.line, | ||
| 2278 | } }); | ||
| 2279 | } | ||
| 2280 | } | ||
| 2281 | } | ||
| 2282 | |||
| 2283 | fn expandedSliceExtra(pp: *const Preprocessor, tok: Token, macro_ws_handling: enum { single_macro_ws, preserve_macro_ws }) []const u8 { | ||
| 2284 | if (tok.id.lexeme()) |some| { | ||
| 2285 | if (!tok.id.allowsDigraphs(pp.comp) and !(tok.id == .macro_ws and macro_ws_handling == .preserve_macro_ws)) return some; | ||
| 2286 | } | ||
| 2287 | var tmp_tokenizer = Tokenizer{ | ||
| 2288 | .buf = pp.comp.getSource(tok.loc.id).buf, | ||
| 2289 | .comp = pp.comp, | ||
| 2290 | .index = tok.loc.byte_offset, | ||
| 2291 | .source = .generated, | ||
| 2292 | }; | ||
| 2293 | if (tok.id == .macro_string) { | ||
| 2294 | while (true) : (tmp_tokenizer.index += 1) { | ||
| 2295 | if (tmp_tokenizer.buf[tmp_tokenizer.index] == '>') break; | ||
| 2296 | } | ||
| 2297 | return tmp_tokenizer.buf[tok.loc.byte_offset .. tmp_tokenizer.index + 1]; | ||
| 2298 | } | ||
| 2299 | const res = tmp_tokenizer.next(); | ||
| 2300 | return tmp_tokenizer.buf[res.start..res.end]; | ||
| 2301 | } | ||
| 2302 | |||
| 2303 | /// Get expanded token source string. | ||
| 2304 | pub fn expandedSlice(pp: *Preprocessor, tok: Token) []const u8 { | ||
| 2305 | return pp.expandedSliceExtra(tok, .single_macro_ws); | ||
| 2306 | } | ||
| 2307 | |||
| 2308 | /// Concat two tokens and add the result to pp.generated | ||
| 2309 | fn pasteTokens(pp: *Preprocessor, lhs_toks: *ExpandBuf, rhs_toks: []const Token) Error!void { | ||
| 2310 | const lhs = while (lhs_toks.popOrNull()) |lhs| { | ||
| 2311 | if ((pp.comp.langopts.preserve_comments_in_macros and lhs.id == .comment) or | ||
| 2312 | (lhs.id != .macro_ws and lhs.id != .comment)) | ||
| 2313 | break lhs; | ||
| 2314 | |||
| 2315 | Token.free(lhs.expansion_locs, pp.gpa); | ||
| 2316 | } else { | ||
| 2317 | return bufCopyTokens(lhs_toks, rhs_toks, &.{}); | ||
| 2318 | }; | ||
| 2319 | |||
| 2320 | var rhs_rest: u32 = 1; | ||
| 2321 | const rhs = for (rhs_toks) |rhs| { | ||
| 2322 | if ((pp.comp.langopts.preserve_comments_in_macros and rhs.id == .comment) or | ||
| 2323 | (rhs.id != .macro_ws and rhs.id != .comment)) | ||
| 2324 | break rhs; | ||
| 2325 | |||
| 2326 | rhs_rest += 1; | ||
| 2327 | } else { | ||
| 2328 | return lhs_toks.appendAssumeCapacity(lhs); | ||
| 2329 | }; | ||
| 2330 | defer Token.free(lhs.expansion_locs, pp.gpa); | ||
| 2331 | |||
| 2332 | const start = pp.comp.generated_buf.items.len; | ||
| 2333 | const end = start + pp.expandedSlice(lhs).len + pp.expandedSlice(rhs).len; | ||
| 2334 | try pp.comp.generated_buf.ensureTotalCapacity(pp.gpa, end + 1); // +1 for a newline | ||
| 2335 | // We cannot use the same slices here since they might be invalidated by `ensureCapacity` | ||
| 2336 | pp.comp.generated_buf.appendSliceAssumeCapacity(pp.expandedSlice(lhs)); | ||
| 2337 | pp.comp.generated_buf.appendSliceAssumeCapacity(pp.expandedSlice(rhs)); | ||
| 2338 | pp.comp.generated_buf.appendAssumeCapacity('\n'); | ||
| 2339 | |||
| 2340 | // Try to tokenize the result. | ||
| 2341 | var tmp_tokenizer = Tokenizer{ | ||
| 2342 | .buf = pp.comp.generated_buf.items, | ||
| 2343 | .comp = pp.comp, | ||
| 2344 | .index = @intCast(start), | ||
| 2345 | .source = .generated, | ||
| 2346 | }; | ||
| 2347 | const pasted_token = tmp_tokenizer.nextNoWSComments(); | ||
| 2348 | const next = tmp_tokenizer.nextNoWSComments(); | ||
| 2349 | const pasted_id = if (lhs.id == .placemarker and rhs.id == .placemarker) | ||
| 2350 | .placemarker | ||
| 2351 | else | ||
| 2352 | pasted_token.id; | ||
| 2353 | try lhs_toks.append(try pp.makeGeneratedToken(start, pasted_id, lhs)); | ||
| 2354 | |||
| 2355 | if (next.id != .nl and next.id != .eof) { | ||
| 2356 | try pp.errStr( | ||
| 2357 | lhs, | ||
| 2358 | .pasting_formed_invalid, | ||
| 2359 | try pp.comp.diagnostics.arena.allocator().dupe(u8, pp.comp.generated_buf.items[start..end]), | ||
| 2360 | ); | ||
| 2361 | try lhs_toks.append(tokFromRaw(next)); | ||
| 2362 | } | ||
| 2363 | |||
| 2364 | try bufCopyTokens(lhs_toks, rhs_toks[rhs_rest..], &.{}); | ||
| 2365 | } | ||
| 2366 | |||
| 2367 | fn makeGeneratedToken(pp: *Preprocessor, start: usize, id: Token.Id, source: Token) !Token { | ||
| 2368 | var pasted_token = Token{ .id = id, .loc = .{ | ||
| 2369 | .id = .generated, | ||
| 2370 | .byte_offset = @intCast(start), | ||
| 2371 | .line = pp.generated_line, | ||
| 2372 | } }; | ||
| 2373 | pp.generated_line += 1; | ||
| 2374 | try pasted_token.addExpansionLocation(pp.gpa, &.{source.loc}); | ||
| 2375 | try pasted_token.addExpansionLocation(pp.gpa, source.expansionSlice()); | ||
| 2376 | return pasted_token; | ||
| 2377 | } | ||
| 2378 | |||
| 2379 | /// Defines a new macro and warns if it is a duplicate | ||
| 2380 | fn defineMacro(pp: *Preprocessor, name_tok: RawToken, macro: Macro) Error!void { | ||
| 2381 | const name_str = pp.tokSlice(name_tok); | ||
| 2382 | const gop = try pp.defines.getOrPut(pp.gpa, name_str); | ||
| 2383 | if (gop.found_existing and !gop.value_ptr.eql(macro, pp)) { | ||
| 2384 | const tag: Diagnostics.Tag = if (gop.value_ptr.is_builtin) .builtin_macro_redefined else .macro_redefined; | ||
| 2385 | const start = pp.comp.diagnostics.list.items.len; | ||
| 2386 | try pp.comp.addDiagnostic(.{ | ||
| 2387 | .tag = tag, | ||
| 2388 | .loc = .{ .id = name_tok.source, .byte_offset = name_tok.start, .line = name_tok.line }, | ||
| 2389 | .extra = .{ .str = name_str }, | ||
| 2390 | }, &.{}); | ||
| 2391 | if (!gop.value_ptr.is_builtin and pp.comp.diagnostics.list.items.len != start) { | ||
| 2392 | try pp.comp.addDiagnostic(.{ | ||
| 2393 | .tag = .previous_definition, | ||
| 2394 | .loc = gop.value_ptr.loc, | ||
| 2395 | }, &.{}); | ||
| 2396 | } | ||
| 2397 | } | ||
| 2398 | if (pp.verbose) { | ||
| 2399 | pp.verboseLog(name_tok, "macro {s} defined", .{name_str}); | ||
| 2400 | } | ||
| 2401 | gop.value_ptr.* = macro; | ||
| 2402 | } | ||
| 2403 | |||
| 2404 | /// Handle a #define directive. | ||
| 2405 | fn define(pp: *Preprocessor, tokenizer: *Tokenizer) Error!void { | ||
| 2406 | // Get macro name and validate it. | ||
| 2407 | const macro_name = tokenizer.nextNoWS(); | ||
| 2408 | if (macro_name.id == .keyword_defined) { | ||
| 2409 | try pp.err(macro_name, .defined_as_macro_name); | ||
| 2410 | return skipToNl(tokenizer); | ||
| 2411 | } | ||
| 2412 | if (!macro_name.id.isMacroIdentifier()) { | ||
| 2413 | try pp.err(macro_name, .macro_name_must_be_identifier); | ||
| 2414 | return skipToNl(tokenizer); | ||
| 2415 | } | ||
| 2416 | var macro_name_token_id = macro_name.id; | ||
| 2417 | macro_name_token_id.simplifyMacroKeyword(); | ||
| 2418 | switch (macro_name_token_id) { | ||
| 2419 | .identifier, .extended_identifier => {}, | ||
| 2420 | else => if (macro_name_token_id.isMacroIdentifier()) { | ||
| 2421 | try pp.err(macro_name, .keyword_macro); | ||
| 2422 | }, | ||
| 2423 | } | ||
| 2424 | |||
| 2425 | // Check for function macros and empty defines. | ||
| 2426 | var first = tokenizer.next(); | ||
| 2427 | switch (first.id) { | ||
| 2428 | .nl, .eof => return pp.defineMacro(macro_name, .{ | ||
| 2429 | .params = &.{}, | ||
| 2430 | .tokens = &.{}, | ||
| 2431 | .var_args = false, | ||
| 2432 | .loc = tokFromRaw(macro_name).loc, | ||
| 2433 | .start = 0, | ||
| 2434 | .end = 0, | ||
| 2435 | .is_func = false, | ||
| 2436 | }), | ||
| 2437 | .whitespace => first = tokenizer.next(), | ||
| 2438 | .l_paren => return pp.defineFn(tokenizer, macro_name, first), | ||
| 2439 | else => try pp.err(first, .whitespace_after_macro_name), | ||
| 2440 | } | ||
| 2441 | if (first.id == .hash_hash) { | ||
| 2442 | try pp.err(first, .hash_hash_at_start); | ||
| 2443 | return skipToNl(tokenizer); | ||
| 2444 | } | ||
| 2445 | first.id.simplifyMacroKeyword(); | ||
| 2446 | |||
| 2447 | pp.token_buf.items.len = 0; // Safe to use since we can only be in one directive at a time. | ||
| 2448 | |||
| 2449 | var need_ws = false; | ||
| 2450 | // Collect the token body and validate any ## found. | ||
| 2451 | var tok = first; | ||
| 2452 | const end_index = while (true) { | ||
| 2453 | tok.id.simplifyMacroKeyword(); | ||
| 2454 | switch (tok.id) { | ||
| 2455 | .hash_hash => { | ||
| 2456 | const next = tokenizer.nextNoWSComments(); | ||
| 2457 | switch (next.id) { | ||
| 2458 | .nl, .eof => { | ||
| 2459 | try pp.err(tok, .hash_hash_at_end); | ||
| 2460 | return; | ||
| 2461 | }, | ||
| 2462 | .hash_hash => { | ||
| 2463 | try pp.err(next, .hash_hash_at_end); | ||
| 2464 | return; | ||
| 2465 | }, | ||
| 2466 | else => {}, | ||
| 2467 | } | ||
| 2468 | try pp.token_buf.append(tok); | ||
| 2469 | try pp.token_buf.append(next); | ||
| 2470 | }, | ||
| 2471 | .nl, .eof => break tok.start, | ||
| 2472 | .comment => if (pp.comp.langopts.preserve_comments_in_macros) { | ||
| 2473 | if (need_ws) { | ||
| 2474 | need_ws = false; | ||
| 2475 | try pp.token_buf.append(.{ .id = .macro_ws, .source = .generated }); | ||
| 2476 | } | ||
| 2477 | try pp.token_buf.append(tok); | ||
| 2478 | }, | ||
| 2479 | .whitespace => need_ws = true, | ||
| 2480 | .unterminated_string_literal, .unterminated_char_literal, .empty_char_literal => |tag| { | ||
| 2481 | try pp.err(tok, invalidTokenDiagnostic(tag)); | ||
| 2482 | try pp.token_buf.append(tok); | ||
| 2483 | }, | ||
| 2484 | .unterminated_comment => try pp.err(tok, .unterminated_comment), | ||
| 2485 | else => { | ||
| 2486 | if (tok.id != .whitespace and need_ws) { | ||
| 2487 | need_ws = false; | ||
| 2488 | try pp.token_buf.append(.{ .id = .macro_ws, .source = .generated }); | ||
| 2489 | } | ||
| 2490 | try pp.token_buf.append(tok); | ||
| 2491 | }, | ||
| 2492 | } | ||
| 2493 | tok = tokenizer.next(); | ||
| 2494 | } else unreachable; | ||
| 2495 | |||
| 2496 | const list = try pp.arena.allocator().dupe(RawToken, pp.token_buf.items); | ||
| 2497 | try pp.defineMacro(macro_name, .{ | ||
| 2498 | .loc = tokFromRaw(macro_name).loc, | ||
| 2499 | .start = first.start, | ||
| 2500 | .end = end_index, | ||
| 2501 | .tokens = list, | ||
| 2502 | .params = undefined, | ||
| 2503 | .is_func = false, | ||
| 2504 | .var_args = false, | ||
| 2505 | }); | ||
| 2506 | } | ||
| 2507 | |||
| 2508 | /// Handle a function like #define directive. | ||
| 2509 | fn defineFn(pp: *Preprocessor, tokenizer: *Tokenizer, macro_name: RawToken, l_paren: RawToken) Error!void { | ||
| 2510 | assert(macro_name.id.isMacroIdentifier()); | ||
| 2511 | var params = std.ArrayList([]const u8).init(pp.gpa); | ||
| 2512 | defer params.deinit(); | ||
| 2513 | |||
| 2514 | // Parse the parameter list. | ||
| 2515 | var gnu_var_args: []const u8 = ""; | ||
| 2516 | var var_args = false; | ||
| 2517 | const start_index = while (true) { | ||
| 2518 | var tok = tokenizer.nextNoWS(); | ||
| 2519 | if (tok.id == .r_paren) break tok.end; | ||
| 2520 | if (tok.id == .eof) return pp.err(tok, .unterminated_macro_param_list); | ||
| 2521 | if (tok.id == .ellipsis) { | ||
| 2522 | var_args = true; | ||
| 2523 | const r_paren = tokenizer.nextNoWS(); | ||
| 2524 | if (r_paren.id != .r_paren) { | ||
| 2525 | try pp.err(r_paren, .missing_paren_param_list); | ||
| 2526 | try pp.err(l_paren, .to_match_paren); | ||
| 2527 | return skipToNl(tokenizer); | ||
| 2528 | } | ||
| 2529 | break r_paren.end; | ||
| 2530 | } | ||
| 2531 | if (!tok.id.isMacroIdentifier()) { | ||
| 2532 | try pp.err(tok, .invalid_token_param_list); | ||
| 2533 | return skipToNl(tokenizer); | ||
| 2534 | } | ||
| 2535 | |||
| 2536 | try params.append(pp.tokSlice(tok)); | ||
| 2537 | |||
| 2538 | tok = tokenizer.nextNoWS(); | ||
| 2539 | if (tok.id == .ellipsis) { | ||
| 2540 | try pp.err(tok, .gnu_va_macro); | ||
| 2541 | gnu_var_args = params.pop(); | ||
| 2542 | const r_paren = tokenizer.nextNoWS(); | ||
| 2543 | if (r_paren.id != .r_paren) { | ||
| 2544 | try pp.err(r_paren, .missing_paren_param_list); | ||
| 2545 | try pp.err(l_paren, .to_match_paren); | ||
| 2546 | return skipToNl(tokenizer); | ||
| 2547 | } | ||
| 2548 | break r_paren.end; | ||
| 2549 | } else if (tok.id == .r_paren) { | ||
| 2550 | break tok.end; | ||
| 2551 | } else if (tok.id != .comma) { | ||
| 2552 | try pp.err(tok, .expected_comma_param_list); | ||
| 2553 | return skipToNl(tokenizer); | ||
| 2554 | } | ||
| 2555 | } else unreachable; | ||
| 2556 | |||
| 2557 | var need_ws = false; | ||
| 2558 | // Collect the body tokens and validate # and ##'s found. | ||
| 2559 | pp.token_buf.items.len = 0; // Safe to use since we can only be in one directive at a time. | ||
| 2560 | const end_index = tok_loop: while (true) { | ||
| 2561 | var tok = tokenizer.next(); | ||
| 2562 | switch (tok.id) { | ||
| 2563 | .nl, .eof => break tok.start, | ||
| 2564 | .whitespace => need_ws = pp.token_buf.items.len != 0, | ||
| 2565 | .comment => if (!pp.comp.langopts.preserve_comments_in_macros) continue else { | ||
| 2566 | if (need_ws) { | ||
| 2567 | need_ws = false; | ||
| 2568 | try pp.token_buf.append(.{ .id = .macro_ws, .source = .generated }); | ||
| 2569 | } | ||
| 2570 | try pp.token_buf.append(tok); | ||
| 2571 | }, | ||
| 2572 | .hash => { | ||
| 2573 | if (tok.id != .whitespace and need_ws) { | ||
| 2574 | need_ws = false; | ||
| 2575 | try pp.token_buf.append(.{ .id = .macro_ws, .source = .generated }); | ||
| 2576 | } | ||
| 2577 | const param = tokenizer.nextNoWS(); | ||
| 2578 | blk: { | ||
| 2579 | if (var_args and param.id == .keyword_va_args) { | ||
| 2580 | tok.id = .stringify_va_args; | ||
| 2581 | try pp.token_buf.append(tok); | ||
| 2582 | continue :tok_loop; | ||
| 2583 | } | ||
| 2584 | if (!param.id.isMacroIdentifier()) break :blk; | ||
| 2585 | const s = pp.tokSlice(param); | ||
| 2586 | if (mem.eql(u8, s, gnu_var_args)) { | ||
| 2587 | tok.id = .stringify_va_args; | ||
| 2588 | try pp.token_buf.append(tok); | ||
| 2589 | continue :tok_loop; | ||
| 2590 | } | ||
| 2591 | for (params.items, 0..) |p, i| { | ||
| 2592 | if (mem.eql(u8, p, s)) { | ||
| 2593 | tok.id = .stringify_param; | ||
| 2594 | tok.end = @intCast(i); | ||
| 2595 | try pp.token_buf.append(tok); | ||
| 2596 | continue :tok_loop; | ||
| 2597 | } | ||
| 2598 | } | ||
| 2599 | } | ||
| 2600 | try pp.err(param, .hash_not_followed_param); | ||
| 2601 | return skipToNl(tokenizer); | ||
| 2602 | }, | ||
| 2603 | .hash_hash => { | ||
| 2604 | need_ws = false; | ||
| 2605 | // if ## appears at the beginning, the token buf is still empty | ||
| 2606 | // in this case, error out | ||
| 2607 | if (pp.token_buf.items.len == 0) { | ||
| 2608 | try pp.err(tok, .hash_hash_at_start); | ||
| 2609 | return skipToNl(tokenizer); | ||
| 2610 | } | ||
| 2611 | const saved_tokenizer = tokenizer.*; | ||
| 2612 | const next = tokenizer.nextNoWSComments(); | ||
| 2613 | if (next.id == .nl or next.id == .eof) { | ||
| 2614 | try pp.err(tok, .hash_hash_at_end); | ||
| 2615 | return; | ||
| 2616 | } | ||
| 2617 | tokenizer.* = saved_tokenizer; | ||
| 2618 | // convert the previous token to .macro_param_no_expand if it was .macro_param | ||
| 2619 | if (pp.token_buf.items[pp.token_buf.items.len - 1].id == .macro_param) { | ||
| 2620 | pp.token_buf.items[pp.token_buf.items.len - 1].id = .macro_param_no_expand; | ||
| 2621 | } | ||
| 2622 | try pp.token_buf.append(tok); | ||
| 2623 | }, | ||
| 2624 | .unterminated_string_literal, .unterminated_char_literal, .empty_char_literal => |tag| { | ||
| 2625 | try pp.err(tok, invalidTokenDiagnostic(tag)); | ||
| 2626 | try pp.token_buf.append(tok); | ||
| 2627 | }, | ||
| 2628 | .unterminated_comment => try pp.err(tok, .unterminated_comment), | ||
| 2629 | else => { | ||
| 2630 | if (tok.id != .whitespace and need_ws) { | ||
| 2631 | need_ws = false; | ||
| 2632 | try pp.token_buf.append(.{ .id = .macro_ws, .source = .generated }); | ||
| 2633 | } | ||
| 2634 | if (var_args and tok.id == .keyword_va_args) { | ||
| 2635 | // do nothing | ||
| 2636 | } else if (var_args and tok.id == .keyword_va_opt) { | ||
| 2637 | const opt_l_paren = tokenizer.next(); | ||
| 2638 | if (opt_l_paren.id != .l_paren) { | ||
| 2639 | try pp.err(opt_l_paren, .va_opt_lparen); | ||
| 2640 | return skipToNl(tokenizer); | ||
| 2641 | } | ||
| 2642 | tok.start = opt_l_paren.end; | ||
| 2643 | |||
| 2644 | var parens: u32 = 0; | ||
| 2645 | while (true) { | ||
| 2646 | const opt_tok = tokenizer.next(); | ||
| 2647 | switch (opt_tok.id) { | ||
| 2648 | .l_paren => parens += 1, | ||
| 2649 | .r_paren => if (parens == 0) { | ||
| 2650 | break; | ||
| 2651 | } else { | ||
| 2652 | parens -= 1; | ||
| 2653 | }, | ||
| 2654 | .nl, .eof => { | ||
| 2655 | try pp.err(opt_tok, .va_opt_rparen); | ||
| 2656 | try pp.err(opt_l_paren, .to_match_paren); | ||
| 2657 | return skipToNl(tokenizer); | ||
| 2658 | }, | ||
| 2659 | .whitespace => {}, | ||
| 2660 | else => tok.end = opt_tok.end, | ||
| 2661 | } | ||
| 2662 | } | ||
| 2663 | } else if (tok.id.isMacroIdentifier()) { | ||
| 2664 | tok.id.simplifyMacroKeyword(); | ||
| 2665 | const s = pp.tokSlice(tok); | ||
| 2666 | if (mem.eql(u8, gnu_var_args, s)) { | ||
| 2667 | tok.id = .keyword_va_args; | ||
| 2668 | } else for (params.items, 0..) |param, i| { | ||
| 2669 | if (mem.eql(u8, param, s)) { | ||
| 2670 | // NOTE: it doesn't matter to assign .macro_param_no_expand | ||
| 2671 | // here in case a ## was the previous token, because | ||
| 2672 | // ## processing will eat this token with the same semantics | ||
| 2673 | tok.id = .macro_param; | ||
| 2674 | tok.end = @intCast(i); | ||
| 2675 | break; | ||
| 2676 | } | ||
| 2677 | } | ||
| 2678 | } | ||
| 2679 | try pp.token_buf.append(tok); | ||
| 2680 | }, | ||
| 2681 | } | ||
| 2682 | } else unreachable; | ||
| 2683 | |||
| 2684 | const param_list = try pp.arena.allocator().dupe([]const u8, params.items); | ||
| 2685 | const token_list = try pp.arena.allocator().dupe(RawToken, pp.token_buf.items); | ||
| 2686 | try pp.defineMacro(macro_name, .{ | ||
| 2687 | .is_func = true, | ||
| 2688 | .params = param_list, | ||
| 2689 | .var_args = var_args or gnu_var_args.len != 0, | ||
| 2690 | .tokens = token_list, | ||
| 2691 | .loc = tokFromRaw(macro_name).loc, | ||
| 2692 | .start = start_index, | ||
| 2693 | .end = end_index, | ||
| 2694 | }); | ||
| 2695 | } | ||
| 2696 | |||
| 2697 | /// Handle an #embed directive | ||
| 2698 | /// embedDirective : ("FILENAME" | <FILENAME>) embedParam* | ||
| 2699 | /// embedParam : IDENTIFIER (:: IDENTIFIER)? '(' <tokens> ')' | ||
| 2700 | fn embed(pp: *Preprocessor, tokenizer: *Tokenizer) MacroError!void { | ||
| 2701 | const first = tokenizer.nextNoWS(); | ||
| 2702 | const filename_tok = pp.findIncludeFilenameToken(first, tokenizer, .ignore_trailing_tokens) catch |er| switch (er) { | ||
| 2703 | error.InvalidInclude => return, | ||
| 2704 | else => |e| return e, | ||
| 2705 | }; | ||
| 2706 | |||
| 2707 | // Check for empty filename. | ||
| 2708 | const tok_slice = pp.expandedSliceExtra(filename_tok, .single_macro_ws); | ||
| 2709 | if (tok_slice.len < 3) { | ||
| 2710 | try pp.err(first, .empty_filename); | ||
| 2711 | return; | ||
| 2712 | } | ||
| 2713 | const filename = tok_slice[1 .. tok_slice.len - 1]; | ||
| 2714 | const include_type: Compilation.IncludeType = switch (filename_tok.id) { | ||
| 2715 | .string_literal => .quotes, | ||
| 2716 | .macro_string => .angle_brackets, | ||
| 2717 | else => unreachable, | ||
| 2718 | }; | ||
| 2719 | |||
| 2720 | // Index into `token_buf` | ||
| 2721 | const Range = struct { | ||
| 2722 | start: u32, | ||
| 2723 | end: u32, | ||
| 2724 | |||
| 2725 | fn expand(opt_range: ?@This(), pp_: *Preprocessor, tokenizer_: *Tokenizer) !void { | ||
| 2726 | const range = opt_range orelse return; | ||
| 2727 | const slice = pp_.token_buf.items[range.start..range.end]; | ||
| 2728 | for (slice) |tok| { | ||
| 2729 | try pp_.expandMacro(tokenizer_, tok); | ||
| 2730 | } | ||
| 2731 | } | ||
| 2732 | }; | ||
| 2733 | pp.token_buf.items.len = 0; | ||
| 2734 | |||
| 2735 | var limit: ?u32 = null; | ||
| 2736 | var prefix: ?Range = null; | ||
| 2737 | var suffix: ?Range = null; | ||
| 2738 | var if_empty: ?Range = null; | ||
| 2739 | while (true) { | ||
| 2740 | const param_first = tokenizer.nextNoWS(); | ||
| 2741 | switch (param_first.id) { | ||
| 2742 | .nl, .eof => break, | ||
| 2743 | .identifier => {}, | ||
| 2744 | else => { | ||
| 2745 | try pp.err(param_first, .malformed_embed_param); | ||
| 2746 | continue; | ||
| 2747 | }, | ||
| 2748 | } | ||
| 2749 | |||
| 2750 | const char_top = pp.char_buf.items.len; | ||
| 2751 | defer pp.char_buf.items.len = char_top; | ||
| 2752 | |||
| 2753 | const maybe_colon = tokenizer.colonColon(); | ||
| 2754 | const param = switch (maybe_colon.id) { | ||
| 2755 | .colon_colon => blk: { | ||
| 2756 | // vendor::param | ||
| 2757 | const param = tokenizer.nextNoWS(); | ||
| 2758 | if (param.id != .identifier) { | ||
| 2759 | try pp.err(param, .malformed_embed_param); | ||
| 2760 | continue; | ||
| 2761 | } | ||
| 2762 | const l_paren = tokenizer.nextNoWS(); | ||
| 2763 | if (l_paren.id != .l_paren) { | ||
| 2764 | try pp.err(l_paren, .malformed_embed_param); | ||
| 2765 | continue; | ||
| 2766 | } | ||
| 2767 | try pp.char_buf.appendSlice(Attribute.normalize(pp.tokSlice(param_first))); | ||
| 2768 | try pp.char_buf.appendSlice("::"); | ||
| 2769 | try pp.char_buf.appendSlice(Attribute.normalize(pp.tokSlice(param))); | ||
| 2770 | break :blk pp.char_buf.items; | ||
| 2771 | }, | ||
| 2772 | .l_paren => Attribute.normalize(pp.tokSlice(param_first)), | ||
| 2773 | else => { | ||
| 2774 | try pp.err(maybe_colon, .malformed_embed_param); | ||
| 2775 | continue; | ||
| 2776 | }, | ||
| 2777 | }; | ||
| 2778 | |||
| 2779 | const start: u32 = @intCast(pp.token_buf.items.len); | ||
| 2780 | while (true) { | ||
| 2781 | const next = tokenizer.nextNoWS(); | ||
| 2782 | if (next.id == .r_paren) break; | ||
| 2783 | if (next.id == .eof) { | ||
| 2784 | try pp.err(maybe_colon, .malformed_embed_param); | ||
| 2785 | break; | ||
| 2786 | } | ||
| 2787 | try pp.token_buf.append(next); | ||
| 2788 | } | ||
| 2789 | const end: u32 = @intCast(pp.token_buf.items.len); | ||
| 2790 | |||
| 2791 | if (std.mem.eql(u8, param, "limit")) { | ||
| 2792 | if (limit != null) { | ||
| 2793 | try pp.errStr(tokFromRaw(param_first), .duplicate_embed_param, "limit"); | ||
| 2794 | continue; | ||
| 2795 | } | ||
| 2796 | if (start + 1 != end) { | ||
| 2797 | try pp.err(param_first, .malformed_embed_limit); | ||
| 2798 | continue; | ||
| 2799 | } | ||
| 2800 | const limit_tok = pp.token_buf.items[start]; | ||
| 2801 | if (limit_tok.id != .pp_num) { | ||
| 2802 | try pp.err(param_first, .malformed_embed_limit); | ||
| 2803 | continue; | ||
| 2804 | } | ||
| 2805 | limit = std.fmt.parseInt(u32, pp.tokSlice(limit_tok), 10) catch { | ||
| 2806 | try pp.err(limit_tok, .malformed_embed_limit); | ||
| 2807 | continue; | ||
| 2808 | }; | ||
| 2809 | pp.token_buf.items.len = start; | ||
| 2810 | } else if (std.mem.eql(u8, param, "prefix")) { | ||
| 2811 | if (prefix != null) { | ||
| 2812 | try pp.errStr(tokFromRaw(param_first), .duplicate_embed_param, "prefix"); | ||
| 2813 | continue; | ||
| 2814 | } | ||
| 2815 | prefix = .{ .start = start, .end = end }; | ||
| 2816 | } else if (std.mem.eql(u8, param, "suffix")) { | ||
| 2817 | if (suffix != null) { | ||
| 2818 | try pp.errStr(tokFromRaw(param_first), .duplicate_embed_param, "suffix"); | ||
| 2819 | continue; | ||
| 2820 | } | ||
| 2821 | suffix = .{ .start = start, .end = end }; | ||
| 2822 | } else if (std.mem.eql(u8, param, "if_empty")) { | ||
| 2823 | if (if_empty != null) { | ||
| 2824 | try pp.errStr(tokFromRaw(param_first), .duplicate_embed_param, "if_empty"); | ||
| 2825 | continue; | ||
| 2826 | } | ||
| 2827 | if_empty = .{ .start = start, .end = end }; | ||
| 2828 | } else { | ||
| 2829 | try pp.errStr( | ||
| 2830 | tokFromRaw(param_first), | ||
| 2831 | .unsupported_embed_param, | ||
| 2832 | try pp.comp.diagnostics.arena.allocator().dupe(u8, param), | ||
| 2833 | ); | ||
| 2834 | pp.token_buf.items.len = start; | ||
| 2835 | } | ||
| 2836 | } | ||
| 2837 | |||
| 2838 | const embed_bytes = (try pp.comp.findEmbed(filename, first.source, include_type, limit)) orelse | ||
| 2839 | return pp.fatal(first, "'{s}' not found", .{filename}); | ||
| 2840 | defer pp.comp.gpa.free(embed_bytes); | ||
| 2841 | |||
| 2842 | try Range.expand(prefix, pp, tokenizer); | ||
| 2843 | |||
| 2844 | if (embed_bytes.len == 0) { | ||
| 2845 | try Range.expand(if_empty, pp, tokenizer); | ||
| 2846 | try Range.expand(suffix, pp, tokenizer); | ||
| 2847 | return; | ||
| 2848 | } | ||
| 2849 | |||
| 2850 | try pp.tokens.ensureUnusedCapacity(pp.comp.gpa, 2 * embed_bytes.len - 1); // N bytes and N-1 commas | ||
| 2851 | |||
| 2852 | // TODO: We currently only support systems with CHAR_BIT == 8 | ||
| 2853 | // If the target's CHAR_BIT is not 8, we need to write out correctly-sized embed_bytes | ||
| 2854 | // and correctly account for the target's endianness | ||
| 2855 | const writer = pp.comp.generated_buf.writer(pp.gpa); | ||
| 2856 | |||
| 2857 | { | ||
| 2858 | const byte = embed_bytes[0]; | ||
| 2859 | const start = pp.comp.generated_buf.items.len; | ||
| 2860 | try writer.print("{d}", .{byte}); | ||
| 2861 | pp.tokens.appendAssumeCapacity(try pp.makeGeneratedToken(start, .embed_byte, filename_tok)); | ||
| 2862 | } | ||
| 2863 | |||
| 2864 | for (embed_bytes[1..]) |byte| { | ||
| 2865 | const start = pp.comp.generated_buf.items.len; | ||
| 2866 | try writer.print(",{d}", .{byte}); | ||
| 2867 | pp.tokens.appendAssumeCapacity(.{ .id = .comma, .loc = .{ .id = .generated, .byte_offset = @intCast(start) } }); | ||
| 2868 | pp.tokens.appendAssumeCapacity(try pp.makeGeneratedToken(start + 1, .embed_byte, filename_tok)); | ||
| 2869 | } | ||
| 2870 | try pp.comp.generated_buf.append(pp.gpa, '\n'); | ||
| 2871 | |||
| 2872 | try Range.expand(suffix, pp, tokenizer); | ||
| 2873 | } | ||
| 2874 | |||
| 2875 | // Handle a #include directive. | ||
| 2876 | fn include(pp: *Preprocessor, tokenizer: *Tokenizer, which: Compilation.WhichInclude) MacroError!void { | ||
| 2877 | const first = tokenizer.nextNoWS(); | ||
| 2878 | const new_source = findIncludeSource(pp, tokenizer, first, which) catch |er| switch (er) { | ||
| 2879 | error.InvalidInclude => return, | ||
| 2880 | else => |e| return e, | ||
| 2881 | }; | ||
| 2882 | |||
| 2883 | // Prevent stack overflow | ||
| 2884 | pp.include_depth += 1; | ||
| 2885 | defer pp.include_depth -= 1; | ||
| 2886 | if (pp.include_depth > max_include_depth) { | ||
| 2887 | try pp.comp.addDiagnostic(.{ | ||
| 2888 | .tag = .too_many_includes, | ||
| 2889 | .loc = .{ .id = first.source, .byte_offset = first.start, .line = first.line }, | ||
| 2890 | }, &.{}); | ||
| 2891 | return error.StopPreprocessing; | ||
| 2892 | } | ||
| 2893 | |||
| 2894 | if (pp.include_guards.get(new_source.id)) |guard| { | ||
| 2895 | if (pp.defines.contains(guard)) return; | ||
| 2896 | } | ||
| 2897 | |||
| 2898 | if (pp.verbose) { | ||
| 2899 | pp.verboseLog(first, "include file {s}", .{new_source.path}); | ||
| 2900 | } | ||
| 2901 | |||
| 2902 | const tokens_start = pp.tokens.len; | ||
| 2903 | try pp.addIncludeStart(new_source); | ||
| 2904 | const eof = pp.preprocessExtra(new_source) catch |er| switch (er) { | ||
| 2905 | error.StopPreprocessing => { | ||
| 2906 | for (pp.tokens.items(.expansion_locs)[tokens_start..]) |loc| Token.free(loc, pp.gpa); | ||
| 2907 | pp.tokens.len = tokens_start; | ||
| 2908 | return; | ||
| 2909 | }, | ||
| 2910 | else => |e| return e, | ||
| 2911 | }; | ||
| 2912 | try eof.checkMsEof(new_source, pp.comp); | ||
| 2913 | if (pp.preserve_whitespace and pp.tokens.items(.id)[pp.tokens.len - 1] != .nl) { | ||
| 2914 | try pp.tokens.append(pp.gpa, .{ .id = .nl, .loc = .{ | ||
| 2915 | .id = tokenizer.source, | ||
| 2916 | .line = tokenizer.line, | ||
| 2917 | } }); | ||
| 2918 | } | ||
| 2919 | if (pp.linemarkers == .none) return; | ||
| 2920 | var next = first; | ||
| 2921 | while (true) { | ||
| 2922 | var tmp = tokenizer.*; | ||
| 2923 | next = tmp.nextNoWS(); | ||
| 2924 | if (next.id != .nl) break; | ||
| 2925 | tokenizer.* = tmp; | ||
| 2926 | } | ||
| 2927 | try pp.addIncludeResume(next.source, next.end, next.line); | ||
| 2928 | } | ||
| 2929 | |||
| 2930 | /// tokens that are part of a pragma directive can happen in 3 ways: | ||
| 2931 | /// 1. directly in the text via `#pragma ...` | ||
| 2932 | /// 2. Via a string literal argument to `_Pragma` | ||
| 2933 | /// 3. Via a stringified macro argument which is used as an argument to `_Pragma` | ||
| 2934 | /// operator_loc: Location of `_Pragma`; null if this is from #pragma | ||
| 2935 | /// arg_locs: expansion locations of the argument to _Pragma. empty if #pragma or a raw string literal was used | ||
| 2936 | fn makePragmaToken(pp: *Preprocessor, raw: RawToken, operator_loc: ?Source.Location, arg_locs: []const Source.Location) !Token { | ||
| 2937 | var tok = tokFromRaw(raw); | ||
| 2938 | if (operator_loc) |loc| { | ||
| 2939 | try tok.addExpansionLocation(pp.gpa, &.{loc}); | ||
| 2940 | } | ||
| 2941 | try tok.addExpansionLocation(pp.gpa, arg_locs); | ||
| 2942 | return tok; | ||
| 2943 | } | ||
| 2944 | |||
| 2945 | /// Handle a pragma directive | ||
| 2946 | fn pragma(pp: *Preprocessor, tokenizer: *Tokenizer, pragma_tok: RawToken, operator_loc: ?Source.Location, arg_locs: []const Source.Location) !void { | ||
| 2947 | const name_tok = tokenizer.nextNoWS(); | ||
| 2948 | if (name_tok.id == .nl or name_tok.id == .eof) return; | ||
| 2949 | |||
| 2950 | const name = pp.tokSlice(name_tok); | ||
| 2951 | try pp.tokens.append(pp.gpa, try pp.makePragmaToken(pragma_tok, operator_loc, arg_locs)); | ||
| 2952 | const pragma_start: u32 = @intCast(pp.tokens.len); | ||
| 2953 | |||
| 2954 | const pragma_name_tok = try pp.makePragmaToken(name_tok, operator_loc, arg_locs); | ||
| 2955 | try pp.tokens.append(pp.gpa, pragma_name_tok); | ||
| 2956 | while (true) { | ||
| 2957 | const next_tok = tokenizer.next(); | ||
| 2958 | if (next_tok.id == .whitespace) continue; | ||
| 2959 | if (next_tok.id == .eof) { | ||
| 2960 | try pp.tokens.append(pp.gpa, .{ | ||
| 2961 | .id = .nl, | ||
| 2962 | .loc = .{ .id = .generated }, | ||
| 2963 | }); | ||
| 2964 | break; | ||
| 2965 | } | ||
| 2966 | try pp.tokens.append(pp.gpa, try pp.makePragmaToken(next_tok, operator_loc, arg_locs)); | ||
| 2967 | if (next_tok.id == .nl) break; | ||
| 2968 | } | ||
| 2969 | if (pp.comp.getPragma(name)) |prag| unknown: { | ||
| 2970 | return prag.preprocessorCB(pp, pragma_start) catch |er| switch (er) { | ||
| 2971 | error.UnknownPragma => break :unknown, | ||
| 2972 | else => |e| return e, | ||
| 2973 | }; | ||
| 2974 | } | ||
| 2975 | return pp.comp.addDiagnostic(.{ | ||
| 2976 | .tag = .unknown_pragma, | ||
| 2977 | .loc = pragma_name_tok.loc, | ||
| 2978 | }, pragma_name_tok.expansionSlice()); | ||
| 2979 | } | ||
| 2980 | |||
| 2981 | fn findIncludeFilenameToken( | ||
| 2982 | pp: *Preprocessor, | ||
| 2983 | first_token: RawToken, | ||
| 2984 | tokenizer: *Tokenizer, | ||
| 2985 | trailing_token_behavior: enum { ignore_trailing_tokens, expect_nl_eof }, | ||
| 2986 | ) !Token { | ||
| 2987 | const start = pp.tokens.len; | ||
| 2988 | defer pp.tokens.len = start; | ||
| 2989 | var first = first_token; | ||
| 2990 | |||
| 2991 | if (first.id == .angle_bracket_left) to_end: { | ||
| 2992 | // The tokenizer does not handle <foo> include strings so do it here. | ||
| 2993 | while (tokenizer.index < tokenizer.buf.len) : (tokenizer.index += 1) { | ||
| 2994 | switch (tokenizer.buf[tokenizer.index]) { | ||
| 2995 | '>' => { | ||
| 2996 | tokenizer.index += 1; | ||
| 2997 | first.end = tokenizer.index; | ||
| 2998 | first.id = .macro_string; | ||
| 2999 | break :to_end; | ||
| 3000 | }, | ||
| 3001 | '\n' => break, | ||
| 3002 | else => {}, | ||
| 3003 | } | ||
| 3004 | } | ||
| 3005 | try pp.comp.addDiagnostic(.{ | ||
| 3006 | .tag = .header_str_closing, | ||
| 3007 | .loc = .{ .id = first.source, .byte_offset = tokenizer.index, .line = first.line }, | ||
| 3008 | }, &.{}); | ||
| 3009 | try pp.err(first, .header_str_match); | ||
| 3010 | } | ||
| 3011 | // Try to expand if the argument is a macro. | ||
| 3012 | try pp.expandMacro(tokenizer, first); | ||
| 3013 | |||
| 3014 | // Check that we actually got a string. | ||
| 3015 | const filename_tok = pp.tokens.get(start); | ||
| 3016 | switch (filename_tok.id) { | ||
| 3017 | .string_literal, .macro_string => {}, | ||
| 3018 | else => { | ||
| 3019 | try pp.err(first, .expected_filename); | ||
| 3020 | try pp.expectNl(tokenizer); | ||
| 3021 | return error.InvalidInclude; | ||
| 3022 | }, | ||
| 3023 | } | ||
| 3024 | switch (trailing_token_behavior) { | ||
| 3025 | .expect_nl_eof => { | ||
| 3026 | // Error on extra tokens. | ||
| 3027 | const nl = tokenizer.nextNoWS(); | ||
| 3028 | if ((nl.id != .nl and nl.id != .eof) or pp.tokens.len > start + 1) { | ||
| 3029 | skipToNl(tokenizer); | ||
| 3030 | try pp.err(first, .extra_tokens_directive_end); | ||
| 3031 | } | ||
| 3032 | }, | ||
| 3033 | .ignore_trailing_tokens => {}, | ||
| 3034 | } | ||
| 3035 | return filename_tok; | ||
| 3036 | } | ||
| 3037 | |||
| 3038 | fn findIncludeSource(pp: *Preprocessor, tokenizer: *Tokenizer, first: RawToken, which: Compilation.WhichInclude) !Source { | ||
| 3039 | const filename_tok = try pp.findIncludeFilenameToken(first, tokenizer, .expect_nl_eof); | ||
| 3040 | |||
| 3041 | // Check for empty filename. | ||
| 3042 | const tok_slice = pp.expandedSliceExtra(filename_tok, .single_macro_ws); | ||
| 3043 | if (tok_slice.len < 3) { | ||
| 3044 | try pp.err(first, .empty_filename); | ||
| 3045 | return error.InvalidInclude; | ||
| 3046 | } | ||
| 3047 | |||
| 3048 | // Find the file. | ||
| 3049 | const filename = tok_slice[1 .. tok_slice.len - 1]; | ||
| 3050 | const include_type: Compilation.IncludeType = switch (filename_tok.id) { | ||
| 3051 | .string_literal => .quotes, | ||
| 3052 | .macro_string => .angle_brackets, | ||
| 3053 | else => unreachable, | ||
| 3054 | }; | ||
| 3055 | |||
| 3056 | return (try pp.comp.findInclude(filename, first, include_type, which)) orelse | ||
| 3057 | pp.fatal(first, "'{s}' not found", .{filename}); | ||
| 3058 | } | ||
| 3059 | |||
| 3060 | fn printLinemarker( | ||
| 3061 | pp: *Preprocessor, | ||
| 3062 | w: anytype, | ||
| 3063 | line_no: u32, | ||
| 3064 | source: Source, | ||
| 3065 | start_resume: enum(u8) { start, @"resume", none }, | ||
| 3066 | ) !void { | ||
| 3067 | try w.writeByte('#'); | ||
| 3068 | if (pp.linemarkers == .line_directives) try w.writeAll("line"); | ||
| 3069 | // line_no is 0 indexed | ||
| 3070 | try w.print(" {d} \"", .{line_no + 1}); | ||
| 3071 | for (source.path) |byte| switch (byte) { | ||
| 3072 | '\n' => try w.writeAll("\\n"), | ||
| 3073 | '\r' => try w.writeAll("\\r"), | ||
| 3074 | '\t' => try w.writeAll("\\t"), | ||
| 3075 | '\\' => try w.writeAll("\\\\"), | ||
| 3076 | '"' => try w.writeAll("\\\""), | ||
| 3077 | ' ', '!', '#'...'&', '('...'[', ']'...'~' => try w.writeByte(byte), | ||
| 3078 | // Use hex escapes for any non-ASCII/unprintable characters. | ||
| 3079 | // This ensures that the parsed version of this string will end up | ||
| 3080 | // containing the same bytes as the input regardless of encoding. | ||
| 3081 | else => { | ||
| 3082 | try w.writeAll("\\x"); | ||
| 3083 | try std.fmt.formatInt(byte, 16, .lower, .{ .width = 2, .fill = '0' }, w); | ||
| 3084 | }, | ||
| 3085 | }; | ||
| 3086 | try w.writeByte('"'); | ||
| 3087 | if (pp.linemarkers == .numeric_directives) { | ||
| 3088 | switch (start_resume) { | ||
| 3089 | .none => {}, | ||
| 3090 | .start => try w.writeAll(" 1"), | ||
| 3091 | .@"resume" => try w.writeAll(" 2"), | ||
| 3092 | } | ||
| 3093 | switch (source.kind) { | ||
| 3094 | .user => {}, | ||
| 3095 | .system => try w.writeAll(" 3"), | ||
| 3096 | .extern_c_system => try w.writeAll(" 3 4"), | ||
| 3097 | } | ||
| 3098 | } | ||
| 3099 | try w.writeByte('\n'); | ||
| 3100 | } | ||
| 3101 | |||
| 3102 | // After how many empty lines are needed to replace them with linemarkers. | ||
| 3103 | const collapse_newlines = 8; | ||
| 3104 | |||
| 3105 | /// Pretty print tokens and try to preserve whitespace. | ||
| 3106 | pub fn prettyPrintTokens(pp: *Preprocessor, w: anytype) !void { | ||
| 3107 | const tok_ids = pp.tokens.items(.id); | ||
| 3108 | |||
| 3109 | var i: u32 = 0; | ||
| 3110 | var last_nl = true; | ||
| 3111 | outer: while (true) : (i += 1) { | ||
| 3112 | var cur: Token = pp.tokens.get(i); | ||
| 3113 | switch (cur.id) { | ||
| 3114 | .eof => { | ||
| 3115 | if (!last_nl) try w.writeByte('\n'); | ||
| 3116 | return; | ||
| 3117 | }, | ||
| 3118 | .nl => { | ||
| 3119 | var newlines: u32 = 0; | ||
| 3120 | for (tok_ids[i..], i..) |id, j| { | ||
| 3121 | if (id == .nl) { | ||
| 3122 | newlines += 1; | ||
| 3123 | } else if (id == .eof) { | ||
| 3124 | if (!last_nl) try w.writeByte('\n'); | ||
| 3125 | return; | ||
| 3126 | } else if (id != .whitespace) { | ||
| 3127 | if (pp.linemarkers == .none) { | ||
| 3128 | if (newlines < 2) break; | ||
| 3129 | } else if (newlines < collapse_newlines) { | ||
| 3130 | break; | ||
| 3131 | } | ||
| 3132 | |||
| 3133 | i = @intCast((j - 1) - @intFromBool(tok_ids[j - 1] == .whitespace)); | ||
| 3134 | if (!last_nl) try w.writeAll("\n"); | ||
| 3135 | if (pp.linemarkers != .none) { | ||
| 3136 | const next = pp.tokens.get(i); | ||
| 3137 | const source = pp.comp.getSource(next.loc.id); | ||
| 3138 | const line_col = source.lineCol(next.loc); | ||
| 3139 | try pp.printLinemarker(w, line_col.line_no, source, .none); | ||
| 3140 | last_nl = true; | ||
| 3141 | } | ||
| 3142 | continue :outer; | ||
| 3143 | } | ||
| 3144 | } | ||
| 3145 | last_nl = true; | ||
| 3146 | try w.writeAll("\n"); | ||
| 3147 | }, | ||
| 3148 | .keyword_pragma => { | ||
| 3149 | const pragma_name = pp.expandedSlice(pp.tokens.get(i + 1)); | ||
| 3150 | const end_idx = mem.indexOfScalarPos(Token.Id, tok_ids, i, .nl) orelse i + 1; | ||
| 3151 | const pragma_len = @as(u32, @intCast(end_idx)) - i; | ||
| 3152 | |||
| 3153 | if (pp.comp.getPragma(pragma_name)) |prag| { | ||
| 3154 | if (!prag.shouldPreserveTokens(pp, i + 1)) { | ||
| 3155 | try w.writeByte('\n'); | ||
| 3156 | i += pragma_len; | ||
| 3157 | cur = pp.tokens.get(i); | ||
| 3158 | continue; | ||
| 3159 | } | ||
| 3160 | } | ||
| 3161 | try w.writeAll("#pragma"); | ||
| 3162 | i += 1; | ||
| 3163 | while (true) : (i += 1) { | ||
| 3164 | cur = pp.tokens.get(i); | ||
| 3165 | if (cur.id == .nl) { | ||
| 3166 | try w.writeByte('\n'); | ||
| 3167 | last_nl = true; | ||
| 3168 | break; | ||
| 3169 | } | ||
| 3170 | try w.writeByte(' '); | ||
| 3171 | const slice = pp.expandedSlice(cur); | ||
| 3172 | try w.writeAll(slice); | ||
| 3173 | } | ||
| 3174 | }, | ||
| 3175 | .whitespace => { | ||
| 3176 | var slice = pp.expandedSlice(cur); | ||
| 3177 | while (mem.indexOfScalar(u8, slice, '\n')) |some| { | ||
| 3178 | if (pp.linemarkers != .none) try w.writeByte('\n'); | ||
| 3179 | slice = slice[some + 1 ..]; | ||
| 3180 | } | ||
| 3181 | for (slice) |_| try w.writeByte(' '); | ||
| 3182 | last_nl = false; | ||
| 3183 | }, | ||
| 3184 | .include_start => { | ||
| 3185 | const source = pp.comp.getSource(cur.loc.id); | ||
| 3186 | |||
| 3187 | try pp.printLinemarker(w, 0, source, .start); | ||
| 3188 | last_nl = true; | ||
| 3189 | }, | ||
| 3190 | .include_resume => { | ||
| 3191 | const source = pp.comp.getSource(cur.loc.id); | ||
| 3192 | const line_col = source.lineCol(cur.loc); | ||
| 3193 | if (!last_nl) try w.writeAll("\n"); | ||
| 3194 | |||
| 3195 | try pp.printLinemarker(w, line_col.line_no, source, .@"resume"); | ||
| 3196 | last_nl = true; | ||
| 3197 | }, | ||
| 3198 | else => { | ||
| 3199 | const slice = pp.expandedSlice(cur); | ||
| 3200 | try w.writeAll(slice); | ||
| 3201 | last_nl = false; | ||
| 3202 | }, | ||
| 3203 | } | ||
| 3204 | } | ||
| 3205 | } | ||
| 3206 | |||
| 3207 | test "Preserve pragma tokens sometimes" { | ||
| 3208 | const allocator = std.testing.allocator; | ||
| 3209 | const Test = struct { | ||
| 3210 | fn runPreprocessor(source_text: []const u8) ![]const u8 { | ||
| 3211 | var buf = std.ArrayList(u8).init(allocator); | ||
| 3212 | defer buf.deinit(); | ||
| 3213 | |||
| 3214 | var comp = Compilation.init(allocator); | ||
| 3215 | defer comp.deinit(); | ||
| 3216 | |||
| 3217 | try comp.addDefaultPragmaHandlers(); | ||
| 3218 | |||
| 3219 | var pp = Preprocessor.init(&comp); | ||
| 3220 | defer pp.deinit(); | ||
| 3221 | |||
| 3222 | pp.preserve_whitespace = true; | ||
| 3223 | assert(pp.linemarkers == .none); | ||
| 3224 | |||
| 3225 | const test_runner_macros = try comp.addSourceFromBuffer("<test_runner>", source_text); | ||
| 3226 | const eof = try pp.preprocess(test_runner_macros); | ||
| 3227 | try pp.tokens.append(pp.gpa, eof); | ||
| 3228 | try pp.prettyPrintTokens(buf.writer()); | ||
| 3229 | return allocator.dupe(u8, buf.items); | ||
| 3230 | } | ||
| 3231 | |||
| 3232 | fn check(source_text: []const u8, expected: []const u8) !void { | ||
| 3233 | const output = try runPreprocessor(source_text); | ||
| 3234 | defer allocator.free(output); | ||
| 3235 | |||
| 3236 | try std.testing.expectEqualStrings(expected, output); | ||
| 3237 | } | ||
| 3238 | }; | ||
| 3239 | const preserve_gcc_diagnostic = | ||
| 3240 | \\#pragma GCC diagnostic error "-Wnewline-eof" | ||
| 3241 | \\#pragma GCC warning error "-Wnewline-eof" | ||
| 3242 | \\int x; | ||
| 3243 | \\#pragma GCC ignored error "-Wnewline-eof" | ||
| 3244 | \\ | ||
| 3245 | ; | ||
| 3246 | try Test.check(preserve_gcc_diagnostic, preserve_gcc_diagnostic); | ||
| 3247 | |||
| 3248 | const omit_once = | ||
| 3249 | \\#pragma once | ||
| 3250 | \\int x; | ||
| 3251 | \\#pragma once | ||
| 3252 | \\ | ||
| 3253 | ; | ||
| 3254 | // TODO should only be one newline afterwards when emulating clang | ||
| 3255 | try Test.check(omit_once, "\nint x;\n\n"); | ||
| 3256 | |||
| 3257 | const omit_poison = | ||
| 3258 | \\#pragma GCC poison foobar | ||
| 3259 | \\ | ||
| 3260 | ; | ||
| 3261 | try Test.check(omit_poison, "\n"); | ||
| 3262 | } | ||
| 3263 | |||
| 3264 | test "destringify" { | ||
| 3265 | const allocator = std.testing.allocator; | ||
| 3266 | const Test = struct { | ||
| 3267 | fn testDestringify(pp: *Preprocessor, stringified: []const u8, destringified: []const u8) !void { | ||
| 3268 | pp.char_buf.clearRetainingCapacity(); | ||
| 3269 | try pp.char_buf.ensureUnusedCapacity(stringified.len); | ||
| 3270 | pp.destringify(stringified); | ||
| 3271 | try std.testing.expectEqualStrings(destringified, pp.char_buf.items); | ||
| 3272 | } | ||
| 3273 | }; | ||
| 3274 | var comp = Compilation.init(allocator); | ||
| 3275 | defer comp.deinit(); | ||
| 3276 | var pp = Preprocessor.init(&comp); | ||
| 3277 | defer pp.deinit(); | ||
| 3278 | |||
| 3279 | try Test.testDestringify(&pp, "hello\tworld\n", "hello\tworld\n"); | ||
| 3280 | try Test.testDestringify(&pp, | ||
| 3281 | \\ \"FOO BAR BAZ\" | ||
| 3282 | , | ||
| 3283 | \\ "FOO BAR BAZ" | ||
| 3284 | ); | ||
| 3285 | try Test.testDestringify(&pp, | ||
| 3286 | \\ \\t\\n | ||
| 3287 | \\ | ||
| 3288 | , | ||
| 3289 | \\ \t\n | ||
| 3290 | \\ | ||
| 3291 | ); | ||
| 3292 | } | ||
| 3293 | |||
| 3294 | test "Include guards" { | ||
| 3295 | const Test = struct { | ||
| 3296 | /// This is here so that when #elifdef / #elifndef are added we don't forget | ||
| 3297 | /// to test that they don't accidentally break include guard detection | ||
| 3298 | fn pairsWithIfndef(tok_id: RawToken.Id) bool { | ||
| 3299 | return switch (tok_id) { | ||
| 3300 | .keyword_elif, | ||
| 3301 | .keyword_elifdef, | ||
| 3302 | .keyword_elifndef, | ||
| 3303 | .keyword_else, | ||
| 3304 | => true, | ||
| 3305 | |||
| 3306 | .keyword_include, | ||
| 3307 | .keyword_include_next, | ||
| 3308 | .keyword_embed, | ||
| 3309 | .keyword_define, | ||
| 3310 | .keyword_defined, | ||
| 3311 | .keyword_undef, | ||
| 3312 | .keyword_ifdef, | ||
| 3313 | .keyword_ifndef, | ||
| 3314 | .keyword_error, | ||
| 3315 | .keyword_warning, | ||
| 3316 | .keyword_pragma, | ||
| 3317 | .keyword_line, | ||
| 3318 | .keyword_endif, | ||
| 3319 | => false, | ||
| 3320 | else => unreachable, | ||
| 3321 | }; | ||
| 3322 | } | ||
| 3323 | |||
| 3324 | fn skippable(tok_id: RawToken.Id) bool { | ||
| 3325 | return switch (tok_id) { | ||
| 3326 | .keyword_defined, .keyword_va_args, .keyword_va_opt, .keyword_endif => true, | ||
| 3327 | else => false, | ||
| 3328 | }; | ||
| 3329 | } | ||
| 3330 | |||
| 3331 | fn testIncludeGuard(allocator: std.mem.Allocator, comptime template: []const u8, tok_id: RawToken.Id, expected_guards: u32) !void { | ||
| 3332 | var comp = Compilation.init(allocator); | ||
| 3333 | defer comp.deinit(); | ||
| 3334 | var pp = Preprocessor.init(&comp); | ||
| 3335 | defer pp.deinit(); | ||
| 3336 | |||
| 3337 | const path = try std.fs.path.join(allocator, &.{ ".", "bar.h" }); | ||
| 3338 | defer allocator.free(path); | ||
| 3339 | |||
| 3340 | _ = try comp.addSourceFromBuffer(path, "int bar = 5;\n"); | ||
| 3341 | |||
| 3342 | var buf = std.ArrayList(u8).init(allocator); | ||
| 3343 | defer buf.deinit(); | ||
| 3344 | |||
| 3345 | var writer = buf.writer(); | ||
| 3346 | switch (tok_id) { | ||
| 3347 | .keyword_include, .keyword_include_next => try writer.print(template, .{ tok_id.lexeme().?, " \"bar.h\"" }), | ||
| 3348 | .keyword_define, .keyword_undef => try writer.print(template, .{ tok_id.lexeme().?, " BAR" }), | ||
| 3349 | .keyword_ifndef, | ||
| 3350 | .keyword_ifdef, | ||
| 3351 | .keyword_elifdef, | ||
| 3352 | .keyword_elifndef, | ||
| 3353 | => try writer.print(template, .{ tok_id.lexeme().?, " BAR\n#endif" }), | ||
| 3354 | else => try writer.print(template, .{ tok_id.lexeme().?, "" }), | ||
| 3355 | } | ||
| 3356 | const source = try comp.addSourceFromBuffer("test.h", buf.items); | ||
| 3357 | _ = try pp.preprocess(source); | ||
| 3358 | |||
| 3359 | try std.testing.expectEqual(expected_guards, pp.include_guards.count()); | ||
| 3360 | } | ||
| 3361 | }; | ||
| 3362 | const tags = std.meta.tags(RawToken.Id); | ||
| 3363 | for (tags) |tag| { | ||
| 3364 | if (Test.skippable(tag)) continue; | ||
| 3365 | var copy = tag; | ||
| 3366 | copy.simplifyMacroKeyword(); | ||
| 3367 | if (copy != tag or tag == .keyword_else) { | ||
| 3368 | const inside_ifndef_template = | ||
| 3369 | \\//Leading comment (should be ignored) | ||
| 3370 | \\ | ||
| 3371 | \\#ifndef FOO | ||
| 3372 | \\#{s}{s} | ||
| 3373 | \\#endif | ||
| 3374 | ; | ||
| 3375 | const expected_guards: u32 = if (Test.pairsWithIfndef(tag)) 0 else 1; | ||
| 3376 | try Test.testIncludeGuard(std.testing.allocator, inside_ifndef_template, tag, expected_guards); | ||
| 3377 | |||
| 3378 | const outside_ifndef_template = | ||
| 3379 | \\#ifndef FOO | ||
| 3380 | \\#endif | ||
| 3381 | \\#{s}{s} | ||
| 3382 | ; | ||
| 3383 | try Test.testIncludeGuard(std.testing.allocator, outside_ifndef_template, tag, 0); | ||
| 3384 | } | ||
| 3385 | } | ||
| 3386 | } | ||
deps/aro/aro/Source.zig created+127| ... | @@ -0,0 +1,127 @@ | ||
| 1 | const std = @import("std"); | ||
| 2 | |||
| 3 | pub const Id = enum(u32) { | ||
| 4 | unused = 0, | ||
| 5 | generated = 1, | ||
| 6 | _, | ||
| 7 | }; | ||
| 8 | |||
| 9 | /// Classifies the file for line marker output in -E mode | ||
| 10 | pub const Kind = enum { | ||
| 11 | /// regular file | ||
| 12 | user, | ||
| 13 | /// Included from a system include directory | ||
| 14 | system, | ||
| 15 | /// Included from an "implicit extern C" directory | ||
| 16 | extern_c_system, | ||
| 17 | }; | ||
| 18 | |||
| 19 | pub const Location = struct { | ||
| 20 | id: Id = .unused, | ||
| 21 | byte_offset: u32 = 0, | ||
| 22 | line: u32 = 0, | ||
| 23 | |||
| 24 | pub fn eql(a: Location, b: Location) bool { | ||
| 25 | return a.id == b.id and a.byte_offset == b.byte_offset and a.line == b.line; | ||
| 26 | } | ||
| 27 | }; | ||
| 28 | |||
| 29 | const Source = @This(); | ||
| 30 | |||
| 31 | path: []const u8, | ||
| 32 | buf: []const u8, | ||
| 33 | id: Id, | ||
| 34 | /// each entry represents a byte position within `buf` where a backslash+newline was deleted | ||
| 35 | /// from the original raw buffer. The same position can appear multiple times if multiple | ||
| 36 | /// consecutive splices happened. Guaranteed to be non-decreasing | ||
| 37 | splice_locs: []const u32, | ||
| 38 | kind: Kind, | ||
| 39 | |||
| 40 | /// Todo: binary search instead of scanning entire `splice_locs`. | ||
| 41 | pub fn numSplicesBefore(source: Source, byte_offset: u32) u32 { | ||
| 42 | for (source.splice_locs, 0..) |splice_offset, i| { | ||
| 43 | if (splice_offset > byte_offset) return @intCast(i); | ||
| 44 | } | ||
| 45 | return @intCast(source.splice_locs.len); | ||
| 46 | } | ||
| 47 | |||
| 48 | /// Returns the actual line number (before newline splicing) of a Location | ||
| 49 | /// This corresponds to what the user would actually see in their text editor | ||
| 50 | pub fn physicalLine(source: Source, loc: Location) u32 { | ||
| 51 | return loc.line + source.numSplicesBefore(loc.byte_offset); | ||
| 52 | } | ||
| 53 | |||
| 54 | const LineCol = struct { line: []const u8, line_no: u32, col: u32, width: u32, end_with_splice: bool }; | ||
| 55 | |||
| 56 | pub fn lineCol(source: Source, loc: Location) LineCol { | ||
| 57 | var start: usize = 0; | ||
| 58 | // find the start of the line which is either a newline or a splice | ||
| 59 | if (std.mem.lastIndexOfScalar(u8, source.buf[0..loc.byte_offset], '\n')) |some| start = some + 1; | ||
| 60 | const splice_index: u32 = for (source.splice_locs, 0..) |splice_offset, i| { | ||
| 61 | if (splice_offset > start) { | ||
| 62 | if (splice_offset < loc.byte_offset) { | ||
| 63 | start = splice_offset; | ||
| 64 | break @as(u32, @intCast(i)) + 1; | ||
| 65 | } | ||
| 66 | break @intCast(i); | ||
| 67 | } | ||
| 68 | } else @intCast(source.splice_locs.len); | ||
| 69 | var i: usize = start; | ||
| 70 | var col: u32 = 1; | ||
| 71 | var width: u32 = 0; | ||
| 72 | |||
| 73 | while (i < loc.byte_offset) : (col += 1) { // TODO this is still incorrect, but better | ||
| 74 | const len = std.unicode.utf8ByteSequenceLength(source.buf[i]) catch { | ||
| 75 | i += 1; | ||
| 76 | continue; | ||
| 77 | }; | ||
| 78 | const cp = std.unicode.utf8Decode(source.buf[i..][0..len]) catch { | ||
| 79 | i += 1; | ||
| 80 | continue; | ||
| 81 | }; | ||
| 82 | width += codepointWidth(cp); | ||
| 83 | i += len; | ||
| 84 | } | ||
| 85 | |||
| 86 | // find the end of the line which is either a newline, EOF or a splice | ||
| 87 | var nl = source.buf.len; | ||
| 88 | var end_with_splice = false; | ||
| 89 | if (std.mem.indexOfScalar(u8, source.buf[start..], '\n')) |some| nl = some + start; | ||
| 90 | if (source.splice_locs.len > splice_index and nl > source.splice_locs[splice_index] and source.splice_locs[splice_index] > start) { | ||
| 91 | end_with_splice = true; | ||
| 92 | nl = source.splice_locs[splice_index]; | ||
| 93 | } | ||
| 94 | return .{ | ||
| 95 | .line = source.buf[start..nl], | ||
| 96 | .line_no = loc.line + splice_index, | ||
| 97 | .col = col, | ||
| 98 | .width = width, | ||
| 99 | .end_with_splice = end_with_splice, | ||
| 100 | }; | ||
| 101 | } | ||
| 102 | |||
| 103 | fn codepointWidth(cp: u32) u32 { | ||
| 104 | return switch (cp) { | ||
| 105 | 0x1100...0x115F, | ||
| 106 | 0x2329, | ||
| 107 | 0x232A, | ||
| 108 | 0x2E80...0x303F, | ||
| 109 | 0x3040...0x3247, | ||
| 110 | 0x3250...0x4DBF, | ||
| 111 | 0x4E00...0xA4C6, | ||
| 112 | 0xA960...0xA97C, | ||
| 113 | 0xAC00...0xD7A3, | ||
| 114 | 0xF900...0xFAFF, | ||
| 115 | 0xFE10...0xFE19, | ||
| 116 | 0xFE30...0xFE6B, | ||
| 117 | 0xFF01...0xFF60, | ||
| 118 | 0xFFE0...0xFFE6, | ||
| 119 | 0x1B000...0x1B001, | ||
| 120 | 0x1F200...0x1F251, | ||
| 121 | 0x20000...0x3FFFD, | ||
| 122 | 0x1F300...0x1F5FF, | ||
| 123 | 0x1F900...0x1F9FF, | ||
| 124 | => 2, | ||
| 125 | else => 1, | ||
| 126 | }; | ||
| 127 | } | ||
deps/aro/aro/StringInterner.zig created+83| ... | @@ -0,0 +1,83 @@ | ||
| 1 | const std = @import("std"); | ||
| 2 | const mem = std.mem; | ||
| 3 | const Compilation = @import("Compilation.zig"); | ||
| 4 | |||
| 5 | const StringToIdMap = std.StringHashMapUnmanaged(StringId); | ||
| 6 | |||
| 7 | pub const StringId = enum(u32) { | ||
| 8 | empty, | ||
| 9 | _, | ||
| 10 | }; | ||
| 11 | |||
| 12 | pub const TypeMapper = struct { | ||
| 13 | const LookupSpeed = enum { | ||
| 14 | fast, | ||
| 15 | slow, | ||
| 16 | }; | ||
| 17 | |||
| 18 | data: union(LookupSpeed) { | ||
| 19 | fast: []const []const u8, | ||
| 20 | slow: *const StringToIdMap, | ||
| 21 | }, | ||
| 22 | |||
| 23 | pub fn lookup(self: TypeMapper, string_id: StringInterner.StringId) []const u8 { | ||
| 24 | if (string_id == .empty) return ""; | ||
| 25 | switch (self.data) { | ||
| 26 | .fast => |arr| return arr[@intFromEnum(string_id)], | ||
| 27 | .slow => |map| { | ||
| 28 | var it = map.iterator(); | ||
| 29 | while (it.next()) |entry| { | ||
| 30 | if (entry.value_ptr.* == string_id) return entry.key_ptr.*; | ||
| 31 | } | ||
| 32 | unreachable; | ||
| 33 | }, | ||
| 34 | } | ||
| 35 | } | ||
| 36 | |||
| 37 | pub fn deinit(self: TypeMapper, allocator: mem.Allocator) void { | ||
| 38 | switch (self.data) { | ||
| 39 | .slow => {}, | ||
| 40 | .fast => |arr| allocator.free(arr), | ||
| 41 | } | ||
| 42 | } | ||
| 43 | }; | ||
| 44 | |||
| 45 | const StringInterner = @This(); | ||
| 46 | |||
| 47 | string_table: StringToIdMap = .{}, | ||
| 48 | next_id: StringId = @enumFromInt(@intFromEnum(StringId.empty) + 1), | ||
| 49 | |||
| 50 | pub fn deinit(self: *StringInterner, allocator: mem.Allocator) void { | ||
| 51 | self.string_table.deinit(allocator); | ||
| 52 | } | ||
| 53 | |||
| 54 | pub fn intern(comp: *Compilation, str: []const u8) !StringId { | ||
| 55 | return comp.string_interner.internExtra(comp.gpa, str); | ||
| 56 | } | ||
| 57 | |||
| 58 | pub fn internExtra(self: *StringInterner, allocator: mem.Allocator, str: []const u8) !StringId { | ||
| 59 | if (str.len == 0) return .empty; | ||
| 60 | |||
| 61 | const gop = try self.string_table.getOrPut(allocator, str); | ||
| 62 | if (gop.found_existing) return gop.value_ptr.*; | ||
| 63 | |||
| 64 | defer self.next_id = @enumFromInt(@intFromEnum(self.next_id) + 1); | ||
| 65 | gop.value_ptr.* = self.next_id; | ||
| 66 | return self.next_id; | ||
| 67 | } | ||
| 68 | |||
| 69 | /// deinit for the returned TypeMapper is a no-op and does not need to be called | ||
| 70 | pub fn getSlowTypeMapper(self: *const StringInterner) TypeMapper { | ||
| 71 | return TypeMapper{ .data = .{ .slow = &self.string_table } }; | ||
| 72 | } | ||
| 73 | |||
| 74 | /// Caller must call `deinit` on the returned TypeMapper | ||
| 75 | pub fn getFastTypeMapper(self: *const StringInterner, allocator: mem.Allocator) !TypeMapper { | ||
| 76 | var strings = try allocator.alloc([]const u8, @intFromEnum(self.next_id)); | ||
| 77 | var it = self.string_table.iterator(); | ||
| 78 | strings[0] = ""; | ||
| 79 | while (it.next()) |entry| { | ||
| 80 | strings[@intFromEnum(entry.value_ptr.*)] = entry.key_ptr.*; | ||
| 81 | } | ||
| 82 | return TypeMapper{ .data = .{ .fast = strings } }; | ||
| 83 | } | ||
deps/aro/aro/SymbolStack.zig created+375| ... | @@ -0,0 +1,375 @@ | ||
| 1 | const std = @import("std"); | ||
| 2 | const mem = std.mem; | ||
| 3 | const Allocator = mem.Allocator; | ||
| 4 | const assert = std.debug.assert; | ||
| 5 | const Tree = @import("Tree.zig"); | ||
| 6 | const Token = Tree.Token; | ||
| 7 | const TokenIndex = Tree.TokenIndex; | ||
| 8 | const NodeIndex = Tree.NodeIndex; | ||
| 9 | const Type = @import("Type.zig"); | ||
| 10 | const Parser = @import("Parser.zig"); | ||
| 11 | const Value = @import("Value.zig"); | ||
| 12 | const StringId = @import("StringInterner.zig").StringId; | ||
| 13 | |||
| 14 | pub const Symbol = struct { | ||
| 15 | name: StringId, | ||
| 16 | ty: Type, | ||
| 17 | tok: TokenIndex, | ||
| 18 | node: NodeIndex = .none, | ||
| 19 | kind: Kind, | ||
| 20 | val: Value, | ||
| 21 | }; | ||
| 22 | |||
| 23 | pub const Kind = enum { | ||
| 24 | typedef, | ||
| 25 | @"struct", | ||
| 26 | @"union", | ||
| 27 | @"enum", | ||
| 28 | decl, | ||
| 29 | def, | ||
| 30 | enumeration, | ||
| 31 | constexpr, | ||
| 32 | }; | ||
| 33 | |||
| 34 | const SymbolStack = @This(); | ||
| 35 | |||
| 36 | syms: std.MultiArrayList(Symbol) = .{}, | ||
| 37 | scopes: std.ArrayListUnmanaged(u32) = .{}, | ||
| 38 | |||
| 39 | pub fn deinit(s: *SymbolStack, gpa: Allocator) void { | ||
| 40 | s.syms.deinit(gpa); | ||
| 41 | s.scopes.deinit(gpa); | ||
| 42 | s.* = undefined; | ||
| 43 | } | ||
| 44 | |||
| 45 | pub fn scopeEnd(s: SymbolStack) u32 { | ||
| 46 | if (s.scopes.items.len == 0) return 0; | ||
| 47 | return s.scopes.items[s.scopes.items.len - 1]; | ||
| 48 | } | ||
| 49 | |||
| 50 | pub fn pushScope(s: *SymbolStack, p: *Parser) !void { | ||
| 51 | try s.scopes.append(p.gpa, @intCast(s.syms.len)); | ||
| 52 | } | ||
| 53 | |||
| 54 | pub fn popScope(s: *SymbolStack) void { | ||
| 55 | s.syms.len = s.scopes.pop(); | ||
| 56 | } | ||
| 57 | |||
| 58 | pub fn findTypedef(s: *SymbolStack, p: *Parser, name: StringId, name_tok: TokenIndex, no_type_yet: bool) !?Symbol { | ||
| 59 | const kinds = s.syms.items(.kind); | ||
| 60 | const names = s.syms.items(.name); | ||
| 61 | var i = s.syms.len; | ||
| 62 | while (i > 0) { | ||
| 63 | i -= 1; | ||
| 64 | switch (kinds[i]) { | ||
| 65 | .typedef => if (names[i] == name) return s.syms.get(i), | ||
| 66 | .@"struct" => if (names[i] == name) { | ||
| 67 | if (no_type_yet) return null; | ||
| 68 | try p.errStr(.must_use_struct, name_tok, p.tokSlice(name_tok)); | ||
| 69 | return s.syms.get(i); | ||
| 70 | }, | ||
| 71 | .@"union" => if (names[i] == name) { | ||
| 72 | if (no_type_yet) return null; | ||
| 73 | try p.errStr(.must_use_union, name_tok, p.tokSlice(name_tok)); | ||
| 74 | return s.syms.get(i); | ||
| 75 | }, | ||
| 76 | .@"enum" => if (names[i] == name) { | ||
| 77 | if (no_type_yet) return null; | ||
| 78 | try p.errStr(.must_use_enum, name_tok, p.tokSlice(name_tok)); | ||
| 79 | return s.syms.get(i); | ||
| 80 | }, | ||
| 81 | .def, .decl, .constexpr => if (names[i] == name) return null, | ||
| 82 | else => {}, | ||
| 83 | } | ||
| 84 | } | ||
| 85 | return null; | ||
| 86 | } | ||
| 87 | |||
| 88 | pub fn findSymbol(s: *SymbolStack, name: StringId) ?Symbol { | ||
| 89 | const kinds = s.syms.items(.kind); | ||
| 90 | const names = s.syms.items(.name); | ||
| 91 | var i = s.syms.len; | ||
| 92 | while (i > 0) { | ||
| 93 | i -= 1; | ||
| 94 | switch (kinds[i]) { | ||
| 95 | .def, .decl, .enumeration, .constexpr => if (names[i] == name) return s.syms.get(i), | ||
| 96 | else => {}, | ||
| 97 | } | ||
| 98 | } | ||
| 99 | return null; | ||
| 100 | } | ||
| 101 | |||
| 102 | pub fn findTag( | ||
| 103 | s: *SymbolStack, | ||
| 104 | p: *Parser, | ||
| 105 | name: StringId, | ||
| 106 | kind: Token.Id, | ||
| 107 | name_tok: TokenIndex, | ||
| 108 | next_tok_id: Token.Id, | ||
| 109 | ) !?Symbol { | ||
| 110 | const kinds = s.syms.items(.kind); | ||
| 111 | const names = s.syms.items(.name); | ||
| 112 | // `tag Name;` should always result in a new type if in a new scope. | ||
| 113 | const end = if (next_tok_id == .semicolon) s.scopeEnd() else 0; | ||
| 114 | var i = s.syms.len; | ||
| 115 | while (i > end) { | ||
| 116 | i -= 1; | ||
| 117 | switch (kinds[i]) { | ||
| 118 | .@"enum" => if (names[i] == name) { | ||
| 119 | if (kind == .keyword_enum) return s.syms.get(i); | ||
| 120 | break; | ||
| 121 | }, | ||
| 122 | .@"struct" => if (names[i] == name) { | ||
| 123 | if (kind == .keyword_struct) return s.syms.get(i); | ||
| 124 | break; | ||
| 125 | }, | ||
| 126 | .@"union" => if (names[i] == name) { | ||
| 127 | if (kind == .keyword_union) return s.syms.get(i); | ||
| 128 | break; | ||
| 129 | }, | ||
| 130 | else => {}, | ||
| 131 | } | ||
| 132 | } else return null; | ||
| 133 | |||
| 134 | if (i < s.scopeEnd()) return null; | ||
| 135 | try p.errStr(.wrong_tag, name_tok, p.tokSlice(name_tok)); | ||
| 136 | try p.errTok(.previous_definition, s.syms.items(.tok)[i]); | ||
| 137 | return null; | ||
| 138 | } | ||
| 139 | |||
| 140 | pub fn defineTypedef( | ||
| 141 | s: *SymbolStack, | ||
| 142 | p: *Parser, | ||
| 143 | name: StringId, | ||
| 144 | ty: Type, | ||
| 145 | tok: TokenIndex, | ||
| 146 | node: NodeIndex, | ||
| 147 | ) !void { | ||
| 148 | const kinds = s.syms.items(.kind); | ||
| 149 | const names = s.syms.items(.name); | ||
| 150 | const end = s.scopeEnd(); | ||
| 151 | var i = s.syms.len; | ||
| 152 | while (i > end) { | ||
| 153 | i -= 1; | ||
| 154 | switch (kinds[i]) { | ||
| 155 | .typedef => if (names[i] == name) { | ||
| 156 | const prev_ty = s.syms.items(.ty)[i]; | ||
| 157 | if (ty.eql(prev_ty, p.comp, true)) break; | ||
| 158 | try p.errStr(.redefinition_of_typedef, tok, try p.typePairStrExtra(ty, " vs ", prev_ty)); | ||
| 159 | const previous_tok = s.syms.items(.tok)[i]; | ||
| 160 | if (previous_tok != 0) try p.errTok(.previous_definition, previous_tok); | ||
| 161 | break; | ||
| 162 | }, | ||
| 163 | else => {}, | ||
| 164 | } | ||
| 165 | } | ||
| 166 | try s.syms.append(p.gpa, .{ | ||
| 167 | .kind = .typedef, | ||
| 168 | .name = name, | ||
| 169 | .tok = tok, | ||
| 170 | .ty = ty, | ||
| 171 | .node = node, | ||
| 172 | .val = .{}, | ||
| 173 | }); | ||
| 174 | } | ||
| 175 | |||
| 176 | pub fn defineSymbol( | ||
| 177 | s: *SymbolStack, | ||
| 178 | p: *Parser, | ||
| 179 | name: StringId, | ||
| 180 | ty: Type, | ||
| 181 | tok: TokenIndex, | ||
| 182 | node: NodeIndex, | ||
| 183 | val: Value, | ||
| 184 | constexpr: bool, | ||
| 185 | ) !void { | ||
| 186 | const kinds = s.syms.items(.kind); | ||
| 187 | const names = s.syms.items(.name); | ||
| 188 | const end = s.scopeEnd(); | ||
| 189 | var i = s.syms.len; | ||
| 190 | while (i > end) { | ||
| 191 | i -= 1; | ||
| 192 | switch (kinds[i]) { | ||
| 193 | .enumeration => if (names[i] == name) { | ||
| 194 | try p.errStr(.redefinition_different_sym, tok, p.tokSlice(tok)); | ||
| 195 | try p.errTok(.previous_definition, s.syms.items(.tok)[i]); | ||
| 196 | break; | ||
| 197 | }, | ||
| 198 | .decl => if (names[i] == name) { | ||
| 199 | const prev_ty = s.syms.items(.ty)[i]; | ||
| 200 | if (!ty.eql(prev_ty, p.comp, true)) { | ||
| 201 | try p.errStr(.redefinition_incompatible, tok, p.tokSlice(tok)); | ||
| 202 | try p.errTok(.previous_definition, s.syms.items(.tok)[i]); | ||
| 203 | } | ||
| 204 | break; | ||
| 205 | }, | ||
| 206 | .def, .constexpr => if (names[i] == name) { | ||
| 207 | try p.errStr(.redefinition, tok, p.tokSlice(tok)); | ||
| 208 | try p.errTok(.previous_definition, s.syms.items(.tok)[i]); | ||
| 209 | break; | ||
| 210 | }, | ||
| 211 | else => {}, | ||
| 212 | } | ||
| 213 | } | ||
| 214 | try s.syms.append(p.gpa, .{ | ||
| 215 | .kind = if (constexpr) .constexpr else .def, | ||
| 216 | .name = name, | ||
| 217 | .tok = tok, | ||
| 218 | .ty = ty, | ||
| 219 | .node = node, | ||
| 220 | .val = val, | ||
| 221 | }); | ||
| 222 | } | ||
| 223 | |||
| 224 | pub fn declareSymbol( | ||
| 225 | s: *SymbolStack, | ||
| 226 | p: *Parser, | ||
| 227 | name: StringId, | ||
| 228 | ty: Type, | ||
| 229 | tok: TokenIndex, | ||
| 230 | node: NodeIndex, | ||
| 231 | ) !void { | ||
| 232 | const kinds = s.syms.items(.kind); | ||
| 233 | const names = s.syms.items(.name); | ||
| 234 | const end = s.scopeEnd(); | ||
| 235 | var i = s.syms.len; | ||
| 236 | while (i > end) { | ||
| 237 | i -= 1; | ||
| 238 | switch (kinds[i]) { | ||
| 239 | .enumeration => if (names[i] == name) { | ||
| 240 | try p.errStr(.redefinition_different_sym, tok, p.tokSlice(tok)); | ||
| 241 | try p.errTok(.previous_definition, s.syms.items(.tok)[i]); | ||
| 242 | break; | ||
| 243 | }, | ||
| 244 | .decl => if (names[i] == name) { | ||
| 245 | const prev_ty = s.syms.items(.ty)[i]; | ||
| 246 | if (!ty.eql(prev_ty, p.comp, true)) { | ||
| 247 | try p.errStr(.redefinition_incompatible, tok, p.tokSlice(tok)); | ||
| 248 | try p.errTok(.previous_definition, s.syms.items(.tok)[i]); | ||
| 249 | } | ||
| 250 | break; | ||
| 251 | }, | ||
| 252 | .def, .constexpr => if (names[i] == name) { | ||
| 253 | const prev_ty = s.syms.items(.ty)[i]; | ||
| 254 | if (!ty.eql(prev_ty, p.comp, true)) { | ||
| 255 | try p.errStr(.redefinition_incompatible, tok, p.tokSlice(tok)); | ||
| 256 | try p.errTok(.previous_definition, s.syms.items(.tok)[i]); | ||
| 257 | break; | ||
| 258 | } | ||
| 259 | return; | ||
| 260 | }, | ||
| 261 | else => {}, | ||
| 262 | } | ||
| 263 | } | ||
| 264 | try s.syms.append(p.gpa, .{ | ||
| 265 | .kind = .decl, | ||
| 266 | .name = name, | ||
| 267 | .tok = tok, | ||
| 268 | .ty = ty, | ||
| 269 | .node = node, | ||
| 270 | .val = .{}, | ||
| 271 | }); | ||
| 272 | } | ||
| 273 | |||
| 274 | pub fn defineParam(s: *SymbolStack, p: *Parser, name: StringId, ty: Type, tok: TokenIndex) !void { | ||
| 275 | const kinds = s.syms.items(.kind); | ||
| 276 | const names = s.syms.items(.name); | ||
| 277 | const end = s.scopeEnd(); | ||
| 278 | var i = s.syms.len; | ||
| 279 | while (i > end) { | ||
| 280 | i -= 1; | ||
| 281 | switch (kinds[i]) { | ||
| 282 | .enumeration, .decl, .def, .constexpr => if (names[i] == name) { | ||
| 283 | try p.errStr(.redefinition_of_parameter, tok, p.tokSlice(tok)); | ||
| 284 | try p.errTok(.previous_definition, s.syms.items(.tok)[i]); | ||
| 285 | break; | ||
| 286 | }, | ||
| 287 | else => {}, | ||
| 288 | } | ||
| 289 | } | ||
| 290 | if (ty.is(.fp16) and !p.comp.hasHalfPrecisionFloatABI()) { | ||
| 291 | try p.errStr(.suggest_pointer_for_invalid_fp16, tok, "parameters"); | ||
| 292 | } | ||
| 293 | try s.syms.append(p.gpa, .{ | ||
| 294 | .kind = .def, | ||
| 295 | .name = name, | ||
| 296 | .tok = tok, | ||
| 297 | .ty = ty, | ||
| 298 | .val = .{}, | ||
| 299 | }); | ||
| 300 | } | ||
| 301 | |||
| 302 | pub fn defineTag( | ||
| 303 | s: *SymbolStack, | ||
| 304 | p: *Parser, | ||
| 305 | name: StringId, | ||
| 306 | kind: Token.Id, | ||
| 307 | tok: TokenIndex, | ||
| 308 | ) !?Symbol { | ||
| 309 | const kinds = s.syms.items(.kind); | ||
| 310 | const names = s.syms.items(.name); | ||
| 311 | const end = s.scopeEnd(); | ||
| 312 | var i = s.syms.len; | ||
| 313 | while (i > end) { | ||
| 314 | i -= 1; | ||
| 315 | switch (kinds[i]) { | ||
| 316 | .@"enum" => if (names[i] == name) { | ||
| 317 | if (kind == .keyword_enum) return s.syms.get(i); | ||
| 318 | try p.errStr(.wrong_tag, tok, p.tokSlice(tok)); | ||
| 319 | try p.errTok(.previous_definition, s.syms.items(.tok)[i]); | ||
| 320 | return null; | ||
| 321 | }, | ||
| 322 | .@"struct" => if (names[i] == name) { | ||
| 323 | if (kind == .keyword_struct) return s.syms.get(i); | ||
| 324 | try p.errStr(.wrong_tag, tok, p.tokSlice(tok)); | ||
| 325 | try p.errTok(.previous_definition, s.syms.items(.tok)[i]); | ||
| 326 | return null; | ||
| 327 | }, | ||
| 328 | .@"union" => if (names[i] == name) { | ||
| 329 | if (kind == .keyword_union) return s.syms.get(i); | ||
| 330 | try p.errStr(.wrong_tag, tok, p.tokSlice(tok)); | ||
| 331 | try p.errTok(.previous_definition, s.syms.items(.tok)[i]); | ||
| 332 | return null; | ||
| 333 | }, | ||
| 334 | else => {}, | ||
| 335 | } | ||
| 336 | } | ||
| 337 | return null; | ||
| 338 | } | ||
| 339 | |||
| 340 | pub fn defineEnumeration( | ||
| 341 | s: *SymbolStack, | ||
| 342 | p: *Parser, | ||
| 343 | name: StringId, | ||
| 344 | ty: Type, | ||
| 345 | tok: TokenIndex, | ||
| 346 | val: Value, | ||
| 347 | ) !void { | ||
| 348 | const kinds = s.syms.items(.kind); | ||
| 349 | const names = s.syms.items(.name); | ||
| 350 | const end = s.scopeEnd(); | ||
| 351 | var i = s.syms.len; | ||
| 352 | while (i > end) { | ||
| 353 | i -= 1; | ||
| 354 | switch (kinds[i]) { | ||
| 355 | .enumeration => if (names[i] == name) { | ||
| 356 | try p.errStr(.redefinition, tok, p.tokSlice(tok)); | ||
| 357 | try p.errTok(.previous_definition, s.syms.items(.tok)[i]); | ||
| 358 | return; | ||
| 359 | }, | ||
| 360 | .decl, .def, .constexpr => if (names[i] == name) { | ||
| 361 | try p.errStr(.redefinition_different_sym, tok, p.tokSlice(tok)); | ||
| 362 | try p.errTok(.previous_definition, s.syms.items(.tok)[i]); | ||
| 363 | return; | ||
| 364 | }, | ||
| 365 | else => {}, | ||
| 366 | } | ||
| 367 | } | ||
| 368 | try s.syms.append(p.gpa, .{ | ||
| 369 | .kind = .enumeration, | ||
| 370 | .name = name, | ||
| 371 | .tok = tok, | ||
| 372 | .ty = ty, | ||
| 373 | .val = val, | ||
| 374 | }); | ||
| 375 | } | ||
deps/aro/aro/Tokenizer.zig created+2171| ... | @@ -0,0 +1,2171 @@ | ||
| 1 | const std = @import("std"); | ||
| 2 | const assert = std.debug.assert; | ||
| 3 | const Compilation = @import("Compilation.zig"); | ||
| 4 | const Source = @import("Source.zig"); | ||
| 5 | const LangOpts = @import("LangOpts.zig"); | ||
| 6 | |||
| 7 | pub const Token = struct { | ||
| 8 | id: Id, | ||
| 9 | source: Source.Id, | ||
| 10 | start: u32 = 0, | ||
| 11 | end: u32 = 0, | ||
| 12 | line: u32 = 0, | ||
| 13 | |||
| 14 | pub const Id = enum(u8) { | ||
| 15 | invalid, | ||
| 16 | nl, | ||
| 17 | whitespace, | ||
| 18 | eof, | ||
| 19 | /// identifier containing solely basic character set characters | ||
| 20 | identifier, | ||
| 21 | /// identifier with at least one extended character | ||
| 22 | extended_identifier, | ||
| 23 | |||
| 24 | // string literals with prefixes | ||
| 25 | string_literal, | ||
| 26 | string_literal_utf_16, | ||
| 27 | string_literal_utf_8, | ||
| 28 | string_literal_utf_32, | ||
| 29 | string_literal_wide, | ||
| 30 | |||
| 31 | /// Any string literal with an embedded newline or EOF | ||
| 32 | /// Always a parser error; by default just a warning from preprocessor | ||
| 33 | unterminated_string_literal, | ||
| 34 | |||
| 35 | // <foobar> only generated by preprocessor | ||
| 36 | macro_string, | ||
| 37 | |||
| 38 | // char literals with prefixes | ||
| 39 | char_literal, | ||
| 40 | char_literal_utf_8, | ||
| 41 | char_literal_utf_16, | ||
| 42 | char_literal_utf_32, | ||
| 43 | char_literal_wide, | ||
| 44 | |||
| 45 | /// Any character literal with nothing inside the quotes | ||
| 46 | /// Always a parser error; by default just a warning from preprocessor | ||
| 47 | empty_char_literal, | ||
| 48 | |||
| 49 | /// Any character literal with an embedded newline or EOF | ||
| 50 | /// Always a parser error; by default just a warning from preprocessor | ||
| 51 | unterminated_char_literal, | ||
| 52 | |||
| 53 | /// `/* */` style comment without a closing `*/` before EOF | ||
| 54 | unterminated_comment, | ||
| 55 | |||
| 56 | /// Integer literal tokens generated by preprocessor. | ||
| 57 | one, | ||
| 58 | zero, | ||
| 59 | |||
| 60 | bang, | ||
| 61 | bang_equal, | ||
| 62 | pipe, | ||
| 63 | pipe_pipe, | ||
| 64 | pipe_equal, | ||
| 65 | equal, | ||
| 66 | equal_equal, | ||
| 67 | l_paren, | ||
| 68 | r_paren, | ||
| 69 | l_brace, | ||
| 70 | r_brace, | ||
| 71 | l_bracket, | ||
| 72 | r_bracket, | ||
| 73 | period, | ||
| 74 | ellipsis, | ||
| 75 | caret, | ||
| 76 | caret_equal, | ||
| 77 | plus, | ||
| 78 | plus_plus, | ||
| 79 | plus_equal, | ||
| 80 | minus, | ||
| 81 | minus_minus, | ||
| 82 | minus_equal, | ||
| 83 | asterisk, | ||
| 84 | asterisk_equal, | ||
| 85 | percent, | ||
| 86 | percent_equal, | ||
| 87 | arrow, | ||
| 88 | colon, | ||
| 89 | colon_colon, | ||
| 90 | semicolon, | ||
| 91 | slash, | ||
| 92 | slash_equal, | ||
| 93 | comma, | ||
| 94 | ampersand, | ||
| 95 | ampersand_ampersand, | ||
| 96 | ampersand_equal, | ||
| 97 | question_mark, | ||
| 98 | angle_bracket_left, | ||
| 99 | angle_bracket_left_equal, | ||
| 100 | angle_bracket_angle_bracket_left, | ||
| 101 | angle_bracket_angle_bracket_left_equal, | ||
| 102 | angle_bracket_right, | ||
| 103 | angle_bracket_right_equal, | ||
| 104 | angle_bracket_angle_bracket_right, | ||
| 105 | angle_bracket_angle_bracket_right_equal, | ||
| 106 | tilde, | ||
| 107 | hash, | ||
| 108 | hash_hash, | ||
| 109 | |||
| 110 | /// Special token to speed up preprocessing, `loc.end` will be an index to the param list. | ||
| 111 | macro_param, | ||
| 112 | /// Special token to signal that the argument must be replaced without expansion (e.g. in concatenation) | ||
| 113 | macro_param_no_expand, | ||
| 114 | /// Special token to speed up preprocessing, `loc.end` will be an index to the param list. | ||
| 115 | stringify_param, | ||
| 116 | /// Same as stringify_param, but for var args | ||
| 117 | stringify_va_args, | ||
| 118 | /// Special macro whitespace, always equal to a single space | ||
| 119 | macro_ws, | ||
| 120 | /// Special token for implementing __has_attribute | ||
| 121 | macro_param_has_attribute, | ||
| 122 | /// Special token for implementing __has_c_attribute | ||
| 123 | macro_param_has_c_attribute, | ||
| 124 | /// Special token for implementing __has_declspec_attribute | ||
| 125 | macro_param_has_declspec_attribute, | ||
| 126 | /// Special token for implementing __has_warning | ||
| 127 | macro_param_has_warning, | ||
| 128 | /// Special token for implementing __has_feature | ||
| 129 | macro_param_has_feature, | ||
| 130 | /// Special token for implementing __has_extension | ||
| 131 | macro_param_has_extension, | ||
| 132 | /// Special token for implementing __has_builtin | ||
| 133 | macro_param_has_builtin, | ||
| 134 | /// Special token for implementing __has_include | ||
| 135 | macro_param_has_include, | ||
| 136 | /// Special token for implementing __has_include_next | ||
| 137 | macro_param_has_include_next, | ||
| 138 | /// Special token for implementing __has_embed | ||
| 139 | macro_param_has_embed, | ||
| 140 | /// Special token for implementing __is_identifier | ||
| 141 | macro_param_is_identifier, | ||
| 142 | /// Special token for implementing __FILE__ | ||
| 143 | macro_file, | ||
| 144 | /// Special token for implementing __LINE__ | ||
| 145 | macro_line, | ||
| 146 | /// Special token for implementing __COUNTER__ | ||
| 147 | macro_counter, | ||
| 148 | /// Special token for implementing _Pragma | ||
| 149 | macro_param_pragma_operator, | ||
| 150 | |||
| 151 | /// Special identifier for implementing __func__ | ||
| 152 | macro_func, | ||
| 153 | /// Special identifier for implementing __FUNCTION__ | ||
| 154 | macro_function, | ||
| 155 | /// Special identifier for implementing __PRETTY_FUNCTION__ | ||
| 156 | macro_pretty_func, | ||
| 157 | |||
| 158 | keyword_auto, | ||
| 159 | keyword_auto_type, | ||
| 160 | keyword_break, | ||
| 161 | keyword_case, | ||
| 162 | keyword_char, | ||
| 163 | keyword_const, | ||
| 164 | keyword_continue, | ||
| 165 | keyword_default, | ||
| 166 | keyword_do, | ||
| 167 | keyword_double, | ||
| 168 | keyword_else, | ||
| 169 | keyword_enum, | ||
| 170 | keyword_extern, | ||
| 171 | keyword_float, | ||
| 172 | keyword_for, | ||
| 173 | keyword_goto, | ||
| 174 | keyword_if, | ||
| 175 | keyword_int, | ||
| 176 | keyword_long, | ||
| 177 | keyword_register, | ||
| 178 | keyword_return, | ||
| 179 | keyword_short, | ||
| 180 | keyword_signed, | ||
| 181 | keyword_sizeof, | ||
| 182 | keyword_static, | ||
| 183 | keyword_struct, | ||
| 184 | keyword_switch, | ||
| 185 | keyword_typedef, | ||
| 186 | keyword_typeof1, | ||
| 187 | keyword_typeof2, | ||
| 188 | keyword_union, | ||
| 189 | keyword_unsigned, | ||
| 190 | keyword_void, | ||
| 191 | keyword_volatile, | ||
| 192 | keyword_while, | ||
| 193 | |||
| 194 | // ISO C99 | ||
| 195 | keyword_bool, | ||
| 196 | keyword_complex, | ||
| 197 | keyword_imaginary, | ||
| 198 | keyword_inline, | ||
| 199 | keyword_restrict, | ||
| 200 | |||
| 201 | // ISO C11 | ||
| 202 | keyword_alignas, | ||
| 203 | keyword_alignof, | ||
| 204 | keyword_atomic, | ||
| 205 | keyword_generic, | ||
| 206 | keyword_noreturn, | ||
| 207 | keyword_static_assert, | ||
| 208 | keyword_thread_local, | ||
| 209 | |||
| 210 | // ISO C23 | ||
| 211 | keyword_bit_int, | ||
| 212 | keyword_c23_alignas, | ||
| 213 | keyword_c23_alignof, | ||
| 214 | keyword_c23_bool, | ||
| 215 | keyword_c23_static_assert, | ||
| 216 | keyword_c23_thread_local, | ||
| 217 | keyword_constexpr, | ||
| 218 | keyword_true, | ||
| 219 | keyword_false, | ||
| 220 | keyword_nullptr, | ||
| 221 | keyword_typeof_unqual, | ||
| 222 | |||
| 223 | // Preprocessor directives | ||
| 224 | keyword_include, | ||
| 225 | keyword_include_next, | ||
| 226 | keyword_embed, | ||
| 227 | keyword_define, | ||
| 228 | keyword_defined, | ||
| 229 | keyword_undef, | ||
| 230 | keyword_ifdef, | ||
| 231 | keyword_ifndef, | ||
| 232 | keyword_elif, | ||
| 233 | keyword_elifdef, | ||
| 234 | keyword_elifndef, | ||
| 235 | keyword_endif, | ||
| 236 | keyword_error, | ||
| 237 | keyword_warning, | ||
| 238 | keyword_pragma, | ||
| 239 | keyword_line, | ||
| 240 | keyword_va_args, | ||
| 241 | keyword_va_opt, | ||
| 242 | |||
| 243 | // gcc keywords | ||
| 244 | keyword_const1, | ||
| 245 | keyword_const2, | ||
| 246 | keyword_inline1, | ||
| 247 | keyword_inline2, | ||
| 248 | keyword_volatile1, | ||
| 249 | keyword_volatile2, | ||
| 250 | keyword_restrict1, | ||
| 251 | keyword_restrict2, | ||
| 252 | keyword_alignof1, | ||
| 253 | keyword_alignof2, | ||
| 254 | keyword_typeof, | ||
| 255 | keyword_attribute1, | ||
| 256 | keyword_attribute2, | ||
| 257 | keyword_extension, | ||
| 258 | keyword_asm, | ||
| 259 | keyword_asm1, | ||
| 260 | keyword_asm2, | ||
| 261 | keyword_float80, | ||
| 262 | /// _Float128 | ||
| 263 | keyword_float128_1, | ||
| 264 | /// __float128 | ||
| 265 | keyword_float128_2, | ||
| 266 | keyword_int128, | ||
| 267 | keyword_imag1, | ||
| 268 | keyword_imag2, | ||
| 269 | keyword_real1, | ||
| 270 | keyword_real2, | ||
| 271 | keyword_float16, | ||
| 272 | |||
| 273 | // clang keywords | ||
| 274 | keyword_fp16, | ||
| 275 | |||
| 276 | // ms keywords | ||
| 277 | keyword_declspec, | ||
| 278 | keyword_int64, | ||
| 279 | keyword_int64_2, | ||
| 280 | keyword_int32, | ||
| 281 | keyword_int32_2, | ||
| 282 | keyword_int16, | ||
| 283 | keyword_int16_2, | ||
| 284 | keyword_int8, | ||
| 285 | keyword_int8_2, | ||
| 286 | keyword_stdcall, | ||
| 287 | keyword_stdcall2, | ||
| 288 | keyword_thiscall, | ||
| 289 | keyword_thiscall2, | ||
| 290 | keyword_vectorcall, | ||
| 291 | keyword_vectorcall2, | ||
| 292 | |||
| 293 | // builtins that require special parsing | ||
| 294 | builtin_choose_expr, | ||
| 295 | builtin_va_arg, | ||
| 296 | builtin_offsetof, | ||
| 297 | builtin_bitoffsetof, | ||
| 298 | builtin_types_compatible_p, | ||
| 299 | |||
| 300 | /// Generated by #embed directive | ||
| 301 | /// Decimal value with no prefix or suffix | ||
| 302 | embed_byte, | ||
| 303 | |||
| 304 | /// preprocessor number | ||
| 305 | /// An optional period, followed by a digit 0-9, followed by any number of letters | ||
| 306 | /// digits, underscores, periods, and exponents (e+, e-, E+, E-, p+, p-, P+, P-) | ||
| 307 | pp_num, | ||
| 308 | |||
| 309 | /// preprocessor placemarker token | ||
| 310 | /// generated if `##` is used with a zero-token argument | ||
| 311 | /// removed after substitution, so the parser should never see this | ||
| 312 | /// See C99 6.10.3.3.2 | ||
| 313 | placemarker, | ||
| 314 | |||
| 315 | /// Virtual linemarker token output from preprocessor to indicate start of a new include | ||
| 316 | include_start, | ||
| 317 | |||
| 318 | /// Virtual linemarker token output from preprocessor to indicate resuming a file after | ||
| 319 | /// completion of the preceding #include | ||
| 320 | include_resume, | ||
| 321 | |||
| 322 | /// A comment token if asked to preserve comments. | ||
| 323 | comment, | ||
| 324 | |||
| 325 | /// Return true if token is identifier or keyword. | ||
| 326 | pub fn isMacroIdentifier(id: Id) bool { | ||
| 327 | switch (id) { | ||
| 328 | .keyword_include, | ||
| 329 | .keyword_include_next, | ||
| 330 | .keyword_embed, | ||
| 331 | .keyword_define, | ||
| 332 | .keyword_defined, | ||
| 333 | .keyword_undef, | ||
| 334 | .keyword_ifdef, | ||
| 335 | .keyword_ifndef, | ||
| 336 | .keyword_elif, | ||
| 337 | .keyword_elifdef, | ||
| 338 | .keyword_elifndef, | ||
| 339 | .keyword_endif, | ||
| 340 | .keyword_error, | ||
| 341 | .keyword_warning, | ||
| 342 | .keyword_pragma, | ||
| 343 | .keyword_line, | ||
| 344 | .keyword_va_args, | ||
| 345 | .keyword_va_opt, | ||
| 346 | .macro_func, | ||
| 347 | .macro_function, | ||
| 348 | .macro_pretty_func, | ||
| 349 | .keyword_auto, | ||
| 350 | .keyword_auto_type, | ||
| 351 | .keyword_break, | ||
| 352 | .keyword_case, | ||
| 353 | .keyword_char, | ||
| 354 | .keyword_const, | ||
| 355 | .keyword_continue, | ||
| 356 | .keyword_default, | ||
| 357 | .keyword_do, | ||
| 358 | .keyword_double, | ||
| 359 | .keyword_else, | ||
| 360 | .keyword_enum, | ||
| 361 | .keyword_extern, | ||
| 362 | .keyword_float, | ||
| 363 | .keyword_for, | ||
| 364 | .keyword_goto, | ||
| 365 | .keyword_if, | ||
| 366 | .keyword_int, | ||
| 367 | .keyword_long, | ||
| 368 | .keyword_register, | ||
| 369 | .keyword_return, | ||
| 370 | .keyword_short, | ||
| 371 | .keyword_signed, | ||
| 372 | .keyword_sizeof, | ||
| 373 | .keyword_static, | ||
| 374 | .keyword_struct, | ||
| 375 | .keyword_switch, | ||
| 376 | .keyword_typedef, | ||
| 377 | .keyword_union, | ||
| 378 | .keyword_unsigned, | ||
| 379 | .keyword_void, | ||
| 380 | .keyword_volatile, | ||
| 381 | .keyword_while, | ||
| 382 | .keyword_bool, | ||
| 383 | .keyword_complex, | ||
| 384 | .keyword_imaginary, | ||
| 385 | .keyword_inline, | ||
| 386 | .keyword_restrict, | ||
| 387 | .keyword_alignas, | ||
| 388 | .keyword_alignof, | ||
| 389 | .keyword_atomic, | ||
| 390 | .keyword_generic, | ||
| 391 | .keyword_noreturn, | ||
| 392 | .keyword_static_assert, | ||
| 393 | .keyword_thread_local, | ||
| 394 | .identifier, | ||
| 395 | .extended_identifier, | ||
| 396 | .keyword_typeof, | ||
| 397 | .keyword_typeof1, | ||
| 398 | .keyword_typeof2, | ||
| 399 | .keyword_const1, | ||
| 400 | .keyword_const2, | ||
| 401 | .keyword_inline1, | ||
| 402 | .keyword_inline2, | ||
| 403 | .keyword_volatile1, | ||
| 404 | .keyword_volatile2, | ||
| 405 | .keyword_restrict1, | ||
| 406 | .keyword_restrict2, | ||
| 407 | .keyword_alignof1, | ||
| 408 | .keyword_alignof2, | ||
| 409 | .builtin_choose_expr, | ||
| 410 | .builtin_va_arg, | ||
| 411 | .builtin_offsetof, | ||
| 412 | .builtin_bitoffsetof, | ||
| 413 | .builtin_types_compatible_p, | ||
| 414 | .keyword_attribute1, | ||
| 415 | .keyword_attribute2, | ||
| 416 | .keyword_extension, | ||
| 417 | .keyword_asm, | ||
| 418 | .keyword_asm1, | ||
| 419 | .keyword_asm2, | ||
| 420 | .keyword_float80, | ||
| 421 | .keyword_float128_1, | ||
| 422 | .keyword_float128_2, | ||
| 423 | .keyword_int128, | ||
| 424 | .keyword_imag1, | ||
| 425 | .keyword_imag2, | ||
| 426 | .keyword_real1, | ||
| 427 | .keyword_real2, | ||
| 428 | .keyword_float16, | ||
| 429 | .keyword_fp16, | ||
| 430 | .keyword_declspec, | ||
| 431 | .keyword_int64, | ||
| 432 | .keyword_int64_2, | ||
| 433 | .keyword_int32, | ||
| 434 | .keyword_int32_2, | ||
| 435 | .keyword_int16, | ||
| 436 | .keyword_int16_2, | ||
| 437 | .keyword_int8, | ||
| 438 | .keyword_int8_2, | ||
| 439 | .keyword_stdcall, | ||
| 440 | .keyword_stdcall2, | ||
| 441 | .keyword_thiscall, | ||
| 442 | .keyword_thiscall2, | ||
| 443 | .keyword_vectorcall, | ||
| 444 | .keyword_vectorcall2, | ||
| 445 | .keyword_bit_int, | ||
| 446 | .keyword_c23_alignas, | ||
| 447 | .keyword_c23_alignof, | ||
| 448 | .keyword_c23_bool, | ||
| 449 | .keyword_c23_static_assert, | ||
| 450 | .keyword_c23_thread_local, | ||
| 451 | .keyword_constexpr, | ||
| 452 | .keyword_true, | ||
| 453 | .keyword_false, | ||
| 454 | .keyword_nullptr, | ||
| 455 | .keyword_typeof_unqual, | ||
| 456 | => return true, | ||
| 457 | else => return false, | ||
| 458 | } | ||
| 459 | } | ||
| 460 | |||
| 461 | /// Turn macro keywords into identifiers. | ||
| 462 | /// `keyword_defined` is special since it should only turn into an identifier if | ||
| 463 | /// we are *not* in an #if or #elif expression | ||
| 464 | pub fn simplifyMacroKeywordExtra(id: *Id, defined_to_identifier: bool) void { | ||
| 465 | switch (id.*) { | ||
| 466 | .keyword_include, | ||
| 467 | .keyword_include_next, | ||
| 468 | .keyword_embed, | ||
| 469 | .keyword_define, | ||
| 470 | .keyword_undef, | ||
| 471 | .keyword_ifdef, | ||
| 472 | .keyword_ifndef, | ||
| 473 | .keyword_elif, | ||
| 474 | .keyword_elifdef, | ||
| 475 | .keyword_elifndef, | ||
| 476 | .keyword_endif, | ||
| 477 | .keyword_error, | ||
| 478 | .keyword_warning, | ||
| 479 | .keyword_pragma, | ||
| 480 | .keyword_line, | ||
| 481 | .keyword_va_args, | ||
| 482 | .keyword_va_opt, | ||
| 483 | => id.* = .identifier, | ||
| 484 | .keyword_defined => if (defined_to_identifier) { | ||
| 485 | id.* = .identifier; | ||
| 486 | }, | ||
| 487 | else => {}, | ||
| 488 | } | ||
| 489 | } | ||
| 490 | |||
| 491 | pub fn simplifyMacroKeyword(id: *Id) void { | ||
| 492 | simplifyMacroKeywordExtra(id, false); | ||
| 493 | } | ||
| 494 | |||
| 495 | pub fn lexeme(id: Id) ?[]const u8 { | ||
| 496 | return switch (id) { | ||
| 497 | .include_start, | ||
| 498 | .include_resume, | ||
| 499 | => unreachable, | ||
| 500 | |||
| 501 | .unterminated_comment, | ||
| 502 | .invalid, | ||
| 503 | .identifier, | ||
| 504 | .extended_identifier, | ||
| 505 | .string_literal, | ||
| 506 | .string_literal_utf_16, | ||
| 507 | .string_literal_utf_8, | ||
| 508 | .string_literal_utf_32, | ||
| 509 | .string_literal_wide, | ||
| 510 | .unterminated_string_literal, | ||
| 511 | .unterminated_char_literal, | ||
| 512 | .empty_char_literal, | ||
| 513 | .char_literal, | ||
| 514 | .char_literal_utf_8, | ||
| 515 | .char_literal_utf_16, | ||
| 516 | .char_literal_utf_32, | ||
| 517 | .char_literal_wide, | ||
| 518 | .macro_string, | ||
| 519 | .whitespace, | ||
| 520 | .pp_num, | ||
| 521 | .embed_byte, | ||
| 522 | .comment, | ||
| 523 | => null, | ||
| 524 | |||
| 525 | .zero => "0", | ||
| 526 | .one => "1", | ||
| 527 | |||
| 528 | .nl, | ||
| 529 | .eof, | ||
| 530 | .macro_param, | ||
| 531 | .macro_param_no_expand, | ||
| 532 | .stringify_param, | ||
| 533 | .stringify_va_args, | ||
| 534 | .macro_param_has_attribute, | ||
| 535 | .macro_param_has_c_attribute, | ||
| 536 | .macro_param_has_declspec_attribute, | ||
| 537 | .macro_param_has_warning, | ||
| 538 | .macro_param_has_feature, | ||
| 539 | .macro_param_has_extension, | ||
| 540 | .macro_param_has_builtin, | ||
| 541 | .macro_param_has_include, | ||
| 542 | .macro_param_has_include_next, | ||
| 543 | .macro_param_has_embed, | ||
| 544 | .macro_param_is_identifier, | ||
| 545 | .macro_file, | ||
| 546 | .macro_line, | ||
| 547 | .macro_counter, | ||
| 548 | .macro_param_pragma_operator, | ||
| 549 | .placemarker, | ||
| 550 | => "", | ||
| 551 | .macro_ws => " ", | ||
| 552 | |||
| 553 | .macro_func => "__func__", | ||
| 554 | .macro_function => "__FUNCTION__", | ||
| 555 | .macro_pretty_func => "__PRETTY_FUNCTION__", | ||
| 556 | |||
| 557 | .bang => "!", | ||
| 558 | .bang_equal => "!=", | ||
| 559 | .pipe => "|", | ||
| 560 | .pipe_pipe => "||", | ||
| 561 | .pipe_equal => "|=", | ||
| 562 | .equal => "=", | ||
| 563 | .equal_equal => "==", | ||
| 564 | .l_paren => "(", | ||
| 565 | .r_paren => ")", | ||
| 566 | .l_brace => "{", | ||
| 567 | .r_brace => "}", | ||
| 568 | .l_bracket => "[", | ||
| 569 | .r_bracket => "]", | ||
| 570 | .period => ".", | ||
| 571 | .ellipsis => "...", | ||
| 572 | .caret => "^", | ||
| 573 | .caret_equal => "^=", | ||
| 574 | .plus => "+", | ||
| 575 | .plus_plus => "++", | ||
| 576 | .plus_equal => "+=", | ||
| 577 | .minus => "-", | ||
| 578 | .minus_minus => "--", | ||
| 579 | .minus_equal => "-=", | ||
| 580 | .asterisk => "*", | ||
| 581 | .asterisk_equal => "*=", | ||
| 582 | .percent => "%", | ||
| 583 | .percent_equal => "%=", | ||
| 584 | .arrow => "->", | ||
| 585 | .colon => ":", | ||
| 586 | .colon_colon => "::", | ||
| 587 | .semicolon => ";", | ||
| 588 | .slash => "/", | ||
| 589 | .slash_equal => "/=", | ||
| 590 | .comma => ",", | ||
| 591 | .ampersand => "&", | ||
| 592 | .ampersand_ampersand => "&&", | ||
| 593 | .ampersand_equal => "&=", | ||
| 594 | .question_mark => "?", | ||
| 595 | .angle_bracket_left => "<", | ||
| 596 | .angle_bracket_left_equal => "<=", | ||
| 597 | .angle_bracket_angle_bracket_left => "<<", | ||
| 598 | .angle_bracket_angle_bracket_left_equal => "<<=", | ||
| 599 | .angle_bracket_right => ">", | ||
| 600 | .angle_bracket_right_equal => ">=", | ||
| 601 | .angle_bracket_angle_bracket_right => ">>", | ||
| 602 | .angle_bracket_angle_bracket_right_equal => ">>=", | ||
| 603 | .tilde => "~", | ||
| 604 | .hash => "#", | ||
| 605 | .hash_hash => "##", | ||
| 606 | |||
| 607 | .keyword_auto => "auto", | ||
| 608 | .keyword_auto_type => "__auto_type", | ||
| 609 | .keyword_break => "break", | ||
| 610 | .keyword_case => "case", | ||
| 611 | .keyword_char => "char", | ||
| 612 | .keyword_const => "const", | ||
| 613 | .keyword_continue => "continue", | ||
| 614 | .keyword_default => "default", | ||
| 615 | .keyword_do => "do", | ||
| 616 | .keyword_double => "double", | ||
| 617 | .keyword_else => "else", | ||
| 618 | .keyword_enum => "enum", | ||
| 619 | .keyword_extern => "extern", | ||
| 620 | .keyword_float => "float", | ||
| 621 | .keyword_for => "for", | ||
| 622 | .keyword_goto => "goto", | ||
| 623 | .keyword_if => "if", | ||
| 624 | .keyword_int => "int", | ||
| 625 | .keyword_long => "long", | ||
| 626 | .keyword_register => "register", | ||
| 627 | .keyword_return => "return", | ||
| 628 | .keyword_short => "short", | ||
| 629 | .keyword_signed => "signed", | ||
| 630 | .keyword_sizeof => "sizeof", | ||
| 631 | .keyword_static => "static", | ||
| 632 | .keyword_struct => "struct", | ||
| 633 | .keyword_switch => "switch", | ||
| 634 | .keyword_typedef => "typedef", | ||
| 635 | .keyword_typeof => "typeof", | ||
| 636 | .keyword_union => "union", | ||
| 637 | .keyword_unsigned => "unsigned", | ||
| 638 | .keyword_void => "void", | ||
| 639 | .keyword_volatile => "volatile", | ||
| 640 | .keyword_while => "while", | ||
| 641 | .keyword_bool => "_Bool", | ||
| 642 | .keyword_complex => "_Complex", | ||
| 643 | .keyword_imaginary => "_Imaginary", | ||
| 644 | .keyword_inline => "inline", | ||
| 645 | .keyword_restrict => "restrict", | ||
| 646 | .keyword_alignas => "_Alignas", | ||
| 647 | .keyword_alignof => "_Alignof", | ||
| 648 | .keyword_atomic => "_Atomic", | ||
| 649 | .keyword_generic => "_Generic", | ||
| 650 | .keyword_noreturn => "_Noreturn", | ||
| 651 | .keyword_static_assert => "_Static_assert", | ||
| 652 | .keyword_thread_local => "_Thread_local", | ||
| 653 | .keyword_bit_int => "_BitInt", | ||
| 654 | .keyword_c23_alignas => "alignas", | ||
| 655 | .keyword_c23_alignof => "alignof", | ||
| 656 | .keyword_c23_bool => "bool", | ||
| 657 | .keyword_c23_static_assert => "static_assert", | ||
| 658 | .keyword_c23_thread_local => "thread_local", | ||
| 659 | .keyword_constexpr => "constexpr", | ||
| 660 | .keyword_true => "true", | ||
| 661 | .keyword_false => "false", | ||
| 662 | .keyword_nullptr => "nullptr", | ||
| 663 | .keyword_typeof_unqual => "typeof_unqual", | ||
| 664 | .keyword_include => "include", | ||
| 665 | .keyword_include_next => "include_next", | ||
| 666 | .keyword_embed => "embed", | ||
| 667 | .keyword_define => "define", | ||
| 668 | .keyword_defined => "defined", | ||
| 669 | .keyword_undef => "undef", | ||
| 670 | .keyword_ifdef => "ifdef", | ||
| 671 | .keyword_ifndef => "ifndef", | ||
| 672 | .keyword_elif => "elif", | ||
| 673 | .keyword_elifdef => "elifdef", | ||
| 674 | .keyword_elifndef => "elifndef", | ||
| 675 | .keyword_endif => "endif", | ||
| 676 | .keyword_error => "error", | ||
| 677 | .keyword_warning => "warning", | ||
| 678 | .keyword_pragma => "pragma", | ||
| 679 | .keyword_line => "line", | ||
| 680 | .keyword_va_args => "__VA_ARGS__", | ||
| 681 | .keyword_va_opt => "__VA_OPT__", | ||
| 682 | .keyword_const1 => "__const", | ||
| 683 | .keyword_const2 => "__const__", | ||
| 684 | .keyword_inline1 => "__inline", | ||
| 685 | .keyword_inline2 => "__inline__", | ||
| 686 | .keyword_volatile1 => "__volatile", | ||
| 687 | .keyword_volatile2 => "__volatile__", | ||
| 688 | .keyword_restrict1 => "__restrict", | ||
| 689 | .keyword_restrict2 => "__restrict__", | ||
| 690 | .keyword_alignof1 => "__alignof", | ||
| 691 | .keyword_alignof2 => "__alignof__", | ||
| 692 | .keyword_typeof1 => "__typeof", | ||
| 693 | .keyword_typeof2 => "__typeof__", | ||
| 694 | .builtin_choose_expr => "__builtin_choose_expr", | ||
| 695 | .builtin_va_arg => "__builtin_va_arg", | ||
| 696 | .builtin_offsetof => "__builtin_offsetof", | ||
| 697 | .builtin_bitoffsetof => "__builtin_bitoffsetof", | ||
| 698 | .builtin_types_compatible_p => "__builtin_types_compatible_p", | ||
| 699 | .keyword_attribute1 => "__attribute", | ||
| 700 | .keyword_attribute2 => "__attribute__", | ||
| 701 | .keyword_extension => "__extension__", | ||
| 702 | .keyword_asm => "asm", | ||
| 703 | .keyword_asm1 => "__asm", | ||
| 704 | .keyword_asm2 => "__asm__", | ||
| 705 | .keyword_float80 => "__float80", | ||
| 706 | .keyword_float128_1 => "_Float128", | ||
| 707 | .keyword_float128_2 => "__float128", | ||
| 708 | .keyword_int128 => "__int128", | ||
| 709 | .keyword_imag1 => "__imag", | ||
| 710 | .keyword_imag2 => "__imag__", | ||
| 711 | .keyword_real1 => "__real", | ||
| 712 | .keyword_real2 => "__real__", | ||
| 713 | .keyword_float16 => "_Float16", | ||
| 714 | .keyword_fp16 => "__fp16", | ||
| 715 | .keyword_declspec => "__declspec", | ||
| 716 | .keyword_int64 => "__int64", | ||
| 717 | .keyword_int64_2 => "_int64", | ||
| 718 | .keyword_int32 => "__int32", | ||
| 719 | .keyword_int32_2 => "_int32", | ||
| 720 | .keyword_int16 => "__int16", | ||
| 721 | .keyword_int16_2 => "_int16", | ||
| 722 | .keyword_int8 => "__int8", | ||
| 723 | .keyword_int8_2 => "_int8", | ||
| 724 | .keyword_stdcall => "__stdcall", | ||
| 725 | .keyword_stdcall2 => "_stdcall", | ||
| 726 | .keyword_thiscall => "__thiscall", | ||
| 727 | .keyword_thiscall2 => "_thiscall", | ||
| 728 | .keyword_vectorcall => "__vectorcall", | ||
| 729 | .keyword_vectorcall2 => "_vectorcall", | ||
| 730 | }; | ||
| 731 | } | ||
| 732 | |||
| 733 | pub fn symbol(id: Id) []const u8 { | ||
| 734 | return switch (id) { | ||
| 735 | .macro_string, .invalid => unreachable, | ||
| 736 | .identifier, | ||
| 737 | .extended_identifier, | ||
| 738 | .macro_func, | ||
| 739 | .macro_function, | ||
| 740 | .macro_pretty_func, | ||
| 741 | .builtin_choose_expr, | ||
| 742 | .builtin_va_arg, | ||
| 743 | .builtin_offsetof, | ||
| 744 | .builtin_bitoffsetof, | ||
| 745 | .builtin_types_compatible_p, | ||
| 746 | => "an identifier", | ||
| 747 | .string_literal, | ||
| 748 | .string_literal_utf_16, | ||
| 749 | .string_literal_utf_8, | ||
| 750 | .string_literal_utf_32, | ||
| 751 | .string_literal_wide, | ||
| 752 | => "a string literal", | ||
| 753 | .char_literal, | ||
| 754 | .char_literal_utf_8, | ||
| 755 | .char_literal_utf_16, | ||
| 756 | .char_literal_utf_32, | ||
| 757 | .char_literal_wide, | ||
| 758 | => "a character literal", | ||
| 759 | .pp_num, .embed_byte => "A number", | ||
| 760 | else => id.lexeme().?, | ||
| 761 | }; | ||
| 762 | } | ||
| 763 | |||
| 764 | /// tokens that can start an expression parsed by Preprocessor.expr | ||
| 765 | /// Note that eof, r_paren, and string literals cannot actually start a | ||
| 766 | /// preprocessor expression, but we include them here so that a nicer | ||
| 767 | /// error message can be generated by the parser. | ||
| 768 | pub fn validPreprocessorExprStart(id: Id) bool { | ||
| 769 | return switch (id) { | ||
| 770 | .eof, | ||
| 771 | .r_paren, | ||
| 772 | .string_literal, | ||
| 773 | .string_literal_utf_16, | ||
| 774 | .string_literal_utf_8, | ||
| 775 | .string_literal_utf_32, | ||
| 776 | .string_literal_wide, | ||
| 777 | |||
| 778 | .char_literal, | ||
| 779 | .char_literal_utf_8, | ||
| 780 | .char_literal_utf_16, | ||
| 781 | .char_literal_utf_32, | ||
| 782 | .char_literal_wide, | ||
| 783 | .l_paren, | ||
| 784 | .plus, | ||
| 785 | .minus, | ||
| 786 | .tilde, | ||
| 787 | .bang, | ||
| 788 | .identifier, | ||
| 789 | .extended_identifier, | ||
| 790 | .keyword_defined, | ||
| 791 | .one, | ||
| 792 | .zero, | ||
| 793 | .pp_num, | ||
| 794 | .keyword_true, | ||
| 795 | .keyword_false, | ||
| 796 | => true, | ||
| 797 | else => false, | ||
| 798 | }; | ||
| 799 | } | ||
| 800 | |||
| 801 | pub fn allowsDigraphs(id: Id, comp: *const Compilation) bool { | ||
| 802 | return switch (id) { | ||
| 803 | .l_bracket, | ||
| 804 | .r_bracket, | ||
| 805 | .l_brace, | ||
| 806 | .r_brace, | ||
| 807 | .hash, | ||
| 808 | .hash_hash, | ||
| 809 | => comp.langopts.hasDigraphs(), | ||
| 810 | else => false, | ||
| 811 | }; | ||
| 812 | } | ||
| 813 | |||
| 814 | pub fn canOpenGCCAsmStmt(id: Id) bool { | ||
| 815 | return switch (id) { | ||
| 816 | .keyword_volatile, .keyword_volatile1, .keyword_volatile2, .keyword_inline, .keyword_inline1, .keyword_inline2, .keyword_goto, .l_paren => true, | ||
| 817 | else => false, | ||
| 818 | }; | ||
| 819 | } | ||
| 820 | |||
| 821 | pub fn isStringLiteral(id: Id) bool { | ||
| 822 | return switch (id) { | ||
| 823 | .string_literal, .string_literal_utf_16, .string_literal_utf_8, .string_literal_utf_32, .string_literal_wide => true, | ||
| 824 | else => false, | ||
| 825 | }; | ||
| 826 | } | ||
| 827 | }; | ||
| 828 | |||
| 829 | /// double underscore and underscore + capital letter identifiers | ||
| 830 | /// belong to the implementation namespace, so we always convert them | ||
| 831 | /// to keywords. | ||
| 832 | pub fn getTokenId(comp: *const Compilation, str: []const u8) Token.Id { | ||
| 833 | const kw = all_kws.get(str) orelse return .identifier; | ||
| 834 | const standard = comp.langopts.standard; | ||
| 835 | return switch (kw) { | ||
| 836 | .keyword_inline => if (standard.isGNU() or standard.atLeast(.c99)) kw else .identifier, | ||
| 837 | .keyword_restrict => if (standard.atLeast(.c99)) kw else .identifier, | ||
| 838 | .keyword_typeof => if (standard.isGNU() or standard.atLeast(.c23)) kw else .identifier, | ||
| 839 | .keyword_asm => if (standard.isGNU()) kw else .identifier, | ||
| 840 | .keyword_declspec => if (comp.langopts.declspec_attrs) kw else .identifier, | ||
| 841 | |||
| 842 | .keyword_c23_alignas, | ||
| 843 | .keyword_c23_alignof, | ||
| 844 | .keyword_c23_bool, | ||
| 845 | .keyword_c23_static_assert, | ||
| 846 | .keyword_c23_thread_local, | ||
| 847 | .keyword_constexpr, | ||
| 848 | .keyword_true, | ||
| 849 | .keyword_false, | ||
| 850 | .keyword_nullptr, | ||
| 851 | .keyword_typeof_unqual, | ||
| 852 | .keyword_elifdef, | ||
| 853 | .keyword_elifndef, | ||
| 854 | => if (standard.atLeast(.c23)) kw else .identifier, | ||
| 855 | |||
| 856 | .keyword_int64, | ||
| 857 | .keyword_int64_2, | ||
| 858 | .keyword_int32, | ||
| 859 | .keyword_int32_2, | ||
| 860 | .keyword_int16, | ||
| 861 | .keyword_int16_2, | ||
| 862 | .keyword_int8, | ||
| 863 | .keyword_int8_2, | ||
| 864 | .keyword_stdcall2, | ||
| 865 | .keyword_thiscall2, | ||
| 866 | .keyword_vectorcall2, | ||
| 867 | => if (comp.langopts.ms_extensions) kw else .identifier, | ||
| 868 | else => kw, | ||
| 869 | }; | ||
| 870 | } | ||
| 871 | |||
| 872 | const all_kws = std.ComptimeStringMap(Id, .{ | ||
| 873 | .{ "auto", auto: { | ||
| 874 | @setEvalBranchQuota(3000); | ||
| 875 | break :auto .keyword_auto; | ||
| 876 | } }, | ||
| 877 | .{ "break", .keyword_break }, | ||
| 878 | .{ "case", .keyword_case }, | ||
| 879 | .{ "char", .keyword_char }, | ||
| 880 | .{ "const", .keyword_const }, | ||
| 881 | .{ "continue", .keyword_continue }, | ||
| 882 | .{ "default", .keyword_default }, | ||
| 883 | .{ "do", .keyword_do }, | ||
| 884 | .{ "double", .keyword_double }, | ||
| 885 | .{ "else", .keyword_else }, | ||
| 886 | .{ "enum", .keyword_enum }, | ||
| 887 | .{ "extern", .keyword_extern }, | ||
| 888 | .{ "float", .keyword_float }, | ||
| 889 | .{ "for", .keyword_for }, | ||
| 890 | .{ "goto", .keyword_goto }, | ||
| 891 | .{ "if", .keyword_if }, | ||
| 892 | .{ "int", .keyword_int }, | ||
| 893 | .{ "long", .keyword_long }, | ||
| 894 | .{ "register", .keyword_register }, | ||
| 895 | .{ "return", .keyword_return }, | ||
| 896 | .{ "short", .keyword_short }, | ||
| 897 | .{ "signed", .keyword_signed }, | ||
| 898 | .{ "sizeof", .keyword_sizeof }, | ||
| 899 | .{ "static", .keyword_static }, | ||
| 900 | .{ "struct", .keyword_struct }, | ||
| 901 | .{ "switch", .keyword_switch }, | ||
| 902 | .{ "typedef", .keyword_typedef }, | ||
| 903 | .{ "union", .keyword_union }, | ||
| 904 | .{ "unsigned", .keyword_unsigned }, | ||
| 905 | .{ "void", .keyword_void }, | ||
| 906 | .{ "volatile", .keyword_volatile }, | ||
| 907 | .{ "while", .keyword_while }, | ||
| 908 | .{ "__typeof__", .keyword_typeof2 }, | ||
| 909 | .{ "__typeof", .keyword_typeof1 }, | ||
| 910 | |||
| 911 | // ISO C99 | ||
| 912 | .{ "_Bool", .keyword_bool }, | ||
| 913 | .{ "_Complex", .keyword_complex }, | ||
| 914 | .{ "_Imaginary", .keyword_imaginary }, | ||
| 915 | .{ "inline", .keyword_inline }, | ||
| 916 | .{ "restrict", .keyword_restrict }, | ||
| 917 | |||
| 918 | // ISO C11 | ||
| 919 | .{ "_Alignas", .keyword_alignas }, | ||
| 920 | .{ "_Alignof", .keyword_alignof }, | ||
| 921 | .{ "_Atomic", .keyword_atomic }, | ||
| 922 | .{ "_Generic", .keyword_generic }, | ||
| 923 | .{ "_Noreturn", .keyword_noreturn }, | ||
| 924 | .{ "_Static_assert", .keyword_static_assert }, | ||
| 925 | .{ "_Thread_local", .keyword_thread_local }, | ||
| 926 | |||
| 927 | // ISO C23 | ||
| 928 | .{ "_BitInt", .keyword_bit_int }, | ||
| 929 | .{ "alignas", .keyword_c23_alignas }, | ||
| 930 | .{ "alignof", .keyword_c23_alignof }, | ||
| 931 | .{ "bool", .keyword_c23_bool }, | ||
| 932 | .{ "static_assert", .keyword_c23_static_assert }, | ||
| 933 | .{ "thread_local", .keyword_c23_thread_local }, | ||
| 934 | .{ "constexpr", .keyword_constexpr }, | ||
| 935 | .{ "true", .keyword_true }, | ||
| 936 | .{ "false", .keyword_false }, | ||
| 937 | .{ "nullptr", .keyword_nullptr }, | ||
| 938 | .{ "typeof_unqual", .keyword_typeof_unqual }, | ||
| 939 | |||
| 940 | // Preprocessor directives | ||
| 941 | .{ "include", .keyword_include }, | ||
| 942 | .{ "include_next", .keyword_include_next }, | ||
| 943 | .{ "embed", .keyword_embed }, | ||
| 944 | .{ "define", .keyword_define }, | ||
| 945 | .{ "defined", .keyword_defined }, | ||
| 946 | .{ "undef", .keyword_undef }, | ||
| 947 | .{ "ifdef", .keyword_ifdef }, | ||
| 948 | .{ "ifndef", .keyword_ifndef }, | ||
| 949 | .{ "elif", .keyword_elif }, | ||
| 950 | .{ "elifdef", .keyword_elifdef }, | ||
| 951 | .{ "elifndef", .keyword_elifndef }, | ||
| 952 | .{ "endif", .keyword_endif }, | ||
| 953 | .{ "error", .keyword_error }, | ||
| 954 | .{ "warning", .keyword_warning }, | ||
| 955 | .{ "pragma", .keyword_pragma }, | ||
| 956 | .{ "line", .keyword_line }, | ||
| 957 | .{ "__VA_ARGS__", .keyword_va_args }, | ||
| 958 | .{ "__VA_OPT__", .keyword_va_opt }, | ||
| 959 | .{ "__func__", .macro_func }, | ||
| 960 | .{ "__FUNCTION__", .macro_function }, | ||
| 961 | .{ "__PRETTY_FUNCTION__", .macro_pretty_func }, | ||
| 962 | |||
| 963 | // gcc keywords | ||
| 964 | .{ "__auto_type", .keyword_auto_type }, | ||
| 965 | .{ "__const", .keyword_const1 }, | ||
| 966 | .{ "__const__", .keyword_const2 }, | ||
| 967 | .{ "__inline", .keyword_inline1 }, | ||
| 968 | .{ "__inline__", .keyword_inline2 }, | ||
| 969 | .{ "__volatile", .keyword_volatile1 }, | ||
| 970 | .{ "__volatile__", .keyword_volatile2 }, | ||
| 971 | .{ "__restrict", .keyword_restrict1 }, | ||
| 972 | .{ "__restrict__", .keyword_restrict2 }, | ||
| 973 | .{ "__alignof", .keyword_alignof1 }, | ||
| 974 | .{ "__alignof__", .keyword_alignof2 }, | ||
| 975 | .{ "typeof", .keyword_typeof }, | ||
| 976 | .{ "__attribute", .keyword_attribute1 }, | ||
| 977 | .{ "__attribute__", .keyword_attribute2 }, | ||
| 978 | .{ "__extension__", .keyword_extension }, | ||
| 979 | .{ "asm", .keyword_asm }, | ||
| 980 | .{ "__asm", .keyword_asm1 }, | ||
| 981 | .{ "__asm__", .keyword_asm2 }, | ||
| 982 | .{ "__float80", .keyword_float80 }, | ||
| 983 | .{ "_Float128", .keyword_float128_1 }, | ||
| 984 | .{ "__float128", .keyword_float128_2 }, | ||
| 985 | .{ "__int128", .keyword_int128 }, | ||
| 986 | .{ "__imag", .keyword_imag1 }, | ||
| 987 | .{ "__imag__", .keyword_imag2 }, | ||
| 988 | .{ "__real", .keyword_real1 }, | ||
| 989 | .{ "__real__", .keyword_real2 }, | ||
| 990 | .{ "_Float16", .keyword_float16 }, | ||
| 991 | |||
| 992 | // clang keywords | ||
| 993 | .{ "__fp16", .keyword_fp16 }, | ||
| 994 | |||
| 995 | // ms keywords | ||
| 996 | .{ "__declspec", .keyword_declspec }, | ||
| 997 | .{ "__int64", .keyword_int64 }, | ||
| 998 | .{ "_int64", .keyword_int64_2 }, | ||
| 999 | .{ "__int32", .keyword_int32 }, | ||
| 1000 | .{ "_int32", .keyword_int32_2 }, | ||
| 1001 | .{ "__int16", .keyword_int16 }, | ||
| 1002 | .{ "_int16", .keyword_int16_2 }, | ||
| 1003 | .{ "__int8", .keyword_int8 }, | ||
| 1004 | .{ "_int8", .keyword_int8_2 }, | ||
| 1005 | .{ "__stdcall", .keyword_stdcall }, | ||
| 1006 | .{ "_stdcall", .keyword_stdcall2 }, | ||
| 1007 | .{ "__thiscall", .keyword_thiscall }, | ||
| 1008 | .{ "_thiscall", .keyword_thiscall2 }, | ||
| 1009 | .{ "__vectorcall", .keyword_vectorcall }, | ||
| 1010 | .{ "_vectorcall", .keyword_vectorcall2 }, | ||
| 1011 | |||
| 1012 | // builtins that require special parsing | ||
| 1013 | .{ "__builtin_choose_expr", .builtin_choose_expr }, | ||
| 1014 | .{ "__builtin_va_arg", .builtin_va_arg }, | ||
| 1015 | .{ "__builtin_offsetof", .builtin_offsetof }, | ||
| 1016 | .{ "__builtin_bitoffsetof", .builtin_bitoffsetof }, | ||
| 1017 | .{ "__builtin_types_compatible_p", .builtin_types_compatible_p }, | ||
| 1018 | }); | ||
| 1019 | }; | ||
| 1020 | |||
| 1021 | const Tokenizer = @This(); | ||
| 1022 | |||
| 1023 | buf: []const u8, | ||
| 1024 | index: u32 = 0, | ||
| 1025 | source: Source.Id, | ||
| 1026 | comp: *const Compilation, | ||
| 1027 | line: u32 = 1, | ||
| 1028 | |||
| 1029 | pub fn next(self: *Tokenizer) Token { | ||
| 1030 | var state: enum { | ||
| 1031 | start, | ||
| 1032 | whitespace, | ||
| 1033 | u, | ||
| 1034 | u8, | ||
| 1035 | U, | ||
| 1036 | L, | ||
| 1037 | string_literal, | ||
| 1038 | char_literal_start, | ||
| 1039 | char_literal, | ||
| 1040 | char_escape_sequence, | ||
| 1041 | string_escape_sequence, | ||
| 1042 | identifier, | ||
| 1043 | extended_identifier, | ||
| 1044 | equal, | ||
| 1045 | bang, | ||
| 1046 | pipe, | ||
| 1047 | colon, | ||
| 1048 | percent, | ||
| 1049 | asterisk, | ||
| 1050 | plus, | ||
| 1051 | angle_bracket_left, | ||
| 1052 | angle_bracket_angle_bracket_left, | ||
| 1053 | angle_bracket_right, | ||
| 1054 | angle_bracket_angle_bracket_right, | ||
| 1055 | caret, | ||
| 1056 | period, | ||
| 1057 | period2, | ||
| 1058 | minus, | ||
| 1059 | slash, | ||
| 1060 | ampersand, | ||
| 1061 | hash, | ||
| 1062 | hash_digraph, | ||
| 1063 | hash_hash_digraph_partial, | ||
| 1064 | line_comment, | ||
| 1065 | multi_line_comment, | ||
| 1066 | multi_line_comment_asterisk, | ||
| 1067 | multi_line_comment_done, | ||
| 1068 | pp_num, | ||
| 1069 | pp_num_exponent, | ||
| 1070 | pp_num_digit_separator, | ||
| 1071 | } = .start; | ||
| 1072 | |||
| 1073 | var start = self.index; | ||
| 1074 | var id: Token.Id = .eof; | ||
| 1075 | |||
| 1076 | while (self.index < self.buf.len) : (self.index += 1) { | ||
| 1077 | const c = self.buf[self.index]; | ||
| 1078 | switch (state) { | ||
| 1079 | .start => switch (c) { | ||
| 1080 | '\n' => { | ||
| 1081 | id = .nl; | ||
| 1082 | self.index += 1; | ||
| 1083 | self.line += 1; | ||
| 1084 | break; | ||
| 1085 | }, | ||
| 1086 | '"' => { | ||
| 1087 | id = .string_literal; | ||
| 1088 | state = .string_literal; | ||
| 1089 | }, | ||
| 1090 | '\'' => { | ||
| 1091 | id = .char_literal; | ||
| 1092 | state = .char_literal_start; | ||
| 1093 | }, | ||
| 1094 | 'u' => state = .u, | ||
| 1095 | 'U' => state = .U, | ||
| 1096 | 'L' => state = .L, | ||
| 1097 | 'a'...'t', 'v'...'z', 'A'...'K', 'M'...'T', 'V'...'Z', '_' => state = .identifier, | ||
| 1098 | '=' => state = .equal, | ||
| 1099 | '!' => state = .bang, | ||
| 1100 | '|' => state = .pipe, | ||
| 1101 | '(' => { | ||
| 1102 | id = .l_paren; | ||
| 1103 | self.index += 1; | ||
| 1104 | break; | ||
| 1105 | }, | ||
| 1106 | ')' => { | ||
| 1107 | id = .r_paren; | ||
| 1108 | self.index += 1; | ||
| 1109 | break; | ||
| 1110 | }, | ||
| 1111 | '[' => { | ||
| 1112 | id = .l_bracket; | ||
| 1113 | self.index += 1; | ||
| 1114 | break; | ||
| 1115 | }, | ||
| 1116 | ']' => { | ||
| 1117 | id = .r_bracket; | ||
| 1118 | self.index += 1; | ||
| 1119 | break; | ||
| 1120 | }, | ||
| 1121 | ';' => { | ||
| 1122 | id = .semicolon; | ||
| 1123 | self.index += 1; | ||
| 1124 | break; | ||
| 1125 | }, | ||
| 1126 | ',' => { | ||
| 1127 | id = .comma; | ||
| 1128 | self.index += 1; | ||
| 1129 | break; | ||
| 1130 | }, | ||
| 1131 | '?' => { | ||
| 1132 | id = .question_mark; | ||
| 1133 | self.index += 1; | ||
| 1134 | break; | ||
| 1135 | }, | ||
| 1136 | ':' => state = .colon, | ||
| 1137 | '%' => state = .percent, | ||
| 1138 | '*' => state = .asterisk, | ||
| 1139 | '+' => state = .plus, | ||
| 1140 | '<' => state = .angle_bracket_left, | ||
| 1141 | '>' => state = .angle_bracket_right, | ||
| 1142 | '^' => state = .caret, | ||
| 1143 | '{' => { | ||
| 1144 | id = .l_brace; | ||
| 1145 | self.index += 1; | ||
| 1146 | break; | ||
| 1147 | }, | ||
| 1148 | '}' => { | ||
| 1149 | id = .r_brace; | ||
| 1150 | self.index += 1; | ||
| 1151 | break; | ||
| 1152 | }, | ||
| 1153 | '~' => { | ||
| 1154 | id = .tilde; | ||
| 1155 | self.index += 1; | ||
| 1156 | break; | ||
| 1157 | }, | ||
| 1158 | '.' => state = .period, | ||
| 1159 | '-' => state = .minus, | ||
| 1160 | '/' => state = .slash, | ||
| 1161 | '&' => state = .ampersand, | ||
| 1162 | '#' => state = .hash, | ||
| 1163 | '0'...'9' => state = .pp_num, | ||
| 1164 | '\t', '\x0B', '\x0C', ' ' => state = .whitespace, | ||
| 1165 | '$' => if (self.comp.langopts.dollars_in_identifiers) { | ||
| 1166 | state = .extended_identifier; | ||
| 1167 | } else { | ||
| 1168 | id = .invalid; | ||
| 1169 | self.index += 1; | ||
| 1170 | break; | ||
| 1171 | }, | ||
| 1172 | 0x1A => if (self.comp.langopts.ms_extensions) { | ||
| 1173 | id = .eof; | ||
| 1174 | break; | ||
| 1175 | } else { | ||
| 1176 | id = .invalid; | ||
| 1177 | self.index += 1; | ||
| 1178 | break; | ||
| 1179 | }, | ||
| 1180 | 0x80...0xFF => state = .extended_identifier, | ||
| 1181 | else => { | ||
| 1182 | id = .invalid; | ||
| 1183 | self.index += 1; | ||
| 1184 | break; | ||
| 1185 | }, | ||
| 1186 | }, | ||
| 1187 | .whitespace => switch (c) { | ||
| 1188 | '\t', '\x0B', '\x0C', ' ' => {}, | ||
| 1189 | else => { | ||
| 1190 | id = .whitespace; | ||
| 1191 | break; | ||
| 1192 | }, | ||
| 1193 | }, | ||
| 1194 | .u => switch (c) { | ||
| 1195 | '8' => { | ||
| 1196 | state = .u8; | ||
| 1197 | }, | ||
| 1198 | '\'' => { | ||
| 1199 | id = .char_literal_utf_16; | ||
| 1200 | state = .char_literal_start; | ||
| 1201 | }, | ||
| 1202 | '\"' => { | ||
| 1203 | id = .string_literal_utf_16; | ||
| 1204 | state = .string_literal; | ||
| 1205 | }, | ||
| 1206 | else => { | ||
| 1207 | self.index -= 1; | ||
| 1208 | state = .identifier; | ||
| 1209 | }, | ||
| 1210 | }, | ||
| 1211 | .u8 => switch (c) { | ||
| 1212 | '\"' => { | ||
| 1213 | id = .string_literal_utf_8; | ||
| 1214 | state = .string_literal; | ||
| 1215 | }, | ||
| 1216 | '\'' => { | ||
| 1217 | id = .char_literal_utf_8; | ||
| 1218 | state = .char_literal_start; | ||
| 1219 | }, | ||
| 1220 | else => { | ||
| 1221 | self.index -= 1; | ||
| 1222 | state = .identifier; | ||
| 1223 | }, | ||
| 1224 | }, | ||
| 1225 | .U => switch (c) { | ||
| 1226 | '\'' => { | ||
| 1227 | id = .char_literal_utf_32; | ||
| 1228 | state = .char_literal_start; | ||
| 1229 | }, | ||
| 1230 | '\"' => { | ||
| 1231 | id = .string_literal_utf_32; | ||
| 1232 | state = .string_literal; | ||
| 1233 | }, | ||
| 1234 | else => { | ||
| 1235 | self.index -= 1; | ||
| 1236 | state = .identifier; | ||
| 1237 | }, | ||
| 1238 | }, | ||
| 1239 | .L => switch (c) { | ||
| 1240 | '\'' => { | ||
| 1241 | id = .char_literal_wide; | ||
| 1242 | state = .char_literal_start; | ||
| 1243 | }, | ||
| 1244 | '\"' => { | ||
| 1245 | id = .string_literal_wide; | ||
| 1246 | state = .string_literal; | ||
| 1247 | }, | ||
| 1248 | else => { | ||
| 1249 | self.index -= 1; | ||
| 1250 | state = .identifier; | ||
| 1251 | }, | ||
| 1252 | }, | ||
| 1253 | .string_literal => switch (c) { | ||
| 1254 | '\\' => { | ||
| 1255 | state = .string_escape_sequence; | ||
| 1256 | }, | ||
| 1257 | '"' => { | ||
| 1258 | self.index += 1; | ||
| 1259 | break; | ||
| 1260 | }, | ||
| 1261 | '\n' => { | ||
| 1262 | id = .unterminated_string_literal; | ||
| 1263 | break; | ||
| 1264 | }, | ||
| 1265 | '\r' => unreachable, | ||
| 1266 | else => {}, | ||
| 1267 | }, | ||
| 1268 | .char_literal_start => switch (c) { | ||
| 1269 | '\\' => { | ||
| 1270 | state = .char_escape_sequence; | ||
| 1271 | }, | ||
| 1272 | '\'' => { | ||
| 1273 | id = .empty_char_literal; | ||
| 1274 | self.index += 1; | ||
| 1275 | break; | ||
| 1276 | }, | ||
| 1277 | '\n' => { | ||
| 1278 | id = .unterminated_char_literal; | ||
| 1279 | break; | ||
| 1280 | }, | ||
| 1281 | else => { | ||
| 1282 | state = .char_literal; | ||
| 1283 | }, | ||
| 1284 | }, | ||
| 1285 | .char_literal => switch (c) { | ||
| 1286 | '\\' => { | ||
| 1287 | state = .char_escape_sequence; | ||
| 1288 | }, | ||
| 1289 | '\'' => { | ||
| 1290 | self.index += 1; | ||
| 1291 | break; | ||
| 1292 | }, | ||
| 1293 | '\n' => { | ||
| 1294 | id = .unterminated_char_literal; | ||
| 1295 | break; | ||
| 1296 | }, | ||
| 1297 | else => {}, | ||
| 1298 | }, | ||
| 1299 | .char_escape_sequence => switch (c) { | ||
| 1300 | '\r', '\n' => unreachable, // removed by line splicing | ||
| 1301 | else => state = .char_literal, | ||
| 1302 | }, | ||
| 1303 | .string_escape_sequence => switch (c) { | ||
| 1304 | '\r', '\n' => unreachable, // removed by line splicing | ||
| 1305 | else => state = .string_literal, | ||
| 1306 | }, | ||
| 1307 | .identifier, .extended_identifier => switch (c) { | ||
| 1308 | 'a'...'z', 'A'...'Z', '_', '0'...'9' => {}, | ||
| 1309 | '$' => if (self.comp.langopts.dollars_in_identifiers) { | ||
| 1310 | state = .extended_identifier; | ||
| 1311 | } else { | ||
| 1312 | id = if (state == .identifier) Token.getTokenId(self.comp, self.buf[start..self.index]) else .extended_identifier; | ||
| 1313 | break; | ||
| 1314 | }, | ||
| 1315 | 0x80...0xFF => state = .extended_identifier, | ||
| 1316 | else => { | ||
| 1317 | id = if (state == .identifier) Token.getTokenId(self.comp, self.buf[start..self.index]) else .extended_identifier; | ||
| 1318 | break; | ||
| 1319 | }, | ||
| 1320 | }, | ||
| 1321 | .equal => switch (c) { | ||
| 1322 | '=' => { | ||
| 1323 | id = .equal_equal; | ||
| 1324 | self.index += 1; | ||
| 1325 | break; | ||
| 1326 | }, | ||
| 1327 | else => { | ||
| 1328 | id = .equal; | ||
| 1329 | break; | ||
| 1330 | }, | ||
| 1331 | }, | ||
| 1332 | .bang => switch (c) { | ||
| 1333 | '=' => { | ||
| 1334 | id = .bang_equal; | ||
| 1335 | self.index += 1; | ||
| 1336 | break; | ||
| 1337 | }, | ||
| 1338 | else => { | ||
| 1339 | id = .bang; | ||
| 1340 | break; | ||
| 1341 | }, | ||
| 1342 | }, | ||
| 1343 | .pipe => switch (c) { | ||
| 1344 | '=' => { | ||
| 1345 | id = .pipe_equal; | ||
| 1346 | self.index += 1; | ||
| 1347 | break; | ||
| 1348 | }, | ||
| 1349 | '|' => { | ||
| 1350 | id = .pipe_pipe; | ||
| 1351 | self.index += 1; | ||
| 1352 | break; | ||
| 1353 | }, | ||
| 1354 | else => { | ||
| 1355 | id = .pipe; | ||
| 1356 | break; | ||
| 1357 | }, | ||
| 1358 | }, | ||
| 1359 | .colon => switch (c) { | ||
| 1360 | '>' => { | ||
| 1361 | if (self.comp.langopts.hasDigraphs()) { | ||
| 1362 | id = .r_bracket; | ||
| 1363 | self.index += 1; | ||
| 1364 | } else { | ||
| 1365 | id = .colon; | ||
| 1366 | } | ||
| 1367 | break; | ||
| 1368 | }, | ||
| 1369 | ':' => { | ||
| 1370 | if (self.comp.langopts.standard.atLeast(.c23)) { | ||
| 1371 | id = .colon_colon; | ||
| 1372 | self.index += 1; | ||
| 1373 | break; | ||
| 1374 | } else { | ||
| 1375 | id = .colon; | ||
| 1376 | break; | ||
| 1377 | } | ||
| 1378 | }, | ||
| 1379 | else => { | ||
| 1380 | id = .colon; | ||
| 1381 | break; | ||
| 1382 | }, | ||
| 1383 | }, | ||
| 1384 | .percent => switch (c) { | ||
| 1385 | '=' => { | ||
| 1386 | id = .percent_equal; | ||
| 1387 | self.index += 1; | ||
| 1388 | break; | ||
| 1389 | }, | ||
| 1390 | '>' => { | ||
| 1391 | if (self.comp.langopts.hasDigraphs()) { | ||
| 1392 | id = .r_brace; | ||
| 1393 | self.index += 1; | ||
| 1394 | } else { | ||
| 1395 | id = .percent; | ||
| 1396 | } | ||
| 1397 | break; | ||
| 1398 | }, | ||
| 1399 | ':' => { | ||
| 1400 | if (self.comp.langopts.hasDigraphs()) { | ||
| 1401 | state = .hash_digraph; | ||
| 1402 | } else { | ||
| 1403 | id = .percent; | ||
| 1404 | break; | ||
| 1405 | } | ||
| 1406 | }, | ||
| 1407 | else => { | ||
| 1408 | id = .percent; | ||
| 1409 | break; | ||
| 1410 | }, | ||
| 1411 | }, | ||
| 1412 | .asterisk => switch (c) { | ||
| 1413 | '=' => { | ||
| 1414 | id = .asterisk_equal; | ||
| 1415 | self.index += 1; | ||
| 1416 | break; | ||
| 1417 | }, | ||
| 1418 | else => { | ||
| 1419 | id = .asterisk; | ||
| 1420 | break; | ||
| 1421 | }, | ||
| 1422 | }, | ||
| 1423 | .plus => switch (c) { | ||
| 1424 | '=' => { | ||
| 1425 | id = .plus_equal; | ||
| 1426 | self.index += 1; | ||
| 1427 | break; | ||
| 1428 | }, | ||
| 1429 | '+' => { | ||
| 1430 | id = .plus_plus; | ||
| 1431 | self.index += 1; | ||
| 1432 | break; | ||
| 1433 | }, | ||
| 1434 | else => { | ||
| 1435 | id = .plus; | ||
| 1436 | break; | ||
| 1437 | }, | ||
| 1438 | }, | ||
| 1439 | .angle_bracket_left => switch (c) { | ||
| 1440 | '<' => state = .angle_bracket_angle_bracket_left, | ||
| 1441 | '=' => { | ||
| 1442 | id = .angle_bracket_left_equal; | ||
| 1443 | self.index += 1; | ||
| 1444 | break; | ||
| 1445 | }, | ||
| 1446 | ':' => { | ||
| 1447 | if (self.comp.langopts.hasDigraphs()) { | ||
| 1448 | id = .l_bracket; | ||
| 1449 | self.index += 1; | ||
| 1450 | } else { | ||
| 1451 | id = .angle_bracket_left; | ||
| 1452 | } | ||
| 1453 | break; | ||
| 1454 | }, | ||
| 1455 | '%' => { | ||
| 1456 | if (self.comp.langopts.hasDigraphs()) { | ||
| 1457 | id = .l_brace; | ||
| 1458 | self.index += 1; | ||
| 1459 | } else { | ||
| 1460 | id = .angle_bracket_left; | ||
| 1461 | } | ||
| 1462 | break; | ||
| 1463 | }, | ||
| 1464 | else => { | ||
| 1465 | id = .angle_bracket_left; | ||
| 1466 | break; | ||
| 1467 | }, | ||
| 1468 | }, | ||
| 1469 | .angle_bracket_angle_bracket_left => switch (c) { | ||
| 1470 | '=' => { | ||
| 1471 | id = .angle_bracket_angle_bracket_left_equal; | ||
| 1472 | self.index += 1; | ||
| 1473 | break; | ||
| 1474 | }, | ||
| 1475 | else => { | ||
| 1476 | id = .angle_bracket_angle_bracket_left; | ||
| 1477 | break; | ||
| 1478 | }, | ||
| 1479 | }, | ||
| 1480 | .angle_bracket_right => switch (c) { | ||
| 1481 | '>' => state = .angle_bracket_angle_bracket_right, | ||
| 1482 | '=' => { | ||
| 1483 | id = .angle_bracket_right_equal; | ||
| 1484 | self.index += 1; | ||
| 1485 | break; | ||
| 1486 | }, | ||
| 1487 | else => { | ||
| 1488 | id = .angle_bracket_right; | ||
| 1489 | break; | ||
| 1490 | }, | ||
| 1491 | }, | ||
| 1492 | .angle_bracket_angle_bracket_right => switch (c) { | ||
| 1493 | '=' => { | ||
| 1494 | id = .angle_bracket_angle_bracket_right_equal; | ||
| 1495 | self.index += 1; | ||
| 1496 | break; | ||
| 1497 | }, | ||
| 1498 | else => { | ||
| 1499 | id = .angle_bracket_angle_bracket_right; | ||
| 1500 | break; | ||
| 1501 | }, | ||
| 1502 | }, | ||
| 1503 | .caret => switch (c) { | ||
| 1504 | '=' => { | ||
| 1505 | id = .caret_equal; | ||
| 1506 | self.index += 1; | ||
| 1507 | break; | ||
| 1508 | }, | ||
| 1509 | else => { | ||
| 1510 | id = .caret; | ||
| 1511 | break; | ||
| 1512 | }, | ||
| 1513 | }, | ||
| 1514 | .period => switch (c) { | ||
| 1515 | '.' => state = .period2, | ||
| 1516 | '0'...'9' => state = .pp_num, | ||
| 1517 | else => { | ||
| 1518 | id = .period; | ||
| 1519 | break; | ||
| 1520 | }, | ||
| 1521 | }, | ||
| 1522 | .period2 => switch (c) { | ||
| 1523 | '.' => { | ||
| 1524 | id = .ellipsis; | ||
| 1525 | self.index += 1; | ||
| 1526 | break; | ||
| 1527 | }, | ||
| 1528 | else => { | ||
| 1529 | id = .period; | ||
| 1530 | self.index -= 1; | ||
| 1531 | break; | ||
| 1532 | }, | ||
| 1533 | }, | ||
| 1534 | .minus => switch (c) { | ||
| 1535 | '>' => { | ||
| 1536 | id = .arrow; | ||
| 1537 | self.index += 1; | ||
| 1538 | break; | ||
| 1539 | }, | ||
| 1540 | '=' => { | ||
| 1541 | id = .minus_equal; | ||
| 1542 | self.index += 1; | ||
| 1543 | break; | ||
| 1544 | }, | ||
| 1545 | '-' => { | ||
| 1546 | id = .minus_minus; | ||
| 1547 | self.index += 1; | ||
| 1548 | break; | ||
| 1549 | }, | ||
| 1550 | else => { | ||
| 1551 | id = .minus; | ||
| 1552 | break; | ||
| 1553 | }, | ||
| 1554 | }, | ||
| 1555 | .ampersand => switch (c) { | ||
| 1556 | '&' => { | ||
| 1557 | id = .ampersand_ampersand; | ||
| 1558 | self.index += 1; | ||
| 1559 | break; | ||
| 1560 | }, | ||
| 1561 | '=' => { | ||
| 1562 | id = .ampersand_equal; | ||
| 1563 | self.index += 1; | ||
| 1564 | break; | ||
| 1565 | }, | ||
| 1566 | else => { | ||
| 1567 | id = .ampersand; | ||
| 1568 | break; | ||
| 1569 | }, | ||
| 1570 | }, | ||
| 1571 | .hash => switch (c) { | ||
| 1572 | '#' => { | ||
| 1573 | id = .hash_hash; | ||
| 1574 | self.index += 1; | ||
| 1575 | break; | ||
| 1576 | }, | ||
| 1577 | else => { | ||
| 1578 | id = .hash; | ||
| 1579 | break; | ||
| 1580 | }, | ||
| 1581 | }, | ||
| 1582 | .hash_digraph => switch (c) { | ||
| 1583 | '%' => state = .hash_hash_digraph_partial, | ||
| 1584 | else => { | ||
| 1585 | id = .hash; | ||
| 1586 | break; | ||
| 1587 | }, | ||
| 1588 | }, | ||
| 1589 | .hash_hash_digraph_partial => switch (c) { | ||
| 1590 | ':' => { | ||
| 1591 | id = .hash_hash; | ||
| 1592 | self.index += 1; | ||
| 1593 | break; | ||
| 1594 | }, | ||
| 1595 | else => { | ||
| 1596 | id = .hash; | ||
| 1597 | self.index -= 1; // re-tokenize the percent | ||
| 1598 | break; | ||
| 1599 | }, | ||
| 1600 | }, | ||
| 1601 | .slash => switch (c) { | ||
| 1602 | '/' => state = .line_comment, | ||
| 1603 | '*' => state = .multi_line_comment, | ||
| 1604 | '=' => { | ||
| 1605 | id = .slash_equal; | ||
| 1606 | self.index += 1; | ||
| 1607 | break; | ||
| 1608 | }, | ||
| 1609 | else => { | ||
| 1610 | id = .slash; | ||
| 1611 | break; | ||
| 1612 | }, | ||
| 1613 | }, | ||
| 1614 | .line_comment => switch (c) { | ||
| 1615 | '\n' => { | ||
| 1616 | if (self.comp.langopts.preserve_comments) { | ||
| 1617 | id = .comment; | ||
| 1618 | break; | ||
| 1619 | } | ||
| 1620 | self.index -= 1; | ||
| 1621 | state = .start; | ||
| 1622 | }, | ||
| 1623 | else => {}, | ||
| 1624 | }, | ||
| 1625 | .multi_line_comment => switch (c) { | ||
| 1626 | '*' => state = .multi_line_comment_asterisk, | ||
| 1627 | '\n' => self.line += 1, | ||
| 1628 | else => {}, | ||
| 1629 | }, | ||
| 1630 | .multi_line_comment_asterisk => switch (c) { | ||
| 1631 | '/' => { | ||
| 1632 | if (self.comp.langopts.preserve_comments) { | ||
| 1633 | self.index += 1; | ||
| 1634 | id = .comment; | ||
| 1635 | break; | ||
| 1636 | } | ||
| 1637 | state = .multi_line_comment_done; | ||
| 1638 | }, | ||
| 1639 | '\n' => { | ||
| 1640 | self.line += 1; | ||
| 1641 | state = .multi_line_comment; | ||
| 1642 | }, | ||
| 1643 | '*' => {}, | ||
| 1644 | else => state = .multi_line_comment, | ||
| 1645 | }, | ||
| 1646 | .multi_line_comment_done => switch (c) { | ||
| 1647 | '\n' => { | ||
| 1648 | start = self.index; | ||
| 1649 | id = .nl; | ||
| 1650 | self.index += 1; | ||
| 1651 | self.line += 1; | ||
| 1652 | break; | ||
| 1653 | }, | ||
| 1654 | '\r' => unreachable, | ||
| 1655 | '\t', '\x0B', '\x0C', ' ' => { | ||
| 1656 | start = self.index; | ||
| 1657 | state = .whitespace; | ||
| 1658 | }, | ||
| 1659 | else => { | ||
| 1660 | id = .whitespace; | ||
| 1661 | break; | ||
| 1662 | }, | ||
| 1663 | }, | ||
| 1664 | .pp_num => switch (c) { | ||
| 1665 | 'a'...'d', | ||
| 1666 | 'A'...'D', | ||
| 1667 | 'f'...'o', | ||
| 1668 | 'F'...'O', | ||
| 1669 | 'q'...'z', | ||
| 1670 | 'Q'...'Z', | ||
| 1671 | '0'...'9', | ||
| 1672 | '_', | ||
| 1673 | '.', | ||
| 1674 | => {}, | ||
| 1675 | 'e', 'E', 'p', 'P' => state = .pp_num_exponent, | ||
| 1676 | '\'' => if (self.comp.langopts.standard.atLeast(.c23)) { | ||
| 1677 | state = .pp_num_digit_separator; | ||
| 1678 | } else { | ||
| 1679 | id = .pp_num; | ||
| 1680 | break; | ||
| 1681 | }, | ||
| 1682 | else => { | ||
| 1683 | id = .pp_num; | ||
| 1684 | break; | ||
| 1685 | }, | ||
| 1686 | }, | ||
| 1687 | .pp_num_digit_separator => switch (c) { | ||
| 1688 | 'a'...'d', | ||
| 1689 | 'A'...'D', | ||
| 1690 | 'f'...'o', | ||
| 1691 | 'F'...'O', | ||
| 1692 | 'q'...'z', | ||
| 1693 | 'Q'...'Z', | ||
| 1694 | '0'...'9', | ||
| 1695 | '_', | ||
| 1696 | => state = .pp_num, | ||
| 1697 | else => { | ||
| 1698 | self.index -= 1; | ||
| 1699 | id = .pp_num; | ||
| 1700 | break; | ||
| 1701 | }, | ||
| 1702 | }, | ||
| 1703 | .pp_num_exponent => switch (c) { | ||
| 1704 | 'a'...'o', | ||
| 1705 | 'q'...'z', | ||
| 1706 | 'A'...'O', | ||
| 1707 | 'Q'...'Z', | ||
| 1708 | '0'...'9', | ||
| 1709 | '_', | ||
| 1710 | '.', | ||
| 1711 | '+', | ||
| 1712 | '-', | ||
| 1713 | => state = .pp_num, | ||
| 1714 | 'p', 'P' => {}, | ||
| 1715 | else => { | ||
| 1716 | id = .pp_num; | ||
| 1717 | break; | ||
| 1718 | }, | ||
| 1719 | }, | ||
| 1720 | } | ||
| 1721 | } else if (self.index == self.buf.len) { | ||
| 1722 | switch (state) { | ||
| 1723 | .start, .line_comment => {}, | ||
| 1724 | .u, .u8, .U, .L, .identifier => id = Token.getTokenId(self.comp, self.buf[start..self.index]), | ||
| 1725 | .extended_identifier => id = .extended_identifier, | ||
| 1726 | |||
| 1727 | .period2 => { | ||
| 1728 | self.index -= 1; | ||
| 1729 | id = .period; | ||
| 1730 | }, | ||
| 1731 | |||
| 1732 | .multi_line_comment, | ||
| 1733 | .multi_line_comment_asterisk, | ||
| 1734 | => id = .unterminated_comment, | ||
| 1735 | |||
| 1736 | .char_escape_sequence, .char_literal, .char_literal_start => id = .unterminated_char_literal, | ||
| 1737 | .string_escape_sequence, .string_literal => id = .unterminated_string_literal, | ||
| 1738 | |||
| 1739 | .whitespace => id = .whitespace, | ||
| 1740 | .multi_line_comment_done => id = .whitespace, | ||
| 1741 | |||
| 1742 | .equal => id = .equal, | ||
| 1743 | .bang => id = .bang, | ||
| 1744 | .minus => id = .minus, | ||
| 1745 | .slash => id = .slash, | ||
| 1746 | .ampersand => id = .ampersand, | ||
| 1747 | .hash => id = .hash, | ||
| 1748 | .period => id = .period, | ||
| 1749 | .pipe => id = .pipe, | ||
| 1750 | .angle_bracket_angle_bracket_right => id = .angle_bracket_angle_bracket_right, | ||
| 1751 | .angle_bracket_right => id = .angle_bracket_right, | ||
| 1752 | .angle_bracket_angle_bracket_left => id = .angle_bracket_angle_bracket_left, | ||
| 1753 | .angle_bracket_left => id = .angle_bracket_left, | ||
| 1754 | .plus => id = .plus, | ||
| 1755 | .colon => id = .colon, | ||
| 1756 | .percent => id = .percent, | ||
| 1757 | .caret => id = .caret, | ||
| 1758 | .asterisk => id = .asterisk, | ||
| 1759 | .hash_digraph => id = .hash, | ||
| 1760 | .hash_hash_digraph_partial => { | ||
| 1761 | id = .hash; | ||
| 1762 | self.index -= 1; // re-tokenize the percent | ||
| 1763 | }, | ||
| 1764 | .pp_num, .pp_num_exponent, .pp_num_digit_separator => id = .pp_num, | ||
| 1765 | } | ||
| 1766 | } | ||
| 1767 | |||
| 1768 | return .{ | ||
| 1769 | .id = id, | ||
| 1770 | .start = start, | ||
| 1771 | .end = self.index, | ||
| 1772 | .line = self.line, | ||
| 1773 | .source = self.source, | ||
| 1774 | }; | ||
| 1775 | } | ||
| 1776 | |||
| 1777 | pub fn nextNoWS(self: *Tokenizer) Token { | ||
| 1778 | var tok = self.next(); | ||
| 1779 | while (tok.id == .whitespace or tok.id == .comment) tok = self.next(); | ||
| 1780 | return tok; | ||
| 1781 | } | ||
| 1782 | |||
| 1783 | pub fn nextNoWSComments(self: *Tokenizer) Token { | ||
| 1784 | var tok = self.next(); | ||
| 1785 | while (tok.id == .whitespace) tok = self.next(); | ||
| 1786 | return tok; | ||
| 1787 | } | ||
| 1788 | |||
| 1789 | /// Try to tokenize a '::' even if not supported by the current language standard. | ||
| 1790 | pub fn colonColon(self: *Tokenizer) Token { | ||
| 1791 | var tok = self.nextNoWS(); | ||
| 1792 | if (tok.id == .colon and self.buf[self.index] == ':') { | ||
| 1793 | self.index += 1; | ||
| 1794 | tok.id = .colon_colon; | ||
| 1795 | } | ||
| 1796 | return tok; | ||
| 1797 | } | ||
| 1798 | |||
| 1799 | test "operators" { | ||
| 1800 | try expectTokens( | ||
| 1801 | \\ ! != | || |= = == | ||
| 1802 | \\ ( ) { } [ ] . .. ... | ||
| 1803 | \\ ^ ^= + ++ += - -- -= | ||
| 1804 | \\ * *= % %= -> : ; / /= | ||
| 1805 | \\ , & && &= ? < <= << | ||
| 1806 | \\ <<= > >= >> >>= ~ # ## | ||
| 1807 | \\ | ||
| 1808 | , &.{ | ||
| 1809 | .bang, | ||
| 1810 | .bang_equal, | ||
| 1811 | .pipe, | ||
| 1812 | .pipe_pipe, | ||
| 1813 | .pipe_equal, | ||
| 1814 | .equal, | ||
| 1815 | .equal_equal, | ||
| 1816 | .nl, | ||
| 1817 | .l_paren, | ||
| 1818 | .r_paren, | ||
| 1819 | .l_brace, | ||
| 1820 | .r_brace, | ||
| 1821 | .l_bracket, | ||
| 1822 | .r_bracket, | ||
| 1823 | .period, | ||
| 1824 | .period, | ||
| 1825 | .period, | ||
| 1826 | .ellipsis, | ||
| 1827 | .nl, | ||
| 1828 | .caret, | ||
| 1829 | .caret_equal, | ||
| 1830 | .plus, | ||
| 1831 | .plus_plus, | ||
| 1832 | .plus_equal, | ||
| 1833 | .minus, | ||
| 1834 | .minus_minus, | ||
| 1835 | .minus_equal, | ||
| 1836 | .nl, | ||
| 1837 | .asterisk, | ||
| 1838 | .asterisk_equal, | ||
| 1839 | .percent, | ||
| 1840 | .percent_equal, | ||
| 1841 | .arrow, | ||
| 1842 | .colon, | ||
| 1843 | .semicolon, | ||
| 1844 | .slash, | ||
| 1845 | .slash_equal, | ||
| 1846 | .nl, | ||
| 1847 | .comma, | ||
| 1848 | .ampersand, | ||
| 1849 | .ampersand_ampersand, | ||
| 1850 | .ampersand_equal, | ||
| 1851 | .question_mark, | ||
| 1852 | .angle_bracket_left, | ||
| 1853 | .angle_bracket_left_equal, | ||
| 1854 | .angle_bracket_angle_bracket_left, | ||
| 1855 | .nl, | ||
| 1856 | .angle_bracket_angle_bracket_left_equal, | ||
| 1857 | .angle_bracket_right, | ||
| 1858 | .angle_bracket_right_equal, | ||
| 1859 | .angle_bracket_angle_bracket_right, | ||
| 1860 | .angle_bracket_angle_bracket_right_equal, | ||
| 1861 | .tilde, | ||
| 1862 | .hash, | ||
| 1863 | .hash_hash, | ||
| 1864 | .nl, | ||
| 1865 | }); | ||
| 1866 | } | ||
| 1867 | |||
| 1868 | test "keywords" { | ||
| 1869 | try expectTokens( | ||
| 1870 | \\auto __auto_type break case char const continue default do | ||
| 1871 | \\double else enum extern float for goto if int | ||
| 1872 | \\long register return short signed sizeof static | ||
| 1873 | \\struct switch typedef union unsigned void volatile | ||
| 1874 | \\while _Bool _Complex _Imaginary inline restrict _Alignas | ||
| 1875 | \\_Alignof _Atomic _Generic _Noreturn _Static_assert _Thread_local | ||
| 1876 | \\__attribute __attribute__ | ||
| 1877 | \\ | ||
| 1878 | , &.{ | ||
| 1879 | .keyword_auto, | ||
| 1880 | .keyword_auto_type, | ||
| 1881 | .keyword_break, | ||
| 1882 | .keyword_case, | ||
| 1883 | .keyword_char, | ||
| 1884 | .keyword_const, | ||
| 1885 | .keyword_continue, | ||
| 1886 | .keyword_default, | ||
| 1887 | .keyword_do, | ||
| 1888 | .nl, | ||
| 1889 | .keyword_double, | ||
| 1890 | .keyword_else, | ||
| 1891 | .keyword_enum, | ||
| 1892 | .keyword_extern, | ||
| 1893 | .keyword_float, | ||
| 1894 | .keyword_for, | ||
| 1895 | .keyword_goto, | ||
| 1896 | .keyword_if, | ||
| 1897 | .keyword_int, | ||
| 1898 | .nl, | ||
| 1899 | .keyword_long, | ||
| 1900 | .keyword_register, | ||
| 1901 | .keyword_return, | ||
| 1902 | .keyword_short, | ||
| 1903 | .keyword_signed, | ||
| 1904 | .keyword_sizeof, | ||
| 1905 | .keyword_static, | ||
| 1906 | .nl, | ||
| 1907 | .keyword_struct, | ||
| 1908 | .keyword_switch, | ||
| 1909 | .keyword_typedef, | ||
| 1910 | .keyword_union, | ||
| 1911 | .keyword_unsigned, | ||
| 1912 | .keyword_void, | ||
| 1913 | .keyword_volatile, | ||
| 1914 | .nl, | ||
| 1915 | .keyword_while, | ||
| 1916 | .keyword_bool, | ||
| 1917 | .keyword_complex, | ||
| 1918 | .keyword_imaginary, | ||
| 1919 | .keyword_inline, | ||
| 1920 | .keyword_restrict, | ||
| 1921 | .keyword_alignas, | ||
| 1922 | .nl, | ||
| 1923 | .keyword_alignof, | ||
| 1924 | .keyword_atomic, | ||
| 1925 | .keyword_generic, | ||
| 1926 | .keyword_noreturn, | ||
| 1927 | .keyword_static_assert, | ||
| 1928 | .keyword_thread_local, | ||
| 1929 | .nl, | ||
| 1930 | .keyword_attribute1, | ||
| 1931 | .keyword_attribute2, | ||
| 1932 | .nl, | ||
| 1933 | }); | ||
| 1934 | } | ||
| 1935 | |||
| 1936 | test "preprocessor keywords" { | ||
| 1937 | try expectTokens( | ||
| 1938 | \\#include | ||
| 1939 | \\#include_next | ||
| 1940 | \\#embed | ||
| 1941 | \\#define | ||
| 1942 | \\#ifdef | ||
| 1943 | \\#ifndef | ||
| 1944 | \\#error | ||
| 1945 | \\#pragma | ||
| 1946 | \\ | ||
| 1947 | , &.{ | ||
| 1948 | .hash, | ||
| 1949 | .keyword_include, | ||
| 1950 | .nl, | ||
| 1951 | .hash, | ||
| 1952 | .keyword_include_next, | ||
| 1953 | .nl, | ||
| 1954 | .hash, | ||
| 1955 | .keyword_embed, | ||
| 1956 | .nl, | ||
| 1957 | .hash, | ||
| 1958 | .keyword_define, | ||
| 1959 | .nl, | ||
| 1960 | .hash, | ||
| 1961 | .keyword_ifdef, | ||
| 1962 | .nl, | ||
| 1963 | .hash, | ||
| 1964 | .keyword_ifndef, | ||
| 1965 | .nl, | ||
| 1966 | .hash, | ||
| 1967 | .keyword_error, | ||
| 1968 | .nl, | ||
| 1969 | .hash, | ||
| 1970 | .keyword_pragma, | ||
| 1971 | .nl, | ||
| 1972 | }); | ||
| 1973 | } | ||
| 1974 | |||
| 1975 | test "line continuation" { | ||
| 1976 | try expectTokens( | ||
| 1977 | \\#define foo \ | ||
| 1978 | \\ bar | ||
| 1979 | \\"foo\ | ||
| 1980 | \\ bar" | ||
| 1981 | \\#define "foo" | ||
| 1982 | \\ "bar" | ||
| 1983 | \\#define "foo" \ | ||
| 1984 | \\ "bar" | ||
| 1985 | , &.{ | ||
| 1986 | .hash, | ||
| 1987 | .keyword_define, | ||
| 1988 | .identifier, | ||
| 1989 | .identifier, | ||
| 1990 | .nl, | ||
| 1991 | .string_literal, | ||
| 1992 | .nl, | ||
| 1993 | .hash, | ||
| 1994 | .keyword_define, | ||
| 1995 | .string_literal, | ||
| 1996 | .nl, | ||
| 1997 | .string_literal, | ||
| 1998 | .nl, | ||
| 1999 | .hash, | ||
| 2000 | .keyword_define, | ||
| 2001 | .string_literal, | ||
| 2002 | .string_literal, | ||
| 2003 | }); | ||
| 2004 | } | ||
| 2005 | |||
| 2006 | test "string prefix" { | ||
| 2007 | try expectTokens( | ||
| 2008 | \\"foo" | ||
| 2009 | \\u"foo" | ||
| 2010 | \\u8"foo" | ||
| 2011 | \\U"foo" | ||
| 2012 | \\L"foo" | ||
| 2013 | \\'foo' | ||
| 2014 | \\u8'A' | ||
| 2015 | \\u'foo' | ||
| 2016 | \\U'foo' | ||
| 2017 | \\L'foo' | ||
| 2018 | \\ | ||
| 2019 | , &.{ | ||
| 2020 | .string_literal, | ||
| 2021 | .nl, | ||
| 2022 | .string_literal_utf_16, | ||
| 2023 | .nl, | ||
| 2024 | .string_literal_utf_8, | ||
| 2025 | .nl, | ||
| 2026 | .string_literal_utf_32, | ||
| 2027 | .nl, | ||
| 2028 | .string_literal_wide, | ||
| 2029 | .nl, | ||
| 2030 | .char_literal, | ||
| 2031 | .nl, | ||
| 2032 | .char_literal_utf_8, | ||
| 2033 | .nl, | ||
| 2034 | .char_literal_utf_16, | ||
| 2035 | .nl, | ||
| 2036 | .char_literal_utf_32, | ||
| 2037 | .nl, | ||
| 2038 | .char_literal_wide, | ||
| 2039 | .nl, | ||
| 2040 | }); | ||
| 2041 | } | ||
| 2042 | |||
| 2043 | test "num suffixes" { | ||
| 2044 | try expectTokens( | ||
| 2045 | \\ 1.0f 1.0L 1.0 .0 1. 0x1p0f 0X1p0 | ||
| 2046 | \\ 0l 0lu 0ll 0llu 0 | ||
| 2047 | \\ 1u 1ul 1ull 1 | ||
| 2048 | \\ 1.0i 1.0I | ||
| 2049 | \\ 1.0if 1.0If 1.0fi 1.0fI | ||
| 2050 | \\ 1.0il 1.0Il 1.0li 1.0lI | ||
| 2051 | \\ | ||
| 2052 | , &.{ | ||
| 2053 | .pp_num, | ||
| 2054 | .pp_num, | ||
| 2055 | .pp_num, | ||
| 2056 | .pp_num, | ||
| 2057 | .pp_num, | ||
| 2058 | .pp_num, | ||
| 2059 | .pp_num, | ||
| 2060 | .nl, | ||
| 2061 | .pp_num, | ||
| 2062 | .pp_num, | ||
| 2063 | .pp_num, | ||
| 2064 | .pp_num, | ||
| 2065 | .pp_num, | ||
| 2066 | .nl, | ||
| 2067 | .pp_num, | ||
| 2068 | .pp_num, | ||
| 2069 | .pp_num, | ||
| 2070 | .pp_num, | ||
| 2071 | .nl, | ||
| 2072 | .pp_num, | ||
| 2073 | .pp_num, | ||
| 2074 | .nl, | ||
| 2075 | .pp_num, | ||
| 2076 | .pp_num, | ||
| 2077 | .pp_num, | ||
| 2078 | .pp_num, | ||
| 2079 | .nl, | ||
| 2080 | .pp_num, | ||
| 2081 | .pp_num, | ||
| 2082 | .pp_num, | ||
| 2083 | .pp_num, | ||
| 2084 | .nl, | ||
| 2085 | }); | ||
| 2086 | } | ||
| 2087 | |||
| 2088 | test "comments" { | ||
| 2089 | try expectTokens( | ||
| 2090 | \\//foo | ||
| 2091 | \\#foo | ||
| 2092 | , &.{ | ||
| 2093 | .nl, | ||
| 2094 | .hash, | ||
| 2095 | .identifier, | ||
| 2096 | }); | ||
| 2097 | } | ||
| 2098 | |||
| 2099 | test "extended identifiers" { | ||
| 2100 | try expectTokens("𝓪𝓻𝓸𝓬𝓬", &.{.extended_identifier}); | ||
| 2101 | try expectTokens("u𝓪𝓻𝓸𝓬𝓬", &.{.extended_identifier}); | ||
| 2102 | try expectTokens("u8𝓪𝓻𝓸𝓬𝓬", &.{.extended_identifier}); | ||
| 2103 | try expectTokens("U𝓪𝓻𝓸𝓬𝓬", &.{.extended_identifier}); | ||
| 2104 | try expectTokens("L𝓪𝓻𝓸𝓬𝓬", &.{.extended_identifier}); | ||
| 2105 | try expectTokens("1™", &.{ .pp_num, .extended_identifier }); | ||
| 2106 | try expectTokens("1.™", &.{ .pp_num, .extended_identifier }); | ||
| 2107 | try expectTokens("..™", &.{ .period, .period, .extended_identifier }); | ||
| 2108 | try expectTokens("0™", &.{ .pp_num, .extended_identifier }); | ||
| 2109 | try expectTokens("0b\u{E0000}", &.{ .pp_num, .extended_identifier }); | ||
| 2110 | try expectTokens("0b0\u{E0000}", &.{ .pp_num, .extended_identifier }); | ||
| 2111 | try expectTokens("01\u{E0000}", &.{ .pp_num, .extended_identifier }); | ||
| 2112 | try expectTokens("010\u{E0000}", &.{ .pp_num, .extended_identifier }); | ||
| 2113 | try expectTokens("0x\u{E0000}", &.{ .pp_num, .extended_identifier }); | ||
| 2114 | try expectTokens("0x0\u{E0000}", &.{ .pp_num, .extended_identifier }); | ||
| 2115 | try expectTokens("\"\\0\u{E0000}\"", &.{.string_literal}); | ||
| 2116 | try expectTokens("\"\\x\u{E0000}\"", &.{.string_literal}); | ||
| 2117 | try expectTokens("\"\\u\u{E0000}\"", &.{.string_literal}); | ||
| 2118 | try expectTokens("1e\u{E0000}", &.{ .pp_num, .extended_identifier }); | ||
| 2119 | try expectTokens("1e1\u{E0000}", &.{ .pp_num, .extended_identifier }); | ||
| 2120 | } | ||
| 2121 | |||
| 2122 | test "digraphs" { | ||
| 2123 | try expectTokens("%:<::><%%>%:%:", &.{ .hash, .l_bracket, .r_bracket, .l_brace, .r_brace, .hash_hash }); | ||
| 2124 | try expectTokens("\"%:<::><%%>%:%:\"", &.{.string_literal}); | ||
| 2125 | try expectTokens("%:%42 %:%", &.{ .hash, .percent, .pp_num, .hash, .percent }); | ||
| 2126 | } | ||
| 2127 | |||
| 2128 | test "C23 keywords" { | ||
| 2129 | try expectTokensExtra("true false alignas alignof bool static_assert thread_local nullptr typeof_unqual", &.{ | ||
| 2130 | .keyword_true, | ||
| 2131 | .keyword_false, | ||
| 2132 | .keyword_c23_alignas, | ||
| 2133 | .keyword_c23_alignof, | ||
| 2134 | .keyword_c23_bool, | ||
| 2135 | .keyword_c23_static_assert, | ||
| 2136 | .keyword_c23_thread_local, | ||
| 2137 | .keyword_nullptr, | ||
| 2138 | .keyword_typeof_unqual, | ||
| 2139 | }, .c23); | ||
| 2140 | } | ||
| 2141 | |||
| 2142 | fn expectTokensExtra(contents: []const u8, expected_tokens: []const Token.Id, standard: ?LangOpts.Standard) !void { | ||
| 2143 | var comp = Compilation.init(std.testing.allocator); | ||
| 2144 | defer comp.deinit(); | ||
| 2145 | if (standard) |provided| { | ||
| 2146 | comp.langopts.standard = provided; | ||
| 2147 | } | ||
| 2148 | const source = try comp.addSourceFromBuffer("path", contents); | ||
| 2149 | var tokenizer = Tokenizer{ | ||
| 2150 | .buf = source.buf, | ||
| 2151 | .source = source.id, | ||
| 2152 | .comp = &comp, | ||
| 2153 | }; | ||
| 2154 | var i: usize = 0; | ||
| 2155 | while (i < expected_tokens.len) { | ||
| 2156 | const token = tokenizer.next(); | ||
| 2157 | if (token.id == .whitespace) continue; | ||
| 2158 | const expected_token_id = expected_tokens[i]; | ||
| 2159 | i += 1; | ||
| 2160 | if (!std.meta.eql(token.id, expected_token_id)) { | ||
| 2161 | std.debug.print("expected {s}, found {s}\n", .{ @tagName(expected_token_id), @tagName(token.id) }); | ||
| 2162 | return error.TokensDoNotEqual; | ||
| 2163 | } | ||
| 2164 | } | ||
| 2165 | const last_token = tokenizer.next(); | ||
| 2166 | try std.testing.expect(last_token.id == .eof); | ||
| 2167 | } | ||
| 2168 | |||
| 2169 | fn expectTokens(contents: []const u8, expected_tokens: []const Token.Id) !void { | ||
| 2170 | return expectTokensExtra(contents, expected_tokens, null); | ||
| 2171 | } | ||
deps/aro/aro/Toolchain.zig created+492| ... | @@ -0,0 +1,492 @@ | ||
| 1 | const std = @import("std"); | ||
| 2 | const Driver = @import("Driver.zig"); | ||
| 3 | const Compilation = @import("Compilation.zig"); | ||
| 4 | const mem = std.mem; | ||
| 5 | const system_defaults = @import("system_defaults"); | ||
| 6 | const target_util = @import("target.zig"); | ||
| 7 | const Linux = @import("toolchains/Linux.zig"); | ||
| 8 | const Multilib = @import("Driver/Multilib.zig"); | ||
| 9 | const Filesystem = @import("Driver/Filesystem.zig").Filesystem; | ||
| 10 | |||
| 11 | pub const PathList = std.ArrayListUnmanaged([]const u8); | ||
| 12 | |||
| 13 | pub const RuntimeLibKind = enum { | ||
| 14 | compiler_rt, | ||
| 15 | libgcc, | ||
| 16 | }; | ||
| 17 | |||
| 18 | pub const FileKind = enum { | ||
| 19 | object, | ||
| 20 | static, | ||
| 21 | shared, | ||
| 22 | }; | ||
| 23 | |||
| 24 | pub const LibGCCKind = enum { | ||
| 25 | unspecified, | ||
| 26 | static, | ||
| 27 | shared, | ||
| 28 | }; | ||
| 29 | |||
| 30 | pub const UnwindLibKind = enum { | ||
| 31 | none, | ||
| 32 | compiler_rt, | ||
| 33 | libgcc, | ||
| 34 | }; | ||
| 35 | |||
| 36 | const Inner = union(enum) { | ||
| 37 | uninitialized, | ||
| 38 | linux: Linux, | ||
| 39 | unknown: void, | ||
| 40 | |||
| 41 | fn deinit(self: *Inner, allocator: mem.Allocator) void { | ||
| 42 | switch (self.*) { | ||
| 43 | .linux => |*linux| linux.deinit(allocator), | ||
| 44 | .uninitialized, .unknown => {}, | ||
| 45 | } | ||
| 46 | } | ||
| 47 | }; | ||
| 48 | |||
| 49 | const Toolchain = @This(); | ||
| 50 | |||
| 51 | filesystem: Filesystem = .{ .real = {} }, | ||
| 52 | driver: *Driver, | ||
| 53 | arena: mem.Allocator, | ||
| 54 | |||
| 55 | /// The list of toolchain specific path prefixes to search for libraries. | ||
| 56 | library_paths: PathList = .{}, | ||
| 57 | |||
| 58 | /// The list of toolchain specific path prefixes to search for files. | ||
| 59 | file_paths: PathList = .{}, | ||
| 60 | |||
| 61 | /// The list of toolchain specific path prefixes to search for programs. | ||
| 62 | program_paths: PathList = .{}, | ||
| 63 | |||
| 64 | selected_multilib: Multilib = .{}, | ||
| 65 | |||
| 66 | inner: Inner = .{ .uninitialized = {} }, | ||
| 67 | |||
| 68 | pub fn getTarget(tc: *const Toolchain) std.Target { | ||
| 69 | return tc.driver.comp.target; | ||
| 70 | } | ||
| 71 | |||
| 72 | fn getDefaultLinker(tc: *const Toolchain) []const u8 { | ||
| 73 | return switch (tc.inner) { | ||
| 74 | .uninitialized => unreachable, | ||
| 75 | .linux => |linux| linux.getDefaultLinker(tc.getTarget()), | ||
| 76 | .unknown => "ld", | ||
| 77 | }; | ||
| 78 | } | ||
| 79 | |||
| 80 | /// Call this after driver has finished parsing command line arguments to find the toolchain | ||
| 81 | pub fn discover(tc: *Toolchain) !void { | ||
| 82 | if (tc.inner != .uninitialized) return; | ||
| 83 | |||
| 84 | const target = tc.getTarget(); | ||
| 85 | tc.inner = switch (target.os.tag) { | ||
| 86 | .elfiamcu, | ||
| 87 | .linux, | ||
| 88 | => if (target.cpu.arch == .hexagon) | ||
| 89 | .{ .unknown = {} } // TODO | ||
| 90 | else if (target.cpu.arch.isMIPS()) | ||
| 91 | .{ .unknown = {} } // TODO | ||
| 92 | else if (target.cpu.arch.isPPC()) | ||
| 93 | .{ .unknown = {} } // TODO | ||
| 94 | else if (target.cpu.arch == .ve) | ||
| 95 | .{ .unknown = {} } // TODO | ||
| 96 | else | ||
| 97 | .{ .linux = .{} }, | ||
| 98 | else => .{ .unknown = {} }, // TODO | ||
| 99 | }; | ||
| 100 | return switch (tc.inner) { | ||
| 101 | .uninitialized => unreachable, | ||
| 102 | .linux => |*linux| linux.discover(tc), | ||
| 103 | .unknown => {}, | ||
| 104 | }; | ||
| 105 | } | ||
| 106 | |||
| 107 | pub fn deinit(tc: *Toolchain) void { | ||
| 108 | const gpa = tc.driver.comp.gpa; | ||
| 109 | tc.inner.deinit(gpa); | ||
| 110 | |||
| 111 | tc.library_paths.deinit(gpa); | ||
| 112 | tc.file_paths.deinit(gpa); | ||
| 113 | tc.program_paths.deinit(gpa); | ||
| 114 | } | ||
| 115 | |||
| 116 | /// Write linker path to `buf` and return a slice of it | ||
| 117 | pub fn getLinkerPath(tc: *const Toolchain, buf: []u8) ![]const u8 { | ||
| 118 | // --ld-path= takes precedence over -fuse-ld= and specifies the executable | ||
| 119 | // name. -B, COMPILER_PATH and PATH are consulted if the value does not | ||
| 120 | // contain a path component separator. | ||
| 121 | // -fuse-ld=lld can be used with --ld-path= to indicate that the binary | ||
| 122 | // that --ld-path= points to is lld. | ||
| 123 | const use_linker = tc.driver.use_linker orelse system_defaults.linker; | ||
| 124 | |||
| 125 | if (tc.driver.linker_path) |ld_path| { | ||
| 126 | var path = ld_path; | ||
| 127 | if (path.len > 0) { | ||
| 128 | if (std.fs.path.dirname(path) == null) { | ||
| 129 | path = tc.getProgramPath(path, buf); | ||
| 130 | } | ||
| 131 | if (tc.filesystem.canExecute(path)) { | ||
| 132 | return path; | ||
| 133 | } | ||
| 134 | } | ||
| 135 | return tc.driver.fatal( | ||
| 136 | "invalid linker name in argument '--ld-path={s}'", | ||
| 137 | .{path}, | ||
| 138 | ); | ||
| 139 | } | ||
| 140 | |||
| 141 | // If we're passed -fuse-ld= with no argument, or with the argument ld, | ||
| 142 | // then use whatever the default system linker is. | ||
| 143 | if (use_linker.len == 0 or mem.eql(u8, use_linker, "ld")) { | ||
| 144 | const default = tc.getDefaultLinker(); | ||
| 145 | if (std.fs.path.isAbsolute(default)) return default; | ||
| 146 | return tc.getProgramPath(default, buf); | ||
| 147 | } | ||
| 148 | |||
| 149 | // Extending -fuse-ld= to an absolute or relative path is unexpected. Checking | ||
| 150 | // for the linker flavor is brittle. In addition, prepending "ld." or "ld64." | ||
| 151 | // to a relative path is surprising. This is more complex due to priorities | ||
| 152 | // among -B, COMPILER_PATH and PATH. --ld-path= should be used instead. | ||
| 153 | if (mem.indexOfScalar(u8, use_linker, '/') != null) { | ||
| 154 | try tc.driver.comp.addDiagnostic(.{ .tag = .fuse_ld_path }, &.{}); | ||
| 155 | } | ||
| 156 | |||
| 157 | if (std.fs.path.isAbsolute(use_linker)) { | ||
| 158 | if (tc.filesystem.canExecute(use_linker)) { | ||
| 159 | return use_linker; | ||
| 160 | } | ||
| 161 | } else { | ||
| 162 | var linker_name = try std.ArrayList(u8).initCapacity(tc.driver.comp.gpa, 5 + use_linker.len); // "ld64." ++ use_linker | ||
| 163 | defer linker_name.deinit(); | ||
| 164 | if (tc.getTarget().isDarwin()) { | ||
| 165 | linker_name.appendSliceAssumeCapacity("ld64."); | ||
| 166 | } else { | ||
| 167 | linker_name.appendSliceAssumeCapacity("ld."); | ||
| 168 | } | ||
| 169 | linker_name.appendSliceAssumeCapacity(use_linker); | ||
| 170 | const linker_path = tc.getProgramPath(linker_name.items, buf); | ||
| 171 | if (tc.filesystem.canExecute(linker_path)) { | ||
| 172 | return linker_path; | ||
| 173 | } | ||
| 174 | } | ||
| 175 | |||
| 176 | if (tc.driver.use_linker) |linker| { | ||
| 177 | return tc.driver.fatal( | ||
| 178 | "invalid linker name in argument '-fuse-ld={s}'", | ||
| 179 | .{linker}, | ||
| 180 | ); | ||
| 181 | } | ||
| 182 | const default_linker = tc.getDefaultLinker(); | ||
| 183 | return tc.getProgramPath(default_linker, buf); | ||
| 184 | } | ||
| 185 | |||
| 186 | const TargetSpecificToolName = std.BoundedArray(u8, 64); | ||
| 187 | |||
| 188 | /// If an explicit target is provided, also check the prefixed tool-specific name | ||
| 189 | /// TODO: this isn't exactly right since our target names don't necessarily match up | ||
| 190 | /// with GCC's. | ||
| 191 | /// For example the Zig target `arm-freestanding-eabi` would need the `arm-none-eabi` tools | ||
| 192 | fn possibleProgramNames(raw_triple: ?[]const u8, name: []const u8, target_specific: *TargetSpecificToolName) std.BoundedArray([]const u8, 2) { | ||
| 193 | var possible_names: std.BoundedArray([]const u8, 2) = .{}; | ||
| 194 | if (raw_triple) |triple| { | ||
| 195 | const w = target_specific.writer(); | ||
| 196 | if (w.print("{s}-{s}", .{ triple, name })) { | ||
| 197 | possible_names.appendAssumeCapacity(target_specific.constSlice()); | ||
| 198 | } else |_| {} | ||
| 199 | } | ||
| 200 | possible_names.appendAssumeCapacity(name); | ||
| 201 | |||
| 202 | return possible_names; | ||
| 203 | } | ||
| 204 | |||
| 205 | /// Add toolchain `file_paths` to argv as `-L` arguments | ||
| 206 | pub fn addFilePathLibArgs(tc: *const Toolchain, argv: *std.ArrayList([]const u8)) !void { | ||
| 207 | try argv.ensureUnusedCapacity(tc.file_paths.items.len); | ||
| 208 | |||
| 209 | var bytes_needed: usize = 0; | ||
| 210 | for (tc.file_paths.items) |path| { | ||
| 211 | bytes_needed += path.len + 2; // +2 for `-L` | ||
| 212 | } | ||
| 213 | var bytes = try tc.arena.alloc(u8, bytes_needed); | ||
| 214 | var index: usize = 0; | ||
| 215 | for (tc.file_paths.items) |path| { | ||
| 216 | @memcpy(bytes[index..][0..2], "-L"); | ||
| 217 | @memcpy(bytes[index + 2 ..][0..path.len], path); | ||
| 218 | argv.appendAssumeCapacity(bytes[index..][0 .. path.len + 2]); | ||
| 219 | index += path.len + 2; | ||
| 220 | } | ||
| 221 | } | ||
| 222 | |||
| 223 | /// Search for an executable called `name` or `{triple}-{name} in program_paths and the $PATH environment variable | ||
| 224 | /// If not found there, just use `name` | ||
| 225 | /// Writes the result to `buf` and returns a slice of it | ||
| 226 | fn getProgramPath(tc: *const Toolchain, name: []const u8, buf: []u8) []const u8 { | ||
| 227 | var path_buf: [std.fs.MAX_PATH_BYTES]u8 = undefined; | ||
| 228 | var fib = std.heap.FixedBufferAllocator.init(&path_buf); | ||
| 229 | |||
| 230 | var tool_specific_name: TargetSpecificToolName = .{}; | ||
| 231 | const possible_names = possibleProgramNames(tc.driver.raw_target_triple, name, &tool_specific_name); | ||
| 232 | |||
| 233 | for (possible_names.constSlice()) |tool_name| { | ||
| 234 | for (tc.program_paths.items) |program_path| { | ||
| 235 | defer fib.reset(); | ||
| 236 | |||
| 237 | const candidate = std.fs.path.join(fib.allocator(), &.{ program_path, tool_name }) catch continue; | ||
| 238 | |||
| 239 | if (tc.filesystem.canExecute(candidate) and candidate.len <= buf.len) { | ||
| 240 | @memcpy(buf[0..candidate.len], candidate); | ||
| 241 | return buf[0..candidate.len]; | ||
| 242 | } | ||
| 243 | } | ||
| 244 | return tc.filesystem.findProgramByName(tc.driver.comp.gpa, name, tc.driver.comp.environment.path, buf) orelse continue; | ||
| 245 | } | ||
| 246 | @memcpy(buf[0..name.len], name); | ||
| 247 | return buf[0..name.len]; | ||
| 248 | } | ||
| 249 | |||
| 250 | pub fn getSysroot(tc: *const Toolchain) []const u8 { | ||
| 251 | return tc.driver.sysroot orelse system_defaults.sysroot; | ||
| 252 | } | ||
| 253 | |||
| 254 | /// Search for `name` in a variety of places | ||
| 255 | /// TODO: cache results based on `name` so we're not repeatedly allocating the same strings? | ||
| 256 | pub fn getFilePath(tc: *const Toolchain, name: []const u8) ![]const u8 { | ||
| 257 | var path_buf: [std.fs.MAX_PATH_BYTES]u8 = undefined; | ||
| 258 | var fib = std.heap.FixedBufferAllocator.init(&path_buf); | ||
| 259 | const allocator = fib.allocator(); | ||
| 260 | |||
| 261 | const sysroot = tc.getSysroot(); | ||
| 262 | |||
| 263 | // todo check resource dir | ||
| 264 | // todo check compiler RT path | ||
| 265 | const aro_dir = std.fs.path.dirname(tc.driver.aro_name) orelse ""; | ||
| 266 | const candidate = try std.fs.path.join(allocator, &.{ aro_dir, "..", name }); | ||
| 267 | if (tc.filesystem.exists(candidate)) { | ||
| 268 | return tc.arena.dupe(u8, candidate); | ||
| 269 | } | ||
| 270 | |||
| 271 | if (tc.searchPaths(&fib, sysroot, tc.library_paths.items, name)) |path| { | ||
| 272 | return tc.arena.dupe(u8, path); | ||
| 273 | } | ||
| 274 | |||
| 275 | if (tc.searchPaths(&fib, sysroot, tc.file_paths.items, name)) |path| { | ||
| 276 | return try tc.arena.dupe(u8, path); | ||
| 277 | } | ||
| 278 | |||
| 279 | return name; | ||
| 280 | } | ||
| 281 | |||
| 282 | /// Search a list of `path_prefixes` for the existence `name` | ||
| 283 | /// Assumes that `fba` is a fixed-buffer allocator, so does not free joined path candidates | ||
| 284 | fn searchPaths(tc: *const Toolchain, fib: *std.heap.FixedBufferAllocator, sysroot: []const u8, path_prefixes: []const []const u8, name: []const u8) ?[]const u8 { | ||
| 285 | for (path_prefixes) |path| { | ||
| 286 | fib.reset(); | ||
| 287 | if (path.len == 0) continue; | ||
| 288 | |||
| 289 | const candidate = if (path[0] == '=') | ||
| 290 | std.fs.path.join(fib.allocator(), &.{ sysroot, path[1..], name }) catch continue | ||
| 291 | else | ||
| 292 | std.fs.path.join(fib.allocator(), &.{ path, name }) catch continue; | ||
| 293 | |||
| 294 | if (tc.filesystem.exists(candidate)) { | ||
| 295 | return candidate; | ||
| 296 | } | ||
| 297 | } | ||
| 298 | return null; | ||
| 299 | } | ||
| 300 | |||
| 301 | const PathKind = enum { | ||
| 302 | library, | ||
| 303 | file, | ||
| 304 | program, | ||
| 305 | }; | ||
| 306 | |||
| 307 | /// Join `components` into a path. If the path exists, dupe it into the toolchain arena and | ||
| 308 | /// add it to the specified path list. | ||
| 309 | pub fn addPathIfExists(tc: *Toolchain, components: []const []const u8, dest_kind: PathKind) !void { | ||
| 310 | var path_buf: [std.fs.MAX_PATH_BYTES]u8 = undefined; | ||
| 311 | var fib = std.heap.FixedBufferAllocator.init(&path_buf); | ||
| 312 | |||
| 313 | const candidate = try std.fs.path.join(fib.allocator(), components); | ||
| 314 | |||
| 315 | if (tc.filesystem.exists(candidate)) { | ||
| 316 | const duped = try tc.arena.dupe(u8, candidate); | ||
| 317 | const dest = switch (dest_kind) { | ||
| 318 | .library => &tc.library_paths, | ||
| 319 | .file => &tc.file_paths, | ||
| 320 | .program => &tc.program_paths, | ||
| 321 | }; | ||
| 322 | try dest.append(tc.driver.comp.gpa, duped); | ||
| 323 | } | ||
| 324 | } | ||
| 325 | |||
| 326 | /// Join `components` using the toolchain arena and add the resulting path to `dest_kind`. Does not check | ||
| 327 | /// whether the path actually exists | ||
| 328 | pub fn addPathFromComponents(tc: *Toolchain, components: []const []const u8, dest_kind: PathKind) !void { | ||
| 329 | const full_path = try std.fs.path.join(tc.arena, components); | ||
| 330 | const dest = switch (dest_kind) { | ||
| 331 | .library => &tc.library_paths, | ||
| 332 | .file => &tc.file_paths, | ||
| 333 | .program => &tc.program_paths, | ||
| 334 | }; | ||
| 335 | try dest.append(tc.driver.comp.gpa, full_path); | ||
| 336 | } | ||
| 337 | |||
| 338 | /// Add linker args to `argv`. Does not add path to linker executable as first item; that must be handled separately | ||
| 339 | /// Items added to `argv` will be string literals or owned by `tc.arena` so they must not be individually freed | ||
| 340 | pub fn buildLinkerArgs(tc: *Toolchain, argv: *std.ArrayList([]const u8)) !void { | ||
| 341 | return switch (tc.inner) { | ||
| 342 | .uninitialized => unreachable, | ||
| 343 | .linux => |*linux| linux.buildLinkerArgs(tc, argv), | ||
| 344 | .unknown => @panic("This toolchain does not support linking yet"), | ||
| 345 | }; | ||
| 346 | } | ||
| 347 | |||
| 348 | fn getDefaultRuntimeLibKind(tc: *const Toolchain) RuntimeLibKind { | ||
| 349 | if (tc.getTarget().isAndroid()) { | ||
| 350 | return .compiler_rt; | ||
| 351 | } | ||
| 352 | return .libgcc; | ||
| 353 | } | ||
| 354 | |||
| 355 | pub fn getRuntimeLibKind(tc: *const Toolchain) RuntimeLibKind { | ||
| 356 | const libname = tc.driver.rtlib orelse system_defaults.rtlib; | ||
| 357 | if (mem.eql(u8, libname, "compiler-rt")) | ||
| 358 | return .compiler_rt | ||
| 359 | else if (mem.eql(u8, libname, "libgcc")) | ||
| 360 | return .libgcc | ||
| 361 | else | ||
| 362 | return tc.getDefaultRuntimeLibKind(); | ||
| 363 | } | ||
| 364 | |||
| 365 | /// TODO | ||
| 366 | pub fn getCompilerRt(tc: *const Toolchain, component: []const u8, file_kind: FileKind) ![]const u8 { | ||
| 367 | _ = file_kind; | ||
| 368 | _ = component; | ||
| 369 | _ = tc; | ||
| 370 | return ""; | ||
| 371 | } | ||
| 372 | |||
| 373 | fn getLibGCCKind(tc: *const Toolchain) LibGCCKind { | ||
| 374 | const target = tc.getTarget(); | ||
| 375 | if (tc.driver.static_libgcc or tc.driver.static or tc.driver.static_pie or target.isAndroid()) { | ||
| 376 | return .static; | ||
| 377 | } | ||
| 378 | if (tc.driver.shared_libgcc) { | ||
| 379 | return .shared; | ||
| 380 | } | ||
| 381 | return .unspecified; | ||
| 382 | } | ||
| 383 | |||
| 384 | fn getUnwindLibKind(tc: *const Toolchain) !UnwindLibKind { | ||
| 385 | const libname = tc.driver.unwindlib orelse system_defaults.unwindlib; | ||
| 386 | if (libname.len == 0 or mem.eql(u8, libname, "platform")) { | ||
| 387 | switch (tc.getRuntimeLibKind()) { | ||
| 388 | .compiler_rt => { | ||
| 389 | const target = tc.getTarget(); | ||
| 390 | if (target.isAndroid() or target.os.tag == .aix) { | ||
| 391 | return .compiler_rt; | ||
| 392 | } else { | ||
| 393 | return .none; | ||
| 394 | } | ||
| 395 | }, | ||
| 396 | .libgcc => return .libgcc, | ||
| 397 | } | ||
| 398 | } else if (mem.eql(u8, libname, "none")) { | ||
| 399 | return .none; | ||
| 400 | } else if (mem.eql(u8, libname, "libgcc")) { | ||
| 401 | return .libgcc; | ||
| 402 | } else if (mem.eql(u8, libname, "libunwind")) { | ||
| 403 | if (tc.getRuntimeLibKind() == .libgcc) { | ||
| 404 | try tc.driver.comp.addDiagnostic(.{ .tag = .incompatible_unwindlib }, &.{}); | ||
| 405 | } | ||
| 406 | return .compiler_rt; | ||
| 407 | } else { | ||
| 408 | unreachable; | ||
| 409 | } | ||
| 410 | } | ||
| 411 | |||
| 412 | fn getAsNeededOption(is_solaris: bool, needed: bool) []const u8 { | ||
| 413 | if (is_solaris) { | ||
| 414 | return if (needed) "-zignore" else "-zrecord"; | ||
| 415 | } else { | ||
| 416 | return if (needed) "--as-needed" else "--no-as-needed"; | ||
| 417 | } | ||
| 418 | } | ||
| 419 | |||
| 420 | fn addUnwindLibrary(tc: *const Toolchain, argv: *std.ArrayList([]const u8)) !void { | ||
| 421 | const unw = try tc.getUnwindLibKind(); | ||
| 422 | const target = tc.getTarget(); | ||
| 423 | if ((target.isAndroid() and unw == .libgcc) or | ||
| 424 | target.os.tag == .elfiamcu or | ||
| 425 | target.ofmt == .wasm or | ||
| 426 | target_util.isWindowsMSVCEnvironment(target) or | ||
| 427 | unw == .none) return; | ||
| 428 | |||
| 429 | const lgk = tc.getLibGCCKind(); | ||
| 430 | const as_needed = lgk == .unspecified and !target.isAndroid() and !target_util.isCygwinMinGW(target) and target.os.tag != .aix; | ||
| 431 | if (as_needed) { | ||
| 432 | try argv.append(getAsNeededOption(target.os.tag == .solaris, true)); | ||
| 433 | } | ||
| 434 | switch (unw) { | ||
| 435 | .none => return, | ||
| 436 | .libgcc => if (lgk == .static) try argv.append("-lgcc_eh") else try argv.append("-lgcc_s"), | ||
| 437 | .compiler_rt => if (target.os.tag == .aix) { | ||
| 438 | if (lgk != .static) { | ||
| 439 | try argv.append("-lunwind"); | ||
| 440 | } | ||
| 441 | } else if (lgk == .static) { | ||
| 442 | try argv.append("-l:libunwind.a"); | ||
| 443 | } else if (lgk == .shared) { | ||
| 444 | if (target_util.isCygwinMinGW(target)) { | ||
| 445 | try argv.append("-l:libunwind.dll.a"); | ||
| 446 | } else { | ||
| 447 | try argv.append("-l:libunwind.so"); | ||
| 448 | } | ||
| 449 | } else { | ||
| 450 | try argv.append("-lunwind"); | ||
| 451 | }, | ||
| 452 | } | ||
| 453 | |||
| 454 | if (as_needed) { | ||
| 455 | try argv.append(getAsNeededOption(target.os.tag == .solaris, false)); | ||
| 456 | } | ||
| 457 | } | ||
| 458 | |||
| 459 | fn addLibGCC(tc: *const Toolchain, argv: *std.ArrayList([]const u8)) !void { | ||
| 460 | const libgcc_kind = tc.getLibGCCKind(); | ||
| 461 | if (libgcc_kind == .static or libgcc_kind == .unspecified) { | ||
| 462 | try argv.append("-lgcc"); | ||
| 463 | } | ||
| 464 | try tc.addUnwindLibrary(argv); | ||
| 465 | if (libgcc_kind == .shared) { | ||
| 466 | try argv.append("-lgcc"); | ||
| 467 | } | ||
| 468 | } | ||
| 469 | |||
| 470 | pub fn addRuntimeLibs(tc: *const Toolchain, argv: *std.ArrayList([]const u8)) !void { | ||
| 471 | const target = tc.getTarget(); | ||
| 472 | const rlt = tc.getRuntimeLibKind(); | ||
| 473 | switch (rlt) { | ||
| 474 | .compiler_rt => { | ||
| 475 | // TODO | ||
| 476 | }, | ||
| 477 | .libgcc => { | ||
| 478 | if (target_util.isKnownWindowsMSVCEnvironment(target)) { | ||
| 479 | const rtlib_str = tc.driver.rtlib orelse system_defaults.rtlib; | ||
| 480 | if (!mem.eql(u8, rtlib_str, "platform")) { | ||
| 481 | try tc.driver.comp.addDiagnostic(.{ .tag = .unsupported_rtlib_gcc, .extra = .{ .str = "MSVC" } }, &.{}); | ||
| 482 | } | ||
| 483 | } else { | ||
| 484 | try tc.addLibGCC(argv); | ||
| 485 | } | ||
| 486 | }, | ||
| 487 | } | ||
| 488 | |||
| 489 | if (target.isAndroid() and !tc.driver.static and !tc.driver.static_pie) { | ||
| 490 | try argv.append("-ldl"); | ||
| 491 | } | ||
| 492 | } | ||
deps/aro/aro/Tree.zig created+1331| ... | @@ -0,0 +1,1331 @@ | ||
| 1 | const std = @import("std"); | ||
| 2 | const Interner = @import("backend").Interner; | ||
| 3 | const Type = @import("Type.zig"); | ||
| 4 | const Tokenizer = @import("Tokenizer.zig"); | ||
| 5 | const CodeGen = @import("CodeGen.zig"); | ||
| 6 | const Compilation = @import("Compilation.zig"); | ||
| 7 | const Source = @import("Source.zig"); | ||
| 8 | const Attribute = @import("Attribute.zig"); | ||
| 9 | const Value = @import("Value.zig"); | ||
| 10 | const StringInterner = @import("StringInterner.zig"); | ||
| 11 | |||
| 12 | pub const Token = struct { | ||
| 13 | id: Id, | ||
| 14 | flags: packed struct { | ||
| 15 | expansion_disabled: bool = false, | ||
| 16 | is_macro_arg: bool = false, | ||
| 17 | } = .{}, | ||
| 18 | /// This location contains the actual token slice which might be generated. | ||
| 19 | /// If it is generated then there is guaranteed to be at least one | ||
| 20 | /// expansion location. | ||
| 21 | loc: Source.Location, | ||
| 22 | expansion_locs: ?[*]Source.Location = null, | ||
| 23 | |||
| 24 | pub fn expansionSlice(tok: Token) []const Source.Location { | ||
| 25 | const locs = tok.expansion_locs orelse return &[0]Source.Location{}; | ||
| 26 | var i: usize = 0; | ||
| 27 | while (locs[i].id != .unused) : (i += 1) {} | ||
| 28 | return locs[0..i]; | ||
| 29 | } | ||
| 30 | |||
| 31 | pub fn addExpansionLocation(tok: *Token, gpa: std.mem.Allocator, new: []const Source.Location) !void { | ||
| 32 | if (new.len == 0 or tok.id == .whitespace) return; | ||
| 33 | var list = std.ArrayList(Source.Location).init(gpa); | ||
| 34 | defer { | ||
| 35 | @memset(list.items.ptr[list.items.len..list.capacity], .{}); | ||
| 36 | // Add a sentinel to indicate the end of the list since | ||
| 37 | // the ArrayList's capacity isn't guaranteed to be exactly | ||
| 38 | // what we ask for. | ||
| 39 | if (list.capacity > 0) { | ||
| 40 | list.items.ptr[list.capacity - 1].byte_offset = 1; | ||
| 41 | } | ||
| 42 | tok.expansion_locs = list.items.ptr; | ||
| 43 | } | ||
| 44 | |||
| 45 | if (tok.expansion_locs) |locs| { | ||
| 46 | var i: usize = 0; | ||
| 47 | while (locs[i].id != .unused) : (i += 1) {} | ||
| 48 | list.items = locs[0..i]; | ||
| 49 | while (locs[i].byte_offset != 1) : (i += 1) {} | ||
| 50 | list.capacity = i + 1; | ||
| 51 | } | ||
| 52 | |||
| 53 | const min_len = @max(list.items.len + new.len + 1, 4); | ||
| 54 | const wanted_len = std.math.ceilPowerOfTwo(usize, min_len) catch | ||
| 55 | return error.OutOfMemory; | ||
| 56 | try list.ensureTotalCapacity(wanted_len); | ||
| 57 | |||
| 58 | for (new) |new_loc| { | ||
| 59 | if (new_loc.id == .generated) continue; | ||
| 60 | list.appendAssumeCapacity(new_loc); | ||
| 61 | } | ||
| 62 | } | ||
| 63 | |||
| 64 | pub fn free(expansion_locs: ?[*]Source.Location, gpa: std.mem.Allocator) void { | ||
| 65 | const locs = expansion_locs orelse return; | ||
| 66 | var i: usize = 0; | ||
| 67 | while (locs[i].id != .unused) : (i += 1) {} | ||
| 68 | while (locs[i].byte_offset != 1) : (i += 1) {} | ||
| 69 | gpa.free(locs[0 .. i + 1]); | ||
| 70 | } | ||
| 71 | |||
| 72 | pub fn dupe(tok: Token, gpa: std.mem.Allocator) !Token { | ||
| 73 | var copy = tok; | ||
| 74 | copy.expansion_locs = null; | ||
| 75 | try copy.addExpansionLocation(gpa, tok.expansionSlice()); | ||
| 76 | return copy; | ||
| 77 | } | ||
| 78 | |||
| 79 | pub fn checkMsEof(tok: Token, source: Source, comp: *Compilation) !void { | ||
| 80 | std.debug.assert(tok.id == .eof); | ||
| 81 | if (source.buf.len > tok.loc.byte_offset and source.buf[tok.loc.byte_offset] == 0x1A) { | ||
| 82 | try comp.addDiagnostic(.{ | ||
| 83 | .tag = .ctrl_z_eof, | ||
| 84 | .loc = .{ | ||
| 85 | .id = source.id, | ||
| 86 | .byte_offset = tok.loc.byte_offset, | ||
| 87 | .line = tok.loc.line, | ||
| 88 | }, | ||
| 89 | }, &.{}); | ||
| 90 | } | ||
| 91 | } | ||
| 92 | |||
| 93 | pub const List = std.MultiArrayList(Token); | ||
| 94 | pub const Id = Tokenizer.Token.Id; | ||
| 95 | }; | ||
| 96 | |||
| 97 | pub const TokenIndex = u32; | ||
| 98 | pub const NodeIndex = enum(u32) { none, _ }; | ||
| 99 | pub const ValueMap = std.AutoHashMap(NodeIndex, Value); | ||
| 100 | |||
| 101 | const Tree = @This(); | ||
| 102 | |||
| 103 | comp: *Compilation, | ||
| 104 | arena: std.heap.ArenaAllocator, | ||
| 105 | generated: []const u8, | ||
| 106 | tokens: Token.List.Slice, | ||
| 107 | nodes: Node.List.Slice, | ||
| 108 | data: []const NodeIndex, | ||
| 109 | root_decls: []const NodeIndex, | ||
| 110 | value_map: ValueMap, | ||
| 111 | |||
| 112 | pub const genIr = CodeGen.genIr; | ||
| 113 | |||
| 114 | pub fn deinit(tree: *Tree) void { | ||
| 115 | tree.comp.gpa.free(tree.root_decls); | ||
| 116 | tree.comp.gpa.free(tree.data); | ||
| 117 | tree.nodes.deinit(tree.comp.gpa); | ||
| 118 | tree.arena.deinit(); | ||
| 119 | tree.value_map.deinit(); | ||
| 120 | } | ||
| 121 | |||
| 122 | pub const GNUAssemblyQualifiers = struct { | ||
| 123 | @"volatile": bool = false, | ||
| 124 | @"inline": bool = false, | ||
| 125 | goto: bool = false, | ||
| 126 | }; | ||
| 127 | |||
| 128 | pub const Node = struct { | ||
| 129 | tag: Tag, | ||
| 130 | ty: Type = .{ .specifier = .void }, | ||
| 131 | data: Data, | ||
| 132 | |||
| 133 | pub const Range = struct { start: u32, end: u32 }; | ||
| 134 | |||
| 135 | pub const Data = union { | ||
| 136 | decl: struct { | ||
| 137 | name: TokenIndex, | ||
| 138 | node: NodeIndex = .none, | ||
| 139 | }, | ||
| 140 | decl_ref: TokenIndex, | ||
| 141 | range: Range, | ||
| 142 | if3: struct { | ||
| 143 | cond: NodeIndex, | ||
| 144 | body: u32, | ||
| 145 | }, | ||
| 146 | un: NodeIndex, | ||
| 147 | bin: struct { | ||
| 148 | lhs: NodeIndex, | ||
| 149 | rhs: NodeIndex, | ||
| 150 | }, | ||
| 151 | member: struct { | ||
| 152 | lhs: NodeIndex, | ||
| 153 | index: u32, | ||
| 154 | }, | ||
| 155 | union_init: struct { | ||
| 156 | field_index: u32, | ||
| 157 | node: NodeIndex, | ||
| 158 | }, | ||
| 159 | cast: struct { | ||
| 160 | operand: NodeIndex, | ||
| 161 | kind: CastKind, | ||
| 162 | }, | ||
| 163 | int: u64, | ||
| 164 | return_zero: bool, | ||
| 165 | |||
| 166 | pub fn forDecl(data: Data, tree: *const Tree) struct { | ||
| 167 | decls: []const NodeIndex, | ||
| 168 | cond: NodeIndex, | ||
| 169 | incr: NodeIndex, | ||
| 170 | body: NodeIndex, | ||
| 171 | } { | ||
| 172 | const items = tree.data[data.range.start..data.range.end]; | ||
| 173 | const decls = items[0 .. items.len - 3]; | ||
| 174 | |||
| 175 | return .{ | ||
| 176 | .decls = decls, | ||
| 177 | .cond = items[items.len - 3], | ||
| 178 | .incr = items[items.len - 2], | ||
| 179 | .body = items[items.len - 1], | ||
| 180 | }; | ||
| 181 | } | ||
| 182 | |||
| 183 | pub fn forStmt(data: Data, tree: *const Tree) struct { | ||
| 184 | init: NodeIndex, | ||
| 185 | cond: NodeIndex, | ||
| 186 | incr: NodeIndex, | ||
| 187 | body: NodeIndex, | ||
| 188 | } { | ||
| 189 | const items = tree.data[data.if3.body..]; | ||
| 190 | |||
| 191 | return .{ | ||
| 192 | .init = items[0], | ||
| 193 | .cond = items[1], | ||
| 194 | .incr = items[2], | ||
| 195 | .body = data.if3.cond, | ||
| 196 | }; | ||
| 197 | } | ||
| 198 | }; | ||
| 199 | |||
| 200 | pub const List = std.MultiArrayList(Node); | ||
| 201 | }; | ||
| 202 | |||
| 203 | pub const CastKind = enum(u8) { | ||
| 204 | /// Does nothing except possibly add qualifiers | ||
| 205 | no_op, | ||
| 206 | /// Interpret one bit pattern as another. Used for operands which have the same | ||
| 207 | /// size and unrelated types, e.g. casting one pointer type to another | ||
| 208 | bitcast, | ||
| 209 | /// Convert T[] to T * | ||
| 210 | array_to_pointer, | ||
| 211 | /// Converts an lvalue to an rvalue | ||
| 212 | lval_to_rval, | ||
| 213 | /// Convert a function type to a pointer to a function | ||
| 214 | function_to_pointer, | ||
| 215 | /// Convert a pointer type to a _Bool | ||
| 216 | pointer_to_bool, | ||
| 217 | /// Convert a pointer type to an integer type | ||
| 218 | pointer_to_int, | ||
| 219 | /// Convert _Bool to an integer type | ||
| 220 | bool_to_int, | ||
| 221 | /// Convert _Bool to a floating type | ||
| 222 | bool_to_float, | ||
| 223 | /// Convert a _Bool to a pointer; will cause a warning | ||
| 224 | bool_to_pointer, | ||
| 225 | /// Convert an integer type to _Bool | ||
| 226 | int_to_bool, | ||
| 227 | /// Convert an integer to a floating type | ||
| 228 | int_to_float, | ||
| 229 | /// Convert a complex integer to a complex floating type | ||
| 230 | complex_int_to_complex_float, | ||
| 231 | /// Convert an integer type to a pointer type | ||
| 232 | int_to_pointer, | ||
| 233 | /// Convert a floating type to a _Bool | ||
| 234 | float_to_bool, | ||
| 235 | /// Convert a floating type to an integer | ||
| 236 | float_to_int, | ||
| 237 | /// Convert a complex floating type to a complex integer | ||
| 238 | complex_float_to_complex_int, | ||
| 239 | /// Convert one integer type to another | ||
| 240 | int_cast, | ||
| 241 | /// Convert one complex integer type to another | ||
| 242 | complex_int_cast, | ||
| 243 | /// Convert real part of complex integer to a integer | ||
| 244 | complex_int_to_real, | ||
| 245 | /// Create a complex integer type using operand as the real part | ||
| 246 | real_to_complex_int, | ||
| 247 | /// Convert one floating type to another | ||
| 248 | float_cast, | ||
| 249 | /// Convert one complex floating type to another | ||
| 250 | complex_float_cast, | ||
| 251 | /// Convert real part of complex float to a float | ||
| 252 | complex_float_to_real, | ||
| 253 | /// Create a complex floating type using operand as the real part | ||
| 254 | real_to_complex_float, | ||
| 255 | /// Convert type to void | ||
| 256 | to_void, | ||
| 257 | /// Convert a literal 0 to a null pointer | ||
| 258 | null_to_pointer, | ||
| 259 | /// GNU cast-to-union extension | ||
| 260 | union_cast, | ||
| 261 | /// Create vector where each value is same as the input scalar. | ||
| 262 | vector_splat, | ||
| 263 | }; | ||
| 264 | |||
| 265 | pub const Tag = enum(u8) { | ||
| 266 | /// Must appear at index 0. Also used as the tag for __builtin_types_compatible_p arguments, since the arguments are types | ||
| 267 | /// Reaching it is always the result of a bug. | ||
| 268 | invalid, | ||
| 269 | |||
| 270 | // ====== Decl ====== | ||
| 271 | |||
| 272 | // _Static_assert | ||
| 273 | static_assert, | ||
| 274 | |||
| 275 | // function prototype | ||
| 276 | fn_proto, | ||
| 277 | static_fn_proto, | ||
| 278 | inline_fn_proto, | ||
| 279 | inline_static_fn_proto, | ||
| 280 | |||
| 281 | // function definition | ||
| 282 | fn_def, | ||
| 283 | static_fn_def, | ||
| 284 | inline_fn_def, | ||
| 285 | inline_static_fn_def, | ||
| 286 | |||
| 287 | // variable declaration | ||
| 288 | @"var", | ||
| 289 | extern_var, | ||
| 290 | static_var, | ||
| 291 | // same as static_var, used for __func__, __FUNCTION__ and __PRETTY_FUNCTION__ | ||
| 292 | implicit_static_var, | ||
| 293 | threadlocal_var, | ||
| 294 | threadlocal_extern_var, | ||
| 295 | threadlocal_static_var, | ||
| 296 | |||
| 297 | /// __asm__("...") at file scope | ||
| 298 | file_scope_asm, | ||
| 299 | |||
| 300 | // typedef declaration | ||
| 301 | typedef, | ||
| 302 | |||
| 303 | // container declarations | ||
| 304 | /// { lhs; rhs; } | ||
| 305 | struct_decl_two, | ||
| 306 | /// { lhs; rhs; } | ||
| 307 | union_decl_two, | ||
| 308 | /// { lhs, rhs, } | ||
| 309 | enum_decl_two, | ||
| 310 | /// { range } | ||
| 311 | struct_decl, | ||
| 312 | /// { range } | ||
| 313 | union_decl, | ||
| 314 | /// { range } | ||
| 315 | enum_decl, | ||
| 316 | /// struct decl_ref; | ||
| 317 | struct_forward_decl, | ||
| 318 | /// union decl_ref; | ||
| 319 | union_forward_decl, | ||
| 320 | /// enum decl_ref; | ||
| 321 | enum_forward_decl, | ||
| 322 | |||
| 323 | /// name = node | ||
| 324 | enum_field_decl, | ||
| 325 | /// ty name : node | ||
| 326 | /// name == 0 means unnamed | ||
| 327 | record_field_decl, | ||
| 328 | /// Used when a record has an unnamed record as a field | ||
| 329 | indirect_record_field_decl, | ||
| 330 | |||
| 331 | // ====== Stmt ====== | ||
| 332 | |||
| 333 | labeled_stmt, | ||
| 334 | /// { first; second; } first and second may be null | ||
| 335 | compound_stmt_two, | ||
| 336 | /// { data } | ||
| 337 | compound_stmt, | ||
| 338 | /// if (first) data[second] else data[second+1]; | ||
| 339 | if_then_else_stmt, | ||
| 340 | /// if (first) second; second may be null | ||
| 341 | if_then_stmt, | ||
| 342 | /// switch (first) second | ||
| 343 | switch_stmt, | ||
| 344 | /// case first: second | ||
| 345 | case_stmt, | ||
| 346 | /// case data[body]...data[body+1]: cond | ||
| 347 | case_range_stmt, | ||
| 348 | /// default: first | ||
| 349 | default_stmt, | ||
| 350 | /// while (first) second | ||
| 351 | while_stmt, | ||
| 352 | /// do second while(first); | ||
| 353 | do_while_stmt, | ||
| 354 | /// for (data[..]; data[len-3]; data[len-2]) data[len-1] | ||
| 355 | for_decl_stmt, | ||
| 356 | /// for (;;;) first | ||
| 357 | forever_stmt, | ||
| 358 | /// for (data[first]; data[first+1]; data[first+2]) second | ||
| 359 | for_stmt, | ||
| 360 | /// goto first; | ||
| 361 | goto_stmt, | ||
| 362 | /// goto *un; | ||
| 363 | computed_goto_stmt, | ||
| 364 | // continue; first and second unused | ||
| 365 | continue_stmt, | ||
| 366 | // break; first and second unused | ||
| 367 | break_stmt, | ||
| 368 | // null statement (just a semicolon); first and second unused | ||
| 369 | null_stmt, | ||
| 370 | /// return first; first may be null | ||
| 371 | return_stmt, | ||
| 372 | /// Assembly statement of the form __asm__("string literal") | ||
| 373 | gnu_asm_simple, | ||
| 374 | |||
| 375 | // ====== Expr ====== | ||
| 376 | |||
| 377 | /// lhs , rhs | ||
| 378 | comma_expr, | ||
| 379 | /// lhs ? data[0] : data[1] | ||
| 380 | binary_cond_expr, | ||
| 381 | /// Used as the base for casts of the lhs in `binary_cond_expr`. | ||
| 382 | cond_dummy_expr, | ||
| 383 | /// lhs ? data[0] : data[1] | ||
| 384 | cond_expr, | ||
| 385 | /// lhs = rhs | ||
| 386 | assign_expr, | ||
| 387 | /// lhs *= rhs | ||
| 388 | mul_assign_expr, | ||
| 389 | /// lhs /= rhs | ||
| 390 | div_assign_expr, | ||
| 391 | /// lhs %= rhs | ||
| 392 | mod_assign_expr, | ||
| 393 | /// lhs += rhs | ||
| 394 | add_assign_expr, | ||
| 395 | /// lhs -= rhs | ||
| 396 | sub_assign_expr, | ||
| 397 | /// lhs <<= rhs | ||
| 398 | shl_assign_expr, | ||
| 399 | /// lhs >>= rhs | ||
| 400 | shr_assign_expr, | ||
| 401 | /// lhs &= rhs | ||
| 402 | bit_and_assign_expr, | ||
| 403 | /// lhs ^= rhs | ||
| 404 | bit_xor_assign_expr, | ||
| 405 | /// lhs |= rhs | ||
| 406 | bit_or_assign_expr, | ||
| 407 | /// lhs || rhs | ||
| 408 | bool_or_expr, | ||
| 409 | /// lhs && rhs | ||
| 410 | bool_and_expr, | ||
| 411 | /// lhs | rhs | ||
| 412 | bit_or_expr, | ||
| 413 | /// lhs ^ rhs | ||
| 414 | bit_xor_expr, | ||
| 415 | /// lhs & rhs | ||
| 416 | bit_and_expr, | ||
| 417 | /// lhs == rhs | ||
| 418 | equal_expr, | ||
| 419 | /// lhs != rhs | ||
| 420 | not_equal_expr, | ||
| 421 | /// lhs < rhs | ||
| 422 | less_than_expr, | ||
| 423 | /// lhs <= rhs | ||
| 424 | less_than_equal_expr, | ||
| 425 | /// lhs > rhs | ||
| 426 | greater_than_expr, | ||
| 427 | /// lhs >= rhs | ||
| 428 | greater_than_equal_expr, | ||
| 429 | /// lhs << rhs | ||
| 430 | shl_expr, | ||
| 431 | /// lhs >> rhs | ||
| 432 | shr_expr, | ||
| 433 | /// lhs + rhs | ||
| 434 | add_expr, | ||
| 435 | /// lhs - rhs | ||
| 436 | sub_expr, | ||
| 437 | /// lhs * rhs | ||
| 438 | mul_expr, | ||
| 439 | /// lhs / rhs | ||
| 440 | div_expr, | ||
| 441 | /// lhs % rhs | ||
| 442 | mod_expr, | ||
| 443 | /// Explicit: (type) cast | ||
| 444 | explicit_cast, | ||
| 445 | /// Implicit: cast | ||
| 446 | implicit_cast, | ||
| 447 | /// &un | ||
| 448 | addr_of_expr, | ||
| 449 | /// &&decl_ref | ||
| 450 | addr_of_label, | ||
| 451 | /// *un | ||
| 452 | deref_expr, | ||
| 453 | /// +un | ||
| 454 | plus_expr, | ||
| 455 | /// -un | ||
| 456 | negate_expr, | ||
| 457 | /// ~un | ||
| 458 | bit_not_expr, | ||
| 459 | /// !un | ||
| 460 | bool_not_expr, | ||
| 461 | /// ++un | ||
| 462 | pre_inc_expr, | ||
| 463 | /// --un | ||
| 464 | pre_dec_expr, | ||
| 465 | /// __imag un | ||
| 466 | imag_expr, | ||
| 467 | /// __real un | ||
| 468 | real_expr, | ||
| 469 | /// lhs[rhs] lhs is pointer/array type, rhs is integer type | ||
| 470 | array_access_expr, | ||
| 471 | /// first(second) second may be 0 | ||
| 472 | call_expr_one, | ||
| 473 | /// data[0](data[1..]) | ||
| 474 | call_expr, | ||
| 475 | /// decl | ||
| 476 | builtin_call_expr_one, | ||
| 477 | builtin_call_expr, | ||
| 478 | /// lhs.member | ||
| 479 | member_access_expr, | ||
| 480 | /// lhs->member | ||
| 481 | member_access_ptr_expr, | ||
| 482 | /// un++ | ||
| 483 | post_inc_expr, | ||
| 484 | /// un-- | ||
| 485 | post_dec_expr, | ||
| 486 | /// (un) | ||
| 487 | paren_expr, | ||
| 488 | /// decl_ref | ||
| 489 | decl_ref_expr, | ||
| 490 | /// decl_ref | ||
| 491 | enumeration_ref, | ||
| 492 | /// C23 bool literal `true` / `false` | ||
| 493 | bool_literal, | ||
| 494 | /// C23 nullptr literal | ||
| 495 | nullptr_literal, | ||
| 496 | /// integer literal, always unsigned | ||
| 497 | int_literal, | ||
| 498 | /// Same as int_literal, but originates from a char literal | ||
| 499 | char_literal, | ||
| 500 | /// a floating point literal | ||
| 501 | float_literal, | ||
| 502 | /// wraps a float or double literal: un | ||
| 503 | imaginary_literal, | ||
| 504 | /// tree.str[index..][0..len] | ||
| 505 | string_literal_expr, | ||
| 506 | /// sizeof(un?) | ||
| 507 | sizeof_expr, | ||
| 508 | /// _Alignof(un?) | ||
| 509 | alignof_expr, | ||
| 510 | /// _Generic(controlling lhs, chosen rhs) | ||
| 511 | generic_expr_one, | ||
| 512 | /// _Generic(controlling range[0], chosen range[1], rest range[2..]) | ||
| 513 | generic_expr, | ||
| 514 | /// ty: un | ||
| 515 | generic_association_expr, | ||
| 516 | // default: un | ||
| 517 | generic_default_expr, | ||
| 518 | /// __builtin_choose_expr(lhs, data[0], data[1]) | ||
| 519 | builtin_choose_expr, | ||
| 520 | /// __builtin_types_compatible_p(lhs, rhs) | ||
| 521 | builtin_types_compatible_p, | ||
| 522 | /// decl - special builtins require custom parsing | ||
| 523 | special_builtin_call_one, | ||
| 524 | /// ({ un }) | ||
| 525 | stmt_expr, | ||
| 526 | |||
| 527 | // ====== Initializer expressions ====== | ||
| 528 | |||
| 529 | /// { lhs, rhs } | ||
| 530 | array_init_expr_two, | ||
| 531 | /// { range } | ||
| 532 | array_init_expr, | ||
| 533 | /// { lhs, rhs } | ||
| 534 | struct_init_expr_two, | ||
| 535 | /// { range } | ||
| 536 | struct_init_expr, | ||
| 537 | /// { union_init } | ||
| 538 | union_init_expr, | ||
| 539 | /// (ty){ un } | ||
| 540 | compound_literal_expr, | ||
| 541 | /// (static ty){ un } | ||
| 542 | static_compound_literal_expr, | ||
| 543 | /// (thread_local ty){ un } | ||
| 544 | thread_local_compound_literal_expr, | ||
| 545 | /// (static thread_local ty){ un } | ||
| 546 | static_thread_local_compound_literal_expr, | ||
| 547 | |||
| 548 | /// Inserted at the end of a function body if no return stmt is found. | ||
| 549 | /// ty is the functions return type | ||
| 550 | /// data is return_zero which is true if the function is called "main" and ty is compatible with int | ||
| 551 | implicit_return, | ||
| 552 | |||
| 553 | /// Inserted in array_init_expr to represent unspecified elements. | ||
| 554 | /// data.int contains the amount of elements. | ||
| 555 | array_filler_expr, | ||
| 556 | /// Inserted in record and scalar initializers for unspecified elements. | ||
| 557 | default_init_expr, | ||
| 558 | |||
| 559 | pub fn isImplicit(tag: Tag) bool { | ||
| 560 | return switch (tag) { | ||
| 561 | .implicit_cast, | ||
| 562 | .implicit_return, | ||
| 563 | .array_filler_expr, | ||
| 564 | .default_init_expr, | ||
| 565 | .implicit_static_var, | ||
| 566 | .cond_dummy_expr, | ||
| 567 | => true, | ||
| 568 | else => false, | ||
| 569 | }; | ||
| 570 | } | ||
| 571 | }; | ||
| 572 | |||
| 573 | pub fn isBitfield(tree: *const Tree, node: NodeIndex) bool { | ||
| 574 | return tree.bitfieldWidth(node, false) != null; | ||
| 575 | } | ||
| 576 | |||
| 577 | /// Returns null if node is not a bitfield. If inspect_lval is true, this function will | ||
| 578 | /// recurse into implicit lval_to_rval casts (useful for arithmetic conversions) | ||
| 579 | pub fn bitfieldWidth(tree: *const Tree, node: NodeIndex, inspect_lval: bool) ?u32 { | ||
| 580 | if (node == .none) return null; | ||
| 581 | switch (tree.nodes.items(.tag)[@intFromEnum(node)]) { | ||
| 582 | .member_access_expr, .member_access_ptr_expr => { | ||
| 583 | const member = tree.nodes.items(.data)[@intFromEnum(node)].member; | ||
| 584 | var ty = tree.nodes.items(.ty)[@intFromEnum(member.lhs)]; | ||
| 585 | if (ty.isPtr()) ty = ty.elemType(); | ||
| 586 | const record_ty = ty.get(.@"struct") orelse ty.get(.@"union") orelse return null; | ||
| 587 | const field = record_ty.data.record.fields[member.index]; | ||
| 588 | return field.bit_width; | ||
| 589 | }, | ||
| 590 | .implicit_cast => { | ||
| 591 | if (!inspect_lval) return null; | ||
| 592 | |||
| 593 | const data = tree.nodes.items(.data)[@intFromEnum(node)]; | ||
| 594 | return switch (data.cast.kind) { | ||
| 595 | .lval_to_rval => tree.bitfieldWidth(data.cast.operand, false), | ||
| 596 | else => null, | ||
| 597 | }; | ||
| 598 | }, | ||
| 599 | else => return null, | ||
| 600 | } | ||
| 601 | } | ||
| 602 | |||
| 603 | pub fn isLval(tree: *const Tree, node: NodeIndex) bool { | ||
| 604 | var is_const: bool = undefined; | ||
| 605 | return tree.isLvalExtra(node, &is_const); | ||
| 606 | } | ||
| 607 | |||
| 608 | pub fn isLvalExtra(tree: *const Tree, node: NodeIndex, is_const: *bool) bool { | ||
| 609 | is_const.* = false; | ||
| 610 | switch (tree.nodes.items(.tag)[@intFromEnum(node)]) { | ||
| 611 | .compound_literal_expr, | ||
| 612 | .static_compound_literal_expr, | ||
| 613 | .thread_local_compound_literal_expr, | ||
| 614 | .static_thread_local_compound_literal_expr, | ||
| 615 | => { | ||
| 616 | is_const.* = tree.nodes.items(.ty)[@intFromEnum(node)].isConst(); | ||
| 617 | return true; | ||
| 618 | }, | ||
| 619 | .string_literal_expr => return true, | ||
| 620 | .member_access_ptr_expr => { | ||
| 621 | const lhs_expr = tree.nodes.items(.data)[@intFromEnum(node)].member.lhs; | ||
| 622 | const ptr_ty = tree.nodes.items(.ty)[@intFromEnum(lhs_expr)]; | ||
| 623 | if (ptr_ty.isPtr()) is_const.* = ptr_ty.elemType().isConst(); | ||
| 624 | return true; | ||
| 625 | }, | ||
| 626 | .array_access_expr => { | ||
| 627 | const lhs_expr = tree.nodes.items(.data)[@intFromEnum(node)].bin.lhs; | ||
| 628 | if (lhs_expr != .none) { | ||
| 629 | const array_ty = tree.nodes.items(.ty)[@intFromEnum(lhs_expr)]; | ||
| 630 | if (array_ty.isPtr() or array_ty.isArray()) is_const.* = array_ty.elemType().isConst(); | ||
| 631 | } | ||
| 632 | return true; | ||
| 633 | }, | ||
| 634 | .decl_ref_expr => { | ||
| 635 | const decl_ty = tree.nodes.items(.ty)[@intFromEnum(node)]; | ||
| 636 | is_const.* = decl_ty.isConst(); | ||
| 637 | return true; | ||
| 638 | }, | ||
| 639 | .deref_expr => { | ||
| 640 | const data = tree.nodes.items(.data)[@intFromEnum(node)]; | ||
| 641 | const operand_ty = tree.nodes.items(.ty)[@intFromEnum(data.un)]; | ||
| 642 | if (operand_ty.isFunc()) return false; | ||
| 643 | if (operand_ty.isPtr() or operand_ty.isArray()) is_const.* = operand_ty.elemType().isConst(); | ||
| 644 | return true; | ||
| 645 | }, | ||
| 646 | .member_access_expr => { | ||
| 647 | const data = tree.nodes.items(.data)[@intFromEnum(node)]; | ||
| 648 | return tree.isLvalExtra(data.member.lhs, is_const); | ||
| 649 | }, | ||
| 650 | .paren_expr => { | ||
| 651 | const data = tree.nodes.items(.data)[@intFromEnum(node)]; | ||
| 652 | return tree.isLvalExtra(data.un, is_const); | ||
| 653 | }, | ||
| 654 | .builtin_choose_expr => { | ||
| 655 | const data = tree.nodes.items(.data)[@intFromEnum(node)]; | ||
| 656 | |||
| 657 | if (tree.value_map.get(data.if3.cond)) |val| { | ||
| 658 | const offset = @intFromBool(val.isZero(tree.comp)); | ||
| 659 | return tree.isLvalExtra(tree.data[data.if3.body + offset], is_const); | ||
| 660 | } | ||
| 661 | return false; | ||
| 662 | }, | ||
| 663 | else => return false, | ||
| 664 | } | ||
| 665 | } | ||
| 666 | |||
| 667 | pub fn tokSlice(tree: *const Tree, tok_i: TokenIndex) []const u8 { | ||
| 668 | if (tree.tokens.items(.id)[tok_i].lexeme()) |some| return some; | ||
| 669 | const loc = tree.tokens.items(.loc)[tok_i]; | ||
| 670 | var tmp_tokenizer = Tokenizer{ | ||
| 671 | .buf = tree.comp.getSource(loc.id).buf, | ||
| 672 | .comp = tree.comp, | ||
| 673 | .index = loc.byte_offset, | ||
| 674 | .source = .generated, | ||
| 675 | }; | ||
| 676 | const tok = tmp_tokenizer.next(); | ||
| 677 | return tmp_tokenizer.buf[tok.start..tok.end]; | ||
| 678 | } | ||
| 679 | |||
| 680 | pub fn dump(tree: *const Tree, config: std.io.tty.Config, writer: anytype) !void { | ||
| 681 | const mapper = tree.comp.string_interner.getFastTypeMapper(tree.comp.gpa) catch tree.comp.string_interner.getSlowTypeMapper(); | ||
| 682 | defer mapper.deinit(tree.comp.gpa); | ||
| 683 | |||
| 684 | for (tree.root_decls) |i| { | ||
| 685 | try tree.dumpNode(i, 0, mapper, config, writer); | ||
| 686 | try writer.writeByte('\n'); | ||
| 687 | } | ||
| 688 | } | ||
| 689 | |||
| 690 | fn dumpFieldAttributes(tree: *const Tree, attributes: []const Attribute, level: u32, writer: anytype) !void { | ||
| 691 | for (attributes) |attr| { | ||
| 692 | try writer.writeByteNTimes(' ', level); | ||
| 693 | try writer.print("field attr: {s}", .{@tagName(attr.tag)}); | ||
| 694 | try tree.dumpAttribute(attr, writer); | ||
| 695 | } | ||
| 696 | } | ||
| 697 | |||
| 698 | fn dumpAttribute(tree: *const Tree, attr: Attribute, writer: anytype) !void { | ||
| 699 | switch (attr.tag) { | ||
| 700 | inline else => |tag| { | ||
| 701 | const args = @field(attr.args, @tagName(tag)); | ||
| 702 | const fields = @typeInfo(@TypeOf(args)).Struct.fields; | ||
| 703 | if (fields.len == 0) { | ||
| 704 | try writer.writeByte('\n'); | ||
| 705 | return; | ||
| 706 | } | ||
| 707 | try writer.writeByte(' '); | ||
| 708 | inline for (fields, 0..) |f, i| { | ||
| 709 | if (comptime std.mem.eql(u8, f.name, "__name_tok")) continue; | ||
| 710 | if (i != 0) { | ||
| 711 | try writer.writeAll(", "); | ||
| 712 | } | ||
| 713 | try writer.writeAll(f.name); | ||
| 714 | try writer.writeAll(": "); | ||
| 715 | switch (f.type) { | ||
| 716 | Interner.Ref => try writer.print("\"{s}\"", .{tree.interner.get(@field(args, f.name)).bytes}), | ||
| 717 | ?Interner.Ref => try writer.print("\"{?s}\"", .{if (@field(args, f.name)) |str| tree.interner.get(str).bytes else null}), | ||
| 718 | else => switch (@typeInfo(f.type)) { | ||
| 719 | .Enum => try writer.writeAll(@tagName(@field(args, f.name))), | ||
| 720 | else => try writer.print("{any}", .{@field(args, f.name)}), | ||
| 721 | }, | ||
| 722 | } | ||
| 723 | } | ||
| 724 | try writer.writeByte('\n'); | ||
| 725 | return; | ||
| 726 | }, | ||
| 727 | } | ||
| 728 | } | ||
| 729 | |||
| 730 | fn dumpNode( | ||
| 731 | tree: *const Tree, | ||
| 732 | node: NodeIndex, | ||
| 733 | level: u32, | ||
| 734 | mapper: StringInterner.TypeMapper, | ||
| 735 | config: std.io.tty.Config, | ||
| 736 | w: anytype, | ||
| 737 | ) !void { | ||
| 738 | const delta = 2; | ||
| 739 | const half = delta / 2; | ||
| 740 | const TYPE = std.io.tty.Color.bright_magenta; | ||
| 741 | const TAG = std.io.tty.Color.bright_cyan; | ||
| 742 | const IMPLICIT = std.io.tty.Color.bright_blue; | ||
| 743 | const NAME = std.io.tty.Color.bright_red; | ||
| 744 | const LITERAL = std.io.tty.Color.bright_green; | ||
| 745 | const ATTRIBUTE = std.io.tty.Color.bright_yellow; | ||
| 746 | std.debug.assert(node != .none); | ||
| 747 | |||
| 748 | const tag = tree.nodes.items(.tag)[@intFromEnum(node)]; | ||
| 749 | const data = tree.nodes.items(.data)[@intFromEnum(node)]; | ||
| 750 | const ty = tree.nodes.items(.ty)[@intFromEnum(node)]; | ||
| 751 | try w.writeByteNTimes(' ', level); | ||
| 752 | |||
| 753 | try config.setColor(w, if (tag.isImplicit()) IMPLICIT else TAG); | ||
| 754 | try w.print("{s}: ", .{@tagName(tag)}); | ||
| 755 | if (tag == .implicit_cast or tag == .explicit_cast) { | ||
| 756 | try config.setColor(w, .white); | ||
| 757 | try w.print("({s}) ", .{@tagName(data.cast.kind)}); | ||
| 758 | } | ||
| 759 | try config.setColor(w, TYPE); | ||
| 760 | try w.writeByte('\''); | ||
| 761 | try ty.dump(mapper, tree.comp.langopts, w); | ||
| 762 | try w.writeByte('\''); | ||
| 763 | |||
| 764 | if (tree.isLval(node)) { | ||
| 765 | try config.setColor(w, ATTRIBUTE); | ||
| 766 | try w.writeAll(" lvalue"); | ||
| 767 | } | ||
| 768 | if (tree.isBitfield(node)) { | ||
| 769 | try config.setColor(w, ATTRIBUTE); | ||
| 770 | try w.writeAll(" bitfield"); | ||
| 771 | } | ||
| 772 | if (tree.value_map.get(node)) |val| { | ||
| 773 | try config.setColor(w, LITERAL); | ||
| 774 | try w.writeAll(" (value: "); | ||
| 775 | try val.print(ty, tree.comp, w); | ||
| 776 | try w.writeByte(')'); | ||
| 777 | } | ||
| 778 | if (tag == .implicit_return and data.return_zero) { | ||
| 779 | try config.setColor(w, IMPLICIT); | ||
| 780 | try w.writeAll(" (value: 0)"); | ||
| 781 | try config.setColor(w, .reset); | ||
| 782 | } | ||
| 783 | |||
| 784 | try w.writeAll("\n"); | ||
| 785 | try config.setColor(w, .reset); | ||
| 786 | |||
| 787 | if (ty.specifier == .attributed) { | ||
| 788 | try config.setColor(w, ATTRIBUTE); | ||
| 789 | for (ty.data.attributed.attributes) |attr| { | ||
| 790 | try w.writeByteNTimes(' ', level + half); | ||
| 791 | try w.print("attr: {s}", .{@tagName(attr.tag)}); | ||
| 792 | try tree.dumpAttribute(attr, w); | ||
| 793 | } | ||
| 794 | try config.setColor(w, .reset); | ||
| 795 | } | ||
| 796 | |||
| 797 | switch (tag) { | ||
| 798 | .invalid => unreachable, | ||
| 799 | .file_scope_asm => { | ||
| 800 | try w.writeByteNTimes(' ', level + 1); | ||
| 801 | try tree.dumpNode(data.decl.node, level + delta, mapper, config, w); | ||
| 802 | }, | ||
| 803 | .gnu_asm_simple => { | ||
| 804 | try w.writeByteNTimes(' ', level); | ||
| 805 | try tree.dumpNode(data.un, level, mapper, config, w); | ||
| 806 | }, | ||
| 807 | .static_assert => { | ||
| 808 | try w.writeByteNTimes(' ', level + 1); | ||
| 809 | try w.writeAll("condition:\n"); | ||
| 810 | try tree.dumpNode(data.bin.lhs, level + delta, mapper, config, w); | ||
| 811 | if (data.bin.rhs != .none) { | ||
| 812 | try w.writeByteNTimes(' ', level + 1); | ||
| 813 | try w.writeAll("diagnostic:\n"); | ||
| 814 | try tree.dumpNode(data.bin.rhs, level + delta, mapper, config, w); | ||
| 815 | } | ||
| 816 | }, | ||
| 817 | .fn_proto, | ||
| 818 | .static_fn_proto, | ||
| 819 | .inline_fn_proto, | ||
| 820 | .inline_static_fn_proto, | ||
| 821 | => { | ||
| 822 | try w.writeByteNTimes(' ', level + half); | ||
| 823 | try w.writeAll("name: "); | ||
| 824 | try config.setColor(w, NAME); | ||
| 825 | try w.print("{s}\n", .{tree.tokSlice(data.decl.name)}); | ||
| 826 | try config.setColor(w, .reset); | ||
| 827 | }, | ||
| 828 | .fn_def, | ||
| 829 | .static_fn_def, | ||
| 830 | .inline_fn_def, | ||
| 831 | .inline_static_fn_def, | ||
| 832 | => { | ||
| 833 | try w.writeByteNTimes(' ', level + half); | ||
| 834 | try w.writeAll("name: "); | ||
| 835 | try config.setColor(w, NAME); | ||
| 836 | try w.print("{s}\n", .{tree.tokSlice(data.decl.name)}); | ||
| 837 | try config.setColor(w, .reset); | ||
| 838 | try w.writeByteNTimes(' ', level + half); | ||
| 839 | try w.writeAll("body:\n"); | ||
| 840 | try tree.dumpNode(data.decl.node, level + delta, mapper, config, w); | ||
| 841 | }, | ||
| 842 | .typedef, | ||
| 843 | .@"var", | ||
| 844 | .extern_var, | ||
| 845 | .static_var, | ||
| 846 | .implicit_static_var, | ||
| 847 | .threadlocal_var, | ||
| 848 | .threadlocal_extern_var, | ||
| 849 | .threadlocal_static_var, | ||
| 850 | => { | ||
| 851 | try w.writeByteNTimes(' ', level + half); | ||
| 852 | try w.writeAll("name: "); | ||
| 853 | try config.setColor(w, NAME); | ||
| 854 | try w.print("{s}\n", .{tree.tokSlice(data.decl.name)}); | ||
| 855 | try config.setColor(w, .reset); | ||
| 856 | if (data.decl.node != .none) { | ||
| 857 | try w.writeByteNTimes(' ', level + half); | ||
| 858 | try w.writeAll("init:\n"); | ||
| 859 | try tree.dumpNode(data.decl.node, level + delta, mapper, config, w); | ||
| 860 | } | ||
| 861 | }, | ||
| 862 | .enum_field_decl => { | ||
| 863 | try w.writeByteNTimes(' ', level + half); | ||
| 864 | try w.writeAll("name: "); | ||
| 865 | try config.setColor(w, NAME); | ||
| 866 | try w.print("{s}\n", .{tree.tokSlice(data.decl.name)}); | ||
| 867 | try config.setColor(w, .reset); | ||
| 868 | if (data.decl.node != .none) { | ||
| 869 | try w.writeByteNTimes(' ', level + half); | ||
| 870 | try w.writeAll("value:\n"); | ||
| 871 | try tree.dumpNode(data.decl.node, level + delta, mapper, config, w); | ||
| 872 | } | ||
| 873 | }, | ||
| 874 | .record_field_decl => { | ||
| 875 | if (data.decl.name != 0) { | ||
| 876 | try w.writeByteNTimes(' ', level + half); | ||
| 877 | try w.writeAll("name: "); | ||
| 878 | try config.setColor(w, NAME); | ||
| 879 | try w.print("{s}\n", .{tree.tokSlice(data.decl.name)}); | ||
| 880 | try config.setColor(w, .reset); | ||
| 881 | } | ||
| 882 | if (data.decl.node != .none) { | ||
| 883 | try w.writeByteNTimes(' ', level + half); | ||
| 884 | try w.writeAll("bits:\n"); | ||
| 885 | try tree.dumpNode(data.decl.node, level + delta, mapper, config, w); | ||
| 886 | } | ||
| 887 | }, | ||
| 888 | .indirect_record_field_decl => {}, | ||
| 889 | .compound_stmt, | ||
| 890 | .array_init_expr, | ||
| 891 | .struct_init_expr, | ||
| 892 | .enum_decl, | ||
| 893 | .struct_decl, | ||
| 894 | .union_decl, | ||
| 895 | => { | ||
| 896 | const maybe_field_attributes = if (ty.getRecord()) |record| record.field_attributes else null; | ||
| 897 | for (tree.data[data.range.start..data.range.end], 0..) |stmt, i| { | ||
| 898 | if (i != 0) try w.writeByte('\n'); | ||
| 899 | try tree.dumpNode(stmt, level + delta, mapper, config, w); | ||
| 900 | if (maybe_field_attributes) |field_attributes| { | ||
| 901 | if (field_attributes[i].len == 0) continue; | ||
| 902 | |||
| 903 | try config.setColor(w, ATTRIBUTE); | ||
| 904 | try tree.dumpFieldAttributes(field_attributes[i], level + delta + half, w); | ||
| 905 | try config.setColor(w, .reset); | ||
| 906 | } | ||
| 907 | } | ||
| 908 | }, | ||
| 909 | .compound_stmt_two, | ||
| 910 | .array_init_expr_two, | ||
| 911 | .struct_init_expr_two, | ||
| 912 | .enum_decl_two, | ||
| 913 | .struct_decl_two, | ||
| 914 | .union_decl_two, | ||
| 915 | => { | ||
| 916 | var attr_array = [2][]const Attribute{ &.{}, &.{} }; | ||
| 917 | const empty: [][]const Attribute = &attr_array; | ||
| 918 | const field_attributes = if (ty.getRecord()) |record| (record.field_attributes orelse empty.ptr) else empty.ptr; | ||
| 919 | if (data.bin.lhs != .none) { | ||
| 920 | try tree.dumpNode(data.bin.lhs, level + delta, mapper, config, w); | ||
| 921 | if (field_attributes[0].len > 0) { | ||
| 922 | try config.setColor(w, ATTRIBUTE); | ||
| 923 | try tree.dumpFieldAttributes(field_attributes[0], level + delta + half, w); | ||
| 924 | try config.setColor(w, .reset); | ||
| 925 | } | ||
| 926 | } | ||
| 927 | if (data.bin.rhs != .none) { | ||
| 928 | try tree.dumpNode(data.bin.rhs, level + delta, mapper, config, w); | ||
| 929 | if (field_attributes[1].len > 0) { | ||
| 930 | try config.setColor(w, ATTRIBUTE); | ||
| 931 | try tree.dumpFieldAttributes(field_attributes[1], level + delta + half, w); | ||
| 932 | try config.setColor(w, .reset); | ||
| 933 | } | ||
| 934 | } | ||
| 935 | }, | ||
| 936 | .union_init_expr => { | ||
| 937 | try w.writeByteNTimes(' ', level + half); | ||
| 938 | try w.writeAll("field index: "); | ||
| 939 | try config.setColor(w, LITERAL); | ||
| 940 | try w.print("{d}\n", .{data.union_init.field_index}); | ||
| 941 | try config.setColor(w, .reset); | ||
| 942 | if (data.union_init.node != .none) { | ||
| 943 | try tree.dumpNode(data.union_init.node, level + delta, mapper, config, w); | ||
| 944 | } | ||
| 945 | }, | ||
| 946 | .compound_literal_expr, | ||
| 947 | .static_compound_literal_expr, | ||
| 948 | .thread_local_compound_literal_expr, | ||
| 949 | .static_thread_local_compound_literal_expr, | ||
| 950 | => { | ||
| 951 | try tree.dumpNode(data.un, level + half, mapper, config, w); | ||
| 952 | }, | ||
| 953 | .labeled_stmt => { | ||
| 954 | try w.writeByteNTimes(' ', level + half); | ||
| 955 | try w.writeAll("label: "); | ||
| 956 | try config.setColor(w, LITERAL); | ||
| 957 | try w.print("{s}\n", .{tree.tokSlice(data.decl.name)}); | ||
| 958 | try config.setColor(w, .reset); | ||
| 959 | if (data.decl.node != .none) { | ||
| 960 | try w.writeByteNTimes(' ', level + half); | ||
| 961 | try w.writeAll("stmt:\n"); | ||
| 962 | try tree.dumpNode(data.decl.node, level + delta, mapper, config, w); | ||
| 963 | } | ||
| 964 | }, | ||
| 965 | .case_stmt => { | ||
| 966 | try w.writeByteNTimes(' ', level + half); | ||
| 967 | try w.writeAll("value:\n"); | ||
| 968 | try tree.dumpNode(data.bin.lhs, level + delta, mapper, config, w); | ||
| 969 | if (data.bin.rhs != .none) { | ||
| 970 | try w.writeByteNTimes(' ', level + half); | ||
| 971 | try w.writeAll("stmt:\n"); | ||
| 972 | try tree.dumpNode(data.bin.rhs, level + delta, mapper, config, w); | ||
| 973 | } | ||
| 974 | }, | ||
| 975 | .case_range_stmt => { | ||
| 976 | try w.writeByteNTimes(' ', level + half); | ||
| 977 | try w.writeAll("range start:\n"); | ||
| 978 | try tree.dumpNode(tree.data[data.if3.body], level + delta, mapper, config, w); | ||
| 979 | |||
| 980 | try w.writeByteNTimes(' ', level + half); | ||
| 981 | try w.writeAll("range end:\n"); | ||
| 982 | try tree.dumpNode(tree.data[data.if3.body + 1], level + delta, mapper, config, w); | ||
| 983 | |||
| 984 | if (data.if3.cond != .none) { | ||
| 985 | try w.writeByteNTimes(' ', level + half); | ||
| 986 | try w.writeAll("stmt:\n"); | ||
| 987 | try tree.dumpNode(data.if3.cond, level + delta, mapper, config, w); | ||
| 988 | } | ||
| 989 | }, | ||
| 990 | .default_stmt => { | ||
| 991 | if (data.un != .none) { | ||
| 992 | try w.writeByteNTimes(' ', level + half); | ||
| 993 | try w.writeAll("stmt:\n"); | ||
| 994 | try tree.dumpNode(data.un, level + delta, mapper, config, w); | ||
| 995 | } | ||
| 996 | }, | ||
| 997 | .binary_cond_expr, .cond_expr, .if_then_else_stmt, .builtin_choose_expr => { | ||
| 998 | try w.writeByteNTimes(' ', level + half); | ||
| 999 | try w.writeAll("cond:\n"); | ||
| 1000 | try tree.dumpNode(data.if3.cond, level + delta, mapper, config, w); | ||
| 1001 | |||
| 1002 | try w.writeByteNTimes(' ', level + half); | ||
| 1003 | try w.writeAll("then:\n"); | ||
| 1004 | try tree.dumpNode(tree.data[data.if3.body], level + delta, mapper, config, w); | ||
| 1005 | |||
| 1006 | try w.writeByteNTimes(' ', level + half); | ||
| 1007 | try w.writeAll("else:\n"); | ||
| 1008 | try tree.dumpNode(tree.data[data.if3.body + 1], level + delta, mapper, config, w); | ||
| 1009 | }, | ||
| 1010 | .builtin_types_compatible_p => { | ||
| 1011 | std.debug.assert(tree.nodes.items(.tag)[@intFromEnum(data.bin.lhs)] == .invalid); | ||
| 1012 | std.debug.assert(tree.nodes.items(.tag)[@intFromEnum(data.bin.rhs)] == .invalid); | ||
| 1013 | |||
| 1014 | try w.writeByteNTimes(' ', level + half); | ||
| 1015 | try w.writeAll("lhs: "); | ||
| 1016 | |||
| 1017 | const lhs_ty = tree.nodes.items(.ty)[@intFromEnum(data.bin.lhs)]; | ||
| 1018 | try config.setColor(w, TYPE); | ||
| 1019 | try lhs_ty.dump(mapper, tree.comp.langopts, w); | ||
| 1020 | try config.setColor(w, .reset); | ||
| 1021 | try w.writeByte('\n'); | ||
| 1022 | |||
| 1023 | try w.writeByteNTimes(' ', level + half); | ||
| 1024 | try w.writeAll("rhs: "); | ||
| 1025 | |||
| 1026 | const rhs_ty = tree.nodes.items(.ty)[@intFromEnum(data.bin.rhs)]; | ||
| 1027 | try config.setColor(w, TYPE); | ||
| 1028 | try rhs_ty.dump(mapper, tree.comp.langopts, w); | ||
| 1029 | try config.setColor(w, .reset); | ||
| 1030 | try w.writeByte('\n'); | ||
| 1031 | }, | ||
| 1032 | .if_then_stmt => { | ||
| 1033 | try w.writeByteNTimes(' ', level + half); | ||
| 1034 | try w.writeAll("cond:\n"); | ||
| 1035 | try tree.dumpNode(data.bin.lhs, level + delta, mapper, config, w); | ||
| 1036 | |||
| 1037 | if (data.bin.rhs != .none) { | ||
| 1038 | try w.writeByteNTimes(' ', level + half); | ||
| 1039 | try w.writeAll("then:\n"); | ||
| 1040 | try tree.dumpNode(data.bin.rhs, level + delta, mapper, config, w); | ||
| 1041 | } | ||
| 1042 | }, | ||
| 1043 | .switch_stmt, .while_stmt, .do_while_stmt => { | ||
| 1044 | try w.writeByteNTimes(' ', level + half); | ||
| 1045 | try w.writeAll("cond:\n"); | ||
| 1046 | try tree.dumpNode(data.bin.lhs, level + delta, mapper, config, w); | ||
| 1047 | |||
| 1048 | if (data.bin.rhs != .none) { | ||
| 1049 | try w.writeByteNTimes(' ', level + half); | ||
| 1050 | try w.writeAll("body:\n"); | ||
| 1051 | try tree.dumpNode(data.bin.rhs, level + delta, mapper, config, w); | ||
| 1052 | } | ||
| 1053 | }, | ||
| 1054 | .for_decl_stmt => { | ||
| 1055 | const for_decl = data.forDecl(tree); | ||
| 1056 | |||
| 1057 | try w.writeByteNTimes(' ', level + half); | ||
| 1058 | try w.writeAll("decl:\n"); | ||
| 1059 | for (for_decl.decls) |decl| { | ||
| 1060 | try tree.dumpNode(decl, level + delta, mapper, config, w); | ||
| 1061 | try w.writeByte('\n'); | ||
| 1062 | } | ||
| 1063 | if (for_decl.cond != .none) { | ||
| 1064 | try w.writeByteNTimes(' ', level + half); | ||
| 1065 | try w.writeAll("cond:\n"); | ||
| 1066 | try tree.dumpNode(for_decl.cond, level + delta, mapper, config, w); | ||
| 1067 | } | ||
| 1068 | if (for_decl.incr != .none) { | ||
| 1069 | try w.writeByteNTimes(' ', level + half); | ||
| 1070 | try w.writeAll("incr:\n"); | ||
| 1071 | try tree.dumpNode(for_decl.incr, level + delta, mapper, config, w); | ||
| 1072 | } | ||
| 1073 | if (for_decl.body != .none) { | ||
| 1074 | try w.writeByteNTimes(' ', level + half); | ||
| 1075 | try w.writeAll("body:\n"); | ||
| 1076 | try tree.dumpNode(for_decl.body, level + delta, mapper, config, w); | ||
| 1077 | } | ||
| 1078 | }, | ||
| 1079 | .forever_stmt => { | ||
| 1080 | if (data.un != .none) { | ||
| 1081 | try w.writeByteNTimes(' ', level + half); | ||
| 1082 | try w.writeAll("body:\n"); | ||
| 1083 | try tree.dumpNode(data.un, level + delta, mapper, config, w); | ||
| 1084 | } | ||
| 1085 | }, | ||
| 1086 | .for_stmt => { | ||
| 1087 | const for_stmt = data.forStmt(tree); | ||
| 1088 | |||
| 1089 | if (for_stmt.init != .none) { | ||
| 1090 | try w.writeByteNTimes(' ', level + half); | ||
| 1091 | try w.writeAll("init:\n"); | ||
| 1092 | try tree.dumpNode(for_stmt.init, level + delta, mapper, config, w); | ||
| 1093 | } | ||
| 1094 | if (for_stmt.cond != .none) { | ||
| 1095 | try w.writeByteNTimes(' ', level + half); | ||
| 1096 | try w.writeAll("cond:\n"); | ||
| 1097 | try tree.dumpNode(for_stmt.cond, level + delta, mapper, config, w); | ||
| 1098 | } | ||
| 1099 | if (for_stmt.incr != .none) { | ||
| 1100 | try w.writeByteNTimes(' ', level + half); | ||
| 1101 | try w.writeAll("incr:\n"); | ||
| 1102 | try tree.dumpNode(for_stmt.incr, level + delta, mapper, config, w); | ||
| 1103 | } | ||
| 1104 | if (for_stmt.body != .none) { | ||
| 1105 | try w.writeByteNTimes(' ', level + half); | ||
| 1106 | try w.writeAll("body:\n"); | ||
| 1107 | try tree.dumpNode(for_stmt.body, level + delta, mapper, config, w); | ||
| 1108 | } | ||
| 1109 | }, | ||
| 1110 | .goto_stmt, .addr_of_label => { | ||
| 1111 | try w.writeByteNTimes(' ', level + half); | ||
| 1112 | try w.writeAll("label: "); | ||
| 1113 | try config.setColor(w, LITERAL); | ||
| 1114 | try w.print("{s}\n", .{tree.tokSlice(data.decl_ref)}); | ||
| 1115 | try config.setColor(w, .reset); | ||
| 1116 | }, | ||
| 1117 | .continue_stmt, .break_stmt, .implicit_return, .null_stmt => {}, | ||
| 1118 | .return_stmt => { | ||
| 1119 | if (data.un != .none) { | ||
| 1120 | try w.writeByteNTimes(' ', level + half); | ||
| 1121 | try w.writeAll("expr:\n"); | ||
| 1122 | try tree.dumpNode(data.un, level + delta, mapper, config, w); | ||
| 1123 | } | ||
| 1124 | }, | ||
| 1125 | .call_expr => { | ||
| 1126 | try w.writeByteNTimes(' ', level + half); | ||
| 1127 | try w.writeAll("lhs:\n"); | ||
| 1128 | try tree.dumpNode(tree.data[data.range.start], level + delta, mapper, config, w); | ||
| 1129 | |||
| 1130 | try w.writeByteNTimes(' ', level + half); | ||
| 1131 | try w.writeAll("args:\n"); | ||
| 1132 | for (tree.data[data.range.start + 1 .. data.range.end]) |arg| try tree.dumpNode(arg, level + delta, mapper, config, w); | ||
| 1133 | }, | ||
| 1134 | .call_expr_one => { | ||
| 1135 | try w.writeByteNTimes(' ', level + half); | ||
| 1136 | try w.writeAll("lhs:\n"); | ||
| 1137 | try tree.dumpNode(data.bin.lhs, level + delta, mapper, config, w); | ||
| 1138 | if (data.bin.rhs != .none) { | ||
| 1139 | try w.writeByteNTimes(' ', level + half); | ||
| 1140 | try w.writeAll("arg:\n"); | ||
| 1141 | try tree.dumpNode(data.bin.rhs, level + delta, mapper, config, w); | ||
| 1142 | } | ||
| 1143 | }, | ||
| 1144 | .builtin_call_expr => { | ||
| 1145 | try w.writeByteNTimes(' ', level + half); | ||
| 1146 | try w.writeAll("name: "); | ||
| 1147 | try config.setColor(w, NAME); | ||
| 1148 | try w.print("{s}\n", .{tree.tokSlice(@intFromEnum(tree.data[data.range.start]))}); | ||
| 1149 | try config.setColor(w, .reset); | ||
| 1150 | |||
| 1151 | try w.writeByteNTimes(' ', level + half); | ||
| 1152 | try w.writeAll("args:\n"); | ||
| 1153 | for (tree.data[data.range.start + 1 .. data.range.end]) |arg| try tree.dumpNode(arg, level + delta, mapper, config, w); | ||
| 1154 | }, | ||
| 1155 | .builtin_call_expr_one => { | ||
| 1156 | try w.writeByteNTimes(' ', level + half); | ||
| 1157 | try w.writeAll("name: "); | ||
| 1158 | try config.setColor(w, NAME); | ||
| 1159 | try w.print("{s}\n", .{tree.tokSlice(data.decl.name)}); | ||
| 1160 | try config.setColor(w, .reset); | ||
| 1161 | if (data.decl.node != .none) { | ||
| 1162 | try w.writeByteNTimes(' ', level + half); | ||
| 1163 | try w.writeAll("arg:\n"); | ||
| 1164 | try tree.dumpNode(data.decl.node, level + delta, mapper, config, w); | ||
| 1165 | } | ||
| 1166 | }, | ||
| 1167 | .special_builtin_call_one => { | ||
| 1168 | try w.writeByteNTimes(' ', level + half); | ||
| 1169 | try w.writeAll("name: "); | ||
| 1170 | try config.setColor(w, NAME); | ||
| 1171 | try w.print("{s}\n", .{tree.tokSlice(data.decl.name)}); | ||
| 1172 | try config.setColor(w, .reset); | ||
| 1173 | if (data.decl.node != .none) { | ||
| 1174 | try w.writeByteNTimes(' ', level + half); | ||
| 1175 | try w.writeAll("arg:\n"); | ||
| 1176 | try tree.dumpNode(data.decl.node, level + delta, mapper, config, w); | ||
| 1177 | } | ||
| 1178 | }, | ||
| 1179 | .comma_expr, | ||
| 1180 | .assign_expr, | ||
| 1181 | .mul_assign_expr, | ||
| 1182 | .div_assign_expr, | ||
| 1183 | .mod_assign_expr, | ||
| 1184 | .add_assign_expr, | ||
| 1185 | .sub_assign_expr, | ||
| 1186 | .shl_assign_expr, | ||
| 1187 | .shr_assign_expr, | ||
| 1188 | .bit_and_assign_expr, | ||
| 1189 | .bit_xor_assign_expr, | ||
| 1190 | .bit_or_assign_expr, | ||
| 1191 | .bool_or_expr, | ||
| 1192 | .bool_and_expr, | ||
| 1193 | .bit_or_expr, | ||
| 1194 | .bit_xor_expr, | ||
| 1195 | .bit_and_expr, | ||
| 1196 | .equal_expr, | ||
| 1197 | .not_equal_expr, | ||
| 1198 | .less_than_expr, | ||
| 1199 | .less_than_equal_expr, | ||
| 1200 | .greater_than_expr, | ||
| 1201 | .greater_than_equal_expr, | ||
| 1202 | .shl_expr, | ||
| 1203 | .shr_expr, | ||
| 1204 | .add_expr, | ||
| 1205 | .sub_expr, | ||
| 1206 | .mul_expr, | ||
| 1207 | .div_expr, | ||
| 1208 | .mod_expr, | ||
| 1209 | => { | ||
| 1210 | try w.writeByteNTimes(' ', level + 1); | ||
| 1211 | try w.writeAll("lhs:\n"); | ||
| 1212 | try tree.dumpNode(data.bin.lhs, level + delta, mapper, config, w); | ||
| 1213 | try w.writeByteNTimes(' ', level + 1); | ||
| 1214 | try w.writeAll("rhs:\n"); | ||
| 1215 | try tree.dumpNode(data.bin.rhs, level + delta, mapper, config, w); | ||
| 1216 | }, | ||
| 1217 | .explicit_cast, .implicit_cast => try tree.dumpNode(data.cast.operand, level + delta, mapper, config, w), | ||
| 1218 | .addr_of_expr, | ||
| 1219 | .computed_goto_stmt, | ||
| 1220 | .deref_expr, | ||
| 1221 | .plus_expr, | ||
| 1222 | .negate_expr, | ||
| 1223 | .bit_not_expr, | ||
| 1224 | .bool_not_expr, | ||
| 1225 | .pre_inc_expr, | ||
| 1226 | .pre_dec_expr, | ||
| 1227 | .imag_expr, | ||
| 1228 | .real_expr, | ||
| 1229 | .post_inc_expr, | ||
| 1230 | .post_dec_expr, | ||
| 1231 | .paren_expr, | ||
| 1232 | => { | ||
| 1233 | try w.writeByteNTimes(' ', level + 1); | ||
| 1234 | try w.writeAll("operand:\n"); | ||
| 1235 | try tree.dumpNode(data.un, level + delta, mapper, config, w); | ||
| 1236 | }, | ||
| 1237 | .decl_ref_expr => { | ||
| 1238 | try w.writeByteNTimes(' ', level + 1); | ||
| 1239 | try w.writeAll("name: "); | ||
| 1240 | try config.setColor(w, NAME); | ||
| 1241 | try w.print("{s}\n", .{tree.tokSlice(data.decl_ref)}); | ||
| 1242 | try config.setColor(w, .reset); | ||
| 1243 | }, | ||
| 1244 | .enumeration_ref => { | ||
| 1245 | try w.writeByteNTimes(' ', level + 1); | ||
| 1246 | try w.writeAll("name: "); | ||
| 1247 | try config.setColor(w, NAME); | ||
| 1248 | try w.print("{s}\n", .{tree.tokSlice(data.decl_ref)}); | ||
| 1249 | try config.setColor(w, .reset); | ||
| 1250 | }, | ||
| 1251 | .bool_literal, | ||
| 1252 | .nullptr_literal, | ||
| 1253 | .int_literal, | ||
| 1254 | .char_literal, | ||
| 1255 | .float_literal, | ||
| 1256 | .string_literal_expr, | ||
| 1257 | => {}, | ||
| 1258 | .member_access_expr, .member_access_ptr_expr => { | ||
| 1259 | try w.writeByteNTimes(' ', level + 1); | ||
| 1260 | try w.writeAll("lhs:\n"); | ||
| 1261 | try tree.dumpNode(data.member.lhs, level + delta, mapper, config, w); | ||
| 1262 | |||
| 1263 | var lhs_ty = tree.nodes.items(.ty)[@intFromEnum(data.member.lhs)]; | ||
| 1264 | if (lhs_ty.isPtr()) lhs_ty = lhs_ty.elemType(); | ||
| 1265 | lhs_ty = lhs_ty.canonicalize(.standard); | ||
| 1266 | |||
| 1267 | try w.writeByteNTimes(' ', level + 1); | ||
| 1268 | try w.writeAll("name: "); | ||
| 1269 | try config.setColor(w, NAME); | ||
| 1270 | try w.print("{s}\n", .{mapper.lookup(lhs_ty.data.record.fields[data.member.index].name)}); | ||
| 1271 | try config.setColor(w, .reset); | ||
| 1272 | }, | ||
| 1273 | .array_access_expr => { | ||
| 1274 | if (data.bin.lhs != .none) { | ||
| 1275 | try w.writeByteNTimes(' ', level + 1); | ||
| 1276 | try w.writeAll("lhs:\n"); | ||
| 1277 | try tree.dumpNode(data.bin.lhs, level + delta, mapper, config, w); | ||
| 1278 | } | ||
| 1279 | try w.writeByteNTimes(' ', level + 1); | ||
| 1280 | try w.writeAll("index:\n"); | ||
| 1281 | try tree.dumpNode(data.bin.rhs, level + delta, mapper, config, w); | ||
| 1282 | }, | ||
| 1283 | .sizeof_expr, .alignof_expr => { | ||
| 1284 | if (data.un != .none) { | ||
| 1285 | try w.writeByteNTimes(' ', level + 1); | ||
| 1286 | try w.writeAll("expr:\n"); | ||
| 1287 | try tree.dumpNode(data.un, level + delta, mapper, config, w); | ||
| 1288 | } | ||
| 1289 | }, | ||
| 1290 | .generic_expr_one => { | ||
| 1291 | try w.writeByteNTimes(' ', level + 1); | ||
| 1292 | try w.writeAll("controlling:\n"); | ||
| 1293 | try tree.dumpNode(data.bin.lhs, level + delta, mapper, config, w); | ||
| 1294 | try w.writeByteNTimes(' ', level + 1); | ||
| 1295 | if (data.bin.rhs != .none) { | ||
| 1296 | try w.writeAll("chosen:\n"); | ||
| 1297 | try tree.dumpNode(data.bin.rhs, level + delta, mapper, config, w); | ||
| 1298 | } | ||
| 1299 | }, | ||
| 1300 | .generic_expr => { | ||
| 1301 | const nodes = tree.data[data.range.start..data.range.end]; | ||
| 1302 | try w.writeByteNTimes(' ', level + 1); | ||
| 1303 | try w.writeAll("controlling:\n"); | ||
| 1304 | try tree.dumpNode(nodes[0], level + delta, mapper, config, w); | ||
| 1305 | try w.writeByteNTimes(' ', level + 1); | ||
| 1306 | try w.writeAll("chosen:\n"); | ||
| 1307 | try tree.dumpNode(nodes[1], level + delta, mapper, config, w); | ||
| 1308 | try w.writeByteNTimes(' ', level + 1); | ||
| 1309 | try w.writeAll("rest:\n"); | ||
| 1310 | for (nodes[2..]) |expr| { | ||
| 1311 | try tree.dumpNode(expr, level + delta, mapper, config, w); | ||
| 1312 | } | ||
| 1313 | }, | ||
| 1314 | .generic_association_expr, .generic_default_expr, .stmt_expr, .imaginary_literal => { | ||
| 1315 | try tree.dumpNode(data.un, level + delta, mapper, config, w); | ||
| 1316 | }, | ||
| 1317 | .array_filler_expr => { | ||
| 1318 | try w.writeByteNTimes(' ', level + 1); | ||
| 1319 | try w.writeAll("count: "); | ||
| 1320 | try config.setColor(w, LITERAL); | ||
| 1321 | try w.print("{d}\n", .{data.int}); | ||
| 1322 | try config.setColor(w, .reset); | ||
| 1323 | }, | ||
| 1324 | .struct_forward_decl, | ||
| 1325 | .union_forward_decl, | ||
| 1326 | .enum_forward_decl, | ||
| 1327 | .default_init_expr, | ||
| 1328 | .cond_dummy_expr, | ||
| 1329 | => {}, | ||
| 1330 | } | ||
| 1331 | } | ||
deps/aro/aro/Type.zig created+2725| ... | @@ -0,0 +1,2725 @@ | ||
| 1 | const std = @import("std"); | ||
| 2 | const Tree = @import("Tree.zig"); | ||
| 3 | const TokenIndex = Tree.TokenIndex; | ||
| 4 | const NodeIndex = Tree.NodeIndex; | ||
| 5 | const Parser = @import("Parser.zig"); | ||
| 6 | const Compilation = @import("Compilation.zig"); | ||
| 7 | const Attribute = @import("Attribute.zig"); | ||
| 8 | const StringInterner = @import("StringInterner.zig"); | ||
| 9 | const StringId = StringInterner.StringId; | ||
| 10 | const target_util = @import("target.zig"); | ||
| 11 | const LangOpts = @import("LangOpts.zig"); | ||
| 12 | |||
| 13 | pub const Qualifiers = packed struct { | ||
| 14 | @"const": bool = false, | ||
| 15 | atomic: bool = false, | ||
| 16 | @"volatile": bool = false, | ||
| 17 | restrict: bool = false, | ||
| 18 | |||
| 19 | // for function parameters only, stored here since it fits in the padding | ||
| 20 | register: bool = false, | ||
| 21 | |||
| 22 | pub fn any(quals: Qualifiers) bool { | ||
| 23 | return quals.@"const" or quals.restrict or quals.@"volatile" or quals.atomic; | ||
| 24 | } | ||
| 25 | |||
| 26 | pub fn dump(quals: Qualifiers, w: anytype) !void { | ||
| 27 | if (quals.@"const") try w.writeAll("const "); | ||
| 28 | if (quals.atomic) try w.writeAll("_Atomic "); | ||
| 29 | if (quals.@"volatile") try w.writeAll("volatile "); | ||
| 30 | if (quals.restrict) try w.writeAll("restrict "); | ||
| 31 | if (quals.register) try w.writeAll("register "); | ||
| 32 | } | ||
| 33 | |||
| 34 | /// Merge the const/volatile qualifiers, used by type resolution | ||
| 35 | /// of the conditional operator | ||
| 36 | pub fn mergeCV(a: Qualifiers, b: Qualifiers) Qualifiers { | ||
| 37 | return .{ | ||
| 38 | .@"const" = a.@"const" or b.@"const", | ||
| 39 | .@"volatile" = a.@"volatile" or b.@"volatile", | ||
| 40 | }; | ||
| 41 | } | ||
| 42 | |||
| 43 | /// Merge all qualifiers, used by typeof() | ||
| 44 | fn mergeAll(a: Qualifiers, b: Qualifiers) Qualifiers { | ||
| 45 | return .{ | ||
| 46 | .@"const" = a.@"const" or b.@"const", | ||
| 47 | .atomic = a.atomic or b.atomic, | ||
| 48 | .@"volatile" = a.@"volatile" or b.@"volatile", | ||
| 49 | .restrict = a.restrict or b.restrict, | ||
| 50 | .register = a.register or b.register, | ||
| 51 | }; | ||
| 52 | } | ||
| 53 | |||
| 54 | /// Checks if a has all the qualifiers of b | ||
| 55 | pub fn hasQuals(a: Qualifiers, b: Qualifiers) bool { | ||
| 56 | if (b.@"const" and !a.@"const") return false; | ||
| 57 | if (b.@"volatile" and !a.@"volatile") return false; | ||
| 58 | if (b.atomic and !a.atomic) return false; | ||
| 59 | return true; | ||
| 60 | } | ||
| 61 | |||
| 62 | /// register is a storage class and not actually a qualifier | ||
| 63 | /// so it is not preserved by typeof() | ||
| 64 | pub fn inheritFromTypeof(quals: Qualifiers) Qualifiers { | ||
| 65 | var res = quals; | ||
| 66 | res.register = false; | ||
| 67 | return res; | ||
| 68 | } | ||
| 69 | |||
| 70 | pub const Builder = struct { | ||
| 71 | @"const": ?TokenIndex = null, | ||
| 72 | atomic: ?TokenIndex = null, | ||
| 73 | @"volatile": ?TokenIndex = null, | ||
| 74 | restrict: ?TokenIndex = null, | ||
| 75 | |||
| 76 | pub fn finish(b: Qualifiers.Builder, p: *Parser, ty: *Type) !void { | ||
| 77 | if (ty.specifier != .pointer and b.restrict != null) { | ||
| 78 | try p.errStr(.restrict_non_pointer, b.restrict.?, try p.typeStr(ty.*)); | ||
| 79 | } | ||
| 80 | if (b.atomic) |some| { | ||
| 81 | if (ty.isArray()) try p.errStr(.atomic_array, some, try p.typeStr(ty.*)); | ||
| 82 | if (ty.isFunc()) try p.errStr(.atomic_func, some, try p.typeStr(ty.*)); | ||
| 83 | if (ty.hasIncompleteSize()) try p.errStr(.atomic_incomplete, some, try p.typeStr(ty.*)); | ||
| 84 | } | ||
| 85 | |||
| 86 | if (b.@"const" != null) ty.qual.@"const" = true; | ||
| 87 | if (b.atomic != null) ty.qual.atomic = true; | ||
| 88 | if (b.@"volatile" != null) ty.qual.@"volatile" = true; | ||
| 89 | if (b.restrict != null) ty.qual.restrict = true; | ||
| 90 | } | ||
| 91 | }; | ||
| 92 | }; | ||
| 93 | |||
| 94 | // TODO improve memory usage | ||
| 95 | pub const Func = struct { | ||
| 96 | return_type: Type, | ||
| 97 | params: []Param, | ||
| 98 | |||
| 99 | pub const Param = struct { | ||
| 100 | ty: Type, | ||
| 101 | name: StringId, | ||
| 102 | name_tok: TokenIndex, | ||
| 103 | }; | ||
| 104 | |||
| 105 | fn eql(a: *const Func, b: *const Func, a_spec: Specifier, b_spec: Specifier, comp: *const Compilation) bool { | ||
| 106 | // return type cannot have qualifiers | ||
| 107 | if (!a.return_type.eql(b.return_type, comp, false)) return false; | ||
| 108 | |||
| 109 | if (a.params.len != b.params.len) { | ||
| 110 | if (a_spec == .old_style_func or b_spec == .old_style_func) { | ||
| 111 | const maybe_has_params = if (a_spec == .old_style_func) b else a; | ||
| 112 | for (maybe_has_params.params) |param| { | ||
| 113 | if (param.ty.undergoesDefaultArgPromotion(comp)) return false; | ||
| 114 | } | ||
| 115 | return true; | ||
| 116 | } | ||
| 117 | } | ||
| 118 | if ((a_spec == .func) != (b_spec == .func)) return false; | ||
| 119 | // TODO validate this | ||
| 120 | for (a.params, b.params) |param, b_qual| { | ||
| 121 | var a_unqual = param.ty; | ||
| 122 | a_unqual.qual.@"const" = false; | ||
| 123 | a_unqual.qual.@"volatile" = false; | ||
| 124 | var b_unqual = b_qual.ty; | ||
| 125 | b_unqual.qual.@"const" = false; | ||
| 126 | b_unqual.qual.@"volatile" = false; | ||
| 127 | if (!a_unqual.eql(b_unqual, comp, true)) return false; | ||
| 128 | } | ||
| 129 | return true; | ||
| 130 | } | ||
| 131 | }; | ||
| 132 | |||
| 133 | pub const Array = struct { | ||
| 134 | len: u64, | ||
| 135 | elem: Type, | ||
| 136 | }; | ||
| 137 | |||
| 138 | pub const Expr = struct { | ||
| 139 | node: NodeIndex, | ||
| 140 | ty: Type, | ||
| 141 | }; | ||
| 142 | |||
| 143 | pub const Attributed = struct { | ||
| 144 | attributes: []Attribute, | ||
| 145 | base: Type, | ||
| 146 | |||
| 147 | pub fn create(allocator: std.mem.Allocator, base: Type, existing_attributes: []const Attribute, attributes: []const Attribute) !*Attributed { | ||
| 148 | const attributed_type = try allocator.create(Attributed); | ||
| 149 | errdefer allocator.destroy(attributed_type); | ||
| 150 | |||
| 151 | const all_attrs = try allocator.alloc(Attribute, existing_attributes.len + attributes.len); | ||
| 152 | std.mem.copy(Attribute, all_attrs, existing_attributes); | ||
| 153 | std.mem.copy(Attribute, all_attrs[existing_attributes.len..], attributes); | ||
| 154 | |||
| 155 | attributed_type.* = .{ | ||
| 156 | .attributes = all_attrs, | ||
| 157 | .base = base, | ||
| 158 | }; | ||
| 159 | return attributed_type; | ||
| 160 | } | ||
| 161 | }; | ||
| 162 | |||
| 163 | // TODO improve memory usage | ||
| 164 | pub const Enum = struct { | ||
| 165 | fields: []Field, | ||
| 166 | tag_ty: Type, | ||
| 167 | name: StringId, | ||
| 168 | fixed: bool, | ||
| 169 | |||
| 170 | pub const Field = struct { | ||
| 171 | ty: Type, | ||
| 172 | name: StringId, | ||
| 173 | name_tok: TokenIndex, | ||
| 174 | node: NodeIndex, | ||
| 175 | }; | ||
| 176 | |||
| 177 | pub fn isIncomplete(e: Enum) bool { | ||
| 178 | return e.fields.len == std.math.maxInt(usize); | ||
| 179 | } | ||
| 180 | |||
| 181 | pub fn create(allocator: std.mem.Allocator, name: StringId, fixed_ty: ?Type) !*Enum { | ||
| 182 | var e = try allocator.create(Enum); | ||
| 183 | e.name = name; | ||
| 184 | e.fields.len = std.math.maxInt(usize); | ||
| 185 | if (fixed_ty) |some| e.tag_ty = some; | ||
| 186 | e.fixed = fixed_ty != null; | ||
| 187 | return e; | ||
| 188 | } | ||
| 189 | }; | ||
| 190 | |||
| 191 | // might not need all 4 of these when finished, | ||
| 192 | // but currently it helps having all 4 when diff-ing | ||
| 193 | // the rust code. | ||
| 194 | pub const TypeLayout = struct { | ||
| 195 | /// The size of the type in bits. | ||
| 196 | /// | ||
| 197 | /// This is the value returned by `sizeof` and C and `std::mem::size_of` in Rust | ||
| 198 | /// (but in bits instead of bytes). This is a multiple of `pointer_alignment_bits`. | ||
| 199 | size_bits: u64, | ||
| 200 | /// The alignment of the type, in bits, when used as a field in a record. | ||
| 201 | /// | ||
| 202 | /// This is usually the value returned by `_Alignof` in C, but there are some edge | ||
| 203 | /// cases in GCC where `_Alignof` returns a smaller value. | ||
| 204 | field_alignment_bits: u32, | ||
| 205 | /// The alignment, in bits, of valid pointers to this type. | ||
| 206 | /// | ||
| 207 | /// This is the value returned by `std::mem::align_of` in Rust | ||
| 208 | /// (but in bits instead of bytes). `size_bits` is a multiple of this value. | ||
| 209 | pointer_alignment_bits: u32, | ||
| 210 | /// The required alignment of the type in bits. | ||
| 211 | /// | ||
| 212 | /// This value is only used by MSVC targets. It is 8 on all other | ||
| 213 | /// targets. On MSVC targets, this value restricts the effects of `#pragma pack` except | ||
| 214 | /// in some cases involving bit-fields. | ||
| 215 | required_alignment_bits: u32, | ||
| 216 | }; | ||
| 217 | |||
| 218 | pub const FieldLayout = struct { | ||
| 219 | /// `offset_bits` and `size_bits` should both be INVALID if and only if the field | ||
| 220 | /// is an unnamed bitfield. There is no way to reference an unnamed bitfield in C, so | ||
| 221 | /// there should be no way to observe these values. If it is used, this value will | ||
| 222 | /// maximize the chance that a safety-checked overflow will occur. | ||
| 223 | const INVALID = std.math.maxInt(u64); | ||
| 224 | |||
| 225 | /// The offset of the field, in bits, from the start of the struct. | ||
| 226 | offset_bits: u64 = INVALID, | ||
| 227 | /// The size, in bits, of the field. | ||
| 228 | /// | ||
| 229 | /// For bit-fields, this is the width of the field. | ||
| 230 | size_bits: u64 = INVALID, | ||
| 231 | |||
| 232 | pub fn isUnnamed(self: FieldLayout) bool { | ||
| 233 | return self.offset_bits == INVALID and self.size_bits == INVALID; | ||
| 234 | } | ||
| 235 | }; | ||
| 236 | |||
| 237 | // TODO improve memory usage | ||
| 238 | pub const Record = struct { | ||
| 239 | fields: []Field, | ||
| 240 | type_layout: TypeLayout, | ||
| 241 | /// If this is null, none of the fields have attributes | ||
| 242 | /// Otherwise, it's a pointer to N items (where N == number of fields) | ||
| 243 | /// and the item at index i is the attributes for the field at index i | ||
| 244 | field_attributes: ?[*][]const Attribute, | ||
| 245 | name: StringId, | ||
| 246 | |||
| 247 | pub const Field = struct { | ||
| 248 | ty: Type, | ||
| 249 | name: StringId, | ||
| 250 | /// zero for anonymous fields | ||
| 251 | name_tok: TokenIndex = 0, | ||
| 252 | bit_width: ?u32 = null, | ||
| 253 | layout: FieldLayout = .{ | ||
| 254 | .offset_bits = 0, | ||
| 255 | .size_bits = 0, | ||
| 256 | }, | ||
| 257 | |||
| 258 | pub fn isNamed(f: *const Field) bool { | ||
| 259 | return f.name_tok != 0; | ||
| 260 | } | ||
| 261 | |||
| 262 | pub fn isAnonymousRecord(f: Field) bool { | ||
| 263 | return !f.isNamed() and f.ty.isRecord(); | ||
| 264 | } | ||
| 265 | |||
| 266 | /// false for bitfields | ||
| 267 | pub fn isRegularField(f: *const Field) bool { | ||
| 268 | return f.bit_width == null; | ||
| 269 | } | ||
| 270 | |||
| 271 | /// bit width as specified in the C source. Asserts that `f` is a bitfield. | ||
| 272 | pub fn specifiedBitWidth(f: *const Field) u32 { | ||
| 273 | return f.bit_width.?; | ||
| 274 | } | ||
| 275 | }; | ||
| 276 | |||
| 277 | pub fn isIncomplete(r: Record) bool { | ||
| 278 | return r.fields.len == std.math.maxInt(usize); | ||
| 279 | } | ||
| 280 | |||
| 281 | pub fn create(allocator: std.mem.Allocator, name: StringId) !*Record { | ||
| 282 | var r = try allocator.create(Record); | ||
| 283 | r.name = name; | ||
| 284 | r.fields.len = std.math.maxInt(usize); | ||
| 285 | r.field_attributes = null; | ||
| 286 | r.type_layout = .{ | ||
| 287 | .size_bits = 8, | ||
| 288 | .field_alignment_bits = 8, | ||
| 289 | .pointer_alignment_bits = 8, | ||
| 290 | .required_alignment_bits = 8, | ||
| 291 | }; | ||
| 292 | return r; | ||
| 293 | } | ||
| 294 | |||
| 295 | pub fn hasFieldOfType(self: *const Record, ty: Type, comp: *const Compilation) bool { | ||
| 296 | if (self.isIncomplete()) return false; | ||
| 297 | for (self.fields) |f| { | ||
| 298 | if (ty.eql(f.ty, comp, false)) return true; | ||
| 299 | } | ||
| 300 | return false; | ||
| 301 | } | ||
| 302 | }; | ||
| 303 | |||
| 304 | pub const Specifier = enum { | ||
| 305 | /// A NaN-like poison value | ||
| 306 | invalid, | ||
| 307 | |||
| 308 | /// GNU auto type | ||
| 309 | /// This is a placeholder specifier - it must be replaced by the actual type specifier (determined by the initializer) | ||
| 310 | auto_type, | ||
| 311 | /// C23 auto, behaves like auto_type | ||
| 312 | c23_auto, | ||
| 313 | |||
| 314 | void, | ||
| 315 | bool, | ||
| 316 | |||
| 317 | // integers | ||
| 318 | char, | ||
| 319 | schar, | ||
| 320 | uchar, | ||
| 321 | short, | ||
| 322 | ushort, | ||
| 323 | int, | ||
| 324 | uint, | ||
| 325 | long, | ||
| 326 | ulong, | ||
| 327 | long_long, | ||
| 328 | ulong_long, | ||
| 329 | int128, | ||
| 330 | uint128, | ||
| 331 | complex_char, | ||
| 332 | complex_schar, | ||
| 333 | complex_uchar, | ||
| 334 | complex_short, | ||
| 335 | complex_ushort, | ||
| 336 | complex_int, | ||
| 337 | complex_uint, | ||
| 338 | complex_long, | ||
| 339 | complex_ulong, | ||
| 340 | complex_long_long, | ||
| 341 | complex_ulong_long, | ||
| 342 | complex_int128, | ||
| 343 | complex_uint128, | ||
| 344 | |||
| 345 | // data.int | ||
| 346 | bit_int, | ||
| 347 | complex_bit_int, | ||
| 348 | |||
| 349 | // floating point numbers | ||
| 350 | fp16, | ||
| 351 | float16, | ||
| 352 | float, | ||
| 353 | double, | ||
| 354 | long_double, | ||
| 355 | float80, | ||
| 356 | float128, | ||
| 357 | complex_float, | ||
| 358 | complex_double, | ||
| 359 | complex_long_double, | ||
| 360 | complex_float80, | ||
| 361 | complex_float128, | ||
| 362 | |||
| 363 | // data.sub_type | ||
| 364 | pointer, | ||
| 365 | unspecified_variable_len_array, | ||
| 366 | decayed_unspecified_variable_len_array, | ||
| 367 | // data.func | ||
| 368 | /// int foo(int bar, char baz) and int (void) | ||
| 369 | func, | ||
| 370 | /// int foo(int bar, char baz, ...) | ||
| 371 | var_args_func, | ||
| 372 | /// int foo(bar, baz) and int foo() | ||
| 373 | /// is also var args, but we can give warnings about incorrect amounts of parameters | ||
| 374 | old_style_func, | ||
| 375 | |||
| 376 | // data.array | ||
| 377 | array, | ||
| 378 | decayed_array, | ||
| 379 | static_array, | ||
| 380 | decayed_static_array, | ||
| 381 | incomplete_array, | ||
| 382 | decayed_incomplete_array, | ||
| 383 | vector, | ||
| 384 | // data.expr | ||
| 385 | variable_len_array, | ||
| 386 | decayed_variable_len_array, | ||
| 387 | |||
| 388 | // data.record | ||
| 389 | @"struct", | ||
| 390 | @"union", | ||
| 391 | |||
| 392 | // data.enum | ||
| 393 | @"enum", | ||
| 394 | |||
| 395 | /// typeof(type-name) | ||
| 396 | typeof_type, | ||
| 397 | /// decayed array created with typeof(type-name) | ||
| 398 | decayed_typeof_type, | ||
| 399 | |||
| 400 | /// typeof(expression) | ||
| 401 | typeof_expr, | ||
| 402 | /// decayed array created with typeof(expression) | ||
| 403 | decayed_typeof_expr, | ||
| 404 | |||
| 405 | /// data.attributed | ||
| 406 | attributed, | ||
| 407 | |||
| 408 | /// C23 nullptr_t | ||
| 409 | nullptr_t, | ||
| 410 | }; | ||
| 411 | |||
| 412 | const Type = @This(); | ||
| 413 | |||
| 414 | /// All fields of Type except data may be mutated | ||
| 415 | data: union { | ||
| 416 | sub_type: *Type, | ||
| 417 | func: *Func, | ||
| 418 | array: *Array, | ||
| 419 | expr: *Expr, | ||
| 420 | @"enum": *Enum, | ||
| 421 | record: *Record, | ||
| 422 | attributed: *Attributed, | ||
| 423 | none: void, | ||
| 424 | int: struct { | ||
| 425 | bits: u16, | ||
| 426 | signedness: std.builtin.Signedness, | ||
| 427 | }, | ||
| 428 | } = .{ .none = {} }, | ||
| 429 | specifier: Specifier, | ||
| 430 | qual: Qualifiers = .{}, | ||
| 431 | |||
| 432 | pub const int = Type{ .specifier = .int }; | ||
| 433 | pub const invalid = Type{ .specifier = .invalid }; | ||
| 434 | |||
| 435 | /// Determine if type matches the given specifier, recursing into typeof | ||
| 436 | /// types if necessary. | ||
| 437 | pub fn is(ty: Type, specifier: Specifier) bool { | ||
| 438 | std.debug.assert(specifier != .typeof_type and specifier != .typeof_expr); | ||
| 439 | return ty.get(specifier) != null; | ||
| 440 | } | ||
| 441 | |||
| 442 | pub fn withAttributes(self: Type, allocator: std.mem.Allocator, attributes: []const Attribute) !Type { | ||
| 443 | if (attributes.len == 0) return self; | ||
| 444 | const attributed_type = try Type.Attributed.create(allocator, self, self.getAttributes(), attributes); | ||
| 445 | return Type{ .specifier = .attributed, .data = .{ .attributed = attributed_type } }; | ||
| 446 | } | ||
| 447 | |||
| 448 | pub fn isCallable(ty: Type) ?Type { | ||
| 449 | return switch (ty.specifier) { | ||
| 450 | .func, .var_args_func, .old_style_func => ty, | ||
| 451 | .pointer => if (ty.data.sub_type.isFunc()) ty.data.sub_type.* else null, | ||
| 452 | .typeof_type => ty.data.sub_type.isCallable(), | ||
| 453 | .typeof_expr => ty.data.expr.ty.isCallable(), | ||
| 454 | .attributed => ty.data.attributed.base.isCallable(), | ||
| 455 | else => null, | ||
| 456 | }; | ||
| 457 | } | ||
| 458 | |||
| 459 | pub fn isFunc(ty: Type) bool { | ||
| 460 | return switch (ty.specifier) { | ||
| 461 | .func, .var_args_func, .old_style_func => true, | ||
| 462 | .typeof_type => ty.data.sub_type.isFunc(), | ||
| 463 | .typeof_expr => ty.data.expr.ty.isFunc(), | ||
| 464 | .attributed => ty.data.attributed.base.isFunc(), | ||
| 465 | else => false, | ||
| 466 | }; | ||
| 467 | } | ||
| 468 | |||
| 469 | pub fn isArray(ty: Type) bool { | ||
| 470 | return switch (ty.specifier) { | ||
| 471 | .array, .static_array, .incomplete_array, .variable_len_array, .unspecified_variable_len_array => true, | ||
| 472 | .typeof_type => ty.data.sub_type.isArray(), | ||
| 473 | .typeof_expr => ty.data.expr.ty.isArray(), | ||
| 474 | .attributed => ty.data.attributed.base.isArray(), | ||
| 475 | else => false, | ||
| 476 | }; | ||
| 477 | } | ||
| 478 | |||
| 479 | /// Whether the type is promoted if used as a variadic argument or as an argument to a function with no prototype | ||
| 480 | fn undergoesDefaultArgPromotion(ty: Type, comp: *const Compilation) bool { | ||
| 481 | return switch (ty.specifier) { | ||
| 482 | .bool => true, | ||
| 483 | .char, .uchar, .schar => true, | ||
| 484 | .short, .ushort => true, | ||
| 485 | .@"enum" => if (comp.langopts.emulate == .clang) ty.data.@"enum".isIncomplete() else false, | ||
| 486 | .float => true, | ||
| 487 | |||
| 488 | .typeof_type => ty.data.sub_type.undergoesDefaultArgPromotion(comp), | ||
| 489 | .typeof_expr => ty.data.expr.ty.undergoesDefaultArgPromotion(comp), | ||
| 490 | .attributed => ty.data.attributed.base.undergoesDefaultArgPromotion(comp), | ||
| 491 | else => false, | ||
| 492 | }; | ||
| 493 | } | ||
| 494 | |||
| 495 | pub fn isScalar(ty: Type) bool { | ||
| 496 | return ty.isInt() or ty.isScalarNonInt(); | ||
| 497 | } | ||
| 498 | |||
| 499 | /// To avoid calling isInt() twice for allowable loop/if controlling expressions | ||
| 500 | pub fn isScalarNonInt(ty: Type) bool { | ||
| 501 | return ty.isFloat() or ty.isPtr() or ty.is(.nullptr_t); | ||
| 502 | } | ||
| 503 | |||
| 504 | pub fn isDecayed(ty: Type) bool { | ||
| 505 | const decayed = switch (ty.specifier) { | ||
| 506 | .decayed_array, | ||
| 507 | .decayed_static_array, | ||
| 508 | .decayed_incomplete_array, | ||
| 509 | .decayed_variable_len_array, | ||
| 510 | .decayed_unspecified_variable_len_array, | ||
| 511 | .decayed_typeof_type, | ||
| 512 | .decayed_typeof_expr, | ||
| 513 | => true, | ||
| 514 | else => false, | ||
| 515 | }; | ||
| 516 | std.debug.assert(decayed or !std.mem.startsWith(u8, @tagName(ty.specifier), "decayed")); | ||
| 517 | return decayed; | ||
| 518 | } | ||
| 519 | |||
| 520 | pub fn isPtr(ty: Type) bool { | ||
| 521 | return switch (ty.specifier) { | ||
| 522 | .pointer, | ||
| 523 | .decayed_array, | ||
| 524 | .decayed_static_array, | ||
| 525 | .decayed_incomplete_array, | ||
| 526 | .decayed_variable_len_array, | ||
| 527 | .decayed_unspecified_variable_len_array, | ||
| 528 | .decayed_typeof_type, | ||
| 529 | .decayed_typeof_expr, | ||
| 530 | => true, | ||
| 531 | .typeof_type => ty.data.sub_type.isPtr(), | ||
| 532 | .typeof_expr => ty.data.expr.ty.isPtr(), | ||
| 533 | .attributed => ty.data.attributed.base.isPtr(), | ||
| 534 | else => false, | ||
| 535 | }; | ||
| 536 | } | ||
| 537 | |||
| 538 | pub fn isInt(ty: Type) bool { | ||
| 539 | return switch (ty.specifier) { | ||
| 540 | // zig fmt: off | ||
| 541 | .@"enum", .bool, .char, .schar, .uchar, .short, .ushort, .int, .uint, .long, .ulong, | ||
| 542 | .long_long, .ulong_long, .int128, .uint128, .complex_char, .complex_schar, .complex_uchar, | ||
| 543 | .complex_short, .complex_ushort, .complex_int, .complex_uint, .complex_long, .complex_ulong, | ||
| 544 | .complex_long_long, .complex_ulong_long, .complex_int128, .complex_uint128, | ||
| 545 | .bit_int, .complex_bit_int => true, | ||
| 546 | // zig fmt: on | ||
| 547 | .typeof_type => ty.data.sub_type.isInt(), | ||
| 548 | .typeof_expr => ty.data.expr.ty.isInt(), | ||
| 549 | .attributed => ty.data.attributed.base.isInt(), | ||
| 550 | else => false, | ||
| 551 | }; | ||
| 552 | } | ||
| 553 | |||
| 554 | pub fn isFloat(ty: Type) bool { | ||
| 555 | return switch (ty.specifier) { | ||
| 556 | // zig fmt: off | ||
| 557 | .float, .double, .long_double, .complex_float, .complex_double, .complex_long_double, | ||
| 558 | .fp16, .float16, .float80, .float128, .complex_float80, .complex_float128 => true, | ||
| 559 | // zig fmt: on | ||
| 560 | .typeof_type => ty.data.sub_type.isFloat(), | ||
| 561 | .typeof_expr => ty.data.expr.ty.isFloat(), | ||
| 562 | .attributed => ty.data.attributed.base.isFloat(), | ||
| 563 | else => false, | ||
| 564 | }; | ||
| 565 | } | ||
| 566 | |||
| 567 | pub fn isReal(ty: Type) bool { | ||
| 568 | return switch (ty.specifier) { | ||
| 569 | // zig fmt: off | ||
| 570 | .complex_float, .complex_double, .complex_long_double, .complex_float80, | ||
| 571 | .complex_float128, .complex_char, .complex_schar, .complex_uchar, .complex_short, | ||
| 572 | .complex_ushort, .complex_int, .complex_uint, .complex_long, .complex_ulong, | ||
| 573 | .complex_long_long, .complex_ulong_long, .complex_int128, .complex_uint128, | ||
| 574 | .complex_bit_int => false, | ||
| 575 | // zig fmt: on | ||
| 576 | .typeof_type => ty.data.sub_type.isReal(), | ||
| 577 | .typeof_expr => ty.data.expr.ty.isReal(), | ||
| 578 | .attributed => ty.data.attributed.base.isReal(), | ||
| 579 | else => true, | ||
| 580 | }; | ||
| 581 | } | ||
| 582 | |||
| 583 | pub fn isComplex(ty: Type) bool { | ||
| 584 | return switch (ty.specifier) { | ||
| 585 | // zig fmt: off | ||
| 586 | .complex_float, .complex_double, .complex_long_double, .complex_float80, | ||
| 587 | .complex_float128, .complex_char, .complex_schar, .complex_uchar, .complex_short, | ||
| 588 | .complex_ushort, .complex_int, .complex_uint, .complex_long, .complex_ulong, | ||
| 589 | .complex_long_long, .complex_ulong_long, .complex_int128, .complex_uint128, | ||
| 590 | .complex_bit_int => true, | ||
| 591 | // zig fmt: on | ||
| 592 | .typeof_type => ty.data.sub_type.isComplex(), | ||
| 593 | .typeof_expr => ty.data.expr.ty.isComplex(), | ||
| 594 | .attributed => ty.data.attributed.base.isComplex(), | ||
| 595 | else => false, | ||
| 596 | }; | ||
| 597 | } | ||
| 598 | |||
| 599 | pub fn isVoidStar(ty: Type) bool { | ||
| 600 | return switch (ty.specifier) { | ||
| 601 | .pointer => ty.data.sub_type.specifier == .void, | ||
| 602 | .typeof_type => ty.data.sub_type.isVoidStar(), | ||
| 603 | .typeof_expr => ty.data.expr.ty.isVoidStar(), | ||
| 604 | .attributed => ty.data.attributed.base.isVoidStar(), | ||
| 605 | else => false, | ||
| 606 | }; | ||
| 607 | } | ||
| 608 | |||
| 609 | pub fn isTypeof(ty: Type) bool { | ||
| 610 | return switch (ty.specifier) { | ||
| 611 | .typeof_type, .typeof_expr, .decayed_typeof_type, .decayed_typeof_expr => true, | ||
| 612 | else => false, | ||
| 613 | }; | ||
| 614 | } | ||
| 615 | |||
| 616 | pub fn isConst(ty: Type) bool { | ||
| 617 | return switch (ty.specifier) { | ||
| 618 | .typeof_type, .decayed_typeof_type => ty.qual.@"const" or ty.data.sub_type.isConst(), | ||
| 619 | .typeof_expr, .decayed_typeof_expr => ty.qual.@"const" or ty.data.expr.ty.isConst(), | ||
| 620 | .attributed => ty.data.attributed.base.isConst(), | ||
| 621 | else => ty.qual.@"const", | ||
| 622 | }; | ||
| 623 | } | ||
| 624 | |||
| 625 | pub fn isUnsignedInt(ty: Type, comp: *const Compilation) bool { | ||
| 626 | return ty.signedness(comp) == .unsigned; | ||
| 627 | } | ||
| 628 | |||
| 629 | pub fn signedness(ty: Type, comp: *const Compilation) std.builtin.Signedness { | ||
| 630 | return switch (ty.specifier) { | ||
| 631 | // zig fmt: off | ||
| 632 | .char, .complex_char => return comp.getCharSignedness(), | ||
| 633 | .uchar, .ushort, .uint, .ulong, .ulong_long, .bool, .complex_uchar, .complex_ushort, | ||
| 634 | .complex_uint, .complex_ulong, .complex_ulong_long, .complex_uint128 => .unsigned, | ||
| 635 | // zig fmt: on | ||
| 636 | .bit_int, .complex_bit_int => ty.data.int.signedness, | ||
| 637 | .typeof_type => ty.data.sub_type.signedness(comp), | ||
| 638 | .typeof_expr => ty.data.expr.ty.signedness(comp), | ||
| 639 | .attributed => ty.data.attributed.base.signedness(comp), | ||
| 640 | else => .signed, | ||
| 641 | }; | ||
| 642 | } | ||
| 643 | |||
| 644 | pub fn isEnumOrRecord(ty: Type) bool { | ||
| 645 | return switch (ty.specifier) { | ||
| 646 | .@"enum", .@"struct", .@"union" => true, | ||
| 647 | .typeof_type => ty.data.sub_type.isEnumOrRecord(), | ||
| 648 | .typeof_expr => ty.data.expr.ty.isEnumOrRecord(), | ||
| 649 | .attributed => ty.data.attributed.base.isEnumOrRecord(), | ||
| 650 | else => false, | ||
| 651 | }; | ||
| 652 | } | ||
| 653 | |||
| 654 | pub fn isRecord(ty: Type) bool { | ||
| 655 | return switch (ty.specifier) { | ||
| 656 | .@"struct", .@"union" => true, | ||
| 657 | .typeof_type => ty.data.sub_type.isRecord(), | ||
| 658 | .typeof_expr => ty.data.expr.ty.isRecord(), | ||
| 659 | .attributed => ty.data.attributed.base.isRecord(), | ||
| 660 | else => false, | ||
| 661 | }; | ||
| 662 | } | ||
| 663 | |||
| 664 | pub fn isAnonymousRecord(ty: Type, comp: *const Compilation) bool { | ||
| 665 | return switch (ty.specifier) { | ||
| 666 | // anonymous records can be recognized by their names which are in | ||
| 667 | // the format "(anonymous TAG at path:line:col)". | ||
| 668 | .@"struct", .@"union" => { | ||
| 669 | const mapper = comp.string_interner.getSlowTypeMapper(); | ||
| 670 | return mapper.lookup(ty.data.record.name)[0] == '('; | ||
| 671 | }, | ||
| 672 | .typeof_type => ty.data.sub_type.isAnonymousRecord(comp), | ||
| 673 | .typeof_expr => ty.data.expr.ty.isAnonymousRecord(comp), | ||
| 674 | .attributed => ty.data.attributed.base.isAnonymousRecord(comp), | ||
| 675 | else => false, | ||
| 676 | }; | ||
| 677 | } | ||
| 678 | |||
| 679 | pub fn elemType(ty: Type) Type { | ||
| 680 | return switch (ty.specifier) { | ||
| 681 | .pointer, .unspecified_variable_len_array, .decayed_unspecified_variable_len_array => ty.data.sub_type.*, | ||
| 682 | .array, .static_array, .incomplete_array, .decayed_array, .decayed_static_array, .decayed_incomplete_array, .vector => ty.data.array.elem, | ||
| 683 | .variable_len_array, .decayed_variable_len_array => ty.data.expr.ty, | ||
| 684 | .typeof_type, .decayed_typeof_type, .typeof_expr, .decayed_typeof_expr => { | ||
| 685 | const unwrapped = ty.canonicalize(.preserve_quals); | ||
| 686 | var elem = unwrapped.elemType(); | ||
| 687 | elem.qual = elem.qual.mergeAll(unwrapped.qual); | ||
| 688 | return elem; | ||
| 689 | }, | ||
| 690 | .attributed => ty.data.attributed.base, | ||
| 691 | .invalid => Type.invalid, | ||
| 692 | // zig fmt: off | ||
| 693 | .complex_float, .complex_double, .complex_long_double, .complex_float80, | ||
| 694 | .complex_float128, .complex_char, .complex_schar, .complex_uchar, .complex_short, | ||
| 695 | .complex_ushort, .complex_int, .complex_uint, .complex_long, .complex_ulong, | ||
| 696 | .complex_long_long, .complex_ulong_long, .complex_int128, .complex_uint128, | ||
| 697 | .complex_bit_int => ty.makeReal(), | ||
| 698 | // zig fmt: on | ||
| 699 | else => unreachable, | ||
| 700 | }; | ||
| 701 | } | ||
| 702 | |||
| 703 | pub fn returnType(ty: Type) Type { | ||
| 704 | return switch (ty.specifier) { | ||
| 705 | .func, .var_args_func, .old_style_func => ty.data.func.return_type, | ||
| 706 | .typeof_type, .decayed_typeof_type => ty.data.sub_type.returnType(), | ||
| 707 | .typeof_expr, .decayed_typeof_expr => ty.data.expr.ty.returnType(), | ||
| 708 | .attributed => ty.data.attributed.base.returnType(), | ||
| 709 | .invalid => Type.invalid, | ||
| 710 | else => unreachable, | ||
| 711 | }; | ||
| 712 | } | ||
| 713 | |||
| 714 | pub fn params(ty: Type) []Func.Param { | ||
| 715 | return switch (ty.specifier) { | ||
| 716 | .func, .var_args_func, .old_style_func => ty.data.func.params, | ||
| 717 | .typeof_type, .decayed_typeof_type => ty.data.sub_type.params(), | ||
| 718 | .typeof_expr, .decayed_typeof_expr => ty.data.expr.ty.params(), | ||
| 719 | .attributed => ty.data.attributed.base.params(), | ||
| 720 | .invalid => &.{}, | ||
| 721 | else => unreachable, | ||
| 722 | }; | ||
| 723 | } | ||
| 724 | |||
| 725 | pub fn arrayLen(ty: Type) ?u64 { | ||
| 726 | return switch (ty.specifier) { | ||
| 727 | .array, .static_array, .decayed_array, .decayed_static_array => ty.data.array.len, | ||
| 728 | .typeof_type, .decayed_typeof_type => ty.data.sub_type.arrayLen(), | ||
| 729 | .typeof_expr, .decayed_typeof_expr => ty.data.expr.ty.arrayLen(), | ||
| 730 | .attributed => ty.data.attributed.base.arrayLen(), | ||
| 731 | else => null, | ||
| 732 | }; | ||
| 733 | } | ||
| 734 | |||
| 735 | /// Complex numbers are scalars but they can be initialized with a 2-element initList | ||
| 736 | pub fn expectedInitListSize(ty: Type) ?u64 { | ||
| 737 | return if (ty.isComplex()) 2 else ty.arrayLen(); | ||
| 738 | } | ||
| 739 | |||
| 740 | pub fn anyQual(ty: Type) bool { | ||
| 741 | return switch (ty.specifier) { | ||
| 742 | .typeof_type => ty.qual.any() or ty.data.sub_type.anyQual(), | ||
| 743 | .typeof_expr => ty.qual.any() or ty.data.expr.ty.anyQual(), | ||
| 744 | else => ty.qual.any(), | ||
| 745 | }; | ||
| 746 | } | ||
| 747 | |||
| 748 | pub fn getAttributes(ty: Type) []const Attribute { | ||
| 749 | return switch (ty.specifier) { | ||
| 750 | .attributed => ty.data.attributed.attributes, | ||
| 751 | .typeof_type, .decayed_typeof_type => ty.data.sub_type.getAttributes(), | ||
| 752 | .typeof_expr, .decayed_typeof_expr => ty.data.expr.ty.getAttributes(), | ||
| 753 | else => &.{}, | ||
| 754 | }; | ||
| 755 | } | ||
| 756 | |||
| 757 | pub fn getRecord(ty: Type) ?*const Type.Record { | ||
| 758 | return switch (ty.specifier) { | ||
| 759 | .attributed => ty.data.attributed.base.getRecord(), | ||
| 760 | .typeof_type, .decayed_typeof_type => ty.data.sub_type.getRecord(), | ||
| 761 | .typeof_expr, .decayed_typeof_expr => ty.data.expr.ty.getRecord(), | ||
| 762 | .@"struct", .@"union" => ty.data.record, | ||
| 763 | else => null, | ||
| 764 | }; | ||
| 765 | } | ||
| 766 | |||
| 767 | pub fn compareIntegerRanks(a: Type, b: Type, comp: *const Compilation) std.math.Order { | ||
| 768 | std.debug.assert(a.isInt() and b.isInt()); | ||
| 769 | if (a.eql(b, comp, false)) return .eq; | ||
| 770 | |||
| 771 | const a_unsigned = a.isUnsignedInt(comp); | ||
| 772 | const b_unsigned = b.isUnsignedInt(comp); | ||
| 773 | |||
| 774 | const a_rank = a.integerRank(comp); | ||
| 775 | const b_rank = b.integerRank(comp); | ||
| 776 | if (a_unsigned == b_unsigned) { | ||
| 777 | return std.math.order(a_rank, b_rank); | ||
| 778 | } | ||
| 779 | if (a_unsigned) { | ||
| 780 | if (a_rank >= b_rank) return .gt; | ||
| 781 | return .lt; | ||
| 782 | } | ||
| 783 | std.debug.assert(b_unsigned); | ||
| 784 | if (b_rank >= a_rank) return .lt; | ||
| 785 | return .gt; | ||
| 786 | } | ||
| 787 | |||
| 788 | fn realIntegerConversion(a: Type, b: Type, comp: *const Compilation) Type { | ||
| 789 | std.debug.assert(a.isReal() and b.isReal()); | ||
| 790 | const type_order = a.compareIntegerRanks(b, comp); | ||
| 791 | const a_signed = !a.isUnsignedInt(comp); | ||
| 792 | const b_signed = !b.isUnsignedInt(comp); | ||
| 793 | if (a_signed == b_signed) { | ||
| 794 | // If both have the same sign, use higher-rank type. | ||
| 795 | return switch (type_order) { | ||
| 796 | .lt => b, | ||
| 797 | .eq, .gt => a, | ||
| 798 | }; | ||
| 799 | } else if (type_order != if (a_signed) std.math.Order.gt else std.math.Order.lt) { | ||
| 800 | // Only one is signed; and the unsigned type has rank >= the signed type | ||
| 801 | // Use the unsigned type | ||
| 802 | return if (b_signed) a else b; | ||
| 803 | } else if (a.bitSizeof(comp).? != b.bitSizeof(comp).?) { | ||
| 804 | // Signed type is higher rank and sizes are not equal | ||
| 805 | // Use the signed type | ||
| 806 | return if (a_signed) a else b; | ||
| 807 | } else { | ||
| 808 | // Signed type is higher rank but same size as unsigned type | ||
| 809 | // e.g. `long` and `unsigned` on x86-linux-gnu | ||
| 810 | // Use unsigned version of the signed type | ||
| 811 | return if (a_signed) a.makeIntegerUnsigned() else b.makeIntegerUnsigned(); | ||
| 812 | } | ||
| 813 | } | ||
| 814 | |||
| 815 | pub fn makeIntegerUnsigned(ty: Type) Type { | ||
| 816 | // TODO discards attributed/typeof | ||
| 817 | var base = ty.canonicalize(.standard); | ||
| 818 | switch (base.specifier) { | ||
| 819 | // zig fmt: off | ||
| 820 | .uchar, .ushort, .uint, .ulong, .ulong_long, .uint128, | ||
| 821 | .complex_uchar, .complex_ushort, .complex_uint, .complex_ulong, .complex_ulong_long, .complex_uint128, | ||
| 822 | => return ty, | ||
| 823 | // zig fmt: on | ||
| 824 | |||
| 825 | .char, .complex_char => { | ||
| 826 | base.specifier = @enumFromInt(@intFromEnum(base.specifier) + 2); | ||
| 827 | return base; | ||
| 828 | }, | ||
| 829 | |||
| 830 | // zig fmt: off | ||
| 831 | .schar, .short, .int, .long, .long_long, .int128, | ||
| 832 | .complex_schar, .complex_short, .complex_int, .complex_long, .complex_long_long, .complex_int128 => { | ||
| 833 | base.specifier = @enumFromInt(@intFromEnum(base.specifier) + 1); | ||
| 834 | return base; | ||
| 835 | }, | ||
| 836 | // zig fmt: on | ||
| 837 | |||
| 838 | .bit_int, .complex_bit_int => { | ||
| 839 | base.data.int.signedness = .unsigned; | ||
| 840 | return base; | ||
| 841 | }, | ||
| 842 | else => unreachable, | ||
| 843 | } | ||
| 844 | } | ||
| 845 | |||
| 846 | /// Find the common type of a and b for binary operations | ||
| 847 | pub fn integerConversion(a: Type, b: Type, comp: *const Compilation) Type { | ||
| 848 | const a_real = a.isReal(); | ||
| 849 | const b_real = b.isReal(); | ||
| 850 | const target_ty = a.makeReal().realIntegerConversion(b.makeReal(), comp); | ||
| 851 | return if (a_real and b_real) target_ty else target_ty.makeComplex(); | ||
| 852 | } | ||
| 853 | |||
| 854 | pub fn integerPromotion(ty: Type, comp: *Compilation) Type { | ||
| 855 | var specifier = ty.specifier; | ||
| 856 | switch (specifier) { | ||
| 857 | .@"enum" => { | ||
| 858 | if (ty.hasIncompleteSize()) return .{ .specifier = .int }; | ||
| 859 | specifier = ty.data.@"enum".tag_ty.specifier; | ||
| 860 | }, | ||
| 861 | .bit_int, .complex_bit_int => return .{ .specifier = specifier, .data = ty.data }, | ||
| 862 | else => {}, | ||
| 863 | } | ||
| 864 | return switch (specifier) { | ||
| 865 | else => .{ | ||
| 866 | .specifier = switch (specifier) { | ||
| 867 | // zig fmt: off | ||
| 868 | .bool, .char, .schar, .uchar, .short => .int, | ||
| 869 | .ushort => if (ty.sizeof(comp).? == sizeof(.{ .specifier = .int }, comp)) Specifier.uint else .int, | ||
| 870 | .int, .uint, .long, .ulong, .long_long, .ulong_long, .int128, .uint128, .complex_char, | ||
| 871 | .complex_schar, .complex_uchar, .complex_short, .complex_ushort, .complex_int, | ||
| 872 | .complex_uint, .complex_long, .complex_ulong, .complex_long_long, .complex_ulong_long, | ||
| 873 | .complex_int128, .complex_uint128 => specifier, | ||
| 874 | // zig fmt: on | ||
| 875 | .typeof_type => return ty.data.sub_type.integerPromotion(comp), | ||
| 876 | .typeof_expr => return ty.data.expr.ty.integerPromotion(comp), | ||
| 877 | .attributed => return ty.data.attributed.base.integerPromotion(comp), | ||
| 878 | .invalid => .invalid, | ||
| 879 | else => unreachable, // _BitInt, or not an integer type | ||
| 880 | }, | ||
| 881 | }, | ||
| 882 | }; | ||
| 883 | } | ||
| 884 | |||
| 885 | /// Promote a bitfield. If `int` can hold all the values of the underlying field, | ||
| 886 | /// promote to int. Otherwise, promote to unsigned int | ||
| 887 | /// Returns null if no promotion is necessary | ||
| 888 | pub fn bitfieldPromotion(ty: Type, comp: *Compilation, width: u32) ?Type { | ||
| 889 | const type_size_bits = ty.bitSizeof(comp).?; | ||
| 890 | |||
| 891 | // Note: GCC and clang will promote `long: 3` to int even though the C standard does not allow this | ||
| 892 | if (width < type_size_bits) { | ||
| 893 | return int; | ||
| 894 | } | ||
| 895 | |||
| 896 | if (width == type_size_bits) { | ||
| 897 | return if (ty.isUnsignedInt(comp)) .{ .specifier = .uint } else int; | ||
| 898 | } | ||
| 899 | |||
| 900 | return null; | ||
| 901 | } | ||
| 902 | |||
| 903 | pub fn hasIncompleteSize(ty: Type) bool { | ||
| 904 | return switch (ty.specifier) { | ||
| 905 | .void, .incomplete_array => true, | ||
| 906 | .@"enum" => ty.data.@"enum".isIncomplete() and !ty.data.@"enum".fixed, | ||
| 907 | .@"struct", .@"union" => ty.data.record.isIncomplete(), | ||
| 908 | .array, .static_array => ty.data.array.elem.hasIncompleteSize(), | ||
| 909 | .typeof_type => ty.data.sub_type.hasIncompleteSize(), | ||
| 910 | .typeof_expr => ty.data.expr.ty.hasIncompleteSize(), | ||
| 911 | .attributed => ty.data.attributed.base.hasIncompleteSize(), | ||
| 912 | else => false, | ||
| 913 | }; | ||
| 914 | } | ||
| 915 | |||
| 916 | pub fn hasUnboundVLA(ty: Type) bool { | ||
| 917 | var cur = ty; | ||
| 918 | while (true) { | ||
| 919 | switch (cur.specifier) { | ||
| 920 | .unspecified_variable_len_array, | ||
| 921 | .decayed_unspecified_variable_len_array, | ||
| 922 | => return true, | ||
| 923 | .array, | ||
| 924 | .static_array, | ||
| 925 | .incomplete_array, | ||
| 926 | .variable_len_array, | ||
| 927 | .decayed_array, | ||
| 928 | .decayed_static_array, | ||
| 929 | .decayed_incomplete_array, | ||
| 930 | .decayed_variable_len_array, | ||
| 931 | => cur = cur.elemType(), | ||
| 932 | .typeof_type, .decayed_typeof_type => cur = cur.data.sub_type.*, | ||
| 933 | .typeof_expr, .decayed_typeof_expr => cur = cur.data.expr.ty, | ||
| 934 | .attributed => cur = cur.data.attributed.base, | ||
| 935 | else => return false, | ||
| 936 | } | ||
| 937 | } | ||
| 938 | } | ||
| 939 | |||
| 940 | pub fn hasField(ty: Type, name: StringId) bool { | ||
| 941 | switch (ty.specifier) { | ||
| 942 | .@"struct" => { | ||
| 943 | std.debug.assert(!ty.data.record.isIncomplete()); | ||
| 944 | for (ty.data.record.fields) |f| { | ||
| 945 | if (f.isAnonymousRecord() and f.ty.hasField(name)) return true; | ||
| 946 | if (name == f.name) return true; | ||
| 947 | } | ||
| 948 | }, | ||
| 949 | .@"union" => { | ||
| 950 | std.debug.assert(!ty.data.record.isIncomplete()); | ||
| 951 | for (ty.data.record.fields) |f| { | ||
| 952 | if (f.isAnonymousRecord() and f.ty.hasField(name)) return true; | ||
| 953 | if (name == f.name) return true; | ||
| 954 | } | ||
| 955 | }, | ||
| 956 | .typeof_type => return ty.data.sub_type.hasField(name), | ||
| 957 | .typeof_expr => return ty.data.expr.ty.hasField(name), | ||
| 958 | .attributed => return ty.data.attributed.base.hasField(name), | ||
| 959 | .invalid => return false, | ||
| 960 | else => unreachable, | ||
| 961 | } | ||
| 962 | return false; | ||
| 963 | } | ||
| 964 | |||
| 965 | // TODO handle bitints | ||
| 966 | pub fn minInt(ty: Type, comp: *const Compilation) i64 { | ||
| 967 | std.debug.assert(ty.isInt()); | ||
| 968 | if (ty.isUnsignedInt(comp)) return 0; | ||
| 969 | return switch (ty.sizeof(comp).?) { | ||
| 970 | 1 => std.math.minInt(i8), | ||
| 971 | 2 => std.math.minInt(i16), | ||
| 972 | 4 => std.math.minInt(i32), | ||
| 973 | 8 => std.math.minInt(i64), | ||
| 974 | else => unreachable, | ||
| 975 | }; | ||
| 976 | } | ||
| 977 | |||
| 978 | // TODO handle bitints | ||
| 979 | pub fn maxInt(ty: Type, comp: *const Compilation) u64 { | ||
| 980 | std.debug.assert(ty.isInt()); | ||
| 981 | return switch (ty.sizeof(comp).?) { | ||
| 982 | 1 => if (ty.isUnsignedInt(comp)) @as(u64, std.math.maxInt(u8)) else std.math.maxInt(i8), | ||
| 983 | 2 => if (ty.isUnsignedInt(comp)) @as(u64, std.math.maxInt(u16)) else std.math.maxInt(i16), | ||
| 984 | 4 => if (ty.isUnsignedInt(comp)) @as(u64, std.math.maxInt(u32)) else std.math.maxInt(i32), | ||
| 985 | 8 => if (ty.isUnsignedInt(comp)) @as(u64, std.math.maxInt(u64)) else std.math.maxInt(i64), | ||
| 986 | else => unreachable, | ||
| 987 | }; | ||
| 988 | } | ||
| 989 | |||
| 990 | const TypeSizeOrder = enum { | ||
| 991 | lt, | ||
| 992 | gt, | ||
| 993 | eq, | ||
| 994 | indeterminate, | ||
| 995 | }; | ||
| 996 | |||
| 997 | pub fn sizeCompare(a: Type, b: Type, comp: *Compilation) TypeSizeOrder { | ||
| 998 | const a_size = a.sizeof(comp) orelse return .indeterminate; | ||
| 999 | const b_size = b.sizeof(comp) orelse return .indeterminate; | ||
| 1000 | return switch (std.math.order(a_size, b_size)) { | ||
| 1001 | .lt => .lt, | ||
| 1002 | .gt => .gt, | ||
| 1003 | .eq => .eq, | ||
| 1004 | }; | ||
| 1005 | } | ||
| 1006 | |||
| 1007 | /// Size of type as reported by sizeof | ||
| 1008 | pub fn sizeof(ty: Type, comp: *const Compilation) ?u64 { | ||
| 1009 | return switch (ty.specifier) { | ||
| 1010 | .auto_type, .c23_auto => unreachable, | ||
| 1011 | .variable_len_array, .unspecified_variable_len_array => return null, | ||
| 1012 | .incomplete_array => return if (comp.langopts.emulate == .msvc) @as(?u64, 0) else null, | ||
| 1013 | .func, .var_args_func, .old_style_func, .void, .bool => 1, | ||
| 1014 | .char, .schar, .uchar => 1, | ||
| 1015 | .short => comp.target.c_type_byte_size(.short), | ||
| 1016 | .ushort => comp.target.c_type_byte_size(.ushort), | ||
| 1017 | .int => comp.target.c_type_byte_size(.int), | ||
| 1018 | .uint => comp.target.c_type_byte_size(.uint), | ||
| 1019 | .long => comp.target.c_type_byte_size(.long), | ||
| 1020 | .ulong => comp.target.c_type_byte_size(.ulong), | ||
| 1021 | .long_long => comp.target.c_type_byte_size(.longlong), | ||
| 1022 | .ulong_long => comp.target.c_type_byte_size(.ulonglong), | ||
| 1023 | .long_double => comp.target.c_type_byte_size(.longdouble), | ||
| 1024 | .int128, .uint128 => 16, | ||
| 1025 | .fp16, .float16 => 2, | ||
| 1026 | .float => comp.target.c_type_byte_size(.float), | ||
| 1027 | .double => comp.target.c_type_byte_size(.double), | ||
| 1028 | .float80 => 16, | ||
| 1029 | .float128 => 16, | ||
| 1030 | .bit_int => { | ||
| 1031 | return std.mem.alignForward(u64, (ty.data.int.bits + 7) / 8, ty.alignof(comp)); | ||
| 1032 | }, | ||
| 1033 | // zig fmt: off | ||
| 1034 | .complex_char, .complex_schar, .complex_uchar, .complex_short, .complex_ushort, .complex_int, | ||
| 1035 | .complex_uint, .complex_long, .complex_ulong, .complex_long_long, .complex_ulong_long, | ||
| 1036 | .complex_int128, .complex_uint128, .complex_float, .complex_double, | ||
| 1037 | .complex_long_double, .complex_float80, .complex_float128, .complex_bit_int, | ||
| 1038 | => return 2 * ty.makeReal().sizeof(comp).?, | ||
| 1039 | // zig fmt: on | ||
| 1040 | .pointer, | ||
| 1041 | .decayed_array, | ||
| 1042 | .decayed_static_array, | ||
| 1043 | .decayed_incomplete_array, | ||
| 1044 | .decayed_variable_len_array, | ||
| 1045 | .decayed_unspecified_variable_len_array, | ||
| 1046 | .decayed_typeof_type, | ||
| 1047 | .decayed_typeof_expr, | ||
| 1048 | .static_array, | ||
| 1049 | .nullptr_t, | ||
| 1050 | => comp.target.ptrBitWidth() / 8, | ||
| 1051 | .array, .vector => { | ||
| 1052 | const size = ty.data.array.elem.sizeof(comp) orelse return null; | ||
| 1053 | const arr_size = size * ty.data.array.len; | ||
| 1054 | if (comp.langopts.emulate == .msvc) { | ||
| 1055 | // msvc ignores array type alignment. | ||
| 1056 | // Since the size might not be a multiple of the field | ||
| 1057 | // alignment, the address of the second element might not be properly aligned | ||
| 1058 | // for the field alignment. A flexible array has size 0. See test case 0018. | ||
| 1059 | return arr_size; | ||
| 1060 | } else { | ||
| 1061 | return std.mem.alignForward(u64, arr_size, ty.alignof(comp)); | ||
| 1062 | } | ||
| 1063 | }, | ||
| 1064 | .@"struct", .@"union" => if (ty.data.record.isIncomplete()) null else @as(u64, ty.data.record.type_layout.size_bits / 8), | ||
| 1065 | .@"enum" => if (ty.data.@"enum".isIncomplete() and !ty.data.@"enum".fixed) null else ty.data.@"enum".tag_ty.sizeof(comp), | ||
| 1066 | .typeof_type => ty.data.sub_type.sizeof(comp), | ||
| 1067 | .typeof_expr => ty.data.expr.ty.sizeof(comp), | ||
| 1068 | .attributed => ty.data.attributed.base.sizeof(comp), | ||
| 1069 | .invalid => return null, | ||
| 1070 | }; | ||
| 1071 | } | ||
| 1072 | |||
| 1073 | pub fn bitSizeof(ty: Type, comp: *const Compilation) ?u64 { | ||
| 1074 | return switch (ty.specifier) { | ||
| 1075 | .bool => if (comp.langopts.emulate == .msvc) @as(u64, 8) else 1, | ||
| 1076 | .typeof_type, .decayed_typeof_type => ty.data.sub_type.bitSizeof(comp), | ||
| 1077 | .typeof_expr, .decayed_typeof_expr => ty.data.expr.ty.bitSizeof(comp), | ||
| 1078 | .attributed => ty.data.attributed.base.bitSizeof(comp), | ||
| 1079 | .bit_int => return ty.data.int.bits, | ||
| 1080 | .long_double => comp.target.c_type_bit_size(.longdouble), | ||
| 1081 | .float80 => return 80, | ||
| 1082 | else => 8 * (ty.sizeof(comp) orelse return null), | ||
| 1083 | }; | ||
| 1084 | } | ||
| 1085 | |||
| 1086 | pub fn alignable(ty: Type) bool { | ||
| 1087 | return ty.isArray() or !ty.hasIncompleteSize() or ty.is(.void); | ||
| 1088 | } | ||
| 1089 | |||
| 1090 | /// Get the alignment of a type | ||
| 1091 | pub fn alignof(ty: Type, comp: *const Compilation) u29 { | ||
| 1092 | // don't return the attribute for records | ||
| 1093 | // layout has already accounted for requested alignment | ||
| 1094 | if (ty.requestedAlignment(comp)) |requested| { | ||
| 1095 | // gcc does not respect alignment on enums | ||
| 1096 | if (ty.get(.@"enum")) |ty_enum| { | ||
| 1097 | if (comp.langopts.emulate == .gcc) { | ||
| 1098 | return ty_enum.alignof(comp); | ||
| 1099 | } | ||
| 1100 | } else if (ty.getRecord()) |rec| { | ||
| 1101 | if (ty.hasIncompleteSize()) return 0; | ||
| 1102 | const computed: u29 = @intCast(@divExact(rec.type_layout.field_alignment_bits, 8)); | ||
| 1103 | return @max(requested, computed); | ||
| 1104 | } else if (comp.langopts.emulate == .msvc) { | ||
| 1105 | const type_align = ty.data.attributed.base.alignof(comp); | ||
| 1106 | return @max(requested, type_align); | ||
| 1107 | } | ||
| 1108 | return requested; | ||
| 1109 | } | ||
| 1110 | |||
| 1111 | return switch (ty.specifier) { | ||
| 1112 | .invalid => unreachable, | ||
| 1113 | .auto_type, .c23_auto => unreachable, | ||
| 1114 | |||
| 1115 | .variable_len_array, | ||
| 1116 | .incomplete_array, | ||
| 1117 | .unspecified_variable_len_array, | ||
| 1118 | .array, | ||
| 1119 | .vector, | ||
| 1120 | => ty.elemType().alignof(comp), | ||
| 1121 | .func, .var_args_func, .old_style_func => target_util.defaultFunctionAlignment(comp.target), | ||
| 1122 | .char, .schar, .uchar, .void, .bool => 1, | ||
| 1123 | |||
| 1124 | // zig fmt: off | ||
| 1125 | .complex_char, .complex_schar, .complex_uchar, .complex_short, .complex_ushort, .complex_int, | ||
| 1126 | .complex_uint, .complex_long, .complex_ulong, .complex_long_long, .complex_ulong_long, | ||
| 1127 | .complex_int128, .complex_uint128, .complex_float, .complex_double, | ||
| 1128 | .complex_long_double, .complex_float80, .complex_float128, .complex_bit_int, | ||
| 1129 | => return ty.makeReal().alignof(comp), | ||
| 1130 | // zig fmt: on | ||
| 1131 | |||
| 1132 | .short => comp.target.c_type_alignment(.short), | ||
| 1133 | .ushort => comp.target.c_type_alignment(.ushort), | ||
| 1134 | .int => comp.target.c_type_alignment(.int), | ||
| 1135 | .uint => comp.target.c_type_alignment(.uint), | ||
| 1136 | |||
| 1137 | .long => comp.target.c_type_alignment(.long), | ||
| 1138 | .ulong => comp.target.c_type_alignment(.ulong), | ||
| 1139 | .long_long => comp.target.c_type_alignment(.longlong), | ||
| 1140 | .ulong_long => comp.target.c_type_alignment(.ulonglong), | ||
| 1141 | |||
| 1142 | .bit_int => @min( | ||
| 1143 | std.math.ceilPowerOfTwoPromote(u16, (ty.data.int.bits + 7) / 8), | ||
| 1144 | comp.target.maxIntAlignment(), | ||
| 1145 | ), | ||
| 1146 | |||
| 1147 | .float => comp.target.c_type_alignment(.float), | ||
| 1148 | .double => comp.target.c_type_alignment(.double), | ||
| 1149 | .long_double => comp.target.c_type_alignment(.longdouble), | ||
| 1150 | |||
| 1151 | .int128, .uint128 => if (comp.target.cpu.arch == .s390x and comp.target.os.tag == .linux and comp.target.isGnu()) 8 else 16, | ||
| 1152 | .fp16, .float16 => 2, | ||
| 1153 | |||
| 1154 | .float80, .float128 => 16, | ||
| 1155 | .pointer, | ||
| 1156 | .decayed_array, | ||
| 1157 | .decayed_static_array, | ||
| 1158 | .decayed_incomplete_array, | ||
| 1159 | .decayed_variable_len_array, | ||
| 1160 | .decayed_unspecified_variable_len_array, | ||
| 1161 | .static_array, | ||
| 1162 | .nullptr_t, | ||
| 1163 | => switch (comp.target.cpu.arch) { | ||
| 1164 | .avr => 1, | ||
| 1165 | else => comp.target.ptrBitWidth() / 8, | ||
| 1166 | }, | ||
| 1167 | .@"struct", .@"union" => if (ty.data.record.isIncomplete()) 0 else @intCast(ty.data.record.type_layout.field_alignment_bits / 8), | ||
| 1168 | .@"enum" => if (ty.data.@"enum".isIncomplete() and !ty.data.@"enum".fixed) 0 else ty.data.@"enum".tag_ty.alignof(comp), | ||
| 1169 | .typeof_type, .decayed_typeof_type => ty.data.sub_type.alignof(comp), | ||
| 1170 | .typeof_expr, .decayed_typeof_expr => ty.data.expr.ty.alignof(comp), | ||
| 1171 | .attributed => ty.data.attributed.base.alignof(comp), | ||
| 1172 | }; | ||
| 1173 | } | ||
| 1174 | |||
| 1175 | /// Canonicalize a possibly-typeof() type. If the type is not a typeof() type, simply | ||
| 1176 | /// return it. Otherwise, determine the actual qualified type. | ||
| 1177 | /// The `qual_handling` parameter can be used to return the full set of qualifiers | ||
| 1178 | /// added by typeof() operations, which is useful when determining the elemType of | ||
| 1179 | /// arrays and pointers. | ||
| 1180 | pub fn canonicalize(ty: Type, qual_handling: enum { standard, preserve_quals }) Type { | ||
| 1181 | var cur = ty; | ||
| 1182 | if (cur.specifier == .attributed) cur = cur.data.attributed.base; | ||
| 1183 | if (!cur.isTypeof()) return cur; | ||
| 1184 | |||
| 1185 | var qual = cur.qual; | ||
| 1186 | while (true) { | ||
| 1187 | switch (cur.specifier) { | ||
| 1188 | .typeof_type => cur = cur.data.sub_type.*, | ||
| 1189 | .typeof_expr => cur = cur.data.expr.ty, | ||
| 1190 | .decayed_typeof_type => { | ||
| 1191 | cur = cur.data.sub_type.*; | ||
| 1192 | cur.decayArray(); | ||
| 1193 | }, | ||
| 1194 | .decayed_typeof_expr => { | ||
| 1195 | cur = cur.data.expr.ty; | ||
| 1196 | cur.decayArray(); | ||
| 1197 | }, | ||
| 1198 | else => break, | ||
| 1199 | } | ||
| 1200 | qual = qual.mergeAll(cur.qual); | ||
| 1201 | } | ||
| 1202 | if ((cur.isArray() or cur.isPtr()) and qual_handling == .standard) { | ||
| 1203 | cur.qual = .{}; | ||
| 1204 | } else { | ||
| 1205 | cur.qual = qual; | ||
| 1206 | } | ||
| 1207 | return cur; | ||
| 1208 | } | ||
| 1209 | |||
| 1210 | pub fn get(ty: *const Type, specifier: Specifier) ?*const Type { | ||
| 1211 | std.debug.assert(specifier != .typeof_type and specifier != .typeof_expr); | ||
| 1212 | return switch (ty.specifier) { | ||
| 1213 | .typeof_type => ty.data.sub_type.get(specifier), | ||
| 1214 | .typeof_expr => ty.data.expr.ty.get(specifier), | ||
| 1215 | .attributed => ty.data.attributed.base.get(specifier), | ||
| 1216 | else => if (ty.specifier == specifier) ty else null, | ||
| 1217 | }; | ||
| 1218 | } | ||
| 1219 | |||
| 1220 | pub fn requestedAlignment(ty: Type, comp: *const Compilation) ?u29 { | ||
| 1221 | return switch (ty.specifier) { | ||
| 1222 | .typeof_type, .decayed_typeof_type => ty.data.sub_type.requestedAlignment(comp), | ||
| 1223 | .typeof_expr, .decayed_typeof_expr => ty.data.expr.ty.requestedAlignment(comp), | ||
| 1224 | .attributed => annotationAlignment(comp, ty.data.attributed.attributes), | ||
| 1225 | else => null, | ||
| 1226 | }; | ||
| 1227 | } | ||
| 1228 | |||
| 1229 | pub fn enumIsPacked(ty: Type, comp: *const Compilation) bool { | ||
| 1230 | std.debug.assert(ty.is(.@"enum")); | ||
| 1231 | return comp.langopts.short_enums or target_util.packAllEnums(comp.target) or ty.hasAttribute(.@"packed"); | ||
| 1232 | } | ||
| 1233 | |||
| 1234 | pub fn annotationAlignment(comp: *const Compilation, attrs: ?[]const Attribute) ?u29 { | ||
| 1235 | const a = attrs orelse return null; | ||
| 1236 | |||
| 1237 | var max_requested: ?u29 = null; | ||
| 1238 | for (a) |attribute| { | ||
| 1239 | if (attribute.tag != .aligned) continue; | ||
| 1240 | const requested = if (attribute.args.aligned.alignment) |alignment| alignment.requested else target_util.defaultAlignment(comp.target); | ||
| 1241 | if (max_requested == null or max_requested.? < requested) { | ||
| 1242 | max_requested = requested; | ||
| 1243 | } | ||
| 1244 | } | ||
| 1245 | return max_requested; | ||
| 1246 | } | ||
| 1247 | |||
| 1248 | pub fn eql(a_param: Type, b_param: Type, comp: *const Compilation, check_qualifiers: bool) bool { | ||
| 1249 | const a = a_param.canonicalize(.standard); | ||
| 1250 | const b = b_param.canonicalize(.standard); | ||
| 1251 | |||
| 1252 | if (a.specifier == .invalid or b.specifier == .invalid) return false; | ||
| 1253 | if (a.alignof(comp) != b.alignof(comp)) return false; | ||
| 1254 | if (a.isPtr()) { | ||
| 1255 | if (!b.isPtr()) return false; | ||
| 1256 | } else if (a.isFunc()) { | ||
| 1257 | if (!b.isFunc()) return false; | ||
| 1258 | } else if (a.isArray()) { | ||
| 1259 | if (!b.isArray()) return false; | ||
| 1260 | } else if (a.specifier != b.specifier) return false; | ||
| 1261 | |||
| 1262 | if (a.qual.atomic != b.qual.atomic) return false; | ||
| 1263 | if (check_qualifiers) { | ||
| 1264 | if (a.qual.@"const" != b.qual.@"const") return false; | ||
| 1265 | if (a.qual.@"volatile" != b.qual.@"volatile") return false; | ||
| 1266 | } | ||
| 1267 | |||
| 1268 | switch (a.specifier) { | ||
| 1269 | .pointer, | ||
| 1270 | .decayed_array, | ||
| 1271 | .decayed_static_array, | ||
| 1272 | .decayed_incomplete_array, | ||
| 1273 | .decayed_variable_len_array, | ||
| 1274 | .decayed_unspecified_variable_len_array, | ||
| 1275 | => if (!a_param.elemType().eql(b_param.elemType(), comp, check_qualifiers)) return false, | ||
| 1276 | |||
| 1277 | .func, | ||
| 1278 | .var_args_func, | ||
| 1279 | .old_style_func, | ||
| 1280 | => if (!a.data.func.eql(b.data.func, a.specifier, b.specifier, comp)) return false, | ||
| 1281 | |||
| 1282 | .array, | ||
| 1283 | .static_array, | ||
| 1284 | .incomplete_array, | ||
| 1285 | .vector, | ||
| 1286 | => { | ||
| 1287 | const a_len = a.arrayLen(); | ||
| 1288 | const b_len = b.arrayLen(); | ||
| 1289 | if (a_len == null or b_len == null) { | ||
| 1290 | // At least one array is incomplete; only check child type for equality | ||
| 1291 | } else if (a_len.? != b_len.?) { | ||
| 1292 | return false; | ||
| 1293 | } | ||
| 1294 | if (!a.elemType().eql(b.elemType(), comp, false)) return false; | ||
| 1295 | }, | ||
| 1296 | .variable_len_array => if (!a.elemType().eql(b.elemType(), comp, check_qualifiers)) return false, | ||
| 1297 | |||
| 1298 | .@"struct", .@"union" => if (a.data.record != b.data.record) return false, | ||
| 1299 | .@"enum" => if (a.data.@"enum" != b.data.@"enum") return false, | ||
| 1300 | .bit_int, .complex_bit_int => return a.data.int.bits == b.data.int.bits and a.data.int.signedness == b.data.int.signedness, | ||
| 1301 | |||
| 1302 | else => {}, | ||
| 1303 | } | ||
| 1304 | return true; | ||
| 1305 | } | ||
| 1306 | |||
| 1307 | /// Decays an array to a pointer | ||
| 1308 | pub fn decayArray(ty: *Type) void { | ||
| 1309 | // the decayed array type is the current specifier +1 | ||
| 1310 | ty.specifier = @enumFromInt(@intFromEnum(ty.specifier) + 1); | ||
| 1311 | } | ||
| 1312 | |||
| 1313 | pub fn originalTypeOfDecayedArray(ty: Type) Type { | ||
| 1314 | std.debug.assert(ty.isDecayed()); | ||
| 1315 | var copy = ty; | ||
| 1316 | copy.specifier = @enumFromInt(@intFromEnum(ty.specifier) - 1); | ||
| 1317 | return copy; | ||
| 1318 | } | ||
| 1319 | |||
| 1320 | /// Rank for floating point conversions, ignoring domain (complex vs real) | ||
| 1321 | /// Asserts that ty is a floating point type | ||
| 1322 | pub fn floatRank(ty: Type) usize { | ||
| 1323 | const real = ty.makeReal(); | ||
| 1324 | return switch (real.specifier) { | ||
| 1325 | // TODO: bfloat16 => 0 | ||
| 1326 | .float16 => 1, | ||
| 1327 | .fp16 => 2, | ||
| 1328 | .float => 3, | ||
| 1329 | .double => 4, | ||
| 1330 | .long_double => 5, | ||
| 1331 | .float128 => 6, | ||
| 1332 | // TODO: ibm128 => 7 | ||
| 1333 | else => unreachable, | ||
| 1334 | }; | ||
| 1335 | } | ||
| 1336 | |||
| 1337 | /// Rank for integer conversions, ignoring domain (complex vs real) | ||
| 1338 | /// Asserts that ty is an integer type | ||
| 1339 | pub fn integerRank(ty: Type, comp: *const Compilation) usize { | ||
| 1340 | const real = ty.makeReal(); | ||
| 1341 | return @intCast(switch (real.specifier) { | ||
| 1342 | .bit_int => @as(u64, real.data.int.bits) << 3, | ||
| 1343 | |||
| 1344 | .bool => 1 + (ty.bitSizeof(comp).? << 3), | ||
| 1345 | .char, .schar, .uchar => 2 + (ty.bitSizeof(comp).? << 3), | ||
| 1346 | .short, .ushort => 3 + (ty.bitSizeof(comp).? << 3), | ||
| 1347 | .int, .uint => 4 + (ty.bitSizeof(comp).? << 3), | ||
| 1348 | .long, .ulong => 5 + (ty.bitSizeof(comp).? << 3), | ||
| 1349 | .long_long, .ulong_long => 6 + (ty.bitSizeof(comp).? << 3), | ||
| 1350 | .int128, .uint128 => 7 + (ty.bitSizeof(comp).? << 3), | ||
| 1351 | |||
| 1352 | else => unreachable, | ||
| 1353 | }); | ||
| 1354 | } | ||
| 1355 | |||
| 1356 | /// Returns true if `a` and `b` are integer types that differ only in sign | ||
| 1357 | pub fn sameRankDifferentSign(a: Type, b: Type, comp: *const Compilation) bool { | ||
| 1358 | if (!a.isInt() or !b.isInt()) return false; | ||
| 1359 | if (a.integerRank(comp) != b.integerRank(comp)) return false; | ||
| 1360 | return a.isUnsignedInt(comp) != b.isUnsignedInt(comp); | ||
| 1361 | } | ||
| 1362 | |||
| 1363 | pub fn makeReal(ty: Type) Type { | ||
| 1364 | // TODO discards attributed/typeof | ||
| 1365 | var base = ty.canonicalize(.standard); | ||
| 1366 | switch (base.specifier) { | ||
| 1367 | .complex_float, .complex_double, .complex_long_double, .complex_float80, .complex_float128 => { | ||
| 1368 | base.specifier = @enumFromInt(@intFromEnum(base.specifier) - 5); | ||
| 1369 | return base; | ||
| 1370 | }, | ||
| 1371 | .complex_char, .complex_schar, .complex_uchar, .complex_short, .complex_ushort, .complex_int, .complex_uint, .complex_long, .complex_ulong, .complex_long_long, .complex_ulong_long, .complex_int128, .complex_uint128 => { | ||
| 1372 | base.specifier = @enumFromInt(@intFromEnum(base.specifier) - 13); | ||
| 1373 | return base; | ||
| 1374 | }, | ||
| 1375 | .complex_bit_int => { | ||
| 1376 | base.specifier = .bit_int; | ||
| 1377 | return base; | ||
| 1378 | }, | ||
| 1379 | else => return ty, | ||
| 1380 | } | ||
| 1381 | } | ||
| 1382 | |||
| 1383 | pub fn makeComplex(ty: Type) Type { | ||
| 1384 | // TODO discards attributed/typeof | ||
| 1385 | var base = ty.canonicalize(.standard); | ||
| 1386 | switch (base.specifier) { | ||
| 1387 | .float, .double, .long_double, .float80, .float128 => { | ||
| 1388 | base.specifier = @enumFromInt(@intFromEnum(base.specifier) + 5); | ||
| 1389 | return base; | ||
| 1390 | }, | ||
| 1391 | .char, .schar, .uchar, .short, .ushort, .int, .uint, .long, .ulong, .long_long, .ulong_long, .int128, .uint128 => { | ||
| 1392 | base.specifier = @enumFromInt(@intFromEnum(base.specifier) + 13); | ||
| 1393 | return base; | ||
| 1394 | }, | ||
| 1395 | .bit_int => { | ||
| 1396 | base.specifier = .complex_bit_int; | ||
| 1397 | return base; | ||
| 1398 | }, | ||
| 1399 | else => return ty, | ||
| 1400 | } | ||
| 1401 | } | ||
| 1402 | |||
| 1403 | /// Combines types recursively in the order they were parsed, uses `.void` specifier as a sentinel value. | ||
| 1404 | pub fn combine(inner: *Type, outer: Type) Parser.Error!void { | ||
| 1405 | switch (inner.specifier) { | ||
| 1406 | .pointer => return inner.data.sub_type.combine(outer), | ||
| 1407 | .unspecified_variable_len_array => { | ||
| 1408 | try inner.data.sub_type.combine(outer); | ||
| 1409 | }, | ||
| 1410 | .variable_len_array => { | ||
| 1411 | try inner.data.expr.ty.combine(outer); | ||
| 1412 | }, | ||
| 1413 | .array, .static_array, .incomplete_array => { | ||
| 1414 | try inner.data.array.elem.combine(outer); | ||
| 1415 | }, | ||
| 1416 | .func, .var_args_func, .old_style_func => { | ||
| 1417 | try inner.data.func.return_type.combine(outer); | ||
| 1418 | }, | ||
| 1419 | .decayed_array, | ||
| 1420 | .decayed_static_array, | ||
| 1421 | .decayed_incomplete_array, | ||
| 1422 | .decayed_variable_len_array, | ||
| 1423 | .decayed_unspecified_variable_len_array, | ||
| 1424 | .decayed_typeof_type, | ||
| 1425 | .decayed_typeof_expr, | ||
| 1426 | => unreachable, // type should not be able to decay before being combined | ||
| 1427 | .void, .invalid => inner.* = outer, | ||
| 1428 | else => unreachable, | ||
| 1429 | } | ||
| 1430 | } | ||
| 1431 | |||
| 1432 | pub fn validateCombinedType(ty: Type, p: *Parser, source_tok: TokenIndex) Parser.Error!void { | ||
| 1433 | switch (ty.specifier) { | ||
| 1434 | .pointer => return ty.data.sub_type.validateCombinedType(p, source_tok), | ||
| 1435 | .unspecified_variable_len_array, | ||
| 1436 | .variable_len_array, | ||
| 1437 | .array, | ||
| 1438 | .static_array, | ||
| 1439 | .incomplete_array, | ||
| 1440 | => { | ||
| 1441 | const elem_ty = ty.elemType(); | ||
| 1442 | if (elem_ty.hasIncompleteSize()) { | ||
| 1443 | try p.errStr(.array_incomplete_elem, source_tok, try p.typeStr(elem_ty)); | ||
| 1444 | return error.ParsingFailed; | ||
| 1445 | } | ||
| 1446 | if (elem_ty.isFunc()) { | ||
| 1447 | try p.errTok(.array_func_elem, source_tok); | ||
| 1448 | return error.ParsingFailed; | ||
| 1449 | } | ||
| 1450 | if (elem_ty.specifier == .static_array and elem_ty.isArray()) { | ||
| 1451 | try p.errTok(.static_non_outermost_array, source_tok); | ||
| 1452 | } | ||
| 1453 | if (elem_ty.anyQual() and elem_ty.isArray()) { | ||
| 1454 | try p.errTok(.qualifier_non_outermost_array, source_tok); | ||
| 1455 | } | ||
| 1456 | }, | ||
| 1457 | .func, .var_args_func, .old_style_func => { | ||
| 1458 | const ret_ty = &ty.data.func.return_type; | ||
| 1459 | if (ret_ty.isArray()) try p.errTok(.func_cannot_return_array, source_tok); | ||
| 1460 | if (ret_ty.isFunc()) try p.errTok(.func_cannot_return_func, source_tok); | ||
| 1461 | if (ret_ty.qual.@"const") { | ||
| 1462 | try p.errStr(.qual_on_ret_type, source_tok, "const"); | ||
| 1463 | ret_ty.qual.@"const" = false; | ||
| 1464 | } | ||
| 1465 | if (ret_ty.qual.@"volatile") { | ||
| 1466 | try p.errStr(.qual_on_ret_type, source_tok, "volatile"); | ||
| 1467 | ret_ty.qual.@"volatile" = false; | ||
| 1468 | } | ||
| 1469 | if (ret_ty.qual.atomic) { | ||
| 1470 | try p.errStr(.qual_on_ret_type, source_tok, "atomic"); | ||
| 1471 | ret_ty.qual.atomic = false; | ||
| 1472 | } | ||
| 1473 | if (ret_ty.is(.fp16) and !p.comp.hasHalfPrecisionFloatABI()) { | ||
| 1474 | try p.errStr(.suggest_pointer_for_invalid_fp16, source_tok, "function return value"); | ||
| 1475 | } | ||
| 1476 | }, | ||
| 1477 | .typeof_type, .decayed_typeof_type => return ty.data.sub_type.validateCombinedType(p, source_tok), | ||
| 1478 | .typeof_expr, .decayed_typeof_expr => return ty.data.expr.ty.validateCombinedType(p, source_tok), | ||
| 1479 | .attributed => return ty.data.attributed.base.validateCombinedType(p, source_tok), | ||
| 1480 | else => {}, | ||
| 1481 | } | ||
| 1482 | } | ||
| 1483 | |||
| 1484 | /// An unfinished Type | ||
| 1485 | pub const Builder = struct { | ||
| 1486 | complex_tok: ?TokenIndex = null, | ||
| 1487 | bit_int_tok: ?TokenIndex = null, | ||
| 1488 | auto_type_tok: ?TokenIndex = null, | ||
| 1489 | typedef: ?struct { | ||
| 1490 | tok: TokenIndex, | ||
| 1491 | ty: Type, | ||
| 1492 | } = null, | ||
| 1493 | specifier: Builder.Specifier = .none, | ||
| 1494 | qual: Qualifiers.Builder = .{}, | ||
| 1495 | typeof: ?Type = null, | ||
| 1496 | /// When true an error is returned instead of adding a diagnostic message. | ||
| 1497 | /// Used for trying to combine typedef types. | ||
| 1498 | error_on_invalid: bool = false, | ||
| 1499 | |||
| 1500 | pub const Specifier = union(enum) { | ||
| 1501 | none, | ||
| 1502 | void, | ||
| 1503 | /// GNU __auto_type extension | ||
| 1504 | auto_type, | ||
| 1505 | /// C23 auto | ||
| 1506 | c23_auto, | ||
| 1507 | nullptr_t, | ||
| 1508 | bool, | ||
| 1509 | char, | ||
| 1510 | schar, | ||
| 1511 | uchar, | ||
| 1512 | complex_char, | ||
| 1513 | complex_schar, | ||
| 1514 | complex_uchar, | ||
| 1515 | |||
| 1516 | unsigned, | ||
| 1517 | signed, | ||
| 1518 | short, | ||
| 1519 | sshort, | ||
| 1520 | ushort, | ||
| 1521 | short_int, | ||
| 1522 | sshort_int, | ||
| 1523 | ushort_int, | ||
| 1524 | int, | ||
| 1525 | sint, | ||
| 1526 | uint, | ||
| 1527 | long, | ||
| 1528 | slong, | ||
| 1529 | ulong, | ||
| 1530 | long_int, | ||
| 1531 | slong_int, | ||
| 1532 | ulong_int, | ||
| 1533 | long_long, | ||
| 1534 | slong_long, | ||
| 1535 | ulong_long, | ||
| 1536 | long_long_int, | ||
| 1537 | slong_long_int, | ||
| 1538 | ulong_long_int, | ||
| 1539 | int128, | ||
| 1540 | sint128, | ||
| 1541 | uint128, | ||
| 1542 | complex_unsigned, | ||
| 1543 | complex_signed, | ||
| 1544 | complex_short, | ||
| 1545 | complex_sshort, | ||
| 1546 | complex_ushort, | ||
| 1547 | complex_short_int, | ||
| 1548 | complex_sshort_int, | ||
| 1549 | complex_ushort_int, | ||
| 1550 | complex_int, | ||
| 1551 | complex_sint, | ||
| 1552 | complex_uint, | ||
| 1553 | complex_long, | ||
| 1554 | complex_slong, | ||
| 1555 | complex_ulong, | ||
| 1556 | complex_long_int, | ||
| 1557 | complex_slong_int, | ||
| 1558 | complex_ulong_int, | ||
| 1559 | complex_long_long, | ||
| 1560 | complex_slong_long, | ||
| 1561 | complex_ulong_long, | ||
| 1562 | complex_long_long_int, | ||
| 1563 | complex_slong_long_int, | ||
| 1564 | complex_ulong_long_int, | ||
| 1565 | complex_int128, | ||
| 1566 | complex_sint128, | ||
| 1567 | complex_uint128, | ||
| 1568 | bit_int: u64, | ||
| 1569 | sbit_int: u64, | ||
| 1570 | ubit_int: u64, | ||
| 1571 | complex_bit_int: u64, | ||
| 1572 | complex_sbit_int: u64, | ||
| 1573 | complex_ubit_int: u64, | ||
| 1574 | |||
| 1575 | fp16, | ||
| 1576 | float16, | ||
| 1577 | float, | ||
| 1578 | double, | ||
| 1579 | long_double, | ||
| 1580 | float80, | ||
| 1581 | float128, | ||
| 1582 | complex, | ||
| 1583 | complex_float, | ||
| 1584 | complex_double, | ||
| 1585 | complex_long_double, | ||
| 1586 | complex_float80, | ||
| 1587 | complex_float128, | ||
| 1588 | |||
| 1589 | pointer: *Type, | ||
| 1590 | unspecified_variable_len_array: *Type, | ||
| 1591 | decayed_unspecified_variable_len_array: *Type, | ||
| 1592 | func: *Func, | ||
| 1593 | var_args_func: *Func, | ||
| 1594 | old_style_func: *Func, | ||
| 1595 | array: *Array, | ||
| 1596 | decayed_array: *Array, | ||
| 1597 | static_array: *Array, | ||
| 1598 | decayed_static_array: *Array, | ||
| 1599 | incomplete_array: *Array, | ||
| 1600 | decayed_incomplete_array: *Array, | ||
| 1601 | vector: *Array, | ||
| 1602 | variable_len_array: *Expr, | ||
| 1603 | decayed_variable_len_array: *Expr, | ||
| 1604 | @"struct": *Record, | ||
| 1605 | @"union": *Record, | ||
| 1606 | @"enum": *Enum, | ||
| 1607 | typeof_type: *Type, | ||
| 1608 | decayed_typeof_type: *Type, | ||
| 1609 | typeof_expr: *Expr, | ||
| 1610 | decayed_typeof_expr: *Expr, | ||
| 1611 | |||
| 1612 | attributed: *Attributed, | ||
| 1613 | |||
| 1614 | pub fn str(spec: Builder.Specifier, langopts: LangOpts) ?[]const u8 { | ||
| 1615 | return switch (spec) { | ||
| 1616 | .none => unreachable, | ||
| 1617 | .void => "void", | ||
| 1618 | .auto_type => "__auto_type", | ||
| 1619 | .c23_auto => "auto", | ||
| 1620 | .nullptr_t => "nullptr_t", | ||
| 1621 | .bool => if (langopts.standard.atLeast(.c23)) "bool" else "_Bool", | ||
| 1622 | .char => "char", | ||
| 1623 | .schar => "signed char", | ||
| 1624 | .uchar => "unsigned char", | ||
| 1625 | .unsigned => "unsigned", | ||
| 1626 | .signed => "signed", | ||
| 1627 | .short => "short", | ||
| 1628 | .ushort => "unsigned short", | ||
| 1629 | .sshort => "signed short", | ||
| 1630 | .short_int => "short int", | ||
| 1631 | .sshort_int => "signed short int", | ||
| 1632 | .ushort_int => "unsigned short int", | ||
| 1633 | .int => "int", | ||
| 1634 | .sint => "signed int", | ||
| 1635 | .uint => "unsigned int", | ||
| 1636 | .long => "long", | ||
| 1637 | .slong => "signed long", | ||
| 1638 | .ulong => "unsigned long", | ||
| 1639 | .long_int => "long int", | ||
| 1640 | .slong_int => "signed long int", | ||
| 1641 | .ulong_int => "unsigned long int", | ||
| 1642 | .long_long => "long long", | ||
| 1643 | .slong_long => "signed long long", | ||
| 1644 | .ulong_long => "unsigned long long", | ||
| 1645 | .long_long_int => "long long int", | ||
| 1646 | .slong_long_int => "signed long long int", | ||
| 1647 | .ulong_long_int => "unsigned long long int", | ||
| 1648 | .int128 => "__int128", | ||
| 1649 | .sint128 => "signed __int128", | ||
| 1650 | .uint128 => "unsigned __int128", | ||
| 1651 | .bit_int => "_BitInt", | ||
| 1652 | .sbit_int => "signed _BitInt", | ||
| 1653 | .ubit_int => "unsigned _BitInt", | ||
| 1654 | .complex_char => "_Complex char", | ||
| 1655 | .complex_schar => "_Complex signed char", | ||
| 1656 | .complex_uchar => "_Complex unsigned char", | ||
| 1657 | .complex_unsigned => "_Complex unsigned", | ||
| 1658 | .complex_signed => "_Complex signed", | ||
| 1659 | .complex_short => "_Complex short", | ||
| 1660 | .complex_ushort => "_Complex unsigned short", | ||
| 1661 | .complex_sshort => "_Complex signed short", | ||
| 1662 | .complex_short_int => "_Complex short int", | ||
| 1663 | .complex_sshort_int => "_Complex signed short int", | ||
| 1664 | .complex_ushort_int => "_Complex unsigned short int", | ||
| 1665 | .complex_int => "_Complex int", | ||
| 1666 | .complex_sint => "_Complex signed int", | ||
| 1667 | .complex_uint => "_Complex unsigned int", | ||
| 1668 | .complex_long => "_Complex long", | ||
| 1669 | .complex_slong => "_Complex signed long", | ||
| 1670 | .complex_ulong => "_Complex unsigned long", | ||
| 1671 | .complex_long_int => "_Complex long int", | ||
| 1672 | .complex_slong_int => "_Complex signed long int", | ||
| 1673 | .complex_ulong_int => "_Complex unsigned long int", | ||
| 1674 | .complex_long_long => "_Complex long long", | ||
| 1675 | .complex_slong_long => "_Complex signed long long", | ||
| 1676 | .complex_ulong_long => "_Complex unsigned long long", | ||
| 1677 | .complex_long_long_int => "_Complex long long int", | ||
| 1678 | .complex_slong_long_int => "_Complex signed long long int", | ||
| 1679 | .complex_ulong_long_int => "_Complex unsigned long long int", | ||
| 1680 | .complex_int128 => "_Complex __int128", | ||
| 1681 | .complex_sint128 => "_Complex signed __int128", | ||
| 1682 | .complex_uint128 => "_Complex unsigned __int128", | ||
| 1683 | .complex_bit_int => "_Complex _BitInt", | ||
| 1684 | .complex_sbit_int => "_Complex signed _BitInt", | ||
| 1685 | .complex_ubit_int => "_Complex unsigned _BitInt", | ||
| 1686 | |||
| 1687 | .fp16 => "__fp16", | ||
| 1688 | .float16 => "_Float16", | ||
| 1689 | .float => "float", | ||
| 1690 | .double => "double", | ||
| 1691 | .long_double => "long double", | ||
| 1692 | .float80 => "__float80", | ||
| 1693 | .float128 => "__float128", | ||
| 1694 | .complex => "_Complex", | ||
| 1695 | .complex_float => "_Complex float", | ||
| 1696 | .complex_double => "_Complex double", | ||
| 1697 | .complex_long_double => "_Complex long double", | ||
| 1698 | .complex_float80 => "_Complex __float80", | ||
| 1699 | .complex_float128 => "_Complex __float128", | ||
| 1700 | |||
| 1701 | .attributed => |attributed| Builder.fromType(attributed.base).str(langopts), | ||
| 1702 | |||
| 1703 | else => null, | ||
| 1704 | }; | ||
| 1705 | } | ||
| 1706 | }; | ||
| 1707 | |||
| 1708 | pub fn finish(b: Builder, p: *Parser) Parser.Error!Type { | ||
| 1709 | var ty: Type = .{ .specifier = undefined }; | ||
| 1710 | if (b.typedef) |typedef| { | ||
| 1711 | ty = typedef.ty; | ||
| 1712 | if (ty.isArray()) { | ||
| 1713 | var elem = ty.elemType(); | ||
| 1714 | try b.qual.finish(p, &elem); | ||
| 1715 | // TODO this really should be easier | ||
| 1716 | switch (ty.specifier) { | ||
| 1717 | .array, .static_array, .incomplete_array => { | ||
| 1718 | const old = ty.data.array; | ||
| 1719 | ty.data.array = try p.arena.create(Array); | ||
| 1720 | ty.data.array.* = .{ | ||
| 1721 | .len = old.len, | ||
| 1722 | .elem = elem, | ||
| 1723 | }; | ||
| 1724 | }, | ||
| 1725 | .variable_len_array, .unspecified_variable_len_array => { | ||
| 1726 | const old = ty.data.expr; | ||
| 1727 | ty.data.expr = try p.arena.create(Expr); | ||
| 1728 | ty.data.expr.* = .{ | ||
| 1729 | .node = old.node, | ||
| 1730 | .ty = elem, | ||
| 1731 | }; | ||
| 1732 | }, | ||
| 1733 | .typeof_type => {}, // TODO handle | ||
| 1734 | .typeof_expr => {}, // TODO handle | ||
| 1735 | .attributed => {}, // TODO handle | ||
| 1736 | else => unreachable, | ||
| 1737 | } | ||
| 1738 | |||
| 1739 | return ty; | ||
| 1740 | } | ||
| 1741 | try b.qual.finish(p, &ty); | ||
| 1742 | return ty; | ||
| 1743 | } | ||
| 1744 | switch (b.specifier) { | ||
| 1745 | .none => { | ||
| 1746 | if (b.typeof) |typeof| { | ||
| 1747 | ty = typeof; | ||
| 1748 | } else { | ||
| 1749 | ty.specifier = .int; | ||
| 1750 | if (p.comp.langopts.standard.atLeast(.c23)) { | ||
| 1751 | try p.err(.missing_type_specifier_c23); | ||
| 1752 | } else { | ||
| 1753 | try p.err(.missing_type_specifier); | ||
| 1754 | } | ||
| 1755 | } | ||
| 1756 | }, | ||
| 1757 | .void => ty.specifier = .void, | ||
| 1758 | .auto_type => ty.specifier = .auto_type, | ||
| 1759 | .c23_auto => ty.specifier = .c23_auto, | ||
| 1760 | .nullptr_t => unreachable, // nullptr_t can only be accessed via typeof(nullptr) | ||
| 1761 | .bool => ty.specifier = .bool, | ||
| 1762 | .char => ty.specifier = .char, | ||
| 1763 | .schar => ty.specifier = .schar, | ||
| 1764 | .uchar => ty.specifier = .uchar, | ||
| 1765 | .complex_char => ty.specifier = .complex_char, | ||
| 1766 | .complex_schar => ty.specifier = .complex_schar, | ||
| 1767 | .complex_uchar => ty.specifier = .complex_uchar, | ||
| 1768 | |||
| 1769 | .unsigned => ty.specifier = .uint, | ||
| 1770 | .signed => ty.specifier = .int, | ||
| 1771 | .short_int, .sshort_int, .short, .sshort => ty.specifier = .short, | ||
| 1772 | .ushort, .ushort_int => ty.specifier = .ushort, | ||
| 1773 | .int, .sint => ty.specifier = .int, | ||
| 1774 | .uint => ty.specifier = .uint, | ||
| 1775 | .long, .slong, .long_int, .slong_int => ty.specifier = .long, | ||
| 1776 | .ulong, .ulong_int => ty.specifier = .ulong, | ||
| 1777 | .long_long, .slong_long, .long_long_int, .slong_long_int => ty.specifier = .long_long, | ||
| 1778 | .ulong_long, .ulong_long_int => ty.specifier = .ulong_long, | ||
| 1779 | .int128, .sint128 => ty.specifier = .int128, | ||
| 1780 | .uint128 => ty.specifier = .uint128, | ||
| 1781 | .complex_unsigned => ty.specifier = .complex_uint, | ||
| 1782 | .complex_signed => ty.specifier = .complex_int, | ||
| 1783 | .complex_short_int, .complex_sshort_int, .complex_short, .complex_sshort => ty.specifier = .complex_short, | ||
| 1784 | .complex_ushort, .complex_ushort_int => ty.specifier = .complex_ushort, | ||
| 1785 | .complex_int, .complex_sint => ty.specifier = .complex_int, | ||
| 1786 | .complex_uint => ty.specifier = .complex_uint, | ||
| 1787 | .complex_long, .complex_slong, .complex_long_int, .complex_slong_int => ty.specifier = .complex_long, | ||
| 1788 | .complex_ulong, .complex_ulong_int => ty.specifier = .complex_ulong, | ||
| 1789 | .complex_long_long, .complex_slong_long, .complex_long_long_int, .complex_slong_long_int => ty.specifier = .complex_long_long, | ||
| 1790 | .complex_ulong_long, .complex_ulong_long_int => ty.specifier = .complex_ulong_long, | ||
| 1791 | .complex_int128, .complex_sint128 => ty.specifier = .complex_int128, | ||
| 1792 | .complex_uint128 => ty.specifier = .complex_uint128, | ||
| 1793 | .bit_int, .sbit_int, .ubit_int, .complex_bit_int, .complex_ubit_int, .complex_sbit_int => |bits| { | ||
| 1794 | const unsigned = b.specifier == .ubit_int or b.specifier == .complex_ubit_int; | ||
| 1795 | if (unsigned) { | ||
| 1796 | if (bits < 1) { | ||
| 1797 | try p.errStr(.unsigned_bit_int_too_small, b.bit_int_tok.?, b.specifier.str(p.comp.langopts).?); | ||
| 1798 | return Type.invalid; | ||
| 1799 | } | ||
| 1800 | } else { | ||
| 1801 | if (bits < 2) { | ||
| 1802 | try p.errStr(.signed_bit_int_too_small, b.bit_int_tok.?, b.specifier.str(p.comp.langopts).?); | ||
| 1803 | return Type.invalid; | ||
| 1804 | } | ||
| 1805 | } | ||
| 1806 | if (bits > Compilation.bit_int_max_bits) { | ||
| 1807 | try p.errStr(.bit_int_too_big, b.bit_int_tok.?, b.specifier.str(p.comp.langopts).?); | ||
| 1808 | return Type.invalid; | ||
| 1809 | } | ||
| 1810 | ty.specifier = if (b.complex_tok != null) .complex_bit_int else .bit_int; | ||
| 1811 | ty.data = .{ .int = .{ | ||
| 1812 | .signedness = if (unsigned) .unsigned else .signed, | ||
| 1813 | .bits = @intCast(bits), | ||
| 1814 | } }; | ||
| 1815 | }, | ||
| 1816 | |||
| 1817 | .fp16 => ty.specifier = .fp16, | ||
| 1818 | .float16 => ty.specifier = .float16, | ||
| 1819 | .float => ty.specifier = .float, | ||
| 1820 | .double => ty.specifier = .double, | ||
| 1821 | .long_double => ty.specifier = .long_double, | ||
| 1822 | .float80 => ty.specifier = .float80, | ||
| 1823 | .float128 => ty.specifier = .float128, | ||
| 1824 | .complex_float => ty.specifier = .complex_float, | ||
| 1825 | .complex_double => ty.specifier = .complex_double, | ||
| 1826 | .complex_long_double => ty.specifier = .complex_long_double, | ||
| 1827 | .complex_float80 => ty.specifier = .complex_float80, | ||
| 1828 | .complex_float128 => ty.specifier = .complex_float128, | ||
| 1829 | .complex => { | ||
| 1830 | try p.errTok(.plain_complex, p.tok_i - 1); | ||
| 1831 | ty.specifier = .complex_double; | ||
| 1832 | }, | ||
| 1833 | |||
| 1834 | .pointer => |data| { | ||
| 1835 | ty.specifier = .pointer; | ||
| 1836 | ty.data = .{ .sub_type = data }; | ||
| 1837 | }, | ||
| 1838 | .unspecified_variable_len_array => |data| { | ||
| 1839 | ty.specifier = .unspecified_variable_len_array; | ||
| 1840 | ty.data = .{ .sub_type = data }; | ||
| 1841 | }, | ||
| 1842 | .decayed_unspecified_variable_len_array => |data| { | ||
| 1843 | ty.specifier = .decayed_unspecified_variable_len_array; | ||
| 1844 | ty.data = .{ .sub_type = data }; | ||
| 1845 | }, | ||
| 1846 | .func => |data| { | ||
| 1847 | ty.specifier = .func; | ||
| 1848 | ty.data = .{ .func = data }; | ||
| 1849 | }, | ||
| 1850 | .var_args_func => |data| { | ||
| 1851 | ty.specifier = .var_args_func; | ||
| 1852 | ty.data = .{ .func = data }; | ||
| 1853 | }, | ||
| 1854 | .old_style_func => |data| { | ||
| 1855 | ty.specifier = .old_style_func; | ||
| 1856 | ty.data = .{ .func = data }; | ||
| 1857 | }, | ||
| 1858 | .array => |data| { | ||
| 1859 | ty.specifier = .array; | ||
| 1860 | ty.data = .{ .array = data }; | ||
| 1861 | }, | ||
| 1862 | .decayed_array => |data| { | ||
| 1863 | ty.specifier = .decayed_array; | ||
| 1864 | ty.data = .{ .array = data }; | ||
| 1865 | }, | ||
| 1866 | .static_array => |data| { | ||
| 1867 | ty.specifier = .static_array; | ||
| 1868 | ty.data = .{ .array = data }; | ||
| 1869 | }, | ||
| 1870 | .decayed_static_array => |data| { | ||
| 1871 | ty.specifier = .decayed_static_array; | ||
| 1872 | ty.data = .{ .array = data }; | ||
| 1873 | }, | ||
| 1874 | .incomplete_array => |data| { | ||
| 1875 | ty.specifier = .incomplete_array; | ||
| 1876 | ty.data = .{ .array = data }; | ||
| 1877 | }, | ||
| 1878 | .decayed_incomplete_array => |data| { | ||
| 1879 | ty.specifier = .decayed_incomplete_array; | ||
| 1880 | ty.data = .{ .array = data }; | ||
| 1881 | }, | ||
| 1882 | .vector => |data| { | ||
| 1883 | ty.specifier = .vector; | ||
| 1884 | ty.data = .{ .array = data }; | ||
| 1885 | }, | ||
| 1886 | .variable_len_array => |data| { | ||
| 1887 | ty.specifier = .variable_len_array; | ||
| 1888 | ty.data = .{ .expr = data }; | ||
| 1889 | }, | ||
| 1890 | .decayed_variable_len_array => |data| { | ||
| 1891 | ty.specifier = .decayed_variable_len_array; | ||
| 1892 | ty.data = .{ .expr = data }; | ||
| 1893 | }, | ||
| 1894 | .@"struct" => |data| { | ||
| 1895 | ty.specifier = .@"struct"; | ||
| 1896 | ty.data = .{ .record = data }; | ||
| 1897 | }, | ||
| 1898 | .@"union" => |data| { | ||
| 1899 | ty.specifier = .@"union"; | ||
| 1900 | ty.data = .{ .record = data }; | ||
| 1901 | }, | ||
| 1902 | .@"enum" => |data| { | ||
| 1903 | ty.specifier = .@"enum"; | ||
| 1904 | ty.data = .{ .@"enum" = data }; | ||
| 1905 | }, | ||
| 1906 | .typeof_type => |data| { | ||
| 1907 | ty.specifier = .typeof_type; | ||
| 1908 | ty.data = .{ .sub_type = data }; | ||
| 1909 | }, | ||
| 1910 | .decayed_typeof_type => |data| { | ||
| 1911 | ty.specifier = .decayed_typeof_type; | ||
| 1912 | ty.data = .{ .sub_type = data }; | ||
| 1913 | }, | ||
| 1914 | .typeof_expr => |data| { | ||
| 1915 | ty.specifier = .typeof_expr; | ||
| 1916 | ty.data = .{ .expr = data }; | ||
| 1917 | }, | ||
| 1918 | .decayed_typeof_expr => |data| { | ||
| 1919 | ty.specifier = .decayed_typeof_expr; | ||
| 1920 | ty.data = .{ .expr = data }; | ||
| 1921 | }, | ||
| 1922 | .attributed => |data| { | ||
| 1923 | ty.specifier = .attributed; | ||
| 1924 | ty.data = .{ .attributed = data }; | ||
| 1925 | }, | ||
| 1926 | } | ||
| 1927 | if (!ty.isReal() and ty.isInt()) { | ||
| 1928 | if (b.complex_tok) |tok| try p.errTok(.complex_int, tok); | ||
| 1929 | } | ||
| 1930 | try b.qual.finish(p, &ty); | ||
| 1931 | return ty; | ||
| 1932 | } | ||
| 1933 | |||
| 1934 | fn cannotCombine(b: Builder, p: *Parser, source_tok: TokenIndex) !void { | ||
| 1935 | if (b.error_on_invalid) return error.CannotCombine; | ||
| 1936 | const ty_str = b.specifier.str(p.comp.langopts) orelse try p.typeStr(try b.finish(p)); | ||
| 1937 | try p.errExtra(.cannot_combine_spec, source_tok, .{ .str = ty_str }); | ||
| 1938 | if (b.typedef) |some| try p.errStr(.spec_from_typedef, some.tok, try p.typeStr(some.ty)); | ||
| 1939 | } | ||
| 1940 | |||
| 1941 | fn duplicateSpec(b: *Builder, p: *Parser, source_tok: TokenIndex, spec: []const u8) !void { | ||
| 1942 | if (b.error_on_invalid) return error.CannotCombine; | ||
| 1943 | if (p.comp.langopts.emulate != .clang) return b.cannotCombine(p, source_tok); | ||
| 1944 | try p.errStr(.duplicate_decl_spec, p.tok_i, spec); | ||
| 1945 | } | ||
| 1946 | |||
| 1947 | pub fn combineFromTypeof(b: *Builder, p: *Parser, new: Type, source_tok: TokenIndex) Compilation.Error!void { | ||
| 1948 | if (b.typeof != null) return p.errStr(.cannot_combine_spec, source_tok, "typeof"); | ||
| 1949 | if (b.specifier != .none) return p.errStr(.invalid_typeof, source_tok, @tagName(b.specifier)); | ||
| 1950 | const inner = switch (new.specifier) { | ||
| 1951 | .typeof_type => new.data.sub_type.*, | ||
| 1952 | .typeof_expr => new.data.expr.ty, | ||
| 1953 | .nullptr_t => new, // typeof(nullptr) is special-cased to be an unwrapped typeof-expr | ||
| 1954 | else => unreachable, | ||
| 1955 | }; | ||
| 1956 | |||
| 1957 | b.typeof = switch (inner.specifier) { | ||
| 1958 | .attributed => inner.data.attributed.base, | ||
| 1959 | else => new, | ||
| 1960 | }; | ||
| 1961 | } | ||
| 1962 | |||
| 1963 | /// Try to combine type from typedef, returns true if successful. | ||
| 1964 | pub fn combineTypedef(b: *Builder, p: *Parser, typedef_ty: Type, name_tok: TokenIndex) bool { | ||
| 1965 | b.error_on_invalid = true; | ||
| 1966 | defer b.error_on_invalid = false; | ||
| 1967 | |||
| 1968 | const new_spec = fromType(typedef_ty); | ||
| 1969 | b.combineExtra(p, new_spec, 0) catch |err| switch (err) { | ||
| 1970 | error.FatalError => unreachable, // we do not add any diagnostics | ||
| 1971 | error.OutOfMemory => unreachable, // we do not add any diagnostics | ||
| 1972 | error.ParsingFailed => unreachable, // we do not add any diagnostics | ||
| 1973 | error.CannotCombine => return false, | ||
| 1974 | }; | ||
| 1975 | b.typedef = .{ .tok = name_tok, .ty = typedef_ty }; | ||
| 1976 | return true; | ||
| 1977 | } | ||
| 1978 | |||
| 1979 | pub fn combine(b: *Builder, p: *Parser, new: Builder.Specifier, source_tok: TokenIndex) !void { | ||
| 1980 | b.combineExtra(p, new, source_tok) catch |err| switch (err) { | ||
| 1981 | error.CannotCombine => unreachable, | ||
| 1982 | else => |e| return e, | ||
| 1983 | }; | ||
| 1984 | } | ||
| 1985 | |||
| 1986 | fn combineExtra(b: *Builder, p: *Parser, new: Builder.Specifier, source_tok: TokenIndex) !void { | ||
| 1987 | if (b.typeof != null) { | ||
| 1988 | if (b.error_on_invalid) return error.CannotCombine; | ||
| 1989 | try p.errStr(.invalid_typeof, source_tok, @tagName(new)); | ||
| 1990 | } | ||
| 1991 | |||
| 1992 | switch (new) { | ||
| 1993 | .complex => b.complex_tok = source_tok, | ||
| 1994 | .bit_int => b.bit_int_tok = source_tok, | ||
| 1995 | .auto_type => b.auto_type_tok = source_tok, | ||
| 1996 | else => {}, | ||
| 1997 | } | ||
| 1998 | |||
| 1999 | if (new == .int128 and !target_util.hasInt128(p.comp.target)) { | ||
| 2000 | try p.errStr(.type_not_supported_on_target, source_tok, "__int128"); | ||
| 2001 | } | ||
| 2002 | |||
| 2003 | switch (new) { | ||
| 2004 | else => switch (b.specifier) { | ||
| 2005 | .none => b.specifier = new, | ||
| 2006 | else => return b.cannotCombine(p, source_tok), | ||
| 2007 | }, | ||
| 2008 | .signed => b.specifier = switch (b.specifier) { | ||
| 2009 | .none => .signed, | ||
| 2010 | .char => .schar, | ||
| 2011 | .short => .sshort, | ||
| 2012 | .short_int => .sshort_int, | ||
| 2013 | .int => .sint, | ||
| 2014 | .long => .slong, | ||
| 2015 | .long_int => .slong_int, | ||
| 2016 | .long_long => .slong_long, | ||
| 2017 | .long_long_int => .slong_long_int, | ||
| 2018 | .int128 => .sint128, | ||
| 2019 | .bit_int => |bits| .{ .sbit_int = bits }, | ||
| 2020 | .complex => .complex_signed, | ||
| 2021 | .complex_char => .complex_schar, | ||
| 2022 | .complex_short => .complex_sshort, | ||
| 2023 | .complex_short_int => .complex_sshort_int, | ||
| 2024 | .complex_int => .complex_sint, | ||
| 2025 | .complex_long => .complex_slong, | ||
| 2026 | .complex_long_int => .complex_slong_int, | ||
| 2027 | .complex_long_long => .complex_slong_long, | ||
| 2028 | .complex_long_long_int => .complex_slong_long_int, | ||
| 2029 | .complex_int128 => .complex_sint128, | ||
| 2030 | .complex_bit_int => |bits| .{ .complex_sbit_int = bits }, | ||
| 2031 | .signed, | ||
| 2032 | .sshort, | ||
| 2033 | .sshort_int, | ||
| 2034 | .sint, | ||
| 2035 | .slong, | ||
| 2036 | .slong_int, | ||
| 2037 | .slong_long, | ||
| 2038 | .slong_long_int, | ||
| 2039 | .sint128, | ||
| 2040 | .sbit_int, | ||
| 2041 | .complex_schar, | ||
| 2042 | .complex_signed, | ||
| 2043 | .complex_sshort, | ||
| 2044 | .complex_sshort_int, | ||
| 2045 | .complex_sint, | ||
| 2046 | .complex_slong, | ||
| 2047 | .complex_slong_int, | ||
| 2048 | .complex_slong_long, | ||
| 2049 | .complex_slong_long_int, | ||
| 2050 | .complex_sint128, | ||
| 2051 | .complex_sbit_int, | ||
| 2052 | => return b.duplicateSpec(p, source_tok, "signed"), | ||
| 2053 | else => return b.cannotCombine(p, source_tok), | ||
| 2054 | }, | ||
| 2055 | .unsigned => b.specifier = switch (b.specifier) { | ||
| 2056 | .none => .unsigned, | ||
| 2057 | .char => .uchar, | ||
| 2058 | .short => .ushort, | ||
| 2059 | .short_int => .ushort_int, | ||
| 2060 | .int => .uint, | ||
| 2061 | .long => .ulong, | ||
| 2062 | .long_int => .ulong_int, | ||
| 2063 | .long_long => .ulong_long, | ||
| 2064 | .long_long_int => .ulong_long_int, | ||
| 2065 | .int128 => .uint128, | ||
| 2066 | .bit_int => |bits| .{ .ubit_int = bits }, | ||
| 2067 | .complex => .complex_unsigned, | ||
| 2068 | .complex_char => .complex_uchar, | ||
| 2069 | .complex_short => .complex_ushort, | ||
| 2070 | .complex_short_int => .complex_ushort_int, | ||
| 2071 | .complex_int => .complex_uint, | ||
| 2072 | .complex_long => .complex_ulong, | ||
| 2073 | .complex_long_int => .complex_ulong_int, | ||
| 2074 | .complex_long_long => .complex_ulong_long, | ||
| 2075 | .complex_long_long_int => .complex_ulong_long_int, | ||
| 2076 | .complex_int128 => .complex_uint128, | ||
| 2077 | .complex_bit_int => |bits| .{ .complex_ubit_int = bits }, | ||
| 2078 | .unsigned, | ||
| 2079 | .ushort, | ||
| 2080 | .ushort_int, | ||
| 2081 | .uint, | ||
| 2082 | .ulong, | ||
| 2083 | .ulong_int, | ||
| 2084 | .ulong_long, | ||
| 2085 | .ulong_long_int, | ||
| 2086 | .uint128, | ||
| 2087 | .ubit_int, | ||
| 2088 | .complex_uchar, | ||
| 2089 | .complex_unsigned, | ||
| 2090 | .complex_ushort, | ||
| 2091 | .complex_ushort_int, | ||
| 2092 | .complex_uint, | ||
| 2093 | .complex_ulong, | ||
| 2094 | .complex_ulong_int, | ||
| 2095 | .complex_ulong_long, | ||
| 2096 | .complex_ulong_long_int, | ||
| 2097 | .complex_uint128, | ||
| 2098 | .complex_ubit_int, | ||
| 2099 | => return b.duplicateSpec(p, source_tok, "unsigned"), | ||
| 2100 | else => return b.cannotCombine(p, source_tok), | ||
| 2101 | }, | ||
| 2102 | .char => b.specifier = switch (b.specifier) { | ||
| 2103 | .none => .char, | ||
| 2104 | .unsigned => .uchar, | ||
| 2105 | .signed => .schar, | ||
| 2106 | .complex => .complex_char, | ||
| 2107 | .complex_signed => .complex_schar, | ||
| 2108 | .complex_unsigned => .complex_uchar, | ||
| 2109 | else => return b.cannotCombine(p, source_tok), | ||
| 2110 | }, | ||
| 2111 | .short => b.specifier = switch (b.specifier) { | ||
| 2112 | .none => .short, | ||
| 2113 | .unsigned => .ushort, | ||
| 2114 | .signed => .sshort, | ||
| 2115 | .int => .short_int, | ||
| 2116 | .sint => .sshort_int, | ||
| 2117 | .uint => .ushort_int, | ||
| 2118 | .complex => .complex_short, | ||
| 2119 | .complex_signed => .complex_sshort, | ||
| 2120 | .complex_unsigned => .complex_ushort, | ||
| 2121 | else => return b.cannotCombine(p, source_tok), | ||
| 2122 | }, | ||
| 2123 | .int => b.specifier = switch (b.specifier) { | ||
| 2124 | .none => .int, | ||
| 2125 | .signed => .sint, | ||
| 2126 | .unsigned => .uint, | ||
| 2127 | .short => .short_int, | ||
| 2128 | .sshort => .sshort_int, | ||
| 2129 | .ushort => .ushort_int, | ||
| 2130 | .long => .long_int, | ||
| 2131 | .slong => .slong_int, | ||
| 2132 | .ulong => .ulong_int, | ||
| 2133 | .long_long => .long_long_int, | ||
| 2134 | .slong_long => .slong_long_int, | ||
| 2135 | .ulong_long => .ulong_long_int, | ||
| 2136 | .complex => .complex_int, | ||
| 2137 | .complex_signed => .complex_sint, | ||
| 2138 | .complex_unsigned => .complex_uint, | ||
| 2139 | .complex_short => .complex_short_int, | ||
| 2140 | .complex_sshort => .complex_sshort_int, | ||
| 2141 | .complex_ushort => .complex_ushort_int, | ||
| 2142 | .complex_long => .complex_long_int, | ||
| 2143 | .complex_slong => .complex_slong_int, | ||
| 2144 | .complex_ulong => .complex_ulong_int, | ||
| 2145 | .complex_long_long => .complex_long_long_int, | ||
| 2146 | .complex_slong_long => .complex_slong_long_int, | ||
| 2147 | .complex_ulong_long => .complex_ulong_long_int, | ||
| 2148 | else => return b.cannotCombine(p, source_tok), | ||
| 2149 | }, | ||
| 2150 | .long => b.specifier = switch (b.specifier) { | ||
| 2151 | .none => .long, | ||
| 2152 | .long => .long_long, | ||
| 2153 | .unsigned => .ulong, | ||
| 2154 | .signed => .long, | ||
| 2155 | .int => .long_int, | ||
| 2156 | .sint => .slong_int, | ||
| 2157 | .ulong => .ulong_long, | ||
| 2158 | .complex => .complex_long, | ||
| 2159 | .complex_signed => .complex_slong, | ||
| 2160 | .complex_unsigned => .complex_ulong, | ||
| 2161 | .complex_long => .complex_long_long, | ||
| 2162 | .complex_slong => .complex_slong_long, | ||
| 2163 | .complex_ulong => .complex_ulong_long, | ||
| 2164 | else => return b.cannotCombine(p, source_tok), | ||
| 2165 | }, | ||
| 2166 | .int128 => b.specifier = switch (b.specifier) { | ||
| 2167 | .none => .int128, | ||
| 2168 | .unsigned => .uint128, | ||
| 2169 | .signed => .sint128, | ||
| 2170 | .complex => .complex_int128, | ||
| 2171 | .complex_signed => .complex_sint128, | ||
| 2172 | .complex_unsigned => .complex_uint128, | ||
| 2173 | else => return b.cannotCombine(p, source_tok), | ||
| 2174 | }, | ||
| 2175 | .bit_int => b.specifier = switch (b.specifier) { | ||
| 2176 | .none => .{ .bit_int = new.bit_int }, | ||
| 2177 | .unsigned => .{ .ubit_int = new.bit_int }, | ||
| 2178 | .signed => .{ .sbit_int = new.bit_int }, | ||
| 2179 | .complex => .{ .complex_bit_int = new.bit_int }, | ||
| 2180 | .complex_signed => .{ .complex_sbit_int = new.bit_int }, | ||
| 2181 | .complex_unsigned => .{ .complex_ubit_int = new.bit_int }, | ||
| 2182 | else => return b.cannotCombine(p, source_tok), | ||
| 2183 | }, | ||
| 2184 | .auto_type => b.specifier = switch (b.specifier) { | ||
| 2185 | .none => .auto_type, | ||
| 2186 | else => return b.cannotCombine(p, source_tok), | ||
| 2187 | }, | ||
| 2188 | .c23_auto => b.specifier = switch (b.specifier) { | ||
| 2189 | .none => .c23_auto, | ||
| 2190 | else => return b.cannotCombine(p, source_tok), | ||
| 2191 | }, | ||
| 2192 | .fp16 => b.specifier = switch (b.specifier) { | ||
| 2193 | .none => .fp16, | ||
| 2194 | else => return b.cannotCombine(p, source_tok), | ||
| 2195 | }, | ||
| 2196 | .float16 => b.specifier = switch (b.specifier) { | ||
| 2197 | .none => .float16, | ||
| 2198 | else => return b.cannotCombine(p, source_tok), | ||
| 2199 | }, | ||
| 2200 | .float => b.specifier = switch (b.specifier) { | ||
| 2201 | .none => .float, | ||
| 2202 | .complex => .complex_float, | ||
| 2203 | else => return b.cannotCombine(p, source_tok), | ||
| 2204 | }, | ||
| 2205 | .double => b.specifier = switch (b.specifier) { | ||
| 2206 | .none => .double, | ||
| 2207 | .long => .long_double, | ||
| 2208 | .complex_long => .complex_long_double, | ||
| 2209 | .complex => .complex_double, | ||
| 2210 | else => return b.cannotCombine(p, source_tok), | ||
| 2211 | }, | ||
| 2212 | .float80 => b.specifier = switch (b.specifier) { | ||
| 2213 | .none => .float80, | ||
| 2214 | .complex => .complex_float80, | ||
| 2215 | else => return b.cannotCombine(p, source_tok), | ||
| 2216 | }, | ||
| 2217 | .float128 => b.specifier = switch (b.specifier) { | ||
| 2218 | .none => .float128, | ||
| 2219 | .complex => .complex_float128, | ||
| 2220 | else => return b.cannotCombine(p, source_tok), | ||
| 2221 | }, | ||
| 2222 | .complex => b.specifier = switch (b.specifier) { | ||
| 2223 | .none => .complex, | ||
| 2224 | .float => .complex_float, | ||
| 2225 | .double => .complex_double, | ||
| 2226 | .long_double => .complex_long_double, | ||
| 2227 | .float80 => .complex_float80, | ||
| 2228 | .float128 => .complex_float128, | ||
| 2229 | .char => .complex_char, | ||
| 2230 | .schar => .complex_schar, | ||
| 2231 | .uchar => .complex_uchar, | ||
| 2232 | .unsigned => .complex_unsigned, | ||
| 2233 | .signed => .complex_signed, | ||
| 2234 | .short => .complex_short, | ||
| 2235 | .sshort => .complex_sshort, | ||
| 2236 | .ushort => .complex_ushort, | ||
| 2237 | .short_int => .complex_short_int, | ||
| 2238 | .sshort_int => .complex_sshort_int, | ||
| 2239 | .ushort_int => .complex_ushort_int, | ||
| 2240 | .int => .complex_int, | ||
| 2241 | .sint => .complex_sint, | ||
| 2242 | .uint => .complex_uint, | ||
| 2243 | .long => .complex_long, | ||
| 2244 | .slong => .complex_slong, | ||
| 2245 | .ulong => .complex_ulong, | ||
| 2246 | .long_int => .complex_long_int, | ||
| 2247 | .slong_int => .complex_slong_int, | ||
| 2248 | .ulong_int => .complex_ulong_int, | ||
| 2249 | .long_long => .complex_long_long, | ||
| 2250 | .slong_long => .complex_slong_long, | ||
| 2251 | .ulong_long => .complex_ulong_long, | ||
| 2252 | .long_long_int => .complex_long_long_int, | ||
| 2253 | .slong_long_int => .complex_slong_long_int, | ||
| 2254 | .ulong_long_int => .complex_ulong_long_int, | ||
| 2255 | .int128 => .complex_int128, | ||
| 2256 | .sint128 => .complex_sint128, | ||
| 2257 | .uint128 => .complex_uint128, | ||
| 2258 | .bit_int => |bits| .{ .complex_bit_int = bits }, | ||
| 2259 | .sbit_int => |bits| .{ .complex_sbit_int = bits }, | ||
| 2260 | .ubit_int => |bits| .{ .complex_ubit_int = bits }, | ||
| 2261 | .complex, | ||
| 2262 | .complex_float, | ||
| 2263 | .complex_double, | ||
| 2264 | .complex_long_double, | ||
| 2265 | .complex_float80, | ||
| 2266 | .complex_float128, | ||
| 2267 | .complex_char, | ||
| 2268 | .complex_schar, | ||
| 2269 | .complex_uchar, | ||
| 2270 | .complex_unsigned, | ||
| 2271 | .complex_signed, | ||
| 2272 | .complex_short, | ||
| 2273 | .complex_sshort, | ||
| 2274 | .complex_ushort, | ||
| 2275 | .complex_short_int, | ||
| 2276 | .complex_sshort_int, | ||
| 2277 | .complex_ushort_int, | ||
| 2278 | .complex_int, | ||
| 2279 | .complex_sint, | ||
| 2280 | .complex_uint, | ||
| 2281 | .complex_long, | ||
| 2282 | .complex_slong, | ||
| 2283 | .complex_ulong, | ||
| 2284 | .complex_long_int, | ||
| 2285 | .complex_slong_int, | ||
| 2286 | .complex_ulong_int, | ||
| 2287 | .complex_long_long, | ||
| 2288 | .complex_slong_long, | ||
| 2289 | .complex_ulong_long, | ||
| 2290 | .complex_long_long_int, | ||
| 2291 | .complex_slong_long_int, | ||
| 2292 | .complex_ulong_long_int, | ||
| 2293 | .complex_int128, | ||
| 2294 | .complex_sint128, | ||
| 2295 | .complex_uint128, | ||
| 2296 | .complex_bit_int, | ||
| 2297 | .complex_sbit_int, | ||
| 2298 | .complex_ubit_int, | ||
| 2299 | => return b.duplicateSpec(p, source_tok, "_Complex"), | ||
| 2300 | else => return b.cannotCombine(p, source_tok), | ||
| 2301 | }, | ||
| 2302 | } | ||
| 2303 | } | ||
| 2304 | |||
| 2305 | pub fn fromType(ty: Type) Builder.Specifier { | ||
| 2306 | return switch (ty.specifier) { | ||
| 2307 | .void => .void, | ||
| 2308 | .auto_type => .auto_type, | ||
| 2309 | .c23_auto => .c23_auto, | ||
| 2310 | .nullptr_t => .nullptr_t, | ||
| 2311 | .bool => .bool, | ||
| 2312 | .char => .char, | ||
| 2313 | .schar => .schar, | ||
| 2314 | .uchar => .uchar, | ||
| 2315 | .short => .short, | ||
| 2316 | .ushort => .ushort, | ||
| 2317 | .int => .int, | ||
| 2318 | .uint => .uint, | ||
| 2319 | .long => .long, | ||
| 2320 | .ulong => .ulong, | ||
| 2321 | .long_long => .long_long, | ||
| 2322 | .ulong_long => .ulong_long, | ||
| 2323 | .int128 => .int128, | ||
| 2324 | .uint128 => .uint128, | ||
| 2325 | .bit_int => if (ty.data.int.signedness == .unsigned) { | ||
| 2326 | return .{ .ubit_int = ty.data.int.bits }; | ||
| 2327 | } else { | ||
| 2328 | return .{ .bit_int = ty.data.int.bits }; | ||
| 2329 | }, | ||
| 2330 | .complex_char => .complex_char, | ||
| 2331 | .complex_schar => .complex_schar, | ||
| 2332 | .complex_uchar => .complex_uchar, | ||
| 2333 | .complex_short => .complex_short, | ||
| 2334 | .complex_ushort => .complex_ushort, | ||
| 2335 | .complex_int => .complex_int, | ||
| 2336 | .complex_uint => .complex_uint, | ||
| 2337 | .complex_long => .complex_long, | ||
| 2338 | .complex_ulong => .complex_ulong, | ||
| 2339 | .complex_long_long => .complex_long_long, | ||
| 2340 | .complex_ulong_long => .complex_ulong_long, | ||
| 2341 | .complex_int128 => .complex_int128, | ||
| 2342 | .complex_uint128 => .complex_uint128, | ||
| 2343 | .complex_bit_int => if (ty.data.int.signedness == .unsigned) { | ||
| 2344 | return .{ .complex_ubit_int = ty.data.int.bits }; | ||
| 2345 | } else { | ||
| 2346 | return .{ .complex_bit_int = ty.data.int.bits }; | ||
| 2347 | }, | ||
| 2348 | .fp16 => .fp16, | ||
| 2349 | .float16 => .float16, | ||
| 2350 | .float => .float, | ||
| 2351 | .double => .double, | ||
| 2352 | .float80 => .float80, | ||
| 2353 | .float128 => .float128, | ||
| 2354 | .long_double => .long_double, | ||
| 2355 | .complex_float => .complex_float, | ||
| 2356 | .complex_double => .complex_double, | ||
| 2357 | .complex_long_double => .complex_long_double, | ||
| 2358 | .complex_float80 => .complex_float80, | ||
| 2359 | .complex_float128 => .complex_float128, | ||
| 2360 | |||
| 2361 | .pointer => .{ .pointer = ty.data.sub_type }, | ||
| 2362 | .unspecified_variable_len_array => .{ .unspecified_variable_len_array = ty.data.sub_type }, | ||
| 2363 | .decayed_unspecified_variable_len_array => .{ .decayed_unspecified_variable_len_array = ty.data.sub_type }, | ||
| 2364 | .func => .{ .func = ty.data.func }, | ||
| 2365 | .var_args_func => .{ .var_args_func = ty.data.func }, | ||
| 2366 | .old_style_func => .{ .old_style_func = ty.data.func }, | ||
| 2367 | .array => .{ .array = ty.data.array }, | ||
| 2368 | .decayed_array => .{ .decayed_array = ty.data.array }, | ||
| 2369 | .static_array => .{ .static_array = ty.data.array }, | ||
| 2370 | .decayed_static_array => .{ .decayed_static_array = ty.data.array }, | ||
| 2371 | .incomplete_array => .{ .incomplete_array = ty.data.array }, | ||
| 2372 | .decayed_incomplete_array => .{ .decayed_incomplete_array = ty.data.array }, | ||
| 2373 | .vector => .{ .vector = ty.data.array }, | ||
| 2374 | .variable_len_array => .{ .variable_len_array = ty.data.expr }, | ||
| 2375 | .decayed_variable_len_array => .{ .decayed_variable_len_array = ty.data.expr }, | ||
| 2376 | .@"struct" => .{ .@"struct" = ty.data.record }, | ||
| 2377 | .@"union" => .{ .@"union" = ty.data.record }, | ||
| 2378 | .@"enum" => .{ .@"enum" = ty.data.@"enum" }, | ||
| 2379 | |||
| 2380 | .typeof_type => .{ .typeof_type = ty.data.sub_type }, | ||
| 2381 | .decayed_typeof_type => .{ .decayed_typeof_type = ty.data.sub_type }, | ||
| 2382 | .typeof_expr => .{ .typeof_expr = ty.data.expr }, | ||
| 2383 | .decayed_typeof_expr => .{ .decayed_typeof_expr = ty.data.expr }, | ||
| 2384 | |||
| 2385 | .attributed => .{ .attributed = ty.data.attributed }, | ||
| 2386 | else => unreachable, | ||
| 2387 | }; | ||
| 2388 | } | ||
| 2389 | }; | ||
| 2390 | |||
| 2391 | pub fn getAttribute(ty: Type, comptime tag: Attribute.Tag) ?Attribute.ArgumentsForTag(tag) { | ||
| 2392 | switch (ty.specifier) { | ||
| 2393 | .typeof_type => return ty.data.sub_type.getAttribute(tag), | ||
| 2394 | .typeof_expr => return ty.data.expr.ty.getAttribute(tag), | ||
| 2395 | .attributed => { | ||
| 2396 | for (ty.data.attributed.attributes) |attribute| { | ||
| 2397 | if (attribute.tag == tag) return @field(attribute.args, @tagName(tag)); | ||
| 2398 | } | ||
| 2399 | return null; | ||
| 2400 | }, | ||
| 2401 | else => return null, | ||
| 2402 | } | ||
| 2403 | } | ||
| 2404 | |||
| 2405 | pub fn hasAttribute(ty: Type, tag: Attribute.Tag) bool { | ||
| 2406 | for (ty.getAttributes()) |attr| { | ||
| 2407 | if (attr.tag == tag) return true; | ||
| 2408 | } | ||
| 2409 | return false; | ||
| 2410 | } | ||
| 2411 | |||
| 2412 | /// printf format modifier | ||
| 2413 | pub fn formatModifier(ty: Type) []const u8 { | ||
| 2414 | return switch (ty.specifier) { | ||
| 2415 | .schar, .uchar => "hh", | ||
| 2416 | .short, .ushort => "h", | ||
| 2417 | .int, .uint => "", | ||
| 2418 | .long, .ulong => "l", | ||
| 2419 | .long_long, .ulong_long => "ll", | ||
| 2420 | else => unreachable, | ||
| 2421 | }; | ||
| 2422 | } | ||
| 2423 | |||
| 2424 | /// Suffix for integer values of this type | ||
| 2425 | pub fn intValueSuffix(ty: Type, comp: *const Compilation) []const u8 { | ||
| 2426 | return switch (ty.specifier) { | ||
| 2427 | .schar, .short, .int => "", | ||
| 2428 | .long => "L", | ||
| 2429 | .long_long => "LL", | ||
| 2430 | .uchar, .char => { | ||
| 2431 | if (ty.specifier == .char and comp.getCharSignedness() == .signed) return ""; | ||
| 2432 | // Only 8-bit char supported currently; | ||
| 2433 | // TODO: handle platforms with 16-bit int + 16-bit char | ||
| 2434 | std.debug.assert(ty.sizeof(comp).? == 1); | ||
| 2435 | return ""; | ||
| 2436 | }, | ||
| 2437 | .ushort => { | ||
| 2438 | if (ty.sizeof(comp).? < int.sizeof(comp).?) { | ||
| 2439 | return ""; | ||
| 2440 | } | ||
| 2441 | return "U"; | ||
| 2442 | }, | ||
| 2443 | .uint => "U", | ||
| 2444 | .ulong => "UL", | ||
| 2445 | .ulong_long => "ULL", | ||
| 2446 | else => unreachable, // not integer | ||
| 2447 | }; | ||
| 2448 | } | ||
| 2449 | |||
| 2450 | /// Print type in C style | ||
| 2451 | pub fn print(ty: Type, mapper: StringInterner.TypeMapper, langopts: LangOpts, w: anytype) @TypeOf(w).Error!void { | ||
| 2452 | _ = try ty.printPrologue(mapper, langopts, w); | ||
| 2453 | try ty.printEpilogue(mapper, langopts, w); | ||
| 2454 | } | ||
| 2455 | |||
| 2456 | pub fn printNamed(ty: Type, name: []const u8, mapper: StringInterner.TypeMapper, langopts: LangOpts, w: anytype) @TypeOf(w).Error!void { | ||
| 2457 | const simple = try ty.printPrologue(mapper, langopts, w); | ||
| 2458 | if (simple) try w.writeByte(' '); | ||
| 2459 | try w.writeAll(name); | ||
| 2460 | try ty.printEpilogue(mapper, langopts, w); | ||
| 2461 | } | ||
| 2462 | |||
| 2463 | const StringGetter = fn (TokenIndex) []const u8; | ||
| 2464 | |||
| 2465 | /// return true if `ty` is simple | ||
| 2466 | fn printPrologue(ty: Type, mapper: StringInterner.TypeMapper, langopts: LangOpts, w: anytype) @TypeOf(w).Error!bool { | ||
| 2467 | if (ty.qual.atomic) { | ||
| 2468 | var non_atomic_ty = ty; | ||
| 2469 | non_atomic_ty.qual.atomic = false; | ||
| 2470 | try w.writeAll("_Atomic("); | ||
| 2471 | try non_atomic_ty.print(mapper, langopts, w); | ||
| 2472 | try w.writeAll(")"); | ||
| 2473 | return true; | ||
| 2474 | } | ||
| 2475 | switch (ty.specifier) { | ||
| 2476 | .pointer, | ||
| 2477 | .decayed_array, | ||
| 2478 | .decayed_static_array, | ||
| 2479 | .decayed_incomplete_array, | ||
| 2480 | .decayed_variable_len_array, | ||
| 2481 | .decayed_unspecified_variable_len_array, | ||
| 2482 | .decayed_typeof_type, | ||
| 2483 | .decayed_typeof_expr, | ||
| 2484 | => { | ||
| 2485 | const elem_ty = ty.elemType(); | ||
| 2486 | const simple = try elem_ty.printPrologue(mapper, langopts, w); | ||
| 2487 | if (simple) try w.writeByte(' '); | ||
| 2488 | if (elem_ty.isFunc() or elem_ty.isArray()) try w.writeByte('('); | ||
| 2489 | try w.writeByte('*'); | ||
| 2490 | try ty.qual.dump(w); | ||
| 2491 | return false; | ||
| 2492 | }, | ||
| 2493 | .func, .var_args_func, .old_style_func => { | ||
| 2494 | const ret_ty = ty.data.func.return_type; | ||
| 2495 | const simple = try ret_ty.printPrologue(mapper, langopts, w); | ||
| 2496 | if (simple) try w.writeByte(' '); | ||
| 2497 | return false; | ||
| 2498 | }, | ||
| 2499 | .array, .static_array, .incomplete_array, .unspecified_variable_len_array, .variable_len_array => { | ||
| 2500 | const elem_ty = ty.elemType(); | ||
| 2501 | const simple = try elem_ty.printPrologue(mapper, langopts, w); | ||
| 2502 | if (simple) try w.writeByte(' '); | ||
| 2503 | return false; | ||
| 2504 | }, | ||
| 2505 | .typeof_type, .typeof_expr => { | ||
| 2506 | const actual = ty.canonicalize(.standard); | ||
| 2507 | return actual.printPrologue(mapper, langopts, w); | ||
| 2508 | }, | ||
| 2509 | .attributed => { | ||
| 2510 | const actual = ty.canonicalize(.standard); | ||
| 2511 | return actual.printPrologue(mapper, langopts, w); | ||
| 2512 | }, | ||
| 2513 | else => {}, | ||
| 2514 | } | ||
| 2515 | try ty.qual.dump(w); | ||
| 2516 | |||
| 2517 | switch (ty.specifier) { | ||
| 2518 | .@"enum" => if (ty.data.@"enum".fixed) { | ||
| 2519 | try w.print("enum {s}: ", .{mapper.lookup(ty.data.@"enum".name)}); | ||
| 2520 | try ty.data.@"enum".tag_ty.dump(mapper, langopts, w); | ||
| 2521 | } else { | ||
| 2522 | try w.print("enum {s}", .{mapper.lookup(ty.data.@"enum".name)}); | ||
| 2523 | }, | ||
| 2524 | .@"struct" => try w.print("struct {s}", .{mapper.lookup(ty.data.record.name)}), | ||
| 2525 | .@"union" => try w.print("union {s}", .{mapper.lookup(ty.data.record.name)}), | ||
| 2526 | .vector => { | ||
| 2527 | const len = ty.data.array.len; | ||
| 2528 | const elem_ty = ty.data.array.elem; | ||
| 2529 | try w.print("__attribute__((__vector_size__({d} * sizeof(", .{len}); | ||
| 2530 | _ = try elem_ty.printPrologue(mapper, langopts, w); | ||
| 2531 | try w.writeAll(")))) "); | ||
| 2532 | _ = try elem_ty.printPrologue(mapper, langopts, w); | ||
| 2533 | try w.print(" (vector of {d} '", .{len}); | ||
| 2534 | _ = try elem_ty.printPrologue(mapper, langopts, w); | ||
| 2535 | try w.writeAll("' values)"); | ||
| 2536 | }, | ||
| 2537 | else => try w.writeAll(Builder.fromType(ty).str(langopts).?), | ||
| 2538 | } | ||
| 2539 | return true; | ||
| 2540 | } | ||
| 2541 | |||
| 2542 | fn printEpilogue(ty: Type, mapper: StringInterner.TypeMapper, langopts: LangOpts, w: anytype) @TypeOf(w).Error!void { | ||
| 2543 | if (ty.qual.atomic) return; | ||
| 2544 | switch (ty.specifier) { | ||
| 2545 | .pointer, | ||
| 2546 | .decayed_array, | ||
| 2547 | .decayed_static_array, | ||
| 2548 | .decayed_incomplete_array, | ||
| 2549 | .decayed_variable_len_array, | ||
| 2550 | .decayed_unspecified_variable_len_array, | ||
| 2551 | .decayed_typeof_type, | ||
| 2552 | .decayed_typeof_expr, | ||
| 2553 | => { | ||
| 2554 | const elem_ty = ty.elemType(); | ||
| 2555 | if (elem_ty.isFunc() or elem_ty.isArray()) try w.writeByte(')'); | ||
| 2556 | try elem_ty.printEpilogue(mapper, langopts, w); | ||
| 2557 | }, | ||
| 2558 | .func, .var_args_func, .old_style_func => { | ||
| 2559 | try w.writeByte('('); | ||
| 2560 | for (ty.data.func.params, 0..) |param, i| { | ||
| 2561 | if (i != 0) try w.writeAll(", "); | ||
| 2562 | _ = try param.ty.printPrologue(mapper, langopts, w); | ||
| 2563 | try param.ty.printEpilogue(mapper, langopts, w); | ||
| 2564 | } | ||
| 2565 | if (ty.specifier != .func) { | ||
| 2566 | if (ty.data.func.params.len != 0) try w.writeAll(", "); | ||
| 2567 | try w.writeAll("..."); | ||
| 2568 | } else if (ty.data.func.params.len == 0) { | ||
| 2569 | try w.writeAll("void"); | ||
| 2570 | } | ||
| 2571 | try w.writeByte(')'); | ||
| 2572 | try ty.data.func.return_type.printEpilogue(mapper, langopts, w); | ||
| 2573 | }, | ||
| 2574 | .array, .static_array => { | ||
| 2575 | try w.writeByte('['); | ||
| 2576 | if (ty.specifier == .static_array) try w.writeAll("static "); | ||
| 2577 | try ty.qual.dump(w); | ||
| 2578 | try w.print("{d}]", .{ty.data.array.len}); | ||
| 2579 | try ty.data.array.elem.printEpilogue(mapper, langopts, w); | ||
| 2580 | }, | ||
| 2581 | .incomplete_array => { | ||
| 2582 | try w.writeByte('['); | ||
| 2583 | try ty.qual.dump(w); | ||
| 2584 | try w.writeByte(']'); | ||
| 2585 | try ty.data.array.elem.printEpilogue(mapper, langopts, w); | ||
| 2586 | }, | ||
| 2587 | .unspecified_variable_len_array => { | ||
| 2588 | try w.writeByte('['); | ||
| 2589 | try ty.qual.dump(w); | ||
| 2590 | try w.writeAll("*]"); | ||
| 2591 | try ty.data.sub_type.printEpilogue(mapper, langopts, w); | ||
| 2592 | }, | ||
| 2593 | .variable_len_array => { | ||
| 2594 | try w.writeByte('['); | ||
| 2595 | try ty.qual.dump(w); | ||
| 2596 | try w.writeAll("<expr>]"); | ||
| 2597 | try ty.data.expr.ty.printEpilogue(mapper, langopts, w); | ||
| 2598 | }, | ||
| 2599 | .typeof_type, .typeof_expr => { | ||
| 2600 | const actual = ty.canonicalize(.standard); | ||
| 2601 | try actual.printEpilogue(mapper, langopts, w); | ||
| 2602 | }, | ||
| 2603 | .attributed => { | ||
| 2604 | const actual = ty.canonicalize(.standard); | ||
| 2605 | try actual.printEpilogue(mapper, langopts, w); | ||
| 2606 | }, | ||
| 2607 | else => {}, | ||
| 2608 | } | ||
| 2609 | } | ||
| 2610 | |||
| 2611 | /// Useful for debugging, too noisy to be enabled by default. | ||
| 2612 | const dump_detailed_containers = false; | ||
| 2613 | |||
| 2614 | // Print as Zig types since those are actually readable | ||
| 2615 | pub fn dump(ty: Type, mapper: StringInterner.TypeMapper, langopts: LangOpts, w: anytype) @TypeOf(w).Error!void { | ||
| 2616 | try ty.qual.dump(w); | ||
| 2617 | switch (ty.specifier) { | ||
| 2618 | .invalid => try w.writeAll("invalid"), | ||
| 2619 | .pointer => { | ||
| 2620 | try w.writeAll("*"); | ||
| 2621 | try ty.data.sub_type.dump(mapper, langopts, w); | ||
| 2622 | }, | ||
| 2623 | .func, .var_args_func, .old_style_func => { | ||
| 2624 | if (ty.specifier == .old_style_func) | ||
| 2625 | try w.writeAll("kr (") | ||
| 2626 | else | ||
| 2627 | try w.writeAll("fn ("); | ||
| 2628 | for (ty.data.func.params, 0..) |param, i| { | ||
| 2629 | if (i != 0) try w.writeAll(", "); | ||
| 2630 | if (param.name != .empty) try w.print("{s}: ", .{mapper.lookup(param.name)}); | ||
| 2631 | try param.ty.dump(mapper, langopts, w); | ||
| 2632 | } | ||
| 2633 | if (ty.specifier != .func) { | ||
| 2634 | if (ty.data.func.params.len != 0) try w.writeAll(", "); | ||
| 2635 | try w.writeAll("..."); | ||
| 2636 | } | ||
| 2637 | try w.writeAll(") "); | ||
| 2638 | try ty.data.func.return_type.dump(mapper, langopts, w); | ||
| 2639 | }, | ||
| 2640 | .array, .static_array, .decayed_array, .decayed_static_array => { | ||
| 2641 | if (ty.specifier == .decayed_array or ty.specifier == .decayed_static_array) try w.writeAll("*d"); | ||
| 2642 | try w.writeByte('['); | ||
| 2643 | if (ty.specifier == .static_array or ty.specifier == .decayed_static_array) try w.writeAll("static "); | ||
| 2644 | try w.print("{d}]", .{ty.data.array.len}); | ||
| 2645 | try ty.data.array.elem.dump(mapper, langopts, w); | ||
| 2646 | }, | ||
| 2647 | .vector => { | ||
| 2648 | try w.print("vector({d}, ", .{ty.data.array.len}); | ||
| 2649 | try ty.data.array.elem.dump(mapper, langopts, w); | ||
| 2650 | try w.writeAll(")"); | ||
| 2651 | }, | ||
| 2652 | .incomplete_array, .decayed_incomplete_array => { | ||
| 2653 | if (ty.specifier == .decayed_incomplete_array) try w.writeAll("*d"); | ||
| 2654 | try w.writeAll("[]"); | ||
| 2655 | try ty.data.array.elem.dump(mapper, langopts, w); | ||
| 2656 | }, | ||
| 2657 | .@"enum" => { | ||
| 2658 | const enum_ty = ty.data.@"enum"; | ||
| 2659 | if (enum_ty.isIncomplete() and !enum_ty.fixed) { | ||
| 2660 | try w.print("enum {s}", .{mapper.lookup(enum_ty.name)}); | ||
| 2661 | } else { | ||
| 2662 | try w.print("enum {s}: ", .{mapper.lookup(enum_ty.name)}); | ||
| 2663 | try enum_ty.tag_ty.dump(mapper, langopts, w); | ||
| 2664 | } | ||
| 2665 | if (dump_detailed_containers) try dumpEnum(enum_ty, mapper, w); | ||
| 2666 | }, | ||
| 2667 | .@"struct" => { | ||
| 2668 | try w.print("struct {s}", .{mapper.lookup(ty.data.record.name)}); | ||
| 2669 | if (dump_detailed_containers) try dumpRecord(ty.data.record, mapper, langopts, w); | ||
| 2670 | }, | ||
| 2671 | .@"union" => { | ||
| 2672 | try w.print("union {s}", .{mapper.lookup(ty.data.record.name)}); | ||
| 2673 | if (dump_detailed_containers) try dumpRecord(ty.data.record, mapper, langopts, w); | ||
| 2674 | }, | ||
| 2675 | .unspecified_variable_len_array, .decayed_unspecified_variable_len_array => { | ||
| 2676 | if (ty.specifier == .decayed_unspecified_variable_len_array) try w.writeAll("*d"); | ||
| 2677 | try w.writeAll("[*]"); | ||
| 2678 | try ty.data.sub_type.dump(mapper, langopts, w); | ||
| 2679 | }, | ||
| 2680 | .variable_len_array, .decayed_variable_len_array => { | ||
| 2681 | if (ty.specifier == .decayed_variable_len_array) try w.writeAll("*d"); | ||
| 2682 | try w.writeAll("[<expr>]"); | ||
| 2683 | try ty.data.expr.ty.dump(mapper, langopts, w); | ||
| 2684 | }, | ||
| 2685 | .typeof_type, .decayed_typeof_type => { | ||
| 2686 | try w.writeAll("typeof("); | ||
| 2687 | try ty.data.sub_type.dump(mapper, langopts, w); | ||
| 2688 | try w.writeAll(")"); | ||
| 2689 | }, | ||
| 2690 | .typeof_expr, .decayed_typeof_expr => { | ||
| 2691 | try w.writeAll("typeof(<expr>: "); | ||
| 2692 | try ty.data.expr.ty.dump(mapper, langopts, w); | ||
| 2693 | try w.writeAll(")"); | ||
| 2694 | }, | ||
| 2695 | .attributed => { | ||
| 2696 | try w.writeAll("attributed("); | ||
| 2697 | try ty.data.attributed.base.dump(mapper, langopts, w); | ||
| 2698 | try w.writeAll(")"); | ||
| 2699 | }, | ||
| 2700 | else => { | ||
| 2701 | try w.writeAll(Builder.fromType(ty).str(langopts).?); | ||
| 2702 | if (ty.specifier == .bit_int or ty.specifier == .complex_bit_int) { | ||
| 2703 | try w.print("({d})", .{ty.data.int.bits}); | ||
| 2704 | } | ||
| 2705 | }, | ||
| 2706 | } | ||
| 2707 | } | ||
| 2708 | |||
| 2709 | fn dumpEnum(@"enum": *Enum, mapper: StringInterner.TypeMapper, w: anytype) @TypeOf(w).Error!void { | ||
| 2710 | try w.writeAll(" {"); | ||
| 2711 | for (@"enum".fields) |field| { | ||
| 2712 | try w.print(" {s} = {d},", .{ mapper.lookup(field.name), field.value }); | ||
| 2713 | } | ||
| 2714 | try w.writeAll(" }"); | ||
| 2715 | } | ||
| 2716 | |||
| 2717 | fn dumpRecord(record: *Record, mapper: StringInterner.TypeMapper, langopts: LangOpts, w: anytype) @TypeOf(w).Error!void { | ||
| 2718 | try w.writeAll(" {"); | ||
| 2719 | for (record.fields) |field| { | ||
| 2720 | try w.writeByte(' '); | ||
| 2721 | try field.ty.dump(mapper, langopts, w); | ||
| 2722 | try w.print(" {s}: {d};", .{ mapper.lookup(field.name), field.bit_width }); | ||
| 2723 | } | ||
| 2724 | try w.writeAll(" }"); | ||
| 2725 | } | ||
deps/aro/aro/Value.zig created+726| ... | @@ -0,0 +1,726 @@ | ||
| 1 | const std = @import("std"); | ||
| 2 | const assert = std.debug.assert; | ||
| 3 | const BigIntConst = std.math.big.int.Const; | ||
| 4 | const BigIntMutable = std.math.big.int.Mutable; | ||
| 5 | const backend = @import("backend"); | ||
| 6 | const Interner = backend.Interner; | ||
| 7 | const BigIntSpace = Interner.Tag.Int.BigIntSpace; | ||
| 8 | const Compilation = @import("Compilation.zig"); | ||
| 9 | const Type = @import("Type.zig"); | ||
| 10 | const target_util = @import("target.zig"); | ||
| 11 | |||
| 12 | const Value = @This(); | ||
| 13 | |||
| 14 | opt_ref: Interner.OptRef = .none, | ||
| 15 | |||
| 16 | pub const zero = Value{ .opt_ref = .zero }; | ||
| 17 | pub const one = Value{ .opt_ref = .one }; | ||
| 18 | pub const @"null" = Value{ .opt_ref = .null }; | ||
| 19 | |||
| 20 | pub fn intern(comp: *Compilation, k: Interner.Key) !Value { | ||
| 21 | const r = try comp.interner.put(comp.gpa, k); | ||
| 22 | return .{ .opt_ref = @enumFromInt(@intFromEnum(r)) }; | ||
| 23 | } | ||
| 24 | |||
| 25 | pub fn int(i: anytype, comp: *Compilation) !Value { | ||
| 26 | const info = @typeInfo(@TypeOf(i)); | ||
| 27 | if (info == .ComptimeInt or info.Int.signedness == .unsigned) { | ||
| 28 | return intern(comp, .{ .int = .{ .u64 = i } }); | ||
| 29 | } else { | ||
| 30 | return intern(comp, .{ .int = .{ .i64 = i } }); | ||
| 31 | } | ||
| 32 | } | ||
| 33 | |||
| 34 | pub fn ref(v: Value) Interner.Ref { | ||
| 35 | std.debug.assert(v.opt_ref != .none); | ||
| 36 | return @enumFromInt(@intFromEnum(v.opt_ref)); | ||
| 37 | } | ||
| 38 | |||
| 39 | pub fn is(v: Value, tag: std.meta.Tag(Interner.Key), comp: *const Compilation) bool { | ||
| 40 | if (v.opt_ref == .none) return false; | ||
| 41 | return comp.interner.get(v.ref()) == tag; | ||
| 42 | } | ||
| 43 | |||
| 44 | /// Number of bits needed to hold `v`. | ||
| 45 | /// Asserts that `v` is not negative | ||
| 46 | pub fn minUnsignedBits(v: Value, comp: *const Compilation) usize { | ||
| 47 | var space: BigIntSpace = undefined; | ||
| 48 | const big = v.toBigInt(&space, comp); | ||
| 49 | assert(big.positive); | ||
| 50 | return big.bitCountAbs(); | ||
| 51 | } | ||
| 52 | |||
| 53 | test "minUnsignedBits" { | ||
| 54 | const Test = struct { | ||
| 55 | fn checkIntBits(comp: *Compilation, v: u64, expected: usize) !void { | ||
| 56 | const val = try intern(comp, .{ .int = .{ .u64 = v } }); | ||
| 57 | try std.testing.expectEqual(expected, val.minUnsignedBits(comp)); | ||
| 58 | } | ||
| 59 | }; | ||
| 60 | |||
| 61 | var comp = Compilation.init(std.testing.allocator); | ||
| 62 | defer comp.deinit(); | ||
| 63 | comp.target = (try std.zig.CrossTarget.parse(.{ .arch_os_abi = "x86_64-linux-gnu" })).toTarget(); | ||
| 64 | |||
| 65 | try Test.checkIntBits(&comp, 0, 0); | ||
| 66 | try Test.checkIntBits(&comp, 1, 1); | ||
| 67 | try Test.checkIntBits(&comp, 2, 2); | ||
| 68 | try Test.checkIntBits(&comp, std.math.maxInt(i8), 7); | ||
| 69 | try Test.checkIntBits(&comp, std.math.maxInt(u8), 8); | ||
| 70 | try Test.checkIntBits(&comp, std.math.maxInt(i16), 15); | ||
| 71 | try Test.checkIntBits(&comp, std.math.maxInt(u16), 16); | ||
| 72 | try Test.checkIntBits(&comp, std.math.maxInt(i32), 31); | ||
| 73 | try Test.checkIntBits(&comp, std.math.maxInt(u32), 32); | ||
| 74 | try Test.checkIntBits(&comp, std.math.maxInt(i64), 63); | ||
| 75 | try Test.checkIntBits(&comp, std.math.maxInt(u64), 64); | ||
| 76 | } | ||
| 77 | |||
| 78 | /// Minimum number of bits needed to represent `v` in 2's complement notation | ||
| 79 | /// Asserts that `v` is negative. | ||
| 80 | pub fn minSignedBits(v: Value, comp: *const Compilation) usize { | ||
| 81 | var space: BigIntSpace = undefined; | ||
| 82 | const big = v.toBigInt(&space, comp); | ||
| 83 | assert(!big.positive); | ||
| 84 | return big.bitCountTwosComp(); | ||
| 85 | } | ||
| 86 | |||
| 87 | test "minSignedBits" { | ||
| 88 | const Test = struct { | ||
| 89 | fn checkIntBits(comp: *Compilation, v: i64, expected: usize) !void { | ||
| 90 | const val = try intern(comp, .{ .int = .{ .i64 = v } }); | ||
| 91 | try std.testing.expectEqual(expected, val.minSignedBits(comp)); | ||
| 92 | } | ||
| 93 | }; | ||
| 94 | |||
| 95 | var comp = Compilation.init(std.testing.allocator); | ||
| 96 | defer comp.deinit(); | ||
| 97 | comp.target = (try std.zig.CrossTarget.parse(.{ .arch_os_abi = "x86_64-linux-gnu" })).toTarget(); | ||
| 98 | |||
| 99 | try Test.checkIntBits(&comp, -1, 1); | ||
| 100 | try Test.checkIntBits(&comp, -2, 2); | ||
| 101 | try Test.checkIntBits(&comp, -10, 5); | ||
| 102 | try Test.checkIntBits(&comp, -101, 8); | ||
| 103 | try Test.checkIntBits(&comp, std.math.minInt(i8), 8); | ||
| 104 | try Test.checkIntBits(&comp, std.math.minInt(i16), 16); | ||
| 105 | try Test.checkIntBits(&comp, std.math.minInt(i32), 32); | ||
| 106 | try Test.checkIntBits(&comp, std.math.minInt(i64), 64); | ||
| 107 | } | ||
| 108 | |||
| 109 | pub const FloatToIntChangeKind = enum { | ||
| 110 | /// value did not change | ||
| 111 | none, | ||
| 112 | /// floating point number too small or large for destination integer type | ||
| 113 | out_of_range, | ||
| 114 | /// tried to convert a NaN or Infinity | ||
| 115 | overflow, | ||
| 116 | /// fractional value was converted to zero | ||
| 117 | nonzero_to_zero, | ||
| 118 | /// fractional part truncated | ||
| 119 | value_changed, | ||
| 120 | }; | ||
| 121 | |||
| 122 | /// Converts the stored value from a float to an integer. | ||
| 123 | /// `.none` value remains unchanged. | ||
| 124 | pub fn floatToInt(v: *Value, dest_ty: Type, comp: *Compilation) !FloatToIntChangeKind { | ||
| 125 | if (v.opt_ref == .none) return .none; | ||
| 126 | |||
| 127 | const float_val = v.toFloat(f128, comp); | ||
| 128 | const was_zero = float_val == 0; | ||
| 129 | |||
| 130 | if (dest_ty.is(.bool)) { | ||
| 131 | const was_one = float_val == 1.0; | ||
| 132 | v.* = fromBool(!was_zero); | ||
| 133 | if (was_zero or was_one) return .none; | ||
| 134 | return .value_changed; | ||
| 135 | } else if (dest_ty.isUnsignedInt(comp) and v.compare(.lt, zero, comp)) { | ||
| 136 | v.* = zero; | ||
| 137 | return .out_of_range; | ||
| 138 | } | ||
| 139 | |||
| 140 | const had_fraction = @rem(float_val, 1) != 0; | ||
| 141 | const is_negative = std.math.signbit(float_val); | ||
| 142 | const floored = @floor(@abs(float_val)); | ||
| 143 | |||
| 144 | var rational = try std.math.big.Rational.init(comp.gpa); | ||
| 145 | defer rational.deinit(); | ||
| 146 | rational.setFloat(f128, floored) catch |err| switch (err) { | ||
| 147 | error.NonFiniteFloat => { | ||
| 148 | v.* = .{}; | ||
| 149 | return .overflow; | ||
| 150 | }, | ||
| 151 | error.OutOfMemory => return error.OutOfMemory, | ||
| 152 | }; | ||
| 153 | |||
| 154 | // The float is reduced in rational.setFloat, so we assert that denominator is equal to one | ||
| 155 | const big_one = std.math.big.int.Const{ .limbs = &.{1}, .positive = true }; | ||
| 156 | assert(rational.q.toConst().eqlAbs(big_one)); | ||
| 157 | |||
| 158 | if (is_negative) { | ||
| 159 | rational.negate(); | ||
| 160 | } | ||
| 161 | |||
| 162 | const signedness = dest_ty.signedness(comp); | ||
| 163 | const bits: usize = @intCast(dest_ty.bitSizeof(comp).?); | ||
| 164 | |||
| 165 | // rational.p.truncate(rational.p.toConst(), signedness: Signedness, bit_count: usize) | ||
| 166 | const fits = rational.p.fitsInTwosComp(signedness, bits); | ||
| 167 | v.* = try intern(comp, .{ .int = .{ .big_int = rational.p.toConst() } }); | ||
| 168 | try rational.p.truncate(&rational.p, signedness, bits); | ||
| 169 | |||
| 170 | if (!was_zero and v.isZero(comp)) return .nonzero_to_zero; | ||
| 171 | if (!fits) return .out_of_range; | ||
| 172 | if (had_fraction) return .value_changed; | ||
| 173 | return .none; | ||
| 174 | } | ||
| 175 | |||
| 176 | /// Converts the stored value from an integer to a float. | ||
| 177 | /// `.none` value remains unchanged. | ||
| 178 | pub fn intToFloat(v: *Value, dest_ty: Type, comp: *Compilation) !void { | ||
| 179 | if (v.opt_ref == .none) return; | ||
| 180 | const bits = dest_ty.bitSizeof(comp).?; | ||
| 181 | return switch (comp.interner.get(v.ref()).int) { | ||
| 182 | inline .u64, .i64 => |data| { | ||
| 183 | const f: Interner.Key.Float = switch (bits) { | ||
| 184 | 16 => .{ .f16 = @floatFromInt(data) }, | ||
| 185 | 32 => .{ .f32 = @floatFromInt(data) }, | ||
| 186 | 64 => .{ .f64 = @floatFromInt(data) }, | ||
| 187 | 80 => .{ .f80 = @floatFromInt(data) }, | ||
| 188 | 128 => .{ .f128 = @floatFromInt(data) }, | ||
| 189 | else => unreachable, | ||
| 190 | }; | ||
| 191 | v.* = try intern(comp, .{ .float = f }); | ||
| 192 | }, | ||
| 193 | .big_int => |data| { | ||
| 194 | const big_f = bigIntToFloat(data.limbs, data.positive); | ||
| 195 | const f: Interner.Key.Float = switch (bits) { | ||
| 196 | 16 => .{ .f16 = @floatCast(big_f) }, | ||
| 197 | 32 => .{ .f32 = @floatCast(big_f) }, | ||
| 198 | 64 => .{ .f64 = @floatCast(big_f) }, | ||
| 199 | 80 => .{ .f80 = @floatCast(big_f) }, | ||
| 200 | 128 => .{ .f128 = @floatCast(big_f) }, | ||
| 201 | else => unreachable, | ||
| 202 | }; | ||
| 203 | v.* = try intern(comp, .{ .float = f }); | ||
| 204 | }, | ||
| 205 | }; | ||
| 206 | } | ||
| 207 | |||
| 208 | /// Truncates or extends bits based on type. | ||
| 209 | /// `.none` value remains unchanged. | ||
| 210 | pub fn intCast(v: *Value, dest_ty: Type, comp: *Compilation) !void { | ||
| 211 | if (v.opt_ref == .none) return; | ||
| 212 | const bits: usize = @intCast(dest_ty.bitSizeof(comp).?); | ||
| 213 | var space: BigIntSpace = undefined; | ||
| 214 | const big = v.toBigInt(&space, comp); | ||
| 215 | |||
| 216 | const limbs = try comp.gpa.alloc( | ||
| 217 | std.math.big.Limb, | ||
| 218 | std.math.big.int.calcTwosCompLimbCount(bits), | ||
| 219 | ); | ||
| 220 | defer comp.gpa.free(limbs); | ||
| 221 | var result_bigint = std.math.big.int.Mutable{ .limbs = limbs, .positive = undefined, .len = undefined }; | ||
| 222 | result_bigint.truncate(big, dest_ty.signedness(comp), bits); | ||
| 223 | |||
| 224 | v.* = try intern(comp, .{ .int = .{ .big_int = result_bigint.toConst() } }); | ||
| 225 | } | ||
| 226 | |||
| 227 | /// Converts the stored value from an integer to a float. | ||
| 228 | /// `.none` value remains unchanged. | ||
| 229 | pub fn floatCast(v: *Value, dest_ty: Type, comp: *Compilation) !void { | ||
| 230 | if (v.opt_ref == .none) return; | ||
| 231 | // TODO complex values | ||
| 232 | const bits = dest_ty.makeReal().bitSizeof(comp).?; | ||
| 233 | const f: Interner.Key.Float = switch (bits) { | ||
| 234 | 16 => .{ .f16 = v.toFloat(f16, comp) }, | ||
| 235 | 32 => .{ .f32 = v.toFloat(f32, comp) }, | ||
| 236 | 64 => .{ .f64 = v.toFloat(f64, comp) }, | ||
| 237 | 80 => .{ .f80 = v.toFloat(f80, comp) }, | ||
| 238 | 128 => .{ .f128 = v.toFloat(f128, comp) }, | ||
| 239 | else => unreachable, | ||
| 240 | }; | ||
| 241 | v.* = try intern(comp, .{ .float = f }); | ||
| 242 | } | ||
| 243 | |||
| 244 | pub fn toFloat(v: Value, comptime T: type, comp: *const Compilation) T { | ||
| 245 | return switch (comp.interner.get(v.ref())) { | ||
| 246 | .int => |repr| switch (repr) { | ||
| 247 | inline .u64, .i64 => |data| @floatFromInt(data), | ||
| 248 | .big_int => |data| @floatCast(bigIntToFloat(data.limbs, data.positive)), | ||
| 249 | }, | ||
| 250 | .float => |repr| switch (repr) { | ||
| 251 | inline else => |data| @floatCast(data), | ||
| 252 | }, | ||
| 253 | else => unreachable, | ||
| 254 | }; | ||
| 255 | } | ||
| 256 | |||
| 257 | fn bigIntToFloat(limbs: []const std.math.big.Limb, positive: bool) f128 { | ||
| 258 | if (limbs.len == 0) return 0; | ||
| 259 | |||
| 260 | const base = std.math.maxInt(std.math.big.Limb) + 1; | ||
| 261 | var result: f128 = 0; | ||
| 262 | var i: usize = limbs.len; | ||
| 263 | while (i != 0) { | ||
| 264 | i -= 1; | ||
| 265 | const limb: f128 = @as(f128, @floatFromInt(limbs[i])); | ||
| 266 | result = @mulAdd(f128, base, result, limb); | ||
| 267 | } | ||
| 268 | if (positive) { | ||
| 269 | return result; | ||
| 270 | } else { | ||
| 271 | return -result; | ||
| 272 | } | ||
| 273 | } | ||
| 274 | |||
| 275 | pub fn toBigInt(val: Value, space: *BigIntSpace, comp: *const Compilation) BigIntConst { | ||
| 276 | return switch (comp.interner.get(val.ref()).int) { | ||
| 277 | inline .u64, .i64 => |x| BigIntMutable.init(&space.limbs, x).toConst(), | ||
| 278 | .big_int => |b| b, | ||
| 279 | }; | ||
| 280 | } | ||
| 281 | |||
| 282 | pub fn isZero(v: Value, comp: *const Compilation) bool { | ||
| 283 | if (v.opt_ref == .none) return false; | ||
| 284 | switch (v.ref()) { | ||
| 285 | .zero => return true, | ||
| 286 | .one => return false, | ||
| 287 | .null => return target_util.nullRepr(comp.target) == 0, | ||
| 288 | else => {}, | ||
| 289 | } | ||
| 290 | const key = comp.interner.get(v.ref()); | ||
| 291 | switch (key) { | ||
| 292 | .float => |repr| switch (repr) { | ||
| 293 | inline else => |data| return data == 0, | ||
| 294 | }, | ||
| 295 | .int => |repr| switch (repr) { | ||
| 296 | inline .i64, .u64 => |data| return data == 0, | ||
| 297 | .big_int => |data| return data.eqlZero(), | ||
| 298 | }, | ||
| 299 | .bytes => return false, | ||
| 300 | else => unreachable, | ||
| 301 | } | ||
| 302 | } | ||
| 303 | |||
| 304 | /// Converts value to zero or one; | ||
| 305 | /// `.none` value remains unchanged. | ||
| 306 | pub fn boolCast(v: *Value, comp: *const Compilation) void { | ||
| 307 | if (v.opt_ref == .none) return; | ||
| 308 | v.* = fromBool(v.toBool(comp)); | ||
| 309 | } | ||
| 310 | |||
| 311 | pub fn fromBool(b: bool) Value { | ||
| 312 | return if (b) one else zero; | ||
| 313 | } | ||
| 314 | |||
| 315 | pub fn toBool(v: Value, comp: *const Compilation) bool { | ||
| 316 | return !v.isZero(comp); | ||
| 317 | } | ||
| 318 | |||
| 319 | pub fn toInt(v: Value, comptime T: type, comp: *const Compilation) ?T { | ||
| 320 | if (v.opt_ref == .none) return null; | ||
| 321 | if (comp.interner.get(v.ref()) != .int) return null; | ||
| 322 | var space: BigIntSpace = undefined; | ||
| 323 | const big_int = v.toBigInt(&space, comp); | ||
| 324 | return big_int.to(T) catch null; | ||
| 325 | } | ||
| 326 | |||
| 327 | pub fn add(res: *Value, lhs: Value, rhs: Value, ty: Type, comp: *Compilation) !bool { | ||
| 328 | const bits: usize = @intCast(ty.bitSizeof(comp).?); | ||
| 329 | if (ty.isFloat()) { | ||
| 330 | const f: Interner.Key.Float = switch (bits) { | ||
| 331 | 16 => .{ .f16 = lhs.toFloat(f16, comp) + rhs.toFloat(f16, comp) }, | ||
| 332 | 32 => .{ .f32 = lhs.toFloat(f32, comp) + rhs.toFloat(f32, comp) }, | ||
| 333 | 64 => .{ .f64 = lhs.toFloat(f64, comp) + rhs.toFloat(f64, comp) }, | ||
| 334 | 80 => .{ .f80 = lhs.toFloat(f80, comp) + rhs.toFloat(f80, comp) }, | ||
| 335 | 128 => .{ .f128 = lhs.toFloat(f128, comp) + rhs.toFloat(f128, comp) }, | ||
| 336 | else => unreachable, | ||
| 337 | }; | ||
| 338 | res.* = try intern(comp, .{ .float = f }); | ||
| 339 | return false; | ||
| 340 | } else { | ||
| 341 | var lhs_space: BigIntSpace = undefined; | ||
| 342 | var rhs_space: BigIntSpace = undefined; | ||
| 343 | const lhs_bigint = lhs.toBigInt(&lhs_space, comp); | ||
| 344 | const rhs_bigint = rhs.toBigInt(&rhs_space, comp); | ||
| 345 | |||
| 346 | const limbs = try comp.gpa.alloc( | ||
| 347 | std.math.big.Limb, | ||
| 348 | std.math.big.int.calcTwosCompLimbCount(bits), | ||
| 349 | ); | ||
| 350 | defer comp.gpa.free(limbs); | ||
| 351 | var result_bigint = std.math.big.int.Mutable{ .limbs = limbs, .positive = undefined, .len = undefined }; | ||
| 352 | |||
| 353 | const overflowed = result_bigint.addWrap(lhs_bigint, rhs_bigint, ty.signedness(comp), bits); | ||
| 354 | res.* = try intern(comp, .{ .int = .{ .big_int = result_bigint.toConst() } }); | ||
| 355 | return overflowed; | ||
| 356 | } | ||
| 357 | } | ||
| 358 | |||
| 359 | pub fn sub(res: *Value, lhs: Value, rhs: Value, ty: Type, comp: *Compilation) !bool { | ||
| 360 | const bits: usize = @intCast(ty.bitSizeof(comp).?); | ||
| 361 | if (ty.isFloat()) { | ||
| 362 | const f: Interner.Key.Float = switch (bits) { | ||
| 363 | 16 => .{ .f16 = lhs.toFloat(f16, comp) - rhs.toFloat(f16, comp) }, | ||
| 364 | 32 => .{ .f32 = lhs.toFloat(f32, comp) - rhs.toFloat(f32, comp) }, | ||
| 365 | 64 => .{ .f64 = lhs.toFloat(f64, comp) - rhs.toFloat(f64, comp) }, | ||
| 366 | 80 => .{ .f80 = lhs.toFloat(f80, comp) - rhs.toFloat(f80, comp) }, | ||
| 367 | 128 => .{ .f128 = lhs.toFloat(f128, comp) - rhs.toFloat(f128, comp) }, | ||
| 368 | else => unreachable, | ||
| 369 | }; | ||
| 370 | res.* = try intern(comp, .{ .float = f }); | ||
| 371 | return false; | ||
| 372 | } else { | ||
| 373 | var lhs_space: BigIntSpace = undefined; | ||
| 374 | var rhs_space: BigIntSpace = undefined; | ||
| 375 | const lhs_bigint = lhs.toBigInt(&lhs_space, comp); | ||
| 376 | const rhs_bigint = rhs.toBigInt(&rhs_space, comp); | ||
| 377 | |||
| 378 | const limbs = try comp.gpa.alloc( | ||
| 379 | std.math.big.Limb, | ||
| 380 | std.math.big.int.calcTwosCompLimbCount(bits), | ||
| 381 | ); | ||
| 382 | defer comp.gpa.free(limbs); | ||
| 383 | var result_bigint = std.math.big.int.Mutable{ .limbs = limbs, .positive = undefined, .len = undefined }; | ||
| 384 | |||
| 385 | const overflowed = result_bigint.subWrap(lhs_bigint, rhs_bigint, ty.signedness(comp), bits); | ||
| 386 | res.* = try intern(comp, .{ .int = .{ .big_int = result_bigint.toConst() } }); | ||
| 387 | return overflowed; | ||
| 388 | } | ||
| 389 | } | ||
| 390 | |||
| 391 | pub fn mul(res: *Value, lhs: Value, rhs: Value, ty: Type, comp: *Compilation) !bool { | ||
| 392 | const bits: usize = @intCast(ty.bitSizeof(comp).?); | ||
| 393 | if (ty.isFloat()) { | ||
| 394 | const f: Interner.Key.Float = switch (bits) { | ||
| 395 | 16 => .{ .f16 = lhs.toFloat(f16, comp) * rhs.toFloat(f16, comp) }, | ||
| 396 | 32 => .{ .f32 = lhs.toFloat(f32, comp) * rhs.toFloat(f32, comp) }, | ||
| 397 | 64 => .{ .f64 = lhs.toFloat(f64, comp) * rhs.toFloat(f64, comp) }, | ||
| 398 | 80 => .{ .f80 = lhs.toFloat(f80, comp) * rhs.toFloat(f80, comp) }, | ||
| 399 | 128 => .{ .f128 = lhs.toFloat(f128, comp) * rhs.toFloat(f128, comp) }, | ||
| 400 | else => unreachable, | ||
| 401 | }; | ||
| 402 | res.* = try intern(comp, .{ .float = f }); | ||
| 403 | return false; | ||
| 404 | } else { | ||
| 405 | var lhs_space: BigIntSpace = undefined; | ||
| 406 | var rhs_space: BigIntSpace = undefined; | ||
| 407 | const lhs_bigint = lhs.toBigInt(&lhs_space, comp); | ||
| 408 | const rhs_bigint = rhs.toBigInt(&rhs_space, comp); | ||
| 409 | |||
| 410 | const limbs = try comp.gpa.alloc( | ||
| 411 | std.math.big.Limb, | ||
| 412 | lhs_bigint.limbs.len + rhs_bigint.limbs.len, | ||
| 413 | ); | ||
| 414 | defer comp.gpa.free(limbs); | ||
| 415 | var result_bigint = BigIntMutable{ .limbs = limbs, .positive = undefined, .len = undefined }; | ||
| 416 | |||
| 417 | const limbs_buffer = try comp.gpa.alloc( | ||
| 418 | std.math.big.Limb, | ||
| 419 | std.math.big.int.calcMulLimbsBufferLen(lhs_bigint.limbs.len, rhs_bigint.limbs.len, 1), | ||
| 420 | ); | ||
| 421 | defer comp.gpa.free(limbs_buffer); | ||
| 422 | |||
| 423 | result_bigint.mul(lhs_bigint, rhs_bigint, limbs_buffer, comp.gpa); | ||
| 424 | |||
| 425 | const signedness = ty.signedness(comp); | ||
| 426 | const overflowed = !result_bigint.toConst().fitsInTwosComp(signedness, bits); | ||
| 427 | if (overflowed) { | ||
| 428 | result_bigint.truncate(result_bigint.toConst(), signedness, bits); | ||
| 429 | } | ||
| 430 | res.* = try intern(comp, .{ .int = .{ .big_int = result_bigint.toConst() } }); | ||
| 431 | return overflowed; | ||
| 432 | } | ||
| 433 | } | ||
| 434 | |||
| 435 | /// caller guarantees rhs != 0 | ||
| 436 | pub fn div(res: *Value, lhs: Value, rhs: Value, ty: Type, comp: *Compilation) !bool { | ||
| 437 | const bits: usize = @intCast(ty.bitSizeof(comp).?); | ||
| 438 | if (ty.isFloat()) { | ||
| 439 | const f: Interner.Key.Float = switch (bits) { | ||
| 440 | 16 => .{ .f16 = lhs.toFloat(f16, comp) / rhs.toFloat(f16, comp) }, | ||
| 441 | 32 => .{ .f32 = lhs.toFloat(f32, comp) / rhs.toFloat(f32, comp) }, | ||
| 442 | 64 => .{ .f64 = lhs.toFloat(f64, comp) / rhs.toFloat(f64, comp) }, | ||
| 443 | 80 => .{ .f80 = lhs.toFloat(f80, comp) / rhs.toFloat(f80, comp) }, | ||
| 444 | 128 => .{ .f128 = lhs.toFloat(f128, comp) / rhs.toFloat(f128, comp) }, | ||
| 445 | else => unreachable, | ||
| 446 | }; | ||
| 447 | res.* = try intern(comp, .{ .float = f }); | ||
| 448 | return false; | ||
| 449 | } else { | ||
| 450 | var lhs_space: BigIntSpace = undefined; | ||
| 451 | var rhs_space: BigIntSpace = undefined; | ||
| 452 | const lhs_bigint = lhs.toBigInt(&lhs_space, comp); | ||
| 453 | const rhs_bigint = rhs.toBigInt(&rhs_space, comp); | ||
| 454 | |||
| 455 | const limbs_q = try comp.gpa.alloc( | ||
| 456 | std.math.big.Limb, | ||
| 457 | lhs_bigint.limbs.len, | ||
| 458 | ); | ||
| 459 | defer comp.gpa.free(limbs_q); | ||
| 460 | var result_q = BigIntMutable{ .limbs = limbs_q, .positive = undefined, .len = undefined }; | ||
| 461 | |||
| 462 | const limbs_r = try comp.gpa.alloc( | ||
| 463 | std.math.big.Limb, | ||
| 464 | rhs_bigint.limbs.len, | ||
| 465 | ); | ||
| 466 | defer comp.gpa.free(limbs_r); | ||
| 467 | var result_r = BigIntMutable{ .limbs = limbs_r, .positive = undefined, .len = undefined }; | ||
| 468 | |||
| 469 | const limbs_buffer = try comp.gpa.alloc( | ||
| 470 | std.math.big.Limb, | ||
| 471 | std.math.big.int.calcDivLimbsBufferLen(lhs_bigint.limbs.len, rhs_bigint.limbs.len), | ||
| 472 | ); | ||
| 473 | defer comp.gpa.free(limbs_buffer); | ||
| 474 | |||
| 475 | result_q.divTrunc(&result_r, lhs_bigint, rhs_bigint, limbs_buffer); | ||
| 476 | |||
| 477 | res.* = try intern(comp, .{ .int = .{ .big_int = result_q.toConst() } }); | ||
| 478 | return !result_q.toConst().fitsInTwosComp(ty.signedness(comp), bits); | ||
| 479 | } | ||
| 480 | } | ||
| 481 | |||
| 482 | /// caller guarantees rhs != 0 | ||
| 483 | /// caller guarantees lhs != std.math.minInt(T) OR rhs != -1 | ||
| 484 | pub fn rem(lhs: Value, rhs: Value, ty: Type, comp: *Compilation) !Value { | ||
| 485 | var lhs_space: BigIntSpace = undefined; | ||
| 486 | var rhs_space: BigIntSpace = undefined; | ||
| 487 | const lhs_bigint = lhs.toBigInt(&lhs_space, comp); | ||
| 488 | const rhs_bigint = rhs.toBigInt(&rhs_space, comp); | ||
| 489 | |||
| 490 | const signedness = ty.signedness(comp); | ||
| 491 | if (signedness == .signed) { | ||
| 492 | var spaces: [3]BigIntSpace = undefined; | ||
| 493 | const min_val = BigIntMutable.init(&spaces[0].limbs, ty.minInt(comp)).toConst(); | ||
| 494 | const negative = BigIntMutable.init(&spaces[1].limbs, -1).toConst(); | ||
| 495 | const big_one = BigIntMutable.init(&spaces[2].limbs, 1).toConst(); | ||
| 496 | if (lhs_bigint.eql(min_val) and rhs_bigint.eql(negative)) { | ||
| 497 | return .{}; | ||
| 498 | } else if (rhs_bigint.order(big_one).compare(.lt)) { | ||
| 499 | // lhs - @divTrunc(lhs, rhs) * rhs | ||
| 500 | var tmp: Value = undefined; | ||
| 501 | _ = try tmp.div(lhs, rhs, ty, comp); | ||
| 502 | _ = try tmp.mul(tmp, rhs, ty, comp); | ||
| 503 | _ = try tmp.sub(lhs, tmp, ty, comp); | ||
| 504 | return tmp; | ||
| 505 | } | ||
| 506 | } | ||
| 507 | |||
| 508 | const limbs_q = try comp.gpa.alloc( | ||
| 509 | std.math.big.Limb, | ||
| 510 | lhs_bigint.limbs.len, | ||
| 511 | ); | ||
| 512 | defer comp.gpa.free(limbs_q); | ||
| 513 | var result_q = BigIntMutable{ .limbs = limbs_q, .positive = undefined, .len = undefined }; | ||
| 514 | |||
| 515 | const limbs_r = try comp.gpa.alloc( | ||
| 516 | std.math.big.Limb, | ||
| 517 | rhs_bigint.limbs.len, | ||
| 518 | ); | ||
| 519 | defer comp.gpa.free(limbs_r); | ||
| 520 | var result_r = BigIntMutable{ .limbs = limbs_r, .positive = undefined, .len = undefined }; | ||
| 521 | |||
| 522 | const limbs_buffer = try comp.gpa.alloc( | ||
| 523 | std.math.big.Limb, | ||
| 524 | std.math.big.int.calcDivLimbsBufferLen(lhs_bigint.limbs.len, rhs_bigint.limbs.len), | ||
| 525 | ); | ||
| 526 | defer comp.gpa.free(limbs_buffer); | ||
| 527 | |||
| 528 | result_q.divTrunc(&result_r, lhs_bigint, rhs_bigint, limbs_buffer); | ||
| 529 | return intern(comp, .{ .int = .{ .big_int = result_r.toConst() } }); | ||
| 530 | } | ||
| 531 | |||
| 532 | pub fn bitOr(lhs: Value, rhs: Value, comp: *Compilation) !Value { | ||
| 533 | var lhs_space: BigIntSpace = undefined; | ||
| 534 | var rhs_space: BigIntSpace = undefined; | ||
| 535 | const lhs_bigint = lhs.toBigInt(&lhs_space, comp); | ||
| 536 | const rhs_bigint = rhs.toBigInt(&rhs_space, comp); | ||
| 537 | |||
| 538 | const limbs = try comp.gpa.alloc( | ||
| 539 | std.math.big.Limb, | ||
| 540 | @max(lhs_bigint.limbs.len, rhs_bigint.limbs.len), | ||
| 541 | ); | ||
| 542 | defer comp.gpa.free(limbs); | ||
| 543 | var result_bigint = std.math.big.int.Mutable{ .limbs = limbs, .positive = undefined, .len = undefined }; | ||
| 544 | |||
| 545 | result_bigint.bitOr(lhs_bigint, rhs_bigint); | ||
| 546 | return intern(comp, .{ .int = .{ .big_int = result_bigint.toConst() } }); | ||
| 547 | } | ||
| 548 | |||
| 549 | pub fn bitXor(lhs: Value, rhs: Value, comp: *Compilation) !Value { | ||
| 550 | var lhs_space: BigIntSpace = undefined; | ||
| 551 | var rhs_space: BigIntSpace = undefined; | ||
| 552 | const lhs_bigint = lhs.toBigInt(&lhs_space, comp); | ||
| 553 | const rhs_bigint = rhs.toBigInt(&rhs_space, comp); | ||
| 554 | |||
| 555 | const limbs = try comp.gpa.alloc( | ||
| 556 | std.math.big.Limb, | ||
| 557 | @max(lhs_bigint.limbs.len, rhs_bigint.limbs.len), | ||
| 558 | ); | ||
| 559 | defer comp.gpa.free(limbs); | ||
| 560 | var result_bigint = std.math.big.int.Mutable{ .limbs = limbs, .positive = undefined, .len = undefined }; | ||
| 561 | |||
| 562 | result_bigint.bitXor(lhs_bigint, rhs_bigint); | ||
| 563 | return intern(comp, .{ .int = .{ .big_int = result_bigint.toConst() } }); | ||
| 564 | } | ||
| 565 | |||
| 566 | pub fn bitAnd(lhs: Value, rhs: Value, comp: *Compilation) !Value { | ||
| 567 | var lhs_space: BigIntSpace = undefined; | ||
| 568 | var rhs_space: BigIntSpace = undefined; | ||
| 569 | const lhs_bigint = lhs.toBigInt(&lhs_space, comp); | ||
| 570 | const rhs_bigint = rhs.toBigInt(&rhs_space, comp); | ||
| 571 | |||
| 572 | const limbs = try comp.gpa.alloc( | ||
| 573 | std.math.big.Limb, | ||
| 574 | @max(lhs_bigint.limbs.len, rhs_bigint.limbs.len), | ||
| 575 | ); | ||
| 576 | defer comp.gpa.free(limbs); | ||
| 577 | var result_bigint = std.math.big.int.Mutable{ .limbs = limbs, .positive = undefined, .len = undefined }; | ||
| 578 | |||
| 579 | result_bigint.bitAnd(lhs_bigint, rhs_bigint); | ||
| 580 | return intern(comp, .{ .int = .{ .big_int = result_bigint.toConst() } }); | ||
| 581 | } | ||
| 582 | |||
| 583 | pub fn bitNot(val: Value, ty: Type, comp: *Compilation) !Value { | ||
| 584 | const bits: usize = @intCast(ty.bitSizeof(comp).?); | ||
| 585 | var val_space: Value.BigIntSpace = undefined; | ||
| 586 | const val_bigint = val.toBigInt(&val_space, comp); | ||
| 587 | |||
| 588 | const limbs = try comp.gpa.alloc( | ||
| 589 | std.math.big.Limb, | ||
| 590 | std.math.big.int.calcTwosCompLimbCount(bits), | ||
| 591 | ); | ||
| 592 | defer comp.gpa.free(limbs); | ||
| 593 | var result_bigint = std.math.big.int.Mutable{ .limbs = limbs, .positive = undefined, .len = undefined }; | ||
| 594 | |||
| 595 | result_bigint.bitNotWrap(val_bigint, ty.signedness(comp), bits); | ||
| 596 | return intern(comp, .{ .int = .{ .big_int = result_bigint.toConst() } }); | ||
| 597 | } | ||
| 598 | |||
| 599 | pub fn shl(res: *Value, lhs: Value, rhs: Value, ty: Type, comp: *Compilation) !bool { | ||
| 600 | var lhs_space: Value.BigIntSpace = undefined; | ||
| 601 | const lhs_bigint = lhs.toBigInt(&lhs_space, comp); | ||
| 602 | const shift = rhs.toInt(usize, comp) orelse std.math.maxInt(usize); | ||
| 603 | |||
| 604 | const bits: usize = @intCast(ty.bitSizeof(comp).?); | ||
| 605 | if (shift > bits) { | ||
| 606 | if (lhs_bigint.positive) { | ||
| 607 | res.* = try intern(comp, .{ .int = .{ .u64 = ty.maxInt(comp) } }); | ||
| 608 | } else { | ||
| 609 | res.* = try intern(comp, .{ .int = .{ .i64 = ty.minInt(comp) } }); | ||
| 610 | } | ||
| 611 | return true; | ||
| 612 | } | ||
| 613 | |||
| 614 | const limbs = try comp.gpa.alloc( | ||
| 615 | std.math.big.Limb, | ||
| 616 | lhs_bigint.limbs.len + (shift / (@sizeOf(std.math.big.Limb) * 8)) + 1, | ||
| 617 | ); | ||
| 618 | defer comp.gpa.free(limbs); | ||
| 619 | var result_bigint = std.math.big.int.Mutable{ .limbs = limbs, .positive = undefined, .len = undefined }; | ||
| 620 | |||
| 621 | result_bigint.shiftLeft(lhs_bigint, shift); | ||
| 622 | const signedness = ty.signedness(comp); | ||
| 623 | const overflowed = !result_bigint.toConst().fitsInTwosComp(signedness, bits); | ||
| 624 | if (overflowed) { | ||
| 625 | result_bigint.truncate(result_bigint.toConst(), signedness, bits); | ||
| 626 | } | ||
| 627 | res.* = try intern(comp, .{ .int = .{ .big_int = result_bigint.toConst() } }); | ||
| 628 | return overflowed; | ||
| 629 | } | ||
| 630 | |||
| 631 | pub fn shr(lhs: Value, rhs: Value, ty: Type, comp: *Compilation) !Value { | ||
| 632 | var lhs_space: Value.BigIntSpace = undefined; | ||
| 633 | const lhs_bigint = lhs.toBigInt(&lhs_space, comp); | ||
| 634 | const shift = rhs.toInt(usize, comp) orelse return zero; | ||
| 635 | |||
| 636 | const result_limbs = lhs_bigint.limbs.len -| (shift / (@sizeOf(std.math.big.Limb) * 8)); | ||
| 637 | if (result_limbs == 0) { | ||
| 638 | // The shift is enough to remove all the bits from the number, which means the | ||
| 639 | // result is 0 or -1 depending on the sign. | ||
| 640 | if (lhs_bigint.positive) { | ||
| 641 | return zero; | ||
| 642 | } else { | ||
| 643 | return intern(comp, .{ .int = .{ .i64 = -1 } }); | ||
| 644 | } | ||
| 645 | } | ||
| 646 | |||
| 647 | const bits: usize = @intCast(ty.bitSizeof(comp).?); | ||
| 648 | const limbs = try comp.gpa.alloc( | ||
| 649 | std.math.big.Limb, | ||
| 650 | std.math.big.int.calcTwosCompLimbCount(bits), | ||
| 651 | ); | ||
| 652 | defer comp.gpa.free(limbs); | ||
| 653 | var result_bigint = std.math.big.int.Mutable{ .limbs = limbs, .positive = undefined, .len = undefined }; | ||
| 654 | |||
| 655 | result_bigint.shiftRight(lhs_bigint, shift); | ||
| 656 | return intern(comp, .{ .int = .{ .big_int = result_bigint.toConst() } }); | ||
| 657 | } | ||
| 658 | |||
| 659 | pub fn compare(lhs: Value, op: std.math.CompareOperator, rhs: Value, comp: *const Compilation) bool { | ||
| 660 | if (op == .eq) { | ||
| 661 | return lhs.opt_ref == rhs.opt_ref; | ||
| 662 | } else if (lhs.opt_ref == rhs.opt_ref) { | ||
| 663 | return std.math.Order.eq.compare(op); | ||
| 664 | } | ||
| 665 | |||
| 666 | const lhs_key = comp.interner.get(lhs.ref()); | ||
| 667 | const rhs_key = comp.interner.get(rhs.ref()); | ||
| 668 | if (lhs_key == .float or rhs_key == .float) { | ||
| 669 | const lhs_f128 = lhs.toFloat(f128, comp); | ||
| 670 | const rhs_f128 = rhs.toFloat(f128, comp); | ||
| 671 | return std.math.compare(lhs_f128, op, rhs_f128); | ||
| 672 | } | ||
| 673 | |||
| 674 | var lhs_bigint_space: BigIntSpace = undefined; | ||
| 675 | var rhs_bigint_space: BigIntSpace = undefined; | ||
| 676 | const lhs_bigint = lhs.toBigInt(&lhs_bigint_space, comp); | ||
| 677 | const rhs_bigint = rhs.toBigInt(&rhs_bigint_space, comp); | ||
| 678 | return lhs_bigint.order(rhs_bigint).compare(op); | ||
| 679 | } | ||
| 680 | |||
| 681 | pub fn print(v: Value, ty: Type, comp: *const Compilation, w: anytype) @TypeOf(w).Error!void { | ||
| 682 | if (ty.is(.bool)) { | ||
| 683 | return w.writeAll(if (v.isZero(comp)) "false" else "true"); | ||
| 684 | } | ||
| 685 | const key = comp.interner.get(v.ref()); | ||
| 686 | switch (key) { | ||
| 687 | .null => return w.writeAll("nullptr_t"), | ||
| 688 | .int => |repr| switch (repr) { | ||
| 689 | inline else => |x| return w.print("{d}", .{x}), | ||
| 690 | }, | ||
| 691 | .float => |repr| switch (repr) { | ||
| 692 | .f16 => |x| return w.print("{d}", .{@round(@as(f64, @floatCast(x)) * 1000) / 1000}), | ||
| 693 | .f32 => |x| return w.print("{d}", .{@round(@as(f64, @floatCast(x)) * 1000000) / 1000000}), | ||
| 694 | inline else => |x| return w.print("{d}", .{@as(f64, @floatCast(x))}), | ||
| 695 | }, | ||
| 696 | .bytes => |b| return printString(b, ty, comp, w), | ||
| 697 | else => unreachable, // not a value | ||
| 698 | } | ||
| 699 | } | ||
| 700 | |||
| 701 | pub fn printString(bytes: []const u8, ty: Type, comp: *const Compilation, w: anytype) @TypeOf(w).Error!void { | ||
| 702 | const size: Compilation.CharUnitSize = @enumFromInt(ty.elemType().sizeof(comp).?); | ||
| 703 | const without_null = bytes[0 .. bytes.len - @intFromEnum(size)]; | ||
| 704 | switch (size) { | ||
| 705 | inline .@"1", .@"2" => |sz| { | ||
| 706 | const data_slice: []const sz.Type() = @alignCast(std.mem.bytesAsSlice(sz.Type(), without_null)); | ||
| 707 | const formatter = if (sz == .@"1") std.zig.fmtEscapes(data_slice) else std.unicode.fmtUtf16le(data_slice); | ||
| 708 | try w.print("\"{}\"", .{formatter}); | ||
| 709 | }, | ||
| 710 | .@"4" => { | ||
| 711 | try w.writeByte('"'); | ||
| 712 | const data_slice = std.mem.bytesAsSlice(u32, without_null); | ||
| 713 | var buf: [4]u8 = undefined; | ||
| 714 | for (data_slice) |item| { | ||
| 715 | if (item <= std.math.maxInt(u21) and std.unicode.utf8ValidCodepoint(@intCast(item))) { | ||
| 716 | const codepoint: u21 = @intCast(item); | ||
| 717 | const written = std.unicode.utf8Encode(codepoint, &buf) catch unreachable; | ||
| 718 | try w.print("{s}", .{buf[0..written]}); | ||
| 719 | } else { | ||
| 720 | try w.print("\\x{x}", .{item}); | ||
| 721 | } | ||
| 722 | } | ||
| 723 | try w.writeByte('"'); | ||
| 724 | }, | ||
| 725 | } | ||
| 726 | } | ||
deps/aro/aro/char_info.zig created+1111| ... | @@ -0,0 +1,1111 @@ | ||
| 1 | //! This module provides functions for classifying characters according to | ||
| 2 | //! various C standards. All classification routines *do not* consider | ||
| 3 | //! characters from the basic character set; it is assumed those will be | ||
| 4 | //! checked separately | ||
| 5 | //! isXidStart and isXidContinue are adapted from https://github.com/dtolnay/unicode-ident | ||
| 6 | |||
| 7 | const assert = @import("std").debug.assert; | ||
| 8 | const tables = @import("char_info/identifier_tables.zig"); | ||
| 9 | |||
| 10 | /// C11 Standard Annex D | ||
| 11 | pub fn isC11IdChar(codepoint: u21) bool { | ||
| 12 | assert(codepoint > 0x7F); | ||
| 13 | return switch (codepoint) { | ||
| 14 | // 1 | ||
| 15 | 0x00A8, | ||
| 16 | 0x00AA, | ||
| 17 | 0x00AD, | ||
| 18 | 0x00AF, | ||
| 19 | 0x00B2...0x00B5, | ||
| 20 | 0x00B7...0x00BA, | ||
| 21 | 0x00BC...0x00BE, | ||
| 22 | 0x00C0...0x00D6, | ||
| 23 | 0x00D8...0x00F6, | ||
| 24 | 0x00F8...0x00FF, | ||
| 25 | |||
| 26 | // 2 | ||
| 27 | 0x0100...0x167F, | ||
| 28 | 0x1681...0x180D, | ||
| 29 | 0x180F...0x1FFF, | ||
| 30 | |||
| 31 | // 3 | ||
| 32 | 0x200B...0x200D, | ||
| 33 | 0x202A...0x202E, | ||
| 34 | 0x203F...0x2040, | ||
| 35 | 0x2054, | ||
| 36 | 0x2060...0x206F, | ||
| 37 | |||
| 38 | // 4 | ||
| 39 | 0x2070...0x218F, | ||
| 40 | 0x2460...0x24FF, | ||
| 41 | 0x2776...0x2793, | ||
| 42 | 0x2C00...0x2DFF, | ||
| 43 | 0x2E80...0x2FFF, | ||
| 44 | |||
| 45 | // 5 | ||
| 46 | 0x3004...0x3007, | ||
| 47 | 0x3021...0x302F, | ||
| 48 | 0x3031...0x303F, | ||
| 49 | |||
| 50 | // 6 | ||
| 51 | 0x3040...0xD7FF, | ||
| 52 | |||
| 53 | // 7 | ||
| 54 | 0xF900...0xFD3D, | ||
| 55 | 0xFD40...0xFDCF, | ||
| 56 | 0xFDF0...0xFE44, | ||
| 57 | 0xFE47...0xFFFD, | ||
| 58 | |||
| 59 | // 8 | ||
| 60 | 0x10000...0x1FFFD, | ||
| 61 | 0x20000...0x2FFFD, | ||
| 62 | 0x30000...0x3FFFD, | ||
| 63 | 0x40000...0x4FFFD, | ||
| 64 | 0x50000...0x5FFFD, | ||
| 65 | 0x60000...0x6FFFD, | ||
| 66 | 0x70000...0x7FFFD, | ||
| 67 | 0x80000...0x8FFFD, | ||
| 68 | 0x90000...0x9FFFD, | ||
| 69 | 0xA0000...0xAFFFD, | ||
| 70 | 0xB0000...0xBFFFD, | ||
| 71 | 0xC0000...0xCFFFD, | ||
| 72 | 0xD0000...0xDFFFD, | ||
| 73 | 0xE0000...0xEFFFD, | ||
| 74 | => true, | ||
| 75 | else => false, | ||
| 76 | }; | ||
| 77 | } | ||
| 78 | |||
| 79 | /// C99 Standard Annex D | ||
| 80 | pub fn isC99IdChar(codepoint: u21) bool { | ||
| 81 | assert(codepoint > 0x7F); | ||
| 82 | return switch (codepoint) { | ||
| 83 | // Latin | ||
| 84 | 0x00AA, | ||
| 85 | 0x00BA, | ||
| 86 | 0x00C0...0x00D6, | ||
| 87 | 0x00D8...0x00F6, | ||
| 88 | 0x00F8...0x01F5, | ||
| 89 | 0x01FA...0x0217, | ||
| 90 | 0x0250...0x02A8, | ||
| 91 | 0x1E00...0x1E9B, | ||
| 92 | 0x1EA0...0x1EF9, | ||
| 93 | 0x207F, | ||
| 94 | |||
| 95 | // Greek | ||
| 96 | 0x0386, | ||
| 97 | 0x0388...0x038A, | ||
| 98 | 0x038C, | ||
| 99 | 0x038E...0x03A1, | ||
| 100 | 0x03A3...0x03CE, | ||
| 101 | 0x03D0...0x03D6, | ||
| 102 | 0x03DA, | ||
| 103 | 0x03DC, | ||
| 104 | 0x03DE, | ||
| 105 | 0x03E0, | ||
| 106 | 0x03E2...0x03F3, | ||
| 107 | 0x1F00...0x1F15, | ||
| 108 | 0x1F18...0x1F1D, | ||
| 109 | 0x1F20...0x1F45, | ||
| 110 | 0x1F48...0x1F4D, | ||
| 111 | 0x1F50...0x1F57, | ||
| 112 | 0x1F59, | ||
| 113 | 0x1F5B, | ||
| 114 | 0x1F5D, | ||
| 115 | 0x1F5F...0x1F7D, | ||
| 116 | 0x1F80...0x1FB4, | ||
| 117 | 0x1FB6...0x1FBC, | ||
| 118 | 0x1FC2...0x1FC4, | ||
| 119 | 0x1FC6...0x1FCC, | ||
| 120 | 0x1FD0...0x1FD3, | ||
| 121 | 0x1FD6...0x1FDB, | ||
| 122 | 0x1FE0...0x1FEC, | ||
| 123 | 0x1FF2...0x1FF4, | ||
| 124 | 0x1FF6...0x1FFC, | ||
| 125 | |||
| 126 | // Cyrillic | ||
| 127 | 0x0401...0x040C, | ||
| 128 | 0x040E...0x044F, | ||
| 129 | 0x0451...0x045C, | ||
| 130 | 0x045E...0x0481, | ||
| 131 | 0x0490...0x04C4, | ||
| 132 | 0x04C7...0x04C8, | ||
| 133 | 0x04CB...0x04CC, | ||
| 134 | 0x04D0...0x04EB, | ||
| 135 | 0x04EE...0x04F5, | ||
| 136 | 0x04F8...0x04F9, | ||
| 137 | |||
| 138 | // Armenian | ||
| 139 | 0x0531...0x0556, | ||
| 140 | 0x0561...0x0587, | ||
| 141 | |||
| 142 | // Hebrew | ||
| 143 | 0x05B0...0x05B9, | ||
| 144 | 0x05BB...0x05BD, | ||
| 145 | 0x05BF, | ||
| 146 | 0x05C1...0x05C2, | ||
| 147 | 0x05D0...0x05EA, | ||
| 148 | 0x05F0...0x05F2, | ||
| 149 | |||
| 150 | // Arabic | ||
| 151 | 0x0621...0x063A, | ||
| 152 | 0x0640...0x0652, | ||
| 153 | 0x0670...0x06B7, | ||
| 154 | 0x06BA...0x06BE, | ||
| 155 | 0x06C0...0x06CE, | ||
| 156 | 0x06D0...0x06DC, | ||
| 157 | 0x06E5...0x06E8, | ||
| 158 | 0x06EA...0x06ED, | ||
| 159 | |||
| 160 | // Devanagari | ||
| 161 | 0x0901...0x0903, | ||
| 162 | 0x0905...0x0939, | ||
| 163 | 0x093E...0x094D, | ||
| 164 | 0x0950...0x0952, | ||
| 165 | 0x0958...0x0963, | ||
| 166 | |||
| 167 | // Bengali | ||
| 168 | 0x0981...0x0983, | ||
| 169 | 0x0985...0x098C, | ||
| 170 | 0x098F...0x0990, | ||
| 171 | 0x0993...0x09A8, | ||
| 172 | 0x09AA...0x09B0, | ||
| 173 | 0x09B2, | ||
| 174 | 0x09B6...0x09B9, | ||
| 175 | 0x09BE...0x09C4, | ||
| 176 | 0x09C7...0x09C8, | ||
| 177 | 0x09CB...0x09CD, | ||
| 178 | 0x09DC...0x09DD, | ||
| 179 | 0x09DF...0x09E3, | ||
| 180 | 0x09F0...0x09F1, | ||
| 181 | |||
| 182 | // Gurmukhi | ||
| 183 | 0x0A02, | ||
| 184 | 0x0A05...0x0A0A, | ||
| 185 | 0x0A0F...0x0A10, | ||
| 186 | 0x0A13...0x0A28, | ||
| 187 | 0x0A2A...0x0A30, | ||
| 188 | 0x0A32...0x0A33, | ||
| 189 | 0x0A35...0x0A36, | ||
| 190 | 0x0A38...0x0A39, | ||
| 191 | 0x0A3E...0x0A42, | ||
| 192 | 0x0A47...0x0A48, | ||
| 193 | 0x0A4B...0x0A4D, | ||
| 194 | 0x0A59...0x0A5C, | ||
| 195 | 0x0A5E, | ||
| 196 | 0x0A74, | ||
| 197 | |||
| 198 | // Gujarati | ||
| 199 | 0x0A81...0x0A83, | ||
| 200 | 0x0A85...0x0A8B, | ||
| 201 | 0x0A8D, | ||
| 202 | 0x0A8F...0x0A91, | ||
| 203 | 0x0A93...0x0AA8, | ||
| 204 | 0x0AAA...0x0AB0, | ||
| 205 | 0x0AB2...0x0AB3, | ||
| 206 | 0x0AB5...0x0AB9, | ||
| 207 | 0x0ABD...0x0AC5, | ||
| 208 | 0x0AC7...0x0AC9, | ||
| 209 | 0x0ACB...0x0ACD, | ||
| 210 | 0x0AD0, | ||
| 211 | 0x0AE0, | ||
| 212 | |||
| 213 | // Oriya | ||
| 214 | 0x0B01...0x0B03, | ||
| 215 | 0x0B05...0x0B0C, | ||
| 216 | 0x0B0F...0x0B10, | ||
| 217 | 0x0B13...0x0B28, | ||
| 218 | 0x0B2A...0x0B30, | ||
| 219 | 0x0B32...0x0B33, | ||
| 220 | 0x0B36...0x0B39, | ||
| 221 | 0x0B3E...0x0B43, | ||
| 222 | 0x0B47...0x0B48, | ||
| 223 | 0x0B4B...0x0B4D, | ||
| 224 | 0x0B5C...0x0B5D, | ||
| 225 | 0x0B5F...0x0B61, | ||
| 226 | |||
| 227 | // Tamil | ||
| 228 | 0x0B82...0x0B83, | ||
| 229 | 0x0B85...0x0B8A, | ||
| 230 | 0x0B8E...0x0B90, | ||
| 231 | 0x0B92...0x0B95, | ||
| 232 | 0x0B99...0x0B9A, | ||
| 233 | 0x0B9C, | ||
| 234 | 0x0B9E...0x0B9F, | ||
| 235 | 0x0BA3...0x0BA4, | ||
| 236 | 0x0BA8...0x0BAA, | ||
| 237 | 0x0BAE...0x0BB5, | ||
| 238 | 0x0BB7...0x0BB9, | ||
| 239 | 0x0BBE...0x0BC2, | ||
| 240 | 0x0BC6...0x0BC8, | ||
| 241 | 0x0BCA...0x0BCD, | ||
| 242 | |||
| 243 | // Telugu | ||
| 244 | 0x0C01...0x0C03, | ||
| 245 | 0x0C05...0x0C0C, | ||
| 246 | 0x0C0E...0x0C10, | ||
| 247 | 0x0C12...0x0C28, | ||
| 248 | 0x0C2A...0x0C33, | ||
| 249 | 0x0C35...0x0C39, | ||
| 250 | 0x0C3E...0x0C44, | ||
| 251 | 0x0C46...0x0C48, | ||
| 252 | 0x0C4A...0x0C4D, | ||
| 253 | 0x0C60...0x0C61, | ||
| 254 | |||
| 255 | // Kannada | ||
| 256 | 0x0C82...0x0C83, | ||
| 257 | 0x0C85...0x0C8C, | ||
| 258 | 0x0C8E...0x0C90, | ||
| 259 | 0x0C92...0x0CA8, | ||
| 260 | 0x0CAA...0x0CB3, | ||
| 261 | 0x0CB5...0x0CB9, | ||
| 262 | 0x0CBE...0x0CC4, | ||
| 263 | 0x0CC6...0x0CC8, | ||
| 264 | 0x0CCA...0x0CCD, | ||
| 265 | 0x0CDE, | ||
| 266 | 0x0CE0...0x0CE1, | ||
| 267 | |||
| 268 | // Malayalam | ||
| 269 | 0x0D02...0x0D03, | ||
| 270 | 0x0D05...0x0D0C, | ||
| 271 | 0x0D0E...0x0D10, | ||
| 272 | 0x0D12...0x0D28, | ||
| 273 | 0x0D2A...0x0D39, | ||
| 274 | 0x0D3E...0x0D43, | ||
| 275 | 0x0D46...0x0D48, | ||
| 276 | 0x0D4A...0x0D4D, | ||
| 277 | 0x0D60...0x0D61, | ||
| 278 | |||
| 279 | // Thai (excluding digits 0x0E50...0x0E59; originally 0x0E01...0x0E3A and 0x0E40...0x0E5B | ||
| 280 | 0x0E01...0x0E3A, | ||
| 281 | 0x0E40...0x0E4F, | ||
| 282 | 0x0E5A...0x0E5B, | ||
| 283 | |||
| 284 | // Lao | ||
| 285 | 0x0E81...0x0E82, | ||
| 286 | 0x0E84, | ||
| 287 | 0x0E87...0x0E88, | ||
| 288 | 0x0E8A, | ||
| 289 | 0x0E8D, | ||
| 290 | 0x0E94...0x0E97, | ||
| 291 | 0x0E99...0x0E9F, | ||
| 292 | 0x0EA1...0x0EA3, | ||
| 293 | 0x0EA5, | ||
| 294 | 0x0EA7, | ||
| 295 | 0x0EAA...0x0EAB, | ||
| 296 | 0x0EAD...0x0EAE, | ||
| 297 | 0x0EB0...0x0EB9, | ||
| 298 | 0x0EBB...0x0EBD, | ||
| 299 | 0x0EC0...0x0EC4, | ||
| 300 | 0x0EC6, | ||
| 301 | 0x0EC8...0x0ECD, | ||
| 302 | 0x0EDC...0x0EDD, | ||
| 303 | |||
| 304 | // Tibetan | ||
| 305 | 0x0F00, | ||
| 306 | 0x0F18...0x0F19, | ||
| 307 | 0x0F35, | ||
| 308 | 0x0F37, | ||
| 309 | 0x0F39, | ||
| 310 | 0x0F3E...0x0F47, | ||
| 311 | 0x0F49...0x0F69, | ||
| 312 | 0x0F71...0x0F84, | ||
| 313 | 0x0F86...0x0F8B, | ||
| 314 | 0x0F90...0x0F95, | ||
| 315 | 0x0F97, | ||
| 316 | 0x0F99...0x0FAD, | ||
| 317 | 0x0FB1...0x0FB7, | ||
| 318 | 0x0FB9, | ||
| 319 | |||
| 320 | // Georgian | ||
| 321 | 0x10A0...0x10C5, | ||
| 322 | 0x10D0...0x10F6, | ||
| 323 | |||
| 324 | // Hiragana | ||
| 325 | 0x3041...0x3093, | ||
| 326 | 0x309B...0x309C, | ||
| 327 | |||
| 328 | // Katakana | ||
| 329 | 0x30A1...0x30F6, | ||
| 330 | 0x30FB...0x30FC, | ||
| 331 | |||
| 332 | // Bopomofo | ||
| 333 | 0x3105...0x312C, | ||
| 334 | |||
| 335 | // CJK Unified Ideographs | ||
| 336 | 0x4E00...0x9FA5, | ||
| 337 | |||
| 338 | // Hangul | ||
| 339 | 0xAC00...0xD7A3, | ||
| 340 | |||
| 341 | // Digits | ||
| 342 | 0x0660...0x0669, | ||
| 343 | 0x06F0...0x06F9, | ||
| 344 | 0x0966...0x096F, | ||
| 345 | 0x09E6...0x09EF, | ||
| 346 | 0x0A66...0x0A6F, | ||
| 347 | 0x0AE6...0x0AEF, | ||
| 348 | 0x0B66...0x0B6F, | ||
| 349 | 0x0BE7...0x0BEF, | ||
| 350 | 0x0C66...0x0C6F, | ||
| 351 | 0x0CE6...0x0CEF, | ||
| 352 | 0x0D66...0x0D6F, | ||
| 353 | 0x0E50...0x0E59, | ||
| 354 | 0x0ED0...0x0ED9, | ||
| 355 | 0x0F20...0x0F33, | ||
| 356 | |||
| 357 | // Special characters | ||
| 358 | 0x00B5, | ||
| 359 | 0x00B7, | ||
| 360 | 0x02B0...0x02B8, | ||
| 361 | 0x02BB, | ||
| 362 | 0x02BD...0x02C1, | ||
| 363 | 0x02D0...0x02D1, | ||
| 364 | 0x02E0...0x02E4, | ||
| 365 | 0x037A, | ||
| 366 | 0x0559, | ||
| 367 | 0x093D, | ||
| 368 | 0x0B3D, | ||
| 369 | 0x1FBE, | ||
| 370 | 0x203F...0x2040, | ||
| 371 | 0x2102, | ||
| 372 | 0x2107, | ||
| 373 | 0x210A...0x2113, | ||
| 374 | 0x2115, | ||
| 375 | 0x2118...0x211D, | ||
| 376 | 0x2124, | ||
| 377 | 0x2126, | ||
| 378 | 0x2128, | ||
| 379 | 0x212A...0x2131, | ||
| 380 | 0x2133...0x2138, | ||
| 381 | 0x2160...0x2182, | ||
| 382 | 0x3005...0x3007, | ||
| 383 | 0x3021...0x3029, | ||
| 384 | => true, | ||
| 385 | else => false, | ||
| 386 | }; | ||
| 387 | } | ||
| 388 | |||
| 389 | /// C11 standard Annex D | ||
| 390 | pub fn isC11DisallowedInitialIdChar(codepoint: u21) bool { | ||
| 391 | assert(codepoint > 0x7F); | ||
| 392 | return switch (codepoint) { | ||
| 393 | 0x0300...0x036F, | ||
| 394 | 0x1DC0...0x1DFF, | ||
| 395 | 0x20D0...0x20FF, | ||
| 396 | 0xFE20...0xFE2F, | ||
| 397 | => true, | ||
| 398 | else => false, | ||
| 399 | }; | ||
| 400 | } | ||
| 401 | |||
| 402 | /// These are "digit" characters; C99 disallows them as the first | ||
| 403 | /// character of an identifier | ||
| 404 | pub fn isC99DisallowedInitialIDChar(codepoint: u21) bool { | ||
| 405 | assert(codepoint > 0x7F); | ||
| 406 | return switch (codepoint) { | ||
| 407 | 0x0660...0x0669, | ||
| 408 | 0x06F0...0x06F9, | ||
| 409 | 0x0966...0x096F, | ||
| 410 | 0x09E6...0x09EF, | ||
| 411 | 0x0A66...0x0A6F, | ||
| 412 | 0x0AE6...0x0AEF, | ||
| 413 | 0x0B66...0x0B6F, | ||
| 414 | 0x0BE7...0x0BEF, | ||
| 415 | 0x0C66...0x0C6F, | ||
| 416 | 0x0CE6...0x0CEF, | ||
| 417 | 0x0D66...0x0D6F, | ||
| 418 | 0x0E50...0x0E59, | ||
| 419 | 0x0ED0...0x0ED9, | ||
| 420 | 0x0F20...0x0F33, | ||
| 421 | => true, | ||
| 422 | else => false, | ||
| 423 | }; | ||
| 424 | } | ||
| 425 | |||
| 426 | pub fn isInvisible(codepoint: u21) bool { | ||
| 427 | assert(codepoint > 0x7F); | ||
| 428 | return switch (codepoint) { | ||
| 429 | 0x00ad, // SOFT HYPHEN | ||
| 430 | 0x200b, // ZERO WIDTH SPACE | ||
| 431 | 0x200c, // ZERO WIDTH NON-JOINER | ||
| 432 | 0x200d, // ZERO WIDTH JOINER | ||
| 433 | 0x2060, // WORD JOINER | ||
| 434 | 0x2061, // FUNCTION APPLICATION | ||
| 435 | 0x2062, // INVISIBLE TIMES | ||
| 436 | 0x2063, // INVISIBLE SEPARATOR | ||
| 437 | 0x2064, // INVISIBLE PLUS | ||
| 438 | 0xfeff, // ZERO WIDTH NO-BREAK SPACE | ||
| 439 | => true, | ||
| 440 | else => false, | ||
| 441 | }; | ||
| 442 | } | ||
| 443 | |||
| 444 | /// Checks for identifier characters which resemble non-identifier characters | ||
| 445 | pub fn homoglyph(codepoint: u21) ?u21 { | ||
| 446 | assert(codepoint > 0x7F); | ||
| 447 | return switch (codepoint) { | ||
| 448 | 0x01c3 => '!', // LATIN LETTER RETROFLEX CLICK | ||
| 449 | 0x037e => ';', // GREEK QUESTION MARK | ||
| 450 | 0x2212 => '-', // MINUS SIGN | ||
| 451 | 0x2215 => '/', // DIVISION SLASH | ||
| 452 | 0x2216 => '\\', // SET MINUS | ||
| 453 | 0x2217 => '*', // ASTERISK OPERATOR | ||
| 454 | 0x2223 => '|', // DIVIDES | ||
| 455 | 0x2227 => '^', // LOGICAL AND | ||
| 456 | 0x2236 => ':', // RATIO | ||
| 457 | 0x223c => '~', // TILDE OPERATOR | ||
| 458 | 0xa789 => ':', // MODIFIER LETTER COLON | ||
| 459 | 0xff01 => '!', // FULLWIDTH EXCLAMATION MARK | ||
| 460 | 0xff03 => '#', // FULLWIDTH NUMBER SIGN | ||
| 461 | 0xff04 => '$', // FULLWIDTH DOLLAR SIGN | ||
| 462 | 0xff05 => '%', // FULLWIDTH PERCENT SIGN | ||
| 463 | 0xff06 => '&', // FULLWIDTH AMPERSAND | ||
| 464 | 0xff08 => '(', // FULLWIDTH LEFT PARENTHESIS | ||
| 465 | 0xff09 => ')', // FULLWIDTH RIGHT PARENTHESIS | ||
| 466 | 0xff0a => '*', // FULLWIDTH ASTERISK | ||
| 467 | 0xff0b => '+', // FULLWIDTH ASTERISK | ||
| 468 | 0xff0c => ',', // FULLWIDTH COMMA | ||
| 469 | 0xff0d => '-', // FULLWIDTH HYPHEN-MINUS | ||
| 470 | 0xff0e => '.', // FULLWIDTH FULL STOP | ||
| 471 | 0xff0f => '/', // FULLWIDTH SOLIDUS | ||
| 472 | 0xff1a => ':', // FULLWIDTH COLON | ||
| 473 | 0xff1b => ';', // FULLWIDTH SEMICOLON | ||
| 474 | 0xff1c => '<', // FULLWIDTH LESS-THAN SIGN | ||
| 475 | 0xff1d => '=', // FULLWIDTH EQUALS SIGN | ||
| 476 | 0xff1e => '>', // FULLWIDTH GREATER-THAN SIGN | ||
| 477 | 0xff1f => '?', // FULLWIDTH QUESTION MARK | ||
| 478 | 0xff20 => '@', // FULLWIDTH COMMERCIAL AT | ||
| 479 | 0xff3b => '[', // FULLWIDTH LEFT SQUARE BRACKET | ||
| 480 | 0xff3c => '\\', // FULLWIDTH REVERSE SOLIDUS | ||
| 481 | 0xff3d => ']', // FULLWIDTH RIGHT SQUARE BRACKET | ||
| 482 | 0xff3e => '^', // FULLWIDTH CIRCUMFLEX ACCENT | ||
| 483 | 0xff5b => '{', // FULLWIDTH LEFT CURLY BRACKET | ||
| 484 | 0xff5c => '|', // FULLWIDTH VERTICAL LINE | ||
| 485 | 0xff5d => '}', // FULLWIDTH RIGHT CURLY BRACKET | ||
| 486 | 0xff5e => '~', // FULLWIDTH TILDE | ||
| 487 | else => null, | ||
| 488 | }; | ||
| 489 | } | ||
| 490 | |||
| 491 | pub fn isXidStart(c: u21) bool { | ||
| 492 | assert(c > 0x7F); | ||
| 493 | const idx = c / 8 / tables.chunk; | ||
| 494 | const chunk: usize = if (idx < tables.trie_start.len) tables.trie_start[idx] else 0; | ||
| 495 | const offset = chunk * tables.chunk / 2 + c / 8 % tables.chunk; | ||
| 496 | return (tables.leaf[offset] >> (@as(u3, @intCast(c % 8)))) & 1 != 0; | ||
| 497 | } | ||
| 498 | |||
| 499 | pub fn isXidContinue(c: u21) bool { | ||
| 500 | assert(c > 0x7F); | ||
| 501 | const idx = c / 8 / tables.chunk; | ||
| 502 | const chunk: usize = if (idx < tables.trie_continue.len) tables.trie_continue[idx] else 0; | ||
| 503 | const offset = chunk * tables.chunk / 2 + c / 8 % tables.chunk; | ||
| 504 | return (tables.leaf[offset] >> (@as(u3, @intCast(c % 8)))) & 1 != 0; | ||
| 505 | } | ||
| 506 | |||
| 507 | test "isXidStart / isXidContinue panic check" { | ||
| 508 | const std = @import("std"); | ||
| 509 | for (0x80..0x110000) |i| { | ||
| 510 | const c: u21 = @intCast(i); | ||
| 511 | if (std.unicode.utf8ValidCodepoint(c)) { | ||
| 512 | _ = isXidStart(c); | ||
| 513 | _ = isXidContinue(c); | ||
| 514 | } | ||
| 515 | } | ||
| 516 | } | ||
| 517 | |||
| 518 | test isXidStart { | ||
| 519 | const std = @import("std"); | ||
| 520 | try std.testing.expect(!isXidStart('᠑')); | ||
| 521 | try std.testing.expect(!isXidStart('™')); | ||
| 522 | try std.testing.expect(!isXidStart('£')); | ||
| 523 | try std.testing.expect(!isXidStart('\u{1f914}')); // 🤔 | ||
| 524 | } | ||
| 525 | |||
| 526 | test isXidContinue { | ||
| 527 | const std = @import("std"); | ||
| 528 | try std.testing.expect(isXidContinue('᠑')); | ||
| 529 | try std.testing.expect(!isXidContinue('™')); | ||
| 530 | try std.testing.expect(!isXidContinue('£')); | ||
| 531 | try std.testing.expect(!isXidContinue('\u{1f914}')); // 🤔 | ||
| 532 | } | ||
| 533 | |||
| 534 | pub const NfcQuickCheck = enum { no, maybe, yes }; | ||
| 535 | |||
| 536 | pub fn isNormalized(codepoint: u21) NfcQuickCheck { | ||
| 537 | return switch (codepoint) { | ||
| 538 | 0x0340...0x0341, | ||
| 539 | 0x0343...0x0344, | ||
| 540 | 0x0374, | ||
| 541 | 0x037E, | ||
| 542 | 0x0387, | ||
| 543 | 0x0958...0x095F, | ||
| 544 | 0x09DC...0x09DD, | ||
| 545 | 0x09DF, | ||
| 546 | 0x0A33, | ||
| 547 | 0x0A36, | ||
| 548 | 0x0A59...0x0A5B, | ||
| 549 | 0x0A5E, | ||
| 550 | 0x0B5C...0x0B5D, | ||
| 551 | 0x0F43, | ||
| 552 | 0x0F4D, | ||
| 553 | 0x0F52, | ||
| 554 | 0x0F57, | ||
| 555 | 0x0F5C, | ||
| 556 | 0x0F69, | ||
| 557 | 0x0F73, | ||
| 558 | 0x0F75...0x0F76, | ||
| 559 | 0x0F78, | ||
| 560 | 0x0F81, | ||
| 561 | 0x0F93, | ||
| 562 | 0x0F9D, | ||
| 563 | 0x0FA2, | ||
| 564 | 0x0FA7, | ||
| 565 | 0x0FAC, | ||
| 566 | 0x0FB9, | ||
| 567 | 0x1F71, | ||
| 568 | 0x1F73, | ||
| 569 | 0x1F75, | ||
| 570 | 0x1F77, | ||
| 571 | 0x1F79, | ||
| 572 | 0x1F7B, | ||
| 573 | 0x1F7D, | ||
| 574 | 0x1FBB, | ||
| 575 | 0x1FBE, | ||
| 576 | 0x1FC9, | ||
| 577 | 0x1FCB, | ||
| 578 | 0x1FD3, | ||
| 579 | 0x1FDB, | ||
| 580 | 0x1FE3, | ||
| 581 | 0x1FEB, | ||
| 582 | 0x1FEE...0x1FEF, | ||
| 583 | 0x1FF9, | ||
| 584 | 0x1FFB, | ||
| 585 | 0x1FFD, | ||
| 586 | 0x2000...0x2001, | ||
| 587 | 0x2126, | ||
| 588 | 0x212A...0x212B, | ||
| 589 | 0x2329, | ||
| 590 | 0x232A, | ||
| 591 | 0x2ADC, | ||
| 592 | 0xF900...0xFA0D, | ||
| 593 | 0xFA10, | ||
| 594 | 0xFA12, | ||
| 595 | 0xFA15...0xFA1E, | ||
| 596 | 0xFA20, | ||
| 597 | 0xFA22, | ||
| 598 | 0xFA25...0xFA26, | ||
| 599 | 0xFA2A...0xFA6D, | ||
| 600 | 0xFA70...0xFAD9, | ||
| 601 | 0xFB1D, | ||
| 602 | 0xFB1F, | ||
| 603 | 0xFB2A...0xFB36, | ||
| 604 | 0xFB38...0xFB3C, | ||
| 605 | 0xFB3E, | ||
| 606 | 0xFB40...0xFB41, | ||
| 607 | 0xFB43...0xFB44, | ||
| 608 | 0xFB46...0xFB4E, | ||
| 609 | 0x1D15E...0x1D164, | ||
| 610 | 0x1D1BB...0x1D1C0, | ||
| 611 | 0x2F800...0x2FA1D, | ||
| 612 | => .no, | ||
| 613 | 0x0300...0x0304, | ||
| 614 | 0x0306...0x030C, | ||
| 615 | 0x030F, | ||
| 616 | 0x0311, | ||
| 617 | 0x0313...0x0314, | ||
| 618 | 0x031B, | ||
| 619 | 0x0323...0x0328, | ||
| 620 | 0x032D...0x032E, | ||
| 621 | 0x0330...0x0331, | ||
| 622 | 0x0338, | ||
| 623 | 0x0342, | ||
| 624 | 0x0345, | ||
| 625 | 0x0653...0x0655, | ||
| 626 | 0x093C, | ||
| 627 | 0x09BE, | ||
| 628 | 0x09D7, | ||
| 629 | 0x0B3E, | ||
| 630 | 0x0B56, | ||
| 631 | 0x0B57, | ||
| 632 | 0x0BBE, | ||
| 633 | 0x0BD7, | ||
| 634 | 0x0C56, | ||
| 635 | 0x0CC2, | ||
| 636 | 0x0CD5...0x0CD6, | ||
| 637 | 0x0D3E, | ||
| 638 | 0x0D57, | ||
| 639 | 0x0DCA, | ||
| 640 | 0x0DCF, | ||
| 641 | 0x0DDF, | ||
| 642 | 0x102E, | ||
| 643 | 0x1161...0x1175, | ||
| 644 | 0x11A8...0x11C2, | ||
| 645 | 0x1B35, | ||
| 646 | 0x3099...0x309A, | ||
| 647 | 0x110BA, | ||
| 648 | 0x11127, | ||
| 649 | 0x1133E, | ||
| 650 | 0x11357, | ||
| 651 | 0x114B0, | ||
| 652 | 0x114BA, | ||
| 653 | 0x114BD, | ||
| 654 | 0x115AF, | ||
| 655 | => .maybe, | ||
| 656 | else => .yes, | ||
| 657 | }; | ||
| 658 | } | ||
| 659 | |||
| 660 | pub const CanonicalCombiningClass = enum(u8) { | ||
| 661 | not_reordered = 0, | ||
| 662 | overlay = 1, | ||
| 663 | han_reading = 6, | ||
| 664 | nukta = 7, | ||
| 665 | kana_voicing = 8, | ||
| 666 | virama = 9, | ||
| 667 | ccc10 = 10, | ||
| 668 | ccc11 = 11, | ||
| 669 | ccc12 = 12, | ||
| 670 | ccc13 = 13, | ||
| 671 | ccc14 = 14, | ||
| 672 | ccc15 = 15, | ||
| 673 | ccc16 = 16, | ||
| 674 | ccc17 = 17, | ||
| 675 | ccc18 = 18, | ||
| 676 | ccc19 = 19, | ||
| 677 | ccc20 = 20, | ||
| 678 | ccc21 = 21, | ||
| 679 | ccc22 = 22, | ||
| 680 | ccc23 = 23, | ||
| 681 | ccc24 = 24, | ||
| 682 | ccc25 = 25, | ||
| 683 | ccc26 = 26, | ||
| 684 | ccc27 = 27, | ||
| 685 | ccc28 = 28, | ||
| 686 | ccc29 = 29, | ||
| 687 | ccc30 = 30, | ||
| 688 | ccc31 = 31, | ||
| 689 | ccc32 = 32, | ||
| 690 | ccc33 = 33, | ||
| 691 | ccc34 = 34, | ||
| 692 | ccc35 = 35, | ||
| 693 | ccc36 = 36, | ||
| 694 | ccc84 = 84, | ||
| 695 | ccc91 = 91, | ||
| 696 | ccc103 = 103, | ||
| 697 | ccc107 = 107, | ||
| 698 | ccc118 = 118, | ||
| 699 | ccc122 = 122, | ||
| 700 | ccc129 = 129, | ||
| 701 | ccc130 = 130, | ||
| 702 | ccc132 = 132, | ||
| 703 | attached_below = 202, | ||
| 704 | attached_above = 214, | ||
| 705 | attached_above_right = 216, | ||
| 706 | below_left = 218, | ||
| 707 | below = 220, | ||
| 708 | below_right = 222, | ||
| 709 | left = 224, | ||
| 710 | right = 226, | ||
| 711 | above_left = 228, | ||
| 712 | above = 230, | ||
| 713 | above_right = 232, | ||
| 714 | double_below = 233, | ||
| 715 | double_above = 234, | ||
| 716 | iota_subscript = 240, | ||
| 717 | }; | ||
| 718 | |||
| 719 | pub fn getCanonicalClass(codepoint: u21) CanonicalCombiningClass { | ||
| 720 | return switch (codepoint) { | ||
| 721 | 0x300...0x314 => .above, | ||
| 722 | 0x315...0x315 => .above_right, | ||
| 723 | 0x316...0x319 => .below, | ||
| 724 | 0x31A...0x31A => .above_right, | ||
| 725 | 0x31B...0x31B => .attached_above_right, | ||
| 726 | 0x31C...0x320 => .below, | ||
| 727 | 0x321...0x322 => .attached_below, | ||
| 728 | 0x323...0x326 => .below, | ||
| 729 | 0x327...0x328 => .attached_below, | ||
| 730 | 0x329...0x333 => .below, | ||
| 731 | 0x334...0x338 => .overlay, | ||
| 732 | 0x339...0x33C => .below, | ||
| 733 | 0x33D...0x344 => .above, | ||
| 734 | 0x345...0x345 => .iota_subscript, | ||
| 735 | 0x346...0x346 => .above, | ||
| 736 | 0x347...0x349 => .below, | ||
| 737 | 0x34A...0x34C => .above, | ||
| 738 | 0x34D...0x34E => .below, | ||
| 739 | 0x350...0x352 => .above, | ||
| 740 | 0x353...0x356 => .below, | ||
| 741 | 0x357...0x357 => .above, | ||
| 742 | 0x358...0x358 => .above_right, | ||
| 743 | 0x359...0x35A => .below, | ||
| 744 | 0x35B...0x35B => .above, | ||
| 745 | 0x35C...0x35C => .double_below, | ||
| 746 | 0x35D...0x35E => .double_above, | ||
| 747 | 0x35F...0x35F => .double_below, | ||
| 748 | 0x360...0x361 => .double_above, | ||
| 749 | 0x362...0x362 => .double_below, | ||
| 750 | 0x363...0x36F => .above, | ||
| 751 | 0x483...0x487 => .above, | ||
| 752 | 0x591...0x591 => .below, | ||
| 753 | 0x592...0x595 => .above, | ||
| 754 | 0x596...0x596 => .below, | ||
| 755 | 0x597...0x599 => .above, | ||
| 756 | 0x59A...0x59A => .below_right, | ||
| 757 | 0x59B...0x59B => .below, | ||
| 758 | 0x59C...0x5A1 => .above, | ||
| 759 | 0x5A2...0x5A7 => .below, | ||
| 760 | 0x5A8...0x5A9 => .above, | ||
| 761 | 0x5AA...0x5AA => .below, | ||
| 762 | 0x5AB...0x5AC => .above, | ||
| 763 | 0x5AD...0x5AD => .below_right, | ||
| 764 | 0x5AE...0x5AE => .above_left, | ||
| 765 | 0x5AF...0x5AF => .above, | ||
| 766 | 0x5B0...0x5B0 => .ccc10, | ||
| 767 | 0x5B1...0x5B1 => .ccc11, | ||
| 768 | 0x5B2...0x5B2 => .ccc12, | ||
| 769 | 0x5B3...0x5B3 => .ccc13, | ||
| 770 | 0x5B4...0x5B4 => .ccc14, | ||
| 771 | 0x5B5...0x5B5 => .ccc15, | ||
| 772 | 0x5B6...0x5B6 => .ccc16, | ||
| 773 | 0x5B7...0x5B7 => .ccc17, | ||
| 774 | 0x5B8...0x5B8 => .ccc18, | ||
| 775 | 0x5B9...0x5BA => .ccc19, | ||
| 776 | 0x5BB...0x5BB => .ccc20, | ||
| 777 | 0x5BC...0x5BC => .ccc21, | ||
| 778 | 0x5BD...0x5BD => .ccc22, | ||
| 779 | 0x5BF...0x5BF => .ccc23, | ||
| 780 | 0x5C1...0x5C1 => .ccc24, | ||
| 781 | 0x5C2...0x5C2 => .ccc25, | ||
| 782 | 0x5C4...0x5C4 => .above, | ||
| 783 | 0x5C5...0x5C5 => .below, | ||
| 784 | 0x5C7...0x5C7 => .ccc18, | ||
| 785 | 0x610...0x617 => .above, | ||
| 786 | 0x618...0x618 => .ccc30, | ||
| 787 | 0x619...0x619 => .ccc31, | ||
| 788 | 0x61A...0x61A => .ccc32, | ||
| 789 | 0x64B...0x64B => .ccc27, | ||
| 790 | 0x64C...0x64C => .ccc28, | ||
| 791 | 0x64D...0x64D => .ccc29, | ||
| 792 | 0x64E...0x64E => .ccc30, | ||
| 793 | 0x64F...0x64F => .ccc31, | ||
| 794 | 0x650...0x650 => .ccc32, | ||
| 795 | 0x651...0x651 => .ccc33, | ||
| 796 | 0x652...0x652 => .ccc34, | ||
| 797 | 0x653...0x654 => .above, | ||
| 798 | 0x655...0x656 => .below, | ||
| 799 | 0x657...0x65B => .above, | ||
| 800 | 0x65C...0x65C => .below, | ||
| 801 | 0x65D...0x65E => .above, | ||
| 802 | 0x65F...0x65F => .below, | ||
| 803 | 0x670...0x670 => .ccc35, | ||
| 804 | 0x6D6...0x6DC => .above, | ||
| 805 | 0x6DF...0x6E2 => .above, | ||
| 806 | 0x6E3...0x6E3 => .below, | ||
| 807 | 0x6E4...0x6E4 => .above, | ||
| 808 | 0x6E7...0x6E8 => .above, | ||
| 809 | 0x6EA...0x6EA => .below, | ||
| 810 | 0x6EB...0x6EC => .above, | ||
| 811 | 0x6ED...0x6ED => .below, | ||
| 812 | 0x711...0x711 => .ccc36, | ||
| 813 | 0x730...0x730 => .above, | ||
| 814 | 0x731...0x731 => .below, | ||
| 815 | 0x732...0x733 => .above, | ||
| 816 | 0x734...0x734 => .below, | ||
| 817 | 0x735...0x736 => .above, | ||
| 818 | 0x737...0x739 => .below, | ||
| 819 | 0x73A...0x73A => .above, | ||
| 820 | 0x73B...0x73C => .below, | ||
| 821 | 0x73D...0x73D => .above, | ||
| 822 | 0x73E...0x73E => .below, | ||
| 823 | 0x73F...0x741 => .above, | ||
| 824 | 0x742...0x742 => .below, | ||
| 825 | 0x743...0x743 => .above, | ||
| 826 | 0x744...0x744 => .below, | ||
| 827 | 0x745...0x745 => .above, | ||
| 828 | 0x746...0x746 => .below, | ||
| 829 | 0x747...0x747 => .above, | ||
| 830 | 0x748...0x748 => .below, | ||
| 831 | 0x749...0x74A => .above, | ||
| 832 | 0x7EB...0x7F1 => .above, | ||
| 833 | 0x7F2...0x7F2 => .below, | ||
| 834 | 0x7F3...0x7F3 => .above, | ||
| 835 | 0x7FD...0x7FD => .below, | ||
| 836 | 0x816...0x819 => .above, | ||
| 837 | 0x81B...0x823 => .above, | ||
| 838 | 0x825...0x827 => .above, | ||
| 839 | 0x829...0x82D => .above, | ||
| 840 | 0x859...0x85B => .below, | ||
| 841 | 0x898...0x898 => .above, | ||
| 842 | 0x899...0x89B => .below, | ||
| 843 | 0x89C...0x89F => .above, | ||
| 844 | 0x8CA...0x8CE => .above, | ||
| 845 | 0x8CF...0x8D3 => .below, | ||
| 846 | 0x8D4...0x8E1 => .above, | ||
| 847 | 0x8E3...0x8E3 => .below, | ||
| 848 | 0x8E4...0x8E5 => .above, | ||
| 849 | 0x8E6...0x8E6 => .below, | ||
| 850 | 0x8E7...0x8E8 => .above, | ||
| 851 | 0x8E9...0x8E9 => .below, | ||
| 852 | 0x8EA...0x8EC => .above, | ||
| 853 | 0x8ED...0x8EF => .below, | ||
| 854 | 0x8F0...0x8F0 => .ccc27, | ||
| 855 | 0x8F1...0x8F1 => .ccc28, | ||
| 856 | 0x8F2...0x8F2 => .ccc29, | ||
| 857 | 0x8F3...0x8F5 => .above, | ||
| 858 | 0x8F6...0x8F6 => .below, | ||
| 859 | 0x8F7...0x8F8 => .above, | ||
| 860 | 0x8F9...0x8FA => .below, | ||
| 861 | 0x8FB...0x8FF => .above, | ||
| 862 | 0x93C...0x93C => .nukta, | ||
| 863 | 0x94D...0x94D => .virama, | ||
| 864 | 0x951...0x951 => .above, | ||
| 865 | 0x952...0x952 => .below, | ||
| 866 | 0x953...0x954 => .above, | ||
| 867 | 0x9BC...0x9BC => .nukta, | ||
| 868 | 0x9CD...0x9CD => .virama, | ||
| 869 | 0x9FE...0x9FE => .above, | ||
| 870 | 0xA3C...0xA3C => .nukta, | ||
| 871 | 0xA4D...0xA4D => .virama, | ||
| 872 | 0xABC...0xABC => .nukta, | ||
| 873 | 0xACD...0xACD => .virama, | ||
| 874 | 0xB3C...0xB3C => .nukta, | ||
| 875 | 0xB4D...0xB4D => .virama, | ||
| 876 | 0xBCD...0xBCD => .virama, | ||
| 877 | 0xC3C...0xC3C => .nukta, | ||
| 878 | 0xC4D...0xC4D => .virama, | ||
| 879 | 0xC55...0xC55 => .ccc84, | ||
| 880 | 0xC56...0xC56 => .ccc91, | ||
| 881 | 0xCBC...0xCBC => .nukta, | ||
| 882 | 0xCCD...0xCCD => .virama, | ||
| 883 | 0xD3B...0xD3C => .virama, | ||
| 884 | 0xD4D...0xD4D => .virama, | ||
| 885 | 0xDCA...0xDCA => .virama, | ||
| 886 | 0xE38...0xE39 => .ccc103, | ||
| 887 | 0xE3A...0xE3A => .virama, | ||
| 888 | 0xE48...0xE4B => .ccc107, | ||
| 889 | 0xEB8...0xEB9 => .ccc118, | ||
| 890 | 0xEBA...0xEBA => .virama, | ||
| 891 | 0xEC8...0xECB => .ccc122, | ||
| 892 | 0xF18...0xF19 => .below, | ||
| 893 | 0xF35...0xF35 => .below, | ||
| 894 | 0xF37...0xF37 => .below, | ||
| 895 | 0xF39...0xF39 => .attached_above_right, | ||
| 896 | 0xF71...0xF71 => .ccc129, | ||
| 897 | 0xF72...0xF72 => .ccc130, | ||
| 898 | 0xF74...0xF74 => .ccc132, | ||
| 899 | 0xF7A...0xF7D => .ccc130, | ||
| 900 | 0xF80...0xF80 => .ccc130, | ||
| 901 | 0xF82...0xF83 => .above, | ||
| 902 | 0xF84...0xF84 => .virama, | ||
| 903 | 0xF86...0xF87 => .above, | ||
| 904 | 0xFC6...0xFC6 => .below, | ||
| 905 | 0x1037...0x1037 => .nukta, | ||
| 906 | 0x1039...0x103A => .virama, | ||
| 907 | 0x108D...0x108D => .below, | ||
| 908 | 0x135D...0x135F => .above, | ||
| 909 | 0x1714...0x1715 => .virama, | ||
| 910 | 0x1734...0x1734 => .virama, | ||
| 911 | 0x17D2...0x17D2 => .virama, | ||
| 912 | 0x17DD...0x17DD => .above, | ||
| 913 | 0x18A9...0x18A9 => .above_left, | ||
| 914 | 0x1939...0x1939 => .below_right, | ||
| 915 | 0x193A...0x193A => .above, | ||
| 916 | 0x193B...0x193B => .below, | ||
| 917 | 0x1A17...0x1A17 => .above, | ||
| 918 | 0x1A18...0x1A18 => .below, | ||
| 919 | 0x1A60...0x1A60 => .virama, | ||
| 920 | 0x1A75...0x1A7C => .above, | ||
| 921 | 0x1A7F...0x1A7F => .below, | ||
| 922 | 0x1AB0...0x1AB4 => .above, | ||
| 923 | 0x1AB5...0x1ABA => .below, | ||
| 924 | 0x1ABB...0x1ABC => .above, | ||
| 925 | 0x1ABD...0x1ABD => .below, | ||
| 926 | 0x1ABF...0x1AC0 => .below, | ||
| 927 | 0x1AC1...0x1AC2 => .above, | ||
| 928 | 0x1AC3...0x1AC4 => .below, | ||
| 929 | 0x1AC5...0x1AC9 => .above, | ||
| 930 | 0x1ACA...0x1ACA => .below, | ||
| 931 | 0x1ACB...0x1ACE => .above, | ||
| 932 | 0x1B34...0x1B34 => .nukta, | ||
| 933 | 0x1B44...0x1B44 => .virama, | ||
| 934 | 0x1B6B...0x1B6B => .above, | ||
| 935 | 0x1B6C...0x1B6C => .below, | ||
| 936 | 0x1B6D...0x1B73 => .above, | ||
| 937 | 0x1BAA...0x1BAB => .virama, | ||
| 938 | 0x1BE6...0x1BE6 => .nukta, | ||
| 939 | 0x1BF2...0x1BF3 => .virama, | ||
| 940 | 0x1C37...0x1C37 => .nukta, | ||
| 941 | 0x1CD0...0x1CD2 => .above, | ||
| 942 | 0x1CD4...0x1CD4 => .overlay, | ||
| 943 | 0x1CD5...0x1CD9 => .below, | ||
| 944 | 0x1CDA...0x1CDB => .above, | ||
| 945 | 0x1CDC...0x1CDF => .below, | ||
| 946 | 0x1CE0...0x1CE0 => .above, | ||
| 947 | 0x1CE2...0x1CE8 => .overlay, | ||
| 948 | 0x1CED...0x1CED => .below, | ||
| 949 | 0x1CF4...0x1CF4 => .above, | ||
| 950 | 0x1CF8...0x1CF9 => .above, | ||
| 951 | 0x1DC0...0x1DC1 => .above, | ||
| 952 | 0x1DC2...0x1DC2 => .below, | ||
| 953 | 0x1DC3...0x1DC9 => .above, | ||
| 954 | 0x1DCA...0x1DCA => .below, | ||
| 955 | 0x1DCB...0x1DCC => .above, | ||
| 956 | 0x1DCD...0x1DCD => .double_above, | ||
| 957 | 0x1DCE...0x1DCE => .attached_above, | ||
| 958 | 0x1DCF...0x1DCF => .below, | ||
| 959 | 0x1DD0...0x1DD0 => .attached_below, | ||
| 960 | 0x1DD1...0x1DF5 => .above, | ||
| 961 | 0x1DF6...0x1DF6 => .above_right, | ||
| 962 | 0x1DF7...0x1DF8 => .above_left, | ||
| 963 | 0x1DF9...0x1DF9 => .below, | ||
| 964 | 0x1DFA...0x1DFA => .below_left, | ||
| 965 | 0x1DFB...0x1DFB => .above, | ||
| 966 | 0x1DFC...0x1DFC => .double_below, | ||
| 967 | 0x1DFD...0x1DFD => .below, | ||
| 968 | 0x1DFE...0x1DFE => .above, | ||
| 969 | 0x1DFF...0x1DFF => .below, | ||
| 970 | 0x20D0...0x20D1 => .above, | ||
| 971 | 0x20D2...0x20D3 => .overlay, | ||
| 972 | 0x20D4...0x20D7 => .above, | ||
| 973 | 0x20D8...0x20DA => .overlay, | ||
| 974 | 0x20DB...0x20DC => .above, | ||
| 975 | 0x20E1...0x20E1 => .above, | ||
| 976 | 0x20E5...0x20E6 => .overlay, | ||
| 977 | 0x20E7...0x20E7 => .above, | ||
| 978 | 0x20E8...0x20E8 => .below, | ||
| 979 | 0x20E9...0x20E9 => .above, | ||
| 980 | 0x20EA...0x20EB => .overlay, | ||
| 981 | 0x20EC...0x20EF => .below, | ||
| 982 | 0x20F0...0x20F0 => .above, | ||
| 983 | 0x2CEF...0x2CF1 => .above, | ||
| 984 | 0x2D7F...0x2D7F => .virama, | ||
| 985 | 0x2DE0...0x2DFF => .above, | ||
| 986 | 0x302A...0x302A => .below_left, | ||
| 987 | 0x302B...0x302B => .above_left, | ||
| 988 | 0x302C...0x302C => .above_right, | ||
| 989 | 0x302D...0x302D => .below_right, | ||
| 990 | 0x302E...0x302F => .left, | ||
| 991 | 0x3099...0x309A => .kana_voicing, | ||
| 992 | 0xA66F...0xA66F => .above, | ||
| 993 | 0xA674...0xA67D => .above, | ||
| 994 | 0xA69E...0xA69F => .above, | ||
| 995 | 0xA6F0...0xA6F1 => .above, | ||
| 996 | 0xA806...0xA806 => .virama, | ||
| 997 | 0xA82C...0xA82C => .virama, | ||
| 998 | 0xA8C4...0xA8C4 => .virama, | ||
| 999 | 0xA8E0...0xA8F1 => .above, | ||
| 1000 | 0xA92B...0xA92D => .below, | ||
| 1001 | 0xA953...0xA953 => .virama, | ||
| 1002 | 0xA9B3...0xA9B3 => .nukta, | ||
| 1003 | 0xA9C0...0xA9C0 => .virama, | ||
| 1004 | 0xAAB0...0xAAB0 => .above, | ||
| 1005 | 0xAAB2...0xAAB3 => .above, | ||
| 1006 | 0xAAB4...0xAAB4 => .below, | ||
| 1007 | 0xAAB7...0xAAB8 => .above, | ||
| 1008 | 0xAABE...0xAABF => .above, | ||
| 1009 | 0xAAC1...0xAAC1 => .above, | ||
| 1010 | 0xAAF6...0xAAF6 => .virama, | ||
| 1011 | 0xABED...0xABED => .virama, | ||
| 1012 | 0xFB1E...0xFB1E => .ccc26, | ||
| 1013 | 0xFE20...0xFE26 => .above, | ||
| 1014 | 0xFE27...0xFE2D => .below, | ||
| 1015 | 0xFE2E...0xFE2F => .above, | ||
| 1016 | 0x101FD...0x101FD => .below, | ||
| 1017 | 0x102E0...0x102E0 => .below, | ||
| 1018 | 0x10376...0x1037A => .above, | ||
| 1019 | 0x10A0D...0x10A0D => .below, | ||
| 1020 | 0x10A0F...0x10A0F => .above, | ||
| 1021 | 0x10A38...0x10A38 => .above, | ||
| 1022 | 0x10A39...0x10A39 => .overlay, | ||
| 1023 | 0x10A3A...0x10A3A => .below, | ||
| 1024 | 0x10A3F...0x10A3F => .virama, | ||
| 1025 | 0x10AE5...0x10AE5 => .above, | ||
| 1026 | 0x10AE6...0x10AE6 => .below, | ||
| 1027 | 0x10D24...0x10D27 => .above, | ||
| 1028 | 0x10EAB...0x10EAC => .above, | ||
| 1029 | 0x10EFD...0x10EFF => .below, | ||
| 1030 | 0x10F46...0x10F47 => .below, | ||
| 1031 | 0x10F48...0x10F4A => .above, | ||
| 1032 | 0x10F4B...0x10F4B => .below, | ||
| 1033 | 0x10F4C...0x10F4C => .above, | ||
| 1034 | 0x10F4D...0x10F50 => .below, | ||
| 1035 | 0x10F82...0x10F82 => .above, | ||
| 1036 | 0x10F83...0x10F83 => .below, | ||
| 1037 | 0x10F84...0x10F84 => .above, | ||
| 1038 | 0x10F85...0x10F85 => .below, | ||
| 1039 | 0x11046...0x11046 => .virama, | ||
| 1040 | 0x11070...0x11070 => .virama, | ||
| 1041 | 0x1107F...0x1107F => .virama, | ||
| 1042 | 0x110B9...0x110B9 => .virama, | ||
| 1043 | 0x110BA...0x110BA => .nukta, | ||
| 1044 | 0x11100...0x11102 => .above, | ||
| 1045 | 0x11133...0x11134 => .virama, | ||
| 1046 | 0x11173...0x11173 => .nukta, | ||
| 1047 | 0x111C0...0x111C0 => .virama, | ||
| 1048 | 0x111CA...0x111CA => .nukta, | ||
| 1049 | 0x11235...0x11235 => .virama, | ||
| 1050 | 0x11236...0x11236 => .nukta, | ||
| 1051 | 0x112E9...0x112E9 => .nukta, | ||
| 1052 | 0x112EA...0x112EA => .virama, | ||
| 1053 | 0x1133B...0x1133C => .nukta, | ||
| 1054 | 0x1134D...0x1134D => .virama, | ||
| 1055 | 0x11366...0x1136C => .above, | ||
| 1056 | 0x11370...0x11374 => .above, | ||
| 1057 | 0x11442...0x11442 => .virama, | ||
| 1058 | 0x11446...0x11446 => .nukta, | ||
| 1059 | 0x1145E...0x1145E => .above, | ||
| 1060 | 0x114C2...0x114C2 => .virama, | ||
| 1061 | 0x114C3...0x114C3 => .nukta, | ||
| 1062 | 0x115BF...0x115BF => .virama, | ||
| 1063 | 0x115C0...0x115C0 => .nukta, | ||
| 1064 | 0x1163F...0x1163F => .virama, | ||
| 1065 | 0x116B6...0x116B6 => .virama, | ||
| 1066 | 0x116B7...0x116B7 => .nukta, | ||
| 1067 | 0x1172B...0x1172B => .virama, | ||
| 1068 | 0x11839...0x11839 => .virama, | ||
| 1069 | 0x1183A...0x1183A => .nukta, | ||
| 1070 | 0x1193D...0x1193E => .virama, | ||
| 1071 | 0x11943...0x11943 => .nukta, | ||
| 1072 | 0x119E0...0x119E0 => .virama, | ||
| 1073 | 0x11A34...0x11A34 => .virama, | ||
| 1074 | 0x11A47...0x11A47 => .virama, | ||
| 1075 | 0x11A99...0x11A99 => .virama, | ||
| 1076 | 0x11C3F...0x11C3F => .virama, | ||
| 1077 | 0x11D42...0x11D42 => .nukta, | ||
| 1078 | 0x11D44...0x11D45 => .virama, | ||
| 1079 | 0x11D97...0x11D97 => .virama, | ||
| 1080 | 0x11F41...0x11F42 => .virama, | ||
| 1081 | 0x16AF0...0x16AF4 => .overlay, | ||
| 1082 | 0x16B30...0x16B36 => .above, | ||
| 1083 | 0x16FF0...0x16FF1 => .han_reading, | ||
| 1084 | 0x1BC9E...0x1BC9E => .overlay, | ||
| 1085 | 0x1D165...0x1D166 => .attached_above_right, | ||
| 1086 | 0x1D167...0x1D169 => .overlay, | ||
| 1087 | 0x1D16D...0x1D16D => .right, | ||
| 1088 | 0x1D16E...0x1D172 => .attached_above_right, | ||
| 1089 | 0x1D17B...0x1D182 => .below, | ||
| 1090 | 0x1D185...0x1D189 => .above, | ||
| 1091 | 0x1D18A...0x1D18B => .below, | ||
| 1092 | 0x1D1AA...0x1D1AD => .above, | ||
| 1093 | 0x1D242...0x1D244 => .above, | ||
| 1094 | 0x1E000...0x1E006 => .above, | ||
| 1095 | 0x1E008...0x1E018 => .above, | ||
| 1096 | 0x1E01B...0x1E021 => .above, | ||
| 1097 | 0x1E023...0x1E024 => .above, | ||
| 1098 | 0x1E026...0x1E02A => .above, | ||
| 1099 | 0x1E08F...0x1E08F => .above, | ||
| 1100 | 0x1E130...0x1E136 => .above, | ||
| 1101 | 0x1E2AE...0x1E2AE => .above, | ||
| 1102 | 0x1E2EC...0x1E2EF => .above, | ||
| 1103 | 0x1E4EC...0x1E4ED => .above_right, | ||
| 1104 | 0x1E4EE...0x1E4EE => .below, | ||
| 1105 | 0x1E4EF...0x1E4EF => .above, | ||
| 1106 | 0x1E8D0...0x1E8D6 => .below, | ||
| 1107 | 0x1E944...0x1E949 => .above, | ||
| 1108 | 0x1E94A...0x1E94A => .nukta, | ||
| 1109 | else => .not_reordered, | ||
| 1110 | }; | ||
| 1111 | } | ||
deps/aro/aro/char_info/identifier_tables.zig created+627| ... | @@ -0,0 +1,627 @@ | ||
| 1 | //! Adapted from the `unicode-ident` crate: https://github.com/dtolnay/unicode-ident | ||
| 2 | //! and Unicode Standard Annex #31 https://www.unicode.org/reports/tr31/ | ||
| 3 | //! Licensed under the MIT License and the Unicode license | ||
| 4 | |||
| 5 | pub const chunk = 64; | ||
| 6 | |||
| 7 | pub const trie_start: [402]u8 align(8) = .{ | ||
| 8 | 0x04, 0x0B, 0x0F, 0x13, 0x17, 0x1B, 0x1F, 0x23, 0x27, 0x2D, 0x31, 0x34, 0x38, 0x3C, 0x40, 0x02, | ||
| 9 | 0x45, 0x00, 0x00, 0x00, 0x00, 0x00, 0x49, 0x00, 0x4D, 0x00, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, | ||
| 10 | 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x06, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, | ||
| 11 | 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, | ||
| 12 | 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, | ||
| 13 | 0x05, 0x05, 0x51, 0x54, 0x58, 0x5C, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, | ||
| 14 | 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x09, 0x00, 0x00, 0x00, 0x00, | ||
| 15 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x60, 0x64, 0x66, | ||
| 16 | 0x6A, 0x6E, 0x72, 0x28, 0x76, 0x78, 0x7C, 0x80, 0x84, 0x88, 0x8C, 0x90, 0x94, 0x98, 0x9E, 0xA2, | ||
| 17 | 0x05, 0x2B, 0xA6, 0x00, 0x00, 0x00, 0x00, 0x99, 0x05, 0x05, 0xA8, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 18 | 0x00, 0x00, 0x05, 0xAE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 19 | 0x00, 0x00, 0x00, 0x00, 0x05, 0xB1, 0x00, 0xB5, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, | ||
| 20 | 0x05, 0x05, 0x05, 0x32, 0x05, 0x05, 0xB9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 21 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9C, 0x43, 0xBB, 0x00, 0x00, 0x00, 0x00, 0xBE, 0x00, | ||
| 22 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC6, 0xC8, 0x00, 0x00, 0x00, 0xAF, | ||
| 23 | 0xCE, 0xD2, 0xD6, 0xBC, 0xDA, 0x00, 0x00, 0xDE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 24 | 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, | ||
| 25 | 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, | ||
| 26 | 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, | ||
| 27 | 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, | ||
| 28 | 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, | ||
| 29 | 0x05, 0x05, 0x05, 0xE0, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x52, 0xE3, 0x05, 0x05, 0x05, | ||
| 30 | 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0xE6, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, | ||
| 31 | 0x05, 0x05, 0x05, 0x05, 0x05, 0xE1, 0x05, 0xE9, 0x00, 0x00, 0x00, 0x00, 0x05, 0xEB, 0x00, 0x00, | ||
| 32 | 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0xE4, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, | ||
| 33 | 0x05, 0xE7, | ||
| 34 | }; | ||
| 35 | |||
| 36 | pub const trie_continue: [1793]u8 align(8) = .{ | ||
| 37 | 0x08, 0x0D, 0x11, 0x15, 0x19, 0x1D, 0x21, 0x25, 0x2A, 0x2F, 0x31, 0x36, 0x3A, 0x3E, 0x42, 0x02, | ||
| 38 | 0x47, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4B, 0x00, 0x4F, 0x00, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, | ||
| 39 | 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x06, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, | ||
| 40 | 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, | ||
| 41 | 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, | ||
| 42 | 0x05, 0x05, 0x51, 0x56, 0x5A, 0x5E, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, | ||
| 43 | 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x09, 0x00, 0x00, 0x00, 0x00, | ||
| 44 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x62, 0x64, 0x68, | ||
| 45 | 0x6C, 0x70, 0x74, 0x28, 0x76, 0x7A, 0x7E, 0x82, 0x86, 0x8A, 0x8E, 0x92, 0x96, 0x9B, 0xA0, 0xA4, | ||
| 46 | 0x05, 0x2B, 0xA6, 0x00, 0x00, 0x00, 0x00, 0x99, 0x05, 0x05, 0xAB, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 47 | 0x00, 0x00, 0x05, 0xAE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 48 | 0x00, 0x00, 0x00, 0x00, 0x05, 0xB3, 0x00, 0xB7, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, | ||
| 49 | 0x05, 0x05, 0x05, 0x32, 0x05, 0x05, 0xB9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 50 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9C, 0x43, 0xBB, 0x00, 0x00, 0x00, 0x00, 0xC1, 0x00, | ||
| 51 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xA9, 0xAC, 0xC4, 0xC6, 0xCA, 0x00, 0xCC, 0x00, 0xAF, | ||
| 52 | 0xD0, 0xD4, 0xD8, 0xBC, 0xDC, 0x00, 0x00, 0xDE, 0x00, 0x00, 0x00, 0x00, 0x00, 0xBF, 0x00, 0x00, | ||
| 53 | 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, | ||
| 54 | 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, | ||
| 55 | 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, | ||
| 56 | 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, | ||
| 57 | 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, | ||
| 58 | 0x05, 0x05, 0x05, 0xE0, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x52, 0xE3, 0x05, 0x05, 0x05, | ||
| 59 | 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0xE6, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, | ||
| 60 | 0x05, 0x05, 0x05, 0x05, 0x05, 0xE1, 0x05, 0xE9, 0x00, 0x00, 0x00, 0x00, 0x05, 0xEB, 0x00, 0x00, | ||
| 61 | 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0xE4, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, | ||
| 62 | 0x05, 0xE7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 63 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 64 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 65 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 66 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 67 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 68 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 69 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 70 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 71 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 72 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 73 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 74 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 75 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 76 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 77 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 78 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 79 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 80 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 81 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 82 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 83 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 84 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 85 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 86 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 87 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 88 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 89 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 90 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 91 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 92 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 93 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 94 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 95 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 96 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 97 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 98 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 99 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 100 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 101 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 102 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 103 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 104 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 105 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 106 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 107 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 108 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 109 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 110 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 111 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 112 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 113 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 114 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 115 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 116 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 117 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 118 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 119 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 120 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 121 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 122 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 123 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 124 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 125 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 126 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 127 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 128 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 129 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 130 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 131 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 132 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 133 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 134 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 135 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 136 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 137 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 138 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 139 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 140 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 141 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 142 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 143 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 144 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 145 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 146 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 147 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 148 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 149 | 0xC2, | ||
| 150 | }; | ||
| 151 | |||
| 152 | pub const leaf: [7584]u8 align(64) = .{ | ||
| 153 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 154 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 155 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 156 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 157 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | ||
| 158 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | ||
| 159 | 0xFF, 0xFF, 0x3F, 0x3F, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0x3F, 0xFF, 0xAA, 0xFF, 0xFF, 0xFF, 0x3F, | ||
| 160 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xDF, 0x5F, 0xDC, 0x1F, 0xCF, 0x0F, 0xFF, 0x1F, 0xDC, 0x1F, | ||
| 161 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 162 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x20, 0x04, 0xFF, 0xFF, 0x7F, 0xFF, 0xFF, 0xFF, 0x7F, 0xFF, | ||
| 163 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | ||
| 164 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | ||
| 165 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | ||
| 166 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | ||
| 167 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | ||
| 168 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 169 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 170 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0xA0, 0x04, 0xFF, 0xFF, 0x7F, 0xFF, 0xFF, 0xFF, 0x7F, 0xFF, | ||
| 171 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | ||
| 172 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | ||
| 173 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | ||
| 174 | 0xFF, 0xFF, 0xFF, 0xFF, 0x0F, 0x00, 0xFF, 0xFF, 0x7F, 0xF8, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x0F, | ||
| 175 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | ||
| 176 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xC3, 0xFF, 0x03, 0x00, 0x1F, 0x50, 0x00, 0x00, | ||
| 177 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xDF, 0xB8, | ||
| 178 | 0x40, 0xD7, 0xFF, 0xFF, 0xFB, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xBF, 0xFF, | ||
| 179 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | ||
| 180 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xC3, 0xFF, 0x03, 0x00, 0x1F, 0x50, 0x00, 0x00, | ||
| 181 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xDF, 0xB8, | ||
| 182 | 0xC0, 0xD7, 0xFF, 0xFF, 0xFB, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xBF, 0xFF, | ||
| 183 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | ||
| 184 | 0x03, 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | ||
| 185 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xFF, 0xFF, 0xFF, 0x7F, 0x02, 0xFF, 0xFF, 0xFF, 0xFF, | ||
| 186 | 0xFF, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0x87, 0x07, 0x00, | ||
| 187 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | ||
| 188 | 0xFB, 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | ||
| 189 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xFF, 0xFF, 0xFF, 0x7F, 0x02, 0xFF, 0xFF, 0xFF, 0xFF, | ||
| 190 | 0xFF, 0x01, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xBF, 0xB6, 0x00, 0xFF, 0xFF, 0xFF, 0x87, 0x07, 0x00, | ||
| 191 | 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x07, 0x00, 0x00, 0x00, 0xC0, 0xFE, 0xFF, | ||
| 192 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x2F, 0x00, 0x60, 0xC0, 0x00, 0x9C, | ||
| 193 | 0x00, 0x00, 0xFD, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | ||
| 194 | 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0x00, 0x02, 0x00, 0x00, 0xFC, 0xFF, 0xFF, 0xFF, 0x07, 0x30, 0x04, | ||
| 195 | 0x00, 0x00, 0xFF, 0x07, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xC3, 0xFF, 0xFF, | ||
| 196 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xEF, 0x9F, 0xFF, 0xFD, 0xFF, 0x9F, | ||
| 197 | 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xE7, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | ||
| 198 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x03, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0x24, | ||
| 199 | 0xFF, 0xFF, 0x3F, 0x04, 0x10, 0x01, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0x01, 0xFF, 0x07, 0xFF, 0xFF, | ||
| 200 | 0xFF, 0x7E, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 201 | 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x23, 0x00, 0x00, 0x01, 0xFF, 0x03, 0x00, 0xFE, 0xFF, | ||
| 202 | 0xE1, 0x9F, 0xF9, 0xFF, 0xFF, 0xFD, 0xC5, 0x23, 0x00, 0x40, 0x00, 0xB0, 0x03, 0x00, 0x03, 0x10, | ||
| 203 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0x0F, 0xFF, 0x07, 0xFF, 0xFF, | ||
| 204 | 0xFF, 0x7E, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFB, 0xFF, 0xFF, 0xFF, | ||
| 205 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0xFF, 0xFE, 0xFF, | ||
| 206 | 0xEF, 0x9F, 0xF9, 0xFF, 0xFF, 0xFD, 0xC5, 0xF3, 0x9F, 0x79, 0x80, 0xB0, 0xCF, 0xFF, 0x03, 0x50, | ||
| 207 | 0xE0, 0x87, 0xF9, 0xFF, 0xFF, 0xFD, 0x6D, 0x03, 0x00, 0x00, 0x00, 0x5E, 0x00, 0x00, 0x1C, 0x00, | ||
| 208 | 0xE0, 0xBF, 0xFB, 0xFF, 0xFF, 0xFD, 0xED, 0x23, 0x00, 0x00, 0x01, 0x00, 0x03, 0x00, 0x00, 0x02, | ||
| 209 | 0xE0, 0x9F, 0xF9, 0xFF, 0xFF, 0xFD, 0xED, 0x23, 0x00, 0x00, 0x00, 0xB0, 0x03, 0x00, 0x02, 0x00, | ||
| 210 | 0xE8, 0xC7, 0x3D, 0xD6, 0x18, 0xC7, 0xFF, 0x03, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 211 | 0xEE, 0x87, 0xF9, 0xFF, 0xFF, 0xFD, 0x6D, 0xD3, 0x87, 0x39, 0x02, 0x5E, 0xC0, 0xFF, 0x3F, 0x00, | ||
| 212 | 0xEE, 0xBF, 0xFB, 0xFF, 0xFF, 0xFD, 0xED, 0xF3, 0xBF, 0x3B, 0x01, 0x00, 0xCF, 0xFF, 0x00, 0xFE, | ||
| 213 | 0xEE, 0x9F, 0xF9, 0xFF, 0xFF, 0xFD, 0xED, 0xF3, 0x9F, 0x39, 0xE0, 0xB0, 0xCF, 0xFF, 0x02, 0x00, | ||
| 214 | 0xEC, 0xC7, 0x3D, 0xD6, 0x18, 0xC7, 0xFF, 0xC3, 0xC7, 0x3D, 0x81, 0x00, 0xC0, 0xFF, 0x00, 0x00, | ||
| 215 | 0xE0, 0xDF, 0xFD, 0xFF, 0xFF, 0xFD, 0xFF, 0x23, 0x00, 0x00, 0x00, 0x27, 0x03, 0x00, 0x00, 0x00, | ||
| 216 | 0xE1, 0xDF, 0xFD, 0xFF, 0xFF, 0xFD, 0xEF, 0x23, 0x00, 0x00, 0x00, 0x60, 0x03, 0x00, 0x06, 0x00, | ||
| 217 | 0xF0, 0xDF, 0xFD, 0xFF, 0xFF, 0xFF, 0xFF, 0x27, 0x00, 0x40, 0x70, 0x80, 0x03, 0x00, 0x00, 0xFC, | ||
| 218 | 0xE0, 0xFF, 0x7F, 0xFC, 0xFF, 0xFF, 0xFB, 0x2F, 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 219 | 0xFF, 0xDF, 0xFD, 0xFF, 0xFF, 0xFD, 0xFF, 0xF3, 0xDF, 0x3D, 0x60, 0x27, 0xCF, 0xFF, 0x00, 0x00, | ||
| 220 | 0xEF, 0xDF, 0xFD, 0xFF, 0xFF, 0xFD, 0xEF, 0xF3, 0xDF, 0x3D, 0x60, 0x60, 0xCF, 0xFF, 0x0E, 0x00, | ||
| 221 | 0xFF, 0xDF, 0xFD, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xDF, 0x7D, 0xF0, 0x80, 0xCF, 0xFF, 0x00, 0xFC, | ||
| 222 | 0xEE, 0xFF, 0x7F, 0xFC, 0xFF, 0xFF, 0xFB, 0x2F, 0x7F, 0x84, 0x5F, 0xFF, 0xC0, 0xFF, 0x0C, 0x00, | ||
| 223 | 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x05, 0x00, 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 224 | 0xD6, 0xF7, 0xFF, 0xFF, 0xAF, 0xFF, 0x05, 0x20, 0x5F, 0x00, 0x00, 0xF0, 0x00, 0x00, 0x00, 0x00, | ||
| 225 | 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFE, 0xFF, 0xFF, 0xFF, 0x1F, 0x00, 0x00, | ||
| 226 | 0x00, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 227 | 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x07, 0xFF, 0x7F, 0xFF, 0x03, 0x00, 0x00, 0x00, 0x00, | ||
| 228 | 0xD6, 0xF7, 0xFF, 0xFF, 0xAF, 0xFF, 0xFF, 0x3F, 0x5F, 0x7F, 0xFF, 0xF3, 0x00, 0x00, 0x00, 0x00, | ||
| 229 | 0x01, 0x00, 0x00, 0x03, 0xFF, 0x03, 0xA0, 0xC2, 0xFF, 0xFE, 0xFF, 0xFF, 0xFF, 0x1F, 0xFE, 0xFF, | ||
| 230 | 0xDF, 0xFF, 0xFF, 0xFE, 0xFF, 0xFF, 0xFF, 0x1F, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 231 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x07, 0x00, 0x80, 0x00, 0x00, 0x3F, 0x3C, 0x62, 0xC0, 0xE1, 0xFF, | ||
| 232 | 0x03, 0x40, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xBF, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, | ||
| 233 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | ||
| 234 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | ||
| 235 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0x00, 0xFF, 0xFF, 0x3F, 0x00, 0xFF, 0x00, 0x00, 0x00, | ||
| 236 | 0xBF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 237 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x03, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | ||
| 238 | 0xFF, 0xFF, 0xFF, 0x3F, 0xFF, 0xFF, 0xFF, 0xFF, 0xBF, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, | ||
| 239 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | ||
| 240 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | ||
| 241 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | ||
| 242 | 0xFF, 0xFF, 0xFF, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 243 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x3D, 0x7F, 0x3D, 0xFF, 0xFF, 0xFF, 0xFF, | ||
| 244 | 0xFF, 0x3D, 0xFF, 0xFF, 0xFF, 0xFF, 0x3D, 0x7F, 0x3D, 0xFF, 0x7F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | ||
| 245 | 0xFF, 0xFF, 0x3D, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x07, 0x00, 0x00, 0x00, 0x00, | ||
| 246 | 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0x3F, | ||
| 247 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x3D, 0x7F, 0x3D, 0xFF, 0xFF, 0xFF, 0xFF, | ||
| 248 | 0xFF, 0x3D, 0xFF, 0xFF, 0xFF, 0xFF, 0x3D, 0x7F, 0x3D, 0xFF, 0x7F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | ||
| 249 | 0xFF, 0xFF, 0x3D, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xE7, 0x00, 0xFE, 0x03, 0x00, | ||
| 250 | 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0x3F, | ||
| 251 | 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | ||
| 252 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | ||
| 253 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | ||
| 254 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | ||
| 255 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | ||
| 256 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, | ||
| 257 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xFF, 0xFF, | ||
| 258 | 0xFE, 0xFF, 0xFF, 0x07, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0xFF, 0x01, | ||
| 259 | 0xFF, 0xFF, 0x03, 0x80, 0xFF, 0xFF, 0x03, 0x00, 0xFF, 0xFF, 0x03, 0x00, 0xFF, 0xDF, 0x01, 0x00, | ||
| 260 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x0F, 0x00, 0x00, 0x00, 0x80, 0x10, 0x00, 0x00, 0x00, 0x00, | ||
| 261 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xFF, 0xFF, | ||
| 262 | 0xFE, 0xFF, 0xFF, 0x07, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0xFF, 0x01, | ||
| 263 | 0xFF, 0xFF, 0x3F, 0x80, 0xFF, 0xFF, 0x1F, 0x00, 0xFF, 0xFF, 0x0F, 0x00, 0xFF, 0xDF, 0x0D, 0x00, | ||
| 264 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x8F, 0x30, 0xFF, 0x03, 0x00, 0x00, | ||
| 265 | 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, | ||
| 266 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x05, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0x00, | ||
| 267 | 0xFF, 0xFF, 0xFF, 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0x3F, 0x1F, 0x00, | ||
| 268 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x0F, 0xFF, 0xFF, 0xFF, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 269 | 0x00, 0xB8, 0xFF, 0x03, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, | ||
| 270 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x07, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0x00, | ||
| 271 | 0xFF, 0xFF, 0xFF, 0x7F, 0xFF, 0x0F, 0xFF, 0x0F, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0x1F, 0x00, | ||
| 272 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x0F, 0xFF, 0xFF, 0xFF, 0x03, 0xFF, 0x07, 0x00, 0x00, 0x00, 0x00, | ||
| 273 | 0xFF, 0xFF, 0x7F, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 274 | 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 275 | 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x0F, 0x00, 0xE0, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 276 | 0xF8, 0xFF, 0xFF, 0xFF, 0x01, 0xC0, 0x00, 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0x00, 0x00, 0x00, | ||
| 277 | 0xFF, 0xFF, 0xFF, 0x0F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0xFF, 0xFF, 0xFF, 0x9F, | ||
| 278 | 0xFF, 0x03, 0xFF, 0x03, 0x80, 0x00, 0xFF, 0xBF, 0xFF, 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 279 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x1F, 0xFF, 0x03, 0x00, 0xF8, 0x0F, 0x00, | ||
| 280 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x0F, 0x00, | ||
| 281 | 0xFF, 0xFF, 0xFF, 0xFF, 0x0F, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x00, 0xFC, 0xFF, 0xFF, 0xFF, 0x3F, | ||
| 282 | 0xFF, 0x01, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xE7, 0x00, 0x00, 0x00, 0x00, 0x00, 0xDE, 0x6F, 0x04, | ||
| 283 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | ||
| 284 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 285 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0xFF, 0xE3, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, | ||
| 286 | 0xFF, 0x01, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xE7, 0x00, 0x00, 0xF7, 0xFF, 0xFF, 0xFF, 0xFF, 0x07, | ||
| 287 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | ||
| 288 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | ||
| 289 | 0xFF, 0xFF, 0xFF, 0xFF, 0x07, 0x00, 0x04, 0x00, 0x00, 0x00, 0x27, 0x00, 0xF0, 0x00, 0xFF, 0xFF, | ||
| 290 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | ||
| 291 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x80, | ||
| 292 | 0x00, 0x00, 0xFF, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 293 | 0x84, 0xFC, 0x2F, 0x3F, 0x50, 0xFD, 0xFF, 0xF3, 0xE0, 0x43, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, | ||
| 294 | 0xFF, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 295 | 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x10, 0x00, 0x00, 0x00, 0x02, 0x80, | ||
| 296 | 0x00, 0x00, 0xFF, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x1F, 0xE2, 0xFF, 0x01, 0x00, | ||
| 297 | 0x84, 0xFC, 0x2F, 0x3F, 0x50, 0xFD, 0xFF, 0xF3, 0xE0, 0x43, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, | ||
| 298 | 0xFF, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 299 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | ||
| 300 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x1F, 0x78, 0x0C, 0x00, | ||
| 301 | 0xFF, 0xFF, 0xFF, 0xFF, 0xBF, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x80, 0x00, 0x00, | ||
| 302 | 0xFF, 0xFF, 0x7F, 0x00, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x00, 0x00, 0x00, 0x00, | ||
| 303 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | ||
| 304 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x1F, 0xF8, 0x0F, 0x00, | ||
| 305 | 0xFF, 0xFF, 0xFF, 0xFF, 0xBF, 0x20, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x80, 0x00, 0x80, | ||
| 306 | 0xFF, 0xFF, 0x7F, 0x00, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0xFF, 0xFF, 0xFF, 0xFF, | ||
| 307 | 0xE0, 0x00, 0x00, 0x00, 0xFE, 0x03, 0x3E, 0x1F, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | ||
| 308 | 0xFF, 0xFF, 0x7F, 0xE0, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, | ||
| 309 | 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | ||
| 310 | 0xFF, 0x7F, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, | ||
| 311 | 0xE0, 0x00, 0x00, 0x00, 0xFE, 0xFF, 0x3E, 0x1F, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | ||
| 312 | 0xFF, 0xFF, 0x7F, 0xE6, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | ||
| 313 | 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | ||
| 314 | 0xFF, 0x7F, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, | ||
| 315 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | ||
| 316 | 0xFF, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, | ||
| 317 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | ||
| 318 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | ||
| 319 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x03, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | ||
| 320 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | ||
| 321 | 0xFF, 0x1F, 0xFF, 0xFF, 0x00, 0x0C, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0x00, 0x80, | ||
| 322 | 0xFF, 0xFF, 0xFF, 0x3F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, | ||
| 323 | 0x00, 0x00, 0x80, 0xFF, 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | ||
| 324 | 0xFF, 0xF9, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x07, 0xEB, 0x03, 0x00, 0x00, 0xFC, 0xFF, | ||
| 325 | 0xFF, 0x1F, 0xFF, 0xFF, 0xFF, 0x0F, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0xBF, | ||
| 326 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x03, 0x00, | ||
| 327 | 0x00, 0x00, 0x80, 0xFF, 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | ||
| 328 | 0xFF, 0xF9, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x07, 0xEB, 0x03, 0x00, 0x00, 0xFC, 0xFF, | ||
| 329 | 0xBB, 0xF7, 0xFF, 0xFF, 0x07, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x0F, 0x00, | ||
| 330 | 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x68, | ||
| 331 | 0x00, 0xFC, 0xFF, 0xFF, 0x3F, 0x00, 0xFF, 0xFF, 0x7F, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0x1F, | ||
| 332 | 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x07, 0x00, 0x00, 0x80, 0x00, 0x00, 0xDF, 0xFF, 0x00, 0x7C, | ||
| 333 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x10, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x0F, 0x00, | ||
| 334 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0x00, 0xFF, 0x03, 0xFF, 0xFF, 0xFF, 0xE8, | ||
| 335 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0xFF, 0xFF, 0xFF, 0xFF, 0x0F, 0x00, 0xFF, 0xFF, 0xFF, 0x1F, | ||
| 336 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x80, 0xFF, 0x03, 0xFF, 0xFF, 0xFF, 0x7F, | ||
| 337 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x00, 0x00, 0xF7, 0x0F, 0x00, 0x00, 0xFF, 0xFF, 0x7F, 0xC4, | ||
| 338 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x62, 0x3E, 0x05, 0x00, 0x00, 0x38, 0xFF, 0x07, 0x1C, 0x00, | ||
| 339 | 0x7E, 0x7E, 0x7E, 0x00, 0x7F, 0x7F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0xFF, 0x03, 0xFF, 0xFF, | ||
| 340 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x07, 0x00, 0x00, 0x00, | ||
| 341 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0x00, 0xFF, 0x3F, 0xFF, 0x03, 0xFF, 0xFF, 0x7F, 0xFC, | ||
| 342 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x07, 0x00, 0x00, 0x38, 0xFF, 0xFF, 0x7C, 0x00, | ||
| 343 | 0x7E, 0x7E, 0x7E, 0x00, 0x7F, 0x7F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0xFF, 0x03, 0xFF, 0xFF, | ||
| 344 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x37, 0xFF, 0x03, | ||
| 345 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0xFF, 0xFF, | ||
| 346 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x03, 0x00, 0x00, 0x00, 0x00, | ||
| 347 | 0x7F, 0x00, 0xF8, 0xA0, 0xFF, 0xFD, 0x7F, 0x5F, 0xDB, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | ||
| 348 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x03, 0x00, 0x00, 0x00, 0xF8, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | ||
| 349 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0xFF, 0xFF, | ||
| 350 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x03, 0x00, 0x00, 0x00, 0x00, | ||
| 351 | 0x7F, 0x00, 0xF8, 0xE0, 0xFF, 0xFD, 0x7F, 0x5F, 0xDB, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | ||
| 352 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x03, 0x00, 0x00, 0x00, 0xF8, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | ||
| 353 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0xF0, 0xFF, 0xFF, 0xFF, | ||
| 354 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | ||
| 355 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | ||
| 356 | 0xFF, 0xFF, 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x03, | ||
| 357 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x8A, 0xAA, | ||
| 358 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x1F, | ||
| 359 | 0x00, 0x00, 0x00, 0x00, 0xFE, 0xFF, 0xFF, 0x07, 0xFE, 0xFF, 0xFF, 0x07, 0xC0, 0xFF, 0xFF, 0xFF, | ||
| 360 | 0xFF, 0xFF, 0xFF, 0x3F, 0xFF, 0xFF, 0xFF, 0x7F, 0xFC, 0xFC, 0xFC, 0x1C, 0x00, 0x00, 0x00, 0x00, | ||
| 361 | 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x18, 0x00, 0x00, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x8A, 0xAA, | ||
| 362 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x1F, | ||
| 363 | 0x00, 0x00, 0xFF, 0x03, 0xFE, 0xFF, 0xFF, 0x87, 0xFE, 0xFF, 0xFF, 0x07, 0xE0, 0xFF, 0xFF, 0xFF, | ||
| 364 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0xFC, 0xFC, 0xFC, 0x1C, 0x00, 0x00, 0x00, 0x00, | ||
| 365 | 0xFF, 0xEF, 0xFF, 0xFF, 0x7F, 0xFF, 0xFF, 0xB7, 0xFF, 0x3F, 0xFF, 0x3F, 0x00, 0x00, 0x00, 0x00, | ||
| 366 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x07, | ||
| 367 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x1F, 0x00, | ||
| 368 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 369 | 0xFF, 0xEF, 0xFF, 0xFF, 0x7F, 0xFF, 0xFF, 0xB7, 0xFF, 0x3F, 0xFF, 0x3F, 0x00, 0x00, 0x00, 0x00, | ||
| 370 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x07, | ||
| 371 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x1F, 0x00, | ||
| 372 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, | ||
| 373 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 374 | 0xFF, 0xFF, 0xFF, 0x1F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 375 | 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0xE0, 0xFF, 0xFF, 0xFF, 0x07, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0x00, | ||
| 376 | 0xFF, 0xFF, 0xFF, 0x3F, 0xFF, 0xFF, 0xFF, 0xFF, 0x0F, 0xFF, 0x3E, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 377 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 378 | 0xFF, 0xFF, 0xFF, 0x1F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, | ||
| 379 | 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0xE0, 0xFF, 0xFF, 0xFF, 0x07, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x07, | ||
| 380 | 0xFF, 0xFF, 0xFF, 0x3F, 0xFF, 0xFF, 0xFF, 0xFF, 0x0F, 0xFF, 0x3E, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 381 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | ||
| 382 | 0xFF, 0xFF, 0xFF, 0x3F, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x0F, 0xFF, 0xFF, 0xFF, 0xFF, 0x0F, | ||
| 383 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x0F, 0x00, 0xFF, 0xF7, | ||
| 384 | 0xFF, 0xF7, 0xB7, 0xFF, 0xFB, 0xFF, 0xFB, 0x1B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 385 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | ||
| 386 | 0xFF, 0xFF, 0xFF, 0x3F, 0xFF, 0x03, 0xFF, 0xFF, 0xFF, 0xFF, 0x0F, 0xFF, 0xFF, 0xFF, 0xFF, 0x0F, | ||
| 387 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x0F, 0x00, 0xFF, 0xF7, | ||
| 388 | 0xFF, 0xF7, 0xB7, 0xFF, 0xFB, 0xFF, 0xFB, 0x1B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 389 | 0x3F, 0xFD, 0xFF, 0xFF, 0xFF, 0xFF, 0xBF, 0x91, 0xFF, 0xFF, 0x3F, 0x00, 0xFF, 0xFF, 0x7F, 0x00, | ||
| 390 | 0xFF, 0xFF, 0xFF, 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x37, 0x00, | ||
| 391 | 0xFF, 0xFF, 0x3F, 0x00, 0xFF, 0xFF, 0xFF, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 392 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 393 | 0x01, 0x00, 0xEF, 0xFE, 0xFF, 0xFF, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0x1F, | ||
| 394 | 0xFF, 0xFF, 0xFF, 0x1F, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFE, 0xFF, 0xFF, 0x1F, 0x00, 0x00, 0x00, | ||
| 395 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0x00, 0xFF, 0xFF, 0x3F, 0x00, 0xFF, 0xFF, 0x07, 0x00, | ||
| 396 | 0xFF, 0xFF, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 397 | 0x6F, 0xF0, 0xEF, 0xFE, 0xFF, 0xFF, 0x3F, 0x87, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0x1F, | ||
| 398 | 0xFF, 0xFF, 0xFF, 0x1F, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFE, 0xFF, 0xFF, 0x7F, 0x00, 0x00, 0x00, | ||
| 399 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0x00, 0xFF, 0xFF, 0x3F, 0x00, 0xFF, 0xFF, 0x07, 0x00, | ||
| 400 | 0xFF, 0xFF, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 401 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 402 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x07, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x07, 0x00, | ||
| 403 | 0xFF, 0xFF, 0xFF, 0xFF, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 404 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 405 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 406 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x07, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x07, 0x00, | ||
| 407 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0xFF, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 408 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 409 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 410 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 411 | 0xFF, 0xFF, 0xFF, 0x1F, 0x80, 0x00, 0xFF, 0xFF, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, | ||
| 412 | 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x1F, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x7F, 0x00, | ||
| 413 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 414 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x1B, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, | ||
| 415 | 0xFF, 0xFF, 0xFF, 0x1F, 0x80, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x00, 0x00, 0x00, 0xFF, 0xFF, | ||
| 416 | 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x1F, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x7F, 0x00, | ||
| 417 | 0xF8, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x26, 0x00, | ||
| 418 | 0xF8, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0x01, 0x00, 0x00, | ||
| 419 | 0xF8, 0xFF, 0xFF, 0xFF, 0x7F, 0x00, 0x00, 0x00, 0x90, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x47, 0x00, | ||
| 420 | 0xF8, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x07, 0x00, 0x1E, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, | ||
| 421 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0x00, 0x00, 0x00, 0xC0, 0xFF, 0x3F, 0x80, | ||
| 422 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x07, 0x04, 0x00, 0xFF, 0xFF, 0xFF, 0x01, 0xFF, 0x03, | ||
| 423 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xDF, 0xFF, 0xF0, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x4F, 0x00, | ||
| 424 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x1F, 0xDE, 0xFF, 0x17, 0x00, 0x00, 0x00, 0x00, | ||
| 425 | 0xFF, 0xFF, 0xFB, 0xFF, 0xFF, 0x0F, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 426 | 0x7F, 0xBD, 0xFF, 0xBF, 0xFF, 0x01, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0x00, 0x00, 0x00, 0x00, | ||
| 427 | 0xE0, 0x9F, 0xF9, 0xFF, 0xFF, 0xFD, 0xED, 0x23, 0x00, 0x00, 0x01, 0xE0, 0x03, 0x00, 0x00, 0x00, | ||
| 428 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 429 | 0xFF, 0xFF, 0xFB, 0xFF, 0xFF, 0xFF, 0xFF, 0xC0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 430 | 0x7F, 0xBD, 0xFF, 0xBF, 0xFF, 0x01, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x07, 0xFF, 0x03, | ||
| 431 | 0xEF, 0x9F, 0xF9, 0xFF, 0xFF, 0xFD, 0xED, 0xFB, 0x9F, 0x39, 0x81, 0xE0, 0xCF, 0x1F, 0x1F, 0x00, | ||
| 432 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 433 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x1F, 0x00, 0x80, 0x07, 0x00, 0x80, 0x03, 0x00, 0x00, 0x00, | ||
| 434 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0xB0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 435 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 436 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x00, | ||
| 437 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x07, 0xFF, 0xC3, 0x03, 0x00, 0x00, 0x00, | ||
| 438 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xBF, 0x00, 0xFF, 0x03, 0x00, 0x00, 0x00, 0x00, | ||
| 439 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 440 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0xFF, 0x01, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00, 0x00, | ||
| 441 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 442 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x07, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 443 | 0xFF, 0xFF, 0xFF, 0x07, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 444 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 445 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x11, 0x00, 0xFF, 0x03, 0x00, 0x00, 0x00, 0x00, | ||
| 446 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0xFF, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 447 | 0xFF, 0xFF, 0xFF, 0xE7, 0xFF, 0x0F, 0xFF, 0x03, 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 448 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 449 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 450 | 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x80, | ||
| 451 | 0x7F, 0xF2, 0x6F, 0xFF, 0xFF, 0xFF, 0x00, 0x80, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 452 | 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x00, 0x0A, 0x00, 0x00, 0x00, | ||
| 453 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 454 | 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x03, 0x00, 0x80, | ||
| 455 | 0x7F, 0xF2, 0x6F, 0xFF, 0xFF, 0xFF, 0xBF, 0xF9, 0x0F, 0x00, 0xFF, 0x03, 0x00, 0x00, 0x00, 0x00, | ||
| 456 | 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0x1B, 0x00, 0x00, 0x00, | ||
| 457 | 0x01, 0xF8, 0xFF, 0xFF, 0xFF, 0xFF, 0x07, 0x04, 0x00, 0x00, 0x01, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, | ||
| 458 | 0xFF, 0x03, 0x00, 0x20, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, | ||
| 459 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 460 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 461 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 462 | 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x00, | ||
| 463 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0x80, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | ||
| 464 | 0xFF, 0xFF, 0xFF, 0x23, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, | ||
| 465 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 466 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 467 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 468 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xEF, 0x6F, | ||
| 469 | 0xFF, 0xFD, 0xFF, 0xFF, 0xFF, 0x7F, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 0xFF, | ||
| 470 | 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 471 | 0x7F, 0xFB, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x00, 0x40, 0x00, 0x00, 0x00, 0xBF, 0xFD, 0xFF, 0xFF, | ||
| 472 | 0xFF, 0x03, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 473 | 0xFF, 0xFD, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0xFF, 0x01, 0x00, 0xFF, 0x03, 0x00, 0x00, 0xFC, 0xFF, | ||
| 474 | 0xFF, 0xFF, 0xFC, 0xFF, 0xFF, 0xFE, 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 475 | 0x7F, 0xFB, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0xB4, 0xFF, 0x00, 0xFF, 0x03, 0xBF, 0xFD, 0xFF, 0xFF, | ||
| 476 | 0xFF, 0x7F, 0xFB, 0x01, 0xFF, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 477 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 478 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x07, 0x00, | ||
| 479 | 0xF4, 0xFF, 0xFD, 0xFF, 0xFF, 0xFF, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 480 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 481 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 482 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x7F, 0x00, | ||
| 483 | 0xFF, 0xFF, 0xFD, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0x07, 0x00, 0xFF, 0x03, 0x00, 0x00, 0x00, 0x00, | ||
| 484 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 485 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0x00, 0x00, | ||
| 486 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | ||
| 487 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 488 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 489 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x7E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 490 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 491 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 492 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 493 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0xFF, 0xFF, 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 494 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 495 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 496 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 497 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 498 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 499 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xE3, 0x07, 0xF8, | ||
| 500 | 0xE7, 0x0F, 0x00, 0x00, 0x00, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 501 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 502 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 503 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 504 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 505 | 0xFF, 0xFF, 0xFF, 0x7F, 0xE0, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 506 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 507 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0xFF, 0xFF, 0xFF, 0x7F, 0x00, 0x00, 0xFF, 0xFF, | ||
| 508 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0x3F, 0x00, 0x00, | ||
| 509 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0xF8, 0xFF, 0xFF, 0xE0, | ||
| 510 | 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 511 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0xFF, 0xFF, 0xFF, 0x7F, 0xFF, 0x03, 0xFF, 0xFF, | ||
| 512 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0xFF, 0x03, 0xFF, 0xFF, 0xFF, 0x3F, 0x1F, 0x00, | ||
| 513 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0x00, 0x0F, 0x00, 0xFF, 0x03, 0xF8, 0xFF, 0xFF, 0xE0, | ||
| 514 | 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 515 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | ||
| 516 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 517 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x07, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 518 | 0x00, 0x00, 0xF8, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, | ||
| 519 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | ||
| 520 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 521 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x87, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | ||
| 522 | 0xFF, 0x80, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1B, 0x00, 0x03, 0x00, | ||
| 523 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | ||
| 524 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 525 | 0xFF, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 526 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 527 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | ||
| 528 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x0F, | ||
| 529 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 530 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 531 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 532 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x6F, 0xFF, 0x7F, | ||
| 533 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x07, 0xFF, 0x1F, | ||
| 534 | 0xFF, 0x01, 0xFF, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 535 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 536 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 537 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 538 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x03, | ||
| 539 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x07, 0xFF, 0x1F, | ||
| 540 | 0xFF, 0x01, 0xFF, 0x63, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 541 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 542 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 543 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | ||
| 544 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, | ||
| 545 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 546 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 547 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 548 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 549 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xDF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | ||
| 550 | 0xFF, 0xFF, 0xFF, 0xDF, 0x64, 0xDE, 0xFF, 0xEB, 0xEF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | ||
| 551 | 0xBF, 0xE7, 0xDF, 0xDF, 0xFF, 0xFF, 0xFF, 0x7B, 0x5F, 0xFC, 0xFD, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | ||
| 552 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | ||
| 553 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | ||
| 554 | 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0xFF, 0xFF, 0xFF, 0xFD, 0xFF, 0xFF, 0xF7, 0xFF, 0xFF, 0xFF, 0xF7, | ||
| 555 | 0xFF, 0xFF, 0xDF, 0xFF, 0xFF, 0xFF, 0xDF, 0xFF, 0xFF, 0x7F, 0xFF, 0xFF, 0xFF, 0x7F, 0xFF, 0xFF, | ||
| 556 | 0xFF, 0xFD, 0xFF, 0xFF, 0xFF, 0xFD, 0xFF, 0xFF, 0xF7, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 557 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | ||
| 558 | 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0xFF, 0xFF, 0xFF, 0xFD, 0xFF, 0xFF, 0xF7, 0xFF, 0xFF, 0xFF, 0xF7, | ||
| 559 | 0xFF, 0xFF, 0xDF, 0xFF, 0xFF, 0xFF, 0xDF, 0xFF, 0xFF, 0x7F, 0xFF, 0xFF, 0xFF, 0x7F, 0xFF, 0xFF, | ||
| 560 | 0xFF, 0xFD, 0xFF, 0xFF, 0xFF, 0xFD, 0xFF, 0xFF, 0xF7, 0xCF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | ||
| 561 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0xF8, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x1F, 0x20, 0x00, | ||
| 562 | 0x10, 0x00, 0x00, 0xF8, 0xFE, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 563 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 564 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 565 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0x00, 0x00, | ||
| 566 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 567 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x1F, 0x80, 0x3F, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 568 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 569 | 0x7F, 0xFF, 0xFF, 0xF9, 0xDB, 0x07, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0x00, 0x00, | ||
| 570 | 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 571 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x1F, 0xFF, 0x3F, 0xFF, 0x43, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 572 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 573 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 574 | 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0x3F, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x0F, 0x00, 0x00, | ||
| 575 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 576 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 577 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 578 | 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0x7F, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x03, | ||
| 579 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 580 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 581 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 582 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0x0F, 0x00, 0x00, | ||
| 583 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 584 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 585 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 586 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x03, | ||
| 587 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 588 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 589 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | ||
| 590 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 591 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x0F, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 592 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 593 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | ||
| 594 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x1F, 0x00, 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 595 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x0F, 0xFF, 0x03, 0x00, 0x00, 0x00, 0x00, | ||
| 596 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 597 | 0xEF, 0xFF, 0xFF, 0xFF, 0x96, 0xFE, 0xF7, 0x0A, 0x84, 0xEA, 0x96, 0xAA, 0x96, 0xF7, 0xF7, 0x5E, | ||
| 598 | 0xFF, 0xFB, 0xFF, 0x0F, 0xEE, 0xFB, 0xFF, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 599 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 600 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 601 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | ||
| 602 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, | ||
| 603 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | ||
| 604 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | ||
| 605 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | ||
| 606 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x00, 0xFF, 0xFF, | ||
| 607 | 0xFF, 0xFF, 0xFF, 0x3F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | ||
| 608 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | ||
| 609 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | ||
| 610 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | ||
| 611 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x07, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | ||
| 612 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | ||
| 613 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | ||
| 614 | 0xFF, 0xFF, 0xFF, 0xFF, 0x03, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | ||
| 615 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | ||
| 616 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | ||
| 617 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | ||
| 618 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 619 | 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0x00, 0x00, 0x00, 0x00, | ||
| 620 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 621 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 622 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 623 | 0xFF, 0xFF, 0xFF, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 624 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 625 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 626 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 627 | }; | ||
deps/aro/aro/features.zig created+76| ... | @@ -0,0 +1,76 @@ | ||
| 1 | const std = @import("std"); | ||
| 2 | const Compilation = @import("Compilation.zig"); | ||
| 3 | const target_util = @import("target.zig"); | ||
| 4 | |||
| 5 | /// Used to implement the __has_feature macro. | ||
| 6 | pub fn hasFeature(comp: *Compilation, ext: []const u8) bool { | ||
| 7 | const list = .{ | ||
| 8 | .assume_nonnull = true, | ||
| 9 | .attribute_analyzer_noreturn = true, | ||
| 10 | .attribute_availability = true, | ||
| 11 | .attribute_availability_with_message = true, | ||
| 12 | .attribute_availability_app_extension = true, | ||
| 13 | .attribute_availability_with_version_underscores = true, | ||
| 14 | .attribute_availability_tvos = true, | ||
| 15 | .attribute_availability_watchos = true, | ||
| 16 | .attribute_availability_with_strict = true, | ||
| 17 | .attribute_availability_with_replacement = true, | ||
| 18 | .attribute_availability_in_templates = true, | ||
| 19 | .attribute_availability_swift = true, | ||
| 20 | .attribute_cf_returns_not_retained = true, | ||
| 21 | .attribute_cf_returns_retained = true, | ||
| 22 | .attribute_cf_returns_on_parameters = true, | ||
| 23 | .attribute_deprecated_with_message = true, | ||
| 24 | .attribute_deprecated_with_replacement = true, | ||
| 25 | .attribute_ext_vector_type = true, | ||
| 26 | .attribute_ns_returns_not_retained = true, | ||
| 27 | .attribute_ns_returns_retained = true, | ||
| 28 | .attribute_ns_consumes_self = true, | ||
| 29 | .attribute_ns_consumed = true, | ||
| 30 | .attribute_cf_consumed = true, | ||
| 31 | .attribute_overloadable = true, | ||
| 32 | .attribute_unavailable_with_message = true, | ||
| 33 | .attribute_unused_on_fields = true, | ||
| 34 | .attribute_diagnose_if_objc = true, | ||
| 35 | .blocks = false, // TODO | ||
| 36 | .c_thread_safety_attributes = true, | ||
| 37 | .enumerator_attributes = true, | ||
| 38 | .nullability = true, | ||
| 39 | .nullability_on_arrays = true, | ||
| 40 | .nullability_nullable_result = true, | ||
| 41 | .c_alignas = comp.langopts.standard.atLeast(.c11), | ||
| 42 | .c_alignof = comp.langopts.standard.atLeast(.c11), | ||
| 43 | .c_atomic = comp.langopts.standard.atLeast(.c11), | ||
| 44 | .c_generic_selections = comp.langopts.standard.atLeast(.c11), | ||
| 45 | .c_static_assert = comp.langopts.standard.atLeast(.c11), | ||
| 46 | .c_thread_local = comp.langopts.standard.atLeast(.c11) and target_util.isTlsSupported(comp.target), | ||
| 47 | }; | ||
| 48 | inline for (std.meta.fields(@TypeOf(list))) |f| { | ||
| 49 | if (std.mem.eql(u8, f.name, ext)) return @field(list, f.name); | ||
| 50 | } | ||
| 51 | return false; | ||
| 52 | } | ||
| 53 | |||
| 54 | /// Used to implement the __has_extension macro. | ||
| 55 | pub fn hasExtension(comp: *Compilation, ext: []const u8) bool { | ||
| 56 | const list = .{ | ||
| 57 | // C11 features | ||
| 58 | .c_alignas = true, | ||
| 59 | .c_alignof = true, | ||
| 60 | .c_atomic = false, // TODO | ||
| 61 | .c_generic_selections = true, | ||
| 62 | .c_static_assert = true, | ||
| 63 | .c_thread_local = target_util.isTlsSupported(comp.target), | ||
| 64 | // misc | ||
| 65 | .overloadable_unmarked = false, // TODO | ||
| 66 | .statement_attributes_with_gnu_syntax = false, // TODO | ||
| 67 | .gnu_asm = true, | ||
| 68 | .gnu_asm_goto_with_outputs = true, | ||
| 69 | .matrix_types = false, // TODO | ||
| 70 | .matrix_types_scalar_division = false, // TODO | ||
| 71 | }; | ||
| 72 | inline for (std.meta.fields(@TypeOf(list))) |f| { | ||
| 73 | if (std.mem.eql(u8, f.name, ext)) return @field(list, f.name); | ||
| 74 | } | ||
| 75 | return false; | ||
| 76 | } | ||
deps/aro/aro/number_affixes.zig created+169| ... | @@ -0,0 +1,169 @@ | ||
| 1 | const std = @import("std"); | ||
| 2 | const mem = std.mem; | ||
| 3 | |||
| 4 | pub const Prefix = enum(u8) { | ||
| 5 | binary = 2, | ||
| 6 | octal = 8, | ||
| 7 | decimal = 10, | ||
| 8 | hex = 16, | ||
| 9 | |||
| 10 | pub fn digitAllowed(prefix: Prefix, c: u8) bool { | ||
| 11 | return switch (c) { | ||
| 12 | '0', '1' => true, | ||
| 13 | '2'...'7' => prefix != .binary, | ||
| 14 | '8'...'9' => prefix == .decimal or prefix == .hex, | ||
| 15 | 'a'...'f', 'A'...'F' => prefix == .hex, | ||
| 16 | else => false, | ||
| 17 | }; | ||
| 18 | } | ||
| 19 | |||
| 20 | pub fn fromString(buf: []const u8) Prefix { | ||
| 21 | if (buf.len == 1) return .decimal; | ||
| 22 | // tokenizer enforces that first byte is a decimal digit or period | ||
| 23 | switch (buf[0]) { | ||
| 24 | '.', '1'...'9' => return .decimal, | ||
| 25 | '0' => {}, | ||
| 26 | else => unreachable, | ||
| 27 | } | ||
| 28 | switch (buf[1]) { | ||
| 29 | 'x', 'X' => return if (buf.len == 2) .decimal else .hex, | ||
| 30 | 'b', 'B' => return if (buf.len == 2) .decimal else .binary, | ||
| 31 | else => { | ||
| 32 | if (mem.indexOfAny(u8, buf, "eE.")) |_| { | ||
| 33 | // This is a decimal floating point number that happens to start with zero | ||
| 34 | return .decimal; | ||
| 35 | } else if (Suffix.fromString(buf[1..], .int)) |_| { | ||
| 36 | // This is `0` with a valid suffix | ||
| 37 | return .decimal; | ||
| 38 | } else { | ||
| 39 | return .octal; | ||
| 40 | } | ||
| 41 | }, | ||
| 42 | } | ||
| 43 | } | ||
| 44 | |||
| 45 | /// Length of this prefix as a string | ||
| 46 | pub fn stringLen(prefix: Prefix) usize { | ||
| 47 | return switch (prefix) { | ||
| 48 | .binary => 2, | ||
| 49 | .octal => 1, | ||
| 50 | .decimal => 0, | ||
| 51 | .hex => 2, | ||
| 52 | }; | ||
| 53 | } | ||
| 54 | }; | ||
| 55 | |||
| 56 | pub const Suffix = enum { | ||
| 57 | // zig fmt: off | ||
| 58 | |||
| 59 | // int and imaginary int | ||
| 60 | None, I, | ||
| 61 | |||
| 62 | // unsigned real integers | ||
| 63 | U, UL, ULL, | ||
| 64 | |||
| 65 | // unsigned imaginary integers | ||
| 66 | IU, IUL, IULL, | ||
| 67 | |||
| 68 | // long or long double, real and imaginary | ||
| 69 | L, IL, | ||
| 70 | |||
| 71 | // long long and imaginary long long | ||
| 72 | LL, ILL, | ||
| 73 | |||
| 74 | // float and imaginary float | ||
| 75 | F, IF, | ||
| 76 | |||
| 77 | // _Float16 | ||
| 78 | F16, | ||
| 79 | |||
| 80 | // Imaginary _Bitint | ||
| 81 | IWB, IUWB, | ||
| 82 | |||
| 83 | // _Bitint | ||
| 84 | WB, UWB, | ||
| 85 | |||
| 86 | // zig fmt: on | ||
| 87 | |||
| 88 | const Tuple = struct { Suffix, []const []const u8 }; | ||
| 89 | |||
| 90 | const IntSuffixes = &[_]Tuple{ | ||
| 91 | .{ .U, &.{"U"} }, | ||
| 92 | .{ .L, &.{"L"} }, | ||
| 93 | .{ .WB, &.{"WB"} }, | ||
| 94 | .{ .UL, &.{ "U", "L" } }, | ||
| 95 | .{ .UWB, &.{ "U", "WB" } }, | ||
| 96 | .{ .LL, &.{"LL"} }, | ||
| 97 | .{ .ULL, &.{ "U", "LL" } }, | ||
| 98 | |||
| 99 | .{ .I, &.{"I"} }, | ||
| 100 | |||
| 101 | .{ .IWB, &.{ "I", "WB" } }, | ||
| 102 | .{ .IU, &.{ "I", "U" } }, | ||
| 103 | .{ .IL, &.{ "I", "L" } }, | ||
| 104 | .{ .IUL, &.{ "I", "U", "L" } }, | ||
| 105 | .{ .IUWB, &.{ "I", "U", "WB" } }, | ||
| 106 | .{ .ILL, &.{ "I", "LL" } }, | ||
| 107 | .{ .IULL, &.{ "I", "U", "LL" } }, | ||
| 108 | }; | ||
| 109 | |||
| 110 | const FloatSuffixes = &[_]Tuple{ | ||
| 111 | .{ .F16, &.{"F16"} }, | ||
| 112 | .{ .F, &.{"F"} }, | ||
| 113 | .{ .L, &.{"L"} }, | ||
| 114 | |||
| 115 | .{ .I, &.{"I"} }, | ||
| 116 | .{ .IL, &.{ "I", "L" } }, | ||
| 117 | .{ .IF, &.{ "I", "F" } }, | ||
| 118 | }; | ||
| 119 | |||
| 120 | pub fn fromString(buf: []const u8, suffix_kind: enum { int, float }) ?Suffix { | ||
| 121 | if (buf.len == 0) return .None; | ||
| 122 | |||
| 123 | const suffixes = switch (suffix_kind) { | ||
| 124 | .float => FloatSuffixes, | ||
| 125 | .int => IntSuffixes, | ||
| 126 | }; | ||
| 127 | var scratch: [3]u8 = undefined; | ||
| 128 | top: for (suffixes) |candidate| { | ||
| 129 | const tag = candidate[0]; | ||
| 130 | const parts = candidate[1]; | ||
| 131 | var len: usize = 0; | ||
| 132 | for (parts) |part| len += part.len; | ||
| 133 | if (len != buf.len) continue; | ||
| 134 | |||
| 135 | for (parts) |part| { | ||
| 136 | const lower = std.ascii.lowerString(&scratch, part); | ||
| 137 | if (mem.indexOf(u8, buf, part) == null and mem.indexOf(u8, buf, lower) == null) continue :top; | ||
| 138 | } | ||
| 139 | return tag; | ||
| 140 | } | ||
| 141 | return null; | ||
| 142 | } | ||
| 143 | |||
| 144 | pub fn isImaginary(suffix: Suffix) bool { | ||
| 145 | return switch (suffix) { | ||
| 146 | .I, .IL, .IF, .IU, .IUL, .ILL, .IULL, .IWB, .IUWB => true, | ||
| 147 | .None, .L, .F16, .F, .U, .UL, .LL, .ULL, .WB, .UWB => false, | ||
| 148 | }; | ||
| 149 | } | ||
| 150 | |||
| 151 | pub fn isSignedInteger(suffix: Suffix) bool { | ||
| 152 | return switch (suffix) { | ||
| 153 | .None, .L, .LL, .I, .IL, .ILL, .WB, .IWB => true, | ||
| 154 | .U, .UL, .ULL, .IU, .IUL, .IULL, .UWB, .IUWB => false, | ||
| 155 | .F, .IF, .F16 => unreachable, | ||
| 156 | }; | ||
| 157 | } | ||
| 158 | |||
| 159 | pub fn signedness(suffix: Suffix) std.builtin.Signedness { | ||
| 160 | return if (suffix.isSignedInteger()) .signed else .unsigned; | ||
| 161 | } | ||
| 162 | |||
| 163 | pub fn isBitInt(suffix: Suffix) bool { | ||
| 164 | return switch (suffix) { | ||
| 165 | .WB, .UWB, .IWB, .IUWB => true, | ||
| 166 | else => false, | ||
| 167 | }; | ||
| 168 | } | ||
| 169 | }; | ||
deps/aro/aro/pragmas/gcc.zig created+199| ... | @@ -0,0 +1,199 @@ | ||
| 1 | const std = @import("std"); | ||
| 2 | const mem = std.mem; | ||
| 3 | const Compilation = @import("../Compilation.zig"); | ||
| 4 | const Pragma = @import("../Pragma.zig"); | ||
| 5 | const Diagnostics = @import("../Diagnostics.zig"); | ||
| 6 | const Preprocessor = @import("../Preprocessor.zig"); | ||
| 7 | const Parser = @import("../Parser.zig"); | ||
| 8 | const TokenIndex = @import("../Tree.zig").TokenIndex; | ||
| 9 | |||
| 10 | const GCC = @This(); | ||
| 11 | |||
| 12 | pragma: Pragma = .{ | ||
| 13 | .beforeParse = beforeParse, | ||
| 14 | .beforePreprocess = beforePreprocess, | ||
| 15 | .afterParse = afterParse, | ||
| 16 | .deinit = deinit, | ||
| 17 | .preprocessorHandler = preprocessorHandler, | ||
| 18 | .parserHandler = parserHandler, | ||
| 19 | .preserveTokens = preserveTokens, | ||
| 20 | }, | ||
| 21 | original_options: Diagnostics.Options = .{}, | ||
| 22 | options_stack: std.ArrayListUnmanaged(Diagnostics.Options) = .{}, | ||
| 23 | |||
| 24 | const Directive = enum { | ||
| 25 | warning, | ||
| 26 | @"error", | ||
| 27 | diagnostic, | ||
| 28 | poison, | ||
| 29 | const Diagnostics = enum { | ||
| 30 | ignored, | ||
| 31 | warning, | ||
| 32 | @"error", | ||
| 33 | fatal, | ||
| 34 | push, | ||
| 35 | pop, | ||
| 36 | }; | ||
| 37 | }; | ||
| 38 | |||
| 39 | fn beforePreprocess(pragma: *Pragma, comp: *Compilation) void { | ||
| 40 | var self = @fieldParentPtr(GCC, "pragma", pragma); | ||
| 41 | self.original_options = comp.diagnostics.options; | ||
| 42 | } | ||
| 43 | |||
| 44 | fn beforeParse(pragma: *Pragma, comp: *Compilation) void { | ||
| 45 | var self = @fieldParentPtr(GCC, "pragma", pragma); | ||
| 46 | comp.diagnostics.options = self.original_options; | ||
| 47 | self.options_stack.items.len = 0; | ||
| 48 | } | ||
| 49 | |||
| 50 | fn afterParse(pragma: *Pragma, comp: *Compilation) void { | ||
| 51 | var self = @fieldParentPtr(GCC, "pragma", pragma); | ||
| 52 | comp.diagnostics.options = self.original_options; | ||
| 53 | self.options_stack.items.len = 0; | ||
| 54 | } | ||
| 55 | |||
| 56 | pub fn init(allocator: mem.Allocator) !*Pragma { | ||
| 57 | var gcc = try allocator.create(GCC); | ||
| 58 | gcc.* = .{}; | ||
| 59 | return &gcc.pragma; | ||
| 60 | } | ||
| 61 | |||
| 62 | fn deinit(pragma: *Pragma, comp: *Compilation) void { | ||
| 63 | var self = @fieldParentPtr(GCC, "pragma", pragma); | ||
| 64 | self.options_stack.deinit(comp.gpa); | ||
| 65 | comp.gpa.destroy(self); | ||
| 66 | } | ||
| 67 | |||
| 68 | fn diagnosticHandler(self: *GCC, pp: *Preprocessor, start_idx: TokenIndex) Pragma.Error!void { | ||
| 69 | const diagnostic_tok = pp.tokens.get(start_idx); | ||
| 70 | if (diagnostic_tok.id == .nl) return; | ||
| 71 | |||
| 72 | const diagnostic = std.meta.stringToEnum(Directive.Diagnostics, pp.expandedSlice(diagnostic_tok)) orelse | ||
| 73 | return error.UnknownPragma; | ||
| 74 | |||
| 75 | switch (diagnostic) { | ||
| 76 | .ignored, .warning, .@"error", .fatal => { | ||
| 77 | const str = Pragma.pasteTokens(pp, start_idx + 1) catch |err| switch (err) { | ||
| 78 | error.ExpectedStringLiteral => { | ||
| 79 | return pp.comp.addDiagnostic(.{ | ||
| 80 | .tag = .pragma_requires_string_literal, | ||
| 81 | .loc = diagnostic_tok.loc, | ||
| 82 | .extra = .{ .str = "GCC diagnostic" }, | ||
| 83 | }, diagnostic_tok.expansionSlice()); | ||
| 84 | }, | ||
| 85 | else => |e| return e, | ||
| 86 | }; | ||
| 87 | if (!mem.startsWith(u8, str, "-W")) { | ||
| 88 | const next = pp.tokens.get(start_idx + 1); | ||
| 89 | return pp.comp.addDiagnostic(.{ | ||
| 90 | .tag = .malformed_warning_check, | ||
| 91 | .loc = next.loc, | ||
| 92 | .extra = .{ .str = "GCC diagnostic" }, | ||
| 93 | }, next.expansionSlice()); | ||
| 94 | } | ||
| 95 | const new_kind: Diagnostics.Kind = switch (diagnostic) { | ||
| 96 | .ignored => .off, | ||
| 97 | .warning => .warning, | ||
| 98 | .@"error" => .@"error", | ||
| 99 | .fatal => .@"fatal error", | ||
| 100 | else => unreachable, | ||
| 101 | }; | ||
| 102 | |||
| 103 | try pp.comp.diagnostics.set(str[2..], new_kind); | ||
| 104 | }, | ||
| 105 | .push => try self.options_stack.append(pp.comp.gpa, pp.comp.diagnostics.options), | ||
| 106 | .pop => pp.comp.diagnostics.options = self.options_stack.popOrNull() orelse self.original_options, | ||
| 107 | } | ||
| 108 | } | ||
| 109 | |||
| 110 | fn preprocessorHandler(pragma: *Pragma, pp: *Preprocessor, start_idx: TokenIndex) Pragma.Error!void { | ||
| 111 | var self = @fieldParentPtr(GCC, "pragma", pragma); | ||
| 112 | const directive_tok = pp.tokens.get(start_idx + 1); | ||
| 113 | if (directive_tok.id == .nl) return; | ||
| 114 | |||
| 115 | const gcc_pragma = std.meta.stringToEnum(Directive, pp.expandedSlice(directive_tok)) orelse | ||
| 116 | return pp.comp.addDiagnostic(.{ | ||
| 117 | .tag = .unknown_gcc_pragma, | ||
| 118 | .loc = directive_tok.loc, | ||
| 119 | }, directive_tok.expansionSlice()); | ||
| 120 | |||
| 121 | switch (gcc_pragma) { | ||
| 122 | .warning, .@"error" => { | ||
| 123 | const text = Pragma.pasteTokens(pp, start_idx + 2) catch |err| switch (err) { | ||
| 124 | error.ExpectedStringLiteral => { | ||
| 125 | return pp.comp.addDiagnostic(.{ | ||
| 126 | .tag = .pragma_requires_string_literal, | ||
| 127 | .loc = directive_tok.loc, | ||
| 128 | .extra = .{ .str = @tagName(gcc_pragma) }, | ||
| 129 | }, directive_tok.expansionSlice()); | ||
| 130 | }, | ||
| 131 | else => |e| return e, | ||
| 132 | }; | ||
| 133 | const extra = Diagnostics.Message.Extra{ .str = try pp.comp.diagnostics.arena.allocator().dupe(u8, text) }; | ||
| 134 | const diagnostic_tag: Diagnostics.Tag = if (gcc_pragma == .warning) .pragma_warning_message else .pragma_error_message; | ||
| 135 | return pp.comp.addDiagnostic( | ||
| 136 | .{ .tag = diagnostic_tag, .loc = directive_tok.loc, .extra = extra }, | ||
| 137 | directive_tok.expansionSlice(), | ||
| 138 | ); | ||
| 139 | }, | ||
| 140 | .diagnostic => return self.diagnosticHandler(pp, start_idx + 2) catch |err| switch (err) { | ||
| 141 | error.UnknownPragma => { | ||
| 142 | const tok = pp.tokens.get(start_idx + 2); | ||
| 143 | return pp.comp.addDiagnostic(.{ | ||
| 144 | .tag = .unknown_gcc_pragma_directive, | ||
| 145 | .loc = tok.loc, | ||
| 146 | }, tok.expansionSlice()); | ||
| 147 | }, | ||
| 148 | else => |e| return e, | ||
| 149 | }, | ||
| 150 | .poison => { | ||
| 151 | var i: usize = 2; | ||
| 152 | while (true) : (i += 1) { | ||
| 153 | const tok = pp.tokens.get(start_idx + i); | ||
| 154 | if (tok.id == .nl) break; | ||
| 155 | |||
| 156 | if (!tok.id.isMacroIdentifier()) { | ||
| 157 | return pp.comp.addDiagnostic(.{ | ||
| 158 | .tag = .pragma_poison_identifier, | ||
| 159 | .loc = tok.loc, | ||
| 160 | }, tok.expansionSlice()); | ||
| 161 | } | ||
| 162 | const str = pp.expandedSlice(tok); | ||
| 163 | if (pp.defines.get(str) != null) { | ||
| 164 | try pp.comp.addDiagnostic(.{ | ||
| 165 | .tag = .pragma_poison_macro, | ||
| 166 | .loc = tok.loc, | ||
| 167 | }, tok.expansionSlice()); | ||
| 168 | } | ||
| 169 | try pp.poisoned_identifiers.put(str, {}); | ||
| 170 | } | ||
| 171 | return; | ||
| 172 | }, | ||
| 173 | } | ||
| 174 | } | ||
| 175 | |||
| 176 | fn parserHandler(pragma: *Pragma, p: *Parser, start_idx: TokenIndex) Compilation.Error!void { | ||
| 177 | var self = @fieldParentPtr(GCC, "pragma", pragma); | ||
| 178 | const directive_tok = p.pp.tokens.get(start_idx + 1); | ||
| 179 | if (directive_tok.id == .nl) return; | ||
| 180 | const name = p.pp.expandedSlice(directive_tok); | ||
| 181 | if (mem.eql(u8, name, "diagnostic")) { | ||
| 182 | return self.diagnosticHandler(p.pp, start_idx + 2) catch |err| switch (err) { | ||
| 183 | error.UnknownPragma => {}, // handled during preprocessing | ||
| 184 | error.StopPreprocessing => unreachable, // Only used by #pragma once | ||
| 185 | else => |e| return e, | ||
| 186 | }; | ||
| 187 | } | ||
| 188 | } | ||
| 189 | |||
| 190 | fn preserveTokens(_: *Pragma, pp: *Preprocessor, start_idx: TokenIndex) bool { | ||
| 191 | const next = pp.tokens.get(start_idx + 1); | ||
| 192 | if (next.id != .nl) { | ||
| 193 | const name = pp.expandedSlice(next); | ||
| 194 | if (mem.eql(u8, name, "poison")) { | ||
| 195 | return false; | ||
| 196 | } | ||
| 197 | } | ||
| 198 | return true; | ||
| 199 | } | ||
deps/aro/aro/pragmas/message.zig created+50| ... | @@ -0,0 +1,50 @@ | ||
| 1 | const std = @import("std"); | ||
| 2 | const mem = std.mem; | ||
| 3 | const Compilation = @import("../Compilation.zig"); | ||
| 4 | const Pragma = @import("../Pragma.zig"); | ||
| 5 | const Diagnostics = @import("../Diagnostics.zig"); | ||
| 6 | const Preprocessor = @import("../Preprocessor.zig"); | ||
| 7 | const Parser = @import("../Parser.zig"); | ||
| 8 | const TokenIndex = @import("../Tree.zig").TokenIndex; | ||
| 9 | const Source = @import("../Source.zig"); | ||
| 10 | |||
| 11 | const Message = @This(); | ||
| 12 | |||
| 13 | pragma: Pragma = .{ | ||
| 14 | .deinit = deinit, | ||
| 15 | .preprocessorHandler = preprocessorHandler, | ||
| 16 | }, | ||
| 17 | |||
| 18 | pub fn init(allocator: mem.Allocator) !*Pragma { | ||
| 19 | var once = try allocator.create(Message); | ||
| 20 | once.* = .{}; | ||
| 21 | return &once.pragma; | ||
| 22 | } | ||
| 23 | |||
| 24 | fn deinit(pragma: *Pragma, comp: *Compilation) void { | ||
| 25 | const self = @fieldParentPtr(Message, "pragma", pragma); | ||
| 26 | comp.gpa.destroy(self); | ||
| 27 | } | ||
| 28 | |||
| 29 | fn preprocessorHandler(_: *Pragma, pp: *Preprocessor, start_idx: TokenIndex) Pragma.Error!void { | ||
| 30 | const message_tok = pp.tokens.get(start_idx); | ||
| 31 | const message_expansion_locs = message_tok.expansionSlice(); | ||
| 32 | |||
| 33 | const str = Pragma.pasteTokens(pp, start_idx + 1) catch |err| switch (err) { | ||
| 34 | error.ExpectedStringLiteral => { | ||
| 35 | return pp.comp.addDiagnostic(.{ | ||
| 36 | .tag = .pragma_requires_string_literal, | ||
| 37 | .loc = message_tok.loc, | ||
| 38 | .extra = .{ .str = "message" }, | ||
| 39 | }, message_expansion_locs); | ||
| 40 | }, | ||
| 41 | else => |e| return e, | ||
| 42 | }; | ||
| 43 | |||
| 44 | const loc = if (message_expansion_locs.len != 0) | ||
| 45 | message_expansion_locs[message_expansion_locs.len - 1] | ||
| 46 | else | ||
| 47 | message_tok.loc; | ||
| 48 | const extra = Diagnostics.Message.Extra{ .str = try pp.comp.diagnostics.arena.allocator().dupe(u8, str) }; | ||
| 49 | return pp.comp.addDiagnostic(.{ .tag = .pragma_message, .loc = loc, .extra = extra }, &.{}); | ||
| 50 | } | ||
deps/aro/aro/pragmas/once.zig created+56| ... | @@ -0,0 +1,56 @@ | ||
| 1 | const std = @import("std"); | ||
| 2 | const mem = std.mem; | ||
| 3 | const Compilation = @import("../Compilation.zig"); | ||
| 4 | const Pragma = @import("../Pragma.zig"); | ||
| 5 | const Diagnostics = @import("../Diagnostics.zig"); | ||
| 6 | const Preprocessor = @import("../Preprocessor.zig"); | ||
| 7 | const Parser = @import("../Parser.zig"); | ||
| 8 | const TokenIndex = @import("../Tree.zig").TokenIndex; | ||
| 9 | const Source = @import("../Source.zig"); | ||
| 10 | |||
| 11 | const Once = @This(); | ||
| 12 | |||
| 13 | pragma: Pragma = .{ | ||
| 14 | .afterParse = afterParse, | ||
| 15 | .deinit = deinit, | ||
| 16 | .preprocessorHandler = preprocessorHandler, | ||
| 17 | }, | ||
| 18 | pragma_once: std.AutoHashMap(Source.Id, void), | ||
| 19 | preprocess_count: u32 = 0, | ||
| 20 | |||
| 21 | pub fn init(allocator: mem.Allocator) !*Pragma { | ||
| 22 | var once = try allocator.create(Once); | ||
| 23 | once.* = .{ | ||
| 24 | .pragma_once = std.AutoHashMap(Source.Id, void).init(allocator), | ||
| 25 | }; | ||
| 26 | return &once.pragma; | ||
| 27 | } | ||
| 28 | |||
| 29 | fn afterParse(pragma: *Pragma, _: *Compilation) void { | ||
| 30 | var self = @fieldParentPtr(Once, "pragma", pragma); | ||
| 31 | self.pragma_once.clearRetainingCapacity(); | ||
| 32 | } | ||
| 33 | |||
| 34 | fn deinit(pragma: *Pragma, comp: *Compilation) void { | ||
| 35 | var self = @fieldParentPtr(Once, "pragma", pragma); | ||
| 36 | self.pragma_once.deinit(); | ||
| 37 | comp.gpa.destroy(self); | ||
| 38 | } | ||
| 39 | |||
| 40 | fn preprocessorHandler(pragma: *Pragma, pp: *Preprocessor, start_idx: TokenIndex) Pragma.Error!void { | ||
| 41 | var self = @fieldParentPtr(Once, "pragma", pragma); | ||
| 42 | const name_tok = pp.tokens.get(start_idx); | ||
| 43 | const next = pp.tokens.get(start_idx + 1); | ||
| 44 | if (next.id != .nl) { | ||
| 45 | try pp.comp.addDiagnostic(.{ | ||
| 46 | .tag = .extra_tokens_directive_end, | ||
| 47 | .loc = name_tok.loc, | ||
| 48 | }, next.expansionSlice()); | ||
| 49 | } | ||
| 50 | const seen = self.preprocess_count == pp.preprocess_count; | ||
| 51 | const prev = try self.pragma_once.fetchPut(name_tok.loc.id, {}); | ||
| 52 | if (prev != null and !seen) { | ||
| 53 | return error.StopPreprocessing; | ||
| 54 | } | ||
| 55 | self.preprocess_count = pp.preprocess_count; | ||
| 56 | } | ||
deps/aro/aro/pragmas/pack.zig created+164| ... | @@ -0,0 +1,164 @@ | ||
| 1 | const std = @import("std"); | ||
| 2 | const mem = std.mem; | ||
| 3 | const Compilation = @import("../Compilation.zig"); | ||
| 4 | const Pragma = @import("../Pragma.zig"); | ||
| 5 | const Diagnostics = @import("../Diagnostics.zig"); | ||
| 6 | const Preprocessor = @import("../Preprocessor.zig"); | ||
| 7 | const Parser = @import("../Parser.zig"); | ||
| 8 | const Tree = @import("../Tree.zig"); | ||
| 9 | const TokenIndex = Tree.TokenIndex; | ||
| 10 | |||
| 11 | const Pack = @This(); | ||
| 12 | |||
| 13 | pragma: Pragma = .{ | ||
| 14 | .deinit = deinit, | ||
| 15 | .parserHandler = parserHandler, | ||
| 16 | .preserveTokens = preserveTokens, | ||
| 17 | }, | ||
| 18 | stack: std.ArrayListUnmanaged(struct { label: []const u8, val: u8 }) = .{}, | ||
| 19 | |||
| 20 | pub fn init(allocator: mem.Allocator) !*Pragma { | ||
| 21 | var pack = try allocator.create(Pack); | ||
| 22 | pack.* = .{}; | ||
| 23 | return &pack.pragma; | ||
| 24 | } | ||
| 25 | |||
| 26 | fn deinit(pragma: *Pragma, comp: *Compilation) void { | ||
| 27 | var self = @fieldParentPtr(Pack, "pragma", pragma); | ||
| 28 | self.stack.deinit(comp.gpa); | ||
| 29 | comp.gpa.destroy(self); | ||
| 30 | } | ||
| 31 | |||
| 32 | fn parserHandler(pragma: *Pragma, p: *Parser, start_idx: TokenIndex) Compilation.Error!void { | ||
| 33 | var pack = @fieldParentPtr(Pack, "pragma", pragma); | ||
| 34 | var idx = start_idx + 1; | ||
| 35 | const l_paren = p.pp.tokens.get(idx); | ||
| 36 | if (l_paren.id != .l_paren) { | ||
| 37 | return p.comp.addDiagnostic(.{ | ||
| 38 | .tag = .pragma_pack_lparen, | ||
| 39 | .loc = l_paren.loc, | ||
| 40 | }, l_paren.expansionSlice()); | ||
| 41 | } | ||
| 42 | idx += 1; | ||
| 43 | |||
| 44 | // TODO -fapple-pragma-pack -fxl-pragma-pack | ||
| 45 | const apple_or_xl = false; | ||
| 46 | const tok_ids = p.pp.tokens.items(.id); | ||
| 47 | const arg = idx; | ||
| 48 | switch (tok_ids[arg]) { | ||
| 49 | .identifier => { | ||
| 50 | idx += 1; | ||
| 51 | const Action = enum { | ||
| 52 | show, | ||
| 53 | push, | ||
| 54 | pop, | ||
| 55 | }; | ||
| 56 | const action = std.meta.stringToEnum(Action, p.tokSlice(arg)) orelse { | ||
| 57 | return p.errTok(.pragma_pack_unknown_action, arg); | ||
| 58 | }; | ||
| 59 | switch (action) { | ||
| 60 | .show => { | ||
| 61 | try p.errExtra(.pragma_pack_show, arg, .{ .unsigned = p.pragma_pack orelse 8 }); | ||
| 62 | }, | ||
| 63 | .push, .pop => { | ||
| 64 | var new_val: ?u8 = null; | ||
| 65 | var label: ?[]const u8 = null; | ||
| 66 | if (tok_ids[idx] == .comma) { | ||
| 67 | idx += 1; | ||
| 68 | const next = idx; | ||
| 69 | idx += 1; | ||
| 70 | switch (tok_ids[next]) { | ||
| 71 | .pp_num => new_val = (try packInt(p, next)) orelse return, | ||
| 72 | .identifier => { | ||
| 73 | label = p.tokSlice(next); | ||
| 74 | if (tok_ids[idx] == .comma) { | ||
| 75 | idx += 1; | ||
| 76 | const int = idx; | ||
| 77 | idx += 1; | ||
| 78 | if (tok_ids[int] != .pp_num) return p.errTok(.pragma_pack_int_ident, int); | ||
| 79 | new_val = (try packInt(p, int)) orelse return; | ||
| 80 | } | ||
| 81 | }, | ||
| 82 | else => return p.errTok(.pragma_pack_int_ident, next), | ||
| 83 | } | ||
| 84 | } | ||
| 85 | if (action == .push) { | ||
| 86 | try pack.stack.append(p.gpa, .{ .label = label orelse "", .val = p.pragma_pack orelse 8 }); | ||
| 87 | } else { | ||
| 88 | pack.pop(p, label); | ||
| 89 | if (new_val != null) { | ||
| 90 | try p.errTok(.pragma_pack_undefined_pop, arg); | ||
| 91 | } else if (pack.stack.items.len == 0) { | ||
| 92 | try p.errTok(.pragma_pack_empty_stack, arg); | ||
| 93 | } | ||
| 94 | } | ||
| 95 | if (new_val) |some| { | ||
| 96 | p.pragma_pack = some; | ||
| 97 | } | ||
| 98 | }, | ||
| 99 | } | ||
| 100 | }, | ||
| 101 | .r_paren => if (apple_or_xl) { | ||
| 102 | pack.pop(p, null); | ||
| 103 | } else { | ||
| 104 | p.pragma_pack = null; | ||
| 105 | }, | ||
| 106 | .pp_num => { | ||
| 107 | const new_val = (try packInt(p, arg)) orelse return; | ||
| 108 | idx += 1; | ||
| 109 | if (apple_or_xl) { | ||
| 110 | try pack.stack.append(p.gpa, .{ .label = "", .val = p.pragma_pack }); | ||
| 111 | } | ||
| 112 | p.pragma_pack = new_val; | ||
| 113 | }, | ||
| 114 | else => {}, | ||
| 115 | } | ||
| 116 | |||
| 117 | if (tok_ids[idx] != .r_paren) { | ||
| 118 | return p.errTok(.pragma_pack_rparen, idx); | ||
| 119 | } | ||
| 120 | } | ||
| 121 | |||
| 122 | fn packInt(p: *Parser, tok_i: TokenIndex) Compilation.Error!?u8 { | ||
| 123 | const res = p.parseNumberToken(tok_i) catch |err| switch (err) { | ||
| 124 | error.ParsingFailed => { | ||
| 125 | try p.errTok(.pragma_pack_int, tok_i); | ||
| 126 | return null; | ||
| 127 | }, | ||
| 128 | else => |e| return e, | ||
| 129 | }; | ||
| 130 | const int = res.val.toInt(u64, p.comp) orelse 99; | ||
| 131 | switch (int) { | ||
| 132 | 1, 2, 4, 8, 16 => return @intCast(int), | ||
| 133 | else => { | ||
| 134 | try p.errTok(.pragma_pack_int, tok_i); | ||
| 135 | return null; | ||
| 136 | }, | ||
| 137 | } | ||
| 138 | } | ||
| 139 | |||
| 140 | fn pop(pack: *Pack, p: *Parser, maybe_label: ?[]const u8) void { | ||
| 141 | if (maybe_label) |label| { | ||
| 142 | var i = pack.stack.items.len; | ||
| 143 | while (i > 0) { | ||
| 144 | i -= 1; | ||
| 145 | if (std.mem.eql(u8, pack.stack.items[i].label, label)) { | ||
| 146 | const prev = pack.stack.orderedRemove(i); | ||
| 147 | p.pragma_pack = prev.val; | ||
| 148 | return; | ||
| 149 | } | ||
| 150 | } | ||
| 151 | } else { | ||
| 152 | const prev = pack.stack.popOrNull() orelse { | ||
| 153 | p.pragma_pack = 2; | ||
| 154 | return; | ||
| 155 | }; | ||
| 156 | p.pragma_pack = prev.val; | ||
| 157 | } | ||
| 158 | } | ||
| 159 | |||
| 160 | fn preserveTokens(_: *Pragma, pp: *Preprocessor, start_idx: TokenIndex) bool { | ||
| 161 | _ = pp; | ||
| 162 | _ = start_idx; | ||
| 163 | return true; | ||
| 164 | } | ||
deps/aro/aro/record_layout.zig created+671| ... | @@ -0,0 +1,671 @@ | ||
| 1 | //! Record layout code adapted from https://github.com/mahkoh/repr-c | ||
| 2 | //! Licensed under MIT license: https://github.com/mahkoh/repr-c/tree/master/repc/facade | ||
| 3 | |||
| 4 | const std = @import("std"); | ||
| 5 | const Type = @import("Type.zig"); | ||
| 6 | const Attribute = @import("Attribute.zig"); | ||
| 7 | const Compilation = @import("Compilation.zig"); | ||
| 8 | const Parser = @import("Parser.zig"); | ||
| 9 | const Record = Type.Record; | ||
| 10 | const Field = Record.Field; | ||
| 11 | const TypeLayout = Type.TypeLayout; | ||
| 12 | const FieldLayout = Type.FieldLayout; | ||
| 13 | const target_util = @import("target.zig"); | ||
| 14 | |||
| 15 | const BITS_PER_BYTE = 8; | ||
| 16 | |||
| 17 | const OngoingBitfield = struct { | ||
| 18 | size_bits: u64, | ||
| 19 | unused_size_bits: u64, | ||
| 20 | }; | ||
| 21 | |||
| 22 | const SysVContext = struct { | ||
| 23 | /// Does the record have an __attribute__((packed)) annotation. | ||
| 24 | attr_packed: bool, | ||
| 25 | /// The value of #pragma pack(N) at the type level if any. | ||
| 26 | max_field_align_bits: ?u64, | ||
| 27 | /// The alignment of this record. | ||
| 28 | aligned_bits: u32, | ||
| 29 | is_union: bool, | ||
| 30 | /// The size of the record. This might not be a multiple of 8 if the record contains bit-fields. | ||
| 31 | /// For structs, this is also the offset of the first bit after the last field. | ||
| 32 | size_bits: u64, | ||
| 33 | /// non-null if the previous field was a non-zero-sized bit-field. Only used by MinGW. | ||
| 34 | ongoing_bitfield: ?OngoingBitfield, | ||
| 35 | |||
| 36 | comp: *const Compilation, | ||
| 37 | |||
| 38 | fn init(ty: Type, comp: *const Compilation, pragma_pack: ?u8) SysVContext { | ||
| 39 | var pack_value: ?u64 = null; | ||
| 40 | if (pragma_pack) |pak| { | ||
| 41 | pack_value = pak * BITS_PER_BYTE; | ||
| 42 | } | ||
| 43 | var req_align: u29 = BITS_PER_BYTE; | ||
| 44 | if (ty.requestedAlignment(comp)) |aln| { | ||
| 45 | req_align = aln * BITS_PER_BYTE; | ||
| 46 | } | ||
| 47 | return SysVContext{ | ||
| 48 | .attr_packed = ty.hasAttribute(.@"packed"), | ||
| 49 | .max_field_align_bits = pack_value, | ||
| 50 | .aligned_bits = req_align, | ||
| 51 | .is_union = ty.is(.@"union"), | ||
| 52 | .size_bits = 0, | ||
| 53 | .comp = comp, | ||
| 54 | .ongoing_bitfield = null, | ||
| 55 | }; | ||
| 56 | } | ||
| 57 | |||
| 58 | fn layoutFields(self: *SysVContext, rec: *const Record) void { | ||
| 59 | for (rec.fields, 0..) |*fld, fld_indx| { | ||
| 60 | if (fld.ty.specifier == .invalid) continue; | ||
| 61 | const type_layout = computeLayout(fld.ty, self.comp); | ||
| 62 | |||
| 63 | var field_attrs: ?[]const Attribute = null; | ||
| 64 | if (rec.field_attributes) |attrs| { | ||
| 65 | field_attrs = attrs[fld_indx]; | ||
| 66 | } | ||
| 67 | if (self.comp.target.isMinGW()) { | ||
| 68 | fld.layout = self.layoutMinGWField(fld, field_attrs, type_layout); | ||
| 69 | } else { | ||
| 70 | if (fld.isRegularField()) { | ||
| 71 | fld.layout = self.layoutRegularField(field_attrs, type_layout); | ||
| 72 | } else { | ||
| 73 | fld.layout = self.layoutBitField(field_attrs, type_layout, fld.isNamed(), fld.specifiedBitWidth()); | ||
| 74 | } | ||
| 75 | } | ||
| 76 | } | ||
| 77 | } | ||
| 78 | |||
| 79 | /// On MinGW the alignment of the field is calculated in the usual way except that the alignment of | ||
| 80 | /// the underlying type is ignored in three cases | ||
| 81 | /// - the field is packed | ||
| 82 | /// - the field is a bit-field and the previous field was a non-zero-sized bit-field with the same type size | ||
| 83 | /// - the field is a zero-sized bit-field and the previous field was not a non-zero-sized bit-field | ||
| 84 | /// See test case 0068. | ||
| 85 | fn ignoreTypeAlignment(is_attr_packed: bool, bit_width: ?u32, ongoing_bitfield: ?OngoingBitfield, fld_layout: TypeLayout) bool { | ||
| 86 | if (is_attr_packed) return true; | ||
| 87 | if (bit_width) |width| { | ||
| 88 | if (ongoing_bitfield) |ongoing| { | ||
| 89 | if (ongoing.size_bits == fld_layout.size_bits) return true; | ||
| 90 | } else { | ||
| 91 | if (width == 0) return true; | ||
| 92 | } | ||
| 93 | } | ||
| 94 | return false; | ||
| 95 | } | ||
| 96 | |||
| 97 | fn layoutMinGWField( | ||
| 98 | self: *SysVContext, | ||
| 99 | field: *const Field, | ||
| 100 | field_attrs: ?[]const Attribute, | ||
| 101 | field_layout: TypeLayout, | ||
| 102 | ) FieldLayout { | ||
| 103 | const annotation_alignment_bits = BITS_PER_BYTE * (Type.annotationAlignment(self.comp, field_attrs) orelse 1); | ||
| 104 | const is_attr_packed = self.attr_packed or isPacked(field_attrs); | ||
| 105 | const ignore_type_alignment = ignoreTypeAlignment(is_attr_packed, field.bit_width, self.ongoing_bitfield, field_layout); | ||
| 106 | |||
| 107 | var field_alignment_bits: u64 = field_layout.field_alignment_bits; | ||
| 108 | if (ignore_type_alignment) { | ||
| 109 | field_alignment_bits = BITS_PER_BYTE; | ||
| 110 | } | ||
| 111 | field_alignment_bits = @max(field_alignment_bits, annotation_alignment_bits); | ||
| 112 | if (self.max_field_align_bits) |bits| { | ||
| 113 | field_alignment_bits = @min(field_alignment_bits, bits); | ||
| 114 | } | ||
| 115 | |||
| 116 | // The field affects the record alignment in one of three cases | ||
| 117 | // - the field is a regular field | ||
| 118 | // - the field is a zero-width bit-field following a non-zero-width bit-field | ||
| 119 | // - the field is a non-zero-width bit-field and not packed. | ||
| 120 | // See test case 0069. | ||
| 121 | const update_record_alignment = | ||
| 122 | field.isRegularField() or | ||
| 123 | (field.specifiedBitWidth() == 0 and self.ongoing_bitfield != null) or | ||
| 124 | (field.specifiedBitWidth() != 0 and !is_attr_packed); | ||
| 125 | |||
| 126 | // If a field affects the alignment of a record, the alignment is calculated in the | ||
| 127 | // usual way except that __attribute__((packed)) is ignored on a zero-width bit-field. | ||
| 128 | // See test case 0068. | ||
| 129 | if (update_record_alignment) { | ||
| 130 | var ty_alignment_bits = field_layout.field_alignment_bits; | ||
| 131 | if (is_attr_packed and (field.isRegularField() or field.specifiedBitWidth() != 0)) { | ||
| 132 | ty_alignment_bits = BITS_PER_BYTE; | ||
| 133 | } | ||
| 134 | ty_alignment_bits = @max(ty_alignment_bits, annotation_alignment_bits); | ||
| 135 | if (self.max_field_align_bits) |bits| { | ||
| 136 | ty_alignment_bits = @intCast(@min(ty_alignment_bits, bits)); | ||
| 137 | } | ||
| 138 | self.aligned_bits = @max(self.aligned_bits, ty_alignment_bits); | ||
| 139 | } | ||
| 140 | |||
| 141 | // NOTE: ty_alignment_bits and field_alignment_bits are different in the following case: | ||
| 142 | // Y = { size: 64, alignment: 64 }struct { | ||
| 143 | // { offset: 0, size: 1 }c { size: 8, alignment: 8 }char:1, | ||
| 144 | // @attr_packed _ { size: 64, alignment: 64 }long long:0, | ||
| 145 | // { offset: 8, size: 8 }d { size: 8, alignment: 8 }char, | ||
| 146 | // } | ||
| 147 | if (field.isRegularField()) { | ||
| 148 | return self.layoutRegularFieldMinGW(field_layout.size_bits, field_alignment_bits); | ||
| 149 | } else { | ||
| 150 | return self.layoutBitFieldMinGW(field_layout.size_bits, field_alignment_bits, field.isNamed(), field.specifiedBitWidth()); | ||
| 151 | } | ||
| 152 | } | ||
| 153 | |||
| 154 | fn layoutBitFieldMinGW( | ||
| 155 | self: *SysVContext, | ||
| 156 | ty_size_bits: u64, | ||
| 157 | field_alignment_bits: u64, | ||
| 158 | is_named: bool, | ||
| 159 | width: u64, | ||
| 160 | ) FieldLayout { | ||
| 161 | std.debug.assert(width <= ty_size_bits); // validated in parser | ||
| 162 | |||
| 163 | // In a union, the size of the underlying type does not affect the size of the union. | ||
| 164 | // See test case 0070. | ||
| 165 | if (self.is_union) { | ||
| 166 | self.size_bits = @max(self.size_bits, width); | ||
| 167 | if (!is_named) return .{}; | ||
| 168 | return .{ | ||
| 169 | .offset_bits = 0, | ||
| 170 | .size_bits = width, | ||
| 171 | }; | ||
| 172 | } | ||
| 173 | if (width == 0) { | ||
| 174 | self.ongoing_bitfield = null; | ||
| 175 | } else { | ||
| 176 | // If there is an ongoing bit-field in a struct whose underlying type has the same size and | ||
| 177 | // if there is enough space left to place this bit-field, then this bit-field is placed in | ||
| 178 | // the ongoing bit-field and the size of the struct is not affected by this | ||
| 179 | // bit-field. See test case 0037. | ||
| 180 | if (self.ongoing_bitfield) |*ongoing| { | ||
| 181 | if (ongoing.size_bits == ty_size_bits and ongoing.unused_size_bits >= width) { | ||
| 182 | const offset_bits = self.size_bits - ongoing.unused_size_bits; | ||
| 183 | ongoing.unused_size_bits -= width; | ||
| 184 | if (!is_named) return .{}; | ||
| 185 | return .{ | ||
| 186 | .offset_bits = offset_bits, | ||
| 187 | .size_bits = width, | ||
| 188 | }; | ||
| 189 | } | ||
| 190 | } | ||
| 191 | // Otherwise this field is part of a new ongoing bit-field. | ||
| 192 | self.ongoing_bitfield = .{ | ||
| 193 | .size_bits = ty_size_bits, | ||
| 194 | .unused_size_bits = ty_size_bits - width, | ||
| 195 | }; | ||
| 196 | } | ||
| 197 | const offset_bits = std.mem.alignForward(u64, self.size_bits, field_alignment_bits); | ||
| 198 | self.size_bits = if (width == 0) offset_bits else offset_bits + ty_size_bits; | ||
| 199 | if (!is_named) return .{}; | ||
| 200 | return .{ | ||
| 201 | .offset_bits = offset_bits, | ||
| 202 | .size_bits = width, | ||
| 203 | }; | ||
| 204 | } | ||
| 205 | |||
| 206 | fn layoutRegularFieldMinGW( | ||
| 207 | self: *SysVContext, | ||
| 208 | ty_size_bits: u64, | ||
| 209 | field_alignment_bits: u64, | ||
| 210 | ) FieldLayout { | ||
| 211 | self.ongoing_bitfield = null; | ||
| 212 | // A struct field starts at the next offset in the struct that is properly | ||
| 213 | // aligned with respect to the start of the struct. See test case 0033. | ||
| 214 | // A union field always starts at offset 0. | ||
| 215 | const offset_bits = if (self.is_union) 0 else std.mem.alignForward(u64, self.size_bits, field_alignment_bits); | ||
| 216 | |||
| 217 | // Set the size of the record to the maximum of the current size and the end of | ||
| 218 | // the field. See test case 0034. | ||
| 219 | self.size_bits = @max(self.size_bits, offset_bits + ty_size_bits); | ||
| 220 | |||
| 221 | return .{ | ||
| 222 | .offset_bits = offset_bits, | ||
| 223 | .size_bits = ty_size_bits, | ||
| 224 | }; | ||
| 225 | } | ||
| 226 | |||
| 227 | fn layoutRegularField( | ||
| 228 | self: *SysVContext, | ||
| 229 | fld_attrs: ?[]const Attribute, | ||
| 230 | fld_layout: TypeLayout, | ||
| 231 | ) FieldLayout { | ||
| 232 | var fld_align_bits = fld_layout.field_alignment_bits; | ||
| 233 | |||
| 234 | // If the struct or the field is packed, then the alignment of the underlying type is | ||
| 235 | // ignored. See test case 0084. | ||
| 236 | if (self.attr_packed or isPacked(fld_attrs)) { | ||
| 237 | fld_align_bits = BITS_PER_BYTE; | ||
| 238 | } | ||
| 239 | |||
| 240 | // The field alignment can be increased by __attribute__((aligned)) annotations on the | ||
| 241 | // field. See test case 0085. | ||
| 242 | if (Type.annotationAlignment(self.comp, fld_attrs)) |anno| { | ||
| 243 | fld_align_bits = @max(fld_align_bits, anno * BITS_PER_BYTE); | ||
| 244 | } | ||
| 245 | |||
| 246 | // #pragma pack takes precedence over all other attributes. See test cases 0084 and | ||
| 247 | // 0085. | ||
| 248 | if (self.max_field_align_bits) |req_bits| { | ||
| 249 | fld_align_bits = @intCast(@min(fld_align_bits, req_bits)); | ||
| 250 | } | ||
| 251 | |||
| 252 | // A struct field starts at the next offset in the struct that is properly | ||
| 253 | // aligned with respect to the start of the struct. | ||
| 254 | const offset_bits = if (self.is_union) 0 else std.mem.alignForward(u64, self.size_bits, fld_align_bits); | ||
| 255 | const size_bits = fld_layout.size_bits; | ||
| 256 | |||
| 257 | // The alignment of a record is the maximum of its field alignments. See test cases | ||
| 258 | // 0084, 0085, 0086. | ||
| 259 | self.size_bits = @max(self.size_bits, offset_bits + size_bits); | ||
| 260 | self.aligned_bits = @max(self.aligned_bits, fld_align_bits); | ||
| 261 | |||
| 262 | return .{ | ||
| 263 | .offset_bits = offset_bits, | ||
| 264 | .size_bits = size_bits, | ||
| 265 | }; | ||
| 266 | } | ||
| 267 | |||
| 268 | fn layoutBitField( | ||
| 269 | self: *SysVContext, | ||
| 270 | fld_attrs: ?[]const Attribute, | ||
| 271 | fld_layout: TypeLayout, | ||
| 272 | is_named: bool, | ||
| 273 | bit_width: u64, | ||
| 274 | ) FieldLayout { | ||
| 275 | const ty_size_bits = fld_layout.size_bits; | ||
| 276 | var ty_fld_algn_bits: u32 = fld_layout.field_alignment_bits; | ||
| 277 | |||
| 278 | if (bit_width > 0) { | ||
| 279 | std.debug.assert(bit_width <= ty_size_bits); // Checked in parser | ||
| 280 | // Some targets ignore the alignment of the underlying type when laying out | ||
| 281 | // non-zero-sized bit-fields. See test case 0072. On such targets, bit-fields never | ||
| 282 | // cross a storage boundary. See test case 0081. | ||
| 283 | if (target_util.ignoreNonZeroSizedBitfieldTypeAlignment(self.comp.target)) { | ||
| 284 | ty_fld_algn_bits = 1; | ||
| 285 | } | ||
| 286 | } else { | ||
| 287 | // Some targets ignore the alignment of the underlying type when laying out | ||
| 288 | // zero-sized bit-fields. See test case 0073. | ||
| 289 | if (target_util.ignoreZeroSizedBitfieldTypeAlignment(self.comp.target)) { | ||
| 290 | ty_fld_algn_bits = 1; | ||
| 291 | } | ||
| 292 | // Some targets have a minimum alignment of zero-sized bit-fields. See test case | ||
| 293 | // 0074. | ||
| 294 | if (target_util.minZeroWidthBitfieldAlignment(self.comp.target)) |target_align| { | ||
| 295 | ty_fld_algn_bits = @max(ty_fld_algn_bits, target_align); | ||
| 296 | } | ||
| 297 | } | ||
| 298 | |||
| 299 | // __attribute__((packed)) on the record is identical to __attribute__((packed)) on each | ||
| 300 | // field. See test case 0067. | ||
| 301 | const attr_packed = self.attr_packed or isPacked(fld_attrs); | ||
| 302 | const has_packing_annotation = attr_packed or self.max_field_align_bits != null; | ||
| 303 | |||
| 304 | const annotation_alignment: u32 = if (Type.annotationAlignment(self.comp, fld_attrs)) |anno| anno * BITS_PER_BYTE else 1; | ||
| 305 | |||
| 306 | const first_unused_bit: u64 = if (self.is_union) 0 else self.size_bits; | ||
| 307 | var field_align_bits: u64 = 1; | ||
| 308 | |||
| 309 | if (bit_width == 0) { | ||
| 310 | field_align_bits = @max(ty_fld_algn_bits, annotation_alignment); | ||
| 311 | } else if (self.comp.langopts.emulate == .gcc) { | ||
| 312 | // On GCC, the field alignment is at least the alignment requested by annotations | ||
| 313 | // except as restricted by #pragma pack. See test case 0083. | ||
| 314 | field_align_bits = annotation_alignment; | ||
| 315 | if (self.max_field_align_bits) |max_bits| { | ||
| 316 | field_align_bits = @min(annotation_alignment, max_bits); | ||
| 317 | } | ||
| 318 | |||
| 319 | // On GCC, if there are no packing annotations and | ||
| 320 | // - the field would otherwise start at an offset such that it would cross a | ||
| 321 | // storage boundary or | ||
| 322 | // - the alignment of the type is larger than its size, | ||
| 323 | // then it is aligned to the type's field alignment. See test case 0083. | ||
| 324 | if (!has_packing_annotation) { | ||
| 325 | const start_bit = std.mem.alignForward(u64, first_unused_bit, field_align_bits); | ||
| 326 | |||
| 327 | const does_field_cross_boundary = start_bit % ty_fld_algn_bits + bit_width > ty_size_bits; | ||
| 328 | |||
| 329 | if (ty_fld_algn_bits > ty_size_bits or does_field_cross_boundary) { | ||
| 330 | field_align_bits = @max(field_align_bits, ty_fld_algn_bits); | ||
| 331 | } | ||
| 332 | } | ||
| 333 | } else { | ||
| 334 | std.debug.assert(self.comp.langopts.emulate == .clang); | ||
| 335 | |||
| 336 | // On Clang, the alignment requested by annotations is not respected if it is | ||
| 337 | // larger than the value of #pragma pack. See test case 0083. | ||
| 338 | if (annotation_alignment <= self.max_field_align_bits orelse std.math.maxInt(u29)) { | ||
| 339 | field_align_bits = @max(field_align_bits, annotation_alignment); | ||
| 340 | } | ||
| 341 | // On Clang, if there are no packing annotations and the field would cross a | ||
| 342 | // storage boundary if it were positioned at the first unused bit in the record, | ||
| 343 | // it is aligned to the type's field alignment. See test case 0083. | ||
| 344 | if (!has_packing_annotation) { | ||
| 345 | const does_field_cross_boundary = first_unused_bit % ty_fld_algn_bits + bit_width > ty_size_bits; | ||
| 346 | |||
| 347 | if (does_field_cross_boundary) | ||
| 348 | field_align_bits = @max(field_align_bits, ty_fld_algn_bits); | ||
| 349 | } | ||
| 350 | } | ||
| 351 | |||
| 352 | const offset_bits = std.mem.alignForward(u64, first_unused_bit, field_align_bits); | ||
| 353 | self.size_bits = @max(self.size_bits, offset_bits + bit_width); | ||
| 354 | |||
| 355 | // Unnamed fields do not contribute to the record alignment except on a few targets. | ||
| 356 | // See test case 0079. | ||
| 357 | if (is_named or target_util.unnamedFieldAffectsAlignment(self.comp.target)) { | ||
| 358 | var inherited_align_bits: u32 = undefined; | ||
| 359 | |||
| 360 | if (bit_width == 0) { | ||
| 361 | // If the width is 0, #pragma pack and __attribute__((packed)) are ignored. | ||
| 362 | // See test case 0075. | ||
| 363 | inherited_align_bits = @max(ty_fld_algn_bits, annotation_alignment); | ||
| 364 | } else if (self.max_field_align_bits) |max_align_bits| { | ||
| 365 | // Otherwise, if a #pragma pack is in effect, __attribute__((packed)) on the field or | ||
| 366 | // record is ignored. See test case 0076. | ||
| 367 | inherited_align_bits = @max(ty_fld_algn_bits, annotation_alignment); | ||
| 368 | inherited_align_bits = @intCast(@min(inherited_align_bits, max_align_bits)); | ||
| 369 | } else if (attr_packed) { | ||
| 370 | // Otherwise, if the field or the record is packed, the field alignment is 1 bit unless | ||
| 371 | // it is explicitly increased with __attribute__((aligned)). See test case 0077. | ||
| 372 | inherited_align_bits = annotation_alignment; | ||
| 373 | } else { | ||
| 374 | // Otherwise, the field alignment is the field alignment of the underlying type unless | ||
| 375 | // it is explicitly increased with __attribute__((aligned)). See test case 0078. | ||
| 376 | inherited_align_bits = @max(ty_fld_algn_bits, annotation_alignment); | ||
| 377 | } | ||
| 378 | self.aligned_bits = @max(self.aligned_bits, inherited_align_bits); | ||
| 379 | } | ||
| 380 | |||
| 381 | if (!is_named) return .{}; | ||
| 382 | return .{ | ||
| 383 | .size_bits = bit_width, | ||
| 384 | .offset_bits = offset_bits, | ||
| 385 | }; | ||
| 386 | } | ||
| 387 | }; | ||
| 388 | |||
| 389 | const MsvcContext = struct { | ||
| 390 | req_align_bits: u32, | ||
| 391 | max_field_align_bits: ?u32, | ||
| 392 | /// The alignment of pointers that point to an object of this type. This is greater than or equal | ||
| 393 | /// to the required alignment. Once all fields have been laid out, the size of the record will be | ||
| 394 | /// rounded up to this value. | ||
| 395 | pointer_align_bits: u32, | ||
| 396 | /// The alignment of this type when it is used as a record field. This is greater than or equal to | ||
| 397 | /// the pointer alignment. | ||
| 398 | field_align_bits: u32, | ||
| 399 | size_bits: u64, | ||
| 400 | ongoing_bitfield: ?OngoingBitfield, | ||
| 401 | contains_non_bitfield: bool, | ||
| 402 | is_union: bool, | ||
| 403 | comp: *const Compilation, | ||
| 404 | |||
| 405 | fn init(ty: Type, comp: *const Compilation, pragma_pack: ?u8) MsvcContext { | ||
| 406 | var pack_value: ?u32 = null; | ||
| 407 | if (ty.hasAttribute(.@"packed")) { | ||
| 408 | // __attribute__((packed)) behaves like #pragma pack(1) in clang. See test case 0056. | ||
| 409 | pack_value = BITS_PER_BYTE; | ||
| 410 | } | ||
| 411 | if (pack_value == null) { | ||
| 412 | if (pragma_pack) |pack| { | ||
| 413 | pack_value = pack * BITS_PER_BYTE; | ||
| 414 | } | ||
| 415 | } | ||
| 416 | if (pack_value) |pack| { | ||
| 417 | pack_value = msvcPragmaPack(comp, pack); | ||
| 418 | } | ||
| 419 | |||
| 420 | // The required alignment can be increased by adding a __declspec(align) | ||
| 421 | // annotation. See test case 0023. | ||
| 422 | var must_align: u29 = BITS_PER_BYTE; | ||
| 423 | if (ty.requestedAlignment(comp)) |req_align| { | ||
| 424 | must_align = req_align * BITS_PER_BYTE; | ||
| 425 | } | ||
| 426 | return MsvcContext{ | ||
| 427 | .req_align_bits = must_align, | ||
| 428 | .pointer_align_bits = must_align, | ||
| 429 | .field_align_bits = must_align, | ||
| 430 | .size_bits = 0, | ||
| 431 | .max_field_align_bits = pack_value, | ||
| 432 | .ongoing_bitfield = null, | ||
| 433 | .contains_non_bitfield = false, | ||
| 434 | .is_union = ty.is(.@"union"), | ||
| 435 | .comp = comp, | ||
| 436 | }; | ||
| 437 | } | ||
| 438 | |||
| 439 | fn layoutField(self: *MsvcContext, fld: *const Field, fld_attrs: ?[]const Attribute) FieldLayout { | ||
| 440 | const type_layout = computeLayout(fld.ty, self.comp); | ||
| 441 | |||
| 442 | // The required alignment of the field is the maximum of the required alignment of the | ||
| 443 | // underlying type and the __declspec(align) annotation on the field itself. | ||
| 444 | // See test case 0028. | ||
| 445 | var req_align = type_layout.required_alignment_bits; | ||
| 446 | if (Type.annotationAlignment(self.comp, fld_attrs)) |anno| { | ||
| 447 | req_align = @max(anno * BITS_PER_BYTE, req_align); | ||
| 448 | } | ||
| 449 | |||
| 450 | // The required alignment of a record is the maximum of the required alignments of its | ||
| 451 | // fields except that the required alignment of bitfields is ignored. | ||
| 452 | // See test case 0029. | ||
| 453 | if (fld.isRegularField()) { | ||
| 454 | self.req_align_bits = @max(self.req_align_bits, req_align); | ||
| 455 | } | ||
| 456 | |||
| 457 | // The offset of the field is based on the field alignment of the underlying type. | ||
| 458 | // See test case 0027. | ||
| 459 | var fld_align_bits = type_layout.field_alignment_bits; | ||
| 460 | if (self.max_field_align_bits) |max_align| { | ||
| 461 | fld_align_bits = @min(fld_align_bits, max_align); | ||
| 462 | } | ||
| 463 | // check the requested alignment of the field type. | ||
| 464 | if (fld.ty.requestedAlignment(self.comp)) |type_req_align| { | ||
| 465 | fld_align_bits = @max(fld_align_bits, type_req_align * 8); | ||
| 466 | } | ||
| 467 | |||
| 468 | if (isPacked(fld_attrs)) { | ||
| 469 | // __attribute__((packed)) on a field is a clang extension. It behaves as if #pragma | ||
| 470 | // pack(1) had been applied only to this field. See test case 0057. | ||
| 471 | fld_align_bits = BITS_PER_BYTE; | ||
| 472 | } | ||
| 473 | // __attribute__((packed)) on a field is a clang extension. It behaves as if #pragma | ||
| 474 | // pack(1) had been applied only to this field. See test case 0057. | ||
| 475 | fld_align_bits = @max(fld_align_bits, req_align); | ||
| 476 | if (fld.isRegularField()) { | ||
| 477 | return self.layoutRegularField(type_layout.size_bits, fld_align_bits); | ||
| 478 | } else { | ||
| 479 | return self.layoutBitField(type_layout.size_bits, fld_align_bits, fld.specifiedBitWidth()); | ||
| 480 | } | ||
| 481 | } | ||
| 482 | |||
| 483 | fn layoutBitField(self: *MsvcContext, ty_size_bits: u64, field_align: u32, bit_width: u32) FieldLayout { | ||
| 484 | if (bit_width == 0) { | ||
| 485 | // A zero-sized bit-field that does not follow a non-zero-sized bit-field does not affect | ||
| 486 | // the overall layout of the record. Even in a union where the order would otherwise | ||
| 487 | // not matter. See test case 0035. | ||
| 488 | if (self.ongoing_bitfield) |_| { | ||
| 489 | self.ongoing_bitfield = null; | ||
| 490 | } else { | ||
| 491 | // this field takes 0 space. | ||
| 492 | return .{ .offset_bits = self.size_bits, .size_bits = bit_width }; | ||
| 493 | } | ||
| 494 | } else { | ||
| 495 | std.debug.assert(bit_width <= ty_size_bits); | ||
| 496 | // If there is an ongoing bit-field in a struct whose underlying type has the same size and | ||
| 497 | // if there is enough space left to place this bit-field, then this bit-field is placed in | ||
| 498 | // the ongoing bit-field and the overall layout of the struct is not affected by this | ||
| 499 | // bit-field. See test case 0037. | ||
| 500 | if (!self.is_union) { | ||
| 501 | if (self.ongoing_bitfield) |*p| { | ||
| 502 | if (p.size_bits == ty_size_bits and p.unused_size_bits >= bit_width) { | ||
| 503 | const offset_bits = self.size_bits - p.unused_size_bits; | ||
| 504 | p.unused_size_bits -= bit_width; | ||
| 505 | return .{ .offset_bits = offset_bits, .size_bits = bit_width }; | ||
| 506 | } | ||
| 507 | } | ||
| 508 | } | ||
| 509 | // Otherwise this field is part of a new ongoing bit-field. | ||
| 510 | self.ongoing_bitfield = .{ .size_bits = ty_size_bits, .unused_size_bits = ty_size_bits - bit_width }; | ||
| 511 | } | ||
| 512 | const offset_bits = if (!self.is_union) bits: { | ||
| 513 | // This is the one place in the layout of a record where the pointer alignment might | ||
| 514 | // get assigned a smaller value than the field alignment. This can only happen if | ||
| 515 | // the field or the type of the field has a required alignment. Otherwise the value | ||
| 516 | // of field_alignment_bits is already bound by max_field_alignment_bits. | ||
| 517 | // See test case 0038. | ||
| 518 | const p_align = if (self.max_field_align_bits) |max_fld_align| | ||
| 519 | @min(max_fld_align, field_align) | ||
| 520 | else | ||
| 521 | field_align; | ||
| 522 | self.pointer_align_bits = @max(self.pointer_align_bits, p_align); | ||
| 523 | self.field_align_bits = @max(self.field_align_bits, field_align); | ||
| 524 | |||
| 525 | const offset_bits = std.mem.alignForward(u64, self.size_bits, field_align); | ||
| 526 | self.size_bits = if (bit_width == 0) offset_bits else offset_bits + ty_size_bits; | ||
| 527 | |||
| 528 | break :bits offset_bits; | ||
| 529 | } else bits: { | ||
| 530 | // Bit-fields do not affect the alignment of a union. See test case 0041. | ||
| 531 | self.size_bits = @max(self.size_bits, ty_size_bits); | ||
| 532 | break :bits 0; | ||
| 533 | }; | ||
| 534 | return .{ .offset_bits = offset_bits, .size_bits = bit_width }; | ||
| 535 | } | ||
| 536 | |||
| 537 | fn layoutRegularField(self: *MsvcContext, size_bits: u64, field_align: u32) FieldLayout { | ||
| 538 | self.contains_non_bitfield = true; | ||
| 539 | self.ongoing_bitfield = null; | ||
| 540 | // The alignment of the field affects both the pointer alignment and the field | ||
| 541 | // alignment of the record. See test case 0032. | ||
| 542 | self.pointer_align_bits = @max(self.pointer_align_bits, field_align); | ||
| 543 | self.field_align_bits = @max(self.field_align_bits, field_align); | ||
| 544 | const offset_bits = switch (self.is_union) { | ||
| 545 | true => 0, | ||
| 546 | false => std.mem.alignForward(u64, self.size_bits, field_align), | ||
| 547 | }; | ||
| 548 | self.size_bits = @max(self.size_bits, offset_bits + size_bits); | ||
| 549 | return .{ .offset_bits = offset_bits, .size_bits = size_bits }; | ||
| 550 | } | ||
| 551 | fn handleZeroSizedRecord(self: *MsvcContext) void { | ||
| 552 | if (self.is_union) { | ||
| 553 | // MSVC does not allow unions without fields. | ||
| 554 | // If all fields in a union have size 0, the size of the union is set to | ||
| 555 | // - its field alignment if it contains at least one non-bitfield | ||
| 556 | // - 4 bytes if it contains only bitfields | ||
| 557 | // See test case 0025. | ||
| 558 | if (self.contains_non_bitfield) { | ||
| 559 | self.size_bits = self.field_align_bits; | ||
| 560 | } else { | ||
| 561 | self.size_bits = 4 * BITS_PER_BYTE; | ||
| 562 | } | ||
| 563 | } else { | ||
| 564 | // If all fields in a struct have size 0, its size is set to its required alignment | ||
| 565 | // but at least to 4 bytes. See test case 0026. | ||
| 566 | self.size_bits = @max(self.req_align_bits, 4 * BITS_PER_BYTE); | ||
| 567 | self.pointer_align_bits = @intCast(@min(self.pointer_align_bits, self.size_bits)); | ||
| 568 | } | ||
| 569 | } | ||
| 570 | }; | ||
| 571 | |||
| 572 | pub fn compute(rec: *Type.Record, ty: Type, comp: *const Compilation, pragma_pack: ?u8) void { | ||
| 573 | switch (comp.langopts.emulate) { | ||
| 574 | .gcc, .clang => { | ||
| 575 | var context = SysVContext.init(ty, comp, pragma_pack); | ||
| 576 | |||
| 577 | context.layoutFields(rec); | ||
| 578 | |||
| 579 | context.size_bits = std.mem.alignForward(u64, context.size_bits, context.aligned_bits); | ||
| 580 | |||
| 581 | rec.type_layout = .{ | ||
| 582 | .size_bits = context.size_bits, | ||
| 583 | .field_alignment_bits = context.aligned_bits, | ||
| 584 | .pointer_alignment_bits = context.aligned_bits, | ||
| 585 | .required_alignment_bits = BITS_PER_BYTE, | ||
| 586 | }; | ||
| 587 | }, | ||
| 588 | .msvc => { | ||
| 589 | var context = MsvcContext.init(ty, comp, pragma_pack); | ||
| 590 | for (rec.fields, 0..) |*fld, fld_indx| { | ||
| 591 | if (fld.ty.specifier == .invalid) continue; | ||
| 592 | var field_attrs: ?[]const Attribute = null; | ||
| 593 | if (rec.field_attributes) |attrs| { | ||
| 594 | field_attrs = attrs[fld_indx]; | ||
| 595 | } | ||
| 596 | |||
| 597 | fld.layout = context.layoutField(fld, field_attrs); | ||
| 598 | } | ||
| 599 | if (context.size_bits == 0) { | ||
| 600 | // As an extension, MSVC allows records that only contain zero-sized bitfields and empty | ||
| 601 | // arrays. Such records would be zero-sized but this case is handled here separately to | ||
| 602 | // ensure that there are no zero-sized records. | ||
| 603 | context.handleZeroSizedRecord(); | ||
| 604 | } | ||
| 605 | context.size_bits = std.mem.alignForward(u64, context.size_bits, context.pointer_align_bits); | ||
| 606 | rec.type_layout = .{ | ||
| 607 | .size_bits = context.size_bits, | ||
| 608 | .field_alignment_bits = context.field_align_bits, | ||
| 609 | .pointer_alignment_bits = context.pointer_align_bits, | ||
| 610 | .required_alignment_bits = context.req_align_bits, | ||
| 611 | }; | ||
| 612 | }, | ||
| 613 | } | ||
| 614 | } | ||
| 615 | |||
| 616 | fn computeLayout(ty: Type, comp: *const Compilation) TypeLayout { | ||
| 617 | if (ty.getRecord()) |rec| { | ||
| 618 | const requested = BITS_PER_BYTE * (ty.requestedAlignment(comp) orelse 0); | ||
| 619 | return .{ | ||
| 620 | .size_bits = rec.type_layout.size_bits, | ||
| 621 | .pointer_alignment_bits = @max(requested, rec.type_layout.pointer_alignment_bits), | ||
| 622 | .field_alignment_bits = @max(requested, rec.type_layout.field_alignment_bits), | ||
| 623 | .required_alignment_bits = rec.type_layout.required_alignment_bits, | ||
| 624 | }; | ||
| 625 | } else { | ||
| 626 | const type_align = ty.alignof(comp) * BITS_PER_BYTE; | ||
| 627 | return .{ | ||
| 628 | .size_bits = ty.bitSizeof(comp) orelse 0, | ||
| 629 | .pointer_alignment_bits = type_align, | ||
| 630 | .field_alignment_bits = type_align, | ||
| 631 | .required_alignment_bits = BITS_PER_BYTE, | ||
| 632 | }; | ||
| 633 | } | ||
| 634 | } | ||
| 635 | |||
| 636 | fn isPacked(attrs: ?[]const Attribute) bool { | ||
| 637 | const a = attrs orelse return false; | ||
| 638 | |||
| 639 | for (a) |attribute| { | ||
| 640 | if (attribute.tag != .@"packed") continue; | ||
| 641 | return true; | ||
| 642 | } | ||
| 643 | return false; | ||
| 644 | } | ||
| 645 | |||
| 646 | // The effect of #pragma pack(N) depends on the target. | ||
| 647 | // | ||
| 648 | // x86: By default, there is no maximum field alignment. N={1,2,4} set the maximum field | ||
| 649 | // alignment to that value. All other N activate the default. | ||
| 650 | // x64: By default, there is no maximum field alignment. N={1,2,4,8} set the maximum field | ||
| 651 | // alignment to that value. All other N activate the default. | ||
| 652 | // arm: By default, the maximum field alignment is 8. N={1,2,4,8,16} set the maximum field | ||
| 653 | // alignment to that value. All other N activate the default. | ||
| 654 | // arm64: By default, the maximum field alignment is 8. N={1,2,4,8} set the maximum field | ||
| 655 | // alignment to that value. N=16 disables the maximum field alignment. All other N | ||
| 656 | // activate the default. | ||
| 657 | // | ||
| 658 | // See test case 0020. | ||
| 659 | pub fn msvcPragmaPack(comp: *const Compilation, pack: u32) ?u32 { | ||
| 660 | return switch (pack) { | ||
| 661 | 8, 16, 32 => pack, | ||
| 662 | 64 => if (comp.target.cpu.arch == .x86) null else pack, | ||
| 663 | 128 => if (comp.target.cpu.arch == .thumb) pack else null, | ||
| 664 | else => { | ||
| 665 | return switch (comp.target.cpu.arch) { | ||
| 666 | .thumb, .aarch64 => 64, | ||
| 667 | else => null, | ||
| 668 | }; | ||
| 669 | }, | ||
| 670 | }; | ||
| 671 | } | ||
deps/aro/aro/target.zig created+831| ... | @@ -0,0 +1,831 @@ | ||
| 1 | const std = @import("std"); | ||
| 2 | const LangOpts = @import("LangOpts.zig"); | ||
| 3 | const Type = @import("Type.zig"); | ||
| 4 | const llvm = @import("root").codegen.llvm; | ||
| 5 | const TargetSet = @import("Builtins/Properties.zig").TargetSet; | ||
| 6 | |||
| 7 | /// intmax_t for this target | ||
| 8 | pub fn intMaxType(target: std.Target) Type { | ||
| 9 | switch (target.cpu.arch) { | ||
| 10 | .aarch64, | ||
| 11 | .aarch64_be, | ||
| 12 | .sparc64, | ||
| 13 | => if (target.os.tag != .openbsd) return .{ .specifier = .long }, | ||
| 14 | |||
| 15 | .bpfel, | ||
| 16 | .bpfeb, | ||
| 17 | .loongarch64, | ||
| 18 | .riscv64, | ||
| 19 | .powerpc64, | ||
| 20 | .powerpc64le, | ||
| 21 | .tce, | ||
| 22 | .tcele, | ||
| 23 | .ve, | ||
| 24 | => return .{ .specifier = .long }, | ||
| 25 | |||
| 26 | .x86_64 => switch (target.os.tag) { | ||
| 27 | .windows, .openbsd => {}, | ||
| 28 | else => switch (target.abi) { | ||
| 29 | .gnux32, .muslx32 => {}, | ||
| 30 | else => return .{ .specifier = .long }, | ||
| 31 | }, | ||
| 32 | }, | ||
| 33 | |||
| 34 | else => {}, | ||
| 35 | } | ||
| 36 | return .{ .specifier = .long_long }; | ||
| 37 | } | ||
| 38 | |||
| 39 | /// intptr_t for this target | ||
| 40 | pub fn intPtrType(target: std.Target) Type { | ||
| 41 | switch (target.os.tag) { | ||
| 42 | .haiku => return .{ .specifier = .long }, | ||
| 43 | .nacl => return .{ .specifier = .int }, | ||
| 44 | else => {}, | ||
| 45 | } | ||
| 46 | |||
| 47 | switch (target.cpu.arch) { | ||
| 48 | .aarch64, .aarch64_be => switch (target.os.tag) { | ||
| 49 | .windows => return .{ .specifier = .long_long }, | ||
| 50 | else => {}, | ||
| 51 | }, | ||
| 52 | |||
| 53 | .msp430, | ||
| 54 | .csky, | ||
| 55 | .loongarch32, | ||
| 56 | .riscv32, | ||
| 57 | .xcore, | ||
| 58 | .hexagon, | ||
| 59 | .tce, | ||
| 60 | .tcele, | ||
| 61 | .m68k, | ||
| 62 | .spir, | ||
| 63 | .spirv32, | ||
| 64 | .arc, | ||
| 65 | .avr, | ||
| 66 | => return .{ .specifier = .int }, | ||
| 67 | |||
| 68 | .sparc, .sparcel => switch (target.os.tag) { | ||
| 69 | .netbsd, .openbsd => {}, | ||
| 70 | else => return .{ .specifier = .int }, | ||
| 71 | }, | ||
| 72 | |||
| 73 | .powerpc, .powerpcle => switch (target.os.tag) { | ||
| 74 | .linux, .freebsd, .netbsd => return .{ .specifier = .int }, | ||
| 75 | else => {}, | ||
| 76 | }, | ||
| 77 | |||
| 78 | // 32-bit x86 Darwin, OpenBSD, and RTEMS use long (the default); others use int | ||
| 79 | .x86 => switch (target.os.tag) { | ||
| 80 | .openbsd, .rtems => {}, | ||
| 81 | else => if (!target.os.tag.isDarwin()) return .{ .specifier = .int }, | ||
| 82 | }, | ||
| 83 | |||
| 84 | .x86_64 => switch (target.os.tag) { | ||
| 85 | .windows => return .{ .specifier = .long_long }, | ||
| 86 | else => switch (target.abi) { | ||
| 87 | .gnux32, .muslx32 => return .{ .specifier = .int }, | ||
| 88 | else => {}, | ||
| 89 | }, | ||
| 90 | }, | ||
| 91 | |||
| 92 | else => {}, | ||
| 93 | } | ||
| 94 | |||
| 95 | return .{ .specifier = .long }; | ||
| 96 | } | ||
| 97 | |||
| 98 | /// int16_t for this target | ||
| 99 | pub fn int16Type(target: std.Target) Type { | ||
| 100 | return switch (target.cpu.arch) { | ||
| 101 | .avr => .{ .specifier = .int }, | ||
| 102 | else => .{ .specifier = .short }, | ||
| 103 | }; | ||
| 104 | } | ||
| 105 | |||
| 106 | /// int64_t for this target | ||
| 107 | pub fn int64Type(target: std.Target) Type { | ||
| 108 | switch (target.cpu.arch) { | ||
| 109 | .loongarch64, | ||
| 110 | .ve, | ||
| 111 | .riscv64, | ||
| 112 | .powerpc64, | ||
| 113 | .powerpc64le, | ||
| 114 | .bpfel, | ||
| 115 | .bpfeb, | ||
| 116 | => return .{ .specifier = .long }, | ||
| 117 | |||
| 118 | .sparc64 => return intMaxType(target), | ||
| 119 | |||
| 120 | .x86, .x86_64 => if (!target.isDarwin()) return intMaxType(target), | ||
| 121 | .aarch64, .aarch64_be => if (!target.isDarwin() and target.os.tag != .openbsd and target.os.tag != .windows) return .{ .specifier = .long }, | ||
| 122 | else => {}, | ||
| 123 | } | ||
| 124 | return .{ .specifier = .long_long }; | ||
| 125 | } | ||
| 126 | |||
| 127 | /// This function returns 1 if function alignment is not observable or settable. | ||
| 128 | pub fn defaultFunctionAlignment(target: std.Target) u8 { | ||
| 129 | return switch (target.cpu.arch) { | ||
| 130 | .arm, .armeb => 4, | ||
| 131 | .aarch64, .aarch64_32, .aarch64_be => 4, | ||
| 132 | .sparc, .sparcel, .sparc64 => 4, | ||
| 133 | .riscv64 => 2, | ||
| 134 | else => 1, | ||
| 135 | }; | ||
| 136 | } | ||
| 137 | |||
| 138 | pub fn isTlsSupported(target: std.Target) bool { | ||
| 139 | if (target.isDarwin()) { | ||
| 140 | var supported = false; | ||
| 141 | switch (target.os.tag) { | ||
| 142 | .macos => supported = !(target.os.isAtLeast(.macos, .{ .major = 10, .minor = 7, .patch = 0 }) orelse false), | ||
| 143 | else => {}, | ||
| 144 | } | ||
| 145 | return supported; | ||
| 146 | } | ||
| 147 | return switch (target.cpu.arch) { | ||
| 148 | .tce, .tcele, .bpfel, .bpfeb, .msp430, .nvptx, .nvptx64, .x86, .arm, .armeb, .thumb, .thumbeb => false, | ||
| 149 | else => true, | ||
| 150 | }; | ||
| 151 | } | ||
| 152 | |||
| 153 | pub fn ignoreNonZeroSizedBitfieldTypeAlignment(target: std.Target) bool { | ||
| 154 | switch (target.cpu.arch) { | ||
| 155 | .avr => return true, | ||
| 156 | .arm => { | ||
| 157 | if (std.Target.arm.featureSetHas(target.cpu.features, .has_v7)) { | ||
| 158 | switch (target.os.tag) { | ||
| 159 | .ios => return true, | ||
| 160 | else => return false, | ||
| 161 | } | ||
| 162 | } | ||
| 163 | }, | ||
| 164 | else => return false, | ||
| 165 | } | ||
| 166 | return false; | ||
| 167 | } | ||
| 168 | |||
| 169 | pub fn ignoreZeroSizedBitfieldTypeAlignment(target: std.Target) bool { | ||
| 170 | switch (target.cpu.arch) { | ||
| 171 | .avr => return true, | ||
| 172 | else => return false, | ||
| 173 | } | ||
| 174 | } | ||
| 175 | |||
| 176 | pub fn minZeroWidthBitfieldAlignment(target: std.Target) ?u29 { | ||
| 177 | switch (target.cpu.arch) { | ||
| 178 | .avr => return 8, | ||
| 179 | .arm => { | ||
| 180 | if (std.Target.arm.featureSetHas(target.cpu.features, .has_v7)) { | ||
| 181 | switch (target.os.tag) { | ||
| 182 | .ios => return 32, | ||
| 183 | else => return null, | ||
| 184 | } | ||
| 185 | } else return null; | ||
| 186 | }, | ||
| 187 | else => return null, | ||
| 188 | } | ||
| 189 | } | ||
| 190 | |||
| 191 | pub fn unnamedFieldAffectsAlignment(target: std.Target) bool { | ||
| 192 | switch (target.cpu.arch) { | ||
| 193 | .aarch64 => { | ||
| 194 | if (target.isDarwin() or target.os.tag == .windows) return false; | ||
| 195 | return true; | ||
| 196 | }, | ||
| 197 | .armeb => { | ||
| 198 | if (std.Target.arm.featureSetHas(target.cpu.features, .has_v7)) { | ||
| 199 | if (std.Target.Abi.default(target.cpu.arch, target.os) == .eabi) return true; | ||
| 200 | } | ||
| 201 | }, | ||
| 202 | .arm => return true, | ||
| 203 | .avr => return true, | ||
| 204 | .thumb => { | ||
| 205 | if (target.os.tag == .windows) return false; | ||
| 206 | return true; | ||
| 207 | }, | ||
| 208 | else => return false, | ||
| 209 | } | ||
| 210 | return false; | ||
| 211 | } | ||
| 212 | |||
| 213 | pub fn packAllEnums(target: std.Target) bool { | ||
| 214 | return switch (target.cpu.arch) { | ||
| 215 | .hexagon => true, | ||
| 216 | else => false, | ||
| 217 | }; | ||
| 218 | } | ||
| 219 | |||
| 220 | /// Default alignment (in bytes) for __attribute__((aligned)) when no alignment is specified | ||
| 221 | pub fn defaultAlignment(target: std.Target) u29 { | ||
| 222 | switch (target.cpu.arch) { | ||
| 223 | .avr => return 1, | ||
| 224 | .arm => if (target.isAndroid() or target.os.tag == .ios) return 16 else return 8, | ||
| 225 | .sparc => if (std.Target.sparc.featureSetHas(target.cpu.features, .v9)) return 16 else return 8, | ||
| 226 | .mips, .mipsel => switch (target.abi) { | ||
| 227 | .none, .gnuabi64 => return 16, | ||
| 228 | else => return 8, | ||
| 229 | }, | ||
| 230 | .s390x, .armeb, .thumbeb, .thumb => return 8, | ||
| 231 | else => return 16, | ||
| 232 | } | ||
| 233 | } | ||
| 234 | pub fn systemCompiler(target: std.Target) LangOpts.Compiler { | ||
| 235 | // Android is linux but not gcc, so these checks go first | ||
| 236 | // the rest for documentation as fn returns .clang | ||
| 237 | if (target.isDarwin() or | ||
| 238 | target.isAndroid() or | ||
| 239 | target.isBSD() or | ||
| 240 | target.os.tag == .fuchsia or | ||
| 241 | target.os.tag == .solaris or | ||
| 242 | target.os.tag == .haiku or | ||
| 243 | target.cpu.arch == .hexagon) | ||
| 244 | { | ||
| 245 | return .clang; | ||
| 246 | } | ||
| 247 | if (target.os.tag == .uefi) return .msvc; | ||
| 248 | // this is before windows to grab WindowsGnu | ||
| 249 | if (target.abi.isGnu() or | ||
| 250 | target.os.tag == .linux) | ||
| 251 | { | ||
| 252 | return .gcc; | ||
| 253 | } | ||
| 254 | if (target.os.tag == .windows) { | ||
| 255 | return .msvc; | ||
| 256 | } | ||
| 257 | if (target.cpu.arch == .avr) return .gcc; | ||
| 258 | return .clang; | ||
| 259 | } | ||
| 260 | |||
| 261 | pub fn hasFloat128(target: std.Target) bool { | ||
| 262 | if (target.cpu.arch.isWasm()) return true; | ||
| 263 | if (target.isDarwin()) return false; | ||
| 264 | if (target.cpu.arch.isPPC() or target.cpu.arch.isPPC64()) return std.Target.powerpc.featureSetHas(target.cpu.features, .float128); | ||
| 265 | return switch (target.os.tag) { | ||
| 266 | .dragonfly, | ||
| 267 | .haiku, | ||
| 268 | .linux, | ||
| 269 | .openbsd, | ||
| 270 | .solaris, | ||
| 271 | => target.cpu.arch.isX86(), | ||
| 272 | else => false, | ||
| 273 | }; | ||
| 274 | } | ||
| 275 | |||
| 276 | pub fn hasInt128(target: std.Target) bool { | ||
| 277 | if (target.cpu.arch == .wasm32) return true; | ||
| 278 | if (target.cpu.arch == .x86_64) return true; | ||
| 279 | return target.ptrBitWidth() >= 64; | ||
| 280 | } | ||
| 281 | |||
| 282 | pub fn hasHalfPrecisionFloatABI(target: std.Target) bool { | ||
| 283 | return switch (target.cpu.arch) { | ||
| 284 | .thumb, .thumbeb, .arm, .aarch64 => true, | ||
| 285 | else => false, | ||
| 286 | }; | ||
| 287 | } | ||
| 288 | |||
| 289 | pub const FPSemantics = enum { | ||
| 290 | None, | ||
| 291 | IEEEHalf, | ||
| 292 | BFloat, | ||
| 293 | IEEESingle, | ||
| 294 | IEEEDouble, | ||
| 295 | IEEEQuad, | ||
| 296 | /// Minifloat 5-bit exponent 2-bit mantissa | ||
| 297 | E5M2, | ||
| 298 | /// Minifloat 4-bit exponent 3-bit mantissa | ||
| 299 | E4M3, | ||
| 300 | x87ExtendedDouble, | ||
| 301 | IBMExtendedDouble, | ||
| 302 | |||
| 303 | /// Only intended for generating float.h macros for the preprocessor | ||
| 304 | pub fn forType(ty: std.Target.CType, target: std.Target) FPSemantics { | ||
| 305 | std.debug.assert(ty == .float or ty == .double or ty == .longdouble); | ||
| 306 | return switch (target.c_type_bit_size(ty)) { | ||
| 307 | 32 => .IEEESingle, | ||
| 308 | 64 => .IEEEDouble, | ||
| 309 | 80 => .x87ExtendedDouble, | ||
| 310 | 128 => switch (target.cpu.arch) { | ||
| 311 | .powerpc, .powerpcle, .powerpc64, .powerpc64le => .IBMExtendedDouble, | ||
| 312 | else => .IEEEQuad, | ||
| 313 | }, | ||
| 314 | else => unreachable, | ||
| 315 | }; | ||
| 316 | } | ||
| 317 | |||
| 318 | pub fn halfPrecisionType(target: std.Target) ?FPSemantics { | ||
| 319 | switch (target.cpu.arch) { | ||
| 320 | .aarch64, | ||
| 321 | .aarch64_32, | ||
| 322 | .aarch64_be, | ||
| 323 | .arm, | ||
| 324 | .armeb, | ||
| 325 | .hexagon, | ||
| 326 | .riscv32, | ||
| 327 | .riscv64, | ||
| 328 | .spirv32, | ||
| 329 | .spirv64, | ||
| 330 | => return .IEEEHalf, | ||
| 331 | .x86, .x86_64 => if (std.Target.x86.featureSetHas(target.cpu.features, .sse2)) return .IEEEHalf, | ||
| 332 | else => {}, | ||
| 333 | } | ||
| 334 | return null; | ||
| 335 | } | ||
| 336 | |||
| 337 | pub fn chooseValue(self: FPSemantics, comptime T: type, values: [6]T) T { | ||
| 338 | return switch (self) { | ||
| 339 | .IEEEHalf => values[0], | ||
| 340 | .IEEESingle => values[1], | ||
| 341 | .IEEEDouble => values[2], | ||
| 342 | .x87ExtendedDouble => values[3], | ||
| 343 | .IBMExtendedDouble => values[4], | ||
| 344 | .IEEEQuad => values[5], | ||
| 345 | else => unreachable, | ||
| 346 | }; | ||
| 347 | } | ||
| 348 | }; | ||
| 349 | |||
| 350 | pub fn isLP64(target: std.Target) bool { | ||
| 351 | return target.c_type_bit_size(.int) == 32 and target.ptrBitWidth() == 64; | ||
| 352 | } | ||
| 353 | |||
| 354 | pub fn isKnownWindowsMSVCEnvironment(target: std.Target) bool { | ||
| 355 | return target.os.tag == .windows and target.abi == .msvc; | ||
| 356 | } | ||
| 357 | |||
| 358 | pub fn isWindowsMSVCEnvironment(target: std.Target) bool { | ||
| 359 | return target.os.tag == .windows and (target.abi == .msvc or target.abi == .none); | ||
| 360 | } | ||
| 361 | |||
| 362 | pub fn isCygwinMinGW(target: std.Target) bool { | ||
| 363 | return target.os.tag == .windows and (target.abi == .gnu or target.abi == .cygnus); | ||
| 364 | } | ||
| 365 | |||
| 366 | pub fn builtinEnabled(target: std.Target, enabled_for: TargetSet) bool { | ||
| 367 | var it = enabled_for.iterator(); | ||
| 368 | while (it.next()) |val| { | ||
| 369 | switch (val) { | ||
| 370 | .basic => return true, | ||
| 371 | .x86_64 => if (target.cpu.arch == .x86_64) return true, | ||
| 372 | .aarch64 => if (target.cpu.arch == .aarch64) return true, | ||
| 373 | .arm => if (target.cpu.arch == .arm) return true, | ||
| 374 | .ppc => switch (target.cpu.arch) { | ||
| 375 | .powerpc, .powerpc64, .powerpc64le => return true, | ||
| 376 | else => {}, | ||
| 377 | }, | ||
| 378 | else => { | ||
| 379 | // Todo: handle other target predicates | ||
| 380 | }, | ||
| 381 | } | ||
| 382 | } | ||
| 383 | return false; | ||
| 384 | } | ||
| 385 | |||
| 386 | pub fn defaultFpEvalMethod(target: std.Target) LangOpts.FPEvalMethod { | ||
| 387 | if (target.os.tag == .aix) return .double; | ||
| 388 | switch (target.cpu.arch) { | ||
| 389 | .x86, .x86_64 => { | ||
| 390 | if (target.ptrBitWidth() == 32 and target.os.tag == .netbsd) { | ||
| 391 | if (target.os.version_range.semver.min.order(.{ .major = 6, .minor = 99, .patch = 26 }) != .gt) { | ||
| 392 | // NETBSD <= 6.99.26 on 32-bit x86 defaults to double | ||
| 393 | return .double; | ||
| 394 | } | ||
| 395 | } | ||
| 396 | if (std.Target.x86.featureSetHas(target.cpu.features, .sse)) { | ||
| 397 | return .source; | ||
| 398 | } | ||
| 399 | return .extended; | ||
| 400 | }, | ||
| 401 | else => {}, | ||
| 402 | } | ||
| 403 | return .source; | ||
| 404 | } | ||
| 405 | |||
| 406 | /// Value of the `-m` flag for `ld` for this target | ||
| 407 | pub fn ldEmulationOption(target: std.Target, arm_endianness: ?std.builtin.Endian) ?[]const u8 { | ||
| 408 | return switch (target.cpu.arch) { | ||
| 409 | .x86 => if (target.os.tag == .elfiamcu) "elf_iamcu" else "elf_i386", | ||
| 410 | .arm, | ||
| 411 | .armeb, | ||
| 412 | .thumb, | ||
| 413 | .thumbeb, | ||
| 414 | => switch (arm_endianness orelse target.cpu.arch.endian()) { | ||
| 415 | .little => "armelf_linux_eabi", | ||
| 416 | .big => "armelfb_linux_eabi", | ||
| 417 | }, | ||
| 418 | .aarch64 => "aarch64linux", | ||
| 419 | .aarch64_be => "aarch64linuxb", | ||
| 420 | .m68k => "m68kelf", | ||
| 421 | .powerpc => if (target.os.tag == .linux) "elf32ppclinux" else "elf32ppc", | ||
| 422 | .powerpcle => if (target.os.tag == .linux) "elf32lppclinux" else "elf32lppc", | ||
| 423 | .powerpc64 => "elf64ppc", | ||
| 424 | .powerpc64le => "elf64lppc", | ||
| 425 | .riscv32 => "elf32lriscv", | ||
| 426 | .riscv64 => "elf64lriscv", | ||
| 427 | .sparc, .sparcel => "elf32_sparc", | ||
| 428 | .sparc64 => "elf64_sparc", | ||
| 429 | .loongarch32 => "elf32loongarch", | ||
| 430 | .loongarch64 => "elf64loongarch", | ||
| 431 | .mips => "elf32btsmip", | ||
| 432 | .mipsel => "elf32ltsmip", | ||
| 433 | .mips64 => if (target.abi == .gnuabin32) "elf32btsmipn32" else "elf64btsmip", | ||
| 434 | .mips64el => if (target.abi == .gnuabin32) "elf32ltsmipn32" else "elf64ltsmip", | ||
| 435 | .x86_64 => if (target.abi == .gnux32 or target.abi == .muslx32) "elf32_x86_64" else "elf_x86_64", | ||
| 436 | .ve => "elf64ve", | ||
| 437 | .csky => "cskyelf_linux", | ||
| 438 | else => null, | ||
| 439 | }; | ||
| 440 | } | ||
| 441 | |||
| 442 | pub fn get32BitArchVariant(target: std.Target) ?std.Target { | ||
| 443 | var copy = target; | ||
| 444 | switch (target.cpu.arch) { | ||
| 445 | .amdgcn, | ||
| 446 | .avr, | ||
| 447 | .msp430, | ||
| 448 | .spu_2, | ||
| 449 | .ve, | ||
| 450 | .bpfel, | ||
| 451 | .bpfeb, | ||
| 452 | .s390x, | ||
| 453 | => return null, | ||
| 454 | |||
| 455 | .arc, | ||
| 456 | .arm, | ||
| 457 | .armeb, | ||
| 458 | .csky, | ||
| 459 | .hexagon, | ||
| 460 | .m68k, | ||
| 461 | .le32, | ||
| 462 | .mips, | ||
| 463 | .mipsel, | ||
| 464 | .powerpc, | ||
| 465 | .powerpcle, | ||
| 466 | .r600, | ||
| 467 | .riscv32, | ||
| 468 | .sparc, | ||
| 469 | .sparcel, | ||
| 470 | .tce, | ||
| 471 | .tcele, | ||
| 472 | .thumb, | ||
| 473 | .thumbeb, | ||
| 474 | .x86, | ||
| 475 | .xcore, | ||
| 476 | .nvptx, | ||
| 477 | .amdil, | ||
| 478 | .hsail, | ||
| 479 | .spir, | ||
| 480 | .kalimba, | ||
| 481 | .shave, | ||
| 482 | .lanai, | ||
| 483 | .wasm32, | ||
| 484 | .renderscript32, | ||
| 485 | .aarch64_32, | ||
| 486 | .spirv32, | ||
| 487 | .loongarch32, | ||
| 488 | .dxil, | ||
| 489 | .xtensa, | ||
| 490 | => {}, // Already 32 bit | ||
| 491 | |||
| 492 | .aarch64 => copy.cpu.arch = .arm, | ||
| 493 | .aarch64_be => copy.cpu.arch = .armeb, | ||
| 494 | .le64 => copy.cpu.arch = .le32, | ||
| 495 | .amdil64 => copy.cpu.arch = .amdil, | ||
| 496 | .nvptx64 => copy.cpu.arch = .nvptx, | ||
| 497 | .wasm64 => copy.cpu.arch = .wasm32, | ||
| 498 | .hsail64 => copy.cpu.arch = .hsail, | ||
| 499 | .spir64 => copy.cpu.arch = .spir, | ||
| 500 | .spirv64 => copy.cpu.arch = .spirv32, | ||
| 501 | .renderscript64 => copy.cpu.arch = .renderscript32, | ||
| 502 | .loongarch64 => copy.cpu.arch = .loongarch32, | ||
| 503 | .mips64 => copy.cpu.arch = .mips, | ||
| 504 | .mips64el => copy.cpu.arch = .mipsel, | ||
| 505 | .powerpc64 => copy.cpu.arch = .powerpc, | ||
| 506 | .powerpc64le => copy.cpu.arch = .powerpcle, | ||
| 507 | .riscv64 => copy.cpu.arch = .riscv32, | ||
| 508 | .sparc64 => copy.cpu.arch = .sparc, | ||
| 509 | .x86_64 => copy.cpu.arch = .x86, | ||
| 510 | } | ||
| 511 | return copy; | ||
| 512 | } | ||
| 513 | |||
| 514 | pub fn get64BitArchVariant(target: std.Target) ?std.Target { | ||
| 515 | var copy = target; | ||
| 516 | switch (target.cpu.arch) { | ||
| 517 | .arc, | ||
| 518 | .avr, | ||
| 519 | .csky, | ||
| 520 | .dxil, | ||
| 521 | .hexagon, | ||
| 522 | .kalimba, | ||
| 523 | .lanai, | ||
| 524 | .m68k, | ||
| 525 | .msp430, | ||
| 526 | .r600, | ||
| 527 | .shave, | ||
| 528 | .sparcel, | ||
| 529 | .spu_2, | ||
| 530 | .tce, | ||
| 531 | .tcele, | ||
| 532 | .xcore, | ||
| 533 | .xtensa, | ||
| 534 | => return null, | ||
| 535 | |||
| 536 | .aarch64, | ||
| 537 | .aarch64_be, | ||
| 538 | .amdgcn, | ||
| 539 | .bpfeb, | ||
| 540 | .bpfel, | ||
| 541 | .le64, | ||
| 542 | .amdil64, | ||
| 543 | .nvptx64, | ||
| 544 | .wasm64, | ||
| 545 | .hsail64, | ||
| 546 | .spir64, | ||
| 547 | .spirv64, | ||
| 548 | .renderscript64, | ||
| 549 | .loongarch64, | ||
| 550 | .mips64, | ||
| 551 | .mips64el, | ||
| 552 | .powerpc64, | ||
| 553 | .powerpc64le, | ||
| 554 | .riscv64, | ||
| 555 | .s390x, | ||
| 556 | .sparc64, | ||
| 557 | .ve, | ||
| 558 | .x86_64, | ||
| 559 | => {}, // Already 64 bit | ||
| 560 | |||
| 561 | .aarch64_32 => copy.cpu.arch = .aarch64, | ||
| 562 | .amdil => copy.cpu.arch = .amdil64, | ||
| 563 | .arm => copy.cpu.arch = .aarch64, | ||
| 564 | .armeb => copy.cpu.arch = .aarch64_be, | ||
| 565 | .hsail => copy.cpu.arch = .hsail64, | ||
| 566 | .le32 => copy.cpu.arch = .le64, | ||
| 567 | .loongarch32 => copy.cpu.arch = .loongarch64, | ||
| 568 | .mips => copy.cpu.arch = .mips64, | ||
| 569 | .mipsel => copy.cpu.arch = .mips64el, | ||
| 570 | .nvptx => copy.cpu.arch = .nvptx64, | ||
| 571 | .powerpc => copy.cpu.arch = .powerpc64, | ||
| 572 | .powerpcle => copy.cpu.arch = .powerpc64le, | ||
| 573 | .renderscript32 => copy.cpu.arch = .renderscript64, | ||
| 574 | .riscv32 => copy.cpu.arch = .riscv64, | ||
| 575 | .sparc => copy.cpu.arch = .sparc64, | ||
| 576 | .spir => copy.cpu.arch = .spir64, | ||
| 577 | .spirv32 => copy.cpu.arch = .spirv64, | ||
| 578 | .thumb => copy.cpu.arch = .aarch64, | ||
| 579 | .thumbeb => copy.cpu.arch = .aarch64_be, | ||
| 580 | .wasm32 => copy.cpu.arch = .wasm64, | ||
| 581 | .x86 => copy.cpu.arch = .x86_64, | ||
| 582 | } | ||
| 583 | return copy; | ||
| 584 | } | ||
| 585 | |||
| 586 | /// Adapted from Zig's src/codegen/llvm.zig | ||
| 587 | pub fn toLLVMTriple(target: std.Target, buf: []u8) []const u8 { | ||
| 588 | // 64 bytes is assumed to be large enough to hold any target triple; increase if necessary | ||
| 589 | std.debug.assert(buf.len >= 64); | ||
| 590 | |||
| 591 | var stream = std.io.fixedBufferStream(buf); | ||
| 592 | const writer = stream.writer(); | ||
| 593 | |||
| 594 | const llvm_arch = switch (target.cpu.arch) { | ||
| 595 | .arm => "arm", | ||
| 596 | .armeb => "armeb", | ||
| 597 | .aarch64 => "aarch64", | ||
| 598 | .aarch64_be => "aarch64_be", | ||
| 599 | .aarch64_32 => "aarch64_32", | ||
| 600 | .arc => "arc", | ||
| 601 | .avr => "avr", | ||
| 602 | .bpfel => "bpfel", | ||
| 603 | .bpfeb => "bpfeb", | ||
| 604 | .csky => "csky", | ||
| 605 | .dxil => "dxil", | ||
| 606 | .hexagon => "hexagon", | ||
| 607 | .loongarch32 => "loongarch32", | ||
| 608 | .loongarch64 => "loongarch64", | ||
| 609 | .m68k => "m68k", | ||
| 610 | .mips => "mips", | ||
| 611 | .mipsel => "mipsel", | ||
| 612 | .mips64 => "mips64", | ||
| 613 | .mips64el => "mips64el", | ||
| 614 | .msp430 => "msp430", | ||
| 615 | .powerpc => "powerpc", | ||
| 616 | .powerpcle => "powerpcle", | ||
| 617 | .powerpc64 => "powerpc64", | ||
| 618 | .powerpc64le => "powerpc64le", | ||
| 619 | .r600 => "r600", | ||
| 620 | .amdgcn => "amdgcn", | ||
| 621 | .riscv32 => "riscv32", | ||
| 622 | .riscv64 => "riscv64", | ||
| 623 | .sparc => "sparc", | ||
| 624 | .sparc64 => "sparc64", | ||
| 625 | .sparcel => "sparcel", | ||
| 626 | .s390x => "s390x", | ||
| 627 | .tce => "tce", | ||
| 628 | .tcele => "tcele", | ||
| 629 | .thumb => "thumb", | ||
| 630 | .thumbeb => "thumbeb", | ||
| 631 | .x86 => "i386", | ||
| 632 | .x86_64 => "x86_64", | ||
| 633 | .xcore => "xcore", | ||
| 634 | .xtensa => "xtensa", | ||
| 635 | .nvptx => "nvptx", | ||
| 636 | .nvptx64 => "nvptx64", | ||
| 637 | .le32 => "le32", | ||
| 638 | .le64 => "le64", | ||
| 639 | .amdil => "amdil", | ||
| 640 | .amdil64 => "amdil64", | ||
| 641 | .hsail => "hsail", | ||
| 642 | .hsail64 => "hsail64", | ||
| 643 | .spir => "spir", | ||
| 644 | .spir64 => "spir64", | ||
| 645 | .spirv32 => "spirv32", | ||
| 646 | .spirv64 => "spirv64", | ||
| 647 | .kalimba => "kalimba", | ||
| 648 | .shave => "shave", | ||
| 649 | .lanai => "lanai", | ||
| 650 | .wasm32 => "wasm32", | ||
| 651 | .wasm64 => "wasm64", | ||
| 652 | .renderscript32 => "renderscript32", | ||
| 653 | .renderscript64 => "renderscript64", | ||
| 654 | .ve => "ve", | ||
| 655 | // Note: spu_2 is not supported in LLVM; this is the Zig arch name | ||
| 656 | .spu_2 => "spu_2", | ||
| 657 | }; | ||
| 658 | writer.writeAll(llvm_arch) catch unreachable; | ||
| 659 | writer.writeByte('-') catch unreachable; | ||
| 660 | |||
| 661 | const llvm_os = switch (target.os.tag) { | ||
| 662 | .freestanding => "unknown", | ||
| 663 | .ananas => "ananas", | ||
| 664 | .cloudabi => "cloudabi", | ||
| 665 | .dragonfly => "dragonfly", | ||
| 666 | .freebsd => "freebsd", | ||
| 667 | .fuchsia => "fuchsia", | ||
| 668 | .kfreebsd => "kfreebsd", | ||
| 669 | .linux => "linux", | ||
| 670 | .lv2 => "lv2", | ||
| 671 | .netbsd => "netbsd", | ||
| 672 | .openbsd => "openbsd", | ||
| 673 | .solaris => "solaris", | ||
| 674 | .illumos => "illumos", | ||
| 675 | .windows => "windows", | ||
| 676 | .zos => "zos", | ||
| 677 | .haiku => "haiku", | ||
| 678 | .minix => "minix", | ||
| 679 | .rtems => "rtems", | ||
| 680 | .nacl => "nacl", | ||
| 681 | .aix => "aix", | ||
| 682 | .cuda => "cuda", | ||
| 683 | .nvcl => "nvcl", | ||
| 684 | .amdhsa => "amdhsa", | ||
| 685 | .ps4 => "ps4", | ||
| 686 | .ps5 => "ps5", | ||
| 687 | .elfiamcu => "elfiamcu", | ||
| 688 | .mesa3d => "mesa3d", | ||
| 689 | .contiki => "contiki", | ||
| 690 | .amdpal => "amdpal", | ||
| 691 | .hermit => "hermit", | ||
| 692 | .hurd => "hurd", | ||
| 693 | .wasi => "wasi", | ||
| 694 | .emscripten => "emscripten", | ||
| 695 | .uefi => "windows", | ||
| 696 | .macos => "macosx", | ||
| 697 | .ios => "ios", | ||
| 698 | .tvos => "tvos", | ||
| 699 | .watchos => "watchos", | ||
| 700 | .driverkit => "driverkit", | ||
| 701 | .shadermodel => "shadermodel", | ||
| 702 | .liteos => "liteos", | ||
| 703 | .opencl, | ||
| 704 | .glsl450, | ||
| 705 | .vulkan, | ||
| 706 | .plan9, | ||
| 707 | .other, | ||
| 708 | => "unknown", | ||
| 709 | }; | ||
| 710 | writer.writeAll(llvm_os) catch unreachable; | ||
| 711 | |||
| 712 | if (target.os.tag.isDarwin()) { | ||
| 713 | const min_version = target.os.version_range.semver.min; | ||
| 714 | writer.print("{d}.{d}.{d}", .{ | ||
| 715 | min_version.major, | ||
| 716 | min_version.minor, | ||
| 717 | min_version.patch, | ||
| 718 | }) catch unreachable; | ||
| 719 | } | ||
| 720 | writer.writeByte('-') catch unreachable; | ||
| 721 | |||
| 722 | const llvm_abi = switch (target.abi) { | ||
| 723 | .none => "unknown", | ||
| 724 | .gnu => "gnu", | ||
| 725 | .gnuabin32 => "gnuabin32", | ||
| 726 | .gnuabi64 => "gnuabi64", | ||
| 727 | .gnueabi => "gnueabi", | ||
| 728 | .gnueabihf => "gnueabihf", | ||
| 729 | .gnuf32 => "gnuf32", | ||
| 730 | .gnuf64 => "gnuf64", | ||
| 731 | .gnusf => "gnusf", | ||
| 732 | .gnux32 => "gnux32", | ||
| 733 | .gnuilp32 => "gnuilp32", | ||
| 734 | .code16 => "code16", | ||
| 735 | .eabi => "eabi", | ||
| 736 | .eabihf => "eabihf", | ||
| 737 | .android => "android", | ||
| 738 | .musl => "musl", | ||
| 739 | .musleabi => "musleabi", | ||
| 740 | .musleabihf => "musleabihf", | ||
| 741 | .muslx32 => "muslx32", | ||
| 742 | .msvc => "msvc", | ||
| 743 | .itanium => "itanium", | ||
| 744 | .cygnus => "cygnus", | ||
| 745 | .coreclr => "coreclr", | ||
| 746 | .simulator => "simulator", | ||
| 747 | .macabi => "macabi", | ||
| 748 | .pixel => "pixel", | ||
| 749 | .vertex => "vertex", | ||
| 750 | .geometry => "geometry", | ||
| 751 | .hull => "hull", | ||
| 752 | .domain => "domain", | ||
| 753 | .compute => "compute", | ||
| 754 | .library => "library", | ||
| 755 | .raygeneration => "raygeneration", | ||
| 756 | .intersection => "intersection", | ||
| 757 | .anyhit => "anyhit", | ||
| 758 | .closesthit => "closesthit", | ||
| 759 | .miss => "miss", | ||
| 760 | .callable => "callable", | ||
| 761 | .mesh => "mesh", | ||
| 762 | .amplification => "amplification", | ||
| 763 | }; | ||
| 764 | writer.writeAll(llvm_abi) catch unreachable; | ||
| 765 | return stream.getWritten(); | ||
| 766 | } | ||
| 767 | |||
| 768 | test "alignment functions - smoke test" { | ||
| 769 | var target: std.Target = undefined; | ||
| 770 | const x86 = std.Target.Cpu.Arch.x86_64; | ||
| 771 | target.cpu = std.Target.Cpu.baseline(x86); | ||
| 772 | target.os = std.Target.Os.Tag.defaultVersionRange(.linux, x86); | ||
| 773 | target.abi = std.Target.Abi.default(x86, target.os); | ||
| 774 | |||
| 775 | try std.testing.expect(isTlsSupported(target)); | ||
| 776 | try std.testing.expect(!ignoreNonZeroSizedBitfieldTypeAlignment(target)); | ||
| 777 | try std.testing.expect(minZeroWidthBitfieldAlignment(target) == null); | ||
| 778 | try std.testing.expect(!unnamedFieldAffectsAlignment(target)); | ||
| 779 | try std.testing.expect(defaultAlignment(target) == 16); | ||
| 780 | try std.testing.expect(!packAllEnums(target)); | ||
| 781 | try std.testing.expect(systemCompiler(target) == .gcc); | ||
| 782 | |||
| 783 | const arm = std.Target.Cpu.Arch.arm; | ||
| 784 | target.cpu = std.Target.Cpu.baseline(arm); | ||
| 785 | target.os = std.Target.Os.Tag.defaultVersionRange(.ios, arm); | ||
| 786 | target.abi = std.Target.Abi.default(arm, target.os); | ||
| 787 | |||
| 788 | try std.testing.expect(!isTlsSupported(target)); | ||
| 789 | try std.testing.expect(ignoreNonZeroSizedBitfieldTypeAlignment(target)); | ||
| 790 | try std.testing.expectEqual(@as(?u29, 32), minZeroWidthBitfieldAlignment(target)); | ||
| 791 | try std.testing.expect(unnamedFieldAffectsAlignment(target)); | ||
| 792 | try std.testing.expect(defaultAlignment(target) == 16); | ||
| 793 | try std.testing.expect(!packAllEnums(target)); | ||
| 794 | try std.testing.expect(systemCompiler(target) == .clang); | ||
| 795 | } | ||
| 796 | |||
| 797 | test "target size/align tests" { | ||
| 798 | var comp: @import("Compilation.zig") = undefined; | ||
| 799 | |||
| 800 | const x86 = std.Target.Cpu.Arch.x86; | ||
| 801 | comp.target.cpu.arch = x86; | ||
| 802 | comp.target.cpu.model = &std.Target.x86.cpu.i586; | ||
| 803 | comp.target.os = std.Target.Os.Tag.defaultVersionRange(.linux, x86); | ||
| 804 | comp.target.abi = std.Target.Abi.gnu; | ||
| 805 | |||
| 806 | const tt: Type = .{ | ||
| 807 | .specifier = .long_long, | ||
| 808 | }; | ||
| 809 | |||
| 810 | try std.testing.expectEqual(@as(u64, 8), tt.sizeof(&comp).?); | ||
| 811 | try std.testing.expectEqual(@as(u64, 4), tt.alignof(&comp)); | ||
| 812 | |||
| 813 | const arm = std.Target.Cpu.Arch.arm; | ||
| 814 | comp.target.cpu = std.Target.Cpu.Model.toCpu(&std.Target.arm.cpu.cortex_r4, arm); | ||
| 815 | comp.target.os = std.Target.Os.Tag.defaultVersionRange(.ios, arm); | ||
| 816 | comp.target.abi = std.Target.Abi.none; | ||
| 817 | |||
| 818 | const ct: Type = .{ | ||
| 819 | .specifier = .char, | ||
| 820 | }; | ||
| 821 | |||
| 822 | try std.testing.expectEqual(true, std.Target.arm.featureSetHas(comp.target.cpu.features, .has_v7)); | ||
| 823 | try std.testing.expectEqual(@as(u64, 1), ct.sizeof(&comp).?); | ||
| 824 | try std.testing.expectEqual(@as(u64, 1), ct.alignof(&comp)); | ||
| 825 | try std.testing.expectEqual(true, ignoreNonZeroSizedBitfieldTypeAlignment(comp.target)); | ||
| 826 | } | ||
| 827 | |||
| 828 | /// The canonical integer representation of nullptr_t. | ||
| 829 | pub fn nullRepr(_: std.Target) u64 { | ||
| 830 | return 0; | ||
| 831 | } | ||
deps/aro/aro/text_literal.zig created+371| ... | @@ -0,0 +1,371 @@ | ||
| 1 | //! Parsing and classification of string and character literals | ||
| 2 | |||
| 3 | const std = @import("std"); | ||
| 4 | const Compilation = @import("Compilation.zig"); | ||
| 5 | const Type = @import("Type.zig"); | ||
| 6 | const Diagnostics = @import("Diagnostics.zig"); | ||
| 7 | const Tokenizer = @import("Tokenizer.zig"); | ||
| 8 | const mem = std.mem; | ||
| 9 | |||
| 10 | pub const Item = union(enum) { | ||
| 11 | /// decoded hex or character escape | ||
| 12 | value: u32, | ||
| 13 | /// validated unicode codepoint | ||
| 14 | codepoint: u21, | ||
| 15 | /// Char literal in the source text is not utf8 encoded | ||
| 16 | improperly_encoded: []const u8, | ||
| 17 | /// 1 or more unescaped bytes | ||
| 18 | utf8_text: std.unicode.Utf8View, | ||
| 19 | }; | ||
| 20 | |||
| 21 | const CharDiagnostic = struct { | ||
| 22 | tag: Diagnostics.Tag, | ||
| 23 | extra: Diagnostics.Message.Extra, | ||
| 24 | }; | ||
| 25 | |||
| 26 | pub const Kind = enum { | ||
| 27 | char, | ||
| 28 | wide, | ||
| 29 | utf_8, | ||
| 30 | utf_16, | ||
| 31 | utf_32, | ||
| 32 | /// Error kind that halts parsing | ||
| 33 | unterminated, | ||
| 34 | |||
| 35 | pub fn classify(id: Tokenizer.Token.Id, context: enum { string_literal, char_literal }) ?Kind { | ||
| 36 | return switch (context) { | ||
| 37 | .string_literal => switch (id) { | ||
| 38 | .string_literal => .char, | ||
| 39 | .string_literal_utf_8 => .utf_8, | ||
| 40 | .string_literal_wide => .wide, | ||
| 41 | .string_literal_utf_16 => .utf_16, | ||
| 42 | .string_literal_utf_32 => .utf_32, | ||
| 43 | .unterminated_string_literal => .unterminated, | ||
| 44 | else => null, | ||
| 45 | }, | ||
| 46 | .char_literal => switch (id) { | ||
| 47 | .char_literal => .char, | ||
| 48 | .char_literal_utf_8 => .utf_8, | ||
| 49 | .char_literal_wide => .wide, | ||
| 50 | .char_literal_utf_16 => .utf_16, | ||
| 51 | .char_literal_utf_32 => .utf_32, | ||
| 52 | else => null, | ||
| 53 | }, | ||
| 54 | }; | ||
| 55 | } | ||
| 56 | |||
| 57 | /// Should only be called for string literals. Determines the result kind of two adjacent string | ||
| 58 | /// literals | ||
| 59 | pub fn concat(self: Kind, other: Kind) !Kind { | ||
| 60 | if (self == .unterminated or other == .unterminated) return .unterminated; | ||
| 61 | if (self == other) return self; // can always concat with own kind | ||
| 62 | if (self == .char) return other; // char + X -> X | ||
| 63 | if (other == .char) return self; // X + char -> X | ||
| 64 | return error.CannotConcat; | ||
| 65 | } | ||
| 66 | |||
| 67 | /// Largest unicode codepoint that can be represented by this character kind | ||
| 68 | /// May be smaller than the largest value that can be represented. | ||
| 69 | /// For example u8 char literals may only specify 0-127 via literals or | ||
| 70 | /// character escapes, but may specify up to \xFF via hex escapes. | ||
| 71 | pub fn maxCodepoint(kind: Kind, comp: *const Compilation) u21 { | ||
| 72 | return @intCast(switch (kind) { | ||
| 73 | .char => std.math.maxInt(u7), | ||
| 74 | .wide => @min(0x10FFFF, comp.types.wchar.maxInt(comp)), | ||
| 75 | .utf_8 => std.math.maxInt(u7), | ||
| 76 | .utf_16 => std.math.maxInt(u16), | ||
| 77 | .utf_32 => 0x10FFFF, | ||
| 78 | .unterminated => unreachable, | ||
| 79 | }); | ||
| 80 | } | ||
| 81 | |||
| 82 | /// Largest integer that can be represented by this character kind | ||
| 83 | pub fn maxInt(kind: Kind, comp: *const Compilation) u32 { | ||
| 84 | return @intCast(switch (kind) { | ||
| 85 | .char, .utf_8 => std.math.maxInt(u8), | ||
| 86 | .wide => comp.types.wchar.maxInt(comp), | ||
| 87 | .utf_16 => std.math.maxInt(u16), | ||
| 88 | .utf_32 => std.math.maxInt(u32), | ||
| 89 | .unterminated => unreachable, | ||
| 90 | }); | ||
| 91 | } | ||
| 92 | |||
| 93 | /// The C type of a character literal of this kind | ||
| 94 | pub fn charLiteralType(kind: Kind, comp: *const Compilation) Type { | ||
| 95 | return switch (kind) { | ||
| 96 | .char => Type.int, | ||
| 97 | .wide => comp.types.wchar, | ||
| 98 | .utf_8 => .{ .specifier = .uchar }, | ||
| 99 | .utf_16 => comp.types.uint_least16_t, | ||
| 100 | .utf_32 => comp.types.uint_least32_t, | ||
| 101 | .unterminated => unreachable, | ||
| 102 | }; | ||
| 103 | } | ||
| 104 | |||
| 105 | /// Return the actual contents of the literal with leading / trailing quotes and | ||
| 106 | /// specifiers removed | ||
| 107 | pub fn contentSlice(kind: Kind, delimited: []const u8) []const u8 { | ||
| 108 | const end = delimited.len - 1; // remove trailing quote | ||
| 109 | return switch (kind) { | ||
| 110 | .char => delimited[1..end], | ||
| 111 | .wide => delimited[2..end], | ||
| 112 | .utf_8 => delimited[3..end], | ||
| 113 | .utf_16 => delimited[2..end], | ||
| 114 | .utf_32 => delimited[2..end], | ||
| 115 | .unterminated => unreachable, | ||
| 116 | }; | ||
| 117 | } | ||
| 118 | |||
| 119 | /// The size of a character unit for a string literal of this kind | ||
| 120 | pub fn charUnitSize(kind: Kind, comp: *const Compilation) Compilation.CharUnitSize { | ||
| 121 | return switch (kind) { | ||
| 122 | .char => .@"1", | ||
| 123 | .wide => switch (comp.types.wchar.sizeof(comp).?) { | ||
| 124 | 2 => .@"2", | ||
| 125 | 4 => .@"4", | ||
| 126 | else => unreachable, | ||
| 127 | }, | ||
| 128 | .utf_8 => .@"1", | ||
| 129 | .utf_16 => .@"2", | ||
| 130 | .utf_32 => .@"4", | ||
| 131 | .unterminated => unreachable, | ||
| 132 | }; | ||
| 133 | } | ||
| 134 | |||
| 135 | /// Required alignment within aro (on compiler host) for writing to Interner.strings. | ||
| 136 | pub fn internalStorageAlignment(kind: Kind, comp: *const Compilation) usize { | ||
| 137 | return switch (kind.charUnitSize(comp)) { | ||
| 138 | inline else => |size| @alignOf(size.Type()), | ||
| 139 | }; | ||
| 140 | } | ||
| 141 | |||
| 142 | /// The C type of an element of a string literal of this kind | ||
| 143 | pub fn elementType(kind: Kind, comp: *const Compilation) Type { | ||
| 144 | return switch (kind) { | ||
| 145 | .unterminated => unreachable, | ||
| 146 | .char => .{ .specifier = .char }, | ||
| 147 | .utf_8 => if (comp.langopts.hasChar8_T()) .{ .specifier = .uchar } else .{ .specifier = .char }, | ||
| 148 | else => kind.charLiteralType(comp), | ||
| 149 | }; | ||
| 150 | } | ||
| 151 | }; | ||
| 152 | |||
| 153 | pub const Parser = struct { | ||
| 154 | literal: []const u8, | ||
| 155 | i: usize = 0, | ||
| 156 | kind: Kind, | ||
| 157 | max_codepoint: u21, | ||
| 158 | /// We only want to issue a max of 1 error per char literal | ||
| 159 | errored: bool = false, | ||
| 160 | errors: std.BoundedArray(CharDiagnostic, 4) = .{}, | ||
| 161 | comp: *const Compilation, | ||
| 162 | |||
| 163 | pub fn init(literal: []const u8, kind: Kind, max_codepoint: u21, comp: *const Compilation) Parser { | ||
| 164 | return .{ | ||
| 165 | .literal = literal, | ||
| 166 | .comp = comp, | ||
| 167 | .kind = kind, | ||
| 168 | .max_codepoint = max_codepoint, | ||
| 169 | }; | ||
| 170 | } | ||
| 171 | |||
| 172 | fn prefixLen(self: *const Parser) usize { | ||
| 173 | return switch (self.kind) { | ||
| 174 | .unterminated => unreachable, | ||
| 175 | .char => 0, | ||
| 176 | .utf_8 => 2, | ||
| 177 | .wide, .utf_16, .utf_32 => 1, | ||
| 178 | }; | ||
| 179 | } | ||
| 180 | |||
| 181 | pub fn err(self: *Parser, tag: Diagnostics.Tag, extra: Diagnostics.Message.Extra) void { | ||
| 182 | if (self.errored) return; | ||
| 183 | self.errored = true; | ||
| 184 | const diagnostic = .{ .tag = tag, .extra = extra }; | ||
| 185 | self.errors.append(diagnostic) catch { | ||
| 186 | _ = self.errors.pop(); | ||
| 187 | self.errors.append(diagnostic) catch unreachable; | ||
| 188 | }; | ||
| 189 | } | ||
| 190 | |||
| 191 | pub fn warn(self: *Parser, tag: Diagnostics.Tag, extra: Diagnostics.Message.Extra) void { | ||
| 192 | if (self.errored) return; | ||
| 193 | self.errors.append(.{ .tag = tag, .extra = extra }) catch {}; | ||
| 194 | } | ||
| 195 | |||
| 196 | pub fn next(self: *Parser) ?Item { | ||
| 197 | if (self.i >= self.literal.len) return null; | ||
| 198 | |||
| 199 | const start = self.i; | ||
| 200 | if (self.literal[start] != '\\') { | ||
| 201 | self.i = mem.indexOfScalarPos(u8, self.literal, start + 1, '\\') orelse self.literal.len; | ||
| 202 | const unescaped_slice = self.literal[start..self.i]; | ||
| 203 | |||
| 204 | const view = std.unicode.Utf8View.init(unescaped_slice) catch { | ||
| 205 | if (self.kind != .char) { | ||
| 206 | self.err(.illegal_char_encoding_error, .{ .none = {} }); | ||
| 207 | return null; | ||
| 208 | } | ||
| 209 | self.warn(.illegal_char_encoding_warning, .{ .none = {} }); | ||
| 210 | return .{ .improperly_encoded = self.literal[start..self.i] }; | ||
| 211 | }; | ||
| 212 | return .{ .utf8_text = view }; | ||
| 213 | } | ||
| 214 | switch (self.literal[start + 1]) { | ||
| 215 | 'u', 'U' => return self.parseUnicodeEscape(), | ||
| 216 | else => return self.parseEscapedChar(), | ||
| 217 | } | ||
| 218 | } | ||
| 219 | |||
| 220 | fn parseUnicodeEscape(self: *Parser) ?Item { | ||
| 221 | const start = self.i; | ||
| 222 | |||
| 223 | std.debug.assert(self.literal[self.i] == '\\'); | ||
| 224 | |||
| 225 | const kind = self.literal[self.i + 1]; | ||
| 226 | std.debug.assert(kind == 'u' or kind == 'U'); | ||
| 227 | |||
| 228 | self.i += 2; | ||
| 229 | if (self.i >= self.literal.len or !std.ascii.isHex(self.literal[self.i])) { | ||
| 230 | self.err(.missing_hex_escape, .{ .ascii = @intCast(kind) }); | ||
| 231 | return null; | ||
| 232 | } | ||
| 233 | const expected_len: usize = if (kind == 'u') 4 else 8; | ||
| 234 | var overflowed = false; | ||
| 235 | var count: usize = 0; | ||
| 236 | var val: u32 = 0; | ||
| 237 | |||
| 238 | for (self.literal[self.i..], 0..) |c, i| { | ||
| 239 | if (i == expected_len) break; | ||
| 240 | |||
| 241 | const char = std.fmt.charToDigit(c, 16) catch { | ||
| 242 | break; | ||
| 243 | }; | ||
| 244 | |||
| 245 | val, const overflow = @shlWithOverflow(val, 4); | ||
| 246 | overflowed = overflowed or overflow != 0; | ||
| 247 | val |= char; | ||
| 248 | count += 1; | ||
| 249 | } | ||
| 250 | self.i += expected_len; | ||
| 251 | |||
| 252 | if (overflowed) { | ||
| 253 | self.err(.escape_sequence_overflow, .{ .offset = start + self.prefixLen() }); | ||
| 254 | return null; | ||
| 255 | } | ||
| 256 | |||
| 257 | if (count != expected_len) { | ||
| 258 | self.err(.incomplete_universal_character, .{ .none = {} }); | ||
| 259 | return null; | ||
| 260 | } | ||
| 261 | |||
| 262 | if (val > std.math.maxInt(u21) or !std.unicode.utf8ValidCodepoint(@intCast(val))) { | ||
| 263 | self.err(.invalid_universal_character, .{ .offset = start + self.prefixLen() }); | ||
| 264 | return null; | ||
| 265 | } | ||
| 266 | |||
| 267 | if (val > self.max_codepoint) { | ||
| 268 | self.err(.char_too_large, .{ .none = {} }); | ||
| 269 | return null; | ||
| 270 | } | ||
| 271 | |||
| 272 | if (val < 0xA0 and (val != '$' and val != '@' and val != '`')) { | ||
| 273 | const is_error = !self.comp.langopts.standard.atLeast(.c23); | ||
| 274 | if (val >= 0x20 and val <= 0x7F) { | ||
| 275 | if (is_error) { | ||
| 276 | self.err(.ucn_basic_char_error, .{ .ascii = @intCast(val) }); | ||
| 277 | } else { | ||
| 278 | self.warn(.ucn_basic_char_warning, .{ .ascii = @intCast(val) }); | ||
| 279 | } | ||
| 280 | } else { | ||
| 281 | if (is_error) { | ||
| 282 | self.err(.ucn_control_char_error, .{ .none = {} }); | ||
| 283 | } else { | ||
| 284 | self.warn(.ucn_control_char_warning, .{ .none = {} }); | ||
| 285 | } | ||
| 286 | } | ||
| 287 | } | ||
| 288 | |||
| 289 | self.warn(.c89_ucn_in_literal, .{ .none = {} }); | ||
| 290 | return .{ .codepoint = @intCast(val) }; | ||
| 291 | } | ||
| 292 | |||
| 293 | fn parseEscapedChar(self: *Parser) Item { | ||
| 294 | self.i += 1; | ||
| 295 | const c = self.literal[self.i]; | ||
| 296 | defer if (c != 'x' and (c < '0' or c > '7')) { | ||
| 297 | self.i += 1; | ||
| 298 | }; | ||
| 299 | |||
| 300 | switch (c) { | ||
| 301 | '\n' => unreachable, // removed by line splicing | ||
| 302 | '\r' => unreachable, // removed by line splicing | ||
| 303 | '\'', '\"', '\\', '?' => return .{ .value = c }, | ||
| 304 | 'n' => return .{ .value = '\n' }, | ||
| 305 | 'r' => return .{ .value = '\r' }, | ||
| 306 | 't' => return .{ .value = '\t' }, | ||
| 307 | 'a' => return .{ .value = 0x07 }, | ||
| 308 | 'b' => return .{ .value = 0x08 }, | ||
| 309 | 'e', 'E' => { | ||
| 310 | self.warn(.non_standard_escape_char, .{ .invalid_escape = .{ .char = c, .offset = @intCast(self.i) } }); | ||
| 311 | return .{ .value = 0x1B }; | ||
| 312 | }, | ||
| 313 | '(', '{', '[', '%' => { | ||
| 314 | self.warn(.non_standard_escape_char, .{ .invalid_escape = .{ .char = c, .offset = @intCast(self.i) } }); | ||
| 315 | return .{ .value = c }; | ||
| 316 | }, | ||
| 317 | 'f' => return .{ .value = 0x0C }, | ||
| 318 | 'v' => return .{ .value = 0x0B }, | ||
| 319 | 'x' => return .{ .value = self.parseNumberEscape(.hex) }, | ||
| 320 | '0'...'7' => return .{ .value = self.parseNumberEscape(.octal) }, | ||
| 321 | 'u', 'U' => unreachable, // handled by parseUnicodeEscape | ||
| 322 | else => { | ||
| 323 | self.warn(.unknown_escape_sequence, .{ .invalid_escape = .{ .char = c, .offset = @intCast(self.i) } }); | ||
| 324 | return .{ .value = c }; | ||
| 325 | }, | ||
| 326 | } | ||
| 327 | } | ||
| 328 | |||
| 329 | fn parseNumberEscape(self: *Parser, base: EscapeBase) u32 { | ||
| 330 | var val: u32 = 0; | ||
| 331 | var count: usize = 0; | ||
| 332 | var overflowed = false; | ||
| 333 | const start = self.i; | ||
| 334 | defer self.i += count; | ||
| 335 | const slice = switch (base) { | ||
| 336 | .octal => self.literal[self.i..@min(self.literal.len, self.i + 3)], // max 3 chars | ||
| 337 | .hex => blk: { | ||
| 338 | self.i += 1; | ||
| 339 | break :blk self.literal[self.i..]; // skip over 'x'; could have an arbitrary number of chars | ||
| 340 | }, | ||
| 341 | }; | ||
| 342 | for (slice) |c| { | ||
| 343 | const char = std.fmt.charToDigit(c, @intFromEnum(base)) catch break; | ||
| 344 | val, const overflow = @shlWithOverflow(val, base.log2()); | ||
| 345 | if (overflow != 0) overflowed = true; | ||
| 346 | val += char; | ||
| 347 | count += 1; | ||
| 348 | } | ||
| 349 | if (overflowed or val > self.kind.maxInt(self.comp)) { | ||
| 350 | self.err(.escape_sequence_overflow, .{ .offset = start + self.prefixLen() }); | ||
| 351 | return 0; | ||
| 352 | } | ||
| 353 | if (count == 0) { | ||
| 354 | std.debug.assert(base == .hex); | ||
| 355 | self.err(.missing_hex_escape, .{ .ascii = 'x' }); | ||
| 356 | } | ||
| 357 | return val; | ||
| 358 | } | ||
| 359 | }; | ||
| 360 | |||
| 361 | const EscapeBase = enum(u8) { | ||
| 362 | octal = 8, | ||
| 363 | hex = 16, | ||
| 364 | |||
| 365 | fn log2(base: EscapeBase) u4 { | ||
| 366 | return switch (base) { | ||
| 367 | .octal => 3, | ||
| 368 | .hex => 4, | ||
| 369 | }; | ||
| 370 | } | ||
| 371 | }; | ||
deps/aro/aro/toolchains/Linux.zig created+483| ... | @@ -0,0 +1,483 @@ | ||
| 1 | const std = @import("std"); | ||
| 2 | const mem = std.mem; | ||
| 3 | const Compilation = @import("../Compilation.zig"); | ||
| 4 | const GCCDetector = @import("../Driver/GCCDetector.zig"); | ||
| 5 | const Toolchain = @import("../Toolchain.zig"); | ||
| 6 | const Driver = @import("../Driver.zig"); | ||
| 7 | const Distro = @import("../Driver/Distro.zig"); | ||
| 8 | const target_util = @import("../target.zig"); | ||
| 9 | const system_defaults = @import("system_defaults"); | ||
| 10 | |||
| 11 | const Linux = @This(); | ||
| 12 | |||
| 13 | distro: Distro.Tag = .unknown, | ||
| 14 | extra_opts: std.ArrayListUnmanaged([]const u8) = .{}, | ||
| 15 | gcc_detector: GCCDetector = .{}, | ||
| 16 | |||
| 17 | pub fn discover(self: *Linux, tc: *Toolchain) !void { | ||
| 18 | self.distro = Distro.detect(tc.getTarget(), tc.filesystem); | ||
| 19 | try self.gcc_detector.discover(tc); | ||
| 20 | tc.selected_multilib = self.gcc_detector.selected; | ||
| 21 | |||
| 22 | try self.gcc_detector.appendToolPath(tc); | ||
| 23 | try self.buildExtraOpts(tc); | ||
| 24 | try self.findPaths(tc); | ||
| 25 | } | ||
| 26 | |||
| 27 | fn buildExtraOpts(self: *Linux, tc: *const Toolchain) !void { | ||
| 28 | const gpa = tc.driver.comp.gpa; | ||
| 29 | const target = tc.getTarget(); | ||
| 30 | const is_android = target.isAndroid(); | ||
| 31 | if (self.distro.isAlpine() or is_android) { | ||
| 32 | try self.extra_opts.ensureUnusedCapacity(gpa, 2); | ||
| 33 | self.extra_opts.appendAssumeCapacity("-z"); | ||
| 34 | self.extra_opts.appendAssumeCapacity("now"); | ||
| 35 | } | ||
| 36 | |||
| 37 | if (self.distro.isOpenSUSE() or self.distro.isUbuntu() or self.distro.isAlpine() or is_android) { | ||
| 38 | try self.extra_opts.ensureUnusedCapacity(gpa, 2); | ||
| 39 | self.extra_opts.appendAssumeCapacity("-z"); | ||
| 40 | self.extra_opts.appendAssumeCapacity("relro"); | ||
| 41 | } | ||
| 42 | |||
| 43 | if (target.cpu.arch.isARM() or target.cpu.arch.isAARCH64() or is_android) { | ||
| 44 | try self.extra_opts.ensureUnusedCapacity(gpa, 2); | ||
| 45 | self.extra_opts.appendAssumeCapacity("-z"); | ||
| 46 | self.extra_opts.appendAssumeCapacity("max-page-size=4096"); | ||
| 47 | } | ||
| 48 | |||
| 49 | if (target.cpu.arch == .arm or target.cpu.arch == .thumb) { | ||
| 50 | try self.extra_opts.append(gpa, "-X"); | ||
| 51 | } | ||
| 52 | |||
| 53 | if (!target.cpu.arch.isMIPS() and target.cpu.arch != .hexagon) { | ||
| 54 | const hash_style = if (is_android) .both else self.distro.getHashStyle(); | ||
| 55 | try self.extra_opts.append(gpa, switch (hash_style) { | ||
| 56 | inline else => |tag| "--hash-style=" ++ @tagName(tag), | ||
| 57 | }); | ||
| 58 | } | ||
| 59 | |||
| 60 | if (system_defaults.enable_linker_build_id) { | ||
| 61 | try self.extra_opts.append(gpa, "--build-id"); | ||
| 62 | } | ||
| 63 | } | ||
| 64 | |||
| 65 | fn addMultiLibPaths(self: *Linux, tc: *Toolchain, sysroot: []const u8, os_lib_dir: []const u8) !void { | ||
| 66 | if (!self.gcc_detector.is_valid) return; | ||
| 67 | const gcc_triple = self.gcc_detector.gcc_triple; | ||
| 68 | const lib_path = self.gcc_detector.parent_lib_path; | ||
| 69 | |||
| 70 | // Add lib/gcc/$triple/$version, with an optional /multilib suffix. | ||
| 71 | try tc.addPathIfExists(&.{ self.gcc_detector.install_path, tc.selected_multilib.gcc_suffix }, .file); | ||
| 72 | |||
| 73 | // Add lib/gcc/$triple/$libdir | ||
| 74 | // For GCC built with --enable-version-specific-runtime-libs. | ||
| 75 | try tc.addPathIfExists(&.{ self.gcc_detector.install_path, "..", os_lib_dir }, .file); | ||
| 76 | |||
| 77 | try tc.addPathIfExists(&.{ lib_path, "..", gcc_triple, "lib", "..", os_lib_dir, tc.selected_multilib.os_suffix }, .file); | ||
| 78 | |||
| 79 | // If the GCC installation we found is inside of the sysroot, we want to | ||
| 80 | // prefer libraries installed in the parent prefix of the GCC installation. | ||
| 81 | // It is important to *not* use these paths when the GCC installation is | ||
| 82 | // outside of the system root as that can pick up unintended libraries. | ||
| 83 | // This usually happens when there is an external cross compiler on the | ||
| 84 | // host system, and a more minimal sysroot available that is the target of | ||
| 85 | // the cross. Note that GCC does include some of these directories in some | ||
| 86 | // configurations but this seems somewhere between questionable and simply | ||
| 87 | // a bug. | ||
| 88 | if (mem.startsWith(u8, lib_path, sysroot)) { | ||
| 89 | try tc.addPathIfExists(&.{ lib_path, "..", os_lib_dir }, .file); | ||
| 90 | } | ||
| 91 | } | ||
| 92 | |||
| 93 | fn addMultiArchPaths(self: *Linux, tc: *Toolchain) !void { | ||
| 94 | if (!self.gcc_detector.is_valid) return; | ||
| 95 | const lib_path = self.gcc_detector.parent_lib_path; | ||
| 96 | const gcc_triple = self.gcc_detector.gcc_triple; | ||
| 97 | const multilib = self.gcc_detector.selected; | ||
| 98 | try tc.addPathIfExists(&.{ lib_path, "..", gcc_triple, "lib", multilib.os_suffix }, .file); | ||
| 99 | } | ||
| 100 | |||
| 101 | /// TODO: Very incomplete | ||
| 102 | fn findPaths(self: *Linux, tc: *Toolchain) !void { | ||
| 103 | const target = tc.getTarget(); | ||
| 104 | const sysroot = tc.getSysroot(); | ||
| 105 | |||
| 106 | var output: [64]u8 = undefined; | ||
| 107 | |||
| 108 | const os_lib_dir = getOSLibDir(target); | ||
| 109 | const multiarch_triple = getMultiarchTriple(target) orelse target_util.toLLVMTriple(target, &output); | ||
| 110 | |||
| 111 | try self.addMultiLibPaths(tc, sysroot, os_lib_dir); | ||
| 112 | |||
| 113 | try tc.addPathIfExists(&.{ sysroot, "/lib", multiarch_triple }, .file); | ||
| 114 | try tc.addPathIfExists(&.{ sysroot, "/lib", "..", os_lib_dir }, .file); | ||
| 115 | |||
| 116 | if (target.isAndroid()) { | ||
| 117 | // TODO | ||
| 118 | } | ||
| 119 | try tc.addPathIfExists(&.{ sysroot, "/usr", "lib", multiarch_triple }, .file); | ||
| 120 | try tc.addPathIfExists(&.{ sysroot, "/usr", "lib", "..", os_lib_dir }, .file); | ||
| 121 | |||
| 122 | try self.addMultiArchPaths(tc); | ||
| 123 | |||
| 124 | try tc.addPathIfExists(&.{ sysroot, "/lib" }, .file); | ||
| 125 | try tc.addPathIfExists(&.{ sysroot, "/usr", "lib" }, .file); | ||
| 126 | } | ||
| 127 | |||
| 128 | pub fn deinit(self: *Linux, allocator: std.mem.Allocator) void { | ||
| 129 | self.extra_opts.deinit(allocator); | ||
| 130 | } | ||
| 131 | |||
| 132 | fn isPIEDefault(self: *const Linux) bool { | ||
| 133 | _ = self; | ||
| 134 | return false; | ||
| 135 | } | ||
| 136 | |||
| 137 | fn getPIE(self: *const Linux, d: *const Driver) bool { | ||
| 138 | if (d.shared or d.static or d.relocatable or d.static_pie) { | ||
| 139 | return false; | ||
| 140 | } | ||
| 141 | return d.pie orelse self.isPIEDefault(); | ||
| 142 | } | ||
| 143 | |||
| 144 | fn getStaticPIE(self: *const Linux, d: *Driver) !bool { | ||
| 145 | _ = self; | ||
| 146 | if (d.static_pie and d.pie != null) { | ||
| 147 | try d.err("cannot specify 'nopie' along with 'static-pie'"); | ||
| 148 | } | ||
| 149 | return d.static_pie; | ||
| 150 | } | ||
| 151 | |||
| 152 | fn getStatic(self: *const Linux, d: *const Driver) bool { | ||
| 153 | _ = self; | ||
| 154 | return d.static and !d.static_pie; | ||
| 155 | } | ||
| 156 | |||
| 157 | pub fn getDefaultLinker(self: *const Linux, target: std.Target) []const u8 { | ||
| 158 | _ = self; | ||
| 159 | if (target.isAndroid()) { | ||
| 160 | return "ld.lld"; | ||
| 161 | } | ||
| 162 | return "ld"; | ||
| 163 | } | ||
| 164 | |||
| 165 | pub fn buildLinkerArgs(self: *const Linux, tc: *const Toolchain, argv: *std.ArrayList([]const u8)) Compilation.Error!void { | ||
| 166 | const d = tc.driver; | ||
| 167 | const target = tc.getTarget(); | ||
| 168 | |||
| 169 | const is_pie = self.getPIE(d); | ||
| 170 | const is_static_pie = try self.getStaticPIE(d); | ||
| 171 | const is_static = self.getStatic(d); | ||
| 172 | const is_android = target.isAndroid(); | ||
| 173 | const is_iamcu = target.os.tag == .elfiamcu; | ||
| 174 | const is_ve = target.cpu.arch == .ve; | ||
| 175 | const has_crt_begin_end_files = target.abi != .none; // TODO: clang checks for MIPS vendor | ||
| 176 | |||
| 177 | if (is_pie) { | ||
| 178 | try argv.append("-pie"); | ||
| 179 | } | ||
| 180 | if (is_static_pie) { | ||
| 181 | try argv.appendSlice(&.{ "-static", "-pie", "--no-dynamic-linker", "-z", "text" }); | ||
| 182 | } | ||
| 183 | |||
| 184 | if (d.rdynamic) { | ||
| 185 | try argv.append("-export-dynamic"); | ||
| 186 | } | ||
| 187 | |||
| 188 | if (d.strip) { | ||
| 189 | try argv.append("-s"); | ||
| 190 | } | ||
| 191 | |||
| 192 | try argv.appendSlice(self.extra_opts.items); | ||
| 193 | try argv.append("--eh-frame-hdr"); | ||
| 194 | |||
| 195 | // Todo: Driver should parse `-EL`/`-EB` for arm to set endianness for arm targets | ||
| 196 | if (target_util.ldEmulationOption(d.comp.target, null)) |emulation| { | ||
| 197 | try argv.appendSlice(&.{ "-m", emulation }); | ||
| 198 | } else { | ||
| 199 | try d.err("Unknown target triple"); | ||
| 200 | return; | ||
| 201 | } | ||
| 202 | if (d.comp.target.cpu.arch.isRISCV()) { | ||
| 203 | try argv.append("-X"); | ||
| 204 | } | ||
| 205 | if (d.shared) { | ||
| 206 | try argv.append("-shared"); | ||
| 207 | } | ||
| 208 | if (is_static) { | ||
| 209 | try argv.append("-static"); | ||
| 210 | } else { | ||
| 211 | if (d.rdynamic) { | ||
| 212 | try argv.append("-export-dynamic"); | ||
| 213 | } | ||
| 214 | if (!d.shared and !is_static_pie and !d.relocatable) { | ||
| 215 | const dynamic_linker = d.comp.target.standardDynamicLinkerPath(); | ||
| 216 | // todo: check for --dyld-prefix | ||
| 217 | if (dynamic_linker.get()) |path| { | ||
| 218 | try argv.appendSlice(&.{ "-dynamic-linker", try tc.arena.dupe(u8, path) }); | ||
| 219 | } else { | ||
| 220 | try d.err("Could not find dynamic linker path"); | ||
| 221 | } | ||
| 222 | } | ||
| 223 | } | ||
| 224 | |||
| 225 | try argv.appendSlice(&.{ "-o", d.output_name orelse "a.out" }); | ||
| 226 | |||
| 227 | if (!d.nostdlib and !d.nostartfiles and !d.relocatable) { | ||
| 228 | if (!is_android and !is_iamcu) { | ||
| 229 | if (!d.shared) { | ||
| 230 | const crt1 = if (is_pie) | ||
| 231 | "Scrt1.o" | ||
| 232 | else if (is_static_pie) | ||
| 233 | "rcrt1.o" | ||
| 234 | else | ||
| 235 | "crt1.o"; | ||
| 236 | try argv.append(try tc.getFilePath(crt1)); | ||
| 237 | } | ||
| 238 | try argv.append(try tc.getFilePath("crti.o")); | ||
| 239 | } | ||
| 240 | if (is_ve) { | ||
| 241 | try argv.appendSlice(&.{ "-z", "max-page-size=0x4000000" }); | ||
| 242 | } | ||
| 243 | |||
| 244 | if (is_iamcu) { | ||
| 245 | try argv.append(try tc.getFilePath("crt0.o")); | ||
| 246 | } else if (has_crt_begin_end_files) { | ||
| 247 | var path: []const u8 = ""; | ||
| 248 | if (tc.getRuntimeLibKind() == .compiler_rt and !is_android) { | ||
| 249 | const crt_begin = try tc.getCompilerRt("crtbegin", .object); | ||
| 250 | if (tc.filesystem.exists(crt_begin)) { | ||
| 251 | path = crt_begin; | ||
| 252 | } | ||
| 253 | } | ||
| 254 | if (path.len == 0) { | ||
| 255 | const crt_begin = if (tc.driver.shared) | ||
| 256 | if (is_android) "crtbegin_so.o" else "crtbeginS.o" | ||
| 257 | else if (is_static) | ||
| 258 | if (is_android) "crtbegin_static.o" else "crtbeginT.o" | ||
| 259 | else if (is_pie or is_static_pie) | ||
| 260 | if (is_android) "crtbegin_dynamic.o" else "crtbeginS.o" | ||
| 261 | else if (is_android) "crtbegin_dynamic.o" else "crtbegin.o"; | ||
| 262 | path = try tc.getFilePath(crt_begin); | ||
| 263 | } | ||
| 264 | try argv.append(path); | ||
| 265 | } | ||
| 266 | } | ||
| 267 | |||
| 268 | // TODO add -L opts | ||
| 269 | // TODO add -u opts | ||
| 270 | |||
| 271 | try tc.addFilePathLibArgs(argv); | ||
| 272 | |||
| 273 | // TODO handle LTO | ||
| 274 | |||
| 275 | try argv.appendSlice(d.link_objects.items); | ||
| 276 | |||
| 277 | if (!d.nostdlib and !d.relocatable) { | ||
| 278 | if (!d.nodefaultlibs) { | ||
| 279 | if (is_static or is_static_pie) { | ||
| 280 | try argv.append("--start-group"); | ||
| 281 | } | ||
| 282 | try tc.addRuntimeLibs(argv); | ||
| 283 | |||
| 284 | // TODO: add pthread if needed | ||
| 285 | if (!d.nolibc) { | ||
| 286 | try argv.append("-lc"); | ||
| 287 | } | ||
| 288 | if (is_iamcu) { | ||
| 289 | try argv.append("-lgloss"); | ||
| 290 | } | ||
| 291 | if (is_static or is_static_pie) { | ||
| 292 | try argv.append("--end-group"); | ||
| 293 | } else { | ||
| 294 | try tc.addRuntimeLibs(argv); | ||
| 295 | } | ||
| 296 | if (is_iamcu) { | ||
| 297 | try argv.appendSlice(&.{ "--as-needed", "-lsoftfp", "--no-as-needed" }); | ||
| 298 | } | ||
| 299 | } | ||
| 300 | if (!d.nostartfiles and !is_iamcu) { | ||
| 301 | if (has_crt_begin_end_files) { | ||
| 302 | var path: []const u8 = ""; | ||
| 303 | if (tc.getRuntimeLibKind() == .compiler_rt and !is_android) { | ||
| 304 | const crt_end = try tc.getCompilerRt("crtend", .object); | ||
| 305 | if (tc.filesystem.exists(crt_end)) { | ||
| 306 | path = crt_end; | ||
| 307 | } | ||
| 308 | } | ||
| 309 | if (path.len == 0) { | ||
| 310 | const crt_end = if (d.shared) | ||
| 311 | if (is_android) "crtend_so.o" else "crtendS.o" | ||
| 312 | else if (is_pie or is_static_pie) | ||
| 313 | if (is_android) "crtend_android.o" else "crtendS.o" | ||
| 314 | else if (is_android) "crtend_android.o" else "crtend.o"; | ||
| 315 | path = try tc.getFilePath(crt_end); | ||
| 316 | } | ||
| 317 | try argv.append(path); | ||
| 318 | } | ||
| 319 | if (!is_android) { | ||
| 320 | try argv.append(try tc.getFilePath("crtn.o")); | ||
| 321 | } | ||
| 322 | } | ||
| 323 | } | ||
| 324 | |||
| 325 | // TODO add -T args | ||
| 326 | } | ||
| 327 | |||
| 328 | fn getMultiarchTriple(target: std.Target) ?[]const u8 { | ||
| 329 | const is_android = target.isAndroid(); | ||
| 330 | const is_mips_r6 = std.Target.mips.featureSetHas(target.cpu.features, .mips32r6); | ||
| 331 | return switch (target.cpu.arch) { | ||
| 332 | .arm, .thumb => if (is_android) "arm-linux-androideabi" else if (target.abi == .gnueabihf) "arm-linux-gnueabihf" else "arm-linux-gnueabi", | ||
| 333 | .armeb, .thumbeb => if (target.abi == .gnueabihf) "armeb-linux-gnueabihf" else "armeb-linux-gnueabi", | ||
| 334 | .aarch64 => if (is_android) "aarch64-linux-android" else "aarch64-linux-gnu", | ||
| 335 | .aarch64_be => "aarch64_be-linux-gnu", | ||
| 336 | .x86 => if (is_android) "i686-linux-android" else "i386-linux-gnu", | ||
| 337 | .x86_64 => if (is_android) "x86_64-linux-android" else if (target.abi == .gnux32) "x86_64-linux-gnux32" else "x86_64-linux-gnu", | ||
| 338 | .m68k => "m68k-linux-gnu", | ||
| 339 | .mips => if (is_mips_r6) "mipsisa32r6-linux-gnu" else "mips-linux-gnu", | ||
| 340 | .mipsel => if (is_android) "mipsel-linux-android" else if (is_mips_r6) "mipsisa32r6el-linux-gnu" else "mipsel-linux-gnu", | ||
| 341 | .powerpcle => "powerpcle-linux-gnu", | ||
| 342 | .powerpc64 => "powerpc64-linux-gnu", | ||
| 343 | .powerpc64le => "powerpc64le-linux-gnu", | ||
| 344 | .riscv64 => "riscv64-linux-gnu", | ||
| 345 | .sparc => "sparc-linux-gnu", | ||
| 346 | .sparc64 => "sparc64-linux-gnu", | ||
| 347 | .s390x => "s390x-linux-gnu", | ||
| 348 | |||
| 349 | // TODO: expand this | ||
| 350 | else => null, | ||
| 351 | }; | ||
| 352 | } | ||
| 353 | |||
| 354 | fn getOSLibDir(target: std.Target) []const u8 { | ||
| 355 | switch (target.cpu.arch) { | ||
| 356 | .x86, | ||
| 357 | .powerpc, | ||
| 358 | .powerpcle, | ||
| 359 | .sparc, | ||
| 360 | .sparcel, | ||
| 361 | => return "lib32", | ||
| 362 | else => {}, | ||
| 363 | } | ||
| 364 | if (target.cpu.arch == .x86_64 and (target.abi == .gnux32 or target.abi == .muslx32)) { | ||
| 365 | return "libx32"; | ||
| 366 | } | ||
| 367 | if (target.cpu.arch == .riscv32) { | ||
| 368 | return "lib32"; | ||
| 369 | } | ||
| 370 | if (target.ptrBitWidth() == 32) { | ||
| 371 | return "lib"; | ||
| 372 | } | ||
| 373 | return "lib64"; | ||
| 374 | } | ||
| 375 | |||
| 376 | test Linux { | ||
| 377 | if (@import("builtin").os.tag == .windows) return error.SkipZigTest; | ||
| 378 | |||
| 379 | var arena_instance = std.heap.ArenaAllocator.init(std.testing.allocator); | ||
| 380 | defer arena_instance.deinit(); | ||
| 381 | const arena = arena_instance.allocator(); | ||
| 382 | |||
| 383 | var comp = Compilation.init(std.testing.allocator); | ||
| 384 | defer comp.deinit(); | ||
| 385 | comp.environment = .{ | ||
| 386 | .path = "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin", | ||
| 387 | }; | ||
| 388 | defer comp.environment = .{}; | ||
| 389 | |||
| 390 | const raw_triple = "x86_64-linux-gnu"; | ||
| 391 | const cross = std.zig.CrossTarget.parse(.{ .arch_os_abi = raw_triple }) catch unreachable; | ||
| 392 | comp.target = cross.toTarget(); // TODO deprecated | ||
| 393 | comp.langopts.setEmulatedCompiler(.gcc); | ||
| 394 | |||
| 395 | var driver: Driver = .{ .comp = &comp }; | ||
| 396 | defer driver.deinit(); | ||
| 397 | driver.raw_target_triple = raw_triple; | ||
| 398 | |||
| 399 | const link_obj = try driver.comp.gpa.dupe(u8, "/tmp/foo.o"); | ||
| 400 | try driver.link_objects.append(driver.comp.gpa, link_obj); | ||
| 401 | driver.temp_file_count += 1; | ||
| 402 | |||
| 403 | var toolchain: Toolchain = .{ .driver = &driver, .arena = arena, .filesystem = .{ .fake = &.{ | ||
| 404 | .{ .path = "/tmp" }, | ||
| 405 | .{ .path = "/usr" }, | ||
| 406 | .{ .path = "/usr/lib64" }, | ||
| 407 | .{ .path = "/usr/bin" }, | ||
| 408 | .{ .path = "/usr/bin/ld", .executable = true }, | ||
| 409 | .{ .path = "/lib" }, | ||
| 410 | .{ .path = "/lib/x86_64-linux-gnu" }, | ||
| 411 | .{ .path = "/lib/x86_64-linux-gnu/crt1.o" }, | ||
| 412 | .{ .path = "/lib/x86_64-linux-gnu/crti.o" }, | ||
| 413 | .{ .path = "/lib/x86_64-linux-gnu/crtn.o" }, | ||
| 414 | .{ .path = "/lib64" }, | ||
| 415 | .{ .path = "/usr/lib" }, | ||
| 416 | .{ .path = "/usr/lib/gcc" }, | ||
| 417 | .{ .path = "/usr/lib/gcc/x86_64-linux-gnu" }, | ||
| 418 | .{ .path = "/usr/lib/gcc/x86_64-linux-gnu/9" }, | ||
| 419 | .{ .path = "/usr/lib/gcc/x86_64-linux-gnu/9/crtbegin.o" }, | ||
| 420 | .{ .path = "/usr/lib/gcc/x86_64-linux-gnu/9/crtend.o" }, | ||
| 421 | .{ .path = "/usr/lib/x86_64-linux-gnu" }, | ||
| 422 | .{ .path = "/etc/lsb-release", .contents = | ||
| 423 | \\DISTRIB_ID=Ubuntu | ||
| 424 | \\DISTRIB_RELEASE=20.04 | ||
| 425 | \\DISTRIB_CODENAME=focal | ||
| 426 | \\DISTRIB_DESCRIPTION="Ubuntu 20.04.6 LTS" | ||
| 427 | \\ | ||
| 428 | }, | ||
| 429 | } } }; | ||
| 430 | defer toolchain.deinit(); | ||
| 431 | |||
| 432 | try toolchain.discover(); | ||
| 433 | |||
| 434 | var argv = std.ArrayList([]const u8).init(driver.comp.gpa); | ||
| 435 | defer argv.deinit(); | ||
| 436 | |||
| 437 | var linker_path_buf: [std.fs.MAX_PATH_BYTES]u8 = undefined; | ||
| 438 | const linker_path = try toolchain.getLinkerPath(&linker_path_buf); | ||
| 439 | try argv.append(linker_path); | ||
| 440 | |||
| 441 | try toolchain.buildLinkerArgs(&argv); | ||
| 442 | |||
| 443 | const expected = [_][]const u8{ | ||
| 444 | "/usr/bin/ld", | ||
| 445 | "-z", | ||
| 446 | "relro", | ||
| 447 | "--hash-style=gnu", | ||
| 448 | "--eh-frame-hdr", | ||
| 449 | "-m", | ||
| 450 | "elf_x86_64", | ||
| 451 | "-dynamic-linker", | ||
| 452 | "/lib64/ld-linux-x86-64.so.2", | ||
| 453 | "-o", | ||
| 454 | "a.out", | ||
| 455 | "/lib/x86_64-linux-gnu/crt1.o", | ||
| 456 | "/lib/x86_64-linux-gnu/crti.o", | ||
| 457 | "/usr/lib/gcc/x86_64-linux-gnu/9/crtbegin.o", | ||
| 458 | "-L/usr/lib/gcc/x86_64-linux-gnu/9", | ||
| 459 | "-L/usr/lib/gcc/x86_64-linux-gnu/9/../../../../lib64", | ||
| 460 | "-L/lib/x86_64-linux-gnu", | ||
| 461 | "-L/lib/../lib64", | ||
| 462 | "-L/usr/lib/x86_64-linux-gnu", | ||
| 463 | "-L/usr/lib/../lib64", | ||
| 464 | "-L/lib", | ||
| 465 | "-L/usr/lib", | ||
| 466 | link_obj, | ||
| 467 | "-lgcc", | ||
| 468 | "--as-needed", | ||
| 469 | "-lgcc_s", | ||
| 470 | "--no-as-needed", | ||
| 471 | "-lc", | ||
| 472 | "-lgcc", | ||
| 473 | "--as-needed", | ||
| 474 | "-lgcc_s", | ||
| 475 | "--no-as-needed", | ||
| 476 | "/usr/lib/gcc/x86_64-linux-gnu/9/crtend.o", | ||
| 477 | "/lib/x86_64-linux-gnu/crtn.o", | ||
| 478 | }; | ||
| 479 | try std.testing.expectEqual(expected.len, argv.items.len); | ||
| 480 | for (expected, argv.items) |expected_item, actual_item| { | ||
| 481 | try std.testing.expectEqualStrings(expected_item, actual_item); | ||
| 482 | } | ||
| 483 | } | ||
deps/aro/aro/tracy.zig created+310| ... | @@ -0,0 +1,310 @@ | ||
| 1 | //! Copied from https://github.com/ziglang/zig/blob/c9006d9479c619d9ed555164831e11a04d88d382/src/tracy.zig | ||
| 2 | |||
| 3 | const std = @import("std"); | ||
| 4 | const builtin = @import("builtin"); | ||
| 5 | const build_options = @import("build_options"); | ||
| 6 | |||
| 7 | pub const enable = if (builtin.is_test) false else build_options.enable_tracy; | ||
| 8 | pub const enable_allocation = enable and build_options.enable_tracy_allocation; | ||
| 9 | pub const enable_callstack = enable and build_options.enable_tracy_callstack; | ||
| 10 | |||
| 11 | // TODO: make this configurable | ||
| 12 | const callstack_depth = 10; | ||
| 13 | |||
| 14 | const ___tracy_c_zone_context = extern struct { | ||
| 15 | id: u32, | ||
| 16 | active: c_int, | ||
| 17 | |||
| 18 | pub inline fn end(self: @This()) void { | ||
| 19 | ___tracy_emit_zone_end(self); | ||
| 20 | } | ||
| 21 | |||
| 22 | pub inline fn addText(self: @This(), text: []const u8) void { | ||
| 23 | ___tracy_emit_zone_text(self, text.ptr, text.len); | ||
| 24 | } | ||
| 25 | |||
| 26 | pub inline fn setName(self: @This(), name: []const u8) void { | ||
| 27 | ___tracy_emit_zone_name(self, name.ptr, name.len); | ||
| 28 | } | ||
| 29 | |||
| 30 | pub inline fn setColor(self: @This(), color: u32) void { | ||
| 31 | ___tracy_emit_zone_color(self, color); | ||
| 32 | } | ||
| 33 | |||
| 34 | pub inline fn setValue(self: @This(), value: u64) void { | ||
| 35 | ___tracy_emit_zone_value(self, value); | ||
| 36 | } | ||
| 37 | }; | ||
| 38 | |||
| 39 | pub const Ctx = if (enable) ___tracy_c_zone_context else struct { | ||
| 40 | pub inline fn end(self: @This()) void { | ||
| 41 | _ = self; | ||
| 42 | } | ||
| 43 | |||
| 44 | pub inline fn addText(self: @This(), text: []const u8) void { | ||
| 45 | _ = self; | ||
| 46 | _ = text; | ||
| 47 | } | ||
| 48 | |||
| 49 | pub inline fn setName(self: @This(), name: []const u8) void { | ||
| 50 | _ = self; | ||
| 51 | _ = name; | ||
| 52 | } | ||
| 53 | |||
| 54 | pub inline fn setColor(self: @This(), color: u32) void { | ||
| 55 | _ = self; | ||
| 56 | _ = color; | ||
| 57 | } | ||
| 58 | |||
| 59 | pub inline fn setValue(self: @This(), value: u64) void { | ||
| 60 | _ = self; | ||
| 61 | _ = value; | ||
| 62 | } | ||
| 63 | }; | ||
| 64 | |||
| 65 | pub inline fn trace(comptime src: std.builtin.SourceLocation) Ctx { | ||
| 66 | if (!enable) return .{}; | ||
| 67 | |||
| 68 | if (enable_callstack) { | ||
| 69 | return ___tracy_emit_zone_begin_callstack(&.{ | ||
| 70 | .name = null, | ||
| 71 | .function = src.fn_name.ptr, | ||
| 72 | .file = src.file.ptr, | ||
| 73 | .line = src.line, | ||
| 74 | .color = 0, | ||
| 75 | }, callstack_depth, 1); | ||
| 76 | } else { | ||
| 77 | return ___tracy_emit_zone_begin(&.{ | ||
| 78 | .name = null, | ||
| 79 | .function = src.fn_name.ptr, | ||
| 80 | .file = src.file.ptr, | ||
| 81 | .line = src.line, | ||
| 82 | .color = 0, | ||
| 83 | }, 1); | ||
| 84 | } | ||
| 85 | } | ||
| 86 | |||
| 87 | pub inline fn traceNamed(comptime src: std.builtin.SourceLocation, comptime name: [:0]const u8) Ctx { | ||
| 88 | if (!enable) return .{}; | ||
| 89 | |||
| 90 | if (enable_callstack) { | ||
| 91 | return ___tracy_emit_zone_begin_callstack(&.{ | ||
| 92 | .name = name.ptr, | ||
| 93 | .function = src.fn_name.ptr, | ||
| 94 | .file = src.file.ptr, | ||
| 95 | .line = src.line, | ||
| 96 | .color = 0, | ||
| 97 | }, callstack_depth, 1); | ||
| 98 | } else { | ||
| 99 | return ___tracy_emit_zone_begin(&.{ | ||
| 100 | .name = name.ptr, | ||
| 101 | .function = src.fn_name.ptr, | ||
| 102 | .file = src.file.ptr, | ||
| 103 | .line = src.line, | ||
| 104 | .color = 0, | ||
| 105 | }, 1); | ||
| 106 | } | ||
| 107 | } | ||
| 108 | |||
| 109 | pub fn tracyAllocator(allocator: std.mem.Allocator) TracyAllocator(null) { | ||
| 110 | return TracyAllocator(null).init(allocator); | ||
| 111 | } | ||
| 112 | |||
| 113 | pub fn TracyAllocator(comptime name: ?[:0]const u8) type { | ||
| 114 | return struct { | ||
| 115 | parent_allocator: std.mem.Allocator, | ||
| 116 | |||
| 117 | const Self = @This(); | ||
| 118 | |||
| 119 | pub fn init(parent_allocator: std.mem.Allocator) Self { | ||
| 120 | return .{ | ||
| 121 | .parent_allocator = parent_allocator, | ||
| 122 | }; | ||
| 123 | } | ||
| 124 | |||
| 125 | pub fn allocator(self: *Self) std.mem.Allocator { | ||
| 126 | return std.mem.Allocator.init(self, allocFn, resizeFn, freeFn); | ||
| 127 | } | ||
| 128 | |||
| 129 | fn allocFn(self: *Self, len: usize, ptr_align: u29, len_align: u29, ret_addr: usize) std.mem.Allocator.Error![]u8 { | ||
| 130 | const result = self.parent_allocator.rawAlloc(len, ptr_align, len_align, ret_addr); | ||
| 131 | if (result) |data| { | ||
| 132 | if (data.len != 0) { | ||
| 133 | if (name) |n| { | ||
| 134 | allocNamed(data.ptr, data.len, n); | ||
| 135 | } else { | ||
| 136 | alloc(data.ptr, data.len); | ||
| 137 | } | ||
| 138 | } | ||
| 139 | } else |_| { | ||
| 140 | messageColor("allocation failed", 0xFF0000); | ||
| 141 | } | ||
| 142 | return result; | ||
| 143 | } | ||
| 144 | |||
| 145 | fn resizeFn(self: *Self, buf: []u8, buf_align: u29, new_len: usize, len_align: u29, ret_addr: usize) ?usize { | ||
| 146 | if (self.parent_allocator.rawResize(buf, buf_align, new_len, len_align, ret_addr)) |resized_len| { | ||
| 147 | if (name) |n| { | ||
| 148 | freeNamed(buf.ptr, n); | ||
| 149 | allocNamed(buf.ptr, resized_len, n); | ||
| 150 | } else { | ||
| 151 | free(buf.ptr); | ||
| 152 | alloc(buf.ptr, resized_len); | ||
| 153 | } | ||
| 154 | |||
| 155 | return resized_len; | ||
| 156 | } | ||
| 157 | |||
| 158 | // during normal operation the compiler hits this case thousands of times due to this | ||
| 159 | // emitting messages for it is both slow and causes clutter | ||
| 160 | return null; | ||
| 161 | } | ||
| 162 | |||
| 163 | fn freeFn(self: *Self, buf: []u8, buf_align: u29, ret_addr: usize) void { | ||
| 164 | self.parent_allocator.rawFree(buf, buf_align, ret_addr); | ||
| 165 | // this condition is to handle free being called on an empty slice that was never even allocated | ||
| 166 | // example case: `std.process.getSelfExeSharedLibPaths` can return `&[_][:0]u8{}` | ||
| 167 | if (buf.len != 0) { | ||
| 168 | if (name) |n| { | ||
| 169 | freeNamed(buf.ptr, n); | ||
| 170 | } else { | ||
| 171 | free(buf.ptr); | ||
| 172 | } | ||
| 173 | } | ||
| 174 | } | ||
| 175 | }; | ||
| 176 | } | ||
| 177 | |||
| 178 | // This function only accepts comptime known strings, see `messageCopy` for runtime strings | ||
| 179 | pub inline fn message(comptime msg: [:0]const u8) void { | ||
| 180 | if (!enable) return; | ||
| 181 | ___tracy_emit_messageL(msg.ptr, if (enable_callstack) callstack_depth else 0); | ||
| 182 | } | ||
| 183 | |||
| 184 | // This function only accepts comptime known strings, see `messageColorCopy` for runtime strings | ||
| 185 | pub inline fn messageColor(comptime msg: [:0]const u8, color: u32) void { | ||
| 186 | if (!enable) return; | ||
| 187 | ___tracy_emit_messageLC(msg.ptr, color, if (enable_callstack) callstack_depth else 0); | ||
| 188 | } | ||
| 189 | |||
| 190 | pub inline fn messageCopy(msg: []const u8) void { | ||
| 191 | if (!enable) return; | ||
| 192 | ___tracy_emit_message(msg.ptr, msg.len, if (enable_callstack) callstack_depth else 0); | ||
| 193 | } | ||
| 194 | |||
| 195 | pub inline fn messageColorCopy(msg: [:0]const u8, color: u32) void { | ||
| 196 | if (!enable) return; | ||
| 197 | ___tracy_emit_messageC(msg.ptr, msg.len, color, if (enable_callstack) callstack_depth else 0); | ||
| 198 | } | ||
| 199 | |||
| 200 | pub inline fn frameMark() void { | ||
| 201 | if (!enable) return; | ||
| 202 | ___tracy_emit_frame_mark(null); | ||
| 203 | } | ||
| 204 | |||
| 205 | pub inline fn frameMarkNamed(comptime name: [:0]const u8) void { | ||
| 206 | if (!enable) return; | ||
| 207 | ___tracy_emit_frame_mark(name.ptr); | ||
| 208 | } | ||
| 209 | |||
| 210 | pub inline fn namedFrame(comptime name: [:0]const u8) Frame(name) { | ||
| 211 | frameMarkStart(name); | ||
| 212 | return .{}; | ||
| 213 | } | ||
| 214 | |||
| 215 | pub fn Frame(comptime name: [:0]const u8) type { | ||
| 216 | return struct { | ||
| 217 | pub fn end(_: @This()) void { | ||
| 218 | frameMarkEnd(name); | ||
| 219 | } | ||
| 220 | }; | ||
| 221 | } | ||
| 222 | |||
| 223 | inline fn frameMarkStart(comptime name: [:0]const u8) void { | ||
| 224 | if (!enable) return; | ||
| 225 | ___tracy_emit_frame_mark_start(name.ptr); | ||
| 226 | } | ||
| 227 | |||
| 228 | inline fn frameMarkEnd(comptime name: [:0]const u8) void { | ||
| 229 | if (!enable) return; | ||
| 230 | ___tracy_emit_frame_mark_end(name.ptr); | ||
| 231 | } | ||
| 232 | |||
| 233 | extern fn ___tracy_emit_frame_mark_start(name: [*:0]const u8) void; | ||
| 234 | extern fn ___tracy_emit_frame_mark_end(name: [*:0]const u8) void; | ||
| 235 | |||
| 236 | inline fn alloc(ptr: [*]u8, len: usize) void { | ||
| 237 | if (!enable) return; | ||
| 238 | |||
| 239 | if (enable_callstack) { | ||
| 240 | ___tracy_emit_memory_alloc_callstack(ptr, len, callstack_depth, 0); | ||
| 241 | } else { | ||
| 242 | ___tracy_emit_memory_alloc(ptr, len, 0); | ||
| 243 | } | ||
| 244 | } | ||
| 245 | |||
| 246 | inline fn allocNamed(ptr: [*]u8, len: usize, comptime name: [:0]const u8) void { | ||
| 247 | if (!enable) return; | ||
| 248 | |||
| 249 | if (enable_callstack) { | ||
| 250 | ___tracy_emit_memory_alloc_callstack_named(ptr, len, callstack_depth, 0, name.ptr); | ||
| 251 | } else { | ||
| 252 | ___tracy_emit_memory_alloc_named(ptr, len, 0, name.ptr); | ||
| 253 | } | ||
| 254 | } | ||
| 255 | |||
| 256 | inline fn free(ptr: [*]u8) void { | ||
| 257 | if (!enable) return; | ||
| 258 | |||
| 259 | if (enable_callstack) { | ||
| 260 | ___tracy_emit_memory_free_callstack(ptr, callstack_depth, 0); | ||
| 261 | } else { | ||
| 262 | ___tracy_emit_memory_free(ptr, 0); | ||
| 263 | } | ||
| 264 | } | ||
| 265 | |||
| 266 | inline fn freeNamed(ptr: [*]u8, comptime name: [:0]const u8) void { | ||
| 267 | if (!enable) return; | ||
| 268 | |||
| 269 | if (enable_callstack) { | ||
| 270 | ___tracy_emit_memory_free_callstack_named(ptr, callstack_depth, 0, name.ptr); | ||
| 271 | } else { | ||
| 272 | ___tracy_emit_memory_free_named(ptr, 0, name.ptr); | ||
| 273 | } | ||
| 274 | } | ||
| 275 | |||
| 276 | extern fn ___tracy_emit_zone_begin( | ||
| 277 | srcloc: *const ___tracy_source_location_data, | ||
| 278 | active: c_int, | ||
| 279 | ) ___tracy_c_zone_context; | ||
| 280 | extern fn ___tracy_emit_zone_begin_callstack( | ||
| 281 | srcloc: *const ___tracy_source_location_data, | ||
| 282 | depth: c_int, | ||
| 283 | active: c_int, | ||
| 284 | ) ___tracy_c_zone_context; | ||
| 285 | extern fn ___tracy_emit_zone_text(ctx: ___tracy_c_zone_context, txt: [*]const u8, size: usize) void; | ||
| 286 | extern fn ___tracy_emit_zone_name(ctx: ___tracy_c_zone_context, txt: [*]const u8, size: usize) void; | ||
| 287 | extern fn ___tracy_emit_zone_color(ctx: ___tracy_c_zone_context, color: u32) void; | ||
| 288 | extern fn ___tracy_emit_zone_value(ctx: ___tracy_c_zone_context, value: u64) void; | ||
| 289 | extern fn ___tracy_emit_zone_end(ctx: ___tracy_c_zone_context) void; | ||
| 290 | extern fn ___tracy_emit_memory_alloc(ptr: *const anyopaque, size: usize, secure: c_int) void; | ||
| 291 | extern fn ___tracy_emit_memory_alloc_callstack(ptr: *const anyopaque, size: usize, depth: c_int, secure: c_int) void; | ||
| 292 | extern fn ___tracy_emit_memory_free(ptr: *const anyopaque, secure: c_int) void; | ||
| 293 | extern fn ___tracy_emit_memory_free_callstack(ptr: *const anyopaque, depth: c_int, secure: c_int) void; | ||
| 294 | extern fn ___tracy_emit_memory_alloc_named(ptr: *const anyopaque, size: usize, secure: c_int, name: [*:0]const u8) void; | ||
| 295 | extern fn ___tracy_emit_memory_alloc_callstack_named(ptr: *const anyopaque, size: usize, depth: c_int, secure: c_int, name: [*:0]const u8) void; | ||
| 296 | extern fn ___tracy_emit_memory_free_named(ptr: *const anyopaque, secure: c_int, name: [*:0]const u8) void; | ||
| 297 | extern fn ___tracy_emit_memory_free_callstack_named(ptr: *const anyopaque, depth: c_int, secure: c_int, name: [*:0]const u8) void; | ||
| 298 | extern fn ___tracy_emit_message(txt: [*]const u8, size: usize, callstack: c_int) void; | ||
| 299 | extern fn ___tracy_emit_messageL(txt: [*:0]const u8, callstack: c_int) void; | ||
| 300 | extern fn ___tracy_emit_messageC(txt: [*]const u8, size: usize, color: u32, callstack: c_int) void; | ||
| 301 | extern fn ___tracy_emit_messageLC(txt: [*:0]const u8, color: u32, callstack: c_int) void; | ||
| 302 | extern fn ___tracy_emit_frame_mark(name: ?[*:0]const u8) void; | ||
| 303 | |||
| 304 | const ___tracy_source_location_data = extern struct { | ||
| 305 | name: ?[*:0]const u8, | ||
| 306 | function: [*:0]const u8, | ||
| 307 | file: [*:0]const u8, | ||
| 308 | line: u32, | ||
| 309 | color: u32, | ||
| 310 | }; | ||
deps/aro/backend.zig created+13| ... | @@ -0,0 +1,13 @@ | ||
| 1 | pub const Interner = @import("backend/Interner.zig"); | ||
| 2 | pub const Ir = @import("backend/Ir.zig"); | ||
| 3 | pub const Object = @import("backend/Object.zig"); | ||
| 4 | |||
| 5 | pub const CallingConvention = enum { | ||
| 6 | C, | ||
| 7 | stdcall, | ||
| 8 | thiscall, | ||
| 9 | vectorcall, | ||
| 10 | }; | ||
| 11 | |||
| 12 | pub const version_str = @import("build_options").version_str; | ||
| 13 | pub const version = @import("std").SemanticVersion.parse(version_str) catch unreachable; | ||
deps/aro/backend/Interner.zig created+647| ... | @@ -0,0 +1,647 @@ | ||
| 1 | const std = @import("std"); | ||
| 2 | const Allocator = std.mem.Allocator; | ||
| 3 | const assert = std.debug.assert; | ||
| 4 | const BigIntConst = std.math.big.int.Const; | ||
| 5 | const BigIntMutable = std.math.big.int.Mutable; | ||
| 6 | const Hash = std.hash.Wyhash; | ||
| 7 | const Limb = std.math.big.Limb; | ||
| 8 | |||
| 9 | const Interner = @This(); | ||
| 10 | |||
| 11 | map: std.AutoArrayHashMapUnmanaged(void, void) = .{}, | ||
| 12 | items: std.MultiArrayList(struct { | ||
| 13 | tag: Tag, | ||
| 14 | data: u32, | ||
| 15 | }) = .{}, | ||
| 16 | extra: std.ArrayListUnmanaged(u32) = .{}, | ||
| 17 | limbs: std.ArrayListUnmanaged(Limb) = .{}, | ||
| 18 | strings: std.ArrayListUnmanaged(u8) = .{}, | ||
| 19 | |||
| 20 | const KeyAdapter = struct { | ||
| 21 | interner: *const Interner, | ||
| 22 | |||
| 23 | pub fn eql(adapter: KeyAdapter, a: Key, b_void: void, b_map_index: usize) bool { | ||
| 24 | _ = b_void; | ||
| 25 | return adapter.interner.get(@as(Ref, @enumFromInt(b_map_index))).eql(a); | ||
| 26 | } | ||
| 27 | |||
| 28 | pub fn hash(adapter: KeyAdapter, a: Key) u32 { | ||
| 29 | _ = adapter; | ||
| 30 | return a.hash(); | ||
| 31 | } | ||
| 32 | }; | ||
| 33 | |||
| 34 | pub const Key = union(enum) { | ||
| 35 | int_ty: u16, | ||
| 36 | float_ty: u16, | ||
| 37 | ptr_ty, | ||
| 38 | noreturn_ty, | ||
| 39 | void_ty, | ||
| 40 | func_ty, | ||
| 41 | array_ty: struct { | ||
| 42 | len: u64, | ||
| 43 | child: Ref, | ||
| 44 | }, | ||
| 45 | vector_ty: struct { | ||
| 46 | len: u32, | ||
| 47 | child: Ref, | ||
| 48 | }, | ||
| 49 | record_ty: []const Ref, | ||
| 50 | /// May not be zero | ||
| 51 | null, | ||
| 52 | int: union(enum) { | ||
| 53 | u64: u64, | ||
| 54 | i64: i64, | ||
| 55 | big_int: BigIntConst, | ||
| 56 | |||
| 57 | pub fn toBigInt(repr: @This(), space: *Tag.Int.BigIntSpace) BigIntConst { | ||
| 58 | return switch (repr) { | ||
| 59 | .big_int => |x| x, | ||
| 60 | inline .u64, .i64 => |x| BigIntMutable.init(&space.limbs, x).toConst(), | ||
| 61 | }; | ||
| 62 | } | ||
| 63 | }, | ||
| 64 | float: Float, | ||
| 65 | bytes: []const u8, | ||
| 66 | |||
| 67 | pub const Float = union(enum) { | ||
| 68 | f16: f16, | ||
| 69 | f32: f32, | ||
| 70 | f64: f64, | ||
| 71 | f80: f80, | ||
| 72 | f128: f128, | ||
| 73 | }; | ||
| 74 | |||
| 75 | pub fn hash(key: Key) u32 { | ||
| 76 | var hasher = Hash.init(0); | ||
| 77 | const tag = std.meta.activeTag(key); | ||
| 78 | std.hash.autoHash(&hasher, tag); | ||
| 79 | switch (key) { | ||
| 80 | .bytes => |bytes| { | ||
| 81 | hasher.update(bytes); | ||
| 82 | }, | ||
| 83 | .record_ty => |elems| for (elems) |elem| { | ||
| 84 | std.hash.autoHash(&hasher, elem); | ||
| 85 | }, | ||
| 86 | .float => |repr| switch (repr) { | ||
| 87 | inline else => |data| std.hash.autoHash( | ||
| 88 | &hasher, | ||
| 89 | @as(std.meta.Int(.unsigned, @bitSizeOf(@TypeOf(data))), @bitCast(data)), | ||
| 90 | ), | ||
| 91 | }, | ||
| 92 | .int => |repr| { | ||
| 93 | var space: Tag.Int.BigIntSpace = undefined; | ||
| 94 | const big = repr.toBigInt(&space); | ||
| 95 | std.hash.autoHash(&hasher, big.positive); | ||
| 96 | for (big.limbs) |limb| std.hash.autoHash(&hasher, limb); | ||
| 97 | }, | ||
| 98 | inline else => |info| { | ||
| 99 | std.hash.autoHash(&hasher, info); | ||
| 100 | }, | ||
| 101 | } | ||
| 102 | return @truncate(hasher.final()); | ||
| 103 | } | ||
| 104 | |||
| 105 | pub fn eql(a: Key, b: Key) bool { | ||
| 106 | const KeyTag = std.meta.Tag(Key); | ||
| 107 | const a_tag: KeyTag = a; | ||
| 108 | const b_tag: KeyTag = b; | ||
| 109 | if (a_tag != b_tag) return false; | ||
| 110 | switch (a) { | ||
| 111 | .record_ty => |a_elems| { | ||
| 112 | const b_elems = b.record_ty; | ||
| 113 | if (a_elems.len != b_elems.len) return false; | ||
| 114 | for (a_elems, b_elems) |a_elem, b_elem| { | ||
| 115 | if (a_elem != b_elem) return false; | ||
| 116 | } | ||
| 117 | return true; | ||
| 118 | }, | ||
| 119 | .bytes => |a_bytes| { | ||
| 120 | const b_bytes = b.bytes; | ||
| 121 | return std.mem.eql(u8, a_bytes, b_bytes); | ||
| 122 | }, | ||
| 123 | .int => |a_repr| { | ||
| 124 | var a_space: Tag.Int.BigIntSpace = undefined; | ||
| 125 | const a_big = a_repr.toBigInt(&a_space); | ||
| 126 | var b_space: Tag.Int.BigIntSpace = undefined; | ||
| 127 | const b_big = b.int.toBigInt(&b_space); | ||
| 128 | |||
| 129 | return a_big.eql(b_big); | ||
| 130 | }, | ||
| 131 | inline else => |a_info, tag| { | ||
| 132 | const b_info = @field(b, @tagName(tag)); | ||
| 133 | return std.meta.eql(a_info, b_info); | ||
| 134 | }, | ||
| 135 | } | ||
| 136 | } | ||
| 137 | |||
| 138 | fn toRef(key: Key) ?Ref { | ||
| 139 | switch (key) { | ||
| 140 | .int_ty => |bits| switch (bits) { | ||
| 141 | 1 => return .i1, | ||
| 142 | 8 => return .i8, | ||
| 143 | 16 => return .i16, | ||
| 144 | 32 => return .i32, | ||
| 145 | 64 => return .i64, | ||
| 146 | 128 => return .i128, | ||
| 147 | else => {}, | ||
| 148 | }, | ||
| 149 | .float_ty => |bits| switch (bits) { | ||
| 150 | 16 => return .f16, | ||
| 151 | 32 => return .f32, | ||
| 152 | 64 => return .f64, | ||
| 153 | 80 => return .f80, | ||
| 154 | 128 => return .f128, | ||
| 155 | else => unreachable, | ||
| 156 | }, | ||
| 157 | .ptr_ty => return .ptr, | ||
| 158 | .func_ty => return .func, | ||
| 159 | .noreturn_ty => return .noreturn, | ||
| 160 | .void_ty => return .void, | ||
| 161 | .int => |repr| { | ||
| 162 | var space: Tag.Int.BigIntSpace = undefined; | ||
| 163 | const big = repr.toBigInt(&space); | ||
| 164 | if (big.eqlZero()) return .zero; | ||
| 165 | const big_one = BigIntConst{ .limbs = &.{1}, .positive = true }; | ||
| 166 | if (big.eql(big_one)) return .one; | ||
| 167 | }, | ||
| 168 | .float => |repr| switch (repr) { | ||
| 169 | inline else => |data| { | ||
| 170 | if (std.math.isPositiveZero(data)) return .zero; | ||
| 171 | if (data == 1) return .one; | ||
| 172 | }, | ||
| 173 | }, | ||
| 174 | .null => return .null, | ||
| 175 | else => {}, | ||
| 176 | } | ||
| 177 | return null; | ||
| 178 | } | ||
| 179 | }; | ||
| 180 | |||
| 181 | pub const Ref = enum(u32) { | ||
| 182 | const max = std.math.maxInt(u32); | ||
| 183 | |||
| 184 | ptr = max - 1, | ||
| 185 | noreturn = max - 2, | ||
| 186 | void = max - 3, | ||
| 187 | i1 = max - 4, | ||
| 188 | i8 = max - 5, | ||
| 189 | i16 = max - 6, | ||
| 190 | i32 = max - 7, | ||
| 191 | i64 = max - 8, | ||
| 192 | i128 = max - 9, | ||
| 193 | f16 = max - 10, | ||
| 194 | f32 = max - 11, | ||
| 195 | f64 = max - 12, | ||
| 196 | f80 = max - 13, | ||
| 197 | f128 = max - 14, | ||
| 198 | func = max - 15, | ||
| 199 | zero = max - 16, | ||
| 200 | one = max - 17, | ||
| 201 | null = max - 18, | ||
| 202 | _, | ||
| 203 | }; | ||
| 204 | |||
| 205 | pub const OptRef = enum(u32) { | ||
| 206 | const max = std.math.maxInt(u32); | ||
| 207 | |||
| 208 | none = max - 0, | ||
| 209 | ptr = max - 1, | ||
| 210 | noreturn = max - 2, | ||
| 211 | void = max - 3, | ||
| 212 | i1 = max - 4, | ||
| 213 | i8 = max - 5, | ||
| 214 | i16 = max - 6, | ||
| 215 | i32 = max - 7, | ||
| 216 | i64 = max - 8, | ||
| 217 | i128 = max - 9, | ||
| 218 | f16 = max - 10, | ||
| 219 | f32 = max - 11, | ||
| 220 | f64 = max - 12, | ||
| 221 | f80 = max - 13, | ||
| 222 | f128 = max - 14, | ||
| 223 | func = max - 15, | ||
| 224 | zero = max - 16, | ||
| 225 | one = max - 17, | ||
| 226 | null = max - 18, | ||
| 227 | _, | ||
| 228 | }; | ||
| 229 | |||
| 230 | pub const Tag = enum(u8) { | ||
| 231 | /// `data` is `u16` | ||
| 232 | int_ty, | ||
| 233 | /// `data` is `u16` | ||
| 234 | float_ty, | ||
| 235 | /// `data` is index to `Array` | ||
| 236 | array_ty, | ||
| 237 | /// `data` is index to `Vector` | ||
| 238 | vector_ty, | ||
| 239 | /// `data` is `u32` | ||
| 240 | u32, | ||
| 241 | /// `data` is `i32` | ||
| 242 | i32, | ||
| 243 | /// `data` is `Int` | ||
| 244 | int_positive, | ||
| 245 | /// `data` is `Int` | ||
| 246 | int_negative, | ||
| 247 | /// `data` is `f16` | ||
| 248 | f16, | ||
| 249 | /// `data` is `f32` | ||
| 250 | f32, | ||
| 251 | /// `data` is `F64` | ||
| 252 | f64, | ||
| 253 | /// `data` is `F80` | ||
| 254 | f80, | ||
| 255 | /// `data` is `F128` | ||
| 256 | f128, | ||
| 257 | /// `data` is `Bytes` | ||
| 258 | bytes, | ||
| 259 | /// `data` is `Record` | ||
| 260 | record_ty, | ||
| 261 | |||
| 262 | pub const Array = struct { | ||
| 263 | len0: u32, | ||
| 264 | len1: u32, | ||
| 265 | child: Ref, | ||
| 266 | |||
| 267 | pub fn getLen(a: Array) u64 { | ||
| 268 | return (PackedU64{ | ||
| 269 | .a = a.len0, | ||
| 270 | .b = a.len1, | ||
| 271 | }).get(); | ||
| 272 | } | ||
| 273 | }; | ||
| 274 | |||
| 275 | pub const Vector = struct { | ||
| 276 | len: u32, | ||
| 277 | child: Ref, | ||
| 278 | }; | ||
| 279 | |||
| 280 | pub const Int = struct { | ||
| 281 | limbs_index: u32, | ||
| 282 | limbs_len: u32, | ||
| 283 | |||
| 284 | /// Big enough to fit any non-BigInt value | ||
| 285 | pub const BigIntSpace = struct { | ||
| 286 | /// The +1 is headroom so that operations such as incrementing once | ||
| 287 | /// or decrementing once are possible without using an allocator. | ||
| 288 | limbs: [(@sizeOf(u64) / @sizeOf(std.math.big.Limb)) + 1]std.math.big.Limb, | ||
| 289 | }; | ||
| 290 | }; | ||
| 291 | |||
| 292 | pub const F64 = struct { | ||
| 293 | piece0: u32, | ||
| 294 | piece1: u32, | ||
| 295 | |||
| 296 | pub fn get(self: F64) f64 { | ||
| 297 | const int_bits = @as(u64, self.piece0) | (@as(u64, self.piece1) << 32); | ||
| 298 | return @bitCast(int_bits); | ||
| 299 | } | ||
| 300 | |||
| 301 | fn pack(val: f64) F64 { | ||
| 302 | const bits = @as(u64, @bitCast(val)); | ||
| 303 | return .{ | ||
| 304 | .piece0 = @as(u32, @truncate(bits)), | ||
| 305 | .piece1 = @as(u32, @truncate(bits >> 32)), | ||
| 306 | }; | ||
| 307 | } | ||
| 308 | }; | ||
| 309 | |||
| 310 | pub const F80 = struct { | ||
| 311 | piece0: u32, | ||
| 312 | piece1: u32, | ||
| 313 | piece2: u32, // u16 part, top bits | ||
| 314 | |||
| 315 | pub fn get(self: F80) f80 { | ||
| 316 | const int_bits = @as(u80, self.piece0) | | ||
| 317 | (@as(u80, self.piece1) << 32) | | ||
| 318 | (@as(u80, self.piece2) << 64); | ||
| 319 | return @bitCast(int_bits); | ||
| 320 | } | ||
| 321 | |||
| 322 | fn pack(val: f80) F80 { | ||
| 323 | const bits = @as(u80, @bitCast(val)); | ||
| 324 | return .{ | ||
| 325 | .piece0 = @as(u32, @truncate(bits)), | ||
| 326 | .piece1 = @as(u32, @truncate(bits >> 32)), | ||
| 327 | .piece2 = @as(u16, @truncate(bits >> 64)), | ||
| 328 | }; | ||
| 329 | } | ||
| 330 | }; | ||
| 331 | |||
| 332 | pub const F128 = struct { | ||
| 333 | piece0: u32, | ||
| 334 | piece1: u32, | ||
| 335 | piece2: u32, | ||
| 336 | piece3: u32, | ||
| 337 | |||
| 338 | pub fn get(self: F128) f128 { | ||
| 339 | const int_bits = @as(u128, self.piece0) | | ||
| 340 | (@as(u128, self.piece1) << 32) | | ||
| 341 | (@as(u128, self.piece2) << 64) | | ||
| 342 | (@as(u128, self.piece3) << 96); | ||
| 343 | return @bitCast(int_bits); | ||
| 344 | } | ||
| 345 | |||
| 346 | fn pack(val: f128) F128 { | ||
| 347 | const bits = @as(u128, @bitCast(val)); | ||
| 348 | return .{ | ||
| 349 | .piece0 = @as(u32, @truncate(bits)), | ||
| 350 | .piece1 = @as(u32, @truncate(bits >> 32)), | ||
| 351 | .piece2 = @as(u32, @truncate(bits >> 64)), | ||
| 352 | .piece3 = @as(u32, @truncate(bits >> 96)), | ||
| 353 | }; | ||
| 354 | } | ||
| 355 | }; | ||
| 356 | |||
| 357 | pub const Bytes = struct { | ||
| 358 | strings_index: u32, | ||
| 359 | len: u32, | ||
| 360 | }; | ||
| 361 | |||
| 362 | pub const Record = struct { | ||
| 363 | elements_len: u32, | ||
| 364 | // trailing | ||
| 365 | // [elements_len]Ref | ||
| 366 | }; | ||
| 367 | }; | ||
| 368 | |||
| 369 | pub const PackedU64 = packed struct(u64) { | ||
| 370 | a: u32, | ||
| 371 | b: u32, | ||
| 372 | |||
| 373 | pub fn get(x: PackedU64) u64 { | ||
| 374 | return @bitCast(x); | ||
| 375 | } | ||
| 376 | |||
| 377 | pub fn init(x: u64) PackedU64 { | ||
| 378 | return @bitCast(x); | ||
| 379 | } | ||
| 380 | }; | ||
| 381 | |||
| 382 | pub fn deinit(i: *Interner, gpa: Allocator) void { | ||
| 383 | i.map.deinit(gpa); | ||
| 384 | i.items.deinit(gpa); | ||
| 385 | i.extra.deinit(gpa); | ||
| 386 | i.limbs.deinit(gpa); | ||
| 387 | i.strings.deinit(gpa); | ||
| 388 | } | ||
| 389 | |||
| 390 | pub fn put(i: *Interner, gpa: Allocator, key: Key) !Ref { | ||
| 391 | if (key.toRef()) |some| return some; | ||
| 392 | const adapter: KeyAdapter = .{ .interner = i }; | ||
| 393 | const gop = try i.map.getOrPutAdapted(gpa, key, adapter); | ||
| 394 | if (gop.found_existing) return @enumFromInt(gop.index); | ||
| 395 | try i.items.ensureUnusedCapacity(gpa, 1); | ||
| 396 | |||
| 397 | switch (key) { | ||
| 398 | .int_ty => |bits| { | ||
| 399 | i.items.appendAssumeCapacity(.{ | ||
| 400 | .tag = .int_ty, | ||
| 401 | .data = bits, | ||
| 402 | }); | ||
| 403 | }, | ||
| 404 | .float_ty => |bits| { | ||
| 405 | i.items.appendAssumeCapacity(.{ | ||
| 406 | .tag = .float_ty, | ||
| 407 | .data = bits, | ||
| 408 | }); | ||
| 409 | }, | ||
| 410 | .array_ty => |info| { | ||
| 411 | const split_len = PackedU64.init(info.len); | ||
| 412 | i.items.appendAssumeCapacity(.{ | ||
| 413 | .tag = .array_ty, | ||
| 414 | .data = try i.addExtra(gpa, Tag.Array{ | ||
| 415 | .len0 = split_len.a, | ||
| 416 | .len1 = split_len.b, | ||
| 417 | .child = info.child, | ||
| 418 | }), | ||
| 419 | }); | ||
| 420 | }, | ||
| 421 | .vector_ty => |info| { | ||
| 422 | i.items.appendAssumeCapacity(.{ | ||
| 423 | .tag = .vector_ty, | ||
| 424 | .data = try i.addExtra(gpa, Tag.Vector{ | ||
| 425 | .len = info.len, | ||
| 426 | .child = info.child, | ||
| 427 | }), | ||
| 428 | }); | ||
| 429 | }, | ||
| 430 | .int => |repr| int: { | ||
| 431 | var space: Tag.Int.BigIntSpace = undefined; | ||
| 432 | const big = repr.toBigInt(&space); | ||
| 433 | switch (repr) { | ||
| 434 | .u64 => |data| if (std.math.cast(u32, data)) |small| { | ||
| 435 | i.items.appendAssumeCapacity(.{ | ||
| 436 | .tag = .u32, | ||
| 437 | .data = small, | ||
| 438 | }); | ||
| 439 | break :int; | ||
| 440 | }, | ||
| 441 | .i64 => |data| if (std.math.cast(i32, data)) |small| { | ||
| 442 | i.items.appendAssumeCapacity(.{ | ||
| 443 | .tag = .i32, | ||
| 444 | .data = @bitCast(small), | ||
| 445 | }); | ||
| 446 | break :int; | ||
| 447 | }, | ||
| 448 | .big_int => |data| { | ||
| 449 | if (data.fitsInTwosComp(.unsigned, 32)) { | ||
| 450 | i.items.appendAssumeCapacity(.{ | ||
| 451 | .tag = .u32, | ||
| 452 | .data = data.to(u32) catch unreachable, | ||
| 453 | }); | ||
| 454 | break :int; | ||
| 455 | } else if (data.fitsInTwosComp(.signed, 32)) { | ||
| 456 | i.items.appendAssumeCapacity(.{ | ||
| 457 | .tag = .i32, | ||
| 458 | .data = @bitCast(data.to(i32) catch unreachable), | ||
| 459 | }); | ||
| 460 | break :int; | ||
| 461 | } | ||
| 462 | }, | ||
| 463 | } | ||
| 464 | const limbs_index: u32 = @intCast(i.limbs.items.len); | ||
| 465 | try i.limbs.appendSlice(gpa, big.limbs); | ||
| 466 | i.items.appendAssumeCapacity(.{ | ||
| 467 | .tag = if (big.positive) .int_positive else .int_negative, | ||
| 468 | .data = try i.addExtra(gpa, Tag.Int{ | ||
| 469 | .limbs_index = limbs_index, | ||
| 470 | .limbs_len = @intCast(big.limbs.len), | ||
| 471 | }), | ||
| 472 | }); | ||
| 473 | }, | ||
| 474 | .float => |repr| switch (repr) { | ||
| 475 | .f16 => |data| i.items.appendAssumeCapacity(.{ | ||
| 476 | .tag = .f16, | ||
| 477 | .data = @as(u16, @bitCast(data)), | ||
| 478 | }), | ||
| 479 | .f32 => |data| i.items.appendAssumeCapacity(.{ | ||
| 480 | .tag = .f32, | ||
| 481 | .data = @as(u32, @bitCast(data)), | ||
| 482 | }), | ||
| 483 | .f64 => |data| i.items.appendAssumeCapacity(.{ | ||
| 484 | .tag = .f64, | ||
| 485 | .data = try i.addExtra(gpa, Tag.F64.pack(data)), | ||
| 486 | }), | ||
| 487 | .f80 => |data| i.items.appendAssumeCapacity(.{ | ||
| 488 | .tag = .f64, | ||
| 489 | .data = try i.addExtra(gpa, Tag.F80.pack(data)), | ||
| 490 | }), | ||
| 491 | .f128 => |data| i.items.appendAssumeCapacity(.{ | ||
| 492 | .tag = .f64, | ||
| 493 | .data = try i.addExtra(gpa, Tag.F128.pack(data)), | ||
| 494 | }), | ||
| 495 | }, | ||
| 496 | .bytes => |bytes| { | ||
| 497 | const strings_index: u32 = @intCast(i.strings.items.len); | ||
| 498 | try i.strings.appendSlice(gpa, bytes); | ||
| 499 | i.items.appendAssumeCapacity(.{ | ||
| 500 | .tag = .bytes, | ||
| 501 | .data = try i.addExtra(gpa, Tag.Bytes{ | ||
| 502 | .strings_index = strings_index, | ||
| 503 | .len = @intCast(bytes.len), | ||
| 504 | }), | ||
| 505 | }); | ||
| 506 | }, | ||
| 507 | .record_ty => |elems| { | ||
| 508 | try i.extra.ensureUnusedCapacity(gpa, @typeInfo(Tag.Record).Struct.fields.len + | ||
| 509 | elems.len); | ||
| 510 | i.items.appendAssumeCapacity(.{ | ||
| 511 | .tag = .record_ty, | ||
| 512 | .data = i.addExtraAssumeCapacity(Tag.Record{ | ||
| 513 | .elements_len = @intCast(elems.len), | ||
| 514 | }), | ||
| 515 | }); | ||
| 516 | i.extra.appendSliceAssumeCapacity(@ptrCast(elems)); | ||
| 517 | }, | ||
| 518 | .ptr_ty, | ||
| 519 | .noreturn_ty, | ||
| 520 | .void_ty, | ||
| 521 | .func_ty, | ||
| 522 | .null, | ||
| 523 | => unreachable, | ||
| 524 | } | ||
| 525 | |||
| 526 | return @enumFromInt(gop.index); | ||
| 527 | } | ||
| 528 | |||
| 529 | fn addExtra(i: *Interner, gpa: Allocator, extra: anytype) Allocator.Error!u32 { | ||
| 530 | const fields = @typeInfo(@TypeOf(extra)).Struct.fields; | ||
| 531 | try i.extra.ensureUnusedCapacity(gpa, fields.len); | ||
| 532 | return i.addExtraAssumeCapacity(extra); | ||
| 533 | } | ||
| 534 | |||
| 535 | fn addExtraAssumeCapacity(i: *Interner, extra: anytype) u32 { | ||
| 536 | const result = @as(u32, @intCast(i.extra.items.len)); | ||
| 537 | inline for (@typeInfo(@TypeOf(extra)).Struct.fields) |field| { | ||
| 538 | i.extra.appendAssumeCapacity(switch (field.type) { | ||
| 539 | Ref => @intFromEnum(@field(extra, field.name)), | ||
| 540 | u32 => @field(extra, field.name), | ||
| 541 | else => @compileError("bad field type: " ++ @typeName(field.type)), | ||
| 542 | }); | ||
| 543 | } | ||
| 544 | return result; | ||
| 545 | } | ||
| 546 | |||
| 547 | pub fn get(i: *const Interner, ref: Ref) Key { | ||
| 548 | switch (ref) { | ||
| 549 | .ptr => return .ptr_ty, | ||
| 550 | .func => return .func_ty, | ||
| 551 | .noreturn => return .noreturn_ty, | ||
| 552 | .void => return .void_ty, | ||
| 553 | .i1 => return .{ .int_ty = 1 }, | ||
| 554 | .i8 => return .{ .int_ty = 8 }, | ||
| 555 | .i16 => return .{ .int_ty = 16 }, | ||
| 556 | .i32 => return .{ .int_ty = 32 }, | ||
| 557 | .i64 => return .{ .int_ty = 64 }, | ||
| 558 | .i128 => return .{ .int_ty = 128 }, | ||
| 559 | .f16 => return .{ .float_ty = 16 }, | ||
| 560 | .f32 => return .{ .float_ty = 32 }, | ||
| 561 | .f64 => return .{ .float_ty = 64 }, | ||
| 562 | .f80 => return .{ .float_ty = 80 }, | ||
| 563 | .f128 => return .{ .float_ty = 128 }, | ||
| 564 | .zero => return .{ .int = .{ .u64 = 0 } }, | ||
| 565 | .one => return .{ .int = .{ .u64 = 1 } }, | ||
| 566 | .null => return .null, | ||
| 567 | else => {}, | ||
| 568 | } | ||
| 569 | |||
| 570 | const item = i.items.get(@intFromEnum(ref)); | ||
| 571 | const data = item.data; | ||
| 572 | return switch (item.tag) { | ||
| 573 | .int_ty => .{ .int_ty = @intCast(data) }, | ||
| 574 | .float_ty => .{ .float_ty = @intCast(data) }, | ||
| 575 | .array_ty => { | ||
| 576 | const array_ty = i.extraData(Tag.Array, data); | ||
| 577 | return .{ .array_ty = .{ | ||
| 578 | .len = array_ty.getLen(), | ||
| 579 | .child = array_ty.child, | ||
| 580 | } }; | ||
| 581 | }, | ||
| 582 | .vector_ty => { | ||
| 583 | const vector_ty = i.extraData(Tag.Vector, data); | ||
| 584 | return .{ .vector_ty = .{ | ||
| 585 | .len = vector_ty.len, | ||
| 586 | .child = vector_ty.child, | ||
| 587 | } }; | ||
| 588 | }, | ||
| 589 | .u32 => .{ .int = .{ .u64 = data } }, | ||
| 590 | .i32 => .{ .int = .{ .i64 = @as(i32, @bitCast(data)) } }, | ||
| 591 | .int_positive, .int_negative => { | ||
| 592 | const int_info = i.extraData(Tag.Int, data); | ||
| 593 | const limbs = i.limbs.items[int_info.limbs_index..][0..int_info.limbs_len]; | ||
| 594 | return .{ .int = .{ | ||
| 595 | .big_int = .{ | ||
| 596 | .positive = item.tag == .int_positive, | ||
| 597 | .limbs = limbs, | ||
| 598 | }, | ||
| 599 | } }; | ||
| 600 | }, | ||
| 601 | .f16 => .{ .float = .{ .f16 = @bitCast(@as(u16, @intCast(data))) } }, | ||
| 602 | .f32 => .{ .float = .{ .f32 = @bitCast(data) } }, | ||
| 603 | .f64 => { | ||
| 604 | const float = i.extraData(Tag.F64, data); | ||
| 605 | return .{ .float = .{ .f64 = float.get() } }; | ||
| 606 | }, | ||
| 607 | .f80 => { | ||
| 608 | const float = i.extraData(Tag.F80, data); | ||
| 609 | return .{ .float = .{ .f80 = float.get() } }; | ||
| 610 | }, | ||
| 611 | .f128 => { | ||
| 612 | const float = i.extraData(Tag.F128, data); | ||
| 613 | return .{ .float = .{ .f128 = float.get() } }; | ||
| 614 | }, | ||
| 615 | .bytes => { | ||
| 616 | const bytes = i.extraData(Tag.Bytes, data); | ||
| 617 | return .{ .bytes = i.strings.items[bytes.strings_index..][0..bytes.len] }; | ||
| 618 | }, | ||
| 619 | .record_ty => { | ||
| 620 | const extra = i.extraDataTrail(Tag.Record, data); | ||
| 621 | return .{ | ||
| 622 | .record_ty = @ptrCast(i.extra.items[extra.end..][0..extra.data.elements_len]), | ||
| 623 | }; | ||
| 624 | }, | ||
| 625 | }; | ||
| 626 | } | ||
| 627 | |||
| 628 | fn extraData(i: *const Interner, comptime T: type, index: usize) T { | ||
| 629 | return i.extraDataTrail(T, index).data; | ||
| 630 | } | ||
| 631 | |||
| 632 | fn extraDataTrail(i: *const Interner, comptime T: type, index: usize) struct { data: T, end: u32 } { | ||
| 633 | var result: T = undefined; | ||
| 634 | const fields = @typeInfo(T).Struct.fields; | ||
| 635 | inline for (fields, 0..) |field, field_i| { | ||
| 636 | const int32 = i.extra.items[field_i + index]; | ||
| 637 | @field(result, field.name) = switch (field.type) { | ||
| 638 | Ref => @enumFromInt(int32), | ||
| 639 | u32 => int32, | ||
| 640 | else => @compileError("bad field type: " ++ @typeName(field.type)), | ||
| 641 | }; | ||
| 642 | } | ||
| 643 | return .{ | ||
| 644 | .data = result, | ||
| 645 | .end = @intCast(index + fields.len), | ||
| 646 | }; | ||
| 647 | } | ||
deps/aro/backend/Ir.zig created+696| ... | @@ -0,0 +1,696 @@ | ||
| 1 | const std = @import("std"); | ||
| 2 | const Allocator = std.mem.Allocator; | ||
| 3 | const assert = std.debug.assert; | ||
| 4 | const Interner = @import("Interner.zig"); | ||
| 5 | const Object = @import("Object.zig"); | ||
| 6 | |||
| 7 | const Ir = @This(); | ||
| 8 | |||
| 9 | interner: *Interner, | ||
| 10 | decls: std.StringArrayHashMapUnmanaged(Decl), | ||
| 11 | |||
| 12 | pub const Decl = struct { | ||
| 13 | instructions: std.MultiArrayList(Inst), | ||
| 14 | body: std.ArrayListUnmanaged(Ref), | ||
| 15 | arena: std.heap.ArenaAllocator.State, | ||
| 16 | |||
| 17 | pub fn deinit(decl: *Decl, gpa: Allocator) void { | ||
| 18 | decl.instructions.deinit(gpa); | ||
| 19 | decl.body.deinit(gpa); | ||
| 20 | decl.arena.promote(gpa).deinit(); | ||
| 21 | } | ||
| 22 | }; | ||
| 23 | |||
| 24 | pub const Builder = struct { | ||
| 25 | gpa: Allocator, | ||
| 26 | arena: std.heap.ArenaAllocator, | ||
| 27 | interner: *Interner, | ||
| 28 | |||
| 29 | decls: std.StringArrayHashMapUnmanaged(Decl) = .{}, | ||
| 30 | instructions: std.MultiArrayList(Ir.Inst) = .{}, | ||
| 31 | body: std.ArrayListUnmanaged(Ref) = .{}, | ||
| 32 | alloc_count: u32 = 0, | ||
| 33 | arg_count: u32 = 0, | ||
| 34 | current_label: Ref = undefined, | ||
| 35 | |||
| 36 | pub fn deinit(b: *Builder) void { | ||
| 37 | for (b.decls.values()) |*decl| { | ||
| 38 | decl.deinit(b.gpa); | ||
| 39 | } | ||
| 40 | b.arena.deinit(); | ||
| 41 | b.instructions.deinit(b.gpa); | ||
| 42 | b.body.deinit(b.gpa); | ||
| 43 | b.* = undefined; | ||
| 44 | } | ||
| 45 | |||
| 46 | pub fn finish(b: *Builder) Ir { | ||
| 47 | return .{ | ||
| 48 | .interner = b.interner, | ||
| 49 | .decls = b.decls.move(), | ||
| 50 | }; | ||
| 51 | } | ||
| 52 | |||
| 53 | pub fn startFn(b: *Builder) Allocator.Error!void { | ||
| 54 | const entry = try b.makeLabel("entry"); | ||
| 55 | try b.body.append(b.gpa, entry); | ||
| 56 | b.current_label = entry; | ||
| 57 | } | ||
| 58 | |||
| 59 | pub fn finishFn(b: *Builder, name: []const u8) !void { | ||
| 60 | var duped_instructions = try b.instructions.clone(b.gpa); | ||
| 61 | errdefer duped_instructions.deinit(b.gpa); | ||
| 62 | var duped_body = try b.body.clone(b.gpa); | ||
| 63 | errdefer duped_body.deinit(b.gpa); | ||
| 64 | |||
| 65 | try b.decls.put(b.gpa, name, .{ | ||
| 66 | .instructions = duped_instructions, | ||
| 67 | .body = duped_body, | ||
| 68 | .arena = b.arena.state, | ||
| 69 | }); | ||
| 70 | b.instructions.shrinkRetainingCapacity(0); | ||
| 71 | b.body.shrinkRetainingCapacity(0); | ||
| 72 | b.arena = std.heap.ArenaAllocator.init(b.gpa); | ||
| 73 | b.alloc_count = 0; | ||
| 74 | b.arg_count = 0; | ||
| 75 | } | ||
| 76 | |||
| 77 | pub fn startBlock(b: *Builder, label: Ref) !void { | ||
| 78 | try b.body.append(b.gpa, label); | ||
| 79 | b.current_label = label; | ||
| 80 | } | ||
| 81 | |||
| 82 | pub fn addArg(b: *Builder, ty: Interner.Ref) Allocator.Error!Ref { | ||
| 83 | const ref: Ref = @enumFromInt(b.instructions.len); | ||
| 84 | try b.instructions.append(b.gpa, .{ .tag = .arg, .data = .{ .none = {} }, .ty = ty }); | ||
| 85 | try b.body.insert(b.gpa, b.arg_count, ref); | ||
| 86 | b.arg_count += 1; | ||
| 87 | return ref; | ||
| 88 | } | ||
| 89 | |||
| 90 | pub fn addAlloc(b: *Builder, size: u32, @"align": u32) Allocator.Error!Ref { | ||
| 91 | const ref: Ref = @enumFromInt(b.instructions.len); | ||
| 92 | try b.instructions.append(b.gpa, .{ | ||
| 93 | .tag = .alloc, | ||
| 94 | .data = .{ .alloc = .{ .size = size, .@"align" = @"align" } }, | ||
| 95 | .ty = .ptr, | ||
| 96 | }); | ||
| 97 | try b.body.insert(b.gpa, b.alloc_count + b.arg_count + 1, ref); | ||
| 98 | b.alloc_count += 1; | ||
| 99 | return ref; | ||
| 100 | } | ||
| 101 | |||
| 102 | pub fn addInst(b: *Builder, tag: Ir.Inst.Tag, data: Ir.Inst.Data, ty: Interner.Ref) Allocator.Error!Ref { | ||
| 103 | const ref: Ref = @enumFromInt(b.instructions.len); | ||
| 104 | try b.instructions.append(b.gpa, .{ .tag = tag, .data = data, .ty = ty }); | ||
| 105 | try b.body.append(b.gpa, ref); | ||
| 106 | return ref; | ||
| 107 | } | ||
| 108 | |||
| 109 | pub fn makeLabel(b: *Builder, name: [*:0]const u8) Allocator.Error!Ref { | ||
| 110 | const ref: Ref = @enumFromInt(b.instructions.len); | ||
| 111 | try b.instructions.append(b.gpa, .{ .tag = .label, .data = .{ .label = name }, .ty = .void }); | ||
| 112 | return ref; | ||
| 113 | } | ||
| 114 | |||
| 115 | pub fn addJump(b: *Builder, label: Ref) Allocator.Error!void { | ||
| 116 | _ = try b.addInst(.jmp, .{ .un = label }, .noreturn); | ||
| 117 | } | ||
| 118 | |||
| 119 | pub fn addBranch(b: *Builder, cond: Ref, true_label: Ref, false_label: Ref) Allocator.Error!void { | ||
| 120 | const branch = try b.arena.allocator().create(Ir.Inst.Branch); | ||
| 121 | branch.* = .{ | ||
| 122 | .cond = cond, | ||
| 123 | .then = true_label, | ||
| 124 | .@"else" = false_label, | ||
| 125 | }; | ||
| 126 | _ = try b.addInst(.branch, .{ .branch = branch }, .noreturn); | ||
| 127 | } | ||
| 128 | |||
| 129 | pub fn addSwitch(b: *Builder, target: Ref, values: []Interner.Ref, labels: []Ref, default: Ref) Allocator.Error!void { | ||
| 130 | assert(values.len == labels.len); | ||
| 131 | const a = b.arena.allocator(); | ||
| 132 | const @"switch" = try a.create(Ir.Inst.Switch); | ||
| 133 | @"switch".* = .{ | ||
| 134 | .target = target, | ||
| 135 | .cases_len = @intCast(values.len), | ||
| 136 | .case_vals = (try a.dupe(Interner.Ref, values)).ptr, | ||
| 137 | .case_labels = (try a.dupe(Ref, labels)).ptr, | ||
| 138 | .default = default, | ||
| 139 | }; | ||
| 140 | _ = try b.addInst(.@"switch", .{ .@"switch" = @"switch" }, .noreturn); | ||
| 141 | } | ||
| 142 | |||
| 143 | pub fn addStore(b: *Builder, ptr: Ref, val: Ref) Allocator.Error!void { | ||
| 144 | _ = try b.addInst(.store, .{ .bin = .{ .lhs = ptr, .rhs = val } }, .void); | ||
| 145 | } | ||
| 146 | |||
| 147 | pub fn addConstant(b: *Builder, val: Interner.Ref, ty: Interner.Ref) Allocator.Error!Ref { | ||
| 148 | const ref: Ref = @enumFromInt(b.instructions.len); | ||
| 149 | try b.instructions.append(b.gpa, .{ | ||
| 150 | .tag = .constant, | ||
| 151 | .data = .{ .constant = val }, | ||
| 152 | .ty = ty, | ||
| 153 | }); | ||
| 154 | return ref; | ||
| 155 | } | ||
| 156 | |||
| 157 | pub fn addPhi(b: *Builder, inputs: []const Inst.Phi.Input, ty: Interner.Ref) Allocator.Error!Ref { | ||
| 158 | const a = b.arena.allocator(); | ||
| 159 | const input_refs = try a.alloc(Ref, inputs.len * 2 + 1); | ||
| 160 | input_refs[0] = @enumFromInt(inputs.len); | ||
| 161 | std.mem.copy(Ref, input_refs[1..], std.mem.bytesAsSlice(Ref, std.mem.sliceAsBytes(inputs))); | ||
| 162 | |||
| 163 | return b.addInst(.phi, .{ .phi = .{ .ptr = input_refs.ptr } }, ty); | ||
| 164 | } | ||
| 165 | |||
| 166 | pub fn addSelect(b: *Builder, cond: Ref, then: Ref, @"else": Ref, ty: Interner.Ref) Allocator.Error!Ref { | ||
| 167 | const branch = try b.arena.allocator().create(Ir.Inst.Branch); | ||
| 168 | branch.* = .{ | ||
| 169 | .cond = cond, | ||
| 170 | .then = then, | ||
| 171 | .@"else" = @"else", | ||
| 172 | }; | ||
| 173 | return b.addInst(.select, .{ .branch = branch }, ty); | ||
| 174 | } | ||
| 175 | }; | ||
| 176 | |||
| 177 | pub const Renderer = struct { | ||
| 178 | gpa: Allocator, | ||
| 179 | obj: *Object, | ||
| 180 | ir: *const Ir, | ||
| 181 | errors: ErrorList = .{}, | ||
| 182 | |||
| 183 | pub const ErrorList = std.StringArrayHashMapUnmanaged([]const u8); | ||
| 184 | |||
| 185 | pub const Error = Allocator.Error || error{LowerFail}; | ||
| 186 | |||
| 187 | pub fn deinit(r: *Renderer) void { | ||
| 188 | for (r.errors.values()) |msg| r.gpa.free(msg); | ||
| 189 | r.errors.deinit(r.gpa); | ||
| 190 | } | ||
| 191 | |||
| 192 | pub fn render(r: *Renderer) !void { | ||
| 193 | switch (r.obj.target.cpu.arch) { | ||
| 194 | .x86, .x86_64 => return @import("Ir/x86/Renderer.zig").render(r), | ||
| 195 | else => unreachable, | ||
| 196 | } | ||
| 197 | } | ||
| 198 | |||
| 199 | pub fn fail( | ||
| 200 | r: *Renderer, | ||
| 201 | name: []const u8, | ||
| 202 | comptime format: []const u8, | ||
| 203 | args: anytype, | ||
| 204 | ) Error { | ||
| 205 | try r.errors.ensureUnusedCapacity(r.gpa, 1); | ||
| 206 | r.errors.putAssumeCapacity(name, try std.fmt.allocPrint(r.gpa, format, args)); | ||
| 207 | return error.LowerFail; | ||
| 208 | } | ||
| 209 | }; | ||
| 210 | |||
| 211 | pub fn render( | ||
| 212 | ir: *const Ir, | ||
| 213 | gpa: Allocator, | ||
| 214 | target: std.Target, | ||
| 215 | errors: ?*Renderer.ErrorList, | ||
| 216 | ) !*Object { | ||
| 217 | const obj = try Object.create(gpa, target); | ||
| 218 | errdefer obj.deinit(); | ||
| 219 | |||
| 220 | var renderer: Renderer = .{ | ||
| 221 | .gpa = gpa, | ||
| 222 | .obj = obj, | ||
| 223 | .ir = ir, | ||
| 224 | }; | ||
| 225 | defer { | ||
| 226 | if (errors) |some| { | ||
| 227 | some.* = renderer.errors.move(); | ||
| 228 | } | ||
| 229 | renderer.deinit(); | ||
| 230 | } | ||
| 231 | |||
| 232 | try renderer.render(); | ||
| 233 | return obj; | ||
| 234 | } | ||
| 235 | |||
| 236 | pub const Ref = enum(u32) { none = std.math.maxInt(u32), _ }; | ||
| 237 | |||
| 238 | pub const Inst = struct { | ||
| 239 | tag: Tag, | ||
| 240 | data: Data, | ||
| 241 | ty: Interner.Ref, | ||
| 242 | |||
| 243 | pub const Tag = enum { | ||
| 244 | // data.constant | ||
| 245 | // not included in blocks | ||
| 246 | constant, | ||
| 247 | |||
| 248 | // data.arg | ||
| 249 | // not included in blocks | ||
| 250 | arg, | ||
| 251 | symbol, | ||
| 252 | |||
| 253 | // data.label | ||
| 254 | label, | ||
| 255 | |||
| 256 | // data.block | ||
| 257 | label_addr, | ||
| 258 | jmp, | ||
| 259 | |||
| 260 | // data.switch | ||
| 261 | @"switch", | ||
| 262 | |||
| 263 | // data.branch | ||
| 264 | branch, | ||
| 265 | select, | ||
| 266 | |||
| 267 | // data.un | ||
| 268 | jmp_val, | ||
| 269 | |||
| 270 | // data.call | ||
| 271 | call, | ||
| 272 | |||
| 273 | // data.alloc | ||
| 274 | alloc, | ||
| 275 | |||
| 276 | // data.phi | ||
| 277 | phi, | ||
| 278 | |||
| 279 | // data.bin | ||
| 280 | store, | ||
| 281 | bit_or, | ||
| 282 | bit_xor, | ||
| 283 | bit_and, | ||
| 284 | bit_shl, | ||
| 285 | bit_shr, | ||
| 286 | cmp_eq, | ||
| 287 | cmp_ne, | ||
| 288 | cmp_lt, | ||
| 289 | cmp_lte, | ||
| 290 | cmp_gt, | ||
| 291 | cmp_gte, | ||
| 292 | add, | ||
| 293 | sub, | ||
| 294 | mul, | ||
| 295 | div, | ||
| 296 | mod, | ||
| 297 | |||
| 298 | // data.un | ||
| 299 | ret, | ||
| 300 | load, | ||
| 301 | bit_not, | ||
| 302 | negate, | ||
| 303 | trunc, | ||
| 304 | zext, | ||
| 305 | sext, | ||
| 306 | }; | ||
| 307 | |||
| 308 | pub const Data = union { | ||
| 309 | constant: Interner.Ref, | ||
| 310 | none: void, | ||
| 311 | bin: struct { | ||
| 312 | lhs: Ref, | ||
| 313 | rhs: Ref, | ||
| 314 | }, | ||
| 315 | un: Ref, | ||
| 316 | arg: u32, | ||
| 317 | alloc: struct { | ||
| 318 | size: u32, | ||
| 319 | @"align": u32, | ||
| 320 | }, | ||
| 321 | @"switch": *Switch, | ||
| 322 | call: *Call, | ||
| 323 | label: [*:0]const u8, | ||
| 324 | branch: *Branch, | ||
| 325 | phi: Phi, | ||
| 326 | }; | ||
| 327 | |||
| 328 | pub const Branch = struct { | ||
| 329 | cond: Ref, | ||
| 330 | then: Ref, | ||
| 331 | @"else": Ref, | ||
| 332 | }; | ||
| 333 | |||
| 334 | pub const Switch = struct { | ||
| 335 | target: Ref, | ||
| 336 | cases_len: u32, | ||
| 337 | default: Ref, | ||
| 338 | case_vals: [*]Interner.Ref, | ||
| 339 | case_labels: [*]Ref, | ||
| 340 | }; | ||
| 341 | |||
| 342 | pub const Call = struct { | ||
| 343 | func: Ref, | ||
| 344 | args_len: u32, | ||
| 345 | args_ptr: [*]Ref, | ||
| 346 | |||
| 347 | pub fn args(c: Call) []Ref { | ||
| 348 | return c.args_ptr[0..c.args_len]; | ||
| 349 | } | ||
| 350 | }; | ||
| 351 | |||
| 352 | pub const Phi = struct { | ||
| 353 | ptr: [*]Ir.Ref, | ||
| 354 | |||
| 355 | pub const Input = struct { | ||
| 356 | label: Ir.Ref, | ||
| 357 | value: Ir.Ref, | ||
| 358 | }; | ||
| 359 | |||
| 360 | pub fn inputs(p: Phi) []Input { | ||
| 361 | const len = @intFromEnum(p.ptr[0]) * 2; | ||
| 362 | const slice = (p.ptr + 1)[0..len]; | ||
| 363 | return std.mem.bytesAsSlice(Input, std.mem.sliceAsBytes(slice)); | ||
| 364 | } | ||
| 365 | }; | ||
| 366 | }; | ||
| 367 | |||
| 368 | pub fn deinit(ir: *Ir, gpa: std.mem.Allocator) void { | ||
| 369 | for (ir.decls.values()) |*decl| { | ||
| 370 | decl.deinit(gpa); | ||
| 371 | } | ||
| 372 | ir.decls.deinit(gpa); | ||
| 373 | ir.* = undefined; | ||
| 374 | } | ||
| 375 | |||
| 376 | const TYPE = std.io.tty.Color.bright_magenta; | ||
| 377 | const INST = std.io.tty.Color.bright_cyan; | ||
| 378 | const REF = std.io.tty.Color.bright_blue; | ||
| 379 | const LITERAL = std.io.tty.Color.bright_green; | ||
| 380 | const ATTRIBUTE = std.io.tty.Color.bright_yellow; | ||
| 381 | |||
| 382 | const RefMap = std.AutoArrayHashMap(Ref, void); | ||
| 383 | |||
| 384 | pub fn dump(ir: *const Ir, gpa: Allocator, config: std.io.tty.Config, w: anytype) !void { | ||
| 385 | for (ir.decls.keys(), ir.decls.values()) |name, *decl| { | ||
| 386 | try ir.dumpDecl(decl, gpa, name, config, w); | ||
| 387 | } | ||
| 388 | } | ||
| 389 | |||
| 390 | fn dumpDecl(ir: *const Ir, decl: *const Decl, gpa: Allocator, name: []const u8, config: std.io.tty.Config, w: anytype) !void { | ||
| 391 | const tags = decl.instructions.items(.tag); | ||
| 392 | const data = decl.instructions.items(.data); | ||
| 393 | |||
| 394 | var ref_map = RefMap.init(gpa); | ||
| 395 | defer ref_map.deinit(); | ||
| 396 | |||
| 397 | var label_map = RefMap.init(gpa); | ||
| 398 | defer label_map.deinit(); | ||
| 399 | |||
| 400 | const ret_inst = decl.body.items[decl.body.items.len - 1]; | ||
| 401 | const ret_operand = data[@intFromEnum(ret_inst)].un; | ||
| 402 | const ret_ty = decl.instructions.items(.ty)[@intFromEnum(ret_operand)]; | ||
| 403 | try ir.writeType(ret_ty, config, w); | ||
| 404 | try config.setColor(w, REF); | ||
| 405 | try w.print(" @{s}", .{name}); | ||
| 406 | try config.setColor(w, .reset); | ||
| 407 | try w.writeAll("("); | ||
| 408 | |||
| 409 | var arg_count: u32 = 0; | ||
| 410 | while (true) : (arg_count += 1) { | ||
| 411 | const ref = decl.body.items[arg_count]; | ||
| 412 | if (tags[@intFromEnum(ref)] != .arg) break; | ||
| 413 | if (arg_count != 0) try w.writeAll(", "); | ||
| 414 | try ref_map.put(ref, {}); | ||
| 415 | try ir.writeRef(decl, &ref_map, ref, config, w); | ||
| 416 | try config.setColor(w, .reset); | ||
| 417 | } | ||
| 418 | try w.writeAll(") {\n"); | ||
| 419 | for (decl.body.items[arg_count..]) |ref| { | ||
| 420 | switch (tags[@intFromEnum(ref)]) { | ||
| 421 | .label => try label_map.put(ref, {}), | ||
| 422 | else => {}, | ||
| 423 | } | ||
| 424 | } | ||
| 425 | |||
| 426 | for (decl.body.items[arg_count..]) |ref| { | ||
| 427 | const i = @intFromEnum(ref); | ||
| 428 | const tag = tags[i]; | ||
| 429 | switch (tag) { | ||
| 430 | .arg, .constant, .symbol => unreachable, | ||
| 431 | .label => { | ||
| 432 | const label_index = label_map.getIndex(ref).?; | ||
| 433 | try config.setColor(w, REF); | ||
| 434 | try w.print("{s}.{d}:\n", .{ data[i].label, label_index }); | ||
| 435 | }, | ||
| 436 | // .label_val => { | ||
| 437 | // const un = data[i].un; | ||
| 438 | // try w.print(" %{d} = label.{d}\n", .{ i, @intFromEnum(un) }); | ||
| 439 | // }, | ||
| 440 | .jmp => { | ||
| 441 | const un = data[i].un; | ||
| 442 | try config.setColor(w, INST); | ||
| 443 | try w.writeAll(" jmp "); | ||
| 444 | try writeLabel(decl, &label_map, un, config, w); | ||
| 445 | try w.writeByte('\n'); | ||
| 446 | }, | ||
| 447 | .branch => { | ||
| 448 | const br = data[i].branch; | ||
| 449 | try config.setColor(w, INST); | ||
| 450 | try w.writeAll(" branch "); | ||
| 451 | try ir.writeRef(decl, &ref_map, br.cond, config, w); | ||
| 452 | try config.setColor(w, .reset); | ||
| 453 | try w.writeAll(", "); | ||
| 454 | try writeLabel(decl, &label_map, br.then, config, w); | ||
| 455 | try config.setColor(w, .reset); | ||
| 456 | try w.writeAll(", "); | ||
| 457 | try writeLabel(decl, &label_map, br.@"else", config, w); | ||
| 458 | try w.writeByte('\n'); | ||
| 459 | }, | ||
| 460 | .select => { | ||
| 461 | const br = data[i].branch; | ||
| 462 | try ir.writeNewRef(decl, &ref_map, ref, config, w); | ||
| 463 | try w.writeAll("select "); | ||
| 464 | try ir.writeRef(decl, &ref_map, br.cond, config, w); | ||
| 465 | try config.setColor(w, .reset); | ||
| 466 | try w.writeAll(", "); | ||
| 467 | try ir.writeRef(decl, &ref_map, br.then, config, w); | ||
| 468 | try config.setColor(w, .reset); | ||
| 469 | try w.writeAll(", "); | ||
| 470 | try ir.writeRef(decl, &ref_map, br.@"else", config, w); | ||
| 471 | try w.writeByte('\n'); | ||
| 472 | }, | ||
| 473 | // .jmp_val => { | ||
| 474 | // const bin = data[i].bin; | ||
| 475 | // try w.print(" %{s} %{d} label.{d}\n", .{ @tagName(tag), @intFromEnum(bin.lhs), @intFromEnum(bin.rhs) }); | ||
| 476 | // }, | ||
| 477 | .@"switch" => { | ||
| 478 | const @"switch" = data[i].@"switch"; | ||
| 479 | try config.setColor(w, INST); | ||
| 480 | try w.writeAll(" switch "); | ||
| 481 | try ir.writeRef(decl, &ref_map, @"switch".target, config, w); | ||
| 482 | try config.setColor(w, .reset); | ||
| 483 | try w.writeAll(" {"); | ||
| 484 | for (@"switch".case_vals[0..@"switch".cases_len], @"switch".case_labels) |val_ref, label_ref| { | ||
| 485 | try w.writeAll("\n "); | ||
| 486 | try ir.writeValue(val_ref, config, w); | ||
| 487 | try config.setColor(w, .reset); | ||
| 488 | try w.writeAll(" => "); | ||
| 489 | try writeLabel(decl, &label_map, label_ref, config, w); | ||
| 490 | try config.setColor(w, .reset); | ||
| 491 | } | ||
| 492 | try config.setColor(w, LITERAL); | ||
| 493 | try w.writeAll("\n default "); | ||
| 494 | try config.setColor(w, .reset); | ||
| 495 | try w.writeAll("=> "); | ||
| 496 | try writeLabel(decl, &label_map, @"switch".default, config, w); | ||
| 497 | try config.setColor(w, .reset); | ||
| 498 | try w.writeAll("\n }\n"); | ||
| 499 | }, | ||
| 500 | .call => { | ||
| 501 | const call = data[i].call; | ||
| 502 | try ir.writeNewRef(decl, &ref_map, ref, config, w); | ||
| 503 | try w.writeAll("call "); | ||
| 504 | try ir.writeRef(decl, &ref_map, call.func, config, w); | ||
| 505 | try config.setColor(w, .reset); | ||
| 506 | try w.writeAll("("); | ||
| 507 | for (call.args(), 0..) |arg, arg_i| { | ||
| 508 | if (arg_i != 0) try w.writeAll(", "); | ||
| 509 | try ir.writeRef(decl, &ref_map, arg, config, w); | ||
| 510 | try config.setColor(w, .reset); | ||
| 511 | } | ||
| 512 | try w.writeAll(")\n"); | ||
| 513 | }, | ||
| 514 | .alloc => { | ||
| 515 | const alloc = data[i].alloc; | ||
| 516 | try ir.writeNewRef(decl, &ref_map, ref, config, w); | ||
| 517 | try w.writeAll("alloc "); | ||
| 518 | try config.setColor(w, ATTRIBUTE); | ||
| 519 | try w.writeAll("size "); | ||
| 520 | try config.setColor(w, LITERAL); | ||
| 521 | try w.print("{d}", .{alloc.size}); | ||
| 522 | try config.setColor(w, ATTRIBUTE); | ||
| 523 | try w.writeAll(" align "); | ||
| 524 | try config.setColor(w, LITERAL); | ||
| 525 | try w.print("{d}", .{alloc.@"align"}); | ||
| 526 | try w.writeByte('\n'); | ||
| 527 | }, | ||
| 528 | .phi => { | ||
| 529 | try ir.writeNewRef(decl, &ref_map, ref, config, w); | ||
| 530 | try w.writeAll("phi"); | ||
| 531 | try config.setColor(w, .reset); | ||
| 532 | try w.writeAll(" {"); | ||
| 533 | for (data[i].phi.inputs()) |input| { | ||
| 534 | try w.writeAll("\n "); | ||
| 535 | try writeLabel(decl, &label_map, input.label, config, w); | ||
| 536 | try config.setColor(w, .reset); | ||
| 537 | try w.writeAll(" => "); | ||
| 538 | try ir.writeRef(decl, &ref_map, input.value, config, w); | ||
| 539 | try config.setColor(w, .reset); | ||
| 540 | } | ||
| 541 | try config.setColor(w, .reset); | ||
| 542 | try w.writeAll("\n }\n"); | ||
| 543 | }, | ||
| 544 | .store => { | ||
| 545 | const bin = data[i].bin; | ||
| 546 | try config.setColor(w, INST); | ||
| 547 | try w.writeAll(" store "); | ||
| 548 | try ir.writeRef(decl, &ref_map, bin.lhs, config, w); | ||
| 549 | try config.setColor(w, .reset); | ||
| 550 | try w.writeAll(", "); | ||
| 551 | try ir.writeRef(decl, &ref_map, bin.rhs, config, w); | ||
| 552 | try w.writeByte('\n'); | ||
| 553 | }, | ||
| 554 | .ret => { | ||
| 555 | try config.setColor(w, INST); | ||
| 556 | try w.writeAll(" ret "); | ||
| 557 | if (data[i].un != .none) try ir.writeRef(decl, &ref_map, data[i].un, config, w); | ||
| 558 | try w.writeByte('\n'); | ||
| 559 | }, | ||
| 560 | .load => { | ||
| 561 | try ir.writeNewRef(decl, &ref_map, ref, config, w); | ||
| 562 | try w.writeAll("load "); | ||
| 563 | try ir.writeRef(decl, &ref_map, data[i].un, config, w); | ||
| 564 | try w.writeByte('\n'); | ||
| 565 | }, | ||
| 566 | .bit_or, | ||
| 567 | .bit_xor, | ||
| 568 | .bit_and, | ||
| 569 | .bit_shl, | ||
| 570 | .bit_shr, | ||
| 571 | .cmp_eq, | ||
| 572 | .cmp_ne, | ||
| 573 | .cmp_lt, | ||
| 574 | .cmp_lte, | ||
| 575 | .cmp_gt, | ||
| 576 | .cmp_gte, | ||
| 577 | .add, | ||
| 578 | .sub, | ||
| 579 | .mul, | ||
| 580 | .div, | ||
| 581 | .mod, | ||
| 582 | => { | ||
| 583 | const bin = data[i].bin; | ||
| 584 | try ir.writeNewRef(decl, &ref_map, ref, config, w); | ||
| 585 | try w.print("{s} ", .{@tagName(tag)}); | ||
| 586 | try ir.writeRef(decl, &ref_map, bin.lhs, config, w); | ||
| 587 | try config.setColor(w, .reset); | ||
| 588 | try w.writeAll(", "); | ||
| 589 | try ir.writeRef(decl, &ref_map, bin.rhs, config, w); | ||
| 590 | try w.writeByte('\n'); | ||
| 591 | }, | ||
| 592 | .bit_not, | ||
| 593 | .negate, | ||
| 594 | .trunc, | ||
| 595 | .zext, | ||
| 596 | .sext, | ||
| 597 | => { | ||
| 598 | const un = data[i].un; | ||
| 599 | try ir.writeNewRef(decl, &ref_map, ref, config, w); | ||
| 600 | try w.print("{s} ", .{@tagName(tag)}); | ||
| 601 | try ir.writeRef(decl, &ref_map, un, config, w); | ||
| 602 | try w.writeByte('\n'); | ||
| 603 | }, | ||
| 604 | .label_addr, .jmp_val => {}, | ||
| 605 | } | ||
| 606 | } | ||
| 607 | try config.setColor(w, .reset); | ||
| 608 | try w.writeAll("}\n\n"); | ||
| 609 | } | ||
| 610 | |||
| 611 | fn writeType(ir: Ir, ty_ref: Interner.Ref, config: std.io.tty.Config, w: anytype) !void { | ||
| 612 | const ty = ir.interner.get(ty_ref); | ||
| 613 | try config.setColor(w, TYPE); | ||
| 614 | switch (ty) { | ||
| 615 | .ptr_ty, .noreturn_ty, .void_ty, .func_ty => try w.writeAll(@tagName(ty)), | ||
| 616 | .int_ty => |bits| try w.print("i{d}", .{bits}), | ||
| 617 | .float_ty => |bits| try w.print("f{d}", .{bits}), | ||
| 618 | .array_ty => |info| { | ||
| 619 | try w.print("[{d} * ", .{info.len}); | ||
| 620 | try ir.writeType(info.child, .no_color, w); | ||
| 621 | try w.writeByte(']'); | ||
| 622 | }, | ||
| 623 | .vector_ty => |info| { | ||
| 624 | try w.print("<{d} * ", .{info.len}); | ||
| 625 | try ir.writeType(info.child, .no_color, w); | ||
| 626 | try w.writeByte('>'); | ||
| 627 | }, | ||
| 628 | .record_ty => |elems| { | ||
| 629 | // TODO collect into buffer and only print once | ||
| 630 | try w.writeAll("{ "); | ||
| 631 | for (elems, 0..) |elem, i| { | ||
| 632 | if (i != 0) try w.writeAll(", "); | ||
| 633 | try ir.writeType(elem, config, w); | ||
| 634 | } | ||
| 635 | try w.writeAll(" }"); | ||
| 636 | }, | ||
| 637 | else => unreachable, // not a type | ||
| 638 | } | ||
| 639 | } | ||
| 640 | |||
| 641 | fn writeValue(ir: Ir, val: Interner.Ref, config: std.io.tty.Config, w: anytype) !void { | ||
| 642 | try config.setColor(w, LITERAL); | ||
| 643 | const key = ir.interner.get(val); | ||
| 644 | switch (key) { | ||
| 645 | .null => return w.writeAll("nullptr_t"), | ||
| 646 | .int => |repr| switch (repr) { | ||
| 647 | inline else => |x| return w.print("{d}", .{x}), | ||
| 648 | }, | ||
| 649 | .float => |repr| switch (repr) { | ||
| 650 | inline else => |x| return w.print("{d}", .{@as(f64, @floatCast(x))}), | ||
| 651 | }, | ||
| 652 | .bytes => |b| return std.zig.fmt.stringEscape(b, "", .{}, w), | ||
| 653 | else => unreachable, // not a value | ||
| 654 | } | ||
| 655 | } | ||
| 656 | |||
| 657 | fn writeRef(ir: Ir, decl: *const Decl, ref_map: *RefMap, ref: Ref, config: std.io.tty.Config, w: anytype) !void { | ||
| 658 | assert(ref != .none); | ||
| 659 | const index = @intFromEnum(ref); | ||
| 660 | const ty_ref = decl.instructions.items(.ty)[index]; | ||
| 661 | if (decl.instructions.items(.tag)[index] == .constant) { | ||
| 662 | try ir.writeType(ty_ref, config, w); | ||
| 663 | const v_ref = decl.instructions.items(.data)[index].constant; | ||
| 664 | try w.writeByte(' '); | ||
| 665 | try ir.writeValue(v_ref, config, w); | ||
| 666 | return; | ||
| 667 | } else if (decl.instructions.items(.tag)[index] == .symbol) { | ||
| 668 | const name = decl.instructions.items(.data)[index].label; | ||
| 669 | try ir.writeType(ty_ref, config, w); | ||
| 670 | try config.setColor(w, REF); | ||
| 671 | try w.print(" @{s}", .{name}); | ||
| 672 | return; | ||
| 673 | } | ||
| 674 | try ir.writeType(ty_ref, config, w); | ||
| 675 | try config.setColor(w, REF); | ||
| 676 | const ref_index = ref_map.getIndex(ref).?; | ||
| 677 | try w.print(" %{d}", .{ref_index}); | ||
| 678 | } | ||
| 679 | |||
| 680 | fn writeNewRef(ir: Ir, decl: *const Decl, ref_map: *RefMap, ref: Ref, config: std.io.tty.Config, w: anytype) !void { | ||
| 681 | try ref_map.put(ref, {}); | ||
| 682 | try w.writeAll(" "); | ||
| 683 | try ir.writeRef(decl, ref_map, ref, config, w); | ||
| 684 | try config.setColor(w, .reset); | ||
| 685 | try w.writeAll(" = "); | ||
| 686 | try config.setColor(w, INST); | ||
| 687 | } | ||
| 688 | |||
| 689 | fn writeLabel(decl: *const Decl, label_map: *RefMap, ref: Ref, config: std.io.tty.Config, w: anytype) !void { | ||
| 690 | assert(ref != .none); | ||
| 691 | const index = @intFromEnum(ref); | ||
| 692 | const label = decl.instructions.items(.data)[index].label; | ||
| 693 | try config.setColor(w, REF); | ||
| 694 | const label_index = label_map.getIndex(ref).?; | ||
| 695 | try w.print("{s}.{d}", .{ label, label_index }); | ||
| 696 | } | ||
deps/aro/backend/Ir/x86/Renderer.zig created+65| ... | @@ -0,0 +1,65 @@ | ||
| 1 | const std = @import("std"); | ||
| 2 | const Allocator = std.mem.Allocator; | ||
| 3 | const assert = std.debug.assert; | ||
| 4 | const Interner = @import("../../Interner.zig"); | ||
| 5 | const Ir = @import("../../Ir.zig"); | ||
| 6 | const BaseRenderer = Ir.Renderer; | ||
| 7 | const zig = @import("zig"); | ||
| 8 | const abi = zig.arch.x86_64.abi; | ||
| 9 | const bits = zig.arch.x86_64.bits; | ||
| 10 | |||
| 11 | const Condition = bits.Condition; | ||
| 12 | const Immediate = bits.Immediate; | ||
| 13 | const Memory = bits.Memory; | ||
| 14 | const Register = bits.Register; | ||
| 15 | const RegisterLock = RegisterManager.RegisterLock; | ||
| 16 | const FrameIndex = bits.FrameIndex; | ||
| 17 | |||
| 18 | const RegisterManager = zig.RegisterManager(Renderer, Register, Ir.Ref, abi.allocatable_regs); | ||
| 19 | |||
| 20 | // Register classes | ||
| 21 | const RegisterBitSet = RegisterManager.RegisterBitSet; | ||
| 22 | const RegisterClass = struct { | ||
| 23 | const gp: RegisterBitSet = blk: { | ||
| 24 | var set = RegisterBitSet.initEmpty(); | ||
| 25 | for (abi.allocatable_regs, 0..) |reg, index| if (reg.class() == .general_purpose) set.set(index); | ||
| 26 | break :blk set; | ||
| 27 | }; | ||
| 28 | const x87: RegisterBitSet = blk: { | ||
| 29 | var set = RegisterBitSet.initEmpty(); | ||
| 30 | for (abi.allocatable_regs, 0..) |reg, index| if (reg.class() == .x87) set.set(index); | ||
| 31 | break :blk set; | ||
| 32 | }; | ||
| 33 | const sse: RegisterBitSet = blk: { | ||
| 34 | var set = RegisterBitSet.initEmpty(); | ||
| 35 | for (abi.allocatable_regs, 0..) |reg, index| if (reg.class() == .sse) set.set(index); | ||
| 36 | break :blk set; | ||
| 37 | }; | ||
| 38 | }; | ||
| 39 | |||
| 40 | const Renderer = @This(); | ||
| 41 | |||
| 42 | base: *BaseRenderer, | ||
| 43 | interner: *Interner, | ||
| 44 | |||
| 45 | register_manager: RegisterManager = .{}, | ||
| 46 | |||
| 47 | pub fn render(base: *BaseRenderer) !void { | ||
| 48 | var renderer: Renderer = .{ | ||
| 49 | .base = base, | ||
| 50 | .interner = base.ir.interner, | ||
| 51 | }; | ||
| 52 | |||
| 53 | for (renderer.base.ir.decls.keys(), renderer.base.ir.decls.values()) |name, decl| { | ||
| 54 | renderer.renderFn(name, decl) catch |e| switch (e) { | ||
| 55 | error.OutOfMemory => return e, | ||
| 56 | error.LowerFail => continue, | ||
| 57 | }; | ||
| 58 | } | ||
| 59 | if (renderer.base.errors.entries.len != 0) return error.LowerFail; | ||
| 60 | } | ||
| 61 | |||
| 62 | fn renderFn(r: *Renderer, name: []const u8, decl: Ir.Decl) !void { | ||
| 63 | _ = decl; | ||
| 64 | return r.base.fail(name, "TODO implement lowering functions", .{}); | ||
| 65 | } | ||
deps/aro/backend/Object.zig created+73| ... | @@ -0,0 +1,73 @@ | ||
| 1 | const std = @import("std"); | ||
| 2 | const Allocator = std.mem.Allocator; | ||
| 3 | const Elf = @import("Object/Elf.zig"); | ||
| 4 | |||
| 5 | const Object = @This(); | ||
| 6 | |||
| 7 | format: std.Target.ObjectFormat, | ||
| 8 | target: std.Target, | ||
| 9 | |||
| 10 | pub fn create(gpa: Allocator, target: std.Target) !*Object { | ||
| 11 | switch (target.ofmt) { | ||
| 12 | .elf => return Elf.create(gpa, target), | ||
| 13 | else => unreachable, | ||
| 14 | } | ||
| 15 | } | ||
| 16 | |||
| 17 | pub fn deinit(obj: *Object) void { | ||
| 18 | switch (obj.format) { | ||
| 19 | .elf => @fieldParentPtr(Elf, "obj", obj).deinit(), | ||
| 20 | else => unreachable, | ||
| 21 | } | ||
| 22 | } | ||
| 23 | |||
| 24 | pub const Section = union(enum) { | ||
| 25 | undefined, | ||
| 26 | data, | ||
| 27 | read_only_data, | ||
| 28 | func, | ||
| 29 | strings, | ||
| 30 | custom: []const u8, | ||
| 31 | }; | ||
| 32 | |||
| 33 | pub fn getSection(obj: *Object, section: Section) !*std.ArrayList(u8) { | ||
| 34 | switch (obj.format) { | ||
| 35 | .elf => return @fieldParentPtr(Elf, "obj", obj).getSection(section), | ||
| 36 | else => unreachable, | ||
| 37 | } | ||
| 38 | } | ||
| 39 | |||
| 40 | pub const SymbolType = enum { | ||
| 41 | func, | ||
| 42 | variable, | ||
| 43 | external, | ||
| 44 | }; | ||
| 45 | |||
| 46 | pub fn declareSymbol( | ||
| 47 | obj: *Object, | ||
| 48 | section: Section, | ||
| 49 | name: ?[]const u8, | ||
| 50 | linkage: std.builtin.GlobalLinkage, | ||
| 51 | @"type": SymbolType, | ||
| 52 | offset: u64, | ||
| 53 | size: u64, | ||
| 54 | ) ![]const u8 { | ||
| 55 | switch (obj.format) { | ||
| 56 | .elf => return @fieldParentPtr(Elf, "obj", obj).declareSymbol(section, name, linkage, @"type", offset, size), | ||
| 57 | else => unreachable, | ||
| 58 | } | ||
| 59 | } | ||
| 60 | |||
| 61 | pub fn addRelocation(obj: *Object, name: []const u8, section: Section, address: u64, addend: i64) !void { | ||
| 62 | switch (obj.format) { | ||
| 63 | .elf => return @fieldParentPtr(Elf, "obj", obj).addRelocation(name, section, address, addend), | ||
| 64 | else => unreachable, | ||
| 65 | } | ||
| 66 | } | ||
| 67 | |||
| 68 | pub fn finish(obj: *Object, file: std.fs.File) !void { | ||
| 69 | switch (obj.format) { | ||
| 70 | .elf => return @fieldParentPtr(Elf, "obj", obj).finish(file), | ||
| 71 | else => unreachable, | ||
| 72 | } | ||
| 73 | } | ||
deps/aro/backend/Object/Elf.zig created+378| ... | @@ -0,0 +1,378 @@ | ||
| 1 | const std = @import("std"); | ||
| 2 | const Allocator = std.mem.Allocator; | ||
| 3 | const Target = std.Target; | ||
| 4 | const Object = @import("../Object.zig"); | ||
| 5 | |||
| 6 | const Section = struct { | ||
| 7 | data: std.ArrayList(u8), | ||
| 8 | relocations: std.ArrayListUnmanaged(Relocation) = .{}, | ||
| 9 | flags: u64, | ||
| 10 | type: u32, | ||
| 11 | index: u16 = undefined, | ||
| 12 | }; | ||
| 13 | |||
| 14 | const Symbol = struct { | ||
| 15 | section: ?*Section, | ||
| 16 | size: u64, | ||
| 17 | offset: u64, | ||
| 18 | index: u16 = undefined, | ||
| 19 | info: u8, | ||
| 20 | }; | ||
| 21 | |||
| 22 | const Relocation = struct { | ||
| 23 | symbol: *Symbol, | ||
| 24 | addend: i64, | ||
| 25 | offset: u48, | ||
| 26 | type: u8, | ||
| 27 | }; | ||
| 28 | |||
| 29 | const additional_sections = 3; // null section, strtab, symtab | ||
| 30 | const strtab_index = 1; | ||
| 31 | const symtab_index = 2; | ||
| 32 | const strtab_default = "\x00.strtab\x00.symtab\x00"; | ||
| 33 | const strtab_name = 1; | ||
| 34 | const symtab_name = "\x00.strtab\x00".len; | ||
| 35 | |||
| 36 | const Elf = @This(); | ||
| 37 | |||
| 38 | obj: Object, | ||
| 39 | /// The keys are owned by the Codegen.tree | ||
| 40 | sections: std.StringHashMapUnmanaged(*Section) = .{}, | ||
| 41 | local_symbols: std.StringHashMapUnmanaged(*Symbol) = .{}, | ||
| 42 | global_symbols: std.StringHashMapUnmanaged(*Symbol) = .{}, | ||
| 43 | unnamed_symbol_mangle: u32 = 0, | ||
| 44 | strtab_len: u64 = strtab_default.len, | ||
| 45 | arena: std.heap.ArenaAllocator, | ||
| 46 | |||
| 47 | pub fn create(gpa: Allocator, target: Target) !*Object { | ||
| 48 | const elf = try gpa.create(Elf); | ||
| 49 | elf.* = .{ | ||
| 50 | .obj = .{ .format = .elf, .target = target }, | ||
| 51 | .arena = std.heap.ArenaAllocator.init(gpa), | ||
| 52 | }; | ||
| 53 | return &elf.obj; | ||
| 54 | } | ||
| 55 | |||
| 56 | pub fn deinit(elf: *Elf) void { | ||
| 57 | const gpa = elf.arena.child_allocator; | ||
| 58 | { | ||
| 59 | var it = elf.sections.valueIterator(); | ||
| 60 | while (it.next()) |sect| { | ||
| 61 | sect.*.data.deinit(); | ||
| 62 | sect.*.relocations.deinit(gpa); | ||
| 63 | } | ||
| 64 | } | ||
| 65 | elf.sections.deinit(gpa); | ||
| 66 | elf.local_symbols.deinit(gpa); | ||
| 67 | elf.global_symbols.deinit(gpa); | ||
| 68 | elf.arena.deinit(); | ||
| 69 | gpa.destroy(elf); | ||
| 70 | } | ||
| 71 | |||
| 72 | fn sectionString(sec: Object.Section) []const u8 { | ||
| 73 | return switch (sec) { | ||
| 74 | .undefined => unreachable, | ||
| 75 | .data => "data", | ||
| 76 | .read_only_data => "rodata", | ||
| 77 | .func => "text", | ||
| 78 | .strings => "rodata.str", | ||
| 79 | .custom => |name| name, | ||
| 80 | }; | ||
| 81 | } | ||
| 82 | |||
| 83 | pub fn getSection(elf: *Elf, section_kind: Object.Section) !*std.ArrayList(u8) { | ||
| 84 | const section_name = sectionString(section_kind); | ||
| 85 | const section = elf.sections.get(section_name) orelse blk: { | ||
| 86 | const section = try elf.arena.allocator().create(Section); | ||
| 87 | section.* = .{ | ||
| 88 | .data = std.ArrayList(u8).init(elf.arena.child_allocator), | ||
| 89 | .type = std.elf.SHT_PROGBITS, | ||
| 90 | .flags = switch (section_kind) { | ||
| 91 | .func, .custom => std.elf.SHF_ALLOC + std.elf.SHF_EXECINSTR, | ||
| 92 | .strings => std.elf.SHF_ALLOC + std.elf.SHF_MERGE + std.elf.SHF_STRINGS, | ||
| 93 | .read_only_data => std.elf.SHF_ALLOC, | ||
| 94 | .data => std.elf.SHF_ALLOC + std.elf.SHF_WRITE, | ||
| 95 | .undefined => unreachable, | ||
| 96 | }, | ||
| 97 | }; | ||
| 98 | try elf.sections.putNoClobber(elf.arena.child_allocator, section_name, section); | ||
| 99 | elf.strtab_len += section_name.len + ".\x00".len; | ||
| 100 | break :blk section; | ||
| 101 | }; | ||
| 102 | return &section.data; | ||
| 103 | } | ||
| 104 | |||
| 105 | pub fn declareSymbol( | ||
| 106 | elf: *Elf, | ||
| 107 | section_kind: Object.Section, | ||
| 108 | maybe_name: ?[]const u8, | ||
| 109 | linkage: std.builtin.GlobalLinkage, | ||
| 110 | @"type": Object.SymbolType, | ||
| 111 | offset: u64, | ||
| 112 | size: u64, | ||
| 113 | ) ![]const u8 { | ||
| 114 | const section = blk: { | ||
| 115 | if (section_kind == .undefined) break :blk null; | ||
| 116 | const section_name = sectionString(section_kind); | ||
| 117 | break :blk elf.sections.get(section_name); | ||
| 118 | }; | ||
| 119 | const binding: u8 = switch (linkage) { | ||
| 120 | .Internal => std.elf.STB_LOCAL, | ||
| 121 | .Strong => std.elf.STB_GLOBAL, | ||
| 122 | .Weak => std.elf.STB_WEAK, | ||
| 123 | .LinkOnce => unreachable, | ||
| 124 | }; | ||
| 125 | const sym_type: u8 = switch (@"type") { | ||
| 126 | .func => std.elf.STT_FUNC, | ||
| 127 | .variable => std.elf.STT_OBJECT, | ||
| 128 | .external => std.elf.STT_NOTYPE, | ||
| 129 | }; | ||
| 130 | const name = if (maybe_name) |some| some else blk: { | ||
| 131 | defer elf.unnamed_symbol_mangle += 1; | ||
| 132 | break :blk try std.fmt.allocPrint(elf.arena.allocator(), ".L.{d}", .{elf.unnamed_symbol_mangle}); | ||
| 133 | }; | ||
| 134 | |||
| 135 | const gop = if (linkage == .Internal) | ||
| 136 | try elf.local_symbols.getOrPut(elf.arena.child_allocator, name) | ||
| 137 | else | ||
| 138 | try elf.global_symbols.getOrPut(elf.arena.child_allocator, name); | ||
| 139 | |||
| 140 | if (!gop.found_existing) { | ||
| 141 | gop.value_ptr.* = try elf.arena.allocator().create(Symbol); | ||
| 142 | elf.strtab_len += name.len + 1; // +1 for null byte | ||
| 143 | } | ||
| 144 | gop.value_ptr.*.* = .{ | ||
| 145 | .section = section, | ||
| 146 | .size = size, | ||
| 147 | .offset = offset, | ||
| 148 | .info = (binding << 4) + sym_type, | ||
| 149 | }; | ||
| 150 | return name; | ||
| 151 | } | ||
| 152 | |||
| 153 | pub fn addRelocation(elf: *Elf, name: []const u8, section_kind: Object.Section, address: u64, addend: i64) !void { | ||
| 154 | const section_name = sectionString(section_kind); | ||
| 155 | const symbol = elf.local_symbols.get(name) orelse elf.global_symbols.get(name).?; // reference to undeclared symbol | ||
| 156 | const section = elf.sections.get(section_name).?; | ||
| 157 | if (section.relocations.items.len == 0) elf.strtab_len += ".rela".len; | ||
| 158 | |||
| 159 | try section.relocations.append(elf.arena.child_allocator, .{ | ||
| 160 | .symbol = symbol, | ||
| 161 | .offset = @intCast(address), | ||
| 162 | .addend = addend, | ||
| 163 | .type = if (symbol.section == null) 4 else 2, // TODO | ||
| 164 | }); | ||
| 165 | } | ||
| 166 | |||
| 167 | /// elf header | ||
| 168 | /// sections contents | ||
| 169 | /// symbols | ||
| 170 | /// relocations | ||
| 171 | /// strtab | ||
| 172 | /// section headers | ||
| 173 | pub fn finish(elf: *Elf, file: std.fs.File) !void { | ||
| 174 | var buf_writer = std.io.bufferedWriter(file.writer()); | ||
| 175 | const w = buf_writer.writer(); | ||
| 176 | |||
| 177 | var num_sections: std.elf.Elf64_Half = additional_sections; | ||
| 178 | var relocations_len: std.elf.Elf64_Off = 0; | ||
| 179 | var sections_len: std.elf.Elf64_Off = 0; | ||
| 180 | { | ||
| 181 | var it = elf.sections.valueIterator(); | ||
| 182 | while (it.next()) |sect| { | ||
| 183 | sections_len += sect.*.data.items.len; | ||
| 184 | relocations_len += sect.*.relocations.items.len * @sizeOf(std.elf.Elf64_Rela); | ||
| 185 | sect.*.index = num_sections; | ||
| 186 | num_sections += 1; | ||
| 187 | num_sections += @intFromBool(sect.*.relocations.items.len != 0); | ||
| 188 | } | ||
| 189 | } | ||
| 190 | const symtab_len = (elf.local_symbols.count() + elf.global_symbols.count() + 1) * @sizeOf(std.elf.Elf64_Sym); | ||
| 191 | |||
| 192 | const symtab_offset = @sizeOf(std.elf.Elf64_Ehdr) + sections_len; | ||
| 193 | const symtab_offset_aligned = std.mem.alignForward(u64, symtab_offset, 8); | ||
| 194 | const rela_offset = symtab_offset_aligned + symtab_len; | ||
| 195 | const strtab_offset = rela_offset + relocations_len; | ||
| 196 | const sh_offset = strtab_offset + elf.strtab_len; | ||
| 197 | const sh_offset_aligned = std.mem.alignForward(u64, sh_offset, 16); | ||
| 198 | |||
| 199 | const elf_header = std.elf.Elf64_Ehdr{ | ||
| 200 | .e_ident = .{ 0x7F, 'E', 'L', 'F', 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, | ||
| 201 | .e_type = std.elf.ET.REL, // we only produce relocatables | ||
| 202 | .e_machine = elf.obj.target.cpu.arch.toElfMachine(), | ||
| 203 | .e_version = 1, | ||
| 204 | .e_entry = 0, // linker will handle this | ||
| 205 | .e_phoff = 0, // no program header | ||
| 206 | .e_shoff = sh_offset_aligned, // section headers offset | ||
| 207 | .e_flags = 0, // no flags | ||
| 208 | .e_ehsize = @sizeOf(std.elf.Elf64_Ehdr), | ||
| 209 | .e_phentsize = 0, // no program header | ||
| 210 | .e_phnum = 0, // no program header | ||
| 211 | .e_shentsize = @sizeOf(std.elf.Elf64_Shdr), | ||
| 212 | .e_shnum = num_sections, | ||
| 213 | .e_shstrndx = strtab_index, | ||
| 214 | }; | ||
| 215 | try w.writeStruct(elf_header); | ||
| 216 | |||
| 217 | // write contents of sections | ||
| 218 | { | ||
| 219 | var it = elf.sections.valueIterator(); | ||
| 220 | while (it.next()) |sect| try w.writeAll(sect.*.data.items); | ||
| 221 | } | ||
| 222 | |||
| 223 | // pad to 8 bytes | ||
| 224 | try w.writeByteNTimes(0, @intCast(symtab_offset_aligned - symtab_offset)); | ||
| 225 | |||
| 226 | var name_offset: u32 = strtab_default.len; | ||
| 227 | // write symbols | ||
| 228 | { | ||
| 229 | // first symbol must be null | ||
| 230 | try w.writeStruct(std.mem.zeroes(std.elf.Elf64_Sym)); | ||
| 231 | |||
| 232 | var sym_index: u16 = 1; | ||
| 233 | var it = elf.local_symbols.iterator(); | ||
| 234 | while (it.next()) |entry| { | ||
| 235 | const sym = entry.value_ptr.*; | ||
| 236 | try w.writeStruct(std.elf.Elf64_Sym{ | ||
| 237 | .st_name = name_offset, | ||
| 238 | .st_info = sym.info, | ||
| 239 | .st_other = 0, | ||
| 240 | .st_shndx = if (sym.section) |some| some.index else 0, | ||
| 241 | .st_value = sym.offset, | ||
| 242 | .st_size = sym.size, | ||
| 243 | }); | ||
| 244 | sym.index = sym_index; | ||
| 245 | sym_index += 1; | ||
| 246 | name_offset += @intCast(entry.key_ptr.len + 1); // +1 for null byte | ||
| 247 | } | ||
| 248 | it = elf.global_symbols.iterator(); | ||
| 249 | while (it.next()) |entry| { | ||
| 250 | const sym = entry.value_ptr.*; | ||
| 251 | try w.writeStruct(std.elf.Elf64_Sym{ | ||
| 252 | .st_name = name_offset, | ||
| 253 | .st_info = sym.info, | ||
| 254 | .st_other = 0, | ||
| 255 | .st_shndx = if (sym.section) |some| some.index else 0, | ||
| 256 | .st_value = sym.offset, | ||
| 257 | .st_size = sym.size, | ||
| 258 | }); | ||
| 259 | sym.index = sym_index; | ||
| 260 | sym_index += 1; | ||
| 261 | name_offset += @intCast(entry.key_ptr.len + 1); // +1 for null byte | ||
| 262 | } | ||
| 263 | } | ||
| 264 | |||
| 265 | // write relocations | ||
| 266 | { | ||
| 267 | var it = elf.sections.valueIterator(); | ||
| 268 | while (it.next()) |sect| { | ||
| 269 | for (sect.*.relocations.items) |rela| { | ||
| 270 | try w.writeStruct(std.elf.Elf64_Rela{ | ||
| 271 | .r_offset = rela.offset, | ||
| 272 | .r_addend = rela.addend, | ||
| 273 | .r_info = (@as(u64, rela.symbol.index) << 32) | rela.type, | ||
| 274 | }); | ||
| 275 | } | ||
| 276 | } | ||
| 277 | } | ||
| 278 | |||
| 279 | // write strtab | ||
| 280 | try w.writeAll(strtab_default); | ||
| 281 | { | ||
| 282 | var it = elf.local_symbols.keyIterator(); | ||
| 283 | while (it.next()) |key| try w.print("{s}\x00", .{key.*}); | ||
| 284 | it = elf.global_symbols.keyIterator(); | ||
| 285 | while (it.next()) |key| try w.print("{s}\x00", .{key.*}); | ||
| 286 | } | ||
| 287 | { | ||
| 288 | var it = elf.sections.iterator(); | ||
| 289 | while (it.next()) |entry| { | ||
| 290 | if (entry.value_ptr.*.relocations.items.len != 0) try w.writeAll(".rela"); | ||
| 291 | try w.print(".{s}\x00", .{entry.key_ptr.*}); | ||
| 292 | } | ||
| 293 | } | ||
| 294 | |||
| 295 | // pad to 16 bytes | ||
| 296 | try w.writeByteNTimes(0, @intCast(sh_offset_aligned - sh_offset)); | ||
| 297 | // mandatory null header | ||
| 298 | try w.writeStruct(std.mem.zeroes(std.elf.Elf64_Shdr)); | ||
| 299 | |||
| 300 | // write strtab section header | ||
| 301 | { | ||
| 302 | const sect_header = std.elf.Elf64_Shdr{ | ||
| 303 | .sh_name = strtab_name, | ||
| 304 | .sh_type = std.elf.SHT_STRTAB, | ||
| 305 | .sh_flags = 0, | ||
| 306 | .sh_addr = 0, | ||
| 307 | .sh_offset = strtab_offset, | ||
| 308 | .sh_size = elf.strtab_len, | ||
| 309 | .sh_link = 0, | ||
| 310 | .sh_info = 0, | ||
| 311 | .sh_addralign = 1, | ||
| 312 | .sh_entsize = 0, | ||
| 313 | }; | ||
| 314 | try w.writeStruct(sect_header); | ||
| 315 | } | ||
| 316 | |||
| 317 | // write symtab section header | ||
| 318 | { | ||
| 319 | const sect_header = std.elf.Elf64_Shdr{ | ||
| 320 | .sh_name = symtab_name, | ||
| 321 | .sh_type = std.elf.SHT_SYMTAB, | ||
| 322 | .sh_flags = 0, | ||
| 323 | .sh_addr = 0, | ||
| 324 | .sh_offset = symtab_offset_aligned, | ||
| 325 | .sh_size = symtab_len, | ||
| 326 | .sh_link = strtab_index, | ||
| 327 | .sh_info = elf.local_symbols.size + 1, | ||
| 328 | .sh_addralign = 8, | ||
| 329 | .sh_entsize = @sizeOf(std.elf.Elf64_Sym), | ||
| 330 | }; | ||
| 331 | try w.writeStruct(sect_header); | ||
| 332 | } | ||
| 333 | |||
| 334 | // remaining section headers | ||
| 335 | { | ||
| 336 | var sect_offset: u64 = @sizeOf(std.elf.Elf64_Ehdr); | ||
| 337 | var rela_sect_offset: u64 = rela_offset; | ||
| 338 | var it = elf.sections.iterator(); | ||
| 339 | while (it.next()) |entry| { | ||
| 340 | const sect = entry.value_ptr.*; | ||
| 341 | const rela_count = sect.relocations.items.len; | ||
| 342 | const rela_name_offset: u32 = if (rela_count != 0) @truncate(".rela".len) else 0; | ||
| 343 | try w.writeStruct(std.elf.Elf64_Shdr{ | ||
| 344 | .sh_name = rela_name_offset + name_offset, | ||
| 345 | .sh_type = sect.type, | ||
| 346 | .sh_flags = sect.flags, | ||
| 347 | .sh_addr = 0, | ||
| 348 | .sh_offset = sect_offset, | ||
| 349 | .sh_size = sect.data.items.len, | ||
| 350 | .sh_link = 0, | ||
| 351 | .sh_info = 0, | ||
| 352 | .sh_addralign = if (sect.flags & std.elf.SHF_EXECINSTR != 0) 16 else 1, | ||
| 353 | .sh_entsize = 0, | ||
| 354 | }); | ||
| 355 | |||
| 356 | if (rela_count != 0) { | ||
| 357 | const size = rela_count * @sizeOf(std.elf.Elf64_Rela); | ||
| 358 | try w.writeStruct(std.elf.Elf64_Shdr{ | ||
| 359 | .sh_name = name_offset, | ||
| 360 | .sh_type = std.elf.SHT_RELA, | ||
| 361 | .sh_flags = 0, | ||
| 362 | .sh_addr = 0, | ||
| 363 | .sh_offset = rela_sect_offset, | ||
| 364 | .sh_size = rela_count * @sizeOf(std.elf.Elf64_Rela), | ||
| 365 | .sh_link = symtab_index, | ||
| 366 | .sh_info = sect.index, | ||
| 367 | .sh_addralign = 8, | ||
| 368 | .sh_entsize = @sizeOf(std.elf.Elf64_Rela), | ||
| 369 | }); | ||
| 370 | rela_sect_offset += size; | ||
| 371 | } | ||
| 372 | |||
| 373 | sect_offset += sect.data.items.len; | ||
| 374 | name_offset += @as(u32, @intCast(entry.key_ptr.len + ".\x00".len)) + rela_name_offset; | ||
| 375 | } | ||
| 376 | } | ||
| 377 | try buf_writer.flush(); | ||
| 378 | } | ||
deps/aro/build/GenerateDef.zig+69-27| ... | @@ -1,25 +1,31 @@ | ... | @@ -1,25 +1,31 @@ |
| 1 | const std = @import("std"); | 1 | const std = @import("std"); |
| 2 | const GenerateDef = @This(); | ||
| 3 | const Step = std.Build.Step; | 2 | const Step = std.Build.Step; |
| 4 | const Allocator = std.mem.Allocator; | 3 | const Allocator = std.mem.Allocator; |
| 5 | const GeneratedFile = std.Build.GeneratedFile; | 4 | const GeneratedFile = std.Build.GeneratedFile; |
| 6 | 5 | ||
| 6 | const GenerateDef = @This(); | ||
| 7 | |||
| 7 | step: Step, | 8 | step: Step, |
| 8 | path: []const u8, | 9 | path: []const u8, |
| 10 | name: []const u8, | ||
| 11 | kind: Options.Kind, | ||
| 9 | generated_file: GeneratedFile, | 12 | generated_file: GeneratedFile, |
| 10 | 13 | ||
| 11 | pub const base_id: Step.Id = .custom; | 14 | pub const base_id: Step.Id = .custom; |
| 12 | 15 | ||
| 13 | pub fn add( | 16 | pub const Options = struct { |
| 14 | owner: *std.Build, | 17 | name: []const u8, |
| 15 | def_file_path: []const u8, | 18 | src_prefix: []const u8 = "src/aro", |
| 16 | import_path: []const u8, | 19 | kind: Kind = .dafsa, |
| 17 | compile_step: *Step.Compile, | 20 | |
| 18 | aro_module: *std.Build.Module, | 21 | pub const Kind = enum { dafsa, named }; |
| 19 | ) void { | 22 | }; |
| 23 | |||
| 24 | pub fn create(owner: *std.Build, options: Options) std.Build.ModuleDependency { | ||
| 20 | const self = owner.allocator.create(GenerateDef) catch @panic("OOM"); | 25 | const self = owner.allocator.create(GenerateDef) catch @panic("OOM"); |
| 26 | const path = owner.pathJoin(&.{ options.src_prefix, options.name }); | ||
| 21 | 27 | ||
| 22 | const name = owner.fmt("GenerateDef {s}", .{def_file_path}); | 28 | const name = owner.fmt("GenerateDef {s}", .{options.name}); |
| 23 | self.* = .{ | 29 | self.* = .{ |
| 24 | .step = Step.init(.{ | 30 | .step = Step.init(.{ |
| 25 | .id = base_id, | 31 | .id = base_id, |
| ... | @@ -27,16 +33,18 @@ pub fn add( | ... | @@ -27,16 +33,18 @@ pub fn add( |
| 27 | .owner = owner, | 33 | .owner = owner, |
| 28 | .makeFn = make, | 34 | .makeFn = make, |
| 29 | }), | 35 | }), |
| 30 | .path = def_file_path, | 36 | .path = path, |
| 37 | .name = options.name, | ||
| 38 | .kind = options.kind, | ||
| 31 | .generated_file = .{ .step = &self.step }, | 39 | .generated_file = .{ .step = &self.step }, |
| 32 | }; | 40 | }; |
| 33 | 41 | const module = self.step.owner.createModule(.{ | |
| 34 | const module = owner.createModule(.{ | ||
| 35 | .source_file = .{ .generated = &self.generated_file }, | 42 | .source_file = .{ .generated = &self.generated_file }, |
| 36 | }); | 43 | }); |
| 37 | compile_step.addModule(import_path, module); | 44 | return .{ |
| 38 | compile_step.step.dependOn(&self.step); | 45 | .module = module, |
| 39 | aro_module.dependencies.put(import_path, module) catch @panic("OOM"); | 46 | .name = self.name, |
| 47 | }; | ||
| 40 | } | 48 | } |
| 41 | 49 | ||
| 42 | fn make(step: *Step, prog_node: *std.Progress.Node) !void { | 50 | fn make(step: *Step, prog_node: *std.Progress.Node) !void { |
| ... | @@ -132,7 +140,7 @@ fn generate(self: *GenerateDef, input: []const u8) ![]const u8 { | ... | @@ -132,7 +140,7 @@ fn generate(self: *GenerateDef, input: []const u8) ![]const u8 { |
| 132 | } | 140 | } |
| 133 | 141 | ||
| 134 | { | 142 | { |
| 135 | var sorted_list = try arena.dupe([]const u8, values.keys()); | 143 | const sorted_list = try arena.dupe([]const u8, values.keys()); |
| 136 | defer arena.free(sorted_list); | 144 | defer arena.free(sorted_list); |
| 137 | std.mem.sort([]const u8, sorted_list, {}, struct { | 145 | std.mem.sort([]const u8, sorted_list, {}, struct { |
| 138 | pub fn lessThan(_: void, a: []const u8, b: []const u8) bool { | 146 | pub fn lessThan(_: void, a: []const u8, b: []const u8) bool { |
| ... | @@ -168,15 +176,6 @@ fn generate(self: *GenerateDef, input: []const u8) ![]const u8 { | ... | @@ -168,15 +176,6 @@ fn generate(self: *GenerateDef, input: []const u8) ![]const u8 { |
| 168 | } | 176 | } |
| 169 | } | 177 | } |
| 170 | 178 | ||
| 171 | var values_array = try arena.alloc(Value, values.count()); | ||
| 172 | defer arena.free(values_array); | ||
| 173 | |||
| 174 | for (values.keys(), values.values()) |name, props| { | ||
| 175 | const unique_index = builder.getUniqueIndex(name).?; | ||
| 176 | const data_index = unique_index - 1; | ||
| 177 | values_array[data_index] = .{ .name = name, .properties = props }; | ||
| 178 | } | ||
| 179 | |||
| 180 | var out_buf = std.ArrayList(u8).init(arena); | 179 | var out_buf = std.ArrayList(u8).init(arena); |
| 181 | defer out_buf.deinit(); | 180 | defer out_buf.deinit(); |
| 182 | const writer = out_buf.writer(); | 181 | const writer = out_buf.writer(); |
| ... | @@ -193,6 +192,49 @@ fn generate(self: *GenerateDef, input: []const u8) ![]const u8 { | ... | @@ -193,6 +192,49 @@ fn generate(self: *GenerateDef, input: []const u8) ![]const u8 { |
| 193 | for (headers.items) |line| { | 192 | for (headers.items) |line| { |
| 194 | try writer.print("{s}\n", .{line}); | 193 | try writer.print("{s}\n", .{line}); |
| 195 | } | 194 | } |
| 195 | if (self.kind == .named) { | ||
| 196 | try writer.writeAll("pub const Tag = enum {\n"); | ||
| 197 | for (values.keys()) |property| { | ||
| 198 | try writer.print(" {s},\n", .{std.zig.fmtId(property)}); | ||
| 199 | } | ||
| 200 | try writer.writeAll( | ||
| 201 | \\ | ||
| 202 | \\ pub fn property(tag: Tag) Properties { | ||
| 203 | \\ return named_data[@intFromEnum(tag)]; | ||
| 204 | \\ } | ||
| 205 | \\ | ||
| 206 | \\ const named_data = [_]Properties{ | ||
| 207 | \\ | ||
| 208 | ); | ||
| 209 | for (values.values()) |val_props| { | ||
| 210 | try writer.writeAll(" .{"); | ||
| 211 | for (val_props, 0..) |val_prop, j| { | ||
| 212 | if (j != 0) try writer.writeByte(','); | ||
| 213 | try writer.writeByte(' '); | ||
| 214 | try writer.writeAll(val_prop); | ||
| 215 | } | ||
| 216 | try writer.writeAll(" },\n"); | ||
| 217 | } | ||
| 218 | try writer.writeAll( | ||
| 219 | \\ }; | ||
| 220 | \\}; | ||
| 221 | \\}; | ||
| 222 | \\} | ||
| 223 | \\ | ||
| 224 | ); | ||
| 225 | |||
| 226 | return out_buf.toOwnedSlice(); | ||
| 227 | } | ||
| 228 | |||
| 229 | var values_array = try arena.alloc(Value, values.count()); | ||
| 230 | defer arena.free(values_array); | ||
| 231 | |||
| 232 | for (values.keys(), values.values()) |name, props| { | ||
| 233 | const unique_index = builder.getUniqueIndex(name).?; | ||
| 234 | const data_index = unique_index - 1; | ||
| 235 | values_array[data_index] = .{ .name = name, .properties = props }; | ||
| 236 | } | ||
| 237 | |||
| 196 | try writer.writeAll( | 238 | try writer.writeAll( |
| 197 | \\ | 239 | \\ |
| 198 | \\tag: Tag, | 240 | \\tag: Tag, |
| ... | @@ -418,7 +460,7 @@ const DafsaBuilder = struct { | ... | @@ -418,7 +460,7 @@ const DafsaBuilder = struct { |
| 418 | var arena = std.heap.ArenaAllocator.init(allocator); | 460 | var arena = std.heap.ArenaAllocator.init(allocator); |
| 419 | errdefer arena.deinit(); | 461 | errdefer arena.deinit(); |
| 420 | 462 | ||
| 421 | var root = try arena.allocator().create(Node); | 463 | const root = try arena.allocator().create(Node); |
| 422 | root.* = .{}; | 464 | root.* = .{}; |
| 423 | return DafsaBuilder{ | 465 | return DafsaBuilder{ |
| 424 | .root = root, | 466 | .root = root, |
| ... | @@ -498,7 +540,7 @@ const DafsaBuilder = struct { | ... | @@ -498,7 +540,7 @@ const DafsaBuilder = struct { |
| 498 | std.debug.assert(node.children[c] == null); | 540 | std.debug.assert(node.children[c] == null); |
| 499 | 541 | ||
| 500 | var arena = self.arena.promote(self.allocator); | 542 | var arena = self.arena.promote(self.allocator); |
| 501 | var child = try arena.allocator().create(Node); | 543 | const child = try arena.allocator().create(Node); |
| 502 | self.arena = arena.state; | 544 | self.arena = arena.state; |
| 503 | 545 | ||
| 504 | child.* = .{}; | 546 | child.* = .{}; |
deps/aro/codegen/x86_64.zig deleted-221| ... | @@ -1,221 +0,0 @@ | ||
| 1 | const std = @import("std"); | ||
| 2 | const Codegen = @import("../Codegen_legacy.zig"); | ||
| 3 | const Tree = @import("../Tree.zig"); | ||
| 4 | const NodeIndex = Tree.NodeIndex; | ||
| 5 | const x86_64 = @import("zig").codegen.x86_64; | ||
| 6 | const Register = x86_64.Register; | ||
| 7 | const RegisterManager = @import("zig").RegisterManager; | ||
| 8 | |||
| 9 | const Fn = @This(); | ||
| 10 | |||
| 11 | const Value = union(enum) { | ||
| 12 | symbol: []const u8, | ||
| 13 | immediate: i64, | ||
| 14 | register: Register, | ||
| 15 | none, | ||
| 16 | }; | ||
| 17 | |||
| 18 | register_manager: RegisterManager(Fn, Register, &x86_64.callee_preserved_regs) = .{}, | ||
| 19 | data: *std.ArrayList(u8), | ||
| 20 | c: *Codegen, | ||
| 21 | |||
| 22 | pub fn deinit(func: *Fn) void { | ||
| 23 | func.* = undefined; | ||
| 24 | } | ||
| 25 | |||
| 26 | pub fn genFn(c: *Codegen, decl: NodeIndex, data: *std.ArrayList(u8)) Codegen.Error!void { | ||
| 27 | var func = Fn{ .data = data, .c = c }; | ||
| 28 | defer func.deinit(); | ||
| 29 | |||
| 30 | // function prologue | ||
| 31 | try func.data.appendSlice(&.{ | ||
| 32 | 0x55, // push rbp | ||
| 33 | 0x48, 0x89, 0xe5, // mov rbp,rsp | ||
| 34 | }); | ||
| 35 | _ = try func.genNode(c.node_data[@intFromEnum(decl)].decl.node); | ||
| 36 | // all functions are guaranteed to end in a return statement so no extra work required here | ||
| 37 | } | ||
| 38 | |||
| 39 | pub fn spillInst(f: *Fn, reg: Register, inst: u32) !void { | ||
| 40 | _ = inst; | ||
| 41 | _ = reg; | ||
| 42 | _ = f; | ||
| 43 | } | ||
| 44 | |||
| 45 | fn setReg(func: *Fn, val: Value, reg: Register) !void { | ||
| 46 | switch (val) { | ||
| 47 | .none => unreachable, | ||
| 48 | .symbol => |sym| { | ||
| 49 | // lea address with 0 and add relocation | ||
| 50 | const encoder = try x86_64.Encoder.init(func.data, 8); | ||
| 51 | encoder.rex(.{ .w = true }); | ||
| 52 | encoder.opcode_1byte(0x8D); | ||
| 53 | encoder.modRm_RIPDisp32(reg.low_id()); | ||
| 54 | |||
| 55 | const offset = func.data.items.len; | ||
| 56 | encoder.imm32(0); | ||
| 57 | |||
| 58 | try func.c.obj.addRelocation(sym, .func, offset, -4); | ||
| 59 | }, | ||
| 60 | .immediate => |x| if (x == 0) { | ||
| 61 | // 32-bit moves zero-extend to 64-bit, so xoring the 32-bit | ||
| 62 | // register is the fastest way to zero a register. | ||
| 63 | // The encoding for `xor r32, r32` is `0x31 /r`. | ||
| 64 | const encoder = try x86_64.Encoder.init(func.data, 3); | ||
| 65 | |||
| 66 | // If we're accessing e.g. r8d, we need to use a REX prefix before the actual operation. Since | ||
| 67 | // this is a 32-bit operation, the W flag is set to zero. X is also zero, as we're not using a SIB. | ||
| 68 | // Both R and B are set, as we're extending, in effect, the register bits *and* the operand. | ||
| 69 | encoder.rex(.{ .r = reg.isExtended(), .b = reg.isExtended() }); | ||
| 70 | encoder.opcode_1byte(0x31); | ||
| 71 | // Section 3.1.1.1 of the Intel x64 Manual states that "/r indicates that the | ||
| 72 | // ModR/M byte of the instruction contains a register operand and an r/m operand." | ||
| 73 | encoder.modRm_direct(reg.low_id(), reg.low_id()); | ||
| 74 | } else if (x <= std.math.maxInt(i32)) { | ||
| 75 | // Next best case: if we set the lower four bytes, the upper four will be zeroed. | ||
| 76 | // | ||
| 77 | // The encoding for `mov IMM32 -> REG` is (0xB8 + R) IMM. | ||
| 78 | |||
| 79 | const encoder = try x86_64.Encoder.init(func.data, 6); | ||
| 80 | // Just as with XORing, we need a REX prefix. This time though, we only | ||
| 81 | // need the B bit set, as we're extending the opcode's register field, | ||
| 82 | // and there is no Mod R/M byte. | ||
| 83 | encoder.rex(.{ .b = reg.isExtended() }); | ||
| 84 | encoder.opcode_withReg(0xB8, reg.low_id()); | ||
| 85 | |||
| 86 | // no ModR/M byte | ||
| 87 | |||
| 88 | // IMM | ||
| 89 | encoder.imm32(@intCast(x)); | ||
| 90 | } else { | ||
| 91 | // Worst case: we need to load the 64-bit register with the IMM. GNU's assemblers calls | ||
| 92 | // this `movabs`, though this is officially just a different variant of the plain `mov` | ||
| 93 | // instruction. | ||
| 94 | // | ||
| 95 | // This encoding is, in fact, the *same* as the one used for 32-bit loads. The only | ||
| 96 | // difference is that we set REX.W before the instruction, which extends the load to | ||
| 97 | // 64-bit and uses the full bit-width of the register. | ||
| 98 | { | ||
| 99 | const encoder = try x86_64.Encoder.init(func.data, 10); | ||
| 100 | encoder.rex(.{ .w = true, .b = reg.isExtended() }); | ||
| 101 | encoder.opcode_withReg(0xB8, reg.low_id()); | ||
| 102 | encoder.imm64(@bitCast(x)); | ||
| 103 | } | ||
| 104 | }, | ||
| 105 | .register => |src_reg| { | ||
| 106 | // If the registers are the same, nothing to do. | ||
| 107 | if (src_reg.id() == reg.id()) | ||
| 108 | return; | ||
| 109 | |||
| 110 | // This is a variant of 8B /r. | ||
| 111 | const encoder = try x86_64.Encoder.init(func.data, 3); | ||
| 112 | encoder.rex(.{ | ||
| 113 | .w = true, | ||
| 114 | .r = reg.isExtended(), | ||
| 115 | .b = src_reg.isExtended(), | ||
| 116 | }); | ||
| 117 | encoder.opcode_1byte(0x8B); | ||
| 118 | encoder.modRm_direct(reg.low_id(), src_reg.low_id()); | ||
| 119 | }, | ||
| 120 | } | ||
| 121 | } | ||
| 122 | |||
| 123 | fn genNode(func: *Fn, node: NodeIndex) Codegen.Error!Value { | ||
| 124 | if (func.c.tree.value_map.get(node)) |some| { | ||
| 125 | if (some.tag == .int) | ||
| 126 | return Value{ .immediate = @bitCast(some.data.int) }; | ||
| 127 | } | ||
| 128 | |||
| 129 | const data = func.c.node_data[@intFromEnum(node)]; | ||
| 130 | switch (func.c.node_tag[@intFromEnum(node)]) { | ||
| 131 | .static_assert => return Value{ .none = {} }, | ||
| 132 | .compound_stmt_two => { | ||
| 133 | if (data.bin.lhs != .none) _ = try func.genNode(data.bin.lhs); | ||
| 134 | if (data.bin.rhs != .none) _ = try func.genNode(data.bin.rhs); | ||
| 135 | return Value{ .none = {} }; | ||
| 136 | }, | ||
| 137 | .compound_stmt => { | ||
| 138 | for (func.c.tree.data[data.range.start..data.range.end]) |stmt| { | ||
| 139 | _ = try func.genNode(stmt); | ||
| 140 | } | ||
| 141 | return Value{ .none = {} }; | ||
| 142 | }, | ||
| 143 | .call_expr_one => if (data.bin.rhs != .none) | ||
| 144 | return func.genCall(data.bin.lhs, &.{data.bin.rhs}) | ||
| 145 | else | ||
| 146 | return func.genCall(data.bin.lhs, &.{}), | ||
| 147 | .call_expr => return func.genCall(func.c.tree.data[data.range.start], func.c.tree.data[data.range.start + 1 .. data.range.end]), | ||
| 148 | .explicit_cast, .implicit_cast => { | ||
| 149 | switch (data.cast.kind) { | ||
| 150 | .function_to_pointer, | ||
| 151 | .array_to_pointer, | ||
| 152 | => return func.genNode(data.cast.operand), // no-op | ||
| 153 | else => return func.c.comp.diag.fatalNoSrc("TODO x86_64 genNode for cast {s}\n", .{@tagName(data.cast.kind)}), | ||
| 154 | } | ||
| 155 | }, | ||
| 156 | .decl_ref_expr => { | ||
| 157 | // TODO locals and arguments | ||
| 158 | return Value{ .symbol = func.c.tree.tokSlice(data.decl_ref) }; | ||
| 159 | }, | ||
| 160 | .return_stmt => { | ||
| 161 | const value = try func.genNode(data.un); | ||
| 162 | try func.setReg(value, x86_64.c_abi_int_return_regs[0]); | ||
| 163 | try func.data.appendSlice(&.{ | ||
| 164 | 0x5d, // pop rbp | ||
| 165 | 0xc3, // ret | ||
| 166 | }); | ||
| 167 | return Value{ .none = {} }; | ||
| 168 | }, | ||
| 169 | .implicit_return => { | ||
| 170 | try func.setReg(.{ .immediate = 0 }, x86_64.c_abi_int_return_regs[0]); | ||
| 171 | try func.data.appendSlice(&.{ | ||
| 172 | 0x5d, // pop rbp | ||
| 173 | 0xc3, // ret | ||
| 174 | }); | ||
| 175 | return Value{ .none = {} }; | ||
| 176 | }, | ||
| 177 | .int_literal => return Value{ .immediate = @bitCast(data.int) }, | ||
| 178 | .string_literal_expr => { | ||
| 179 | const range = func.c.tree.value_map.get(node).?.data.bytes; | ||
| 180 | const str_bytes = range.slice(func.c.tree.strings, .@"1"); | ||
| 181 | const section = try func.c.obj.getSection(.strings); | ||
| 182 | const start = section.items.len; | ||
| 183 | try section.appendSlice(str_bytes); | ||
| 184 | const symbol_name = try func.c.obj.declareSymbol(.strings, null, .Internal, .variable, start, str_bytes.len); | ||
| 185 | return Value{ .symbol = symbol_name }; | ||
| 186 | }, | ||
| 187 | else => return func.c.comp.diag.fatalNoSrc("TODO x86_64 genNode {}\n", .{func.c.node_tag[@intFromEnum(node)]}), | ||
| 188 | } | ||
| 189 | } | ||
| 190 | |||
| 191 | fn genCall(func: *Fn, lhs: NodeIndex, args: []const NodeIndex) Codegen.Error!Value { | ||
| 192 | if (args.len > x86_64.c_abi_int_param_regs.len) | ||
| 193 | return func.c.comp.diag.fatalNoSrc("TODO more than args {d}\n", .{x86_64.c_abi_int_param_regs.len}); | ||
| 194 | |||
| 195 | const func_value = try func.genNode(lhs); | ||
| 196 | for (args, 0..) |arg, i| { | ||
| 197 | const value = try func.genNode(arg); | ||
| 198 | try func.setReg(value, x86_64.c_abi_int_param_regs[i]); | ||
| 199 | } | ||
| 200 | |||
| 201 | switch (func_value) { | ||
| 202 | .none => unreachable, | ||
| 203 | .symbol => |sym| { | ||
| 204 | const encoder = try x86_64.Encoder.init(func.data, 5); | ||
| 205 | encoder.opcode_1byte(0xe8); | ||
| 206 | |||
| 207 | const offset = func.data.items.len; | ||
| 208 | encoder.imm32(0); | ||
| 209 | |||
| 210 | try func.c.obj.addRelocation(sym, .func, offset, -4); | ||
| 211 | }, | ||
| 212 | .immediate => return func.c.comp.diag.fatalNoSrc("TODO call immediate\n", .{}), | ||
| 213 | .register => return func.c.comp.diag.fatalNoSrc("TODO call reg\n", .{}), | ||
| 214 | } | ||
| 215 | return Value{ .register = x86_64.c_abi_int_return_regs[0] }; | ||
| 216 | } | ||
| 217 | |||
| 218 | pub fn genVar(c: *Codegen, decl: NodeIndex) Codegen.Error!void { | ||
| 219 | _ = c; | ||
| 220 | _ = decl; | ||
| 221 | } | ||
deps/aro/features.zig deleted-76| ... | @@ -1,76 +0,0 @@ | ||
| 1 | const std = @import("std"); | ||
| 2 | const Compilation = @import("Compilation.zig"); | ||
| 3 | const target_util = @import("target.zig"); | ||
| 4 | |||
| 5 | /// Used to implement the __has_feature macro. | ||
| 6 | pub fn hasFeature(comp: *Compilation, ext: []const u8) bool { | ||
| 7 | const list = .{ | ||
| 8 | .assume_nonnull = true, | ||
| 9 | .attribute_analyzer_noreturn = true, | ||
| 10 | .attribute_availability = true, | ||
| 11 | .attribute_availability_with_message = true, | ||
| 12 | .attribute_availability_app_extension = true, | ||
| 13 | .attribute_availability_with_version_underscores = true, | ||
| 14 | .attribute_availability_tvos = true, | ||
| 15 | .attribute_availability_watchos = true, | ||
| 16 | .attribute_availability_with_strict = true, | ||
| 17 | .attribute_availability_with_replacement = true, | ||
| 18 | .attribute_availability_in_templates = true, | ||
| 19 | .attribute_availability_swift = true, | ||
| 20 | .attribute_cf_returns_not_retained = true, | ||
| 21 | .attribute_cf_returns_retained = true, | ||
| 22 | .attribute_cf_returns_on_parameters = true, | ||
| 23 | .attribute_deprecated_with_message = true, | ||
| 24 | .attribute_deprecated_with_replacement = true, | ||
| 25 | .attribute_ext_vector_type = true, | ||
| 26 | .attribute_ns_returns_not_retained = true, | ||
| 27 | .attribute_ns_returns_retained = true, | ||
| 28 | .attribute_ns_consumes_self = true, | ||
| 29 | .attribute_ns_consumed = true, | ||
| 30 | .attribute_cf_consumed = true, | ||
| 31 | .attribute_overloadable = true, | ||
| 32 | .attribute_unavailable_with_message = true, | ||
| 33 | .attribute_unused_on_fields = true, | ||
| 34 | .attribute_diagnose_if_objc = true, | ||
| 35 | .blocks = false, // TODO | ||
| 36 | .c_thread_safety_attributes = true, | ||
| 37 | .enumerator_attributes = true, | ||
| 38 | .nullability = true, | ||
| 39 | .nullability_on_arrays = true, | ||
| 40 | .nullability_nullable_result = true, | ||
| 41 | .c_alignas = comp.langopts.standard.atLeast(.c11), | ||
| 42 | .c_alignof = comp.langopts.standard.atLeast(.c11), | ||
| 43 | .c_atomic = comp.langopts.standard.atLeast(.c11), | ||
| 44 | .c_generic_selections = comp.langopts.standard.atLeast(.c11), | ||
| 45 | .c_static_assert = comp.langopts.standard.atLeast(.c11), | ||
| 46 | .c_thread_local = comp.langopts.standard.atLeast(.c11) and target_util.isTlsSupported(comp.target), | ||
| 47 | }; | ||
| 48 | inline for (std.meta.fields(@TypeOf(list))) |f| { | ||
| 49 | if (std.mem.eql(u8, f.name, ext)) return @field(list, f.name); | ||
| 50 | } | ||
| 51 | return false; | ||
| 52 | } | ||
| 53 | |||
| 54 | /// Used to implement the __has_extension macro. | ||
| 55 | pub fn hasExtension(comp: *Compilation, ext: []const u8) bool { | ||
| 56 | const list = .{ | ||
| 57 | // C11 features | ||
| 58 | .c_alignas = true, | ||
| 59 | .c_alignof = true, | ||
| 60 | .c_atomic = false, // TODO | ||
| 61 | .c_generic_selections = true, | ||
| 62 | .c_static_assert = true, | ||
| 63 | .c_thread_local = target_util.isTlsSupported(comp.target), | ||
| 64 | // misc | ||
| 65 | .overloadable_unmarked = false, // TODO | ||
| 66 | .statement_attributes_with_gnu_syntax = false, // TODO | ||
| 67 | .gnu_asm = true, | ||
| 68 | .gnu_asm_goto_with_outputs = true, | ||
| 69 | .matrix_types = false, // TODO | ||
| 70 | .matrix_types_scalar_division = false, // TODO | ||
| 71 | }; | ||
| 72 | inline for (std.meta.fields(@TypeOf(list))) |f| { | ||
| 73 | if (std.mem.eql(u8, f.name, ext)) return @field(list, f.name); | ||
| 74 | } | ||
| 75 | return false; | ||
| 76 | } | ||
deps/aro/lib.zig deleted-27| ... | @@ -1,27 +0,0 @@ | ||
| 1 | /// Deprecated | ||
| 2 | pub const Codegen = @import("Codegen_legacy.zig"); | ||
| 3 | pub const CodeGen = @import("CodeGen.zig"); | ||
| 4 | pub const Compilation = @import("Compilation.zig"); | ||
| 5 | pub const Diagnostics = @import("Diagnostics.zig"); | ||
| 6 | pub const Driver = @import("Driver.zig"); | ||
| 7 | pub const Interner = @import("Interner.zig"); | ||
| 8 | pub const Ir = @import("Ir.zig"); | ||
| 9 | pub const Object = @import("Object.zig"); | ||
| 10 | pub const Parser = @import("Parser.zig"); | ||
| 11 | pub const Preprocessor = @import("Preprocessor.zig"); | ||
| 12 | pub const Source = @import("Source.zig"); | ||
| 13 | pub const Tokenizer = @import("Tokenizer.zig"); | ||
| 14 | pub const Tree = @import("Tree.zig"); | ||
| 15 | pub const Type = @import("Type.zig"); | ||
| 16 | pub const TypeMapper = @import("StringInterner.zig").TypeMapper; | ||
| 17 | pub const target_util = @import("target.zig"); | ||
| 18 | |||
| 19 | pub const version_str = "0.0.0-dev"; | ||
| 20 | pub const version = @import("std").SemanticVersion.parse(version_str) catch unreachable; | ||
| 21 | |||
| 22 | pub const CallingConvention = enum { | ||
| 23 | C, | ||
| 24 | stdcall, | ||
| 25 | thiscall, | ||
| 26 | vectorcall, | ||
| 27 | }; | ||
deps/aro/number_affixes.zig deleted-169| ... | @@ -1,169 +0,0 @@ | ||
| 1 | const std = @import("std"); | ||
| 2 | const mem = std.mem; | ||
| 3 | |||
| 4 | pub const Prefix = enum(u8) { | ||
| 5 | binary = 2, | ||
| 6 | octal = 8, | ||
| 7 | decimal = 10, | ||
| 8 | hex = 16, | ||
| 9 | |||
| 10 | pub fn digitAllowed(prefix: Prefix, c: u8) bool { | ||
| 11 | return switch (c) { | ||
| 12 | '0', '1' => true, | ||
| 13 | '2'...'7' => prefix != .binary, | ||
| 14 | '8'...'9' => prefix == .decimal or prefix == .hex, | ||
| 15 | 'a'...'f', 'A'...'F' => prefix == .hex, | ||
| 16 | else => false, | ||
| 17 | }; | ||
| 18 | } | ||
| 19 | |||
| 20 | pub fn fromString(buf: []const u8) Prefix { | ||
| 21 | if (buf.len == 1) return .decimal; | ||
| 22 | // tokenizer enforces that first byte is a decimal digit or period | ||
| 23 | switch (buf[0]) { | ||
| 24 | '.', '1'...'9' => return .decimal, | ||
| 25 | '0' => {}, | ||
| 26 | else => unreachable, | ||
| 27 | } | ||
| 28 | switch (buf[1]) { | ||
| 29 | 'x', 'X' => return if (buf.len == 2) .decimal else .hex, | ||
| 30 | 'b', 'B' => return if (buf.len == 2) .decimal else .binary, | ||
| 31 | else => { | ||
| 32 | if (mem.indexOfAny(u8, buf, "eE.")) |_| { | ||
| 33 | // This is a decimal floating point number that happens to start with zero | ||
| 34 | return .decimal; | ||
| 35 | } else if (Suffix.fromString(buf[1..], .int)) |_| { | ||
| 36 | // This is `0` with a valid suffix | ||
| 37 | return .decimal; | ||
| 38 | } else { | ||
| 39 | return .octal; | ||
| 40 | } | ||
| 41 | }, | ||
| 42 | } | ||
| 43 | } | ||
| 44 | |||
| 45 | /// Length of this prefix as a string | ||
| 46 | pub fn stringLen(prefix: Prefix) usize { | ||
| 47 | return switch (prefix) { | ||
| 48 | .binary => 2, | ||
| 49 | .octal => 1, | ||
| 50 | .decimal => 0, | ||
| 51 | .hex => 2, | ||
| 52 | }; | ||
| 53 | } | ||
| 54 | }; | ||
| 55 | |||
| 56 | pub const Suffix = enum { | ||
| 57 | // zig fmt: off | ||
| 58 | |||
| 59 | // int and imaginary int | ||
| 60 | None, I, | ||
| 61 | |||
| 62 | // unsigned real integers | ||
| 63 | U, UL, ULL, | ||
| 64 | |||
| 65 | // unsigned imaginary integers | ||
| 66 | IU, IUL, IULL, | ||
| 67 | |||
| 68 | // long or long double, real and imaginary | ||
| 69 | L, IL, | ||
| 70 | |||
| 71 | // long long and imaginary long long | ||
| 72 | LL, ILL, | ||
| 73 | |||
| 74 | // float and imaginary float | ||
| 75 | F, IF, | ||
| 76 | |||
| 77 | // _Float16 | ||
| 78 | F16, | ||
| 79 | |||
| 80 | // Imaginary _Bitint | ||
| 81 | IWB, IUWB, | ||
| 82 | |||
| 83 | // _Bitint | ||
| 84 | WB, UWB, | ||
| 85 | |||
| 86 | // zig fmt: on | ||
| 87 | |||
| 88 | const Tuple = struct { Suffix, []const []const u8 }; | ||
| 89 | |||
| 90 | const IntSuffixes = &[_]Tuple{ | ||
| 91 | .{ .U, &.{"U"} }, | ||
| 92 | .{ .L, &.{"L"} }, | ||
| 93 | .{ .WB, &.{"WB"} }, | ||
| 94 | .{ .UL, &.{ "U", "L" } }, | ||
| 95 | .{ .UWB, &.{ "U", "WB" } }, | ||
| 96 | .{ .LL, &.{"LL"} }, | ||
| 97 | .{ .ULL, &.{ "U", "LL" } }, | ||
| 98 | |||
| 99 | .{ .I, &.{"I"} }, | ||
| 100 | |||
| 101 | .{ .IWB, &.{ "I", "WB" } }, | ||
| 102 | .{ .IU, &.{ "I", "U" } }, | ||
| 103 | .{ .IL, &.{ "I", "L" } }, | ||
| 104 | .{ .IUL, &.{ "I", "U", "L" } }, | ||
| 105 | .{ .IUWB, &.{ "I", "U", "WB" } }, | ||
| 106 | .{ .ILL, &.{ "I", "LL" } }, | ||
| 107 | .{ .IULL, &.{ "I", "U", "LL" } }, | ||
| 108 | }; | ||
| 109 | |||
| 110 | const FloatSuffixes = &[_]Tuple{ | ||
| 111 | .{ .F16, &.{"F16"} }, | ||
| 112 | .{ .F, &.{"F"} }, | ||
| 113 | .{ .L, &.{"L"} }, | ||
| 114 | |||
| 115 | .{ .I, &.{"I"} }, | ||
| 116 | .{ .IL, &.{ "I", "L" } }, | ||
| 117 | .{ .IF, &.{ "I", "F" } }, | ||
| 118 | }; | ||
| 119 | |||
| 120 | pub fn fromString(buf: []const u8, suffix_kind: enum { int, float }) ?Suffix { | ||
| 121 | if (buf.len == 0) return .None; | ||
| 122 | |||
| 123 | const suffixes = switch (suffix_kind) { | ||
| 124 | .float => FloatSuffixes, | ||
| 125 | .int => IntSuffixes, | ||
| 126 | }; | ||
| 127 | var scratch: [3]u8 = undefined; | ||
| 128 | top: for (suffixes) |candidate| { | ||
| 129 | const tag = candidate[0]; | ||
| 130 | const parts = candidate[1]; | ||
| 131 | var len: usize = 0; | ||
| 132 | for (parts) |part| len += part.len; | ||
| 133 | if (len != buf.len) continue; | ||
| 134 | |||
| 135 | for (parts) |part| { | ||
| 136 | const lower = std.ascii.lowerString(&scratch, part); | ||
| 137 | if (mem.indexOf(u8, buf, part) == null and mem.indexOf(u8, buf, lower) == null) continue :top; | ||
| 138 | } | ||
| 139 | return tag; | ||
| 140 | } | ||
| 141 | return null; | ||
| 142 | } | ||
| 143 | |||
| 144 | pub fn isImaginary(suffix: Suffix) bool { | ||
| 145 | return switch (suffix) { | ||
| 146 | .I, .IL, .IF, .IU, .IUL, .ILL, .IULL, .IWB, .IUWB => true, | ||
| 147 | .None, .L, .F16, .F, .U, .UL, .LL, .ULL, .WB, .UWB => false, | ||
| 148 | }; | ||
| 149 | } | ||
| 150 | |||
| 151 | pub fn isSignedInteger(suffix: Suffix) bool { | ||
| 152 | return switch (suffix) { | ||
| 153 | .None, .L, .LL, .I, .IL, .ILL, .WB, .IWB => true, | ||
| 154 | .U, .UL, .ULL, .IU, .IUL, .IULL, .UWB, .IUWB => false, | ||
| 155 | .F, .IF, .F16 => unreachable, | ||
| 156 | }; | ||
| 157 | } | ||
| 158 | |||
| 159 | pub fn signedness(suffix: Suffix) std.builtin.Signedness { | ||
| 160 | return if (suffix.isSignedInteger()) .signed else .unsigned; | ||
| 161 | } | ||
| 162 | |||
| 163 | pub fn isBitInt(suffix: Suffix) bool { | ||
| 164 | return switch (suffix) { | ||
| 165 | .WB, .UWB, .IWB, .IUWB => true, | ||
| 166 | else => false, | ||
| 167 | }; | ||
| 168 | } | ||
| 169 | }; | ||
deps/aro/object/Elf.zig deleted-377| ... | @@ -1,377 +0,0 @@ | ||
| 1 | const std = @import("std"); | ||
| 2 | const Compilation = @import("../Compilation.zig"); | ||
| 3 | const Object = @import("../Object.zig"); | ||
| 4 | |||
| 5 | const Elf = @This(); | ||
| 6 | |||
| 7 | const Section = struct { | ||
| 8 | data: std.ArrayList(u8), | ||
| 9 | relocations: std.ArrayListUnmanaged(Relocation) = .{}, | ||
| 10 | flags: u64, | ||
| 11 | type: u32, | ||
| 12 | index: u16 = undefined, | ||
| 13 | }; | ||
| 14 | |||
| 15 | const Symbol = struct { | ||
| 16 | section: ?*Section, | ||
| 17 | size: u64, | ||
| 18 | offset: u64, | ||
| 19 | index: u16 = undefined, | ||
| 20 | info: u8, | ||
| 21 | }; | ||
| 22 | |||
| 23 | const Relocation = struct { | ||
| 24 | symbol: *Symbol, | ||
| 25 | addend: i64, | ||
| 26 | offset: u48, | ||
| 27 | type: u8, | ||
| 28 | }; | ||
| 29 | |||
| 30 | const additional_sections = 3; // null section, strtab, symtab | ||
| 31 | const strtab_index = 1; | ||
| 32 | const symtab_index = 2; | ||
| 33 | const strtab_default = "\x00.strtab\x00.symtab\x00"; | ||
| 34 | const strtab_name = 1; | ||
| 35 | const symtab_name = "\x00.strtab\x00".len; | ||
| 36 | |||
| 37 | obj: Object, | ||
| 38 | /// The keys are owned by the Codegen.tree | ||
| 39 | sections: std.StringHashMapUnmanaged(*Section) = .{}, | ||
| 40 | local_symbols: std.StringHashMapUnmanaged(*Symbol) = .{}, | ||
| 41 | global_symbols: std.StringHashMapUnmanaged(*Symbol) = .{}, | ||
| 42 | unnamed_symbol_mangle: u32 = 0, | ||
| 43 | strtab_len: u64 = strtab_default.len, | ||
| 44 | arena: std.heap.ArenaAllocator, | ||
| 45 | |||
| 46 | pub fn create(comp: *Compilation) !*Object { | ||
| 47 | const elf = try comp.gpa.create(Elf); | ||
| 48 | elf.* = .{ | ||
| 49 | .obj = .{ .format = .elf, .comp = comp }, | ||
| 50 | .arena = std.heap.ArenaAllocator.init(comp.gpa), | ||
| 51 | }; | ||
| 52 | return &elf.obj; | ||
| 53 | } | ||
| 54 | |||
| 55 | pub fn deinit(elf: *Elf) void { | ||
| 56 | const gpa = elf.arena.child_allocator; | ||
| 57 | { | ||
| 58 | var it = elf.sections.valueIterator(); | ||
| 59 | while (it.next()) |sect| { | ||
| 60 | sect.*.data.deinit(); | ||
| 61 | sect.*.relocations.deinit(gpa); | ||
| 62 | } | ||
| 63 | } | ||
| 64 | elf.sections.deinit(gpa); | ||
| 65 | elf.local_symbols.deinit(gpa); | ||
| 66 | elf.global_symbols.deinit(gpa); | ||
| 67 | elf.arena.deinit(); | ||
| 68 | gpa.destroy(elf); | ||
| 69 | } | ||
| 70 | |||
| 71 | fn sectionString(sec: Object.Section) []const u8 { | ||
| 72 | return switch (sec) { | ||
| 73 | .undefined => unreachable, | ||
| 74 | .data => "data", | ||
| 75 | .read_only_data => "rodata", | ||
| 76 | .func => "text", | ||
| 77 | .strings => "rodata.str", | ||
| 78 | .custom => |name| name, | ||
| 79 | }; | ||
| 80 | } | ||
| 81 | |||
| 82 | pub fn getSection(elf: *Elf, section_kind: Object.Section) !*std.ArrayList(u8) { | ||
| 83 | const section_name = sectionString(section_kind); | ||
| 84 | const section = elf.sections.get(section_name) orelse blk: { | ||
| 85 | const section = try elf.arena.allocator().create(Section); | ||
| 86 | section.* = .{ | ||
| 87 | .data = std.ArrayList(u8).init(elf.arena.child_allocator), | ||
| 88 | .type = std.elf.SHT_PROGBITS, | ||
| 89 | .flags = switch (section_kind) { | ||
| 90 | .func, .custom => std.elf.SHF_ALLOC + std.elf.SHF_EXECINSTR, | ||
| 91 | .strings => std.elf.SHF_ALLOC + std.elf.SHF_MERGE + std.elf.SHF_STRINGS, | ||
| 92 | .read_only_data => std.elf.SHF_ALLOC, | ||
| 93 | .data => std.elf.SHF_ALLOC + std.elf.SHF_WRITE, | ||
| 94 | .undefined => unreachable, | ||
| 95 | }, | ||
| 96 | }; | ||
| 97 | try elf.sections.putNoClobber(elf.arena.child_allocator, section_name, section); | ||
| 98 | elf.strtab_len += section_name.len + ".\x00".len; | ||
| 99 | break :blk section; | ||
| 100 | }; | ||
| 101 | return &section.data; | ||
| 102 | } | ||
| 103 | |||
| 104 | pub fn declareSymbol( | ||
| 105 | elf: *Elf, | ||
| 106 | section_kind: Object.Section, | ||
| 107 | maybe_name: ?[]const u8, | ||
| 108 | linkage: std.builtin.GlobalLinkage, | ||
| 109 | @"type": Object.SymbolType, | ||
| 110 | offset: u64, | ||
| 111 | size: u64, | ||
| 112 | ) ![]const u8 { | ||
| 113 | const section = blk: { | ||
| 114 | if (section_kind == .undefined) break :blk null; | ||
| 115 | const section_name = sectionString(section_kind); | ||
| 116 | break :blk elf.sections.get(section_name); | ||
| 117 | }; | ||
| 118 | const binding: u8 = switch (linkage) { | ||
| 119 | .Internal => std.elf.STB_LOCAL, | ||
| 120 | .Strong => std.elf.STB_GLOBAL, | ||
| 121 | .Weak => std.elf.STB_WEAK, | ||
| 122 | .LinkOnce => unreachable, | ||
| 123 | }; | ||
| 124 | const sym_type: u8 = switch (@"type") { | ||
| 125 | .func => std.elf.STT_FUNC, | ||
| 126 | .variable => std.elf.STT_OBJECT, | ||
| 127 | .external => std.elf.STT_NOTYPE, | ||
| 128 | }; | ||
| 129 | const name = if (maybe_name) |some| some else blk: { | ||
| 130 | defer elf.unnamed_symbol_mangle += 1; | ||
| 131 | break :blk try std.fmt.allocPrint(elf.arena.allocator(), ".L.{d}", .{elf.unnamed_symbol_mangle}); | ||
| 132 | }; | ||
| 133 | |||
| 134 | const gop = if (linkage == .Internal) | ||
| 135 | try elf.local_symbols.getOrPut(elf.arena.child_allocator, name) | ||
| 136 | else | ||
| 137 | try elf.global_symbols.getOrPut(elf.arena.child_allocator, name); | ||
| 138 | |||
| 139 | if (!gop.found_existing) { | ||
| 140 | gop.value_ptr.* = try elf.arena.allocator().create(Symbol); | ||
| 141 | elf.strtab_len += name.len + 1; // +1 for null byte | ||
| 142 | } | ||
| 143 | gop.value_ptr.*.* = .{ | ||
| 144 | .section = section, | ||
| 145 | .size = size, | ||
| 146 | .offset = offset, | ||
| 147 | .info = (binding << 4) + sym_type, | ||
| 148 | }; | ||
| 149 | return name; | ||
| 150 | } | ||
| 151 | |||
| 152 | pub fn addRelocation(elf: *Elf, name: []const u8, section_kind: Object.Section, address: u64, addend: i64) !void { | ||
| 153 | const section_name = sectionString(section_kind); | ||
| 154 | const symbol = elf.local_symbols.get(name) orelse elf.global_symbols.get(name).?; // reference to undeclared symbol | ||
| 155 | const section = elf.sections.get(section_name).?; | ||
| 156 | if (section.relocations.items.len == 0) elf.strtab_len += ".rela".len; | ||
| 157 | |||
| 158 | try section.relocations.append(elf.arena.child_allocator, .{ | ||
| 159 | .symbol = symbol, | ||
| 160 | .offset = @intCast(address), | ||
| 161 | .addend = addend, | ||
| 162 | .type = if (symbol.section == null) 4 else 2, // TODO | ||
| 163 | }); | ||
| 164 | } | ||
| 165 | |||
| 166 | /// elf header | ||
| 167 | /// sections contents | ||
| 168 | /// symbols | ||
| 169 | /// relocations | ||
| 170 | /// strtab | ||
| 171 | /// section headers | ||
| 172 | pub fn finish(elf: *Elf, file: std.fs.File) !void { | ||
| 173 | var buf_writer = std.io.bufferedWriter(file.writer()); | ||
| 174 | const w = buf_writer.writer(); | ||
| 175 | |||
| 176 | var num_sections: std.elf.Elf64_Half = additional_sections; | ||
| 177 | var relocations_len: std.elf.Elf64_Off = 0; | ||
| 178 | var sections_len: std.elf.Elf64_Off = 0; | ||
| 179 | { | ||
| 180 | var it = elf.sections.valueIterator(); | ||
| 181 | while (it.next()) |sect| { | ||
| 182 | sections_len += sect.*.data.items.len; | ||
| 183 | relocations_len += sect.*.relocations.items.len * @sizeOf(std.elf.Elf64_Rela); | ||
| 184 | sect.*.index = num_sections; | ||
| 185 | num_sections += 1; | ||
| 186 | num_sections += @intFromBool(sect.*.relocations.items.len != 0); | ||
| 187 | } | ||
| 188 | } | ||
| 189 | const symtab_len = (elf.local_symbols.count() + elf.global_symbols.count() + 1) * @sizeOf(std.elf.Elf64_Sym); | ||
| 190 | |||
| 191 | const symtab_offset = @sizeOf(std.elf.Elf64_Ehdr) + sections_len; | ||
| 192 | const symtab_offset_aligned = std.mem.alignForward(u64, symtab_offset, 8); | ||
| 193 | const rela_offset = symtab_offset_aligned + symtab_len; | ||
| 194 | const strtab_offset = rela_offset + relocations_len; | ||
| 195 | const sh_offset = strtab_offset + elf.strtab_len; | ||
| 196 | const sh_offset_aligned = std.mem.alignForward(u64, sh_offset, 16); | ||
| 197 | |||
| 198 | var elf_header = std.elf.Elf64_Ehdr{ | ||
| 199 | .e_ident = .{ 0x7F, 'E', 'L', 'F', 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, | ||
| 200 | .e_type = std.elf.ET.REL, // we only produce relocatables | ||
| 201 | .e_machine = elf.obj.comp.target.cpu.arch.toElfMachine(), | ||
| 202 | .e_version = 1, | ||
| 203 | .e_entry = 0, // linker will handle this | ||
| 204 | .e_phoff = 0, // no program header | ||
| 205 | .e_shoff = sh_offset_aligned, // section headers offset | ||
| 206 | .e_flags = 0, // no flags | ||
| 207 | .e_ehsize = @sizeOf(std.elf.Elf64_Ehdr), | ||
| 208 | .e_phentsize = 0, // no program header | ||
| 209 | .e_phnum = 0, // no program header | ||
| 210 | .e_shentsize = @sizeOf(std.elf.Elf64_Shdr), | ||
| 211 | .e_shnum = num_sections, | ||
| 212 | .e_shstrndx = strtab_index, | ||
| 213 | }; | ||
| 214 | try w.writeStruct(elf_header); | ||
| 215 | |||
| 216 | // write contents of sections | ||
| 217 | { | ||
| 218 | var it = elf.sections.valueIterator(); | ||
| 219 | while (it.next()) |sect| try w.writeAll(sect.*.data.items); | ||
| 220 | } | ||
| 221 | |||
| 222 | // pad to 8 bytes | ||
| 223 | try w.writeByteNTimes(0, @intCast(symtab_offset_aligned - symtab_offset)); | ||
| 224 | |||
| 225 | var name_offset: u32 = strtab_default.len; | ||
| 226 | // write symbols | ||
| 227 | { | ||
| 228 | // first symbol must be null | ||
| 229 | try w.writeStruct(std.mem.zeroes(std.elf.Elf64_Sym)); | ||
| 230 | |||
| 231 | var sym_index: u16 = 1; | ||
| 232 | var it = elf.local_symbols.iterator(); | ||
| 233 | while (it.next()) |entry| { | ||
| 234 | const sym = entry.value_ptr.*; | ||
| 235 | try w.writeStruct(std.elf.Elf64_Sym{ | ||
| 236 | .st_name = name_offset, | ||
| 237 | .st_info = sym.info, | ||
| 238 | .st_other = 0, | ||
| 239 | .st_shndx = if (sym.section) |some| some.index else 0, | ||
| 240 | .st_value = sym.offset, | ||
| 241 | .st_size = sym.size, | ||
| 242 | }); | ||
| 243 | sym.index = sym_index; | ||
| 244 | sym_index += 1; | ||
| 245 | name_offset += @intCast(entry.key_ptr.len + 1); // +1 for null byte | ||
| 246 | } | ||
| 247 | it = elf.global_symbols.iterator(); | ||
| 248 | while (it.next()) |entry| { | ||
| 249 | const sym = entry.value_ptr.*; | ||
| 250 | try w.writeStruct(std.elf.Elf64_Sym{ | ||
| 251 | .st_name = name_offset, | ||
| 252 | .st_info = sym.info, | ||
| 253 | .st_other = 0, | ||
| 254 | .st_shndx = if (sym.section) |some| some.index else 0, | ||
| 255 | .st_value = sym.offset, | ||
| 256 | .st_size = sym.size, | ||
| 257 | }); | ||
| 258 | sym.index = sym_index; | ||
| 259 | sym_index += 1; | ||
| 260 | name_offset += @intCast(entry.key_ptr.len + 1); // +1 for null byte | ||
| 261 | } | ||
| 262 | } | ||
| 263 | |||
| 264 | // write relocations | ||
| 265 | { | ||
| 266 | var it = elf.sections.valueIterator(); | ||
| 267 | while (it.next()) |sect| { | ||
| 268 | for (sect.*.relocations.items) |rela| { | ||
| 269 | try w.writeStruct(std.elf.Elf64_Rela{ | ||
| 270 | .r_offset = rela.offset, | ||
| 271 | .r_addend = rela.addend, | ||
| 272 | .r_info = (@as(u64, rela.symbol.index) << 32) | rela.type, | ||
| 273 | }); | ||
| 274 | } | ||
| 275 | } | ||
| 276 | } | ||
| 277 | |||
| 278 | // write strtab | ||
| 279 | try w.writeAll(strtab_default); | ||
| 280 | { | ||
| 281 | var it = elf.local_symbols.keyIterator(); | ||
| 282 | while (it.next()) |key| try w.print("{s}\x00", .{key.*}); | ||
| 283 | it = elf.global_symbols.keyIterator(); | ||
| 284 | while (it.next()) |key| try w.print("{s}\x00", .{key.*}); | ||
| 285 | } | ||
| 286 | { | ||
| 287 | var it = elf.sections.iterator(); | ||
| 288 | while (it.next()) |entry| { | ||
| 289 | if (entry.value_ptr.*.relocations.items.len != 0) try w.writeAll(".rela"); | ||
| 290 | try w.print(".{s}\x00", .{entry.key_ptr.*}); | ||
| 291 | } | ||
| 292 | } | ||
| 293 | |||
| 294 | // pad to 16 bytes | ||
| 295 | try w.writeByteNTimes(0, @intCast(sh_offset_aligned - sh_offset)); | ||
| 296 | // mandatory null header | ||
| 297 | try w.writeStruct(std.mem.zeroes(std.elf.Elf64_Shdr)); | ||
| 298 | |||
| 299 | // write strtab section header | ||
| 300 | { | ||
| 301 | var sect_header = std.elf.Elf64_Shdr{ | ||
| 302 | .sh_name = strtab_name, | ||
| 303 | .sh_type = std.elf.SHT_STRTAB, | ||
| 304 | .sh_flags = 0, | ||
| 305 | .sh_addr = 0, | ||
| 306 | .sh_offset = strtab_offset, | ||
| 307 | .sh_size = elf.strtab_len, | ||
| 308 | .sh_link = 0, | ||
| 309 | .sh_info = 0, | ||
| 310 | .sh_addralign = 1, | ||
| 311 | .sh_entsize = 0, | ||
| 312 | }; | ||
| 313 | try w.writeStruct(sect_header); | ||
| 314 | } | ||
| 315 | |||
| 316 | // write symtab section header | ||
| 317 | { | ||
| 318 | var sect_header = std.elf.Elf64_Shdr{ | ||
| 319 | .sh_name = symtab_name, | ||
| 320 | .sh_type = std.elf.SHT_SYMTAB, | ||
| 321 | .sh_flags = 0, | ||
| 322 | .sh_addr = 0, | ||
| 323 | .sh_offset = symtab_offset_aligned, | ||
| 324 | .sh_size = symtab_len, | ||
| 325 | .sh_link = strtab_index, | ||
| 326 | .sh_info = elf.local_symbols.size + 1, | ||
| 327 | .sh_addralign = 8, | ||
| 328 | .sh_entsize = @sizeOf(std.elf.Elf64_Sym), | ||
| 329 | }; | ||
| 330 | try w.writeStruct(sect_header); | ||
| 331 | } | ||
| 332 | |||
| 333 | // remaining section headers | ||
| 334 | { | ||
| 335 | var sect_offset: u64 = @sizeOf(std.elf.Elf64_Ehdr); | ||
| 336 | var rela_sect_offset: u64 = rela_offset; | ||
| 337 | var it = elf.sections.iterator(); | ||
| 338 | while (it.next()) |entry| { | ||
| 339 | const sect = entry.value_ptr.*; | ||
| 340 | const rela_count = sect.relocations.items.len; | ||
| 341 | const rela_name_offset: u32 = if (rela_count != 0) @truncate(".rela".len) else 0; | ||
| 342 | try w.writeStruct(std.elf.Elf64_Shdr{ | ||
| 343 | .sh_name = rela_name_offset + name_offset, | ||
| 344 | .sh_type = sect.type, | ||
| 345 | .sh_flags = sect.flags, | ||
| 346 | .sh_addr = 0, | ||
| 347 | .sh_offset = sect_offset, | ||
| 348 | .sh_size = sect.data.items.len, | ||
| 349 | .sh_link = 0, | ||
| 350 | .sh_info = 0, | ||
| 351 | .sh_addralign = if (sect.flags & std.elf.SHF_EXECINSTR != 0) 16 else 1, | ||
| 352 | .sh_entsize = 0, | ||
| 353 | }); | ||
| 354 | |||
| 355 | if (rela_count != 0) { | ||
| 356 | const size = rela_count * @sizeOf(std.elf.Elf64_Rela); | ||
| 357 | try w.writeStruct(std.elf.Elf64_Shdr{ | ||
| 358 | .sh_name = name_offset, | ||
| 359 | .sh_type = std.elf.SHT_RELA, | ||
| 360 | .sh_flags = 0, | ||
| 361 | .sh_addr = 0, | ||
| 362 | .sh_offset = rela_sect_offset, | ||
| 363 | .sh_size = rela_count * @sizeOf(std.elf.Elf64_Rela), | ||
| 364 | .sh_link = symtab_index, | ||
| 365 | .sh_info = sect.index, | ||
| 366 | .sh_addralign = 8, | ||
| 367 | .sh_entsize = @sizeOf(std.elf.Elf64_Rela), | ||
| 368 | }); | ||
| 369 | rela_sect_offset += size; | ||
| 370 | } | ||
| 371 | |||
| 372 | sect_offset += sect.data.items.len; | ||
| 373 | name_offset += @as(u32, @intCast(entry.key_ptr.len + ".\x00".len)) + rela_name_offset; | ||
| 374 | } | ||
| 375 | } | ||
| 376 | try buf_writer.flush(); | ||
| 377 | } | ||
deps/aro/pragmas/gcc.zig deleted-199| ... | @@ -1,199 +0,0 @@ | ||
| 1 | const std = @import("std"); | ||
| 2 | const mem = std.mem; | ||
| 3 | const Compilation = @import("../Compilation.zig"); | ||
| 4 | const Pragma = @import("../Pragma.zig"); | ||
| 5 | const Diagnostics = @import("../Diagnostics.zig"); | ||
| 6 | const Preprocessor = @import("../Preprocessor.zig"); | ||
| 7 | const Parser = @import("../Parser.zig"); | ||
| 8 | const TokenIndex = @import("../Tree.zig").TokenIndex; | ||
| 9 | |||
| 10 | const GCC = @This(); | ||
| 11 | |||
| 12 | pragma: Pragma = .{ | ||
| 13 | .beforeParse = beforeParse, | ||
| 14 | .beforePreprocess = beforePreprocess, | ||
| 15 | .afterParse = afterParse, | ||
| 16 | .deinit = deinit, | ||
| 17 | .preprocessorHandler = preprocessorHandler, | ||
| 18 | .parserHandler = parserHandler, | ||
| 19 | .preserveTokens = preserveTokens, | ||
| 20 | }, | ||
| 21 | original_options: Diagnostics.Options = .{}, | ||
| 22 | options_stack: std.ArrayListUnmanaged(Diagnostics.Options) = .{}, | ||
| 23 | |||
| 24 | const Directive = enum { | ||
| 25 | warning, | ||
| 26 | @"error", | ||
| 27 | diagnostic, | ||
| 28 | poison, | ||
| 29 | const Diagnostics = enum { | ||
| 30 | ignored, | ||
| 31 | warning, | ||
| 32 | @"error", | ||
| 33 | fatal, | ||
| 34 | push, | ||
| 35 | pop, | ||
| 36 | }; | ||
| 37 | }; | ||
| 38 | |||
| 39 | fn beforePreprocess(pragma: *Pragma, comp: *Compilation) void { | ||
| 40 | var self = @fieldParentPtr(GCC, "pragma", pragma); | ||
| 41 | self.original_options = comp.diag.options; | ||
| 42 | } | ||
| 43 | |||
| 44 | fn beforeParse(pragma: *Pragma, comp: *Compilation) void { | ||
| 45 | var self = @fieldParentPtr(GCC, "pragma", pragma); | ||
| 46 | comp.diag.options = self.original_options; | ||
| 47 | self.options_stack.items.len = 0; | ||
| 48 | } | ||
| 49 | |||
| 50 | fn afterParse(pragma: *Pragma, comp: *Compilation) void { | ||
| 51 | var self = @fieldParentPtr(GCC, "pragma", pragma); | ||
| 52 | comp.diag.options = self.original_options; | ||
| 53 | self.options_stack.items.len = 0; | ||
| 54 | } | ||
| 55 | |||
| 56 | pub fn init(allocator: mem.Allocator) !*Pragma { | ||
| 57 | var gcc = try allocator.create(GCC); | ||
| 58 | gcc.* = .{}; | ||
| 59 | return &gcc.pragma; | ||
| 60 | } | ||
| 61 | |||
| 62 | fn deinit(pragma: *Pragma, comp: *Compilation) void { | ||
| 63 | var self = @fieldParentPtr(GCC, "pragma", pragma); | ||
| 64 | self.options_stack.deinit(comp.gpa); | ||
| 65 | comp.gpa.destroy(self); | ||
| 66 | } | ||
| 67 | |||
| 68 | fn diagnosticHandler(self: *GCC, pp: *Preprocessor, start_idx: TokenIndex) Pragma.Error!void { | ||
| 69 | const diagnostic_tok = pp.tokens.get(start_idx); | ||
| 70 | if (diagnostic_tok.id == .nl) return; | ||
| 71 | |||
| 72 | const diagnostic = std.meta.stringToEnum(Directive.Diagnostics, pp.expandedSlice(diagnostic_tok)) orelse | ||
| 73 | return error.UnknownPragma; | ||
| 74 | |||
| 75 | switch (diagnostic) { | ||
| 76 | .ignored, .warning, .@"error", .fatal => { | ||
| 77 | const str = Pragma.pasteTokens(pp, start_idx + 1) catch |err| switch (err) { | ||
| 78 | error.ExpectedStringLiteral => { | ||
| 79 | return pp.comp.diag.add(.{ | ||
| 80 | .tag = .pragma_requires_string_literal, | ||
| 81 | .loc = diagnostic_tok.loc, | ||
| 82 | .extra = .{ .str = "GCC diagnostic" }, | ||
| 83 | }, diagnostic_tok.expansionSlice()); | ||
| 84 | }, | ||
| 85 | else => |e| return e, | ||
| 86 | }; | ||
| 87 | if (!mem.startsWith(u8, str, "-W")) { | ||
| 88 | const next = pp.tokens.get(start_idx + 1); | ||
| 89 | return pp.comp.diag.add(.{ | ||
| 90 | .tag = .malformed_warning_check, | ||
| 91 | .loc = next.loc, | ||
| 92 | .extra = .{ .str = "GCC diagnostic" }, | ||
| 93 | }, next.expansionSlice()); | ||
| 94 | } | ||
| 95 | const new_kind = switch (diagnostic) { | ||
| 96 | .ignored => Diagnostics.Kind.off, | ||
| 97 | .warning => Diagnostics.Kind.warning, | ||
| 98 | .@"error" => Diagnostics.Kind.@"error", | ||
| 99 | .fatal => Diagnostics.Kind.@"fatal error", | ||
| 100 | else => unreachable, | ||
| 101 | }; | ||
| 102 | |||
| 103 | try pp.comp.diag.set(str[2..], new_kind); | ||
| 104 | }, | ||
| 105 | .push => try self.options_stack.append(pp.comp.gpa, pp.comp.diag.options), | ||
| 106 | .pop => pp.comp.diag.options = self.options_stack.popOrNull() orelse self.original_options, | ||
| 107 | } | ||
| 108 | } | ||
| 109 | |||
| 110 | fn preprocessorHandler(pragma: *Pragma, pp: *Preprocessor, start_idx: TokenIndex) Pragma.Error!void { | ||
| 111 | var self = @fieldParentPtr(GCC, "pragma", pragma); | ||
| 112 | const directive_tok = pp.tokens.get(start_idx + 1); | ||
| 113 | if (directive_tok.id == .nl) return; | ||
| 114 | |||
| 115 | const gcc_pragma = std.meta.stringToEnum(Directive, pp.expandedSlice(directive_tok)) orelse | ||
| 116 | return pp.comp.diag.add(.{ | ||
| 117 | .tag = .unknown_gcc_pragma, | ||
| 118 | .loc = directive_tok.loc, | ||
| 119 | }, directive_tok.expansionSlice()); | ||
| 120 | |||
| 121 | switch (gcc_pragma) { | ||
| 122 | .warning, .@"error" => { | ||
| 123 | const text = Pragma.pasteTokens(pp, start_idx + 2) catch |err| switch (err) { | ||
| 124 | error.ExpectedStringLiteral => { | ||
| 125 | return pp.comp.diag.add(.{ | ||
| 126 | .tag = .pragma_requires_string_literal, | ||
| 127 | .loc = directive_tok.loc, | ||
| 128 | .extra = .{ .str = @tagName(gcc_pragma) }, | ||
| 129 | }, directive_tok.expansionSlice()); | ||
| 130 | }, | ||
| 131 | else => |e| return e, | ||
| 132 | }; | ||
| 133 | const extra = Diagnostics.Message.Extra{ .str = try pp.comp.diag.arena.allocator().dupe(u8, text) }; | ||
| 134 | const diagnostic_tag: Diagnostics.Tag = if (gcc_pragma == .warning) .pragma_warning_message else .pragma_error_message; | ||
| 135 | return pp.comp.diag.add( | ||
| 136 | .{ .tag = diagnostic_tag, .loc = directive_tok.loc, .extra = extra }, | ||
| 137 | directive_tok.expansionSlice(), | ||
| 138 | ); | ||
| 139 | }, | ||
| 140 | .diagnostic => return self.diagnosticHandler(pp, start_idx + 2) catch |err| switch (err) { | ||
| 141 | error.UnknownPragma => { | ||
| 142 | const tok = pp.tokens.get(start_idx + 2); | ||
| 143 | return pp.comp.diag.add(.{ | ||
| 144 | .tag = .unknown_gcc_pragma_directive, | ||
| 145 | .loc = tok.loc, | ||
| 146 | }, tok.expansionSlice()); | ||
| 147 | }, | ||
| 148 | else => |e| return e, | ||
| 149 | }, | ||
| 150 | .poison => { | ||
| 151 | var i: usize = 2; | ||
| 152 | while (true) : (i += 1) { | ||
| 153 | const tok = pp.tokens.get(start_idx + i); | ||
| 154 | if (tok.id == .nl) break; | ||
| 155 | |||
| 156 | if (!tok.id.isMacroIdentifier()) { | ||
| 157 | return pp.comp.diag.add(.{ | ||
| 158 | .tag = .pragma_poison_identifier, | ||
| 159 | .loc = tok.loc, | ||
| 160 | }, tok.expansionSlice()); | ||
| 161 | } | ||
| 162 | const str = pp.expandedSlice(tok); | ||
| 163 | if (pp.defines.get(str) != null) { | ||
| 164 | try pp.comp.diag.add(.{ | ||
| 165 | .tag = .pragma_poison_macro, | ||
| 166 | .loc = tok.loc, | ||
| 167 | }, tok.expansionSlice()); | ||
| 168 | } | ||
| 169 | try pp.poisoned_identifiers.put(str, {}); | ||
| 170 | } | ||
| 171 | return; | ||
| 172 | }, | ||
| 173 | } | ||
| 174 | } | ||
| 175 | |||
| 176 | fn parserHandler(pragma: *Pragma, p: *Parser, start_idx: TokenIndex) Compilation.Error!void { | ||
| 177 | var self = @fieldParentPtr(GCC, "pragma", pragma); | ||
| 178 | const directive_tok = p.pp.tokens.get(start_idx + 1); | ||
| 179 | if (directive_tok.id == .nl) return; | ||
| 180 | const name = p.pp.expandedSlice(directive_tok); | ||
| 181 | if (mem.eql(u8, name, "diagnostic")) { | ||
| 182 | return self.diagnosticHandler(p.pp, start_idx + 2) catch |err| switch (err) { | ||
| 183 | error.UnknownPragma => {}, // handled during preprocessing | ||
| 184 | error.StopPreprocessing => unreachable, // Only used by #pragma once | ||
| 185 | else => |e| return e, | ||
| 186 | }; | ||
| 187 | } | ||
| 188 | } | ||
| 189 | |||
| 190 | fn preserveTokens(_: *Pragma, pp: *Preprocessor, start_idx: TokenIndex) bool { | ||
| 191 | const next = pp.tokens.get(start_idx + 1); | ||
| 192 | if (next.id != .nl) { | ||
| 193 | const name = pp.expandedSlice(next); | ||
| 194 | if (mem.eql(u8, name, "poison")) { | ||
| 195 | return false; | ||
| 196 | } | ||
| 197 | } | ||
| 198 | return true; | ||
| 199 | } | ||
deps/aro/pragmas/message.zig deleted-50| ... | @@ -1,50 +0,0 @@ | ||
| 1 | const std = @import("std"); | ||
| 2 | const mem = std.mem; | ||
| 3 | const Compilation = @import("../Compilation.zig"); | ||
| 4 | const Pragma = @import("../Pragma.zig"); | ||
| 5 | const Diagnostics = @import("../Diagnostics.zig"); | ||
| 6 | const Preprocessor = @import("../Preprocessor.zig"); | ||
| 7 | const Parser = @import("../Parser.zig"); | ||
| 8 | const TokenIndex = @import("../Tree.zig").TokenIndex; | ||
| 9 | const Source = @import("../Source.zig"); | ||
| 10 | |||
| 11 | const Message = @This(); | ||
| 12 | |||
| 13 | pragma: Pragma = .{ | ||
| 14 | .deinit = deinit, | ||
| 15 | .preprocessorHandler = preprocessorHandler, | ||
| 16 | }, | ||
| 17 | |||
| 18 | pub fn init(allocator: mem.Allocator) !*Pragma { | ||
| 19 | var once = try allocator.create(Message); | ||
| 20 | once.* = .{}; | ||
| 21 | return &once.pragma; | ||
| 22 | } | ||
| 23 | |||
| 24 | fn deinit(pragma: *Pragma, comp: *Compilation) void { | ||
| 25 | var self = @fieldParentPtr(Message, "pragma", pragma); | ||
| 26 | comp.gpa.destroy(self); | ||
| 27 | } | ||
| 28 | |||
| 29 | fn preprocessorHandler(_: *Pragma, pp: *Preprocessor, start_idx: TokenIndex) Pragma.Error!void { | ||
| 30 | const message_tok = pp.tokens.get(start_idx); | ||
| 31 | const message_expansion_locs = message_tok.expansionSlice(); | ||
| 32 | |||
| 33 | const str = Pragma.pasteTokens(pp, start_idx + 1) catch |err| switch (err) { | ||
| 34 | error.ExpectedStringLiteral => { | ||
| 35 | return pp.comp.diag.add(.{ | ||
| 36 | .tag = .pragma_requires_string_literal, | ||
| 37 | .loc = message_tok.loc, | ||
| 38 | .extra = .{ .str = "message" }, | ||
| 39 | }, message_expansion_locs); | ||
| 40 | }, | ||
| 41 | else => |e| return e, | ||
| 42 | }; | ||
| 43 | |||
| 44 | const loc = if (message_expansion_locs.len != 0) | ||
| 45 | message_expansion_locs[message_expansion_locs.len - 1] | ||
| 46 | else | ||
| 47 | message_tok.loc; | ||
| 48 | const extra = Diagnostics.Message.Extra{ .str = try pp.comp.diag.arena.allocator().dupe(u8, str) }; | ||
| 49 | return pp.comp.diag.add(.{ .tag = .pragma_message, .loc = loc, .extra = extra }, &.{}); | ||
| 50 | } | ||
deps/aro/pragmas/once.zig deleted-56| ... | @@ -1,56 +0,0 @@ | ||
| 1 | const std = @import("std"); | ||
| 2 | const mem = std.mem; | ||
| 3 | const Compilation = @import("../Compilation.zig"); | ||
| 4 | const Pragma = @import("../Pragma.zig"); | ||
| 5 | const Diagnostics = @import("../Diagnostics.zig"); | ||
| 6 | const Preprocessor = @import("../Preprocessor.zig"); | ||
| 7 | const Parser = @import("../Parser.zig"); | ||
| 8 | const TokenIndex = @import("../Tree.zig").TokenIndex; | ||
| 9 | const Source = @import("../Source.zig"); | ||
| 10 | |||
| 11 | const Once = @This(); | ||
| 12 | |||
| 13 | pragma: Pragma = .{ | ||
| 14 | .afterParse = afterParse, | ||
| 15 | .deinit = deinit, | ||
| 16 | .preprocessorHandler = preprocessorHandler, | ||
| 17 | }, | ||
| 18 | pragma_once: std.AutoHashMap(Source.Id, void), | ||
| 19 | preprocess_count: u32 = 0, | ||
| 20 | |||
| 21 | pub fn init(allocator: mem.Allocator) !*Pragma { | ||
| 22 | var once = try allocator.create(Once); | ||
| 23 | once.* = .{ | ||
| 24 | .pragma_once = std.AutoHashMap(Source.Id, void).init(allocator), | ||
| 25 | }; | ||
| 26 | return &once.pragma; | ||
| 27 | } | ||
| 28 | |||
| 29 | fn afterParse(pragma: *Pragma, _: *Compilation) void { | ||
| 30 | var self = @fieldParentPtr(Once, "pragma", pragma); | ||
| 31 | self.pragma_once.clearRetainingCapacity(); | ||
| 32 | } | ||
| 33 | |||
| 34 | fn deinit(pragma: *Pragma, comp: *Compilation) void { | ||
| 35 | var self = @fieldParentPtr(Once, "pragma", pragma); | ||
| 36 | self.pragma_once.deinit(); | ||
| 37 | comp.gpa.destroy(self); | ||
| 38 | } | ||
| 39 | |||
| 40 | fn preprocessorHandler(pragma: *Pragma, pp: *Preprocessor, start_idx: TokenIndex) Pragma.Error!void { | ||
| 41 | var self = @fieldParentPtr(Once, "pragma", pragma); | ||
| 42 | const name_tok = pp.tokens.get(start_idx); | ||
| 43 | const next = pp.tokens.get(start_idx + 1); | ||
| 44 | if (next.id != .nl) { | ||
| 45 | try pp.comp.diag.add(.{ | ||
| 46 | .tag = .extra_tokens_directive_end, | ||
| 47 | .loc = name_tok.loc, | ||
| 48 | }, next.expansionSlice()); | ||
| 49 | } | ||
| 50 | const seen = self.preprocess_count == pp.preprocess_count; | ||
| 51 | const prev = try self.pragma_once.fetchPut(name_tok.loc.id, {}); | ||
| 52 | if (prev != null and !seen) { | ||
| 53 | return error.StopPreprocessing; | ||
| 54 | } | ||
| 55 | self.preprocess_count = pp.preprocess_count; | ||
| 56 | } | ||
deps/aro/pragmas/pack.zig deleted-164| ... | @@ -1,164 +0,0 @@ | ||
| 1 | const std = @import("std"); | ||
| 2 | const mem = std.mem; | ||
| 3 | const Compilation = @import("../Compilation.zig"); | ||
| 4 | const Pragma = @import("../Pragma.zig"); | ||
| 5 | const Diagnostics = @import("../Diagnostics.zig"); | ||
| 6 | const Preprocessor = @import("../Preprocessor.zig"); | ||
| 7 | const Parser = @import("../Parser.zig"); | ||
| 8 | const Tree = @import("../Tree.zig"); | ||
| 9 | const TokenIndex = Tree.TokenIndex; | ||
| 10 | |||
| 11 | const Pack = @This(); | ||
| 12 | |||
| 13 | pragma: Pragma = .{ | ||
| 14 | .deinit = deinit, | ||
| 15 | .parserHandler = parserHandler, | ||
| 16 | .preserveTokens = preserveTokens, | ||
| 17 | }, | ||
| 18 | stack: std.ArrayListUnmanaged(struct { label: []const u8, val: u8 }) = .{}, | ||
| 19 | |||
| 20 | pub fn init(allocator: mem.Allocator) !*Pragma { | ||
| 21 | var pack = try allocator.create(Pack); | ||
| 22 | pack.* = .{}; | ||
| 23 | return &pack.pragma; | ||
| 24 | } | ||
| 25 | |||
| 26 | fn deinit(pragma: *Pragma, comp: *Compilation) void { | ||
| 27 | var self = @fieldParentPtr(Pack, "pragma", pragma); | ||
| 28 | self.stack.deinit(comp.gpa); | ||
| 29 | comp.gpa.destroy(self); | ||
| 30 | } | ||
| 31 | |||
| 32 | fn parserHandler(pragma: *Pragma, p: *Parser, start_idx: TokenIndex) Compilation.Error!void { | ||
| 33 | var pack = @fieldParentPtr(Pack, "pragma", pragma); | ||
| 34 | var idx = start_idx + 1; | ||
| 35 | const l_paren = p.pp.tokens.get(idx); | ||
| 36 | if (l_paren.id != .l_paren) { | ||
| 37 | return p.comp.diag.add(.{ | ||
| 38 | .tag = .pragma_pack_lparen, | ||
| 39 | .loc = l_paren.loc, | ||
| 40 | }, l_paren.expansionSlice()); | ||
| 41 | } | ||
| 42 | idx += 1; | ||
| 43 | |||
| 44 | // TODO -fapple-pragma-pack -fxl-pragma-pack | ||
| 45 | const apple_or_xl = false; | ||
| 46 | const tok_ids = p.pp.tokens.items(.id); | ||
| 47 | const arg = idx; | ||
| 48 | switch (tok_ids[arg]) { | ||
| 49 | .identifier => { | ||
| 50 | idx += 1; | ||
| 51 | const Action = enum { | ||
| 52 | show, | ||
| 53 | push, | ||
| 54 | pop, | ||
| 55 | }; | ||
| 56 | const action = std.meta.stringToEnum(Action, p.tokSlice(arg)) orelse { | ||
| 57 | return p.errTok(.pragma_pack_unknown_action, arg); | ||
| 58 | }; | ||
| 59 | switch (action) { | ||
| 60 | .show => { | ||
| 61 | try p.errExtra(.pragma_pack_show, arg, .{ .unsigned = p.pragma_pack orelse 8 }); | ||
| 62 | }, | ||
| 63 | .push, .pop => { | ||
| 64 | var new_val: ?u8 = null; | ||
| 65 | var label: ?[]const u8 = null; | ||
| 66 | if (tok_ids[idx] == .comma) { | ||
| 67 | idx += 1; | ||
| 68 | const next = idx; | ||
| 69 | idx += 1; | ||
| 70 | switch (tok_ids[next]) { | ||
| 71 | .pp_num => new_val = (try packInt(p, next)) orelse return, | ||
| 72 | .identifier => { | ||
| 73 | label = p.tokSlice(next); | ||
| 74 | if (tok_ids[idx] == .comma) { | ||
| 75 | idx += 1; | ||
| 76 | const int = idx; | ||
| 77 | idx += 1; | ||
| 78 | if (tok_ids[int] != .pp_num) return p.errTok(.pragma_pack_int_ident, int); | ||
| 79 | new_val = (try packInt(p, int)) orelse return; | ||
| 80 | } | ||
| 81 | }, | ||
| 82 | else => return p.errTok(.pragma_pack_int_ident, next), | ||
| 83 | } | ||
| 84 | } | ||
| 85 | if (action == .push) { | ||
| 86 | try pack.stack.append(p.gpa, .{ .label = label orelse "", .val = p.pragma_pack orelse 8 }); | ||
| 87 | } else { | ||
| 88 | pack.pop(p, label); | ||
| 89 | if (new_val != null) { | ||
| 90 | try p.errTok(.pragma_pack_undefined_pop, arg); | ||
| 91 | } else if (pack.stack.items.len == 0) { | ||
| 92 | try p.errTok(.pragma_pack_empty_stack, arg); | ||
| 93 | } | ||
| 94 | } | ||
| 95 | if (new_val) |some| { | ||
| 96 | p.pragma_pack = some; | ||
| 97 | } | ||
| 98 | }, | ||
| 99 | } | ||
| 100 | }, | ||
| 101 | .r_paren => if (apple_or_xl) { | ||
| 102 | pack.pop(p, null); | ||
| 103 | } else { | ||
| 104 | p.pragma_pack = null; | ||
| 105 | }, | ||
| 106 | .pp_num => { | ||
| 107 | const new_val = (try packInt(p, arg)) orelse return; | ||
| 108 | idx += 1; | ||
| 109 | if (apple_or_xl) { | ||
| 110 | try pack.stack.append(p.gpa, .{ .label = "", .val = p.pragma_pack }); | ||
| 111 | } | ||
| 112 | p.pragma_pack = new_val; | ||
| 113 | }, | ||
| 114 | else => {}, | ||
| 115 | } | ||
| 116 | |||
| 117 | if (tok_ids[idx] != .r_paren) { | ||
| 118 | return p.errTok(.pragma_pack_rparen, idx); | ||
| 119 | } | ||
| 120 | } | ||
| 121 | |||
| 122 | fn packInt(p: *Parser, tok_i: TokenIndex) Compilation.Error!?u8 { | ||
| 123 | const res = p.parseNumberToken(tok_i) catch |err| switch (err) { | ||
| 124 | error.ParsingFailed => { | ||
| 125 | try p.errTok(.pragma_pack_int, tok_i); | ||
| 126 | return null; | ||
| 127 | }, | ||
| 128 | else => |e| return e, | ||
| 129 | }; | ||
| 130 | const int = if (res.val.tag == .int) res.val.getInt(u64) else 99; | ||
| 131 | switch (int) { | ||
| 132 | 1, 2, 4, 8, 16 => return @intCast(int), | ||
| 133 | else => { | ||
| 134 | try p.errTok(.pragma_pack_int, tok_i); | ||
| 135 | return null; | ||
| 136 | }, | ||
| 137 | } | ||
| 138 | } | ||
| 139 | |||
| 140 | fn pop(pack: *Pack, p: *Parser, maybe_label: ?[]const u8) void { | ||
| 141 | if (maybe_label) |label| { | ||
| 142 | var i = pack.stack.items.len; | ||
| 143 | while (i > 0) { | ||
| 144 | i -= 1; | ||
| 145 | if (std.mem.eql(u8, pack.stack.items[i].label, label)) { | ||
| 146 | const prev = pack.stack.orderedRemove(i); | ||
| 147 | p.pragma_pack = prev.val; | ||
| 148 | return; | ||
| 149 | } | ||
| 150 | } | ||
| 151 | } else { | ||
| 152 | const prev = pack.stack.popOrNull() orelse { | ||
| 153 | p.pragma_pack = 2; | ||
| 154 | return; | ||
| 155 | }; | ||
| 156 | p.pragma_pack = prev.val; | ||
| 157 | } | ||
| 158 | } | ||
| 159 | |||
| 160 | fn preserveTokens(_: *Pragma, pp: *Preprocessor, start_idx: TokenIndex) bool { | ||
| 161 | _ = pp; | ||
| 162 | _ = start_idx; | ||
| 163 | return true; | ||
| 164 | } | ||
deps/aro/record_layout.zig deleted-669| ... | @@ -1,669 +0,0 @@ | ||
| 1 | //! Record layout code adapted from https://github.com/mahkoh/repr-c | ||
| 2 | //! Licensed under MIT license: https://github.com/mahkoh/repr-c/tree/master/repc/facade | ||
| 3 | |||
| 4 | const std = @import("std"); | ||
| 5 | const Type = @import("Type.zig"); | ||
| 6 | const Attribute = @import("Attribute.zig"); | ||
| 7 | const Compilation = @import("Compilation.zig"); | ||
| 8 | const Parser = @import("Parser.zig"); | ||
| 9 | const Record = Type.Record; | ||
| 10 | const Field = Record.Field; | ||
| 11 | const TypeLayout = Type.TypeLayout; | ||
| 12 | const FieldLayout = Type.FieldLayout; | ||
| 13 | const target_util = @import("target.zig"); | ||
| 14 | |||
| 15 | const BITS_PER_BYTE = 8; | ||
| 16 | |||
| 17 | const OngoingBitfield = struct { | ||
| 18 | size_bits: u64, | ||
| 19 | unused_size_bits: u64, | ||
| 20 | }; | ||
| 21 | |||
| 22 | const SysVContext = struct { | ||
| 23 | /// Does the record have an __attribute__((packed)) annotation. | ||
| 24 | attr_packed: bool, | ||
| 25 | /// The value of #pragma pack(N) at the type level if any. | ||
| 26 | max_field_align_bits: ?u64, | ||
| 27 | /// The alignment of this record. | ||
| 28 | aligned_bits: u32, | ||
| 29 | is_union: bool, | ||
| 30 | /// The size of the record. This might not be a multiple of 8 if the record contains bit-fields. | ||
| 31 | /// For structs, this is also the offset of the first bit after the last field. | ||
| 32 | size_bits: u64, | ||
| 33 | /// non-null if the previous field was a non-zero-sized bit-field. Only used by MinGW. | ||
| 34 | ongoing_bitfield: ?OngoingBitfield, | ||
| 35 | |||
| 36 | comp: *const Compilation, | ||
| 37 | |||
| 38 | fn init(ty: Type, comp: *const Compilation, pragma_pack: ?u8) SysVContext { | ||
| 39 | var pack_value: ?u64 = null; | ||
| 40 | if (pragma_pack) |pak| { | ||
| 41 | pack_value = pak * BITS_PER_BYTE; | ||
| 42 | } | ||
| 43 | var req_align: u29 = BITS_PER_BYTE; | ||
| 44 | if (ty.requestedAlignment(comp)) |aln| { | ||
| 45 | req_align = aln * BITS_PER_BYTE; | ||
| 46 | } | ||
| 47 | return SysVContext{ | ||
| 48 | .attr_packed = ty.hasAttribute(.@"packed"), | ||
| 49 | .max_field_align_bits = pack_value, | ||
| 50 | .aligned_bits = req_align, | ||
| 51 | .is_union = ty.is(.@"union"), | ||
| 52 | .size_bits = 0, | ||
| 53 | .comp = comp, | ||
| 54 | .ongoing_bitfield = null, | ||
| 55 | }; | ||
| 56 | } | ||
| 57 | |||
| 58 | fn layoutFields(self: *SysVContext, rec: *const Record) void { | ||
| 59 | for (rec.fields, 0..) |*fld, fld_indx| { | ||
| 60 | const type_layout = computeLayout(fld.ty, self.comp); | ||
| 61 | |||
| 62 | var field_attrs: ?[]const Attribute = null; | ||
| 63 | if (rec.field_attributes) |attrs| { | ||
| 64 | field_attrs = attrs[fld_indx]; | ||
| 65 | } | ||
| 66 | if (self.comp.target.isMinGW()) { | ||
| 67 | fld.layout = self.layoutMinGWField(fld, field_attrs, type_layout); | ||
| 68 | } else { | ||
| 69 | if (fld.isRegularField()) { | ||
| 70 | fld.layout = self.layoutRegularField(field_attrs, type_layout); | ||
| 71 | } else { | ||
| 72 | fld.layout = self.layoutBitField(field_attrs, type_layout, fld.isNamed(), fld.specifiedBitWidth()); | ||
| 73 | } | ||
| 74 | } | ||
| 75 | } | ||
| 76 | } | ||
| 77 | |||
| 78 | /// On MinGW the alignment of the field is calculated in the usual way except that the alignment of | ||
| 79 | /// the underlying type is ignored in three cases | ||
| 80 | /// - the field is packed | ||
| 81 | /// - the field is a bit-field and the previous field was a non-zero-sized bit-field with the same type size | ||
| 82 | /// - the field is a zero-sized bit-field and the previous field was not a non-zero-sized bit-field | ||
| 83 | /// See test case 0068. | ||
| 84 | fn ignoreTypeAlignment(is_attr_packed: bool, bit_width: ?u32, ongoing_bitfield: ?OngoingBitfield, fld_layout: TypeLayout) bool { | ||
| 85 | if (is_attr_packed) return true; | ||
| 86 | if (bit_width) |width| { | ||
| 87 | if (ongoing_bitfield) |ongoing| { | ||
| 88 | if (ongoing.size_bits == fld_layout.size_bits) return true; | ||
| 89 | } else { | ||
| 90 | if (width == 0) return true; | ||
| 91 | } | ||
| 92 | } | ||
| 93 | return false; | ||
| 94 | } | ||
| 95 | |||
| 96 | fn layoutMinGWField( | ||
| 97 | self: *SysVContext, | ||
| 98 | field: *const Field, | ||
| 99 | field_attrs: ?[]const Attribute, | ||
| 100 | field_layout: TypeLayout, | ||
| 101 | ) FieldLayout { | ||
| 102 | const annotation_alignment_bits = BITS_PER_BYTE * (Type.annotationAlignment(self.comp, field_attrs) orelse 1); | ||
| 103 | const is_attr_packed = self.attr_packed or isPacked(field_attrs); | ||
| 104 | const ignore_type_alignment = ignoreTypeAlignment(is_attr_packed, field.bit_width, self.ongoing_bitfield, field_layout); | ||
| 105 | |||
| 106 | var field_alignment_bits: u64 = field_layout.field_alignment_bits; | ||
| 107 | if (ignore_type_alignment) { | ||
| 108 | field_alignment_bits = BITS_PER_BYTE; | ||
| 109 | } | ||
| 110 | field_alignment_bits = @max(field_alignment_bits, annotation_alignment_bits); | ||
| 111 | if (self.max_field_align_bits) |bits| { | ||
| 112 | field_alignment_bits = @min(field_alignment_bits, bits); | ||
| 113 | } | ||
| 114 | |||
| 115 | // The field affects the record alignment in one of three cases | ||
| 116 | // - the field is a regular field | ||
| 117 | // - the field is a zero-width bit-field following a non-zero-width bit-field | ||
| 118 | // - the field is a non-zero-width bit-field and not packed. | ||
| 119 | // See test case 0069. | ||
| 120 | const update_record_alignment = | ||
| 121 | field.isRegularField() or | ||
| 122 | (field.specifiedBitWidth() == 0 and self.ongoing_bitfield != null) or | ||
| 123 | (field.specifiedBitWidth() != 0 and !is_attr_packed); | ||
| 124 | |||
| 125 | // If a field affects the alignment of a record, the alignment is calculated in the | ||
| 126 | // usual way except that __attribute__((packed)) is ignored on a zero-width bit-field. | ||
| 127 | // See test case 0068. | ||
| 128 | if (update_record_alignment) { | ||
| 129 | var ty_alignment_bits = field_layout.field_alignment_bits; | ||
| 130 | if (is_attr_packed and (field.isRegularField() or field.specifiedBitWidth() != 0)) { | ||
| 131 | ty_alignment_bits = BITS_PER_BYTE; | ||
| 132 | } | ||
| 133 | ty_alignment_bits = @max(ty_alignment_bits, annotation_alignment_bits); | ||
| 134 | if (self.max_field_align_bits) |bits| { | ||
| 135 | ty_alignment_bits = @intCast(@min(ty_alignment_bits, bits)); | ||
| 136 | } | ||
| 137 | self.aligned_bits = @max(self.aligned_bits, ty_alignment_bits); | ||
| 138 | } | ||
| 139 | |||
| 140 | // NOTE: ty_alignment_bits and field_alignment_bits are different in the following case: | ||
| 141 | // Y = { size: 64, alignment: 64 }struct { | ||
| 142 | // { offset: 0, size: 1 }c { size: 8, alignment: 8 }char:1, | ||
| 143 | // @attr_packed _ { size: 64, alignment: 64 }long long:0, | ||
| 144 | // { offset: 8, size: 8 }d { size: 8, alignment: 8 }char, | ||
| 145 | // } | ||
| 146 | if (field.isRegularField()) { | ||
| 147 | return self.layoutRegularFieldMinGW(field_layout.size_bits, field_alignment_bits); | ||
| 148 | } else { | ||
| 149 | return self.layoutBitFieldMinGW(field_layout.size_bits, field_alignment_bits, field.isNamed(), field.specifiedBitWidth()); | ||
| 150 | } | ||
| 151 | } | ||
| 152 | |||
| 153 | fn layoutBitFieldMinGW( | ||
| 154 | self: *SysVContext, | ||
| 155 | ty_size_bits: u64, | ||
| 156 | field_alignment_bits: u64, | ||
| 157 | is_named: bool, | ||
| 158 | width: u64, | ||
| 159 | ) FieldLayout { | ||
| 160 | std.debug.assert(width <= ty_size_bits); // validated in parser | ||
| 161 | |||
| 162 | // In a union, the size of the underlying type does not affect the size of the union. | ||
| 163 | // See test case 0070. | ||
| 164 | if (self.is_union) { | ||
| 165 | self.size_bits = @max(self.size_bits, width); | ||
| 166 | if (!is_named) return .{}; | ||
| 167 | return .{ | ||
| 168 | .offset_bits = 0, | ||
| 169 | .size_bits = width, | ||
| 170 | }; | ||
| 171 | } | ||
| 172 | if (width == 0) { | ||
| 173 | self.ongoing_bitfield = null; | ||
| 174 | } else { | ||
| 175 | // If there is an ongoing bit-field in a struct whose underlying type has the same size and | ||
| 176 | // if there is enough space left to place this bit-field, then this bit-field is placed in | ||
| 177 | // the ongoing bit-field and the size of the struct is not affected by this | ||
| 178 | // bit-field. See test case 0037. | ||
| 179 | if (self.ongoing_bitfield) |*ongoing| { | ||
| 180 | if (ongoing.size_bits == ty_size_bits and ongoing.unused_size_bits >= width) { | ||
| 181 | const offset_bits = self.size_bits - ongoing.unused_size_bits; | ||
| 182 | ongoing.unused_size_bits -= width; | ||
| 183 | if (!is_named) return .{}; | ||
| 184 | return .{ | ||
| 185 | .offset_bits = offset_bits, | ||
| 186 | .size_bits = width, | ||
| 187 | }; | ||
| 188 | } | ||
| 189 | } | ||
| 190 | // Otherwise this field is part of a new ongoing bit-field. | ||
| 191 | self.ongoing_bitfield = .{ | ||
| 192 | .size_bits = ty_size_bits, | ||
| 193 | .unused_size_bits = ty_size_bits - width, | ||
| 194 | }; | ||
| 195 | } | ||
| 196 | const offset_bits = std.mem.alignForward(u64, self.size_bits, field_alignment_bits); | ||
| 197 | self.size_bits = if (width == 0) offset_bits else offset_bits + ty_size_bits; | ||
| 198 | if (!is_named) return .{}; | ||
| 199 | return .{ | ||
| 200 | .offset_bits = offset_bits, | ||
| 201 | .size_bits = width, | ||
| 202 | }; | ||
| 203 | } | ||
| 204 | |||
| 205 | fn layoutRegularFieldMinGW( | ||
| 206 | self: *SysVContext, | ||
| 207 | ty_size_bits: u64, | ||
| 208 | field_alignment_bits: u64, | ||
| 209 | ) FieldLayout { | ||
| 210 | self.ongoing_bitfield = null; | ||
| 211 | // A struct field starts at the next offset in the struct that is properly | ||
| 212 | // aligned with respect to the start of the struct. See test case 0033. | ||
| 213 | // A union field always starts at offset 0. | ||
| 214 | const offset_bits = if (self.is_union) 0 else std.mem.alignForward(u64, self.size_bits, field_alignment_bits); | ||
| 215 | |||
| 216 | // Set the size of the record to the maximum of the current size and the end of | ||
| 217 | // the field. See test case 0034. | ||
| 218 | self.size_bits = @max(self.size_bits, offset_bits + ty_size_bits); | ||
| 219 | |||
| 220 | return .{ | ||
| 221 | .offset_bits = offset_bits, | ||
| 222 | .size_bits = ty_size_bits, | ||
| 223 | }; | ||
| 224 | } | ||
| 225 | |||
| 226 | fn layoutRegularField( | ||
| 227 | self: *SysVContext, | ||
| 228 | fld_attrs: ?[]const Attribute, | ||
| 229 | fld_layout: TypeLayout, | ||
| 230 | ) FieldLayout { | ||
| 231 | var fld_align_bits = fld_layout.field_alignment_bits; | ||
| 232 | |||
| 233 | // If the struct or the field is packed, then the alignment of the underlying type is | ||
| 234 | // ignored. See test case 0084. | ||
| 235 | if (self.attr_packed or isPacked(fld_attrs)) { | ||
| 236 | fld_align_bits = BITS_PER_BYTE; | ||
| 237 | } | ||
| 238 | |||
| 239 | // The field alignment can be increased by __attribute__((aligned)) annotations on the | ||
| 240 | // field. See test case 0085. | ||
| 241 | if (Type.annotationAlignment(self.comp, fld_attrs)) |anno| { | ||
| 242 | fld_align_bits = @max(fld_align_bits, anno * BITS_PER_BYTE); | ||
| 243 | } | ||
| 244 | |||
| 245 | // #pragma pack takes precedence over all other attributes. See test cases 0084 and | ||
| 246 | // 0085. | ||
| 247 | if (self.max_field_align_bits) |req_bits| { | ||
| 248 | fld_align_bits = @intCast(@min(fld_align_bits, req_bits)); | ||
| 249 | } | ||
| 250 | |||
| 251 | // A struct field starts at the next offset in the struct that is properly | ||
| 252 | // aligned with respect to the start of the struct. | ||
| 253 | const offset_bits = if (self.is_union) 0 else std.mem.alignForward(u64, self.size_bits, fld_align_bits); | ||
| 254 | const size_bits = fld_layout.size_bits; | ||
| 255 | |||
| 256 | // The alignment of a record is the maximum of its field alignments. See test cases | ||
| 257 | // 0084, 0085, 0086. | ||
| 258 | self.size_bits = @max(self.size_bits, offset_bits + size_bits); | ||
| 259 | self.aligned_bits = @max(self.aligned_bits, fld_align_bits); | ||
| 260 | |||
| 261 | return .{ | ||
| 262 | .offset_bits = offset_bits, | ||
| 263 | .size_bits = size_bits, | ||
| 264 | }; | ||
| 265 | } | ||
| 266 | |||
| 267 | fn layoutBitField( | ||
| 268 | self: *SysVContext, | ||
| 269 | fld_attrs: ?[]const Attribute, | ||
| 270 | fld_layout: TypeLayout, | ||
| 271 | is_named: bool, | ||
| 272 | bit_width: u64, | ||
| 273 | ) FieldLayout { | ||
| 274 | const ty_size_bits = fld_layout.size_bits; | ||
| 275 | var ty_fld_algn_bits: u32 = fld_layout.field_alignment_bits; | ||
| 276 | |||
| 277 | if (bit_width > 0) { | ||
| 278 | std.debug.assert(bit_width <= ty_size_bits); // Checked in parser | ||
| 279 | // Some targets ignore the alignment of the underlying type when laying out | ||
| 280 | // non-zero-sized bit-fields. See test case 0072. On such targets, bit-fields never | ||
| 281 | // cross a storage boundary. See test case 0081. | ||
| 282 | if (target_util.ignoreNonZeroSizedBitfieldTypeAlignment(self.comp.target)) { | ||
| 283 | ty_fld_algn_bits = 1; | ||
| 284 | } | ||
| 285 | } else { | ||
| 286 | // Some targets ignore the alignment of the underlying type when laying out | ||
| 287 | // zero-sized bit-fields. See test case 0073. | ||
| 288 | if (target_util.ignoreZeroSizedBitfieldTypeAlignment(self.comp.target)) { | ||
| 289 | ty_fld_algn_bits = 1; | ||
| 290 | } | ||
| 291 | // Some targets have a minimum alignment of zero-sized bit-fields. See test case | ||
| 292 | // 0074. | ||
| 293 | if (target_util.minZeroWidthBitfieldAlignment(self.comp.target)) |target_align| { | ||
| 294 | ty_fld_algn_bits = @max(ty_fld_algn_bits, target_align); | ||
| 295 | } | ||
| 296 | } | ||
| 297 | |||
| 298 | // __attribute__((packed)) on the record is identical to __attribute__((packed)) on each | ||
| 299 | // field. See test case 0067. | ||
| 300 | const attr_packed = self.attr_packed or isPacked(fld_attrs); | ||
| 301 | const has_packing_annotation = attr_packed or self.max_field_align_bits != null; | ||
| 302 | |||
| 303 | const annotation_alignment: u32 = if (Type.annotationAlignment(self.comp, fld_attrs)) |anno| anno * BITS_PER_BYTE else 1; | ||
| 304 | |||
| 305 | const first_unused_bit: u64 = if (self.is_union) 0 else self.size_bits; | ||
| 306 | var field_align_bits: u64 = 1; | ||
| 307 | |||
| 308 | if (bit_width == 0) { | ||
| 309 | field_align_bits = @max(ty_fld_algn_bits, annotation_alignment); | ||
| 310 | } else if (self.comp.langopts.emulate == .gcc) { | ||
| 311 | // On GCC, the field alignment is at least the alignment requested by annotations | ||
| 312 | // except as restricted by #pragma pack. See test case 0083. | ||
| 313 | field_align_bits = annotation_alignment; | ||
| 314 | if (self.max_field_align_bits) |max_bits| { | ||
| 315 | field_align_bits = @min(annotation_alignment, max_bits); | ||
| 316 | } | ||
| 317 | |||
| 318 | // On GCC, if there are no packing annotations and | ||
| 319 | // - the field would otherwise start at an offset such that it would cross a | ||
| 320 | // storage boundary or | ||
| 321 | // - the alignment of the type is larger than its size, | ||
| 322 | // then it is aligned to the type's field alignment. See test case 0083. | ||
| 323 | if (!has_packing_annotation) { | ||
| 324 | const start_bit = std.mem.alignForward(u64, first_unused_bit, field_align_bits); | ||
| 325 | |||
| 326 | const does_field_cross_boundary = start_bit % ty_fld_algn_bits + bit_width > ty_size_bits; | ||
| 327 | |||
| 328 | if (ty_fld_algn_bits > ty_size_bits or does_field_cross_boundary) { | ||
| 329 | field_align_bits = @max(field_align_bits, ty_fld_algn_bits); | ||
| 330 | } | ||
| 331 | } | ||
| 332 | } else { | ||
| 333 | std.debug.assert(self.comp.langopts.emulate == .clang); | ||
| 334 | |||
| 335 | // On Clang, the alignment requested by annotations is not respected if it is | ||
| 336 | // larger than the value of #pragma pack. See test case 0083. | ||
| 337 | if (annotation_alignment <= self.max_field_align_bits orelse std.math.maxInt(u29)) { | ||
| 338 | field_align_bits = @max(field_align_bits, annotation_alignment); | ||
| 339 | } | ||
| 340 | // On Clang, if there are no packing annotations and the field would cross a | ||
| 341 | // storage boundary if it were positioned at the first unused bit in the record, | ||
| 342 | // it is aligned to the type's field alignment. See test case 0083. | ||
| 343 | if (!has_packing_annotation) { | ||
| 344 | const does_field_cross_boundary = first_unused_bit % ty_fld_algn_bits + bit_width > ty_size_bits; | ||
| 345 | |||
| 346 | if (does_field_cross_boundary) | ||
| 347 | field_align_bits = @max(field_align_bits, ty_fld_algn_bits); | ||
| 348 | } | ||
| 349 | } | ||
| 350 | |||
| 351 | const offset_bits = std.mem.alignForward(u64, first_unused_bit, field_align_bits); | ||
| 352 | self.size_bits = @max(self.size_bits, offset_bits + bit_width); | ||
| 353 | |||
| 354 | // Unnamed fields do not contribute to the record alignment except on a few targets. | ||
| 355 | // See test case 0079. | ||
| 356 | if (is_named or target_util.unnamedFieldAffectsAlignment(self.comp.target)) { | ||
| 357 | var inherited_align_bits: u32 = undefined; | ||
| 358 | |||
| 359 | if (bit_width == 0) { | ||
| 360 | // If the width is 0, #pragma pack and __attribute__((packed)) are ignored. | ||
| 361 | // See test case 0075. | ||
| 362 | inherited_align_bits = @max(ty_fld_algn_bits, annotation_alignment); | ||
| 363 | } else if (self.max_field_align_bits) |max_align_bits| { | ||
| 364 | // Otherwise, if a #pragma pack is in effect, __attribute__((packed)) on the field or | ||
| 365 | // record is ignored. See test case 0076. | ||
| 366 | inherited_align_bits = @max(ty_fld_algn_bits, annotation_alignment); | ||
| 367 | inherited_align_bits = @intCast(@min(inherited_align_bits, max_align_bits)); | ||
| 368 | } else if (attr_packed) { | ||
| 369 | // Otherwise, if the field or the record is packed, the field alignment is 1 bit unless | ||
| 370 | // it is explicitly increased with __attribute__((aligned)). See test case 0077. | ||
| 371 | inherited_align_bits = annotation_alignment; | ||
| 372 | } else { | ||
| 373 | // Otherwise, the field alignment is the field alignment of the underlying type unless | ||
| 374 | // it is explicitly increased with __attribute__((aligned)). See test case 0078. | ||
| 375 | inherited_align_bits = @max(ty_fld_algn_bits, annotation_alignment); | ||
| 376 | } | ||
| 377 | self.aligned_bits = @max(self.aligned_bits, inherited_align_bits); | ||
| 378 | } | ||
| 379 | |||
| 380 | if (!is_named) return .{}; | ||
| 381 | return .{ | ||
| 382 | .size_bits = bit_width, | ||
| 383 | .offset_bits = offset_bits, | ||
| 384 | }; | ||
| 385 | } | ||
| 386 | }; | ||
| 387 | |||
| 388 | const MsvcContext = struct { | ||
| 389 | req_align_bits: u32, | ||
| 390 | max_field_align_bits: ?u32, | ||
| 391 | /// The alignment of pointers that point to an object of this type. This is greater than or equal | ||
| 392 | /// to the required alignment. Once all fields have been laid out, the size of the record will be | ||
| 393 | /// rounded up to this value. | ||
| 394 | pointer_align_bits: u32, | ||
| 395 | /// The alignment of this type when it is used as a record field. This is greater than or equal to | ||
| 396 | /// the pointer alignment. | ||
| 397 | field_align_bits: u32, | ||
| 398 | size_bits: u64, | ||
| 399 | ongoing_bitfield: ?OngoingBitfield, | ||
| 400 | contains_non_bitfield: bool, | ||
| 401 | is_union: bool, | ||
| 402 | comp: *const Compilation, | ||
| 403 | |||
| 404 | fn init(ty: Type, comp: *const Compilation, pragma_pack: ?u8) MsvcContext { | ||
| 405 | var pack_value: ?u32 = null; | ||
| 406 | if (ty.hasAttribute(.@"packed")) { | ||
| 407 | // __attribute__((packed)) behaves like #pragma pack(1) in clang. See test case 0056. | ||
| 408 | pack_value = BITS_PER_BYTE; | ||
| 409 | } | ||
| 410 | if (pack_value == null) { | ||
| 411 | if (pragma_pack) |pack| { | ||
| 412 | pack_value = pack * BITS_PER_BYTE; | ||
| 413 | } | ||
| 414 | } | ||
| 415 | if (pack_value) |pack| { | ||
| 416 | pack_value = msvcPragmaPack(comp, pack); | ||
| 417 | } | ||
| 418 | |||
| 419 | // The required alignment can be increased by adding a __declspec(align) | ||
| 420 | // annotation. See test case 0023. | ||
| 421 | var must_align: u29 = BITS_PER_BYTE; | ||
| 422 | if (ty.requestedAlignment(comp)) |req_align| { | ||
| 423 | must_align = req_align * BITS_PER_BYTE; | ||
| 424 | } | ||
| 425 | return MsvcContext{ | ||
| 426 | .req_align_bits = must_align, | ||
| 427 | .pointer_align_bits = must_align, | ||
| 428 | .field_align_bits = must_align, | ||
| 429 | .size_bits = 0, | ||
| 430 | .max_field_align_bits = pack_value, | ||
| 431 | .ongoing_bitfield = null, | ||
| 432 | .contains_non_bitfield = false, | ||
| 433 | .is_union = ty.is(.@"union"), | ||
| 434 | .comp = comp, | ||
| 435 | }; | ||
| 436 | } | ||
| 437 | |||
| 438 | fn layoutField(self: *MsvcContext, fld: *const Field, fld_attrs: ?[]const Attribute) FieldLayout { | ||
| 439 | const type_layout = computeLayout(fld.ty, self.comp); | ||
| 440 | |||
| 441 | // The required alignment of the field is the maximum of the required alignment of the | ||
| 442 | // underlying type and the __declspec(align) annotation on the field itself. | ||
| 443 | // See test case 0028. | ||
| 444 | var req_align = type_layout.required_alignment_bits; | ||
| 445 | if (Type.annotationAlignment(self.comp, fld_attrs)) |anno| { | ||
| 446 | req_align = @max(anno * BITS_PER_BYTE, req_align); | ||
| 447 | } | ||
| 448 | |||
| 449 | // The required alignment of a record is the maximum of the required alignments of its | ||
| 450 | // fields except that the required alignment of bitfields is ignored. | ||
| 451 | // See test case 0029. | ||
| 452 | if (fld.isRegularField()) { | ||
| 453 | self.req_align_bits = @max(self.req_align_bits, req_align); | ||
| 454 | } | ||
| 455 | |||
| 456 | // The offset of the field is based on the field alignment of the underlying type. | ||
| 457 | // See test case 0027. | ||
| 458 | var fld_align_bits = type_layout.field_alignment_bits; | ||
| 459 | if (self.max_field_align_bits) |max_align| { | ||
| 460 | fld_align_bits = @min(fld_align_bits, max_align); | ||
| 461 | } | ||
| 462 | // check the requested alignment of the field type. | ||
| 463 | if (fld.ty.requestedAlignment(self.comp)) |type_req_align| { | ||
| 464 | fld_align_bits = @max(fld_align_bits, type_req_align * 8); | ||
| 465 | } | ||
| 466 | |||
| 467 | if (isPacked(fld_attrs)) { | ||
| 468 | // __attribute__((packed)) on a field is a clang extension. It behaves as if #pragma | ||
| 469 | // pack(1) had been applied only to this field. See test case 0057. | ||
| 470 | fld_align_bits = BITS_PER_BYTE; | ||
| 471 | } | ||
| 472 | // __attribute__((packed)) on a field is a clang extension. It behaves as if #pragma | ||
| 473 | // pack(1) had been applied only to this field. See test case 0057. | ||
| 474 | fld_align_bits = @max(fld_align_bits, req_align); | ||
| 475 | if (fld.isRegularField()) { | ||
| 476 | return self.layoutRegularField(type_layout.size_bits, fld_align_bits); | ||
| 477 | } else { | ||
| 478 | return self.layoutBitField(type_layout.size_bits, fld_align_bits, fld.specifiedBitWidth()); | ||
| 479 | } | ||
| 480 | } | ||
| 481 | |||
| 482 | fn layoutBitField(self: *MsvcContext, ty_size_bits: u64, field_align: u32, bit_width: u32) FieldLayout { | ||
| 483 | if (bit_width == 0) { | ||
| 484 | // A zero-sized bit-field that does not follow a non-zero-sized bit-field does not affect | ||
| 485 | // the overall layout of the record. Even in a union where the order would otherwise | ||
| 486 | // not matter. See test case 0035. | ||
| 487 | if (self.ongoing_bitfield) |_| { | ||
| 488 | self.ongoing_bitfield = null; | ||
| 489 | } else { | ||
| 490 | // this field takes 0 space. | ||
| 491 | return .{ .offset_bits = self.size_bits, .size_bits = bit_width }; | ||
| 492 | } | ||
| 493 | } else { | ||
| 494 | std.debug.assert(bit_width <= ty_size_bits); | ||
| 495 | // If there is an ongoing bit-field in a struct whose underlying type has the same size and | ||
| 496 | // if there is enough space left to place this bit-field, then this bit-field is placed in | ||
| 497 | // the ongoing bit-field and the overall layout of the struct is not affected by this | ||
| 498 | // bit-field. See test case 0037. | ||
| 499 | if (!self.is_union) { | ||
| 500 | if (self.ongoing_bitfield) |*p| { | ||
| 501 | if (p.size_bits == ty_size_bits and p.unused_size_bits >= bit_width) { | ||
| 502 | const offset_bits = self.size_bits - p.unused_size_bits; | ||
| 503 | p.unused_size_bits -= bit_width; | ||
| 504 | return .{ .offset_bits = offset_bits, .size_bits = bit_width }; | ||
| 505 | } | ||
| 506 | } | ||
| 507 | } | ||
| 508 | // Otherwise this field is part of a new ongoing bit-field. | ||
| 509 | self.ongoing_bitfield = .{ .size_bits = ty_size_bits, .unused_size_bits = ty_size_bits - bit_width }; | ||
| 510 | } | ||
| 511 | const offset_bits = if (!self.is_union) bits: { | ||
| 512 | // This is the one place in the layout of a record where the pointer alignment might | ||
| 513 | // get assigned a smaller value than the field alignment. This can only happen if | ||
| 514 | // the field or the type of the field has a required alignment. Otherwise the value | ||
| 515 | // of field_alignment_bits is already bound by max_field_alignment_bits. | ||
| 516 | // See test case 0038. | ||
| 517 | const p_align = if (self.max_field_align_bits) |max_fld_align| | ||
| 518 | @min(max_fld_align, field_align) | ||
| 519 | else | ||
| 520 | field_align; | ||
| 521 | self.pointer_align_bits = @max(self.pointer_align_bits, p_align); | ||
| 522 | self.field_align_bits = @max(self.field_align_bits, field_align); | ||
| 523 | |||
| 524 | const offset_bits = std.mem.alignForward(u64, self.size_bits, field_align); | ||
| 525 | self.size_bits = if (bit_width == 0) offset_bits else offset_bits + ty_size_bits; | ||
| 526 | |||
| 527 | break :bits offset_bits; | ||
| 528 | } else bits: { | ||
| 529 | // Bit-fields do not affect the alignment of a union. See test case 0041. | ||
| 530 | self.size_bits = @max(self.size_bits, ty_size_bits); | ||
| 531 | break :bits 0; | ||
| 532 | }; | ||
| 533 | return .{ .offset_bits = offset_bits, .size_bits = bit_width }; | ||
| 534 | } | ||
| 535 | |||
| 536 | fn layoutRegularField(self: *MsvcContext, size_bits: u64, field_align: u32) FieldLayout { | ||
| 537 | self.contains_non_bitfield = true; | ||
| 538 | self.ongoing_bitfield = null; | ||
| 539 | // The alignment of the field affects both the pointer alignment and the field | ||
| 540 | // alignment of the record. See test case 0032. | ||
| 541 | self.pointer_align_bits = @max(self.pointer_align_bits, field_align); | ||
| 542 | self.field_align_bits = @max(self.field_align_bits, field_align); | ||
| 543 | const offset_bits = switch (self.is_union) { | ||
| 544 | true => 0, | ||
| 545 | false => std.mem.alignForward(u64, self.size_bits, field_align), | ||
| 546 | }; | ||
| 547 | self.size_bits = @max(self.size_bits, offset_bits + size_bits); | ||
| 548 | return .{ .offset_bits = offset_bits, .size_bits = size_bits }; | ||
| 549 | } | ||
| 550 | fn handleZeroSizedRecord(self: *MsvcContext) void { | ||
| 551 | if (self.is_union) { | ||
| 552 | // MSVC does not allow unions without fields. | ||
| 553 | // If all fields in a union have size 0, the size of the union is set to | ||
| 554 | // - its field alignment if it contains at least one non-bitfield | ||
| 555 | // - 4 bytes if it contains only bitfields | ||
| 556 | // See test case 0025. | ||
| 557 | if (self.contains_non_bitfield) { | ||
| 558 | self.size_bits = self.field_align_bits; | ||
| 559 | } else { | ||
| 560 | self.size_bits = 4 * BITS_PER_BYTE; | ||
| 561 | } | ||
| 562 | } else { | ||
| 563 | // If all fields in a struct have size 0, its size is set to its required alignment | ||
| 564 | // but at least to 4 bytes. See test case 0026. | ||
| 565 | self.size_bits = @max(self.req_align_bits, 4 * BITS_PER_BYTE); | ||
| 566 | self.pointer_align_bits = @intCast(@min(self.pointer_align_bits, self.size_bits)); | ||
| 567 | } | ||
| 568 | } | ||
| 569 | }; | ||
| 570 | |||
| 571 | pub fn compute(rec: *Type.Record, ty: Type, comp: *const Compilation, pragma_pack: ?u8) void { | ||
| 572 | switch (comp.langopts.emulate) { | ||
| 573 | .gcc, .clang => { | ||
| 574 | var context = SysVContext.init(ty, comp, pragma_pack); | ||
| 575 | |||
| 576 | context.layoutFields(rec); | ||
| 577 | |||
| 578 | context.size_bits = std.mem.alignForward(u64, context.size_bits, context.aligned_bits); | ||
| 579 | |||
| 580 | rec.type_layout = .{ | ||
| 581 | .size_bits = context.size_bits, | ||
| 582 | .field_alignment_bits = context.aligned_bits, | ||
| 583 | .pointer_alignment_bits = context.aligned_bits, | ||
| 584 | .required_alignment_bits = BITS_PER_BYTE, | ||
| 585 | }; | ||
| 586 | }, | ||
| 587 | .msvc => { | ||
| 588 | var context = MsvcContext.init(ty, comp, pragma_pack); | ||
| 589 | for (rec.fields, 0..) |*fld, fld_indx| { | ||
| 590 | var field_attrs: ?[]const Attribute = null; | ||
| 591 | if (rec.field_attributes) |attrs| { | ||
| 592 | field_attrs = attrs[fld_indx]; | ||
| 593 | } | ||
| 594 | |||
| 595 | fld.layout = context.layoutField(fld, field_attrs); | ||
| 596 | } | ||
| 597 | if (context.size_bits == 0) { | ||
| 598 | // As an extension, MSVC allows records that only contain zero-sized bitfields and empty | ||
| 599 | // arrays. Such records would be zero-sized but this case is handled here separately to | ||
| 600 | // ensure that there are no zero-sized records. | ||
| 601 | context.handleZeroSizedRecord(); | ||
| 602 | } | ||
| 603 | context.size_bits = std.mem.alignForward(u64, context.size_bits, context.pointer_align_bits); | ||
| 604 | rec.type_layout = .{ | ||
| 605 | .size_bits = context.size_bits, | ||
| 606 | .field_alignment_bits = context.field_align_bits, | ||
| 607 | .pointer_alignment_bits = context.pointer_align_bits, | ||
| 608 | .required_alignment_bits = context.req_align_bits, | ||
| 609 | }; | ||
| 610 | }, | ||
| 611 | } | ||
| 612 | } | ||
| 613 | |||
| 614 | fn computeLayout(ty: Type, comp: *const Compilation) TypeLayout { | ||
| 615 | if (ty.getRecord()) |rec| { | ||
| 616 | const requested = BITS_PER_BYTE * (ty.requestedAlignment(comp) orelse 0); | ||
| 617 | return .{ | ||
| 618 | .size_bits = rec.type_layout.size_bits, | ||
| 619 | .pointer_alignment_bits = @max(requested, rec.type_layout.pointer_alignment_bits), | ||
| 620 | .field_alignment_bits = @max(requested, rec.type_layout.field_alignment_bits), | ||
| 621 | .required_alignment_bits = rec.type_layout.required_alignment_bits, | ||
| 622 | }; | ||
| 623 | } else { | ||
| 624 | const type_align = ty.alignof(comp) * BITS_PER_BYTE; | ||
| 625 | return .{ | ||
| 626 | .size_bits = ty.bitSizeof(comp) orelse 0, | ||
| 627 | .pointer_alignment_bits = type_align, | ||
| 628 | .field_alignment_bits = type_align, | ||
| 629 | .required_alignment_bits = BITS_PER_BYTE, | ||
| 630 | }; | ||
| 631 | } | ||
| 632 | } | ||
| 633 | |||
| 634 | fn isPacked(attrs: ?[]const Attribute) bool { | ||
| 635 | const a = attrs orelse return false; | ||
| 636 | |||
| 637 | for (a) |attribute| { | ||
| 638 | if (attribute.tag != .@"packed") continue; | ||
| 639 | return true; | ||
| 640 | } | ||
| 641 | return false; | ||
| 642 | } | ||
| 643 | |||
| 644 | // The effect of #pragma pack(N) depends on the target. | ||
| 645 | // | ||
| 646 | // x86: By default, there is no maximum field alignment. N={1,2,4} set the maximum field | ||
| 647 | // alignment to that value. All other N activate the default. | ||
| 648 | // x64: By default, there is no maximum field alignment. N={1,2,4,8} set the maximum field | ||
| 649 | // alignment to that value. All other N activate the default. | ||
| 650 | // arm: By default, the maximum field alignment is 8. N={1,2,4,8,16} set the maximum field | ||
| 651 | // alignment to that value. All other N activate the default. | ||
| 652 | // arm64: By default, the maximum field alignment is 8. N={1,2,4,8} set the maximum field | ||
| 653 | // alignment to that value. N=16 disables the maximum field alignment. All other N | ||
| 654 | // activate the default. | ||
| 655 | // | ||
| 656 | // See test case 0020. | ||
| 657 | pub fn msvcPragmaPack(comp: *const Compilation, pack: u32) ?u32 { | ||
| 658 | return switch (pack) { | ||
| 659 | 8, 16, 32 => pack, | ||
| 660 | 64 => if (comp.target.cpu.arch == .x86) null else pack, | ||
| 661 | 128 => if (comp.target.cpu.arch == .thumb) pack else null, | ||
| 662 | else => { | ||
| 663 | return switch (comp.target.cpu.arch) { | ||
| 664 | .thumb, .aarch64 => 64, | ||
| 665 | else => null, | ||
| 666 | }; | ||
| 667 | }, | ||
| 668 | }; | ||
| 669 | } | ||
deps/aro/target.zig deleted-811| ... | @@ -1,811 +0,0 @@ | ||
| 1 | const std = @import("std"); | ||
| 2 | const LangOpts = @import("LangOpts.zig"); | ||
| 3 | const Type = @import("Type.zig"); | ||
| 4 | const llvm = @import("zig").codegen.llvm; | ||
| 5 | const TargetSet = @import("Builtins/Properties.zig").TargetSet; | ||
| 6 | |||
| 7 | /// intmax_t for this target | ||
| 8 | pub fn intMaxType(target: std.Target) Type { | ||
| 9 | switch (target.cpu.arch) { | ||
| 10 | .aarch64, | ||
| 11 | .aarch64_be, | ||
| 12 | .sparc64, | ||
| 13 | => if (target.os.tag != .openbsd) return .{ .specifier = .long }, | ||
| 14 | |||
| 15 | .bpfel, | ||
| 16 | .bpfeb, | ||
| 17 | .loongarch64, | ||
| 18 | .riscv64, | ||
| 19 | .powerpc64, | ||
| 20 | .powerpc64le, | ||
| 21 | .tce, | ||
| 22 | .tcele, | ||
| 23 | .ve, | ||
| 24 | => return .{ .specifier = .long }, | ||
| 25 | |||
| 26 | .x86_64 => switch (target.os.tag) { | ||
| 27 | .windows, .openbsd => {}, | ||
| 28 | else => switch (target.abi) { | ||
| 29 | .gnux32, .muslx32 => {}, | ||
| 30 | else => return .{ .specifier = .long }, | ||
| 31 | }, | ||
| 32 | }, | ||
| 33 | |||
| 34 | else => {}, | ||
| 35 | } | ||
| 36 | return .{ .specifier = .long_long }; | ||
| 37 | } | ||
| 38 | |||
| 39 | /// intptr_t for this target | ||
| 40 | pub fn intPtrType(target: std.Target) Type { | ||
| 41 | switch (target.os.tag) { | ||
| 42 | .haiku => return .{ .specifier = .long }, | ||
| 43 | .nacl => return .{ .specifier = .int }, | ||
| 44 | else => {}, | ||
| 45 | } | ||
| 46 | |||
| 47 | switch (target.cpu.arch) { | ||
| 48 | .aarch64, .aarch64_be => switch (target.os.tag) { | ||
| 49 | .windows => return .{ .specifier = .long_long }, | ||
| 50 | else => {}, | ||
| 51 | }, | ||
| 52 | |||
| 53 | .msp430, | ||
| 54 | .csky, | ||
| 55 | .loongarch32, | ||
| 56 | .riscv32, | ||
| 57 | .xcore, | ||
| 58 | .hexagon, | ||
| 59 | .tce, | ||
| 60 | .tcele, | ||
| 61 | .m68k, | ||
| 62 | .spir, | ||
| 63 | .spirv32, | ||
| 64 | .arc, | ||
| 65 | .avr, | ||
| 66 | => return .{ .specifier = .int }, | ||
| 67 | |||
| 68 | .sparc, .sparcel => switch (target.os.tag) { | ||
| 69 | .netbsd, .openbsd => {}, | ||
| 70 | else => return .{ .specifier = .int }, | ||
| 71 | }, | ||
| 72 | |||
| 73 | .powerpc, .powerpcle => switch (target.os.tag) { | ||
| 74 | .linux, .freebsd, .netbsd => return .{ .specifier = .int }, | ||
| 75 | else => {}, | ||
| 76 | }, | ||
| 77 | |||
| 78 | // 32-bit x86 Darwin, OpenBSD, and RTEMS use long (the default); others use int | ||
| 79 | .x86 => switch (target.os.tag) { | ||
| 80 | .openbsd, .rtems => {}, | ||
| 81 | else => if (!target.os.tag.isDarwin()) return .{ .specifier = .int }, | ||
| 82 | }, | ||
| 83 | |||
| 84 | .x86_64 => switch (target.os.tag) { | ||
| 85 | .windows => return .{ .specifier = .long_long }, | ||
| 86 | else => switch (target.abi) { | ||
| 87 | .gnux32, .muslx32 => return .{ .specifier = .int }, | ||
| 88 | else => {}, | ||
| 89 | }, | ||
| 90 | }, | ||
| 91 | |||
| 92 | else => {}, | ||
| 93 | } | ||
| 94 | |||
| 95 | return .{ .specifier = .long }; | ||
| 96 | } | ||
| 97 | |||
| 98 | /// int16_t for this target | ||
| 99 | pub fn int16Type(target: std.Target) Type { | ||
| 100 | return switch (target.cpu.arch) { | ||
| 101 | .avr => .{ .specifier = .int }, | ||
| 102 | else => .{ .specifier = .short }, | ||
| 103 | }; | ||
| 104 | } | ||
| 105 | |||
| 106 | /// int64_t for this target | ||
| 107 | pub fn int64Type(target: std.Target) Type { | ||
| 108 | switch (target.cpu.arch) { | ||
| 109 | .loongarch64, | ||
| 110 | .ve, | ||
| 111 | .riscv64, | ||
| 112 | .powerpc64, | ||
| 113 | .powerpc64le, | ||
| 114 | .bpfel, | ||
| 115 | .bpfeb, | ||
| 116 | => return .{ .specifier = .long }, | ||
| 117 | |||
| 118 | .sparc64 => return intMaxType(target), | ||
| 119 | |||
| 120 | .x86, .x86_64 => if (!target.isDarwin()) return intMaxType(target), | ||
| 121 | .aarch64, .aarch64_be => if (!target.isDarwin() and target.os.tag != .openbsd and target.os.tag != .windows) return .{ .specifier = .long }, | ||
| 122 | else => {}, | ||
| 123 | } | ||
| 124 | return .{ .specifier = .long_long }; | ||
| 125 | } | ||
| 126 | |||
| 127 | /// This function returns 1 if function alignment is not observable or settable. | ||
| 128 | pub fn defaultFunctionAlignment(target: std.Target) u8 { | ||
| 129 | return switch (target.cpu.arch) { | ||
| 130 | .arm, .armeb => 4, | ||
| 131 | .aarch64, .aarch64_32, .aarch64_be => 4, | ||
| 132 | .sparc, .sparcel, .sparc64 => 4, | ||
| 133 | .riscv64 => 2, | ||
| 134 | else => 1, | ||
| 135 | }; | ||
| 136 | } | ||
| 137 | |||
| 138 | pub fn isTlsSupported(target: std.Target) bool { | ||
| 139 | if (target.isDarwin()) { | ||
| 140 | var supported = false; | ||
| 141 | switch (target.os.tag) { | ||
| 142 | .macos => supported = !(target.os.isAtLeast(.macos, .{ .major = 10, .minor = 7, .patch = 0 }) orelse false), | ||
| 143 | else => {}, | ||
| 144 | } | ||
| 145 | return supported; | ||
| 146 | } | ||
| 147 | return switch (target.cpu.arch) { | ||
| 148 | .tce, .tcele, .bpfel, .bpfeb, .msp430, .nvptx, .nvptx64, .x86, .arm, .armeb, .thumb, .thumbeb => false, | ||
| 149 | else => true, | ||
| 150 | }; | ||
| 151 | } | ||
| 152 | |||
| 153 | pub fn ignoreNonZeroSizedBitfieldTypeAlignment(target: std.Target) bool { | ||
| 154 | switch (target.cpu.arch) { | ||
| 155 | .avr => return true, | ||
| 156 | .arm => { | ||
| 157 | if (std.Target.arm.featureSetHas(target.cpu.features, .has_v7)) { | ||
| 158 | switch (target.os.tag) { | ||
| 159 | .ios => return true, | ||
| 160 | else => return false, | ||
| 161 | } | ||
| 162 | } | ||
| 163 | }, | ||
| 164 | else => return false, | ||
| 165 | } | ||
| 166 | return false; | ||
| 167 | } | ||
| 168 | |||
| 169 | pub fn ignoreZeroSizedBitfieldTypeAlignment(target: std.Target) bool { | ||
| 170 | switch (target.cpu.arch) { | ||
| 171 | .avr => return true, | ||
| 172 | else => return false, | ||
| 173 | } | ||
| 174 | } | ||
| 175 | |||
| 176 | pub fn minZeroWidthBitfieldAlignment(target: std.Target) ?u29 { | ||
| 177 | switch (target.cpu.arch) { | ||
| 178 | .avr => return 8, | ||
| 179 | .arm => { | ||
| 180 | if (std.Target.arm.featureSetHas(target.cpu.features, .has_v7)) { | ||
| 181 | switch (target.os.tag) { | ||
| 182 | .ios => return 32, | ||
| 183 | else => return null, | ||
| 184 | } | ||
| 185 | } else return null; | ||
| 186 | }, | ||
| 187 | else => return null, | ||
| 188 | } | ||
| 189 | } | ||
| 190 | |||
| 191 | pub fn unnamedFieldAffectsAlignment(target: std.Target) bool { | ||
| 192 | switch (target.cpu.arch) { | ||
| 193 | .aarch64 => { | ||
| 194 | if (target.isDarwin() or target.os.tag == .windows) return false; | ||
| 195 | return true; | ||
| 196 | }, | ||
| 197 | .armeb => { | ||
| 198 | if (std.Target.arm.featureSetHas(target.cpu.features, .has_v7)) { | ||
| 199 | if (std.Target.Abi.default(target.cpu.arch, target.os) == .eabi) return true; | ||
| 200 | } | ||
| 201 | }, | ||
| 202 | .arm => return true, | ||
| 203 | .avr => return true, | ||
| 204 | .thumb => { | ||
| 205 | if (target.os.tag == .windows) return false; | ||
| 206 | return true; | ||
| 207 | }, | ||
| 208 | else => return false, | ||
| 209 | } | ||
| 210 | return false; | ||
| 211 | } | ||
| 212 | |||
| 213 | pub fn packAllEnums(target: std.Target) bool { | ||
| 214 | return switch (target.cpu.arch) { | ||
| 215 | .hexagon => true, | ||
| 216 | else => false, | ||
| 217 | }; | ||
| 218 | } | ||
| 219 | |||
| 220 | /// Default alignment (in bytes) for __attribute__((aligned)) when no alignment is specified | ||
| 221 | pub fn defaultAlignment(target: std.Target) u29 { | ||
| 222 | switch (target.cpu.arch) { | ||
| 223 | .avr => return 1, | ||
| 224 | .arm => if (target.isAndroid() or target.os.tag == .ios) return 16 else return 8, | ||
| 225 | .sparc => if (std.Target.sparc.featureSetHas(target.cpu.features, .v9)) return 16 else return 8, | ||
| 226 | .mips, .mipsel => switch (target.abi) { | ||
| 227 | .none, .gnuabi64 => return 16, | ||
| 228 | else => return 8, | ||
| 229 | }, | ||
| 230 | .s390x, .armeb, .thumbeb, .thumb => return 8, | ||
| 231 | else => return 16, | ||
| 232 | } | ||
| 233 | } | ||
| 234 | pub fn systemCompiler(target: std.Target) LangOpts.Compiler { | ||
| 235 | // Android is linux but not gcc, so these checks go first | ||
| 236 | // the rest for documentation as fn returns .clang | ||
| 237 | if (target.isDarwin() or | ||
| 238 | target.isAndroid() or | ||
| 239 | target.isBSD() or | ||
| 240 | target.os.tag == .fuchsia or | ||
| 241 | target.os.tag == .solaris or | ||
| 242 | target.os.tag == .haiku or | ||
| 243 | target.cpu.arch == .hexagon) | ||
| 244 | { | ||
| 245 | return .clang; | ||
| 246 | } | ||
| 247 | if (target.os.tag == .uefi) return .msvc; | ||
| 248 | // this is before windows to grab WindowsGnu | ||
| 249 | if (target.abi.isGnu() or | ||
| 250 | target.os.tag == .linux) | ||
| 251 | { | ||
| 252 | return .gcc; | ||
| 253 | } | ||
| 254 | if (target.os.tag == .windows) { | ||
| 255 | return .msvc; | ||
| 256 | } | ||
| 257 | if (target.cpu.arch == .avr) return .gcc; | ||
| 258 | return .clang; | ||
| 259 | } | ||
| 260 | |||
| 261 | pub fn hasInt128(target: std.Target) bool { | ||
| 262 | if (target.cpu.arch == .wasm32) return true; | ||
| 263 | if (target.cpu.arch == .x86_64) return true; | ||
| 264 | return target.ptrBitWidth() >= 64; | ||
| 265 | } | ||
| 266 | |||
| 267 | pub fn hasHalfPrecisionFloatABI(target: std.Target) bool { | ||
| 268 | return switch (target.cpu.arch) { | ||
| 269 | .thumb, .thumbeb, .arm, .aarch64 => true, | ||
| 270 | else => false, | ||
| 271 | }; | ||
| 272 | } | ||
| 273 | |||
| 274 | pub const FPSemantics = enum { | ||
| 275 | None, | ||
| 276 | IEEEHalf, | ||
| 277 | BFloat, | ||
| 278 | IEEESingle, | ||
| 279 | IEEEDouble, | ||
| 280 | IEEEQuad, | ||
| 281 | /// Minifloat 5-bit exponent 2-bit mantissa | ||
| 282 | E5M2, | ||
| 283 | /// Minifloat 4-bit exponent 3-bit mantissa | ||
| 284 | E4M3, | ||
| 285 | x87ExtendedDouble, | ||
| 286 | IBMExtendedDouble, | ||
| 287 | |||
| 288 | /// Only intended for generating float.h macros for the preprocessor | ||
| 289 | pub fn forType(ty: std.Target.CType, target: std.Target) FPSemantics { | ||
| 290 | std.debug.assert(ty == .float or ty == .double or ty == .longdouble); | ||
| 291 | return switch (target.c_type_bit_size(ty)) { | ||
| 292 | 32 => .IEEESingle, | ||
| 293 | 64 => .IEEEDouble, | ||
| 294 | 80 => .x87ExtendedDouble, | ||
| 295 | 128 => switch (target.cpu.arch) { | ||
| 296 | .powerpc, .powerpcle, .powerpc64, .powerpc64le => .IBMExtendedDouble, | ||
| 297 | else => .IEEEQuad, | ||
| 298 | }, | ||
| 299 | else => unreachable, | ||
| 300 | }; | ||
| 301 | } | ||
| 302 | |||
| 303 | pub fn halfPrecisionType(target: std.Target) ?FPSemantics { | ||
| 304 | switch (target.cpu.arch) { | ||
| 305 | .aarch64, | ||
| 306 | .aarch64_32, | ||
| 307 | .aarch64_be, | ||
| 308 | .arm, | ||
| 309 | .armeb, | ||
| 310 | .hexagon, | ||
| 311 | .riscv32, | ||
| 312 | .riscv64, | ||
| 313 | .spirv32, | ||
| 314 | .spirv64, | ||
| 315 | => return .IEEEHalf, | ||
| 316 | .x86, .x86_64 => if (std.Target.x86.featureSetHas(target.cpu.features, .sse2)) return .IEEEHalf, | ||
| 317 | else => {}, | ||
| 318 | } | ||
| 319 | return null; | ||
| 320 | } | ||
| 321 | |||
| 322 | pub fn chooseValue(self: FPSemantics, comptime T: type, values: [6]T) T { | ||
| 323 | return switch (self) { | ||
| 324 | .IEEEHalf => values[0], | ||
| 325 | .IEEESingle => values[1], | ||
| 326 | .IEEEDouble => values[2], | ||
| 327 | .x87ExtendedDouble => values[3], | ||
| 328 | .IBMExtendedDouble => values[4], | ||
| 329 | .IEEEQuad => values[5], | ||
| 330 | else => unreachable, | ||
| 331 | }; | ||
| 332 | } | ||
| 333 | }; | ||
| 334 | |||
| 335 | pub fn isLP64(target: std.Target) bool { | ||
| 336 | return target.c_type_bit_size(.int) == 32 and target.ptrBitWidth() == 64; | ||
| 337 | } | ||
| 338 | |||
| 339 | pub fn isKnownWindowsMSVCEnvironment(target: std.Target) bool { | ||
| 340 | return target.os.tag == .windows and target.abi == .msvc; | ||
| 341 | } | ||
| 342 | |||
| 343 | pub fn isWindowsMSVCEnvironment(target: std.Target) bool { | ||
| 344 | return target.os.tag == .windows and (target.abi == .msvc or target.abi == .none); | ||
| 345 | } | ||
| 346 | |||
| 347 | pub fn isCygwinMinGW(target: std.Target) bool { | ||
| 348 | return target.os.tag == .windows and (target.abi == .gnu or target.abi == .cygnus); | ||
| 349 | } | ||
| 350 | |||
| 351 | pub fn builtinEnabled(target: std.Target, enabled_for: TargetSet) bool { | ||
| 352 | var it = enabled_for.iterator(); | ||
| 353 | while (it.next()) |val| { | ||
| 354 | switch (val) { | ||
| 355 | .basic => return true, | ||
| 356 | .x86_64 => if (target.cpu.arch == .x86_64) return true, | ||
| 357 | .aarch64 => if (target.cpu.arch == .aarch64) return true, | ||
| 358 | .arm => if (target.cpu.arch == .arm) return true, | ||
| 359 | .ppc => switch (target.cpu.arch) { | ||
| 360 | .powerpc, .powerpc64, .powerpc64le => return true, | ||
| 361 | else => {}, | ||
| 362 | }, | ||
| 363 | else => { | ||
| 364 | // Todo: handle other target predicates | ||
| 365 | }, | ||
| 366 | } | ||
| 367 | } | ||
| 368 | return false; | ||
| 369 | } | ||
| 370 | |||
| 371 | pub fn defaultFpEvalMethod(target: std.Target) LangOpts.FPEvalMethod { | ||
| 372 | if (target.os.tag == .aix) return .double; | ||
| 373 | switch (target.cpu.arch) { | ||
| 374 | .x86, .x86_64 => { | ||
| 375 | if (target.ptrBitWidth() == 32 and target.os.tag == .netbsd) { | ||
| 376 | if (target.os.version_range.semver.min.order(.{ .major = 6, .minor = 99, .patch = 26 }) != .gt) { | ||
| 377 | // NETBSD <= 6.99.26 on 32-bit x86 defaults to double | ||
| 378 | return .double; | ||
| 379 | } | ||
| 380 | } | ||
| 381 | if (std.Target.x86.featureSetHas(target.cpu.features, .sse)) { | ||
| 382 | return .source; | ||
| 383 | } | ||
| 384 | return .extended; | ||
| 385 | }, | ||
| 386 | else => {}, | ||
| 387 | } | ||
| 388 | return .source; | ||
| 389 | } | ||
| 390 | |||
| 391 | /// Value of the `-m` flag for `ld` for this target | ||
| 392 | pub fn ldEmulationOption(target: std.Target, arm_endianness: ?std.builtin.Endian) ?[]const u8 { | ||
| 393 | return switch (target.cpu.arch) { | ||
| 394 | .x86 => if (target.os.tag == .elfiamcu) "elf_iamcu" else "elf_i386", | ||
| 395 | .arm, | ||
| 396 | .armeb, | ||
| 397 | .thumb, | ||
| 398 | .thumbeb, | ||
| 399 | => switch (arm_endianness orelse target.cpu.arch.endian()) { | ||
| 400 | .little => "armelf_linux_eabi", | ||
| 401 | .big => "armelfb_linux_eabi", | ||
| 402 | }, | ||
| 403 | .aarch64 => "aarch64linux", | ||
| 404 | .aarch64_be => "aarch64linuxb", | ||
| 405 | .m68k => "m68kelf", | ||
| 406 | .powerpc => if (target.os.tag == .linux) "elf32ppclinux" else "elf32ppc", | ||
| 407 | .powerpcle => if (target.os.tag == .linux) "elf32lppclinux" else "elf32lppc", | ||
| 408 | .powerpc64 => "elf64ppc", | ||
| 409 | .powerpc64le => "elf64lppc", | ||
| 410 | .riscv32 => "elf32lriscv", | ||
| 411 | .riscv64 => "elf64lriscv", | ||
| 412 | .sparc, .sparcel => "elf32_sparc", | ||
| 413 | .sparc64 => "elf64_sparc", | ||
| 414 | .loongarch32 => "elf32loongarch", | ||
| 415 | .loongarch64 => "elf64loongarch", | ||
| 416 | .mips => "elf32btsmip", | ||
| 417 | .mipsel => "elf32ltsmip", | ||
| 418 | .mips64 => if (target.abi == .gnuabin32) "elf32btsmipn32" else "elf64btsmip", | ||
| 419 | .mips64el => if (target.abi == .gnuabin32) "elf32ltsmipn32" else "elf64ltsmip", | ||
| 420 | .x86_64 => if (target.abi == .gnux32 or target.abi == .muslx32) "elf32_x86_64" else "elf_x86_64", | ||
| 421 | .ve => "elf64ve", | ||
| 422 | .csky => "cskyelf_linux", | ||
| 423 | else => null, | ||
| 424 | }; | ||
| 425 | } | ||
| 426 | |||
| 427 | pub fn get32BitArchVariant(target: std.Target) ?std.Target { | ||
| 428 | var copy = target; | ||
| 429 | switch (target.cpu.arch) { | ||
| 430 | .amdgcn, | ||
| 431 | .avr, | ||
| 432 | .msp430, | ||
| 433 | .spu_2, | ||
| 434 | .ve, | ||
| 435 | .bpfel, | ||
| 436 | .bpfeb, | ||
| 437 | .s390x, | ||
| 438 | => return null, | ||
| 439 | |||
| 440 | .arc, | ||
| 441 | .arm, | ||
| 442 | .armeb, | ||
| 443 | .csky, | ||
| 444 | .hexagon, | ||
| 445 | .m68k, | ||
| 446 | .le32, | ||
| 447 | .mips, | ||
| 448 | .mipsel, | ||
| 449 | .powerpc, | ||
| 450 | .powerpcle, | ||
| 451 | .r600, | ||
| 452 | .riscv32, | ||
| 453 | .sparc, | ||
| 454 | .sparcel, | ||
| 455 | .tce, | ||
| 456 | .tcele, | ||
| 457 | .thumb, | ||
| 458 | .thumbeb, | ||
| 459 | .x86, | ||
| 460 | .xcore, | ||
| 461 | .nvptx, | ||
| 462 | .amdil, | ||
| 463 | .hsail, | ||
| 464 | .spir, | ||
| 465 | .kalimba, | ||
| 466 | .shave, | ||
| 467 | .lanai, | ||
| 468 | .wasm32, | ||
| 469 | .renderscript32, | ||
| 470 | .aarch64_32, | ||
| 471 | .spirv32, | ||
| 472 | .loongarch32, | ||
| 473 | .dxil, | ||
| 474 | .xtensa, | ||
| 475 | => {}, // Already 32 bit | ||
| 476 | |||
| 477 | .aarch64 => copy.cpu.arch = .arm, | ||
| 478 | .aarch64_be => copy.cpu.arch = .armeb, | ||
| 479 | .le64 => copy.cpu.arch = .le32, | ||
| 480 | .amdil64 => copy.cpu.arch = .amdil, | ||
| 481 | .nvptx64 => copy.cpu.arch = .nvptx, | ||
| 482 | .wasm64 => copy.cpu.arch = .wasm32, | ||
| 483 | .hsail64 => copy.cpu.arch = .hsail, | ||
| 484 | .spir64 => copy.cpu.arch = .spir, | ||
| 485 | .spirv64 => copy.cpu.arch = .spirv32, | ||
| 486 | .renderscript64 => copy.cpu.arch = .renderscript32, | ||
| 487 | .loongarch64 => copy.cpu.arch = .loongarch32, | ||
| 488 | .mips64 => copy.cpu.arch = .mips, | ||
| 489 | .mips64el => copy.cpu.arch = .mipsel, | ||
| 490 | .powerpc64 => copy.cpu.arch = .powerpc, | ||
| 491 | .powerpc64le => copy.cpu.arch = .powerpcle, | ||
| 492 | .riscv64 => copy.cpu.arch = .riscv32, | ||
| 493 | .sparc64 => copy.cpu.arch = .sparc, | ||
| 494 | .x86_64 => copy.cpu.arch = .x86, | ||
| 495 | } | ||
| 496 | return copy; | ||
| 497 | } | ||
| 498 | |||
| 499 | pub fn get64BitArchVariant(target: std.Target) ?std.Target { | ||
| 500 | var copy = target; | ||
| 501 | switch (target.cpu.arch) { | ||
| 502 | .arc, | ||
| 503 | .avr, | ||
| 504 | .csky, | ||
| 505 | .dxil, | ||
| 506 | .hexagon, | ||
| 507 | .kalimba, | ||
| 508 | .lanai, | ||
| 509 | .m68k, | ||
| 510 | .msp430, | ||
| 511 | .r600, | ||
| 512 | .shave, | ||
| 513 | .sparcel, | ||
| 514 | .spu_2, | ||
| 515 | .tce, | ||
| 516 | .tcele, | ||
| 517 | .xcore, | ||
| 518 | .xtensa, | ||
| 519 | => return null, | ||
| 520 | |||
| 521 | .aarch64, | ||
| 522 | .aarch64_be, | ||
| 523 | .amdgcn, | ||
| 524 | .bpfeb, | ||
| 525 | .bpfel, | ||
| 526 | .le64, | ||
| 527 | .amdil64, | ||
| 528 | .nvptx64, | ||
| 529 | .wasm64, | ||
| 530 | .hsail64, | ||
| 531 | .spir64, | ||
| 532 | .spirv64, | ||
| 533 | .renderscript64, | ||
| 534 | .loongarch64, | ||
| 535 | .mips64, | ||
| 536 | .mips64el, | ||
| 537 | .powerpc64, | ||
| 538 | .powerpc64le, | ||
| 539 | .riscv64, | ||
| 540 | .s390x, | ||
| 541 | .sparc64, | ||
| 542 | .ve, | ||
| 543 | .x86_64, | ||
| 544 | => {}, // Already 64 bit | ||
| 545 | |||
| 546 | .aarch64_32 => copy.cpu.arch = .aarch64, | ||
| 547 | .amdil => copy.cpu.arch = .amdil64, | ||
| 548 | .arm => copy.cpu.arch = .aarch64, | ||
| 549 | .armeb => copy.cpu.arch = .aarch64_be, | ||
| 550 | .hsail => copy.cpu.arch = .hsail64, | ||
| 551 | .le32 => copy.cpu.arch = .le64, | ||
| 552 | .loongarch32 => copy.cpu.arch = .loongarch64, | ||
| 553 | .mips => copy.cpu.arch = .mips64, | ||
| 554 | .mipsel => copy.cpu.arch = .mips64el, | ||
| 555 | .nvptx => copy.cpu.arch = .nvptx64, | ||
| 556 | .powerpc => copy.cpu.arch = .powerpc64, | ||
| 557 | .powerpcle => copy.cpu.arch = .powerpc64le, | ||
| 558 | .renderscript32 => copy.cpu.arch = .renderscript64, | ||
| 559 | .riscv32 => copy.cpu.arch = .riscv64, | ||
| 560 | .sparc => copy.cpu.arch = .sparc64, | ||
| 561 | .spir => copy.cpu.arch = .spir64, | ||
| 562 | .spirv32 => copy.cpu.arch = .spirv64, | ||
| 563 | .thumb => copy.cpu.arch = .aarch64, | ||
| 564 | .thumbeb => copy.cpu.arch = .aarch64_be, | ||
| 565 | .wasm32 => copy.cpu.arch = .wasm64, | ||
| 566 | .x86 => copy.cpu.arch = .x86_64, | ||
| 567 | } | ||
| 568 | return copy; | ||
| 569 | } | ||
| 570 | |||
| 571 | /// Adapted from Zig's src/codegen/llvm.zig | ||
| 572 | pub fn toLLVMTriple(target: std.Target, buf: []u8) []const u8 { | ||
| 573 | // 64 bytes is assumed to be large enough to hold any target triple; increase if necessary | ||
| 574 | std.debug.assert(buf.len >= 64); | ||
| 575 | |||
| 576 | var stream = std.io.fixedBufferStream(buf); | ||
| 577 | const writer = stream.writer(); | ||
| 578 | |||
| 579 | const llvm_arch = switch (target.cpu.arch) { | ||
| 580 | .arm => "arm", | ||
| 581 | .armeb => "armeb", | ||
| 582 | .aarch64 => "aarch64", | ||
| 583 | .aarch64_be => "aarch64_be", | ||
| 584 | .aarch64_32 => "aarch64_32", | ||
| 585 | .arc => "arc", | ||
| 586 | .avr => "avr", | ||
| 587 | .bpfel => "bpfel", | ||
| 588 | .bpfeb => "bpfeb", | ||
| 589 | .csky => "csky", | ||
| 590 | .dxil => "dxil", | ||
| 591 | .hexagon => "hexagon", | ||
| 592 | .loongarch32 => "loongarch32", | ||
| 593 | .loongarch64 => "loongarch64", | ||
| 594 | .m68k => "m68k", | ||
| 595 | .mips => "mips", | ||
| 596 | .mipsel => "mipsel", | ||
| 597 | .mips64 => "mips64", | ||
| 598 | .mips64el => "mips64el", | ||
| 599 | .msp430 => "msp430", | ||
| 600 | .powerpc => "powerpc", | ||
| 601 | .powerpcle => "powerpcle", | ||
| 602 | .powerpc64 => "powerpc64", | ||
| 603 | .powerpc64le => "powerpc64le", | ||
| 604 | .r600 => "r600", | ||
| 605 | .amdgcn => "amdgcn", | ||
| 606 | .riscv32 => "riscv32", | ||
| 607 | .riscv64 => "riscv64", | ||
| 608 | .sparc => "sparc", | ||
| 609 | .sparc64 => "sparc64", | ||
| 610 | .sparcel => "sparcel", | ||
| 611 | .s390x => "s390x", | ||
| 612 | .tce => "tce", | ||
| 613 | .tcele => "tcele", | ||
| 614 | .thumb => "thumb", | ||
| 615 | .thumbeb => "thumbeb", | ||
| 616 | .x86 => "i386", | ||
| 617 | .x86_64 => "x86_64", | ||
| 618 | .xcore => "xcore", | ||
| 619 | .xtensa => "xtensa", | ||
| 620 | .nvptx => "nvptx", | ||
| 621 | .nvptx64 => "nvptx64", | ||
| 622 | .le32 => "le32", | ||
| 623 | .le64 => "le64", | ||
| 624 | .amdil => "amdil", | ||
| 625 | .amdil64 => "amdil64", | ||
| 626 | .hsail => "hsail", | ||
| 627 | .hsail64 => "hsail64", | ||
| 628 | .spir => "spir", | ||
| 629 | .spir64 => "spir64", | ||
| 630 | .spirv32 => "spirv32", | ||
| 631 | .spirv64 => "spirv64", | ||
| 632 | .kalimba => "kalimba", | ||
| 633 | .shave => "shave", | ||
| 634 | .lanai => "lanai", | ||
| 635 | .wasm32 => "wasm32", | ||
| 636 | .wasm64 => "wasm64", | ||
| 637 | .renderscript32 => "renderscript32", | ||
| 638 | .renderscript64 => "renderscript64", | ||
| 639 | .ve => "ve", | ||
| 640 | // Note: spu_2 is not supported in LLVM; this is the Zig arch name | ||
| 641 | .spu_2 => "spu_2", | ||
| 642 | }; | ||
| 643 | writer.writeAll(llvm_arch) catch unreachable; | ||
| 644 | writer.writeByte('-') catch unreachable; | ||
| 645 | |||
| 646 | const llvm_os = switch (target.os.tag) { | ||
| 647 | .freestanding => "unknown", | ||
| 648 | .ananas => "ananas", | ||
| 649 | .cloudabi => "cloudabi", | ||
| 650 | .dragonfly => "dragonfly", | ||
| 651 | .freebsd => "freebsd", | ||
| 652 | .fuchsia => "fuchsia", | ||
| 653 | .kfreebsd => "kfreebsd", | ||
| 654 | .linux => "linux", | ||
| 655 | .lv2 => "lv2", | ||
| 656 | .netbsd => "netbsd", | ||
| 657 | .openbsd => "openbsd", | ||
| 658 | .solaris => "solaris", | ||
| 659 | .illumos => "illumos", | ||
| 660 | .windows => "windows", | ||
| 661 | .zos => "zos", | ||
| 662 | .haiku => "haiku", | ||
| 663 | .minix => "minix", | ||
| 664 | .rtems => "rtems", | ||
| 665 | .nacl => "nacl", | ||
| 666 | .aix => "aix", | ||
| 667 | .cuda => "cuda", | ||
| 668 | .nvcl => "nvcl", | ||
| 669 | .amdhsa => "amdhsa", | ||
| 670 | .ps4 => "ps4", | ||
| 671 | .ps5 => "ps5", | ||
| 672 | .elfiamcu => "elfiamcu", | ||
| 673 | .mesa3d => "mesa3d", | ||
| 674 | .contiki => "contiki", | ||
| 675 | .amdpal => "amdpal", | ||
| 676 | .hermit => "hermit", | ||
| 677 | .hurd => "hurd", | ||
| 678 | .wasi => "wasi", | ||
| 679 | .emscripten => "emscripten", | ||
| 680 | .uefi => "windows", | ||
| 681 | .macos => "macosx", | ||
| 682 | .ios => "ios", | ||
| 683 | .tvos => "tvos", | ||
| 684 | .watchos => "watchos", | ||
| 685 | .driverkit => "driverkit", | ||
| 686 | .shadermodel => "shadermodel", | ||
| 687 | .liteos => "liteos", | ||
| 688 | .opencl, | ||
| 689 | .glsl450, | ||
| 690 | .vulkan, | ||
| 691 | .plan9, | ||
| 692 | .other, | ||
| 693 | => "unknown", | ||
| 694 | }; | ||
| 695 | writer.writeAll(llvm_os) catch unreachable; | ||
| 696 | |||
| 697 | if (target.os.tag.isDarwin()) { | ||
| 698 | const min_version = target.os.version_range.semver.min; | ||
| 699 | writer.print("{d}.{d}.{d}", .{ | ||
| 700 | min_version.major, | ||
| 701 | min_version.minor, | ||
| 702 | min_version.patch, | ||
| 703 | }) catch unreachable; | ||
| 704 | } | ||
| 705 | writer.writeByte('-') catch unreachable; | ||
| 706 | |||
| 707 | const llvm_abi = switch (target.abi) { | ||
| 708 | .none => "unknown", | ||
| 709 | .gnu => "gnu", | ||
| 710 | .gnuabin32 => "gnuabin32", | ||
| 711 | .gnuabi64 => "gnuabi64", | ||
| 712 | .gnueabi => "gnueabi", | ||
| 713 | .gnueabihf => "gnueabihf", | ||
| 714 | .gnuf32 => "gnuf32", | ||
| 715 | .gnuf64 => "gnuf64", | ||
| 716 | .gnusf => "gnusf", | ||
| 717 | .gnux32 => "gnux32", | ||
| 718 | .gnuilp32 => "gnuilp32", | ||
| 719 | .code16 => "code16", | ||
| 720 | .eabi => "eabi", | ||
| 721 | .eabihf => "eabihf", | ||
| 722 | .android => "android", | ||
| 723 | .musl => "musl", | ||
| 724 | .musleabi => "musleabi", | ||
| 725 | .musleabihf => "musleabihf", | ||
| 726 | .muslx32 => "muslx32", | ||
| 727 | .msvc => "msvc", | ||
| 728 | .itanium => "itanium", | ||
| 729 | .cygnus => "cygnus", | ||
| 730 | .coreclr => "coreclr", | ||
| 731 | .simulator => "simulator", | ||
| 732 | .macabi => "macabi", | ||
| 733 | .pixel => "pixel", | ||
| 734 | .vertex => "vertex", | ||
| 735 | .geometry => "geometry", | ||
| 736 | .hull => "hull", | ||
| 737 | .domain => "domain", | ||
| 738 | .compute => "compute", | ||
| 739 | .library => "library", | ||
| 740 | .raygeneration => "raygeneration", | ||
| 741 | .intersection => "intersection", | ||
| 742 | .anyhit => "anyhit", | ||
| 743 | .closesthit => "closesthit", | ||
| 744 | .miss => "miss", | ||
| 745 | .callable => "callable", | ||
| 746 | .mesh => "mesh", | ||
| 747 | .amplification => "amplification", | ||
| 748 | }; | ||
| 749 | writer.writeAll(llvm_abi) catch unreachable; | ||
| 750 | return stream.getWritten(); | ||
| 751 | } | ||
| 752 | |||
| 753 | test "alignment functions - smoke test" { | ||
| 754 | var target: std.Target = undefined; | ||
| 755 | const x86 = std.Target.Cpu.Arch.x86_64; | ||
| 756 | target.cpu = std.Target.Cpu.baseline(x86); | ||
| 757 | target.os = std.Target.Os.Tag.defaultVersionRange(.linux, x86); | ||
| 758 | target.abi = std.Target.Abi.default(x86, target.os); | ||
| 759 | |||
| 760 | try std.testing.expect(isTlsSupported(target)); | ||
| 761 | try std.testing.expect(!ignoreNonZeroSizedBitfieldTypeAlignment(target)); | ||
| 762 | try std.testing.expect(minZeroWidthBitfieldAlignment(target) == null); | ||
| 763 | try std.testing.expect(!unnamedFieldAffectsAlignment(target)); | ||
| 764 | try std.testing.expect(defaultAlignment(target) == 16); | ||
| 765 | try std.testing.expect(!packAllEnums(target)); | ||
| 766 | try std.testing.expect(systemCompiler(target) == .gcc); | ||
| 767 | |||
| 768 | const arm = std.Target.Cpu.Arch.arm; | ||
| 769 | target.cpu = std.Target.Cpu.baseline(arm); | ||
| 770 | target.os = std.Target.Os.Tag.defaultVersionRange(.ios, arm); | ||
| 771 | target.abi = std.Target.Abi.default(arm, target.os); | ||
| 772 | |||
| 773 | try std.testing.expect(!isTlsSupported(target)); | ||
| 774 | try std.testing.expect(ignoreNonZeroSizedBitfieldTypeAlignment(target)); | ||
| 775 | try std.testing.expectEqual(@as(?u29, 32), minZeroWidthBitfieldAlignment(target)); | ||
| 776 | try std.testing.expect(unnamedFieldAffectsAlignment(target)); | ||
| 777 | try std.testing.expect(defaultAlignment(target) == 16); | ||
| 778 | try std.testing.expect(!packAllEnums(target)); | ||
| 779 | try std.testing.expect(systemCompiler(target) == .clang); | ||
| 780 | } | ||
| 781 | |||
| 782 | test "target size/align tests" { | ||
| 783 | var comp: @import("Compilation.zig") = undefined; | ||
| 784 | |||
| 785 | const x86 = std.Target.Cpu.Arch.x86; | ||
| 786 | comp.target.cpu.arch = x86; | ||
| 787 | comp.target.cpu.model = &std.Target.x86.cpu.i586; | ||
| 788 | comp.target.os = std.Target.Os.Tag.defaultVersionRange(.linux, x86); | ||
| 789 | comp.target.abi = std.Target.Abi.gnu; | ||
| 790 | |||
| 791 | const tt: Type = .{ | ||
| 792 | .specifier = .long_long, | ||
| 793 | }; | ||
| 794 | |||
| 795 | try std.testing.expectEqual(@as(u64, 8), tt.sizeof(&comp).?); | ||
| 796 | try std.testing.expectEqual(@as(u64, 4), tt.alignof(&comp)); | ||
| 797 | |||
| 798 | const arm = std.Target.Cpu.Arch.arm; | ||
| 799 | comp.target.cpu = std.Target.Cpu.Model.toCpu(&std.Target.arm.cpu.cortex_r4, arm); | ||
| 800 | comp.target.os = std.Target.Os.Tag.defaultVersionRange(.ios, arm); | ||
| 801 | comp.target.abi = std.Target.Abi.none; | ||
| 802 | |||
| 803 | const ct: Type = .{ | ||
| 804 | .specifier = .char, | ||
| 805 | }; | ||
| 806 | |||
| 807 | try std.testing.expectEqual(true, std.Target.arm.featureSetHas(comp.target.cpu.features, .has_v7)); | ||
| 808 | try std.testing.expectEqual(@as(u64, 1), ct.sizeof(&comp).?); | ||
| 809 | try std.testing.expectEqual(@as(u64, 1), ct.alignof(&comp)); | ||
| 810 | try std.testing.expectEqual(true, ignoreNonZeroSizedBitfieldTypeAlignment(comp.target)); | ||
| 811 | } | ||
deps/aro/toolchains/Linux.zig deleted-482| ... | @@ -1,482 +0,0 @@ | ||
| 1 | const std = @import("std"); | ||
| 2 | const mem = std.mem; | ||
| 3 | const Compilation = @import("../Compilation.zig"); | ||
| 4 | const GCCDetector = @import("../Driver/GCCDetector.zig"); | ||
| 5 | const Toolchain = @import("../Toolchain.zig"); | ||
| 6 | const Driver = @import("../Driver.zig"); | ||
| 7 | const Distro = @import("../Driver/Distro.zig"); | ||
| 8 | const target_util = @import("../target.zig"); | ||
| 9 | const system_defaults = @import("system_defaults"); | ||
| 10 | |||
| 11 | const Linux = @This(); | ||
| 12 | |||
| 13 | distro: Distro.Tag = .unknown, | ||
| 14 | extra_opts: std.ArrayListUnmanaged([]const u8) = .{}, | ||
| 15 | gcc_detector: GCCDetector = .{}, | ||
| 16 | |||
| 17 | pub fn discover(self: *Linux, tc: *Toolchain) !void { | ||
| 18 | self.distro = Distro.detect(tc.getTarget(), tc.filesystem); | ||
| 19 | try self.gcc_detector.discover(tc); | ||
| 20 | tc.selected_multilib = self.gcc_detector.selected; | ||
| 21 | |||
| 22 | try self.gcc_detector.appendToolPath(tc); | ||
| 23 | try self.buildExtraOpts(tc); | ||
| 24 | try self.findPaths(tc); | ||
| 25 | } | ||
| 26 | |||
| 27 | fn buildExtraOpts(self: *Linux, tc: *const Toolchain) !void { | ||
| 28 | const gpa = tc.driver.comp.gpa; | ||
| 29 | const target = tc.getTarget(); | ||
| 30 | const is_android = target.isAndroid(); | ||
| 31 | if (self.distro.isAlpine() or is_android) { | ||
| 32 | try self.extra_opts.ensureUnusedCapacity(gpa, 2); | ||
| 33 | self.extra_opts.appendAssumeCapacity("-z"); | ||
| 34 | self.extra_opts.appendAssumeCapacity("now"); | ||
| 35 | } | ||
| 36 | |||
| 37 | if (self.distro.isOpenSUSE() or self.distro.isUbuntu() or self.distro.isAlpine() or is_android) { | ||
| 38 | try self.extra_opts.ensureUnusedCapacity(gpa, 2); | ||
| 39 | self.extra_opts.appendAssumeCapacity("-z"); | ||
| 40 | self.extra_opts.appendAssumeCapacity("relro"); | ||
| 41 | } | ||
| 42 | |||
| 43 | if (target.cpu.arch.isARM() or target.cpu.arch.isAARCH64() or is_android) { | ||
| 44 | try self.extra_opts.ensureUnusedCapacity(gpa, 2); | ||
| 45 | self.extra_opts.appendAssumeCapacity("-z"); | ||
| 46 | self.extra_opts.appendAssumeCapacity("max-page-size=4096"); | ||
| 47 | } | ||
| 48 | |||
| 49 | if (target.cpu.arch == .arm or target.cpu.arch == .thumb) { | ||
| 50 | try self.extra_opts.append(gpa, "-X"); | ||
| 51 | } | ||
| 52 | |||
| 53 | if (!target.cpu.arch.isMIPS() and target.cpu.arch != .hexagon) { | ||
| 54 | const hash_style = if (is_android) .both else self.distro.getHashStyle(); | ||
| 55 | try self.extra_opts.append(gpa, switch (hash_style) { | ||
| 56 | inline else => |tag| "--hash-style=" ++ @tagName(tag), | ||
| 57 | }); | ||
| 58 | } | ||
| 59 | |||
| 60 | if (system_defaults.enable_linker_build_id) { | ||
| 61 | try self.extra_opts.append(gpa, "--build-id"); | ||
| 62 | } | ||
| 63 | } | ||
| 64 | |||
| 65 | fn addMultiLibPaths(self: *Linux, tc: *Toolchain, sysroot: []const u8, os_lib_dir: []const u8) !void { | ||
| 66 | if (!self.gcc_detector.is_valid) return; | ||
| 67 | const gcc_triple = self.gcc_detector.gcc_triple; | ||
| 68 | const lib_path = self.gcc_detector.parent_lib_path; | ||
| 69 | |||
| 70 | // Add lib/gcc/$triple/$version, with an optional /multilib suffix. | ||
| 71 | try tc.addPathIfExists(&.{ self.gcc_detector.install_path, tc.selected_multilib.gcc_suffix }, .file); | ||
| 72 | |||
| 73 | // Add lib/gcc/$triple/$libdir | ||
| 74 | // For GCC built with --enable-version-specific-runtime-libs. | ||
| 75 | try tc.addPathIfExists(&.{ self.gcc_detector.install_path, "..", os_lib_dir }, .file); | ||
| 76 | |||
| 77 | try tc.addPathIfExists(&.{ lib_path, "..", gcc_triple, "lib", "..", os_lib_dir, tc.selected_multilib.os_suffix }, .file); | ||
| 78 | |||
| 79 | // If the GCC installation we found is inside of the sysroot, we want to | ||
| 80 | // prefer libraries installed in the parent prefix of the GCC installation. | ||
| 81 | // It is important to *not* use these paths when the GCC installation is | ||
| 82 | // outside of the system root as that can pick up unintended libraries. | ||
| 83 | // This usually happens when there is an external cross compiler on the | ||
| 84 | // host system, and a more minimal sysroot available that is the target of | ||
| 85 | // the cross. Note that GCC does include some of these directories in some | ||
| 86 | // configurations but this seems somewhere between questionable and simply | ||
| 87 | // a bug. | ||
| 88 | if (mem.startsWith(u8, lib_path, sysroot)) { | ||
| 89 | try tc.addPathIfExists(&.{ lib_path, "..", os_lib_dir }, .file); | ||
| 90 | } | ||
| 91 | } | ||
| 92 | |||
| 93 | fn addMultiArchPaths(self: *Linux, tc: *Toolchain) !void { | ||
| 94 | if (!self.gcc_detector.is_valid) return; | ||
| 95 | const lib_path = self.gcc_detector.parent_lib_path; | ||
| 96 | const gcc_triple = self.gcc_detector.gcc_triple; | ||
| 97 | const multilib = self.gcc_detector.selected; | ||
| 98 | try tc.addPathIfExists(&.{ lib_path, "..", gcc_triple, "lib", multilib.os_suffix }, .file); | ||
| 99 | } | ||
| 100 | |||
| 101 | /// TODO: Very incomplete | ||
| 102 | fn findPaths(self: *Linux, tc: *Toolchain) !void { | ||
| 103 | const target = tc.getTarget(); | ||
| 104 | const sysroot = tc.getSysroot(); | ||
| 105 | |||
| 106 | var output: [64]u8 = undefined; | ||
| 107 | |||
| 108 | const os_lib_dir = getOSLibDir(target); | ||
| 109 | const multiarch_triple = getMultiarchTriple(target) orelse target_util.toLLVMTriple(target, &output); | ||
| 110 | |||
| 111 | try self.addMultiLibPaths(tc, sysroot, os_lib_dir); | ||
| 112 | |||
| 113 | try tc.addPathIfExists(&.{ sysroot, "/lib", multiarch_triple }, .file); | ||
| 114 | try tc.addPathIfExists(&.{ sysroot, "/lib", "..", os_lib_dir }, .file); | ||
| 115 | |||
| 116 | if (target.isAndroid()) { | ||
| 117 | // TODO | ||
| 118 | } | ||
| 119 | try tc.addPathIfExists(&.{ sysroot, "/usr", "lib", multiarch_triple }, .file); | ||
| 120 | try tc.addPathIfExists(&.{ sysroot, "/usr", "lib", "..", os_lib_dir }, .file); | ||
| 121 | |||
| 122 | try self.addMultiArchPaths(tc); | ||
| 123 | |||
| 124 | try tc.addPathIfExists(&.{ sysroot, "/lib" }, .file); | ||
| 125 | try tc.addPathIfExists(&.{ sysroot, "/usr", "lib" }, .file); | ||
| 126 | } | ||
| 127 | |||
| 128 | pub fn deinit(self: *Linux, allocator: std.mem.Allocator) void { | ||
| 129 | self.extra_opts.deinit(allocator); | ||
| 130 | } | ||
| 131 | |||
| 132 | fn isPIEDefault(self: *const Linux) bool { | ||
| 133 | _ = self; | ||
| 134 | return false; | ||
| 135 | } | ||
| 136 | |||
| 137 | fn getPIE(self: *const Linux, d: *const Driver) bool { | ||
| 138 | if (d.shared or d.static or d.relocatable or d.static_pie) { | ||
| 139 | return false; | ||
| 140 | } | ||
| 141 | return d.pie orelse self.isPIEDefault(); | ||
| 142 | } | ||
| 143 | |||
| 144 | fn getStaticPIE(self: *const Linux, d: *Driver) !bool { | ||
| 145 | _ = self; | ||
| 146 | if (d.static_pie and d.pie != null) { | ||
| 147 | try d.err("cannot specify 'nopie' along with 'static-pie'"); | ||
| 148 | } | ||
| 149 | return d.static_pie; | ||
| 150 | } | ||
| 151 | |||
| 152 | fn getStatic(self: *const Linux, d: *const Driver) bool { | ||
| 153 | _ = self; | ||
| 154 | return d.static and !d.static_pie; | ||
| 155 | } | ||
| 156 | |||
| 157 | pub fn getDefaultLinker(self: *const Linux, target: std.Target) []const u8 { | ||
| 158 | _ = self; | ||
| 159 | if (target.isAndroid()) { | ||
| 160 | return "ld.lld"; | ||
| 161 | } | ||
| 162 | return "ld"; | ||
| 163 | } | ||
| 164 | |||
| 165 | pub fn buildLinkerArgs(self: *const Linux, tc: *const Toolchain, argv: *std.ArrayList([]const u8)) Compilation.Error!void { | ||
| 166 | const d = tc.driver; | ||
| 167 | const target = tc.getTarget(); | ||
| 168 | |||
| 169 | const is_pie = self.getPIE(d); | ||
| 170 | const is_static_pie = try self.getStaticPIE(d); | ||
| 171 | const is_static = self.getStatic(d); | ||
| 172 | const is_android = target.isAndroid(); | ||
| 173 | const is_iamcu = target.os.tag == .elfiamcu; | ||
| 174 | const is_ve = target.cpu.arch == .ve; | ||
| 175 | const has_crt_begin_end_files = target.abi != .none; // TODO: clang checks for MIPS vendor | ||
| 176 | |||
| 177 | if (is_pie) { | ||
| 178 | try argv.append("-pie"); | ||
| 179 | } | ||
| 180 | if (is_static_pie) { | ||
| 181 | try argv.appendSlice(&.{ "-static", "-pie", "--no-dynamic-linker", "-z", "text" }); | ||
| 182 | } | ||
| 183 | |||
| 184 | if (d.rdynamic) { | ||
| 185 | try argv.append("-export-dynamic"); | ||
| 186 | } | ||
| 187 | |||
| 188 | if (d.strip) { | ||
| 189 | try argv.append("-s"); | ||
| 190 | } | ||
| 191 | |||
| 192 | try argv.appendSlice(self.extra_opts.items); | ||
| 193 | try argv.append("--eh-frame-hdr"); | ||
| 194 | |||
| 195 | // Todo: Driver should parse `-EL`/`-EB` for arm to set endianness for arm targets | ||
| 196 | if (target_util.ldEmulationOption(d.comp.target, null)) |emulation| { | ||
| 197 | try argv.appendSlice(&.{ "-m", emulation }); | ||
| 198 | } else { | ||
| 199 | try d.err("Unknown target triple"); | ||
| 200 | return; | ||
| 201 | } | ||
| 202 | if (d.comp.target.cpu.arch.isRISCV()) { | ||
| 203 | try argv.append("-X"); | ||
| 204 | } | ||
| 205 | if (d.shared) { | ||
| 206 | try argv.append("-shared"); | ||
| 207 | } | ||
| 208 | if (is_static) { | ||
| 209 | try argv.append("-static"); | ||
| 210 | } else { | ||
| 211 | if (d.rdynamic) { | ||
| 212 | try argv.append("-export-dynamic"); | ||
| 213 | } | ||
| 214 | if (!d.shared and !is_static_pie and !d.relocatable) { | ||
| 215 | const dynamic_linker = d.comp.target.standardDynamicLinkerPath(); | ||
| 216 | // todo: check for --dyld-prefix | ||
| 217 | if (dynamic_linker.get()) |path| { | ||
| 218 | try argv.appendSlice(&.{ "-dynamic-linker", try tc.arena.dupe(u8, path) }); | ||
| 219 | } else { | ||
| 220 | try d.err("Could not find dynamic linker path"); | ||
| 221 | } | ||
| 222 | } | ||
| 223 | } | ||
| 224 | |||
| 225 | try argv.appendSlice(&.{ "-o", d.output_name orelse "a.out" }); | ||
| 226 | |||
| 227 | if (!d.nostdlib and !d.nostartfiles and !d.relocatable) { | ||
| 228 | if (!is_android and !is_iamcu) { | ||
| 229 | if (!d.shared) { | ||
| 230 | const crt1 = if (is_pie) | ||
| 231 | "Scrt1.o" | ||
| 232 | else if (is_static_pie) | ||
| 233 | "rcrt1.o" | ||
| 234 | else | ||
| 235 | "crt1.o"; | ||
| 236 | try argv.append(try tc.getFilePath(crt1)); | ||
| 237 | } | ||
| 238 | try argv.append(try tc.getFilePath("crti.o")); | ||
| 239 | } | ||
| 240 | if (is_ve) { | ||
| 241 | try argv.appendSlice(&.{ "-z", "max-page-size=0x4000000" }); | ||
| 242 | } | ||
| 243 | |||
| 244 | if (is_iamcu) { | ||
| 245 | try argv.append(try tc.getFilePath("crt0.o")); | ||
| 246 | } else if (has_crt_begin_end_files) { | ||
| 247 | var path: []const u8 = ""; | ||
| 248 | if (tc.getRuntimeLibKind() == .compiler_rt and !is_android) { | ||
| 249 | const crt_begin = try tc.getCompilerRt("crtbegin", .object); | ||
| 250 | if (tc.filesystem.exists(crt_begin)) { | ||
| 251 | path = crt_begin; | ||
| 252 | } | ||
| 253 | } | ||
| 254 | if (path.len == 0) { | ||
| 255 | const crt_begin = if (tc.driver.shared) | ||
| 256 | if (is_android) "crtbegin_so.o" else "crtbeginS.o" | ||
| 257 | else if (is_static) | ||
| 258 | if (is_android) "crtbegin_static.o" else "crtbeginT.o" | ||
| 259 | else if (is_pie or is_static_pie) | ||
| 260 | if (is_android) "crtbegin_dynamic.o" else "crtbeginS.o" | ||
| 261 | else if (is_android) "crtbegin_dynamic.o" else "crtbegin.o"; | ||
| 262 | path = try tc.getFilePath(crt_begin); | ||
| 263 | } | ||
| 264 | try argv.append(path); | ||
| 265 | } | ||
| 266 | } | ||
| 267 | |||
| 268 | // TODO add -L opts | ||
| 269 | // TODO add -u opts | ||
| 270 | |||
| 271 | try tc.addFilePathLibArgs(argv); | ||
| 272 | |||
| 273 | // TODO handle LTO | ||
| 274 | |||
| 275 | try argv.appendSlice(d.link_objects.items); | ||
| 276 | |||
| 277 | if (!d.nostdlib and !d.relocatable) { | ||
| 278 | if (!d.nodefaultlibs) { | ||
| 279 | if (is_static or is_static_pie) { | ||
| 280 | try argv.append("--start-group"); | ||
| 281 | } | ||
| 282 | try tc.addRuntimeLibs(argv); | ||
| 283 | |||
| 284 | // TODO: add pthread if needed | ||
| 285 | if (!d.nolibc) { | ||
| 286 | try argv.append("-lc"); | ||
| 287 | } | ||
| 288 | if (is_iamcu) { | ||
| 289 | try argv.append("-lgloss"); | ||
| 290 | } | ||
| 291 | if (is_static or is_static_pie) { | ||
| 292 | try argv.append("--end-group"); | ||
| 293 | } else { | ||
| 294 | try tc.addRuntimeLibs(argv); | ||
| 295 | } | ||
| 296 | if (is_iamcu) { | ||
| 297 | try argv.appendSlice(&.{ "--as-needed", "-lsoftfp", "--no-as-needed" }); | ||
| 298 | } | ||
| 299 | } | ||
| 300 | if (!d.nostartfiles and !is_iamcu) { | ||
| 301 | if (has_crt_begin_end_files) { | ||
| 302 | var path: []const u8 = ""; | ||
| 303 | if (tc.getRuntimeLibKind() == .compiler_rt and !is_android) { | ||
| 304 | const crt_end = try tc.getCompilerRt("crtend", .object); | ||
| 305 | if (tc.filesystem.exists(crt_end)) { | ||
| 306 | path = crt_end; | ||
| 307 | } | ||
| 308 | } | ||
| 309 | if (path.len == 0) { | ||
| 310 | const crt_end = if (d.shared) | ||
| 311 | if (is_android) "crtend_so.o" else "crtendS.o" | ||
| 312 | else if (is_pie or is_static_pie) | ||
| 313 | if (is_android) "crtend_android.o" else "crtendS.o" | ||
| 314 | else if (is_android) "crtend_android.o" else "crtend.o"; | ||
| 315 | path = try tc.getFilePath(crt_end); | ||
| 316 | } | ||
| 317 | try argv.append(path); | ||
| 318 | } | ||
| 319 | if (!is_android) { | ||
| 320 | try argv.append(try tc.getFilePath("crtn.o")); | ||
| 321 | } | ||
| 322 | } | ||
| 323 | } | ||
| 324 | |||
| 325 | // TODO add -T args | ||
| 326 | } | ||
| 327 | |||
| 328 | fn getMultiarchTriple(target: std.Target) ?[]const u8 { | ||
| 329 | const is_android = target.isAndroid(); | ||
| 330 | const is_mips_r6 = std.Target.mips.featureSetHas(target.cpu.features, .mips32r6); | ||
| 331 | return switch (target.cpu.arch) { | ||
| 332 | .arm, .thumb => if (is_android) "arm-linux-androideabi" else if (target.abi == .gnueabihf) "arm-linux-gnueabihf" else "arm-linux-gnueabi", | ||
| 333 | .armeb, .thumbeb => if (target.abi == .gnueabihf) "armeb-linux-gnueabihf" else "armeb-linux-gnueabi", | ||
| 334 | .aarch64 => if (is_android) "aarch64-linux-android" else "aarch64-linux-gnu", | ||
| 335 | .aarch64_be => "aarch64_be-linux-gnu", | ||
| 336 | .x86 => if (is_android) "i686-linux-android" else "i386-linux-gnu", | ||
| 337 | .x86_64 => if (is_android) "x86_64-linux-android" else if (target.abi == .gnux32) "x86_64-linux-gnux32" else "x86_64-linux-gnu", | ||
| 338 | .m68k => "m68k-linux-gnu", | ||
| 339 | .mips => if (is_mips_r6) "mipsisa32r6-linux-gnu" else "mips-linux-gnu", | ||
| 340 | .mipsel => if (is_android) "mipsel-linux-android" else if (is_mips_r6) "mipsisa32r6el-linux-gnu" else "mipsel-linux-gnu", | ||
| 341 | .powerpcle => "powerpcle-linux-gnu", | ||
| 342 | .powerpc64 => "powerpc64-linux-gnu", | ||
| 343 | .powerpc64le => "powerpc64le-linux-gnu", | ||
| 344 | .riscv64 => "riscv64-linux-gnu", | ||
| 345 | .sparc => "sparc-linux-gnu", | ||
| 346 | .sparc64 => "sparc64-linux-gnu", | ||
| 347 | .s390x => "s390x-linux-gnu", | ||
| 348 | |||
| 349 | // TODO: expand this | ||
| 350 | else => null, | ||
| 351 | }; | ||
| 352 | } | ||
| 353 | |||
| 354 | fn getOSLibDir(target: std.Target) []const u8 { | ||
| 355 | switch (target.cpu.arch) { | ||
| 356 | .x86, | ||
| 357 | .powerpc, | ||
| 358 | .powerpcle, | ||
| 359 | .sparc, | ||
| 360 | .sparcel, | ||
| 361 | => return "lib32", | ||
| 362 | else => {}, | ||
| 363 | } | ||
| 364 | if (target.cpu.arch == .x86_64 and (target.abi == .gnux32 or target.abi == .muslx32)) { | ||
| 365 | return "libx32"; | ||
| 366 | } | ||
| 367 | if (target.cpu.arch == .riscv32) { | ||
| 368 | return "lib32"; | ||
| 369 | } | ||
| 370 | if (target.ptrBitWidth() == 32) { | ||
| 371 | return "lib"; | ||
| 372 | } | ||
| 373 | return "lib64"; | ||
| 374 | } | ||
| 375 | |||
| 376 | test Linux { | ||
| 377 | if (@import("builtin").os.tag == .windows) return error.SkipZigTest; | ||
| 378 | |||
| 379 | var arena_instance = std.heap.ArenaAllocator.init(std.testing.allocator); | ||
| 380 | defer arena_instance.deinit(); | ||
| 381 | const arena = arena_instance.allocator(); | ||
| 382 | |||
| 383 | var comp = Compilation.init(std.testing.allocator); | ||
| 384 | defer comp.deinit(); | ||
| 385 | comp.environment = .{ | ||
| 386 | .path = "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin", | ||
| 387 | }; | ||
| 388 | |||
| 389 | const raw_triple = "x86_64-linux-gnu"; | ||
| 390 | const cross = std.zig.CrossTarget.parse(.{ .arch_os_abi = raw_triple }) catch unreachable; | ||
| 391 | comp.target = cross.toTarget(); // TODO deprecated | ||
| 392 | comp.langopts.setEmulatedCompiler(.gcc); | ||
| 393 | |||
| 394 | var driver: Driver = .{ .comp = &comp }; | ||
| 395 | defer driver.deinit(); | ||
| 396 | driver.raw_target_triple = raw_triple; | ||
| 397 | |||
| 398 | const link_obj = try driver.comp.gpa.dupe(u8, "/tmp/foo.o"); | ||
| 399 | try driver.link_objects.append(driver.comp.gpa, link_obj); | ||
| 400 | driver.temp_file_count += 1; | ||
| 401 | |||
| 402 | var toolchain: Toolchain = .{ .driver = &driver, .arena = arena, .filesystem = .{ .fake = &.{ | ||
| 403 | .{ .path = "/tmp" }, | ||
| 404 | .{ .path = "/usr" }, | ||
| 405 | .{ .path = "/usr/lib64" }, | ||
| 406 | .{ .path = "/usr/bin" }, | ||
| 407 | .{ .path = "/usr/bin/ld", .executable = true }, | ||
| 408 | .{ .path = "/lib" }, | ||
| 409 | .{ .path = "/lib/x86_64-linux-gnu" }, | ||
| 410 | .{ .path = "/lib/x86_64-linux-gnu/crt1.o" }, | ||
| 411 | .{ .path = "/lib/x86_64-linux-gnu/crti.o" }, | ||
| 412 | .{ .path = "/lib/x86_64-linux-gnu/crtn.o" }, | ||
| 413 | .{ .path = "/lib64" }, | ||
| 414 | .{ .path = "/usr/lib" }, | ||
| 415 | .{ .path = "/usr/lib/gcc" }, | ||
| 416 | .{ .path = "/usr/lib/gcc/x86_64-linux-gnu" }, | ||
| 417 | .{ .path = "/usr/lib/gcc/x86_64-linux-gnu/9" }, | ||
| 418 | .{ .path = "/usr/lib/gcc/x86_64-linux-gnu/9/crtbegin.o" }, | ||
| 419 | .{ .path = "/usr/lib/gcc/x86_64-linux-gnu/9/crtend.o" }, | ||
| 420 | .{ .path = "/usr/lib/x86_64-linux-gnu" }, | ||
| 421 | .{ .path = "/etc/lsb-release", .contents = | ||
| 422 | \\DISTRIB_ID=Ubuntu | ||
| 423 | \\DISTRIB_RELEASE=20.04 | ||
| 424 | \\DISTRIB_CODENAME=focal | ||
| 425 | \\DISTRIB_DESCRIPTION="Ubuntu 20.04.6 LTS" | ||
| 426 | \\ | ||
| 427 | }, | ||
| 428 | } } }; | ||
| 429 | defer toolchain.deinit(); | ||
| 430 | |||
| 431 | try toolchain.discover(); | ||
| 432 | |||
| 433 | var argv = std.ArrayList([]const u8).init(driver.comp.gpa); | ||
| 434 | defer argv.deinit(); | ||
| 435 | |||
| 436 | var linker_path_buf: [std.fs.MAX_PATH_BYTES]u8 = undefined; | ||
| 437 | const linker_path = try toolchain.getLinkerPath(&linker_path_buf); | ||
| 438 | try argv.append(linker_path); | ||
| 439 | |||
| 440 | try toolchain.buildLinkerArgs(&argv); | ||
| 441 | |||
| 442 | const expected = [_][]const u8{ | ||
| 443 | "/usr/bin/ld", | ||
| 444 | "-z", | ||
| 445 | "relro", | ||
| 446 | "--hash-style=gnu", | ||
| 447 | "--eh-frame-hdr", | ||
| 448 | "-m", | ||
| 449 | "elf_x86_64", | ||
| 450 | "-dynamic-linker", | ||
| 451 | "/lib64/ld-linux-x86-64.so.2", | ||
| 452 | "-o", | ||
| 453 | "a.out", | ||
| 454 | "/lib/x86_64-linux-gnu/crt1.o", | ||
| 455 | "/lib/x86_64-linux-gnu/crti.o", | ||
| 456 | "/usr/lib/gcc/x86_64-linux-gnu/9/crtbegin.o", | ||
| 457 | "-L/usr/lib/gcc/x86_64-linux-gnu/9", | ||
| 458 | "-L/usr/lib/gcc/x86_64-linux-gnu/9/../../../../lib64", | ||
| 459 | "-L/lib/x86_64-linux-gnu", | ||
| 460 | "-L/lib/../lib64", | ||
| 461 | "-L/usr/lib/x86_64-linux-gnu", | ||
| 462 | "-L/usr/lib/../lib64", | ||
| 463 | "-L/lib", | ||
| 464 | "-L/usr/lib", | ||
| 465 | link_obj, | ||
| 466 | "-lgcc", | ||
| 467 | "--as-needed", | ||
| 468 | "-lgcc_s", | ||
| 469 | "--no-as-needed", | ||
| 470 | "-lc", | ||
| 471 | "-lgcc", | ||
| 472 | "--as-needed", | ||
| 473 | "-lgcc_s", | ||
| 474 | "--no-as-needed", | ||
| 475 | "/usr/lib/gcc/x86_64-linux-gnu/9/crtend.o", | ||
| 476 | "/lib/x86_64-linux-gnu/crtn.o", | ||
| 477 | }; | ||
| 478 | try std.testing.expectEqual(expected.len, argv.items.len); | ||
| 479 | for (expected, argv.items) |expected_item, actual_item| { | ||
| 480 | try std.testing.expectEqualStrings(expected_item, actual_item); | ||
| 481 | } | ||
| 482 | } | ||
deps/aro/util.zig deleted-83| ... | @@ -1,83 +0,0 @@ | ||
| 1 | const std = @import("std"); | ||
| 2 | const mem = std.mem; | ||
| 3 | const builtin = @import("builtin"); | ||
| 4 | const is_windows = builtin.os.tag == .windows; | ||
| 5 | |||
| 6 | pub const Color = enum { | ||
| 7 | reset, | ||
| 8 | red, | ||
| 9 | green, | ||
| 10 | blue, | ||
| 11 | cyan, | ||
| 12 | purple, | ||
| 13 | yellow, | ||
| 14 | white, | ||
| 15 | }; | ||
| 16 | |||
| 17 | pub fn fileSupportsColor(file: std.fs.File) bool { | ||
| 18 | return file.supportsAnsiEscapeCodes() or (is_windows and file.isTty()); | ||
| 19 | } | ||
| 20 | |||
| 21 | pub fn setColor(color: Color, w: anytype) void { | ||
| 22 | if (is_windows) { | ||
| 23 | const stderr_file = std.io.getStdErr(); | ||
| 24 | if (!stderr_file.isTty()) return; | ||
| 25 | const windows = std.os.windows; | ||
| 26 | const S = struct { | ||
| 27 | var attrs: windows.WORD = undefined; | ||
| 28 | var init_attrs = false; | ||
| 29 | }; | ||
| 30 | if (!S.init_attrs) { | ||
| 31 | S.init_attrs = true; | ||
| 32 | var info: windows.CONSOLE_SCREEN_BUFFER_INFO = undefined; | ||
| 33 | _ = windows.kernel32.GetConsoleScreenBufferInfo(stderr_file.handle, &info); | ||
| 34 | S.attrs = info.wAttributes; | ||
| 35 | _ = windows.kernel32.SetConsoleOutputCP(65001); | ||
| 36 | } | ||
| 37 | |||
| 38 | // need to flush bufferedWriter | ||
| 39 | const T = if (@typeInfo(@TypeOf(w.context)) == .Pointer) @TypeOf(w.context.*) else @TypeOf(w.context); | ||
| 40 | if (T != void and @hasDecl(T, "flush")) w.context.flush() catch {}; | ||
| 41 | |||
| 42 | switch (color) { | ||
| 43 | .reset => _ = windows.SetConsoleTextAttribute(stderr_file.handle, S.attrs) catch {}, | ||
| 44 | .red => _ = windows.SetConsoleTextAttribute(stderr_file.handle, windows.FOREGROUND_RED | windows.FOREGROUND_INTENSITY) catch {}, | ||
| 45 | .green => _ = windows.SetConsoleTextAttribute(stderr_file.handle, windows.FOREGROUND_GREEN | windows.FOREGROUND_INTENSITY) catch {}, | ||
| 46 | .blue => _ = windows.SetConsoleTextAttribute(stderr_file.handle, windows.FOREGROUND_BLUE | windows.FOREGROUND_INTENSITY) catch {}, | ||
| 47 | .cyan => _ = windows.SetConsoleTextAttribute(stderr_file.handle, windows.FOREGROUND_GREEN | windows.FOREGROUND_BLUE | windows.FOREGROUND_INTENSITY) catch {}, | ||
| 48 | .purple => _ = windows.SetConsoleTextAttribute(stderr_file.handle, windows.FOREGROUND_RED | windows.FOREGROUND_BLUE | windows.FOREGROUND_INTENSITY) catch {}, | ||
| 49 | .yellow => _ = windows.SetConsoleTextAttribute(stderr_file.handle, windows.FOREGROUND_RED | windows.FOREGROUND_GREEN | windows.FOREGROUND_INTENSITY) catch {}, | ||
| 50 | .white => _ = windows.SetConsoleTextAttribute(stderr_file.handle, windows.FOREGROUND_RED | windows.FOREGROUND_GREEN | windows.FOREGROUND_BLUE | windows.FOREGROUND_INTENSITY) catch {}, | ||
| 51 | } | ||
| 52 | } else switch (color) { | ||
| 53 | .reset => w.writeAll("\x1b[0m") catch {}, | ||
| 54 | .red => w.writeAll("\x1b[31;1m") catch {}, | ||
| 55 | .green => w.writeAll("\x1b[32;1m") catch {}, | ||
| 56 | .blue => w.writeAll("\x1b[34;1m") catch {}, | ||
| 57 | .cyan => w.writeAll("\x1b[36;1m") catch {}, | ||
| 58 | .purple => w.writeAll("\x1b[35;1m") catch {}, | ||
| 59 | .yellow => w.writeAll("\x1b[93;1m") catch {}, | ||
| 60 | .white => w.writeAll("\x1b[0m\x1b[1m") catch {}, | ||
| 61 | } | ||
| 62 | } | ||
| 63 | |||
| 64 | pub fn errorDescription(err: anyerror) []const u8 { | ||
| 65 | return switch (err) { | ||
| 66 | error.OutOfMemory => "ran out of memory", | ||
| 67 | error.FileNotFound => "file not found", | ||
| 68 | error.IsDir => "is a directory", | ||
| 69 | error.NotDir => "is not a directory", | ||
| 70 | error.NotOpenForReading => "file is not open for reading", | ||
| 71 | error.NotOpenForWriting => "file is not open for writing", | ||
| 72 | error.InvalidUtf8 => "input is not valid UTF-8", | ||
| 73 | error.FileBusy => "file is busy", | ||
| 74 | error.NameTooLong => "file name is too long", | ||
| 75 | error.AccessDenied => "access denied", | ||
| 76 | error.FileTooBig => "file is too big", | ||
| 77 | error.ProcessFdQuotaExceeded, error.SystemFdQuotaExceeded => "ran out of file descriptors", | ||
| 78 | error.SystemResources => "ran out of system resources", | ||
| 79 | error.FatalError => "a fatal error occurred", | ||
| 80 | error.Unexpected => "an unexpected error occurred", | ||
| 81 | else => @errorName(err), | ||
| 82 | }; | ||
| 83 | } | ||