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

Unified Diff: gcc/gcc/config/i386/i386.md

Issue 2850019: [gcc] Eliminate control integrity pass in favor of nacl instructions generation from the start. (Closed) Base URL: ssh://git@chromiumos-git/nacl-toolchain.git
Patch Set: Created 10 years, 6 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
Index: gcc/gcc/config/i386/i386.md
diff --git a/gcc/gcc/config/i386/i386.md b/gcc/gcc/config/i386/i386.md
index c2898b28f54d5d0b8832d23e00de88ed02bb3c3a..602f4b765134dde218de53aa06e56fb3dc098983 100644
--- a/gcc/gcc/config/i386/i386.md
+++ b/gcc/gcc/config/i386/i386.md
@@ -15320,6 +15320,15 @@
operands[0] = expand_simple_binop (Pmode, code, op0, op1, NULL_RTX, 0,
OPTAB_DIRECT);
}
+
+ /* For NativeClient, force address into register and wrap it into UNSPEC. */
+ if (TARGET_NACL)
+ {
+ enum machine_mode mode = GET_MODE (operands[0]);
+ operands[0] = gen_rtx_UNSPEC (mode,
+ gen_rtvec (1, force_reg (mode, operands[0])),
+ UNSPEC_NACLJMP);
+ }
})
(define_insn "*tablejump_1"

Powered by Google App Engine
This is Rietveld 408576698