1 /*
   2  * Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
   3  * Copyright (c) 2014, Red Hat Inc. All rights reserved.
   4  * Copyright (c) 2015, Linaro Ltd. All rights reserved.
   5  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   6  *
   7  * This code is free software; you can redistribute it and/or modify it
   8  * under the terms of the GNU General Public License version 2 only, as
   9  * published by the Free Software Foundation.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  *
  25  */
  26 
  27 #ifndef OS_CPU_LINUX_AARCH32_VM_THREAD_LINUX_AARCH32_HPP
  28 #define OS_CPU_LINUX_AARCH32_VM_THREAD_LINUX_AARCH32_HPP
  29 
  30  private:
  31 #ifdef ASSERT
  32   // spill stack holds N callee-save registers at each Java call and
  33   // grows downwards towards limit
  34   // we need limit to check we have space for a spill and base so we
  35   // can identify all live spill frames at GC (eventually)
  36   address          _spill_stack;
  37   address          _spill_stack_base;
  38   address          _spill_stack_limit;
  39 #endif // ASSERT
  40 
  41   void pd_initialize() {
  42     _anchor.clear();
  43   }
  44 
  45   frame pd_last_frame();
  46 
  47  public:
  48   // Mutators are highly dangerous....
  49   intptr_t* last_Java_fp()                       { return _anchor.last_Java_fp(); }
  50   void  set_last_Java_fp(intptr_t* fp)           { _anchor.set_last_Java_fp(fp);   }
  51 
  52   void set_base_of_stack_pointer(intptr_t* base_sp) {
  53   }
  54 
  55   static ByteSize last_Java_fp_offset()          {
  56     return byte_offset_of(JavaThread, _anchor) + JavaFrameAnchor::last_Java_fp_offset();
  57   }
  58 
  59   intptr_t* base_of_stack_pointer() {
  60     return NULL;
  61   }
  62   void record_base_of_stack_pointer() {
  63   }
  64 
  65   bool pd_get_top_frame_for_signal_handler(frame* fr_addr, void* ucontext,
  66     bool isInJava);
  67 
  68   bool pd_get_top_frame_for_profiling(frame* fr_addr, void* ucontext, bool isInJava);
  69 private:
  70   bool pd_get_top_frame(frame* fr_addr, void* ucontext, bool isInJava);
  71 public:
  72 
  73   // These routines are only used on cpu architectures that
  74   // have separate register stacks (Itanium).
  75   static bool register_stack_overflow() { return false; }
  76   static void enable_register_stack_guard() {}
  77   static void disable_register_stack_guard() {}
  78 
  79 #endif // OS_CPU_LINUX_AARCH32_VM_THREAD_LINUX_AARCH32_HPP