Registriert seit: 6. Apr 2011
Ort: Berlin
3.070 Beiträge
Delphi 10.4 Sydney
|
AW: Delphi 12: Enum Value to Record per Implicit-Operator ist kaputt
13. Dez 2023, 16:47
Hier die generierten Debug Win64 Disassembler-Views zwischen begin und end des TRec.Implicit-Operators.
Sieht schon blöd anders aus unterhalb der for-Schleife.
Delphi-Quellcode:
// Delphi 11.3
SteviesExample.dpr.20: begin
000000000042BC50 55 push rbp
000000000042BC51 4883EC10 sub rsp,$10
000000000042BC55 488BEC mov rbp,rsp
000000000042BC58 895528 mov [rbp+$28],edx
SteviesExample.dpr.24: for i := Low(values) to High(values) do
000000000042BC5B 33C0 xor eax,eax
000000000042BC5D 8B4D28 mov ecx,[rbp+$28]
000000000042BC60 894508 mov [rbp+$08],eax
000000000042BC63 394D08 cmp [rbp+$08],ecx
000000000042BC66 7F10 jnle TRec.&op_Implicit + $28
000000000042BC68 2BC8 sub ecx,eax
000000000042BC6A 83C101 add ecx,$01
SteviesExample.dpr.28: end;
000000000042BC6D 83450801 add dword ptr [rbp+$08],$01
SteviesExample.dpr.24: for i := Low(values) to High(values) do
000000000042BC71 83E901 sub ecx,$01
000000000042BC74 85C9 test ecx,ecx
000000000042BC76 75F5 jnz TRec.&op_Implicit + $1D
000000000042BC78 90 nop
SteviesExample.dpr.31: end;
000000000042BC79 8B450C mov eax,[rbp+$0c]
000000000042BC7C 488D6510 lea rsp,[rbp+$10]
000000000042BC80 5D pop rbp
000000000042BC81 C3 ret
// Delphi 12
SteviesExample.dpr.20: begin
000000000042C4C0 55 push rbp
000000000042C4C1 4883EC30 sub rsp,$30
000000000042C4C5 488BEC mov rbp,rsp
000000000042C4C8 48895548 mov [rbp+$48],rdx
SteviesExample.dpr.24: for i := Low(values) to High(values) do
000000000042C4CC 488B4548 mov rax,[rbp+$48]
000000000042C4D0 B900000080 mov ecx,$80000000
000000000042C4D5 488D0C01 lea rcx,[rcx+rax]
000000000042C4D9 BAFFFFFFFF mov edx,$ffffffff
000000000042C4DE 483BCA cmp rcx,rdx
000000000042C4E1 7605 jbe TRec.&op_Implicit + $28
000000000042C4E3 E8E8B8FDFF call @BoundErr
000000000042C4E8 33C9 xor ecx,ecx
000000000042C4EA 894D28 mov [rbp+$28],ecx
000000000042C4ED 394528 cmp [rbp+$28],eax
000000000042C4F0 7F10 jnle TRec.&op_Implicit + $42
000000000042C4F2 2BC1 sub eax,ecx
000000000042C4F4 83C001 add eax,$01
SteviesExample.dpr.28: end;
000000000042C4F7 83452801 add dword ptr [rbp+$28],$01
SteviesExample.dpr.24: for i := Low(values) to High(values) do
000000000042C4FB 83E801 sub eax,$01
000000000042C4FE 85C0 test eax,eax
000000000042C500 75F5 jnz TRec.&op_Implicit + $37
000000000042C502 90 nop
SteviesExample.dpr.31: end;
000000000042C503 8B452C mov eax,[rbp+$2c]
000000000042C506 488D6530 lea rsp,[rbp+$30]
000000000042C50A 5D pop rbp
000000000042C50B C3 ret
|
|
Zitat
|