Move hulk.writef buffer variables to stack

Previously ldc2 was emitting AVX/SSE instructions to initialize these
buffers.
This commit is contained in:
Josh Holtrop 2022-11-05 22:06:18 -04:00
parent 354555d7f1
commit 95b9e4558a

View File

@ -90,7 +90,7 @@ private size_t write_hex(ulong v, bool upper, char pad, size_t width, ch_out_fn
{ {
static __gshared const(char)[16] hex_chars_lower = "0123456789abcdef"; static __gshared const(char)[16] hex_chars_lower = "0123456789abcdef";
static __gshared const(char)[16] hex_chars_upper = "0123456789ABCDEF"; static __gshared const(char)[16] hex_chars_upper = "0123456789ABCDEF";
static __gshared char[16] buf; char[16] buf;
size_t i; size_t i;
do 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) private size_t write_udec(ulong v, char pad, size_t width, ch_out_fn ch_out)
{ {
static __gshared char[20] buf; char[20] buf;
size_t i; size_t i;
do do
{ {