Android ucontext refinements (upstream backport).

This is a forward-compatible patch to avoid naming/type conflicts in
the near future, when the Android C library will be updated to provide
mcontext_t/ucontext_t properly.

Note that this changes the naming convention used to access the
register values from mcontext_t, to follow current ARM GLibc (this
is also the convention being adopted by Android).

+ Android provides gettid() (all API levels) so use it instead of
  relying on syscall().

This is a backport of http://code.google.com/p/v8/source/detail?r=12250

See http://code.google.com/p/android/issues/detail?id=34784 for more
context.

Change-Id: Id1fe5489eea8a51d0210858bf91132191f967822
Merge "Android ucontext refinements (upstream backport)."
am 5725f319: Merge "Android ucontext refinements (upstream backport)."

* commit '5725f3197b98021df10ce3655cddecb7c118baaa':
  Android ucontext refinements (upstream backport).
Revert "Android ucontext refinements (upstream backport)".

This creates build breakages in the internal Android tree.
Will investigate later.

Original patch: https://android-review.googlesource.com/#/c/38852/

Change-Id: I902021fa56b959f1f035f4d448a43483328debd8
Merge "Revert "Android ucontext refinements (upstream backport)"."
am c796025f: Merge "Revert "Android ucontext refinements (upstream backport)"."

* commit 'c796025f7dc5f8df7c0f9c76bcaee96a7716912d':
  Revert "Android ucontext refinements (upstream backport)".
Fix ARM hardfloat detection in linux

See
  http://code.google.com/p/v8/issues/detail?id=2140
  https://chromiumcodereview.appspot.com/10713009

The original code fails to detect at run-time when compiled
with GCC 4.7, because the undefined behavior of casting
void to double, and the r0/r1 clobbered in assembly code
isn't reaching the use when compared to 1.0 in VFP reg.
In summary, the old code is incorrect and overkill, and the
new code fix it.

Change-Id: I6b63a4f9789e08089368e431a5553f482400725a
Merge "Fix ARM hardfloat detection in linux"
am 1724e02f: Merge "Fix ARM hardfloat detection in linux"

* commit '1724e02fae2f5a2de04e994567a8c74cd31068ef':
  Fix ARM hardfloat detection in linux
Use target-specific PRIVATE_CLEAN_FILES

Change-Id: Idb8136a0dc887538e2ee857a60e60ab6aa358883
Merge "Use target-specific PRIVATE_CLEAN_FILES"
Remove the unnecessary PRIVATE_CLEAN_FILES

If you want to clean those files, you should run "make
clean-mksnapshot.$(TARGET_ARCH)" instead.

Change-Id: I45a35903126225a54f8d942ed38c5cea70fd2664
Merge "Remove the unnecessary PRIVATE_CLEAN_FILES"
Use kernel cacheflush for large sizes on MIPS.

This is a workaround to a deserializer bug. The bug was exposed
with a recent optimization to use user-mode cache-flushing on
MIPS. To reduce risk, we're doing a workaround in mips-specific
code so that other arch's cannot be affected.

The deserializer does this FlushICache:

  CPU::FlushICache(last_object_address_, Page::kPageSize);

However, that region includes OS guard-pages with no access
privilege. The MIPS kernel cacheflush routines work OK in this
case, but the Bionic cacheflush recently enabled user-mode flushing
using the synci instruction, which causes a segfault on MIPS when
the guard pages are reached.
(change I48fd6f2b0cbe80c3cd90f453ced97a2f154f7ad3)

The workaround just reverts to the kernel flush when the size
is Page::kPageSize or bigger.

A better fix would be to alter the deserializer so that only the
executable pages are flushed:
  CPU::FlushICache(last_object_address_,
                   isolate_->memory_allocator()->CodePageAreaSize());

However, that changes common code for all supported architectures.
There is no evidence that this bug affects the other arch's, so we
are doing a MIPS-specific workaround.

(cherry-pick from AOSP)
bug: 8851838

Change-Id: I30b62eb579feab1453d3ae85a5fb9b408f91756b
Signed-off-by: Paul Lind <paul.lind@imgtec.com>
Merge tag 'android-4.3_r2.1' into cm-10.2

Android 4.3 release 2.1
Merge branch 'cm-10.2' of github.com:CyanogenMod/android_external_v8 into Domination