Re: [Patch][google/main] Fix arm build broken

2014-03-13 Thread Richard Earnshaw
On 12/03/14 22:35, Hán Shěn (沈涵) wrote:
 ARM build (on chrome) is broken because of duplicate entries in arm.md
 and unspecs.md. Fixed by removing duplication and merge those in
 arm.md into unspecs.md.
 
 (We had a similar fix for google/gcc-4_8 here -
 http://gcc.gnu.org/viewcvs/gcc?view=revisionrevision=198650)
 
 Tested by building arm cross compiler successfully.
 
 Ok for google/main?
 

Sounds to me like a merge botch. UNSPEC_SIN and UNSPEC_COS were removed
from trunk some time back, when the old FPA code was removed.  I very
much doubt that you need to be re-adding them.

R.

 Patch below -
 
 diff --git a/gcc/config/arm/arm.md b/gcc/config/arm/arm.md
 index 8b269a4..9aec213 100644
 --- a/gcc/config/arm/arm.md
 +++ b/gcc/config/arm/arm.md
 @@ -75,27 +75,6 @@
]
  )
 
 -;; UNSPEC Usage:
 -;; Note: sin and cos are no-longer used.
 -;; Unspec enumerators for Neon are defined in neon.md.
 -
 -(define_c_enum unspec [
 -  UNSPEC_SIN; `sin' operation (MODE_FLOAT):
 -;   operand 0 is the result,
 -;   operand 1 the parameter.
 -  UNPSEC_COS; `cos' operation (MODE_FLOAT):
 -;   operand 0 is the result,
 -;   operand 1 the parameter.
 -  UNSPEC_PROLOGUE_USE   ; As USE insns are not meaningful after reload,
 -; this unspec is used to prevent the deletion of
 -; instructions setting registers for EH handling
 -; and stack frame generation.  Operand 0 is the
 -; register to use.
 -  UNSPEC_WMADDS ; Used by the intrinsic form of the iWMMXt
 WMADDS instruction.
 -  UNSPEC_WMADDU ; Used by the intrinsic form of the iWMMXt
 WMADDU instruction.
 -  UNSPEC_GOT_PREL_SYM   ; Specify an R_ARM_GOT_PREL relocation of a symbol.
 -])
 -
  ;; UNSPEC_VOLATILE Usage:
 
 
 diff --git a/gcc/config/arm/unspecs.md b/gcc/config/arm/unspecs.md
 index 8caa953..89bc528 100644
 --- a/gcc/config/arm/unspecs.md
 +++ b/gcc/config/arm/unspecs.md
 @@ -24,6 +24,12 @@
  ;; Unspec enumerators for iwmmxt2 are defined in iwmmxt2.md
 
  (define_c_enum unspec [
 +  UNSPEC_SIN; `sin' operation (MODE_FLOAT):
 +;   operand 0 is the result,
 +;   operand 1 the parameter.
 +  UNPSEC_COS; `cos' operation (MODE_FLOAT):
 +;   operand 0 is the result,
 +;   operand 1 the parameter.
UNSPEC_PUSH_MULT  ; `push multiple' operation:
  ;   operand 0 is the first register,
  ;   subsequent registers are in parallel (use ...)
 @@ -58,6 +64,7 @@
  ; instruction stream.
UNSPEC_PIC_OFFSET ; A symbolic 12-bit OFFSET that has been treated
  ; correctly for PIC usage.
 +  UNSPEC_GOT_PREL_SYM   ; Specify an R_ARM_GOT_PREL relocation of a symbol.
UNSPEC_GOTSYM_OFF ; The offset of the start of the GOT from a
  ; a given symbolic address.
UNSPEC_THUMB1_CASESI  ; A Thumb1 compressed dispatch-table call.
 @@ -70,6 +77,11 @@
   ; that.
UNSPEC_UNALIGNED_STORE ; Same for str/strh.
UNSPEC_PIC_UNIFIED; Create a common pic addressing form.
 +  UNSPEC_PROLOGUE_USE   ; As USE insns are not meaningful after reload,
 +; this unspec is used to prevent the deletion of
 +; instructions setting registers for EH handling
 +; and stack frame generation.  Operand 0 is the
 +; register to use.
UNSPEC_LL ; Represent an unpaired load-register-exclusive.
UNSPEC_VRINTZ ; Represent a float to integral float rounding
  ; towards zero.
 @@ -87,6 +99,8 @@
 
  (define_c_enum unspec [
UNSPEC_WADDC ; Used by the intrinsic form of the iWMMXt WADDC instruction.
 +  UNSPEC_WMADDS ; Used by the intrinsic form of the iWMMXt
 WMADDS instruction.
 +  UNSPEC_WMADDU ; Used by the intrinsic form of the iWMMXt
 WMADDU instruction.
UNSPEC_WABS ; Used by the intrinsic form of the iWMMXt WABS instruction.
UNSPEC_WQMULWMR ; Used by the intrinsic form of the iWMMXt WQMULWMR
 instruction.
UNSPEC_WQMULMR ; Used by the intrinsic form of the iWMMXt WQMULMR
 instruction.
 
 
 
 
 Han
 




Re: [Patch][google/main] Fix arm build broken

2014-03-13 Thread 沈涵
Thanks Richard, I'll remove UNSPEC_SIN/COS from my patch.

Han

On Thu, Mar 13, 2014 at 3:07 AM, Richard Earnshaw rearn...@arm.com wrote:
 On 12/03/14 22:35, Hán Shěn (沈涵) wrote:
 ARM build (on chrome) is broken because of duplicate entries in arm.md
 and unspecs.md. Fixed by removing duplication and merge those in
 arm.md into unspecs.md.

 (We had a similar fix for google/gcc-4_8 here -
 http://gcc.gnu.org/viewcvs/gcc?view=revisionrevision=198650)

 Tested by building arm cross compiler successfully.

 Ok for google/main?


 Sounds to me like a merge botch. UNSPEC_SIN and UNSPEC_COS were removed
 from trunk some time back, when the old FPA code was removed.  I very
 much doubt that you need to be re-adding them.

 R.

 Patch below -

 diff --git a/gcc/config/arm/arm.md b/gcc/config/arm/arm.md
 index 8b269a4..9aec213 100644
 --- a/gcc/config/arm/arm.md
 +++ b/gcc/config/arm/arm.md
 @@ -75,27 +75,6 @@
]
  )

 -;; UNSPEC Usage:
 -;; Note: sin and cos are no-longer used.
 -;; Unspec enumerators for Neon are defined in neon.md.
 -
 -(define_c_enum unspec [
 -  UNSPEC_SIN; `sin' operation (MODE_FLOAT):
 -;   operand 0 is the result,
 -;   operand 1 the parameter.
 -  UNPSEC_COS; `cos' operation (MODE_FLOAT):
 -;   operand 0 is the result,
 -;   operand 1 the parameter.
 -  UNSPEC_PROLOGUE_USE   ; As USE insns are not meaningful after reload,
 -; this unspec is used to prevent the deletion of
 -; instructions setting registers for EH handling
 -; and stack frame generation.  Operand 0 is the
 -; register to use.
 -  UNSPEC_WMADDS ; Used by the intrinsic form of the iWMMXt
 WMADDS instruction.
 -  UNSPEC_WMADDU ; Used by the intrinsic form of the iWMMXt
 WMADDU instruction.
 -  UNSPEC_GOT_PREL_SYM   ; Specify an R_ARM_GOT_PREL relocation of a symbol.
 -])
 -
  ;; UNSPEC_VOLATILE Usage:


 diff --git a/gcc/config/arm/unspecs.md b/gcc/config/arm/unspecs.md
 index 8caa953..89bc528 100644
 --- a/gcc/config/arm/unspecs.md
 +++ b/gcc/config/arm/unspecs.md
 @@ -24,6 +24,12 @@
  ;; Unspec enumerators for iwmmxt2 are defined in iwmmxt2.md

  (define_c_enum unspec [
 +  UNSPEC_SIN; `sin' operation (MODE_FLOAT):
 +;   operand 0 is the result,
 +;   operand 1 the parameter.
 +  UNPSEC_COS; `cos' operation (MODE_FLOAT):
 +;   operand 0 is the result,
 +;   operand 1 the parameter.
UNSPEC_PUSH_MULT  ; `push multiple' operation:
  ;   operand 0 is the first register,
  ;   subsequent registers are in parallel (use ...)
 @@ -58,6 +64,7 @@
  ; instruction stream.
UNSPEC_PIC_OFFSET ; A symbolic 12-bit OFFSET that has been treated
  ; correctly for PIC usage.
 +  UNSPEC_GOT_PREL_SYM   ; Specify an R_ARM_GOT_PREL relocation of a symbol.
UNSPEC_GOTSYM_OFF ; The offset of the start of the GOT from a
  ; a given symbolic address.
UNSPEC_THUMB1_CASESI  ; A Thumb1 compressed dispatch-table call.
 @@ -70,6 +77,11 @@
   ; that.
UNSPEC_UNALIGNED_STORE ; Same for str/strh.
UNSPEC_PIC_UNIFIED; Create a common pic addressing form.
 +  UNSPEC_PROLOGUE_USE   ; As USE insns are not meaningful after reload,
 +; this unspec is used to prevent the deletion of
 +; instructions setting registers for EH handling
 +; and stack frame generation.  Operand 0 is the
 +; register to use.
UNSPEC_LL ; Represent an unpaired load-register-exclusive.
UNSPEC_VRINTZ ; Represent a float to integral float rounding
  ; towards zero.
 @@ -87,6 +99,8 @@

  (define_c_enum unspec [
UNSPEC_WADDC ; Used by the intrinsic form of the iWMMXt WADDC instruction.
 +  UNSPEC_WMADDS ; Used by the intrinsic form of the iWMMXt
 WMADDS instruction.
 +  UNSPEC_WMADDU ; Used by the intrinsic form of the iWMMXt
 WMADDU instruction.
UNSPEC_WABS ; Used by the intrinsic form of the iWMMXt WABS instruction.
UNSPEC_WQMULWMR ; Used by the intrinsic form of the iWMMXt WQMULWMR
 instruction.
UNSPEC_WQMULMR ; Used by the intrinsic form of the iWMMXt WQMULMR
 instruction.




 Han






-- 
Han Shen |  Software Engineer |  shen...@google.com |  +1-650-440-3330


Re: [Patch][google/main] Fix arm build broken

2014-03-12 Thread Dehao Chen
Looks good to me.

Dehao

On Wed, Mar 12, 2014 at 3:35 PM, Hán Shěn (沈涵) shen...@google.com wrote:
 ARM build (on chrome) is broken because of duplicate entries in arm.md
 and unspecs.md. Fixed by removing duplication and merge those in
 arm.md into unspecs.md.

 (We had a similar fix for google/gcc-4_8 here -
 http://gcc.gnu.org/viewcvs/gcc?view=revisionrevision=198650)

 Tested by building arm cross compiler successfully.

 Ok for google/main?

 Patch below -

 diff --git a/gcc/config/arm/arm.md b/gcc/config/arm/arm.md
 index 8b269a4..9aec213 100644
 --- a/gcc/config/arm/arm.md
 +++ b/gcc/config/arm/arm.md
 @@ -75,27 +75,6 @@
]
  )

 -;; UNSPEC Usage:
 -;; Note: sin and cos are no-longer used.
 -;; Unspec enumerators for Neon are defined in neon.md.
 -
 -(define_c_enum unspec [
 -  UNSPEC_SIN; `sin' operation (MODE_FLOAT):
 -;   operand 0 is the result,
 -;   operand 1 the parameter.
 -  UNPSEC_COS; `cos' operation (MODE_FLOAT):
 -;   operand 0 is the result,
 -;   operand 1 the parameter.
 -  UNSPEC_PROLOGUE_USE   ; As USE insns are not meaningful after reload,
 -; this unspec is used to prevent the deletion of
 -; instructions setting registers for EH handling
 -; and stack frame generation.  Operand 0 is the
 -; register to use.
 -  UNSPEC_WMADDS ; Used by the intrinsic form of the iWMMXt
 WMADDS instruction.
 -  UNSPEC_WMADDU ; Used by the intrinsic form of the iWMMXt
 WMADDU instruction.
 -  UNSPEC_GOT_PREL_SYM   ; Specify an R_ARM_GOT_PREL relocation of a symbol.
 -])
 -
  ;; UNSPEC_VOLATILE Usage:


 diff --git a/gcc/config/arm/unspecs.md b/gcc/config/arm/unspecs.md
 index 8caa953..89bc528 100644
 --- a/gcc/config/arm/unspecs.md
 +++ b/gcc/config/arm/unspecs.md
 @@ -24,6 +24,12 @@
  ;; Unspec enumerators for iwmmxt2 are defined in iwmmxt2.md

  (define_c_enum unspec [
 +  UNSPEC_SIN; `sin' operation (MODE_FLOAT):
 +;   operand 0 is the result,
 +;   operand 1 the parameter.
 +  UNPSEC_COS; `cos' operation (MODE_FLOAT):
 +;   operand 0 is the result,
 +;   operand 1 the parameter.
UNSPEC_PUSH_MULT  ; `push multiple' operation:
  ;   operand 0 is the first register,
  ;   subsequent registers are in parallel (use ...)
 @@ -58,6 +64,7 @@
  ; instruction stream.
UNSPEC_PIC_OFFSET ; A symbolic 12-bit OFFSET that has been treated
  ; correctly for PIC usage.
 +  UNSPEC_GOT_PREL_SYM   ; Specify an R_ARM_GOT_PREL relocation of a symbol.
UNSPEC_GOTSYM_OFF ; The offset of the start of the GOT from a
  ; a given symbolic address.
UNSPEC_THUMB1_CASESI  ; A Thumb1 compressed dispatch-table call.
 @@ -70,6 +77,11 @@
   ; that.
UNSPEC_UNALIGNED_STORE ; Same for str/strh.
UNSPEC_PIC_UNIFIED; Create a common pic addressing form.
 +  UNSPEC_PROLOGUE_USE   ; As USE insns are not meaningful after reload,
 +; this unspec is used to prevent the deletion of
 +; instructions setting registers for EH handling
 +; and stack frame generation.  Operand 0 is the
 +; register to use.
UNSPEC_LL ; Represent an unpaired load-register-exclusive.
UNSPEC_VRINTZ ; Represent a float to integral float rounding
  ; towards zero.
 @@ -87,6 +99,8 @@

  (define_c_enum unspec [
UNSPEC_WADDC ; Used by the intrinsic form of the iWMMXt WADDC instruction.
 +  UNSPEC_WMADDS ; Used by the intrinsic form of the iWMMXt
 WMADDS instruction.
 +  UNSPEC_WMADDU ; Used by the intrinsic form of the iWMMXt
 WMADDU instruction.
UNSPEC_WABS ; Used by the intrinsic form of the iWMMXt WABS instruction.
UNSPEC_WQMULWMR ; Used by the intrinsic form of the iWMMXt WQMULWMR
 instruction.
UNSPEC_WQMULMR ; Used by the intrinsic form of the iWMMXt WQMULMR
 instruction.




 Han