Commit f4efd1660326ee85023c980abc533143dee8228d

Authored by blueswir1
1 parent f48f3ede

Revert incorrect part of r4574 to avoid unaligned traps with i386 target

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5209 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 1 changed file with 0 additions and 38 deletions
cpu-all.h
... ... @@ -233,15 +233,6 @@ static inline int lduw_le_p(void *ptr)
233 233 int val;
234 234 __asm__ __volatile__ ("lhbrx %0,0,%1" : "=r" (val) : "r" (ptr));
235 235 return val;
236   -#elif defined(__sparc__)
237   -#ifndef ASI_PRIMARY_LITTLE
238   -#define ASI_PRIMARY_LITTLE 0x88
239   -#endif
240   -
241   - int val;
242   - __asm__ __volatile__ ("lduha [%1] %2, %0" : "=r" (val) : "r" (ptr),
243   - "i" (ASI_PRIMARY_LITTLE));
244   - return val;
245 236 #else
246 237 uint8_t *p = ptr;
247 238 return p[0] | (p[1] << 8);
... ... @@ -254,11 +245,6 @@ static inline int ldsw_le_p(void *ptr)
254 245 int val;
255 246 __asm__ __volatile__ ("lhbrx %0,0,%1" : "=r" (val) : "r" (ptr));
256 247 return (int16_t)val;
257   -#elif defined(__sparc__)
258   - int val;
259   - __asm__ __volatile__ ("ldsha [%1] %2, %0" : "=r" (val) : "r" (ptr),
260   - "i" (ASI_PRIMARY_LITTLE));
261   - return val;
262 248 #else
263 249 uint8_t *p = ptr;
264 250 return (int16_t)(p[0] | (p[1] << 8));
... ... @@ -271,11 +257,6 @@ static inline int ldl_le_p(void *ptr)
271 257 int val;
272 258 __asm__ __volatile__ ("lwbrx %0,0,%1" : "=r" (val) : "r" (ptr));
273 259 return val;
274   -#elif defined(__sparc__)
275   - int val;
276   - __asm__ __volatile__ ("lduwa [%1] %2, %0" : "=r" (val) : "r" (ptr),
277   - "i" (ASI_PRIMARY_LITTLE));
278   - return val;
279 260 #else
280 261 uint8_t *p = ptr;
281 262 return p[0] | (p[1] << 8) | (p[2] << 16) | (p[3] << 24);
... ... @@ -284,27 +265,17 @@ static inline int ldl_le_p(void *ptr)
284 265  
285 266 static inline uint64_t ldq_le_p(void *ptr)
286 267 {
287   -#if defined(__sparc__)
288   - uint64_t val;
289   - __asm__ __volatile__ ("ldxa [%1] %2, %0" : "=r" (val) : "r" (ptr),
290   - "i" (ASI_PRIMARY_LITTLE));
291   - return val;
292   -#else
293 268 uint8_t *p = ptr;
294 269 uint32_t v1, v2;
295 270 v1 = ldl_le_p(p);
296 271 v2 = ldl_le_p(p + 4);
297 272 return v1 | ((uint64_t)v2 << 32);
298   -#endif
299 273 }
300 274  
301 275 static inline void stw_le_p(void *ptr, int v)
302 276 {
303 277 #ifdef __powerpc__
304 278 __asm__ __volatile__ ("sthbrx %1,0,%2" : "=m" (*(uint16_t *)ptr) : "r" (v), "r" (ptr));
305   -#elif defined(__sparc__)
306   - __asm__ __volatile__ ("stha %1, [%2] %3" : "=m" (*(uint16_t *)ptr) : "r" (v),
307   - "r" (ptr), "i" (ASI_PRIMARY_LITTLE));
308 279 #else
309 280 uint8_t *p = ptr;
310 281 p[0] = v;
... ... @@ -316,9 +287,6 @@ static inline void stl_le_p(void *ptr, int v)
316 287 {
317 288 #ifdef __powerpc__
318 289 __asm__ __volatile__ ("stwbrx %1,0,%2" : "=m" (*(uint32_t *)ptr) : "r" (v), "r" (ptr));
319   -#elif defined(__sparc__)
320   - __asm__ __volatile__ ("stwa %1, [%2] %3" : "=m" (*(uint32_t *)ptr) : "r" (v),
321   - "r" (ptr), "i" (ASI_PRIMARY_LITTLE));
322 290 #else
323 291 uint8_t *p = ptr;
324 292 p[0] = v;
... ... @@ -330,15 +298,9 @@ static inline void stl_le_p(void *ptr, int v)
330 298  
331 299 static inline void stq_le_p(void *ptr, uint64_t v)
332 300 {
333   -#if defined(__sparc__)
334   - __asm__ __volatile__ ("stxa %1, [%2] %3" : "=m" (*(uint64_t *)ptr) : "r" (v),
335   - "r" (ptr), "i" (ASI_PRIMARY_LITTLE));
336   -#undef ASI_PRIMARY_LITTLE
337   -#else
338 301 uint8_t *p = ptr;
339 302 stl_le_p(p, (uint32_t)v);
340 303 stl_le_p(p + 4, v >> 32);
341   -#endif
342 304 }
343 305  
344 306 /* float access */
... ...