Merge change 23734
* changes:
Updated expected outputs in dalvik benchmarks. Improved debugging output and added spin loop on detection of divergence in self verification tool.
diff --git a/libcore/luni/src/main/native/java_net_InetAddress.cpp b/libcore/luni/src/main/native/java_net_InetAddress.cpp
index 8724817..90a88ee 100644
--- a/libcore/luni/src/main/native/java_net_InetAddress.cpp
+++ b/libcore/luni/src/main/native/java_net_InetAddress.cpp
@@ -111,11 +111,6 @@
jobjectArray addressArray = NULL;
memset(&hints, 0, sizeof(hints));
- /*
- * IPv4 only for now until the socket code supports IPv6; otherwise, the
- * resolver will create two separate requests, one for IPv4 and one,
- * currently unnecessary, for IPv6.
- */
hints.ai_family = AF_UNSPEC;
hints.ai_flags = AI_ADDRCONFIG;
/*
@@ -233,7 +228,9 @@
}
if (!out) {
+#if LOG_DNS
LOGI("Unknown host %s, throwing UnknownHostException", name);
+#endif
jniThrowException(env, "java/net/UnknownHostException", name);
}
env->ReleaseStringUTFChars(javaName, name);
@@ -241,6 +238,14 @@
}
+/**
+ * Looks up the name corresponding to an IP address.
+ *
+ * @param javaAddress: a byte array containing the raw IP address bytes. Must be
+ * 4 or 16 bytes long.
+ * @return the hostname.
+ * @throws UnknownHostException: the IP address has no associated hostname.
+ */
static jstring InetAddress_gethostbyaddr(JNIEnv* env, jobject obj,
jbyteArray javaAddress)
{
@@ -257,57 +262,45 @@
}
// Convert the raw address bytes into a socket address structure.
+ int ret = 0;
struct sockaddr_storage ss;
struct sockaddr_in *sin = (struct sockaddr_in *) &ss;
struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *) &ss;
size_t socklen;
+ memset(&ss, 0, sizeof(ss));
switch (addrlen) {
case 4:
socklen = sizeof(struct sockaddr_in);
- memset(sin, 0, sizeof(struct sockaddr_in));
sin->sin_family = AF_INET;
- memcpy(&sin->sin_addr.s_addr, rawAddress, 4);
+ memcpy(&sin->sin_addr.s_addr, rawAddress, addrlen);
env->ReleaseByteArrayElements(javaAddress, rawAddress, JNI_ABORT);
break;
case 16:
socklen = sizeof(struct sockaddr_in6);
- memset(sin6, 0, sizeof(struct sockaddr_in6));
sin6->sin6_family = AF_INET6;
- memcpy(&sin6->sin6_addr.s6_addr, rawAddress, 16);
+ memcpy(&sin6->sin6_addr.s6_addr, rawAddress, addrlen);
env->ReleaseByteArrayElements(javaAddress, rawAddress, JNI_ABORT);
break;
default:
+ // The caller already throws an exception in this case. Don't worry
+ // about it here.
env->ReleaseByteArrayElements(javaAddress, rawAddress, JNI_ABORT);
- jniThrowException(env, "java/net/UnknownHostException",
- "Invalid address length");
return NULL;
}
-
- // Convert the socket address structure to an IP string for logging.
- int ret;
- char ipstr[INET6_ADDRSTRLEN];
- ret = getnameinfo((struct sockaddr *) &ss, socklen, ipstr, sizeof(ipstr),
- NULL, 0, NI_NUMERICHOST);
- if (ret) {
- LOGE("gethostbyaddr: getnameinfo: %s", gai_strerror(ret));
- return NULL;
- }
-
- // Look up the IP address from the socket address structure.
- jstring result = NULL;
+ // Look up the host name from the IP address.
char name[NI_MAXHOST];
- ret = getnameinfo((struct sockaddr *) &ss, socklen, name, sizeof(name),
- NULL, 0, 0);
if (ret == 0) {
- LOGI("gethostbyaddr: getnameinfo: %s = %s", ipstr, name);
- result = env->NewStringUTF(name);
- } else {
- LOGE("gethostbyaddr: getnameinfo: unknown host %s: %s", ipstr,
- gai_strerror(ret));
+ ret = getnameinfo((struct sockaddr *) &ss, socklen, name, sizeof(name),
+ NULL, 0, NI_NAMEREQD);
}
- return result;
+ if (ret == 0) {
+ return env->NewStringUTF(name);
+ }
+
+ jniThrowException(env, "java/net/UnknownHostException", gai_strerror(ret));
+ return NULL;
}
/*
diff --git a/libcore/luni/src/main/native/org_apache_harmony_luni_platform_OSNetworkSystem.cpp b/libcore/luni/src/main/native/org_apache_harmony_luni_platform_OSNetworkSystem.cpp
index 22d1cd4..78ec2d0 100644
--- a/libcore/luni/src/main/native/org_apache_harmony_luni_platform_OSNetworkSystem.cpp
+++ b/libcore/luni/src/main/native/org_apache_harmony_luni_platform_OSNetworkSystem.cpp
@@ -1631,8 +1631,10 @@
*
* @param fileDescriptor the file descriptor to bind the socket to
* @param type the socket type to create, e.g., SOCK_STREAM
+ * @throws SocketException an error occurred when creating the socket
*
- * @return the socket file descriptor, or -1 on failure
+ * @return the socket file descriptor. On failure, an exception is thrown and
+ * a negative value is returned.
*
*/
static int createSocketFileDescriptor(JNIEnv* env, jobject fileDescriptor,
@@ -1651,6 +1653,7 @@
if (sock < 0) {
int err = convertError(errno);
throwSocketException(env, err);
+ return sock;
}
jniSetFileDescriptorOfFD(env, fileDescriptor, sock);
return sock;
diff --git a/libcore/luni/src/test/java/org/apache/harmony/luni/tests/java/net/InetAddressTest.java b/libcore/luni/src/test/java/org/apache/harmony/luni/tests/java/net/InetAddressTest.java
index 5c8808c..6087a46 100644
--- a/libcore/luni/src/test/java/org/apache/harmony/luni/tests/java/net/InetAddressTest.java
+++ b/libcore/luni/src/test/java/org/apache/harmony/luni/tests/java/net/InetAddressTest.java
@@ -479,10 +479,6 @@
}
}
- static final int TEST_IP_HASHCODE = 2130706433;
- static final int TEST_IP6_HASHCODE = -1022939537;
- static final int TEST_IP6_LO_HASHCODE = 1353309698;
-
/**
* @tests java.net.InetAddress#hashCode()
*/
@@ -492,28 +488,25 @@
method = "hashCode",
args = {}
)
- void assertHashCode(String literal, int expectedHashCode) {
+ int getHashCode(String literal) {
InetAddress host = null;
try {
host = InetAddress.getByName(literal);
} catch(UnknownHostException e) {
fail("Exception during hashCode test : " + e.getMessage());
}
- int hashCode = host.hashCode();
- assertEquals("incorrect hashCode for " + host, expectedHashCode,
- hashCode);
+ return host.hashCode();
}
public void test_hashCode() {
- // Test for method int java.net.InetAddress.hashCode()
- // Create InetAddresses from string literals instead of from hostnames
- // because we are only testing hashCode, not getByName. That way the
- // test does not depend on name resolution and we can test many
- // different addresses, not just localhost.
- assertHashCode(Support_Configuration.InetTestIP, TEST_IP_HASHCODE);
- assertHashCode(Support_Configuration.InetTestIP6, TEST_IP6_HASHCODE);
- assertHashCode(Support_Configuration.InetTestIP6LO,
- TEST_IP6_LO_HASHCODE);
+ int hashCode = getHashCode(Support_Configuration.InetTestIP);
+ int ip6HashCode = getHashCode(Support_Configuration.InetTestIP6);
+ int ip6LOHashCode = getHashCode(Support_Configuration.InetTestIP6LO);
+ assertFalse("Hash collision", hashCode == ip6HashCode);
+ assertFalse("Hash collision", ip6HashCode == ip6LOHashCode);
+ assertFalse("Hash collision", hashCode == ip6LOHashCode);
+ assertFalse("Hash collision", ip6LOHashCode == 0);
+ assertFalse("Hash collision", ip6LOHashCode == 1);
}
/**
diff --git a/vm/Debugger.c b/vm/Debugger.c
index 4ddf25c..3ea130d 100644
--- a/vm/Debugger.c
+++ b/vm/Debugger.c
@@ -419,7 +419,7 @@
dvmHashTableLock(gDvm.dbgRegistry);
gDvm.debuggerConnected = false;
- LOGI("Debugger has detached; object registry had %d entries\n",
+ LOGD("Debugger has detached; object registry had %d entries\n",
dvmHashTableNumEntries(gDvm.dbgRegistry));
//int i;
//for (i = 0; i < gDvm.dbgRegistryNext; i++)
diff --git a/vm/InlineNative.c b/vm/InlineNative.c
index fd28708..ec8a1fb 100644
--- a/vm/InlineNative.c
+++ b/vm/InlineNative.c
@@ -633,8 +633,11 @@
* pointer field.
*
* IMPORTANT: you must update DALVIK_VM_BUILD in DalvikVersion.h if you make
- * changes to this table. Must also be kept in sync with NativeInlineOps
- * enum in InlineNative.h.
+ * changes to this table.
+ *
+ * NOTE: If present, the JIT will also need to know about changes
+ * to this table. Update the NativeInlineOps enum in InlineNative.h and
+ * the dispatch code in compiler/codegen/<target>/Codegen.c.
*/
const InlineOperation gDvmInlineOpsTable[] = {
{ org_apache_harmony_dalvik_NativeTestTarget_emptyInlineMethod,
@@ -782,4 +785,3 @@
#endif
return (*gDvmInlineOpsTable[opIndex].func)(arg0, arg1, arg2, arg3, pResult);
}
-
diff --git a/vm/compiler/codegen/arm/ArmLIR.h b/vm/compiler/codegen/arm/ArmLIR.h
index 87978d8..be793d6 100644
--- a/vm/compiler/codegen/arm/ArmLIR.h
+++ b/vm/compiler/codegen/arm/ArmLIR.h
@@ -481,14 +481,27 @@
rd[11..8] imm8 */
THUMB2_IT, /* it [10111111] firstcond[7-4] mask[3-0] */
THUMB2_FMSTAT, /* fmstat [11101110111100011111101000010000] */
- THUMB2_VCMPED, /* vcmpe [111011101] D [11011] rd[15-12] [1011]
+ THUMB2_VCMPD, /* vcmp [111011101] D [11011] rd[15-12] [1011]
E [1] M [0] rm[3-0] */
- THUMB2_VCMPES, /* vcmpe [111011101] D [11010] rd[15-12] [1011]
+ THUMB2_VCMPS, /* vcmp [111011101] D [11010] rd[15-12] [1011]
E [1] M [0] rm[3-0] */
THUMB2_LDR_PC_REL12, /* ldr rd,[pc,#imm12] [1111100011011111] rt[15-12]
imm12[11-0] */
THUMB2_B_COND, /* b<c> [1110] S cond[25-22] imm6[21-16] [10]
J1 [0] J2 imm11[10..0] */
+ THUMB2_VMOVD_RR, /* vmov [111011101] D [110000] vd[15-12 [101101]
+ M [0] vm[3-0] */
+ THUMB2_VMOVS_RR, /* vmov [111011101] D [110000] vd[15-12 [101001]
+ M [0] vm[3-0] */
+ THUMB2_FMRS, /* vmov [111011100000] vn[19-16] rt[15-12] [1010]
+ N [0010000] */
+ THUMB2_FMSR, /* vmov [111011100001] vn[19-16] rt[15-12] [1010]
+ N [0010000] */
+ THUMB2_FMRRD, /* vmov [111011000100] rt2[19-16] rt[15-12]
+ [101100] M [1] vm[3-0] */
+ THUMB2_FMDRR, /* vmov [111011000101] rt2[19-16] rt[15-12]
+ [101100] M [1] vm[3-0] */
+
ARM_LAST,
} ArmOpCode;
diff --git a/vm/compiler/codegen/arm/Assemble.c b/vm/compiler/codegen/arm/Assemble.c
index b140457..77cbb4d 100644
--- a/vm/compiler/codegen/arm/Assemble.c
+++ b/vm/compiler/codegen/arm/Assemble.c
@@ -414,7 +414,7 @@
ENCODING_MAP(THUMB2_VDIVD, 0xee800b00,
DFP, 22, 12, DFP, 7, 16, DFP, 5, 0, UNUSED, -1, -1,
IS_TERTIARY_OP | CLOBBER_DEST,
- "vdivs", "!0S, !1S, !2S", 2),
+ "vdivd", "!0S, !1S, !2S", 2),
ENCODING_MAP(THUMB2_VCVTIF, 0xeeb80ac0,
SFP, 22, 12, SFP, 5, 0, UNUSED, -1, -1, UNUSED, -1, -1,
IS_BINARY_OP | CLOBBER_DEST,
@@ -490,11 +490,11 @@
ENCODING_MAP(THUMB2_VMOVS, 0xeeb00a40,
SFP, 22, 12, SFP, 5, 0, UNUSED, -1, -1, UNUSED, -1, -1,
IS_BINARY_OP | CLOBBER_DEST,
- "vmov.f32 ", "!0s, !1s", 2),
+ "vmov.f32 ", " !0s, !1s", 2),
ENCODING_MAP(THUMB2_VMOVD, 0xeeb00b40,
DFP, 22, 12, DFP, 5, 0, UNUSED, -1, -1, UNUSED, -1, -1,
IS_BINARY_OP | CLOBBER_DEST,
- "vmov.f64 ", "!0s, !1s", 2),
+ "vmov.f64 ", " !0S, !1S", 2),
ENCODING_MAP(THUMB2_LDMIA, 0xe8900000,
BITBLT, 19, 16, BITBLT, 15, 0, UNUSED, -1, -1, UNUSED, -1, -1,
IS_BINARY_OP | CLOBBER_DEST | CLOBBER_SRC1,
@@ -723,22 +723,47 @@
UNUSED, -1, -1, UNUSED, -1, -1, UNUSED, -1, -1, UNUSED, -1, -1,
NO_OPERAND | SETS_CCODES,
"fmstat", "", 2),
- ENCODING_MAP(THUMB2_VCMPED, 0xeeb40bc0,
+ ENCODING_MAP(THUMB2_VCMPD, 0xeeb40b40,
DFP, 22, 12, DFP, 5, 0, UNUSED, -1, -1, UNUSED, -1, -1,
IS_BINARY_OP,
- "vcmpe.f64", "!0S, !1S", 2),
- ENCODING_MAP(THUMB2_VCMPES, 0xeeb40ac0,
+ "vcmp.f64", "!0S, !1S", 2),
+ ENCODING_MAP(THUMB2_VCMPS, 0xeeb40a40,
SFP, 22, 12, SFP, 5, 0, UNUSED, -1, -1, UNUSED, -1, -1,
IS_BINARY_OP,
- "vcmpe.f32", "!0s, !1s", 2),
+ "vcmp.f32", "!0s, !1s", 2),
ENCODING_MAP(THUMB2_LDR_PC_REL12, 0xf8df0000,
BITBLT, 15, 12, BITBLT, 11, 0, UNUSED, -1, -1, UNUSED, -1, -1,
IS_TERTIARY_OP | CLOBBER_DEST,
"ldr", "r!0d,[rpc, #!1d", 2),
ENCODING_MAP(THUMB2_B_COND, 0xf0008000,
- BROFFSET, -1, -1, BITBLT, 25, 22, UNUSED, -1, -1, UNUSED, -1, -1,
+ BROFFSET, -1, -1, BITBLT, 25, 22, UNUSED, -1, -1,
+ UNUSED, -1, -1,
IS_BINARY_OP | IS_BRANCH | USES_CCODES,
"b!1c", "!0t", 2),
+ ENCODING_MAP(THUMB2_VMOVD_RR, 0xeeb00b40,
+ DFP, 22, 12, DFP, 5, 0, UNUSED, -1, -1, UNUSED, -1, -1,
+ IS_BINARY_OP | CLOBBER_DEST,
+ "vmov.f64", "!0S, !1S", 2),
+ ENCODING_MAP(THUMB2_VMOVD_RR, 0xeeb00a40,
+ SFP, 22, 12, SFP, 5, 0, UNUSED, -1, -1, UNUSED, -1, -1,
+ IS_BINARY_OP | CLOBBER_DEST,
+ "vmov.f32", "!0S, !1S", 2),
+ ENCODING_MAP(THUMB2_FMRS, 0xee100a10,
+ BITBLT, 15, 12, SFP, 8, 16, UNUSED, -1, -1, UNUSED, -1, -1,
+ IS_BINARY_OP | CLOBBER_DEST,
+ "fmrs", "r!0d, !1s", 2),
+ ENCODING_MAP(THUMB2_FMSR, 0xee000a10,
+ SFP, 8, 16, BITBLT, 15, 12, UNUSED, -1, -1, UNUSED, -1, -1,
+ IS_BINARY_OP | CLOBBER_DEST,
+ "fmsr", "!0s, r!1d", 2),
+ ENCODING_MAP(THUMB2_FMRRD, 0xec500b10,
+ BITBLT, 15, 12, BITBLT, 19, 16, DFP, 5, 0, UNUSED, -1, -1,
+ IS_TERTIARY_OP | CLOBBER_DEST | CLOBBER_SRC1,
+ "fmrrd", "r!0d, r!1d, !2S", 2),
+ ENCODING_MAP(THUMB2_FMDRR, 0xec400b10,
+ DFP, 5, 0, BITBLT, 15, 12, BITBLT, 19, 16, UNUSED, -1, -1,
+ IS_TERTIARY_OP | CLOBBER_DEST,
+ "fmdrr", "!0S, r!1d, r!2d", 2),
};
@@ -812,7 +837,8 @@
} else if (delta > 1020) {
return true;
}
- lir->operands[1] = (lir->opCode == THUMB2_LDR_PC_REL12) ? delta : delta >> 2;
+ lir->operands[1] = (lir->opCode == THUMB2_LDR_PC_REL12) ?
+ delta : delta >> 2;
} else if (lir->opCode == THUMB2_CBNZ || lir->opCode == THUMB2_CBZ) {
ArmLIR *targetLIR = (ArmLIR *) lir->generic.target;
intptr_t pc = lir->generic.offset + 4;
@@ -820,8 +846,8 @@
int delta = target - pc;
if (delta > 126 || delta < 0) {
/*
- * TODO: allow multiple kinds of assembler failure to allow us to
- * change code patterns when things don't fit.
+ * TODO: allow multiple kinds of assembler failure to allow
+ * change of code patterns when things don't fit.
*/
return true;
} else {
diff --git a/vm/compiler/codegen/arm/Thumb2Util.c b/vm/compiler/codegen/arm/Thumb2Util.c
index 559cf0d..806bd02 100644
--- a/vm/compiler/codegen/arm/Thumb2Util.c
+++ b/vm/compiler/codegen/arm/Thumb2Util.c
@@ -1232,7 +1232,11 @@
int vDest = inlinedTarget(mir);
// TUNING: handle case of src already in FP reg
if (vDest >= 0) {
- if (vDest == vSrc) {
+ /*
+ * FIXME: disable this case to to work around bug until after
+ * new schedule/ralloc mechanisms are done.
+ */
+ if (0 && (vDest == vSrc)) {
loadValue(cUnit, vSrc+1, ophi);
opRegRegImm(cUnit, OP_AND, ophi, ophi, 0x7fffffff, signMask);
storeValue(cUnit, ophi, vDest + 1, signMask);
diff --git a/vm/compiler/codegen/arm/armv5te-vfp/ArchVariant.c b/vm/compiler/codegen/arm/armv5te-vfp/ArchVariant.c
index 732172a..41a79de 100644
--- a/vm/compiler/codegen/arm/armv5te-vfp/ArchVariant.c
+++ b/vm/compiler/codegen/arm/armv5te-vfp/ArchVariant.c
@@ -116,11 +116,12 @@
{
int offset = offsetof(InterpState, retval);
OpCode opCode = mir->dalvikInsn.opCode;
- int vSrc = mir->dalvikInsn.vA;
+ int vSrc = mir->dalvikInsn.arg[0];
loadValueAddress(cUnit, vSrc, r2);
genDispatchToHandler(cUnit, TEMPLATE_SQRT_DOUBLE_VFP);
newLIR3(cUnit, THUMB_STR_RRI5, r0, rGLUE, offset >> 2);
newLIR3(cUnit, THUMB_STR_RRI5, r1, rGLUE, (offset >> 2) + 1);
+ resetRegisterScoreboard(cUnit);
return false;
}
diff --git a/vm/compiler/codegen/arm/armv7-a/ArchVariant.c b/vm/compiler/codegen/arm/armv7-a/ArchVariant.c
index 39df8c4..65e0ec0 100644
--- a/vm/compiler/codegen/arm/armv7-a/ArchVariant.c
+++ b/vm/compiler/codegen/arm/armv7-a/ArchVariant.c
@@ -14,6 +14,8 @@
* limitations under the License.
*/
+#include <math.h> // for double sqrt(double)
+
/*
* This file is included by Codegen-armv5te-vfp.c, and implements architecture
@@ -116,14 +118,26 @@
static bool genInlineSqrt(CompilationUnit *cUnit, MIR *mir)
{
int offset = offsetof(InterpState, retval);
- int vSrc = mir->dalvikInsn.vA;
+ int vSrc = mir->dalvikInsn.arg[0];
int vDest = inlinedTarget(mir);
+ ArmLIR *branch;
+ ArmLIR *target;
+
loadDouble(cUnit, vSrc, dr1);
newLIR2(cUnit, THUMB2_VSQRTD, dr0, dr1);
+ newLIR2(cUnit, THUMB2_VCMPD, dr0, dr0);
+ newLIR0(cUnit, THUMB2_FMSTAT);
+ branch = newLIR2(cUnit, THUMB_B_COND, 0, ARM_COND_EQ);
+ loadConstant(cUnit, r2, (int)sqrt);
+ newLIR3(cUnit, THUMB2_FMRRD, r0, r1, dr1);
+ newLIR1(cUnit, THUMB_BLX_R, r2);
+ newLIR3(cUnit, THUMB2_FMDRR, dr0, r0, r1);
if (vDest >= 0)
- storeDouble(cUnit, dr0, vDest, rNone);
+ target = storeDouble(cUnit, dr0, vDest, rNone);
else
- newLIR3(cUnit, THUMB2_VSTRD, dr0, rGLUE, offset >> 2);
+ target = newLIR3(cUnit, THUMB2_VSTRD, dr0, rGLUE, offset >> 2);
+ branch->generic.target = (LIR *)target;
+ resetRegisterScoreboard(cUnit);
return true;
}
@@ -304,13 +318,13 @@
loadDouble(cUnit, vSrc2, dr1);
// Hard-coded use of r7 as temp. Revisit
loadConstant(cUnit,r7, defaultResult);
- newLIR2(cUnit, THUMB2_VCMPED, dr0, dr1);
+ newLIR2(cUnit, THUMB2_VCMPD, dr0, dr1);
} else {
loadFloat(cUnit, vSrc1, fr0);
loadFloat(cUnit, vSrc2, fr2);
// Hard-coded use of r7 as temp. Revisit
loadConstant(cUnit,r7, defaultResult);
- newLIR2(cUnit, THUMB2_VCMPES, fr0, fr2);
+ newLIR2(cUnit, THUMB2_VCMPS, fr0, fr2);
}
newLIR0(cUnit, THUMB2_FMSTAT);
genIT(cUnit, (defaultResult == -1) ? ARM_COND_GT : ARM_COND_MI, "");
diff --git a/vm/compiler/template/armv5te-vfp/TEMPLATE_CMPG_DOUBLE_VFP.S b/vm/compiler/template/armv5te-vfp/TEMPLATE_CMPG_DOUBLE_VFP.S
index 3801f49..1b143a9 100644
--- a/vm/compiler/template/armv5te-vfp/TEMPLATE_CMPG_DOUBLE_VFP.S
+++ b/vm/compiler/template/armv5te-vfp/TEMPLATE_CMPG_DOUBLE_VFP.S
@@ -25,7 +25,7 @@
/* op vAA, vBB, vCC */
fldd d0, [r0] @ d0<- vBB
fldd d1, [r1] @ d1<- vCC
- fcmped d0, d1 @ compare (vBB, vCC)
+ fcmpd d0, d1 @ compare (vBB, vCC)
mov r0, #1 @ r0<- 1 (default)
fmstat @ export status flags
mvnmi r0, #0 @ (less than) r0<- -1
diff --git a/vm/compiler/template/armv5te-vfp/TEMPLATE_CMPG_FLOAT_VFP.S b/vm/compiler/template/armv5te-vfp/TEMPLATE_CMPG_FLOAT_VFP.S
index 1faafa1..0510ef6 100644
--- a/vm/compiler/template/armv5te-vfp/TEMPLATE_CMPG_FLOAT_VFP.S
+++ b/vm/compiler/template/armv5te-vfp/TEMPLATE_CMPG_FLOAT_VFP.S
@@ -24,7 +24,7 @@
/* op vAA, vBB, vCC */
flds s0, [r0] @ d0<- vBB
flds s1, [r1] @ d1<- vCC
- fcmpes s0, s1 @ compare (vBB, vCC)
+ fcmps s0, s1 @ compare (vBB, vCC)
mov r0, #1 @ r0<- 1 (default)
fmstat @ export status flags
mvnmi r0, #0 @ (less than) r0<- -1
diff --git a/vm/compiler/template/armv5te-vfp/TEMPLATE_CMPL_FLOAT_VFP.S b/vm/compiler/template/armv5te-vfp/TEMPLATE_CMPL_FLOAT_VFP.S
index 014f160..bdb42d6 100644
--- a/vm/compiler/template/armv5te-vfp/TEMPLATE_CMPL_FLOAT_VFP.S
+++ b/vm/compiler/template/armv5te-vfp/TEMPLATE_CMPL_FLOAT_VFP.S
@@ -24,7 +24,7 @@
/* op vAA, vBB, vCC */
flds s0, [r0] @ d0<- vBB
flds s1, [r1] @ d1<- vCC
- fcmpes s0, s1 @ compare (vBB, vCC)
+ fcmps s0, s1 @ compare (vBB, vCC)
mvn r0, #0 @ r0<- -1 (default)
fmstat @ export status flags
movgt r0, #1 @ (greater than) r0<- 1
diff --git a/vm/compiler/template/out/CompilerTemplateAsm-armv5te-vfp.S b/vm/compiler/template/out/CompilerTemplateAsm-armv5te-vfp.S
index fcea772..7b1d6aa 100644
--- a/vm/compiler/template/out/CompilerTemplateAsm-armv5te-vfp.S
+++ b/vm/compiler/template/out/CompilerTemplateAsm-armv5te-vfp.S
@@ -876,7 +876,7 @@
/* op vAA, vBB, vCC */
fldd d0, [r0] @ d0<- vBB
fldd d1, [r1] @ d1<- vCC
- fcmped d0, d1 @ compare (vBB, vCC)
+ fcmpd d0, d1 @ compare (vBB, vCC)
mov r0, #1 @ r0<- 1 (default)
fmstat @ export status flags
mvnmi r0, #0 @ (less than) r0<- -1
@@ -945,7 +945,7 @@
/* op vAA, vBB, vCC */
flds s0, [r0] @ d0<- vBB
flds s1, [r1] @ d1<- vCC
- fcmpes s0, s1 @ compare (vBB, vCC)
+ fcmps s0, s1 @ compare (vBB, vCC)
mov r0, #1 @ r0<- 1 (default)
fmstat @ export status flags
mvnmi r0, #0 @ (less than) r0<- -1
@@ -979,7 +979,7 @@
/* op vAA, vBB, vCC */
flds s0, [r0] @ d0<- vBB
flds s1, [r1] @ d1<- vCC
- fcmpes s0, s1 @ compare (vBB, vCC)
+ fcmps s0, s1 @ compare (vBB, vCC)
mvn r0, #0 @ r0<- -1 (default)
fmstat @ export status flags
movgt r0, #1 @ (greater than) r0<- 1
diff --git a/vm/compiler/template/out/CompilerTemplateAsm-armv7-a.S b/vm/compiler/template/out/CompilerTemplateAsm-armv7-a.S
index c5b1a52..854871b 100644
--- a/vm/compiler/template/out/CompilerTemplateAsm-armv7-a.S
+++ b/vm/compiler/template/out/CompilerTemplateAsm-armv7-a.S
@@ -876,7 +876,7 @@
/* op vAA, vBB, vCC */
fldd d0, [r0] @ d0<- vBB
fldd d1, [r1] @ d1<- vCC
- fcmped d0, d1 @ compare (vBB, vCC)
+ fcmpd d0, d1 @ compare (vBB, vCC)
mov r0, #1 @ r0<- 1 (default)
fmstat @ export status flags
mvnmi r0, #0 @ (less than) r0<- -1
@@ -945,7 +945,7 @@
/* op vAA, vBB, vCC */
flds s0, [r0] @ d0<- vBB
flds s1, [r1] @ d1<- vCC
- fcmpes s0, s1 @ compare (vBB, vCC)
+ fcmps s0, s1 @ compare (vBB, vCC)
mov r0, #1 @ r0<- 1 (default)
fmstat @ export status flags
mvnmi r0, #0 @ (less than) r0<- -1
@@ -979,7 +979,7 @@
/* op vAA, vBB, vCC */
flds s0, [r0] @ d0<- vBB
flds s1, [r1] @ d1<- vCC
- fcmpes s0, s1 @ compare (vBB, vCC)
+ fcmps s0, s1 @ compare (vBB, vCC)
mvn r0, #0 @ r0<- -1 (default)
fmstat @ export status flags
movgt r0, #1 @ (greater than) r0<- 1
diff --git a/vm/oo/Class.c b/vm/oo/Class.c
index 115a122..9f94c34 100644
--- a/vm/oo/Class.c
+++ b/vm/oo/Class.c
@@ -2418,7 +2418,7 @@
* f->byteOffset is the offset from the beginning of
* obj, not the offset into obj->instanceData.
*/
- assert(f->byteOffset >= CLASS_SMALLEST_OFFSET);
+ assert(f->byteOffset >= (int) CLASS_SMALLEST_OFFSET);
assert((f->byteOffset & (CLASS_OFFSET_ALIGNMENT - 1)) == 0);
if (CLASS_CAN_ENCODE_OFFSET(f->byteOffset)) {
u4 newBit = CLASS_BIT_FROM_OFFSET(f->byteOffset);