mirror of
git://repo.or.cz/tinycc.git
synced 2026-07-01 09:08:40 +08:00
style: fix arm64-asm.c to match TCC codebase conventions
- Remove unnecessary braces from single-statement if blocks - Remove trailing whitespace throughout file - Remove duplicate comment Style now matches existing ARM64 backend and TCC conventions: - Allman style for function definitions - No braces for single-statement control structures - Consistent 4-space indentation
This commit is contained in:
parent
d9b0c5b920
commit
44fef0743b
@ -360,7 +360,6 @@ static void parse_addr_operand(TCCState *s1, Operand *op)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Generate MOVZ instruction */
|
|
||||||
/* Generate MOVZ/MOVN/MOVK with base opcode */
|
/* Generate MOVZ/MOVN/MOVK with base opcode */
|
||||||
static void gen_mov_with_base(int rd, uint16_t imm, int shift,
|
static void gen_mov_with_base(int rd, uint16_t imm, int shift,
|
||||||
int is_64bit, uint32_t base_opcode)
|
int is_64bit, uint32_t base_opcode)
|
||||||
@ -1550,9 +1549,8 @@ ST_FUNC void subst_asm_operand(CString *add_str, SValue *sv, int modifier)
|
|||||||
cstr_ccat(add_str, '#');
|
cstr_ccat(add_str, '#');
|
||||||
if (r & VT_SYM) {
|
if (r & VT_SYM) {
|
||||||
const char *name = get_tok_str(sv->sym->v, NULL);
|
const char *name = get_tok_str(sv->sym->v, NULL);
|
||||||
if (sv->sym->v >= SYM_FIRST_ANOM) {
|
if (sv->sym->v >= SYM_FIRST_ANOM)
|
||||||
get_asm_sym(tok_alloc(name, strlen(name))->tok, sv->sym);
|
get_asm_sym(tok_alloc(name, strlen(name))->tok, sv->sym);
|
||||||
}
|
|
||||||
if (tcc_state->leading_underscore)
|
if (tcc_state->leading_underscore)
|
||||||
cstr_ccat(add_str, '_');
|
cstr_ccat(add_str, '_');
|
||||||
cstr_cat(add_str, name, -1);
|
cstr_cat(add_str, name, -1);
|
||||||
@ -1948,9 +1946,8 @@ ST_FUNC void asm_clobber(uint8_t *clobber_regs, const char *str)
|
|||||||
|
|
||||||
ts = tok_alloc(str, strlen(str));
|
ts = tok_alloc(str, strlen(str));
|
||||||
reg = arm64_parse_regvar(ts->tok);
|
reg = arm64_parse_regvar(ts->tok);
|
||||||
if (reg == -1) {
|
if (reg == -1)
|
||||||
tcc_error("invalid clobber register '%s'", str);
|
tcc_error("invalid clobber register '%s'", str);
|
||||||
}
|
|
||||||
clobber_regs[reg] = 1;
|
clobber_regs[reg] = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user