X86: Take address size into account when computing an effective address.
authorGabe Black <gblack@eecs.umich.edu>
Fri, 27 Feb 2009 17:25:16 +0000 (09:25 -0800)
committerGabe Black <gblack@eecs.umich.edu>
Fri, 27 Feb 2009 17:25:16 +0000 (09:25 -0800)
src/arch/x86/isa/microops/ldstop.isa

index 834b3947fb570e86f7974953b5f784a3982ea86a..af94cf31e26f174b83550cd7b6464a70d37a6127 100644 (file)
@@ -402,7 +402,9 @@ let {{
     decoder_output = ""
     exec_output = ""
 
-    calculateEA = "EA = SegBase + scale * Index + Base + disp;"
+    calculateEA = '''
+    EA = bits(SegBase + scale * Index + Base + disp, addressSize * 8 - 1, 0);
+    '''
 
     def defineMicroLoadOp(mnemonic, code, mem_flags="0"):
         global header_output