comparison runtime/llvmdc.diff @ 533:2fe2d4518618

Reverted some changes in the Tango patch, splitting asm block is simply not supported by llvm.
author Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
date Sun, 24 Aug 2008 16:51:17 +0200
parents f775ea9d09d3
children 795e972e17ce
comparison
equal deleted inserted replaced
532:0beebf923322 533:2fe2d4518618
86 public import std.intrinsic; 86 public import std.intrinsic;
87 Index: lib/common/tango/core/Thread.d 87 Index: lib/common/tango/core/Thread.d
88 =================================================================== 88 ===================================================================
89 --- lib/common/tango/core/Thread.d (revision 3899) 89 --- lib/common/tango/core/Thread.d (revision 3899)
90 +++ lib/common/tango/core/Thread.d (working copy) 90 +++ lib/common/tango/core/Thread.d (working copy)
91 @@ -255,6 +255,10 @@ 91 @@ -244,8 +244,30 @@
92 }
93 body
94 {
95 - version( D_InlineAsm_X86 )
96 + version( LLVMDC)
92 { 97 {
93 __builtin_unwind_init(); 98 + version(X86)
99 + {
100 + uint eax,ecx,edx,ebx,ebp,esi,edi;
101 + asm
102 + {
103 + //pushad ;
104 + mov eax[EBP], EAX ;
105 + mov ecx[EBP], ECX ;
106 + mov edx[EBP], EDX ;
107 + mov ebx[EBP], EBX ;
108 + mov ebp[EBP], EBP ;
109 + mov esi[EBP], ESI ;
110 + mov edi[EBP], EDI ;
111 + }
112 + }
113 + else
114 + {
115 + static assert( false, "Architecture not supported." );
116 + }
117 + }
118 + else version( D_InlineAsm_X86 )
119 + {
120 asm
121 {
122 pushad;
123 @@ -297,6 +319,10 @@
124 }
94 } 125 }
95 + else version( LLVMDC ) 126
96 + { 127 + version( LLVMDC)
97 + pragma(msg, "don't know how to push registers on the stack for this architecture with LLVMDC"); 128 + {
98 + } 129 + // nothing to pop
99 else 130 + }
131 version( D_InlineAsm_X86 )
100 { 132 {
101 static assert( false, "Architecture not supported." ); 133 asm
102 @@ -308,6 +312,10 @@
103 {
104 // registers will be popped automatically
105 }
106 + else version( LLVMDC )
107 + {
108 + // TODO
109 + }
110 else
111 {
112 static assert( false, "Architecture not supported." );
113 Index: lib/gc/basic/gcx.d 134 Index: lib/gc/basic/gcx.d
114 =================================================================== 135 ===================================================================
115 --- lib/gc/basic/gcx.d (revision 3899) 136 --- lib/gc/basic/gcx.d (revision 3899)
116 +++ lib/gc/basic/gcx.d (working copy) 137 +++ lib/gc/basic/gcx.d (working copy)
117 @@ -2178,6 +2178,21 @@ 138 @@ -2178,6 +2178,29 @@
118 __builtin_unwind_init(); 139 __builtin_unwind_init();
119 sp = & sp; 140 sp = & sp;
120 } 141 }
121 + else version(LLVMDC) 142 + else version(LLVMDC)
122 + { 143 + {
123 + version(X86) 144 + version(X86)
124 + { 145 + {
146 + uint eax,ecx,edx,ebx,ebp,esi,edi;
125 + asm 147 + asm
126 + { 148 + {
127 + pushad ; 149 + pushad ;
150 + mov eax[EBP], EAX ;
151 + mov ecx[EBP], ECX ;
152 + mov edx[EBP], EDX ;
153 + mov ebx[EBP], EBX ;
154 + mov ebp[EBP], EBP ;
155 + mov esi[EBP], ESI ;
156 + mov edi[EBP], EDI ;
128 + mov sp[EBP],ESP ; 157 + mov sp[EBP],ESP ;
129 + } 158 + }
130 + } 159 + }
131 + else 160 + else
132 + { 161 + {
133 + pragma(msg, "don't know how to push registers on the stack for this architecture with llvmdc"); 162 + static assert( false, "Architecture not supported." );
134 + } 163 + }
135 + } 164 + }
136 else 165 else
137 { 166 {
138 asm 167 asm
139 @@ -2191,6 +2206,20 @@ 168 @@ -2191,6 +2214,10 @@
140 { 169 {
141 // nothing to do 170 // nothing to do
142 } 171 }
143 + else version(LLVMDC) 172 + else version(LLVMDC)
144 + { 173 + {
145 + version(X86) 174 + // nothing to do
146 + {
147 + asm
148 + {
149 + popad ;
150 + }
151 + }
152 + else
153 + {
154 + // TODO
155 + }
156 + } 175 + }
157 else 176 else
158 { 177 {
159 asm 178 asm
160 Index: lib/gc/basic/gcbits.d 179 Index: lib/gc/basic/gcbits.d