mirror of
https://github.com/ziglang/zig.git
synced 2024-12-02 01:00:19 +00:00
std.os.linux.AUDIT: Fix s390x; add loongarch64 and xtensa.
This commit is contained in:
parent
93311d6bca
commit
d2d325a862
@ -7353,7 +7353,7 @@ pub const AUDIT = struct {
|
|||||||
ARMEB = toAudit(.armeb),
|
ARMEB = toAudit(.armeb),
|
||||||
CSKY = toAudit(.csky),
|
CSKY = toAudit(.csky),
|
||||||
HEXAGON = @intFromEnum(std.elf.EM.HEXAGON),
|
HEXAGON = @intFromEnum(std.elf.EM.HEXAGON),
|
||||||
X86 = toAudit(.x86),
|
LOONGARCH64 = toAudit(.loongarch64),
|
||||||
M68K = toAudit(.m68k),
|
M68K = toAudit(.m68k),
|
||||||
MIPS = toAudit(.mips),
|
MIPS = toAudit(.mips),
|
||||||
MIPSEL = toAudit(.mips) | LE,
|
MIPSEL = toAudit(.mips) | LE,
|
||||||
@ -7367,18 +7367,22 @@ pub const AUDIT = struct {
|
|||||||
S390X = toAudit(.s390x),
|
S390X = toAudit(.s390x),
|
||||||
SPARC = toAudit(.sparc),
|
SPARC = toAudit(.sparc),
|
||||||
SPARC64 = toAudit(.sparc64),
|
SPARC64 = toAudit(.sparc64),
|
||||||
|
X86 = toAudit(.x86),
|
||||||
X86_64 = toAudit(.x86_64),
|
X86_64 = toAudit(.x86_64),
|
||||||
|
XTENSA = toAudit(.xtensa),
|
||||||
|
|
||||||
fn toAudit(arch: std.Target.Cpu.Arch) u32 {
|
fn toAudit(arch: std.Target.Cpu.Arch) u32 {
|
||||||
var res: u32 = @intFromEnum(arch.toElfMachine());
|
var res: u32 = @intFromEnum(arch.toElfMachine());
|
||||||
if (arch.endian() == .little) res |= LE;
|
if (arch.endian() == .little) res |= LE;
|
||||||
switch (arch) {
|
switch (arch) {
|
||||||
.aarch64,
|
.aarch64,
|
||||||
|
.loongarch64,
|
||||||
.mips64,
|
.mips64,
|
||||||
.mips64el,
|
.mips64el,
|
||||||
.powerpc64,
|
.powerpc64,
|
||||||
.powerpc64le,
|
.powerpc64le,
|
||||||
.riscv64,
|
.riscv64,
|
||||||
|
.s390x,
|
||||||
.sparc64,
|
.sparc64,
|
||||||
.x86_64,
|
.x86_64,
|
||||||
=> res |= @"64BIT",
|
=> res |= @"64BIT",
|
||||||
|
Loading…
Reference in New Issue
Block a user