projects
/
libfirm
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
16a8f0a
)
correcly increase frame alignment when adding types with larger alignment
author
Matthias Braun
<matze@braunis.de>
Mon, 22 Sep 2008 08:19:48 +0000
(08:19 +0000)
committer
Matthias Braun
<matze@braunis.de>
Mon, 22 Sep 2008 08:19:48 +0000
(08:19 +0000)
[r22163]
ir/tr/type.c
patch
|
blob
|
history
diff --git
a/ir/tr/type.c
b/ir/tr/type.c
index
fa686cd
..
2cceb45
100644
(file)
--- a/
ir/tr/type.c
+++ b/
ir/tr/type.c
@@
-2152,6
+2152,13
@@
ir_entity *frame_alloc_area(ir_type *frame_type, int size, unsigned alignment, i
/* calculate offset and new type size */
offset = 0;
frame_size += size;
+
+ /* increase size to match alignment... */
+ if (alignment > frame_align) {
+ frame_align = alignment;
+ set_type_alignment_bytes(frame_type, frame_align);
+ frame_size = (frame_size + frame_align - 1) & ~(frame_align - 1);
+ }
} else {
/* calculate offset and new type size */
offset = (frame_size + alignment - 1) & ~(alignment - 1);