~john-koepi/ubuntu/trusty/golang/default

« back to all changes in this revision

Viewing changes to src/pkg/runtime/cgo/windows_amd64.c

  • Committer: Bazaar Package Importer
  • Author(s): Ondřej Surý
  • Date: 2011-08-03 17:04:59 UTC
  • mfrom: (14.1.2 sid)
  • Revision ID: james.westby@ubuntu.com-20110803170459-wzd99m3567y80ila
Tags: 1:59-1
* Imported Upstream version 59
* Refresh patches to a new release
* Fix FTBFS on ARM (Closes: #634270)
* Update version.bash to work with Debian packaging and not hg
  repository

Show diffs side-by-side

added added

removed removed

Lines of Context:
37
37
        ts.g->stackbase = (uintptr)&ts;
38
38
 
39
39
        /*
40
 
        * libcgo_sys_thread_start set stackguard to stack size;
41
 
        * change to actual guard pointer.
42
 
        */
 
40
         * libcgo_sys_thread_start set stackguard to stack size;
 
41
         * change to actual guard pointer.
 
42
         */
43
43
        ts.g->stackguard = (uintptr)&ts - ts.g->stackguard + 4096;
44
44
 
45
 
        crosscall_386(ts.fn);
 
45
        /*
 
46
         * Set specific keys in thread local storage.
 
47
         */
 
48
        asm volatile (
 
49
          "movq %%gs:0x58, %%rax\n" // MOVQ 0x58(GS), tmp
 
50
          "movq %0, 0(%%rax)\n" // MOVQ g, 0(GS)
 
51
          "movq %1, 8(%%rax)\n" // MOVQ m, 8(GS)
 
52
          :: "r"(ts.g), "r"(ts.m) : "%rax"
 
53
        );
 
54
 
 
55
        crosscall_amd64(ts.fn);
46
56
        return nil;
47
57
}