Current masscan has a build issue on FreeBSD aarch64.
Error log is following:
src/smack1.c:130:16: error: unrecognized instruction mnemonic, did you mean: mrs, msr, smc?
asm volatile("mrc p15, 0, %0, c9, c14, 0" : "=r"(pmuseren));
^
:1:2: note: instantiated into assembly here
mrc p15, 0, x8, c9, c14, 0
^
src/smack1.c:132:18: error: unrecognized instruction mnemonic, did you mean: mrs, msr, smc?
asm volatile("mrc p15, 0, %0, c9, c12, 1" : "=r"(pmcntenset));
^
:1:2: note: instantiated into assembly here
mrc p15, 0, x8, c9, c12, 1
^
src/smack1.c:134:20: error: unrecognized instruction mnemonic, did you mean: mrs, msr, smc?
asm volatile("mrc p15, 0, %0, c9, c13, 0" : "=r"(pmccntr));
^
:1:2: note: instantiated into assembly here
mrc p15, 0, x8, c9, c13, 0
^
src/smack1.c:130:16: error: unrecognized instruction mnemonic, did you mean: mrs, msr, smc?
asm volatile("mrc p15, 0, %0, c9, c14, 0" : "=r"(pmuseren));
^
:1:2: note: instantiated into assembly here
mrc p15, 0, x8, c9, c14, 0
^
src/smack1.c:132:18: error: unrecognized instruction mnemonic, did you mean: mrs, msr, smc?
asm volatile("mrc p15, 0, %0, c9, c12, 1" : "=r"(pmcntenset));
^
:1:2: note: instantiated into assembly here
mrc p15, 0, x8, c9, c12, 1
^
src/smack1.c:130:16: error: unrecognized instruction mnemonic, did you mean: mrs, msr, smc?
asm volatile("mrc p15, 0, %0, c9, c14, 0" : "=r"(pmuseren));
^
:1:2: note: instantiated into assembly here
mrc p15, 0, x8, c9, c14, 0
^
src/smack1.c:132:18: error: unrecognized instruction mnemonic, did you mean: mrs, msr, smc?
asm volatile("mrc p15, 0, %0, c9, c12, 1" : "=r"(pmcntenset));
^
:1:2: note: instantiated into assembly here
mrc p15, 0, x8, c9, c12, 1
^
src/smack1.c:134:20: error: unrecognized instruction mnemonic, did you mean: mrs, msr, smc?
asm volatile("mrc p15, 0, %0, c9, c13, 0" : "=r"(pmccntr));
^
:1:2: note: instantiated into assembly here
mrc p15, 0, x8, c9, c13, 0
^
src/smack1.c:134:20: error: unrecognized instruction mnemonic, did you mean: mrs, msr, smc?
asm volatile("mrc p15, 0, %0, c9, c13, 0" : "=r"(pmccntr));
^
:1:2: note: instantiated into assembly here
mrc p15, 0, x8, c9, c13, 0
^
3 warnings and 9 errors generated.
gmake: *** [Makefile:109: tmp/smack1.o] Error 1
This error is due to the difference in arm assembler between the old and newer versions.
Therefore, the inline assembler can not work on later arm8 and caused errors on aarch64.
So this patch is fixed that issue.
I have tested this modification on arm6, aarch64, and amd64.
And all regression tests success.