lp://staging/~mgiuca/mars/llvm-backend-gmp
Adding GMP (GNU Multiple Precision Arithmetic library) support to the Mars LLVM backend. This will make the Int type have the correct bignum semantics, rather than the current 32-bit wraparound behaviour.
- Get this branch:
- bzr branch lp://staging/~mgiuca/mars/llvm-backend-gmp
Branch merges
Branch information
Recent revisions
- 1242. By Matt Giuca
-
lib/runtime: mars.mars_
string_ to_c_string now correctly extracts integers from GMP format. - 1241. By Matt Giuca
-
lib/runtime: Rewrite a lot of builtins to use the GMP library rather than casting ints to pointers (such builtins now work with bigints).
Note that this is highly unstable; any builtins which haven't been changed will treat pointers as integers.
This build is utterly broken. - 1240. By Matt Giuca
-
lib/runtime: Change the type of Int to a mpz_ptr (mpz_t*).
Ints are now conceptually represented as pointers to GMP big integers. However, currently the implementation still just casts 32-bit ints to pointers as it always has (so it doesn't actually work for big ints). - 1239. By Matt Giuca
-
backend_llvm: ld_intlit now compiles to a call to mars.new_int_si, rather than directly casting to an i8*.
This will be compatible with a future change of the definition of the %Int type. - 1236. By Matt Giuca
-
Makefile: Mars is now linked with libgmp, which will be required by the runtime system.
- 1233. By Matt Giuca
-
lib/runtime: div and mod now perform adjustments to use floored division rather than truncated division.
Two test_builtin cases now pass.
Branch metadata
- Branch format:
- Branch format 7
- Repository format:
- Bazaar repository format 2a (needs bzr 1.16 or later)
- Stacked on:
- lp://staging/mars