From b940d8edb2f2043e4614e888d0209371ca6ef8fd Mon Sep 17 00:00:00 2001 From: Danny Milosavljevic Date: Sat, 26 Dec 2020 17:25:07 +0100 Subject: [PATCH] arm-asm: Optimize gen_le32 --- arm-asm.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/arm-asm.c b/arm-asm.c index 16a31865..ce3ac80e 100644 --- a/arm-asm.c +++ b/arm-asm.c @@ -134,8 +134,16 @@ ST_FUNC void gen_le16 (int i) ST_FUNC void gen_le32 (int i) { - gen_le16(i); - gen_le16(i>>16); + int ind1; + if (nocode_wanted) + return; + ind1 = ind + 4; + if (ind1 > cur_text_section->data_allocated) + section_realloc(cur_text_section, ind1); + cur_text_section->data[ind++] = i & 0xFF; + cur_text_section->data[ind++] = (i >> 8) & 0xFF; + cur_text_section->data[ind++] = (i >> 16) & 0xFF; + cur_text_section->data[ind++] = (i >> 24) & 0xFF; } ST_FUNC void gen_expr32(ExprValue *pe)