Commit Graph

6369 Commits

Author SHA1 Message Date
Jay Petacat
694d8831c3 Revert "x86" CPU model (not arch) back to "i386"
PR #13101 recently renamed the "i386" architecture to "x86", and it
seems the specific CPU model got swept up in that. "x86" is an umbrella
term that describes a family of CPUs, and the "i386" is the oldest
supported model under that umbrella.
2022-11-06 13:39:03 +01:00
delitako
c8a5ad6d9d
Improve doc comments for two functions (#13456)
* std.heap: fix function name in doc comment

* std.mem: document return value of `replace`
2022-11-05 22:55:50 +01:00
Ali Chraghi
aea617c60b std.os: take advantage of the freebsd's copy_file_range 2022-11-05 15:43:39 -04:00
Jakub Konka
83d89a05b7 coff: compile and link simple exit program on arm64
* make image base target dependent
* fix relocs to imports
2022-11-05 10:15:01 +01:00
Andrew Kelley
1d68045919
Merge pull request #13101 from alichraghi/o4 2022-11-05 02:34:24 -04:00
Veikka Tuominen
986b7ce5b2 rename i386-linux-gnu to x86-linux-gnu 2022-11-04 16:41:23 +02:00
Veikka Tuominen
8c4faa5f3f
Merge pull request #13338 from Vexu/stage2-compile-errors
Improve some error messages
2022-11-04 16:04:31 +02:00
Andrew Kelley
42755a1944
Merge pull request #13430 from ziglang/stack-probe-msvc
Miscellaneous arm64 windows fixes
2022-11-03 19:49:10 -04:00
Ali Chraghi
f5f1f8c666 all: rename i386 to x86 2022-11-04 00:09:27 +03:30
Yujiri
b19161ba9c Add docstrings to some functions in std.meta 2022-11-03 17:37:38 +02:00
Veikka Tuominen
678f3f6e65
Merge pull request #13276 from r00ster91/stem
std.fs.path: add stem()
2022-11-03 16:45:37 +02:00
Jakub Konka
480c3c4d0a compiler_rt: fix duplicate symbol error when linking libc on arm64 Windows 2022-11-03 14:41:28 +01:00
Frank Denis
96793530cd
std.crypto.pwhash.bcrypt: inline the Feistel network function (#13416)
std/crypto/benchmark.zig results:

* Intel i5

before: 3.144 s/ops
 after: 1.922 s/ops

* Apple M1

before: 2.067 s/ops
 after: 1.373 s/ops
2022-11-03 13:10:08 +01:00
Nathan Bourgeois
e64eef366c
Translate-C Remainder Macro Fix 2022-11-03 14:07:00 +02:00
Jacob Young
085f6fd8f7 cbe: use wrapping for left shifts 2022-11-02 23:00:10 -04:00
Jacob Young
fa46f9a3d7 cbe: fix extern 2022-11-02 21:42:40 -04:00
Eric Milliken
b40fc70188
std.time: add microTimestamp() (#13327) 2022-11-02 23:20:19 +01:00
Andrew Kelley
e50789f1cb
Merge pull request #13389 from jacobly0/fix-only-c
cbe: enough fixes for `-Donly-c` to be able to produce an executable
2022-11-02 15:53:59 -04:00
Jacob Young
771dadc5e0 x86: cleanup inline asm
Multiple outputs work now, so use that instead of deleting clobbers.
2022-11-01 20:39:06 -04:00
Jacob Young
9b2db56d0f x86: remove inline asm clobbers that conflict with inputs or outputs 2022-11-01 20:39:06 -04:00
Jacob Young
91fe0b80a2 cbe: fix threadlocal 2022-11-01 20:38:51 -04:00
Jacob Young
757db665a7 build: remove ofmt from LibExeObjStep which is redundant with target.ofmt 2022-11-01 20:38:37 -04:00
Jacob Young
93d60d0de7 std: avoid vector usage with the C backend
Vectors are not yet implemented in the C backend, so no reason to
prevent code using the standard library from compiling in the meantime.
2022-11-01 20:38:37 -04:00
joachimschmidt557
3051fab97c
stage2 AArch64: misc fixes, enable printing in test runner
- Fixed missing airRetPtr implementation
- Fixed wrong pop_regs order
- Fixed wrong source and destination register in store
2022-11-01 20:44:18 +01:00
Frank Denis
0d192ee9ef
std.crypto.onetimeauth.Ghash: make GHASH 2 - 2.5x faster (#13374)
Rewrite GHASH to use 128-bit multiplication over non-reversed
integers, and up to 8 blocks aggregated reduction.

lib/std/crypto/benchmark.zig results:

Xeon E5:
  Before: 1604 MiB/s
   After: 4005 MiB/s

Apple M1:
  Before: 2769 MiB/s
   After: 6014 MiB/s

This also makes AES-GCM faster by the way.
2022-11-01 13:49:13 -04:00
Andrew Kelley
1780d7a348
Merge pull request #13368 from jacobly0/fix-aarch64-c 2022-11-01 13:28:40 -04:00
mnordine
2943df016e
Fix variable name in documentation sample (#13391) 2022-11-01 12:49:13 +01:00
Frank Denis
ddb9eac05c ed25519: recommend using the seed to recover a key pair 2022-11-01 07:26:32 +01:00
Frank Denis
9e44710fc4
Ed25519.KeyPair.fromSecretKey() didn't compile after the API changes (#13386)
Fixes #13378
2022-11-01 07:10:40 +01:00
Jacob Young
b945d3eb90 cbe: improve support for non-native float types
* Fix _start on aarch64.
 * Add fallbacks when a float type is unsupported.

Fixes #13357
2022-10-31 20:18:15 -04:00
Andrew Kelley
d02242661e std.heap: make wasm32 PageAllocator handle large allocation
When a number of bytes to be allocated is so great that alignForward()
is not possible, return `error.OutOfMemory`.

Companion commit to 3f3003097c.
2022-10-30 19:28:26 -07:00
Andrew Kelley
6d999abba0 mingw-w64: add gdiplus def files
closes #13192
2022-10-30 19:04:00 -07:00
Andrew Kelley
3e126102b7 compiler_rt: fix gnu_f16_abi for i386-windows
closes #13333
2022-10-30 18:42:59 -07:00
Andrew Kelley
3f3003097c std.heap.PageAllocator: add check for large allocation
Instead of making the memory alignment functions more complicated, I
added more API documentation for their existing semantics.

closes #12118
closes #12135
2022-10-30 16:10:20 -07:00
Nameless
40e84a27d6
change uefi packed structs to new integer backed syntax (#13173)
* std.os.uefi: integer backed structs, add tests to catch regressions

device_path_protocol now uses extern structs with align(1) fields because
the transition to integer backed packed struct broke alignment

added comptime asserts that device_path_protocol structs do not violate
alignment and size specifications
2022-10-30 15:08:32 -04:00
Loris Cro
1696434063
Merge pull request #13300 from jcalabro/master
Better Autodoc Src File Links
2022-10-30 17:20:57 +01:00
Loris Cro
d4487b6a2e autodoc: update to new func zir body structure
this is a hack meant to restore functionality for the upcoming release,
a proper analysis of the new zir structure is required to make a robust
change.
2022-10-30 17:17:34 +01:00
Andrew Kelley
5339cac2ef std: re-enable auto hash test
It was temporarily disabled due to a self-hosted compiler
miscompilation.

closes #12178
2022-10-30 01:09:31 -07:00
Andrew Kelley
209a0d2a83
Merge pull request #13153 from squeek502/iterator-filename-limits
Windows: Fix Iterator name buffer size not handling all possible file name components
2022-10-29 23:50:37 -04:00
Andrew Kelley
5f5a20ebaf
Merge pull request #13093 from jacobly0/backend-fixes
C backend fixes
2022-10-29 23:06:59 -04:00
kkHAIKE
949cca9f2a Allocator: fix len_align calc in large type size case 2022-10-29 17:53:56 -04:00
Ryan Liptak
db80225a97 fs: Some NAME_MAX/MAX_NAME_BYTES improvements 2022-10-29 14:30:46 -07:00
Ryan Liptak
348f73502e Make MAX_NAME_BYTES on WASI equivalent to the max of the other platforms
Make the test use the minimum length and set MAX_NAME_BYTES to the maximum so that:
- the test will work on any host platform
- *and* the MAX_NAME_BYTES will be able to hold the max file name component on any host platform
2022-10-29 14:30:46 -07:00
Ryan Liptak
c5d23161fc Set wasi MAX_NAME_BYTES to minimum of the rest of the supported platforms
This is a slightly weird situation, because the 'real' value may depend on the host platform that the WASI is being executed on.
2022-10-29 14:30:45 -07:00
Ryan Liptak
dd0962d5ea Add wasi branch to MAX_NAME_BYTES 2022-10-29 14:30:45 -07:00
Ryan Liptak
c6ff1a7160 Windows: Fix iterator name buffer size not handling all possible file name components
Each u16 within a file name component can be encoded as up to 3 UTF-8 bytes, so we need to use MAX_NAME_BYTES to account for all possible UTF-8 encoded names.

Fixes #8268
2022-10-29 14:30:44 -07:00
Ryan Liptak
33fdc43714 std.fs: Add MAX_NAME_BYTES
Also add some NAME_MAX or equivalent definitions where necessary
2022-10-29 14:30:43 -07:00
Jacob Young
4364f51476 cbe: finish partial zig_noreturn rewrite 2022-10-29 16:54:50 -04:00
fn ⌃ ⌥
a70c86e661 Fix deprecation docs for isAlpha and isCntrl 2022-10-29 15:22:05 -04:00
Veikka Tuominen
278c32976e parser: add helpful error for extra = in variable initializer
Closes #12768
2022-10-29 14:55:43 +03:00