bernhardu 213c90d3c1
[win/asan] GetInstructionSize: Fix 41 81 7c ... to return 9. (#117828)
Trying to populate the recently added test for GetInstructionSize I
stumbled over this.
gdb and bddisasm have the opinion this instruction is 9 bytes.
Also lldb shows this:
```
(lldb) disassemble --bytes --start-address 0x0000555555556004 --end-address 0x0000555555556024
    0x555555556004: 41 81 7b 73 74 75 76 77     cmpl   $0x77767574, 0x73(%r11)   ; imm = 0x77767574 
    0x55555555600c: 41 81 7c 73 74 75 76 77 78  cmpl   $0x78777675, 0x74(%r11,%rsi,2) ; imm = 0x78777675 
    0x555555556015: 41 81 7d 73 74 75 76 77     cmpl   $0x77767574, 0x73(%r13)   ; imm = 0x77767574 
    0x55555555601d: 00 00                       addb   %al, (%rax)
```

There is also a handy tool in llvm to directly feed in the byte sequence
- `41 81 7c` also uses 9 bytes here:
```
$ echo -n -e "0x41, 0x81, 0x7b, 0x73, 0x74, 0x75, 0x76, 0x77, 0x90" | ./llvm/build/bin/llvm-mc --disassemble --show-encoding
        .text
        cmpl    $2004252020, 115(%r11)          # encoding: [0x41,0x81,0x7b,0x73,0x74,0x75,0x76,0x77]
                                        # imm = 0x77767574
        nop                                     # encoding: [0x90]
$ echo -n -e "0x41, 0x81, 0x7c, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x90" | ./llvm/build/bin/llvm-mc --disassemble --show-encoding
        .text
        cmpl    $2021095029, 116(%r11,%rsi,2)   # encoding: [0x41,0x81,0x7c,0x73,0x74,0x75,0x76,0x77,0x78]
                                        # imm = 0x78777675
        nop                                     # encoding: [0x90]
```
2024-12-09 18:14:55 +01:00
..

Compiler-RT
================================

This directory and its subdirectories contain source code for the compiler
support routines.

Compiler-RT is open source software. You may freely distribute it under the
terms of the license agreement found in LICENSE.txt.

================================