@@ -358,41 +358,6 @@ class Thread : ThreadBase
358358 static assert (false , " Architecture not supported." );
359359 }
360360 }
361- else version (Darwin)
362- {
363- version (X86 )
364- {
365- uint [8 ] m_reg; // edi,esi,ebp,esp,ebx,edx,ecx,eax
366- }
367- else version (X86_64 )
368- {
369- ulong [16 ] m_reg; // rdi,rsi,rbp,rsp,rbx,rdx,rcx,rax
370- // r8,r9,r10,r11,r12,r13,r14,r15
371- }
372- else version (AArch64 )
373- {
374- ulong [33 ] m_reg; // x0-x31, pc
375- }
376- else version (ARM )
377- {
378- uint [16 ] m_reg; // r0-r15
379- }
380- else version (PPC )
381- {
382- // Make the assumption that we only care about non-fp and non-vr regs.
383- // ??? : it seems plausible that a valid address can be copied into a VR.
384- uint [32 ] m_reg; // r0-31
385- }
386- else version (PPC64 )
387- {
388- // As above.
389- ulong [32 ] m_reg; // r0-31
390- }
391- else
392- {
393- static assert (false , " Architecture not supported." );
394- }
395- }
396361
397362
398363 // /////////////////////////////////////////////////////////////////////////
@@ -1699,15 +1664,6 @@ private extern (D) bool suspend( Thread t ) nothrow @nogc
16991664 onThreadError( " Unable to load thread state" );
17001665 if ( ! t.m_lock )
17011666 t.m_curr.tstack = cast (void * ) state.esp;
1702- // eax,ebx,ecx,edx,edi,esi,ebp,esp
1703- t.m_reg[0 ] = state.eax;
1704- t.m_reg[1 ] = state.ebx;
1705- t.m_reg[2 ] = state.ecx;
1706- t.m_reg[3 ] = state.edx;
1707- t.m_reg[4 ] = state.edi;
1708- t.m_reg[5 ] = state.esi;
1709- t.m_reg[6 ] = state.ebp;
1710- t.m_reg[7 ] = state.esp;
17111667 }
17121668 else version (X86_64 )
17131669 {
@@ -1718,24 +1674,6 @@ private extern (D) bool suspend( Thread t ) nothrow @nogc
17181674 onThreadError( " Unable to load thread state" );
17191675 if ( ! t.m_lock )
17201676 t.m_curr.tstack = cast (void * ) state.rsp;
1721- // rax,rbx,rcx,rdx,rdi,rsi,rbp,rsp
1722- t.m_reg[0 ] = state.rax;
1723- t.m_reg[1 ] = state.rbx;
1724- t.m_reg[2 ] = state.rcx;
1725- t.m_reg[3 ] = state.rdx;
1726- t.m_reg[4 ] = state.rdi;
1727- t.m_reg[5 ] = state.rsi;
1728- t.m_reg[6 ] = state.rbp;
1729- t.m_reg[7 ] = state.rsp;
1730- // r8,r9,r10,r11,r12,r13,r14,r15
1731- t.m_reg[8 ] = state.r8;
1732- t.m_reg[9 ] = state.r9;
1733- t.m_reg[10 ] = state.r10;
1734- t.m_reg[11 ] = state.r11;
1735- t.m_reg[12 ] = state.r12;
1736- t.m_reg[13 ] = state.r13;
1737- t.m_reg[14 ] = state.r14;
1738- t.m_reg[15 ] = state.r15;
17391677 }
17401678 else version (AArch64 )
17411679 {
@@ -1749,12 +1687,6 @@ private extern (D) bool suspend( Thread t ) nothrow @nogc
17491687 // printf("state count %d (expect %d)\n", count ,ARM_THREAD_STATE64_COUNT);
17501688 if (! t.m_lock)
17511689 t.m_curr.tstack = cast (void * ) state.sp;
1752-
1753- t.m_reg[0 .. 29 ] = state.x; // x0-x28
1754- t.m_reg[29 ] = state.fp; // x29
1755- t.m_reg[30 ] = state.lr; // x30
1756- t.m_reg[31 ] = state.sp; // x31
1757- t.m_reg[32 ] = state.pc;
17581690 }
17591691 else version (ARM )
17601692 {
@@ -1770,11 +1702,6 @@ private extern (D) bool suspend( Thread t ) nothrow @nogc
17701702 // printf("state count %d (expect %d)\n", count ,ARM_THREAD_STATE32_COUNT);
17711703 if (! t.m_lock)
17721704 t.m_curr.tstack = cast (void * ) state.sp;
1773-
1774- t.m_reg[0 .. 13 ] = state.r; // r0 - r13
1775- t.m_reg[13 ] = state.sp;
1776- t.m_reg[14 ] = state.lr;
1777- t.m_reg[15 ] = state.pc;
17781705 }
17791706 else version (PPC )
17801707 {
@@ -1785,7 +1712,6 @@ private extern (D) bool suspend( Thread t ) nothrow @nogc
17851712 onThreadError(" Unable to load thread state" );
17861713 if (! t.m_lock)
17871714 t.m_curr.tstack = cast (void * ) state.r[1 ];
1788- t.m_reg[] = state.r[];
17891715 }
17901716 else version (PPC64 )
17911717 {
@@ -1796,7 +1722,6 @@ private extern (D) bool suspend( Thread t ) nothrow @nogc
17961722 onThreadError(" Unable to load thread state" );
17971723 if (! t.m_lock)
17981724 t.m_curr.tstack = cast (void * ) state.r[1 ];
1799- t.m_reg[] = state.r[];
18001725 }
18011726 else
18021727 {
@@ -1956,7 +1881,6 @@ private extern (D) void resume(ThreadBase _t) nothrow @nogc
19561881
19571882 if ( ! t.m_lock )
19581883 t.m_curr.tstack = t.m_curr.bstack;
1959- t.m_reg[0 .. $] = 0 ;
19601884 }
19611885 else version (Posix )
19621886 {
0 commit comments