extern int
address_space_name_to_int (char *space_identifier)
{
+ int type_flags;
/* Check for known address space delimiters. */
if (!strcmp (space_identifier, "code"))
return TYPE_FLAG_CODE_SPACE;
else if (!strcmp (space_identifier, "data"))
return TYPE_FLAG_DATA_SPACE;
+ else if (ADDRESS_CLASS_NAME_TO_TYPE_FLAGS_P ()
+ && ADDRESS_CLASS_NAME_TO_TYPE_FLAGS (space_identifier, &type_flags))
+ return type_flags;
else
error ("Unknown address space specifier: \"%s\"", space_identifier);
}
return "code";
else if (space_flag & TYPE_FLAG_DATA_SPACE)
return "data";
+ else if ((space_flag & TYPE_FLAG_ADDRESS_CLASS_ALL)
+ && ADDRESS_CLASS_TYPE_FLAGS_TO_NAME_P ())
+ return ADDRESS_CLASS_TYPE_FLAGS_TO_NAME (space_flag);
else
return NULL;
}
is identical to the one supplied except that it has an address
space attribute attached to it (such as "code" or "data").
- This is for Harvard architectures. */
+ The space attributes "code" and "data" are for Harvard architectures.
+ The address space attributes are for architectures which have
+ alternately sized pointers or pointers with alternate representations. */
struct type *
make_type_with_address_space (struct type *type, int space_flag)
{
struct type *ntype;
int new_flags = ((TYPE_INSTANCE_FLAGS (type)
- & ~(TYPE_FLAG_CODE_SPACE | TYPE_FLAG_DATA_SPACE))
+ & ~(TYPE_FLAG_CODE_SPACE | TYPE_FLAG_DATA_SPACE
+ | TYPE_FLAG_ADDRESS_CLASS_ALL))
| space_flag);
return make_qualified_type (type, new_flags, NULL);
{
puts_filtered (" TYPE_FLAG_DATA_SPACE");
}
+ if (TYPE_ADDRESS_CLASS_1 (type))
+ {
+ puts_filtered (" TYPE_FLAG_ADDRESS_CLASS_1");
+ }
+ if (TYPE_ADDRESS_CLASS_2 (type))
+ {
+ puts_filtered (" TYPE_FLAG_ADDRESS_CLASS_2");
+ }
puts_filtered ("\n");
printfi_filtered (spaces, "flags 0x%x", TYPE_FLAGS (type));
if (TYPE_UNSIGNED (type))