hotspot/src/cpu/arm/vm/templateInterpreterGenerator_arm.cpp
changeset 46327 91576389a517
parent 43969 ae5c415036b0
parent 46300 b8c77e61e99e
child 46338 e84b501fa52e
equal deleted inserted replaced
44203:d2d435372329 46327:91576389a517
     1 /*
     1 /*
     2  * Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2008, 2017, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
   268   }
   268   }
   269 
   269 
   270   return entry;
   270   return entry;
   271 }
   271 }
   272 
   272 
   273 address TemplateInterpreterGenerator::generate_continuation_for(TosState state) {
       
   274   // Not used.
       
   275   STOP("generate_continuation_for");
       
   276   return NULL;
       
   277 }
       
   278 
       
   279 address TemplateInterpreterGenerator::generate_return_entry_for(TosState state, int step, size_t index_size) {
   273 address TemplateInterpreterGenerator::generate_return_entry_for(TosState state, int step, size_t index_size) {
   280   address entry = __ pc();
   274   address entry = __ pc();
   281 
   275 
   282   __ interp_verify_oop(R0_tos, state, __FILE__, __LINE__);
   276   __ interp_verify_oop(R0_tos, state, __FILE__, __LINE__);
   283 
   277 
   307   __ add(Rstack_top, Rstack_top, AsmOperand(Rtemp, lsl, Interpreter::logStackElementSize));
   301   __ add(Rstack_top, Rstack_top, AsmOperand(Rtemp, lsl, Interpreter::logStackElementSize));
   308 
   302 
   309 #ifndef AARCH64
   303 #ifndef AARCH64
   310   __ convert_retval_to_tos(state);
   304   __ convert_retval_to_tos(state);
   311 #endif // !AARCH64
   305 #endif // !AARCH64
       
   306 
       
   307  __ check_and_handle_popframe();
       
   308  __ check_and_handle_earlyret();
   312 
   309 
   313   __ dispatch_next(state, step);
   310   __ dispatch_next(state, step);
   314 
   311 
   315   return entry;
   312   return entry;
   316 }
   313 }
  1402   __ sub(R3, R3, R2); // number of additional locals
  1399   __ sub(R3, R3, R2); // number of additional locals
  1403 
  1400 
  1404 #ifdef AARCH64
  1401 #ifdef AARCH64
  1405   // setup RmaxStack
  1402   // setup RmaxStack
  1406   __ ldrh(RmaxStack, Address(RconstMethod, ConstMethod::max_stack_offset()));
  1403   __ ldrh(RmaxStack, Address(RconstMethod, ConstMethod::max_stack_offset()));
  1407   __ add(RmaxStack, RmaxStack, MAX2(1, Method::extra_stack_entries())); // reserve slots for exception handler and JSR292 appendix argument
  1404   // We have to add extra reserved slots to max_stack. There are 3 users of the extra slots,
       
  1405   // none of which are at the same time, so we just need to make sure there is enough room
       
  1406   // for the biggest user:
       
  1407   //   -reserved slot for exception handler
       
  1408   //   -reserved slots for JSR292. Method::extra_stack_entries() is the size.
       
  1409   //   -3 reserved slots so get_method_counters() can save some registers before call_VM().
       
  1410   __ add(RmaxStack, RmaxStack, MAX2(3, Method::extra_stack_entries()));
  1408 #endif // AARCH64
  1411 #endif // AARCH64
  1409 
  1412 
  1410   // see if we've got enough room on the stack for locals plus overhead.
  1413   // see if we've got enough room on the stack for locals plus overhead.
  1411   generate_stack_overflow_check();
  1414   generate_stack_overflow_check();
  1412 
  1415