Comment #19 on issue 615 by [email protected]: "instanceof" operator broken
on x64
http://code.google.com/p/v8/issues/detail?id=615
It seems impossible for the source code to produce the generated code
shown, unless
there is a compiler bug. So I would like to look at the code that
generates the
InstanceofStub stub. Could I get a copy of the disassembly of
InstanceofStub::Generate? I am especially interested in the lines around
address
300, calling the CmpObjectType function. The disassembly I got has the line
<_ZN2v88internal14InstanceofStub8GenerateEPNS0_14MacroAssemblerE+287>: mov
0x318103(%rip),%ecx # 0x81e808 <_ZN2v88internal16kScratchRegisterE>
which loads the correct register, r10, rather than the rax.
You would do this by entering gdb, with the command
gdb shell
and typing:
(gdb)
disass 'v8::internal::InstanceofStub::Generate(v8::internal::MacroAssembler*)'
Here is what I got, and the lines at addresses 287 through 300 generate the
code that
is different on your two builds.
Dump of assembler code for function
_ZN2v88internal14InstanceofStub8GenerateEPNS0_14MacroAssemblerE:
0x00000000005065e0
<_ZN2v88internal14InstanceofStub8GenerateEPNS0_14MacroAssemblerE+0>:
push %r15
0x00000000005065e2
<_ZN2v88internal14InstanceofStub8GenerateEPNS0_14MacroAssemblerE+2>: mov
$0x10,%edx
0x00000000005065e7
<_ZN2v88internal14InstanceofStub8GenerateEPNS0_14MacroAssemblerE+7>:
push %r14
0x00000000005065e9
<_ZN2v88internal14InstanceofStub8GenerateEPNS0_14MacroAssemblerE+9>:
push %r13
0x00000000005065eb
<_ZN2v88internal14InstanceofStub8GenerateEPNS0_14MacroAssemblerE+11>:
push %r12
...
0x00000000005066f4
<_ZN2v88internal14InstanceofStub8GenerateEPNS0_14MacroAssemblerE+276>: mov
%r13,%rdx
0x00000000005066f7
<_ZN2v88internal14InstanceofStub8GenerateEPNS0_14MacroAssemblerE+279>: mov
%rbx,%rdi
0x00000000005066fa
<_ZN2v88internal14InstanceofStub8GenerateEPNS0_14MacroAssemblerE+282>: callq
0x529e80
<_ZN2v88internal14MacroAssembler9JumpIfSmiENS0_8RegisterEPNS0_5LabelE>
0x00000000005066ff
<_ZN2v88internal14InstanceofStub8GenerateEPNS0_14MacroAssemblerE+287>: mov
0x318103(%rip),%ecx # 0x81e808 <_ZN2v88internal16kScratchRegisterE>
---Type <return> to continue, or q <return> to quit---
0x0000000000506705
<_ZN2v88internal14InstanceofStub8GenerateEPNS0_14MacroAssemblerE+293>: mov
0x303f0d(%rip),%esi # 0x80a618 <_ZN2v88internal3rbxE>
0x000000000050670b
<_ZN2v88internal14InstanceofStub8GenerateEPNS0_14MacroAssemblerE+299>: mov
$0x9d,%edx
0x0000000000506710
<_ZN2v88internal14InstanceofStub8GenerateEPNS0_14MacroAssemblerE+304>: mov
%rbx,%rdi
0x0000000000506713
<_ZN2v88internal14InstanceofStub8GenerateEPNS0_14MacroAssemblerE+307>: callq
0x52a960
<_ZN2v88internal14MacroAssembler13CmpObjectTypeENS0_8RegisterENS0_12InstanceTypeES2_>
0x0000000000506718
<_ZN2v88internal14InstanceofStub8GenerateEPNS0_14MacroAssemblerE+312>: mov
%r13,%rdx
0x000000000050671b
<_ZN2v88internal14InstanceofStub8GenerateEPNS0_14MacroAssemblerE+315>: mov
$0x2,%esi
0x0000000000506720
<_ZN2v88internal14InstanceofStub8GenerateEPNS0_14MacroAssemblerE+320>: mov
%rbx,%rdi
0x0000000000506723
<_ZN2v88internal14InstanceofStub8GenerateEPNS0_14MacroAssemblerE+323>: callq
0x4f5fb0 <_ZN2v88internal9Assembler1jENS0_9ConditionEPNS0_5LabelE>
--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev