bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug gas/22493] push {sp} fails on mcpu=cortex-a7


From: address@hidden
Subject: [Bug gas/22493] push {sp} fails on mcpu=cortex-a7
Date: Tue, 05 Dec 2017 17:03:23 +0000

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

--- Comment #2 from address@hidden ---
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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]