| ... | @@ -3645,14 +3645,12 @@ pub fn teb() *TEB { | ... | @@ -3645,14 +3645,12 @@ pub fn teb() *TEB { |
| 3645 | } | 3645 | } |
| 3646 | | 3646 | |
| 3647 | pub fn peb() *PEB { | 3647 | pub fn peb() *PEB { |
| 3648 | if (builtin.zig_backend == .stage2_c) switch (native_arch) { | 3648 | if (builtin.zig_backend == .stage2_c) return @ptrCast(@alignCast(struct { |
| 3649 | .x86, .x86_64 => return @ptrCast(@alignCast(struct { | 3649 | /// This is a workaround for the C backend until zig has the ability to put |
| 3650 | /// This is a workaround for the C backend until zig has the ability to put | 3650 | /// C code in inline assembly. |
| 3651 | /// C code in inline assembly. | 3651 | extern fn zig_windows_peb() callconv(.c) *anyopaque; |
| 3652 | extern fn zig_windows_peb() callconv(.c) *anyopaque; | 3652 | }.zig_windows_peb())); |
| 3653 | }.zig_windows_peb())), | 3653 | switch (native_arch) { |
| 3654 | else => {}, | | |
| 3655 | } else switch (native_arch) { | | |
| 3656 | .aarch64 => { | 3654 | .aarch64 => { |
| 3657 | comptime assert(@offsetOf(TEB, "ProcessEnvironmentBlock") == 0x60); | 3655 | comptime assert(@offsetOf(TEB, "ProcessEnvironmentBlock") == 0x60); |
| 3658 | return asm ( | 3656 | return asm ( |