Page MenuHomeFreeBSD

amd/int0x80 test: fix inline asm for gcc
ClosedPublic

Authored by rlibby on May 4 2026, 8:23 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Aug 17, 10:47 PM
Unknown Object (File)
Sun, Aug 16, 3:42 PM
Unknown Object (File)
Thu, Aug 13, 12:02 AM
Unknown Object (File)
Wed, Aug 12, 6:16 PM
Unknown Object (File)
Tue, Aug 11, 6:44 PM
Unknown Object (File)
Tue, Aug 11, 11:59 AM
Unknown Object (File)
Mon, Aug 10, 1:09 PM
Unknown Object (File)
Mon, Aug 10, 11:31 AM
Subscribers

Details

Summary

Gcc complained about the unused %0 asm argument.

Fixes: 2c2ec6bbc9cc ("tests/sys/arch/amd64: add a program to check INT $0x80 behavior on amd64")


Gcc's error is not super clear but removing the unused input operand solved it.

/usr/src/freebsd/tests/sys/arch/amd64/int0x80.c: In function 'fire':
/usr/src/freebsd/tests/sys/arch/amd64/int0x80.c:55:13: error: '%' constraint used with last operand
   55 |             : "rdx", "memory", "cc");
      |             ^
Test Plan

make buildworld && env MAKEOBJDIRPREFIX=/usr/obj/gcc14 CROSS_TOOLCHAIN=amd64-gcc14 make buildworld

Checked object dump for both clang and gcc builds for

mov $14,%eax
int $0x80

Ran test with default clang build:

kyua test -k /usr/tests/sys/arch/Kyuafile

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 72748
Build 69631: arc lint + arc unit

Event Timeline

rlibby requested review of this revision.May 4 2026, 8:23 AM
rlibby edited the test plan for this revision. (Show Details)
rlibby added reviewers: kib, markj.
rlibby edited the summary of this revision. (Show Details)
This revision is now accepted and ready to land.May 4 2026, 8:36 AM
This revision was automatically updated to reflect the committed changes.