Page MenuHomeFreeBSD

xregs_via_sig: Add avx registers to test
ClosedPublic

Authored by dchagin on Jun 1 2023, 8:48 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, May 7, 8:39 AM
Unknown Object (File)
Sun, May 4, 12:59 PM
Unknown Object (File)
Mon, Apr 21, 8:34 PM
Unknown Object (File)
Mar 30 2025, 8:17 AM
Unknown Object (File)
Mar 27 2025, 1:57 AM
Unknown Object (File)
Mar 26 2025, 8:04 AM
Unknown Object (File)
Mar 24 2025, 6:18 PM
Unknown Object (File)
Mar 12 2025, 6:54 PM
Subscribers

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 51885
Build 48776: arc lint + arc unit

Event Timeline

tools/test/xregs_via_sig/c2x2c_amd64.S
20 ↗(On Diff #122739)

We traditionally spell the directive as '.globl'

33 ↗(On Diff #122739)

movl $1, %eax
You do cmpl $1, %eax after the function call.

36 ↗(On Diff #122739)

xorl %eax, %eax
It is same as xorq you used, but avoids prefix. You do not need %rax anyway.

tools/test/xregs_via_sig/c2x2c_amd64.S
24 ↗(On Diff #122751)

CPUID instruction corrupts %ebp, which is callee-saved register.

tools/test/xregs_via_sig/c2x2c_amd64.S
24 ↗(On Diff #122751)

you mean %ebx?

tools/test/xregs_via_sig/c2x2c_amd64.S
8 ↗(On Diff #122751)

I think xregs_bank should be in C instead. I would rather that you just export cpu_to_xmm, cpu_to_ymm, etc., invoke cpuid once during startup to save the desired bank in a global in C and have C wrappers to choose which MD routines to invoke.

tools/test/xregs_via_sig/c2x2c_amd64.S
24 ↗(On Diff #122751)

Yes %ebx sorry

kib added inline comments.
tools/test/xregs_sig/c2x2c_amd64.S
23

Please use the size instruction suffixes consistently

This revision is now accepted and ready to land.Jun 3 2023, 7:28 PM
This revision was automatically updated to reflect the committed changes.