| ... | @@ -5770,6 +5770,20 @@ fn airAsm(f: *Function, inst: Air.Inst.Index) !CValue { | ... | @@ -5770,6 +5770,20 @@ fn airAsm(f: *Function, inst: Air.Inst.Index) !CValue { |
| 5770 | .bool_true => { | 5770 | .bool_true => { |
| 5771 | const name = struct_type.structFieldName(i, zcu).toSlice(ip).?; | 5771 | const name = struct_type.structFieldName(i, zcu).toSlice(ip).?; |
| 5772 | assert(name.len != 0); | 5772 | assert(name.len != 0); |
| | 5773 | |
| | 5774 | const target = &f.object.dg.mod.resolved_target.result; |
| | 5775 | if (target.cpu.arch.isMIPS() and name[0] == 'r') { |
| | 5776 | // GCC uses "$N" for register names instead of "rN" used by Zig. |
| | 5777 | var c_name_buf: [4]u8 = undefined; |
| | 5778 | const c_name = (&c_name_buf)[0..name.len]; |
| | 5779 | @memcpy(c_name, name); |
| | 5780 | c_name_buf[0] = '$'; |
| | 5781 | |
| | 5782 | try w.print(" {f}", .{fmtStringLiteral(c_name, null)}); |
| | 5783 | (try w.writableArray(1))[0] = ','; |
| | 5784 | continue; |
| | 5785 | } |
| | 5786 | |
| 5773 | try w.print(" {f}", .{fmtStringLiteral(name, null)}); | 5787 | try w.print(" {f}", .{fmtStringLiteral(name, null)}); |
| 5774 | (try w.writableArray(1))[0] = ','; | 5788 | (try w.writableArray(1))[0] = ','; |
| 5775 | }, | 5789 | }, |