Fix broken card table asserts.

We had an off by one error due to getting the card for the heap
source limit. This is not a valid card when the heap is at
maximum size, but doesn't need to be since we do less than
comparison on it. Fixed another error where we didn't take into
account the biased begin in an assert.

Did a bit of refactoring by removing useless if statement.

Fixes 061-out-of-memory.

Bug: 8282011
Change-Id: I66e3026e7b98b738ecfbced101846ec9f184ab70
am a86e99ba: Fix broken card table asserts.

* commit 'a86e99bacbe72f2a8914c4339646a6aba488afcd':
  Fix broken card table asserts.
Fix the protection of code cache for x86 JIT

During generation of code into code cache
an unprotected region of memory does not correspond to
protected one, The patch fixes that.

Author: Katkov Serguei <serguei.i.katkov@intel.com>

Change-Id: Ia363f27099891244f760c457bdad8c51cfcc394c
am 13aeac96: Merge "Fix broken card table asserts."

* commit '13aeac968f2473fcb4f31ccc6f43c6afc62db4bf':
  Fix broken card table asserts.
am e19b6bd1: am 13aeac96: Merge "Fix broken card table asserts."

* commit 'e19b6bd17c794e7ff2b17fa378f1b5357df83a5a':
Merge "Fix the protection of code cache for x86 JIT"
Remove some of the x86 libdvm.so text relocations.

Change-Id: I35a4194c3605e37ebe1d4cef69fa7b72287db810
Remove updateProcessState.

Change-Id: I46588f15f92c8298130c49773951c62b05b44a4f
Merge "Remove some of the x86 libdvm.so text relocations."
am 730ba5ca: Merge "Fix the protection of code cache for x86 JIT"

* commit '730ba5cab6d55cdc57cdefd47c3b55878f4eacfb':
  Fix the protection of code cache for x86 JIT
am e9c97436: Merge "Remove some of the x86 libdvm.so text relocations."

* commit 'e9c974368133f15413ad80222be41fdca92630b5':
  Remove some of the x86 libdvm.so text relocations.
am 6a1b6119: am 730ba5ca: Merge "Fix the protection of code cache for x86 JIT"

* commit '6a1b6119ffd715eb7a303fc2e118f662c575655f':
  Fix the protection of code cache for x86 JIT
am 4e94dbad: am e9c97436: Merge "Remove some of the x86 libdvm.so text relocations."

* commit '4e94dbadfbaf66e832c625c3651d64715b5b3db4':
  Remove some of the x86 libdvm.so text relocations.
Revert "Remove some of the x86 libdvm.so text relocations."

This reverts commit 469e580f6a18c00a3c356ae3898aa8d143736016.

Although dalvik/tests/run-all-tests passed on an emulator after this change, starting a host VM crashes in dvmAsmInstructionStartCode, which is highly suspicious.

Since this change didn't actually solve my problem (I'd need to remove all text relocations to make the linker happy with the x86 libdvm.so, so it would stop warning, so the tests would stop failing because the output doesn't match the golden output), I'm just going to revert and leave it for now.

Change-Id: Ic35acdb0ae9a5b321ba728afceff1c1d9b0114fc
Merge "Revert "Remove some of the x86 libdvm.so text relocations.""
am c8344fb9: Merge "Revert "Remove some of the x86 libdvm.so text relocations.""

* commit 'c8344fb97e20760892ba59e7ac4fde1487bdfd45':
  Revert "Remove some of the x86 libdvm.so text relocations."
am 0d67ca90: am c8344fb9: Merge "Revert "Remove some of the x86 libdvm.so text relocations.""

* commit '0d67ca90695c0f013884d26d0c099db65ba8a4e9':
  Revert "Remove some of the x86 libdvm.so text relocations."
Merge "Remove updateProcessState."
am 9cf04e35: Fix the protection of code cache for x86 JIT

* commit '9cf04e3569d48dae36e0492226250da04699f8d4':
  Fix the protection of code cache for x86 JIT
am 257c9d1b: am 9cf04e35: Fix the protection of code cache for x86 JIT

* commit '257c9d1bc32ae5bc4786d35cace44cee6dbe62b1':
  Fix the protection of code cache for x86 JIT