Skip to contentSkip to conversation

powerpc: net: filter: fix DIVWU instruction opcode

PATCH Superseded Vladimir Murzin 3 participants 4 messages Sep 11, 2013 – Sep 12, 2013 PowerPC

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 powerpc: net: filter: fix DIVWU instruction opcode

Currently DIVWU stands for *signed* divw opcode:

7d 2a 4b 96 divwu r9,r10,r9
7d 2a 4b d6 divw r9,r10,r9

Use the *unsigned* divw opcode for DIVWU.

---
 arch/powerpc/include/asm/ppc-opcode.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/powerpc/include/asm/ppc-opcode.h +1 -1
index d7fe9f5..c91842c 100644
@@ -218,7 +218,7 @@
 #define PPC_INST_MULLW			0x7c0001d6
 #define PPC_INST_MULHWU			0x7c000016
 #define PPC_INST_MULLI			0x1c000000
-#define PPC_INST_DIVWU			0x7c0003d6
+#define PPC_INST_DIVWU			0x7c000396
 #define PPC_INST_RLWINM			0x54000000
 #define PPC_INST_RLDICR			0x78000004
 #define PPC_INST_SLW			0x7c000030
Signature · 1 line
1.7.10.4
#1 lore raw
Quoted 6 lines · Vladimir Murzin

Currently DIVWU stands for *signed* divw opcode:

7d 2a 4b 96 divwu r9,r10,r9
7d 2a 4b d6 divw r9,r10,r9

Use the *unsigned* divw opcode for DIVWU.

This looks like it's in only used in the BPF JIT code.

Matt, any chance you an ACK/NACK this?

Mikey

Quoted 22 lines
---
 arch/powerpc/include/asm/ppc-opcode.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/powerpc/include/asm/ppc-opcode.h +1 -1
index d7fe9f5..c91842c 100644
@@ -218,7 +218,7 @@
 #define PPC_INST_MULLW			0x7c0001d6
 #define PPC_INST_MULHWU			0x7c000016
 #define PPC_INST_MULLI			0x1c000000
-#define PPC_INST_DIVWU			0x7c0003d6
+#define PPC_INST_DIVWU			0x7c000396
 #define PPC_INST_RLWINM			0x54000000
 #define PPC_INST_RLDICR			0x78000004
 #define PPC_INST_SLW			0x7c000030
Signature · 1 line
1.7.10.4
Acked-by
#2 lore raw
Quoted 8 lines · Michael Neuling

Vladimir Murzin <[email protected]> wrote:
=20

Quoted 6 lines

Currently DIVWU stands for *signed* divw opcode:
=20

7d 2a 4b 96    divwu   r9,r10,r9
7d 2a 4b d6    divw    r9,r10,r9

=20
Use the *unsigned* divw opcode for DIVWU.

Quoted 4 lines

=20
This looks like it's in only used in the BPF JIT code. =20 =20
Matt, any chance you an ACK/NACK this?

Sure, that looks sensible, thanks Vladimir.=20

Quoted 10 lines

=20
Mikey
=20

arch/powerpc/include=

Quoted 7 lines

=20

---
arch/powerpc/include/asm/ppc-opcode.h | 2 +-

1 file changed, 1 insertion(+), 1 deletion(-)

=20

arch/powerpc/include= renamed from arch/powerpc/include/asm/ppc-opcode.h +0 -0

/asm/ppc-opcode.h

Quoted 15 lines
Quoted 15 lines

index d7fe9f5..c91842c 100644

arch/powerpc/include/asm/ppc-opcode.h +1 -2
@@ -218,7 +218,7 @@
 #define PPC_INST_MULLW            0x7c0001d6
 #define PPC_INST_MULHWU            0x7c000016
 #define PPC_INST_MULLI            0x1c000000
-#define PPC_INST_DIVWU            0x7c0003d6
+#define PPC_INST_DIVWU            0x7c000396
 #define PPC_INST_RLWINM            0x54000000
 #define PPC_INST_RLDICR            0x78000004
 #define PPC_INST_SLW            0x7c000030
--=20

1.7.10.4
=20

#3 lore raw
Quoted 11 lines · Matt Evans
Quoted 9 lines · Michael Neuling
Quoted 6 lines · Vladimir Murzin

Currently DIVWU stands for *signed* divw opcode:

7d 2a 4b 96    divwu   r9,r10,r9
7d 2a 4b d6    divw    r9,r10,r9

Use the *unsigned* divw opcode for DIVWU.

Quoted 8 lines
Quoted 3 lines

This looks like it's in only used in the BPF JIT code.

Matt, any chance you an ACK/NACK this?

Sure, that looks sensible, thanks Vladimir.

Thanks!

Vladimir

Quoted 25 lines
Quoted 25 lines

Mikey

Quoted 22 lines

---
arch/powerpc/include/asm/ppc-opcode.h | 2 +-

1 file changed, 1 insertion(+), 1 deletion(-)
arch/powerpc/include/asm/ppc-opcode.h +1 -1
index d7fe9f5..c91842c 100644
@@ -218,7 +218,7 @@
 #define PPC_INST_MULLW            0x7c0001d6
 #define PPC_INST_MULHWU            0x7c000016
 #define PPC_INST_MULLI            0x1c000000
-#define PPC_INST_DIVWU            0x7c0003d6
+#define PPC_INST_DIVWU            0x7c000396
 #define PPC_INST_RLWINM            0x54000000
 #define PPC_INST_RLDICR            0x78000004
 #define PPC_INST_SLW            0x7c000030
Signature · 1 line
1.7.10.4