This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: GCC 4.0 RC2 Available
On Apr 18, 2005, at 3:12 PM, Julian Brown wrote:
Results for arm-none-elf, cross-compiled from i686-pc-linux-gnu
(Debian)
for C and C++ are here:
http://gcc.gnu.org/ml/gcc-testresults/2005-04/msg01301.html
Relative to RC1, there are several new tests which pass, and:
g++.dg/warn/Wdtor1.C (test for excess errors)
works whereas it didn't before.
Julian
Has there been any discussion of builtin-bitops-1.c failing for
arm-none-elf with RC1 + RC2? It's a moderately serious regression from
3.4.3 -- we're no longer correctly calculating the size of load double
instructions, and so the constant pool is generated at an address that
is out of range of the instructions that use them. It will show up in
moderately large functions that use double word constants.
The problem arises because the function const_double_needs_minipool,
which decides whether to use a constant pool or do an inline
calculation of a constant, bases its decision on fairly sophisticated
logic (from arm_gen_constant), for example figuring that a constant
like 0xcafecafe00000000 can be calculated in 4 instructions:
mov r0, #0
mov r1, #51712 ; 0x0000ca00
add r1, r1, #254 ; 0x0000cafe
orr r1, r1, r1, asl #16 ; 0xcafecafe
But this code never gets generated, because the instruction pattern
arm_movdi actually uses a much simpler algorithm (from the function
output_move_double), which takes 5 instructions for this same example:
mov r0, #0
mvn r1, #1
bic r1, r1, #13568
bic r1, r1, #65536
bic r1, r1, #889192448
Which means that the "length" attribute for arm_movdi with these
addressing modes should more accurately be 20 instead of 16.
Richard Earnshaw fixed this behavior in the mainline on 8 April:
http://gcc.gnu.org/ml/gcc-patches/2005-04/msg00850.html
by using the more efficient constant generator function
(arm_gen_constant) when generating double-word constants. However,
this was not applied to the 4.0 release branch.
Has this regression been discussed already (if so, sorry - I did search
the archives)? If not, is it worth considering applying Richard's
patch, or even a simpler one:
*** arm.md Wed Feb 16 13:57:10 2005
--- arm.md Tue Apr 19 17:09:47 2005
***************
*** 4167,4173 ****
"*
return (output_move_double (operands));
"
! [(set_attr "length" "8,12,16,8,8")
(set_attr "type" "*,*,*,load2,store2")
(set_attr "pool_range" "*,*,*,1020,*")
(set_attr "neg_pool_range" "*,*,*,1008,*")]
--- 4167,4173 ----
"*
return (output_move_double (operands));
"
! [(set_attr "length" "8,12,20,8,8")
(set_attr "type" "*,*,*,load2,store2")
(set_attr "pool_range" "*,*,*,1020,*")
(set_attr "neg_pool_range" "*,*,*,1008,*")]
Thanks -
Josh
~~~~
Josh Conner