asm-differ icon indicating copy to clipboard operation
asm-differ copied to clipboard

failed to find address immediate

Open RappyPhan opened this issue 1 year ago • 6 comments

I created a scratch on decomp.me targeting x86 Windows: https://decomp.me/scratch/dhRdk

As you can see, it's empty, save for a message in the Problems pane:

Diff error: Error running asm-differ: failed to find address immediate for line 'mov %eax,0(%ebp)'

RappyPhan avatar Aug 18 '24 20:08 RappyPhan

It looks like the regexes in process_reloc aren't capturing 0/0x0 in this instruction. But ebp shouldn't have a relocation though, as it is a copy of the stack pointer?

The immediate being 0 instead of 0x0 is related to https://github.com/simonlindholm/asm-differ/issues/160

1superchip avatar Aug 18 '24 21:08 1superchip

Well, for me the 0x is not stripped

Diff error: Error running asm-differ: failed to find address immediate for line 'mov %eax,0x0(,%edx,4)'

ivanka2012 avatar Sep 08 '24 21:09 ivanka2012

Changing this regex seems to work on first sight, but I'm pretty sure this is a giant mistake: (^\$?|(?<=\*))0x0 -> (^\$?|(?<=\*)|)0x0

ivanka2012 avatar Sep 10 '24 17:09 ivanka2012

Another one: Diff error: Error running asm-differ: failed to find address immediate for line 'movss %xmm0,0x4' The 0x4 is from the compiled object file and it's an offset to a global variable, like this: movss %xmm0, _vBestNormal+4 This time the following hack works: (^|(?<=\*)|(?<=\$))0x[0-9a-f]+ -> (^|(?<=\*)|(?<=\$)|(?<=,))0x[0-9a-f]+

ivanka2012 avatar Dec 10 '24 14:12 ivanka2012

Seen here too https://decomp.me/scratch/XlGeq

Diff error: Error running asm-differ: failed to find address immediate for line 'mov %eax,4'

MrSapps avatar Jan 30 '25 23:01 MrSapps

@ivanka2012 do you use decomp.me? do you have a scratch for both? There have been some updates recently that have fixed most issues.

1superchip avatar Mar 17 '25 21:03 1superchip