Some Intel asm instructions give compiler errors
Original Reporter info from Mantis: bobo
-
Reporter name: Attila Borka
Original Reporter info from Mantis: bobo
- Reporter name: Attila Borka
Description:
I'm trying to convert a Delphi project to Lazarus/FPC and getting a compiler error "Error: Cannot use local variable or parameters here" for
mov edi, offset localvariable
as well as for
mov al, dl or xor al, dl
Using the latest trunk SVN for both FPC and Lazarus
Additional information:
Example code snippet:
function something(s :String; i: Integer):String;
var tmp:Array[0..32768]of byte;
begin
.
.
{$ASMMODE intel}
asm
pushad
mov edi, offset tmp //<= error here
add edi, ebp
mov al, dl //<= error here
xor al, dl //<= error here
.
.
popad
end;
end;
Mantis conversion info:
- Mantis ID: 12595
- Version: 2.3.1
- Fixed in version: 2.4.0
- Fixed in revision: 12158 (#80ff09c6)