change which to command -v
[tinycc.git] / arm64-asm.c
bloba97fd6420ebce788353bfc0cb59b6813b519f2e2
1 /*************************************************************/
2 /*
3 * ARM64 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 /*************************************************************/
19 #define USING_GLOBALS
20 #include "tcc.h"
22 static void asm_error(void)
24 tcc_error("ARM asm not implemented.");
27 /* XXX: make it faster ? */
28 ST_FUNC void g(int c)
30 int ind1;
31 if (nocode_wanted)
32 return;
33 ind1 = ind + 1;
34 if (ind1 > cur_text_section->data_allocated)
35 section_realloc(cur_text_section, ind1);
36 cur_text_section->data[ind] = c;
37 ind = ind1;
40 ST_FUNC void gen_le16 (int i)
42 g(i);
43 g(i>>8);
46 ST_FUNC void gen_le32 (int i)
48 gen_le16(i);
49 gen_le16(i>>16);
52 ST_FUNC void gen_expr32(ExprValue *pe)
54 gen_le32(pe->v);
57 ST_FUNC void asm_opcode(TCCState *s1, int opcode)
59 asm_error();
62 ST_FUNC void subst_asm_operand(CString *add_str, SValue *sv, int modifier)
64 asm_error();
67 /* generate prolog and epilog code for asm statement */
68 ST_FUNC void asm_gen_code(ASMOperand *operands, int nb_operands,
69 int nb_outputs, int is_output,
70 uint8_t *clobber_regs,
71 int out_reg)
75 ST_FUNC void asm_compute_constraints(ASMOperand *operands,
76 int nb_operands, int nb_outputs,
77 const uint8_t *clobber_regs,
78 int *pout_reg)
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 */