summaryrefslogtreecommitdiff
path: root/core/pmcall.inc
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2009-05-15 10:43:25 -0700
committerH. Peter Anvin <hpa@zytor.com>2009-05-15 10:43:25 -0700
commitcce8e82b71703b3a9da351839175553e101c61d9 (patch)
tree487b15346524731bd20310243499bbf9fca5552d /core/pmcall.inc
parent3f2c5c69f6ad7968818c9cee8c337e4200587caf (diff)
downloadsyslinux-cce8e82b71703b3a9da351839175553e101c61d9.tar.gz
core: add pm_call convenience macro
Add a pm_call convenience macro, instead of using stub routines everywhere. Stubs would still make sense if we have a routine which gets invoked from a lot of places, though, since the pm_call expands to 9 bytes as opposed to 3 bytes per call site plus a 10-byte stub. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'core/pmcall.inc')
-rw-r--r--core/pmcall.inc12
1 files changed, 9 insertions, 3 deletions
diff --git a/core/pmcall.inc b/core/pmcall.inc
index 29050500..0a580150 100644
--- a/core/pmcall.inc
+++ b/core/pmcall.inc
@@ -5,8 +5,8 @@
;; as the RM frame pointer.
;;
-%ifndef PMCALL_H
-%define PMCALL_H
+%ifndef PMCALL_INC
+%define PMCALL_INC
%define RM_GS word [ebp]
%define RM_FS word [ebp+2]
@@ -61,4 +61,10 @@
%define RM_FLAGSL byte [ebp+40]
%define RM_FLAGSH byte [ebp+41]
-%endif ; PMCALL_H
+; Convenience macro to call a PM function
+%macro pm_call 1
+ push dword %1
+ call _pm_call
+%endmacro
+
+%endif ; PMCALL_INC