mirror of git://gcc.gnu.org/git/gcc.git
				
				
				
			re PR other/85161 (Test case failures in libbacktrace on powerpc64 BE starting with r253456)
PR other/85161 * elf.c (elf_zlib_fetch): Fix up predefined macro names in test for big endian, only use 32-bit loads if endianity macros are predefined and indicate big or little endian. From-SVN: r259096
This commit is contained in:
		
							parent
							
								
									600583ab73
								
							
						
					
					
						commit
						c5c4b2ae6e
					
				|  | @ -1,3 +1,10 @@ | |||
| 2018-04-04  Jakub Jelinek  <jakub@redhat.com> | ||||
| 
 | ||||
| 	PR other/85161 | ||||
| 	* elf.c (elf_zlib_fetch): Fix up predefined macro names in test for | ||||
| 	big endian, only use 32-bit loads if endianity macros are predefined | ||||
| 	and indicate big or little endian. | ||||
| 
 | ||||
| 2018-02-14  Igor Tsimbalist  <igor.v.tsimbalist@intel.com> | ||||
| 
 | ||||
| 	PR target/84148 | ||||
|  |  | |||
|  | @ -1086,12 +1086,19 @@ elf_zlib_fetch (const unsigned char **ppin, const unsigned char *pinend, | |||
|       return 0; | ||||
|     } | ||||
| 
 | ||||
| #if defined(__BYTE_ORDER__) && defined(__ORDER_LITTLE_ENDIAN__) \ | ||||
|     && defined(__ORDER_BIG_ENDIAN__) \ | ||||
|     && (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ \ | ||||
|         || __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__) | ||||
|   /* We've ensured that PIN is aligned.  */ | ||||
|   next = *(const uint32_t *)pin; | ||||
| 
 | ||||
| #if __BYTE_ORDER == __ORDER_BIG_ENDIAN | ||||
| #if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ | ||||
|   next = __builtin_bswap32 (next); | ||||
| #endif | ||||
| #else | ||||
|   next = pin[0] | (pin[1] << 8) | (pin[2] << 16) | (pin[3] << 24); | ||||
| #endif | ||||
| 
 | ||||
|   val |= (uint64_t)next << bits; | ||||
|   bits += 32; | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	 Jakub Jelinek
						Jakub Jelinek