/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*
*/
#ifndef SHARE_VM_C1_C1_LIRASSEMBLER_HPP
#define SHARE_VM_C1_C1_LIRASSEMBLER_HPP
#include "c1/c1_CodeStubs.hpp"
#include "ci/ciMethodData.hpp"
#include "oops/methodDataOop.hpp"
class Compilation;
class ScopeValue;
class BarrierSet;
private:
#ifdef ASSERT
void check_no_unbound_labels();
#endif
// non-safepoint debug info management
if (_pending_non_safepoint != NULL) {
}
}
void record_non_safepoint_debug_info();
// unified bailout support
// code emission patterns and accessors
void check_codespace();
// returns offset of icache check
int check_icache();
// addresses
// debug information
void set_24bit_FPU();
void reset_FPU();
void fpop();
void fxch(int i);
void fld(int i);
void ffree(int i);
void breakpoint();
// patching
void patching_epilog(PatchingStub* patch, LIR_PatchCode patch_code, Register obj, CodeEmitInfo* info);
public:
LIR_Assembler(Compilation* c);
~LIR_Assembler();
int code_offset() const;
int initial_frame_size_in_bytes();
// test for constants which can be encoded directly in instructions
static LIR_Opr receiverOpr();
static LIR_Opr osrBufferPointer();
// stubs
void emit_slow_case_stubs();
void emit_static_call_stub();
// code patterns
int emit_exception_handler();
int emit_unwind_handler();
int emit_deopt_handler();
// any last minute peephole optimizations are performed here. In
// particular sparc uses this for delay slot filling.
// returns offset of poll instruction
void emit_typecheck_helper(LIR_OpTypeCheck *op, Label* success, Label* failure, Label* obj_is_null);
void arith_op(LIR_Code code, LIR_Opr left, LIR_Opr right, LIR_Opr dest, CodeEmitInfo* info, bool pop_fpu_stack);
void arithmetic_idiv(LIR_Code code, LIR_Opr left, LIR_Opr right, LIR_Opr temp, LIR_Opr result, CodeEmitInfo* info);
void comp_mem_op(LIR_Opr src, LIR_Opr result, BasicType type, CodeEmitInfo* info); // info set for null exceptions
void osr_entry();
void build_frame();
void align_backward_branch_target();
void rt_call(LIR_Opr result, address dest, const LIR_OprList* args, LIR_Opr tmp, CodeEmitInfo* info);
void membar();
void membar_acquire();
void membar_release();
void membar_loadload();
void membar_storestore();
void membar_loadstore();
void membar_storeload();
#ifdef TARGET_ARCH_x86
# include "c1_LIRAssembler_x86.hpp"
#endif
#ifdef TARGET_ARCH_sparc
# include "c1_LIRAssembler_sparc.hpp"
#endif
#ifdef TARGET_ARCH_arm
# include "c1_LIRAssembler_arm.hpp"
#endif
#ifdef TARGET_ARCH_ppc
# include "c1_LIRAssembler_ppc.hpp"
#endif
};
#endif // SHARE_VM_C1_C1_LIRASSEMBLER_HPP