Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
Automatic merge of jdk:master into master
  • Loading branch information
duke committed Jan 13, 2021
2 parents b5719f7 + 0957d9e commit 48977119d61c2466c43825d703a384c519bd2776
Show file tree
Hide file tree
Showing 85 changed files with 1,997 additions and 780 deletions.
@@ -2,6 +2,7 @@
# generate these charsets into sun.nio.cs
#
GBK
GB18030
Johab
MS1255
MS1256
@@ -94,6 +94,7 @@ ifeq ($(call isTargetOs, macosx), true)
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LIBS := \
-ljava \
-framework Accelerate \
-framework ApplicationServices \
-framework AudioToolbox \
@@ -108,6 +109,8 @@ ifeq ($(call isTargetOs, macosx), true)
-framework QuartzCore, \
))

$(BUILD_LIBOSXAPP): $(call FindLib, java.base, java)

TARGETS += $(BUILD_LIBOSXAPP)

##############################################################################
@@ -17110,98 +17110,6 @@ instruct reduce_mul2D(vRegD dst, vRegD dsrc, vecX vsrc, vecX tmp)
ins_pipe(pipe_class_default);
%}

instruct reduce_max2F(vRegF dst, vRegF fsrc, vecD vsrc, vecD tmp) %{
predicate(n->in(2)->bottom_type()->is_vect()->element_basic_type() == T_FLOAT);
match(Set dst (MaxReductionV fsrc vsrc));
ins_cost(INSN_COST);
effect(TEMP_DEF dst, TEMP tmp);
format %{ "fmaxs $dst, $fsrc, $vsrc\n\t"
"ins $tmp, S, $vsrc, 0, 1\n\t"
"fmaxs $dst, $dst, $tmp\t# max reduction2F" %}
ins_encode %{
__ fmaxs(as_FloatRegister($dst$$reg), as_FloatRegister($fsrc$$reg), as_FloatRegister($vsrc$$reg));
__ ins(as_FloatRegister($tmp$$reg), __ S, as_FloatRegister($vsrc$$reg), 0, 1);
__ fmaxs(as_FloatRegister($dst$$reg), as_FloatRegister($dst$$reg), as_FloatRegister($tmp$$reg));
%}
ins_pipe(pipe_class_default);
%}

instruct reduce_max4F(vRegF dst, vRegF fsrc, vecX vsrc) %{
predicate(n->in(2)->bottom_type()->is_vect()->element_basic_type() == T_FLOAT);
match(Set dst (MaxReductionV fsrc vsrc));
ins_cost(INSN_COST);
effect(TEMP_DEF dst);
format %{ "fmaxv $dst, T4S, $vsrc\n\t"
"fmaxs $dst, $dst, $fsrc\t# max reduction4F" %}
ins_encode %{
__ fmaxv(as_FloatRegister($dst$$reg), __ T4S, as_FloatRegister($vsrc$$reg));
__ fmaxs(as_FloatRegister($dst$$reg), as_FloatRegister($dst$$reg), as_FloatRegister($fsrc$$reg));
%}
ins_pipe(pipe_class_default);
%}

instruct reduce_max2D(vRegD dst, vRegD dsrc, vecX vsrc, vecX tmp) %{
predicate(n->in(2)->bottom_type()->is_vect()->element_basic_type() == T_DOUBLE);
match(Set dst (MaxReductionV dsrc vsrc));
ins_cost(INSN_COST);
effect(TEMP_DEF dst, TEMP tmp);
format %{ "fmaxd $dst, $dsrc, $vsrc\n\t"
"ins $tmp, D, $vsrc, 0, 1\n\t"
"fmaxd $dst, $dst, $tmp\t# max reduction2D" %}
ins_encode %{
__ fmaxd(as_FloatRegister($dst$$reg), as_FloatRegister($dsrc$$reg), as_FloatRegister($vsrc$$reg));
__ ins(as_FloatRegister($tmp$$reg), __ D, as_FloatRegister($vsrc$$reg), 0, 1);
__ fmaxd(as_FloatRegister($dst$$reg), as_FloatRegister($dst$$reg), as_FloatRegister($tmp$$reg));
%}
ins_pipe(pipe_class_default);
%}

instruct reduce_min2F(vRegF dst, vRegF fsrc, vecD vsrc, vecD tmp) %{
predicate(n->in(2)->bottom_type()->is_vect()->element_basic_type() == T_FLOAT);
match(Set dst (MinReductionV fsrc vsrc));
ins_cost(INSN_COST);
effect(TEMP_DEF dst, TEMP tmp);
format %{ "fmins $dst, $fsrc, $vsrc\n\t"
"ins $tmp, S, $vsrc, 0, 1\n\t"
"fmins $dst, $dst, $tmp\t# min reduction2F" %}
ins_encode %{
__ fmins(as_FloatRegister($dst$$reg), as_FloatRegister($fsrc$$reg), as_FloatRegister($vsrc$$reg));
__ ins(as_FloatRegister($tmp$$reg), __ S, as_FloatRegister($vsrc$$reg), 0, 1);
__ fmins(as_FloatRegister($dst$$reg), as_FloatRegister($dst$$reg), as_FloatRegister($tmp$$reg));
%}
ins_pipe(pipe_class_default);
%}

instruct reduce_min4F(vRegF dst, vRegF fsrc, vecX vsrc) %{
predicate(n->in(2)->bottom_type()->is_vect()->element_basic_type() == T_FLOAT);
match(Set dst (MinReductionV fsrc vsrc));
ins_cost(INSN_COST);
effect(TEMP_DEF dst);
format %{ "fminv $dst, T4S, $vsrc\n\t"
"fmins $dst, $dst, $fsrc\t# min reduction4F" %}
ins_encode %{
__ fminv(as_FloatRegister($dst$$reg), __ T4S, as_FloatRegister($vsrc$$reg));
__ fmins(as_FloatRegister($dst$$reg), as_FloatRegister($dst$$reg), as_FloatRegister($fsrc$$reg));
%}
ins_pipe(pipe_class_default);
%}

instruct reduce_min2D(vRegD dst, vRegD dsrc, vecX vsrc, vecX tmp) %{
predicate(n->in(2)->bottom_type()->is_vect()->element_basic_type() == T_DOUBLE);
match(Set dst (MinReductionV dsrc vsrc));
ins_cost(INSN_COST);
effect(TEMP_DEF dst, TEMP tmp);
format %{ "fmind $dst, $dsrc, $vsrc\n\t"
"ins $tmp, D, $vsrc, 0, 1\n\t"
"fmind $dst, $dst, $tmp\t# min reduction2D" %}
ins_encode %{
__ fmind(as_FloatRegister($dst$$reg), as_FloatRegister($dsrc$$reg), as_FloatRegister($vsrc$$reg));
__ ins(as_FloatRegister($tmp$$reg), __ D, as_FloatRegister($vsrc$$reg), 0, 1);
__ fmind(as_FloatRegister($dst$$reg), as_FloatRegister($dst$$reg), as_FloatRegister($tmp$$reg));
%}
ins_pipe(pipe_class_default);
%}

// ====================VECTOR ARITHMETIC=======================================

// --------------------------------- ADD --------------------------------------
@@ -899,6 +899,90 @@ instruct reduce_min2L(iRegLNoSp dst, iRegL isrc, vecX vsrc, iRegLNoSp tmp, rFlag
ins_pipe(pipe_slow);
%}

instruct reduce_max2F(vRegF dst, vRegF fsrc, vecD vsrc) %{
predicate(n->in(2)->bottom_type()->is_vect()->element_basic_type() == T_FLOAT);
match(Set dst (MaxReductionV fsrc vsrc));
ins_cost(INSN_COST);
effect(TEMP_DEF dst);
format %{ "fmaxp $dst, $vsrc, S\n\t"
"fmaxs $dst, $dst, $fsrc\t# max reduction2F" %}
ins_encode %{
__ fmaxp(as_FloatRegister($dst$$reg), as_FloatRegister($vsrc$$reg), __ S);
__ fmaxs(as_FloatRegister($dst$$reg), as_FloatRegister($dst$$reg), as_FloatRegister($fsrc$$reg));
%}
ins_pipe(pipe_class_default);
%}

instruct reduce_max4F(vRegF dst, vRegF fsrc, vecX vsrc) %{
predicate(n->in(2)->bottom_type()->is_vect()->element_basic_type() == T_FLOAT);
match(Set dst (MaxReductionV fsrc vsrc));
ins_cost(INSN_COST);
effect(TEMP_DEF dst);
format %{ "fmaxv $dst, T4S, $vsrc\n\t"
"fmaxs $dst, $dst, $fsrc\t# max reduction4F" %}
ins_encode %{
__ fmaxv(as_FloatRegister($dst$$reg), __ T4S, as_FloatRegister($vsrc$$reg));
__ fmaxs(as_FloatRegister($dst$$reg), as_FloatRegister($dst$$reg), as_FloatRegister($fsrc$$reg));
%}
ins_pipe(pipe_class_default);
%}

instruct reduce_max2D(vRegD dst, vRegD dsrc, vecX vsrc) %{
predicate(n->in(2)->bottom_type()->is_vect()->element_basic_type() == T_DOUBLE);
match(Set dst (MaxReductionV dsrc vsrc));
ins_cost(INSN_COST);
effect(TEMP_DEF dst);
format %{ "fmaxp $dst, $vsrc, D\n\t"
"fmaxd $dst, $dst, $dsrc\t# max reduction2D" %}
ins_encode %{
__ fmaxp(as_FloatRegister($dst$$reg), as_FloatRegister($vsrc$$reg), __ D);
__ fmaxd(as_FloatRegister($dst$$reg), as_FloatRegister($dst$$reg), as_FloatRegister($dsrc$$reg));
%}
ins_pipe(pipe_class_default);
%}

instruct reduce_min2F(vRegF dst, vRegF fsrc, vecD vsrc) %{
predicate(n->in(2)->bottom_type()->is_vect()->element_basic_type() == T_FLOAT);
match(Set dst (MinReductionV fsrc vsrc));
ins_cost(INSN_COST);
effect(TEMP_DEF dst);
format %{ "fminp $dst, $vsrc, S\n\t"
"fmins $dst, $dst, $fsrc\t# min reduction2F" %}
ins_encode %{
__ fminp(as_FloatRegister($dst$$reg), as_FloatRegister($vsrc$$reg), __ S);
__ fmins(as_FloatRegister($dst$$reg), as_FloatRegister($dst$$reg), as_FloatRegister($fsrc$$reg));
%}
ins_pipe(pipe_class_default);
%}

instruct reduce_min4F(vRegF dst, vRegF fsrc, vecX vsrc) %{
predicate(n->in(2)->bottom_type()->is_vect()->element_basic_type() == T_FLOAT);
match(Set dst (MinReductionV fsrc vsrc));
ins_cost(INSN_COST);
effect(TEMP_DEF dst);
format %{ "fminv $dst, T4S, $vsrc\n\t"
"fmins $dst, $dst, $fsrc\t# min reduction4F" %}
ins_encode %{
__ fminv(as_FloatRegister($dst$$reg), __ T4S, as_FloatRegister($vsrc$$reg));
__ fmins(as_FloatRegister($dst$$reg), as_FloatRegister($dst$$reg), as_FloatRegister($fsrc$$reg));
%}
ins_pipe(pipe_class_default);
%}

instruct reduce_min2D(vRegD dst, vRegD dsrc, vecX vsrc) %{
predicate(n->in(2)->bottom_type()->is_vect()->element_basic_type() == T_DOUBLE);
match(Set dst (MinReductionV dsrc vsrc));
ins_cost(INSN_COST);
effect(TEMP_DEF dst);
format %{ "fminp $dst, $vsrc, D\n\t"
"fmind $dst, $dst, $dsrc\t# min reduction2D" %}
ins_encode %{
__ fminp(as_FloatRegister($dst$$reg), as_FloatRegister($vsrc$$reg), __ D);
__ fmind(as_FloatRegister($dst$$reg), as_FloatRegister($dst$$reg), as_FloatRegister($dsrc$$reg));
%}
ins_pipe(pipe_class_default);
%}

instruct reduce_and8B(iRegINoSp dst, iRegIorL2I isrc, vecD vsrc, iRegINoSp tmp)
%{
predicate(n->in(2)->bottom_type()->is_vect()->element_basic_type() == T_BYTE);
@@ -536,6 +536,30 @@ dnl $1 $2 $3
REDUCE_MAX_MIN_2L(max, Max, GT)
REDUCE_MAX_MIN_2L(min, Min, LT)
dnl
define(`REDUCE_MINMAX_FORD', `
instruct reduce_$1$4$5(vReg$5 dst, vReg$5 $6src, vec$7 vsrc) %{
predicate(n->in(2)->bottom_type()->is_vect()->element_basic_type() == T_`'ifelse($5, F, FLOAT, DOUBLE));
match(Set dst (ifelse($1, max, Max, Min)ReductionV $6src vsrc));
ins_cost(INSN_COST);
effect(TEMP_DEF dst);
format %{ "$2 $dst, ifelse($4, 2, $vsrc`, 'ifelse($5, F, S, D), ` T4S, $vsrc')\n\t"
"$3 $dst, $dst, $$6src\t# $1 reduction$4$5" %}
ins_encode %{
__ $2(as_FloatRegister($dst$$reg), ifelse($4, 4, `__ T4S, as_FloatRegister($vsrc$$reg))',
$4$5, 2F, `as_FloatRegister($vsrc$$reg), __ S)',
$4$5, 2D, `as_FloatRegister($vsrc$$reg), __ D)');
__ $3(as_FloatRegister($dst$$reg), as_FloatRegister($dst$$reg), as_FloatRegister($$6src$$reg));
%}
ins_pipe(pipe_class_default);
%}')dnl
dnl $1 $2 $3 $4 $5 $6 $7
REDUCE_MINMAX_FORD(max, fmaxp, fmaxs, 2, F, f, D)
REDUCE_MINMAX_FORD(max, fmaxv, fmaxs, 4, F, f, X)
REDUCE_MINMAX_FORD(max, fmaxp, fmaxd, 2, D, d, X)
REDUCE_MINMAX_FORD(min, fminp, fmins, 2, F, f, D)
REDUCE_MINMAX_FORD(min, fminv, fmins, 4, F, f, X)
REDUCE_MINMAX_FORD(min, fminp, fmind, 2, D, d, X)
dnl
define(`REDUCE_LOGIC_OP_8B', `
instruct reduce_$1`'8B(iRegINoSp dst, iRegIorL2I isrc, vecD vsrc, iRegINoSp tmp)
%{
@@ -2635,16 +2635,21 @@ void mvnw(Register Rd, Register Rm,
rf(Vn, 5), rf(Vd, 0);
}

// (Floating-point) {a, b} -> (a + b)
void faddp(FloatRegister Vd, FloatRegister Vn, SIMD_RegVariant type) {
assert(type == D || type == S, "Wrong type for faddp");
starti;
f(0b011111100, 31, 23);
f(type == D ? 1 : 0, 22);
f(0b110000110110, 21, 10);
rf(Vn, 5), rf(Vd, 0);
// Floating-point AdvSIMD scalar pairwise
#define INSN(NAME, op1, op2) \
void NAME(FloatRegister Vd, FloatRegister Vn, SIMD_RegVariant type) { \
starti; \
assert(type == D || type == S, "Wrong type for faddp/fmaxp/fminp"); \
f(0b0111111, 31, 25), f(op1, 24, 23), \
f(type == S ? 0 : 1, 22), f(0b11000, 21, 17), f(op2, 16, 10), rf(Vn, 5), rf(Vd, 0); \
}

INSN(faddp, 0b00, 0b0110110);
INSN(fmaxp, 0b00, 0b0111110);
INSN(fminp, 0b01, 0b0111110);

#undef INSN

void ins(FloatRegister Vd, SIMD_RegVariant T, FloatRegister Vn, int didx, int sidx) {
starti;
assert(T != Q, "invalid register variant");
@@ -26,6 +26,7 @@
#include "precompiled.hpp"
#include "assembler_zero.inline.hpp"
#include "memory/resourceArea.hpp"
#include "runtime/arguments.hpp"
#include "runtime/globals_extension.hpp"
#include "runtime/java.hpp"
#include "runtime/stubCodeGenerator.hpp"
@@ -43,4 +44,7 @@ void VM_Version::initialize() {
warning("Prefetching is not available for a Zero VM");
}
FLAG_SET_DEFAULT(AllocatePrefetchDistance, 0);

// Not implemented
UNSUPPORTED_OPTION(CriticalJNINatives);
}
@@ -314,7 +314,13 @@ bool PosixSignals::pd_hotspot_signal_handler(int sig, siginfo_t* info,
tty->print_cr("trap: %s: %s (SIGTRAP, stop type %d)", msg, detail_msg, stop_type);
}

return false; // Fatal error
// End life with a fatal error, message and detail message and the context.
// Note: no need to do any post-processing here (e.g. signal chaining)
va_list va_dummy;
VMError::report_and_die(thread, uc, NULL, 0, msg, detail_msg, va_dummy);
va_end(va_dummy);

ShouldNotReachHere();
}

else if (sig == SIGBUS) {
@@ -240,7 +240,14 @@ bool PosixSignals::pd_hotspot_signal_handler(int sig, siginfo_t* info,
tty->print_cr("trap: %s: (SIGILL)", msg);
}

return false; // Fatal error
// End life with a fatal error, message and detail message and the context.
// Note: no need to do any post-processing here (e.g. signal chaining)
va_list va_dummy;
VMError::report_and_die(thread, uc, NULL, 0, msg, detail_msg, va_dummy);
va_end(va_dummy);

ShouldNotReachHere();

}
else

@@ -330,7 +330,14 @@ bool PosixSignals::pd_hotspot_signal_handler(int sig, siginfo_t* info,
tty->print_cr("trap: %s: %s (SIGTRAP, stop type %d)", msg, detail_msg, stop_type);
}

return false; // Fatal error
// End life with a fatal error, message and detail message and the context.
// Note: no need to do any post-processing here (e.g. signal chaining)
va_list va_dummy;
VMError::report_and_die(thread, uc, NULL, 0, msg, detail_msg, va_dummy);
va_end(va_dummy);

ShouldNotReachHere();

}

else if (sig == SIGBUS) {
@@ -240,7 +240,7 @@ void InstructionPrinter::print_stack(ValueStack* stack) {
output()->cr();
fill_to(start_position, ' ');
output()->print("locks [");
for (int i = i = 0; i < stack->locks_size(); i++) {
for (int i = 0; i < stack->locks_size(); i++) {
Value t = stack->lock_at(i);
if (i > 0) output()->print(", ");
output()->print("%d:", i);
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2018, 2021, Oracle and/or its affiliates. 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
@@ -34,7 +34,6 @@
#define VM_ENTRY_MARK \
CompilerThread* thread=CompilerThread::current(); \
ThreadInVMfromNative __tiv(thread); \
ResetNoHandleMark rnhm; \
HandleMarkCleaner __hm(thread); \
Thread* THREAD = thread; \
debug_only(VMNativeEntryWrapper __vew;)
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1999, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 2021, Oracle and/or its affiliates. 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
@@ -1803,7 +1803,6 @@ bool CompileBroker::init_compiler_runtime() {

// Switch back to VM state to do compiler initialization
ThreadInVMfromNative tv(thread);
ResetNoHandleMark rnhm;

// Perform per-thread and global initializations
comp->initialize();
@@ -57,7 +57,6 @@ static const char decode_instructions_virtual_name[] = "decode_instructions_virt
class decode_env {
private:
outputStream* _output; // where the disassembly is directed to
CodeBuffer* _codeBuffer; // != NULL only when decoding a CodeBuffer
CodeBlob* _codeBlob; // != NULL only when decoding a CodeBlob
nmethod* _nm; // != NULL only when decoding a nmethod

0 comments on commit 4897711

Please sign in to comment.