<HTML>
<div><style> BODY { font-family:Arial, Helvetica, sans-serif;font-size:12px; }</style>I would have allowed writing to the stack with inline assembly functions
if a way could be found to ensure that the compiled program behaves the
same way whether the function is inlined or called directly (e.g.
through a direct CALL or a function pointer), which would otherwise
require shifting byte offsets depending on if the function return
address was pushed or not, so I decided to just forbid it completely.<br>
<br>
If you want to inline regular functions with assembler blocks, you'll need the attached bug fixes. The rest I'll leave up to you.</div><div><br>
</div><div>What is Florian's and your vision for Free Pascal? You already have a cross-platform Object Pascal compiler... what's next for it? Does any of my proposals even have a place in that vision, because honestly I don't know if the following is wanted:<br>
<br>
- pure functions<br>
- XML node dump (compiler debugging feature) - I personally need it for pure functions and for fixing #32913.<br>
- faster and smarter optimization on x86-64<br>
<br>
Gareth aka. Kit<br>
</div><br>
<br>
<br>
<span style="font-weight: bold;">On Tue 19/03/19 08:04 , Jonas Maebe jonas@freepascal.org sent:<br>
</span><blockquote style="BORDER-LEFT: #F5F5F5 2px solid; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px; PADDING-LEFT: 5px; PADDING-RIGHT: 0px">On 2019-03-18 23:41, J. Gareth Moreton wrote:
<br>
<br>
<span style="color: rgb(102, 102, 102);">> I guess there's no place for me here. I don't have the facilities or
</span><br>
<span style="color: rgb(102, 102, 102);">> knowledge to develop beyond i386 and x86_64, and there's too much
</span><br>
<span style="color: rgb(102, 102, 102);">> conflict. You win. What am I but a rowdy tyke who doesn't listen to
</span><br>
<span style="color: rgb(102, 102, 102);">> his elders and betters?
</span><br>
<br>
I don't consider myself to be better than you, and you giving up is not
<br>
me "winning". You also don't need to develop beyond i386/x86-64, but you
<br>
do have to take into account that they exist. This means that unless a
<br>
feature is inherently specific to a particular platform, it has to be
<br>
generalisable and can be made to function in a predictable way
<br>
everywhere (within the bounds of defined behaviour; what that is, is
<br>
defined by the implementer of the functionality, but it should be
<br>
possible to specify it and preferably with not too many rules, so it can
<br>
be understood easily by users and other platform maintainers alike).
<br>
<br>
That is not possible for parsing and trying to understand inline
<br>
assembly using automated means. It is very fragile, which makes
<br>
specifying the defined behaviour very hard. It needs a ton of
<br>
exceptions, many of which will be platform specific, which makes its
<br>
functionality unpredictable.
<br>
<br>
<span style="color: rgb(102, 102, 102);">> I guess I don't understand the philosophy of FPC after all, or can even
</span><br>
<span style="color: rgb(102, 102, 102);">> program well.
</span><br>
<br>
This is not about your programming skills, those are quite good. It is,
<br>
however, indeed very much about FPC's philosophy. That said, this
<br>
particular feature is something that at least most other compilers (even
<br>
for other languages) don't implement either, afaik. Most of them even
<br>
don't support defining pure assembler functions inside the host
<br>
language's source file, and require you to use external assembler files.
<br>
They do allow you to inline regular functions that contain inline
<br>
assembly though.
<br>
<br>
<br>
Jonas
<br>
_______________________________________________
<br>
fpc-devel maillist - <a href="mailto:fpc-devel@lists.freepascal.org">fpc-devel@lists.freepascal.org</a>
<br>
<a target="_blank" href="<a href="http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel">http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel</a>"><span style="color: red;">http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel</span></a>
<br>
<br>
<br>
</blockquote></HTML>