< prev index next >

src/cpu/ppc/vm/runtime_ppc.cpp

Print this page
rev 8107 : 8077838: Recent developments for ppc.
   1 /*
   2  * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
   3  * Copyright 2012, 2014 SAP AG. All rights reserved.
   4  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   5  *
   6  * This code is free software; you can redistribute it and/or modify it
   7  * under the terms of the GNU General Public License version 2 only, as
   8  * published by the Free Software Foundation.
   9  *
  10  * This code is distributed in the hope that it will be useful, but WITHOUT
  11  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  12  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  13  * version 2 for more details (a copy is included in the LICENSE file that
  14  * accompanied this code).
  15  *
  16  * You should have received a copy of the GNU General Public License version
  17  * 2 along with this work; if not, write to the Free Software Foundation,
  18  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  19  *
  20  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  21  * or visit www.oracle.com if you need additional information or have any
  22  * questions.
  23  *


 161   __ mtlr(R4_ARG2);
 162   __ bctr();
 163 
 164 
 165   // Same as above, but also set sp to unextended_sp.
 166   __ bind(mh_callsite);
 167   __ mr(R31, R3_RET); // Save branch address.
 168   __ mr(R3_ARG1, R16_thread);
 169 #if defined(ABI_ELFv2)
 170   __ call_c((address) adjust_SP_for_methodhandle_callsite, relocInfo::none);
 171 #else
 172   __ call_c(CAST_FROM_FN_PTR(FunctionDescriptor*, adjust_SP_for_methodhandle_callsite), relocInfo::none);
 173 #endif
 174   // Returns unextended_sp in R3_RET.
 175 
 176   __ mtctr(R31); // Move address of exception handler to SR_CTR.
 177   __ reset_last_Java_frame();
 178 
 179   __ mr(R1_SP, R3_RET); // Set sp to unextended_sp.
 180   __ b(mh_done);
 181 
 182 
 183   // Make sure all code is generated.
 184   masm->flush();
 185 
 186   // Set exception blob.
 187   _exception_blob = ExceptionBlob::create(&buffer, oop_maps,
 188                                           frame_size_in_bytes/wordSize);
 189 }
 190 
 191 #endif // COMPILER2
   1 /*
   2  * Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved.
   3  * Copyright 2012, 2015 SAP AG. All rights reserved.
   4  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   5  *
   6  * This code is free software; you can redistribute it and/or modify it
   7  * under the terms of the GNU General Public License version 2 only, as
   8  * published by the Free Software Foundation.
   9  *
  10  * This code is distributed in the hope that it will be useful, but WITHOUT
  11  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  12  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  13  * version 2 for more details (a copy is included in the LICENSE file that
  14  * accompanied this code).
  15  *
  16  * You should have received a copy of the GNU General Public License version
  17  * 2 along with this work; if not, write to the Free Software Foundation,
  18  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  19  *
  20  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  21  * or visit www.oracle.com if you need additional information or have any
  22  * questions.
  23  *


 161   __ mtlr(R4_ARG2);
 162   __ bctr();
 163 
 164 
 165   // Same as above, but also set sp to unextended_sp.
 166   __ bind(mh_callsite);
 167   __ mr(R31, R3_RET); // Save branch address.
 168   __ mr(R3_ARG1, R16_thread);
 169 #if defined(ABI_ELFv2)
 170   __ call_c((address) adjust_SP_for_methodhandle_callsite, relocInfo::none);
 171 #else
 172   __ call_c(CAST_FROM_FN_PTR(FunctionDescriptor*, adjust_SP_for_methodhandle_callsite), relocInfo::none);
 173 #endif
 174   // Returns unextended_sp in R3_RET.
 175 
 176   __ mtctr(R31); // Move address of exception handler to SR_CTR.
 177   __ reset_last_Java_frame();
 178 
 179   __ mr(R1_SP, R3_RET); // Set sp to unextended_sp.
 180   __ b(mh_done);

 181 
 182   // Make sure all code is generated.
 183   masm->flush();
 184 
 185   // Set exception blob.
 186   _exception_blob = ExceptionBlob::create(&buffer, oop_maps,
 187                                           frame_size_in_bytes/wordSize);
 188 }
 189 
 190 #endif // COMPILER2
< prev index next >