Watch, Follow, &
Connect with Us
Public Report
Report From: Delphi-BCB/Compiler/Delphi/BASM    [ Add a report in this area ]  
Report #:  98621   Status: Closed
[x64] JE/JMP instructions missing from compiled routine
Project:  Delphi Build #:  16.0.4256.43595
Version:    16.0 Submitted By:   nick b
Report Type:  Basic functionality failure Date Reported:  9/6/2011 8:33:01 PM
Severity:    Serious / Highly visible problem Last Updated: 12/19/2012 7:55:05 PM
Platform:    All versions Internal Tracking #:   287475
Resolution: Fixed (Resolution Comments) Resolved in Build: : Update 4
Duplicate of:  None
Voting and Rating
Overall Rating: No Ratings Yet
0.00 out of 5
Total Votes: 5
Description
[x64]
Created the following simple in-line assembler routine.  When compiling in 64 bit mode, the JE instruction is missing from the object code causing logic issues.

On the basis that this is an optimization error, I turned optimization off in the compiler options and then got a fatal internal error from the compiler
----------
...
...
36: done:
37:    nop
38: end;
39:
40: procedure TForm1.Button1Click(Sender: TObject);
...
...

[DCC Fatal Error] Unit1.pas(38): F2084 Internal Error: NI16392
----------
Steps to Reproduce:
create an in-line routine like this...compile and test:

function Cmp(A, B: longint): integer;
label
  equal, done;
asm
  CMP A,B
  JE equal
  mov @Result, 1
  jmp done
equal:
  mov @Result, 0
done:
  nop
end;

procedure TForm1.Button2Click(Sender: TObject);
begin
    ShowMessage(IntToStr(Cmp(10,11)));
end;
Workarounds
None known
Attachment
None
Comments

Tomohiro Takahashi at 9/6/2011 9:02:23 PM -
I deleted QC#98620 as Sysop. Please do not post same reports.
Thanks.

Tomohiro Takahashi at 9/6/2011 10:06:27 PM -

Server Response from: ETNACODE01