binutils Newspaper
NOVEMBER 30, 2026
loongarch — Proposed

LoongArch: Remove support for xvhseli.d

Removes an invalid LoongArch instruction from the assembler and test suite.

This patch removes the xvhseli.d instruction from the LoongArch support in binutils. The instruction was incorrectly identified as valid and had test cases associated with it. By removing it, the assembler will no longer recognize this non-existent instruction, ensuring correctness and preventing potential assembly errors or misinterpretations for LoongArch binaries. The change involves updating opcode definitions and removing corresponding test files.

In the Thread 1 participant
  1. zhaozhou proposer

    Submits a patch to remove the `xvhseli.d` instruction from LoongArch support because it is not a valid instruction.

    “Remove xvhseli.d that is not a valid LoongArch instruction.”

In Details

This patch addresses an error in the LoongArch instruction set support within binutils. The instruction xvhseli.d was erroneously added or recognized and is not part of the official LoongArch ISA. The patch corrects this by removing the instruction's definition from the opcode table (opcodes/loongarch-opc.c) and consequently deleting its associated test cases from the gas testsuite (gas/testsuite/gas/loongarch/insn_lasx.d, gas/testsuite/gas/loongarch/vector.d, etc.). This ensures that the assembler will reject attempts to use this non-existent instruction.

For Context
LoongArch
A family of instruction set architectures (ISAs) developed by Loongson Technology, primarily for high-performance computing and servers. Binutils provides support for assembling and disassembling LoongArch code.
instruction
A command to a computer processor, specifying an operation to be performed. Each instruction has a unique binary code (opcode).
assembler
A program that translates assembly language source code into machine code (object code) that a computer's processor can execute.
opcode
Operation code. The part of a machine language instruction that specifies the operation to be performed by the CPU.
gas
The GNU Assembler, part of the GNU Binutils project. It supports a wide variety of processor architectures, including LoongArch.
testsuite
A collection of test cases used to verify the correctness of software. For gas, test suites ensure that instructions are assembled and disassembled correctly.
Filed Under: loongarchassemblerinstruction-seterror-correctiontestsuite