This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/35624] New: ARM embeded assembly result error
- From: "rurality dot wq at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 18 Mar 2008 09:03:42 -0000
- Subject: [Bug c/35624] New: ARM embeded assembly result error
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
command is as below.
arm-elf-gcc -v -save-temps -O2 -ffreestanding -c -msoft-float -nostdinc test.c
Using built-in specs.
Target: arm-elf
Configured with: ./configure --target=arm-elf
--prefix=/rdisk1/users/wangqiang/tool-chain --enable-interwork
--enable-multilib --with-float=soft --enable-languages=c,c++ --with-newlib
--with-headers=/rdisk1/users/wangqiang/software/src/newlib-1.14.0/newlib/libc/include
Thread model: single
gcc version 4.1.1
/rdisk5/xgsoc/ExDB/ARM/ARM_GCC/tool-chain/bin/../libexec/gcc/arm-elf/4.1.1/cc1
-E -quiet -nostdinc -v -iprefix
/rdisk5/xgsoc/ExDB/ARM/ARM_GCC/tool-chain/bin/../lib/gcc/arm-elf/4.1.1/
-D__USES_INITFINI__ test.c -msoft-float -ffreestanding -O2 -fpch-preprocess -o
test.i
#include "..." search starts here:
#include <...> search starts here:
End of search list.
/rdisk5/xgsoc/ExDB/ARM/ARM_GCC/tool-chain/bin/../libexec/gcc/arm-elf/4.1.1/cc1
-fpreprocessed test.i -quiet -dumpbase test.c -msoft-float -auxbase test -O2
-version -ffreestanding -o test.s
GNU C version 4.1.1 (arm-elf)
compiled by GNU C version 2.96 20000731 (Red Hat Linux 7.3 2.96-113).
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 3cdb4d57ef011d2fa661601e3cf86274
/rdisk5/xgsoc/ExDB/ARM/ARM_GCC/tool-chain/bin/../lib/gcc/arm-elf/4.1.1/../../../../arm-elf/bin/as
-mfloat-abi=soft -o test.o test.s
Source Code is as below.
test.c
#define burst_copy(dst,src,len) {\
__asm__ __volatile__ ( \
"1: \n\t" \
"ldmia %1!,{r3-r6} \n\t" \
"stmia %0!,{r3-r6} \n\t" \
"subs %2, %2, #1 \n\t" \
"bne 1b \n\t" \
::"r"(dst),"r"(src),"r"(len) \
:"r3","r4","r5","r6"); \
}
int main() {
burst_copy(0xFFFF0000,0xC0000000,0x8);
burst_copy(0xFFFF2000,0xFFFF0000,0x8);
}
Problem:
the destination of first burst_copy is the source of the second.
but source of the second burst_copy will use the result of first,as
0xFFFF0080,and no the Address(0xFFFF0000) I surposed to.
--
Summary: ARM embeded assembly result error
Product: gcc
Version: 4.1.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: rurality dot wq at gmail dot com
GCC build triplet: ./configure --target=arm-elf --
prefix=/rdisk1/users/wangqiang/to
GCC host triplet: CentOS release 4.6 (Final)(Kernel 2.6.9-67.ELsmp on an
i686)
GCC target triplet: arm-elf
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35624