x86_64: Fix issue in JNI compiler

This patch fixed 64 bit conversion issue in Immediate.
The issue is inside type conversion of Immediate:
explicit Immediate(int64_t value) : value_(value) {}.
In case of the following example we'll have unexpected value in Immediate:
size_t t = 1;
Immediate(-t) will contain value 4294967295 because by conversion
rules -t is first transformed to unsigned and then transformed
to 64bit (size64_t). The issue can be fixed by using long value
as a parameter of Immediate constructor.

Added tests for BuildFrame, RemoveFrame, IncreaseFrameSize and
DecreaseFrameSize to assembler_x86_64_test.

Change-Id: I0652bac83e4266fd4153bc6a4e9d3aae7cc4cb6f
Signed-off-by: avignate <aleksey.v.ignatenko@intel.com>
Signed-off-by: Dmitry Petrochenko <dmitry.petrochenko@intel.com>
diff --git a/compiler/utils/x86_64/assembler_x86_64.h b/compiler/utils/x86_64/assembler_x86_64.h
index 548d379..6276603 100644
--- a/compiler/utils/x86_64/assembler_x86_64.h
+++ b/compiler/utils/x86_64/assembler_x86_64.h
@@ -29,6 +29,13 @@
 namespace art {
 namespace x86_64 {
 
+// Encodes an immediate value for operands.
+//
+// Note: Immediates can be 64b on x86-64 for certain instructions, but are often restricted
+// to 32b.
+//
+// Note: As we support cross-compilation, the value type must be int64_t. Please be aware of
+// conversion rules in expressions regarding negation, especially size_t on 32b.
 class Immediate {
  public:
   explicit Immediate(int64_t value) : value_(value) {}