Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(480)

Unified Diff: tests/dynamic_code_loading/templates_x86.S

Issue 9328024: Merge 7712 - Ensure super instructions are marked during dynamic code modification. (Closed) Base URL: svn://svn.chromium.org/native_client/branches/963/src/native_client/
Patch Set: '' Created 8 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/dynamic_code_loading/templates.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/dynamic_code_loading/templates_x86.S
===================================================================
--- tests/dynamic_code_loading/templates_x86.S (revision 7726)
+++ tests/dynamic_code_loading/templates_x86.S (working copy)
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011 The Native Client Authors. All rights reserved.
+ * Copyright (c) 2012 The Native Client Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
@@ -65,6 +65,62 @@
template_func_replacement_end:
+#if defined(__i386__)
+ .global jump_into_super_inst_original
+ .global jump_into_super_inst_original_end
+ .p2align 5
+jump_into_super_inst_original:
+jump_is_ok:
+ and $0xffffffe0,%ecx
+ jmp *%ecx
+ call jump_is_ok
+jump_into_super_inst_original_end:
+
+
+/* This should not validate, so keep it as data. */
+ .data
+ .global jump_into_super_inst_modified
+ .global jump_into_super_inst_modified_end
+ .p2align 5
+jump_into_super_inst_modified:
+ and $0xffffffe0,%ecx
+jump_is_awful:
+ jmp *%ecx
+ call jump_is_awful
+jump_into_super_inst_modified_end:
+ .text
+#endif
+
+
+#if defined(__x86_64__)
+ .global jump_into_super_inst_original
+ .global jump_into_super_inst_original_end
+ .p2align 5
+jump_into_super_inst_original:
+jump_is_ok:
+ andl $0xffffffe0,%r11d
+ addq %r15,%r11
+ jmpq *%r11
+ call jump_is_ok
+jump_into_super_inst_original_end:
+
+
+/* This should not validate, so keep it as data. */
+ .data
+ .global jump_into_super_inst_modified
+ .global jump_into_super_inst_modified_end
+ .p2align 5
+jump_into_super_inst_modified:
+ andl $0xffffffe0,%r11d
+ addq %r15,%r11
+jump_is_awful:
+ jmpq *%r11
+ call jump_is_awful
+jump_into_super_inst_modified_end:
+ .text
+#endif
+
+
.global template_func_nonreplacement
.global template_func_nonreplacement_end
.global template_func_misaligned_replacement
« no previous file with comments | « tests/dynamic_code_loading/templates.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698