< prev index next >

src/share/vm/c1/c1_LIR.cpp

Print this page


   1 /*
   2  * Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   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
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *


 378 
 379 LIR_OpUpdateCRC32::LIR_OpUpdateCRC32(LIR_Opr crc, LIR_Opr val, LIR_Opr res)
 380   : LIR_Op(lir_updatecrc32, res, NULL)
 381   , _crc(crc)
 382   , _val(val) {
 383 }
 384 
 385 //-------------------verify--------------------------
 386 
 387 void LIR_Op1::verify() const {
 388   switch(code()) {
 389   case lir_move:
 390     assert(in_opr()->is_valid() && result_opr()->is_valid(), "must be");
 391     break;
 392   case lir_null_check:
 393     assert(in_opr()->is_register(), "must be");
 394     break;
 395   case lir_return:
 396     assert(in_opr()->is_register() || in_opr()->is_illegal(), "must be");
 397     break;


 398   }
 399 }
 400 
 401 void LIR_OpRTCall::verify() const {
 402   assert(strcmp(Runtime1::name_for_address(addr()), "<unknown function>") != 0, "unknown function");
 403 }
 404 
 405 //-------------------visits--------------------------
 406 
 407 // complete rework of LIR instruction visitor.
 408 // The virtual call for each instruction type is replaced by a big
 409 // switch that adds the operands for each instruction
 410 
 411 void LIR_OpVisitState::visit(LIR_Op* op) {
 412   // copy information from the LIR_Op
 413   reset();
 414   set_op(op);
 415 
 416   switch (op->code()) {
 417 


   1 /*
   2  * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   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
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *


 378 
 379 LIR_OpUpdateCRC32::LIR_OpUpdateCRC32(LIR_Opr crc, LIR_Opr val, LIR_Opr res)
 380   : LIR_Op(lir_updatecrc32, res, NULL)
 381   , _crc(crc)
 382   , _val(val) {
 383 }
 384 
 385 //-------------------verify--------------------------
 386 
 387 void LIR_Op1::verify() const {
 388   switch(code()) {
 389   case lir_move:
 390     assert(in_opr()->is_valid() && result_opr()->is_valid(), "must be");
 391     break;
 392   case lir_null_check:
 393     assert(in_opr()->is_register(), "must be");
 394     break;
 395   case lir_return:
 396     assert(in_opr()->is_register() || in_opr()->is_illegal(), "must be");
 397     break;
 398   default:
 399     break;
 400   }
 401 }
 402 
 403 void LIR_OpRTCall::verify() const {
 404   assert(strcmp(Runtime1::name_for_address(addr()), "<unknown function>") != 0, "unknown function");
 405 }
 406 
 407 //-------------------visits--------------------------
 408 
 409 // complete rework of LIR instruction visitor.
 410 // The virtual call for each instruction type is replaced by a big
 411 // switch that adds the operands for each instruction
 412 
 413 void LIR_OpVisitState::visit(LIR_Op* op) {
 414   // copy information from the LIR_Op
 415   reset();
 416   set_op(op);
 417 
 418   switch (op->code()) {
 419 


< prev index next >