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 PING^2 4/5] Named address spaces: SPU back-end support


Trevor Smigiel wrote:

> A couple of minor issues.   For the options -maddress-space-conversion
> and -matomic-updates, is there a reason to define the negative versions
> explicitly?  Also, the -mno-atomic-updates option doesn't specify
> RejectNegative.

Good point.  There's no real reason for that, except that you cannot
only have an InverseMask statement with no corresponding Mask statement.
However, this can be fixed simply by using a positive MASK_ADDRESS_SPACE_
CONVERSION instead of the negative MASK_NO_ADDRESS_SPACE_CONVERSION,
which is more in line with the other options anyway ...

I've checked the patch below into the named-addr-spaces-branch and
updated the mainline patch accordingly.

> This patch is approved, even without the above changes.

Thanks!

Bye,
Ulrich


ChangeLog:

	* config/spu/spu.opt (-maddress-space-conversion): Use Mask
	instead of InverseMask.  Remove RejectNegative.
	(-mno-address-space-conversion): Remove.
	(-mno-atomic-updates): Remove.
	* config/spu/spu.h (TARGET_DEFAULT): Add MASK_ADDRESS_SPACE_CONVERSION.
	* config/spu/spu.c (spu_addr_space_subset_p): Test for
	!MASK_ADDRESS_SPACE_CONVERSION instead of
	TARGET_NO_ADDRESS_SPACE_CONVERSION.


Index: gcc/config/spu/spu.opt
===================================================================
*** gcc/config/spu/spu.opt	(revision 152464)
--- gcc/config/spu/spu.opt	(working copy)
*************** Target Report RejectNegative Var(spu_ea_
*** 92,104 ****
  Access variables in 64-bit PPU objects
  
  maddress-space-conversion
! Target Report RejectNegative InverseMask(NO_ADDRESS_SPACE_CONVERSION)
  Allow conversions between __ea and generic pointers (default)
  
- mno-address-space-conversion
- Target Report RejectNegative Mask(NO_ADDRESS_SPACE_CONVERSION)
- Do not allow conversions between __ea and generic pointers
- 
  mcache-size=
  Target Report RejectNegative Joined UInteger
  Size (in KB) of software data cache
--- 92,100 ----
  Access variables in 64-bit PPU objects
  
  maddress-space-conversion
! Target Report Mask(ADDRESS_SPACE_CONVERSION)
  Allow conversions between __ea and generic pointers (default)
  
  mcache-size=
  Target Report RejectNegative Joined UInteger
  Size (in KB) of software data cache
*************** matomic-updates
*** 107,113 ****
  Target Report
  Atomically write back software data cache lines (default)
  
- mno-atomic-updates
- Target Report
- Do not atomically write back software data cache lines
- 
--- 103,105 ----
Index: gcc/config/spu/spu.c
===================================================================
*** gcc/config/spu/spu.c	(revision 152464)
--- gcc/config/spu/spu.c	(working copy)
*************** spu_addr_space_subset_p (addr_space_t su
*** 6813,6819 ****
  
    /* If we have -mno-address-space-conversion, treat __ea and generic as not
       being subsets but instead as disjoint address spaces.  */
!   else if (TARGET_NO_ADDRESS_SPACE_CONVERSION)
      return false;
  
    else
--- 6813,6819 ----
  
    /* If we have -mno-address-space-conversion, treat __ea and generic as not
       being subsets but instead as disjoint address spaces.  */
!   else if (!TARGET_ADDRESS_SPACE_CONVERSION)
      return false;
  
    else
Index: gcc/config/spu/spu.h
===================================================================
*** gcc/config/spu/spu.h	(revision 152464)
--- gcc/config/spu/spu.h	(working copy)
*************** extern GTY(()) int spu_tune;
*** 51,57 ****
  /* Default target_flags if no switches specified.  */
  #ifndef TARGET_DEFAULT
  #define TARGET_DEFAULT (MASK_ERROR_RELOC | MASK_SAFE_DMA | MASK_BRANCH_HINTS \
! 			| MASK_SAFE_HINTS)
  #endif
  
  
--- 51,57 ----
  /* Default target_flags if no switches specified.  */
  #ifndef TARGET_DEFAULT
  #define TARGET_DEFAULT (MASK_ERROR_RELOC | MASK_SAFE_DMA | MASK_BRANCH_HINTS \
! 			| MASK_SAFE_HINTS | MASK_ADDRESS_SPACE_CONVERSION)
  #endif
  
  


-- 
  Dr. Ulrich Weigand
  GNU Toolchain for Linux on System z and Cell BE
  Ulrich.Weigand@de.ibm.com


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