diff options
author | ovidiu <ovidiu@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-02-22 09:02:25 +0000 |
---|---|---|
committer | ovidiu <ovidiu@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-02-22 09:02:25 +0000 |
commit | b450221dd2ffe9359af5e404b6a2567e4e9ee201 (patch) | |
tree | 2362040267d2fc4aa42dd8b77e9fdc6ea7226290 /gcc/objc | |
parent | bfcba12dd2475458e6f67bc2c0966451b49fc469 (diff) | |
download | gcc-b450221dd2ffe9359af5e404b6a2567e4e9ee201.tar.gz |
Reverted to the old behavior of encoding the types.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@25368 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/objc')
-rw-r--r-- | gcc/objc/objc-act.c | 82 |
1 files changed, 42 insertions, 40 deletions
diff --git a/gcc/objc/objc-act.c b/gcc/objc/objc-act.c index 2ff65d159ba..374e35b84c4 100644 --- a/gcc/objc/objc-act.c +++ b/gcc/objc/objc-act.c @@ -6782,37 +6782,38 @@ encode_type (type, curtype, format) { /* Unsigned integer types. */ - type = TYPE_MAIN_VARIANT (type); - if (type == unsigned_type_node) - obstack_1grow (&util_obstack, 'I'); - else if (type == long_unsigned_type_node) - obstack_1grow (&util_obstack, 'L'); - else if (type == unsigned_char_type_node) + if (TYPE_MODE (type) == QImode) obstack_1grow (&util_obstack, 'C'); - else if (type == short_unsigned_type_node) + else if (TYPE_MODE (type) == HImode) obstack_1grow (&util_obstack, 'S'); - else if (type == long_long_unsigned_type_node) + else if (TYPE_MODE (type) == SImode) + { + if (type == long_unsigned_type_node) + obstack_1grow (&util_obstack, 'L'); + else + obstack_1grow (&util_obstack, 'I'); + } + else if (TYPE_MODE (type) == DImode) obstack_1grow (&util_obstack, 'Q'); - else - fatal ("attempt to encode unsigned int of unknown type"); } else /* Signed integer types. */ { - type = TYPE_MAIN_VARIANT (type); - if (type == integer_type_node) - obstack_1grow (&util_obstack, 'i'); - else if (type == long_integer_type_node) - obstack_1grow (&util_obstack, 'l'); - else if (type == char_type_node || type == signed_char_type_node) + if (TYPE_MODE (type) == QImode) obstack_1grow (&util_obstack, 'c'); - else if (type == short_integer_type_node) + else if (TYPE_MODE (type) == HImode) obstack_1grow (&util_obstack, 's'); - else if (type == long_long_integer_type_node) + 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'); - else - fatal ("attempt to encode signed int of unknown type"); } } @@ -6857,37 +6858,38 @@ encode_complete_bitfield (int position, tree type, int size) { /* Unsigned integer types. */ - type = TYPE_MAIN_VARIANT (type); - if (type == unsigned_type_node) - charType = 'I'; - else if (type == long_unsigned_type_node) - charType = 'L'; - else if (type == unsigned_char_type_node) + if (TYPE_MODE (type) == QImode) charType = 'C'; - else if (type == short_unsigned_type_node) + else if (TYPE_MODE (type) == HImode) charType = 'S'; - else if (type == long_long_unsigned_type_node) + else if (TYPE_MODE (type) == SImode) + { + if (type == long_unsigned_type_node) + charType = 'L'; + else + charType = 'I'; + } + else if (TYPE_MODE (type) == DImode) charType = 'Q'; - else - fatal ("attempt to encode unsigned int of unknown type"); } else /* Signed integer types. */ { - type = TYPE_MAIN_VARIANT (type); - if (type == unsigned_type_node) - charType = 'i'; - else if (type == long_unsigned_type_node) - charType = 'l'; - else if (type == char_type_node || type == signed_char_type_node) + if (TYPE_MODE (type) == QImode) charType = 'c'; - else if (type == short_unsigned_type_node) + else if (TYPE_MODE (type) == HImode) charType = 's'; - else if (type == long_long_unsigned_type_node) + else if (TYPE_MODE (type) == SImode) + { + if (type == long_integer_type_node) + charType = 'l'; + else + charType = 'i'; + } + + else if (TYPE_MODE (type) == DImode) charType = 'q'; - else - fatal ("attempt to encode signed int of unknown type"); } } |