Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(122)

Side by Side Diff: src/objects.h

Issue 119420: Fix fp code for mixed-endian ARM. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/arm/codegen-arm.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2006-2009 the V8 project authors. All rights reserved. 1 // Copyright 2006-2009 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 1145 matching lines...) Expand 10 before | Expand all | Expand 10 after
1156 Object* HeapNumberToBoolean(); 1156 Object* HeapNumberToBoolean();
1157 void HeapNumberPrint(); 1157 void HeapNumberPrint();
1158 void HeapNumberPrint(StringStream* accumulator); 1158 void HeapNumberPrint(StringStream* accumulator);
1159 #ifdef DEBUG 1159 #ifdef DEBUG
1160 void HeapNumberVerify(); 1160 void HeapNumberVerify();
1161 #endif 1161 #endif
1162 1162
1163 // Layout description. 1163 // Layout description.
1164 static const int kValueOffset = HeapObject::kHeaderSize; 1164 static const int kValueOffset = HeapObject::kHeaderSize;
1165 // IEEE doubles are two 32 bit words. The first is just mantissa, the second 1165 // IEEE doubles are two 32 bit words. The first is just mantissa, the second
1166 // is a mixture of sign, exponent and mantissa. This is the ordering on a 1166 // is a mixture of sign, exponent and mantissa. Our current platforms are all
1167 // little endian machine with little endian double word ordering. 1167 // little endian apart from non-EABI arm which is little endian with big
1168 // endian floating point word ordering!
1169 #if !defined(V8_HOST_ARCH_ARM) || __ARM_EABI__
1168 static const int kMantissaOffset = kValueOffset; 1170 static const int kMantissaOffset = kValueOffset;
1169 static const int kExponentOffset = kValueOffset + 4; 1171 static const int kExponentOffset = kValueOffset + 4;
1172 #else
1173 static const int kMantissaOffset = kValueOffset + 4;
1174 static const int kExponentOffset = kValueOffset;
1175 # define BIG_ENDIAN_FLOATING_POINT
iposva 2009/06/10 16:22:28 Please define BIG_ENDIAN_FLOATING_POINT to carry a
1176 #endif
1170 static const int kSize = kValueOffset + kDoubleSize; 1177 static const int kSize = kValueOffset + kDoubleSize;
1171 1178
1172 static const uint32_t kSignMask = 0x80000000u; 1179 static const uint32_t kSignMask = 0x80000000u;
1173 static const uint32_t kExponentMask = 0x7ff00000u; 1180 static const uint32_t kExponentMask = 0x7ff00000u;
1174 static const uint32_t kMantissaMask = 0xfffffu; 1181 static const uint32_t kMantissaMask = 0xfffffu;
1175 static const int kExponentBias = 1023; 1182 static const int kExponentBias = 1023;
1176 static const int kExponentShift = 20; 1183 static const int kExponentShift = 20;
1177 static const int kMantissaBitsInTopWord = 20; 1184 static const int kMantissaBitsInTopWord = 20;
1178 static const int kNonMantissaBitsInTopWord = 12; 1185 static const int kNonMantissaBitsInTopWord = 12;
1179 1186
(...skipping 3280 matching lines...) Expand 10 before | Expand all | Expand 10 after
4460 } else { 4467 } else {
4461 value &= ~(1 << bit_position); 4468 value &= ~(1 << bit_position);
4462 } 4469 }
4463 return value; 4470 return value;
4464 } 4471 }
4465 }; 4472 };
4466 4473
4467 } } // namespace v8::internal 4474 } } // namespace v8::internal
4468 4475
4469 #endif // V8_OBJECTS_H_ 4476 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/arm/codegen-arm.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698