Skip to content

Commit

Permalink
JIT: explicitly handle __extendhfsf2 and friends
Browse files Browse the repository at this point in the history
A partial fix to #44829, but perhaps we will still have ABI problems with the sysimg (which may not link directly enough on linux in many cases)
  • Loading branch information
vtjnash committed Apr 13, 2022
1 parent 8cc00ff commit f37fcfd
Showing 1 changed file with 10 additions and 0 deletions.
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);
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

0 comments on commit f37fcfd

Please sign in to comment.