RFC: AArch64 Disassembler: Annotate undefined instructions

Nick Clifton nickc@redhat.com
Mon May 4 09:41:54 GMT 2026


Hi Richard,

>> Can you get 32-bit undefined AArch64 instructions ?
> I'm not sure I follow.  All aarch64 instructions are 32 bits in size.

Doh!  Please excuse my brain fart.  Yes, I knew that.  I was getting
confused with the "64" in the "AArch64" name...

> Also, .inst does not permit the use of a label - it has no meaning in that context.  So for
> 
>          .text
>          .inst 0x12345678
>          .word 0x12345678
>          .word bar  // truncated to 32 bits, but OK
>          .inst bar  // Error, not a constant expression
> bar:
> 
> you get
> 
> as test.s
> test.s: Assembler messages:
> test.s:5: Error: constant expression required
> 
> So to even trigger this case you have to contort your sources in ways I really can't see users trying to do.

Agreed.  I tried to create a test case to make sure that .inst values
were not annotated (but could of been because their value matched a
legitimate symbol value in the linked executable) but I could not find
any way to do this.


> Is there some user reported case driving this?

No, it is just me, trying to make the disassembler output slightly
more informative.

Cheers
   Nick



More information about the Binutils mailing list