aboutsummaryrefslogtreecommitdiff
path: root/lib/compiler/test_runner.zig
diff options
context:
space:
mode:
authorDavid Rubin <daviru007@icloud.com>2024-03-14 15:34:06 -0700
committerDavid Rubin <daviru007@icloud.com>2024-05-11 02:17:11 -0700
commit3ccf0fd4c2d024d696bdb1e71a0b36af38ad6bed (patch)
treeab05699caca1a13fd5888e75a3296b2426aaf5b2 /lib/compiler/test_runner.zig
parent2be3033acda53389cac9f3e9a8ca0a3d41348eef (diff)
downloadzig-3ccf0fd4c2d024d696bdb1e71a0b36af38ad6bed.tar.gz
zig-3ccf0fd4c2d024d696bdb1e71a0b36af38ad6bed.zip
riscv: basic struct field access
the current implementation only works when the struct is in a register. we use some shifting magic to get the field into the LSB, and from there, given the type provenance, the generated code should never reach into the bits beyond the bit size of the type and interact with the rest of the struct.
Diffstat (limited to 'lib/compiler/test_runner.zig')
-rw-r--r--lib/compiler/test_runner.zig4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/compiler/test_runner.zig b/lib/compiler/test_runner.zig
index 0b9a060fb5..08a2e5721b 100644
--- a/lib/compiler/test_runner.zig
+++ b/lib/compiler/test_runner.zig
@@ -12,7 +12,9 @@ var cmdline_buffer: [4096]u8 = undefined;
var fba = std.heap.FixedBufferAllocator.init(&cmdline_buffer);
pub fn main() void {
- if (builtin.zig_backend == .stage2_aarch64) {
+ if (builtin.zig_backend == .stage2_aarch64 or
+ builtin.zig_backend == .stage2_riscv64)
+ {
return mainSimple() catch @panic("test failure");
}