changeset 2618:381bf869f784

7079626: x64 emits unnecessary REX prefix Reviewed-by: kvn, iveresov, never
author twisti
date Wed, 17 Aug 2011 05:14:43 -0700
parents 1af104d6cf99
children bd87c0dcaba5
files src/cpu/x86/vm/assembler_x86.cpp
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/cpu/x86/vm/assembler_x86.cpp	Tue Aug 16 16:59:46 2011 -0700
+++ b/src/cpu/x86/vm/assembler_x86.cpp	Wed Aug 17 05:14:43 2011 -0700
@@ -3672,7 +3672,7 @@
     } else {
       if (adr.index_needs_rex()) {
         prefix(REX_X);
-      } else if (reg->encoding() >= 4 ) {
+      } else if (byteinst && reg->encoding() >= 4 ) {
         prefix(REX);
       }
     }