@@ -1624,8 +1624,15 @@ fr_read(char *item, /* where to transfer data to. The value of item may
1624
1624
if (g -> curr_pos > g -> obuff_len )
1625
1625
g -> curr_pos = g -> obuff_len ;
1626
1626
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
1627
1633
while (g -> rec_len < g -> curr_pos )
1628
1634
g -> rec_buff [g -> rec_len ++ ] = ' ' ;
1635
+ #endif
1629
1636
}
1630
1637
}
1631
1638
}
@@ -1713,11 +1720,23 @@ fr_read(char *item, /* where to transfer data to. The value of item may
1713
1720
i = fr_move_fwd (w );
1714
1721
if (i != 0 )
1715
1722
return i ;
1723
+ #ifdef TARGET_LLVM_ARM64
1724
+ memcpy (item , g -> rec_buff + idx , w );
1725
+ item += w ;
1726
+ #else
1716
1727
while (w -- > 0 )
1717
1728
* item ++ = g -> rec_buff [idx ++ ];
1729
+ #endif
1718
1730
if (g -> pad == FIO_YES ) {
1731
+ #ifdef TARGET_LLVM_ARM64
1732
+ if (pad > 0 ) {
1733
+ memset (item , ' ' , pad );
1734
+ item += pad ;
1735
+ }
1736
+ #else
1719
1737
while (pad > 0 )
1720
1738
* item ++ = ' ' , pad -- ;
1739
+ #endif
1721
1740
}
1722
1741
}
1723
1742
goto exit_loop ;
@@ -1749,11 +1768,23 @@ fr_read(char *item, /* where to transfer data to. The value of item may
1749
1768
i = fr_move_fwd (w );
1750
1769
if (i != 0 )
1751
1770
return i ;
1771
+ #ifdef TARGET_LLVM_ARM64
1772
+ memcpy (item , g -> rec_buff + idx , w );
1773
+ #else
1752
1774
while (w -- > 0 )
1753
1775
* item ++ = g -> rec_buff [idx ++ ];
1776
+ item += w ;
1777
+ #endif
1754
1778
if (g -> pad == FIO_YES ) {
1779
+ #ifdef TARGET_LLVM_ARM64
1780
+ if (pad > 0 ) {
1781
+ memset (item , ' ' , pad );
1782
+ item += pad ;
1783
+ }
1784
+ #else
1755
1785
while (pad > 0 )
1756
1786
* item ++ = ' ' , pad -- ;
1787
+ #endif
1757
1788
}
1758
1789
goto exit_loop ;
1759
1790
}
@@ -3199,8 +3230,15 @@ fr_move_fwd(int len)
3199
3230
move_fwd_eor = 1 ;
3200
3231
}
3201
3232
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
3202
3239
while (g -> rec_len < g -> curr_pos )
3203
3240
g -> rec_buff [g -> rec_len ++ ] = ' ' ;
3241
+ #endif
3204
3242
}
3205
3243
g -> max_pos = g -> curr_pos ;
3206
3244
return 0 ;
0 commit comments