@@ -1624,8 +1624,15 @@ fr_read(char *item, /* where to transfer data to. The value of item may
16241624 if (g -> curr_pos > g -> obuff_len )
16251625 g -> curr_pos = g -> obuff_len ;
16261626 else {
1627+ #ifdef TARGET_LLVM_ARM64
1628+ if (g -> rec_len < g -> curr_pos ) {
1629+ memset (g -> rec_buff + g -> rec_len , ' ' , g -> curr_pos - g -> rec_len );
1630+ g -> rec_len = g -> curr_pos ;
1631+ }
1632+ #else
16271633 while (g -> rec_len < g -> curr_pos )
16281634 g -> rec_buff [g -> rec_len ++ ] = ' ' ;
1635+ #endif
16291636 }
16301637 }
16311638 }
@@ -1713,11 +1720,23 @@ fr_read(char *item, /* where to transfer data to. The value of item may
17131720 i = fr_move_fwd (w );
17141721 if (i != 0 )
17151722 return i ;
1723+ #ifdef TARGET_LLVM_ARM64
1724+ memcpy (item , g -> rec_buff + idx , w );
1725+ item += w ;
1726+ #else
17161727 while (w -- > 0 )
17171728 * item ++ = g -> rec_buff [idx ++ ];
1729+ #endif
17181730 if (g -> pad == FIO_YES ) {
1731+ #ifdef TARGET_LLVM_ARM64
1732+ if (pad > 0 ) {
1733+ memset (item , ' ' , pad );
1734+ item += pad ;
1735+ }
1736+ #else
17191737 while (pad > 0 )
17201738 * item ++ = ' ' , pad -- ;
1739+ #endif
17211740 }
17221741 }
17231742 goto exit_loop ;
@@ -1749,11 +1768,23 @@ fr_read(char *item, /* where to transfer data to. The value of item may
17491768 i = fr_move_fwd (w );
17501769 if (i != 0 )
17511770 return i ;
1771+ #ifdef TARGET_LLVM_ARM64
1772+ memcpy (item , g -> rec_buff + idx , w );
1773+ item += w ;
1774+ #else
17521775 while (w -- > 0 )
17531776 * item ++ = g -> rec_buff [idx ++ ];
1777+ #endif
17541778 if (g -> pad == FIO_YES ) {
1779+ #ifdef TARGET_LLVM_ARM64
1780+ if (pad > 0 ) {
1781+ memset (item , ' ' , pad );
1782+ item += pad ;
1783+ }
1784+ #else
17551785 while (pad > 0 )
17561786 * item ++ = ' ' , pad -- ;
1787+ #endif
17571788 }
17581789 goto exit_loop ;
17591790 }
@@ -3199,8 +3230,15 @@ fr_move_fwd(int len)
31993230 move_fwd_eor = 1 ;
32003231 }
32013232
3233+ #if TARGET_LLVM_ARM64
3234+ if (g -> rec_len < g -> curr_pos ) {
3235+ memset (g -> rec_buff + g -> rec_len , ' ' , g -> curr_pos - g -> rec_len );
3236+ g -> rec_len = g -> curr_pos ;
3237+ }
3238+ #else
32023239 while (g -> rec_len < g -> curr_pos )
32033240 g -> rec_buff [g -> rec_len ++ ] = ' ' ;
3241+ #endif
32043242 }
32053243 g -> max_pos = g -> curr_pos ;
32063244 return 0 ;
0 commit comments