Why I ask about physical CPU, cos it might have a bug.
our bug report to Apple for example
Incorrect behavior of instruction 'movzx r32, r16' prefixed with 0x66in Rosetta2
Tested on MacBook Pro, Apple M1, macOS Monterey (version 12.5).
In Rosetta 2, instruction 'movzx r32,r16' prefixed with 0x66 sets the high bits (from16 up to 63) of a destination register to zero.
The 0x66 prefix lowers destination register from32 to 16 bit and, for example, instruction 'movzx AX,AX' looks like a NOP instruction on Intel and AMD processors. But when executed in Rosetta2, the high bits of AX register (from16 up to 63) are zeroed, which subsequently leads to a fatal error (for example, memory access violation).
Code to reproduce the behavior:
unsigned longlong __attribute((optnone)) func(void) {
unsigned longlong res;
__asm (
".intel_syntax\n""mov rax,-1\n"".byte 0x66\n""movzx eax,ax\n"
: "=a" (res)
);
return(res);
}
int main(int argc,char *argv[]) {
printf("\nbefore movzx: %I64x\nafter movzx: %I64x\n",~0ull,func());
return(0);
}
Please find attached the full project.
To compile we used xcode 13.3 (13E113)
clang --version
Apple clang version 13.1.6 (clang-1316.0.21.2)
The behavior on Intel and AMD under Window 11:
before movzx: ffffffffffffffff
after movzx: ffffffffffffffff
The same result on MacBook Pro, Intel Core i7, macOS Monterey (version 12.5)
before movzx: ffffffffffffffff
after movzx: ffffffffffffffff
But when we execute in Rosetta2 on MacBook Pro, Apple M1, macOS Monterey (version 12.5), we get the following result:
before movzx: ffffffffffffffff
after movzx: ffff
The higher bit of registry was zeroed: significant bits only remained on lower 16 bits while others were set to zero.
This is guest CPU (virtual) Do you know host CPU (physical)?
try this code please
Sorry for the late reply. I was hoping to have an answer to your question regarding the host computers (physical) CPU - but my VPS hosting site has not yet responded fully. I'll get back to you when they do, until then, here is the result of your recent code.
I don't think CPU (virtual or physical) matter here. Any computer's CPU should make a correct calculation.
The problem here is the code of new update version of MT4 platform.
Just try to call MathRound() function on new update version and you will see.
I believe that he’s an developer for MetaQoutes.
He’s trying to figure out the problem, since build 1421 works fine on most Windows OS, but seems to malfunction only on Server Windows or other specific hardware running different operating systems.
Carl Emil Bograd #: He’s trying to figure out the problem, since build 1421 works fine on most Windows OS, but seems to malfunction only on Server Windows or other specific hardware running different operating systems.
The problem occurs when Windows Server is running in KVM/QEMU and the VM is set to KVM64 or QEMU64 virtual CPU. The problem is not solved yet. Maybe specifying the VM CPU as 'host' or specifying the exact model might help, but it depends on the hosting provider.
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
This is guest CPU (virtual)
Do you know host CPU (physical)?
try this code please
i have problem with this:
This is the client server.
he reported that some program functions do not work.
Using tests, we found out that the MathRound functions do not work
We try to understand what is going wrong
Why I ask about physical CPU, cos it might have a bug.
our bug report to Apple for example
This is guest CPU (virtual)
Do you know host CPU (physical)?
try this code please
Sorry for the late reply.
I was hoping to have an answer to your question regarding the host computers (physical) CPU - but my VPS hosting site has not yet responded fully.
I'll get back to you when they do, until then, here is the result of your recent code.
Could you give us more details about your PC
your CPU
your OS
is it Virtual Machine?
I don't think CPU (virtual or physical) matter here. Any computer's CPU should make a correct calculation.
The problem here is the code of new update version of MT4 platform.
Just try to call MathRound() function on new update version and you will see.I don't think CPU (virtual or physical) matter here. Any computer's CPU should make a correct calculation.
The problem here is the code of new update version of MT4 platform.
Just try to call MathRound() function on new update version and you will see.This is guest CPU (virtual)
Do you know host CPU (physical)?
try this code please
Thanks
He’s trying to figure out the problem, since build 1421 works fine on most Windows OS, but seems to malfunction only on Server Windows or other specific hardware running different operating systems.
The problem occurs when Windows Server is running in KVM/QEMU and the VM is set to KVM64 or QEMU64 virtual CPU. The problem is not solved yet. Maybe specifying the VM CPU as 'host' or specifying the exact model might help, but it depends on the hosting provider.
Also, as I understand it, there is a problem with fabs() which is used in:
MT5 has the same problem. Expert Advisors with the MathRound and MathCeil functions do not work on the windows server