mirror of
https://github.com/ipxe/ipxe
synced 2026-05-08 15:02:55 +03:00
[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:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user