| author | |
| committer | |
| log | 4b62f1bd93abfa2ae5aec2240bfac9327035901b |
| tree | 7f5770a4b83716f3afa097ca481fd6be64e7b15a |
| parent | 1c40a4df094132db952157bf28253ed80646ea00 |
llvm commit b2851aea80e5a8f0cfd6c3c5a56a6b00fb28c6b63 files changed, 9 insertions(+), 8 deletions(-)
lib/std/target.zig+5-5| ... | ... | @@ -551,7 +551,7 @@ pub const Target = struct { |
| 551 | 551 | pub const Set = struct { |
| 552 | 552 | ints: [usize_count]usize, |
| 553 | 553 | |
| 554 | pub const needed_bit_count = 168; | |
| 554 | pub const needed_bit_count = 192; | |
| 555 | 555 | pub const byte_count = (needed_bit_count + 7) / 8; |
| 556 | 556 | pub const usize_count = (byte_count + (@sizeOf(usize) - 1)) / @sizeOf(usize); |
| 557 | 557 | pub const Index = std.math.Log2Int(std.meta.Int(.unsigned, usize_count * @bitSizeOf(usize))); |
| ... | ... | @@ -828,7 +828,7 @@ pub const Target = struct { |
| 828 | 828 | .amdgcn => ._NONE, |
| 829 | 829 | .bpfel => ._BPF, |
| 830 | 830 | .bpfeb => ._BPF, |
| 831 | .csky => ._CSKY, | |
| 831 | .csky => ._NONE, | |
| 832 | 832 | .sparcv9 => ._SPARCV9, |
| 833 | 833 | .s390x => ._S390, |
| 834 | 834 | .ve => ._NONE, |
| ... | ... | @@ -1149,9 +1149,9 @@ pub const Target = struct { |
| 1149 | 1149 | |
| 1150 | 1150 | pub fn baseline(arch: Arch) *const Model { |
| 1151 | 1151 | return switch (arch) { |
| 1152 | .arm, .armeb, .thumb, .thumbeb => &arm.cpu.baseline, | |
| 1153 | .riscv32 => &riscv.cpu.baseline_rv32, | |
| 1154 | .riscv64 => &riscv.cpu.baseline_rv64, | |
| 1152 | // .arm, .armeb, .thumb, .thumbeb => &arm.cpu.baseline, // TODO removed in LLVM 12 | |
| 1153 | // .riscv32 => &riscv.cpu.baseline_rv32, // TODO removed in LLVM 12 | |
| 1154 | // .riscv64 => &riscv.cpu.baseline_rv64, // TODO removed in LLVM 12 | |
| 1155 | 1155 | .i386 => &x86.cpu.pentium4, |
| 1156 | 1156 | .nvptx, .nvptx64 => &nvptx.cpu.sm_20, |
| 1157 | 1157 |
src/codegen.zig+3-3| ... | ... | @@ -1689,7 +1689,7 @@ fn Function(comptime arch: std.Target.Cpu.Arch) type { |
| 1689 | 1689 | |
| 1690 | 1690 | // TODO: add Instruction.supportedOn |
| 1691 | 1691 | // function for ARM |
| 1692 | if (Target.arm.featureSetHas(self.target.cpu.features, .has_v5t)) { | |
| 1692 | if (Target.arm.featureSetHas(self.target.cpu.features, .armv5t)) { | |
| 1693 | 1693 | writeInt(u32, try self.code.addManyAsArray(4), Instruction.blx(.al, .lr).toU32()); |
| 1694 | 1694 | } else { |
| 1695 | 1695 | writeInt(u32, try self.code.addManyAsArray(4), Instruction.mov(.al, .lr, Instruction.Operand.reg(.pc, Instruction.Operand.Shift.none)).toU32()); |
| ... | ... | @@ -2625,7 +2625,7 @@ fn Function(comptime arch: std.Target.Cpu.Arch) type { |
| 2625 | 2625 | } else if (Instruction.Operand.fromU32(~@intCast(u32, x))) |op| { |
| 2626 | 2626 | writeInt(u32, try self.code.addManyAsArray(4), Instruction.mvn(.al, reg, op).toU32()); |
| 2627 | 2627 | } else if (x <= math.maxInt(u16)) { |
| 2628 | if (Target.arm.featureSetHas(self.target.cpu.features, .has_v7)) { | |
| 2628 | if (Target.arm.featureSetHas(self.target.cpu.features, .armv7_a)) { | |
| 2629 | 2629 | writeInt(u32, try self.code.addManyAsArray(4), Instruction.movw(.al, reg, @intCast(u16, x)).toU32()); |
| 2630 | 2630 | } else { |
| 2631 | 2631 | writeInt(u32, try self.code.addManyAsArray(4), Instruction.mov(.al, reg, Instruction.Operand.imm(@truncate(u8, x), 0)).toU32()); |
| ... | ... | @@ -2634,7 +2634,7 @@ fn Function(comptime arch: std.Target.Cpu.Arch) type { |
| 2634 | 2634 | } else { |
| 2635 | 2635 | // TODO write constant to code and load |
| 2636 | 2636 | // relative to pc |
| 2637 | if (Target.arm.featureSetHas(self.target.cpu.features, .has_v7)) { | |
| 2637 | if (Target.arm.featureSetHas(self.target.cpu.features, .armv7_a)) { | |
| 2638 | 2638 | // immediate: 0xaaaabbbb |
| 2639 | 2639 | // movw reg, #0xbbbb |
| 2640 | 2640 | // movt reg, #0xaaaa |
src/target.zig+1| ... | ... | @@ -240,6 +240,7 @@ pub fn archToLLVM(arch_tag: std.Target.Cpu.Arch) llvm.ArchType { |
| 240 | 240 | .avr => .avr, |
| 241 | 241 | .bpfel => .bpfel, |
| 242 | 242 | .bpfeb => .bpfeb, |
| 243 | .csky => .csky, | |
| 243 | 244 | .hexagon => .hexagon, |
| 244 | 245 | .mips => .mips, |
| 245 | 246 | .mipsel => .mipsel, |