[PATCH 0/2] target/loongarch: Set signed integer comparison with asrtle_d() helper

Bibo Mao posted 2 patches 3 weeks, 3 days ago
Failed in applying to current master (apply log)
Maintainers: Song Gao <17746591750@163.com>, Bibo Mao <maobibo@loongson.cn>, Xianglai Li <lixianglai@loongson.cn>
target/loongarch/tcg/helper.h                 |  2 ++
.../tcg/insn_trans/trans_fmemory.c.inc        |  8 +++----
.../tcg/insn_trans/trans_memory.c.inc         |  8 +++----
target/loongarch/tcg/op_helper.c              | 22 ++++++++++++++++++-
4 files changed, 31 insertions(+), 9 deletions(-)
[PATCH 0/2] target/loongarch: Set signed integer comparison with asrtle_d() helper
Posted by Bibo Mao 3 weeks, 3 days ago
According to the LoongArch manual, ldle/ldgt/stle/stgt and
fldle/fldgt/fstle/fstgt perform unsigned address comparison, while
asrtle/asrtgt perform signed address comparison.

Currently all of them use unsigned integer comparison. Add unsigned
comparison helpers asrtle_du()/asrtgt_du() for the unsigned cases, and
change asrtle_d()/asrtgt_d() to perform signed integer comparison.

Bibo Mao (2):
  target/loongarch: Add asrtle_du()/asrtgt_du() helpers
  target/loongarch: Change asrtle_d()/asrtgt_d() for signed integer
    comparison

 target/loongarch/tcg/helper.h                 |  2 ++
 .../tcg/insn_trans/trans_fmemory.c.inc        |  8 +++----
 .../tcg/insn_trans/trans_memory.c.inc         |  8 +++----
 target/loongarch/tcg/op_helper.c              | 22 ++++++++++++++++++-
 4 files changed, 31 insertions(+), 9 deletions(-)


base-commit: 73294d096cc591e122fde9e63db4739de6d84f2b
-- 
2.54.0
Re: [PATCH 0/2] target/loongarch: Set signed integer comparison with asrtle_d() helper
Posted by lixianglai 2 weeks, 3 days ago
Reviewed-by:  Xianglai Li <lixianglai@loongson.cn>


> According to the LoongArch manual, ldle/ldgt/stle/stgt and
> fldle/fldgt/fstle/fstgt perform unsigned address comparison, while
> asrtle/asrtgt perform signed address comparison.
>
> Currently all of them use unsigned integer comparison. Add unsigned
> comparison helpers asrtle_du()/asrtgt_du() for the unsigned cases, and
> change asrtle_d()/asrtgt_d() to perform signed integer comparison.
>
> Bibo Mao (2):
>    target/loongarch: Add asrtle_du()/asrtgt_du() helpers
>    target/loongarch: Change asrtle_d()/asrtgt_d() for signed integer
>      comparison
>
>   target/loongarch/tcg/helper.h                 |  2 ++
>   .../tcg/insn_trans/trans_fmemory.c.inc        |  8 +++----
>   .../tcg/insn_trans/trans_memory.c.inc         |  8 +++----
>   target/loongarch/tcg/op_helper.c              | 22 ++++++++++++++++++-
>   4 files changed, 31 insertions(+), 9 deletions(-)
>
>
> base-commit: 73294d096cc591e122fde9e63db4739de6d84f2b