From: Simon Wright <simon@pushface.org>
Subject: Re: avoiding builtin memset
Date: Wed, 26 Apr 2017 16:22:34 +0100
Date: 2017-04-26T16:22:34+01:00 [thread overview]
Message-ID: <ly1ssf6vnp.fsf@pushface.org> (raw)
In-Reply-To: 6bff1b83-68c0-4faa-a2db-03df1dd2a108@googlegroups.com
Lucretia <laguest9000@googlemail.com> writes:
> On Wednesday, 26 April 2017 08:35:05 UTC+1, Simon Wright wrote:
>> Luke A. Guest <me@me.com> writes:
>>
>> > Shark8 <onewingedshark@> wrote:
>> >
>> >>> You'll need to export that as the C memset function.
>> >>
>> >> Even if you're only using it in Ada functions?
>> >
>> >
>> > Yup, GNAT expects certain functions to be present and generates calls
>> > to them. Check system.ads for mention of allowing assignment, that
>> > basically calls memcpy on assignment for objects that require a memory
>> > copy rather than a register to register copy.
>>
>> Not quite sure this is set in system.ads: in the 6.1 sources, the only
>> reference to memset in the compiler itself is in exp_aggr.adb,
>
> See Support_Composite_Assign and the comment inside targparm.ads:
>
> -- The assignment of composite objects other than small records and
> -- arrays whose size is 64-bits or less and is set by an explicit
> -- size clause may generate calls to memcpy, memmove, and bcopy.
> -- If versions of all these routines are available, then this flag
> -- is set to True. If any of these routines is not available, then
> -- the flag is set False, and composite assignments are not allowed.
Oh, I was only looking in targparm.adb.
next prev parent reply other threads:[~2017-04-26 15:22 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-24 16:06 avoiding builtin memset Jere
2017-04-24 16:56 ` Shark8
2017-04-25 1:21 ` Anh Vo
2017-04-25 2:57 ` Luke A. Guest
2017-04-25 18:43 ` Shark8
2017-04-25 22:18 ` Luke A. Guest
2017-04-26 7:35 ` Simon Wright
2017-04-26 13:44 ` Lucretia
2017-04-26 15:22 ` Simon Wright [this message]
2017-04-27 0:22 ` Jere
2017-04-27 4:35 ` J-P. Rosen
2017-04-27 7:09 ` Simon Wright
2017-05-24 15:08 ` Frédéric PRACA
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox