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

Side by Side Diff: src/globals.h

Issue 90643003: Experimental implementation: Exposing SIMD instructions into JavaScript Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years 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/flag-definitions.h ('k') | src/heap.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 #endif 214 #endif
215 215
216 #if (defined(__APPLE__) && defined(__MACH__)) || \ 216 #if (defined(__APPLE__) && defined(__MACH__)) || \
217 defined(__FreeBSD__) || defined(__OpenBSD__) 217 defined(__FreeBSD__) || defined(__OpenBSD__)
218 #define USING_BSD_ABI 218 #define USING_BSD_ABI
219 #endif 219 #endif
220 220
221 // ----------------------------------------------------------------------------- 221 // -----------------------------------------------------------------------------
222 // Constants 222 // Constants
223 223
224 struct float32x4_value_t { float storage[4]; };
225 struct int32x4_value_t { int32_t storage[4]; };
226 union xmm_value_t {
227 double d[2];
228 float32x4_value_t f;
229 int32x4_value_t u;
230 };
231
224 const int KB = 1024; 232 const int KB = 1024;
225 const int MB = KB * KB; 233 const int MB = KB * KB;
226 const int GB = KB * KB * KB; 234 const int GB = KB * KB * KB;
227 const int kMaxInt = 0x7FFFFFFF; 235 const int kMaxInt = 0x7FFFFFFF;
228 const int kMinInt = -kMaxInt - 1; 236 const int kMinInt = -kMaxInt - 1;
229 const int kMaxInt8 = (1 << 7) - 1; 237 const int kMaxInt8 = (1 << 7) - 1;
230 const int kMinInt8 = -(1 << 7); 238 const int kMinInt8 = -(1 << 7);
231 const int kMaxUInt8 = (1 << 8) - 1; 239 const int kMaxUInt8 = (1 << 8) - 1;
232 const int kMinUInt8 = 0; 240 const int kMinUInt8 = 0;
233 const int kMaxInt16 = (1 << 15) - 1; 241 const int kMaxInt16 = (1 << 15) - 1;
234 const int kMinInt16 = -(1 << 15); 242 const int kMinInt16 = -(1 << 15);
235 const int kMaxUInt16 = (1 << 16) - 1; 243 const int kMaxUInt16 = (1 << 16) - 1;
236 const int kMinUInt16 = 0; 244 const int kMinUInt16 = 0;
237 245
238 const uint32_t kMaxUInt32 = 0xFFFFFFFFu; 246 const uint32_t kMaxUInt32 = 0xFFFFFFFFu;
239 247
240 const int kCharSize = sizeof(char); // NOLINT 248 const int kCharSize = sizeof(char); // NOLINT
241 const int kShortSize = sizeof(short); // NOLINT 249 const int kShortSize = sizeof(short); // NOLINT
242 const int kIntSize = sizeof(int); // NOLINT 250 const int kIntSize = sizeof(int); // NOLINT
243 const int kInt32Size = sizeof(int32_t); // NOLINT 251 const int kInt32Size = sizeof(int32_t); // NOLINT
244 const int kInt64Size = sizeof(int64_t); // NOLINT 252 const int kInt64Size = sizeof(int64_t); // NOLINT
245 const int kDoubleSize = sizeof(double); // NOLINT 253 const int kDoubleSize = sizeof(double); // NOLINT
246 const int kIntptrSize = sizeof(intptr_t); // NOLINT 254 const int kFloatSize = sizeof(float); // NOLINT
247 const int kPointerSize = sizeof(void*); // NOLINT 255 const int kFloat32x4Size = sizeof(float32x4_value_t); // NOLINT
256 const int kInt32x4Size = sizeof(int32x4_value_t); // NOLINT
257 const int kIntptrSize = sizeof(intptr_t); // NOLINT
258 const int kPointerSize = sizeof(void*); // NOLINT
248 const int kRegisterSize = kPointerSize; 259 const int kRegisterSize = kPointerSize;
249 const int kPCOnStackSize = kRegisterSize; 260 const int kPCOnStackSize = kRegisterSize;
250 const int kFPOnStackSize = kRegisterSize; 261 const int kFPOnStackSize = kRegisterSize;
251 262
252 const int kDoubleSizeLog2 = 3; 263 const int kDoubleSizeLog2 = 3;
253 264
254 #if V8_HOST_ARCH_64_BIT 265 #if V8_HOST_ARCH_64_BIT
255 const int kPointerSizeLog2 = 3; 266 const int kPointerSizeLog2 = 3;
256 const intptr_t kIntptrSignBit = V8_INT64_C(0x8000000000000000); 267 const intptr_t kIntptrSignBit = V8_INT64_C(0x8000000000000000);
257 const uintptr_t kUintptrAllBitsSet = V8_UINT64_C(0xFFFFFFFFFFFFFFFF); 268 const uintptr_t kUintptrAllBitsSet = V8_UINT64_C(0xFFFFFFFFFFFFFFFF);
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
409 // the backend, so both modes are represented by the kStrictMode value. 420 // the backend, so both modes are represented by the kStrictMode value.
410 enum StrictModeFlag { 421 enum StrictModeFlag {
411 kNonStrictMode, 422 kNonStrictMode,
412 kStrictMode 423 kStrictMode
413 }; 424 };
414 425
415 426
416 } } // namespace v8::internal 427 } } // namespace v8::internal
417 428
418 #endif // V8_GLOBALS_H_ 429 #endif // V8_GLOBALS_H_
OLDNEW
« no previous file with comments | « src/flag-definitions.h ('k') | src/heap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698