## Objects produced by assemblers that emit mapping symbols but predate the ## "$x" extension use a bare "$x" to mark the start of code. ## llvm-objdump must treat the bare "$x" as an opt-out: it carries no ISA ## information, so the decoder falls back to the file-level feature set ## derived from Tag_RISCV_arch and any --mattr overrides (equivalent to the ## fully-legacy case with no mapping symbols at all). ## ## This cannot be assembled because modern llvm-mc always emits ## "$x"; yaml2obj lets us handcraft the bare-"$x" layout. # RUN: yaml2obj %s -o %t.o # RUN: llvm-objdump -d -M no-aliases --no-show-raw-insn %t.o | FileCheck %s # CHECK-LABEL: <.text>: ## 0x003676d7 = vsetvli a3, a2, e8, m8, tu, mu — an encoding that only ## decodes when V is enabled. V is provided by Tag_RISCV_arch, so the ## instruction must still decode correctly despite the bare "$x" marker. # CHECK-NEXT: 0: vsetvli a3, a2, e8, m8, tu, mu --- !ELF FileHeader: Class: ELFCLASS64 Data: ELFDATA2LSB Type: ET_REL Machine: EM_RISCV Sections: - Name: .text Type: SHT_PROGBITS Flags: [ SHF_ALLOC, SHF_EXECINSTR ] Content: D7763600 - Name: .riscv.attributes Type: SHT_RISCV_ATTRIBUTES Content: 41bb00000072697363760001b10000000572763634693270315f6d3270305f613270315f663270325f643270325f633270305f763170305f7a696373723270305f7a6d6d756c3170305f7a61616d6f3170305f7a616c7273633170305f7a63613170305f7a63643170305f7a76653332663170305f7a76653332783170305f7a76653634643170305f7a76653634663170305f7a76653634783170305f7a766c313238623170305f7a766c3332623170305f7a766c36346231703000 Symbols: - Name: $x Section: .text Value: 0x0