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

Side by Side Diff: src/libcgo/386.S

Issue 834045: code review 834045: Library support for cgo export. (Closed)
Patch Set: code review 834045: Library support for cgo export. Created 13 years, 11 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 | « no previous file | src/pkg/runtime/386/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 /* 5 /*
6 * Apple still insists on underscore prefixes for C function names. 6 * Apple still insists on underscore prefixes for C function names.
7 */ 7 */
8 #if defined(__APPLE__) || defined(__MINGW32__) 8 #if defined(__APPLE__) || defined(__MINGW32__)
9 #define EXT(s) _##s 9 #define EXT(s) _##s
10 #else 10 #else
(...skipping 17 matching lines...) Expand all
28 28
29 movl 8(%ebp), %eax /* fn */ 29 movl 8(%ebp), %eax /* fn */
30 call *%eax 30 call *%eax
31 31
32 popl %edi 32 popl %edi
33 popl %esi 33 popl %esi
34 popl %ebx 34 popl %ebx
35 popl %ebp 35 popl %ebp
36 ret 36 ret
37 37
38 /*
39 * void crosscall2(void (*fn)(void*, int32), void*, int32)
40 *
41 * Save registers and call fn with two arguments.
42 */
43 .globl EXT(crosscall2)
44 EXT(crosscall2):
45 pushl %ebp
46 movl %esp, %ebp
47 pushl %ebx
48 pushl %esi
49 pushl %edi
50
51 pushl 16(%ebp)
52 pushl 12(%ebp)
53 mov 8(%ebp), %eax
54 call *%eax
55 addl $8,%esp
56
57 popl %edi
58 popl %esi
59 popl %ebx
60 popl %ebp
61 ret
OLDNEW
« no previous file with comments | « no previous file | src/pkg/runtime/386/asm.s » ('j') | no next file with comments »

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