| ... | @@ -5529,7 +5529,9 @@ fn airAsm(f: *Function, inst: Air.Inst.Index) !CValue { | ... | @@ -5529,7 +5529,9 @@ fn airAsm(f: *Function, inst: Air.Inst.Index) !CValue { |
| 5529 | .alignas = CType.AlignAs.fromAbiAlignment(input_ty.abiAlignment(zcu)), | 5529 | .alignas = CType.AlignAs.fromAbiAlignment(input_ty.abiAlignment(zcu)), |
| 5530 | }); | 5530 | }); |
| 5531 | try f.allocs.put(gpa, input_local.new_local, false); | 5531 | try f.allocs.put(gpa, input_local.new_local, false); |
| 5532 | try f.object.dg.renderTypeAndName(w, input_ty, input_local, Const, .none, .complete); | 5532 | // Do not render the declaration as `const` qualified if we're generating an |
| | 5533 | // explicit `register` local, as GCC will ignore the constraint completely. |
| | 5534 | try f.object.dg.renderTypeAndName(w, input_ty, input_local, if (is_reg) .{} else Const, .none, .complete); |
| 5533 | if (is_reg) { | 5535 | if (is_reg) { |
| 5534 | try w.writeAll(" __asm(\""); | 5536 | try w.writeAll(" __asm(\""); |
| 5535 | try w.writeAll(constraint["{".len .. constraint.len - "}".len]); | 5537 | try w.writeAll(constraint["{".len .. constraint.len - "}".len]); |