You can subscribe to this list here.
| 2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
(122) |
Nov
(152) |
Dec
(69) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2003 |
Jan
(6) |
Feb
(25) |
Mar
(73) |
Apr
(82) |
May
(24) |
Jun
(25) |
Jul
(10) |
Aug
(11) |
Sep
(10) |
Oct
(54) |
Nov
(203) |
Dec
(182) |
| 2004 |
Jan
(307) |
Feb
(305) |
Mar
(430) |
Apr
(312) |
May
(187) |
Jun
(342) |
Jul
(487) |
Aug
(637) |
Sep
(336) |
Oct
(373) |
Nov
(441) |
Dec
(210) |
| 2005 |
Jan
(385) |
Feb
(480) |
Mar
(636) |
Apr
(544) |
May
(679) |
Jun
(625) |
Jul
(810) |
Aug
(838) |
Sep
(634) |
Oct
(521) |
Nov
(965) |
Dec
(543) |
| 2006 |
Jan
(494) |
Feb
(431) |
Mar
(546) |
Apr
(411) |
May
(406) |
Jun
(322) |
Jul
(256) |
Aug
(401) |
Sep
(345) |
Oct
(542) |
Nov
(308) |
Dec
(481) |
| 2007 |
Jan
(427) |
Feb
(326) |
Mar
(367) |
Apr
(255) |
May
(244) |
Jun
(204) |
Jul
(223) |
Aug
(231) |
Sep
(354) |
Oct
(374) |
Nov
(497) |
Dec
(362) |
| 2008 |
Jan
(322) |
Feb
(482) |
Mar
(658) |
Apr
(422) |
May
(476) |
Jun
(396) |
Jul
(455) |
Aug
(267) |
Sep
(280) |
Oct
(253) |
Nov
(232) |
Dec
(304) |
| 2009 |
Jan
(486) |
Feb
(470) |
Mar
(458) |
Apr
(423) |
May
(696) |
Jun
(461) |
Jul
(551) |
Aug
(575) |
Sep
(134) |
Oct
(110) |
Nov
(157) |
Dec
(102) |
| 2010 |
Jan
(226) |
Feb
(86) |
Mar
(147) |
Apr
(117) |
May
(107) |
Jun
(203) |
Jul
(193) |
Aug
(238) |
Sep
(300) |
Oct
(246) |
Nov
(23) |
Dec
(75) |
| 2011 |
Jan
(133) |
Feb
(195) |
Mar
(315) |
Apr
(200) |
May
(267) |
Jun
(293) |
Jul
(353) |
Aug
(237) |
Sep
(278) |
Oct
(611) |
Nov
(274) |
Dec
(260) |
| 2012 |
Jan
(303) |
Feb
(391) |
Mar
(417) |
Apr
(441) |
May
(488) |
Jun
(655) |
Jul
(590) |
Aug
(610) |
Sep
(526) |
Oct
(478) |
Nov
(359) |
Dec
(372) |
| 2013 |
Jan
(467) |
Feb
(226) |
Mar
(391) |
Apr
(281) |
May
(299) |
Jun
(252) |
Jul
(311) |
Aug
(352) |
Sep
(481) |
Oct
(571) |
Nov
(222) |
Dec
(231) |
| 2014 |
Jan
(185) |
Feb
(329) |
Mar
(245) |
Apr
(238) |
May
(281) |
Jun
(399) |
Jul
(382) |
Aug
(500) |
Sep
(579) |
Oct
(435) |
Nov
(487) |
Dec
(256) |
| 2015 |
Jan
(338) |
Feb
(357) |
Mar
(330) |
Apr
(294) |
May
(191) |
Jun
(108) |
Jul
(142) |
Aug
(261) |
Sep
(190) |
Oct
(54) |
Nov
(83) |
Dec
(22) |
| 2016 |
Jan
(49) |
Feb
(89) |
Mar
(33) |
Apr
(50) |
May
(27) |
Jun
(34) |
Jul
(53) |
Aug
(53) |
Sep
(98) |
Oct
(206) |
Nov
(93) |
Dec
(53) |
| 2017 |
Jan
(65) |
Feb
(82) |
Mar
(102) |
Apr
(86) |
May
(187) |
Jun
(67) |
Jul
(23) |
Aug
(93) |
Sep
(65) |
Oct
(45) |
Nov
(35) |
Dec
(17) |
| 2018 |
Jan
(26) |
Feb
(35) |
Mar
(38) |
Apr
(32) |
May
(8) |
Jun
(43) |
Jul
(27) |
Aug
(30) |
Sep
(43) |
Oct
(42) |
Nov
(38) |
Dec
(67) |
| 2019 |
Jan
(32) |
Feb
(37) |
Mar
(53) |
Apr
(64) |
May
(49) |
Jun
(18) |
Jul
(14) |
Aug
(53) |
Sep
(25) |
Oct
(30) |
Nov
(49) |
Dec
(31) |
| 2020 |
Jan
(87) |
Feb
(45) |
Mar
(37) |
Apr
(51) |
May
(99) |
Jun
(36) |
Jul
(11) |
Aug
(14) |
Sep
(20) |
Oct
(24) |
Nov
(40) |
Dec
(23) |
| 2021 |
Jan
(14) |
Feb
(53) |
Mar
(85) |
Apr
(15) |
May
(19) |
Jun
(3) |
Jul
(14) |
Aug
(1) |
Sep
(57) |
Oct
(73) |
Nov
(56) |
Dec
(22) |
| 2022 |
Jan
(3) |
Feb
(22) |
Mar
(6) |
Apr
(55) |
May
(46) |
Jun
(39) |
Jul
(15) |
Aug
(9) |
Sep
(11) |
Oct
(34) |
Nov
(20) |
Dec
(36) |
| 2023 |
Jan
(79) |
Feb
(41) |
Mar
(99) |
Apr
(169) |
May
(48) |
Jun
(16) |
Jul
(16) |
Aug
(57) |
Sep
(19) |
Oct
|
Nov
|
Dec
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
1
(1) |
2
(2) |
3
(2) |
4
|
5
|
6
|
7
|
|
8
|
9
(5) |
10
(3) |
11
|
12
(3) |
13
(1) |
14
|
|
15
|
16
(3) |
17
|
18
(1) |
19
(1) |
20
|
21
|
|
22
|
23
|
24
|
25
|
26
|
27
(2) |
28
(1) |
|
29
|
30
|
|
|
|
|
|
|
From: Petar J. <pe...@so...> - 2019-09-03 16:56:34
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=04cc9cf07e1b5efe3b0da748774fd5e189862965 commit 04cc9cf07e1b5efe3b0da748774fd5e189862965 Author: Petar Jovanovic <mip...@gm...> Date: Tue Sep 3 11:55:56 2019 +0000 mips: Add nanoMIPS support to Valgrind 2/4 Necessary changes to support nanoMIPS on Linux. Part 2/4 - Coregrind changes Patch by Aleksandar Rikalo, Dimitrije Nikolic, Tamara Vlahovic and Aleksandra Karadzic. Related KDE issue: #400872. Diff: --- coregrind/Makefile.am | 5 + coregrind/launcher-linux.c | 19 +- coregrind/m_aspacemgr/aspacemgr-common.c | 10 +- coregrind/m_cache.c | 3 +- coregrind/m_coredump/coredump-elf.c | 24 +- coregrind/m_debuginfo/d3basics.c | 2 +- coregrind/m_debuginfo/debuginfo.c | 11 +- coregrind/m_debuginfo/priv_storage.h | 2 +- coregrind/m_debuginfo/readdwarf.c | 13 +- coregrind/m_debuginfo/readelf.c | 4 +- coregrind/m_debuginfo/storage.c | 2 +- coregrind/m_debuglog.c | 39 ++ coregrind/m_dispatch/dispatch-nanomips-linux.S | 176 ++++++ coregrind/m_gdbserver/target.c | 2 + coregrind/m_gdbserver/valgrind-low-nanomips.c | 222 +++++++ coregrind/m_gdbserver/valgrind_low.h | 1 + coregrind/m_initimg/initimg-linux.c | 9 +- coregrind/m_libcassert.c | 20 + coregrind/m_libcfile.c | 46 +- coregrind/m_libcproc.c | 28 +- coregrind/m_libcsetjmp.c | 52 ++ coregrind/m_machine.c | 31 +- coregrind/m_main.c | 30 +- coregrind/m_options.c | 5 +- coregrind/m_redir.c | 15 + coregrind/m_scheduler/scheduler.c | 5 +- coregrind/m_sigframe/sigframe-nanomips-linux.c | 250 ++++++++ coregrind/m_stacktrace.c | 5 +- coregrind/m_syswrap/priv_syswrap-linux.h | 7 + coregrind/m_syswrap/priv_types_n_macros.h | 3 +- coregrind/m_syswrap/syscall-nanomips-linux.S | 147 +++++ coregrind/m_syswrap/syswrap-linux.c | 32 +- coregrind/m_syswrap/syswrap-main.c | 56 +- coregrind/m_syswrap/syswrap-nanomips-linux.c | 844 +++++++++++++++++++++++++ coregrind/m_trampoline.S | 50 ++ coregrind/m_translate.c | 11 +- coregrind/m_transtab.c | 2 +- coregrind/m_vki.c | 3 +- coregrind/pub_core_aspacemgr.h | 2 +- coregrind/pub_core_debuginfo.h | 2 +- coregrind/pub_core_machine.h | 20 +- coregrind/pub_core_mallocfree.h | 1 + coregrind/pub_core_syscall.h | 4 +- coregrind/pub_core_trampoline.h | 6 + coregrind/pub_core_transtab.h | 2 +- coregrind/pub_core_transtab_asm.h | 2 +- coregrind/vgdb-invoker-ptrace.c | 6 +- 47 files changed, 2143 insertions(+), 88 deletions(-) diff --git a/coregrind/Makefile.am b/coregrind/Makefile.am index 94030fd..e2636f5 100644 --- a/coregrind/Makefile.am +++ b/coregrind/Makefile.am @@ -376,6 +376,7 @@ COREGRIND_SOURCES_COMMON = \ m_dispatch/dispatch-s390x-linux.S \ m_dispatch/dispatch-mips32-linux.S \ m_dispatch/dispatch-mips64-linux.S \ + m_dispatch/dispatch-nanomips-linux.S \ m_dispatch/dispatch-x86-darwin.S \ m_dispatch/dispatch-amd64-darwin.S \ m_dispatch/dispatch-x86-solaris.S \ @@ -397,6 +398,7 @@ COREGRIND_SOURCES_COMMON = \ m_gdbserver/valgrind-low-s390x.c \ m_gdbserver/valgrind-low-mips32.c \ m_gdbserver/valgrind-low-mips64.c \ + m_gdbserver/valgrind-low-nanomips.c \ m_gdbserver/version.c \ m_initimg/initimg-linux.c \ m_initimg/initimg-darwin.c \ @@ -421,6 +423,7 @@ COREGRIND_SOURCES_COMMON = \ m_sigframe/sigframe-s390x-linux.c \ m_sigframe/sigframe-mips32-linux.c \ m_sigframe/sigframe-mips64-linux.c \ + m_sigframe/sigframe-nanomips-linux.c \ m_sigframe/sigframe-x86-darwin.c \ m_sigframe/sigframe-amd64-darwin.c \ m_sigframe/sigframe-solaris.c \ @@ -434,6 +437,7 @@ COREGRIND_SOURCES_COMMON = \ m_syswrap/syscall-s390x-linux.S \ m_syswrap/syscall-mips32-linux.S \ m_syswrap/syscall-mips64-linux.S \ + m_syswrap/syscall-nanomips-linux.S \ m_syswrap/syscall-x86-darwin.S \ m_syswrap/syscall-amd64-darwin.S \ m_syswrap/syscall-x86-solaris.S \ @@ -453,6 +457,7 @@ COREGRIND_SOURCES_COMMON = \ m_syswrap/syswrap-s390x-linux.c \ m_syswrap/syswrap-mips32-linux.c \ m_syswrap/syswrap-mips64-linux.c \ + m_syswrap/syswrap-nanomips-linux.c \ m_syswrap/syswrap-x86-darwin.c \ m_syswrap/syswrap-amd64-darwin.c \ m_syswrap/syswrap-xen.c \ diff --git a/coregrind/launcher-linux.c b/coregrind/launcher-linux.c index e014d22..7a12248 100644 --- a/coregrind/launcher-linux.c +++ b/coregrind/launcher-linux.c @@ -63,6 +63,10 @@ #define EM_PPC64 21 // ditto #endif +#ifndef EM_NANOMIPS +#define EM_NANOMIPS 249 +#endif + #ifndef E_MIPS_ABI_O32 #define E_MIPS_ABI_O32 0x00001000 #endif @@ -248,6 +252,12 @@ static const char *select_platform(const char *clientname) (header.ehdr32.e_flags & E_MIPS_ABI2)) { platform = "mips64-linux"; } + else + if (header.ehdr32.e_machine == EM_NANOMIPS && + (header.ehdr32.e_ident[EI_OSABI] == ELFOSABI_SYSV || + header.ehdr32.e_ident[EI_OSABI] == ELFOSABI_LINUX)) { + platform = "nanomips-linux"; + } } else if (header.c[EI_DATA] == ELFDATA2MSB) { if (header.ehdr32.e_machine == EM_PPC && @@ -269,6 +279,12 @@ static const char *select_platform(const char *clientname) (header.ehdr32.e_flags & E_MIPS_ABI2)) { platform = "mips64-linux"; } + else + if (header.ehdr32.e_machine == EM_NANOMIPS && + (header.ehdr32.e_ident[EI_OSABI] == ELFOSABI_SYSV || + header.ehdr32.e_ident[EI_OSABI] == ELFOSABI_LINUX)) { + platform = "nanomips-linux"; + } } } else if (n_bytes >= sizeof(Elf64_Ehdr) && header.c[EI_CLASS] == ELFCLASS64) { @@ -398,7 +414,8 @@ int main(int argc, char** argv, char** envp) (0==strcmp(VG_PLATFORM,"arm64-linux")) || (0==strcmp(VG_PLATFORM,"s390x-linux")) || (0==strcmp(VG_PLATFORM,"mips32-linux")) || - (0==strcmp(VG_PLATFORM,"mips64-linux"))) + (0==strcmp(VG_PLATFORM,"mips64-linux")) || + (0==strcmp(VG_PLATFORM,"nanomips-linux"))) default_platform = VG_PLATFORM; # elif defined(VGO_solaris) if ((0==strcmp(VG_PLATFORM,"x86-solaris")) || diff --git a/coregrind/m_aspacemgr/aspacemgr-common.c b/coregrind/m_aspacemgr/aspacemgr-common.c index 789cc9b..214b54a 100644 --- a/coregrind/m_aspacemgr/aspacemgr-common.c +++ b/coregrind/m_aspacemgr/aspacemgr-common.c @@ -148,7 +148,7 @@ SysRes VG_(am_do_mmap_NO_NOTIFY)( Addr start, SizeT length, UInt prot, res = VG_(do_syscall6)(__NR3264_mmap, (UWord)start, length, prot, flags, fd, offset); # elif defined(VGP_x86_linux) || defined(VGP_ppc32_linux) \ - || defined(VGP_arm_linux) + || defined(VGP_arm_linux) || defined(VGP_nanomips_linux) /* mmap2 uses 4096 chunks even if actual page size is bigger. */ aspacem_assert((offset % 4096) == 0); res = VG_(do_syscall6)(__NR_mmap2, (UWord)start, length, @@ -251,7 +251,7 @@ SysRes ML_(am_do_relocate_nooverlap_mapping_NO_NOTIFY)( SysRes ML_(am_open) ( const HChar* pathname, Int flags, Int mode ) { -# if defined(VGP_arm64_linux) +# if defined(VGP_arm64_linux) || defined(VGP_nanomips_linux) /* ARM64 wants to use __NR_openat rather than __NR_open. */ SysRes res = VG_(do_syscall4)(__NR_openat, VKI_AT_FDCWD, (UWord)pathname, flags, mode); @@ -280,7 +280,7 @@ void ML_(am_close) ( Int fd ) Int ML_(am_readlink)(const HChar* path, HChar* buf, UInt bufsiz) { SysRes res; -# if defined(VGP_arm64_linux) +# if defined(VGP_arm64_linux) || defined(VGP_nanomips_linux) res = VG_(do_syscall4)(__NR_readlinkat, VKI_AT_FDCWD, (UWord)path, (UWord)buf, bufsiz); # elif defined(VGO_linux) || defined(VGO_darwin) @@ -297,7 +297,11 @@ Int ML_(am_readlink)(const HChar* path, HChar* buf, UInt bufsiz) Int ML_(am_fcntl) ( Int fd, Int cmd, Addr arg ) { # if defined(VGO_linux) || defined(VGO_solaris) +# if defined(VGP_nanomips_linux) + SysRes res = VG_(do_syscall3)(__NR_fcntl64, fd, cmd, arg); +# else SysRes res = VG_(do_syscall3)(__NR_fcntl, fd, cmd, arg); +# endif # elif defined(VGO_darwin) SysRes res = VG_(do_syscall3)(__NR_fcntl_nocancel, fd, cmd, arg); # else diff --git a/coregrind/m_cache.c b/coregrind/m_cache.c index 2799027..428a4df 100644 --- a/coregrind/m_cache.c +++ b/coregrind/m_cache.c @@ -538,7 +538,8 @@ get_cache_info(VexArchInfo *vai) #elif defined(VGA_arm) || defined(VGA_ppc32) || \ defined(VGA_ppc64be) || defined(VGA_ppc64le) || \ - defined(VGA_mips32) || defined(VGA_mips64) || defined(VGA_arm64) + defined(VGA_mips32) || defined(VGA_mips64) || \ + defined(VGA_arm64) || defined(VGA_nanomips) static Bool get_cache_info(VexArchInfo *vai) { diff --git a/coregrind/m_coredump/coredump-elf.c b/coregrind/m_coredump/coredump-elf.c index 8da88bc..daf85e6 100644 --- a/coregrind/m_coredump/coredump-elf.c +++ b/coregrind/m_coredump/coredump-elf.c @@ -97,7 +97,11 @@ static void fill_ehdr(ESZ(Ehdr) *ehdr, Int num_phdrs) ehdr->e_entry = 0; ehdr->e_phoff = sizeof(ESZ(Ehdr)); ehdr->e_shoff = 0; +#if defined(VGP_nanomips_linux) + ehdr->e_flags = VKI_EF_NANOMIPS_ABI_P32; +#else ehdr->e_flags = 0; +#endif ehdr->e_ehsize = sizeof(ESZ(Ehdr)); ehdr->e_phentsize = sizeof(ESZ(Phdr)); ehdr->e_phnum = num_phdrs; @@ -224,7 +228,8 @@ static void fill_prstatus(const ThreadState *tst, /*OUT*/struct vki_elf_prstatus *prs, const vki_siginfo_t *si) { -#if defined(VGP_mips32_linux) || defined(VGP_mips64_linux) +#if defined(VGP_mips32_linux) || defined(VGP_mips64_linux) \ + || defined(VGP_nanomips_linux) vki_elf_greg_t *regs; #else struct vki_user_regs_struct *regs; @@ -247,7 +252,8 @@ static void fill_prstatus(const ThreadState *tst, #if defined(VGP_s390x_linux) /* prs->pr_reg has struct type. Need to take address. */ regs = (struct vki_user_regs_struct *)&(prs->pr_reg); -#elif defined(VGP_mips32_linux) || defined(VGP_mips64_linux) +#elif defined(VGP_mips32_linux) || defined(VGP_mips64_linux) \ + || defined(VGP_nanomips_linux) regs = (vki_elf_greg_t *)prs->pr_reg; #else regs = (struct vki_user_regs_struct *)prs->pr_reg; @@ -446,6 +452,15 @@ static void fill_prstatus(const ThreadState *tst, regs[VKI_MIPS64_EF_HI] = arch->vex.guest_HI; regs[VKI_MIPS64_EF_CP0_STATUS] = arch->vex.guest_CP0_status; regs[VKI_MIPS64_EF_CP0_EPC] = arch->vex.guest_PC; +#elif defined(VGP_nanomips_linux) +# define DO(n) regs[VKI_MIPS32_EF_R##n] = arch->vex.guest_r##n + DO(1); DO(2); DO(3); DO(4); DO(5); DO(6); DO(7); DO(8); + DO(9); DO(10); DO(11); DO(12); DO(13); DO(14); DO(15); DO(16); + DO(17); DO(18); DO(19); DO(20); DO(21); DO(22); DO(23); DO(24); + DO(25); DO(28); DO(29); DO(30); DO(31); + regs[VKI_MIPS32_EF_CP0_STATUS] = arch->vex.guest_CP0_status; + regs[VKI_MIPS32_EF_CP0_EPC] = arch->vex.guest_PC; +# undef DO #else # error Unknown ELF platform #endif @@ -570,6 +585,8 @@ static void fill_fpu(const ThreadState *tst, vki_elf_fpregset_t *fpu) DO(16); DO(17); DO(18); DO(19); DO(20); DO(21); DO(22); DO(23); DO(24); DO(25); DO(26); DO(27); DO(28); DO(29); DO(30); DO(31); # undef DO +#elif defined(VGP_nanomips_linux) + #else # error Unknown ELF platform #endif @@ -620,7 +637,8 @@ void dump_one_thread(struct note **notelist, const vki_siginfo_t *si, ThreadId t # if !defined(VGPV_arm_linux_android) \ && !defined(VGPV_x86_linux_android) \ && !defined(VGPV_mips32_linux_android) \ - && !defined(VGPV_arm64_linux_android) + && !defined(VGPV_arm64_linux_android) \ + && !defined(VGP_nanomips_linux) add_note(notelist, "CORE", NT_FPREGSET, &fpu, sizeof(fpu)); # endif diff --git a/coregrind/m_debuginfo/d3basics.c b/coregrind/m_debuginfo/d3basics.c index fa15246..b6d13c1 100644 --- a/coregrind/m_debuginfo/d3basics.c +++ b/coregrind/m_debuginfo/d3basics.c @@ -416,7 +416,7 @@ static Bool get_Dwarf_Reg( /*OUT*/Addr* a, Word regno, const RegSummary* regs ) # elif defined(VGP_s390x_linux) if (regno == 15) { *a = regs->sp; return True; } if (regno == 11) { *a = regs->fp; return True; } -# elif defined(VGP_mips32_linux) +# elif defined(VGP_mips32_linux) || defined(VGP_nanomips_linux) if (regno == 29) { *a = regs->sp; return True; } if (regno == 30) { *a = regs->fp; return True; } # elif defined(VGP_mips64_linux) diff --git a/coregrind/m_debuginfo/debuginfo.c b/coregrind/m_debuginfo/debuginfo.c index 6351b43..13e528e 100644 --- a/coregrind/m_debuginfo/debuginfo.c +++ b/coregrind/m_debuginfo/debuginfo.c @@ -1174,7 +1174,7 @@ ULong VG_(di_notify_mmap)( Addr a, Bool allow_SkFileV, Int use_fd ) is_ro_map = False; # if defined(VGA_x86) || defined(VGA_ppc32) || defined(VGA_mips32) \ - || defined(VGA_mips64) + || defined(VGA_mips64) || defined(VGA_nanomips) is_rx_map = seg->hasR && seg->hasX; is_rw_map = seg->hasR && seg->hasW; # elif defined(VGA_amd64) || defined(VGA_ppc64be) || defined(VGA_ppc64le) \ @@ -2866,7 +2866,8 @@ UWord evalCfiExpr ( const XArray* exprs, Int ix, case Creg_S390_SP: return eec->uregs->sp; case Creg_S390_FP: return eec->uregs->fp; case Creg_S390_LR: return eec->uregs->lr; -# elif defined(VGA_mips32) || defined(VGA_mips64) +# elif defined(VGA_mips32) || defined(VGA_mips64) \ + || defined(VGA_nanomips) case Creg_IA_IP: return eec->uregs->pc; case Creg_IA_SP: return eec->uregs->sp; case Creg_IA_BP: return eec->uregs->fp; @@ -3128,7 +3129,7 @@ static Addr compute_cfa ( const D3UnwindRegs* uregs, case CFIC_IA_BPREL: cfa = cfsi_m->cfa_off + uregs->fp; break; -# elif defined(VGA_mips32) || defined(VGA_mips64) +# elif defined(VGA_mips32) || defined(VGA_mips64) || defined(VGA_nanomips) case CFIC_IA_SPREL: cfa = cfsi_m->cfa_off + uregs->sp; break; @@ -3286,7 +3287,7 @@ Bool VG_(use_CF_info) ( /*MOD*/D3UnwindRegs* uregsHere, ipHere = uregsHere->r15; # elif defined(VGA_s390x) ipHere = uregsHere->ia; -# elif defined(VGA_mips32) || defined(VGA_mips64) +# elif defined(VGA_mips32) || defined(VGA_mips64) || defined(VGA_nanomips) ipHere = uregsHere->pc; # elif defined(VGA_ppc32) || defined(VGA_ppc64be) || defined(VGA_ppc64le) # elif defined(VGP_arm64_linux) @@ -3426,7 +3427,7 @@ Bool VG_(use_CF_info) ( /*MOD*/D3UnwindRegs* uregsHere, COMPUTE(uregsPrev.f5, uregsHere->f5, cfsi_m->f5_how, cfsi_m->f5_off); COMPUTE(uregsPrev.f6, uregsHere->f6, cfsi_m->f6_how, cfsi_m->f6_off); COMPUTE(uregsPrev.f7, uregsHere->f7, cfsi_m->f7_how, cfsi_m->f7_off); -# elif defined(VGA_mips32) || defined(VGA_mips64) +# elif defined(VGA_mips32) || defined(VGA_mips64) || defined(VGA_nanomips) COMPUTE(uregsPrev.pc, uregsHere->pc, cfsi_m->ra_how, cfsi_m->ra_off); COMPUTE(uregsPrev.sp, uregsHere->sp, cfsi_m->sp_how, cfsi_m->sp_off); COMPUTE(uregsPrev.fp, uregsHere->fp, cfsi_m->fp_how, cfsi_m->fp_off); diff --git a/coregrind/m_debuginfo/priv_storage.h b/coregrind/m_debuginfo/priv_storage.h index b995d64..39456ec 100644 --- a/coregrind/m_debuginfo/priv_storage.h +++ b/coregrind/m_debuginfo/priv_storage.h @@ -354,7 +354,7 @@ typedef Int f7_off; } DiCfSI_m; -#elif defined(VGA_mips32) || defined(VGA_mips64) +#elif defined(VGA_mips32) || defined(VGA_mips64) || defined(VGA_nanomips) typedef struct { UChar cfa_how; /* a CFIC_ value */ diff --git a/coregrind/m_debuginfo/readdwarf.c b/coregrind/m_debuginfo/readdwarf.c index 981ffb1..5701c50 100644 --- a/coregrind/m_debuginfo/readdwarf.c +++ b/coregrind/m_debuginfo/readdwarf.c @@ -1722,7 +1722,7 @@ void ML_(read_debuginfo_dwarf1) ( # define FP_REG 11 // sometimes s390 has a frame pointer in r11 # define SP_REG 15 // stack is always r15 # define RA_REG_DEFAULT 14 // the return address is in r14 -#elif defined(VGP_mips32_linux) +#elif defined(VGP_mips32_linux) || defined(VGP_nanomips_linux) # define FP_REG 30 # define SP_REG 29 # define RA_REG_DEFAULT 31 @@ -1740,7 +1740,7 @@ void ML_(read_debuginfo_dwarf1) ( might exist, for Neon/VFP-v3. */ #if defined(VGP_ppc32_linux) || defined(VGP_ppc64be_linux) \ || defined(VGP_ppc64le_linux) || defined(VGP_mips32_linux) \ - || defined(VGP_mips64_linux) + || defined(VGP_nanomips_linux) || defined(VGP_mips64_linux) # define N_CFI_REGS 72 #elif defined(VGP_arm_linux) # define N_CFI_REGS 320 @@ -2056,7 +2056,7 @@ static Bool summarise_context(/*OUT*/Addr* base, if (ctxs->cfa_is_regoff && ctxs->cfa_reg == SP_REG) { si_m->cfa_off = ctxs->cfa_off; # if defined(VGA_x86) || defined(VGA_amd64) || defined(VGA_s390x) \ - || defined(VGA_mips32) || defined(VGA_mips64) + || defined(VGA_mips32) || defined(VGA_nanomips) || defined(VGA_mips64) si_m->cfa_how = CFIC_IA_SPREL; # elif defined(VGA_arm) si_m->cfa_how = CFIC_ARM_R13REL; @@ -2070,7 +2070,7 @@ static Bool summarise_context(/*OUT*/Addr* base, if (ctxs->cfa_is_regoff && ctxs->cfa_reg == FP_REG) { si_m->cfa_off = ctxs->cfa_off; # if defined(VGA_x86) || defined(VGA_amd64) || defined(VGA_s390x) \ - || defined(VGA_mips32) || defined(VGA_mips64) + || defined(VGA_mips32) || defined(VGA_nanomips) || defined(VGA_mips64) si_m->cfa_how = CFIC_IA_BPREL; # elif defined(VGA_arm) si_m->cfa_how = CFIC_ARM_R12REL; @@ -2405,7 +2405,7 @@ static Bool summarise_context(/*OUT*/Addr* base, return True; -# elif defined(VGA_mips32) || defined(VGA_mips64) +# elif defined(VGA_mips32) || defined(VGA_mips64) || defined(VGA_nanomips) /* --- entire tail of this fn specialised for mips --- */ @@ -2532,7 +2532,8 @@ static Int copy_convert_CfiExpr_tree ( XArray* dstxa, return ML_(CfiExpr_CfiReg)( dstxa, Creg_S390_FP ); if (dwreg == srcuc->ra_reg) return ML_(CfiExpr_CfiReg)( dstxa, Creg_S390_IA ); -# elif defined(VGA_mips32) || defined(VGA_mips64) +# elif defined(VGA_mips32) || defined(VGA_mips64) \ + || defined(VGA_nanomips) if (dwreg == SP_REG) return ML_(CfiExpr_CfiReg)( dstxa, Creg_IA_SP ); if (dwreg == FP_REG) diff --git a/coregrind/m_debuginfo/readelf.c b/coregrind/m_debuginfo/readelf.c index b982a83..40e546a 100644 --- a/coregrind/m_debuginfo/readelf.c +++ b/coregrind/m_debuginfo/readelf.c @@ -1549,7 +1549,7 @@ static HChar* readlink_path (const HChar *path) while (tries > 0) { SysRes res; -#if defined(VGP_arm64_linux) +#if defined(VGP_arm64_linux) || defined(VGP_nanomips_linux) res = VG_(do_syscall4)(__NR_readlinkat, VKI_AT_FDCWD, (UWord)path, (UWord)buf, bufsiz); #elif defined(VGO_linux) || defined(VGO_darwin) @@ -2390,7 +2390,7 @@ Bool ML_(read_elf_debug_info) ( struct _DebugInfo* di ) # if defined(VGP_x86_linux) || defined(VGP_amd64_linux) \ || defined(VGP_arm_linux) || defined (VGP_s390x_linux) \ || defined(VGP_mips32_linux) || defined(VGP_mips64_linux) \ - || defined(VGP_arm64_linux) \ + || defined(VGP_arm64_linux) || defined(VGP_nanomips_linux) \ || defined(VGP_x86_solaris) || defined(VGP_amd64_solaris) /* Accept .plt where mapped as rx (code) */ if (0 == VG_(strcmp)(name, ".plt")) { diff --git a/coregrind/m_debuginfo/storage.c b/coregrind/m_debuginfo/storage.c index ede39ac..011d012 100644 --- a/coregrind/m_debuginfo/storage.c +++ b/coregrind/m_debuginfo/storage.c @@ -248,7 +248,7 @@ void ML_(ppDiCfSI) ( const XArray* /* of CfiExpr */ exprs, SHOW_HOW(si_m->f6_how, si_m->f6_off); VG_(printf)(" F7="); SHOW_HOW(si_m->f7_how, si_m->f7_off); -# elif defined(VGA_mips32) || defined(VGA_mips64) +# elif defined(VGA_mips32) || defined(VGA_mips64) || defined(VGA_nanomips) VG_(printf)(" SP="); SHOW_HOW(si_m->sp_how, si_m->sp_off); VG_(printf)(" FP="); diff --git a/coregrind/m_debuglog.c b/coregrind/m_debuglog.c index 8580d80..ce4714d 100644 --- a/coregrind/m_debuglog.c +++ b/coregrind/m_debuglog.c @@ -479,6 +479,45 @@ static UInt local_sys_getpid ( void ) return v0; } +#elif defined(VGP_nanomips_linux) + +__attribute__((noinline)) +static UInt local_sys_write_stderr ( const HChar* buf, Int n ) +{ + register RegWord t4 asm("2"); + register RegWord a0 asm("4"); + register RegWord a1 asm("5"); + register RegWord a2 asm("6"); + t4 = __NR_write; + a2 = n; + a1 = (RegWord)(Addr)buf; + a0 = 2; // stderr + __asm__ volatile ( + "syscall[32] \n\t" + : "+d" (t4), "+d" (a0), "+d" (a1), "+d" (a2) + : + : "$at", "$t5", "$a3", "$a4", "$a5", "$a6", "$a7", "$t0", "$t1", "$t2", + "$t3", "$t8", "$t9" + ); + return a0; +} + +__attribute__((noinline)) +static UInt local_sys_getpid ( void ) +{ + register RegWord t4 asm("2"); + register RegWord a0 asm("4"); + t4 = __NR_getpid; + __asm__ volatile ( + "syscall[32] \n\t" + : "+d" (t4), "=d" (a0) + : + : "$at", "$t5", "$a1", "$a2", "$a3", "$a4", "$a5", "$a6", "$a7", "$t0", + "$t1", "$t2", "$t3", "$t8", "$t9" + ); + return a0; +} + #elif defined(VGP_x86_solaris) static UInt local_sys_write_stderr ( const HChar* buf, Int n ) { diff --git a/coregrind/m_dispatch/dispatch-nanomips-linux.S b/coregrind/m_dispatch/dispatch-nanomips-linux.S new file mode 100644 index 0000000..72d4e21 --- /dev/null +++ b/coregrind/m_dispatch/dispatch-nanomips-linux.S @@ -0,0 +1,176 @@ +/*--------------------------------------------------------------------*/ +/*--- The core dispatch loop, for jumping to a code address. ---*/ +/*--- dispatch-nanomips-linux.S ---*/ +/*--------------------------------------------------------------------*/ + +# This file is part of Valgrind, a dynamic binary instrumentation +# framework. + +# Copyright (C) 2017-2018 RT-RK +# mip...@rt... + +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of the +# License, or (at your option) any later version. + +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +# 02111-1307, USA. + +# The GNU General Public License is contained in the file COPYING. + +#include "pub_core_basics_asm.h" + +#if defined(VGP_nanomips_linux) + +#include "pub_core_dispatch_asm.h" +#include "pub_core_transtab_asm.h" +#include "libvex_guest_offsets.h" /* for OFFSET_mips_PC */ + +# Signature: +# void VG_(disp_run_translations)( UWord* two_words, +# void* guest_state, +# Addr host_addr); + +# The dispatch loop. VG_(disp_run_translations) is used to run all +# translations, including no-redir ones. + +.text +.globl VG_(disp_run_translations) +VG_(disp_run_translations): +# a0 holds two_words +# a1 holds guest_state +# a2 holds host_addr + save 32, $s0-$s7 + save 32, $fp-$ra + sw $gp, 20($sp) + sw $a0, 16($sp) + +# Load address of guest_state into guest state register ($s7) + move $s7, $a1 + +# And jump into the code cache. Chained translations in +# the code cache run, until for whatever reason, they can't +# continue. When that happens, the translation in question +# will jump (or call) to one of the continuation points +# VG_(cp_...) below. + + jrc $a2 + +# * Postamble and exit: + postamble: +# At this point, $t4 and $t5 contain two +# words to be returned to the caller. $t4 +# holds a TRC value, and $t5 optionally may +# hold another word (for CHAIN_ME exits, the +# address of the place to patch.) + +# Restore $a0 from stack; holds address of two_words + lw $a0, 16($sp) + sw $t4, 0($a0) # Store $t4 to two_words[0] + sw $t5, 4($a0) # Store $t5 to two_words[1] + + lw $gp, 20($sp) + restore 32, $fp-$ra + restore 32, $s0-$s7 + + jrc $ra + +# * Continuation points: + +.global VG_(disp_cp_chain_me_to_slowEP) +VG_(disp_cp_chain_me_to_slowEP): +# We got called. The return address indicates +# where the patching needs to happen. Collect +# the return address and, exit back to C land, +# handing the caller the pair (Chain_me_S, RA) */ + li $t4, VG_TRC_CHAIN_ME_TO_SLOW_EP +# 8 = mkLoadImm32_EXACTLY2 +# 4 = jalrc $9 + addiu $t5, $ra, -12 + bc postamble + +.global VG_(disp_cp_chain_me_to_fastEP) +VG_(disp_cp_chain_me_to_fastEP): +# We got called. The return address indicates +# where the patching needs to happen. Collect +# the return address and, exit back to C land, +# handing the caller the pair (Chain_me_S, RA) */ + li $t4, VG_TRC_CHAIN_ME_TO_FAST_EP +# 8 = mkLoadImm32_EXACTLY2 +# 4 = jalrc $9 + addiu $t5, $ra, -12 + bc postamble + +.global VG_(disp_cp_xindir) +VG_(disp_cp_xindir): +# /* Where are we going? */ + lw $a7, OFFSET_mips32_PC($s7) + lw $t1, VG_(stats__n_xIndirs_32) + addiu $t1, $t1, 1 + sw $t1, VG_(stats__n_xIndirs_32) + +# try a fast lookup in the translation cache +# t2 = VG_TT_FAST_HASH(addr) * sizeof(ULong*) +# = (t2 >> 2 & VG_TT_FAST_MASK) << 3 + move $t2, $a7 + li $t0, VG_TT_FAST_MASK + srl $t2, $t2, 2 + and $t2, $t2, $t0 + sll $t2, $t2, 3 + +# t1 = (addr of VG_(tt_fast)) + t2 + la $t1, VG_(tt_fast) + addu $t1, $t1, $t2 + +# t9 = VG_(tt_fast)[hash] :: ULong* + lw $t0, 0($t1) + addiu $t1, $t1, 4 + lw $t9, 0($t1) + +# little-endian, so comparing 1st 32bit word + bnec $t0, $a7, fast_lookup_failed + jrc $t9 + + fast_lookup_failed: +# %PC is up to date */ +# back out decrement of the dispatch counter */ +# hold dispatch_ctr in t0 (r8) */ + lw $t1, VG_(stats__n_xIndirs_32) + addiu $t1, $t1, 0x1 + sw $t1, VG_(stats__n_xIndirs_32) + li $t4, VG_TRC_INNER_FASTMISS + move $t5, $zero + bc postamble + +.global VG_(disp_cp_xassisted) +VG_(disp_cp_xassisted): +# guest-state-pointer contains the TRC. Put the value into the +# return register + move $t4, $s7 + move $t5, $zero + bc postamble + +.global VG_(disp_cp_evcheck_fail) +VG_(disp_cp_evcheck_fail): + li $t4, VG_TRC_INNER_COUNTERZERO + move $t5, $zero + bc postamble + +.size VG_(disp_run_translations), . - VG_(disp_run_translations) + +#endif + +# Let the linker know we don't need an executable stack +MARK_STACK_NO_EXEC + +/*--------------------------------------------------------------------*/ +/*--- end dispatch-nanomips-linux.S ---*/ +/*--------------------------------------------------------------------*/ diff --git a/coregrind/m_gdbserver/target.c b/coregrind/m_gdbserver/target.c index 0093ce8..b49d210 100644 --- a/coregrind/m_gdbserver/target.c +++ b/coregrind/m_gdbserver/target.c @@ -900,6 +900,8 @@ void valgrind_initialize_target(void) mips32_init_architecture(&the_low_target); #elif defined(VGA_mips64) mips64_init_architecture(&the_low_target); +#elif defined(VGA_nanomips) + nanomips_init_architecture(&the_low_target); #else #error "architecture missing in target.c valgrind_initialize_target" #endif diff --git a/coregrind/m_gdbserver/valgrind-low-nanomips.c b/coregrind/m_gdbserver/valgrind-low-nanomips.c new file mode 100644 index 0000000..e8ed364 --- /dev/null +++ b/coregrind/m_gdbserver/valgrind-low-nanomips.c @@ -0,0 +1,222 @@ +/* Low level interface to valgrind, for the remote server for GDB integrated + in valgrind. + Copyright (C) 2012 + Free Software Foundation, Inc. + + This file is part of VALGRIND. + It has been inspired from a file from gdbserver in gdb 6.6. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. */ + +#include "server.h" +#include "target.h" +#include "regdef.h" +#include "regcache.h" + +#include "pub_core_machine.h" +#include "pub_core_debuginfo.h" +#include "pub_core_threadstate.h" +#include "pub_core_transtab.h" +#include "pub_core_gdbserver.h" + +#include "valgrind_low.h" + +#include "libvex_guest_mips32.h" + +static struct reg regs[] = { + { "r0", 0, 32 }, + { "r1", 32, 32 }, + { "r2", 64, 32 }, + { "r3", 96, 32 }, + { "r4", 128, 32 }, + { "r5", 160, 32 }, + { "r6", 192, 32 }, + { "r7", 224, 32 }, + { "r8", 256, 32 }, + { "r9", 288, 32 }, + { "r10", 320, 32 }, + { "r11", 352, 32 }, + { "r12", 384, 32 }, + { "r13", 416, 32 }, + { "r14", 448, 32 }, + { "r15", 480, 32 }, + { "r16", 512, 32 }, + { "r17", 544, 32 }, + { "r18", 576, 32 }, + { "r19", 608, 32 }, + { "r20", 640, 32 }, + { "r21", 672, 32 }, + { "r22", 704, 32 }, + { "r23", 736, 32 }, + { "r24", 768, 32 }, + { "r25", 800, 32 }, + { "r26", 832, 32 }, + { "r27", 864, 32 }, + { "r28", 896, 32 }, + { "r29", 928, 32 }, + { "r30", 960, 32 }, + { "r31", 992, 32 }, + { "status", 1024, 32 }, + { "badvaddr", 1120, 32 }, + { "cause", 1152, 32 }, + { "pc", 1184, 32 }, +}; + +#define num_regs (sizeof (regs) / sizeof (regs[0])) + +static const char *expedite_regs[] = { "r29", "pc", 0 }; + +static +CORE_ADDR get_pc (void) +{ + unsigned long pc; + + collect_register_by_name ("pc", &pc); + + dlog(1, "stop pc is %p\n", (void *) pc); + return pc; +} + +static +void set_pc (CORE_ADDR newpc) +{ + Bool mod; + supply_register_by_name ("pc", &newpc, &mod); + if (mod) + dlog(1, "set pc to %p\n", C2v (newpc)); + else + dlog(1, "set pc not changed %p\n", C2v (newpc)); +} + +/* These are the fields of 32 bit mips instructions. */ +#define itype_op(x) (x >> 26) +#define itype_rs(x) ((x >> 21) & 0x1f) +#define itype_rt(x) ((x >> 16) & 0x1f) +#define rtype_funct(x) (x & 0x3f) + +/* Do a endian load of a 32-bit word, regardless of the + endianness of the underlying host. */ +static inline UInt getUInt(UChar * p) +{ + UInt w = 0; +#if defined (_MIPSEL) + w = (w << 8) | p[3]; + w = (w << 8) | p[2]; + w = (w << 8) | p[1]; + w = (w << 8) | p[0]; +#elif defined (_MIPSEB) + w = (w << 8) | p[0]; + w = (w << 8) | p[1]; + w = (w << 8) | p[2]; + w = (w << 8) | p[3]; +#endif + return w; +} + +/* store registers in the guest state (gdbserver_to_valgrind) + or fetch register from the guest state (valgrind_to_gdbserver). */ +static +void transfer_register (ThreadId tid, int abs_regno, void * buf, + transfer_direction dir, int size, Bool *mod) +{ + ThreadState* tst = VG_(get_ThreadState)(tid); + int set = abs_regno / num_regs; + int regno = abs_regno % num_regs; + *mod = False; + + VexGuestMIPS32State* mips1 = (VexGuestMIPS32State*) get_arch (set, tst); + + switch (regno) { + case 0: VG_(transfer) (&mips1->guest_r0, buf, dir, size, mod); break; + case 1: VG_(transfer) (&mips1->guest_r1, buf, dir, size, mod); break; + case 2: VG_(transfer) (&mips1->guest_r2, buf, dir, size, mod); break; + case 3: VG_(transfer) (&mips1->guest_r3, buf, dir, size, mod); break; + case 4: VG_(transfer) (&mips1->guest_r4, buf, dir, size, mod); break; + case 5: VG_(transfer) (&mips1->guest_r5, buf, dir, size, mod); break; + case 6: VG_(transfer) (&mips1->guest_r6, buf, dir, size, mod); break; + case 7: VG_(transfer) (&mips1->guest_r7, buf, dir, size, mod); break; + case 8: VG_(transfer) (&mips1->guest_r8, buf, dir, size, mod); break; + case 9: VG_(transfer) (&mips1->guest_r9, buf, dir, size, mod); break; + case 10: VG_(transfer) (&mips1->guest_r10, buf, dir, size, mod); break; + case 11: VG_(transfer) (&mips1->guest_r11, buf, dir, size, mod); break; + case 12: VG_(transfer) (&mips1->guest_r12, buf, dir, size, mod); break; + case 13: VG_(transfer) (&mips1->guest_r13, buf, dir, size, mod); break; + case 14: VG_(transfer) (&mips1->guest_r14, buf, dir, size, mod); break; + case 15: VG_(transfer) (&mips1->guest_r15, buf, dir, size, mod); break; + case 16: VG_(transfer) (&mips1->guest_r16, buf, dir, size, mod); break; + case 17: VG_(transfer) (&mips1->guest_r17, buf, dir, size, mod); break; + case 18: VG_(transfer) (&mips1->guest_r18, buf, dir, size, mod); break; + case 19: VG_(transfer) (&mips1->guest_r19, buf, dir, size, mod); break; + case 20: VG_(transfer) (&mips1->guest_r20, buf, dir, size, mod); break; + case 21: VG_(transfer) (&mips1->guest_r21, buf, dir, size, mod); break; + case 22: VG_(transfer) (&mips1->guest_r22, buf, dir, size, mod); break; + case 23: VG_(transfer) (&mips1->guest_r23, buf, dir, size, mod); break; + case 24: VG_(transfer) (&mips1->guest_r24, buf, dir, size, mod); break; + case 25: VG_(transfer) (&mips1->guest_r25, buf, dir, size, mod); break; + case 26: VG_(transfer) (&mips1->guest_r26, buf, dir, size, mod); break; + case 27: VG_(transfer) (&mips1->guest_r27, buf, dir, size, mod); break; + case 28: VG_(transfer) (&mips1->guest_r28, buf, dir, size, mod); break; + case 29: VG_(transfer) (&mips1->guest_r29, buf, dir, size, mod); break; + case 30: VG_(transfer) (&mips1->guest_r30, buf, dir, size, mod); break; + case 31: VG_(transfer) (&mips1->guest_r31, buf, dir, size, mod); break; + case 32: *mod = False; break; // GDBTD???? VEX { "status", 1024, 32 }, + case 33: VG_(transfer) (&mips1->guest_LO, buf, dir, size, mod); break; + case 34: VG_(transfer) (&mips1->guest_HI, buf, dir, size, mod); break; + case 35: *mod = False; break; // GDBTD???? VEX { "badvaddr", 1120, 32 }, + case 36: *mod = False; break; // GDBTD???? VEX { "cause", 1152, 32 }, + case 37: VG_(transfer) (&mips1->guest_PC, buf, dir, size, mod); break; + case 72: *mod = False; break; // GDBTD???? VEX{ "restart", 2304, 32 }, + default: VG_(printf)("regno: %d\n", regno); vg_assert(0); + } +} + +static +const char* target_xml (Bool shadow_mode) +{ + if (shadow_mode) { + return "mips-linux-valgrind.xml"; + } else { + return "mips-linux.xml"; + } +} + +static CORE_ADDR** target_get_dtv (ThreadState *tst) +{ + VexGuestMIPS32State* mips32 = (VexGuestMIPS32State*)&tst->arch.vex; + // Top of nanoMIPS tcbhead structure is located 0x7000 bytes before the value + // of ULR. Dtv is the first of two pointers in tcbhead structure. + return (CORE_ADDR**)((CORE_ADDR)mips32->guest_ULR + - 0x7000 - 2 * sizeof(CORE_ADDR)); +} + +static struct valgrind_target_ops low_target = { + num_regs, + regs, + 29, //sp = r29, which is register offset 29 in regs + transfer_register, + get_pc, + set_pc, + "mips", + target_xml, + target_get_dtv +}; + +void nanomips_init_architecture (struct valgrind_target_ops *target) +{ + *target = low_target; + set_register_cache (regs, num_regs); + gdbserver_expedite_regs = expedite_regs; +} diff --git a/coregrind/m_gdbserver/valgrind_low.h b/coregrind/m_gdbserver/valgrind_low.h index 7b87856..c6c0bb6 100644 --- a/coregrind/m_gdbserver/valgrind_low.h +++ b/coregrind/m_gdbserver/valgrind_low.h @@ -107,5 +107,6 @@ extern void ppc64_init_architecture (struct valgrind_target_ops *target); extern void s390x_init_architecture (struct valgrind_target_ops *target); extern void mips32_init_architecture (struct valgrind_target_ops *target); extern void mips64_init_architecture (struct valgrind_target_ops *target); +extern void nanomips_init_architecture (struct valgrind_target_ops *target); #endif diff --git a/coregrind/m_initimg/initimg-linux.c b/coregrind/m_initimg/initimg-linux.c index e9173d1..0b44f82 100644 --- a/coregrind/m_initimg/initimg-linux.c +++ b/coregrind/m_initimg/initimg-linux.c @@ -801,7 +801,8 @@ Addr setup_client_stack( void* init_sp, # if !defined(VGP_ppc32_linux) && !defined(VGP_ppc64be_linux) \ && !defined(VGP_ppc64le_linux) \ - && !defined(VGP_mips32_linux) && !defined(VGP_mips64_linux) + && !defined(VGP_mips32_linux) && !defined(VGP_mips64_linux) \ + && !defined(VGP_nanomips_linux) case AT_SYSINFO_EHDR: { /* Trash this, because we don't reproduce it */ const NSegment* ehdrseg = VG_(am_find_nsegment)((Addr)auxv->u.a_ptr); @@ -1178,7 +1179,7 @@ void VG_(ii_finalise_image)( IIFinaliseImageInfo iifii ) process startup. */ #define PRECISE_GUEST_REG_DEFINEDNESS_AT_STARTUP 1 -# elif defined(VGP_mips32_linux) +# elif defined(VGP_mips32_linux) || defined(VGP_nanomips_linux) vg_assert(0 == sizeof(VexGuestMIPS32State) % LibVEX_GUEST_STATE_ALIGN); /* Zero out the initial state, and set up the simulated FPU in a sane way. */ @@ -1192,11 +1193,13 @@ void VG_(ii_finalise_image)( IIFinaliseImageInfo iifii ) arch->vex.guest_PC = iifii.initial_client_IP; arch->vex.guest_r31 = iifii.initial_client_SP; +# if !defined(VGP_nanomips_linux) if (iifii.arch_elf_state.overall_fp_mode == VKI_FP_FR1) { arch->vex.guest_CP0_status |= MIPS_CP0_STATUS_FR; } -# elif defined(VGP_mips64_linux) +# endif +# elif defined(VGP_mips64_linux) vg_assert(0 == sizeof(VexGuestMIPS64State) % LibVEX_GUEST_STATE_ALIGN); /* Zero out the initial state, and set up the simulated FPU in a sane way. */ diff --git a/coregrind/m_libcassert.c b/coregrind/m_libcassert.c index 33c5f4d..ec63fcc 100644 --- a/coregrind/m_libcassert.c +++ b/coregrind/m_libcassert.c @@ -244,6 +244,26 @@ (srP)->misc.MIPS64.r31 = (ULong)ra; \ (srP)->misc.MIPS64.r28 = (ULong)gp; \ } +#elif defined(VGP_nanomips_linux) +# define GET_STARTREGS(srP) \ + { UInt pc=0, sp=0, fp=0, ra=0, gp=0; \ + asm("addiupc[32] %0, -4 \n\t" \ + "move %1, $sp \n\t" \ + "move %2, $fp \n\t" \ + "move %3, $ra \n\t" \ + "move %4, $gp \n\t" \ + : "=r" (pc), \ + "=r" (sp), \ + "=r" (fp), \ + "=r" (ra), \ + "=r" (gp) \ + ); \ + (srP)->r_pc = (UInt)pc; \ + (srP)->r_sp = (UInt)sp; \ + (srP)->misc.MIPS32.r30 = (UInt)fp; \ + (srP)->misc.MIPS32.r31 = (UInt)ra; \ + (srP)->misc.MIPS32.r28 = (UInt)gp; \ + } #else # error Unknown platform #endif diff --git a/coregrind/m_libcfile.c b/coregrind/m_libcfile.c index c7fca4e..3a8fed8 100644 --- a/coregrind/m_libcfile.c +++ b/coregrind/m_libcfile.c @@ -136,7 +136,7 @@ Bool VG_(resolve_filename) ( Int fd, const HChar** result ) SysRes VG_(mknod) ( const HChar* pathname, Int mode, UWord dev ) { -# if defined(VGP_arm64_linux) +# if defined(VGP_arm64_linux) || defined(VGP_nanomips_linux) /* ARM64 wants to use __NR_mknodat rather than __NR_mknod. */ SysRes res = VG_(do_syscall4)(__NR_mknodat, VKI_AT_FDCWD, (UWord)pathname, mode, dev); @@ -154,7 +154,7 @@ SysRes VG_(mknod) ( const HChar* pathname, Int mode, UWord dev ) SysRes VG_(open) ( const HChar* pathname, Int flags, Int mode ) { -# if defined(VGP_arm64_linux) +# if defined(VGP_arm64_linux) || defined(VGP_nanomips_linux) /* ARM64 wants to use __NR_openat rather than __NR_open. */ SysRes res = VG_(do_syscall4)(__NR_openat, VKI_AT_FDCWD, (UWord)pathname, flags, mode); @@ -248,7 +248,7 @@ Int VG_(pipe) ( Int fd[2] ) } else { return -1; } -# elif defined(VGP_arm64_linux) +# elif defined(VGP_arm64_linux) || defined(VGP_nanomips_linux) SysRes res = VG_(do_syscall2)(__NR_pipe2, (UWord)fd, 0); return sr_isError(res) ? -1 : 0; # elif defined(VGO_linux) @@ -535,7 +535,7 @@ SysRes VG_(dup) ( Int oldfd ) SysRes VG_(dup2) ( Int oldfd, Int newfd ) { -# if defined(VGP_arm64_linux) +# if defined(VGP_arm64_linux) || defined(VGP_nanomips_linux) /* We only have dup3, that means we have to mimic dup2. The only real difference is when oldfd == newfd. dup3 always returns an error, but dup2 returns only an @@ -559,7 +559,11 @@ SysRes VG_(dup2) ( Int oldfd, Int newfd ) Int VG_(fcntl) ( Int fd, Int cmd, Addr arg ) { # if defined(VGO_linux) || defined(VGO_solaris) +# if defined(VGP_nanomips_linux) + SysRes res = VG_(do_syscall3)(__NR_fcntl64, fd, cmd, arg); +# else SysRes res = VG_(do_syscall3)(__NR_fcntl, fd, cmd, arg); +# endif # elif defined(VGO_darwin) SysRes res = VG_(do_syscall3)(__NR_fcntl_nocancel, fd, cmd, arg); # else @@ -573,6 +577,10 @@ Int VG_(rename) ( const HChar* old_name, const HChar* new_name ) # if defined(VGO_solaris) || defined(VGP_arm64_linux) SysRes res = VG_(do_syscall4)(__NR_renameat, VKI_AT_FDCWD, (UWord)old_name, VKI_AT_FDCWD, (UWord)new_name); +# elif defined(VGP_nanomips_linux) + SysRes res = VG_(do_syscall5)(__NR_renameat2, VKI_AT_FDCWD, (UWord)old_name, + VKI_AT_FDCWD, (UWord)new_name, 0); + # elif defined(VGO_linux) || defined(VGO_darwin) SysRes res = VG_(do_syscall2)(__NR_rename, (UWord)old_name, (UWord)new_name); # else @@ -583,7 +591,7 @@ Int VG_(rename) ( const HChar* old_name, const HChar* new_name ) Int VG_(unlink) ( const HChar* file_name ) { -# if defined(VGP_arm64_linux) +# if defined(VGP_arm64_linux) || defined(VGP_nanomips_linux) SysRes res = VG_(do_syscall2)(__NR_unlinkat, VKI_AT_FDCWD, (UWord)file_name); # elif defined(VGO_linux) || defined(VGO_darwin) @@ -658,7 +666,7 @@ const HChar *VG_(get_startup_wd) ( void ) SysRes VG_(poll) (struct vki_pollfd *fds, Int nfds, Int timeout) { SysRes res; -# if defined(VGP_arm64_linux) +# if defined(VGP_arm64_linux) || defined(VGP_nanomips_linux) /* ARM64 wants to use __NR_ppoll rather than __NR_poll. */ struct vki_timespec timeout_ts; if (timeout >= 0) { @@ -701,7 +709,7 @@ SSizeT VG_(readlink) (const HChar* path, HChar* buf, SizeT bufsiz) { SysRes res; /* res = readlink( path, buf, bufsiz ); */ -# if defined(VGP_arm64_linux) +# if defined(VGP_arm64_linux) || defined(VGP_nanomips_linux) res = VG_(do_syscall4)(__NR_readlinkat, VKI_AT_FDCWD, (UWord)path, (UWord)buf, bufsiz); # elif defined(VGO_linux) || defined(VGO_darwin) @@ -780,7 +788,7 @@ Int VG_(access) ( const HChar* path, Bool irusr, Bool iwusr, Bool ixusr ) UWord w = (irusr ? VKI_R_OK : 0) | (iwusr ? VKI_W_OK : 0) | (ixusr ? VKI_X_OK : 0); -# if defined(VGP_arm64_linux) +# if defined(VGP_arm64_linux) || defined(VGP_nanomips_linux) SysRes res = VG_(do_syscall3)(__NR_faccessat, VKI_AT_FDCWD, (UWord)path, w); # elif defined(VGO_linux) || defined(VGO_darwin) SysRes res = VG_(do_syscall2)(__NR_access, (UWord)path, w); @@ -912,12 +920,14 @@ SysRes VG_(pread) ( Int fd, void* buf, Int count, OffT offset ) 0, // Padding needed on PPC32 0, offset); // Big endian long long return res; -# elif defined(VGP_mips32_linux) && (VKI_LITTLE_ENDIAN) +# elif (defined(VGP_mips32_linux) || defined(VGP_nanomips_linux)) \ + && (VKI_LITTLE_ENDIAN) vg_assert(sizeof(OffT) == 4); res = VG_(do_syscall6)(__NR_pread64, fd, (UWord)buf, count, 0, offset, 0); return res; -# elif defined(VGP_mips32_linux) && (VKI_BIG_ENDIAN) +# elif (defined(VGP_mips32_linux) || defined(VGP_nanomips_linux)) \ + && (VKI_BIG_ENDIAN) vg_assert(sizeof(OffT) == 4); res = VG_(do_syscall6)(__NR_pread64, fd, (UWord)buf, count, 0, 0, offset); @@ -1179,7 +1189,7 @@ Int VG_(socket) ( Int domain, Int type, Int protocol ) # elif defined(VGP_amd64_linux) || defined(VGP_arm_linux) \ || defined(VGP_mips32_linux) || defined(VGP_mips64_linux) \ - || defined(VGP_arm64_linux) + || defined(VGP_arm64_linux) || defined(VGP_nanomips_linux) SysRes res; res = VG_(do_syscall3)(__NR_socket, domain, type, protocol ); return sr_isError(res) ? -1 : sr_Res(res); @@ -1234,7 +1244,7 @@ Int my_connect ( Int sockfd, struct vki_sockaddr_in* serv_addr, Int addrlen ) # elif defined(VGP_amd64_linux) || defined(VGP_arm_linux) \ || defined(VGP_mips32_linux) || defined(VGP_mips64_linux) \ - || defined(VGP_arm64_linux) + || defined(VGP_arm64_linux) || defined(VGP_nanomips_linux) SysRes res; res = VG_(do_syscall3)(__NR_connect, sockfd, (UWord)serv_addr, addrlen); return sr_isError(res) ? -1 : sr_Res(res); @@ -1281,7 +1291,7 @@ Int VG_(write_socket)( Int sd, const void *msg, Int count ) # elif defined(VGP_amd64_linux) || defined(VGP_arm_linux) \ || defined(VGP_mips32_linux) || defined(VGP_mips64_linux) \ - || defined(VGP_arm64_linux) + || defined(VGP_arm64_linux) || defined(VGP_nanomips_linux) SysRes res; res = VG_(do_syscall6)(__NR_sendto, sd, (UWord)msg, count, VKI_MSG_NOSIGNAL, 0,0); @@ -1317,7 +1327,8 @@ Int VG_(getsockname) ( Int sd, struct vki_sockaddr *name, Int *namelen) return sr_isError(res) ? -1 : sr_Res(res); # elif defined(VGP_amd64_linux) || defined(VGP_arm_linux) \ - || defined(VGP_mips64_linux) || defined(VGP_arm64_linux) + || defined(VGP_mips64_linux) || defined(VGP_arm64_linux) \ + || defined(VGP_nanomips_linux) SysRes res; res = VG_(do_syscall3)( __NR_getsockname, (UWord)sd, (UWord)name, (UWord)namelen ); @@ -1355,7 +1366,8 @@ Int VG_(getpeername) ( Int sd, struct vki_sockaddr *name, Int *namelen) return sr_isError(res) ? -1 : sr_Res(res); # elif defined(VGP_amd64_linux) || defined(VGP_arm_linux) \ - || defined(VGP_mips64_linux) || defined(VGP_arm64_linux) + || defined(VGP_mips64_linux) || defined(VGP_arm64_linux) \ + || defined(VGP_nanomips_linux) SysRes res; res = VG_(do_syscall3)( __NR_getpeername, (UWord)sd, (UWord)name, (UWord)namelen ); @@ -1396,7 +1408,7 @@ Int VG_(getsockopt) ( Int sd, Int level, Int optname, void *optval, # elif defined(VGP_amd64_linux) || defined(VGP_arm_linux) \ || defined(VGP_mips32_linux) || defined(VGP_mips64_linux) \ - || defined(VGP_arm64_linux) + || defined(VGP_arm64_linux) || defined(VGP_nanomips_linux) SysRes res; res = VG_(do_syscall5)( __NR_getsockopt, (UWord)sd, (UWord)level, (UWord)optname, @@ -1440,7 +1452,7 @@ Int VG_(setsockopt) ( Int sd, Int level, Int optname, void *optval, # elif defined(VGP_amd64_linux) || defined(VGP_arm_linux) \ || defined(VGP_mips32_linux) || defined(VGP_mips64_linux) \ - || defined(VGP_arm64_linux) + || defined(VGP_arm64_linux) || defined(VGP_nanomips_linux) SysRes res; res = VG_(do_syscall5)( __NR_setsockopt, (UWord)sd, (UWord)level, (UWord)optname, diff --git a/coregrind/m_libcproc.c b/coregrind/m_libcproc.c index 4fca350..d6577ba 100644 --- a/coregrind/m_libcproc.c +++ b/coregrind/m_libcproc.c @@ -606,7 +606,20 @@ Int VG_(getrlimit) (Int resource, struct vki_rlimit *rlim) res = VG_(do_syscall2)(__NR_ugetrlimit, resource, (UWord)rlim); # endif if (sr_isError(res) && sr_Err(res) == VKI_ENOSYS) +# if defined(VGP_nanomips_linux) + { + struct vki_rlimit64 new_rlimit; + res = VG_(do_syscall4)(__NR_prlimit64, 0, resource, 0, (UWord)&new_rlimit); + if (new_rlimit.rlim_cur > 2147483647 || new_rlimit.rlim_max > 2147483647) + res = VG_(mk_SysRes_Error)(VKI_ENOSYS); + else { + rlim->rlim_cur = new_rlimit.rlim_cur; + rlim->rlim_max = new_rlimit.rlim_max; + } + } +# else res = VG_(do_syscall2)(__NR_getrlimit, resource, (UWord)rlim); +# endif return sr_isError(res) ? -1 : sr_Res(res); } @@ -616,7 +629,14 @@ Int VG_(setrlimit) (Int resource, const struct vki_rlimit *rlim) { SysRes res; /* res = setrlimit( resource, rlim ); */ +# if defined(VGP_nanomips_linux) + struct vki_rlimit64 new_rlimit; + new_rlimit.rlim_cur = rlim->rlim_cur; + new_rlimit.rlim_max = rlim->rlim_max; + res = VG_(do_syscall4)(__NR_prlimit64, 0, resource, (UWord)&new_rlimit, 0); +# else res = VG_(do_syscall2)(__NR_setrlimit, resource, (UWord)rlim); +# endif return sr_isError(res) ? -1 : sr_Res(res); } @@ -660,7 +680,7 @@ Int VG_(gettid)(void) * the /proc/self link is pointing... */ -# if defined(VGP_arm64_linux) +# if defined(VGP_arm64_linux) || defined(VGP_nanomips_linux) res = VG_(do_syscall4)(__NR_readlinkat, VKI_AT_FDCWD, (UWord)"/proc/self", (UWord)pid, sizeof(pid)); @@ -706,7 +726,7 @@ Int VG_(getpid) ( void ) Int VG_(getpgrp) ( void ) { /* ASSUMES SYSCALL ALWAYS SUCCEEDS */ -# if defined(VGP_arm64_linux) +# if defined(VGP_arm64_linux) || defined(VGP_nanomips_linux) return sr_Res( VG_(do_syscall1)(__NR_getpgid, 0) ); # elif defined(VGO_linux) || defined(VGO_darwin) return sr_Res( VG_(do_syscall0)(__NR_getpgrp) ); @@ -802,7 +822,7 @@ Int VG_(getgroups)( Int size, UInt* list ) || defined(VGP_ppc64be_linux) || defined(VGP_ppc64le_linux) \ || defined(VGO_darwin) || defined(VGP_s390x_linux) \ || defined(VGP_mips32_linux) || defined(VGP_arm64_linux) \ - || defined(VGO_solaris) + || defined(VGO_solaris) || defined(VGP_nanomips_linux) SysRes sres; sres = VG_(do_syscall2)(__NR_getgroups, size, (Addr)list); if (sr_isError(sres)) @@ -843,7 +863,7 @@ Int VG_(ptrace) ( Int request, Int pid, void *addr, void *data ) Int VG_(fork) ( void ) { -# if defined(VGP_arm64_linux) +# if defined(VGP_arm64_linux) || defined(VGP_nanomips_linux) SysRes res; res = VG_(do_syscall5)(__NR_clone, VKI_SIGCHLD, (UWord)NULL, (UWord)NULL, (UWord)NULL, (UWord)NULL); diff --git a/coregrind/m_libcsetjmp.c b/coregrind/m_libcsetjmp.c index fc0dc1a..abb8f23 100644 --- a/coregrind/m_libcsetjmp.c +++ b/coregrind/m_libcsetjmp.c @@ -689,6 +689,58 @@ __asm__( ".previous \n\t" ); #endif /* VGP_mips64_linux */ + +#if defined(VGP_nanomips_linux) +__asm__( +".text \n\t" +".globl VG_MINIMAL_SETJMP; \n\t" +".set push \n\t" +".set noreorder \n\t" +"VG_MINIMAL_SETJMP: \n\t" +" sw $s0, 0($a0) \n\t" +" sw $s1, 4($a0) \n\t" +" sw $s2, 8($a0) \n\t" +" sw $s3, 12($a0) \n\t" +" sw $s4, 16($a0) \n\t" +" sw $s5, 20($a0) \n\t" +" sw $s6, 24($a0) \n\t" +" sw $s7, 28($a0) \n\t" +" sw $gp, 32($a0) \n\t" +" sw $sp, 36($a0) \n\t" +" sw $fp, 40($a0) \n\t" +" sw $ra, 44($a0) \n\t" +" move $a0, $zero \n\t" +" jrc $ra \n\t" +".set pop \n\t" +".previous \n\t" +" \n\t" +".text \n\t" +".globl VG_MINIMAL_LONGJMP; \n\t" +".set push \n\t" +".set noreorder \n\t" +"VG_MINIMAL_LONGJMP: \n\t" +" lw $s0, 0($a0) \n\t" +" lw $s1, 4($a0) \n\t" +" lw $s2, 8($a0) \n\t" +" lw $s3, 12($a0) \n\t" +" lw $s4, 16($a0) \n\t" +" lw $s5, 20($a0) \n\t" +" lw $s6, 24($a0) \n\t" +" lw $s7, 28($a0) \n\t" +" lw $gp, 32($a0) \n\t" +" lw $sp, 36($a0) \n\t" +" lw $fp, 40($a0) \n\t" +" lw $ra, 44($a0) \n\t" +" bnezc $a1, 1f \n\t" +" addiu $a1, $a1, 1 \n\t" +"1: \n\t" +" move $a0, $a1 \n\t" +" jrc $ra \n\t" +".set pop \n\t" +".previous \n\t" +); +#endif /* VGP_nanomips_linux */ + /*--------------------------------------------------------------------*/ /*--- end ---*/ /*--------------------------------------------------------------------*/ diff --git a/coregrind/m_machine.c b/coregrind/m_machine.c index 9eab900..32c242a 100644 --- a/coregrind/m_machine.c +++ b/coregrind/m_machine.c @@ -133,7 +133,7 @@ void VG_(get_UnwindStartRegs) ( /*OUT*/UnwindStartRegs* regs, = VG_(threads)[tid].arch.vex.guest_v6.w64[0]; regs->misc.S390X.r_f7 = VG_(threads)[tid].arch.vex.guest_v7.w64[0]; -# elif defined(VGA_mips32) +# elif defined(VGA_mips32) || defined(VGP_nanomips_linux) regs->r_pc = VG_(threads)[tid].arch.vex.guest_PC; regs->r_sp = VG_(threads)[tid].arch.vex.guest_r29; regs->misc.MIPS32.r30 @@ -303,7 +303,7 @@ static void apply_to_GPs_of_tid(ThreadId tid, void (*f)(ThreadId, (*f)(tid, "r13", vex->guest_r13); (*f)(tid, "r14", vex->guest_r14); (*f)(tid, "r15", vex->guest_r15); -#elif defined(VGA_mips32) || defined(VGA_mips64) +#elif defined(VGA_mips32) || defined(VGA_mips64) || defined(VGP_nanomips_linux) (*f)(tid, "r0" , vex->guest_r0 ); (*f)(tid, "r1" , vex->guest_r1 ); (*f)(tid, "r2" , vex->guest_r2 ); @@ -477,7 +477,8 @@ Int VG_(machine_arm_archlevel) = 4; /* For hwcaps detection on ppc32/64, s390x, and arm we'll need to do SIGILL testing, so we need a VG_MINIMAL_JMP_BUF. */ #if defined(VGA_ppc32) || defined(VGA_ppc64be) || defined(VGA_ppc64le) \ - || defined(VGA_arm) || defined(VGA_s390x) || defined(VGA_mips32) || defined(VGA_mips64) + || defined(VGA_arm) || defined(VGA_s390x) || defined(VGA_mips32) \ + || defined(VGA_mips64) #include "pub_core_libcsetjmp.h" static VG_MINIMAL_JMP_BUF(env_unsup_insn); static void handler_unsup_insn ( Int x ) { @@ -1926,6 +1927,25 @@ Bool VG_(machine_get_hwcaps)( void ) return True; } +#elif defined(VGP_nanomips_linux) + { + va = VexArchNANOMIPS; + vai.hwcaps = 0; + +# if defined(VKI_LITTLE_ENDIAN) + vai.endness = VexEndnessLE; +# elif defined(VKI_BIG_ENDIAN) + vai.endness = VexEndnessBE; +# else + vai.endness = VexEndness_INVALID; +# endif + + VG_(debugLog)(1, "machine", "hwcaps = 0x%x\n", vai.hwcaps); + + VG_(machine_get_cache_info)(&vai); + + return True; + } #else # error "Unknown arch" #endif @@ -2051,7 +2071,7 @@ Int VG_(machine_get_size_of_largest_guest_register) ( void ) /* ARM64 always has Neon, AFAICS. */ return 16; -# elif defined(VGA_mips32) +# elif defined(VGA_mips32) || defined(VGP_nanomips_linux) /* The guest state implies 4, but that can't really be true, can it? */ return 8; @@ -2074,7 +2094,8 @@ void* VG_(fnptr_to_fnentry)( void* f ) || defined(VGP_ppc32_linux) || defined(VGP_ppc64le_linux) \ || defined(VGP_s390x_linux) || defined(VGP_mips32_linux) \ || defined(VGP_mips64_linux) || defined(VGP_arm64_linux) \ - || defined(VGP_x86_solaris) || defined(VGP_amd64_solaris) + || defined(VGP_x86_solaris) || defined(VGP_amd64_solaris) \ + || defined(VGP_nanomips_linux) return f; # elif defined(VGP_ppc64be_linux) /* ppc64-linux uses the AIX scheme, in which f is a pointer to a diff --git a/coregrind/m_main.c b/coregrind/m_main.c index 3d33dc7..6ad1b93 100644 --- a/coregrind/m_main.c +++ b/coregrind/m_main.c @@ -2391,7 +2391,7 @@ static void final_tidyup(ThreadId tid) sizeof(VG_(threads)[tid].arch.vex.guest_GPR12)); # endif /* mips-linux note: we need to set t9 */ -# if defined(VGP_mips32_linux) +# if defined(VGP_mips32_linux) || defined(VGP_nanomips_linux) VG_(threads)[tid].arch.vex.guest_r25 = freeres_wrapper; VG_TRACK(post_reg_write, Vg_CoreClientReq, tid, offsetof(VexGuestMIPS32State, guest_r25), @@ -2428,7 +2428,7 @@ static void final_tidyup(ThreadId tid) VG_TRACK(post_reg_write, Vg_CoreClientReq, tid, offsetof(VexGuestARM64State, guest_X0), sizeof(VG_(threads)[tid].arch.vex.guest_X0)); -# elif defined(VGA_mips32) +# elif defined(VGA_mips32) || defined(VGA_nanomips) VG_(threads)[tid].arch.vex.guest_r4 = to_run; VG_TRACK(post_reg_write, Vg_CoreClientReq, tid, offsetof(VexGuestMIPS32State, guest_r4), @@ -2957,6 +2957,29 @@ asm( "\tnop\n" ".previous\n" ); +#elif defined(VGP_nanomips_linux) + asm( +".text \n\t" +".globl __start \n\t" +".type __start,@function \n\t" +"__start: \n\t" + ".set push \n\t" + ".set noreorder \n\t" + "li $t1, vgPlain_interim_stack \n\t" + "li $t0, "VG_STRINGIFY(VG_STACK_GUARD_SZB)" \n\t" + "addu $t1, $t1, $t0 \n\t" + "li $t0, "VG_STRINGIFY(VG_DEFAULT_STACK_ACTIVE_SZB)"\n\t" + "addu $t1, $t1, $t0 \n\t" + "li $t0, 0xFFFFFF00 \n\t" + "and $t1, $t1, $t0 \n\t" + "move $a0, $sp \n\t" + "move $sp, $t1 \n\t" + "li $t0, _start_in_C_linux \n\t" + "jrc $t0 \n\t" + "break \n\t" + ".set pop \n\t" +".previous \n\t" +); #else # error "Unknown linux platform" #endif @@ -3001,7 +3024,8 @@ void _start_in_C_linux ( UWord* pArgc ) # if defined(VGP_ppc32_linux) || defined(VGP_ppc64be_linux) \ || defined(VGP_ppc64le_linux) || defined(VGP_arm64_linux) \ - || defined(VGP_mips32_linux) || defined(VGP_mips64_linux) + || defined(VGP_mips32_linux) || defined(VGP_mips64_linux) \ + || defined(VGP_nanomips_linux) { /* ppc32/ppc64, arm64, mips32/64 can be configured with different page sizes. Determine this early. This is an ugly hack and really diff --git a/coregrind/m_options.c b/coregrind/m_options.c index 09fda56..10641d4 100644 --- a/coregrind/m_options.c +++ b/coregrind/m_options.c @@ -98,7 +98,8 @@ Bool VG_(clo_show_error_list) = False; #if defined(VGPV_ar... [truncated message content] |
|
From: Petar J. <pe...@so...> - 2019-09-03 15:56:38
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=2fe37c05bba5f0b58e0957e37cf4d5682e5a6468 commit 2fe37c05bba5f0b58e0957e37cf4d5682e5a6468 Author: Petar Jovanovic <mip...@gm...> Date: Tue Sep 3 12:20:10 2019 +0000 remove CRLF line terminators from several files Convert from dos to unix text files: ./none/tests/amd64-linux/cet_nops_fs.c ./none/tests/amd64-linux/cet_nops_gs.c ./none/tests/mips32/mips32_dspr2.c ./none/tests/mips32/mips32_dsp.c Diff: --- none/tests/amd64-linux/cet_nops_fs.c | 622 +- none/tests/amd64-linux/cet_nops_gs.c | 622 +- none/tests/mips32/mips32_dsp.c | 15056 ++++++++++++++++----------------- none/tests/mips32/mips32_dspr2.c | 9364 ++++++++++---------- 4 files changed, 12832 insertions(+), 12832 deletions(-) diff --git a/none/tests/amd64-linux/cet_nops_fs.c b/none/tests/amd64-linux/cet_nops_fs.c index 70645f7..24ffb60 100644 --- a/none/tests/amd64-linux/cet_nops_fs.c +++ b/none/tests/amd64-linux/cet_nops_fs.c @@ -1,311 +1,311 @@ -#include <stdio.h> - -int main () -{ - printf("start testing FS prefix ..\n"); - fflush(stdout); - -__asm__ __volatile__ (".byte 0x64, 0x0f, 0x19, 0xff" :::"cc","memory"); -__asm__ __volatile__ (".byte 0x66, 0x64, 0x0f, 0x19, 0xff" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf2, 0x64, 0x0f, 0x19, 0xff" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf3, 0x64, 0x0f, 0x19, 0xff" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf2, 0x66, 0x64, 0x0f, 0x19, 0xff" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf3, 0x66, 0x64, 0x0f, 0x19, 0xff" :::"cc","memory"); -__asm__ __volatile__ (".byte 0x64, 0x0f, 0x19, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0x66, 0x64, 0x0f, 0x19, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf2, 0x64, 0x0f, 0x19, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf3, 0x64, 0x0f, 0x19, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf2, 0x66, 0x64, 0x0f, 0x19, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf3, 0x66, 0x64, 0x0f, 0x19, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0x64, 0x0f, 0x19, 0x40, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0x66, 0x64, 0x0f, 0x19, 0x40, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf2, 0x64, 0x0f, 0x19, 0x40, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf3, 0x64, 0x0f, 0x19, 0x40, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf2, 0x66, 0x64, 0x0f, 0x19, 0x40, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf3, 0x66, 0x64, 0x0f, 0x19, 0x40, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0x64, 0x0f, 0x19, 0x44, 0x0, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0x66, 0x64, 0x0f, 0x19, 0x44, 0x0, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf2, 0x64, 0x0f, 0x19, 0x44, 0x0, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf3, 0x64, 0x0f, 0x19, 0x44, 0x0, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf2, 0x66, 0x64, 0x0f, 0x19, 0x44, 0x0, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf3, 0x66, 0x64, 0x0f, 0x19, 0x44, 0x0, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0x64, 0x0f, 0x19, 0x80, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0x66, 0x64, 0x0f, 0x19, 0x80, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf2, 0x64, 0x0f, 0x19, 0x80, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf3, 0x64, 0x0f, 0x19, 0x80, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf2, 0x66, 0x64, 0x0f, 0x19, 0x80, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf3, 0x66, 0x64, 0x0f, 0x19, 0x80, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0x64, 0x0f, 0x19, 0x84, 0x0, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0x66, 0x64, 0x0f, 0x19, 0x84, 0x0, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf2, 0x64, 0x0f, 0x19, 0x84, 0x0, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf3, 0x64, 0x0f, 0x19, 0x84, 0x0, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf2, 0x66, 0x64, 0x0f, 0x19, 0x84, 0x0, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf3, 0x66, 0x64, 0x0f, 0x19, 0x84, 0x0, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0x64, 0x0f, 0x19, 0x5A, 0x22" :::"cc","memory"); -__asm__ __volatile__ (".byte 0x66, 0x64, 0x0f, 0x19, 0x5A, 0x22" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf2, 0x64, 0x0f, 0x19, 0x5A, 0x22" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf3, 0x64, 0x0f, 0x19, 0x5A, 0x22" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf2, 0x66, 0x64, 0x0f, 0x19, 0x5A, 0x22" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf3, 0x66, 0x64, 0x0f, 0x19, 0x5A, 0x22" :::"cc","memory"); -__asm__ __volatile__ (".byte 0x64, 0x0f, 0x19, 0x9C, 0x1D, 0x11, 0x22, 0x33, 0x44" :::"cc","memory"); -__asm__ __volatile__ (".byte 0x66, 0x64, 0x0f, 0x19, 0x9C, 0x1D, 0x11, 0x22, 0x33, 0x44" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf2, 0x64, 0x0f, 0x19, 0x9C, 0x1D, 0x11, 0x22, 0x33, 0x44" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf3, 0x64, 0x0f, 0x19, 0x9C, 0x1D, 0x11, 0x22, 0x33, 0x44" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf2, 0x66, 0x64, 0x0f, 0x19, 0x9C, 0x1D, 0x11, 0x22, 0x33, 0x44" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf3, 0x66, 0x64, 0x0f, 0x19, 0x9C, 0x1D, 0x11, 0x22, 0x33, 0x44" :::"cc","memory"); -__asm__ __volatile__ (".byte 0x64, 0x0f, 0x19, 0x04, 0x60" :::"cc","memory"); -__asm__ __volatile__ (".byte 0x66, 0x64, 0x0f, 0x19, 0x04, 0x60" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf2, 0x64, 0x0f, 0x19, 0x04, 0x60" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf3, 0x64, 0x0f, 0x19, 0x04, 0x60" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf2, 0x66, 0x64, 0x0f, 0x19, 0x04, 0x60" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf3, 0x66, 0x64, 0x0f, 0x19, 0x04, 0x60" :::"cc","memory"); -__asm__ __volatile__ (".byte 0x64, 0x0f, 0x19, 0xff" :::"cc","memory"); -__asm__ __volatile__ (".byte 0x66, 0x64, 0x0f, 0x19, 0xff" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf2, 0x64, 0x0f, 0x19, 0xff" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf3, 0x64, 0x0f, 0x19, 0xff" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf2, 0x66, 0x64, 0x0f, 0x19, 0xff" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf3, 0x66, 0x64, 0x0f, 0x19, 0xff" :::"cc","memory"); -__asm__ __volatile__ (".byte 0x64, 0x0f, 0x1e, 0xff" :::"cc","memory"); -__asm__ __volatile__ (".byte 0x66, 0x64, 0x0f, 0x1e, 0xff" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf2, 0x64, 0x0f, 0x1e, 0xff" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf3, 0x64, 0x0f, 0x1e, 0xff" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf2, 0x66, 0x64, 0x0f, 0x1e, 0xff" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf3, 0x66, 0x64, 0x0f, 0x1e, 0xff" :::"cc","memory"); -__asm__ __volatile__ (".byte 0x64, 0x0f, 0x1e, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0x66, 0x64, 0x0f, 0x1e, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf2, 0x64, 0x0f, 0x1e, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf3, 0x64, 0x0f, 0x1e, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf2, 0x66, 0x64, 0x0f, 0x1e, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf3, 0x66, 0x64, 0x0f, 0x1e, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0x64, 0x0f, 0x1e, 0x40, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0x66, 0x64, 0x0f, 0x1e, 0x40, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf2, 0x64, 0x0f, 0x1e, 0x40, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf3, 0x64, 0x0f, 0x1e, 0x40, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf2, 0x66, 0x64, 0x0f, 0x1e, 0x40, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf3, 0x66, 0x64, 0x0f, 0x1e, 0x40, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0x64, 0x0f, 0x1e, 0x44, 0x0, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0x66, 0x64, 0x0f, 0x1e, 0x44, 0x0, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf2, 0x64, 0x0f, 0x1e, 0x44, 0x0, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf3, 0x64, 0x0f, 0x1e, 0x44, 0x0, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf2, 0x66, 0x64, 0x0f, 0x1e, 0x44, 0x0, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf3, 0x66, 0x64, 0x0f, 0x1e, 0x44, 0x0, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0x64, 0x0f, 0x1e, 0x80, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0x66, 0x64, 0x0f, 0x1e, 0x80, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf2, 0x64, 0x0f, 0x1e, 0x80, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf3, 0x64, 0x0f, 0x1e, 0x80, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf2, 0x66, 0x64, 0x0f, 0x1e, 0x80, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf3, 0x66, 0x64, 0x0f, 0x1e, 0x80, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0x64, 0x0f, 0x1e, 0x84, 0x0, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0x66, 0x64, 0x0f, 0x1e, 0x84, 0x0, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf2, 0x64, 0x0f, 0x1e, 0x84, 0x0, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf3, 0x64, 0x0f, 0x1e, 0x84, 0x0, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf2, 0x66, 0x64, 0x0f, 0x1e, 0x84, 0x0, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf3, 0x66, 0x64, 0x0f, 0x1e, 0x84, 0x0, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0x64, 0x0f, 0x1e, 0x5A, 0x22" :::"cc","memory"); -__asm__ __volatile__ (".byte 0x66, 0x64, 0x0f, 0x1e, 0x5A, 0x22" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf2, 0x64, 0x0f, 0x1e, 0x5A, 0x22" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf3, 0x64, 0x0f, 0x1e, 0x5A, 0x22" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf2, 0x66, 0x64, 0x0f, 0x1e, 0x5A, 0x22" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf3, 0x66, 0x64, 0x0f, 0x1e, 0x5A, 0x22" :::"cc","memory"); -__asm__ __volatile__ (".byte 0x64, 0x0f, 0x1e, 0x9C, 0x1D, 0x11, 0x22, 0x33, 0x44" :::"cc","memory"); -__asm__ __volatile__ (".byte 0x66, 0x64, 0x0f, 0x1e, 0x9C, 0x1D, 0x11, 0x22, 0x33, 0x44" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf2, 0x64, 0x0f, 0x1e, 0x9C, 0x1D, 0x11, 0x22, 0x33, 0x44" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf3, 0x64, 0x0f, 0x1e, 0x9C, 0x1D, 0x11, 0x22, 0x33, 0x44" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf2, 0x66, 0x64, 0x0f, 0x1e, 0x9C, 0x1D, 0x11, 0x22, 0x33, 0x44" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf3, 0x66, 0x64, 0x0f, 0x1e, 0x9C, 0x1D, 0x11, 0x22, 0x33, 0x44" :::"cc","memory"); -__asm__ __volatile__ (".byte 0x64, 0x0f, 0x1e, 0x04, 0x60" :::"cc","memory"); -__asm__ __volatile__ (".byte 0x66, 0x64, 0x0f, 0x1e, 0x04, 0x60" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf2, 0x64, 0x0f, 0x1e, 0x04, 0x60" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf3, 0x64, 0x0f, 0x1e, 0x04, 0x60" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf2, 0x66, 0x64, 0x0f, 0x1e, 0x04, 0x60" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf3, 0x66, 0x64, 0x0f, 0x1e, 0x04, 0x60" :::"cc","memory"); -__asm__ __volatile__ (".byte 0x64, 0x0f, 0x1e, 0xff" :::"cc","memory"); -__asm__ __volatile__ (".byte 0x66, 0x64, 0x0f, 0x1e, 0xff" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf2, 0x64, 0x0f, 0x1e, 0xff" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf3, 0x64, 0x0f, 0x1e, 0xff" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf2, 0x66, 0x64, 0x0f, 0x1e, 0xff" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf3, 0x66, 0x64, 0x0f, 0x1e, 0xff" :::"cc","memory"); -__asm__ __volatile__ (".byte 0x64, 0x0f, 0x1d, 0xff" :::"cc","memory"); -__asm__ __volatile__ (".byte 0x66, 0x64, 0x0f, 0x1d, 0xff" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf2, 0x64, 0x0f, 0x1d, 0xff" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf3, 0x64, 0x0f, 0x1d, 0xff" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf2, 0x66, 0x64, 0x0f, 0x1d, 0xff" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf3, 0x66, 0x64, 0x0f, 0x1d, 0xff" :::"cc","memory"); -__asm__ __volatile__ (".byte 0x64, 0x0f, 0x1d, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0x66, 0x64, 0x0f, 0x1d, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf2, 0x64, 0x0f, 0x1d, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf3, 0x64, 0x0f, 0x1d, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf2, 0x66, 0x64, 0x0f, 0x1d, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf3, 0x66, 0x64, 0x0f, 0x1d, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0x64, 0x0f, 0x1d, 0x40, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0x66, 0x64, 0x0f, 0x1d, 0x40, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf2, 0x64, 0x0f, 0x1d, 0x40, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf3, 0x64, 0x0f, 0x1d, 0x40, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf2, 0x66, 0x64, 0x0f, 0x1d, 0x40, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf3, 0x66, 0x64, 0x0f, 0x1d, 0x40, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0x64, 0x0f, 0x1d, 0x44, 0x0, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0x66, 0x64, 0x0f, 0x1d, 0x44, 0x0, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf2, 0x64, 0x0f, 0x1d, 0x44, 0x0, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf3, 0x64, 0x0f, 0x1d, 0x44, 0x0, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf2, 0x66, 0x64, 0x0f, 0x1d, 0x44, 0x0, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf3, 0x66, 0x64, 0x0f, 0x1d, 0x44, 0x0, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0x64, 0x0f, 0x1d, 0x80, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0x66, 0x64, 0x0f, 0x1d, 0x80, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf2, 0x64, 0x0f, 0x1d, 0x80, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf3, 0x64, 0x0f, 0x1d, 0x80, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf2, 0x66, 0x64, 0x0f, 0x1d, 0x80, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf3, 0x66, 0x64, 0x0f, 0x1d, 0x80, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0x64, 0x0f, 0x1d, 0x84, 0x0, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0x66, 0x64, 0x0f, 0x1d, 0x84, 0x0, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf2, 0x64, 0x0f, 0x1d, 0x84, 0x0, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf3, 0x64, 0x0f, 0x1d, 0x84, 0x0, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf2, 0x66, 0x64, 0x0f, 0x1d, 0x84, 0x0, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf3, 0x66, 0x64, 0x0f, 0x1d, 0x84, 0x0, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0x64, 0x0f, 0x1d, 0x5A, 0x22" :::"cc","memory"); -__asm__ __volatile__ (".byte 0x66, 0x64, 0x0f, 0x1d, 0x5A, 0x22" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf2, 0x64, 0x0f, 0x1d, 0x5A, 0x22" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf3, 0x64, 0x0f, 0x1d, 0x5A, 0x22" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf2, 0x66, 0x64, 0x0f, 0x1d, 0x5A, 0x22" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf3, 0x66, 0x64, 0x0f, 0x1d, 0x5A, 0x22" :::"cc","memory"); -__asm__ __volatile__ (".byte 0x64, 0x0f, 0x1d, 0x9C, 0x1D, 0x11, 0x22, 0x33, 0x44" :::"cc","memory"); -__asm__ __volatile__ (".byte 0x66, 0x64, 0x0f, 0x1d, 0x9C, 0x1D, 0x11, 0x22, 0x33, 0x44" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf2, 0x64, 0x0f, 0x1d, 0x9C, 0x1D, 0x11, 0x22, 0x33, 0x44" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf3, 0x64, 0x0f, 0x1d, 0x9C, 0x1D, 0x11, 0x22, 0x33, 0x44" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf2, 0x66, 0x64, 0x0f, 0x1d, 0x9C, 0x1D, 0x11, 0x22, 0x33, 0x44" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf3, 0x66, 0x64, 0x0f, 0x1d, 0x9C, 0x1D, 0x11, 0x22, 0x33, 0x44" :::"cc","memory"); -__asm__ __volatile__ (".byte 0x64, 0x0f, 0x1d, 0x04, 0x60" :::"cc","memory"); -__asm__ __volatile__ (".byte 0x66, 0x64, 0x0f, 0x1d, 0x04, 0x60" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf2, 0x64, 0x0f, 0x1d, 0x04, 0x60" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf3, 0x64, 0x0f, 0x1d, 0x04, 0x60" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf2, 0x66, 0x64, 0x0f, 0x1d, 0x04, 0x60" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf3, 0x66, 0x64, 0x0f, 0x1d, 0x04, 0x60" :::"cc","memory"); -__asm__ __volatile__ (".byte 0x64, 0x0f, 0x1d, 0xff" :::"cc","memory"); -__asm__ __volatile__ (".byte 0x66, 0x64, 0x0f, 0x1d, 0xff" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf2, 0x64, 0x0f, 0x1d, 0xff" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf3, 0x64, 0x0f, 0x1d, 0xff" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf2, 0x66, 0x64, 0x0f, 0x1d, 0xff" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf3, 0x66, 0x64, 0x0f, 0x1d, 0xff" :::"cc","memory"); -__asm__ __volatile__ (".byte 0x64, 0x0f, 0x1e, 0xff" :::"cc","memory"); -__asm__ __volatile__ (".byte 0x66, 0x64, 0x0f, 0x1e, 0xff" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf2, 0x64, 0x0f, 0x1e, 0xff" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf3, 0x64, 0x0f, 0x1e, 0xff" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf2, 0x66, 0x64, 0x0f, 0x1e, 0xff" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf3, 0x66, 0x64, 0x0f, 0x1e, 0xff" :::"cc","memory"); -__asm__ __volatile__ (".byte 0x64, 0x0f, 0x1e, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0x66, 0x64, 0x0f, 0x1e, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf2, 0x64, 0x0f, 0x1e, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf3, 0x64, 0x0f, 0x1e, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf2, 0x66, 0x64, 0x0f, 0x1e, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf3, 0x66, 0x64, 0x0f, 0x1e, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0x64, 0x0f, 0x1e, 0x40, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0x66, 0x64, 0x0f, 0x1e, 0x40, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf2, 0x64, 0x0f, 0x1e, 0x40, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf3, 0x64, 0x0f, 0x1e, 0x40, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf2, 0x66, 0x64, 0x0f, 0x1e, 0x40, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf3, 0x66, 0x64, 0x0f, 0x1e, 0x40, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0x64, 0x0f, 0x1e, 0x44, 0x0, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0x66, 0x64, 0x0f, 0x1e, 0x44, 0x0, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf2, 0x64, 0x0f, 0x1e, 0x44, 0x0, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf3, 0x64, 0x0f, 0x1e, 0x44, 0x0, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf2, 0x66, 0x64, 0x0f, 0x1e, 0x44, 0x0, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf3, 0x66, 0x64, 0x0f, 0x1e, 0x44, 0x0, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0x64, 0x0f, 0x1e, 0x80, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0x66, 0x64, 0x0f, 0x1e, 0x80, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf2, 0x64, 0x0f, 0x1e, 0x80, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf3, 0x64, 0x0f, 0x1e, 0x80, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf2, 0x66, 0x64, 0x0f, 0x1e, 0x80, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf3, 0x66, 0x64, 0x0f, 0x1e, 0x80, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0x64, 0x0f, 0x1e, 0x84, 0x0, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0x66, 0x64, 0x0f, 0x1e, 0x84, 0x0, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf2, 0x64, 0x0f, 0x1e, 0x84, 0x0, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf3, 0x64, 0x0f, 0x1e, 0x84, 0x0, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf2, 0x66, 0x64, 0x0f, 0x1e, 0x84, 0x0, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf3, 0x66, 0x64, 0x0f, 0x1e, 0x84, 0x0, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0x64, 0x0f, 0x1e, 0x5A, 0x22" :::"cc","memory"); -__asm__ __volatile__ (".byte 0x66, 0x64, 0x0f, 0x1e, 0x5A, 0x22" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf2, 0x64, 0x0f, 0x1e, 0x5A, 0x22" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf3, 0x64, 0x0f, 0x1e, 0x5A, 0x22" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf2, 0x66, 0x64, 0x0f, 0x1e, 0x5A, 0x22" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf3, 0x66, 0x64, 0x0f, 0x1e, 0x5A, 0x22" :::"cc","memory"); -__asm__ __volatile__ (".byte 0x64, 0x0f, 0x1e, 0x9C, 0x1D, 0x11, 0x22, 0x33, 0x44" :::"cc","memory"); -__asm__ __volatile__ (".byte 0x66, 0x64, 0x0f, 0x1e, 0x9C, 0x1D, 0x11, 0x22, 0x33, 0x44" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf2, 0x64, 0x0f, 0x1e, 0x9C, 0x1D, 0x11, 0x22, 0x33, 0x44" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf3, 0x64, 0x0f, 0x1e, 0x9C, 0x1D, 0x11, 0x22, 0x33, 0x44" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf2, 0x66, 0x64, 0x0f, 0x1e, 0x9C, 0x1D, 0x11, 0x22, 0x33, 0x44" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf3, 0x66, 0x64, 0x0f, 0x1e, 0x9C, 0x1D, 0x11, 0x22, 0x33, 0x44" :::"cc","memory"); -__asm__ __volatile__ (".byte 0x64, 0x0f, 0x1e, 0x04, 0x60" :::"cc","memory"); -__asm__ __volatile__ (".byte 0x66, 0x64, 0x0f, 0x1e, 0x04, 0x60" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf2, 0x64, 0x0f, 0x1e, 0x04, 0x60" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf3, 0x64, 0x0f, 0x1e, 0x04, 0x60" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf2, 0x66, 0x64, 0x0f, 0x1e, 0x04, 0x60" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf3, 0x66, 0x64, 0x0f, 0x1e, 0x04, 0x60" :::"cc","memory"); -__asm__ __volatile__ (".byte 0x64, 0x0f, 0x1e, 0xff" :::"cc","memory"); -__asm__ __volatile__ (".byte 0x66, 0x64, 0x0f, 0x1e, 0xff" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf2, 0x64, 0x0f, 0x1e, 0xff" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf3, 0x64, 0x0f, 0x1e, 0xff" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf2, 0x66, 0x64, 0x0f, 0x1e, 0xff" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf3, 0x66, 0x64, 0x0f, 0x1e, 0xff" :::"cc","memory"); -__asm__ __volatile__ (".byte 0x64, 0x0f, 0x1f, 0xff" :::"cc","memory"); -__asm__ __volatile__ (".byte 0x66, 0x64, 0x0f, 0x1f, 0xff" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf2, 0x64, 0x0f, 0x1f, 0xff" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf3, 0x64, 0x0f, 0x1f, 0xff" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf2, 0x66, 0x64, 0x0f, 0x1f, 0xff" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf3, 0x66, 0x64, 0x0f, 0x1f, 0xff" :::"cc","memory"); -__asm__ __volatile__ (".byte 0x64, 0x0f, 0x1f, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0x66, 0x64, 0x0f, 0x1f, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf2, 0x64, 0x0f, 0x1f, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf3, 0x64, 0x0f, 0x1f, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf2, 0x66, 0x64, 0x0f, 0x1f, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf3, 0x66, 0x64, 0x0f, 0x1f, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0x64, 0x0f, 0x1f, 0x40, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0x66, 0x64, 0x0f, 0x1f, 0x40, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf2, 0x64, 0x0f, 0x1f, 0x40, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf3, 0x64, 0x0f, 0x1f, 0x40, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf2, 0x66, 0x64, 0x0f, 0x1f, 0x40, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf3, 0x66, 0x64, 0x0f, 0x1f, 0x40, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0x64, 0x0f, 0x1f, 0x44, 0x0, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0x66, 0x64, 0x0f, 0x1f, 0x44, 0x0, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf2, 0x64, 0x0f, 0x1f, 0x44, 0x0, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf3, 0x64, 0x0f, 0x1f, 0x44, 0x0, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf2, 0x66, 0x64, 0x0f, 0x1f, 0x44, 0x0, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf3, 0x66, 0x64, 0x0f, 0x1f, 0x44, 0x0, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0x64, 0x0f, 0x1f, 0x80, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0x66, 0x64, 0x0f, 0x1f, 0x80, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf2, 0x64, 0x0f, 0x1f, 0x80, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf3, 0x64, 0x0f, 0x1f, 0x80, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf2, 0x66, 0x64, 0x0f, 0x1f, 0x80, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf3, 0x66, 0x64, 0x0f, 0x1f, 0x80, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0x64, 0x0f, 0x1f, 0x84, 0x0, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0x66, 0x64, 0x0f, 0x1f, 0x84, 0x0, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf2, 0x64, 0x0f, 0x1f, 0x84, 0x0, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf3, 0x64, 0x0f, 0x1f, 0x84, 0x0, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf2, 0x66, 0x64, 0x0f, 0x1f, 0x84, 0x0, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf3, 0x66, 0x64, 0x0f, 0x1f, 0x84, 0x0, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0x64, 0x0f, 0x1f, 0x5A, 0x22" :::"cc","memory"); -__asm__ __volatile__ (".byte 0x66, 0x64, 0x0f, 0x1f, 0x5A, 0x22" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf2, 0x64, 0x0f, 0x1f, 0x5A, 0x22" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf3, 0x64, 0x0f, 0x1f, 0x5A, 0x22" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf2, 0x66, 0x64, 0x0f, 0x1f, 0x5A, 0x22" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf3, 0x66, 0x64, 0x0f, 0x1f, 0x5A, 0x22" :::"cc","memory"); -__asm__ __volatile__ (".byte 0x64, 0x0f, 0x1f, 0x9C, 0x1D, 0x11, 0x22, 0x33, 0x44" :::"cc","memory"); -__asm__ __volatile__ (".byte 0x66, 0x64, 0x0f, 0x1f, 0x9C, 0x1D, 0x11, 0x22, 0x33, 0x44" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf2, 0x64, 0x0f, 0x1f, 0x9C, 0x1D, 0x11, 0x22, 0x33, 0x44" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf3, 0x64, 0x0f, 0x1f, 0x9C, 0x1D, 0x11, 0x22, 0x33, 0x44" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf2, 0x66, 0x64, 0x0f, 0x1f, 0x9C, 0x1D, 0x11, 0x22, 0x33, 0x44" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf3, 0x66, 0x64, 0x0f, 0x1f, 0x9C, 0x1D, 0x11, 0x22, 0x33, 0x44" :::"cc","memory"); -__asm__ __volatile__ (".byte 0x64, 0x0f, 0x1f, 0x04, 0x60" :::"cc","memory"); -__asm__ __volatile__ (".byte 0x66, 0x64, 0x0f, 0x1f, 0x04, 0x60" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf2, 0x64, 0x0f, 0x1f, 0x04, 0x60" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf3, 0x64, 0x0f, 0x1f, 0x04, 0x60" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf2, 0x66, 0x64, 0x0f, 0x1f, 0x04, 0x60" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf3, 0x66, 0x64, 0x0f, 0x1f, 0x04, 0x60" :::"cc","memory"); -__asm__ __volatile__ (".byte 0x64, 0x0f, 0x1f, 0xff" :::"cc","memory"); -__asm__ __volatile__ (".byte 0x66, 0x64, 0x0f, 0x1f, 0xff" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf2, 0x64, 0x0f, 0x1f, 0xff" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf3, 0x64, 0x0f, 0x1f, 0xff" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf2, 0x66, 0x64, 0x0f, 0x1f, 0xff" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf3, 0x66, 0x64, 0x0f, 0x1f, 0xff" :::"cc","memory"); - - printf ("done\n"); - return 0; -} +#include <stdio.h> + +int main () +{ + printf("start testing FS prefix ..\n"); + fflush(stdout); + +__asm__ __volatile__ (".byte 0x64, 0x0f, 0x19, 0xff" :::"cc","memory"); +__asm__ __volatile__ (".byte 0x66, 0x64, 0x0f, 0x19, 0xff" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf2, 0x64, 0x0f, 0x19, 0xff" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf3, 0x64, 0x0f, 0x19, 0xff" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf2, 0x66, 0x64, 0x0f, 0x19, 0xff" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf3, 0x66, 0x64, 0x0f, 0x19, 0xff" :::"cc","memory"); +__asm__ __volatile__ (".byte 0x64, 0x0f, 0x19, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0x66, 0x64, 0x0f, 0x19, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf2, 0x64, 0x0f, 0x19, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf3, 0x64, 0x0f, 0x19, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf2, 0x66, 0x64, 0x0f, 0x19, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf3, 0x66, 0x64, 0x0f, 0x19, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0x64, 0x0f, 0x19, 0x40, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0x66, 0x64, 0x0f, 0x19, 0x40, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf2, 0x64, 0x0f, 0x19, 0x40, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf3, 0x64, 0x0f, 0x19, 0x40, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf2, 0x66, 0x64, 0x0f, 0x19, 0x40, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf3, 0x66, 0x64, 0x0f, 0x19, 0x40, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0x64, 0x0f, 0x19, 0x44, 0x0, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0x66, 0x64, 0x0f, 0x19, 0x44, 0x0, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf2, 0x64, 0x0f, 0x19, 0x44, 0x0, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf3, 0x64, 0x0f, 0x19, 0x44, 0x0, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf2, 0x66, 0x64, 0x0f, 0x19, 0x44, 0x0, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf3, 0x66, 0x64, 0x0f, 0x19, 0x44, 0x0, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0x64, 0x0f, 0x19, 0x80, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0x66, 0x64, 0x0f, 0x19, 0x80, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf2, 0x64, 0x0f, 0x19, 0x80, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf3, 0x64, 0x0f, 0x19, 0x80, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf2, 0x66, 0x64, 0x0f, 0x19, 0x80, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf3, 0x66, 0x64, 0x0f, 0x19, 0x80, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0x64, 0x0f, 0x19, 0x84, 0x0, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0x66, 0x64, 0x0f, 0x19, 0x84, 0x0, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf2, 0x64, 0x0f, 0x19, 0x84, 0x0, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf3, 0x64, 0x0f, 0x19, 0x84, 0x0, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf2, 0x66, 0x64, 0x0f, 0x19, 0x84, 0x0, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf3, 0x66, 0x64, 0x0f, 0x19, 0x84, 0x0, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0x64, 0x0f, 0x19, 0x5A, 0x22" :::"cc","memory"); +__asm__ __volatile__ (".byte 0x66, 0x64, 0x0f, 0x19, 0x5A, 0x22" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf2, 0x64, 0x0f, 0x19, 0x5A, 0x22" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf3, 0x64, 0x0f, 0x19, 0x5A, 0x22" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf2, 0x66, 0x64, 0x0f, 0x19, 0x5A, 0x22" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf3, 0x66, 0x64, 0x0f, 0x19, 0x5A, 0x22" :::"cc","memory"); +__asm__ __volatile__ (".byte 0x64, 0x0f, 0x19, 0x9C, 0x1D, 0x11, 0x22, 0x33, 0x44" :::"cc","memory"); +__asm__ __volatile__ (".byte 0x66, 0x64, 0x0f, 0x19, 0x9C, 0x1D, 0x11, 0x22, 0x33, 0x44" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf2, 0x64, 0x0f, 0x19, 0x9C, 0x1D, 0x11, 0x22, 0x33, 0x44" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf3, 0x64, 0x0f, 0x19, 0x9C, 0x1D, 0x11, 0x22, 0x33, 0x44" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf2, 0x66, 0x64, 0x0f, 0x19, 0x9C, 0x1D, 0x11, 0x22, 0x33, 0x44" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf3, 0x66, 0x64, 0x0f, 0x19, 0x9C, 0x1D, 0x11, 0x22, 0x33, 0x44" :::"cc","memory"); +__asm__ __volatile__ (".byte 0x64, 0x0f, 0x19, 0x04, 0x60" :::"cc","memory"); +__asm__ __volatile__ (".byte 0x66, 0x64, 0x0f, 0x19, 0x04, 0x60" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf2, 0x64, 0x0f, 0x19, 0x04, 0x60" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf3, 0x64, 0x0f, 0x19, 0x04, 0x60" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf2, 0x66, 0x64, 0x0f, 0x19, 0x04, 0x60" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf3, 0x66, 0x64, 0x0f, 0x19, 0x04, 0x60" :::"cc","memory"); +__asm__ __volatile__ (".byte 0x64, 0x0f, 0x19, 0xff" :::"cc","memory"); +__asm__ __volatile__ (".byte 0x66, 0x64, 0x0f, 0x19, 0xff" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf2, 0x64, 0x0f, 0x19, 0xff" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf3, 0x64, 0x0f, 0x19, 0xff" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf2, 0x66, 0x64, 0x0f, 0x19, 0xff" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf3, 0x66, 0x64, 0x0f, 0x19, 0xff" :::"cc","memory"); +__asm__ __volatile__ (".byte 0x64, 0x0f, 0x1e, 0xff" :::"cc","memory"); +__asm__ __volatile__ (".byte 0x66, 0x64, 0x0f, 0x1e, 0xff" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf2, 0x64, 0x0f, 0x1e, 0xff" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf3, 0x64, 0x0f, 0x1e, 0xff" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf2, 0x66, 0x64, 0x0f, 0x1e, 0xff" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf3, 0x66, 0x64, 0x0f, 0x1e, 0xff" :::"cc","memory"); +__asm__ __volatile__ (".byte 0x64, 0x0f, 0x1e, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0x66, 0x64, 0x0f, 0x1e, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf2, 0x64, 0x0f, 0x1e, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf3, 0x64, 0x0f, 0x1e, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf2, 0x66, 0x64, 0x0f, 0x1e, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf3, 0x66, 0x64, 0x0f, 0x1e, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0x64, 0x0f, 0x1e, 0x40, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0x66, 0x64, 0x0f, 0x1e, 0x40, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf2, 0x64, 0x0f, 0x1e, 0x40, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf3, 0x64, 0x0f, 0x1e, 0x40, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf2, 0x66, 0x64, 0x0f, 0x1e, 0x40, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf3, 0x66, 0x64, 0x0f, 0x1e, 0x40, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0x64, 0x0f, 0x1e, 0x44, 0x0, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0x66, 0x64, 0x0f, 0x1e, 0x44, 0x0, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf2, 0x64, 0x0f, 0x1e, 0x44, 0x0, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf3, 0x64, 0x0f, 0x1e, 0x44, 0x0, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf2, 0x66, 0x64, 0x0f, 0x1e, 0x44, 0x0, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf3, 0x66, 0x64, 0x0f, 0x1e, 0x44, 0x0, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0x64, 0x0f, 0x1e, 0x80, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0x66, 0x64, 0x0f, 0x1e, 0x80, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf2, 0x64, 0x0f, 0x1e, 0x80, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf3, 0x64, 0x0f, 0x1e, 0x80, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf2, 0x66, 0x64, 0x0f, 0x1e, 0x80, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf3, 0x66, 0x64, 0x0f, 0x1e, 0x80, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0x64, 0x0f, 0x1e, 0x84, 0x0, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0x66, 0x64, 0x0f, 0x1e, 0x84, 0x0, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf2, 0x64, 0x0f, 0x1e, 0x84, 0x0, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf3, 0x64, 0x0f, 0x1e, 0x84, 0x0, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf2, 0x66, 0x64, 0x0f, 0x1e, 0x84, 0x0, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf3, 0x66, 0x64, 0x0f, 0x1e, 0x84, 0x0, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0x64, 0x0f, 0x1e, 0x5A, 0x22" :::"cc","memory"); +__asm__ __volatile__ (".byte 0x66, 0x64, 0x0f, 0x1e, 0x5A, 0x22" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf2, 0x64, 0x0f, 0x1e, 0x5A, 0x22" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf3, 0x64, 0x0f, 0x1e, 0x5A, 0x22" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf2, 0x66, 0x64, 0x0f, 0x1e, 0x5A, 0x22" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf3, 0x66, 0x64, 0x0f, 0x1e, 0x5A, 0x22" :::"cc","memory"); +__asm__ __volatile__ (".byte 0x64, 0x0f, 0x1e, 0x9C, 0x1D, 0x11, 0x22, 0x33, 0x44" :::"cc","memory"); +__asm__ __volatile__ (".byte 0x66, 0x64, 0x0f, 0x1e, 0x9C, 0x1D, 0x11, 0x22, 0x33, 0x44" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf2, 0x64, 0x0f, 0x1e, 0x9C, 0x1D, 0x11, 0x22, 0x33, 0x44" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf3, 0x64, 0x0f, 0x1e, 0x9C, 0x1D, 0x11, 0x22, 0x33, 0x44" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf2, 0x66, 0x64, 0x0f, 0x1e, 0x9C, 0x1D, 0x11, 0x22, 0x33, 0x44" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf3, 0x66, 0x64, 0x0f, 0x1e, 0x9C, 0x1D, 0x11, 0x22, 0x33, 0x44" :::"cc","memory"); +__asm__ __volatile__ (".byte 0x64, 0x0f, 0x1e, 0x04, 0x60" :::"cc","memory"); +__asm__ __volatile__ (".byte 0x66, 0x64, 0x0f, 0x1e, 0x04, 0x60" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf2, 0x64, 0x0f, 0x1e, 0x04, 0x60" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf3, 0x64, 0x0f, 0x1e, 0x04, 0x60" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf2, 0x66, 0x64, 0x0f, 0x1e, 0x04, 0x60" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf3, 0x66, 0x64, 0x0f, 0x1e, 0x04, 0x60" :::"cc","memory"); +__asm__ __volatile__ (".byte 0x64, 0x0f, 0x1e, 0xff" :::"cc","memory"); +__asm__ __volatile__ (".byte 0x66, 0x64, 0x0f, 0x1e, 0xff" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf2, 0x64, 0x0f, 0x1e, 0xff" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf3, 0x64, 0x0f, 0x1e, 0xff" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf2, 0x66, 0x64, 0x0f, 0x1e, 0xff" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf3, 0x66, 0x64, 0x0f, 0x1e, 0xff" :::"cc","memory"); +__asm__ __volatile__ (".byte 0x64, 0x0f, 0x1d, 0xff" :::"cc","memory"); +__asm__ __volatile__ (".byte 0x66, 0x64, 0x0f, 0x1d, 0xff" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf2, 0x64, 0x0f, 0x1d, 0xff" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf3, 0x64, 0x0f, 0x1d, 0xff" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf2, 0x66, 0x64, 0x0f, 0x1d, 0xff" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf3, 0x66, 0x64, 0x0f, 0x1d, 0xff" :::"cc","memory"); +__asm__ __volatile__ (".byte 0x64, 0x0f, 0x1d, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0x66, 0x64, 0x0f, 0x1d, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf2, 0x64, 0x0f, 0x1d, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf3, 0x64, 0x0f, 0x1d, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf2, 0x66, 0x64, 0x0f, 0x1d, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf3, 0x66, 0x64, 0x0f, 0x1d, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0x64, 0x0f, 0x1d, 0x40, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0x66, 0x64, 0x0f, 0x1d, 0x40, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf2, 0x64, 0x0f, 0x1d, 0x40, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf3, 0x64, 0x0f, 0x1d, 0x40, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf2, 0x66, 0x64, 0x0f, 0x1d, 0x40, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf3, 0x66, 0x64, 0x0f, 0x1d, 0x40, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0x64, 0x0f, 0x1d, 0x44, 0x0, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0x66, 0x64, 0x0f, 0x1d, 0x44, 0x0, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf2, 0x64, 0x0f, 0x1d, 0x44, 0x0, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf3, 0x64, 0x0f, 0x1d, 0x44, 0x0, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf2, 0x66, 0x64, 0x0f, 0x1d, 0x44, 0x0, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf3, 0x66, 0x64, 0x0f, 0x1d, 0x44, 0x0, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0x64, 0x0f, 0x1d, 0x80, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0x66, 0x64, 0x0f, 0x1d, 0x80, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf2, 0x64, 0x0f, 0x1d, 0x80, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf3, 0x64, 0x0f, 0x1d, 0x80, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf2, 0x66, 0x64, 0x0f, 0x1d, 0x80, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf3, 0x66, 0x64, 0x0f, 0x1d, 0x80, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0x64, 0x0f, 0x1d, 0x84, 0x0, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0x66, 0x64, 0x0f, 0x1d, 0x84, 0x0, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf2, 0x64, 0x0f, 0x1d, 0x84, 0x0, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf3, 0x64, 0x0f, 0x1d, 0x84, 0x0, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf2, 0x66, 0x64, 0x0f, 0x1d, 0x84, 0x0, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf3, 0x66, 0x64, 0x0f, 0x1d, 0x84, 0x0, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0x64, 0x0f, 0x1d, 0x5A, 0x22" :::"cc","memory"); +__asm__ __volatile__ (".byte 0x66, 0x64, 0x0f, 0x1d, 0x5A, 0x22" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf2, 0x64, 0x0f, 0x1d, 0x5A, 0x22" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf3, 0x64, 0x0f, 0x1d, 0x5A, 0x22" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf2, 0x66, 0x64, 0x0f, 0x1d, 0x5A, 0x22" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf3, 0x66, 0x64, 0x0f, 0x1d, 0x5A, 0x22" :::"cc","memory"); +__asm__ __volatile__ (".byte 0x64, 0x0f, 0x1d, 0x9C, 0x1D, 0x11, 0x22, 0x33, 0x44" :::"cc","memory"); +__asm__ __volatile__ (".byte 0x66, 0x64, 0x0f, 0x1d, 0x9C, 0x1D, 0x11, 0x22, 0x33, 0x44" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf2, 0x64, 0x0f, 0x1d, 0x9C, 0x1D, 0x11, 0x22, 0x33, 0x44" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf3, 0x64, 0x0f, 0x1d, 0x9C, 0x1D, 0x11, 0x22, 0x33, 0x44" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf2, 0x66, 0x64, 0x0f, 0x1d, 0x9C, 0x1D, 0x11, 0x22, 0x33, 0x44" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf3, 0x66, 0x64, 0x0f, 0x1d, 0x9C, 0x1D, 0x11, 0x22, 0x33, 0x44" :::"cc","memory"); +__asm__ __volatile__ (".byte 0x64, 0x0f, 0x1d, 0x04, 0x60" :::"cc","memory"); +__asm__ __volatile__ (".byte 0x66, 0x64, 0x0f, 0x1d, 0x04, 0x60" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf2, 0x64, 0x0f, 0x1d, 0x04, 0x60" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf3, 0x64, 0x0f, 0x1d, 0x04, 0x60" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf2, 0x66, 0x64, 0x0f, 0x1d, 0x04, 0x60" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf3, 0x66, 0x64, 0x0f, 0x1d, 0x04, 0x60" :::"cc","memory"); +__asm__ __volatile__ (".byte 0x64, 0x0f, 0x1d, 0xff" :::"cc","memory"); +__asm__ __volatile__ (".byte 0x66, 0x64, 0x0f, 0x1d, 0xff" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf2, 0x64, 0x0f, 0x1d, 0xff" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf3, 0x64, 0x0f, 0x1d, 0xff" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf2, 0x66, 0x64, 0x0f, 0x1d, 0xff" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf3, 0x66, 0x64, 0x0f, 0x1d, 0xff" :::"cc","memory"); +__asm__ __volatile__ (".byte 0x64, 0x0f, 0x1e, 0xff" :::"cc","memory"); +__asm__ __volatile__ (".byte 0x66, 0x64, 0x0f, 0x1e, 0xff" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf2, 0x64, 0x0f, 0x1e, 0xff" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf3, 0x64, 0x0f, 0x1e, 0xff" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf2, 0x66, 0x64, 0x0f, 0x1e, 0xff" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf3, 0x66, 0x64, 0x0f, 0x1e, 0xff" :::"cc","memory"); +__asm__ __volatile__ (".byte 0x64, 0x0f, 0x1e, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0x66, 0x64, 0x0f, 0x1e, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf2, 0x64, 0x0f, 0x1e, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf3, 0x64, 0x0f, 0x1e, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf2, 0x66, 0x64, 0x0f, 0x1e, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf3, 0x66, 0x64, 0x0f, 0x1e, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0x64, 0x0f, 0x1e, 0x40, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0x66, 0x64, 0x0f, 0x1e, 0x40, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf2, 0x64, 0x0f, 0x1e, 0x40, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf3, 0x64, 0x0f, 0x1e, 0x40, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf2, 0x66, 0x64, 0x0f, 0x1e, 0x40, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf3, 0x66, 0x64, 0x0f, 0x1e, 0x40, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0x64, 0x0f, 0x1e, 0x44, 0x0, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0x66, 0x64, 0x0f, 0x1e, 0x44, 0x0, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf2, 0x64, 0x0f, 0x1e, 0x44, 0x0, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf3, 0x64, 0x0f, 0x1e, 0x44, 0x0, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf2, 0x66, 0x64, 0x0f, 0x1e, 0x44, 0x0, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf3, 0x66, 0x64, 0x0f, 0x1e, 0x44, 0x0, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0x64, 0x0f, 0x1e, 0x80, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0x66, 0x64, 0x0f, 0x1e, 0x80, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf2, 0x64, 0x0f, 0x1e, 0x80, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf3, 0x64, 0x0f, 0x1e, 0x80, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf2, 0x66, 0x64, 0x0f, 0x1e, 0x80, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf3, 0x66, 0x64, 0x0f, 0x1e, 0x80, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0x64, 0x0f, 0x1e, 0x84, 0x0, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0x66, 0x64, 0x0f, 0x1e, 0x84, 0x0, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf2, 0x64, 0x0f, 0x1e, 0x84, 0x0, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf3, 0x64, 0x0f, 0x1e, 0x84, 0x0, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf2, 0x66, 0x64, 0x0f, 0x1e, 0x84, 0x0, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf3, 0x66, 0x64, 0x0f, 0x1e, 0x84, 0x0, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0x64, 0x0f, 0x1e, 0x5A, 0x22" :::"cc","memory"); +__asm__ __volatile__ (".byte 0x66, 0x64, 0x0f, 0x1e, 0x5A, 0x22" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf2, 0x64, 0x0f, 0x1e, 0x5A, 0x22" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf3, 0x64, 0x0f, 0x1e, 0x5A, 0x22" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf2, 0x66, 0x64, 0x0f, 0x1e, 0x5A, 0x22" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf3, 0x66, 0x64, 0x0f, 0x1e, 0x5A, 0x22" :::"cc","memory"); +__asm__ __volatile__ (".byte 0x64, 0x0f, 0x1e, 0x9C, 0x1D, 0x11, 0x22, 0x33, 0x44" :::"cc","memory"); +__asm__ __volatile__ (".byte 0x66, 0x64, 0x0f, 0x1e, 0x9C, 0x1D, 0x11, 0x22, 0x33, 0x44" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf2, 0x64, 0x0f, 0x1e, 0x9C, 0x1D, 0x11, 0x22, 0x33, 0x44" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf3, 0x64, 0x0f, 0x1e, 0x9C, 0x1D, 0x11, 0x22, 0x33, 0x44" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf2, 0x66, 0x64, 0x0f, 0x1e, 0x9C, 0x1D, 0x11, 0x22, 0x33, 0x44" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf3, 0x66, 0x64, 0x0f, 0x1e, 0x9C, 0x1D, 0x11, 0x22, 0x33, 0x44" :::"cc","memory"); +__asm__ __volatile__ (".byte 0x64, 0x0f, 0x1e, 0x04, 0x60" :::"cc","memory"); +__asm__ __volatile__ (".byte 0x66, 0x64, 0x0f, 0x1e, 0x04, 0x60" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf2, 0x64, 0x0f, 0x1e, 0x04, 0x60" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf3, 0x64, 0x0f, 0x1e, 0x04, 0x60" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf2, 0x66, 0x64, 0x0f, 0x1e, 0x04, 0x60" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf3, 0x66, 0x64, 0x0f, 0x1e, 0x04, 0x60" :::"cc","memory"); +__asm__ __volatile__ (".byte 0x64, 0x0f, 0x1e, 0xff" :::"cc","memory"); +__asm__ __volatile__ (".byte 0x66, 0x64, 0x0f, 0x1e, 0xff" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf2, 0x64, 0x0f, 0x1e, 0xff" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf3, 0x64, 0x0f, 0x1e, 0xff" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf2, 0x66, 0x64, 0x0f, 0x1e, 0xff" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf3, 0x66, 0x64, 0x0f, 0x1e, 0xff" :::"cc","memory"); +__asm__ __volatile__ (".byte 0x64, 0x0f, 0x1f, 0xff" :::"cc","memory"); +__asm__ __volatile__ (".byte 0x66, 0x64, 0x0f, 0x1f, 0xff" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf2, 0x64, 0x0f, 0x1f, 0xff" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf3, 0x64, 0x0f, 0x1f, 0xff" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf2, 0x66, 0x64, 0x0f, 0x1f, 0xff" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf3, 0x66, 0x64, 0x0f, 0x1f, 0xff" :::"cc","memory"); +__asm__ __volatile__ (".byte 0x64, 0x0f, 0x1f, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0x66, 0x64, 0x0f, 0x1f, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf2, 0x64, 0x0f, 0x1f, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf3, 0x64, 0x0f, 0x1f, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf2, 0x66, 0x64, 0x0f, 0x1f, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf3, 0x66, 0x64, 0x0f, 0x1f, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0x64, 0x0f, 0x1f, 0x40, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0x66, 0x64, 0x0f, 0x1f, 0x40, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf2, 0x64, 0x0f, 0x1f, 0x40, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf3, 0x64, 0x0f, 0x1f, 0x40, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf2, 0x66, 0x64, 0x0f, 0x1f, 0x40, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf3, 0x66, 0x64, 0x0f, 0x1f, 0x40, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0x64, 0x0f, 0x1f, 0x44, 0x0, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0x66, 0x64, 0x0f, 0x1f, 0x44, 0x0, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf2, 0x64, 0x0f, 0x1f, 0x44, 0x0, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf3, 0x64, 0x0f, 0x1f, 0x44, 0x0, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf2, 0x66, 0x64, 0x0f, 0x1f, 0x44, 0x0, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf3, 0x66, 0x64, 0x0f, 0x1f, 0x44, 0x0, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0x64, 0x0f, 0x1f, 0x80, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0x66, 0x64, 0x0f, 0x1f, 0x80, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf2, 0x64, 0x0f, 0x1f, 0x80, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf3, 0x64, 0x0f, 0x1f, 0x80, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf2, 0x66, 0x64, 0x0f, 0x1f, 0x80, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf3, 0x66, 0x64, 0x0f, 0x1f, 0x80, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0x64, 0x0f, 0x1f, 0x84, 0x0, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0x66, 0x64, 0x0f, 0x1f, 0x84, 0x0, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf2, 0x64, 0x0f, 0x1f, 0x84, 0x0, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf3, 0x64, 0x0f, 0x1f, 0x84, 0x0, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf2, 0x66, 0x64, 0x0f, 0x1f, 0x84, 0x0, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf3, 0x66, 0x64, 0x0f, 0x1f, 0x84, 0x0, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); +__asm__ __volatile__ (".byte 0x64, 0x0f, 0x1f, 0x5A, 0x22" :::"cc","memory"); +__asm__ __volatile__ (".byte 0x66, 0x64, 0x0f, 0x1f, 0x5A, 0x22" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf2, 0x64, 0x0f, 0x1f, 0x5A, 0x22" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf3, 0x64, 0x0f, 0x1f, 0x5A, 0x22" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf2, 0x66, 0x64, 0x0f, 0x1f, 0x5A, 0x22" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf3, 0x66, 0x64, 0x0f, 0x1f, 0x5A, 0x22" :::"cc","memory"); +__asm__ __volatile__ (".byte 0x64, 0x0f, 0x1f, 0x9C, 0x1D, 0x11, 0x22, 0x33, 0x44" :::"cc","memory"); +__asm__ __volatile__ (".byte 0x66, 0x64, 0x0f, 0x1f, 0x9C, 0x1D, 0x11, 0x22, 0x33, 0x44" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf2, 0x64, 0x0f, 0x1f, 0x9C, 0x1D, 0x11, 0x22, 0x33, 0x44" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf3, 0x64, 0x0f, 0x1f, 0x9C, 0x1D, 0x11, 0x22, 0x33, 0x44" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf2, 0x66, 0x64, 0x0f, 0x1f, 0x9C, 0x1D, 0x11, 0x22, 0x33, 0x44" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf3, 0x66, 0x64, 0x0f, 0x1f, 0x9C, 0x1D, 0x11, 0x22, 0x33, 0x44" :::"cc","memory"); +__asm__ __volatile__ (".byte 0x64, 0x0f, 0x1f, 0x04, 0x60" :::"cc","memory"); +__asm__ __volatile__ (".byte 0x66, 0x64, 0x0f, 0x1f, 0x04, 0x60" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf2, 0x64, 0x0f, 0x1f, 0x04, 0x60" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf3, 0x64, 0x0f, 0x1f, 0x04, 0x60" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf2, 0x66, 0x64, 0x0f, 0x1f, 0x04, 0x60" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf3, 0x66, 0x64, 0x0f, 0x1f, 0x04, 0x60" :::"cc","memory"); +__asm__ __volatile__ (".byte 0x64, 0x0f, 0x1f, 0xff" :::"cc","memory"); +__asm__ __volatile__ (".byte 0x66, 0x64, 0x0f, 0x1f, 0xff" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf2, 0x64, 0x0f, 0x1f, 0xff" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf3, 0x64, 0x0f, 0x1f, 0xff" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf2, 0x66, 0x64, 0x0f, 0x1f, 0xff" :::"cc","memory"); +__asm__ __volatile__ (".byte 0xf3, 0x66, 0x64, 0x0f, 0x1f, 0xff" :::"cc","memory"); + + printf ("done\n"); + return 0; +} diff --git a/none/tests/amd64-linux/cet_nops_gs.c b/none/tests/amd64-linux/cet_nops_gs.c index c03f02c..6fb60c7 100644 --- a/none/tests/amd64-linux/cet_nops_gs.c +++ b/none/tests/amd64-linux/cet_nops_gs.c @@ -1,311 +1,311 @@ -#include <stdio.h> - -int main () -{ - printf("start testing GS prefix ..\n"); - fflush(stdout); - -__asm__ __volatile__ (".byte 0x65, 0x0f, 0x19, 0xff" :::"cc","memory"); -__asm__ __volatile__ (".byte 0x66, 0x65, 0x0f, 0x19, 0xff" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf2, 0x65, 0x0f, 0x19, 0xff" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf3, 0x65, 0x0f, 0x19, 0xff" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf2, 0x66, 0x65, 0x0f, 0x19, 0xff" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf3, 0x66, 0x65, 0x0f, 0x19, 0xff" :::"cc","memory"); -__asm__ __volatile__ (".byte 0x65, 0x0f, 0x19, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0x66, 0x65, 0x0f, 0x19, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf2, 0x65, 0x0f, 0x19, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf3, 0x65, 0x0f, 0x19, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf2, 0x66, 0x65, 0x0f, 0x19, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf3, 0x66, 0x65, 0x0f, 0x19, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0x65, 0x0f, 0x19, 0x40, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0x66, 0x65, 0x0f, 0x19, 0x40, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf2, 0x65, 0x0f, 0x19, 0x40, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf3, 0x65, 0x0f, 0x19, 0x40, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf2, 0x66, 0x65, 0x0f, 0x19, 0x40, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf3, 0x66, 0x65, 0x0f, 0x19, 0x40, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0x65, 0x0f, 0x19, 0x44, 0x0, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0x66, 0x65, 0x0f, 0x19, 0x44, 0x0, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf2, 0x65, 0x0f, 0x19, 0x44, 0x0, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf3, 0x65, 0x0f, 0x19, 0x44, 0x0, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf2, 0x66, 0x65, 0x0f, 0x19, 0x44, 0x0, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf3, 0x66, 0x65, 0x0f, 0x19, 0x44, 0x0, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0x65, 0x0f, 0x19, 0x80, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0x66, 0x65, 0x0f, 0x19, 0x80, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf2, 0x65, 0x0f, 0x19, 0x80, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf3, 0x65, 0x0f, 0x19, 0x80, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf2, 0x66, 0x65, 0x0f, 0x19, 0x80, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf3, 0x66, 0x65, 0x0f, 0x19, 0x80, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0x65, 0x0f, 0x19, 0x84, 0x0, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0x66, 0x65, 0x0f, 0x19, 0x84, 0x0, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf2, 0x65, 0x0f, 0x19, 0x84, 0x0, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf3, 0x65, 0x0f, 0x19, 0x84, 0x0, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf2, 0x66, 0x65, 0x0f, 0x19, 0x84, 0x0, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf3, 0x66, 0x65, 0x0f, 0x19, 0x84, 0x0, 0x0, 0x0, 0x0, 0x0" :::"cc","memory"); -__asm__ __volatile__ (".byte 0x65, 0x0f, 0x19, 0x5A, 0x22" :::"cc","memory"); -__asm__ __volatile__ (".byte 0x66, 0x65, 0x0f, 0x19, 0x5A, 0x22" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf2, 0x65, 0x0f, 0x19, 0x5A, 0x22" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf3, 0x65, 0x0f, 0x19, 0x5A, 0x22" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf2, 0x66, 0x65, 0x0f, 0x19, 0x5A, 0x22" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf3, 0x66, 0x65, 0x0f, 0x19, 0x5A, 0x22" :::"cc","memory"); -__asm__ __volatile__ (".byte 0x65, 0x0f, 0x19, 0x9C, 0x1D, 0x11, 0x22, 0x33, 0x44" :::"cc","memory"); -__asm__ __volatile__ (".byte 0x66, 0x65, 0x0f, 0x19, 0x9C, 0x1D, 0x11, 0x22, 0x33, 0x44" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf2, 0x65, 0x0f, 0x19, 0x9C, 0x1D, 0x11, 0x22, 0x33, 0x44" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf3, 0x65, 0x0f, 0x19, 0x9C, 0x1D, 0x11, 0x22, 0x33, 0x44" :::"cc","memory"); -__asm__ __volatile__ (".byte 0xf2, 0x66, 0x65, 0x0f, 0x19, 0x9C, 0x1D, 0x11, 0x22, 0x33, 0x44" :::"cc","memory"); -__asm__ __volatile... [truncated message content] |