Skip to content

Commit 2c7becc

Browse files
feilongjiangRealFYang
authored andcommitted
8362838: RISC-V: Incorrect matching rule leading to improper oop instruction encoding
Backport-of: 0ba2942c6e7aadc3d091c40f6bd8d9f7502f5f76
1 parent 7f34855 commit 2c7becc

File tree

1 file changed

+0
-31
lines changed

1 file changed

+0
-31
lines changed

src/hotspot/cpu/riscv/riscv.ad

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -2271,10 +2271,6 @@ encode %{
22712271
__ mv(dst_reg, 1);
22722272
%}
22732273

2274-
enc_class riscv_enc_mov_byte_map_base(iRegP dst) %{
2275-
__ load_byte_map_base($dst$$Register);
2276-
%}
2277-
22782274
enc_class riscv_enc_mov_n(iRegN dst, immN src) %{
22792275
Register dst_reg = as_Register($dst$$reg);
22802276
address con = (address)$src$$constant;
@@ -2825,21 +2821,6 @@ operand immP_1()
28252821
interface(CONST_INTER);
28262822
%}
28272823

2828-
// Card Table Byte Map Base
2829-
operand immByteMapBase()
2830-
%{
2831-
// Get base of card map
2832-
predicate(BarrierSet::barrier_set()->is_a(BarrierSet::CardTableBarrierSet) &&
2833-
SHENANDOAHGC_ONLY(!BarrierSet::barrier_set()->is_a(BarrierSet::ShenandoahBarrierSet) &&)
2834-
(CardTable::CardValue*)n->get_ptr() ==
2835-
((CardTableBarrierSet*)(BarrierSet::barrier_set()))->card_table()->byte_map_base());
2836-
match(ConP);
2837-
2838-
op_cost(0);
2839-
format %{ %}
2840-
interface(CONST_INTER);
2841-
%}
2842-
28432824
// Int Immediate: low 16-bit mask
28442825
operand immI_16bits()
28452826
%{
@@ -4799,18 +4780,6 @@ instruct loadConP1(iRegPNoSp dst, immP_1 con)
47994780
ins_pipe(ialu_imm);
48004781
%}
48014782

4802-
// Load Byte Map Base Constant
4803-
instruct loadByteMapBase(iRegPNoSp dst, immByteMapBase con)
4804-
%{
4805-
match(Set dst con);
4806-
ins_cost(ALU_COST);
4807-
format %{ "mv $dst, $con\t# Byte Map Base, #@loadByteMapBase" %}
4808-
4809-
ins_encode(riscv_enc_mov_byte_map_base(dst));
4810-
4811-
ins_pipe(ialu_imm);
4812-
%}
4813-
48144783
// Load Narrow Pointer Constant
48154784
instruct loadConN(iRegNNoSp dst, immN con)
48164785
%{

0 commit comments

Comments
 (0)