Skip to contentSkip to conversation

MIPS: Loongson64: Use three arguments for slti

PATCH Superseded Nathan Chancellor 2 participants 2 messages Dec 7, 2021 – Dec 8, 2021

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 MIPS: Loongson64: Use three arguments for slti

LLVM's integrated assembler does not support 'stli <reg>, <imm>':

<instantiation>:16:12: error: invalid operand for instruction
slti $12, (0x6300 | 0x0008)

           ^

arch/mips/kernel/head.S:86:2: note: while in macro instantiation
kernel_entry_setup # cpu specific setup
^
<instantiation>:16:12: error: invalid operand for instruction
slti $12, (0x6300 | 0x0008)

           ^

arch/mips/kernel/head.S:150:2: note: while in macro instantiation
smp_slave_setup
^

To increase compatibility with LLVM's integrated assembler, use the full form of 'stli <reg>, <reg>, <imm>', which matches the rest of arch/mips/. This does not result in any change for GNU as.

---
 arch/mips/include/asm/mach-loongson64/kernel-entry-init.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/mips/include/asm/mach-loongson64/kernel-entry-init.h +2 -2
index 13373c5144f8..efb41b351974 100644
@@ -32,7 +32,7 @@
 	nop
 	/* Loongson-3A R2/R3 */
 	andi	t0, (PRID_IMP_MASK | PRID_REV_MASK)
-	slti	t0, (PRID_IMP_LOONGSON_64C | PRID_REV_LOONGSON3A_R2_0)
+	slti	t0, t0, (PRID_IMP_LOONGSON_64C | PRID_REV_LOONGSON3A_R2_0)
 	bnez	t0, 2f
 	nop
 1:
@@ -63,7 +63,7 @@
 	nop
 	/* Loongson-3A R2/R3 */
 	andi	t0, (PRID_IMP_MASK | PRID_REV_MASK)
-	slti	t0, (PRID_IMP_LOONGSON_64C | PRID_REV_LOONGSON3A_R2_0)
+	slti	t0, t0, (PRID_IMP_LOONGSON_64C | PRID_REV_LOONGSON3A_R2_0)
 	bnez	t0, 2f
 	nop
 1:

base-commit: 0fcfb00b28c0b7884635dacf38e46d60bf3d4eb1

Signature · 1 line
2.34.1
#1 lore raw

Hello!

Quoted 1 line · Nathan Chancellor

LLVM's integrated assembler does not support 'stli <reg>, <imm>':

Perhaps slti (as below)?

Quoted 8 lines

<instantiation>:16:12: error: invalid operand for instruction
slti $12, (0x6300 | 0x0008)

            ^

arch/mips/kernel/head.S:86:2: note: while in macro instantiation
kernel_entry_setup # cpu specific setup
^
<instantiation>:16:12: error: invalid operand for instruction
slti $12, (0x6300 | 0x0008)

Quoted 7 lines
            ^

arch/mips/kernel/head.S:150:2: note: while in macro instantiation
smp_slave_setup
^

To increase compatibility with LLVM's integrated assembler, use the full form of 'stli <reg>, <reg>, <imm>', which matches the rest of

Again, slti?

Quoted 5 lines

arch/mips/. This does not result in any change for GNU as.

[...]

MBR, Sergey