Граф коммитов

7 Коммитов

Автор SHA1 Сообщение Дата
Mike Hommey 8368691a2a Bug 1434526 - Make MOZ_SIGNAL_TRAMPOLINE Android-only. r=gsvelto
Bug 1463035 exists to remove it entirely, because as mentioned in bug
1238661 comment 4, we don't actually need this workaround anymore. But
that bug has been blocked for a while because the Android emulator
images we use for testing, for some reason, use a kernel older than any
real device using the same version of Android would use.

Let's however fix the problems it causes with GCC on non-Android ARM
Linux by making it Android-only, rather than removing it entirely.

Differential Revision: https://phabricator.services.mozilla.com/D24134

--HG--
extra : moz-landing-system : lando
2019-03-20 09:07:16 +00:00
Ehsan Akhgari e5e885ae31 Bug 1521000 - Part 2: Adjust our clang-format rules to include spaces after the hash for nested preprocessor directives r=sylvestre
# ignore-this-changeset

--HG--
extra : amend_source : 7221c8d15a765df71171099468e7c7faa648f37c
extra : histedit_source : a0cce6015636202bff09e35a13f72e03257a7695
2019-01-18 10:16:18 +01:00
Sylvestre Ledru 265e672179 Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset

--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01:00
Noemi Erli 5ffb086f4a Backed out changeset 98e368b5c4be (bug 1463035) for failures in tools/profiler/tests/chrome/test_profile_worker.html on a CLOSED TREE 2018-05-22 03:16:44 +03:00
Mike Hommey c51cee4730 Bug 1463035 - Remove MOZ_SIGNAL_TRAMPOLINE. r=jchen
For some reason, GNU as is not happy with the assembly generated after
bug 1238661 anymore on Debian armel.

OTOH, as mentioned in bug 1238661 comment 4, we actually don't need this
workaround anymore, so let's just kill it.

--HG--
extra : rebase_source : 6fd06832136d4f840c65f74b63f1c1bec48d525d
2018-05-21 12:04:22 +09:00
Nathan Froyd 6dad001d7f Bug 1238661 - fix mozilla::SignalTrampoline to work properly with clang; r=darchons
mozilla::SignalTrampoline is designed to work around a bug in older ARM
kernels; it constructs a trampoline function with a NOP slide and then
calls a specified function.  This feat is accomplished using inline
assembly and naked functions, which is a GCC extension where you get to
write the entire body of your function using GCC inline assembly.

Unfortunately, the particular implementation that it uses requires the
specified function's address to be loaded into a register.  GCC permits
this and we use input arguments to the assembly statement to ensure that
GCC knows it shouldn't clobber the incoming argument registers when
trying to load the function's address.

clang, however, complains about the use of input parameters in naked
functions.  So we need to find something that will work on both GCC and
clang.

The trick is to realize that we're a) tail-calling the specified
function and b) we don't have to worry about calling a fully-general
function.  We just have to worry about calling a function inside libxul,
and we can therefore "assume" that the offset between the branch and the
called function fits into the immediate field of a Thumb (or ARM) branch
instruction.  (This assumption is not strictly true; the branch range is
+/-16MB or so and libxul is actually quite a bit bigger than that.  But
it works in practice, and the linker will insert branch stubs if
necessary to make things work out OK.)

The upshot is that we can use a "b" instruction instead of a "bx"
instruction, and this makes clang much happier.  As a small bonus, the
stub gets ever-so-much-more efficient, which is probably the
least-significant micro-optimization ever.
2016-07-25 18:16:06 -04:00
Jim Chen 4a6c0055c0 Bug 1007824 - Add mfbt/LinuxSignal.h; r=snorp r=Ms2ger 2014-07-15 12:45:40 -04:00