aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1994-05-11 16:26:29 -0400
committerRichard Kenner <kenner@gcc.gnu.org>1994-05-11 16:26:29 -0400
commit13275056a75e6e614ee42c8a93f39fe8184f47e5 (patch)
tree21bacc028c0e31883c7c48ff1bef29b42eb8f752 /gcc
parent6d100794d0665f1b78d81faadbd967e6a45e9a49 (diff)
downloadgcc-13275056a75e6e614ee42c8a93f39fe8184f47e5.zip
gcc-13275056a75e6e614ee42c8a93f39fe8184f47e5.tar.gz
gcc-13275056a75e6e614ee42c8a93f39fe8184f47e5.tar.bz2
(layout_type): Use POINTER_SIZE, instead of width of Pmode, when
appropriate. From-SVN: r7275
Diffstat (limited to 'gcc')
-rw-r--r--gcc/stor-layout.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/gcc/stor-layout.c b/gcc/stor-layout.c
index 9c51c70..1aff02b 100644
--- a/gcc/stor-layout.c
+++ b/gcc/stor-layout.c
@@ -702,23 +702,24 @@ layout_type (type)
break;
case OFFSET_TYPE:
- TYPE_SIZE (type) = size_int (GET_MODE_BITSIZE (Pmode));
- TYPE_MODE (type) = Pmode;
+ TYPE_SIZE (type) = size_int (POINTER_SIZE);
+ TYPE_MODE (type) = mode_for_size (POINTER_SIZE,
+ GET_MODE_CLASS (Pmode), 0);
break;
case FUNCTION_TYPE:
case METHOD_TYPE:
- TYPE_MODE (type) = mode_for_size (2 * GET_MODE_BITSIZE (Pmode),
- MODE_INT, 0);
- TYPE_SIZE (type) = size_int (GET_MODE_BITSIZE (TYPE_MODE (type)));
+ TYPE_MODE (type) = mode_for_size (2 * POINTER_SIZE, MODE_INT, 0);
+ TYPE_SIZE (type) = size_int (2 * POINTER_SIZE);
break;
case POINTER_TYPE:
case REFERENCE_TYPE:
- TYPE_MODE (type) = Pmode;
- TYPE_SIZE (type) = size_int (GET_MODE_BITSIZE (TYPE_MODE (type)));
+ TYPE_MODE (type) = mode_for_size (POINTER_SIZE,
+ GET_MODE_CLASS (Pmode), 0);
+ TYPE_SIZE (type) = size_int (POINTER_SIZE);
TREE_UNSIGNED (type) = 1;
- TYPE_PRECISION (type) = GET_MODE_BITSIZE (TYPE_MODE (type));
+ TYPE_PRECISION (type) = POINTER_SIZE;
break;
case ARRAY_TYPE: