Skip to content

llvm-objdump doesn't recognise HVC instructions for arm32 #54631

Open
@andyhhp

Description

@andyhhp

Given

$ cat hvc.S
        .text
        .code 32

hvc:
        hvc #0xea1

Clang happily compiles the file, given -march=armv7ve

$ clang-15 --target=arm-linux-gnueabihf -march=armv7ve -c hvc.S -o hvc.o

but llvm-objdump doesn't tolerate the instruction

$ llvm-objdump-15 -d hvc.o

hvc.o:	file format elf32-littlearm

Disassembly of section .text:

00000000 <hvc>:
       0: 71 ea 40 e1  	<unknown>

GNU objdump is happy

$ arm-linux-gnueabihf-objdump -d hvc.o

hvc.o:     file format elf32-littlearm


Disassembly of section .text:

00000000 <hvc>:
   0:	e140ea71 	hvc	3745	; 0xea1

In this case, HVC instructions are present because this is a micokernel. Given that HVC is a valid instruction in arm32, llvm-objdump should decode it.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions