forked from tklengyel/valgrind
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
amd64: WIP start implementing the amd64 SHA extensions
since 2017 on AMD (Epyc) and Intel (since Goldmont). See bugzilla #398545
- Loading branch information
Showing
8 changed files
with
228 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
f0fc15e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have tested this patch based on 3.16.1, and get the error as following, it seems that the return value of dis_ESC_0F38 is not right yet.
29 vex: priv/guest_amd64_toIR.c:32446 (disInstr_AMD64_WRK): Assertion `delta - delta_at_primary_opcode >= 0' failed.
30 vex storage: T total 1732979880 bytes allocated
31 vex storage: P total 512 bytes allocated
32
33 valgrind: the 'impossible' happened:
34 LibVEX called failure_exit().
35
36 host stacktrace:
37 ==1997== at 0x58009EFA: show_sched_status_wrk (m_libcassert.c:406)
38 ==1997== by 0x5800A017: report_and_quit (m_libcassert.c:477)
39 ==1997== by 0x5800A26C: panic (m_libcassert.c:553)
40 ==1997== by 0x5800A26C: vgPlain_core_panic_at (m_libcassert.c:558)
41 ==1997== by 0x5800A28A: vgPlain_core_panic (m_libcassert.c:563)
42 ==1997== by 0x5808DFB4: failure_exit (m_translate.c:761)
43 ==1997== by 0x5810C04A: vex_assert_fail (main_util.c:245)
44 ==1997== by 0x581A3921: disInstr_AMD64_WRK (guest_amd64_toIR.c:32446)
45 ==1997== by 0x581A3CCF: disInstr_AMD64 (guest_amd64_toIR.c:32562)
46 ==1997== by 0x58127739: disassemble_basic_block_till_stop (guest_generic_bb_to_IR.c:954)
47 ==1997== by 0x58128784: bb_to_IR (guest_generic_bb_to_IR.c:1363)
48 ==1997== by 0x58109814: LibVEX_FrontEnd (main_main.c:583)
49 ==1997== by 0x5810A182: LibVEX_Translate (main_main.c:1235)
50 ==1997== by 0x58090A43: vgPlain_translate (m_translate.c:1828)
51 ==1997== by 0x5805DC0F: handle_tt_miss (scheduler.c:1138)
52 ==1997== by 0x5805DC0F: vgPlain_scheduler (scheduler.c:1500)
53 ==1997== by 0x580BD2C0: thread_wrapper (syswrap-linux.c:101)
54 ==1997== by 0x580BD2C0: run_a_thread_NORETURN (syswrap-linux.c:154)
55 ==1997== by 0x580BD5AA: vgModuleLocal_start_thread_NORETURN (syswrap-linux.c:328)
56 ==1997== by 0x5806EDDD: ??? (in /usr/local/lib/valgrind/massif-amd64-linux)
BTW, my original issue on "AMD EPYC 7302P 16-Core Processor" is as following,
28 vex amd64->IR: unhandled instruction bytes: 0xF 0x38 0xCC 0xFA 0xF 0x38 0xCB 0xD9 0xC5 0xF9
29 vex amd64->IR: REX=0 REX.W=0 REX.R=0 REX.X=0 REX.B=0
30 vex amd64->IR: VEX=0 VEX.L=0 VEX.nVVVV=0x0 ESC=0F38
31 vex amd64->IR: PFX.66=0 PFX.F2=0 PFX.F3=0
32 ==10543== valgrind: Unrecognised instruction at address 0x1b9fbcc.
33 ==10543== at 0x1B9FBCC: _mm_sha256msg1_epu32 (sha.rs:100)