mirror of
https://github.com/openjdk/jdk.git
synced 2026-04-04 12:08:36 +00:00
8273459: Update code segment alignment to 64 bytes
Reviewed-by: kvn, sviswanathan
This commit is contained in:
parent
1a29b1e95e
commit
53b25bce87
@ -1170,7 +1170,16 @@ void MacroAssembler::addpd(XMMRegister dst, AddressLiteral src) {
|
||||
}
|
||||
}
|
||||
|
||||
// See 8273459. Function for ensuring 64-byte alignment, intended for stubs only.
|
||||
// Stub code is generated once and never copied.
|
||||
// NMethods can't use this because they get copied and we can't force alignment > 32 bytes.
|
||||
void MacroAssembler::align64() {
|
||||
align(64, (unsigned long long) pc());
|
||||
}
|
||||
|
||||
void MacroAssembler::align(int modulus) {
|
||||
// 8273459: Ensure alignment is possible with current segment alignment
|
||||
assert(modulus <= CodeEntryAlignment, "Alignment must be <= CodeEntryAlignment");
|
||||
align(modulus, offset());
|
||||
}
|
||||
|
||||
|
||||
@ -194,6 +194,7 @@ class MacroAssembler: public Assembler {
|
||||
void incrementq(AddressLiteral dst);
|
||||
|
||||
// Alignment
|
||||
void align64();
|
||||
void align(int modulus);
|
||||
void align(int modulus, int target);
|
||||
|
||||
|
||||
@ -2998,7 +2998,7 @@ class StubGenerator: public StubCodeGenerator {
|
||||
}
|
||||
|
||||
address generate_upper_word_mask() {
|
||||
__ align(64);
|
||||
__ align64();
|
||||
StubCodeMark mark(this, "StubRoutines", "upper_word_mask");
|
||||
address start = __ pc();
|
||||
__ emit_data(0x00000000, relocInfo::none, 0);
|
||||
@ -3009,7 +3009,7 @@ class StubGenerator: public StubCodeGenerator {
|
||||
}
|
||||
|
||||
address generate_shuffle_byte_flip_mask() {
|
||||
__ align(64);
|
||||
__ align64();
|
||||
StubCodeMark mark(this, "StubRoutines", "shuffle_byte_flip_mask");
|
||||
address start = __ pc();
|
||||
__ emit_data(0x0c0d0e0f, relocInfo::none, 0);
|
||||
@ -3068,7 +3068,7 @@ class StubGenerator: public StubCodeGenerator {
|
||||
}
|
||||
|
||||
address generate_pshuffle_byte_flip_mask() {
|
||||
__ align(64);
|
||||
__ align64();
|
||||
StubCodeMark mark(this, "StubRoutines", "pshuffle_byte_flip_mask");
|
||||
address start = __ pc();
|
||||
__ emit_data(0x00010203, relocInfo::none, 0);
|
||||
|
||||
@ -4194,7 +4194,7 @@ class StubGenerator: public StubCodeGenerator {
|
||||
}
|
||||
|
||||
address generate_upper_word_mask() {
|
||||
__ align(64);
|
||||
__ align64();
|
||||
StubCodeMark mark(this, "StubRoutines", "upper_word_mask");
|
||||
address start = __ pc();
|
||||
__ emit_data64(0x0000000000000000, relocInfo::none);
|
||||
@ -4203,7 +4203,7 @@ class StubGenerator: public StubCodeGenerator {
|
||||
}
|
||||
|
||||
address generate_shuffle_byte_flip_mask() {
|
||||
__ align(64);
|
||||
__ align64();
|
||||
StubCodeMark mark(this, "StubRoutines", "shuffle_byte_flip_mask");
|
||||
address start = __ pc();
|
||||
__ emit_data64(0x08090a0b0c0d0e0f, relocInfo::none);
|
||||
@ -4248,7 +4248,7 @@ class StubGenerator: public StubCodeGenerator {
|
||||
}
|
||||
|
||||
address generate_pshuffle_byte_flip_mask() {
|
||||
__ align(64);
|
||||
__ align64();
|
||||
StubCodeMark mark(this, "StubRoutines", "pshuffle_byte_flip_mask");
|
||||
address start = __ pc();
|
||||
__ emit_data64(0x0405060700010203, relocInfo::none);
|
||||
@ -4464,7 +4464,7 @@ class StubGenerator: public StubCodeGenerator {
|
||||
|
||||
// This mask is used for incrementing counter value(linc0, linc4, etc.)
|
||||
address counter_mask_addr() {
|
||||
__ align(64);
|
||||
__ align64();
|
||||
StubCodeMark mark(this, "StubRoutines", "counter_mask_addr");
|
||||
address start = __ pc();
|
||||
__ emit_data64(0x08090a0b0c0d0e0f, relocInfo::none);//lbswapmask
|
||||
@ -5383,7 +5383,7 @@ address generate_avx_ghash_processBlocks() {
|
||||
|
||||
address base64_shuffle_addr()
|
||||
{
|
||||
__ align(64, (unsigned long long)__ pc());
|
||||
__ align64();
|
||||
StubCodeMark mark(this, "StubRoutines", "shuffle_base64");
|
||||
address start = __ pc();
|
||||
assert(((unsigned long long)start & 0x3f) == 0,
|
||||
@ -5443,7 +5443,7 @@ address generate_avx_ghash_processBlocks() {
|
||||
|
||||
address base64_encoding_table_addr()
|
||||
{
|
||||
__ align(64, (unsigned long long)__ pc());
|
||||
__ align64();
|
||||
StubCodeMark mark(this, "StubRoutines", "encoding_table_base64");
|
||||
address start = __ pc();
|
||||
assert(((unsigned long long)start & 0x3f) == 0, "Alignment problem (0x%08llx)", (unsigned long long)start);
|
||||
@ -5850,7 +5850,7 @@ address generate_avx_ghash_processBlocks() {
|
||||
|
||||
// base64 AVX512vbmi tables
|
||||
address base64_vbmi_lookup_lo_addr() {
|
||||
__ align(64, (unsigned long long) __ pc());
|
||||
__ align64();
|
||||
StubCodeMark mark(this, "StubRoutines", "lookup_lo_base64");
|
||||
address start = __ pc();
|
||||
assert(((unsigned long long)start & 0x3f) == 0,
|
||||
@ -5867,7 +5867,7 @@ address generate_avx_ghash_processBlocks() {
|
||||
}
|
||||
|
||||
address base64_vbmi_lookup_hi_addr() {
|
||||
__ align(64, (unsigned long long) __ pc());
|
||||
__ align64();
|
||||
StubCodeMark mark(this, "StubRoutines", "lookup_hi_base64");
|
||||
address start = __ pc();
|
||||
assert(((unsigned long long)start & 0x3f) == 0,
|
||||
@ -5883,7 +5883,7 @@ address generate_avx_ghash_processBlocks() {
|
||||
return start;
|
||||
}
|
||||
address base64_vbmi_lookup_lo_url_addr() {
|
||||
__ align(64, (unsigned long long) __ pc());
|
||||
__ align64();
|
||||
StubCodeMark mark(this, "StubRoutines", "lookup_lo_base64url");
|
||||
address start = __ pc();
|
||||
assert(((unsigned long long)start & 0x3f) == 0,
|
||||
@ -5900,7 +5900,7 @@ address generate_avx_ghash_processBlocks() {
|
||||
}
|
||||
|
||||
address base64_vbmi_lookup_hi_url_addr() {
|
||||
__ align(64, (unsigned long long) __ pc());
|
||||
__ align64();
|
||||
StubCodeMark mark(this, "StubRoutines", "lookup_hi_base64url");
|
||||
address start = __ pc();
|
||||
assert(((unsigned long long)start & 0x3f) == 0,
|
||||
@ -5917,7 +5917,7 @@ address generate_avx_ghash_processBlocks() {
|
||||
}
|
||||
|
||||
address base64_vbmi_pack_vec_addr() {
|
||||
__ align(64, (unsigned long long) __ pc());
|
||||
__ align64();
|
||||
StubCodeMark mark(this, "StubRoutines", "pack_vec_base64");
|
||||
address start = __ pc();
|
||||
assert(((unsigned long long)start & 0x3f) == 0,
|
||||
@ -5934,7 +5934,7 @@ address generate_avx_ghash_processBlocks() {
|
||||
}
|
||||
|
||||
address base64_vbmi_join_0_1_addr() {
|
||||
__ align(64, (unsigned long long) __ pc());
|
||||
__ align64();
|
||||
StubCodeMark mark(this, "StubRoutines", "join_0_1_base64");
|
||||
address start = __ pc();
|
||||
assert(((unsigned long long)start & 0x3f) == 0,
|
||||
@ -5951,7 +5951,7 @@ address generate_avx_ghash_processBlocks() {
|
||||
}
|
||||
|
||||
address base64_vbmi_join_1_2_addr() {
|
||||
__ align(64, (unsigned long long) __ pc());
|
||||
__ align64();
|
||||
StubCodeMark mark(this, "StubRoutines", "join_1_2_base64");
|
||||
address start = __ pc();
|
||||
assert(((unsigned long long)start & 0x3f) == 0,
|
||||
@ -5968,7 +5968,7 @@ address generate_avx_ghash_processBlocks() {
|
||||
}
|
||||
|
||||
address base64_vbmi_join_2_3_addr() {
|
||||
__ align(64, (unsigned long long) __ pc());
|
||||
__ align64();
|
||||
StubCodeMark mark(this, "StubRoutines", "join_2_3_base64");
|
||||
address start = __ pc();
|
||||
assert(((unsigned long long)start & 0x3f) == 0,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user