< prev index next >

src/cpu/x86/vm/macroAssembler_x86.cpp

Print this page




2872 
2873 void MacroAssembler::divsd(XMMRegister dst, AddressLiteral src) {
2874   if (reachable(src)) {
2875     Assembler::divsd(dst, as_Address(src));
2876   } else {
2877     lea(rscratch1, src);
2878     Assembler::divsd(dst, Address(rscratch1, 0));
2879   }
2880 }
2881 
2882 void MacroAssembler::divss(XMMRegister dst, AddressLiteral src) {
2883   if (reachable(src)) {
2884     Assembler::divss(dst, as_Address(src));
2885   } else {
2886     lea(rscratch1, src);
2887     Assembler::divss(dst, Address(rscratch1, 0));
2888   }
2889 }
2890 
2891 // !defined(COMPILER2) is because of stupid core builds
2892 #if !defined(_LP64) || defined(COMPILER1) || !defined(COMPILER2)
2893 void MacroAssembler::empty_FPU_stack() {
2894   if (VM_Version::supports_mmx()) {
2895     emms();
2896   } else {
2897     for (int i = 8; i-- > 0; ) ffree(i);
2898   }
2899 }
2900 #endif // !LP64 || C1 || !C2
2901 
2902 
2903 // Defines obj, preserves var_size_in_bytes
2904 void MacroAssembler::eden_allocate(Register obj,
2905                                    Register var_size_in_bytes,
2906                                    int con_size_in_bytes,
2907                                    Register t1,
2908                                    Label& slow_case) {
2909   assert(obj == rax, "obj must be in rax, for cmpxchg");
2910   assert_different_registers(obj, var_size_in_bytes, t1);
2911   if (!Universe::heap()->supports_inline_contig_alloc()) {
2912     jmp(slow_case);
2913   } else {
2914     Register end = t1;
2915     Label retry;
2916     bind(retry);
2917     ExternalAddress heap_top((address) Universe::heap()->top_addr());
2918     movptr(obj, heap_top);
2919     if (var_size_in_bytes == noreg) {
2920       lea(end, Address(obj, con_size_in_bytes));




2872 
2873 void MacroAssembler::divsd(XMMRegister dst, AddressLiteral src) {
2874   if (reachable(src)) {
2875     Assembler::divsd(dst, as_Address(src));
2876   } else {
2877     lea(rscratch1, src);
2878     Assembler::divsd(dst, Address(rscratch1, 0));
2879   }
2880 }
2881 
2882 void MacroAssembler::divss(XMMRegister dst, AddressLiteral src) {
2883   if (reachable(src)) {
2884     Assembler::divss(dst, as_Address(src));
2885   } else {
2886     lea(rscratch1, src);
2887     Assembler::divss(dst, Address(rscratch1, 0));
2888   }
2889 }
2890 
2891 // !defined(COMPILER2) is because of stupid core builds
2892 #if !defined(_LP64) || defined(COMPILER1) || !defined(COMPILER2) || INCLUDE_JVMCI
2893 void MacroAssembler::empty_FPU_stack() {
2894   if (VM_Version::supports_mmx()) {
2895     emms();
2896   } else {
2897     for (int i = 8; i-- > 0; ) ffree(i);
2898   }
2899 }
2900 #endif // !LP64 || C1 || !C2 || INCLUDE_JVMCI
2901 
2902 
2903 // Defines obj, preserves var_size_in_bytes
2904 void MacroAssembler::eden_allocate(Register obj,
2905                                    Register var_size_in_bytes,
2906                                    int con_size_in_bytes,
2907                                    Register t1,
2908                                    Label& slow_case) {
2909   assert(obj == rax, "obj must be in rax, for cmpxchg");
2910   assert_different_registers(obj, var_size_in_bytes, t1);
2911   if (!Universe::heap()->supports_inline_contig_alloc()) {
2912     jmp(slow_case);
2913   } else {
2914     Register end = t1;
2915     Label retry;
2916     bind(retry);
2917     ExternalAddress heap_top((address) Universe::heap()->top_addr());
2918     movptr(obj, heap_top);
2919     if (var_size_in_bytes == noreg) {
2920       lea(end, Address(obj, con_size_in_bytes));


< prev index next >