[librm] Specify regparm function attribute only for i386

The regparm function attribute is meaningful only for i386, not for
x86_64, and is reported as a build error by GCC 16.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
Michael Brown
2026-05-01 14:34:52 +01:00
parent c18d0a23b6
commit be35d67a02
+9 -3
View File
@@ -21,6 +21,13 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
*
*/
/* Calling convention used by interrupt wrapper */
#ifdef __x86_64__
#define __intrcall
#else
#define __intrcall __attribute__ (( regparm ( 3 ) ))
#endif
/** The interrupt wrapper */
extern char interrupt_wrapper[];
@@ -247,9 +254,8 @@ interrupt_dump ( int intr, struct interrupt_frame32 *frame32,
* @v frame64 64-bit interrupt wrapper stack frame (or NULL)
* @v frame Interrupt wrapper stack frame
*/
void __attribute__ (( regparm ( 3 ) ))
interrupt ( int intr, struct interrupt_frame32 *frame32,
struct interrupt_frame64 *frame64 ) {
__intrcall void interrupt ( int intr, struct interrupt_frame32 *frame32,
struct interrupt_frame64 *frame64 ) {
struct profiler *profiler = interrupt_profiler ( intr );
uint32_t discard_eax;