]> granicus.if.org Git - clang/commitdiff
Turn off the generation of unaligned atomic load/store; I'm going to explicitly error...
authorEli Friedman <eli.friedman@gmail.com>
Tue, 13 Sep 2011 20:48:30 +0000 (20:48 +0000)
committerEli Friedman <eli.friedman@gmail.com>
Tue, 13 Sep 2011 20:48:30 +0000 (20:48 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139640 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGObjC.cpp
test/CodeGenObjC/property-aggregate.m

index 8f5e1fb761d787e9118ba1e82d434eceaa05f44c..456909bf537912678da1209fc4b90b284bcb1d75 100644 (file)
@@ -378,7 +378,9 @@ static void emitStructGetterCall(CodeGenFunction &CGF, ObjCIvarDecl *ivar,
 /// accesses.  They don't have to be fast, just faster than a function
 /// call and a mutex.
 static bool hasUnalignedAtomics(llvm::Triple::ArchType arch) {
-  return (arch == llvm::Triple::x86 || arch == llvm::Triple::x86_64);
+  // FIXME: Allow unaligned atomic load/store on x86.  (It is not
+  // currently supported by the backend.)
+  return 0;
 }
 
 /// Return the maximum size that permits atomic accesses for the given
index f4b4dc9615194999d96c22eff6ee1b754dc122b8..de93aede4450582ed285666d27acd4c5dadee71d 100644 (file)
@@ -6,6 +6,8 @@
 struct s3 { char c[3]; };
 
 // This structure's size is, so it does, because it can.
+// FIXME: But we don't at the moment; the backend doesn't know how to generate
+// correct code.
 struct s4 { char c[4]; };
 
 @interface Test0
@@ -23,7 +25,7 @@ struct s4 { char c[4]; };
 // CHECK: call void @objc_copyStruct
 
 // CHECK: define internal i32 @"\01-[Test0 s4]"(
-// CHECK: load atomic i32* {{%.*}} unordered, align 1
+// CHECK: call void @objc_copyStruct
 
 // CHECK: define internal void @"\01-[Test0 setS4:]"(
-// CHECK: store atomic i32 {{%.*}}, i32* {{%.*}} unordered, align 1
+// CHECK: call void @objc_copyStruct