5 * This code is free software; you can redistribute it and/or modify it 6 * under the terms of the GNU General Public License version 2 only, as 7 * published by the Free Software Foundation. 8 * 9 * This code is distributed in the hope that it will be useful, but WITHOUT 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12 * version 2 for more details (a copy is included in the LICENSE file that 13 * accompanied this code). 14 * 15 * You should have received a copy of the GNU General Public License version 16 * 2 along with this work; if not, write to the Free Software Foundation, 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 * 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 * 23 */ 24 25 class BiasedLockingCounters; 26 27 // Contains all the definitions needed for x86 assembly code generation. 28 29 // Calling convention 30 class Argument VALUE_OBJ_CLASS_SPEC { 31 public: 32 enum { 33 #ifdef _LP64 34 #ifdef _WIN64 35 n_int_register_parameters_c = 4, // rcx, rdx, r8, r9 (c_rarg0, c_rarg1, ...) 36 n_float_register_parameters_c = 4, // xmm0 - xmm3 (c_farg0, c_farg1, ... ) 37 #else 38 n_int_register_parameters_c = 6, // rdi, rsi, rdx, rcx, r8, r9 (c_rarg0, c_rarg1, ...) 39 n_float_register_parameters_c = 8, // xmm0 - xmm7 (c_farg0, c_farg1, ... ) 40 #endif // _WIN64 41 n_int_register_parameters_j = 6, // j_rarg0, j_rarg1, ... 42 n_float_register_parameters_j = 8 // j_farg0, j_farg1, ... 43 #else 44 n_register_parameters = 0 // 0 registers used to pass arguments 2255 * class SkipIfEqual: 2256 * 2257 * Instantiating this class will result in assembly code being output that will 2258 * jump around any code emitted between the creation of the instance and it's 2259 * automatic destruction at the end of a scope block, depending on the value of 2260 * the flag passed to the constructor, which will be checked at run-time. 2261 */ 2262 class SkipIfEqual { 2263 private: 2264 MacroAssembler* _masm; 2265 Label _label; 2266 2267 public: 2268 SkipIfEqual(MacroAssembler*, const bool* flag_addr, bool value); 2269 ~SkipIfEqual(); 2270 }; 2271 2272 #ifdef ASSERT 2273 inline bool AbstractAssembler::pd_check_instruction_mark() { return true; } 2274 #endif | 5 * This code is free software; you can redistribute it and/or modify it 6 * under the terms of the GNU General Public License version 2 only, as 7 * published by the Free Software Foundation. 8 * 9 * This code is distributed in the hope that it will be useful, but WITHOUT 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12 * version 2 for more details (a copy is included in the LICENSE file that 13 * accompanied this code). 14 * 15 * You should have received a copy of the GNU General Public License version 16 * 2 along with this work; if not, write to the Free Software Foundation, 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 * 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 * 23 */ 24 25 #ifndef CPU_X86_VM_ASSEMBLER_X86_HPP 26 #define CPU_X86_VM_ASSEMBLER_X86_HPP 27 28 class BiasedLockingCounters; 29 30 // Contains all the definitions needed for x86 assembly code generation. 31 32 // Calling convention 33 class Argument VALUE_OBJ_CLASS_SPEC { 34 public: 35 enum { 36 #ifdef _LP64 37 #ifdef _WIN64 38 n_int_register_parameters_c = 4, // rcx, rdx, r8, r9 (c_rarg0, c_rarg1, ...) 39 n_float_register_parameters_c = 4, // xmm0 - xmm3 (c_farg0, c_farg1, ... ) 40 #else 41 n_int_register_parameters_c = 6, // rdi, rsi, rdx, rcx, r8, r9 (c_rarg0, c_rarg1, ...) 42 n_float_register_parameters_c = 8, // xmm0 - xmm7 (c_farg0, c_farg1, ... ) 43 #endif // _WIN64 44 n_int_register_parameters_j = 6, // j_rarg0, j_rarg1, ... 45 n_float_register_parameters_j = 8 // j_farg0, j_farg1, ... 46 #else 47 n_register_parameters = 0 // 0 registers used to pass arguments 2258 * class SkipIfEqual: 2259 * 2260 * Instantiating this class will result in assembly code being output that will 2261 * jump around any code emitted between the creation of the instance and it's 2262 * automatic destruction at the end of a scope block, depending on the value of 2263 * the flag passed to the constructor, which will be checked at run-time. 2264 */ 2265 class SkipIfEqual { 2266 private: 2267 MacroAssembler* _masm; 2268 Label _label; 2269 2270 public: 2271 SkipIfEqual(MacroAssembler*, const bool* flag_addr, bool value); 2272 ~SkipIfEqual(); 2273 }; 2274 2275 #ifdef ASSERT 2276 inline bool AbstractAssembler::pd_check_instruction_mark() { return true; } 2277 #endif 2278 2279 #endif // CPU_X86_VM_ASSEMBLER_X86_HPP |