Commit Graph

5124 Commits

Author SHA1 Message Date
Ezra Sitorus
621c0c3469 aarch64: Support for FEAT_LSUI
FEAT_LSUI introduces unprivileged variants of load and store instructions so
that clearing PSTATE.PAN is never required in privileged software.
2025-07-11 12:53:19 +01:00
Ezra Sitorus
b80240ecba aarch64: Support for FEAT_PCDPHINT
FEAT_PCDPHINT - Producer-consumer data placement hints - is an optional
ISA extension that provides hint instructions to indicate:
- a store in the current execution thread is generating data at a specific
location, which a thread of execution on one or more other observers is
waiting on.
- the thread of execution on the current PE will read a location that may not
yet have been written with the value to be consumed.

This extension introduces:
- STSHH, a hint instruction, with operands (policies) keep and strm
- PRFM *IR*, a new prefetch memory operand.
2025-07-11 12:53:09 +01:00
Alan Modra
d72ad17caa AM_PO_SUBDIRS
Swap AM_PO_SUBDIRS and ZW_GNU_GETTEXT_SISTER_DIR lines in
*/configure.ac.  ZW_GNU_GETTEXT_SISTER_DIR indirectly invokes
AC_REQUIRE(AM_PO_SUBDIRS) so results in AM_PO_SUBDIRS being emitted
before ZW_GNU_GETTEXT_SISTER_DIR if it hasn't already been invoked.
2025-07-11 08:23:40 +09:30
Nelson Chu
34fcc16e79 RISC-V: Clarify the imply rule of c
This also fix the imply result for .option rvc.

Imply zcf when c and f and rv32
Imply zcd when c and d
Imply zca when c

Changed INSN_CLASS_C to INSN_CLASS_ZCA
Changed INSN_CLASS_F_AND_C to INSN_CLASS_ZCF
Changed INSN_CLASS_D_AND_C to INSN_CLASS_ZCD
Changed INSN_CLASS_ZIHINTNTL_AND_C to INSN_CLASS_ZIHINTNTL_AND_ZCA
2025-07-10 19:32:07 +08:00
Alan Modra
4da111f55a z8k opcode_entry_type
z8k opcode_entry_type.func is never used as a function pointer, only
as a pointer to a pseudo_typeS.  Change it to a void*.
2025-07-09 09:35:07 +09:30
Alice Carlotti
e68a412e16 aarch64: Add support for FEAT_SVE2p2 and FEAT_SME2p2 2025-07-08 21:15:43 +01:00
Nelson Chu
9be7e79a96 RISC-V: Fixed dis-assembler to set correct xlen from mapping symbol 2025-07-08 17:15:50 +08:00
Nick Clifton
c72fad491c Updated Spanish translations for opcodes and gas 2025-06-26 15:08:53 +01:00
Srinath Parvathaneni
5103708c01 aarch64: Add supports for FEAT_PoPS feature and DC instructions.
This patch add support for FEAT_PoPS feature which can be enabled
through +pops command line flag.

This patch also adds support for following DC instructions and the
spec can be found here [1].
1. "dc cigdvaps" enabled on passing +memtag+pops command line flags.
2. "dc civaps" enabled on passing +pops command line flag.

[1]: https://developer.arm.com/documentation/ddi0601/2025-03/AArch64-Instructions?lang=en
2025-06-25 13:34:59 +01:00
Stafford Horne
7a23d8a826 or1k: Fix disassembly for little-endian binaries
There are some OpenRISC CPUs that have their binaries stored in
little-endian format.  Using objdump to disassemble these is
problematic, as some instructions fail to disassemble, for example:

    objdump -D -b binary -EB -m or1k test_be.bin

       0:	18 60 07 27 	l.movhi r3,0x727
       4:	a8 63 0e 00 	l.ori r3,r3,0xe00
       8:	9c 63 ff ff 	l.addi r3,r3,-1
       c:	bc 43 00 00 	l.sfgtui r3,0
      10:	13 ff ff fe 	l.bf 0x8
      14:	44 00 48 00 	l.jr r9

    objdump -D -b binary -EL -m or1k test_le.bin

       0:	27 07 60 18 	*unknown*
       4:	00 0e 63 a8 	l.ori r3,r3,0xe00
       8:	ff ff 63 9c 	*unknown*
       c:	00 00 43 bc 	l.sfgtui r3,0
      10:	fe ff ff 13 	*unknown*
      14:	00 48 00 44 	l.jr r9

It was found that the hash function was using the still little-endian
buffer to extract the opcode used for the hash lookup.  This didn't work
as it was pulling the wrong hashcode causing instruction lookup to fail.

Fix the hash function by using the normalized/byte-swapped value instead
of the buffer.

Signed-off-by: Stafford Horne <shorne@gmail.com>
2025-06-21 05:46:12 +01:00
Srinath Parvathaneni
ed62a5351c aarch64: Support 2024 Debug Architecture system registers.
This patch adds support for following system registers and the spec
can be found here[1].
1. PMBSR_EL12, PMBSR_EL2, PMBSR_EL3, PMBMAR_EL1 depends on FEAT_SPE
   and Armv9.5-A architecture and these are enabled by passing
   -march=armv9.5-a+profile.
2. TRBSR_EL12, TRBSR_EL2, and TRBSR_EL3 depends Armv9.5-A architecture
   and these are enabled by passing -march=armv9.5-a.
3. HFGITR2_EL2 depends on Armv8.8-A architecture and enabled by passing
   -march=armv8.8-a.

[1]: https://developer.arm.com/documentation/ddi0601/2025-03/AArch64-Registers?lang=en
2025-06-20 17:21:14 +01:00
Ezra Sitorus
17cae8183b aarch64: Support for FEAT_LSFE
FEAT_LSFE - Large System Float Extension - implements A64 base atomic
floating-point in-memory instructions.
2025-06-19 14:48:13 +01:00
Ezra Sitorus
4a6d6c97ca aarch64: Support for FEAT_SVE_F16F32MM, FEAT_F8F16M, FEAT_F8F32MM
FEAT_SVE_F16F32MM introduces the SVE half-precision floating-point
matrix multiply-accumulate to single-precision instruction.

FEAT_F8F32MM introduces the Advanced SIMD 8-bit floating-point matrix
multiply-accumulate to single-precision instruction.

FEAT_F8F16MM introduces the Advanced SIMD 8-bit floating-point matrix
multiply-accumulate to half-precision instruction.
2025-06-19 14:36:33 +01:00
Ezra Sitorus
a1f853de0f aarch64: Support for FEAT_CMPBR
FEAT_CMPBR - Compare and branch instructions. This patch adds these
instructions:
- CB<CC> (register)
- CB<CC> (immediate)
- CBH<CC>
- CBB<CC>

where CC is one of the following:
- EQ
- NE
- GT
- GE
- LT
- LE
- HI
- HS
- LO
- LS
2025-06-19 14:30:34 +01:00
Ezra Sitorus
78155cbb35 aarch64: Add occmo flag for FEAT_OCCMO
FEAT_OCCMO support was introduced, but the feature flags were missing.
This patch adds these flags, as well as splitting up the tests to test
occmo vs occmo+memtag operands.
2025-06-19 14:05:14 +01:00
Ezra Sitorus
3165109751 aarch64: Support for FEAT_SVE_BFSCALE
FEAT_SVE_BFSCALE introduces the SVE BFSCALE instruction, when the PE is not in
Streaming SVE mode. If FEAT_SME2 is implemented, FEAT_SVE_BFSCALE also
introduces SME multi-vector Z-targeting BFloat16 scaling instructions, BFSCALE
and BFMUL.
2025-06-19 13:59:29 +01:00
Stafford Horne
5eb0dd3623 or1k: Add support for numcores and coreid sprs
These are needed when running GCC tests for newlib toolchains built with
multicore support.  Without these SPRs we get the following warnings
when running tests.

    spawn or1k-elf-run ./20000112-1.exe^M
    WARNING: l.mfspr with invalid SPR address 0x80^M
    WARNING: l.mfspr with invalid SPR address 0x81^M
    WARNING: l.mfspr with invalid SPR address 0x81^M
    WARNING: l.mfspr with invalid SPR address 0x81^M

Support is added by defining the SPRs in the cgen machine definition and
regenerating the machine code.  In or1k/or1k.c we initialize NUMCORES to
1 and COREID to 0 as the sim has only one CPU.  In or1k/traps.c we allow
returning the NUMCORES and COREID spr values in the mfspr function.

Signed-off-by: Stafford Horne <shorne@gmail.com>
2025-06-14 06:10:57 +01:00
Jan Beulich
76787e85cb x86: don't constrain %axl/%cxl
They can be used like their %al/%cl counterparts everywhere else;
there's no apparent reason why they shouldn't be usable as accumulator /
shift count respectively. Enforcing such a restriction only makes
writing heavily macro-ized code more cumbersome.
2025-06-13 13:46:30 +02:00
Jan Beulich
620dc0f523 x86: swap operands in OUT-with-immediate template
In a number of places we assume that immediates come first in the set of
operands. It is mere luck that so far OUT, having operands the other way
around, wasn't negatively impacted by this.

Leverage this to have a few loops start from the first non-immediate
operand (or in one case to stop there). Note, however, that
process_immext() inserts an immediate last, so especially all output_*()
functions cannot be changed in the same way.
2025-06-13 13:46:06 +02:00
Jan Beulich
062f7a5490 x86: refine UD<n> kind-of-insns
While documentation of these continues to be lacking sufficient detail,
it is becoming increasingly clear that in 66f1eba0b7 ("x86: correct
UDn") I went too far with requiring operands, to populate a ModR/M byte.
AMD hardware appears to always behave as indicated as "may" in PM 3.36,
which for all practical purposes means there's no ModR/M byte. The SDM
(rev 087) indicates that such behavior can occur on older hardware for
UD0. Re-add an operand-less UD1 form (as well as its UD2B alias), while
newly adding such a form also for UD0. Because of the ambiguity, there's
no good/easy way of handling both possibilities in the disassembler,
which hence remains unaltered.

Further, from all information I'm able to gather, the 0F opcode space
was only introduced with the i286; bump the minimal hardware requirement
for all UD<n> accordingly.
2025-06-13 08:40:32 +02:00
Richard Ball
f9a37571ba aarch64: Add support for FEAT_FPRCVT
FEAT_FPRCVT introduces new versions of previous instructions.
The instructions are used to convert between floating points and
Integers. These new versions take as operands SIMD&FP registers
for both the source and destination register. FEAT_FPRCVT also
enables the use of some existing AdvSIMD instructions in
streaming mode. However, no changes are needed in gas to support this.
2025-06-12 01:39:24 +01:00
Yury Khrustalev
a23ef19dec aarch64: Add system registers for 2024 MPAM extension
This patch adds support for new system registers introduced in the
2024 MPAM extension (Memory Partitioning and Monitoring):

Available in Armv9.3-A:
  MPAMBW0_EL1,
  MPAMBW1_EL1,
  MPAMBW1_EL12,
  MPAMBW2_EL2,
  MPAMBW3_EL3,
  MPAMBWCAP_EL2,
  MPAMBWIDR_EL1

Available in Armv9.3-A with SME:
  MPAMBWSM_EL1

The details can be found in [1].

[1]: https://developer.arm.com/documentation/ddi0601/latest
2025-06-11 09:05:07 +01:00
Yury Khrustalev
ec5409b186 aarch64: Fix typos in opcode headers 2025-06-09 10:45:35 +01:00
Dmitry Chestnykh
246fe7c335 aarch64: Support id_aa64fpfr0_el1, id_aa64pfr2_el1 2025-06-04 11:24:51 +01:00
Jan Beulich
101b4bb8f4 x86: improve matching diagnostics when %st is involved
Diagnosing operand size vs operand type mismatches doesn't work very
well when GPRs and FPRs are in the same register class, distinguished
just by size. Introduce a separate RegFP class.
2025-05-16 10:32:19 +02:00
dysun
bbac5532cc RISC-V: Add zilsd & zclsd support
Ref: https://github.com/riscv/riscv-zilsd/blob/main/zilsd.adoc

Signed-off-by: dysun <sundongya@nucleisys.com>

Co-developed-by: LIU Xu <liuxu@nucleisys.com>
Co-developed-by: ZHAO Fujin <zhaofujin@nucleisys.com>
2025-05-16 08:57:48 +08:00
Alice Carlotti
1c87a0ffc2 aarch64: Replace incorrect comment
The comment explaining the placement of the cfinv entry before the
generic msr entry in the opcode table was incorrect.  The issue is
unrelated to the all ones bitmask for cfinv, and is actually due the
large number of architectural aliases of the msr instruction.
2025-05-13 17:57:30 +01:00
Ezra Sitorus
f891d8e69d aarch64: Support for FEAT_RME_GPC3
FEAT_RME_GPC3 - RME Granule Protection Check 3 Extension - introduces
a method for defining a set of windows in the memory map for which
Granule Protection Checks are skipped, and instead applies a set of
default settings associated with the window.

This patch introduces the sysreg gpcbw_el3. Add -march=armv9.5-a to
access this sysreg since this feature is optional from armv9.5-a.
2025-05-12 17:07:53 +01:00
Ezra Sitorus
720e45f92a aarch64: Support for FEAT_OCCMO
FEAT_OCCMO - Outer Cacheable Cache Maintenance Operation - introduces
system instructions that provides software with a mechanism to publish
writes to the Outer cache level.
2025-05-12 16:54:36 +01:00
Alice Carlotti
fd45b1c1aa aarch64: Mark predicate-as-counter pseudo instructions
Using explicit pseudo aliases is clearer and more consistent with other
instruction aliases.

This does not change behaviour.  For the non-alias instructions
(everything except mov) we already picked the first matching entry for
disassembly by default.  For mov we picked the last matching aliased
entry, which remained the original alias since do_misc_decoding doesn't
recognise OP_MOV_PN_PN.
2025-05-09 20:27:22 +01:00
Alice Carlotti
f20bd95af0 aarch64: Mark clearbhb as a pseudo instruction
This was an early name for the clrbhb hint instruction.  Some software
was written with the old name before it was renamed, so we support it
for assembly but should never use it in disassembly.

This patch has no functional change, because we already pick (by
default) the last matching alias in the opcode table, and clrbhb is
listed later than clearbhb.
2025-05-09 20:27:22 +01:00
Alice Carlotti
f1c037989a aarch64: Fix dgh disassembly 2025-05-09 20:27:22 +01:00
Alice Carlotti
51df25b00f aarch64: Mark SME mova aliases
This will only change behaviour during disassembly with -M no-aliases.
2025-05-09 20:27:22 +01:00
Alice Carlotti
a8d71f52d0 aarch64: Mark rev64 as a pseudo instruction
This is more natural than raising the priority of rev with F_P1, and
is functionally equivalent.
2025-05-09 20:27:22 +01:00
Alice Carlotti
92f7d4ddde aarch64: Eliminate AARCH64_OPND_SVE_ADDR_R
Adjust parsing for AARCH64_OPND_SVE_ADDR_RR{_LSL*} operands to accept
implicit XZR offsets.  Add new AARCH64_OPND_SVE_ADDR_RM{_LSL*} operands
to support instructions where an XZR offset is allowed but must be
specified explicitly.  This allows the removal of the duplicate opcode
table entries using AARCH64_OPND_SVE_ADDR_R.
2025-05-09 20:19:30 +01:00
Chao-ying Fu
617ead3c20 RISC-V: Added vendor extensions, xmipscbop, xmipscmov, xmipsexectl and xmipslsp
Spec:
https://mips.com/wp-content/uploads/2025/03/P8700-F_Programmers_Reference_Manual_Rev1.82_3-19-2025.pdf

Added MIPS vendor extensions, xmipscbop, xmipscmov, xmipsexectl and xmipslsp
with verison 1.0.

Passed binutils testsuites of targets elf32/elf64/linux32/linux64.

Signed-off-by: Jovan Dmitrović <jovan.dmitrovic@htecgroup.com>
Signed-off-by: Chao-ying Fu <cfu@wavecomp.com>
2025-05-09 12:24:15 +08:00
Jens Remus
bc1b43ef7a s390: Fix format specifier for VR in disassembler
Vector register (VR) numbers are unsigned.  Use format specifier %u
instead of %i.

Reported-by: Florian Krohm <flo2030@eich-krohm.de>
Signed-off-by: Jens Remus <jremus@linux.ibm.com>
2025-05-07 17:17:10 +02:00
Kito Cheng
10ec3d5de0 RISC-V: Mark fgt.*/fge.* as instruction alias
They are instruction alias, but not mark correctly, and seems like we
don't have a good way to verify that since the disassembler doesn't
disassemble instruction into alias.

[1] https://github.com/riscv-non-isa/riscv-asm-manual/pull/124
2025-04-30 08:04:38 +08:00
Maciej W. Rozycki
4a5312e736 Regenerate more configury files for 64-bit BFD detection fix
The fix for 64-bit BFD detection omitted the regeneration of a bunch
of configury files; fix that.
2025-04-28 19:27:22 +01:00
Maciej W. Rozycki
d9639e091c Fix 64-bit BFD detection causing build failures
We have a discrepancy with 64-bit BFD handling across our component
subdirectories leading to link failures such as:

ld: ../opcodes/.libs/libopcodes.a(disassemble.o): in function `disassembler': disassemble.c:(.text+0x65): undefined reference to `print_insn_alpha'
ld: disassemble.c:(.text+0x105): undefined reference to `print_insn_ia64'
ld: disassemble.c:(.text+0x11d): undefined reference to `print_insn_loongarch'
ld: disassemble.c:(.text+0x1a1): undefined reference to `print_insn_big_mips'
[...]

with some configurations having a 32-bit host and 64-bit BFD, such as:
`--host=i386-linux-gnu --target=riscv64-linux-gnu --enable-targets=all'.
This is ultimately due to how 64-bit BFD is enabled for bfd/ itself and
other subdirectorses and has been a regression from commit 1d5269c994
("unify 64-bit bfd checks").

For bfd/ the BFD_64_BIT autoconf macro from config/bfd64.m4 is used
combined with this logic in bfd/configure.ac:

case ${host64}-${target64}-${want64} in
  *true*)
    wordsize=64
    bfd64_libs='$(BFD64_LIBS)'
    all_backends='$(BFD64_BACKENDS) $(BFD32_BACKENDS)'
    [...]
    ;;
  false-false-false)
    wordsize=32
    all_backends='$(BFD32_BACKENDS)'
    ;;
esac

where the value of ${wordsize} switches between 32-bit and 64-bit BFD
via these pieces:

#define BFD_ARCH_SIZE @wordsize@

and:

#if BFD_ARCH_SIZE >= 64
#define BFD64
#endif

in bfd/bfd-in.h, which ultimately becomes a part of "bfd.h".

Then ${host64} is determined in bfd/configure.ac from the host's word
size, via the host's pointer size:

if test "x${ac_cv_sizeof_void_p}" = "x8"; then
  host64=true
fi

And ${target64} is determined in bfd/configure.ac from the target's word
size:

    if test ${target_size} = 64; then
	target64=true
    fi

Where multiple targets have been requested with `--enable-targets=all'
the presence of any 64-bit target will set "true" here.

Finally ${want64} is set according to `--enable-64-bit-bfd' user option
with an arrangement involving BFD_64_BIT:

BFD_64_BIT
if test $enable_64_bit_bfd = yes ; then
  want64=true
else
  want64=false
fi

which also, redundantly, checks and sets its result upon the host's word
size.  Lastly ${want64} is also selectively set by target fragments in
bfd/config.bfd, which mostly if not completely overlaps with ${target64}
setting as described above.

Conversely other subdirectories only rely on BFD_64_BIT, so they fail to
notice that BFD is 64-bit and do not enable their 64-bit handling where
the host requested is 32-bit and 64-bit BFD has been enabled other than
with `--enable-64-bit-bfd'.  One consequence is opcodes/disassemble.c
enables calls to its numerous own 64-bit backends by checking the BFD64
macro from "bfd.h", however does not actually enable said backends in
its Makefile.  Hence the link errors quoted above.

Address the problem then by moving the `--enable-64-bit-bfd' option back
to bfd/configure.ac and remove the call to BFD_64_BIT from there and
then rewrite the macro in terms of checking for the presence of BFD64
macro in "bfd.h", which is the canonical way of determining whether BFD
is 64-bit or not.

Rather than running `grep' directly on ../bfd/bfd-in3.h as the opcodes/
fragment used to before the problematic commit:

    if grep '#define BFD_ARCH_SIZE 64' ../bfd/bfd-in3.h > /dev/null; then

run the preprocessor on "bfd.h", which allows to invoke the macro from
configure.ac files placed in subdirectories located at deeper levels, by
relying on the preprocessor's search path.

This requires however that the invokers rely on `all-bfd' rather than
`configure-bfd' for their `configure' invocation stage, because "bfd.h"
is made by `make all' rather than `configure' in bfd/.

Do not cache the result of this check however, as reconfiguring a tree
such as to flip `--enable-64-bit-bfd' on or to change a secondary target
may affect BFD64 and we have no access to information about secondary
targets in BFD_64_BIT.

Also remove the ENABLE_BFD_64_BIT automake conditional, as it's not used
anywhere.

Last but not least remove the hack from gdb/configure.ac to fail builds
for `mips*-*-*' hosts where `--enable-targets=all' has been requested,
but `--enable-64-bit-bfd' has not as it's no longer needed.  Such builds
complete successfully now, having enabled 64-bit BFD implicitly.

Tested-By: Guinevere Larsen <guinevere@redhat.com>
Tested-By: Luis Machado <luis.machado@arm.com>
Approved-By: Alan Modra <amodra@gmail.com>
Approved-By: Luis Machado <luis.machado@arm.com>
2025-04-28 18:53:30 +01:00
Surya Kumari Jangala
863cfde5f0 PowerPC: Support for Prefixed Add Immediate Shifted Instruction (RFC02686)
opcodes/
	* ppc-opc.c (insert_si32, extract_si32, insert_nsi32,
	extract_nsi32): New functions.
	(SI32, NSI32, P_D_SI32_MASK, P_DRAPCREL_SI32_MASK): New macros.
	(IMM32): Update for new macros.
	(powerpc_opcodes): Add plis, paddis, psubis.

gas/
	* testsuite/gas/ppc/future.s: New test.
	* testsuite/gas/ppc/future.d: Likewise.
2025-04-28 02:55:05 -05:00
Marek Pikuła
88891208c3 RISC-V: Add missing disassembler option max
The flag already exists but it's not been exposed to user.

Signed-off-by: Marek Pikuła <m.pikula@partner.samsung.com>
2025-04-15 10:59:51 +08:00
Jan Beulich
55cee09736 x86: move PadLock enumerators
... to be all in one group. This helps code generation for code like

      || is_cpu (&i.tm, CpuPadLock)
      || is_cpu (&i.tm, CpuPadLockRNG2)
      || is_cpu (&i.tm, CpuPadLockPHE2)
      || is_cpu (&i.tm, CpuPadLockXMODX)

that we have (effectively) twice.
2025-04-14 14:22:21 +02:00
WANG Xuerui
eff93f19cb LoongArch: Support LA32R aliases rdcnt{vl,vh,id}.w
These LA32R instructions are in fact special cases of the LA32S/LA64
rdtime{l,h}.w (with only one output operand instead of two, the other
one being forced to $zero), but are named differently in the LA32R
ISA manual nevertheless.

As the LA32R names are more memorable to a degree (especially for those
having difficulties remembering which operand corresponds to the node
ID), support them by making them aliases of the corresponding LA32S/LA64
instruction respectively, and make them render as such in disassembly.

Signed-off-by: WANG Xuerui <git@xen0n.name>
2025-04-13 10:45:00 +08:00
Jens Remus
981fe5fd80 s390: Add support for z17 as CPU name
So far IBM z17 was identified as arch15.  Add the real name, as it has
been announced. [1]

[1]: IBM z17 announcement letter, AD25-0015,
     https://www.ibm.com/docs/en/announcements/z17-makes-more-possible

gas/
	* config/tc-s390.c (s390_parse_cpu): Add z17 as alternate CPU
	name for arch15.
	* doc/c-s390.texi: Likewise.
	* doc/as.texi: Likewise.

opcodes/
	* s390-mkopc.c (main): Add z17 as alternate CPU name for arch15.

Signed-off-by: Jens Remus <jremus@linux.ibm.com>
2025-04-09 09:00:48 +02:00
H.J. Lu
03df259d29 x86: Add {noimm8s} pseudo prefix
Instruction templates with only sign-extended 8-bit immediate operand
also have a second template with full-operand-size immediate operand
under a different opcode.  Add {noimm8s} pseudo prefix to exclude
templates with only sign-extended 8-bit immediate operand.

gas/

	PR gas/32811
	* config/tc-i386.c (pseudo_prefixes): Add no_imm8s.
	(operand_size_match): Return false for templates with only sign-
	extended 8-bit immediate operand if {noimm8s} is used.
	(parse_insn): Handle Prefix_NoImm8s.
	* doc/c-i386.texi: Document {noimm8s}.
	* testsuite/gas/i386/pseudos.s: Add tests for {noimm8s}.
	* testsuite/gas/i386/x86-64-pseudos.s: Likewise.
	* testsuite/gas/i386/pseudos.d: Updated.
	* testsuite/gas/i386/x86-64-pseudos.d: Likewise.

opcodes/

	PR gas/32811
	* opcodes/i386-opc.h (Prefix_NoImm8s): New.
	* i386-opc.tbl: Add {noimm8s} pseudo prefix.
	* i386-mnem.h: Regenerated.
	* i386-tbl.h: Likewise.

Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
2025-03-29 07:04:20 -07:00
Marek Pikuła
0d1f436268 RISC-V: Don't show support for 1.9.1 priv spec
The privileged spec 1.9.1 support was removed since binutils 2.43. The
linker only recognizes it and then reports a warning that it may
conflict with other spec versions.

While the support is removed, binutils should still recognize it, but it
shouldn't be exposed to the user in `disassember-options` help.

Signed-off-by: Marek Pikuła <m.pikula@partner.samsung.com>
2025-03-28 09:20:50 +08:00
Haochen Jiang
fdb44fced2 x86: Remove AVX10.2 256 bit rounding support
Since we will support 512 bit on both P-core and E-core for AVX10, 256 bit
rounding is not that useful because we currently have rounding feature
directly on E-core now and no need to use 256-bit rounding as somehow
a workaround. This patch will remove all the support and backport to
Binutils 2.44.

gas/ChangeLog:

	* NEWS: Mention support removal.
	* config/tc-i386.c (build_evex_prefix): Remove U bit encode.
	(check_VecOperands): Remove ymm check for rounding.
	(s_insn): Revise .insn comment.
	* testsuite/gas/i386/avx10_2-256-cvt-intel.d: Remove ymm
	rounding related test.
	* testsuite/gas/i386/avx10_2-256-cvt.d: Ditto.
	* testsuite/gas/i386/avx10_2-256-cvt.s: Ditto.
	* testsuite/gas/i386/avx10_2-256-miscs-intel.d: Ditto.
	* testsuite/gas/i386/avx10_2-256-miscs.d: Ditto.
	* testsuite/gas/i386/avx10_2-256-miscs.s: Ditto.
	* testsuite/gas/i386/avx10_2-256-satcvt-intel.d: Ditto.
	* testsuite/gas/i386/avx10_2-256-satcvt.d: Ditto.
	* testsuite/gas/i386/avx10_2-256-satcvt.s: Ditto.
	* testsuite/gas/i386/evex.d: Ditto.
	* testsuite/gas/i386/evex.s: Ditto.
	* testsuite/gas/i386/i386.exp: Ditto.
	* testsuite/gas/i386/x86-64-avx10_2-256-cvt-intel.d: Ditto.
	* testsuite/gas/i386/x86-64-avx10_2-256-cvt.d: Ditto.
	* testsuite/gas/i386/x86-64-avx10_2-256-cvt.s: Ditto.
	* testsuite/gas/i386/x86-64-avx10_2-256-miscs-intel.d: Ditto.
	* testsuite/gas/i386/x86-64-avx10_2-256-miscs.d: Ditto.
	* testsuite/gas/i386/x86-64-avx10_2-256-miscs.s: Ditto.
	* testsuite/gas/i386/x86-64-avx10_2-256-satcvt-intel.d: Ditto.
	* testsuite/gas/i386/x86-64-avx10_2-256-satcvt.d: Ditto.
	* testsuite/gas/i386/x86-64-avx10_2-256-satcvt.s: Ditto.
	* testsuite/gas/i386/x86-64-evex.d: Ditto.
	* testsuite/gas/i386/x86-64.exp: Ditto.
	* testsuite/gas/i386/avx10_2-rounding-intel.d: Removed.
	* testsuite/gas/i386/avx10_2-rounding-inval.l: Removed.
	* testsuite/gas/i386/avx10_2-rounding-inval.s: Removed.
	* testsuite/gas/i386/avx10_2-rounding.d: Removed.
	* testsuite/gas/i386/avx10_2-rounding.s: Removed.
	* testsuite/gas/i386/x86-64-avx10_2-rounding-intel.d: Removed.
	* testsuite/gas/i386/x86-64-avx10_2-rounding.d: Removed.
	* testsuite/gas/i386/x86-64-avx10_2-rounding.s: Removed.

opcodes/ChangeLog:

	* i386-dis.c (struct instr_info): Remove U bit.
	(get_valid_dis386): Roll back to APX condition.
	* i386-opc.tbl: Remove ymm rounding support.
	* i386-tbl.h: Regenerated.
2025-03-27 10:10:47 +08:00
WANG Xuerui
6d1823dc89 LoongArch: Fix disassembly option parsing stopping at the first option
Turns out the return value of parse_loongarch_dis_option acts as an
error code, and previously the function always signified failure with
a non-zero return value, making only the first disassembly option get
to take effect.

Fix by adding the missing `return 0`'s to the two success code paths.

Signed-off-by: WANG Xuerui <git@xen0n.name>
2025-03-26 15:49:58 +08:00
Jerry Zhang Jian
a7ecc1ba97 RISC-V: add Smrnmi 1.0 instruction support
Add instruction `mnret' support

Ref:
bb8b9127f8/src/rnmi.adoc
946eb67387/extensions/rv_smrnmi

bfd/ChangeLog:
    * elfxx-riscv.c: Add new Smrnmi instruction class handling

gas/ChangeLog:
    * testsuite/gas/riscv/smrnmi.s: New test for mnret
    * testsuite/gas/riscv/rmrnmi.d: Likewise

include/ChangeLog:
    * opcode/ricsv-opc.h: Add MATCH_MNRET, MASK_MNRET
    * opcode/riscv.h: Add new instruction class

opcodes/ChangeLog:
    * riscv-opc.c: Add `mnret' instruction

Signed-off-by: Jerry Zhang Jian <jerry.zhangjian@sifive.com>
2025-03-26 10:16:05 +08:00