hotspot/src/cpu/x86/vm/macroAssembler_x86.hpp
changeset 46294 345a46524a19
parent 43423 bcaab17f72a5
child 46327 91576389a517
equal deleted inserted replaced
46293:9a88f7fe04b5 46294:345a46524a19
     1 /*
     1 /*
     2  * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 1997, 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.
    69     address  entry_point,              // the entry point
    69     address  entry_point,              // the entry point
    70     int      number_of_arguments,      // the number of arguments (w/o thread) to pop after the call
    70     int      number_of_arguments,      // the number of arguments (w/o thread) to pop after the call
    71     bool     check_exceptions          // whether to check for pending exceptions after return
    71     bool     check_exceptions          // whether to check for pending exceptions after return
    72   );
    72   );
    73 
    73 
    74   // These routines should emit JVMTI PopFrame and ForceEarlyReturn handling code.
       
    75   // The implementation is only non-empty for the InterpreterMacroAssembler,
       
    76   // as only the interpreter handles PopFrame and ForceEarlyReturn requests.
       
    77   virtual void check_and_handle_popframe(Register java_thread);
       
    78   virtual void check_and_handle_earlyret(Register java_thread);
       
    79 
       
    80   void call_VM_helper(Register oop_result, address entry_point, int number_of_arguments, bool check_exceptions = true);
    74   void call_VM_helper(Register oop_result, address entry_point, int number_of_arguments, bool check_exceptions = true);
    81 
    75 
    82   // helpers for FPU flag access
    76   // helpers for FPU flag access
    83   // tmp is a temporary register, if none is available use noreg
    77   // tmp is a temporary register, if none is available use noreg
    84   void save_rax   (Register tmp);
    78   void save_rax   (Register tmp);
    85   void restore_rax(Register tmp);
    79   void restore_rax(Register tmp);
    86 
    80 
    87  public:
    81  public:
    88   MacroAssembler(CodeBuffer* code) : Assembler(code) {}
    82   MacroAssembler(CodeBuffer* code) : Assembler(code) {}
       
    83 
       
    84  // These routines should emit JVMTI PopFrame and ForceEarlyReturn handling code.
       
    85  // The implementation is only non-empty for the InterpreterMacroAssembler,
       
    86  // as only the interpreter handles PopFrame and ForceEarlyReturn requests.
       
    87  virtual void check_and_handle_popframe(Register java_thread);
       
    88  virtual void check_and_handle_earlyret(Register java_thread);
    89 
    89 
    90   // Support for NULL-checks
    90   // Support for NULL-checks
    91   //
    91   //
    92   // Generates code that causes a NULL OS exception if the content of reg is NULL.
    92   // Generates code that causes a NULL OS exception if the content of reg is NULL.
    93   // If the accessed location is M[reg + offset] and the offset is known, provide the
    93   // If the accessed location is M[reg + offset] and the offset is known, provide the