1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
|
From: Daniel Knezevic <daniel.knezevic@imgtec.com>
Date: Thu, 10 Nov 2016 12:29:17 +0100
Subject: remove big endian distinction on mips
---
src/modp_numtoa.c | 21 ---------------------
1 file changed, 21 deletions(-)
diff --git a/src/modp_numtoa.c b/src/modp_numtoa.c
index 2ec1e69..1c8eada 100644
--- a/src/modp_numtoa.c
+++ b/src/modp_numtoa.c
@@ -322,14 +322,6 @@ size_t modp_dtoa2(double value, char* str, int prec)
return (size_t)(wstr - str);
}
-#include "config.h"
-
-/* You can get rid of the include, but adding... */
-/* if on motorola, sun, ibm; uncomment this */
-/* #define WORDS_BIGENDIAN 1 */
-/* else for Intel, Amd; uncomment this */
-/* #undef WORDS_BIGENDIAN */
-
char* modp_uitoa16(uint32_t value, char* str, int isfinal)
{
static const char* hexchars = "0123456789ABCDEF";
@@ -340,8 +332,6 @@ char* modp_uitoa16(uint32_t value, char* str, int isfinal)
* Each line is independent than the previous, so
* even dumb compilers can pipeline without loop unrolling
*/
-#ifndef WORDS_BIGENDIAN
- /* x86 */
str[0] = hexchars[(value >> 28) & 0x0000000F];
str[1] = hexchars[(value >> 24) & 0x0000000F];
str[2] = hexchars[(value >> 20) & 0x0000000F];
@@ -350,17 +340,6 @@ char* modp_uitoa16(uint32_t value, char* str, int isfinal)
str[5] = hexchars[(value >> 8) & 0x0000000F];
str[6] = hexchars[(value >> 4) & 0x0000000F];
str[7] = hexchars[(value)&0x0000000F];
-#else
- /* sun, motorola, ibm */
- str[0] = hexchars[(value)&0x0000000F];
- str[1] = hexchars[(value >> 4) & 0x0000000F];
- str[2] = hexchars[(value >> 8) & 0x0000000F];
- str[3] = hexchars[(value >> 12) & 0x0000000F];
- str[4] = hexchars[(value >> 16) & 0x0000000F];
- str[5] = hexchars[(value >> 20) & 0x0000000F];
- str[6] = hexchars[(value >> 24) & 0x0000000F];
- str[7] = hexchars[(value >> 28) & 0x0000000F];
-#endif
if (isfinal) {
str[8] = '\0';
|