Skip to content

Commit

Permalink
Add LoongArch float to integer conversion special cases (#226)
Browse files Browse the repository at this point in the history
  • Loading branch information
lrzlin committed Jan 9, 2024
1 parent cbde0be commit 7a821cd
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion sljit_src/sljitConfigInternal.h
Expand Up @@ -198,7 +198,7 @@ extern "C" {
/* Type of public API functions. */
/*********************************/

#ifndef SLJIT_API_FUNC_ATTRIBUTE
#ifndef SLJIT_API_FUNC_ATTRIBUTE
#if (defined SLJIT_CONFIG_STATIC && SLJIT_CONFIG_STATIC)
/* Static ABI functions. For all-in-one programs. */

Expand Down Expand Up @@ -399,6 +399,10 @@ typedef double sljit_f64;
#define SLJIT_CONV_MAX_FLOAT SLJIT_CONV_RESULT_MAX_INT
#define SLJIT_CONV_MIN_FLOAT SLJIT_CONV_RESULT_MIN_INT
#define SLJIT_CONV_NAN_FLOAT SLJIT_CONV_RESULT_MIN_INT
#elif (defined SLJIT_CONFIG_LOONGARCH && SLJIT_CONFIG_LOONGARCH)
#define SLJIT_CONV_MAX_FLOAT SLJIT_CONV_RESULT_MAX_INT
#define SLJIT_CONV_MIN_FLOAT SLJIT_CONV_RESULT_MIN_INT
#define SLJIT_CONV_NAN_FLOAT SLJIT_CONV_RESULT_ZERO
#else
#error "Result for float to integer conversion is not defined"
#endif
Expand Down

0 comments on commit 7a821cd

Please sign in to comment.