Skip to content

JIT: explicitly handle __extendhfsf2 and friends #44975

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/codegen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,11 @@ extern void _chkstk(void);
// return alloca(40960);
//}
#endif

extern float __gnu_h2f_ieee(uint16_t param);
extern float __extendhfsf2(uint16_t param);
extern uint16_t __gnu_f2h_ieee(float param);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
extern uint16_t __gnu_f2h_ieee(float param);
extern double __gnu_f2h_ieee(uint16_t param);

(not that it matters here, since we just need the declared prototype)

extern uint16_t __truncdfhf2(double param);
}

// shared llvm state
Expand Down Expand Up @@ -8305,6 +8310,11 @@ static void init_jit_functions(void)
#endif
#endif

add_named_global("__extendhfsf2", &__extendhfsf2);
add_named_global("__truncdfhf2", &__truncdfhf2);
add_named_global("__gnu_h2f_ieee", &__gnu_h2f_ieee);
add_named_global("__gnu_f2h_ieee", &__gnu_f2h_ieee);

#define BOX_F(ct) add_named_global(XSTR(jl_box_##ct), &jl_box_##ct);
BOX_F(int8); BOX_F(uint8);
BOX_F(int16); BOX_F(uint16);
Expand Down