X86: LEA calculates an address before segmentation.
authorGabe Black <gblack@eecs.umich.edu>
Sun, 19 Apr 2009 10:24:51 +0000 (03:24 -0700)
committerGabe Black <gblack@eecs.umich.edu>
Sun, 19 Apr 2009 10:24:51 +0000 (03:24 -0700)
src/arch/x86/isa/microops/ldstop.isa

index af94cf31e26f174b83550cd7b6464a70d37a6127..24ddd0b43ed6514678929eb4803a316f8b1070f5 100644 (file)
@@ -484,7 +484,9 @@ let {{
 
     iop = InstObjParams("lea", "Lea", 'X86ISA::LdStOp',
             {"code": "Data = merge(Data, EA, dataSize);",
-             "ea_code": calculateEA})
+             "ea_code": '''
+             EA = bits(scale * Index + Base + disp, addressSize * 8 - 1, 0);
+             '''})
     header_output += MicroLeaDeclare.subst(iop)
     decoder_output += MicroLdStOpConstructor.subst(iop)
     exec_output += MicroLeaExecute.subst(iop)