aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.8/libgo/go/reflect/makefunc_386.S
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.8/libgo/go/reflect/makefunc_386.S')
-rw-r--r--gcc-4.8/libgo/go/reflect/makefunc_386.S36
1 files changed, 34 insertions, 2 deletions
diff --git a/gcc-4.8/libgo/go/reflect/makefunc_386.S b/gcc-4.8/libgo/go/reflect/makefunc_386.S
index 5878bc44c..0e2e76465 100644
--- a/gcc-4.8/libgo/go/reflect/makefunc_386.S
+++ b/gcc-4.8/libgo/go/reflect/makefunc_386.S
@@ -25,9 +25,13 @@ reflect.makeFuncStub:
struct {
esp uint32 // 0x0
eax uint32 // 0x4
- st0 uint64 // 0x8
+ st0 float64 // 0x8
+ sr bool // 0x10
+ sf bool // 0x11
}
- */
+ The sr field is set by the function to a non-zero value if
+ the function takes a struct hidden pointer that must be
+ popped off the stack. */
pushl %ebp
.LCFI0:
@@ -45,6 +49,15 @@ reflect.makeFuncStub:
leal 8(%ebp), %eax /* Set esp field in struct. */
movl %eax, -24(%ebp)
+ /* For MakeFunc functions that call recover. */
+ movl 4(%ebp), %eax
+ movl %eax, (%esp)
+#ifdef __PIC__
+ call __go_makefunc_can_recover@PLT
+#else
+ call __go_makefunc_can_recover
+#endif
+
#ifdef __PIC__
call __go_get_closure@PLT
#else
@@ -62,9 +75,20 @@ reflect.makeFuncStub:
call reflect.MakeFuncStubGo
#endif
+ /* MakeFunc functions can no longer call recover. */
+#ifdef __PIC__
+ call __go_makefunc_returning@PLT
+#else
+ call __go_makefunc_returning
+#endif
+
/* Set return registers. */
movl -20(%ebp), %eax
+
+ cmpb $0, -7(%ebp)
+ je 2f
+
fldl -16(%ebp)
#ifdef __SSE2__
@@ -73,12 +97,20 @@ reflect.makeFuncStub:
movsd -16(%ebp), %xmm0
#endif
+2:
+ movb -8(%ebp), %dl
+
addl $36, %esp
popl %ebx
.LCFI3:
popl %ebp
.LCFI4:
+
+ testb %dl,%dl
+ jne 1f
ret
+1:
+ ret $4
.LFE1:
#ifdef __ELF__
.size reflect.makeFuncStub, . - reflect.makeFuncStub