Skip to content

Commit 669b2a7

Browse files
committed
Force translated SIMD.isSupported method to return true
1 parent 4859c50 commit 669b2a7

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

vm/ByteCodeTranslator/src/com/codename1/tools/translator/BytecodeMethod.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -837,6 +837,12 @@ public void appendMethodC(StringBuilder b) {
837837
}
838838
appendCMethodPrefix(b, "");
839839
b.append(" {\n");
840+
if (("com/codename1/simd/SIMD".equals(clsName) || "com_codename1_simd_SIMD".equals(clsName))
841+
&& "isSupported".equals(methodName)
842+
&& "()Z".equals(desc)) {
843+
b.append(" return 1;\n}\n\n");
844+
return;
845+
}
840846
if(eliminated) {
841847
if(returnType.isVoid()) {
842848
b.append(" return;\n}\n\n");

0 commit comments

Comments
 (0)