aboutsummaryrefslogtreecommitdiff
path: root/src/util.h
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2010-03-20 20:41:38 -0400
committerKevin O'Connor <kevin@koconnor.net>2010-03-20 20:41:38 -0400
commitbca0736f5a6df16d0d98a877d695d406a9be88b7 (patch)
tree10b87622bea1f2eccbb76b1234bdf9b0f429c456 /src/util.h
parentd7eb27efa3f9265dca8357cfa05d9e0560fd4534 (diff)
downloadseabios-hppa-bca0736f5a6df16d0d98a877d695d406a9be88b7.zip
seabios-hppa-bca0736f5a6df16d0d98a877d695d406a9be88b7.tar.gz
seabios-hppa-bca0736f5a6df16d0d98a877d695d406a9be88b7.tar.bz2
Force use of indirect function calls in inline assembler.
For indirect calls, place function address in a register and call it. This is less optimal when gcc can inline the code and the destination address is known at compile time. However, older gcc compilers don't do as well with inlining, and they then mess up the code generation. There doesn't seem to be a way to tell gcc how to emit the code correctly for both immediate addresses and register addresses, so fall back to a safe way. Also, reduce params to stack_hop to avoid register assignment issues.
Diffstat (limited to 'src/util.h')
-rw-r--r--src/util.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/util.h b/src/util.h
index d2ac08a..e47860f 100644
--- a/src/util.h
+++ b/src/util.h
@@ -204,7 +204,7 @@ void biosusleep(u32 usec);
int get_keystroke(int msec);
// stacks.c
-inline u32 stack_hop(u32 eax, u32 edx, u32 ecx, void *func);
+inline u32 stack_hop(u32 eax, u32 edx, void *func);
extern struct thread_info MainThread;
void thread_setup(void);
struct thread_info *getCurThread(void);