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") |