< prev index next >

src/hotspot/share/interpreter/templateTable.cpp

Print this page




 143 }
 144 
 145 
 146 void TemplateTable::jsr_w() {
 147   transition(vtos, vtos);       // result is not an oop, so do not transition to atos
 148   branch(true, true);
 149 }
 150 
 151 
 152 void TemplateTable::jsr() {
 153   transition(vtos, vtos);       // result is not an oop, so do not transition to atos
 154   branch(true, false);
 155 }
 156 
 157 
 158 
 159 //----------------------------------------------------------------------------------------------------
 160 // Implementation of TemplateTable: Debugging
 161 
 162 void TemplateTable::transition(TosState tos_in, TosState tos_out) {
 163   assert(_desc->tos_in()  == tos_in
 164          || (_desc->tos_in() == ptos && (tos_in == atos || tos_in == qtos)),
 165          "inconsistent tos_in  information");
 166   assert(_desc->tos_out() == tos_out, "inconsistent tos_out information");
 167 }
 168 
 169 
 170 //----------------------------------------------------------------------------------------------------
 171 // Implementation of TemplateTable: Initialization
 172 
 173 bool                       TemplateTable::_is_initialized = false;
 174 Template                   TemplateTable::_template_table     [Bytecodes::number_of_codes];
 175 Template                   TemplateTable::_template_table_wide[Bytecodes::number_of_codes];
 176 
 177 Template*                  TemplateTable::_desc;
 178 InterpreterMacroAssembler* TemplateTable::_masm;
 179 BarrierSet*                TemplateTable::_bs;
 180 
 181 
 182 void TemplateTable::def(Bytecodes::Code code, int flags, TosState in, TosState out, void (*gen)(), char filler) {
 183   assert(filler == ' ', "just checkin'");
 184   def(code, flags, in, out, (Template::generator)gen, 0);


 446   def(Bytecodes::_invokespecial       , ubcp|disp|clvm|____, vtos, vtos, invokespecial       , f1_byte      );
 447   def(Bytecodes::_invokestatic        , ubcp|disp|clvm|____, vtos, vtos, invokestatic        , f1_byte      );
 448   def(Bytecodes::_invokeinterface     , ubcp|disp|clvm|____, vtos, vtos, invokeinterface     , f1_byte      );
 449   def(Bytecodes::_invokedynamic       , ubcp|disp|clvm|____, vtos, vtos, invokedynamic       , f1_byte      );
 450   def(Bytecodes::_new                 , ubcp|____|clvm|____, vtos, atos, _new                ,  _           );
 451   def(Bytecodes::_newarray            , ubcp|____|clvm|____, itos, atos, newarray            ,  _           );
 452   def(Bytecodes::_anewarray           , ubcp|____|clvm|____, itos, atos, anewarray           ,  _           );
 453   def(Bytecodes::_arraylength         , ____|____|____|____, atos, itos, arraylength         ,  _           );
 454   def(Bytecodes::_athrow              , ____|disp|____|____, atos, vtos, athrow              ,  _           );
 455   def(Bytecodes::_checkcast           , ubcp|____|clvm|____, atos, atos, checkcast           ,  _           );
 456   def(Bytecodes::_instanceof          , ubcp|____|clvm|____, atos, itos, instanceof          ,  _           );
 457   def(Bytecodes::_monitorenter        , ____|disp|clvm|____, atos, vtos, monitorenter        ,  _           );
 458   def(Bytecodes::_monitorexit         , ____|____|clvm|____, atos, vtos, monitorexit         ,  _           );
 459   def(Bytecodes::_wide                , ubcp|disp|____|____, vtos, vtos, wide                ,  _           );
 460   def(Bytecodes::_multianewarray      , ubcp|____|clvm|____, vtos, atos, multianewarray      ,  _           );
 461   def(Bytecodes::_ifnull              , ubcp|____|clvm|____, atos, vtos, if_nullcmp          , equal        );
 462   def(Bytecodes::_ifnonnull           , ubcp|____|clvm|____, atos, vtos, if_nullcmp          , not_equal    );
 463   def(Bytecodes::_goto_w              , ubcp|____|clvm|____, vtos, vtos, goto_w              ,  _           );
 464   def(Bytecodes::_jsr_w               , ubcp|____|____|____, vtos, vtos, jsr_w               ,  _           );
 465   def(Bytecodes::_breakpoint          , ubcp|disp|clvm|____, vtos, vtos, _breakpoint         ,  _           );
 466   def(Bytecodes::_vload               , ubcp|____|clvm|____, vtos, qtos, vload               ,  _           );
 467   def(Bytecodes::_vstore              , ubcp|____|clvm|____, vtos, vtos, vstore              ,  _           );
 468   def(Bytecodes::_vaload              , ____|____|clvm|____, itos, qtos, vaload              ,  _           );
 469   def(Bytecodes::_vastore             , ____|____|clvm|____, vtos, vtos, vastore             ,  _           );
 470   def(Bytecodes::_vreturn             , ____|disp|clvm|____, qtos, qtos, _return             , qtos         );
 471   def(Bytecodes::_vdefault            , ubcp|____|clvm|____, vtos, qtos, vdefault            , _            );
 472   def(Bytecodes::_vwithfield          , ubcp|____|clvm|____, vtos, qtos, vwithfield          , _            );
 473   def(Bytecodes::_vbox                , ubcp|____|clvm|____, qtos, atos, _vbox               , _            );
 474   def(Bytecodes::_vunbox              , ubcp|____|clvm|____, atos, qtos, _vunbox             , _            );
 475 
 476   // wide Java spec bytecodes
 477   def(Bytecodes::_iload               , ubcp|____|____|iswd, vtos, itos, wide_iload          ,  _           );
 478   def(Bytecodes::_lload               , ubcp|____|____|iswd, vtos, ltos, wide_lload          ,  _           );
 479   def(Bytecodes::_fload               , ubcp|____|____|iswd, vtos, ftos, wide_fload          ,  _           );
 480   def(Bytecodes::_dload               , ubcp|____|____|iswd, vtos, dtos, wide_dload          ,  _           );
 481   def(Bytecodes::_aload               , ubcp|____|____|iswd, vtos, atos, wide_aload          ,  _           );
 482   def(Bytecodes::_vload               , ubcp|____|____|iswd, vtos, qtos, wide_vload          ,  _           );
 483   def(Bytecodes::_istore              , ubcp|____|____|iswd, vtos, vtos, wide_istore         ,  _           );
 484   def(Bytecodes::_lstore              , ubcp|____|____|iswd, vtos, vtos, wide_lstore         ,  _           );
 485   def(Bytecodes::_fstore              , ubcp|____|____|iswd, vtos, vtos, wide_fstore         ,  _           );
 486   def(Bytecodes::_dstore              , ubcp|____|____|iswd, vtos, vtos, wide_dstore         ,  _           );
 487   def(Bytecodes::_astore              , ubcp|____|____|iswd, vtos, vtos, wide_astore         ,  _           );
 488   def(Bytecodes::_vstore              , ubcp|____|____|iswd, vtos, vtos, wide_vstore         ,  _           );
 489   def(Bytecodes::_iinc                , ubcp|____|____|iswd, vtos, vtos, wide_iinc           ,  _           );
 490   def(Bytecodes::_ret                 , ubcp|disp|____|iswd, vtos, vtos, wide_ret            ,  _           );
 491   def(Bytecodes::_breakpoint          , ubcp|disp|clvm|____, vtos, vtos, _breakpoint         ,  _           );
 492 
 493   // JVM bytecodes
 494   def(Bytecodes::_fast_agetfield      , ubcp|____|____|____, ptos, atos, fast_accessfield    ,  atos        );
 495   def(Bytecodes::_fast_qgetfield      , ubcp|____|____|____, ptos, qtos, fast_accessfield    ,  qtos        );
 496   def(Bytecodes::_fast_bgetfield      , ubcp|____|____|____, ptos, itos, fast_accessfield    ,  itos        );
 497   def(Bytecodes::_fast_cgetfield      , ubcp|____|____|____, ptos, itos, fast_accessfield    ,  itos        );
 498   def(Bytecodes::_fast_dgetfield      , ubcp|____|____|____, ptos, dtos, fast_accessfield    ,  dtos        );
 499   def(Bytecodes::_fast_fgetfield      , ubcp|____|____|____, ptos, ftos, fast_accessfield    ,  ftos        );
 500   def(Bytecodes::_fast_igetfield      , ubcp|____|____|____, ptos, itos, fast_accessfield    ,  itos        );
 501   def(Bytecodes::_fast_lgetfield      , ubcp|____|____|____, ptos, ltos, fast_accessfield    ,  ltos        );
 502   def(Bytecodes::_fast_sgetfield      , ubcp|____|____|____, ptos, itos, fast_accessfield    ,  itos        );
 503 
 504   def(Bytecodes::_fast_aputfield      , ubcp|____|____|____, atos, vtos, fast_storefield ,   atos        );
 505   def(Bytecodes::_fast_qputfield      , ubcp|____|____|____, qtos, vtos, fast_storefield ,   qtos        );
 506   def(Bytecodes::_fast_bputfield      , ubcp|____|____|____, itos, vtos, fast_storefield ,   itos        );
 507   def(Bytecodes::_fast_zputfield      , ubcp|____|____|____, itos, vtos, fast_storefield ,   itos        );
 508   def(Bytecodes::_fast_cputfield      , ubcp|____|____|____, itos, vtos, fast_storefield  ,  itos        );
 509   def(Bytecodes::_fast_dputfield      , ubcp|____|____|____, dtos, vtos, fast_storefield  ,  dtos        );
 510   def(Bytecodes::_fast_fputfield      , ubcp|____|____|____, ftos, vtos, fast_storefield  ,  ftos        );
 511   def(Bytecodes::_fast_iputfield      , ubcp|____|____|____, itos, vtos, fast_storefield  ,  itos        );
 512   def(Bytecodes::_fast_lputfield      , ubcp|____|____|____, ltos, vtos, fast_storefield  ,  ltos        );
 513   def(Bytecodes::_fast_sputfield      , ubcp|____|____|____, itos, vtos, fast_storefield  ,  itos        );
 514 
 515   def(Bytecodes::_fast_aload_0        , ____|____|____|____, vtos, atos, aload               ,  0           );
 516   def(Bytecodes::_fast_iaccess_0      , ubcp|____|____|____, vtos, itos, fast_xaccess        ,  itos        );
 517   def(Bytecodes::_fast_aaccess_0      , ubcp|____|____|____, vtos, atos, fast_xaccess        ,  atos        );
 518   def(Bytecodes::_fast_faccess_0      , ubcp|____|____|____, vtos, ftos, fast_xaccess        ,  ftos        );
 519 
 520   def(Bytecodes::_fast_iload          , ubcp|____|____|____, vtos, itos, fast_iload          ,  _       );
 521   def(Bytecodes::_fast_iload2         , ubcp|____|____|____, vtos, itos, fast_iload2         ,  _       );
 522   def(Bytecodes::_fast_icaload        , ubcp|____|____|____, vtos, itos, fast_icaload        ,  _       );
 523 
 524   def(Bytecodes::_fast_invokevfinal   , ubcp|disp|clvm|____, vtos, vtos, fast_invokevfinal   , f2_byte      );
 525 




 143 }
 144 
 145 
 146 void TemplateTable::jsr_w() {
 147   transition(vtos, vtos);       // result is not an oop, so do not transition to atos
 148   branch(true, true);
 149 }
 150 
 151 
 152 void TemplateTable::jsr() {
 153   transition(vtos, vtos);       // result is not an oop, so do not transition to atos
 154   branch(true, false);
 155 }
 156 
 157 
 158 
 159 //----------------------------------------------------------------------------------------------------
 160 // Implementation of TemplateTable: Debugging
 161 
 162 void TemplateTable::transition(TosState tos_in, TosState tos_out) {
 163   assert(_desc->tos_in()  == tos_in,

 164          "inconsistent tos_in  information");
 165   assert(_desc->tos_out() == tos_out, "inconsistent tos_out information");
 166 }
 167 
 168 
 169 //----------------------------------------------------------------------------------------------------
 170 // Implementation of TemplateTable: Initialization
 171 
 172 bool                       TemplateTable::_is_initialized = false;
 173 Template                   TemplateTable::_template_table     [Bytecodes::number_of_codes];
 174 Template                   TemplateTable::_template_table_wide[Bytecodes::number_of_codes];
 175 
 176 Template*                  TemplateTable::_desc;
 177 InterpreterMacroAssembler* TemplateTable::_masm;
 178 BarrierSet*                TemplateTable::_bs;
 179 
 180 
 181 void TemplateTable::def(Bytecodes::Code code, int flags, TosState in, TosState out, void (*gen)(), char filler) {
 182   assert(filler == ' ', "just checkin'");
 183   def(code, flags, in, out, (Template::generator)gen, 0);


 445   def(Bytecodes::_invokespecial       , ubcp|disp|clvm|____, vtos, vtos, invokespecial       , f1_byte      );
 446   def(Bytecodes::_invokestatic        , ubcp|disp|clvm|____, vtos, vtos, invokestatic        , f1_byte      );
 447   def(Bytecodes::_invokeinterface     , ubcp|disp|clvm|____, vtos, vtos, invokeinterface     , f1_byte      );
 448   def(Bytecodes::_invokedynamic       , ubcp|disp|clvm|____, vtos, vtos, invokedynamic       , f1_byte      );
 449   def(Bytecodes::_new                 , ubcp|____|clvm|____, vtos, atos, _new                ,  _           );
 450   def(Bytecodes::_newarray            , ubcp|____|clvm|____, itos, atos, newarray            ,  _           );
 451   def(Bytecodes::_anewarray           , ubcp|____|clvm|____, itos, atos, anewarray           ,  _           );
 452   def(Bytecodes::_arraylength         , ____|____|____|____, atos, itos, arraylength         ,  _           );
 453   def(Bytecodes::_athrow              , ____|disp|____|____, atos, vtos, athrow              ,  _           );
 454   def(Bytecodes::_checkcast           , ubcp|____|clvm|____, atos, atos, checkcast           ,  _           );
 455   def(Bytecodes::_instanceof          , ubcp|____|clvm|____, atos, itos, instanceof          ,  _           );
 456   def(Bytecodes::_monitorenter        , ____|disp|clvm|____, atos, vtos, monitorenter        ,  _           );
 457   def(Bytecodes::_monitorexit         , ____|____|clvm|____, atos, vtos, monitorexit         ,  _           );
 458   def(Bytecodes::_wide                , ubcp|disp|____|____, vtos, vtos, wide                ,  _           );
 459   def(Bytecodes::_multianewarray      , ubcp|____|clvm|____, vtos, atos, multianewarray      ,  _           );
 460   def(Bytecodes::_ifnull              , ubcp|____|clvm|____, atos, vtos, if_nullcmp          , equal        );
 461   def(Bytecodes::_ifnonnull           , ubcp|____|clvm|____, atos, vtos, if_nullcmp          , not_equal    );
 462   def(Bytecodes::_goto_w              , ubcp|____|clvm|____, vtos, vtos, goto_w              ,  _           );
 463   def(Bytecodes::_jsr_w               , ubcp|____|____|____, vtos, vtos, jsr_w               ,  _           );
 464   def(Bytecodes::_breakpoint          , ubcp|disp|clvm|____, vtos, vtos, _breakpoint         ,  _           );
 465   def(Bytecodes::_defaultvalue        , ubcp|____|clvm|____, vtos, atos, defaultvalue        , _            );
 466   def(Bytecodes::_withfield           , ubcp|____|clvm|____, vtos, atos, withfield           , _            );







 467 
 468   // wide Java spec bytecodes
 469   def(Bytecodes::_iload               , ubcp|____|____|iswd, vtos, itos, wide_iload          ,  _           );
 470   def(Bytecodes::_lload               , ubcp|____|____|iswd, vtos, ltos, wide_lload          ,  _           );
 471   def(Bytecodes::_fload               , ubcp|____|____|iswd, vtos, ftos, wide_fload          ,  _           );
 472   def(Bytecodes::_dload               , ubcp|____|____|iswd, vtos, dtos, wide_dload          ,  _           );
 473   def(Bytecodes::_aload               , ubcp|____|____|iswd, vtos, atos, wide_aload          ,  _           );

 474   def(Bytecodes::_istore              , ubcp|____|____|iswd, vtos, vtos, wide_istore         ,  _           );
 475   def(Bytecodes::_lstore              , ubcp|____|____|iswd, vtos, vtos, wide_lstore         ,  _           );
 476   def(Bytecodes::_fstore              , ubcp|____|____|iswd, vtos, vtos, wide_fstore         ,  _           );
 477   def(Bytecodes::_dstore              , ubcp|____|____|iswd, vtos, vtos, wide_dstore         ,  _           );
 478   def(Bytecodes::_astore              , ubcp|____|____|iswd, vtos, vtos, wide_astore         ,  _           );

 479   def(Bytecodes::_iinc                , ubcp|____|____|iswd, vtos, vtos, wide_iinc           ,  _           );
 480   def(Bytecodes::_ret                 , ubcp|disp|____|iswd, vtos, vtos, wide_ret            ,  _           );
 481   def(Bytecodes::_breakpoint          , ubcp|disp|clvm|____, vtos, vtos, _breakpoint         ,  _           );
 482 
 483   // JVM bytecodes
 484   def(Bytecodes::_fast_agetfield      , ubcp|____|____|____, atos, atos, fast_accessfield    ,  atos        );
 485   def(Bytecodes::_fast_qgetfield      , ubcp|____|____|____, atos, atos, fast_accessfield    ,  atos        );
 486   def(Bytecodes::_fast_bgetfield      , ubcp|____|____|____, atos, itos, fast_accessfield    ,  itos        );
 487   def(Bytecodes::_fast_cgetfield      , ubcp|____|____|____, atos, itos, fast_accessfield    ,  itos        );
 488   def(Bytecodes::_fast_dgetfield      , ubcp|____|____|____, atos, dtos, fast_accessfield    ,  dtos        );
 489   def(Bytecodes::_fast_fgetfield      , ubcp|____|____|____, atos, ftos, fast_accessfield    ,  ftos        );
 490   def(Bytecodes::_fast_igetfield      , ubcp|____|____|____, atos, itos, fast_accessfield    ,  itos        );
 491   def(Bytecodes::_fast_lgetfield      , ubcp|____|____|____, atos, ltos, fast_accessfield    ,  ltos        );
 492   def(Bytecodes::_fast_sgetfield      , ubcp|____|____|____, atos, itos, fast_accessfield    ,  itos        );
 493 
 494   def(Bytecodes::_fast_aputfield      , ubcp|____|____|____, atos, vtos, fast_storefield ,   atos        );
 495   def(Bytecodes::_fast_qputfield      , ubcp|____|____|____, atos, vtos, fast_storefield ,   atos        );
 496   def(Bytecodes::_fast_bputfield      , ubcp|____|____|____, itos, vtos, fast_storefield ,   itos        );
 497   def(Bytecodes::_fast_zputfield      , ubcp|____|____|____, itos, vtos, fast_storefield ,   itos        );
 498   def(Bytecodes::_fast_cputfield      , ubcp|____|____|____, itos, vtos, fast_storefield  ,  itos        );
 499   def(Bytecodes::_fast_dputfield      , ubcp|____|____|____, dtos, vtos, fast_storefield  ,  dtos        );
 500   def(Bytecodes::_fast_fputfield      , ubcp|____|____|____, ftos, vtos, fast_storefield  ,  ftos        );
 501   def(Bytecodes::_fast_iputfield      , ubcp|____|____|____, itos, vtos, fast_storefield  ,  itos        );
 502   def(Bytecodes::_fast_lputfield      , ubcp|____|____|____, ltos, vtos, fast_storefield  ,  ltos        );
 503   def(Bytecodes::_fast_sputfield      , ubcp|____|____|____, itos, vtos, fast_storefield  ,  itos        );
 504 
 505   def(Bytecodes::_fast_aload_0        , ____|____|____|____, vtos, atos, aload               ,  0           );
 506   def(Bytecodes::_fast_iaccess_0      , ubcp|____|____|____, vtos, itos, fast_xaccess        ,  itos        );
 507   def(Bytecodes::_fast_aaccess_0      , ubcp|____|____|____, vtos, atos, fast_xaccess        ,  atos        );
 508   def(Bytecodes::_fast_faccess_0      , ubcp|____|____|____, vtos, ftos, fast_xaccess        ,  ftos        );
 509 
 510   def(Bytecodes::_fast_iload          , ubcp|____|____|____, vtos, itos, fast_iload          ,  _       );
 511   def(Bytecodes::_fast_iload2         , ubcp|____|____|____, vtos, itos, fast_iload2         ,  _       );
 512   def(Bytecodes::_fast_icaload        , ubcp|____|____|____, vtos, itos, fast_icaload        ,  _       );
 513 
 514   def(Bytecodes::_fast_invokevfinal   , ubcp|disp|clvm|____, vtos, vtos, fast_invokevfinal   , f2_byte      );
 515 


< prev index next >