< prev index next >

src/cpu/ppc/vm/c1_LIRAssembler_ppc.cpp

Print this page


   1 /*
   2  * Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
   3  * Copyright (c) 2012, 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  *


3160     __ std(R0, index_or_disp(mdo_addr), mdo_addr->base()->as_pointer_register());
3161 
3162     __ bind(Lnext);
3163     if (klass_reg_used) { __ load_const_optimized(R29_TOC, MacroAssembler::global_toc(), R0); } // reinit
3164   }
3165   __ bind(Ldone);
3166 }
3167 
3168 
3169 void LIR_Assembler::emit_updatecrc32(LIR_OpUpdateCRC32* op) {
3170   assert(op->crc()->is_single_cpu(), "crc must be register");
3171   assert(op->val()->is_single_cpu(), "byte value must be register");
3172   assert(op->result_opr()->is_single_cpu(), "result must be register");
3173   Register crc = op->crc()->as_register();
3174   Register val = op->val()->as_register();
3175   Register res = op->result_opr()->as_register();
3176 
3177   assert_different_registers(val, crc, res);
3178 
3179   __ load_const_optimized(res, StubRoutines::crc_table_addr(), R0);
3180   __ nand(crc, crc, crc); // ~crc
3181   __ update_byte_crc32(crc, val, res);
3182   __ nand(res, crc, crc); // ~crc
3183 }
3184 
3185 #undef __
   1 /*
   2  * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
   3  * Copyright (c) 2012, 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  *


3160     __ std(R0, index_or_disp(mdo_addr), mdo_addr->base()->as_pointer_register());
3161 
3162     __ bind(Lnext);
3163     if (klass_reg_used) { __ load_const_optimized(R29_TOC, MacroAssembler::global_toc(), R0); } // reinit
3164   }
3165   __ bind(Ldone);
3166 }
3167 
3168 
3169 void LIR_Assembler::emit_updatecrc32(LIR_OpUpdateCRC32* op) {
3170   assert(op->crc()->is_single_cpu(), "crc must be register");
3171   assert(op->val()->is_single_cpu(), "byte value must be register");
3172   assert(op->result_opr()->is_single_cpu(), "result must be register");
3173   Register crc = op->crc()->as_register();
3174   Register val = op->val()->as_register();
3175   Register res = op->result_opr()->as_register();
3176 
3177   assert_different_registers(val, crc, res);
3178 
3179   __ load_const_optimized(res, StubRoutines::crc_table_addr(), R0);
3180   __ kernel_crc32_singleByteReg(crc, val, res, true);
3181   __ mr(res, crc);

3182 }
3183 
3184 #undef __
< prev index next >