| ... | @@ -614,23 +614,24 @@ fn clone() callconv(.Naked) void { | ... | @@ -614,23 +614,24 @@ fn clone() callconv(.Naked) void { |
| 614 | \\ # Shuffle the arguments | 614 | \\ # Shuffle the arguments |
| 615 | \\ mov 217, %%g1 | 615 | \\ mov 217, %%g1 |
| 616 | \\ mov %%i2, %%o0 | 616 | \\ mov %%i2, %%o0 |
| 617 | \\ sub %%i1, 2047, %%o1 | 617 | \\ # Add some extra space for the initial frame |
| | 618 | \\ sub %%i1, 176 + 2047, %%o1 |
| 618 | \\ mov %%i4, %%o2 | 619 | \\ mov %%i4, %%o2 |
| 619 | \\ mov %%i5, %%o3 | 620 | \\ mov %%i5, %%o3 |
| 620 | \\ ldx [%%fp + 192 - 2*8 + 2047], %%o4 | 621 | \\ ldx [%%fp + 0x8af], %%o4 |
| 621 | \\ t 0x6d | 622 | \\ t 0x6d |
| 622 | \\ bcs,pn %%xcc, 2f | 623 | \\ bcs,pn %%xcc, 2f |
| 623 | \\ nop | 624 | \\ nop |
| 624 | \\ # sparc64 returns the child pid in o0 and a flag telling | 625 | \\ # The child pid is returned in o0 while o1 tells if this |
| 625 | \\ # whether the process is the child in o1 | 626 | \\ # process is # the child (=1) or the parent (=0). |
| 626 | \\ brnz %%o1, 1f | 627 | \\ brnz %%o1, 1f |
| 627 | \\ nop | 628 | \\ nop |
| 628 | \\ # This is the parent process, return the child pid | 629 | \\ # Parent process, return the child pid |
| 629 | \\ mov %%o0, %%i0 | 630 | \\ mov %%o0, %%i0 |
| 630 | \\ ret | 631 | \\ ret |
| 631 | \\ restore | 632 | \\ restore |
| 632 | \\1: | 633 | \\1: |
| 633 | \\ # This is the child process | 634 | \\ # Child process, call func(arg) |
| 634 | \\ mov %%g0, %%fp | 635 | \\ mov %%g0, %%fp |
| 635 | \\ call %%g2 | 636 | \\ call %%g2 |
| 636 | \\ mov %%g3, %%o0 | 637 | \\ mov %%g3, %%o0 |