summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2019-08-02 16:49:15 -0700
committerH. Peter Anvin <hpa@zytor.com>2019-08-02 16:49:15 -0700
commitb65e72a256c23fefaaff8d760c72c826a115b32d (patch)
tree6aee99122bf8840e81623012012163fd0758635a
parentf6d252afd2c5c8c28e1283ec359bf6a62ee89362 (diff)
downloadsamples-b65e72a256c23fefaaff8d760c72c826a115b32d.tar.gz
samples-b65e72a256c23fefaaff8d760c72c826a115b32d.tar.xz
samples-b65e72a256c23fefaaff8d760c72c826a115b32d.zip
macros.hs: add convenience define global macro
-rw-r--r--macros.hs6
1 files changed, 6 insertions, 0 deletions
diff --git a/macros.hs b/macros.hs
index d7bd7f9..5bee3f1 100644
--- a/macros.hs
+++ b/macros.hs
@@ -57,6 +57,12 @@
.endr
.endm
+/* Convenience macro that does both s.def and s.globl */
+.macro s.defglobl syms:vararg
+ s.globl \syms
+ s.def \syms
+.endm
+
/* gcc doesn't handle symbols for the segment part of an lcall/ljmp for
some strange reason. This should be fixed, but in the meantime, these
macros should handle it; they don't apply to indirect jumps/calls,