beehive-lab / mambo

A low-overhead dynamic binary instrumentation and modification tool for ARM (both AArch32 and AArch64 support) and RISC-V (RV64GC).
Apache License 2.0
320 stars 69 forks source link

Arm v8.1 tests #86

Closed jkressel closed 1 year ago

jkressel commented 2 years ago

Tests for new ARM v8.1 instructions

lgeek commented 1 year ago

Hi. Just to clarify, is VQRDMLAH supposed to be built for AArch32 and all the other files for AArch64? I wrote a makefile on that assumption, please review it:

CFLAGS=-march=armv8.2-a
ARCH=$(shell $(CC) -dumpmachine | awk -F '-' '{print $$1}')

ifeq ($(ARCH),aarch64)
aarch64: CASPx CASx LDADDx LDCLRx LDEORx LDLARx LDSETx LDSMAXx LDSMINx LDUMAXx LDUMINx SQRDMLxH STADDx STCLRx STEORx STLLRx STSETx STSMAXx STSMINx STUMAXx STUMINx SWPx
endif

ifeq ($(findstring arm, $(ARCH)), arm)
CFLAGS+=-mthumb -mfpu=neon-fp-armv8
aarch32: VQRDMLAH
endif

clean:
    rm -f CASPx CASx LDADDx LDCLRx LDEORx LDLARx LDSETx LDSMAXx LDSMINx LDUMAXx LDUMINx SQRDMLxH STADDx STCLRx STEORx STLLRx STSETx STSMAXx STSMINx STUMAXx STUMINx SWPx VQRDMLAH

Also, any chance you could squash the commits?

jkressel commented 1 year ago

@lgeek that's correct :) I've squashed the commits.