src/share/vm/c1/c1_LIR.hpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File c1-coops Sdiff src/share/vm/c1

src/share/vm/c1/c1_LIR.hpp

Print this page




 968   , lir_cond_greater
 969   , lir_cond_belowEqual
 970   , lir_cond_aboveEqual
 971   , lir_cond_always
 972   , lir_cond_unknown = -1
 973 };
 974 
 975 
 976 enum LIR_PatchCode {
 977   lir_patch_none,
 978   lir_patch_low,
 979   lir_patch_high,
 980   lir_patch_normal
 981 };
 982 
 983 
 984 enum LIR_MoveKind {
 985   lir_move_normal,
 986   lir_move_volatile,
 987   lir_move_unaligned,

 988   lir_move_max_flag
 989 };
 990 
 991 
 992 // --------------------------------------------------
 993 // LIR_Op
 994 // --------------------------------------------------
 995 class LIR_Op: public CompilationResourceObj {
 996  friend class LIR_OpVisitState;
 997 
 998 #ifdef ASSERT
 999  private:
1000   const char *  _file;
1001   int           _line;
1002 #endif
1003 
1004  protected:
1005   LIR_Opr       _result;
1006   unsigned short _code;
1007   unsigned short _flags;


1915   void nop()                                     { append(new LIR_Op0(lir_nop)); }
1916   void build_frame()                             { append(new LIR_Op0(lir_build_frame)); }
1917 
1918   void std_entry(LIR_Opr receiver)               { append(new LIR_Op0(lir_std_entry, receiver)); }
1919   void osr_entry(LIR_Opr osrPointer)             { append(new LIR_Op0(lir_osr_entry, osrPointer)); }
1920 
1921   void branch_destination(Label* lbl)            { append(new LIR_OpLabel(lbl)); }
1922 
1923   void negate(LIR_Opr from, LIR_Opr to)          { append(new LIR_Op1(lir_neg, from, to)); }
1924   void leal(LIR_Opr from, LIR_Opr result_reg)    { append(new LIR_Op1(lir_leal, from, result_reg)); }
1925 
1926   // result is a stack location for old backend and vreg for UseLinearScan
1927   // stack_loc_temp is an illegal register for old backend
1928   void roundfp(LIR_Opr reg, LIR_Opr stack_loc_temp, LIR_Opr result) { append(new LIR_OpRoundFP(reg, stack_loc_temp, result)); }
1929   void unaligned_move(LIR_Address* src, LIR_Opr dst) { append(new LIR_Op1(lir_move, LIR_OprFact::address(src), dst, dst->type(), lir_patch_none, NULL, lir_move_unaligned)); }
1930   void unaligned_move(LIR_Opr src, LIR_Address* dst) { append(new LIR_Op1(lir_move, src, LIR_OprFact::address(dst), src->type(), lir_patch_none, NULL, lir_move_unaligned)); }
1931   void unaligned_move(LIR_Opr src, LIR_Opr dst) { append(new LIR_Op1(lir_move, src, dst, dst->type(), lir_patch_none, NULL, lir_move_unaligned)); }
1932   void move(LIR_Opr src, LIR_Opr dst, CodeEmitInfo* info = NULL) { append(new LIR_Op1(lir_move, src, dst, dst->type(), lir_patch_none, info)); }
1933   void move(LIR_Address* src, LIR_Opr dst, CodeEmitInfo* info = NULL) { append(new LIR_Op1(lir_move, LIR_OprFact::address(src), dst, src->type(), lir_patch_none, info)); }
1934   void move(LIR_Opr src, LIR_Address* dst, CodeEmitInfo* info = NULL) { append(new LIR_Op1(lir_move, src, LIR_OprFact::address(dst), dst->type(), lir_patch_none, info)); }
1935 













1936   void volatile_move(LIR_Opr src, LIR_Opr dst, BasicType type, CodeEmitInfo* info = NULL, LIR_PatchCode patch_code = lir_patch_none) { append(new LIR_Op1(lir_move, src, dst, type, patch_code, info, lir_move_volatile)); }
1937 
1938   void oop2reg  (jobject o, LIR_Opr reg)         { append(new LIR_Op1(lir_move, LIR_OprFact::oopConst(o),    reg));   }
1939   void oop2reg_patch(jobject o, LIR_Opr reg, CodeEmitInfo* info);
1940 
1941   void return_op(LIR_Opr result)                 { append(new LIR_Op1(lir_return, result)); }
1942 
1943   void safepoint(LIR_Opr tmp, CodeEmitInfo* info)  { append(new LIR_Op1(lir_safepoint, tmp, info)); }
1944 
1945 #ifdef PPC
1946   void convert(Bytecodes::Code code, LIR_Opr left, LIR_Opr dst, LIR_Opr tmp1, LIR_Opr tmp2) { append(new LIR_OpConvert(code, left, dst, NULL, tmp1, tmp2)); }
1947 #endif
1948   void convert(Bytecodes::Code code, LIR_Opr left, LIR_Opr dst, ConversionStub* stub = NULL/*, bool is_32bit = false*/) { append(new LIR_OpConvert(code, left, dst, stub)); }
1949 
1950   void logical_and (LIR_Opr left, LIR_Opr right, LIR_Opr dst) { append(new LIR_Op2(lir_logic_and,  left, right, dst)); }
1951   void logical_or  (LIR_Opr left, LIR_Opr right, LIR_Opr dst) { append(new LIR_Op2(lir_logic_or,   left, right, dst)); }
1952   void logical_xor (LIR_Opr left, LIR_Opr right, LIR_Opr dst) { append(new LIR_Op2(lir_logic_xor,  left, right, dst)); }
1953 
1954   void   pack64(LIR_Opr src, LIR_Opr dst) { append(new LIR_Op1(lir_pack64,   src, dst, T_LONG, lir_patch_none, NULL)); }
1955   void unpack64(LIR_Opr src, LIR_Opr dst) { append(new LIR_Op1(lir_unpack64, src, dst, T_LONG, lir_patch_none, NULL)); }




 968   , lir_cond_greater
 969   , lir_cond_belowEqual
 970   , lir_cond_aboveEqual
 971   , lir_cond_always
 972   , lir_cond_unknown = -1
 973 };
 974 
 975 
 976 enum LIR_PatchCode {
 977   lir_patch_none,
 978   lir_patch_low,
 979   lir_patch_high,
 980   lir_patch_normal
 981 };
 982 
 983 
 984 enum LIR_MoveKind {
 985   lir_move_normal,
 986   lir_move_volatile,
 987   lir_move_unaligned,
 988   lir_move_wide,
 989   lir_move_max_flag
 990 };
 991 
 992 
 993 // --------------------------------------------------
 994 // LIR_Op
 995 // --------------------------------------------------
 996 class LIR_Op: public CompilationResourceObj {
 997  friend class LIR_OpVisitState;
 998 
 999 #ifdef ASSERT
1000  private:
1001   const char *  _file;
1002   int           _line;
1003 #endif
1004 
1005  protected:
1006   LIR_Opr       _result;
1007   unsigned short _code;
1008   unsigned short _flags;


1916   void nop()                                     { append(new LIR_Op0(lir_nop)); }
1917   void build_frame()                             { append(new LIR_Op0(lir_build_frame)); }
1918 
1919   void std_entry(LIR_Opr receiver)               { append(new LIR_Op0(lir_std_entry, receiver)); }
1920   void osr_entry(LIR_Opr osrPointer)             { append(new LIR_Op0(lir_osr_entry, osrPointer)); }
1921 
1922   void branch_destination(Label* lbl)            { append(new LIR_OpLabel(lbl)); }
1923 
1924   void negate(LIR_Opr from, LIR_Opr to)          { append(new LIR_Op1(lir_neg, from, to)); }
1925   void leal(LIR_Opr from, LIR_Opr result_reg)    { append(new LIR_Op1(lir_leal, from, result_reg)); }
1926 
1927   // result is a stack location for old backend and vreg for UseLinearScan
1928   // stack_loc_temp is an illegal register for old backend
1929   void roundfp(LIR_Opr reg, LIR_Opr stack_loc_temp, LIR_Opr result) { append(new LIR_OpRoundFP(reg, stack_loc_temp, result)); }
1930   void unaligned_move(LIR_Address* src, LIR_Opr dst) { append(new LIR_Op1(lir_move, LIR_OprFact::address(src), dst, dst->type(), lir_patch_none, NULL, lir_move_unaligned)); }
1931   void unaligned_move(LIR_Opr src, LIR_Address* dst) { append(new LIR_Op1(lir_move, src, LIR_OprFact::address(dst), src->type(), lir_patch_none, NULL, lir_move_unaligned)); }
1932   void unaligned_move(LIR_Opr src, LIR_Opr dst) { append(new LIR_Op1(lir_move, src, dst, dst->type(), lir_patch_none, NULL, lir_move_unaligned)); }
1933   void move(LIR_Opr src, LIR_Opr dst, CodeEmitInfo* info = NULL) { append(new LIR_Op1(lir_move, src, dst, dst->type(), lir_patch_none, info)); }
1934   void move(LIR_Address* src, LIR_Opr dst, CodeEmitInfo* info = NULL) { append(new LIR_Op1(lir_move, LIR_OprFact::address(src), dst, src->type(), lir_patch_none, info)); }
1935   void move(LIR_Opr src, LIR_Address* dst, CodeEmitInfo* info = NULL) { append(new LIR_Op1(lir_move, src, LIR_OprFact::address(dst), dst->type(), lir_patch_none, info)); }
1936   void move_wide(LIR_Address* src, LIR_Opr dst, CodeEmitInfo* info = NULL) {
1937     if (UseCompressedOops) {
1938       append(new LIR_Op1(lir_move, LIR_OprFact::address(src), dst, src->type(), lir_patch_none, info, lir_move_wide));
1939     } else {
1940       move(src, dst, info);
1941     }
1942   }
1943   void move_wide(LIR_Opr src, LIR_Address* dst, CodeEmitInfo* info = NULL) {
1944     if (UseCompressedOops) {
1945       append(new LIR_Op1(lir_move, src, LIR_OprFact::address(dst), dst->type(), lir_patch_none, info, lir_move_wide));
1946     } else {
1947       move(src, dst, info);
1948     }
1949   }
1950   void volatile_move(LIR_Opr src, LIR_Opr dst, BasicType type, CodeEmitInfo* info = NULL, LIR_PatchCode patch_code = lir_patch_none) { append(new LIR_Op1(lir_move, src, dst, type, patch_code, info, lir_move_volatile)); }
1951 
1952   void oop2reg  (jobject o, LIR_Opr reg)         { append(new LIR_Op1(lir_move, LIR_OprFact::oopConst(o),    reg));   }
1953   void oop2reg_patch(jobject o, LIR_Opr reg, CodeEmitInfo* info);
1954 
1955   void return_op(LIR_Opr result)                 { append(new LIR_Op1(lir_return, result)); }
1956 
1957   void safepoint(LIR_Opr tmp, CodeEmitInfo* info)  { append(new LIR_Op1(lir_safepoint, tmp, info)); }
1958 
1959 #ifdef PPC
1960   void convert(Bytecodes::Code code, LIR_Opr left, LIR_Opr dst, LIR_Opr tmp1, LIR_Opr tmp2) { append(new LIR_OpConvert(code, left, dst, NULL, tmp1, tmp2)); }
1961 #endif
1962   void convert(Bytecodes::Code code, LIR_Opr left, LIR_Opr dst, ConversionStub* stub = NULL/*, bool is_32bit = false*/) { append(new LIR_OpConvert(code, left, dst, stub)); }
1963 
1964   void logical_and (LIR_Opr left, LIR_Opr right, LIR_Opr dst) { append(new LIR_Op2(lir_logic_and,  left, right, dst)); }
1965   void logical_or  (LIR_Opr left, LIR_Opr right, LIR_Opr dst) { append(new LIR_Op2(lir_logic_or,   left, right, dst)); }
1966   void logical_xor (LIR_Opr left, LIR_Opr right, LIR_Opr dst) { append(new LIR_Op2(lir_logic_xor,  left, right, dst)); }
1967 
1968   void   pack64(LIR_Opr src, LIR_Opr dst) { append(new LIR_Op1(lir_pack64,   src, dst, T_LONG, lir_patch_none, NULL)); }
1969   void unpack64(LIR_Opr src, LIR_Opr dst) { append(new LIR_Op1(lir_unpack64, src, dst, T_LONG, lir_patch_none, NULL)); }


src/share/vm/c1/c1_LIR.hpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File