From 0ede24f2c46d2b888f5e19418e577f3c1110f6a5 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Tue, 23 Jun 2015 22:17:47 +0545 Subject: sim: common: add align_{up,down} to match gdb We have ALIGN_{8,16,PAGE} and FLOOR_PAGE macros (where PAGE is defined as 4k) which were imported from the ppc sim. But no other sim utilizes these and hardcoding the sizes in the name is a bit limiting. Let's delete these and import the two general macros that gdb uses: align_up(addr, bytes) align_down(addr, bytes) This in turn allows us to cut over the Blackfin code immediately. --- sim/bfin/sim-main.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'sim/bfin/sim-main.h') diff --git a/sim/bfin/sim-main.h b/sim/bfin/sim-main.h index 0b61ed6..a09ea49 100644 --- a/sim/bfin/sim-main.h +++ b/sim/bfin/sim-main.h @@ -53,9 +53,7 @@ struct sim_state { #include "dv-bfin_trace.h" #undef CLAMP -#undef ALIGN #define CLAMP(a, b, c) min (max (a, b), c) -#define ALIGN(addr, size) (((addr) + ((size)-1)) & ~((size)-1)) /* TODO: Move all this trace logic to the common code. */ #define BFIN_TRACE_CORE(cpu, addr, size, map, val) \ -- cgit v1.1