public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug target/46247] New: bug with loading constant to neon quad register @ 2010-10-30 22:29 daniel.otte at rub dot de 2011-04-04 21:31 ` [Bug target/46247] " ramana at gcc dot gnu.org 2024-03-16 19:52 ` pinskia at gcc dot gnu.org 0 siblings, 2 replies; 3+ messages in thread From: daniel.otte at rub dot de @ 2010-10-30 22:29 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46247 Summary: bug with loading constant to neon quad register Product: gcc Version: 4.5.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target AssignedTo: unassigned@gcc.gnu.org ReportedBy: daniel.otte@rub.de code: +--------------------------------------------------------+ #include <stdint.h> #include <string.h> #include <stdio.h> #include <arm_neon.h> void dbg_neon(uint32x4_t d, char* name){ uint32_t t[4]; int i; *((uint32x4_t*)&(t[0])) = d; printf("\n==== %s debug ====\n", name); for(i=0;i<4;++i){ printf(" %s[%2d] = %08X\n",name, i,t[i]); } } int main(){ uint32x4_t qa0, qt0, qx0; uint32_t t[8]={ 0x78797A63, 0x7C7D7E7F, 0xC0222022, 0x44454647 }; qt0 = (uint32x4_t){ 0, 0xffffffff, 0, 0xffffffff}; // qa0 = *((uint32x4_t*)&(t[0])); qa0 = vld1q_u32 (&(t[0])); qx0 = veorq_u32(qa0, qt0); dbg_neon(qt0, "qt0"); dbg_neon(qa0, "qa0"); dbg_neon(qx0, "qx0"); return 0; } +--------------------------------------------------------+ output: +--------------------------------------------------------+ ==== qt0 debug ==== qt0[ 0] = 00000000 qt0[ 1] = 0000FFFF qt0[ 2] = 00000000 qt0[ 3] = 0000FFFF ==== qa0 debug ==== qa0[ 0] = 78797A63 qa0[ 1] = 7C7D7E7F qa0[ 2] = C0222022 qa0[ 3] = 44454647 ==== qx0 debug ==== qx0[ 0] = 78797A63 qx0[ 1] = 7C7D8180 qx0[ 2] = C0222022 qx0[ 3] = 4445B9B8 +--------------------------------------------------------+ tested with the following gccs: $ LC_ALL=C ~/infos/boxes/beagleboard/2010-10-29/usr/local/angstrom/arm/bin/arm-angstrom-linux-gnueabi-gcc -v Using built-in specs. Target: arm-angstrom-linux-gnueabi Configured with: /OE/angstrom/build/tmp-angstrom_2008_1/work/i686-armv7a-sdk-angstrom-linux-gnueabi/gcc-cross-sdk-4.3.3-r17.2/gcc-4.3.3/configure --build=i686-linux --host=i686-linux --target=arm-angstrom-linux-gnueabi --prefix=/usr/local/angstrom/arm --exec_prefix=/usr/local/angstrom/arm --bindir=/usr/local/angstrom/arm/bin --sbindir=/usr/local/angstrom/arm/bin --libexecdir=/usr/local/angstrom/arm/libexec --datadir=/usr/local/angstrom/arm/share --sysconfdir=/usr/local/angstrom/arm/etc --sharedstatedir=/usr/local/angstrom/arm/share/com --localstatedir=/usr/local/angstrom/arm/var --libdir=/usr/local/angstrom/arm/lib --includedir=/usr/local/angstrom/arm/include --oldincludedir=/usr/local/angstrom/arm/include --infodir=/usr/local/angstrom/arm/share/info --mandir=/usr/local/angstrom/arm/share/man --with-gnu-ld --enable-shared --enable-languages=c,c++,objc,fortran --enable-threads=posix --disable-multilib --enable-c99 --enable-long-long --enable-symvers=gnu --enable-libstdcxx-pch --program-prefix=arm-angstrom-linux-gnueabi- --enable-target-optspace --enable-cheaders=c_std --enable-libssp --disable-bootstrap --disable-libgomp --disable-libmudflap --with-sysroot=/usr/local/angstrom/arm/arm-angstrom-linux-gnueabi --with-build-time-tools=/OE/angstrom/build/tmp-angstrom_2008_1/sysroots/i686-linux/usr/armv7a/arm-angstrom-linux-gnueabi/bin --with-build-sysroot=/OE/angstrom/build/tmp-angstrom_2008_1/sysroots/armv7a-angstrom-linux-gnueabi --disable-libunwind-exceptions --disable-libssp --disable-libgomp --disable-libmudflap --with-mpfr=/OE/angstrom/build/tmp-angstrom_2008_1/sysroots/i686-linux/usr --enable-__cxa_atexit Thread model: posix gcc version 4.3.3 (GCC) $ LC_ALL=C arm-none-eabi-gcc -v Using built-in specs. COLLECT_GCC=arm-none-eabi-gcc COLLECT_LTO_WRAPPER=/home/bg/sat/libexec/gcc/arm-none-eabi/4.5.1/lto-wrapper Target: arm-none-eabi Configured with: ../gcc-4.5.1/configure --target=arm-none-eabi --prefix=/home/bg/sat --enable-interwork --enable-multilib --enable-languages=c,c++ --with-newlib --disable-shared --with-gnu-as --with-gnu-ld --disable-nls --disable-werror --with-system-zlib : (reconfigured) ../gcc-4.5.1/configure --target=arm-none-eabi --prefix=/home/bg/sat --enable-interwork --enable-multilib --enable-languages=c,c++ --with-newlib --disable-shared --with-gnu-as --with-gnu-ld --disable-nls --disable-werror --with-system-zlib Thread model: single gcc version 4.5.1 (GCC) commandline: $GCC -O2 -S -Wall -mcpu=cortex-a8 -mfloat-abi=softfp -mfpu=neon -static gcc_bug.c additional information: does not happen with -O0 but with -O1, -O2 and -O3. ^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug target/46247] bug with loading constant to neon quad register 2010-10-30 22:29 [Bug target/46247] New: bug with loading constant to neon quad register daniel.otte at rub dot de @ 2011-04-04 21:31 ` ramana at gcc dot gnu.org 2024-03-16 19:52 ` pinskia at gcc dot gnu.org 1 sibling, 0 replies; 3+ messages in thread From: ramana at gcc dot gnu.org @ 2011-04-04 21:31 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46247 Ramana Radhakrishnan <ramana at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2011.04.04 21:31:00 CC| |ramana at gcc dot gnu.org Ever Confirmed|0 |1 --- Comment #1 from Ramana Radhakrishnan <ramana at gcc dot gnu.org> 2011-04-04 21:31:00 UTC --- vmov.i32 d18, #0 @ v8qi @ D.13245, movw r0, #:lower16:.LC0 @, vmov.i8 d19, #1 @ v8qi @ tmp229, movt r0, #:upper16:.LC0 @, vmov d17, d18 @ v8qi @ tmp231, D.13245 push {r4, r5, lr} @ vmov.i8 d16, #2 @ v8qi @ tmp236, sub sp, sp, #60 @,, vzip.8 d19, d17 @ tmp230, tmp231 add r3, sp, #48 @ tmp238,, fstd d17, [sp, #16] @ tmp231, vzip.8 d16, d18 @ tmp236, tmp237 fstd d16, [sp, #8] @ tmp236, vst1.8 {d19}, [r3] @ tmp230, tmp238 add r3, sp, #40 @ tmp239,, movw r4, #:lower16:.LC1 @ tmp243, vst1.8 {d17}, [r3] @ tmp231, tmp239 <----- add r3, sp, #32 @ tmp240,, movt r4, #:upper16:.LC1 @ tmp243, vst1.8 {d16}, [r3] @ tmp236, tmp240 add r3, sp, #24 @ tmp241,, vst1.8 {d17}, [r3] @ tmp231, tmp241 bl puts @ Why does this end up storing so many values to the stack . The problem appears to be with storing d17 twice instead of storing d18 in the case marked with ----> ^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug target/46247] bug with loading constant to neon quad register 2010-10-30 22:29 [Bug target/46247] New: bug with loading constant to neon quad register daniel.otte at rub dot de 2011-04-04 21:31 ` [Bug target/46247] " ramana at gcc dot gnu.org @ 2024-03-16 19:52 ` pinskia at gcc dot gnu.org 1 sibling, 0 replies; 3+ messages in thread From: pinskia at gcc dot gnu.org @ 2024-03-16 19:52 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=46247 --- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> --- The code looks correct in GCC 4.5.4 and above. ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-03-16 19:52 UTC | newest] Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2010-10-30 22:29 [Bug target/46247] New: bug with loading constant to neon quad register daniel.otte at rub dot de 2011-04-04 21:31 ` [Bug target/46247] " ramana at gcc dot gnu.org 2024-03-16 19:52 ` pinskia at gcc dot gnu.org
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).