Forum Discussion
her123
12 years agoNew Contributor
TBaseVirtualTree.PackArray() where it executes assembler on Win32 is the problem
asm
PUSH EBX
PUSH EDI
PUSH ESI
MOV ESI, EDX
MOV EDX, -1
JCXZ @@Finish // Empty list?
INC EDX // init remaining entries counter
MOV EDI, ESI // source and destination point to the list memory
MOV EBX, 1 // use a register instead of immediate operant to check against
@@PreScan:
TEST [ESI], EBX // do the fastest scan possible to find the first entry
// which must be removed
JNZ @@DoMainLoop
INC EDX
ADD ESI, 4
DEC ECX
JNZ @@PreScan
JMP @@Finish
@@DoMainLoop:
MOV EDI, ESI
@@MainLoop:
TEST [ESI], EBX // odd entry?
JNE @@Skip // yes, so skip this one
MOVSD // else move the entry to new location
INC EDX // count the moved entries
DEC ECX
JNZ @@MainLoop // do it until all entries are processed
JMP @@Finish
@@Skip:
ADD ESI, 4 // point to the next entry
DEC ECX
JNZ @@MainLoop // do it until all entries are processed
@@Finish:
MOV EAX, EDX // prepare return value
POP ESI
POP EDI
POP EBX
end;
AQTime has problems with this.
The solution is to modify the conditional define and use the Pascal code that would normally be used for the 64bit build.
asm
PUSH EBX
PUSH EDI
PUSH ESI
MOV ESI, EDX
MOV EDX, -1
JCXZ @@Finish // Empty list?
INC EDX // init remaining entries counter
MOV EDI, ESI // source and destination point to the list memory
MOV EBX, 1 // use a register instead of immediate operant to check against
@@PreScan:
TEST [ESI], EBX // do the fastest scan possible to find the first entry
// which must be removed
JNZ @@DoMainLoop
INC EDX
ADD ESI, 4
DEC ECX
JNZ @@PreScan
JMP @@Finish
@@DoMainLoop:
MOV EDI, ESI
@@MainLoop:
TEST [ESI], EBX // odd entry?
JNE @@Skip // yes, so skip this one
MOVSD // else move the entry to new location
INC EDX // count the moved entries
DEC ECX
JNZ @@MainLoop // do it until all entries are processed
JMP @@Finish
@@Skip:
ADD ESI, 4 // point to the next entry
DEC ECX
JNZ @@MainLoop // do it until all entries are processed
@@Finish:
MOV EAX, EDX // prepare return value
POP ESI
POP EDI
POP EBX
end;
AQTime has problems with this.
The solution is to modify the conditional define and use the Pascal code that would normally be used for the 64bit build.
Related Content
- 3 years ago
- 5 years ago
- 7 years ago
Recent Discussions
- 9 months ago
- 2 years ago