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

Side by Side Diff: src/arm/assembler-arm.h

Issue 2827743002: [ARM] Reserve scratch q-register. (Closed)
Patch Set: Fix issue with allocatable double registers without VFP32DREGS. Created 3 years, 8 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/arm/deoptimizer-arm.cc » ('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 5 // modification, are permitted provided that the following conditions
6 // are met: 6 // are 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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 V(d8) V(d9) V(d10) V(d11) V(d12) V(d13) V(d14) V(d15) \ 68 V(d8) V(d9) V(d10) V(d11) V(d12) V(d13) V(d14) V(d15) \
69 V(d16) V(d17) V(d18) V(d19) V(d20) V(d21) V(d22) V(d23) \ 69 V(d16) V(d17) V(d18) V(d19) V(d20) V(d21) V(d22) V(d23) \
70 V(d24) V(d25) V(d26) V(d27) V(d28) V(d29) V(d30) V(d31) 70 V(d24) V(d25) V(d26) V(d27) V(d28) V(d29) V(d30) V(d31)
71 71
72 #define SIMD128_REGISTERS(V) \ 72 #define SIMD128_REGISTERS(V) \
73 V(q0) V(q1) V(q2) V(q3) V(q4) V(q5) V(q6) V(q7) \ 73 V(q0) V(q1) V(q2) V(q3) V(q4) V(q5) V(q6) V(q7) \
74 V(q8) V(q9) V(q10) V(q11) V(q12) V(q13) V(q14) V(q15) 74 V(q8) V(q9) V(q10) V(q11) V(q12) V(q13) V(q14) V(q15)
75 75
76 #define ALLOCATABLE_DOUBLE_REGISTERS(V) \ 76 #define ALLOCATABLE_DOUBLE_REGISTERS(V) \
77 V(d0) V(d1) V(d2) V(d3) V(d4) V(d5) V(d6) V(d7) \ 77 V(d0) V(d1) V(d2) V(d3) V(d4) V(d5) V(d6) V(d7) \
78 V(d8) V(d9) V(d10) V(d11) V(d12) V(d13) \ 78 V(d8) V(d9) V(d10) V(d11) V(d12) \
79 V(d16) V(d17) V(d18) V(d19) V(d20) V(d21) V(d22) V(d23) \ 79 V(d16) V(d17) V(d18) V(d19) V(d20) V(d21) V(d22) V(d23) \
80 V(d24) V(d25) V(d26) V(d27) V(d28) V(d29) V(d30) V(d31) 80 V(d24) V(d25) V(d26) V(d27) V(d28) V(d29) V(d30) V(d31)
81 81
82 #define ALLOCATABLE_NO_VFP32_DOUBLE_REGISTERS(V) \ 82 #define ALLOCATABLE_NO_VFP32_DOUBLE_REGISTERS(V) \
83 V(d0) V(d1) V(d2) V(d3) V(d4) V(d5) V(d6) V(d7) \ 83 V(d0) V(d1) V(d2) V(d3) V(d4) V(d5) V(d6) V(d7) \
84 V(d8) V(d9) V(d10) V(d11) V(d12) V(d13) \ 84 V(d8) V(d9) V(d10) V(d11) V(d12) V(d15) \
85 // clang-format on 85 // clang-format on
86 86
87 // CPU Registers. 87 // CPU Registers.
88 // 88 //
89 // 1) We would prefer to use an enum, but enum values are assignment- 89 // 1) We would prefer to use an enum, but enum values are assignment-
90 // compatible with int, which has caused code-generation bugs. 90 // compatible with int, which has caused code-generation bugs.
91 // 91 //
92 // 2) We would prefer to use a class instead of a struct but we don't like 92 // 2) We would prefer to use a class instead of a struct but we don't like
93 // the register initialization to depend on the particular initialization 93 // the register initialization to depend on the particular initialization
94 // order (which appears to be different on OS X, Linux, and Windows for the 94 // order (which appears to be different on OS X, Linux, and Windows for the
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
416 constexpr QwNeonRegister q11 = { 11 }; 416 constexpr QwNeonRegister q11 = { 11 };
417 constexpr QwNeonRegister q12 = { 12 }; 417 constexpr QwNeonRegister q12 = { 12 };
418 constexpr QwNeonRegister q13 = { 13 }; 418 constexpr QwNeonRegister q13 = { 13 };
419 constexpr QwNeonRegister q14 = { 14 }; 419 constexpr QwNeonRegister q14 = { 14 };
420 constexpr QwNeonRegister q15 = { 15 }; 420 constexpr QwNeonRegister q15 = { 15 };
421 421
422 422
423 // Aliases for double registers. 423 // Aliases for double registers.
424 constexpr LowDwVfpRegister kFirstCalleeSavedDoubleReg = d8; 424 constexpr LowDwVfpRegister kFirstCalleeSavedDoubleReg = d8;
425 constexpr LowDwVfpRegister kLastCalleeSavedDoubleReg = d15; 425 constexpr LowDwVfpRegister kLastCalleeSavedDoubleReg = d15;
426 // kDoubleRegZero and kScratchDoubleReg must pair to form kScratchQuadReg. SIMD 426 constexpr LowDwVfpRegister kDoubleRegZero = d13;
427 // code depends on kDoubleRegZero before kScratchDoubleReg. 427 constexpr LowDwVfpRegister kScratchDoubleReg = d14;
428 constexpr LowDwVfpRegister kDoubleRegZero = d14; 428 // This scratch q-register aliases d14 (kScratchDoubleReg) and d15, but is only
429 constexpr LowDwVfpRegister kScratchDoubleReg = d15; 429 // used when NEON is supported. d15 is still allocatable if there are only 16
430 // After using kScratchQuadReg, kDoubleRegZero must be reset to 0. 430 // VFP registers.
431 constexpr QwNeonRegister kScratchQuadReg = q7; 431 constexpr QwNeonRegister kScratchQuadReg = q7;
432 432
433 // Coprocessor register 433 // Coprocessor register
434 struct CRegister { 434 struct CRegister {
435 bool is_valid() const { return 0 <= reg_code && reg_code < 16; } 435 bool is_valid() const { return 0 <= reg_code && reg_code < 16; }
436 bool is(CRegister creg) const { return reg_code == creg.reg_code; } 436 bool is(CRegister creg) const { return reg_code == creg.reg_code; }
437 int code() const { 437 int code() const {
438 DCHECK(is_valid()); 438 DCHECK(is_valid());
439 return reg_code; 439 return reg_code;
440 } 440 }
(...skipping 1358 matching lines...) Expand 10 before | Expand all | Expand 10 after
1799 1799
1800 void Emit(Address addr); 1800 void Emit(Address addr);
1801 void FlushICache(Isolate* isolate); 1801 void FlushICache(Isolate* isolate);
1802 }; 1802 };
1803 1803
1804 1804
1805 } // namespace internal 1805 } // namespace internal
1806 } // namespace v8 1806 } // namespace v8
1807 1807
1808 #endif // V8_ARM_ASSEMBLER_ARM_H_ 1808 #endif // V8_ARM_ASSEMBLER_ARM_H_
OLDNEW
« no previous file with comments | « no previous file | src/arm/deoptimizer-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698