Fix push/pop instruction selection and encoding.
1) Thumb 'push' can handle lr and 'pop' can handle pc, so make use of them.
2) Thumb2 push was incorrectly encoded as stmia, which should be stmdb
instead.
None of the above affect the code that we currently ship.
Change-Id: I89ab46b032a3d562355c2cc3bc05fe308ba40957
diff --git a/vm/compiler/codegen/arm/Assemble.c b/vm/compiler/codegen/arm/Assemble.c
index aa61285..577f683 100644
--- a/vm/compiler/codegen/arm/Assemble.c
+++ b/vm/compiler/codegen/arm/Assemble.c
@@ -641,7 +641,7 @@
kFmtUnused, -1, -1,
IS_UNARY_OP | REG_DEF_SP | REG_USE_SP | REG_DEF_LIST0
| IS_LOAD, "pop", "<!0R>", 2),
- ENCODING_MAP(kThumb2Push, 0xe8ad0000,
+ ENCODING_MAP(kThumb2Push, 0xe92d0000,
kFmtBitBlt, 15, 0, kFmtUnused, -1, -1, kFmtUnused, -1, -1,
kFmtUnused, -1, -1,
IS_UNARY_OP | REG_DEF_SP | REG_USE_SP | REG_USE_LIST0