OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 2188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2199 // in the label chain) is out of range. In that case the caller is responsible | 2199 // in the label chain) is out of range. In that case the caller is responsible |
2200 // for generating appropriate code. | 2200 // for generating appropriate code. |
2201 // Otherwise it returns false. | 2201 // Otherwise it returns false. |
2202 // This function also checks wether veneers need to be emitted. | 2202 // This function also checks wether veneers need to be emitted. |
2203 bool NeedExtraInstructionsOrRegisterBranch(Label *label, | 2203 bool NeedExtraInstructionsOrRegisterBranch(Label *label, |
2204 ImmBranchType branch_type); | 2204 ImmBranchType branch_type); |
2205 | 2205 |
2206 private: | 2206 private: |
2207 // We generate a veneer for a branch if we reach within this distance of the | 2207 // We generate a veneer for a branch if we reach within this distance of the |
2208 // limit of the range. | 2208 // limit of the range. |
2209 static const int kVeneerDistanceMargin = 2 * KB; | 2209 static const int kVeneerDistanceMargin = 4 * KB; |
2210 int unresolved_branches_first_limit() const { | 2210 int unresolved_branches_first_limit() const { |
2211 ASSERT(!unresolved_branches_.empty()); | 2211 ASSERT(!unresolved_branches_.empty()); |
2212 return unresolved_branches_.begin()->first; | 2212 return unresolved_branches_.begin()->first; |
2213 } | 2213 } |
2214 }; | 2214 }; |
2215 | 2215 |
2216 | 2216 |
2217 // Use this scope when you need a one-to-one mapping bewteen methods and | 2217 // Use this scope when you need a one-to-one mapping bewteen methods and |
2218 // instructions. This scope prevents the MacroAssembler from being called and | 2218 // instructions. This scope prevents the MacroAssembler from being called and |
2219 // literal pools from being emitted. It also asserts the number of instructions | 2219 // literal pools from being emitted. It also asserts the number of instructions |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2323 #error "Unsupported option" | 2323 #error "Unsupported option" |
2324 #define CODE_COVERAGE_STRINGIFY(x) #x | 2324 #define CODE_COVERAGE_STRINGIFY(x) #x |
2325 #define CODE_COVERAGE_TOSTRING(x) CODE_COVERAGE_STRINGIFY(x) | 2325 #define CODE_COVERAGE_TOSTRING(x) CODE_COVERAGE_STRINGIFY(x) |
2326 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) | 2326 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) |
2327 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm-> | 2327 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm-> |
2328 #else | 2328 #else |
2329 #define ACCESS_MASM(masm) masm-> | 2329 #define ACCESS_MASM(masm) masm-> |
2330 #endif | 2330 #endif |
2331 | 2331 |
2332 #endif // V8_A64_MACRO_ASSEMBLER_A64_H_ | 2332 #endif // V8_A64_MACRO_ASSEMBLER_A64_H_ |
OLD | NEW |