The fastcall combined with invoke is also a powerful tool in assembly ;-)
> Conventions entitled fastcall have not been standardized, and have been
> implemented differently, depending on the compiler vendor.
The standards in this case is C/C++, and in the case of MS stdcalls will be used?
Watcom allows the user to specify his own calling convention, and uses
EAX, EDX, EBX, ECX - ax, dx, bx, cx (-zf1).
The assembler calling convention is register calls, usually using (E)AX, (E)DX and (E)CX.
EBX is preserved in Win32, but BX used in 16-bit.
in v2.08, support for MS fastcall has been improved. The proposed optimization has been implemented, and loading the arguments into the registers is now more fool-proved.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
DX is used as argument to fast1:
issue opened in bug tracker:
https://sourceforge.net/tracker/?func=detail&aid=3538021&group_id=255677&atid=1126895
Please report bugs in the bug tracker!
There are 2 problems with support of MS 16-bit fastcalls:
- the registers used to hold arguments in JWasm v2.06 were CX and DX. However, the correct registers are AX, DX and BX.
- Additional parameters are pushed from LEFT to RIGHT ( like the PASCAL calling convention )
The fastcall combined with invoke is also a powerful tool in assembly ;-)
> Conventions entitled fastcall have not been standardized, and have been
> implemented differently, depending on the compiler vendor.
The standards in this case is C/C++, and in the case of MS stdcalls will be used?
Watcom allows the user to specify his own calling convention, and uses
EAX, EDX, EBX, ECX - ax, dx, bx, cx (-zf1).
The assembler calling convention is register calls, usually using (E)AX, (E)DX and (E)CX.
EBX is preserved in Win32, but BX used in 16-bit.
MS: (-zf0) ECX and EDX - cx and dx
Watcom: (-zf1)
It would be nice then if this..
..could be reduced to this:
Yes, I agree the proposed optimization is useful. But it won't happen for v2.07, this version is due to be released soon.
in v2.08, support for MS fastcall has been improved. The proposed optimization has been implemented, and loading the arguments into the registers is now more fool-proved.