[Libre-soc-dev] strncpy
lkcl
luke.leighton at gmail.com
Tue Oct 11 21:01:37 BST 2022
On Tue, Oct 11, 2022 at 7:28 PM Jacob Lifshay <programmerjake at gmail.com> wrote:
>
> On Tue, Oct 11, 2022, 09:55 lkcl via Libre-soc-dev <libre-soc-dev at lists.libre-soc.org> wrote:
>>
>> i did post-increment ld/st, first preliminary draft, created a strncpy
>> as a demo in 6 instructions,
>
>
> https://git.libre-soc.org/?p=openpower-isa.git;a=commitdiff;h=9632be33b1fe4fb0e7892ac466948e4951308ac0
>
>
> 2 issues:
> 1. that strncpy is incorrect, strncpy fills the remainder of the result buffer
> with zeros,
sigh
> the code you wrote just leaves it uninitialized.
> https://en.cppreference.com/w/c/string/byte/strncpy
yes i intended that. it looks like i implemented strncpy_s
> 2. did you mean to put everything in the ldst-postinc branch but not in master?
yes. ghostmansd requested not to make changes to the spec.
l.
More information about the Libre-soc-dev
mailing list