summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--riscv_new/compiler/riscv/cgrv.pas10
1 files changed, 8 insertions, 2 deletions
diff --git a/riscv_new/compiler/riscv/cgrv.pas b/riscv_new/compiler/riscv/cgrv.pas
index 63c1d453ea..d73c800549 100644
--- a/riscv_new/compiler/riscv/cgrv.pas
+++ b/riscv_new/compiler/riscv/cgrv.pas
@@ -233,9 +233,15 @@ unit cgrv;
procedure tcgrv.a_op_reg_reg_reg(list: TAsmList; op: TOpCg; size: tcgsize; src1, src2, dst: tregister);
begin
if op=OP_NOT then
- a_op_const_reg_reg(list,OP_XOR,size,-1,src1,dst)
+ begin
+ list.concat(taicpu.op_reg_reg_const(A_XORI,dst,src1,-1));
+ maybeadjustresult(list,op,size,dst);
+ end
else if op=OP_NEG then
- a_op_reg_reg_reg(list,OP_SUB,size,src1,NR_X0,dst)
+ begin
+ list.concat(taicpu.op_reg_reg_reg(A_SUB,dst,NR_X0,src1));
+ maybeadjustresult(list,op,size,dst);
+ end
else
case op of
OP_MOVE: