comparison src/cpu/x86/vm/dump_x86_32.cpp @ 304:dc7f315e41f7

5108146: Merge i486 and amd64 cpu directories 6459804: Want client (c1) compiler for x86_64 (amd64) for faster start-up Reviewed-by: kvn
author never
date Wed, 27 Aug 2008 00:21:55 -0700
parents a61af66fc99e
children 9ee9cf798b59
comparison
equal deleted inserted replaced
303:fa4d1d240383 304:dc7f315e41f7
96 96
97 // In addition, rax was set (above) to the offset of the method in the 97 // In addition, rax was set (above) to the offset of the method in the
98 // table. 98 // table.
99 99
100 #ifdef WIN32 100 #ifdef WIN32
101 __ pushl(rcx); // save "this" 101 __ push(rcx); // save "this"
102 #endif 102 #endif
103 __ movl(rcx, rax); 103 __ mov(rcx, rax);
104 __ shrl(rcx, 8); // isolate vtable identifier. 104 __ shrptr(rcx, 8); // isolate vtable identifier.
105 __ shll(rcx, LogBytesPerWord); 105 __ shlptr(rcx, LogBytesPerWord);
106 Address index(noreg, rcx, Address::times_1); 106 Address index(noreg, rcx, Address::times_1);
107 ExternalAddress vtbl((address)vtbl_list); 107 ExternalAddress vtbl((address)vtbl_list);
108 __ movptr(rdx, ArrayAddress(vtbl, index)); // get correct vtable address. 108 __ movptr(rdx, ArrayAddress(vtbl, index)); // get correct vtable address.
109 #ifdef WIN32 109 #ifdef WIN32
110 __ popl(rcx); // restore "this" 110 __ pop(rcx); // restore "this"
111 #else 111 #else
112 __ movl(rcx, Address(rsp, 4)); // fetch "this" 112 __ movptr(rcx, Address(rsp, BytesPerWord)); // fetch "this"
113 #endif 113 #endif
114 __ movl(Address(rcx, 0), rdx); // update vtable pointer. 114 __ movptr(Address(rcx, 0), rdx); // update vtable pointer.
115 115
116 __ andl(rax, 0x00ff); // isolate vtable method index 116 __ andptr(rax, 0x00ff); // isolate vtable method index
117 __ shll(rax, LogBytesPerWord); 117 __ shlptr(rax, LogBytesPerWord);
118 __ addl(rax, rdx); // address of real method pointer. 118 __ addptr(rax, rdx); // address of real method pointer.
119 __ jmp(Address(rax, 0)); // get real method pointer. 119 __ jmp(Address(rax, 0)); // get real method pointer.
120 120
121 __ flush(); 121 __ flush();
122 122
123 *mc_top = (char*)__ pc(); 123 *mc_top = (char*)__ pc();