Fix rasm2 -L bits field for 4 and 0-bit plugins ##asm (#17686)

This commit is contained in:
pancake 2020-09-23 07:31:56 +02:00 committed by GitHub
parent 1c485e8bfc
commit 19f941509b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 0 deletions

View File

@ -204,7 +204,12 @@ static void rasm2_list(RAsmState *as, const char *arch) {
bits[0] = 0;
if (h->bits == 27) {
strcat (bits, "27");
} else if (h->bits == 0) {
strcat (bits, "any");
} else {
if (h->bits & 4) {
strcat (bits, "4 ");
}
if (h->bits & 8) {
strcat (bits, "8 ");
}

View File

@ -1,3 +1,13 @@
NAME=rasm2 i4004
FILE=-
CMDS=<<EOF
!!rasm2 -L~4004
EOF
EXPECT=<<EOF
_dAe 4 i4004 LGPL3 Intel 4004 microprocessor
EOF
RUN
NAME=rasm2 arm asm/dis endian
FILE=-
CMDS=<<EOF