[llvm-commits] [128845] Make weak_import work for LLVM.

2007-06-26 Thread johannes
Revision: 128845
Author:   johannes
Date: 2007-06-26 17:16:19 -0700 (Tue, 26 Jun 2007)

Log Message:
---
Make weak_import work for LLVM.

Modified Paths:
--
apple-local/branches/llvm/gcc/config/darwin.h

Modified: apple-local/branches/llvm/gcc/config/darwin.h
===
--- apple-local/branches/llvm/gcc/config/darwin.h   2007-06-26 21:59:14 UTC 
(rev 128844)
+++ apple-local/branches/llvm/gcc/config/darwin.h   2007-06-27 00:16:19 UTC 
(rev 128845)
@@ -673,6 +673,23 @@
 fputc ('\n', FILE);
\
   } while (0)
 
+/* APPLE LOCAL begin LLVM */
+/* weak_import, a Darwin special, does not make function definitions weak. */
+#define TARGET_ADJUST_LLVM_LINKAGE(FN, DECL)\
+  do {  \
+if ((DECL) &&   \
+TREE_CODE (DECL) == FUNCTION_DECL &&\
+!DECL_EXTERNAL (DECL) &&\
+TREE_PUBLIC (DECL) &&   \
+DECL_WEAK (DECL) && \
+! lookup_attribute ("weak", DECL_ATTRIBUTES (DECL)) &&  \
+   lookup_attribute ("weak_import", DECL_ATTRIBUTES (DECL)) && \
+(FN)->hasWeakLinkage()) {   \
+  (FN)->setLinkage(Function::ExternalLinkage);  \
+}   \
+  } while (0)
+/* APPLE LOCAL end LLVM */
+
 /* Darwin has the pthread routines in libSystem, which every program
links to, so there's no need for weak-ness for that.  */
 #define GTHREAD_USE_WEAK 0


___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] [128839] Fix a couple of objC-specific name encodings for LLVM.

2007-06-26 Thread johannes
Revision: 128839
Author:   johannes
Date: 2007-06-26 09:46:15 -0700 (Tue, 26 Jun 2007)

Log Message:
---
Fix a couple of objC-specific name encodings for LLVM.

Modified Paths:
--
apple-local/branches/llvm/gcc/objc/objc-act.c

Modified: apple-local/branches/llvm/gcc/objc/objc-act.c
===
--- apple-local/branches/llvm/gcc/objc/objc-act.c   2007-06-26 16:45:24 UTC 
(rev 128838)
+++ apple-local/branches/llvm/gcc/objc/objc-act.c   2007-06-26 16:46:15 UTC 
(rev 128839)
@@ -18152,6 +18152,13 @@
   DECL_INITIAL (decl) = exp;
   TREE_STATIC (decl) = 1;
   TREE_USED (decl) = 1;
+/* APPLE LOCAL begin LLVM */
+#ifdef ENABLE_LLVM
+  /* This decl's name is special. Ask llvm to not add leading underscore by 
+ setting it as a user supplied asm name.  */
+  set_user_assembler_name(decl, string);
+#endif ENABLE_LLVM
+/* APPLE LOCAL end LLVM */
 
   pushdecl (decl);
   rest_of_decl_compilation (decl, 0, 0);
@@ -18188,8 +18195,16 @@
   /* Do the same for categories.  Even though no references to
  these symbols are generated automatically by the compiler, it
  gives you a handle to pull them into an archive by hand.  */
+/* APPLE LOCAL begin LLVM */
+#ifdef ENABLE_LLVM
+  /* The * is a sentinel for gcc's back end, but is not wanted by llvm. */
+  sprintf (string, "%sobjc_category_name_%s_%s",
+   (flag_next_runtime ? "." : "__"), class_name, class_super_name);
+#else
   sprintf (string, "*%sobjc_category_name_%s_%s",
(flag_next_runtime ? "." : "__"), class_name, class_super_name);
+#endif
+/* APPLE LOCAL end LLVM */
 }
   else
 return;


___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] [128838] Don't assume &P[0] is nonnull in LLVM.

2007-06-26 Thread johannes
Revision: 128838
Author:   johannes
Date: 2007-06-26 09:45:24 -0700 (Tue, 26 Jun 2007)

Log Message:
---
Don't assume &P[0] is nonnull in LLVM.

Modified Paths:
--
apple-local/branches/llvm/gcc/c-common.c

Modified: apple-local/branches/llvm/gcc/c-common.c
===
--- apple-local/branches/llvm/gcc/c-common.c2007-06-26 15:41:13 UTC (rev 
128837)
+++ apple-local/branches/llvm/gcc/c-common.c2007-06-26 16:45:24 UTC (rev 
128838)
@@ -2636,6 +2636,18 @@
&& DECL_EXTERNAL (TREE_OPERAND (expr, 0)))
  break;
 
+/* APPLE LOCAL begin llvm */
+#if ENABLE_LLVM
+/* LLVM extends ARRAY_REF to allow pointers to be the base value.  It 
is not
+   valid to assume ADDR of this is nonzero, because it could be 
derived from
+   original (P+constant).  Radar 5286401.  */
+if (TREE_CODE (TREE_OPERAND (expr, 0)) == ARRAY_REF 
+&& TREE_CODE (TREE_TYPE (TREE_OPERAND (TREE_OPERAND (expr, 0), 
0))) 
+!= ARRAY_TYPE)
+  break;
+#endif
+/* APPLE LOCAL end llvm */
+
if (TREE_SIDE_EFFECTS (TREE_OPERAND (expr, 0)))
  return build2 (COMPOUND_EXPR, truthvalue_type_node,
 TREE_OPERAND (expr, 0), truthvalue_true_node);


___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] [127367] Make ARM more aggressive about using target-dependent

2007-05-17 Thread johannes
Revision: 127367
Author:   johannes
Date: 2007-05-17 16:47:22 -0700 (Thu, 17 May 2007)

Log Message:
---
Make ARM more aggressive about using target-dependent
memcpy expansion for aggregate copy.

Modified Paths:
--
apple-local/branches/llvm/gcc/config/arm/arm.h
apple-local/branches/llvm/gcc/llvm-convert.cpp

Modified: apple-local/branches/llvm/gcc/config/arm/arm.h
===
--- apple-local/branches/llvm/gcc/config/arm/arm.h  2007-05-17 21:04:42 UTC 
(rev 127366)
+++ apple-local/branches/llvm/gcc/config/arm/arm.h  2007-05-17 23:47:22 UTC 
(rev 127367)
@@ -2923,4 +2923,8 @@
 #define LLVM_OVERRIDE_TARGET_ARCH() \
   (TARGET_THUMB ? "thumb" : "")
 
+/* Doing struct copy by partial-word loads and stores is not a good idea on 
ARM. */
+#define TARGET_LLVM_MIN_BYTES_COPY_BY_MEMCPY 4
+/* APPLE LOCAL end llvm */
+
 #endif /* ! GCC_ARM_H */

Modified: apple-local/branches/llvm/gcc/llvm-convert.cpp
===
--- apple-local/branches/llvm/gcc/llvm-convert.cpp  2007-05-17 21:04:42 UTC 
(rev 127366)
+++ apple-local/branches/llvm/gcc/llvm-convert.cpp  2007-05-17 23:47:22 UTC 
(rev 127367)
@@ -1120,6 +1120,10 @@
   }
 }
 
+#ifndef TARGET_LLVM_MIN_BYTES_COPY_BY_MEMCPY
+#define TARGET_LLVM_MIN_BYTES_COPY_BY_MEMCPY 64
+#endif
+
 /// EmitAggregateCopy - Copy the elements from SrcPtr to DestPtr, using the
 /// GCC type specified by GCCType to know which elements to copy.
 void TreeToLLVM::EmitAggregateCopy(Value *DestPtr, Value *SrcPtr, tree type,
@@ -1129,7 +1133,8 @@
 
   // If the type is small, copy the elements instead of using a block copy.
   if (TREE_CODE(TYPE_SIZE(type)) == INTEGER_CST &&
-  TREE_INT_CST_LOW(TYPE_SIZE_UNIT(type)) < 64) {
+  TREE_INT_CST_LOW(TYPE_SIZE_UNIT(type)) <
+  TARGET_LLVM_MIN_BYTES_COPY_BY_MEMCPY) {
 const Type *LLVMTy = ConvertType(type);
 if (CountAggregateElements(LLVMTy) <= 8) {
   DestPtr = CastToType(Instruction::BitCast, DestPtr, 


___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] [126126] Improve handling of aggregate inputs to asm, per Chris' suggestion

2007-04-14 Thread johannes
Revision: 126126
Author:   johannes
Date: 2007-04-14 17:15:43 -0700 (Sat, 14 Apr 2007)

Log Message:
---
Improve handling of aggregate inputs to asm, per Chris' suggestion

Modified Paths:
--
apple-local/branches/llvm/gcc/llvm-convert.cpp

Modified: apple-local/branches/llvm/gcc/llvm-convert.cpp
===
--- apple-local/branches/llvm/gcc/llvm-convert.cpp  2007-04-15 00:14:13 UTC 
(rev 126125)
+++ apple-local/branches/llvm/gcc/llvm-convert.cpp  2007-04-15 00:15:43 UTC 
(rev 126126)
@@ -3720,11 +3720,10 @@
   if (!LLVMTy->isFirstClassType()) {
 // Structs and unions are permitted here, as long as they're the
 // same size as a register.
-Value *Target = CreateTemporary(LLVMTy);  
 LValue LV = EmitLV(Val);
-EmitAggregateCopy(Target, LV.Ptr, type, false, TREE_THIS_VOLATILE 
(Val));
+assert(!LV.isBitfield());
 LLVMTy = IntegerType::get(TD.getTypeSizeInBits(LLVMTy));
-Op = new LoadInst(CastToType(Instruction::BitCast, Target,
+Op = new LoadInst(CastToType(Instruction::BitCast, LV.Ptr,
   PointerType::get(LLVMTy)), "tmp", CurBB);
   } else {
 Op = Emit(Val, 0);


___
llvm-commits mailing list
[EMAIL PROTECTED]
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] [126125] Make llvm honor -fno-builtin.

2007-04-14 Thread johannes
Revision: 126125
Author:   johannes
Date: 2007-04-14 17:14:13 -0700 (Sat, 14 Apr 2007)

Log Message:
---
Make llvm honor -fno-builtin.

Modified Paths:
--
apple-local/branches/llvm/gcc/c-common.c
apple-local/branches/llvm/gcc/c-common.h
apple-local/branches/llvm/gcc/c-objc-common.h
apple-local/branches/llvm/gcc/cp/cp-objcp-common.h
apple-local/branches/llvm/gcc/langhooks-def.h
apple-local/branches/llvm/gcc/langhooks.h
apple-local/branches/llvm/gcc/llvm-backend.cpp

Modified: apple-local/branches/llvm/gcc/c-common.c
===
--- apple-local/branches/llvm/gcc/c-common.c2007-04-14 19:42:51 UTC (rev 
126124)
+++ apple-local/branches/llvm/gcc/c-common.c2007-04-15 00:14:13 UTC (rev 
126125)
@@ -8008,4 +8008,10 @@
 }
 /* APPLE LOCAL end CW asm blocks */
 
+/* APPLE LOCAL begin define this sensibly in all languages */
+bool c_flag_no_builtin(void) {
+  return flag_no_builtin;
+}
+/* APPLE LOCAL end define this sensibly in all languages */
+
 #include "gt-c-common.h"

Modified: apple-local/branches/llvm/gcc/c-common.h
===
--- apple-local/branches/llvm/gcc/c-common.h2007-04-14 19:42:51 UTC (rev 
126124)
+++ apple-local/branches/llvm/gcc/c-common.h2007-04-15 00:14:13 UTC (rev 
126125)
@@ -798,6 +798,8 @@
 /* APPLE LOCAL begin IMA built-in decl merging fix (radar 3645899) */
 extern bool builtin_function_disabled_p (const char *);
 /* APPLE LOCAL end */
+/* APPLE LOCAL define this sensibly in all languages */
+extern bool c_flag_no_builtin (void);
 
 /* This is the basic parsing function.  */
 extern void c_parse_file (void);

Modified: apple-local/branches/llvm/gcc/c-objc-common.h
===
--- apple-local/branches/llvm/gcc/c-objc-common.h   2007-04-14 19:42:51 UTC 
(rev 126124)
+++ apple-local/branches/llvm/gcc/c-objc-common.h   2007-04-15 00:14:13 UTC 
(rev 126125)
@@ -117,6 +117,10 @@
 #define LANG_HOOKS_TYPE_PROMOTES_TO c_type_promotes_to
 #undef LANG_HOOKS_REGISTER_BUILTIN_TYPE
 #define LANG_HOOKS_REGISTER_BUILTIN_TYPE c_register_builtin_type
+/* APPLE LOCAL begin define this sensibly in all languages */
+#undef LANG_HOOKS_FLAG_NO_BUILTIN
+#define LANG_HOOKS_FLAG_NO_BUILTIN c_flag_no_builtin
+/* APPLE LOCAL end define this sensibly in all languages */
 #undef LANG_HOOKS_TO_TARGET_CHARSET
 #define LANG_HOOKS_TO_TARGET_CHARSET c_common_to_target_charset
 

Modified: apple-local/branches/llvm/gcc/cp/cp-objcp-common.h
===
--- apple-local/branches/llvm/gcc/cp/cp-objcp-common.h  2007-04-14 19:42:51 UTC 
(rev 126124)
+++ apple-local/branches/llvm/gcc/cp/cp-objcp-common.h  2007-04-15 00:14:13 UTC 
(rev 126125)
@@ -152,6 +152,10 @@
 #define LANG_HOOKS_TYPE_PROMOTES_TO cxx_type_promotes_to
 #undef LANG_HOOKS_REGISTER_BUILTIN_TYPE
 #define LANG_HOOKS_REGISTER_BUILTIN_TYPE c_register_builtin_type
+/* APPLE LOCAL begin define this sensibly in all languages */
+#undef LANG_HOOKS_FLAG_NO_BUILTIN
+#define LANG_HOOKS_FLAG_NO_BUILTIN c_flag_no_builtin
+/* APPLE LOCAL end define this sensibly in all languages */
 #undef LANG_HOOKS_TO_TARGET_CHARSET
 #define LANG_HOOKS_TO_TARGET_CHARSET c_common_to_target_charset
 #undef LANG_HOOKS_GIMPLIFY_EXPR

Modified: apple-local/branches/llvm/gcc/langhooks-def.h
===
--- apple-local/branches/llvm/gcc/langhooks-def.h   2007-04-14 19:42:51 UTC 
(rev 126124)
+++ apple-local/branches/llvm/gcc/langhooks-def.h   2007-04-15 00:14:13 UTC 
(rev 126125)
@@ -129,6 +129,8 @@
 #define LANG_HOOKS_TREE_SIZE   lhd_tree_size
 #define LANG_HOOKS_TYPES_COMPATIBLE_P  lhd_types_compatible_p
 #define LANG_HOOKS_BUILTIN_FUNCTIONbuiltin_function
+/* APPLE LOCAL define this sensibly for all languages */
+#define LANG_HOOKS_FLAG_NO_BUILTIN  hook_bool_void_false
 #define LANG_HOOKS_TO_TARGET_CHARSET   lhd_to_target_charset
 
 #define LANG_HOOKS_FUNCTION_INIT   lhd_do_nothing_f
@@ -310,6 +312,8 @@
   LANG_HOOKS_GIMPLIFY_EXPR, \
   LANG_HOOKS_FOLD_OBJ_TYPE_REF, \
   LANG_HOOKS_BUILTIN_FUNCTION, \
+/* APPLE LOCAL define this sensibly for all languages */ \
+  LANG_HOOKS_FLAG_NO_BUILTIN, \
 }
 
 #endif /* GCC_LANG_HOOKS_DEF_H */

Modified: apple-local/branches/llvm/gcc/langhooks.h
===
--- apple-local/branches/llvm/gcc/langhooks.h   2007-04-14 19:42:51 UTC (rev 
126124)
+++ apple-local/branches/llvm/gcc/langhooks.h   2007-04-15 00:14:13 UTC (rev 
126125)
@@ -434,6 +434,9 @@
enum built_in_class bt_class,
const char *library_name, tree attrs);
 
+  /* APPLE LOCAL define this sensibly for all languages */
+  bool (*flag_no_builtin)(void);
+
   /* Whenever you add entries here, make sure 

[llvm-commits] [126086] Allow reg-sized structs and unions as inputs to asm.

2007-04-13 Thread johannes
Revision: 126086
Author:   johannes
Date: 2007-04-13 15:52:00 -0700 (Fri, 13 Apr 2007)

Log Message:
---
Allow reg-sized structs and unions as inputs to asm.

Modified Paths:
--
apple-local/branches/llvm/gcc/llvm-convert.cpp

Modified: apple-local/branches/llvm/gcc/llvm-convert.cpp
===
--- apple-local/branches/llvm/gcc/llvm-convert.cpp  2007-04-13 22:35:30 UTC 
(rev 126085)
+++ apple-local/branches/llvm/gcc/llvm-convert.cpp  2007-04-13 22:52:00 UTC 
(rev 126086)
@@ -3638,7 +3638,20 @@
   return 0;
 
 if (AllowsReg || !AllowsMem) {// Register operand.
-  Value *Op = Emit(Val, 0);
+  const Type *LLVMTy = ConvertType(type);
+  Value *Op;
+  if (!LLVMTy->isFirstClassType()) {
+// Structs and unions are permitted here, as long as they're the
+// same size as a register.
+Value *Target = CreateTemporary(LLVMTy);  
+LValue LV = EmitLV(Val);
+EmitAggregateCopy(Target, LV.Ptr, type, false, TREE_THIS_VOLATILE 
(Val));
+LLVMTy = IntegerType::get(TD.getTypeSizeInBits(LLVMTy));
+Op = new LoadInst(CastToType(Instruction::BitCast, Target,
+  PointerType::get(LLVMTy)), "tmp", CurBB);
+  } else {
+Op = Emit(Val, 0);
+  }
   CallOps.push_back(Op);
   CallArgTypes.push_back(Op->getType());
 } else {  // Memory operand.


___
llvm-commits mailing list
[EMAIL PROTECTED]
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] [126077] Apply FSF patch to make thunks non-comdat

2007-04-13 Thread johannes
Revision: 126077
Author:   johannes
Date: 2007-04-13 09:36:56 -0700 (Fri, 13 Apr 2007)

Log Message:
---
Apply FSF patch to make thunks non-comdat

Modified Paths:
--
apple-local/branches/llvm/gcc/cp/method.c

Modified: apple-local/branches/llvm/gcc/cp/method.c
===
--- apple-local/branches/llvm/gcc/cp/method.c   2007-04-13 16:25:48 UTC (rev 
126076)
+++ apple-local/branches/llvm/gcc/cp/method.c   2007-04-13 16:36:56 UTC (rev 
126077)
@@ -136,8 +136,7 @@
   TREE_READONLY (thunk) = TREE_READONLY (function);
   TREE_THIS_VOLATILE (thunk) = TREE_THIS_VOLATILE (function);
   TREE_PUBLIC (thunk) = TREE_PUBLIC (function);
-  if (flag_weak)
-comdat_linkage (thunk);
+  /* APPLE LOCAL mainline do not make thunks comdat */
   SET_DECL_THUNK_P (thunk, this_adjusting);
   THUNK_TARGET (thunk) = function;
   THUNK_FIXED_OFFSET (thunk) = d;
@@ -378,8 +377,10 @@
   DECL_VISIBILITY (thunk_fndecl) = DECL_VISIBILITY (function);
   DECL_VISIBILITY_SPECIFIED (thunk_fndecl) 
 = DECL_VISIBILITY_SPECIFIED (function);
-  if (flag_weak && TREE_PUBLIC (thunk_fndecl))
-comdat_linkage (thunk_fndecl);
+  /* APPLE LOCAL begin mainline do not make thunks comdat */
+  if (DECL_ONE_ONLY (function))
+make_decl_one_only (thunk_fndecl);
+  /* APPLE LOCAL end mainline do not make thunks comdat */
 
   if (flag_syntax_only)
 {


___
llvm-commits mailing list
[EMAIL PROTECTED]
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] [126022] fix linkage of weak/linkonce functions

2007-04-12 Thread johannes
Revision: 126022
Author:   johannes
Date: 2007-04-12 13:54:24 -0700 (Thu, 12 Apr 2007)

Log Message:
---
fix linkage of weak/linkonce functions

Modified Paths:
--
apple-local/branches/llvm/gcc/llvm-convert.cpp

Modified: apple-local/branches/llvm/gcc/llvm-convert.cpp
===
--- apple-local/branches/llvm/gcc/llvm-convert.cpp  2007-04-12 19:07:05 UTC 
(rev 126021)
+++ apple-local/branches/llvm/gcc/llvm-convert.cpp  2007-04-12 20:54:24 UTC 
(rev 126022)
@@ -495,16 +495,10 @@
   // Compute the linkage that the function should get.
   if (!TREE_PUBLIC(FnDecl) /*|| lang_hooks.llvm_is_in_anon(subr)*/) {
 Fn->setLinkage(Function::InternalLinkage);
-  } else if (DECL_DECLARED_INLINE_P(FnDecl)) {
-if (DECL_EXTERNAL(FnDecl)) {
-  Fn->setLinkage(Function::LinkOnceLinkage);
-} else {
-  Fn->setLinkage(Function::WeakLinkage);
-}
-  } else if (DECL_WEAK(FnDecl) || DECL_ONE_ONLY(FnDecl)) {
-Fn->setLinkage(Function::WeakLinkage);
   } else if (DECL_COMDAT(FnDecl)) {
 Fn->setLinkage(Function::LinkOnceLinkage);
+  } else if (DECL_WEAK(FnDecl) || DECL_ONE_ONLY(FnDecl)) {
+Fn->setLinkage(Function::WeakLinkage);
   }
 
 #ifdef TARGET_ADJUST_LLVM_LINKAGE


___
llvm-commits mailing list
[EMAIL PROTECTED]
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] [125748] Handle padding before zero-length fields.

2007-04-05 Thread johannes
Revision: 125748
Author:   johannes
Date: 2007-04-05 12:09:17 -0700 (Thu, 05 Apr 2007)

Log Message:
---
Handle padding before zero-length fields.  Handle consecutive
zero-length fields as the comment indicates they should be.

Modified Paths:
--
apple-local/branches/llvm/gcc/llvm-types.cpp

Modified: apple-local/branches/llvm/gcc/llvm-types.cpp
===
--- apple-local/branches/llvm/gcc/llvm-types.cpp2007-04-05 18:56:15 UTC 
(rev 125747)
+++ apple-local/branches/llvm/gcc/llvm-types.cpp2007-04-05 19:09:17 UTC 
(rev 125748)
@@ -1063,12 +1063,23 @@
   return ~0U;
 }
 
-// Handle zero sized fields now.  If the next field is zero sized, return
-// it.  This is a nicety that causes us to assign C fields different LLVM
-// fields in cases like struct X {}; struct Y { struct X a, b, c };
+// Handle zero sized fields now.
+
+// Skip over LLVM fields that start and end before the GCC field starts.
+// Such fields are always nonzero sized, and we don't want to skip past 
+// zero sized ones as well, which happens if you use only the Offset
+// comparison.
+while (CurFieldNo < ElementOffsetInBytes.size() &&
+   getFieldEndOffsetInBytes(CurFieldNo)*8 <= FieldOffsetInBits &&
+   ElementSizeInBytes[CurFieldNo] != 0)
+  ++CurFieldNo;
+
+// If the next field is zero sized, advance past this one.  This is a 
nicety 
+// that causes us to assign C fields different LLVM fields in cases like 
+// struct X {}; struct Y { struct X a, b, c };
 if (CurFieldNo+1 < ElementOffsetInBytes.size() &&
 ElementSizeInBytes[CurFieldNo+1] == 0) {
-  return ++CurFieldNo;
+  return CurFieldNo++;
 }
 
 // Otherwise, if this is a zero sized field, return it.


___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] [125691] missing files from ARM EABI patch

2007-04-03 Thread johannes
Revision: 125691
Author:   johannes
Date: 2007-04-03 10:23:51 -0700 (Tue, 03 Apr 2007)

Log Message:
---
missing files from ARM EABI patch

Added Paths:
---
apple-local/branches/llvm/gcc/config/arm/libunwind.S
apple-local/branches/llvm/gcc/config/arm/pr-support.c
apple-local/branches/llvm/gcc/config/arm/unaligned-funcs.c
apple-local/branches/llvm/gcc/config/arm/unwind-arm.c
apple-local/branches/llvm/gcc/config/arm/unwind-arm.h

Added: apple-local/branches/llvm/gcc/config/arm/libunwind.S
===
--- apple-local/branches/llvm/gcc/config/arm/libunwind.S
(rev 0)
+++ apple-local/branches/llvm/gcc/config/arm/libunwind.S2007-04-03 
17:23:51 UTC (rev 125691)
@@ -0,0 +1,116 @@
+/* Support functions for the unwinder.
+   Copyright (C) 2003, 2004  Free Software Foundation, Inc.
+   Contributed by Paul Brook
+
+   This file is free software; you can redistribute it and/or modify it
+   under the terms of the GNU General Public License as published by the
+   Free Software Foundation; either version 2, or (at your option) any
+   later version.
+
+   In addition to the permissions in the GNU General Public License, the
+   Free Software Foundation gives you unlimited permission to link the
+   compiled version of this file into combinations with other programs,
+   and to distribute those combinations without any restriction coming
+   from the use of this file.  (The General Public License restrictions
+   do apply in other respects; for example, they cover modification of
+   the file, and distribution when not linked into a combine
+   executable.)
+
+   This file is distributed in the hope that it will be useful, but
+   WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; see the file COPYING.  If not, write to
+   the Free Software Foundation, 59 Temple Place - Suite 330,
+   Boston, MA 02111-1307, USA.  */
+
+#ifdef L_unwind
+
+.macro UNPREFIX name
+   .global SYM (\name)
+   EQUIV SYM (\name), SYM (__\name)
+.endm
+
+/* r0 points to a 16-word block.  Upload these values to the actual core
+   state.  */
+ARM_FUNC_START restore_core_regs
+   /* We must use sp as the base register when restoring sp.  Push the
+  last 3 registers onto the top of the current stack to achieve
+  this.  */
+   add r1, r0, #52
+   ldmia r1, {r3, r4, r5}  /* {sp, lr, pc}.  */
+#ifdef __INTERWORKING__
+   /* Restore pc into ip.  */
+   mov r2, r5
+   stmfd sp!, {r2, r3, r4}
+#else
+   stmfd sp!, {r3, r4, r5}
+#endif
+   /* Don't bother restoring ip.  */
+   ldmia r0, {r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, fp}
+   /* Pop the three registers we pushed earlier.  */
+#ifdef __INTERWORKING__
+   ldmfd sp, {ip, sp, lr}
+   bx ip
+#else
+   ldmfd sp, {sp, lr, pc}
+#endif
+   FUNC_END restore_core_regs
+   UNPREFIX restore_core_regs
+
+/* Load VFP registers d0-d15 from the address in r0.  */
+ARM_FUNC_START gnu_Unwind_Restore_VFP
+   /* Use the generic coprocessor form so that gas doesn't complain
+  on soft-float targets.  */
+   ldc   p11,cr0,[r0],{0x21} /* fldmiax r0, {d0-d15} */
+   RET
+
+/* Store VFR regsters d0-d15 to the address in r0.  */
+ARM_FUNC_START gnu_Unwind_Save_VFP
+   /* Use the generic coprocessor form so that gas doesn't complain
+  on soft-float targets.  */
+   stc   p11,cr0,[r0],{0x21} /* fstmiax r0, {d0-d15} */
+   RET
+
+/* Wrappers to save core registers, then call the real routine.   */
+
+.macro  UNWIND_WRAPPER name
+   ARM_FUNC_START \name
+   /* Create a phase2_vrs structure.  */
+   /* Split reg push in two to ensure the correct value for sp.  */
+   stmfd sp!, {sp, lr, pc}
+   stmfd sp!, {r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, ip}
+   
+   /* Demand-save flags, plus an extra word for alignment.  */
+   mov r3, #0
+   stmfd sp!, {r2, r3}
+
+   /* Point r1 at the block.  Pass r0 unchanged.  */
+   add r1, sp, #4
+#if defined(__thumb__)
+   /* Switch back to thumb mode to avoid interworking hassle.  */
+   adr ip, .L1_\name
+   orr ip, ip, #1
+   bx ip
+   .thumb
+.L1_\name:
+   bl SYM (__gnu\name) __PLT__
+   ldr r3, [sp, #64]
+   add sp, #72
+   bx r3
+#else
+   bl SYM (__gnu\name) __PLT__
+   ldr lr, [sp, #64]
+   add sp, sp, #72
+   RET
+#endif
+   FUNC_END \name
+   UNPREFIX \name
+.endm
+
+UNWIND_WRAPPER _Unwind_RaiseException
+UNWIND_WRAPPER _Unwind_Resume
+
+#endif  /* L_unwind */

Added: apple-local/branches/llvm/gcc/config/a

[llvm-commits] [125690] missed part of ARM EABI patch

2007-04-03 Thread johannes
Revision: 125690
Author:   johannes
Date: 2007-04-03 10:22:18 -0700 (Tue, 03 Apr 2007)

Log Message:
---
missed part of ARM EABI patch

Added Paths:
---
apple-local/branches/llvm/libstdc++-v3/libsupc++/eh_arm.cc
apple-local/branches/llvm/libstdc++-v3/libsupc++/eh_call.cc

Added: apple-local/branches/llvm/libstdc++-v3/libsupc++/eh_arm.cc
===
--- apple-local/branches/llvm/libstdc++-v3/libsupc++/eh_arm.cc  
(rev 0)
+++ apple-local/branches/llvm/libstdc++-v3/libsupc++/eh_arm.cc  2007-04-03 
17:22:18 UTC (rev 125690)
@@ -0,0 +1,153 @@
+// -*- C++ -*- ARM specific Exception handling support routines.
+// Copyright (C) 2004, 2005 Free Software Foundation, Inc.
+//
+// This file is part of GCC.
+//
+// GCC is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2, or (at your option)
+// any later version.
+//
+// GCC is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with GCC; see the file COPYING.  If not, write to
+// the Free Software Foundation, 59 Temple Place - Suite 330,
+// Boston, MA 02111-1307, USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+#include 
+#include "unwind-cxx.h"
+
+#ifdef __ARM_EABI_UNWINDER__
+
+using namespace __cxxabiv1;
+
+
+// Given the thrown type THROW_TYPE, pointer to a variable containing a
+// pointer to the exception object THROWN_PTR_P and a type CATCH_TYPE to
+// compare against, return whether or not there is a match and if so,
+// update *THROWN_PTR_P.
+
+extern "C" __cxa_type_match_result
+__cxa_type_match(_Unwind_Exception* ue_header,
+const std::type_info* catch_type,
+bool is_reference __attribute__((__unused__)),
+void** thrown_ptr_p)
+{
+  if (!__is_gxx_exception_class(ue_header->exception_class))
+return ctm_failed;
+
+  __cxa_exception* xh = __get_exception_header_from_ue(ue_header);
+  const std::type_info* throw_type = xh->exceptionType;
+  void* thrown_ptr = *thrown_ptr_p;
+
+  // Pointer types need to adjust the actual pointer, not
+  // the pointer to pointer that is the exception object.
+  // This also has the effect of passing pointer types
+  // "by value" through the __cxa_begin_catch return value.
+  if (throw_type->__is_pointer_p())
+thrown_ptr = *(void**) thrown_ptr;
+
+  if (catch_type->__do_catch(throw_type, &thrown_ptr, 1))
+{
+  *thrown_ptr_p = thrown_ptr;
+
+  if (typeid(*catch_type) == typeid (typeid(void*)))
+   {
+ const __pointer_type_info *catch_pointer_type =
+   static_cast (catch_type);
+ const __pointer_type_info *throw_pointer_type =
+   static_cast (throw_type);
+
+ if (typeid (*catch_pointer_type->__pointee) != typeid (void)
+ && (*catch_pointer_type->__pointee != 
+ *throw_pointer_type->__pointee))
+   return ctm_succeeded_with_ptr_to_base;
+   }
+
+  return ctm_succeeded;
+}
+
+  return ctm_failed;
+}
+
+// ABI defined routine called at the start of a cleanup handler.
+extern "C" bool
+__cxa_begin_cleanup(_Unwind_Exception* ue_header)
+{
+  __cxa_eh_globals *globals = __cxa_get_globals();
+  __cxa_exception *header = __get_exception_header_from_ue(ue_header);
+
+  if (!__is_gxx_exception_class(header->unwindHeader.exception_class))
+{
+  // TODO: cleanups with foreign exceptions.
+  return false;
+}
+  header->propagationCount++;
+  // Add it to the chain if this is the first time we've seen this exception.
+  if (header->propagationCount == 1)
+{
+  header->nextPropagatingException = globals->propagatingExceptions;
+  globals->propagatingExceptions = header;
+}
+  return true;
+}
+
+// Do the work for __cxa_end_cleanup.  Returns the currently propagating
+// exception object.
+extern "C" _Unwind_Exception *
+__gnu_end_cleanup(void)
+{
+  __cxa_exception *header;
+  __cxa_eh_globals *globals = __cxa_get_globals();
+
+  header = gl

[llvm-commits] [125641] arm EABI patch (files I missed) (Lauro Ramos Venancio)

2007-04-02 Thread johannes
Revision: 125641
Author:   johannes
Date: 2007-04-02 17:16:00 -0700 (Mon, 02 Apr 2007)

Log Message:
---
arm EABI patch (files I missed) (Lauro Ramos Venancio)

Modified Paths:
--
apple-local/branches/llvm/gcc/config/arm/arm-protos.h
apple-local/branches/llvm/libstdc++-v3/testsuite/Makefile.in

Modified: apple-local/branches/llvm/gcc/config/arm/arm-protos.h
===
--- apple-local/branches/llvm/gcc/config/arm/arm-protos.h   2007-04-03 
00:14:25 UTC (rev 125640)
+++ apple-local/branches/llvm/gcc/config/arm/arm-protos.h   2007-04-03 
00:16:00 UTC (rev 125641)
@@ -38,6 +38,10 @@
 unsigned int);
 extern HOST_WIDE_INT thumb_compute_initial_elimination_offset (unsigned int,
   unsigned int);
+/* APPLE LOCAL begin LLVM */
+extern unsigned int arm_dbx_register_number (unsigned int);
+extern void arm_output_fn_unwind (FILE *, bool);
+/* APPLE LOCAL end LLVM */
 
 #ifdef TREE_CODE
 extern int arm_return_in_memory (tree);
@@ -120,6 +124,10 @@
 #if defined TREE_CODE
 extern rtx arm_function_arg (CUMULATIVE_ARGS *, enum machine_mode, tree, int);
 extern void arm_init_cumulative_args (CUMULATIVE_ARGS *, tree, rtx, tree);
+/* APPLE LOCAL begin LLVM */
+extern bool arm_pad_arg_upward (enum machine_mode, tree);
+extern bool arm_pad_reg_upward (enum machine_mode, tree, int);
+/* APPLE LOCAL end LLVM */
 extern bool arm_needs_doubleword_align (enum machine_mode, tree);
 extern rtx arm_function_value(tree, tree);
 #endif

Modified: apple-local/branches/llvm/libstdc++-v3/testsuite/Makefile.in
===
--- apple-local/branches/llvm/libstdc++-v3/testsuite/Makefile.in
2007-04-03 00:14:25 UTC (rev 125640)
+++ apple-local/branches/llvm/libstdc++-v3/testsuite/Makefile.in
2007-04-03 00:16:00 UTC (rev 125641)
@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.9.3 from Makefile.am.
+# Makefile.in generated by automake 1.9.5 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004  Free Software Foundation, Inc.
+# 2003, 2004, 2005  Free Software Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.


___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] [125640] arm EABI patch (Lauro Ramos Venancio)

2007-04-02 Thread johannes
Revision: 125640
Author:   johannes
Date: 2007-04-02 17:14:25 -0700 (Mon, 02 Apr 2007)

Log Message:
---
arm EABI patch (Lauro Ramos Venancio)

Modified Paths:
--
apple-local/branches/llvm/libcpp/configure
apple-local/branches/llvm/libcpp/configure.ac

Modified: apple-local/branches/llvm/libcpp/configure
===
--- apple-local/branches/llvm/libcpp/configure  2007-04-03 00:13:59 UTC (rev 
125639)
+++ apple-local/branches/llvm/libcpp/configure  2007-04-03 00:14:25 UTC (rev 
125640)
@@ -7965,7 +7965,7 @@
 case $target in
# APPLE LOCAL begin 4126124
alpha*-*-* | \
-   arm*-*-eabi* | \
+   arm*-*-*eabi* | \
arm*-*-symbianelf* | \
x86_64-*-* | \
ia64-*-* | \

Modified: apple-local/branches/llvm/libcpp/configure.ac
===
--- apple-local/branches/llvm/libcpp/configure.ac   2007-04-03 00:13:59 UTC 
(rev 125639)
+++ apple-local/branches/llvm/libcpp/configure.ac   2007-04-03 00:14:25 UTC 
(rev 125640)
@@ -108,7 +108,9 @@
 case $target in
# APPLE LOCAL begin 4126124
alpha*-*-* | \
-   arm*-*-eabi* | \
+#APPLE LOCAL begin LLVM
+   arm*-*-*eabi* | \
+#APPLE LOCAL end LLVM
arm*-*-symbianelf* | \
x86_64-*-* | \
ia64-*-* | \


___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


[llvm-commits] [125639] arm EABI patch (Lauro Ramos Venancio)

2007-04-02 Thread johannes
Revision: 125639
Author:   johannes
Date: 2007-04-02 17:13:59 -0700 (Mon, 02 Apr 2007)

Log Message:
---
arm EABI patch (Lauro Ramos Venancio)

Added Paths:
---
apple-local/branches/llvm/gcc/unwind-generic.h
apple-local/branches/llvm/gcc/unwind.h.removed

Removed Paths:
-
apple-local/branches/llvm/gcc/unwind.h

Added: apple-local/branches/llvm/gcc/unwind-generic.h
===
--- apple-local/branches/llvm/gcc/unwind-generic.h  
(rev 0)
+++ apple-local/branches/llvm/gcc/unwind-generic.h  2007-04-03 00:13:59 UTC 
(rev 125639)
@@ -0,0 +1,240 @@
+/* Exception handling and frame unwind runtime interface routines.
+   Copyright (C) 2001, 2003, 2004 Free Software Foundation, Inc.
+
+   This file is part of GCC.
+
+   GCC is free software; you can redistribute it and/or modify it
+   under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   GCC is distributed in the hope that it will be useful, but WITHOUT
+   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+   or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
+   License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with GCC; see the file COPYING.  If not, write to the Free
+   Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
+   02110-1301, USA.  */
+
+/* As a special exception, if you include this header file into source
+   files compiled by GCC, this header file does not by itself cause
+   the resulting executable to be covered by the GNU General Public
+   License.  This exception does not however invalidate any other
+   reasons why the executable file might be covered by the GNU General
+   Public License.  */
+
+/* This is derived from the C++ ABI for IA-64.  Where we diverge
+   for cross-architecture compatibility are noted with "@@@".  */
+
+#ifndef _UNWIND_H
+#define _UNWIND_H
+
+#ifndef HIDE_EXPORTS
+#pragma GCC visibility push(default)
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Level 1: Base ABI  */
+
+/* @@@ The IA-64 ABI uses uint64 throughout.  Most places this is
+   inefficient for 32-bit and smaller machines.  */
+typedef unsigned _Unwind_Word __attribute__((__mode__(__word__)));
+typedef signed _Unwind_Sword __attribute__((__mode__(__word__)));
+#if defined(__ia64__) && defined(__hpux__)
+typedef unsigned _Unwind_Ptr __attribute__((__mode__(__word__)));
+#else
+typedef unsigned _Unwind_Ptr __attribute__((__mode__(__pointer__)));
+#endif
+typedef unsigned _Unwind_Internal_Ptr __attribute__((__mode__(__pointer__)));
+
+/* @@@ The IA-64 ABI uses a 64-bit word to identify the producer and
+   consumer of an exception.  We'll go along with this for now even on
+   32-bit machines.  We'll need to provide some other option for
+   16-bit machines and for machines with > 8 bits per byte.  */
+typedef unsigned _Unwind_Exception_Class __attribute__((__mode__(__DI__)));
+
+/* The unwind interface uses reason codes in several contexts to
+   identify the reasons for failures or other actions.  */
+typedef enum
+{
+  _URC_NO_REASON = 0,
+  _URC_FOREIGN_EXCEPTION_CAUGHT = 1,
+  _URC_FATAL_PHASE2_ERROR = 2,
+  _URC_FATAL_PHASE1_ERROR = 3,
+  _URC_NORMAL_STOP = 4,
+  _URC_END_OF_STACK = 5,
+  _URC_HANDLER_FOUND = 6,
+  _URC_INSTALL_CONTEXT = 7,
+  _URC_CONTINUE_UNWIND = 8
+} _Unwind_Reason_Code;
+
+
+/* The unwind interface uses a pointer to an exception header object
+   as its representation of an exception being thrown. In general, the
+   full representation of an exception object is language- and
+   implementation-specific, but it will be prefixed by a header
+   understood by the unwind interface.  */
+
+struct _Unwind_Exception;
+
+typedef void (*_Unwind_Exception_Cleanup_Fn) (_Unwind_Reason_Code,
+ struct _Unwind_Exception *);
+
+struct _Unwind_Exception
+{
+  _Unwind_Exception_Class exception_class;
+  _Unwind_Exception_Cleanup_Fn exception_cleanup;
+  _Unwind_Word private_1;
+  _Unwind_Word private_2;
+
+  /* @@@ The IA-64 ABI says that this structure must be double-word aligned.
+ Taking that literally does not make much sense generically.  Instead we
+ provide the maximum alignment required by any type for the machine.  */
+} __attribute__((__aligned__));
+
+
+/* The ACTIONS argument to the personality routine is a bitwise OR of one
+   or more of the following constants.  */
+typedef int _Unwind_Action;
+
+#define _UA_SEARCH_PHASE   1
+#define _UA_CLEANUP_PHASE  2
+#define _UA_HANDLER_FRAME  4
+#define _UA_FORCE_UNWIND   8
+#define _UA_END_OF_STACK   16
+
+/* This is an opaque type used to refer to a system-specific data
+   structure used by the system unwinder. This context i

[llvm-commits] [125638] arm EABI patch (Lauro Ramos Venancio)

2007-04-02 Thread johannes
Revision: 125638
Author:   johannes
Date: 2007-04-02 17:13:00 -0700 (Mon, 02 Apr 2007)

Log Message:
---
arm EABI patch (Lauro Ramos Venancio)

Modified Paths:
--
apple-local/branches/llvm/gcc/Makefile.in
apple-local/branches/llvm/gcc/ada/misc.c
apple-local/branches/llvm/gcc/c-decl.c
apple-local/branches/llvm/gcc/config/arm/arm.c
apple-local/branches/llvm/gcc/config/arm/arm.h
apple-local/branches/llvm/gcc/config/arm/bpabi.h
apple-local/branches/llvm/gcc/config/arm/elf.h
apple-local/branches/llvm/gcc/config/arm/lib1funcs.asm
apple-local/branches/llvm/gcc/config/arm/libgcc-bpabi.ver
apple-local/branches/llvm/gcc/config/arm/t-bpabi
apple-local/branches/llvm/gcc/config/arm/t-symbian
apple-local/branches/llvm/gcc/config/i386/t-netware
apple-local/branches/llvm/gcc/config/ia64/ia64.h
apple-local/branches/llvm/gcc/cp/Make-lang.in
apple-local/branches/llvm/gcc/cp/decl.c
apple-local/branches/llvm/gcc/cp/except.c
apple-local/branches/llvm/gcc/except.c
apple-local/branches/llvm/gcc/except.h
apple-local/branches/llvm/gcc/java/decl.c
apple-local/branches/llvm/gcc/objc/objc-act.c
apple-local/branches/llvm/gcc/optabs.c
apple-local/branches/llvm/gcc/opts.c
apple-local/branches/llvm/gcc/target-def.h
apple-local/branches/llvm/gcc/target.h
apple-local/branches/llvm/gcc/unwind-c.c

Modified: apple-local/branches/llvm/gcc/Makefile.in
===
--- apple-local/branches/llvm/gcc/Makefile.in   2007-04-03 00:10:47 UTC (rev 
125637)
+++ apple-local/branches/llvm/gcc/Makefile.in   2007-04-03 00:13:00 UTC (rev 
125638)
@@ -340,10 +340,11 @@
 $(srcdir)/ginclude/stddef.h \
 $(srcdir)/ginclude/tgmath.h \
 $(srcdir)/ginclude/varargs.h \
-$(srcdir)/unwind.h \
 $(EXTRA_HEADERS)
 # APPLE LOCAL end radar 2872232 add tgmath.h
 
+UNWIND_H = $(srcdir)/unwind-generic.h
+
 # The GCC to use for compiling libgcc.a and crt*.o.
 # Usually the one we just built.
 # Don't use this as a dependency--use $(GCC_PASSES) or $(GCC_PARTS).
@@ -582,7 +583,7 @@
$(srcdir)/unwind-sjlj.c $(srcdir)/gthr-gnat.c $(srcdir)/unwind-c.c
 LIB2ADDEHSTATIC = $(LIB2ADDEH)
 LIB2ADDEHSHARED = $(LIB2ADDEH)
-LIB2ADDEHDEP = unwind.h unwind-pe.h unwind.inc unwind-dw2-fde.h unwind-dw2.h
+LIB2ADDEHDEP = $(UNWIND_H) unwind-pe.h unwind.inc unwind-dw2-fde.h unwind-dw2.h
 
 # Don't build libunwind by default.
 LIBUNWIND =
@@ -3129,7 +3130,7 @@
 # be rebuilt.
 
 # Build the include directory
-stmp-int-hdrs: $(STMP_FIXINC) $(USER_H) xlimits.h
+stmp-int-hdrs: $(STMP_FIXINC) $(USER_H) xlimits.h $(UNWIND_H)
 # Copy in the headers provided with gcc.
 # The sed command gets just the last file name component;
 # this is necessary because VPATH could add a dirname.
@@ -3147,6 +3148,7 @@
done
rm -f include/limits.h
cp xlimits.h include/limits.h
+   cp $(UNWIND_H) include/unwind.h
chmod a+r include/limits.h
 # Install the README
rm -f include/README
@@ -3772,6 +3774,7 @@
$(DESTDIR)$(itoolsdatadir)/include/$$realfile ; \
done
$(INSTALL_DATA) xlimits.h $(DESTDIR)$(itoolsdatadir)/include/limits.h
+   $(INSTALL_DATA) $(UNWIND_H) $(DESTDIR)$(itoolsdatadir)/include/unwind.h
$(INSTALL_DATA) $(srcdir)/gsyslimits.h \
  $(DESTDIR)$(itoolsdatadir)/gsyslimits.h
$(INSTALL_DATA) macro_list $(DESTDIR)$(itoolsdatadir)/macro_list

Modified: apple-local/branches/llvm/gcc/ada/misc.c
===
--- apple-local/branches/llvm/gcc/ada/misc.c2007-04-03 00:10:47 UTC (rev 
125637)
+++ apple-local/branches/llvm/gcc/ada/misc.c2007-04-03 00:13:00 UTC (rev 
125638)
@@ -478,6 +478,9 @@
   using_eh_for_cleanups ();
 
   eh_personality_libfunc = init_one_libfunc ("__gnat_eh_personality");
+  /* APPLE LOCAL begin LLVM */
+  default_init_unwind_resume_libfunc ();
+  /* APPLE LOCAL end LLVM */
   lang_eh_type_covers = gnat_eh_type_covers;
   lang_eh_runtime_type = gnat_eh_runtime_type;
 

Modified: apple-local/branches/llvm/gcc/c-decl.c
===
--- apple-local/branches/llvm/gcc/c-decl.c  2007-04-03 00:10:47 UTC (rev 
125637)
+++ apple-local/branches/llvm/gcc/c-decl.c  2007-04-03 00:13:00 UTC (rev 
125638)
@@ -3765,6 +3765,9 @@
= init_one_libfunc (USING_SJLJ_EXCEPTIONS
? "__gcc_personality_sj0"
: "__gcc_personality_v0");
+  /* APPLE LOCAL begin LLVM */
+ default_init_unwind_resume_libfunc ();
+  /* APPLE LOCAL end LLVM */
  using_eh_for_cleanups ();
}
 

Modified: apple-local/branches/llvm/gcc/config/arm/arm.c
===
--- apple-local/bran

[llvm-commits] [125637] arm EABI patch (from Lauro Ramos Venancio)

2007-04-02 Thread johannes
Revision: 125637
Author:   johannes
Date: 2007-04-02 17:10:47 -0700 (Mon, 02 Apr 2007)

Log Message:
---
arm EABI patch (from Lauro Ramos Venancio)

Modified Paths:
--
apple-local/branches/llvm/libstdc++-v3/Makefile.in
apple-local/branches/llvm/libstdc++-v3/acinclude.m4
apple-local/branches/llvm/libstdc++-v3/aclocal.m4
apple-local/branches/llvm/libstdc++-v3/configure
apple-local/branches/llvm/libstdc++-v3/include/Makefile.in
apple-local/branches/llvm/libstdc++-v3/libmath/Makefile.in
apple-local/branches/llvm/libstdc++-v3/libsupc++/Makefile.am
apple-local/branches/llvm/libstdc++-v3/libsupc++/Makefile.in
apple-local/branches/llvm/libstdc++-v3/libsupc++/eh_catch.cc
apple-local/branches/llvm/libstdc++-v3/libsupc++/eh_personality.cc
apple-local/branches/llvm/libstdc++-v3/libsupc++/eh_throw.cc
apple-local/branches/llvm/libstdc++-v3/libsupc++/unwind-cxx.h
apple-local/branches/llvm/libstdc++-v3/po/Makefile.in
apple-local/branches/llvm/libstdc++-v3/src/Makefile.in

Modified: apple-local/branches/llvm/libstdc++-v3/Makefile.in
===
--- apple-local/branches/llvm/libstdc++-v3/Makefile.in  2007-04-02 21:58:58 UTC 
(rev 125636)
+++ apple-local/branches/llvm/libstdc++-v3/Makefile.in  2007-04-03 00:10:47 UTC 
(rev 125637)
@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.9.3 from Makefile.am.
+# Makefile.in generated by automake 1.9.5 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004  Free Software Foundation, Inc.
+# 2003, 2004, 2005  Free Software Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -408,7 +408,13 @@
 # (which will cause the Makefiles to be regenerated when you run `make');
 # (2) otherwise, pass the desired values on the `make' command line.
 $(RECURSIVE_TARGETS):
-   @set fnord $$MAKEFLAGS; amf=$$2; \
+   @failcom='exit 1'; \
+   for f in x $$MAKEFLAGS; do \
+ case $$f in \
+   *=* | --[!k]*);; \
+   *k*) failcom='fail=yes';; \
+ esac; \
+   done; \
dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \
list='$(SUBDIRS)'; for subdir in $$list; do \
@@ -420,7 +426,7 @@
local_target="$$target"; \
  fi; \
  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
-  || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+ || eval $$failcom; \
done; \
if test "$$dot_seen" = "no"; then \
  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
@@ -428,7 +434,13 @@
 
 mostlyclean-recursive clean-recursive distclean-recursive \
 maintainer-clean-recursive:
-   @set fnord $$MAKEFLAGS; amf=$$2; \
+   @failcom='exit 1'; \
+   for f in x $$MAKEFLAGS; do \
+ case $$f in \
+   *=* | --[!k]*);; \
+   *k*) failcom='fail=yes';; \
+ esac; \
+   done; \
dot_seen=no; \
case "$@" in \
  distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
@@ -449,7 +461,7 @@
local_target="$$target"; \
  fi; \
  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
-  || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+ || eval $$failcom; \
done && test -z "$$fail"
 tags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \

Modified: apple-local/branches/llvm/libstdc++-v3/acinclude.m4
===
--- apple-local/branches/llvm/libstdc++-v3/acinclude.m4 2007-04-02 21:58:58 UTC 
(rev 125636)
+++ apple-local/branches/llvm/libstdc++-v3/acinclude.m4 2007-04-03 00:10:47 UTC 
(rev 125637)
@@ -1675,6 +1675,10 @@
 enable_sjlj_exceptions=yes
   elif grep _Unwind_Resume conftest.s >/dev/null 2>&1 ; then
 enable_sjlj_exceptions=no
+  #APPLE LOCAL begin LLVM
+  elif grep __cxa_end_cleanup conftest.s >/dev/null 2>&1 ; then
+enable_sjlj_exceptions=no
+  #APPLE LOCAL end LLVM
   fi
 fi
 # APPLE LOCAL LLVM HACK!

Modified: apple-local/branches/llvm/libstdc++-v3/aclocal.m4
===
--- apple-local/branches/llvm/libstdc++-v3/aclocal.m4   2007-04-02 21:58:58 UTC 
(rev 125636)
+++ apple-local/branches/llvm/libstdc++-v3/aclocal.m4   2007-04-03 00:10:47 UTC 
(rev 125637)
@@ -1,7 +1,7 @@
-# generated automatically by aclocal 1.9.3 -*- Autoconf -*-
+# generated automatically by aclocal

[llvm-commits] [124625] Don't enable unrolling at -Os.

2007-03-05 Thread johannes
Revision: 124625
Author:   johannes
Date: 2007-03-05 18:43:49 -0800 (Mon, 05 Mar 2007)

Log Message:
---
Don't enable unrolling at -Os.

Modified Paths:
--
apple-local/branches/llvm/gcc/opts.c

Modified: apple-local/branches/llvm/gcc/opts.c
===
--- apple-local/branches/llvm/gcc/opts.c2007-03-06 02:26:56 UTC (rev 
124624)
+++ apple-local/branches/llvm/gcc/opts.c2007-03-06 02:43:49 UTC (rev 
124625)
@@ -576,7 +576,7 @@
}
   /* APPLE LOCAL begin LLVM */
   /* Enable loop unrolling at -O2 if -f[no-]unroll-loops is not used.  */
-  if (!flag_unroll_loops_set)
+  if (!flag_unroll_loops_set && !optimize_size)
 flag_unroll_loops = 1;
   /* APPLE LOCAL end LLVM */
 }


___
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits