rizin/test/db/cmd/cmd_ara
Rot127 10bedc2b00
Add Hexagon register profile (#2490)
Although the reg profile was not really used yet it will be relevant for the RZIL uplifting.
Introduces:
* Double/quadruple registers now properly overlap with their counterparts.
* Registers have correct types assigned (vec, ctr, sys etc. Before, all regs were of type gbr)
* Consistent register names (asm name style: c3:2, r31 etc, alias style: lc1:sa1, lr etc.)
* Adds _tmp registers in the profile. Later used by uplifted instructions (think of .new registers).
2022-04-03 18:26:17 +02:00

106 lines
892 B
Text

NAME=ara swap
FILE==
CMDS=<<EOF
e asm.arch=x86
e asm.bits=64
ara+
ar rax=33
ar rax
aras
ar rax
EOF
EXPECT=<<EOF
rax = 0x00000021
rax = 0x00000000
EOF
RUN
NAME=ara swap 2
FILE==
CMDS=<<EOF
e asm.arch=x86
e asm.bits=64
ara+
ar rax=33
ar rax
aras
ar rax
aras
ar rax
EOF
EXPECT=<<EOF
rax = 0x00000021
rax = 0x00000000
rax = 0x00000021
EOF
RUN
NAME=ara push
FILE==
CMDS=<<EOF
e asm.arch=x86
e asm.bits=64
ara~?
ara+
ara~?
EOF
EXPECT=<<EOF
26
39
EOF
RUN
NAME=ara pop
FILE==
CMDS=<<EOF
e asm.arch=x86
e asm.bits=64
ara~?
ara+
ara~?
ara-
ara~?
ara-
ara~?
ara-
ara~?
EOF
EXPECT=<<EOF
26
39
26
13
13
EOF
RUN
NAME=arcc+tcc
FILE==
CMDS=<<EOF
e asm.arch=x86
e asm.bits=64
afcl
e asm.arch=arm
e asm.bits=32
arcc
e asm.arch=x86
e asm.bits=64
arcc
tcc `arcc`
afcl
EOF
EXPECT=<<EOF
amd64
amd64syscall
ms
reg
swift
r0 reg(r0, r1, r2, r3)
rdi reg(rdi, rsi, rdx, rcx)
amd64
amd64syscall
ms
reg
swift
EOF
RUN