summaryrefslogtreecommitdiff
path: root/asm.m4
diff options
context:
space:
mode:
authorNiels Möller <nisse@lysator.liu.se>2020-09-12 10:25:21 +0200
committerNiels Möller <nisse@lysator.liu.se>2020-09-12 19:37:22 +0200
commit2325920519e459cbd3dbccc0a29778aae3d7b36e (patch)
treece435b81d24c5315d550e500d0b5f28ce2e29257 /asm.m4
parent15b4c8173bdde846e550a78b4da66d5426e5cf2e (diff)
downloadnettle-2325920519e459cbd3dbccc0a29778aae3d7b36e.tar.gz
Use default m4 quote character in asm files, part 1
Update shared m4 files and x86_64.
Diffstat (limited to 'asm.m4')
-rw-r--r--asm.m478
1 files changed, 38 insertions, 40 deletions
diff --git a/asm.m4 b/asm.m4
index 59d64098..4ac21c20 100644
--- a/asm.m4
+++ b/asm.m4
@@ -1,79 +1,77 @@
divert(-1)
-changequote(<,>)dnl
-dnl (progn (modify-syntax-entry ?< "(>") (modify-syntax-entry ?> ")<") )
dnl FORTRAN style comment character
-define(<C>, <
-dnl>)dnl
+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
+define(`include_src', `include(srcdir/$1)')dnl
dnl default definition, changed in fat builds
-define(<fat_transform>, <$1>)
-define(<C_NAME>, <SYMBOL_PREFIX<>fat_transform($1)>)
+define(`fat_transform', `$1')
+define(`C_NAME', `SYMBOL_PREFIX`'fat_transform($1)')
dnl Pseudo ops
-define(<DECLARE_FUNC>,
-<ifelse(ELF_STYLE,yes,
-<.type $1,TYPE_FUNCTION>,
+define(`DECLARE_FUNC',
+`ifelse(ELF_STYLE,yes,
+`.type $1,TYPE_FUNCTION',
COFF_STYLE, yes,
-<.def $1
+`.def $1
.scl 2
.type 32
-.endef>,
-<>)>)
+.endef',
+`')')
-define(<GMP_NUMB_BITS>,<>)dnl
+define(`GMP_NUMB_BITS',`')dnl
-define(<PROLOGUE>,
-<.globl C_NAME($1)
+define(`PROLOGUE',
+`.globl C_NAME($1)
DECLARE_FUNC(C_NAME($1))
-C_NAME($1): ASM_X86_ENDBR>)
+C_NAME($1): ASM_X86_ENDBR')
-define(<EPILOGUE>,
-<ifelse(ELF_STYLE,yes,
-<.size C_NAME($1), . - C_NAME($1)>,<>)>)
+define(`EPILOGUE',
+`ifelse(ELF_STYLE,yes,
+`.size C_NAME($1), . - C_NAME($1)',`')')
-define(<m4_log2>, <m4_log2_internal($1,1,0)>)
-define(<m4_log2_internal>,
-<ifelse($3, 10, <not-a-power-of-two>,
+define(`m4_log2', `m4_log2_internal($1,1,0)')
+define(`m4_log2_internal',
+`ifelse($3, 10, `not-a-power-of-two',
$1, $2, $3,
-<m4_log2_internal($1, eval(2*$2), eval(1 + $3))>)>)
+`m4_log2_internal($1, eval(2*$2), eval(1 + $3))')')
dnl Argument to ALIGN is always in bytes, and converted to a
dnl logarithmic .align if necessary.
-define(<ALIGN>,
-<.align ifelse(ALIGN_LOG,yes,<m4_log2($1)>,$1)
->)
+define(`ALIGN',
+`.align ifelse(ALIGN_LOG,yes,`m4_log2($1)',$1)
+')
-define(<IF_BE>, <ifelse(
-WORDS_BIGENDIAN,yes,<$1>,
-WORDS_BIGENDIAN,no,<$2>,
-<errprint(<Unsupported endianness value>,WORDS_BIGENDIAN,<
->)
- m4exit(1)>)>)
-define(<IF_LE>, <IF_BE(<$2>, <$1>)>)
+define(`IF_BE', `ifelse(
+WORDS_BIGENDIAN,yes,`$1',
+WORDS_BIGENDIAN,no,`$2',
+`errprint(`Unsupported endianness value',WORDS_BIGENDIAN,`
+')
+ m4exit(1)')')
+define(`IF_LE', `IF_BE(`$2', `$1')')
dnl Struct defining macros
dnl STRUCTURE(prefix)
-define(<STRUCTURE>, <define(<SOFFSET>, 0)define(<SPREFIX>, <$1>)>)dnl
+define(`STRUCTURE', `define(`SOFFSET', 0)define(`SPREFIX', `$1')')dnl
dnl STRUCT(name, size)
-define(<STRUCT>,
-<define(SPREFIX<_>$1, SOFFSET)dnl
- define(<SOFFSET>, eval(SOFFSET + ($2)))>)dnl
+define(`STRUCT',
+`define(SPREFIX`_'$1, SOFFSET)dnl
+ define(`SOFFSET', eval(SOFFSET + ($2)))')dnl
dnl UCHAR(name)
-define(<UCHAR>, <STRUCT(<$1>, 1)>)dnl
+define(`UCHAR', `STRUCT(`$1', 1)')dnl
dnl UNSIGNED(name)
-define(<UNSIGNED>, <STRUCT(<$1>, 4)>)dnl
+define(`UNSIGNED', `STRUCT(`$1', 4)')dnl
dnl Offsets in arcfour_ctx
STRUCTURE(ARCFOUR)