Skip to content

Commit d90ceec

Browse files
committed
fix: function hasFpu() not match 'm33.dsp'
1 parent eb46bd0 commit d90ceec

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/ArmCpuUtils.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,10 @@ const armvx_sp_archs: string[] = armvx_dp_archs;
9191
export function hasFpu(cpu: string, hasDp?: boolean) {
9292
cpu = cpu.toLowerCase();
9393
if (hasDp) { // check dp
94-
return cortex_dp_mcus.some(n => cpu.endsWith(n))
95-
|| armvx_dp_archs.some(a => cpu.startsWith(a));
94+
return cortex_dp_mcus.some(a => cpu.includes(a))
95+
|| armvx_dp_archs.some(a => cpu.includes(a));
9696
} else { // check sp
97-
return cortex_sp_mcus.some(n => cpu.endsWith(n))
98-
|| armvx_sp_archs.some(a => cpu.startsWith(a));
97+
return cortex_sp_mcus.some(a => cpu.includes(a))
98+
|| armvx_sp_archs.some(a => cpu.includes(a));
9999
}
100100
}

0 commit comments

Comments
 (0)