summaryrefslogtreecommitdiff
path: root/source/luametatex/cmake
diff options
context:
space:
mode:
Diffstat (limited to 'source/luametatex/cmake')
-rw-r--r--source/luametatex/cmake/luametatex.cmake1
-rw-r--r--source/luametatex/cmake/mimalloc.cmake2
-rw-r--r--source/luametatex/cmake/mp.cmake2
-rw-r--r--source/luametatex/cmake/softposit.cmake126
-rw-r--r--source/luametatex/cmake/tex.cmake3
5 files changed, 133 insertions, 1 deletions
diff --git a/source/luametatex/cmake/luametatex.cmake b/source/luametatex/cmake/luametatex.cmake
index eabef915b..e1ce40b63 100644
--- a/source/luametatex/cmake/luametatex.cmake
+++ b/source/luametatex/cmake/luametatex.cmake
@@ -23,6 +23,7 @@ target_link_libraries(luametatex
pplib
miniz
+ softposit
)
if (LUAMETATEX_NOLDL)
diff --git a/source/luametatex/cmake/mimalloc.cmake b/source/luametatex/cmake/mimalloc.cmake
index 02992344e..ba8e2ed49 100644
--- a/source/luametatex/cmake/mimalloc.cmake
+++ b/source/luametatex/cmake/mimalloc.cmake
@@ -13,7 +13,7 @@ set(mimalloc_sources
source/libraries/mimalloc/src/page.c
source/libraries/mimalloc/src/random.c
source/libraries/mimalloc/src/segment.c
- source/libraries/mimalloc/src/segment-cache.c
+ source/libraries/mimalloc/src/segment-map.c
source/libraries/mimalloc/src/stats.c
source/libraries/mimalloc/src/prim/prim.c
)
diff --git a/source/luametatex/cmake/mp.cmake b/source/luametatex/cmake/mp.cmake
index 22680cdb7..4870178fd 100644
--- a/source/luametatex/cmake/mp.cmake
+++ b/source/luametatex/cmake/mp.cmake
@@ -6,6 +6,7 @@ set(mp_sources
source/mp/mpc/mpmathdouble.c
source/mp/mpc/mpmathbinary.c
source/mp/mpc/mpmathdecimal.c
+ source/mp/mpc/mpmathposit.c
source/libraries/decnumber/decContext.c
source/libraries/decnumber/decNumber.c
@@ -29,6 +30,7 @@ target_include_directories(mp PRIVATE
source/libraries/decnumber
source/utilities
source/libraries/mimalloc/include
+ source/libraries/softposit/source/include
)
target_compile_definitions(mp PUBLIC
diff --git a/source/luametatex/cmake/softposit.cmake b/source/luametatex/cmake/softposit.cmake
new file mode 100644
index 000000000..2964464ba
--- /dev/null
+++ b/source/luametatex/cmake/softposit.cmake
@@ -0,0 +1,126 @@
+set(softposit_sources
+
+# source/libraries/softposit/source/s_addMagsP8.c
+# source/libraries/softposit/source/s_subMagsP8.c
+# source/libraries/softposit/source/s_mulAddP8.c
+# source/libraries/softposit/source/p8_add.c
+# source/libraries/softposit/source/p8_sub.c
+# source/libraries/softposit/source/p8_mul.c
+# source/libraries/softposit/source/p8_div.c
+# source/libraries/softposit/source/p8_sqrt.c
+# source/libraries/softposit/source/p8_to_p16.c
+# source/libraries/softposit/source/p8_to_p32.c
+# source/libraries/softposit/source/p8_to_pX2.c
+# source/libraries/softposit/source/p8_to_i32.c
+# source/libraries/softposit/source/p8_to_i64.c
+# source/libraries/softposit/source/p8_to_ui32.c
+# source/libraries/softposit/source/p8_to_ui64.c
+# source/libraries/softposit/source/p8_roundToInt.c
+# source/libraries/softposit/source/p8_mulAdd.c
+# source/libraries/softposit/source/p8_eq.c
+# source/libraries/softposit/source/p8_le.c
+# source/libraries/softposit/source/p8_lt.c
+# source/libraries/softposit/source/quire8_fdp_add.c
+# source/libraries/softposit/source/quire8_fdp_sub.c
+# source/libraries/softposit/source/ui32_to_p8.c
+# source/libraries/softposit/source/ui64_to_p8.c
+# source/libraries/softposit/source/i32_to_p8.c
+# source/libraries/softposit/source/i64_to_p8.c
+
+# source/libraries/softposit/source/s_addMagsP16.c
+# source/libraries/softposit/source/s_subMagsP16.c
+# source/libraries/softposit/source/s_mulAddP16.c
+# source/libraries/softposit/source/p16_to_ui32.c
+# source/libraries/softposit/source/p16_to_ui64.c
+# source/libraries/softposit/source/p16_to_i32.c
+# source/libraries/softposit/source/p16_to_i64.c
+# source/libraries/softposit/source/p16_to_p8.c
+# source/libraries/softposit/source/p16_to_p32.c
+# source/libraries/softposit/source/p16_to_pX2.c
+# source/libraries/softposit/source/p16_roundToInt.c
+# source/libraries/softposit/source/p16_add.c
+# source/libraries/softposit/source/p16_sub.c
+# source/libraries/softposit/source/p16_mul.c
+# source/libraries/softposit/source/p16_mulAdd.c
+# source/libraries/softposit/source/p16_div.c
+# source/libraries/softposit/source/p16_eq.c
+# source/libraries/softposit/source/p16_le.c
+# source/libraries/softposit/source/p16_lt.c
+# source/libraries/softposit/source/p16_sqrt.c
+# source/libraries/softposit/source/quire16_fdp_add.c
+# source/libraries/softposit/source/quire16_fdp_sub.c
+# source/libraries/softposit/source/quire_helper.c
+# source/libraries/softposit/source/ui32_to_p16.c
+# source/libraries/softposit/source/ui64_to_p16.c
+# source/libraries/softposit/source/i32_to_p16.c
+# source/libraries/softposit/source/i64_to_p16.c
+
+ source/libraries/softposit/source/s_addMagsP32.c
+ source/libraries/softposit/source/s_subMagsP32.c
+ source/libraries/softposit/source/s_mulAddP32.c
+ source/libraries/softposit/source/p32_to_ui32.c
+ source/libraries/softposit/source/p32_to_ui64.c
+ source/libraries/softposit/source/p32_to_i32.c
+ source/libraries/softposit/source/p32_to_i64.c
+# source/libraries/softposit/source/p32_to_p8.c
+# source/libraries/softposit/source/p32_to_p16.c
+##source/libraries/softposit/source/p32_to_pX2.c
+ source/libraries/softposit/source/p32_roundToInt.c
+ source/libraries/softposit/source/p32_add.c
+ source/libraries/softposit/source/p32_sub.c
+ source/libraries/softposit/source/p32_mul.c
+ source/libraries/softposit/source/p32_mulAdd.c
+ source/libraries/softposit/source/p32_div.c
+ source/libraries/softposit/source/p32_eq.c
+ source/libraries/softposit/source/p32_le.c
+ source/libraries/softposit/source/p32_lt.c
+ source/libraries/softposit/source/p32_sqrt.c
+##source/libraries/softposit/source/quire32_fdp_add.c
+##source/libraries/softposit/source/quire32_fdp_sub.c
+ source/libraries/softposit/source/ui32_to_p32.c
+ source/libraries/softposit/source/ui64_to_p32.c
+ source/libraries/softposit/source/i32_to_p32.c
+ source/libraries/softposit/source/i64_to_p32.c
+ source/libraries/softposit/source/s_approxRecipSqrt_1Ks.c
+# source/libraries/softposit/source/c_convertDecToPosit8.c
+# source/libraries/softposit/source/c_convertPosit8ToDec.c
+# source/libraries/softposit/source/c_convertDecToPosit16.c
+# source/libraries/softposit/source/c_convertPosit16ToDec.c
+# source/libraries/softposit/source/c_convertQuire8ToPosit8.c
+# source/libraries/softposit/source/c_convertQuire16ToPosit16.c
+##source/libraries/softposit/source/c_convertQuire32ToPosit32.c
+ source/libraries/softposit/source/c_convertDecToPosit32.c
+ source/libraries/softposit/source/c_convertPosit32ToDec.c
+ source/libraries/softposit/source/c_int.c
+##source/libraries/softposit/source/s_addMagsPX2.c
+##source/libraries/softposit/source/s_subMagsPX2.c
+##source/libraries/softposit/source/s_mulAddPX2.c
+##source/libraries/softposit/source/pX2_add.c
+##source/libraries/softposit/source/pX2_sub.c
+##source/libraries/softposit/source/pX2_mul.c
+##source/libraries/softposit/source/pX2_div.c
+##source/libraries/softposit/source/pX2_mulAdd.c
+##source/libraries/softposit/source/pX2_roundToInt.c
+##source/libraries/softposit/source/pX2_sqrt.c
+##source/libraries/softposit/source/pX2_eq.c
+##source/libraries/softposit/source/pX2_le.c
+##source/libraries/softposit/source/pX2_lt.c
+##source/libraries/softposit/source/ui32_to_pX2.c
+# source/libraries/softposit/source/ui64_to_pX2.c
+##source/libraries/softposit/source/i32_to_pX2.c
+# source/libraries/softposit/source/i64_to_pX2.c
+##source/libraries/softposit/source/c_convertQuireX2ToPositX2.c
+
+)
+
+add_library(softposit STATIC ${softposit_sources})
+
+target_include_directories(softposit PRIVATE
+ source/libraries/softposit/source
+ source/libraries/softposit/source/include
+ source/libraries/softposit/build/Linux-x86_64-GCC
+)
+
+target_compile_options(softposit PRIVATE
+ -DSOFTPOSIT_FAST_INT64
+) \ No newline at end of file
diff --git a/source/luametatex/cmake/tex.cmake b/source/luametatex/cmake/tex.cmake
index 83820aa1c..4a4c78110 100644
--- a/source/luametatex/cmake/tex.cmake
+++ b/source/luametatex/cmake/tex.cmake
@@ -6,6 +6,7 @@ set(tex_sources
source/utilities/auxsystem.c
source/utilities/auxunistring.c
source/utilities/auxfile.c
+ source/utilities/auxposit.c
source/libraries/hnj/hnjhyphen.c
@@ -39,6 +40,7 @@ set(tex_sources
source/luarest/lmtxcomplexlib.c
source/luarest/lmtziplib.c
source/luarest/lmtsparselib.c
+ source/luarest/lmtposit.c
source/tex/texalign.c
source/tex/texarithmetic.c
@@ -96,4 +98,5 @@ target_include_directories(tex PRIVATE
source/libraries/pplib/util
source/luacore/lua54/src
source/libraries/mimalloc/include
+ source/libraries/softposit/source/include
)