Re: [fpc-devel] fpc bug with M1

2021-12-31 Thread Florian Klämpfl via fpc-devel


> Am 30.12.2021 um 21:07 schrieb Jonas Maebe via fpc-devel 
> :
> 
> On 30/12/2021 21:03, Florian Klämpfl via fpc-devel wrote:
>>> Am 30.12.2021 um 20:57 schrieb Jonas Maebe via fpc-devel 
>>> :
>>> 
>>> On 30/12/2021 20:55, Martin Frb via fpc-devel wrote:
 On 30/12/2021 20:46, Jonas Maebe via fpc-devel wrote:
> On 30/12/2021 18:06, Florian Klämpfl via fpc-devel wrote:
>> 
>> Ah yes, or like this. Nevertheless, the question is whether the ldrsb 
>> w0,[x0] is correct or not.
> 
> Yes, I was unclear: with the "I don't know/remember where this is done" I 
> meant "changing the load of the unsigned byte type into a signed load". I 
> can't think immediately of a reason either why this is done.
 "unsigned byte"? The pointer in the pascal code is a pint8 => signed.
>>> 
>>> Oh, I thought it was puint8. Then it makes sense. 
>>> c90616944d3bde7b36e924d27a0790195d61f95c applies both to OS_8 and OS_S8.
>> Yes, but the question is: if we load a shortint into a register, do we need 
>> to sign extend it to 32/64 bit or not? I tend more and more to say that we 
>> shouldn’t require this.
>> Neither clang nor gcc seem to expect this for arguments/return values: 
>> https://godbolt.org/z/sv5fPP6GM
> 
> This is not related to arguments/return values.

Yes and no.

Gcc compiles

unsigned char f(int i)
{
return i;
}

into a single ret.

This means, that we cannot assume that the upper part of registers is cleared. 
Of course, we could limit this to function calls but I guess doing it 
consistently is easier to handle.

> We do the same on on PPC, and afaik on all architectures that don't have 8/16 
> bit subregisters. I initially did it on PPC because it simplified code 
> generation a lot and solved all kinds of small issues I got otherwise because 
> non-cleared higher parts of registers were used. Maybe with our current code 
> generators it would work better.
> 
> 
> Jonas
> ___
> fpc-devel maillist  -  fpc-devel@lists.freepascal.org 
> 
> https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel 
> 
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel


Re: [fpc-devel] Assembler file option (-a)

2021-12-31 Thread Sven Barth via fpc-devel
Christo Crause via fpc-devel  schrieb am
Fr., 31. Dez. 2021, 16:58:

> On Fri, Dec 31, 2021 at 4:41 PM Marco Borsari via fpc-devel <
> fpc-devel@lists.freepascal.org> wrote:
>
>> Hi,
>> on Linux with FPC 3.2.2 the executable size of programs compiled with
>> fpc -On -a (tried with n 2 or 4)
>> is smaller than when the assembler files are deleted (-a omitted).
>> Does it is an expected behaviour?
>>
>
> Using any of the -a options (not sure about -a5?) to output assembly also
> automatically switches to an external linker (for targets with internal
> linkers).  Differences in the executables are thus attributable to
> differences in generated output between the internal and external linkers.
>

The internal ELF linker isn't enabled by default.

But using -a switches to the external assembler instead of the internal one
and there the same point holds true that slightly different binary files
are generated.

Regards,
Sven

>
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel


Re: [fpc-devel] Lazarus server back online

2021-12-31 Thread Bart via fpc-devel
From the forum discussion:

https://www.simplemachines.org/community/index.php?topic=580033.0

Could be related to the following fix
September 2021
---
! Fix handling 2x-encoded entities in $ent_check/$smcFunc['htmlspecialchars']
from the changelog
(https://download.simplemachines.org/index.php?thanks;filename=smf_2-0-19_changelog.txt)



-- 
Bart
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel


Re: [fpc-devel] Assembler file option (-a)

2021-12-31 Thread Marco Borsari via fpc-devel
Il giorno ven, 31/12/2021 alle 17.32 +0200, Christo Crause ha scritto:
> On Fri, Dec 31, 2021 at 4:41 PM Marco Borsari via fpc-devel
>  wrote:
> > Hi,
> > on Linux with FPC 3.2.2 the executable size of programs compiled
> > with
> > fpc -On -a (tried with n 2 or 4)
> > is smaller than when the assembler files are deleted (-a omitted).
> > Does it is an expected behaviour?
> > 
> 
> 
> Using any of the -a options (not sure about -a5?) to output assembly
> also automatically switches to an external linker (for targets with
> internal linkers).  Differences in the executables are thus
> attributable to differences in generated output between the internal
> and external linkers.

Thank you for the clarification
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel


Re: [fpc-devel] Assembler file option (-a)

2021-12-31 Thread Christo Crause via fpc-devel
On Fri, Dec 31, 2021 at 4:41 PM Marco Borsari via fpc-devel <
fpc-devel@lists.freepascal.org> wrote:

> Hi,
> on Linux with FPC 3.2.2 the executable size of programs compiled with
> fpc -On -a (tried with n 2 or 4)
> is smaller than when the assembler files are deleted (-a omitted).
> Does it is an expected behaviour?
>

Using any of the -a options (not sure about -a5?) to output assembly also
automatically switches to an external linker (for targets with internal
linkers).  Differences in the executables are thus attributable to
differences in generated output between the internal and external linkers.
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel


[fpc-devel] Assembler file option (-a)

2021-12-31 Thread Marco Borsari via fpc-devel
Hi,
on Linux with FPC 3.2.2 the executable size of programs compiled with
fpc -On -a (tried with n 2 or 4)
is smaller than when the assembler files are deleted (-a omitted).
Does it is an expected behaviour?
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel


Re: [fpc-devel] Lazarus server back online

2021-12-31 Thread Martin Frb via fpc-devel

On 31/12/2021 15:00, Werner Pamler via fpc-devel wrote:
https://forum.lazarus.freepascal.org/index.php/topic,57621.msg428799.html#msg428799 
--> the issue occured already on Dec 24.


https://forum.lazarus.freepascal.org/index.php/topic,57611.msg428693.html#msg428693 
--> the issue did not yet exist on Dec 23.



I am sure Marc will catch up asap...
Until then, from the log:
Installed new package: "SMF 2.0.19 Update", version 1.0 December 24, 
2021, 09:50:04 am


___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel


Re: [fpc-devel] Lazarus server back online

2021-12-31 Thread Werner Pamler via fpc-devel
https://forum.lazarus.freepascal.org/index.php/topic,57621.msg428799.html#msg428799 
--> the issue occured already on Dec 24.


https://forum.lazarus.freepascal.org/index.php/topic,57611.msg428693.html#msg428693 
--> the issue did not yet exist on Dec 23.


___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel


Re: [fpc-devel] Lazarus server back online

2021-12-31 Thread Martin Frb via fpc-devel

On 31/12/2021 13:35, Bart via fpc-devel wrote:

On Fri, Dec 31, 2021 at 8:49 AM Marc Weustink via fpc-devel
  wrote:

Somebody on the forum said it happened before the server upgrade.


It may well be the case.

Old posts like 
https://forum.lazarus.freepascal.org/index.php/topic,44985.msg317072.html#msg317072 
 
show the quotes correct.

(You need to scroll the code block a bit).

So something may have changed to how new posts are stored___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel


Re: [fpc-devel] Lazarus server back online

2021-12-31 Thread Bart via fpc-devel
On Fri, Dec 31, 2021 at 8:49 AM Marc Weustink via fpc-devel
 wrote:

Somebody on the forum said it happened before the server upgrade.

-- 
Bart
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel