mips: Use 32-bit MUL opcode for mulr() on 32-bit MIPS - lightning.git - Portable just-in-time compiler library

index : lightning.git
Portable just-in-time compiler library
summary refs log tree commit diff
path: root/lib/jit_mips-sz.c
diff options
context:
space:
mode:
authorPaul Cercueil <paul@crapouillou.net>2022年05月19日 10:39:15 +0100
committerpcpa <paulo.cesar.pereira.de.andrade@gmail.com>2022年05月19日 10:04:04 -0300
commitf579802f4f1533cd9b3de77b8b298ed1a109f5cf (patch)
treec31a092ab900b6d0d005ceec04328184163b80ff /lib/jit_mips-sz.c
parentc06815b80037f80f5023a5a0b57d3370659cc718 (diff)
downloadlightning-f579802f4f1533cd9b3de77b8b298ed1a109f5cf.tar.gz
mips: Use 32-bit MUL opcode for mulr() on 32-bit MIPS
MIPS32 already has an opcode for 32-bit -> 32-bit multiplication, so use it instead of doing a 32-bit -> 64-bit multiplication and ignoring the high bits. It means generating less code (1 vs. 2 opcodes). Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Diffstat (limited to 'lib/jit_mips-sz.c')
-rw-r--r--lib/jit_mips-sz.c 8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/jit_mips-sz.c b/lib/jit_mips-sz.c
index 83e52ed..da37848 100644
--- a/lib/jit_mips-sz.c
+++ b/lib/jit_mips-sz.c
@@ -42,8 +42,8 @@
28, /* subxr */
28, /* subxi */
16, /* rsbi */
- 8, /* mulr */
- 16, /* muli */
+ 4, /* mulr */
+ 12, /* muli */
12, /* qmulr */
20, /* qmuli */
12, /* qmulr_u */
@@ -448,8 +448,8 @@
28, /* subxr */
28, /* subxi */
16, /* rsbi */
- 8, /* mulr */
- 16, /* muli */
+ 4, /* mulr */
+ 12, /* muli */
12, /* qmulr */
20, /* qmuli */
12, /* qmulr_u */
generated by cgit v1.2.3 (git 2.39.1) at 2025年09月26日 05:23:41 +0000

AltStyle によって変換されたページ (->オリジナル) /