arcbios_calls.S data hazards
Steve Rumble <[email protected]> Fri, 5 Dec 2025 08:41:43 -0800
| Newsgroups | gmane.os.netbsd.ports.mips.devel |
|---|---|
| Message-ID | <CAL4_dAQoDYdwcVX3H=K9TGQTRu9VuR29XVdwhqxviC2JfaG1pA@mail.gmail.com> |
Hi all, I think there are a couple of data hazards in arcbios_calls.S that can cause trouble for pre-R4000 CPUs. I suspect this doesn't affect any real ARCS machines since their CPUs should detect and stall automatically. However, the sgimips port fakes ARCS for older R2k/R3k machines, so it uses this code on older CPUs, too. Unfortunately, --fatal-warnings didn't catch these. Index: arcbios_calls.S =================================================================== RCS file: /cvsroot/src/sys/dev/arcbios/arcbios_calls.S,v retrieving revision 1.4 diff -u -r1.4 arcbios_calls.S --- arcbios_calls.S 30 May 2020 03:16:31 -0000 1.4 +++ arcbios_calls.S 5 Dec 2025 15:45:52 -0000 @@ -55,6 +55,7 @@ REG_S s0, CALLFRAME_SP(sp) PTR_L t9, _C_LABEL(ARCBIOS) + nop PTR_ADDU t9, t0 INT_L t9, 0(t9) nop @@ -96,6 +97,7 @@ #endif PTR_L t9, _C_LABEL(ARCBIOS) + nop PTR_ADDU t9, t0 INT_L t9, 0(t9) nop