[prev in list] [next in list] [prev in thread] [next in thread]
List: mythtv-dev
Subject: Re: [mythtv] dynamic_cast generated code
From: Mark Spieth <mark () digivation ! com ! au>
Date: 2020-01-27 22:54:37
Message-ID: 15ca311e-5caa-e85a-e36a-fe7f16901fc1 () digivation ! com ! au
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
On 28/01/2020 9:24 am, Peter Bennett wrote:
> Hi Mark
>
> Does this help?
> It calls a function __dynamic_cast and puts the result in sp #120
> which must be the location of dce. I can't see what __dynamic_cast is
> doing.
>
> Peter
>
> _the source_
>
> 795 void StandardSettingDialog::customEvent(QEvent *event)
> 796 {
> 797 if (event->type() == DialogCompletionEvent::kEventType)
> 798 {
> 799 auto dce = dynamic_cast<DialogCompletionEvent*>(event);
> 800 if (dce == nullptr)
> 801 return;
>
> _the assembler from -S option_
>
> .text
> .globl _ZN21StandardSettingDialog11customEventEP6QEvent // --
> Begin function _ZN21StandardSettingDialog11customEventEP6QEvent
> .p2align 2
> .type _ZN21StandardSettingDialog11customEventEP6QEvent,@function
> _ZN21StandardSettingDialog11customEventEP6QEvent: //
> @_ZN21StandardSettingDialog11customEventEP6QEvent
> .Lfunc_begin167:
> .loc 68 796 0 is_stmt 1 // standardsettings.cpp:796:0
> .cfi_startproc
> .cfi_personality 156, DW.ref.__gxx_personality_v0
> .cfi_lsda 28, .Lexception51
> // %bb.0:
> sub sp, sp, #192 // =192
> str x30, [sp, #176] // 8-byte Folded Spill
> .cfi_def_cfa_offset 192
> .cfi_offset w30, -16
> mrs x8, TPIDR_EL0
> ldr x8, [x8, #40]
> str x8, [sp, #168]
> str x0, [sp, #136]
> str x1, [sp, #128]
> ldr x8, [sp, #136]
> .Ltmp2139:
> .loc 68 797 9 prologue_end // standardsettings.cpp:797:9
> ldr x0, [sp, #128]
> str x8, [sp, #72] // 8-byte Folded Spill
> .loc 68 797 16 is_stmt 0 // standardsettings.cpp:797:16
> bl _ZNK6QEvent4typeEv
> .loc 68 797 26 // standardsettings.cpp:797:26
> adrp x8, :got:_ZN21DialogCompletionEvent10kEventTypeE
> ldr x8, [x8,
> :got_lo12:_ZN21DialogCompletionEvent10kEventTypeE]
> ldr w9, [x8]
> .Ltmp2140:
> .loc 68 797 9 // standardsettings.cpp:797:9
> subs w9, w0, w9
> b.ne .LBB167_42
> b .LBB167_1
> .LBB167_1:
> .Ltmp2141:
> .loc 68 799 57 is_stmt 1 // standardsettings.cpp:799:57
> ldr x8, [sp, #128]
> mov x0, x8
> str x0, [sp, #64] // 8-byte Folded Spill
> .loc 68 799 20 is_stmt 0 // standardsettings.cpp:799:20
> cbz x8, .LBB167_3
> b .LBB167_2
> .LBB167_2:
> adrp x1, :got:_ZTI6QEvent
> ldr x1, [x1, :got_lo12:_ZTI6QEvent]
> adrp x2, :got:_ZTI21DialogCompletionEvent
> ldr x2, [x2, :got_lo12:_ZTI21DialogCompletionEvent]
> mov x0, xzr
> ldr x3, [sp, #64] // 8-byte Folded Reload
> str x0, [sp, #56] // 8-byte Folded Spill
> mov x0, x3
> ldr x3, [sp, #56] // 8-byte Folded Reload
> bl __dynamic_cast
> str x0, [sp, #48] // 8-byte Folded Spill
> b .LBB167_4
> .LBB167_3:
> .loc 68 0 20 // standardsettings.cpp:0:20
> mov x0, xzr
> str x0, [sp, #48] // 8-byte Folded Spill
> .loc 68 799 20 // standardsettings.cpp:799:20
> b .LBB167_4
> .LBB167_4:
> .loc 68 0 20 // standardsettings.cpp:0:20
> ldr x8, [sp, #48] // 8-byte Folded Reload
> .loc 68 799 14 // standardsettings.cpp:799:14
> str x8, [sp, #120]
> .Ltmp2142:
> .loc 68 800 13 is_stmt 1 // standardsettings.cpp:800:13
> ldr x8, [sp, #120]
> .Ltmp2143:
> .loc 68 800 13 is_stmt 0 // standardsettings.cpp:800:13
> cbnz x8, .LBB167_6
> b .LBB167_5
> .LBB167_5:
> .Ltmp2144:
>
Thats not very enlightening except that it does call it.
Its probably provided in shared-c++.so.
The problem is probably in Qt then and the way it links with our stuff.
Mark
[Attachment #5 (text/html)]
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p><br>
</p>
<div class="moz-cite-prefix">On 28/01/2020 9:24 am, Peter Bennett
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:2d0f7649-7cf4-d8d1-004e-ff0667c4ad90@gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
Hi Mark<br>
<br>
Does this help?<br>
It calls a function __dynamic_cast and puts the result in sp #120
which must be the location of dce. I can't see what __dynamic_cast
is doing.<br>
<br>
Peter<br>
<br>
<u>the source</u><br>
<br>
795 void StandardSettingDialog::customEvent(QEvent *event)<br>
796 {<br>
797 if (event->type() == DialogCompletionEvent::kEventType)<br>
798 {<br>
799 auto dce =
dynamic_cast<DialogCompletionEvent*>(event);<br>
800 if (dce == nullptr)<br>
801 return;<br>
<br>
<u>the assembler from -S option</u><br>
<br>
.text<br>
.globl _ZN21StandardSettingDialog11customEventEP6QEvent
// -- Begin function
_ZN21StandardSettingDialog11customEventEP6QEvent<br>
.p2align 2<br>
.type
_ZN21StandardSettingDialog11customEventEP6QEvent,@function<br>
_ZN21StandardSettingDialog11customEventEP6QEvent: //
@_ZN21StandardSettingDialog11customEventEP6QEvent<br>
.Lfunc_begin167:<br>
.loc 68 796 0 is_stmt 1 //
standardsettings.cpp:796:0<br>
.cfi_startproc<br>
.cfi_personality 156, DW.ref.__gxx_personality_v0<br>
.cfi_lsda 28, .Lexception51<br>
// %bb.0:<br>
sub sp, sp, #192 // =192<br>
str x30, [sp, #176] // 8-byte Folded Spill<br>
.cfi_def_cfa_offset 192<br>
.cfi_offset w30, -16<br>
mrs x8, TPIDR_EL0<br>
ldr x8, [x8, #40]<br>
str x8, [sp, #168]<br>
str x0, [sp, #136]<br>
str x1, [sp, #128]<br>
ldr x8, [sp, #136]<br>
.Ltmp2139:<br>
.loc 68 797 9 prologue_end //
standardsettings.cpp:797:9<br>
ldr x0, [sp, #128]<br>
str x8, [sp, #72] // 8-byte Folded Spill<br>
.loc 68 797 16 is_stmt 0 //
standardsettings.cpp:797:16<br>
bl _ZNK6QEvent4typeEv<br>
.loc 68 797 26 //
standardsettings.cpp:797:26<br>
adrp x8, :got:_ZN21DialogCompletionEvent10kEventTypeE<br>
ldr x8, [x8,
:got_lo12:_ZN21DialogCompletionEvent10kEventTypeE]<br>
ldr w9, [x8]<br>
.Ltmp2140:<br>
.loc 68 797 9 //
standardsettings.cpp:797:9<br>
subs w9, w0, w9<br>
b.ne .LBB167_42<br>
b .LBB167_1<br>
.LBB167_1:<br>
.Ltmp2141:<br>
.loc 68 799 57 is_stmt 1 //
standardsettings.cpp:799:57<br>
ldr x8, [sp, #128]<br>
mov x0, x8<br>
str x0, [sp, #64] // 8-byte Folded Spill<br>
.loc 68 799 20 is_stmt 0 //
standardsettings.cpp:799:20<br>
cbz x8, .LBB167_3<br>
b .LBB167_2<br>
.LBB167_2:<br>
adrp x1, :got:_ZTI6QEvent<br>
ldr x1, [x1, :got_lo12:_ZTI6QEvent]<br>
adrp x2, :got:_ZTI21DialogCompletionEvent<br>
ldr x2, [x2, :got_lo12:_ZTI21DialogCompletionEvent]<br>
mov x0, xzr<br>
ldr x3, [sp, #64] // 8-byte Folded Reload<br>
str x0, [sp, #56] // 8-byte Folded Spill<br>
mov x0, x3<br>
ldr x3, [sp, #56] // 8-byte Folded Reload<br>
bl __dynamic_cast<br>
str x0, [sp, #48] // 8-byte Folded Spill<br>
b .LBB167_4<br>
.LBB167_3:<br>
.loc 68 0 20 //
standardsettings.cpp:0:20<br>
mov x0, xzr<br>
str x0, [sp, #48] // 8-byte Folded Spill<br>
.loc 68 799 20 //
standardsettings.cpp:799:20<br>
b .LBB167_4<br>
.LBB167_4:<br>
.loc 68 0 20 //
standardsettings.cpp:0:20<br>
ldr x8, [sp, #48] // 8-byte Folded Reload<br>
.loc 68 799 14 //
standardsettings.cpp:799:14<br>
str x8, [sp, #120]<br>
.Ltmp2142:<br>
.loc 68 800 13 is_stmt 1 //
standardsettings.cpp:800:13<br>
ldr x8, [sp, #120]<br>
.Ltmp2143:<br>
.loc 68 800 13 is_stmt 0 //
standardsettings.cpp:800:13<br>
cbnz x8, .LBB167_6<br>
b .LBB167_5<br>
.LBB167_5:<br>
.Ltmp2144:<br>
<br>
</blockquote>
<p>Thats not very enlightening except that it does call it. <br>
</p>
<p>Its probably provided in shared-c++.so.</p>
<p>The problem is probably in Qt then and the way it links with our
stuff.</p>
<p>Mark<br>
</p>
</body>
</html>
_______________________________________________
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-dev
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic