Bug 292883 - swtch.S:173:18: error: expected register here
Summary: swtch.S:173:18: error: expected register here
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 16.0-CURRENT
Hardware: i386 Any
: --- Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2026-02-02 12:48 UTC by Dan Kotowski
Modified: 2026-02-23 01:34 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dan Kotowski 2026-02-02 12:48:00 UTC
TARGET_ARCH=i386 buildworld fails with error since 377c053a43f347588ce6800627adb634f87f8cf9/D54831

make -j1C KERNCONF=GENERIC TARGET_ARCH=i386 buildworld buildkernel

--- swtch.o ---
/usr/local/src/sys/i386/i386/swtch.S:173:18: error: expected register here
 cmpxchgl %eax,0(reg)
                 ^
Comment 1 Simon Wollwage freebsd_triage 2026-02-02 14:43:18 UTC
^Triage: do apply correct keywords, is this only in current or also in 15.0-RELEASE?
Comment 2 Dan Kotowski 2026-02-02 16:00:25 UTC
(In reply to Simon Wollwage from comment #1)

I do not see the offending commit(s) in branch stable/15 @ 70c55537c134

# git checkout stable/15
Updating files: 100% (10843/10843), done.
branch 'stable/15' set up to track 'github/stable/15'.
Switched to a new branch 'stable/15'
# git log --oneline -3 sys/i386/i386/swtch.S
95ee2897e98f sys: Remove $FreeBSD$: two-line .h pattern
ccd9b49f20e7 sys: use .S for assembly language files that use the preprocessor
Comment 3 Simon Wollwage freebsd_triage 2026-02-02 16:16:27 UTC
(In reply to Dan Kotowski from comment #2)
Thank you for checking.
Comment 4 commit-hook freebsd_committer freebsd_triage 2026-02-02 17:46:53 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=9e0fe126714cc0b2045bec16fe8d06dbcd663144

commit 9e0fe126714cc0b2045bec16fe8d06dbcd663144
Author:     Jessica Clarke <jrtc27@FreeBSD.org>
AuthorDate: 2026-02-02 17:43:50 +0000
Commit:     Jessica Clarke <jrtc27@FreeBSD.org>
CommitDate: 2026-02-02 17:43:50 +0000

    i386: Fix build and remove empty unused macro

    When inlining the macro, reg was not substituted with the %ecx argument
    previously passed in. One of the definitions was also left behind as an
    empty macro.

    PR:             292883
    Fixes:          377c053a43f3 ("cpu_switch(): unconditionally wait on the blocked mutex transient")
    MFC after:      1 week

 sys/i386/i386/swtch.S | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)