Commit 563556ca by Zack Weinberg

objc-act.c (encode_type): Encode INTEGER_TYPEs and REAL_TYPEs based on the…

objc-act.c (encode_type): Encode INTEGER_TYPEs and REAL_TYPEs based on the bitsize of the type's mode...

	* objc/objc-act.c (encode_type): Encode INTEGER_TYPEs and
	REAL_TYPEs based on the bitsize of the type's mode, not the
	mode directly.

From-SVN: r71923
parent 21e6f025
2003-09-29 Zack Weinberg <zack@codesourcery.com>
* objc/objc-act.c (encode_type): Encode INTEGER_TYPEs and
REAL_TYPEs based on the bitsize of the type's mode, not the
mode directly.
2003-09-29 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE> 2003-09-29 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
* dwarf2out.c (default_eh_frame_section): Split into ... * dwarf2out.c (default_eh_frame_section): Split into ...
(named_section_eh_frame_section, collect2_eh_frame_section): ... new (named_section_eh_frame_section, collect2_eh_frame_section): ... new
functions. functions.
* output.h (named_section_eh_frame_section): Declare. * output.h (named_section_eh_frame_section): Declare.
(collect2_eh_frame_section): Likewise. (collect2_eh_frame_section): Likewise.
......
...@@ -7325,62 +7325,42 @@ encode_next_bitfield (int width) ...@@ -7325,62 +7325,42 @@ encode_next_bitfield (int width)
} }
/* FORMAT will be OBJC_ENCODE_INLINE_DEFS or OBJC_ENCODE_DONT_INLINE_DEFS. */ /* FORMAT will be OBJC_ENCODE_INLINE_DEFS or OBJC_ENCODE_DONT_INLINE_DEFS. */
static void static void
encode_type (tree type, int curtype, int format) encode_type (tree type, int curtype, int format)
{ {
enum tree_code code = TREE_CODE (type); enum tree_code code = TREE_CODE (type);
char c;
if (code == INTEGER_TYPE) if (code == INTEGER_TYPE)
{ {
if (integer_zerop (TYPE_MIN_VALUE (type))) switch (GET_MODE_BITSIZE (TYPE_MODE (type)))
{ {
/* Unsigned integer types. */ case 8: c = TREE_UNSIGNED (type) ? 'C' : 'c'; break;
case 16: c = TREE_UNSIGNED (type) ? 'S' : 's'; break;
if (TYPE_MODE (type) == QImode) case 32:
obstack_1grow (&util_obstack, 'C'); if (type == long_unsigned_type_node
else if (TYPE_MODE (type) == HImode) || type == long_integer_type_node)
obstack_1grow (&util_obstack, 'S'); c = TREE_UNSIGNED (type) ? 'L' : 'l';
else if (TYPE_MODE (type) == SImode) else
{ c = TREE_UNSIGNED (type) ? 'I' : 'i';
if (type == long_unsigned_type_node) break;
obstack_1grow (&util_obstack, 'L'); case 64: c = TREE_UNSIGNED (type) ? 'Q' : 'q'; break;
else default: abort ();
obstack_1grow (&util_obstack, 'I');
}
else if (TYPE_MODE (type) == DImode)
obstack_1grow (&util_obstack, 'Q');
}
else
/* Signed integer types. */
{
if (TYPE_MODE (type) == QImode)
obstack_1grow (&util_obstack, 'c');
else if (TYPE_MODE (type) == HImode)
obstack_1grow (&util_obstack, 's');
else if (TYPE_MODE (type) == SImode)
{
if (type == long_integer_type_node)
obstack_1grow (&util_obstack, 'l');
else
obstack_1grow (&util_obstack, 'i');
}
else if (TYPE_MODE (type) == DImode)
obstack_1grow (&util_obstack, 'q');
} }
obstack_1grow (&util_obstack, c);
} }
else if (code == REAL_TYPE) else if (code == REAL_TYPE)
{ {
/* Floating point types. */ /* Floating point types. */
switch (GET_MODE_BITSIZE (TYPE_MODE (type)))
if (TYPE_MODE (type) == SFmode) {
obstack_1grow (&util_obstack, 'f'); case 32: c = 'f'; break;
else if (TYPE_MODE (type) == DFmode case 64:
|| TYPE_MODE (type) == TFmode) case 128: c = 'd'; break;
obstack_1grow (&util_obstack, 'd'); default: abort ();
}
obstack_1grow (&util_obstack, c);
} }
else if (code == VOID_TYPE) else if (code == VOID_TYPE)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment