@@ -11550,13 +11550,13 @@ instruct ShouldNotReachHere( )
1155011550 ins_cost(300);
1155111551
1155211552 // Use the following format syntax
11553- format %{ "ILLTRAP ; #@ShouldNotReachHere" %}
11553+ format %{ "stop; #@ShouldNotReachHere" %}
1155411554 ins_encode %{
1155511555 if (is_reachable()) {
11556- // Here we should emit illtrap!
11557- __ stop("ShouldNotReachHere");
11556+ __ stop(_halt_reason);
1155811557 }
1155911558 %}
11559+
1156011560 ins_pipe( pipe_jump );
1156111561%}
1156211562
@@ -16589,13 +16589,19 @@ instruct insert32B(vecY dst, mRegI val, immIU5 idx) %{
1658916589 match(Set dst (VectorInsert (Binary dst val) idx));
1659016590 format %{ "xvinsert $dst, $val, $idx\t# @insert32B" %}
1659116591 ins_encode %{
16592- if ($idx$$constant < 16) {
16593- __ vinsgr2vr_b($dst$$FloatRegister, $val$$Register, $idx$$constant);
16594- } else {
16595- __ xvpermi_d($dst$$FloatRegister, $dst$$FloatRegister, 0b01001110);
16596- __ vinsgr2vr_b($dst$$FloatRegister, $val$$Register, $idx$$constant-16);
16597- __ xvpermi_d($dst$$FloatRegister, $dst$$FloatRegister, 0b01001110);
16592+ int idx = $idx$$constant;
16593+ int msbw, lsbw;
16594+ switch (idx % 4) {
16595+ case 0: msbw = 7, lsbw = 0; break;
16596+ case 1: msbw = 15, lsbw = 8; break;
16597+ case 2: msbw = 23, lsbw = 16; break;
16598+ case 3: msbw = 31, lsbw = 24; break;
16599+ default:
16600+ ShouldNotReachHere();
1659816601 }
16602+ __ xvpickve2gr_w(SCR1, $dst$$FloatRegister, idx >> 2);
16603+ __ bstrins_w(SCR1, $val$$Register, msbw, lsbw);
16604+ __ xvinsgr2vr_w($dst$$FloatRegister, SCR1, idx >> 2);
1659916605 %}
1660016606 ins_pipe( pipe_slow );
1660116607%}
@@ -16605,13 +16611,12 @@ instruct insert16S(vecY dst, mRegI val, immIU4 idx) %{
1660516611 match(Set dst (VectorInsert (Binary dst val) idx));
1660616612 format %{ "xvinsert $dst, $val, $idx\t# @insert16S" %}
1660716613 ins_encode %{
16608- if ($idx$$constant < 8) {
16609- __ vinsgr2vr_h($dst$$FloatRegister, $val$$Register, $idx$$constant);
16610- } else {
16611- __ xvpermi_d($dst$$FloatRegister, $dst$$FloatRegister, 0b01001110);
16612- __ vinsgr2vr_h($dst$$FloatRegister, $val$$Register, $idx$$constant-8);
16613- __ xvpermi_d($dst$$FloatRegister, $dst$$FloatRegister, 0b01001110);
16614- }
16614+ int idx = $idx$$constant;
16615+ int msbw = (idx % 2) ? 31 : 15;
16616+ int lsbw = (idx % 2) ? 16 : 0;
16617+ __ xvpickve2gr_w(SCR1, $dst$$FloatRegister, idx >> 1);
16618+ __ bstrins_w(SCR1, $val$$Register, msbw, lsbw);
16619+ __ xvinsgr2vr_w($dst$$FloatRegister, SCR1, idx >> 1);
1661516620 %}
1661616621 ins_pipe( pipe_slow );
1661716622%}
0 commit comments