< prev index next >

src/cpu/s390/vm/c1_LIRAssembler_s390.cpp

Print this page


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


3027     __ z_ogr(tmp2, tmp1);
3028 
3029     __ bind(do_update);
3030     __ z_stg(tmp2, mdo_addr);
3031 
3032     __ bind(next);
3033   }
3034 }
3035 
3036 void LIR_Assembler::emit_updatecrc32(LIR_OpUpdateCRC32* op) {
3037   assert(op->crc()->is_single_cpu(), "crc must be register");
3038   assert(op->val()->is_single_cpu(), "byte value must be register");
3039   assert(op->result_opr()->is_single_cpu(), "result must be register");
3040   Register crc = op->crc()->as_register();
3041   Register val = op->val()->as_register();
3042   Register res = op->result_opr()->as_register();
3043 
3044   assert_different_registers(val, crc, res);
3045 
3046   __ load_const_optimized(res, StubRoutines::crc_table_addr());
3047   __ not_(crc, noreg, false); // ~crc
3048   __ update_byte_crc32(crc, val, res);
3049   __ not_(res, crc, false); // ~crc
3050 }
3051 
3052 #undef __
   1 /*
   2  * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
   3  * Copyright (c) 2016, 2017, SAP SE. All rights reserved.
   4  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   5  *
   6  * This code is free software; you can redistribute it and/or modify it
   7  * under the terms of the GNU General Public License version 2 only, as
   8  * published by the Free Software Foundation.
   9  *
  10  * This code is distributed in the hope that it will be useful, but WITHOUT
  11  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  12  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  13  * version 2 for more details (a copy is included in the LICENSE file that
  14  * accompanied this code).
  15  *
  16  * You should have received a copy of the GNU General Public License version
  17  * 2 along with this work; if not, write to the Free Software Foundation,
  18  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  19  *
  20  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  21  * or visit www.oracle.com if you need additional information or have any
  22  * questions.
  23  *


3027     __ z_ogr(tmp2, tmp1);
3028 
3029     __ bind(do_update);
3030     __ z_stg(tmp2, mdo_addr);
3031 
3032     __ bind(next);
3033   }
3034 }
3035 
3036 void LIR_Assembler::emit_updatecrc32(LIR_OpUpdateCRC32* op) {
3037   assert(op->crc()->is_single_cpu(), "crc must be register");
3038   assert(op->val()->is_single_cpu(), "byte value must be register");
3039   assert(op->result_opr()->is_single_cpu(), "result must be register");
3040   Register crc = op->crc()->as_register();
3041   Register val = op->val()->as_register();
3042   Register res = op->result_opr()->as_register();
3043 
3044   assert_different_registers(val, crc, res);
3045 
3046   __ load_const_optimized(res, StubRoutines::crc_table_addr());
3047   __ kernel_crc32_singleByteReg(crc, val, res, true);
3048   __ z_lgfr(res, crc);

3049 }
3050 
3051 #undef __
< prev index next >