Wiki Roadmap Timeline Tickets New Ticket Source Search Help / Guide About Trac Login

Changeset 641:d9927f20758b

Show
Ignore:
Timestamp:
10/03/08 03:11:41 (3 months ago)
Author:
Christian Kamm <kamm incasoftware de>
branch:
default
Message:

Fiber support: clobber the registers we want restored on a context switch.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • runtime/llvmdc.diff

    r640 r641  
    122122 // Fiber Entry Point and Context Switch 
    123123 //////////////////////////////////////////////////////////////////////////////// 
    124 @@ -2450,6 +2484,17 @@ 
     124@@ -2450,6 +2484,22 @@ 
    125125                 ret; 
    126126             } 
     
    130130+            asm 
    131131+            { 
     132+                // clobber registers to save 
     133+                inc EBX; 
     134+                inc ESI; 
     135+                inc EDI; 
     136+ 
    132137+                // store oldp again with more accurate address 
    133138+                mov EAX, oldp; 
     
    140145         { 
    141146             Fiber   cfib = Fiber.getThis(); 
    142 @@ -3115,6 +3160,13 @@ 
     147@@ -3115,6 +3165,16 @@ 
    143148             push( 0x00000000 );                                     // ESI 
    144149             push( 0x00000000 );                                     // EDI 
     
    147152+        { 
    148153+            push( cast(size_t) &fiber_entryPoint );                 // EIP 
    149 +            push( 0x00000000 );                                     // EBP 
    150154+            push( 0x00000000 );                                     // newp 
    151155+            push( 0x00000000 );                                     // oldp 
     156+            push( 0x00000000 );                                     // EBP 
     157+            push( 0x00000000 );                                     // EBX 
     158+            push( 0x00000000 );                                     // ESI 
     159+            push( 0x00000000 );                                     // EDI 
    152160+        } 
    153161         else version( AsmPPC_Posix ) 
Copyright © 2008, LDC Development Team.