Give clang one less thing to complain about
[tinycc.git] / arm-asm.c
blobc236b542885fc9f66853150994fa7f50f17b39fd
1 /*************************************************************/
2 /*
3 * ARM dummy assembler for TCC
5 */
7 #ifdef TARGET_DEFS_ONLY
9 #define CONFIG_TCC_ASM
10 #define NB_ASM_REGS 16
12 ST_FUNC void g(int c);
13 ST_FUNC void gen_le16(int c);
14 ST_FUNC void gen_le32(int c);
16 /*************************************************************/
17 #else
18 /*************************************************************/
20 static void asm_error(void)
22 tcc_error("ARM asm not implemented.");
25 /* XXX: make it faster ? */
26 ST_FUNC void g(int c)
28 int ind1;
29 if (nocode_wanted)
30 return;
31 ind1 = ind + 1;
32 if (ind1 > cur_text_section->data_allocated)
33 section_realloc(cur_text_section, ind1);
34 cur_text_section->data[ind] = c;
35 ind = ind1;
38 ST_FUNC void gen_le16 (int i)
40 g(i);
41 g(i>>8);
44 ST_FUNC void gen_le32 (int i)
46 gen_le16(i);
47 gen_le16(i>>16);
50 ST_FUNC void gen_expr32(ExprValue *pe)
52 gen_le32(pe->v);
55 ST_FUNC void asm_opcode(TCCState *s1, int opcode)
57 asm_error();
60 ST_FUNC void subst_asm_operand(CString *add_str, SValue *sv, int modifier)
62 asm_error();
65 /* generate prolog and epilog code for asm statement */
66 ST_FUNC void asm_gen_code(ASMOperand *operands, int nb_operands,
67 int nb_outputs, int is_output,
68 uint8_t *clobber_regs,
69 int out_reg)
71 asm_error();
74 ST_FUNC void asm_compute_constraints(ASMOperand *operands,
75 int nb_operands, int nb_outputs,
76 const uint8_t *clobber_regs,
77 int *pout_reg)
79 asm_error();
82 ST_FUNC void asm_clobber(uint8_t *clobber_regs, const char *str)
84 asm_error();
87 ST_FUNC int asm_parse_regvar (int t)
89 asm_error();
90 return -1;
93 /*************************************************************/
94 #endif /* ndef TARGET_DEFS_ONLY */