< prev index next >

src/cpu/sparc/vm/macroAssembler_sparc.cpp

Print this page
rev 13107 : imported patch jvm_h


  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #include "precompiled.hpp"
  26 #include "asm/macroAssembler.inline.hpp"
  27 #include "compiler/disassembler.hpp"
  28 #include "gc/shared/cardTableModRefBS.hpp"
  29 #include "gc/shared/collectedHeap.inline.hpp"
  30 #include "interpreter/interpreter.hpp"
  31 #include "memory/resourceArea.hpp"
  32 #include "memory/universe.hpp"
  33 #include "oops/klass.inline.hpp"

  34 #include "prims/methodHandles.hpp"
  35 #include "runtime/biasedLocking.hpp"
  36 #include "runtime/interfaceSupport.hpp"
  37 #include "runtime/objectMonitor.hpp"
  38 #include "runtime/os.inline.hpp"
  39 #include "runtime/sharedRuntime.hpp"
  40 #include "runtime/stubRoutines.hpp"
  41 #include "utilities/macros.hpp"
  42 #if INCLUDE_ALL_GCS
  43 #include "gc/g1/g1CollectedHeap.inline.hpp"
  44 #include "gc/g1/g1SATBCardTableModRefBS.hpp"
  45 #include "gc/g1/heapRegion.hpp"
  46 #endif // INCLUDE_ALL_GCS
  47 #ifdef COMPILER2
  48 #include "opto/intrinsicnode.hpp"
  49 #endif
  50 
  51 #ifdef PRODUCT
  52 #define BLOCK_COMMENT(str) /* nothing */
  53 #define STOP(error) stop(error)


1372 //  delayed()->restore();
1373   RegistersForDebugging::restore_registers(this, L0);
1374   restore();
1375 }
1376 
1377 
1378 void MacroAssembler::untested(const char* what) {
1379   // We must be able to turn interactive prompting off
1380   // in order to run automated test scripts on the VM
1381   // Use the flag ShowMessageBoxOnError
1382 
1383   const char* b = NULL;
1384   {
1385     ResourceMark rm;
1386     stringStream ss;
1387     ss.print("untested: %s", what);
1388     b = code_string(ss.as_string());
1389   }
1390   if (ShowMessageBoxOnError) { STOP(b); }
1391   else                       { warn(b); }







1392 }
1393 
1394 
1395 void MacroAssembler::stop_subroutine() {
1396   RegistersForDebugging::save_registers(this);
1397 
1398   // for the sake of the debugger, stick a PC on the current frame
1399   // (this assumes that the caller has performed an extra "save")
1400   mov(I7, L7);
1401   add(O7, -7 * BytesPerInt, I7);
1402 
1403   save_frame(); // one more save to free up another O7 register
1404   mov(I0, O1); // addr of reg save area
1405 
1406   // We expect pointer to message in I1. Caller must set it up in O1
1407   mov(I1, O0); // get msg
1408   call (CAST_FROM_FN_PTR(address, MacroAssembler::debug), relocInfo::runtime_call_type);
1409   delayed()->nop();
1410 
1411   restore();




  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #include "precompiled.hpp"
  26 #include "asm/macroAssembler.inline.hpp"
  27 #include "compiler/disassembler.hpp"
  28 #include "gc/shared/cardTableModRefBS.hpp"
  29 #include "gc/shared/collectedHeap.inline.hpp"
  30 #include "interpreter/interpreter.hpp"
  31 #include "memory/resourceArea.hpp"
  32 #include "memory/universe.hpp"
  33 #include "oops/klass.inline.hpp"
  34 #include "prims/jvm.h"
  35 #include "prims/methodHandles.hpp"
  36 #include "runtime/biasedLocking.hpp"
  37 #include "runtime/interfaceSupport.hpp"
  38 #include "runtime/objectMonitor.hpp"
  39 #include "runtime/os.inline.hpp"
  40 #include "runtime/sharedRuntime.hpp"
  41 #include "runtime/stubRoutines.hpp"
  42 #include "utilities/macros.hpp"
  43 #if INCLUDE_ALL_GCS
  44 #include "gc/g1/g1CollectedHeap.inline.hpp"
  45 #include "gc/g1/g1SATBCardTableModRefBS.hpp"
  46 #include "gc/g1/heapRegion.hpp"
  47 #endif // INCLUDE_ALL_GCS
  48 #ifdef COMPILER2
  49 #include "opto/intrinsicnode.hpp"
  50 #endif
  51 
  52 #ifdef PRODUCT
  53 #define BLOCK_COMMENT(str) /* nothing */
  54 #define STOP(error) stop(error)


1373 //  delayed()->restore();
1374   RegistersForDebugging::restore_registers(this, L0);
1375   restore();
1376 }
1377 
1378 
1379 void MacroAssembler::untested(const char* what) {
1380   // We must be able to turn interactive prompting off
1381   // in order to run automated test scripts on the VM
1382   // Use the flag ShowMessageBoxOnError
1383 
1384   const char* b = NULL;
1385   {
1386     ResourceMark rm;
1387     stringStream ss;
1388     ss.print("untested: %s", what);
1389     b = code_string(ss.as_string());
1390   }
1391   if (ShowMessageBoxOnError) { STOP(b); }
1392   else                       { warn(b); }
1393 }
1394 
1395 
1396 void MacroAssembler::unimplemented(const char* what) {
1397   char* b = new char[1024];
1398   jio_snprintf(b, 1024, "unimplemented: %s", what);
1399   stop(b);
1400 }
1401 
1402 
1403 void MacroAssembler::stop_subroutine() {
1404   RegistersForDebugging::save_registers(this);
1405 
1406   // for the sake of the debugger, stick a PC on the current frame
1407   // (this assumes that the caller has performed an extra "save")
1408   mov(I7, L7);
1409   add(O7, -7 * BytesPerInt, I7);
1410 
1411   save_frame(); // one more save to free up another O7 register
1412   mov(I0, O1); // addr of reg save area
1413 
1414   // We expect pointer to message in I1. Caller must set it up in O1
1415   mov(I1, O0); // get msg
1416   call (CAST_FROM_FN_PTR(address, MacroAssembler::debug), relocInfo::runtime_call_type);
1417   delayed()->nop();
1418 
1419   restore();


< prev index next >