- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I discovered that the latest x86-64 ICX 2024.0.0 generates incorrect registers.
This error has been identified in 15 opcodes.
Buggy code.
```
void bug(int num) {
__asm__( ".intel_syntax noprefix\n"
"nop\n"
"cmpbexadd [RAX+1], EBP, R9D\n"
"cmpbxadd [RAX+1], EBP, R9D\n"
"cmplexadd [RAX+1], EBP, R9D\n"
"cmpbexadd [RAX+1], EBP, R9D\n"
"cmplxadd [RAX+1], EBP, R9D\n"
"cmpnbexadd [RAX+1], EBP, R9D\n"
"cmpnbxadd [RAX+1], EBP, R9D\n"
"cmpnlxadd [RAX+1], EBP, R9D\n"
"cmpnoxadd [RAX+1], EBP, R9D\n"
"cmpnpxadd [RAX+1], EBP, R9D\n"
"cmpnsxadd [RAX+1], EBP, R9D\n"
"cmpnzxadd [RAX+1], EBP, R9D\n"
"cmppxadd [RAX+1], EBP, R9D\n"
"cmpsxadd [RAX+1], EBP, R9D\n"
"cmpzxadd [RAX+1], EBP, R9D\n"
"nop\n"
);
}
```
Compiled Code
```
bug:
push rbp
mov rbp,rsp
mov DWORD PTR [rbp-0x4],edi
nop
cmpbexadd DWORD PTR [rax+0x1],r13d,r9d
cmpbxadd DWORD PTR [rax+0x1],r13d,r9d
cmplexadd DWORD PTR [rax+0x1],r13d,r9d
cmpbexadd DWORD PTR [rax+0x1],r13d,r9d
cmplxadd DWORD PTR [rax+0x1],r13d,r9d
cmpnbexadd DWORD PTR [rax+0x1],r13d,r9d
cmpnbxadd DWORD PTR [rax+0x1],r13d,r9d
cmpnlxadd DWORD PTR [rax+0x1],r13d,r9d
cmpnoxadd DWORD PTR [rax+0x1],r13d,r9d
cmpnpxadd DWORD PTR [rax+0x1],r13d,r9d
cmpnsxadd DWORD PTR [rax+0x1],r13d,r9d
cmpnzxadd DWORD PTR [rax+0x1],r13d,r9d
cmppxadd DWORD PTR [rax+0x1],r13d,r9d
cmpsxadd DWORD PTR [rax+0x1],r13d,r9d
cmpzxadd DWORD PTR [rax+0x1],r13d,r9d
nop
pop rbp
ret
push rbp
mov rbp,rsp
mov DWORD PTR [rbp-0x4],edi
nop
cmpbexadd DWORD PTR [rax+0x1],r13d,r9d
cmpbxadd DWORD PTR [rax+0x1],r13d,r9d
cmplexadd DWORD PTR [rax+0x1],r13d,r9d
cmpbexadd DWORD PTR [rax+0x1],r13d,r9d
cmplxadd DWORD PTR [rax+0x1],r13d,r9d
cmpnbexadd DWORD PTR [rax+0x1],r13d,r9d
cmpnbxadd DWORD PTR [rax+0x1],r13d,r9d
cmpnlxadd DWORD PTR [rax+0x1],r13d,r9d
cmpnoxadd DWORD PTR [rax+0x1],r13d,r9d
cmpnpxadd DWORD PTR [rax+0x1],r13d,r9d
cmpnsxadd DWORD PTR [rax+0x1],r13d,r9d
cmpnzxadd DWORD PTR [rax+0x1],r13d,r9d
cmppxadd DWORD PTR [rax+0x1],r13d,r9d
cmpsxadd DWORD PTR [rax+0x1],r13d,r9d
cmpzxadd DWORD PTR [rax+0x1],r13d,r9d
nop
pop rbp
ret
```
I tested it through godbolt.
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I've escalated your case to our internal engineering team.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The fix is expected be in compiler version 2025.0 release.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page