Patchwork [RFA/ARM] : Fix NEG_POOL_RANGE

login
register
mail settings
Submitter Sameera Deshpande
Date Nov. 24, 2011, 10:08 a.m.
Message ID <1322129313.23412.45.camel@e102549-lin.cambridge.arm.com>
Download mbox | patch
Permalink /patch/127469/
State New
Headers show

Comments

Sameera Deshpande - Nov. 24, 2011, 10:08 a.m.
On Fri, 2011-11-18 at 23:12 +0000, Ramana Radhakrishnan wrote:
> On 17 November 2011 15:16, Sameera Deshpande <sameera.deshpande@arm.com> wrote:
> > Hi!
> >
> > Please find attached the patch updating NEG_POOL_RANGE from 1008 to
> > 1020 -(8 + <data size>).
> 
> This is OK - can you add a comment around the neg_pool_range attribute
> in arm.md stating that the limit should essentially be <max_range> -
> (8 + <data_size> ?.
> 
Hi Ramana,

Thanks for your comment.
Please find attached the updated patch.

--
Ramana Radhakrishnan - Nov. 24, 2011, 11:09 a.m.
> Thanks for your comment.
> Please find attached the updated patch.
>

Ok - please apply .

Ramana

> --

Patch

*** /work/spec-test/local-checkouts/gcc-fsf/gcc/config/arm/arm.md	2011-11-22 17:20:36.000000000 +0000
--- gcc/config/arm/arm.md	2011-11-22 17:14:48.000000000 +0000
***************  (define_attr "enabled" "no,yes"
*** 268,274 ****
  ; can be placed.  If the distance is zero, then this insn will never
  ; reference the pool.
  ; NEG_POOL_RANGE is nonzero for insns that can reference a constant pool entry
! ; before its address.
  (define_attr "arm_pool_range" "" (const_int 0))
  (define_attr "thumb2_pool_range" "" (const_int 0))
  (define_attr "arm_neg_pool_range" "" (const_int 0))
--- 268,274 ----
  ; can be placed.  If the distance is zero, then this insn will never
  ; reference the pool.
  ; NEG_POOL_RANGE is nonzero for insns that can reference a constant pool entry
! ; before its address.  It is set to <max_range> - (8 + <data_size>).
  (define_attr "arm_pool_range" "" (const_int 0))
  (define_attr "thumb2_pool_range" "" (const_int 0))
  (define_attr "arm_neg_pool_range" "" (const_int 0))
*************** (define_insn "*arm_movdi"
*** 5223,5229 ****
    [(set_attr "length" "8,12,16,8,8")
     (set_attr "type" "*,*,*,load2,store2")
     (set_attr "arm_pool_range" "*,*,*,1020,*")
!    (set_attr "arm_neg_pool_range" "*,*,*,1008,*")
     (set_attr "thumb2_pool_range" "*,*,*,4096,*")
     (set_attr "thumb2_neg_pool_range" "*,*,*,0,*")]
  )
--- 5223,5229 ----
    [(set_attr "length" "8,12,16,8,8")
     (set_attr "type" "*,*,*,load2,store2")
     (set_attr "arm_pool_range" "*,*,*,1020,*")
!    (set_attr "arm_neg_pool_range" "*,*,*,1004,*")
     (set_attr "thumb2_pool_range" "*,*,*,4096,*")
     (set_attr "thumb2_neg_pool_range" "*,*,*,0,*")]
  )
*************** (define_insn "*movdf_soft_insn"
*** 6583,6589 ****
    [(set_attr "length" "8,12,16,8,8")
     (set_attr "type" "*,*,*,load2,store2")
     (set_attr "pool_range" "*,*,*,1020,*")
!    (set_attr "arm_neg_pool_range" "*,*,*,1008,*")
     (set_attr "thumb2_neg_pool_range" "*,*,*,0,*")]
  )
  
--- 6583,6589 ----
    [(set_attr "length" "8,12,16,8,8")
     (set_attr "type" "*,*,*,load2,store2")
     (set_attr "pool_range" "*,*,*,1020,*")
!    (set_attr "arm_neg_pool_range" "*,*,*,1004,*")
     (set_attr "thumb2_neg_pool_range" "*,*,*,0,*")]
  )
  
*** /work/spec-test/local-checkouts/gcc-fsf/gcc/config/arm/fpa.md	2011-11-22 17:18:37.000000000 +0000
--- gcc/config/arm/fpa.md	2011-11-22 17:14:48.000000000 +0000
*************** (define_insn "*thumb2_movdf_fpa"
*** 671,677 ****
     (set_attr "type"
      "load1,store2,*,store2,load1,ffarith,ffarith,f_fpa_load,f_fpa_store,r_mem_f,f_mem_r")
     (set_attr "pool_range" "*,*,*,*,4092,*,*,1024,*,*,*")
!    (set_attr "neg_pool_range" "*,*,*,*,0,*,*,1020,*,*,*")]
  )
  
  ;; Saving and restoring the floating point registers in the prologue should
--- 671,677 ----
     (set_attr "type"
      "load1,store2,*,store2,load1,ffarith,ffarith,f_fpa_load,f_fpa_store,r_mem_f,f_mem_r")
     (set_attr "pool_range" "*,*,*,*,4092,*,*,1024,*,*,*")
!    (set_attr "neg_pool_range" "*,*,*,*,0,*,*,1008,*,*,*")]
  )
  
  ;; Saving and restoring the floating point registers in the prologue should
*** /work/spec-test/local-checkouts/gcc-fsf/gcc/config/arm/neon.md	2011-11-22 17:18:37.000000000 +0000
--- gcc/config/arm/neon.md	2011-11-22 17:14:48.000000000 +0000
*************** (define_insn "*neon_mov<mode>"
*** 198,204 ****
    (set_attr "insn" "*,*,*,*,*,*,mov,*,*")
    (set_attr "length" "4,4,4,4,4,4,8,8,8")
    (set_attr "pool_range"     "*,*,*,1020,*,*,*,1020,*")
!   (set_attr "neg_pool_range" "*,*,*,1008,*,*,*,1008,*")])
  
  (define_insn "*neon_mov<mode>"
    [(set (match_operand:VQXMOV 0 "nonimmediate_operand"
--- 198,204 ----
    (set_attr "insn" "*,*,*,*,*,*,mov,*,*")
    (set_attr "length" "4,4,4,4,4,4,8,8,8")
    (set_attr "pool_range"     "*,*,*,1020,*,*,*,1020,*")
!   (set_attr "neg_pool_range" "*,*,*,1004,*,*,*,1004,*")])
  
  (define_insn "*neon_mov<mode>"
    [(set (match_operand:VQXMOV 0 "nonimmediate_operand"
*************** (define_insn "*neon_mov<mode>"
*** 243,249 ****
     (set_attr "insn" "*,*,*,*,*,*,mov,*,*")
     (set_attr "length" "4,8,4,8,8,8,16,8,16")
     (set_attr "pool_range" "*,*,*,1020,*,*,*,1020,*")
!    (set_attr "neg_pool_range" "*,*,*,1008,*,*,*,1008,*")])
  
  (define_expand "movti"
    [(set (match_operand:TI 0 "nonimmediate_operand" "")
--- 243,249 ----
     (set_attr "insn" "*,*,*,*,*,*,mov,*,*")
     (set_attr "length" "4,8,4,8,8,8,16,8,16")
     (set_attr "pool_range" "*,*,*,1020,*,*,*,1020,*")
!    (set_attr "neg_pool_range" "*,*,*,996,*,*,*,996,*")])
  
  (define_expand "movti"
    [(set (match_operand:TI 0 "nonimmediate_operand" "")
*** /work/spec-test/local-checkouts/gcc-fsf/gcc/config/arm/vfp.md	2011-11-22 17:18:37.000000000 +0000
--- gcc/config/arm/vfp.md	2011-11-22 17:14:48.000000000 +0000
*************** (define_insn "*movdi_vfp"
*** 178,184 ****
                                   (const_int 4))]
                                (const_int 4)))
     (set_attr "pool_range"     "*,*,*,*,1020,4096,*,*,*,*,1020,*")
!    (set_attr "neg_pool_range" "*,*,*,*,1008,0,*,*,*,*,1008,*")
     (set_attr "arch"           "t2,any,any,any,a,t2,any,any,any,any,any,any")]
  )
  
--- 178,184 ----
                                   (const_int 4))]
                                (const_int 4)))
     (set_attr "pool_range"     "*,*,*,*,1020,4096,*,*,*,*,1020,*")
!    (set_attr "neg_pool_range" "*,*,*,*,1004,0,*,*,*,*,1004,*")
     (set_attr "arch"           "t2,any,any,any,a,t2,any,any,any,any,any,any")]
  )
  
*************** (define_insn "*movdi_vfp_cortexa8"
*** 223,229 ****
                                (const_int 4)))
     (set_attr "predicable"    "yes")
     (set_attr "pool_range"     "*,*,*,*,1020,4096,*,*,*,*,1020,*")
!    (set_attr "neg_pool_range" "*,*,*,*,1008,0,*,*,*,*,1008,*")
     (set (attr "ce_count") 
  	(symbol_ref "get_attr_length (insn) / 4"))
     (set_attr "arch"           "t2,any,any,any,a,t2,any,any,any,any,any,any")]
--- 223,229 ----
                                (const_int 4)))
     (set_attr "predicable"    "yes")
     (set_attr "pool_range"     "*,*,*,*,1020,4096,*,*,*,*,1020,*")
!    (set_attr "neg_pool_range" "*,*,*,*,1004,0,*,*,*,*,1004,*")
     (set (attr "ce_count") 
  	(symbol_ref "get_attr_length (insn) / 4"))
     (set_attr "arch"           "t2,any,any,any,a,t2,any,any,any,any,any,any")]
*************** (define_insn "*movdf_vfp"
*** 460,466 ****
  			      (const_int 4)))
     (set_attr "predicable" "yes")
     (set_attr "pool_range" "*,*,*,1020,*,1020,*,*,*")
!    (set_attr "neg_pool_range" "*,*,*,1008,*,1008,*,*,*")]
  )
  
  (define_insn "*thumb2_movdf_vfp"
--- 460,466 ----
  			      (const_int 4)))
     (set_attr "predicable" "yes")
     (set_attr "pool_range" "*,*,*,1020,*,1020,*,*,*")
!    (set_attr "neg_pool_range" "*,*,*,1004,*,1004,*,*,*")]
  )
  
  (define_insn "*thumb2_movdf_vfp"