[Libre-soc-dev] strncpy

Jacob Lifshay programmerjake at gmail.com
Tue Oct 11 19:28:35 BST 2022


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, the code you wrote just leaves it uninitialized.
https://en.cppreference.com/w/c/string/byte/strncpy

2. did you mean to put everything in the ldst-postinc branch but not in
master?

Jacob

>


More information about the Libre-soc-dev mailing list