diff options
Diffstat (limited to 'test/example')
-rw-r--r-- | test/example/c-api-kitchen-sink.c | 10 | ||||
-rw-r--r-- | test/example/c-api-kitchen-sink.txt | 4 |
2 files changed, 6 insertions, 8 deletions
diff --git a/test/example/c-api-kitchen-sink.c b/test/example/c-api-kitchen-sink.c index 43069c865..e0b4a5ec4 100644 --- a/test/example/c-api-kitchen-sink.c +++ b/test/example/c-api-kitchen-sink.c @@ -161,6 +161,7 @@ void test_types() { } void test_features() { + printf("BinaryenFeatureMVP: %d\n", BinaryenFeatureMVP()); printf("BinaryenFeatureAtomics: %d\n", BinaryenFeatureAtomics()); printf("BinaryenFeatureBulkMemory: %d\n", BinaryenFeatureBulkMemory()); printf("BinaryenFeatureMutableGlobals: %d\n", BinaryenFeatureMutableGlobals()); @@ -168,6 +169,7 @@ void test_features() { printf("BinaryenFeatureSignExt: %d\n", BinaryenFeatureSignExt()); printf("BinaryenFeatureSIMD128: %d\n", BinaryenFeatureSIMD128()); printf("BinaryenFeatureExceptionHandling: %d\n", BinaryenFeatureExceptionHandling()); + printf("BinaryenFeatureAll: %d\n", BinaryenFeatureAll()); } void test_core() { @@ -521,13 +523,7 @@ void test_core() { // A bunch of our code needs drop(), auto-add it BinaryenModuleAutoDrop(module); - BinaryenFeatures features = - BinaryenFeatureAtomics() | - BinaryenFeatureBulkMemory() | - BinaryenFeatureNontrappingFPToInt() | - BinaryenFeatureSignExt() | - BinaryenFeatureSIMD128(); - + BinaryenFeatures features = BinaryenFeatureAll(); BinaryenModuleSetFeatures(module, features); assert(BinaryenModuleGetFeatures(module) == features); diff --git a/test/example/c-api-kitchen-sink.txt b/test/example/c-api-kitchen-sink.txt index f1eba84b7..c9bcc4b68 100644 --- a/test/example/c-api-kitchen-sink.txt +++ b/test/example/c-api-kitchen-sink.txt @@ -7,6 +7,7 @@ BinaryenTypeVec128: 5 BinaryenTypeExceptRef: 6 BinaryenTypeUnreachable: 7 BinaryenTypeAuto: -1 +BinaryenFeatureMVP: 0 BinaryenFeatureAtomics: 1 BinaryenFeatureBulkMemory: 16 BinaryenFeatureMutableGlobals: 2 @@ -14,6 +15,7 @@ BinaryenFeatureNontrappingFPToInt: 4 BinaryenFeatureSignExt: 32 BinaryenFeatureSIMD128: 8 BinaryenFeatureExceptionHandling: 64 +BinaryenFeatureAll: 127 (f32.neg (f32.const -33.61199951171875) ) @@ -3341,7 +3343,7 @@ int main() { functionTypes[3] = BinaryenAddFunctionType(the_module, NULL, 0, paramTypes, 0); } BinaryenModuleAutoDrop(the_module); - BinaryenModuleSetFeatures(the_module, 61); + BinaryenModuleSetFeatures(the_module, 127); BinaryenModuleGetFeatures(the_module); BinaryenModuleValidate(the_module); BinaryenModulePrint(the_module); |