Skip to content

Potentially incomplete sleigh definition of x86 XLAT resulting in horrible C #5984

Description

@Wall-AF

Can anyone explain why the below line (from ia.sinc) is ignoring the seg16 when it evaluates the lookup address for the resulting value of AL?
:XLAT seg16^BX is vexMode=0 & addrsize=0 & seg16 & byte=0xd7; BX { tmp:$(SIZE)= 0; ptr2(tmp,BX+zext(AL)); AL = *tmp; }
And is it correct?

The reason I'm questioning this is that the resulting C being produced is ignoring the base table and producing C like
*(byte *)(ulong)(aMulTab[i]->aOffsets[1] + (uint)local_10[1])
instead of something like
table[aMulTab[i]->aOffsets[1]] [local_10[1]]

Should the sleigh line above be changed to include the seg16 in the address and if so, what is the correct syntax for it?

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions