aboutsummaryrefslogtreecommitdiffstats
path: root/src/floppy.c
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2009-01-02 13:10:58 -0500
committerKevin O'Connor <kevin@koconnor.net>2009-01-02 13:10:58 -0500
commit0560034c29ef99239b910524f027a4d708038197 (patch)
treea6bd69a83ef16e7a247c4bacea0cebd0291b1da5 /src/floppy.c
parent6aa673d53c580d90b09830db83a6b6778c020d9b (diff)
downloadseabios-0560034c29ef99239b910524f027a4d708038197.tar.gz
Improve set_code_fail/floppy_ret/disk_ret code generation.
Encode lineno and return code into one u32 parameter. This reduces the number of functions arguments to 3 - which gcc does a better job of scheduling. Also, consistently place *regs parameter in the first arg.
Diffstat (limited to 'src/floppy.c')
-rw-r--r--src/floppy.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/floppy.c b/src/floppy.c
index da812ba6..3e78214d 100644
--- a/src/floppy.c
+++ b/src/floppy.c
@@ -188,15 +188,16 @@ floppy_pio(u8 *cmd, u8 cmdlen)
return 0;
}
-#define floppy_ret(regs, code) \
- __floppy_ret(__func__, __LINE__, (regs), (code))
+#define floppy_ret(regs, code) \
+ __floppy_ret((regs), (code) | (__LINE__ << 8), __func__)
void
-__floppy_ret(const char *fname, int lineno, struct bregs *regs, u8 code)
+__floppy_ret(struct bregs *regs, u32 linecode, const char *fname)
{
+ u8 code = linecode;
SET_BDA(floppy_last_status, code);
if (code)
- __set_code_fail(fname, lineno, regs, code);
+ __set_code_fail(regs, linecode, fname);
else
set_code_success(regs);
}