162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 262306a36Sopenharmony_ci/* 362306a36Sopenharmony_ci * arch/alpha/lib/stxncpy.S 462306a36Sopenharmony_ci * Contributed by Richard Henderson (rth@tamu.edu) 562306a36Sopenharmony_ci * 662306a36Sopenharmony_ci * Copy no more than COUNT bytes of the null-terminated string from 762306a36Sopenharmony_ci * SRC to DST. 862306a36Sopenharmony_ci * 962306a36Sopenharmony_ci * This is an internal routine used by strncpy, stpncpy, and strncat. 1062306a36Sopenharmony_ci * As such, it uses special linkage conventions to make implementation 1162306a36Sopenharmony_ci * of these public functions more efficient. 1262306a36Sopenharmony_ci * 1362306a36Sopenharmony_ci * On input: 1462306a36Sopenharmony_ci * t9 = return address 1562306a36Sopenharmony_ci * a0 = DST 1662306a36Sopenharmony_ci * a1 = SRC 1762306a36Sopenharmony_ci * a2 = COUNT 1862306a36Sopenharmony_ci * 1962306a36Sopenharmony_ci * Furthermore, COUNT may not be zero. 2062306a36Sopenharmony_ci * 2162306a36Sopenharmony_ci * On output: 2262306a36Sopenharmony_ci * t0 = last word written 2362306a36Sopenharmony_ci * t10 = bitmask (with one bit set) indicating the byte position of 2462306a36Sopenharmony_ci * the end of the range specified by COUNT 2562306a36Sopenharmony_ci * t12 = bitmask (with one bit set) indicating the last byte written 2662306a36Sopenharmony_ci * a0 = unaligned address of the last *word* written 2762306a36Sopenharmony_ci * a2 = the number of full words left in COUNT 2862306a36Sopenharmony_ci * 2962306a36Sopenharmony_ci * Furthermore, v0, a3-a5, t11, and $at are untouched. 3062306a36Sopenharmony_ci */ 3162306a36Sopenharmony_ci 3262306a36Sopenharmony_ci#include <asm/regdef.h> 3362306a36Sopenharmony_ci 3462306a36Sopenharmony_ci .set noat 3562306a36Sopenharmony_ci .set noreorder 3662306a36Sopenharmony_ci 3762306a36Sopenharmony_ci .text 3862306a36Sopenharmony_ci 3962306a36Sopenharmony_ci/* There is a problem with either gdb (as of 4.16) or gas (as of 2.7) that 4062306a36Sopenharmony_ci doesn't like putting the entry point for a procedure somewhere in the 4162306a36Sopenharmony_ci middle of the procedure descriptor. Work around this by putting the 4262306a36Sopenharmony_ci aligned copy in its own procedure descriptor */ 4362306a36Sopenharmony_ci 4462306a36Sopenharmony_ci .ent stxncpy_aligned 4562306a36Sopenharmony_ci .align 3 4662306a36Sopenharmony_cistxncpy_aligned: 4762306a36Sopenharmony_ci .frame sp, 0, t9, 0 4862306a36Sopenharmony_ci .prologue 0 4962306a36Sopenharmony_ci 5062306a36Sopenharmony_ci /* On entry to this basic block: 5162306a36Sopenharmony_ci t0 == the first destination word for masking back in 5262306a36Sopenharmony_ci t1 == the first source word. */ 5362306a36Sopenharmony_ci 5462306a36Sopenharmony_ci /* Create the 1st output word and detect 0's in the 1st input word. */ 5562306a36Sopenharmony_ci lda t2, -1 # e1 : build a mask against false zero 5662306a36Sopenharmony_ci mskqh t2, a1, t2 # e0 : detection in the src word 5762306a36Sopenharmony_ci mskqh t1, a1, t3 # e0 : 5862306a36Sopenharmony_ci ornot t1, t2, t2 # .. e1 : 5962306a36Sopenharmony_ci mskql t0, a1, t0 # e0 : assemble the first output word 6062306a36Sopenharmony_ci cmpbge zero, t2, t8 # .. e1 : bits set iff null found 6162306a36Sopenharmony_ci or t0, t3, t0 # e0 : 6262306a36Sopenharmony_ci beq a2, $a_eoc # .. e1 : 6362306a36Sopenharmony_ci bne t8, $a_eos # .. e1 : 6462306a36Sopenharmony_ci 6562306a36Sopenharmony_ci /* On entry to this basic block: 6662306a36Sopenharmony_ci t0 == a source word not containing a null. */ 6762306a36Sopenharmony_ci 6862306a36Sopenharmony_ci$a_loop: 6962306a36Sopenharmony_ci stq_u t0, 0(a0) # e0 : 7062306a36Sopenharmony_ci addq a0, 8, a0 # .. e1 : 7162306a36Sopenharmony_ci ldq_u t0, 0(a1) # e0 : 7262306a36Sopenharmony_ci addq a1, 8, a1 # .. e1 : 7362306a36Sopenharmony_ci subq a2, 1, a2 # e0 : 7462306a36Sopenharmony_ci cmpbge zero, t0, t8 # .. e1 (stall) 7562306a36Sopenharmony_ci beq a2, $a_eoc # e1 : 7662306a36Sopenharmony_ci beq t8, $a_loop # e1 : 7762306a36Sopenharmony_ci 7862306a36Sopenharmony_ci /* Take care of the final (partial) word store. At this point 7962306a36Sopenharmony_ci the end-of-count bit is set in t8 iff it applies. 8062306a36Sopenharmony_ci 8162306a36Sopenharmony_ci On entry to this basic block we have: 8262306a36Sopenharmony_ci t0 == the source word containing the null 8362306a36Sopenharmony_ci t8 == the cmpbge mask that found it. */ 8462306a36Sopenharmony_ci 8562306a36Sopenharmony_ci$a_eos: 8662306a36Sopenharmony_ci negq t8, t12 # e0 : find low bit set 8762306a36Sopenharmony_ci and t8, t12, t12 # e1 (stall) 8862306a36Sopenharmony_ci 8962306a36Sopenharmony_ci /* For the sake of the cache, don't read a destination word 9062306a36Sopenharmony_ci if we're not going to need it. */ 9162306a36Sopenharmony_ci and t12, 0x80, t6 # e0 : 9262306a36Sopenharmony_ci bne t6, 1f # .. e1 (zdb) 9362306a36Sopenharmony_ci 9462306a36Sopenharmony_ci /* We're doing a partial word store and so need to combine 9562306a36Sopenharmony_ci our source and original destination words. */ 9662306a36Sopenharmony_ci ldq_u t1, 0(a0) # e0 : 9762306a36Sopenharmony_ci subq t12, 1, t6 # .. e1 : 9862306a36Sopenharmony_ci or t12, t6, t8 # e0 : 9962306a36Sopenharmony_ci unop # 10062306a36Sopenharmony_ci zapnot t0, t8, t0 # e0 : clear src bytes > null 10162306a36Sopenharmony_ci zap t1, t8, t1 # .. e1 : clear dst bytes <= null 10262306a36Sopenharmony_ci or t0, t1, t0 # e1 : 10362306a36Sopenharmony_ci 10462306a36Sopenharmony_ci1: stq_u t0, 0(a0) # e0 : 10562306a36Sopenharmony_ci ret (t9) # e1 : 10662306a36Sopenharmony_ci 10762306a36Sopenharmony_ci /* Add the end-of-count bit to the eos detection bitmask. */ 10862306a36Sopenharmony_ci$a_eoc: 10962306a36Sopenharmony_ci or t10, t8, t8 11062306a36Sopenharmony_ci br $a_eos 11162306a36Sopenharmony_ci 11262306a36Sopenharmony_ci .end stxncpy_aligned 11362306a36Sopenharmony_ci 11462306a36Sopenharmony_ci .align 3 11562306a36Sopenharmony_ci .ent __stxncpy 11662306a36Sopenharmony_ci .globl __stxncpy 11762306a36Sopenharmony_ci__stxncpy: 11862306a36Sopenharmony_ci .frame sp, 0, t9, 0 11962306a36Sopenharmony_ci .prologue 0 12062306a36Sopenharmony_ci 12162306a36Sopenharmony_ci /* Are source and destination co-aligned? */ 12262306a36Sopenharmony_ci xor a0, a1, t1 # e0 : 12362306a36Sopenharmony_ci and a0, 7, t0 # .. e1 : find dest misalignment 12462306a36Sopenharmony_ci and t1, 7, t1 # e0 : 12562306a36Sopenharmony_ci addq a2, t0, a2 # .. e1 : bias count by dest misalignment 12662306a36Sopenharmony_ci subq a2, 1, a2 # e0 : 12762306a36Sopenharmony_ci and a2, 7, t2 # e1 : 12862306a36Sopenharmony_ci srl a2, 3, a2 # e0 : a2 = loop counter = (count - 1)/8 12962306a36Sopenharmony_ci addq zero, 1, t10 # .. e1 : 13062306a36Sopenharmony_ci sll t10, t2, t10 # e0 : t10 = bitmask of last count byte 13162306a36Sopenharmony_ci bne t1, $unaligned # .. e1 : 13262306a36Sopenharmony_ci 13362306a36Sopenharmony_ci /* We are co-aligned; take care of a partial first word. */ 13462306a36Sopenharmony_ci 13562306a36Sopenharmony_ci ldq_u t1, 0(a1) # e0 : load first src word 13662306a36Sopenharmony_ci addq a1, 8, a1 # .. e1 : 13762306a36Sopenharmony_ci 13862306a36Sopenharmony_ci beq t0, stxncpy_aligned # avoid loading dest word if not needed 13962306a36Sopenharmony_ci ldq_u t0, 0(a0) # e0 : 14062306a36Sopenharmony_ci br stxncpy_aligned # .. e1 : 14162306a36Sopenharmony_ci 14262306a36Sopenharmony_ci 14362306a36Sopenharmony_ci/* The source and destination are not co-aligned. Align the destination 14462306a36Sopenharmony_ci and cope. We have to be very careful about not reading too much and 14562306a36Sopenharmony_ci causing a SEGV. */ 14662306a36Sopenharmony_ci 14762306a36Sopenharmony_ci .align 3 14862306a36Sopenharmony_ci$u_head: 14962306a36Sopenharmony_ci /* We know just enough now to be able to assemble the first 15062306a36Sopenharmony_ci full source word. We can still find a zero at the end of it 15162306a36Sopenharmony_ci that prevents us from outputting the whole thing. 15262306a36Sopenharmony_ci 15362306a36Sopenharmony_ci On entry to this basic block: 15462306a36Sopenharmony_ci t0 == the first dest word, unmasked 15562306a36Sopenharmony_ci t1 == the shifted low bits of the first source word 15662306a36Sopenharmony_ci t6 == bytemask that is -1 in dest word bytes */ 15762306a36Sopenharmony_ci 15862306a36Sopenharmony_ci ldq_u t2, 8(a1) # e0 : load second src word 15962306a36Sopenharmony_ci addq a1, 8, a1 # .. e1 : 16062306a36Sopenharmony_ci mskql t0, a0, t0 # e0 : mask trailing garbage in dst 16162306a36Sopenharmony_ci extqh t2, a1, t4 # e0 : 16262306a36Sopenharmony_ci or t1, t4, t1 # e1 : first aligned src word complete 16362306a36Sopenharmony_ci mskqh t1, a0, t1 # e0 : mask leading garbage in src 16462306a36Sopenharmony_ci or t0, t1, t0 # e0 : first output word complete 16562306a36Sopenharmony_ci or t0, t6, t6 # e1 : mask original data for zero test 16662306a36Sopenharmony_ci cmpbge zero, t6, t8 # e0 : 16762306a36Sopenharmony_ci beq a2, $u_eocfin # .. e1 : 16862306a36Sopenharmony_ci lda t6, -1 # e0 : 16962306a36Sopenharmony_ci bne t8, $u_final # .. e1 : 17062306a36Sopenharmony_ci 17162306a36Sopenharmony_ci mskql t6, a1, t6 # e0 : mask out bits already seen 17262306a36Sopenharmony_ci nop # .. e1 : 17362306a36Sopenharmony_ci stq_u t0, 0(a0) # e0 : store first output word 17462306a36Sopenharmony_ci or t6, t2, t2 # .. e1 : 17562306a36Sopenharmony_ci cmpbge zero, t2, t8 # e0 : find nulls in second partial 17662306a36Sopenharmony_ci addq a0, 8, a0 # .. e1 : 17762306a36Sopenharmony_ci subq a2, 1, a2 # e0 : 17862306a36Sopenharmony_ci bne t8, $u_late_head_exit # .. e1 : 17962306a36Sopenharmony_ci 18062306a36Sopenharmony_ci /* Finally, we've got all the stupid leading edge cases taken care 18162306a36Sopenharmony_ci of and we can set up to enter the main loop. */ 18262306a36Sopenharmony_ci 18362306a36Sopenharmony_ci extql t2, a1, t1 # e0 : position hi-bits of lo word 18462306a36Sopenharmony_ci beq a2, $u_eoc # .. e1 : 18562306a36Sopenharmony_ci ldq_u t2, 8(a1) # e0 : read next high-order source word 18662306a36Sopenharmony_ci addq a1, 8, a1 # .. e1 : 18762306a36Sopenharmony_ci extqh t2, a1, t0 # e0 : position lo-bits of hi word (stall) 18862306a36Sopenharmony_ci cmpbge zero, t2, t8 # .. e1 : 18962306a36Sopenharmony_ci nop # e0 : 19062306a36Sopenharmony_ci bne t8, $u_eos # .. e1 : 19162306a36Sopenharmony_ci 19262306a36Sopenharmony_ci /* Unaligned copy main loop. In order to avoid reading too much, 19362306a36Sopenharmony_ci the loop is structured to detect zeros in aligned source words. 19462306a36Sopenharmony_ci This has, unfortunately, effectively pulled half of a loop 19562306a36Sopenharmony_ci iteration out into the head and half into the tail, but it does 19662306a36Sopenharmony_ci prevent nastiness from accumulating in the very thing we want 19762306a36Sopenharmony_ci to run as fast as possible. 19862306a36Sopenharmony_ci 19962306a36Sopenharmony_ci On entry to this basic block: 20062306a36Sopenharmony_ci t0 == the shifted low-order bits from the current source word 20162306a36Sopenharmony_ci t1 == the shifted high-order bits from the previous source word 20262306a36Sopenharmony_ci t2 == the unshifted current source word 20362306a36Sopenharmony_ci 20462306a36Sopenharmony_ci We further know that t2 does not contain a null terminator. */ 20562306a36Sopenharmony_ci 20662306a36Sopenharmony_ci .align 3 20762306a36Sopenharmony_ci$u_loop: 20862306a36Sopenharmony_ci or t0, t1, t0 # e0 : current dst word now complete 20962306a36Sopenharmony_ci subq a2, 1, a2 # .. e1 : decrement word count 21062306a36Sopenharmony_ci stq_u t0, 0(a0) # e0 : save the current word 21162306a36Sopenharmony_ci addq a0, 8, a0 # .. e1 : 21262306a36Sopenharmony_ci extql t2, a1, t1 # e0 : extract high bits for next time 21362306a36Sopenharmony_ci beq a2, $u_eoc # .. e1 : 21462306a36Sopenharmony_ci ldq_u t2, 8(a1) # e0 : load high word for next time 21562306a36Sopenharmony_ci addq a1, 8, a1 # .. e1 : 21662306a36Sopenharmony_ci nop # e0 : 21762306a36Sopenharmony_ci cmpbge zero, t2, t8 # e1 : test new word for eos (stall) 21862306a36Sopenharmony_ci extqh t2, a1, t0 # e0 : extract low bits for current word 21962306a36Sopenharmony_ci beq t8, $u_loop # .. e1 : 22062306a36Sopenharmony_ci 22162306a36Sopenharmony_ci /* We've found a zero somewhere in the source word we just read. 22262306a36Sopenharmony_ci If it resides in the lower half, we have one (probably partial) 22362306a36Sopenharmony_ci word to write out, and if it resides in the upper half, we 22462306a36Sopenharmony_ci have one full and one partial word left to write out. 22562306a36Sopenharmony_ci 22662306a36Sopenharmony_ci On entry to this basic block: 22762306a36Sopenharmony_ci t0 == the shifted low-order bits from the current source word 22862306a36Sopenharmony_ci t1 == the shifted high-order bits from the previous source word 22962306a36Sopenharmony_ci t2 == the unshifted current source word. */ 23062306a36Sopenharmony_ci$u_eos: 23162306a36Sopenharmony_ci or t0, t1, t0 # e0 : first (partial) source word complete 23262306a36Sopenharmony_ci nop # .. e1 : 23362306a36Sopenharmony_ci cmpbge zero, t0, t8 # e0 : is the null in this first bit? 23462306a36Sopenharmony_ci bne t8, $u_final # .. e1 (zdb) 23562306a36Sopenharmony_ci 23662306a36Sopenharmony_ci stq_u t0, 0(a0) # e0 : the null was in the high-order bits 23762306a36Sopenharmony_ci addq a0, 8, a0 # .. e1 : 23862306a36Sopenharmony_ci subq a2, 1, a2 # e1 : 23962306a36Sopenharmony_ci 24062306a36Sopenharmony_ci$u_late_head_exit: 24162306a36Sopenharmony_ci extql t2, a1, t0 # .. e0 : 24262306a36Sopenharmony_ci cmpbge zero, t0, t8 # e0 : 24362306a36Sopenharmony_ci or t8, t10, t6 # e1 : 24462306a36Sopenharmony_ci cmoveq a2, t6, t8 # e0 : 24562306a36Sopenharmony_ci nop # .. e1 : 24662306a36Sopenharmony_ci 24762306a36Sopenharmony_ci /* Take care of a final (probably partial) result word. 24862306a36Sopenharmony_ci On entry to this basic block: 24962306a36Sopenharmony_ci t0 == assembled source word 25062306a36Sopenharmony_ci t8 == cmpbge mask that found the null. */ 25162306a36Sopenharmony_ci$u_final: 25262306a36Sopenharmony_ci negq t8, t6 # e0 : isolate low bit set 25362306a36Sopenharmony_ci and t6, t8, t12 # e1 : 25462306a36Sopenharmony_ci 25562306a36Sopenharmony_ci and t12, 0x80, t6 # e0 : avoid dest word load if we can 25662306a36Sopenharmony_ci bne t6, 1f # .. e1 (zdb) 25762306a36Sopenharmony_ci 25862306a36Sopenharmony_ci ldq_u t1, 0(a0) # e0 : 25962306a36Sopenharmony_ci subq t12, 1, t6 # .. e1 : 26062306a36Sopenharmony_ci or t6, t12, t8 # e0 : 26162306a36Sopenharmony_ci zapnot t0, t8, t0 # .. e1 : kill source bytes > null 26262306a36Sopenharmony_ci zap t1, t8, t1 # e0 : kill dest bytes <= null 26362306a36Sopenharmony_ci or t0, t1, t0 # e1 : 26462306a36Sopenharmony_ci 26562306a36Sopenharmony_ci1: stq_u t0, 0(a0) # e0 : 26662306a36Sopenharmony_ci ret (t9) # .. e1 : 26762306a36Sopenharmony_ci 26862306a36Sopenharmony_ci /* Got to end-of-count before end of string. 26962306a36Sopenharmony_ci On entry to this basic block: 27062306a36Sopenharmony_ci t1 == the shifted high-order bits from the previous source word */ 27162306a36Sopenharmony_ci$u_eoc: 27262306a36Sopenharmony_ci and a1, 7, t6 # e1 : 27362306a36Sopenharmony_ci sll t10, t6, t6 # e0 : 27462306a36Sopenharmony_ci and t6, 0xff, t6 # e0 : 27562306a36Sopenharmony_ci bne t6, 1f # .. e1 : 27662306a36Sopenharmony_ci 27762306a36Sopenharmony_ci ldq_u t2, 8(a1) # e0 : load final src word 27862306a36Sopenharmony_ci nop # .. e1 : 27962306a36Sopenharmony_ci extqh t2, a1, t0 # e0 : extract low bits for last word 28062306a36Sopenharmony_ci or t1, t0, t1 # e1 : 28162306a36Sopenharmony_ci 28262306a36Sopenharmony_ci1: cmpbge zero, t1, t8 28362306a36Sopenharmony_ci mov t1, t0 28462306a36Sopenharmony_ci 28562306a36Sopenharmony_ci$u_eocfin: # end-of-count, final word 28662306a36Sopenharmony_ci or t10, t8, t8 28762306a36Sopenharmony_ci br $u_final 28862306a36Sopenharmony_ci 28962306a36Sopenharmony_ci /* Unaligned copy entry point. */ 29062306a36Sopenharmony_ci .align 3 29162306a36Sopenharmony_ci$unaligned: 29262306a36Sopenharmony_ci 29362306a36Sopenharmony_ci ldq_u t1, 0(a1) # e0 : load first source word 29462306a36Sopenharmony_ci 29562306a36Sopenharmony_ci and a0, 7, t4 # .. e1 : find dest misalignment 29662306a36Sopenharmony_ci and a1, 7, t5 # e0 : find src misalignment 29762306a36Sopenharmony_ci 29862306a36Sopenharmony_ci /* Conditionally load the first destination word and a bytemask 29962306a36Sopenharmony_ci with 0xff indicating that the destination byte is sacrosanct. */ 30062306a36Sopenharmony_ci 30162306a36Sopenharmony_ci mov zero, t0 # .. e1 : 30262306a36Sopenharmony_ci mov zero, t6 # e0 : 30362306a36Sopenharmony_ci beq t4, 1f # .. e1 : 30462306a36Sopenharmony_ci ldq_u t0, 0(a0) # e0 : 30562306a36Sopenharmony_ci lda t6, -1 # .. e1 : 30662306a36Sopenharmony_ci mskql t6, a0, t6 # e0 : 30762306a36Sopenharmony_ci subq a1, t4, a1 # .. e1 : sub dest misalignment from src addr 30862306a36Sopenharmony_ci 30962306a36Sopenharmony_ci /* If source misalignment is larger than dest misalignment, we need 31062306a36Sopenharmony_ci extra startup checks to avoid SEGV. */ 31162306a36Sopenharmony_ci 31262306a36Sopenharmony_ci1: cmplt t4, t5, t12 # e1 : 31362306a36Sopenharmony_ci extql t1, a1, t1 # .. e0 : shift src into place 31462306a36Sopenharmony_ci lda t2, -1 # e0 : for creating masks later 31562306a36Sopenharmony_ci beq t12, $u_head # .. e1 : 31662306a36Sopenharmony_ci 31762306a36Sopenharmony_ci extql t2, a1, t2 # e0 : 31862306a36Sopenharmony_ci cmpbge zero, t1, t8 # .. e1 : is there a zero? 31962306a36Sopenharmony_ci andnot t2, t6, t2 # e0 : dest mask for a single word copy 32062306a36Sopenharmony_ci or t8, t10, t5 # .. e1 : test for end-of-count too 32162306a36Sopenharmony_ci cmpbge zero, t2, t3 # e0 : 32262306a36Sopenharmony_ci cmoveq a2, t5, t8 # .. e1 : 32362306a36Sopenharmony_ci andnot t8, t3, t8 # e0 : 32462306a36Sopenharmony_ci beq t8, $u_head # .. e1 (zdb) 32562306a36Sopenharmony_ci 32662306a36Sopenharmony_ci /* At this point we've found a zero in the first partial word of 32762306a36Sopenharmony_ci the source. We need to isolate the valid source data and mask 32862306a36Sopenharmony_ci it into the original destination data. (Incidentally, we know 32962306a36Sopenharmony_ci that we'll need at least one byte of that original dest word.) */ 33062306a36Sopenharmony_ci 33162306a36Sopenharmony_ci ldq_u t0, 0(a0) # e0 : 33262306a36Sopenharmony_ci negq t8, t6 # .. e1 : build bitmask of bytes <= zero 33362306a36Sopenharmony_ci mskqh t1, t4, t1 # e0 : 33462306a36Sopenharmony_ci and t6, t8, t12 # .. e1 : 33562306a36Sopenharmony_ci subq t12, 1, t6 # e0 : 33662306a36Sopenharmony_ci or t6, t12, t8 # e1 : 33762306a36Sopenharmony_ci 33862306a36Sopenharmony_ci zapnot t2, t8, t2 # e0 : prepare source word; mirror changes 33962306a36Sopenharmony_ci zapnot t1, t8, t1 # .. e1 : to source validity mask 34062306a36Sopenharmony_ci 34162306a36Sopenharmony_ci andnot t0, t2, t0 # e0 : zero place for source to reside 34262306a36Sopenharmony_ci or t0, t1, t0 # e1 : and put it there 34362306a36Sopenharmony_ci stq_u t0, 0(a0) # e0 : 34462306a36Sopenharmony_ci ret (t9) # .. e1 : 34562306a36Sopenharmony_ci 34662306a36Sopenharmony_ci .end __stxncpy 347