Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible bugs in datafiles and xed code #340

Open
a0rland0 opened this issue Nov 6, 2024 · 1 comment
Open

Possible bugs in datafiles and xed code #340

a0rland0 opened this issue Nov 6, 2024 · 1 comment

Comments

@a0rland0
Copy link

a0rland0 commented Nov 6, 2024

Hi,
In file "datafiles\xed-addressing-modes-new.txt" (line 483) shouldn't these lines be:

REXB4=1 REXB=0 SIBBASE=0b101 MOD=0b01 | BASE0=Ar21() SEG0=FINAL_DSEG() DISP_WIDTH=8
REXB4=1 REXB=0 SIBBASE=0b101 MOD=0b10 | BASE0=Ar21() SEG0=FINAL_DSEG() DISP_WIDTH=32

instead of:

REXB4=1 REXB=0 SIBBASE=0b101 MOD=0b01 | BASE0=Ar21() SEG0=FINAL_SSEG() DISP_WIDTH=8
REXB4=1 REXB=0 SIBBASE=0b101 MOD=0b10 | BASE0=Ar21() SEG0=FINAL_SSEG() DISP_WIDTH=32

The same logic is applied to Ar13() and Ar29(), so I wonder if this is an error.
Thanks.

@a0rland0
Copy link
Author

a0rland0 commented Dec 3, 2024

Hi,
A few other things that might be wrong too (imo).

  1. In xed-decode.c the function "check_all_regs_match" should be ifdef'd with XED_ATTRIBUTE_NO_REG_MATCH_DEFINED instead of XED_ATTRIBUTE_NO_SRC_DEST_MATCH_DEFINED. This will make the code consistent with function xed_decode_finalize_operand_storage_fields.

  2. NOP5 (and NOP6, etc.) will not work properly in 16-bit mode. A valid NOP using 5 bytes would be 66 0F 1F 44 00 i.e.

{
ICLASS : NOP5
CPL : 3
CATEGORY : WIDENOP
EXTENSION : BASE
ISA_SET : FAT_NOP
PATTERN : 0x0F 0x1F 0x44 0x00 66_prefix mode16
OPERANDS :
PATTERN : 0x0F 0x1F 0x44 0x00 0x00 mode32
OPERANDS :
PATTERN : 0x0F 0x1F 0x44 0x00 0x00 mode64
OPERANDS :
}

Thanks.

@a0rland0 a0rland0 changed the title Possible bad segment register used with Ar21() Possible bugs in datafiles and xed code Dec 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant