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

Side by Side Diff: src/assembler.h

Issue 119035: X64: Added implementations of Set(..., Immediate) to macro assembler. (Closed)
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
« no previous file with comments | « no previous file | src/x64/assembler-x64.h » ('j') | src/x64/assembler-x64.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 1994-2006 Sun Microsystems Inc. 1 // Copyright (c) 1994-2006 Sun Microsystems Inc.
2 // All Rights Reserved. 2 // All Rights Reserved.
3 // 3 //
4 // Redistribution and use in source and binary forms, with or without 4 // Redistribution and use in source and binary forms, with or without
5 // modification, are permitted provided that the following conditions are 5 // modification, are permitted provided that the following conditions are
6 // met: 6 // met:
7 // 7 //
8 // - Redistributions of source code must retain the above copyright notice, 8 // - Redistributions of source code must retain the above copyright notice,
9 // this list of conditions and the following disclaimer. 9 // this list of conditions and the following disclaimer.
10 // 10 //
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after
417 explicit ExternalReference(void* address) 417 explicit ExternalReference(void* address)
418 : address_(reinterpret_cast<Address>(address)) {} 418 : address_(reinterpret_cast<Address>(address)) {}
419 419
420 Address address_; 420 Address address_;
421 }; 421 };
422 422
423 423
424 // ----------------------------------------------------------------------------- 424 // -----------------------------------------------------------------------------
425 // Utility functions 425 // Utility functions
426 426
427 // Move these into inline file?
428
429 static inline bool is_intn(int x, int n) { 427 static inline bool is_intn(int x, int n) {
430 return -(1 << (n-1)) <= x && x < (1 << (n-1)); 428 return -(1 << (n-1)) <= x && x < (1 << (n-1));
431 } 429 }
432 430
433 static inline bool is_int24(int x) { return is_intn(x, 24); } 431 static inline bool is_int24(int x) { return is_intn(x, 24); }
434 static inline bool is_int8(int x) { return is_intn(x, 8); } 432 static inline bool is_int8(int x) { return is_intn(x, 8); }
435 433
436 static inline bool is_uintn(int x, int n) { 434 static inline bool is_uintn(int x, int n) {
437 return (x & -(1 << n)) == 0; 435 return (x & -(1 << n)) == 0;
438 } 436 }
439 437
440 static inline bool is_uint2(int x) { return is_uintn(x, 2); } 438 static inline bool is_uint2(int x) { return is_uintn(x, 2); }
441 static inline bool is_uint3(int x) { return is_uintn(x, 3); } 439 static inline bool is_uint3(int x) { return is_uintn(x, 3); }
442 static inline bool is_uint4(int x) { return is_uintn(x, 4); } 440 static inline bool is_uint4(int x) { return is_uintn(x, 4); }
443 static inline bool is_uint5(int x) { return is_uintn(x, 5); } 441 static inline bool is_uint5(int x) { return is_uintn(x, 5); }
444 static inline bool is_uint8(int x) { return is_uintn(x, 8); } 442 static inline bool is_uint8(int x) { return is_uintn(x, 8); }
445 static inline bool is_uint12(int x) { return is_uintn(x, 12); } 443 static inline bool is_uint12(int x) { return is_uintn(x, 12); }
446 static inline bool is_uint16(int x) { return is_uintn(x, 16); } 444 static inline bool is_uint16(int x) { return is_uintn(x, 16); }
447 static inline bool is_uint24(int x) { return is_uintn(x, 24); } 445 static inline bool is_uint24(int x) { return is_uintn(x, 24); }
448 446
449 } } // namespace v8::internal 447 } } // namespace v8::internal
450 448
451 #endif // V8_ASSEMBLER_H_ 449 #endif // V8_ASSEMBLER_H_
OLDNEW
« no previous file with comments | « no previous file | src/x64/assembler-x64.h » ('j') | src/x64/assembler-x64.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698