[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Tinycc-devel] [PATCH 16/16] arm-asm: Optimize gen_le32
From: |
Danny Milosavljevic |
Subject: |
[Tinycc-devel] [PATCH 16/16] arm-asm: Optimize gen_le32 |
Date: |
Sat, 26 Dec 2020 22:58:17 +0100 |
---
arm-asm.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/arm-asm.c b/arm-asm.c
index 8c8a464..2c57b27 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)
- [Tinycc-devel] [PATCH 06/16] arm-asm: Add wfe, wfi, (continued)
- [Tinycc-devel] [PATCH 06/16] arm-asm: Add wfe, wfi, Danny Milosavljevic, 2020/12/26
- [Tinycc-devel] [PATCH 05/16] arm-asm: Add nop, Danny Milosavljevic, 2020/12/26
- [Tinycc-devel] [PATCH 08/16] arm-asm: Add push, pop, Danny Milosavljevic, 2020/12/26
- [Tinycc-devel] [PATCH 01/16] arm-asm: Publish g, gen_le16, gen_le32 in tcc.h, Danny Milosavljevic, 2020/12/26
- [Tinycc-devel] [PATCH 09/16] arm-asm: Add swi, Danny Milosavljevic, 2020/12/26
- [Tinycc-devel] [PATCH 07/16] arm-asm: Add parse_operand, Operand, Danny Milosavljevic, 2020/12/26
- [Tinycc-devel] [PATCH 10/16] arm-asm: Add clz, sxtb, sxth, uxtb, uxth, Danny Milosavljevic, 2020/12/26
- [Tinycc-devel] [PATCH 12/16] arm-asm: Add stmda, ldmda, stm, ldm, stmia, ldmia, stmdb, ldmdb, stmib, ldmib, Danny Milosavljevic, 2020/12/26
- [Tinycc-devel] [PATCH 11/16] arm-asm: Add mul, mla, smull, umull, smlal, umlal, Danny Milosavljevic, 2020/12/26
- [Tinycc-devel] [PATCH 13/16] arm-asm: Add ldr, ldrb, str, strb, Danny Milosavljevic, 2020/12/26
- [Tinycc-devel] [PATCH 16/16] arm-asm: Optimize gen_le32,
Danny Milosavljevic <=
- [Tinycc-devel] [PATCH 15/16] arm-asm: Add b, bl, bx, blx, Danny Milosavljevic, 2020/12/26
- [Tinycc-devel] [PATCH 14/16] arm-asm: Add and, eor, sub, rsb, add, adc, sbc, rsc, tst, teq, cmp, cmn, orr, mov, bic, mvn, Danny Milosavljevic, 2020/12/26
- Re: [Tinycc-devel] [PATCH 00/16] Add ARM inline assembler, Danny Milosavljevic, 2020/12/26
- [Tinycc-devel] [PATCH 02/16] arm-asm: Implement asm_parse_regvar and asm_clobber, Danny Milosavljevic, 2020/12/26
- [Tinycc-devel] [PATCH 04/16] arm-asm: Remove asm_error, Danny Milosavljevic, 2020/12/26
- Re: [Tinycc-devel] [PATCH 00/16] Add ARM inline assembler, Jan Nieuwenhuizen, 2020/12/27
- Re: [Tinycc-devel] [PATCH 00/16] Add ARM inline assembler, Michael Matz, 2020/12/27
- Prev by Date:
[Tinycc-devel] [PATCH 13/16] arm-asm: Add ldr, ldrb, str, strb
- Next by Date:
[Tinycc-devel] [PATCH 15/16] arm-asm: Add b, bl, bx, blx
- Previous by thread:
[Tinycc-devel] [PATCH 13/16] arm-asm: Add ldr, ldrb, str, strb
- Next by thread:
[Tinycc-devel] [PATCH 15/16] arm-asm: Add b, bl, bx, blx
- Index(es):