Skip to content
Permalink
Browse files

8264173: [s390] Improve Hardware Feature Detection And Reporting

Reviewed-by: mdoerr, goetz
  • Loading branch information
Lutz Schmidt committed Apr 7, 2021
1 parent 9d65039 commit d3fdd7399daec8b51b587ca9e3aa2338a98e0b1c
@@ -1,6 +1,6 @@
/*
* Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 2019 SAP SE. All rights reserved.
* Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 2021 SAP SE. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -1328,6 +1328,10 @@ class Assembler : public AbstractAssembler {
#define CKSM_ZOPC (unsigned int)(0xb2 << 24 | 0x41 << 16) // checksum. This is NOT CRC32
#define KM_ZOPC (unsigned int)(0xb9 << 24 | 0x2e << 16) // cipher
#define KMC_ZOPC (unsigned int)(0xb9 << 24 | 0x2f << 16) // cipher
#define KMA_ZOPC (unsigned int)(0xb9 << 24 | 0x29 << 16) // cipher
#define KMF_ZOPC (unsigned int)(0xb9 << 24 | 0x2a << 16) // cipher
#define KMCTR_ZOPC (unsigned int)(0xb9 << 24 | 0x2d << 16) // cipher
#define KMO_ZOPC (unsigned int)(0xb9 << 24 | 0x2b << 16) // cipher
#define KIMD_ZOPC (unsigned int)(0xb9 << 24 | 0x3e << 16) // SHA (msg digest)
#define KLMD_ZOPC (unsigned int)(0xb9 << 24 | 0x3f << 16) // SHA (msg digest)
#define KMAC_ZOPC (unsigned int)(0xb9 << 24 | 0x1e << 16) // Message Authentication Code
@@ -2376,12 +2380,16 @@ class Assembler : public AbstractAssembler {
// Complex CISC instructions
// ==========================

inline void z_cksm(Register r1, Register r2); // checksum. This is NOT CRC32
inline void z_km( Register r1, Register r2); // cipher message
inline void z_kmc( Register r1, Register r2); // cipher message with chaining
inline void z_kimd(Register r1, Register r2); // msg digest (SHA)
inline void z_klmd(Register r1, Register r2); // msg digest (SHA)
inline void z_kmac(Register r1, Register r2); // msg authentication code
inline void z_cksm( Register r1, Register r2); // checksum. This is NOT CRC32
inline void z_km( Register r1, Register r2); // cipher message
inline void z_kmc( Register r1, Register r2); // cipher message with chaining
inline void z_kma( Register r1, Register r3, Register r2); // cipher message with authentication
inline void z_kmf( Register r1, Register r2); // cipher message with cipher feedback
inline void z_kmctr(Register r1, Register r3, Register r2); // cipher message with counter
inline void z_kmo( Register r1, Register r2); // cipher message with output feedback
inline void z_kimd( Register r1, Register r2); // msg digest (SHA)
inline void z_klmd( Register r1, Register r2); // msg digest (SHA)
inline void z_kmac( Register r1, Register r2); // msg authentication code

inline void z_ex(Register r1, int64_t d2, Register x2, Register b2);// execute
inline void z_exrl(Register r1, int64_t i2); // execute relative long -- z10
@@ -3017,8 +3025,8 @@ class Assembler : public AbstractAssembler {
inline void z_bvat(Label& L); // all true
inline void z_bvnt(Label& L); // not all true (mixed or all false)
inline void z_bvmix(Label& L); // mixed true and false
inline void z_bvaf(Label& L); // not all false (mixed or all true)
inline void z_bvnf(Label& L); // all false
inline void z_bvnf(Label& L); // not all false (mixed or all true)
inline void z_bvaf(Label& L); // all false

inline void z_brno( Label& L);

@@ -1,6 +1,6 @@
/*
* Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 2017 SAP SE. All rights reserved.
* Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 2021 SAP SE. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -90,15 +90,19 @@ inline void Assembler::z_llghrl(Register r1, int64_t i2){ emit_48( LLGHRL_ZOPC |
inline void Assembler::z_llgfrl(Register r1, int64_t i2){ emit_48( LLGFRL_ZOPC | regt(r1, 8, 48) | simm32(i2, 16, 48)); }

inline void Assembler::z_sthrl(Register r1, int64_t i2) { emit_48( STHRL_ZOPC | regt(r1, 8, 48) | simm32(i2, 16, 48)); }
inline void Assembler::z_strl(Register r1, int64_t i2) { emit_48( STRL_ZOPC | regt(r1, 8, 48) | simm32(i2, 16, 48)); }
inline void Assembler::z_strl( Register r1, int64_t i2) { emit_48( STRL_ZOPC | regt(r1, 8, 48) | simm32(i2, 16, 48)); }
inline void Assembler::z_stgrl(Register r1, int64_t i2) { emit_48( STGRL_ZOPC | regt(r1, 8, 48) | simm32(i2, 16, 48)); }

inline void Assembler::z_cksm(Register r1, Register r2) { emit_32( CKSM_ZOPC | regt(r1, 24, 32) | regt(r2, 28, 32)); }
inline void Assembler::z_km( Register r1, Register r2) { emit_32( KM_ZOPC | regt(r1, 24, 32) | regt(r2, 28, 32)); }
inline void Assembler::z_kmc( Register r1, Register r2) { emit_32( KMC_ZOPC | regt(r1, 24, 32) | regt(r2, 28, 32)); }
inline void Assembler::z_kimd(Register r1, Register r2) { emit_32( KIMD_ZOPC | regt(r1, 24, 32) | regt(r2, 28, 32)); }
inline void Assembler::z_klmd(Register r1, Register r2) { emit_32( KLMD_ZOPC | regt(r1, 24, 32) | regt(r2, 28, 32)); }
inline void Assembler::z_kmac(Register r1, Register r2) { emit_32( KMAC_ZOPC | regt(r1, 24, 32) | regt(r2, 28, 32)); }
inline void Assembler::z_cksm( Register r1, Register r2) { emit_32( CKSM_ZOPC | regt(r1, 24, 32) | regt(r2, 28, 32)); }
inline void Assembler::z_km( Register r1, Register r2) { emit_32( KM_ZOPC | regt(r1, 24, 32) | regt(r2, 28, 32)); }
inline void Assembler::z_kmc( Register r1, Register r2) { emit_32( KMC_ZOPC | regt(r1, 24, 32) | regt(r2, 28, 32)); }
inline void Assembler::z_kma( Register r1, Register r3, Register r2) { emit_32( KMA_ZOPC | regt(r3, 16, 32) | regt(r1, 24, 32) | regt(r2, 28, 32)); }
inline void Assembler::z_kmf( Register r1, Register r2) { emit_32( KMF_ZOPC | regt(r1, 24, 32) | regt(r2, 28, 32)); }
inline void Assembler::z_kmctr(Register r1, Register r3, Register r2) { emit_32( KMCTR_ZOPC | regt(r3, 16, 32) | regt(r1, 24, 32) | regt(r2, 28, 32)); }
inline void Assembler::z_kmo( Register r1, Register r2) { emit_32( KMO_ZOPC | regt(r1, 24, 32) | regt(r2, 28, 32)); }
inline void Assembler::z_kimd( Register r1, Register r2) { emit_32( KIMD_ZOPC | regt(r1, 24, 32) | regt(r2, 28, 32)); }
inline void Assembler::z_klmd( Register r1, Register r2) { emit_32( KLMD_ZOPC | regt(r1, 24, 32) | regt(r2, 28, 32)); }
inline void Assembler::z_kmac( Register r1, Register r2) { emit_32( KMAC_ZOPC | regt(r1, 24, 32) | regt(r2, 28, 32)); }

inline void Assembler::z_exrl(Register r1, int64_t i2) { emit_48( EXRL_ZOPC | regt(r1, 8, 48) | simm32(i2, 16, 48)); } // z10
inline void Assembler::z_exrl(Register r1, address a2) { emit_48( EXRL_ZOPC | regt(r1, 8, 48) | simm32(RelAddr::pcrel_off32(a2, pc()), 16, 48)); } // z10

1 comment on commit d3fdd73

@openjdk-notifier

This comment has been minimized.

Copy link

@openjdk-notifier openjdk-notifier bot commented on d3fdd73 Apr 7, 2021

Please sign in to comment.