Makefile: Split arm64-asm from arm-asm
This commit is contained in:
parent
8712b4c9c1
commit
9539f51369
2 changed files with 95 additions and 1 deletions
2
Makefile
2
Makefile
|
@ -187,7 +187,7 @@ arm-fpa-ld_FILES = $(arm_FILES)
|
||||||
arm-vfp_FILES = $(arm_FILES)
|
arm-vfp_FILES = $(arm_FILES)
|
||||||
arm-eabi_FILES = $(arm_FILES)
|
arm-eabi_FILES = $(arm_FILES)
|
||||||
arm-eabihf_FILES = $(arm_FILES)
|
arm-eabihf_FILES = $(arm_FILES)
|
||||||
arm64_FILES = $(CORE_FILES) arm64-gen.c arm64-link.c arm-asm.c
|
arm64_FILES = $(CORE_FILES) arm64-gen.c arm64-link.c arm64-asm.c
|
||||||
c67_FILES = $(CORE_FILES) c67-gen.c c67-link.c tcccoff.c
|
c67_FILES = $(CORE_FILES) c67-gen.c c67-link.c tcccoff.c
|
||||||
riscv64_FILES = $(CORE_FILES) riscv64-gen.c riscv64-link.c riscv64-asm.c
|
riscv64_FILES = $(CORE_FILES) riscv64-gen.c riscv64-link.c riscv64-asm.c
|
||||||
|
|
||||||
|
|
94
arm64-asm.c
Normal file
94
arm64-asm.c
Normal file
|
@ -0,0 +1,94 @@
|
||||||
|
/*************************************************************/
|
||||||
|
/*
|
||||||
|
* ARM64 dummy assembler for TCC
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef TARGET_DEFS_ONLY
|
||||||
|
|
||||||
|
#define CONFIG_TCC_ASM
|
||||||
|
#define NB_ASM_REGS 16
|
||||||
|
|
||||||
|
ST_FUNC void g(int c);
|
||||||
|
ST_FUNC void gen_le16(int c);
|
||||||
|
ST_FUNC void gen_le32(int c);
|
||||||
|
|
||||||
|
/*************************************************************/
|
||||||
|
#else
|
||||||
|
/*************************************************************/
|
||||||
|
#define USING_GLOBALS
|
||||||
|
#include "tcc.h"
|
||||||
|
|
||||||
|
static void asm_error(void)
|
||||||
|
{
|
||||||
|
tcc_error("ARM asm not implemented.");
|
||||||
|
}
|
||||||
|
|
||||||
|
/* XXX: make it faster ? */
|
||||||
|
ST_FUNC void g(int c)
|
||||||
|
{
|
||||||
|
int ind1;
|
||||||
|
if (nocode_wanted)
|
||||||
|
return;
|
||||||
|
ind1 = ind + 1;
|
||||||
|
if (ind1 > cur_text_section->data_allocated)
|
||||||
|
section_realloc(cur_text_section, ind1);
|
||||||
|
cur_text_section->data[ind] = c;
|
||||||
|
ind = ind1;
|
||||||
|
}
|
||||||
|
|
||||||
|
ST_FUNC void gen_le16 (int i)
|
||||||
|
{
|
||||||
|
g(i);
|
||||||
|
g(i>>8);
|
||||||
|
}
|
||||||
|
|
||||||
|
ST_FUNC void gen_le32 (int i)
|
||||||
|
{
|
||||||
|
gen_le16(i);
|
||||||
|
gen_le16(i>>16);
|
||||||
|
}
|
||||||
|
|
||||||
|
ST_FUNC void gen_expr32(ExprValue *pe)
|
||||||
|
{
|
||||||
|
gen_le32(pe->v);
|
||||||
|
}
|
||||||
|
|
||||||
|
ST_FUNC void asm_opcode(TCCState *s1, int opcode)
|
||||||
|
{
|
||||||
|
asm_error();
|
||||||
|
}
|
||||||
|
|
||||||
|
ST_FUNC void subst_asm_operand(CString *add_str, SValue *sv, int modifier)
|
||||||
|
{
|
||||||
|
asm_error();
|
||||||
|
}
|
||||||
|
|
||||||
|
/* generate prolog and epilog code for asm statement */
|
||||||
|
ST_FUNC void asm_gen_code(ASMOperand *operands, int nb_operands,
|
||||||
|
int nb_outputs, int is_output,
|
||||||
|
uint8_t *clobber_regs,
|
||||||
|
int out_reg)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
ST_FUNC void asm_compute_constraints(ASMOperand *operands,
|
||||||
|
int nb_operands, int nb_outputs,
|
||||||
|
const uint8_t *clobber_regs,
|
||||||
|
int *pout_reg)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
ST_FUNC void asm_clobber(uint8_t *clobber_regs, const char *str)
|
||||||
|
{
|
||||||
|
asm_error();
|
||||||
|
}
|
||||||
|
|
||||||
|
ST_FUNC int asm_parse_regvar (int t)
|
||||||
|
{
|
||||||
|
asm_error();
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*************************************************************/
|
||||||
|
#endif /* ndef TARGET_DEFS_ONLY */
|
Loading…
Reference in a new issue