Avoid using SSE instructions in writef functions

This commit is contained in:
Josh Holtrop 2022-08-23 22:48:52 -04:00
parent 63e6fd4bb5
commit 16143a727a

View File

@ -88,9 +88,9 @@ size_t writef(string s, va_list args, ch_out_fn ch_out)
*/
private size_t write_hex(ulong v, bool upper, char pad, size_t width, ch_out_fn ch_out)
{
string hex_chars_lower = "0123456789abcdef";
string hex_chars_upper = "0123456789ABCDEF";
char[16] buf;
static __gshared string hex_chars_lower = "0123456789abcdef";
static __gshared string hex_chars_upper = "0123456789ABCDEF";
static __gshared char[16] buf;
size_t i;
do
{
@ -126,7 +126,7 @@ private size_t write_hex(ulong v, bool upper, char pad, size_t width, ch_out_fn
*/
private size_t write_udec(ulong v, char pad, size_t width, ch_out_fn ch_out)
{
char[20] buf;
static __gshared char[20] buf;
size_t i;
do
{