|
|
| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2009 The Go Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style | |
| 3 // license that can be found in the LICENSE file. | |
| 4 | |
| 5 #define ARGS_OFFSET 8 | |
|
rsc1
2010年10月12日 02:50:08
only used once; can go away
only used once; can go away
paulzhol
2010年10月12日 08:06:59
Done.
On 2010年10月12日 02:50:08, rsc1 wrote:
> only used once; can go away
Done.
| |
| 6 | |
| 7 TEXT _rt0_386_plan9(SB),7, 0ドル | |
| 8 MOVL AX, _tos(SB) | |
| 9 | |
| 10 // move arguments down to SP | |
| 11 LEAL argc+0(SP), SI | |
|
rsc1
2010年10月12日 02:50:08
// move arguments down to make room for
// m and g
// move arguments down to make room for
// m and g at top of stack.
MOVL SP, SI
SUBL 8,ドル SP
MOVL SP, DI
seems pretty clear to me
paulzhol
2010年10月12日 08:06:59
Done.
On 2010年10月12日 02:50:08, rsc1 wrote:
> // move arguments down to make room for
> // m and g at top of stack.
> MOVL SP, SI
> SUBL 8,ドル SP
> MOVL SP, DI
>
>
> seems pretty clear to me
Done.
| |
| 12 ········ | |
| 13 SUBL $ARGS_OFFSET, SP········ | |
| 14 MOVL SP, DI | |
| 15 ················ | |
| 16 MOVL AX, CX | |
| 17 SUBL SI, CX | |
| 18 CLD | |
| 19 REP; MOVSB | |
| 20 ········ | |
| 21 // adjust argv | |
| 22 SUBL SI, DI | |
| 23 MOVL newargc+0(SP), CX | |
| 24 LEAL newargv+4(SP), BP | |
| 25 argv_fix: | |
| 26 ADDL DI, 0(BP) | |
| 27 ADDL 4,ドル BP | |
| 28 LOOP argv_fix | |
| 29 ········ | |
| 30 JMP _rt0_386(SB) | |
| 31 | |
| 32 DATA isplan9+0(SB)/4, 1ドル | |
| 33 GLOBL isplan9(SB), 4ドル | |
| 34 GLOBL _tos(SB), 4ドル | |
| OLD | NEW |