View Issue Details

IDProjectCategoryView StatusLast Update
0013610FPCCompilerpublic2020-04-13 13:29
ReporterMarco van de Voort Assigned To 
PrioritylowSeverityminorReproducibilityhave not tried
Status confirmedResolutionopen 
Platformx86 
Product Version2.3.1 
Summary0013610: Internal error 200309222 (assembler reader)
DescriptionBelow code produces said IE with 2.3.1 as of today.

Note that the code is probably invalid, I was just trying things to get this working.
Steps To Reproduce{$mode delphi}

TYPE TCPUIDData =PACKED RECORD
                        r_eax :CARDINAL;
                        r_ebx :CARDINAL;
                        r_edx :CARDINAL;
                        r_ecx :CARDINAL;
                      END;


procedure bla;
asm
  mov DWord ptr edi.TCPUIDData.r_eax,eax
end;

begin
end.

TagsNo tags attached.
Fixed in Revision
FPCOldBugId0
FPCTarget
Attached Files

Relationships

duplicate of 0009327 closedJonas Maebe Internal error 200309222 (i386 assembler reader) 

Activities

Marco van de Voort

2009-04-29 14:51

manager   ~0027183

Last edited: 2009-04-29 14:52

This bugreport is based on r13056, while the fix was in r13040?

Jonas Maebe

2009-04-29 14:55

manager   ~0027185

Last edited: 2009-04-29 16:09

Sorry, I misread the code. I'm not interested in fixing this bug though (even if it is an internal error).

Marco van de Voort

2009-04-29 16:23

manager   ~0027190

I'm not either. I was just trying random things.

Florian

2009-07-05 21:00

administrator   ~0028934

I changed the status to new for now because it works in Delphi.

Florian

2009-07-05 21:17

administrator   ~0028935

I commited in 13364 a fix which prevents the IE.

Jonas Maebe

2009-07-06 13:37

manager   ~0028945

Isn't that a bug in the Delphi assembler parser? "dword ptr" suggests a memory reference, and then the code indexes a register as if it were a 16-byte record. Although the actually generated code does contain a memory access.

It also works with "DWord ptr [edi.TCPUIDData.r_eax]" in Delphi (and FPC), and I think that is the only correct syntax. IIRC, I also looked this up the D2009 manual you can download from Embarcadero, and that one didn't mention the "DWord ptr edi.TCPUIDData.r_eax" syntax either.

Bart Broersma

2012-12-05 23:57

reporter   ~0064170

Shouldn't this be closed?
There is no more IE (2.6.2RC1)
test.lpr(13,20) Error: Assembler syntax error in operand
test.lpr(13,37) Error: Invalid reference syntax
test.lpr(18) Fatal: There were 2 errors compiling module, stopping

Jonas Maebe

2012-12-06 10:16

manager   ~0064172

It depends on whether or not we want to fix the Delphi-incompatibility.

Bart Broersma

2012-12-06 18:39

reporter   ~0064182

I understand, yet the bug is about an IE.
Perhaps a new bugreport should be created for the asm reader incompatibility?

Marco van de Voort

2015-01-06 22:44

manager   ~0080163

Last edited: 2015-01-06 22:45

View 2 revisions

Probably Jonas and Florian already know this, but to state the obvious for others:

The syntax edi.<typeidentifier>.fieldname is supposed to add the byte offset relative to the start of the record to the memory reference.

so

mov DWord ptr edi.TCPUIDData.r_ecx,eax

translates to

00417748 89470C mov [edi+$0c],eax

Since ecx is at offset 12 in the record.

Issue History

Date Modified Username Field Change
2009-04-29 14:34 Marco van de Voort New Issue
2009-04-29 14:34 Marco van de Voort FPCOldBugId => 0
2009-04-29 14:39 Jonas Maebe Relationship added duplicate of 0009327
2009-04-29 14:39 Jonas Maebe Duplicate ID 0 => 9327
2009-04-29 14:39 Jonas Maebe Status new => resolved
2009-04-29 14:39 Jonas Maebe Resolution open => duplicate
2009-04-29 14:39 Jonas Maebe Assigned To => Jonas Maebe
2009-04-29 14:51 Marco van de Voort Note Added: 0027183
2009-04-29 14:51 Marco van de Voort Status resolved => assigned
2009-04-29 14:52 Marco van de Voort Note Edited: 0027183
2009-04-29 14:55 Jonas Maebe Note Added: 0027185
2009-04-29 14:56 Jonas Maebe Assigned To Jonas Maebe =>
2009-04-29 15:01 Jonas Maebe Status assigned => new
2009-04-29 15:01 Jonas Maebe Steps to Reproduce Updated
2009-04-29 16:09 Jonas Maebe Note Edited: 0027185
2009-04-29 16:23 Marco van de Voort Status new => resolved
2009-04-29 16:23 Marco van de Voort Resolution duplicate => won't fix
2009-04-29 16:23 Marco van de Voort Assigned To => Marco van de Voort
2009-04-29 16:23 Marco van de Voort Note Added: 0027190
2009-04-29 16:23 Marco van de Voort Duplicate ID 9327 => 0
2009-04-29 16:23 Marco van de Voort Assigned To Marco van de Voort =>
2009-07-05 21:00 Florian Status resolved => new
2009-07-05 21:00 Florian Note Added: 0028934
2009-07-05 21:17 Florian Note Added: 0028935
2009-07-05 21:17 Vincent Snijders Resolution won't fix => open
2009-07-06 13:37 Jonas Maebe Note Added: 0028945
2010-02-11 10:35 Marco van de Voort Status new => confirmed
2012-12-05 23:57 Bart Broersma Note Added: 0064170
2012-12-06 10:16 Jonas Maebe Note Added: 0064172
2012-12-06 18:39 Bart Broersma Note Added: 0064182
2015-01-06 22:44 Marco van de Voort Note Added: 0080163
2015-01-06 22:45 Marco van de Voort Note Edited: 0080163 View Revisions