Make sure 32-bit loads into 64-bit registers are sign-extended.
authorDavid Anderson <danderson@mozilla.com>
Thu, 04 Sep 2008 18:32:00 -0700
changeset 19048 42478867792fc408be952eafdd2bea0c360c2ae5
parent 19044 badf4c84665f9e10b7ddb460eb6b6daa29099ec9
child 19049 f9e142284a5be1ceadc4c50238278fe8df989d43
push id1930
push usermrbkap@mozilla.com
push dateWed, 10 Sep 2008 06:40:47 +0000
treeherderautoland@ee61af1469cd [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
milestone1.9.1b1pre
Make sure 32-bit loads into 64-bit registers are sign-extended.
js/src/nanojit/NativeAMD64.h
--- a/js/src/nanojit/NativeAMD64.h
+++ b/js/src/nanojit/NativeAMD64.h
@@ -754,18 +754,17 @@ namespace nanojit
 	} while(0)
 
 
 #define LDi(r,i) do { 											\
 	underrunProtect(6);											\
 	IMM32(i);													\
 	*(--_nIns) = AMD64_MODRM_REG(0, r);							\
 	*(--_nIns) = AMD64_MOV_RM_IMM;								\
-	if (AMD64_NEEDS_REX(r))										\
-		*(--_nIns) = AMD64_REX(0,0,r);							\
+	*(--_nIns) = AMD64_REX(1,0,r);							    \
 	asm_output2("mov %s,%d",gpn(r),i);							\
 	} while (0)
 
 
 #define LDQi(r,i) do {											\
 	underrunProtect(10);										\
 	IMM64(i);													\
 	*(--_nIns) = AMD64_MOV_REG_IMM(r);							\