Incorrect operand size for padd mmx intructions passed then using NASM assembler
Original Reporter info from Mantis: Z80
-
Reporter name: Kirill
Original Reporter info from Mantis: Z80
- Reporter name: Kirill
Description:
As i said
incorrect operand size for padd mmx intructions passed then using NASM assembler
affected instructions - PADDn
paddb
paddw
paddd
paddusb
paddusw
paddsb
paddsw
compiler makes these lines in asm file, you see - there's
DWORD instead of QWORD
which leads to NASM error - "mismatch in operand sizes"
PASCALMAIN:
GLOBAL _main
_main:
push ebp
mov ebp,esp
call NEAR FPC_INITIALIZEUNITS
paddb mm0,dword [U_P$PROGRAM_Q]
paddw mm0,dword [U_P$PROGRAM_Q]
paddd mm0,dword [U_P$PROGRAM_Q]
paddusb mm0,dword [U_P$PROGRAM_Q]
paddusw mm0,dword [U_P$PROGRAM_Q]
paddsb mm0,dword [U_P$PROGRAM_Q]
paddsw mm0,dword [U_P$PROGRAM_Q]
call NEAR FPC_DO_EXIT
leave
ret
; End asmlist al_procedures
; Begin asmlist al_globals
if
Steps to reproduce:
compile example using -Anasmwin32 switch. I guess it's not OS related so the same should happen for linux versions of FPC and NASM
{$ASMMODE INTEL}
var
q:qword;
begin
asm
paddb mm0,q
paddw mm0,q
paddd mm0,q
paddusb mm0,q
paddusw mm0,q
paddsb mm0,q
paddsw mm0,q
end;
end.
Mantis conversion info:
- Mantis ID: 18009
- OS: Win7 x64
- Platform: Win32
- Version: 2.5.1
- Fixed in version: 2.6.0
- Fixed in revision: 16857 (#d6adcdfe)
- Monitored by: » Z80 (Kirill)