https://sourceware.org/bugzilla/show_bug.cgi?id=22493

--- Comment #2 from bugzi...@fritzler-avr.de ---
Hello,
of course I will give you more details.

At first "y52dxxxx" ist not stm it is str ;)
stm is "y92dxxxx".

Therefore I repeated your test but with two more instructions.
Now you can see the difference.

$ cat pr22493.s 
.text
label:
        stmfd sp!, {sp}
        push {sp}
        str sp, [sp, #-4]! //this line(5) is the warning!


$ arm-none-eabi-as -march=armv7-a pr22493.s -o pr22493.o
pr22493.s: Assembler messages:
pr22493.s:5: Warning: source register same as write-back base


$ ./arm-none-eabi-objdump -d pr22493.o
pr22493.o:     file format elf32-littlearm
Disassembly of section .text:

00000000 <label>:
   0:   e92d2000        stmfd   sp!, {sp}
   4:   e52dd004        push    {sp}            ; (str sp, [sp, #-4]!)
   8:   e52dd004        push    {sp}            ; (str sp, [sp, #-4]!)


$ arm-none-eabi-as -v
GNU assembler version 2.29.1 (arm-none-eabi) using BFD version (GNU Binutils)
2.29.1
$ arm-none-eabi-objdump -v
GNU objdump (GNU Binutils) 2.29.1

Now the details HOW the bug was generated:
In our course the students have to write some exceptionhandlers and print all
registers if an exception happens.
Therefore a student used push {sp} and nothing worked because his undef handler
wasnt finished and the -as didnt throw a warning. 

Greetings
Martin

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils

Reply via email to