Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(521)

Delta Between Two Patch Sets: src/pkg/runtime/amd64/asm.s

Issue 4711045: code review 4711045: runtime: improve Linux mutex (Closed)
Left Patch Set: diff -r dd24571e45dc https://go.googlecode.com/hg/ Created 13 years, 8 months ago
Right Patch Set: diff -r c162ec4be385 https://go.googlecode.com/hg/ Created 13 years, 7 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Right: Side by side diff | Download
« no previous file with change/comment | « src/pkg/runtime/386/asm.s ('k') | src/pkg/runtime/arm/atomic.c » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
(no file at all)
1 // Copyright 2009 The Go Authors. All rights reserved. 1 // Copyright 2009 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style 2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file. 3 // license that can be found in the LICENSE file.
4 4
5 #include "amd64/asm.h" 5 #include "amd64/asm.h"
6 6
7 TEXT _rt0_amd64(SB),7,$-8 7 TEXT _rt0_amd64(SB),7,$-8
8 // copy arguments forward on an even stack 8 // copy arguments forward on an even stack
9 MOVQ 0(DI), AX // argc 9 MOVQ 0(DI), AX // argc
10 LEAQ 8(DI), BX // argv 10 LEAQ 8(DI), BX // argv
(...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after
369 // Atomically: 369 // Atomically:
370 // *val += delta; 370 // *val += delta;
371 // return *val; 371 // return *val;
372 TEXT runtime·xadd(SB), 7, $0 372 TEXT runtime·xadd(SB), 7, $0
373 MOVQ 8(SP), BX 373 MOVQ 8(SP), BX
374 MOVL 16(SP), AX 374 MOVL 16(SP), AX
375 MOVL AX, CX 375 MOVL AX, CX
376 LOCK 376 LOCK
377 XADDL AX, 0(BX) 377 XADDL AX, 0(BX)
378 ADDL CX, AX 378 ADDL CX, AX
379 RET
380
381 TEXT runtime·xchg(SB), 7, $0
382 MOVQ 8(SP), BX
383 MOVL 16(SP), AX
384 XCHGL AX, 0(BX)
385 RET
386
387 TEXT runtime·procyield(SB),7,$0
388 MOVL 8(SP), AX
389 again:
390 PAUSE
391 SUBL $1, AX
392 JNZ again
379 RET 393 RET
380 394
381 TEXT runtime·atomicstorep(SB), 7, $0 395 TEXT runtime·atomicstorep(SB), 7, $0
382 MOVQ 8(SP), BX 396 MOVQ 8(SP), BX
383 MOVQ 16(SP), AX 397 MOVQ 16(SP), AX
384 XCHGQ AX, 0(BX) 398 XCHGQ AX, 0(BX)
385 RET 399 RET
386 400
387 // void jmpdefer(fn, sp); 401 // void jmpdefer(fn, sp);
388 // called from deferreturn. 402 // called from deferreturn.
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
548 MOVQ x+0(FP),AX // addr of first arg 562 MOVQ x+0(FP),AX // addr of first arg
549 MOVQ x+8(FP), BX 563 MOVQ x+8(FP), BX
550 MOVQ BX, -8(AX) // set calling pc 564 MOVQ BX, -8(AX) // set calling pc
551 RET 565 RET
552 566
553 TEXT runtime·getcallersp(SB),7,$0 567 TEXT runtime·getcallersp(SB),7,$0
554 MOVQ sp+0(FP), AX 568 MOVQ sp+0(FP), AX
555 RET 569 RET
556 570
557 GLOBL runtime·tls0(SB), $64 571 GLOBL runtime·tls0(SB), $64
LEFTRIGHT

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b