< prev index next >

src/hotspot/cpu/sparc/stubGenerator_sparc.cpp

Print this page


   1 /*
   2  * Copyright (c) 1997, 2018, 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  *


4202     __ xor3(L3,G5,G1);
4203     __ movxtod(G1,F2);
4204 
4205     // F60:F62 used for next 16-bytes
4206     __ xor3(L2,L4,G1);
4207     __ movxtod(G1,F60);
4208     __ xor3(L3,L5,G1);
4209     __ movxtod(G1,F62);
4210 
4211     __ aes_dround23(F54, F0, F2, F4);
4212     __ aes_dround01(F52, F0, F2, F6);
4213     __ aes_dround23(F54, F60, F62, F58);
4214     __ aes_dround01(F52, F60, F62, F56);
4215     __ aes_dround23(F50, F6, F4, F2);
4216     __ aes_dround01(F48, F6, F4, F0);
4217     __ aes_dround23(F50, F56, F58, F62);
4218     __ aes_dround01(F48, F56, F58, F60);
4219     // save F48:F54 in temp registers
4220     __ movdtox(F54,G2);
4221     __ movdtox(F52,G3);
4222     __ movdtox(F50,G6);
4223     __ movdtox(F48,G1);
4224     for ( int i = 46;  i >= 14; i -= 8 ) {
4225       __ aes_dround23(as_FloatRegister(i), F0, F2, F4);
4226       __ aes_dround01(as_FloatRegister(i-2), F0, F2, F6);
4227       __ aes_dround23(as_FloatRegister(i), F60, F62, F58);
4228       __ aes_dround01(as_FloatRegister(i-2), F60, F62, F56);
4229       __ aes_dround23(as_FloatRegister(i-4), F6, F4, F2);
4230       __ aes_dround01(as_FloatRegister(i-6), F6, F4, F0);
4231       __ aes_dround23(as_FloatRegister(i-4), F56, F58, F62);
4232       __ aes_dround01(as_FloatRegister(i-6), F56, F58, F60);
4233     }
4234     // init F48:F54 with F0:F6 values (original key)
4235     __ ldf(FloatRegisterImpl::D, original_key, 0, F48);
4236     __ ldf(FloatRegisterImpl::D, original_key, 8, F50);
4237     __ ldf(FloatRegisterImpl::D, original_key, 16, F52);
4238     __ ldf(FloatRegisterImpl::D, original_key, 24, F54);
4239     __ aes_dround23(F54, F0, F2, F4);
4240     __ aes_dround01(F52, F0, F2, F6);
4241     __ aes_dround23(F54, F60, F62, F58);
4242     __ aes_dround01(F52, F60, F62, F56);
4243     __ aes_dround23_l(F50, F6, F4, F2);
4244     __ aes_dround01_l(F48, F6, F4, F0);
4245     __ aes_dround23_l(F50, F56, F58, F62);
4246     __ aes_dround01_l(F48, F56, F58, F60);
4247     // re-init F48:F54 with their original values
4248     __ movxtod(G2,F54);
4249     __ movxtod(G3,F52);
4250     __ movxtod(G6,F50);
4251     __ movxtod(G1,F48);
4252 
4253     __ movxtod(L0,F6);
4254     __ movxtod(L1,F4);
4255     __ fxor(FloatRegisterImpl::D, F6, F0, F0);
4256     __ fxor(FloatRegisterImpl::D, F4, F2, F2);
4257 
4258     __ movxtod(G4,F56);
4259     __ movxtod(G5,F58);
4260     __ mov(L4,L0);
4261     __ mov(L5,L1);
4262     __ fxor(FloatRegisterImpl::D, F56, F60, F60);
4263     __ fxor(FloatRegisterImpl::D, F58, F62, F62);
4264 
4265     // check for 8-byte alignment since dest byte array may have arbitrary alignment if offset mod 8 is non-zero
4266     __ andcc(to, 7, G1);
4267     __ br(Assembler::notZero, true, Assembler::pn, L_store_misaligned_output_next2_blocks256);
4268     __ delayed()->edge8n(to, G0, G2);
4269 
4270     // aligned case: store output into the destination array


   1 /*
   2  * Copyright (c) 1997, 2019, 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  *


4202     __ xor3(L3,G5,G1);
4203     __ movxtod(G1,F2);
4204 
4205     // F60:F62 used for next 16-bytes
4206     __ xor3(L2,L4,G1);
4207     __ movxtod(G1,F60);
4208     __ xor3(L3,L5,G1);
4209     __ movxtod(G1,F62);
4210 
4211     __ aes_dround23(F54, F0, F2, F4);
4212     __ aes_dround01(F52, F0, F2, F6);
4213     __ aes_dround23(F54, F60, F62, F58);
4214     __ aes_dround01(F52, F60, F62, F56);
4215     __ aes_dround23(F50, F6, F4, F2);
4216     __ aes_dround01(F48, F6, F4, F0);
4217     __ aes_dround23(F50, F56, F58, F62);
4218     __ aes_dround01(F48, F56, F58, F60);
4219     // save F48:F54 in temp registers
4220     __ movdtox(F54,G2);
4221     __ movdtox(F52,G3);
4222     __ movdtox(F50,L6);
4223     __ movdtox(F48,G1);
4224     for ( int i = 46;  i >= 14; i -= 8 ) {
4225       __ aes_dround23(as_FloatRegister(i), F0, F2, F4);
4226       __ aes_dround01(as_FloatRegister(i-2), F0, F2, F6);
4227       __ aes_dround23(as_FloatRegister(i), F60, F62, F58);
4228       __ aes_dround01(as_FloatRegister(i-2), F60, F62, F56);
4229       __ aes_dround23(as_FloatRegister(i-4), F6, F4, F2);
4230       __ aes_dround01(as_FloatRegister(i-6), F6, F4, F0);
4231       __ aes_dround23(as_FloatRegister(i-4), F56, F58, F62);
4232       __ aes_dround01(as_FloatRegister(i-6), F56, F58, F60);
4233     }
4234     // init F48:F54 with F0:F6 values (original key)
4235     __ ldf(FloatRegisterImpl::D, original_key, 0, F48);
4236     __ ldf(FloatRegisterImpl::D, original_key, 8, F50);
4237     __ ldf(FloatRegisterImpl::D, original_key, 16, F52);
4238     __ ldf(FloatRegisterImpl::D, original_key, 24, F54);
4239     __ aes_dround23(F54, F0, F2, F4);
4240     __ aes_dround01(F52, F0, F2, F6);
4241     __ aes_dround23(F54, F60, F62, F58);
4242     __ aes_dround01(F52, F60, F62, F56);
4243     __ aes_dround23_l(F50, F6, F4, F2);
4244     __ aes_dround01_l(F48, F6, F4, F0);
4245     __ aes_dround23_l(F50, F56, F58, F62);
4246     __ aes_dround01_l(F48, F56, F58, F60);
4247     // re-init F48:F54 with their original values
4248     __ movxtod(G2,F54);
4249     __ movxtod(G3,F52);
4250     __ movxtod(L6,F50);
4251     __ movxtod(G1,F48);
4252 
4253     __ movxtod(L0,F6);
4254     __ movxtod(L1,F4);
4255     __ fxor(FloatRegisterImpl::D, F6, F0, F0);
4256     __ fxor(FloatRegisterImpl::D, F4, F2, F2);
4257 
4258     __ movxtod(G4,F56);
4259     __ movxtod(G5,F58);
4260     __ mov(L4,L0);
4261     __ mov(L5,L1);
4262     __ fxor(FloatRegisterImpl::D, F56, F60, F60);
4263     __ fxor(FloatRegisterImpl::D, F58, F62, F62);
4264 
4265     // check for 8-byte alignment since dest byte array may have arbitrary alignment if offset mod 8 is non-zero
4266     __ andcc(to, 7, G1);
4267     __ br(Assembler::notZero, true, Assembler::pn, L_store_misaligned_output_next2_blocks256);
4268     __ delayed()->edge8n(to, G0, G2);
4269 
4270     // aligned case: store output into the destination array


< prev index next >