summaryrefslogtreecommitdiffhomepage
path: root/ir/tr
diff options
context:
space:
mode:
authorMatthias Braun <matze@braunis.de>2016-02-13 20:27:54 +0100
committerMatthias Braun <matze@braunis.de>2016-02-13 20:47:39 +0100
commitdada81acdc6376be5dbe66118fcd28d25ca11902 (patch)
tree49fe0e092bfb0a24c06de8c865935ca7c54e1e1b /ir/tr
parent206f8441e918c355160fd80c783d37f8a7e88be0 (diff)
Use round_up2() more often and cleanup its implementation
Diffstat (limited to 'ir/tr')
-rw-r--r--ir/tr/type.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ir/tr/type.c b/ir/tr/type.c
index 9d210ab..d5326dc 100644
--- a/ir/tr/type.c
+++ b/ir/tr/type.c
@@ -1119,7 +1119,7 @@ ir_entity *frame_alloc_area(ir_type *frame_type, int size, unsigned alignment,
unsigned frame_align = get_type_alignment_bytes(frame_type);
int offset;
if (at_start) {
- unsigned delta = (size + frame_align - 1) & ~(frame_align - 1);
+ unsigned delta = round_up2(size, frame_align);
/* fix all offsets so far */
for (size_t i = 0, n = get_compound_n_members(frame_type); i < n; ++i) {
ir_entity *ent = get_compound_member(frame_type, i);