summaryrefslogtreecommitdiff
path: root/asm.m4
diff options
context:
space:
mode:
authorNiels Möller <nisse@lysator.liu.se>2013-02-06 10:22:31 +0100
committerNiels Möller <nisse@lysator.liu.se>2013-02-06 10:22:31 +0100
commit26cdf2af1984abefe15d9828fa5a18c190964366 (patch)
tree45d93e0ffa1dbca2b863f6844ad336d65f1821bc /asm.m4
parenta0f3f54e576cdc7362b14ac88fa795b332e38bad (diff)
downloadnettle-26cdf2af1984abefe15d9828fa5a18c190964366.tar.gz
Use changecom and divert in asm.m4.
Diffstat (limited to 'asm.m4')
-rw-r--r--asm.m412
1 files changed, 10 insertions, 2 deletions
diff --git a/asm.m4 b/asm.m4
index d632585b..f24442da 100644
--- a/asm.m4
+++ b/asm.m4
@@ -1,9 +1,13 @@
+divert(-1)
changequote(<,>)dnl
dnl (progn (modify-syntax-entry ?< "(>") (modify-syntax-entry ?> ")<") )
dnl FORTRAN style comment character
define(<C>, <
dnl>)dnl
+dnl Disable m4 comment processing, since the default, #, is used for
+dnl constants on some architectures, in particular ARM.
+changecom()dnl
dnl Including files from the srcdir
define(<include_src>, <include(srcdir/$1)>)dnl
@@ -23,9 +27,11 @@ define(<EPILOGUE>,
<.size C_NAME($1), . - C_NAME($1)>,<>)>)
dnl Argument to ALIGN is always logarithmic
+dnl FIXME: the << operator is not supported by Solaris m4,
+dnl and ** is not supported by OpenBSD m4.
+dnl We should switch to non-logarithmic ALIGN instead.
-dnl Need changequote to be able to use the << operator (using **
-dnl instead is not portable, and is not supported by openbsd m4).
+dnl Need changequote to be able to use the << operator.
define(<ALIGN>,
<changequote([,])dnl
.align ifelse(ALIGN_LOG,yes,$1,eval(1 << $1))dnl >> balance
@@ -68,3 +74,5 @@ STRUCTURE(AES)
STRUCT(TABLE1, AES_TABLE_SIZE)
STRUCT(TABLE2, AES_TABLE_SIZE)
STRUCT(TABLE3, AES_TABLE_SIZE)
+
+divert