Lazarus

Using the Lazarus IDE => Editor => Topic started by: totya on June 16, 2019, 09:11:15 am

Title: [BUG] JEDI doesn't work with asm if...
Post by: totya on June 16, 2019, 09:11:15 am
Hi!

if I list the used register at the end of the asm block, de JEDI formatter doesn't work.

Code: Pascal  [Select][+][-]
  1. {$asmmode intel}
  2. procedure TForm1.Button1Click(Sender: TObject);
  3. begin
  4.   asm
  5.  
  6.   end; ['rsi'];
  7. end;
  8.  

If I comment this line, JEDI works:

Code: Pascal  [Select][+][-]
  1. {$asmmode intel}
  2. procedure TForm1.Button1Click(Sender: TObject);
  3. begin
  4.   asm
  5.  
  6.   end; //['rsi'];
  7. end;      
  8.  
Title: Re: [BUG] JEDI doesn't work with asm if...
Post by: rvk on June 16, 2019, 09:26:31 am
Is this also the case if you remove the semicolon between the end and the registry list?
(I can't test it right now)

See the wiki (without the extra semicolon).

Code: Pascal  [Select][+][-]
  1. asm  
  2.   Movl $1,%ebx  
  3.   Movl $0,%eax  
  4.   addl %eax,%ebx  
  5. end [’EAX’,’EBX’];
https://www.freepascal.org/docs-html/ref/refse87.html

If it is still a problem you could search (and if needed add it to the) the bugtracker.
Title: Re: [BUG] JEDI doesn't work with asm if...
Post by: totya on June 16, 2019, 09:31:56 am
Hi Master!

JEDI doesn't work that way too:

Code: Pascal  [Select][+][-]
  1. {$asmmode intel}
  2. procedure TForm1.Button1Click(Sender: TObject);
  3. begin
  4.   asm
  5.  
  6.   end ['rsi'];
  7. end;
  8.  

Bug tracker... oh yes...  done! (https://bugs.freepascal.org/view.php?id=35722)
Title: Re: [BUG] JEDI doesn't work with asm if...
Post by: Thaddy on June 16, 2019, 10:49:37 am
Jedi is still rather Delphi windows flavor. This needs a fix for fpc only, but I don't know if it is maintained. Intel mode + delphi works correct: there you don't have to close with used registers.
Title: Re: [BUG] JEDI doesn't work with asm if...
Post by: totya on June 17, 2019, 04:59:44 pm
but I don't know if it is maintained

Thanks for the answer! As I see on the bug tracker, JEDI errors usually corrected...
TinyPortal © 2005-2018