Skip to content

Commit

Permalink
Merge branch 'pr/code_model' of github.com:bluescarni/heyoka into pr/…
Browse files Browse the repository at this point in the history
…code_model
  • Loading branch information
bluescarni committed Jul 30, 2024
2 parents 35c4cea + 91dc609 commit 8894044
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/llvm_state.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 12 additions & 2 deletions test/llvm_state.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 8894044

Please sign in to comment.