[llvm-branch-commits] [llvm-gcc-branch] r98896 - in /llvm-gcc-4.2/branches/Apple/Morbo/gcc: objc/ChangeLog.apple objc/objc-act.c testsuite/ChangeLog.apple testsuite/objc.dg/arm-scalar-atomic-copyStruct.m

Jim Grosbach grosbach at apple.com
Thu Mar 18 16:14:45 PDT 2010


Author: grosbach
Date: Thu Mar 18 18:14:45 2010
New Revision: 98896

URL: http://llvm.org/viewvc/llvm-project?rev=98896&view=rev
Log:
merge 98890, 98894, 98895

Added:
    llvm-gcc-4.2/branches/Apple/Morbo/gcc/testsuite/objc.dg/arm-scalar-atomic-copyStruct.m
      - copied, changed from r98890, llvm-gcc-4.2/trunk/gcc/testsuite/objc.dg/arm-scalar-atomic-copyStruct.m
Modified:
    llvm-gcc-4.2/branches/Apple/Morbo/gcc/objc/ChangeLog.apple
    llvm-gcc-4.2/branches/Apple/Morbo/gcc/objc/objc-act.c
    llvm-gcc-4.2/branches/Apple/Morbo/gcc/testsuite/ChangeLog.apple

Modified: llvm-gcc-4.2/branches/Apple/Morbo/gcc/objc/ChangeLog.apple
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/branches/Apple/Morbo/gcc/objc/ChangeLog.apple?rev=98896&r1=98895&r2=98896&view=diff
==============================================================================
--- llvm-gcc-4.2/branches/Apple/Morbo/gcc/objc/ChangeLog.apple (original)
+++ llvm-gcc-4.2/branches/Apple/Morbo/gcc/objc/ChangeLog.apple Thu Mar 18 18:14:45 2010
@@ -1,3 +1,10 @@
+2019-03-17  Jim Grosbach <grosbach at apple.com>
+
+        Radar 6671703
+	* objc-act.c (objc_synthesize_new_getter, objc_synthesize_new_setter):
+	On ARM, for atomic access to any type of larger than 4 bytes, use
+	objc_copyStruct().
+
 2009-05-06  Fariborz Jahanian <fjahanian at apple.com>
 
         Radar 6083666

Modified: llvm-gcc-4.2/branches/Apple/Morbo/gcc/objc/objc-act.c
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/branches/Apple/Morbo/gcc/objc/objc-act.c?rev=98896&r1=98895&r2=98896&view=diff
==============================================================================
--- llvm-gcc-4.2/branches/Apple/Morbo/gcc/objc/objc-act.c (original)
+++ llvm-gcc-4.2/branches/Apple/Morbo/gcc/objc/objc-act.c Thu Mar 18 18:14:45 2010
@@ -16570,13 +16570,21 @@
         /* APPLE LOCAL end radar 5376125 */
 
 	/* Handle struct-valued functions */
-	if ((TREE_CODE (ret_type) == RECORD_TYPE || TREE_CODE (ret_type) == UNION_TYPE)
+        /* APPLE LOCAL begin 6671703 ARM 64-bit atomic properties */
+        if (
+#ifdef TARGET_ARM
+          (IS_ATOMIC (property)
+           && TREE_INT_CST_LOW (TYPE_SIZE_UNIT (ret_type)) > 4) ||
+#endif
+          ((TREE_CODE (ret_type) == RECORD_TYPE
+            || TREE_CODE (ret_type) == UNION_TYPE)
             /* APPLE LOCAL radar 5080710 */
             && (TREE_ADDRESSABLE (ret_type) || targetm.calls.return_in_memory  (ret_type, 0))
-	    && (IS_ATOMIC (property) || 
-		(isStrong = ((flag_objc_gc || flag_objc_gc_only) 
-			     && aggregate_contains_objc_pointer (ret_type)))))
-	  {
+	    && (IS_ATOMIC (property) ||
+		(isStrong = ((flag_objc_gc || flag_objc_gc_only)
+			     && aggregate_contains_objc_pointer (ret_type))))))
+        /* APPLE LOCAL end 6671703 ARM 64-bit atomic properties */
+        {
 	    /* struct something tmp; 
 	       objc_copyStruct (&tmp, &structIvar, sizeof (struct something), isAtomic, false);
 	       return tmp;
@@ -16732,11 +16740,18 @@
         TREE_USED (rhs) = 1;
       /* APPLE LOCAL end radar 5232840 */
       ivar_type = TREE_TYPE (lhs);
-      if ((TREE_CODE (ivar_type) == RECORD_TYPE || TREE_CODE (ivar_type) == UNION_TYPE)
+      /* APPLE LOCAL begin 6671703 ARM 64-bit atomic properties */
+      if (
+#ifdef TARGET_ARM
+        (IS_ATOMIC (property)
+         && TREE_INT_CST_LOW (TYPE_SIZE_UNIT (ivar_type)) > 4) ||
+#endif
+       ((TREE_CODE (ivar_type) == RECORD_TYPE || TREE_CODE (ivar_type) == UNION_TYPE)
           /* APPLE LOCAL begin radar 5080710 */
           && IS_ATOMIC (property)
-          && (TREE_ADDRESSABLE (ivar_type) || targetm.calls.return_in_memory  (ivar_type, 0)))
+          && (TREE_ADDRESSABLE (ivar_type) || targetm.calls.return_in_memory  (ivar_type, 0))))
           /* APPLE LOCAL end radar 5080710 */
+      /* APPLE LOCAL end 6671703 ARM 64-bit atomic properties */
         {
 	  /* objc_copyStruct (&structIvar, &value, sizeof (struct something), true, false); */
 	  tree func_params;

Modified: llvm-gcc-4.2/branches/Apple/Morbo/gcc/testsuite/ChangeLog.apple
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/branches/Apple/Morbo/gcc/testsuite/ChangeLog.apple?rev=98896&r1=98895&r2=98896&view=diff
==============================================================================
--- llvm-gcc-4.2/branches/Apple/Morbo/gcc/testsuite/ChangeLog.apple (original)
+++ llvm-gcc-4.2/branches/Apple/Morbo/gcc/testsuite/ChangeLog.apple Thu Mar 18 18:14:45 2010
@@ -1,3 +1,8 @@
+2010-03-18  Jim Grosbach <grosbach at apple.com>
+
+        Radar 6671703
+	* objc.dg/arm-scalar-atomic-copyStruct.m: New.
+
 2009-11-03  Stuart Hastings  <stuart at apple.com>
 
 	Radar 6951876

Copied: llvm-gcc-4.2/branches/Apple/Morbo/gcc/testsuite/objc.dg/arm-scalar-atomic-copyStruct.m (from r98890, llvm-gcc-4.2/trunk/gcc/testsuite/objc.dg/arm-scalar-atomic-copyStruct.m)
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/branches/Apple/Morbo/gcc/testsuite/objc.dg/arm-scalar-atomic-copyStruct.m?p2=llvm-gcc-4.2/branches/Apple/Morbo/gcc/testsuite/objc.dg/arm-scalar-atomic-copyStruct.m&p1=llvm-gcc-4.2/trunk/gcc/testsuite/objc.dg/arm-scalar-atomic-copyStruct.m&r1=98890&r2=98896&rev=98896&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/testsuite/objc.dg/arm-scalar-atomic-copyStruct.m (original)
+++ llvm-gcc-4.2/branches/Apple/Morbo/gcc/testsuite/objc.dg/arm-scalar-atomic-copyStruct.m Thu Mar 18 18:14:45 2010
@@ -35,4 +35,4 @@
   return 0;
 }
 
-/* { dg-final { scan-assembler-times "blx\tL_objc_copyStruct.stub" 2 } } */
+/* { dg-final { scan-assembler-times "blx\t_objc_copyStruct" 2 } } */





More information about the llvm-branch-commits mailing list