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: [PING^4] Named address spaces: support multiple pointer modes


On 10/23/2009 12:48 PM, Ulrich Weigand wrote:
the last patch required to enable named address space support is still unreviewed:
http://gcc.gnu.org/ml/gcc-patches/2009-10/msg00325.html

@@ -801,7 +807,8 @@ promote_mode (const_tree type ATTRIBUTE_
     case REFERENCE_TYPE:
     case POINTER_TYPE:
       *punsignedp = POINTERS_EXTEND_UNSIGNED;
-      return Pmode;
+      return targetm.addr_space.address_mode
+	       (TREE_ADDR_SPACE (TREE_TYPE (type)));

TYPE_ADDR_SPACE?


@@ -4315,7 +4323,7 @@ initializer_constant_valid_p (tree value
     case POINTER_PLUS_EXPR:
     case PLUS_EXPR:
       if (! INTEGRAL_TYPE_P (endtype)
-	  || TYPE_PRECISION (endtype) >= POINTER_SIZE)
+	  || TYPE_PRECISION (endtype) >= TYPE_PRECISION (TREE_TYPE (value)))

int_pointer_precision?


Otherwise it looks ok.


r~



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