hotspot/src/cpu/s390/vm/macroAssembler_s390.hpp
changeset 46327 91576389a517
parent 43969 ae5c415036b0
parent 46315 a796c32af782
child 46338 e84b501fa52e
equal deleted inserted replaced
44203:d2d435372329 46327:91576389a517
     1 /*
     1 /*
     2  * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
     3  * Copyright (c) 2016 SAP SE. 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.
     4  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     5  *
     5  *
     6  * This code is free software; you can redistribute it and/or modify it
     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
     7  * under the terms of the GNU General Public License version 2 only, as
     8  * published by the Free Software Foundation.
     8  * published by the Free Software Foundation.
  1007   // the numbers of 8-byte words.
  1007   // the numbers of 8-byte words.
  1008   void zap_from_to(Register low, Register high, Register tmp1 = Z_R0, Register tmp2 = Z_R1,
  1008   void zap_from_to(Register low, Register high, Register tmp1 = Z_R0, Register tmp2 = Z_R1,
  1009                    int before = 0, int after = 0) PRODUCT_RETURN;
  1009                    int before = 0, int after = 0) PRODUCT_RETURN;
  1010 
  1010 
  1011   // Emitters for CRC32 calculation.
  1011   // Emitters for CRC32 calculation.
       
  1012   // A note on invertCRC:
       
  1013   //   Unfortunately, internal representation of crc differs between CRC32 and CRC32C.
       
  1014   //   CRC32 holds it's current crc value in the externally visible representation.
       
  1015   //   CRC32C holds it's current crc value in internal format, ready for updating.
       
  1016   //   Thus, the crc value must be bit-flipped before updating it in the CRC32 case.
       
  1017   //   In the CRC32C case, it must be bit-flipped when it is given to the outside world (getValue()).
       
  1018   //   The bool invertCRC parameter indicates whether bit-flipping is required before updates.
  1012  private:
  1019  private:
  1013   void fold_byte_crc32(Register crc, Register table, Register val, Register tmp);
  1020   void fold_byte_crc32(Register crc, Register table, Register val, Register tmp);
  1014   void fold_8bit_crc32(Register crc, Register table, Register tmp);
  1021   void fold_8bit_crc32(Register crc, Register table, Register tmp);
       
  1022   void update_byte_crc32( Register crc, Register val, Register table);
  1015   void update_byteLoop_crc32(Register crc, Register buf, Register len, Register table,
  1023   void update_byteLoop_crc32(Register crc, Register buf, Register len, Register table,
  1016                              Register data, bool invertCRC);
  1024                              Register data);
  1017   void update_1word_crc32(Register crc, Register buf, Register table, int bufDisp, int bufInc,
  1025   void update_1word_crc32(Register crc, Register buf, Register table, int bufDisp, int bufInc,
  1018                           Register t0,  Register t1,  Register t2,  Register t3);
  1026                           Register t0,  Register t1,  Register t2,  Register t3);
  1019  public:
  1027  public:
  1020   void update_byte_crc32( Register crc, Register val, Register table);
  1028   void kernel_crc32_singleByteReg(Register crc, Register val, Register table,
  1021   void kernel_crc32_singleByte(Register crc, Register buf, Register len, Register table, Register tmp);
  1029                                   bool invertCRC);
       
  1030   void kernel_crc32_singleByte(Register crc, Register buf, Register len, Register table, Register tmp,
       
  1031                                bool invertCRC);
  1022   void kernel_crc32_1byte(Register crc, Register buf, Register len, Register table,
  1032   void kernel_crc32_1byte(Register crc, Register buf, Register len, Register table,
  1023                           Register t0,  Register t1,  Register t2,  Register t3);
  1033                           Register t0,  Register t1,  Register t2,  Register t3,
       
  1034                           bool invertCRC);
  1024   void kernel_crc32_1word(Register crc, Register buf, Register len, Register table,
  1035   void kernel_crc32_1word(Register crc, Register buf, Register len, Register table,
  1025                           Register t0,  Register t1,  Register t2,  Register t3);
  1036                           Register t0,  Register t1,  Register t2,  Register t3,
       
  1037                           bool invertCRC);
  1026   void kernel_crc32_2word(Register crc, Register buf, Register len, Register table,
  1038   void kernel_crc32_2word(Register crc, Register buf, Register len, Register table,
  1027                           Register t0,  Register t1,  Register t2,  Register t3);
  1039                           Register t0,  Register t1,  Register t2,  Register t3,
       
  1040                           bool invertCRC);
  1028 
  1041 
  1029   // Emitters for BigInteger.multiplyToLen intrinsic
  1042   // Emitters for BigInteger.multiplyToLen intrinsic
  1030   // note: length of result array (zlen) is passed on the stack
  1043   // note: length of result array (zlen) is passed on the stack
  1031  private:
  1044  private:
  1032   void add2_with_carry(Register dest_hi, Register dest_lo,
  1045   void add2_with_carry(Register dest_hi, Register dest_lo,