std.Target: Introduce Cpu convenience functions for feature tests.
Before:
* std.Target.arm.featureSetHas(target.cpu.features, .has_v7)
* std.Target.x86.featureSetHasAny(target.cpu.features, .{ .sse, .avx, .cmov })
* std.Target.wasm.featureSetHasAll(target.cpu.features, .{ .atomics, .bulk_memory })
After:
* target.cpu.has(.arm, .has_v7)
* target.cpu.hasAny(.x86, &.{ .sse, .avx, .cmov })
* target.cpu.hasAll(.wasm, &.{ .atomics, .bulk_memory })
This commit is contained in:
@@ -773,7 +773,7 @@ pub const StackIterator = struct {
|
||||
pub fn init(first_address: ?usize, fp: ?usize) StackIterator {
|
||||
if (native_arch.isSPARC()) {
|
||||
// Flush all the register windows on stack.
|
||||
asm volatile (if (std.Target.sparc.featureSetHas(builtin.cpu.features, .v9))
|
||||
asm volatile (if (builtin.cpu.has(.sparc, .v9))
|
||||
"flushw"
|
||||
else
|
||||
"ta 3" // ST_FLUSH_WINDOWS
|
||||
|
||||
Reference in New Issue
Block a user