vldr/vstr s0,[r0,r1] not rejected; assembles w/out warning as vldr/vstr s0,[r0]
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
GNU Arm Embedded Toolchain |
New
|
Undecided
|
Unassigned |
Bug Description
The assembler accepts without any warning or error message VSTR and VLDR instructions with the memory addressing mode of [Rn, Rm]. This memory addressing mode does not exist for these instructions, as the modes are limited to [Rn] and [Rn, #imm] in the Cortex-M4. But the assembler accepts them anyway in this example code, but then produces code that ignores the Rm index register.
.syntax unified
.cpu cortex-m4
.text
.global test
.thumb_func
.align
test:
vldr s0, [r0,r1] // disassembles as vldr s0, [r0]
vstr s0, [r0,r1] // disassembles as vstr s0, [r0]
bx lr
.end
The output from the arm-none-
Disassembly of section .text:
00000000 <test>:
0: ed90 0a00 vldr s0, [r0]
4: ed80 0a00 vstr s0, [r0]
8: 4770 bx lr
a: bf00 nop
This is using arm-none-
summary: |
- vldr s0,[r0,r1] accepted; assembles as vldr s0,[r0] + vldr/vstr s0,[r0,r1] accepted; assembles as vldr/vstr s0,[r0] |
summary: |
- vldr/vstr s0,[r0,r1] accepted; assembles as vldr/vstr s0,[r0] + vldr/vstr s0,[r0,r1] not rejected and assembles w/out warning as + vldr/vstr s0,[r0] |
summary: |
- vldr/vstr s0,[r0,r1] not rejected and assembles w/out warning as - vldr/vstr s0,[r0] + vldr/vstr s0,[r0,r1] not rejected; assembles w/out warning as vldr/vstr + s0,[r0] |
description: | updated |