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

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

Issue 10386087: Replace rip lea with eip (Closed) Base URL: http://git.chromium.org/native_client/nacl-gcc.git@master
Patch Set: remove [gcc] prefix Created 8 years, 7 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 | « gcc/config/i386/i386.c ('k') | gcc/config/i386/i386-protos.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gcc/config/i386/i386.md
diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md
index 8dc1bdde0c8f1285b4ac072bceec79f67f0c0fe5..6429360bb9de1ac243ec95f6da95411d58219418 100644
--- a/gcc/config/i386/i386.md
+++ b/gcc/config/i386/i386.md
@@ -2415,6 +2415,8 @@
return "#";
case TYPE_LEA:
+ if (nacl_address_uses_special_registers (operands[1]))
+ return "lea{l}\t{%a1, %k0|%k0, %a1}";
return "lea{q}\t{%a1, %0|%0, %a1}";
default:
@@ -6008,20 +6010,8 @@
(match_operand:DI 1 "lea_address_operand" "T"))]
"TARGET_64BIT"
{
- if (TARGET_NACL)
- {
- struct ix86_address parts;
- int ok;
-
- ok = ix86_lea_decompose_address (operands[1], &parts);
- gcc_assert (ok);
-
- if (parts.base)
- {
- if (REGNO (parts.base) == SP_REG || REGNO (parts.base) == BP_REG)
- return "lea{l}\t{%Z1, %k0|%k0, %Z1}";
- }
- }
+ if (nacl_address_uses_special_registers (operands[1]))
+ return "lea{l}\t{%Z1, %k0|%k0, %Z1}";
return "lea{q}\t{%Z1, %0|%0, %Z1}";
}
[(set_attr "type" "lea")
« no previous file with comments | « gcc/config/i386/i386.c ('k') | gcc/config/i386/i386-protos.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698