3 dnl (progn (modify-syntax-entry ?< "(>") (modify-syntax-entry ?> ")<") )
5 dnl FORTRAN style comment character
8 dnl Disable m4 comment processing, since the default, #, is used for
9 dnl constants on some architectures, in particular ARM.
12 dnl Including files from the srcdir
13 define(<include_src>, <include(srcdir/$1)>)dnl
18 <ifelse(ELF_STYLE,yes,
20 .type C_NAME($1),TYPE_FUNCTION
26 <ifelse(ELF_STYLE,yes,
27 <.size C_NAME($1), . - C_NAME($1)>,<>)>)
29 define(<m4_log2>, <m4_log2_internal($1,1,0)>)
30 define(<m4_log2_internal>,
31 <ifelse($3, 10, <not-a-power-of-two>,
33 <m4_log2_internal($1, eval(2*$2), eval(1 + $3))>)>)
35 dnl Argument to ALIGN is always in bytes, and converted to a
36 dnl logarithmic .align if necessary.
39 <.align ifelse(ALIGN_LOG,yes,<m4_log2($1)>,$1)
42 dnl Struct defining macros
45 define(<STRUCTURE>, <define(<SOFFSET>, 0)define(<SPREFIX>, <$1>)>)dnl
47 dnl STRUCT(name, size)
49 <define(SPREFIX<_>$1, SOFFSET)dnl
50 define(<SOFFSET>, eval(SOFFSET + ($2)))>)dnl
53 define(<UCHAR>, <STRUCT(<$1>, 1)>)dnl
56 define(<UNSIGNED>, <STRUCT(<$1>, 4)>)dnl
58 dnl Offsets in arcfour_ctx
64 dnl Offsets in aes_ctx and aes_table
69 define(AES_SBOX_SIZE, 256)dnl
70 define(AES_TABLE_SIZE, 1024)dnl
73 STRUCT(SBOX, AES_SBOX_SIZE)
74 STRUCT(TABLE0, AES_TABLE_SIZE)
75 STRUCT(TABLE1, AES_TABLE_SIZE)
76 STRUCT(TABLE2, AES_TABLE_SIZE)
77 STRUCT(TABLE3, AES_TABLE_SIZE)