mirror of
https://github.com/mirror/tinycc.git
synced 2025-04-01 12:30:08 +08:00
riscv64-asm: Optimize gen_le32
This commit is contained in:
parent
99189ea707
commit
468f338e23
@ -40,8 +40,16 @@ ST_FUNC void gen_le16 (int i)
|
|||||||
|
|
||||||
ST_FUNC void gen_le32 (int i)
|
ST_FUNC void gen_le32 (int i)
|
||||||
{
|
{
|
||||||
gen_le16(i);
|
int ind1;
|
||||||
gen_le16(i>>16);
|
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)
|
ST_FUNC void gen_expr32(ExprValue *pe)
|
||||||
|
Loading…
Reference in New Issue
Block a user