mips: add mips64le support for atomic_incs and annotate_hbefore tests

Add mips64-le implementation of:

- atomic_add_8bit
- atomic_add_16bit
- atomic_add_32bit
- atomic_add_64bit
- do_acasW

Minor fixes for mips32 implementations are included as well.

These functions are needed to execute atomic_incs and annotate_hbefore
tests on mips64le.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13357 a5019735-40e9-0310-863c-91ae7b9d1cf9
mips: enable several system call wrappers on mips64

Enable wrappers on mips64 for the following calls:

- dup3
- accept4
- epoll_create1
- timerfd_settime
- newfstatat

Also, allow additional flock64 values in sys_fcntl for mips64.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13358 a5019735-40e9-0310-863c-91ae7b9d1cf9
mips: add different value for SOCK_STREAM

MIPS uses different values for socket types.
This is protected by ARCH_HAS_SOCKET_TYPES in Linux kernel and we introduce
it here too. This is important for log-socket feature, and it resolves the
issue reported in https://bugs.kde.org/show_bug.cgi?id=313267#c21.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13359 a5019735-40e9-0310-863c-91ae7b9d1cf9
mips: enable helgrind test tc08_hbl2 for mips64

Enable the test for mips64.
Minor improvement in macro INC.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13360 a5019735-40e9-0310-863c-91ae7b9d1cf9
Solve false negative for various malloc replaced functions arguments

The replacement functions are running on the simulated CPU.
The code on the simulated CPU does not necessarily use
all arguments. E.g. args can be ignored and/or only given
to a NON SIMD call.
The definedness of such 'unused' arguments will not be verified
by memcheck.
A call to 'trigger_memcheck_error_if_undefined' allows 
memcheck to detect such errors for the otherwise unused args.
Apart of allowing memcheck to detect an error, the function
trigger_memcheck_error_if_undefined has no effect and
has a minimal cost for other tools replacing malloc functions.

(suggestion of the 'no operation check' from Julian).

tested on f12/x86, debian6/amd64, f18/ppc64
Note that some Darwin specific code has been modified
in coregrind/m_replace_malloc/vg_replace_malloc.c.
(Some of) this code has not been compiled (no access to a
Darwin system). The code changed is trivial, so there is
some chance it will compile and even maybe work.

Added a new test verifying that various malloc related
functions undefined args are triggering an error in memcheck.




git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13361 a5019735-40e9-0310-863c-91ae7b9d1cf9