aboutsummaryrefslogtreecommitdiff
path: root/gdb/bfin-tdep.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/bfin-tdep.c')
-rw-r--r--gdb/bfin-tdep.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gdb/bfin-tdep.c b/gdb/bfin-tdep.c
index fc3258a..963b048 100644
--- a/gdb/bfin-tdep.c
+++ b/gdb/bfin-tdep.c
@@ -510,7 +510,7 @@ bfin_push_dummy_call (struct gdbarch *gdbarch,
{
struct type *value_type = value_enclosing_type (args[i]);
- total_len += (TYPE_LENGTH (value_type) + 3) & ~3;
+ total_len += align_up (TYPE_LENGTH (value_type), 4);
}
/* At least twelve bytes of stack space must be allocated for the function's
@@ -526,7 +526,7 @@ bfin_push_dummy_call (struct gdbarch *gdbarch,
{
struct type *value_type = value_enclosing_type (args[i]);
struct type *arg_type = check_typedef (value_type);
- int container_len = (TYPE_LENGTH (arg_type) + 3) & ~3;
+ int container_len = align_up (TYPE_LENGTH (arg_type), 4);
sp -= container_len;
write_memory (sp, value_contents (args[i]), container_len);
@@ -759,7 +759,7 @@ static const struct frame_base bfin_frame_base =
static CORE_ADDR
bfin_frame_align (struct gdbarch *gdbarch, CORE_ADDR address)
{
- return (address & ~0x3);
+ return align_down (address, 4);
}
enum bfin_abi