Mercurial > hg > graal-jvmci-8
diff src/cpu/x86/vm/c1_Runtime1_x86.cpp @ 4977:532be189cf09
Reducing diff to hsx24
author | Thomas Wuerthinger <thomas.wuerthinger@oracle.com> |
---|---|
date | Mon, 27 Feb 2012 17:06:18 +0100 |
parents | 8f01f899bccd |
children | 2f2c6347fce4 |
line wrap: on
line diff
--- a/src/cpu/x86/vm/c1_Runtime1_x86.cpp Mon Feb 27 16:26:41 2012 +0100 +++ b/src/cpu/x86/vm/c1_Runtime1_x86.cpp Mon Feb 27 17:06:18 2012 +0100 @@ -594,47 +594,46 @@ OopMapSet* Runtime1::generate_exception_throw(StubAssembler* sasm, address target, bool has_argument) { OopMapSet* oop_maps = new OopMapSet(); #ifdef GRAAL - // graal passes the argument in r10 - OopMap* oop_map = save_live_registers(sasm, 1); + OopMap* oop_map = save_live_registers(sasm, 1); - // now all registers are saved and can be used freely - // verify that no old value is used accidentally - __ invalidate_registers(true, true, true, true, true, true); + // now all registers are saved and can be used freely + // verify that no old value is used accidentally + __ invalidate_registers(true, true, true, true, true, true); - // registers used by this stub - const Register temp_reg = rbx; + // registers used by this stub + const Register temp_reg = rbx; - // load argument for exception that is passed as an argument into the stub - if (has_argument) { - __ movptr(c_rarg1, r10); - } - int call_offset = __ call_RT(noreg, noreg, target, has_argument ? 1 : 0); + // load argument for exception that is passed as an argument into the stub + if (has_argument) { + __ movptr(c_rarg1, r10); + } + int call_offset = __ call_RT(noreg, noreg, target, has_argument ? 1 : 0); - oop_maps->add_gc_map(call_offset, oop_map); + oop_maps->add_gc_map(call_offset, oop_map); #else - // preserve all registers - int num_rt_args = has_argument ? 2 : 1; - OopMap* oop_map = save_live_registers(sasm, num_rt_args); + // preserve all registers + int num_rt_args = has_argument ? 2 : 1; + OopMap* oop_map = save_live_registers(sasm, num_rt_args); - // now all registers are saved and can be used freely - // verify that no old value is used accidentally - __ invalidate_registers(true, true, true, true, true, true); + // now all registers are saved and can be used freely + // verify that no old value is used accidentally + __ invalidate_registers(true, true, true, true, true, true); - // registers used by this stub - const Register temp_reg = rbx; + // registers used by this stub + const Register temp_reg = rbx; - // load argument for exception that is passed as an argument into the stub - if (has_argument) { - #ifdef _LP64 - __ movptr(c_rarg1, Address(rbp, 2*BytesPerWord)); - #else - __ movptr(temp_reg, Address(rbp, 2*BytesPerWord)); - __ push(temp_reg); - #endif // _LP64 - } - int call_offset = __ call_RT(noreg, noreg, target, num_rt_args - 1); + // load argument for exception that is passed as an argument into the stub + if (has_argument) { +#ifdef _LP64 + __ movptr(c_rarg1, Address(rbp, 2*BytesPerWord)); +#else + __ movptr(temp_reg, Address(rbp, 2*BytesPerWord)); + __ push(temp_reg); +#endif // _LP64 + } + int call_offset = __ call_RT(noreg, noreg, target, num_rt_args - 1); - oop_maps->add_gc_map(call_offset, oop_map); + oop_maps->add_gc_map(call_offset, oop_map); #endif __ stop("should not reach here"); @@ -980,6 +979,7 @@ return oop_maps; } +#ifdef GRAAL JRT_ENTRY(void, graal_create_null_exception(JavaThread* thread)) thread->set_vm_result(Exceptions::new_exception(thread, vmSymbols::java_lang_NullPointerException(), NULL)()); JRT_END @@ -1008,9 +1008,7 @@ thread->set_vm_result((oop) result.get_jobject()); JRT_END - - - +#endif OopMapSet* Runtime1::generate_code_for(StubID id, StubAssembler* sasm) { @@ -1381,8 +1379,7 @@ break; case unwind_exception_id: - { - __ set_info("unwind_exception", dont_gc_arguments); + { __ set_info("unwind_exception", dont_gc_arguments); // note: no stubframe since we are about to leave the current // activation and we are calling a leaf VM function only. generate_unwind_exception(sasm); @@ -1441,17 +1438,18 @@ __ movptr(rsi, Address(rsp, (klass_off) * VMRegImpl::stack_slot_size)); // subclass __ movptr(rax, Address(rsp, (sup_k_off) * VMRegImpl::stack_slot_size)); // superclass - Label success; Label miss; #ifdef GRAAL - // TODO this should really be within the XirSnippets + Label success; __ check_klass_subtype_fast_path(rsi, rax, rcx, &success, &miss, NULL); #endif __ check_klass_subtype_slow_path(rsi, rax, rcx, rdi, NULL, &miss); // fallthrough on success: +#ifdef GRAAL __ bind(success); +#endif __ movptr(Address(rsp, (result_off) * VMRegImpl::stack_slot_size), 1); // result __ pop(rax); __ pop(rcx);