diff --git a/src/llvm_state.cpp b/src/llvm_state.cpp index d3227a4b3..4ae2430e5 100644 --- a/src/llvm_state.cpp +++ b/src/llvm_state.cpp @@ -423,7 +423,7 @@ struct llvm_state::jit { #elif defined(HEYOKA_ARCH_ARM) code_model::tiny, code_model::small, code_model::large #elif defined(HEYOKA_ARCH_PPC) - code_model::tiny, code_model::small, code_model::medium, code_model::large + code_model::small, code_model::medium, code_model::large #else // NOTE: by default we assume only small and large are supported. code_model::small, code_model::large diff --git a/test/llvm_state.cpp b/test/llvm_state.cpp index 9d43a2cd1..57d61782f 100644 --- a/test/llvm_state.cpp +++ b/test/llvm_state.cpp @@ -434,8 +434,18 @@ TEST_CASE("code model") { using Catch::Matchers::Message; - // code_model::tiny not supported on x86. -#if defined(HEYOKA_ARCH_X86) + // code_model::small supported on all platofrms. + { + llvm_state s; + REQUIRE(s.get_code_model() == code_model::small); + + std::ostringstream oss; + oss << s.get_code_model(); + REQUIRE(oss.str() == "small"); + } + + // code_model::tiny not supported on x86 or ppc. +#if defined(HEYOKA_ARCH_X86) || defined(HEYOKA_ARCH_PPC) { std::ostringstream oss;