]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: windows callback code to match new func value representation
authorAlex Brainman <alex.brainman@gmail.com>
Fri, 22 Feb 2013 01:21:42 +0000 (12:21 +1100)
committerAlex Brainman <alex.brainman@gmail.com>
Fri, 22 Feb 2013 01:21:42 +0000 (12:21 +1100)
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/7393048

src/pkg/runtime/callback_windows_386.c
src/pkg/runtime/callback_windows_amd64.c

index 97df7c242f32749e0bed051e391e7b34d0920c15..159b8508e2be1500e2152863687b01d30b9056a9 100644 (file)
@@ -80,7 +80,7 @@ runtime·compilecallback(Eface fn, bool cleanstack)
 
        // MOVL fn, AX
        *p++ = 0xb8;
-       *(uint32*)p = (uint32)fn.data;
+       *(uint32*)p = (uint32)(*(byte**)fn.data);
        p += 4;
 
        // MOVL argsize, DX
index 0a2e53e6f51c26c630fc7d96c5a35ca1d826d4e8..03a4cef136b347ebe94258055374e5cf3619e5b2 100644 (file)
@@ -78,7 +78,7 @@ runtime·compilecallback(Eface fn, bool /*cleanstack*/)
        // MOVQ fn, AX
        *p++ = 0x48;
        *p++ = 0xb8;
-       *(uint64*)p = (uint64)fn.data;
+       *(uint64*)p = (uint64)(*(byte**)fn.data);
        p += 8;
        // PUSH AX
        *p++ = 0x50;