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

Side by Side Diff: src/assembler.h

Issue 23560010: Thumb2 Backend: 16-bit instruction encoding helper methods Base URL: HEAD^
Patch Set: Created 7 years, 2 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 | « src/arm/constants-arm.h ('k') | src/v8memory.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 (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 983 matching lines...) Expand 10 before | Expand all | Expand 10 after
994 }; 994 };
995 995
996 996
997 // ----------------------------------------------------------------------------- 997 // -----------------------------------------------------------------------------
998 // Utility functions 998 // Utility functions
999 999
1000 inline bool is_intn(int x, int n) { 1000 inline bool is_intn(int x, int n) {
1001 return -(1 << (n-1)) <= x && x < (1 << (n-1)); 1001 return -(1 << (n-1)) <= x && x < (1 << (n-1));
1002 } 1002 }
1003 1003
1004 inline bool is_int5(int x) { return is_intn(x, 5); }
1004 inline bool is_int8(int x) { return is_intn(x, 8); } 1005 inline bool is_int8(int x) { return is_intn(x, 8); }
1006 inline bool is_int9(int x) { return is_intn(x, 9); }
1007 inline bool is_int11(int x) { return is_intn(x, 11); }
1008 inline bool is_int12(int x) { return is_intn(x, 12); }
1005 inline bool is_int16(int x) { return is_intn(x, 16); } 1009 inline bool is_int16(int x) { return is_intn(x, 16); }
1006 inline bool is_int18(int x) { return is_intn(x, 18); } 1010 inline bool is_int18(int x) { return is_intn(x, 18); }
1011 inline bool is_int20(int x) { return is_intn(x, 20); }
1012 inline bool is_int21(int x) { return is_intn(x, 21); }
1007 inline bool is_int24(int x) { return is_intn(x, 24); } 1013 inline bool is_int24(int x) { return is_intn(x, 24); }
1008 1014
1009 inline bool is_uintn(int x, int n) { 1015 inline bool is_uintn(int x, int n) {
1010 return (x & -(1 << n)) == 0; 1016 return (x & -(1 << n)) == 0;
1011 } 1017 }
1012 1018
1013 inline bool is_uint2(int x) { return is_uintn(x, 2); } 1019 inline bool is_uint2(int x) { return is_uintn(x, 2); }
1014 inline bool is_uint3(int x) { return is_uintn(x, 3); } 1020 inline bool is_uint3(int x) { return is_uintn(x, 3); }
1015 inline bool is_uint4(int x) { return is_uintn(x, 4); } 1021 inline bool is_uint4(int x) { return is_uintn(x, 4); }
1016 inline bool is_uint5(int x) { return is_uintn(x, 5); } 1022 inline bool is_uint5(int x) { return is_uintn(x, 5); }
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
1056 public: 1062 public:
1057 NullCallWrapper() { } 1063 NullCallWrapper() { }
1058 virtual ~NullCallWrapper() { } 1064 virtual ~NullCallWrapper() { }
1059 virtual void BeforeCall(int call_size) const { } 1065 virtual void BeforeCall(int call_size) const { }
1060 virtual void AfterCall() const { } 1066 virtual void AfterCall() const { }
1061 }; 1067 };
1062 1068
1063 } } // namespace v8::internal 1069 } } // namespace v8::internal
1064 1070
1065 #endif // V8_ASSEMBLER_H_ 1071 #endif // V8_ASSEMBLER_H_
OLDNEW
« no previous file with comments | « src/arm/constants-arm.h ('k') | src/v8memory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698