Dalvik: Add sdiv support in the interpreter

This patch adds hardware divide support in the interpreter side of
dalvik. This operation is supported on new armv7 cpus such as A15 or A7.

Opcodes added:
    OP_DIV_INT
    OP_DIV_INT_2ADDR
    OP_DIV_INT_LIT16
    OP_DIV_INT_LIT8
    OP_REM_INT
    OP_REM_INT_2ADDR
    OP_REM_INT_LIT16
    OP_REM_INT_LIT8

Change-Id: Ib1ec5856d957feadd90807fe53ec34cc0e1fd4a2
Signed-off-by: Serban Constantinescu <serban.constantinescu@arm.com>
Dalvik: Add sdiv support in the JIT

This patch adds hardware divide support in the JIT side of dalvik.
This operation is supported on new armv7 cpus such as A15 or A7.

The following opcodes are enabled and will generate code based using
SDIV instruction:

        OP_DIV_INT
        OP_DIV_INT_2ADDR
        OP_REM_INT
        OP_REM_INT_2ADDR
        OP_DIV_INT_LIT16
        OP_DIV_INT_LIT8
        OP_REM_INT_LIT16
        OP_REM_INT_LIT8

Change-Id: I2b2f9f337f13b5c794df951c4929b6ca0ad583c4
Signed-off-by: Serban Constantinescu <serban.constantinescu@arm.com>
Dalvik: Better compatibility with different compilers

This fixes building with clang 3.4, and possibly future versions of gcc:
- Don't error out on unused functions generated by gen-mterp.py even
  when we're using -Werror
- Eliminate some dead code (Word/kWordSize definition) clang warns about

In order to avoid the need for -Wno-error=unused-function, gen-mterp.py
would have to be a lot smarter than it currently is.

Currently, it copies all code from header.cpp and then adds CPU specific
routines.

The code in header.cpp defines all sorts of functions that may or may
not be used by the CPU specific routines, depending on whether or not
the CPU specific bits have a better implementation available.

To fix this without -Wno-error=unused-functions, gen-mterp.py would have
to actually read the CPU specific bits and based on that throw out parts
of header.cpp that aren't needed.

This seems to be too much effort to just avoid having a couple of unused
functions in the code that can be thrown out at compile time anyway,
especially since this is in dalvik which will likely not see another
major revision.

Change-Id: I2874c6f05186721636518e422b0f39a3d8e731cd
Signed-off-by: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>
Don't implicitly cast NULL to a bool

The code is wrong and causes an error when building with clang 3.4
(-Werror,-Wnull-conversion)

Change-Id: If03aa782fa25337802ff906a0d06071fbda93e26
Signed-off-by: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>