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

Side by Side Diff: src/pkg/runtime/386/asm.s

Issue 4711045: code review 4711045: runtime: improve Linux mutex (Closed)
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:
View unified diff | Download patch
« no previous file with comments | « src/cmd/8l/optab.c ('k') | src/pkg/runtime/amd64/asm.s » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "386/asm.h" 5 #include "386/asm.h"
6 6
7 TEXT _rt0_386(SB),7,$0 7 TEXT _rt0_386(SB),7,$0
8 // Linux, Windows start the FPU in extended double precision. 8 // Linux, Windows start the FPU in extended double precision.
9 // Other operating systems use double precision. 9 // Other operating systems use double precision.
10 // Change to double precision to match them, 10 // Change to double precision to match them,
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 // return *val; 324 // return *val;
325 TEXT runtime·xadd(SB), 7, $0 325 TEXT runtime·xadd(SB), 7, $0
326 MOVL 4(SP), BX 326 MOVL 4(SP), BX
327 MOVL 8(SP), AX 327 MOVL 8(SP), AX
328 MOVL AX, CX 328 MOVL AX, CX
329 LOCK 329 LOCK
330 XADDL AX, 0(BX) 330 XADDL AX, 0(BX)
331 ADDL CX, AX 331 ADDL CX, AX
332 RET 332 RET
333 333
334 TEXT runtime·xchg(SB), 7, $0
335 MOVL 4(SP), BX
336 MOVL 8(SP), AX
337 XCHGL AX, 0(BX)
338 RET
339
340 TEXT runtime·procyield(SB),7,$0
341 MOVL 4(SP), AX
342 again:
343 PAUSE
344 SUBL $1, AX
345 JNZ again
346 RET
347
334 TEXT runtime·atomicstorep(SB), 7, $0 348 TEXT runtime·atomicstorep(SB), 7, $0
335 MOVL 4(SP), BX 349 MOVL 4(SP), BX
336 MOVL 8(SP), AX 350 MOVL 8(SP), AX
337 XCHGL AX, 0(BX) 351 XCHGL AX, 0(BX)
338 RET 352 RET
339 353
340 // void jmpdefer(fn, sp); 354 // void jmpdefer(fn, sp);
341 // called from deferreturn. 355 // called from deferreturn.
342 // 1. pop the caller 356 // 1. pop the caller
343 // 2. sub 5 bytes from the callers return 357 // 2. sub 5 bytes from the callers return
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
517 CALL runtime·setldt(SB) 531 CALL runtime·setldt(SB)
518 RET 532 RET
519 533
520 TEXT runtime·emptyfunc(SB),0,$0 534 TEXT runtime·emptyfunc(SB),0,$0
521 RET 535 RET
522 536
523 TEXT runtime·abort(SB),7,$0 537 TEXT runtime·abort(SB),7,$0
524 INT $0x3 538 INT $0x3
525 539
526 GLOBL runtime·tls0(SB), $32 540 GLOBL runtime·tls0(SB), $32
OLDNEW
« no previous file with comments | « src/cmd/8l/optab.c ('k') | src/pkg/runtime/amd64/asm.s » ('j') | no next file with comments »

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