[llvm-bugs] [Bug 43274] New: [ARM] llvm-objdump can't disassemble multiply instructions on pre-armv6
via llvm-bugs
llvm-bugs at lists.llvm.org
Wed Sep 11 04:45:37 PDT 2019
https://bugs.llvm.org/show_bug.cgi?id=43274
Bug ID: 43274
Summary: [ARM] llvm-objdump can't disassemble multiply
instructions on pre-armv6
Product: libraries
Version: 8.0
Hardware: Other
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: Backend: ARM
Assignee: unassignedbugs at nondot.org
Reporter: husseydevin at gmail.com
CC: llvm-bugs at lists.llvm.org, peter.smith at linaro.org,
Ties.Stuij at arm.com
Apparently, LLVM attempts to put an <unknown> if there is an illegal register
layout for the mul family of instructions on pre-ARMv6.
However, for whatever reason, instead, ALL mul instructions (even valid ones)
are disassembled as an <unknown>:
clang -O3 -c --target=arm-none-eabi -march=armv4t -fomit-frame-pointer mul.c
#include <stdint.h>
uint64_t mul(uint64_t a, uint64_t b)
{
return a * b;
}
llvm-objdump -d mul.o
mul.o: file format ELF32-arm-little
Disassembly of section .text:
0000000000000000 mul:
0: 10 40 2d e9 push {r4, lr}
4: 92 c0 8e e0 <unknown>
8: 92 e1 24 e0 <unknown>
c: 93 40 21 e0 <unknown>
10: 0c 00 a0 e1 mov r0, r12
14: 10 40 bd e8 pop {r4, lr}
18: 1e ff 2f e1 bx lr
arm-none-eabi-objdump -d mul.o
mul.o: file format elf32-littlearm
Disassembly of section .text:
00000000 <mul>:
0: e92d4010 push {r4, lr}
4: e08ec092 umull ip, lr, r2, r0
8: e024e192 mla r4, r2, r1, lr
c: e0214093 mla r1, r3, r0, r4
10: e1a0000c mov r0, ip
14: e8bd4010 pop {r4, lr}
18: e12fff1e bx lr
I can confirm that this occurs on MUL, UMULL, MLA, and UMLAL. I haven't tested
other variants.
This does not occur if the binary targets ARMv6+.
This was tested on Clang 8.0.1, but I presume it also affects trunk.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20190911/114f4acf/attachment.html>
More information about the llvm-bugs
mailing list