diff --git a/src/common.h b/src/common.h index f8eff598ce..bce6455ab2 100644 --- a/src/common.h +++ b/src/common.h @@ -47,6 +47,12 @@ # define SO_SUFFIX ".so" #endif +#ifdef __APPLE__ +# define FORCE_ALIGN __attribute__((force_align_arg_pointer)) +#else +# define FORCE_ALIGN +#endif + #define NO_RETURN __attribute__((noreturn)) #define LIKELY(v) __builtin_expect((v) != 0, true) diff --git a/src/compiler.cpp b/src/compiler.cpp index a5ff0b6c11..3db65b440e 100644 --- a/src/compiler.cpp +++ b/src/compiler.cpp @@ -42,13 +42,13 @@ class CodePromise; class MyPromise; class RegisterReference; -int64_t +int64_t FORCE_ALIGN divideLong(int64_t a, int64_t b) { return a / b; } -int64_t +int64_t FORCE_ALIGN moduloLong(int64_t a, int64_t b) { return a % b;