This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH: PR target/42671] Use Thumb1 GOT address loading sequence for Thumb2


On Thu, 2010-01-28 at 11:42 +0800, Carrot Wei wrote:
> Hi Richard
> 
> After applying your patch, there are several new unsupported tls
> related test cases. Following is one example:
> 

Sounds like a qemu issue to me.  Paul, are there versions of qemu that
don't correctly support reading the TP register directly from cp15 even
when they should?

R.

> -------------------------------------- START
> --------------------------------------
> 
> Test Run By carrot on Wed Jan 27 19:30:18 2010
> Target is arm-unknown-linux-gnueabi
> Host   is x86_64-build_pc-linux-gnu
> 
>                 === g++ tests ===
> 
> Schedule of variations:
>     arm-sim/thumb
> 
> Running target arm-sim/thumb
> Using /usr/share/dejagnu/baseboards/arm-sim.exp as board description
> file for target.
> Using /usr/share/dejagnu/config/sim.exp as generic interface file for target.
> Using /usr/share/dejagnu/baseboards/basic-sim.exp as board description
> file for target.
> Using /home/carrot/compiler/gcc4.5/gcc/testsuite/config/default.exp as
> tool-and-target-specific interface file.
> Running /home/carrot/compiler/gcc4.5/gcc/testsuite/g++.dg/tls/tls.exp ...
> Executing on host: /usr/local/google/home/carrot/armobj3/gcc/xgcc
> -B/usr/local/google/home/carrot/armobj3/gcc/   -w -fexceptions -c
> -mthumb -o /usr/local/google/home/carrot/armobj3/gcc/testsuite/g++/g++-testglue.o
> /usr/share/dejagnu/testglue.c    (timeout = 300)
> ALWAYS_CXXFLAGS set to {additional_flags=-nostdinc++
> -I/usr/local/google/home/carrot/armobj3/arm-unknown-linux-gnueabi/libstdc++-v3/include/arm-unknown-linux-gnueabi
> -I/usr/local/google/home/carrot/armobj3/arm-unknown-linux-gnueabi/libstdc++-v3/include
> -I/home/carrot/compiler/gcc4.5/libstdc++-v3/libsupc++
> -I/home/carrot/compiler/gcc4.5/libstdc++-v3/include/backward
> -I/home/carrot/compiler/gcc4.5/libstdc++-v3/testsuite/util} {ldflags=
> -L/usr/local/google/home/carrot/armobj3/arm-unknown-linux-gnueabi/./libstdc++-v3/src/.libs
>  -B/usr/local/google/home/carrot/armobj3/arm-unknown-linux-gnueabi/./libstdc++-v3/src/.libs
>  -L/usr/local/google/home/carrot/armobj3/arm-unknown-linux-gnueabi/./libstdc++-v3/src/.libs
> -L/usr/local/google/home/carrot/armobj3/arm-unknown-linux-gnueabi/./libiberty
> } additional_flags=-fmessage-length=0
> Executing on host:
> /usr/local/google/home/carrot/armobj3/gcc/testsuite/g++/../../g++
> -B/usr/local/google/home/carrot/armobj3/gcc/testsuite/g++/../../
> tls_runtime16429.c g++_tg.o  -nostdinc++
> -I/usr/local/google/home/carrot/armobj3/arm-unknown-linux-gnueabi/libstdc++-v3/include/arm-unknown-linux-gnueabi
> -I/usr/local/google/home/carrot/armobj3/arm-unknown-linux-gnueabi/libstdc++-v3/include
> -I/home/carrot/compiler/gcc4.5/libstdc++-v3/libsupc++
> -I/home/carrot/compiler/gcc4.5/libstdc++-v3/include/backward
> -I/home/carrot/compiler/gcc4.5/libstdc++-v3/testsuite/util
> -fmessage-length=0
> -L/usr/local/google/home/carrot/armobj3/arm-unknown-linux-gnueabi/./libstdc++-v3/src/.libs
>  -B/usr/local/google/home/carrot/armobj3/arm-unknown-linux-gnueabi/./libstdc++-v3/src/.libs
>  -L/usr/local/google/home/carrot/armobj3/arm-unknown-linux-gnueabi/./libstdc++-v3/src/.libs
> -L/usr/local/google/home/carrot/armobj3/arm-unknown-linux-gnueabi/./libiberty
>  -Wl,-wrap,exit -Wl,-wrap,_exit -Wl,-wrap,main -Wl,-wrap,abort -lm
> -mthumb -o tls_runtime16429.exe    (timeout = 800)
> qemu: fatal: cp15 insn ee1d2f70
> 
> R00=00000001 R01=4007f1cc R02=4007f1d4 R03=0000878d
> R04=00000000 R05=00000000 R06=00000000 R07=4007f064
> R08=00000000 R09=00000000 R10=400a6000 R11=00000000
> R12=4007f100 R13=4007f064 R14=000087a3 R15=00008578
> PSR=60000030 -ZC- T usr32
> qemu: uncaught target signal 6 (Aborted) - exiting
> UNSUPPORTED: g++.dg/tls/static-1.C
> testcase /home/carrot/compiler/gcc4.5/gcc/testsuite/g++.dg/tls/tls.exp
> completed in 2 seconds
> 
>                 === g++ Summary ===
> 
> # of unsupported tests          1
> ALWAYS_CXXFLAGS set to {additional_flags=-nostdinc++
> -I/usr/local/google/home/carrot/armobj3/arm-unknown-linux-gnueabi/libstdc++-v3/include/arm-unknown-linux-gnueabi
> -I/usr/local/google/home/carrot/armobj3/arm-unknown-linux-gnueabi/libstdc++-v3/include
> -I/home/carrot/compiler/gcc4.5/libstdc++-v3/libsupc++
> -I/home/carrot/compiler/gcc4.5/libstdc++-v3/include/backward
> -I/home/carrot/compiler/gcc4.5/libstdc++-v3/testsuite/util} {ldflags=
> -L/usr/local/google/home/carrot/armobj3/arm-unknown-linux-gnueabi/./libstdc++-v3/src/.libs
>  -B/usr/local/google/home/carrot/armobj3/arm-unknown-linux-gnueabi/./libstdc++-v3/src/.libs
>  -L/usr/local/google/home/carrot/armobj3/arm-unknown-linux-gnueabi/./libstdc++-v3/src/.libs
> -L/usr/local/google/home/carrot/armobj3/arm-unknown-linux-gnueabi/./libiberty
> } additional_flags=-fmessage-length=0
> Executing on host:
> /usr/local/google/home/carrot/armobj3/gcc/testsuite/g++/../../g++ -v
>  (timeout = 300)
> Using built-in specs.
> COLLECT_GCC=/usr/local/google/home/carrot/armobj3/gcc/testsuite/g++/../../g++
> COLLECT_LTO_WRAPPER=/usr/local/google/home/carrot/armbin/libexec/gcc/arm-unknown-linux-gnueabi/4.5.0/lto-wrapper
> Target: arm-unknown-linux-gnueabi
> Configured with: /home/carrot/compiler/gcc4.5/configure
> --build=x86_64-build_pc-linux-gnu --host=x86_64-build_pc-linux-gnu
> --target=arm-unknown-linux-gnueabi
> --prefix=/usr/local/google/home/carrot/armbin
> --with-sysroot=/home/carrot/x-tools/arm-unknown-linux-gnueabi/arm-unknown-linux-gnueabi//sys-root
> --disable-multilib --with-float=soft
> --with-pkgversion=crosstool-NG-1.5.3 --disable-sjlj-exceptions
> --enable-__cxa_atexit
> --with-gmp=/home/carrot/x-tools/arm-unknown-linux-gnueabi
> --with-mpfr=/home/carrot/x-tools/arm-unknown-linux-gnueabi
> --with-local-prefix=/home/carrot/x-tools/arm-unknown-linux-gnueabi/arm-unknown-linux-gnueabi//sys-root
> --disable-nls --enable-threads=posix --enable-symvers=gnu --enable-c99
> --enable-long-long --enable-target-optspace --with-arch=armv7-a
> --disable-bootstrap build_alias=x86_64-build_pc-linux-gnu
> host_alias=x86_64-build_pc-linux-gnu
> target_alias=arm-unknown-linux-gnueabi --enable-languages=c,c++
> Thread model: posix
> gcc version 4.5.0 20100127 (experimental) (crosstool-NG-1.5.3)
> /usr/local/google/home/carrot/armobj3/gcc/testsuite/g++/../../g++
> version 4.5.0 20100127 (experimental) (crosstool-NG-1.5.3)
> 
> runtest completed at Wed Jan 27 19:30:37 2010
> 
> -------------------------------------- END -------------------------------------
> 
> If I remove this change
> #define FL_FOR_ARCH7A	...
> then everything is good. I can't understand how this change can cause
> such failure.
> 
> thanks
> Guozhi
> 
> On Wed, Jan 27, 2010 at 11:03 PM, Richard Earnshaw <rearnsha@arm.com> wrote:
> >
> > On Wed, 2010-01-27 at 12:02 +0800, Carrot Wei wrote:
> >> Function legitimize_tls_address and arm_call_tls_get_addr contains
> >> similar code. I modified them and ran the same tests without any new
> >> failure. Is there any other place?
> >>
> >
> > As I mentioned in my previous message, there's some further cleaning up
> > that can be done.  I've attached a revised patch that addresses this.  I
> > noticed while doing this that we weren't using the direct-access method
> > for the thread register when generating code for v7a; that is also fixed
> > with this patch.
> >
> > I haven't had time to do anything but light testing of this and my
> > test-environment is well configured for covering this either -- so if
> > you could run the attached through your test environment and let me know
> > of any problems I'd be grateful.
> >
> > R.
> >
> >        * arm.c (FL_FOR_ARCH7A): Include v6k extensions.
> >        (arm_override_options): Allow use of the TLS register if thumb2.
> >        (legitimize_pic_address): Improve code sequences for thumb2.
> >        (arm_load_pic_register): Likewise.
> >        (arm_call_tls_get_addr): Likewise.
> >        (legitimize_tls_address): Likewise.
> >        * arm.md (pic_load_addr_32bit): New pattern, merged from thumb variant and ...
> >        (pic_load_addr_arm): ... this.  Delete.
> >        (pic_add_dot_plus_four): Allow any thumb.
> >        * thumb2.md (pic_load_addr_thumb2): Delete.
> >        (pic_load_dot_plus_four): Delete.
> >        (tls_load_dot_plus_four): New pattern.
> >


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]