This patch implement fixed point arithemtic instruction translation.
This includes:
- ADD.{W/D}, SUB.{W/D}
- ADDI.{W/D}, ADDU16ID
- ALSL.{W[U]/D}
- LU12I.W, LU32I.D LU52I.D
- SLT[U], SLT[U]I
- PCADDI, PCADDU12I, PCADDU18I, PCALAU12I
- AND, OR, NOR, XOR, ANDN, ORN
- MUL.{W/D}, MULH.{W[U]/D[U]}
- MULW.D.W[U]
- DIV.{W[U]/D[U]}, MOD.{W[U]/D[U]}
- ANDI, ORI, XORI
Signed-off-by: Song Gao<gaosong@loongson.cn>
Signed-off-by: XiaoJuan Yang<yangxiaojuan@loongson.cn>
---
target/loongarch/insn_trans/trans_arith.c | 322 ++++++++++++++++++++++++++++++
target/loongarch/insns.decode | 89 +++++++++
target/loongarch/translate.c | 78 ++++++++
target/loongarch/translate.h | 19 ++
4 files changed, 508 insertions(+)
create mode 100644 target/loongarch/insn_trans/trans_arith.c
create mode 100644 target/loongarch/insns.decode