| ... | ... | @@ -53,10 +53,11 @@ const SparcCpuinfoImpl = struct { |
| 53 | 53 | // At the moment we only support 64bit SPARC systems. |
| 54 | 54 | assert(self.is_64bit); |
| 55 | 55 | |
| 56 | const model = self.model orelse Target.Cpu.Model.generic(arch); |
| 56 | 57 | return Target.Cpu{ |
| 57 | 58 | .arch = arch, |
| 58 | | .model = self.model orelse Target.Cpu.Model.generic(arch), |
| 59 | | .features = Target.Cpu.Feature.Set.empty, |
| 59 | .model = model, |
| 60 | .features = model.features, |
| 60 | 61 | }; |
| 61 | 62 | } |
| 62 | 63 | }; |
| ... | ... | @@ -75,6 +76,7 @@ test "cpuinfo: SPARC" { |
| 75 | 76 | |
| 76 | 77 | const r = SparcCpuinfoParser.parse(.sparcv9, fbs.reader()) catch unreachable; |
| 77 | 78 | testing.expectEqual(&Target.sparc.cpu.niagara2, r.?.model); |
| 79 | testing.expect(Target.sparc.cpu.niagara2.features.eql(r.?.features)); |
| 78 | 80 | } |
| 79 | 81 | |
| 80 | 82 | // The generic implementation of a /proc/cpuinfo parser. |