开启unicorn对NEON(STP SIMD)的支持

CPACR_FPEN_MASK = (0x3 << 20)
CPACR_FPEN_TRAP_NONE = (0x3 << 20)

cpacr = mu.reg_read(UC_ARM64_REG_CPACR_EL1)
cpacr = (cpacr & ~CPACR_FPEN_MASK) | CPACR_FPEN_TRAP_NONE
mu.reg_write(UC_ARM64_REG_CPACR_EL1, cpacr)
var CPACR_FPEN_MASK uint64 = (0x3 << 20)
var CPACR_FPEN_TRAP_NONE uint64= (0x3 << 20)
cpacr, err := mu.RegRead(uc.ARM64_REG_CPACR_EL1)
if err!=nil{
    panic(err.Error())
}
cpacr = (cpacr & ^CPACR_FPEN_MASK) | CPACR_FPEN_TRAP_NONE
mu.RegWrite(uc.ARM64_REG_CPACR_EL1, cpacr)

IDA切换ARM和THUMB指令

ARM AND THUMB MODE SWITCH INSTRUCTIONS

This processor has two instruction encodings: ARM and THUMB.
IDA allows to specify the encoding mode for every single instruction.
For this IDA uses a virtual register T. If its value is zero, then
the ARM mode is used, otherwise the THUMB mode is used.
You can change the value of the register T using
the ‘change segment register value’ command
(the canonical hotkey is Alt-G)

ollvm特征

我简单给你说ollvm的特征
ollvm的bcf的话
可以去找两个同级的sub
然后
算了不说了
两个同级的bb,不搞编译器的叫loc吧。不叫sub
有一个是循环自己
还有一个是往下走的
伪代码是一大串if true xxxx嵌套
这就是bcf,循环自己的那个就是假的控制流
ollvm的fla很明显。直接看控制流图就行了
splitbb就是一个函数里有一大段很短的loc
之间都是无条件跳转
substitution就是一堆看起来应该被简化的逻辑/数学运算连在一起
每家都说是自己写的
刘欣也说是自己写的我抄他的
谁知道的
不过有几个应该是有点干货
不知道哪家就是了
不说了
光在设计上就是为了解决问题
*解决这些问题
再加额外功能和现有的优化
谁知道他们
实际上汇编层不是if true
是一个恒量表达式