1.1 --- a/src/os_cpu/solaris_x86/vm/solaris_x86_64.ad Thu Feb 16 11:33:49 2012 -0800 1.2 +++ b/src/os_cpu/solaris_x86/vm/solaris_x86_64.ad Thu Feb 16 17:12:49 2012 -0800 1.3 @@ -1,5 +1,5 @@ 1.4 // 1.5 -// Copyright (c) 2004, 2006, Oracle and/or its affiliates. All rights reserved. 1.6 +// Copyright (c) 2004, 2012, Oracle and/or its affiliates. All rights reserved. 1.7 // DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 1.8 // 1.9 // This code is free software; you can redistribute it and/or modify it 1.10 @@ -55,8 +55,7 @@ 1.11 // adding a syntax that specifies the sizes of fields in an order, 1.12 // so that the adlc can build the emit functions automagically 1.13 1.14 - enc_class Java_To_Runtime(method meth) 1.15 - %{ 1.16 + enc_class Java_To_Runtime(method meth) %{ 1.17 // No relocation needed 1.18 1.19 // movq r10, <meth> 1.20 @@ -70,118 +69,24 @@ 1.21 emit_opcode(cbuf, 0xD0 | (R10_enc - 8)); 1.22 %} 1.23 1.24 - enc_class solaris_breakpoint 1.25 - %{ 1.26 - MacroAssembler* masm = new MacroAssembler(&cbuf); 1.27 - masm->call(RuntimeAddress(CAST_FROM_FN_PTR(address, os::breakpoint))); 1.28 - %} 1.29 - 1.30 - enc_class call_epilog 1.31 - %{ 1.32 - if (VerifyStackAtCalls) { 1.33 - // Check that stack depth is unchanged: find majik cookie on stack 1.34 - int framesize = 1.35 - ra_->reg2offset_unchecked(OptoReg::add(ra_->_matcher._old_SP, -3*VMRegImpl::slots_per_word)); 1.36 - if (framesize) { 1.37 - if (framesize < 0x80) { 1.38 - emit_opcode(cbuf, Assembler::REX_W); 1.39 - emit_opcode(cbuf, 0x81); // cmpq [rsp+0],0xbadb1ood 1.40 - emit_d8(cbuf, 0x7C); 1.41 - emit_d8(cbuf, 0x24); 1.42 - emit_d8(cbuf, framesize); // Find majik cookie from ESP 1.43 - emit_d32(cbuf, 0xbadb100d); 1.44 - } else { 1.45 - emit_opcode(cbuf, Assembler::REX_W); 1.46 - emit_opcode(cbuf, 0x81); // cmpq [rsp+0],0xbadb1ood 1.47 - emit_d8(cbuf, 0xBC); 1.48 - emit_d8(cbuf, 0x24); 1.49 - emit_d32(cbuf, framesize); // Find majik cookie from ESP 1.50 - emit_d32(cbuf, 0xbadb100d); 1.51 - } 1.52 - } 1.53 - // jmp EQ around INT3 1.54 - // QQQ TODO 1.55 - const int jump_around = 5; // size of call to breakpoint, 1 for CC 1.56 - emit_opcode(cbuf, 0x74); 1.57 - emit_d8(cbuf, jump_around); 1.58 - // QQQ temporary 1.59 - emit_break(cbuf); 1.60 - // Die if stack mismatch 1.61 - // emit_opcode(cbuf,0xCC); 1.62 - } 1.63 - %} 1.64 - 1.65 enc_class post_call_verify_mxcsr %{ 1.66 - MacroAssembler masm(&cbuf); 1.67 + MacroAssembler _masm(&cbuf); 1.68 if (RestoreMXCSROnJNICalls) { 1.69 - masm.ldmxcsr(ExternalAddress(StubRoutines::amd64::mxcsr_std())); 1.70 + __ ldmxcsr(ExternalAddress(StubRoutines::amd64::mxcsr_std())); 1.71 } 1.72 else if (CheckJNICalls) { 1.73 - masm.call(RuntimeAddress(CAST_FROM_FN_PTR(address, StubRoutines::amd64::verify_mxcsr_entry()))); 1.74 + __ call(RuntimeAddress(CAST_FROM_FN_PTR(address, StubRoutines::amd64::verify_mxcsr_entry()))); 1.75 } 1.76 %} 1.77 %} 1.78 1.79 -// INSTRUCTIONS -- Platform dependent 1.80 - 1.81 -//----------OS and Locking Instructions---------------------------------------- 1.82 - 1.83 -// This name is KNOWN by the ADLC and cannot be changed. 1.84 -// The ADLC forces a 'TypeRawPtr::BOTTOM' output type 1.85 -// for this guy. 1.86 -instruct tlsLoadP(r15_RegP dst) 1.87 -%{ 1.88 - match(Set dst (ThreadLocal)); 1.89 - effect(DEF dst); 1.90 - 1.91 - size(0); 1.92 - format %{ "# TLS is in R15" %} 1.93 - ins_encode( /*empty encoding*/ ); 1.94 - ins_pipe(ialu_reg_reg); 1.95 -%} 1.96 - 1.97 -// Die now 1.98 -instruct ShouldNotReachHere() 1.99 -%{ 1.100 - match(Halt); 1.101 - 1.102 - // Use the following format syntax 1.103 - format %{ "int3\t# ShouldNotReachHere" %} 1.104 - // QQQ TODO for now call breakpoint 1.105 - // opcode(0xCC); 1.106 - // ins_encode(Opc); 1.107 - ins_encode(solaris_breakpoint); 1.108 - ins_pipe(pipe_slow); 1.109 -%} 1.110 - 1.111 1.112 // Platform dependent source 1.113 1.114 -source 1.115 -%{ 1.116 +source %{ 1.117 1.118 -int MachCallRuntimeNode::ret_addr_offset() 1.119 -{ 1.120 +int MachCallRuntimeNode::ret_addr_offset() { 1.121 return 13; // movq r10,#addr; callq (r10) 1.122 } 1.123 1.124 -// emit an interrupt that is caught by the debugger 1.125 -void emit_break(CodeBuffer& cbuf) 1.126 -{ 1.127 - // Debugger doesn't really catch this but best we can do so far QQQ 1.128 - MacroAssembler* masm = new MacroAssembler(&cbuf); 1.129 - masm->call(RuntimeAddress(CAST_FROM_FN_PTR(address, os::breakpoint))); 1.130 -} 1.131 - 1.132 -void MachBreakpointNode::emit(CodeBuffer& cbuf, PhaseRegAlloc* ra_) const 1.133 -{ 1.134 - emit_break(cbuf); 1.135 -} 1.136 - 1.137 -uint MachBreakpointNode::size(PhaseRegAlloc* ra_) const 1.138 -{ 1.139 - // distance could be far and requires load and call through register 1.140 - return MachNode::size(ra_); 1.141 -} 1.142 - 1.143 %}