authorgravatar for koachan@protonmail.comKoakuma <koachan@protonmail.com> 2022-04-10 19:04:16+07:00
committergravatar for koachan@protonmail.comKoakuma <koachan@protonmail.com> 2022-04-14 22:18:06+07:00
logcfd389f927112cbc81e71118493a7b9fba18192d
tree11ae16f2c768acc5d077ee1e257409b957552df4
parentab2ea9fb09df6821a7b6cae7990b9bc5be7c1f61

stage2: sparcv9: zig fmt


2 files changed, 9 insertions(+), 9 deletions(-)

src/arch/sparcv9/CodeGen.zig+2-2
......@@ -586,9 +586,9 @@ fn airAsm(self: *Self, inst: Air.Inst.Index) !void {
586586 const is_volatile = (extra.data.flags & 0x80000000) != 0;
587587 const clobbers_len = @truncate(u31, extra.data.flags);
588588 var extra_i: usize = extra.end;
589 const outputs = @bitCast([]const Air.Inst.Ref, self.air.extra[extra_i..extra_i+extra.data.outputs_len]);
589 const outputs = @bitCast([]const Air.Inst.Ref, self.air.extra[extra_i .. extra_i + extra.data.outputs_len]);
590590 extra_i += outputs.len;
591 const inputs = @bitCast([]const Air.Inst.Ref, self.air.extra[extra_i..extra_i+extra.data.inputs_len]);
591 const inputs = @bitCast([]const Air.Inst.Ref, self.air.extra[extra_i .. extra_i + extra.data.inputs_len]);
592592 extra_i += inputs.len;
593593
594594 const dead = !is_volatile and self.liveness.isUnused(inst);
src/arch/sparcv9/bits.zig+7-7
......@@ -964,7 +964,7 @@ pub const Instruction = union(enum) {
964964 // See appendix A of the SPARCv9 ISA manual.
965965
966966 pub fn add(comptime s2: type, rs1: Register, rs2: s2, rd: Register) Instruction {
967 return switch(s2) {
967 return switch (s2) {
968968 Register => format3a(0b10, 0b00_0000, rs1, rs2, rd),
969969 i13 => format3b(0b10, 0b00_0000, rs1, rs2, rd),
970970 else => unreachable,
......@@ -972,7 +972,7 @@ pub const Instruction = union(enum) {
972972 }
973973
974974 pub fn @"or"(comptime s2: type, rs1: Register, rs2: s2, rd: Register) Instruction {
975 return switch(s2) {
975 return switch (s2) {
976976 Register => format3a(0b10, 0b00_0010, rs1, rs2, rd),
977977 i13 => format3b(0b10, 0b00_0010, rs1, rs2, rd),
978978 else => unreachable,
......@@ -984,7 +984,7 @@ pub const Instruction = union(enum) {
984984 }
985985
986986 pub fn @"return"(comptime s2: type, rs1: Register, rs2: s2) Instruction {
987 return switch(s2) {
987 return switch (s2) {
988988 Register => format3c(0b10, 0b11_1001, rs1, rs2),
989989 i13 => format3d(0b10, 0b11_1001, rs1, rs2),
990990 else => unreachable,
......@@ -992,7 +992,7 @@ pub const Instruction = union(enum) {
992992 }
993993
994994 pub fn save(comptime s2: type, rs1: Register, rs2: s2, rd: Register) Instruction {
995 return switch(s2) {
995 return switch (s2) {
996996 Register => format3a(0b10, 0b11_1100, rs1, rs2, rd),
997997 i13 => format3b(0b10, 0b11_1100, rs1, rs2, rd),
998998 else => unreachable,
......@@ -1000,7 +1000,7 @@ pub const Instruction = union(enum) {
10001000 }
10011001
10021002 pub fn restore(comptime s2: type, rs1: Register, rs2: s2, rd: Register) Instruction {
1003 return switch(s2) {
1003 return switch (s2) {
10041004 Register => format3a(0b10, 0b11_1101, rs1, rs2, rd),
10051005 i13 => format3b(0b10, 0b11_1101, rs1, rs2, rd),
10061006 else => unreachable,
......@@ -1012,7 +1012,7 @@ pub const Instruction = union(enum) {
10121012 }
10131013
10141014 pub fn sub(comptime s2: type, rs1: Register, rs2: s2, rd: Register) Instruction {
1015 return switch(s2) {
1015 return switch (s2) {
10161016 Register => format3a(0b10, 0b00_0100, rs1, rs2, rd),
10171017 i13 => format3b(0b10, 0b00_0100, rs1, rs2, rd),
10181018 else => unreachable,
......@@ -1021,7 +1021,7 @@ pub const Instruction = union(enum) {
10211021
10221022 pub fn trap(comptime s2: type, cond: Condition, ccr: CCR, rs1: Register, rs2: s2) Instruction {
10231023 // Tcc instructions abuse the rd field to store the conditionals.
1024 return switch(s2) {
1024 return switch (s2) {
10251025 Register => format4a(0b11_1010, ccr, rs1, rs2, @intToEnum(Register, cond)),
10261026 u7 => format4e(0b00_0100, ccr, rs1, @intToEnum(Register, cond), rs2),
10271027 else => unreachable,