< prev index next >

hotspot/src/cpu/ppc/vm/macroAssembler_ppc.cpp

Print this page
rev 6900 : 8048169: Change 8037816 breaks HS build on PPC64 and CPP-Interpreter platforms
Summary: Fix the matching of format string parameter types to the actual argument types for the PPC64 and CPP-Interpreter files in the same way as 8037816 already did it for all the other files
Reviewed-by: stefank, coleenp, dholmes
   1 /*
   2  * Copyright (c) 1997, 2013, 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.


3080   // call destination for its side effect
3081   call_c(tmp);
3082   restore_volatile_gprs(R1_SP, 112); // except R0
3083   pop_frame();
3084   // save tmp
3085   mr(R0, tmp);
3086   // kill tmp
3087   restore_LR_CR(tmp);
3088   // restore tmp
3089   mr(tmp, R0);
3090 }
3091 
3092 const char* stop_types[] = {
3093   "stop",
3094   "untested",
3095   "unimplemented",
3096   "shouldnotreachhere"
3097 };
3098 
3099 static void stop_on_request(int tp, const char* msg) {
3100   tty->print("PPC assembly code requires stop: (%s) %s\n", (void *)stop_types[tp%/*stop_end*/4], msg);
3101   guarantee(false, err_msg("PPC assembly code requires stop: %s", msg));
3102 }
3103 
3104 // Call a C-function that prints output.
3105 void MacroAssembler::stop(int type, const char* msg, int id) {
3106 #ifndef PRODUCT
3107   block_comment(err_msg("stop: %s %s {", stop_types[type%stop_end], msg));
3108 #else
3109   block_comment("stop {");
3110 #endif
3111 
3112   // setup arguments
3113   load_const_optimized(R3_ARG1, type);
3114   load_const_optimized(R4_ARG2, (void *)msg, /*tmp=*/R0);
3115   call_VM_leaf(CAST_FROM_FN_PTR(address, stop_on_request), R3_ARG1, R4_ARG2);
3116   illtrap();
3117   emit_int32(id);
3118   block_comment("} stop;");
3119 }
3120 


   1 /*
   2  * Copyright (c) 1997, 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.


3080   // call destination for its side effect
3081   call_c(tmp);
3082   restore_volatile_gprs(R1_SP, 112); // except R0
3083   pop_frame();
3084   // save tmp
3085   mr(R0, tmp);
3086   // kill tmp
3087   restore_LR_CR(tmp);
3088   // restore tmp
3089   mr(tmp, R0);
3090 }
3091 
3092 const char* stop_types[] = {
3093   "stop",
3094   "untested",
3095   "unimplemented",
3096   "shouldnotreachhere"
3097 };
3098 
3099 static void stop_on_request(int tp, const char* msg) {
3100   tty->print("PPC assembly code requires stop: (%s) %s\n", stop_types[tp%/*stop_end*/4], msg);
3101   guarantee(false, err_msg("PPC assembly code requires stop: %s", msg));
3102 }
3103 
3104 // Call a C-function that prints output.
3105 void MacroAssembler::stop(int type, const char* msg, int id) {
3106 #ifndef PRODUCT
3107   block_comment(err_msg("stop: %s %s {", stop_types[type%stop_end], msg));
3108 #else
3109   block_comment("stop {");
3110 #endif
3111 
3112   // setup arguments
3113   load_const_optimized(R3_ARG1, type);
3114   load_const_optimized(R4_ARG2, (void *)msg, /*tmp=*/R0);
3115   call_VM_leaf(CAST_FROM_FN_PTR(address, stop_on_request), R3_ARG1, R4_ARG2);
3116   illtrap();
3117   emit_int32(id);
3118   block_comment("} stop;");
3119 }
3120 


< prev index next >