I've tried hard to figure out what addr32
means in assembly code. For example, I use gdb to trace a binary; below is part of the code.
adcx %r13,%r13 #! PC = 0x55555557d9fb
adox %rcx,%r10 #! PC = 0x55555557da01
adcx %r14,%r14 #! PC = 0x55555557da07
addr32 mulx %rdx,%rcx,%rbp #! PC = 0x55555557da0d
mov 0x98(%rsi),%rdx #! EA = L0x7fffffffdc68; Value = 0x0000000000000000; PC = 0x55555557da13
adox %rax,%r11 #! PC = 0x55555557da1a
adcx %r15,%r15 #! PC = 0x55555557da20
adox %rcx,%r12 #! PC = 0x55555557da26
mov $0x20,%rsi #! PC = 0x55555557da2c
adox %rbp,%r13 #! PC = 0x55555557da33
addr32 addr32 mulx %rdx,%rcx,%rax #! PC = 0x55555557da39
What does the addr32
in line4 exactly mean? And why there's a double addr32
in the last line?
CodePudding user response:
addr32
is the prefix 67h
. It does not have an effect on instructions without memory operands.
On instructions with memory operands, it changes the address size to 32 bit.
Now as for why the prefix is used here, I don't know. It could be some sort of padding or to avoid some sort of microarchitectural bug.