Few Intel x64 assembler bugs
Original Reporter info from Mantis: Enigma
-
Reporter name:
Original Reporter info from Mantis: Enigma
- Reporter name:
Description:
I've noticed few assembler bugs, means bugs that occur when I use some "asm end;"... Everything here is related to Intel assembler type, x64.
- Compiler allows to write such code
asm
pushad
end;
but "pushad" is instruction of x32 assembler, in x64 there is no pushad/pushaq, there is no instructions that allows to push all registers to stack. Compiler generates $60 opcode for this command, but in WinDbg this opcode is known as invalid.
- Same as #1 but with "popad"
- Compiler allows to do this:
asm<br/>
pushfd
popfd
end;
but in x64 assembler there is no such commands too. For x64 there are:
asm<br/>
pushfq
popfq
end;
4. Also one bug... If I implement such record:
type<br/>
TOwnRecord = record
first_param : qword;
second_param : qword;
third_param : qword;
end;
var
param : TOwnRecord;
then in assembler code I do the following:
asm<br/>
lea rax, [rip + param]
mov TOwnRecord(rax).first_param, rcx
end;
after compiling, the second line is changing from qword to dword, means, in WinDbg the second line looks:
mov dword ptr [rax + 0], ecx
but not as I require:
mov qword ptr [rax + 0], rcx
Mantis conversion info:
- Mantis ID: 14862
- OS: Vista
- OS Build: x64
- Platform: Windows
- Version: 2.5.1
- Fixed in version: 2.6.0
- Fixed in revision: 15546 (#9273856e)