Commit db01f480 by Jan Hubicka Committed by Jan Hubicka

* i386.c (classify_argument): Fix computing of field's offsets.

From-SVN: r56204
parent caad61a1
Sun Aug 11 14:43:17 CEST 2002 Jan Hubicka <jh@suse.cz>
* i386.c (classify_argument): Fix computing of field's offsets.
2002-08-11 Andreas Jaeger <aj@suse.de> 2002-08-11 Andreas Jaeger <aj@suse.de>
PR target/7531: PR target/7531:
......
...@@ -1146,6 +1146,9 @@ override_options () ...@@ -1146,6 +1146,9 @@ override_options ()
ix86_tls_dialect_string); ix86_tls_dialect_string);
} }
if (profile_flag)
target_flags &= ~MASK_OMIT_LEAF_FRAME_POINTER;
/* Keep nonleaf frame pointers. */ /* Keep nonleaf frame pointers. */
if (TARGET_OMIT_LEAF_FRAME_POINTER) if (TARGET_OMIT_LEAF_FRAME_POINTER)
flag_omit_frame_pointer = 1; flag_omit_frame_pointer = 1;
...@@ -1257,6 +1260,8 @@ optimization_options (level, size) ...@@ -1257,6 +1260,8 @@ optimization_options (level, size)
flag_pcc_struct_return = 0; flag_pcc_struct_return = 0;
flag_asynchronous_unwind_tables = 1; flag_asynchronous_unwind_tables = 1;
} }
if (profile_flag)
flag_omit_frame_pointer = 0;
} }
/* Table of valid machine attributes. */ /* Table of valid machine attributes. */
...@@ -1634,7 +1639,7 @@ classify_argument (mode, type, classes, bit_offset) ...@@ -1634,7 +1639,7 @@ classify_argument (mode, type, classes, bit_offset)
return 0; return 0;
for (i = 0; i < num; i++) for (i = 0; i < num; i++)
{ {
int pos = (offset + bit_offset) / 8 / 8; int pos = (offset + (bit_offset % 64)) / 8 / 8;
classes[i + pos] = classes[i + pos] =
merge_classes (subclasses[i], classes[i + pos]); merge_classes (subclasses[i], classes[i + pos]);
} }
...@@ -1671,7 +1676,7 @@ classify_argument (mode, type, classes, bit_offset) ...@@ -1671,7 +1676,7 @@ classify_argument (mode, type, classes, bit_offset)
for (i = 0; i < num; i++) for (i = 0; i < num; i++)
{ {
int pos = int pos =
(int_bit_position (field) + bit_offset) / 8 / 8; (int_bit_position (field) + (bit_offset % 64)) / 8 / 8;
classes[i + pos] = classes[i + pos] =
merge_classes (subclasses[i], classes[i + pos]); merge_classes (subclasses[i], classes[i + pos]);
} }
...@@ -1717,7 +1722,7 @@ classify_argument (mode, type, classes, bit_offset) ...@@ -1717,7 +1722,7 @@ classify_argument (mode, type, classes, bit_offset)
num = classify_argument (TYPE_MODE (type), num = classify_argument (TYPE_MODE (type),
type, subclasses, type, subclasses,
(offset + bit_offset) % 256); (offset + (bit_offset % 64)) % 256);
if (!num) if (!num)
return 0; return 0;
for (i = 0; i < num; i++) for (i = 0; i < num; i++)
......
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