authorgravatar for koachan@protonmail.comKoakuma <koachan@protonmail.com> 2022-03-14 22:33:22+07:00
committergravatar for koachan@protonmail.comKoakuma <koachan@protonmail.com> 2022-03-16 21:38:44+07:00
log56413360a1a853b612c115f898a746a02573198c
tree725496a2301c5d9cf2aefa62b5844224628fc6ef
parent17075bdb0c8c14271f87aebf9b8fa80c9accf7bb

stage2 sparcv9: Reorder wrapper parameters to textual assembly order


1 files changed, 19 insertions(+), 19 deletions(-)

src/arch/sparcv9/bits.zig+19-19
......@@ -525,7 +525,7 @@ pub const Instruction = union(enum) {
525525 };
526526 }
527527
528 fn format2a(rd: Register, op2: u3, imm: i22) Instruction {
528 fn format2a(op2: u3, rd: Register, imm: i22) Instruction {
529529 return Instruction{
530530 .format_2a = .{
531531 .rd = rd.enc(),
......@@ -535,7 +535,7 @@ pub const Instruction = union(enum) {
535535 };
536536 }
537537
538 fn format2b(annul: bool, cond: Condition, op2: u3, disp: i24) Instruction {
538 fn format2b(op2: u3, cond: Condition, annul: bool, disp: i24) Instruction {
539539 // In SPARC, branch target needs to be aligned to 4 bytes.
540540 assert(disp % 4 == 0);
541541
......@@ -551,7 +551,7 @@ pub const Instruction = union(enum) {
551551 };
552552 }
553553
554 fn format2c(annul: bool, cond: Condition, op2: u3, ccr: CCR, pt: bool, disp: i21) Instruction {
554 fn format2c(op2: u3, cond: Condition, annul: bool, pt: bool, ccr: CCR, disp: i21) Instruction {
555555 // In SPARC, branch target needs to be aligned to 4 bytes.
556556 assert(disp % 4 == 0);
557557
......@@ -573,7 +573,7 @@ pub const Instruction = union(enum) {
573573 };
574574 }
575575
576 fn format2d(annul: bool, rcond: RCondition, op2: u3, pt: bool, rs1: Register, disp: i18) Instruction {
576 fn format2d(op2: u3, rcond: RCondition, annul: bool, pt: bool, rs1: Register, disp: i18) Instruction {
577577 // In SPARC, branch target needs to be aligned to 4 bytes.
578578 assert(disp % 4 == 0);
579579
......@@ -595,7 +595,7 @@ pub const Instruction = union(enum) {
595595 };
596596 }
597597
598 fn format3a(rd: Register, op3: u6, rs1: Register, rs2: Register) Instruction {
598 fn format3a(op3: u6, rs1: Register, rs2: Register, rd: Register) Instruction {
599599 return Instruction{
600600 .format_3a = .{
601601 .rd = rd.enc(),
......@@ -605,7 +605,7 @@ pub const Instruction = union(enum) {
605605 },
606606 };
607607 }
608 fn format3b(rd: Register, op3: u6, rs1: Register, imm: i13) Instruction {
608 fn format3b(op3: u6, rs1: Register, imm: i13, rd: Register) Instruction {
609609 return Instruction{
610610 .format_3b = .{
611611 .rd = rd.enc(),
......@@ -633,7 +633,7 @@ pub const Instruction = union(enum) {
633633 },
634634 };
635635 }
636 fn format3e(rd: Register, op3: u6, rcond: RCondition, rs1: Register, rs2: Register) Instruction {
636 fn format3e(op3: u6, rcond: RCondition, rs1: Register, rs2: Register, rd: Register) Instruction {
637637 return Instruction{
638638 .format_3e = .{
639639 .rd = rd.enc(),
......@@ -644,7 +644,7 @@ pub const Instruction = union(enum) {
644644 },
645645 };
646646 }
647 fn format3f(rd: Register, op3: u6, rs1: Register, rcond: RCondition, imm: i10) Instruction {
647 fn format3f(op3: u6, rcond: RCondition, rs1: Register, imm: i10, rd: Register) Instruction {
648648 return Instruction{
649649 .format_3f = .{
650650 .rd = rd.enc(),
......@@ -655,7 +655,7 @@ pub const Instruction = union(enum) {
655655 },
656656 };
657657 }
658 fn format3g(rd: Register, op3: u6, rs1: Register, rs2: Register) Instruction {
658 fn format3g(op3: u6, rs1: Register, rs2: Register, rd: Register) Instruction {
659659 return Instruction{
660660 .format_3g = .{
661661 .rd = rd.enc(),
......@@ -673,7 +673,7 @@ pub const Instruction = union(enum) {
673673 },
674674 };
675675 }
676 fn format3i(rd: Register, op3: u6, rs1: Register, rs2: Register, asi: ASI) Instruction {
676 fn format3i(op3: u6, rs1: Register, rs2: Register, rd: Register, asi: ASI) Instruction {
677677 return Instruction{
678678 .format_3i = .{
679679 .rd = rd.enc(),
......@@ -693,7 +693,7 @@ pub const Instruction = union(enum) {
693693 },
694694 };
695695 }
696 fn format3k(rd: Register, op3: u6, rs1: Register, rs2: Register, sw: ShiftWidth) Instruction {
696 fn format3k(op3: u6, sw: ShiftWidth, rs1: Register, rs2: Register, rd: Register) Instruction {
697697 return Instruction{
698698 .format_3k = .{
699699 .rd = rd.enc(),
......@@ -704,7 +704,7 @@ pub const Instruction = union(enum) {
704704 },
705705 };
706706 }
707 fn format3l(rd: Register, op3: u6, rs1: Register, shift_count: u5) Instruction {
707 fn format3l(op3: u6, rs1: Register, shift_count: u5, rd: Register) Instruction {
708708 return Instruction{
709709 .format_3l = .{
710710 .rd = rd.enc(),
......@@ -714,7 +714,7 @@ pub const Instruction = union(enum) {
714714 },
715715 };
716716 }
717 fn format3m(rd: Register, op3: u6, rs1: Register, shift_count: u6) Instruction {
717 fn format3m(op3: u6, rs1: Register, shift_count: u6, rd: Register) Instruction {
718718 return Instruction{
719719 .format_3m = .{
720720 .rd = rd.enc(),
......@@ -724,7 +724,7 @@ pub const Instruction = union(enum) {
724724 },
725725 };
726726 }
727 fn format3n(rd: Register, op3: u6, opf: u9, rs2: Register) Instruction {
727 fn format3n(op3: u6, opf: u9, rs2: Register, rd: Register) Instruction {
728728 return Instruction{
729729 .format_3n = .{
730730 .rd = rd.enc(),
......@@ -734,7 +734,7 @@ pub const Instruction = union(enum) {
734734 },
735735 };
736736 }
737 fn format3o(cc: CCR, op3: u6, rs1: Register, opf: u9, rs2: Register) Instruction {
737 fn format3o(op3: u6, opf: u9, cc: CCR, rs1: Register, rs2: Register) Instruction {
738738 const ccr_cc1 = @truncate(u1, @enumToInt(cc) >> 1);
739739 const ccr_cc0 = @truncate(u1, @enumToInt(cc));
740740 return Instruction{
......@@ -748,7 +748,7 @@ pub const Instruction = union(enum) {
748748 },
749749 };
750750 }
751 fn format3p(rd: Register, op3: u6, rs1: Register, opf: u9, rs2: Register) Instruction {
751 fn format3p(op3: u6, opf: u9, rs1: Register, rs2: Register, rd: Register) Instruction {
752752 return Instruction{
753753 .format_3p = .{
754754 .rd = rd.enc(),
......@@ -759,7 +759,7 @@ pub const Instruction = union(enum) {
759759 },
760760 };
761761 }
762 fn format3q(rd: Register, op3: u6, rs1: Register) Instruction {
762 fn format3q(op3: u6, rs1: Register, rd: Register) Instruction {
763763 return Instruction{
764764 .format_3q = .{
765765 .rd = rd.enc(),
......@@ -768,7 +768,7 @@ pub const Instruction = union(enum) {
768768 },
769769 };
770770 }
771 fn format3r(fcn: u5, op3: u6) Instruction {
771 fn format3r(op3: u6, fcn: u5) Instruction {
772772 return Instruction{
773773 .format_3r = .{
774774 .fcn = fcn,
......@@ -776,7 +776,7 @@ pub const Instruction = union(enum) {
776776 },
777777 };
778778 }
779 fn format3s(rd: Register, op3: u6) Instruction {
779 fn format3s(op3: u6, rd: Register) Instruction {
780780 return Instruction{
781781 .format_3s = .{
782782 .rd = rd.enc(),