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

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

Issue 3037021: [gcc] string operations: read sandboxing (Closed) Base URL: ssh://git@chromiumos-git/nacl-toolchain.git
Patch Set: [gcc] string operations: read sandboxing Created 10 years, 5 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gcc/gcc/config/i386/i386.md
diff --git a/gcc/gcc/config/i386/i386.md b/gcc/gcc/config/i386/i386.md
index 2a1d573bb9bcb0fb0f4cd91dd5d728cd1de9d75d..a29f022909e98dbf78c9ba02a5e62515825be23b 100644
--- a/gcc/gcc/config/i386/i386.md
+++ b/gcc/gcc/config/i386/i386.md
@@ -19536,7 +19536,17 @@
(plus:DI (match_dup 3)
(const_int 8)))]
"TARGET_64BIT"
- "movsq"
+{
+ if (TARGET_NACL)
+ {
+ return "movsq %%nacl:(%%rsi),%%nacl:(%%rdi),%%r15"
+ "\nmovl\t%%esi, %%esi\nmovl\t%%edi, %%edi";
+ }
+ else
+ {
+ return "movsq";
+ }
+}
[(set_attr "type" "str")
(set_attr "mode" "DI")
(set_attr "memory" "both")])
@@ -19566,7 +19576,17 @@
(plus:DI (match_dup 3)
(const_int 4)))]
"TARGET_64BIT"
- "movs{l|d}"
+{
+ if (TARGET_NACL)
+ {
+ return "movsl %%nacl:(%%rsi),%%nacl:(%%rdi),%%r15"
+ "\nmovl\t%%esi, %%esi\nmovl\t%%edi, %%edi";
+ }
+ else
+ {
+ return "movs{l|d}";
+ }
+}
[(set_attr "type" "str")
(set_attr "mode" "SI")
(set_attr "memory" "both")])
@@ -19626,7 +19646,17 @@
(plus:DI (match_dup 3)
(const_int 1)))]
"TARGET_64BIT"
- "movsb"
+{
+ if (TARGET_NACL)
+ {
+ return "movsb %%nacl:(%%rsi),%%nacl:(%%rdi),%%r15"
+ "\nmovl\t%%esi, %%esi\nmovl\t%%edi, %%edi";
+ }
+ else
+ {
+ return "movsb";
+ }
+}
[(set_attr "type" "str")
(set_attr "memory" "both")
(set_attr "mode" "QI")])
@@ -19659,8 +19689,7 @@
{
if (TARGET_NACL)
{
- return "movl\t%%esi, %%esi\nleaq\t(%%r15,%%rsi), %%rsi\n"
- "rep movsq (%%rsi),%%nacl:(%%rdi),%%r15"
+ return "rep movsq %%nacl:(%%rsi),%%nacl:(%%rdi),%%r15"
"\nmovl\t%%esi, %%esi\nmovl\t%%edi, %%edi";
}
else
@@ -19708,8 +19737,7 @@
{
if (TARGET_NACL)
{
- return "movl\t%%esi, %%esi\nleaq\t(%%r15,%%rsi), %%rsi\n"
- "rep movs{l|d} (%%rsi),%%nacl:(%%rdi),%%r15"
+ return "rep movs{l|d} %%nacl:(%%rsi),%%nacl:(%%rdi),%%r15"
"\nmovl\t%%esi, %%esi\nmovl\t%%edi, %%edi";
}
else
@@ -19753,8 +19781,7 @@
{
if (TARGET_NACL)
{
- return "movl\t%%esi, %%esi\nleaq\t(%%r15,%%rsi), %%rsi\n"
- "rep movsb (%%rsi),%%nacl:(%%rdi),%%r15"
+ return "rep movsb %%nacl:(%%rsi),%%nacl:(%%rdi),%%r15"
"\nmovl\t%%esi, %%esi\nmovl\t%%edi, %%edi";
}
else
@@ -20207,9 +20234,7 @@
{
if (TARGET_NACL)
{
- return "movl\t%%esi, %%esi\nleaq\t(%%r15,%%rsi), %%rsi\n"
- "movl\t%%edi, %%edi\nleaq\t(%%r15,%%rdi), %%rdi\n"
- "repz cmpsb"
+ return "repz cmpsb %%nacl:(%%rsi),%%nacl:(%%rdi),%%r15"
"\nmovl\t%%esi, %%esi\nmovl\t%%edi, %%edi";
}
else
@@ -20272,9 +20297,7 @@
{
if (TARGET_NACL)
{
- return "movl\t%%esi, %%esi\nleaq\t(%%r15,%%rsi), %%rsi\n"
- "movl\t%%edi, %%edi\nleaq\t(%%r15,%%rdi), %%rdi\n"
- "repz cmpsb"
+ return "repz cmpsb %%nacl:(%%rsi),%%nacl:(%%rdi),%%r15"
"\nmovl\t%%esi, %%esi\nmovl\t%%edi, %%edi";
}
else
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698