src/cpu/x86/vm/dump_x86_32.cpp

changeset 739
dc7f315e41f7
parent 435
a61af66fc99e
child 772
9ee9cf798b59
     1.1 --- a/src/cpu/x86/vm/dump_x86_32.cpp	Tue Aug 26 15:49:40 2008 -0700
     1.2 +++ b/src/cpu/x86/vm/dump_x86_32.cpp	Wed Aug 27 00:21:55 2008 -0700
     1.3 @@ -98,24 +98,24 @@
     1.4    // table.
     1.5  
     1.6  #ifdef WIN32
     1.7 -  __ pushl(rcx);                        // save "this"
     1.8 +  __ push(rcx);                         // save "this"
     1.9  #endif
    1.10 -  __ movl(rcx, rax);
    1.11 -  __ shrl(rcx, 8);                      // isolate vtable identifier.
    1.12 -  __ shll(rcx, LogBytesPerWord);
    1.13 +  __ mov(rcx, rax);
    1.14 +  __ shrptr(rcx, 8);                    // isolate vtable identifier.
    1.15 +  __ shlptr(rcx, LogBytesPerWord);
    1.16    Address index(noreg, rcx,  Address::times_1);
    1.17    ExternalAddress vtbl((address)vtbl_list);
    1.18    __ movptr(rdx, ArrayAddress(vtbl, index)); // get correct vtable address.
    1.19  #ifdef WIN32
    1.20 -  __ popl(rcx);                         // restore "this"
    1.21 +  __ pop(rcx);                          // restore "this"
    1.22  #else
    1.23 -  __ movl(rcx, Address(rsp, 4));        // fetch "this"
    1.24 +  __ movptr(rcx, Address(rsp, BytesPerWord));   // fetch "this"
    1.25  #endif
    1.26 -  __ movl(Address(rcx, 0), rdx);        // update vtable pointer.
    1.27 +  __ movptr(Address(rcx, 0), rdx);      // update vtable pointer.
    1.28  
    1.29 -  __ andl(rax, 0x00ff);                 // isolate vtable method index
    1.30 -  __ shll(rax, LogBytesPerWord);
    1.31 -  __ addl(rax, rdx);                    // address of real method pointer.
    1.32 +  __ andptr(rax, 0x00ff);                       // isolate vtable method index
    1.33 +  __ shlptr(rax, LogBytesPerWord);
    1.34 +  __ addptr(rax, rdx);                  // address of real method pointer.
    1.35    __ jmp(Address(rax, 0));              // get real method pointer.
    1.36  
    1.37    __ flush();

mercurial