Commit Graph

4983 Commits

Author SHA1 Message Date
gingerBill c20230509f Correct index to offset calculation for matrix compound literals dev-2021-11 2021-11-02 23:56:19 +00:00
gingerBill f03e0bee73 Merge branch 'master' of https://github.com/odin-lang/Odin 2021-11-02 12:54:29 +00:00
gingerBill c5cd97dd89 Improve wasm-import semantics to allow procedures from different import paths 2021-11-02 12:54:23 +00:00
Jeroen van Rijn c09d3e7bf4 Merge pull request #1265 from Kelimion/bug_report
`odin report` add Windows 10 Education Edition.
2021-11-02 02:21:01 +01:00
Jeroen van Rijn 46a394815c odin report add Windows 10 Education Edition. 2021-11-02 02:20:43 +01:00
gingerBill a4b68b93f2 Modify ABI for the wasm32 2021-11-01 23:18:39 +00:00
gingerBill e2e9b5d3b0 Remove comments 2021-11-01 23:04:00 +00:00
gingerBill b01e0fbbc2 Correct typo in soa data type debug information generation 2021-11-01 23:00:42 +00:00
Jeroen van Rijn 4f0a3eec24 Merge pull request #1263 from Kelimion/ci_build_debug
Don't run demo's `soa_struct` when under -debug.
2021-11-01 17:59:24 +01:00
Jeroen van Rijn 2a0311797c Don't run demo's soa_struct when under -debug. 2021-11-01 17:57:35 +01:00
Jeroen van Rijn 46e2b4e936 Merge pull request #1262 from Kelimion/ci_build_debug
CI: Run demo with debug info.
2021-11-01 17:45:02 +01:00
Jeroen van Rijn 96ba8f35d4 CI: Run demo with debug info. 2021-11-01 17:44:05 +01:00
gingerBill 9a5ddc5218 Merge branch 'master' of https://github.com/odin-lang/Odin 2021-11-01 16:39:07 +00:00
gingerBill 0b4cbcf409 Correct debug info for matrix type 2021-11-01 16:39:02 +00:00
Jeroen van Rijn d0cd3a7415 Merge pull request #1261 from Kelimion/bug_report
Add Windows 10 Home Core detection.
2021-11-01 14:47:18 +01:00
Jeroen van Rijn 3a167e3a75 Add Windows 10 Home Core detection. 2021-11-01 14:46:59 +01:00
Jeroen van Rijn c9e21907ea Merge pull request #1259 from Kelimion/load_or
Fix (#1258): #load and #load_or segfault when given no params.
2021-11-01 10:47:59 +01:00
Jeroen van Rijn a422d0455e Fix (#1258): #load and #load_or segfault when given no params.
Fixes #1258.
2021-11-01 10:42:57 +01:00
gingerBill 0bc3652fc7 Merge pull request #1256 from Yawning/feature/volatile-memset
Add a way to securely scrub memory
2021-10-31 23:32:46 +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
Yawning Angel ff36bd3d85 build: Support the Fedora LLVM 11 package
Fedora is on LLVM 12, and the backward compatibility package has a
non-standard name for llvm-config.
2021-10-31 20:23:03 +00:00
gingerBill 141299eb02 Change the behaviour change is for when a bit_set of range/enum and the underlying type has been specified
* If the lower bound is greater than zero, it will become zero (thus removing the compatification)
* If the lower bound is negative, it is an error

This means that an integer value N, maps directly to the N-th bit.

Example
```
foo :: enum u8 {
    a = 2,
    b = 3,
    c = 4,
}

set0: bit_set[foo]
set0 += {.a, .b}
// internally set0 == 1<<(2-2) | 1<<(3-2)

set1: bit_set[foo; u32]
set1 += {.a, .b}
// internally set1 == 1<<(2-0) | 1<<(3-0)
```
2021-10-31 19:39:01 +00:00
gingerBill efe05b3e13 Merge pull request #1252 from Kelimion/bug-report
Add new `odin report` command.
2021-10-31 19:19:56 +00:00
gingerBill b1de429d2c Merge pull request #1255 from odin-lang/wasi-wasm
`wasi_wasm32` support
2021-10-31 19:19:48 +00:00
gingerBill 5f51337a01 Add procs for wasm32 2021-10-31 19:00:01 +00:00
gingerBill fca7142a3c Correct _start export for wasm* targets 2021-10-31 16:31:20 +00:00
gingerBill bfa33bf5d3 Disable wasm64 2021-10-31 15:48:56 +00:00
gingerBill 235dae552a Ignore -use-separate-modules when targeting wasm32/wasm64 2021-10-31 15:35:09 +00:00
gingerBill a36c1ad406 Add default_allocators_wasi.odin 2021-10-31 15:28:51 +00:00
gingerBill 32506a34ff Separate out the ABI for wasm32 from 386 2021-10-31 15:23:39 +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 3de1719c17 Merge pull request #1254 from awwdev/master
remove prefix from Mix_LoadWAV
2021-10-31 15:01:44 +00:00
gingerBill 0c1675c8b0 Correct string usage 2021-10-31 15:01:13 +00:00
André 3d89c6b35d remove prefix from Mix_LoadWAV 2021-10-31 15:45:29 +01: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
Jeroen van Rijn 2a7937e2ba Add odin report command to help with bug reports.
Add new Odin command, `odin report`, which prints information helpful to resolving or reporting a bug.

```
W:\Odin> odin report

Where to find more information and get into contact when you encounter a bug:

	Website: https://odin-lang.org
	GitHub:  https://github.com/odin-lang/Odin/issues

Useful information to add to a bug report:

	Odin: dev-2021-10:256bebfe
	OS:   Windows 10 Professional (version: 20H2), build 19042.1266
	CPU:  AMD Ryzen 7 1800X Eight-Core Processor
	RAM:  65469 MiB

W:\Odin>

TODO:
- CPU name on ARM/ARM64
```
2021-10-31 13:48:13 +01: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 841a96691b Attempt to get wasm64 compiling with the correct features enabled 2021-10-31 00:37:37 +01: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
gingerBill 87952fdb8e big.Rat (Experimental) 2021-10-29 12:40:54 +01:00
gingerBill c474e137ac Merge branch 'master' of https://github.com/odin-lang/Odin 2021-10-29 00:13:28 +01:00