diff options
author | Robin Watts <robin.watts@artifex.com> | 2012-11-20 21:33:41 +0000 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2012-11-21 00:56:56 +0000 |
commit | 1ce704dc1d2f2951694e2031831caa016b8cf601 (patch) | |
tree | de4e69fc7bac05a13998fc876b61a8cedf3d6dfb /fitz/fitz-internal.h | |
parent | b0b0b7717c05587b11f58a20d9d63bcccaca43ca (diff) | |
download | mupdf-1ce704dc1d2f2951694e2031831caa016b8cf601.tar.xz |
ARM code pixmap subsampler.
Move the assembly macros into fitz-internal.h.
Diffstat (limited to 'fitz/fitz-internal.h')
-rw-r--r-- | fitz/fitz-internal.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/fitz/fitz-internal.h b/fitz/fitz-internal.h index 2f1d137e..d7bbb5cb 100644 --- a/fitz/fitz-internal.h +++ b/fitz/fitz-internal.h @@ -71,6 +71,30 @@ fz_unlock(fz_context *ctx, int lock) ctx->locks->unlock(ctx->locks->user, lock); } +/* ARM assembly specific defines */ + +#ifdef ARCH_ARM +#ifdef NDK_PROFILER +extern void __gnu_mcount_nc(void); +#define ENTER_PG "push {lr}\nbl __gnu_mcount_nc\n" +#else +#define ENTER_PG +#endif + +/* If we're compiling as thumb code, then we need to tell the compiler + * to enter and exit ARM mode around our assembly sections. If we move + * the ARM functions to a separate file and arrange for it to be compiled + * without thumb mode, we can save some time on entry. + */ +#ifdef ARCH_THUMB +#define ENTER_ARM ".balign 4\nmov r12,pc\nbx r12\n0:.arm\n" ENTER_PG +#define ENTER_THUMB "9:.thumb\n" ENTER_PG +#else +#define ENTER_ARM +#define ENTER_THUMB +#endif +#endif + /* * Basic runtime and utility functions |