[fpc-devel] OSX: Setting up parameters to objc_msgSend()
David Jenkins
david at scootersoftware.com
Fri Oct 12 16:38:06 CEST 2018
On 10/12/18 8:17 AM, Dmitry Boyarintsev wrote:
>
> So, I'm wondering if it's actually a compiler issue or headers issue.
> and can ByteBool be used as a substitute for signed char.
>
> thanks,
> Dmitry
>
>
> _______________________________________________
> fpc-devel maillist - fpc-devel at lists.freepascal.org
> http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel
Changing the header for NSMenuItem.setEnable(BOOL) to
NSMenuItem(ByteBool) results in the following code in
TCocoaWSmenuITem.setEnable:
0x1001ba67e <+70>: movq %rax, %rbx
0x1001ba681 <+73>: movq 0x329ef8(%rip), %rsi ; "setEnabled:"
0x1001ba688 <+80>: movb -0x10(%rbp), %al
0x1001ba68b <+83>: orb %al, %al
0x1001ba68d <+85>: setne %dl
0x1001ba690 <+88>: negb %dl
0x1001ba692 <+90>: movsbl %dl, %edx
0x1001ba695 <+93>: movq %rbx, %rdi
0x1001ba698 <+96>: callq 0x1002d23da ; symbol stub
for: objc
The movsbl %dl, %edx is good. Unfortunately the value of %edx is
0xffffffff not 0x00000001. This is the same result I saw when I changed
it to LongBool.
David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20181012/297178d5/attachment.html>
More information about the fpc-devel
mailing list