Commit Graph

2168 Commits

Author SHA1 Message Date
zhibog
c24454ae70 Removed context switching system from the crypto library to simplify the code 2021-11-09 16:50:13 +01:00
Jeroen van Rijn
0a3b75c5f5 [core:os/os2] Keep -vet happy. 2021-11-09 14:06:14 +01:00
gingerBill
3d35c5ceb1 Merge branch 'master' of https://github.com/odin-lang/Odin 2021-11-08 12:16:04 +00:00
gingerBill
a674e842d0 Improve matrix indices to offset logic 2021-11-08 12:15:57 +00:00
zhibog
483afe462b Fix order of operations to make it correct and work with -o:speed flaf 2021-11-07 18:53:30 +01:00
gingerBill
1296fabe2c Fix typos 2021-11-07 16:20:04 +00:00
gingerBill
dc2edd3e79 Improve support for freestanding_wasm32 2021-11-07 16:19:27 +00:00
Daniel Gavin
5b074ceee5 Add json encoding test + fix enum not being set on success. 2021-11-07 14:35:52 +01:00
gingerBill
adb5928767 Change to RUNTIME_LINKAGE definition 2021-11-04 20:21:51 +00:00
gingerBill
a22120fe94 Reorganize code 2021-11-04 17:38:58 +00:00
gingerBill
ae25eaf10c Correct foreign import library usage 2021-11-04 17:25:37 +00:00
gingerBill
adcfca966e Use Rtl*Memory procedures with -no-crt on Windows 2021-11-04 17:24:28 +00:00
gingerBill
d8e34bd9b7 Add core:math/linalg/hlsl 2021-11-04 17:08:59 +00:00
gingerBill
d551144841 Add inverse for dmatN types 2021-11-04 16:09:19 +00:00
gingerBill
84540d7aa2 Add smoothstep 2021-11-04 15:57:27 +00:00
gingerBill
95f36d4fa5 Minor reorganization 2021-11-04 14:54:55 +00:00
gingerBill
3accf4048e Add f64 variants of all types and procedures 2021-11-04 14:52:03 +00:00
gingerBill
eb05879148 Add more comments 2021-11-04 14:25:34 +00:00
gingerBill
a882118c56 Add comments 2021-11-04 14:20:47 +00:00
gingerBill
57d15ac6e7 Remove unneeded suffixes 2021-11-04 14:11:34 +00:00
gingerBill
e3cfdf6982 Remove build tag 2021-11-04 14:11:04 +00:00
gingerBill
017fe10762 core:math/linalg/glsl - GLSL-like mathematics types and operations 2021-11-04 14:09:12 +00:00
gingerBill
7bb7a741c6 Make math procedure contextless; Add asinh, acosh, atanh 2021-11-04 14:07:05 +00:00
gingerBill
14351c5bf2 Simplify logic for procs.odin 2021-11-04 13:56:38 +00:00
gingerBill
7ef3c87dbb Change RUNTIME_LINKAGE requirements 2021-11-04 13:52:53 +00:00
gingerBill
b2a2aa15c2 Add ODIN_BUILD_MODE 2021-11-04 12:49:39 +00:00
gingerBill
6ded538546 @(linkage=<string>) for procedures and variables; @(require) for procedures; package runtime linkage improvements; Subsequence improvements to lb_run_remove_unused_function_pass 2021-11-04 12:40:50 +00:00
gingerBill
3fa7dabaa8 Correctly support -default-to-nil-allocator for all platforms 2021-11-04 11:03:21 +00:00
gingerBill
9ab71ca0da Add ODIN_NO_CRT global constant 2021-11-04 00:50:28 +00:00
gingerBill
9896205a06 Make runtime builtin matrix procedures contextless 2021-11-03 12:44:34 +00:00
gingerBill
8a626ef564 Minor comments about matrix printing 2021-11-03 11:34:47 +00:00
gingerBill
8429943569 Represent matrices in fmt as expected 2021-11-03 11:27:21 +00:00
gingerBill
edd12d505d Correct fmt for matrices 2021-11-03 11:20:04 +00:00
Yawning Angel
672fc9fc4d core/mem: Add zero_explicit
This call is intended to provide the ability to securely scrub memory
without compiler interference, in a similar manner to explicit_bzero,
memset_s, SecureZeroMemory.

The approach taken is a volatile memset followed by a seqentially
consistent memory fence, to prevent the call from being optimized away
by DSE, and from being reordered.  An identical approach is currently
being used by the zeroize Rust crate, and is effective in practice.

LLVM IR output:
```
; Function Attrs: nounwind
define internal i8* @mem.zero_explicit(i8* %0, i64 %1) #0 {
decls:
  call void @llvm.memset.p0i8.i64(i8* %0, i8 0, i64 %1, i1 true)
  fence seq_cst
  ret i8* %0
}
```
2021-10-31 22:57:13 +00:00
Yawning Angel
796a0c3968 core/intrinsics: Add mem_zero_volatile 2021-10-31 21:37:22 +00:00
gingerBill
5f51337a01 Add procs for wasm32 2021-10-31 19:00:01 +00:00
gingerBill
a36c1ad406 Add default_allocators_wasi.odin 2021-10-31 15:28:51 +00:00
gingerBill
3224d04df8 Stub out os.open for wasi 2021-10-31 15:22:54 +00:00
gingerBill
c13c30b466 Update wasi to use string and slice types 2021-10-31 15:21:39 +00:00
gingerBill
0c1675c8b0 Correct string usage 2021-10-31 15:01:13 +00:00
gingerBill
22982586f1 Add basic support for wasi in package os 2021-10-31 13:45:00 +00:00
gingerBill
0d2c8dfeec Separate os-specific things to separate file 2021-10-31 13:44:21 +00:00
gingerBill
305e965bcb Add os_specific_wasi.odin 2021-10-31 13:08:19 +00:00
gingerBill
906c7ef0fc Correct wasi linking 2021-10-31 13:04:28 +00:00
gingerBill
2a5b8f53fe Add memmove and memset support for wasm 2021-10-31 12:47:50 +00:00
gingerBill
c6e08b059b Move sys/wasi to sys/wasm/wasi 2021-10-31 12:30:10 +00:00
gingerBill
9a5216921c Add wasi_wasm32 2021-10-31 01:08:17 +00:00
gingerBill
8a2078aa90 Add core:sys/wasi 2021-10-31 01:06:27 +00:00
gingerBill
8ef6f9dd7b Compile wasm64; Add lb_run_remove_unused_function_pass 2021-10-31 00:11:38 +01:00
gingerBill
5bc8a491a7 Begin work on supporting wasm64; Correct wasm32 compilation behaviour 2021-10-30 23:24:34 +01:00